homebridge-config-ui-x 5.0.0-beta.54 → 5.0.0-beta.56
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/CHANGELOG.md +7 -3
- package/dist/bin/platforms/darwin.js +2 -2
- package/dist/bin/platforms/darwin.js.map +1 -1
- package/dist/modules/accessories/accessories.service.js +6 -6
- package/dist/modules/accessories/accessories.service.js.map +1 -1
- package/dist/modules/backup/backup.service.d.ts +1 -0
- package/dist/modules/backup/backup.service.js +40 -12
- package/dist/modules/backup/backup.service.js.map +1 -1
- package/dist/modules/config-editor/config-editor.service.js +56 -58
- package/dist/modules/config-editor/config-editor.service.js.map +1 -1
- package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.d.ts +1 -1
- package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.js +6 -6
- package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.js.map +1 -1
- package/dist/modules/plugins/plugins.service.js +6 -0
- package/dist/modules/plugins/plugins.service.js.map +1 -1
- package/dist/modules/server/server.service.js +26 -6
- package/dist/modules/server/server.service.js.map +1 -1
- package/package.json +16 -11
- package/public/assets/hap-icons/co-sensor.svg +72 -0
- package/public/assets/hap-icons/co2-sensor.svg +72 -0
- package/public/{chunk-AKQE7OWM.js → chunk-2COJW6JZ.js} +1 -1
- package/public/chunk-2IW5LNPB.js +1 -0
- package/public/{chunk-KLDACGOZ.js → chunk-3BELKOOV.js} +1 -1
- package/public/chunk-4CHT7AT4.js +1 -0
- package/public/chunk-4M72X5OK.js +1 -0
- package/public/chunk-4RHFK7T7.js +1 -0
- package/public/chunk-5V2DC7MB.js +1 -0
- package/public/{chunk-OKJ2T4EM.js → chunk-66N6LPDX.js} +1 -1
- package/public/{chunk-M5YMSV5J.js → chunk-6ANUJDFI.js} +1 -1
- package/public/chunk-6JZDPQRU.js +7 -0
- package/public/chunk-6UJYW2BC.js +1 -0
- package/public/{chunk-TWFE7WAV.js → chunk-736OOU3Z.js} +1 -1
- package/public/{chunk-HQDY2QYB.js → chunk-773OTB2G.js} +1 -1
- package/public/{chunk-Q7NLVQF3.js → chunk-A6S2CSNA.js} +1 -1
- package/public/chunk-AK5KQMIG.js +1 -0
- package/public/chunk-AOTHIRMY.js +1 -0
- package/public/{chunk-TQSZOE62.js → chunk-AXQ3BC2K.js} +1 -1
- package/public/{chunk-GZMSZZVX.js → chunk-B2ERIJJG.js} +1 -1
- package/public/{chunk-F2WFV5GW.js → chunk-BBVFH2MI.js} +1 -1
- package/public/{chunk-W7CPCAPT.js → chunk-D3QNROQA.js} +1 -1
- package/public/{chunk-WNBSA3C7.js → chunk-DCC24Q4F.js} +1 -1
- package/public/{chunk-XCZREHWX.js → chunk-DVN556RD.js} +1 -1
- package/public/{chunk-D5WEMCFU.js → chunk-E3OYPTR2.js} +5 -5
- package/public/{chunk-KD5YLOUW.js → chunk-G75CPMPQ.js} +2 -2
- package/public/{chunk-DFISUNQT.js → chunk-HLM36W2F.js} +1 -1
- package/public/chunk-HNSNM4LP.js +1 -0
- package/public/{chunk-PVRKV6LM.js → chunk-IQBKWEOJ.js} +1 -1
- package/public/chunk-IYB7FT3D.js +1 -0
- package/public/{chunk-3JTVYTOV.js → chunk-IYWODW5F.js} +1 -1
- package/public/{chunk-NBOGF5S7.js → chunk-J3SOHF7U.js} +1 -1
- package/public/chunk-J6F5YEE7.js +1 -0
- package/public/{chunk-LRGJFKOV.js → chunk-JJGSWCQV.js} +1 -1
- package/public/chunk-JJNXRO4M.js +1 -0
- package/public/chunk-JO3D6NVS.js +1 -0
- package/public/chunk-KSS2AKKJ.js +1 -0
- package/public/chunk-KZVBUYFA.js +1 -0
- package/public/{chunk-NSDMDB7X.js → chunk-L4SPVWCZ.js} +1 -1
- package/public/{chunk-IRTFX6CU.js → chunk-LS2FIX2L.js} +1 -1
- package/public/chunk-LSEE2EJ5.js +1 -0
- package/public/{chunk-L4PJSJOC.js → chunk-LYECLRZK.js} +1 -1
- package/public/chunk-M7SOMZDC.js +1 -0
- package/public/{chunk-BEBVDUK5.js → chunk-N4Z4UGMV.js} +1 -1
- package/public/chunk-NGIHFGBF.js +1 -0
- package/public/{chunk-D6PHTILW.js → chunk-NKLCJU2S.js} +1 -1
- package/public/chunk-OARRUSU5.js +1 -0
- package/public/{chunk-YIYI7U2L.js → chunk-OPSX6NGT.js} +1 -1
- package/public/chunk-P3FBSUT6.js +1 -0
- package/public/{chunk-GDNT2HPK.js → chunk-P6AJ5TS2.js} +1 -1
- package/public/chunk-Q6TB7XJF.js +1 -0
- package/public/{chunk-GHPAEKNM.js → chunk-QAB7LTBA.js} +1 -1
- package/public/{chunk-P5BH5BCJ.js → chunk-QIWZD5HO.js} +1 -1
- package/public/{chunk-X2NTV4U7.js → chunk-QX4JJLN4.js} +1 -1
- package/public/{chunk-NG3SOGCM.js → chunk-R5QHD2MV.js} +1 -1
- package/public/{chunk-6MIOQ7Y5.js → chunk-REYVZJK4.js} +1 -1
- package/public/{chunk-RWT5SL6D.js → chunk-S7I53EZU.js} +1 -1
- package/public/chunk-SD6V7IFJ.js +1 -0
- package/public/{chunk-MJUBX7V2.js → chunk-SHPANMJF.js} +1 -1
- package/public/{chunk-QGC43YCF.js → chunk-SZTIHT5G.js} +1 -1
- package/public/{chunk-KJCIKCUI.js → chunk-T6O5C7ES.js} +1 -1
- package/public/{chunk-M5LTG544.js → chunk-TH7WF563.js} +1 -1
- package/public/chunk-THIDU5VO.js +1 -0
- package/public/{chunk-QGDGNYSY.js → chunk-TLHK2BEJ.js} +1 -1
- package/public/{chunk-KIPITWHI.js → chunk-TOSAT7VK.js} +1 -1
- package/public/{chunk-MS2EQS6S.js → chunk-U3XAGOD7.js} +1 -1
- package/public/{chunk-JE3LI7IZ.js → chunk-UE3HPVVJ.js} +1 -1
- package/public/{chunk-X7HV5PS7.js → chunk-UHIT6NQS.js} +1 -1
- package/public/{chunk-5NJQH2A3.js → chunk-UXBIRDFV.js} +1 -1
- package/public/chunk-UXGMJXWE.js +1 -0
- package/public/{chunk-V233CDAY.js → chunk-VZPOY7LH.js} +1 -1
- package/public/chunk-WROPKO5D.js +1 -0
- package/public/{chunk-R2MEYLU6.js → chunk-XJTWPBNY.js} +1 -1
- package/public/{chunk-7HGOM4YX.js → chunk-XK5P2LIO.js} +1 -1
- package/public/{chunk-LSEE5MJ5.js → chunk-XKZJKXVQ.js} +1 -1
- package/public/chunk-XSVWXIZ3.js +1 -0
- package/public/{chunk-W6CTMNAG.js → chunk-Y5BDWQTD.js} +1 -1
- package/public/{chunk-UQFNUGQM.js → chunk-Y7QARRGO.js} +1 -1
- package/public/{chunk-6GWRWBF2.js → chunk-YBF3LNSH.js} +1 -1
- package/public/{chunk-UXXGHFQU.js → chunk-YCHPFYO5.js} +1 -1
- package/public/{chunk-IEBQX6HS.js → chunk-YSSMQJIR.js} +1 -1
- package/public/chunk-YVLNDNOU.js +1 -0
- package/public/chunk-ZEDF3XZB.js +1 -0
- package/public/{chunk-5BZGZWPU.js → chunk-ZEGJJ2QZ.js} +1 -1
- package/public/chunk-ZUXRWBEO.js +1 -0
- package/public/index.html +2 -2
- package/public/{main-WAIZFTFV.js → main-KLOKN23N.js} +1 -1
- package/public/{polyfills-IVGADV35.js → polyfills-QPBMDKSH.js} +2 -2
- package/public/{styles-GAKWEL7A.css → styles-EYD3YW3P.css} +1 -1
- package/public/chunk-2DTLVEZT.js +0 -1
- package/public/chunk-2FUKJXA2.js +0 -1
- package/public/chunk-3R46QOCE.js +0 -1
- package/public/chunk-3TOJYAHV.js +0 -1
- package/public/chunk-4IP5DDXE.js +0 -1
- package/public/chunk-5CDZD4QO.js +0 -1
- package/public/chunk-6MX25OCF.js +0 -1
- package/public/chunk-7EVWOJST.js +0 -1
- package/public/chunk-CEHKV4IM.js +0 -1
- package/public/chunk-HMDNUXTY.js +0 -1
- package/public/chunk-JGMDXNMZ.js +0 -1
- package/public/chunk-KAI32HWM.js +0 -1
- package/public/chunk-KPIML2SI.js +0 -1
- package/public/chunk-LTRMT3PM.js +0 -1
- package/public/chunk-MKXFRTHP.js +0 -1
- package/public/chunk-NCJAIFQO.js +0 -1
- package/public/chunk-O7E5GSDU.js +0 -1
- package/public/chunk-OAUVJEII.js +0 -1
- package/public/chunk-OIAU3DDH.js +0 -1
- package/public/chunk-OZD3PKS7.js +0 -1
- package/public/chunk-PTKIJR4Y.js +0 -1
- package/public/chunk-QNQ6DXDY.js +0 -1
- package/public/chunk-R5HVCC65.js +0 -1
- package/public/chunk-SQV4HVMS.js +0 -1
- package/public/chunk-UIW5IZLL.js +0 -1
- package/public/chunk-V7KKBEKT.js +0 -7
- package/public/chunk-V7N6TZL2.js +0 -1
- package/public/chunk-W7IALUEC.js +0 -1
- package/public/chunk-YJ3F3IFM.js +0 -1
- package/public/chunk-ZSRQVLRE.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{$ as
|
|
2
|
-
`).forEach(e=>{let n=e.indexOf(":");if(n>0){let s=e.slice(0,n),o=e.slice(n+1).trim();this.addHeaderEntry(s,o)}})}:typeof Headers<"u"&&t instanceof Headers?(this.headers=new Map,t.forEach((e,n)=>{this.addHeaderEntry(n,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([e,n])=>{this.setHeaderEntries(e,n)})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();let e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof r?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){let e=new r;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof r?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){let e=t.name.toLowerCase();switch(t.op){case"a":case"s":let n=t.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(t.name,e);let s=(t.op==="a"?this.headers.get(e):void 0)||[];s.push(...n),this.headers.set(e,s);break;case"d":let o=t.value;if(!o)this.headers.delete(e),this.normalizedNames.delete(e);else{let i=this.headers.get(e);if(!i)return;i=i.filter(c=>o.indexOf(c)===-1),i.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,i)}break}}addHeaderEntry(t,e){let n=t.toLowerCase();this.maybeSetNormalizedName(t,n),this.headers.has(n)?this.headers.get(n).push(e):this.headers.set(n,[e])}setHeaderEntries(t,e){let n=(Array.isArray(e)?e:[e]).map(o=>o.toString()),s=t.toLowerCase();this.headers.set(s,n),this.maybeSetNormalizedName(t,s)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}};var re=class{encodeKey(t){return dt(t)}encodeValue(t){return dt(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function xt(r,t){let e=new Map;return r.length>0&&r.replace(/^\?/,"").split("&").forEach(s=>{let o=s.indexOf("="),[i,c]=o==-1?[t.decodeKey(s),""]:[t.decodeKey(s.slice(0,o)),t.decodeValue(s.slice(o+1))],a=e.get(i)||[];a.push(c),e.set(i,a)}),e}var jt=/%(\d[a-f0-9])/gi,Ut={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function dt(r){return encodeURIComponent(r).replace(jt,(t,e)=>{var n;return(n=Ut[e])!=null?n:t})}function ne(r){return`${r}`}var D=class r{map;encoder;updates=null;cloneFrom=null;constructor(t={}){if(this.encoder=t.encoder||new re,t.fromString){if(t.fromObject)throw new p(2805,!1);this.map=xt(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{let n=t.fromObject[e],s=Array.isArray(n)?n.map(ne):[ne(n)];this.map.set(e,s)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();let e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}appendAll(t){let e=[];return Object.keys(t).forEach(n=>{let s=t[n];Array.isArray(s)?s.forEach(o=>{e.push({param:n,value:o,op:"a"})}):e.push({param:n,value:s,op:"a"})}),this.clone(e)}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{let e=this.encoder.encodeKey(t);return this.map.get(t).map(n=>e+"="+this.encoder.encodeValue(n)).join("&")}).filter(t=>t!=="").join("&")}clone(t){let e=new r({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":let e=(t.op==="a"?this.map.get(t.param):void 0)||[];e.push(ne(t.value)),this.map.set(t.param,e);break;case"d":if(t.value!==void 0){let n=this.map.get(t.param)||[],s=n.indexOf(ne(t.value));s!==-1&&n.splice(s,1),n.length>0?this.map.set(t.param,n):this.map.delete(t.param)}else{this.map.delete(t.param);break}}}),this.cloneFrom=this.updates=null)}};var se=class{map=new Map;set(t,e){return this.map.set(t,e),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}};function Ft(r){switch(r){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function ut(r){return typeof ArrayBuffer<"u"&&r instanceof ArrayBuffer}function ht(r){return typeof Blob<"u"&&r instanceof Blob}function ft(r){return typeof FormData<"u"&&r instanceof FormData}function Bt(r){return typeof URLSearchParams<"u"&&r instanceof URLSearchParams}var pt="Content-Type",mt="Accept",gt="X-Request-URL",Et="text/plain",vt="application/json",zt=`${vt}, ${Et}, */*`,x=class r{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;responseType="json";method;params;urlWithParams;transferCache;constructor(t,e,n,s){var i,c;this.url=e,this.method=t.toUpperCase();let o;if(Ft(this.method)||s?(this.body=n!==void 0?n:null,o=s):o=n,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),this.transferCache=o.transferCache),(i=this.headers)!=null||(this.headers=new S),(c=this.context)!=null||(this.context=new se),!this.params)this.params=new D,this.urlWithParams=e;else{let a=this.params.toString();if(a.length===0)this.urlWithParams=e;else{let d=e.indexOf("?"),h=d===-1?"?":d<e.length-1?"&":"";this.urlWithParams=e+h+a}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||ut(this.body)||ht(this.body)||ft(this.body)||Bt(this.body)?this.body:this.body instanceof D?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||ft(this.body)?null:ht(this.body)?this.body.type||null:ut(this.body)?null:typeof this.body=="string"?Et:this.body instanceof D?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?vt:null}clone(t={}){var T,M,b,l;let e=t.method||this.method,n=t.url||this.url,s=t.responseType||this.responseType,o=(T=t.transferCache)!=null?T:this.transferCache,i=t.body!==void 0?t.body:this.body,c=(M=t.withCredentials)!=null?M:this.withCredentials,a=(b=t.reportProgress)!=null?b:this.reportProgress,d=t.headers||this.headers,h=t.params||this.params,y=(l=t.context)!=null?l:this.context;return t.setHeaders!==void 0&&(d=Object.keys(t.setHeaders).reduce((f,w)=>f.set(w,t.setHeaders[w]),d)),t.setParams&&(h=Object.keys(t.setParams).reduce((f,w)=>f.set(w,t.setParams[w]),h)),new r(e,n,i,{params:h,headers:d,context:y,reportProgress:a,responseType:s,withCredentials:c,transferCache:o})}},P=function(r){return r[r.Sent=0]="Sent",r[r.UploadProgress=1]="UploadProgress",r[r.ResponseHeader=2]="ResponseHeader",r[r.DownloadProgress=3]="DownloadProgress",r[r.Response=4]="Response",r[r.User=5]="User",r}(P||{}),U=class{headers;status;statusText;url;ok;type;constructor(t,e=200,n="OK"){this.headers=t.headers||new S,this.status=t.status!==void 0?t.status:e,this.statusText=t.statusText||n,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}},oe=class r extends U{constructor(t={}){super(t)}type=P.ResponseHeader;clone(t={}){return new r({headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},$=class r extends U{body;constructor(t={}){super(t),this.body=t.body!==void 0?t.body:null}type=P.Response;clone(t={}){return new r({body:t.body!==void 0?t.body:this.body,headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},H=class extends U{name="HttpErrorResponse";message;error;ok=!1;constructor(t){super(t,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${t.url||"(unknown url)"}`:this.message=`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}},Vt=200,$t=204;function Re(r,t){return{body:t,headers:r.headers,context:r.context,observe:r.observe,params:r.params,reportProgress:r.reportProgress,responseType:r.responseType,withCredentials:r.withCredentials,transferCache:r.transferCache}}var Tt=(()=>{class r{handler;constructor(e){this.handler=e}request(e,n,s={}){let o;if(e instanceof x)o=e;else{let a;s.headers instanceof S?a=s.headers:a=new S(s.headers);let d;s.params&&(s.params instanceof D?d=s.params:d=new D({fromObject:s.params})),o=new x(e,n,s.body!==void 0?s.body:null,{headers:a,context:s.context,params:d,reportProgress:s.reportProgress,responseType:s.responseType||"json",withCredentials:s.withCredentials,transferCache:s.transferCache})}let i=fe(o).pipe(ze(a=>this.handler.handle(a)));if(e instanceof x||s.observe==="events")return i;let c=i.pipe(Be(a=>a instanceof $));switch(s.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return c.pipe(F(a=>{if(a.body!==null&&!(a.body instanceof ArrayBuffer))throw new p(2806,!1);return a.body}));case"blob":return c.pipe(F(a=>{if(a.body!==null&&!(a.body instanceof Blob))throw new p(2807,!1);return a.body}));case"text":return c.pipe(F(a=>{if(a.body!==null&&typeof a.body!="string")throw new p(2808,!1);return a.body}));case"json":default:return c.pipe(F(a=>a.body))}case"response":return c;default:throw new p(2809,!1)}}delete(e,n={}){return this.request("DELETE",e,n)}get(e,n={}){return this.request("GET",e,n)}head(e,n={}){return this.request("HEAD",e,n)}jsonp(e,n){return this.request("JSONP",e,{params:new D().append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,n={}){return this.request("OPTIONS",e,n)}patch(e,n,s={}){return this.request("PATCH",e,Re(s,n))}post(e,n,s={}){return this.request("POST",e,Re(s,n))}put(e,n,s={}){return this.request("PUT",e,Re(s,n))}static \u0275fac=function(n){return new(n||r)(u(j))};static \u0275prov=m({token:r,factory:r.\u0275fac})}return r})();var Ht=new g("");function wt(r,t){return t(r)}function Xt(r,t){return(e,n)=>t.intercept(e,{handle:s=>r(s,n)})}function Gt(r,t,e){return(n,s)=>Xe(e,()=>t(n,o=>r(o,s)))}var Rt=new g(""),_e=new g(""),bt=new g(""),De=new g("",{providedIn:"root",factory:()=>!0});function Jt(){let r=null;return(t,e)=>{var o;r===null&&(r=((o=R(Rt,{optional:!0}))!=null?o:[]).reduceRight(Xt,wt));let n=R(ye);if(R(De)){let i=n.add();return r(t,e).pipe(pe(()=>n.remove(i)))}else return r(t,e)}}var ie=(()=>{class r extends j{backend;injector;chain=null;pendingTasks=R(ye);contributeToStability=R(De);constructor(e,n){super(),this.backend=e,this.injector=n}handle(e){if(this.chain===null){let n=Array.from(new Set([...this.injector.get(_e),...this.injector.get(bt,[])]));this.chain=n.reduceRight((s,o)=>Gt(s,o,this.injector),wt)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(e,s=>this.backend.handle(s)).pipe(pe(()=>this.pendingTasks.remove(n)))}else return this.chain(e,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||r)(u(V),u(He))};static \u0275prov=m({token:r,factory:r.\u0275fac})}return r})();var qt=/^\)\]\}',?\n/,Yt=RegExp(`^${gt}:`,"m");function Zt(r){return"responseURL"in r&&r.responseURL?r.responseURL:Yt.test(r.getAllResponseHeaders())?r.getResponseHeader(gt):null}var be=(()=>{class r{xhrFactory;constructor(e){this.xhrFactory=e}handle(e){if(e.method==="JSONP")throw new p(-2800,!1);let n=this.xhrFactory;return(n.\u0275loadImpl?Fe(n.\u0275loadImpl()):fe(null)).pipe(Ve(()=>new Ue(o=>{let i=n.build();if(i.open(e.method,e.urlWithParams),e.withCredentials&&(i.withCredentials=!0),e.headers.forEach((l,f)=>i.setRequestHeader(l,f.join(","))),e.headers.has(mt)||i.setRequestHeader(mt,zt),!e.headers.has(pt)){let l=e.detectContentTypeHeader();l!==null&&i.setRequestHeader(pt,l)}if(e.responseType){let l=e.responseType.toLowerCase();i.responseType=l!=="json"?l:"text"}let c=e.serializeBody(),a=null,d=()=>{if(a!==null)return a;let l=i.statusText||"OK",f=new S(i.getAllResponseHeaders()),w=Zt(i)||e.url;return a=new oe({headers:f,status:i.status,statusText:l,url:w}),a},h=()=>{let{headers:l,status:f,statusText:w,url:xe}=d(),E=null;f!==$t&&(E=typeof i.response>"u"?i.responseText:i.response),f===0&&(f=E?Vt:0);let he=f>=200&&f<300;if(e.responseType==="json"&&typeof E=="string"){let kt=E;E=E.replace(qt,"");try{E=E!==""?JSON.parse(E):null}catch(Lt){E=kt,he&&(he=!1,E={error:Lt,text:E})}}he?(o.next(new $({body:E,headers:l,status:f,statusText:w,url:xe||void 0})),o.complete()):o.error(new H({error:E,headers:l,status:f,statusText:w,url:xe||void 0}))},y=l=>{let{url:f}=d(),w=new H({error:l,status:i.status||0,statusText:i.statusText||"Unknown Error",url:f||void 0});o.error(w)},T=!1,M=l=>{T||(o.next(d()),T=!0);let f={type:P.DownloadProgress,loaded:l.loaded};l.lengthComputable&&(f.total=l.total),e.responseType==="text"&&i.responseText&&(f.partialText=i.responseText),o.next(f)},b=l=>{let f={type:P.UploadProgress,loaded:l.loaded};l.lengthComputable&&(f.total=l.total),o.next(f)};return i.addEventListener("load",h),i.addEventListener("error",y),i.addEventListener("timeout",y),i.addEventListener("abort",y),e.reportProgress&&(i.addEventListener("progress",M),c!==null&&i.upload&&i.upload.addEventListener("progress",b)),i.send(c),o.next({type:P.Sent}),()=>{i.removeEventListener("error",y),i.removeEventListener("abort",y),i.removeEventListener("load",h),i.removeEventListener("timeout",y),e.reportProgress&&(i.removeEventListener("progress",M),c!==null&&i.upload&&i.upload.removeEventListener("progress",b)),i.readyState!==i.DONE&&i.abort()}})))}static \u0275fac=function(n){return new(n||r)(u(te))};static \u0275prov=m({token:r,factory:r.\u0275fac})}return r})(),Mt=new g(""),Wt="XSRF-TOKEN",Kt=new g("",{providedIn:"root",factory:()=>Wt}),Qt="X-XSRF-TOKEN",en=new g("",{providedIn:"root",factory:()=>Qt}),X=class{},tn=(()=>{class r{doc;platform;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(e,n,s){this.doc=e,this.platform=n,this.cookieName=s}getToken(){if(this.platform==="server")return null;let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=ee(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(n){return new(n||r)(u(v),u(O),u(Kt))};static \u0275prov=m({token:r,factory:r.\u0275fac})}return r})();function nn(r,t){let e=r.url.toLowerCase();if(!R(Mt)||r.method==="GET"||r.method==="HEAD"||e.startsWith("http://")||e.startsWith("https://"))return t(r);let n=R(X).getToken(),s=R(en);return n!=null&&!r.headers.has(s)&&(r=r.clone({headers:r.headers.set(s,n)})),t(r)}var Ae=function(r){return r[r.Interceptors=0]="Interceptors",r[r.LegacyInterceptors=1]="LegacyInterceptors",r[r.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",r[r.NoXsrfProtection=3]="NoXsrfProtection",r[r.JsonpSupport=4]="JsonpSupport",r[r.RequestsMadeViaParent=5]="RequestsMadeViaParent",r[r.Fetch=6]="Fetch",r}(Ae||{});function rn(r,t){return{\u0275kind:r,\u0275providers:t}}function sn(...r){let t=[Tt,be,ie,{provide:j,useExisting:ie},{provide:V,useFactory:()=>{var e;return(e=R(Ht,{optional:!0}))!=null?e:R(be)}},{provide:_e,useValue:nn,multi:!0},{provide:Mt,useValue:!0},{provide:X,useClass:tn}];for(let e of r)t.push(...e.\u0275providers);return me(t)}var yt=new g("");function on(){return rn(Ae.LegacyInterceptors,[{provide:yt,useFactory:Jt},{provide:_e,useExisting:yt,multi:!0}])}var le=new g(""),Pe=(()=>{class r{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,n){this._zone=n,e.forEach(s=>{s.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,n,s,o){return this._findPluginFor(n).addEventListener(e,n,s,o)}getZone(){return this._zone}_findPluginFor(e){let n=this._eventNameToPlugin.get(e);if(n)return n;if(n=this._plugins.find(o=>o.supports(e)),!n)throw new p(5101,!1);return this._eventNameToPlugin.set(e,n),n}static \u0275fac=function(n){return new(n||r)(u(le),u(A))};static \u0275prov=m({token:r,factory:r.\u0275fac})}return r})(),G=class{_doc;constructor(t){this._doc=t}manager},ae="ng-app-id";function _t(r){for(let t of r)t.remove()}function Dt(r,t){let e=t.createElement("style");return e.textContent=r,e}function an(r,t,e,n){var o;let s=(o=r.head)==null?void 0:o.querySelectorAll(`style[${ae}="${t}"],link[${ae}="${t}"]`);if(s)for(let i of s)i.removeAttribute(ae),i instanceof HTMLLinkElement?n.set(i.href.slice(i.href.lastIndexOf("/")+1),{usage:0,elements:[i]}):i.textContent&&e.set(i.textContent,{usage:0,elements:[i]})}function Oe(r,t){let e=t.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",r),e}var Ne=(()=>{class r{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(e,n,s,o={}){this.doc=e,this.appId=n,this.nonce=s,this.isServer=we(o),an(e,n,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,n){for(let s of e)this.addUsage(s,this.inline,Dt);n==null||n.forEach(s=>this.addUsage(s,this.external,Oe))}removeStyles(e,n){for(let s of e)this.removeUsage(s,this.inline);n==null||n.forEach(s=>this.removeUsage(s,this.external))}addUsage(e,n,s){let o=n.get(e);o?o.usage++:n.set(e,{usage:1,elements:[...this.hosts].map(i=>this.addElement(i,s(e,this.doc)))})}removeUsage(e,n){let s=n.get(e);s&&(s.usage--,s.usage<=0&&(_t(s.elements),n.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])_t(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[n,{elements:s}]of this.inline)s.push(this.addElement(e,Dt(n,this.doc)));for(let[n,{elements:s}]of this.external)s.push(this.addElement(e,Oe(n,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,n){return this.nonce&&n.setAttribute("nonce",this.nonce),this.isServer&&n.setAttribute(ae,this.appId),e.appendChild(n)}static \u0275fac=function(n){return new(n||r)(u(v),u(Ee),u(ve,8),u(O))};static \u0275prov=m({token:r,factory:r.\u0275fac})}return r})(),Se={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},Ce=/%COMP%/g;var St="%COMP%",cn=`_nghost-${St}`,ln=`_ngcontent-${St}`,dn=!0,un=new g("",{providedIn:"root",factory:()=>dn});function hn(r){return ln.replace(Ce,r)}function fn(r){return cn.replace(Ce,r)}function Ot(r,t){return t.map(e=>e.replace(Ce,r))}var ke=(()=>{class r{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(e,n,s,o,i,c,a,d=null,h=null){this.eventManager=e,this.sharedStylesHost=n,this.appId=s,this.removeStylesOnCompDestroy=o,this.doc=i,this.platformId=c,this.ngZone=a,this.nonce=d,this.tracingService=h,this.platformIsServer=we(c),this.defaultRenderer=new J(e,i,a,this.platformIsServer,this.tracingService)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;this.platformIsServer&&n.encapsulation===B.ShadowDom&&(n=je(N({},n),{encapsulation:B.Emulated}));let s=this.getOrCreateRenderer(e,n);return s instanceof ce?s.applyToHost(e):s instanceof q&&s.applyStyles(),s}getOrCreateRenderer(e,n){let s=this.rendererByCompId,o=s.get(n.id);if(!o){let i=this.doc,c=this.ngZone,a=this.eventManager,d=this.sharedStylesHost,h=this.removeStylesOnCompDestroy,y=this.platformIsServer,T=this.tracingService;switch(n.encapsulation){case B.Emulated:o=new ce(a,d,n,this.appId,h,i,c,y,T);break;case B.ShadowDom:return new Ie(a,d,e,n,i,c,this.nonce,y,T);default:o=new q(a,d,n,h,i,c,y,T);break}s.set(n.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(n){return new(n||r)(u(Pe),u(Ne),u(Ee),u(un),u(v),u(O),u(A),u(ve),u(qe,8))};static \u0275prov=m({token:r,factory:r.\u0275fac})}return r})(),J=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(t,e,n,s,o){this.eventManager=t,this.doc=e,this.ngZone=n,this.platformIsServer=s,this.tracingService=o}destroy(){}destroyNode=null;createElement(t,e){return e?this.doc.createElementNS(Se[e]||e,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,e){(At(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(At(t)?t.content:t).insertBefore(e,n)}removeChild(t,e){e.remove()}selectRootElement(t,e){let n=typeof t=="string"?this.doc.querySelector(t):t;if(!n)throw new p(-5104,!1);return e||(n.textContent=""),n}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,n,s){if(s){e=s+":"+e;let o=Se[s];o?t.setAttributeNS(o,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){let s=Se[n];s?t.removeAttributeNS(s,e):t.removeAttribute(`${n}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,n,s){s&(z.DashCase|z.Important)?t.style.setProperty(e,n,s&z.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&z.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,n){t!=null&&(t[e]=n)}setValue(t,e){t.nodeValue=e}listen(t,e,n,s){var i;if(typeof t=="string"&&(t=L().getGlobalEventTarget(this.doc,t),!t))throw new p(5102,!1);let o=this.decoratePreventDefault(n);return(i=this.tracingService)!=null&&i.wrapEventListener&&(o=this.tracingService.wrapEventListener(t,e,o)),this.eventManager.addEventListener(t,e,o,s)}decoratePreventDefault(t){return e=>{if(e==="__ngUnwrap__")return t;(this.platformIsServer?this.ngZone.runGuarded(()=>t(e)):t(e))===!1&&e.preventDefault()}}};function At(r){return r.tagName==="TEMPLATE"&&r.content!==void 0}var Ie=class extends J{sharedStylesHost;hostEl;shadowRoot;constructor(t,e,n,s,o,i,c,a,d){var M;super(t,o,i,a,d),this.sharedStylesHost=e,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let h=s.styles;h=Ot(s.id,h);for(let b of h){let l=document.createElement("style");c&&l.setAttribute("nonce",c),l.textContent=b,this.shadowRoot.appendChild(l)}let y=(M=s.getExternalStyles)==null?void 0:M.call(s);if(y)for(let b of y){let l=Oe(b,o);c&&l.setAttribute("nonce",c),this.shadowRoot.appendChild(l)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,n){return super.insertBefore(this.nodeOrShadowRoot(t),e,n)}removeChild(t,e){return super.removeChild(null,e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},q=class extends J{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(t,e,n,s,o,i,c,a,d){var T;super(t,o,i,c,a),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=s;let h=n.styles;this.styles=d?Ot(d,h):h,this.styleUrls=(T=n.getExternalStyles)==null?void 0:T.call(n,d)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},ce=class extends q{contentAttr;hostAttr;constructor(t,e,n,s,o,i,c,a,d){let h=s+"-"+n.id;super(t,e,n,o,i,c,a,d,h),this.contentAttr=hn(h),this.hostAttr=fn(h)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,e){let n=super.createElement(t,e);return super.setAttribute(n,this.contentAttr,""),n}};var Le=class extends at{supportsDOMEvents=!0},de=class r extends Le{static makeCurrent(){it(new r)}onAndCancel(t,e,n,s){return t.addEventListener(e,n,s),()=>{t.removeEventListener(e,n,s)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.remove()}createElement(t,e){return e=e||this.getDefaultDocument(),e.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return e==="window"?window:e==="document"?t:e==="body"?t.body:null}getBaseHref(t){let e=pn();return e==null?null:mn(e)}resetBaseElement(){Y=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return ee(document.cookie,t)}},Y=null;function pn(){return Y=Y||document.querySelector("base"),Y?Y.getAttribute("href"):null}function mn(r){return new URL(r,document.baseURI).pathname}var ue=class{addToWindow(t){_.getAngularTestability=(n,s=!0)=>{let o=t.findTestabilityInTree(n,s);if(o==null)throw new p(5103,!1);return o},_.getAllAngularTestabilities=()=>t.getAllTestabilities(),_.getAllAngularRootElements=()=>t.getAllRootElements();let e=n=>{let s=_.getAllAngularTestabilities(),o=s.length,i=function(){o--,o==0&&n()};s.forEach(c=>{c.whenStable(i)})};_.frameworkStabilizers||(_.frameworkStabilizers=[]),_.frameworkStabilizers.push(e)}findTestabilityInTree(t,e,n){if(e==null)return null;let s=t.getTestability(e);return s!=null?s:n?L().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null}},yn=(()=>{class r{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||r)};static \u0275prov=m({token:r,factory:r.\u0275fac})}return r})(),Pt=(()=>{class r extends G{constructor(e){super(e)}supports(e){return!0}addEventListener(e,n,s,o){return e.addEventListener(n,s,o),()=>this.removeEventListener(e,n,s,o)}removeEventListener(e,n,s,o){return e.removeEventListener(n,s,o)}static \u0275fac=function(n){return new(n||r)(u(v))};static \u0275prov=m({token:r,factory:r.\u0275fac})}return r})(),It=["alt","control","meta","shift"],gn={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},En={alt:r=>r.altKey,control:r=>r.ctrlKey,meta:r=>r.metaKey,shift:r=>r.shiftKey},Nt=(()=>{class r extends G{constructor(e){super(e)}supports(e){return r.parseEventName(e)!=null}addEventListener(e,n,s,o){let i=r.parseEventName(n),c=r.eventCallback(i.fullKey,s,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>L().onAndCancel(e,i.domEventName,c,o))}static parseEventName(e){let n=e.toLowerCase().split("."),s=n.shift();if(n.length===0||!(s==="keydown"||s==="keyup"))return null;let o=r._normalizeKey(n.pop()),i="",c=n.indexOf("code");if(c>-1&&(n.splice(c,1),i="code."),It.forEach(d=>{let h=n.indexOf(d);h>-1&&(n.splice(h,1),i+=d+".")}),i+=o,n.length!=0||o.length===0)return null;let a={};return a.domEventName=s,a.fullKey=i,a}static matchEventFullKeyCode(e,n){let s=gn[e.key]||e.key,o="";return n.indexOf("code.")>-1&&(s=e.code,o="code."),s==null||!s?!1:(s=s.toLowerCase(),s===" "?s="space":s==="."&&(s="dot"),It.forEach(i=>{if(i!==s){let c=En[i];c(e)&&(o+=i+".")}}),o+=s,o===n)}static eventCallback(e,n,s){return o=>{r.matchEventFullKeyCode(o,e)&&s.runGuarded(()=>n(o))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(n){return new(n||r)(u(v))};static \u0275prov=m({token:r,factory:r.\u0275fac})}return r})();function vn(r,t){return ot(N({rootComponent:r},Tn(t)))}function Tn(r){var t;return{appProviders:[...Ct,...(t=r==null?void 0:r.providers)!=null?t:[]],platformProviders:Mn}}function wn(){de.makeCurrent()}function Rn(){return new ge}function bn(){return Ge(document),document}var Mn=[{provide:O,useValue:lt},{provide:Je,useValue:wn,multi:!0},{provide:v,useFactory:bn}];var _n=[{provide:K,useClass:ue},{provide:rt,useClass:Q,deps:[A,Te,K]},{provide:Q,useClass:Q,deps:[A,Te,K]}],Ct=[{provide:$e,useValue:"root"},{provide:ge,useFactory:Rn},{provide:le,useClass:Pt,multi:!0,deps:[v]},{provide:le,useClass:Nt,multi:!0,deps:[v]},ke,Ne,Pe,{provide:nt,useExisting:ke},{provide:te,useClass:yn},[]],Dn=(()=>{class r{constructor(){}static \u0275fac=function(n){return new(n||r)};static \u0275mod=W({type:r});static \u0275inj=Z({providers:[...Ct,..._n],imports:[ct,st]})}return r})();var qr=(()=>{class r{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(n){return new(n||r)(u(v))};static \u0275prov=m({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var Sn=(()=>{class r{static \u0275fac=function(n){return new(n||r)};static \u0275prov=m({token:r,factory:function(n){let s=null;return n?s=new(n||r):s=u(On),s},providedIn:"root"})}return r})(),On=(()=>{class r extends Sn{_doc;constructor(e){super(),this._doc=e}sanitize(e,n){if(n==null)return null;switch(e){case I.NONE:return n;case I.HTML:return k(n,"HTML")?C(n):tt(this._doc,String(n)).toString();case I.STYLE:return k(n,"Style")?C(n):n;case I.SCRIPT:if(k(n,"Script"))return C(n);throw new p(5200,!1);case I.URL:return k(n,"URL")?C(n):et(String(n));case I.RESOURCE_URL:if(k(n,"ResourceURL"))return C(n);throw new p(5201,!1);default:throw new p(5202,!1)}}bypassSecurityTrustHtml(e){return Ye(e)}bypassSecurityTrustStyle(e){return Ze(e)}bypassSecurityTrustScript(e){return We(e)}bypassSecurityTrustUrl(e){return Ke(e)}bypassSecurityTrustResourceUrl(e){return Qe(e)}static \u0275fac=function(n){return new(n||r)(u(v))};static \u0275prov=m({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{V as a,D as b,P as c,$ as d,Tt as e,Rt as f,sn as g,on as h,ke as i,vn as j,Dn as k,qr as l,Sn as m};
|
|
1
|
+
import{$ as ze,$a as Qe,Ba as ye,Bb as nt,Cb as K,Da as S,Db as Q,Ea as ge,Eb as Te,H as Fe,Hc as rt,Ic as st,Ja as Xe,Ka as Ee,L as Be,La as Ge,Ma as O,Oa as ve,Oc as v,Pa as Je,Pc as L,Qc as ot,Rc as it,S as pe,Ta as B,Ua as C,Va as k,Wa as Ye,Xa as qe,Ya as Ze,Za as We,_a as Ke,a as N,ab as et,b as xe,bb as I,da as p,ea as _,ga as m,gd as at,ha as Z,hb as z,hd as ee,id as ct,ja as g,k as je,kb as tt,kd as we,la as u,ld as te,ma as R,na as me,pa as Ve,q as Ue,qa as He,r as fe,ra as $e,ub as W,x as F}from"./chunk-6JZDPQRU.js";var j=class{},V=class{},A=class r{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(t){t?typeof t=="string"?this.lazyInit=()=>{this.headers=new Map,t.split(`
|
|
2
|
+
`).forEach(e=>{let n=e.indexOf(":");if(n>0){let s=e.slice(0,n),o=e.slice(n+1).trim();this.addHeaderEntry(s,o)}})}:typeof Headers<"u"&&t instanceof Headers?(this.headers=new Map,t.forEach((e,n)=>{this.addHeaderEntry(n,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([e,n])=>{this.setHeaderEntries(e,n)})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();let e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof r?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){let e=new r;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof r?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){let e=t.name.toLowerCase();switch(t.op){case"a":case"s":let n=t.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(t.name,e);let s=(t.op==="a"?this.headers.get(e):void 0)||[];s.push(...n),this.headers.set(e,s);break;case"d":let o=t.value;if(!o)this.headers.delete(e),this.normalizedNames.delete(e);else{let i=this.headers.get(e);if(!i)return;i=i.filter(c=>o.indexOf(c)===-1),i.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,i)}break}}addHeaderEntry(t,e){let n=t.toLowerCase();this.maybeSetNormalizedName(t,n),this.headers.has(n)?this.headers.get(n).push(e):this.headers.set(n,[e])}setHeaderEntries(t,e){let n=(Array.isArray(e)?e:[e]).map(o=>o.toString()),s=t.toLowerCase();this.headers.set(s,n),this.maybeSetNormalizedName(t,s)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}};var re=class{encodeKey(t){return lt(t)}encodeValue(t){return lt(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function Lt(r,t){let e=new Map;return r.length>0&&r.replace(/^\?/,"").split("&").forEach(s=>{let o=s.indexOf("="),[i,c]=o==-1?[t.decodeKey(s),""]:[t.decodeKey(s.slice(0,o)),t.decodeValue(s.slice(o+1))],a=e.get(i)||[];a.push(c),e.set(i,a)}),e}var xt=/%(\d[a-f0-9])/gi,jt={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function lt(r){return encodeURIComponent(r).replace(xt,(t,e)=>{var n;return(n=jt[e])!=null?n:t})}function ne(r){return`${r}`}var D=class r{map;encoder;updates=null;cloneFrom=null;constructor(t={}){if(this.encoder=t.encoder||new re,t.fromString){if(t.fromObject)throw new p(2805,!1);this.map=Lt(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{let n=t.fromObject[e],s=Array.isArray(n)?n.map(ne):[ne(n)];this.map.set(e,s)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();let e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}appendAll(t){let e=[];return Object.keys(t).forEach(n=>{let s=t[n];Array.isArray(s)?s.forEach(o=>{e.push({param:n,value:o,op:"a"})}):e.push({param:n,value:s,op:"a"})}),this.clone(e)}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{let e=this.encoder.encodeKey(t);return this.map.get(t).map(n=>e+"="+this.encoder.encodeValue(n)).join("&")}).filter(t=>t!=="").join("&")}clone(t){let e=new r({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":let e=(t.op==="a"?this.map.get(t.param):void 0)||[];e.push(ne(t.value)),this.map.set(t.param,e);break;case"d":if(t.value!==void 0){let n=this.map.get(t.param)||[],s=n.indexOf(ne(t.value));s!==-1&&n.splice(s,1),n.length>0?this.map.set(t.param,n):this.map.delete(t.param)}else{this.map.delete(t.param);break}}}),this.cloneFrom=this.updates=null)}};var se=class{map=new Map;set(t,e){return this.map.set(t,e),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}};function Ut(r){switch(r){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function dt(r){return typeof ArrayBuffer<"u"&&r instanceof ArrayBuffer}function ut(r){return typeof Blob<"u"&&r instanceof Blob}function ht(r){return typeof FormData<"u"&&r instanceof FormData}function Ft(r){return typeof URLSearchParams<"u"&&r instanceof URLSearchParams}var ft="Content-Type",pt="Accept",yt="X-Request-URL",gt="text/plain",Et="application/json",Bt=`${Et}, ${gt}, */*`,x=class r{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;responseType="json";method;params;urlWithParams;transferCache;constructor(t,e,n,s){var i,c;this.url=e,this.method=t.toUpperCase();let o;if(Ut(this.method)||s?(this.body=n!==void 0?n:null,o=s):o=n,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),this.transferCache=o.transferCache),(i=this.headers)!=null||(this.headers=new A),(c=this.context)!=null||(this.context=new se),!this.params)this.params=new D,this.urlWithParams=e;else{let a=this.params.toString();if(a.length===0)this.urlWithParams=e;else{let d=e.indexOf("?"),h=d===-1?"?":d<e.length-1?"&":"";this.urlWithParams=e+h+a}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||dt(this.body)||ut(this.body)||ht(this.body)||Ft(this.body)?this.body:this.body instanceof D?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||ht(this.body)?null:ut(this.body)?this.body.type||null:dt(this.body)?null:typeof this.body=="string"?gt:this.body instanceof D?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?Et:null}clone(t={}){var T,b,M,l;let e=t.method||this.method,n=t.url||this.url,s=t.responseType||this.responseType,o=(T=t.transferCache)!=null?T:this.transferCache,i=t.body!==void 0?t.body:this.body,c=(b=t.withCredentials)!=null?b:this.withCredentials,a=(M=t.reportProgress)!=null?M:this.reportProgress,d=t.headers||this.headers,h=t.params||this.params,y=(l=t.context)!=null?l:this.context;return t.setHeaders!==void 0&&(d=Object.keys(t.setHeaders).reduce((f,w)=>f.set(w,t.setHeaders[w]),d)),t.setParams&&(h=Object.keys(t.setParams).reduce((f,w)=>f.set(w,t.setParams[w]),h)),new r(e,n,i,{params:h,headers:d,context:y,reportProgress:a,responseType:s,withCredentials:c,transferCache:o})}},P=function(r){return r[r.Sent=0]="Sent",r[r.UploadProgress=1]="UploadProgress",r[r.ResponseHeader=2]="ResponseHeader",r[r.DownloadProgress=3]="DownloadProgress",r[r.Response=4]="Response",r[r.User=5]="User",r}(P||{}),U=class{headers;status;statusText;url;ok;type;constructor(t,e=200,n="OK"){this.headers=t.headers||new A,this.status=t.status!==void 0?t.status:e,this.statusText=t.statusText||n,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}},oe=class r extends U{constructor(t={}){super(t)}type=P.ResponseHeader;clone(t={}){return new r({headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},H=class r extends U{body;constructor(t={}){super(t),this.body=t.body!==void 0?t.body:null}type=P.Response;clone(t={}){return new r({body:t.body!==void 0?t.body:this.body,headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},$=class extends U{name="HttpErrorResponse";message;error;ok=!1;constructor(t){super(t,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${t.url||"(unknown url)"}`:this.message=`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}},zt=200,Vt=204;function Re(r,t){return{body:t,headers:r.headers,context:r.context,observe:r.observe,params:r.params,reportProgress:r.reportProgress,responseType:r.responseType,withCredentials:r.withCredentials,transferCache:r.transferCache}}var vt=(()=>{class r{handler;constructor(e){this.handler=e}request(e,n,s={}){let o;if(e instanceof x)o=e;else{let a;s.headers instanceof A?a=s.headers:a=new A(s.headers);let d;s.params&&(s.params instanceof D?d=s.params:d=new D({fromObject:s.params})),o=new x(e,n,s.body!==void 0?s.body:null,{headers:a,context:s.context,params:d,reportProgress:s.reportProgress,responseType:s.responseType||"json",withCredentials:s.withCredentials,transferCache:s.transferCache})}let i=fe(o).pipe(Be(a=>this.handler.handle(a)));if(e instanceof x||s.observe==="events")return i;let c=i.pipe(Fe(a=>a instanceof H));switch(s.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return c.pipe(F(a=>{if(a.body!==null&&!(a.body instanceof ArrayBuffer))throw new p(2806,!1);return a.body}));case"blob":return c.pipe(F(a=>{if(a.body!==null&&!(a.body instanceof Blob))throw new p(2807,!1);return a.body}));case"text":return c.pipe(F(a=>{if(a.body!==null&&typeof a.body!="string")throw new p(2808,!1);return a.body}));case"json":default:return c.pipe(F(a=>a.body))}case"response":return c;default:throw new p(2809,!1)}}delete(e,n={}){return this.request("DELETE",e,n)}get(e,n={}){return this.request("GET",e,n)}head(e,n={}){return this.request("HEAD",e,n)}jsonp(e,n){return this.request("JSONP",e,{params:new D().append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,n={}){return this.request("OPTIONS",e,n)}patch(e,n,s={}){return this.request("PATCH",e,Re(s,n))}post(e,n,s={}){return this.request("POST",e,Re(s,n))}put(e,n,s={}){return this.request("PUT",e,Re(s,n))}static \u0275fac=function(n){return new(n||r)(u(j))};static \u0275prov=m({token:r,factory:r.\u0275fac})}return r})();var Ht=new g("");function Tt(r,t){return t(r)}function $t(r,t){return(e,n)=>t.intercept(e,{handle:s=>r(s,n)})}function Xt(r,t,e){return(n,s)=>$e(e,()=>t(n,o=>r(o,s)))}var wt=new g(""),_e=new g(""),Rt=new g(""),De=new g("",{providedIn:"root",factory:()=>!0});function Gt(){let r=null;return(t,e)=>{var o;r===null&&(r=((o=R(wt,{optional:!0}))!=null?o:[]).reduceRight($t,Tt));let n=R(ye);if(R(De)){let i=n.add();return r(t,e).pipe(pe(()=>n.remove(i)))}else return r(t,e)}}var ie=(()=>{class r extends j{backend;injector;chain=null;pendingTasks=R(ye);contributeToStability=R(De);constructor(e,n){super(),this.backend=e,this.injector=n}handle(e){if(this.chain===null){let n=Array.from(new Set([...this.injector.get(_e),...this.injector.get(Rt,[])]));this.chain=n.reduceRight((s,o)=>Xt(s,o,this.injector),Tt)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(e,s=>this.backend.handle(s)).pipe(pe(()=>this.pendingTasks.remove(n)))}else return this.chain(e,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||r)(u(V),u(He))};static \u0275prov=m({token:r,factory:r.\u0275fac})}return r})();var Jt=/^\)\]\}',?\n/,Yt=RegExp(`^${yt}:`,"m");function qt(r){return"responseURL"in r&&r.responseURL?r.responseURL:Yt.test(r.getAllResponseHeaders())?r.getResponseHeader(yt):null}var Me=(()=>{class r{xhrFactory;constructor(e){this.xhrFactory=e}handle(e){if(e.method==="JSONP")throw new p(-2800,!1);let n=this.xhrFactory;return(n.\u0275loadImpl?Ue(n.\u0275loadImpl()):fe(null)).pipe(ze(()=>new je(o=>{let i=n.build();if(i.open(e.method,e.urlWithParams),e.withCredentials&&(i.withCredentials=!0),e.headers.forEach((l,f)=>i.setRequestHeader(l,f.join(","))),e.headers.has(pt)||i.setRequestHeader(pt,Bt),!e.headers.has(ft)){let l=e.detectContentTypeHeader();l!==null&&i.setRequestHeader(ft,l)}if(e.responseType){let l=e.responseType.toLowerCase();i.responseType=l!=="json"?l:"text"}let c=e.serializeBody(),a=null,d=()=>{if(a!==null)return a;let l=i.statusText||"OK",f=new A(i.getAllResponseHeaders()),w=qt(i)||e.url;return a=new oe({headers:f,status:i.status,statusText:l,url:w}),a},h=()=>{let{headers:l,status:f,statusText:w,url:Le}=d(),E=null;f!==Vt&&(E=typeof i.response>"u"?i.responseText:i.response),f===0&&(f=E?zt:0);let he=f>=200&&f<300;if(e.responseType==="json"&&typeof E=="string"){let Ct=E;E=E.replace(Jt,"");try{E=E!==""?JSON.parse(E):null}catch(kt){E=Ct,he&&(he=!1,E={error:kt,text:E})}}he?(o.next(new H({body:E,headers:l,status:f,statusText:w,url:Le||void 0})),o.complete()):o.error(new $({error:E,headers:l,status:f,statusText:w,url:Le||void 0}))},y=l=>{let{url:f}=d(),w=new $({error:l,status:i.status||0,statusText:i.statusText||"Unknown Error",url:f||void 0});o.error(w)},T=!1,b=l=>{T||(o.next(d()),T=!0);let f={type:P.DownloadProgress,loaded:l.loaded};l.lengthComputable&&(f.total=l.total),e.responseType==="text"&&i.responseText&&(f.partialText=i.responseText),o.next(f)},M=l=>{let f={type:P.UploadProgress,loaded:l.loaded};l.lengthComputable&&(f.total=l.total),o.next(f)};return i.addEventListener("load",h),i.addEventListener("error",y),i.addEventListener("timeout",y),i.addEventListener("abort",y),e.reportProgress&&(i.addEventListener("progress",b),c!==null&&i.upload&&i.upload.addEventListener("progress",M)),i.send(c),o.next({type:P.Sent}),()=>{i.removeEventListener("error",y),i.removeEventListener("abort",y),i.removeEventListener("load",h),i.removeEventListener("timeout",y),e.reportProgress&&(i.removeEventListener("progress",b),c!==null&&i.upload&&i.upload.removeEventListener("progress",M)),i.readyState!==i.DONE&&i.abort()}})))}static \u0275fac=function(n){return new(n||r)(u(te))};static \u0275prov=m({token:r,factory:r.\u0275fac})}return r})(),Mt=new g(""),Zt="XSRF-TOKEN",Wt=new g("",{providedIn:"root",factory:()=>Zt}),Kt="X-XSRF-TOKEN",Qt=new g("",{providedIn:"root",factory:()=>Kt}),X=class{},en=(()=>{class r{doc;platform;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(e,n,s){this.doc=e,this.platform=n,this.cookieName=s}getToken(){if(this.platform==="server")return null;let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=ee(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(n){return new(n||r)(u(v),u(O),u(Wt))};static \u0275prov=m({token:r,factory:r.\u0275fac})}return r})();function tn(r,t){let e=r.url.toLowerCase();if(!R(Mt)||r.method==="GET"||r.method==="HEAD"||e.startsWith("http://")||e.startsWith("https://"))return t(r);let n=R(X).getToken(),s=R(Qt);return n!=null&&!r.headers.has(s)&&(r=r.clone({headers:r.headers.set(s,n)})),t(r)}var Se=function(r){return r[r.Interceptors=0]="Interceptors",r[r.LegacyInterceptors=1]="LegacyInterceptors",r[r.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",r[r.NoXsrfProtection=3]="NoXsrfProtection",r[r.JsonpSupport=4]="JsonpSupport",r[r.RequestsMadeViaParent=5]="RequestsMadeViaParent",r[r.Fetch=6]="Fetch",r}(Se||{});function nn(r,t){return{\u0275kind:r,\u0275providers:t}}function rn(...r){let t=[vt,Me,ie,{provide:j,useExisting:ie},{provide:V,useFactory:()=>{var e;return(e=R(Ht,{optional:!0}))!=null?e:R(Me)}},{provide:_e,useValue:tn,multi:!0},{provide:Mt,useValue:!0},{provide:X,useClass:en}];for(let e of r)t.push(...e.\u0275providers);return me(t)}var mt=new g("");function sn(){return nn(Se.LegacyInterceptors,[{provide:mt,useFactory:Gt},{provide:_e,useExisting:mt,multi:!0}])}var le=new g(""),Pe=(()=>{class r{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,n){this._zone=n,e.forEach(s=>{s.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,n,s,o){return this._findPluginFor(n).addEventListener(e,n,s,o)}getZone(){return this._zone}_findPluginFor(e){let n=this._eventNameToPlugin.get(e);if(n)return n;if(n=this._plugins.find(o=>o.supports(e)),!n)throw new p(5101,!1);return this._eventNameToPlugin.set(e,n),n}static \u0275fac=function(n){return new(n||r)(u(le),u(S))};static \u0275prov=m({token:r,factory:r.\u0275fac})}return r})(),G=class{_doc;constructor(t){this._doc=t}manager},ae="ng-app-id";function bt(r){for(let t of r)t.remove()}function _t(r,t){let e=t.createElement("style");return e.textContent=r,e}function on(r,t,e,n){var o;let s=(o=r.head)==null?void 0:o.querySelectorAll(`style[${ae}="${t}"],link[${ae}="${t}"]`);if(s)for(let i of s)i.removeAttribute(ae),i instanceof HTMLLinkElement?n.set(i.href.slice(i.href.lastIndexOf("/")+1),{usage:0,elements:[i]}):i.textContent&&e.set(i.textContent,{usage:0,elements:[i]})}function Oe(r,t){let e=t.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",r),e}var Ne=(()=>{class r{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(e,n,s,o={}){this.doc=e,this.appId=n,this.nonce=s,this.isServer=we(o),on(e,n,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,n){for(let s of e)this.addUsage(s,this.inline,_t);n==null||n.forEach(s=>this.addUsage(s,this.external,Oe))}removeStyles(e,n){for(let s of e)this.removeUsage(s,this.inline);n==null||n.forEach(s=>this.removeUsage(s,this.external))}addUsage(e,n,s){let o=n.get(e);o?o.usage++:n.set(e,{usage:1,elements:[...this.hosts].map(i=>this.addElement(i,s(e,this.doc)))})}removeUsage(e,n){let s=n.get(e);s&&(s.usage--,s.usage<=0&&(bt(s.elements),n.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])bt(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[n,{elements:s}]of this.inline)s.push(this.addElement(e,_t(n,this.doc)));for(let[n,{elements:s}]of this.external)s.push(this.addElement(e,Oe(n,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,n){return this.nonce&&n.setAttribute("nonce",this.nonce),this.isServer&&n.setAttribute(ae,this.appId),e.appendChild(n)}static \u0275fac=function(n){return new(n||r)(u(v),u(Ee),u(ve,8),u(O))};static \u0275prov=m({token:r,factory:r.\u0275fac})}return r})(),Ae={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},Ce=/%COMP%/g;var St="%COMP%",an=`_nghost-${St}`,cn=`_ngcontent-${St}`,ln=!0,dn=new g("",{providedIn:"root",factory:()=>ln});function un(r){return cn.replace(Ce,r)}function hn(r){return an.replace(Ce,r)}function At(r,t){return t.map(e=>e.replace(Ce,r))}var ke=(()=>{class r{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(e,n,s,o,i,c,a,d=null,h=null){this.eventManager=e,this.sharedStylesHost=n,this.appId=s,this.removeStylesOnCompDestroy=o,this.doc=i,this.platformId=c,this.ngZone=a,this.nonce=d,this.tracingService=h,this.platformIsServer=we(c),this.defaultRenderer=new J(e,i,a,this.platformIsServer,this.tracingService)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;this.platformIsServer&&n.encapsulation===B.ShadowDom&&(n=xe(N({},n),{encapsulation:B.Emulated}));let s=this.getOrCreateRenderer(e,n);return s instanceof ce?s.applyToHost(e):s instanceof Y&&s.applyStyles(),s}getOrCreateRenderer(e,n){let s=this.rendererByCompId,o=s.get(n.id);if(!o){let i=this.doc,c=this.ngZone,a=this.eventManager,d=this.sharedStylesHost,h=this.removeStylesOnCompDestroy,y=this.platformIsServer,T=this.tracingService;switch(n.encapsulation){case B.Emulated:o=new ce(a,d,n,this.appId,h,i,c,y,T);break;case B.ShadowDom:return new Ie(a,d,e,n,i,c,this.nonce,y,T);default:o=new Y(a,d,n,h,i,c,y,T);break}s.set(n.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(n){return new(n||r)(u(Pe),u(Ne),u(Ee),u(dn),u(v),u(O),u(S),u(ve),u(Je,8))};static \u0275prov=m({token:r,factory:r.\u0275fac})}return r})(),J=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(t,e,n,s,o){this.eventManager=t,this.doc=e,this.ngZone=n,this.platformIsServer=s,this.tracingService=o}destroy(){}destroyNode=null;createElement(t,e){return e?this.doc.createElementNS(Ae[e]||e,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,e){(Dt(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(Dt(t)?t.content:t).insertBefore(e,n)}removeChild(t,e){e.remove()}selectRootElement(t,e){let n=typeof t=="string"?this.doc.querySelector(t):t;if(!n)throw new p(-5104,!1);return e||(n.textContent=""),n}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,n,s){if(s){e=s+":"+e;let o=Ae[s];o?t.setAttributeNS(o,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){let s=Ae[n];s?t.removeAttributeNS(s,e):t.removeAttribute(`${n}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,n,s){s&(z.DashCase|z.Important)?t.style.setProperty(e,n,s&z.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&z.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,n){t!=null&&(t[e]=n)}setValue(t,e){t.nodeValue=e}listen(t,e,n,s){var i;if(typeof t=="string"&&(t=L().getGlobalEventTarget(this.doc,t),!t))throw new p(5102,!1);let o=this.decoratePreventDefault(n);return(i=this.tracingService)!=null&&i.wrapEventListener&&(o=this.tracingService.wrapEventListener(t,e,o)),this.eventManager.addEventListener(t,e,o,s)}decoratePreventDefault(t){return e=>{if(e==="__ngUnwrap__")return t;(this.platformIsServer?this.ngZone.runGuarded(()=>t(e)):t(e))===!1&&e.preventDefault()}}};function Dt(r){return r.tagName==="TEMPLATE"&&r.content!==void 0}var Ie=class extends J{sharedStylesHost;hostEl;shadowRoot;constructor(t,e,n,s,o,i,c,a,d){var b;super(t,o,i,a,d),this.sharedStylesHost=e,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let h=s.styles;h=At(s.id,h);for(let M of h){let l=document.createElement("style");c&&l.setAttribute("nonce",c),l.textContent=M,this.shadowRoot.appendChild(l)}let y=(b=s.getExternalStyles)==null?void 0:b.call(s);if(y)for(let M of y){let l=Oe(M,o);c&&l.setAttribute("nonce",c),this.shadowRoot.appendChild(l)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,n){return super.insertBefore(this.nodeOrShadowRoot(t),e,n)}removeChild(t,e){return super.removeChild(null,e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},Y=class extends J{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(t,e,n,s,o,i,c,a,d){var T;super(t,o,i,c,a),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=s;let h=n.styles;this.styles=d?At(d,h):h,this.styleUrls=(T=n.getExternalStyles)==null?void 0:T.call(n,d)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},ce=class extends Y{contentAttr;hostAttr;constructor(t,e,n,s,o,i,c,a,d){let h=s+"-"+n.id;super(t,e,n,o,i,c,a,d,h),this.contentAttr=un(h),this.hostAttr=hn(h)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,e){let n=super.createElement(t,e);return super.setAttribute(n,this.contentAttr,""),n}};var de=class r extends it{supportsDOMEvents=!0;static makeCurrent(){ot(new r)}onAndCancel(t,e,n,s){return t.addEventListener(e,n,s),()=>{t.removeEventListener(e,n,s)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.remove()}createElement(t,e){return e=e||this.getDefaultDocument(),e.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return e==="window"?window:e==="document"?t:e==="body"?t.body:null}getBaseHref(t){let e=fn();return e==null?null:pn(e)}resetBaseElement(){q=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return ee(document.cookie,t)}},q=null;function fn(){return q=q||document.querySelector("base"),q?q.getAttribute("href"):null}function pn(r){return new URL(r,document.baseURI).pathname}var ue=class{addToWindow(t){_.getAngularTestability=(n,s=!0)=>{let o=t.findTestabilityInTree(n,s);if(o==null)throw new p(5103,!1);return o},_.getAllAngularTestabilities=()=>t.getAllTestabilities(),_.getAllAngularRootElements=()=>t.getAllRootElements();let e=n=>{let s=_.getAllAngularTestabilities(),o=s.length,i=function(){o--,o==0&&n()};s.forEach(c=>{c.whenStable(i)})};_.frameworkStabilizers||(_.frameworkStabilizers=[]),_.frameworkStabilizers.push(e)}findTestabilityInTree(t,e,n){if(e==null)return null;let s=t.getTestability(e);return s!=null?s:n?L().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null}},mn=(()=>{class r{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||r)};static \u0275prov=m({token:r,factory:r.\u0275fac})}return r})(),It=(()=>{class r extends G{constructor(e){super(e)}supports(e){return!0}addEventListener(e,n,s,o){return e.addEventListener(n,s,o),()=>this.removeEventListener(e,n,s,o)}removeEventListener(e,n,s,o){return e.removeEventListener(n,s,o)}static \u0275fac=function(n){return new(n||r)(u(v))};static \u0275prov=m({token:r,factory:r.\u0275fac})}return r})(),Ot=["alt","control","meta","shift"],yn={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},gn={alt:r=>r.altKey,control:r=>r.ctrlKey,meta:r=>r.metaKey,shift:r=>r.shiftKey},Pt=(()=>{class r extends G{constructor(e){super(e)}supports(e){return r.parseEventName(e)!=null}addEventListener(e,n,s,o){let i=r.parseEventName(n),c=r.eventCallback(i.fullKey,s,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>L().onAndCancel(e,i.domEventName,c,o))}static parseEventName(e){let n=e.toLowerCase().split("."),s=n.shift();if(n.length===0||!(s==="keydown"||s==="keyup"))return null;let o=r._normalizeKey(n.pop()),i="",c=n.indexOf("code");if(c>-1&&(n.splice(c,1),i="code."),Ot.forEach(d=>{let h=n.indexOf(d);h>-1&&(n.splice(h,1),i+=d+".")}),i+=o,n.length!=0||o.length===0)return null;let a={};return a.domEventName=s,a.fullKey=i,a}static matchEventFullKeyCode(e,n){let s=yn[e.key]||e.key,o="";return n.indexOf("code.")>-1&&(s=e.code,o="code."),s==null||!s?!1:(s=s.toLowerCase(),s===" "?s="space":s==="."&&(s="dot"),Ot.forEach(i=>{if(i!==s){let c=gn[i];c(e)&&(o+=i+".")}}),o+=s,o===n)}static eventCallback(e,n,s){return o=>{r.matchEventFullKeyCode(o,e)&&s.runGuarded(()=>n(o))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(n){return new(n||r)(u(v))};static \u0275prov=m({token:r,factory:r.\u0275fac})}return r})();function En(r,t){return st(N({rootComponent:r},vn(t)))}function vn(r){var t;return{appProviders:[...Nt,...(t=r==null?void 0:r.providers)!=null?t:[]],platformProviders:Mn}}function Tn(){de.makeCurrent()}function wn(){return new ge}function Rn(){return Xe(document),document}var Mn=[{provide:O,useValue:ct},{provide:Ge,useValue:Tn,multi:!0},{provide:v,useFactory:Rn}];var bn=[{provide:K,useClass:ue},{provide:nt,useClass:Q,deps:[S,Te,K]},{provide:Q,useClass:Q,deps:[S,Te,K]}],Nt=[{provide:Ve,useValue:"root"},{provide:ge,useFactory:wn},{provide:le,useClass:It,multi:!0,deps:[v]},{provide:le,useClass:Pt,multi:!0,deps:[v]},ke,Ne,Pe,{provide:tt,useExisting:ke},{provide:te,useClass:mn},[]],_n=(()=>{class r{constructor(){}static \u0275fac=function(n){return new(n||r)};static \u0275mod=W({type:r});static \u0275inj=Z({providers:[...Nt,...bn],imports:[at,rt]})}return r})();var Jr=(()=>{class r{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(n){return new(n||r)(u(v))};static \u0275prov=m({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var Sn=(()=>{class r{static \u0275fac=function(n){return new(n||r)};static \u0275prov=m({token:r,factory:function(n){let s=null;return n?s=new(n||r):s=u(An),s},providedIn:"root"})}return r})(),An=(()=>{class r extends Sn{_doc;constructor(e){super(),this._doc=e}sanitize(e,n){if(n==null)return null;switch(e){case I.NONE:return n;case I.HTML:return k(n,"HTML")?C(n):et(this._doc,String(n)).toString();case I.STYLE:return k(n,"Style")?C(n):n;case I.SCRIPT:if(k(n,"Script"))return C(n);throw new p(5200,!1);case I.URL:return k(n,"URL")?C(n):Qe(String(n));case I.RESOURCE_URL:if(k(n,"ResourceURL"))return C(n);throw new p(5201,!1);default:throw new p(5202,!1)}}bypassSecurityTrustHtml(e){return Ye(e)}bypassSecurityTrustStyle(e){return qe(e)}bypassSecurityTrustScript(e){return Ze(e)}bypassSecurityTrustUrl(e){return We(e)}bypassSecurityTrustResourceUrl(e){return Ke(e)}static \u0275fac=function(n){return new(n||r)(u(v))};static \u0275prov=m({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{V as a,D as b,P as c,H as d,vt as e,wt as f,rn as g,sn as h,ke as i,En as j,_n as k,Jr as l,Sn as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as X}from"./chunk-GHPAEKNM.js";import{n as j}from"./chunk-MS2EQS6S.js";import{c as B,d as w,e as P,f as V,g as O,j as F,m as R,p as W,q as N,y as D,z as G}from"./chunk-XCZREHWX.js";import{e as L}from"./chunk-5CDZD4QO.js";import{c as Q}from"./chunk-5NJQH2A3.js";import{b as J}from"./chunk-MJUBX7V2.js";import{h as q,j as T,k as K}from"./chunk-NCJAIFQO.js";import{l as M}from"./chunk-KD5YLOUW.js";import{a as H,b as A}from"./chunk-P5BH5BCJ.js";import{Ac as s,Bc as l,Kb as _,Pb as f,Ub as n,Vb as o,Wb as d,Zc as I,_b as S,bc as b,cc as m,gb as i,h as v,ma as g,mc as p,nc as c,oc as C,tb as E,ua as h,va as x,w as y,wc as $,xc as k,zb as z}from"./chunk-V7KKBEKT.js";var U=(t,u)=>({"is-valid":t,"is-invalid":u}),Z=t=>({"button-loading":t});function ee(t,u){if(t&1){let e=S();n(0,"div",2),d(1,"img",3),n(2,"h3",4),p(3),s(4,"translate"),o(),n(5,"button",5),b("click",function(){h(e);let a=m();return x(a.onClickGettingStarted())}),p(6),s(7,"translate"),o(),n(8,"small",6)(9,"a",7),b("click",function(){h(e);let a=m();return x(a.onClickRestoreBackup())}),p(10),s(11,"translate"),o()()()}t&2&&(i(3),c(l(4,3,"setup.welcome_to_homebridge")),i(3),C(" ",l(7,5,"setup.button_get_started")," "),i(4),c(l(11,7,"setup_wizard_message_restore")))}function te(t,u){if(t&1){let e=S();n(0,"div",2),d(1,"img",8),n(2,"h3",4),p(3),s(4,"translate"),o(),n(5,"div",9)(6,"p"),p(7),s(8,"translate"),o(),n(9,"form",10),b("ngSubmit",function(){h(e);let a=m();return x(a.createFirstUser())}),n(10,"div",11)(11,"span",12),d(12,"i",13),o(),d(13,"input",14),s(14,"translate"),o(),n(15,"div",11)(16,"span",12),d(17,"i",15),o(),d(18,"input",16),s(19,"translate"),o(),n(20,"div",17)(21,"span",12),d(22,"i",15),o(),d(23,"input",18),s(24,"translate"),o(),n(25,"div",19)(26,"button",20),p(27),s(28,"translate"),d(29,"i",21),o()()()()()}if(t&2){let e=m();i(3),c(l(4,15,"setup.create_account")),i(4),c(l(8,17,"setup.create_account_reason")),i(2),_("formGroup",e.createUserForm),i(4),_("placeholder",l(14,19,"users.label_username"))("readonly",e.loading)("ngClass",k(27,U,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.valid,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.invalid)),i(5),_("placeholder",l(19,21,"users.label_password"))("readonly",e.loading)("ngClass",k(30,U,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.valid,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.errors)),i(5),_("placeholder",l(24,23,"users.label_confirm_password"))("readonly",e.loading)("ngClass",k(33,U,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.valid,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.errors)),i(3),_("disabled",e.createUserForm.invalid||e.loading)("ngClass",$(36,Z,e.loading)),i(),C(" ",l(28,25,"setup.create_account")," ")}}function ie(t,u){t&1&&(n(0,"span"),d(1,"i",26),p(2),s(3,"translate"),o()),t&2&&(i(2),C(" ",l(3,1,"backup.label_uploading")," "))}function ne(t,u){t&1&&(p(0),s(1,"translate")),t&2&&C(" ",l(1,1,"backup.button_restore_backup")," ")}function oe(t,u){if(t&1){let e=S();n(0,"div",2),d(1,"img",8),n(2,"h3",4),p(3),s(4,"translate"),o(),n(5,"p"),p(6),s(7,"translate"),o(),n(8,"input",22),b("change",function(a){h(e);let Y=m();return x(Y.handleRestoreFileInput(a.target.files))}),o(),n(9,"div",23)(10,"button",24),b("click",function(){h(e);let a=m();return x(a.onClickCancelRestore())}),p(11),s(12,"translate"),o(),n(13,"button",25),b("click",function(){h(e);let a=m();return x(a.onRestoreBackupClick())}),z(14,ie,4,3,"span")(15,ne,2,3),o()()()}if(t&2){let e=m();i(3),c(l(4,7,"form.button_restore")),i(3),c(l(7,9,"backup.restore_help_one")),i(4),_("disabled",e.restoreUploading),i(),C(" ",l(12,11,"form.button_cancel")," "),i(2),_("disabled",e.restoreUploading||!e.selectedFile),i(),f(e.restoreUploading?14:-1),i(),f(e.restoreUploading?-1:15)}}function re(t,u){t&1&&(n(0,"div",2),d(1,"img",8),n(2,"h3",4),p(3),s(4,"translate"),o(),n(5,"h1"),d(6,"i",26),o()()),t&2&&(i(3),c(l(4,1,"restart.title_restart")))}function ae(t,u){t&1&&(n(0,"div",2),d(1,"img",8),n(2,"h3",27),p(3),s(4,"translate"),o(),n(5,"p",28),p(6),s(7,"translate"),o(),n(8,"a",29),p(9),s(10,"translate"),o()()),t&2&&(i(3),c(l(4,3,"setup_wizard_message_complete_title")),i(3),c(l(7,5,"setup_wizard_message_complete_message")),i(3),c(l(10,7,"setup.open_dashboard")))}var Se=(()=>{class t{$api=g(K);$auth=g(Q);$modal=g(j);$settings=g(J);$title=g(M);$toastr=g(q);$translate=g(H);previousTitle;step="welcome";createUserForm=new O({username:new F("",[w.required]),password:new F("",[w.compose([w.required,w.minLength(4)])]),passwordConfirm:new F("",[w.required])},this.matchPassword);loading=!1;selectedFile;restoreUploading=!1;constructor(){}ngOnInit(){this.previousTitle=this.$title.getTitle(),this.$title.setTitle("Setup Homebridge")}matchPassword(e){let r=e.get("password").value,a=e.get("passwordConfirm").value;if(r!==a)e.get("passwordConfirm").setErrors({matchPassword:!0});else return null}ngOnDestroy(){this.$title.setTitle(this.previousTitle)}onClickGettingStarted(){this.step="create-account"}onClickRestoreBackup(){this.step="restore-backup"}onClickCancelRestore(){this.selectedFile=null,this.step="welcome"}createFirstUser(){this.loading=!0;let e=this.createUserForm.getRawValue();e.name=e.username,this.$api.post("/setup-wizard/create-first-user",e).subscribe({next:()=>v(this,null,function*(){this.$settings.env.setupWizardComplete=!0,yield this.$auth.login({username:e.username,password:e.password}),this.step="setup-complete"}),error:r=>{this.loading=!1,console.error(r),this.$toastr.error(r.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}handleRestoreFileInput(e){e.length?this.selectedFile=e[0]:delete this.selectedFile}onRestoreBackupClick(){this.restoreUploading=!0,this.uploadHomebridgeArchive()}uploadHomebridgeArchive(){return v(this,null,function*(){try{let e=yield y(this.$api.get("/setup-wizard/get-setup-wizard-token"));window.localStorage.setItem(T.jwt.tokenKey,e.access_token),this.$auth.token=e.access_token;let r=new FormData;r.append("restoreArchive",this.selectedFile,this.selectedFile.name),yield y(this.$api.post("/backup/restore",r)),this.openRestoreModal(),this.restoreUploading=!1}catch(e){this.restoreUploading=!1,console.error(e),this.$toastr.error(e.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}openRestoreModal(){let e=this.$modal.open(X,{size:"lg",backdrop:"static"});e.componentInstance.setupWizardRestore=!0,e.result.then(r=>{r===!0&&this.waitForHomebridgeToRestart()})}waitForHomebridgeToRestart(){return v(this,null,function*(){this.step="restarting",window.localStorage.removeItem(T.jwt.tokenKey),this.$auth.token=null,yield new Promise(r=>setTimeout(r,15e3));let e=setInterval(()=>v(this,null,function*(){try{yield y(this.$api.get("/auth/settings")),clearInterval(e),location.reload()}catch{}}),1e3)})}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=E({type:t,selectors:[["ng-component"]],decls:7,vars:5,consts:[[1,"setup-container","d-flex","align-items-center","justify-content-center"],[1,"w-100","setup-card","d-flex","py-5"],[1,"w-100","d-flex","flex-column","align-items-center"],["src","/assets/homebridge-color-round.svg","alt","hb logo",1,"homebridge-logo","mx-auto"],[1,"pt-4","pb-3","text-center"],["type","button",1,"btn","btn-lg","btn-primary",3,"click"],[1,"mt-3"],["href","javascript:void(0)",1,"grey-text",3,"click"],["src","/assets/homebridge-color-round.svg","alt","hb logo",1,"homebridge-logo","homebridge-logo-small","mx-auto"],[1,"w-100"],["novalidate","",3,"ngSubmit","formGroup"],[1,"md-form","input-group","mb-3"],[1,"input-group-text","custom-input"],[1,"fas","fa-fw","fa-user","prefix","grey-text"],["formControlName","username","type","text","id","form-username","autocomplete","username","autocapitalize","none","tabindex","1",1,"form-control","py-2",3,"placeholder","readonly","ngClass"],[1,"fas","fa-fw","fa-lock","prefix","grey-text"],["formControlName","password","type","password","id","form-pass","autocomplete","new-password","tabindex","2",1,"form-control","py-2",3,"placeholder","readonly","ngClass"],[1,"md-form","input-group","mb-4"],["formControlName","passwordConfirm","type","password","id","form-pass-confirm","autocomplete","new-password","tabindex","2",1,"form-control","py-2",3,"placeholder","readonly","ngClass"],[1,"w-100","text-center"],["type","submit",1,"btn","btn-primary",3,"disabled","ngClass"],[1,"button-loading-overlay","fas","fa-fw","fa-spinner","fa-pulse"],["type","file","id","restoreFileUpload","accept","application/gzip, .gz",1,"form-control",3,"change"],[1,"mt-3","w-100","d-flex","justify-content-between"],["type","button",1,"btn","btn-elegant","ms-0",3,"click","disabled"],["type","button",1,"btn","btn-primary","me-0",3,"click","disabled"],[1,"fas","fa-fw","fa-spinner","fa-pulse"],[1,"pt-4","pb-3"],[1,"text-center"],["routerLink","/",1,"btn","btn-lg","btn-primary","mt-3"]],template:function(r,a){r&1&&(n(0,"div",0)(1,"div",1),z(2,ee,12,9,"div",2)(3,te,30,38,"div",2)(4,oe,16,13,"div",2)(5,re,7,3,"div",2)(6,ae,11,9,"div",2),o()()),r&2&&(i(2),f(a.step==="welcome"?2:-1),i(),f(a.step==="create-account"?3:-1),i(),f(a.step==="restore-backup"?4:-1),i(),f(a.step==="restarting"?5:-1),i(),f(a.step==="setup-complete"?6:-1))},dependencies:[D,R,B,P,V,G,W,N,I,L,A],styles:[".setup-container[_ngcontent-%COMP%]{background-size:cover;z-index:-1;padding-top:1em;padding-bottom:1em}@media screen and (min-height: 500px) and (min-width: 600px){.setup-container[_ngcontent-%COMP%]{padding-top:4em}}.setup-card[_ngcontent-%COMP%]{max-width:600px;border-radius:15px;background-color:#fff;padding-right:25px;padding-left:25px}.setup-card[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{background-color:inherit!important}@media screen and (max-width: 600px){.setup-card[_ngcontent-%COMP%]{margin-left:1em;margin-right:1em}} body.dark-mode .setup-card{background-color:#2b2b2b;color:#fff}.homebridge-logo[_ngcontent-%COMP%]{margin-right:10px;height:200px}@media screen and (max-height: 500px){.homebridge-logo[_ngcontent-%COMP%]{height:100px}}@media screen and (max-width: 600px){.homebridge-logo[_ngcontent-%COMP%]{height:100px}}.homebridge-logo-small[_ngcontent-%COMP%]{height:50px}.button-loading[_ngcontent-%COMP%]{position:relative;color:#0000}.button-loading[_ngcontent-%COMP%] .button-loading-overlay[_ngcontent-%COMP%]{display:block;color:#fff}.button-loading-overlay[_ngcontent-%COMP%]{display:none;position:absolute;top:9px;left:0;right:0}small[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})}return t})();export{Se as a};
|
|
1
|
+
import{b as X}from"./chunk-QAB7LTBA.js";import{n as j}from"./chunk-U3XAGOD7.js";import{c as B,d as w,e as P,f as V,g as O,j as F,m as R,p as W,q as N,y as D,z as G}from"./chunk-DVN556RD.js";import{e as L}from"./chunk-2IW5LNPB.js";import{c as Q}from"./chunk-UXBIRDFV.js";import{b as J}from"./chunk-SHPANMJF.js";import{h as q,j as T,k as K}from"./chunk-4M72X5OK.js";import{l as M}from"./chunk-G75CPMPQ.js";import{a as H,b as A}from"./chunk-QIWZD5HO.js";import{Ac as s,Bc as l,Kb as _,Pb as f,Ub as n,Vb as o,Wb as d,Zc as I,_b as S,bc as b,cc as m,gb as i,h as v,ma as g,mc as p,nc as c,oc as C,tb as E,ua as h,va as x,w as y,wc as $,xc as k,zb as z}from"./chunk-6JZDPQRU.js";var U=(t,u)=>({"is-valid":t,"is-invalid":u}),Z=t=>({"button-loading":t});function ee(t,u){if(t&1){let e=S();n(0,"div",2),d(1,"img",3),n(2,"h3",4),p(3),s(4,"translate"),o(),n(5,"button",5),b("click",function(){h(e);let a=m();return x(a.onClickGettingStarted())}),p(6),s(7,"translate"),o(),n(8,"small",6)(9,"a",7),b("click",function(){h(e);let a=m();return x(a.onClickRestoreBackup())}),p(10),s(11,"translate"),o()()()}t&2&&(i(3),c(l(4,3,"setup.welcome_to_homebridge")),i(3),C(" ",l(7,5,"setup.button_get_started")," "),i(4),c(l(11,7,"setup_wizard_message_restore")))}function te(t,u){if(t&1){let e=S();n(0,"div",2),d(1,"img",8),n(2,"h3",4),p(3),s(4,"translate"),o(),n(5,"div",9)(6,"p"),p(7),s(8,"translate"),o(),n(9,"form",10),b("ngSubmit",function(){h(e);let a=m();return x(a.createFirstUser())}),n(10,"div",11)(11,"span",12),d(12,"i",13),o(),d(13,"input",14),s(14,"translate"),o(),n(15,"div",11)(16,"span",12),d(17,"i",15),o(),d(18,"input",16),s(19,"translate"),o(),n(20,"div",17)(21,"span",12),d(22,"i",15),o(),d(23,"input",18),s(24,"translate"),o(),n(25,"div",19)(26,"button",20),p(27),s(28,"translate"),d(29,"i",21),o()()()()()}if(t&2){let e=m();i(3),c(l(4,15,"setup.create_account")),i(4),c(l(8,17,"setup.create_account_reason")),i(2),_("formGroup",e.createUserForm),i(4),_("placeholder",l(14,19,"users.label_username"))("readonly",e.loading)("ngClass",k(27,U,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.valid,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.invalid)),i(5),_("placeholder",l(19,21,"users.label_password"))("readonly",e.loading)("ngClass",k(30,U,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.valid,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.errors)),i(5),_("placeholder",l(24,23,"users.label_confirm_password"))("readonly",e.loading)("ngClass",k(33,U,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.valid,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.errors)),i(3),_("disabled",e.createUserForm.invalid||e.loading)("ngClass",$(36,Z,e.loading)),i(),C(" ",l(28,25,"setup.create_account")," ")}}function ie(t,u){t&1&&(n(0,"span"),d(1,"i",26),p(2),s(3,"translate"),o()),t&2&&(i(2),C(" ",l(3,1,"backup.label_uploading")," "))}function ne(t,u){t&1&&(p(0),s(1,"translate")),t&2&&C(" ",l(1,1,"backup.button_restore_backup")," ")}function oe(t,u){if(t&1){let e=S();n(0,"div",2),d(1,"img",8),n(2,"h3",4),p(3),s(4,"translate"),o(),n(5,"p"),p(6),s(7,"translate"),o(),n(8,"input",22),b("change",function(a){h(e);let Y=m();return x(Y.handleRestoreFileInput(a.target.files))}),o(),n(9,"div",23)(10,"button",24),b("click",function(){h(e);let a=m();return x(a.onClickCancelRestore())}),p(11),s(12,"translate"),o(),n(13,"button",25),b("click",function(){h(e);let a=m();return x(a.onRestoreBackupClick())}),z(14,ie,4,3,"span")(15,ne,2,3),o()()()}if(t&2){let e=m();i(3),c(l(4,7,"form.button_restore")),i(3),c(l(7,9,"backup.restore_help_one")),i(4),_("disabled",e.restoreUploading),i(),C(" ",l(12,11,"form.button_cancel")," "),i(2),_("disabled",e.restoreUploading||!e.selectedFile),i(),f(e.restoreUploading?14:-1),i(),f(e.restoreUploading?-1:15)}}function re(t,u){t&1&&(n(0,"div",2),d(1,"img",8),n(2,"h3",4),p(3),s(4,"translate"),o(),n(5,"h1"),d(6,"i",26),o()()),t&2&&(i(3),c(l(4,1,"restart.title_restart")))}function ae(t,u){t&1&&(n(0,"div",2),d(1,"img",8),n(2,"h3",27),p(3),s(4,"translate"),o(),n(5,"p",28),p(6),s(7,"translate"),o(),n(8,"a",29),p(9),s(10,"translate"),o()()),t&2&&(i(3),c(l(4,3,"setup_wizard_message_complete_title")),i(3),c(l(7,5,"setup_wizard_message_complete_message")),i(3),c(l(10,7,"setup.open_dashboard")))}var Se=(()=>{class t{$api=g(K);$auth=g(Q);$modal=g(j);$settings=g(J);$title=g(M);$toastr=g(q);$translate=g(H);previousTitle;step="welcome";createUserForm=new O({username:new F("",[w.required]),password:new F("",[w.compose([w.required,w.minLength(4)])]),passwordConfirm:new F("",[w.required])},this.matchPassword);loading=!1;selectedFile;restoreUploading=!1;constructor(){}ngOnInit(){this.previousTitle=this.$title.getTitle(),this.$title.setTitle("Setup Homebridge")}matchPassword(e){let r=e.get("password").value,a=e.get("passwordConfirm").value;if(r!==a)e.get("passwordConfirm").setErrors({matchPassword:!0});else return null}ngOnDestroy(){this.$title.setTitle(this.previousTitle)}onClickGettingStarted(){this.step="create-account"}onClickRestoreBackup(){this.step="restore-backup"}onClickCancelRestore(){this.selectedFile=null,this.step="welcome"}createFirstUser(){this.loading=!0;let e=this.createUserForm.getRawValue();e.name=e.username,this.$api.post("/setup-wizard/create-first-user",e).subscribe({next:()=>v(this,null,function*(){this.$settings.env.setupWizardComplete=!0,yield this.$auth.login({username:e.username,password:e.password}),this.step="setup-complete"}),error:r=>{this.loading=!1,console.error(r),this.$toastr.error(r.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}handleRestoreFileInput(e){e.length?this.selectedFile=e[0]:delete this.selectedFile}onRestoreBackupClick(){this.restoreUploading=!0,this.uploadHomebridgeArchive()}uploadHomebridgeArchive(){return v(this,null,function*(){try{let e=yield y(this.$api.get("/setup-wizard/get-setup-wizard-token"));window.localStorage.setItem(T.jwt.tokenKey,e.access_token),this.$auth.token=e.access_token;let r=new FormData;r.append("restoreArchive",this.selectedFile,this.selectedFile.name),yield y(this.$api.post("/backup/restore",r)),this.openRestoreModal(),this.restoreUploading=!1}catch(e){this.restoreUploading=!1,console.error(e),this.$toastr.error(e.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}openRestoreModal(){let e=this.$modal.open(X,{size:"lg",backdrop:"static"});e.componentInstance.setupWizardRestore=!0,e.result.then(r=>{r===!0&&this.waitForHomebridgeToRestart()})}waitForHomebridgeToRestart(){return v(this,null,function*(){this.step="restarting",window.localStorage.removeItem(T.jwt.tokenKey),this.$auth.token=null,yield new Promise(r=>setTimeout(r,15e3));let e=setInterval(()=>v(this,null,function*(){try{yield y(this.$api.get("/auth/settings")),clearInterval(e),location.reload()}catch{}}),1e3)})}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=E({type:t,selectors:[["ng-component"]],decls:7,vars:5,consts:[[1,"setup-container","d-flex","align-items-center","justify-content-center"],[1,"w-100","setup-card","d-flex","py-5"],[1,"w-100","d-flex","flex-column","align-items-center"],["src","/assets/homebridge-color-round.svg","alt","hb logo",1,"homebridge-logo","mx-auto"],[1,"pt-4","pb-3","text-center"],["type","button",1,"btn","btn-lg","btn-primary",3,"click"],[1,"mt-3"],["href","javascript:void(0)",1,"grey-text",3,"click"],["src","/assets/homebridge-color-round.svg","alt","hb logo",1,"homebridge-logo","homebridge-logo-small","mx-auto"],[1,"w-100"],["novalidate","",3,"ngSubmit","formGroup"],[1,"md-form","input-group","mb-3"],[1,"input-group-text","custom-input"],[1,"fas","fa-fw","fa-user","prefix","grey-text"],["formControlName","username","type","text","id","form-username","autocomplete","username","autocapitalize","none","tabindex","1",1,"form-control","py-2",3,"placeholder","readonly","ngClass"],[1,"fas","fa-fw","fa-lock","prefix","grey-text"],["formControlName","password","type","password","id","form-pass","autocomplete","new-password","tabindex","2",1,"form-control","py-2",3,"placeholder","readonly","ngClass"],[1,"md-form","input-group","mb-4"],["formControlName","passwordConfirm","type","password","id","form-pass-confirm","autocomplete","new-password","tabindex","2",1,"form-control","py-2",3,"placeholder","readonly","ngClass"],[1,"w-100","text-center"],["type","submit",1,"btn","btn-primary",3,"disabled","ngClass"],[1,"button-loading-overlay","fas","fa-fw","fa-spinner","fa-pulse"],["type","file","id","restoreFileUpload","accept","application/gzip, .gz",1,"form-control",3,"change"],[1,"mt-3","w-100","d-flex","justify-content-between"],["type","button",1,"btn","btn-elegant","ms-0",3,"click","disabled"],["type","button",1,"btn","btn-primary","me-0",3,"click","disabled"],[1,"fas","fa-fw","fa-spinner","fa-pulse"],[1,"pt-4","pb-3"],[1,"text-center"],["routerLink","/",1,"btn","btn-lg","btn-primary","mt-3"]],template:function(r,a){r&1&&(n(0,"div",0)(1,"div",1),z(2,ee,12,9,"div",2)(3,te,30,38,"div",2)(4,oe,16,13,"div",2)(5,re,7,3,"div",2)(6,ae,11,9,"div",2),o()()),r&2&&(i(2),f(a.step==="welcome"?2:-1),i(),f(a.step==="create-account"?3:-1),i(),f(a.step==="restore-backup"?4:-1),i(),f(a.step==="restarting"?5:-1),i(),f(a.step==="setup-complete"?6:-1))},dependencies:[D,R,B,P,V,G,W,N,I,L,A],styles:[".setup-container[_ngcontent-%COMP%]{background-size:cover;z-index:-1;padding-top:1em;padding-bottom:1em}@media screen and (min-height: 500px) and (min-width: 600px){.setup-container[_ngcontent-%COMP%]{padding-top:4em}}.setup-card[_ngcontent-%COMP%]{max-width:600px;border-radius:15px;background-color:#fff;padding-right:25px;padding-left:25px}.setup-card[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{background-color:inherit!important}@media screen and (max-width: 600px){.setup-card[_ngcontent-%COMP%]{margin-left:1em;margin-right:1em}} body.dark-mode .setup-card{background-color:#2b2b2b;color:#fff}.homebridge-logo[_ngcontent-%COMP%]{margin-right:10px;height:200px}@media screen and (max-height: 500px){.homebridge-logo[_ngcontent-%COMP%]{height:100px}}@media screen and (max-width: 600px){.homebridge-logo[_ngcontent-%COMP%]{height:100px}}.homebridge-logo-small[_ngcontent-%COMP%]{height:50px}.button-loading[_ngcontent-%COMP%]{position:relative;color:#0000}.button-loading[_ngcontent-%COMP%] .button-loading-overlay[_ngcontent-%COMP%]{display:block;color:#fff}.button-loading-overlay[_ngcontent-%COMP%]{display:none;position:absolute;top:9px;left:0;right:0}small[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})}return t})();export{Se as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as a}from"./chunk-E3OYPTR2.js";import"./chunk-3BELKOOV.js";import"./chunk-YVLNDNOU.js";import"./chunk-Y7QARRGO.js";import"./chunk-736OOU3Z.js";import"./chunk-A6S2CSNA.js";import"./chunk-REYVZJK4.js";import"./chunk-TH7WF563.js";import"./chunk-Y5BDWQTD.js";import"./chunk-BBVFH2MI.js";import"./chunk-D3QNROQA.js";import"./chunk-TOSAT7VK.js";import"./chunk-2COJW6JZ.js";import"./chunk-ZEGJJ2QZ.js";import"./chunk-SZTIHT5G.js";import"./chunk-L4SPVWCZ.js";import"./chunk-YCHPFYO5.js";import"./chunk-B2ERIJJG.js";import"./chunk-IQBKWEOJ.js";import"./chunk-U3XAGOD7.js";import"./chunk-DVN556RD.js";import"./chunk-QX4JJLN4.js";import"./chunk-2IW5LNPB.js";import"./chunk-UXBIRDFV.js";import"./chunk-SHPANMJF.js";import"./chunk-4M72X5OK.js";import"./chunk-G75CPMPQ.js";import"./chunk-QIWZD5HO.js";import"./chunk-6JZDPQRU.js";export{a as StatusComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as g}from"./chunk-
|
|
1
|
+
import{m as g}from"./chunk-U3XAGOD7.js";import{b as k}from"./chunk-QIWZD5HO.js";import{Ac as r,Bc as c,Jb as p,Kb as B,Ob as f,Pb as I,Ub as i,Vb as o,Wb as l,bc as s,cb as v,cc as M,gb as t,ma as C,mc as m,nc as y,oc as u,tb as _,zb as x}from"./chunk-6JZDPQRU.js";function T(n,L){if(n&1&&l(0,"i",13),n&2){let d=M();f("fas fa-fw ",d.faIconClass," mb-3")}}var H=(()=>{class n{$activeModal=C(g);title;message;confirmButtonLabel;confirmButtonClass;faIconClass;constructor(){}static \u0275fac=function(a){return new(a||n)};static \u0275cmp=_({type:n,selectors:[["ng-component"]],inputs:{title:"title",message:"message",confirmButtonLabel:"confirmButtonLabel",confirmButtonClass:"confirmButtonClass",faIconClass:"faIconClass"},decls:19,vars:16,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center"],[2,"font-size","75px",3,"class"],[1,"mb-0","text-center",3,"innerHTML"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",3,"click"],[2,"font-size","75px"]],template:function(a,e){a&1&&(i(0,"div",0)(1,"div",1)(2,"h5",2),m(3),o(),i(4,"button",3),r(5,"translate"),s("click",function(){return e.$activeModal.dismiss("Dismiss")}),o()(),i(6,"div",4),x(7,T,1,3,"i",5),l(8,"p",6),o(),i(9,"div",7)(10,"div",8)(11,"button",9),r(12,"translate"),s("click",function(){return e.$activeModal.dismiss("Dismiss")}),m(13),r(14,"translate"),o()(),l(15,"div",10),i(16,"div",11)(17,"button",12),s("click",function(){return e.$activeModal.close()}),m(18),o()()()()),a&2&&(t(3),y(e.title),t(),p("aria-label",c(5,10,"form.button_close")),t(3),I(e.faIconClass?7:-1),t(),B("innerHTML",e.message,v),t(3),p("aria-label",c(12,12,"form.button_close")),t(2),u(" ",c(14,14,"form.button_close")," "),t(4),f("btn ",e.confirmButtonClass||"btn-primary",""),t(),u(" ",e.confirmButtonLabel," "))},dependencies:[k],encapsulation:2})}return n})();export{H as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-AXQ3BC2K.js";import"./chunk-QX4JJLN4.js";import"./chunk-2IW5LNPB.js";import"./chunk-UXBIRDFV.js";import"./chunk-SHPANMJF.js";import"./chunk-4M72X5OK.js";import"./chunk-G75CPMPQ.js";import"./chunk-QIWZD5HO.js";import"./chunk-6JZDPQRU.js";export{a as RestartComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as X}from"./chunk-TWFE7WAV.js";import{a as H}from"./chunk-UXXGHFQU.js";import{a as Z}from"./chunk-GZMSZZVX.js";import{a as R}from"./chunk-PVRKV6LM.js";import{n as L}from"./chunk-MS2EQS6S.js";import"./chunk-XCZREHWX.js";import{a as j}from"./chunk-X2NTV4U7.js";import{a as W,c as q,d as V,e as N,f as D}from"./chunk-5CDZD4QO.js";import{c as B}from"./chunk-5NJQH2A3.js";import{b as $}from"./chunk-MJUBX7V2.js";import{j as T}from"./chunk-NCJAIFQO.js";import"./chunk-KD5YLOUW.js";import{a as M,b as U}from"./chunk-P5BH5BCJ.js";import{Ac as d,Bc as l,Jb as u,Kb as c,Pb as C,Ub as n,Vb as a,Wb as p,Zc as E,_b as y,bc as _,cc as w,g as Y,gb as o,h as z,lb as F,ma as m,mc as f,nc as g,od as K,tb as P,ua as h,va as b,vc as v,w as A,wc as k,zb as O}from"./chunk-V7KKBEKT.js";var Q=Y(Z(),1);function G(){var i;return typeof window<"u"&&((window==null?void 0:window.matchMedia("(display-mode: standalone)").matches)||((i=window.navigator)===null||i===void 0?void 0:i.standalone)||document.referrer.startsWith("android-app://")||(window==null?void 0:window.Windows)||/trident.+(msapphost|webview)\//i.test(navigator.userAgent)||document.referrer.startsWith("app-info://platform/microsoft-store"))}var I=()=>["/"],te=i=>({"hamburger-icon-cross":i}),ne=i=>({expanded:i}),ie=()=>({exact:!0}),oe=()=>["/accessories"],re=()=>["/support"],ae=()=>["/power-options"],se=()=>["/plugins"],de=()=>["/logs"],le=()=>["/platform-tools/terminal"],pe=()=>["/config"],ce=()=>["/settings"];function me(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",19),d(2,"translate"),d(3,"translate"),_("click",function(){h(e);let t=w();return b(t.openUnderVoltageModal())})("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(4,"div",12),p(5,"i",20),a(),n(6,"div",14),f(7),d(8,"translate"),a()()()}i&2&&(o(),u("aria-label",l(2,2,"rpi.throttled.undervoltage_title")+" - "+l(3,4,"rpi.throttled.undervoltage_description")),o(6),g(l(8,6,"rpi.throttled.undervoltage_title")))}function ue(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",21),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,se))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.label_plugins")),o(5),g(l(7,6,"menu.label_plugins")))}function _e(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",22),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,de))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.linux.label_logs")),o(5),g(l(7,6,"menu.linux.label_logs")))}function fe(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",23),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,le))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.linux.label_terminal")),o(5),g(l(7,6,"menu.linux.label_terminal")))}function ge(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",24),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,pe))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.config_json_editor")),o(5),g(l(7,6,"menu.config_json_editor")))}function ve(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",25),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,ce))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.label_settings")),o(5),g(l(7,6,"menu.label_settings")))}function he(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",19),d(2,"translate"),_("click",function(){h(e);let t=w();return b(t.reloadPage())})("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",26),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),u("aria-label",l(2,2,"menu.reload")),o(5),g(l(7,4,"menu.reload")))}function be(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",19),d(2,"translate"),_("click",function(){h(e);let t=w();return b(t.$auth.logout())})("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",27),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),u("aria-label",l(2,2,"menu.tooltip_logout")),o(5),g(l(7,4,"menu.tooltip_logout")))}var J=(()=>{class i{router=m(V);translate=m(M);$auth=m(B);$settings=m($);$modal=m(L);$notification=m(X);$translate=m(M);renderer=m(F);isExpanded=!1;rPiCurrentlyUnderVoltage=!1;rPiWasUnderVoltage=!1;isMobile=!1;freezeMenu=!1;isPwa=G();constructor(){let e=this.router;this.isMobile=window.innerWidth<768;let s;window.addEventListener("resize",()=>{clearTimeout(s),s=setTimeout(()=>{this.updateListeners()},500)}),e.events.subscribe(t=>{t instanceof W&&(this.closeSidebar(),this.freezeMenu=!0,setTimeout(()=>{this.freezeMenu=!1},750))})}ngOnInit(){this.$notification.raspberryPiThrottled.subscribe(r=>{r["Under Voltage"]&&(this.rPiCurrentlyUnderVoltage=!0),r["Under-voltage has occurred"]&&(this.rPiWasUnderVoltage=!0)});let e=document.querySelector(".sidebar"),s=document.querySelector(".m-header"),t=document.querySelector(".content");this.isMobile?document.addEventListener("touchstart",r=>{if(t.contains(r.target)&&this.isExpanded){r.preventDefault(),this.toggleSidebar();return}!e.contains(r.target)&&!s.contains(r.target)&&this.isExpanded&&(r.preventDefault(),this.closeSidebar())},{passive:!1}):(this.updateListeners(),s.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),s.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}),document.addEventListener("click",r=>{e.contains(r.target)&&r.clientX>60&&this.closeSidebar()},{passive:!1})),this.updateContentStyles()}openSidebar(){this.freezeMenu||(this.isExpanded=!0,this.updateContentStyles())}closeSidebar(){this.freezeMenu||(this.isExpanded=!1,this.updateContentStyles())}toggleSidebar(){this.freezeMenu||(this.isExpanded=!this.isExpanded,this.updateContentStyles())}updateContentStyles(){let e=document.querySelector(".content");this.isExpanded?(this.renderer.setStyle(e,"opacity","20%"),this.renderer.setStyle(e,"pointer-events","none"),this.renderer.setStyle(e,"overflow","hidden")):(this.renderer.removeStyle(e,"opacity"),this.renderer.removeStyle(e,"pointer-events"),this.renderer.removeStyle(e,"overflow"))}openUnderVoltageModal(){let e=this.$modal.open(H,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("rpi.throttled.undervoltage_title"),e.componentInstance.message=this.$translate.instant(this.rPiCurrentlyUnderVoltage?"rpi.throttled.currently_message":"rpi.throttled.previously_message"),e.componentInstance.ctaButtonLabel=this.$translate.instant("form.button_more_info"),e.componentInstance.faIconClass="fas fa-fw fa-bolt yellow-text",e.componentInstance.ctaButtonLink="https://pimylifeup.com/raspberry-pi-low-voltage-warning"}handleKeydown(e){if(e.key==="Enter"){let s=e.target;["menuitem","button"].includes(s.getAttribute("role"))&&s.click()}}reloadPage(){window.location.reload()}updateListeners(){this.isMobile=window.innerWidth<768;let e=document.querySelector(".sidebar");e.removeAllListeners(),(this.isMobile||!this.isMobile&&this.$settings.menuMode!=="freeze")&&(e.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),e.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}))}ngOnDestroy(){document.removeEventListener("touchstart",()=>{}),document.removeEventListener("click",()=>{})}static \u0275fac=function(s){return new(s||i)};static \u0275cmp=P({type:i,selectors:[["app-sidebar"]],inputs:{isExpanded:"isExpanded"},decls:61,vars:67,consts:[["tabindex","0","role","button",1,"m-header","text-end",3,"click","keydown"],[1,"me-2","d-block","d-lg-none",2,"font-size","0.9rem","color","#dddddd"],[3,"routerLink"],["ngSrc","../../../../assets/homebridge-logo.svg","alt","HB Logo","height","35","width","35",2,"height","35px","width","35px"],[1,"hb-logo-text-mobile"],[1,"hamburger-icon",3,"ngClass"],["role","navigation","id","sidebar",1,"sidebar",3,"ngClass"],["tabindex","0","role","button",1,"header",3,"click","keydown"],[1,"hb-logo-text"],[1,"link-wrapper"],[1,"link"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive","routerLinkActiveOptions"],[1,"icon"],[1,"fa","fa-fw","fa-house"],[1,"title"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive"],[1,"fa","fa-fw","fa-lightbulb"],[1,"fa","fa-fw","fa-question-circle-o"],[1,"fa","fa-fw","fa-power-off"],["role","menuitem","tabindex","0",1,"link-row",3,"click","keydown"],[1,"fas","fa-fw","fa-bolt","fa-beat","yellow-text",2,"--fa-beat-scale","1.5"],[1,"fa","fa-fw","fa-plug"],[1,"fa","fa-fw","fa-wave-square"],[1,"fa","fa-fw","fa-terminal"],[1,"fa","fa-fw","fa-code"],[1,"fa","fa-fw","fa-cog"],[1,"fa","fa-fw","fa-refresh"],[1,"fa","fa-fw","fa-right-from-bracket"]],template:function(s,t){s&1&&(n(0,"div",0),d(1,"translate"),_("click",function(){return t.toggleSidebar()})("keydown",function(x){return t.handleKeydown(x)}),p(2,"span",1),n(3,"a",2),d(4,"translate"),p(5,"img",3),n(6,"div",4),f(7,"Homebridge"),a()(),n(8,"div",5),p(9,"span")(10,"span")(11,"span")(12,"span"),a()(),n(13,"div",6)(14,"div",7),_("click",function(){return t.toggleSidebar()})("keydown",function(x){return t.handleKeydown(x)}),n(15,"a",2),d(16,"translate"),p(17,"img",3),n(18,"div",8),f(19,"Homebridge"),a()()(),n(20,"div",9)(21,"div",10)(22,"div",11),d(23,"translate"),_("keydown",function(x){return t.handleKeydown(x)}),n(24,"div",12),p(25,"i",13),a(),n(26,"div",14),f(27),d(28,"translate"),a()()(),O(29,me,9,8,"div",10)(30,ue,8,9,"div",10),n(31,"div",10)(32,"div",15),d(33,"translate"),_("keydown",function(x){return t.handleKeydown(x)}),n(34,"div",12),p(35,"i",16),a(),n(36,"div",14),f(37),d(38,"translate"),a()()(),O(39,_e,8,9,"div",10)(40,fe,8,9,"div",10)(41,ge,8,9,"div",10)(42,ve,8,9,"div",10),n(43,"div",10)(44,"div",15),d(45,"translate"),_("keydown",function(x){return t.handleKeydown(x)}),n(46,"div",12),p(47,"i",17),a(),n(48,"div",14),f(49),d(50,"translate"),a()()(),n(51,"div",10)(52,"div",15),d(53,"translate"),_("keydown",function(x){return t.handleKeydown(x)}),n(54,"div",12),p(55,"i",18),a(),n(56,"div",14),f(57),d(58,"translate"),a()()(),O(59,he,8,6,"div",10)(60,be,8,6,"div",10),a()()),s&2&&(u("aria-expanded",t.isExpanded?"true":"false")("aria-controls","sidebar")("aria-label",l(1,34,"menu.sidebar.aria_menu")),o(3),c("routerLink",v(56,I)),u("aria-label",l(4,36,"menu.label_status")),o(5),c("ngClass",k(57,te,t.isExpanded)),o(5),c("ngClass",k(59,ne,t.isExpanded)),o(2),c("routerLink",v(61,I)),u("aria-label",l(16,38,"menu.label_status")),o(7),c("routerLink",v(62,I))("routerLinkActive","active")("routerLinkActiveOptions",v(63,ie)),u("aria-label",l(23,40,"menu.label_status")),o(5),g(l(28,42,"menu.label_status")),o(2),C(t.rPiWasUnderVoltage||t.rPiCurrentlyUnderVoltage?29:-1),o(),C(t.$auth.user.admin?30:-1),o(2),c("routerLink",v(64,oe))("routerLinkActive","active"),u("aria-label",l(33,44,"menu.label_accessories")),o(5),g(l(38,46,"menu.label_accessories")),o(2),C(t.$auth.user.admin?39:-1),o(),C(t.$settings.env.enableTerminalAccess&&t.$auth.user.admin?40:-1),o(),C(t.$auth.user.admin?41:-1),o(),C(t.$auth.user.admin?42:-1),o(2),c("routerLink",v(65,re))("routerLinkActive","active"),u("aria-label",l(45,48,"support.title")),o(5),g(l(50,50,"support.title")),o(3),c("routerLink",v(66,ae))("routerLinkActive","active"),u("aria-label",l(53,52,"menu.restart.title")),o(5),g(l(58,54,"menu.restart.title")),o(2),C(t.isPwa?59:-1),o(),C(t.$settings.formAuth?60:-1))},dependencies:[N,K,E,D,U],styles:[".m-header[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:65px;z-index:510;display:flex;align-items:center;padding-left:3px;padding-right:3px}.m-header[_ngcontent-%COMP%]:hover{cursor:pointer}@media (min-width: 768px){.m-header[_ngcontent-%COMP%]{display:none}}.sidebar[_ngcontent-%COMP%]{position:fixed;left:0;top:0;height:100vh;transition:.3s;width:60px;z-index:500}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;padding:15px 10px 15px 11px;font-size:.85rem}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]:hover{cursor:pointer}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{overflow-y:auto;max-height:calc(100vh - 80px)!important}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%]{display:flex;align-items:center;padding:15px 10px;cursor:pointer;transition:.2s;font-size:17px}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{flex:0 0 38px;display:flex;align-items:center;justify-content:center}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1;transition:.3s;max-width:0;overflow:hidden;white-space:nowrap}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%]{width:0}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:none}}.sidebar.expanded[_ngcontent-%COMP%]{width:210px}@media (max-width: 767px){.sidebar.expanded[_ngcontent-%COMP%]{width:210px}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:block}}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{max-width:150px;padding-left:10px}.hamburger-icon[_ngcontent-%COMP%]{margin:-7px 0 0 25px}@media (min-width: 768px){.hb-logo-text[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px}.sidebar.expanded[_ngcontent-%COMP%] .hb-logo-text[_ngcontent-%COMP%]{opacity:1;left:55px;transition:.3s}.sidebar[_ngcontent-%COMP%]:not(.expanded) .hb-logo-text[_ngcontent-%COMP%]{opacity:0;left:40px;transition:.3s}.hb-logo-text-mobile[_ngcontent-%COMP%], .hamburger-icon[_ngcontent-%COMP%]{display:none!important}}@media (max-width: 767px){.hb-logo-text[_ngcontent-%COMP%]{display:none!important}.hb-logo-text-mobile[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px;opacity:1;left:55px}.hamburger-icon[_ngcontent-%COMP%]{position:absolute;right:10px;top:28px;width:30px;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0);-webkit-transition:.5s ease-in-out;-moz-transition:.5s ease-in-out;-o-transition:.5s ease-in-out;transition:.5s ease-in-out;cursor:pointer}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;position:absolute;height:2px;width:100%;background-color:#fff;border-radius:9px;opacity:1;left:0;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0);-webkit-transition:.25s ease-in-out;-moz-transition:.25s ease-in-out;-o-transition:.25s ease-in-out;transition:.25s ease-in-out}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:0}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2), .hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){top:10px}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:20px}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:10px;width:0;left:50%}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2){-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:10px;width:0;left:50%}}"]})}return i})();var we=i=>({sidebarExpanded:i}),Xe=(()=>{class i{$auth=m(B);$modal=m(L);$router=m(V);$settings=m($);$translate=m(M);$ws=m(j);sidebarExpanded=!1;io;constructor(){}ngOnInit(){this.io=this.$ws.connectToNamespace("app"),this.io.socket.on("reconnect",()=>{this.$auth.checkToken()}),this.compareServerUiVersion()}compareServerUiVersion(){return z(this,null,function*(){if(this.$settings.settingsLoaded||(yield A(this.$settings.onSettingsLoaded)),this.$router.url!=="/restart"&&(0,Q.lt)(this.$settings.uiVersion,T.serverTarget)){console.log(`Server restart required. UI Version: ${T.serverTarget} - Server Version: ${this.$settings.uiVersion} `);let e=this.$modal.open(R,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("platform.version.service_restart_required"),e.componentInstance.message=this.$translate.instant("platform.version.restart_required",{serverVersion:this.$settings.uiVersion,uiVersion:T.serverTarget}),e.componentInstance.confirmButtonLabel=this.$translate.instant("menu.tooltip_restart"),e.componentInstance.faIconClass="fas fa-power-off orange-text",e.result.then(()=>this.$router.navigate(["/restart"])).catch(()=>{})}})}static \u0275fac=function(s){return new(s||i)};static \u0275cmp=P({type:i,selectors:[["app-layout"]],decls:3,vars:4,consts:[[3,"isExpanded"],[1,"content","px-3","p-md-4",3,"ngClass"]],template:function(s,t){s&1&&(p(0,"app-sidebar",0),n(1,"div",1),p(2,"router-outlet"),a()),s&2&&(c("isExpanded",t.sidebarExpanded),o(),c("ngClass",k(2,we,t.sidebarExpanded)))},dependencies:[J,E,q],styles:[".content[_ngcontent-%COMP%]{margin-left:60px;transition:.3s;height:100%}@media (max-width: 767px){.content[_ngcontent-%COMP%]{margin-left:0;padding-top:85px!important}}@media (min-width: 768px){.content[_ngcontent-%COMP%]{height:100%}}a[_ngcontent-%COMP%]:hover{text-decoration:none!important}"]})}return i})();export{Xe as LayoutComponent};
|
|
1
|
+
import{a as X}from"./chunk-736OOU3Z.js";import{a as H}from"./chunk-YCHPFYO5.js";import{a as Z}from"./chunk-B2ERIJJG.js";import{a as R}from"./chunk-IQBKWEOJ.js";import{n as L}from"./chunk-U3XAGOD7.js";import"./chunk-DVN556RD.js";import{a as j}from"./chunk-QX4JJLN4.js";import{a as W,c as q,d as V,e as N,f as D}from"./chunk-2IW5LNPB.js";import{c as B}from"./chunk-UXBIRDFV.js";import{b as $}from"./chunk-SHPANMJF.js";import{j as T}from"./chunk-4M72X5OK.js";import"./chunk-G75CPMPQ.js";import{a as M,b as U}from"./chunk-QIWZD5HO.js";import{Ac as d,Bc as l,Jb as u,Kb as c,Pb as C,Ub as n,Vb as a,Wb as p,Zc as E,_b as y,bc as _,cc as w,g as Y,gb as o,h as z,lb as F,ma as m,mc as f,nc as g,od as K,tb as P,ua as h,va as b,vc as v,w as A,wc as k,zb as O}from"./chunk-6JZDPQRU.js";var Q=Y(Z(),1);function G(){var i;return typeof window<"u"&&((window==null?void 0:window.matchMedia("(display-mode: standalone)").matches)||((i=window.navigator)===null||i===void 0?void 0:i.standalone)||document.referrer.startsWith("android-app://")||(window==null?void 0:window.Windows)||/trident.+(msapphost|webview)\//i.test(navigator.userAgent)||document.referrer.startsWith("app-info://platform/microsoft-store"))}var I=()=>["/"],te=i=>({"hamburger-icon-cross":i}),ne=i=>({expanded:i}),ie=()=>({exact:!0}),oe=()=>["/accessories"],re=()=>["/support"],ae=()=>["/power-options"],se=()=>["/plugins"],de=()=>["/logs"],le=()=>["/platform-tools/terminal"],pe=()=>["/config"],ce=()=>["/settings"];function me(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",19),d(2,"translate"),d(3,"translate"),_("click",function(){h(e);let t=w();return b(t.openUnderVoltageModal())})("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(4,"div",12),p(5,"i",20),a(),n(6,"div",14),f(7),d(8,"translate"),a()()()}i&2&&(o(),u("aria-label",l(2,2,"rpi.throttled.undervoltage_title")+" - "+l(3,4,"rpi.throttled.undervoltage_description")),o(6),g(l(8,6,"rpi.throttled.undervoltage_title")))}function ue(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",21),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,se))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.label_plugins")),o(5),g(l(7,6,"menu.label_plugins")))}function _e(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",22),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,de))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.linux.label_logs")),o(5),g(l(7,6,"menu.linux.label_logs")))}function fe(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",23),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,le))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.linux.label_terminal")),o(5),g(l(7,6,"menu.linux.label_terminal")))}function ge(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",24),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,pe))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.config_json_editor")),o(5),g(l(7,6,"menu.config_json_editor")))}function ve(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",25),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,ce))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.label_settings")),o(5),g(l(7,6,"menu.label_settings")))}function he(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",19),d(2,"translate"),_("click",function(){h(e);let t=w();return b(t.reloadPage())})("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",26),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),u("aria-label",l(2,2,"menu.reload")),o(5),g(l(7,4,"menu.reload")))}function be(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",19),d(2,"translate"),_("click",function(){h(e);let t=w();return b(t.$auth.logout())})("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",27),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),u("aria-label",l(2,2,"menu.tooltip_logout")),o(5),g(l(7,4,"menu.tooltip_logout")))}var J=(()=>{class i{router=m(V);translate=m(M);$auth=m(B);$settings=m($);$modal=m(L);$notification=m(X);$translate=m(M);renderer=m(F);isExpanded=!1;rPiCurrentlyUnderVoltage=!1;rPiWasUnderVoltage=!1;isMobile=!1;freezeMenu=!1;isPwa=G();constructor(){let e=this.router;this.isMobile=window.innerWidth<768;let s;window.addEventListener("resize",()=>{clearTimeout(s),s=setTimeout(()=>{this.updateListeners()},500)}),e.events.subscribe(t=>{t instanceof W&&(this.closeSidebar(),this.freezeMenu=!0,setTimeout(()=>{this.freezeMenu=!1},750))})}ngOnInit(){this.$notification.raspberryPiThrottled.subscribe(r=>{r["Under Voltage"]&&(this.rPiCurrentlyUnderVoltage=!0),r["Under-voltage has occurred"]&&(this.rPiWasUnderVoltage=!0)});let e=document.querySelector(".sidebar"),s=document.querySelector(".m-header"),t=document.querySelector(".content");this.isMobile?document.addEventListener("touchstart",r=>{if(t.contains(r.target)&&this.isExpanded){r.preventDefault(),this.toggleSidebar();return}!e.contains(r.target)&&!s.contains(r.target)&&this.isExpanded&&(r.preventDefault(),this.closeSidebar())},{passive:!1}):(this.updateListeners(),s.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),s.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}),document.addEventListener("click",r=>{e.contains(r.target)&&r.clientX>60&&this.closeSidebar()},{passive:!1})),this.updateContentStyles()}openSidebar(){this.freezeMenu||(this.isExpanded=!0,this.updateContentStyles())}closeSidebar(){this.freezeMenu||(this.isExpanded=!1,this.updateContentStyles())}toggleSidebar(){this.freezeMenu||(this.isExpanded=!this.isExpanded,this.updateContentStyles())}updateContentStyles(){let e=document.querySelector(".content");this.isExpanded?(this.renderer.setStyle(e,"opacity","20%"),this.renderer.setStyle(e,"pointer-events","none"),this.renderer.setStyle(e,"overflow","hidden")):(this.renderer.removeStyle(e,"opacity"),this.renderer.removeStyle(e,"pointer-events"),this.renderer.removeStyle(e,"overflow"))}openUnderVoltageModal(){let e=this.$modal.open(H,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("rpi.throttled.undervoltage_title"),e.componentInstance.message=this.$translate.instant(this.rPiCurrentlyUnderVoltage?"rpi.throttled.currently_message":"rpi.throttled.previously_message"),e.componentInstance.ctaButtonLabel=this.$translate.instant("form.button_more_info"),e.componentInstance.faIconClass="fas fa-fw fa-bolt yellow-text",e.componentInstance.ctaButtonLink="https://pimylifeup.com/raspberry-pi-low-voltage-warning"}handleKeydown(e){if(e.key==="Enter"){let s=e.target;["menuitem","button"].includes(s.getAttribute("role"))&&s.click()}}reloadPage(){window.location.reload()}updateListeners(){this.isMobile=window.innerWidth<768;let e=document.querySelector(".sidebar");e.removeAllListeners(),(this.isMobile||!this.isMobile&&this.$settings.menuMode!=="freeze")&&(e.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),e.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}))}ngOnDestroy(){document.removeEventListener("touchstart",()=>{}),document.removeEventListener("click",()=>{})}static \u0275fac=function(s){return new(s||i)};static \u0275cmp=P({type:i,selectors:[["app-sidebar"]],inputs:{isExpanded:"isExpanded"},decls:61,vars:67,consts:[["tabindex","0","role","button",1,"m-header","text-end",3,"click","keydown"],[1,"me-2","d-block","d-lg-none",2,"font-size","0.9rem","color","#dddddd"],[3,"routerLink"],["ngSrc","../../../../assets/homebridge-logo.svg","alt","HB Logo","height","35","width","35",2,"height","35px","width","35px"],[1,"hb-logo-text-mobile"],[1,"hamburger-icon",3,"ngClass"],["role","navigation","id","sidebar",1,"sidebar",3,"ngClass"],["tabindex","0","role","button",1,"header",3,"click","keydown"],[1,"hb-logo-text"],[1,"link-wrapper"],[1,"link"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive","routerLinkActiveOptions"],[1,"icon"],[1,"fa","fa-fw","fa-house"],[1,"title"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive"],[1,"fa","fa-fw","fa-lightbulb"],[1,"fa","fa-fw","fa-question-circle-o"],[1,"fa","fa-fw","fa-power-off"],["role","menuitem","tabindex","0",1,"link-row",3,"click","keydown"],[1,"fas","fa-fw","fa-bolt","fa-beat","yellow-text",2,"--fa-beat-scale","1.5"],[1,"fa","fa-fw","fa-plug"],[1,"fa","fa-fw","fa-wave-square"],[1,"fa","fa-fw","fa-terminal"],[1,"fa","fa-fw","fa-code"],[1,"fa","fa-fw","fa-cog"],[1,"fa","fa-fw","fa-refresh"],[1,"fa","fa-fw","fa-right-from-bracket"]],template:function(s,t){s&1&&(n(0,"div",0),d(1,"translate"),_("click",function(){return t.toggleSidebar()})("keydown",function(x){return t.handleKeydown(x)}),p(2,"span",1),n(3,"a",2),d(4,"translate"),p(5,"img",3),n(6,"div",4),f(7,"Homebridge"),a()(),n(8,"div",5),p(9,"span")(10,"span")(11,"span")(12,"span"),a()(),n(13,"div",6)(14,"div",7),_("click",function(){return t.toggleSidebar()})("keydown",function(x){return t.handleKeydown(x)}),n(15,"a",2),d(16,"translate"),p(17,"img",3),n(18,"div",8),f(19,"Homebridge"),a()()(),n(20,"div",9)(21,"div",10)(22,"div",11),d(23,"translate"),_("keydown",function(x){return t.handleKeydown(x)}),n(24,"div",12),p(25,"i",13),a(),n(26,"div",14),f(27),d(28,"translate"),a()()(),O(29,me,9,8,"div",10)(30,ue,8,9,"div",10),n(31,"div",10)(32,"div",15),d(33,"translate"),_("keydown",function(x){return t.handleKeydown(x)}),n(34,"div",12),p(35,"i",16),a(),n(36,"div",14),f(37),d(38,"translate"),a()()(),O(39,_e,8,9,"div",10)(40,fe,8,9,"div",10)(41,ge,8,9,"div",10)(42,ve,8,9,"div",10),n(43,"div",10)(44,"div",15),d(45,"translate"),_("keydown",function(x){return t.handleKeydown(x)}),n(46,"div",12),p(47,"i",17),a(),n(48,"div",14),f(49),d(50,"translate"),a()()(),n(51,"div",10)(52,"div",15),d(53,"translate"),_("keydown",function(x){return t.handleKeydown(x)}),n(54,"div",12),p(55,"i",18),a(),n(56,"div",14),f(57),d(58,"translate"),a()()(),O(59,he,8,6,"div",10)(60,be,8,6,"div",10),a()()),s&2&&(u("aria-expanded",t.isExpanded?"true":"false")("aria-controls","sidebar")("aria-label",l(1,34,"menu.sidebar.aria_menu")),o(3),c("routerLink",v(56,I)),u("aria-label",l(4,36,"menu.label_status")),o(5),c("ngClass",k(57,te,t.isExpanded)),o(5),c("ngClass",k(59,ne,t.isExpanded)),o(2),c("routerLink",v(61,I)),u("aria-label",l(16,38,"menu.label_status")),o(7),c("routerLink",v(62,I))("routerLinkActive","active")("routerLinkActiveOptions",v(63,ie)),u("aria-label",l(23,40,"menu.label_status")),o(5),g(l(28,42,"menu.label_status")),o(2),C(t.rPiWasUnderVoltage||t.rPiCurrentlyUnderVoltage?29:-1),o(),C(t.$auth.user.admin?30:-1),o(2),c("routerLink",v(64,oe))("routerLinkActive","active"),u("aria-label",l(33,44,"menu.label_accessories")),o(5),g(l(38,46,"menu.label_accessories")),o(2),C(t.$auth.user.admin?39:-1),o(),C(t.$settings.env.enableTerminalAccess&&t.$auth.user.admin?40:-1),o(),C(t.$auth.user.admin?41:-1),o(),C(t.$auth.user.admin?42:-1),o(2),c("routerLink",v(65,re))("routerLinkActive","active"),u("aria-label",l(45,48,"support.title")),o(5),g(l(50,50,"support.title")),o(3),c("routerLink",v(66,ae))("routerLinkActive","active"),u("aria-label",l(53,52,"menu.restart.title")),o(5),g(l(58,54,"menu.restart.title")),o(2),C(t.isPwa?59:-1),o(),C(t.$settings.formAuth?60:-1))},dependencies:[N,K,E,D,U],styles:[".m-header[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:65px;z-index:510;display:flex;align-items:center;padding-left:3px;padding-right:3px}.m-header[_ngcontent-%COMP%]:hover{cursor:pointer}@media (min-width: 768px){.m-header[_ngcontent-%COMP%]{display:none}}.sidebar[_ngcontent-%COMP%]{position:fixed;left:0;top:0;height:100vh;transition:.3s;width:60px;z-index:500}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;padding:15px 10px 15px 11px;font-size:.85rem}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]:hover{cursor:pointer}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{overflow-y:auto;max-height:calc(100vh - 80px)!important}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%]{display:flex;align-items:center;padding:15px 10px;cursor:pointer;transition:.2s;font-size:17px}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{flex:0 0 38px;display:flex;align-items:center;justify-content:center}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1;transition:.3s;max-width:0;overflow:hidden;white-space:nowrap}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%]{width:0}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:none}}.sidebar.expanded[_ngcontent-%COMP%]{width:210px}@media (max-width: 767px){.sidebar.expanded[_ngcontent-%COMP%]{width:210px}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:block}}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{max-width:150px;padding-left:10px}.hamburger-icon[_ngcontent-%COMP%]{margin:-7px 0 0 25px}@media (min-width: 768px){.hb-logo-text[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px}.sidebar.expanded[_ngcontent-%COMP%] .hb-logo-text[_ngcontent-%COMP%]{opacity:1;left:55px;transition:.3s}.sidebar[_ngcontent-%COMP%]:not(.expanded) .hb-logo-text[_ngcontent-%COMP%]{opacity:0;left:40px;transition:.3s}.hb-logo-text-mobile[_ngcontent-%COMP%], .hamburger-icon[_ngcontent-%COMP%]{display:none!important}}@media (max-width: 767px){.hb-logo-text[_ngcontent-%COMP%]{display:none!important}.hb-logo-text-mobile[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px;opacity:1;left:55px}.hamburger-icon[_ngcontent-%COMP%]{position:absolute;right:10px;top:28px;width:30px;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0);-webkit-transition:.5s ease-in-out;-moz-transition:.5s ease-in-out;-o-transition:.5s ease-in-out;transition:.5s ease-in-out;cursor:pointer}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;position:absolute;height:2px;width:100%;background-color:#fff;border-radius:9px;opacity:1;left:0;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0);-webkit-transition:.25s ease-in-out;-moz-transition:.25s ease-in-out;-o-transition:.25s ease-in-out;transition:.25s ease-in-out}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:0}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2), .hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){top:10px}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:20px}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:10px;width:0;left:50%}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2){-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:10px;width:0;left:50%}}"]})}return i})();var we=i=>({sidebarExpanded:i}),Xe=(()=>{class i{$auth=m(B);$modal=m(L);$router=m(V);$settings=m($);$translate=m(M);$ws=m(j);sidebarExpanded=!1;io;constructor(){}ngOnInit(){this.io=this.$ws.connectToNamespace("app"),this.io.socket.on("reconnect",()=>{this.$auth.checkToken()}),this.compareServerUiVersion()}compareServerUiVersion(){return z(this,null,function*(){if(this.$settings.settingsLoaded||(yield A(this.$settings.onSettingsLoaded)),this.$router.url!=="/restart"&&(0,Q.lt)(this.$settings.uiVersion,T.serverTarget)){console.log(`Server restart required. UI Version: ${T.serverTarget} - Server Version: ${this.$settings.uiVersion} `);let e=this.$modal.open(R,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("platform.version.service_restart_required"),e.componentInstance.message=this.$translate.instant("platform.version.restart_required",{serverVersion:this.$settings.uiVersion,uiVersion:T.serverTarget}),e.componentInstance.confirmButtonLabel=this.$translate.instant("menu.tooltip_restart"),e.componentInstance.faIconClass="fas fa-power-off orange-text",e.result.then(()=>this.$router.navigate(["/restart"])).catch(()=>{})}})}static \u0275fac=function(s){return new(s||i)};static \u0275cmp=P({type:i,selectors:[["app-layout"]],decls:3,vars:4,consts:[[3,"isExpanded"],[1,"content","px-3","p-md-4",3,"ngClass"]],template:function(s,t){s&1&&(p(0,"app-sidebar",0),n(1,"div",1),p(2,"router-outlet"),a()),s&2&&(c("isExpanded",t.sidebarExpanded),o(),c("ngClass",k(2,we,t.sidebarExpanded)))},dependencies:[J,E,q],styles:[".content[_ngcontent-%COMP%]{margin-left:60px;transition:.3s;height:100%}@media (max-width: 767px){.content[_ngcontent-%COMP%]{margin-left:0;padding-top:85px!important}}@media (min-width: 768px){.content[_ngcontent-%COMP%]{height:100%}}a[_ngcontent-%COMP%]:hover{text-decoration:none!important}"]})}return i})();export{Xe as LayoutComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as w,k as S}from"./chunk-
|
|
1
|
+
import{h as w,k as S}from"./chunk-4M72X5OK.js";import{a as _,b as h}from"./chunk-QIWZD5HO.js";import{Ac as s,Bc as m,Pb as d,Ub as i,Vb as n,Wb as u,cc as v,gb as e,ma as p,mc as o,nc as a,tb as x,zb as f}from"./chunk-6JZDPQRU.js";function C(t,y){t&1&&(i(0,"p",7),o(1),s(2,"translate"),n()),t&2&&(e(),a(m(2,1,"platform.linux.server_will_power_down")))}function g(t,y){if(t&1&&(i(0,"div",8),o(1),n()),t&2){let r=v();e(),a(r.error)}}var B=(()=>{class t{$api=p(S);$toastr=p(w);$translate=p(_);error=!1;constructor(){}ngOnInit(){this.$api.put("/platform-tools/linux/shutdown-host",{}).subscribe({error:r=>{console.error(r),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"))}})}static \u0275fac=function(l){return new(l||t)};static \u0275cmp=x({type:t,selectors:[["ng-component"]],decls:13,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,"grey-text"],[1,"alert","alert-error","my-4"]],template:function(l,c){l&1&&(i(0,"div",0)(1,"h3",1),o(2),s(3,"translate"),n()(),i(4,"div",2)(5,"div",3),u(6,"i",4),n(),i(7,"div",5)(8,"h4",6),o(9),s(10,"translate"),n(),f(11,C,3,3,"p",7)(12,g,2,1,"div",8),n()()),l&2&&(e(2),a(m(3,4,"menu.restart.title")),e(7),a(m(10,6,"platform.linux.shutting_down_server")),e(2),d(c.error?-1:11),e(),d(c.error?12:-1))},dependencies:[h],encapsulation:2})}return t})();export{B as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as f,b as u}from"./chunk-OPSX6NGT.js";import{a as d}from"./chunk-P6AJ5TS2.js";import{c as p}from"./chunk-YVLNDNOU.js";import"./chunk-Y7QARRGO.js";import"./chunk-BBVFH2MI.js";import"./chunk-D3QNROQA.js";import{q as n}from"./chunk-U3XAGOD7.js";import{y as s}from"./chunk-DVN556RD.js";import"./chunk-QX4JJLN4.js";import{g as i}from"./chunk-2IW5LNPB.js";import"./chunk-UXBIRDFV.js";import"./chunk-SHPANMJF.js";import"./chunk-4M72X5OK.js";import"./chunk-G75CPMPQ.js";import{c}from"./chunk-QIWZD5HO.js";import{gd as m,ha as r,ub as e}from"./chunk-6JZDPQRU.js";var C=[{path:"",loadComponent:()=>import("./chunk-XSVWXIZ3.js").then(o=>o.AccessoriesComponent)}],l=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=e({type:o});static \u0275inj=r({imports:[i.forChild(C),i]})}return o})();var S=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=e({type:o});static \u0275inj=r({imports:[m,s,n,p,c.forChild(),d,l,u,f]})}return o})();export{S as AccessoriesModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as w}from"./chunk-
|
|
1
|
+
import{b as w}from"./chunk-QIWZD5HO.js";import{Ac as i,Bc as n,Jb as o,Kb as b,Pb as f,Ub as t,Vb as a,Wb as p,Zc as x,bc as h,gb as e,mc as r,nc as d,oc as l,tb as g,zb as v}from"./chunk-6JZDPQRU.js";function k(s,S){s&1&&(t(0,"ul",6)(1,"li",9)(2,"span",10),r(3),i(4,"translate"),p(5,"br"),t(6,"small",11),r(7),i(8,"translate"),a()(),t(9,"a",12),i(10,"translate"),p(11,"i",13),a()(),t(12,"li",9)(13,"span",10),r(14),i(15,"translate"),p(16,"br"),t(17,"small",11),r(18),i(19,"translate"),a()(),t(20,"a",14),i(21,"translate"),p(22,"i",13),a()(),t(23,"li",9)(24,"span",10),r(25),i(26,"translate"),p(27,"br"),t(28,"small",11),r(29),i(30,"translate"),a()(),t(31,"a",15),i(32,"translate"),p(33,"i",13),a()(),t(34,"li",9)(35,"span",10),r(36),i(37,"translate"),p(38,"br"),t(39,"small",11),r(40),i(41,"translate"),a()(),t(42,"a",16),i(43,"translate"),p(44,"i",13),a()()()),s&2&&(e(3),l(" ",n(4,12,"support.links.documentation"),""),e(4),d(n(8,14,"support.links.documentation_sub")),e(2),o("aria-label",n(10,16,"support.links.documentation")),e(5),l(" ",n(15,18,"support.links.issue"),""),e(4),d(n(19,20,"support.links.issue_sub")),e(2),o("aria-label",n(21,22,"support.links.issue")),e(5),l(" ",n(26,24,"support.links.discord"),""),e(4),d(n(30,26,"support.links.discord_sub")),e(2),o("aria-label",n(32,28,"support.links.discord")),e(5),l(" ",n(37,30,"support.links.reddit"),""),e(4),d(n(41,32,"support.links.reddit_sub")),e(2),o("aria-label",n(43,34,"support.links.reddit")))}function B(s,S){s&1&&(t(0,"ul",8)(1,"li",9)(2,"span",10),r(3),i(4,"translate"),p(5,"br"),t(6,"small",11),r(7),i(8,"translate"),a()(),t(9,"a",17),i(10,"translate"),p(11,"i",13),a()(),t(12,"li",9)(13,"span",10),r(14),i(15,"translate"),p(16,"br"),t(17,"small",11),r(18),i(19,"translate"),a()(),t(20,"a",18),i(21,"translate"),p(22,"i",13),a()(),t(23,"li",9)(24,"span",10),r(25),i(26,"translate"),p(27,"br"),t(28,"small",11),r(29),i(30,"translate"),a()(),t(31,"a",19),i(32,"translate"),p(33,"i",13),a()(),t(34,"li",9)(35,"span",10),r(36),i(37,"translate"),p(38,"br"),t(39,"small",11),r(40),i(41,"translate"),a()(),t(42,"a",20),i(43,"translate"),p(44,"i",13),a()(),t(45,"li",9)(46,"span",10),r(47),i(48,"translate"),p(49,"br"),t(50,"small",11),r(51),i(52,"translate"),a()(),t(53,"a",21),i(54,"translate"),p(55,"i",13),a()()()),s&2&&(e(3),l(" ",n(4,15,"support.dev.item_swagger"),""),e(4),l(" ",n(8,17,"support.dev.item_swagger_sub")," "),e(2),o("aria-label",n(10,19,"support.dev.item_swagger")),e(5),l(" ",n(15,21,"support.dev.api"),""),e(4),d(n(19,23,"support.dev.api_sub")),e(2),o("aria-label",n(21,25,"support.dev.api")),e(5),l(" ",n(26,27,"support.dev.api_hap"),""),e(4),d(n(30,29,"support.dev.api_hap_sub")),e(2),o("aria-label",n(32,31,"support.dev.api_hap")),e(5),l(" ",n(37,33,"support.dev.template"),""),e(4),l(" ",n(41,35,"support.dev.template_sub")," "),e(2),o("aria-label",n(43,37,"support.dev.template")),e(5),l(" ",n(48,39,"support.dev.verified"),""),e(4),d(n(52,41,"support.dev.verified_sub")),e(2),o("aria-label",n(54,43,"support.dev.verified")))}var C=(()=>{class s{showFields={general:!0,dev:!0};constructor(){}toggleSection(u){this.showFields[u]=!this.showFields[u]}static \u0275fac=function(c){return new(c||s)};static \u0275cmp=g({type:s,selectors:[["ng-component"]],decls:18,vars:17,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"mb-4"],["role","button","tabindex","0",1,"mt-3","hover-pointer",3,"click"],[1,"primary-text"],[1,"fa","fa-fw",3,"ngClass"],["id","fieldsGeneral",1,"list-group","list-group-box","mt-2","mx-0"],[1,"pb-3"],["id","fieldsDev",1,"list-group","list-group-box","mt-2","mx-0"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"pe-2"],[1,"grey-text","pe-2"],["href","https://github.com/homebridge/homebridge/wiki","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],[1,"fas","fa-fw","fa-external-link-alt"],["href","https://github.com/homebridge/homebridge-config-ui-x/issues/new/choose","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],["href","https://discord.gg/C87Pvq3","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],["href","https://www.reddit.com/r/homebridge/","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],["href","/swagger","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],["href","https://developers.homebridge.io/#/","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],["href","https://developers.homebridge.io/HAP-NodeJS/","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],["href","https://github.com/homebridge/homebridge-plugin-template","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],["href","https://github.com/homebridge/homebridge/wiki/Verified-Plugins","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"]],template:function(c,m){c&1&&(t(0,"div",0)(1,"h3",1),r(2),i(3,"translate"),a()(),t(4,"div",2)(5,"div",3),h("click",function(){return m.toggleSection("general")}),t(6,"h5",4),p(7,"i",5),r(8),i(9,"translate"),a()(),v(10,k,45,36,"ul",6),a(),t(11,"div",7)(12,"div",3),h("click",function(){return m.toggleSection("dev")}),t(13,"h5",4),p(14,"i",5),r(15),i(16,"translate"),a()(),v(17,B,56,45,"ul",8),a()),c&2&&(e(2),d(n(3,11,"support.title")),e(3),o("aria-expanded",m.showFields.general?"true":"false")("aria-controls","fieldsGeneral"),e(2),b("ngClass",m.showFields.general?"fa-chevron-down":"fa-chevron-right"),e(),l(" ",n(9,13,"support.links.title")," "),e(2),f(m.showFields.general?10:-1),e(2),o("aria-expanded",m.showFields.dev?"true":"false")("aria-controls","fieldsDev"),e(2),b("ngClass",m.showFields.dev?"fa-chevron-down":"fa-chevron-right"),e(),l(" ",n(16,15,"support.dev.title")," "),e(2),f(m.showFields.dev?17:-1))},dependencies:[x,w],encapsulation:2})}return s})();export{C as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-YBF3LNSH.js";import"./chunk-QX4JJLN4.js";import"./chunk-2IW5LNPB.js";import"./chunk-UXBIRDFV.js";import"./chunk-SHPANMJF.js";import"./chunk-4M72X5OK.js";import"./chunk-G75CPMPQ.js";import"./chunk-QIWZD5HO.js";import"./chunk-6JZDPQRU.js";export{a as ContainerRestartComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-NKLCJU2S.js";import"./chunk-VZPOY7LH.js";import"./chunk-A6S2CSNA.js";import"./chunk-REYVZJK4.js";import"./chunk-TH7WF563.js";import"./chunk-Y5BDWQTD.js";import"./chunk-BBVFH2MI.js";import"./chunk-D3QNROQA.js";import"./chunk-TOSAT7VK.js";import"./chunk-2COJW6JZ.js";import"./chunk-ZEGJJ2QZ.js";import"./chunk-SZTIHT5G.js";import"./chunk-L4SPVWCZ.js";import"./chunk-YCHPFYO5.js";import"./chunk-B2ERIJJG.js";import"./chunk-IQBKWEOJ.js";import"./chunk-U3XAGOD7.js";import"./chunk-DVN556RD.js";import"./chunk-QX4JJLN4.js";import"./chunk-2IW5LNPB.js";import"./chunk-UXBIRDFV.js";import"./chunk-SHPANMJF.js";import"./chunk-4M72X5OK.js";import"./chunk-G75CPMPQ.js";import"./chunk-QIWZD5HO.js";import"./chunk-6JZDPQRU.js";export{a as PluginsComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-N4Z4UGMV.js";import"./chunk-3BELKOOV.js";import"./chunk-2COJW6JZ.js";import"./chunk-L4SPVWCZ.js";import"./chunk-QX4JJLN4.js";import"./chunk-UXBIRDFV.js";import"./chunk-SHPANMJF.js";import"./chunk-4M72X5OK.js";import"./chunk-G75CPMPQ.js";import"./chunk-QIWZD5HO.js";import"./chunk-6JZDPQRU.js";export{a as TerminalComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as l,b as u,c as a,d as g}from"./chunk-6ANUJDFI.js";import{a as f}from"./chunk-UHIT6NQS.js";import"./chunk-QAB7LTBA.js";import{a as c}from"./chunk-Y7QARRGO.js";import"./chunk-REYVZJK4.js";import"./chunk-TH7WF563.js";import"./chunk-Y5BDWQTD.js";import"./chunk-BBVFH2MI.js";import"./chunk-D3QNROQA.js";import"./chunk-TOSAT7VK.js";import"./chunk-2COJW6JZ.js";import"./chunk-ZEGJJ2QZ.js";import"./chunk-SZTIHT5G.js";import"./chunk-L4SPVWCZ.js";import"./chunk-B2ERIJJG.js";import"./chunk-IQBKWEOJ.js";import{q as s}from"./chunk-U3XAGOD7.js";import{y as n,z as p}from"./chunk-DVN556RD.js";import"./chunk-QX4JJLN4.js";import{g as i}from"./chunk-2IW5LNPB.js";import"./chunk-UXBIRDFV.js";import"./chunk-SHPANMJF.js";import"./chunk-4M72X5OK.js";import"./chunk-G75CPMPQ.js";import{c as d}from"./chunk-QIWZD5HO.js";import{gd as m,ha as t,ub as e}from"./chunk-6JZDPQRU.js";var v=[{path:"",loadComponent:()=>import("./chunk-AOTHIRMY.js").then(o=>o.SettingsComponent),canActivate:[f]}],C=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[i.forChild(v),i]})}return o})();var K=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[m,n,p,d,s,C,g,u,l,c,a]})}return o})();export{K as SettingsModule};
|