homebridge-config-ui-x 5.0.0-beta.25 → 5.0.0-beta.26
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/package.json +1 -1
- package/public/3rdpartylicenses.txt +0 -70
- package/public/{chunk-R32JIOK7.js → chunk-2N2FIQZE.js} +1 -1
- package/public/{chunk-GWQ6LQZL.js → chunk-2OJNON6V.js} +1 -1
- package/public/{chunk-WGB7S5X7.js → chunk-2VNUUJGQ.js} +1 -1
- package/public/chunk-35GQ3F7V.js +1 -0
- package/public/{chunk-HUGKO4YQ.js → chunk-35ZEUC3N.js} +1 -1
- package/public/{chunk-466ZAM7C.js → chunk-36GSB6KM.js} +1 -1
- package/public/{chunk-VSKGHU6T.js → chunk-3G2INPN4.js} +1 -1
- package/public/{chunk-CALVGL3N.js → chunk-3VNR3PA7.js} +1 -1
- package/public/{chunk-4LIVGQGH.js → chunk-4HJ4QRHU.js} +1 -1
- package/public/{chunk-JCSR43VP.js → chunk-56Z7AYJ5.js} +1 -1
- package/public/chunk-6J7CM2LU.js +1 -0
- package/public/{chunk-FOYTSKFL.js → chunk-7ZMNAUG3.js} +1 -1
- package/public/chunk-AHQEC5XD.js +1 -0
- package/public/{chunk-GTXRRXBZ.js → chunk-B46KABOE.js} +1 -1
- package/public/{chunk-5GARK6H2.js → chunk-B753ANRE.js} +1 -1
- package/public/{chunk-T6YC67I2.js → chunk-BBIB7OOE.js} +1 -1
- package/public/chunk-BO2Q6JEC.js +1 -0
- package/public/chunk-BVU3XBKZ.js +1 -0
- package/public/chunk-D73G6FHU.js +1 -0
- package/public/{chunk-ABLKZIQ3.js → chunk-E4B7DNVE.js} +1 -1
- package/public/chunk-EFJQDZWX.js +1 -0
- package/public/{chunk-QADJSVPE.js → chunk-EMNTAE5G.js} +1 -1
- package/public/chunk-F6IIUWOY.js +1 -0
- package/public/{chunk-MV3ERMGJ.js → chunk-FAWZXXFU.js} +1 -1
- package/public/{chunk-TYU5VELI.js → chunk-H3RI2X3J.js} +1 -1
- package/public/{chunk-3YGT5XDE.js → chunk-H4TSN4GX.js} +1 -1
- package/public/{chunk-HTDHOIID.js → chunk-IPIDD3HC.js} +1 -1
- package/public/chunk-J5YJPEOP.js +1 -0
- package/public/{chunk-K2R3BPLP.js → chunk-JXNMTC4S.js} +1 -1
- package/public/{chunk-UKJNJQYA.js → chunk-KFOQEXZZ.js} +1 -1
- package/public/{chunk-UKPIYCWA.js → chunk-L2733SOJ.js} +1 -1
- package/public/{chunk-DWL7BAZR.js → chunk-MA2NAED5.js} +1 -1
- package/public/{chunk-WFTXQQES.js → chunk-N4F42HDL.js} +5 -5
- package/public/{chunk-FEBFQ3DL.js → chunk-N4GLNFOT.js} +1 -1
- package/public/{chunk-VEP4HNXH.js → chunk-NEHFSTZG.js} +1 -1
- package/public/{chunk-3S35VE6D.js → chunk-NF2LWORY.js} +1 -1
- package/public/{chunk-BWSYEFYX.js → chunk-OC7KX4QS.js} +1 -1
- package/public/{chunk-PKJCXZE5.js → chunk-OD3LAPR5.js} +1 -1
- package/public/{chunk-QYT5LYC6.js → chunk-OJ45QGCH.js} +1 -1
- package/public/{chunk-5MHVRMBE.js → chunk-ONUDLIEE.js} +1 -1
- package/public/{chunk-WBYIFSS4.js → chunk-OQEKVBVC.js} +1 -1
- package/public/{chunk-J6PRMQON.js → chunk-P6NTJCU3.js} +1 -1
- package/public/{chunk-BDIXMVA7.js → chunk-QXIVYED3.js} +1 -1
- package/public/chunk-SNISLJD4.js +1 -0
- package/public/{chunk-45QQI3VL.js → chunk-SRN6APE2.js} +1 -1
- package/public/{chunk-NU6AAZWI.js → chunk-SWSVESSY.js} +1 -1
- package/public/chunk-T5M25JEJ.js +1 -0
- package/public/{chunk-GDU27W4Y.js → chunk-T7Y7UGKU.js} +1 -1
- package/public/chunk-TILEZFVJ.js +1 -0
- package/public/{chunk-YUE3OQJS.js → chunk-TLJ5IZVT.js} +1 -1
- package/public/{chunk-E6TOS5PQ.js → chunk-TQEO2WY5.js} +1 -1
- package/public/{chunk-IPMME72S.js → chunk-U7623GKH.js} +1 -1
- package/public/{chunk-IMHBRR76.js → chunk-UIOHAIYB.js} +1 -1
- package/public/{chunk-3O7UXDCP.js → chunk-UPOTR3TI.js} +1 -1
- package/public/{chunk-D4Q2TS6P.js → chunk-V7MSRFYG.js} +1 -1
- package/public/chunk-VM7WUBIT.js +1 -0
- package/public/{chunk-ZW6ZWLX2.js → chunk-W5T6GB3H.js} +1 -1
- package/public/{chunk-AQQPDAYK.js → chunk-WJ3IINUA.js} +1 -1
- package/public/{chunk-BFPRGWPN.js → chunk-WRDAYUQ7.js} +1 -1
- package/public/{chunk-YIQ2YNEE.js → chunk-XLT7LNOY.js} +1 -1
- package/public/chunk-XROHACBE.js +1 -0
- package/public/chunk-XSAIQ7YY.js +1 -0
- package/public/{chunk-N2PCJZX2.js → chunk-YIXOCUUM.js} +1 -1
- package/public/{chunk-ZK726DZI.js → chunk-YMEQWVLZ.js} +1 -1
- package/public/index.html +1 -1
- package/public/{main-UX5KVBA6.js → main-HHNIKZ37.js} +1 -1
- package/public/chunk-3NLI5MWV.js +0 -1
- package/public/chunk-7CTHDMRF.js +0 -1
- package/public/chunk-DIFP2ZEW.js +0 -1
- package/public/chunk-DQUIBW3A.js +0 -1
- package/public/chunk-FMV2U5UJ.js +0 -1
- package/public/chunk-JN4FOPPF.js +0 -1
- package/public/chunk-MSB3OVAL.js +0 -1
- package/public/chunk-N5KOQEZ2.js +0 -1
- package/public/chunk-NITUCSNQ.js +0 -1
- package/public/chunk-OAHWWVO7.js +0 -1
- package/public/chunk-TKS2P7BY.js +0 -1
- package/public/chunk-TVWBCLU3.js +0 -1
- package/public/chunk-TYGAKDLQ.js +0 -1
- package/public/chunk-WJ474LWO.js +0 -1
- package/public/chunk-WV6F7JKU.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as X}from"./chunk-ZW6ZWLX2.js";import{n as j}from"./chunk-WFTXQQES.js";import{c as M,d as C,e as P,f as V,g as O,j as F,m as R,p as W,q as N,y as D,z as G}from"./chunk-YLEC7AUG.js";import{e as L}from"./chunk-T3GI7KUT.js";import{c as Q}from"./chunk-E6TOS5PQ.js";import{b as J}from"./chunk-R32JIOK7.js";import{h as q,j as I,k as K}from"./chunk-N2PCJZX2.js";import{l as B}from"./chunk-HA6CO5NZ.js";import{a as H,b as A}from"./chunk-675OFXLW.js";import{Bb as z,Cc as s,Dc as l,Mb as _,Rb as f,Wb as i,Xb as o,Yb as c,ac as y,bd as E,dc as b,ec as m,h as w,ib as t,na as g,oc as a,pc as d,qc as v,ub as T,w as S,xa as x,ya as h,yc as $,zc as k}from"./chunk-CKNHTRCL.js";var U=(n,u)=>({"is-valid":n,"is-invalid":u}),Z=n=>({"button-loading":n});function ee(n,u){if(n&1){let e=y();i(0,"div",2),c(1,"img",3),i(2,"h3",4),a(3),s(4,"translate"),o(),i(5,"button",5),b("click",function(){x(e);let p=m();return h(p.onClickGettingStarted())}),a(6),s(7,"translate"),o(),i(8,"small",6)(9,"a",7),b("click",function(){x(e);let p=m();return h(p.onClickRestoreBackup())}),a(10),s(11,"translate"),o()()()}n&2&&(t(3),d(l(4,3,"setup.welcome_to_homebridge")),t(3),v(" ",l(7,5,"setup.button_get_started")," "),t(4),d(l(11,7,"setup_wizard_message_restore")))}function te(n,u){if(n&1){let e=y();i(0,"div",2),c(1,"img",8),i(2,"h3",4),a(3),s(4,"translate"),o(),i(5,"div",9)(6,"p"),a(7),s(8,"translate"),o(),i(9,"form",10),b("ngSubmit",function(){x(e);let p=m();return h(p.createFirstUser())}),i(10,"div",11),c(11,"i",12)(12,"input",13),i(13,"label",14),a(14),s(15,"translate"),o()(),i(16,"div",11),c(17,"i",15)(18,"input",16),i(19,"label",17),a(20),s(21,"translate"),o()(),i(22,"div",11),c(23,"i",15)(24,"input",18),i(25,"label",19),a(26),s(27,"translate"),o()(),i(28,"div",20)(29,"button",21),a(30),s(31,"translate"),c(32,"i",22),o()()()()()}if(n&2){let e=m();t(3),d(l(4,15,"setup.create_account")),t(4),d(l(8,17,"setup.create_account_reason")),t(2),_("formGroup",e.createUserForm),t(3),_("readonly",e.loading)("ngClass",k(27,U,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.valid,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.invalid)),t(2),d(l(15,19,"users.label_username")),t(4),_("readonly",e.loading)("ngClass",k(30,U,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.valid,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.errors)),t(2),d(l(21,21,"users.label_password")),t(4),_("readonly",e.loading)("ngClass",k(33,U,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.valid,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.errors)),t(2),d(l(27,23,"users.label_confirm_password")),t(3),_("disabled",e.createUserForm.invalid||e.loading)("ngClass",$(36,Z,e.loading)),t(),v(" ",l(31,25,"setup.create_account")," ")}}function ie(n,u){n&1&&(i(0,"span"),c(1,"i",29),a(2),s(3,"translate"),o()),n&2&&(t(2),v(" ",l(3,1,"backup.label_uploading")," "))}function ne(n,u){n&1&&(i(0,"span"),a(1),s(2,"translate"),o()),n&2&&(t(),d(l(2,1,"backup.button_restore_backup")))}function oe(n,u){if(n&1){let e=y();i(0,"div",2),c(1,"img",8),i(2,"h3",4),a(3),s(4,"translate"),o(),i(5,"p"),a(6),s(7,"translate"),o(),i(8,"div",23)(9,"input",24),b("change",function(p){x(e);let Y=m();return h(Y.handleRestoreFileInput(p.target.files))}),o(),i(10,"label",25),a(11),s(12,"translate"),o()(),i(13,"div",26)(14,"button",27),b("click",function(){x(e);let p=m();return h(p.onClickCancelRestore())}),a(15),s(16,"translate"),o(),i(17,"button",28),b("click",function(){x(e);let p=m();return h(p.onRestoreBackupClick())}),z(18,ie,4,3,"span")(19,ne,3,3,"span"),o()()()}if(n&2){let e=m();t(3),d(l(4,8,"form.button_restore")),t(3),d(l(7,10,"backup.restore_help_one")),t(5),v(" ",l(12,12,(e.selectedFile==null?null:e.selectedFile.name)||"backup.label_choose_backup_file_to_restore")," "),t(3),_("disabled",e.restoreUploadStarted),t(),v(" ",l(16,14,"form.button_cancel")," "),t(2),_("disabled",e.restoreUploading||!e.selectedFile),t(),f(e.restoreUploading?18:-1),t(),f(e.restoreUploading?-1:19)}}function re(n,u){n&1&&(i(0,"div",2),c(1,"img",8),i(2,"h3",4),a(3),s(4,"translate"),o(),i(5,"h1"),c(6,"i",29),o()()),n&2&&(t(3),d(l(4,1,"restart.title_restart")))}function ae(n,u){n&1&&(i(0,"div",2),c(1,"img",8),i(2,"h3",30),a(3),s(4,"translate"),o(),i(5,"p",31),a(6),s(7,"translate"),o(),i(8,"a",32),a(9),s(10,"translate"),o()()),n&2&&(t(3),d(l(4,3,"setup_wizard_message_complete_title")),t(3),d(l(7,5,"setup_wizard_message_complete_message")),t(3),d(l(10,7,"setup.open_dashboard")))}var ye=(()=>{class n{$api=g(K);$auth=g(Q);$modal=g(j);$settings=g(J);$title=g(B);$toastr=g(q);$translate=g(H);previousTitle;step="welcome";createUserForm=new O({username:new F("",[C.required]),password:new F("",[C.compose([C.required,C.minLength(4)])]),passwordConfirm:new F("",[C.required])},this.matchPassword);loading=!1;selectedFile;restoreUploading=!1;constructor(){}ngOnInit(){this.previousTitle=this.$title.getTitle(),this.$title.setTitle("Setup Homebridge")}matchPassword(e){let r=e.get("password").value,p=e.get("passwordConfirm").value;if(r!==p)e.get("passwordConfirm").setErrors({matchPassword:!0});else return null}ngOnDestroy(){this.$title.setTitle(this.previousTitle)}onClickGettingStarted(){this.step="create-account"}onClickRestoreBackup(){this.step="restore-backup"}onClickCancelRestore(){this.selectedFile=null,this.step="welcome"}createFirstUser(){this.loading=!0;let e=this.createUserForm.getRawValue();e.name=e.username,this.$api.post("/setup-wizard/create-first-user",e).subscribe({next:()=>w(this,null,function*(){this.$settings.env.setupWizardComplete=!0,yield this.$auth.login({username:e.username,password:e.password}),this.step="setup-complete"}),error:r=>{this.loading=!1,console.error(r),this.$toastr.error(r.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}handleRestoreFileInput(e){e.length?this.selectedFile=e[0]:delete this.selectedFile}onRestoreBackupClick(){this.restoreUploading=!0,this.uploadHomebridgeArchive()}uploadHomebridgeArchive(){return w(this,null,function*(){try{let e=yield S(this.$api.get("/setup-wizard/get-setup-wizard-token"));window.localStorage.setItem(I.jwt.tokenKey,e.access_token),this.$auth.token=e.access_token;let r=new FormData;r.append("restoreArchive",this.selectedFile,this.selectedFile.name),yield S(this.$api.post("/backup/restore",r)),this.openRestoreModal(),this.restoreUploading=!1}catch(e){this.restoreUploading=!1,console.error(e),this.$toastr.error(e.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}openRestoreModal(){let e=this.$modal.open(X,{size:"lg",backdrop:"static"});e.componentInstance.setupWizardRestore=!0,e.result.then(r=>{r===!0&&this.waitForHomebridgeToRestart()})}waitForHomebridgeToRestart(){return w(this,null,function*(){this.step="restarting",window.localStorage.removeItem(I.jwt.tokenKey),this.$auth.token=null,yield new Promise(r=>setTimeout(r,15e3));let e=setInterval(()=>w(this,null,function*(){try{yield S(this.$api.get("/auth/settings")),clearInterval(e),location.reload()}catch{}}),1e3)})}static \u0275fac=function(r){return new(r||n)};static \u0275cmp=T({type:n,selectors:[["ng-component"]],decls:7,vars:5,consts:[[1,"setup-container","d-flex","align-items-center","justify-content-center"],[1,"w-100","setup-card","d-flex","py-5"],[1,"w-100","d-flex","flex-column","align-items-center"],["src","/assets/homebridge-color-round.svg","alt","hb logo",1,"homebridge-logo","mx-auto"],[1,"pt-4","pb-3","text-center"],["type","button",1,"btn","btn-lg","btn-primary",3,"click"],[1,"mt-3"],["href","javascript:void(0)",1,"grey-text",3,"click"],["src","/assets/homebridge-color-round.svg","alt","hb logo",1,"homebridge-logo","homebridge-logo-small","mx-auto"],[1,"w-100"],["novalidate","",3,"ngSubmit","formGroup"],[1,"md-form"],[1,"fas","fa-fw","fa-user","prefix","grey-text"],["formControlName","username","type","text","id","form-username","autocomplete","username","autocapitalize","none","tabindex","1",1,"form-control","px-0",3,"readonly","ngClass"],["for","form-username"],[1,"fas","fa-fw","fa-lock","prefix","grey-text"],["formControlName","password","type","password","id","form-pass","autocomplete","new-password","tabindex","2",1,"form-control","px-0",3,"readonly","ngClass"],["for","form-pass"],["formControlName","passwordConfirm","type","password","id","form-pass-confirm","autocomplete","new-password","tabindex","2",1,"form-control","px-0",3,"readonly","ngClass"],["for","form-pass-confirm"],[1,"w-100","text-center"],["type","submit",1,"btn","btn-primary",3,"disabled","ngClass"],[1,"button-loading-overlay","fas","fa-fw","fa-spinner","fa-pulse"],[1,"custom-file"],["type","file","id","restoreFileUpload","accept","application/gzip, .gz",1,"custom-file-input",3,"change"],["for","restoreFileUpload",1,"custom-file-label"],[1,"mt-3","w-100","d-flex","justify-content-between"],["type","button",1,"btn","btn-elegant","ml-0",3,"click","disabled"],["type","button",1,"btn","btn-primary","mr-0",3,"click","disabled"],[1,"fas","fa-fw","fa-spinner","fa-pulse"],[1,"pt-4","pb-3"],[1,"text-center"],["routerLink","/",1,"btn","btn-lg","btn-primary","mt-3"]],template:function(r,p){r&1&&(i(0,"div",0)(1,"div",1),z(2,ee,12,9,"div",2)(3,te,33,38,"div",2)(4,oe,20,16,"div",2)(5,re,7,3,"div",2)(6,ae,11,9,"div",2),o()()),r&2&&(t(2),f(p.step==="welcome"?2:-1),t(),f(p.step==="create-account"?3:-1),t(),f(p.step==="restore-backup"?4:-1),t(),f(p.step==="restarting"?5:-1),t(),f(p.step==="setup-complete"?6:-1))},dependencies:[D,R,M,P,V,G,W,N,E,L,A],styles:[".setup-container[_ngcontent-%COMP%]{background-size:cover;z-index:-1;padding-top:1em;padding-bottom:1em}@media screen and (min-height: 500px) and (min-width: 600px){.setup-container[_ngcontent-%COMP%]{padding-top:4em}}.setup-card[_ngcontent-%COMP%]{max-width:600px;border-radius:15px;background-color:#fff;padding-right:25px;padding-left:25px}.setup-card[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{background-color:inherit!important}@media screen and (max-width: 600px){.setup-card[_ngcontent-%COMP%]{margin-left:1em;margin-right:1em}} body.dark-mode .setup-card{background-color:#2b2b2b;color:#fff}.homebridge-logo[_ngcontent-%COMP%]{margin-right:10px;height:200px}@media screen and (max-height: 500px){.homebridge-logo[_ngcontent-%COMP%]{height:100px}}@media screen and (max-width: 600px){.homebridge-logo[_ngcontent-%COMP%]{height:100px}}.homebridge-logo-small[_ngcontent-%COMP%]{height:50px}.button-loading[_ngcontent-%COMP%]{position:relative;color:#0000}.button-loading[_ngcontent-%COMP%] .button-loading-overlay[_ngcontent-%COMP%]{display:block;color:#fff}.button-loading-overlay[_ngcontent-%COMP%]{display:none;position:absolute;top:9px;left:0;right:0}small[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})}return n})();export{ye as a};
|
|
1
|
+
import{a as X}from"./chunk-W5T6GB3H.js";import{n as j}from"./chunk-N4F42HDL.js";import{c as M,d as C,e as P,f as V,g as O,j as F,m as R,p as W,q as N,y as D,z as G}from"./chunk-YLEC7AUG.js";import{e as L}from"./chunk-T3GI7KUT.js";import{c as Q}from"./chunk-TQEO2WY5.js";import{b as J}from"./chunk-2N2FIQZE.js";import{h as q,j as I,k as K}from"./chunk-YIXOCUUM.js";import{l as B}from"./chunk-HA6CO5NZ.js";import{a as H,b as A}from"./chunk-675OFXLW.js";import{Bb as z,Cc as s,Dc as l,Mb as _,Rb as f,Wb as i,Xb as o,Yb as c,ac as y,bd as E,dc as b,ec as m,h as w,ib as t,na as g,oc as a,pc as d,qc as v,ub as T,w as S,xa as x,ya as h,yc as $,zc as k}from"./chunk-CKNHTRCL.js";var U=(n,u)=>({"is-valid":n,"is-invalid":u}),Z=n=>({"button-loading":n});function ee(n,u){if(n&1){let e=y();i(0,"div",2),c(1,"img",3),i(2,"h3",4),a(3),s(4,"translate"),o(),i(5,"button",5),b("click",function(){x(e);let p=m();return h(p.onClickGettingStarted())}),a(6),s(7,"translate"),o(),i(8,"small",6)(9,"a",7),b("click",function(){x(e);let p=m();return h(p.onClickRestoreBackup())}),a(10),s(11,"translate"),o()()()}n&2&&(t(3),d(l(4,3,"setup.welcome_to_homebridge")),t(3),v(" ",l(7,5,"setup.button_get_started")," "),t(4),d(l(11,7,"setup_wizard_message_restore")))}function te(n,u){if(n&1){let e=y();i(0,"div",2),c(1,"img",8),i(2,"h3",4),a(3),s(4,"translate"),o(),i(5,"div",9)(6,"p"),a(7),s(8,"translate"),o(),i(9,"form",10),b("ngSubmit",function(){x(e);let p=m();return h(p.createFirstUser())}),i(10,"div",11),c(11,"i",12)(12,"input",13),i(13,"label",14),a(14),s(15,"translate"),o()(),i(16,"div",11),c(17,"i",15)(18,"input",16),i(19,"label",17),a(20),s(21,"translate"),o()(),i(22,"div",11),c(23,"i",15)(24,"input",18),i(25,"label",19),a(26),s(27,"translate"),o()(),i(28,"div",20)(29,"button",21),a(30),s(31,"translate"),c(32,"i",22),o()()()()()}if(n&2){let e=m();t(3),d(l(4,15,"setup.create_account")),t(4),d(l(8,17,"setup.create_account_reason")),t(2),_("formGroup",e.createUserForm),t(3),_("readonly",e.loading)("ngClass",k(27,U,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.valid,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.invalid)),t(2),d(l(15,19,"users.label_username")),t(4),_("readonly",e.loading)("ngClass",k(30,U,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.valid,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.errors)),t(2),d(l(21,21,"users.label_password")),t(4),_("readonly",e.loading)("ngClass",k(33,U,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.valid,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.errors)),t(2),d(l(27,23,"users.label_confirm_password")),t(3),_("disabled",e.createUserForm.invalid||e.loading)("ngClass",$(36,Z,e.loading)),t(),v(" ",l(31,25,"setup.create_account")," ")}}function ie(n,u){n&1&&(i(0,"span"),c(1,"i",29),a(2),s(3,"translate"),o()),n&2&&(t(2),v(" ",l(3,1,"backup.label_uploading")," "))}function ne(n,u){n&1&&(i(0,"span"),a(1),s(2,"translate"),o()),n&2&&(t(),d(l(2,1,"backup.button_restore_backup")))}function oe(n,u){if(n&1){let e=y();i(0,"div",2),c(1,"img",8),i(2,"h3",4),a(3),s(4,"translate"),o(),i(5,"p"),a(6),s(7,"translate"),o(),i(8,"div",23)(9,"input",24),b("change",function(p){x(e);let Y=m();return h(Y.handleRestoreFileInput(p.target.files))}),o(),i(10,"label",25),a(11),s(12,"translate"),o()(),i(13,"div",26)(14,"button",27),b("click",function(){x(e);let p=m();return h(p.onClickCancelRestore())}),a(15),s(16,"translate"),o(),i(17,"button",28),b("click",function(){x(e);let p=m();return h(p.onRestoreBackupClick())}),z(18,ie,4,3,"span")(19,ne,3,3,"span"),o()()()}if(n&2){let e=m();t(3),d(l(4,8,"form.button_restore")),t(3),d(l(7,10,"backup.restore_help_one")),t(5),v(" ",l(12,12,(e.selectedFile==null?null:e.selectedFile.name)||"backup.label_choose_backup_file_to_restore")," "),t(3),_("disabled",e.restoreUploadStarted),t(),v(" ",l(16,14,"form.button_cancel")," "),t(2),_("disabled",e.restoreUploading||!e.selectedFile),t(),f(e.restoreUploading?18:-1),t(),f(e.restoreUploading?-1:19)}}function re(n,u){n&1&&(i(0,"div",2),c(1,"img",8),i(2,"h3",4),a(3),s(4,"translate"),o(),i(5,"h1"),c(6,"i",29),o()()),n&2&&(t(3),d(l(4,1,"restart.title_restart")))}function ae(n,u){n&1&&(i(0,"div",2),c(1,"img",8),i(2,"h3",30),a(3),s(4,"translate"),o(),i(5,"p",31),a(6),s(7,"translate"),o(),i(8,"a",32),a(9),s(10,"translate"),o()()),n&2&&(t(3),d(l(4,3,"setup_wizard_message_complete_title")),t(3),d(l(7,5,"setup_wizard_message_complete_message")),t(3),d(l(10,7,"setup.open_dashboard")))}var ye=(()=>{class n{$api=g(K);$auth=g(Q);$modal=g(j);$settings=g(J);$title=g(B);$toastr=g(q);$translate=g(H);previousTitle;step="welcome";createUserForm=new O({username:new F("",[C.required]),password:new F("",[C.compose([C.required,C.minLength(4)])]),passwordConfirm:new F("",[C.required])},this.matchPassword);loading=!1;selectedFile;restoreUploading=!1;constructor(){}ngOnInit(){this.previousTitle=this.$title.getTitle(),this.$title.setTitle("Setup Homebridge")}matchPassword(e){let r=e.get("password").value,p=e.get("passwordConfirm").value;if(r!==p)e.get("passwordConfirm").setErrors({matchPassword:!0});else return null}ngOnDestroy(){this.$title.setTitle(this.previousTitle)}onClickGettingStarted(){this.step="create-account"}onClickRestoreBackup(){this.step="restore-backup"}onClickCancelRestore(){this.selectedFile=null,this.step="welcome"}createFirstUser(){this.loading=!0;let e=this.createUserForm.getRawValue();e.name=e.username,this.$api.post("/setup-wizard/create-first-user",e).subscribe({next:()=>w(this,null,function*(){this.$settings.env.setupWizardComplete=!0,yield this.$auth.login({username:e.username,password:e.password}),this.step="setup-complete"}),error:r=>{this.loading=!1,console.error(r),this.$toastr.error(r.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}handleRestoreFileInput(e){e.length?this.selectedFile=e[0]:delete this.selectedFile}onRestoreBackupClick(){this.restoreUploading=!0,this.uploadHomebridgeArchive()}uploadHomebridgeArchive(){return w(this,null,function*(){try{let e=yield S(this.$api.get("/setup-wizard/get-setup-wizard-token"));window.localStorage.setItem(I.jwt.tokenKey,e.access_token),this.$auth.token=e.access_token;let r=new FormData;r.append("restoreArchive",this.selectedFile,this.selectedFile.name),yield S(this.$api.post("/backup/restore",r)),this.openRestoreModal(),this.restoreUploading=!1}catch(e){this.restoreUploading=!1,console.error(e),this.$toastr.error(e.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}openRestoreModal(){let e=this.$modal.open(X,{size:"lg",backdrop:"static"});e.componentInstance.setupWizardRestore=!0,e.result.then(r=>{r===!0&&this.waitForHomebridgeToRestart()})}waitForHomebridgeToRestart(){return w(this,null,function*(){this.step="restarting",window.localStorage.removeItem(I.jwt.tokenKey),this.$auth.token=null,yield new Promise(r=>setTimeout(r,15e3));let e=setInterval(()=>w(this,null,function*(){try{yield S(this.$api.get("/auth/settings")),clearInterval(e),location.reload()}catch{}}),1e3)})}static \u0275fac=function(r){return new(r||n)};static \u0275cmp=T({type:n,selectors:[["ng-component"]],decls:7,vars:5,consts:[[1,"setup-container","d-flex","align-items-center","justify-content-center"],[1,"w-100","setup-card","d-flex","py-5"],[1,"w-100","d-flex","flex-column","align-items-center"],["src","/assets/homebridge-color-round.svg","alt","hb logo",1,"homebridge-logo","mx-auto"],[1,"pt-4","pb-3","text-center"],["type","button",1,"btn","btn-lg","btn-primary",3,"click"],[1,"mt-3"],["href","javascript:void(0)",1,"grey-text",3,"click"],["src","/assets/homebridge-color-round.svg","alt","hb logo",1,"homebridge-logo","homebridge-logo-small","mx-auto"],[1,"w-100"],["novalidate","",3,"ngSubmit","formGroup"],[1,"md-form"],[1,"fas","fa-fw","fa-user","prefix","grey-text"],["formControlName","username","type","text","id","form-username","autocomplete","username","autocapitalize","none","tabindex","1",1,"form-control","px-0",3,"readonly","ngClass"],["for","form-username"],[1,"fas","fa-fw","fa-lock","prefix","grey-text"],["formControlName","password","type","password","id","form-pass","autocomplete","new-password","tabindex","2",1,"form-control","px-0",3,"readonly","ngClass"],["for","form-pass"],["formControlName","passwordConfirm","type","password","id","form-pass-confirm","autocomplete","new-password","tabindex","2",1,"form-control","px-0",3,"readonly","ngClass"],["for","form-pass-confirm"],[1,"w-100","text-center"],["type","submit",1,"btn","btn-primary",3,"disabled","ngClass"],[1,"button-loading-overlay","fas","fa-fw","fa-spinner","fa-pulse"],[1,"custom-file"],["type","file","id","restoreFileUpload","accept","application/gzip, .gz",1,"custom-file-input",3,"change"],["for","restoreFileUpload",1,"custom-file-label"],[1,"mt-3","w-100","d-flex","justify-content-between"],["type","button",1,"btn","btn-elegant","ml-0",3,"click","disabled"],["type","button",1,"btn","btn-primary","mr-0",3,"click","disabled"],[1,"fas","fa-fw","fa-spinner","fa-pulse"],[1,"pt-4","pb-3"],[1,"text-center"],["routerLink","/",1,"btn","btn-lg","btn-primary","mt-3"]],template:function(r,p){r&1&&(i(0,"div",0)(1,"div",1),z(2,ee,12,9,"div",2)(3,te,33,38,"div",2)(4,oe,20,16,"div",2)(5,re,7,3,"div",2)(6,ae,11,9,"div",2),o()()),r&2&&(t(2),f(p.step==="welcome"?2:-1),t(),f(p.step==="create-account"?3:-1),t(),f(p.step==="restore-backup"?4:-1),t(),f(p.step==="restarting"?5:-1),t(),f(p.step==="setup-complete"?6:-1))},dependencies:[D,R,M,P,V,G,W,N,E,L,A],styles:[".setup-container[_ngcontent-%COMP%]{background-size:cover;z-index:-1;padding-top:1em;padding-bottom:1em}@media screen and (min-height: 500px) and (min-width: 600px){.setup-container[_ngcontent-%COMP%]{padding-top:4em}}.setup-card[_ngcontent-%COMP%]{max-width:600px;border-radius:15px;background-color:#fff;padding-right:25px;padding-left:25px}.setup-card[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{background-color:inherit!important}@media screen and (max-width: 600px){.setup-card[_ngcontent-%COMP%]{margin-left:1em;margin-right:1em}} body.dark-mode .setup-card{background-color:#2b2b2b;color:#fff}.homebridge-logo[_ngcontent-%COMP%]{margin-right:10px;height:200px}@media screen and (max-height: 500px){.homebridge-logo[_ngcontent-%COMP%]{height:100px}}@media screen and (max-width: 600px){.homebridge-logo[_ngcontent-%COMP%]{height:100px}}.homebridge-logo-small[_ngcontent-%COMP%]{height:50px}.button-loading[_ngcontent-%COMP%]{position:relative;color:#0000}.button-loading[_ngcontent-%COMP%] .button-loading-overlay[_ngcontent-%COMP%]{display:block;color:#fff}.button-loading-overlay[_ngcontent-%COMP%]{display:none;position:absolute;top:9px;left:0;right:0}small[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})}return n})();export{ye as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-SWSVESSY.js";import"./chunk-T7Y7UGKU.js";import"./chunk-T3GI7KUT.js";import"./chunk-TQEO2WY5.js";import"./chunk-2N2FIQZE.js";import"./chunk-YIXOCUUM.js";import"./chunk-HA6CO5NZ.js";import"./chunk-675OFXLW.js";import"./chunk-CKNHTRCL.js";export{a as ContainerRestartComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as f}from"./chunk-H3RI2X3J.js";import{a as s}from"./chunk-56Z7AYJ5.js";import"./chunk-FAWZXXFU.js";import"./chunk-23M23WV2.js";import"./chunk-TLJ5IZVT.js";import"./chunk-E4B7DNVE.js";import"./chunk-NSCP3SOQ.js";import"./chunk-5KLZWFYX.js";import"./chunk-4HJ4QRHU.js";import"./chunk-C2XBPNOQ.js";import"./chunk-474BOAR2.js";import"./chunk-7BCHGXO4.js";import"./chunk-SRN6APE2.js";import"./chunk-XFK2EZ3K.js";import"./chunk-JF5AT3NK.js";import"./chunk-YMEQWVLZ.js";import{q as l}from"./chunk-N4F42HDL.js";import{y as m,z as u}from"./chunk-YLEC7AUG.js";import"./chunk-T7Y7UGKU.js";import{g as e}from"./chunk-T3GI7KUT.js";import"./chunk-TQEO2WY5.js";import"./chunk-2N2FIQZE.js";import"./chunk-YIXOCUUM.js";import"./chunk-HA6CO5NZ.js";import{c as p}from"./chunk-675OFXLW.js";import{ia as t,kd as n,vb as r}from"./chunk-CKNHTRCL.js";var g=[{path:"",loadComponent:()=>import("./chunk-AHQEC5XD.js").then(o=>o.PluginsComponent)}],d=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[e.forChild(g),e]})}return o})();var v=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[n,m,u,p.forChild(),l,f,d,s]})}return o})();export{v as PluginsModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as dt,m as pt}from"./chunk-HA6CO5NZ.js";import{Bb as S,Ca as H,Ga as z,Kb as k,Lb as E,Mb as l,Nb as F,Pb as p,Tc as K,Wb as h,Xb as m,Yb as j,Zb as q,_b as G,a as u,ac as U,b as T,cb as lt,cc as ht,db as L,dc as R,dd as Q,e as It,ec as c,ha as C,ia as ot,ib as r,jb as v,ka as rt,ma as w,mb as ct,n as g,na as _,oc as f,qa as at,qb as O,qc as y,ub as Z,vb as ut,xa as $,ya as V}from"./chunk-CKNHTRCL.js";var Tt=It((fe,qt)=>{qt.exports={name:"homebridge-config-ui-x",displayName:"Homebridge UI",version:"5.0.0-beta.25",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:"^18 || ^20 || ^22",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":"11.1.1","@fastify/multipart":"8.3.0","@fastify/static":"7.0.4","@homebridge/hap-client":"2.0.5","@homebridge/node-pty-prebuilt-multiarch":"0.12.0-beta.5","@nestjs/axios":"3.1.3","@nestjs/common":"10.4.15","@nestjs/core":"10.4.15","@nestjs/jwt":"10.2.0","@nestjs/passport":"10.0.3","@nestjs/platform-fastify":"10.4.15","@nestjs/platform-socket.io":"10.4.15","@nestjs/swagger":"8.1.0","@nestjs/websockets":"10.4.15",axios:"1.7.9","bash-color":"0.0.4","buffer-shims":"1.0.0","class-transformer":"0.5.1","class-validator":"0.14.1",commander:"12.1.0",dayjs:"1.11.13",fastify:"4.29.0","fs-extra":"11.2.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.1",semver:"7.6.3",systeminformation:"5.23.23",tail:"2.2.6",tar:"7.4.3","tcp-port-used":"1.0.2",unzipper:"0.12.3"},devDependencies:{"@antfu/eslint-config":"^3.12.1","@nestjs/testing":"^10.4.15","@prettier/plugin-xml":"^3.4.1","@types/fs-extra":"^11.0.4","@types/lodash":"^4.17.13","@types/node":"^22.10.2","@types/node-schedule":"^2.1.7","@types/passport-jwt":"^4.0.1","@types/semver":"^7.5.8","@types/tail":"^2.2.3","@types/tcp-port-used":"^1.0.4","@types/unzipper":"^0.10.10","@vitest/coverage-v8":"^2.1.8",concurrently:"^9.1.1","eslint-plugin-format":"^0.1.3","form-data":"^4.0.1",nodemon:"^3.1.9",rimraf:"^6.0.1","ts-loader":"^9.5.1","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0",typescript:"^5.7.2","unplugin-swc":"^1.5.1",vitest:"^2.1.8"},overrides:{"@nestjs/platform-fastify":{fastify:"4.29.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"}]}});var b=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}(b||{}),Gt="*";function gt(i,s){return{type:b.Trigger,name:i,definitions:s,options:{}}}function Y(i,s=null){return{type:b.Animate,styles:s,timings:i}}function Ut(i,s=null){return{type:b.Sequence,steps:i,options:s}}function N(i){return{type:b.Style,styles:i,offset:null}}function M(i,s,t){return{type:b.State,name:i,styles:s,options:t}}function J(i,s,t=null){return{type:b.Transition,expr:i,animation:s,options:t}}var mt=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}},ft=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}},Kt="!";var _t=["toast-component",""];function Ot(i,s){if(i&1){let t=U();h(0,"button",5),R("click",function(){$(t);let n=c();return V(n.remove())}),h(1,"span",6),f(2,"\xD7"),m()()}}function St(i,s){if(i&1&&(q(0),f(1),G()),i&2){let t=c(2);r(),y("[",t.duplicatesCount+1,"]")}}function Et(i,s){if(i&1&&(h(0,"div"),f(1),S(2,St,2,1,"ng-container",4),m()),i&2){let t=c();p(t.options.titleClass),E("aria-label",t.title),r(),y(" ",t.title," "),r(),l("ngIf",t.duplicatesCount)}}function Ft(i,s){if(i&1&&j(0,"div",7),i&2){let t=c();p(t.options.messageClass),l("innerHTML",t.message,L)}}function jt(i,s){if(i&1&&(h(0,"div",8),f(1),m()),i&2){let t=c();p(t.options.messageClass),E("aria-label",t.message),r(),y(" ",t.message," ")}}function Rt(i,s){if(i&1&&(h(0,"div"),j(1,"div",9),m()),i&2){let t=c();r(),F("width",t.width()+"%")}}function At(i,s){if(i&1){let t=U();h(0,"button",5),R("click",function(){$(t);let n=c();return V(n.remove())}),h(1,"span",6),f(2,"\xD7"),m()()}}function Ht(i,s){if(i&1&&(q(0),f(1),G()),i&2){let t=c(2);r(),y("[",t.duplicatesCount+1,"]")}}function kt(i,s){if(i&1&&(h(0,"div"),f(1),S(2,Ht,2,1,"ng-container",4),m()),i&2){let t=c();p(t.options.titleClass),E("aria-label",t.title),r(),y(" ",t.title," "),r(),l("ngIf",t.duplicatesCount)}}function Nt(i,s){if(i&1&&j(0,"div",7),i&2){let t=c();p(t.options.messageClass),l("innerHTML",t.message,L)}}function Mt(i,s){if(i&1&&(h(0,"div",8),f(1),m()),i&2){let t=c();p(t.options.messageClass),E("aria-label",t.message),r(),y(" ",t.message," ")}}function Pt(i,s){if(i&1&&(h(0,"div"),j(1,"div",9),m()),i&2){let t=c();r(),F("width",t.width()+"%")}}var W=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}},X=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}},tt=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 rt("ToastConfig"),et=class extends X{_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]}},Bt=(()=>{class i{_document=_(K);_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})(),it=class{_portalHost;constructor(s){this._portalHost=s}attach(s,t=!0){return this._portalHost.attach(s,t)}detach(){return this._portalHost.detach()}},$t=(()=>{class i{_overlayContainer=_(Bt);_componentFactoryResolver=_(ct);_appRef=_(k);_document=_(K);_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 et(t,this._componentFactoryResolver,this._appRef)}_createOverlayRef(t){return new it(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 A=a&&d.title===t;if((!a||A)&&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 A=this.overlay.create(o.positionClass,this.overlayContainer);this.index=this.index+1;let st=e;e&&o.enableHtml&&(st=this.sanitizer.sanitize(lt.HTML,e));let x=new tt(A),P=new D(this.index,o,st,n,t,x),Ct=[{provide:D,useValue:P}],wt=H.create({providers:Ct,parent:this._injector}),Dt=new W(o.toastComponent,wt),nt=A.attach(Dt,o.newestOnTop);x.componentInstance=nt.instance;let B={toastId:this.index,title:n||"",message:e||"",toastRef:x,onShown:x.afterActivate(),onHidden:x.afterClosed(),onTap:P.onTap(),onAction:P.onAction(),portal:nt};return d||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{B.toastRef.activate()})),this.toasts.push(B),B}static \u0275fac=function(e){return new(e||i)(w(yt),w($t),w(H),w(pt),w(z))};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Vt=(()=>{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)(v(bt),v(D),v(z))};static \u0275cmp=Z({type:i,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(e,n){e&1&&R("click",function(){return n.tapToast()})("mouseenter",function(){return n.stickAround()})("mouseleave",function(){return n.delayedHideToast()}),e&2&&(ht("@flyInOut",n._state),p(n.toastClasses),F("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,Ot,3,0,"button",0)(1,Et,3,5,"div",1)(2,Ft,1,3,"div",2)(3,jt,2,4,"div",3)(4,Rt,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:[Q],encapsulation:2,data:{animation:[gt("flyInOut",[M("inactive",N({opacity:0})),M("active",N({opacity:1})),M("removed",N({opacity:0})),J("inactive => active",Y("{{ easeTime }}ms {{ easing }}")),J("active => removed",Y("{{ easeTime }}ms {{ easing }}"))])]},changeDetection:0})}return i})(),zt=T(u({},vt),{toastComponent:Vt}),Lt=(i={})=>at([{provide:yt,useValue:{default:zt,config:i}}]),he=(()=>{class i{static forRoot(t={}){return{ngModule:i,providers:[Lt(t)]}}static \u0275fac=function(e){return new(e||i)};static \u0275mod=ut({type:i});static \u0275inj=ot({})}return i})();var Zt=(()=>{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)(v(bt),v(D),v(k))};static \u0275cmp=Z({type:i,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(e,n){e&1&&R("click",function(){return n.tapToast()})("mouseenter",function(){return n.stickAround()})("mouseleave",function(){return n.delayedHideToast()}),e&2&&(p(n.toastClasses),F("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,At,3,0,"button",0)(1,kt,3,5,"div",1)(2,Nt,1,3,"div",2)(3,Mt,2,4,"div",3)(4,Pt,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:[Q],encapsulation:2,changeDetection:0})}return i})(),de=T(u({},vt),{toastComponent:Zt});var I={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 Te=(()=>{class i{$http=_(dt);constructor(){}get(t,e){return this.$http.get(`${I.api.base}${t}`,e)}post(t,e,n){return this.$http.post(`${I.api.base}${t}`,e,n)}put(t,e,n){return this.$http.put(`${I.api.base}${t}`,e,n)}patch(t,e,n){return this.$http.patch(`${I.api.base}${t}`,e,n)}delete(t,e){return this.$http.delete(`${I.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{b as a,Gt as b,Ut as c,N as d,mt as e,ft as f,Kt as g,bt as h,he as i,I as j,Te as k};
|
|
1
|
+
import{e as dt,m as pt}from"./chunk-HA6CO5NZ.js";import{Bb as S,Ca as H,Ga as z,Kb as k,Lb as E,Mb as l,Nb as F,Pb as p,Tc as K,Wb as h,Xb as m,Yb as j,Zb as q,_b as G,a as u,ac as U,b as T,cb as lt,cc as ht,db as L,dc as R,dd as Q,e as It,ec as c,ha as C,ia as ot,ib as r,jb as v,ka as rt,ma as w,mb as ct,n as g,na as _,oc as f,qa as at,qb as O,qc as y,ub as Z,vb as ut,xa as $,ya as V}from"./chunk-CKNHTRCL.js";var Tt=It((fe,qt)=>{qt.exports={name:"homebridge-config-ui-x",displayName:"Homebridge UI",version:"5.0.0-beta.26",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:"^18 || ^20 || ^22",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":"11.1.1","@fastify/multipart":"8.3.0","@fastify/static":"7.0.4","@homebridge/hap-client":"2.0.5","@homebridge/node-pty-prebuilt-multiarch":"0.12.0-beta.5","@nestjs/axios":"3.1.3","@nestjs/common":"10.4.15","@nestjs/core":"10.4.15","@nestjs/jwt":"10.2.0","@nestjs/passport":"10.0.3","@nestjs/platform-fastify":"10.4.15","@nestjs/platform-socket.io":"10.4.15","@nestjs/swagger":"8.1.0","@nestjs/websockets":"10.4.15",axios:"1.7.9","bash-color":"0.0.4","buffer-shims":"1.0.0","class-transformer":"0.5.1","class-validator":"0.14.1",commander:"12.1.0",dayjs:"1.11.13",fastify:"4.29.0","fs-extra":"11.2.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.1",semver:"7.6.3",systeminformation:"5.23.23",tail:"2.2.6",tar:"7.4.3","tcp-port-used":"1.0.2",unzipper:"0.12.3"},devDependencies:{"@antfu/eslint-config":"^3.12.1","@nestjs/testing":"^10.4.15","@prettier/plugin-xml":"^3.4.1","@types/fs-extra":"^11.0.4","@types/lodash":"^4.17.13","@types/node":"^22.10.2","@types/node-schedule":"^2.1.7","@types/passport-jwt":"^4.0.1","@types/semver":"^7.5.8","@types/tail":"^2.2.3","@types/tcp-port-used":"^1.0.4","@types/unzipper":"^0.10.10","@vitest/coverage-v8":"^2.1.8",concurrently:"^9.1.1","eslint-plugin-format":"^0.1.3","form-data":"^4.0.1",nodemon:"^3.1.9",rimraf:"^6.0.1","ts-loader":"^9.5.1","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0",typescript:"^5.7.2","unplugin-swc":"^1.5.1",vitest:"^2.1.8"},overrides:{"@nestjs/platform-fastify":{fastify:"4.29.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"}]}});var b=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}(b||{}),Gt="*";function gt(i,s){return{type:b.Trigger,name:i,definitions:s,options:{}}}function Y(i,s=null){return{type:b.Animate,styles:s,timings:i}}function Ut(i,s=null){return{type:b.Sequence,steps:i,options:s}}function N(i){return{type:b.Style,styles:i,offset:null}}function M(i,s,t){return{type:b.State,name:i,styles:s,options:t}}function J(i,s,t=null){return{type:b.Transition,expr:i,animation:s,options:t}}var mt=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}},ft=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}},Kt="!";var _t=["toast-component",""];function Ot(i,s){if(i&1){let t=U();h(0,"button",5),R("click",function(){$(t);let n=c();return V(n.remove())}),h(1,"span",6),f(2,"\xD7"),m()()}}function St(i,s){if(i&1&&(q(0),f(1),G()),i&2){let t=c(2);r(),y("[",t.duplicatesCount+1,"]")}}function Et(i,s){if(i&1&&(h(0,"div"),f(1),S(2,St,2,1,"ng-container",4),m()),i&2){let t=c();p(t.options.titleClass),E("aria-label",t.title),r(),y(" ",t.title," "),r(),l("ngIf",t.duplicatesCount)}}function Ft(i,s){if(i&1&&j(0,"div",7),i&2){let t=c();p(t.options.messageClass),l("innerHTML",t.message,L)}}function jt(i,s){if(i&1&&(h(0,"div",8),f(1),m()),i&2){let t=c();p(t.options.messageClass),E("aria-label",t.message),r(),y(" ",t.message," ")}}function Rt(i,s){if(i&1&&(h(0,"div"),j(1,"div",9),m()),i&2){let t=c();r(),F("width",t.width()+"%")}}function At(i,s){if(i&1){let t=U();h(0,"button",5),R("click",function(){$(t);let n=c();return V(n.remove())}),h(1,"span",6),f(2,"\xD7"),m()()}}function Ht(i,s){if(i&1&&(q(0),f(1),G()),i&2){let t=c(2);r(),y("[",t.duplicatesCount+1,"]")}}function kt(i,s){if(i&1&&(h(0,"div"),f(1),S(2,Ht,2,1,"ng-container",4),m()),i&2){let t=c();p(t.options.titleClass),E("aria-label",t.title),r(),y(" ",t.title," "),r(),l("ngIf",t.duplicatesCount)}}function Nt(i,s){if(i&1&&j(0,"div",7),i&2){let t=c();p(t.options.messageClass),l("innerHTML",t.message,L)}}function Mt(i,s){if(i&1&&(h(0,"div",8),f(1),m()),i&2){let t=c();p(t.options.messageClass),E("aria-label",t.message),r(),y(" ",t.message," ")}}function Pt(i,s){if(i&1&&(h(0,"div"),j(1,"div",9),m()),i&2){let t=c();r(),F("width",t.width()+"%")}}var W=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}},X=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}},tt=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 rt("ToastConfig"),et=class extends X{_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]}},Bt=(()=>{class i{_document=_(K);_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})(),it=class{_portalHost;constructor(s){this._portalHost=s}attach(s,t=!0){return this._portalHost.attach(s,t)}detach(){return this._portalHost.detach()}},$t=(()=>{class i{_overlayContainer=_(Bt);_componentFactoryResolver=_(ct);_appRef=_(k);_document=_(K);_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 et(t,this._componentFactoryResolver,this._appRef)}_createOverlayRef(t){return new it(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 A=a&&d.title===t;if((!a||A)&&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 A=this.overlay.create(o.positionClass,this.overlayContainer);this.index=this.index+1;let st=e;e&&o.enableHtml&&(st=this.sanitizer.sanitize(lt.HTML,e));let x=new tt(A),P=new D(this.index,o,st,n,t,x),Ct=[{provide:D,useValue:P}],wt=H.create({providers:Ct,parent:this._injector}),Dt=new W(o.toastComponent,wt),nt=A.attach(Dt,o.newestOnTop);x.componentInstance=nt.instance;let B={toastId:this.index,title:n||"",message:e||"",toastRef:x,onShown:x.afterActivate(),onHidden:x.afterClosed(),onTap:P.onTap(),onAction:P.onAction(),portal:nt};return d||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{B.toastRef.activate()})),this.toasts.push(B),B}static \u0275fac=function(e){return new(e||i)(w(yt),w($t),w(H),w(pt),w(z))};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Vt=(()=>{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)(v(bt),v(D),v(z))};static \u0275cmp=Z({type:i,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(e,n){e&1&&R("click",function(){return n.tapToast()})("mouseenter",function(){return n.stickAround()})("mouseleave",function(){return n.delayedHideToast()}),e&2&&(ht("@flyInOut",n._state),p(n.toastClasses),F("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,Ot,3,0,"button",0)(1,Et,3,5,"div",1)(2,Ft,1,3,"div",2)(3,jt,2,4,"div",3)(4,Rt,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:[Q],encapsulation:2,data:{animation:[gt("flyInOut",[M("inactive",N({opacity:0})),M("active",N({opacity:1})),M("removed",N({opacity:0})),J("inactive => active",Y("{{ easeTime }}ms {{ easing }}")),J("active => removed",Y("{{ easeTime }}ms {{ easing }}"))])]},changeDetection:0})}return i})(),zt=T(u({},vt),{toastComponent:Vt}),Lt=(i={})=>at([{provide:yt,useValue:{default:zt,config:i}}]),he=(()=>{class i{static forRoot(t={}){return{ngModule:i,providers:[Lt(t)]}}static \u0275fac=function(e){return new(e||i)};static \u0275mod=ut({type:i});static \u0275inj=ot({})}return i})();var Zt=(()=>{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)(v(bt),v(D),v(k))};static \u0275cmp=Z({type:i,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(e,n){e&1&&R("click",function(){return n.tapToast()})("mouseenter",function(){return n.stickAround()})("mouseleave",function(){return n.delayedHideToast()}),e&2&&(p(n.toastClasses),F("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,At,3,0,"button",0)(1,kt,3,5,"div",1)(2,Nt,1,3,"div",2)(3,Mt,2,4,"div",3)(4,Pt,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:[Q],encapsulation:2,changeDetection:0})}return i})(),de=T(u({},vt),{toastComponent:Zt});var I={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 Te=(()=>{class i{$http=_(dt);constructor(){}get(t,e){return this.$http.get(`${I.api.base}${t}`,e)}post(t,e,n){return this.$http.post(`${I.api.base}${t}`,e,n)}put(t,e,n){return this.$http.put(`${I.api.base}${t}`,e,n)}patch(t,e,n){return this.$http.patch(`${I.api.base}${t}`,e,n)}delete(t,e){return this.$http.delete(`${I.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{b as a,Gt as b,Ut as c,N as d,mt as e,ft as f,Kt as g,bt as h,he as i,I as j,Te as k};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as g}from"./chunk-
|
|
1
|
+
import{m as g}from"./chunk-N4F42HDL.js";import{b as k}from"./chunk-675OFXLW.js";import{Bb as x,Cc as m,Dc as r,Lb as d,Qb as p,Rb as I,Wb as n,Xb as o,Yb as f,dc as s,ec as B,ib as t,na as v,oc as a,pc as u,qc as b,ub as _}from"./chunk-CKNHTRCL.js";function y(i,M){if(i&1&&f(0,"i",14),i&2){let c=B();p("fas fa-fw ",c.faIconClass," mb-4")}}var L=(()=>{class i{$activeModal=v(g);title;message;confirmButtonLabel;confirmButtonClass;faIconClass;constructor(){}static \u0275fac=function(l){return new(l||i)};static \u0275cmp=_({type:i,selectors:[["ng-component"]],inputs:{title:"title",message:"message",confirmButtonLabel:"confirmButtonLabel",confirmButtonClass:"confirmButtonClass",faIconClass:"faIconClass"},decls:22,vars:16,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body","w-100","text-center"],[2,"font-size","75px",3,"class"],[1,"w-100","text-center"],[1,"modal-footer","justify-content-between"],[1,"text-left"],["type","button","data-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-right"],["type","button","data-dismiss","modal",3,"click"],[2,"font-size","75px"]],template:function(l,e){l&1&&(n(0,"div",0)(1,"div",1)(2,"h5",2),a(3),o(),n(4,"button",3),m(5,"translate"),s("click",function(){return e.$activeModal.dismiss("Dismiss")}),n(6,"span",4),a(7,"\xD7"),o()()(),n(8,"div",5),x(9,y,1,3,"i",6),n(10,"p",7),a(11),o()(),n(12,"div",8)(13,"div",9)(14,"button",10),m(15,"translate"),s("click",function(){return e.$activeModal.dismiss("Dismiss")}),a(16),m(17,"translate"),o()(),f(18,"div",11),n(19,"div",12)(20,"button",13),s("click",function(){return e.$activeModal.close()}),a(21),o()()()()),l&2&&(t(3),u(e.title),t(),d("aria-label",r(5,10,"form.button_close")),t(5),I(e.faIconClass?9:-1),t(2),u(e.message),t(3),d("aria-label",r(15,12,"form.button_close")),t(2),b(" ",r(17,14,"form.button_close")," "),t(4),p("btn ",e.confirmButtonClass||"btn-primary",""),t(),b(" ",e.confirmButtonLabel," "))},dependencies:[k],encapsulation:2})}return i})();export{L as a};
|
package/public/index.html
CHANGED
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
|
|
21
21
|
<body>
|
|
22
22
|
<app-root></app-root>
|
|
23
|
-
<link rel="modulepreload" href="chunk-
|
|
23
|
+
<link rel="modulepreload" href="chunk-JXNMTC4S.js"><link rel="modulepreload" href="chunk-H3RI2X3J.js"><link rel="modulepreload" href="chunk-XP7D2PRA.js"><link rel="modulepreload" href="chunk-2OJNON6V.js"><link rel="modulepreload" href="chunk-36GSB6KM.js"><link rel="modulepreload" href="chunk-OC7KX4QS.js"><link rel="modulepreload" href="chunk-3G2INPN4.js"><link rel="modulepreload" href="chunk-P6NTJCU3.js"><link rel="modulepreload" href="chunk-7ZMNAUG3.js"><link rel="modulepreload" href="chunk-XQNHUDX7.js"><script src="polyfills-C6JHVXJJ.js" type="module" crossorigin="use-credentials"></script><script src="scripts-6GVLYD7F.js" defer crossorigin="use-credentials"></script><script src="main-HHNIKZ37.js" type="module" crossorigin="use-credentials"></script></body>
|
|
24
24
|
</html>
|