homebridge-config-ui-x 5.11.2-beta.4 → 5.11.2-beta.5
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 +1 -0
- package/package.json +1 -1
- package/public/chunk-2YQMYSXT.js +1 -0
- package/public/{chunk-XGK5YFH6.js → chunk-3JBXVUFP.js} +2 -2
- package/public/{chunk-QBG7SKRK.js → chunk-47LZZIPJ.js} +6 -6
- package/public/{chunk-7JNVXXNR.js → chunk-5F6SGJZO.js} +1 -1
- package/public/{chunk-GJ42U6LP.js → chunk-5UTHYAO4.js} +1 -1
- package/public/chunk-5V5T5YDK.js +1 -0
- package/public/{chunk-T472BWYK.js → chunk-72SK6LN3.js} +1 -1
- package/public/{chunk-AM5CKSLZ.js → chunk-746K2W65.js} +1 -1
- package/public/{chunk-2TQEV57U.js → chunk-B6EPFA4V.js} +1 -1
- package/public/{chunk-BVJS76CN.js → chunk-BHYS7LPU.js} +1 -1
- package/public/{chunk-GT2YL2TI.js → chunk-BQMRSELR.js} +1 -1
- package/public/{chunk-4VLAXCSY.js → chunk-CDVVVWKM.js} +1 -1
- package/public/{chunk-MRPQNEON.js → chunk-CYKWMDCC.js} +1 -1
- package/public/{chunk-LVBVUIJY.js → chunk-D3MUNCMG.js} +1 -1
- package/public/{chunk-E35SHTFY.js → chunk-D3NFARXL.js} +1 -1
- package/public/{chunk-PEOTW7KR.js → chunk-G7V2J2JO.js} +1 -1
- package/public/{chunk-VBQ2CSUE.js → chunk-GFM46DC6.js} +1 -1
- package/public/{chunk-CPECPTSN.js → chunk-H53NQXNF.js} +1 -1
- package/public/chunk-HBNZXYWD.js +4 -0
- package/public/chunk-HQLIDFFL.js +1 -0
- package/public/chunk-IF2VXUU3.js +3 -0
- package/public/{chunk-S4BMZ4C4.js → chunk-IMR3XZ37.js} +1 -1
- package/public/chunk-J24WFLH3.js +1 -0
- package/public/{chunk-CNUIQJSO.js → chunk-J6JCLCR6.js} +1 -1
- package/public/chunk-JN6IF7KG.js +1 -0
- package/public/{chunk-MS4K4KAK.js → chunk-K3VXCKFJ.js} +1 -1
- package/public/{chunk-42Y35W3J.js → chunk-LKRXJ4NQ.js} +1 -1
- package/public/{chunk-WX345PMX.js → chunk-LQNKSANI.js} +1 -1
- package/public/{chunk-EMF6ZINV.js → chunk-N74OZDD6.js} +1 -1
- package/public/{chunk-TRDYZJYI.js → chunk-P2U63MCR.js} +1 -1
- package/public/chunk-PK2CVZPI.js +1 -0
- package/public/{chunk-TTX3XSDC.js → chunk-QCD43BXL.js} +1 -1
- package/public/{chunk-6ZOSTYPR.js → chunk-RMWS37MG.js} +1 -1
- package/public/chunk-S6MSUZ3J.js +1 -0
- package/public/{chunk-QGLAR7UC.js → chunk-TRA6X3HB.js} +1 -1
- package/public/{chunk-WBTFILXV.js → chunk-VQI4BA3M.js} +7 -7
- package/public/{chunk-IZHFI46L.js → chunk-W3WJ3GLW.js} +1 -1
- package/public/{chunk-5K3S6ZXB.js → chunk-WPJDSHYO.js} +1 -1
- package/public/chunk-XF7D4C2H.js +1 -0
- package/public/{chunk-UO7KCTHV.js → chunk-YAUW3QQV.js} +1 -1
- package/public/chunk-YDOFHXZH.js +1 -0
- package/public/chunk-ZDIBPB2V.js +5 -0
- package/public/index.html +1 -1
- package/public/main-VBBHOBST.js +1 -0
- package/public/chunk-3LKYOCGJ.js +0 -1
- package/public/chunk-4KXPUEE3.js +0 -4
- package/public/chunk-4TAGCB7R.js +0 -1
- package/public/chunk-DBMKB5Z2.js +0 -1
- package/public/chunk-FQDRGOO5.js +0 -1
- package/public/chunk-FYHEIYSO.js +0 -5
- package/public/chunk-GYMWB5SQ.js +0 -1
- package/public/chunk-N6AN65NK.js +0 -3
- package/public/chunk-SE6AXFTZ.js +0 -1
- package/public/chunk-SIODBMHU.js +0 -1
- package/public/chunk-VAD47NOZ.js +0 -1
- package/public/chunk-ZDUAXPNP.js +0 -1
- package/public/main-SPPQL5YI.js +0 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as tt}from"./chunk-D3MUNCMG.js";import"./chunk-BMOLDRJ3.js";import{a as B}from"./chunk-TRA6X3HB.js";import{a as rt}from"./chunk-H7F7H5MW.js";import"./chunk-RMWS37MG.js";import{n as Y,t as Z}from"./chunk-K3VXCKFJ.js";import"./chunk-BGCYR25X.js";import{b as A}from"./chunk-D3NFARXL.js";import{D as X,c as G,e as Q,f as H,g as R,j as W,m as J,r as K,s as U}from"./chunk-YAUW3QQV.js";import{b as O}from"./chunk-72SK6LN3.js";import{E as P,F as N,H as j,K as z}from"./chunk-B6EPFA4V.js";import{Ab as w,Ec as s,Fb as f,Fc as l,Gb as m,Hb as a,Ib as d,Pc as $,Rb as v,Xb as h,Ya as E,Za as n,Zb as p,aa as c,d as I,ec as y,fc as M,ga as u,ha as g,ic as S,jc as k,kc as F,lc as q,nb as V,sa as C,vc as D,yb as b,zb as _}from"./chunk-MKV5RAJQ.js";import{g as nt,h as x}from"./chunk-B4AJQJMI.js";var T=nt(rt(),1);var at=["logoutput"],st=["searchInput"];function lt(i,L){if(i&1){let t=v();m(0,"div",5)(1,"button",9),s(2,"translate"),s(3,"translate"),h("click",function(){u(t);let o=p();return g(o.showSearch())}),d(4,"i"),a(),m(5,"button",9),s(6,"translate"),s(7,"translate"),h("click",function(){u(t);let o=p();return g(o.downloadLogFile())}),d(8,"i",10),a(),m(9,"button",11),s(10,"translate"),s(11,"translate"),h("click",function(){u(t);let o=p();return g(o.truncateLogFile())}),d(12,"i",12),a()()}if(i&2){let t=p();n(),f("openDelay",150)("ngbTooltip",l(2,12,"form.search")),b("aria-label",l(3,14,"form.search")),n(3),k(D("fas",t.showSearchBar()?" primary-text":""," fa-search")),n(),f("openDelay",150)("ngbTooltip",l(6,16,"form.button_download")),b("aria-label",l(7,18,"form.button_download")),n(4),f("openDelay",150)("ngbTooltip",l(10,20,"form.button_delete")),b("aria-label",l(11,22,"form.button_delete"))}}function ct(i,L){if(i&1){let t=v();m(0,"a",17),h("click",function(){u(t);let o=p(2);return g(o.onClearSearch())}),d(1,"i",18),a()}}function mt(i,L){if(i&1){let t=v();m(0,"div",6)(1,"div",13)(2,"form",14),h("ngSubmit",function(){u(t);let o=p();return g(o.onSubmit(o.form.value))}),d(3,"input",15,1),s(5,"translate"),_(6,ct,2,0,"a",16),a()()()}if(i&2){let t=p();n(2),f("formGroup",t.form),n(),S("is-invalid",t.searchInputInvalid),f("placeholder",l(5,5,"logs.placeholder_search_logs")),n(3),w(t.showExitButton()?6:-1)}}var Tt=(()=>{class i{$api=c(z);$auth=c(A);$log=c(tt);$modal=c(Y);$settings=c(O);$toastr=c(j);$translate=c(P);termTarget=$("logoutput",{});searchInput=$("searchInput",{});resizeEvent=new I;valueChangesSubscription;isAdmin=this.$auth.user.admin;showSearchBar=C(!1,{});showExitButton=C(!1,{});form=new R({query:new W("")});get searchInputInvalid(){let t=(this.form.get("query")?.value||"").trim();return t.length>0&&t.length<3}onWindowResize(){this.resizeEvent.next(void 0)}ngOnInit(){let t=this.$translate.instant("menu.linux.label_logs");this.$settings.setPageTitle(t),window.document.querySelector("body").classList.add("bg-black"),this.$log.startTerminal(this.termTarget(),{allowProposedApi:!0},this.resizeEvent),this.valueChangesSubscription=this.form.get("query")?.valueChanges.subscribe(e=>{let o=e||"",r=o.trim();r!==o&&this.form.get("query")?.setValue(r,{emitEvent:!1}),this.showExitButton()&&r.length<3&&(this.showExitButton.set(!1),this.$log.clearSearchFilter(),this.$log.scrollToBottom())})}showSearch(){if(this.showSearchBar())this.showSearchBar.set(!1),this.showExitButton.set(!1),this.form.setValue({query:""}),this.$log.clearSearchFilter(),this.$log.scrollToBottom();else{this.showSearchBar.set(!0);let t=this.searchInput();t&&setTimeout(()=>t.nativeElement.focus(),0)}}onSubmit(t){let e=(t.query||"").trim();!e.length||e.length<3?(e.length||this.showSearchBar.set(!1),this.form.setValue({query:""}),this.showExitButton.set(!1),this.$log.clearSearchFilter(),this.$log.scrollToBottom()):(this.showExitButton.set(!0),this.$log.setSearchFilter(e),this.$log.scrollToBottom())}onClearSearch(){this.form.setValue({query:""}),this.showExitButton.set(!1),this.$log.clearSearchFilter(),this.$log.scrollToBottom()}ngOnDestroy(){window.document.querySelector("body").classList.remove("bg-black"),this.valueChangesSubscription&&this.valueChangesSubscription.unsubscribe(),this.resizeEvent.complete(),this.$log.destroyTerminal()}downloadLogFile(){return x(this,null,function*(){let t=this.$modal.open(B,{size:"lg",backdrop:"static"});t.componentInstance.title=this.$translate.instant("logs.title_download_log_file"),t.componentInstance.message=this.$translate.instant("logs.download_warning"),t.componentInstance.confirmButtonLabel=this.$translate.instant("form.button_download"),t.componentInstance.faIconClass="fas fa-user-secret primary-text";try{yield t.result;try{let e=yield this.$api.get("/platform-tools/hb-service/log/download",{observe:"response",responseType:"blob"}),o=this.$log.getSearchFilter();if(o){let et=(yield e.body.text()).split(`
|
|
2
|
+
`).filter(it=>it.replace(/\x1b\[[0-9;]*m/g,"").toLowerCase().includes(o.toLowerCase())),ot=new Blob([et.join(`
|
|
3
|
+
`)],{type:"text/plain"});(0,T.saveAs)(ot,"homebridge.log.txt")}else(0,T.saveAs)(e.body,"homebridge.log.txt")}catch(e){let o;try{if(e&&typeof e=="object"&&"error"in e){let r=yield e.error.text();o=JSON.parse(r).message}}catch(r){console.error(r)}this.$toastr.error(o||this.$translate.instant("logs.download.error"),this.$translate.instant("toast.title_error"))}}catch{}})}truncateLogFile(){return x(this,null,function*(){let t=this.$modal.open(B,{size:"lg",backdrop:"static"});t.componentInstance.title=this.$translate.instant("logs.title_truncate_log_file"),t.componentInstance.message=this.$translate.instant("logs.truncate_log_warning"),t.componentInstance.confirmButtonLabel=this.$translate.instant("form.button_delete"),t.componentInstance.confirmButtonClass="btn-danger",t.componentInstance.faIconClass="fas fa-circle-exclamation primary-text";try{yield t.result;try{yield this.$api.put("/platform-tools/hb-service/log/truncate",{}),this.$toastr.success(this.$translate.instant("logs.log_file_truncated"),this.$translate.instant("toast.title_success")),this.$log.term.clear()}catch(e){console.error(e);let o=e&&typeof e=="object"&&"error"in e&&e.error&&typeof e.error=="object"&&"message"in e.error?String(e.error.message):this.$translate.instant("logs.truncate.error");this.$toastr.error(o,this.$translate.instant("toast.title_error"))}}catch{}})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=V({type:i,selectors:[["ng-component"]],viewQuery:function(e,o){e&1&&(y(o.termTarget,at,5),y(o.searchInput,st,5)),e&2&&M(2)},hostBindings:function(e,o){e&1&&h("resize",function(){return o.onWindowResize()},E)},decls:10,vars:9,consts:[["logoutput",""],["searchInput",""],[1,"row","mb-3"],[1,"col-6"],[1,"primary-text","m-0"],[1,"col-6","text-end"],[1,"row"],[1,"flex-column","d-flex","align-items-stretch"],["id","log-output",1,"align-self-end","w-100","h-100","mb-1"],["container","body","placement","bottom","triggers","hover",1,"btn","btn-elegant","my-0","me-2",3,"click","openDelay","ngbTooltip"],[1,"fas","fa-download"],["container","body","placement","bottom","triggers","hover",1,"btn","btn-elegant","my-0","me-0",3,"click","openDelay","ngbTooltip"],[1,"fas","fa-trash-alt"],[1,"col-md-12"],["novalidate","",3,"ngSubmit","formGroup"],["type","text","formControlName","query",1,"search-bar",3,"placeholder"],["href","javascript:void(0)",1,"search-bar-clear"],["href","javascript:void(0)",1,"search-bar-clear",3,"click"],[1,"fas","fa-square-xmark"]],template:function(e,o){e&1&&(m(0,"div",2)(1,"div",3)(2,"h3",4),F(3),s(4,"translate"),a()(),_(5,lt,13,24,"div",5),a(),_(6,mt,7,7,"div",6),m(7,"div",7),d(8,"div",8,0),a()),e&2&&(n(3),q(l(4,7,"menu.linux.label_logs")),n(2),w(o.isAdmin?5:-1),n(),w(o.showSearchBar()?6:-1),n(),S("adjust-for-mobile",!o.showSearchBar())("adjust-for-mobile-with-search",o.showSearchBar()))},dependencies:[Z,X,J,G,Q,H,U,K,N],styles:[".search-bar[_ngcontent-%COMP%]{outline:none;box-sizing:inherit!important;background-color:inherit;height:50px!important;width:100%;border-width:.5px;padding:10px;margin-bottom:15px}@media(hover:hover){.search-bar[_ngcontent-%COMP%]:hover{border:1px solid #000000}}.search-bar[_ngcontent-%COMP%]:focus{border:1px solid #000000;box-shadow:0 1px #000}.search-bar.is-invalid[_ngcontent-%COMP%]{border:1px solid #d32f2f!important;box-shadow:0 1px #d32f2f!important}@media(hover:hover){.search-bar.is-invalid[_ngcontent-%COMP%]:hover{border:1px solid #d32f2f!important;box-shadow:0 1px #d32f2f!important}}.search-bar.is-invalid[_ngcontent-%COMP%]:focus{border:1px solid #d32f2f!important;box-shadow:0 1px #d32f2f!important}.search-bar-clear[_ngcontent-%COMP%]{position:absolute;right:30px;font-size:25px;color:#d0d0d0;line-height:50px;cursor:pointer}.adjust-for-mobile-with-search[_ngcontent-%COMP%]{height:calc(100% - 95px);width:calc(100% + 17px);overflow:hidden}@media(max-width:767px){.adjust-for-mobile-with-search[_ngcontent-%COMP%]{height:calc(100% - 125px)}}"]})}return i})();export{Tt as LogsComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E,F as h,H as _,K as w}from"./chunk-
|
|
1
|
+
import{E,F as h,H as _,K as w}from"./chunk-B6EPFA4V.js";import{Ab as f,Ec as d,Fc as p,Jb as i,Kb as e,Lb as u,Za as n,Zb as v,aa as l,kc as o,lc as a,nb as c,sa as s,zb as x}from"./chunk-MKV5RAJQ.js";import"./chunk-B4AJQJMI.js";function y(t,S){if(t&1&&(i(0,"div",7),o(1),e()),t&2){let r=v();n(),a(r.error())}}function C(t,S){t&1&&(i(0,"p",8),o(1),d(2,"translate"),e()),t&2&&(n(),a(p(2,1,"platform.linux.server_will_power_down")))}var D=(()=>{class t{$api=l(w);$toastr=l(_);$translate=l(E);error=s(!1,{});ngOnInit(){this.$api.put("/platform-tools/linux/shutdown-host",{}).catch(r=>{console.error(r),this.error.set(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=c({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-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,g){m&1&&(i(0,"div",0)(1,"h3",1),o(2),d(3,"translate"),e()(),i(4,"div",2)(5,"div",3),u(6,"i",4),e(),i(7,"div",5)(8,"h4",6),o(9),d(10,"translate"),e(),x(11,y,2,1,"div",7)(12,C,3,3,"p",8),e()()),m&2&&(n(2),a(p(3,3,"menu.restart.title")),n(7),a(p(10,5,"platform.linux.shutting_down_server")),n(2),f(g.error()?11:12))},dependencies:[h],encapsulation:2})}return t})();export{D as ShutdownLinuxComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as _e}from"./chunk-XLJ6VVK3.js";import{a as ve}from"./chunk-5F6SGJZO.js";import{g as te,m as N,n as be}from"./chunk-K3VXCKFJ.js";import{c as ce}from"./chunk-P2U63MCR.js";import{a as pe}from"./chunk-BGCYR25X.js";import{b as H}from"./chunk-D3NFARXL.js";import{B as fe,C as j,D as R,b as K,c as A,d as g,e as P,f as W,g as G,j as E,m as X,q as Y,r as Z,s as ee}from"./chunk-YAUW3QQV.js";import{a as Se,b as ue}from"./chunk-72SK6LN3.js";import{E as D,F as k,H as I,K as F}from"./chunk-B6EPFA4V.js";import{Ab as h,Cb as ne,Db as ae,Eb as re,Ec as r,Fb as y,Fc as o,Gb as a,Gc as de,Hb as i,Ib as p,Jb as U,Kb as T,Lb as q,Rb as V,Sb as Q,Xb as _,Yb as z,Za as t,Zb as b,aa as c,ga as B,ha as M,ic as L,jc as oe,kc as m,lc as d,ma as J,mc as v,nb as $,nc as se,sa as S,yb as u,yc as le,zb as w,zc as me}from"./chunk-MKV5RAJQ.js";import{g as ye,h as C}from"./chunk-B4AJQJMI.js";function $e(n,x){n&1&&(a(0,"ngb-alert",13)(1,"p",20),m(2),r(3,"translate"),i()()),n&2&&(y("dismissible",!1),t(2),d(o(3,2,"login.invalid_password")))}var xe=(()=>{class n{$activeModal=c(N);$api=c(F);$toastr=c(I);$translate=c(D);invalidCredentials=S(!1,{});formGroup=new G({password:new E("",[g.required])});disable2fa(){return C(this,null,function*(){this.invalidCredentials.set(!1);try{yield this.$api.post("/users/otp/deactivate",this.formGroup.value),this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.setup_2fa_disable_success"),this.$translate.instant("toast.title_success"))}catch{this.formGroup.setValue({password:""}),this.invalidCredentials.set(!0)}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(l){return new(l||n)};static \u0275cmp=$({type:n,selectors:[["ng-component"]],decls:34,vars:27,consts:[[1,"modal-content",2,"min-height","300px"],[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-key","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["type","password","autocomplete","current-password",1,"form-control","custom-input",3,"formControl","placeholder"],["type","error",1,"mt-3","mb-0",3,"dismissible"],[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-danger",3,"click","disabled"],[1,"mb-0"]],template:function(l,s){l&1&&(a(0,"div",0)(1,"div",1)(2,"h5",2),m(3),r(4,"translate"),i(),a(5,"button",3),r(6,"translate"),_("click",function(){return s.dismissModal()}),i()(),a(7,"div",4)(8,"div",5),p(9,"i",6),i(),a(10,"ul",7)(11,"li"),m(12),r(13,"translate"),i()(),a(14,"ul",8)(15,"li",9)(16,"label",10),m(17),r(18,"translate"),i(),a(19,"div",11),p(20,"input",12),r(21,"translate"),i()()(),w(22,$e,4,4,"ngb-alert",13),i(),a(23,"div",14)(24,"div",15)(25,"button",16),r(26,"translate"),_("click",function(){return s.dismissModal()}),m(27),r(28,"translate"),i()(),p(29,"div",17),a(30,"div",18)(31,"button",19),_("click",function(){return s.disable2fa()}),m(32),r(33,"translate"),i()()()()),l&2&&(t(3),d(o(4,11,"users.setup_2fa_disable")),t(2),u("aria-label",o(6,13,"form.button_close")),t(7),d(o(13,15,"users.setup_2fa_disable_current_password")),t(5),d(o(18,17,"users.label_password")),t(3),y("formControl",s.formGroup.controls.password)("placeholder",o(21,19,"users.label_password")),t(2),h(s.invalidCredentials()&&!s.formGroup.controls.password.value?22:-1),t(3),u("aria-label",o(26,21,"form.button_close")),t(2),v(" ",o(28,23,"form.button_close")," "),t(4),y("disabled",s.formGroup.invalid),t(),v(" ",o(33,25,"form.button_disable")," "))},dependencies:[j,A,P,R,Y,te,k],encapsulation:2})}return n})();var Ce=ye(Se(),1);var Ue=n=>({timeDiffError:n});function ke(n,x){n&1&&(a(0,"li"),m(1),r(2,"translate"),i()),n&2&&(t(),d(o(2,1,"users.setup_2fa_scan_qr_code")))}function Te(n,x){if(n&1&&(a(0,"ngb-alert",8)(1,"p",16),m(2),r(3,"translate"),i(),a(4,"p",17),m(5),r(6,"translate"),i()()),n&2){let e=b();y("dismissible",!1),t(2),d(o(3,3,"users.setup_2fa_cannot_setup_2fa")),t(3),d(de(6,5,"users.setup_2fa_server_time_out",le(8,Ue,e.timeDiffError())))}}function Be(n,x){n&1&&p(0,"i",27)}function Me(n,x){n&1&&p(0,"i",28)}function De(n,x){if(n&1){let e=V();a(0,"div",21),m(1),r(2,"translate"),p(3,"br"),m(4),a(5,"a",26),_("click",function(){B(e);let s=b(2);return M(s.copySecretToClipboard())}),w(6,Be,1,0,"i",27)(7,Me,1,0,"i",28),i()()}if(n&2){let e=b(2);t(),v(" ",o(2,3,"users.setup_2fa_scan_qr_manual")),t(3),v(" ",e.otpSecret()," "),t(2),h(e.secretCopied()?6:7)}}function Ie(n,x){if(n&1&&(a(0,"ul",9)(1,"li",18)(2,"div",19),p(3,"app-qrcode",20),i(),w(4,De,8,5,"div",21),i(),a(5,"li",22)(6,"label",23),m(7),r(8,"translate"),i(),a(9,"div",24),p(10,"input",25),i()()()),n&2){let e=b();t(3),y("data",e.otpString()),t(),h(e.otpSecret()?4:-1),t(3),d(o(8,4,"users.setup_2fa_enter_code")),t(3),y("formControl",e.formGroup.controls.code)}}function Fe(n,x){if(n&1){let e=V();a(0,"button",29),r(1,"translate"),_("click",function(){B(e);let s=b();return M(s.dismissModal())}),m(2),r(3,"translate"),i()}n&2&&(u("aria-label",o(1,2,"form.button_close")),t(2),v(" ",o(3,4,"form.button_close")," "))}function Ne(n,x){if(n&1){let e=V();a(0,"button",29),r(1,"translate"),_("click",function(){B(e);let s=b();return M(s.dismissModal())}),m(2),r(3,"translate"),i()}n&2&&(u("aria-label",o(1,2,"form.button_close")),t(2),v(" ",o(3,4,"form.button_close")," "))}function Ve(n,x){if(n&1){let e=V();a(0,"button",30),_("click",function(){B(e);let s=b();return M(s.enable2fa())}),m(1),r(2,"translate"),i()}if(n&2){let e=b();y("disabled",e.formGroup.invalid),t(),v(" ",o(2,2,"form.button_enable")," ")}}var we=(()=>{class n{$activeModal=c(N);$api=c(F);$toastr=c(I);$translate=c(D);_user=S(null,{});set user(e){this._user.set(e)}get user(){return this._user()}userSignal=this._user.asReadonly();timeDiffError=S(null,{});otpString=S(void 0,{});otpSecret=S(void 0,{});secretCopied=S(!1,{});copyTimeout=null;formGroup=new G({code:new E("",[g.required,g.minLength(6),g.maxLength(6)])});ngOnInit(){return C(this,null,function*(){try{let e=yield this.$api.post("/users/otp/setup",{});this.checkTimeDiff(e.timestamp),this.timeDiffError()||(this.otpString.set(e.otpauth),this.otpSecret.set(new URL(e.otpauth).searchParams.get("secret")||""))}catch(e){this.$activeModal.dismiss(),console.error(e),this.$toastr.error(this.$translate.instant("users.setup_2fa_enable_error"),this.$translate.instant("toast.title_error"))}})}enable2fa(){return C(this,null,function*(){try{yield this.$api.post("/users/otp/activate",this.formGroup.value),this.$toastr.success(this.$translate.instant("users.setup_2fa_enabled_success"),this.$translate.instant("toast.title_success")),this.$activeModal.close()}catch(e){console.error(e),this.$toastr.error(this.$translate.instant("users.setup_2fa_activate_error"),this.$translate.instant("toast.title_error"))}})}copySecretToClipboard(){return C(this,null,function*(){let e=this.otpSecret();e&&(yield navigator.clipboard.writeText(e),this.secretCopied.set(!0),this.copyTimeout&&clearTimeout(this.copyTimeout),this.copyTimeout=setTimeout(()=>{this.secretCopied.set(!1)},3e3))})}dismissModal(){this.$activeModal.dismiss("Dismiss")}checkTimeDiff(e){let l=(0,Ce.default)(e).diff(new Date,"millisecond");l<-5e3||l>5e3?this.timeDiffError.set(l):this.timeDiffError.set(null)}static \u0275fac=function(l){return new(l||n)};static \u0275cmp=$({type:n,selectors:[["ng-component"]],decls:24,vars:15,consts:[[1,"modal-content","setup2fa"],[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-key","primary-text",2,"font-size","75px"],[1,"mb-3"],["type","error",1,"mb-0",3,"dismissible"],[1,"list-group","list-group-box","mb-0"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"disabled"],[1,"fw-bold","mb-1"],[1,"mb-0"],[1,"list-group-item","text-center"],[1,"text-center","w-100","d-flex","justify-content-center","my-2"],[1,"mx-auto",2,"width","175px","height","175px",3,"data"],[1,"grey-text","small","mt-0","mb-1"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["type","text","placeholder","eg. 123456","autocomplete","one-time-code","autocapitalize","none","inputmode","numeric","pattern","[0-9]*",1,"form-control","custom-input",3,"formControl"],["href","javascript:void(0)",1,"ms-1","text-primary",3,"click"],[1,"fas","fa-check","green-text"],[1,"fas","fa-copy"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"]],template:function(l,s){l&1&&(a(0,"div",0)(1,"div",1)(2,"h5",2),m(3),r(4,"translate"),i(),a(5,"button",3),r(6,"translate"),_("click",function(){return s.dismissModal()}),i()(),a(7,"div",4)(8,"div",5),p(9,"i",6),i(),a(10,"ul",7)(11,"li"),m(12),r(13,"translate"),i(),w(14,ke,3,3,"li"),i(),w(15,Te,7,10,"ngb-alert",8),w(16,Ie,11,6,"ul",9),i(),a(17,"div",10)(18,"div",11),w(19,Fe,4,6,"button",12),i(),a(20,"div",13),w(21,Ne,4,6,"button",12),i(),a(22,"div",14),w(23,Ve,3,4,"button",15),i()()()),l&2&&(t(3),d(o(4,9,"users.setup_2fa")),t(2),u("aria-label",o(6,11,"form.button_close")),t(7),d(o(13,13,"users.setup_2fa_warning")),t(2),h(s.timeDiffError()?-1:14),t(),h(s.timeDiffError()?15:-1),t(),h(s.timeDiffError()?-1:16),t(3),h(s.timeDiffError()?-1:19),t(2),h(s.timeDiffError()?21:-1),t(2),h(s.timeDiffError()?-1:23))},dependencies:[te,_e,j,A,P,fe,R,Y,k],encapsulation:2})}return n})();var he=(()=>{class n{$activeModal=c(N);$api=c(F);$toastr=c(I);$translate=c(D);form=new G({username:new E("",[g.required]),name:new E("",[g.required]),password:new E("",[g.compose([g.required,g.minLength(4)])]),passwordConfirm:new E("",[g.required]),admin:new E(!0)},this.matchPassword);onSubmit(l){return C(this,arguments,function*({value:e}){try{yield this.$api.post("/users",e),this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.toast_added_new_user"),this.$translate.instant("toast.title_success"))}catch(s){this.$toastr.error(s.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}matchPassword(e){let l=e.get("password")?.value,s=e.get("passwordConfirm")?.value;return l!==s?(e.get("passwordConfirm")?.setErrors({matchPassword:!0}),{matchPassword:!0}):null}static \u0275fac=function(l){return new(l||n)};static \u0275cmp=$({type:n,selectors:[["ng-component"]],decls:58,vars:48,consts:[[1,"modal-content"],["novalidate","",3,"ngSubmit","formGroup"],[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-user-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-username",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["formControlName","username","type","text","id","form-username","autocomplete","username","autocapitalize","none",1,"form-control","custom-input"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","name","type","text","id","form-name","autocomplete","name",1,"form-control","custom-input"],["for","form-pass",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","password","type","password","autocomplete","new-password","id","form-pass",1,"form-control","custom-input"],["for","form-pass-confirm",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","passwordConfirm","type","password","autocomplete","new-password","id","form-pass-confirm",1,"form-control","custom-input"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"text-start"],[1,"text-end","grey-text","d-flex","align-items-center"],["formControlName","admin","type","checkbox","id","isAdmin",1,"rendux-input"],["for","isAdmin",1,"rendux-label","ms-3"],[1,"modal-footer","justify-content-between"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(l,s){l&1&&(a(0,"div",0)(1,"form",1),_("ngSubmit",function(){return s.onSubmit(s.form)}),a(2,"div",2)(3,"h5",3),m(4),r(5,"translate"),i(),a(6,"button",4),r(7,"translate"),_("click",function(){return s.dismissModal()}),i()(),a(8,"div",5)(9,"div",6),p(10,"i",7),i(),a(11,"ul",8)(12,"li",9)(13,"label",10),m(14),r(15,"translate"),i(),a(16,"div",11),p(17,"input",12),r(18,"translate"),i()(),a(19,"li",9)(20,"label",13),m(21),r(22,"translate"),i(),a(23,"div",11),p(24,"input",14),r(25,"translate"),i()(),a(26,"li",9)(27,"label",15),m(28),r(29,"translate"),i(),a(30,"div",11),p(31,"input",16),r(32,"translate"),i()(),a(33,"li",9)(34,"label",17),m(35),r(36,"translate"),i(),a(37,"div",11),p(38,"input",18),r(39,"translate"),i()(),a(40,"li",19)(41,"span",20),m(42),r(43,"translate"),i(),a(44,"div",21),p(45,"input",22),r(46,"translate"),p(47,"label",23),i()()()(),a(48,"div",24)(49,"div",20)(50,"button",25),_("click",function(){return s.dismissModal()}),m(51),r(52,"translate"),i()(),p(53,"div",26),a(54,"div",27)(55,"button",28),m(56),r(57,"translate"),i()()()()()),l&2&&(t(),y("formGroup",s.form),t(3),d(o(5,20,"users.title_add_user")),t(2),u("aria-label",o(7,22,"form.button_close")),t(8),d(o(15,24,"users.label_username")),t(3),u("aria-label",o(18,26,"users.label_username")),t(4),d(o(22,28,"users.label_full_name")),t(3),u("aria-label",o(25,30,"users.label_full_name")),t(4),d(o(29,32,"users.label_password")),t(3),L("is-invalid",s.form.controls.password.dirty&&s.form.controls.password.errors),u("aria-label",o(32,34,"users.label_password")),t(4),d(o(36,36,"users.label_confirm_password")),t(3),L("is-invalid",s.form.controls.passwordConfirm.dirty&&s.form.controls.passwordConfirm.errors),u("aria-label",o(39,38,"users.label_confirm_password")),t(4),d(o(43,40,"users.label_admin_user")),t(3),u("aria-label",o(46,42,"users.label_admin_user")),t(6),v(" ",o(52,44,"form.button_close")," "),t(4),y("disabled",!s.form.valid),t(),v(" ",o(57,46,"form.button_save")," "))},dependencies:[j,X,A,K,P,W,R,ee,Z,k],encapsulation:2})}return n})();function Ae(n,x){if(n&1&&(a(0,"li",9)(1,"label",27),m(2),r(3,"translate"),i(),a(4,"div",11),p(5,"input",28),r(6,"translate"),i()()),n&2){let e=b();t(2),d(o(3,4,"users.label_confirm_password")),t(3),L("is-invalid",e.form.controls.passwordConfirm.dirty&&e.form.controls.passwordConfirm.errors),u("aria-label",o(6,6,"users.label_confirm_password"))}}var ge=(()=>{class n{destroyRef=c(J);$activeModal=c(N);$api=c(F);$auth=c(H);$toastr=c(I);$translate=c(D);_user=S(null,{});set user(e){this._user.set(e)}get user(){return this._user()}userSignal=this._user.asReadonly();isCurrentUser=S(!1,{});initialFormValue={};form=new G({username:new E("",[g.required]),name:new E("",[g.required]),password:new E(""),passwordConfirm:new E(""),admin:new E(!0)},this.matchPassword);ngOnInit(){let e=this.userSignal();e&&(this.isCurrentUser.set(this.$auth.user.username===e.username),this.form.patchValue(e),this.initialFormValue=this.form.getRawValue())}onSubmit(l){return C(this,arguments,function*({value:e}){let s=this.userSignal();if(s)try{yield this.$api.patch(`/users/${s.id}`,e),this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.toast_updated_user"),this.$translate.instant("toast.title_success")),this.isCurrentUser()&&e.username!==this.$auth.user.username&&this.$auth.logout()}catch(f){console.error(f),this.$toastr.error(f.error?.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}isFormUnchanged(){return this.form.controls.password.value?!1:JSON.stringify(this.form.getRawValue())===JSON.stringify(this.initialFormValue)}dismissModal(){this.$activeModal.dismiss("Dismiss")}matchPassword(e){let l=e.get("password")?.value,s=e.get("passwordConfirm")?.value;return l!==s?(e.get("passwordConfirm")?.setErrors({matchPassword:!0}),{matchPassword:!0}):null}static \u0275fac=function(l){return new(l||n)};static \u0275cmp=$({type:n,selectors:[["ng-component"]],decls:52,vars:41,consts:[[1,"modal-content"],["novalidate","",3,"ngSubmit","formGroup"],[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-user-pen","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-username",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["formControlName","username","type","text","id","form-username","autocomplete","off","autocapitalize","none",1,"form-control","custom-input"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","name","type","text","id","form-name","autocomplete","name",1,"form-control","custom-input"],["for","form-pass",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","password","type","password","autocomplete","new-password","id","form-pass",1,"form-control","custom-input"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"text-start"],[1,"text-end","grey-text","d-flex","align-items-center"],["type","checkbox","formControlName","admin","id","isAdmin",1,"rendux-input"],["for","isAdmin",1,"rendux-label","ms-3"],[1,"modal-footer","justify-content-between"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","submit",1,"btn","btn-primary",3,"disabled"],["for","form-pass-confirm",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","passwordConfirm","type","password","autocomplete","new-password","id","form-pass-confirm",1,"form-control","custom-input"]],template:function(l,s){l&1&&(a(0,"div",0)(1,"form",1),_("ngSubmit",function(){return s.onSubmit(s.form)}),a(2,"div",2)(3,"h5",3),m(4),r(5,"translate"),i(),a(6,"button",4),r(7,"translate"),_("click",function(){return s.dismissModal()}),i()(),a(8,"div",5)(9,"div",6),p(10,"i",7),i(),a(11,"ul",8)(12,"li",9)(13,"label",10),m(14),r(15,"translate"),i(),a(16,"div",11),p(17,"input",12),r(18,"translate"),i()(),a(19,"li",9)(20,"label",13),m(21),r(22,"translate"),i(),a(23,"div",11),p(24,"input",14),r(25,"translate"),i()(),a(26,"li",9)(27,"label",15),m(28),r(29,"translate"),i(),a(30,"div",11),p(31,"input",16),r(32,"translate"),i()(),w(33,Ae,7,8,"li",9),a(34,"li",17)(35,"span",18),m(36),r(37,"translate"),i(),a(38,"div",19),p(39,"input",20),r(40,"translate"),p(41,"label",21),i()()()(),a(42,"div",22)(43,"div",18)(44,"button",23),_("click",function(){return s.dismissModal()}),m(45),r(46,"translate"),i()(),p(47,"div",24),a(48,"div",25)(49,"button",26),m(50),r(51,"translate"),i()()()()()),l&2&&(t(),y("formGroup",s.form),t(3),d(o(5,17,"users.title_edit_user")),t(2),u("aria-label",o(7,19,"form.button_close")),t(8),d(o(15,21,"users.label_username")),t(3),u("aria-label",o(18,23,"users.label_username")),t(4),d(o(22,25,"users.label_full_name")),t(3),u("aria-label",o(25,27,"users.label_full_name")),t(4),d(o(29,29,"users.label_new_password")),t(3),L("is-invalid",s.form.controls.password.dirty&&s.form.controls.password.errors),u("aria-label",o(32,31,"users.label_new_password")),t(2),h(s.form.controls.password.value?33:-1),t(3),d(o(37,33,"users.label_admin_user")),t(3),u("aria-label",o(40,35,"users.label_admin_user")),t(6),v(" ",o(46,37,"form.button_close")," "),t(4),y("disabled",!s.form.valid||s.isFormUnchanged()),t(),v(" ",o(51,39,"form.button_save")," "))},dependencies:[j,X,A,K,P,W,R,ee,Z,k],encapsulation:2})}return n})();var Ee=(()=>{class n{$activeModal=c(N);dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(l){return new(l||n)};static \u0275cmp=$({type:n,selectors:[["ng-component"]],decls:46,vars:36,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-question-circle-o","primary-text",2,"font-size","75px"],[1,"ms-2"],[1,"mb-0"],[1,"mb-2","grey-text"],[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(l,s){l&1&&(a(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),m(4),r(5,"translate"),i(),a(6,"button",3),r(7,"translate"),_("click",function(){return s.dismissModal()}),i()(),a(8,"div",4)(9,"div",5),p(10,"i",6),i(),a(11,"h5",7),m(12),r(13,"translate"),i(),a(14,"ul",8)(15,"li"),m(16),r(17,"translate"),i(),a(18,"ul",9)(19,"li"),m(20),r(21,"translate"),i(),a(22,"li"),m(23),r(24,"translate"),i(),a(25,"li"),m(26),r(27,"translate"),r(28,"translate"),i(),a(29,"li"),m(30),r(31,"translate"),i(),a(32,"li"),m(33),r(34,"translate"),i()(),a(35,"li"),m(36),r(37,"translate"),i()(),p(38,"app-support-banner"),i(),a(39,"div",10),p(40,"div",11),a(41,"div",12)(42,"button",13),_("click",function(){return s.dismissModal()}),m(43),r(44,"translate"),i()(),p(45,"div",14),i()()()),l&2&&(t(4),d(o(5,12,"support.title")),t(2),u("aria-label",o(7,14,"form.button_close")),t(6),d(o(13,16,"users.title_users")),t(4),d(o(17,18,"users.support.acc_1")),t(4),d(o(21,20,"menu.label_status")),t(3),d(o(24,22,"menu.label_plugins")),t(3),se("",o(27,24,"menu.label_accessories")," (",o(28,26,"users.support.control"),")"),t(4),d(o(31,28,"menu.linux.label_logs")),t(3),d(o(34,30,"support.title")),t(3),d(o(37,32,"users.support.acc_2")),t(7),v(" ",o(44,34,"form.button_close")," "))},dependencies:[ve,k],encapsulation:2})}return n})();var Pe=(n,x)=>({"fa-user-secret":n,"fa-user":x});function Ge(n,x){if(n&1){let e=V();U(0,"button",23),z("click",function(){B(e);let s=b(2).$implicit,f=b();return M(f.disable2fa(s))}),m(1),r(2,"translate"),T()}if(n&2){let e=b(2).$implicit,l=b();Q("disabled",e.username!==l.username),t(),v(" ",o(2,2,"users.setup_2fa_disable")," ")}}function je(n,x){if(n&1){let e=V();U(0,"button",24),z("click",function(){B(e);let s=b(2).$implicit,f=b();return M(f.setup2fa(s))}),m(1),r(2,"translate"),T()}if(n&2){let e=b(2).$implicit,l=b();Q("disabled",e.username!==l.username),t(),v(" ",o(2,2,"users.setup_2fa")," ")}}function Re(n,x){if(n&1&&w(0,Ge,3,4,"button",21)(1,je,3,4,"button",22),n&2){let e=b().$implicit;h(e.otpActive?0:1)}}function qe(n,x){n&1&&q(0,"div")}function ze(n,x){if(n&1){let e=V();U(0,"div",9)(1,"div",10)(2,"div",11)(3,"div",12)(4,"span",13)(5,"h4"),m(6),T(),U(7,"h5",14),q(8,"i",15),m(9),T()()(),U(10,"div",16),w(11,Re,2,1)(12,qe,1,0,"div"),U(13,"div")(14,"button",17),r(15,"translate"),z("click",function(){let s=B(e).$implicit,f=b();return M(f.openEditUser(s))}),q(16,"i",18),T(),U(17,"button",19),r(18,"translate"),z("click",function(){let s=B(e).$implicit,f=b();return M(f.deleteUser(s.id))}),q(19,"i",20),T()()()()()()}if(n&2){let e=x.$implicit,l=b();t(6),d(e.name),t(2),oe(me(12,Pe,e.admin,!e.admin)),t(),v(" ",e.username," "),t(2),h(e.admin?11:12),t(3),u("aria-label",o(15,8,"form.button_edit")),t(3),Q("disabled",l.username===e.username),u("aria-label",o(18,10,"form.button_delete"))}}var Kt=(()=>{class n{destroyRef=c(J);$api=c(F);$auth=c(H);$modal=c(be);$route=c(ce);$settings=c(ue);$toastr=c(I);$translate=c(D);homebridgeUsers=S([],{});username=this.$auth.user.username;isAdmin=this.$auth.user.admin;ngOnInit(){let e=this.$translate.instant("users.title_users");this.$settings.setPageTitle(e),this.$route.data.pipe(pe(this.destroyRef)).subscribe(l=>{this.homebridgeUsers.set(l.homebridgeUsers)})}reloadUsers(){return C(this,null,function*(){let e=yield this.$api.get("/users");this.homebridgeUsers.set(e)})}openAddNewUser(){return C(this,null,function*(){let e=this.$modal.open(he,{size:"lg",backdrop:"static"});try{yield e.result,this.reloadUsers()}catch{}})}openEditUser(e){return C(this,null,function*(){let l=this.$modal.open(ge,{size:"lg",backdrop:"static"});l.componentInstance.user=e;try{yield l.result,this.reloadUsers()}catch{}})}deleteUser(e){return C(this,null,function*(){try{yield this.$api.delete(`/users/${e}`),this.$toastr.success(this.$translate.instant("users.toast_user_deleted"),this.$translate.instant("toast.title_success")),this.reloadUsers()}catch(l){console.error(l),this.$toastr.error(l.error?.message||this.$translate.instant("users.toast_failed_to_delete_user"),this.$translate.instant("toast.title_error"))}})}setup2fa(e){return C(this,null,function*(){let l=this.$modal.open(we,{size:"lg",backdrop:"static"});l.componentInstance.user=e;try{yield l.result,this.reloadUsers()}catch{}})}disable2fa(e){return C(this,null,function*(){let l=this.$modal.open(xe,{size:"lg",backdrop:"static"});l.componentInstance.user=e;try{yield l.result,this.reloadUsers()}catch{}})}openSupport(){this.$modal.open(Ee,{size:"lg",backdrop:"static"})}static \u0275fac=function(l){return new(l||n)};static \u0275cmp=$({type:n,selectors:[["app-users"]],decls:15,vars:9,consts:[[1,"row","mb-3"],[1,"col-6"],[1,"primary-text","m-0"],[1,"col-6","text-end"],[1,"btn","btn-elegant","waves-effect","m-0","me-2",3,"click"],[1,"fas","fa-user-plus"],["type","button",1,"btn","btn-elegant","my-0","me-0",3,"click"],[1,"fa","fa-question-circle-o"],[1,"row"],[1,"col-md-6","mb-4"],[1,"card","card-body"],[1,"d-flex","flex-column"],[1,"d-flex","flex-row","mb-3"],[1,"me-auto","my-0"],[1,"small","text-truncate","grey-text"],[1,"fas"],[1,"d-flex","flex-row","justify-content-between"],[1,"btn","btn-elegant","m-0",3,"click"],[1,"fas","fa-user-pen"],[1,"btn","btn-danger","m-0","ms-2",3,"click","disabled"],[1,"fas","fa-trash"],[1,"btn","btn-elegant","m-0",3,"disabled"],[1,"btn","btn-primary","m-0",3,"disabled"],[1,"btn","btn-elegant","m-0",3,"click","disabled"],[1,"btn","btn-primary","m-0",3,"click","disabled"]],template:function(l,s){l&1&&(U(0,"div",0)(1,"div",1)(2,"h3",2),m(3),r(4,"translate"),T()(),U(5,"div",3)(6,"button",4),r(7,"translate"),z("click",function(){return s.openAddNewUser()}),q(8,"i",5),T(),U(9,"button",6),r(10,"translate"),z("click",function(){return s.openSupport()}),q(11,"i",7),T()()(),U(12,"div",8),ae(13,ze,20,15,"div",9,ne),T()),l&2&&(t(3),d(o(4,3,"users.title_users")),t(3),u("aria-label",o(7,5,"users.button_add_user")),t(3),u("aria-label",o(10,7,"support.title")),t(4),re(s.homebridgeUsers()))},dependencies:[k],encapsulation:2})}return n})();export{Kt as UsersComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as P}from"./chunk-
|
|
1
|
+
import{b as P}from"./chunk-72SK6LN3.js";import{E as F,F as T,J as w}from"./chunk-B6EPFA4V.js";import{Ab as g,Ec as i,Fc as n,Jb as t,Kb as a,Lb as p,Sb as y,Va as B,Yb as f,Za as e,Zb as C,aa as v,jc as h,kc as r,lc as m,mc as d,nb as I,sa as k,yb as l,zb as b,zc as x}from"./chunk-MKV5RAJQ.js";import{a as S,b as _}from"./chunk-B4AJQJMI.js";var $=(o,E)=>({"fa-chevron-down":o,"fa-chevron-right":E});function M(o,E){o&1&&(t(0,"ul",6)(1,"li",9)(2,"span",10),r(3),i(4,"translate"),p(5,"br"),t(6,"small",11),r(7),i(8,"translate"),a()(),t(9,"a",12),i(10,"translate"),p(11,"i",13),a()(),t(12,"li",9)(13,"span",10),r(14),i(15,"translate"),p(16,"br"),t(17,"small",11),r(18),i(19,"translate"),a()(),t(20,"a",14),i(21,"translate"),p(22,"i",13),a()(),t(23,"li",9)(24,"span",10),r(25),i(26,"translate"),p(27,"br"),t(28,"small",11),r(29),i(30,"translate"),a()(),t(31,"a",15),i(32,"translate"),p(33,"i",13),a()(),t(34,"li",9)(35,"span",10),r(36),i(37,"translate"),p(38,"br"),t(39,"small",11),r(40),i(41,"translate"),a()(),t(42,"a",16),i(43,"translate"),p(44,"i",13),a()()()),o&2&&(e(3),d(" ",n(4,12,"support.links.documentation")),e(4),m(n(8,14,"support.links.documentation_sub")),e(2),l("aria-label",n(10,16,"support.links.documentation")),e(5),d(" ",n(15,18,"support.links.issue")),e(4),m(n(19,20,"support.links.issue_sub")),e(2),l("aria-label",n(21,22,"support.links.issue")),e(5),d(" ",n(26,24,"support.links.discord")),e(4),m(n(30,26,"support.links.discord_sub")),e(2),l("aria-label",n(32,28,"support.links.discord")),e(5),d(" ",n(37,30,"support.links.reddit")),e(4),m(n(41,32,"support.links.reddit_sub")),e(2),l("aria-label",n(43,34,"support.links.reddit")))}function j(o,E){if(o&1&&(t(0,"ul",8)(1,"li",9)(2,"span",10),r(3),i(4,"translate"),p(5,"br"),t(6,"small",11),r(7),i(8,"translate"),a()(),t(9,"a",17),i(10,"translate"),p(11,"i",13),a()(),t(12,"li",9)(13,"span",10),r(14),i(15,"translate"),p(16,"br"),t(17,"small",11),r(18),i(19,"translate"),a()(),t(20,"a",18),i(21,"translate"),p(22,"i",13),a()(),t(23,"li",9)(24,"span",10),r(25),i(26,"translate"),p(27,"br"),t(28,"small",11),r(29),i(30,"translate"),a()(),t(31,"a",19),i(32,"translate"),p(33,"i",13),a()(),t(34,"li",9)(35,"span",10),r(36),i(37,"translate"),p(38,"br"),t(39,"small",11),r(40),i(41,"translate"),a()(),t(42,"a",20),i(43,"translate"),p(44,"i",13),a()(),t(45,"li",9)(46,"span",10),r(47),i(48,"translate"),p(49,"br"),t(50,"small",11),r(51),i(52,"translate"),a()(),t(53,"a",21),i(54,"translate"),p(55,"i",13),a()()()),o&2){let u=C();e(3),d(" ",n(4,16,"support.dev.item_swagger")),e(4),m(n(8,18,"support.dev.item_swagger_sub")),e(2),y("href",u.swaggerUrl,B),l("aria-label",n(10,20,"support.dev.item_swagger")),e(5),d(" ",n(15,22,"support.dev.api")),e(4),m(n(19,24,"support.dev.api_sub")),e(2),l("aria-label",n(21,26,"support.dev.api")),e(5),d(" ",n(26,28,"support.dev.api_hap")),e(4),m(n(30,30,"support.dev.api_hap_sub")),e(2),l("aria-label",n(32,32,"support.dev.api_hap")),e(5),d(" ",n(37,34,"support.dev.template")),e(4),m(n(41,36,"support.dev.template_sub")),e(2),l("aria-label",n(43,38,"support.dev.template")),e(5),d(" ",n(48,40,"support.dev.verified")),e(4),m(n(52,42,"support.dev.verified_sub")),e(2),l("aria-label",n(54,44,"support.dev.verified"))}}var A=(()=>{class o{$settings=v(P);$translate=v(F);showFields=k({general:!0,dev:!0},{});swaggerEndpoint="/swagger";ngOnInit(){let u=this.$translate.instant("support.title");this.$settings.setPageTitle(u)}get swaggerUrl(){return w.production?this.swaggerEndpoint:`${w.api.origin}${this.swaggerEndpoint}`}toggleSection(u){this.showFields.update(c=>_(S({},c),{[u]:!c[u]}))}static \u0275fac=function(c){return new(c||o)};static \u0275cmp=I({type:o,selectors:[["ng-component"]],decls:18,vars:25,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"mb-4"],["role","button","tabindex","0",1,"mt-3","hover-pointer",3,"click"],[1,"primary-text"],[1,"fa"],["id","fieldsGeneral",1,"list-group","list-group-box","mt-2","mx-0"],[1,"pb-3"],["id","fieldsDev",1,"list-group","list-group-box","mt-2","mx-0"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"pe-2"],[1,"grey-text","pe-2"],["href","https://github.com/homebridge/homebridge/wiki","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],[1,"fas","fa-external-link-alt"],["href","https://github.com/homebridge/homebridge-config-ui-x/issues/new/choose","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],["href","https://discord.gg/C87Pvq3","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],["href","https://www.reddit.com/r/homebridge/","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],["target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px",3,"href"],["href","https://developers.homebridge.io/#/","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],["href","https://developers.homebridge.io/HAP-NodeJS/","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],["href","https://github.com/homebridge/homebridge-plugin-template","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],["href","https://github.com/homebridge/homebridge/wiki/Verified-Plugins","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"]],template:function(c,s){c&1&&(t(0,"div",0)(1,"h3",1),r(2),i(3,"translate"),a()(),t(4,"div",2)(5,"div",3),f("click",function(){return s.toggleSection("general")}),t(6,"h5",4),p(7,"i",5),r(8),i(9,"translate"),a()(),b(10,M,45,36,"ul",6),a(),t(11,"div",7)(12,"div",3),f("click",function(){return s.toggleSection("dev")}),t(13,"h5",4),p(14,"i",5),r(15),i(16,"translate"),a()(),b(17,j,56,46,"ul",8),a()),c&2&&(e(2),m(n(3,13,"support.title")),e(3),l("aria-expanded",s.showFields().general?"true":"false")("aria-controls","fieldsGeneral"),e(2),h(x(19,$,s.showFields().general,!s.showFields().general)),e(),d(" ",n(9,15,"support.links.title")," "),e(2),g(s.showFields().general?10:-1),e(2),l("aria-expanded",s.showFields().dev?"true":"false")("aria-controls","fieldsDev"),e(2),h(x(22,$,s.showFields().dev,!s.showFields().dev)),e(),d(" ",n(16,17,"support.dev.title")," "),e(2),g(s.showFields().dev?17:-1))},dependencies:[T],encapsulation:2})}return o})();export{A as SupportComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Jb as t,Kb as i,Lb as a,ia as r,nb as o}from"./chunk-MKV5RAJQ.js";var m=(()=>{class n{static \u0275fac=function(e){return new(e||n)};static \u0275cmp=o({type:n,selectors:[["app-spinner"]],decls:5,vars:0,consts:[[1,"app-spinner-container"],[1,"animate_loader"],["xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink","width","200px","height","200px","viewBox","0 0 100 100","preserveAspectRatio","xMidYMid",2,"margin","auto","display","block"],["cx","50","cy","50","r","32","stroke-width","8","stroke-dasharray","50.26548245743669 50.26548245743669","fill","none","stroke-linecap","round",1,"spinner_outer"],["cx","50","cy","50","r","23","stroke-width","8","stroke","#f8b26a","stroke-dasharray","36.12831551628262 36.12831551628262","stroke-dashoffset","36.12831551628262","fill","none","stroke-linecap","round",1,"spinner_inner"]],template:function(e,p){e&1&&(t(0,"div",0)(1,"div",1),r(),t(2,"svg",2),a(3,"circle",3)(4,"circle",4),i()()())},styles:[".app-spinner-container[_ngcontent-%COMP%]{position:absolute;inset:0 0 0 60px;display:flex;align-items:center;justify-content:center;z-index:1000}@media(max-width:767px){.app-spinner-container[_ngcontent-%COMP%]{left:0;top:65px}}.animate_loader[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{position:absolute;inset:0;margin:auto;width:200px;overflow:visible}@keyframes _ngcontent-%COMP%_spinner-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes _ngcontent-%COMP%_spinner-rotate-reverse{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}.spinner_outer[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_spinner-rotate 2.5s linear infinite;transform-origin:50px 50px}.spinner_inner[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_spinner-rotate-reverse 2.5s linear infinite;transform-origin:50px 50px}"]})}return n})();export{m as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ct}from"./chunk-BGCYR25X.js";import{a as Dn}from"./chunk-UO7KCTHV.js";import{g as mi}from"./chunk-2TQEV57U.js";import{$b as lt,A as ei,Aa as W,Ab as xt,Ac as yn,B as Mt,Bb as di,Cb as un,Db as kt,Eb as Ft,Fb as We,G as tt,Gb as ui,H as on,Hb as hi,Hc as wn,I as sn,Ib as hn,J as rn,Jb as st,Kb as rt,Lb as pn,O as an,Ob as _n,P as ln,Pb as fn,Q as ti,Qb as gn,R as j,Rb as pi,S as it,Sb as ee,Sc as fe,T as Ct,W as ii,X as K,Xb as pe,Y as N,Yb as mn,Yc as Bt,Za as Fe,Zb as le,_ as cn,_b as at,aa as c,ac as _e,bc as Pt,c as Zi,cb as It,cc as Y,d as $,db as nt,dc as q,e as en,ea as ni,eb as ot,g as Et,ga as Tt,gc as vn,ha as Nt,i as et,ic as P,jc as De,ka as ue,kb as ai,kc as _i,la as re,lc as fi,ma as oi,nb as ge,o as xe,oa as D,ob as I,pa as ae,pb as T,q as tn,rb as dn,sb as li,tb as Rt,v as X,w as nn,wc as gi,xa as je,xb as ci,ya as si,yb as he,yc as bn,z as ke,za as ri,zb as St}from"./chunk-MKV5RAJQ.js";import{a as Zt,b as qi}from"./chunk-B4AJQJMI.js";var R="top",U="bottom",B="right",x="left",At="auto",Oe=[R,U,B,x],me="start",Pe="end",On="clippingParents",Gt="viewport",ze="popper",En="reference",vi=Oe.reduce(function(e,o){return e.concat([o+"-"+me,o+"-"+Pe])},[]),Ht=[].concat(Oe,[At]).reduce(function(e,o){return e.concat([o,o+"-"+me,o+"-"+Pe])},[]),To="beforeRead",No="read",Io="afterRead",Ro="beforeMain",So="main",xo="afterMain",ko="beforeWrite",Fo="write",Po="afterWrite",Mn=[To,No,Io,Ro,So,xo,ko,Fo,Po];function A(e){return e?(e.nodeName||"").toLowerCase():null}function O(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var o=e.ownerDocument;return o&&o.defaultView||window}return e}function te(e){var o=O(e).Element;return e instanceof o||e instanceof Element}function k(e){var o=O(e).HTMLElement;return e instanceof o||e instanceof HTMLElement}function Xe(e){if(typeof ShadowRoot>"u")return!1;var o=O(e).ShadowRoot;return e instanceof o||e instanceof ShadowRoot}function Bo(e){var o=e.state;Object.keys(o.elements).forEach(function(t){var i=o.styles[t]||{},n=o.attributes[t]||{},s=o.elements[t];!k(s)||!A(s)||(Object.assign(s.style,i),Object.keys(n).forEach(function(r){var a=n[r];a===!1?s.removeAttribute(r):s.setAttribute(r,a===!0?"":a)}))})}function Ao(e){var o=e.state,t={popper:{position:o.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(o.elements.popper.style,t.popper),o.styles=t,o.elements.arrow&&Object.assign(o.elements.arrow.style,t.arrow),function(){Object.keys(o.elements).forEach(function(i){var n=o.elements[i],s=o.attributes[i]||{},r=Object.keys(o.styles.hasOwnProperty(i)?o.styles[i]:t[i]),a=r.reduce(function(l,u){return l[u]="",l},{});!k(n)||!A(n)||(Object.assign(n.style,a),Object.keys(s).forEach(function(l){n.removeAttribute(l)}))})}}var Cn={name:"applyStyles",enabled:!0,phase:"write",fn:Bo,effect:Ao,requires:["computeStyles"]};function G(e){return e.split("-")[0]}var ce=Math.max,Be=Math.min,ve=Math.round;function Ke(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(o){return o.brand+"/"+o.version}).join(" "):navigator.userAgent}function dt(){return!/^((?!chrome|android).)*safari/i.test(Ke())}function ie(e,o,t){o===void 0&&(o=!1),t===void 0&&(t=!1);var i=e.getBoundingClientRect(),n=1,s=1;o&&k(e)&&(n=e.offsetWidth>0&&ve(i.width)/e.offsetWidth||1,s=e.offsetHeight>0&&ve(i.height)/e.offsetHeight||1);var r=te(e)?O(e):window,a=r.visualViewport,l=!dt()&&t,u=(i.left+(l&&a?a.offsetLeft:0))/n,d=(i.top+(l&&a?a.offsetTop:0))/s,f=i.width/n,p=i.height/s;return{width:f,height:p,top:d,right:u+f,bottom:d+p,left:u,x:u,y:d}}function Ae(e){var o=ie(e),t=e.offsetWidth,i=e.offsetHeight;return Math.abs(o.width-t)<=1&&(t=o.width),Math.abs(o.height-i)<=1&&(i=o.height),{x:e.offsetLeft,y:e.offsetTop,width:t,height:i}}function ut(e,o){var t=o.getRootNode&&o.getRootNode();if(e.contains(o))return!0;if(t&&Xe(t)){var i=o;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Q(e){return O(e).getComputedStyle(e)}function bi(e){return["table","td","th"].indexOf(A(e))>=0}function L(e){return((te(e)?e.ownerDocument:e.document)||window.document).documentElement}function be(e){return A(e)==="html"?e:e.assignedSlot||e.parentNode||(Xe(e)?e.host:null)||L(e)}function Tn(e){return!k(e)||Q(e).position==="fixed"?null:e.offsetParent}function Go(e){var o=/firefox/i.test(Ke()),t=/Trident/i.test(Ke());if(t&&k(e)){var i=Q(e);if(i.position==="fixed")return null}var n=be(e);for(Xe(n)&&(n=n.host);k(n)&&["html","body"].indexOf(A(n))<0;){var s=Q(n);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||o&&s.willChange==="filter"||o&&s.filter&&s.filter!=="none")return n;n=n.parentNode}return null}function de(e){for(var o=O(e),t=Tn(e);t&&bi(t)&&Q(t).position==="static";)t=Tn(t);return t&&(A(t)==="html"||A(t)==="body"&&Q(t).position==="static")?o:t||Go(e)||o}function Ge(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function He(e,o,t){return ce(e,Be(o,t))}function Nn(e,o,t){var i=He(e,o,t);return i>t?t:i}function ht(){return{top:0,right:0,bottom:0,left:0}}function pt(e){return Object.assign({},ht(),e)}function _t(e,o){return o.reduce(function(t,i){return t[i]=e,t},{})}var Ho=function(o,t){return o=typeof o=="function"?o(Object.assign({},t.rects,{placement:t.placement})):o,pt(typeof o!="number"?o:_t(o,Oe))};function Uo(e){var o,t=e.state,i=e.name,n=e.options,s=t.elements.arrow,r=t.modifiersData.popperOffsets,a=G(t.placement),l=Ge(a),u=[x,B].indexOf(a)>=0,d=u?"height":"width";if(!(!s||!r)){var f=Ho(n.padding,t),p=Ae(s),h=l==="y"?R:x,v=l==="y"?U:B,_=t.rects.reference[d]+t.rects.reference[l]-r[l]-t.rects.popper[d],g=r[l]-t.rects.reference[l],w=de(s),E=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,C=_/2-g/2,m=f[h],b=E-p[d]-f[v],y=E/2-p[d]/2+C,M=He(m,y,b),H=l;t.modifiersData[i]=(o={},o[H]=M,o.centerOffset=M-y,o)}}function Lo(e){var o=e.state,t=e.options,i=t.element,n=i===void 0?"[data-popper-arrow]":i;n!=null&&(typeof n=="string"&&(n=o.elements.popper.querySelector(n),!n)||ut(o.elements.popper,n)&&(o.elements.arrow=n))}var yi={name:"arrow",enabled:!0,phase:"main",fn:Uo,effect:Lo,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ne(e){return e.split("-")[1]}var Vo={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $o(e,o){var t=e.x,i=e.y,n=o.devicePixelRatio||1;return{x:ve(t*n)/n||0,y:ve(i*n)/n||0}}function In(e){var o,t=e.popper,i=e.popperRect,n=e.placement,s=e.variation,r=e.offsets,a=e.position,l=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,f=e.isFixed,p=r.x,h=p===void 0?0:p,v=r.y,_=v===void 0?0:v,g=typeof d=="function"?d({x:h,y:_}):{x:h,y:_};h=g.x,_=g.y;var w=r.hasOwnProperty("x"),E=r.hasOwnProperty("y"),C=x,m=R,b=window;if(u){var y=de(t),M="clientHeight",H="clientWidth";if(y===O(t)&&(y=L(t),Q(y).position!=="static"&&a==="absolute"&&(M="scrollHeight",H="scrollWidth")),y=y,n===R||(n===x||n===B)&&s===Pe){m=U;var F=f&&y===b&&b.visualViewport?b.visualViewport.height:y[M];_-=F-i.height,_*=l?1:-1}if(n===x||(n===R||n===U)&&s===Pe){C=B;var S=f&&y===b&&b.visualViewport?b.visualViewport.width:y[H];h-=S-i.width,h*=l?1:-1}}var V=Object.assign({position:a},u&&Vo),oe=d===!0?$o({x:h,y:_},O(t)):{x:h,y:_};if(h=oe.x,_=oe.y,l){var z;return Object.assign({},V,(z={},z[m]=E?"0":"",z[C]=w?"0":"",z.transform=(b.devicePixelRatio||1)<=1?"translate("+h+"px, "+_+"px)":"translate3d("+h+"px, "+_+"px, 0)",z))}return Object.assign({},V,(o={},o[m]=E?_+"px":"",o[C]=w?h+"px":"",o.transform="",o))}function jo(e){var o=e.state,t=e.options,i=t.gpuAcceleration,n=i===void 0?!0:i,s=t.adaptive,r=s===void 0?!0:s,a=t.roundOffsets,l=a===void 0?!0:a,u={placement:G(o.placement),variation:ne(o.placement),popper:o.elements.popper,popperRect:o.rects.popper,gpuAcceleration:n,isFixed:o.options.strategy==="fixed"};o.modifiersData.popperOffsets!=null&&(o.styles.popper=Object.assign({},o.styles.popper,In(Object.assign({},u,{offsets:o.modifiersData.popperOffsets,position:o.options.strategy,adaptive:r,roundOffsets:l})))),o.modifiersData.arrow!=null&&(o.styles.arrow=Object.assign({},o.styles.arrow,In(Object.assign({},u,{offsets:o.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-placement":o.placement})}var Rn={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:jo,data:{}};var Ut={passive:!0};function Wo(e){var o=e.state,t=e.instance,i=e.options,n=i.scroll,s=n===void 0?!0:n,r=i.resize,a=r===void 0?!0:r,l=O(o.elements.popper),u=[].concat(o.scrollParents.reference,o.scrollParents.popper);return s&&u.forEach(function(d){d.addEventListener("scroll",t.update,Ut)}),a&&l.addEventListener("resize",t.update,Ut),function(){s&&u.forEach(function(d){d.removeEventListener("scroll",t.update,Ut)}),a&&l.removeEventListener("resize",t.update,Ut)}}var Sn={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Wo,data:{}};var zo={left:"right",right:"left",bottom:"top",top:"bottom"};function Qe(e){return e.replace(/left|right|bottom|top/g,function(o){return zo[o]})}var Xo={start:"end",end:"start"};function Lt(e){return e.replace(/start|end/g,function(o){return Xo[o]})}function Ue(e){var o=O(e),t=o.pageXOffset,i=o.pageYOffset;return{scrollLeft:t,scrollTop:i}}function Le(e){return ie(L(e)).left+Ue(e).scrollLeft}function wi(e,o){var t=O(e),i=L(e),n=t.visualViewport,s=i.clientWidth,r=i.clientHeight,a=0,l=0;if(n){s=n.width,r=n.height;var u=dt();(u||!u&&o==="fixed")&&(a=n.offsetLeft,l=n.offsetTop)}return{width:s,height:r,x:a+Le(e),y:l}}function Di(e){var o,t=L(e),i=Ue(e),n=(o=e.ownerDocument)==null?void 0:o.body,s=ce(t.scrollWidth,t.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),r=ce(t.scrollHeight,t.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),a=-i.scrollLeft+Le(e),l=-i.scrollTop;return Q(n||t).direction==="rtl"&&(a+=ce(t.clientWidth,n?n.clientWidth:0)-s),{width:s,height:r,x:a,y:l}}function Ve(e){var o=Q(e),t=o.overflow,i=o.overflowX,n=o.overflowY;return/auto|scroll|overlay|hidden/.test(t+n+i)}function Vt(e){return["html","body","#document"].indexOf(A(e))>=0?e.ownerDocument.body:k(e)&&Ve(e)?e:Vt(be(e))}function Ee(e,o){var t;o===void 0&&(o=[]);var i=Vt(e),n=i===((t=e.ownerDocument)==null?void 0:t.body),s=O(i),r=n?[s].concat(s.visualViewport||[],Ve(i)?i:[]):i,a=o.concat(r);return n?a:a.concat(Ee(be(r)))}function Je(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Ko(e,o){var t=ie(e,!1,o==="fixed");return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function xn(e,o,t){return o===Gt?Je(wi(e,t)):te(o)?Ko(o,t):Je(Di(L(e)))}function Qo(e){var o=Ee(be(e)),t=["absolute","fixed"].indexOf(Q(e).position)>=0,i=t&&k(e)?de(e):e;return te(i)?o.filter(function(n){return te(n)&&ut(n,i)&&A(n)!=="body"}):[]}function Oi(e,o,t,i){var n=o==="clippingParents"?Qo(e):[].concat(o),s=[].concat(n,[t]),r=s[0],a=s.reduce(function(l,u){var d=xn(e,u,i);return l.top=ce(d.top,l.top),l.right=Be(d.right,l.right),l.bottom=Be(d.bottom,l.bottom),l.left=ce(d.left,l.left),l},xn(e,r,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function ft(e){var o=e.reference,t=e.element,i=e.placement,n=i?G(i):null,s=i?ne(i):null,r=o.x+o.width/2-t.width/2,a=o.y+o.height/2-t.height/2,l;switch(n){case R:l={x:r,y:o.y-t.height};break;case U:l={x:r,y:o.y+o.height};break;case B:l={x:o.x+o.width,y:a};break;case x:l={x:o.x-t.width,y:a};break;default:l={x:o.x,y:o.y}}var u=n?Ge(n):null;if(u!=null){var d=u==="y"?"height":"width";switch(s){case me:l[u]=l[u]-(o[d]/2-t[d]/2);break;case Pe:l[u]=l[u]+(o[d]/2-t[d]/2);break;default:}}return l}function Me(e,o){o===void 0&&(o={});var t=o,i=t.placement,n=i===void 0?e.placement:i,s=t.strategy,r=s===void 0?e.strategy:s,a=t.boundary,l=a===void 0?On:a,u=t.rootBoundary,d=u===void 0?Gt:u,f=t.elementContext,p=f===void 0?ze:f,h=t.altBoundary,v=h===void 0?!1:h,_=t.padding,g=_===void 0?0:_,w=pt(typeof g!="number"?g:_t(g,Oe)),E=p===ze?En:ze,C=e.rects.popper,m=e.elements[v?E:p],b=Oi(te(m)?m:m.contextElement||L(e.elements.popper),l,d,r),y=ie(e.elements.reference),M=ft({reference:y,element:C,strategy:"absolute",placement:n}),H=Je(Object.assign({},C,M)),F=p===ze?H:y,S={top:b.top-F.top+w.top,bottom:F.bottom-b.bottom+w.bottom,left:b.left-F.left+w.left,right:F.right-b.right+w.right},V=e.modifiersData.offset;if(p===ze&&V){var oe=V[n];Object.keys(S).forEach(function(z){var Te=[B,U].indexOf(z)>=0?1:-1,Ne=[R,U].indexOf(z)>=0?"y":"x";S[z]+=oe[Ne]*Te})}return S}function Ei(e,o){o===void 0&&(o={});var t=o,i=t.placement,n=t.boundary,s=t.rootBoundary,r=t.padding,a=t.flipVariations,l=t.allowedAutoPlacements,u=l===void 0?Ht:l,d=ne(i),f=d?a?vi:vi.filter(function(v){return ne(v)===d}):Oe,p=f.filter(function(v){return u.indexOf(v)>=0});p.length===0&&(p=f);var h=p.reduce(function(v,_){return v[_]=Me(e,{placement:_,boundary:n,rootBoundary:s,padding:r})[G(_)],v},{});return Object.keys(h).sort(function(v,_){return h[v]-h[_]})}function Jo(e){if(G(e)===At)return[];var o=Qe(e);return[Lt(e),o,Lt(o)]}function Yo(e){var o=e.state,t=e.options,i=e.name;if(!o.modifiersData[i]._skip){for(var n=t.mainAxis,s=n===void 0?!0:n,r=t.altAxis,a=r===void 0?!0:r,l=t.fallbackPlacements,u=t.padding,d=t.boundary,f=t.rootBoundary,p=t.altBoundary,h=t.flipVariations,v=h===void 0?!0:h,_=t.allowedAutoPlacements,g=o.options.placement,w=G(g),E=w===g,C=l||(E||!v?[Qe(g)]:Jo(g)),m=[g].concat(C).reduce(function($e,we){return $e.concat(G(we)===At?Ei(o,{placement:we,boundary:d,rootBoundary:f,padding:u,flipVariations:v,allowedAutoPlacements:_}):we)},[]),b=o.rects.reference,y=o.rects.popper,M=new Map,H=!0,F=m[0],S=0;S<m.length;S++){var V=m[S],oe=G(V),z=ne(V)===me,Te=[R,U].indexOf(oe)>=0,Ne=Te?"width":"height",J=Me(o,{placement:V,boundary:d,rootBoundary:f,altBoundary:p,padding:u}),se=Te?z?B:x:z?U:R;b[Ne]>y[Ne]&&(se=Qe(se));var bt=Qe(se),Ie=[];if(s&&Ie.push(J[oe]<=0),a&&Ie.push(J[se]<=0,J[bt]<=0),Ie.every(function($e){return $e})){F=V,H=!1;break}M.set(V,Ie)}if(H)for(var yt=v?3:1,Qt=function(we){var Ze=m.find(function(Dt){var Re=M.get(Dt);if(Re)return Re.slice(0,we).every(function(Jt){return Jt})});if(Ze)return F=Ze,"break"},qe=yt;qe>0;qe--){var wt=Qt(qe);if(wt==="break")break}o.placement!==F&&(o.modifiersData[i]._skip=!0,o.placement=F,o.reset=!0)}}var Mi={name:"flip",enabled:!0,phase:"main",fn:Yo,requiresIfExists:["offset"],data:{_skip:!1}};function qo(e,o,t){var i=G(e),n=[x,R].indexOf(i)>=0?-1:1,s=typeof t=="function"?t(Object.assign({},o,{placement:e})):t,r=s[0],a=s[1];return r=r||0,a=(a||0)*n,[x,B].indexOf(i)>=0?{x:a,y:r}:{x:r,y:a}}function Zo(e){var o=e.state,t=e.options,i=e.name,n=t.offset,s=n===void 0?[0,0]:n,r=Ht.reduce(function(d,f){return d[f]=qo(f,o.rects,s),d},{}),a=r[o.placement],l=a.x,u=a.y;o.modifiersData.popperOffsets!=null&&(o.modifiersData.popperOffsets.x+=l,o.modifiersData.popperOffsets.y+=u),o.modifiersData[i]=r}var Ci={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Zo};function es(e){var o=e.state,t=e.name;o.modifiersData[t]=ft({reference:o.rects.reference,element:o.rects.popper,strategy:"absolute",placement:o.placement})}var kn={name:"popperOffsets",enabled:!0,phase:"read",fn:es,data:{}};function Ti(e){return e==="x"?"y":"x"}function ts(e){var o=e.state,t=e.options,i=e.name,n=t.mainAxis,s=n===void 0?!0:n,r=t.altAxis,a=r===void 0?!1:r,l=t.boundary,u=t.rootBoundary,d=t.altBoundary,f=t.padding,p=t.tether,h=p===void 0?!0:p,v=t.tetherOffset,_=v===void 0?0:v,g=Me(o,{boundary:l,rootBoundary:u,padding:f,altBoundary:d}),w=G(o.placement),E=ne(o.placement),C=!E,m=Ge(w),b=Ti(m),y=o.modifiersData.popperOffsets,M=o.rects.reference,H=o.rects.popper,F=typeof _=="function"?_(Object.assign({},o.rects,{placement:o.placement})):_,S=typeof F=="number"?{mainAxis:F,altAxis:F}:Object.assign({mainAxis:0,altAxis:0},F),V=o.modifiersData.offset?o.modifiersData.offset[o.placement]:null,oe={x:0,y:0};if(y){if(s){var z,Te=m==="y"?R:x,Ne=m==="y"?U:B,J=m==="y"?"height":"width",se=y[m],bt=se+g[Te],Ie=se-g[Ne],yt=h?-H[J]/2:0,Qt=E===me?M[J]:H[J],qe=E===me?-H[J]:-M[J],wt=o.elements.arrow,$e=h&&wt?Ae(wt):{width:0,height:0},we=o.modifiersData["arrow#persistent"]?o.modifiersData["arrow#persistent"].padding:ht(),Ze=we[Te],Dt=we[Ne],Re=He(0,M[J],$e[J]),Jt=C?M[J]/2-yt-Re-Ze-S.mainAxis:Qt-Re-Ze-S.mainAxis,wo=C?-M[J]/2+yt+Re+Dt+S.mainAxis:qe+Re+Dt+S.mainAxis,Yt=o.elements.arrow&&de(o.elements.arrow),Do=Yt?m==="y"?Yt.clientTop||0:Yt.clientLeft||0:0,$i=(z=V?.[m])!=null?z:0,Oo=se+Jt-$i-Do,Eo=se+wo-$i,ji=He(h?Be(bt,Oo):bt,se,h?ce(Ie,Eo):Ie);y[m]=ji,oe[m]=ji-se}if(a){var Wi,Mo=m==="x"?R:x,Co=m==="x"?U:B,Se=y[b],Ot=b==="y"?"height":"width",zi=Se+g[Mo],Xi=Se-g[Co],qt=[R,x].indexOf(w)!==-1,Ki=(Wi=V?.[b])!=null?Wi:0,Qi=qt?zi:Se-M[Ot]-H[Ot]-Ki+S.altAxis,Ji=qt?Se+M[Ot]+H[Ot]-Ki-S.altAxis:Xi,Yi=h&&qt?Nn(Qi,Se,Ji):He(h?Qi:zi,Se,h?Ji:Xi);y[b]=Yi,oe[b]=Yi-Se}o.modifiersData[i]=oe}}var Ni={name:"preventOverflow",enabled:!0,phase:"main",fn:ts,requiresIfExists:["offset"]};function Ii(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Ri(e){return e===O(e)||!k(e)?Ue(e):Ii(e)}function is(e){var o=e.getBoundingClientRect(),t=ve(o.width)/e.offsetWidth||1,i=ve(o.height)/e.offsetHeight||1;return t!==1||i!==1}function Si(e,o,t){t===void 0&&(t=!1);var i=k(o),n=k(o)&&is(o),s=L(o),r=ie(e,n,t),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!t)&&((A(o)!=="body"||Ve(s))&&(a=Ri(o)),k(o)?(l=ie(o,!0),l.x+=o.clientLeft,l.y+=o.clientTop):s&&(l.x=Le(s))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function ns(e){var o=new Map,t=new Set,i=[];e.forEach(function(s){o.set(s.name,s)});function n(s){t.add(s.name);var r=[].concat(s.requires||[],s.requiresIfExists||[]);r.forEach(function(a){if(!t.has(a)){var l=o.get(a);l&&n(l)}}),i.push(s)}return e.forEach(function(s){t.has(s.name)||n(s)}),i}function xi(e){var o=ns(e);return Mn.reduce(function(t,i){return t.concat(o.filter(function(n){return n.phase===i}))},[])}function ki(e){var o;return function(){return o||(o=new Promise(function(t){Promise.resolve().then(function(){o=void 0,t(e())})})),o}}function Fi(e){var o=e.reduce(function(t,i){var n=t[i.name];return t[i.name]=n?Object.assign({},n,i,{options:Object.assign({},n.options,i.options),data:Object.assign({},n.data,i.data)}):i,t},{});return Object.keys(o).map(function(t){return o[t]})}var Fn={placement:"bottom",modifiers:[],strategy:"absolute"};function Pn(){for(var e=arguments.length,o=new Array(e),t=0;t<e;t++)o[t]=arguments[t];return!o.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function Bn(e){e===void 0&&(e={});var o=e,t=o.defaultModifiers,i=t===void 0?[]:t,n=o.defaultOptions,s=n===void 0?Fn:n;return function(a,l,u){u===void 0&&(u=s);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},Fn,s),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},f=[],p=!1,h={state:d,setOptions:function(w){var E=typeof w=="function"?w(d.options):w;_(),d.options=Object.assign({},s,d.options,E),d.scrollParents={reference:te(a)?Ee(a):a.contextElement?Ee(a.contextElement):[],popper:Ee(l)};var C=xi(Fi([].concat(i,d.options.modifiers)));return d.orderedModifiers=C.filter(function(m){return m.enabled}),v(),h.update()},forceUpdate:function(){if(!p){var w=d.elements,E=w.reference,C=w.popper;if(Pn(E,C)){d.rects={reference:Si(E,de(C),d.options.strategy==="fixed"),popper:Ae(C)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(S){return d.modifiersData[S.name]=Object.assign({},S.data)});for(var m=0;m<d.orderedModifiers.length;m++){if(d.reset===!0){d.reset=!1,m=-1;continue}var b=d.orderedModifiers[m],y=b.fn,M=b.options,H=M===void 0?{}:M,F=b.name;typeof y=="function"&&(d=y({state:d,options:H,name:F,instance:h})||d)}}}},update:ki(function(){return new Promise(function(g){h.forceUpdate(),g(d)})}),destroy:function(){_(),p=!0}};if(!Pn(a,l))return h;h.setOptions(u).then(function(g){!p&&u.onFirstUpdate&&u.onFirstUpdate(g)});function v(){d.orderedModifiers.forEach(function(g){var w=g.name,E=g.options,C=E===void 0?{}:E,m=g.effect;if(typeof m=="function"){var b=m({state:d,name:w,instance:h,options:C}),y=function(){};f.push(b||y)}})}function _(){f.forEach(function(g){return g()}),f=[]}return h}}var os=[Sn,kn,Rn,Cn],Pi=Bn({defaultModifiers:os});var ss=["container"],rs=["ngbAccordionBody",""],zt=["*"];function as(e,o){if(e&1){let t=pi();st(0,"button",1),mn("click",function(){Tt(t);let n=le();return Nt(n.close())}),rt()}}var ls=e=>({$implicit:e});var cs=["dialog"],ds=["ngbNavOutlet",""];function us(e,o){}function hs(e,o){if(e&1&&(ui(0,"div",0),Rt(1,us,0,0,"ng-template",1),hi()),e&2){let t=le().$implicit,i=le();We("item",t)("nav",i.nav)("role",i.paneRole),Fe(),We("ngTemplateOutlet",(t.contentTpl==null?null:t.contentTpl.templateRef)||null)("ngTemplateOutletContext",bn(5,ls,t.active||i.isPanelTransitioning(t)))}}function ps(e,o){if(e&1&&St(0,hs,2,7,"div",0),e&2){let t=o.$implicit,i=le();xt(t.isPanelInDom()||i.isPanelTransitioning(t)?0:-1)}}function _s(e,o){if(e&1&&(st(0,"span"),_i(1),rt()),e&2){let t=le().$implicit,i=le();De(i.highlightClass),Fe(),fi(t)}}function fs(e,o){if(e&1&&(_n(0),_i(1),fn()),e&2){let t=le().$implicit;Fe(),fi(t)}}function gs(e,o){if(e&1&&St(0,_s,2,3,"span",0)(1,fs,2,1,"ng-container"),e&2){let t=o.$index;xt(t%2!==0?0:1)}}var ms=(e,o,t)=>({result:e,term:o,formatter:t});function vs(e,o){if(e&1&&hn(0,"ngb-highlight",2),e&2){let t=o.result,i=o.term,n=o.formatter;We("result",n(t))("term",i)}}function bs(e,o){}function ys(e,o){if(e&1){let t=pi();ui(0,"button",3),pe("mouseenter",function(){let n=Tt(t).$index,s=le();return Nt(s.markActive(n))})("click",function(){let n=Tt(t).$implicit,s=le();return Nt(s.select(n))}),Rt(1,bs,0,0,"ng-template",4),hi()}if(e&2){let t=o.$implicit,i=o.$index,n=le(),s=vn(1);P("active",i===n.activeIdx),We("id",n.id+"-"+i),Fe(),We("ngTemplateOutlet",n.resultTemplate||s)("ngTemplateOutletContext",yn(5,ms,t,n.term,n.formatter))}}var Wn={animation:!0,transitionTimerDelayMs:5},Ye=(()=>{class e{constructor(){this.animation=Wn.animation}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),ws=(()=>{class e{constructor(){this._ngbConfig=c(Ye),this.closeOthers=!1,this.destroyOnHide=!0}get animation(){return this._animation??this._ngbConfig.animation}set animation(t){this._animation=t}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function Ds(e){let{transitionDelay:o,transitionDuration:t}=window.getComputedStyle(e),i=parseFloat(o),n=parseFloat(t);return(i+n)*1e3}function mt(e){return e!=null?`${e}`:""}function Xt(e){return typeof e=="string"}function Ce(e){return e!=null}function Os(e){return e&&e.then}function Es(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function Ms(e,o){return!o||typeof e.closest>"u"?null:e.closest(o)}function Kt(e){return(e||document.body).getBoundingClientRect()}function Cs(e){return o=>new Zi(t=>{let i=r=>e.run(()=>t.next(r)),n=r=>e.run(()=>t.error(r)),s=()=>e.run(()=>t.complete());return o.subscribe({next:i,error:n,complete:s})})}function An(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function zn(e=document){let o=e?.activeElement;return o?o.shadowRoot?zn(o.shadowRoot):o:null}var Ts=()=>{},{transitionTimerDelayMs:Ns}=Wn,gt=new Map,Z=(e,o,t,i)=>{let n=i.context||{},s=gt.get(o);if(s)switch(i.runningTransition){case"continue":return Et;case"stop":e.run(()=>s.transition$.complete()),n=Object.assign(s.context,n),gt.delete(o)}let r=t(o,i.animation,n)||Ts;if(!i.animation||window.getComputedStyle(o).transitionProperty==="none")return e.run(()=>r()),et(void 0).pipe(Cs(e));let a=new $,l=new $,u=a.pipe(rn(!0));gt.set(o,{transition$:a,complete:()=>{l.next(),l.complete()},context:n});let d=Ds(o);return e.runOutsideAngular(()=>{let f=X(o,"transitionend").pipe(j(u),ke(({target:h})=>h===o)),p=nn(d+Ns).pipe(j(u));ei(p,f,l).pipe(j(u)).subscribe(()=>{gt.delete(o),e.run(()=>{r(),a.next(),a.complete()})})}),a.asObservable()},Gn=e=>{gt.get(e)?.complete()};function Is(e,o){if(typeof navigator>"u")return"0px";let{classList:t}=e,i=t.contains("show");i||t.add("show"),e.style[o]="";let n=e.getBoundingClientRect()[o]+"px";return i||t.remove("show"),n}var Rs=(e,o,t)=>{let{direction:i,maxSize:n,dimension:s}=t,{classList:r}=e;function a(){r.add("collapse"),i==="show"?r.add("show"):r.remove("show")}if(!o){a();return}return n||(n=Is(e,s),t.maxSize=n,e.style[s]=i!=="show"?n:"0px",r.remove("collapse","collapsing","show"),Kt(e),r.add("collapsing")),e.style[s]=i==="show"?n:"0px",()=>{a(),r.remove("collapsing"),e.style[s]=""}},Ss=(()=>{class e{constructor(){this._ngbConfig=c(Ye),this.horizontal=!1}get animation(){return this._animation??this._ngbConfig.animation}set animation(t){this._animation=t}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),Hn=(()=>{class e{constructor(){this._config=c(Ss),this._element=c(W),this._zone=c(ae),this.animation=this._config.animation,this._afterInit=!1,this._isCollapsed=!1,this.ngbCollapseChange=new D,this.horizontal=this._config.horizontal,this.shown=new D,this.hidden=new D}set collapsed(t){this._isCollapsed!==t&&(this._isCollapsed=t,this._afterInit&&this._runTransitionWithEvents(t,this.animation))}ngOnInit(){this._runTransition(this._isCollapsed,!1),this._afterInit=!0}toggle(t=this._isCollapsed){this.collapsed=!t,this.ngbCollapseChange.next(this._isCollapsed)}_runTransition(t,i){return Z(this._zone,this._element.nativeElement,Rs,{animation:i,runningTransition:"stop",context:{direction:t?"hide":"show",dimension:this.horizontal?"width":"height"}})}_runTransitionWithEvents(t,i){this._runTransition(t,i).subscribe(()=>{t?this.hidden.emit():this.shown.emit()})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=T({type:e,selectors:[["","ngbCollapse",""]],hostVars:2,hostBindings:function(i,n){i&2&&P("collapse-horizontal",n.horizontal)},inputs:{animation:"animation",collapsed:[0,"ngbCollapse","collapsed"],horizontal:"horizontal"},outputs:{ngbCollapseChange:"ngbCollapseChange",shown:"shown",hidden:"hidden"},exportAs:["ngbCollapse"]})}}return e})(),xs=0,tu=(()=>{class e{constructor(){this._item=c(vt),this._viewRef=null,this.elementRef=c(W)}ngAfterContentChecked(){this._bodyTpl&&(this._item._shouldBeInDOM?this._createViewIfNotExists():this._destroyViewIfExists())}ngOnDestroy(){this._destroyViewIfExists()}_destroyViewIfExists(){this._viewRef?.destroy(),this._viewRef=null}_createViewIfNotExists(){this._viewRef||(this._viewRef=this._vcr.createEmbeddedView(this._bodyTpl),this._viewRef.detectChanges())}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=ge({type:e,selectors:[["","ngbAccordionBody",""]],contentQueries:function(i,n,s){if(i&1&&_e(s,ot,7),i&2){let r;Y(r=q())&&(n._bodyTpl=r.first)}},viewQuery:function(i,n){if(i&1&&Pt(ss,7,ai),i&2){let s;Y(s=q())&&(n._vcr=s.first)}},hostAttrs:[1,"accordion-body"],attrs:rs,ngContentSelectors:zt,decls:3,vars:0,consts:[["container",""]],template:function(i,n){i&1&&(at(),gn(0,null,0),lt(2))},encapsulation:2})}}return e})(),ks=(()=>{class e{constructor(){this.item=c(vt),this.ngbCollapse=c(Hn)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=T({type:e,selectors:[["","ngbAccordionCollapse",""]],hostAttrs:["role","region",1,"accordion-collapse"],hostVars:2,hostBindings:function(i,n){i&2&&(ee("id",n.item.collapseId),he("aria-labelledby",n.item.toggleId))},exportAs:["ngbAccordionCollapse"],features:[dn([Hn])]})}}return e})(),iu=(()=>{class e{constructor(){this.item=c(vt),this.accordion=c(Xn)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=T({type:e,selectors:[["","ngbAccordionToggle",""]],hostVars:5,hostBindings:function(i,n){i&1&&pe("click",function(){return!n.item.disabled&&n.accordion.toggle(n.item.id)}),i&2&&(ee("id",n.item.toggleId),he("aria-controls",n.item.collapseId)("aria-expanded",!n.item.collapsed),P("collapsed",n.item.collapsed))}})}}return e})();var nu=(()=>{class e{constructor(){this.item=c(vt)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=T({type:e,selectors:[["","ngbAccordionHeader",""]],hostAttrs:["role","heading",1,"accordion-header"],hostVars:2,hostBindings:function(i,n){i&2&&P("collapsed",n.item.collapsed)}})}}return e})(),vt=(()=>{class e{constructor(){this._accordion=c(Xn),this._cd=c(fe),this._destroyRef=c(oi),this._collapsed=!0,this._id=`ngb-accordion-item-${xs++}`,this._collapseAnimationRunning=!1,this.disabled=!1,this.show=new D,this.shown=new D,this.hide=new D,this.hidden=new D}set id(t){Xt(t)&&t!==""&&(this._id=t)}set destroyOnHide(t){this._destroyOnHide=t}get destroyOnHide(){return this._destroyOnHide===void 0?this._accordion.destroyOnHide:this._destroyOnHide}set collapsed(t){t?this.collapse():this.expand()}get collapsed(){return this._collapsed}get id(){return`${this._id}`}get toggleId(){return`${this.id}-toggle`}get collapseId(){return`${this.id}-collapse`}get _shouldBeInDOM(){return!this.collapsed||this._collapseAnimationRunning||!this.destroyOnHide}ngAfterContentInit(){let{ngbCollapse:t}=this._collapse;t.animation=!1,t.collapsed=this.collapsed,t.animation=this._accordion.animation,t.hidden.pipe(ct(this._destroyRef)).subscribe(()=>{this._collapseAnimationRunning=!1,this.hidden.emit(),this._accordion.hidden.emit(this.id),this._cd.markForCheck()}),t.shown.pipe(ct(this._destroyRef)).subscribe(()=>{this.shown.emit(),this._accordion.shown.emit(this.id),this._cd.markForCheck()})}toggle(){this.collapsed=!this.collapsed}expand(){if(this.collapsed){if(!this._accordion._ensureCanExpand(this))return;this._collapsed=!1,this._cd.markForCheck(),this._cd.detectChanges(),this.show.emit(),this._accordion.show.emit(this.id),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=!1}}collapse(){this.collapsed||(this._collapsed=!0,this._collapseAnimationRunning=!0,this._cd.markForCheck(),this.hide.emit(),this._accordion.hide.emit(this.id),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=!0)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=T({type:e,selectors:[["","ngbAccordionItem",""]],contentQueries:function(i,n,s){if(i&1&&_e(s,ks,7),i&2){let r;Y(r=q())&&(n._collapse=r.first)}},hostAttrs:[1,"accordion-item"],hostVars:1,hostBindings:function(i,n){i&2&&ee("id",n.id)},inputs:{id:[0,"ngbAccordionItem","id"],destroyOnHide:"destroyOnHide",disabled:"disabled",collapsed:"collapsed"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordionItem"]})}}return e})(),Xn=(()=>{class e{constructor(){this._config=c(ws),this._anItemWasAlreadyExpandedDuringInitialisation=!1,this.animation=this._config.animation,this.closeOthers=this._config.closeOthers,this.destroyOnHide=this._config.destroyOnHide,this.show=new D,this.shown=new D,this.hide=new D,this.hidden=new D}toggle(t){this._getItem(t)?.toggle()}expand(t){this._getItem(t)?.expand()}expandAll(){this._items&&(this.closeOthers?this._items.find(t=>!t.collapsed)||this._items.first.expand():this._items.forEach(t=>t.expand()))}collapse(t){this._getItem(t)?.collapse()}collapseAll(){this._items?.forEach(t=>t.collapse())}isExpanded(t){let i=this._getItem(t);return i?!i.collapsed:!1}_ensureCanExpand(t){return this.closeOthers?this._items?(this._items.find(i=>!i.collapsed&&t!==i)?.collapse(),!0):this._anItemWasAlreadyExpandedDuringInitialisation?!1:(this._anItemWasAlreadyExpandedDuringInitialisation=!0,!0):!0}_getItem(t){return this._items?.find(i=>i.id===t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=T({type:e,selectors:[["","ngbAccordion",""]],contentQueries:function(i,n,s){if(i&1&&_e(s,vt,4),i&2){let r;Y(r=q())&&(n._items=r)}},hostAttrs:[1,"accordion"],inputs:{animation:"animation",closeOthers:"closeOthers",destroyOnHide:"destroyOnHide"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordion"]})}}return e})();var Kn=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=I({type:e})}static{this.\u0275inj=N({})}}return e})(),Fs=(()=>{class e{constructor(){this._ngbConfig=c(Ye),this.dismissible=!0,this.type="warning"}get animation(){return this._animation??this._ngbConfig.animation}set animation(t){this._animation=t}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),Ps=({classList:e})=>{e.remove("show")},ou=(()=>{class e{constructor(){this._config=c(Fs),this._elementRef=c(W),this._zone=c(ae),this.animation=this._config.animation,this.dismissible=this._config.dismissible,this.type=this._config.type,this.closed=new D}close(){let t=Z(this._zone,this._elementRef.nativeElement,Ps,{animation:this.animation,runningTransition:"continue"});return t.subscribe(()=>this.closed.emit()),t}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=ge({type:e,selectors:[["ngb-alert"]],hostAttrs:["role","alert"],hostVars:6,hostBindings:function(i,n){i&2&&(De("alert show"+(n.type?" alert-"+n.type:"")),P("fade",n.animation)("alert-dismissible",n.dismissible))},inputs:{animation:"animation",dismissible:"dismissible",type:"type"},outputs:{closed:"closed"},exportAs:["ngbAlert"],ngContentSelectors:zt,decls:2,vars:1,consts:()=>{let t;return t=$localize`:@@ngb.alert.close:Close`,[["type","button","aria-label",t,1,"btn-close"],["type","button","aria-label",t,1,"btn-close",3,"click"]]},template:function(i,n){i&1&&(at(),lt(0),St(1,as,1,0,"button",0)),i&2&&(Fe(),xt(n.dismissible?1:-1))},styles:[`ngb-alert{display:block}
|
|
1
|
+
import{a as ct}from"./chunk-BGCYR25X.js";import{a as Dn}from"./chunk-YAUW3QQV.js";import{g as mi}from"./chunk-B6EPFA4V.js";import{$b as lt,A as ei,Aa as W,Ab as xt,Ac as yn,B as Mt,Bb as di,Cb as un,Db as kt,Eb as Ft,Fb as We,G as tt,Gb as ui,H as on,Hb as hi,Hc as wn,I as sn,Ib as hn,J as rn,Jb as st,Kb as rt,Lb as pn,O as an,Ob as _n,P as ln,Pb as fn,Q as ti,Qb as gn,R as j,Rb as pi,S as it,Sb as ee,Sc as fe,T as Ct,W as ii,X as K,Xb as pe,Y as N,Yb as mn,Yc as Bt,Za as Fe,Zb as le,_ as cn,_b as at,aa as c,ac as _e,bc as Pt,c as Zi,cb as It,cc as Y,d as $,db as nt,dc as q,e as en,ea as ni,eb as ot,g as Et,ga as Tt,gc as vn,ha as Nt,i as et,ic as P,jc as De,ka as ue,kb as ai,kc as _i,la as re,lc as fi,ma as oi,nb as ge,o as xe,oa as D,ob as I,pa as ae,pb as T,q as tn,rb as dn,sb as li,tb as Rt,v as X,w as nn,wc as gi,xa as je,xb as ci,ya as si,yb as he,yc as bn,z as ke,za as ri,zb as St}from"./chunk-MKV5RAJQ.js";import{a as Zt,b as qi}from"./chunk-B4AJQJMI.js";var R="top",U="bottom",B="right",x="left",At="auto",Oe=[R,U,B,x],me="start",Pe="end",On="clippingParents",Gt="viewport",ze="popper",En="reference",vi=Oe.reduce(function(e,o){return e.concat([o+"-"+me,o+"-"+Pe])},[]),Ht=[].concat(Oe,[At]).reduce(function(e,o){return e.concat([o,o+"-"+me,o+"-"+Pe])},[]),To="beforeRead",No="read",Io="afterRead",Ro="beforeMain",So="main",xo="afterMain",ko="beforeWrite",Fo="write",Po="afterWrite",Mn=[To,No,Io,Ro,So,xo,ko,Fo,Po];function A(e){return e?(e.nodeName||"").toLowerCase():null}function O(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var o=e.ownerDocument;return o&&o.defaultView||window}return e}function te(e){var o=O(e).Element;return e instanceof o||e instanceof Element}function k(e){var o=O(e).HTMLElement;return e instanceof o||e instanceof HTMLElement}function Xe(e){if(typeof ShadowRoot>"u")return!1;var o=O(e).ShadowRoot;return e instanceof o||e instanceof ShadowRoot}function Bo(e){var o=e.state;Object.keys(o.elements).forEach(function(t){var i=o.styles[t]||{},n=o.attributes[t]||{},s=o.elements[t];!k(s)||!A(s)||(Object.assign(s.style,i),Object.keys(n).forEach(function(r){var a=n[r];a===!1?s.removeAttribute(r):s.setAttribute(r,a===!0?"":a)}))})}function Ao(e){var o=e.state,t={popper:{position:o.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(o.elements.popper.style,t.popper),o.styles=t,o.elements.arrow&&Object.assign(o.elements.arrow.style,t.arrow),function(){Object.keys(o.elements).forEach(function(i){var n=o.elements[i],s=o.attributes[i]||{},r=Object.keys(o.styles.hasOwnProperty(i)?o.styles[i]:t[i]),a=r.reduce(function(l,u){return l[u]="",l},{});!k(n)||!A(n)||(Object.assign(n.style,a),Object.keys(s).forEach(function(l){n.removeAttribute(l)}))})}}var Cn={name:"applyStyles",enabled:!0,phase:"write",fn:Bo,effect:Ao,requires:["computeStyles"]};function G(e){return e.split("-")[0]}var ce=Math.max,Be=Math.min,ve=Math.round;function Ke(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(o){return o.brand+"/"+o.version}).join(" "):navigator.userAgent}function dt(){return!/^((?!chrome|android).)*safari/i.test(Ke())}function ie(e,o,t){o===void 0&&(o=!1),t===void 0&&(t=!1);var i=e.getBoundingClientRect(),n=1,s=1;o&&k(e)&&(n=e.offsetWidth>0&&ve(i.width)/e.offsetWidth||1,s=e.offsetHeight>0&&ve(i.height)/e.offsetHeight||1);var r=te(e)?O(e):window,a=r.visualViewport,l=!dt()&&t,u=(i.left+(l&&a?a.offsetLeft:0))/n,d=(i.top+(l&&a?a.offsetTop:0))/s,f=i.width/n,p=i.height/s;return{width:f,height:p,top:d,right:u+f,bottom:d+p,left:u,x:u,y:d}}function Ae(e){var o=ie(e),t=e.offsetWidth,i=e.offsetHeight;return Math.abs(o.width-t)<=1&&(t=o.width),Math.abs(o.height-i)<=1&&(i=o.height),{x:e.offsetLeft,y:e.offsetTop,width:t,height:i}}function ut(e,o){var t=o.getRootNode&&o.getRootNode();if(e.contains(o))return!0;if(t&&Xe(t)){var i=o;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Q(e){return O(e).getComputedStyle(e)}function bi(e){return["table","td","th"].indexOf(A(e))>=0}function L(e){return((te(e)?e.ownerDocument:e.document)||window.document).documentElement}function be(e){return A(e)==="html"?e:e.assignedSlot||e.parentNode||(Xe(e)?e.host:null)||L(e)}function Tn(e){return!k(e)||Q(e).position==="fixed"?null:e.offsetParent}function Go(e){var o=/firefox/i.test(Ke()),t=/Trident/i.test(Ke());if(t&&k(e)){var i=Q(e);if(i.position==="fixed")return null}var n=be(e);for(Xe(n)&&(n=n.host);k(n)&&["html","body"].indexOf(A(n))<0;){var s=Q(n);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||o&&s.willChange==="filter"||o&&s.filter&&s.filter!=="none")return n;n=n.parentNode}return null}function de(e){for(var o=O(e),t=Tn(e);t&&bi(t)&&Q(t).position==="static";)t=Tn(t);return t&&(A(t)==="html"||A(t)==="body"&&Q(t).position==="static")?o:t||Go(e)||o}function Ge(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function He(e,o,t){return ce(e,Be(o,t))}function Nn(e,o,t){var i=He(e,o,t);return i>t?t:i}function ht(){return{top:0,right:0,bottom:0,left:0}}function pt(e){return Object.assign({},ht(),e)}function _t(e,o){return o.reduce(function(t,i){return t[i]=e,t},{})}var Ho=function(o,t){return o=typeof o=="function"?o(Object.assign({},t.rects,{placement:t.placement})):o,pt(typeof o!="number"?o:_t(o,Oe))};function Uo(e){var o,t=e.state,i=e.name,n=e.options,s=t.elements.arrow,r=t.modifiersData.popperOffsets,a=G(t.placement),l=Ge(a),u=[x,B].indexOf(a)>=0,d=u?"height":"width";if(!(!s||!r)){var f=Ho(n.padding,t),p=Ae(s),h=l==="y"?R:x,v=l==="y"?U:B,_=t.rects.reference[d]+t.rects.reference[l]-r[l]-t.rects.popper[d],g=r[l]-t.rects.reference[l],w=de(s),E=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,C=_/2-g/2,m=f[h],b=E-p[d]-f[v],y=E/2-p[d]/2+C,M=He(m,y,b),H=l;t.modifiersData[i]=(o={},o[H]=M,o.centerOffset=M-y,o)}}function Lo(e){var o=e.state,t=e.options,i=t.element,n=i===void 0?"[data-popper-arrow]":i;n!=null&&(typeof n=="string"&&(n=o.elements.popper.querySelector(n),!n)||ut(o.elements.popper,n)&&(o.elements.arrow=n))}var yi={name:"arrow",enabled:!0,phase:"main",fn:Uo,effect:Lo,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ne(e){return e.split("-")[1]}var Vo={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $o(e,o){var t=e.x,i=e.y,n=o.devicePixelRatio||1;return{x:ve(t*n)/n||0,y:ve(i*n)/n||0}}function In(e){var o,t=e.popper,i=e.popperRect,n=e.placement,s=e.variation,r=e.offsets,a=e.position,l=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,f=e.isFixed,p=r.x,h=p===void 0?0:p,v=r.y,_=v===void 0?0:v,g=typeof d=="function"?d({x:h,y:_}):{x:h,y:_};h=g.x,_=g.y;var w=r.hasOwnProperty("x"),E=r.hasOwnProperty("y"),C=x,m=R,b=window;if(u){var y=de(t),M="clientHeight",H="clientWidth";if(y===O(t)&&(y=L(t),Q(y).position!=="static"&&a==="absolute"&&(M="scrollHeight",H="scrollWidth")),y=y,n===R||(n===x||n===B)&&s===Pe){m=U;var F=f&&y===b&&b.visualViewport?b.visualViewport.height:y[M];_-=F-i.height,_*=l?1:-1}if(n===x||(n===R||n===U)&&s===Pe){C=B;var S=f&&y===b&&b.visualViewport?b.visualViewport.width:y[H];h-=S-i.width,h*=l?1:-1}}var V=Object.assign({position:a},u&&Vo),oe=d===!0?$o({x:h,y:_},O(t)):{x:h,y:_};if(h=oe.x,_=oe.y,l){var z;return Object.assign({},V,(z={},z[m]=E?"0":"",z[C]=w?"0":"",z.transform=(b.devicePixelRatio||1)<=1?"translate("+h+"px, "+_+"px)":"translate3d("+h+"px, "+_+"px, 0)",z))}return Object.assign({},V,(o={},o[m]=E?_+"px":"",o[C]=w?h+"px":"",o.transform="",o))}function jo(e){var o=e.state,t=e.options,i=t.gpuAcceleration,n=i===void 0?!0:i,s=t.adaptive,r=s===void 0?!0:s,a=t.roundOffsets,l=a===void 0?!0:a,u={placement:G(o.placement),variation:ne(o.placement),popper:o.elements.popper,popperRect:o.rects.popper,gpuAcceleration:n,isFixed:o.options.strategy==="fixed"};o.modifiersData.popperOffsets!=null&&(o.styles.popper=Object.assign({},o.styles.popper,In(Object.assign({},u,{offsets:o.modifiersData.popperOffsets,position:o.options.strategy,adaptive:r,roundOffsets:l})))),o.modifiersData.arrow!=null&&(o.styles.arrow=Object.assign({},o.styles.arrow,In(Object.assign({},u,{offsets:o.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-placement":o.placement})}var Rn={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:jo,data:{}};var Ut={passive:!0};function Wo(e){var o=e.state,t=e.instance,i=e.options,n=i.scroll,s=n===void 0?!0:n,r=i.resize,a=r===void 0?!0:r,l=O(o.elements.popper),u=[].concat(o.scrollParents.reference,o.scrollParents.popper);return s&&u.forEach(function(d){d.addEventListener("scroll",t.update,Ut)}),a&&l.addEventListener("resize",t.update,Ut),function(){s&&u.forEach(function(d){d.removeEventListener("scroll",t.update,Ut)}),a&&l.removeEventListener("resize",t.update,Ut)}}var Sn={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Wo,data:{}};var zo={left:"right",right:"left",bottom:"top",top:"bottom"};function Qe(e){return e.replace(/left|right|bottom|top/g,function(o){return zo[o]})}var Xo={start:"end",end:"start"};function Lt(e){return e.replace(/start|end/g,function(o){return Xo[o]})}function Ue(e){var o=O(e),t=o.pageXOffset,i=o.pageYOffset;return{scrollLeft:t,scrollTop:i}}function Le(e){return ie(L(e)).left+Ue(e).scrollLeft}function wi(e,o){var t=O(e),i=L(e),n=t.visualViewport,s=i.clientWidth,r=i.clientHeight,a=0,l=0;if(n){s=n.width,r=n.height;var u=dt();(u||!u&&o==="fixed")&&(a=n.offsetLeft,l=n.offsetTop)}return{width:s,height:r,x:a+Le(e),y:l}}function Di(e){var o,t=L(e),i=Ue(e),n=(o=e.ownerDocument)==null?void 0:o.body,s=ce(t.scrollWidth,t.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),r=ce(t.scrollHeight,t.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),a=-i.scrollLeft+Le(e),l=-i.scrollTop;return Q(n||t).direction==="rtl"&&(a+=ce(t.clientWidth,n?n.clientWidth:0)-s),{width:s,height:r,x:a,y:l}}function Ve(e){var o=Q(e),t=o.overflow,i=o.overflowX,n=o.overflowY;return/auto|scroll|overlay|hidden/.test(t+n+i)}function Vt(e){return["html","body","#document"].indexOf(A(e))>=0?e.ownerDocument.body:k(e)&&Ve(e)?e:Vt(be(e))}function Ee(e,o){var t;o===void 0&&(o=[]);var i=Vt(e),n=i===((t=e.ownerDocument)==null?void 0:t.body),s=O(i),r=n?[s].concat(s.visualViewport||[],Ve(i)?i:[]):i,a=o.concat(r);return n?a:a.concat(Ee(be(r)))}function Je(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Ko(e,o){var t=ie(e,!1,o==="fixed");return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function xn(e,o,t){return o===Gt?Je(wi(e,t)):te(o)?Ko(o,t):Je(Di(L(e)))}function Qo(e){var o=Ee(be(e)),t=["absolute","fixed"].indexOf(Q(e).position)>=0,i=t&&k(e)?de(e):e;return te(i)?o.filter(function(n){return te(n)&&ut(n,i)&&A(n)!=="body"}):[]}function Oi(e,o,t,i){var n=o==="clippingParents"?Qo(e):[].concat(o),s=[].concat(n,[t]),r=s[0],a=s.reduce(function(l,u){var d=xn(e,u,i);return l.top=ce(d.top,l.top),l.right=Be(d.right,l.right),l.bottom=Be(d.bottom,l.bottom),l.left=ce(d.left,l.left),l},xn(e,r,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function ft(e){var o=e.reference,t=e.element,i=e.placement,n=i?G(i):null,s=i?ne(i):null,r=o.x+o.width/2-t.width/2,a=o.y+o.height/2-t.height/2,l;switch(n){case R:l={x:r,y:o.y-t.height};break;case U:l={x:r,y:o.y+o.height};break;case B:l={x:o.x+o.width,y:a};break;case x:l={x:o.x-t.width,y:a};break;default:l={x:o.x,y:o.y}}var u=n?Ge(n):null;if(u!=null){var d=u==="y"?"height":"width";switch(s){case me:l[u]=l[u]-(o[d]/2-t[d]/2);break;case Pe:l[u]=l[u]+(o[d]/2-t[d]/2);break;default:}}return l}function Me(e,o){o===void 0&&(o={});var t=o,i=t.placement,n=i===void 0?e.placement:i,s=t.strategy,r=s===void 0?e.strategy:s,a=t.boundary,l=a===void 0?On:a,u=t.rootBoundary,d=u===void 0?Gt:u,f=t.elementContext,p=f===void 0?ze:f,h=t.altBoundary,v=h===void 0?!1:h,_=t.padding,g=_===void 0?0:_,w=pt(typeof g!="number"?g:_t(g,Oe)),E=p===ze?En:ze,C=e.rects.popper,m=e.elements[v?E:p],b=Oi(te(m)?m:m.contextElement||L(e.elements.popper),l,d,r),y=ie(e.elements.reference),M=ft({reference:y,element:C,strategy:"absolute",placement:n}),H=Je(Object.assign({},C,M)),F=p===ze?H:y,S={top:b.top-F.top+w.top,bottom:F.bottom-b.bottom+w.bottom,left:b.left-F.left+w.left,right:F.right-b.right+w.right},V=e.modifiersData.offset;if(p===ze&&V){var oe=V[n];Object.keys(S).forEach(function(z){var Te=[B,U].indexOf(z)>=0?1:-1,Ne=[R,U].indexOf(z)>=0?"y":"x";S[z]+=oe[Ne]*Te})}return S}function Ei(e,o){o===void 0&&(o={});var t=o,i=t.placement,n=t.boundary,s=t.rootBoundary,r=t.padding,a=t.flipVariations,l=t.allowedAutoPlacements,u=l===void 0?Ht:l,d=ne(i),f=d?a?vi:vi.filter(function(v){return ne(v)===d}):Oe,p=f.filter(function(v){return u.indexOf(v)>=0});p.length===0&&(p=f);var h=p.reduce(function(v,_){return v[_]=Me(e,{placement:_,boundary:n,rootBoundary:s,padding:r})[G(_)],v},{});return Object.keys(h).sort(function(v,_){return h[v]-h[_]})}function Jo(e){if(G(e)===At)return[];var o=Qe(e);return[Lt(e),o,Lt(o)]}function Yo(e){var o=e.state,t=e.options,i=e.name;if(!o.modifiersData[i]._skip){for(var n=t.mainAxis,s=n===void 0?!0:n,r=t.altAxis,a=r===void 0?!0:r,l=t.fallbackPlacements,u=t.padding,d=t.boundary,f=t.rootBoundary,p=t.altBoundary,h=t.flipVariations,v=h===void 0?!0:h,_=t.allowedAutoPlacements,g=o.options.placement,w=G(g),E=w===g,C=l||(E||!v?[Qe(g)]:Jo(g)),m=[g].concat(C).reduce(function($e,we){return $e.concat(G(we)===At?Ei(o,{placement:we,boundary:d,rootBoundary:f,padding:u,flipVariations:v,allowedAutoPlacements:_}):we)},[]),b=o.rects.reference,y=o.rects.popper,M=new Map,H=!0,F=m[0],S=0;S<m.length;S++){var V=m[S],oe=G(V),z=ne(V)===me,Te=[R,U].indexOf(oe)>=0,Ne=Te?"width":"height",J=Me(o,{placement:V,boundary:d,rootBoundary:f,altBoundary:p,padding:u}),se=Te?z?B:x:z?U:R;b[Ne]>y[Ne]&&(se=Qe(se));var bt=Qe(se),Ie=[];if(s&&Ie.push(J[oe]<=0),a&&Ie.push(J[se]<=0,J[bt]<=0),Ie.every(function($e){return $e})){F=V,H=!1;break}M.set(V,Ie)}if(H)for(var yt=v?3:1,Qt=function(we){var Ze=m.find(function(Dt){var Re=M.get(Dt);if(Re)return Re.slice(0,we).every(function(Jt){return Jt})});if(Ze)return F=Ze,"break"},qe=yt;qe>0;qe--){var wt=Qt(qe);if(wt==="break")break}o.placement!==F&&(o.modifiersData[i]._skip=!0,o.placement=F,o.reset=!0)}}var Mi={name:"flip",enabled:!0,phase:"main",fn:Yo,requiresIfExists:["offset"],data:{_skip:!1}};function qo(e,o,t){var i=G(e),n=[x,R].indexOf(i)>=0?-1:1,s=typeof t=="function"?t(Object.assign({},o,{placement:e})):t,r=s[0],a=s[1];return r=r||0,a=(a||0)*n,[x,B].indexOf(i)>=0?{x:a,y:r}:{x:r,y:a}}function Zo(e){var o=e.state,t=e.options,i=e.name,n=t.offset,s=n===void 0?[0,0]:n,r=Ht.reduce(function(d,f){return d[f]=qo(f,o.rects,s),d},{}),a=r[o.placement],l=a.x,u=a.y;o.modifiersData.popperOffsets!=null&&(o.modifiersData.popperOffsets.x+=l,o.modifiersData.popperOffsets.y+=u),o.modifiersData[i]=r}var Ci={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Zo};function es(e){var o=e.state,t=e.name;o.modifiersData[t]=ft({reference:o.rects.reference,element:o.rects.popper,strategy:"absolute",placement:o.placement})}var kn={name:"popperOffsets",enabled:!0,phase:"read",fn:es,data:{}};function Ti(e){return e==="x"?"y":"x"}function ts(e){var o=e.state,t=e.options,i=e.name,n=t.mainAxis,s=n===void 0?!0:n,r=t.altAxis,a=r===void 0?!1:r,l=t.boundary,u=t.rootBoundary,d=t.altBoundary,f=t.padding,p=t.tether,h=p===void 0?!0:p,v=t.tetherOffset,_=v===void 0?0:v,g=Me(o,{boundary:l,rootBoundary:u,padding:f,altBoundary:d}),w=G(o.placement),E=ne(o.placement),C=!E,m=Ge(w),b=Ti(m),y=o.modifiersData.popperOffsets,M=o.rects.reference,H=o.rects.popper,F=typeof _=="function"?_(Object.assign({},o.rects,{placement:o.placement})):_,S=typeof F=="number"?{mainAxis:F,altAxis:F}:Object.assign({mainAxis:0,altAxis:0},F),V=o.modifiersData.offset?o.modifiersData.offset[o.placement]:null,oe={x:0,y:0};if(y){if(s){var z,Te=m==="y"?R:x,Ne=m==="y"?U:B,J=m==="y"?"height":"width",se=y[m],bt=se+g[Te],Ie=se-g[Ne],yt=h?-H[J]/2:0,Qt=E===me?M[J]:H[J],qe=E===me?-H[J]:-M[J],wt=o.elements.arrow,$e=h&&wt?Ae(wt):{width:0,height:0},we=o.modifiersData["arrow#persistent"]?o.modifiersData["arrow#persistent"].padding:ht(),Ze=we[Te],Dt=we[Ne],Re=He(0,M[J],$e[J]),Jt=C?M[J]/2-yt-Re-Ze-S.mainAxis:Qt-Re-Ze-S.mainAxis,wo=C?-M[J]/2+yt+Re+Dt+S.mainAxis:qe+Re+Dt+S.mainAxis,Yt=o.elements.arrow&&de(o.elements.arrow),Do=Yt?m==="y"?Yt.clientTop||0:Yt.clientLeft||0:0,$i=(z=V?.[m])!=null?z:0,Oo=se+Jt-$i-Do,Eo=se+wo-$i,ji=He(h?Be(bt,Oo):bt,se,h?ce(Ie,Eo):Ie);y[m]=ji,oe[m]=ji-se}if(a){var Wi,Mo=m==="x"?R:x,Co=m==="x"?U:B,Se=y[b],Ot=b==="y"?"height":"width",zi=Se+g[Mo],Xi=Se-g[Co],qt=[R,x].indexOf(w)!==-1,Ki=(Wi=V?.[b])!=null?Wi:0,Qi=qt?zi:Se-M[Ot]-H[Ot]-Ki+S.altAxis,Ji=qt?Se+M[Ot]+H[Ot]-Ki-S.altAxis:Xi,Yi=h&&qt?Nn(Qi,Se,Ji):He(h?Qi:zi,Se,h?Ji:Xi);y[b]=Yi,oe[b]=Yi-Se}o.modifiersData[i]=oe}}var Ni={name:"preventOverflow",enabled:!0,phase:"main",fn:ts,requiresIfExists:["offset"]};function Ii(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Ri(e){return e===O(e)||!k(e)?Ue(e):Ii(e)}function is(e){var o=e.getBoundingClientRect(),t=ve(o.width)/e.offsetWidth||1,i=ve(o.height)/e.offsetHeight||1;return t!==1||i!==1}function Si(e,o,t){t===void 0&&(t=!1);var i=k(o),n=k(o)&&is(o),s=L(o),r=ie(e,n,t),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!t)&&((A(o)!=="body"||Ve(s))&&(a=Ri(o)),k(o)?(l=ie(o,!0),l.x+=o.clientLeft,l.y+=o.clientTop):s&&(l.x=Le(s))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function ns(e){var o=new Map,t=new Set,i=[];e.forEach(function(s){o.set(s.name,s)});function n(s){t.add(s.name);var r=[].concat(s.requires||[],s.requiresIfExists||[]);r.forEach(function(a){if(!t.has(a)){var l=o.get(a);l&&n(l)}}),i.push(s)}return e.forEach(function(s){t.has(s.name)||n(s)}),i}function xi(e){var o=ns(e);return Mn.reduce(function(t,i){return t.concat(o.filter(function(n){return n.phase===i}))},[])}function ki(e){var o;return function(){return o||(o=new Promise(function(t){Promise.resolve().then(function(){o=void 0,t(e())})})),o}}function Fi(e){var o=e.reduce(function(t,i){var n=t[i.name];return t[i.name]=n?Object.assign({},n,i,{options:Object.assign({},n.options,i.options),data:Object.assign({},n.data,i.data)}):i,t},{});return Object.keys(o).map(function(t){return o[t]})}var Fn={placement:"bottom",modifiers:[],strategy:"absolute"};function Pn(){for(var e=arguments.length,o=new Array(e),t=0;t<e;t++)o[t]=arguments[t];return!o.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function Bn(e){e===void 0&&(e={});var o=e,t=o.defaultModifiers,i=t===void 0?[]:t,n=o.defaultOptions,s=n===void 0?Fn:n;return function(a,l,u){u===void 0&&(u=s);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},Fn,s),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},f=[],p=!1,h={state:d,setOptions:function(w){var E=typeof w=="function"?w(d.options):w;_(),d.options=Object.assign({},s,d.options,E),d.scrollParents={reference:te(a)?Ee(a):a.contextElement?Ee(a.contextElement):[],popper:Ee(l)};var C=xi(Fi([].concat(i,d.options.modifiers)));return d.orderedModifiers=C.filter(function(m){return m.enabled}),v(),h.update()},forceUpdate:function(){if(!p){var w=d.elements,E=w.reference,C=w.popper;if(Pn(E,C)){d.rects={reference:Si(E,de(C),d.options.strategy==="fixed"),popper:Ae(C)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(S){return d.modifiersData[S.name]=Object.assign({},S.data)});for(var m=0;m<d.orderedModifiers.length;m++){if(d.reset===!0){d.reset=!1,m=-1;continue}var b=d.orderedModifiers[m],y=b.fn,M=b.options,H=M===void 0?{}:M,F=b.name;typeof y=="function"&&(d=y({state:d,options:H,name:F,instance:h})||d)}}}},update:ki(function(){return new Promise(function(g){h.forceUpdate(),g(d)})}),destroy:function(){_(),p=!0}};if(!Pn(a,l))return h;h.setOptions(u).then(function(g){!p&&u.onFirstUpdate&&u.onFirstUpdate(g)});function v(){d.orderedModifiers.forEach(function(g){var w=g.name,E=g.options,C=E===void 0?{}:E,m=g.effect;if(typeof m=="function"){var b=m({state:d,name:w,instance:h,options:C}),y=function(){};f.push(b||y)}})}function _(){f.forEach(function(g){return g()}),f=[]}return h}}var os=[Sn,kn,Rn,Cn],Pi=Bn({defaultModifiers:os});var ss=["container"],rs=["ngbAccordionBody",""],zt=["*"];function as(e,o){if(e&1){let t=pi();st(0,"button",1),mn("click",function(){Tt(t);let n=le();return Nt(n.close())}),rt()}}var ls=e=>({$implicit:e});var cs=["dialog"],ds=["ngbNavOutlet",""];function us(e,o){}function hs(e,o){if(e&1&&(ui(0,"div",0),Rt(1,us,0,0,"ng-template",1),hi()),e&2){let t=le().$implicit,i=le();We("item",t)("nav",i.nav)("role",i.paneRole),Fe(),We("ngTemplateOutlet",(t.contentTpl==null?null:t.contentTpl.templateRef)||null)("ngTemplateOutletContext",bn(5,ls,t.active||i.isPanelTransitioning(t)))}}function ps(e,o){if(e&1&&St(0,hs,2,7,"div",0),e&2){let t=o.$implicit,i=le();xt(t.isPanelInDom()||i.isPanelTransitioning(t)?0:-1)}}function _s(e,o){if(e&1&&(st(0,"span"),_i(1),rt()),e&2){let t=le().$implicit,i=le();De(i.highlightClass),Fe(),fi(t)}}function fs(e,o){if(e&1&&(_n(0),_i(1),fn()),e&2){let t=le().$implicit;Fe(),fi(t)}}function gs(e,o){if(e&1&&St(0,_s,2,3,"span",0)(1,fs,2,1,"ng-container"),e&2){let t=o.$index;xt(t%2!==0?0:1)}}var ms=(e,o,t)=>({result:e,term:o,formatter:t});function vs(e,o){if(e&1&&hn(0,"ngb-highlight",2),e&2){let t=o.result,i=o.term,n=o.formatter;We("result",n(t))("term",i)}}function bs(e,o){}function ys(e,o){if(e&1){let t=pi();ui(0,"button",3),pe("mouseenter",function(){let n=Tt(t).$index,s=le();return Nt(s.markActive(n))})("click",function(){let n=Tt(t).$implicit,s=le();return Nt(s.select(n))}),Rt(1,bs,0,0,"ng-template",4),hi()}if(e&2){let t=o.$implicit,i=o.$index,n=le(),s=vn(1);P("active",i===n.activeIdx),We("id",n.id+"-"+i),Fe(),We("ngTemplateOutlet",n.resultTemplate||s)("ngTemplateOutletContext",yn(5,ms,t,n.term,n.formatter))}}var Wn={animation:!0,transitionTimerDelayMs:5},Ye=(()=>{class e{constructor(){this.animation=Wn.animation}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),ws=(()=>{class e{constructor(){this._ngbConfig=c(Ye),this.closeOthers=!1,this.destroyOnHide=!0}get animation(){return this._animation??this._ngbConfig.animation}set animation(t){this._animation=t}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function Ds(e){let{transitionDelay:o,transitionDuration:t}=window.getComputedStyle(e),i=parseFloat(o),n=parseFloat(t);return(i+n)*1e3}function mt(e){return e!=null?`${e}`:""}function Xt(e){return typeof e=="string"}function Ce(e){return e!=null}function Os(e){return e&&e.then}function Es(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function Ms(e,o){return!o||typeof e.closest>"u"?null:e.closest(o)}function Kt(e){return(e||document.body).getBoundingClientRect()}function Cs(e){return o=>new Zi(t=>{let i=r=>e.run(()=>t.next(r)),n=r=>e.run(()=>t.error(r)),s=()=>e.run(()=>t.complete());return o.subscribe({next:i,error:n,complete:s})})}function An(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function zn(e=document){let o=e?.activeElement;return o?o.shadowRoot?zn(o.shadowRoot):o:null}var Ts=()=>{},{transitionTimerDelayMs:Ns}=Wn,gt=new Map,Z=(e,o,t,i)=>{let n=i.context||{},s=gt.get(o);if(s)switch(i.runningTransition){case"continue":return Et;case"stop":e.run(()=>s.transition$.complete()),n=Object.assign(s.context,n),gt.delete(o)}let r=t(o,i.animation,n)||Ts;if(!i.animation||window.getComputedStyle(o).transitionProperty==="none")return e.run(()=>r()),et(void 0).pipe(Cs(e));let a=new $,l=new $,u=a.pipe(rn(!0));gt.set(o,{transition$:a,complete:()=>{l.next(),l.complete()},context:n});let d=Ds(o);return e.runOutsideAngular(()=>{let f=X(o,"transitionend").pipe(j(u),ke(({target:h})=>h===o)),p=nn(d+Ns).pipe(j(u));ei(p,f,l).pipe(j(u)).subscribe(()=>{gt.delete(o),e.run(()=>{r(),a.next(),a.complete()})})}),a.asObservable()},Gn=e=>{gt.get(e)?.complete()};function Is(e,o){if(typeof navigator>"u")return"0px";let{classList:t}=e,i=t.contains("show");i||t.add("show"),e.style[o]="";let n=e.getBoundingClientRect()[o]+"px";return i||t.remove("show"),n}var Rs=(e,o,t)=>{let{direction:i,maxSize:n,dimension:s}=t,{classList:r}=e;function a(){r.add("collapse"),i==="show"?r.add("show"):r.remove("show")}if(!o){a();return}return n||(n=Is(e,s),t.maxSize=n,e.style[s]=i!=="show"?n:"0px",r.remove("collapse","collapsing","show"),Kt(e),r.add("collapsing")),e.style[s]=i==="show"?n:"0px",()=>{a(),r.remove("collapsing"),e.style[s]=""}},Ss=(()=>{class e{constructor(){this._ngbConfig=c(Ye),this.horizontal=!1}get animation(){return this._animation??this._ngbConfig.animation}set animation(t){this._animation=t}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),Hn=(()=>{class e{constructor(){this._config=c(Ss),this._element=c(W),this._zone=c(ae),this.animation=this._config.animation,this._afterInit=!1,this._isCollapsed=!1,this.ngbCollapseChange=new D,this.horizontal=this._config.horizontal,this.shown=new D,this.hidden=new D}set collapsed(t){this._isCollapsed!==t&&(this._isCollapsed=t,this._afterInit&&this._runTransitionWithEvents(t,this.animation))}ngOnInit(){this._runTransition(this._isCollapsed,!1),this._afterInit=!0}toggle(t=this._isCollapsed){this.collapsed=!t,this.ngbCollapseChange.next(this._isCollapsed)}_runTransition(t,i){return Z(this._zone,this._element.nativeElement,Rs,{animation:i,runningTransition:"stop",context:{direction:t?"hide":"show",dimension:this.horizontal?"width":"height"}})}_runTransitionWithEvents(t,i){this._runTransition(t,i).subscribe(()=>{t?this.hidden.emit():this.shown.emit()})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=T({type:e,selectors:[["","ngbCollapse",""]],hostVars:2,hostBindings:function(i,n){i&2&&P("collapse-horizontal",n.horizontal)},inputs:{animation:"animation",collapsed:[0,"ngbCollapse","collapsed"],horizontal:"horizontal"},outputs:{ngbCollapseChange:"ngbCollapseChange",shown:"shown",hidden:"hidden"},exportAs:["ngbCollapse"]})}}return e})(),xs=0,tu=(()=>{class e{constructor(){this._item=c(vt),this._viewRef=null,this.elementRef=c(W)}ngAfterContentChecked(){this._bodyTpl&&(this._item._shouldBeInDOM?this._createViewIfNotExists():this._destroyViewIfExists())}ngOnDestroy(){this._destroyViewIfExists()}_destroyViewIfExists(){this._viewRef?.destroy(),this._viewRef=null}_createViewIfNotExists(){this._viewRef||(this._viewRef=this._vcr.createEmbeddedView(this._bodyTpl),this._viewRef.detectChanges())}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=ge({type:e,selectors:[["","ngbAccordionBody",""]],contentQueries:function(i,n,s){if(i&1&&_e(s,ot,7),i&2){let r;Y(r=q())&&(n._bodyTpl=r.first)}},viewQuery:function(i,n){if(i&1&&Pt(ss,7,ai),i&2){let s;Y(s=q())&&(n._vcr=s.first)}},hostAttrs:[1,"accordion-body"],attrs:rs,ngContentSelectors:zt,decls:3,vars:0,consts:[["container",""]],template:function(i,n){i&1&&(at(),gn(0,null,0),lt(2))},encapsulation:2})}}return e})(),ks=(()=>{class e{constructor(){this.item=c(vt),this.ngbCollapse=c(Hn)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=T({type:e,selectors:[["","ngbAccordionCollapse",""]],hostAttrs:["role","region",1,"accordion-collapse"],hostVars:2,hostBindings:function(i,n){i&2&&(ee("id",n.item.collapseId),he("aria-labelledby",n.item.toggleId))},exportAs:["ngbAccordionCollapse"],features:[dn([Hn])]})}}return e})(),iu=(()=>{class e{constructor(){this.item=c(vt),this.accordion=c(Xn)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=T({type:e,selectors:[["","ngbAccordionToggle",""]],hostVars:5,hostBindings:function(i,n){i&1&&pe("click",function(){return!n.item.disabled&&n.accordion.toggle(n.item.id)}),i&2&&(ee("id",n.item.toggleId),he("aria-controls",n.item.collapseId)("aria-expanded",!n.item.collapsed),P("collapsed",n.item.collapsed))}})}}return e})();var nu=(()=>{class e{constructor(){this.item=c(vt)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=T({type:e,selectors:[["","ngbAccordionHeader",""]],hostAttrs:["role","heading",1,"accordion-header"],hostVars:2,hostBindings:function(i,n){i&2&&P("collapsed",n.item.collapsed)}})}}return e})(),vt=(()=>{class e{constructor(){this._accordion=c(Xn),this._cd=c(fe),this._destroyRef=c(oi),this._collapsed=!0,this._id=`ngb-accordion-item-${xs++}`,this._collapseAnimationRunning=!1,this.disabled=!1,this.show=new D,this.shown=new D,this.hide=new D,this.hidden=new D}set id(t){Xt(t)&&t!==""&&(this._id=t)}set destroyOnHide(t){this._destroyOnHide=t}get destroyOnHide(){return this._destroyOnHide===void 0?this._accordion.destroyOnHide:this._destroyOnHide}set collapsed(t){t?this.collapse():this.expand()}get collapsed(){return this._collapsed}get id(){return`${this._id}`}get toggleId(){return`${this.id}-toggle`}get collapseId(){return`${this.id}-collapse`}get _shouldBeInDOM(){return!this.collapsed||this._collapseAnimationRunning||!this.destroyOnHide}ngAfterContentInit(){let{ngbCollapse:t}=this._collapse;t.animation=!1,t.collapsed=this.collapsed,t.animation=this._accordion.animation,t.hidden.pipe(ct(this._destroyRef)).subscribe(()=>{this._collapseAnimationRunning=!1,this.hidden.emit(),this._accordion.hidden.emit(this.id),this._cd.markForCheck()}),t.shown.pipe(ct(this._destroyRef)).subscribe(()=>{this.shown.emit(),this._accordion.shown.emit(this.id),this._cd.markForCheck()})}toggle(){this.collapsed=!this.collapsed}expand(){if(this.collapsed){if(!this._accordion._ensureCanExpand(this))return;this._collapsed=!1,this._cd.markForCheck(),this._cd.detectChanges(),this.show.emit(),this._accordion.show.emit(this.id),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=!1}}collapse(){this.collapsed||(this._collapsed=!0,this._collapseAnimationRunning=!0,this._cd.markForCheck(),this.hide.emit(),this._accordion.hide.emit(this.id),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=!0)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=T({type:e,selectors:[["","ngbAccordionItem",""]],contentQueries:function(i,n,s){if(i&1&&_e(s,ks,7),i&2){let r;Y(r=q())&&(n._collapse=r.first)}},hostAttrs:[1,"accordion-item"],hostVars:1,hostBindings:function(i,n){i&2&&ee("id",n.id)},inputs:{id:[0,"ngbAccordionItem","id"],destroyOnHide:"destroyOnHide",disabled:"disabled",collapsed:"collapsed"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordionItem"]})}}return e})(),Xn=(()=>{class e{constructor(){this._config=c(ws),this._anItemWasAlreadyExpandedDuringInitialisation=!1,this.animation=this._config.animation,this.closeOthers=this._config.closeOthers,this.destroyOnHide=this._config.destroyOnHide,this.show=new D,this.shown=new D,this.hide=new D,this.hidden=new D}toggle(t){this._getItem(t)?.toggle()}expand(t){this._getItem(t)?.expand()}expandAll(){this._items&&(this.closeOthers?this._items.find(t=>!t.collapsed)||this._items.first.expand():this._items.forEach(t=>t.expand()))}collapse(t){this._getItem(t)?.collapse()}collapseAll(){this._items?.forEach(t=>t.collapse())}isExpanded(t){let i=this._getItem(t);return i?!i.collapsed:!1}_ensureCanExpand(t){return this.closeOthers?this._items?(this._items.find(i=>!i.collapsed&&t!==i)?.collapse(),!0):this._anItemWasAlreadyExpandedDuringInitialisation?!1:(this._anItemWasAlreadyExpandedDuringInitialisation=!0,!0):!0}_getItem(t){return this._items?.find(i=>i.id===t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=T({type:e,selectors:[["","ngbAccordion",""]],contentQueries:function(i,n,s){if(i&1&&_e(s,vt,4),i&2){let r;Y(r=q())&&(n._items=r)}},hostAttrs:[1,"accordion"],inputs:{animation:"animation",closeOthers:"closeOthers",destroyOnHide:"destroyOnHide"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordion"]})}}return e})();var Kn=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=I({type:e})}static{this.\u0275inj=N({})}}return e})(),Fs=(()=>{class e{constructor(){this._ngbConfig=c(Ye),this.dismissible=!0,this.type="warning"}get animation(){return this._animation??this._ngbConfig.animation}set animation(t){this._animation=t}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),Ps=({classList:e})=>{e.remove("show")},ou=(()=>{class e{constructor(){this._config=c(Fs),this._elementRef=c(W),this._zone=c(ae),this.animation=this._config.animation,this.dismissible=this._config.dismissible,this.type=this._config.type,this.closed=new D}close(){let t=Z(this._zone,this._elementRef.nativeElement,Ps,{animation:this.animation,runningTransition:"continue"});return t.subscribe(()=>this.closed.emit()),t}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=ge({type:e,selectors:[["ngb-alert"]],hostAttrs:["role","alert"],hostVars:6,hostBindings:function(i,n){i&2&&(De("alert show"+(n.type?" alert-"+n.type:"")),P("fade",n.animation)("alert-dismissible",n.dismissible))},inputs:{animation:"animation",dismissible:"dismissible",type:"type"},outputs:{closed:"closed"},exportAs:["ngbAlert"],ngContentSelectors:zt,decls:2,vars:1,consts:()=>{let t;return t=$localize`:@@ngb.alert.close:Close`,[["type","button","aria-label",t,1,"btn-close"],["type","button","aria-label",t,1,"btn-close",3,"click"]]},template:function(i,n){i&1&&(at(),lt(0),St(1,as,1,0,"button",0)),i&2&&(Fe(),xt(n.dismissible?1:-1))},styles:[`ngb-alert{display:block}
|
|
2
2
|
`],encapsulation:2,changeDetection:0})}}return e})(),Qn=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=I({type:e})}static{this.\u0275inj=N({})}}return e})();var Jn=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=I({type:e})}static{this.\u0275inj=N({})}}return e})(),Yn=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=I({type:e})}static{this.\u0275inj=N({})}}return e})();var $t=(e,o)=>o?o.some(t=>t.contains(e)):!1,Un=(e,o)=>!o||Ms(e,o)!=null,Bs=(()=>{let e=()=>/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2,o=()=>/Android/.test(navigator.userAgent);return typeof navigator<"u"?!!navigator.userAgent&&(e()||o()):!1})(),As=e=>Bs?()=>setTimeout(()=>e(),100):e;function Hi(e,o,t,i,n,s,r,a){t&&e.runOutsideAngular(As(()=>{let l=p=>{let h=p.target;return p.button===2||$t(h,r)?!1:t==="inside"?$t(h,s)&&Un(h,a):t==="outside"?!$t(h,s):Un(h,a)||!$t(h,s)},u=X(o,"keydown").pipe(j(n),ke(p=>p.key==="Escape"),it(p=>p.preventDefault())),d=X(o,"mousedown").pipe(xe(l),j(n)),f=X(o,"mouseup").pipe(Ct(d),ke(([p,h])=>h),on(0),j(n));ei([u.pipe(xe(p=>0)),f.pipe(xe(p=>1))]).subscribe(p=>e.run(()=>i(p)))}))}var qn=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function Zn(e){let o=Array.from(e.querySelectorAll(qn)).filter(t=>t.tabIndex!==-1);return[o[0],o[o.length-1]]}var Gs=(e,o,t,i=!1)=>{e.runOutsideAngular(()=>{let n=X(o,"focusin").pipe(j(t),xe(s=>s.target));X(o,"keydown").pipe(j(t),ke(s=>s.key==="Tab"),Ct(n)).subscribe(([s,r])=>{let[a,l]=Zn(o);(r===a||r===o)&&s.shiftKey&&(l.focus(),s.preventDefault()),r===l&&!s.shiftKey&&(a.focus(),s.preventDefault())}),i&&X(o,"click").pipe(j(t),Ct(n),xe(s=>s[1])).subscribe(s=>s.focus())})},Hs=(()=>{class e{constructor(){this._element=c(re).documentElement}isRTL(){return(this._element.getAttribute("dir")||"").toLowerCase()==="rtl"}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),Us=/\s+/,Ls=/ +/gi,Vs={top:["top"],bottom:["bottom"],start:["left","right"],left:["left"],end:["right","left"],right:["right"],"top-start":["top-start","top-end"],"top-left":["top-start"],"top-end":["top-end","top-start"],"top-right":["top-end"],"bottom-start":["bottom-start","bottom-end"],"bottom-left":["bottom-start"],"bottom-end":["bottom-end","bottom-start"],"bottom-right":["bottom-end"],"start-top":["left-start","right-start"],"left-top":["left-start"],"start-bottom":["left-end","right-end"],"left-bottom":["left-end"],"end-top":["right-start","left-start"],"right-top":["right-start"],"end-bottom":["right-end","left-end"],"right-bottom":["right-end"]};function $s(e,o){let[t,i]=Vs[e];return o&&i||t}var js=/^left/,Ws=/^right/,zs=/^start/,Xs=/^end/;function Ks(e,o){let[t,i]=o.split("-"),n=t.replace(js,"start").replace(Ws,"end"),s=[n];if(i){let r=i;(t==="left"||t==="right")&&(r=r.replace(zs,"top").replace(Xs,"bottom")),s.push(`${n}-${r}`)}return e&&(s=s.map(r=>`${e}-${r}`)),s.join(" ")}function Ln({placement:e,baseClass:o},t){let i=Array.isArray(e)?e:e.split(Us),n=["top","bottom","start","end","top-start","top-end","bottom-start","bottom-end","start-top","start-bottom","end-top","end-bottom"],s=i.findIndex(u=>u==="auto");s>=0&&n.forEach(function(u){i.find(d=>d.search("^"+u)!==-1)==null&&i.splice(s++,1,u)});let r=i.map(u=>$s(u,t.isRTL()));return{placement:r.shift(),modifiers:[{name:"bootstrapClasses",enabled:!!o,phase:"write",fn({state:u}){let d=new RegExp(o+"(-[a-z]+)*","gi"),f=u.elements.popper,p=u.placement,h=f.className;h=h.replace(d,""),h+=` ${Ks(o,p)}`,h=h.trim().replace(Ls," "),f.className=h}},Mi,Ni,yi,{enabled:!0,name:"flip",options:{fallbackPlacements:r}}]}}function Vn(e){return e}function Ui(){let e=c(Hs),o=null;return{createPopper(t){if(!o){let n=(t.updatePopperOptions||Vn)(Ln(t,e));o=Pi(t.hostElement,t.targetElement,n)}},update(){o&&o.update()},setOptions(t){if(o){let n=(t.updatePopperOptions||Vn)(Ln(t,e));o.setOptions(n)}},destroy(){o&&(o.destroy(),o=null)}}}function Li(e){return o=>(o.modifiers.push(Ci,{name:"offset",options:{offset:()=>e}}),o)}var su=new Date(1882,10,12),ru=new Date(2174,10,25);var au=1e3*60*60*24;var Vi=1080,Qs=24*Vi,Js=12*Vi+793,lu=29*Qs+Js,cu=11*Vi+204;var eo=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=I({type:e})}static{this.\u0275inj=N({})}}return e})(),Ys=(()=>{class e{constructor(){this.autoClose=!0,this.placement=["bottom-start","bottom-end","top-start","top-end"],this.popperOptions=t=>t,this.container=null}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),to=(()=>{class e{constructor(){this._disabled=!1,this.nativeElement=c(W).nativeElement,this.tabindex=0}set disabled(t){this._disabled=t===""||t===!0}get disabled(){return this._disabled}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=T({type:e,selectors:[["","ngbDropdownItem",""]],hostAttrs:[1,"dropdown-item"],hostVars:3,hostBindings:function(i,n){i&2&&(ee("tabIndex",n.disabled?-1:n.tabindex),P("disabled",n.disabled))},inputs:{tabindex:"tabindex",disabled:"disabled"}})}}return e})(),du=(()=>{class e{constructor(){this.item=c(to)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=T({type:e,selectors:[["button","ngbDropdownItem",""]],hostVars:1,hostBindings:function(i,n){i&2&&ee("disabled",n.item.disabled)}})}}return e})(),qs=(()=>{class e{constructor(){this.dropdown=c(io),this.nativeElement=c(W).nativeElement}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=T({type:e,selectors:[["","ngbDropdownMenu",""]],contentQueries:function(i,n,s){if(i&1&&_e(s,to,4),i&2){let r;Y(r=q())&&(n.menuItems=r)}},hostAttrs:[1,"dropdown-menu"],hostVars:2,hostBindings:function(i,n){i&1&&pe("keydown.ArrowUp",function(r){return n.dropdown.onKeyDown(r)})("keydown.ArrowDown",function(r){return n.dropdown.onKeyDown(r)})("keydown.Home",function(r){return n.dropdown.onKeyDown(r)})("keydown.End",function(r){return n.dropdown.onKeyDown(r)})("keydown.Enter",function(r){return n.dropdown.onKeyDown(r)})("keydown.Space",function(r){return n.dropdown.onKeyDown(r)})("keydown.Tab",function(r){return n.dropdown.onKeyDown(r)})("keydown.Shift.Tab",function(r){return n.dropdown.onKeyDown(r)}),i&2&&P("show",n.dropdown.isOpen())}})}}return e})(),Bi=(()=>{class e{constructor(){this.dropdown=c(io),this.nativeElement=c(W).nativeElement}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=T({type:e,selectors:[["","ngbDropdownAnchor",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:3,hostBindings:function(i,n){i&2&&(he("aria-expanded",n.dropdown.isOpen()),P("show",n.dropdown.isOpen()))}})}}return e})(),uu=(()=>{class e extends Bi{static{this.\u0275fac=(()=>{let t;return function(n){return(t||(t=si(e)))(n||e)}})()}static{this.\u0275dir=T({type:e,selectors:[["","ngbDropdownToggle",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:3,hostBindings:function(i,n){i&1&&pe("click",function(){return n.dropdown.toggle()})("keydown.ArrowUp",function(r){return n.dropdown.onKeyDown(r)})("keydown.ArrowDown",function(r){return n.dropdown.onKeyDown(r)})("keydown.Home",function(r){return n.dropdown.onKeyDown(r)})("keydown.End",function(r){return n.dropdown.onKeyDown(r)})("keydown.Tab",function(r){return n.dropdown.onKeyDown(r)})("keydown.Shift.Tab",function(r){return n.dropdown.onKeyDown(r)}),i&2&&(he("aria-expanded",n.dropdown.isOpen()),P("show",n.dropdown.isOpen()))},features:[gi([{provide:Bi,useExisting:ii(()=>e)}]),li]})}}return e})(),io=(()=>{class e{constructor(){this._changeDetector=c(fe),this._config=c(Ys),this._document=c(re),this._injector=c(ue),this._ngZone=c(ae),this._nativeElement=c(W).nativeElement,this._destroyCloseHandlers$=new $,this._bodyContainer=null,this._positioning=Ui(),this.autoClose=this._config.autoClose,this._open=!1,this.placement=this._config.placement,this.popperOptions=this._config.popperOptions,this.container=this._config.container,this.openChange=new D}ngOnInit(){this.display||(this.display=this._nativeElement.closest(".navbar")?"static":"dynamic")}ngAfterContentInit(){nt({write:()=>{this._applyPlacementClasses(),this._open&&this._setCloseHandlers()}},{injector:this._injector})}ngOnChanges(t){if(t.container&&this._open&&this._applyContainer(this.container),t.placement&&!t.placement.firstChange&&(this._positioning.setOptions({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement}),this._applyPlacementClasses()),t.dropdownClass){let{currentValue:i,previousValue:n}=t.dropdownClass;this._applyCustomDropdownClass(i,n)}t.autoClose&&this._open&&(this.autoClose=t.autoClose.currentValue,this._setCloseHandlers())}isOpen(){return this._open}open(){this._open||(this._open=!0,this._applyContainer(this.container),this.openChange.emit(!0),this._setCloseHandlers(),this._anchor&&(this._anchor.nativeElement.focus(),this.display==="dynamic"&&this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement,updatePopperOptions:t=>this.popperOptions(Li([0,2])(t))}),this._applyPlacementClasses(),this._afterRenderRef=It({write:()=>{this._positionMenu()}},{injector:this._injector})})))}_setCloseHandlers(){this._destroyCloseHandlers$.next(),Hi(this._ngZone,this._document,this.autoClose,t=>{this.close(),t===0&&this._anchor.nativeElement.focus()},this._destroyCloseHandlers$,this._menu?[this._menu.nativeElement]:[],this._anchor?[this._anchor.nativeElement]:[],".dropdown-item,.dropdown-divider")}close(){this._open&&(this._open=!1,this._resetContainer(),this._positioning.destroy(),this._afterRenderRef?.destroy(),this._destroyCloseHandlers$.next(),this.openChange.emit(!1),this._changeDetector.markForCheck())}toggle(){this.isOpen()?this.close():this.open()}ngOnDestroy(){this.close()}onKeyDown(t){let{key:i}=t,n=this._getMenuElements(),s=-1,r=null,a=this._isEventFromToggle(t);if(!a&&n.length&&n.forEach((l,u)=>{l.contains(t.target)&&(r=l),l===zn(this._document)&&(s=u)}),i===" "||i==="Enter"){r&&(this.autoClose===!0||this.autoClose==="inside")&&X(r,"click").pipe(tt(1)).subscribe(()=>this.close());return}if(i==="Tab"){if(t.target&&this.isOpen()&&this.autoClose)if(this._anchor.nativeElement===t.target){this.container==="body"&&!t.shiftKey?(this._menu.nativeElement.setAttribute("tabindex","0"),this._menu.nativeElement.focus(),this._menu.nativeElement.removeAttribute("tabindex")):t.shiftKey&&this.close();return}else if(this.container==="body"){let l=this._menu.nativeElement.querySelectorAll(qn);t.shiftKey&&t.target===l[0]?(this._anchor.nativeElement.focus(),t.preventDefault()):!t.shiftKey&&t.target===l[l.length-1]&&(this._anchor.nativeElement.focus(),this.close())}else X(t.target,"focusout").pipe(tt(1)).subscribe(({relatedTarget:l})=>{this._nativeElement.contains(l)||this.close()});return}if(a||r){if(this.open(),n.length){switch(i){case"ArrowDown":s=Math.min(s+1,n.length-1);break;case"ArrowUp":if(this._isDropup()&&s===-1){s=n.length-1;break}s=Math.max(s-1,0);break;case"Home":s=0;break;case"End":s=n.length-1;break}n[s].focus()}t.preventDefault()}}_isDropup(){return this._nativeElement.classList.contains("dropup")}_isEventFromToggle(t){return this._anchor.nativeElement.contains(t.target)}_getMenuElements(){return this._menu?this._menu.menuItems.filter(({disabled:t})=>!t).map(({nativeElement:t})=>t):[]}_positionMenu(){let t=this._menu;this.isOpen()&&t&&(this.display==="dynamic"?(this._positioning.update(),this._applyPlacementClasses()):this._applyPlacementClasses(this._getFirstPlacement(this.placement)))}_getFirstPlacement(t){return Array.isArray(t)?t[0]:t.split(" ")[0]}_resetContainer(){this._menu&&this._nativeElement.appendChild(this._menu.nativeElement),this._bodyContainer&&(this._document.body.removeChild(this._bodyContainer),this._bodyContainer=null)}_applyContainer(t=null){if(this._resetContainer(),t==="body"){let i=this._menu.nativeElement,n=this._bodyContainer=this._bodyContainer||this._document.createElement("div");n.style.position="absolute",i.style.position="static",n.style.zIndex="1055",n.appendChild(i),this._document.body.appendChild(n)}this._applyCustomDropdownClass(this.dropdownClass)}_applyCustomDropdownClass(t,i){let n=this.container==="body"?this._bodyContainer:this._nativeElement;n&&(i&&n.classList.remove(i),t&&n.classList.add(t))}_applyPlacementClasses(t){if(this._menu){t||(t=this._getFirstPlacement(this.placement)),this._nativeElement.classList.remove("dropup","dropdown"),this.display==="static"?this._menu.nativeElement.setAttribute("data-bs-popper","static"):this._menu.nativeElement.removeAttribute("data-bs-popper");let i=t.search("^top")!==-1?"dropup":"dropdown";this._nativeElement.classList.add(i),this._bodyContainer&&(this._bodyContainer.classList.remove("dropup","dropdown"),this._bodyContainer.classList.add(i))}}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=T({type:e,selectors:[["","ngbDropdown",""]],contentQueries:function(i,n,s){if(i&1&&(_e(s,qs,5),_e(s,Bi,5)),i&2){let r;Y(r=q())&&(n._menu=r.first),Y(r=q())&&(n._anchor=r.first)}},hostVars:2,hostBindings:function(i,n){i&2&&P("show",n.isOpen())},inputs:{autoClose:"autoClose",dropdownClass:"dropdownClass",_open:[0,"open","_open"],placement:"placement",popperOptions:"popperOptions",container:"container",display:"display"},outputs:{openChange:"openChange"},exportAs:["ngbDropdown"],features:[je]})}}return e})();var no=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=I({type:e})}static{this.\u0275inj=N({})}}return e})(),Zs=(()=>{class e{constructor(){this._ngbConfig=c(Ye),this.backdrop=!0,this.fullscreen=!1,this.keyboard=!0,this.role="dialog"}get animation(){return this._animation??this._ngbConfig.animation}set animation(t){this._animation=t}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),ye=class{constructor(o,t,i){this.nodes=o,this.viewRef=t,this.componentRef=i}},jt=class{constructor(o){this._componentType=o,this._windowRef=null,this._contentRef=null,this._document=c(re),this._applicationRef=c(ci),this._injector=c(ue),this._viewContainerRef=c(ai),this._ngZone=c(ae)}open(o,t,i=!1){this._windowRef||(this._contentRef=this._getContentRef(o,t),this._windowRef=this._viewContainerRef.createComponent(this._componentType,{injector:this._injector,projectableNodes:this._contentRef.nodes}));let{nativeElement:n}=this._windowRef.location,s=new $;nt({mixedReadWrite:()=>{s.next(),s.complete()}},{injector:this._injector});let r=s.pipe(tn(()=>Z(this._ngZone,n,({classList:a})=>a.add("show"),{animation:i,runningTransition:"continue"})));return{windowRef:this._windowRef,transition$:r}}close(o=!1){return this._windowRef?Z(this._ngZone,this._windowRef.location.nativeElement,({classList:t})=>t.remove("show"),{animation:o,runningTransition:"stop"}).pipe(it(()=>{this._windowRef?.destroy(),this._contentRef?.viewRef?.destroy(),this._windowRef=null,this._contentRef=null})):et(void 0)}_getContentRef(o,t){if(o)if(o instanceof ot){let i=o.createEmbeddedView(t);return this._applicationRef.attachView(i),new ye([i.rootNodes],i)}else return new ye([[this._document.createTextNode(`${o}`)]]);else return new ye([])}},er=(()=>{class e{constructor(){this._document=c(re)}hide(){let t=Math.abs(window.innerWidth-this._document.documentElement.clientWidth),i=this._document.body,n=i.style,{overflow:s,paddingRight:r}=n;if(t>0){let a=parseFloat(window.getComputedStyle(i).paddingRight);n.paddingRight=`${a+t}px`}return n.overflow="hidden",()=>{t>0&&(n.paddingRight=r),n.overflow=s}}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),tr=["animation","backdropClass"],ir=(()=>{class e{constructor(){this._nativeElement=c(W).nativeElement,this._zone=c(ae),this._injector=c(ue),this._cdRef=c(fe)}ngOnInit(){nt({mixedReadWrite:()=>Z(this._zone,this._nativeElement,(t,i)=>{i&&Kt(t),t.classList.add("show")},{animation:this.animation,runningTransition:"continue"})},{injector:this._injector})}hide(){return Z(this._zone,this._nativeElement,({classList:t})=>t.remove("show"),{animation:this.animation,runningTransition:"stop"})}updateOptions(t){tr.forEach(i=>{Ce(t[i])&&(this[i]=t[i])}),this._cdRef.markForCheck()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=ge({type:e,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1055"],hostVars:6,hostBindings:function(i,n){i&2&&(De("modal-backdrop"+(n.backdropClass?" "+n.backdropClass:"")),P("show",!n.animation)("fade",n.animation))},inputs:{animation:"animation",backdropClass:"backdropClass"},decls:0,vars:0,template:function(i,n){},encapsulation:2})}}return e})(),Wt=class{update(o){}close(o){}dismiss(o){}},Ai=class{update(o){this._windowCmptRef.instance.updateOptions(o),this._backdropCmptRef&&this._backdropCmptRef.instance&&this._backdropCmptRef.instance.updateOptions(o)}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe(j(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe(j(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}constructor(o,t,i,n){this._windowCmptRef=o,this._contentRef=t,this._backdropCmptRef=i,this._beforeDismiss=n,this._closed=new $,this._dismissed=new $,this._hidden=new $,o.instance.dismissEvent.subscribe(s=>{this.dismiss(s)}),this.result=new Promise((s,r)=>{this._resolve=s,this._reject=r}),this.result.then(null,()=>{})}close(o){this._windowCmptRef&&(this._closed.next(o),this._resolve(o),this._removeModalElements())}_dismiss(o){this._dismissed.next(o),this._reject(o),this._removeModalElements()}dismiss(o){if(this._windowCmptRef)if(!this._beforeDismiss)this._dismiss(o);else{let t=this._beforeDismiss();Os(t)?t.then(i=>{i!==!1&&this._dismiss(o)},()=>{}):t!==!1&&this._dismiss(o)}}_removeModalElements(){let o=this._windowCmptRef.instance.hide(),t=this._backdropCmptRef?this._backdropCmptRef.instance.hide():et(void 0);o.subscribe(()=>{let{nativeElement:i}=this._windowCmptRef.location;i.parentNode.removeChild(i),this._windowCmptRef.destroy(),this._contentRef?.viewRef?.destroy(),this._windowCmptRef=null,this._contentRef=null}),t.subscribe(()=>{if(this._backdropCmptRef){let{nativeElement:i}=this._backdropCmptRef.location;i.parentNode.removeChild(i),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),Mt(o,t).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}},Gi=(function(e){return e[e.BACKDROP_CLICK=0]="BACKDROP_CLICK",e[e.ESC=1]="ESC",e})(Gi||{}),nr=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","fullscreen","keyboard","role","scrollable","size","windowClass","modalDialogClass"],or=(()=>{class e{constructor(){this._document=c(re),this._elRef=c(W),this._zone=c(ae),this._injector=c(ue),this._cdRef=c(fe),this._closed$=new $,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.role="dialog",this.dismissEvent=new D,this.shown=new $,this.hidden=new $}get fullscreenClass(){return this.fullscreen===!0?" modal-fullscreen":Xt(this.fullscreen)?` modal-fullscreen-${this.fullscreen}-down`:""}dismiss(t){this.dismissEvent.emit(t)}ngOnInit(){this._elWithFocus=this._document.activeElement,nt({mixedReadWrite:()=>this._show()},{injector:this._injector})}ngOnDestroy(){this._disableEventHandling()}hide(){let{nativeElement:t}=this._elRef,i={animation:this.animation,runningTransition:"stop"},n=Z(this._zone,t,()=>t.classList.remove("show"),i),s=Z(this._zone,this._dialogEl.nativeElement,()=>{},i),r=Mt(n,s);return r.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),r}updateOptions(t){nr.forEach(i=>{Ce(t[i])&&(this[i]=t[i])}),this._cdRef.markForCheck()}_show(){let t={animation:this.animation,runningTransition:"continue"},i=Z(this._zone,this._elRef.nativeElement,(s,r)=>{r&&Kt(s),s.classList.add("show")},t),n=Z(this._zone,this._dialogEl.nativeElement,()=>{},t);Mt(i,n).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){let{nativeElement:t}=this._elRef;this._zone.runOutsideAngular(()=>{X(t,"keydown").pipe(j(this._closed$),ke(n=>n.key==="Escape")).subscribe(n=>{this.keyboard?requestAnimationFrame(()=>{n.defaultPrevented||this._zone.run(()=>this.dismiss(Gi.ESC))}):this.backdrop==="static"&&this._bumpBackdrop()});let i=!1;X(this._dialogEl.nativeElement,"mousedown").pipe(j(this._closed$),it(()=>i=!1),ti(()=>X(t,"mouseup").pipe(j(this._closed$),tt(1))),ke(({target:n})=>t===n)).subscribe(()=>{i=!0}),X(t,"click").pipe(j(this._closed$)).subscribe(({target:n})=>{t===n&&(this.backdrop==="static"?this._bumpBackdrop():this.backdrop===!0&&!i&&this._zone.run(()=>this.dismiss(Gi.BACKDROP_CLICK))),i=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){let{nativeElement:t}=this._elRef;if(!t.contains(document.activeElement)){let i=t.querySelector("[ngbAutofocus]"),n=Zn(t)[0];(i||n||t).focus()}}_restoreFocus(){let t=this._document.body,i=this._elWithFocus,n;i&&i.focus&&t.contains(i)?n=i:n=t,this._zone.runOutsideAngular(()=>{setTimeout(()=>n.focus()),this._elWithFocus=null})}_bumpBackdrop(){this.backdrop==="static"&&Z(this._zone,this._elRef.nativeElement,({classList:t})=>(t.add("modal-static"),()=>t.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=ge({type:e,selectors:[["ngb-modal-window"]],viewQuery:function(i,n){if(i&1&&Pt(cs,7),i&2){let s;Y(s=q())&&(n._dialogEl=s.first)}},hostAttrs:["tabindex","-1"],hostVars:8,hostBindings:function(i,n){i&2&&(he("aria-modal",!0)("aria-labelledby",n.ariaLabelledBy)("aria-describedby",n.ariaDescribedBy)("role",n.role),De("modal d-block"+(n.windowClass?" "+n.windowClass:"")),P("fade",n.animation))},inputs:{animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",backdrop:"backdrop",centered:"centered",fullscreen:"fullscreen",keyboard:"keyboard",role:"role",scrollable:"scrollable",size:"size",windowClass:"windowClass",modalDialogClass:"modalDialogClass"},outputs:{dismissEvent:"dismiss"},ngContentSelectors:zt,decls:4,vars:2,consts:[["dialog",""],["role","document"],[1,"modal-content"]],template:function(i,n){i&1&&(at(),st(0,"div",1,0)(2,"div",2),lt(3),rt()()),i&2&&De("modal-dialog"+(n.size?" modal-"+n.size:"")+(n.centered?" modal-dialog-centered":"")+n.fullscreenClass+(n.scrollable?" modal-dialog-scrollable":"")+(n.modalDialogClass?" "+n.modalDialogClass:""))},styles:[`ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}
|
|
3
3
|
`],encapsulation:2})}}return e})(),sr=(()=>{class e{constructor(){this._applicationRef=c(ci),this._injector=c(ue),this._environmentInjector=c(ni),this._document=c(re),this._scrollBar=c(er),this._activeWindowCmptHasChanged=new $,this._ariaHiddenValues=new Map,this._scrollBarRestoreFn=null,this._modalRefs=[],this._windowCmpts=[],this._activeInstances=new D;let t=c(ae);this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){let i=this._windowCmpts[this._windowCmpts.length-1];Gs(t,i.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(i.location.nativeElement)}})}_restoreScrollBar(){let t=this._scrollBarRestoreFn;t&&(this._scrollBarRestoreFn=null,t())}_hideScrollBar(){this._scrollBarRestoreFn||(this._scrollBarRestoreFn=this._scrollBar.hide())}open(t,i,n){let s=n.container instanceof HTMLElement?n.container:Ce(n.container)?this._document.querySelector(n.container):this._document.body;if(!s)throw new Error(`The specified modal container "${n.container||"body"}" was not found in the DOM.`);this._hideScrollBar();let r=new Wt;t=n.injector||t;let a=t.get(ni,null)||this._environmentInjector,l=this._getContentRef(t,a,i,r,n),u=n.backdrop!==!1?this._attachBackdrop(s):void 0,d=this._attachWindowComponent(s,l.nodes),f=new Ai(d,l,u,n.beforeDismiss);return this._registerModalRef(f),this._registerWindowCmpt(d),f.hidden.pipe(tt(1)).subscribe(()=>Promise.resolve(!0).then(()=>{this._modalRefs.length||(this._document.body.classList.remove("modal-open"),this._restoreScrollBar(),this._revertAriaHidden())})),r.close=p=>{f.close(p)},r.dismiss=p=>{f.dismiss(p)},r.update=p=>{f.update(p)},f.update(n),this._modalRefs.length===1&&this._document.body.classList.add("modal-open"),u&&u.instance&&u.changeDetectorRef.detectChanges(),d.changeDetectorRef.detectChanges(),f}get activeInstances(){return this._activeInstances}dismissAll(t){this._modalRefs.forEach(i=>i.dismiss(t))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(t){let i=Bt(ir,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector});return this._applicationRef.attachView(i.hostView),t.appendChild(i.location.nativeElement),i}_attachWindowComponent(t,i){let n=Bt(or,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector,projectableNodes:i});return this._applicationRef.attachView(n.hostView),t.appendChild(n.location.nativeElement),n}_getContentRef(t,i,n,s,r){return n?n instanceof ot?this._createFromTemplateRef(n,s):Xt(n)?this._createFromString(n):this._createFromComponent(t,i,n,s,r):new ye([])}_createFromTemplateRef(t,i){let n={$implicit:i,close(r){i.close(r)},dismiss(r){i.dismiss(r)}},s=t.createEmbeddedView(n);return this._applicationRef.attachView(s),new ye([s.rootNodes],s)}_createFromString(t){let i=this._document.createTextNode(`${t}`);return new ye([[i]])}_createFromComponent(t,i,n,s,r){let a=ue.create({providers:[{provide:Wt,useValue:s}],parent:t}),l=Bt(n,{environmentInjector:i,elementInjector:a}),u=l.location.nativeElement;return r.scrollable&&u.classList.add("component-host-scrollable"),this._applicationRef.attachView(l.hostView),new ye([[u]],l.hostView,l)}_setAriaHidden(t){let i=t.parentElement;i&&t!==this._document.body&&(Array.from(i.children).forEach(n=>{n!==t&&n.nodeName!=="SCRIPT"&&(this._ariaHiddenValues.set(n,n.getAttribute("aria-hidden")),n.setAttribute("aria-hidden","true"))}),this._setAriaHidden(i))}_revertAriaHidden(){this._ariaHiddenValues.forEach((t,i)=>{t?i.setAttribute("aria-hidden",t):i.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(t){let i=()=>{let n=this._modalRefs.indexOf(t);n>-1&&(this._modalRefs.splice(n,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(t),this._activeInstances.emit(this._modalRefs),t.result.then(i,i)}_registerWindowCmpt(t){this._windowCmpts.push(t),this._activeWindowCmptHasChanged.next(),t.onDestroy(()=>{let i=this._windowCmpts.indexOf(t);i>-1&&(this._windowCmpts.splice(i,1),this._activeWindowCmptHasChanged.next())})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),rr=(()=>{class e{constructor(){this._injector=c(ue),this._modalStack=c(sr),this._config=c(Zs)}open(t,i={}){let n=Zt(qi(Zt({},this._config),{animation:this._config.animation}),i);return this._modalStack.open(this._injector,t,n)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(t){this._modalStack.dismissAll(t)}hasOpenModals(){return this._modalStack.hasOpenModals()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),oo=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=I({type:e})}static{this.\u0275inj=N({providers:[rr]})}}return e})(),ar=(()=>{class e{constructor(){this._ngbConfig=c(Ye),this.destroyOnHide=!0,this.orientation="horizontal",this.roles="tablist",this.keyboard=!0}get animation(){return this._animation??this._ngbConfig.animation}set animation(t){this._animation=t}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),so=e=>Ce(e)&&e!=="",lr=0,cr=(()=>{class e{constructor(){this.templateRef=c(ot)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=T({type:e,selectors:[["ng-template","ngbNavContent",""]]})}}return e})();var ro=(()=>{class e{constructor(){this._nav=c(ao),this._nativeElement=c(W).nativeElement,this.disabled=!1,this.shown=new D,this.hidden=new D}ngOnInit(){Ce(this.domId)||(this.domId=`ngb-nav-${lr++}`)}get active(){return this._nav.activeId===this.id}get id(){return so(this._id)?this._id:this.domId}get panelDomId(){return`${this.domId}-panel`}isPanelInDom(){return(Ce(this.destroyOnHide)?!this.destroyOnHide:!this._nav.destroyOnHide)||this.active}isNgContainer(){return this._nativeElement.nodeType===Node.COMMENT_NODE}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=T({type:e,selectors:[["","ngbNavItem",""]],contentQueries:function(i,n,s){if(i&1&&_e(s,cr,4),i&2){let r;Y(r=q())&&(n.contentTpl=r.first)}},hostAttrs:[1,"nav-item"],inputs:{destroyOnHide:"destroyOnHide",disabled:"disabled",domId:"domId",_id:[0,"ngbNavItem","_id"]},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbNavItem"]})}}return e})(),ao=(()=>{class e{constructor(t){this.role=t,this._config=c(ar),this._cd=c(fe),this._document=c(re),this._nativeElement=c(W).nativeElement,this.destroyRef=c(oi),this._navigatingWithKeyboard=!1,this.activeIdChange=new D,this.animation=this._config.animation,this.destroyOnHide=this._config.destroyOnHide,this.orientation=this._config.orientation,this.roles=this._config.roles,this.keyboard=this._config.keyboard,this.shown=new D,this.hidden=new D,this.navItemChange$=new $,this.navChange=new D}click(t){t.disabled||this._updateActiveId(t.id)}onFocusout({relatedTarget:t}){this._nativeElement.contains(t)||(this._navigatingWithKeyboard=!1)}onKeyDown(t){if(this.roles!=="tablist"||!this.keyboard)return;let i=this.links.filter(r=>!r.navItem.disabled),{length:n}=i,s=-1;if(i.forEach((r,a)=>{r.nativeElement===this._document.activeElement&&(s=a)}),n){switch(t.key){case"ArrowUp":case"ArrowLeft":s=(s-1+n)%n;break;case"ArrowRight":case"ArrowDown":s=(s+1)%n;break;case"Home":s=0;break;case"End":s=n-1;break}this.keyboard==="changeWithArrows"&&this.select(i[s].navItem.id),i[s].nativeElement.focus(),this._navigatingWithKeyboard=!0,t.preventDefault()}}select(t){this._updateActiveId(t,!1)}ngAfterContentInit(){if(!Ce(this.activeId)){let t=this.items.first?this.items.first.id:null;so(t)&&(this._updateActiveId(t,!1),this._cd.detectChanges())}this.items.changes.pipe(ct(this.destroyRef)).subscribe(()=>this._notifyItemChanged(this.activeId))}ngOnChanges({activeId:t}){t&&!t.firstChange&&this._notifyItemChanged(t.currentValue)}_updateActiveId(t,i=!0){if(this.activeId!==t){let n=!1;i&&this.navChange.emit({activeId:this.activeId,nextId:t,preventDefault:()=>{n=!0}}),n||(this.activeId=t,this.activeIdChange.emit(t),this._notifyItemChanged(t))}}_notifyItemChanged(t){this.navItemChange$.next(this._getItemById(t))}_getItemById(t){return this.items&&this.items.find(i=>i.id===t)||null}static{this.\u0275fac=function(i){return new(i||e)(ri("role"))}}static{this.\u0275dir=T({type:e,selectors:[["","ngbNav",""]],contentQueries:function(i,n,s){if(i&1&&(_e(s,ro,4),_e(s,lo,5)),i&2){let r;Y(r=q())&&(n.items=r),Y(r=q())&&(n.links=r)}},hostAttrs:[1,"nav"],hostVars:4,hostBindings:function(i,n){i&1&&pe("keydown.arrowLeft",function(r){return n.onKeyDown(r)})("keydown.arrowRight",function(r){return n.onKeyDown(r)})("keydown.arrowDown",function(r){return n.onKeyDown(r)})("keydown.arrowUp",function(r){return n.onKeyDown(r)})("keydown.Home",function(r){return n.onKeyDown(r)})("keydown.End",function(r){return n.onKeyDown(r)})("focusout",function(r){return n.onFocusout(r)}),i&2&&(he("aria-orientation",n.orientation==="vertical"&&n.roles==="tablist"?"vertical":void 0)("role",n.role?n.role:n.roles?"tablist":void 0),P("flex-column",n.orientation==="vertical"))},inputs:{activeId:"activeId",animation:"animation",destroyOnHide:"destroyOnHide",orientation:"orientation",roles:"roles",keyboard:"keyboard"},outputs:{activeIdChange:"activeIdChange",shown:"shown",hidden:"hidden",navChange:"navChange"},exportAs:["ngbNav"],features:[je]})}}return e})(),lo=(()=>{class e{constructor(t){this.role=t,this.navItem=c(ro),this.nav=c(ao),this.nativeElement=c(W).nativeElement}get tabindex(){return this.nav.keyboard===!1?this.navItem.disabled?-1:void 0:this.nav._navigatingWithKeyboard||this.navItem.disabled||!this.navItem.active?-1:void 0}static{this.\u0275fac=function(i){return new(i||e)(ri("role"))}}static{this.\u0275dir=T({type:e,selectors:[["","ngbNavLink",""]],hostAttrs:[1,"nav-link"],hostVars:12,hostBindings:function(i,n){i&2&&(ee("id",n.navItem.domId),he("role",n.role?n.role:n.nav.roles?"tab":void 0)("tabindex",n.tabindex)("aria-controls",n.navItem.isPanelInDom()?n.navItem.panelDomId:null)("aria-selected",n.navItem.active)("aria-disabled",n.navItem.disabled),P("nav-item",n.navItem.isNgContainer())("active",n.navItem.active)("disabled",n.navItem.disabled))}})}}return e})(),hu=(()=>{class e extends lo{static{this.\u0275fac=(()=>{let t;return function(n){return(t||(t=si(e)))(n||e)}})()}static{this.\u0275dir=T({type:e,selectors:[["button","ngbNavLink",""]],hostAttrs:["type","button"],hostVars:1,hostBindings:function(i,n){i&1&&pe("click",function(){return n.nav.click(n.navItem)}),i&2&&ee("disabled",n.navItem.disabled)},features:[li]})}}return e})();var dr=({classList:e})=>(e.remove("show"),()=>e.remove("active")),ur=(e,o)=>{o&&Kt(e),e.classList.add("show")},$n=(()=>{class e{constructor(){this.nativeElement=c(W).nativeElement}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=T({type:e,selectors:[["","ngbNavPane",""]],hostAttrs:[1,"tab-pane"],hostVars:5,hostBindings:function(i,n){i&2&&(ee("id",n.item.panelDomId),he("role",n.role?n.role:n.nav.roles?"tabpanel":void 0)("aria-labelledby",n.item.domId),P("fade",n.nav.animation))},inputs:{item:"item",nav:"nav",role:"role"}})}}return e})(),pu=(()=>{class e{constructor(){this._cd=c(fe),this._ngZone=c(ae),this._activePane=null}isPanelTransitioning(t){return this._activePane?.item===t}ngAfterViewInit(){this._updateActivePane(),this.nav.navItemChange$.pipe(ct(this.nav.destroyRef),ln(this._activePane?.item||null),sn(),an(1)).subscribe(t=>{let i={animation:this.nav.animation,runningTransition:"stop"};this._cd.detectChanges(),this._activePane?Z(this._ngZone,this._activePane.nativeElement,dr,i).subscribe(()=>{let n=this._activePane?.item;this._activePane=this._getPaneForItem(t),this._cd.markForCheck(),this._activePane&&(this._activePane.nativeElement.classList.add("active"),Z(this._ngZone,this._activePane.nativeElement,ur,i).subscribe(()=>{t&&(t.shown.emit(),this.nav.shown.emit(t.id))})),n&&(n.hidden.emit(),this.nav.hidden.emit(n.id))}):this._updateActivePane()})}_updateActivePane(){this._activePane=this._getActivePane(),this._activePane?.nativeElement.classList.add("show","active")}_getPaneForItem(t){return this._panes&&this._panes.find(i=>i.item===t)||null}_getActivePane(){return this._panes&&this._panes.find(t=>t.item.active)||null}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=ge({type:e,selectors:[["","ngbNavOutlet",""]],viewQuery:function(i,n){if(i&1&&Pt($n,5),i&2){let s;Y(s=q())&&(n._panes=s)}},hostAttrs:[1,"tab-content"],inputs:{paneRole:"paneRole",nav:[0,"ngbNavOutlet","nav"]},attrs:ds,decls:2,vars:0,consts:[["ngbNavPane","",3,"item","nav","role"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,n){i&1&&kt(0,ps,1,1,null,null,un),i&2&&Ft(n.nav.items)},dependencies:[$n,mi],encapsulation:2,changeDetection:0})}}return e})();var co=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=I({type:e})}static{this.\u0275inj=N({})}}return e})();var uo=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=I({type:e})}static{this.\u0275inj=N({})}}return e})(),hr={hover:["mouseenter","mouseleave"],focus:["focusin","focusout"]};function pr(e){let o=(e||"").trim();if(o.length===0)return[];let t=o.split(/\s+/).map(n=>n.split(":")).map(n=>hr[n[0]]||n),i=t.filter(n=>n.includes("manual"));if(i.length>1)throw"Triggers parse error: only one manual trigger is allowed";if(i.length===1&&t.length>1)throw"Triggers parse error: manual trigger can't be mixed with other triggers";return i.length?[]:t}function _r(e,o,t,i,n,s=0,r=0,a=Et,l=Et){let u=pr(o);if(u.length===0)return()=>{};let d=new Set,f=[],p;function h(_,g){e.addEventListener(_,g),f.push(()=>e.removeEventListener(_,g))}function v(_,g){clearTimeout(p),g>0?p=setTimeout(_,g):_()}for(let[_,g]of u)if(g?(h(_,()=>{d.add(_),v(()=>d.size>0&&i(),s)}),h(g,()=>{d.delete(_),v(()=>d.size===0&&n(),r)})):h(_,()=>t()?v(n,r):v(i,s)),_==="mouseenter"&&g==="mouseleave"&&r>0){let w=a.subscribe(()=>{d.delete(_),clearTimeout(p)}),E=l.subscribe(()=>{d.delete(_),v(()=>d.size===0&&n(),r)});f.push(()=>w.unsubscribe(),()=>E.unsubscribe())}return f.push(()=>clearTimeout(p)),()=>f.forEach(_=>_())}var ho=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=I({type:e})}static{this.\u0275inj=N({})}}return e})();var po=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=I({type:e})}static{this.\u0275inj=N({})}}return e})();var _o=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=I({type:e})}static{this.\u0275inj=N({})}}return e})();var fo=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=I({type:e})}static{this.\u0275inj=N({})}}return e})();var go=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=I({type:e})}static{this.\u0275inj=N({})}}return e})();var mo=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=I({type:e})}static{this.\u0275inj=N({})}}return e})(),fr=(()=>{class e{constructor(){this._ngbConfig=c(Ye),this.autoClose=!0,this.placement="auto",this.popperOptions=t=>t,this.triggers="hover focus",this.disableTooltip=!1,this.openDelay=0,this.closeDelay=0}get animation(){return this._animation??this._ngbConfig.animation}set animation(t){this._animation=t}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),gr=0,mr=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=ge({type:e,selectors:[["ngb-tooltip-window"]],hostAttrs:["role","tooltip"],hostVars:5,hostBindings:function(i,n){i&1&&pe("mouseenter",function(){return n.onMouseEnter()})("mouseleave",function(){return n.onMouseLeave()}),i&2&&(ee("id",n.id),De("tooltip"+(n.tooltipClass?" "+n.tooltipClass:"")),P("fade",n.animation))},inputs:{animation:"animation",id:"id",tooltipClass:"tooltipClass",onMouseEnter:"onMouseEnter",onMouseLeave:"onMouseLeave"},ngContentSelectors:zt,decls:3,vars:0,consts:[["data-popper-arrow","",1,"tooltip-arrow"],[1,"tooltip-inner"]],template:function(i,n){i&1&&(at(),pn(0,"div",0),st(1,"div",1),lt(2),rt())},styles:[`ngb-tooltip-window{pointer-events:none;position:absolute}ngb-tooltip-window .tooltip-inner{pointer-events:auto}ngb-tooltip-window.bs-tooltip-top,ngb-tooltip-window.bs-tooltip-bottom{padding-left:0;padding-right:0}ngb-tooltip-window.bs-tooltip-start,ngb-tooltip-window.bs-tooltip-end{padding-top:0;padding-bottom:0}
|
|
4
4
|
`],encapsulation:2,changeDetection:0})}}return e})(),_u=(()=>{class e{constructor(){this._config=c(fr),this.animation=this._config.animation,this.autoClose=this._config.autoClose,this.placement=this._config.placement,this.popperOptions=this._config.popperOptions,this.triggers=this._config.triggers,this.container=this._config.container,this.disableTooltip=this._config.disableTooltip,this.tooltipClass=this._config.tooltipClass,this.openDelay=this._config.openDelay,this.closeDelay=this._config.closeDelay,this.shown=new D,this.hidden=new D,this._nativeElement=c(W).nativeElement,this._ngZone=c(ae),this._document=c(re),this._changeDetector=c(fe),this._injector=c(ue),this._ngbTooltipWindowId=`ngb-tooltip-${gr++}`,this._popupService=new jt(mr),this._windowRef=null,this._positioning=Ui(),this._mouseEnterTooltip=new $,this._mouseLeaveTooltip=new $,this._opening=!0,this._transitioning=!1}set ngbTooltip(t){this._ngbTooltip=t,!t&&this._windowRef&&this.close()}get ngbTooltip(){return this._ngbTooltip}open(t){if(!this._opening&&this._transitioning&&(this._transitioning=!1,Gn(this._windowRef.location.nativeElement)),!this._windowRef&&this._ngbTooltip&&!this.disableTooltip){let{windowRef:i,transition$:n}=this._popupService.open(this._ngbTooltip,t??this.tooltipContext,this.animation);this._opening=!0,this._transitioning=!0,this._windowRef=i,this._windowRef.setInput("animation",this.animation),this._windowRef.setInput("tooltipClass",this.tooltipClass),this._windowRef.setInput("id",this._ngbTooltipWindowId),this._windowRef.setInput("onMouseEnter",()=>this._mouseEnterTooltip.next()),this._windowRef.setInput("onMouseLeave",()=>this._mouseLeaveTooltip.next()),this._getPositionTargetElement().setAttribute("aria-describedby",this._ngbTooltipWindowId),this.container==="body"&&this._document.body.appendChild(this._windowRef.location.nativeElement),this._windowRef.changeDetectorRef.detectChanges(),this._windowRef.changeDetectorRef.markForCheck(),this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._getPositionTargetElement(),targetElement:this._windowRef.location.nativeElement,placement:this.placement,baseClass:"bs-tooltip",updatePopperOptions:s=>this.popperOptions(Li([0,6])(s))}),Promise.resolve().then(()=>{this._positioning.update()}),this._afterRenderRef=It({mixedReadWrite:()=>{this._positioning.update()}},{injector:this._injector})}),Hi(this._ngZone,this._document,this.autoClose,()=>this.close(),this.hidden,[this._windowRef.location.nativeElement],[this._nativeElement]),n.subscribe(()=>{this._transitioning&&(this._transitioning=!1,this.shown.emit())})}}close(t=this.animation){this._opening&&this._transitioning&&(this._transitioning=!1,Gn(this._windowRef.location.nativeElement)),this._windowRef!=null&&(this._getPositionTargetElement().removeAttribute("aria-describedby"),this._opening=!1,this._transitioning=!0,this._popupService.close(t).subscribe(()=>{this._windowRef=null,this._positioning.destroy(),this._afterRenderRef?.destroy(),this._transitioning&&(this._transitioning=!1,this.hidden.emit()),this._changeDetector.markForCheck()}))}toggle(){this._windowRef?this.close():this.open()}isOpen(){return this._windowRef!=null}ngOnInit(){this._unregisterListenersFn=_r(this._nativeElement,this.triggers,this.isOpen.bind(this),this.open.bind(this),this.close.bind(this),+this.openDelay,+this.closeDelay,this._mouseEnterTooltip,this._mouseLeaveTooltip)}ngOnChanges({tooltipClass:t}){t&&this.isOpen()&&this._windowRef.setInput("tooltipClass",t.currentValue)}ngOnDestroy(){this.close(!1),this._unregisterListenersFn?.()}_getPositionTargetElement(){return(Xt(this.positionTarget)?this._document.querySelector(this.positionTarget):this.positionTarget)||this._nativeElement}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=T({type:e,selectors:[["","ngbTooltip",""]],inputs:{animation:"animation",autoClose:"autoClose",placement:"placement",popperOptions:"popperOptions",triggers:"triggers",positionTarget:"positionTarget",container:"container",disableTooltip:"disableTooltip",tooltipClass:"tooltipClass",tooltipContext:"tooltipContext",openDelay:"openDelay",closeDelay:"closeDelay",ngbTooltip:"ngbTooltip"},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbTooltip"],features:[je]})}}return e})(),vo=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=I({type:e})}static{this.\u0275inj=N({})}}return e})(),vr=(()=>{class e{constructor(){this.highlightClass="ngb-highlight",this.accentSensitive=!0}ngOnChanges(t){!this.accentSensitive&&!String.prototype.normalize&&(console.warn("The `accentSensitive` input in `ngb-highlight` cannot be set to `false` in a browser that does not implement the `String.normalize` function. You will have to include a polyfill in your application to use this feature in the current browser."),this.accentSensitive=!0);let i=mt(this.result),n=Array.isArray(this.term)?this.term:[this.term],s=u=>this.accentSensitive?u:An(u),r=n.map(u=>Es(s(mt(u)))).filter(u=>u),a=this.accentSensitive?i:An(i),l=r.length?a.split(new RegExp(`(${r.join("|")})`,"gmi")):[i];if(this.accentSensitive)this.parts=l;else{let u=0;this.parts=l.map(d=>i.substring(u,u+=d.length))}}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=ge({type:e,selectors:[["ngb-highlight"]],inputs:{highlightClass:"highlightClass",result:"result",term:"term",accentSensitive:"accentSensitive"},features:[je],decls:2,vars:0,consts:[[3,"class"]],template:function(i,n){i&1&&kt(0,gs,2,1,null,null,di),i&2&&Ft(n.parts)},styles:[`.ngb-highlight{font-weight:700}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as se}from"./chunk-
|
|
1
|
+
import{a as se}from"./chunk-RMWS37MG.js";import{b as Q}from"./chunk-D3NFARXL.js";import{C as oe,D as ae,c as X,d as k,e as Y,f as Z,g as ee,j as $,m as te,r as ie,s as ne,z as re}from"./chunk-YAUW3QQV.js";import{b as J}from"./chunk-72SK6LN3.js";import{C as q,E as G,F as j,H as K,J as E,K as A,q as R}from"./chunk-B6EPFA4V.js";import{Ab as T,Ec as a,Fb as f,Fc as s,Gb as o,Hb as r,Ib as m,Rb as I,Ua as D,Xb as C,Za as n,Zb as u,aa as w,ga as x,ha as v,hc as W,ic as V,jc as M,kc as l,lc as g,mc as h,n as P,nb as O,sa as _,xc as H,yb as L,zb as z,zc as B}from"./chunk-MKV5RAJQ.js";import{h as F}from"./chunk-B4AJQJMI.js";var de=()=>["restoring","restarting","restore-complete"],N=(t,d)=>({"is-valid":t,"is-invalid":d});function ce(t,d){if(t&1){let e=I();o(0,"div",5)(1,"h4",6),l(2),a(3,"translate"),r(),m(4,"div",7),a(5,"translate"),o(6,"button",8),C("click",function(){x(e);let i=u();return v(i.onClickGettingStarted())}),l(7),a(8,"translate"),r(),o(9,"a",9),C("click",function(){x(e);let i=u();return v(i.onClickRestoreBackup())}),l(10),a(11,"translate"),r()()}t&2&&(n(2),g(s(3,4,"setup.welcome_to_homebridge")),n(2),f("innerHTML",s(5,6,"setup.intro"),D),n(3),h(" ",s(8,8,"setup.button_get_started")," "),n(3),g(s(11,10,"setup_wizard_restore")))}function me(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),C("ngSubmit",function(){x(e);let i=u();return v(i.createFirstUser())}),o(9,"div",13)(10,"span",14),m(11,"i",15),r(),m(12,"input",16),a(13,"translate"),r(),o(14,"div",13)(15,"span",14),m(16,"i",17),r(),m(17,"input",18),a(18,"translate"),r(),o(19,"div",13)(20,"span",14),m(21,"i",17),r(),m(22,"input",19),a(23,"translate"),r(),o(24,"div",20)(25,"button",21),C("click",function(){x(e);let i=u();return v(i.onClickCancelRestore())}),l(26),a(27,"translate"),r(),o(28,"button",22),l(29),a(30,"translate"),r()()()()()}if(t&2){let e=u();n(2),g(s(3,19,"setup.create_account")),n(3),g(s(6,21,"setup_wizard_create_info")),n(3),f("formGroup",e.createUserForm),n(4),M(B(33,N,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.valid,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.invalid)),f("readonly",e.loading())("placeholder",s(13,23,"users.label_username")),n(5),M(B(36,N,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.valid,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.errors)),f("readonly",e.loading())("placeholder",s(18,25,"users.label_password")),n(5),M(B(39,N,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.valid,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.errors)),f("readonly",e.loading())("placeholder",s(23,27,"users.label_confirm_password")),n(3),f("disabled",e.restoreUploading()),n(),h(" ",s(27,29,"form.button_back")," "),n(2),f("disabled",e.createUserForm.invalid||e.loading()),n(),h(" ",s(30,31,"form.button_continue")," ")}}function ue(t,d){t&1&&(m(0,"i",25),l(1),a(2,"translate")),t&2&&(n(),h(" ",s(2,1,"backup.label_uploading")," "))}function ge(t,d){t&1&&(l(0),a(1,"translate")),t&2&&h(" ",s(1,1,"form.button_continue")," ")}function _e(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),C("change",function(i){x(e);let b=u();return v(b.handleRestoreFileInput(i.target.files))}),r(),o(8,"div",20)(9,"button",21),C("click",function(){x(e);let i=u();return v(i.onClickCancelRestore())}),l(10),a(11,"translate"),r(),o(12,"button",24),C("click",function(){x(e);let i=u();return v(i.onRestoreBackupClick())}),z(13,ue,3,3)(14,ge,2,3),r()()()}if(t&2){let e=u();n(2),g(s(3,6,"setup_wizard_restore")),n(3),g(s(6,8,"backup.restore_help_one")),n(4),f("disabled",e.restoreUploading()),n(),h(" ",s(11,10,"form.button_back")," "),n(2),f("disabled",e.restoreUploading()||!e.selectedFile()),n(),T(e.restoreUploading()?13:14)}}function fe(t,d){t&1&&(l(0),a(1,"translate")),t&2&&h(" ",s(1,1,"setup_wizard_restoring")," ")}function he(t,d){t&1&&(l(0),a(1,"translate")),t&2&&h(" ",s(1,1,"setup_wizard_starting")," ")}function be(t,d){t&1&&(l(0),a(1,"translate")),t&2&&h(" ",s(1,1,"setup_wizard_complete")," ")}function we(t,d){t&1&&(o(0,"a",27),l(1),a(2,"translate"),r()),t&2&&(n(),g(s(2,1,"form.button_continue")))}function xe(t,d){if(t&1&&(o(0,"div",5)(1,"h4",6),z(2,fe,2,3)(3,he,2,3)(4,be,2,3),r(),m(5,"div",26),z(6,we,3,3,"a",27),r()),t&2){let e=u();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 ve(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),g(s(3,3,"setup_wizard_complete_title")),n(3),g(s(6,5,"setup_wizard_completed")),n(3),g(s(9,7,"form.button_continue")))}var Ne=(()=>{class t{$api=w(A);$auth=w(Q);$settings=w(J);$title=w(q);$toastr=w(K);$translate=w(G);$ws=w(se);step=_("welcome",{});backgroundStyle=_(void 0,{});progress=_(1,{});restoreInProgress=_(!1,{});restoreStarted=_(!1,{});restoreFailed=_(!1,{});loading=_(!1,{});selectedFile=_(void 0,{});restoreUploading=_(!1,{});io;createUserForm=new ee({username:new $("",[k.required]),password:new $("",[k.compose([k.required,k.minLength(4)])]),passwordConfirm:new $("",[k.required])},this.matchPassword);ngOnInit(){this.$title.setTitle(this.$translate.instant("setup_wizard_page_title")),this.setBackground()}onClickGettingStarted(){this.step.set("create-account"),this.progress.set(50)}onClickRestoreBackup(){this.step.set("restore-backup"),this.progress.set(20)}onClickCancelRestore(){this.selectedFile.set(void 0),this.step.set("welcome"),this.progress.set(1)}createFirstUser(){return F(this,null,function*(){this.loading.set(!0),this.progress.set(75);let e=this.createUserForm.getRawValue();e.name=e.username;try{yield this.$api.post("/setup-wizard/create-first-user",e),this.$settings.env.setupWizardComplete=!0,this.progress.set(100),this.loading.set(!1),yield this.$auth.login({username:e.username,password:e.password}),this.step.set("setup-complete")}catch(p){this.loading.set(!1),this.progress.set(50),console.error(p),this.$toastr.error(p.message,this.$translate.instant("toast.title_error"))}})}handleRestoreFileInput(e){e.length?(this.selectedFile.set(e[0]),this.progress.set(40)):(this.selectedFile.set(void 0),this.progress.set(20))}onRestoreBackupClick(){return F(this,null,function*(){this.restoreUploading.set(!0),this.step.set("restoring"),this.progress.set(60);try{let e=yield this.$api.get("/setup-wizard/get-setup-wizard-token");window.localStorage.setItem(E.jwt.tokenKey,e.access_token),this.$auth.token=e.access_token,this.progress.set(65);let p=new FormData,i=this.selectedFile();p.append("restoreArchive",i,i.name),yield this.$api.post("/backup/restore",p),this.progress.set(70),this.io=this.$ws.connectToNamespace("backup");let b=document.getElementById("output");this.io.socket.on("stdout",c=>{c.split(`
|
|
2
2
|
\r`).forEach(y=>{if(y&&!/^[⠇⠏⠋⠙⠹⠸]+$/.test(y)){let S=document.createElement("div"),pe=/\x1B\[(\d{1,2}(;\d{1,2})?)?[mGK]/g;S.innerHTML=y.replace(pe,""),y.includes("[0;31m")?S.classList.add("red-text"):y.includes("[0;32m")?S.classList.add("green-text"):y.includes("[0;33m")?S.classList.add("orange-text"):y.includes("[0;36m")&&S.classList.add("cyan-text"),b.appendChild(S),b.scrollTop=b.scrollHeight}})}),this.restoreStarted.set(!0),this.restoreInProgress.set(!0),this.progress.set(75),yield P(this.io.request("do-restore")),this.progress.set(80),this.restoreInProgress.set(!1),yield this.$api.put("/backup/restart",{}),this.step.set("restarting"),this.progress.set(85),window.localStorage.removeItem(E.jwt.tokenKey),this.$auth.token=null;let U=document.createElement("div");U.classList.add("orange-text"),U.innerHTML="Starting Homebridge, please wait...",b.appendChild(U),b.scrollTop=b.scrollHeight,yield new Promise(c=>setTimeout(c,3e3)),this.progress.set(88),yield new Promise(c=>setTimeout(c,3e3)),this.progress.set(91),yield new Promise(c=>setTimeout(c,3e3)),this.progress.set(94),yield new Promise(c=>setTimeout(c,3e3)),this.progress.set(97),yield new Promise(c=>setTimeout(c,3e3)),this.progress.set(99);let le=setInterval(()=>F(this,null,function*(){try{yield this.$api.get("/auth/settings"),clearInterval(le),this.progress.set(100),this.restoreUploading.set(!1),this.step.set("restore-complete")}catch{}}),1e3)}catch(e){console.error(e),this.restoreUploading.set(!1),this.restoreFailed.set(!0),this.progress.set(20),this.step.set("restore-backup"),this.$toastr.error(e.message,this.$translate.instant("toast.title_error"))}finally{this.io&&this.io.end()}})}setBackground(){return F(this,null,function*(){if(this.$settings.settingsLoaded||(yield P(this.$settings.onSettingsLoaded)),this.$settings.env.customWallpaperHash){let e=`${E.api.base}/auth/wallpaper/${this.$settings.env.customWallpaperHash}`;this.backgroundStyle.set(`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=O({type:t,selectors:[["ng-component"]],decls:10,vars:11,consts:[[1,"setup-container","gradient","d-flex","align-items-start","justify-content-center"],[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"],[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-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","placeholder"],[1,"fas","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","placeholder"],["formControlName","passwordConfirm","type","password","id","form-pass-confirm","autocomplete","new-password","tabindex","2","required","",1,"form-control","custom-input",3,"readonly","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-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),m(2,"img",2),o(3,"div",3),m(4,"div",4),r(),z(5,ce,12,12,"div",5)(6,me,31,42,"div",5)(7,_e,15,12,"div",5)(8,xe,7,2,"div",5)(9,ve,10,9,"div",5),r()()),p&2&&(W("background",i.backgroundStyle()),V("anim",!i.backgroundStyle()),n(4),W("width",i.progress()+"%"),V("progress-bar-animated",i.loading()||i.restoreUploading()),L("aria-valuenow",i.progress()),n(),T(i.step()==="welcome"?5:i.step()==="create-account"?6:i.step()==="restore-backup"?7:H(10,de).includes(i.step())?8:i.step()==="setup-complete"?9:-1))},dependencies:[R,oe,te,X,Y,Z,re,ae,ne,ie,j],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{Ne as SetupWizardComponent};
|