"use strict";(self.webpackChunk_bitwarden_web_vault=self.webpackChunk_bitwarden_web_vault||[]).push([[77],{97077:(e,n,t)=>{t.r(n),t.d(n,{AcceptEmergencyComponent:()=>h});var i=t(23306),c=t(71146),r=t(29428),u=t(2978),a=t(24852),o=t(75557),s=t(99721),l=t(78627),d=t(58172),m=t(19419),g=t(82933),p=function(e,n,t,i){return new(t||(t=Promise))((function(c,r){function u(e){try{o(i.next(e))}catch(n){r(n)}}function a(e){try{o(i.throw(e))}catch(n){r(n)}}function o(e){var n;e.done?c(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(u,a)}o((i=i.apply(e,n||[])).next())}))};function _(e,n){1&e&&(a.TgZ(0,"div",2),a._uU(1,"\n  "),a.TgZ(2,"div"),a._uU(3,"\n    "),a._UZ(4,"img",3),a._uU(5,"\n    "),a.TgZ(6,"p",4),a._uU(7,"\n      "),a._UZ(8,"i",5),a.ALo(9,"i18n"),a._uU(10,"\n      "),a.TgZ(11,"span",6),a._uU(12),a.ALo(13,"i18n"),a.qZA(),a._uU(14,"\n    "),a.qZA(),a._uU(15,"\n  "),a.qZA(),a._uU(16,"\n"),a.qZA()),2&e&&(a.xp6(8),a.s9C("title",a.lcZ(9,2,"loading")),a.xp6(4),a.Oqu(a.lcZ(13,4,"loading")))}const Z=function(e){return{email:e}};function U(e,n){if(1&e&&(a.TgZ(0,"div",7),a._uU(1,"\n  "),a.TgZ(2,"div",8),a._uU(3,"\n    "),a.TgZ(4,"div",9),a._uU(5,"\n      "),a.TgZ(6,"p",10),a._uU(7),a.ALo(8,"i18n"),a.qZA(),a._uU(9,"\n      "),a.TgZ(10,"div",11),a._uU(11,"\n        "),a.TgZ(12,"div",12),a._uU(13,"\n          "),a.TgZ(14,"p",4),a._uU(15),a.qZA(),a._uU(16,"\n          "),a.TgZ(17,"p"),a._uU(18),a.ALo(19,"i18n"),a.qZA(),a._uU(20,"\n          "),a._UZ(21,"hr"),a._uU(22,"\n          "),a.TgZ(23,"div",13),a._uU(24,"\n            "),a.TgZ(25,"a",14),a._uU(26),a.ALo(27,"i18n"),a.qZA(),a._uU(28,"\n            "),a.TgZ(29,"a",15),a._uU(30),a.ALo(31,"i18n"),a.qZA(),a._uU(32,"\n          "),a.qZA(),a._uU(33,"\n        "),a.qZA(),a._uU(34,"\n      "),a.qZA(),a._uU(35,"\n    "),a.qZA(),a._uU(36,"\n  "),a.qZA(),a._uU(37,"\n"),a.qZA()),2&e){const e=a.oxw();a.xp6(7),a.Oqu(a.lcZ(8,7,"emergencyAccess")),a.xp6(8),a.hij("\n            ",e.name,"\n          "),a.xp6(3),a.Oqu(a.lcZ(19,9,"acceptEmergencyAccess")),a.xp6(7),a.Q6J("queryParams",a.VKq(15,Z,e.email)),a.xp6(1),a.hij("\n              ",a.lcZ(27,11,"logIn"),"\n            "),a.xp6(3),a.Q6J("queryParams",a.VKq(17,Z,e.email)),a.xp6(1),a.hij("\n              ",a.lcZ(31,13,"createAccount"),"\n            ")}}class h extends i.o{constructor(e,n,t,i,c,r){super(e,n,t,i,c),this.emergencyAccessService=r,this.requiredParameters=["id","name","email","token"],this.failedShortMessage="emergencyInviteAcceptFailedShort",this.failedMessage="emergencyInviteAcceptFailed"}authedHandler(e){return p(this,void 0,void 0,(function*(){this.actionPromise=this.emergencyAccessService.accept(e.id,e.token),yield this.actionPromise,this.platformUtilService.showToast("success",this.i18nService.t("inviteAccepted"),this.i18nService.t("emergencyInviteAcceptedDesc"),{timeout:1e4}),this.router.navigate(["/vault"])}))}unauthedHandler(e){return p(this,void 0,void 0,(function*(){this.name=e.name,null!=this.name&&(this.name=this.name.replace(/\+/g," "))}))}}h.ɵfac=function(e){return new(e||h)(a.Y36(o.F0),a.Y36(s.P),a.Y36(l.D),a.Y36(o.gz),a.Y36(d.b),a.Y36(u.d))},h.ɵcmp=a.Xpm({type:h,selectors:[["ng-component"]],standalone:!0,features:[a.qOj,a.jDz],decls:4,vars:2,consts:[["class","mt-5 d-flex justify-content-center",4,"ngIf"],["class","container",4,"ngIf"],[1,"mt-5","d-flex","justify-content-center"],["alt","Bitwarden",1,"mb-4","logo","logo-themed"],[1,"text-center"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-2x","text-muted",3,"title"],[1,"sr-only"],[1,"container"],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],[1,"lead","text-center","mb-4"],[1,"card","d-block"],[1,"card-body"],[1,"d-flex"],["routerLink","/login",1,"btn","btn-primary","btn-block",3,"queryParams"],["routerLink","/register",1,"btn","btn-primary","btn-block","ml-2","mt-0",3,"queryParams"]],template:function(e,n){1&e&&(a.YNc(0,_,17,6,"div",0),a._uU(1,"\n"),a.YNc(2,U,38,19,"div",1),a._uU(3,"\n")),2&e&&(a.Q6J("ngIf",n.loading),a.xp6(2),a.Q6J("ngIf",!n.loading&&!n.authed))},dependencies:[c.m,m.O5,o.rH,g.C,r.x],encapsulation:2})}}]);
//# sourceMappingURL=77.f9a0f9e87ddc6e951e16.js.map