homebridge-config-ui-x 5.0.0-beta.114 → 5.0.0-beta.115
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 +3 -1
- package/dist/modules/plugins/plugins.service.js +6 -4
- package/dist/modules/plugins/plugins.service.js.map +1 -1
- package/package.json +1 -1
- package/public/{chunk-NHEDTFON.js → chunk-2EFII46K.js} +1 -1
- package/public/{chunk-FO4GK6XA.js → chunk-2IUXG2EN.js} +1 -1
- package/public/{chunk-TJMAEPYQ.js → chunk-3H3N5KRW.js} +1 -1
- package/public/{chunk-MXBGXHDT.js → chunk-3S2WTI7E.js} +1 -1
- package/public/{chunk-PPYAK5PR.js → chunk-42ME5L3R.js} +1 -1
- package/public/{chunk-FSL5WNMT.js → chunk-4GSDDNS4.js} +1 -1
- package/public/{chunk-AQZECAZU.js → chunk-4LCIAXO2.js} +1 -1
- package/public/{chunk-F2AECNNZ.js → chunk-4QC4PBZL.js} +1 -1
- package/public/{chunk-7KG7OR7A.js → chunk-6VTI52J2.js} +1 -1
- package/public/{chunk-3ZGLL37E.js → chunk-6Y2OAEVG.js} +1 -1
- package/public/{chunk-ZFVZALM4.js → chunk-7UBIRML4.js} +1 -1
- package/public/{chunk-STOQHISG.js → chunk-AF3JBKYZ.js} +1 -1
- package/public/{chunk-LSK2YKYF.js → chunk-BMP5IKAG.js} +1 -1
- package/public/{chunk-O5Z4LOSN.js → chunk-BTHUOI3P.js} +1 -1
- package/public/{chunk-WLUDR55Z.js → chunk-C3GSKPPS.js} +1 -1
- package/public/{chunk-OME4KX7V.js → chunk-CI2DUK2L.js} +1 -1
- package/public/{chunk-EWWD6XPW.js → chunk-CXANN4XV.js} +1 -1
- package/public/{chunk-IPZFEWK5.js → chunk-G5V7VNU6.js} +1 -1
- package/public/{chunk-3BJKR3ZK.js → chunk-GEO4DT7J.js} +1 -1
- package/public/{chunk-7Q2DYYK3.js → chunk-HAE77KT7.js} +1 -1
- package/public/{chunk-HWOT3H4M.js → chunk-IJLX5JKF.js} +1 -1
- package/public/{chunk-4YQ23MIB.js → chunk-J2D4NQET.js} +1 -1
- package/public/{chunk-JIFJ5BCQ.js → chunk-JFX6FD7T.js} +1 -1
- package/public/{chunk-M7JEOWNA.js → chunk-K6OAGSPQ.js} +1 -1
- package/public/{chunk-MFZRO3LR.js → chunk-KFNXMHXX.js} +1 -1
- package/public/{chunk-CETDSZPT.js → chunk-LPOUENXE.js} +1 -1
- package/public/{chunk-ANYIDLDI.js → chunk-M5CMDZZD.js} +1 -1
- package/public/{chunk-I5SITC4K.js → chunk-MHUXDZEF.js} +1 -1
- package/public/{chunk-5VLR4JF4.js → chunk-OWX3CBVC.js} +1 -1
- package/public/{chunk-WWTGLYEU.js → chunk-PH3XR7JL.js} +1 -1
- package/public/{chunk-3FSMCEWK.js → chunk-PPPQR4O4.js} +1 -1
- package/public/{chunk-U4SPMKC6.js → chunk-QR4VLNDI.js} +1 -1
- package/public/{chunk-RIHLYE6G.js → chunk-RPHC6QJY.js} +1 -1
- package/public/{chunk-ZBPA6DZ2.js → chunk-SCL7UVTQ.js} +1 -1
- package/public/{chunk-7FHBLMYO.js → chunk-SE3VEIYB.js} +1 -1
- package/public/{chunk-XNKJVMAY.js → chunk-ST6S2EEM.js} +1 -1
- package/public/{chunk-CYIXRDJF.js → chunk-TKTXNLQU.js} +1 -1
- package/public/{chunk-6MZR2SJM.js → chunk-U3OKAWTP.js} +1 -1
- package/public/{chunk-2KXUOZCO.js → chunk-VEGQX5TF.js} +1 -1
- package/public/{chunk-OHFAVFRH.js → chunk-VWBW7JSQ.js} +1 -1
- package/public/{chunk-GAKL6VTL.js → chunk-WFXCEU4I.js} +1 -1
- package/public/{chunk-35UZ4QJQ.js → chunk-XTBMSQM5.js} +1 -1
- package/public/{chunk-CCGYEUZN.js → chunk-ZUYGS2P3.js} +1 -1
- package/public/{chunk-BJA62E7C.js → chunk-ZXNNCTE2.js} +4 -4
- package/public/index.html +1 -1
- package/public/{main-DZBEMUC3.js → main-6ZIVRYGV.js} +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as w}from"./chunk-
|
|
1
|
+
import{a as w}from"./chunk-42ME5L3R.js";import"./chunk-QR4VLNDI.js";import{d as $}from"./chunk-GEIS2BWE.js";import{b as S}from"./chunk-6Y2OAEVG.js";import{k as E,n as y}from"./chunk-K6OAGSPQ.js";import{a as g,b as _}from"./chunk-R3563DDE.js";import"./chunk-Q4CZ7LVK.js";import{Hc as m,Ib as c,Ic as l,Jb as d,Sb as r,Tb as i,Ub as f,ab as n,dc as v,la as o,mb as h,qc as a,rc as s}from"./chunk-ULJPS3WS.js";function T(t,u){if(t&1&&(r(0,"div",7),a(1),i()),t&2){let e=v();n(),s(e.error)}}function C(t,u){t&1&&(r(0,"p",9),a(1),m(2,"translate"),i(),r(3,"div",10)(4,"div",11),f(5,"i",12),i()()),t&2&&(n(),s(l(2,1,"restart.please_wait_while_server_restarts")))}function k(t,u){t&1&&(r(0,"div",8),a(1),m(2,"translate"),i()),t&2&&(n(),s(l(2,1,"platform.linux.long_time")))}var z=(()=>{class t{$api=o(y);$router=o($);$settings=o(S);$toastr=o(E);$translate=o(g);$ws=o(w);checkTimeout;checkDelay;io;resp={};timeout=!1;error=!1;ngOnInit(){this.io=this.$ws.connectToNamespace("status"),this.io.connected.subscribe(()=>{this.io.socket.emit("monitor-server-status"),this.$settings.getAppSettings().catch(()=>{})}),this.$api.put("/platform-tools/linux/restart-host",{}).subscribe({next:e=>{this.resp=e,this.checkIfServerUp()},error:e=>{console.error(e),this.error=this.$translate.instant("platform.linux.server_restart_error"),this.$toastr.error(this.$translate.instant("platform.linux.server_restart_error"),this.$translate.instant("toast.title_error"))}})}ngOnDestroy(){this.io.end(),clearTimeout(this.checkDelay),clearTimeout(this.checkTimeout)}checkIfServerUp(){this.checkDelay=setTimeout(()=>{this.io.socket.on("homebridge-status",e=>{(e.status==="up"||e.status==="pending")&&(this.$toastr.success(this.$translate.instant("platform.linux.server_restarted"),this.$translate.instant("toast.title_success")),this.$router.navigate(["/"]))})},3e4),this.checkTimeout=setTimeout(()=>{this.$toastr.warning(this.$translate.instant("platform.linux.server_taking_long_time"),this.$translate.instant("toast.title_warning"),{timeOut:1e4}),this.timeout=!0},12e4)}static \u0275fac=function(p){return new(p||t)};static \u0275cmp=h({type:t,selectors:[["ng-component"]],decls:14,vars:8,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-fw","fa-power-off",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"alert","alert-error","my-4"],[1,"alert","alert-warning","my-4"],[1,"grey-text"],[1,"justify-content-center","my-4"],[1,"restart-progress-box","primary-text"],[1,"fas","fa-fw","fa-spinner","fa-spin"]],template:function(p,x){p&1&&(r(0,"div",0)(1,"h3",1),a(2),m(3,"translate"),i()(),r(4,"div",2)(5,"div",3),f(6,"i",4),i(),r(7,"div",5)(8,"h4",6),a(9),m(10,"translate"),i(),c(11,T,2,1,"div",7)(12,C,6,3),c(13,k,3,3,"div",8),i()()),p&2&&(n(2),s(l(3,4,"menu.restart.title")),n(7),s(l(10,6,"platform.linux.restarting_server")),n(2),d(x.error?11:12),n(2),d(x.timeout?13:-1))},dependencies:[_],styles:[".restart-progress-box[_ngcontent-%COMP%]{font-size:22px;font-weight:300;margin-top:15px}"]})}return t})();export{z as RestartLinuxComponent};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{A as Z,c as G,d as k,e as j,f as D,g as K,j as $,m as A,p as J,q as Q,w as X,z as Y}from"./chunk-WFYBML4S.js";import{a as ae}from"./chunk-
|
|
1
|
+
import{A as Z,c as G,d as k,e as j,f as D,g as K,j as $,m as A,p as J,q as Q,w as X,z as Y}from"./chunk-WFYBML4S.js";import{a as ae}from"./chunk-42ME5L3R.js";import{b as oe}from"./chunk-QR4VLNDI.js";import{b as re}from"./chunk-6Y2OAEVG.js";import{k as ie,m as U,n as ne}from"./chunk-K6OAGSPQ.js";import{a as ee,b as te}from"./chunk-R3563DDE.js";import{l as q}from"./chunk-Q4CZ7LVK.js";import{Cc as L,Dc as B,Ec as E,Hb as M,Hc as a,Ib as z,Ic as s,Jb as T,Ob as m,Pb as o,Qb as r,Rb as u,Xa as W,_b as I,ab as n,bc as x,dc as _,h as S,id as H,la as w,ld as N,mb as V,nc as O,qc as l,ra as C,rc as f,sa as b,sc as g,w as h,zd as R}from"./chunk-ULJPS3WS.js";var pe=t=>({background:t}),de=t=>({anim:t}),ce=t=>({"progress-bar-animated":t}),me=()=>["restoring","restarting","restore-complete"],P=(t,d)=>({"is-valid":t,"is-invalid":d});function ue(t,d){if(t&1){let e=I();o(0,"div",5)(1,"h4",6),l(2),a(3,"translate"),r(),u(4,"div",7),a(5,"translate"),o(6,"button",8),x("click",function(){C(e);let i=_();return b(i.onClickGettingStarted())}),l(7),a(8,"translate"),r(),o(9,"a",9),x("click",function(){C(e);let i=_();return b(i.onClickRestoreBackup())}),l(10),a(11,"translate"),r()()}t&2&&(n(2),f(s(3,4,"setup.welcome_to_homebridge")),n(2),m("innerHTML",s(5,6,"setup.intro"),W),n(3),g(" ",s(8,8,"setup.button_get_started")," "),n(3),f(s(11,10,"setup_wizard_restore")))}function ge(t,d){if(t&1){let e=I();o(0,"div",5)(1,"h4",6),l(2),a(3,"translate"),r(),o(4,"div",10),l(5),a(6,"translate"),r(),o(7,"div",11)(8,"form",12),x("ngSubmit",function(){C(e);let i=_();return b(i.createFirstUser())}),o(9,"div",13)(10,"span",14),u(11,"i",15),r(),u(12,"input",16),a(13,"translate"),r(),o(14,"div",13)(15,"span",14),u(16,"i",17),r(),u(17,"input",18),a(18,"translate"),r(),o(19,"div",13)(20,"span",14),u(21,"i",17),r(),u(22,"input",19),a(23,"translate"),r(),o(24,"div",20)(25,"button",21),x("click",function(){C(e);let i=_();return b(i.onClickCancelRestore())}),l(26),a(27,"translate"),r(),o(28,"button",22),l(29),a(30,"translate"),r()()()()()}if(t&2){let e=_();n(2),f(s(3,16,"setup.create_account")),n(3),f(s(6,18,"setup_wizard_create_info")),n(3),m("formGroup",e.createUserForm),n(4),m("readonly",e.loading)("ngClass",E(30,P,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.valid,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.invalid))("placeholder",s(13,20,"users.label_username")),n(5),m("readonly",e.loading)("ngClass",E(33,P,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.valid,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.errors))("placeholder",s(18,22,"users.label_password")),n(5),m("readonly",e.loading)("ngClass",E(36,P,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.valid,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.errors))("placeholder",s(23,24,"users.label_confirm_password")),n(3),m("disabled",e.restoreUploading),n(),g(" ",s(27,26,"form.button_back")," "),n(2),m("disabled",e.createUserForm.invalid||e.loading),n(),g(" ",s(30,28,"form.label_continue")," ")}}function _e(t,d){t&1&&(u(0,"i",25),l(1),a(2,"translate")),t&2&&(n(),g(" ",s(2,1,"backup.label_uploading")," "))}function fe(t,d){t&1&&(l(0),a(1,"translate")),t&2&&g(" ",s(1,1,"form.label_continue")," ")}function he(t,d){if(t&1){let e=I();o(0,"div",5)(1,"h4",6),l(2),a(3,"translate"),r(),o(4,"div",10),l(5),a(6,"translate"),r(),o(7,"input",23),x("change",function(i){C(e);let F=_();return b(F.handleRestoreFileInput(i.target.files))}),r(),o(8,"div",20)(9,"button",21),x("click",function(){C(e);let i=_();return b(i.onClickCancelRestore())}),l(10),a(11,"translate"),r(),o(12,"button",24),x("click",function(){C(e);let i=_();return b(i.onRestoreBackupClick())}),z(13,_e,3,3)(14,fe,2,3),r()()()}if(t&2){let e=_();n(2),f(s(3,6,"setup_wizard_restore")),n(3),f(s(6,8,"backup.restore_help_one")),n(4),m("disabled",e.restoreUploading),n(),g(" ",s(11,10,"form.button_back")," "),n(2),m("disabled",e.restoreUploading||!e.selectedFile),n(),T(e.restoreUploading?13:14)}}function we(t,d){t&1&&(l(0),a(1,"translate")),t&2&&g(" ",s(1,1,"setup_wizard_restoring")," ")}function Ce(t,d){t&1&&(l(0),a(1,"translate")),t&2&&g(" ",s(1,1,"setup_wizard_starting")," ")}function be(t,d){t&1&&(l(0),a(1,"translate")),t&2&&g(" ",s(1,1,"setup_wizard_complete")," ")}function xe(t,d){t&1&&(o(0,"a",27),l(1),a(2,"translate"),r()),t&2&&(n(),g(" ",s(2,1,"form.label_continue")," "))}function ve(t,d){if(t&1&&(o(0,"div",5)(1,"h4",6),z(2,we,2,3)(3,Ce,2,3)(4,be,2,3),r(),u(5,"div",26),z(6,xe,3,3,"a",27),r()),t&2){let e=_();n(2),T(e.step==="restoring"?2:e.step==="restarting"?3:e.step==="restore-complete"?4:-1),n(4),T(e.step==="restore-complete"?6:-1)}}function ye(t,d){t&1&&(o(0,"div",5)(1,"h4",28),l(2),a(3,"translate"),r(),o(4,"div",10),l(5),a(6,"translate"),r(),o(7,"a",29),l(8),a(9,"translate"),r()()),t&2&&(n(2),f(s(3,3,"setup_wizard_complete_title")),n(3),f(s(6,5,"setup_wizard_completed")),n(3),g(" ",s(9,7,"form.label_continue")," "))}var He=(()=>{class t{$api=w(ne);$auth=w(oe);$settings=w(re);$title=w(q);$toastr=w(ie);$translate=w(ee);$ws=w(ae);io;step="welcome";backgroundStyle;progress=1;restoreInProgress=!1;restoreStarted=!1;restoreFailed=!1;loading=!1;selectedFile;restoreUploading=!1;createUserForm=new K({username:new $("",[k.required]),password:new $("",[k.compose([k.required,k.minLength(4)])]),passwordConfirm:new $("",[k.required])},this.matchPassword);ngOnInit(){return S(this,null,function*(){this.$title.setTitle(this.$translate.instant("setup_wizard_page_title")),yield this.setBackground()})}onClickGettingStarted(){this.step="create-account",this.progress=50}onClickRestoreBackup(){this.step="restore-backup",this.progress=20}onClickCancelRestore(){this.selectedFile=null,this.step="welcome",this.progress=1}createFirstUser(){return S(this,null,function*(){this.loading=!0,this.progress=75;let e=this.createUserForm.getRawValue();e.name=e.username;try{yield h(this.$api.post("/setup-wizard/create-first-user",e)),this.$settings.env.setupWizardComplete=!0,this.progress=100,this.loading=!1,yield this.$auth.login({username:e.username,password:e.password}),this.step="setup-complete"}catch(p){this.loading=!1,this.progress=50,console.error(p),this.$toastr.error(p.message,this.$translate.instant("toast.title_error"))}})}handleRestoreFileInput(e){e.length?(this.selectedFile=e[0],this.progress=40):(delete this.selectedFile,this.progress=20)}onRestoreBackupClick(){return S(this,null,function*(){this.restoreUploading=!0,this.step="restoring",this.progress=60;try{let e=yield h(this.$api.get("/setup-wizard/get-setup-wizard-token"));window.localStorage.setItem(U.jwt.tokenKey,e.access_token),this.$auth.token=e.access_token,this.progress=65;let p=new FormData;p.append("restoreArchive",this.selectedFile,this.selectedFile.name),yield h(this.$api.post("/backup/restore",p)),this.progress=70,this.io=this.$ws.connectToNamespace("backup");let i=document.getElementById("output");this.io.socket.on("stdout",c=>{c.split(`
|
|
2
2
|
\r`).forEach(v=>{if(v&&!/^[⠇⠏⠋⠙⠹⠸]+$/.test(v)){let y=document.createElement("div"),le=/\x1B\[(\d{1,2}(;\d{1,2})?)?[mGK]/g;y.innerHTML=v.replace(le,""),v.includes("[0;31m")?y.classList.add("red-text"):v.includes("[0;32m")?y.classList.add("green-text"):v.includes("[0;33m")?y.classList.add("orange-text"):v.includes("[0;36m")&&y.classList.add("cyan-text"),i.appendChild(y),i.scrollTop=i.scrollHeight}})}),this.restoreStarted=!0,this.restoreInProgress=!0,this.progress=75,yield h(this.io.request("do-restore")),this.progress=80,this.restoreInProgress=!1,yield h(this.$api.put("/backup/restart",{})),this.step="restarting",this.progress=85,window.localStorage.removeItem(U.jwt.tokenKey),this.$auth.token=null;let F=document.createElement("div");F.classList.add("orange-text"),F.innerHTML="Starting Homebridge, please wait...",i.appendChild(F),i.scrollTop=i.scrollHeight,yield new Promise(c=>setTimeout(c,3e3)),this.progress=88,yield new Promise(c=>setTimeout(c,3e3)),this.progress=91,yield new Promise(c=>setTimeout(c,3e3)),this.progress=94,yield new Promise(c=>setTimeout(c,3e3)),this.progress=97,yield new Promise(c=>setTimeout(c,3e3)),this.progress=99;let se=setInterval(()=>S(this,null,function*(){try{yield h(this.$api.get("/auth/settings")),clearInterval(se),this.progress=100,this.restoreUploading=!1,this.step="restore-complete"}catch{}}),1e3)}catch(e){console.error(e),this.restoreUploading=!1,this.restoreFailed=!0,this.progress=20,this.step="restore-backup",this.$toastr.error(e.message,this.$translate.instant("toast.title_error"))}finally{this.io&&this.io.end()}})}setBackground(){return S(this,null,function*(){if(this.$settings.settingsLoaded||(yield h(this.$settings.onSettingsLoaded)),this.$settings.env.customWallpaperHash){let e=`${U.api.base}/auth/wallpaper/${this.$settings.env.customWallpaperHash}`;this.backgroundStyle=`url('${e}') center/cover`}})}matchPassword(e){let p=e.get("password").value,i=e.get("passwordConfirm").value;if(p!==i)e.get("passwordConfirm").setErrors({matchPassword:!0});else return null}static \u0275fac=function(p){return new(p||t)};static \u0275cmp=V({type:t,selectors:[["ng-component"]],decls:10,vars:14,consts:[[1,"setup-container","gradient","d-flex","align-items-start","justify-content-center",3,"ngStyle","ngClass"],[1,"w-100","setup-card","d-flex","py-4","flex-column"],["ngSrc","/assets/homebridge-color-round.svg","alt","Homebridge Logo","height","100","width","100","priority","true",1,"homebridge-logo","mx-auto","my-3"],[1,"progress","w-100","my-4"],["role","progressbar","aria-valuemin","0","aria-valuemax","100",1,"progress-bar","progress-bar-striped","bg-success",3,"ngClass"],[1,"w-100","d-flex","flex-column","align-items-center","mb-2"],[1,"mb-3","text-center"],[1,"mb-4","small","grey-text","text-center",3,"innerHTML"],["type","button",1,"btn","btn-lg","btn-primary","mb-4",3,"click"],["href","javascript:void(0)",1,"grey-text",3,"click"],[1,"mb-4","small","grey-text","text-center"],[1,"w-100"],["novalidate","",3,"ngSubmit","formGroup"],[1,"input-group","mb-4"],[1,"input-group-text","custom-input"],[1,"fas","fa-fw","fa-user","primary-text","fa-lg"],["formControlName","username","type","text","id","form-username","autocomplete","username","autocapitalize","none","tabindex","1","required","",1,"form-control","custom-input",3,"readonly","ngClass","placeholder"],[1,"fas","fa-fw","fa-lock","primary-text","fa-lg"],["formControlName","password","type","password","id","form-pass","autocomplete","new-password","tabindex","2","required","",1,"form-control","custom-input",3,"readonly","ngClass","placeholder"],["formControlName","passwordConfirm","type","password","id","form-pass-confirm","autocomplete","new-password","tabindex","2","required","",1,"form-control","custom-input",3,"readonly","ngClass","placeholder"],[1,"mt-3","w-100","d-flex","justify-content-between"],["type","button",1,"btn","btn-elegant","ms-0",3,"click","disabled"],["type","submit",1,"btn","btn-primary",3,"disabled"],["type","file","id","restoreFileUpload","accept","application/gzip, .gz",1,"form-control","custom-input","mb-3",3,"change"],["type","button",1,"btn","btn-primary","me-0",3,"click","disabled"],[1,"fas","fa-fw","fa-spinner","fa-pulse"],["id","output",1,"font-monospace","small","alert","alert-info","w-100","text-start","mt-1","mb-0"],["href","/login",1,"btn","btn-lg","btn-primary","mt-4"],[1,"mb-3"],["href","/",1,"btn","btn-lg","btn-primary"]],template:function(p,i){p&1&&(o(0,"div",0)(1,"div",1),u(2,"img",2),o(3,"div",3),u(4,"div",4),r(),z(5,ue,12,12,"div",5)(6,ge,31,39,"div",5)(7,he,15,12,"div",5)(8,ve,7,2,"div",5)(9,ye,10,9,"div",5),r()()),p&2&&(m("ngStyle",B(7,pe,i.backgroundStyle))("ngClass",B(9,de,!i.backgroundStyle)),n(4),O("width",i.progress+"%"),m("ngClass",B(11,ce,i.loading||i.restoreUploading)),M("aria-valuenow",i.progress),n(),T(i.step==="welcome"?5:i.step==="create-account"?6:i.step==="restore-backup"?7:L(13,me).includes(i.step)?8:i.step==="setup-complete"?9:-1))},dependencies:[H,R,Y,A,G,j,D,X,Z,J,Q,N,te],styles:["body{overflow:scroll!important} body.dark-mode .setup-card{background-color:#2b2b2b;color:#fff}.setup-container[_ngcontent-%COMP%]{z-index:-1;padding-top:2em;padding-bottom:2em;min-height:100%;background-size:300% 300%}.anim[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_gradient 20s ease infinite;-moz-animation:gradient 20s ease infinite;-o-animation:gradient 20s ease infinite;animation:_ngcontent-%COMP%_gradient 20s ease infinite}@keyframes _ngcontent-%COMP%_gradient{0%{background-position:0 50%}50%{background-position:100% 50%}to{background-position:0 50%}}.setup-card[_ngcontent-%COMP%]{max-width:550px;border-radius:1rem;padding-right:25px;padding-left:25px;background-color:#ffffffe6}.setup-card[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{background-color:inherit!important}@media screen and (max-width: 575px){.setup-card[_ngcontent-%COMP%]{margin-left:1em;margin-right:1em}}.homebridge-logo[_ngcontent-%COMP%]{margin-bottom:10px}.progress[_ngcontent-%COMP%]{background-color:#ddd}#output[_ngcontent-%COMP%]{height:200px;overflow-y:scroll;white-space:pre-wrap}"]})}return t})();export{He as SetupWizardComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as _i,b as r2}from"./chunk-WDFAWIMZ.js";import{a as qf}from"./chunk-HUAADM2I.js";import{a as Bf}from"./chunk-THGDS273.js";import{a as zf,b as lo}from"./chunk-RIHLYE6G.js";import{a as Lf,b as Uf}from"./chunk-BG5MCCBU.js";import{a as Rf}from"./chunk-QIOCGI3G.js";import{a as Qa,b as is}from"./chunk-EI76KND2.js";import{a as es,b as ts}from"./chunk-J7Q5BUJW.js";import{a as Vf}from"./chunk-CHYWVK3W.js";import{a as Ka,b as Ga,c as Ja,d as Xa,e as Ya,f as Za,g as rr,m as Oe,n as ot,o as Df,p as Af,q as Nf,r as jf,s as Ff,t as or}from"./chunk-C3HWKB2Q.js";import{A as so,a as If,b as Yi,c as ir,e as $t,f as $f,h as Ef,i as Tf,j as Pf,k as Of,l as Zi,m as Mf,o as Qi,r as nr,s as On,t as Mn,y as kf,z as oi}from"./chunk-WFYBML4S.js";import{a as tn}from"./chunk-PPYAK5PR.js";import{d as yi}from"./chunk-GEIS2BWE.js";import{b as Re}from"./chunk-3ZGLL37E.js";import{k as Ce,m as en,n as ve}from"./chunk-M7JEOWNA.js";import{a as xe,b as Me}from"./chunk-R3563DDE.js";import{e as Sf}from"./chunk-Q4CZ7LVK.js";import{$a as mf,Ac as vf,Bc as xf,Ca as Wi,Cc as Pe,D as uf,Da as ff,Dc as ri,Ec as Tn,Fa as Qn,Fc as Wt,Gc as tr,Hb as G,Hc as w,Ib as E,Ic as I,Jb as T,Jc as He,Lb as at,M as Yn,Mb as st,Nb as lt,Ob as b,Pb as m,Qb as f,Qc as xt,Rb as $,Rc as z,Sb as Qe,Sc as Xi,Tb as rt,Ub as gi,Uc as Cf,Vb as yf,Wb as _f,Xa as he,Z as lu,_b as H,a as X,aa as ao,ab as d,b as $e,bc as q,cc as Ht,dc as y,e as g,fa as cf,fb as Ua,g as ze,ga as Ft,gb as Ti,h as K,ha as Zn,hc as uu,ib as In,ic as cu,id as Kt,ja as df,jc as du,jd as Pn,k as of,ka as pf,kc as Ki,kd as Ct,la as P,lc as Gi,mb as Y,mc as bf,n as jt,nb as er,nc as ni,o as su,ob as $n,oc as Ji,pb as hf,pc as Z,q as af,qc as x,ra as j,rc as R,rd as Wa,sa as F,sb as ue,sc as V,tc as En,ub as gf,uc as Ha,v as sf,vb as za,w as le,x as lf,xc as Ae,yc as Ne,za as La,zc as je,zd as wf}from"./chunk-ULJPS3WS.js";var po=g(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.regexpCode=be.getEsmExportName=be.getProperty=be.safeStringify=be.stringify=be.strConcat=be.addCodeArg=be.str=be._=be.nil=be._Code=be.Name=be.IDENTIFIER=be._CodeOrName=void 0;var uo=class{};be._CodeOrName=uo;be.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var kn=class extends uo{constructor(t){if(super(),!be.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};be.Name=kn;var Gt=class extends uo{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((i,n)=>`${i}${n}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((i,n)=>(n instanceof kn&&(i[n.str]=(i[n.str]||0)+1),i),{})}};be._Code=Gt;be.nil=new Gt("");function Hf(e,...t){let i=[e[0]],n=0;for(;n<t.length;)fu(i,t[n]),i.push(e[++n]);return new Gt(i)}be._=Hf;var pu=new Gt("+");function Wf(e,...t){let i=[co(e[0])],n=0;for(;n<t.length;)i.push(pu),fu(i,t[n]),i.push(pu,co(e[++n]));return a2(i),new Gt(i)}be.str=Wf;function fu(e,t){t instanceof Gt?e.push(...t._items):t instanceof kn?e.push(t):e.push(u2(t))}be.addCodeArg=fu;function a2(e){let t=1;for(;t<e.length-1;){if(e[t]===pu){let i=s2(e[t-1],e[t+1]);if(i!==void 0){e.splice(t-1,3,i);continue}e[t++]="+"}t++}}function s2(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof kn||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof kn))return`"${e}${t.slice(1)}`}function l2(e,t){return t.emptyStr()?e:e.emptyStr()?t:Wf`${e}${t}`}be.strConcat=l2;function u2(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:co(Array.isArray(e)?e.join(","):e)}function c2(e){return new Gt(co(e))}be.stringify=c2;function co(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}be.safeStringify=co;function d2(e){return typeof e=="string"&&be.IDENTIFIER.test(e)?new Gt(`.${e}`):Hf`[${e}]`}be.getProperty=d2;function p2(e){if(typeof e=="string"&&be.IDENTIFIER.test(e))return new Gt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}be.getEsmExportName=p2;function f2(e){return new Gt(e.toString())}be.regexpCode=f2});var gu=g(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.ValueScope=Tt.ValueScopeName=Tt.Scope=Tt.varKinds=Tt.UsedValueState=void 0;var Et=po(),mu=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},ns=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(ns||(Tt.UsedValueState=ns={}));Tt.varKinds={const:new Et.Name("const"),let:new Et.Name("let"),var:new Et.Name("var")};var rs=class{constructor({prefixes:t,parent:i}={}){this._names={},this._prefixes=t,this._parent=i}toName(t){return t instanceof Et.Name?t:this.name(t)}name(t){return new Et.Name(this._newName(t))}_newName(t){let i=this._names[t]||this._nameGroup(t);return`${t}${i.index++}`}_nameGroup(t){var i,n;if(!((n=(i=this._parent)===null||i===void 0?void 0:i._prefixes)===null||n===void 0)&&n.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};Tt.Scope=rs;var os=class extends Et.Name{constructor(t,i){super(i),this.prefix=t}setValue(t,{property:i,itemIndex:n}){this.value=t,this.scopePath=(0,Et._)`.${new Et.Name(i)}[${n}]`}};Tt.ValueScopeName=os;var m2=(0,Et._)`\n`,hu=class extends rs{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts=$e(X({},t),{_n:t.lines?m2:Et.nil})}get(){return this._scope}name(t){return new os(t,this._newName(t))}value(t,i){var n;if(i.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let r=this.toName(t),{prefix:o}=r,a=(n=i.key)!==null&&n!==void 0?n:i.ref,s=this._values[o];if(s){let c=s.get(a);if(c)return c}else s=this._values[o]=new Map;s.set(a,r);let l=this._scope[o]||(this._scope[o]=[]),u=l.length;return l[u]=i.ref,r.setValue(i,{property:o,itemIndex:u}),r}getValue(t,i){let n=this._values[t];if(n)return n.get(i)}scopeRefs(t,i=this._values){return this._reduceValues(i,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Et._)`${t}${n.scopePath}`})}scopeCode(t=this._values,i,n){return this._reduceValues(t,r=>{if(r.value===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return r.value.code},i,n)}_reduceValues(t,i,n={},r){let o=Et.nil;for(let a in t){let s=t[a];if(!s)continue;let l=n[a]=n[a]||new Map;s.forEach(u=>{if(l.has(u))return;l.set(u,ns.Started);let c=i(u);if(c){let p=this.opts.es5?Tt.varKinds.var:Tt.varKinds.const;o=(0,Et._)`${o}${p} ${u} = ${c};${this.opts._n}`}else if(c=r?.(u))o=(0,Et._)`${o}${c}${this.opts._n}`;else throw new mu(u);l.set(u,ns.Completed)})}return o}};Tt.ValueScope=hu});var ee=g(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.or=ce.and=ce.not=ce.CodeGen=ce.operators=ce.varKinds=ce.ValueScopeName=ce.ValueScope=ce.Scope=ce.Name=ce.regexpCode=ce.stringify=ce.getProperty=ce.nil=ce.strConcat=ce.str=ce._=void 0;var ge=po(),ai=gu(),nn=po();Object.defineProperty(ce,"_",{enumerable:!0,get:function(){return nn._}});Object.defineProperty(ce,"str",{enumerable:!0,get:function(){return nn.str}});Object.defineProperty(ce,"strConcat",{enumerable:!0,get:function(){return nn.strConcat}});Object.defineProperty(ce,"nil",{enumerable:!0,get:function(){return nn.nil}});Object.defineProperty(ce,"getProperty",{enumerable:!0,get:function(){return nn.getProperty}});Object.defineProperty(ce,"stringify",{enumerable:!0,get:function(){return nn.stringify}});Object.defineProperty(ce,"regexpCode",{enumerable:!0,get:function(){return nn.regexpCode}});Object.defineProperty(ce,"Name",{enumerable:!0,get:function(){return nn.Name}});var cs=gu();Object.defineProperty(ce,"Scope",{enumerable:!0,get:function(){return cs.Scope}});Object.defineProperty(ce,"ValueScope",{enumerable:!0,get:function(){return cs.ValueScope}});Object.defineProperty(ce,"ValueScopeName",{enumerable:!0,get:function(){return cs.ValueScopeName}});Object.defineProperty(ce,"varKinds",{enumerable:!0,get:function(){return cs.varKinds}});ce.operators={GT:new ge._Code(">"),GTE:new ge._Code(">="),LT:new ge._Code("<"),LTE:new ge._Code("<="),EQ:new ge._Code("==="),NEQ:new ge._Code("!=="),NOT:new ge._Code("!"),OR:new ge._Code("||"),AND:new ge._Code("&&"),ADD:new ge._Code("+")};var Pi=class{optimizeNodes(){return this}optimizeNames(t,i){return this}},yu=class extends Pi{constructor(t,i,n){super(),this.varKind=t,this.name=i,this.rhs=n}render({es5:t,_n:i}){let n=t?ai.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${r};`+i}optimizeNames(t,i){if(t[this.name.str])return this.rhs&&(this.rhs=sr(this.rhs,t,i)),this}get names(){return this.rhs instanceof ge._CodeOrName?this.rhs.names:{}}},ss=class extends Pi{constructor(t,i,n){super(),this.lhs=t,this.rhs=i,this.sideEffects=n}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,i){if(!(this.lhs instanceof ge.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=sr(this.rhs,t,i),this}get names(){let t=this.lhs instanceof ge.Name?{}:X({},this.lhs.names);return us(t,this.rhs)}},_u=class extends ss{constructor(t,i,n,r){super(t,n,r),this.op=i}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},bu=class extends Pi{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},vu=class extends Pi{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},xu=class extends Pi{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},Cu=class extends Pi{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,i){return this.code=sr(this.code,t,i),this}get names(){return this.code instanceof ge._CodeOrName?this.code.names:{}}},fo=class extends Pi{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((i,n)=>i+n.render(t),"")}optimizeNodes(){let{nodes:t}=this,i=t.length;for(;i--;){let n=t[i].optimizeNodes();Array.isArray(n)?t.splice(i,1,...n):n?t[i]=n:t.splice(i,1)}return t.length>0?this:void 0}optimizeNames(t,i){let{nodes:n}=this,r=n.length;for(;r--;){let o=n[r];o.optimizeNames(t,i)||(h2(t,o.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,i)=>Dn(t,i.names),{})}},Oi=class extends fo{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},wu=class extends fo{},Su=(()=>{class e extends Oi{}return e.kind="else",e})(),as=(()=>{class e extends Oi{constructor(i,n){super(n),this.condition=i}render(i){let n=`if(${this.condition})`+super.render(i);return this.else&&(n+="else "+this.else.render(i)),n}optimizeNodes(){super.optimizeNodes();let i=this.condition;if(i===!0)return this.nodes;let n=this.else;if(n){let r=n.optimizeNodes();n=this.else=Array.isArray(r)?new Su(r):r}if(n)return i===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(Yf(i),n instanceof e?[n]:n.nodes);if(!(i===!1||!this.nodes.length))return this}optimizeNames(i,n){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(i,n),!!(super.optimizeNames(i,n)||this.else))return this.condition=sr(this.condition,i,n),this}get names(){let i=super.names;return us(i,this.condition),this.else&&Dn(i,this.else.names),i}}return e.kind="if",e})(),ds=(()=>{class e extends Oi{}return e.kind="for",e})(),Iu=class extends ds{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,i){if(super.optimizeNames(t,i))return this.iteration=sr(this.iteration,t,i),this}get names(){return Dn(super.names,this.iteration.names)}},$u=class extends ds{constructor(t,i,n,r){super(),this.varKind=t,this.name=i,this.from=n,this.to=r}render(t){let i=t.es5?ai.varKinds.var:this.varKind,{name:n,from:r,to:o}=this;return`for(${i} ${n}=${r}; ${n}<${o}; ${n}++)`+super.render(t)}get names(){let t=us(super.names,this.from);return us(t,this.to)}},ls=class extends ds{constructor(t,i,n,r){super(),this.loop=t,this.varKind=i,this.name=n,this.iterable=r}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,i){if(super.optimizeNames(t,i))return this.iterable=sr(this.iterable,t,i),this}get names(){return Dn(super.names,this.iterable.names)}},Kf=(()=>{class e extends Oi{constructor(i,n,r){super(),this.name=i,this.args=n,this.async=r}render(i){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(i)}}return e.kind="func",e})(),Gf=(()=>{class e extends fo{render(i){return"return "+super.render(i)}}return e.kind="return",e})(),Eu=class extends Oi{render(t){let i="try"+super.render(t);return this.catch&&(i+=this.catch.render(t)),this.finally&&(i+=this.finally.render(t)),i}optimizeNodes(){var t,i;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(i=this.finally)===null||i===void 0||i.optimizeNodes(),this}optimizeNames(t,i){var n,r;return super.optimizeNames(t,i),(n=this.catch)===null||n===void 0||n.optimizeNames(t,i),(r=this.finally)===null||r===void 0||r.optimizeNames(t,i),this}get names(){let t=super.names;return this.catch&&Dn(t,this.catch.names),this.finally&&Dn(t,this.finally.names),t}},Jf=(()=>{class e extends Oi{constructor(i){super(),this.error=i}render(i){return`catch(${this.error})`+super.render(i)}}return e.kind="catch",e})(),Xf=(()=>{class e extends Oi{render(i){return"finally"+super.render(i)}}return e.kind="finally",e})(),Tu=class{constructor(t,i={}){this._values={},this._blockStarts=[],this._constants={},this.opts=$e(X({},i),{_n:i.lines?`
|
|
1
|
+
import{a as _i,b as r2}from"./chunk-WDFAWIMZ.js";import{a as qf}from"./chunk-HUAADM2I.js";import{a as Bf}from"./chunk-THGDS273.js";import{a as zf,b as lo}from"./chunk-RPHC6QJY.js";import{a as Lf,b as Uf}from"./chunk-BG5MCCBU.js";import{a as Rf}from"./chunk-QIOCGI3G.js";import{a as Qa,b as is}from"./chunk-EI76KND2.js";import{a as es,b as ts}from"./chunk-J7Q5BUJW.js";import{a as Vf}from"./chunk-CHYWVK3W.js";import{a as Ka,b as Ga,c as Ja,d as Xa,e as Ya,f as Za,g as rr,m as Oe,n as ot,o as Df,p as Af,q as Nf,r as jf,s as Ff,t as or}from"./chunk-C3HWKB2Q.js";import{A as so,a as If,b as Yi,c as ir,e as $t,f as $f,h as Ef,i as Tf,j as Pf,k as Of,l as Zi,m as Mf,o as Qi,r as nr,s as On,t as Mn,y as kf,z as oi}from"./chunk-WFYBML4S.js";import{a as tn}from"./chunk-42ME5L3R.js";import{d as yi}from"./chunk-GEIS2BWE.js";import{b as Re}from"./chunk-6Y2OAEVG.js";import{k as Ce,m as en,n as ve}from"./chunk-K6OAGSPQ.js";import{a as xe,b as Me}from"./chunk-R3563DDE.js";import{e as Sf}from"./chunk-Q4CZ7LVK.js";import{$a as mf,Ac as vf,Bc as xf,Ca as Wi,Cc as Pe,D as uf,Da as ff,Dc as ri,Ec as Tn,Fa as Qn,Fc as Wt,Gc as tr,Hb as G,Hc as w,Ib as E,Ic as I,Jb as T,Jc as He,Lb as at,M as Yn,Mb as st,Nb as lt,Ob as b,Pb as m,Qb as f,Qc as xt,Rb as $,Rc as z,Sb as Qe,Sc as Xi,Tb as rt,Ub as gi,Uc as Cf,Vb as yf,Wb as _f,Xa as he,Z as lu,_b as H,a as X,aa as ao,ab as d,b as $e,bc as q,cc as Ht,dc as y,e as g,fa as cf,fb as Ua,g as ze,ga as Ft,gb as Ti,h as K,ha as Zn,hc as uu,ib as In,ic as cu,id as Kt,ja as df,jc as du,jd as Pn,k as of,ka as pf,kc as Ki,kd as Ct,la as P,lc as Gi,mb as Y,mc as bf,n as jt,nb as er,nc as ni,o as su,ob as $n,oc as Ji,pb as hf,pc as Z,q as af,qc as x,ra as j,rc as R,rd as Wa,sa as F,sb as ue,sc as V,tc as En,ub as gf,uc as Ha,v as sf,vb as za,w as le,x as lf,xc as Ae,yc as Ne,za as La,zc as je,zd as wf}from"./chunk-ULJPS3WS.js";var po=g(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.regexpCode=be.getEsmExportName=be.getProperty=be.safeStringify=be.stringify=be.strConcat=be.addCodeArg=be.str=be._=be.nil=be._Code=be.Name=be.IDENTIFIER=be._CodeOrName=void 0;var uo=class{};be._CodeOrName=uo;be.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var kn=class extends uo{constructor(t){if(super(),!be.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};be.Name=kn;var Gt=class extends uo{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((i,n)=>`${i}${n}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((i,n)=>(n instanceof kn&&(i[n.str]=(i[n.str]||0)+1),i),{})}};be._Code=Gt;be.nil=new Gt("");function Hf(e,...t){let i=[e[0]],n=0;for(;n<t.length;)fu(i,t[n]),i.push(e[++n]);return new Gt(i)}be._=Hf;var pu=new Gt("+");function Wf(e,...t){let i=[co(e[0])],n=0;for(;n<t.length;)i.push(pu),fu(i,t[n]),i.push(pu,co(e[++n]));return a2(i),new Gt(i)}be.str=Wf;function fu(e,t){t instanceof Gt?e.push(...t._items):t instanceof kn?e.push(t):e.push(u2(t))}be.addCodeArg=fu;function a2(e){let t=1;for(;t<e.length-1;){if(e[t]===pu){let i=s2(e[t-1],e[t+1]);if(i!==void 0){e.splice(t-1,3,i);continue}e[t++]="+"}t++}}function s2(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof kn||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof kn))return`"${e}${t.slice(1)}`}function l2(e,t){return t.emptyStr()?e:e.emptyStr()?t:Wf`${e}${t}`}be.strConcat=l2;function u2(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:co(Array.isArray(e)?e.join(","):e)}function c2(e){return new Gt(co(e))}be.stringify=c2;function co(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}be.safeStringify=co;function d2(e){return typeof e=="string"&&be.IDENTIFIER.test(e)?new Gt(`.${e}`):Hf`[${e}]`}be.getProperty=d2;function p2(e){if(typeof e=="string"&&be.IDENTIFIER.test(e))return new Gt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}be.getEsmExportName=p2;function f2(e){return new Gt(e.toString())}be.regexpCode=f2});var gu=g(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.ValueScope=Tt.ValueScopeName=Tt.Scope=Tt.varKinds=Tt.UsedValueState=void 0;var Et=po(),mu=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},ns=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(ns||(Tt.UsedValueState=ns={}));Tt.varKinds={const:new Et.Name("const"),let:new Et.Name("let"),var:new Et.Name("var")};var rs=class{constructor({prefixes:t,parent:i}={}){this._names={},this._prefixes=t,this._parent=i}toName(t){return t instanceof Et.Name?t:this.name(t)}name(t){return new Et.Name(this._newName(t))}_newName(t){let i=this._names[t]||this._nameGroup(t);return`${t}${i.index++}`}_nameGroup(t){var i,n;if(!((n=(i=this._parent)===null||i===void 0?void 0:i._prefixes)===null||n===void 0)&&n.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};Tt.Scope=rs;var os=class extends Et.Name{constructor(t,i){super(i),this.prefix=t}setValue(t,{property:i,itemIndex:n}){this.value=t,this.scopePath=(0,Et._)`.${new Et.Name(i)}[${n}]`}};Tt.ValueScopeName=os;var m2=(0,Et._)`\n`,hu=class extends rs{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts=$e(X({},t),{_n:t.lines?m2:Et.nil})}get(){return this._scope}name(t){return new os(t,this._newName(t))}value(t,i){var n;if(i.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let r=this.toName(t),{prefix:o}=r,a=(n=i.key)!==null&&n!==void 0?n:i.ref,s=this._values[o];if(s){let c=s.get(a);if(c)return c}else s=this._values[o]=new Map;s.set(a,r);let l=this._scope[o]||(this._scope[o]=[]),u=l.length;return l[u]=i.ref,r.setValue(i,{property:o,itemIndex:u}),r}getValue(t,i){let n=this._values[t];if(n)return n.get(i)}scopeRefs(t,i=this._values){return this._reduceValues(i,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Et._)`${t}${n.scopePath}`})}scopeCode(t=this._values,i,n){return this._reduceValues(t,r=>{if(r.value===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return r.value.code},i,n)}_reduceValues(t,i,n={},r){let o=Et.nil;for(let a in t){let s=t[a];if(!s)continue;let l=n[a]=n[a]||new Map;s.forEach(u=>{if(l.has(u))return;l.set(u,ns.Started);let c=i(u);if(c){let p=this.opts.es5?Tt.varKinds.var:Tt.varKinds.const;o=(0,Et._)`${o}${p} ${u} = ${c};${this.opts._n}`}else if(c=r?.(u))o=(0,Et._)`${o}${c}${this.opts._n}`;else throw new mu(u);l.set(u,ns.Completed)})}return o}};Tt.ValueScope=hu});var ee=g(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.or=ce.and=ce.not=ce.CodeGen=ce.operators=ce.varKinds=ce.ValueScopeName=ce.ValueScope=ce.Scope=ce.Name=ce.regexpCode=ce.stringify=ce.getProperty=ce.nil=ce.strConcat=ce.str=ce._=void 0;var ge=po(),ai=gu(),nn=po();Object.defineProperty(ce,"_",{enumerable:!0,get:function(){return nn._}});Object.defineProperty(ce,"str",{enumerable:!0,get:function(){return nn.str}});Object.defineProperty(ce,"strConcat",{enumerable:!0,get:function(){return nn.strConcat}});Object.defineProperty(ce,"nil",{enumerable:!0,get:function(){return nn.nil}});Object.defineProperty(ce,"getProperty",{enumerable:!0,get:function(){return nn.getProperty}});Object.defineProperty(ce,"stringify",{enumerable:!0,get:function(){return nn.stringify}});Object.defineProperty(ce,"regexpCode",{enumerable:!0,get:function(){return nn.regexpCode}});Object.defineProperty(ce,"Name",{enumerable:!0,get:function(){return nn.Name}});var cs=gu();Object.defineProperty(ce,"Scope",{enumerable:!0,get:function(){return cs.Scope}});Object.defineProperty(ce,"ValueScope",{enumerable:!0,get:function(){return cs.ValueScope}});Object.defineProperty(ce,"ValueScopeName",{enumerable:!0,get:function(){return cs.ValueScopeName}});Object.defineProperty(ce,"varKinds",{enumerable:!0,get:function(){return cs.varKinds}});ce.operators={GT:new ge._Code(">"),GTE:new ge._Code(">="),LT:new ge._Code("<"),LTE:new ge._Code("<="),EQ:new ge._Code("==="),NEQ:new ge._Code("!=="),NOT:new ge._Code("!"),OR:new ge._Code("||"),AND:new ge._Code("&&"),ADD:new ge._Code("+")};var Pi=class{optimizeNodes(){return this}optimizeNames(t,i){return this}},yu=class extends Pi{constructor(t,i,n){super(),this.varKind=t,this.name=i,this.rhs=n}render({es5:t,_n:i}){let n=t?ai.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${r};`+i}optimizeNames(t,i){if(t[this.name.str])return this.rhs&&(this.rhs=sr(this.rhs,t,i)),this}get names(){return this.rhs instanceof ge._CodeOrName?this.rhs.names:{}}},ss=class extends Pi{constructor(t,i,n){super(),this.lhs=t,this.rhs=i,this.sideEffects=n}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,i){if(!(this.lhs instanceof ge.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=sr(this.rhs,t,i),this}get names(){let t=this.lhs instanceof ge.Name?{}:X({},this.lhs.names);return us(t,this.rhs)}},_u=class extends ss{constructor(t,i,n,r){super(t,n,r),this.op=i}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},bu=class extends Pi{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},vu=class extends Pi{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},xu=class extends Pi{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},Cu=class extends Pi{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,i){return this.code=sr(this.code,t,i),this}get names(){return this.code instanceof ge._CodeOrName?this.code.names:{}}},fo=class extends Pi{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((i,n)=>i+n.render(t),"")}optimizeNodes(){let{nodes:t}=this,i=t.length;for(;i--;){let n=t[i].optimizeNodes();Array.isArray(n)?t.splice(i,1,...n):n?t[i]=n:t.splice(i,1)}return t.length>0?this:void 0}optimizeNames(t,i){let{nodes:n}=this,r=n.length;for(;r--;){let o=n[r];o.optimizeNames(t,i)||(h2(t,o.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,i)=>Dn(t,i.names),{})}},Oi=class extends fo{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},wu=class extends fo{},Su=(()=>{class e extends Oi{}return e.kind="else",e})(),as=(()=>{class e extends Oi{constructor(i,n){super(n),this.condition=i}render(i){let n=`if(${this.condition})`+super.render(i);return this.else&&(n+="else "+this.else.render(i)),n}optimizeNodes(){super.optimizeNodes();let i=this.condition;if(i===!0)return this.nodes;let n=this.else;if(n){let r=n.optimizeNodes();n=this.else=Array.isArray(r)?new Su(r):r}if(n)return i===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(Yf(i),n instanceof e?[n]:n.nodes);if(!(i===!1||!this.nodes.length))return this}optimizeNames(i,n){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(i,n),!!(super.optimizeNames(i,n)||this.else))return this.condition=sr(this.condition,i,n),this}get names(){let i=super.names;return us(i,this.condition),this.else&&Dn(i,this.else.names),i}}return e.kind="if",e})(),ds=(()=>{class e extends Oi{}return e.kind="for",e})(),Iu=class extends ds{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,i){if(super.optimizeNames(t,i))return this.iteration=sr(this.iteration,t,i),this}get names(){return Dn(super.names,this.iteration.names)}},$u=class extends ds{constructor(t,i,n,r){super(),this.varKind=t,this.name=i,this.from=n,this.to=r}render(t){let i=t.es5?ai.varKinds.var:this.varKind,{name:n,from:r,to:o}=this;return`for(${i} ${n}=${r}; ${n}<${o}; ${n}++)`+super.render(t)}get names(){let t=us(super.names,this.from);return us(t,this.to)}},ls=class extends ds{constructor(t,i,n,r){super(),this.loop=t,this.varKind=i,this.name=n,this.iterable=r}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,i){if(super.optimizeNames(t,i))return this.iterable=sr(this.iterable,t,i),this}get names(){return Dn(super.names,this.iterable.names)}},Kf=(()=>{class e extends Oi{constructor(i,n,r){super(),this.name=i,this.args=n,this.async=r}render(i){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(i)}}return e.kind="func",e})(),Gf=(()=>{class e extends fo{render(i){return"return "+super.render(i)}}return e.kind="return",e})(),Eu=class extends Oi{render(t){let i="try"+super.render(t);return this.catch&&(i+=this.catch.render(t)),this.finally&&(i+=this.finally.render(t)),i}optimizeNodes(){var t,i;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(i=this.finally)===null||i===void 0||i.optimizeNodes(),this}optimizeNames(t,i){var n,r;return super.optimizeNames(t,i),(n=this.catch)===null||n===void 0||n.optimizeNames(t,i),(r=this.finally)===null||r===void 0||r.optimizeNames(t,i),this}get names(){let t=super.names;return this.catch&&Dn(t,this.catch.names),this.finally&&Dn(t,this.finally.names),t}},Jf=(()=>{class e extends Oi{constructor(i){super(),this.error=i}render(i){return`catch(${this.error})`+super.render(i)}}return e.kind="catch",e})(),Xf=(()=>{class e extends Oi{render(i){return"finally"+super.render(i)}}return e.kind="finally",e})(),Tu=class{constructor(t,i={}){this._values={},this._blockStarts=[],this._constants={},this.opts=$e(X({},i),{_n:i.lines?`
|
|
2
2
|
`:""}),this._extScope=t,this._scope=new ai.Scope({parent:t}),this._nodes=[new wu]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,i){let n=this._extScope.value(t,i);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,i){return this._extScope.getValue(t,i)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,i,n,r){let o=this._scope.toName(i);return n!==void 0&&r&&(this._constants[o.str]=n),this._leafNode(new yu(t,o,n)),o}const(t,i,n){return this._def(ai.varKinds.const,t,i,n)}let(t,i,n){return this._def(ai.varKinds.let,t,i,n)}var(t,i,n){return this._def(ai.varKinds.var,t,i,n)}assign(t,i,n){return this._leafNode(new ss(t,i,n))}add(t,i){return this._leafNode(new _u(t,ce.operators.ADD,i))}code(t){return typeof t=="function"?t():t!==ge.nil&&this._leafNode(new Cu(t)),this}object(...t){let i=["{"];for(let[n,r]of t)i.length>1&&i.push(","),i.push(n),(n!==r||this.opts.es5)&&(i.push(":"),(0,ge.addCodeArg)(i,r));return i.push("}"),new ge._Code(i)}if(t,i,n){if(this._blockNode(new as(t)),i&&n)this.code(i).else().code(n).endIf();else if(i)this.code(i).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new as(t))}else(){return this._elseNode(new Su)}endIf(){return this._endBlockNode(as,Su)}_for(t,i){return this._blockNode(t),i&&this.code(i).endFor(),this}for(t,i){return this._for(new Iu(t),i)}forRange(t,i,n,r,o=this.opts.es5?ai.varKinds.var:ai.varKinds.let){let a=this._scope.toName(t);return this._for(new $u(o,a,i,n),()=>r(a))}forOf(t,i,n,r=ai.varKinds.const){let o=this._scope.toName(t);if(this.opts.es5){let a=i instanceof ge.Name?i:this.var("_arr",i);return this.forRange("_i",0,(0,ge._)`${a}.length`,s=>{this.var(o,(0,ge._)`${a}[${s}]`),n(o)})}return this._for(new ls("of",r,o,i),()=>n(o))}forIn(t,i,n,r=this.opts.es5?ai.varKinds.var:ai.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,ge._)`Object.keys(${i})`,n);let o=this._scope.toName(t);return this._for(new ls("in",r,o,i),()=>n(o))}endFor(){return this._endBlockNode(ds)}label(t){return this._leafNode(new bu(t))}break(t){return this._leafNode(new vu(t))}return(t){let i=new Gf;if(this._blockNode(i),this.code(t),i.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Gf)}try(t,i,n){if(!i&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let r=new Eu;if(this._blockNode(r),this.code(t),i){let o=this.name("e");this._currNode=r.catch=new Jf(o),i(o)}return n&&(this._currNode=r.finally=new Xf,this.code(n)),this._endBlockNode(Jf,Xf)}throw(t){return this._leafNode(new xu(t))}block(t,i){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(i),this}endBlock(t){let i=this._blockStarts.pop();if(i===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-i;if(n<0||t!==void 0&&n!==t)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${t} expected`);return this._nodes.length=i,this}func(t,i=ge.nil,n,r){return this._blockNode(new Kf(t,i,n)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(Kf)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,i){let n=this._currNode;if(n instanceof t||i&&n instanceof i)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${i?`${t.kind}/${i.kind}`:t.kind}"`)}_elseNode(t){let i=this._currNode;if(!(i instanceof as))throw new Error('CodeGen: "else" without "if"');return this._currNode=i.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let i=this._nodes;i[i.length-1]=t}};ce.CodeGen=Tu;function Dn(e,t){for(let i in t)e[i]=(e[i]||0)+(t[i]||0);return e}function us(e,t){return t instanceof ge._CodeOrName?Dn(e,t.names):e}function sr(e,t,i){if(e instanceof ge.Name)return n(e);if(!r(e))return e;return new ge._Code(e._items.reduce((o,a)=>(a instanceof ge.Name&&(a=n(a)),a instanceof ge._Code?o.push(...a._items):o.push(a),o),[]));function n(o){let a=i[o.str];return a===void 0||t[o.str]!==1?o:(delete t[o.str],a)}function r(o){return o instanceof ge._Code&&o._items.some(a=>a instanceof ge.Name&&t[a.str]===1&&i[a.str]!==void 0)}}function h2(e,t){for(let i in t)e[i]=(e[i]||0)-(t[i]||0)}function Yf(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,ge._)`!${Pu(e)}`}ce.not=Yf;var g2=Zf(ce.operators.AND);function y2(...e){return e.reduce(g2)}ce.and=y2;var _2=Zf(ce.operators.OR);function b2(...e){return e.reduce(_2)}ce.or=b2;function Zf(e){return(t,i)=>t===ge.nil?i:i===ge.nil?t:(0,ge._)`${Pu(t)} ${e} ${Pu(i)}`}function Pu(e){return e instanceof ge.Name?e:(0,ge._)`(${e})`}});var pe=g(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.checkStrictMode=de.getErrorPath=de.Type=de.useFunc=de.setEvaluated=de.evaluatedPropsToName=de.mergeEvaluated=de.eachItem=de.unescapeJsonPointer=de.escapeJsonPointer=de.escapeFragment=de.unescapeFragment=de.schemaRefOrVal=de.schemaHasRulesButRef=de.schemaHasRules=de.checkUnknownRules=de.alwaysValidSchema=de.toHash=void 0;var Ee=ee(),v2=po();function x2(e){let t={};for(let i of e)t[i]=!0;return t}de.toHash=x2;function C2(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(tm(e,t),!im(t,e.self.RULES.all))}de.alwaysValidSchema=C2;function tm(e,t=e.schema){let{opts:i,self:n}=e;if(!i.strictSchema||typeof t=="boolean")return;let r=n.RULES.keywords;for(let o in t)r[o]||om(e,`unknown keyword: "${o}"`)}de.checkUnknownRules=tm;function im(e,t){if(typeof e=="boolean")return!e;for(let i in e)if(t[i])return!0;return!1}de.schemaHasRules=im;function w2(e,t){if(typeof e=="boolean")return!e;for(let i in e)if(i!=="$ref"&&t.all[i])return!0;return!1}de.schemaHasRulesButRef=w2;function S2({topSchemaRef:e,schemaPath:t},i,n,r){if(!r){if(typeof i=="number"||typeof i=="boolean")return i;if(typeof i=="string")return(0,Ee._)`${i}`}return(0,Ee._)`${e}${t}${(0,Ee.getProperty)(n)}`}de.schemaRefOrVal=S2;function I2(e){return nm(decodeURIComponent(e))}de.unescapeFragment=I2;function $2(e){return encodeURIComponent(Mu(e))}de.escapeFragment=$2;function Mu(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}de.escapeJsonPointer=Mu;function nm(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}de.unescapeJsonPointer=nm;function E2(e,t){if(Array.isArray(e))for(let i of e)t(i);else t(e)}de.eachItem=E2;function Qf({mergeNames:e,mergeToName:t,mergeValues:i,resultToName:n}){return(r,o,a,s)=>{let l=a===void 0?o:a instanceof Ee.Name?(o instanceof Ee.Name?e(r,o,a):t(r,o,a),a):o instanceof Ee.Name?(t(r,a,o),o):i(o,a);return s===Ee.Name&&!(l instanceof Ee.Name)?n(r,l):l}}de.mergeEvaluated={props:Qf({mergeNames:(e,t,i)=>e.if((0,Ee._)`${i} !== true && ${t} !== undefined`,()=>{e.if((0,Ee._)`${t} === true`,()=>e.assign(i,!0),()=>e.assign(i,(0,Ee._)`${i} || {}`).code((0,Ee._)`Object.assign(${i}, ${t})`))}),mergeToName:(e,t,i)=>e.if((0,Ee._)`${i} !== true`,()=>{t===!0?e.assign(i,!0):(e.assign(i,(0,Ee._)`${i} || {}`),ku(e,i,t))}),mergeValues:(e,t)=>e===!0?!0:X(X({},e),t),resultToName:rm}),items:Qf({mergeNames:(e,t,i)=>e.if((0,Ee._)`${i} !== true && ${t} !== undefined`,()=>e.assign(i,(0,Ee._)`${t} === true ? true : ${i} > ${t} ? ${i} : ${t}`)),mergeToName:(e,t,i)=>e.if((0,Ee._)`${i} !== true`,()=>e.assign(i,t===!0?!0:(0,Ee._)`${i} > ${t} ? ${i} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function rm(e,t){if(t===!0)return e.var("props",!0);let i=e.var("props",(0,Ee._)`{}`);return t!==void 0&&ku(e,i,t),i}de.evaluatedPropsToName=rm;function ku(e,t,i){Object.keys(i).forEach(n=>e.assign((0,Ee._)`${t}${(0,Ee.getProperty)(n)}`,!0))}de.setEvaluated=ku;var em={};function T2(e,t){return e.scopeValue("func",{ref:t,code:em[t.code]||(em[t.code]=new v2._Code(t.code))})}de.useFunc=T2;var Ou=function(e){return e[e.Num=0]="Num",e[e.Str=1]="Str",e}(Ou||(de.Type=Ou={}));function P2(e,t,i){if(e instanceof Ee.Name){let n=t===Ou.Num;return i?n?(0,Ee._)`"[" + ${e} + "]"`:(0,Ee._)`"['" + ${e} + "']"`:n?(0,Ee._)`"/" + ${e}`:(0,Ee._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return i?(0,Ee.getProperty)(e).toString():"/"+Mu(e)}de.getErrorPath=P2;function om(e,t,i=e.opts.strictSchema){if(i){if(t=`strict mode: ${t}`,i===!0)throw new Error(t);e.self.logger.warn(t)}}de.checkStrictMode=om});var Jt=g(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});var ft=ee(),O2={data:new ft.Name("data"),valCxt:new ft.Name("valCxt"),instancePath:new ft.Name("instancePath"),parentData:new ft.Name("parentData"),parentDataProperty:new ft.Name("parentDataProperty"),rootData:new ft.Name("rootData"),dynamicAnchors:new ft.Name("dynamicAnchors"),vErrors:new ft.Name("vErrors"),errors:new ft.Name("errors"),this:new ft.Name("this"),self:new ft.Name("self"),scope:new ft.Name("scope"),json:new ft.Name("json"),jsonPos:new ft.Name("jsonPos"),jsonLen:new ft.Name("jsonLen"),jsonPart:new ft.Name("jsonPart")};Du.default=O2});var mo=g(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.extendErrors=mt.resetErrorsCount=mt.reportExtraError=mt.reportError=mt.keyword$DataError=mt.keywordError=void 0;var _e=ee(),ps=pe(),wt=Jt();mt.keywordError={message:({keyword:e})=>(0,_e.str)`must pass "${e}" keyword validation`};mt.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,_e.str)`"${e}" keyword must be ${t} ($data)`:(0,_e.str)`"${e}" keyword is invalid ($data)`};function M2(e,t=mt.keywordError,i,n){let{it:r}=e,{gen:o,compositeRule:a,allErrors:s}=r,l=lm(e,t,i);n??(a||s)?am(o,l):sm(r,(0,_e._)`[${l}]`)}mt.reportError=M2;function k2(e,t=mt.keywordError,i){let{it:n}=e,{gen:r,compositeRule:o,allErrors:a}=n,s=lm(e,t,i);am(r,s),o||a||sm(n,wt.default.vErrors)}mt.reportExtraError=k2;function D2(e,t){e.assign(wt.default.errors,t),e.if((0,_e._)`${wt.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,_e._)`${wt.default.vErrors}.length`,t),()=>e.assign(wt.default.vErrors,null)))}mt.resetErrorsCount=D2;function A2({gen:e,keyword:t,schemaValue:i,data:n,errsCount:r,it:o}){if(r===void 0)throw new Error("ajv implementation error");let a=e.name("err");e.forRange("i",r,wt.default.errors,s=>{e.const(a,(0,_e._)`${wt.default.vErrors}[${s}]`),e.if((0,_e._)`${a}.instancePath === undefined`,()=>e.assign((0,_e._)`${a}.instancePath`,(0,_e.strConcat)(wt.default.instancePath,o.errorPath))),e.assign((0,_e._)`${a}.schemaPath`,(0,_e.str)`${o.errSchemaPath}/${t}`),o.opts.verbose&&(e.assign((0,_e._)`${a}.schema`,i),e.assign((0,_e._)`${a}.data`,n))})}mt.extendErrors=A2;function am(e,t){let i=e.const("err",t);e.if((0,_e._)`${wt.default.vErrors} === null`,()=>e.assign(wt.default.vErrors,(0,_e._)`[${i}]`),(0,_e._)`${wt.default.vErrors}.push(${i})`),e.code((0,_e._)`${wt.default.errors}++`)}function sm(e,t){let{gen:i,validateName:n,schemaEnv:r}=e;r.$async?i.throw((0,_e._)`new ${e.ValidationError}(${t})`):(i.assign((0,_e._)`${n}.errors`,t),i.return(!1))}var An={keyword:new _e.Name("keyword"),schemaPath:new _e.Name("schemaPath"),params:new _e.Name("params"),propertyName:new _e.Name("propertyName"),message:new _e.Name("message"),schema:new _e.Name("schema"),parentSchema:new _e.Name("parentSchema")};function lm(e,t,i){let{createErrors:n}=e.it;return n===!1?(0,_e._)`{}`:N2(e,t,i)}function N2(e,t,i={}){let{gen:n,it:r}=e,o=[j2(r,i),F2(e,i)];return q2(e,t,o),n.object(...o)}function j2({errorPath:e},{instancePath:t}){let i=t?(0,_e.str)`${e}${(0,ps.getErrorPath)(t,ps.Type.Str)}`:e;return[wt.default.instancePath,(0,_e.strConcat)(wt.default.instancePath,i)]}function F2({keyword:e,it:{errSchemaPath:t}},{schemaPath:i,parentSchema:n}){let r=n?t:(0,_e.str)`${t}/${e}`;return i&&(r=(0,_e.str)`${r}${(0,ps.getErrorPath)(i,ps.Type.Str)}`),[An.schemaPath,r]}function q2(e,{params:t,message:i},n){let{keyword:r,data:o,schemaValue:a,it:s}=e,{opts:l,propertyName:u,topSchemaRef:c,schemaPath:p}=s;n.push([An.keyword,r],[An.params,typeof t=="function"?t(e):t||(0,_e._)`{}`]),l.messages&&n.push([An.message,typeof i=="function"?i(e):i]),l.verbose&&n.push([An.schema,a],[An.parentSchema,(0,_e._)`${c}${p}`],[wt.default.data,o]),u&&n.push([An.propertyName,u])}});var cm=g(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.boolOrEmptySchema=lr.topBoolOrEmptySchema=void 0;var V2=mo(),B2=ee(),R2=Jt(),L2={message:"boolean schema is false"};function U2(e){let{gen:t,schema:i,validateName:n}=e;i===!1?um(e,!1):typeof i=="object"&&i.$async===!0?t.return(R2.default.data):(t.assign((0,B2._)`${n}.errors`,null),t.return(!0))}lr.topBoolOrEmptySchema=U2;function z2(e,t){let{gen:i,schema:n}=e;n===!1?(i.var(t,!1),um(e)):i.var(t,!0)}lr.boolOrEmptySchema=z2;function um(e,t){let{gen:i,data:n}=e,r={gen:i,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,V2.reportError)(r,L2,void 0,t)}});var Au=g(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.getRules=ur.isJSONType=void 0;var H2=["string","number","integer","boolean","null","object","array"],W2=new Set(H2);function K2(e){return typeof e=="string"&&W2.has(e)}ur.isJSONType=K2;function G2(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:$e(X({},e),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}ur.getRules=G2});var Nu=g(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.shouldUseRule=rn.shouldUseGroup=rn.schemaHasRulesForType=void 0;function J2({schema:e,self:t},i){let n=t.RULES.types[i];return n&&n!==!0&&dm(e,n)}rn.schemaHasRulesForType=J2;function dm(e,t){return t.rules.some(i=>pm(e,i))}rn.shouldUseGroup=dm;function pm(e,t){var i;return e[t.keyword]!==void 0||((i=t.definition.implements)===null||i===void 0?void 0:i.some(n=>e[n]!==void 0))}rn.shouldUseRule=pm});var ho=g(ht=>{"use strict";Object.defineProperty(ht,"__esModule",{value:!0});ht.reportTypeError=ht.checkDataTypes=ht.checkDataType=ht.coerceAndCheckDataType=ht.getJSONTypes=ht.getSchemaTypes=ht.DataType=void 0;var X2=Au(),Y2=Nu(),Z2=mo(),ae=ee(),fm=pe(),cr=function(e){return e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong",e}(cr||(ht.DataType=cr={}));function Q2(e){let t=mm(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}ht.getSchemaTypes=Q2;function mm(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(X2.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}ht.getJSONTypes=mm;function e$(e,t){let{gen:i,data:n,opts:r}=e,o=t$(t,r.coerceTypes),a=t.length>0&&!(o.length===0&&t.length===1&&(0,Y2.schemaHasRulesForType)(e,t[0]));if(a){let s=Fu(t,n,r.strictNumbers,cr.Wrong);i.if(s,()=>{o.length?i$(e,t,o):qu(e)})}return a}ht.coerceAndCheckDataType=e$;var hm=new Set(["string","number","integer","boolean","null"]);function t$(e,t){return t?e.filter(i=>hm.has(i)||t==="array"&&i==="array"):[]}function i$(e,t,i){let{gen:n,data:r,opts:o}=e,a=n.let("dataType",(0,ae._)`typeof ${r}`),s=n.let("coerced",(0,ae._)`undefined`);o.coerceTypes==="array"&&n.if((0,ae._)`${a} == 'object' && Array.isArray(${r}) && ${r}.length == 1`,()=>n.assign(r,(0,ae._)`${r}[0]`).assign(a,(0,ae._)`typeof ${r}`).if(Fu(t,r,o.strictNumbers),()=>n.assign(s,r))),n.if((0,ae._)`${s} !== undefined`);for(let u of i)(hm.has(u)||u==="array"&&o.coerceTypes==="array")&&l(u);n.else(),qu(e),n.endIf(),n.if((0,ae._)`${s} !== undefined`,()=>{n.assign(r,s),n$(e,s)});function l(u){switch(u){case"string":n.elseIf((0,ae._)`${a} == "number" || ${a} == "boolean"`).assign(s,(0,ae._)`"" + ${r}`).elseIf((0,ae._)`${r} === null`).assign(s,(0,ae._)`""`);return;case"number":n.elseIf((0,ae._)`${a} == "boolean" || ${r} === null
|
|
3
3
|
|| (${a} == "string" && ${r} && ${r} == +${r})`).assign(s,(0,ae._)`+${r}`);return;case"integer":n.elseIf((0,ae._)`${a} === "boolean" || ${r} === null
|
|
4
4
|
|| (${a} === "string" && ${r} && ${r} == +${r} && !(${r} % 1))`).assign(s,(0,ae._)`+${r}`);return;case"boolean":n.elseIf((0,ae._)`${r} === "false" || ${r} === 0 || ${r} === null`).assign(s,!1).elseIf((0,ae._)`${r} === "true" || ${r} === 1`).assign(s,!0);return;case"null":n.elseIf((0,ae._)`${r} === "" || ${r} === 0 || ${r} === false`),n.assign(s,null);return;case"array":n.elseIf((0,ae._)`${a} === "string" || ${a} === "number"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-2IUXG2EN.js";import"./chunk-QR4VLNDI.js";import{g as r}from"./chunk-GEIS2BWE.js";import"./chunk-6Y2OAEVG.js";import"./chunk-K6OAGSPQ.js";import"./chunk-R3563DDE.js";import"./chunk-Q4CZ7LVK.js";import{ha as o,nb as e}from"./chunk-ULJPS3WS.js";var c=[{path:"",loadComponent:()=>import("./chunk-ZUYGS2P3.js").then(t=>t.SettingsComponent),canActivate:[n]}],m=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=e({type:t});static \u0275inj=o({imports:[r.forChild(c),r]})}return t})();var l=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=e({type:t});static \u0275inj=o({imports:[m]})}return t})();export{l as SettingsModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as se}from"./chunk-IPZFEWK5.js";import{a as te,b as ie,c as ne}from"./chunk-YJ2Q2RAD.js";import{c as re}from"./chunk-OME4KX7V.js";import"./chunk-7FHBLMYO.js";import{a as le}from"./chunk-THGDS273.js";import{m as V,n as Z,t as ee}from"./chunk-C3HWKB2Q.js";import{c as G,e as J,f as K,i as Q,l as U,m as X,z as Y}from"./chunk-WFYBML4S.js";import"./chunk-PPYAK5PR.js";import{b as ae}from"./chunk-U4SPMKC6.js";import"./chunk-GEIS2BWE.js";import{b as oe}from"./chunk-3ZGLL37E.js";import"./chunk-M7JEOWNA.js";import{b as E}from"./chunk-R3563DDE.js";import"./chunk-Q4CZ7LVK.js";import{Cc as R,Dc as $,Ec as j,Hb as C,Hc as a,Ib as w,Ic as r,Jb as S,Jc as z,Lb as P,Mb as L,Nb as N,Ob as _,Pb as s,Qb as l,Rb as f,Sb as u,Tb as b,Ub as A,Xa as W,_b as D,ab as o,bc as v,cc as H,dc as m,id as q,la as x,mb as M,qc as c,ra as y,rc as p,sa as h,sc as k,xc as T,yc as B,zc as I}from"./chunk-ULJPS3WS.js";var ce=(()=>{class t{$activeModal=x(V);dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=M({type:t,selectors:[["ng-component"]],decls:41,vars:30,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fa","fa-fw","fa-question-circle-o","primary-text",2,"font-size","75px"],[1,"ms-2"],[1,"mb-0"],[1,"ms-2","mt-2"],[1,"modal-footer","justify-content-between"],[1,"text-start"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-end"]],template:function(i,n){i&1&&(u(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),c(4),a(5,"translate"),b(),u(6,"button",3),a(7,"translate"),H("click",function(){return n.dismissModal()}),b()(),u(8,"div",4)(9,"div",5),A(10,"i",6),b(),u(11,"h5",7),c(12),a(13,"translate"),b(),u(14,"ul",8)(15,"li"),c(16),a(17,"translate"),b(),u(18,"li"),c(19),a(20,"translate"),b()(),u(21,"h5",9),c(22),a(23,"translate"),b(),u(24,"ul",8)(25,"li"),c(26),a(27,"translate"),b(),u(28,"li"),c(29),a(30,"translate"),b(),u(31,"li"),c(32),a(33,"translate"),b()()(),u(34,"div",10),A(35,"div",11),u(36,"div",12)(37,"button",13),H("click",function(){return n.dismissModal()}),c(38),a(39,"translate"),b()(),A(40,"div",14),b()()()),i&2&&(o(4),p(r(5,10,"support.title")),o(2),C("aria-label",r(7,12,"form.button_close")),o(6),p(r(13,14,"accessories.title_accessories")),o(4),p(r(17,16,"accessories.support.acc_1")),o(3),p(r(20,18,"accessories.support.acc_2")),o(3),p(r(23,20,"accessories.title_rooms")),o(4),p(r(27,22,"accessories.support.rooms_1")),o(3),p(r(30,24,"accessories.support.rooms_2")),o(3),p(r(33,26,"accessories.support.rooms_3")),o(6),k(" ",r(39,28,"form.button_close")," "))},dependencies:[E],encapsulation:2})}return t})();var pe=()=>({standalone:!0}),de=(()=>{class t{$activeModal=x(V);roomName;dismissModal(){this.$activeModal.dismiss("Dismiss")}closeModal(e){this.$activeModal.close(e)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=M({type:t,selectors:[["ng-component"]],inputs:{roomName:"roomName"},decls:28,vars:19,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-folder-plus","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["autocomplete","off","type","text","id","form-name","autofocus","",1,"form-control","custom-input",3,"ngModelChange","keyup.enter","ngModel","ngModelOptions"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"]],template:function(i,n){i&1&&(s(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),c(4),a(5,"translate"),l(),s(6,"button",3),a(7,"translate"),v("click",function(){return n.dismissModal()}),l()(),s(8,"div",4)(9,"div",5),f(10,"i",6),l(),s(11,"ul",7)(12,"li",8)(13,"label",9),c(14),a(15,"translate"),l(),s(16,"div",10)(17,"input",11),I("ngModelChange",function(F){return B(n.roomName,F)||(n.roomName=F),F}),v("keyup.enter",function(){return n.closeModal(n.roomName)}),l()()()()(),s(18,"div",12)(19,"div",13)(20,"button",14),v("click",function(){return n.dismissModal()}),c(21),a(22,"translate"),l()(),f(23,"div",15),s(24,"div",16)(25,"button",17),v("click",function(){return n.closeModal(n.roomName)}),c(26),a(27,"translate"),l()()()()()),i&2&&(o(4),p(r(5,8,"accessories.button_add_room")),o(2),C("aria-label",r(7,10,"form.button_close")),o(8),p(r(15,12,"accessories.room_name")),o(3),T("ngModel",n.roomName),_("ngModelOptions",R(18,pe)),o(4),k(" ",r(22,14,"form.button_close")," "),o(4),_("disabled",!n.roomName),o(),k(" ",r(27,16,"form.button_save")," "))},dependencies:[Y,X,G,J,K,U,Q,E],encapsulation:2})}return t})();var me=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=M({type:t,selectors:[["app-drag-here-placeholder"]],decls:5,vars:3,consts:[[1,"accessory-box"],[1,"fas","fa-fw","fa-arrow-alt-circle-down","accessory-icon"],[1,"accessory-label"]],template:function(i,n){i&1&&(u(0,"div",0),A(1,"i",1),u(2,"div",2),c(3),a(4,"translate"),b()()),i&2&&(o(3),p(r(4,1,"accessories.control.drag_here")))},dependencies:[E],styles:[".accessory-box[_ngcontent-%COMP%]{opacity:.2}"]})}return t})();var ue=(t,g)=>({"fa-eye":t,"fa-eye-slash":g}),_e=t=>({"cursor-move":t}),be=t=>({"justify-content-between":t}),fe=t=>({link:t});function ge(t,g){if(t&1&&(s(0,"div",0)(1,"div",19)(2,"h5",20),c(3),a(4,"translate"),l()()()),t&2){let e=m().$implicit,i=m(2);o(2),_("ngClass",$(4,_e,!i.isMobile)),o(),k(" ",e.name==="Default Room"?r(4,2,"accessories.control.default_room"):e.name," ")}}function ve(t,g){if(t&1&&(s(0,"div",23),f(1,"app-accessory-tile",24),l()),t&2){let e=m().$implicit;o(),_("service",e)}}function xe(t,g){if(t&1&&w(0,ve,2,1,"div",23),t&2){let e=g.$implicit,i=m(4);S(!i.hideHidden||!e.hidden?0:-1)}}function Ce(t,g){if(t&1){let e=D();s(0,"div",21),I("dragulaModelChange",function(n){y(e);let d=m().$implicit;return B(d.services,n)||(d.services=n),h(n)}),L(1,xe,1,1,null,null,P),f(3,"div",22)(4,"div",22)(5,"div",22)(6,"div",22)(7,"div",22)(8,"div",22)(9,"div",22)(10,"div",22)(11,"div",22)(12,"div",22),l()}if(t&2){let e=m().$implicit,i=m(2);_("ngClass",$(3,be,i.isMobile))("dragula","services-bag"),T("dragulaModel",e.services),o(),N(e.services)}}function ye(t,g){if(t&1){let e=D();s(0,"div",25),I("dragulaModelChange",function(n){y(e);let d=m().$implicit;return B(d.services,n)||(d.services=n),h(n)}),f(1,"app-drag-here-placeholder",26),l()}if(t&2){let e=m().$implicit;_("dragula","services-bag"),T("dragulaModel",e.services)}}function he(t,g){if(t&1&&(s(0,"div"),w(1,ge,5,6,"div",0),s(2,"div",16),w(3,Ce,13,5,"div",17),w(4,ye,2,2,"div",18),l()()),t&2){let e=g.$implicit,i=m(2);o(),S(!i.isMobile||e.services.length?1:-1),o(2),S(e.services.length?3:-1),o(),S(!e.services.length&&!i.isMobile?4:-1)}}function Me(t,g){if(t&1){let e=D();s(0,"div",1)(1,"div",2)(2,"h3",3),c(3),a(4,"translate"),l()(),s(5,"div",4)(6,"button",5),a(7,"translate"),v("click",function(){y(e);let n=m();return h(n.openSupport())}),f(8,"i",6),l()(),s(9,"div",7)(10,"button",8),a(11,"translate"),a(12,"translate"),v("click",function(){y(e);let n=m();return h(n.addRoom())}),f(13,"i",9),l(),s(14,"button",8),a(15,"translate"),a(16,"translate"),a(17,"translate"),a(18,"translate"),v("click",function(){y(e);let n=m();return h(n.hideHidden=!n.hideHidden)}),f(19,"i",10),l(),s(20,"div",11)(21,"button",12),a(22,"translate"),a(23,"translate"),v("click",function(){y(e);let n=m();return h(n.toggleLayoutLock())}),f(24,"i",13),l(),s(25,"button",12),a(26,"translate"),a(27,"translate"),v("click",function(){y(e);let n=m();return h(n.toggleLayoutLock())}),f(28,"i",14),l()(),s(29,"button",5),a(30,"translate"),v("click",function(){y(e);let n=m();return h(n.openSupport())}),f(31,"i",6),l()()(),s(32,"div",15),I("dragulaModelChange",function(n){y(e);let d=m();return B(d.$accessories.rooms,n)||(d.$accessories.rooms=n),h(n)}),L(33,he,5,3,"div",null,P),l()}if(t&2){let e=m();o(3),p(r(4,18,"accessories.title_accessories")),o(3),C("aria-label",r(7,20,"support.title")),o(4),_("hidden",e.isMobile)("ngbTooltip",r(11,22,"accessories.button_add_room")),C("aria-label",r(12,24,"accessories.button_add_room")),o(4),_("hidden",e.isMobile)("ngbTooltip",e.hideHidden?r(15,26,"accessories.button_hidden_show"):r(16,28,"accessories.button_hidden_hide")),C("aria-label",e.hideHidden?r(17,30,"accessories.button_hidden_show"):r(18,32,"accessories.button_hidden_hide")),o(5),_("ngClass",j(44,ue,!e.hideHidden,e.hideHidden)),o(2),_("disabled",!e.isMobile)("ngbTooltip",r(22,34,"form.button_unlock")),C("aria-label",r(23,36,"form.button_unlock")),o(4),_("disabled",e.isMobile)("ngbTooltip",r(26,38,"form.button_lock")),C("aria-label",r(27,40,"form.button_lock")),o(4),C("aria-label",r(30,42,"support.title")),o(3),_("dragula","rooms-bag"),T("dragulaModel",e.$accessories.rooms),o(),N(e.$accessories.rooms)}}function Ee(t,g){t&1&&(s(0,"p",33),c(1),a(2,"translate"),l()),t&2&&(o(),p(r(2,1,"accessories.settings_link")))}function we(t,g){if(t&1&&(s(0,"div",0)(1,"div",27)(2,"h3",28),c(3),a(4,"translate"),l()(),s(5,"div",29)(6,"div",30)(7,"h5",31),c(8),a(9,"translate"),l(),f(10,"p",32),a(11,"translate"),w(12,Ee,3,3,"p",33),l()()()),t&2){let e=m();o(3),p(r(4,4,"accessories.title_accessories")),o(5),p(r(9,6,"accessories.control_disabled")),o(2),_("innerHTML",z(11,8,"accessories.message_must_use_insecure_mode",$(11,fe,e.linkInsecure)),W),o(2),S(e.isAdmin?12:-1)}}var it=(()=>{class t{$accessories=x(re);$auth=x(ae);dragulaService=x(te);$modal=x(Z);$settings=x(oe);$md=x(le);orderSubscription;isAdmin=this.$auth.user.admin;enableAccessories=this.$settings.env.enableAccessories;isMobile=!1;hideHidden=!0;linkInsecure='<a href="https://github.com/homebridge/homebridge-config-ui-x/wiki/Enabling-Accessory-Control" target="_blank"><i class="fa fa-fw fa-external-link-alt primary-text"></i></a>';constructor(){let e=this.dragulaService;this.isMobile=this.$md.detect.mobile(),e.createGroup("rooms-bag",{moves:(i,n,d)=>!this.isMobile&&d.classList.contains("drag-handle")}),e.createGroup("services-bag",{moves:i=>!this.isMobile&&!i.classList.contains("no-drag")}),this.orderSubscription=e.drop().subscribe(()=>{setTimeout(()=>{this.$accessories.saveLayout()})}),this.isMobile=!0}ngOnInit(){this.$accessories.start()}addRoom(){this.$modal.open(de,{size:"lg",backdrop:"static"}).result.then(e=>{!e||!e.length||this.$accessories.rooms.find(i=>i.name===e)||(this.$accessories.rooms.push({name:e,services:[]}),this.isMobile&&this.toggleLayoutLock())}).catch(()=>{})}toggleLayoutLock(){this.isMobile=!this.isMobile,this.isMobile?document.querySelectorAll(".services-bag").forEach(i=>{for(let n=0;n<10;n++){let d=document.createElement("div");d.className="accessory-box invisible py-0 my-0",d.style.height="0",i.appendChild(d)}}):document.querySelectorAll(".invisible").forEach(i=>i.remove())}openSupport(){this.$modal.open(ce,{size:"lg",backdrop:"static"})}ngOnDestroy(){this.$accessories.stop(),this.orderSubscription.unsubscribe(),this.dragulaService.destroy("rooms-bag"),this.dragulaService.destroy("services-bag")}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=M({type:t,selectors:[["app-accessories"]],decls:2,vars:1,consts:[[1,"row"],[1,"row","mb-3"],[1,"col-9","col-sm-6"],[1,"primary-text","m-0"],[1,"col-3","col-sm-6","text-end","d-inline-block","d-sm-none"],["type","button",1,"btn","btn-elegant","my-0","me-0",3,"click"],[1,"fa","fa-fw","fa-question-circle-o"],[1,"col-3","col-sm-6","text-end","d-none","d-sm-inline-block"],["type","button","container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","my-0","me-2",3,"click","hidden","ngbTooltip"],[1,"fas","fa-fw","fa-folder-plus"],[1,"fas","fa-fw",3,"ngClass"],["role","group",1,"btn-group","me-2"],["type","button","container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","my-0",3,"click","disabled","ngbTooltip"],[1,"fas","fa-fw","fa-unlock"],[1,"fas","fa-fw","fa-lock"],[3,"dragulaModelChange","dragula","dragulaModel"],[1,"row","mb-4"],[1,"col-md-12","d-flex","flex-wrap","noselect","services-bag",3,"ngClass","dragula","dragulaModel"],[1,"col-md-12","d-flex","flex-wrap","noselect",3,"dragula","dragulaModel"],[1,"col-md-12"],[1,"primary-text","drag-handle","room-title","m-0","mb-1","mb-sm-0",3,"ngClass"],[1,"col-md-12","d-flex","flex-wrap","noselect","services-bag",3,"dragulaModelChange","ngClass","dragula","dragulaModel"],[1,"accessory-box","invisible","py-0","my-0",2,"height","0"],[1,"accessory-item","accessory-tab"],[3,"service"],[1,"col-md-12","d-flex","flex-wrap","noselect",3,"dragulaModelChange","dragula","dragulaModel"],[1,"no-drag"],[1,"col-12"],[1,"primary-text","m-0","mb-3"],[1,"col-12","text-center"],["role","alert",1,"alert","alert-warning","p-4"],[1,"mb-3","mt-0"],[1,"mb-0",3,"innerHTML"],[1,"mt-3","mb-0"]],template:function(i,n){i&1&&w(0,Me,35,47)(1,we,13,13,"div",0),i&2&&S(n.enableAccessories?0:1)},dependencies:[ee,q,ne,ie,se,me,E],styles:[".room-title[_ngcontent-%COMP%]{margin-left:10px}@media (max-width: 575px){.room-title[_ngcontent-%COMP%]{margin-left:7px}}.services-bag[_ngcontent-%COMP%]{min-height:170px}@media (max-width: 575px){.services-bag[_ngcontent-%COMP%]{min-height:initial}}.cursor-move[_ngcontent-%COMP%]{cursor:move}.gu-transit[_ngcontent-%COMP%] .manage-accessory-button[_ngcontent-%COMP%]{display:none}a[_ngcontent-%COMP%]:hover{text-decoration:none!important}"]})}return t})();export{it as AccessoriesComponent};
|
|
1
|
+
import{a as se}from"./chunk-G5V7VNU6.js";import{a as te,b as ie,c as ne}from"./chunk-YJ2Q2RAD.js";import{c as re}from"./chunk-CI2DUK2L.js";import"./chunk-SE3VEIYB.js";import{a as le}from"./chunk-THGDS273.js";import{m as V,n as Z,t as ee}from"./chunk-C3HWKB2Q.js";import{c as G,e as J,f as K,i as Q,l as U,m as X,z as Y}from"./chunk-WFYBML4S.js";import"./chunk-42ME5L3R.js";import{b as ae}from"./chunk-QR4VLNDI.js";import"./chunk-GEIS2BWE.js";import{b as oe}from"./chunk-6Y2OAEVG.js";import"./chunk-K6OAGSPQ.js";import{b as E}from"./chunk-R3563DDE.js";import"./chunk-Q4CZ7LVK.js";import{Cc as R,Dc as $,Ec as j,Hb as C,Hc as a,Ib as w,Ic as r,Jb as S,Jc as z,Lb as P,Mb as L,Nb as N,Ob as _,Pb as s,Qb as l,Rb as f,Sb as u,Tb as b,Ub as A,Xa as W,_b as D,ab as o,bc as v,cc as H,dc as m,id as q,la as x,mb as M,qc as c,ra as y,rc as p,sa as h,sc as k,xc as T,yc as B,zc as I}from"./chunk-ULJPS3WS.js";var ce=(()=>{class t{$activeModal=x(V);dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=M({type:t,selectors:[["ng-component"]],decls:41,vars:30,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fa","fa-fw","fa-question-circle-o","primary-text",2,"font-size","75px"],[1,"ms-2"],[1,"mb-0"],[1,"ms-2","mt-2"],[1,"modal-footer","justify-content-between"],[1,"text-start"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-end"]],template:function(i,n){i&1&&(u(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),c(4),a(5,"translate"),b(),u(6,"button",3),a(7,"translate"),H("click",function(){return n.dismissModal()}),b()(),u(8,"div",4)(9,"div",5),A(10,"i",6),b(),u(11,"h5",7),c(12),a(13,"translate"),b(),u(14,"ul",8)(15,"li"),c(16),a(17,"translate"),b(),u(18,"li"),c(19),a(20,"translate"),b()(),u(21,"h5",9),c(22),a(23,"translate"),b(),u(24,"ul",8)(25,"li"),c(26),a(27,"translate"),b(),u(28,"li"),c(29),a(30,"translate"),b(),u(31,"li"),c(32),a(33,"translate"),b()()(),u(34,"div",10),A(35,"div",11),u(36,"div",12)(37,"button",13),H("click",function(){return n.dismissModal()}),c(38),a(39,"translate"),b()(),A(40,"div",14),b()()()),i&2&&(o(4),p(r(5,10,"support.title")),o(2),C("aria-label",r(7,12,"form.button_close")),o(6),p(r(13,14,"accessories.title_accessories")),o(4),p(r(17,16,"accessories.support.acc_1")),o(3),p(r(20,18,"accessories.support.acc_2")),o(3),p(r(23,20,"accessories.title_rooms")),o(4),p(r(27,22,"accessories.support.rooms_1")),o(3),p(r(30,24,"accessories.support.rooms_2")),o(3),p(r(33,26,"accessories.support.rooms_3")),o(6),k(" ",r(39,28,"form.button_close")," "))},dependencies:[E],encapsulation:2})}return t})();var pe=()=>({standalone:!0}),de=(()=>{class t{$activeModal=x(V);roomName;dismissModal(){this.$activeModal.dismiss("Dismiss")}closeModal(e){this.$activeModal.close(e)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=M({type:t,selectors:[["ng-component"]],inputs:{roomName:"roomName"},decls:28,vars:19,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-folder-plus","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["autocomplete","off","type","text","id","form-name","autofocus","",1,"form-control","custom-input",3,"ngModelChange","keyup.enter","ngModel","ngModelOptions"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"]],template:function(i,n){i&1&&(s(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),c(4),a(5,"translate"),l(),s(6,"button",3),a(7,"translate"),v("click",function(){return n.dismissModal()}),l()(),s(8,"div",4)(9,"div",5),f(10,"i",6),l(),s(11,"ul",7)(12,"li",8)(13,"label",9),c(14),a(15,"translate"),l(),s(16,"div",10)(17,"input",11),I("ngModelChange",function(F){return B(n.roomName,F)||(n.roomName=F),F}),v("keyup.enter",function(){return n.closeModal(n.roomName)}),l()()()()(),s(18,"div",12)(19,"div",13)(20,"button",14),v("click",function(){return n.dismissModal()}),c(21),a(22,"translate"),l()(),f(23,"div",15),s(24,"div",16)(25,"button",17),v("click",function(){return n.closeModal(n.roomName)}),c(26),a(27,"translate"),l()()()()()),i&2&&(o(4),p(r(5,8,"accessories.button_add_room")),o(2),C("aria-label",r(7,10,"form.button_close")),o(8),p(r(15,12,"accessories.room_name")),o(3),T("ngModel",n.roomName),_("ngModelOptions",R(18,pe)),o(4),k(" ",r(22,14,"form.button_close")," "),o(4),_("disabled",!n.roomName),o(),k(" ",r(27,16,"form.button_save")," "))},dependencies:[Y,X,G,J,K,U,Q,E],encapsulation:2})}return t})();var me=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=M({type:t,selectors:[["app-drag-here-placeholder"]],decls:5,vars:3,consts:[[1,"accessory-box"],[1,"fas","fa-fw","fa-arrow-alt-circle-down","accessory-icon"],[1,"accessory-label"]],template:function(i,n){i&1&&(u(0,"div",0),A(1,"i",1),u(2,"div",2),c(3),a(4,"translate"),b()()),i&2&&(o(3),p(r(4,1,"accessories.control.drag_here")))},dependencies:[E],styles:[".accessory-box[_ngcontent-%COMP%]{opacity:.2}"]})}return t})();var ue=(t,g)=>({"fa-eye":t,"fa-eye-slash":g}),_e=t=>({"cursor-move":t}),be=t=>({"justify-content-between":t}),fe=t=>({link:t});function ge(t,g){if(t&1&&(s(0,"div",0)(1,"div",19)(2,"h5",20),c(3),a(4,"translate"),l()()()),t&2){let e=m().$implicit,i=m(2);o(2),_("ngClass",$(4,_e,!i.isMobile)),o(),k(" ",e.name==="Default Room"?r(4,2,"accessories.control.default_room"):e.name," ")}}function ve(t,g){if(t&1&&(s(0,"div",23),f(1,"app-accessory-tile",24),l()),t&2){let e=m().$implicit;o(),_("service",e)}}function xe(t,g){if(t&1&&w(0,ve,2,1,"div",23),t&2){let e=g.$implicit,i=m(4);S(!i.hideHidden||!e.hidden?0:-1)}}function Ce(t,g){if(t&1){let e=D();s(0,"div",21),I("dragulaModelChange",function(n){y(e);let d=m().$implicit;return B(d.services,n)||(d.services=n),h(n)}),L(1,xe,1,1,null,null,P),f(3,"div",22)(4,"div",22)(5,"div",22)(6,"div",22)(7,"div",22)(8,"div",22)(9,"div",22)(10,"div",22)(11,"div",22)(12,"div",22),l()}if(t&2){let e=m().$implicit,i=m(2);_("ngClass",$(3,be,i.isMobile))("dragula","services-bag"),T("dragulaModel",e.services),o(),N(e.services)}}function ye(t,g){if(t&1){let e=D();s(0,"div",25),I("dragulaModelChange",function(n){y(e);let d=m().$implicit;return B(d.services,n)||(d.services=n),h(n)}),f(1,"app-drag-here-placeholder",26),l()}if(t&2){let e=m().$implicit;_("dragula","services-bag"),T("dragulaModel",e.services)}}function he(t,g){if(t&1&&(s(0,"div"),w(1,ge,5,6,"div",0),s(2,"div",16),w(3,Ce,13,5,"div",17),w(4,ye,2,2,"div",18),l()()),t&2){let e=g.$implicit,i=m(2);o(),S(!i.isMobile||e.services.length?1:-1),o(2),S(e.services.length?3:-1),o(),S(!e.services.length&&!i.isMobile?4:-1)}}function Me(t,g){if(t&1){let e=D();s(0,"div",1)(1,"div",2)(2,"h3",3),c(3),a(4,"translate"),l()(),s(5,"div",4)(6,"button",5),a(7,"translate"),v("click",function(){y(e);let n=m();return h(n.openSupport())}),f(8,"i",6),l()(),s(9,"div",7)(10,"button",8),a(11,"translate"),a(12,"translate"),v("click",function(){y(e);let n=m();return h(n.addRoom())}),f(13,"i",9),l(),s(14,"button",8),a(15,"translate"),a(16,"translate"),a(17,"translate"),a(18,"translate"),v("click",function(){y(e);let n=m();return h(n.hideHidden=!n.hideHidden)}),f(19,"i",10),l(),s(20,"div",11)(21,"button",12),a(22,"translate"),a(23,"translate"),v("click",function(){y(e);let n=m();return h(n.toggleLayoutLock())}),f(24,"i",13),l(),s(25,"button",12),a(26,"translate"),a(27,"translate"),v("click",function(){y(e);let n=m();return h(n.toggleLayoutLock())}),f(28,"i",14),l()(),s(29,"button",5),a(30,"translate"),v("click",function(){y(e);let n=m();return h(n.openSupport())}),f(31,"i",6),l()()(),s(32,"div",15),I("dragulaModelChange",function(n){y(e);let d=m();return B(d.$accessories.rooms,n)||(d.$accessories.rooms=n),h(n)}),L(33,he,5,3,"div",null,P),l()}if(t&2){let e=m();o(3),p(r(4,18,"accessories.title_accessories")),o(3),C("aria-label",r(7,20,"support.title")),o(4),_("hidden",e.isMobile)("ngbTooltip",r(11,22,"accessories.button_add_room")),C("aria-label",r(12,24,"accessories.button_add_room")),o(4),_("hidden",e.isMobile)("ngbTooltip",e.hideHidden?r(15,26,"accessories.button_hidden_show"):r(16,28,"accessories.button_hidden_hide")),C("aria-label",e.hideHidden?r(17,30,"accessories.button_hidden_show"):r(18,32,"accessories.button_hidden_hide")),o(5),_("ngClass",j(44,ue,!e.hideHidden,e.hideHidden)),o(2),_("disabled",!e.isMobile)("ngbTooltip",r(22,34,"form.button_unlock")),C("aria-label",r(23,36,"form.button_unlock")),o(4),_("disabled",e.isMobile)("ngbTooltip",r(26,38,"form.button_lock")),C("aria-label",r(27,40,"form.button_lock")),o(4),C("aria-label",r(30,42,"support.title")),o(3),_("dragula","rooms-bag"),T("dragulaModel",e.$accessories.rooms),o(),N(e.$accessories.rooms)}}function Ee(t,g){t&1&&(s(0,"p",33),c(1),a(2,"translate"),l()),t&2&&(o(),p(r(2,1,"accessories.settings_link")))}function we(t,g){if(t&1&&(s(0,"div",0)(1,"div",27)(2,"h3",28),c(3),a(4,"translate"),l()(),s(5,"div",29)(6,"div",30)(7,"h5",31),c(8),a(9,"translate"),l(),f(10,"p",32),a(11,"translate"),w(12,Ee,3,3,"p",33),l()()()),t&2){let e=m();o(3),p(r(4,4,"accessories.title_accessories")),o(5),p(r(9,6,"accessories.control_disabled")),o(2),_("innerHTML",z(11,8,"accessories.message_must_use_insecure_mode",$(11,fe,e.linkInsecure)),W),o(2),S(e.isAdmin?12:-1)}}var it=(()=>{class t{$accessories=x(re);$auth=x(ae);dragulaService=x(te);$modal=x(Z);$settings=x(oe);$md=x(le);orderSubscription;isAdmin=this.$auth.user.admin;enableAccessories=this.$settings.env.enableAccessories;isMobile=!1;hideHidden=!0;linkInsecure='<a href="https://github.com/homebridge/homebridge-config-ui-x/wiki/Enabling-Accessory-Control" target="_blank"><i class="fa fa-fw fa-external-link-alt primary-text"></i></a>';constructor(){let e=this.dragulaService;this.isMobile=this.$md.detect.mobile(),e.createGroup("rooms-bag",{moves:(i,n,d)=>!this.isMobile&&d.classList.contains("drag-handle")}),e.createGroup("services-bag",{moves:i=>!this.isMobile&&!i.classList.contains("no-drag")}),this.orderSubscription=e.drop().subscribe(()=>{setTimeout(()=>{this.$accessories.saveLayout()})}),this.isMobile=!0}ngOnInit(){this.$accessories.start()}addRoom(){this.$modal.open(de,{size:"lg",backdrop:"static"}).result.then(e=>{!e||!e.length||this.$accessories.rooms.find(i=>i.name===e)||(this.$accessories.rooms.push({name:e,services:[]}),this.isMobile&&this.toggleLayoutLock())}).catch(()=>{})}toggleLayoutLock(){this.isMobile=!this.isMobile,this.isMobile?document.querySelectorAll(".services-bag").forEach(i=>{for(let n=0;n<10;n++){let d=document.createElement("div");d.className="accessory-box invisible py-0 my-0",d.style.height="0",i.appendChild(d)}}):document.querySelectorAll(".invisible").forEach(i=>i.remove())}openSupport(){this.$modal.open(ce,{size:"lg",backdrop:"static"})}ngOnDestroy(){this.$accessories.stop(),this.orderSubscription.unsubscribe(),this.dragulaService.destroy("rooms-bag"),this.dragulaService.destroy("services-bag")}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=M({type:t,selectors:[["app-accessories"]],decls:2,vars:1,consts:[[1,"row"],[1,"row","mb-3"],[1,"col-9","col-sm-6"],[1,"primary-text","m-0"],[1,"col-3","col-sm-6","text-end","d-inline-block","d-sm-none"],["type","button",1,"btn","btn-elegant","my-0","me-0",3,"click"],[1,"fa","fa-fw","fa-question-circle-o"],[1,"col-3","col-sm-6","text-end","d-none","d-sm-inline-block"],["type","button","container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","my-0","me-2",3,"click","hidden","ngbTooltip"],[1,"fas","fa-fw","fa-folder-plus"],[1,"fas","fa-fw",3,"ngClass"],["role","group",1,"btn-group","me-2"],["type","button","container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","my-0",3,"click","disabled","ngbTooltip"],[1,"fas","fa-fw","fa-unlock"],[1,"fas","fa-fw","fa-lock"],[3,"dragulaModelChange","dragula","dragulaModel"],[1,"row","mb-4"],[1,"col-md-12","d-flex","flex-wrap","noselect","services-bag",3,"ngClass","dragula","dragulaModel"],[1,"col-md-12","d-flex","flex-wrap","noselect",3,"dragula","dragulaModel"],[1,"col-md-12"],[1,"primary-text","drag-handle","room-title","m-0","mb-1","mb-sm-0",3,"ngClass"],[1,"col-md-12","d-flex","flex-wrap","noselect","services-bag",3,"dragulaModelChange","ngClass","dragula","dragulaModel"],[1,"accessory-box","invisible","py-0","my-0",2,"height","0"],[1,"accessory-item","accessory-tab"],[3,"service"],[1,"col-md-12","d-flex","flex-wrap","noselect",3,"dragulaModelChange","dragula","dragulaModel"],[1,"no-drag"],[1,"col-12"],[1,"primary-text","m-0","mb-3"],[1,"col-12","text-center"],["role","alert",1,"alert","alert-warning","p-4"],[1,"mb-3","mt-0"],[1,"mb-0",3,"innerHTML"],[1,"mt-3","mb-0"]],template:function(i,n){i&1&&w(0,Me,35,47)(1,we,13,13,"div",0),i&2&&S(n.enableAccessories?0:1)},dependencies:[ee,q,ne,ie,se,me,E],styles:[".room-title[_ngcontent-%COMP%]{margin-left:10px}@media (max-width: 575px){.room-title[_ngcontent-%COMP%]{margin-left:7px}}.services-bag[_ngcontent-%COMP%]{min-height:170px}@media (max-width: 575px){.services-bag[_ngcontent-%COMP%]{min-height:initial}}.cursor-move[_ngcontent-%COMP%]{cursor:move}.gu-transit[_ngcontent-%COMP%] .manage-accessory-button[_ngcontent-%COMP%]{display:none}a[_ngcontent-%COMP%]:hover{text-decoration:none!important}"]})}return t})();export{it as AccessoriesComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as ft,m as gt}from"./chunk-Q4CZ7LVK.js";import{Gb as M,Hb as E,Ob as l,Pb as h,Qb as p,Rb as F,Vb as Y,Wa as ht,Wb as K,Xa as q,_b as Q,a as u,ab as r,ac as mt,b as T,bc as j,db as dt,dc as c,e as xt,ga as C,gb as y,ha as lt,ja as ct,ka as w,kd as J,la as _,ma as ut,mb as G,n as g,nb as pt,nc as A,pc as m,qc as f,ra as V,sa as z,sb as S,sc as b,ua as N,va as Z,vb as U,za as O}from"./chunk-ULJPS3WS.js";var Tt=xt((De,Ut)=>{Ut.exports={name:"homebridge-config-ui-x",displayName:"Homebridge UI",version:"5.0.0-beta.114",description:"A web based management, configuration and control platform for Homebridge.",author:"oznu <dev@oz.nu>",license:"MIT",funding:[{type:"github",url:"https://github.com/sponsors/oznu"},{type:"paypal",url:"https://paypal.me/oznu"}],repository:{type:"git",url:"git+https://github.com/homebridge/homebridge-config-ui-x.git"},bugs:{url:"https://github.com/homebridge/homebridge-config-ui-x/issues"},keywords:["homebridge-plugin","ui","gui","web","homebridge","homebridge-config-ui-x","ui-x","config-ui-x","homebridge-x","homebridge server","homebridge ui","homebridge-ui","homebridge gui","homebridge-gui","web interface","config ui","management","config editor","linux","macOS","osx","windows","raspberry pi","accessory control","smart home","hb-service"],main:"./dist/index.js",bin:{"homebridge-config-ui-x":"dist/bin/standalone.js","hb-service":"dist/bin/hb-service.js"},engines:{node:"^20 || ^22 || ^24",homebridge:"^1.8.0 || ^2.0.0-beta.0"},scripts:{build:"npm run build:server && npm run build:ui","build:server":"rimraf dist && tsc -p tsconfig.build.json","build:ui":"npm run build --prefix ui",check:"npm run check:server && npm run check:ui","check:server":"npm install && npm outdated","check:ui":"npm install --prefix ui && npm outdated --prefix ui","lang-sync":"ts-node scripts/lang-sync.ts",lint:"eslint . --max-warnings=0","lint:fix":"npm run lint -- --fix",prepublishOnly:"npm i --package-lock-only && npm run lint && npm run build",start:"ts-node -r tsconfig-paths/register src/main.ts",test:"vitest run","test-coverage":"npm run test -- --coverage","upgrade-install":"./scripts/upgrade-install.sh",watch:'concurrently "npm run watch:ui" "npm run watch:server"',"watch:server":"nodemon","watch:ui":"npm run start --prefix ui"},dependencies:{"@fastify/helmet":"13.0.1","@fastify/multipart":"9.0.3","@fastify/static":"8.2.0","@homebridge/hap-client":"3.1.0","@homebridge/node-pty-prebuilt-multiarch":"0.13.1","@nestjs/axios":"4.0.0","@nestjs/common":"11.1.3","@nestjs/core":"11.1.3","@nestjs/jwt":"11.0.0","@nestjs/passport":"11.0.5","@nestjs/platform-fastify":"11.1.3","@nestjs/platform-socket.io":"11.1.3","@nestjs/swagger":"11.2.0","@nestjs/websockets":"11.1.3",axios:"1.10.0","bash-color":"0.0.4","class-transformer":"0.5.1","class-validator":"0.14.2",commander:"14.0.0",dayjs:"1.11.13",fastify:"5.4.0","fs-extra":"11.3.0",jsonwebtoken:"9.0.2",lodash:"4.17.21","node-cache":"5.1.2","node-schedule":"2.1.1",ora:"5.4.1",otplib:"12.0.1","p-limit":"3.1.0",passport:"0.7.0","passport-jwt":"4.0.1","reflect-metadata":"0.2.2",rxjs:"7.8.2",semver:"7.7.2",systeminformation:"5.27.7",tail:"2.2.6",tar:"7.4.3","tcp-port-used":"1.0.2",unzipper:"0.12.3"},devDependencies:{"@antfu/eslint-config":"^4.16.2","@nestjs/testing":"^11.1.3","@prettier/plugin-xml":"^3.4.2","@types/fs-extra":"^11.0.4","@types/lodash":"^4.17.20","@types/node":"^24.0.13","@types/node-schedule":"^2.1.8","@types/passport-jwt":"^4.0.1","@types/semver":"^7.7.0","@types/tail":"^2.2.3","@types/tcp-port-used":"^1.0.4","@types/unzipper":"^0.10.11","@vitest/coverage-v8":"^3.2.4",concurrently:"^9.2.0","eslint-plugin-format":"^1.0.1","form-data":"^4.0.3",nodemon:"^3.1.10",rimraf:"^6.0.1","ts-loader":"^9.5.2","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0",typescript:"^5.8.3","unplugin-swc":"^1.5.5",vitest:"^3.2.4"},overrides:{"@nestjs/platform-fastify":{fastify:"5.4.0"}},maintainers:[{email:"bwp91@icloud.com",name:"bwp91"},{email:"dev@oz.nu",name:"oznu"},{email:"northern.man1@gmail.com",name:"northernman"},{email:"mail@anderl-bauer.de",name:"supereg"},{email:"khaos.tian@gmail.com",name:"khaost"},{email:"erik.baauw@xs4all.nl",name:"ebaauw"},{email:"donavan.becker@icloud.com",name:"donavanbecker"},{email:"dustin.greif@gmail.com",name:"dustin.greif"},{email:"nfarina@gmail.com",name:"nfarina"}],scarfSettings:{enabled:!1}}});var v=function(i){return i[i.State=0]="State",i[i.Transition=1]="Transition",i[i.Sequence=2]="Sequence",i[i.Group=3]="Group",i[i.Animate=4]="Animate",i[i.Keyframes=5]="Keyframes",i[i.Style=6]="Style",i[i.Trigger=7]="Trigger",i[i.Reference=8]="Reference",i[i.AnimateChild=9]="AnimateChild",i[i.AnimateRef=10]="AnimateRef",i[i.Query=11]="Query",i[i.Stagger=12]="Stagger",i}(v||{}),It="*";function tt(i,s){return{type:v.Trigger,name:i,definitions:s,options:{}}}function P(i,s=null){return{type:v.Animate,styles:s,timings:i}}function Yt(i,s=null){return{type:v.Sequence,steps:i,options:s}}function R(i){return{type:v.Style,styles:i,offset:null}}function H(i,s,t){return{type:v.State,name:i,styles:s,options:t}}function B(i,s,t=null){return{type:v.Transition,expr:i,animation:s,options:t}}var W=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(s=0,t=0){this.totalTime=s+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(s=>s()),this._onDoneFns=[])}onStart(s){this._originalOnStartFns.push(s),this._onStartFns.push(s)}onDone(s){this._originalOnDoneFns.push(s),this._onDoneFns.push(s)}onDestroy(s){this._onDestroyFns.push(s)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(s=>s()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(s=>s()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(s){this._position=this.totalTime?s*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(s){let t=s=="start"?this._onStartFns:this._onDoneFns;t.forEach(e=>e()),t.length=0}},X=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(s){this.players=s;let t=0,e=0,n=0,o=this.players.length;o==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(a=>{a.onDone(()=>{++t==o&&this._onFinish()}),a.onDestroy(()=>{++e==o&&this._onDestroy()}),a.onStart(()=>{++n==o&&this._onStart()})}),this.totalTime=this.players.reduce((a,d)=>Math.max(a,d.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(s=>s()),this._onDoneFns=[])}init(){this.players.forEach(s=>s.init())}onStart(s){this._onStartFns.push(s)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(s=>s()),this._onStartFns=[])}onDone(s){this._onDoneFns.push(s)}onDestroy(s){this._onDestroyFns.push(s)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(s=>s.play())}pause(){this.players.forEach(s=>s.pause())}restart(){this.players.forEach(s=>s.restart())}finish(){this._onFinish(),this.players.forEach(s=>s.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(s=>s.destroy()),this._onDestroyFns.forEach(s=>s()),this._onDestroyFns=[])}reset(){this.players.forEach(s=>s.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(s){let t=s*this.totalTime;this.players.forEach(e=>{let n=e.totalTime?Math.min(1,t/e.totalTime):1;e.setPosition(n)})}getPosition(){let s=this.players.reduce((t,e)=>t===null||e.totalTime>t.totalTime?e:t,null);return s!=null?s.getPosition():0}beforeDestroy(){this.players.forEach(s=>{s.beforeDestroy&&s.beforeDestroy()})}triggerCallback(s){let t=s=="start"?this._onStartFns:this._onDoneFns;t.forEach(e=>e()),t.length=0}},Ot="!";var _t=["toast-component",""];function Et(i,s){if(i&1){let t=Q();h(0,"button",5),j("click",function(){V(t);let n=c();return z(n.remove())}),h(1,"span",6),f(2,"\xD7"),p()()}}function Ft(i,s){if(i&1&&(Y(0),f(1),K()),i&2){let t=c(2);r(),b("[",t.duplicatesCount+1,"]")}}function jt(i,s){if(i&1&&(h(0,"div"),f(1),S(2,Ft,2,1,"ng-container",4),p()),i&2){let t=c();m(t.options.titleClass),E("aria-label",t.title),r(),b(" ",t.title," "),r(),l("ngIf",t.duplicatesCount)}}function At(i,s){if(i&1&&F(0,"div",7),i&2){let t=c();m(t.options.messageClass),l("innerHTML",t.message,q)}}function Rt(i,s){if(i&1&&(h(0,"div",8),f(1),p()),i&2){let t=c();m(t.options.messageClass),E("aria-label",t.message),r(),b(" ",t.message," ")}}function Ht(i,s){if(i&1&&(h(0,"div"),F(1,"div",9),p()),i&2){let t=c();r(),A("width",t.width()+"%")}}function kt(i,s){if(i&1){let t=Q();h(0,"button",5),j("click",function(){V(t);let n=c();return z(n.remove())}),h(1,"span",6),f(2,"\xD7"),p()()}}function Nt(i,s){if(i&1&&(Y(0),f(1),K()),i&2){let t=c(2);r(),b("[",t.duplicatesCount+1,"]")}}function Mt(i,s){if(i&1&&(h(0,"div"),f(1),S(2,Nt,2,1,"ng-container",4),p()),i&2){let t=c();m(t.options.titleClass),E("aria-label",t.title),r(),b(" ",t.title," "),r(),l("ngIf",t.duplicatesCount)}}function Pt(i,s){if(i&1&&F(0,"div",7),i&2){let t=c();m(t.options.messageClass),l("innerHTML",t.message,q)}}function Bt(i,s){if(i&1&&(h(0,"div",8),f(1),p()),i&2){let t=c();m(t.options.messageClass),E("aria-label",t.message),r(),b(" ",t.message," ")}}function $t(i,s){if(i&1&&(h(0,"div"),F(1,"div",9),p()),i&2){let t=c();r(),A("width",t.width()+"%")}}var et=class{_attachedHost;component;viewContainerRef;injector;constructor(s,t){this.component=s,this.injector=t}attach(s,t){return this._attachedHost=s,s.attach(this,t)}detach(){let s=this._attachedHost;if(s)return this._attachedHost=void 0,s.detach()}get isAttached(){return this._attachedHost!=null}setAttachedHost(s){this._attachedHost=s}},it=class{_attachedPortal;_disposeFn;attach(s,t){return this._attachedPortal=s,this.attachComponentPortal(s,t)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(s){this._disposeFn=s}},st=class{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new g;_activate=new g;_manualClose=new g;_resetTimeout=new g;_countDuplicate=new g;constructor(s){this._overlayRef=s}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(s,t){s&&this._resetTimeout.next(),t&&this._countDuplicate.next(++this.duplicatesCount)}},D=class{toastId;config;message;title;toastType;toastRef;_onTap=new g;_onAction=new g;constructor(s,t,e,n,o,a){this.toastId=s,this.config=t,this.message=e,this.title=n,this.toastType=o,this.toastRef=a,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(s){this._onAction.next(s)}onAction(){return this._onAction.asObservable()}},vt={maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,includeTitleDuplicates:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing"},yt=new ct("ToastConfig"),nt=class extends it{_hostDomElement;_componentFactoryResolver;_appRef;constructor(s,t,e){super(),this._hostDomElement=s,this._componentFactoryResolver=t,this._appRef=e}attachComponentPortal(s,t){let e=this._componentFactoryResolver.resolveComponentFactory(s.component),n;return n=e.create(s.injector),this._appRef.attachView(n.hostView),this.setDisposeFn(()=>{this._appRef.detachView(n.hostView),n.destroy()}),t?this._hostDomElement.insertBefore(this._getComponentRootNode(n),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(n)),n}_getComponentRootNode(s){return s.hostView.rootNodes[0]}},Lt=(()=>{class i{_document=_(Z);_containerElement;ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let t=this._document.createElement("div");t.classList.add("overlay-container"),t.setAttribute("aria-live","polite"),this._document.body.appendChild(t),this._containerElement=t}static \u0275fac=function(e){return new(e||i)};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),ot=class{_portalHost;constructor(s){this._portalHost=s}attach(s,t=!0){return this._portalHost.attach(s,t)}detach(){return this._portalHost.detach()}},Vt=(()=>{class i{_overlayContainer=_(Lt);_componentFactoryResolver=_(dt);_appRef=_(M);_document=_(Z);_paneElements=new Map;create(t,e){return this._createOverlayRef(this.getPaneElement(t,e))}getPaneElement(t="",e){return this._paneElements.get(e)||this._paneElements.set(e,{}),this._paneElements.get(e)[t]||(this._paneElements.get(e)[t]=this._createPaneElement(t,e)),this._paneElements.get(e)[t]}_createPaneElement(t,e){let n=this._document.createElement("div");return n.id="toast-container",n.classList.add(t),n.classList.add("toast-container"),e?e.getContainerElement().appendChild(n):this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalHost(t){return new nt(t,this._componentFactoryResolver,this._appRef)}_createOverlayRef(t){return new ot(this._createPortalHost(t))}static \u0275fac=function(e){return new(e||i)};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),bt=(()=>{class i{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(t,e,n,o,a){this.overlay=e,this._injector=n,this.sanitizer=o,this.ngZone=a,this.toastrConfig=u(u({},t.default),t.config),t.config.iconClasses&&(this.toastrConfig.iconClasses=u(u({},t.default.iconClasses),t.config.iconClasses))}show(t,e,n={},o=""){return this._preBuildNotification(o,t,e,this.applyConfig(n))}success(t,e,n={}){let o=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}error(t,e,n={}){let o=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}info(t,e,n={}){let o=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}warning(t,e,n={}){let o=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}clear(t){for(let e of this.toasts)if(t!==void 0){if(e.toastId===t){e.toastRef.manualClose();return}}else e.toastRef.manualClose()}remove(t){let e=this._findToast(t);if(!e||(e.activeToast.toastRef.close(),this.toasts.splice(e.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length))return!1;if(this.currentlyActive<this.toastrConfig.maxOpened&&this.toasts[this.currentlyActive]){let n=this.toasts[this.currentlyActive].toastRef;n.isInactive()||(this.currentlyActive=this.currentlyActive+1,n.activate())}return!0}findDuplicate(t="",e="",n,o){let{includeTitleDuplicates:a}=this.toastrConfig;for(let d of this.toasts){let k=a&&d.title===t;if((!a||k)&&d.message===e)return d.toastRef.onDuplicate(n,o),d}return null}applyConfig(t={}){return u(u({},this.toastrConfig),t)}_findToast(t){for(let e=0;e<this.toasts.length;e++)if(this.toasts[e].toastId===t)return{index:e,activeToast:this.toasts[e]};return null}_preBuildNotification(t,e,n,o){return o.onActivateTick?this.ngZone.run(()=>this._buildNotification(t,e,n,o)):this._buildNotification(t,e,n,o)}_buildNotification(t,e,n,o){if(!o.toastComponent)throw new Error("toastComponent required");let a=this.findDuplicate(n,e,this.toastrConfig.resetTimeoutOnDuplicate&&o.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&n||e)&&this.toastrConfig.preventDuplicates&&a!==null)return a;this.previousToastMessage=e;let d=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(d=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));let k=this.overlay.create(o.positionClass,this.overlayContainer);this.index=this.index+1;let rt=e;e&&o.enableHtml&&(rt=this.sanitizer.sanitize(ht.HTML,e));let I=new st(k),$=new D(this.index,o,rt,n,t,I),Ct=[{provide:D,useValue:$}],wt=N.create({providers:Ct,parent:this._injector}),Dt=new et(o.toastComponent,wt),at=k.attach(Dt,o.newestOnTop);I.componentInstance=at.instance;let L={toastId:this.index,title:n||"",message:e||"",toastRef:I,onShown:I.afterActivate(),onHidden:I.afterClosed(),onTap:$.onTap(),onAction:$.onAction(),portal:at};return d||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{L.toastRef.activate()})),this.toasts.push(L),L}static \u0275fac=function(e){return new(e||i)(w(yt),w(Vt),w(N),w(gt),w(U))};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),zt=(()=>{class i{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=O(-1);toastClasses="";state;get _state(){return this.state()}get displayStyle(){if(this.state().value==="inactive")return"none"}timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,n){this.toastrService=t,this.toastPackage=e,this.ngZone=n,this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=`${e.toastType} ${e.config.toastClass}`,this.sub=e.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=e.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o}),this.state=O({value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.update(t=>T(u({},t),{value:"active"})),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),e=this.hideTime-t;this.width.set(e/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(n=>100-n),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.update(t=>T(u({},t),{value:"active"})),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){this.state().value!=="removed"&&(clearTimeout(this.timeout),this.state.update(t=>T(u({},t),{value:"removed"})),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){this.state().value!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state().value!=="removed"&&this.options.disableTimeOut!=="extendedTimeOut"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state().value==="removed"||(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(t,e){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(t),e)):this.timeout=setTimeout(()=>t(),e)}outsideInterval(t,e){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(t),e)):this.intervalId=setInterval(()=>t(),e)}runInsideAngular(t){this.ngZone?this.ngZone.run(()=>t()):t()}static \u0275fac=function(e){return new(e||i)(y(bt),y(D),y(U))};static \u0275cmp=G({type:i,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(e,n){e&1&&j("click",function(){return n.tapToast()})("mouseenter",function(){return n.stickAround()})("mouseleave",function(){return n.delayedHideToast()}),e&2&&(mt("@flyInOut",n._state),m(n.toastClasses),A("display",n.displayStyle))},attrs:_t,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,n){e&1&&S(0,Et,3,0,"button",0)(1,jt,3,5,"div",1)(2,At,1,3,"div",2)(3,Rt,2,4,"div",3)(4,Ht,2,2,"div",4),e&2&&(l("ngIf",n.options.closeButton),r(),l("ngIf",n.title),r(),l("ngIf",n.message&&n.options.enableHtml),r(),l("ngIf",n.message&&!n.options.enableHtml),r(),l("ngIf",n.options.progressBar))},dependencies:[J],encapsulation:2,data:{animation:[tt("flyInOut",[H("inactive",R({opacity:0})),H("active",R({opacity:1})),H("removed",R({opacity:0})),B("inactive => active",P("{{ easeTime }}ms {{ easing }}")),B("active => removed",P("{{ easeTime }}ms {{ easing }}"))])]},changeDetection:0})}return i})(),Zt=T(u({},vt),{toastComponent:zt}),qt=(i={})=>ut([{provide:yt,useValue:{default:Zt,config:i}}]),be=(()=>{class i{static forRoot(t={}){return{ngModule:i,providers:[qt(t)]}}static \u0275fac=function(e){return new(e||i)};static \u0275mod=pt({type:i});static \u0275inj=lt({})}return i})();var Gt=(()=>{class i{toastrService;toastPackage;appRef;message;title;options;duplicatesCount;originalTimeout;width=O(-1);toastClasses="";get displayStyle(){return this.state()==="inactive"?"none":null}state=O("inactive");timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,n){this.toastrService=t,this.toastPackage=e,this.appRef=n,this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=`${e.toastType} ${e.config.toastClass}`,this.sub=e.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=e.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.set("active"),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.timeout=setTimeout(()=>{this.remove()},this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))),this.options.onActivateTick&&this.appRef.tick()}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),e=this.hideTime-t;this.width.set(e/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(n=>100-n),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.set("active"),this.options.timeOut=this.originalTimeout,this.timeout=setTimeout(()=>this.remove(),this.originalTimeout),this.hideTime=new Date().getTime()+(this.originalTimeout||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))}remove(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.state.set("removed"),this.timeout=setTimeout(()=>this.toastrService.remove(this.toastPackage.toastId)))}tapToast(){this.state()!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state()==="removed"||(this.timeout=setTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10)))}static \u0275fac=function(e){return new(e||i)(y(bt),y(D),y(M))};static \u0275cmp=G({type:i,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(e,n){e&1&&j("click",function(){return n.tapToast()})("mouseenter",function(){return n.stickAround()})("mouseleave",function(){return n.delayedHideToast()}),e&2&&(m(n.toastClasses),A("display",n.displayStyle))},attrs:_t,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,n){e&1&&S(0,kt,3,0,"button",0)(1,Mt,3,5,"div",1)(2,Pt,1,3,"div",2)(3,Bt,2,4,"div",3)(4,$t,2,2,"div",4),e&2&&(l("ngIf",n.options.closeButton),r(),l("ngIf",n.title),r(),l("ngIf",n.message&&n.options.enableHtml),r(),l("ngIf",n.message&&!n.options.enableHtml),r(),l("ngIf",n.options.progressBar))},dependencies:[J],encapsulation:2,changeDetection:0})}return i})(),Te=T(u({},vt),{toastComponent:Gt});var x={serverTarget:Tt().version,production:!0,socket:"",api:{base:"/api",socket:`${window.location.protocol==="http:"?"ws://":"wss://"}${window.location.host}`,origin:window.location.origin},jwt:{tokenKey:"access_token",allowedDomains:[document.location.host],disallowedRoutes:[`${window.location.protocol}//${document.location.host}/api/auth/login`]},apiHttpOptions:{},owm:{appid:"fec67b55f7f74deaa28df89ba6a60821"}};var Fe=(()=>{class i{$http=_(ft);get(t,e){return this.$http.get(`${x.api.base}${t}`,e)}post(t,e,n){return this.$http.post(`${x.api.base}${t}`,e,n)}put(t,e,n){return this.$http.put(`${x.api.base}${t}`,e,n)}patch(t,e,n){return this.$http.patch(`${x.api.base}${t}`,e,n)}delete(t,e){return this.$http.delete(`${x.api.base}${t}`,e)}static \u0275fac=function(e){return new(e||i)};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();export{v as a,It as b,tt as c,P as d,Yt as e,R as f,B as g,W as h,X as i,Ot as j,bt as k,be as l,x as m,Fe as n};
|
|
1
|
+
import{e as ft,m as gt}from"./chunk-Q4CZ7LVK.js";import{Gb as M,Hb as E,Ob as l,Pb as h,Qb as p,Rb as F,Vb as Y,Wa as ht,Wb as K,Xa as q,_b as Q,a as u,ab as r,ac as mt,b as T,bc as j,db as dt,dc as c,e as xt,ga as C,gb as y,ha as lt,ja as ct,ka as w,kd as J,la as _,ma as ut,mb as G,n as g,nb as pt,nc as A,pc as m,qc as f,ra as V,sa as z,sb as S,sc as b,ua as N,va as Z,vb as U,za as O}from"./chunk-ULJPS3WS.js";var Tt=xt((De,Ut)=>{Ut.exports={name:"homebridge-config-ui-x",displayName:"Homebridge UI",version:"5.0.0-beta.115",description:"A web based management, configuration and control platform for Homebridge.",author:"oznu <dev@oz.nu>",license:"MIT",funding:[{type:"github",url:"https://github.com/sponsors/oznu"},{type:"paypal",url:"https://paypal.me/oznu"}],repository:{type:"git",url:"git+https://github.com/homebridge/homebridge-config-ui-x.git"},bugs:{url:"https://github.com/homebridge/homebridge-config-ui-x/issues"},keywords:["homebridge-plugin","ui","gui","web","homebridge","homebridge-config-ui-x","ui-x","config-ui-x","homebridge-x","homebridge server","homebridge ui","homebridge-ui","homebridge gui","homebridge-gui","web interface","config ui","management","config editor","linux","macOS","osx","windows","raspberry pi","accessory control","smart home","hb-service"],main:"./dist/index.js",bin:{"homebridge-config-ui-x":"dist/bin/standalone.js","hb-service":"dist/bin/hb-service.js"},engines:{node:"^20 || ^22 || ^24",homebridge:"^1.8.0 || ^2.0.0-beta.0"},scripts:{build:"npm run build:server && npm run build:ui","build:server":"rimraf dist && tsc -p tsconfig.build.json","build:ui":"npm run build --prefix ui",check:"npm run check:server && npm run check:ui","check:server":"npm install && npm outdated","check:ui":"npm install --prefix ui && npm outdated --prefix ui","lang-sync":"ts-node scripts/lang-sync.ts",lint:"eslint . --max-warnings=0","lint:fix":"npm run lint -- --fix",prepublishOnly:"npm i --package-lock-only && npm run lint && npm run build",start:"ts-node -r tsconfig-paths/register src/main.ts",test:"vitest run","test-coverage":"npm run test -- --coverage","upgrade-install":"./scripts/upgrade-install.sh",watch:'concurrently "npm run watch:ui" "npm run watch:server"',"watch:server":"nodemon","watch:ui":"npm run start --prefix ui"},dependencies:{"@fastify/helmet":"13.0.1","@fastify/multipart":"9.0.3","@fastify/static":"8.2.0","@homebridge/hap-client":"3.1.0","@homebridge/node-pty-prebuilt-multiarch":"0.13.1","@nestjs/axios":"4.0.0","@nestjs/common":"11.1.3","@nestjs/core":"11.1.3","@nestjs/jwt":"11.0.0","@nestjs/passport":"11.0.5","@nestjs/platform-fastify":"11.1.3","@nestjs/platform-socket.io":"11.1.3","@nestjs/swagger":"11.2.0","@nestjs/websockets":"11.1.3",axios:"1.10.0","bash-color":"0.0.4","class-transformer":"0.5.1","class-validator":"0.14.2",commander:"14.0.0",dayjs:"1.11.13",fastify:"5.4.0","fs-extra":"11.3.0",jsonwebtoken:"9.0.2",lodash:"4.17.21","node-cache":"5.1.2","node-schedule":"2.1.1",ora:"5.4.1",otplib:"12.0.1","p-limit":"3.1.0",passport:"0.7.0","passport-jwt":"4.0.1","reflect-metadata":"0.2.2",rxjs:"7.8.2",semver:"7.7.2",systeminformation:"5.27.7",tail:"2.2.6",tar:"7.4.3","tcp-port-used":"1.0.2",unzipper:"0.12.3"},devDependencies:{"@antfu/eslint-config":"^4.16.2","@nestjs/testing":"^11.1.3","@prettier/plugin-xml":"^3.4.2","@types/fs-extra":"^11.0.4","@types/lodash":"^4.17.20","@types/node":"^24.0.13","@types/node-schedule":"^2.1.8","@types/passport-jwt":"^4.0.1","@types/semver":"^7.7.0","@types/tail":"^2.2.3","@types/tcp-port-used":"^1.0.4","@types/unzipper":"^0.10.11","@vitest/coverage-v8":"^3.2.4",concurrently:"^9.2.0","eslint-plugin-format":"^1.0.1","form-data":"^4.0.3",nodemon:"^3.1.10",rimraf:"^6.0.1","ts-loader":"^9.5.2","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0",typescript:"^5.8.3","unplugin-swc":"^1.5.5",vitest:"^3.2.4"},overrides:{"@nestjs/platform-fastify":{fastify:"5.4.0"}},maintainers:[{email:"bwp91@icloud.com",name:"bwp91"},{email:"dev@oz.nu",name:"oznu"},{email:"northern.man1@gmail.com",name:"northernman"},{email:"mail@anderl-bauer.de",name:"supereg"},{email:"khaos.tian@gmail.com",name:"khaost"},{email:"erik.baauw@xs4all.nl",name:"ebaauw"},{email:"donavan.becker@icloud.com",name:"donavanbecker"},{email:"dustin.greif@gmail.com",name:"dustin.greif"},{email:"nfarina@gmail.com",name:"nfarina"}],scarfSettings:{enabled:!1}}});var v=function(i){return i[i.State=0]="State",i[i.Transition=1]="Transition",i[i.Sequence=2]="Sequence",i[i.Group=3]="Group",i[i.Animate=4]="Animate",i[i.Keyframes=5]="Keyframes",i[i.Style=6]="Style",i[i.Trigger=7]="Trigger",i[i.Reference=8]="Reference",i[i.AnimateChild=9]="AnimateChild",i[i.AnimateRef=10]="AnimateRef",i[i.Query=11]="Query",i[i.Stagger=12]="Stagger",i}(v||{}),It="*";function tt(i,s){return{type:v.Trigger,name:i,definitions:s,options:{}}}function P(i,s=null){return{type:v.Animate,styles:s,timings:i}}function Yt(i,s=null){return{type:v.Sequence,steps:i,options:s}}function R(i){return{type:v.Style,styles:i,offset:null}}function H(i,s,t){return{type:v.State,name:i,styles:s,options:t}}function B(i,s,t=null){return{type:v.Transition,expr:i,animation:s,options:t}}var W=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(s=0,t=0){this.totalTime=s+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(s=>s()),this._onDoneFns=[])}onStart(s){this._originalOnStartFns.push(s),this._onStartFns.push(s)}onDone(s){this._originalOnDoneFns.push(s),this._onDoneFns.push(s)}onDestroy(s){this._onDestroyFns.push(s)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(s=>s()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(s=>s()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(s){this._position=this.totalTime?s*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(s){let t=s=="start"?this._onStartFns:this._onDoneFns;t.forEach(e=>e()),t.length=0}},X=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(s){this.players=s;let t=0,e=0,n=0,o=this.players.length;o==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(a=>{a.onDone(()=>{++t==o&&this._onFinish()}),a.onDestroy(()=>{++e==o&&this._onDestroy()}),a.onStart(()=>{++n==o&&this._onStart()})}),this.totalTime=this.players.reduce((a,d)=>Math.max(a,d.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(s=>s()),this._onDoneFns=[])}init(){this.players.forEach(s=>s.init())}onStart(s){this._onStartFns.push(s)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(s=>s()),this._onStartFns=[])}onDone(s){this._onDoneFns.push(s)}onDestroy(s){this._onDestroyFns.push(s)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(s=>s.play())}pause(){this.players.forEach(s=>s.pause())}restart(){this.players.forEach(s=>s.restart())}finish(){this._onFinish(),this.players.forEach(s=>s.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(s=>s.destroy()),this._onDestroyFns.forEach(s=>s()),this._onDestroyFns=[])}reset(){this.players.forEach(s=>s.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(s){let t=s*this.totalTime;this.players.forEach(e=>{let n=e.totalTime?Math.min(1,t/e.totalTime):1;e.setPosition(n)})}getPosition(){let s=this.players.reduce((t,e)=>t===null||e.totalTime>t.totalTime?e:t,null);return s!=null?s.getPosition():0}beforeDestroy(){this.players.forEach(s=>{s.beforeDestroy&&s.beforeDestroy()})}triggerCallback(s){let t=s=="start"?this._onStartFns:this._onDoneFns;t.forEach(e=>e()),t.length=0}},Ot="!";var _t=["toast-component",""];function Et(i,s){if(i&1){let t=Q();h(0,"button",5),j("click",function(){V(t);let n=c();return z(n.remove())}),h(1,"span",6),f(2,"\xD7"),p()()}}function Ft(i,s){if(i&1&&(Y(0),f(1),K()),i&2){let t=c(2);r(),b("[",t.duplicatesCount+1,"]")}}function jt(i,s){if(i&1&&(h(0,"div"),f(1),S(2,Ft,2,1,"ng-container",4),p()),i&2){let t=c();m(t.options.titleClass),E("aria-label",t.title),r(),b(" ",t.title," "),r(),l("ngIf",t.duplicatesCount)}}function At(i,s){if(i&1&&F(0,"div",7),i&2){let t=c();m(t.options.messageClass),l("innerHTML",t.message,q)}}function Rt(i,s){if(i&1&&(h(0,"div",8),f(1),p()),i&2){let t=c();m(t.options.messageClass),E("aria-label",t.message),r(),b(" ",t.message," ")}}function Ht(i,s){if(i&1&&(h(0,"div"),F(1,"div",9),p()),i&2){let t=c();r(),A("width",t.width()+"%")}}function kt(i,s){if(i&1){let t=Q();h(0,"button",5),j("click",function(){V(t);let n=c();return z(n.remove())}),h(1,"span",6),f(2,"\xD7"),p()()}}function Nt(i,s){if(i&1&&(Y(0),f(1),K()),i&2){let t=c(2);r(),b("[",t.duplicatesCount+1,"]")}}function Mt(i,s){if(i&1&&(h(0,"div"),f(1),S(2,Nt,2,1,"ng-container",4),p()),i&2){let t=c();m(t.options.titleClass),E("aria-label",t.title),r(),b(" ",t.title," "),r(),l("ngIf",t.duplicatesCount)}}function Pt(i,s){if(i&1&&F(0,"div",7),i&2){let t=c();m(t.options.messageClass),l("innerHTML",t.message,q)}}function Bt(i,s){if(i&1&&(h(0,"div",8),f(1),p()),i&2){let t=c();m(t.options.messageClass),E("aria-label",t.message),r(),b(" ",t.message," ")}}function $t(i,s){if(i&1&&(h(0,"div"),F(1,"div",9),p()),i&2){let t=c();r(),A("width",t.width()+"%")}}var et=class{_attachedHost;component;viewContainerRef;injector;constructor(s,t){this.component=s,this.injector=t}attach(s,t){return this._attachedHost=s,s.attach(this,t)}detach(){let s=this._attachedHost;if(s)return this._attachedHost=void 0,s.detach()}get isAttached(){return this._attachedHost!=null}setAttachedHost(s){this._attachedHost=s}},it=class{_attachedPortal;_disposeFn;attach(s,t){return this._attachedPortal=s,this.attachComponentPortal(s,t)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(s){this._disposeFn=s}},st=class{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new g;_activate=new g;_manualClose=new g;_resetTimeout=new g;_countDuplicate=new g;constructor(s){this._overlayRef=s}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(s,t){s&&this._resetTimeout.next(),t&&this._countDuplicate.next(++this.duplicatesCount)}},D=class{toastId;config;message;title;toastType;toastRef;_onTap=new g;_onAction=new g;constructor(s,t,e,n,o,a){this.toastId=s,this.config=t,this.message=e,this.title=n,this.toastType=o,this.toastRef=a,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(s){this._onAction.next(s)}onAction(){return this._onAction.asObservable()}},vt={maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,includeTitleDuplicates:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing"},yt=new ct("ToastConfig"),nt=class extends it{_hostDomElement;_componentFactoryResolver;_appRef;constructor(s,t,e){super(),this._hostDomElement=s,this._componentFactoryResolver=t,this._appRef=e}attachComponentPortal(s,t){let e=this._componentFactoryResolver.resolveComponentFactory(s.component),n;return n=e.create(s.injector),this._appRef.attachView(n.hostView),this.setDisposeFn(()=>{this._appRef.detachView(n.hostView),n.destroy()}),t?this._hostDomElement.insertBefore(this._getComponentRootNode(n),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(n)),n}_getComponentRootNode(s){return s.hostView.rootNodes[0]}},Lt=(()=>{class i{_document=_(Z);_containerElement;ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let t=this._document.createElement("div");t.classList.add("overlay-container"),t.setAttribute("aria-live","polite"),this._document.body.appendChild(t),this._containerElement=t}static \u0275fac=function(e){return new(e||i)};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),ot=class{_portalHost;constructor(s){this._portalHost=s}attach(s,t=!0){return this._portalHost.attach(s,t)}detach(){return this._portalHost.detach()}},Vt=(()=>{class i{_overlayContainer=_(Lt);_componentFactoryResolver=_(dt);_appRef=_(M);_document=_(Z);_paneElements=new Map;create(t,e){return this._createOverlayRef(this.getPaneElement(t,e))}getPaneElement(t="",e){return this._paneElements.get(e)||this._paneElements.set(e,{}),this._paneElements.get(e)[t]||(this._paneElements.get(e)[t]=this._createPaneElement(t,e)),this._paneElements.get(e)[t]}_createPaneElement(t,e){let n=this._document.createElement("div");return n.id="toast-container",n.classList.add(t),n.classList.add("toast-container"),e?e.getContainerElement().appendChild(n):this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalHost(t){return new nt(t,this._componentFactoryResolver,this._appRef)}_createOverlayRef(t){return new ot(this._createPortalHost(t))}static \u0275fac=function(e){return new(e||i)};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),bt=(()=>{class i{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(t,e,n,o,a){this.overlay=e,this._injector=n,this.sanitizer=o,this.ngZone=a,this.toastrConfig=u(u({},t.default),t.config),t.config.iconClasses&&(this.toastrConfig.iconClasses=u(u({},t.default.iconClasses),t.config.iconClasses))}show(t,e,n={},o=""){return this._preBuildNotification(o,t,e,this.applyConfig(n))}success(t,e,n={}){let o=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}error(t,e,n={}){let o=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}info(t,e,n={}){let o=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}warning(t,e,n={}){let o=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}clear(t){for(let e of this.toasts)if(t!==void 0){if(e.toastId===t){e.toastRef.manualClose();return}}else e.toastRef.manualClose()}remove(t){let e=this._findToast(t);if(!e||(e.activeToast.toastRef.close(),this.toasts.splice(e.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length))return!1;if(this.currentlyActive<this.toastrConfig.maxOpened&&this.toasts[this.currentlyActive]){let n=this.toasts[this.currentlyActive].toastRef;n.isInactive()||(this.currentlyActive=this.currentlyActive+1,n.activate())}return!0}findDuplicate(t="",e="",n,o){let{includeTitleDuplicates:a}=this.toastrConfig;for(let d of this.toasts){let k=a&&d.title===t;if((!a||k)&&d.message===e)return d.toastRef.onDuplicate(n,o),d}return null}applyConfig(t={}){return u(u({},this.toastrConfig),t)}_findToast(t){for(let e=0;e<this.toasts.length;e++)if(this.toasts[e].toastId===t)return{index:e,activeToast:this.toasts[e]};return null}_preBuildNotification(t,e,n,o){return o.onActivateTick?this.ngZone.run(()=>this._buildNotification(t,e,n,o)):this._buildNotification(t,e,n,o)}_buildNotification(t,e,n,o){if(!o.toastComponent)throw new Error("toastComponent required");let a=this.findDuplicate(n,e,this.toastrConfig.resetTimeoutOnDuplicate&&o.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&n||e)&&this.toastrConfig.preventDuplicates&&a!==null)return a;this.previousToastMessage=e;let d=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(d=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));let k=this.overlay.create(o.positionClass,this.overlayContainer);this.index=this.index+1;let rt=e;e&&o.enableHtml&&(rt=this.sanitizer.sanitize(ht.HTML,e));let I=new st(k),$=new D(this.index,o,rt,n,t,I),Ct=[{provide:D,useValue:$}],wt=N.create({providers:Ct,parent:this._injector}),Dt=new et(o.toastComponent,wt),at=k.attach(Dt,o.newestOnTop);I.componentInstance=at.instance;let L={toastId:this.index,title:n||"",message:e||"",toastRef:I,onShown:I.afterActivate(),onHidden:I.afterClosed(),onTap:$.onTap(),onAction:$.onAction(),portal:at};return d||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{L.toastRef.activate()})),this.toasts.push(L),L}static \u0275fac=function(e){return new(e||i)(w(yt),w(Vt),w(N),w(gt),w(U))};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),zt=(()=>{class i{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=O(-1);toastClasses="";state;get _state(){return this.state()}get displayStyle(){if(this.state().value==="inactive")return"none"}timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,n){this.toastrService=t,this.toastPackage=e,this.ngZone=n,this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=`${e.toastType} ${e.config.toastClass}`,this.sub=e.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=e.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o}),this.state=O({value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.update(t=>T(u({},t),{value:"active"})),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),e=this.hideTime-t;this.width.set(e/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(n=>100-n),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.update(t=>T(u({},t),{value:"active"})),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){this.state().value!=="removed"&&(clearTimeout(this.timeout),this.state.update(t=>T(u({},t),{value:"removed"})),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){this.state().value!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state().value!=="removed"&&this.options.disableTimeOut!=="extendedTimeOut"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state().value==="removed"||(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(t,e){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(t),e)):this.timeout=setTimeout(()=>t(),e)}outsideInterval(t,e){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(t),e)):this.intervalId=setInterval(()=>t(),e)}runInsideAngular(t){this.ngZone?this.ngZone.run(()=>t()):t()}static \u0275fac=function(e){return new(e||i)(y(bt),y(D),y(U))};static \u0275cmp=G({type:i,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(e,n){e&1&&j("click",function(){return n.tapToast()})("mouseenter",function(){return n.stickAround()})("mouseleave",function(){return n.delayedHideToast()}),e&2&&(mt("@flyInOut",n._state),m(n.toastClasses),A("display",n.displayStyle))},attrs:_t,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,n){e&1&&S(0,Et,3,0,"button",0)(1,jt,3,5,"div",1)(2,At,1,3,"div",2)(3,Rt,2,4,"div",3)(4,Ht,2,2,"div",4),e&2&&(l("ngIf",n.options.closeButton),r(),l("ngIf",n.title),r(),l("ngIf",n.message&&n.options.enableHtml),r(),l("ngIf",n.message&&!n.options.enableHtml),r(),l("ngIf",n.options.progressBar))},dependencies:[J],encapsulation:2,data:{animation:[tt("flyInOut",[H("inactive",R({opacity:0})),H("active",R({opacity:1})),H("removed",R({opacity:0})),B("inactive => active",P("{{ easeTime }}ms {{ easing }}")),B("active => removed",P("{{ easeTime }}ms {{ easing }}"))])]},changeDetection:0})}return i})(),Zt=T(u({},vt),{toastComponent:zt}),qt=(i={})=>ut([{provide:yt,useValue:{default:Zt,config:i}}]),be=(()=>{class i{static forRoot(t={}){return{ngModule:i,providers:[qt(t)]}}static \u0275fac=function(e){return new(e||i)};static \u0275mod=pt({type:i});static \u0275inj=lt({})}return i})();var Gt=(()=>{class i{toastrService;toastPackage;appRef;message;title;options;duplicatesCount;originalTimeout;width=O(-1);toastClasses="";get displayStyle(){return this.state()==="inactive"?"none":null}state=O("inactive");timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,n){this.toastrService=t,this.toastPackage=e,this.appRef=n,this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=`${e.toastType} ${e.config.toastClass}`,this.sub=e.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=e.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.set("active"),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.timeout=setTimeout(()=>{this.remove()},this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))),this.options.onActivateTick&&this.appRef.tick()}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),e=this.hideTime-t;this.width.set(e/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(n=>100-n),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.set("active"),this.options.timeOut=this.originalTimeout,this.timeout=setTimeout(()=>this.remove(),this.originalTimeout),this.hideTime=new Date().getTime()+(this.originalTimeout||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))}remove(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.state.set("removed"),this.timeout=setTimeout(()=>this.toastrService.remove(this.toastPackage.toastId)))}tapToast(){this.state()!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state()==="removed"||(this.timeout=setTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10)))}static \u0275fac=function(e){return new(e||i)(y(bt),y(D),y(M))};static \u0275cmp=G({type:i,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(e,n){e&1&&j("click",function(){return n.tapToast()})("mouseenter",function(){return n.stickAround()})("mouseleave",function(){return n.delayedHideToast()}),e&2&&(m(n.toastClasses),A("display",n.displayStyle))},attrs:_t,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,n){e&1&&S(0,kt,3,0,"button",0)(1,Mt,3,5,"div",1)(2,Pt,1,3,"div",2)(3,Bt,2,4,"div",3)(4,$t,2,2,"div",4),e&2&&(l("ngIf",n.options.closeButton),r(),l("ngIf",n.title),r(),l("ngIf",n.message&&n.options.enableHtml),r(),l("ngIf",n.message&&!n.options.enableHtml),r(),l("ngIf",n.options.progressBar))},dependencies:[J],encapsulation:2,changeDetection:0})}return i})(),Te=T(u({},vt),{toastComponent:Gt});var x={serverTarget:Tt().version,production:!0,socket:"",api:{base:"/api",socket:`${window.location.protocol==="http:"?"ws://":"wss://"}${window.location.host}`,origin:window.location.origin},jwt:{tokenKey:"access_token",allowedDomains:[document.location.host],disallowedRoutes:[`${window.location.protocol}//${document.location.host}/api/auth/login`]},apiHttpOptions:{},owm:{appid:"fec67b55f7f74deaa28df89ba6a60821"}};var Fe=(()=>{class i{$http=_(ft);get(t,e){return this.$http.get(`${x.api.base}${t}`,e)}post(t,e,n){return this.$http.post(`${x.api.base}${t}`,e,n)}put(t,e,n){return this.$http.put(`${x.api.base}${t}`,e,n)}patch(t,e,n){return this.$http.patch(`${x.api.base}${t}`,e,n)}delete(t,e){return this.$http.delete(`${x.api.base}${t}`,e)}static \u0275fac=function(e){return new(e||i)};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();export{v as a,It as b,tt as c,P as d,Yt as e,R as f,B as g,W as h,X as i,Ot as j,bt as k,be as l,x as m,Fe as n};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as b}from"./chunk-
|
|
1
|
+
import{a as b}from"./chunk-42ME5L3R.js";import"./chunk-QR4VLNDI.js";import{d as k}from"./chunk-GEIS2BWE.js";import{b as S}from"./chunk-6Y2OAEVG.js";import{k as T,n as w}from"./chunk-K6OAGSPQ.js";import{a as C,b as $}from"./chunk-R3563DDE.js";import"./chunk-Q4CZ7LVK.js";import{$b as E,Dc as g,Hc as m,Ib as d,Ic as c,Jb as f,Jc as y,Sb as r,Tb as i,Ub as l,Xa as x,ab as n,dc as h,la as o,mb as _,qc as a,rc as s}from"./chunk-ULJPS3WS.js";var I=t=>({command:t});function D(t,u){if(t&1&&(r(0,"div",7),a(1),i()),t&2){let e=h();n(),s(e.error)}}function R(t,u){t&1&&(r(0,"p",9),a(1),m(2,"translate"),i(),r(3,"div",10)(4,"div",11),l(5,"i",12),i()()),t&2&&(n(),s(c(2,1,"restart.please_wait_while_server_restarts")))}function B(t,u){if(t&1&&(r(0,"div",8)(1,"p"),a(2),m(3,"translate"),i(),l(4,"p",13),m(5,"translate"),i()),t&2){let e=h();n(2),s(c(3,2,"platform.docker.server_long_time")),n(2),E("innerHTML",y(5,4,"platform.docker.run_with_restart",g(7,I,e.command)),x)}}var U=(()=>{class t{$api=o(w);$router=o(k);$settings=o(S);$toastr=o(T);$translate=o(C);$ws=o(b);checkTimeout;checkDelay;io;resp={};timeout=!1;error=!1;command='<span class="font-monospace">--restart=always</span>';ngOnInit(){this.io=this.$ws.connectToNamespace("status"),this.io.connected.subscribe(()=>{this.io.socket.emit("monitor-server-status"),this.$settings.getAppSettings().catch(()=>{})}),this.$api.put("/platform-tools/docker/restart-container",{}).subscribe({next:e=>{this.resp=e,this.checkIfServerUp()},error:e=>{this.error=this.$translate.instant("restart.toast_server_restart_error"),console.error(e),this.$toastr.error(this.$translate.instant("restart.toast_server_restart_error"),this.$translate.instant("toast.title_error"))}})}ngOnDestroy(){this.io.end(),clearTimeout(this.checkDelay),clearTimeout(this.checkTimeout)}checkIfServerUp(){this.checkDelay=setTimeout(()=>{this.io.socket.on("homebridge-status",e=>{(e.status==="up"||e.status==="pending")&&(this.$toastr.success(this.$translate.instant("platform.docker.container_restarted"),this.$translate.instant("toast.title_success")),this.$router.navigate(["/"]))})},1e4),this.checkTimeout=setTimeout(()=>{this.$toastr.warning(this.$translate.instant("restart.toast_server_restart_timeout"),this.$translate.instant("toast.title_warning"),{timeOut:1e4}),this.timeout=!0},6e4)}static \u0275fac=function(p){return new(p||t)};static \u0275cmp=_({type:t,selectors:[["ng-component"]],decls:14,vars:8,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fab","fa-fw","fa-docker",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"alert","alert-error","my-4"],[1,"alert","alert-warning","my-4"],[1,"grey-text"],[1,"justify-content-center","my-4"],[1,"restart-progress-box","primary-text"],[1,"fas","fa-fw","fa-spinner","fa-spin"],[1,"grey-text","mb-0",3,"innerHTML"]],template:function(p,v){p&1&&(r(0,"div",0)(1,"h3",1),a(2),m(3,"translate"),i()(),r(4,"div",2)(5,"div",3),l(6,"i",4),i(),r(7,"div",5)(8,"h4",6),a(9),m(10,"translate"),i(),d(11,D,2,1,"div",7)(12,R,6,3),d(13,B,6,9,"div",8),i()()),p&2&&(n(2),s(c(3,4,"menu.restart.title")),n(7),s(c(10,6,"platform.docker.title_restarting")),n(2),f(v.error?11:12),n(2),f(v.timeout?13:-1))},dependencies:[$],styles:[".restart-progress-box[_ngcontent-%COMP%]{font-size:22px;font-weight:300;margin-top:15px}"]})}return t})();export{U as ContainerRestartComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{k as _,n as h}from"./chunk-
|
|
1
|
+
import{k as _,n as h}from"./chunk-K6OAGSPQ.js";import{a as v,b as E}from"./chunk-R3563DDE.js";import"./chunk-Q4CZ7LVK.js";import{Hc as p,Ib as c,Ic as s,Jb as x,Sb as i,Tb as e,Ub as f,ab as n,dc as u,la as l,mb as d,qc as o,rc as a}from"./chunk-ULJPS3WS.js";function y(t,w){if(t&1&&(i(0,"div",7),o(1),e()),t&2){let r=u();n(),a(r.error)}}function C(t,w){t&1&&(i(0,"p",8),o(1),p(2,"translate"),e()),t&2&&(n(),a(s(2,1,"platform.linux.server_will_power_down")))}var B=(()=>{class t{$api=l(h);$toastr=l(_);$translate=l(v);error=!1;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(m){return new(m||t)};static \u0275cmp=d({type:t,selectors:[["ng-component"]],decls:13,vars:7,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-fw","fa-power-off",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"alert","alert-error","my-4"],[1,"grey-text"]],template:function(m,S){m&1&&(i(0,"div",0)(1,"h3",1),o(2),p(3,"translate"),e()(),i(4,"div",2)(5,"div",3),f(6,"i",4),e(),i(7,"div",5)(8,"h4",6),o(9),p(10,"translate"),e(),c(11,y,2,1,"div",7)(12,C,3,3,"p",8),e()()),m&2&&(n(2),a(s(3,3,"menu.restart.title")),n(7),a(s(10,5,"platform.linux.shutting_down_server")),n(2),x(S.error?11:12))},dependencies:[E],encapsulation:2})}return t})();export{B as ShutdownLinuxComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as D}from"./chunk-
|
|
1
|
+
import{a as D}from"./chunk-42ME5L3R.js";import"./chunk-QR4VLNDI.js";import{d as E}from"./chunk-GEIS2BWE.js";import{b as R}from"./chunk-6Y2OAEVG.js";import{k as O,n as B}from"./chunk-K6OAGSPQ.js";import{a as k,b as I}from"./chunk-R3563DDE.js";import"./chunk-Q4CZ7LVK.js";import{Dc as b,Ec as g,Hc as o,Ib as f,Ic as l,Jb as _,Ob as x,Pb as r,Qb as n,Rb as v,_b as $,ab as i,bc as S,dc as d,id as T,la as m,mb as w,qc as a,ra as C,rc as c,sa as y,sc as h}from"./chunk-ULJPS3WS.js";var U=(t,p)=>({"fas fa-fw fa-spinner fa-spin":t,"far fa-fw fa-check-circle":p}),F=t=>({"grey-text":t}),P=(t,p)=>({"far fa-fw fa-circle":t,"fas fa-fw fa-spinner fa-spin":p});function j(t,p){if(t&1&&(r(0,"div",7),a(1),n()),t&2){let e=d();i(),c(e.error)}}function M(t,p){if(t&1&&(r(0,"p",9),a(1),o(2,"translate"),n(),r(3,"div",10)(4,"div",11)(5,"span"),v(6,"i",12),a(7),o(8,"translate"),n()(),r(9,"div",11)(10,"span",12),v(11,"i",12),a(12),o(13,"translate"),n()()()),t&2){let e=d();i(),c(l(2,6,"restart.please_wait_while_server_restarts")),i(5),x("ngClass",g(12,U,!e.uiOnline,e.uiOnline)),i(),h(" ",l(8,8,"restart.ui_online")," "),i(3),x("ngClass",b(15,F,!e.uiOnline)),i(),x("ngClass",g(17,P,!e.uiOnline,e.uiOnline)),i(),h(" ",l(13,10,"restart.service_ready")," ")}}function V(t,p){if(t&1){let e=$();r(0,"p",15)(1,"button",16),S("click",function(){C(e);let u=d(2);return y(u.viewLogs())}),a(2),o(3,"translate"),n()()}t&2&&(i(2),c(l(3,1,"menu.tooltip_view_logs")))}function z(t,p){if(t&1&&(r(0,"div",8)(1,"p"),a(2),o(3,"translate"),n(),r(4,"p",13),a(5),o(6,"translate"),r(7,"span",14),a(8),n()(),f(9,V,4,3,"p",15),n()),t&2){let e=d();i(2),c(l(3,4,"restart.server_is_taking_long_time_to_restart")),i(3),h(" ",l(6,6,"restart.label_restart_command_executed"),": "),i(3),c(e.resp.command||"End Process"),i(),_(e.uiOnline?9:-1)}}var X=(()=>{class t{$api=m(B);$router=m(E);$settings=m(R);$toastr=m(O);$translate=m(k);$ws=m(D);checkTimeout;checkDelay;io;uiOnline=!1;error=!1;resp={};timeout=!1;ngOnInit(){this.io=this.$ws.connectToNamespace("status"),this.io.connected.subscribe(()=>{this.io.socket.emit("monitor-server-status"),this.$settings.getAppSettings().catch(()=>{})}),this.$router.parseUrl(this.$router.url).queryParams.restarting?(this.uiOnline=!0,this.checkIfServerUp()):this.$api.put("/server/restart",{}).subscribe({next:s=>{this.resp=s,this.checkIfServerUp(),s.restartingUI||(this.uiOnline=!0)},error:s=>{console.error(s),this.error=this.$translate.instant("restart.toast_server_restart_error"),this.$toastr.error(this.$translate.instant("restart.toast_server_restart_error"),this.$translate.instant("toast.title_error"))}})}viewLogs(){this.$router.navigate(["/logs"])}ngOnDestroy(){this.io.end(),clearTimeout(this.checkDelay),clearTimeout(this.checkTimeout)}checkIfServerUp(){this.checkDelay=setTimeout(()=>{this.io.socket.on("homebridge-status",e=>{this.uiOnline=!0,(e.status==="up"||e.status==="pending")&&(this.$toastr.success(this.$translate.instant("restart.toast_server_restarted"),this.$translate.instant("toast.title_success")),this.$router.navigate(["/"]))})},7e3),this.checkTimeout=setTimeout(()=>{this.$toastr.warning(this.$translate.instant("restart.toast_server_restart_timeout"),this.$translate.instant("toast.title_warning"),{timeOut:1e4}),this.timeout=!0},4e4)}static \u0275fac=function(s){return new(s||t)};static \u0275cmp=w({type:t,selectors:[["ng-component"]],decls:14,vars:8,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-fw","fa-power-off",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"alert","alert-error","my-4"],[1,"alert","alert-warning","my-4"],[1,"grey-text"],[1,"justify-content-center","my-4"],[1,"restart-progress-box","primary-text"],[3,"ngClass"],[1,"grey-text","mb-0"],[1,"font-monospace"],[1,"mt-2","mb-0"],[1,"btn","btn-primary","mb-0",3,"click"]],template:function(s,u){s&1&&(r(0,"div",0)(1,"h3",1),a(2),o(3,"translate"),n()(),r(4,"div",2)(5,"div",3),v(6,"i",4),n(),r(7,"div",5)(8,"h4",6),a(9),o(10,"translate"),n(),f(11,j,2,1,"div",7)(12,M,14,20),f(13,z,10,8,"div",8),n()()),s&2&&(i(2),c(l(3,4,"menu.restart.title")),i(7),c(l(10,6,"restart.title_restart")),i(2),_(u.error?11:12),i(2),_(u.timeout?13:-1))},dependencies:[T,I],styles:[".restart-progress-box[_ngcontent-%COMP%]{font-size:22px;font-weight:300;margin-top:15px}"]})}return t})();export{X as RestartComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as u,g as s}from"./chunk-GEIS2BWE.js";import{k as l,n as d}from"./chunk-
|
|
1
|
+
import{d as u,g as s}from"./chunk-GEIS2BWE.js";import{k as l,n as d}from"./chunk-K6OAGSPQ.js";import{a as p}from"./chunk-R3563DDE.js";import"./chunk-Q4CZ7LVK.js";import{ga as c,h as f,ha as i,la as e,nb as n,w as m}from"./chunk-ULJPS3WS.js";var a=(()=>{class t{$api=e(d);$router=e(u);$toastr=e(l);$translate=e(p);resolve(){return f(this,null,function*(){try{let o=yield m(this.$api.get("/config-editor"));return JSON.stringify(o,null,4)}catch(o){console.error(o),this.$toastr.error(o.message,this.$translate.instant("toast.title_error")),this.$router.navigate(["/"])}})}static \u0275fac=function(r){return new(r||t)};static \u0275prov=c({token:t,factory:t.\u0275fac})}return t})();var y=[{path:"",loadComponent:()=>import("./chunk-PPPQR4O4.js").then(t=>t.ConfigEditorComponent),resolve:{config:a}}],v=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=n({type:t});static \u0275inj=i({imports:[s.forChild(y),s]})}return t})();var T=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=n({type:t});static \u0275inj=i({providers:[a],imports:[v]})}return t})();export{T as ConfigEditorModule};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as p,b as w,c as b}from"./chunk-BG5MCCBU.js";import{a as d}from"./chunk-
|
|
1
|
+
import{a as p,b as w,c as b}from"./chunk-BG5MCCBU.js";import{a as d}from"./chunk-42ME5L3R.js";import{M as i,g as o,ga as m,la as h,n}from"./chunk-ULJPS3WS.js";var c=o(p(),1),a=o(w(),1),l=o(b(),1);var v=(()=>{class t{$ws=h(d);io;fitAddon;webLinksAddon;resize;elementResize;term;destroyTerminal(){this.io.end(),this.term.dispose(),this.resize.complete(),this.elementResize&&this.elementResize.complete()}startTerminal(r,s={},f){this.elementResize=f,this.io=this.$ws.connectToNamespace("platform-tools/terminal"),this.term=new c.Terminal(s),setTimeout(()=>{this.term.loadAddon(this.fitAddon),this.term.loadAddon(this.webLinksAddon)}),this.fitAddon=new a.FitAddon,this.webLinksAddon=new l.WebLinksAddon,this.resize=new n,this.term.open(r.nativeElement),setTimeout(()=>{this.fitAddon.activate(this.term),this.fitAddon.fit()}),this.io.connected.pipe(i(200)).subscribe(()=>{this.startSession()}),this.io.socket.on("disconnect",()=>{this.term.write(`
|
|
2
2
|
\r
|
|
3
3
|
\rTerminal disconnected. Is the server running?
|
|
4
4
|
\r
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as P}from"./chunk-HUAADM2I.js";import{a as O}from"./chunk-THGDS273.js";import{c as y,e as E,l as k,z as $}from"./chunk-WFYBML4S.js";import{b as D}from"./chunk-GEIS2BWE.js";import{b as L}from"./chunk-
|
|
1
|
+
import{a as P}from"./chunk-HUAADM2I.js";import{a as O}from"./chunk-THGDS273.js";import{c as y,e as E,l as k,z as $}from"./chunk-WFYBML4S.js";import{b as D}from"./chunk-GEIS2BWE.js";import{b as L}from"./chunk-6Y2OAEVG.js";import{k as I,n as H}from"./chunk-K6OAGSPQ.js";import{a as T}from"./chunk-R3563DDE.js";import"./chunk-Q4CZ7LVK.js";import{Ib as m,Jb as u,Ob as f,Pb as d,Qb as s,Rb as w,_b as g,ab as p,bc as _,dc as a,h as S,la as r,mb as x,qc as v,ra as l,sa as c,w as C,xc as b,yc as M,zc as V}from"./chunk-ULJPS3WS.js";function z(i,h){i&1&&w(0,"i",6)}function A(i,h){i&1&&w(0,"i",7)}function F(i,h){if(i&1){let t=g();d(0,"ngx-monaco-editor",10),_("onInit",function(e){l(t);let o=a();return c(o.onEditorInit(e))})("keydown.control.s",function(e){l(t);let o=a();return e.preventDefault(),c(o.onSave())})("keydown.meta.s",function(e){l(t);let o=a();return e.preventDefault(),c(o.onSave())}),s()}if(i&2){let t=a();f("options",t.editorOptions)("model",t.monacoEditorModel)}}function W(i,h){if(i&1){let t=g();d(0,"textarea",11),V("ngModelChange",function(e){l(t);let o=a();return M(o.startupScript,e)||(o.startupScript=e),c(e)}),v(1," "),s()}if(i&2){let t=a();b("ngModel",t.startupScript)}}var tt=(()=>{class i{$api=r(H);$md=r(O);$route=r(D);$settings=r(L);$toastr=r(I);$translate=r(T);lastHeight;visualViewPortEventCallback;startupScript;saveInProgress;isMobile=!1;options={printMargin:!1};monacoEditor;editorOptions;monacoEditorModel;constructor(){this.isMobile=this.$md.detect.mobile()}ngOnInit(){this.editorOptions={language:"shell",theme:this.$settings.actualLightingMode==="dark"?"vs-dark":"vs-light",automaticLayout:!0},this.visualViewPortEventCallback=()=>this.visualViewPortChanged(),this.lastHeight=window.innerHeight,window.visualViewport&&!this.isMobile&&(window.visualViewport.addEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.disableTouchMove()),this.$route.data.subscribe(t=>{this.startupScript=t.startupScript.script}),this.monacoEditorModel={value:"",language:"shell"}}onEditorInit(t){this.monacoEditor=t,this.monacoEditor.getModel().setValue(this.startupScript)}onSave(){return S(this,null,function*(){if(!this.saveInProgress){if(this.saveInProgress=!0,this.isMobile||(yield this.monacoEditor.getAction("editor.action.formatDocument").run(),this.startupScript=this.monacoEditor.getModel().getValue()),!["#!/bin/sh","#!/bin/bash"].includes(this.startupScript.split(`
|
|
2
2
|
`)[0].trim())){this.$toastr.error(this.$translate.instant("platform.docker.must_use_hashbang"),this.$translate.instant("toast.title_error")),this.startupScript=`#!/bin/sh
|
|
3
3
|
|
|
4
4
|
${this.startupScript}`,this.isMobile||this.monacoEditor.getModel().setValue(this.startupScript),this.saveInProgress=!1;return}try{yield C(this.$api.put("/platform-tools/docker/startup-script",{script:this.startupScript})),this.$toastr.success(this.$translate.instant("platform.docker.restart_required"),this.$translate.instant("platform.docker.script_saved"))}catch(t){console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error"))}this.saveInProgress=!1}})}ngOnDestroy(){window.visualViewport&&(window.visualViewport.removeEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.enableTouchMove()),this.monacoEditor&&this.monacoEditor.dispose()}visualViewPortChanged(){this.lastHeight<window.visualViewport.height&&document.activeElement.blur(),window.visualViewport.height<window.innerHeight?(this.$md.enableTouchMove(),this.lastHeight=window.visualViewport.height):window.visualViewport.height===window.innerHeight&&(this.$md.disableTouchMove(),this.lastHeight=window.visualViewport.height)}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=x({type:i,selectors:[["ng-component"]],decls:11,vars:4,consts:[[1,"flex-column","d-flex","align-items-stretch","h-100"],[1,"row","mb-3"],[1,"col-6"],[1,"primary-text","m-0","font-monospace"],[1,"col-6","text-end"],[1,"btn","btn-primary","waves-effect","m-0",3,"click","disabled"],[1,"fas","fa-fw","fa-spinner","fa-pulse"],[1,"fas","fa-fw","fa-floppy-disk"],[1,"flex-grow-1","h-100","w-100","my-2",3,"options","model"],["wrap","off","autocomplete","off","autocorrect","off","autocapitalize","off","spellcheck","false",1,"hb-plain-text-editor","align-self-end","h-100","w-100","my-2",3,"ngModel"],[1,"flex-grow-1","h-100","w-100","my-2",3,"onInit","keydown.control.s","keydown.meta.s","options","model"],["wrap","off","autocomplete","off","autocorrect","off","autocapitalize","off","spellcheck","false",1,"hb-plain-text-editor","align-self-end","h-100","w-100","my-2",3,"ngModelChange","ngModel"]],template:function(n,e){n&1&&(d(0,"div",0)(1,"div",1)(2,"div",2)(3,"h3",3),v(4,"startup.sh"),s()(),d(5,"div",4)(6,"button",5),_("click",function(){return e.onSave()}),m(7,z,1,0,"i",6)(8,A,1,0,"i",7),s()()(),m(9,F,1,2,"ngx-monaco-editor",8),m(10,W,2,1,"textarea",9),s()),n&2&&(p(6),f("disabled",e.saveInProgress),p(),u(e.saveInProgress?7:8),p(2),u(e.isMobile?-1:9),p(),u(e.isMobile?10:-1))},dependencies:[P,$,y,E,k],encapsulation:2})}return i})();export{tt as StartupScriptComponent};
|