(()=>{var e,t={52165:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AppRoutingModule=void 0;const r=n(68012),o=n(32621),a=(n(68012),[{path:"providers",loadChildren:()=>i(void 0,void 0,void 0,(function*(){return(yield Promise.resolve().then((()=>n(33150)))).ProvidersModule}))}]);class s{}t.AppRoutingModule=s,s.ɵfac=function(e){return new(e||s)},s.ɵmod=o.ɵɵdefineNgModule({type:s}),s.ɵinj=o.ɵɵdefineInjector({imports:[[r.RouterModule.forChild(a)],r.RouterModule]})},63395:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AppComponent=void 0;const i=n(27914),r=n(64281),o=n(47075),a=n(32621),s=n(68012);class l extends i.AppComponent{ngOnInit(){super.ngOnInit(),this.policyListService.addPolicies([new o.MaximumVaultTimeoutPolicy,new r.DisablePersonalVaultExportPolicy])}}t.AppComponent=l,l.ɵfac=function(){let e;return function(t){return(e||(e=a.ɵɵgetInheritedFactory(l)))(t||l)}}(),l.ɵcmp=a.ɵɵdefineComponent({type:l,selectors:[["app-root"]],features:[a.ɵɵInheritDefinitionFeature],decls:2,vars:0,template:function(e,t){1&e&&(a.ɵɵelement(0,"router-outlet"),a.ɵɵtext(1,"\n"))},directives:[s.RouterOutlet],encapsulation:2})},65895:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AppModule=void 0;const i=n(83072),r=n(2336),o=n(96832),a=n(3435),s=n(68012),l=n(37407),c=n(44926),d=n(49173),p=n(77537),u=n(52976),m=n(7643),h=n(52165),v=n(63395),f=n(40299),g=n(32621);class y{}t.AppModule=y,y.ɵfac=function(e){return new(e||y)},y.ɵmod=g.ɵɵdefineNgModule({type:y,bootstrap:[v.AppComponent]}),y.ɵinj=g.ɵɵdefineInjector({imports:[[r.OverlayModule,p.OssModule,c.JslibModule,a.BrowserAnimationsModule,o.FormsModule,o.ReactiveFormsModule,u.ServicesModule,l.InfiniteScrollModule,i.DragDropModule,h.AppRoutingModule,d.OssRoutingModule,f.OrganizationsModule,s.RouterModule,m.WildcardRoutingModule]]})},22977:(e,t,n)=>{"use strict";const i=n(61248),r=n(32621);n(43734),n(19755),n(28981),n(5812),n(51857);const o=n(65895);r.enableProdMode(),i.platformBrowser().bootstrapModule(o.AppModule,{preserveWhitespaces:!0})},16653:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseCvaComponent=void 0;const i=n(96832),r=n(89924),o=n(32621),a=n(96832);class s{constructor(e){this.controlDir=e,this.internalControl=new i.FormControl(""),this.onValueChangesInternal=e=>this.onChange(e),this.controlDir.valueAccessor=this}get describedById(){return this.showDescribedBy?this.controlId+"Desc":null}get showDescribedBy(){return null!=this.helperText||this.controlDir.control.hasError("required")}get isRequired(){return this.controlDir.control.hasValidator(i.Validators.required)||this.controlDir.control.hasValidator(r.dirtyRequired)}ngOnInit(){this.internalControl.valueChanges.subscribe(this.onValueChangesInternal)}onBlurInternal(){this.onTouched()}writeValue(e){this.internalControl.setValue(e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){e?this.internalControl.disable():this.internalControl.enable()}}t.BaseCvaComponent=s,s.ɵfac=function(e){return new(e||s)(o.ɵɵdirectiveInject(a.NgControl,2))},s.ɵdir=o.ɵɵdefineDirective({type:s,inputs:{label:"label",controlId:"controlId",helperText:"helperText"}})},64897:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InputCheckboxComponent=void 0;const i=n(16653),r=n(32621),o=n(96832),a=n(57490);function s(e,t){if(1&e&&(r.ɵɵelementStart(0,"small",5),r.ɵɵtext(1),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵattribute("id",e.describedById),r.ɵɵadvance(1),r.ɵɵtextInterpolate(e.helperText)}}class l extends i.BaseCvaComponent{}t.InputCheckboxComponent=l,l.ɵfac=function(){let e;return function(t){return(e||(e=r.ɵɵgetInheritedFactory(l)))(t||l)}}(),l.ɵcmp=r.ɵɵdefineComponent({type:l,selectors:[["app-input-checkbox"]],features:[r.ɵɵInheritDefinitionFeature],decls:13,vars:6,consts:[[1,"form-group"],[1,"form-check"],["type","checkbox",1,"form-check-input",3,"formControl","blur"],[1,"form-check-label"],["class","form-text text-muted",4,"ngIf"],[1,"form-text","text-muted"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"input",2),r.ɵɵlistener("blur",(function(){return t.onBlurInternal()})),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"label",3),r.ɵɵtext(7),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵtemplate(10,s,2,2,"small",4),r.ɵɵtext(11,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n")),2&e&&(r.ɵɵadvance(4),r.ɵɵproperty("formControl",t.internalControl),r.ɵɵattribute("id",t.controlId)("aria-describedby",t.describedById),r.ɵɵadvance(2),r.ɵɵattribute("for",t.controlId),r.ɵɵadvance(1),r.ɵɵtextInterpolate(t.label),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",t.showDescribedBy))},directives:[o.CheckboxControlValueAccessor,o.NgControlStatus,o.FormControlDirective,a.NgIf],encapsulation:2})},3867:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InputTextReadOnlyComponent=void 0;n(73828);const i=n(32621),r=n(73828),o=n(57490),a=n(8863),s=n(99729);function l(e,t){if(1&e){const e=i.ɵɵgetCurrentView();i.ɵɵelementStart(0,"div",4),i.ɵɵtext(1,"\n "),i.ɵɵelementStart(2,"button",5),i.ɵɵlistener("click",(function(){i.ɵɵrestoreView(e);const t=i.ɵɵnextContext();return t.launchUri(t.controlValue)})),i.ɵɵpipe(3,"i18n"),i.ɵɵtext(4,"\n "),i.ɵɵelement(5,"i",6),i.ɵɵtext(6,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(7,"\n "),i.ɵɵelementEnd()}2&e&&(i.ɵɵadvance(2),i.ɵɵpropertyInterpolate("appA11yTitle",i.ɵɵpipeBind1(3,1,"launch")))}function c(e,t){if(1&e){const e=i.ɵɵgetCurrentView();i.ɵɵelementStart(0,"div",4),i.ɵɵtext(1,"\n "),i.ɵɵelementStart(2,"button",5),i.ɵɵlistener("click",(function(){i.ɵɵrestoreView(e);const t=i.ɵɵnextContext();return t.copy(t.controlValue)})),i.ɵɵpipe(3,"i18n"),i.ɵɵtext(4,"\n "),i.ɵɵelement(5,"i",7),i.ɵɵtext(6,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(7,"\n "),i.ɵɵelementEnd()}2&e&&(i.ɵɵadvance(2),i.ɵɵpropertyInterpolate("appA11yTitle",i.ɵɵpipeBind1(3,1,"copyValue")))}class d{constructor(e){this.platformUtilsService=e,this.showCopy=!0,this.showLaunch=!1}copy(e){this.platformUtilsService.copyToClipboard(e)}launchUri(e){this.platformUtilsService.launchUri(e)}}t.InputTextReadOnlyComponent=d,d.ɵfac=function(e){return new(e||d)(i.ɵɵdirectiveInject(r.PlatformUtilsService))},d.ɵcmp=i.ɵɵdefineComponent({type:d,selectors:[["app-input-text-readonly"]],inputs:{controlValue:"controlValue",label:"label",showCopy:"showCopy",showLaunch:"showLaunch"},decls:15,vars:4,consts:[[1,"form-group"],[1,"input-group"],["readonly","",1,"form-control",3,"value"],["class","input-group-append",4,"ngIf"],[1,"input-group-append"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-external-link"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-clone"]],template:function(e,t){1&e&&(i.ɵɵelementStart(0,"div",0),i.ɵɵtext(1,"\n "),i.ɵɵelementStart(2,"label"),i.ɵɵtext(3),i.ɵɵelementEnd(),i.ɵɵtext(4,"\n "),i.ɵɵelementStart(5,"div",1),i.ɵɵtext(6,"\n "),i.ɵɵelement(7,"input",2),i.ɵɵtext(8,"\n "),i.ɵɵtemplate(9,l,8,3,"div",3),i.ɵɵtext(10,"\n "),i.ɵɵtemplate(11,c,8,3,"div",3),i.ɵɵtext(12,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(13,"\n"),i.ɵɵelementEnd(),i.ɵɵtext(14,"\n")),2&e&&(i.ɵɵadvance(3),i.ɵɵtextInterpolate(t.label),i.ɵɵadvance(4),i.ɵɵproperty("value",t.controlValue),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",t.showLaunch),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",t.showCopy))},directives:[o.NgIf,a.A11yTitleDirective],pipes:[s.I18nPipe],encapsulation:2})},874:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InputTextComponent=void 0;const i=n(16653),r=n(32621),o=n(57490),a=n(96832),s=n(99729);function l(e,t){1&e&&(r.ɵɵelementStart(0,"small",4),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("(",r.ɵɵpipeBind1(2,1,"required"),")"))}function c(e,t){if(1&e&&(r.ɵɵelementStart(0,"small",7),r.ɵɵtext(1),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",e.helperText,"\n ")}}function d(e,t){if(1&e&&(r.ɵɵelementStart(0,"small",8),r.ɵɵtext(1,"\n "),r.ɵɵelement(2,"i",9),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"span",10),r.ɵɵtext(5),r.ɵɵpipe(6,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(7),r.ɵɵpipe(8,"i18n"),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(5),r.ɵɵtextInterpolate1("",r.ɵɵpipeBind1(6,2,"error"),":"),r.ɵɵadvance(2),r.ɵɵtextInterpolate1("\n ",e.controlDir.control.hasError(e.helperTextSameAsError)?e.helperText:r.ɵɵpipeBind2(8,4,"fieldRequiredError",e.label),"\n ")}}function p(e,t){if(1&e&&(r.ɵɵelementStart(0,"div"),r.ɵɵtext(1,"\n "),r.ɵɵtemplate(2,c,2,1,"small",5),r.ɵɵtext(3,"\n "),r.ɵɵtemplate(4,d,9,7,"small",6),r.ɵɵtext(5,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵattribute("id",e.describedById),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",null!=e.helperText&&!e.controlDir.control.hasError(e.helperTextSameAsError)),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.controlDir.control.hasError("required"))}}class u extends i.BaseCvaComponent{constructor(){super(...arguments),this.stripSpaces=!1,this.transformValue=null,this.onValueChangesInternal=e=>{let t=e;null!=this.transformValue&&(t=this.transformValue(e),this.internalControl.setValue(t,{emitEvent:!1})),this.onChange(t)}}ngOnInit(){super.ngOnInit(),this.stripSpaces&&(this.transformValue=this.doStripSpaces)}writeValue(e){this.internalControl.setValue(null==e?"":e)}onValueChangeInternal(e){let t=e;null!=this.transformValue&&(t=this.transformValue(e),this.internalControl.setValue(t,{emitEvent:!1}))}doStripSpaces(e){return e.replace(/ /g,"")}}t.InputTextComponent=u,u.ɵfac=function(){let e;return function(t){return(e||(e=r.ɵɵgetInheritedFactory(u)))(t||u)}}(),u.ɵcmp=r.ɵɵdefineComponent({type:u,selectors:[["app-input-text","label","","controlId",""]],inputs:{helperTextSameAsError:"helperTextSameAsError",requiredErrorMessage:"requiredErrorMessage",stripSpaces:"stripSpaces"},features:[r.ɵɵInheritDefinitionFeature],attrs:["label","","controlId",""],decls:12,vars:8,consts:[[1,"form-group"],["class","text-muted form-text d-inline",4,"ngIf"],[1,"form-control",3,"formControl","blur"],[4,"ngIf"],[1,"text-muted","form-text","d-inline"],["class","form-text text-muted",4,"ngIf"],["class","error-inline","role","alert",4,"ngIf"],[1,"form-text","text-muted"],["role","alert",1,"error-inline"],["aria-hidden","true",1,"bwi","bwi-exclamation-circle"],[1,"sr-only"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"label"),r.ɵɵtext(3),r.ɵɵtemplate(4,l,3,3,"small",1),r.ɵɵtext(5,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"input",2),r.ɵɵlistener("blur",(function(){return t.onBlurInternal()})),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵtemplate(9,p,6,3,"div",3),r.ɵɵtext(10,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n")),2&e&&(r.ɵɵadvance(2),r.ɵɵattribute("for",t.controlId),r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",t.label,"\n "),r.ɵɵadvance(1),r.ɵɵproperty("ngIf",t.isRequired),r.ɵɵadvance(3),r.ɵɵproperty("formControl",t.internalControl),r.ɵɵattribute("id",t.controlId)("aria-describedby",t.describedById)("aria-invalid",t.controlDir.control.invalid),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.showDescribedBy))},directives:[o.NgIf,a.DefaultValueAccessor,a.NgControlStatus,a.FormControlDirective],pipes:[s.I18nPipe],encapsulation:2})},60528:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectComponent=void 0;const i=n(16653),r=n(32621),o=n(57490),a=n(96832),s=n(99729);function l(e,t){1&e&&(r.ɵɵelementStart(0,"small",4),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("(",r.ɵɵpipeBind1(2,1,"required"),")"))}function c(e,t){if(1&e&&(r.ɵɵelementStart(0,"option",5),r.ɵɵtext(1),r.ɵɵelementEnd()),2&e){const e=t.$implicit;r.ɵɵpropertyInterpolate("disabled",e.disabled),r.ɵɵproperty("ngValue",e.value),r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}class d extends i.BaseCvaComponent{}t.SelectComponent=d,d.ɵfac=function(){let e;return function(t){return(e||(e=r.ɵɵgetInheritedFactory(d)))(t||d)}}(),d.ɵcmp=r.ɵɵdefineComponent({type:d,selectors:[["app-select"]],inputs:{selectOptions:"selectOptions"},features:[r.ɵɵInheritDefinitionFeature],decls:13,vars:7,consts:[[1,"form-group"],["class","text-muted form-text d-inline",4,"ngIf"],[1,"form-control",3,"formControl","blur"],[3,"ngValue","disabled",4,"ngFor","ngForOf"],[1,"text-muted","form-text","d-inline"],[3,"ngValue","disabled"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"label"),r.ɵɵtext(3),r.ɵɵtemplate(4,l,3,3,"small",1),r.ɵɵtext(5,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"select",2),r.ɵɵlistener("blur",(function(){return t.onBlurInternal()})),r.ɵɵtext(8,"\n "),r.ɵɵtemplate(9,c,2,3,"option",3),r.ɵɵtext(10,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n")),2&e&&(r.ɵɵadvance(2),r.ɵɵattribute("for",t.controlId),r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",t.label,"\n "),r.ɵɵadvance(1),r.ɵɵproperty("ngIf",t.isRequired),r.ɵɵadvance(3),r.ɵɵproperty("formControl",t.internalControl),r.ɵɵattribute("id",t.controlId)("aria-invalid",t.controlDir.control.invalid),r.ɵɵadvance(2),r.ɵɵproperty("ngForOf",t.selectOptions))},directives:[o.NgIf,a.SelectControlValueAccessor,a.NgControlStatus,a.FormControlDirective,o.NgForOf,a.NgSelectOption,a.ɵNgSelectMultipleOption],pipes:[s.I18nPipe],encapsulation:2})},19213:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SsoComponent=void 0;const r=n(96832),o=(n(68012),n(89924)),a=(n(91674),n(51554),n(63513),n(73828),n(37084)),s=n(82769),l=n(21021),c=n(20577),d=n(56259),p=n(32621),u=n(96832),m=n(68012),h=n(91674),v=n(73828),f=n(51554),g=n(63513),y=n(57490),x=n(56820),S=n(64897),b=n(8863),w=n(60528),C=n(51626),I=n(5495),E=n(24006),P=n(3867),O=n(874),k=n(1142),A=n(99729);function T(e,t){1&e&&(p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"i",3),p.ɵɵpipe(3,"i18n"),p.ɵɵtext(4,"\n "),p.ɵɵelementStart(5,"span",4),p.ɵɵtext(6),p.ɵɵpipe(7,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(8,"\n"),p.ɵɵelementContainerEnd()),2&e&&(p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(3,2,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(7,4,"loading")))}function M(e,t){1&e&&(p.ɵɵelement(0,"i",21),p.ɵɵpipe(1,"i18n")),2&e&&p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(1,1,"loading"))}function B(e,t){1&e&&(p.ɵɵelementStart(0,"span"),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(2,1,"keyConnectorTest"),"\n "))}function D(e,t){1&e&&(p.ɵɵelementStart(0,"small",35),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"i",36),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"span",4),p.ɵɵtext(5),p.ɵɵpipe(6,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(7),p.ɵɵpipe(8,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(5),p.ɵɵtextInterpolate1("",p.ɵɵpipeBind1(6,2,"error"),":"),p.ɵɵadvance(2),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(8,4,"keyConnectorTestFail"),"\n "))}function R(e,t){1&e&&(p.ɵɵtext(0,"\n "),p.ɵɵelementStart(1,"small",37),p.ɵɵtext(2,"\n "),p.ɵɵelement(3,"i",38),p.ɵɵtext(4),p.ɵɵpipe(5,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(6,"\n ")),2&e&&(p.ɵɵadvance(4),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(5,1,"keyConnectorTestSuccess"),"\n "))}function F(e,t){if(1&e&&(p.ɵɵelementStart(0,"div",32),p.ɵɵtext(1,"\n "),p.ɵɵtemplate(2,D,9,6,"small",33),p.ɵɵtext(3,"\n "),p.ɵɵtemplate(4,R,7,3,"ng-template",null,34,p.ɵɵtemplateRefExtractor),p.ɵɵtext(6,"\n "),p.ɵɵelementEnd()),2&e){const e=p.ɵɵreference(5),t=p.ɵɵnextContext(3);p.ɵɵadvance(2),p.ɵɵproperty("ngIf",t.keyConnectorUrl.hasError("invalidUrl"))("ngIfElse",e)}}function U(e,t){if(1&e){const e=p.ɵɵgetCurrentView();p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"app-callout",23),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(5,"\n\n "),p.ɵɵelementStart(6,"div",9),p.ɵɵtext(7,"\n "),p.ɵɵelementStart(8,"label",24),p.ɵɵtext(9),p.ɵɵpipe(10,"i18n"),p.ɵɵelementStart(11,"small",25),p.ɵɵtext(12),p.ɵɵpipe(13,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(14,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(15,"\n "),p.ɵɵelementStart(16,"div",26),p.ɵɵtext(17,"\n "),p.ɵɵelementStart(18,"input",27),p.ɵɵlistener("change",(function(){p.ɵɵrestoreView(e);return p.ɵɵnextContext(2).haveTestedKeyConnector=!1})),p.ɵɵelementEnd(),p.ɵɵtext(19,"\n "),p.ɵɵelementStart(20,"div",28),p.ɵɵtext(21,"\n "),p.ɵɵelementStart(22,"button",29),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(e);return p.ɵɵnextContext(2).validateKeyConnectorUrl()})),p.ɵɵtext(23,"\n "),p.ɵɵtemplate(24,M,2,3,"i",30),p.ɵɵtext(25,"\n "),p.ɵɵtemplate(26,B,3,3,"span",1),p.ɵɵtext(27,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(28,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(29,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(30,"\n "),p.ɵɵtemplate(31,F,7,2,"div",31),p.ɵɵtext(32,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(33,"\n "),p.ɵɵelementContainerEnd()}if(2&e){const e=p.ɵɵnextContext(2);p.ɵɵadvance(2),p.ɵɵproperty("useAlertRole",!0),p.ɵɵadvance(1),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(4,8,"keyConnectorWarning"),"\n "),p.ɵɵadvance(6),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(10,10,"keyConnectorUrl"),"\n "),p.ɵɵadvance(3),p.ɵɵtextInterpolate1("(",p.ɵɵpipeBind1(13,12,"required"),")"),p.ɵɵadvance(10),p.ɵɵproperty("disabled",!e.enableTestKeyConnector),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",e.keyConnectorUrl.pending),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!e.keyConnectorUrl.pending),p.ɵɵadvance(5),p.ɵɵproperty("ngIf",e.haveTestedKeyConnector)}}const V=function(e,t){return{"bwi-angle-down":e,"bwi-chevron-up":t}};function N(e,t){if(1&e){const e=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"div",39),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"div",40),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"h2",41),p.ɵɵtext(5),p.ɵɵpipe(6,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(7,"\n\n "),p.ɵɵelement(8,"app-input-text-readonly",42),p.ɵɵpipe(9,"i18n"),p.ɵɵtext(10,"\n\n "),p.ɵɵelement(11,"app-input-text-readonly",42),p.ɵɵpipe(12,"i18n"),p.ɵɵtext(13,"\n\n "),p.ɵɵelement(14,"app-input-text",43),p.ɵɵpipe(15,"i18n"),p.ɵɵtext(16,"\n\n "),p.ɵɵelement(17,"app-input-text",44),p.ɵɵpipe(18,"i18n"),p.ɵɵtext(19,"\n\n "),p.ɵɵelement(20,"app-input-text",45),p.ɵɵpipe(21,"i18n"),p.ɵɵtext(22,"\n\n "),p.ɵɵelement(23,"app-input-text",46),p.ɵɵpipe(24,"i18n"),p.ɵɵpipe(25,"i18n"),p.ɵɵtext(26,"\n\n "),p.ɵɵelementStart(27,"app-select",47),p.ɵɵpipe(28,"i18n"),p.ɵɵtext(29,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(30,"\n\n "),p.ɵɵelement(31,"app-input-checkbox",48),p.ɵɵpipe(32,"i18n"),p.ɵɵtext(33,"\n\n "),p.ɵɵtext(34,"\n "),p.ɵɵelementStart(35,"div",49),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(e);return p.ɵɵnextContext(2).toggleOpenIdCustomizations()})),p.ɵɵtext(36,"\n "),p.ɵɵelementStart(37,"h3",50),p.ɵɵtext(38),p.ɵɵpipe(39,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(40,"\n "),p.ɵɵelementStart(41,"button",51),p.ɵɵtext(42,"\n "),p.ɵɵelement(43,"i",52),p.ɵɵtext(44,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(45,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(46,"\n "),p.ɵɵelementStart(47,"div",53),p.ɵɵtext(48,"\n "),p.ɵɵelement(49,"app-input-text",54),p.ɵɵpipe(50,"i18n"),p.ɵɵpipe(51,"i18n"),p.ɵɵtext(52,"\n\n "),p.ɵɵelement(53,"app-input-text",55),p.ɵɵpipe(54,"i18n"),p.ɵɵpipe(55,"i18n"),p.ɵɵtext(56,"\n\n "),p.ɵɵelement(57,"app-input-text",56),p.ɵɵpipe(58,"i18n"),p.ɵɵpipe(59,"i18n"),p.ɵɵtext(60,"\n\n "),p.ɵɵelement(61,"app-input-text",57),p.ɵɵpipe(62,"i18n"),p.ɵɵpipe(63,"i18n"),p.ɵɵtext(64,"\n\n "),p.ɵɵelement(65,"app-input-text",58),p.ɵɵpipe(66,"i18n"),p.ɵɵtext(67,"\n\n "),p.ɵɵelement(68,"app-input-text",59),p.ɵɵpipe(69,"i18n"),p.ɵɵtext(70,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(71,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(72,"\n "),p.ɵɵelementEnd()}if(2&e){const e=p.ɵɵnextContext(2);p.ɵɵproperty("formGroup",e.openIdForm),p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(6,32,"openIdConnectConfig")),p.ɵɵadvance(3),p.ɵɵproperty("label",p.ɵɵpipeBind1(9,34,"callbackPath"))("controlValue",e.callbackPath),p.ɵɵadvance(3),p.ɵɵproperty("label",p.ɵɵpipeBind1(12,36,"signedOutCallbackPath"))("controlValue",e.signedOutCallbackPath),p.ɵɵadvance(3),p.ɵɵproperty("label",p.ɵɵpipeBind1(15,38,"authority"))("stripSpaces",!0),p.ɵɵadvance(3),p.ɵɵproperty("label",p.ɵɵpipeBind1(18,40,"clientId"))("stripSpaces",!0),p.ɵɵadvance(3),p.ɵɵproperty("label",p.ɵɵpipeBind1(21,42,"clientSecret"))("stripSpaces",!0),p.ɵɵadvance(3),p.ɵɵproperty("label",p.ɵɵpipeBind1(24,44,"metadataAddress"))("stripSpaces",!0)("helperText",p.ɵɵpipeBind1(25,46,"openIdAuthorityRequired")),p.ɵɵadvance(4),p.ɵɵproperty("label",p.ɵɵpipeBind1(28,48,"oidcRedirectBehavior"))("selectOptions",e.connectRedirectOptions),p.ɵɵadvance(4),p.ɵɵproperty("label",p.ɵɵpipeBind1(32,50,"getClaimsFromUserInfoEndpoint")),p.ɵɵadvance(7),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(39,52,"openIdOptionalCustomizations"),"\n "),p.ɵɵadvance(3),p.ɵɵattribute("aria-expanded",e.showOpenIdCustomizations),p.ɵɵadvance(2),p.ɵɵproperty("ngClass",p.ɵɵpureFunction2(74,V,!e.showOpenIdCustomizations,e.showOpenIdCustomizations)),p.ɵɵadvance(4),p.ɵɵproperty("hidden",!e.showOpenIdCustomizations),p.ɵɵadvance(2),p.ɵɵproperty("label",p.ɵɵpipeBind1(50,54,"additionalScopes"))("helperText",p.ɵɵpipeBind1(51,56,"separateMultipleWithComma")),p.ɵɵadvance(4),p.ɵɵproperty("label",p.ɵɵpipeBind1(54,58,"additionalUserIdClaimTypes"))("helperText",p.ɵɵpipeBind1(55,60,"separateMultipleWithComma")),p.ɵɵadvance(4),p.ɵɵproperty("label",p.ɵɵpipeBind1(58,62,"additionalEmailClaimTypes"))("helperText",p.ɵɵpipeBind1(59,64,"separateMultipleWithComma")),p.ɵɵadvance(4),p.ɵɵproperty("label",p.ɵɵpipeBind1(62,66,"additionalNameClaimTypes"))("helperText",p.ɵɵpipeBind1(63,68,"separateMultipleWithComma")),p.ɵɵadvance(4),p.ɵɵproperty("label",p.ɵɵpipeBind1(66,70,"acrValues")),p.ɵɵadvance(3),p.ɵɵproperty("label",p.ɵɵpipeBind1(69,72,"expectedReturnAcrValue"))}}function _(e,t){1&e&&(p.ɵɵelementStart(0,"small",77),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"i",36),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"span",4),p.ɵɵtext(5),p.ɵɵpipe(6,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(7),p.ɵɵpipe(8,"i18n"),p.ɵɵpipe(9,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(5),p.ɵɵtextInterpolate1("",p.ɵɵpipeBind1(6,2,"error"),":"),p.ɵɵadvance(2),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind2(8,4,"fieldRequiredError",p.ɵɵpipeBind1(9,7,"idpX509PublicCert")),"\n "))}function j(e,t){if(1&e&&(p.ɵɵelementStart(0,"div",39),p.ɵɵtext(1,"\n "),p.ɵɵtext(2,"\n "),p.ɵɵelementStart(3,"div",40),p.ɵɵtext(4,"\n "),p.ɵɵelementStart(5,"h2",41),p.ɵɵtext(6),p.ɵɵpipe(7,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(8,"\n\n "),p.ɵɵelement(9,"app-input-text-readonly",42),p.ɵɵpipe(10,"i18n"),p.ɵɵtext(11,"\n\n "),p.ɵɵelement(12,"app-input-text-readonly",60),p.ɵɵpipe(13,"i18n"),p.ɵɵtext(14,"\n\n "),p.ɵɵelement(15,"app-input-text-readonly",42),p.ɵɵpipe(16,"i18n"),p.ɵɵtext(17,"\n\n "),p.ɵɵelementStart(18,"app-select",61),p.ɵɵpipe(19,"i18n"),p.ɵɵtext(20,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(21,"\n\n "),p.ɵɵelementStart(22,"app-select",62),p.ɵɵpipe(23,"i18n"),p.ɵɵtext(24,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(25,"\n\n "),p.ɵɵelementStart(26,"app-select",63),p.ɵɵpipe(27,"i18n"),p.ɵɵtext(28,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(29,"\n\n "),p.ɵɵelementStart(30,"app-select",64),p.ɵɵpipe(31,"i18n"),p.ɵɵtext(32,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(33,"\n\n "),p.ɵɵelement(34,"app-input-checkbox",65),p.ɵɵpipe(35,"i18n"),p.ɵɵtext(36,"\n\n "),p.ɵɵelement(37,"app-input-checkbox",66),p.ɵɵpipe(38,"i18n"),p.ɵɵtext(39,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(40,"\n\n "),p.ɵɵtext(41,"\n "),p.ɵɵelementStart(42,"div",40),p.ɵɵtext(43,"\n "),p.ɵɵelementStart(44,"h2",41),p.ɵɵtext(45),p.ɵɵpipe(46,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(47,"\n\n "),p.ɵɵelement(48,"app-input-text",67),p.ɵɵpipe(49,"i18n"),p.ɵɵtext(50,"\n\n "),p.ɵɵelementStart(51,"app-select",68),p.ɵɵpipe(52,"i18n"),p.ɵɵtext(53,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(54,"\n\n "),p.ɵɵelement(55,"app-input-text",69),p.ɵɵpipe(56,"i18n"),p.ɵɵpipe(57,"i18n"),p.ɵɵtext(58,"\n\n "),p.ɵɵelement(59,"app-input-text",70),p.ɵɵpipe(60,"i18n"),p.ɵɵtext(61,"\n\n "),p.ɵɵelementStart(62,"div",9),p.ɵɵtext(63,"\n "),p.ɵɵelementStart(64,"label",71),p.ɵɵtext(65),p.ɵɵpipe(66,"i18n"),p.ɵɵelementStart(67,"small",25),p.ɵɵtext(68),p.ɵɵpipe(69,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(70,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(71,"\n "),p.ɵɵelement(72,"textarea",72),p.ɵɵtext(73,"\n "),p.ɵɵtemplate(74,_,10,9,"small",73),p.ɵɵtext(75,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(76,"\n\n "),p.ɵɵelementStart(77,"app-select",74),p.ɵɵpipe(78,"i18n"),p.ɵɵtext(79,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(80,"\n\n "),p.ɵɵtext(81,"\n "),p.ɵɵtext(82,"\n\n "),p.ɵɵelement(83,"app-input-checkbox",75),p.ɵɵpipe(84,"i18n"),p.ɵɵtext(85,"\n\n "),p.ɵɵelement(86,"app-input-checkbox",76),p.ɵɵpipe(87,"i18n"),p.ɵɵtext(88,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(89,"\n "),p.ɵɵelementEnd()),2&e){const e=p.ɵɵnextContext(2);p.ɵɵproperty("formGroup",e.samlForm),p.ɵɵadvance(6),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(7,35,"samlSpConfig")),p.ɵɵadvance(3),p.ɵɵproperty("label",p.ɵɵpipeBind1(10,37,"spEntityId"))("controlValue",e.spEntityId),p.ɵɵadvance(3),p.ɵɵproperty("label",p.ɵɵpipeBind1(13,39,"spMetadataUrl"))("controlValue",e.spMetadataUrl)("showLaunch",!0),p.ɵɵadvance(3),p.ɵɵproperty("label",p.ɵɵpipeBind1(16,41,"spAcsUrl"))("controlValue",e.spAcsUrl),p.ɵɵadvance(3),p.ɵɵproperty("label",p.ɵɵpipeBind1(19,43,"spNameIdFormat"))("selectOptions",e.saml2NameIdFormatOptions),p.ɵɵadvance(4),p.ɵɵproperty("label",p.ɵɵpipeBind1(23,45,"spOutboundSigningAlgorithm"))("selectOptions",e.samlSigningAlgorithmOptions),p.ɵɵadvance(4),p.ɵɵproperty("label",p.ɵɵpipeBind1(27,47,"spSigningBehavior"))("selectOptions",e.saml2SigningBehaviourOptions),p.ɵɵadvance(4),p.ɵɵproperty("label",p.ɵɵpipeBind1(31,49,"spMinIncomingSigningAlgorithm"))("selectOptions",e.samlSigningAlgorithmOptions),p.ɵɵadvance(4),p.ɵɵproperty("label",p.ɵɵpipeBind1(35,51,"spWantAssertionsSigned")),p.ɵɵadvance(3),p.ɵɵproperty("label",p.ɵɵpipeBind1(38,53,"spValidateCertificates")),p.ɵɵadvance(8),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(46,55,"samlIdpConfig")),p.ɵɵadvance(3),p.ɵɵproperty("label",p.ɵɵpipeBind1(49,57,"idpEntityId")),p.ɵɵadvance(3),p.ɵɵproperty("label",p.ɵɵpipeBind1(52,59,"idpBindingType"))("selectOptions",e.saml2BindingTypeOptions),p.ɵɵadvance(4),p.ɵɵproperty("label",p.ɵɵpipeBind1(56,61,"idpSingleSignOnServiceUrl"))("helperText",p.ɵɵpipeBind1(57,63,"idpSingleSignOnServiceUrlRequired"))("stripSpaces",!0),p.ɵɵadvance(4),p.ɵɵproperty("label",p.ɵɵpipeBind1(60,65,"idpSingleLogoutServiceUrl"))("stripSpaces",!0),p.ɵɵadvance(6),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(66,67,"idpX509PublicCert"),"\n "),p.ɵɵadvance(3),p.ɵɵtextInterpolate1("(",p.ɵɵpipeBind1(69,69,"required"),")"),p.ɵɵadvance(6),p.ɵɵproperty("ngIf",e.samlForm.get("idpX509PublicCert").hasError("required")),p.ɵɵadvance(3),p.ɵɵproperty("label",p.ɵɵpipeBind1(78,71,"idpOutboundSigningAlgorithm"))("selectOptions",e.samlSigningAlgorithmOptions),p.ɵɵadvance(6),p.ɵɵproperty("label",p.ɵɵpipeBind1(84,73,"idpAllowOutboundLogoutRequests")),p.ɵɵadvance(3),p.ɵɵproperty("label",p.ɵɵpipeBind1(87,75,"idpSignAuthenticationRequests"))}}function z(e,t){if(1&e&&(p.ɵɵelementStart(0,"div",78),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"i",36),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"span",4),p.ɵɵtext(5),p.ɵɵpipe(6,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(7),p.ɵɵpipe(8,"i18n"),p.ɵɵelementEnd()),2&e){const e=t.ngIf;p.ɵɵadvance(5),p.ɵɵtextInterpolate1("",p.ɵɵpipeBind1(6,2,"error"),":"),p.ɵɵadvance(2),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind2(8,4,1===e?"formErrorSummarySingle":"formErrorSummaryPlural",e),"\n ")}}function H(e,t){if(1&e){const e=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"form",5,6),p.ɵɵlistener("ngSubmit",(function(){p.ɵɵrestoreView(e);return p.ɵɵnextContext().submit()})),p.ɵɵtext(2,"\n "),p.ɵɵelementStart(3,"p"),p.ɵɵtext(4),p.ɵɵpipe(5,"i18n"),p.ɵɵelementStart(6,"a",7),p.ɵɵtext(7),p.ɵɵpipe(8,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(9),p.ɵɵpipe(10,"i18n"),p.ɵɵelement(11,"br"),p.ɵɵtext(12),p.ɵɵpipe(13,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(14,"\n\n "),p.ɵɵtext(15,"\n "),p.ɵɵelementContainerStart(16),p.ɵɵtext(17,"\n "),p.ɵɵelement(18,"app-input-checkbox",8),p.ɵɵpipe(19,"i18n"),p.ɵɵpipe(20,"i18n"),p.ɵɵtext(21,"\n\n "),p.ɵɵelementStart(22,"div",9),p.ɵɵtext(23,"\n "),p.ɵɵelementStart(24,"label"),p.ɵɵtext(25),p.ɵɵpipe(26,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(27,"\n "),p.ɵɵelementStart(28,"div",10),p.ɵɵtext(29,"\n "),p.ɵɵelement(30,"input",11),p.ɵɵtext(31,"\n "),p.ɵɵelementStart(32,"label",12),p.ɵɵtext(33),p.ɵɵpipe(34,"i18n"),p.ɵɵelementStart(35,"small"),p.ɵɵtext(36),p.ɵɵpipe(37,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(38,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(39,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(40,"\n "),p.ɵɵelementStart(41,"div",13),p.ɵɵtext(42,"\n "),p.ɵɵelement(43,"input",14),p.ɵɵtext(44,"\n "),p.ɵɵelementStart(45,"label",15),p.ɵɵtext(46),p.ɵɵpipe(47,"i18n"),p.ɵɵelementStart(48,"a",16),p.ɵɵpipe(49,"i18n"),p.ɵɵtext(50,"\n "),p.ɵɵelement(51,"i",17),p.ɵɵtext(52,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(53,"\n "),p.ɵɵelementStart(54,"small"),p.ɵɵtext(55),p.ɵɵpipe(56,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(57,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(58,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(59,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(60,"\n\n "),p.ɵɵtext(61,"\n "),p.ɵɵtemplate(62,U,34,14,"ng-container",1),p.ɵɵtext(63,"\n\n "),p.ɵɵelementStart(64,"app-select",18),p.ɵɵpipe(65,"i18n"),p.ɵɵtext(66,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(67,"\n "),p.ɵɵelementContainerEnd(),p.ɵɵtext(68,"\n\n "),p.ɵɵtext(69,"\n "),p.ɵɵtemplate(70,N,73,77,"div",19),p.ɵɵtext(71,"\n\n "),p.ɵɵtext(72,"\n "),p.ɵɵtemplate(73,j,90,77,"div",19),p.ɵɵtext(74,"\n\n "),p.ɵɵelementStart(75,"button",20),p.ɵɵtext(76,"\n "),p.ɵɵelement(77,"i",21),p.ɵɵpipe(78,"i18n"),p.ɵɵtext(79,"\n "),p.ɵɵelementStart(80,"span"),p.ɵɵtext(81),p.ɵɵpipe(82,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(83,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(84,"\n "),p.ɵɵtemplate(85,z,9,7,"div",22),p.ɵɵtext(86,"\n"),p.ɵɵelementEnd()}if(2&e){const e=p.ɵɵreference(1),t=p.ɵɵnextContext();p.ɵɵproperty("formGroup",t.ssoConfigForm)("appApiAction",t.formPromise),p.ɵɵadvance(4),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(5,27,"ssoPolicyHelpStart"),"\n "),p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(8,29,"ssoPolicyHelpLink")),p.ɵɵadvance(2),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(10,31,"ssoPolicyHelpEnd"),"\n "),p.ɵɵadvance(3),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(13,33,"ssoPolicyHelpKeyConnector"),"\n "),p.ɵɵadvance(6),p.ɵɵproperty("formControl",t.enabled)("label",p.ɵɵpipeBind1(19,35,"allowSso"))("helperText",p.ɵɵpipeBind1(20,37,"allowSsoDesc")),p.ɵɵadvance(7),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(26,39,"memberDecryptionOption")),p.ɵɵadvance(5),p.ɵɵproperty("value",!1),p.ɵɵadvance(3),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(34,41,"masterPass"),"\n "),p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(37,43,"memberDecryptionPassDesc")),p.ɵɵadvance(7),p.ɵɵproperty("value",!0),p.ɵɵattribute("disabled",!t.organization.useKeyConnector||null),p.ɵɵadvance(3),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(47,45,"keyConnector"),"\n "),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(49,47,"learnMore")),p.ɵɵadvance(7),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(56,49,"memberDecryptionKeyConnectorDesc")),p.ɵɵadvance(7),p.ɵɵproperty("ngIf",t.ssoConfigForm.get("keyConnectorEnabled").value),p.ɵɵadvance(2),p.ɵɵproperty("label",p.ɵɵpipeBind1(65,51,"type"))("selectOptions",t.ssoTypeOptions),p.ɵɵadvance(6),p.ɵɵproperty("ngIf",t.ssoConfigForm.get("configType").value===t.ssoType.OpenIdConnect),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",t.ssoConfigForm.get("configType").value===t.ssoType.Saml2),p.ɵɵadvance(2),p.ɵɵproperty("disabled",e.loading),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(78,53,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(82,55,"save")),p.ɵɵadvance(4),p.ɵɵproperty("ngIf",t.getErrorCount(t.ssoConfigForm))}}const L="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256";class K{constructor(e,t,n,i,r,s){this.formBuilder=e,this.route=t,this.apiService=n,this.platformUtilsService=i,this.i18nService=r,this.organizationService=s,this.ssoType=a.SsoType,this.ssoTypeOptions=[{name:this.i18nService.t("selectType"),value:a.SsoType.None,disabled:!0},{name:"OpenID Connect",value:a.SsoType.OpenIdConnect},{name:"SAML 2.0",value:a.SsoType.Saml2}],this.samlSigningAlgorithms=["http://www.w3.org/2001/04/xmldsig-more#rsa-sha256","http://www.w3.org/2000/09/xmldsig#rsa-sha384","http://www.w3.org/2000/09/xmldsig#rsa-sha512","http://www.w3.org/2000/09/xmldsig#rsa-sha1"],this.saml2SigningBehaviourOptions=[{name:"If IdP Wants Authn Requests Signed",value:a.Saml2SigningBehavior.IfIdpWantAuthnRequestsSigned},{name:"Always",value:a.Saml2SigningBehavior.Always},{name:"Never",value:a.Saml2SigningBehavior.Never}],this.saml2BindingTypeOptions=[{name:"Redirect",value:a.Saml2BindingType.HttpRedirect},{name:"HTTP POST",value:a.Saml2BindingType.HttpPost}],this.saml2NameIdFormatOptions=[{name:"Not Configured",value:a.Saml2NameIdFormat.NotConfigured},{name:"Unspecified",value:a.Saml2NameIdFormat.Unspecified},{name:"Email Address",value:a.Saml2NameIdFormat.EmailAddress},{name:"X.509 Subject Name",value:a.Saml2NameIdFormat.X509SubjectName},{name:"Windows Domain Qualified Name",value:a.Saml2NameIdFormat.WindowsDomainQualifiedName},{name:"Kerberos Principal Name",value:a.Saml2NameIdFormat.KerberosPrincipalName},{name:"Entity Identifier",value:a.Saml2NameIdFormat.EntityIdentifier},{name:"Persistent",value:a.Saml2NameIdFormat.Persistent},{name:"Transient",value:a.Saml2NameIdFormat.Transient}],this.connectRedirectOptions=[{name:"Redirect GET",value:a.OpenIdConnectRedirectBehavior.RedirectGet},{name:"Form POST",value:a.OpenIdConnectRedirectBehavior.FormPost}],this.showOpenIdCustomizations=!1,this.loading=!0,this.haveTestedKeyConnector=!1,this.enabled=this.formBuilder.control(!1),this.openIdForm=this.formBuilder.group({authority:["",o.dirtyRequired],clientId:["",o.dirtyRequired],clientSecret:["",o.dirtyRequired],metadataAddress:[],redirectBehavior:[a.OpenIdConnectRedirectBehavior.RedirectGet,o.dirtyRequired],getClaimsFromUserInfoEndpoint:[],additionalScopes:[],additionalUserIdClaimTypes:[],additionalEmailClaimTypes:[],additionalNameClaimTypes:[],acrValues:[],expectedReturnAcrValue:[]},{updateOn:"blur"}),this.samlForm=this.formBuilder.group({spNameIdFormat:[a.Saml2NameIdFormat.NotConfigured],spOutboundSigningAlgorithm:[L],spSigningBehavior:[a.Saml2SigningBehavior.IfIdpWantAuthnRequestsSigned],spMinIncomingSigningAlgorithm:[L],spWantAssertionsSigned:[],spValidateCertificates:[],idpEntityId:["",o.dirtyRequired],idpBindingType:[a.Saml2BindingType.HttpRedirect],idpSingleSignOnServiceUrl:[],idpSingleLogoutServiceUrl:[],idpX509PublicCert:["",o.dirtyRequired],idpOutboundSigningAlgorithm:[L],idpAllowUnsolicitedAuthnResponse:[],idpAllowOutboundLogoutRequests:[!0],idpWantAuthnRequestsSigned:[]},{updateOn:"blur"}),this.ssoConfigForm=this.formBuilder.group({configType:[a.SsoType.None],keyConnectorEnabled:[!1],keyConnectorUrl:[""],openId:this.openIdForm,saml:this.samlForm})}ngOnInit(){return i(this,void 0,void 0,(function*(){this.ssoConfigForm.get("configType").valueChanges.subscribe((e=>{e===a.SsoType.OpenIdConnect?(this.openIdForm.enable(),this.samlForm.disable()):e===a.SsoType.Saml2?(this.openIdForm.disable(),this.samlForm.enable()):(this.openIdForm.disable(),this.samlForm.disable())})),this.samlForm.get("spSigningBehavior").valueChanges.subscribe((()=>this.samlForm.get("idpX509PublicCert").updateValueAndValidity())),this.route.parent.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.organizationId=e.organizationId,yield this.load()}))))}))}load(){return i(this,void 0,void 0,(function*(){this.organization=yield this.organizationService.get(this.organizationId);const e=yield this.apiService.getOrganizationSso(this.organizationId);this.populateForm(e),this.callbackPath=e.urls.callbackPath,this.signedOutCallbackPath=e.urls.signedOutCallbackPath,this.spEntityId=e.urls.spEntityId,this.spMetadataUrl=e.urls.spMetadataUrl,this.spAcsUrl=e.urls.spAcsUrl,this.loading=!1}))}submit(){return i(this,void 0,void 0,(function*(){if(this.validateForm(this.ssoConfigForm),this.ssoConfigForm.get("keyConnectorEnabled").value&&(yield this.validateKeyConnectorUrl()),!this.ssoConfigForm.valid)return void this.readOutErrors();const e=new c.OrganizationSsoRequest;e.enabled=this.enabled.value,e.data=l.SsoConfigApi.fromView(this.ssoConfigForm.value),this.formPromise=this.apiService.postOrganizationSso(this.organizationId,e);try{const e=yield this.formPromise;this.populateForm(e),this.platformUtilsService.showToast("success",null,this.i18nService.t("ssoSettingsSaved"))}catch(t){}this.formPromise=null}))}validateKeyConnectorUrl(){return i(this,void 0,void 0,(function*(){if(!this.haveTestedKeyConnector){this.keyConnectorUrl.markAsPending();try{yield this.apiService.getKeyConnectorAlive(this.keyConnectorUrl.value),this.keyConnectorUrl.updateValueAndValidity()}catch(e){this.keyConnectorUrl.setErrors({invalidUrl:!0})}this.haveTestedKeyConnector=!0}}))}toggleOpenIdCustomizations(){this.showOpenIdCustomizations=!this.showOpenIdCustomizations}getErrorCount(e){return Object.values(e.controls).reduce(((e,t)=>t instanceof r.FormGroup?e+this.getErrorCount(t):null==t.errors?e:e+Object.keys(t.errors).length),0)}get enableTestKeyConnector(){var e;return this.ssoConfigForm.get("keyConnectorEnabled").value&&!s.Utils.isNullOrWhitespace(null===(e=this.keyConnectorUrl)||void 0===e?void 0:e.value)}get keyConnectorUrl(){return this.ssoConfigForm.get("keyConnectorUrl")}get samlSigningAlgorithmOptions(){return this.samlSigningAlgorithms.map((e=>({name:e,value:e})))}validateForm(e){Object.values(e.controls).forEach((e=>{e.disabled||(e instanceof r.FormGroup?this.validateForm(e):(e.markAsDirty(),e.markAsTouched(),e.updateValueAndValidity()))}))}populateForm(e){if(this.enabled.setValue(e.enabled),null!=e.data){const t=new d.SsoConfigView(e.data);this.ssoConfigForm.patchValue(t)}}readOutErrors(){const e=this.i18nService.t("error"),t=this.getErrorCount(this.ssoConfigForm),n=this.i18nService.t(1===t?"formErrorSummarySingle":"formErrorSummaryPlural",t.toString()),i=document.createElement("div");i.className="sr-only",i.id="srErrorCount",i.setAttribute("aria-live","polite"),i.innerText=e+": "+n;const r=document.getElementById("srErrorCount");null!=r&&r.remove(),document.body.append(i)}}t.SsoComponent=K,K.ɵfac=function(e){return new(e||K)(p.ɵɵdirectiveInject(u.FormBuilder),p.ɵɵdirectiveInject(m.ActivatedRoute),p.ɵɵdirectiveInject(h.ApiService),p.ɵɵdirectiveInject(v.PlatformUtilsService),p.ɵɵdirectiveInject(f.I18nService),p.ɵɵdirectiveInject(g.OrganizationService))},K.ɵcmp=p.ɵɵdefineComponent({type:K,selectors:[["app-org-manage-sso"]],decls:11,vars:5,consts:[[1,"page-header","d-flex"],[4,"ngIf"],[3,"formGroup","appApiAction","ngSubmit",4,"ngIf"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[3,"formGroup","appApiAction","ngSubmit"],["form",""],["routerLink","../policies"],["controlId","enabled",3,"formControl","label","helperText"],[1,"form-group"],[1,"form-check","form-check-block"],["type","radio","id","memberDecryptionPass","formControlName","keyConnectorEnabled",1,"form-check-input",3,"value"],["for","memberDecryptionPass",1,"form-check-label"],[1,"form-check","mt-2","form-check-block"],["type","radio","id","memberDecryptionKey","formControlName","keyConnectorEnabled",1,"form-check-input",3,"value"],["for","memberDecryptionKey",1,"form-check-label"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/about-key-connector/",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],["controlId","type","formControlName","configType",3,"label","selectOptions"],[3,"formGroup",4,"ngIf"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["id","errorSummary","class","error-summary text-danger",4,"ngIf"],["type","warning",3,"useAlertRole"],["for","keyConnectorUrl"],[1,"text-muted","form-text","d-inline"],[1,"input-group"],["formControlName","keyConnectorUrl","id","keyConnectorUrl","aria-describedby","keyConnectorUrlDesc","appInputStripSpaces","","appA11yInvalid","",1,"form-control",3,"change"],[1,"input-group-append"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["class","bwi bwi-spinner bwi-spin","aria-hidden","true",3,"title",4,"ngIf"],["id","keyConnectorUrlDesc","aria-live","polite",4,"ngIf"],["id","keyConnectorUrlDesc","aria-live","polite"],["class","error-inline",4,"ngIf","ngIfElse"],["keyConnectorSuccess",""],[1,"error-inline"],["aria-hidden","true",1,"bwi","bwi-exclamation-circle"],[1,"text-success"],["aria-hidden","true",1,"bwi","bwi-check-circle"],[3,"formGroup"],[1,"config-section"],[1,"secondary-header"],[3,"label","controlValue"],["controlId","authority","formControlName","authority",3,"label","stripSpaces"],["controlId","clientId","formControlName","clientId",3,"label","stripSpaces"],["controlId","clientSecret","formControlName","clientSecret",3,"label","stripSpaces"],["controlId","metadataAddress","formControlName","metadataAddress",3,"label","stripSpaces","helperText"],["controlId","redirectBehavior","formControlName","redirectBehavior",3,"label","selectOptions"],["controlId","getClaimsFromUserInfoEndpoint","formControlName","getClaimsFromUserInfoEndpoint",3,"label"],[1,"section-header","d-flex","flex-row","align-items-center","mt-3","mb-3",3,"click"],["id","customizations-header",1,"mb-0","mr-2"],["type","button","appStopClick","","role","button","aria-controls","customizations","aria-labelledby","customizations-header",1,"mb-1","btn","btn-link"],["aria-hidden","true",1,"bwi",3,"ngClass"],["id","customizations",3,"hidden"],["controlId","additionalScopes","formControlName","additionalScopes",3,"label","helperText"],["controlId","additionalUserIdClaimTypes","formControlName","additionalUserIdClaimTypes",3,"label","helperText"],["controlId","additionalEmailClaimTypes","formControlName","additionalEmailClaimTypes",3,"label","helperText"],["controlId","additionalNameClaimTypes","formControlName","additionalNameClaimTypes",3,"label","helperText"],["controlId","acrValues","helperText","acr_values","formControlName","acrValues",3,"label"],["controlId","expectedReturnAcrValue","helperText","acr_validation","formControlName","expectedReturnAcrValue",3,"label"],[3,"label","controlValue","showLaunch"],["controlId","spNameIdFormat","formControlName","spNameIdFormat",3,"label","selectOptions"],["controlId","spOutboundSigningAlgorithm","formControlName","spOutboundSigningAlgorithm",3,"label","selectOptions"],["controlId","spSigningBehavior","formControlName","spSigningBehavior",3,"label","selectOptions"],["controlId","spMinIncomingSigningAlgorithm","formControlName","spMinIncomingSigningAlgorithm",3,"label","selectOptions"],["controlId","spWantAssertionsSigned","formControlName","spWantAssertionsSigned",3,"label"],["controlId","spValidateCertificates","formControlName","spValidateCertificates",3,"label"],["controlId","idpEntityId","formControlName","idpEntityId",3,"label"],["controlId","idpBindingType","formControlName","idpBindingType",3,"label","selectOptions"],["controlId","idpSingleSignOnServiceUrl","formControlName","idpSingleSignOnServiceUrl",3,"label","helperText","stripSpaces"],["controlId","idpSingleLogoutServiceUrl","formControlName","idpSingleLogoutServiceUrl",3,"label","stripSpaces"],["for","idpX509PublicCert"],["formControlName","idpX509PublicCert","rows","6","id","idpX509PublicCert","appA11yInvalid","","aria-describedby","idpX509PublicCertDesc",1,"form-control","form-control-sm","text-monospace"],["id","idpX509PublicCertDesc","class","error-inline","role","alert",4,"ngIf"],["controlId","idpOutboundSigningAlgorithm","formControlName","idpOutboundSigningAlgorithm",3,"label","selectOptions"],["controlId","idpAllowOutboundLogoutRequests","formControlName","idpAllowOutboundLogoutRequests",3,"label"],["controlId","idpWantAuthnRequestsSigned","formControlName","idpWantAuthnRequestsSigned",3,"label"],["id","idpX509PublicCertDesc","role","alert",1,"error-inline"],["id","errorSummary",1,"error-summary","text-danger"]],template:function(e,t){1&e&&(p.ɵɵelementStart(0,"div",0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"h1"),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(5,"\n"),p.ɵɵelementEnd(),p.ɵɵtext(6,"\n\n"),p.ɵɵtemplate(7,T,9,6,"ng-container",1),p.ɵɵtext(8,"\n\n"),p.ɵɵtemplate(9,H,87,57,"form",2),p.ɵɵtext(10,"\n")),2&e&&(p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(4,3,"singleSignOn")),p.ɵɵadvance(4),p.ɵɵproperty("ngIf",t.loading),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!t.loading))},directives:[y.NgIf,u.ɵNgNoValidate,u.NgControlStatusGroup,u.FormGroupDirective,x.ApiActionDirective,m.RouterLinkWithHref,S.InputCheckboxComponent,u.NgControlStatus,u.FormControlDirective,u.RadioControlValueAccessor,u.DefaultValueAccessor,u.FormControlName,b.A11yTitleDirective,w.SelectComponent,C.CalloutComponent,I.InputStripSpacesDirective,E.A11yInvalidDirective,P.InputTextReadOnlyComponent,O.InputTextComponent,k.StopClickDirective,y.NgClass],pipes:[A.I18nPipe],encapsulation:2})},62421:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationsRoutingModule=void 0;const i=n(68012),r=n(76299),o=n(47880),a=n(70734),s=n(45231),l=n(2021),c=n(13637),d=n(19213),p=n(32621),u=(n(68012),[{path:"organizations/:organizationId",component:s.OrganizationLayoutComponent,canActivate:[r.AuthGuard,a.PermissionsGuard],children:[{path:"manage",component:l.ManageComponent,canActivate:[a.PermissionsGuard],data:{permissions:c.NavigationPermissionsService.getPermissions("manage").concat(o.Permissions.ManageSso)},children:[{path:"sso",component:d.SsoComponent}]}]}]);class m{}t.OrganizationsRoutingModule=m,m.ɵfac=function(e){return new(e||m)},m.ɵmod=p.ɵɵdefineNgModule({type:m}),m.ɵinj=p.ɵɵdefineInjector({imports:[[i.RouterModule.forChild(u)],i.RouterModule]})},40299:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationsModule=void 0;const i=n(57490),r=n(96832),o=n(44926),a=n(62421),s=n(32621);class l{}t.OrganizationsModule=l,l.ɵfac=function(e){return new(e||l)},l.ɵmod=s.ɵɵdefineNgModule({type:l}),l.ɵinj=s.ɵɵdefineInjector({imports:[[i.CommonModule,r.FormsModule,r.ReactiveFormsModule,o.JslibModule,a.OrganizationsRoutingModule]]})},64281:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DisablePersonalVaultExportPolicyComponent=t.DisablePersonalVaultExportPolicy=void 0;const i=n(49906),r=n(81824),o=n(32621),a=n(96832),s=n(99729);class l extends r.BasePolicy{constructor(){super(...arguments),this.name="disablePersonalVaultExport",this.description="disablePersonalVaultExportDesc",this.type=i.PolicyType.DisablePersonalVaultExport,this.component=c}}t.DisablePersonalVaultExportPolicy=l;class c extends r.BasePolicyComponent{}t.DisablePersonalVaultExportPolicyComponent=c,c.ɵfac=function(){let e;return function(t){return(e||(e=o.ɵɵgetInheritedFactory(c)))(t||c)}}(),c.ɵcmp=o.ɵɵdefineComponent({type:c,selectors:[["policy-disable-personal-vault-export"]],features:[o.ɵɵInheritDefinitionFeature],decls:12,vars:4,consts:[[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"input",2),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"label",3),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n")),2&e&&(o.ɵɵadvance(4),o.ɵɵproperty("formControl",t.enabled),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,2,"enabled")))},directives:[a.CheckboxControlValueAccessor,a.NgControlStatus,a.FormControlDirective],pipes:[s.I18nPipe],encapsulation:2})},47075:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaximumVaultTimeoutPolicyComponent=t.MaximumVaultTimeoutPolicy=void 0;n(96832),n(51554);const i=n(49906),r=n(81824),o=n(32621),a=n(96832),s=n(51554),l=n(51626),c=n(99729);class d extends r.BasePolicy{constructor(){super(...arguments),this.name="maximumVaultTimeout",this.description="maximumVaultTimeoutDesc",this.type=i.PolicyType.MaximumVaultTimeout,this.component=p}}t.MaximumVaultTimeoutPolicy=d;class p extends r.BasePolicyComponent{constructor(e,t){super(),this.formBuilder=e,this.i18nService=t,this.data=this.formBuilder.group({hours:[null],minutes:[null]})}loadData(){var e;const t=null===(e=this.policyResponse.data)||void 0===e?void 0:e.minutes;null!=t&&this.data.patchValue({hours:Math.floor(t/60),minutes:t%60})}buildRequestData(){return null==this.data.value.hours&&null==this.data.value.minutes?null:{minutes:60*this.data.value.hours+this.data.value.minutes}}buildRequest(e){var t;const n=null!==(t=e.get(i.PolicyType.SingleOrg))&&void 0!==t&&t;if(this.enabled.value&&!n)throw new Error(this.i18nService.t("requireSsoPolicyReqError"));const r=this.buildRequestData();if(null==(null==r?void 0:r.minutes)||(null==r?void 0:r.minutes)<=0)throw new Error(this.i18nService.t("invalidMaximumVaultTimeout"));return super.buildRequest(e)}}t.MaximumVaultTimeoutPolicyComponent=p,p.ɵfac=function(e){return new(e||p)(o.ɵɵdirectiveInject(a.FormBuilder),o.ɵɵdirectiveInject(s.I18nService))},p.ɵcmp=o.ɵɵdefineComponent({type:p,selectors:[["policy-maximum-timeout"]],features:[o.ɵɵInheritDefinitionFeature],decls:48,vars:20,consts:[["type","tip",3,"title"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"],[3,"formGroup"],["for","hours"],[1,"row"],[1,"col-6"],["id","hours","type","number","min","0","name","hours","formControlName","hours",1,"form-control"],["id","minutes","type","number","min","0","max","59","name","minutes","formControlName","minutes",1,"form-control"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",0),o.ɵɵpipe(1,"i18n"),o.ɵɵtext(2),o.ɵɵpipe(3,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(4,"\n\n"),o.ɵɵelementStart(5,"div",1),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"div",2),o.ɵɵtext(8,"\n "),o.ɵɵelement(9,"input",3),o.ɵɵtext(10,"\n "),o.ɵɵelementStart(11,"label",4),o.ɵɵtext(12),o.ɵɵpipe(13,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n\n"),o.ɵɵelementStart(17,"div",5),o.ɵɵtext(18,"\n "),o.ɵɵelementStart(19,"div",1),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"label",6),o.ɵɵtext(22),o.ɵɵpipe(23,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵelementStart(25,"div",7),o.ɵɵtext(26,"\n "),o.ɵɵelementStart(27,"div",8),o.ɵɵtext(28,"\n "),o.ɵɵelement(29,"input",9),o.ɵɵtext(30,"\n "),o.ɵɵelementStart(31,"small"),o.ɵɵtext(32),o.ɵɵpipe(33,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(34,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(35,"\n "),o.ɵɵelementStart(36,"div",8),o.ɵɵtext(37,"\n "),o.ɵɵelement(38,"input",10),o.ɵɵtext(39,"\n "),o.ɵɵelementStart(40,"small"),o.ɵɵtext(41),o.ɵɵpipe(42,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(43,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(44,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(45,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(46,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(47,"\n")),2&e&&(o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(1,8,"prerequisite")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(3,10,"requireSsoPolicyReq"),"\n"),o.ɵɵadvance(7),o.ɵɵproperty("formControl",t.enabled),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(13,12,"enabled")),o.ɵɵadvance(5),o.ɵɵproperty("formGroup",t.data),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(23,14,"maximumVaultTimeoutLabel")),o.ɵɵadvance(10),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(33,16,"hours")),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(42,18,"minutes")))},directives:[l.CalloutComponent,a.CheckboxControlValueAccessor,a.NgControlStatus,a.FormControlDirective,a.NgControlStatusGroup,a.FormGroupDirective,a.MinValidator,a.NumberValueAccessor,a.DefaultValueAccessor,a.FormControlName,a.MaxValidator],pipes:[c.I18nPipe],encapsulation:2})},32656:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AddOrganizationComponent=void 0;const r=n(32621),o=(n(47594),n(51554),n(73828),n(68291),n(49003),n(32621)),a=n(68291),s=n(49003),l=n(51554),c=n(73828),d=n(47594),p=n(8863),u=n(57490),m=n(15370),h=n(99729);function v(e,t){1&e&&(o.ɵɵelementStart(0,"div",10),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",11),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4),o.ɵɵpipe(5,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(5,4,"loading"),"\n "))}function f(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td",14),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"app-avatar",15),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"td"),o.ɵɵtext(8),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"td"),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"button",16),o.ɵɵlistener("click",(function(){const t=o.ɵɵrestoreView(e).$implicit;return o.ɵɵnextContext(2).add(t)})),o.ɵɵtext(13,"\n Add\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=o.ɵɵnextContext(2);o.ɵɵadvance(4),o.ɵɵproperty("data",e.name)("circle",!0)("fontSize",14),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",e.name,"\n "),o.ɵɵadvance(4),o.ɵɵproperty("disabled",n.formPromise)}}function g(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"table",12),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,f,16,5,"tr",13),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(4),o.ɵɵproperty("ngForOf",e.organizations)}}class y{constructor(e,t,n,i,o){this.providerService=e,this.webProviderService=t,this.i18nService=n,this.platformUtilsService=i,this.validationService=o,this.onAddedOrganization=new r.EventEmitter,this.loading=!0}ngOnInit(){return i(this,void 0,void 0,(function*(){yield this.load()}))}load(){return i(this,void 0,void 0,(function*(){null!=this.providerId&&(this.provider=yield this.providerService.get(this.providerId),this.loading=!1)}))}add(e){return i(this,void 0,void 0,(function*(){if(this.formPromise)return;if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("addOrganizationConfirmation",e.name,this.provider.name),e.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{this.formPromise=this.webProviderService.addOrganizationToProvider(this.providerId,e.id),yield this.formPromise}catch(t){return void this.validationService.showError(t)}finally{this.formPromise=null}this.platformUtilsService.showToast("success",null,this.i18nService.t("organizationJoinedProvider")),this.onAddedOrganization.emit()}))}}t.AddOrganizationComponent=y,y.ɵfac=function(e){return new(e||y)(o.ɵɵdirectiveInject(a.ProviderService),o.ɵɵdirectiveInject(s.WebProviderService),o.ɵɵdirectiveInject(l.I18nService),o.ɵɵdirectiveInject(c.PlatformUtilsService),o.ɵɵdirectiveInject(d.ValidationService))},y.ɵcmp=o.ɵɵdefineComponent({type:y,selectors:[["provider-add-organization"]],inputs:{providerId:"providerId",organizations:"organizations"},outputs:{onAddedOrganization:"onAddedOrganization"},decls:30,vars:8,consts:[["role","dialog","aria-modal","true","aria-labelledby","addTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],[1,"modal-content"],[1,"modal-header"],["id","addTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["class","card-body text-center",4,"ngIf"],[4,"ngIf"],[1,"card-body","text-center"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[1,"table","table-hover","table-list"],[4,"ngFor","ngForOf"],["width","30"],["size","25",3,"data","circle","fontSize"],[1,"btn","btn-outline-secondary","pull-right",3,"disabled","click"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"div",2),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",3),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"h2",4),o.ɵɵtext(9),o.ɵɵpipe(10,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"button",5),o.ɵɵpipe(13,"i18n"),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"span",6),o.ɵɵtext(16,"×"),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelementStart(20,"div",7),o.ɵɵtext(21,"\n "),o.ɵɵtemplate(22,v,6,6,"div",8),o.ɵɵtext(23,"\n "),o.ɵɵtemplate(24,g,7,1,"ng-container",9),o.ɵɵtext(25,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(28,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n")),2&e&&(o.ɵɵadvance(9),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(10,4,"addExistingOrganization"),"\n "),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(13,6,"close")),o.ɵɵadvance(10),o.ɵɵproperty("ngIf",t.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!t.loading))},directives:[p.A11yTitleDirective,u.NgIf,u.NgForOf,m.AvatarComponent],pipes:[h.I18nPipe],encapsulation:2})},29063:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ClientsComponent=void 0;const r=n(32621),o=(n(68012),n(14857)),a=(n(64684),n(47594),n(91674),n(51554),n(36631),n(63513),n(73828),n(68291),n(60421),n(47937)),s=n(30185),l=(n(49003),n(32656)),c=n(32621),d=n(68012),p=n(68291),u=n(91674),m=n(60421),h=n(73828),v=n(51554),f=n(47594),g=n(49003),y=n(36631),x=n(64684),S=n(63513),b=n(96832),w=n(57490),C=n(15370),I=n(8863),E=n(1142),P=n(99729),O=n(50154),k=["add"];function A(e,t){1&e&&(c.ɵɵelementStart(0,"a",8),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",9),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,1,"newClientOrganization"),"\n "))}function T(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"button",10),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext().addExistingOrganization()})),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",9),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,1,"addExistingOrganization"),"\n "))}function M(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",11),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",12),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n"),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"loading")))}function B(e,t){1&e&&(c.ɵɵelementStart(0,"p"),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(2,1,"noClientsInList")))}function D(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"td",19),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",20),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"button",21),c.ɵɵpipe(5,"i18n"),c.ɵɵtext(6,"\n "),c.ɵɵelement(7,"i",22),c.ɵɵtext(8,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(9,"\n "),c.ɵɵelementStart(10,"div",23),c.ɵɵtext(11,"\n "),c.ɵɵelementStart(12,"a",24),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);const t=c.ɵɵnextContext().$implicit;return c.ɵɵnextContext(3).remove(t)})),c.ɵɵtext(13,"\n "),c.ɵɵelement(14,"i",25),c.ɵɵtext(15),c.ɵɵpipe(16,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(17,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(18,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(4),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(5,2,"options")),c.ɵɵadvance(11),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(16,4,"remove"),"\n "))}const R=function(e){return["/organizations",e]};function F(e,t){if(1&e&&(c.ɵɵelementStart(0,"tr"),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"td",15),c.ɵɵtext(3,"\n "),c.ɵɵelement(4,"app-avatar",16),c.ɵɵtext(5,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(6,"\n "),c.ɵɵelementStart(7,"td"),c.ɵɵtext(8,"\n "),c.ɵɵelementStart(9,"a",17),c.ɵɵtext(10),c.ɵɵelementEnd(),c.ɵɵtext(11,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(12,"\n "),c.ɵɵtemplate(13,D,20,6,"td",18),c.ɵɵtext(14,"\n "),c.ɵɵelementEnd()),2&e){const e=t.$implicit,n=c.ɵɵnextContext(3);c.ɵɵadvance(4),c.ɵɵproperty("data",e.organizationName)("circle",!0)("fontSize",14),c.ɵɵadvance(5),c.ɵɵproperty("routerLink",c.ɵɵpureFunction1(6,R,e.organizationId)),c.ɵɵadvance(1),c.ɵɵtextInterpolate(e.organizationName),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",n.manageOrganizations)}}function U(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"table",13),c.ɵɵlistener("scrolled",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).loadMore()})),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"tbody"),c.ɵɵtext(5,"\n "),c.ɵɵtemplate(6,F,15,8,"tr",14),c.ɵɵtext(7,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(9,"\n "),c.ɵɵelementContainerEnd()}if(2&e){const e=c.ɵɵnextContext().ngIf,t=c.ɵɵnextContext();c.ɵɵadvance(2),c.ɵɵproperty("infiniteScrollDistance",1)("infiniteScrollDisabled",!t.isPaging()),c.ɵɵadvance(4),c.ɵɵproperty("ngForOf",e)}}function V(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,B,3,3,"p",6),c.ɵɵtext(3,"\n "),c.ɵɵtemplate(4,U,10,3,"ng-container",6),c.ɵɵtext(5,"\n"),c.ɵɵelementContainerEnd()),2&e){const e=t.ngIf;c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!e.length),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.length)}}function N(e,t){}const _=[a.PlanType.Free,a.PlanType.FamiliesAnnually2019,a.PlanType.FamiliesAnnually];class j{constructor(e,t,n,i,r,o,a,s,l,c,d){this.route=e,this.providerService=t,this.apiService=n,this.searchService=i,this.platformUtilsService=r,this.i18nService=o,this.validationService=a,this.webProviderService=s,this.logService=l,this.modalService=c,this.organizationService=d,this.loading=!0,this.manageOrganizations=!1,this.showAddExisting=!1,this.didScroll=!1,this.pageSize=100,this.pagedClientsCount=0}ngOnInit(){return i(this,void 0,void 0,(function*(){this.route.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.providerId=e.providerId,yield this.load(),this.route.queryParams.pipe(o.first()).subscribe((e=>i(this,void 0,void 0,(function*(){this.searchText=e.search}))))}))))}))}load(){return i(this,void 0,void 0,(function*(){const e=yield this.apiService.getProviderClients(this.providerId);this.clients=null!=e.data&&e.data.length>0?e.data:[],this.manageOrganizations=(yield this.providerService.get(this.providerId)).type===s.ProviderUserType.ProviderAdmin;const t=(yield this.organizationService.getAll()).filter((e=>e.isOwner&&null==e.providerId)),n=yield Promise.all(t.map((e=>this.apiService.getOrganization(e.id)))).then((e=>e.filter((e=>!_.includes(e.planType))).map((e=>e.id))));this.addableOrganizations=t.filter((e=>n.includes(e.id))),this.showAddExisting=0!==this.addableOrganizations.length,this.loading=!1}))}isPaging(){const e=this.isSearching();return e&&this.didScroll&&this.resetPaging(),!e&&this.clients&&this.clients.length>this.pageSize}isSearching(){return this.searchService.isSearchable(this.searchText)}resetPaging(){return i(this,void 0,void 0,(function*(){this.pagedClients=[],this.loadMore()}))}loadMore(){if(!this.clients||this.clients.length<=this.pageSize)return;const e=this.pagedClients.length;let t=this.pageSize;0===e&&this.pagedClientsCount>this.pageSize&&(t=this.pagedClientsCount),this.clients.length>e&&(this.pagedClients=this.pagedClients.concat(this.clients.slice(e,e+t))),this.pagedClientsCount=this.pagedClients.length,this.didScroll=this.pagedClients.length>this.pageSize}addExistingOrganization(){return i(this,void 0,void 0,(function*(){const[e]=yield this.modalService.openViewRef(l.AddOrganizationComponent,this.addModalRef,(t=>{t.providerId=this.providerId,t.organizations=this.addableOrganizations,t.onAddedOrganization.subscribe((()=>i(this,void 0,void 0,(function*(){try{yield this.load(),e.close()}catch(t){this.logService.error(`Handled exception: ${t}`)}}))))}))}))}remove(e){return i(this,void 0,void 0,(function*(){if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("detachOrganizationConfirmation"),e.organizationName,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;this.actionPromise=this.webProviderService.detachOrganizastion(this.providerId,e.id);try{yield this.actionPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("detachedOrganization",e.organizationName)),yield this.load()}catch(t){this.validationService.showError(t)}this.actionPromise=null}))}}t.ClientsComponent=j,j.ɵfac=function(e){return new(e||j)(c.ɵɵdirectiveInject(d.ActivatedRoute),c.ɵɵdirectiveInject(p.ProviderService),c.ɵɵdirectiveInject(u.ApiService),c.ɵɵdirectiveInject(m.SearchService),c.ɵɵdirectiveInject(h.PlatformUtilsService),c.ɵɵdirectiveInject(v.I18nService),c.ɵɵdirectiveInject(f.ValidationService),c.ɵɵdirectiveInject(g.WebProviderService),c.ɵɵdirectiveInject(y.LogService),c.ɵɵdirectiveInject(x.ModalService),c.ɵɵdirectiveInject(S.OrganizationService))},j.ɵcmp=c.ɵɵdefineComponent({type:j,selectors:[["ng-component"]],viewQuery:function(e,t){if(1&e&&c.ɵɵviewQuery(k,7,r.ViewContainerRef),2&e){let e;c.ɵɵqueryRefresh(e=c.ɵɵloadQuery())&&(t.addModalRef=e.first)}},decls:32,vars:19,consts:[[1,"page-header","d-flex"],[1,"ml-auto","d-flex"],["for","search",1,"sr-only"],["type","search","id","search",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange"],["class","btn btn-sm btn-outline-primary ml-3","routerLink","create",4,"ngIf"],["class","btn btn-sm btn-outline-primary ml-3",3,"click",4,"ngIf"],[4,"ngIf"],["add",""],["routerLink","create",1,"btn","btn-sm","btn-outline-primary","ml-3"],["aria-hidden","true",1,"bwi","bwi-plus","bwi-fw"],[1,"btn","btn-sm","btn-outline-primary","ml-3",3,"click"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["infiniteScroll","",1,"table","table-hover","table-list",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled"],[4,"ngFor","ngForOf"],["width","30"],["size","25",3,"data","circle","fontSize"],[3,"routerLink"],["class","table-list-options",4,"ngIf"],[1,"table-list-options"],["appListDropdown","",1,"dropdown"],["type","button","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-cog","bwi-lg"],[1,"dropdown-menu","dropdown-menu-right"],["href","#","appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-close"]],template:function(e,t){1&e&&(c.ɵɵelementStart(0,"div",0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"h1"),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n\n "),c.ɵɵelementStart(6,"div",1),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"div"),c.ɵɵtext(9,"\n "),c.ɵɵelementStart(10,"label",2),c.ɵɵtext(11),c.ɵɵpipe(12,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"input",3),c.ɵɵlistener("ngModelChange",(function(e){return t.searchText=e})),c.ɵɵpipe(15,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(16,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(17,"\n "),c.ɵɵtemplate(18,A,5,3,"a",4),c.ɵɵtext(19,"\n "),c.ɵɵtemplate(20,T,5,3,"button",5),c.ɵɵtext(21,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(22,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(23,"\n\n"),c.ɵɵtemplate(24,M,9,6,"ng-container",6),c.ɵɵtext(25,"\n\n"),c.ɵɵtemplate(26,V,6,2,"ng-container",6),c.ɵɵpipe(27,"search"),c.ɵɵtext(28,"\n\n"),c.ɵɵtemplate(29,N,0,0,"ng-template",null,7,c.ɵɵtemplateRefExtractor),c.ɵɵtext(31,"\n")),2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(4,8,"clients")),c.ɵɵadvance(8),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(12,10,"search")),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("placeholder",c.ɵɵpipeBind1(15,12,"search")),c.ɵɵproperty("ngModel",t.searchText),c.ɵɵadvance(4),c.ɵɵproperty("ngIf",t.manageOrganizations),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",t.manageOrganizations&&t.showAddExisting),c.ɵɵadvance(4),c.ɵɵproperty("ngIf",t.loading),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!t.loading&&c.ɵɵpipeBind4(27,14,t.clients,t.searchText,"organizationName","id")))},directives:[b.DefaultValueAccessor,b.NgControlStatus,b.NgModel,w.NgIf,d.RouterLinkWithHref,w.NgForOf,C.AvatarComponent,I.A11yTitleDirective,E.StopClickDirective],pipes:[P.I18nPipe,O.SearchPipe],encapsulation:2})},53402:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateOrganizationComponent=void 0;n(68012);const r=n(28360),o=n(32621),a=n(68012),s=n(28360),l=n(99729);class c{constructor(e){this.route=e}ngOnInit(){this.route.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.providerId=e.providerId}))))}}t.CreateOrganizationComponent=c,c.ɵfac=function(e){return new(e||c)(o.ɵɵdirectiveInject(a.ActivatedRoute))},c.ɵcmp=o.ɵɵdefineComponent({type:c,selectors:[["app-create-organization"]],viewQuery:function(e,t){if(1&e&&o.ɵɵviewQuery(r.OrganizationPlansComponent,7),2&e){let e;o.ɵɵqueryRefresh(e=o.ɵɵloadQuery())&&(t.orgPlansComponent=e.first)}},decls:13,vars:7,consts:[[1,"page-header"],[3,"providerId"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h1"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n"),o.ɵɵelementStart(7,"p"),o.ɵɵtext(8),o.ɵɵpipe(9,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n"),o.ɵɵelement(11,"app-organization-plans",1),o.ɵɵtext(12,"\n")),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,3,"newClientOrganization")),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(9,5,"newClientOrganizationDesc")),o.ɵɵadvance(3),o.ɵɵproperty("providerId",t.providerId))},directives:[s.OrganizationPlansComponent],pipes:[l.I18nPipe],encapsulation:2})},82074:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.PermissionsGuard=void 0;n(68012),n(68291);const r=n(47880),o=n(32621),a=n(68291),s=n(68012);class l{constructor(e,t){this.providerService=e,this.router=t}canActivate(e){return i(this,void 0,void 0,(function*(){const t=yield this.providerService.get(e.params.providerId),n=null==e.data?null:e.data.permissions;return!!(-1!==n.indexOf(r.Permissions.AccessEventLogs)&&t.canAccessEventLogs||-1!==n.indexOf(r.Permissions.ManageProvider)&&t.isProviderAdmin||-1!==n.indexOf(r.Permissions.ManageUsers)&&t.canManageUsers)||(this.router.navigate(["/providers",t.id]),!1)}))}}t.PermissionsGuard=l,l.ɵfac=function(e){return new(e||l)(o.ɵɵinject(a.ProviderService),o.ɵɵinject(s.Router))},l.ɵprov=o.ɵɵdefineInjectable({token:l,factory:l.ɵfac})},60261:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderGuard=void 0;n(68012),n(51554),n(73828),n(68291);const r=n(32621),o=n(68012),a=n(73828),s=n(51554),l=n(68291);class c{constructor(e,t,n,i){this.router=e,this.platformUtilsService=t,this.i18nService=n,this.providerService=i}canActivate(e){return i(this,void 0,void 0,(function*(){const t=yield this.providerService.get(e.params.providerId);return null==t?(this.router.navigate(["/"]),!1):!(!t.isProviderAdmin&&!t.enabled)||(this.platformUtilsService.showToast("error",null,this.i18nService.t("providerIsDisabled")),this.router.navigate(["/"]),!1)}))}}t.ProviderGuard=c,c.ɵfac=function(e){return new(e||c)(r.ɵɵinject(o.Router),r.ɵɵinject(a.PlatformUtilsService),r.ɵɵinject(s.I18nService),r.ɵɵinject(l.ProviderService))},c.ɵprov=r.ɵɵdefineInjectable({token:c,factory:c.ɵfac})},34221:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AcceptProviderComponent=void 0;n(68012),n(91674),n(51554),n(73828),n(73569);const r=n(82900),o=n(50009),a=n(32621),s=n(68012),l=n(51554),c=n(73569),d=n(91674),p=n(73828),u=n(57490),m=n(99729);function h(e,t){1&e&&(a.ɵɵelementStart(0,"div",2),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div"),a.ɵɵtext(3,"\n "),a.ɵɵelement(4,"img",3),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"p",4),a.ɵɵtext(7,"\n "),a.ɵɵelement(8,"i",5),a.ɵɵpipe(9,"i18n"),a.ɵɵtext(10,"\n "),a.ɵɵelementStart(11,"span",6),a.ɵɵtext(12),a.ɵɵpipe(13,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(15,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(16,"\n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(8),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(9,2,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(13,4,"loading")))}const v=function(e){return{email:e}};function f(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",7),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",8),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"div",9),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"p",10),a.ɵɵtext(7),a.ɵɵpipe(8,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(9,"\n "),a.ɵɵelementStart(10,"div",11),a.ɵɵtext(11,"\n "),a.ɵɵelementStart(12,"div",12),a.ɵɵtext(13,"\n "),a.ɵɵelementStart(14,"p",4),a.ɵɵtext(15),a.ɵɵelementStart(16,"strong",13),a.ɵɵtext(17),a.ɵɵelementEnd(),a.ɵɵtext(18,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(19,"\n "),a.ɵɵelementStart(20,"p"),a.ɵɵtext(21),a.ɵɵpipe(22,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(23,"\n "),a.ɵɵelement(24,"hr"),a.ɵɵtext(25,"\n "),a.ɵɵelementStart(26,"div",14),a.ɵɵtext(27,"\n "),a.ɵɵelementStart(28,"a",15),a.ɵɵtext(29),a.ɵɵpipe(30,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(31,"\n "),a.ɵɵelementStart(32,"a",16),a.ɵɵtext(33),a.ɵɵpipe(34,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(35,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(36,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(37,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(38,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(39,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(40,"\n"),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext();a.ɵɵadvance(7),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(8,8,"joinProvider")),a.ɵɵadvance(8),a.ɵɵtextInterpolate1("\n ",e.providerName,"\n "),a.ɵɵadvance(2),a.ɵɵtextInterpolate(e.email),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(22,10,"joinProviderDesc")),a.ɵɵadvance(7),a.ɵɵproperty("queryParams",a.ɵɵpureFunction1(16,v,e.email)),a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(30,12,"logIn"),"\n "),a.ɵɵadvance(3),a.ɵɵproperty("queryParams",a.ɵɵpureFunction1(18,v,e.email)),a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(34,14,"createAccount"),"\n ")}}class g extends o.BaseAcceptComponent{constructor(e,t,n,i,r,o){super(e,o,t,n,i),this.apiService=r,this.failedMessage="providerInviteAcceptFailed",this.requiredParameters=["providerId","providerUserId","token"]}authedHandler(e){return i(this,void 0,void 0,(function*(){const t=new r.ProviderUserAcceptRequest;t.token=e.token,yield this.apiService.postProviderUserAccept(e.providerId,e.providerUserId,t),this.platformUtilService.showToast("success",this.i18nService.t("inviteAccepted"),this.i18nService.t("providerInviteAcceptedDesc"),{timeout:1e4}),this.router.navigate(["/vault"])}))}unauthedHandler(e){return i(this,void 0,void 0,(function*(){this.providerName=e.providerName}))}}t.AcceptProviderComponent=g,g.ɵfac=function(e){return new(e||g)(a.ɵɵdirectiveInject(s.Router),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(s.ActivatedRoute),a.ɵɵdirectiveInject(c.StateService),a.ɵɵdirectiveInject(d.ApiService),a.ɵɵdirectiveInject(p.PlatformUtilsService))},g.ɵcmp=a.ɵɵdefineComponent({type:g,selectors:[["app-accept-provider"]],features:[a.ɵɵInheritDefinitionFeature],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-block","mt-2"],[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,t){1&e&&(a.ɵɵtemplate(0,h,17,6,"div",0),a.ɵɵtext(1,"\n"),a.ɵɵtemplate(2,f,41,20,"div",1),a.ɵɵtext(3,"\n")),2&e&&(a.ɵɵproperty("ngIf",t.loading),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!t.loading&&!t.authed))},directives:[u.NgIf,s.RouterLinkWithHref],pipes:[m.I18nPipe],encapsulation:2})},48620:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BulkConfirmComponent=void 0;const r=n(72418),o=n(64279),a=n(69316),s=n(61692),l=n(32621),c=n(8863),d=n(57490),p=n(51626),u=n(15370),m=n(99729),h=n(52080);function v(e,t){1&e&&(l.ɵɵelementStart(0,"div",15),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",16),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4),l.ɵɵpipe(5,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,2,"loading")),l.ɵɵadvance(2),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(5,4,"loading"),"\n "))}function f(e,t){1&e&&(l.ɵɵelementStart(0,"app-callout",17),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(2,1,"noSelectedUsersApplicable"),"\n "))}function g(e,t){if(1&e&&(l.ɵɵelementStart(0,"app-callout",18),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext();l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",e.error,"\n ")}}function y(e,t){if(1&e&&(l.ɵɵelementStart(0,"small",26),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext().$implicit;l.ɵɵadvance(1),l.ɵɵtextInterpolate(e.name)}}function x(e,t){if(1&e&&(l.ɵɵelementStart(0,"tr"),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"td",23),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"app-avatar",24),l.ɵɵpipe(5,"userName"),l.ɵɵtext(6,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(7,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"td"),l.ɵɵtext(10),l.ɵɵtemplate(11,y,2,1,"small",25),l.ɵɵtext(12,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(13,"\n "),l.ɵɵelementStart(14,"td"),l.ɵɵtext(15),l.ɵɵelementEnd(),l.ɵɵtext(16,"\n "),l.ɵɵelementEnd()),2&e){const e=t.$implicit,n=l.ɵɵnextContext(2);l.ɵɵadvance(4),l.ɵɵproperty("data",l.ɵɵpipeBind1(5,7,e))("email",e.email)("circle",!0)("fontSize",14),l.ɵɵadvance(6),l.ɵɵtextInterpolate1("\n ",e.email,"\n "),l.ɵɵadvance(1),l.ɵɵproperty("ngIf",e.name),l.ɵɵadvance(4),l.ɵɵtextInterpolate1("\n ",n.fingerprints.get(e.id),"\n ")}}function S(e,t){if(1&e&&(l.ɵɵelementStart(0,"small",26),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext().$implicit;l.ɵɵadvance(1),l.ɵɵtextInterpolate(e.name)}}function b(e,t){if(1&e&&(l.ɵɵelementStart(0,"tr"),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"td",23),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"app-avatar",24),l.ɵɵpipe(5,"userName"),l.ɵɵtext(6,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(7,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"td"),l.ɵɵtext(10),l.ɵɵtemplate(11,S,2,1,"small",25),l.ɵɵtext(12,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(13,"\n "),l.ɵɵelementStart(14,"td"),l.ɵɵtext(15),l.ɵɵpipe(16,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(17,"\n "),l.ɵɵelementEnd()),2&e){const e=t.$implicit;l.ɵɵadvance(4),l.ɵɵproperty("data",l.ɵɵpipeBind1(5,7,e))("email",e.email)("circle",!0)("fontSize",14),l.ɵɵadvance(6),l.ɵɵtextInterpolate1("\n ",e.email,"\n "),l.ɵɵadvance(1),l.ɵɵproperty("ngIf",e.name),l.ɵɵadvance(4),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(16,9,"bulkFilteredMessage"),"\n ")}}function w(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"p"),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementStart(5,"a",19),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(9,"\n "),l.ɵɵelementStart(10,"table",20),l.ɵɵtext(11,"\n "),l.ɵɵelementStart(12,"thead"),l.ɵɵtext(13,"\n "),l.ɵɵelementStart(14,"tr"),l.ɵɵtext(15,"\n "),l.ɵɵelementStart(16,"th",21),l.ɵɵtext(17),l.ɵɵpipe(18,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(19,"\n "),l.ɵɵelementStart(20,"th"),l.ɵɵtext(21),l.ɵɵpipe(22,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(23,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(24,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(25,"\n "),l.ɵɵtemplate(26,x,17,9,"tr",22),l.ɵɵtext(27,"\n "),l.ɵɵtemplate(28,b,18,11,"tr",22),l.ɵɵtext(29,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(30,"\n "),l.ɵɵelementContainerEnd()),2&e){const e=l.ɵɵnextContext();l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(4,6,"fingerprintEnsureIntegrityVerify"),"\n "),l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(7,8,"learnMore"),""),l.ɵɵadvance(11),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(18,10,"user")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(22,12,"fingerprint")),l.ɵɵadvance(5),l.ɵɵproperty("ngForOf",e.filteredUsers),l.ɵɵadvance(2),l.ɵɵproperty("ngForOf",e.excludedUsers)}}function C(e,t){if(1&e&&(l.ɵɵelementStart(0,"small",26),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext().$implicit;l.ɵɵadvance(1),l.ɵɵtextInterpolate(e.name)}}function I(e,t){if(1&e&&(l.ɵɵelementStart(0,"td"),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext().$implicit,t=l.ɵɵnextContext(2);l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",t.statuses.get(e.id),"\n ")}}function E(e,t){1&e&&(l.ɵɵelementStart(0,"td"),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(2,1,"bulkFilteredMessage"),"\n "))}function P(e,t){if(1&e&&(l.ɵɵelementStart(0,"tr"),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"td",23),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"app-avatar",24),l.ɵɵpipe(5,"userName"),l.ɵɵtext(6,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(7,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"td"),l.ɵɵtext(10),l.ɵɵtemplate(11,C,2,1,"small",25),l.ɵɵtext(12,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(13,"\n "),l.ɵɵtemplate(14,I,2,1,"td",11),l.ɵɵtext(15,"\n "),l.ɵɵtemplate(16,E,3,3,"td",11),l.ɵɵtext(17,"\n "),l.ɵɵelementEnd()),2&e){const e=t.$implicit,n=l.ɵɵnextContext(2);l.ɵɵadvance(4),l.ɵɵproperty("data",l.ɵɵpipeBind1(5,8,e))("email",e.email)("circle",!0)("fontSize",14),l.ɵɵadvance(6),l.ɵɵtextInterpolate1("\n ",e.email,"\n "),l.ɵɵadvance(1),l.ɵɵproperty("ngIf",e.name),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",n.statuses.has(e.id)),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!n.statuses.has(e.id))}}function O(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"table",20),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"thead"),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"tr"),l.ɵɵtext(7,"\n "),l.ɵɵelementStart(8,"th",21),l.ɵɵtext(9),l.ɵɵpipe(10,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(11,"\n "),l.ɵɵelementStart(12,"th"),l.ɵɵtext(13),l.ɵɵpipe(14,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(15,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(16,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(17,"\n "),l.ɵɵtemplate(18,P,18,10,"tr",22),l.ɵɵtext(19,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(20,"\n "),l.ɵɵelementContainerEnd()),2&e){const e=l.ɵɵnextContext();l.ɵɵadvance(9),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(10,3,"user")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(14,5,"status")),l.ɵɵadvance(5),l.ɵɵproperty("ngForOf",e.filteredUsers)}}function k(e,t){if(1&e){const e=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"button",27),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(e);return l.ɵɵnextContext().submit()})),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",16),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"span"),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementEnd()}if(2&e){const e=l.ɵɵnextContext();l.ɵɵproperty("disabled",e.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,3,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,5,"confirm"))}}class A extends s.BulkConfirmComponent{isAccepted(e){return e.status===r.ProviderUserStatusType.Accepted}getPublicKeys(){return i(this,void 0,void 0,(function*(){const e=new a.ProviderUserBulkRequest(this.filteredUsers.map((e=>e.id)));return yield this.apiService.postProviderUsersPublicKey(this.providerId,e)}))}getCryptoKey(){return this.cryptoService.getProviderKey(this.providerId)}postConfirmRequest(e){return i(this,void 0,void 0,(function*(){const t=new o.ProviderUserBulkConfirmRequest(e);return yield this.apiService.postProviderUserBulkConfirm(this.providerId,t)}))}}t.BulkConfirmComponent=A,A.ɵfac=function(){let e;return function(t){return(e||(e=l.ɵɵgetInheritedFactory(A)))(t||A)}}(),A.ɵcmp=l.ɵɵdefineComponent({type:A,selectors:[["ng-component"]],inputs:{providerId:"providerId"},features:[l.ɵɵInheritDefinitionFeature],decls:45,vars:15,consts:[["role","dialog","aria-modal","true","aria-labelledby","bulkTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],[1,"modal-content"],[1,"modal-header"],["id","bulkTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["class","card-body text-center",4,"ngIf"],["type","danger",4,"ngIf"],["type","error",4,"ngIf"],[4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled","click",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"card-body","text-center"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","danger"],["type","error"],["href","https://bitwarden.com/help/fingerprint-phrase/","target","_blank","rel","noopener"],[1,"table","table-hover","table-list"],["colspan","2"],[4,"ngFor","ngForOf"],["width","30"],["size","25",3,"data","email","circle","fontSize"],["class","text-muted d-block",4,"ngIf"],[1,"text-muted","d-block"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled","click"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"div",2),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"div",3),l.ɵɵtext(7,"\n "),l.ɵɵelementStart(8,"h2",4),l.ɵɵtext(9),l.ɵɵpipe(10,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(11,"\n "),l.ɵɵelementStart(12,"button",5),l.ɵɵpipe(13,"i18n"),l.ɵɵtext(14,"\n "),l.ɵɵelementStart(15,"span",6),l.ɵɵtext(16,"×"),l.ɵɵelementEnd(),l.ɵɵtext(17,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(18,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(19,"\n "),l.ɵɵelementStart(20,"div",7),l.ɵɵtext(21,"\n "),l.ɵɵtemplate(22,v,6,6,"div",8),l.ɵɵtext(23,"\n "),l.ɵɵtemplate(24,f,3,3,"app-callout",9),l.ɵɵtext(25,"\n "),l.ɵɵtemplate(26,g,2,1,"app-callout",10),l.ɵɵtext(27,"\n "),l.ɵɵtemplate(28,w,31,14,"ng-container",11),l.ɵɵtext(29,"\n "),l.ɵɵtemplate(30,O,21,7,"ng-container",11),l.ɵɵtext(31,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(32,"\n "),l.ɵɵelementStart(33,"div",12),l.ɵɵtext(34,"\n "),l.ɵɵtemplate(35,k,9,7,"button",13),l.ɵɵtext(36,"\n "),l.ɵɵelementStart(37,"button",14),l.ɵɵtext(38),l.ɵɵpipe(39,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(40,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(41,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(42,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(43,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(44,"\n")),2&e&&(l.ɵɵadvance(9),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(10,9,"confirmUsers"),"\n "),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(13,11,"close")),l.ɵɵadvance(10),l.ɵɵproperty("ngIf",t.loading),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.filteredUsers.length<=0),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.error),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!t.loading&&!t.done),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!t.loading&&t.done),l.ɵɵadvance(5),l.ɵɵproperty("ngIf",!t.done),l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(39,13,"close"),"\n "))},directives:[c.A11yTitleDirective,d.NgIf,p.CalloutComponent,d.NgForOf,u.AvatarComponent],pipes:[m.I18nPipe,h.UserNamePipe],encapsulation:2})},48382:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BulkRemoveComponent=void 0;const r=n(69316),o=n(37131),a=n(32621),s=n(8863),l=n(57490),c=n(51626),d=n(15370),p=n(99729),u=n(52080);function m(e,t){1&e&&(a.ɵɵelementStart(0,"app-callout",14),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(2,1,"noSelectedUsersApplicable"),"\n "))}function h(e,t){if(1&e&&(a.ɵɵelementStart(0,"app-callout",15),a.ɵɵtext(1),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext();a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",e.error,"\n ")}}function v(e,t){1&e&&(a.ɵɵelementStart(0,"app-callout",20),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(2,1,"removeUsersWarning"),"\n "))}function f(e,t){if(1&e&&(a.ɵɵelementStart(0,"small",24),a.ɵɵtext(1),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext().$implicit;a.ɵɵadvance(1),a.ɵɵtextInterpolate(e.name)}}function g(e,t){if(1&e&&(a.ɵɵelementStart(0,"tr"),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"td",21),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"app-avatar",22),a.ɵɵpipe(5,"userName"),a.ɵɵtext(6,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(7,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"td"),a.ɵɵtext(10),a.ɵɵtemplate(11,f,2,1,"small",23),a.ɵɵtext(12,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(13,"\n "),a.ɵɵelementEnd()),2&e){const e=t.$implicit;a.ɵɵadvance(4),a.ɵɵproperty("data",a.ɵɵpipeBind1(5,6,e))("email",e.email)("circle",!0)("fontSize",14),a.ɵɵadvance(6),a.ɵɵtextInterpolate1("\n ",e.email,"\n "),a.ɵɵadvance(1),a.ɵɵproperty("ngIf",e.name)}}function y(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵtemplate(2,v,3,3,"app-callout",16),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"table",17),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"thead"),a.ɵɵtext(7,"\n "),a.ɵɵelementStart(8,"tr"),a.ɵɵtext(9,"\n "),a.ɵɵelementStart(10,"th",18),a.ɵɵtext(11),a.ɵɵpipe(12,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(13,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(15,"\n "),a.ɵɵtemplate(16,g,14,8,"tr",19),a.ɵɵtext(17,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(18,"\n "),a.ɵɵelementContainerEnd()),2&e){const e=a.ɵɵnextContext();a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.users.length>0&&!e.error),a.ɵɵadvance(9),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(12,3,"user")),a.ɵɵadvance(5),a.ɵɵproperty("ngForOf",e.users)}}function x(e,t){if(1&e&&(a.ɵɵelementStart(0,"small",24),a.ɵɵtext(1),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext().$implicit;a.ɵɵadvance(1),a.ɵɵtextInterpolate(e.name)}}function S(e,t){if(1&e&&(a.ɵɵelementStart(0,"td"),a.ɵɵtext(1),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext().$implicit,t=a.ɵɵnextContext(2);a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",t.statuses.get(e.id),"\n ")}}function b(e,t){1&e&&(a.ɵɵelementStart(0,"td"),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(2,1,"bulkFilteredMessage"),"\n "))}function w(e,t){if(1&e&&(a.ɵɵelementStart(0,"tr"),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"td",21),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"app-avatar",22),a.ɵɵpipe(5,"userName"),a.ɵɵtext(6,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(7,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"td"),a.ɵɵtext(10),a.ɵɵtemplate(11,x,2,1,"small",23),a.ɵɵtext(12,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(13,"\n "),a.ɵɵtemplate(14,S,2,1,"td",10),a.ɵɵtext(15,"\n "),a.ɵɵtemplate(16,b,3,3,"td",10),a.ɵɵtext(17,"\n "),a.ɵɵelementEnd()),2&e){const e=t.$implicit,n=a.ɵɵnextContext(2);a.ɵɵadvance(4),a.ɵɵproperty("data",a.ɵɵpipeBind1(5,8,e))("email",e.email)("circle",!0)("fontSize",14),a.ɵɵadvance(6),a.ɵɵtextInterpolate1("\n ",e.email,"\n "),a.ɵɵadvance(1),a.ɵɵproperty("ngIf",e.name),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",n.statuses.has(e.id)),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!n.statuses.has(e.id))}}function C(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"table",17),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"thead"),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"tr"),a.ɵɵtext(7,"\n "),a.ɵɵelementStart(8,"th",18),a.ɵɵtext(9),a.ɵɵpipe(10,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(11,"\n "),a.ɵɵelementStart(12,"th"),a.ɵɵtext(13),a.ɵɵpipe(14,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(15,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(16,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n "),a.ɵɵtemplate(18,w,18,10,"tr",19),a.ɵɵtext(19,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(20,"\n "),a.ɵɵelementContainerEnd()),2&e){const e=a.ɵɵnextContext();a.ɵɵadvance(9),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(10,3,"user")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(14,5,"status")),a.ɵɵadvance(5),a.ɵɵproperty("ngForOf",e.users)}}function I(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"button",25),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);return a.ɵɵnextContext().submit()})),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",26),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span"),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementEnd()}if(2&e){const e=a.ɵɵnextContext();a.ɵɵproperty("disabled",e.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,3,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,5,"removeUsers"))}}class E extends o.BulkRemoveComponent{deleteUsers(){return i(this,void 0,void 0,(function*(){const e=new r.ProviderUserBulkRequest(this.users.map((e=>e.id)));return yield this.apiService.deleteManyProviderUsers(this.providerId,e)}))}}t.BulkRemoveComponent=E,E.ɵfac=function(){let e;return function(t){return(e||(e=a.ɵɵgetInheritedFactory(E)))(t||E)}}(),E.ɵcmp=a.ɵɵdefineComponent({type:E,selectors:[["ng-component"]],inputs:{providerId:"providerId"},features:[a.ɵɵInheritDefinitionFeature],decls:43,vars:14,consts:[["role","dialog","aria-modal","true","aria-labelledby","bulkTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],[1,"modal-content"],[1,"modal-header"],["id","bulkTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["type","danger",4,"ngIf"],["type","error",4,"ngIf"],[4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled","click",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["type","danger"],["type","error"],["type","warning",4,"ngIf"],[1,"table","table-hover","table-list"],["colspan","2"],[4,"ngFor","ngForOf"],["type","warning"],["width","30"],["size","25",3,"data","email","circle","fontSize"],["class","text-muted d-block",4,"ngIf"],[1,"text-muted","d-block"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled","click"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"]],template:function(e,t){1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",1),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"div",2),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"div",3),a.ɵɵtext(7,"\n "),a.ɵɵelementStart(8,"h2",4),a.ɵɵtext(9),a.ɵɵpipe(10,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(11,"\n "),a.ɵɵelementStart(12,"button",5),a.ɵɵpipe(13,"i18n"),a.ɵɵtext(14,"\n "),a.ɵɵelementStart(15,"span",6),a.ɵɵtext(16,"×"),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(18,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(19,"\n "),a.ɵɵelementStart(20,"div",7),a.ɵɵtext(21,"\n "),a.ɵɵtemplate(22,m,3,3,"app-callout",8),a.ɵɵtext(23,"\n "),a.ɵɵtemplate(24,h,2,1,"app-callout",9),a.ɵɵtext(25,"\n "),a.ɵɵtemplate(26,y,19,5,"ng-container",10),a.ɵɵtext(27,"\n "),a.ɵɵtemplate(28,C,21,7,"ng-container",10),a.ɵɵtext(29,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(30,"\n "),a.ɵɵelementStart(31,"div",11),a.ɵɵtext(32,"\n "),a.ɵɵtemplate(33,I,9,7,"button",12),a.ɵɵtext(34,"\n "),a.ɵɵelementStart(35,"button",13),a.ɵɵtext(36),a.ɵɵpipe(37,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(38,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(39,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(40,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(41,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(42,"\n")),2&e&&(a.ɵɵadvance(9),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(10,8,"removeUsers"),"\n "),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(13,10,"close")),a.ɵɵadvance(10),a.ɵɵproperty("ngIf",t.users.length<=0),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.error),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!t.done),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.done),a.ɵɵadvance(5),a.ɵɵproperty("ngIf",!t.done&&t.users.length>0),a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(37,12,"close"),"\n "))},directives:[s.A11yTitleDirective,l.NgIf,c.CalloutComponent,l.NgForOf,d.AvatarComponent],pipes:[p.I18nPipe,u.UserNamePipe],encapsulation:2})},42378:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EventsComponent=void 0;n(68012),n(52080),n(91674),n(97445),n(51554),n(36631),n(73828),n(68291);const r=n(75512),o=(n(3202),n(32621)),a=n(91674),s=n(68012),l=n(3202),c=n(51554),d=n(68291),p=n(97445),u=n(73828),m=n(36631),h=n(52080),v=n(96832),f=n(56820),g=n(57490),y=n(99729);function x(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",16),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",17),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function S(e,t){1&e&&(o.ɵɵelementStart(0,"p"),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(2,1,"noEventsInList")))}function b(e,t){if(1&e&&(o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td"),o.ɵɵtext(3),o.ɵɵpipe(4,"date"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"td"),o.ɵɵtext(7,"\n "),o.ɵɵelement(8,"i",26),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"span",17),o.ɵɵtext(11),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"td"),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"span",27),o.ɵɵtext(17),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelement(20,"td",28),o.ɵɵtext(21,"\n "),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind2(4,11,e.date,"medium")),o.ɵɵadvance(5),o.ɵɵclassMapInterpolate1("text-muted bwi bwi-lg ",e.appIcon,""),o.ɵɵpropertyInterpolate2("title","",e.appName,", ",e.ip,""),o.ɵɵadvance(3),o.ɵɵtextInterpolate2("",e.appName,", ",e.ip,""),o.ɵɵadvance(5),o.ɵɵpropertyInterpolate("title",e.userEmail),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.userName),o.ɵɵadvance(3),o.ɵɵproperty("innerHTML",e.message,o.ɵɵsanitizeHtml)}}function w(e,t){if(1&e&&(o.ɵɵelementStart(0,"table",20),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"thead"),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"tr"),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"th",21),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"th",22),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"span",17),o.ɵɵtext(13),o.ɵɵpipe(14,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵelementStart(17,"th",23),o.ɵɵtext(18),o.ɵɵpipe(19,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"th",24),o.ɵɵtext(22),o.ɵɵpipe(23,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementStart(27,"tbody"),o.ɵɵtext(28,"\n "),o.ɵɵtemplate(29,b,22,14,"tr",25),o.ɵɵtext(30,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(31,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,5,"timestamp")),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(14,7,"device")),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(19,9,"user")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(23,11,"event")),o.ɵɵadvance(7),o.ɵɵproperty("ngForOf",e.events)}}function C(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"button",29,30),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).loadEvents(!1)})),o.ɵɵtext(2,"\n "),o.ɵɵelement(3,"i",31),o.ɵɵpipe(4,"i18n"),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"span"),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵreference(1),t=o.ɵɵnextContext(2);o.ɵɵproperty("appApiAction",t.morePromise)("disabled",t.loaded&&e.loading),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(4,4,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,6,"loadMore"))}}function I(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,S,3,3,"p",15),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,w,32,13,"table",18),o.ɵɵtext(5,"\n "),o.ɵɵtemplate(6,C,10,8,"button",19),o.ɵɵtext(7,"\n"),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.events||!e.events.length),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.events&&e.events.length),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.continuationToken)}}const E=function(e){return{"bwi-spin":e}},P=function(e){return{loading:e}};class O extends r.BaseEventsComponent{constructor(e,t,n,i,r,o,a,s,l,c){super(n,i,o,a,l),this.apiService=e,this.route=t,this.providerService=r,this.router=s,this.userNamePipe=c,this.exportFileName="provider-events",this.providerUsersUserIdMap=new Map,this.providerUsersIdMap=new Map}ngOnInit(){return i(this,void 0,void 0,(function*(){this.route.parent.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.providerId=e.providerId;const t=yield this.providerService.get(this.providerId);null!=t&&t.useEvents?yield this.load():this.router.navigate(["/providers",this.providerId])}))))}))}load(){return i(this,void 0,void 0,(function*(){(yield this.apiService.getProviderUsers(this.providerId)).data.forEach((e=>{const t=this.userNamePipe.transform(e);this.providerUsersIdMap.set(e.id,{name:t,email:e.email}),this.providerUsersUserIdMap.set(e.userId,{name:t,email:e.email})})),yield this.loadEvents(!0),this.loaded=!0}))}requestEvents(e,t,n){return this.apiService.getEventsProvider(this.providerId,e,t,n)}getUserName(e,t){return null!=t&&this.providerUsersUserIdMap.has(t)?this.providerUsersUserIdMap.get(t):null}}t.EventsComponent=O,O.ɵfac=function(e){return new(e||O)(o.ɵɵdirectiveInject(a.ApiService),o.ɵɵdirectiveInject(s.ActivatedRoute),o.ɵɵdirectiveInject(l.EventService),o.ɵɵdirectiveInject(c.I18nService),o.ɵɵdirectiveInject(d.ProviderService),o.ɵɵdirectiveInject(p.ExportService),o.ɵɵdirectiveInject(u.PlatformUtilsService),o.ɵɵdirectiveInject(s.Router),o.ɵɵdirectiveInject(m.LogService),o.ɵɵdirectiveInject(h.UserNamePipe))},O.ɵcmp=o.ɵɵdefineComponent({type:O,selectors:[["provider-events"]],features:[o.ɵɵInheritDefinitionFeature],decls:57,vars:35,consts:[[1,"page-header","d-flex"],[1,"ml-auto","d-flex"],[1,"form-inline"],["for","start",1,"sr-only"],["type","datetime-local","id","start","placeholder","YYYY-MM-DDTHH:MM",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange","change"],[1,"mx-2"],["for","end",1,"sr-only"],["type","datetime-local","id","end","placeholder","YYYY-MM-DDTHH:MM",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange","change"],[1,"d-inline",3,"appApiAction"],["refreshForm",""],["type","button",1,"btn","btn-sm","btn-outline-primary","ml-3",3,"disabled","click"],["aria-hidden","true",1,"bwi","bwi-refresh","bwi-fw",3,"ngClass"],["exportForm",""],["type","button",1,"btn","btn-sm","btn-outline-primary","btn-submit","manual","ml-3",3,"ngClass","disabled","click"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin"],[4,"ngIf"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["class","table table-hover",4,"ngIf"],["type","button","class","btn btn-block btn-link btn-submit",3,"appApiAction","disabled","click",4,"ngIf"],[1,"table","table-hover"],["width","210",1,"border-top-0"],["width","40",1,"border-top-0"],["width","150",1,"border-top-0"],[1,"border-top-0"],[4,"ngFor","ngForOf"],["aria-hidden","true",3,"title"],[3,"title"],[3,"innerHTML"],["type","button",1,"btn","btn-block","btn-link","btn-submit",3,"appApiAction","disabled","click"],["moreBtn",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"]],template:function(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h1"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",1),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"div",2),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"label",3),o.ɵɵtext(11),o.ɵɵpipe(12,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"input",4),o.ɵɵlistener("ngModelChange",(function(e){return t.start=e}))("change",(function(){return t.dirtyDates=!0})),o.ɵɵpipe(15,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵelementStart(17,"span",5),o.ɵɵtext(18,"-"),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelementStart(20,"label",6),o.ɵɵtext(21),o.ɵɵpipe(22,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(23,"\n "),o.ɵɵelementStart(24,"input",7),o.ɵɵlistener("ngModelChange",(function(e){return t.end=e}))("change",(function(){return t.dirtyDates=!0})),o.ɵɵpipe(25,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelementStart(28,"form",8,9),o.ɵɵtext(30,"\n "),o.ɵɵelementStart(31,"button",10),o.ɵɵlistener("click",(function(){return t.loadEvents(!0)})),o.ɵɵtext(32,"\n "),o.ɵɵelement(33,"i",11),o.ɵɵtext(34),o.ɵɵpipe(35,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(36,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(37,"\n "),o.ɵɵelementStart(38,"form",8,12),o.ɵɵtext(40,"\n "),o.ɵɵelementStart(41,"button",13),o.ɵɵlistener("click",(function(){return t.exportEvents()})),o.ɵɵtext(42,"\n "),o.ɵɵelement(43,"i",14),o.ɵɵtext(44,"\n "),o.ɵɵelementStart(45,"span"),o.ɵɵtext(46),o.ɵɵpipe(47,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(48,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(49,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(50,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(51,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(52,"\n"),o.ɵɵtemplate(53,x,9,6,"ng-container",15),o.ɵɵtext(54,"\n"),o.ɵɵtemplate(55,I,8,3,"ng-container",15),o.ɵɵtext(56,"\n")),2&e){const e=o.ɵɵreference(29),n=o.ɵɵreference(39);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,17,"eventLogs")),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(12,19,"startDate")),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("placeholder",o.ɵɵpipeBind1(15,21,"startDate")),o.ɵɵproperty("ngModel",t.start),o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(22,23,"endDate")),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("placeholder",o.ɵɵpipeBind1(25,25,"endDate")),o.ɵɵproperty("ngModel",t.end),o.ɵɵadvance(4),o.ɵɵproperty("appApiAction",t.refreshPromise),o.ɵɵadvance(3),o.ɵɵproperty("disabled",t.loaded&&e.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngClass",o.ɵɵpureFunction1(31,E,t.loaded&&e.loading)),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(35,27,"refresh"),"\n "),o.ɵɵadvance(4),o.ɵɵproperty("appApiAction",t.exportPromise),o.ɵɵadvance(3),o.ɵɵproperty("ngClass",o.ɵɵpureFunction1(33,P,n.loading))("disabled",t.loaded&&n.loading||t.dirtyDates),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(47,29,"export")),o.ɵɵadvance(7),o.ɵɵproperty("ngIf",!t.loaded),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.loaded)}},directives:[v.DefaultValueAccessor,v.NgControlStatus,v.NgModel,v.ɵNgNoValidate,v.NgControlStatusGroup,v.NgForm,f.ApiActionDirective,g.NgClass,g.NgIf,g.NgForOf],pipes:[y.I18nPipe,g.DatePipe],encapsulation:2})},13346:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ManageComponent=void 0;n(68012),n(68291);const r=n(32621),o=n(68012),a=n(68291),s=n(57490),l=n(99729);function c(e,t){1&e&&(r.ɵɵelementStart(0,"a",10),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"people"),"\n "))}function d(e,t){1&e&&(r.ɵɵelementStart(0,"a",11),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"eventLogs"),"\n "))}function p(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",5),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",6),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"div",7),r.ɵɵtext(7,"\n "),r.ɵɵtemplate(8,c,3,3,"a",8),r.ɵɵtext(9,"\n "),r.ɵɵtemplate(10,d,3,3,"a",9),r.ɵɵtext(11,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(4,3,"manage")),r.ɵɵadvance(5),r.ɵɵproperty("ngIf",e.provider.canManageUsers),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.provider.canAccessEventLogs&&e.accessEvents)}}class u{constructor(e,t){this.route=e,this.providerService=t,this.accessEvents=!1}ngOnInit(){this.route.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.provider=yield this.providerService.get(e.providerId),this.accessEvents=this.provider.useEvents}))))}}t.ManageComponent=u,u.ɵfac=function(e){return new(e||u)(r.ɵɵdirectiveInject(o.ActivatedRoute),r.ɵɵdirectiveInject(a.ProviderService))},u.ɵcmp=r.ɵɵdefineComponent({type:u,selectors:[["provider-manage"]],decls:16,vars:1,consts:[[1,"container","page-content"],[1,"row"],[1,"col-3"],["class","card",4,"ngIf"],[1,"col-9"],[1,"card"],[1,"card-header"],[1,"list-group","list-group-flush"],["routerLink","people","class","list-group-item","routerLinkActive","active",4,"ngIf"],["routerLink","events","class","list-group-item","routerLinkActive","active",4,"ngIf"],["routerLink","people","routerLinkActive","active",1,"list-group-item"],["routerLink","events","routerLinkActive","active",1,"list-group-item"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",2),r.ɵɵtext(5,"\n "),r.ɵɵtemplate(6,p,13,5,"div",3),r.ɵɵtext(7,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"div",4),r.ɵɵtext(10,"\n "),r.ɵɵelement(11,"router-outlet"),r.ɵɵtext(12,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(13,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(14,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(15,"\n")),2&e&&(r.ɵɵadvance(6),r.ɵɵproperty("ngIf",t.provider))},directives:[s.NgIf,o.RouterOutlet,o.RouterLinkWithHref,o.RouterLinkActive],pipes:[l.I18nPipe],encapsulation:2})},71601:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.PeopleComponent=void 0;const r=n(32621),o=(n(68012),n(14857)),a=(n(50154),n(52080),n(64684),n(47594),n(91674),n(85714),n(51554),n(36631),n(73828),n(68291),n(60421),n(73569),n(72418)),s=n(30185),l=n(69316),c=n(98407),d=n(1833),p=n(33747),u=n(87876),m=n(48620),h=n(48382),v=n(20913),f=n(32621),g=n(91674),y=n(68012),x=n(51554),S=n(64684),b=n(73828),w=n(85714),C=n(60421),I=n(47594),E=n(36631),P=n(50154),O=n(52080),k=n(73569),A=n(68291),T=n(57490),M=n(96832),B=n(8863),D=n(1142),R=n(51626),F=n(39159),U=n(15370),V=n(99729),N=n(50154),_=n(52080),j=["addEdit"],z=["groupsTemplate"],H=["eventsTemplate"],L=["bulkStatusTemplate"],K=["bulkConfirmTemplate"],q=["bulkRemoveTemplate"];function G(e,t){if(1&e&&(f.ɵɵelementStart(0,"span",30),f.ɵɵtext(1),f.ɵɵelementEnd()),2&e){const e=f.ɵɵnextContext();f.ɵɵadvance(1),f.ɵɵtextInterpolate(e.allCount)}}function W(e,t){if(1&e&&(f.ɵɵelementStart(0,"span",30),f.ɵɵtext(1),f.ɵɵelementEnd()),2&e){const e=f.ɵɵnextContext();f.ɵɵadvance(1),f.ɵɵtextInterpolate(e.invitedCount)}}function $(e,t){if(1&e&&(f.ɵɵelementStart(0,"span",31),f.ɵɵtext(1),f.ɵɵelementEnd()),2&e){const e=f.ɵɵnextContext();f.ɵɵadvance(1),f.ɵɵtextInterpolate(e.acceptedCount)}}function Y(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"button",32),f.ɵɵlistener("click",(function(){f.ɵɵrestoreView(e);return f.ɵɵnextContext().bulkConfirm()})),f.ɵɵtext(1,"\n "),f.ɵɵelement(2,"i",33),f.ɵɵtext(3),f.ɵɵpipe(4,"i18n"),f.ɵɵelementEnd()}2&e&&(f.ɵɵadvance(3),f.ɵɵtextInterpolate1("\n ",f.ɵɵpipeBind1(4,1,"confirmSelected"),"\n "))}function Q(e,t){1&e&&(f.ɵɵelementContainerStart(0),f.ɵɵtext(1,"\n "),f.ɵɵelement(2,"i",34),f.ɵɵpipe(3,"i18n"),f.ɵɵtext(4,"\n "),f.ɵɵelementStart(5,"span",35),f.ɵɵtext(6),f.ɵɵpipe(7,"i18n"),f.ɵɵelementEnd(),f.ɵɵtext(8,"\n"),f.ɵɵelementContainerEnd()),2&e&&(f.ɵɵadvance(2),f.ɵɵpropertyInterpolate("title",f.ɵɵpipeBind1(3,2,"loading")),f.ɵɵadvance(4),f.ɵɵtextInterpolate(f.ɵɵpipeBind1(7,4,"loading")))}function J(e,t){1&e&&(f.ɵɵelementStart(0,"p"),f.ɵɵtext(1),f.ɵɵpipe(2,"i18n"),f.ɵɵelementEnd()),2&e&&(f.ɵɵadvance(1),f.ɵɵtextInterpolate(f.ɵɵpipeBind1(2,1,"noUsersInList")))}function Z(e,t){1&e&&(f.ɵɵelementStart(0,"app-callout",39),f.ɵɵpipe(1,"i18n"),f.ɵɵtext(2),f.ɵɵpipe(3,"i18n"),f.ɵɵelementEnd()),2&e&&(f.ɵɵpropertyInterpolate("title",f.ɵɵpipeBind1(1,2,"confirmUsers")),f.ɵɵadvance(2),f.ɵɵtextInterpolate1("\n ",f.ɵɵpipeBind1(3,4,"providerUsersNeedConfirmed"),"\n "))}function X(e,t){1&e&&(f.ɵɵelementStart(0,"span",56),f.ɵɵtext(1),f.ɵɵpipe(2,"i18n"),f.ɵɵelementEnd()),2&e&&(f.ɵɵadvance(1),f.ɵɵtextInterpolate(f.ɵɵpipeBind1(2,1,"invited")))}function ee(e,t){1&e&&(f.ɵɵelementStart(0,"span",57),f.ɵɵtext(1),f.ɵɵpipe(2,"i18n"),f.ɵɵelementEnd()),2&e&&(f.ɵɵadvance(1),f.ɵɵtextInterpolate(f.ɵɵpipeBind1(2,1,"accepted")))}function te(e,t){if(1&e&&(f.ɵɵelementStart(0,"small",58),f.ɵɵtext(1),f.ɵɵelementEnd()),2&e){const e=f.ɵɵnextContext().$implicit;f.ɵɵadvance(1),f.ɵɵtextInterpolate(e.name)}}function ne(e,t){1&e&&(f.ɵɵelementContainerStart(0),f.ɵɵtext(1,"\n "),f.ɵɵelement(2,"i",59),f.ɵɵpipe(3,"i18n"),f.ɵɵtext(4,"\n "),f.ɵɵelementStart(5,"span",35),f.ɵɵtext(6),f.ɵɵpipe(7,"i18n"),f.ɵɵelementEnd(),f.ɵɵtext(8,"\n "),f.ɵɵelementContainerEnd()),2&e&&(f.ɵɵadvance(2),f.ɵɵpropertyInterpolate("title",f.ɵɵpipeBind1(3,2,"userUsingTwoStep")),f.ɵɵadvance(4),f.ɵɵtextInterpolate(f.ɵɵpipeBind1(7,4,"userUsingTwoStep")))}function ie(e,t){1&e&&(f.ɵɵelementStart(0,"span"),f.ɵɵtext(1),f.ɵɵpipe(2,"i18n"),f.ɵɵelementEnd()),2&e&&(f.ɵɵadvance(1),f.ɵɵtextInterpolate(f.ɵɵpipeBind1(2,1,"providerAdmin")))}function re(e,t){1&e&&(f.ɵɵelementStart(0,"span"),f.ɵɵtext(1),f.ɵɵpipe(2,"i18n"),f.ɵɵelementEnd()),2&e&&(f.ɵɵadvance(1),f.ɵɵtextInterpolate(f.ɵɵpipeBind1(2,1,"serviceUser")))}function oe(e,t){1&e&&(f.ɵɵelementStart(0,"span"),f.ɵɵtext(1),f.ɵɵpipe(2,"i18n"),f.ɵɵelementEnd()),2&e&&(f.ɵɵadvance(1),f.ɵɵtextInterpolate(f.ɵɵpipeBind1(2,1,"custom")))}function ae(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"a",60),f.ɵɵlistener("click",(function(){f.ɵɵrestoreView(e);const t=f.ɵɵnextContext().$implicit;return f.ɵɵnextContext(3).reinvite(t)})),f.ɵɵtext(1,"\n "),f.ɵɵelement(2,"i",14),f.ɵɵtext(3),f.ɵɵpipe(4,"i18n"),f.ɵɵelementEnd()}2&e&&(f.ɵɵadvance(3),f.ɵɵtextInterpolate1("\n ",f.ɵɵpipeBind1(4,1,"resendInvitation"),"\n "))}function se(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"a",61),f.ɵɵlistener("click",(function(){f.ɵɵrestoreView(e);const t=f.ɵɵnextContext().$implicit;return f.ɵɵnextContext(3).confirm(t)})),f.ɵɵtext(1,"\n "),f.ɵɵelement(2,"i",33),f.ɵɵtext(3),f.ɵɵpipe(4,"i18n"),f.ɵɵelementEnd()}2&e&&(f.ɵɵadvance(3),f.ɵɵtextInterpolate1("\n ",f.ɵɵpipeBind1(4,1,"confirm"),"\n "))}function le(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"a",60),f.ɵɵlistener("click",(function(){f.ɵɵrestoreView(e);const t=f.ɵɵnextContext().$implicit;return f.ɵɵnextContext(3).groups(t)})),f.ɵɵtext(1,"\n "),f.ɵɵelement(2,"i",62),f.ɵɵtext(3),f.ɵɵpipe(4,"i18n"),f.ɵɵelementEnd()}2&e&&(f.ɵɵadvance(3),f.ɵɵtextInterpolate1("\n ",f.ɵɵpipeBind1(4,1,"groups"),"\n "))}function ce(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"a",60),f.ɵɵlistener("click",(function(){f.ɵɵrestoreView(e);const t=f.ɵɵnextContext().$implicit;return f.ɵɵnextContext(3).events(t)})),f.ɵɵtext(1,"\n "),f.ɵɵelement(2,"i",63),f.ɵɵtext(3),f.ɵɵpipe(4,"i18n"),f.ɵɵelementEnd()}2&e&&(f.ɵɵadvance(3),f.ɵɵtextInterpolate1("\n ",f.ɵɵpipeBind1(4,1,"eventLogs"),"\n "))}function de(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"tr"),f.ɵɵtext(1,"\n "),f.ɵɵelementStart(2,"td",40),f.ɵɵlistener("click",(function(){const t=f.ɵɵrestoreView(e).$implicit;return f.ɵɵnextContext(3).checkUser(t)})),f.ɵɵtext(3,"\n "),f.ɵɵelementStart(4,"input",41),f.ɵɵlistener("ngModelChange",(function(t){return f.ɵɵrestoreView(e).$implicit.checked=t})),f.ɵɵelementEnd(),f.ɵɵtext(5,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(6,"\n "),f.ɵɵelementStart(7,"td",42),f.ɵɵtext(8,"\n "),f.ɵɵelementStart(9,"app-avatar",43),f.ɵɵpipe(10,"userName"),f.ɵɵtext(11,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(12,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(13,"\n "),f.ɵɵelementStart(14,"td"),f.ɵɵtext(15,"\n "),f.ɵɵelementStart(16,"a",44),f.ɵɵlistener("click",(function(){const t=f.ɵɵrestoreView(e).$implicit;return f.ɵɵnextContext(3).edit(t)})),f.ɵɵtext(17),f.ɵɵelementEnd(),f.ɵɵtext(18,"\n "),f.ɵɵtemplate(19,X,3,3,"span",45),f.ɵɵtext(20,"\n "),f.ɵɵtemplate(21,ee,3,3,"span",46),f.ɵɵtext(22,"\n "),f.ɵɵtemplate(23,te,2,1,"small",47),f.ɵɵtext(24,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(25,"\n "),f.ɵɵelementStart(26,"td"),f.ɵɵtext(27,"\n "),f.ɵɵtemplate(28,ne,9,6,"ng-container",23),f.ɵɵtext(29,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(30,"\n "),f.ɵɵelementStart(31,"td"),f.ɵɵtext(32,"\n "),f.ɵɵtemplate(33,ie,3,3,"span",23),f.ɵɵtext(34,"\n "),f.ɵɵtemplate(35,re,3,3,"span",23),f.ɵɵtext(36,"\n "),f.ɵɵtemplate(37,oe,3,3,"span",23),f.ɵɵtext(38,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(39,"\n "),f.ɵɵelementStart(40,"td",48),f.ɵɵtext(41,"\n "),f.ɵɵelementStart(42,"div",49),f.ɵɵtext(43,"\n "),f.ɵɵelementStart(44,"button",50),f.ɵɵpipe(45,"i18n"),f.ɵɵtext(46,"\n "),f.ɵɵelement(47,"i",51),f.ɵɵtext(48,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(49,"\n "),f.ɵɵelementStart(50,"div",52),f.ɵɵtext(51,"\n "),f.ɵɵtemplate(52,ae,5,3,"a",53),f.ɵɵtext(53,"\n "),f.ɵɵtemplate(54,se,5,3,"a",54),f.ɵɵtext(55,"\n "),f.ɵɵtemplate(56,le,5,3,"a",53),f.ɵɵtext(57,"\n "),f.ɵɵtemplate(58,ce,5,3,"a",53),f.ɵɵtext(59,"\n "),f.ɵɵelementStart(60,"a",55),f.ɵɵlistener("click",(function(){const t=f.ɵɵrestoreView(e).$implicit;return f.ɵɵnextContext(3).remove(t)})),f.ɵɵtext(61,"\n "),f.ɵɵelement(62,"i",17),f.ɵɵtext(63),f.ɵɵpipe(64,"i18n"),f.ɵɵelementEnd(),f.ɵɵtext(65,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(66,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(67,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(68,"\n "),f.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=f.ɵɵnextContext(3);f.ɵɵadvance(4),f.ɵɵproperty("ngModel",e.checked),f.ɵɵadvance(5),f.ɵɵproperty("data",f.ɵɵpipeBind1(10,19,e))("email",e.email)("circle",!0)("fontSize",14),f.ɵɵadvance(8),f.ɵɵtextInterpolate(e.email),f.ɵɵadvance(2),f.ɵɵproperty("ngIf",e.status===n.userStatusType.Invited),f.ɵɵadvance(2),f.ɵɵproperty("ngIf",e.status===n.userStatusType.Accepted),f.ɵɵadvance(2),f.ɵɵproperty("ngIf",e.name),f.ɵɵadvance(5),f.ɵɵproperty("ngIf",e.twoFactorEnabled),f.ɵɵadvance(5),f.ɵɵproperty("ngIf",e.type===n.userType.ProviderAdmin),f.ɵɵadvance(2),f.ɵɵproperty("ngIf",e.type===n.userType.ServiceUser),f.ɵɵadvance(2),f.ɵɵproperty("ngIf",e.type===n.userType.Custom),f.ɵɵadvance(7),f.ɵɵpropertyInterpolate("appA11yTitle",f.ɵɵpipeBind1(45,21,"options")),f.ɵɵadvance(8),f.ɵɵproperty("ngIf",e.status===n.userStatusType.Invited),f.ɵɵadvance(2),f.ɵɵproperty("ngIf",e.status===n.userStatusType.Accepted),f.ɵɵadvance(2),f.ɵɵproperty("ngIf",n.accessGroups),f.ɵɵadvance(2),f.ɵɵproperty("ngIf",n.accessEvents&&e.status===n.userStatusType.Confirmed),f.ɵɵadvance(5),f.ɵɵtextInterpolate1("\n ",f.ɵɵpipeBind1(64,23,"remove"),"\n ")}}function pe(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementContainerStart(0),f.ɵɵtext(1,"\n "),f.ɵɵtemplate(2,Z,4,6,"app-callout",36),f.ɵɵtext(3,"\n "),f.ɵɵelementStart(4,"table",37),f.ɵɵlistener("scrolled",(function(){f.ɵɵrestoreView(e);return f.ɵɵnextContext(2).loadMore()})),f.ɵɵtext(5,"\n "),f.ɵɵelementStart(6,"tbody"),f.ɵɵtext(7,"\n "),f.ɵɵtemplate(8,de,69,25,"tr",38),f.ɵɵtext(9,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(10,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(11,"\n "),f.ɵɵelementContainerEnd()}if(2&e){const e=f.ɵɵnextContext().ngIf,t=f.ɵɵnextContext();f.ɵɵadvance(2),f.ɵɵproperty("ngIf",t.showConfirmUsers),f.ɵɵadvance(2),f.ɵɵproperty("infiniteScrollDistance",1)("infiniteScrollDisabled",!t.isPaging()),f.ɵɵadvance(4),f.ɵɵproperty("ngForOf",e)}}function ue(e,t){if(1&e&&(f.ɵɵelementContainerStart(0),f.ɵɵtext(1,"\n "),f.ɵɵtemplate(2,J,3,3,"p",23),f.ɵɵtext(3,"\n "),f.ɵɵtemplate(4,pe,12,4,"ng-container",23),f.ɵɵtext(5,"\n"),f.ɵɵelementContainerEnd()),2&e){const e=t.ngIf;f.ɵɵadvance(2),f.ɵɵproperty("ngIf",!e.length),f.ɵɵadvance(2),f.ɵɵproperty("ngIf",e.length)}}function me(e,t){}function he(e,t){}function ve(e,t){}function fe(e,t){}function ge(e,t){}function ye(e,t){}const xe=function(e){return{active:e}},Se=function(e,t){return[e,t,"name","email","id"]};class be extends d.BasePeopleComponent{constructor(e,t,n,i,r,o,l,c,d,p,u,m,h,v){super(e,c,n,r,o,d,i,p,u,m,h),this.route=t,this.router=l,this.providerService=v,this.userType=s.ProviderUserType,this.userStatusType=a.ProviderUserStatusType,this.accessEvents=!1}ngOnInit(){this.route.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.providerId=e.providerId;const t=yield this.providerService.get(this.providerId);t.canManageUsers?(this.accessEvents=t.useEvents,yield this.load(),this.route.queryParams.pipe(o.first()).subscribe((e=>i(this,void 0,void 0,(function*(){if(this.searchText=e.search,null!=e.viewEvents){const t=this.users.filter((t=>t.id===e.viewEvents));t.length>0&&t[0].status===a.ProviderUserStatusType.Confirmed&&this.events(t[0])}}))))):this.router.navigate(["../"],{relativeTo:this.route})}))))}getUsers(){return this.apiService.getProviderUsers(this.providerId)}deleteUser(e){return this.apiService.deleteProviderUser(this.providerId,e)}reinviteUser(e){return this.apiService.postProviderUserReinvite(this.providerId,e)}confirmUser(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.cryptoService.getProviderKey(this.providerId),i=yield this.cryptoService.rsaEncrypt(n.key,t.buffer),r=new c.ProviderUserConfirmRequest;r.key=i.encryptedString,yield this.apiService.postProviderUserConfirm(this.providerId,e.id,r)}))}edit(e){return i(this,void 0,void 0,(function*(){const[t]=yield this.modalService.openViewRef(v.UserAddEditComponent,this.addEditModalRef,(n=>{n.name=this.userNamePipe.transform(e),n.providerId=this.providerId,n.providerUserId=null!=e?e.id:null,n.onSavedUser.subscribe((()=>{t.close(),this.load()})),n.onDeletedUser.subscribe((()=>{t.close(),this.removeUser(e)}))}))}))}events(e){return i(this,void 0,void 0,(function*(){yield this.modalService.openViewRef(u.EntityEventsComponent,this.eventsModalRef,(t=>{t.name=this.userNamePipe.transform(e),t.providerId=this.providerId,t.entityId=e.id,t.showUser=!1,t.entity="user"}))}))}bulkRemove(){return i(this,void 0,void 0,(function*(){if(null!=this.actionPromise)return;const[e]=yield this.modalService.openViewRef(h.BulkRemoveComponent,this.bulkRemoveModalRef,(e=>{e.providerId=this.providerId,e.users=this.getCheckedUsers()}));yield e.onClosedPromise(),yield this.load()}))}bulkReinvite(){return i(this,void 0,void 0,(function*(){if(null!=this.actionPromise)return;const e=this.getCheckedUsers(),t=e.filter((e=>e.status===a.ProviderUserStatusType.Invited));if(t.length<=0)this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("noSelectedUsersApplicable"));else{try{const n=new l.ProviderUserBulkRequest(t.map((e=>e.id))),i=this.apiService.postManyProviderUserReinvite(this.providerId,n);this.showBulkStatus(e,t,i,this.i18nService.t("bulkReinviteMessage"))}catch(n){this.validationService.showError(n)}this.actionPromise=null}}))}bulkConfirm(){return i(this,void 0,void 0,(function*(){if(null!=this.actionPromise)return;const[e]=yield this.modalService.openViewRef(m.BulkConfirmComponent,this.bulkConfirmModalRef,(e=>{e.providerId=this.providerId,e.users=this.getCheckedUsers()}));yield e.onClosedPromise(),yield this.load()}))}showBulkStatus(e,t,n,r){return i(this,void 0,void 0,(function*(){const[i,o]=yield this.modalService.openViewRef(p.BulkStatusComponent,this.bulkStatusModalRef,(e=>{e.loading=!0}));let a=!1;i.onShown.subscribe((()=>{a&&i.close()}));try{const a=yield n;if(i){const n=a.data.filter((e=>""!==e.error)).reduce(((e,t)=>Object.assign(Object.assign({},e),{[t.id]:t.error})),{}),i=t.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t.id]:t})),{});o.users=e.map((e=>{var t;let o=null!==(t=n[e.id])&&void 0!==t?t:r;return i.hasOwnProperty(e.id)||(o=this.i18nService.t("bulkFilteredMessage")),{user:e,error:n.hasOwnProperty(e.id),message:o}})),o.loading=!1}}catch(s){a=!0,i.close()}}))}}t.PeopleComponent=be,be.ɵfac=function(e){return new(e||be)(f.ɵɵdirectiveInject(g.ApiService),f.ɵɵdirectiveInject(y.ActivatedRoute),f.ɵɵdirectiveInject(x.I18nService),f.ɵɵdirectiveInject(S.ModalService),f.ɵɵdirectiveInject(b.PlatformUtilsService),f.ɵɵdirectiveInject(w.CryptoService),f.ɵɵdirectiveInject(y.Router),f.ɵɵdirectiveInject(C.SearchService),f.ɵɵdirectiveInject(I.ValidationService),f.ɵɵdirectiveInject(E.LogService),f.ɵɵdirectiveInject(P.SearchPipe),f.ɵɵdirectiveInject(O.UserNamePipe),f.ɵɵdirectiveInject(k.StateService),f.ɵɵdirectiveInject(A.ProviderService))},be.ɵcmp=f.ɵɵdefineComponent({type:be,selectors:[["provider-people"]],viewQuery:function(e,t){if(1&e&&(f.ɵɵviewQuery(j,7,r.ViewContainerRef),f.ɵɵviewQuery(z,7,r.ViewContainerRef),f.ɵɵviewQuery(H,7,r.ViewContainerRef),f.ɵɵviewQuery(L,7,r.ViewContainerRef),f.ɵɵviewQuery(K,7,r.ViewContainerRef),f.ɵɵviewQuery(q,7,r.ViewContainerRef)),2&e){let e;f.ɵɵqueryRefresh(e=f.ɵɵloadQuery())&&(t.addEditModalRef=e.first),f.ɵɵqueryRefresh(e=f.ɵɵloadQuery())&&(t.groupsModalRef=e.first),f.ɵɵqueryRefresh(e=f.ɵɵloadQuery())&&(t.eventsModalRef=e.first),f.ɵɵqueryRefresh(e=f.ɵɵloadQuery())&&(t.bulkStatusModalRef=e.first),f.ɵɵqueryRefresh(e=f.ɵɵloadQuery())&&(t.bulkConfirmModalRef=e.first),f.ɵɵqueryRefresh(e=f.ɵɵloadQuery())&&(t.bulkRemoveModalRef=e.first)}},features:[f.ɵɵInheritDefinitionFeature],decls:110,vars:61,consts:[[1,"page-header","d-flex"],[1,"ml-auto","d-flex"],["role","group",1,"btn-group","btn-group-sm"],["type","button",1,"btn","btn-outline-secondary",3,"ngClass","click"],["class","badge badge-pill badge-info",4,"ngIf"],["class","badge badge-pill badge-warning",4,"ngIf"],[1,"ml-3"],["for","search",1,"sr-only"],["type","search","id","search",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange"],["appListDropdown","",1,"dropdown","ml-3"],["type","button","id","bulkActionsButton","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-sm","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-cog"],["aria-labelledby","bulkActionsButton",1,"dropdown-menu","dropdown-menu-right"],["appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-envelope"],["class","dropdown-item text-success","appStopClick","",3,"click",4,"ngIf"],["appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-close"],[1,"dropdown-divider"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-check-square"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-minus-square"],["type","button",1,"btn","btn-sm","btn-outline-primary","ml-3",3,"click"],["aria-hidden","true",1,"bwi","bwi-plus","bwi-fw"],[4,"ngIf"],["addEdit",""],["eventsTemplate",""],["confirmTemplate",""],["bulkStatusTemplate",""],["bulkConfirmTemplate",""],["bulkRemoveTemplate",""],[1,"badge","badge-pill","badge-info"],[1,"badge","badge-pill","badge-warning"],["appStopClick","",1,"dropdown-item","text-success",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-check"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["type","info","icon","bwi bwi-check-circle",3,"title",4,"ngIf"],["infiniteScroll","",1,"table","table-hover","table-list",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled"],[4,"ngFor","ngForOf"],["type","info","icon","bwi bwi-check-circle",3,"title"],[1,"table-list-checkbox",3,"click"],["type","checkbox","appStopProp","",3,"ngModel","ngModelChange"],["width","30"],["size","25",3,"data","email","circle","fontSize"],["href","#","appStopClick","",3,"click"],["class","badge badge-secondary",4,"ngIf"],["class","badge badge-warning",4,"ngIf"],["class","text-muted d-block",4,"ngIf"],[1,"table-list-options"],["appListDropdown","",1,"dropdown"],["type","button","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-cog","bwi-lg"],[1,"dropdown-menu","dropdown-menu-right"],["class","dropdown-item","href","#","appStopClick","",3,"click",4,"ngIf"],["class","dropdown-item text-success","href","#","appStopClick","",3,"click",4,"ngIf"],["href","#","appStopClick","",1,"dropdown-item","text-danger",3,"click"],[1,"badge","badge-secondary"],[1,"badge","badge-warning"],[1,"text-muted","d-block"],["aria-hidden","true",1,"bwi","bwi-lock",3,"title"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["href","#","appStopClick","",1,"dropdown-item","text-success",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-sitemap"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-file-text"]],template:function(e,t){1&e&&(f.ɵɵelementStart(0,"div",0),f.ɵɵtext(1,"\n "),f.ɵɵelementStart(2,"h1"),f.ɵɵtext(3),f.ɵɵpipe(4,"i18n"),f.ɵɵelementEnd(),f.ɵɵtext(5,"\n "),f.ɵɵelementStart(6,"div",1),f.ɵɵtext(7,"\n "),f.ɵɵelementStart(8,"div",2),f.ɵɵtext(9,"\n "),f.ɵɵelementStart(10,"button",3),f.ɵɵlistener("click",(function(){return t.filter(null)})),f.ɵɵtext(11),f.ɵɵpipe(12,"i18n"),f.ɵɵtemplate(13,G,2,1,"span",4),f.ɵɵtext(14,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(15,"\n "),f.ɵɵelementStart(16,"button",3),f.ɵɵlistener("click",(function(){return t.filter(t.userStatusType.Invited)})),f.ɵɵtext(17),f.ɵɵpipe(18,"i18n"),f.ɵɵtemplate(19,W,2,1,"span",4),f.ɵɵtext(20,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(21,"\n "),f.ɵɵelementStart(22,"button",3),f.ɵɵlistener("click",(function(){return t.filter(t.userStatusType.Accepted)})),f.ɵɵtext(23),f.ɵɵpipe(24,"i18n"),f.ɵɵtemplate(25,$,2,1,"span",5),f.ɵɵtext(26,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(27,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(28,"\n "),f.ɵɵelementStart(29,"div",6),f.ɵɵtext(30,"\n "),f.ɵɵelementStart(31,"label",7),f.ɵɵtext(32),f.ɵɵpipe(33,"i18n"),f.ɵɵelementEnd(),f.ɵɵtext(34,"\n "),f.ɵɵelementStart(35,"input",8),f.ɵɵlistener("ngModelChange",(function(e){return t.searchText=e})),f.ɵɵpipe(36,"i18n"),f.ɵɵelementEnd(),f.ɵɵtext(37,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(38,"\n "),f.ɵɵelementStart(39,"div",9),f.ɵɵtext(40,"\n "),f.ɵɵelementStart(41,"button",10),f.ɵɵpipe(42,"i18n"),f.ɵɵtext(43,"\n "),f.ɵɵelement(44,"i",11),f.ɵɵtext(45,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(46,"\n "),f.ɵɵelementStart(47,"div",12),f.ɵɵtext(48,"\n "),f.ɵɵelementStart(49,"button",13),f.ɵɵlistener("click",(function(){return t.bulkReinvite()})),f.ɵɵtext(50,"\n "),f.ɵɵelement(51,"i",14),f.ɵɵtext(52),f.ɵɵpipe(53,"i18n"),f.ɵɵelementEnd(),f.ɵɵtext(54,"\n "),f.ɵɵtemplate(55,Y,5,3,"button",15),f.ɵɵtext(56,"\n "),f.ɵɵelementStart(57,"button",16),f.ɵɵlistener("click",(function(){return t.bulkRemove()})),f.ɵɵtext(58,"\n "),f.ɵɵelement(59,"i",17),f.ɵɵtext(60),f.ɵɵpipe(61,"i18n"),f.ɵɵelementEnd(),f.ɵɵtext(62,"\n "),f.ɵɵelement(63,"div",18),f.ɵɵtext(64,"\n "),f.ɵɵelementStart(65,"button",13),f.ɵɵlistener("click",(function(){return t.selectAll(!0)})),f.ɵɵtext(66,"\n "),f.ɵɵelement(67,"i",19),f.ɵɵtext(68),f.ɵɵpipe(69,"i18n"),f.ɵɵelementEnd(),f.ɵɵtext(70,"\n "),f.ɵɵelementStart(71,"button",13),f.ɵɵlistener("click",(function(){return t.selectAll(!1)})),f.ɵɵtext(72,"\n "),f.ɵɵelement(73,"i",20),f.ɵɵtext(74),f.ɵɵpipe(75,"i18n"),f.ɵɵelementEnd(),f.ɵɵtext(76,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(77,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(78,"\n "),f.ɵɵelementStart(79,"button",21),f.ɵɵlistener("click",(function(){return t.invite()})),f.ɵɵtext(80,"\n "),f.ɵɵelement(81,"i",22),f.ɵɵtext(82),f.ɵɵpipe(83,"i18n"),f.ɵɵelementEnd(),f.ɵɵtext(84,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(85,"\n"),f.ɵɵelementEnd(),f.ɵɵtext(86,"\n"),f.ɵɵtemplate(87,Q,9,6,"ng-container",23),f.ɵɵtext(88,"\n"),f.ɵɵtemplate(89,ue,6,2,"ng-container",23),f.ɵɵpipe(90,"search"),f.ɵɵtext(91,"\n"),f.ɵɵtemplate(92,me,0,0,"ng-template",null,24,f.ɵɵtemplateRefExtractor),f.ɵɵtext(94,"\n"),f.ɵɵtemplate(95,he,0,0,"ng-template",null,25,f.ɵɵtemplateRefExtractor),f.ɵɵtext(97,"\n"),f.ɵɵtemplate(98,ve,0,0,"ng-template",null,26,f.ɵɵtemplateRefExtractor),f.ɵɵtext(100,"\n"),f.ɵɵtemplate(101,fe,0,0,"ng-template",null,27,f.ɵɵtemplateRefExtractor),f.ɵɵtext(103,"\n"),f.ɵɵtemplate(104,ge,0,0,"ng-template",null,28,f.ɵɵtemplateRefExtractor),f.ɵɵtext(106,"\n"),f.ɵɵtemplate(107,ye,0,0,"ng-template",null,29,f.ɵɵtemplateRefExtractor),f.ɵɵtext(109,"\n")),2&e&&(f.ɵɵadvance(3),f.ɵɵtextInterpolate(f.ɵɵpipeBind1(4,22,"people")),f.ɵɵadvance(7),f.ɵɵproperty("ngClass",f.ɵɵpureFunction1(52,xe,null==t.status)),f.ɵɵadvance(1),f.ɵɵtextInterpolate1("\n ",f.ɵɵpipeBind1(12,24,"all"),"\n "),f.ɵɵadvance(2),f.ɵɵproperty("ngIf",t.allCount),f.ɵɵadvance(3),f.ɵɵproperty("ngClass",f.ɵɵpureFunction1(54,xe,t.status==t.userStatusType.Invited)),f.ɵɵadvance(1),f.ɵɵtextInterpolate1("\n ",f.ɵɵpipeBind1(18,26,"invited"),"\n "),f.ɵɵadvance(2),f.ɵɵproperty("ngIf",t.invitedCount),f.ɵɵadvance(3),f.ɵɵproperty("ngClass",f.ɵɵpureFunction1(56,xe,t.status==t.userStatusType.Accepted)),f.ɵɵadvance(1),f.ɵɵtextInterpolate1("\n ",f.ɵɵpipeBind1(24,28,"accepted"),"\n "),f.ɵɵadvance(2),f.ɵɵproperty("ngIf",t.acceptedCount),f.ɵɵadvance(7),f.ɵɵtextInterpolate(f.ɵɵpipeBind1(33,30,"search")),f.ɵɵadvance(3),f.ɵɵpropertyInterpolate("placeholder",f.ɵɵpipeBind1(36,32,"search")),f.ɵɵproperty("ngModel",t.searchText),f.ɵɵadvance(6),f.ɵɵpropertyInterpolate("appA11yTitle",f.ɵɵpipeBind1(42,34,"options")),f.ɵɵadvance(11),f.ɵɵtextInterpolate1("\n ",f.ɵɵpipeBind1(53,36,"reinviteSelected"),"\n "),f.ɵɵadvance(3),f.ɵɵproperty("ngIf",t.showBulkConfirmUsers),f.ɵɵadvance(5),f.ɵɵtextInterpolate1("\n ",f.ɵɵpipeBind1(61,38,"remove"),"\n "),f.ɵɵadvance(8),f.ɵɵtextInterpolate1("\n ",f.ɵɵpipeBind1(69,40,"selectAll"),"\n "),f.ɵɵadvance(6),f.ɵɵtextInterpolate1("\n ",f.ɵɵpipeBind1(75,42,"unselectAll"),"\n "),f.ɵɵadvance(8),f.ɵɵtextInterpolate1("\n ",f.ɵɵpipeBind1(83,44,"inviteUser"),"\n "),f.ɵɵadvance(5),f.ɵɵproperty("ngIf",t.loading),f.ɵɵadvance(2),f.ɵɵproperty("ngIf",!t.loading&&(t.isPaging()?t.pagedUsers:f.ɵɵpipeBindV(90,46,f.ɵɵpureFunction2(58,Se,t.users,t.searchText)))))},directives:[T.NgClass,T.NgIf,M.DefaultValueAccessor,M.NgControlStatus,M.NgModel,B.A11yTitleDirective,D.StopClickDirective,T.NgForOf,R.CalloutComponent,M.CheckboxControlValueAccessor,F.StopPropDirective,U.AvatarComponent],pipes:[V.I18nPipe,N.SearchPipe,_.UserNamePipe],encapsulation:2})},20913:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UserAddEditComponent=void 0;const r=n(32621),o=(n(91674),n(51554),n(36631),n(73828),n(30185)),a=n(96926),s=n(7896),l=n(731),c=n(32621),d=n(91674),p=n(51554),u=n(73828),m=n(36631),h=n(96832),v=n(56820),f=n(57490),g=n(8863),y=n(99729);function x(e,t){if(1&e&&(c.ɵɵelementStart(0,"small",16),c.ɵɵtext(1),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext();c.ɵɵadvance(1),c.ɵɵtextInterpolate(e.name)}}function S(e,t){1&e&&(c.ɵɵelementStart(0,"div",17),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",18),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",19),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"loading")))}function b(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"p"),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"div",28),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"label",29),c.ɵɵtext(9),c.ɵɵpipe(10,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(11,"\n "),c.ɵɵelementStart(12,"input",30),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).emails=t})),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"small",16),c.ɵɵtext(15),c.ɵɵpipe(16,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(17,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(18,"\n "),c.ɵɵelementContainerEnd()}if(2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(4,4,"providerInviteUserDesc")),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(10,6,"email")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.emails),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind2(16,8,"inviteMultipleEmailDesc","20"))}}function w(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div",17),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,b,19,11,"ng-container",20),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"h3"),c.ɵɵtext(5),c.ɵɵpipe(6,"i18n"),c.ɵɵelementStart(7,"a",21),c.ɵɵpipe(8,"i18n"),c.ɵɵtext(9,"\n "),c.ɵɵelement(10,"i",22),c.ɵɵtext(11,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(12,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"div",23),c.ɵɵtext(15,"\n "),c.ɵɵelementStart(16,"input",24),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext().type=t})),c.ɵɵelementEnd(),c.ɵɵtext(17,"\n "),c.ɵɵelementStart(18,"label",25),c.ɵɵtext(19),c.ɵɵpipe(20,"i18n"),c.ɵɵelementStart(21,"small"),c.ɵɵtext(22),c.ɵɵpipe(23,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(24,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(25,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(26,"\n "),c.ɵɵelementStart(27,"div",23),c.ɵɵtext(28,"\n "),c.ɵɵelementStart(29,"input",26),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext().type=t})),c.ɵɵelementEnd(),c.ɵɵtext(30,"\n "),c.ɵɵelementStart(31,"label",27),c.ɵɵtext(32),c.ɵɵpipe(33,"i18n"),c.ɵɵelementStart(34,"small"),c.ɵɵtext(35),c.ɵɵpipe(36,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(37,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(38,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(39,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵnextContext();c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!e.editMode),c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(6,11,"userType"),"\n "),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(8,13,"learnMore")),c.ɵɵadvance(9),c.ɵɵproperty("value",e.userType.ServiceUser)("ngModel",e.type),c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(20,15,"serviceUser"),"\n "),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(23,17,"serviceUserDesc")),c.ɵɵadvance(7),c.ɵɵproperty("value",e.userType.ProviderAdmin)("ngModel",e.type),c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(33,19,"providerAdmin"),"\n "),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(36,21,"providerAdminDesc"))}}function C(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"button",31,32),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext().delete()})),c.ɵɵpipe(2,"i18n"),c.ɵɵtext(3,"\n "),c.ɵɵelement(4,"i",33),c.ɵɵtext(5,"\n "),c.ɵɵelement(6,"i",34),c.ɵɵpipe(7,"i18n"),c.ɵɵtext(8,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵreference(1),t=c.ɵɵnextContext();c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(2,6,"delete")),c.ɵɵproperty("disabled",e.loading)("appApiAction",t.deletePromise),c.ɵɵadvance(4),c.ɵɵproperty("hidden",e.loading),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(7,8,"loading")),c.ɵɵproperty("hidden",!e.loading)}}class I{constructor(e,t,n,i){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.logService=i,this.onSavedUser=new r.EventEmitter,this.onDeletedUser=new r.EventEmitter,this.loading=!0,this.editMode=!1,this.type=o.ProviderUserType.ServiceUser,this.permissions=new a.PermissionsApi,this.showCustom=!1,this.access="selected",this.userType=o.ProviderUserType}ngOnInit(){return i(this,void 0,void 0,(function*(){if(this.editMode=this.loading=null!=this.providerUserId,this.editMode){this.editMode=!0,this.title=this.i18nService.t("editUser");try{const e=yield this.apiService.getProviderUser(this.providerId,this.providerUserId);this.type=e.type}catch(e){this.logService.error(e)}}else this.title=this.i18nService.t("inviteUser");this.loading=!1}))}submit(){return i(this,void 0,void 0,(function*(){try{if(this.editMode){const e=new l.ProviderUserUpdateRequest;e.type=this.type,this.formPromise=this.apiService.putProviderUser(this.providerId,this.providerUserId,e)}else{const e=new s.ProviderUserInviteRequest;e.emails=this.emails.trim().split(/\s*,\s*/),e.type=this.type,this.formPromise=this.apiService.postProviderUserInvite(this.providerId,e)}yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t(this.editMode?"editedUserId":"invitedUsers",this.name)),this.onSavedUser.emit()}catch(e){this.logService.error(e)}}))}delete(){return i(this,void 0,void 0,(function*(){if(!this.editMode)return;if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("removeUserConfirmation"),this.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{this.deletePromise=this.apiService.deleteProviderUser(this.providerId,this.providerUserId),yield this.deletePromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("removedUserId",this.name)),this.onDeletedUser.emit()}catch(e){this.logService.error(e)}}))}}t.UserAddEditComponent=I,I.ɵfac=function(e){return new(e||I)(c.ɵɵdirectiveInject(d.ApiService),c.ɵɵdirectiveInject(p.I18nService),c.ɵɵdirectiveInject(u.PlatformUtilsService),c.ɵɵdirectiveInject(m.LogService))},I.ɵcmp=c.ɵɵdefineComponent({type:I,selectors:[["provider-user-add-edit"]],inputs:{name:"name",providerUserId:"providerUserId",providerId:"providerId"},outputs:{onSavedUser:"onSavedUser",onDeletedUser:"onDeletedUser"},decls:51,vars:19,consts:[["role","dialog","aria-modal","true","aria-labelledby","userAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","userAddEditTitle",1,"modal-title"],["class","text-muted",4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"ml-auto"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click",4,"ngIf"],[1,"text-muted"],[1,"modal-body"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[4,"ngIf"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/provider-users/",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],[1,"form-check","mt-2","form-check-block"],["type","radio","name","userType","id","userTypeServiceUser",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","userTypeServiceUser",1,"form-check-label"],["type","radio","name","userType","id","userTypeProviderAdmin",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","userTypeProviderAdmin",1,"form-check-label"],[1,"form-group","mb-4"],["for","emails"],["id","emails","type","text","name","Emails","required","","appAutoFocus","",1,"form-control",3,"ngModel","ngModelChange"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click"],["deleteBtn",""],["aria-hidden","true",1,"bwi","bwi-trash","bwi-lg","bwi-fw",3,"hidden"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-lg","bwi-fw",3,"hidden","title"]],template:function(e,t){if(1&e&&(c.ɵɵelementStart(0,"div",0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",1),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"form",2,3),c.ɵɵlistener("ngSubmit",(function(){return t.submit()})),c.ɵɵtext(6,"\n "),c.ɵɵelementStart(7,"div",4),c.ɵɵtext(8,"\n "),c.ɵɵelementStart(9,"h2",5),c.ɵɵtext(10),c.ɵɵtemplate(11,x,2,1,"small",6),c.ɵɵtext(12,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"button",7),c.ɵɵpipe(15,"i18n"),c.ɵɵtext(16,"\n "),c.ɵɵelementStart(17,"span",8),c.ɵɵtext(18,"×"),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(20,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(21,"\n "),c.ɵɵtemplate(22,S,9,6,"div",9),c.ɵɵtext(23,"\n "),c.ɵɵtemplate(24,w,40,23,"div",9),c.ɵɵtext(25,"\n "),c.ɵɵelementStart(26,"div",10),c.ɵɵtext(27,"\n "),c.ɵɵelementStart(28,"button",11),c.ɵɵtext(29,"\n "),c.ɵɵelement(30,"i",12),c.ɵɵpipe(31,"i18n"),c.ɵɵtext(32,"\n "),c.ɵɵelementStart(33,"span"),c.ɵɵtext(34),c.ɵɵpipe(35,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(36,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(37,"\n "),c.ɵɵelementStart(38,"button",13),c.ɵɵtext(39),c.ɵɵpipe(40,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(41,"\n "),c.ɵɵelementStart(42,"div",14),c.ɵɵtext(43,"\n "),c.ɵɵtemplate(44,C,9,10,"button",15),c.ɵɵtext(45,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(46,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(47,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(48,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(49,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(50,"\n")),2&e){const e=c.ɵɵreference(5);c.ɵɵadvance(4),c.ɵɵproperty("appApiAction",t.formPromise),c.ɵɵadvance(6),c.ɵɵtextInterpolate1("\n ",t.title,"\n "),c.ɵɵadvance(1),c.ɵɵproperty("ngIf",t.name),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(15,11,"close")),c.ɵɵadvance(8),c.ɵɵproperty("ngIf",t.loading),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!t.loading),c.ɵɵadvance(4),c.ɵɵproperty("disabled",e.loading),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(31,13,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(35,15,"save")),c.ɵɵadvance(5),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(40,17,"cancel"),"\n "),c.ɵɵadvance(5),c.ɵɵproperty("ngIf",t.editMode)}},directives:[h.NgControlStatusGroup,h.NgForm,v.ApiActionDirective,f.NgIf,g.A11yTitleDirective,h.RadioControlValueAccessor,h.DefaultValueAccessor,h.NgControlStatus,h.NgModel,h.RequiredValidator],pipes:[y.I18nPipe],encapsulation:2})},42204:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ProvidersLayoutComponent=void 0;n(68012),n(68291);const r=n(32621),o=n(68012),a=n(68291),s=n(53280),l=n(57490),c=n(59964),d=n(15370),p=n(99729);function u(e,t){1&e&&(r.ɵɵelementStart(0,"div",11),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",12),r.ɵɵtext(3,"\n "),r.ɵɵelement(4,"i",13),r.ɵɵtext(5),r.ɵɵpipe(6,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(7,"\n "),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(6,1,"providerIsDisabled"),"\n "))}function m(e,t){if(1&e&&(r.ɵɵelementStart(0,"li",15),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"a",19),r.ɵɵtext(3,"\n "),r.ɵɵelement(4,"i",20),r.ɵɵtext(5),r.ɵɵpipe(6,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(7,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(3);r.ɵɵadvance(2),r.ɵɵproperty("routerLink",e.manageRoute),r.ɵɵadvance(3),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(6,2,"manage"),"\n ")}}function h(e,t){1&e&&(r.ɵɵelementStart(0,"li",15),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"a",21),r.ɵɵtext(3,"\n "),r.ɵɵelement(4,"i",22),r.ɵɵtext(5),r.ɵɵpipe(6,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(7,"\n "),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(6,1,"settings"),"\n "))}function v(e,t){if(1&e&&(r.ɵɵelementStart(0,"ul",14),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"li",15),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"a",16),r.ɵɵtext(5,"\n "),r.ɵɵelement(6,"i",17),r.ɵɵtext(7),r.ɵɵpipe(8,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(10,"\n "),r.ɵɵtemplate(11,m,8,4,"li",18),r.ɵɵtext(12,"\n "),r.ɵɵtemplate(13,h,8,3,"li",18),r.ɵɵtext(14,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(7),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(8,3,"clients"),"\n "),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",e.showManageTab),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.showSettingsTab)}}function f(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",2),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",3),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",4),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"div",5),r.ɵɵtext(7,"\n "),r.ɵɵelement(8,"app-avatar",6),r.ɵɵtext(9,"\n "),r.ɵɵelementStart(10,"div",7),r.ɵɵtext(11,"\n "),r.ɵɵelementStart(12,"span"),r.ɵɵtext(13),r.ɵɵelementEnd(),r.ɵɵtext(14,"\n "),r.ɵɵelementStart(15,"small",8),r.ɵɵtext(16),r.ɵɵpipe(17,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵtemplate(20,u,8,3,"div",9),r.ɵɵtext(21,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(22,"\n "),r.ɵɵtemplate(23,v,15,5,"ul",10),r.ɵɵtext(24,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(25,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(26,"\n"),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(8),r.ɵɵproperty("data",e.provider.name)("circle",!0),r.ɵɵadvance(5),r.ɵɵtextInterpolate(e.provider.name),r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(17,6,"provider")),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",!e.provider.enabled),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",e.showMenuBar)}}class g{constructor(e,t){this.route=e,this.providerService=t}ngOnInit(){document.body.classList.remove("layout_frontend"),this.route.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.providerId=e.providerId,yield this.load()}))))}load(){return i(this,void 0,void 0,(function*(){this.provider=yield this.providerService.get(this.providerId)}))}get showMenuBar(){return this.showManageTab||this.showSettingsTab}get showManageTab(){return this.provider.canManageUsers||this.provider.canAccessEventLogs}get showSettingsTab(){return this.provider.isProviderAdmin}get manageRoute(){switch(!0){case this.provider.canManageUsers:return"manage/people";case this.provider.canAccessEventLogs:return"manage/events"}}}t.ProvidersLayoutComponent=g,g.ɵfac=function(e){return new(e||g)(r.ɵɵdirectiveInject(o.ActivatedRoute),r.ɵɵdirectiveInject(a.ProviderService))},g.ɵcmp=r.ɵɵdefineComponent({type:g,selectors:[["providers-layout"]],decls:11,vars:1,consts:[["class","org-nav",4,"ngIf"],[1,"container","page-content"],[1,"org-nav"],[1,"container","d-flex"],[1,"d-flex","flex-column"],[1,"my-auto","d-flex","align-items-center","pl-1"],["size","45",3,"data","circle"],[1,"org-name","ml-3"],[1,"text-muted"],["class","ml-3 card border-danger text-danger bg-transparent",4,"ngIf"],["class","nav nav-tabs",4,"ngIf"],[1,"ml-3","card","border-danger","text-danger","bg-transparent"],[1,"card-body","py-2"],["aria-hidden","true",1,"bwi","bwi-exclamation-triangle"],[1,"nav","nav-tabs"],[1,"nav-item"],["routerLink","clients","routerLinkActive","active",1,"nav-link"],["aria-hidden","true",1,"bwi","bwi-bank"],["class","nav-item",4,"ngIf"],["routerLinkActive","active",1,"nav-link",3,"routerLink"],["aria-hidden","true",1,"bwi","bwi-sliders"],["routerLink","settings","routerLinkActive","active",1,"nav-link"],["aria-hidden","true",1,"bwi","bwi-cogs"]],template:function(e,t){1&e&&(r.ɵɵelement(0,"app-navbar"),r.ɵɵtext(1,"\n"),r.ɵɵtemplate(2,f,27,8,"div",0),r.ɵɵtext(3,"\n"),r.ɵɵelementStart(4,"div",1),r.ɵɵtext(5,"\n "),r.ɵɵelement(6,"router-outlet"),r.ɵɵtext(7,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n"),r.ɵɵelement(9,"app-footer"),r.ɵɵtext(10,"\n")),2&e&&(r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.provider))},directives:[s.NavbarComponent,l.NgIf,o.RouterOutlet,c.FooterComponent,d.AvatarComponent,o.RouterLinkWithHref,o.RouterLinkActive],pipes:[p.I18nPipe],encapsulation:2})},16077:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProvidersRoutingModule=void 0;const i=n(68012),r=n(76299),o=n(47880),a=n(16823),s=n(30773),l=n(29063),c=n(53402),d=n(82074),p=n(60261),u=n(34221),m=n(42378),h=n(13346),v=n(71601),f=n(42204),g=n(41860),y=n(79222),x=n(6499),S=n(7529),b=n(32621),w=(n(68012),[{path:"",canActivate:[r.AuthGuard],component:s.ProvidersComponent},{path:"",component:a.FrontendLayoutComponent,children:[{path:"setup-provider",component:x.SetupProviderComponent,data:{titleId:"setupProvider"}},{path:"accept-provider",component:u.AcceptProviderComponent,data:{titleId:"acceptProvider"}}]},{path:"",canActivate:[r.AuthGuard],children:[{path:"setup",component:S.SetupComponent},{path:":providerId",component:f.ProvidersLayoutComponent,canActivate:[p.ProviderGuard],children:[{path:"",pathMatch:"full",redirectTo:"clients"},{path:"clients/create",component:c.CreateOrganizationComponent},{path:"clients",component:l.ClientsComponent,data:{titleId:"clients"}},{path:"manage",component:h.ManageComponent,children:[{path:"",pathMatch:"full",redirectTo:"people"},{path:"people",component:v.PeopleComponent,canActivate:[d.PermissionsGuard],data:{titleId:"people",permissions:[o.Permissions.ManageUsers]}},{path:"events",component:m.EventsComponent,canActivate:[d.PermissionsGuard],data:{titleId:"eventLogs",permissions:[o.Permissions.AccessEventLogs]}}]},{path:"settings",component:y.SettingsComponent,children:[{path:"",pathMatch:"full",redirectTo:"account"},{path:"account",component:g.AccountComponent,canActivate:[d.PermissionsGuard],data:{titleId:"myProvider",permissions:[o.Permissions.ManageProvider]}}]}]}]}]);class C{}t.ProvidersRoutingModule=C,C.ɵfac=function(e){return new(e||C)},C.ɵmod=b.ɵɵdefineNgModule({type:C}),C.ɵinj=b.ɵɵdefineInjector({imports:[[i.RouterModule.forChild(w)],i.RouterModule]})},33150:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProvidersModule=void 0;const i=n(57490),r=(n(32621),n(96832)),o=n(44926),a=(n(64684),n(77537)),s=n(32656),l=n(82074),c=n(60261),d=n(16077),p=n(49003),u=n(32621),m=n(64684);class h{constructor(e,t){e.registerComponentFactoryResolver(s.AddOrganizationComponent,t)}}t.ProvidersModule=h,h.ɵfac=function(e){return new(e||h)(u.ɵɵinject(m.ModalService),u.ɵɵinject(u.ComponentFactoryResolver))},h.ɵmod=u.ɵɵdefineNgModule({type:h}),h.ɵinj=u.ɵɵdefineInjector({providers:[p.WebProviderService,c.ProviderGuard,l.PermissionsGuard],imports:[[i.CommonModule,r.FormsModule,a.OssModule,o.JslibModule,d.ProvidersRoutingModule]]})},49003:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.WebProviderService=void 0;n(91674),n(85714),n(9724);const r=n(47298),o=n(32621),a=n(85714),s=n(9724),l=n(91674);class c{constructor(e,t,n){this.cryptoService=e,this.syncService=t,this.apiService=n}addOrganizationToProvider(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.cryptoService.getOrgKey(t),i=yield this.cryptoService.getProviderKey(e),o=yield this.cryptoService.encrypt(n.key,i),a=new r.ProviderAddOrganizationRequest;a.organizationId=t,a.key=o.encryptedString;const s=yield this.apiService.postProviderAddOrganization(e,a);return yield this.syncService.fullSync(!0),s}))}detachOrganizastion(e,t){return i(this,void 0,void 0,(function*(){yield this.apiService.deleteProviderOrganization(e,t),yield this.syncService.fullSync(!0)}))}}t.WebProviderService=c,c.ɵfac=function(e){return new(e||c)(o.ɵɵinject(a.CryptoService),o.ɵɵinject(s.SyncService),o.ɵɵinject(l.ApiService))},c.ɵprov=o.ɵɵdefineInjectable({token:c,factory:c.ɵfac})},41860:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AccountComponent=void 0;n(68012),n(91674),n(51554),n(36631),n(73828),n(9724);const r=n(23839),o=n(32621),a=n(91674),s=n(51554),l=n(68012),c=n(9724),d=n(73828),p=n(36631),u=n(57490),m=n(96832),h=n(56820),v=n(15370),f=n(99729);function g(e,t){1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",3),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",4),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function y(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"form",5,6),o.ɵɵlistener("ngSubmit",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext().submit()})),o.ɵɵtext(2,"\n "),o.ɵɵelementStart(3,"div",7),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"div",8),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"div",9),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"label",10),o.ɵɵtext(10),o.ɵɵpipe(11,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementStart(13,"input",11),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().provider.name=t})),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"div",9),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"label",12),o.ɵɵtext(19),o.ɵɵpipe(20,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"input",13),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().provider.billingEmail=t})),o.ɵɵelementEnd(),o.ɵɵtext(23,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵelementStart(26,"div",8),o.ɵɵtext(27,"\n "),o.ɵɵelement(28,"app-avatar",14),o.ɵɵtext(29,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(30,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(31,"\n "),o.ɵɵelementStart(32,"button",15),o.ɵɵtext(33,"\n "),o.ɵɵelement(34,"i",16),o.ɵɵpipe(35,"i18n"),o.ɵɵtext(36,"\n "),o.ɵɵelementStart(37,"span"),o.ɵɵtext(38),o.ɵɵpipe(39,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(40,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(41,"\n"),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵreference(1),t=o.ɵɵnextContext();o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(10),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(11,11,"providerName")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",t.provider.name)("disabled",t.selfHosted),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(20,13,"billingEmail")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",t.provider.billingEmail)("disabled",t.selfHosted),o.ɵɵadvance(6),o.ɵɵpropertyInterpolate("data",t.provider.name),o.ɵɵadvance(4),o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(35,15,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(39,17,"save"))}}class x{constructor(e,t,n,i,r,o){this.apiService=e,this.i18nService=t,this.route=n,this.syncService=i,this.platformUtilsService=r,this.logService=o,this.selfHosted=!1,this.loading=!0}ngOnInit(){return i(this,void 0,void 0,(function*(){this.selfHosted=this.platformUtilsService.isSelfHost(),this.route.parent.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.providerId=e.providerId;try{this.provider=yield this.apiService.getProvider(this.providerId)}catch(t){this.logService.error(`Handled exception: ${t}`)}})))),this.loading=!1}))}submit(){return i(this,void 0,void 0,(function*(){try{const e=new r.ProviderUpdateRequest;e.name=this.provider.name,e.businessName=this.provider.businessName,e.billingEmail=this.provider.billingEmail,this.formPromise=this.apiService.putProvider(this.providerId,e).then((()=>this.syncService.fullSync(!0))),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("providerUpdated"))}catch(e){this.logService.error(`Handled exception: ${e}`)}}))}}t.AccountComponent=x,x.ɵfac=function(e){return new(e||x)(o.ɵɵdirectiveInject(a.ApiService),o.ɵɵdirectiveInject(s.I18nService),o.ɵɵdirectiveInject(l.ActivatedRoute),o.ɵɵdirectiveInject(c.SyncService),o.ɵɵdirectiveInject(d.PlatformUtilsService),o.ɵɵdirectiveInject(p.LogService))},x.ɵcmp=o.ɵɵdefineComponent({type:x,selectors:[["provider-account"]],decls:11,vars:5,consts:[[1,"page-header"],[4,"ngIf"],["ngNativeValidate","",3,"appApiAction","ngSubmit",4,"ngIf"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"row"],[1,"col-6"],[1,"form-group"],["for","name"],["id","name","type","text","name","Name",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","billingEmail"],["id","billingEmail","type","text","name","BillingEmail",1,"form-control",3,"ngModel","disabled","ngModelChange"],["dynamic","true","size","75","fontSize","35",3,"data"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h1"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n"),o.ɵɵtemplate(7,g,9,6,"div",1),o.ɵɵtext(8,"\n"),o.ɵɵtemplate(9,y,42,19,"form",2),o.ɵɵtext(10,"\n")),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,3,"myProvider")),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",t.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.provider&&!t.loading))},directives:[u.NgIf,m.NgControlStatusGroup,m.NgForm,h.ApiActionDirective,m.DefaultValueAccessor,m.NgControlStatus,m.NgModel,v.AvatarComponent],pipes:[f.I18nPipe],encapsulation:2})},79222:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsComponent=void 0;n(68012),n(68291);const r=n(32621),o=n(68012),a=n(68291),s=n(99729);class l{constructor(e,t){this.route=e,this.providerService=t}ngOnInit(){this.route.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){yield this.providerService.get(e.providerId)}))))}}t.SettingsComponent=l,l.ɵfac=function(e){return new(e||l)(r.ɵɵdirectiveInject(o.ActivatedRoute),r.ɵɵdirectiveInject(a.ProviderService))},l.ɵcmp=r.ɵɵdefineComponent({type:l,selectors:[["provider-settings"]],decls:28,vars:6,consts:[[1,"container","page-content"],[1,"row"],[1,"col-3"],[1,"card"],[1,"card-header"],[1,"list-group","list-group-flush"],["routerLink","account","routerLinkActive","active",1,"list-group-item"],[1,"col-9"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",2),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"div",3),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"div",4),r.ɵɵtext(9),r.ɵɵpipe(10,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n "),r.ɵɵelementStart(12,"div",5),r.ɵɵtext(13,"\n "),r.ɵɵelementStart(14,"a",6),r.ɵɵtext(15),r.ɵɵpipe(16,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(17,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(20,"\n "),r.ɵɵelementStart(21,"div",7),r.ɵɵtext(22,"\n "),r.ɵɵelement(23,"router-outlet"),r.ɵɵtext(24,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(25,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(26,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(27,"\n")),2&e&&(r.ɵɵadvance(9),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(10,2,"settings")),r.ɵɵadvance(6),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(16,4,"myProvider"),"\n "))},directives:[o.RouterLinkWithHref,o.RouterLinkActive,o.RouterOutlet],pipes:[s.I18nPipe],encapsulation:2})},6499:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SetupProviderComponent=void 0;const r=n(50009),o=n(32621),a=n(57490),s=n(68012),l=n(99729);function c(e,t){1&e&&(o.ɵɵelementStart(0,"div",2),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div"),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"img",3),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"p",4),o.ɵɵtext(7,"\n "),o.ɵɵelement(8,"i",5),o.ɵɵpipe(9,"i18n"),o.ɵɵtext(10,"\n "),o.ɵɵelementStart(11,"span",6),o.ɵɵtext(12),o.ɵɵpipe(13,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(8),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(9,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(13,4,"loading")))}const d=function(e){return{email:e}};function p(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",7),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",8),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"div",9),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"p",10),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"div",11),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"div",12),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"p"),o.ɵɵtext(15),o.ɵɵpipe(16,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵelement(18,"hr"),o.ɵɵtext(19,"\n "),o.ɵɵelementStart(20,"div",13),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"a",14),o.ɵɵtext(23),o.ɵɵpipe(24,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(28,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(30,"\n"),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,4,"setupProvider")),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(16,6,"setupProviderLoginDesc")),o.ɵɵadvance(7),o.ɵɵproperty("queryParams",o.ɵɵpureFunction1(10,d,e.email)),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(24,8,"logIn"),"\n ")}}class u extends r.BaseAcceptComponent{constructor(){super(...arguments),this.failedShortMessage="inviteAcceptFailedShort",this.failedMessage="inviteAcceptFailed",this.requiredParameters=["providerId","email","token"]}authedHandler(e){return i(this,void 0,void 0,(function*(){this.router.navigate(["/providers/setup"],{queryParams:e})}))}unauthedHandler(e){return i(this,void 0,void 0,(function*(){}))}}t.SetupProviderComponent=u,u.ɵfac=function(){let e;return function(t){return(e||(e=o.ɵɵgetInheritedFactory(u)))(t||u)}}(),u.ɵcmp=o.ɵɵdefineComponent({type:u,selectors:[["app-setup-provider"]],features:[o.ɵɵInheritDefinitionFeature],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"]],template:function(e,t){1&e&&(o.ɵɵtemplate(0,c,17,6,"div",0),o.ɵɵtext(1,"\n"),o.ɵɵtemplate(2,p,31,12,"div",1),o.ɵɵtext(3,"\n")),2&e&&(o.ɵɵproperty("ngIf",t.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!t.loading&&!t.authed))},directives:[a.NgIf,s.RouterLinkWithHref],pipes:[l.I18nPipe],encapsulation:2})},7529:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SetupComponent=void 0;n(68012);const r=n(14857),o=(n(47594),n(91674),n(85714),n(51554),n(73828),n(9724),n(22748)),a=n(32621),s=n(68012),l=n(73828),c=n(51554),d=n(85714),p=n(91674),u=n(9724),m=n(47594),h=n(53280),v=n(57490),f=n(59964),g=n(96832),y=n(56820),x=n(99729);function S(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"button",16),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);return a.ɵɵnextContext(2).cancel()})),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(2,1,"cancel"),"\n "))}function b(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"form",3,4),a.ɵɵlistener("ngSubmit",(function(){a.ɵɵrestoreView(e);return a.ɵɵnextContext().submit()})),a.ɵɵtext(2,"\n "),a.ɵɵelementStart(3,"h2",5),a.ɵɵtext(4),a.ɵɵpipe(5,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"div",6),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"div",7),a.ɵɵtext(10,"\n "),a.ɵɵelementStart(11,"label",8),a.ɵɵtext(12),a.ɵɵpipe(13,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementStart(15,"input",9),a.ɵɵlistener("ngModelChange",(function(t){a.ɵɵrestoreView(e);return a.ɵɵnextContext().name=t})),a.ɵɵelementEnd(),a.ɵɵtext(16,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n "),a.ɵɵelementStart(18,"div",7),a.ɵɵtext(19,"\n "),a.ɵɵelementStart(20,"label",10),a.ɵɵtext(21),a.ɵɵpipe(22,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(23,"\n "),a.ɵɵelementStart(24,"input",11),a.ɵɵlistener("ngModelChange",(function(t){a.ɵɵrestoreView(e);return a.ɵɵnextContext().billingEmail=t})),a.ɵɵelementEnd(),a.ɵɵtext(25,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(26,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(27,"\n\n "),a.ɵɵelementStart(28,"div",12),a.ɵɵtext(29,"\n "),a.ɵɵelementStart(30,"button",13),a.ɵɵtext(31,"\n "),a.ɵɵelement(32,"i",14),a.ɵɵpipe(33,"i18n"),a.ɵɵtext(34,"\n "),a.ɵɵelementStart(35,"span"),a.ɵɵtext(36),a.ɵɵpipe(37,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(38,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(39,"\n "),a.ɵɵtemplate(40,S,3,3,"button",15),a.ɵɵtext(41,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(42,"\n "),a.ɵɵelementEnd()}if(2&e){const e=a.ɵɵreference(1),t=a.ɵɵnextContext();a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(5,10,"generalInformation")),a.ɵɵadvance(8),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(13,12,"providerName")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",t.name),a.ɵɵadvance(6),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(22,14,"billingEmail")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",t.billingEmail),a.ɵɵadvance(6),a.ɵɵproperty("disabled",e.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(33,16,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(37,18,"submit")),a.ɵɵadvance(4),a.ɵɵproperty("ngIf",t.showCancel)}}class w{constructor(e,t,n,i,r,o,a,s){this.router=e,this.platformUtilsService=t,this.i18nService=n,this.route=i,this.cryptoService=r,this.apiService=o,this.syncService=a,this.validationService=s,this.loading=!0,this.authed=!1}ngOnInit(){document.body.classList.remove("layout_frontend"),this.route.queryParams.pipe(r.first()).subscribe((e=>i(this,void 0,void 0,(function*(){if(null==e.providerId||null==e.email||null==e.token)return this.platformUtilsService.showToast("error",null,this.i18nService.t("emergencyInviteAcceptFailed"),{timeout:1e4}),void this.router.navigate(["/"]);this.providerId=e.providerId,this.token=e.token;try{const e=yield this.apiService.getProvider(this.providerId);null!=e.name&&this.router.navigate(["/providers",e.id],{replaceUrl:!0})}catch(t){this.validationService.showError(t),this.router.navigate(["/"])}}))))}submit(){return i(this,void 0,void 0,(function*(){this.formPromise=this.doSubmit(),yield this.formPromise,this.formPromise=null}))}doSubmit(){return i(this,void 0,void 0,(function*(){try{const e=(yield this.cryptoService.makeShareKey())[0].encryptedString,t=new o.ProviderSetupRequest;t.name=this.name,t.billingEmail=this.billingEmail,t.token=this.token,t.key=e;const n=yield this.apiService.postProviderSetup(this.providerId,t);this.platformUtilsService.showToast("success",null,this.i18nService.t("providerSetup")),yield this.syncService.fullSync(!0),this.router.navigate(["/providers",n.id])}catch(e){this.validationService.showError(e)}}))}}t.SetupComponent=w,w.ɵfac=function(e){return new(e||w)(a.ɵɵdirectiveInject(s.Router),a.ɵɵdirectiveInject(l.PlatformUtilsService),a.ɵɵdirectiveInject(c.I18nService),a.ɵɵdirectiveInject(s.ActivatedRoute),a.ɵɵdirectiveInject(d.CryptoService),a.ɵɵdirectiveInject(p.ApiService),a.ɵɵdirectiveInject(u.SyncService),a.ɵɵdirectiveInject(m.ValidationService))},w.ɵcmp=a.ɵɵdefineComponent({type:w,selectors:[["provider-setup"]],decls:20,vars:7,consts:[[1,"container","page-content"],[1,"page-header"],["ngNativeValidate","",3,"appApiAction","ngSubmit",4,"ngIf"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"mt-5"],[1,"row"],[1,"form-group","col-6"],["for","name"],["id","name","type","text","name","Name","required","",1,"form-control",3,"ngModel","ngModelChange"],["for","billingEmail"],["id","billingEmail","type","text","name","BillingEmail","required","",1,"form-control",3,"ngModel","ngModelChange"],[1,"mt-4"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","class","btn btn-outline-secondary",3,"click",4,"ngIf"],["type","button",1,"btn","btn-outline-secondary",3,"click"]],template:function(e,t){1&e&&(a.ɵɵelement(0,"app-navbar"),a.ɵɵtext(1,"\n"),a.ɵɵelementStart(2,"div",0),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"div",1),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"h1"),a.ɵɵtext(7),a.ɵɵpipe(8,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(9,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(10,"\n "),a.ɵɵelementStart(11,"p"),a.ɵɵtext(12),a.ɵɵpipe(13,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n\n "),a.ɵɵtemplate(15,b,43,20,"form",2),a.ɵɵtext(16,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n"),a.ɵɵelement(18,"app-footer"),a.ɵɵtext(19,"\n")),2&e&&(a.ɵɵadvance(7),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(8,3,"setupProvider")),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(13,5,"setupProviderDesc")),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",t.loading))},directives:[h.NavbarComponent,v.NgIf,f.FooterComponent,g.NgControlStatusGroup,g.NgForm,y.ApiActionDirective,g.DefaultValueAccessor,g.RequiredValidator,g.NgControlStatus,g.NgModel],pipes:[x.I18nPipe],encapsulation:2})},4758:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AddEditCustomFieldsComponent=void 0;const i=n(83072),r=(n(32621),n(32034),n(51554),n(32773)),o=n(80253),a=n(67577),s=n(82769),l=(n(97144),n(58545)),c=n(32621),d=n(51554),p=n(32034);class u{constructor(e,t){this.i18nService=e,this.eventService=t,this.addFieldType=a.FieldType.Text,this.linkedFieldOptions=[],this.cipherType=r.CipherType,this.fieldType=a.FieldType,this.eventType=o.EventType,this.addFieldTypeOptions=[{name:e.t("cfTypeText"),value:a.FieldType.Text},{name:e.t("cfTypeHidden"),value:a.FieldType.Hidden},{name:e.t("cfTypeBoolean"),value:a.FieldType.Boolean}],this.addFieldLinkedTypeOption={name:this.i18nService.t("cfTypeLinked"),value:a.FieldType.Linked}}ngOnChanges(e){null!=e.thisCipherType&&(this.setLinkedFieldOptions(),e.thisCipherType.firstChange||this.resetCipherLinkedFields())}addField(){null==this.cipher.fields&&(this.cipher.fields=[]);const e=new l.FieldView;e.type=this.addFieldType,e.newField=!0,e.type===a.FieldType.Linked&&(e.linkedId=this.linkedFieldOptions[0].value),this.cipher.fields.push(e)}removeField(e){const t=this.cipher.fields.indexOf(e);t>-1&&this.cipher.fields.splice(t,1)}toggleFieldValue(e){const t=e;t.showValue=!t.showValue,this.editMode&&t.showValue&&this.eventService.collect(o.EventType.Cipher_ClientToggledHiddenFieldVisible,this.cipher.id)}trackByFunction(e,t){return e}drop(e){i.moveItemInArray(this.cipher.fields,e.previousIndex,e.currentIndex)}setLinkedFieldOptions(){if(null==this.cipher.linkedFieldOptions)return;const e=[];this.cipher.linkedFieldOptions.forEach(((t,n)=>e.push({name:this.i18nService.t(t.i18nKey),value:n}))),this.linkedFieldOptions=e.sort(s.Utils.getSortFunction(this.i18nService,"name"))}resetCipherLinkedFields(){null!=this.cipher.fields&&0!==this.cipher.fields.length&&(null!=this.cipher.linkedFieldOptions?this.cipher.fields.filter((e=>e.type===a.FieldType.Linked)).forEach((e=>e.linkedId=this.linkedFieldOptions[0].value)):this.cipher.fields=this.cipher.fields.filter((e=>e.type!==a.FieldType.Linked)))}}t.AddEditCustomFieldsComponent=u,u.ɵfac=function(e){return new(e||u)(c.ɵɵdirectiveInject(d.I18nService),c.ɵɵdirectiveInject(p.EventService))},u.ɵdir=c.ɵɵdefineDirective({type:u,inputs:{cipher:"cipher",thisCipherType:"thisCipherType",editMode:"editMode"},features:[c.ɵɵNgOnChangesFeature]})},7481:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AddEditComponent=void 0;const r=n(32621),o=(n(42982),n(45330),n(3174),n(32034),n(88308),n(51554),n(36631),n(45552),n(63513),n(44809),n(73828),n(62166),n(73569),n(34453)),a=n(32773),s=n(80253),l=n(7368),c=n(49906),d=n(76716),p=n(71703),u=n(82769),m=n(91766),h=n(97144),v=n(48830),f=n(16506),g=n(28331),y=n(99364),x=n(32621),S=n(45330),b=n(88308),w=n(51554),C=n(73828),I=n(42982),E=n(73569),P=n(3174),O=n(45552),k=n(32034),A=n(62166),T=n(36631),M=n(44809),B=n(63513);class D{constructor(e,t,n,i,o,s,l,c,d,u,m,h,v){this.cipherService=e,this.folderService=t,this.i18nService=n,this.platformUtilsService=i,this.auditService=o,this.stateService=s,this.collectionService=l,this.messagingService=c,this.eventService=d,this.policyService=u,this.logService=m,this.passwordRepromptService=h,this.organizationService=v,this.cloneMode=!1,this.folderId=null,this.organizationId=null,this.onSavedCipher=new r.EventEmitter,this.onDeletedCipher=new r.EventEmitter,this.onRestoredCipher=new r.EventEmitter,this.onCancelled=new r.EventEmitter,this.onEditAttachments=new r.EventEmitter,this.onShareCipher=new r.EventEmitter,this.onEditCollections=new r.EventEmitter,this.onGeneratePassword=new r.EventEmitter,this.onGenerateUsername=new r.EventEmitter,this.editMode=!1,this.collections=[],this.showPassword=!1,this.showCardNumber=!1,this.showCardCode=!1,this.cipherType=a.CipherType,this.ownershipOptions=[],this.currentDate=new Date,this.allowPersonal=!0,this.reprompt=!1,this.canUseReprompt=!0,this.typeOptions=[{name:n.t("typeLogin"),value:a.CipherType.Login},{name:n.t("typeCard"),value:a.CipherType.Card},{name:n.t("typeIdentity"),value:a.CipherType.Identity},{name:n.t("typeSecureNote"),value:a.CipherType.SecureNote}],this.cardBrandOptions=[{name:"-- "+n.t("select")+" --",value:null},{name:"Visa",value:"Visa"},{name:"Mastercard",value:"Mastercard"},{name:"American Express",value:"Amex"},{name:"Discover",value:"Discover"},{name:"Diners Club",value:"Diners Club"},{name:"JCB",value:"JCB"},{name:"Maestro",value:"Maestro"},{name:"UnionPay",value:"UnionPay"},{name:n.t("other"),value:"Other"}],this.cardExpMonthOptions=[{name:"-- "+n.t("select")+" --",value:null},{name:"01 - "+n.t("january"),value:"1"},{name:"02 - "+n.t("february"),value:"2"},{name:"03 - "+n.t("march"),value:"3"},{name:"04 - "+n.t("april"),value:"4"},{name:"05 - "+n.t("may"),value:"5"},{name:"06 - "+n.t("june"),value:"6"},{name:"07 - "+n.t("july"),value:"7"},{name:"08 - "+n.t("august"),value:"8"},{name:"09 - "+n.t("september"),value:"9"},{name:"10 - "+n.t("october"),value:"10"},{name:"11 - "+n.t("november"),value:"11"},{name:"12 - "+n.t("december"),value:"12"}],this.identityTitleOptions=[{name:"-- "+n.t("select")+" --",value:null},{name:n.t("mr"),value:n.t("mr")},{name:n.t("mrs"),value:n.t("mrs")},{name:n.t("ms"),value:n.t("ms")},{name:n.t("dr"),value:n.t("dr")}],this.uriMatchOptions=[{name:n.t("defaultMatchDetection"),value:null},{name:n.t("baseDomain"),value:p.UriMatchType.Domain},{name:n.t("host"),value:p.UriMatchType.Host},{name:n.t("startsWith"),value:p.UriMatchType.StartsWith},{name:n.t("regEx"),value:p.UriMatchType.RegularExpression},{name:n.t("exact"),value:p.UriMatchType.Exact},{name:n.t("never"),value:p.UriMatchType.Never}],this.autofillOnPageLoadOptions=[{name:n.t("autoFillOnPageLoadUseDefault"),value:null},{name:n.t("autoFillOnPageLoadYes"),value:!0},{name:n.t("autoFillOnPageLoadNo"),value:!1}]}ngOnInit(){return i(this,void 0,void 0,(function*(){yield this.init()}))}init(){return i(this,void 0,void 0,(function*(){if(this.ownershipOptions.length&&(this.ownershipOptions=[]),yield this.policyService.policyAppliesToUser(c.PolicyType.PersonalOwnership))this.allowPersonal=!1;else{const e=yield this.stateService.getEmail();this.ownershipOptions.push({name:e,value:null})}(yield this.organizationService.getAll()).sort(u.Utils.getSortFunction(this.i18nService,"name")).forEach((e=>{e.enabled&&e.status===l.OrganizationUserStatusType.Confirmed&&this.ownershipOptions.push({name:e.name,value:e.id})})),this.allowPersonal||(this.organizationId=this.ownershipOptions[0].value),this.writeableCollections=yield this.loadCollections(),this.canUseReprompt=yield this.passwordRepromptService.enabled()}))}load(){return i(this,void 0,void 0,(function*(){this.editMode=null!=this.cipherId,this.editMode?(this.editMode=!0,this.cloneMode?(this.cloneMode=!0,this.title=this.i18nService.t("addItem")):this.title=this.i18nService.t("editItem")):this.title=this.i18nService.t("addItem");const e=yield this.stateService.getAddEditCipherInfo();if(null!=e&&(this.cipher=e.cipher,this.collectionIds=e.collectionIds),yield this.stateService.setAddEditCipherInfo(null),null==this.cipher)if(this.editMode){const e=yield this.loadCipher();this.cipher=yield e.decrypt(),this.cloneMode&&(this.cipher.name+=" - "+this.i18nService.t("clone"),null!=this.cipher.organizationId||this.allowPersonal||(this.cipher.organizationId=this.organizationId))}else this.cipher=new h.CipherView,this.cipher.organizationId=null==this.organizationId?null:this.organizationId,this.cipher.folderId=this.folderId,this.cipher.type=null==this.type?a.CipherType.Login:this.type,this.cipher.login=new g.LoginView,this.cipher.login.uris=[new f.LoginUriView],this.cipher.card=new m.CardView,this.cipher.identity=new v.IdentityView,this.cipher.secureNote=new y.SecureNoteView,this.cipher.secureNote.type=d.SecureNoteType.Generic,this.cipher.reprompt=o.CipherRepromptType.None;null==this.cipher||this.editMode&&null==e&&!this.cloneMode||(yield this.organizationChanged(),null!=this.collectionIds&&this.collectionIds.length>0&&this.collections.length>0&&this.collections.forEach((e=>{this.collectionIds.indexOf(e.id)>-1&&(e.checked=!0)}))),this.folders=yield this.folderService.getAllDecrypted(),this.editMode&&this.previousCipherId!==this.cipherId&&this.eventService.collect(s.EventType.Cipher_ClientViewed,this.cipherId),this.previousCipherId=this.cipherId,this.reprompt=this.cipher.reprompt!==o.CipherRepromptType.None}))}submit(){return i(this,void 0,void 0,(function*(){if(this.cipher.isDeleted)return this.restore();if(null==this.cipher.name||""===this.cipher.name)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("nameRequired")),!1;if((!this.editMode||this.cloneMode)&&!this.allowPersonal&&null==this.cipher.organizationId)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("personalOwnershipSubmitError")),!1;this.editMode&&!this.cloneMode||this.cipher.type!==a.CipherType.Login||null==this.cipher.login.uris||1!==this.cipher.login.uris.length||null!=this.cipher.login.uris[0].uri&&""!==this.cipher.login.uris[0].uri||(this.cipher.login.uris=null),this.editMode&&!this.cloneMode||null==this.cipher.organizationId||(this.cipher.collectionIds=null==this.collections?[]:this.collections.filter((e=>e.checked)).map((e=>e.id))),this.cloneMode&&(this.cipher.id=null);const e=yield this.encryptCipher();try{return this.formPromise=this.saveCipher(e),yield this.formPromise,this.cipher.id=e.id,this.platformUtilsService.showToast("success",null,this.i18nService.t(this.editMode&&!this.cloneMode?"editedItem":"addedItem")),this.onSavedCipher.emit(this.cipher),this.messagingService.send(this.editMode&&!this.cloneMode?"editedCipher":"addedCipher"),!0}catch(t){this.logService.error(t)}return!1}))}addUri(){this.cipher.type===a.CipherType.Login&&(null==this.cipher.login.uris&&(this.cipher.login.uris=[]),this.cipher.login.uris.push(new f.LoginUriView))}removeUri(e){if(this.cipher.type!==a.CipherType.Login||null==this.cipher.login.uris)return;const t=this.cipher.login.uris.indexOf(e);t>-1&&this.cipher.login.uris.splice(t,1)}trackByFunction(e,t){return e}cancel(){this.onCancelled.emit(this.cipher)}attachments(){this.onEditAttachments.emit(this.cipher)}share(){this.onShareCipher.emit(this.cipher)}editCollections(){this.onEditCollections.emit(this.cipher)}delete(){return i(this,void 0,void 0,(function*(){if(!(yield this.platformUtilsService.showDialog(this.i18nService.t(this.cipher.isDeleted?"permanentlyDeleteItemConfirmation":"deleteItemConfirmation"),this.i18nService.t("deleteItem"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{this.deletePromise=this.deleteCipher(),yield this.deletePromise,this.platformUtilsService.showToast("success",null,this.i18nService.t(this.cipher.isDeleted?"permanentlyDeletedItem":"deletedItem")),this.onDeletedCipher.emit(this.cipher),this.messagingService.send(this.cipher.isDeleted?"permanentlyDeletedCipher":"deletedCipher")}catch(e){this.logService.error(e)}return!0}))}restore(){return i(this,void 0,void 0,(function*(){if(!this.cipher.isDeleted)return!1;if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("restoreItemConfirmation"),this.i18nService.t("restoreItem"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{this.restorePromise=this.restoreCipher(),yield this.restorePromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("restoredItem")),this.onRestoredCipher.emit(this.cipher),this.messagingService.send("restoredCipher")}catch(e){this.logService.error(e)}return!0}))}generateUsername(){var e,t;return i(this,void 0,void 0,(function*(){if(null===(t=null===(e=this.cipher.login)||void 0===e?void 0:e.username)||void 0===t?void 0:t.length){if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("overwriteUsernameConfirmation"),this.i18nService.t("overwriteUsername"),this.i18nService.t("yes"),this.i18nService.t("no"))))return!1}return this.onGenerateUsername.emit(),!0}))}generatePassword(){var e,t;return i(this,void 0,void 0,(function*(){if(null===(t=null===(e=this.cipher.login)||void 0===e?void 0:e.password)||void 0===t?void 0:t.length){if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("overwritePasswordConfirmation"),this.i18nService.t("overwritePassword"),this.i18nService.t("yes"),this.i18nService.t("no"))))return!1}return this.onGeneratePassword.emit(),!0}))}togglePassword(){this.showPassword=!this.showPassword,document.getElementById("loginPassword").focus(),this.editMode&&this.showPassword&&this.eventService.collect(s.EventType.Cipher_ClientToggledPasswordVisible,this.cipherId)}toggleCardNumber(){return i(this,void 0,void 0,(function*(){this.showCardNumber=!this.showCardNumber,this.showCardNumber&&this.eventService.collect(s.EventType.Cipher_ClientToggledCardNumberVisible,this.cipherId)}))}toggleCardCode(){this.showCardCode=!this.showCardCode,document.getElementById("cardCode").focus(),this.editMode&&this.showCardCode&&this.eventService.collect(s.EventType.Cipher_ClientToggledCardCodeVisible,this.cipherId)}toggleUriOptions(e){const t=e;t.showOptions=(null!=t.showOptions||null==e.match)&&!t.showOptions}loginUriMatchChanged(e){const t=e;t.showOptions=null==t.showOptions||t.showOptions}organizationChanged(){return i(this,void 0,void 0,(function*(){if(null!=this.writeableCollections&&this.writeableCollections.forEach((e=>e.checked=!1)),null!=this.cipher.organizationId){this.collections=this.writeableCollections.filter((e=>e.organizationId===this.cipher.organizationId));const e=yield this.organizationService.get(this.cipher.organizationId);null!=e&&(this.cipher.organizationUseTotp=e.useTotp)}else this.collections=[]}))}checkPassword(){return i(this,void 0,void 0,(function*(){if(null!=this.checkPasswordPromise)return;if(null==this.cipher.login||null==this.cipher.login.password||""===this.cipher.login.password)return;this.checkPasswordPromise=this.auditService.passwordLeaked(this.cipher.login.password);const e=yield this.checkPasswordPromise;this.checkPasswordPromise=null,e>0?this.platformUtilsService.showToast("warning",null,this.i18nService.t("passwordExposed",e.toString())):this.platformUtilsService.showToast("success",null,this.i18nService.t("passwordSafe"))}))}repromptChanged(){this.reprompt=!this.reprompt,this.reprompt?this.cipher.reprompt=o.CipherRepromptType.Password:this.cipher.reprompt=o.CipherRepromptType.None}loadCollections(){return i(this,void 0,void 0,(function*(){return(yield this.collectionService.getAllDecrypted()).filter((e=>!e.readOnly))}))}loadCipher(){return this.cipherService.get(this.cipherId)}encryptCipher(){return this.cipherService.encrypt(this.cipher)}saveCipher(e){return this.cipherService.saveWithServer(e)}deleteCipher(){return this.cipher.isDeleted?this.cipherService.deleteWithServer(this.cipher.id):this.cipherService.softDeleteWithServer(this.cipher.id)}restoreCipher(){return this.cipherService.restoreWithServer(this.cipher.id)}}t.AddEditComponent=D,D.ɵfac=function(e){return new(e||D)(x.ɵɵdirectiveInject(S.CipherService),x.ɵɵdirectiveInject(b.FolderService),x.ɵɵdirectiveInject(w.I18nService),x.ɵɵdirectiveInject(C.PlatformUtilsService),x.ɵɵdirectiveInject(I.AuditService),x.ɵɵdirectiveInject(E.StateService),x.ɵɵdirectiveInject(P.CollectionService),x.ɵɵdirectiveInject(O.MessagingService),x.ɵɵdirectiveInject(k.EventService),x.ɵɵdirectiveInject(A.PolicyService),x.ɵɵdirectiveInject(T.LogService),x.ɵɵdirectiveInject(M.PasswordRepromptService),x.ɵɵdirectiveInject(B.OrganizationService))},D.ɵdir=x.ɵɵdefineDirective({type:D,inputs:{cloneMode:"cloneMode",folderId:"folderId",cipherId:"cipherId",type:"type",collectionIds:"collectionIds",organizationId:"organizationId"},outputs:{onSavedCipher:"onSavedCipher",onDeletedCipher:"onDeletedCipher",onRestoredCipher:"onRestoredCipher",onCancelled:"onCancelled",onEditAttachments:"onEditAttachments",onShareCipher:"onShareCipher",onEditCollections:"onEditCollections",onGeneratePassword:"onGeneratePassword",onGenerateUsername:"onGenerateUsername"}})},93705:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AttachmentsComponent=void 0;const r=n(32621),o=(n(91674),n(45330),n(85714),n(51554),n(36631),n(73828),n(73569),n(33018)),a=n(32621),s=n(45330),l=n(51554),c=n(85714),d=n(73828),p=n(91674),u=n(36631),m=n(73569);class h{constructor(e,t,n,i,o,a,s,l){this.cipherService=e,this.i18nService=t,this.cryptoService=n,this.platformUtilsService=i,this.apiService=o,this.win=a,this.logService=s,this.stateService=l,this.onUploadedAttachment=new r.EventEmitter,this.onDeletedAttachment=new r.EventEmitter,this.onReuploadedAttachment=new r.EventEmitter,this.deletePromises={},this.reuploadPromises={},this.emergencyAccessId=null}ngOnInit(){return i(this,void 0,void 0,(function*(){yield this.init()}))}submit(){return i(this,void 0,void 0,(function*(){if(!this.hasUpdatedKey)return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("updateKey"));const e=document.getElementById("file"),t=e.files;if(null!=t&&0!==t.length)if(t[0].size>524288e3)this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("maxFileSize"));else{try{this.formPromise=this.saveCipherAttachment(t[0]),this.cipherDomain=yield this.formPromise,this.cipher=yield this.cipherDomain.decrypt(),this.platformUtilsService.showToast("success",null,this.i18nService.t("attachmentSaved")),this.onUploadedAttachment.emit()}catch(n){this.logService.error(n)}e.type="",e.type="file",e.value=""}else this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectFile"))}))}delete(e){return i(this,void 0,void 0,(function*(){if(null!=this.deletePromises[e.id])return;if(yield this.platformUtilsService.showDialog(this.i18nService.t("deleteAttachmentConfirmation"),this.i18nService.t("deleteAttachment"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")){try{this.deletePromises[e.id]=this.deleteCipherAttachment(e.id),yield this.deletePromises[e.id],this.platformUtilsService.showToast("success",null,this.i18nService.t("deletedAttachment"));const t=this.cipher.attachments.indexOf(e);t>-1&&this.cipher.attachments.splice(t,1)}catch(t){this.logService.error(t)}this.deletePromises[e.id]=null,this.onDeletedAttachment.emit()}}))}download(e){return i(this,void 0,void 0,(function*(){const t=e;if(t.downloading)return;if(!this.canAccessAttachments)return void this.platformUtilsService.showToast("error",this.i18nService.t("premiumRequired"),this.i18nService.t("premiumRequiredDesc"));let n;try{n=(yield this.apiService.getAttachmentData(this.cipher.id,e.id,this.emergencyAccessId)).url}catch(r){if(!(r instanceof o.ErrorResponse&&404===r.statusCode))throw r instanceof o.ErrorResponse?new Error(r.getSingleMessage()):r;n=e.url}t.downloading=!0;const i=yield fetch(new Request(n,{cache:"no-store"}));if(200!==i.status)return this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred")),void(t.downloading=!1);try{const t=yield i.arrayBuffer(),n=null!=e.key?e.key:yield this.cryptoService.getOrgKey(this.cipher.organizationId),r=yield this.cryptoService.decryptFromBytes(t,n);this.platformUtilsService.saveFile(this.win,r,null,e.fileName)}catch(r){this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred"))}t.downloading=!1}))}init(){return i(this,void 0,void 0,(function*(){this.cipherDomain=yield this.loadCipher(),this.cipher=yield this.cipherDomain.decrypt(),this.hasUpdatedKey=yield this.cryptoService.hasEncKey();const e=yield this.stateService.getCanAccessPremium();if(this.canAccessAttachments=e||null!=this.cipher.organizationId,this.canAccessAttachments){if(!this.hasUpdatedKey){(yield this.platformUtilsService.showDialog(this.i18nService.t("updateKey"),this.i18nService.t("featureUnavailable"),this.i18nService.t("learnMore"),this.i18nService.t("cancel"),"warning"))&&this.platformUtilsService.launchUri("https://bitwarden.com/help/account-encryption-key/#rotate-your-encryption-key")}}else{(yield this.platformUtilsService.showDialog(this.i18nService.t("premiumRequiredDesc"),this.i18nService.t("premiumRequired"),this.i18nService.t("learnMore"),this.i18nService.t("cancel")))&&this.platformUtilsService.launchUri("https://vault.bitwarden.com/#/?premium=purchase")}}))}reuploadCipherAttachment(e,t){return i(this,void 0,void 0,(function*(){const n=e;if(null==e.key&&!n.downloading&&null==this.reuploadPromises[e.id])try{this.reuploadPromises[e.id]=Promise.resolve().then((()=>i(this,void 0,void 0,(function*(){n.downloading=!0;const i=yield fetch(new Request(e.url,{cache:"no-store"}));if(200!==i.status)return this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred")),void(n.downloading=!1);try{const n=yield i.arrayBuffer(),r=null!=e.key?e.key:yield this.cryptoService.getOrgKey(this.cipher.organizationId),o=yield this.cryptoService.decryptFromBytes(n,r);this.cipherDomain=yield this.cipherService.saveAttachmentRawWithServer(this.cipherDomain,e.fileName,o,t),this.cipher=yield this.cipherDomain.decrypt(),this.deletePromises[e.id]=this.deleteCipherAttachment(e.id),yield this.deletePromises[e.id];const a=this.cipher.attachments.filter((t=>t.id===e.id));if(a.length>0){const e=this.cipher.attachments.indexOf(a[0]);e>-1&&this.cipher.attachments.splice(e,1)}this.platformUtilsService.showToast("success",null,this.i18nService.t("attachmentSaved")),this.onReuploadedAttachment.emit()}catch(r){this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred"))}n.downloading=!1})))),yield this.reuploadPromises[e.id]}catch(r){this.logService.error(r)}}))}loadCipher(){return this.cipherService.get(this.cipherId)}saveCipherAttachment(e){return this.cipherService.saveAttachmentWithServer(this.cipherDomain,e)}deleteCipherAttachment(e){return this.cipherService.deleteAttachmentWithServer(this.cipher.id,e)}}t.AttachmentsComponent=h,h.ɵfac=function(e){return new(e||h)(a.ɵɵdirectiveInject(s.CipherService),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(c.CryptoService),a.ɵɵdirectiveInject(d.PlatformUtilsService),a.ɵɵdirectiveInject(p.ApiService),a.ɵɵdirectiveInject(Window),a.ɵɵdirectiveInject(u.LogService),a.ɵɵdirectiveInject(m.StateService))},h.ɵdir=a.ɵɵdefineDirective({type:h,inputs:{cipherId:"cipherId"},outputs:{onUploadedAttachment:"onUploadedAttachment",onDeletedAttachment:"onDeletedAttachment",onReuploadedAttachment:"onReuploadedAttachment"}})},15370:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AvatarComponent=void 0;n(61248),n(1659),n(73569);const r=n(82769),o=n(32621),a=n(61248),s=n(1659),l=n(73569),c=n(57490),d=function(e){return{"rounded-circle":e}};function p(e,t){if(1&e&&o.ɵɵelement(0,"img",1),2&e){const e=o.ɵɵnextContext();o.ɵɵpropertyInterpolate("title",e.data),o.ɵɵproperty("src",e.sanitizer.bypassSecurityTrustResourceUrl(e.src),o.ɵɵsanitizeUrl)("ngClass",o.ɵɵpureFunction1(3,d,e.circle))}}class u{constructor(e,t,n){this.sanitizer=e,this.cryptoFunctionService=t,this.stateService=n,this.size=45,this.charCount=2,this.textColor="#ffffff",this.fontSize=20,this.fontWeight=300,this.dynamic=!1,this.circle=!1}ngOnInit(){this.dynamic||this.generate()}ngOnChanges(){this.dynamic&&this.generate()}generate(){return i(this,void 0,void 0,(function*(){if((yield this.stateService.getEnableGravitars())&&null!=this.email){const e=yield this.cryptoFunctionService.hash(this.email.toLowerCase().trim(),"md5"),t=r.Utils.fromBufferToHex(e).toLowerCase();this.src="https://www.gravatar.com/avatar/"+t+"?s="+this.size+"&r=pg&d=retro"}else{let e=null;const t=this.data.toUpperCase();this.charCount>1&&(e=this.getFirstLetters(t,this.charCount)),null==e&&(e=this.unicodeSafeSubstring(t,this.charCount)),e.match(r.Utils.regexpEmojiPresentation)&&(e=e.match(r.Utils.regexpEmojiPresentation)[0]);const n=this.getCharText(e),i=this.stringToColor(t),o=this.getSvg(this.size,i);o.appendChild(n);const a=window.document.createElement("div").appendChild(o).outerHTML,s=window.btoa(unescape(encodeURIComponent(a)));this.src="data:image/svg+xml;base64,"+s}}))}stringToColor(e){let t=0;for(let i=0;i>8*i&255).toString(16)).substr(-2)}return n}getFirstLetters(e,t){const n=e.split(" ");if(n.length>1){let e="";for(let i=0;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CalloutComponent=void 0;n(51554),n(27053);const i=n(32621),r=n(51554),o=n(57490),a=n(99729);function s(e,t){if(1&e&&i.ɵɵelement(0,"i",6),2&e){const e=i.ɵɵnextContext(2);i.ɵɵclassMapInterpolate1("bwi ",e.icon,"")}}function l(e,t){if(1&e&&(i.ɵɵelementStart(0,"h3",4),i.ɵɵtext(1,"\n "),i.ɵɵtemplate(2,s,1,3,"i",5),i.ɵɵtext(3),i.ɵɵelementEnd()),2&e){const e=i.ɵɵnextContext();i.ɵɵadvance(2),i.ɵɵproperty("ngIf",e.icon),i.ɵɵadvance(1),i.ɵɵtextInterpolate1("\n ",e.title,"\n ")}}function c(e,t){if(1&e&&(i.ɵɵelementStart(0,"li"),i.ɵɵtext(1),i.ɵɵpipe(2,"i18n"),i.ɵɵelementEnd()),2&e){const e=i.ɵɵnextContext(2);i.ɵɵadvance(1),i.ɵɵtextInterpolate1("\n ",i.ɵɵpipeBind2(2,1,"policyInEffectMinComplexity",e.getPasswordScoreAlertDisplay()),"\n ")}}function d(e,t){if(1&e&&(i.ɵɵelementStart(0,"li"),i.ɵɵtext(1),i.ɵɵpipe(2,"i18n"),i.ɵɵelementEnd()),2&e){const e=i.ɵɵnextContext(2);i.ɵɵadvance(1),i.ɵɵtextInterpolate1("\n ",i.ɵɵpipeBind2(2,1,"policyInEffectMinLength",null==e.enforcedPolicyOptions?null:e.enforcedPolicyOptions.minLength.toString()),"\n ")}}function p(e,t){1&e&&(i.ɵɵelementStart(0,"li"),i.ɵɵtext(1),i.ɵɵpipe(2,"i18n"),i.ɵɵelementEnd()),2&e&&(i.ɵɵadvance(1),i.ɵɵtextInterpolate1("\n ",i.ɵɵpipeBind1(2,1,"policyInEffectUppercase"),"\n "))}function u(e,t){1&e&&(i.ɵɵelementStart(0,"li"),i.ɵɵtext(1),i.ɵɵpipe(2,"i18n"),i.ɵɵelementEnd()),2&e&&(i.ɵɵadvance(1),i.ɵɵtextInterpolate1("\n ",i.ɵɵpipeBind1(2,1,"policyInEffectLowercase"),"\n "))}function m(e,t){1&e&&(i.ɵɵelementStart(0,"li"),i.ɵɵtext(1),i.ɵɵpipe(2,"i18n"),i.ɵɵelementEnd()),2&e&&(i.ɵɵadvance(1),i.ɵɵtextInterpolate1("\n ",i.ɵɵpipeBind1(2,1,"policyInEffectNumbers"),"\n "))}function h(e,t){1&e&&(i.ɵɵelementStart(0,"li"),i.ɵɵtext(1),i.ɵɵpipe(2,"i18n"),i.ɵɵelementEnd()),2&e&&(i.ɵɵadvance(1),i.ɵɵtextInterpolate1("\n ",i.ɵɵpipeBind2(2,1,"policyInEffectSpecial","!@#$%^&*"),"\n "))}function v(e,t){if(1&e&&(i.ɵɵelementStart(0,"div",7),i.ɵɵtext(1),i.ɵɵelementStart(2,"ul"),i.ɵɵtext(3,"\n "),i.ɵɵtemplate(4,c,3,4,"li",8),i.ɵɵtext(5,"\n "),i.ɵɵtemplate(6,d,3,4,"li",8),i.ɵɵtext(7,"\n "),i.ɵɵtemplate(8,p,3,3,"li",8),i.ɵɵtext(9,"\n "),i.ɵɵtemplate(10,u,3,3,"li",8),i.ɵɵtext(11,"\n "),i.ɵɵtemplate(12,m,3,3,"li",8),i.ɵɵtext(13,"\n "),i.ɵɵtemplate(14,h,3,4,"li",8),i.ɵɵtext(15,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(16,"\n "),i.ɵɵelementEnd()),2&e){const e=i.ɵɵnextContext();i.ɵɵadvance(1),i.ɵɵtextInterpolate1("\n ",e.enforcedPolicyMessage,"\n "),i.ɵɵadvance(3),i.ɵɵproperty("ngIf",(null==e.enforcedPolicyOptions?null:e.enforcedPolicyOptions.minComplexity)>0),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",(null==e.enforcedPolicyOptions?null:e.enforcedPolicyOptions.minLength)>0),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",null==e.enforcedPolicyOptions?null:e.enforcedPolicyOptions.requireUpper),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",null==e.enforcedPolicyOptions?null:e.enforcedPolicyOptions.requireLower),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",null==e.enforcedPolicyOptions?null:e.enforcedPolicyOptions.requireNumbers),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",null==e.enforcedPolicyOptions?null:e.enforcedPolicyOptions.requireSpecial)}}const f=function(e){return{clickable:e}};class g{constructor(e){this.i18nService=e,this.type="info",this.useAlertRole=!1}ngOnInit(){this.calloutStyle=this.type,void 0===this.enforcedPolicyMessage&&(this.enforcedPolicyMessage=this.i18nService.t("masterPasswordPolicyInEffect")),"warning"===this.type||"danger"===this.type?("danger"===this.type&&(this.calloutStyle="danger"),void 0===this.title&&(this.title=this.i18nService.t("warning")),void 0===this.icon&&(this.icon="bwi-exclamation-triangle")):"error"===this.type?(this.calloutStyle="danger",void 0===this.title&&(this.title=this.i18nService.t("error")),void 0===this.icon&&(this.icon="bwi-error")):"tip"===this.type&&(this.calloutStyle="success",void 0===this.title&&(this.title=this.i18nService.t("tip")),void 0===this.icon&&(this.icon="bwi-lightbulb"))}getPasswordScoreAlertDisplay(){if(null==this.enforcedPolicyOptions)return"";let e;switch(this.enforcedPolicyOptions.minComplexity){case 4:e=this.i18nService.t("strong");break;case 3:e=this.i18nService.t("good");break;default:e=this.i18nService.t("weak")}return e+" ("+this.enforcedPolicyOptions.minComplexity+")"}}t.CalloutComponent=g,g.ɵfac=function(e){return new(e||g)(i.ɵɵdirectiveInject(r.I18nService))},g.ɵcmp=i.ɵɵdefineComponent({type:g,selectors:[["app-callout"]],inputs:{type:"type",icon:"icon",title:"title",clickable:"clickable",enforcedPolicyOptions:"enforcedPolicyOptions",enforcedPolicyMessage:"enforcedPolicyMessage",useAlertRole:"useAlertRole"},ngContentSelectors:["*"],decls:10,vars:9,consts:[[3,"ngClass"],["callout",""],["class","callout-heading",4,"ngIf"],["class","enforced-policy-options",4,"ngIf"],[1,"callout-heading"],["aria-hidden","true",3,"class",4,"ngIf"],["aria-hidden","true"],[1,"enforced-policy-options"],[4,"ngIf"]],template:function(e,t){1&e&&(i.ɵɵprojectionDef(),i.ɵɵelementStart(0,"div",0,1),i.ɵɵtext(2,"\n "),i.ɵɵtemplate(3,l,4,2,"h3",2),i.ɵɵtext(4,"\n "),i.ɵɵtemplate(5,v,17,7,"div",3),i.ɵɵtext(6,"\n "),i.ɵɵprojection(7),i.ɵɵtext(8,"\n"),i.ɵɵelementEnd(),i.ɵɵtext(9,"\n")),2&e&&(i.ɵɵclassMapInterpolate1("callout callout-",t.calloutStyle,""),i.ɵɵproperty("ngClass",i.ɵɵpureFunction1(7,f,t.clickable)),i.ɵɵattribute("role",t.useAlertRole?"alert":null),i.ɵɵadvance(3),i.ɵɵproperty("ngIf",t.title),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",t.enforcedPolicyOptions))},directives:[o.NgClass,o.NgIf],pipes:[a.I18nPipe],encapsulation:2})},60765:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CaptchaProtectedComponent=void 0;n(56071),n(51554),n(73828);const r=n(94700),o=n(82769),a=n(32621),s=n(56071),l=n(51554),c=n(73828);class d{constructor(e,t,n){this.environmentService=e,this.i18nService=t,this.platformUtilsService=n,this.captchaSiteKey=null,this.captchaToken=null}setupCaptcha(){return i(this,void 0,void 0,(function*(){const e=this.environmentService.getWebVaultUrl();this.captcha=new r.CaptchaIFrame(window,e,this.i18nService,(e=>{this.captchaToken=e}),(e=>{this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),e)}),(e=>{this.platformUtilsService.showToast("info",this.i18nService.t("info"),e)}))}))}showCaptcha(){return!o.Utils.isNullOrWhitespace(this.captchaSiteKey)}handleCaptchaRequired(e){return!o.Utils.isNullOrWhitespace(e.captchaSiteKey)&&(this.captchaSiteKey=e.captchaSiteKey,this.captcha.init(e.captchaSiteKey),!0)}}t.CaptchaProtectedComponent=d,d.ɵfac=function(e){return new(e||d)(a.ɵɵdirectiveInject(s.EnvironmentService),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(c.PlatformUtilsService))},d.ɵdir=a.ɵɵdefineDirective({type:d,inputs:{captchaSiteKey:"captchaSiteKey"}})},16545:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ChangePasswordComponent=void 0;n(85714),n(51554),n(45552),n(84275),n(73828),n(62166),n(73569);const r=n(32621),o=n(51554),a=n(85714),s=n(45552),l=n(84275),c=n(73828),d=n(62166),p=n(73569);class u{constructor(e,t,n,i,r,o,a){this.i18nService=e,this.cryptoService=t,this.messagingService=n,this.passwordGenerationService=i,this.platformUtilsService=r,this.policyService=o,this.stateService=a}ngOnInit(){var e;return i(this,void 0,void 0,(function*(){this.email=yield this.stateService.getEmail(),null!==(e=this.enforcedPolicyOptions)&&void 0!==e||(this.enforcedPolicyOptions=yield this.policyService.getMasterPasswordPolicyOptions())}))}submit(){return i(this,void 0,void 0,(function*(){if(!(yield this.strongPassword()))return;if(!(yield this.setupSubmitActions()))return;const e=yield this.stateService.getEmail();null==this.kdf&&(this.kdf=yield this.stateService.getKdfType()),null==this.kdfIterations&&(this.kdfIterations=yield this.stateService.getKdfIterations());const t=yield this.cryptoService.makeKey(this.masterPassword,e.trim().toLowerCase(),this.kdf,this.kdfIterations),n=yield this.cryptoService.hashPassword(this.masterPassword,t);let i=null;i=null==(yield this.cryptoService.getEncKey())?yield this.cryptoService.makeEncKey(t):yield this.cryptoService.remakeEncKey(t),yield this.performSubmitActions(n,t,i)}))}setupSubmitActions(){return i(this,void 0,void 0,(function*(){return!0}))}performSubmitActions(e,t,n){return i(this,void 0,void 0,(function*(){}))}strongPassword(){return i(this,void 0,void 0,(function*(){if(null==this.masterPassword||""===this.masterPassword)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassRequired")),!1;if(this.masterPassword.length<8)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassLength")),!1;if(this.masterPassword!==this.masterPasswordRetype)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassDoesntMatch")),!1;const e=this.passwordGenerationService.passwordStrength(this.masterPassword,this.getPasswordStrengthUserInput());if(null!=this.enforcedPolicyOptions&&!this.policyService.evaluateMasterPassword(e.score,this.masterPassword,this.enforcedPolicyOptions))return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPasswordPolicyRequirementsNotMet")),!1;if(null!=e&&e.score<3){if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("weakMasterPasswordDesc"),this.i18nService.t("weakMasterPassword"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1}return!0}))}updatePasswordStrength(){null!=this.masterPasswordStrengthTimeout&&clearTimeout(this.masterPasswordStrengthTimeout),this.masterPasswordStrengthTimeout=setTimeout((()=>{const e=this.passwordGenerationService.passwordStrength(this.masterPassword,this.getPasswordStrengthUserInput());this.masterPasswordScore=null==e?null:e.score}),300)}logOut(){return i(this,void 0,void 0,(function*(){(yield this.platformUtilsService.showDialog(this.i18nService.t("logOutConfirmation"),this.i18nService.t("logOut"),this.i18nService.t("logOut"),this.i18nService.t("cancel")))&&this.messagingService.send("logout")}))}getPasswordStrengthUserInput(){let e=[];const t=this.email.indexOf("@");return t>-1&&(e=e.concat(this.email.substr(0,t).trim().toLowerCase().split(/[^A-Za-z0-9]/))),e}}t.ChangePasswordComponent=u,u.ɵfac=function(e){return new(e||u)(r.ɵɵdirectiveInject(o.I18nService),r.ɵɵdirectiveInject(a.CryptoService),r.ɵɵdirectiveInject(s.MessagingService),r.ɵɵdirectiveInject(l.PasswordGenerationService),r.ɵɵdirectiveInject(c.PlatformUtilsService),r.ɵɵdirectiveInject(d.PolicyService),r.ɵɵdirectiveInject(p.StateService))},u.ɵdir=r.ɵɵdefineDirective({type:u})},80008:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CiphersComponent=void 0;const r=n(32621),o=(n(60421),n(32621)),a=n(60421);class s{constructor(e){this.searchService=e,this.activeCipherId=null,this.onCipherClicked=new r.EventEmitter,this.onCipherRightClicked=new r.EventEmitter,this.onAddCipher=new r.EventEmitter,this.onAddCipherOptions=new r.EventEmitter,this.loaded=!1,this.ciphers=[],this.searchPlaceholder=null,this.filter=null,this.deleted=!1,this.searchPending=!1,this.searchTimeout=null,this.deletedFilter=e=>e.isDeleted===this.deleted}load(e=null,t=!1){return i(this,void 0,void 0,(function*(){this.deleted=t||!1,yield this.applyFilter(e),this.loaded=!0}))}reload(e=null,t=!1){return i(this,void 0,void 0,(function*(){this.loaded=!1,yield this.load(e,t)}))}refresh(){return i(this,void 0,void 0,(function*(){yield this.reload(this.filter,this.deleted)}))}applyFilter(e=null){return i(this,void 0,void 0,(function*(){this.filter=e,yield this.search(null)}))}search(e=null,t){return i(this,void 0,void 0,(function*(){this.searchPending=!1,null!=this.searchTimeout&&clearTimeout(this.searchTimeout),null!=e?(this.searchPending=!0,this.searchTimeout=setTimeout((()=>i(this,void 0,void 0,(function*(){yield this.doSearch(t),this.searchPending=!1}))),e)):yield this.doSearch(t)}))}selectCipher(e){this.onCipherClicked.emit(e)}rightClickCipher(e){this.onCipherRightClicked.emit(e)}addCipher(){this.onAddCipher.emit()}addCipherOptions(){this.onAddCipherOptions.emit()}isSearching(){return!this.searchPending&&this.searchService.isSearchable(this.searchText)}doSearch(e){return i(this,void 0,void 0,(function*(){this.ciphers=yield this.searchService.searchCiphers(this.searchText,[this.filter,this.deletedFilter],e)}))}}t.CiphersComponent=s,s.ɵfac=function(e){return new(e||s)(o.ɵɵdirectiveInject(a.SearchService))},s.ɵdir=o.ɵɵdefineDirective({type:s,inputs:{activeCipherId:"activeCipherId"},outputs:{onCipherClicked:"onCipherClicked",onCipherRightClicked:"onCipherRightClicked",onAddCipher:"onAddCipher",onAddCipherOptions:"onAddCipherOptions"}})},84415:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionsComponent=void 0;const r=n(32621),o=(n(45330),n(3174),n(51554),n(36631),n(73828),n(32621)),a=n(3174),s=n(73828),l=n(51554),c=n(45330),d=n(36631);class p{constructor(e,t,n,i,o){this.collectionService=e,this.platformUtilsService=t,this.i18nService=n,this.cipherService=i,this.logService=o,this.allowSelectNone=!1,this.onSavedCollections=new r.EventEmitter,this.collections=[]}ngOnInit(){return i(this,void 0,void 0,(function*(){yield this.load()}))}load(){return i(this,void 0,void 0,(function*(){this.cipherDomain=yield this.loadCipher(),this.collectionIds=this.loadCipherCollections(),this.cipher=yield this.cipherDomain.decrypt(),this.collections=yield this.loadCollections(),this.collections.forEach((e=>e.checked=!1)),null!=this.collectionIds&&this.collections.forEach((e=>{e.checked=null!=this.collectionIds&&this.collectionIds.indexOf(e.id)>-1}))}))}submit(){return i(this,void 0,void 0,(function*(){const e=this.collections.filter((e=>!!e.checked)).map((e=>e.id));if(this.allowSelectNone||0!==e.length){this.cipherDomain.collectionIds=e;try{this.formPromise=this.saveCollections(),yield this.formPromise,this.onSavedCollections.emit(),this.platformUtilsService.showToast("success",null,this.i18nService.t("editedItem"))}catch(t){this.logService.error(t)}}else this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectOneCollection"))}))}loadCipher(){return this.cipherService.get(this.cipherId)}loadCipherCollections(){return this.cipherDomain.collectionIds}loadCollections(){return i(this,void 0,void 0,(function*(){return(yield this.collectionService.getAllDecrypted()).filter((e=>!e.readOnly&&e.organizationId===this.cipher.organizationId))}))}saveCollections(){return this.cipherService.saveCollectionsWithServer(this.cipherDomain)}}t.CollectionsComponent=p,p.ɵfac=function(e){return new(e||p)(o.ɵɵdirectiveInject(a.CollectionService),o.ɵɵdirectiveInject(s.PlatformUtilsService),o.ɵɵdirectiveInject(l.I18nService),o.ɵɵdirectiveInject(c.CipherService),o.ɵɵdirectiveInject(d.LogService))},p.ɵdir=o.ɵɵdefineDirective({type:p,inputs:{cipherId:"cipherId",allowSelectNone:"allowSelectNone"},outputs:{onSavedCollections:"onSavedCollections"}})},44995:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ExportScopeCalloutComponent=void 0;n(63513),n(73569);const r=n(32621),o=n(63513),a=n(73569),s=n(57490),l=n(51626),c=n(99729);function d(e,t){if(1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"app-callout",1),r.ɵɵpipe(3,"i18n"),r.ɵɵtext(4),r.ɵɵpipe(5,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(6,"\n"),r.ɵɵelementContainerEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(3,2,e.scopeConfig.title)),r.ɵɵadvance(2),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind2(5,4,e.scopeConfig.description,e.scopeConfig.scopeIdentifier),"\n ")}}class p{constructor(e,t){this.organizationService=e,this.stateService=t,this.organizationId=null,this.show=!1}ngOnInit(){return i(this,void 0,void 0,(function*(){(yield this.organizationService.hasOrganizations())&&(this.scopeConfig=null!=this.organizationId?{title:"exportingOrganizationVaultTitle",description:"exportingOrganizationVaultDescription",scopeIdentifier:(yield this.organizationService.get(this.organizationId)).name}:{title:"exportingPersonalVaultTitle",description:"exportingPersonalVaultDescription",scopeIdentifier:yield this.stateService.getEmail()},this.show=!0)}))}}t.ExportScopeCalloutComponent=p,p.ɵfac=function(e){return new(e||p)(r.ɵɵdirectiveInject(o.OrganizationService),r.ɵɵdirectiveInject(a.StateService))},p.ɵcmp=r.ɵɵdefineComponent({type:p,selectors:[["app-export-scope-callout"]],inputs:{organizationId:"organizationId"},decls:2,vars:1,consts:[[4,"ngIf"],["type","info",3,"title"]],template:function(e,t){1&e&&(r.ɵɵtemplate(0,d,7,7,"ng-container",0),r.ɵɵtext(1,"\n")),2&e&&r.ɵɵproperty("ngIf",t.show)},directives:[s.NgIf,l.CalloutComponent],pipes:[c.I18nPipe],encapsulation:2})},21748:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ExportComponent=void 0;const r=n(32621),o=(n(96832),n(85714),n(32034),n(97445),n(51554),n(36631),n(73828),n(62166),n(57055),n(80253)),a=n(49906),s=n(32621),l=n(85714),c=n(51554),d=n(73828),p=n(97445),u=n(32034),m=n(62166),h=n(36631),v=n(57055),f=n(96832);class g{constructor(e,t,n,i,o,a,s,l,c,d){this.cryptoService=e,this.i18nService=t,this.platformUtilsService=n,this.exportService=i,this.eventService=o,this.policyService=a,this.win=s,this.logService=l,this.userVerificationService=c,this.formBuilder=d,this.onSaved=new r.EventEmitter,this.disabledByPolicy=!1,this.exportForm=this.formBuilder.group({format:["json"],secret:[""]}),this.formatOptions=[{name:".json",value:"json"},{name:".csv",value:"csv"},{name:".json (Encrypted)",value:"encrypted_json"}]}ngOnInit(){return i(this,void 0,void 0,(function*(){yield this.checkExportDisabled()}))}checkExportDisabled(){return i(this,void 0,void 0,(function*(){this.disabledByPolicy=yield this.policyService.policyAppliesToUser(a.PolicyType.DisablePersonalVaultExport),this.disabledByPolicy&&this.exportForm.disable()}))}get encryptedFormat(){return"encrypted_json"===this.format}submit(){return i(this,void 0,void 0,(function*(){if(this.disabledByPolicy)return void this.platformUtilsService.showToast("error",null,this.i18nService.t("personalVaultExportPolicyInEffect"));if(!(yield this.warningDialog()))return;const e=this.exportForm.get("secret").value;try{yield this.userVerificationService.verifyUser(e)}catch(t){return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),t.message)}try{this.formPromise=this.getExportData();const e=yield this.formPromise;this.downloadFile(e),this.saved(),yield this.collectEvent(),this.exportForm.get("secret").setValue("")}catch(t){this.logService.error(t)}}))}warningDialog(){return i(this,void 0,void 0,(function*(){return this.encryptedFormat?yield this.platformUtilsService.showDialog("

"+this.i18nService.t("encExportKeyWarningDesc")+"

"+this.i18nService.t("encExportAccountWarningDesc"),this.i18nService.t("confirmVaultExport"),this.i18nService.t("exportVault"),this.i18nService.t("cancel"),"warning",!0):yield this.platformUtilsService.showDialog(this.i18nService.t("exportWarningDesc"),this.i18nService.t("confirmVaultExport"),this.i18nService.t("exportVault"),this.i18nService.t("cancel"),"warning")}))}saved(){this.onSaved.emit()}getExportData(){return this.exportService.getExport(this.format)}getFileName(e){let t=this.format;return"encrypted_json"===this.format&&(e=null==e?"encrypted":"encrypted_"+e,t="json"),this.exportService.getFileName(e,t)}collectEvent(){return i(this,void 0,void 0,(function*(){yield this.eventService.collect(o.EventType.User_ClientExportedVault)}))}get format(){return this.exportForm.get("format").value}downloadFile(e){const t=this.getFileName();this.platformUtilsService.saveFile(this.win,e,{type:"text/plain"},t)}}t.ExportComponent=g,g.ɵfac=function(e){return new(e||g)(s.ɵɵdirectiveInject(l.CryptoService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(d.PlatformUtilsService),s.ɵɵdirectiveInject(p.ExportService),s.ɵɵdirectiveInject(u.EventService),s.ɵɵdirectiveInject(m.PolicyService),s.ɵɵdirectiveInject(Window),s.ɵɵdirectiveInject(h.LogService),s.ɵɵdirectiveInject(v.UserVerificationService),s.ɵɵdirectiveInject(f.FormBuilder))},g.ɵdir=s.ɵɵdefineDirective({type:g,outputs:{onSaved:"onSaved"}})},17301:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.FolderAddEditComponent=void 0;const r=n(32621),o=(n(88308),n(51554),n(36631),n(73828),n(36914)),a=n(32621),s=n(88308),l=n(51554),c=n(73828),d=n(36631);class p{constructor(e,t,n,i){this.folderService=e,this.i18nService=t,this.platformUtilsService=n,this.logService=i,this.onSavedFolder=new r.EventEmitter,this.onDeletedFolder=new r.EventEmitter,this.editMode=!1,this.folder=new o.FolderView}ngOnInit(){return i(this,void 0,void 0,(function*(){yield this.init()}))}submit(){return i(this,void 0,void 0,(function*(){if(null==this.folder.name||""===this.folder.name)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("nameRequired")),!1;try{const e=yield this.folderService.encrypt(this.folder);return this.formPromise=this.folderService.saveWithServer(e),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t(this.editMode?"editedFolder":"addedFolder")),this.onSavedFolder.emit(this.folder),!0}catch(e){this.logService.error(e)}return!1}))}delete(){return i(this,void 0,void 0,(function*(){if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("deleteFolderConfirmation"),this.i18nService.t("deleteFolder"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{this.deletePromise=this.folderService.deleteWithServer(this.folder.id),yield this.deletePromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("deletedFolder")),this.onDeletedFolder.emit(this.folder)}catch(e){this.logService.error(e)}return!0}))}init(){return i(this,void 0,void 0,(function*(){if(this.editMode=null!=this.folderId,this.editMode){this.editMode=!0,this.title=this.i18nService.t("editFolder");const e=yield this.folderService.get(this.folderId);this.folder=yield e.decrypt()}else this.title=this.i18nService.t("addFolder")}))}}t.FolderAddEditComponent=p,p.ɵfac=function(e){return new(e||p)(a.ɵɵdirectiveInject(s.FolderService),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(c.PlatformUtilsService),a.ɵɵdirectiveInject(d.LogService))},p.ɵdir=a.ɵɵdefineDirective({type:p,inputs:{folderId:"folderId"},outputs:{onSavedFolder:"onSavedFolder",onDeletedFolder:"onDeletedFolder"}})},5675:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.GeneratorComponent=void 0;const r=n(32621),o=(n(68012),n(14857)),a=(n(51554),n(36631),n(84275),n(73828),n(73569),n(13444),n(32621)),s=n(84275),l=n(13444),c=n(73828),d=n(73569),p=n(51554),u=n(36631),m=n(68012);class h{constructor(e,t,n,i,o,a,s,l){this.passwordGenerationService=e,this.usernameGenerationService=t,this.platformUtilsService=n,this.stateService=i,this.i18nService=o,this.logService=a,this.route=s,this.win=l,this.comingFromAddEdit=!1,this.onSelected=new r.EventEmitter,this.usernameOptions={},this.passwordOptions={},this.username="-",this.password="-",this.showOptions=!1,this.avoidAmbiguous=!1,this.usernameWebsite=null,this.typeOptions=[{name:o.t("password"),value:"password"},{name:o.t("username"),value:"username"}],this.passTypeOptions=[{name:o.t("password"),value:"password"},{name:o.t("passphrase"),value:"passphrase"}],this.usernameTypeOptions=[{name:o.t("plusAddressedEmail"),value:"subaddress",desc:o.t("plusAddressedEmailDesc")},{name:o.t("catchallEmail"),value:"catchall",desc:o.t("catchallEmailDesc")},{name:o.t("forwardedEmail"),value:"forwarded",desc:o.t("forwardedEmailDesc")},{name:o.t("randomWord"),value:"word"}],this.subaddressOptions=[{name:o.t("random"),value:"random"}],this.catchallOptions=[{name:o.t("random"),value:"random"}],this.forwardOptions=[{name:"SimpleLogin",value:"simplelogin"},{name:"AnonAddy",value:"anonaddy"},{name:"Firefox Relay",value:"firefoxrelay"}]}ngOnInit(){return i(this,void 0,void 0,(function*(){this.route.queryParams.pipe(o.first()).subscribe((e=>i(this,void 0,void 0,(function*(){var t;const n=yield this.passwordGenerationService.getOptions();if(this.passwordOptions=n[0],this.enforcedPasswordPolicyOptions=n[1],this.avoidAmbiguous=!this.passwordOptions.ambiguous,this.passwordOptions.type="passphrase"===this.passwordOptions.type?"passphrase":"password",this.usernameOptions=yield this.usernameGenerationService.getOptions(),null==this.usernameOptions.type&&(this.usernameOptions.type="word"),null!=this.usernameOptions.subaddressEmail&&""!==this.usernameOptions.subaddressEmail||(this.usernameOptions.subaddressEmail=yield this.stateService.getEmail()),null==this.usernameWebsite)this.usernameOptions.subaddressType=this.usernameOptions.catchallType="random";else{this.usernameOptions.website=this.usernameWebsite;const e={name:this.i18nService.t("websiteName"),value:"website-name"};this.subaddressOptions.push(e),this.catchallOptions.push(e)}if("username"!==this.type&&"password"!==this.type)if("username"===e.type||"password"===e.type)this.type=e.type;else{const e=yield this.stateService.getGeneratorOptions();this.type=null!==(t=null==e?void 0:e.type)&&void 0!==t?t:"password"}this.regenerateWithoutButtonPress()&&(yield this.regenerate())}))))}))}typeChanged(){return i(this,void 0,void 0,(function*(){yield this.stateService.setGeneratorOptions({type:this.type}),this.regenerateWithoutButtonPress()&&(yield this.regenerate())}))}regenerate(){return i(this,void 0,void 0,(function*(){"password"===this.type?yield this.regeneratePassword():"username"===this.type&&(yield this.regenerateUsername())}))}sliderChanged(){return i(this,void 0,void 0,(function*(){this.savePasswordOptions(!1),yield this.passwordGenerationService.addHistory(this.password)}))}sliderInput(){return i(this,void 0,void 0,(function*(){this.normalizePasswordOptions(),this.password=yield this.passwordGenerationService.generatePassword(this.passwordOptions)}))}savePasswordOptions(e=!0){return i(this,void 0,void 0,(function*(){this.normalizePasswordOptions(),yield this.passwordGenerationService.saveOptions(this.passwordOptions),e&&this.regenerateWithoutButtonPress()&&(yield this.regeneratePassword())}))}saveUsernameOptions(e=!0){return i(this,void 0,void 0,(function*(){yield this.usernameGenerationService.saveOptions(this.usernameOptions),"forwarded"===this.usernameOptions.type&&(this.username="-"),e&&this.regenerateWithoutButtonPress()&&(yield this.regenerateUsername())}))}regeneratePassword(){return i(this,void 0,void 0,(function*(){this.password=yield this.passwordGenerationService.generatePassword(this.passwordOptions),yield this.passwordGenerationService.addHistory(this.password)}))}regenerateUsername(){return this.generateUsername()}generateUsername(){return i(this,void 0,void 0,(function*(){try{this.usernameGeneratingPromise=this.usernameGenerationService.generateUsername(this.usernameOptions),this.username=yield this.usernameGeneratingPromise,""!==this.username&&null!==this.username||(this.username="-")}catch(e){this.logService.error(e)}}))}copy(){const e="password"===this.type,t=null!=this.win?{window:this.win}:null;this.platformUtilsService.copyToClipboard(e?this.password:this.username,t),this.platformUtilsService.showToast("info",null,this.i18nService.t("valueCopied",this.i18nService.t(e?"password":"username")))}select(){this.onSelected.emit("password"===this.type?this.password:this.username)}toggleOptions(){this.showOptions=!this.showOptions}regenerateWithoutButtonPress(){return"username"!==this.type||"forwarded"!==this.usernameOptions.type}normalizePasswordOptions(){if(this.passwordOptions.ambiguous=!this.avoidAmbiguous,!(this.passwordOptions.uppercase||this.passwordOptions.lowercase||this.passwordOptions.number||this.passwordOptions.special)&&(this.passwordOptions.lowercase=!0,null!=this.win)){const e=this.win.document.querySelector("#lowercase");e&&(e.checked=!0)}this.passwordGenerationService.normalizeOptions(this.passwordOptions,this.enforcedPasswordPolicyOptions)}}t.GeneratorComponent=h,h.ɵfac=function(e){return new(e||h)(a.ɵɵdirectiveInject(s.PasswordGenerationService),a.ɵɵdirectiveInject(l.UsernameGenerationService),a.ɵɵdirectiveInject(c.PlatformUtilsService),a.ɵɵdirectiveInject(d.StateService),a.ɵɵdirectiveInject(p.I18nService),a.ɵɵdirectiveInject(u.LogService),a.ɵɵdirectiveInject(m.ActivatedRoute),a.ɵɵdirectiveInject(Window))},h.ɵdir=a.ɵɵdefineDirective({type:h,inputs:{comingFromAddEdit:"comingFromAddEdit",type:"type"},outputs:{onSelected:"onSelected"}})},43337:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.HintComponent=void 0;const r=n(77992);t.HintComponent=class{constructor(e,t,n,i,r){this.router=e,this.i18nService=t,this.apiService=n,this.platformUtilsService=i,this.logService=r,this.email="",this.successRoute="login"}submit(){return i(this,void 0,void 0,(function*(){if(null!=this.email&&""!==this.email)if(-1!==this.email.indexOf("@"))try{this.formPromise=this.apiService.postPasswordHint(new r.PasswordHintRequest(this.email)),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("masterPassSent")),null!=this.onSuccessfulSubmit?this.onSuccessfulSubmit():null!=this.router&&this.router.navigate([this.successRoute])}catch(e){this.logService.error(e)}else this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("invalidEmail"));else this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("emailRequired"))}))}}},18310:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.IconComponent=void 0;n(56071),n(73569);const r=n(32773),o=n(82769),a=(n(97144),n(32621)),s=n(56071),l=n(73569),c=n(57490),d=n(23042);function p(e,t){if(1&e&&a.ɵɵelement(0,"img",3),2&e){const e=a.ɵɵnextContext();a.ɵɵpropertyInterpolate("appFallbackSrc",e.fallbackImage),a.ɵɵproperty("src",e.image,a.ɵɵsanitizeUrl)}}function u(e,t){if(1&e&&a.ɵɵelement(0,"i"),2&e){const e=a.ɵɵnextContext();a.ɵɵclassMapInterpolate1("bwi bwi-fw bwi-lg ",e.icon,"")}}const m={Visa:"card-visa",Mastercard:"card-mastercard",Amex:"card-amex",Discover:"card-discover","Diners Club":"card-diners-club",JCB:"card-jcb",Maestro:"card-maestro",UnionPay:"card-union-pay"};class h{constructor(e,t){this.stateService=t,this.iconsUrl=e.getIconsUrl()}ngOnChanges(){return i(this,void 0,void 0,(function*(){this.image=null,this.fallbackImage=null,this.imageEnabled=!(yield this.stateService.getDisableFavicon()),this.load()}))}load(){switch(this.cipher.type){case r.CipherType.Login:this.icon="bwi-globe",this.setLoginIcon();break;case r.CipherType.SecureNote:this.icon="bwi-sticky-note";break;case r.CipherType.Card:this.icon="bwi-credit-card",this.setCardIcon();break;case r.CipherType.Identity:this.icon="bwi-id-card"}}setLoginIcon(){if(this.cipher.login.uri){let t=this.cipher.login.uri,n=!1;if(0===t.indexOf("androidapp://")?(this.icon="bwi-android",this.image=null):0===t.indexOf("iosapp://")?(this.icon="bwi-apple",this.image=null):this.imageEnabled&&-1===t.indexOf("://")&&t.indexOf(".")>-1?(t="http://"+t,n=!0):this.imageEnabled&&(n=0===t.indexOf("http")&&t.indexOf(".")>-1),this.imageEnabled&&n)try{this.image=this.iconsUrl+"/"+o.Utils.getHostname(t)+"/icon.png",this.fallbackImage="images/bwi-globe.png"}catch(e){}}else this.image=null}setCardIcon(){const e=this.cipher.card.brand;this.imageEnabled&&e in m&&(this.icon="credit-card-icon "+m[e])}}t.IconComponent=h,h.ɵfac=function(e){return new(e||h)(a.ɵɵdirectiveInject(s.EnvironmentService),a.ɵɵdirectiveInject(l.StateService))},h.ɵcmp=a.ɵɵdefineComponent({type:h,selectors:[["app-vault-icon"]],inputs:{cipher:"cipher"},features:[a.ɵɵNgOnChangesFeature],decls:7,vars:2,consts:[["aria-hidden","true",1,"icon"],["alt","","decoding","async","loading","lazy",3,"src","appFallbackSrc",4,"ngIf"],[3,"class",4,"ngIf"],["alt","","decoding","async","loading","lazy",3,"src","appFallbackSrc"]],template:function(e,t){1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵtemplate(2,p,1,2,"img",1),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,u,1,3,"i",2),a.ɵɵtext(5,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n")),2&e&&(a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.imageEnabled&&t.image),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!t.imageEnabled||!t.image))},directives:[c.NgIf,d.FallbackSrcDirective],encapsulation:2})},33793:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.LockComponent=void 0;n(32621),n(68012);const r=n(14857),o=(n(91674),n(85714),n(56071),n(51554),n(72277),n(36631),n(45552),n(73828),n(73569),n(82656),n(43578)),a=n(7980),s=n(82769),l=n(22205),c=n(36119),d=n(32621),p=n(68012),u=n(51554),m=n(73828),h=n(45552),v=n(85714),f=n(82656),g=n(56071),y=n(73569),x=n(91674),S=n(36631),b=n(72277);class w{constructor(e,t,n,i,r,o,a,s,l,c,d,p){this.router=e,this.i18nService=t,this.platformUtilsService=n,this.messagingService=i,this.cryptoService=r,this.vaultTimeoutService=o,this.environmentService=a,this.stateService=s,this.apiService=l,this.logService=c,this.keyConnectorService=d,this.ngZone=p,this.masterPassword="",this.pin="",this.showPassword=!1,this.pinLock=!1,this.webVaultHostname="",this.successRoute="vault",this.invalidPinAttempts=0}ngOnInit(){return i(this,void 0,void 0,(function*(){yield this.load(),this.stateService.activeAccount.subscribe((()=>i(this,void 0,void 0,(function*(){yield this.load()}))))}))}submit(){return i(this,void 0,void 0,(function*(){if(this.pinLock&&(null==this.pin||""===this.pin))return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("pinRequired"));if(!this.pinLock&&(null==this.masterPassword||""===this.masterPassword))return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassRequired"));const e=yield this.stateService.getKdfType(),t=yield this.stateService.getKdfIterations();if(this.pinLock){let i=!0;try{if(this.pinSet[0]){const n=yield this.cryptoService.makeKeyFromPin(this.pin,this.email,e,t,yield this.stateService.getDecryptedPinProtected()),r=yield this.cryptoService.getEncKey(n),o=yield this.stateService.getProtectedPin();i=(yield this.cryptoService.decryptToUtf8(new l.EncString(o),r))!==this.pin,i||(yield this.setKeyAndContinue(n))}else{const n=yield this.cryptoService.makeKeyFromPin(this.pin,this.email,e,t);i=!1,yield this.setKeyAndContinue(n)}}catch(n){i=!0}if(i){if(this.invalidPinAttempts++,this.invalidPinAttempts>=5)return void this.messagingService.send("logout");this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("invalidPin"))}}else{const n=yield this.cryptoService.makeKey(this.masterPassword,this.email,e,t);let r=!1;if(null!=(yield this.cryptoService.getKeyHash()))r=yield this.cryptoService.compareAndUpdateKeyHash(this.masterPassword,n);else{const e=new c.SecretVerificationRequest,t=yield this.cryptoService.hashPassword(this.masterPassword,n,o.HashPurpose.ServerAuthorization);e.masterPasswordHash=t;try{this.formPromise=this.apiService.postAccountVerifyPassword(e),yield this.formPromise,r=!0;const t=yield this.cryptoService.hashPassword(this.masterPassword,n,o.HashPurpose.LocalAuthorization);yield this.cryptoService.setKeyHash(t)}catch(i){this.logService.error(i)}}if(r){if(this.pinSet[0]){const i=yield this.stateService.getProtectedPin(),r=yield this.cryptoService.getEncKey(n),o=yield this.cryptoService.decryptToUtf8(new l.EncString(i),r),a=yield this.cryptoService.makePinKey(o,this.email,e,t);yield this.stateService.setDecryptedPinProtected(yield this.cryptoService.encrypt(n.key,a))}yield this.setKeyAndContinue(n)}else this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("invalidMasterPassword"))}}))}logOut(){return i(this,void 0,void 0,(function*(){(yield this.platformUtilsService.showDialog(this.i18nService.t("logOutConfirmation"),this.i18nService.t("logOut"),this.i18nService.t("logOut"),this.i18nService.t("cancel")))&&this.messagingService.send("logout")}))}unlockBiometric(){return i(this,void 0,void 0,(function*(){if(!this.biometricLock)return;const e=null!=(yield this.cryptoService.getKey(a.KeySuffixOptions.Biometric));return e&&(yield this.doContinue()),e}))}togglePassword(){this.showPassword=!this.showPassword;const e=document.getElementById(this.pinLock?"pin":"masterPassword");this.ngZone.isStable?e.focus():this.ngZone.onStable.pipe(r.take(1)).subscribe((()=>e.focus()))}setKeyAndContinue(e){return i(this,void 0,void 0,(function*(){yield this.cryptoService.setKey(e),yield this.doContinue()}))}doContinue(){return i(this,void 0,void 0,(function*(){yield this.stateService.setBiometricLocked(!1),yield this.stateService.setEverBeenUnlocked(!0);const e=yield this.stateService.getDisableFavicon();yield this.stateService.setDisableFavicon(!!e),this.messagingService.send("unlocked"),null!=this.onSuccessfulSubmit?yield this.onSuccessfulSubmit():null!=this.router&&this.router.navigate([this.successRoute])}))}load(){return i(this,void 0,void 0,(function*(){this.pinSet=yield this.vaultTimeoutService.isPinLockSet(),this.pinLock=this.pinSet[0]&&null!=(yield this.stateService.getDecryptedPinProtected())||this.pinSet[1],this.supportsBiometric=yield this.platformUtilsService.supportsBiometric(),this.biometricLock=(yield this.vaultTimeoutService.isBiometricLockSet())&&((yield this.cryptoService.hasKeyStored(a.KeySuffixOptions.Biometric))||!this.platformUtilsService.supportsSecureStorage()),this.biometricText=yield this.stateService.getBiometricText(),this.email=yield this.stateService.getEmail();const e=yield this.keyConnectorService.getUsesKeyConnector();this.hideInput=e&&!this.pinLock,!e||this.biometricLock||this.pinLock||(yield this.vaultTimeoutService.logOut());const t=this.environmentService.getWebVaultUrl(),n="https://vault.bitwarden.com"===t?"https://bitwarden.com":t;this.webVaultHostname=s.Utils.getHostname(n)}))}}t.LockComponent=w,w.ɵfac=function(e){return new(e||w)(d.ɵɵdirectiveInject(p.Router),d.ɵɵdirectiveInject(u.I18nService),d.ɵɵdirectiveInject(m.PlatformUtilsService),d.ɵɵdirectiveInject(h.MessagingService),d.ɵɵdirectiveInject(v.CryptoService),d.ɵɵdirectiveInject(f.VaultTimeoutService),d.ɵɵdirectiveInject(g.EnvironmentService),d.ɵɵdirectiveInject(y.StateService),d.ɵɵdirectiveInject(x.ApiService),d.ɵɵdirectiveInject(S.LogService),d.ɵɵdirectiveInject(b.KeyConnectorService),d.ɵɵdirectiveInject(d.NgZone))},w.ɵdir=d.ɵɵdefineDirective({type:w})},13744:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.LoginComponent=void 0;n(32621),n(68012);const r=n(14857),o=(n(62694),n(1659),n(56071),n(51554),n(36631),n(84275),n(73828),n(73569),n(82769)),a=n(70045),s=n(60765),l=n(32621),c=n(62694),d=n(68012),p=n(73828),u=n(51554),m=n(73569),h=n(56071),v=n(84275),f=n(1659),g=n(36631);class y extends s.CaptchaProtectedComponent{constructor(e,t,n,i,r,o,a,s,l,c){super(o,i,n),this.authService=e,this.router=t,this.stateService=r,this.passwordGenerationService=a,this.cryptoFunctionService=s,this.logService=l,this.ngZone=c,this.email="",this.rememberEmail=!0,this.masterPassword="",this.showPassword=!1,this.twoFactorRoute="2fa",this.successRoute="vault",this.forcePasswordResetRoute="update-temp-password",this.alwaysRememberEmail=!1}ngOnInit(){return i(this,void 0,void 0,(function*(){null!=this.email&&""!==this.email||(this.email=yield this.stateService.getRememberedEmail(),null==this.email&&(this.email="")),this.alwaysRememberEmail||(this.rememberEmail=null!=(yield this.stateService.getRememberedEmail())),o.Utils.isBrowser&&!o.Utils.isNode&&this.focusInput()}))}submit(){return i(this,void 0,void 0,(function*(){if(yield this.setupCaptcha(),null!=this.email&&""!==this.email)if(-1!==this.email.indexOf("@"))if(null!=this.masterPassword&&""!==this.masterPassword)try{const e=new a.PasswordLogInCredentials(this.email,this.masterPassword,this.captchaToken,null);this.formPromise=this.authService.logIn(e);const t=yield this.formPromise;if(this.rememberEmail||this.alwaysRememberEmail?yield this.stateService.setRememberedEmail(this.email):yield this.stateService.setRememberedEmail(null),this.handleCaptchaRequired(t))return;if(t.requiresTwoFactor)null!=this.onSuccessfulLoginTwoFactorNavigate?this.onSuccessfulLoginTwoFactorNavigate():this.router.navigate([this.twoFactorRoute]);else if(t.forcePasswordReset)null!=this.onSuccessfulLoginForceResetNavigate?this.onSuccessfulLoginForceResetNavigate():this.router.navigate([this.forcePasswordResetRoute]);else{const e=yield this.stateService.getDisableFavicon();yield this.stateService.setDisableFavicon(!!e),null!=this.onSuccessfulLogin&&this.onSuccessfulLogin(),null!=this.onSuccessfulLoginNavigate?this.onSuccessfulLoginNavigate():this.router.navigate([this.successRoute])}}catch(e){this.logService.error(e)}else this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassRequired"));else this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("invalidEmail"));else this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("emailRequired"))}))}togglePassword(){this.showPassword=!this.showPassword,this.ngZone.isStable?document.getElementById("masterPassword").focus():this.ngZone.onStable.pipe(r.take(1)).subscribe((()=>document.getElementById("masterPassword").focus()))}launchSsoBrowser(e,t){return i(this,void 0,void 0,(function*(){const n={type:"password",length:64,uppercase:!0,lowercase:!0,numbers:!0,special:!1},i=yield this.passwordGenerationService.generatePassword(n),r=yield this.passwordGenerationService.generatePassword(n),a=yield this.cryptoFunctionService.hash(r,"sha256"),s=o.Utils.fromBufferToUrlB64(a);yield this.stateService.setSsoState(i),yield this.stateService.setSsoCodeVerifier(r);const l=this.environmentService.getWebVaultUrl();this.platformUtilsService.launchUri(l+"/#/sso?clientId="+e+"&redirectUri="+encodeURIComponent(t)+"&state="+i+"&codeChallenge="+s)}))}focusInput(){document.getElementById(null==this.email||""===this.email?"email":"masterPassword").focus()}}t.LoginComponent=y,y.ɵfac=function(e){return new(e||y)(l.ɵɵdirectiveInject(c.AuthService),l.ɵɵdirectiveInject(d.Router),l.ɵɵdirectiveInject(p.PlatformUtilsService),l.ɵɵdirectiveInject(u.I18nService),l.ɵɵdirectiveInject(m.StateService),l.ɵɵdirectiveInject(h.EnvironmentService),l.ɵɵdirectiveInject(v.PasswordGenerationService),l.ɵɵdirectiveInject(f.CryptoFunctionService),l.ɵɵdirectiveInject(g.LogService),l.ɵɵdirectiveInject(l.NgZone))},y.ɵdir=l.ɵɵdefineDirective({type:y,inputs:{email:"email",rememberEmail:"rememberEmail"},features:[l.ɵɵInheritDefinitionFeature]})},83249:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DynamicModalComponent=void 0;n(46915);const i=n(32621),r=(n(64684),n(38387),n(32621)),o=n(64684),a=n(46915),s=n(38387),l=["modalContent"];function c(e,t){}class d{constructor(e,t,n,i,r){this.modalService=e,this.cd=t,this.el=n,this.focusTrapFactory=i,this.modalRef=r}ngAfterViewInit(){this.loadChildComponent(this.childComponentType),null!=this.setComponentParameters&&this.setComponentParameters(this.componentRef.instance),this.cd.detectChanges(),this.modalRef.created(this.el.nativeElement),this.focusTrap=this.focusTrapFactory.create(this.el.nativeElement.querySelector(".modal-dialog")),null==this.el.nativeElement.querySelector("[appAutoFocus]")&&this.focusTrap.focusFirstTabbableElementWhenReady()}loadChildComponent(e){const t=this.modalService.resolveComponentFactory(e);this.modalContentRef.clear(),this.componentRef=this.modalContentRef.createComponent(t)}ngOnDestroy(){this.componentRef&&this.componentRef.destroy(),this.focusTrap.destroy()}close(){this.modalRef.close()}getFocus(){const e=this.el.nativeElement.querySelector("[appAutoFocus]");null==e||e.focus()}}t.DynamicModalComponent=d,d.ɵfac=function(e){return new(e||d)(r.ɵɵdirectiveInject(o.ModalService),r.ɵɵdirectiveInject(r.ChangeDetectorRef),r.ɵɵdirectiveInject(r.ElementRef),r.ɵɵdirectiveInject(a.ConfigurableFocusTrapFactory),r.ɵɵdirectiveInject(s.ModalRef))},d.ɵcmp=r.ɵɵdefineComponent({type:d,selectors:[["app-modal"]],viewQuery:function(e,t){if(1&e&&r.ɵɵviewQuery(l,7,i.ViewContainerRef),2&e){let e;r.ɵɵqueryRefresh(e=r.ɵɵloadQuery())&&(t.modalContentRef=e.first)}},decls:2,vars:0,consts:[["modalContent",""]],template:function(e,t){1&e&&r.ɵɵtemplate(0,c,0,0,"ng-template",null,0,r.ɵɵtemplateRefExtractor)},encapsulation:2})},64050:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModalInjector=void 0;t.ModalInjector=class{constructor(e,t){this._parentInjector=e,this._additionalTokens=t}get(e,t,n){var i;return null!==(i=this._additionalTokens.get(e))&&void 0!==i?i:this._parentInjector.get(e,t)}}},38387:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModalRef=void 0;const i=n(72872),r=n(14857);t.ModalRef=class{constructor(){this._onCreated=new i.Subject,this._onClose=new i.Subject,this._onClosed=new i.Subject,this._onShow=new i.Subject,this._onShown=new i.Subject,this.onCreated=this._onCreated.asObservable(),this.onClose=this._onClose.asObservable(),this.onClosed=this._onClosed.asObservable(),this.onShow=this._onShow.asObservable(),this.onShown=this._onShow.asObservable()}show(){this._onShow.next()}shown(){this._onShown.next()}close(e){this.lastResult=e,this._onClose.next(e)}closed(){this._onClosed.next(this.lastResult)}created(e){this._onCreated.next(e)}onClosedPromise(){return this.onClosed.pipe(r.first()).toPromise()}}},61738:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordGeneratorHistoryComponent=void 0;n(51554),n(84275),n(73828);const r=n(32621),o=n(84275),a=n(73828),s=n(51554);class l{constructor(e,t,n,i){this.passwordGenerationService=e,this.platformUtilsService=t,this.i18nService=n,this.win=i,this.history=[]}ngOnInit(){return i(this,void 0,void 0,(function*(){this.history=yield this.passwordGenerationService.getHistory()}))}clear(){this.history=[],this.passwordGenerationService.clear()}copy(e){const t=null!=this.win?{window:this.win}:null;this.platformUtilsService.copyToClipboard(e,t),this.platformUtilsService.showToast("info",null,this.i18nService.t("valueCopied",this.i18nService.t("password")))}}t.PasswordGeneratorHistoryComponent=l,l.ɵfac=function(e){return new(e||l)(r.ɵɵdirectiveInject(o.PasswordGenerationService),r.ɵɵdirectiveInject(a.PlatformUtilsService),r.ɵɵdirectiveInject(s.I18nService),r.ɵɵdirectiveInject(Window))},l.ɵdir=r.ɵɵdefineDirective({type:l})},38991:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordRepromptComponent=void 0;n(85714),n(51554),n(73828),n(38387);const r=n(32621),o=n(38387),a=n(85714),s=n(73828),l=n(51554);class c{constructor(e,t,n,i){this.modalRef=e,this.cryptoService=t,this.platformUtilsService=n,this.i18nService=i,this.showPassword=!1,this.masterPassword=""}togglePassword(){this.showPassword=!this.showPassword}submit(){return i(this,void 0,void 0,(function*(){(yield this.cryptoService.compareAndUpdateKeyHash(this.masterPassword,null))?this.modalRef.close(!0):this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("invalidMasterPassword"))}))}}t.PasswordRepromptComponent=c,c.ɵfac=function(e){return new(e||c)(r.ɵɵdirectiveInject(o.ModalRef),r.ɵɵdirectiveInject(a.CryptoService),r.ɵɵdirectiveInject(s.PlatformUtilsService),r.ɵɵdirectiveInject(l.I18nService))},c.ɵdir=r.ɵɵdefineDirective({type:c})},11405:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.RegisterComponent=void 0;n(68012),n(91674),n(62694),n(85714),n(56071),n(51554),n(36631),n(84275),n(73828),n(73569);const r=n(20971),o=n(74284),a=n(6556),s=n(60765),l=n(32621),c=n(62694),d=n(68012),p=n(51554),u=n(85714),m=n(91674),h=n(73569),v=n(73828),f=n(84275),g=n(56071),y=n(36631);class x extends s.CaptchaProtectedComponent{constructor(e,t,n,i,r,o,a,s,l,c){super(l,n,a),this.authService=e,this.router=t,this.cryptoService=i,this.apiService=r,this.stateService=o,this.passwordGenerationService=s,this.logService=c,this.name="",this.email="",this.masterPassword="",this.confirmMasterPassword="",this.hint="",this.showPassword=!1,this.showTerms=!0,this.acceptPolicies=!1,this.successRoute="login",this.showTerms=!a.isSelfHost()}ngOnInit(){return i(this,void 0,void 0,(function*(){this.setupCaptcha()}))}get masterPasswordScoreWidth(){return null==this.masterPasswordScore?0:20*(this.masterPasswordScore+1)}get masterPasswordScoreColor(){switch(this.masterPasswordScore){case 4:return"success";case 3:return"primary";case 2:return"warning";default:return"danger"}}get masterPasswordScoreText(){switch(this.masterPasswordScore){case 4:return this.i18nService.t("strong");case 3:return this.i18nService.t("good");case 2:return this.i18nService.t("weak");default:return null!=this.masterPasswordScore?this.i18nService.t("weak"):null}}submit(){return i(this,void 0,void 0,(function*(){if(!this.acceptPolicies&&this.showTerms)return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("acceptPoliciesError"));if(null==this.email||""===this.email)return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("emailRequired"));if(-1===this.email.indexOf("@"))return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("invalidEmail"));if(null==this.masterPassword||""===this.masterPassword)return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassRequired"));if(this.masterPassword.length<8)return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassLength"));if(this.masterPassword!==this.confirmMasterPassword)return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassDoesntMatch"));const e=this.passwordGenerationService.passwordStrength(this.masterPassword,this.getPasswordStrengthUserInput());if(null!=e&&e.score<3){if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("weakMasterPasswordDesc"),this.i18nService.t("weakMasterPassword"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return}if(this.hint===this.masterPassword)return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("hintEqualsPassword"));this.name=""===this.name?null:this.name,this.email=this.email.trim().toLowerCase();const t=r.DEFAULT_KDF_TYPE,n=r.DEFAULT_KDF_ITERATIONS,i=yield this.cryptoService.makeKey(this.masterPassword,this.email,t,n),s=yield this.cryptoService.makeEncKey(i),l=yield this.cryptoService.hashPassword(this.masterPassword,i),c=yield this.cryptoService.makeKeyPair(s[0]),d=new a.RegisterRequest(this.email,this.name,l,this.hint,s[1].encryptedString,t,n,this.referenceData,this.captchaToken);d.keys=new o.KeysRequest(c[0],c[1].encryptedString);const p=yield this.stateService.getOrganizationInvitation();null!=p&&null!=p.token&&null!=p.organizationUserId&&(d.token=p.token,d.organizationUserId=p.organizationUserId);try{this.formPromise=this.apiService.postRegister(d);try{yield this.formPromise}catch(u){if(this.handleCaptchaRequired(u))return;throw u}this.platformUtilsService.showToast("success",null,this.i18nService.t("newAccountCreated")),this.router.navigate([this.successRoute],{queryParams:{email:this.email}})}catch(u){this.logService.error(u)}}))}togglePassword(e){this.showPassword=!this.showPassword,document.getElementById(e?"masterPasswordRetype":"masterPassword").focus()}updatePasswordStrength(){null!=this.masterPasswordStrengthTimeout&&clearTimeout(this.masterPasswordStrengthTimeout),this.masterPasswordStrengthTimeout=setTimeout((()=>{const e=this.passwordGenerationService.passwordStrength(this.masterPassword,this.getPasswordStrengthUserInput());this.masterPasswordScore=null==e?null:e.score}),300)}getPasswordStrengthUserInput(){let e=[];const t=this.email.indexOf("@");return t>-1&&(e=e.concat(this.email.substr(0,t).trim().toLowerCase().split(/[^A-Za-z0-9]/))),null!=this.name&&""!==this.name&&(e=e.concat(this.name.trim().toLowerCase().split(" "))),e}}t.RegisterComponent=x,x.ɵfac=function(e){return new(e||x)(l.ɵɵdirectiveInject(c.AuthService),l.ɵɵdirectiveInject(d.Router),l.ɵɵdirectiveInject(p.I18nService),l.ɵɵdirectiveInject(u.CryptoService),l.ɵɵdirectiveInject(m.ApiService),l.ɵɵdirectiveInject(h.StateService),l.ɵɵdirectiveInject(v.PlatformUtilsService),l.ɵɵdirectiveInject(f.PasswordGenerationService),l.ɵɵdirectiveInject(g.EnvironmentService),l.ɵɵdirectiveInject(y.LogService))},x.ɵdir=l.ɵɵdefineDirective({type:x,features:[l.ɵɵInheritDefinitionFeature]})},42893:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.RemovePasswordComponent=void 0;n(68012),n(91674),n(51554),n(72277),n(73828),n(73569),n(9724);const r=n(32621),o=n(68012),a=n(73569),s=n(91674),l=n(9724),c=n(73828),d=n(51554),p=n(72277);class u{constructor(e,t,n,i,r,o,a){this.router=e,this.stateService=t,this.apiService=n,this.syncService=i,this.platformUtilsService=r,this.i18nService=o,this.keyConnectorService=a,this.continuing=!1,this.leaving=!1,this.loading=!0}ngOnInit(){return i(this,void 0,void 0,(function*(){this.organization=yield this.keyConnectorService.getManagingOrganization(),this.email=yield this.stateService.getEmail(),yield this.syncService.fullSync(!1),this.loading=!1}))}convert(){return i(this,void 0,void 0,(function*(){this.continuing=!0,this.actionPromise=this.keyConnectorService.migrateUser();try{yield this.actionPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("removedMasterPassword")),yield this.keyConnectorService.removeConvertAccountRequired(),this.router.navigate([""])}catch(e){this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),e.message)}}))}leave(){return i(this,void 0,void 0,(function*(){if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("leaveOrganizationConfirmation"),this.organization.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{this.leaving=!0,this.actionPromise=this.apiService.postLeaveOrganization(this.organization.id).then((()=>this.syncService.fullSync(!0))),yield this.actionPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("leftOrganization")),yield this.keyConnectorService.removeConvertAccountRequired(),this.router.navigate([""])}catch(e){this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),e)}}))}}t.RemovePasswordComponent=u,u.ɵfac=function(e){return new(e||u)(r.ɵɵdirectiveInject(o.Router),r.ɵɵdirectiveInject(a.StateService),r.ɵɵdirectiveInject(s.ApiService),r.ɵɵdirectiveInject(l.SyncService),r.ɵɵdirectiveInject(c.PlatformUtilsService),r.ɵɵdirectiveInject(d.I18nService),r.ɵɵdirectiveInject(p.KeyConnectorService))},u.ɵdir=r.ɵɵdefineDirective({type:u})},83810:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AddEditComponent=void 0;n(57490);const r=n(32621),o=(n(56071),n(51554),n(36631),n(45552),n(73828),n(62166),n(76532),n(73569),n(49906)),a=n(70149),s=n(22620),l=n(59884),c=n(1725),d=n(32621),p=n(51554),u=n(73828),m=n(56071),h=n(57490),v=n(76532),f=n(45552),g=n(62166),y=n(36631),x=n(73569);class S{constructor(e,t,n,i,o,s,l,c,d){this.i18nService=e,this.platformUtilsService=t,this.environmentService=n,this.datePipe=i,this.sendService=o,this.messagingService=s,this.policyService=l,this.logService=c,this.stateService=d,this.onSavedSend=new r.EventEmitter,this.onDeletedSend=new r.EventEmitter,this.onCancelled=new r.EventEmitter,this.copyLink=!1,this.disableSend=!1,this.disableHideEmail=!1,this.showPassword=!1,this.sendType=a.SendType,this.canAccessPremium=!0,this.emailVerified=!0,this.alertShown=!1,this.showOptions=!1,this.typeOptions=[{name:e.t("sendTypeFile"),value:a.SendType.File},{name:e.t("sendTypeText"),value:a.SendType.Text}],this.sendLinkBaseUrl=this.environmentService.getSendUrl()}get link(){return null!=this.send.id&&null!=this.send.accessId?this.sendLinkBaseUrl+this.send.accessId+"/"+this.send.urlB64Key:null}get isSafari(){return this.platformUtilsService.isSafari()}get isDateTimeLocalSupported(){return!(this.platformUtilsService.isFirefox()||this.platformUtilsService.isSafari())}ngOnInit(){return i(this,void 0,void 0,(function*(){yield this.load()}))}get editMode(){return null!=this.sendId}get title(){return this.i18nService.t(this.editMode?"editSend":"createSend")}setDates(e){this.deletionDate=e.deletionDate,this.expirationDate=e.expirationDate}load(){return i(this,void 0,void 0,(function*(){if(this.disableSend=yield this.policyService.policyAppliesToUser(o.PolicyType.DisableSend),this.disableHideEmail=yield this.policyService.policyAppliesToUser(o.PolicyType.SendOptions,(e=>e.data.disableHideEmail)),this.canAccessPremium=yield this.stateService.getCanAccessPremium(),this.emailVerified=yield this.stateService.getEmailVerified(),this.canAccessPremium&&this.emailVerified||(this.type=a.SendType.Text),null==this.send)if(this.editMode){const e=yield this.loadSend();this.send=yield e.decrypt()}else this.send=new c.SendView,this.send.type=null==this.type?a.SendType.File:this.type,this.send.file=new s.SendFileView,this.send.text=new l.SendTextView,this.send.deletionDate=new Date,this.send.deletionDate.setDate(this.send.deletionDate.getDate()+7);this.hasPassword=null!=this.send.password&&""!==this.send.password.trim()}))}submit(){return i(this,void 0,void 0,(function*(){if(this.disableSend)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("sendDisabledWarning")),!1;if(null==this.send.name||""===this.send.name)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("nameRequired")),!1;let e=null;if(this.send.type===a.SendType.File&&!this.editMode){const t=document.getElementById("file").files;if(null==t||0===t.length)return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectFile"));if(e=t[0],t[0].size>524288e3)return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("maxFileSize"))}null!=this.password&&""===this.password.trim()&&(this.password=null),this.formPromise=this.encryptSend(e).then((e=>i(this,void 0,void 0,(function*(){const t=this.sendService.saveWithServer(e);if(yield t,null==this.send.id&&(this.send.id=e[0].id),null==this.send.accessId&&(this.send.accessId=e[0].accessId),this.onSavedSend.emit(this.send),this.copyLink&&null!=this.link){const e=yield this.copyLinkToClipboard(this.link);null==e||e?this.platformUtilsService.showToast("success",null,this.i18nService.t(this.editMode?"editedSend":"createdSend")):(yield this.platformUtilsService.showDialog(this.i18nService.t(this.editMode?"editedSend":"createdSend"),null,this.i18nService.t("ok"),null,"success",null),yield this.copyLinkToClipboard(this.link))}}))));try{return yield this.formPromise,!0}catch(t){this.logService.error(t)}return!1}))}copyLinkToClipboard(e){return i(this,void 0,void 0,(function*(){return Promise.resolve(this.platformUtilsService.copyToClipboard(e))}))}delete(){return i(this,void 0,void 0,(function*(){if(null!=this.deletePromise)return!1;if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("deleteSendConfirmation"),this.i18nService.t("deleteSend"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{return this.deletePromise=this.sendService.deleteWithServer(this.send.id),yield this.deletePromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("deletedSend")),yield this.load(),this.onDeletedSend.emit(this.send),!0}catch(e){this.logService.error(e)}return!1}))}typeChanged(){this.send.type!==a.SendType.File||this.alertShown||(this.canAccessPremium?this.emailVerified||(this.alertShown=!0,this.messagingService.send("emailVerificationRequired")):(this.alertShown=!0,this.messagingService.send("premiumRequired")))}toggleOptions(){this.showOptions=!this.showOptions}loadSend(){return i(this,void 0,void 0,(function*(){return this.sendService.get(this.sendId)}))}encryptSend(e){return i(this,void 0,void 0,(function*(){const t=yield this.sendService.encrypt(this.send,e,this.password,null);try{t[0].deletionDate=null==this.deletionDate?null:new Date(this.deletionDate)}catch(n){t[0].deletionDate=null}try{t[0].expirationDate=null==this.expirationDate?null:new Date(this.expirationDate)}catch(i){t[0].expirationDate=null}return t}))}togglePasswordVisible(){this.showPassword=!this.showPassword,document.getElementById("password").focus()}}t.AddEditComponent=S,S.ɵfac=function(e){return new(e||S)(d.ɵɵdirectiveInject(p.I18nService),d.ɵɵdirectiveInject(u.PlatformUtilsService),d.ɵɵdirectiveInject(m.EnvironmentService),d.ɵɵdirectiveInject(h.DatePipe),d.ɵɵdirectiveInject(v.SendService),d.ɵɵdirectiveInject(f.MessagingService),d.ɵɵdirectiveInject(g.PolicyService),d.ɵɵdirectiveInject(y.LogService),d.ɵɵdirectiveInject(x.StateService))},S.ɵdir=d.ɵɵdefineDirective({type:S,inputs:{sendId:"sendId",type:"type"},outputs:{onSavedSend:"onSavedSend",onDeletedSend:"onDeletedSend",onCancelled:"onCancelled"}})},95546:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EffluxDatesComponent=void 0;n(57490);const i=n(32621),r=n(96832),o=(n(51554),n(73828),n(32621)),a=n(51554),s=n(73828),l=n(57490);var c,d,p;!function(e){e.Default="default",e.Firefox="firefox",e.Safari="safari"}(c||(c={})),function(e){e.DeletionDate="deletion",e.ExpriationDate="expiration"}(d||(d={})),function(e){e[e.OneHour=1]="OneHour",e[e.OneDay=24]="OneDay",e[e.TwoDays=48]="TwoDays",e[e.ThreeDays=72]="ThreeDays",e[e.SevenDays=168]="SevenDays",e[e.ThirtyDays=720]="ThirtyDays",e[e.Custom=0]="Custom",e[e.Never=null]="Never"}(p||(p={}));class u{constructor(e,t,n){this.i18nService=e,this.platformUtilsService=t,this.datePipe=n,this.datesChanged=new i.EventEmitter,this.datesForm=new r.FormGroup({selectedDeletionDatePreset:new r.FormControl,selectedExpirationDatePreset:new r.FormControl,defaultDeletionDateTime:new r.FormControl,defaultExpirationDateTime:new r.FormControl,fallbackDeletionDate:new r.FormControl,fallbackDeletionTime:new r.FormControl,fallbackExpirationDate:new r.FormControl,fallbackExpirationTime:new r.FormControl}),this.deletionDatePresets=[{name:this.i18nService.t("oneHour"),value:p.OneHour},{name:this.i18nService.t("oneDay"),value:p.OneDay},{name:this.i18nService.t("days","2"),value:p.TwoDays},{name:this.i18nService.t("days","3"),value:p.ThreeDays},{name:this.i18nService.t("days","7"),value:p.SevenDays},{name:this.i18nService.t("days","30"),value:p.ThirtyDays},{name:this.i18nService.t("custom"),value:p.Custom}],this.expirationDatePresets=[{name:this.i18nService.t("never"),value:p.Never}].concat([...this.deletionDatePresets])}get browserPath(){return this.platformUtilsService.isFirefox()?c.Firefox:this.platformUtilsService.isSafari()?c.Safari:c.Default}get selectedDeletionDatePreset(){return this.datesForm.get("selectedDeletionDatePreset")}get selectedExpirationDatePreset(){return this.datesForm.get("selectedExpirationDatePreset")}get defaultDeletionDateTime(){return this.datesForm.get("defaultDeletionDateTime")}get defaultExpirationDateTime(){return this.datesForm.get("defaultExpirationDateTime")}get fallbackDeletionDate(){return this.datesForm.get("fallbackDeletionDate")}get fallbackDeletionTime(){return this.datesForm.get("fallbackDeletionTime")}get fallbackExpirationDate(){return this.datesForm.get("fallbackExpirationDate")}get fallbackExpirationTime(){return this.datesForm.get("fallbackExpirationTime")}get formattedDeletionDate(){switch(this.selectedDeletionDatePreset.value){case p.Never:return this.selectedDeletionDatePreset.setValue(p.SevenDays),this.formattedDeletionDate;case p.Custom:switch(this.browserPath){case c.Safari:case c.Firefox:return this.fallbackDeletionDate.value+"T"+this.fallbackDeletionTime.value;default:return this.defaultDeletionDateTime.value}default:{const e=new Date,t=e.setTime(e.getTime()+60*this.selectedDeletionDatePreset.value*60*1e3);return new Date(t).toString()}}}get formattedExpirationDate(){switch(this.selectedExpirationDatePreset.value){case p.Never:return null;case p.Custom:switch(this.browserPath){case c.Safari:case c.Firefox:return this.fallbackExpirationDate.value&&this.fallbackExpirationTime.value||!this.editMode?this.fallbackExpirationDate.value+"T"+this.fallbackExpirationTime.value:null;default:return this.defaultExpirationDateTime.value?this.defaultExpirationDateTime.value:null}default:{const e=new Date,t=e.setTime(e.getTime()+60*this.selectedExpirationDatePreset.value*60*1e3);return new Date(t).toString()}}}get safariDeletionTimePresetOptions(){return this.safariTimePresetOptions(d.DeletionDate)}get safariExpirationTimePresetOptions(){return this.safariTimePresetOptions(d.ExpriationDate)}get nextWeek(){const e=new Date;return e.setDate(e.getDate()+7),e}ngOnInit(){this.setInitialFormValues(),this.emitDates(),this.datesForm.valueChanges.subscribe((()=>{this.emitDates()}))}onDeletionDatePresetSelect(e){this.selectedDeletionDatePreset.setValue(e)}clearExpiration(){switch(this.browserPath){case c.Safari:case c.Firefox:this.fallbackExpirationDate.setValue(null),this.fallbackExpirationTime.setValue(null);break;case c.Default:this.defaultExpirationDateTime.setValue(null)}}emitDates(){this.datesChanged.emit({deletionDate:this.formattedDeletionDate,expirationDate:this.formattedExpirationDate})}setInitialFormValues(){if(this.editMode)switch(this.selectedDeletionDatePreset.setValue(p.Custom),this.selectedExpirationDatePreset.setValue(p.Custom),this.browserPath){case c.Safari:case c.Firefox:this.fallbackDeletionDate.setValue(this.initialDeletionDate.toISOString().slice(0,10)),this.fallbackDeletionTime.setValue(this.initialDeletionDate.toTimeString().slice(0,5)),null!=this.initialExpirationDate&&(this.fallbackExpirationDate.setValue(this.initialExpirationDate.toISOString().slice(0,10)),this.fallbackExpirationTime.setValue(this.initialExpirationDate.toTimeString().slice(0,5)));break;case c.Default:this.initialExpirationDate&&this.defaultExpirationDateTime.setValue(this.datePipe.transform(new Date(this.initialExpirationDate),"yyyy-MM-ddTHH:mm")),this.defaultDeletionDateTime.setValue(this.datePipe.transform(new Date(this.initialDeletionDate),"yyyy-MM-ddTHH:mm"))}else if(this.selectedDeletionDatePreset.setValue(p.SevenDays),this.selectedExpirationDatePreset.setValue(p.Never),this.browserPath===c.Safari)this.fallbackDeletionDate.setValue(this.nextWeek.toISOString().slice(0,10)),this.fallbackDeletionTime.setValue(this.safariTimePresetOptions(d.DeletionDate)[1].twentyFourHour)}safariTimePresetOptions(e){const t=[],n=[],i=[],r=[];for(let a=1;a<=12;a++)for(let e=0;e<60;e+=15){let o=a.toString(),s=e.toString();if(a<10&&(o="0"+o),e<10&&(s="0"+s),12===a){const e={twelveHour:`${o}:${s} AM`,twentyFourHour:`00:${s}`};n.push(e);const i={twelveHour:`${o}:${s} PM`,twentyFourHour:`${o}:${s}`};t.push(i)}else{const e={twelveHour:`${o}:${s} AM`,twentyFourHour:`${o}:${s}`};i.push(e);const t={twelveHour:`${o}:${s} PM`,twentyFourHour:`${a+12}:${s}`};r.push(t)}}const o=[...n,...i,...t,...r];if(e===d.ExpriationDate&&null!=this.initialExpirationDate&&this.editMode){return[{twelveHour:this.datePipe.transform(this.initialExpirationDate,"hh:mm a"),twentyFourHour:this.datePipe.transform(this.initialExpirationDate,"HH:mm")},{twelveHour:null,twentyFourHour:null},...o]}if(e===d.DeletionDate&&null!=this.initialDeletionDate&&this.editMode){return[{twelveHour:this.datePipe.transform(this.initialDeletionDate,"hh:mm a"),twentyFourHour:this.datePipe.transform(this.initialDeletionDate,"HH:mm")},...o]}return[{twelveHour:null,twentyFourHour:null},...o]}}t.EffluxDatesComponent=u,u.ɵfac=function(e){return new(e||u)(o.ɵɵdirectiveInject(a.I18nService),o.ɵɵdirectiveInject(s.PlatformUtilsService),o.ɵɵdirectiveInject(l.DatePipe))},u.ɵdir=o.ɵɵdefineDirective({type:u,inputs:{initialDeletionDate:"initialDeletionDate",initialExpirationDate:"initialExpirationDate",editMode:"editMode",disabled:"disabled"},outputs:{datesChanged:"datesChanged"}})},23446:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SendComponent=void 0;n(32621),n(56071),n(51554),n(36631),n(73828),n(62166),n(60421),n(76532);const r=n(49906),o=n(70149),a=n(32621),s=n(76532),l=n(51554),c=n(73828),d=n(56071),p=n(60421),u=n(62166),m=n(36631);class h{constructor(e,t,n,i,r,a,s,l){this.sendService=e,this.i18nService=t,this.platformUtilsService=n,this.environmentService=i,this.ngZone=r,this.searchService=a,this.policyService=s,this.logService=l,this.disableSend=!1,this.sendType=o.SendType,this.loaded=!1,this.loading=!0,this.refreshing=!1,this.expired=!1,this.type=null,this.sends=[],this.filteredSends=[],this.searchPending=!1,this.hasSearched=!1}ngOnInit(){return i(this,void 0,void 0,(function*(){this.disableSend=yield this.policyService.policyAppliesToUser(r.PolicyType.DisableSend)}))}load(e=null){return i(this,void 0,void 0,(function*(){this.loading=!0;const e=yield this.sendService.getAllDecrypted();this.sends=e,null!=this.onSuccessfulLoad?yield this.onSuccessfulLoad():this.selectAll(),this.loading=!1,this.loaded=!0}))}reload(e=null){return i(this,void 0,void 0,(function*(){this.loaded=!1,this.sends=[],yield this.load(e)}))}refresh(){return i(this,void 0,void 0,(function*(){try{this.refreshing=!0,yield this.reload(this.filter)}finally{this.refreshing=!1}}))}applyFilter(e=null){return i(this,void 0,void 0,(function*(){this.filter=e,yield this.search(null)}))}search(e=null){return i(this,void 0,void 0,(function*(){if(this.searchPending=!1,null!=this.searchTimeout&&clearTimeout(this.searchTimeout),null==e)return this.hasSearched=this.searchService.isSearchable(this.searchText),this.filteredSends=this.sends.filter((e=>null==this.filter||this.filter(e))),void this.applyTextSearch();this.searchPending=!0,this.searchTimeout=setTimeout((()=>i(this,void 0,void 0,(function*(){this.hasSearched=this.searchService.isSearchable(this.searchText),this.filteredSends=this.sends.filter((e=>null==this.filter||this.filter(e))),this.applyTextSearch(),this.searchPending=!1}))),e)}))}removePassword(e){return i(this,void 0,void 0,(function*(){if(null!=this.actionPromise||null==e.password)return;if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("removePasswordConfirmation"),this.i18nService.t("removePassword"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{this.actionPromise=this.sendService.removePasswordWithServer(e.id),yield this.actionPromise,null!=this.onSuccessfulRemovePassword?this.onSuccessfulRemovePassword():(this.platformUtilsService.showToast("success",null,this.i18nService.t("removedPassword")),yield this.load())}catch(t){this.logService.error(t)}this.actionPromise=null}))}delete(e){return i(this,void 0,void 0,(function*(){if(null!=this.actionPromise)return!1;if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("deleteSendConfirmation"),this.i18nService.t("deleteSend"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{this.actionPromise=this.sendService.deleteWithServer(e.id),yield this.actionPromise,null!=this.onSuccessfulDelete?this.onSuccessfulDelete():(this.platformUtilsService.showToast("success",null,this.i18nService.t("deletedSend")),yield this.refresh())}catch(t){this.logService.error(t)}return this.actionPromise=null,!0}))}copy(e){const t=this.environmentService.getSendUrl()+e.accessId+"/"+e.urlB64Key;this.platformUtilsService.copyToClipboard(t),this.platformUtilsService.showToast("success",null,this.i18nService.t("valueCopied",this.i18nService.t("sendLink")))}searchTextChanged(){this.search(200)}selectAll(){this.clearSelections(),this.selectedAll=!0,this.applyFilter(null)}selectType(e){this.clearSelections(),this.selectedType=e,this.applyFilter((t=>t.type===e))}clearSelections(){this.selectedAll=!1,this.selectedType=null}applyTextSearch(){null!=this.searchText&&(this.filteredSends=this.searchService.searchSends(this.filteredSends,this.searchText))}}t.SendComponent=h,h.ɵfac=function(e){return new(e||h)(a.ɵɵdirectiveInject(s.SendService),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(c.PlatformUtilsService),a.ɵɵdirectiveInject(d.EnvironmentService),a.ɵɵdirectiveInject(a.NgZone),a.ɵɵdirectiveInject(p.SearchService),a.ɵɵdirectiveInject(u.PolicyService),a.ɵɵdirectiveInject(m.LogService))},h.ɵdir=a.ɵɵdefineDirective({type:h})},24656:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SetPasswordComponent=void 0;n(68012);const r=n(14857),o=(n(91674),n(85714),n(51554),n(45552),n(84275),n(73828),n(62166),n(73569),n(9724),n(43578)),a=n(20971),s=n(82769),l=n(74284),c=n(27784),d=n(57751),p=n(16545),u=n(32621),m=n(51554),h=n(85714),v=n(45552),f=n(84275),g=n(73828),y=n(62166),x=n(68012),S=n(91674),b=n(9724),w=n(73569);class C extends p.ChangePasswordComponent{constructor(e,t,n,i,r,o,a,s,l,c,d){super(e,t,n,i,r,o,d),this.router=a,this.apiService=s,this.syncService=l,this.route=c,this.syncLoading=!0,this.showPassword=!1,this.hint="",this.identifier=null,this.resetPasswordAutoEnroll=!1,this.successRoute="vault"}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){if(yield this.syncService.fullSync(!0),this.syncLoading=!1,this.route.queryParams.pipe(r.first()).subscribe((e=>i(this,void 0,void 0,(function*(){null!=e.identifier&&(this.identifier=e.identifier)})))),null!=this.identifier)try{const e=yield this.apiService.getOrganizationAutoEnrollStatus(this.identifier);this.orgId=e.id,this.resetPasswordAutoEnroll=e.resetPasswordEnabled,this.enforcedPolicyOptions=yield this.policyService.getMasterPasswordPoliciesForInvitedUsers(this.orgId)}catch(t){this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred"))}e.ngOnInit.call(this)}))}setupSubmitActions(){return i(this,void 0,void 0,(function*(){return this.kdf=a.DEFAULT_KDF_TYPE,this.kdfIterations=a.DEFAULT_KDF_ITERATIONS,!0}))}performSubmitActions(e,t,n){return i(this,void 0,void 0,(function*(){const r=yield this.cryptoService.makeKeyPair(n[0]),o=new d.SetPasswordRequest(e,n[1].encryptedString,this.hint,this.kdf,this.kdfIterations,this.identifier,new l.KeysRequest(r[0],r[1].encryptedString));try{this.resetPasswordAutoEnroll?this.formPromise=this.apiService.setPassword(o).then((()=>i(this,void 0,void 0,(function*(){return yield this.onSetPasswordSuccess(t,n,r),this.apiService.getOrganizationKeys(this.orgId)})))).then((e=>i(this,void 0,void 0,(function*(){if(null==e)throw new Error(this.i18nService.t("resetPasswordOrgKeysError"));const t=yield this.stateService.getUserId(),n=s.Utils.fromB64ToArray(e.publicKey),i=yield this.cryptoService.getEncKey(),r=yield this.cryptoService.rsaEncrypt(i.key,n.buffer),o=new c.OrganizationUserResetPasswordEnrollmentRequest;return o.resetPasswordKey=r.encryptedString,this.apiService.putOrganizationUserResetPasswordEnrollment(this.orgId,t,o)})))):this.formPromise=this.apiService.setPassword(o).then((()=>i(this,void 0,void 0,(function*(){yield this.onSetPasswordSuccess(t,n,r)})))),yield this.formPromise,null!=this.onSuccessfulChangePassword?this.onSuccessfulChangePassword():this.router.navigate([this.successRoute])}catch(a){this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred"))}}))}togglePassword(e){this.showPassword=!this.showPassword,document.getElementById(e?"masterPasswordRetype":"masterPassword").focus()}onSetPasswordSuccess(e,t,n){return i(this,void 0,void 0,(function*(){yield this.stateService.setKdfType(this.kdf),yield this.stateService.setKdfIterations(this.kdfIterations),yield this.cryptoService.setKey(e),yield this.cryptoService.setEncKey(t[1].encryptedString),yield this.cryptoService.setEncPrivateKey(n[1].encryptedString);const i=yield this.cryptoService.hashPassword(this.masterPassword,e,o.HashPurpose.LocalAuthorization);yield this.cryptoService.setKeyHash(i)}))}}t.SetPasswordComponent=C,C.ɵfac=function(e){return new(e||C)(u.ɵɵdirectiveInject(m.I18nService),u.ɵɵdirectiveInject(h.CryptoService),u.ɵɵdirectiveInject(v.MessagingService),u.ɵɵdirectiveInject(f.PasswordGenerationService),u.ɵɵdirectiveInject(g.PlatformUtilsService),u.ɵɵdirectiveInject(y.PolicyService),u.ɵɵdirectiveInject(x.Router),u.ɵɵdirectiveInject(S.ApiService),u.ɵɵdirectiveInject(b.SyncService),u.ɵɵdirectiveInject(x.ActivatedRoute),u.ɵɵdirectiveInject(w.StateService))},C.ɵdir=u.ɵɵdefineDirective({type:C,features:[u.ɵɵInheritDefinitionFeature]})},96853:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.VaultTimeoutInputComponent=void 0;n(96832),n(51554),n(62166);const r=n(49906),o=n(32621),a=n(96832),s=n(62166),l=n(51554);class c{constructor(e,t,n){this.formBuilder=e,this.policyService=t,this.i18nService=n,this.form=this.formBuilder.group({vaultTimeout:[null],custom:this.formBuilder.group({hours:[null],minutes:[null]})})}get showCustom(){return this.form.get("vaultTimeout").value===c.CUSTOM_VALUE}ngOnInit(){return i(this,void 0,void 0,(function*(){if(yield this.policyService.policyAppliesToUser(r.PolicyType.MaximumVaultTimeout)){const e=yield this.policyService.getAll(r.PolicyType.MaximumVaultTimeout);this.vaultTimeoutPolicy=e[0],this.vaultTimeoutPolicyHours=Math.floor(this.vaultTimeoutPolicy.data.minutes/60),this.vaultTimeoutPolicyMinutes=this.vaultTimeoutPolicy.data.minutes%60,this.vaultTimeouts=this.vaultTimeouts.filter((e=>e.value<=this.vaultTimeoutPolicy.data.minutes&&(e.value>0||e.value===c.CUSTOM_VALUE)&&null!=e.value)),this.validatorChange()}this.form.valueChanges.subscribe((e=>i(this,void 0,void 0,(function*(){this.onChange(this.getVaultTimeout(e))})))),this.form.get("vaultTimeout").valueChanges.subscribe((e=>{if(e!==c.CUSTOM_VALUE)return;const t=Math.max(this.form.value.vaultTimeout,0);this.form.patchValue({custom:{hours:Math.floor(t/60),minutes:t%60}})}))}))}ngOnChanges(){this.vaultTimeouts.push({name:this.i18nService.t("custom"),value:c.CUSTOM_VALUE})}getVaultTimeout(e){return e.vaultTimeout!==c.CUSTOM_VALUE?e.vaultTimeout:60*e.custom.hours+e.custom.minutes}writeValue(e){null!=e&&(this.vaultTimeouts.every((t=>t.value!==e))?this.form.setValue({vaultTimeout:c.CUSTOM_VALUE,custom:{hours:Math.floor(e/60),minutes:e%60}}):this.form.patchValue({vaultTimeout:e}))}registerOnChange(e){this.onChange=e}registerOnTouched(e){}setDisabledState(e){}validate(e){var t,n;return this.vaultTimeoutPolicy&&(null===(n=null===(t=this.vaultTimeoutPolicy)||void 0===t?void 0:t.data)||void 0===n?void 0:n.minutes)e)).filter((e=>!e.readOnly));const t=yield this.organizationService.getAll();this.organizations=t.sort(a.Utils.getSortFunction(this.i18nService,"name")).filter((e=>e.enabled&&e.status===o.OrganizationUserStatusType.Confirmed));const n=yield this.cipherService.get(this.cipherId);this.cipher=yield n.decrypt(),null==this.organizationId&&this.organizations.length>0&&(this.organizationId=this.organizations[0].id),this.filterCollections()}))}filterCollections(){this.writeableCollections.forEach((e=>e.checked=!1)),null==this.organizationId||0===this.writeableCollections.length?this.collections=[]:this.collections=this.writeableCollections.filter((e=>e.organizationId===this.organizationId))}submit(){var e,t;return i(this,void 0,void 0,(function*(){const n=this.collections.filter((e=>!!e.checked)).map((e=>e.id));if(0===n.length)return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectOneCollection"));const r=yield this.cipherService.get(this.cipherId),o=yield r.decrypt(),a=null!==(t=null===(e=this.organizations.find((e=>e.id===this.organizationId)))||void 0===e?void 0:e.name)&&void 0!==t?t:this.i18nService.t("organization");try{return this.formPromise=this.cipherService.shareWithServer(o,this.organizationId,n).then((()=>i(this,void 0,void 0,(function*(){this.onSharedCipher.emit(),this.platformUtilsService.showToast("success",null,this.i18nService.t("movedItemToOrg",o.name,a))})))),yield this.formPromise,!0}catch(s){this.logService.error(s)}return!1}))}get canSave(){if(null!=this.collections)for(let e=0;ei(this,void 0,void 0,(function*(){if(null!=e.code&&null!=e.state){const t=yield this.stateService.getSsoCodeVerifier(),n=yield this.stateService.getSsoState();yield this.stateService.setSsoCodeVerifier(null),yield this.stateService.setSsoState(null),null!=e.code&&null!=t&&null!=n&&this.checkState(n,e.state)&&(yield this.logIn(e.code,t,this.getOrgIdentifierFromState(e.state)))}else null!=e.clientId&&null!=e.redirectUri&&null!=e.state&&null!=e.codeChallenge&&(this.redirectUri=e.redirectUri,this.state=e.state,this.codeChallenge=e.codeChallenge,this.clientId=e.clientId)}))))}))}submit(e,t){return i(this,void 0,void 0,(function*(){if(this.initiateSsoFormPromise=this.preValidate(),yield this.initiateSsoFormPromise){const n=yield this.buildAuthorizeUrl(e,t);this.platformUtilsService.launchUri(n,{sameWindow:!0})}}))}preValidate(){return i(this,void 0,void 0,(function*(){return null==this.identifier||""===this.identifier?(this.platformUtilsService.showToast("error",this.i18nService.t("ssoValidationFailed"),this.i18nService.t("ssoIdentifierRequired")),!1):yield this.apiService.preValidateSso(this.identifier)}))}buildAuthorizeUrl(e,t){return i(this,void 0,void 0,(function*(){let n=this.codeChallenge,i=this.state;const r={type:"password",length:64,uppercase:!0,lowercase:!0,numbers:!0,special:!1};if(null==n){const e=yield this.passwordGenerationService.generatePassword(r),t=yield this.cryptoFunctionService.hash(e,"sha256");n=o.Utils.fromBufferToUrlB64(t),yield this.stateService.setSsoCodeVerifier(e)}null==i&&(i=yield this.passwordGenerationService.generatePassword(r),e&&(i+=`_returnUri='${e}'`)),i+=`_identifier=${this.identifier}`,yield this.stateService.setSsoState(i);let a=this.environmentService.getIdentityUrl()+"/connect/authorize?client_id="+this.clientId+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&scope=api offline_access&state="+i+"&code_challenge="+n+"&code_challenge_method=S256&response_mode=query&domain_hint="+encodeURIComponent(this.identifier);if(t){const e=yield this.apiService.getSsoUserIdentifier();a+=`&user_identifier=${encodeURIComponent(e)}`}return a}))}logIn(e,t,n){return i(this,void 0,void 0,(function*(){this.loggingIn=!0;try{const i=new a.SsoLogInCredentials(e,t,this.redirectUri,n);this.formPromise=this.authService.logIn(i);const r=yield this.formPromise;if(r.requiresTwoFactor)null!=this.onSuccessfulLoginTwoFactorNavigate?this.onSuccessfulLoginTwoFactorNavigate():this.router.navigate([this.twoFactorRoute],{queryParams:{identifier:n,sso:"true"}});else if(r.resetMasterPassword)null!=this.onSuccessfulLoginChangePasswordNavigate?this.onSuccessfulLoginChangePasswordNavigate():this.router.navigate([this.changePasswordRoute],{queryParams:{identifier:n}});else if(r.forcePasswordReset)null!=this.onSuccessfulLoginForceResetNavigate?this.onSuccessfulLoginForceResetNavigate():this.router.navigate([this.forcePasswordResetRoute]);else{const e=yield this.stateService.getDisableFavicon();yield this.stateService.setDisableFavicon(!!e),null!=this.onSuccessfulLogin&&this.onSuccessfulLogin(),null!=this.onSuccessfulLoginNavigate?this.onSuccessfulLoginNavigate():this.router.navigate([this.successRoute])}}catch(i){this.logService.error(i),"Key Connector error"===i.message&&this.platformUtilsService.showToast("error",null,this.i18nService.t("ssoKeyConnectorError"))}this.loggingIn=!1}))}getOrgIdentifierFromState(e){if(null==e)return null;const t=e.split("_identifier=");return t.length>1?t[1]:null}checkState(e,t){if(null==e)return!1;if(null==t)return!1;const n=e.split("_identifier="),i=t.split("_identifier=");return n[0]===i[0]}}t.SsoComponent=y,y.ɵfac=function(e){return new(e||y)(s.ɵɵdirectiveInject(l.AuthService),s.ɵɵdirectiveInject(c.Router),s.ɵɵdirectiveInject(d.I18nService),s.ɵɵdirectiveInject(c.ActivatedRoute),s.ɵɵdirectiveInject(p.StateService),s.ɵɵdirectiveInject(u.PlatformUtilsService),s.ɵɵdirectiveInject(m.ApiService),s.ɵɵdirectiveInject(h.CryptoFunctionService),s.ɵɵdirectiveInject(v.EnvironmentService),s.ɵɵdirectiveInject(f.PasswordGenerationService),s.ɵɵdirectiveInject(g.LogService))},y.ɵdir=s.ɵɵdefineDirective({type:y})},59703:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BitwardenToastModule=t.BitwardenToastGlobalConfig=t.BitwardenToast=void 0;const i=n(98212),r=n(57490),o=(n(32621),n(68290)),a=n(32621),s=n(68290),l=n(57490);function c(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"button",6),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);return a.ɵɵnextContext().remove()})),a.ɵɵelementStart(1,"span",7),a.ɵɵtext(2,"×"),a.ɵɵelementEnd(),a.ɵɵelementEnd()}}function d(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1),a.ɵɵelementContainerEnd()),2&e){const e=a.ɵɵnextContext(2);a.ɵɵadvance(1),a.ɵɵtextInterpolate1("[",e.duplicatesCount+1,"]")}}function p(e,t){if(1&e&&(a.ɵɵelementStart(0,"div"),a.ɵɵtext(1),a.ɵɵtemplate(2,d,2,1,"ng-container",5),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext();a.ɵɵclassMap(e.options.titleClass),a.ɵɵattribute("aria-label",e.title),a.ɵɵadvance(1),a.ɵɵtextInterpolate1(" ",e.title," "),a.ɵɵadvance(1),a.ɵɵproperty("ngIf",e.duplicatesCount)}}function u(e,t){if(1&e&&a.ɵɵelement(0,"div",8),2&e){const e=a.ɵɵnextContext();a.ɵɵclassMap(e.options.messageClass),a.ɵɵproperty("innerHTML",e.message,a.ɵɵsanitizeHtml)}}function m(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",9),a.ɵɵtext(1),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext();a.ɵɵclassMap(e.options.messageClass),a.ɵɵattribute("aria-label",e.message),a.ɵɵadvance(1),a.ɵɵtextInterpolate1(" ",e.message," ")}}function h(e,t){if(1&e&&(a.ɵɵelementStart(0,"div"),a.ɵɵelement(1,"div",10),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext();a.ɵɵadvance(1),a.ɵɵstyleProp("width",e.width+"%")}}class v extends o.Toast{constructor(e,t){super(e,t),this.toastrService=e,this.toastPackage=t}}t.BitwardenToast=v,v.ɵfac=function(e){return new(e||v)(a.ɵɵdirectiveInject(s.ToastrService),a.ɵɵdirectiveInject(s.ToastPackage))},v.ɵcmp=a.ɵɵdefineComponent({type:v,selectors:[["","toast-component2",""]],features:[a.ɵɵInheritDefinitionFeature],attrs:["toast-component2",""],decls:8,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[1,"icon"],[3,"class",4,"ngIf"],["role","alertdialog","aria-live","polite",3,"class","innerHTML",4,"ngIf"],["role","alertdialog","aria-live","polite",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alertdialog","aria-live","polite",3,"innerHTML"],["role","alertdialog","aria-live","polite"],[1,"toast-progress"]],template:function(e,t){1&e&&(a.ɵɵtemplate(0,c,3,0,"button",0),a.ɵɵelementStart(1,"div",1),a.ɵɵelement(2,"i"),a.ɵɵelementEnd(),a.ɵɵelementStart(3,"div"),a.ɵɵtemplate(4,p,3,5,"div",2),a.ɵɵtemplate(5,u,1,3,"div",3),a.ɵɵtemplate(6,m,2,4,"div",4),a.ɵɵelementEnd(),a.ɵɵtemplate(7,h,2,2,"div",5)),2&e&&(a.ɵɵproperty("ngIf",t.options.closeButton),a.ɵɵadvance(4),a.ɵɵproperty("ngIf",t.title),a.ɵɵadvance(1),a.ɵɵproperty("ngIf",t.message&&t.options.enableHtml),a.ɵɵadvance(1),a.ɵɵproperty("ngIf",t.message&&!t.options.enableHtml),a.ɵɵadvance(1),a.ɵɵproperty("ngIf",t.options.progressBar))},directives:[l.NgIf],encapsulation:2,data:{animation:[i.trigger("flyInOut",[i.state("inactive",i.style({opacity:0})),i.state("active",i.style({opacity:1})),i.state("removed",i.style({opacity:0})),i.transition("inactive => active",i.animate("{{ easeTime }}ms {{ easing }}")),i.transition("active => removed",i.animate("{{ easeTime }}ms {{ easing }}"))])]}}),t.BitwardenToastGlobalConfig=Object.assign(Object.assign({},o.DefaultNoComponentGlobalConfig),{toastComponent:v});class f{static forRoot(e={}){return{ngModule:f,providers:[{provide:o.TOAST_CONFIG,useValue:{default:t.BitwardenToastGlobalConfig,config:e}}]}}}t.BitwardenToastModule=f,f.ɵfac=function(e){return new(e||f)},f.ɵmod=a.ɵɵdefineNgModule({type:f}),f.ɵinj=a.ɵɵdefineInjector({imports:[[r.CommonModule]]})},63736:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorOptionsComponent=void 0;const i=n(32621),r=(n(68012),n(51554),n(73828),n(27458),n(32621)),o=n(27458),a=n(68012),s=n(51554),l=n(73828);class c{constructor(e,t,n,r,o){this.twoFactorService=e,this.router=t,this.i18nService=n,this.platformUtilsService=r,this.win=o,this.onProviderSelected=new i.EventEmitter,this.onRecoverSelected=new i.EventEmitter,this.providers=[]}ngOnInit(){this.providers=this.twoFactorService.getSupportedProviders(this.win)}choose(e){this.onProviderSelected.emit(e.type)}recover(){this.platformUtilsService.launchUri("https://bitwarden.com/help/lost-two-step-device/"),this.onRecoverSelected.emit()}}t.TwoFactorOptionsComponent=c,c.ɵfac=function(e){return new(e||c)(r.ɵɵdirectiveInject(o.TwoFactorService),r.ɵɵdirectiveInject(a.Router),r.ɵɵdirectiveInject(s.I18nService),r.ɵɵdirectiveInject(l.PlatformUtilsService),r.ɵɵdirectiveInject(Window))},c.ɵdir=r.ɵɵdefineDirective({type:c,outputs:{onProviderSelected:"onProviderSelected",onRecoverSelected:"onRecoverSelected"}})},71116:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorComponent=void 0;n(68012);const r=n(51597),o=n(14857),a=(n(91674),n(5576),n(62694),n(56071),n(51554),n(36631),n(73828),n(73569),n(27458),n(97374)),s=n(28705),l=n(74598),c=n(88307),d=n(96837),p=n(60765),u=n(32621),m=n(62694),h=n(68012),v=n(51554),f=n(91674),g=n(73828),y=n(56071),x=n(73569),S=n(36631),b=n(27458),w=n(5576);class C extends p.CaptchaProtectedComponent{constructor(e,t,n,i,r,o,s,l,c,p,u,m){super(s,n,r),this.authService=e,this.router=t,this.i18nService=n,this.apiService=i,this.platformUtilsService=r,this.win=o,this.environmentService=s,this.stateService=l,this.route=c,this.logService=p,this.twoFactorService=u,this.appIdService=m,this.token="",this.remember=!1,this.webAuthnReady=!1,this.webAuthnNewTab=!1,this.providers=d.TwoFactorProviders,this.providerType=a.TwoFactorProviderType,this.selectedProviderType=a.TwoFactorProviderType.Authenticator,this.webAuthnSupported=!1,this.webAuthn=null,this.title="",this.twoFactorEmail=null,this.identifier=null,this.loginRoute="login",this.successRoute="vault",this.webAuthnSupported=this.platformUtilsService.supportsWebAuthn(o)}get webAuthnAllow(){return`publickey-credentials-get ${this.environmentService.getWebVaultUrl()}`}ngOnInit(){return i(this,void 0,void 0,(function*(){if(this.authing&&null!=this.twoFactorService.getProviders()){if(this.route.queryParams.pipe(o.first()).subscribe((e=>{null!=e.identifier&&(this.identifier=e.identifier)})),this.needsLock&&(this.successRoute="lock"),null!=this.win&&this.webAuthnSupported){const e=this.environmentService.getWebVaultUrl();this.webAuthn=new s.WebAuthnIFrame(this.win,e,this.webAuthnNewTab,this.platformUtilsService,this.i18nService,(e=>{this.token=e,this.submit()}),(e=>{this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),e)}),(e=>{"ready"===e&&(this.webAuthnReady=!0)}))}this.selectedProviderType=this.twoFactorService.getDefaultProvider(this.webAuthnSupported),yield this.init()}else this.router.navigate([this.loginRoute])}))}ngOnDestroy(){this.cleanupWebAuthn(),this.webAuthn=null}init(){return i(this,void 0,void 0,(function*(){if(null==this.selectedProviderType)return void(this.title=this.i18nService.t("loginUnavailable"));this.cleanupWebAuthn(),this.title=d.TwoFactorProviders[this.selectedProviderType].name;const e=this.twoFactorService.getProviders().get(this.selectedProviderType);switch(this.selectedProviderType){case a.TwoFactorProviderType.WebAuthn:this.webAuthnNewTab||setTimeout((()=>{this.authWebAuthn()}),500);break;case a.TwoFactorProviderType.Duo:case a.TwoFactorProviderType.OrganizationDuo:setTimeout((()=>{r.init({iframe:void 0,host:e.Host,sig_request:e.Signature,submit_callback:e=>i(this,void 0,void 0,(function*(){const t=e.querySelector('input[name="sig_response"]');null!=t&&(this.token=t.value,yield this.submit())}))})}),0);break;case a.TwoFactorProviderType.Email:this.twoFactorEmail=e.Email,this.twoFactorService.getProviders().size>1&&(yield this.sendEmail(!1))}}))}submit(){return i(this,void 0,void 0,(function*(){if(yield this.setupCaptcha(),null!=this.token&&""!==this.token){if(this.selectedProviderType===a.TwoFactorProviderType.WebAuthn){if(null==this.webAuthn)return;this.webAuthn.stop()}else this.selectedProviderType!==a.TwoFactorProviderType.Email&&this.selectedProviderType!==a.TwoFactorProviderType.Authenticator||(this.token=this.token.replace(" ","").trim());try{yield this.doSubmit()}catch(e){this.selectedProviderType===a.TwoFactorProviderType.WebAuthn&&null!=this.webAuthn&&this.webAuthn.start()}}else this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("verificationCodeRequired"))}))}doSubmit(){return i(this,void 0,void 0,(function*(){this.formPromise=this.authService.logInTwoFactor(new l.TokenRequestTwoFactor(this.selectedProviderType,this.token,this.remember),this.captchaToken);const e=yield this.formPromise,t=yield this.stateService.getDisableFavicon();yield this.stateService.setDisableFavicon(!!t),this.handleCaptchaRequired(e)||(null!=this.onSuccessfulLogin&&this.onSuccessfulLogin(),e.resetMasterPassword&&(this.successRoute="set-password"),e.forcePasswordReset&&(this.successRoute="update-temp-password"),null!=this.onSuccessfulLoginNavigate?this.onSuccessfulLoginNavigate():this.router.navigate([this.successRoute],{queryParams:{identifier:this.identifier}}))}))}sendEmail(e){return i(this,void 0,void 0,(function*(){if(this.selectedProviderType===a.TwoFactorProviderType.Email&&null==this.emailPromise){try{const t=new c.TwoFactorEmailRequest;t.email=this.authService.email,t.masterPasswordHash=this.authService.masterPasswordHash,t.deviceIdentifier=yield this.appIdService.getAppId(),this.emailPromise=this.apiService.postTwoFactorEmail(t),yield this.emailPromise,e&&this.platformUtilsService.showToast("success",null,this.i18nService.t("verificationCodeEmailSent",this.twoFactorEmail))}catch(t){this.logService.error(t)}this.emailPromise=null}}))}authWebAuthn(){const e=this.twoFactorService.getProviders().get(this.selectedProviderType);this.webAuthnSupported&&null!=this.webAuthn&&this.webAuthn.init(e)}cleanupWebAuthn(){null!=this.webAuthn&&(this.webAuthn.stop(),this.webAuthn.cleanup())}get authing(){return this.authService.authingWithPassword()||this.authService.authingWithSso()||this.authService.authingWithApiKey()}get needsLock(){return this.authService.authingWithSso()||this.authService.authingWithApiKey()}}t.TwoFactorComponent=C,C.ɵfac=function(e){return new(e||C)(u.ɵɵdirectiveInject(m.AuthService),u.ɵɵdirectiveInject(h.Router),u.ɵɵdirectiveInject(v.I18nService),u.ɵɵdirectiveInject(f.ApiService),u.ɵɵdirectiveInject(g.PlatformUtilsService),u.ɵɵdirectiveInject(Window),u.ɵɵdirectiveInject(y.EnvironmentService),u.ɵɵdirectiveInject(x.StateService),u.ɵɵdirectiveInject(h.ActivatedRoute),u.ɵɵdirectiveInject(S.LogService),u.ɵɵdirectiveInject(b.TwoFactorService),u.ɵɵdirectiveInject(w.AppIdService))},C.ɵdir=u.ɵɵdefineDirective({type:C,features:[u.ɵɵInheritDefinitionFeature]})},56117:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UpdatePasswordComponent=void 0;n(68012),n(91674),n(85714),n(51554),n(36631),n(45552),n(84275),n(73828),n(62166),n(73569),n(57055);const r=n(44254),o=n(49472),a=n(16545),s=n(32621),l=n(68012),c=n(51554),d=n(73828),p=n(84275),u=n(62166),m=n(85714),h=n(45552),v=n(91674),f=n(73569),g=n(57055),y=n(36631);class x extends a.ChangePasswordComponent{constructor(e,t,n,i,r,o,a,s,l,c,d){super(t,o,a,i,n,r,l),this.router=e,this.apiService=s,this.userVerificationService=c,this.logService=d,this.showPassword=!1}togglePassword(e){this.showPassword=!this.showPassword,document.getElementById(e?"masterPasswordRetype":"masterPassword").focus()}cancel(){return i(this,void 0,void 0,(function*(){yield this.stateService.setOrganizationInvitation(null),this.router.navigate(["/vault"])}))}setupSubmitActions(){return i(this,void 0,void 0,(function*(){if(null==this.currentMasterPassword||""===this.currentMasterPassword)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassRequired")),!1;const e={type:r.VerificationType.MasterPassword,secret:this.currentMasterPassword};try{yield this.userVerificationService.verifyUser(e)}catch(t){return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),t.message),!1}return this.kdf=yield this.stateService.getKdfType(),this.kdfIterations=yield this.stateService.getKdfIterations(),!0}))}performSubmitActions(e,t,n){return i(this,void 0,void 0,(function*(){try{const t=new o.PasswordRequest;t.masterPasswordHash=yield this.cryptoService.hashPassword(this.currentMasterPassword,null),t.newMasterPasswordHash=e,t.key=n[1].encryptedString,this.apiService.postPassword(t),this.platformUtilsService.showToast("success",this.i18nService.t("masterPasswordChanged"),this.i18nService.t("logBackIn")),null!=this.onSuccessfulChangePassword?this.onSuccessfulChangePassword():this.messagingService.send("logout")}catch(t){this.logService.error(t)}}))}}t.UpdatePasswordComponent=x,x.ɵfac=function(e){return new(e||x)(s.ɵɵdirectiveInject(l.Router),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(d.PlatformUtilsService),s.ɵɵdirectiveInject(p.PasswordGenerationService),s.ɵɵdirectiveInject(u.PolicyService),s.ɵɵdirectiveInject(m.CryptoService),s.ɵɵdirectiveInject(h.MessagingService),s.ɵɵdirectiveInject(v.ApiService),s.ɵɵdirectiveInject(f.StateService),s.ɵɵdirectiveInject(g.UserVerificationService),s.ɵɵdirectiveInject(y.LogService))},x.ɵdir=s.ɵɵdefineDirective({type:x,features:[s.ɵɵInheritDefinitionFeature]})},73295:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateTempPasswordComponent=void 0;n(91674),n(85714),n(51554),n(36631),n(45552),n(84275),n(73828),n(62166),n(73569),n(9724);const r=n(55931),o=n(16545),a=n(32621),s=n(51554),l=n(73828),c=n(84275),d=n(62166),p=n(85714),u=n(45552),m=n(91674),h=n(73569),v=n(9724),f=n(36631);class g extends o.ChangePasswordComponent{constructor(e,t,n,i,r,o,a,s,l,c){super(e,r,o,n,t,i,s),this.apiService=a,this.syncService=l,this.logService=c,this.showPassword=!1}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){yield this.syncService.fullSync(!0),e.ngOnInit.call(this)}))}togglePassword(e){this.showPassword=!this.showPassword,document.getElementById(e?"masterPasswordRetype":"masterPassword").focus()}setupSubmitActions(){return i(this,void 0,void 0,(function*(){return this.enforcedPolicyOptions=yield this.policyService.getMasterPasswordPolicyOptions(),this.email=yield this.stateService.getEmail(),this.kdf=yield this.stateService.getKdfType(),this.kdfIterations=yield this.stateService.getKdfIterations(),!0}))}submit(){return i(this,void 0,void 0,(function*(){if((yield this.strongPassword())&&(yield this.setupSubmitActions()))try{const e=yield this.cryptoService.makeKey(this.masterPassword,this.email.trim().toLowerCase(),this.kdf,this.kdfIterations),t=yield this.cryptoService.hashPassword(this.masterPassword,e),n=yield this.cryptoService.getEncKey(),i=yield this.cryptoService.remakeEncKey(e,n);yield this.performSubmitActions(t,e,i)}catch(e){this.logService.error(e)}}))}performSubmitActions(e,t,n){return i(this,void 0,void 0,(function*(){try{const t=new r.UpdateTempPasswordRequest;t.key=n[1].encryptedString,t.newMasterPasswordHash=e,t.masterPasswordHint=this.hint,this.formPromise=this.apiService.putUpdateTempPassword(t),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("updatedMasterPassword")),null!=this.onSuccessfulChangePassword?this.onSuccessfulChangePassword():this.messagingService.send("logout")}catch(t){this.logService.error(t)}}))}}t.UpdateTempPasswordComponent=g,g.ɵfac=function(e){return new(e||g)(a.ɵɵdirectiveInject(s.I18nService),a.ɵɵdirectiveInject(l.PlatformUtilsService),a.ɵɵdirectiveInject(c.PasswordGenerationService),a.ɵɵdirectiveInject(d.PolicyService),a.ɵɵdirectiveInject(p.CryptoService),a.ɵɵdirectiveInject(u.MessagingService),a.ɵɵdirectiveInject(m.ApiService),a.ɵɵdirectiveInject(h.StateService),a.ɵɵdirectiveInject(v.SyncService),a.ɵɵdirectiveInject(f.LogService))},g.ɵdir=a.ɵɵdefineDirective({type:g,features:[a.ɵɵInheritDefinitionFeature]})},4158:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UserVerificationComponent=void 0;const r=n(98212),o=n(96832),a=(n(72277),n(57055),n(44254)),s=n(32621),l=n(72277),c=n(57055),d=n(57490),p=n(96832),u=n(45728),m=n(48198),h=n(99729);function v(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"label",1),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelement(6,"input",2),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"small",3),s.ɵɵtext(9),s.ɵɵpipe(10,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n"),s.ɵɵelementContainerEnd()),2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,3,"masterPass")),s.ɵɵadvance(3),s.ɵɵproperty("formControl",e.secret),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(10,5,"confirmIdentity"))}}function f(e,t){1&e&&(s.ɵɵelementStart(0,"span",10),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",11),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵproperty("@sent",void 0),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(4,2,"codeSent"),"\n "))}function g(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",4),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"label",5),s.ɵɵtext(5),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"button",6),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().requestOTP()})),s.ɵɵtext(9),s.ɵɵpipe(10,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵtemplate(12,f,5,4,"span",7),s.ɵɵtext(13,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n\n "),s.ɵɵelementStart(15,"div",4),s.ɵɵtext(16,"\n "),s.ɵɵelementStart(17,"label",8),s.ɵɵtext(18),s.ɵɵpipe(19,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵelement(21,"input",9),s.ɵɵtext(22,"\n "),s.ɵɵelementStart(23,"small",3),s.ɵɵtext(24),s.ɵɵpipe(25,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(26,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n"),s.ɵɵelementContainerEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(6,7,"sendVerificationCode")),s.ɵɵadvance(3),s.ɵɵproperty("disabled",e.disableRequestOTP),s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(10,9,"sendCode"),"\n "),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",e.sentCode),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(19,11,"verificationCode")),s.ɵɵadvance(3),s.ɵɵproperty("formControl",e.secret),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(25,13,"confirmIdentity"))}}class y{constructor(e,t){this.keyConnectorService=e,this.userVerificationService=t,this.usesKeyConnector=!1,this.disableRequestOTP=!1,this.sentCode=!1,this.secret=new o.FormControl("")}ngOnInit(){return i(this,void 0,void 0,(function*(){this.usesKeyConnector=yield this.keyConnectorService.getUsesKeyConnector(),this.processChanges(this.secret.value),this.secret.valueChanges.subscribe((e=>this.processChanges(e)))}))}requestOTP(){return i(this,void 0,void 0,(function*(){if(this.usesKeyConnector){this.disableRequestOTP=!0;try{yield this.userVerificationService.requestOTP(),this.sentCode=!0}finally{this.disableRequestOTP=!1}}}))}writeValue(e){this.secret.setValue(e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){}setDisabledState(e){this.disableRequestOTP=e,e?this.secret.disable():this.secret.enable()}processChanges(e){null!=this.onChange&&this.onChange({type:this.usesKeyConnector?a.VerificationType.OTP:a.VerificationType.MasterPassword,secret:e})}}t.UserVerificationComponent=y,y.ɵfac=function(e){return new(e||y)(s.ɵɵdirectiveInject(l.KeyConnectorService),s.ɵɵdirectiveInject(c.UserVerificationService))},y.ɵcmp=s.ɵɵdefineComponent({type:y,selectors:[["app-user-verification"]],features:[s.ɵɵProvidersFeature([{provide:o.NG_VALUE_ACCESSOR,multi:!0,useExisting:y}])],decls:4,vars:2,consts:[[4,"ngIf"],["for","masterPassword"],["id","masterPassword","type","password","name","MasterPasswordHash","required","","appAutofocus","","appInputVerbatim","",1,"form-control",3,"formControl"],[1,"form-text","text-muted"],[1,"form-group"],[1,"d-block"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["class","ml-2 text-success","role","alert",4,"ngIf"],["for","verificationCode"],["id","verificationCode","type","input","name","verificationCode","required","","appAutofocus","","appInputVerbatim","",1,"form-control",3,"formControl"],["role","alert",1,"ml-2","text-success"],["aria-hidden","true",1,"bwi","bwi-check-circle"]],template:function(e,t){1&e&&(s.ɵɵtemplate(0,v,12,7,"ng-container",0),s.ɵɵtext(1,"\n"),s.ɵɵtemplate(2,g,28,15,"ng-container",0),s.ɵɵtext(3,"\n")),2&e&&(s.ɵɵproperty("ngIf",!t.usesKeyConnector),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.usesKeyConnector))},directives:[d.NgIf,p.DefaultValueAccessor,p.RequiredValidator,u.AutofocusDirective,m.InputVerbatimDirective,p.NgControlStatus,p.FormControlDirective],pipes:[h.I18nPipe],encapsulation:2,data:{animation:[r.trigger("sent",[r.transition(":enter",[r.style({opacity:0}),r.animate("100ms",r.style({opacity:1}))])])]}})},24006:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.A11yInvalidDirective=void 0;n(32621),n(96832);const i=n(32621),r=n(96832);class o{constructor(e,t){this.el=e,this.formControlDirective=t}ngOnInit(){this.sub=this.formControlDirective.control.statusChanges.subscribe((e=>{"INVALID"===e?this.el.nativeElement.setAttribute("aria-invalid","true"):"VALID"===e&&this.el.nativeElement.setAttribute("aria-invalid","false")}))}ngOnDestroy(){var e;null===(e=this.sub)||void 0===e||e.unsubscribe()}}t.A11yInvalidDirective=o,o.ɵfac=function(e){return new(e||o)(i.ɵɵdirectiveInject(i.ElementRef),i.ɵɵdirectiveInject(r.NgControl))},o.ɵdir=i.ɵɵdefineDirective({type:o,selectors:[["","appA11yInvalid",""]]})},8863:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.A11yTitleDirective=void 0;n(32621);const i=n(32621);class r{constructor(e,t){this.el=e,this.renderer=t}set appA11yTitle(e){this.title=e}ngOnInit(){this.el.nativeElement.hasAttribute("title")||this.renderer.setAttribute(this.el.nativeElement,"title",this.title),this.el.nativeElement.hasAttribute("aria-label")||this.renderer.setAttribute(this.el.nativeElement,"aria-label",this.title)}}t.A11yTitleDirective=r,r.ɵfac=function(e){return new(e||r)(i.ɵɵdirectiveInject(i.ElementRef),i.ɵɵdirectiveInject(i.Renderer2))},r.ɵdir=i.ɵɵdefineDirective({type:r,selectors:[["","appA11yTitle",""]],inputs:{appA11yTitle:"appA11yTitle"}})},56820:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApiActionDirective=void 0;n(32621),n(36631),n(47594);const i=n(32621),r=n(47594),o=n(36631);class a{constructor(e,t,n){this.el=e,this.validationService=t,this.logService=n}ngOnChanges(e){null!=this.appApiAction&&null!=this.appApiAction.then&&(this.el.nativeElement.loading=!0,this.appApiAction.then((e=>{this.el.nativeElement.loading=!1}),(e=>{var t;this.el.nativeElement.loading=!1,e.captchaRequired?this.logService.error("Captcha required error response: "+e.getSingleMessage()):(null===(t=this.logService)||void 0===t||t.error(`Received API exception: ${e}`),this.validationService.showError(e))})))}}t.ApiActionDirective=a,a.ɵfac=function(e){return new(e||a)(i.ɵɵdirectiveInject(i.ElementRef),i.ɵɵdirectiveInject(r.ValidationService),i.ɵɵdirectiveInject(o.LogService))},a.ɵdir=i.ɵɵdefineDirective({type:a,selectors:[["","appApiAction",""]],inputs:{appApiAction:"appApiAction"},features:[i.ɵɵNgOnChangesFeature]})},45728:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutofocusDirective=void 0;n(32621);const i=n(14857),r=n(82769),o=n(32621);class a{constructor(e,t){this.el=e,this.ngZone=t}set appAutofocus(e){this.autofocus=""===e||!0===e}ngOnInit(){!r.Utils.isMobileBrowser&&this.autofocus&&(this.ngZone.isStable?this.el.nativeElement.focus():this.ngZone.onStable.pipe(i.take(1)).subscribe((()=>this.el.nativeElement.focus())))}}t.AutofocusDirective=a,a.ɵfac=function(e){return new(e||a)(o.ɵɵdirectiveInject(o.ElementRef),o.ɵɵdirectiveInject(o.NgZone))},a.ɵdir=o.ɵɵdefineDirective({type:a,selectors:[["","appAutofocus",""]],inputs:{appAutofocus:"appAutofocus"}})},53142:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlurClickDirective=void 0;n(32621);const i=n(32621);class r{constructor(e){this.el=e}onClick(){this.el.nativeElement.blur()}}t.BlurClickDirective=r,r.ɵfac=function(e){return new(e||r)(i.ɵɵdirectiveInject(i.ElementRef))},r.ɵdir=i.ɵɵdefineDirective({type:r,selectors:[["","appBlurClick",""]],hostBindings:function(e,t){1&e&&i.ɵɵlistener("click",(function(){return t.onClick()}))}})},23042:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FallbackSrcDirective=void 0;n(32621);const i=n(32621);class r{constructor(e){this.el=e}onError(){this.el.nativeElement.src=this.appFallbackSrc}}t.FallbackSrcDirective=r,r.ɵfac=function(e){return new(e||r)(i.ɵɵdirectiveInject(i.ElementRef))},r.ɵdir=i.ɵɵdefineDirective({type:r,selectors:[["","appFallbackSrc",""]],hostBindings:function(e,t){1&e&&i.ɵɵlistener("error",(function(){return t.onError()}))},inputs:{appFallbackSrc:"appFallbackSrc"}})},5495:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InputStripSpacesDirective=void 0;n(32621);const i=n(32621);class r{constructor(e){this.el=e}onInput(){this.el.nativeElement.value=this.el.nativeElement.value.replace(/ /g,"")}}t.InputStripSpacesDirective=r,r.ɵfac=function(e){return new(e||r)(i.ɵɵdirectiveInject(i.ElementRef))},r.ɵdir=i.ɵɵdefineDirective({type:r,selectors:[["input","appInputStripSpaces",""]],hostBindings:function(e,t){1&e&&i.ɵɵlistener("input",(function(){return t.onInput()}))}})},48198:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InputVerbatimDirective=void 0;n(32621);const i=n(32621);class r{constructor(e,t){this.el=e,this.renderer=t}set appInputVerbatim(e){this.disableComplete=""===e||!0===e}ngOnInit(){this.disableComplete&&!this.el.nativeElement.hasAttribute("autocomplete")&&this.renderer.setAttribute(this.el.nativeElement,"autocomplete","off"),this.el.nativeElement.hasAttribute("autocapitalize")||this.renderer.setAttribute(this.el.nativeElement,"autocapitalize","none"),this.el.nativeElement.hasAttribute("autocorrect")||this.renderer.setAttribute(this.el.nativeElement,"autocorrect","none"),this.el.nativeElement.hasAttribute("spellcheck")||this.renderer.setAttribute(this.el.nativeElement,"spellcheck","false"),this.el.nativeElement.hasAttribute("inputmode")||this.renderer.setAttribute(this.el.nativeElement,"inputmode","verbatim")}}t.InputVerbatimDirective=r,r.ɵfac=function(e){return new(e||r)(i.ɵɵdirectiveInject(i.ElementRef),i.ɵɵdirectiveInject(i.Renderer2))},r.ɵdir=i.ɵɵdefineDirective({type:r,selectors:[["","appInputVerbatim",""]],inputs:{appInputVerbatim:"appInputVerbatim"}})},25243:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.NotPremiumDirective=void 0;n(32621),n(73569);const r=n(32621),o=n(73569);class a{constructor(e,t,n){this.templateRef=e,this.viewContainer=t,this.stateService=n}ngOnInit(){return i(this,void 0,void 0,(function*(){(yield this.stateService.getCanAccessPremium())?this.viewContainer.clear():this.viewContainer.createEmbeddedView(this.templateRef)}))}}t.NotPremiumDirective=a,a.ɵfac=function(e){return new(e||a)(r.ɵɵdirectiveInject(r.TemplateRef),r.ɵɵdirectiveInject(r.ViewContainerRef),r.ɵɵdirectiveInject(o.StateService))},a.ɵdir=r.ɵɵdefineDirective({type:a,selectors:[["","appNotPremium",""]]})},31161:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectCopyDirective=void 0;n(32621),n(73828);const i=n(32621),r=n(73828);class o{constructor(e,t){this.el=e,this.platformUtilsService=t}onCopy(){if(null==window)return;let e="";const t=window.getSelection();for(let n=0;n-1){""===i.substr(o).trim()&&(r=o)}e+=i.substring(0,r)}this.platformUtilsService.copyToClipboard(e,{window})}}t.SelectCopyDirective=o,o.ɵfac=function(e){return new(e||o)(i.ɵɵdirectiveInject(i.ElementRef),i.ɵɵdirectiveInject(r.PlatformUtilsService))},o.ɵdir=i.ɵɵdefineDirective({type:o,selectors:[["","appSelectCopy",""]],hostBindings:function(e,t){1&e&&i.ɵɵlistener("copy",(function(){return t.onCopy()}))}})},1142:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StopClickDirective=void 0;const i=n(32621);class r{onClick(e){e.preventDefault()}}t.StopClickDirective=r,r.ɵfac=function(e){return new(e||r)},r.ɵdir=i.ɵɵdefineDirective({type:r,selectors:[["","appStopClick",""]],hostBindings:function(e,t){1&e&&i.ɵɵlistener("click",(function(e){return t.onClick(e)}))}})},39159:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StopPropDirective=void 0;const i=n(32621);class r{onClick(e){e.stopPropagation()}}t.StopPropDirective=r,r.ɵfac=function(e){return new(e||r)},r.ɵdir=i.ɵɵdefineDirective({type:r,selectors:[["","appStopProp",""]],hostBindings:function(e,t){1&e&&i.ɵɵlistener("click",(function(e){return t.onClick(e)}))}})},13803:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TrueFalseValueDirective=void 0;const i=n(32621),r=n(96832),o=n(32621);class a{constructor(e,t){this.elementRef=e,this.renderer=t,this.trueValue=!0,this.falseValue=!1,this.propagateChange=e=>{}}onHostChange(e){this.propagateChange(e.target.checked?this.trueValue:this.falseValue)}writeValue(e){e===this.trueValue?this.renderer.setProperty(this.elementRef.nativeElement,"checked",!0):this.renderer.setProperty(this.elementRef.nativeElement,"checked",!1)}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}setDisabledState(e){}}t.TrueFalseValueDirective=a,a.ɵfac=function(e){return new(e||a)(o.ɵɵdirectiveInject(o.ElementRef),o.ɵɵdirectiveInject(o.Renderer2))},a.ɵdir=o.ɵɵdefineDirective({type:a,selectors:[["input","type","checkbox","appTrueFalseValue",""]],hostBindings:function(e,t){1&e&&o.ɵɵlistener("change",(function(e){return t.onHostChange(e)}))},inputs:{trueValue:"trueValue",falseValue:"falseValue"},features:[o.ɵɵProvidersFeature([{provide:r.NG_VALUE_ACCESSOR,useExisting:i.forwardRef((()=>a)),multi:!0}])]})},76299:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AuthGuard=void 0;n(68012),n(62694),n(72277),n(45552);const r=n(72440),o=n(32621),a=n(62694),s=n(68012),l=n(45552),c=n(72277);class d{constructor(e,t,n,i){this.authService=e,this.router=t,this.messagingService=n,this.keyConnectorService=i}canActivate(e,t){return i(this,void 0,void 0,(function*(){const e=yield this.authService.getAuthStatus();return e===r.AuthenticationStatus.LoggedOut?(this.messagingService.send("authBlocked",{url:t.url}),!1):e===r.AuthenticationStatus.Locked?(null!=t&&this.messagingService.send("lockedUrl",{url:t.url}),this.router.createUrlTree(["lock"],{queryParams:{promptBiometric:!0}})):!(!t.url.includes("remove-password")&&(yield this.keyConnectorService.getConvertAccountRequired()))||this.router.createUrlTree(["/remove-password"])}))}}t.AuthGuard=d,d.ɵfac=function(e){return new(e||d)(o.ɵɵinject(a.AuthService),o.ɵɵinject(s.Router),o.ɵɵinject(l.MessagingService),o.ɵɵinject(c.KeyConnectorService))},d.ɵprov=o.ɵɵdefineInjectable({token:d,factory:d.ɵfac})},10517:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.LockGuard=void 0;n(68012),n(62694);const r=n(72440),o=n(32621),a=n(62694),s=n(68012);class l{constructor(e,t){this.authService=e,this.router=t,this.homepage="vault",this.loginpage="login"}canActivate(){return i(this,void 0,void 0,(function*(){const e=yield this.authService.getAuthStatus();if(e===r.AuthenticationStatus.Locked)return!0;const t=e===r.AuthenticationStatus.LoggedOut?this.loginpage:this.homepage;return this.router.createUrlTree([t])}))}}t.LockGuard=l,l.ɵfac=function(e){return new(e||l)(o.ɵɵinject(a.AuthService),o.ɵɵinject(s.Router))},l.ɵprov=o.ɵɵdefineInjectable({token:l,factory:l.ɵfac})},2821:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UnauthGuard=void 0;n(68012),n(62694);const r=n(72440),o=n(32621),a=n(62694),s=n(68012);class l{constructor(e,t){this.authService=e,this.router=t,this.homepage="vault"}canActivate(){return i(this,void 0,void 0,(function*(){const e=yield this.authService.getAuthStatus();return e===r.AuthenticationStatus.LoggedOut||(e===r.AuthenticationStatus.Locked?this.router.createUrlTree(["lock"]):this.router.createUrlTree([this.homepage]))}))}}t.UnauthGuard=l,l.ɵfac=function(e){return new(e||l)(o.ɵɵinject(a.AuthService),o.ɵɵinject(s.Router))},l.ɵprov=o.ɵɵdefineInjectable({token:l,factory:l.ɵfac})},44926:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JslibModule=void 0;const i=n(57490),r=n(96832),o=n(59703),a=n(83612),s=n(99729),l=n(50154),c=n(52080),d=n(32621);n(59703);class p{}t.JslibModule=p,p.ɵfac=function(e){return new(e||p)},p.ɵmod=d.ɵɵdefineNgModule({type:p}),p.ɵinj=d.ɵɵdefineInjector({providers:[a.CreditCardNumberPipe,i.DatePipe,s.I18nPipe,l.SearchPipe,c.UserNamePipe],imports:[[o.BitwardenToastModule.forRoot({maxOpened:5,autoDismiss:!0,closeButton:!0}),i.CommonModule,r.FormsModule,r.ReactiveFormsModule],o.BitwardenToastModule]})},57563:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionFilterComponent=void 0;const r=n(32621),o=(n(93370),n(94735),n(32621));class a{constructor(){this.hide=!1,this.onNodeCollapseStateChange=new r.EventEmitter,this.onFilterChange=new r.EventEmitter,this.collectionsGrouping={id:"collections",name:"collections"}}get collections(){var e;return null===(e=this.collectionNodes)||void 0===e?void 0:e.fullList}get nestedCollections(){var e;return null===(e=this.collectionNodes)||void 0===e?void 0:e.nestedList}get show(){return!this.hide&&null!=this.collections&&this.collections.length>0}isCollapsed(e){return this.collapsedFilterNodes.has(e.id)}applyFilter(e){this.activeFilter.resetFilter(),this.activeFilter.selectedCollectionId=e.id,this.onFilterChange.emit(this.activeFilter)}toggleCollapse(e){return i(this,void 0,void 0,(function*(){this.onNodeCollapseStateChange.emit(e)}))}}t.CollectionFilterComponent=a,a.ɵfac=function(e){return new(e||a)},a.ɵdir=o.ɵɵdefineDirective({type:a,inputs:{hide:"hide",collapsedFilterNodes:"collapsedFilterNodes",collectionNodes:"collectionNodes",activeFilter:"activeFilter"},outputs:{onNodeCollapseStateChange:"onNodeCollapseStateChange",onFilterChange:"onFilterChange"}})},73821:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.FolderFilterComponent=void 0;const r=n(32621),o=(n(93370),n(94735),n(32621));class a{constructor(){this.hide=!1,this.onNodeCollapseStateChange=new r.EventEmitter,this.onFilterChange=new r.EventEmitter,this.onAddFolder=new r.EventEmitter,this.onEditFolder=new r.EventEmitter,this.foldersGrouping={id:"folders",name:"folders"}}get folders(){var e;return null===(e=this.folderNodes)||void 0===e?void 0:e.fullList}get nestedFolders(){var e;return null===(e=this.folderNodes)||void 0===e?void 0:e.nestedList}applyFilter(e){this.activeFilter.resetFilter(),this.activeFilter.selectedFolder=!0,this.activeFilter.selectedFolderId=e.id,this.onFilterChange.emit(this.activeFilter)}addFolder(){this.onAddFolder.emit()}editFolder(e){this.onEditFolder.emit(e)}isCollapsed(e){return this.collapsedFilterNodes.has(e.id)}toggleCollapse(e){return i(this,void 0,void 0,(function*(){this.onNodeCollapseStateChange.emit(e)}))}}t.FolderFilterComponent=a,a.ɵfac=function(e){return new(e||a)},a.ɵdir=o.ɵɵdefineDirective({type:a,inputs:{hide:"hide",collapsedFilterNodes:"collapsedFilterNodes",folderNodes:"folderNodes",activeFilter:"activeFilter"},outputs:{onNodeCollapseStateChange:"onNodeCollapseStateChange",onFilterChange:"onFilterChange",onAddFolder:"onAddFolder",onEditFolder:"onEditFolder"}})},9177:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationFilterComponent=void 0;const r=n(32621),o=n(94735),a=n(32621);class s{constructor(){this.hide=!1,this.onNodeCollapseStateChange=new r.EventEmitter,this.onFilterChange=new r.EventEmitter,this.organizationGrouping={id:"vaults",name:"allVaults"}}get displayMode(){let e="organizationMember";return null==this.organizations||this.organizations.length<1?e="noOrganizations":this.activePersonalOwnershipPolicy&&!this.activeSingleOrganizationPolicy?e="personalOwnershipPolicy":!this.activePersonalOwnershipPolicy&&this.activeSingleOrganizationPolicy?e="singleOrganizationPolicy":this.activePersonalOwnershipPolicy&&this.activeSingleOrganizationPolicy&&(e="singleOrganizationAndPersonalOwnershipPolicies"),e}get hasActiveFilter(){return this.activeFilter.myVaultOnly||null!=this.activeFilter.selectedOrganizationId}applyOrganizationFilter(e){return i(this,void 0,void 0,(function*(){this.activeFilter.selectedOrganizationId=e.id,this.activeFilter.myVaultOnly=!1,this.activeFilter.refreshCollectionsAndFolders=!0,this.applyFilter(this.activeFilter)}))}applyMyVaultFilter(){return i(this,void 0,void 0,(function*(){this.activeFilter.selectedOrganizationId=null,this.activeFilter.myVaultOnly=!0,this.activeFilter.refreshCollectionsAndFolders=!0,this.applyFilter(this.activeFilter)}))}clearFilter(){this.activeFilter.myVaultOnly=!1,this.activeFilter.selectedOrganizationId=null,this.applyFilter(new o.VaultFilter(this.activeFilter))}applyFilter(e){this.onFilterChange.emit(e)}toggleCollapse(){return i(this,void 0,void 0,(function*(){this.onNodeCollapseStateChange.emit(this.organizationGrouping)}))}get isCollapsed(){return this.collapsedFilterNodes.has(this.organizationGrouping.id)}}t.OrganizationFilterComponent=s,s.ɵfac=function(e){return new(e||s)},s.ɵdir=a.ɵɵdefineDirective({type:s,inputs:{hide:"hide",collapsedFilterNodes:"collapsedFilterNodes",organizations:"organizations",activeFilter:"activeFilter",activePersonalOwnershipPolicy:"activePersonalOwnershipPolicy",activeSingleOrganizationPolicy:"activeSingleOrganizationPolicy"},outputs:{onNodeCollapseStateChange:"onNodeCollapseStateChange",onFilterChange:"onFilterChange"}})},80617:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatusFilterComponent=void 0;const i=n(32621),r=(n(94735),n(32621));class o{constructor(){this.hideFavorites=!1,this.hideTrash=!1,this.onFilterChange=new i.EventEmitter}get show(){return!(this.hideFavorites&&this.hideTrash)}applyFilter(e){this.activeFilter.resetFilter(),this.activeFilter.status=e,this.onFilterChange.emit(this.activeFilter)}}t.StatusFilterComponent=o,o.ɵfac=function(e){return new(e||o)},o.ɵdir=r.ɵɵdefineDirective({type:o,inputs:{hideFavorites:"hideFavorites",hideTrash:"hideTrash",activeFilter:"activeFilter"},outputs:{onFilterChange:"onFilterChange"}})},74951:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TypeFilterComponent=void 0;const r=n(32621),o=n(32773),a=(n(94735),n(32621));class s{constructor(){this.hide=!1,this.selectedCipherType=null,this.onNodeCollapseStateChange=new r.EventEmitter,this.onFilterChange=new r.EventEmitter,this.typesNode={id:"types",name:"types"},this.cipherTypeEnum=o.CipherType}get isCollapsed(){return this.collapsedFilterNodes.has(this.typesNode.id)}applyFilter(e){this.activeFilter.resetFilter(),this.activeFilter.cipherType=e,this.onFilterChange.emit(this.activeFilter)}toggleCollapse(){return i(this,void 0,void 0,(function*(){this.onNodeCollapseStateChange.emit(this.typesNode)}))}}t.TypeFilterComponent=s,s.ɵfac=function(e){return new(e||s)},s.ɵdir=a.ɵɵdefineDirective({type:s,inputs:{hide:"hide",collapsedFilterNodes:"collapsedFilterNodes",selectedCipherType:"selectedCipherType",activeFilter:"activeFilter"},outputs:{onNodeCollapseStateChange:"onNodeCollapseStateChange",onFilterChange:"onFilterChange"}})},93370:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DynamicTreeNode=void 0;t.DynamicTreeNode=class{constructor(e){Object.assign(this,e)}hasId(e){return null!=this.fullList&&this.fullList.filter((t=>t.id===e)).length>0}}},94735:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VaultFilter=void 0;t.VaultFilter=class{constructor(e){this.selectedFolder=!1,this.myVaultOnly=!1,this.refreshCollectionsAndFolders=!1,Object.assign(this,e)}resetFilter(){this.cipherType=null,this.status=null,this.selectedCollectionId=null,this.selectedFolder=!1,this.selectedFolderId=null}resetOrganization(){this.myVaultOnly=!1,this.selectedOrganizationId=null,this.resetFilter()}}},48237:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.VaultFilterComponent=void 0;const r=n(32621),o=n(94735),a=(n(27113),n(32621)),s=n(27113);class l{constructor(e){this.vaultFilterService=e,this.activeFilter=new o.VaultFilter,this.hideFolders=!1,this.hideCollections=!1,this.hideFavorites=!1,this.hideTrash=!1,this.hideOrganizations=!1,this.onFilterChange=new r.EventEmitter,this.onAddFolder=new r.EventEmitter,this.onEditFolder=new r.EventEmitter,this.isLoaded=!1}get displayCollections(){var e;return null!=(null===(e=this.collections)||void 0===e?void 0:e.fullList)&&this.collections.fullList.length>0}ngOnInit(){return i(this,void 0,void 0,(function*(){this.collapsedFilterNodes=yield this.vaultFilterService.buildCollapsedFilterNodes(),this.organizations=yield this.vaultFilterService.buildOrganizations(),null!=this.organizations&&this.organizations.length>0&&(this.activePersonalOwnershipPolicy=yield this.vaultFilterService.checkForPersonalOwnershipPolicy(),this.activeSingleOrganizationPolicy=yield this.vaultFilterService.checkForSingleOrganizationPolicy()),this.folders=yield this.vaultFilterService.buildFolders(),this.collections=yield this.initCollections(),this.isLoaded=!0}))}initCollections(){return i(this,void 0,void 0,(function*(){return yield this.vaultFilterService.buildCollections()}))}toggleFilterNodeCollapseState(e){return i(this,void 0,void 0,(function*(){this.collapsedFilterNodes.has(e.id)?this.collapsedFilterNodes.delete(e.id):this.collapsedFilterNodes.add(e.id),yield this.vaultFilterService.storeCollapsedFilterNodes(this.collapsedFilterNodes)}))}applyFilter(e){return i(this,void 0,void 0,(function*(){e.refreshCollectionsAndFolders&&(yield this.reloadCollectionsAndFolders(e),e=this.pruneInvalidatedFilterSelections(e)),this.onFilterChange.emit(e)}))}reloadCollectionsAndFolders(e){return i(this,void 0,void 0,(function*(){this.folders=yield this.vaultFilterService.buildFolders(e.selectedOrganizationId),this.collections=e.myVaultOnly?null:yield this.vaultFilterService.buildCollections(e.selectedOrganizationId)}))}reloadOrganizations(){return i(this,void 0,void 0,(function*(){this.organizations=yield this.vaultFilterService.buildOrganizations(),this.activePersonalOwnershipPolicy=yield this.vaultFilterService.checkForPersonalOwnershipPolicy(),this.activeSingleOrganizationPolicy=yield this.vaultFilterService.checkForSingleOrganizationPolicy()}))}addFolder(){this.onAddFolder.emit()}editFolder(e){this.onEditFolder.emit(e)}pruneInvalidatedFilterSelections(e){return e=this.pruneInvalidFolderSelection(e),e=this.pruneInvalidCollectionSelection(e)}pruneInvalidFolderSelection(e){var t;return e.selectedFolder&&!(null===(t=this.folders)||void 0===t?void 0:t.hasId(e.selectedFolderId))&&(e.selectedFolder=!1,e.selectedFolderId=null),e}pruneInvalidCollectionSelection(e){var t;return null==e.selectedCollectionId||(null===(t=this.collections)||void 0===t?void 0:t.hasId(e.selectedCollectionId))||(e.selectedCollectionId=null),e}}t.VaultFilterComponent=l,l.ɵfac=function(e){return new(e||l)(a.ɵɵdirectiveInject(s.VaultFilterService))},l.ɵdir=a.ɵɵdefineDirective({type:l,inputs:{activeFilter:"activeFilter",hideFolders:"hideFolders",hideCollections:"hideCollections",hideFavorites:"hideFavorites",hideTrash:"hideTrash",hideOrganizations:"hideOrganizations"},outputs:{onFilterChange:"onFilterChange",onAddFolder:"onAddFolder",onEditFolder:"onEditFolder"}})},27113:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.VaultFilterService=void 0;n(45330),n(3174),n(88308),n(63513),n(62166),n(73569);const r=n(49906),o=n(93370),a=n(32621),s=n(73569),l=n(63513),c=n(88308),d=n(45330),p=n(3174),u=n(62166);class m{constructor(e,t,n,i,r,o){this.stateService=e,this.organizationService=t,this.folderService=n,this.cipherService=i,this.collectionService=r,this.policyService=o}storeCollapsedFilterNodes(e){return i(this,void 0,void 0,(function*(){yield this.stateService.setCollapsedGroupings(Array.from(e))}))}buildCollapsedFilterNodes(){return i(this,void 0,void 0,(function*(){return new Set(yield this.stateService.getCollapsedGroupings())}))}buildOrganizations(){return i(this,void 0,void 0,(function*(){return yield this.organizationService.getAll()}))}buildFolders(e){return i(this,void 0,void 0,(function*(){const t=yield this.folderService.getAllDecrypted();let n;if(null!=e){const i=yield this.cipherService.getAllDecrypted(),r=i.filter((t=>t.organizationId==e));n=t.filter((e=>r.filter((t=>t.folderId==e.id)).length>0||i.filter((t=>t.folderId==e.id)).length<1))}else n=t;const i=yield this.folderService.getAllNested(n);return new o.DynamicTreeNode({fullList:n,nestedList:i})}))}buildCollections(e){return i(this,void 0,void 0,(function*(){const t=yield this.collectionService.getAllDecrypted();let n;n=null!=e?t.filter((t=>t.organizationId===e)):t;const i=yield this.collectionService.getAllNested(n);return new o.DynamicTreeNode({fullList:n,nestedList:i})}))}checkForSingleOrganizationPolicy(){return i(this,void 0,void 0,(function*(){return yield this.policyService.policyAppliesToUser(r.PolicyType.SingleOrg)}))}checkForPersonalOwnershipPolicy(){return i(this,void 0,void 0,(function*(){return yield this.policyService.policyAppliesToUser(r.PolicyType.PersonalOwnership)}))}}t.VaultFilterService=m,m.ɵfac=function(e){return new(e||m)(a.ɵɵinject(s.StateService),a.ɵɵinject(l.OrganizationService),a.ɵɵinject(c.FolderService),a.ɵɵinject(d.CipherService),a.ɵɵinject(p.CollectionService),a.ɵɵinject(u.PolicyService))},m.ɵprov=a.ɵɵdefineInjectable({token:m,factory:m.ɵfac})},86758:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPasswordPipe=void 0;const i=n(82769),r=n(32621);class o{transform(e){return this.generateTemplate(e,((e,t)=>`${e}`))}generateTemplate(e,t){const n=Array.from(e);let r="";for(let o=0;o":e=">",a=!0;break;case" ":e=" ",a=!0}let s="letter";e.match(i.Utils.regexpEmojiPresentation)?s="emoji":a||e.match(/[^\w ]/)?s="special":e.match(/\d/)&&(s="number"),r+=t(e,s,o)}return r}}t.ColorPasswordPipe=o,o.ɵfac=function(e){return new(e||o)},o.ɵpipe=r.ɵɵdefinePipe({name:"colorPassword",type:o,pure:!0})},83612:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CreditCardNumberPipe=void 0;const i=n(32621),r={Visa:[{cardLength:16,blocks:[4,4,4,4]}],Mastercard:[{cardLength:16,blocks:[4,4,4,4]}],Maestro:[{cardLength:16,blocks:[4,4,4,4]},{cardLength:13,blocks:[4,4,5]},{cardLength:15,blocks:[4,6,5]},{cardLength:19,blocks:[4,4,4,4,3]}],Discover:[{cardLength:16,blocks:[4,4,4,4]}],"Diners Club":[{cardLength:14,blocks:[4,6,4]}],JCB:[{cardLength:16,blocks:[4,4,4,4]}],UnionPay:[{cardLength:16,blocks:[4,4,4,4]},{cardLength:19,blocks:[6,13]}],Amex:[{cardLength:15,blocks:[4,6,5]}],Other:[{cardLength:16,blocks:[4,4,4,4]}]};class o{transform(e,t){let n=r[t];null==n&&(n=r.Other);const i=e.length;let o=n.find((e=>e.cardLength==i));null==o&&(o=n[0]);const a=o.blocks,s=[];let l=0;return a.forEach((t=>{s.push(e.slice(l,l+t)),l+=t})),i>l&&s.push(e.slice(l)),s.join(" ")}}t.CreditCardNumberPipe=o,o.ɵfac=function(e){return new(e||o)},o.ɵpipe=i.ɵɵdefinePipe({name:"creditCardNumber",type:o,pure:!0})},91131:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EllipsisPipe=void 0;const i=n(32621);class r{transform(e,t=25,n=!1,i="..."){return e.length<=t?e:(t-=i.length,n&&e.length>t&&e.indexOf(" ")>0&&(t=e.substring(0,t).lastIndexOf(" ")),e.substring(0,t)+i)}}t.EllipsisPipe=r,r.ɵfac=function(e){return new(e||r)},r.ɵpipe=i.ɵɵdefinePipe({name:"ellipsis",type:r,pure:!0})},99729:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.I18nPipe=void 0;n(51554);const i=n(32621),r=n(51554);class o{constructor(e){this.i18nService=e}transform(e,t,n,i){return this.i18nService.t(e,t,n,i)}}t.I18nPipe=o,o.ɵfac=function(e){return new(e||o)(i.ɵɵdirectiveInject(r.I18nService,16))},o.ɵpipe=i.ɵɵdefinePipe({name:"i18n",type:o,pure:!0})},50154:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SearchPipe=void 0;const i=n(32621);class r{transform(e,t,n,i,r){return null==e||0===e.length?[]:null==t||t.length<2?e:(t=t.trim().toLowerCase(),e.filter((e=>null!=n&&null!=e[n]&&e[n].toString().toLowerCase().indexOf(t)>-1||(null!=i&&null!=e[i]&&e[i].toString().toLowerCase().indexOf(t)>-1||null!=r&&null!=e[r]&&e[r].toString().toLowerCase().indexOf(t)>-1))))}}t.SearchPipe=r,r.ɵfac=function(e){return new(e||r)},r.ɵpipe=i.ɵɵdefinePipe({name:"search",type:r,pure:!0})},52080:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserNamePipe=void 0;const i=n(32621);class r{transform(e){return null==e?null:null==e.name||""===e.name.trim()?e.email:e.name}}t.UserNamePipe=r,r.ɵfac=function(e){return new(e||r)},r.ɵpipe=i.ɵɵdefinePipe({name:"userName",type:r,pure:!0})},23050:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BroadcasterService=void 0;const i=n(45921),r=n(32621);class o extends i.BroadcasterService{}t.BroadcasterService=o,o.ɵfac=function(){let e;return function(t){return(e||(e=r.ɵɵgetInheritedFactory(o)))(t||o)}}(),o.ɵprov=r.ɵɵdefineInjectable({token:o,factory:o.ɵfac})},41058:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JslibServicesModule=t.SYSTEM_LANGUAGE=t.LOCALES_DIRECTORY=t.CLIENT_TYPE=t.LOCKED_CALLBACK=t.LOGOUT_CALLBACK=t.STATE_SERVICE_USE_CACHE=t.STATE_FACTORY=t.SECURE_STORAGE=t.WINDOW=void 0;const i=n(32621),r=n(91674),o=n(5576),a=n(42982),s=n(62694),l=n(8470),c=n(45330),d=n(3174),p=n(85714),u=n(1659),m=n(56071),h=n(32034),v=n(97445),f=n(83594),g=n(88308),y=n(51554),x=n(72277),S=n(36631),b=n(45552),w=n(38249),C=n(63513),I=n(84275),E=n(44809),P=n(73828),O=n(62166),k=n(68291),A=n(60421),T=n(76532),M=n(2810),B=n(73569),D=n(6924),R=n(39566),F=n(9724),U=n(30694),V=n(52344),N=n(27458),_=n(57055),j=n(13444),z=n(82656),H=n(35266),L=n(31445),K=n(99010),q=n(48475),G=n(97979),W=n(36472),$=n(47262),Y=n(36833),Q=n(94778),J=n(27944),Z=n(47165),X=n(86683),ee=n(14215),te=n(48698),ne=n(1803),ie=n(66369),re=n(32840),oe=n(63231),ae=n(59135),se=n(50142),le=n(55969),ce=n(59695),de=n(32471),pe=n(23566),ue=n(94822),me=n(13998),he=n(8357),ve=n(86257),fe=n(7790),ge=n(87703),ye=n(96837),xe=n(26981),Se=n(42133),be=n(44988),we=n(75408),Ce=n(76299),Ie=n(10517),Ee=n(2821),Pe=n(23050),Oe=n(64684),ke=n(91603),Ae=n(47594),Te=n(32621);t.WINDOW=new i.InjectionToken("WINDOW"),t.SECURE_STORAGE=new i.InjectionToken("SECURE_STORAGE"),t.STATE_FACTORY=new i.InjectionToken("STATE_FACTORY"),t.STATE_SERVICE_USE_CACHE=new i.InjectionToken("STATE_SERVICE_USE_CACHE"),t.LOGOUT_CALLBACK=new i.InjectionToken("LOGOUT_CALLBACK"),t.LOCKED_CALLBACK=new i.InjectionToken("LOCKED_CALLBACK"),t.CLIENT_TYPE=new i.InjectionToken("CLIENT_TYPE"),t.LOCALES_DIRECTORY=new i.InjectionToken("LOCALES_DIRECTORY"),t.SYSTEM_LANGUAGE=new i.InjectionToken("SYSTEM_LANGUAGE");class Me{}t.JslibServicesModule=Me,Me.ɵfac=function(e){return new(e||Me)},Me.ɵmod=Te.ɵɵdefineNgModule({type:Me}),Me.ɵinj=Te.ɵɵdefineInjector({providers:[Ae.ValidationService,Ce.AuthGuard,Ee.UnauthGuard,Ie.LockGuard,Oe.ModalService,{provide:t.WINDOW,useValue:window},{provide:i.LOCALE_ID,useFactory:e=>e.translationLocale,deps:[y.I18nService]},{provide:t.LOCALES_DIRECTORY,useValue:"./locales"},{provide:t.SYSTEM_LANGUAGE,useFactory:e=>e.navigator.language,deps:[t.WINDOW]},{provide:t.STATE_FACTORY,useValue:new H.StateFactory(K.GlobalState,L.Account)},{provide:t.STATE_SERVICE_USE_CACHE,useValue:!0},{provide:t.LOGOUT_CALLBACK,useFactory:e=>(t,n)=>e.send("logout",{expired:t,userId:n}),deps:[b.MessagingService]},{provide:t.LOCKED_CALLBACK,useValue:null},{provide:o.AppIdService,useClass:G.AppIdService,deps:[R.StorageService]},{provide:a.AuditService,useClass:W.AuditService,deps:[u.CryptoFunctionService,r.ApiService]},{provide:s.AuthService,useClass:$.AuthService,deps:[p.CryptoService,r.ApiService,U.TokenService,o.AppIdService,P.PlatformUtilsService,b.MessagingService,S.LogService,x.KeyConnectorService,m.EnvironmentService,B.StateService,N.TwoFactorService,y.I18nService]},{provide:c.CipherService,useFactory:(e,t,n,i,r,o,a,s)=>new Y.CipherService(e,t,n,i,r,(()=>o.get(A.SearchService)),a,s),deps:[p.CryptoService,M.SettingsService,r.ApiService,f.FileUploadService,y.I18nService,i.Injector,S.LogService,B.StateService]},{provide:g.FolderService,useClass:ie.FolderService,deps:[p.CryptoService,r.ApiService,y.I18nService,c.CipherService,B.StateService]},{provide:S.LogService,useFactory:()=>new J.ConsoleLogService(!1)},{provide:d.CollectionService,useClass:Q.CollectionService,deps:[p.CryptoService,y.I18nService,B.StateService]},{provide:m.EnvironmentService,useClass:X.EnvironmentService,deps:[B.StateService]},{provide:V.TotpService,useClass:ge.TotpService,deps:[u.CryptoFunctionService,S.LogService,B.StateService]},{provide:U.TokenService,useClass:fe.TokenService,deps:[B.StateService]},{provide:p.CryptoService,useClass:Z.CryptoService,deps:[u.CryptoFunctionService,P.PlatformUtilsService,S.LogService,B.StateService]},{provide:I.PasswordGenerationService,useClass:se.PasswordGenerationService,deps:[p.CryptoService,O.PolicyService,B.StateService]},{provide:j.UsernameGenerationService,useClass:Se.UsernameGenerationService,deps:[p.CryptoService,B.StateService,r.ApiService]},{provide:r.ApiService,useClass:q.ApiService,deps:[U.TokenService,P.PlatformUtilsService,m.EnvironmentService,o.AppIdService,t.LOGOUT_CALLBACK]},{provide:f.FileUploadService,useClass:ne.FileUploadService,deps:[S.LogService,r.ApiService]},{provide:F.SyncService,useClass:ve.SyncService,deps:[r.ApiService,M.SettingsService,g.FolderService,c.CipherService,p.CryptoService,d.CollectionService,b.MessagingService,O.PolicyService,T.SendService,S.LogService,x.KeyConnectorService,B.StateService,C.OrganizationService,k.ProviderService,t.LOGOUT_CALLBACK]},{provide:l.BroadcasterService,useClass:Pe.BroadcasterService},{provide:M.SettingsService,useClass:ue.SettingsService,deps:[B.StateService]},{provide:z.VaultTimeoutService,useClass:be.VaultTimeoutService,deps:[c.CipherService,g.FolderService,d.CollectionService,p.CryptoService,P.PlatformUtilsService,b.MessagingService,A.SearchService,U.TokenService,O.PolicyService,x.KeyConnectorService,B.StateService,s.AuthService,t.LOCKED_CALLBACK,t.LOGOUT_CALLBACK]},{provide:B.StateService,useClass:me.StateService,deps:[R.StorageService,t.SECURE_STORAGE,S.LogService,D.StateMigrationService,t.STATE_FACTORY,t.STATE_SERVICE_USE_CACHE]},{provide:D.StateMigrationService,useClass:he.StateMigrationService,deps:[R.StorageService,t.SECURE_STORAGE,t.STATE_FACTORY]},{provide:v.ExportService,useClass:te.ExportService,deps:[g.FolderService,c.CipherService,r.ApiService,p.CryptoService]},{provide:A.SearchService,useClass:de.SearchService,deps:[c.CipherService,S.LogService,y.I18nService]},{provide:w.NotificationsService,useClass:oe.NotificationsService,deps:[F.SyncService,o.AppIdService,r.ApiService,m.EnvironmentService,t.LOGOUT_CALLBACK,S.LogService,B.StateService,s.AuthService]},{provide:u.CryptoFunctionService,useClass:we.WebCryptoFunctionService,deps:[t.WINDOW]},{provide:h.EventService,useClass:ee.EventService,deps:[r.ApiService,c.CipherService,B.StateService,S.LogService,C.OrganizationService]},{provide:O.PolicyService,useClass:le.PolicyService,deps:[B.StateService,C.OrganizationService,r.ApiService]},{provide:T.SendService,useClass:pe.SendService,deps:[p.CryptoService,r.ApiService,f.FileUploadService,y.I18nService,u.CryptoFunctionService,B.StateService]},{provide:x.KeyConnectorService,useClass:re.KeyConnectorService,deps:[B.StateService,p.CryptoService,r.ApiService,U.TokenService,S.LogService,C.OrganizationService,u.CryptoFunctionService,t.LOGOUT_CALLBACK]},{provide:_.UserVerificationService,useClass:xe.UserVerificationService,deps:[p.CryptoService,y.I18nService,r.ApiService]},{provide:E.PasswordRepromptService,useClass:ke.PasswordRepromptService},{provide:C.OrganizationService,useClass:ae.OrganizationService,deps:[B.StateService]},{provide:k.ProviderService,useClass:ce.ProviderService,deps:[B.StateService]},{provide:N.TwoFactorService,useClass:ye.TwoFactorService,deps:[y.I18nService,P.PlatformUtilsService]}]})},64684:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ModalService=t.ModalConfig=void 0;n(32621);const r=n(14857),o=n(83249),a=n(64050),s=n(38387),l=n(32621);class c{constructor(){this.allowMultipleModals=!1}}t.ModalConfig=c;class d{constructor(e,t,n){this.componentFactoryResolver=e,this.applicationRef=t,this.injector=n,this.modalList=[],this.factoryResolvers=new Map,document.addEventListener("keyup",(e=>{"Escape"===e.key&&this.modalCount>0&&this.topModal.instance.close()}))}get modalCount(){return this.modalList.length}get topModal(){return this.modalList[this.modalCount-1]}openViewRef(e,t,n=null){return i(this,void 0,void 0,(function*(){const[i,o]=this.openInternal(e,null,!1);return o.instance.setComponentParameters=n,t.insert(o.hostView),yield i.onCreated.pipe(r.first()).toPromise(),[i,o.instance.componentRef.instance]}))}open(e,t){var n;if((null===(n=null==t?void 0:t.allowMultipleModals)||void 0===n||!n)&&this.modalCount>0)return;const[i,r]=this.openInternal(e,t,!0);return i}registerComponentFactoryResolver(e,t){this.factoryResolvers.set(e,t)}resolveComponentFactory(e){return this.factoryResolvers.has(e)?this.factoryResolvers.get(e).resolveComponentFactory(e):this.componentFactoryResolver.resolveComponentFactory(e)}openInternal(e,t,n){const[i,o]=this.createModalComponent(t);if(o.instance.childComponentType=e,n){this.applicationRef.attachView(o.hostView);const e=o.hostView.rootNodes[0];document.body.appendChild(e)}return i.onClosed.pipe(r.first()).subscribe((()=>{n&&this.applicationRef.detachView(o.hostView),o.destroy(),this.modalList.pop(),this.modalCount>0&&this.topModal.instance.getFocus()})),this.setupHandlers(i),this.modalList.push(o),[i,o]}setupHandlers(e){let t=null;e.onCreated.pipe(r.first()).subscribe((n=>{document.body.classList.add("modal-open");const i=n.querySelector(".modal"),r=i.querySelector(".modal-dialog");t=document.createElement("div"),t.className="modal-backdrop fade",t.style.zIndex=`${this.modalCount}040`,i.prepend(t),r.addEventListener("click",(e=>{e.stopPropagation()})),r.style.zIndex=`${this.modalCount}050`;const o=Array.from(n.querySelectorAll('.modal-backdrop, .modal *[data-dismiss="modal"]'));for(const t of o)t.addEventListener("click",(()=>{e.close()}))})),e.onClose.pipe(r.first()).subscribe((()=>{e.closed(),0===this.modalCount&&document.body.classList.remove("modal-open")}))}createModalComponent(e){const t=new s.ModalRef,n=new WeakMap;n.set(c,e),n.set(s.ModalRef,t);return[t,this.componentFactoryResolver.resolveComponentFactory(o.DynamicModalComponent).create(new a.ModalInjector(this.injector,n))]}}t.ModalService=d,d.ɵfac=function(e){return new(e||d)(l.ɵɵinject(l.ComponentFactoryResolver),l.ɵɵinject(l.ApplicationRef),l.ɵɵinject(l.Injector))},d.ɵprov=l.ɵɵdefineInjectable({token:d,factory:d.ɵfac})},91603:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordRepromptService=void 0;n(72277);const r=n(38991),o=(n(64684),n(32621)),a=n(64684),s=n(72277);class l{constructor(e,t){this.modalService=e,this.keyConnectorService=t,this.component=r.PasswordRepromptComponent}protectedFields(){return["TOTP","Password","H_Field","Card Number","Security Code"]}showPasswordPrompt(){return i(this,void 0,void 0,(function*(){if(!(yield this.enabled()))return!0;const e=this.modalService.open(this.component,{allowMultipleModals:!0});if(null==e)return!1;return!0===(yield e.onClosedPromise())}))}enabled(){return i(this,void 0,void 0,(function*(){return!(yield this.keyConnectorService.getUsesKeyConnector())}))}}t.PasswordRepromptService=l,l.ɵfac=function(e){return new(e||l)(o.ɵɵinject(a.ModalService),o.ɵɵinject(s.KeyConnectorService))},l.ɵprov=o.ɵɵdefineInjectable({token:l,factory:l.ɵfac})},47594:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationService=void 0;n(51554),n(73828);const i=n(32621),r=n(51554),o=n(73828);class a{constructor(e,t){this.i18nService=e,this.platformUtilsService=t}showError(e){const t=this.i18nService.t("unexpectedError");let n=[];return null!=e&&"string"==typeof e?n.push(e):null==e||"object"!=typeof e?n.push(t):null!=e.validationErrors?n=n.concat(e.getAllMessages()):n.push(e.message?e.message:t),1===n.length?this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),n[0]):n.length>1&&this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),n,{timeout:5e3*n.length}),n}}t.ValidationService=a,a.ɵfac=function(e){return new(e||a)(i.ɵɵinject(r.I18nService),i.ɵɵinject(o.PlatformUtilsService))},a.ɵprov=i.ɵɵdefineInjectable({token:a,factory:a.ɵfac})},89924:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dirtyRequired=void 0;const i=n(96832);t.dirtyRequired=function(e){return e.dirty?i.Validators.required(e):null}},55939:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.notAllowedValueAsync=void 0,t.notAllowedValueAsync=function(e,t=!1){return i=>n(this,void 0,void 0,(function*(){let n=yield e(),r=i.value;if(t&&(n=n.toLowerCase(),r=r.toLowerCase()),r===n)return{notAllowedValue:!0}}))}},91674:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApiService=void 0;t.ApiService=class{}},5576:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AppIdService=void 0;t.AppIdService=class{}},42982:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuditService=void 0;t.AuditService=class{}},62694:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuthService=void 0;t.AuthService=class{}},8470:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BroadcasterService=void 0;t.BroadcasterService=class{}},45330:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherService=void 0;t.CipherService=class{}},3174:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionService=void 0;t.CollectionService=class{}},85714:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CryptoService=void 0;t.CryptoService=class{}},1659:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CryptoFunctionService=void 0;t.CryptoFunctionService=class{}},56071:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EnvironmentService=void 0;t.EnvironmentService=class{}},32034:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventService=void 0;t.EventService=class{}},97445:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExportService=void 0;t.ExportService=class{}},83594:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileUploadService=void 0;t.FileUploadService=class{}},88308:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FolderService=void 0;t.FolderService=class{}},51554:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.I18nService=void 0;t.I18nService=class{}},11223:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImportService=void 0;t.ImportService=class{}},72277:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeyConnectorService=void 0;t.KeyConnectorService=class{}},36631:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogService=void 0;t.LogService=class{}},45552:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessagingService=void 0;t.MessagingService=class{}},38249:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotificationsService=void 0;t.NotificationsService=class{}},63513:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationService=void 0;t.OrganizationService=class{}},84275:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordGenerationService=void 0;t.PasswordGenerationService=class{}},44809:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordRepromptService=void 0;t.PasswordRepromptService=class{}},73828:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlatformUtilsService=void 0;t.PlatformUtilsService=class{}},62166:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PolicyService=void 0;t.PolicyService=class{}},68291:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderService=void 0;t.ProviderService=class{}},60421:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SearchService=void 0;t.SearchService=class{constructor(){this.indexedEntityId=null}}},76532:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendService=void 0;t.SendService=class{}},2810:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsService=void 0;t.SettingsService=class{}},73569:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StateService=void 0;t.StateService=class{}},6924:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StateMigrationService=void 0;t.StateMigrationService=class{}},39566:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StorageService=void 0;t.StorageService=class{}},9724:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SyncService=void 0;t.SyncService=class{}},30694:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenService=void 0;t.TokenService=class{}},52344:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TotpService=void 0;t.TotpService=class{}},27458:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorService=void 0;t.TwoFactorService=class{}},57055:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserVerificationService=void 0;t.UserVerificationService=class{}},13444:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UsernameGenerationService=void 0;t.UsernameGenerationService=class{}},82656:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VaultTimeoutService=void 0;t.VaultTimeoutService=class{}},72440:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuthenticationStatus=void 0,function(e){e[e.LoggedOut=0]="LoggedOut",e[e.Locked=1]="Locked",e[e.Unlocked=2]="Unlocked"}(t.AuthenticationStatus||(t.AuthenticationStatus={}))},2231:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuthenticationType=void 0,function(e){e[e.Password=0]="Password",e[e.Sso=1]="Sso",e[e.Api=2]="Api"}(t.AuthenticationType||(t.AuthenticationType={}))},34453:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherRepromptType=void 0,function(e){e[e.None=0]="None",e[e.Password=1]="Password"}(t.CipherRepromptType||(t.CipherRepromptType={}))},32773:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherType=void 0,function(e){e[e.Login=1]="Login",e[e.SecureNote=2]="SecureNote",e[e.Card=3]="Card",e[e.Identity=4]="Identity"}(t.CipherType||(t.CipherType={}))},69434:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientType=void 0,function(e){e.Web="web",e.Browser="browser",e.Desktop="desktop",e.Mobile="mobile",e.Cli="cli",e.DirectoryConnector="connector"}(t.ClientType||(t.ClientType={}))},2779:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeviceType=void 0,function(e){e[e.Android=0]="Android",e[e.iOS=1]="iOS",e[e.ChromeExtension=2]="ChromeExtension",e[e.FirefoxExtension=3]="FirefoxExtension",e[e.OperaExtension=4]="OperaExtension",e[e.EdgeExtension=5]="EdgeExtension",e[e.WindowsDesktop=6]="WindowsDesktop",e[e.MacOsDesktop=7]="MacOsDesktop",e[e.LinuxDesktop=8]="LinuxDesktop",e[e.ChromeBrowser=9]="ChromeBrowser",e[e.FirefoxBrowser=10]="FirefoxBrowser",e[e.OperaBrowser=11]="OperaBrowser",e[e.EdgeBrowser=12]="EdgeBrowser",e[e.IEBrowser=13]="IEBrowser",e[e.UnknownBrowser=14]="UnknownBrowser",e[e.AndroidAmazon=15]="AndroidAmazon",e[e.UWP=16]="UWP",e[e.SafariBrowser=17]="SafariBrowser",e[e.VivaldiBrowser=18]="VivaldiBrowser",e[e.VivaldiExtension=19]="VivaldiExtension",e[e.SafariExtension=20]="SafariExtension"}(t.DeviceType||(t.DeviceType={}))},47200:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAccessStatusType=void 0,function(e){e[e.Invited=0]="Invited",e[e.Accepted=1]="Accepted",e[e.Confirmed=2]="Confirmed",e[e.RecoveryInitiated=3]="RecoveryInitiated",e[e.RecoveryApproved=4]="RecoveryApproved"}(t.EmergencyAccessStatusType||(t.EmergencyAccessStatusType={}))},82838:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAccessType=void 0,function(e){e[e.View=0]="View",e[e.Takeover=1]="Takeover"}(t.EmergencyAccessType||(t.EmergencyAccessType={}))},28588:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EncryptionType=void 0,function(e){e[e.AesCbc256_B64=0]="AesCbc256_B64",e[e.AesCbc128_HmacSha256_B64=1]="AesCbc128_HmacSha256_B64",e[e.AesCbc256_HmacSha256_B64=2]="AesCbc256_HmacSha256_B64",e[e.Rsa2048_OaepSha256_B64=3]="Rsa2048_OaepSha256_B64",e[e.Rsa2048_OaepSha1_B64=4]="Rsa2048_OaepSha1_B64",e[e.Rsa2048_OaepSha256_HmacSha256_B64=5]="Rsa2048_OaepSha256_HmacSha256_B64",e[e.Rsa2048_OaepSha1_HmacSha256_B64=6]="Rsa2048_OaepSha1_HmacSha256_B64"}(t.EncryptionType||(t.EncryptionType={}))},80253:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventType=void 0,function(e){e[e.User_LoggedIn=1e3]="User_LoggedIn",e[e.User_ChangedPassword=1001]="User_ChangedPassword",e[e.User_Updated2fa=1002]="User_Updated2fa",e[e.User_Disabled2fa=1003]="User_Disabled2fa",e[e.User_Recovered2fa=1004]="User_Recovered2fa",e[e.User_FailedLogIn=1005]="User_FailedLogIn",e[e.User_FailedLogIn2fa=1006]="User_FailedLogIn2fa",e[e.User_ClientExportedVault=1007]="User_ClientExportedVault",e[e.User_UpdatedTempPassword=1008]="User_UpdatedTempPassword",e[e.User_MigratedKeyToKeyConnector=1009]="User_MigratedKeyToKeyConnector",e[e.Cipher_Created=1100]="Cipher_Created",e[e.Cipher_Updated=1101]="Cipher_Updated",e[e.Cipher_Deleted=1102]="Cipher_Deleted",e[e.Cipher_AttachmentCreated=1103]="Cipher_AttachmentCreated",e[e.Cipher_AttachmentDeleted=1104]="Cipher_AttachmentDeleted",e[e.Cipher_Shared=1105]="Cipher_Shared",e[e.Cipher_UpdatedCollections=1106]="Cipher_UpdatedCollections",e[e.Cipher_ClientViewed=1107]="Cipher_ClientViewed",e[e.Cipher_ClientToggledPasswordVisible=1108]="Cipher_ClientToggledPasswordVisible",e[e.Cipher_ClientToggledHiddenFieldVisible=1109]="Cipher_ClientToggledHiddenFieldVisible",e[e.Cipher_ClientToggledCardCodeVisible=1110]="Cipher_ClientToggledCardCodeVisible",e[e.Cipher_ClientCopiedPassword=1111]="Cipher_ClientCopiedPassword",e[e.Cipher_ClientCopiedHiddenField=1112]="Cipher_ClientCopiedHiddenField",e[e.Cipher_ClientCopiedCardCode=1113]="Cipher_ClientCopiedCardCode",e[e.Cipher_ClientAutofilled=1114]="Cipher_ClientAutofilled",e[e.Cipher_SoftDeleted=1115]="Cipher_SoftDeleted",e[e.Cipher_Restored=1116]="Cipher_Restored",e[e.Cipher_ClientToggledCardNumberVisible=1117]="Cipher_ClientToggledCardNumberVisible",e[e.Collection_Created=1300]="Collection_Created",e[e.Collection_Updated=1301]="Collection_Updated",e[e.Collection_Deleted=1302]="Collection_Deleted",e[e.Group_Created=1400]="Group_Created",e[e.Group_Updated=1401]="Group_Updated",e[e.Group_Deleted=1402]="Group_Deleted",e[e.OrganizationUser_Invited=1500]="OrganizationUser_Invited",e[e.OrganizationUser_Confirmed=1501]="OrganizationUser_Confirmed",e[e.OrganizationUser_Updated=1502]="OrganizationUser_Updated",e[e.OrganizationUser_Removed=1503]="OrganizationUser_Removed",e[e.OrganizationUser_UpdatedGroups=1504]="OrganizationUser_UpdatedGroups",e[e.OrganizationUser_UnlinkedSso=1505]="OrganizationUser_UnlinkedSso",e[e.OrganizationUser_ResetPassword_Enroll=1506]="OrganizationUser_ResetPassword_Enroll",e[e.OrganizationUser_ResetPassword_Withdraw=1507]="OrganizationUser_ResetPassword_Withdraw",e[e.OrganizationUser_AdminResetPassword=1508]="OrganizationUser_AdminResetPassword",e[e.OrganizationUser_ResetSsoLink=1509]="OrganizationUser_ResetSsoLink",e[e.OrganizationUser_FirstSsoLogin=1510]="OrganizationUser_FirstSsoLogin",e[e.Organization_Updated=1600]="Organization_Updated",e[e.Organization_PurgedVault=1601]="Organization_PurgedVault",e[e.Organization_VaultAccessed=1603]="Organization_VaultAccessed",e[e.Organization_EnabledSso=1604]="Organization_EnabledSso",e[e.Organization_DisabledSso=1605]="Organization_DisabledSso",e[e.Organization_EnabledKeyConnector=1606]="Organization_EnabledKeyConnector",e[e.Organization_DisabledKeyConnector=1607]="Organization_DisabledKeyConnector",e[e.Organization_SponsorshipsSynced=1608]="Organization_SponsorshipsSynced",e[e.Policy_Updated=1700]="Policy_Updated",e[e.ProviderUser_Invited=1800]="ProviderUser_Invited",e[e.ProviderUser_Confirmed=1801]="ProviderUser_Confirmed",e[e.ProviderUser_Updated=1802]="ProviderUser_Updated",e[e.ProviderUser_Removed=1803]="ProviderUser_Removed",e[e.ProviderOrganization_Created=1900]="ProviderOrganization_Created",e[e.ProviderOrganization_Added=1901]="ProviderOrganization_Added",e[e.ProviderOrganization_Removed=1902]="ProviderOrganization_Removed",e[e.ProviderOrganization_VaultAccessed=1903]="ProviderOrganization_VaultAccessed"}(t.EventType||(t.EventType={}))},67577:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FieldType=void 0,function(e){e[e.Text=0]="Text",e[e.Hidden=1]="Hidden",e[e.Boolean=2]="Boolean",e[e.Linked=3]="Linked"}(t.FieldType||(t.FieldType={}))},25423:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileUploadType=void 0,function(e){e[e.Direct=0]="Direct",e[e.Azure=1]="Azure"}(t.FileUploadType||(t.FileUploadType={}))},43578:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashPurpose=void 0,function(e){e[e.ServerAuthorization=1]="ServerAuthorization",e[e.LocalAuthorization=2]="LocalAuthorization"}(t.HashPurpose||(t.HashPurpose={}))},46632:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HtmlStorageLocation=void 0,function(e){e.Local="local",e.Memory="memory",e.Session="session"}(t.HtmlStorageLocation||(t.HtmlStorageLocation={}))},55766:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regularImportOptions=t.featuredImportOptions=void 0,t.featuredImportOptions=[{id:"bitwardenjson",name:"Bitwarden (json)"},{id:"bitwardencsv",name:"Bitwarden (csv)"},{id:"chromecsv",name:"Chrome (csv)"},{id:"dashlanecsv",name:"Dashlane (csv)"},{id:"firefoxcsv",name:"Firefox (csv)"},{id:"keepass2xml",name:"KeePass 2 (xml)"},{id:"lastpasscsv",name:"LastPass (csv)"},{id:"safaricsv",name:"Safari and macOS (csv)"},{id:"1password1pux",name:"1Password (1pux)"}],t.regularImportOptions=[{id:"keepassxcsv",name:"KeePassX (csv)"},{id:"1password1pif",name:"1Password (1pif)"},{id:"1passwordwincsv",name:"1Password 6 and 7 Windows (csv)"},{id:"1passwordmaccsv",name:"1Password 6 and 7 Mac (csv)"},{id:"dashlanejson",name:"Dashlane (json)"},{id:"roboformcsv",name:"RoboForm (csv)"},{id:"keepercsv",name:"Keeper (csv)"},{id:"enpasscsv",name:"Enpass (csv)"},{id:"enpassjson",name:"Enpass (json)"},{id:"safeincloudxml",name:"SafeInCloud (xml)"},{id:"pwsafexml",name:"Password Safe (xml)"},{id:"stickypasswordxml",name:"Sticky Password (xml)"},{id:"msecurecsv",name:"mSecure (csv)"},{id:"truekeycsv",name:"True Key (csv)"},{id:"passwordbossjson",name:"Password Boss (json)"},{id:"zohovaultcsv",name:"Zoho Vault (csv)"},{id:"splashidcsv",name:"SplashID (csv)"},{id:"passworddragonxml",name:"Password Dragon (xml)"},{id:"padlockcsv",name:"Padlock (csv)"},{id:"passboltcsv",name:"Passbolt (csv)"},{id:"clipperzhtml",name:"Clipperz (html)"},{id:"aviracsv",name:"Avira (csv)"},{id:"saferpasscsv",name:"SaferPass (csv)"},{id:"upmcsv",name:"Universal Password Manager (csv)"},{id:"ascendocsv",name:"Ascendo DataVault (csv)"},{id:"meldiumcsv",name:"Meldium (csv)"},{id:"passkeepcsv",name:"PassKeep (csv)"},{id:"operacsv",name:"Opera (csv)"},{id:"vivaldicsv",name:"Vivaldi (csv)"},{id:"gnomejson",name:"GNOME Passwords and Keys/Seahorse (json)"},{id:"blurcsv",name:"Blur (csv)"},{id:"passwordagentcsv",name:"Password Agent (csv)"},{id:"passpackcsv",name:"Passpack (csv)"},{id:"passmanjson",name:"Passman (json)"},{id:"avastcsv",name:"Avast Passwords (csv)"},{id:"avastjson",name:"Avast Passwords (json)"},{id:"fsecurefsk",name:"F-Secure KEY (fsk)"},{id:"kasperskytxt",name:"Kaspersky Password Manager (txt)"},{id:"remembearcsv",name:"RememBear (csv)"},{id:"passwordwallettxt",name:"PasswordWallet (txt)"},{id:"mykicsv",name:"Myki (csv)"},{id:"securesafecsv",name:"SecureSafe (csv)"},{id:"logmeoncecsv",name:"LogMeOnce (csv)"},{id:"blackberrycsv",name:"BlackBerry Password Keeper (csv)"},{id:"buttercupcsv",name:"Buttercup (csv)"},{id:"codebookcsv",name:"Codebook (csv)"},{id:"encryptrcsv",name:"Encryptr (csv)"},{id:"yoticsv",name:"Yoti (csv)"},{id:"nordpasscsv",name:"Nordpass (csv)"}]},20971:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.SEND_KDF_ITERATIONS=t.DEFAULT_KDF_ITERATIONS=t.DEFAULT_KDF_TYPE=t.KdfType=void 0,function(e){e[e.PBKDF2_SHA256=0]="PBKDF2_SHA256"}(n=t.KdfType||(t.KdfType={})),t.DEFAULT_KDF_TYPE=n.PBKDF2_SHA256,t.DEFAULT_KDF_ITERATIONS=1e5,t.SEND_KDF_ITERATIONS=1e5},7980:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeySuffixOptions=void 0,function(e){e.Auto="auto",e.Biometric="biometric"}(t.KeySuffixOptions||(t.KeySuffixOptions={}))},31909:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityLinkedId=t.CardLinkedId=t.LoginLinkedId=void 0,function(e){e[e.Username=100]="Username",e[e.Password=101]="Password"}(t.LoginLinkedId||(t.LoginLinkedId={})),function(e){e[e.CardholderName=300]="CardholderName",e[e.ExpMonth=301]="ExpMonth",e[e.ExpYear=302]="ExpYear",e[e.Code=303]="Code",e[e.Brand=304]="Brand",e[e.Number=305]="Number"}(t.CardLinkedId||(t.CardLinkedId={})),function(e){e[e.Title=400]="Title",e[e.MiddleName=401]="MiddleName",e[e.Address1=402]="Address1",e[e.Address2=403]="Address2",e[e.Address3=404]="Address3",e[e.City=405]="City",e[e.State=406]="State",e[e.PostalCode=407]="PostalCode",e[e.Country=408]="Country",e[e.Company=409]="Company",e[e.Email=410]="Email",e[e.Phone=411]="Phone",e[e.Ssn=412]="Ssn",e[e.Username=413]="Username",e[e.PassportNumber=414]="PassportNumber",e[e.LicenseNumber=415]="LicenseNumber",e[e.FirstName=416]="FirstName",e[e.LastName=417]="LastName",e[e.FullName=418]="FullName"}(t.IdentityLinkedId||(t.IdentityLinkedId={}))},71518:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevelType=void 0,function(e){e[e.Debug=0]="Debug",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(t.LogLevelType||(t.LogLevelType={}))},7837:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotificationType=void 0,function(e){e[e.SyncCipherUpdate=0]="SyncCipherUpdate",e[e.SyncCipherCreate=1]="SyncCipherCreate",e[e.SyncLoginDelete=2]="SyncLoginDelete",e[e.SyncFolderDelete=3]="SyncFolderDelete",e[e.SyncCiphers=4]="SyncCiphers",e[e.SyncVault=5]="SyncVault",e[e.SyncOrgKeys=6]="SyncOrgKeys",e[e.SyncFolderCreate=7]="SyncFolderCreate",e[e.SyncFolderUpdate=8]="SyncFolderUpdate",e[e.SyncCipherDelete=9]="SyncCipherDelete",e[e.SyncSettings=10]="SyncSettings",e[e.LogOut=11]="LogOut",e[e.SyncSendCreate=12]="SyncSendCreate",e[e.SyncSendUpdate=13]="SyncSendUpdate",e[e.SyncSendDelete=14]="SyncSendDelete"}(t.NotificationType||(t.NotificationType={}))},43497:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationApiKeyType=void 0,function(e){e[e.Default=0]="Default",e[e.BillingSync=1]="BillingSync"}(t.OrganizationApiKeyType||(t.OrganizationApiKeyType={}))},24643:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationConnectionType=void 0,function(e){e[e.CloudBillingSync=1]="CloudBillingSync"}(t.OrganizationConnectionType||(t.OrganizationConnectionType={}))},7368:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserStatusType=void 0,function(e){e[e.Invited=0]="Invited",e[e.Accepted=1]="Accepted",e[e.Confirmed=2]="Confirmed"}(t.OrganizationUserStatusType||(t.OrganizationUserStatusType={}))},33712:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserType=void 0,function(e){e[e.Owner=0]="Owner",e[e.Admin=1]="Admin",e[e.User=2]="User",e[e.Manager=3]="Manager",e[e.Custom=4]="Custom"}(t.OrganizationUserType||(t.OrganizationUserType={}))},98523:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PaymentMethodType=void 0,function(e){e[e.Card=0]="Card",e[e.BankAccount=1]="BankAccount",e[e.PayPal=2]="PayPal",e[e.BitPay=3]="BitPay",e[e.Credit=4]="Credit",e[e.WireTransfer=5]="WireTransfer",e[e.AppleInApp=6]="AppleInApp",e[e.GoogleInApp=7]="GoogleInApp",e[e.Check=8]="Check"}(t.PaymentMethodType||(t.PaymentMethodType={}))},47880:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Permissions=void 0,function(e){e[e.AccessEventLogs=0]="AccessEventLogs",e[e.AccessImportExport=1]="AccessImportExport",e[e.AccessReports=2]="AccessReports",e[e.ManageAllCollections=3]="ManageAllCollections",e[e.ManageAssignedCollections=4]="ManageAssignedCollections",e[e.ManageGroups=5]="ManageGroups",e[e.ManageOrganization=6]="ManageOrganization",e[e.ManagePolicies=7]="ManagePolicies",e[e.ManageProvider=8]="ManageProvider",e[e.ManageUsers=9]="ManageUsers",e[e.ManageUsersPassword=10]="ManageUsersPassword",e[e.CreateNewCollections=11]="CreateNewCollections",e[e.EditAnyCollection=12]="EditAnyCollection",e[e.DeleteAnyCollection=13]="DeleteAnyCollection",e[e.EditAssignedCollections=14]="EditAssignedCollections",e[e.DeleteAssignedCollections=15]="DeleteAssignedCollections",e[e.ManageSso=16]="ManageSso",e[e.ManageBilling=17]="ManageBilling"}(t.Permissions||(t.Permissions={}))},22931:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlanSponsorshipType=void 0,function(e){e[e.FamiliesForEnterprise=0]="FamiliesForEnterprise"}(t.PlanSponsorshipType||(t.PlanSponsorshipType={}))},47937:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlanType=void 0,function(e){e[e.Free=0]="Free",e[e.FamiliesAnnually2019=1]="FamiliesAnnually2019",e[e.TeamsMonthly2019=2]="TeamsMonthly2019",e[e.TeamsAnnually2019=3]="TeamsAnnually2019",e[e.EnterpriseMonthly2019=4]="EnterpriseMonthly2019",e[e.EnterpriseAnnually2019=5]="EnterpriseAnnually2019",e[e.Custom=6]="Custom",e[e.FamiliesAnnually=7]="FamiliesAnnually",e[e.TeamsMonthly=8]="TeamsMonthly",e[e.TeamsAnnually=9]="TeamsAnnually",e[e.EnterpriseMonthly=10]="EnterpriseMonthly",e[e.EnterpriseAnnually=11]="EnterpriseAnnually"}(t.PlanType||(t.PlanType={}))},49906:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PolicyType=void 0,function(e){e[e.TwoFactorAuthentication=0]="TwoFactorAuthentication",e[e.MasterPassword=1]="MasterPassword",e[e.PasswordGenerator=2]="PasswordGenerator",e[e.SingleOrg=3]="SingleOrg",e[e.RequireSso=4]="RequireSso",e[e.PersonalOwnership=5]="PersonalOwnership",e[e.DisableSend=6]="DisableSend",e[e.SendOptions=7]="SendOptions",e[e.ResetPassword=8]="ResetPassword",e[e.MaximumVaultTimeout=9]="MaximumVaultTimeout",e[e.DisablePersonalVaultExport=10]="DisablePersonalVaultExport"}(t.PolicyType||(t.PolicyType={}))},96066:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProductType=void 0,function(e){e[e.Free=0]="Free",e[e.Families=1]="Families",e[e.Teams=2]="Teams",e[e.Enterprise=3]="Enterprise"}(t.ProductType||(t.ProductType={}))},72418:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserStatusType=void 0,function(e){e[e.Invited=0]="Invited",e[e.Accepted=1]="Accepted",e[e.Confirmed=2]="Confirmed"}(t.ProviderUserStatusType||(t.ProviderUserStatusType={}))},30185:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserType=void 0,function(e){e[e.ProviderAdmin=0]="ProviderAdmin",e[e.ServiceUser=1]="ServiceUser"}(t.ProviderUserType||(t.ProviderUserType={}))},76716:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecureNoteType=void 0,function(e){e[e.Generic=0]="Generic"}(t.SecureNoteType||(t.SecureNoteType={}))},70149:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendType=void 0,function(e){e[e.Text=0]="Text",e[e.File=1]="File"}(t.SendType||(t.SendType={}))},37084:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Saml2SigningBehavior=t.Saml2NameIdFormat=t.Saml2BindingType=t.OpenIdConnectRedirectBehavior=t.SsoType=void 0,function(e){e[e.None=0]="None",e[e.OpenIdConnect=1]="OpenIdConnect",e[e.Saml2=2]="Saml2"}(t.SsoType||(t.SsoType={})),function(e){e[e.RedirectGet=0]="RedirectGet",e[e.FormPost=1]="FormPost"}(t.OpenIdConnectRedirectBehavior||(t.OpenIdConnectRedirectBehavior={})),function(e){e[e.HttpRedirect=1]="HttpRedirect",e[e.HttpPost=2]="HttpPost"}(t.Saml2BindingType||(t.Saml2BindingType={})),function(e){e[e.NotConfigured=0]="NotConfigured",e[e.Unspecified=1]="Unspecified",e[e.EmailAddress=2]="EmailAddress",e[e.X509SubjectName=3]="X509SubjectName",e[e.WindowsDomainQualifiedName=4]="WindowsDomainQualifiedName",e[e.KerberosPrincipalName=5]="KerberosPrincipalName",e[e.EntityIdentifier=6]="EntityIdentifier",e[e.Persistent=7]="Persistent",e[e.Transient=8]="Transient"}(t.Saml2NameIdFormat||(t.Saml2NameIdFormat={})),function(e){e[e.IfIdpWantAuthnRequestsSigned=0]="IfIdpWantAuthnRequestsSigned",e[e.Always=1]="Always",e[e.Never=3]="Never"}(t.Saml2SigningBehavior||(t.Saml2SigningBehavior={}))},40898:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StateVersion=void 0,function(e){e[e.One=1]="One",e[e.Two=2]="Two",e[e.Three=3]="Three",e[e.Four=4]="Four",e[e.Latest=4]="Latest"}(t.StateVersion||(t.StateVersion={}))},67223:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StorageLocation=void 0,function(e){e.Both="both",e.Disk="disk",e.Memory="memory"}(t.StorageLocation||(t.StorageLocation={}))},14538:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ThemeType=void 0,function(e){e.System="system",e.Light="light",e.Dark="dark",e.Nord="nord",e.SolarizedDark="solarizedDark"}(t.ThemeType||(t.ThemeType={}))},94285:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionType=void 0,function(e){e[e.Charge=0]="Charge",e[e.Credit=1]="Credit",e[e.PromotionalCredit=2]="PromotionalCredit",e[e.ReferralCredit=3]="ReferralCredit",e[e.Refund=4]="Refund"}(t.TransactionType||(t.TransactionType={}))},97374:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorProviderType=void 0,function(e){e[e.Authenticator=0]="Authenticator",e[e.Email=1]="Email",e[e.Duo=2]="Duo",e[e.Yubikey=3]="Yubikey",e[e.U2f=4]="U2f",e[e.Remember=5]="Remember",e[e.OrganizationDuo=6]="OrganizationDuo",e[e.WebAuthn=7]="WebAuthn"}(t.TwoFactorProviderType||(t.TwoFactorProviderType={}))},71703:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UriMatchType=void 0,function(e){e[e.Domain=0]="Domain",e[e.Host=1]="Host",e[e.StartsWith=2]="StartsWith",e[e.Exact=3]="Exact",e[e.RegularExpression=4]="RegularExpression",e[e.Never=5]="Never"}(t.UriMatchType||(t.UriMatchType={}))},44254:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VerificationType=void 0,function(e){e[e.MasterPassword=0]="MasterPassword",e[e.OTP=1]="OTP"}(t.VerificationType||(t.VerificationType={}))},45428:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccountFactory=void 0;t.AccountFactory=class{constructor(e){this.accountConstructor=e}create(e){return new this.accountConstructor(e)}}},22855:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalStateFactory=void 0;t.GlobalStateFactory=class{constructor(e){this.globalStateConstructor=e}create(e){return new this.globalStateConstructor(e)}}},35266:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StateFactory=void 0;const i=n(45428),r=n(22855);t.StateFactory=class{constructor(e,t){this.globalStateFactory=new r.GlobalStateFactory(e),this.accountFactory=new i.AccountFactory(t)}createGlobal(e){return this.globalStateFactory.create(e)}createAccount(e){return this.accountFactory.create(e)}}},51214:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AscendoCsvImporter=void 0;const i=n(2859),r=n(5957);class o extends r.BaseImporter{parse(e){const t=new i.ImportResult,n=this.parseCsv(e,!1);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{if(e.length<2)return;const n=this.initLoginCipher();if(n.notes=this.getValueOrDefault(e[e.length-1]),n.name=this.getValueOrDefault(e[0],"--"),e.length>2&&e.length%2==0)for(let t=0;t-1?n.login.password=this.getValueOrDefault(i):null==n.login.username&&this.usernameFieldNames.indexOf(o)>-1?n.login.username=this.getValueOrDefault(i):(null==n.login.uris||0===n.login.uris.length)&&this.uriFieldNames.indexOf(o)>-1?n.login.uris=this.makeUriArray(i):this.processKvp(n,r,i)}this.convertToNoteIfNeeded(n),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.AscendoCsvImporter=o},60006:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AvastCsvImporter=void 0;const i=n(2859),r=n(5957);class o extends r.BaseImporter{parse(e){const t=new i.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{const n=this.initLoginCipher();n.name=this.getValueOrDefault(e.name),n.login.uris=this.makeUriArray(e.web),n.login.password=this.getValueOrDefault(e.password),n.login.username=this.getValueOrDefault(e.login),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.AvastCsvImporter=o},14494:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AvastJsonImporter=void 0;const i=n(32773),r=n(76716),o=n(2859),a=n(5957);class s extends a.BaseImporter{parse(e){const t=new o.ImportResult,n=JSON.parse(e);return null==n?(t.success=!1,Promise.resolve(t)):(null!=n.logins&&n.logins.forEach((e=>{const n=this.initLoginCipher();n.name=this.getValueOrDefault(e.custName),n.notes=this.getValueOrDefault(e.note),n.login.uris=this.makeUriArray(e.url),n.login.password=this.getValueOrDefault(e.pwd),n.login.username=this.getValueOrDefault(e.loginName),this.cleanupCipher(n),t.ciphers.push(n)})),null!=n.notes&&n.notes.forEach((e=>{const n=this.initLoginCipher();n.type=i.CipherType.SecureNote,n.secureNote.type=r.SecureNoteType.Generic,n.name=this.getValueOrDefault(e.label),n.notes=this.getValueOrDefault(e.text),this.cleanupCipher(n),t.ciphers.push(n)})),null!=n.cards&&n.cards.forEach((e=>{const n=this.initLoginCipher();n.type=i.CipherType.Card,n.name=this.getValueOrDefault(e.custName),n.notes=this.getValueOrDefault(e.note),n.card.cardholderName=this.getValueOrDefault(e.holderName),n.card.number=this.getValueOrDefault(e.cardNumber),n.card.code=this.getValueOrDefault(e.cvv),n.card.brand=this.getCardBrand(n.card.number),null!=e.expirationDate&&(null!=e.expirationDate.month&&(n.card.expMonth=e.expirationDate.month+""),null!=e.expirationDate.year&&(n.card.expYear=e.expirationDate.year+"")),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.AvastJsonImporter=s},51272:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AviraCsvImporter=void 0;const i=n(2859),r=n(5957);class o extends r.BaseImporter{parse(e){const t=new i.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{const n=this.initLoginCipher();n.name=this.getValueOrDefault(e.name,this.getValueOrDefault(this.nameFromUrl(e.website),"--")),n.login.uris=this.makeUriArray(e.website),n.login.password=this.getValueOrDefault(e.password),this.isNullOrWhitespace(e.username)&&!this.isNullOrWhitespace(e.secondary_username)?n.login.username=e.secondary_username:(n.login.username=this.getValueOrDefault(e.username),n.notes=this.getValueOrDefault(e.secondary_username)),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.AviraCsvImporter=o},5957:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseImporter=void 0;const i=n(57460),r=n(32773),o=n(67577),a=n(76716),s=n(82769),l=n(97144),c=n(86001),d=n(58545),p=n(36914),u=n(16506),m=n(28331),h=n(99364),v=n(27944);t.BaseImporter=class{constructor(){this.organizationId=null,this.logService=new v.ConsoleLogService(!1),this.newLineRegex=/(?:\r\n|\r|\n)/,this.passwordFieldNames=["password","pass word","passphrase","pass phrase","pass","code","code word","codeword","secret","secret word","personpwd","key","keyword","key word","keyphrase","key phrase","form_pw","wppassword","pin","pwd","pw","pword","passwd","p","serial","serial#","license key","reg #","passwort"],this.usernameFieldNames=["user","name","user name","username","login name","email","e-mail","id","userid","user id","login","form_loginname","wpname","mail","loginid","login id","log","personlogin","first name","last name","card#","account #","member","member #","nom","benutzername"],this.notesFieldNames=["note","notes","comment","comments","memo","description","free form","freeform","free text","freetext","free","kommentar"],this.uriFieldNames=["url","hyper link","hyperlink","link","host","hostname","host name","server","address","hyper ref","href","web","website","web site","site","web-site","uri","ort","adresse"],this.parseCsvOptions={encoding:"UTF-8",skipEmptyLines:!1}}get organization(){return null!=this.organizationId}parseXml(e){const t=(new DOMParser).parseFromString(e,"application/xml");return null!=t&&null==t.querySelector("parsererror")?t:null}parseCsv(e,t,n={}){const r=Object.assign({header:t},this.parseCsvOptions,n);e=this.splitNewLine(e).join("\n").trim();const o=i.parse(e,r);return null!=o.errors&&o.errors.length>0&&o.errors.forEach((e=>{null!=e.row&&this.logService.warning("Error parsing row "+e.row+": "+e.message)})),o.data&&o.data.length>0?o.data:null}parseSingleRowCsv(e){if(this.isNullOrWhitespace(e))return null;const t=this.parseCsv(e,!1);return null!=t&&t.length>0&&t[0].length>0?t[0]:null}makeUriArray(e){if(null==e)return null;if("string"==typeof e){const t=new u.LoginUriView;return t.uri=this.fixUri(e),this.isNullOrWhitespace(t.uri)?null:(t.match=null,[t])}if(e.length>0){const t=[];return e.forEach((e=>{const n=new u.LoginUriView;n.uri=this.fixUri(e),this.isNullOrWhitespace(n.uri)||(n.match=null,t.push(n))})),0===t.length?null:t}return null}fixUri(e){return null==e?null:(-1===(e=e.trim()).indexOf("://")&&e.indexOf(".")>=0&&(e="http://"+e),e.length>1e3?e.substring(0,1e3):e)}nameFromUrl(e){const t=s.Utils.getHostname(e);return this.isNullOrWhitespace(t)?null:t.startsWith("www.")?t.replace("www.",""):t}isNullOrWhitespace(e){return s.Utils.isNullOrWhitespace(e)}getValueOrDefault(e,t=null){return this.isNullOrWhitespace(e)?t:e}splitNewLine(e){return e.split(this.newLineRegex)}getCardBrand(e){if(this.isNullOrWhitespace(e))return null;let t=new RegExp("^4");return null!=e.match(t)?"Visa":/^(5[1-5][0-9]{14}|2(22[1-9][0-9]{12}|2[3-9][0-9]{13}|[3-6][0-9]{14}|7[0-1][0-9]{13}|720[0-9]{12}))$/.test(e)?"Mastercard":(t=new RegExp("^3[47]"),null!=e.match(t)?"Amex":(t=new RegExp("^(6011|622(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[0-1][0-9]|92[0-5]|64[4-9])|65)"),null!=e.match(t)?"Discover":(t=new RegExp("^36"),null!=e.match(t)?"Diners Club":(t=new RegExp("^30[0-5]"),null!=e.match(t)?"Diners Club":(t=new RegExp("^35(2[89]|[3-8][0-9])"),null!=e.match(t)?"JCB":(t=new RegExp("^(4026|417500|4508|4844|491(3|7))"),null!=e.match(t)?"Visa":null))))))}setCardExpiration(e,t){if(!this.isNullOrWhitespace(t)){const n=(t=t.replace(/\s/g,"")).split("/");if(2===n.length){let t=null,i=null;if(1!==n[0].length&&2!==n[0].length||(t=n[0],2===t.length&&"0"===t[0]&&(t=t.substr(1,1))),2!==n[1].length&&4!==n[1].length||(i=2===t.length?"20"+n[1]:n[1]),null!=t&&null!=i)return e.card.expMonth=t,e.card.expYear=i,!0}}return!1}moveFoldersToCollections(e){e.folderRelationships.forEach((t=>e.collectionRelationships.push(t))),e.collections=e.folders.map((e=>{const t=new c.CollectionView;return t.name=e.name,t})),e.folderRelationships=[],e.folders=[]}querySelectorDirectChild(e,t){const n=this.querySelectorAllDirectChild(e,t);return 0===n.length?null:n[0]}querySelectorAllDirectChild(e,t){return Array.from(e.querySelectorAll(t)).filter((t=>t.parentNode===e))}initLoginCipher(){const e=new l.CipherView;return e.favorite=!1,e.notes="",e.fields=[],e.login=new m.LoginView,e.type=r.CipherType.Login,e}cleanupCipher(e){null!=e&&(e.type!==r.CipherType.Login&&(e.login=null),this.isNullOrWhitespace(e.name)&&(e.name="--"),this.isNullOrWhitespace(e.notes)?e.notes=null:e.notes=e.notes.trim(),null!=e.fields&&0===e.fields.length&&(e.fields=null))}processKvp(e,t,n,i=o.FieldType.Text){if(!this.isNullOrWhitespace(n))if(this.isNullOrWhitespace(t)&&(t=""),n.length>200||n.trim().search(this.newLineRegex)>-1)null==e.notes&&(e.notes=""),e.notes+=t+": "+this.splitNewLine(n).join("\n")+"\n";else{null==e.fields&&(e.fields=[]);const r=new d.FieldView;r.type=i,r.name=t,r.value=n,e.fields.push(r)}}processFolder(e,t){let n=e.folders.length;const i=!this.isNullOrWhitespace(t);let r=i;if(i)for(let o=0;o0&&(e.identity.firstName=this.getValueOrDefault(n[0])),2===n.length?e.identity.lastName=this.getValueOrDefault(n[1]):n.length>=3&&(e.identity.middleName=this.getValueOrDefault(n[1]),e.identity.lastName=n.slice(2,n.length).join(" "))}}},25690:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BitwardenCsvImporter=void 0;const i=n(34453),r=n(32773),o=n(67577),a=n(76716),s=n(2859),l=n(97144),c=n(86001),d=n(58545),p=n(28331),u=n(99364),m=n(5957);class h extends m.BaseImporter{parse(e){const t=new s.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{if(this.organization&&!this.isNullOrWhitespace(e.collections)){e.collections.split(",").forEach((e=>{let n=!0,i=t.collections.length;for(let r=0;ri+2&&(r.value=t[e].substr(i+2)),n.fields.push(r)}}switch(null!=e.type?e.type.toLowerCase():null){case"note":n.type=r.CipherType.SecureNote,n.secureNote=new u.SecureNoteView,n.secureNote.type=a.SecureNoteType.Generic;break;default:{n.type=r.CipherType.Login,n.login=new p.LoginView,n.login.totp=this.getValueOrDefault(e.login_totp||e.totp),n.login.username=this.getValueOrDefault(e.login_username||e.username),n.login.password=this.getValueOrDefault(e.login_password||e.password);const t=this.parseSingleRowCsv(e.login_uri||e.uri);n.login.uris=this.makeUriArray(t);break}}t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.BitwardenCsvImporter=h},10614:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BitwardenJsonImporter=void 0;const r=n(22205),o=n(2859),a=n(83460),s=n(5136),l=n(31087),c=n(5957);class d extends c.BaseImporter{constructor(e,t){super(),this.cryptoService=e,this.i18nService=t}parse(e){var t;return i(this,void 0,void 0,(function*(){return this.result=new o.ImportResult,this.results=JSON.parse(e),null==this.results||null==this.results.items?(null===(t=this.results)||void 0===t?void 0:t.passwordProtected)?(this.result.success=!1,this.result.missingPassword=!0,this.result.errorMessage=this.i18nService.t("importPasswordRequired"),this.result):(this.result.success=!1,this.result):(this.results.encrypted?yield this.parseEncrypted():this.parseDecrypted(),this.result)}))}parseEncrypted(){return i(this,void 0,void 0,(function*(){if(null!=this.results.encKeyValidation_DO_NOT_EDIT){const e=yield this.cryptoService.getOrgKey(this.organizationId),t=new r.EncString(this.results.encKeyValidation_DO_NOT_EDIT);if(null===(yield this.cryptoService.decryptToUtf8(t,e)))return this.result.success=!1,void(this.result.errorMessage=this.i18nService.t("importEncKeyError"))}const e=new Map;if(this.organization&&null!=this.results.collections)for(const t of this.results.collections){const n=s.CollectionWithIdExport.toDomain(t);if(null!=n){n.id=null,n.organizationId=this.organizationId;const i=yield n.decrypt();e.set(t.id,this.result.collections.length),this.result.collections.push(i)}}else if(!this.organization&&null!=this.results.folders)for(const t of this.results.folders){const n=l.FolderWithIdExport.toDomain(t);if(null!=n){n.id=null;const i=yield n.decrypt();e.set(t.id,this.result.folders.length),this.result.folders.push(i)}}for(const t of this.results.items){const n=a.CipherWithIdExport.toDomain(t);n.id=null,n.folderId=null,n.organizationId=this.organizationId,n.collectionIds=null,null!=n.passwordHistory&&n.passwordHistory.length>5&&(n.passwordHistory=n.passwordHistory.slice(0,5)),!this.organization&&null!=t.folderId&&e.has(t.folderId)?this.result.folderRelationships.push([this.result.ciphers.length,e.get(t.folderId)]):this.organization&&null!=t.collectionIds&&t.collectionIds.forEach((t=>{e.has(t)&&this.result.collectionRelationships.push([this.result.ciphers.length,e.get(t)])}));const i=yield n.decrypt();this.cleanupCipher(i),this.result.ciphers.push(i)}this.result.success=!0}))}parseDecrypted(){const e=new Map;this.organization&&null!=this.results.collections?this.results.collections.forEach((t=>{const n=s.CollectionWithIdExport.toView(t);null!=n&&(n.id=null,n.organizationId=null,e.set(t.id,this.result.collections.length),this.result.collections.push(n))})):this.organization||null==this.results.folders||this.results.folders.forEach((t=>{const n=l.FolderWithIdExport.toView(t);null!=n&&(n.id=null,e.set(t.id,this.result.folders.length),this.result.folders.push(n))})),this.results.items.forEach((t=>{const n=a.CipherWithIdExport.toView(t);n.id=null,n.folderId=null,n.organizationId=null,n.collectionIds=null,null!=n.passwordHistory&&n.passwordHistory.length>5&&(n.passwordHistory=n.passwordHistory.slice(0,5)),!this.organization&&null!=t.folderId&&e.has(t.folderId)?this.result.folderRelationships.push([this.result.ciphers.length,e.get(t.folderId)]):this.organization&&null!=t.collectionIds&&t.collectionIds.forEach((t=>{e.has(t)&&this.result.collectionRelationships.push([this.result.ciphers.length,e.get(t)])})),this.cleanupCipher(n),this.result.ciphers.push(n)})),this.result.success=!0}}t.BitwardenJsonImporter=d},20312:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BitwardenPasswordProtectedImporter=void 0;const r=n(20971),o=n(22205),a=n(2859),s=n(10614);class l extends s.BitwardenJsonImporter{constructor(e,t,n){super(e,t),this.password=n}parse(e){const t=Object.create(null,{parse:{get:()=>super.parse}});return i(this,void 0,void 0,(function*(){const n=new a.ImportResult,i=JSON.parse(e);if(this.cannotParseFile(i))return n.success=!1,n;if(!(yield this.checkPassword(i)))return n.success=!1,n.errorMessage=this.i18nService.t("importEncKeyError"),n;const r=new o.EncString(i.data),s=yield this.cryptoService.decryptToUtf8(r,this.key);return yield t.parse.call(this,s)}))}checkPassword(e){return i(this,void 0,void 0,(function*(){this.key=yield this.cryptoService.makePinKey(this.password,e.salt,r.KdfType.PBKDF2_SHA256,e.kdfIterations);const t=new o.EncString(e.encKeyValidation_DO_NOT_EDIT);return null!==(yield this.cryptoService.decryptToUtf8(t,this.key))}))}cannotParseFile(e){return!(e&&e.encrypted&&e.passwordProtected&&e.salt&&e.kdfIterations&&"number"==typeof e.kdfIterations&&null!=e.kdfType&&null!=r.KdfType[e.kdfType]&&e.encKeyValidation_DO_NOT_EDIT&&e.data)}}t.BitwardenPasswordProtectedImporter=l},19326:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlackBerryCsvImporter=void 0;const i=n(2859),r=n(5957);class o extends r.BaseImporter{parse(e){const t=new i.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{if("list"===e.grouping)return;const n=this.initLoginCipher();n.favorite="1"===e.fav,n.name=this.getValueOrDefault(e.name),n.notes=this.getValueOrDefault(e.extra),"note"!==e.grouping&&(n.login.uris=this.makeUriArray(e.url),n.login.password=this.getValueOrDefault(e.password),n.login.username=this.getValueOrDefault(e.username)),this.convertToNoteIfNeeded(n),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.BlackBerryCsvImporter=o},68360:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlurCsvImporter=void 0;const i=n(2859),r=n(5957);class o extends r.BaseImporter{parse(e){const t=new i.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{"null"===e.label&&(e.label=null);const n=this.initLoginCipher();n.name=this.getValueOrDefault(e.label,this.getValueOrDefault(this.nameFromUrl(e.domain),"--")),n.login.uris=this.makeUriArray(e.domain),n.login.password=this.getValueOrDefault(e.password),this.isNullOrWhitespace(e.email)&&!this.isNullOrWhitespace(e.username)?n.login.username=e.username:(n.login.username=this.getValueOrDefault(e.email),n.notes=this.getValueOrDefault(e.username)),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.BlurCsvImporter=o},33268:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ButtercupCsvImporter=void 0;const i=n(2859),r=n(5957),o=["!group_id","!group_name","title","username","password","URL","id"];class a extends r.BaseImporter{parse(e){const t=new i.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{this.processFolder(t,this.getValueOrDefault(e["!group_name"]));const n=this.initLoginCipher();n.name=this.getValueOrDefault(e.title,"--"),n.login.username=this.getValueOrDefault(e.username),n.login.password=this.getValueOrDefault(e.password),n.login.uris=this.makeUriArray(e.URL);let i=!1;for(const t in e)e.hasOwnProperty(t)&&(i||-1!==o.indexOf(t)||(i=!0),i&&this.processKvp(n,t,e[t]));this.cleanupCipher(n),t.ciphers.push(n)})),this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t))}}t.ButtercupCsvImporter=a},58141:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChromeCsvImporter=void 0;const i=n(2859),r=n(5957);class o extends r.BaseImporter{parse(e){const t=new i.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{const n=this.initLoginCipher();n.name=this.getValueOrDefault(e.name,"--"),n.login.username=this.getValueOrDefault(e.username),n.login.password=this.getValueOrDefault(e.password),n.login.uris=this.makeUriArray(e.url),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.ChromeCsvImporter=o},86025:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClipperzHtmlImporter=void 0;const i=n(2859),r=n(5957);class o extends r.BaseImporter{parse(e){const t=new i.ImportResult,n=this.parseXml(e);if(null==n)return t.success=!1,Promise.resolve(t);const r=n.querySelector("textarea");if(null==r||this.isNullOrWhitespace(r.textContent))return t.errorMessage="Missing textarea.",t.success=!1,Promise.resolve(t);return JSON.parse(r.textContent).forEach((e=>{const n=this.initLoginCipher();if(this.isNullOrWhitespace(e.label)||(n.name=e.label.split(" ")[0]),null==e.data||this.isNullOrWhitespace(e.data.notes)||(n.notes=e.data.notes.split("\\n").join("\n")),null!=e.currentVersion&&null!=e.currentVersion.fields)for(const t in e.currentVersion.fields){if(!e.currentVersion.fields.hasOwnProperty(t))continue;const i=e.currentVersion.fields[t];switch(null!=i.actionType?i.actionType.toLowerCase():null){case"password":n.login.password=this.getValueOrDefault(i.value);break;case"email":case"username":case"user":case"name":n.login.username=this.getValueOrDefault(i.value);break;case"url":n.login.uris=this.makeUriArray(i.value);break;default:{const e=null!=i.label?i.label.toLowerCase():null;null==n.login.password&&this.passwordFieldNames.indexOf(e)>-1?n.login.password=this.getValueOrDefault(i.value):null==n.login.username&&this.usernameFieldNames.indexOf(e)>-1?n.login.username=this.getValueOrDefault(i.value):(null==n.login.uris||0===n.login.uris.length)&&this.uriFieldNames.indexOf(e)>-1?n.login.uris=this.makeUriArray(i.value):this.processKvp(n,i.label,i.value);break}}}this.convertToNoteIfNeeded(n),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t)}}t.ClipperzHtmlImporter=o},42752:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodebookCsvImporter=void 0;const i=n(2859),r=n(5957);class o extends r.BaseImporter{parse(e){const t=new i.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{this.processFolder(t,this.getValueOrDefault(e.Category));const n=this.initLoginCipher();n.favorite="True"===this.getValueOrDefault(e.Favorite),n.name=this.getValueOrDefault(e.Entry,"--"),n.notes=this.getValueOrDefault(e.Note),n.login.username=this.getValueOrDefault(e.Username,e.Email),n.login.password=this.getValueOrDefault(e.Password),n.login.totp=this.getValueOrDefault(e.TOTP),n.login.uris=this.makeUriArray(e.Website),this.isNullOrWhitespace(e.Username)||this.processKvp(n,"Email",e.Email),this.processKvp(n,"Phone",e.Phone),this.processKvp(n,"PIN",e.PIN),this.processKvp(n,"Account",e.Account),this.processKvp(n,"Date",e.Date),this.convertToNoteIfNeeded(n),this.cleanupCipher(n),t.ciphers.push(n)})),this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t))}}t.CodebookCsvImporter=o},99552:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DashlaneCsvImporter=void 0;const i=n(32773),r=n(76716),o=n(2859),a=n(91766),s=n(48830),l=n(28331),c=n(5957),d=new Set(["title","note","username","password","url","otpSecret","category"]),p=new Set(["type","title","first_name","middle_name","last_name","login","email","phone_number","address","country","state","city","zip","item_name"]),u=new Set(["title","note"]);class m extends c.BaseImporter{parse(e){const t=new o.ImportResult,n=this.parseCsv(e,!0);if(null==n)return t.success=!1,Promise.resolve(t);if(null!=n[0].type&&null!=n[0].title){if(1===n.filter((e=>"name"===e.type)).length){const e=this.initLoginCipher();return e.type=i.CipherType.Identity,e.identity=new s.IdentityView,n.forEach((t=>{this.parsePersonalInformationRecordAsIdentity(e,t)})),this.cleanupCipher(e),t.ciphers.push(e),t.success=!0,Promise.resolve(t)}}return n.forEach((e=>{const n=this.initLoginCipher(),i=Object.keys(e);"username"===i[0]&&(this.processFolder(t,e.category),this.parseCredentialsRecord(n,e)),"type"===i[0]&&"account_name"===i[1]&&this.parsePaymentRecord(n,e),"type"===i[0]&&"number"===i[1]&&this.parseIdRecord(n,e),"type"===i[0]!=null&&"title"===i[1]&&this.parsePersonalInformationRecord(n,e),"title"===i[0]&&"note"===i[1]&&this.parseSecureNoteRecords(n,e),this.convertToNoteIfNeeded(n),this.cleanupCipher(n),t.ciphers.push(n)})),this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t)}parseCredentialsRecord(e,t){e.type=i.CipherType.Login,e.login=new l.LoginView,e.name=t.title,e.notes=t.note,e.login.username=t.username,e.login.password=t.password,e.login.totp=t.otpSecret,e.login.uris=this.makeUriArray(t.url),this.importUnmappedFields(e,t,d)}parsePaymentRecord(e,t){e.type=i.CipherType.Card,e.card=new a.CardView,e.name=t.account_name;let n=[];switch(t.type){case"credit_card":e.card.cardholderName=t.account_name,e.card.number=t.cc_number,e.card.brand=this.getCardBrand(e.card.number),e.card.code=t.code,e.card.expMonth=t.expiration_month,e.card.expYear=t.expiration_year.substring(2,4),n=["account_name","account_holder","cc_number","code","expiration_month","expiration_year"];break;case"bank":e.card.cardholderName=t.account_holder,e.card.number=t.account_number,n=["account_name","account_holder","account_number"]}this.importUnmappedFields(e,t,new Set(n))}parseIdRecord(e,t){e.type=i.CipherType.Identity,e.identity=new s.IdentityView;const n=["name","number"];switch(t.type){case"card":e.name=`${t.name} ${t.type}`,this.processFullName(e,t.name),e.identity.licenseNumber=t.number;break;case"passport":e.name=`${t.name} ${t.type}`,this.processFullName(e,t.name),e.identity.passportNumber=t.number;break;case"license":e.name=`${t.name} ${t.type}`,this.processFullName(e,t.name),e.identity.licenseNumber=t.number,e.identity.state=t.state,n.push("state");break;case"social_security":e.name=`${t.name} ${t.type}`,this.processFullName(e,t.name),e.identity.ssn=t.number;break;case"tax_number":e.name=t.type,e.identity.licenseNumber=t.number}this.importUnmappedFields(e,t,new Set(n))}parsePersonalInformationRecord(e,t){e.type=i.CipherType.SecureNote,e.secureNote.type=r.SecureNoteType.Generic,"name"===t.type?e.name=`${t.title} ${t.first_name} ${t.middle_name} ${t.last_name}`.replace(" "," ").trim():e.name=t.item_name;const n=t;Object.keys(t).forEach((t=>{this.processKvp(e,t,n[t])}))}parsePersonalInformationRecordAsIdentity(e,t){switch(t.type){case"name":this.processFullName(e,`${t.first_name} ${t.middle_name} ${t.last_name}`),e.identity.title=t.title,e.name=e.identity.fullName,e.identity.username=t.login;break;case"email":e.identity.email=t.email;break;case"number":e.identity.phone=t.phone_number;break;case"address":e.identity.address1=t.address,e.identity.city=t.city,e.identity.postalCode=t.zip,e.identity.state=t.state,e.identity.country=t.country}this.importUnmappedFields(e,t,p)}parseSecureNoteRecords(e,t){e.type=i.CipherType.SecureNote,e.secureNote.type=r.SecureNoteType.Generic,e.name=t.title,e.notes=t.note,this.importUnmappedFields(e,t,u)}importUnmappedFields(e,t,n){Object.keys(t).filter((e=>!n.has(e))).forEach((n=>{const i=t;this.processKvp(e,n,i[n])}))}}t.DashlaneCsvImporter=m},31188:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DashlaneJsonImporter=void 0;const i=n(32773),r=n(76716),o=n(2859),a=n(91766),s=n(97144),l=n(48830),c=n(99364),d=n(5957),p=new Set(["ADDRESS","AUTHENTIFIANT","BANKSTATEMENT","IDCARD","IDENTITY","PAYMENTMEANS_CREDITCARD","PAYMENTMEAN_PAYPAL","EMAIL"]);class u extends d.BaseImporter{parse(e){this.result=new o.ImportResult;const t=JSON.parse(e);if(null==t||0===t.length)return this.result.success=!1,Promise.resolve(this.result);null!=t.ADDRESS&&this.processAddress(t.ADDRESS),null!=t.AUTHENTIFIANT&&this.processAuth(t.AUTHENTIFIANT),null!=t.BANKSTATEMENT&&this.processNote(t.BANKSTATEMENT,"BankAccountName"),null!=t.IDCARD&&this.processNote(t.IDCARD,"Fullname"),null!=t.PAYMENTMEANS_CREDITCARD&&this.processCard(t.PAYMENTMEANS_CREDITCARD),null!=t.IDENTITY&&this.processIdentity(t.IDENTITY);for(const n in t)t.hasOwnProperty(n)&&!p.has(n)&&this.processNote(t[n],null,"Generic Note");return this.result.success=!0,Promise.resolve(this.result)}processAuth(e){e.forEach((e=>{const t=this.initLoginCipher();t.name=this.getValueOrDefault(e.title),t.login.username=this.getValueOrDefault(e.login,this.getValueOrDefault(e.secondaryLogin)),this.isNullOrWhitespace(t.login.username)?t.login.username=this.getValueOrDefault(e.email):this.isNullOrWhitespace(e.email)||(t.notes="Email: "+e.email+"\n"),t.login.password=this.getValueOrDefault(e.password),t.login.uris=this.makeUriArray(e.domain),t.notes+=this.getValueOrDefault(e.note,""),this.convertToNoteIfNeeded(t),this.cleanupCipher(t),this.result.ciphers.push(t)}))}processIdentity(e){e.forEach((e=>{const t=new s.CipherView;t.identity=new l.IdentityView,t.type=i.CipherType.Identity,t.name=this.getValueOrDefault(e.fullName,"");const n=t.name.split(" ");n.length>0&&(t.identity.firstName=this.getValueOrDefault(n[0])),2===n.length?t.identity.lastName=this.getValueOrDefault(n[1]):3===n.length&&(t.identity.middleName=this.getValueOrDefault(n[1]),t.identity.lastName=this.getValueOrDefault(n[2])),t.identity.username=this.getValueOrDefault(e.pseudo),this.cleanupCipher(t),this.result.ciphers.push(t)}))}processAddress(e){e.forEach((e=>{const t=new s.CipherView;t.identity=new l.IdentityView,t.type=i.CipherType.Identity,t.name=this.getValueOrDefault(e.addressName),t.identity.address1=this.getValueOrDefault(e.addressFull),t.identity.city=this.getValueOrDefault(e.city),t.identity.state=this.getValueOrDefault(e.state),t.identity.postalCode=this.getValueOrDefault(e.zipcode),t.identity.country=this.getValueOrDefault(e.country),null!=t.identity.country&&(t.identity.country=t.identity.country.toUpperCase()),this.cleanupCipher(t),this.result.ciphers.push(t)}))}processCard(e){e.forEach((e=>{const t=new s.CipherView;t.card=new a.CardView,t.type=i.CipherType.Card,t.name=this.getValueOrDefault(e.bank),t.card.number=this.getValueOrDefault(e.cardNumber),t.card.brand=this.getCardBrand(t.card.number),t.card.cardholderName=this.getValueOrDefault(e.owner),this.isNullOrWhitespace(t.card.brand)||(this.isNullOrWhitespace(t.name)?t.name=t.card.brand:t.name+=" - "+t.card.brand),this.cleanupCipher(t),this.result.ciphers.push(t)}))}processNote(e,t,n=null){e.forEach((e=>{const o=new s.CipherView;o.secureNote=new c.SecureNoteView,o.type=i.CipherType.SecureNote,o.secureNote.type=r.SecureNoteType.Generic,o.name=null!=n?n:this.getValueOrDefault(e[t]);for(const n in e)e.hasOwnProperty(n)&&n!==t&&this.processKvp(o,n,e[n].toString());this.cleanupCipher(o),this.result.ciphers.push(o)}))}}t.DashlaneJsonImporter=u},42578:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EncryptrCsvImporter=void 0;const i=n(32773),r=n(2859),o=n(91766),a=n(5957);class s extends a.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{const n=this.initLoginCipher();n.name=this.getValueOrDefault(e.Label,"--"),n.notes=this.getValueOrDefault(e.Notes);const r=this.getValueOrDefault(e.Text);this.isNullOrWhitespace(r)||(this.isNullOrWhitespace(n.notes)?n.notes=r:n.notes+="\n\n"+r);const a=e["Entry Type"];if("Password"===a)n.login.username=this.getValueOrDefault(e.Username),n.login.password=this.getValueOrDefault(e.Password),n.login.uris=this.makeUriArray(e["Site URL"]);else if("Credit Card"===a){n.type=i.CipherType.Card,n.card=new o.CardView,n.card.cardholderName=this.getValueOrDefault(e["Name on card"]),n.card.number=this.getValueOrDefault(e["Card Number"]),n.card.brand=this.getCardBrand(n.card.number),n.card.code=this.getValueOrDefault(e.CVV);const t=this.getValueOrDefault(e.Expiry);if(!this.isNullOrWhitespace(t)){const e=t.split("/");e.length>1&&(n.card.expMonth=parseInt(e[0],null).toString(),n.card.expYear=(2e3+parseInt(e[1],null)).toString())}}this.convertToNoteIfNeeded(n),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.EncryptrCsvImporter=s},41933:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EnpassCsvImporter=void 0;const i=n(32773),r=n(76716),o=n(2859),a=n(91766),s=n(99364),l=n(5957);class c extends l.BaseImporter{parse(e){const t=new o.ImportResult,n=this.parseCsv(e,!1);if(null==n)return t.success=!1,Promise.resolve(t);let l=!0;return n.forEach((e=>{if(e.length<2||l&&("Title"===e[0]||"title"===e[0]))return void(l=!1);const n=this.initLoginCipher();if(n.notes=this.getValueOrDefault(e[e.length-1]),n.name=this.getValueOrDefault(e[0],"--"),2!==e.length&&(this.containsField(e,"username")||this.containsField(e,"password")||this.containsField(e,"email")||this.containsField(e,"url"))||(n.type=i.CipherType.SecureNote,n.secureNote=new s.SecureNoteView,n.secureNote.type=r.SecureNoteType.Generic),this.containsField(e,"cardholder")&&this.containsField(e,"number")&&this.containsField(e,"expiry date")&&(n.type=i.CipherType.Card,n.card=new a.CardView),e.length>2&&e.length%2==0)for(let t=0;t!this.isNullOrWhitespace(e)&&e.toLowerCase()===t.toLowerCase())).length>0}}t.EnpassCsvImporter=c},84783:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EnpassJsonImporter=void 0;const i=n(32773),r=n(67577),o=n(2859),a=n(91766),s=n(36914),l=n(5957);class c extends l.BaseImporter{parse(e){const t=new o.ImportResult,n=JSON.parse(e);if(null==n||null==n.items||0===n.items.length)return t.success=!1,Promise.resolve(t);const i=new Map,r=new Map,a=this.buildFolderTree(n.folders);return this.flattenFolderTree(null,a,i),i.forEach(((e,n)=>{r.set(n,t.folders.length);const i=new s.FolderView;i.name=e,t.folders.push(i)})),n.items.forEach((e=>{null!=e.folders&&e.folders.length>0&&r.has(e.folders[0])&&t.folderRelationships.push([t.ciphers.length,r.get(e.folders[0])]);const n=this.initLoginCipher();n.name=this.getValueOrDefault(e.title),n.favorite=e.favorite>0,null!=e.template_type&&null!=e.fields&&e.fields.length>0&&(0===e.template_type.indexOf("login.")||0===e.template_type.indexOf("password.")?this.processLogin(n,e.fields):0===e.template_type.indexOf("creditcard.")?this.processCard(n,e.fields):e.template_type.indexOf("identity.")<0&&e.fields.some((e=>"password"===e.type&&!this.isNullOrWhitespace(e.value)))?this.processLogin(n,e.fields):this.processNote(n,e.fields)),n.notes+="\n"+this.getValueOrDefault(e.note,""),this.convertToNoteIfNeeded(n),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t)}processLogin(e,t){const n=[];t.forEach((t=>{this.isNullOrWhitespace(t.value)||"section"===t.type||("username"!==t.type&&"email"!==t.type||!this.isNullOrWhitespace(e.login.username)?"password"===t.type&&this.isNullOrWhitespace(e.login.password)?e.login.password=t.value:"totp"===t.type&&this.isNullOrWhitespace(e.login.totp)?e.login.totp=t.value:"url"===t.type?n.push(t.value):this.processKvp(e,t.label,t.value,1===t.sensitive?r.FieldType.Hidden:r.FieldType.Text):e.login.username=t.value)})),e.login.uris=this.makeUriArray(n)}processCard(e,t){e.card=new a.CardView,e.type=i.CipherType.Card,t.forEach((t=>{this.isNullOrWhitespace(t.value)||"section"===t.type||"ccType"===t.type||("ccName"===t.type&&this.isNullOrWhitespace(e.card.cardholderName)?e.card.cardholderName=t.value:"ccNumber"===t.type&&this.isNullOrWhitespace(e.card.number)?(e.card.number=t.value,e.card.brand=this.getCardBrand(e.card.number)):"ccCvc"===t.type&&this.isNullOrWhitespace(e.card.code)?e.card.code=t.value:"ccExpiry"===t.type&&this.isNullOrWhitespace(e.card.expYear)&&this.setCardExpiration(e,t.value)||this.processKvp(e,t.label,t.value,1===t.sensitive?r.FieldType.Hidden:r.FieldType.Text))}))}processNote(e,t){t.forEach((t=>{this.isNullOrWhitespace(t.value)||"section"===t.type||this.processKvp(e,t.label,t.value,1===t.sensitive?r.FieldType.Hidden:r.FieldType.Text)}))}buildFolderTree(e){if(null==e)return[];const t=[],n=new Map([]);return e.forEach((e=>{n.set(e.uuid,e),e.children=[]})),e.forEach((e=>{null!=e.parent_uuid&&""!==e.parent_uuid&&n.has(e.parent_uuid)?n.get(e.parent_uuid).children.push(e):t.push(e)})),t}flattenFolderTree(e,t,n){null!=t&&t.forEach((t=>{if(null!=t.title&&""!==t.title.trim()){let i=t.title.trim();null!=e&&""!==e.trim()&&(i=e+"/"+i),n.set(t.uuid,i),null!=t.children&&0!==t.children.length&&this.flattenFolderTree(i,t.children,n)}}))}}t.EnpassJsonImporter=c},62709:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FirefoxCsvImporter=void 0;const i=n(2859),r=n(5957);class o extends r.BaseImporter{parse(e){const t=new i.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.filter((e=>"chrome://FirefoxAccounts"!==e.url)).forEach((e=>{const n=this.initLoginCipher(),i=this.getValueOrDefault(e.url,this.getValueOrDefault(e.hostname));n.name=this.getValueOrDefault(this.nameFromUrl(i),"--"),n.login.username=this.getValueOrDefault(e.username),n.login.password=this.getValueOrDefault(e.password),n.login.uris=this.makeUriArray(i),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.FirefoxCsvImporter=o},47340:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FSecureFskImporter=void 0;const i=n(32773),r=n(2859),o=n(91766),a=n(5957);class s extends a.BaseImporter{parse(e){const t=new r.ImportResult,n=JSON.parse(e);if(null==n||null==n.data)return t.success=!1,Promise.resolve(t);for(const r in n.data){if(!n.data.hasOwnProperty(r))continue;const e=n.data[r],a=this.initLoginCipher();if(a.name=this.getValueOrDefault(e.service),a.notes=this.getValueOrDefault(e.notes),"website"===e.style||"globe"===e.style)a.login.username=this.getValueOrDefault(e.username),a.login.password=this.getValueOrDefault(e.password),a.login.uris=this.makeUriArray(e.url);else{if("creditcard"!==e.style)continue;a.type=i.CipherType.Card,a.card=new o.CardView,a.card.cardholderName=this.getValueOrDefault(e.username),a.card.number=this.getValueOrDefault(e.creditNumber),a.card.brand=this.getCardBrand(a.card.number),a.card.code=this.getValueOrDefault(e.creditCvv),this.isNullOrWhitespace(e.creditExpiry)||this.setCardExpiration(a,e.creditExpiry)||this.processKvp(a,"Expiration",e.creditExpiry),this.isNullOrWhitespace(e.password)||this.processKvp(a,"PIN",e.password)}this.convertToNoteIfNeeded(a),this.cleanupCipher(a),t.ciphers.push(a)}return t.success=!0,Promise.resolve(t)}}t.FSecureFskImporter=s},72378:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GnomeJsonImporter=void 0;const i=n(2859),r=n(5957);class o extends r.BaseImporter{parse(e){const t=new i.ImportResult,n=JSON.parse(e);if(null==n||0===Object.keys(n).length)return t.success=!1,Promise.resolve(t);for(const i in n)n.hasOwnProperty(i)&&!this.isNullOrWhitespace(i)&&0!==n[i].length&&n[i].forEach((e=>{if(this.isNullOrWhitespace(e.display_name)||0!==e.display_name.indexOf("http"))return;this.processFolder(t,i);const n=this.initLoginCipher();if(n.name=e.display_name.replace("http://","").replace("https://",""),n.name.length>30&&(n.name=n.name.substring(0,30)),n.login.password=this.getValueOrDefault(e.secret),n.login.uris=this.makeUriArray(e.display_name),null!=e.attributes){n.login.username=null!=e.attributes?this.getValueOrDefault(e.attributes.username_value):null;for(const t in e.attributes)e.attributes.hasOwnProperty(t)&&"username_value"!==t&&"xdg:schema"!==t&&this.processKvp(n,t,e.attributes[t])}this.convertToNoteIfNeeded(n),this.cleanupCipher(n),t.ciphers.push(n)}));return this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t)}}t.GnomeJsonImporter=o},89696:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImportError=void 0;class n extends Error{constructor(e,t=!1){super(e),this.passwordRequired=t}}t.ImportError=n},16164:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KasperskyTxtImporter=void 0;const i=n(2859),r=n(5957),o="Notes\n\n",a="Applications\n\n",s="Websites\n\n",l="\n---\n";class c extends r.BaseImporter{parse(e){const t=new i.ImportResult;let n,r,l,c=this.splitNewLine(e).join("\n");if(-1!==c.indexOf(o)){const e=c.split(o);e.length>1&&(c=e[0],n=e[1])}if(-1!==c.indexOf(a)){const e=c.split(a);e.length>1&&(c=e[0],r=e[1])}if(0===c.indexOf(s)){const e=c.split(s);e.length>1&&(c=e[0],l=e[1])}const d=this.parseDataCategory(n),p=this.parseDataCategory(r),u=this.parseDataCategory(l);return d.forEach((e=>{const n=this.initLoginCipher();n.name=this.getValueOrDefault(e.get("Name")),n.notes=this.getValueOrDefault(e.get("Text")),this.cleanupCipher(n),t.ciphers.push(n)})),u.concat(p).forEach((e=>{const n=this.initLoginCipher(),i=e.has("Website name")?"Website name":"Application";n.name=this.getValueOrDefault(e.get(i),""),this.isNullOrWhitespace(e.get("Login name"))||(this.isNullOrWhitespace(n.name)||(n.name+=": "),n.name+=e.get("Login name")),n.notes=this.getValueOrDefault(e.get("Comment")),e.has("Website URL")&&(n.login.uris=this.makeUriArray(e.get("Website URL"))),n.login.username=this.getValueOrDefault(e.get("Login")),n.login.password=this.getValueOrDefault(e.get("Password")),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t)}parseDataCategory(e){if(this.isNullOrWhitespace(e)||-1===e.indexOf(l))return[];const t=[];return e.split(l).forEach((e=>{if(-1===e.indexOf("\n"))return;const n=new Map;let i,r;e.split("\n").forEach((e=>{if(null!=i)return void(i+="\n"+e);const t=e.indexOf(":");let o,a;-1!==t&&(o=e.substring(0,t),e.length>t+1&&(a=e.substring(t+2)),null!=o&&n.set(o,a),"Comment"!==o&&"Text"!==o||(i=a,r=o))})),null!=i&&null!=r&&n.set(r,i),0!==n.size&&t.push(n)})),t}}t.KasperskyTxtImporter=c},86419:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeePass2XmlImporter=void 0;const i=n(67577),r=n(2859),o=n(36914),a=n(5957);class s extends a.BaseImporter{constructor(){super(...arguments),this.result=new r.ImportResult}parse(e){const t=this.parseXml(e);if(null==t)return this.result.success=!1,Promise.resolve(this.result);const n=t.querySelector("KeePassFile > Root > Group");return null==n?(this.result.errorMessage="Missing `KeePassFile > Root > Group` node.",this.result.success=!1,Promise.resolve(this.result)):(this.traverse(n,!0,""),this.organization&&this.moveFoldersToCollections(this.result),this.result.success=!0,Promise.resolve(this.result))}traverse(e,t,n){const r=this.result.folders.length;let a=n;if(!t){""!==a&&(a+="/");const t=this.querySelectorDirectChild(e,"Name");a+=null==t?"-":t.textContent;const n=new o.FolderView;n.name=a,this.result.folders.push(n)}this.querySelectorAllDirectChild(e,"Entry").forEach((e=>{const n=this.result.ciphers.length,o=this.initLoginCipher();this.querySelectorAllDirectChild(e,"String").forEach((e=>{const t=this.querySelectorDirectChild(e,"Value"),n=null!=t?t.textContent:null;if(this.isNullOrWhitespace(n))return;const r=this.querySelectorDirectChild(e,"Key"),a=null!=r?r.textContent:null;if("URL"===a)o.login.uris=this.makeUriArray(n);else if("UserName"===a)o.login.username=n;else if("Password"===a)o.login.password=n;else if("otp"===a)o.login.totp=n.replace("key=","");else if("Title"===a)o.name=n;else if("Notes"===a)o.notes+=n+"\n";else{let e=i.FieldType.Text;const r=t.attributes;r.length>0&&null!=r.ProtectInMemory&&"True"===r.ProtectInMemory.value&&(e=i.FieldType.Hidden),this.processKvp(o,a,n,e)}})),this.cleanupCipher(o),this.result.ciphers.push(o),t||this.result.folderRelationships.push([n,r])})),this.querySelectorAllDirectChild(e,"Group").forEach((e=>{this.traverse(e,!1,a)}))}}t.KeePass2XmlImporter=s},68781:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeePassXCsvImporter=void 0;const i=n(2859),r=n(5957);class o extends r.BaseImporter{parse(e){const t=new i.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{if(this.isNullOrWhitespace(e.Title))return;e.Group=!this.isNullOrWhitespace(e.Group)&&e.Group.startsWith("Root/")?e.Group.replace("Root/",""):e.Group;const n=this.isNullOrWhitespace(e.Group)?null:e.Group;this.processFolder(t,n);const i=this.initLoginCipher();i.notes=this.getValueOrDefault(e.Notes),i.name=this.getValueOrDefault(e.Title,"--"),i.login.username=this.getValueOrDefault(e.Username),i.login.password=this.getValueOrDefault(e.Password),i.login.uris=this.makeUriArray(e.URL),this.cleanupCipher(i),t.ciphers.push(i)})),this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t))}}t.KeePassXCsvImporter=o},64521:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeeperCsvImporter=void 0;const i=n(2859),r=n(5957);class o extends r.BaseImporter{parse(e){const t=new i.ImportResult,n=this.parseCsv(e,!1);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{if(e.length<6)return;this.processFolder(t,e[0]);const n=this.initLoginCipher();if(n.notes=this.getValueOrDefault(e[5])+"\n",n.name=this.getValueOrDefault(e[1],"--"),n.login.username=this.getValueOrDefault(e[2]),n.login.password=this.getValueOrDefault(e[3]),n.login.uris=this.makeUriArray(e[4]),e.length>7)for(let t=7;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LastPassCsvImporter=void 0;const i=n(32773),r=n(76716),o=n(2859),a=n(91766),s=n(97144),l=n(36914),c=n(48830),d=n(28331),p=n(99364),u=n(5957);class m extends u.BaseImporter{parse(e){const t=new o.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{const n=t.ciphers.length;let r=t.folders.length,o=e.grouping;null!=o&&(o=o.replace(/\\/g,"/").replace(/[\x00-\x1F\x7F-\x9F]/g,""));const a="(none)"!==this.getValueOrDefault(o,"(none)");let s=a;if(a)for(let i=0;i-1){const n=e.ccexp.split("-");n.length>1&&(t.expYear=n[0],t.expMonth=n[1],2===t.expMonth.length&&"0"===t.expMonth[0]&&(t.expMonth=t.expMonth[1]))}return t}parseIdentity(e){const t=new c.IdentityView;return t.title=this.getValueOrDefault(e.title),t.firstName=this.getValueOrDefault(e.firstname),t.middleName=this.getValueOrDefault(e.middlename),t.lastName=this.getValueOrDefault(e.lastname),t.username=this.getValueOrDefault(e.username),t.company=this.getValueOrDefault(e.company),t.ssn=this.getValueOrDefault(e.ssn),t.address1=this.getValueOrDefault(e.address1),t.address2=this.getValueOrDefault(e.address2),t.address3=this.getValueOrDefault(e.address3),t.city=this.getValueOrDefault(e.city),t.state=this.getValueOrDefault(e.state),t.postalCode=this.getValueOrDefault(e.zip),t.country=this.getValueOrDefault(e.country),t.email=this.getValueOrDefault(e.email),t.phone=this.getValueOrDefault(e.phone),this.isNullOrWhitespace(t.title)||(t.title=t.title.charAt(0).toUpperCase()+t.title.slice(1)),t}parseSecureNote(e,t){const n=this.splitNewLine(e.extra);let o=!1;if(n.length){const e=n[0].split(":");if(e.length>1&&"NoteType"===e[0]&&("Credit Card"===e[1]||"Address"===e[1])){if("Credit Card"===e[1]){const e=this.parseSecureNoteMapping(t,n,{Number:"number","Name on Card":"cardholderName","Security Code":"code","Expiration Date":"expMonth"});if(this.isNullOrWhitespace(e.expMonth)||","===e.expMonth)e.expMonth=void 0;else{const[t,n]=e.expMonth.split(",");if(this.isNullOrWhitespace(t))e.expMonth=void 0;else{const n=new Date(Date.parse(t.trim()+" 1, 2012")).getMonth()+1;isNaN(n)?e.expMonth=void 0:e.expMonth=n.toString()}this.isNullOrWhitespace(n)||(e.expYear=n)}t.type=i.CipherType.Card,t.card=e}else if("Address"===e[1]){const e=this.parseSecureNoteMapping(t,n,{Title:"title","First Name":"firstName","Last Name":"lastName","Middle Name":"middleName",Company:"company","Address 1":"address1","Address 2":"address2","Address 3":"address3","City / Town":"city",State:"state","Zip / Postal Code":"postalCode",Country:"country","Email Address":"email",Username:"username"});t.type=i.CipherType.Identity,t.identity=e}o=!0}}o||(t.secureNote=new p.SecureNoteView,t.secureNote.type=r.SecureNoteType.Generic,t.notes=this.getValueOrDefault(e.extra))}parseSecureNoteMapping(e,t,n){const i={};let r=!1;return t.forEach((t=>{let o=null,a=null;if(!r){if(this.isNullOrWhitespace(t))return;const e=t.indexOf(":");if(-1===e?o=t:(o=t.substring(0,e),t.length>e&&(a=t.substring(e+1))),this.isNullOrWhitespace(o)||this.isNullOrWhitespace(a)||"NoteType"===o)return}r?e.notes+="\n"+t:"Notes"===o?(this.isNullOrWhitespace(e.notes)?e.notes=a:e.notes+="\n"+a,r=!0):n.hasOwnProperty(o)?i[n[o]]=a:this.processKvp(e,o,a)})),i}}t.LastPassCsvImporter=m},78103:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogMeOnceCsvImporter=void 0;const i=n(2859),r=n(5957);class o extends r.BaseImporter{parse(e){const t=new i.ImportResult,n=this.parseCsv(e,!1);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{if(e.length<4)return;const n=this.initLoginCipher();n.name=this.getValueOrDefault(e[0],"--"),n.login.username=this.getValueOrDefault(e[2]),n.login.password=this.getValueOrDefault(e[3]),n.login.uris=this.makeUriArray(e[1]),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.LogMeOnceCsvImporter=o},52580:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MeldiumCsvImporter=void 0;const i=n(2859),r=n(5957);class o extends r.BaseImporter{parse(e){const t=new i.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{const n=this.initLoginCipher();n.name=this.getValueOrDefault(e.DisplayName,"--"),n.notes=this.getValueOrDefault(e.Notes),n.login.username=this.getValueOrDefault(e.UserName),n.login.password=this.getValueOrDefault(e.Password),n.login.uris=this.makeUriArray(e.Url),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.MeldiumCsvImporter=o},39510:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MSecureCsvImporter=void 0;const i=n(32773),r=n(76716),o=n(2859),a=n(99364),s=n(5957);class l extends s.BaseImporter{parse(e){const t=new o.ImportResult,n=this.parseCsv(e,!1);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{if(e.length<3)return;const n="Unassigned"!==this.getValueOrDefault(e[0],"Unassigned")?e[0]:null;this.processFolder(t,n);const o=this.initLoginCipher();if(o.name=this.getValueOrDefault(e[2],"--"),"Web Logins"===e[1]||"Login"===e[1])o.login.uris=this.makeUriArray(e[4]),o.login.username=this.getValueOrDefault(e[5]),o.login.password=this.getValueOrDefault(e[6]),o.notes=this.isNullOrWhitespace(e[3])?null:e[3].split("\\n").join("\n");else if(e.length>3){o.type=i.CipherType.SecureNote,o.secureNote=new a.SecureNoteView,o.secureNote.type=r.SecureNoteType.Generic;for(let t=3;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MykiCsvImporter=void 0;const i=n(32773),r=n(76716),o=n(2859),a=n(91766),s=n(48830),l=n(99364),c=n(5957),d=["nickname","additionalInfo"],p=new Set(d.concat(["url","username","password","twofaSecret"])),u=new Set(d.concat(["cardNumber","cardName","exp_month","exp_year","cvv"])),m=new Set(d.concat(["title","firstName","middleName","lastName","email","firstAddressLine","secondAddressLine","city","country","zipCode"])),h=new Set(d.concat(["idName","idNumber","idCountry"])),v=new Set(d.concat(["authToken"])),f=new Set(d.concat(["content"]));class g extends c.BaseImporter{parse(e){const t=new o.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{const n=this.initLoginCipher();if(n.name=this.getValueOrDefault(e.nickname,"--"),n.notes=this.getValueOrDefault(e.additionalInfo),void 0!==e.url)n.login.uris=this.makeUriArray(e.url),n.login.username=this.getValueOrDefault(e.username),n.login.password=this.getValueOrDefault(e.password),n.login.totp=this.getValueOrDefault(e.twofaSecret),this.importUnmappedFields(n,e,p);else if(void 0!==e.authToken)n.login.totp=this.getValueOrDefault(e.authToken),this.importUnmappedFields(n,e,v);else if(void 0!==e.cardNumber)n.card=new a.CardView,n.type=i.CipherType.Card,n.card.cardholderName=this.getValueOrDefault(e.cardName),n.card.number=this.getValueOrDefault(e.cardNumber),n.card.brand=this.getCardBrand(n.card.number),n.card.expMonth=this.getValueOrDefault(e.exp_month),n.card.expYear=this.getValueOrDefault(e.exp_year),n.card.code=this.getValueOrDefault(e.cvv),this.importUnmappedFields(n,e,u);else if(void 0!==e.firstName)n.identity=new s.IdentityView,n.type=i.CipherType.Identity,n.identity.title=this.getValueOrDefault(e.title),n.identity.firstName=this.getValueOrDefault(e.firstName),n.identity.middleName=this.getValueOrDefault(e.middleName),n.identity.lastName=this.getValueOrDefault(e.lastName),n.identity.phone=this.getValueOrDefault(e.number),n.identity.email=this.getValueOrDefault(e.email),n.identity.address1=this.getValueOrDefault(e.firstAddressLine),n.identity.address2=this.getValueOrDefault(e.secondAddressLine),n.identity.city=this.getValueOrDefault(e.city),n.identity.country=this.getValueOrDefault(e.country),n.identity.postalCode=this.getValueOrDefault(e.zipCode),this.importUnmappedFields(n,e,m);else if(void 0!==e.idType){switch(n.identity=new s.IdentityView,n.type=i.CipherType.Identity,this.processFullName(n,e.idName),n.identity.country=this.getValueOrDefault(e.idCountry),e.idType){case"Passport":n.identity.passportNumber=e.idNumber;break;case"Social Security":n.identity.ssn=e.idNumber;break;default:n.identity.licenseNumber=e.idNumber}this.importUnmappedFields(n,e,h)}else{if(void 0===e.content)return;n.secureNote=new l.SecureNoteView,n.type=i.CipherType.SecureNote,n.secureNote.type=r.SecureNoteType.Generic,n.notes=this.getValueOrDefault(e.content),this.importUnmappedFields(n,e,f)}this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}importUnmappedFields(e,t,n){Object.keys(t).filter((e=>!n.has(e))).forEach((n=>{const i=t;this.processKvp(e,n,i[n])}))}}t.MykiCsvImporter=g},82530:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NordPassCsvImporter=void 0;const i=n(32773),r=n(76716),o=n(2859),a=n(97144),s=n(28331),l=n(5957);class c extends l.BaseImporter{parse(e){const t=new o.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{const n=this.evaluateType(e);if(void 0===n)return;this.organization||this.processFolder(t,e.folder);const o=new a.CipherView;switch(o.name=this.getValueOrDefault(e.name,"--"),o.notes=this.getValueOrDefault(e.note),n){case i.CipherType.Login:o.type=i.CipherType.Login,o.login=new s.LoginView,o.login.username=this.getValueOrDefault(e.username),o.login.password=this.getValueOrDefault(e.password),o.login.uris=this.makeUriArray(e.url);break;case i.CipherType.Card:o.type=i.CipherType.Card,o.card.cardholderName=this.getValueOrDefault(e.cardholdername),o.card.number=this.getValueOrDefault(e.cardnumber),o.card.code=this.getValueOrDefault(e.cvc),o.card.brand=this.getCardBrand(o.card.number),this.setCardExpiration(o,e.expirydate);break;case i.CipherType.Identity:o.type=i.CipherType.Identity,this.processFullName(o,this.getValueOrDefault(e.full_name)),o.identity.address1=this.getValueOrDefault(e.address1),o.identity.address2=this.getValueOrDefault(e.address2),o.identity.city=this.getValueOrDefault(e.city),o.identity.state=this.getValueOrDefault(e.state),o.identity.postalCode=this.getValueOrDefault(e.zipcode),o.identity.country=this.getValueOrDefault(e.country),null!=o.identity.country&&(o.identity.country=o.identity.country.toUpperCase()),o.identity.email=this.getValueOrDefault(e.email),o.identity.phone=this.getValueOrDefault(e.phone_number);break;case i.CipherType.SecureNote:o.type=i.CipherType.SecureNote,o.secureNote.type=r.SecureNoteType.Generic}this.cleanupCipher(o),t.ciphers.push(o)})),this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t))}evaluateType(e){return this.isNullOrWhitespace(e.username)?this.isNullOrWhitespace(e.cardnumber)?this.isNullOrWhitespace(e.full_name)?this.isNullOrWhitespace(e.note)?void 0:i.CipherType.SecureNote:i.CipherType.Identity:i.CipherType.Card:i.CipherType.Login}}t.NordPassCsvImporter=c},66402:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherImportContext=void 0;t.CipherImportContext=class{constructor(e,t,n){this.importRecord=e,this.property=t,this.cipher=n,this.lowerProperty=t.toLowerCase()}}},80414:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OnePassword1PifImporter=void 0;const i=n(32773),r=n(67577),o=n(76716),a=n(2859),s=n(91766),l=n(48830),c=n(40170),d=n(99364),p=n(5957);class u extends p.BaseImporter{constructor(){super(...arguments),this.result=new a.ImportResult}parse(e){return e.split(this.newLineRegex).forEach((e=>{if(this.isNullOrWhitespace(e)||"{"!==e[0])return;const t=JSON.parse(e);if(!0===t.trashed)return;const n=this.initLoginCipher();this.isNullOrWhitespace(t.hmac)?this.processStandardItem(t,n):this.processWinOpVaultItem(t,n),this.convertToNoteIfNeeded(n),this.cleanupCipher(n),this.result.ciphers.push(n)})),this.result.success=!0,Promise.resolve(this.result)}processWinOpVaultItem(e,t){if(null!=e.overview&&(t.name=this.getValueOrDefault(e.overview.title),null!=e.overview.URLs)){const n=[];e.overview.URLs.forEach((e=>{this.isNullOrWhitespace(e.u)||n.push(e.u)})),t.login.uris=this.makeUriArray(n)}null!=e.details&&(null!=e.details.passwordHistory&&this.parsePasswordHistory(e.details.passwordHistory,t),this.isNullOrWhitespace(e.details.ccnum)&&this.isNullOrWhitespace(e.details.cvv)?this.isNullOrWhitespace(e.details.firstname)&&this.isNullOrWhitespace(e.details.address1)||(t.type=i.CipherType.Identity,t.identity=new l.IdentityView):(t.type=i.CipherType.Card,t.card=new s.CardView),t.type!==i.CipherType.Login||this.isNullOrWhitespace(e.details.password)||(t.login.password=e.details.password),this.isNullOrWhitespace(e.details.notesPlain)||(t.notes=e.details.notesPlain.split(this.newLineRegex).join("\n")+"\n"),null!=e.details.fields&&this.parseFields(e.details.fields,t,"designation","value","name"),null!=e.details.sections&&e.details.sections.forEach((e=>{null!=e.fields&&this.parseFields(e.fields,t,"n","v","t")})))}processStandardItem(e,t){if(t.favorite=!(!e.openContents||!e.openContents.faveIndex),t.name=this.getValueOrDefault(e.title),"securenotes.SecureNote"===e.typeName?(t.type=i.CipherType.SecureNote,t.secureNote=new d.SecureNoteView,t.secureNote.type=o.SecureNoteType.Generic):"wallet.financial.CreditCard"===e.typeName?(t.type=i.CipherType.Card,t.card=new s.CardView):"identities.Identity"===e.typeName?(t.type=i.CipherType.Identity,t.identity=new l.IdentityView):t.login.uris=this.makeUriArray(e.location),null!=e.secureContents){if(null!=e.secureContents.passwordHistory&&this.parsePasswordHistory(e.secureContents.passwordHistory,t),this.isNullOrWhitespace(e.secureContents.notesPlain)||(t.notes=e.secureContents.notesPlain.split(this.newLineRegex).join("\n")+"\n"),t.type===i.CipherType.Login&&(this.isNullOrWhitespace(e.secureContents.password)||(t.login.password=e.secureContents.password),null!=e.secureContents.URLs)){const n=[];e.secureContents.URLs.forEach((e=>{this.isNullOrWhitespace(e.url)||n.push(e.url)})),n.length>0&&(t.login.uris=this.makeUriArray(n))}null!=e.secureContents.fields&&this.parseFields(e.secureContents.fields,t,"designation","value","name"),null!=e.secureContents.sections&&e.secureContents.sections.forEach((e=>{null!=e.fields&&this.parseFields(e.fields,t,"n","v","t")}))}}parsePasswordHistory(e,t){const n=e.length>5?5:e.length;t.passwordHistory=e.filter((e=>!this.isNullOrWhitespace(e.value)&&null!=e.time)).sort(((e,t)=>t.time-e.time)).slice(0,n).map((e=>{const t=new c.PasswordHistoryView;return t.password=e.value,t.lastUsedDate=new Date((""+e.time).length>=13?e.time:1e3*e.time),t}))}parseFields(e,t,n,o,a){e.forEach((e=>{if(null==e[o]||""===e[o].toString().trim())return;const s="date"===e.k?new Date(1e3*e[o]).toUTCString():e[o].toString(),l=null!=e[n]?e[n].toString():null;if(t.type===i.CipherType.Login){if(this.isNullOrWhitespace(t.login.username)&&"username"===l)return void(t.login.username=s);if(this.isNullOrWhitespace(t.login.password)&&"password"===l)return void(t.login.password=s);if(this.isNullOrWhitespace(t.login.totp)&&null!=l&&l.startsWith("TOTP_"))return void(t.login.totp=s)}else if(t.type===i.CipherType.Card){if(this.isNullOrWhitespace(t.card.number)&&"ccnum"===l)return t.card.number=s,void(t.card.brand=this.getCardBrand(s));if(this.isNullOrWhitespace(t.card.code)&&"cvv"===l)return void(t.card.code=s);if(this.isNullOrWhitespace(t.card.cardholderName)&&"cardholder"===l)return void(t.card.cardholderName=s);if(this.isNullOrWhitespace(t.card.expiration)&&"expiry"===l&&6===s.length)return t.card.expMonth=s.substr(4,2),"0"===t.card.expMonth[0]&&(t.card.expMonth=t.card.expMonth.substr(1,1)),void(t.card.expYear=s.substr(0,4));if("type"===l)return}else if(t.type===i.CipherType.Identity){const n=t.identity;if(this.isNullOrWhitespace(n.firstName)&&"firstname"===l)return void(n.firstName=s);if(this.isNullOrWhitespace(n.lastName)&&"lastname"===l)return void(n.lastName=s);if(this.isNullOrWhitespace(n.middleName)&&"initial"===l)return void(n.middleName=s);if(this.isNullOrWhitespace(n.phone)&&"defphone"===l)return void(n.phone=s);if(this.isNullOrWhitespace(n.company)&&"company"===l)return void(n.company=s);if(this.isNullOrWhitespace(n.email)&&"email"===l)return void(n.email=s);if(this.isNullOrWhitespace(n.username)&&"username"===l)return void(n.username=s);if("address"===l){const{street:t,city:i,country:r,zip:a}=e[o];return n.address1=this.getValueOrDefault(t),n.city=this.getValueOrDefault(i),this.isNullOrWhitespace(r)||(n.country=r.toUpperCase()),void(n.postalCode=this.getValueOrDefault(a))}}const c=this.isNullOrWhitespace(e[a])?"no_name":e[a];if("password"===c&&null!=t.passwordHistory&&t.passwordHistory.some((e=>e.password===s)))return;const d="concealed"===e.k?r.FieldType.Hidden:r.FieldType.Text;this.processKvp(t,c,s,d)}))}}t.OnePassword1PifImporter=u},42584:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OnePassword1PuxImporter=void 0;const i=n(34453),r=n(32773),o=n(67577),a=n(76716),s=n(2859),l=n(91766),c=n(48830),d=n(28331),p=n(40170),u=n(99364),m=n(5957),h=n(53776);class v extends m.BaseImporter{constructor(){super(...arguments),this.result=new s.ImportResult}parse(e){return JSON.parse(e).accounts[0].vaults.forEach((e=>{e.items.forEach((e=>{if(!0===e.trashed)return;const t=this.initLoginCipher(),n=e.categoryUuid;switch(n){case h.CategoryEnum.Login:case h.CategoryEnum.Database:case h.CategoryEnum.Password:case h.CategoryEnum.WirelessRouter:case h.CategoryEnum.Server:case h.CategoryEnum.API_Credential:t.type=r.CipherType.Login,t.login=new d.LoginView;break;case h.CategoryEnum.CreditCard:case h.CategoryEnum.BankAccount:t.type=r.CipherType.Card,t.card=new l.CardView;break;case h.CategoryEnum.SecureNote:case h.CategoryEnum.SoftwareLicense:case h.CategoryEnum.EmailAccount:case h.CategoryEnum.MedicalRecord:t.type=r.CipherType.SecureNote,t.secureNote=new u.SecureNoteView,t.secureNote.type=a.SecureNoteType.Generic;break;case h.CategoryEnum.Identity:case h.CategoryEnum.DriversLicense:case h.CategoryEnum.OutdoorLicense:case h.CategoryEnum.Membership:case h.CategoryEnum.Passport:case h.CategoryEnum.RewardsProgram:case h.CategoryEnum.SocialSecurityNumber:t.type=r.CipherType.Identity,t.identity=new c.IdentityView}t.favorite=1===e.favIndex,this.processOverview(e.overview,t),this.processLoginFields(e,t),this.processDetails(n,e.details,t),this.parsePasswordHistory(e.details.passwordHistory,t),this.processSections(n,e.details.sections,t),this.isNullOrWhitespace(e.details.notesPlain)||(t.notes=e.details.notesPlain.split(this.newLineRegex).join("\n")+"\n"),this.convertToNoteIfNeeded(t),this.cleanupCipher(t),this.result.ciphers.push(t)}))})),this.organization&&this.moveFoldersToCollections(this.result),this.result.success=!0,Promise.resolve(this.result)}processOverview(e,t){if(null!=e){if(t.name=this.getValueOrDefault(e.title),null!=e.urls){const n=[];e.urls.forEach((e=>{this.isNullOrWhitespace(e.url)||n.push(e.url)})),t.login.uris=this.makeUriArray(n)}if(null!=e.tags&&e.tags.length>0){const t=this.capitalize(e.tags[0]);this.processFolder(this.result,t)}}}capitalize(e){return e.trim().replace(/\w\S*/g,(e=>e.replace(/^\w/,(e=>e.toUpperCase()))))}processLoginFields(e,t){null!=e.details&&null!=e.details.loginFields&&0!==e.details.loginFields.length&&e.details.loginFields.forEach((e=>{if("username"===e.designation&&""!==e.value)return t.type=r.CipherType.Login,void(t.login.username=e.value);if("password"===e.designation&&""!==e.value)return t.type=r.CipherType.Login,void(t.login.password=e.value);let n=e.value,i=o.FieldType.Text;switch(e.fieldType){case h.LoginFieldTypeEnum.Password:i=o.FieldType.Hidden;break;case h.LoginFieldTypeEnum.CheckBox:n=""!==e.value?"true":"false",i=o.FieldType.Boolean}this.processKvp(t,e.name,n,i)}))}processDetails(e,t,n){e===h.CategoryEnum.Password&&null!=t&&(n.login.password=t.password)}processSections(e,t,n){null!=t&&0!==t.length&&t.forEach((t=>{null!=t.fields&&this.parseSectionFields(e,t.fields,n)}))}parseSectionFields(e,t,n){t.forEach((t=>{const a=Object.keys(t.value)[0],s=t;if(null==s.value||null==s.value[a]||""===s.value[a])return;const l=this.getFieldName(t.id,t.title),c=this.extractValue(t.value,a);if(n.type===r.CipherType.Login){if(this.fillLogin(t,c,n))return;switch(e){case h.CategoryEnum.Login:case h.CategoryEnum.Database:case h.CategoryEnum.EmailAccount:case h.CategoryEnum.WirelessRouter:break;case h.CategoryEnum.Server:if(this.isNullOrWhitespace(n.login.uri)&&"url"===t.id)return void(n.login.uris=this.makeUriArray(c));break;case h.CategoryEnum.API_Credential:if(this.fillApiCredentials(t,c,n))return}}else if(n.type===r.CipherType.Card){if(this.fillCreditCard(t,c,n))return;if(e===h.CategoryEnum.BankAccount&&this.fillBankAccount(t,c,n))return}else if(n.type===r.CipherType.Identity){if(this.fillIdentity(t,c,n,a))return;if("address"===a){const{street:e,city:i,country:r,zip:o,state:a}=t.value.address;return n.identity.address1=this.getValueOrDefault(e),n.identity.city=this.getValueOrDefault(i),this.isNullOrWhitespace(r)||(n.identity.country=r.toUpperCase()),n.identity.postalCode=this.getValueOrDefault(o),void(n.identity.state=this.getValueOrDefault(a))}switch(e){case h.CategoryEnum.Identity:break;case h.CategoryEnum.DriversLicense:if(this.fillDriversLicense(t,c,n))return;break;case h.CategoryEnum.OutdoorLicense:if(this.fillOutdoorLicense(t,c,n))return;break;case h.CategoryEnum.Membership:if(this.fillMembership(t,c,n))return;break;case h.CategoryEnum.Passport:if(this.fillPassport(t,c,n))return;break;case h.CategoryEnum.RewardsProgram:if(this.fillRewardsProgram(t,c,n))return;break;case h.CategoryEnum.SocialSecurityNumber:if(this.fillSSN(t,c,n))return}}if("email"===a){const{email_address:e,provider:i}=t.value.email;return this.processKvp(n,l,e,o.FieldType.Text),void this.processKvp(n,"provider",i,o.FieldType.Text)}if("password"===t.title&&null!=n.passwordHistory&&n.passwordHistory.some((e=>e.password===c)))return;t.guarded&&n.reprompt===i.CipherRepromptType.None&&(n.reprompt=i.CipherRepromptType.Password);const d="concealed"===a?o.FieldType.Hidden:o.FieldType.Text;this.processKvp(n,l,c,d)}))}getFieldName(e,t){return this.isNullOrWhitespace(t)?e:e.length>25&&RegExp(/[0-9]{2}[A-Z]{2}/,"i").test(e)?t:e}extractValue(e,t){return"date"===t?new Date(1e3*e.date).toUTCString():"monthYear"===t?e.monthYear.toString():e[t]}fillLogin(e,t,n){const i=this.getFieldName(e.id,e.title);return this.isNullOrWhitespace(n.login.username)&&"username"===i?(n.login.username=t,!0):this.isNullOrWhitespace(n.login.password)&&"password"===i?(n.login.password=t,!0):!(!this.isNullOrWhitespace(n.login.totp)||null==e.id||!e.id.startsWith("TOTP_"))&&(n.login.totp=t,!0)}fillApiCredentials(e,t,n){const i=this.getFieldName(e.id,e.title);return this.isNullOrWhitespace(n.login.password)&&"credential"===i?(n.login.password=t,!0):!(!this.isNullOrWhitespace(n.login.uri)||"hostname"!==i)&&(n.login.uris=this.makeUriArray(t),!0)}fillCreditCard(e,t,n){if(this.isNullOrWhitespace(n.card.number)&&"ccnum"===e.id)return n.card.number=t,n.card.brand=this.getCardBrand(t),!0;if(this.isNullOrWhitespace(n.card.code)&&"cvv"===e.id)return n.card.code=t,!0;if(this.isNullOrWhitespace(n.card.cardholderName)&&"cardholder"===e.id)return n.card.cardholderName=t,!0;if(this.isNullOrWhitespace(n.card.expiration)&&"expiry"===e.id){const e=t.toString().trim();return n.card.expMonth=e.substring(4,6),"0"===n.card.expMonth[0]&&(n.card.expMonth=n.card.expMonth.substring(1,2)),n.card.expYear=e.substring(0,4),!0}return"type"===e.id}fillBankAccount(e,t,n){return!(!this.isNullOrWhitespace(n.card.cardholderName)||"owner"!==e.id)&&(n.card.cardholderName=t,!0)}fillIdentity(e,t,n,i){if(this.isNullOrWhitespace(n.identity.firstName)&&"firstname"===e.id)return n.identity.firstName=t,!0;if(this.isNullOrWhitespace(n.identity.lastName)&&"lastname"===e.id)return n.identity.lastName=t,!0;if(this.isNullOrWhitespace(n.identity.middleName)&&"initial"===e.id)return n.identity.middleName=t,!0;if(this.isNullOrWhitespace(n.identity.phone)&&"defphone"===e.id)return n.identity.phone=t,!0;if(this.isNullOrWhitespace(n.identity.company)&&"company"===e.id)return n.identity.company=t,!0;if(this.isNullOrWhitespace(n.identity.email)){if("email"===i){const{email_address:t,provider:i}=e.value.email;return n.identity.email=this.getValueOrDefault(t),this.processKvp(n,"provider",i,o.FieldType.Text),!0}if("email"===e.id)return n.identity.email=t,!0}return!(!this.isNullOrWhitespace(n.identity.username)||"username"!==e.id)&&(n.identity.username=t,!0)}fillDriversLicense(e,t,n){return this.isNullOrWhitespace(n.identity.firstName)&&"fullname"===e.id?(this.processFullName(n,t),!0):this.isNullOrWhitespace(n.identity.address1)&&"address"===e.id?(n.identity.address1=t,!0):this.isNullOrWhitespace(n.identity.country)&&"country"===e.id?(n.identity.country=t,!0):this.isNullOrWhitespace(n.identity.state)&&"state"===e.id?(n.identity.state=t,!0):!(!this.isNullOrWhitespace(n.identity.licenseNumber)||"number"!==e.id)&&(n.identity.licenseNumber=t,!0)}fillOutdoorLicense(e,t,n){return this.isNullOrWhitespace(n.identity.firstName)&&"name"===e.id?(this.processFullName(n,t),!0):this.isNullOrWhitespace(n.identity.country)&&"country"===e.id?(n.identity.country=t,!0):!(!this.isNullOrWhitespace(n.identity.state)||"state"!==e.id)&&(n.identity.state=t,!0)}fillMembership(e,t,n){return this.isNullOrWhitespace(n.identity.firstName)&&"member_name"===e.id?(this.processFullName(n,t),!0):this.isNullOrWhitespace(n.identity.company)&&"org_name"===e.id?(n.identity.company=t,!0):!(!this.isNullOrWhitespace(n.identity.phone)||"phone"!==e.id)&&(n.identity.phone=t,!0)}fillPassport(e,t,n){return this.isNullOrWhitespace(n.identity.firstName)&&"fullname"===e.id?(this.processFullName(n,t),!0):this.isNullOrWhitespace(n.identity.country)&&"issuing_country"===e.id?(n.identity.country=t,!0):!(!this.isNullOrWhitespace(n.identity.passportNumber)||"number"!==e.id)&&(n.identity.passportNumber=t,!0)}fillRewardsProgram(e,t,n){return this.isNullOrWhitespace(n.identity.firstName)&&"member_name"===e.id?(this.processFullName(n,t),!0):!(!this.isNullOrWhitespace(n.identity.company)||"company_name"!==e.id)&&(n.identity.company=t,!0)}fillSSN(e,t,n){return this.isNullOrWhitespace(n.identity.firstName)&&"name"===e.id?(this.processFullName(n,t),!0):!(!this.isNullOrWhitespace(n.identity.ssn)||"number"!==e.id)&&(n.identity.ssn=t,!0)}parsePasswordHistory(e,t){if(null==e||0===e.length)return;const n=e.length>5?5:e.length;t.passwordHistory=e.filter((e=>!this.isNullOrWhitespace(e.value)&&null!=e.time)).sort(((e,t)=>t.time-e.time)).slice(0,n).map((e=>{const t=new p.PasswordHistoryView;return t.password=e.value,t.lastUsedDate=new Date((""+e.time).length>=13?e.time:1e3*e.time),t}))}}t.OnePassword1PuxImporter=v},77674:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OnePasswordCsvImporter=t.IgnoredProperties=void 0;const i=n(32773),r=n(67577),o=n(2859),a=n(5957),s=n(66402);t.IgnoredProperties=["ainfo","autosubmit","notesplain","ps","scope","tags","title","uuid","notes"];class l extends a.BaseImporter{constructor(){super(...arguments),this.loginPropertyParsers=[this.setLoginUsername,this.setLoginPassword,this.setLoginUris],this.creditCardPropertyParsers=[this.setCreditCardNumber,this.setCreditCardVerification,this.setCreditCardCardholderName,this.setCreditCardExpiry],this.identityPropertyParsers=[this.setIdentityFirstName,this.setIdentityInitial,this.setIdentityLastName,this.setIdentityUserName,this.setIdentityEmail,this.setIdentityPhone,this.setIdentityCompany]}parse(e){const t=new o.ImportResult,n=this.parseCsv(e,!0,{quoteChar:'"',escapeChar:"\\"});return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{if(this.isNullOrWhitespace(this.getProp(e,"title")))return;const n=this.initLoginCipher();n.name=this.getValueOrDefault(this.getProp(e,"title"),"--"),this.setNotes(e,n),this.setCipherType(e,n);let r=null;for(const t in e){if(!e.hasOwnProperty(t)||this.isNullOrWhitespace(e[t]))continue;const o=new s.CipherImportContext(e,t,n);n.type===i.CipherType.Login&&this.setKnownLoginValue(o)||(n.type===i.CipherType.Card&&this.setKnownCreditCardValue(o)||n.type===i.CipherType.Identity&&this.setKnownIdentityValue(o)||(r=this.setUnknownValue(o,r)))}n.type===i.CipherType.Login&&!this.isNullOrWhitespace(r)&&this.isNullOrWhitespace(n.login.username)&&-1===r.indexOf("://")&&(n.login.username=r),this.convertToNoteIfNeeded(n),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}getProp(e,t){return Object.entries(e).reduce(((e,t)=>(e[t[0].toLowerCase()]=t[1],e)),{})[t.toLowerCase()]}getPropByRegexp(e,t){const n=Object.keys(e).reduce(((e,n)=>(n.match(t)&&e.push(n),e)),[]);return 0===n.length?null:e[n[0]]}getPropIncluding(e,t){const n=Object.keys(e).reduce(((e,n)=>(n.toLowerCase().includes(t.toLowerCase())&&e.push(n),e)),[]);return 0===n.length?null:e[n[0]]}setNotes(e,t){t.notes=this.getValueOrDefault(this.getProp(e,"notesPlain"),"")+"\n"+this.getValueOrDefault(this.getProp(e,"notes"),"")+"\n",t.notes.trim()}setKnownLoginValue(e){return this.loginPropertyParsers.reduce(((t,n)=>(t||(t=n.bind(this)(e)),t)),!1)}setKnownCreditCardValue(e){return this.creditCardPropertyParsers.reduce(((t,n)=>(t||(t=n.bind(this)(e)),t)),!1)}setKnownIdentityValue(e){return this.identityPropertyParsers.reduce(((t,n)=>(t||(t=n.bind(this)(e)),t)),!1)}setUnknownValue(e,n){if(-1===t.IgnoredProperties.indexOf(e.lowerProperty)&&!e.lowerProperty.startsWith("section:")&&!e.lowerProperty.startsWith("section ")){if(null==n&&"email"===e.lowerProperty)return e.importRecord[e.property];if("created date"===e.lowerProperty||"modified date"===e.lowerProperty){const t=new Date(1e3*parseInt(e.importRecord[e.property],10)).toUTCString();return this.processKvp(e.cipher,"1Password "+e.property,t),null}e.lowerProperty.includes("password")||e.lowerProperty.includes("key")||e.lowerProperty.includes("secret")?this.processKvp(e.cipher,e.property,e.importRecord[e.property],r.FieldType.Hidden):this.processKvp(e.cipher,e.property,e.importRecord[e.property])}return null}setIdentityFirstName(e){return!(!this.isNullOrWhitespace(e.cipher.identity.firstName)||!e.lowerProperty.includes("first name"))&&(e.cipher.identity.firstName=e.importRecord[e.property],!0)}setIdentityInitial(e){return!(!this.isNullOrWhitespace(e.cipher.identity.middleName)||!e.lowerProperty.includes("initial"))&&(e.cipher.identity.middleName=e.importRecord[e.property],!0)}setIdentityLastName(e){return!(!this.isNullOrWhitespace(e.cipher.identity.lastName)||!e.lowerProperty.includes("last name"))&&(e.cipher.identity.lastName=e.importRecord[e.property],!0)}setIdentityUserName(e){return!(!this.isNullOrWhitespace(e.cipher.identity.username)||!e.lowerProperty.includes("username"))&&(e.cipher.identity.username=e.importRecord[e.property],!0)}setIdentityCompany(e){return!(!this.isNullOrWhitespace(e.cipher.identity.company)||!e.lowerProperty.includes("company"))&&(e.cipher.identity.company=e.importRecord[e.property],!0)}setIdentityPhone(e){return!(!this.isNullOrWhitespace(e.cipher.identity.phone)||!e.lowerProperty.includes("default phone"))&&(e.cipher.identity.phone=e.importRecord[e.property],!0)}setIdentityEmail(e){return!(!this.isNullOrWhitespace(e.cipher.identity.email)||!e.lowerProperty.includes("email"))&&(e.cipher.identity.email=e.importRecord[e.property],!0)}setCreditCardNumber(e){return!(!this.isNullOrWhitespace(e.cipher.card.number)||!e.lowerProperty.includes("number"))&&(e.cipher.card.number=e.importRecord[e.property],e.cipher.card.brand=this.getCardBrand(e.cipher.card.number),!0)}setCreditCardVerification(e){return!(!this.isNullOrWhitespace(e.cipher.card.code)||!e.lowerProperty.includes("verification number"))&&(e.cipher.card.code=e.importRecord[e.property],!0)}setCreditCardCardholderName(e){return!(!this.isNullOrWhitespace(e.cipher.card.cardholderName)||!e.lowerProperty.includes("cardholder name"))&&(e.cipher.card.cardholderName=e.importRecord[e.property],!0)}setCreditCardExpiry(e){return!(!this.isNullOrWhitespace(e.cipher.card.expiration)||!e.lowerProperty.includes("expiry date")||7!==e.importRecord[e.property].length)&&(e.cipher.card.expMonth=e.importRecord[e.property].substr(0,2),"0"===e.cipher.card.expMonth[0]&&(e.cipher.card.expMonth=e.cipher.card.expMonth.substr(1,1)),e.cipher.card.expYear=e.importRecord[e.property].substr(3,4),!0)}setLoginPassword(e){return!(!this.isNullOrWhitespace(e.cipher.login.password)||"password"!==e.lowerProperty)&&(e.cipher.login.password=e.importRecord[e.property],!0)}setLoginUsername(e){return!(!this.isNullOrWhitespace(e.cipher.login.username)||"username"!==e.lowerProperty)&&(e.cipher.login.username=e.importRecord[e.property],!0)}setLoginUris(e){if((null==e.cipher.login.uris||0===e.cipher.login.uris.length)&&"urls"===e.lowerProperty){const t=e.importRecord[e.property].split(this.newLineRegex);return e.cipher.login.uris=this.makeUriArray(t),!0}return"url"===e.lowerProperty&&(null==e.cipher.login.uris&&(e.cipher.login.uris=[]),e.cipher.login.uris.concat(this.makeUriArray(e.importRecord[e.property])),!0)}}t.OnePasswordCsvImporter=l},55529:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OnePasswordMacCsvImporter=void 0;const i=n(32773),r=n(91766),o=n(48830),a=n(77674);class s extends a.OnePasswordCsvImporter{setCipherType(e,t){switch(this.getValueOrDefault(this.getProp(e,"type"),"Login")){case"Credit Card":t.type=i.CipherType.Card,t.card=new r.CardView,a.IgnoredProperties.push("type");break;case"Identity":t.type=i.CipherType.Identity,t.identity=new o.IdentityView,a.IgnoredProperties.push("type");break;case"Login":case"Secure Note":a.IgnoredProperties.push("type")}}}t.OnePasswordMacCsvImporter=s},88755:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OnePasswordWinCsvImporter=void 0;const i=n(32773),r=n(91766),o=n(48830),a=n(28331),s=n(77674);class l extends s.OnePasswordCsvImporter{constructor(){super(),this.identityPropertyParsers.push(this.setIdentityAddress)}setCipherType(e,t){t.type=i.CipherType.Login,t.login=new a.LoginView,this.isNullOrWhitespace(this.getPropByRegexp(e,/\d+: number/i))||this.isNullOrWhitespace(this.getPropByRegexp(e,/\d+: expiry date/i))||(t.type=i.CipherType.Card,t.card=new r.CardView),this.isNullOrWhitespace(this.getPropByRegexp(e,/name \d+: first name/i))&&this.isNullOrWhitespace(this.getPropByRegexp(e,/name \d+: initial/i))&&this.isNullOrWhitespace(this.getPropByRegexp(e,/name \d+: last name/i))&&this.isNullOrWhitespace(this.getPropByRegexp(e,/internet \d+: email/i))||(t.type=i.CipherType.Identity,t.identity=new o.IdentityView)}setIdentityAddress(e){return!!e.lowerProperty.match(/address \d+: address/i)&&(this.processKvp(e.cipher,"address",e.importRecord[e.property]),!0)}setCreditCardExpiry(e){if(this.isNullOrWhitespace(e.cipher.card.expiration)&&e.lowerProperty.includes("expiry date")){const t=e.importRecord[e.property].split("/");return e.cipher.card.expMonth=t[0],"0"===e.cipher.card.expMonth[0]&&2===e.cipher.card.expMonth.length&&(e.cipher.card.expMonth=e.cipher.card.expMonth.substr(1,1)),e.cipher.card.expYear=t[2].length>4?t[2].substr(0,4):t[2],!0}return!1}}t.OnePasswordWinCsvImporter=l},53776:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoginFieldTypeEnum=t.CategoryEnum=void 0,function(e){e.Login="001",e.CreditCard="002",e.SecureNote="003",e.Identity="004",e.Password="005",e.Document="006",e.SoftwareLicense="100",e.BankAccount="101",e.Database="102",e.DriversLicense="103",e.OutdoorLicense="104",e.Membership="105",e.Passport="106",e.RewardsProgram="107",e.SocialSecurityNumber="108",e.WirelessRouter="109",e.Server="110",e.EmailAccount="111",e.API_Credential="112",e.MedicalRecord="113"}(t.CategoryEnum||(t.CategoryEnum={})),function(e){e.TextOrHtml="T",e.EmailAddress="E",e.URL="U",e.Number="N",e.Password="P",e.TextArea="A",e.PhoneNumber="T",e.CheckBox="C"}(t.LoginFieldTypeEnum||(t.LoginFieldTypeEnum={}))},60784:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PadlockCsvImporter=void 0;const i=n(2859),r=n(86001),o=n(5957);class a extends o.BaseImporter{parse(e){const t=new i.ImportResult,n=this.parseCsv(e,!1);if(null==n)return t.success=!1,Promise.resolve(t);let o=null;return n.forEach((e=>{if(null==o)return void(o=e.map((e=>e)));if(e.length<2||e.length!==o.length)return;if(!this.isNullOrWhitespace(e[1]))if(this.organization){e[1].split(",").forEach((e=>{e=e.trim();let n=!0,i=t.collections.length;for(let r=0;r0?n[0].trim():null;this.processFolder(t,i)}const n=this.initLoginCipher();n.name=this.getValueOrDefault(e[0],"--");for(let t=2;t-1?n.login.username=e[t]:this.passwordFieldNames.indexOf(i)>-1?n.login.password=e[t]:this.uriFieldNames.indexOf(i)>-1?n.login.uris=this.makeUriArray(e[t]):this.processKvp(n,o[t],e[t]))}this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t)}}t.PadlockCsvImporter=a},477:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PassKeepCsvImporter=void 0;const i=n(2859),r=n(5957);class o extends r.BaseImporter{parse(e){const t=new i.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{this.processFolder(t,this.getValue("category",e));const n=this.initLoginCipher();n.notes=this.getValue("description",e),n.name=this.getValueOrDefault(this.getValue("title",e),"--"),n.login.username=this.getValue("username",e),n.login.password=this.getValue("password",e),n.login.uris=this.makeUriArray(this.getValue("site",e)),this.processKvp(n,"Password 2",this.getValue("password2",e)),this.cleanupCipher(n),t.ciphers.push(n)})),this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t))}getValue(e,t){return this.getValueOrDefault(t[e],this.getValueOrDefault(t[" "+e]))}}t.PassKeepCsvImporter=o},91350:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PassmanJsonImporter=void 0;const i=n(2859),r=n(5957);class o extends r.BaseImporter{parse(e){const t=new i.ImportResult,n=JSON.parse(e);return null==n||0===n.length?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{if(null!=e.tags&&e.tags.length>0){const n=e.tags[0].text;this.processFolder(t,n)}const n=this.initLoginCipher();n.name=e.label,n.login.username=this.getValueOrDefault(e.username),this.isNullOrWhitespace(n.login.username)?n.login.username=this.getValueOrDefault(e.email):this.isNullOrWhitespace(e.email)||(n.notes="Email: "+e.email+"\n"),n.login.password=this.getValueOrDefault(e.password),n.login.uris=this.makeUriArray(e.url),n.notes+=this.getValueOrDefault(e.description,""),null!=e.otp&&(n.login.totp=this.getValueOrDefault(e.otp.secret)),null!=e.custom_fields&&e.custom_fields.forEach((e=>{switch(e.field_type){case"text":case"password":this.processKvp(n,e.label,e.value)}})),this.convertToNoteIfNeeded(n),this.cleanupCipher(n),t.ciphers.push(n)})),this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t))}}t.PassmanJsonImporter=o},79506:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasspackCsvImporter=void 0;const i=n(2859),r=n(86001),o=n(5957);class a extends o.BaseImporter{parse(e){const t=new i.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{const n=this.isNullOrWhitespace(e.Tags)?null:JSON.parse(e.Tags),i=null!=n&&null!=n.tags&&n.tags.length>0?n.tags.map((e=>{try{const t=JSON.parse(e);return this.getValueOrDefault(t.tag)}catch(t){}return null})).filter((e=>!this.isNullOrWhitespace(e))):null;this.organization&&null!=i&&i.length>0?i.forEach((e=>{let n=!0,i=t.collections.length;for(let r=0;r0&&this.processFolder(t,i[0]);const o=this.initLoginCipher();o.notes=this.getValueOrDefault(e.Notes,""),o.notes+="\n\n"+this.getValueOrDefault(e["Shared Notes"],"")+"\n",o.name=this.getValueOrDefault(e["Entry Name"],"--"),o.login.username=this.getValueOrDefault(e["User ID"]),o.login.password=this.getValueOrDefault(e.Password),o.login.uris=this.makeUriArray(e.URL),null!=e.__parsed_extra&&e.__parsed_extra.length>0&&e.__parsed_extra.forEach((e=>{this.isNullOrWhitespace(e)||(o.notes+="\n"+e)}));const a=this.isNullOrWhitespace(e["Extra Fields"])?null:JSON.parse(e["Extra Fields"]),s=null!=a&&null!=a.extraFields&&a.extraFields.length>0?a.extraFields.map((e=>{try{return JSON.parse(e)}catch(t){}return null})):null;null!=s&&s.forEach((e=>{null!=e&&this.processKvp(o,e.name,e.data)})),this.cleanupCipher(o),t.ciphers.push(o)})),t.success=!0,Promise.resolve(t))}}t.PasspackCsvImporter=a},29990:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordAgentCsvImporter=void 0;const i=n(2859),r=n(5957);class o extends r.BaseImporter{parse(e){const t=new i.ImportResult,n=this.parseCsv(e,!1);if(null==n)return t.success=!1,Promise.resolve(t);let r=!0;return n.forEach((e=>{if(5!==e.length&&e.length<9)return;const n=10===e.length&&"0"===e[0],i=this.initLoginCipher();if(i.name=this.getValueOrDefault(e[n?1:0],"--"),i.login.username=this.getValueOrDefault(e[n?2:1]),i.login.password=this.getValueOrDefault(e[n?3:2]),5===e.length)r=!1,i.notes=this.getValueOrDefault(e[4]),i.login.uris=this.makeUriArray(e[3]);else{const r=this.getValueOrDefault(e[n?9:8],"(None)");let o="(None)"!==r?r.split("\\").join("/"):null;null!=o&&(o=r.split(" > ").join("/"),o=r.split(">").join("/")),this.processFolder(t,o),i.notes=this.getValueOrDefault(e[n?5:3]),i.login.uris=this.makeUriArray(e[4])}this.convertToNoteIfNeeded(i),this.cleanupCipher(i),t.ciphers.push(i)})),r&&this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t)}}t.PasswordAgentCsvImporter=o},84972:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordBossJsonImporter=void 0;const i=n(32773),r=n(2859),o=n(91766),a=n(36914),s=n(5957);class l extends s.BaseImporter{parse(e){const t=new r.ImportResult,n=JSON.parse(e);if(null==n||null==n.items)return t.success=!1,Promise.resolve(t);const s=new Map;n.folders.forEach((e=>{s.set(e.id,e.name)}));const l=new Map;return s.forEach(((e,n)=>{l.set(n,t.folders.length);const i=new a.FolderView;i.name=e,t.folders.push(i)})),n.items.forEach((e=>{const n=this.initLoginCipher();if(n.name=this.getValueOrDefault(e.name,"--"),n.login.uris=this.makeUriArray(e.login_url),null!=e.folder&&l.has(e.folder)&&t.folderRelationships.push([t.ciphers.length,l.get(e.folder)]),null!=e.identifiers){this.isNullOrWhitespace(e.identifiers.notes)||(n.notes=e.identifiers.notes.split("\\r\\n").join("\n").split("\\n").join("\n")),"CreditCard"===e.type&&(n.card=new o.CardView,n.type=i.CipherType.Card);for(const t in e.identifiers){if(!e.identifiers.hasOwnProperty(t))continue;const o=e.identifiers[t],a=null!=o?o.toString():null;if(!this.isNullOrWhitespace(a)&&"notes"!==t&&"ignoreItemInSecurityScore"!==t)if("custom_fields"!==t){if(n.type===i.CipherType.Card){if("cardNumber"===t){n.card.number=a,n.card.brand=this.getCardBrand(a);continue}if("nameOnCard"===t){n.card.cardholderName=a;continue}if("security_code"===t){n.card.code=a;continue}if("expires"===t){try{const e=new Date(a);n.card.expYear=e.getFullYear().toString(),n.card.expMonth=(e.getMonth()+1).toString()}catch(r){}continue}if("cardType"===t)continue}else{if(("username"===t||"email"===t)&&this.isNullOrWhitespace(n.login.username)){n.login.username=a;continue}if("password"===t){n.login.password=a;continue}if("totp"===t){n.login.totp=a;continue}if((null==n.login.uris||0===n.login.uris.length)&&this.uriFieldNames.indexOf(t)>-1){n.login.uris=this.makeUriArray(a);continue}}this.processKvp(n,t,a)}else o.forEach((e=>{this.processKvp(n,e.name,e.value)}))}this.convertToNoteIfNeeded(n),this.cleanupCipher(n),t.ciphers.push(n)}})),t.success=!0,Promise.resolve(t)}}t.PasswordBossJsonImporter=l},65588:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordDragonXmlImporter=void 0;const i=n(2859),r=n(5957);class o extends r.BaseImporter{parse(e){const t=new i.ImportResult,n=this.parseXml(e);if(null==n)return t.success=!1,Promise.resolve(t);const r=n.querySelectorAll("PasswordManager > record");return Array.from(r).forEach((e=>{const n=this.querySelectorDirectChild(e,"Category"),i=null==n||this.isNullOrWhitespace(n.textContent)||"Unfiled"===n.textContent?null:n.textContent;this.processFolder(t,i);const r=this.querySelectorDirectChild(e,"Account-Name"),o=this.querySelectorDirectChild(e,"User-Id"),a=this.querySelectorDirectChild(e,"Password"),s=this.querySelectorDirectChild(e,"URL"),l=this.querySelectorDirectChild(e,"Notes"),c=this.initLoginCipher();c.name=null!=r?this.getValueOrDefault(r.textContent,"--"):"--",c.notes=null!=l?this.getValueOrDefault(l.textContent):"",c.login.username=null!=o?this.getValueOrDefault(o.textContent):null,c.login.password=null!=a?this.getValueOrDefault(a.textContent):null,c.login.uris=null!=s?this.makeUriArray(s.textContent):null;const d=[];for(let t=1;t<=10;t++)d.push("Attribute-"+t);this.querySelectorAllDirectChild(e,d.join(",")).forEach((e=>{this.isNullOrWhitespace(e.textContent)||"null"===e.textContent||this.processKvp(c,e.tagName,e.textContent)})),this.cleanupCipher(c),t.ciphers.push(c)})),this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t)}}t.PasswordDragonXmlImporter=o},45970:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordSafeXmlImporter=void 0;const i=n(2859),r=n(5957);class o extends r.BaseImporter{parse(e){const t=new i.ImportResult,n=this.parseXml(e);if(null==n)return t.success=!1,Promise.resolve(t);const r=n.querySelector("passwordsafe");if(null==r)return t.errorMessage="Missing `passwordsafe` node.",t.success=!1,Promise.resolve(t);const o=r.getAttribute("delimiter"),a=n.querySelectorAll("passwordsafe > entry");return Array.from(a).forEach((e=>{const n=this.querySelectorDirectChild(e,"group"),i=null==n||this.isNullOrWhitespace(n.textContent)?null:n.textContent.split(".").join("/");this.processFolder(t,i);const r=this.querySelectorDirectChild(e,"title"),a=this.querySelectorDirectChild(e,"username"),s=this.querySelectorDirectChild(e,"email"),l=this.querySelectorDirectChild(e,"password"),c=this.querySelectorDirectChild(e,"url"),d=this.querySelectorDirectChild(e,"notes"),p=this.initLoginCipher();p.name=null!=r?this.getValueOrDefault(r.textContent,"--"):"--",p.notes=null!=d?this.getValueOrDefault(d.textContent,"").split(o).join("\n"):null,p.login.username=null!=a?this.getValueOrDefault(a.textContent):null,p.login.password=null!=l?this.getValueOrDefault(l.textContent):null,p.login.uris=null!=c?this.makeUriArray(c.textContent):null,this.isNullOrWhitespace(p.login.username)&&null!=s?p.login.username=this.getValueOrDefault(s.textContent):null==s||this.isNullOrWhitespace(s.textContent)||(p.notes=this.isNullOrWhitespace(p.notes)?"Email: "+s.textContent:p.notes+"\nEmail: "+s.textContent),this.cleanupCipher(p),t.ciphers.push(p)})),this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t)}}t.PasswordSafeXmlImporter=o},54706:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordWalletTxtImporter=void 0;const i=n(2859),r=n(5957);class o extends r.BaseImporter{parse(e){const t=new i.ImportResult,n=this.parseCsv(e,!1);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{if(e.length<1)return;e.length>5&&this.processFolder(t,e[5]);const n=this.initLoginCipher();n.name=this.getValueOrDefault(e[0],"--"),e.length>4&&(n.notes=this.getValueOrDefault(e[4],"").split("¬").join("\n")),e.length>2&&(n.login.username=this.getValueOrDefault(e[2])),e.length>3&&(n.login.password=this.getValueOrDefault(e[3])),e.length>1&&(n.login.uris=this.makeUriArray(e[1])),this.cleanupCipher(n),t.ciphers.push(n)})),this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t))}}t.PasswordWalletTxtImporter=o},43897:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RememBearCsvImporter=void 0;const i=n(32773),r=n(2859),o=n(91766),a=n(5957);class s extends a.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{if("true"===e.trash)return;const n=this.initLoginCipher();if(n.name=this.getValueOrDefault(e.name),n.notes=this.getValueOrDefault(e.notes),"LoginItem"===e.type)n.login.uris=this.makeUriArray(e.website),n.login.password=this.getValueOrDefault(e.password),n.login.username=this.getValueOrDefault(e.username);else if("CreditCardItem"===e.type){n.type=i.CipherType.Card,n.card=new o.CardView,n.card.cardholderName=this.getValueOrDefault(e.cardholder),n.card.number=this.getValueOrDefault(e.number),n.card.brand=this.getCardBrand(n.card.number),n.card.code=this.getValueOrDefault(e.verification);try{const t=this.getValueOrDefault(e.expiryMonth);if(null!=t){const e=parseInt(t,null);null!=e&&e>=1&&e<=12&&(n.card.expMonth=e.toString())}}catch(r){}try{const t=this.getValueOrDefault(e.expiryYear);if(null!=t){const e=parseInt(t,null);null!=e&&(n.card.expYear=e.toString())}}catch(a){}const t=this.getValueOrDefault(e.pin);null!=t&&this.processKvp(n,"PIN",t);const s=this.getValueOrDefault(e.zipCode);null!=s&&this.processKvp(n,"Zip Code",s)}this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.RememBearCsvImporter=s},91645:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RoboFormCsvImporter=void 0;const i=n(2859),r=n(5957);class o extends r.BaseImporter{parse(e){const t=new i.ImportResult,n=this.parseCsv(e,!0);if(null==n)return t.success=!1,Promise.resolve(t);let r=1;return n.forEach((e=>{const i=!this.isNullOrWhitespace(e.Folder)&&e.Folder.startsWith("/")?e.Folder.replace("/",""):e.Folder,o=this.isNullOrWhitespace(i)?null:i;this.processFolder(t,o);const a=this.initLoginCipher();if(a.notes=this.getValueOrDefault(e.Note),a.name=this.getValueOrDefault(e.Name,"--"),a.login.username=this.getValueOrDefault(e.Login),a.login.password=this.getValueOrDefault(e.Pwd),a.login.uris=this.makeUriArray(e.Url),!this.isNullOrWhitespace(e.Rf_fields)){let t=[e.Rf_fields];null!=e.__parsed_extra&&e.__parsed_extra.length>0&&(t=t.concat(e.__parsed_extra)),t.forEach((e=>{const t=e.split(":");if(t.length<3)return;const n="-no-name-"===t[0]?null:t[0],i=4===t.length&&"rck"===t[2]?t[1]:t[2];this.processKvp(a,n,i)}))}this.convertToNoteIfNeeded(a),this.cleanupCipher(a),r===n.length&&"--"===a.name&&this.isNullOrWhitespace(a.login.password)||(t.ciphers.push(a),r++)})),this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t)}}t.RoboFormCsvImporter=o},72739:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SafariCsvImporter=void 0;const i=n(2859),r=n(5957);class o extends r.BaseImporter{parse(e){const t=new i.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{var n;const i=this.initLoginCipher();i.name=this.getValueOrDefault(e.Title,"--"),i.login.username=this.getValueOrDefault(e.Username),i.login.password=this.getValueOrDefault(e.Password),i.login.uris=this.makeUriArray(null!==(n=e.Url)&&void 0!==n?n:e.URL),i.login.totp=this.getValueOrDefault(e.OTPAuth),i.notes=this.getValueOrDefault(e.Notes),this.cleanupCipher(i),t.ciphers.push(i)})),t.success=!0,Promise.resolve(t))}}t.SafariCsvImporter=o},29406:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SafeInCloudXmlImporter=void 0;const i=n(32773),r=n(67577),o=n(76716),a=n(2859),s=n(36914),l=n(99364),c=n(5957);class d extends c.BaseImporter{parse(e){const t=new a.ImportResult,n=this.parseXml(e);if(null==n)return t.success=!1,Promise.resolve(t);if(null==n.querySelector("database"))return t.errorMessage="Missing `database` node.",t.success=!1,Promise.resolve(t);const c=new Map;return Array.from(n.querySelectorAll("database > label")).forEach((e=>{const n=e.getAttribute("name"),i=e.getAttribute("id");if(!this.isNullOrWhitespace(n)&&!this.isNullOrWhitespace(i)){c.set(i,t.folders.length);const e=new s.FolderView;e.name=n,t.folders.push(e)}})),Array.from(n.querySelectorAll("database > card")).forEach((e=>{if("true"===e.getAttribute("template")||"true"===e.getAttribute("deleted"))return;const n=this.querySelectorDirectChild(e,"label_id");if(null!=n){const e=n.textContent;!this.isNullOrWhitespace(e)&&c.has(e)&&t.folderRelationships.push([t.ciphers.length,c.get(e)])}const a=this.initLoginCipher();a.name=this.getValueOrDefault(e.getAttribute("title"),"--"),"true"===e.getAttribute("star")&&(a.favorite=!0);"note"===e.getAttribute("type")?(a.type=i.CipherType.SecureNote,a.secureNote=new l.SecureNoteView,a.secureNote.type=o.SecureNoteType.Generic):Array.from(this.querySelectorAllDirectChild(e,"field")).forEach((e=>{const t=e.textContent;if(this.isNullOrWhitespace(t))return;const n=e.getAttribute("name"),i=this.getValueOrDefault(e.getAttribute("type"),"").toLowerCase();"login"===i?a.login.username=t:"password"===i||"secret"===i?this.processKvp(a,n,t,r.FieldType.Hidden):"one_time_password"===i?a.login.totp=t:"notes"===i?a.notes+=t+"\n":"weblogin"===i||"website"===i?a.login.uris=this.makeUriArray(t):this.processKvp(a,n,t)})),Array.from(this.querySelectorAllDirectChild(e,"notes")).forEach((e=>{a.notes+=e.textContent+"\n"})),this.setPassword(a),this.cleanupCipher(a),t.ciphers.push(a)})),this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t)}setPassword(e){const t=e.fields.filter((e=>e.type===r.FieldType.Hidden));if(!t.length)return;let n;for(const i of t)if(this.passwordFieldNames.includes(i.name.toLowerCase())){n=i,e.fields=e.fields.filter((e=>e!==n));break}n||(n=t[0]),e.login.password=n.value}}t.SafeInCloudXmlImporter=d},64817:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SaferPassCsvImporter=void 0;const i=n(2859),r=n(5957);class o extends r.BaseImporter{parse(e){const t=new i.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{const n=this.initLoginCipher();n.name=this.getValueOrDefault(this.nameFromUrl(e.url),"--"),n.notes=this.getValueOrDefault(e.notes),n.login.username=this.getValueOrDefault(e.username),n.login.password=this.getValueOrDefault(e.password),n.login.uris=this.makeUriArray(e.url),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.SaferPassCsvImporter=o},70402:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecureSafeCsvImporter=void 0;const i=n(2859),r=n(5957);class o extends r.BaseImporter{parse(e){const t=new i.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{const n=this.initLoginCipher();n.name=this.getValueOrDefault(e.Title),n.notes=this.getValueOrDefault(e.Comment),n.login.uris=this.makeUriArray(e.Url),n.login.password=this.getValueOrDefault(e.Password),n.login.username=this.getValueOrDefault(e.Username),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.SecureSafeCsvImporter=o},89757:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SplashIdCsvImporter=void 0;const i=n(2859),r=n(5957);class o extends r.BaseImporter{parse(e){const t=new i.ImportResult,n=this.parseCsv(e,!1);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{if(e.length<3)return;this.processFolder(t,this.getValueOrDefault(e[e.length-1]));const n=this.initLoginCipher();n.notes=this.getValueOrDefault(e[e.length-2],""),n.name=this.getValueOrDefault(e[1],"--"),"Web Logins"===e[0]||"Servers"===e[0]||"Email Accounts"===e[0]?(n.login.username=this.getValueOrDefault(e[2]),n.login.password=this.getValueOrDefault(e[3]),n.login.uris=this.makeUriArray(e[4]),this.parseFieldsToNotes(n,5,e)):this.parseFieldsToNotes(n,2,e),this.convertToNoteIfNeeded(n),this.cleanupCipher(n),t.ciphers.push(n)})),this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t))}parseFieldsToNotes(e,t,n){for(let i=t;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StickyPasswordXmlImporter=void 0;const i=n(2859),r=n(5957);class o extends r.BaseImporter{parse(e){const t=new i.ImportResult,n=this.parseXml(e);if(null==n)return t.success=!1,Promise.resolve(t);const r=n.querySelectorAll("root > Database > Logins > Login");return Array.from(r).forEach((e=>{const i=e.getAttribute("ID");if(this.isNullOrWhitespace(i))return;const r=e.getAttribute("Name"),o=e.getAttribute("Password");let a=null,s=null,l=null,c=null,d=null;const p=n.querySelector('root > Database > Accounts > Account > LoginLinks > Login[SourceLoginID="'+i+'"]');if(null!=p){const e=p.parentElement.parentElement;null!=e&&(a=e.getAttribute("Name"),s=e.getAttribute("Link"),c=e.getAttribute("ParentID"),l=e.getAttribute("Comments"),this.isNullOrWhitespace(l)||(l=l.split("/n").join("\n")))}this.isNullOrWhitespace(c)||(d=this.buildGroupText(n,c,""),this.processFolder(t,d));const u=this.initLoginCipher();u.name=this.getValueOrDefault(a,"--"),u.notes=this.getValueOrDefault(l),u.login.username=this.getValueOrDefault(r),u.login.password=this.getValueOrDefault(o),u.login.uris=this.makeUriArray(s),this.cleanupCipher(u),t.ciphers.push(u)})),this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t)}buildGroupText(e,t,n){const i=e.querySelector('root > Database > Groups > Group[ID="'+t+'"]');return null==i?n:(this.isNullOrWhitespace(n)||(n="/"+n),n=i.getAttribute("Name")+n,this.buildGroupText(e,i.getAttribute("ParentID"),n))}}t.StickyPasswordXmlImporter=o},74962:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TrueKeyCsvImporter=void 0;const i=n(32773),r=n(76716),o=n(2859),a=n(91766),s=n(99364),l=n(5957),c=["kind","autologin","favorite","hexcolor","protectedwithpassword","subdomainonly","type","tk_export_version","note","title","document_content"];class d extends l.BaseImporter{parse(e){const t=new o.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{const n=this.initLoginCipher();if(n.favorite="true"===this.getValueOrDefault(e.favorite,"").toLowerCase(),n.name=this.getValueOrDefault(e.name,"--"),n.notes=this.getValueOrDefault(e.memo,""),n.login.username=this.getValueOrDefault(e.login),n.login.password=this.getValueOrDefault(e.password),n.login.uris=this.makeUriArray(e.url),"login"!==e.kind&&(n.name=this.getValueOrDefault(e.title,"--"),n.notes=this.getValueOrDefault(e.note,"")),"cc"===e.kind){if(n.type=i.CipherType.Card,n.card=new a.CardView,n.card.cardholderName=this.getValueOrDefault(e.cardholder),n.card.number=this.getValueOrDefault(e.number),n.card.brand=this.getCardBrand(n.card.number),!this.isNullOrWhitespace(e.expiryDate))try{const t=new Date(e.expiryDate);n.card.expYear=t.getFullYear().toString(),n.card.expMonth=(t.getMonth()+1).toString()}catch(o){}}else if("login"!==e.kind){n.type=i.CipherType.SecureNote,n.secureNote=new s.SecureNoteView,n.secureNote.type=r.SecureNoteType.Generic,this.isNullOrWhitespace(n.notes)||(n.notes=this.getValueOrDefault(e.document_content,""));for(const t in e)e.hasOwnProperty(t)&&c.indexOf(t.toLowerCase())<0&&!this.isNullOrWhitespace(e[t])&&this.processKvp(n,t,e[t])}this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.TrueKeyCsvImporter=d},86220:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UpmCsvImporter=void 0;const i=n(2859),r=n(5957);class o extends r.BaseImporter{parse(e){const t=new i.ImportResult,n=this.parseCsv(e,!1);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{if(5!==e.length)return;const n=this.initLoginCipher();n.name=this.getValueOrDefault(e[0],"--"),n.notes=this.getValueOrDefault(e[4]),n.login.username=this.getValueOrDefault(e[1]),n.login.password=this.getValueOrDefault(e[2]),n.login.uris=this.makeUriArray(e[3]),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.UpmCsvImporter=o},6884:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.YotiCsvImporter=void 0;const i=n(2859),r=n(5957);class o extends r.BaseImporter{parse(e){const t=new i.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{const n=this.initLoginCipher();n.name=this.getValueOrDefault(e.Name,"--"),n.login.username=this.getValueOrDefault(e["User name"]),n.login.password=this.getValueOrDefault(e.Password),n.login.uris=this.makeUriArray(e.URL),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.YotiCsvImporter=o},8170:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ZohoVaultCsvImporter=void 0;const i=n(2859),r=n(5957);class o extends r.BaseImporter{parse(e){const t=new i.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{if(this.isNullOrWhitespace(e["Password Name"])&&this.isNullOrWhitespace(e["Secret Name"]))return;this.processFolder(t,this.getValueOrDefault(e.ChamberName));const n=this.initLoginCipher();n.favorite="1"===this.getValueOrDefault(e.Favorite,"0"),n.notes=this.getValueOrDefault(e.Notes),n.name=this.getValueOrDefault(e["Password Name"],this.getValueOrDefault(e["Secret Name"],"--")),n.login.uris=this.makeUriArray(this.getValueOrDefault(e["Password URL"],this.getValueOrDefault(e["Secret URL"]))),this.parseData(n,e.SecretData),this.parseData(n,e.CustomData),this.convertToNoteIfNeeded(n),this.cleanupCipher(n),t.ciphers.push(n)})),this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t))}parseData(e,t){if(this.isNullOrWhitespace(t))return;this.splitNewLine(t).forEach((t=>{const n=t.indexOf(":");if(n<0)return;const i=t.substring(0,n),r=t.length>n?t.substring(n+1):null;if(this.isNullOrWhitespace(i)||this.isNullOrWhitespace(r)||"SecretType"===i)return;const o=i.toLowerCase();null==e.login.username&&this.usernameFieldNames.indexOf(o)>-1?e.login.username=r:null==e.login.password&&this.passwordFieldNames.indexOf(o)>-1?e.login.password=r:this.processKvp(e,i,r)}))}}t.ZohoVaultCsvImporter=o},94700:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CaptchaIFrame=void 0;const i=n(85549);class r extends i.IFrameComponent{constructor(e,t,n,i,r,o){super(e,t,"captcha-connector.html","hcaptcha_iframe",i,r,(e=>{const t=JSON.parse(e);"string"!=typeof t?(this.iframe.height=t.height.toString(),this.iframe.width=t.width.toString()):o(t)})),this.i18nService=n}init(e){super.initComponent(this.createParams({siteKey:e,locale:this.i18nService.translationLocale},1))}}t.CaptchaIFrame=r},85549:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IFrameComponent=void 0;t.IFrameComponent=class{constructor(e,t,n,i,r,o,a){this.win=e,this.webVaultUrl=t,this.path=n,this.iframeId=i,this.successCallback=r,this.errorCallback=o,this.infoCallback=a,this.parseFunction=this.parseMessage.bind(this),this.connectorLink=e.document.createElement("a")}stop(){this.sendMessage("stop")}start(){this.sendMessage("start")}sendMessage(e){this.iframe&&this.iframe.src&&this.iframe.contentWindow&&this.iframe.contentWindow.postMessage(e,this.iframe.src)}base64Encode(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,((e,t)=>String.fromCharCode("0x"+t))))}cleanup(){this.win.removeEventListener("message",this.parseFunction,!1)}createParams(e,t){return new URLSearchParams({data:this.base64Encode(JSON.stringify(e)),parent:encodeURIComponent(this.win.document.location.href),v:t.toString()})}initComponent(e){this.connectorLink.href=`${this.webVaultUrl}/${this.path}?${e}`,this.iframe=this.win.document.getElementById(this.iframeId),this.iframe.src=this.connectorLink.href,this.win.addEventListener("message",this.parseFunction,!1)}parseMessage(e){if(!this.validMessage(e))return;const t=e.data.split("|");"success"===t[0]&&this.successCallback?this.successCallback(t[1]):"error"===t[0]&&this.errorCallback?this.errorCallback(t[1]):"info"===t[0]&&this.infoCallback&&this.infoCallback(t[1])}validMessage(e){return null!=e.origin&&""!==e.origin&&e.origin===this.connectorLink.origin&&null!=e.data&&"string"==typeof e.data&&(0===e.data.indexOf("success|")||0===e.data.indexOf("error|")||0===e.data.indexOf("info|"))}}},60628:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.linkedFieldOption=t.LinkedMetadata=void 0;class n{constructor(e,t){this.propertyKey=e,this._i18nKey=t}get i18nKey(){var e;return null!==(e=this._i18nKey)&&void 0!==e?e:this.propertyKey}}t.LinkedMetadata=n,t.linkedFieldOption=function(e,t){return(i,r)=>{null==i.linkedFieldOptions&&(i.linkedFieldOptions=new Map),i.linkedFieldOptions.set(e,new n(r,t))}}},83825:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ApiLogInStrategy=void 0;const r=n(81047),o=n(27657);class a extends o.LogInStrategy{constructor(e,t,n,i,r,o,a,s,l,c,d){super(e,t,n,i,r,o,a,s,l),this.environmentService=c,this.keyConnectorService=d}onSuccessfulLogin(e){return i(this,void 0,void 0,(function*(){if(e.apiUseKeyConnector){const e=this.environmentService.getKeyConnectorUrl();yield this.keyConnectorService.getAndSetKey(e)}}))}logIn(e){return i(this,void 0,void 0,(function*(){return this.tokenRequest=new r.ApiTokenRequest(e.clientId,e.clientSecret,yield this.buildTwoFactor(),yield this.buildDeviceRequest()),this.startLogIn()}))}saveAccountInformation(e){const t=Object.create(null,{saveAccountInformation:{get:()=>super.saveAccountInformation}});return i(this,void 0,void 0,(function*(){yield t.saveAccountInformation.call(this,e),yield this.stateService.setApiKeyClientId(this.tokenRequest.clientId),yield this.stateService.setApiKeyClientSecret(this.tokenRequest.clientSecret)}))}}t.ApiLogInStrategy=a},27657:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.LogInStrategy=void 0;const r=n(97374),o=n(31445),a=n(20584),s=n(92829),l=n(74598),c=n(74284),d=n(56659),p=n(7269),u=n(38326);t.LogInStrategy=class{constructor(e,t,n,i,r,o,a,s,l){this.cryptoService=e,this.apiService=t,this.tokenService=n,this.appIdService=i,this.platformUtilsService=r,this.messagingService=o,this.logService=a,this.stateService=s,this.twoFactorService=l,this.captchaBypassToken=null}logInTwoFactor(e,t=null){return i(this,void 0,void 0,(function*(){return this.tokenRequest.setTwoFactor(e),this.startLogIn()}))}startLogIn(){return i(this,void 0,void 0,(function*(){this.twoFactorService.clearSelectedProvider();const e=yield this.apiService.postIdentityToken(this.tokenRequest);if(e instanceof u.IdentityTwoFactorResponse)return this.processTwoFactorResponse(e);if(e instanceof d.IdentityCaptchaResponse)return this.processCaptchaResponse(e);if(e instanceof p.IdentityTokenResponse)return this.processTokenResponse(e);throw new Error("Invalid response object.")}))}onSuccessfulLogin(e){return null}buildDeviceRequest(){return i(this,void 0,void 0,(function*(){const e=yield this.appIdService.getAppId();return new s.DeviceRequest(e,this.platformUtilsService)}))}buildTwoFactor(e){return i(this,void 0,void 0,(function*(){if(null!=e)return e;const t=yield this.tokenService.getTwoFactorToken();return null!=t?new l.TokenRequestTwoFactor(r.TwoFactorProviderType.Remember,t,!1):new l.TokenRequestTwoFactor}))}saveAccountInformation(e){return i(this,void 0,void 0,(function*(){const t=yield this.tokenService.decodeToken(e.accessToken);yield this.stateService.addAccount(new o.Account({profile:Object.assign(Object.assign({},new o.AccountProfile),{userId:t.sub,email:t.email,hasPremiumPersonally:t.premium,kdfIterations:e.kdfIterations,kdfType:e.kdf}),tokens:Object.assign(Object.assign({},new o.AccountTokens),{accessToken:e.accessToken,refreshToken:e.refreshToken})}))}))}processTokenResponse(e){var t;return i(this,void 0,void 0,(function*(){const n=new a.AuthResult;n.resetMasterPassword=e.resetMasterPassword,n.forcePasswordReset=e.forcePasswordReset,yield this.saveAccountInformation(e),null!=e.twoFactorToken&&(yield this.tokenService.setTwoFactorToken(e));return null==e.key||(yield this.cryptoService.setEncKey(e.key),yield this.cryptoService.setEncPrivateKey(null!==(t=e.privateKey)&&void 0!==t?t:yield this.createKeyPairForOldAccount())),yield this.onSuccessfulLogin(e),yield this.stateService.setBiometricLocked(!1),this.messagingService.send("loggedIn"),n}))}processTwoFactorResponse(e){var t;return i(this,void 0,void 0,(function*(){const n=new a.AuthResult;return n.twoFactorProviders=e.twoFactorProviders2,this.twoFactorService.setProviders(e),this.captchaBypassToken=null!==(t=e.captchaToken)&&void 0!==t?t:null,n}))}processCaptchaResponse(e){return i(this,void 0,void 0,(function*(){const t=new a.AuthResult;return t.captchaSiteKey=e.siteKey,t}))}createKeyPairForOldAccount(){return i(this,void 0,void 0,(function*(){try{const[e,t]=yield this.cryptoService.makeKeyPair();return yield this.apiService.postAccountKeys(new c.KeysRequest(e,t.encryptedString)),t.encryptedString}catch(e){this.logService.error(e)}}))}}},74044:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordLogInStrategy=void 0;const r=n(43578),o=n(10037),a=n(27657);class s extends a.LogInStrategy{constructor(e,t,n,i,r,o,a,s,l,c){super(e,t,n,i,r,o,a,s,l),this.authService=c}get email(){return this.tokenRequest.email}get masterPasswordHash(){return this.tokenRequest.masterPasswordHash}onSuccessfulLogin(){return i(this,void 0,void 0,(function*(){yield this.cryptoService.setKey(this.key),yield this.cryptoService.setKeyHash(this.localHashedPassword)}))}logInTwoFactor(e,t){const n=Object.create(null,{logInTwoFactor:{get:()=>super.logInTwoFactor}});return i(this,void 0,void 0,(function*(){return this.tokenRequest.captchaResponse=null!=t?t:this.captchaBypassToken,n.logInTwoFactor.call(this,e)}))}logIn(e){return i(this,void 0,void 0,(function*(){const{email:t,masterPassword:n,captchaToken:i,twoFactor:a}=e;this.key=yield this.authService.makePreloginKey(n,t),this.localHashedPassword=yield this.cryptoService.hashPassword(n,this.key,r.HashPurpose.LocalAuthorization);const s=yield this.cryptoService.hashPassword(n,this.key);return this.tokenRequest=new o.PasswordTokenRequest(t,s,i,yield this.buildTwoFactor(a),yield this.buildDeviceRequest()),this.startLogIn()}))}}t.PasswordLogInStrategy=s},41956:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SsoLogInStrategy=void 0;const r=n(11685),o=n(27657);class a extends o.LogInStrategy{constructor(e,t,n,i,r,o,a,s,l,c){super(e,t,n,i,r,o,a,s,l),this.keyConnectorService=c}onSuccessfulLogin(e){return i(this,void 0,void 0,(function*(){const t=null==e.key;null!=e.keyConnectorUrl&&(t?yield this.keyConnectorService.convertNewSsoUserToKeyConnector(e,this.orgId):yield this.keyConnectorService.getAndSetKey(e.keyConnectorUrl))}))}logIn(e){return i(this,void 0,void 0,(function*(){return this.orgId=e.orgId,this.tokenRequest=new r.SsoTokenRequest(e.code,e.codeVerifier,e.redirectUrl,yield this.buildTwoFactor(e.twoFactor),yield this.buildDeviceRequest()),this.startLogIn()}))}}t.SsoLogInStrategy=a},27605:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sequentialize=void 0,t.sequentialize=function(e){return(t,n,i)=>{const r=i.value,o=new Map;return{value:function(...t){const n=(e=>{let t=o.get(e);return null!=t||(t=new Map,o.set(e,t)),t})(this),i=e(t);let a=n.get(i);if(null!=a)return a;const s=()=>{n.delete(i),0===n.size&&o.delete(this)};return a=r.apply(this,t).then((e=>(s(),e))).catch((e=>{throw s(),e})),n.set(i,a),a}}}}},39814:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceUtils=void 0;const i=n(51301);class r{static nestedTraverse(e,t,n,o,a,s){if(n.length<=t)return;const l=t===n.length-1,c=n[t];for(let d=0;de.node.name===c)).length){if(l)return void e.push(new i.TreeNode(o,c,a));const d=n[t]+s+n[t+1];r.nestedTraverse(e,0,[d,...n.slice(t+2)],o,a,s)}}static getTreeNodeObject(e,t){for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throttle=void 0,t.throttle=function(e,t){return(n,i,r)=>{const o=r.value,a=new Map;return{value:function(...n){const i=(e=>{let t=a.get(e);return null!=t||(t=new Map,a.set(e,t)),t})(this),r=t(n);let s=i.get(r);return null==s&&(s=[],i.set(r,s)),new Promise(((t,l)=>{const c=()=>{const d=()=>{s.splice(s.indexOf(c),1),s.length>=e?s[e-1]():0===s.length&&(i.delete(r),0===i.size&&a.delete(this))};o.apply(this,n).then((e=>(d(),e))).catch((e=>{throw d(),e})).then(t,l)};s.push(c),s.length<=e&&c()}))}}}}},43400:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValid=t.getDomain=void 0,t.getDomain=function(e){return null},t.isValid=function(e){return!0}},82769:(e,t,n)=>{"use strict";var i=n(34155);Object.defineProperty(t,"__esModule",{value:!0}),t.Utils=void 0;const r=n(43400),o="undefined"==typeof window?n(4958):null;class a{static init(){a.inited||(a.inited=!0,a.isNode=void 0!==i&&null!=i.release&&"node"===i.release.name,a.isBrowser="undefined"!=typeof window,a.isMobileBrowser=a.isBrowser&&this.isMobile(window),a.isAppleMobileBrowser=a.isBrowser&&this.isAppleMobile(window),a.global=a.isNode&&!a.isBrowser?n.g:window)}static fromB64ToArray(e){if(a.isNode)return new Uint8Array(Buffer.from(e,"base64"));{const t=window.atob(e),n=new Uint8Array(t.length);for(let e=0;e("00"+e.toString(16)).slice(-2))).join("")}}static fromUrlB64ToB64(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("Illegal base64url string!")}return t}static fromUrlB64ToUtf8(e){return a.fromB64ToUtf8(a.fromUrlB64ToB64(e))}static fromUtf8ToB64(e){return a.isNode?Buffer.from(e,"utf8").toString("base64"):decodeURIComponent(escape(window.btoa(e)))}static fromUtf8ToUrlB64(e){return a.fromBufferToUrlB64(a.fromUtf8ToArray(e))}static fromB64ToUtf8(e){return a.isNode?Buffer.from(e,"base64").toString("utf8"):decodeURIComponent(escape(window.atob(e)))}static newGuid(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}static isGuid(e){return RegExp(/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/,"i").test(e)}static getHostname(e){const t=a.getUrl(e);try{return null!=t&&""!==t.hostname?t.hostname:null}catch(n){return null}}static getHost(e){const t=a.getUrl(e);try{return null!=t&&""!==t.host?t.host:null}catch(n){return null}}static getDomain(e){if(null==e)return null;if(""===(e=e.trim()))return null;if(e.startsWith("data:"))return null;let t=e.startsWith("http://")||e.startsWith("https://");if(!t&&e.indexOf("://")<0&&a.tldEndingRegex.test(e)&&e.indexOf("@")<0&&(e="http://"+e,t=!0),t)try{const t=a.getUrlObject(e);if(!(null==(null==r?void 0:r.isValid)||r.isValid(t.hostname)))return null;if("localhost"===t.hostname||a.validIpAddress(t.hostname))return t.hostname;const n=null!=r&&null!=r.getDomain?r.getDomain(t.hostname):null;return null!=n?n:t.hostname}catch(n){}try{const t=null!=r&&null!=r.getDomain?r.getDomain(e):null;if(null!=t)return t}catch(i){return null}return null}static getQueryParams(e){const t=a.getUrl(e);if(null==t||null==t.search||""===t.search)return null;const n=new Map;return("?"===t.search[0]?t.search.substr(1):t.search).split("&").forEach((e=>{const t=e.split("=");t.length<1||n.set(decodeURIComponent(t[0]).toLowerCase(),null==t[1]?"":decodeURIComponent(t[1]))})),n}static getSortFunction(e,t){return(n,i)=>null==n[t]&&null!=i[t]?-1:null!=n[t]&&null==i[t]?1:null==n[t]&&null==i[t]?0:e.collator?e.collator.compare(n[t],i[t]):n[t].localeCompare(i[t])}static isNullOrWhitespace(e){return null==e||"string"!=typeof e||""===e.trim()}static isNullOrEmpty(e){return null==e||"string"!=typeof e||""==e}static nameOf(e){return e}static assign(e,t){return Object.assign(e,t)}static iterateEnum(e){return Object.keys(e).filter((e=>Number.isNaN(+e))).map((t=>e[t]))}static getUrl(e){if(null==e)return null;if(""===(e=e.trim()))return null;let t=a.getUrlObject(e);if(null==t){!(0===e.indexOf("http://")||0===e.indexOf("https://"))&&e.indexOf(".")>-1&&(t=a.getUrlObject("http://"+e))}return t}static camelToPascalCase(e){return e.charAt(0).toUpperCase()+e.slice(1)}static validIpAddress(e){return/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(e)}static isMobile(e){let t=!1;var n;return n=e.navigator.userAgent||e.navigator.vendor||e.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(n)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(n.substr(0,4)))&&(t=!0),t||null!=e.navigator.userAgent.match(/iPad/i)}static isAppleMobile(e){return null!=e.navigator.userAgent.match(/iPhone/i)||null!=e.navigator.userAgent.match(/iPad/i)}static getUrlObject(e){try{if(null!=o)return new o.URL(e);if("function"==typeof URL)return new URL(e);if(null!=window){const t=e.indexOf("://")>-1;if(!t&&e.indexOf(".")>-1)e="http://"+e;else if(!t)return null;const n=window.document.createElement("a");return n.href=e,n}}catch(t){}return null}}t.Utils=a,a.inited=!1,a.isNode=!1,a.isBrowser=!0,a.isMobileBrowser=!1,a.isAppleMobileBrowser=!1,a.global=null,a.tldEndingRegex=/.*\.(com|net|org|edu|uk|gov|ca|de|jp|fr|au|ru|ch|io|es|us|co|xyz|info|ly|mil)$/,a.regexpEmojiPresentation=/(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])/g,a.init()},28705:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebAuthnIFrame=void 0;t.WebAuthnIFrame=class{constructor(e,t,n,i,r,o,a,s){this.win=e,this.webVaultUrl=t,this.webAuthnNewTab=n,this.platformUtilsService=i,this.i18nService=r,this.successCallback=o,this.errorCallback=a,this.infoCallback=s,this.iframe=null,this.parseFunction=this.parseMessage.bind(this),this.connectorLink=e.document.createElement("a")}init(e){const t=new URLSearchParams({data:this.base64Encode(JSON.stringify(e)),parent:encodeURIComponent(this.win.document.location.href),btnText:encodeURIComponent(this.i18nService.t("webAuthnAuthenticate")),v:"1"});this.webAuthnNewTab?(t.append("locale",this.i18nService.translationLocale),this.platformUtilsService.launchUri(`${this.webVaultUrl}/webauthn-fallback-connector.html?${t}`)):(this.connectorLink.href=`${this.webVaultUrl}/webauthn-connector.html?${t}`,this.iframe=this.win.document.getElementById("webauthn_iframe"),this.iframe.allow="publickey-credentials-get "+new URL(this.webVaultUrl).origin,this.iframe.src=this.connectorLink.href,this.win.addEventListener("message",this.parseFunction,!1))}stop(){this.sendMessage("stop")}start(){this.sendMessage("start")}sendMessage(e){this.iframe&&this.iframe.src&&this.iframe.contentWindow&&this.iframe.contentWindow.postMessage(e,this.iframe.src)}base64Encode(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,((e,t)=>String.fromCharCode("0x"+t))))}cleanup(){this.win.removeEventListener("message",this.parseFunction,!1)}parseMessage(e){if(!this.validMessage(e))return;const t=e.data.split("|");"success"===t[0]&&this.successCallback?this.successCallback(t[1]):"error"===t[0]&&this.errorCallback?this.errorCallback(t[1]):"info"===t[0]&&this.infoCallback&&this.infoCallback(t[1])}validMessage(e){return null!=e.origin&&""!==e.origin&&e.origin===this.connectorLink.origin&&null!=e.data&&"string"==typeof e.data&&(0===e.data.indexOf("success|")||0===e.data.indexOf("error|")||0===e.data.indexOf("info|"))}}},40596:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EEFLongWordList=void 0,t.EEFLongWordList=["abacus","abdomen","abdominal","abide","abiding","ability","ablaze","able","abnormal","abrasion","abrasive","abreast","abridge","abroad","abruptly","absence","absentee","absently","absinthe","absolute","absolve","abstain","abstract","absurd","accent","acclaim","acclimate","accompany","account","accuracy","accurate","accustom","acetone","achiness","aching","acid","acorn","acquaint","acquire","acre","acrobat","acronym","acting","action","activate","activator","active","activism","activist","activity","actress","acts","acutely","acuteness","aeration","aerobics","aerosol","aerospace","afar","affair","affected","affecting","affection","affidavit","affiliate","affirm","affix","afflicted","affluent","afford","affront","aflame","afloat","aflutter","afoot","afraid","afterglow","afterlife","aftermath","aftermost","afternoon","aged","ageless","agency","agenda","agent","aggregate","aghast","agile","agility","aging","agnostic","agonize","agonizing","agony","agreeable","agreeably","agreed","agreeing","agreement","aground","ahead","ahoy","aide","aids","aim","ajar","alabaster","alarm","albatross","album","alfalfa","algebra","algorithm","alias","alibi","alienable","alienate","aliens","alike","alive","alkaline","alkalize","almanac","almighty","almost","aloe","aloft","aloha","alone","alongside","aloof","alphabet","alright","although","altitude","alto","aluminum","alumni","always","amaretto","amaze","amazingly","amber","ambiance","ambiguity","ambiguous","ambition","ambitious","ambulance","ambush","amendable","amendment","amends","amenity","amiable","amicably","amid","amigo","amino","amiss","ammonia","ammonium","amnesty","amniotic","among","amount","amperage","ample","amplifier","amplify","amply","amuck","amulet","amusable","amused","amusement","amuser","amusing","anaconda","anaerobic","anagram","anatomist","anatomy","anchor","anchovy","ancient","android","anemia","anemic","aneurism","anew","angelfish","angelic","anger","angled","angler","angles","angling","angrily","angriness","anguished","angular","animal","animate","animating","animation","animator","anime","animosity","ankle","annex","annotate","announcer","annoying","annually","annuity","anointer","another","answering","antacid","antarctic","anteater","antelope","antennae","anthem","anthill","anthology","antibody","antics","antidote","antihero","antiquely","antiques","antiquity","antirust","antitoxic","antitrust","antiviral","antivirus","antler","antonym","antsy","anvil","anybody","anyhow","anymore","anyone","anyplace","anything","anytime","anyway","anywhere","aorta","apache","apostle","appealing","appear","appease","appeasing","appendage","appendix","appetite","appetizer","applaud","applause","apple","appliance","applicant","applied","apply","appointee","appraisal","appraiser","apprehend","approach","approval","approve","apricot","april","apron","aptitude","aptly","aqua","aqueduct","arbitrary","arbitrate","ardently","area","arena","arguable","arguably","argue","arise","armadillo","armband","armchair","armed","armful","armhole","arming","armless","armoire","armored","armory","armrest","army","aroma","arose","around","arousal","arrange","array","arrest","arrival","arrive","arrogance","arrogant","arson","art","ascend","ascension","ascent","ascertain","ashamed","ashen","ashes","ashy","aside","askew","asleep","asparagus","aspect","aspirate","aspire","aspirin","astonish","astound","astride","astrology","astronaut","astronomy","astute","atlantic","atlas","atom","atonable","atop","atrium","atrocious","atrophy","attach","attain","attempt","attendant","attendee","attention","attentive","attest","attic","attire","attitude","attractor","attribute","atypical","auction","audacious","audacity","audible","audibly","audience","audio","audition","augmented","august","authentic","author","autism","autistic","autograph","automaker","automated","automatic","autopilot","available","avalanche","avatar","avenge","avenging","avenue","average","aversion","avert","aviation","aviator","avid","avoid","await","awaken","award","aware","awhile","awkward","awning","awoke","awry","axis","babble","babbling","babied","baboon","backache","backboard","backboned","backdrop","backed","backer","backfield","backfire","backhand","backing","backlands","backlash","backless","backlight","backlit","backlog","backpack","backpedal","backrest","backroom","backshift","backside","backslid","backspace","backspin","backstab","backstage","backtalk","backtrack","backup","backward","backwash","backwater","backyard","bacon","bacteria","bacterium","badass","badge","badland","badly","badness","baffle","baffling","bagel","bagful","baggage","bagged","baggie","bagginess","bagging","baggy","bagpipe","baguette","baked","bakery","bakeshop","baking","balance","balancing","balcony","balmy","balsamic","bamboo","banana","banish","banister","banjo","bankable","bankbook","banked","banker","banking","banknote","bankroll","banner","bannister","banshee","banter","barbecue","barbed","barbell","barber","barcode","barge","bargraph","barista","baritone","barley","barmaid","barman","barn","barometer","barrack","barracuda","barrel","barrette","barricade","barrier","barstool","bartender","barterer","bash","basically","basics","basil","basin","basis","basket","batboy","batch","bath","baton","bats","battalion","battered","battering","battery","batting","battle","bauble","bazooka","blabber","bladder","blade","blah","blame","blaming","blanching","blandness","blank","blaspheme","blasphemy","blast","blatancy","blatantly","blazer","blazing","bleach","bleak","bleep","blemish","blend","bless","blighted","blimp","bling","blinked","blinker","blinking","blinks","blip","blissful","blitz","blizzard","bloated","bloating","blob","blog","bloomers","blooming","blooper","blot","blouse","blubber","bluff","bluish","blunderer","blunt","blurb","blurred","blurry","blurt","blush","blustery","boaster","boastful","boasting","boat","bobbed","bobbing","bobble","bobcat","bobsled","bobtail","bodacious","body","bogged","boggle","bogus","boil","bok","bolster","bolt","bonanza","bonded","bonding","bondless","boned","bonehead","boneless","bonelike","boney","bonfire","bonnet","bonsai","bonus","bony","boogeyman","boogieman","book","boondocks","booted","booth","bootie","booting","bootlace","bootleg","boots","boozy","borax","boring","borough","borrower","borrowing","boss","botanical","botanist","botany","botch","both","bottle","bottling","bottom","bounce","bouncing","bouncy","bounding","boundless","bountiful","bovine","boxcar","boxer","boxing","boxlike","boxy","breach","breath","breeches","breeching","breeder","breeding","breeze","breezy","brethren","brewery","brewing","briar","bribe","brick","bride","bridged","brigade","bright","brilliant","brim","bring","brink","brisket","briskly","briskness","bristle","brittle","broadband","broadcast","broaden","broadly","broadness","broadside","broadways","broiler","broiling","broken","broker","bronchial","bronco","bronze","bronzing","brook","broom","brought","browbeat","brownnose","browse","browsing","bruising","brunch","brunette","brunt","brush","brussels","brute","brutishly","bubble","bubbling","bubbly","buccaneer","bucked","bucket","buckle","buckshot","buckskin","bucktooth","buckwheat","buddhism","buddhist","budding","buddy","budget","buffalo","buffed","buffer","buffing","buffoon","buggy","bulb","bulge","bulginess","bulgur","bulk","bulldog","bulldozer","bullfight","bullfrog","bullhorn","bullion","bullish","bullpen","bullring","bullseye","bullwhip","bully","bunch","bundle","bungee","bunion","bunkbed","bunkhouse","bunkmate","bunny","bunt","busboy","bush","busily","busload","bust","busybody","buzz","cabana","cabbage","cabbie","cabdriver","cable","caboose","cache","cackle","cacti","cactus","caddie","caddy","cadet","cadillac","cadmium","cage","cahoots","cake","calamari","calamity","calcium","calculate","calculus","caliber","calibrate","calm","caloric","calorie","calzone","camcorder","cameo","camera","camisole","camper","campfire","camping","campsite","campus","canal","canary","cancel","candied","candle","candy","cane","canine","canister","cannabis","canned","canning","cannon","cannot","canola","canon","canopener","canopy","canteen","canyon","capable","capably","capacity","cape","capillary","capital","capitol","capped","capricorn","capsize","capsule","caption","captivate","captive","captivity","capture","caramel","carat","caravan","carbon","cardboard","carded","cardiac","cardigan","cardinal","cardstock","carefully","caregiver","careless","caress","caretaker","cargo","caring","carless","carload","carmaker","carnage","carnation","carnival","carnivore","carol","carpenter","carpentry","carpool","carport","carried","carrot","carrousel","carry","cartel","cartload","carton","cartoon","cartridge","cartwheel","carve","carving","carwash","cascade","case","cash","casing","casino","casket","cassette","casually","casualty","catacomb","catalog","catalyst","catalyze","catapult","cataract","catatonic","catcall","catchable","catcher","catching","catchy","caterer","catering","catfight","catfish","cathedral","cathouse","catlike","catnap","catnip","catsup","cattail","cattishly","cattle","catty","catwalk","caucasian","caucus","causal","causation","cause","causing","cauterize","caution","cautious","cavalier","cavalry","caviar","cavity","cedar","celery","celestial","celibacy","celibate","celtic","cement","census","ceramics","ceremony","certainly","certainty","certified","certify","cesarean","cesspool","chafe","chaffing","chain","chair","chalice","challenge","chamber","chamomile","champion","chance","change","channel","chant","chaos","chaperone","chaplain","chapped","chaps","chapter","character","charbroil","charcoal","charger","charging","chariot","charity","charm","charred","charter","charting","chase","chasing","chaste","chastise","chastity","chatroom","chatter","chatting","chatty","cheating","cheddar","cheek","cheer","cheese","cheesy","chef","chemicals","chemist","chemo","cherisher","cherub","chess","chest","chevron","chevy","chewable","chewer","chewing","chewy","chief","chihuahua","childcare","childhood","childish","childless","childlike","chili","chill","chimp","chip","chirping","chirpy","chitchat","chivalry","chive","chloride","chlorine","choice","chokehold","choking","chomp","chooser","choosing","choosy","chop","chosen","chowder","chowtime","chrome","chubby","chuck","chug","chummy","chump","chunk","churn","chute","cider","cilantro","cinch","cinema","cinnamon","circle","circling","circular","circulate","circus","citable","citadel","citation","citizen","citric","citrus","city","civic","civil","clad","claim","clambake","clammy","clamor","clamp","clamshell","clang","clanking","clapped","clapper","clapping","clarify","clarinet","clarity","clash","clasp","class","clatter","clause","clavicle","claw","clay","clean","clear","cleat","cleaver","cleft","clench","clergyman","clerical","clerk","clever","clicker","client","climate","climatic","cling","clinic","clinking","clip","clique","cloak","clobber","clock","clone","cloning","closable","closure","clothes","clothing","cloud","clover","clubbed","clubbing","clubhouse","clump","clumsily","clumsy","clunky","clustered","clutch","clutter","coach","coagulant","coastal","coaster","coasting","coastland","coastline","coat","coauthor","cobalt","cobbler","cobweb","cocoa","coconut","cod","coeditor","coerce","coexist","coffee","cofounder","cognition","cognitive","cogwheel","coherence","coherent","cohesive","coil","coke","cola","cold","coleslaw","coliseum","collage","collapse","collar","collected","collector","collide","collie","collision","colonial","colonist","colonize","colony","colossal","colt","coma","come","comfort","comfy","comic","coming","comma","commence","commend","comment","commerce","commode","commodity","commodore","common","commotion","commute","commuting","compacted","compacter","compactly","compactor","companion","company","compare","compel","compile","comply","component","composed","composer","composite","compost","composure","compound","compress","comprised","computer","computing","comrade","concave","conceal","conceded","concept","concerned","concert","conch","concierge","concise","conclude","concrete","concur","condense","condiment","condition","condone","conducive","conductor","conduit","cone","confess","confetti","confidant","confident","confider","confiding","configure","confined","confining","confirm","conflict","conform","confound","confront","confused","confusing","confusion","congenial","congested","congrats","congress","conical","conjoined","conjure","conjuror","connected","connector","consensus","consent","console","consoling","consonant","constable","constant","constrain","constrict","construct","consult","consumer","consuming","contact","container","contempt","contend","contented","contently","contents","contest","context","contort","contour","contrite","control","contusion","convene","convent","copartner","cope","copied","copier","copilot","coping","copious","copper","copy","coral","cork","cornball","cornbread","corncob","cornea","corned","corner","cornfield","cornflake","cornhusk","cornmeal","cornstalk","corny","coronary","coroner","corporal","corporate","corral","correct","corridor","corrode","corroding","corrosive","corsage","corset","cortex","cosigner","cosmetics","cosmic","cosmos","cosponsor","cost","cottage","cotton","couch","cough","could","countable","countdown","counting","countless","country","county","courier","covenant","cover","coveted","coveting","coyness","cozily","coziness","cozy","crabbing","crabgrass","crablike","crabmeat","cradle","cradling","crafter","craftily","craftsman","craftwork","crafty","cramp","cranberry","crane","cranial","cranium","crank","crate","crave","craving","crawfish","crawlers","crawling","crayfish","crayon","crazed","crazily","craziness","crazy","creamed","creamer","creamlike","crease","creasing","creatable","create","creation","creative","creature","credible","credibly","credit","creed","creme","creole","crepe","crept","crescent","crested","cresting","crestless","crevice","crewless","crewman","crewmate","crib","cricket","cried","crier","crimp","crimson","cringe","cringing","crinkle","crinkly","crisped","crisping","crisply","crispness","crispy","criteria","critter","croak","crock","crook","croon","crop","cross","crouch","crouton","crowbar","crowd","crown","crucial","crudely","crudeness","cruelly","cruelness","cruelty","crumb","crummiest","crummy","crumpet","crumpled","cruncher","crunching","crunchy","crusader","crushable","crushed","crusher","crushing","crust","crux","crying","cryptic","crystal","cubbyhole","cube","cubical","cubicle","cucumber","cuddle","cuddly","cufflink","culinary","culminate","culpable","culprit","cultivate","cultural","culture","cupbearer","cupcake","cupid","cupped","cupping","curable","curator","curdle","cure","curfew","curing","curled","curler","curliness","curling","curly","curry","curse","cursive","cursor","curtain","curtly","curtsy","curvature","curve","curvy","cushy","cusp","cussed","custard","custodian","custody","customary","customer","customize","customs","cut","cycle","cyclic","cycling","cyclist","cylinder","cymbal","cytoplasm","cytoplast","dab","dad","daffodil","dagger","daily","daintily","dainty","dairy","daisy","dallying","dance","dancing","dandelion","dander","dandruff","dandy","danger","dangle","dangling","daredevil","dares","daringly","darkened","darkening","darkish","darkness","darkroom","darling","darn","dart","darwinism","dash","dastardly","data","datebook","dating","daughter","daunting","dawdler","dawn","daybed","daybreak","daycare","daydream","daylight","daylong","dayroom","daytime","dazzler","dazzling","deacon","deafening","deafness","dealer","dealing","dealmaker","dealt","dean","debatable","debate","debating","debit","debrief","debtless","debtor","debug","debunk","decade","decaf","decal","decathlon","decay","deceased","deceit","deceiver","deceiving","december","decency","decent","deception","deceptive","decibel","decidable","decimal","decimeter","decipher","deck","declared","decline","decode","decompose","decorated","decorator","decoy","decrease","decree","dedicate","dedicator","deduce","deduct","deed","deem","deepen","deeply","deepness","deface","defacing","defame","default","defeat","defection","defective","defendant","defender","defense","defensive","deferral","deferred","defiance","defiant","defile","defiling","define","definite","deflate","deflation","deflator","deflected","deflector","defog","deforest","defraud","defrost","deftly","defuse","defy","degraded","degrading","degrease","degree","dehydrate","deity","dejected","delay","delegate","delegator","delete","deletion","delicacy","delicate","delicious","delighted","delirious","delirium","deliverer","delivery","delouse","delta","deluge","delusion","deluxe","demanding","demeaning","demeanor","demise","democracy","democrat","demote","demotion","demystify","denatured","deniable","denial","denim","denote","dense","density","dental","dentist","denture","deny","deodorant","deodorize","departed","departure","depict","deplete","depletion","deplored","deploy","deport","depose","depraved","depravity","deprecate","depress","deprive","depth","deputize","deputy","derail","deranged","derby","derived","desecrate","deserve","deserving","designate","designed","designer","designing","deskbound","desktop","deskwork","desolate","despair","despise","despite","destiny","destitute","destruct","detached","detail","detection","detective","detector","detention","detergent","detest","detonate","detonator","detoxify","detract","deuce","devalue","deviancy","deviant","deviate","deviation","deviator","device","devious","devotedly","devotee","devotion","devourer","devouring","devoutly","dexterity","dexterous","diabetes","diabetic","diabolic","diagnoses","diagnosis","diagram","dial","diameter","diaper","diaphragm","diary","dice","dicing","dictate","dictation","dictator","difficult","diffused","diffuser","diffusion","diffusive","dig","dilation","diligence","diligent","dill","dilute","dime","diminish","dimly","dimmed","dimmer","dimness","dimple","diner","dingbat","dinghy","dinginess","dingo","dingy","dining","dinner","diocese","dioxide","diploma","dipped","dipper","dipping","directed","direction","directive","directly","directory","direness","dirtiness","disabled","disagree","disallow","disarm","disarray","disaster","disband","disbelief","disburse","discard","discern","discharge","disclose","discolor","discount","discourse","discover","discuss","disdain","disengage","disfigure","disgrace","dish","disinfect","disjoin","disk","dislike","disliking","dislocate","dislodge","disloyal","dismantle","dismay","dismiss","dismount","disobey","disorder","disown","disparate","disparity","dispatch","dispense","dispersal","dispersed","disperser","displace","display","displease","disposal","dispose","disprove","dispute","disregard","disrupt","dissuade","distance","distant","distaste","distill","distinct","distort","distract","distress","district","distrust","ditch","ditto","ditzy","dividable","divided","dividend","dividers","dividing","divinely","diving","divinity","divisible","divisibly","division","divisive","divorcee","dizziness","dizzy","doable","docile","dock","doctrine","document","dodge","dodgy","doily","doing","dole","dollar","dollhouse","dollop","dolly","dolphin","domain","domelike","domestic","dominion","dominoes","donated","donation","donator","donor","donut","doodle","doorbell","doorframe","doorknob","doorman","doormat","doornail","doorpost","doorstep","doorstop","doorway","doozy","dork","dormitory","dorsal","dosage","dose","dotted","doubling","douche","dove","down","dowry","doze","drab","dragging","dragonfly","dragonish","dragster","drainable","drainage","drained","drainer","drainpipe","dramatic","dramatize","drank","drapery","drastic","draw","dreaded","dreadful","dreadlock","dreamboat","dreamily","dreamland","dreamless","dreamlike","dreamt","dreamy","drearily","dreary","drench","dress","drew","dribble","dried","drier","drift","driller","drilling","drinkable","drinking","dripping","drippy","drivable","driven","driver","driveway","driving","drizzle","drizzly","drone","drool","droop","drop-down","dropbox","dropkick","droplet","dropout","dropper","drove","drown","drowsily","drudge","drum","dry","dubbed","dubiously","duchess","duckbill","ducking","duckling","ducktail","ducky","duct","dude","duffel","dugout","duh","duke","duller","dullness","duly","dumping","dumpling","dumpster","duo","dupe","duplex","duplicate","duplicity","durable","durably","duration","duress","during","dusk","dust","dutiful","duty","duvet","dwarf","dweeb","dwelled","dweller","dwelling","dwindle","dwindling","dynamic","dynamite","dynasty","dyslexia","dyslexic","each","eagle","earache","eardrum","earflap","earful","earlobe","early","earmark","earmuff","earphone","earpiece","earplugs","earring","earshot","earthen","earthlike","earthling","earthly","earthworm","earthy","earwig","easeful","easel","easiest","easily","easiness","easing","eastbound","eastcoast","easter","eastward","eatable","eaten","eatery","eating","eats","ebay","ebony","ebook","ecard","eccentric","echo","eclair","eclipse","ecologist","ecology","economic","economist","economy","ecosphere","ecosystem","edge","edginess","edging","edgy","edition","editor","educated","education","educator","eel","effective","effects","efficient","effort","eggbeater","egging","eggnog","eggplant","eggshell","egomaniac","egotism","egotistic","either","eject","elaborate","elastic","elated","elbow","eldercare","elderly","eldest","electable","election","elective","elephant","elevate","elevating","elevation","elevator","eleven","elf","eligible","eligibly","eliminate","elite","elitism","elixir","elk","ellipse","elliptic","elm","elongated","elope","eloquence","eloquent","elsewhere","elude","elusive","elves","email","embargo","embark","embassy","embattled","embellish","ember","embezzle","emblaze","emblem","embody","embolism","emboss","embroider","emcee","emerald","emergency","emission","emit","emote","emoticon","emotion","empathic","empathy","emperor","emphases","emphasis","emphasize","emphatic","empirical","employed","employee","employer","emporium","empower","emptier","emptiness","empty","emu","enable","enactment","enamel","enchanted","enchilada","encircle","enclose","enclosure","encode","encore","encounter","encourage","encroach","encrust","encrypt","endanger","endeared","endearing","ended","ending","endless","endnote","endocrine","endorphin","endorse","endowment","endpoint","endurable","endurance","enduring","energetic","energize","energy","enforced","enforcer","engaged","engaging","engine","engorge","engraved","engraver","engraving","engross","engulf","enhance","enigmatic","enjoyable","enjoyably","enjoyer","enjoying","enjoyment","enlarged","enlarging","enlighten","enlisted","enquirer","enrage","enrich","enroll","enslave","ensnare","ensure","entail","entangled","entering","entertain","enticing","entire","entitle","entity","entomb","entourage","entrap","entree","entrench","entrust","entryway","entwine","enunciate","envelope","enviable","enviably","envious","envision","envoy","envy","enzyme","epic","epidemic","epidermal","epidermis","epidural","epilepsy","epileptic","epilogue","epiphany","episode","equal","equate","equation","equator","equinox","equipment","equity","equivocal","eradicate","erasable","erased","eraser","erasure","ergonomic","errand","errant","erratic","error","erupt","escalate","escalator","escapable","escapade","escapist","escargot","eskimo","esophagus","espionage","espresso","esquire","essay","essence","essential","establish","estate","esteemed","estimate","estimator","estranged","estrogen","etching","eternal","eternity","ethanol","ether","ethically","ethics","euphemism","evacuate","evacuee","evade","evaluate","evaluator","evaporate","evasion","evasive","even","everglade","evergreen","everybody","everyday","everyone","evict","evidence","evident","evil","evoke","evolution","evolve","exact","exalted","example","excavate","excavator","exceeding","exception","excess","exchange","excitable","exciting","exclaim","exclude","excluding","exclusion","exclusive","excretion","excretory","excursion","excusable","excusably","excuse","exemplary","exemplify","exemption","exerciser","exert","exes","exfoliate","exhale","exhaust","exhume","exile","existing","exit","exodus","exonerate","exorcism","exorcist","expand","expanse","expansion","expansive","expectant","expedited","expediter","expel","expend","expenses","expensive","expert","expire","expiring","explain","expletive","explicit","explode","exploit","explore","exploring","exponent","exporter","exposable","expose","exposure","express","expulsion","exquisite","extended","extending","extent","extenuate","exterior","external","extinct","extortion","extradite","extras","extrovert","extrude","extruding","exuberant","fable","fabric","fabulous","facebook","facecloth","facedown","faceless","facelift","faceplate","faceted","facial","facility","facing","facsimile","faction","factoid","factor","factsheet","factual","faculty","fade","fading","failing","falcon","fall","false","falsify","fame","familiar","family","famine","famished","fanatic","fancied","fanciness","fancy","fanfare","fang","fanning","fantasize","fantastic","fantasy","fascism","fastball","faster","fasting","fastness","faucet","favorable","favorably","favored","favoring","favorite","fax","feast","federal","fedora","feeble","feed","feel","feisty","feline","felt-tip","feminine","feminism","feminist","feminize","femur","fence","fencing","fender","ferment","fernlike","ferocious","ferocity","ferret","ferris","ferry","fervor","fester","festival","festive","festivity","fetal","fetch","fever","fiber","fiction","fiddle","fiddling","fidelity","fidgeting","fidgety","fifteen","fifth","fiftieth","fifty","figment","figure","figurine","filing","filled","filler","filling","film","filter","filth","filtrate","finale","finalist","finalize","finally","finance","financial","finch","fineness","finer","finicky","finished","finisher","finishing","finite","finless","finlike","fiscally","fit","five","flaccid","flagman","flagpole","flagship","flagstick","flagstone","flail","flakily","flaky","flame","flammable","flanked","flanking","flannels","flap","flaring","flashback","flashbulb","flashcard","flashily","flashing","flashy","flask","flatbed","flatfoot","flatly","flatness","flatten","flattered","flatterer","flattery","flattop","flatware","flatworm","flavored","flavorful","flavoring","flaxseed","fled","fleshed","fleshy","flick","flier","flight","flinch","fling","flint","flip","flirt","float","flock","flogging","flop","floral","florist","floss","flounder","flyable","flyaway","flyer","flying","flyover","flypaper","foam","foe","fog","foil","folic","folk","follicle","follow","fondling","fondly","fondness","fondue","font","food","fool","footage","football","footbath","footboard","footer","footgear","foothill","foothold","footing","footless","footman","footnote","footpad","footpath","footprint","footrest","footsie","footsore","footwear","footwork","fossil","foster","founder","founding","fountain","fox","foyer","fraction","fracture","fragile","fragility","fragment","fragrance","fragrant","frail","frame","framing","frantic","fraternal","frayed","fraying","frays","freckled","freckles","freebase","freebee","freebie","freedom","freefall","freehand","freeing","freeload","freely","freemason","freeness","freestyle","freeware","freeway","freewill","freezable","freezing","freight","french","frenzied","frenzy","frequency","frequent","fresh","fretful","fretted","friction","friday","fridge","fried","friend","frighten","frightful","frigidity","frigidly","frill","fringe","frisbee","frisk","fritter","frivolous","frolic","from","front","frostbite","frosted","frostily","frosting","frostlike","frosty","froth","frown","frozen","fructose","frugality","frugally","fruit","frustrate","frying","gab","gaffe","gag","gainfully","gaining","gains","gala","gallantly","galleria","gallery","galley","gallon","gallows","gallstone","galore","galvanize","gambling","game","gaming","gamma","gander","gangly","gangrene","gangway","gap","garage","garbage","garden","gargle","garland","garlic","garment","garnet","garnish","garter","gas","gatherer","gathering","gating","gauging","gauntlet","gauze","gave","gawk","gazing","gear","gecko","geek","geiger","gem","gender","generic","generous","genetics","genre","gentile","gentleman","gently","gents","geography","geologic","geologist","geology","geometric","geometry","geranium","gerbil","geriatric","germicide","germinate","germless","germproof","gestate","gestation","gesture","getaway","getting","getup","giant","gibberish","giblet","giddily","giddiness","giddy","gift","gigabyte","gigahertz","gigantic","giggle","giggling","giggly","gigolo","gilled","gills","gimmick","girdle","giveaway","given","giver","giving","gizmo","gizzard","glacial","glacier","glade","gladiator","gladly","glamorous","glamour","glance","glancing","glandular","glare","glaring","glass","glaucoma","glazing","gleaming","gleeful","glider","gliding","glimmer","glimpse","glisten","glitch","glitter","glitzy","gloater","gloating","gloomily","gloomy","glorified","glorifier","glorify","glorious","glory","gloss","glove","glowing","glowworm","glucose","glue","gluten","glutinous","glutton","gnarly","gnat","goal","goatskin","goes","goggles","going","goldfish","goldmine","goldsmith","golf","goliath","gonad","gondola","gone","gong","good","gooey","goofball","goofiness","goofy","google","goon","gopher","gore","gorged","gorgeous","gory","gosling","gossip","gothic","gotten","gout","gown","grab","graceful","graceless","gracious","gradation","graded","grader","gradient","grading","gradually","graduate","graffiti","grafted","grafting","grain","granddad","grandkid","grandly","grandma","grandpa","grandson","granite","granny","granola","grant","granular","grape","graph","grapple","grappling","grasp","grass","gratified","gratify","grating","gratitude","gratuity","gravel","graveness","graves","graveyard","gravitate","gravity","gravy","gray","grazing","greasily","greedily","greedless","greedy","green","greeter","greeting","grew","greyhound","grid","grief","grievance","grieving","grievous","grill","grimace","grimacing","grime","griminess","grimy","grinch","grinning","grip","gristle","grit","groggily","groggy","groin","groom","groove","grooving","groovy","grope","ground","grouped","grout","grove","grower","growing","growl","grub","grudge","grudging","grueling","gruffly","grumble","grumbling","grumbly","grumpily","grunge","grunt","guacamole","guidable","guidance","guide","guiding","guileless","guise","gulf","gullible","gully","gulp","gumball","gumdrop","gumminess","gumming","gummy","gurgle","gurgling","guru","gush","gusto","gusty","gutless","guts","gutter","guy","guzzler","gyration","habitable","habitant","habitat","habitual","hacked","hacker","hacking","hacksaw","had","haggler","haiku","half","halogen","halt","halved","halves","hamburger","hamlet","hammock","hamper","hamster","hamstring","handbag","handball","handbook","handbrake","handcart","handclap","handclasp","handcraft","handcuff","handed","handful","handgrip","handgun","handheld","handiness","handiwork","handlebar","handled","handler","handling","handmade","handoff","handpick","handprint","handrail","handsaw","handset","handsfree","handshake","handstand","handwash","handwork","handwoven","handwrite","handyman","hangnail","hangout","hangover","hangup","hankering","hankie","hanky","haphazard","happening","happier","happiest","happily","happiness","happy","harbor","hardcopy","hardcore","hardcover","harddisk","hardened","hardener","hardening","hardhat","hardhead","hardiness","hardly","hardness","hardship","hardware","hardwired","hardwood","hardy","harmful","harmless","harmonica","harmonics","harmonize","harmony","harness","harpist","harsh","harvest","hash","hassle","haste","hastily","hastiness","hasty","hatbox","hatchback","hatchery","hatchet","hatching","hatchling","hate","hatless","hatred","haunt","haven","hazard","hazelnut","hazily","haziness","hazing","hazy","headache","headband","headboard","headcount","headdress","headed","header","headfirst","headgear","heading","headlamp","headless","headlock","headphone","headpiece","headrest","headroom","headscarf","headset","headsman","headstand","headstone","headway","headwear","heap","heat","heave","heavily","heaviness","heaving","hedge","hedging","heftiness","hefty","helium","helmet","helper","helpful","helping","helpless","helpline","hemlock","hemstitch","hence","henchman","henna","herald","herbal","herbicide","herbs","heritage","hermit","heroics","heroism","herring","herself","hertz","hesitancy","hesitant","hesitate","hexagon","hexagram","hubcap","huddle","huddling","huff","hug","hula","hulk","hull","human","humble","humbling","humbly","humid","humiliate","humility","humming","hummus","humongous","humorist","humorless","humorous","humpback","humped","humvee","hunchback","hundredth","hunger","hungrily","hungry","hunk","hunter","hunting","huntress","huntsman","hurdle","hurled","hurler","hurling","hurray","hurricane","hurried","hurry","hurt","husband","hush","husked","huskiness","hut","hybrid","hydrant","hydrated","hydration","hydrogen","hydroxide","hyperlink","hypertext","hyphen","hypnoses","hypnosis","hypnotic","hypnotism","hypnotist","hypnotize","hypocrisy","hypocrite","ibuprofen","ice","iciness","icing","icky","icon","icy","idealism","idealist","idealize","ideally","idealness","identical","identify","identity","ideology","idiocy","idiom","idly","igloo","ignition","ignore","iguana","illicitly","illusion","illusive","image","imaginary","imagines","imaging","imbecile","imitate","imitation","immature","immerse","immersion","imminent","immobile","immodest","immorally","immortal","immovable","immovably","immunity","immunize","impaired","impale","impart","impatient","impeach","impeding","impending","imperfect","imperial","impish","implant","implement","implicate","implicit","implode","implosion","implosive","imply","impolite","important","importer","impose","imposing","impotence","impotency","impotent","impound","imprecise","imprint","imprison","impromptu","improper","improve","improving","improvise","imprudent","impulse","impulsive","impure","impurity","iodine","iodize","ion","ipad","iphone","ipod","irate","irk","iron","irregular","irrigate","irritable","irritably","irritant","irritate","islamic","islamist","isolated","isolating","isolation","isotope","issue","issuing","italicize","italics","item","itinerary","itunes","ivory","ivy","jab","jackal","jacket","jackknife","jackpot","jailbird","jailbreak","jailer","jailhouse","jalapeno","jam","janitor","january","jargon","jarring","jasmine","jaundice","jaunt","java","jawed","jawless","jawline","jaws","jaybird","jaywalker","jazz","jeep","jeeringly","jellied","jelly","jersey","jester","jet","jiffy","jigsaw","jimmy","jingle","jingling","jinx","jitters","jittery","job","jockey","jockstrap","jogger","jogging","john","joining","jokester","jokingly","jolliness","jolly","jolt","jot","jovial","joyfully","joylessly","joyous","joyride","joystick","jubilance","jubilant","judge","judgingly","judicial","judiciary","judo","juggle","juggling","jugular","juice","juiciness","juicy","jujitsu","jukebox","july","jumble","jumbo","jump","junction","juncture","june","junior","juniper","junkie","junkman","junkyard","jurist","juror","jury","justice","justifier","justify","justly","justness","juvenile","kabob","kangaroo","karaoke","karate","karma","kebab","keenly","keenness","keep","keg","kelp","kennel","kept","kerchief","kerosene","kettle","kick","kiln","kilobyte","kilogram","kilometer","kilowatt","kilt","kimono","kindle","kindling","kindly","kindness","kindred","kinetic","kinfolk","king","kinship","kinsman","kinswoman","kissable","kisser","kissing","kitchen","kite","kitten","kitty","kiwi","kleenex","knapsack","knee","knelt","knickers","knoll","koala","kooky","kosher","krypton","kudos","kung","labored","laborer","laboring","laborious","labrador","ladder","ladies","ladle","ladybug","ladylike","lagged","lagging","lagoon","lair","lake","lance","landed","landfall","landfill","landing","landlady","landless","landline","landlord","landmark","landmass","landmine","landowner","landscape","landside","landslide","language","lankiness","lanky","lantern","lapdog","lapel","lapped","lapping","laptop","lard","large","lark","lash","lasso","last","latch","late","lather","latitude","latrine","latter","latticed","launch","launder","laundry","laurel","lavender","lavish","laxative","lazily","laziness","lazy","lecturer","left","legacy","legal","legend","legged","leggings","legible","legibly","legislate","lego","legroom","legume","legwarmer","legwork","lemon","lend","length","lens","lent","leotard","lesser","letdown","lethargic","lethargy","letter","lettuce","level","leverage","levers","levitate","levitator","liability","liable","liberty","librarian","library","licking","licorice","lid","life","lifter","lifting","liftoff","ligament","likely","likeness","likewise","liking","lilac","lilly","lily","limb","limeade","limelight","limes","limit","limping","limpness","line","lingo","linguini","linguist","lining","linked","linoleum","linseed","lint","lion","lip","liquefy","liqueur","liquid","lisp","list","litigate","litigator","litmus","litter","little","livable","lived","lively","liver","livestock","lividly","living","lizard","lubricant","lubricate","lucid","luckily","luckiness","luckless","lucrative","ludicrous","lugged","lukewarm","lullaby","lumber","luminance","luminous","lumpiness","lumping","lumpish","lunacy","lunar","lunchbox","luncheon","lunchroom","lunchtime","lung","lurch","lure","luridness","lurk","lushly","lushness","luster","lustfully","lustily","lustiness","lustrous","lusty","luxurious","luxury","lying","lyrically","lyricism","lyricist","lyrics","macarena","macaroni","macaw","mace","machine","machinist","magazine","magenta","maggot","magical","magician","magma","magnesium","magnetic","magnetism","magnetize","magnifier","magnify","magnitude","magnolia","mahogany","maimed","majestic","majesty","majorette","majority","makeover","maker","makeshift","making","malformed","malt","mama","mammal","mammary","mammogram","manager","managing","manatee","mandarin","mandate","mandatory","mandolin","manger","mangle","mango","mangy","manhandle","manhole","manhood","manhunt","manicotti","manicure","manifesto","manila","mankind","manlike","manliness","manly","manmade","manned","mannish","manor","manpower","mantis","mantra","manual","many","map","marathon","marauding","marbled","marbles","marbling","march","mardi","margarine","margarita","margin","marigold","marina","marine","marital","maritime","marlin","marmalade","maroon","married","marrow","marry","marshland","marshy","marsupial","marvelous","marxism","mascot","masculine","mashed","mashing","massager","masses","massive","mastiff","matador","matchbook","matchbox","matcher","matching","matchless","material","maternal","maternity","math","mating","matriarch","matrimony","matrix","matron","matted","matter","maturely","maturing","maturity","mauve","maverick","maximize","maximum","maybe","mayday","mayflower","moaner","moaning","mobile","mobility","mobilize","mobster","mocha","mocker","mockup","modified","modify","modular","modulator","module","moisten","moistness","moisture","molar","molasses","mold","molecular","molecule","molehill","mollusk","mom","monastery","monday","monetary","monetize","moneybags","moneyless","moneywise","mongoose","mongrel","monitor","monkhood","monogamy","monogram","monologue","monopoly","monorail","monotone","monotype","monoxide","monsieur","monsoon","monstrous","monthly","monument","moocher","moodiness","moody","mooing","moonbeam","mooned","moonlight","moonlike","moonlit","moonrise","moonscape","moonshine","moonstone","moonwalk","mop","morale","morality","morally","morbidity","morbidly","morphine","morphing","morse","mortality","mortally","mortician","mortified","mortify","mortuary","mosaic","mossy","most","mothball","mothproof","motion","motivate","motivator","motive","motocross","motor","motto","mountable","mountain","mounted","mounting","mourner","mournful","mouse","mousiness","moustache","mousy","mouth","movable","move","movie","moving","mower","mowing","much","muck","mud","mug","mulberry","mulch","mule","mulled","mullets","multiple","multiply","multitask","multitude","mumble","mumbling","mumbo","mummified","mummify","mummy","mumps","munchkin","mundane","municipal","muppet","mural","murkiness","murky","murmuring","muscular","museum","mushily","mushiness","mushroom","mushy","music","musket","muskiness","musky","mustang","mustard","muster","mustiness","musty","mutable","mutate","mutation","mute","mutilated","mutilator","mutiny","mutt","mutual","muzzle","myself","myspace","mystified","mystify","myth","nacho","nag","nail","name","naming","nanny","nanometer","nape","napkin","napped","napping","nappy","narrow","nastily","nastiness","national","native","nativity","natural","nature","naturist","nautical","navigate","navigator","navy","nearby","nearest","nearly","nearness","neatly","neatness","nebula","nebulizer","nectar","negate","negation","negative","neglector","negligee","negligent","negotiate","nemeses","nemesis","neon","nephew","nerd","nervous","nervy","nest","net","neurology","neuron","neurosis","neurotic","neuter","neutron","never","next","nibble","nickname","nicotine","niece","nifty","nimble","nimbly","nineteen","ninetieth","ninja","nintendo","ninth","nuclear","nuclei","nucleus","nugget","nullify","number","numbing","numbly","numbness","numeral","numerate","numerator","numeric","numerous","nuptials","nursery","nursing","nurture","nutcase","nutlike","nutmeg","nutrient","nutshell","nuttiness","nutty","nuzzle","nylon","oaf","oak","oasis","oat","obedience","obedient","obituary","object","obligate","obliged","oblivion","oblivious","oblong","obnoxious","oboe","obscure","obscurity","observant","observer","observing","obsessed","obsession","obsessive","obsolete","obstacle","obstinate","obstruct","obtain","obtrusive","obtuse","obvious","occultist","occupancy","occupant","occupier","occupy","ocean","ocelot","octagon","octane","october","octopus","ogle","oil","oink","ointment","okay","old","olive","olympics","omega","omen","ominous","omission","omit","omnivore","onboard","oncoming","ongoing","onion","online","onlooker","only","onscreen","onset","onshore","onslaught","onstage","onto","onward","onyx","oops","ooze","oozy","opacity","opal","open","operable","operate","operating","operation","operative","operator","opium","opossum","opponent","oppose","opposing","opposite","oppressed","oppressor","opt","opulently","osmosis","other","otter","ouch","ought","ounce","outage","outback","outbid","outboard","outbound","outbreak","outburst","outcast","outclass","outcome","outdated","outdoors","outer","outfield","outfit","outflank","outgoing","outgrow","outhouse","outing","outlast","outlet","outline","outlook","outlying","outmatch","outmost","outnumber","outplayed","outpost","outpour","output","outrage","outrank","outreach","outright","outscore","outsell","outshine","outshoot","outsider","outskirts","outsmart","outsource","outspoken","outtakes","outthink","outward","outweigh","outwit","oval","ovary","oven","overact","overall","overarch","overbid","overbill","overbite","overblown","overboard","overbook","overbuilt","overcast","overcoat","overcome","overcook","overcrowd","overdraft","overdrawn","overdress","overdrive","overdue","overeager","overeater","overexert","overfed","overfeed","overfill","overflow","overfull","overgrown","overhand","overhang","overhaul","overhead","overhear","overheat","overhung","overjoyed","overkill","overlabor","overlaid","overlap","overlay","overload","overlook","overlord","overlying","overnight","overpass","overpay","overplant","overplay","overpower","overprice","overrate","overreach","overreact","override","overripe","overrule","overrun","overshoot","overshot","oversight","oversized","oversleep","oversold","overspend","overstate","overstay","overstep","overstock","overstuff","oversweet","overtake","overthrow","overtime","overtly","overtone","overture","overturn","overuse","overvalue","overview","overwrite","owl","oxford","oxidant","oxidation","oxidize","oxidizing","oxygen","oxymoron","oyster","ozone","paced","pacemaker","pacific","pacifier","pacifism","pacifist","pacify","padded","padding","paddle","paddling","padlock","pagan","pager","paging","pajamas","palace","palatable","palm","palpable","palpitate","paltry","pampered","pamperer","pampers","pamphlet","panama","pancake","pancreas","panda","pandemic","pang","panhandle","panic","panning","panorama","panoramic","panther","pantomime","pantry","pants","pantyhose","paparazzi","papaya","paper","paprika","papyrus","parabola","parachute","parade","paradox","paragraph","parakeet","paralegal","paralyses","paralysis","paralyze","paramedic","parameter","paramount","parasail","parasite","parasitic","parcel","parched","parchment","pardon","parish","parka","parking","parkway","parlor","parmesan","parole","parrot","parsley","parsnip","partake","parted","parting","partition","partly","partner","partridge","party","passable","passably","passage","passcode","passenger","passerby","passing","passion","passive","passivism","passover","passport","password","pasta","pasted","pastel","pastime","pastor","pastrami","pasture","pasty","patchwork","patchy","paternal","paternity","path","patience","patient","patio","patriarch","patriot","patrol","patronage","patronize","pauper","pavement","paver","pavestone","pavilion","paving","pawing","payable","payback","paycheck","payday","payee","payer","paying","payment","payphone","payroll","pebble","pebbly","pecan","pectin","peculiar","peddling","pediatric","pedicure","pedigree","pedometer","pegboard","pelican","pellet","pelt","pelvis","penalize","penalty","pencil","pendant","pending","penholder","penknife","pennant","penniless","penny","penpal","pension","pentagon","pentagram","pep","perceive","percent","perch","percolate","perennial","perfected","perfectly","perfume","periscope","perish","perjurer","perjury","perkiness","perky","perm","peroxide","perpetual","perplexed","persecute","persevere","persuaded","persuader","pesky","peso","pessimism","pessimist","pester","pesticide","petal","petite","petition","petri","petroleum","petted","petticoat","pettiness","petty","petunia","phantom","phobia","phoenix","phonebook","phoney","phonics","phoniness","phony","phosphate","photo","phrase","phrasing","placard","placate","placidly","plank","planner","plant","plasma","plaster","plastic","plated","platform","plating","platinum","platonic","platter","platypus","plausible","plausibly","playable","playback","player","playful","playgroup","playhouse","playing","playlist","playmaker","playmate","playoff","playpen","playroom","playset","plaything","playtime","plaza","pleading","pleat","pledge","plentiful","plenty","plethora","plexiglas","pliable","plod","plop","plot","plow","ploy","pluck","plug","plunder","plunging","plural","plus","plutonium","plywood","poach","pod","poem","poet","pogo","pointed","pointer","pointing","pointless","pointy","poise","poison","poker","poking","polar","police","policy","polio","polish","politely","polka","polo","polyester","polygon","polygraph","polymer","poncho","pond","pony","popcorn","pope","poplar","popper","poppy","popsicle","populace","popular","populate","porcupine","pork","porous","porridge","portable","portal","portfolio","porthole","portion","portly","portside","poser","posh","posing","possible","possibly","possum","postage","postal","postbox","postcard","posted","poster","posting","postnasal","posture","postwar","pouch","pounce","pouncing","pound","pouring","pout","powdered","powdering","powdery","power","powwow","pox","praising","prance","prancing","pranker","prankish","prankster","prayer","praying","preacher","preaching","preachy","preamble","precinct","precise","precision","precook","precut","predator","predefine","predict","preface","prefix","preflight","preformed","pregame","pregnancy","pregnant","preheated","prelaunch","prelaw","prelude","premiere","premises","premium","prenatal","preoccupy","preorder","prepaid","prepay","preplan","preppy","preschool","prescribe","preseason","preset","preshow","president","presoak","press","presume","presuming","preteen","pretended","pretender","pretense","pretext","pretty","pretzel","prevail","prevalent","prevent","preview","previous","prewar","prewashed","prideful","pried","primal","primarily","primary","primate","primer","primp","princess","print","prior","prism","prison","prissy","pristine","privacy","private","privatize","prize","proactive","probable","probably","probation","probe","probing","probiotic","problem","procedure","process","proclaim","procreate","procurer","prodigal","prodigy","produce","product","profane","profanity","professed","professor","profile","profound","profusely","progeny","prognosis","program","progress","projector","prologue","prolonged","promenade","prominent","promoter","promotion","prompter","promptly","prone","prong","pronounce","pronto","proofing","proofread","proofs","propeller","properly","property","proponent","proposal","propose","props","prorate","protector","protegee","proton","prototype","protozoan","protract","protrude","proud","provable","proved","proven","provided","provider","providing","province","proving","provoke","provoking","provolone","prowess","prowler","prowling","proximity","proxy","prozac","prude","prudishly","prune","pruning","pry","psychic","public","publisher","pucker","pueblo","pug","pull","pulmonary","pulp","pulsate","pulse","pulverize","puma","pumice","pummel","punch","punctual","punctuate","punctured","pungent","punisher","punk","pupil","puppet","puppy","purchase","pureblood","purebred","purely","pureness","purgatory","purge","purging","purifier","purify","purist","puritan","purity","purple","purplish","purposely","purr","purse","pursuable","pursuant","pursuit","purveyor","pushcart","pushchair","pusher","pushiness","pushing","pushover","pushpin","pushup","pushy","putdown","putt","puzzle","puzzling","pyramid","pyromania","python","quack","quadrant","quail","quaintly","quake","quaking","qualified","qualifier","qualify","quality","qualm","quantum","quarrel","quarry","quartered","quarterly","quarters","quartet","quench","query","quicken","quickly","quickness","quicksand","quickstep","quiet","quill","quilt","quintet","quintuple","quirk","quit","quiver","quizzical","quotable","quotation","quote","rabid","race","racing","racism","rack","racoon","radar","radial","radiance","radiantly","radiated","radiation","radiator","radio","radish","raffle","raft","rage","ragged","raging","ragweed","raider","railcar","railing","railroad","railway","raisin","rake","raking","rally","ramble","rambling","ramp","ramrod","ranch","rancidity","random","ranged","ranger","ranging","ranked","ranking","ransack","ranting","rants","rare","rarity","rascal","rash","rasping","ravage","raven","ravine","raving","ravioli","ravishing","reabsorb","reach","reacquire","reaction","reactive","reactor","reaffirm","ream","reanalyze","reappear","reapply","reappoint","reapprove","rearrange","rearview","reason","reassign","reassure","reattach","reawake","rebalance","rebate","rebel","rebirth","reboot","reborn","rebound","rebuff","rebuild","rebuilt","reburial","rebuttal","recall","recant","recapture","recast","recede","recent","recess","recharger","recipient","recital","recite","reckless","reclaim","recliner","reclining","recluse","reclusive","recognize","recoil","recollect","recolor","reconcile","reconfirm","reconvene","recopy","record","recount","recoup","recovery","recreate","rectal","rectangle","rectified","rectify","recycled","recycler","recycling","reemerge","reenact","reenter","reentry","reexamine","referable","referee","reference","refill","refinance","refined","refinery","refining","refinish","reflected","reflector","reflex","reflux","refocus","refold","reforest","reformat","reformed","reformer","reformist","refract","refrain","refreeze","refresh","refried","refueling","refund","refurbish","refurnish","refusal","refuse","refusing","refutable","refute","regain","regalia","regally","reggae","regime","region","register","registrar","registry","regress","regretful","regroup","regular","regulate","regulator","rehab","reheat","rehire","rehydrate","reimburse","reissue","reiterate","rejoice","rejoicing","rejoin","rekindle","relapse","relapsing","relatable","related","relation","relative","relax","relay","relearn","release","relenting","reliable","reliably","reliance","reliant","relic","relieve","relieving","relight","relish","relive","reload","relocate","relock","reluctant","rely","remake","remark","remarry","rematch","remedial","remedy","remember","reminder","remindful","remission","remix","remnant","remodeler","remold","remorse","remote","removable","removal","removed","remover","removing","rename","renderer","rendering","rendition","renegade","renewable","renewably","renewal","renewed","renounce","renovate","renovator","rentable","rental","rented","renter","reoccupy","reoccur","reopen","reorder","repackage","repacking","repaint","repair","repave","repaying","repayment","repeal","repeated","repeater","repent","rephrase","replace","replay","replica","reply","reporter","repose","repossess","repost","repressed","reprimand","reprint","reprise","reproach","reprocess","reproduce","reprogram","reps","reptile","reptilian","repugnant","repulsion","repulsive","repurpose","reputable","reputably","request","require","requisite","reroute","rerun","resale","resample","rescuer","reseal","research","reselect","reseller","resemble","resend","resent","reset","reshape","reshoot","reshuffle","residence","residency","resident","residual","residue","resigned","resilient","resistant","resisting","resize","resolute","resolved","resonant","resonate","resort","resource","respect","resubmit","result","resume","resupply","resurface","resurrect","retail","retainer","retaining","retake","retaliate","retention","rethink","retinal","retired","retiree","retiring","retold","retool","retorted","retouch","retrace","retract","retrain","retread","retreat","retrial","retrieval","retriever","retry","return","retying","retype","reunion","reunite","reusable","reuse","reveal","reveler","revenge","revenue","reverb","revered","reverence","reverend","reversal","reverse","reversing","reversion","revert","revisable","revise","revision","revisit","revivable","revival","reviver","reviving","revocable","revoke","revolt","revolver","revolving","reward","rewash","rewind","rewire","reword","rework","rewrap","rewrite","rhyme","ribbon","ribcage","rice","riches","richly","richness","rickety","ricotta","riddance","ridden","ride","riding","rifling","rift","rigging","rigid","rigor","rimless","rimmed","rind","rink","rinse","rinsing","riot","ripcord","ripeness","ripening","ripping","ripple","rippling","riptide","rise","rising","risk","risotto","ritalin","ritzy","rival","riverbank","riverbed","riverboat","riverside","riveter","riveting","roamer","roaming","roast","robbing","robe","robin","robotics","robust","rockband","rocker","rocket","rockfish","rockiness","rocking","rocklike","rockslide","rockstar","rocky","rogue","roman","romp","rope","roping","roster","rosy","rotten","rotting","rotunda","roulette","rounding","roundish","roundness","roundup","roundworm","routine","routing","rover","roving","royal","rubbed","rubber","rubbing","rubble","rubdown","ruby","ruckus","rudder","rug","ruined","rule","rumble","rumbling","rummage","rumor","runaround","rundown","runner","running","runny","runt","runway","rupture","rural","ruse","rush","rust","rut","sabbath","sabotage","sacrament","sacred","sacrifice","sadden","saddlebag","saddled","saddling","sadly","sadness","safari","safeguard","safehouse","safely","safeness","saffron","saga","sage","sagging","saggy","said","saint","sake","salad","salami","salaried","salary","saline","salon","saloon","salsa","salt","salutary","salute","salvage","salvaging","salvation","same","sample","sampling","sanction","sanctity","sanctuary","sandal","sandbag","sandbank","sandbar","sandblast","sandbox","sanded","sandfish","sanding","sandlot","sandpaper","sandpit","sandstone","sandstorm","sandworm","sandy","sanitary","sanitizer","sank","santa","sapling","sappiness","sappy","sarcasm","sarcastic","sardine","sash","sasquatch","sassy","satchel","satiable","satin","satirical","satisfied","satisfy","saturate","saturday","sauciness","saucy","sauna","savage","savanna","saved","savings","savior","savor","saxophone","say","scabbed","scabby","scalded","scalding","scale","scaling","scallion","scallop","scalping","scam","scandal","scanner","scanning","scant","scapegoat","scarce","scarcity","scarecrow","scared","scarf","scarily","scariness","scarring","scary","scavenger","scenic","schedule","schematic","scheme","scheming","schilling","schnapps","scholar","science","scientist","scion","scoff","scolding","scone","scoop","scooter","scope","scorch","scorebook","scorecard","scored","scoreless","scorer","scoring","scorn","scorpion","scotch","scoundrel","scoured","scouring","scouting","scouts","scowling","scrabble","scraggly","scrambled","scrambler","scrap","scratch","scrawny","screen","scribble","scribe","scribing","scrimmage","script","scroll","scrooge","scrounger","scrubbed","scrubber","scruffy","scrunch","scrutiny","scuba","scuff","sculptor","sculpture","scurvy","scuttle","secluded","secluding","seclusion","second","secrecy","secret","sectional","sector","secular","securely","security","sedan","sedate","sedation","sedative","sediment","seduce","seducing","segment","seismic","seizing","seldom","selected","selection","selective","selector","self","seltzer","semantic","semester","semicolon","semifinal","seminar","semisoft","semisweet","senate","senator","send","senior","senorita","sensation","sensitive","sensitize","sensually","sensuous","sepia","september","septic","septum","sequel","sequence","sequester","series","sermon","serotonin","serpent","serrated","serve","service","serving","sesame","sessions","setback","setting","settle","settling","setup","sevenfold","seventeen","seventh","seventy","severity","shabby","shack","shaded","shadily","shadiness","shading","shadow","shady","shaft","shakable","shakily","shakiness","shaking","shaky","shale","shallot","shallow","shame","shampoo","shamrock","shank","shanty","shape","shaping","share","sharpener","sharper","sharpie","sharply","sharpness","shawl","sheath","shed","sheep","sheet","shelf","shell","shelter","shelve","shelving","sherry","shield","shifter","shifting","shiftless","shifty","shimmer","shimmy","shindig","shine","shingle","shininess","shining","shiny","ship","shirt","shivering","shock","shone","shoplift","shopper","shopping","shoptalk","shore","shortage","shortcake","shortcut","shorten","shorter","shorthand","shortlist","shortly","shortness","shorts","shortwave","shorty","shout","shove","showbiz","showcase","showdown","shower","showgirl","showing","showman","shown","showoff","showpiece","showplace","showroom","showy","shrank","shrapnel","shredder","shredding","shrewdly","shriek","shrill","shrimp","shrine","shrink","shrivel","shrouded","shrubbery","shrubs","shrug","shrunk","shucking","shudder","shuffle","shuffling","shun","shush","shut","shy","siamese","siberian","sibling","siding","sierra","siesta","sift","sighing","silenced","silencer","silent","silica","silicon","silk","silliness","silly","silo","silt","silver","similarly","simile","simmering","simple","simplify","simply","sincere","sincerity","singer","singing","single","singular","sinister","sinless","sinner","sinuous","sip","siren","sister","sitcom","sitter","sitting","situated","situation","sixfold","sixteen","sixth","sixties","sixtieth","sixtyfold","sizable","sizably","size","sizing","sizzle","sizzling","skater","skating","skedaddle","skeletal","skeleton","skeptic","sketch","skewed","skewer","skid","skied","skier","skies","skiing","skilled","skillet","skillful","skimmed","skimmer","skimming","skimpily","skincare","skinhead","skinless","skinning","skinny","skintight","skipper","skipping","skirmish","skirt","skittle","skydiver","skylight","skyline","skype","skyrocket","skyward","slab","slacked","slacker","slacking","slackness","slacks","slain","slam","slander","slang","slapping","slapstick","slashed","slashing","slate","slather","slaw","sled","sleek","sleep","sleet","sleeve","slept","sliceable","sliced","slicer","slicing","slick","slider","slideshow","sliding","slighted","slighting","slightly","slimness","slimy","slinging","slingshot","slinky","slip","slit","sliver","slobbery","slogan","sloped","sloping","sloppily","sloppy","slot","slouching","slouchy","sludge","slug","slum","slurp","slush","sly","small","smartly","smartness","smasher","smashing","smashup","smell","smelting","smile","smilingly","smirk","smite","smith","smitten","smock","smog","smoked","smokeless","smokiness","smoking","smoky","smolder","smooth","smother","smudge","smudgy","smuggler","smuggling","smugly","smugness","snack","snagged","snaking","snap","snare","snarl","snazzy","sneak","sneer","sneeze","sneezing","snide","sniff","snippet","snipping","snitch","snooper","snooze","snore","snoring","snorkel","snort","snout","snowbird","snowboard","snowbound","snowcap","snowdrift","snowdrop","snowfall","snowfield","snowflake","snowiness","snowless","snowman","snowplow","snowshoe","snowstorm","snowsuit","snowy","snub","snuff","snuggle","snugly","snugness","speak","spearfish","spearhead","spearman","spearmint","species","specimen","specked","speckled","specks","spectacle","spectator","spectrum","speculate","speech","speed","spellbind","speller","spelling","spendable","spender","spending","spent","spew","sphere","spherical","sphinx","spider","spied","spiffy","spill","spilt","spinach","spinal","spindle","spinner","spinning","spinout","spinster","spiny","spiral","spirited","spiritism","spirits","spiritual","splashed","splashing","splashy","splatter","spleen","splendid","splendor","splice","splicing","splinter","splotchy","splurge","spoilage","spoiled","spoiler","spoiling","spoils","spoken","spokesman","sponge","spongy","sponsor","spoof","spookily","spooky","spool","spoon","spore","sporting","sports","sporty","spotless","spotlight","spotted","spotter","spotting","spotty","spousal","spouse","spout","sprain","sprang","sprawl","spray","spree","sprig","spring","sprinkled","sprinkler","sprint","sprite","sprout","spruce","sprung","spry","spud","spur","sputter","spyglass","squabble","squad","squall","squander","squash","squatted","squatter","squatting","squeak","squealer","squealing","squeamish","squeegee","squeeze","squeezing","squid","squiggle","squiggly","squint","squire","squirt","squishier","squishy","stability","stabilize","stable","stack","stadium","staff","stage","staging","stagnant","stagnate","stainable","stained","staining","stainless","stalemate","staleness","stalling","stallion","stamina","stammer","stamp","stand","stank","staple","stapling","starboard","starch","stardom","stardust","starfish","stargazer","staring","stark","starless","starlet","starlight","starlit","starring","starry","starship","starter","starting","startle","startling","startup","starved","starving","stash","state","static","statistic","statue","stature","status","statute","statutory","staunch","stays","steadfast","steadier","steadily","steadying","steam","steed","steep","steerable","steering","steersman","stegosaur","stellar","stem","stench","stencil","step","stereo","sterile","sterility","sterilize","sterling","sternness","sternum","stew","stick","stiffen","stiffly","stiffness","stifle","stifling","stillness","stilt","stimulant","stimulate","stimuli","stimulus","stinger","stingily","stinging","stingray","stingy","stinking","stinky","stipend","stipulate","stir","stitch","stock","stoic","stoke","stole","stomp","stonewall","stoneware","stonework","stoning","stony","stood","stooge","stool","stoop","stoplight","stoppable","stoppage","stopped","stopper","stopping","stopwatch","storable","storage","storeroom","storewide","storm","stout","stove","stowaway","stowing","straddle","straggler","strained","strainer","straining","strangely","stranger","strangle","strategic","strategy","stratus","straw","stray","streak","stream","street","strength","strenuous","strep","stress","stretch","strewn","stricken","strict","stride","strife","strike","striking","strive","striving","strobe","strode","stroller","strongbox","strongly","strongman","struck","structure","strudel","struggle","strum","strung","strut","stubbed","stubble","stubbly","stubborn","stucco","stuck","student","studied","studio","study","stuffed","stuffing","stuffy","stumble","stumbling","stump","stung","stunned","stunner","stunning","stunt","stupor","sturdily","sturdy","styling","stylishly","stylist","stylized","stylus","suave","subarctic","subatomic","subdivide","subdued","subduing","subfloor","subgroup","subheader","subject","sublease","sublet","sublevel","sublime","submarine","submerge","submersed","submitter","subpanel","subpar","subplot","subprime","subscribe","subscript","subsector","subside","subsiding","subsidize","subsidy","subsoil","subsonic","substance","subsystem","subtext","subtitle","subtly","subtotal","subtract","subtype","suburb","subway","subwoofer","subzero","succulent","such","suction","sudden","sudoku","suds","sufferer","suffering","suffice","suffix","suffocate","suffrage","sugar","suggest","suing","suitable","suitably","suitcase","suitor","sulfate","sulfide","sulfite","sulfur","sulk","sullen","sulphate","sulphuric","sultry","superbowl","superglue","superhero","superior","superjet","superman","supermom","supernova","supervise","supper","supplier","supply","support","supremacy","supreme","surcharge","surely","sureness","surface","surfacing","surfboard","surfer","surgery","surgical","surging","surname","surpass","surplus","surprise","surreal","surrender","surrogate","surround","survey","survival","survive","surviving","survivor","sushi","suspect","suspend","suspense","sustained","sustainer","swab","swaddling","swagger","swampland","swan","swapping","swarm","sway","swear","sweat","sweep","swell","swept","swerve","swifter","swiftly","swiftness","swimmable","swimmer","swimming","swimsuit","swimwear","swinger","swinging","swipe","swirl","switch","swivel","swizzle","swooned","swoop","swoosh","swore","sworn","swung","sycamore","sympathy","symphonic","symphony","symptom","synapse","syndrome","synergy","synopses","synopsis","synthesis","synthetic","syrup","system","t-shirt","tabasco","tabby","tableful","tables","tablet","tableware","tabloid","tackiness","tacking","tackle","tackling","tacky","taco","tactful","tactical","tactics","tactile","tactless","tadpole","taekwondo","tag","tainted","take","taking","talcum","talisman","tall","talon","tamale","tameness","tamer","tamper","tank","tanned","tannery","tanning","tantrum","tapeless","tapered","tapering","tapestry","tapioca","tapping","taps","tarantula","target","tarmac","tarnish","tarot","tartar","tartly","tartness","task","tassel","taste","tastiness","tasting","tasty","tattered","tattle","tattling","tattoo","taunt","tavern","thank","that","thaw","theater","theatrics","thee","theft","theme","theology","theorize","thermal","thermos","thesaurus","these","thesis","thespian","thicken","thicket","thickness","thieving","thievish","thigh","thimble","thing","think","thinly","thinner","thinness","thinning","thirstily","thirsting","thirsty","thirteen","thirty","thong","thorn","those","thousand","thrash","thread","threaten","threefold","thrift","thrill","thrive","thriving","throat","throbbing","throng","throttle","throwaway","throwback","thrower","throwing","thud","thumb","thumping","thursday","thus","thwarting","thyself","tiara","tibia","tidal","tidbit","tidiness","tidings","tidy","tiger","tighten","tightly","tightness","tightrope","tightwad","tigress","tile","tiling","till","tilt","timid","timing","timothy","tinderbox","tinfoil","tingle","tingling","tingly","tinker","tinkling","tinsel","tinsmith","tint","tinwork","tiny","tipoff","tipped","tipper","tipping","tiptoeing","tiptop","tiring","tissue","trace","tracing","track","traction","tractor","trade","trading","tradition","traffic","tragedy","trailing","trailside","train","traitor","trance","tranquil","transfer","transform","translate","transpire","transport","transpose","trapdoor","trapeze","trapezoid","trapped","trapper","trapping","traps","trash","travel","traverse","travesty","tray","treachery","treading","treadmill","treason","treat","treble","tree","trekker","tremble","trembling","tremor","trench","trend","trespass","triage","trial","triangle","tribesman","tribunal","tribune","tributary","tribute","triceps","trickery","trickily","tricking","trickle","trickster","tricky","tricolor","tricycle","trident","tried","trifle","trifocals","trillion","trilogy","trimester","trimmer","trimming","trimness","trinity","trio","tripod","tripping","triumph","trivial","trodden","trolling","trombone","trophy","tropical","tropics","trouble","troubling","trough","trousers","trout","trowel","truce","truck","truffle","trump","trunks","trustable","trustee","trustful","trusting","trustless","truth","try","tubby","tubeless","tubular","tucking","tuesday","tug","tuition","tulip","tumble","tumbling","tummy","turban","turbine","turbofan","turbojet","turbulent","turf","turkey","turmoil","turret","turtle","tusk","tutor","tutu","tux","tweak","tweed","tweet","tweezers","twelve","twentieth","twenty","twerp","twice","twiddle","twiddling","twig","twilight","twine","twins","twirl","twistable","twisted","twister","twisting","twisty","twitch","twitter","tycoon","tying","tyke","udder","ultimate","ultimatum","ultra","umbilical","umbrella","umpire","unabashed","unable","unadorned","unadvised","unafraid","unaired","unaligned","unaltered","unarmored","unashamed","unaudited","unawake","unaware","unbaked","unbalance","unbeaten","unbend","unbent","unbiased","unbitten","unblended","unblessed","unblock","unbolted","unbounded","unboxed","unbraided","unbridle","unbroken","unbuckled","unbundle","unburned","unbutton","uncanny","uncapped","uncaring","uncertain","unchain","unchanged","uncharted","uncheck","uncivil","unclad","unclaimed","unclamped","unclasp","uncle","unclip","uncloak","unclog","unclothed","uncoated","uncoiled","uncolored","uncombed","uncommon","uncooked","uncork","uncorrupt","uncounted","uncouple","uncouth","uncover","uncross","uncrown","uncrushed","uncured","uncurious","uncurled","uncut","undamaged","undated","undaunted","undead","undecided","undefined","underage","underarm","undercoat","undercook","undercut","underdog","underdone","underfed","underfeed","underfoot","undergo","undergrad","underhand","underline","underling","undermine","undermost","underpaid","underpass","underpay","underrate","undertake","undertone","undertook","undertow","underuse","underwear","underwent","underwire","undesired","undiluted","undivided","undocked","undoing","undone","undrafted","undress","undrilled","undusted","undying","unearned","unearth","unease","uneasily","uneasy","uneatable","uneaten","unedited","unelected","unending","unengaged","unenvied","unequal","unethical","uneven","unexpired","unexposed","unfailing","unfair","unfasten","unfazed","unfeeling","unfiled","unfilled","unfitted","unfitting","unfixable","unfixed","unflawed","unfocused","unfold","unfounded","unframed","unfreeze","unfrosted","unfrozen","unfunded","unglazed","ungloved","unglue","ungodly","ungraded","ungreased","unguarded","unguided","unhappily","unhappy","unharmed","unhealthy","unheard","unhearing","unheated","unhelpful","unhidden","unhinge","unhitched","unholy","unhook","unicorn","unicycle","unified","unifier","uniformed","uniformly","unify","unimpeded","uninjured","uninstall","uninsured","uninvited","union","uniquely","unisexual","unison","unissued","unit","universal","universe","unjustly","unkempt","unkind","unknotted","unknowing","unknown","unlaced","unlatch","unlawful","unleaded","unlearned","unleash","unless","unleveled","unlighted","unlikable","unlimited","unlined","unlinked","unlisted","unlit","unlivable","unloaded","unloader","unlocked","unlocking","unlovable","unloved","unlovely","unloving","unluckily","unlucky","unmade","unmanaged","unmanned","unmapped","unmarked","unmasked","unmasking","unmatched","unmindful","unmixable","unmixed","unmolded","unmoral","unmovable","unmoved","unmoving","unnamable","unnamed","unnatural","unneeded","unnerve","unnerving","unnoticed","unopened","unopposed","unpack","unpadded","unpaid","unpainted","unpaired","unpaved","unpeeled","unpicked","unpiloted","unpinned","unplanned","unplanted","unpleased","unpledged","unplowed","unplug","unpopular","unproven","unquote","unranked","unrated","unraveled","unreached","unread","unreal","unreeling","unrefined","unrelated","unrented","unrest","unretired","unrevised","unrigged","unripe","unrivaled","unroasted","unrobed","unroll","unruffled","unruly","unrushed","unsaddle","unsafe","unsaid","unsalted","unsaved","unsavory","unscathed","unscented","unscrew","unsealed","unseated","unsecured","unseeing","unseemly","unseen","unselect","unselfish","unsent","unsettled","unshackle","unshaken","unshaved","unshaven","unsheathe","unshipped","unsightly","unsigned","unskilled","unsliced","unsmooth","unsnap","unsocial","unsoiled","unsold","unsolved","unsorted","unspoiled","unspoken","unstable","unstaffed","unstamped","unsteady","unsterile","unstirred","unstitch","unstopped","unstuck","unstuffed","unstylish","unsubtle","unsubtly","unsuited","unsure","unsworn","untagged","untainted","untaken","untamed","untangled","untapped","untaxed","unthawed","unthread","untidy","untie","until","untimed","untimely","untitled","untoasted","untold","untouched","untracked","untrained","untreated","untried","untrimmed","untrue","untruth","unturned","untwist","untying","unusable","unused","unusual","unvalued","unvaried","unvarying","unveiled","unveiling","unvented","unviable","unvisited","unvocal","unwanted","unwarlike","unwary","unwashed","unwatched","unweave","unwed","unwelcome","unwell","unwieldy","unwilling","unwind","unwired","unwitting","unwomanly","unworldly","unworn","unworried","unworthy","unwound","unwoven","unwrapped","unwritten","unzip","upbeat","upchuck","upcoming","upcountry","update","upfront","upgrade","upheaval","upheld","uphill","uphold","uplifted","uplifting","upload","upon","upper","upright","uprising","upriver","uproar","uproot","upscale","upside","upstage","upstairs","upstart","upstate","upstream","upstroke","upswing","uptake","uptight","uptown","upturned","upward","upwind","uranium","urban","urchin","urethane","urgency","urgent","urging","urologist","urology","usable","usage","useable","used","uselessly","user","usher","usual","utensil","utility","utilize","utmost","utopia","utter","vacancy","vacant","vacate","vacation","vagabond","vagrancy","vagrantly","vaguely","vagueness","valiant","valid","valium","valley","valuables","value","vanilla","vanish","vanity","vanquish","vantage","vaporizer","variable","variably","varied","variety","various","varmint","varnish","varsity","varying","vascular","vaseline","vastly","vastness","veal","vegan","veggie","vehicular","velcro","velocity","velvet","vendetta","vending","vendor","veneering","vengeful","venomous","ventricle","venture","venue","venus","verbalize","verbally","verbose","verdict","verify","verse","version","versus","vertebrae","vertical","vertigo","very","vessel","vest","veteran","veto","vexingly","viability","viable","vibes","vice","vicinity","victory","video","viewable","viewer","viewing","viewless","viewpoint","vigorous","village","villain","vindicate","vineyard","vintage","violate","violation","violator","violet","violin","viper","viral","virtual","virtuous","virus","visa","viscosity","viscous","viselike","visible","visibly","vision","visiting","visitor","visor","vista","vitality","vitalize","vitally","vitamins","vivacious","vividly","vividness","vixen","vocalist","vocalize","vocally","vocation","voice","voicing","void","volatile","volley","voltage","volumes","voter","voting","voucher","vowed","vowel","voyage","wackiness","wad","wafer","waffle","waged","wager","wages","waggle","wagon","wake","waking","walk","walmart","walnut","walrus","waltz","wand","wannabe","wanted","wanting","wasabi","washable","washbasin","washboard","washbowl","washcloth","washday","washed","washer","washhouse","washing","washout","washroom","washstand","washtub","wasp","wasting","watch","water","waviness","waving","wavy","whacking","whacky","wham","wharf","wheat","whenever","whiff","whimsical","whinny","whiny","whisking","whoever","whole","whomever","whoopee","whooping","whoops","why","wick","widely","widen","widget","widow","width","wieldable","wielder","wife","wifi","wikipedia","wildcard","wildcat","wilder","wildfire","wildfowl","wildland","wildlife","wildly","wildness","willed","willfully","willing","willow","willpower","wilt","wimp","wince","wincing","wind","wing","winking","winner","winnings","winter","wipe","wired","wireless","wiring","wiry","wisdom","wise","wish","wisplike","wispy","wistful","wizard","wobble","wobbling","wobbly","wok","wolf","wolverine","womanhood","womankind","womanless","womanlike","womanly","womb","woof","wooing","wool","woozy","word","work","worried","worrier","worrisome","worry","worsening","worshiper","worst","wound","woven","wow","wrangle","wrath","wreath","wreckage","wrecker","wrecking","wrench","wriggle","wriggly","wrinkle","wrinkly","wrist","writing","written","wrongdoer","wronged","wrongful","wrongly","wrongness","wrought","xbox","xerox","yahoo","yam","yanking","yapping","yard","yarn","yeah","yearbook","yearling","yearly","yearning","yeast","yelling","yelp","yen","yesterday","yiddish","yield","yin","yippee","yo-yo","yodel","yoga","yogurt","yonder","yoyo","yummy","zap","zealous","zebra","zen","zeppelin","zero","zestfully","zesty","zigzagged","zipfile","zipping","zippy","zips","zit","zodiac","zombie","zone","zoning","zookeeper","zoologist","zoology","zoom"]},79977:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BillingSyncConfigApi=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),null!=e&&(this.billingSyncKey=this.getResponseProperty("BillingSyncKey"))}}t.BillingSyncConfigApi=r},59773:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CardApi=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e=null){super(e),null!=e&&(this.cardholderName=this.getResponseProperty("CardholderName"),this.brand=this.getResponseProperty("Brand"),this.number=this.getResponseProperty("Number"),this.expMonth=this.getResponseProperty("ExpMonth"),this.expYear=this.getResponseProperty("ExpYear"),this.code=this.getResponseProperty("Code"))}}t.CardApi=r},9592:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FieldApi=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e=null){super(e),null!=e&&(this.type=this.getResponseProperty("Type"),this.name=this.getResponseProperty("Name"),this.value=this.getResponseProperty("Value"),this.linkedId=this.getResponseProperty("linkedId"))}}t.FieldApi=r},25327:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityApi=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e=null){super(e),null!=e&&(this.title=this.getResponseProperty("Title"),this.firstName=this.getResponseProperty("FirstName"),this.middleName=this.getResponseProperty("MiddleName"),this.lastName=this.getResponseProperty("LastName"),this.address1=this.getResponseProperty("Address1"),this.address2=this.getResponseProperty("Address2"),this.address3=this.getResponseProperty("Address3"),this.city=this.getResponseProperty("City"),this.state=this.getResponseProperty("State"),this.postalCode=this.getResponseProperty("PostalCode"),this.country=this.getResponseProperty("Country"),this.company=this.getResponseProperty("Company"),this.email=this.getResponseProperty("Email"),this.phone=this.getResponseProperty("Phone"),this.ssn=this.getResponseProperty("SSN"),this.username=this.getResponseProperty("Username"),this.passportNumber=this.getResponseProperty("PassportNumber"),this.licenseNumber=this.getResponseProperty("LicenseNumber"))}}t.IdentityApi=r},89387:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoginApi=void 0;const i=n(17273),r=n(32357);class o extends i.BaseResponse{constructor(e=null){if(super(e),null==e)return;this.username=this.getResponseProperty("Username"),this.password=this.getResponseProperty("Password"),this.passwordRevisionDate=this.getResponseProperty("PasswordRevisionDate"),this.totp=this.getResponseProperty("Totp"),this.autofillOnPageLoad=this.getResponseProperty("AutofillOnPageLoad");const t=this.getResponseProperty("Uris");null!=t&&(this.uris=t.map((e=>new r.LoginUriApi(e))))}}t.LoginApi=o},32357:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoginUriApi=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e=null){if(super(e),this.match=null,null==e)return;this.uri=this.getResponseProperty("Uri");const t=this.getResponseProperty("Match");this.match=null!=t?t:null}}t.LoginUriApi=r},96926:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PermissionsApi=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e=null){if(super(e),null==e)return this;this.accessEventLogs=this.getResponseProperty("AccessEventLogs"),this.accessImportExport=this.getResponseProperty("AccessImportExport"),this.accessReports=this.getResponseProperty("AccessReports"),this.manageAllCollections=this.getResponseProperty("ManageAllCollections"),this.manageAssignedCollections=this.getResponseProperty("ManageAssignedCollections"),this.createNewCollections=this.getResponseProperty("CreateNewCollections"),this.editAnyCollection=this.getResponseProperty("EditAnyCollection"),this.deleteAnyCollection=this.getResponseProperty("DeleteAnyCollection"),this.editAssignedCollections=this.getResponseProperty("EditAssignedCollections"),this.deleteAssignedCollections=this.getResponseProperty("DeleteAssignedCollections"),this.manageCiphers=this.getResponseProperty("ManageCiphers"),this.manageGroups=this.getResponseProperty("ManageGroups"),this.manageSso=this.getResponseProperty("ManageSso"),this.managePolicies=this.getResponseProperty("ManagePolicies"),this.manageUsers=this.getResponseProperty("ManageUsers"),this.manageResetPassword=this.getResponseProperty("ManageResetPassword")}}t.PermissionsApi=r},3865:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecureNoteApi=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e=null){super(e),null!=e&&(this.type=this.getResponseProperty("Type"))}}t.SecureNoteApi=r},39255:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendFileApi=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e=null){super(e),null!=e&&(this.id=this.getResponseProperty("Id"),this.fileName=this.getResponseProperty("FileName"),this.size=this.getResponseProperty("Size"),this.sizeName=this.getResponseProperty("SizeName"))}}t.SendFileApi=r},8057:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendTextApi=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e=null){super(e),null!=e&&(this.text=this.getResponseProperty("Text"),this.hidden=this.getResponseProperty("Hidden")||!1)}}t.SendTextApi=r},21021:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SsoConfigApi=void 0;const i=n(37084),r=n(17273);class o extends r.BaseResponse{constructor(e=null){super(e),null!=e&&(this.configType=this.getResponseProperty("ConfigType"),this.keyConnectorEnabled=this.getResponseProperty("KeyConnectorEnabled"),this.keyConnectorUrl=this.getResponseProperty("KeyConnectorUrl"),this.authority=this.getResponseProperty("Authority"),this.clientId=this.getResponseProperty("ClientId"),this.clientSecret=this.getResponseProperty("ClientSecret"),this.metadataAddress=this.getResponseProperty("MetadataAddress"),this.redirectBehavior=this.getResponseProperty("RedirectBehavior"),this.getClaimsFromUserInfoEndpoint=this.getResponseProperty("GetClaimsFromUserInfoEndpoint"),this.additionalScopes=this.getResponseProperty("AdditionalScopes"),this.additionalUserIdClaimTypes=this.getResponseProperty("AdditionalUserIdClaimTypes"),this.additionalEmailClaimTypes=this.getResponseProperty("AdditionalEmailClaimTypes"),this.additionalNameClaimTypes=this.getResponseProperty("AdditionalNameClaimTypes"),this.acrValues=this.getResponseProperty("AcrValues"),this.expectedReturnAcrValue=this.getResponseProperty("ExpectedReturnAcrValue"),this.spNameIdFormat=this.getResponseProperty("SpNameIdFormat"),this.spOutboundSigningAlgorithm=this.getResponseProperty("SpOutboundSigningAlgorithm"),this.spSigningBehavior=this.getResponseProperty("SpSigningBehavior"),this.spMinIncomingSigningAlgorithm=this.getResponseProperty("SpMinIncomingSigningAlgorithm"),this.spWantAssertionsSigned=this.getResponseProperty("SpWantAssertionsSigned"),this.spValidateCertificates=this.getResponseProperty("SpValidateCertificates"),this.idpEntityId=this.getResponseProperty("IdpEntityId"),this.idpBindingType=this.getResponseProperty("IdpBindingType"),this.idpSingleSignOnServiceUrl=this.getResponseProperty("IdpSingleSignOnServiceUrl"),this.idpSingleLogoutServiceUrl=this.getResponseProperty("IdpSingleLogoutServiceUrl"),this.idpX509PublicCert=this.getResponseProperty("IdpX509PublicCert"),this.idpOutboundSigningAlgorithm=this.getResponseProperty("IdpOutboundSigningAlgorithm"),this.idpAllowUnsolicitedAuthnResponse=this.getResponseProperty("IdpAllowUnsolicitedAuthnResponse"),this.idpDisableOutboundLogoutRequests=this.getResponseProperty("IdpDisableOutboundLogoutRequests"),this.idpWantAuthnRequestsSigned=this.getResponseProperty("IdpWantAuthnRequestsSigned"))}static fromView(e,t=new o){return t.configType=e.configType,t.keyConnectorEnabled=e.keyConnectorEnabled,t.keyConnectorUrl=e.keyConnectorUrl,t.configType===i.SsoType.OpenIdConnect?(t.authority=e.openId.authority,t.clientId=e.openId.clientId,t.clientSecret=e.openId.clientSecret,t.metadataAddress=e.openId.metadataAddress,t.redirectBehavior=e.openId.redirectBehavior,t.getClaimsFromUserInfoEndpoint=e.openId.getClaimsFromUserInfoEndpoint,t.additionalScopes=e.openId.additionalScopes,t.additionalUserIdClaimTypes=e.openId.additionalUserIdClaimTypes,t.additionalEmailClaimTypes=e.openId.additionalEmailClaimTypes,t.additionalNameClaimTypes=e.openId.additionalNameClaimTypes,t.acrValues=e.openId.acrValues,t.expectedReturnAcrValue=e.openId.expectedReturnAcrValue):t.configType===i.SsoType.Saml2&&(t.spNameIdFormat=e.saml.spNameIdFormat,t.spOutboundSigningAlgorithm=e.saml.spOutboundSigningAlgorithm,t.spSigningBehavior=e.saml.spSigningBehavior,t.spMinIncomingSigningAlgorithm=e.saml.spMinIncomingSigningAlgorithm,t.spWantAssertionsSigned=e.saml.spWantAssertionsSigned,t.spValidateCertificates=e.saml.spValidateCertificates,t.idpEntityId=e.saml.idpEntityId,t.idpBindingType=e.saml.idpBindingType,t.idpSingleSignOnServiceUrl=e.saml.idpSingleSignOnServiceUrl,t.idpSingleLogoutServiceUrl=e.saml.idpSingleLogoutServiceUrl,t.idpX509PublicCert=e.saml.idpX509PublicCert,t.idpOutboundSigningAlgorithm=e.saml.idpOutboundSigningAlgorithm,t.idpAllowUnsolicitedAuthnResponse=e.saml.idpAllowUnsolicitedAuthnResponse,t.idpWantAuthnRequestsSigned=e.saml.idpWantAuthnRequestsSigned,t.idpDisableOutboundLogoutRequests=!e.saml.idpAllowOutboundLogoutRequests),t}}t.SsoConfigApi=o},82999:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttachmentData=void 0;t.AttachmentData=class{constructor(e){null!=e&&(this.id=e.id,this.url=e.url,this.fileName=e.fileName,this.key=e.key,this.size=e.size,this.sizeName=e.sizeName)}}},23607:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CardData=void 0;t.CardData=class{constructor(e){null!=e&&(this.cardholderName=e.cardholderName,this.brand=e.brand,this.number=e.number,this.expMonth=e.expMonth,this.expYear=e.expYear,this.code=e.code)}}},82789:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherData=void 0;const i=n(32773),r=n(82999),o=n(23607),a=n(93001),s=n(64218),l=n(33396),c=n(67783),d=n(85201);t.CipherData=class{constructor(e,t){if(null!=e){switch(this.id=e.id,this.organizationId=e.organizationId,this.folderId=e.folderId,this.edit=e.edit,this.viewPassword=e.viewPassword,this.organizationUseTotp=e.organizationUseTotp,this.favorite=e.favorite,this.revisionDate=e.revisionDate,this.type=e.type,this.name=e.name,this.notes=e.notes,this.collectionIds=null!=t?t:e.collectionIds,this.deletedDate=e.deletedDate,this.reprompt=e.reprompt,this.type){case i.CipherType.Login:this.login=new l.LoginData(e.login);break;case i.CipherType.SecureNote:this.secureNote=new d.SecureNoteData(e.secureNote);break;case i.CipherType.Card:this.card=new o.CardData(e.card);break;case i.CipherType.Identity:this.identity=new s.IdentityData(e.identity)}null!=e.fields&&(this.fields=e.fields.map((e=>new a.FieldData(e)))),null!=e.attachments&&(this.attachments=e.attachments.map((e=>new r.AttachmentData(e)))),null!=e.passwordHistory&&(this.passwordHistory=e.passwordHistory.map((e=>new c.PasswordHistoryData(e))))}}}},34917:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionData=void 0;t.CollectionData=class{constructor(e){this.id=e.id,this.organizationId=e.organizationId,this.name=e.name,this.externalId=e.externalId,this.readOnly=e.readOnly}}},93053:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventData=void 0;t.EventData=class{}},93001:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FieldData=void 0;t.FieldData=class{constructor(e){null!=e&&(this.type=e.type,this.name=e.name,this.value=e.value,this.linkedId=e.linkedId)}}},12835:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FolderData=void 0;t.FolderData=class{constructor(e){this.name=e.name,this.id=e.id,this.revisionDate=e.revisionDate}}},64218:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityData=void 0;t.IdentityData=class{constructor(e){null!=e&&(this.title=e.title,this.firstName=e.firstName,this.middleName=e.middleName,this.lastName=e.lastName,this.address1=e.address1,this.address2=e.address2,this.address3=e.address3,this.city=e.city,this.state=e.state,this.postalCode=e.postalCode,this.country=e.country,this.company=e.company,this.email=e.email,this.phone=e.phone,this.ssn=e.ssn,this.username=e.username,this.passportNumber=e.passportNumber,this.licenseNumber=e.licenseNumber)}}},33396:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoginData=void 0;const i=n(20968);t.LoginData=class{constructor(e){null!=e&&(this.username=e.username,this.password=e.password,this.passwordRevisionDate=e.passwordRevisionDate,this.totp=e.totp,this.autofillOnPageLoad=e.autofillOnPageLoad,e.uris&&(this.uris=e.uris.map((e=>new i.LoginUriData(e)))))}}},20968:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoginUriData=void 0;t.LoginUriData=class{constructor(e){this.match=null,null!=e&&(this.uri=e.uri,this.match=e.match)}}},8681:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationData=void 0;t.OrganizationData=class{constructor(e){this.id=e.id,this.name=e.name,this.status=e.status,this.type=e.type,this.enabled=e.enabled,this.usePolicies=e.usePolicies,this.useGroups=e.useGroups,this.useDirectory=e.useDirectory,this.useEvents=e.useEvents,this.useTotp=e.useTotp,this.use2fa=e.use2fa,this.useApi=e.useApi,this.useSso=e.useSso,this.useKeyConnector=e.useKeyConnector,this.useResetPassword=e.useResetPassword,this.selfHost=e.selfHost,this.usersGetPremium=e.usersGetPremium,this.seats=e.seats,this.maxCollections=e.maxCollections,this.maxStorageGb=e.maxStorageGb,this.ssoBound=e.ssoBound,this.identifier=e.identifier,this.permissions=e.permissions,this.resetPasswordEnrolled=e.resetPasswordEnrolled,this.userId=e.userId,this.hasPublicAndPrivateKeys=e.hasPublicAndPrivateKeys,this.providerId=e.providerId,this.providerName=e.providerName,this.familySponsorshipFriendlyName=e.familySponsorshipFriendlyName,this.familySponsorshipAvailable=e.familySponsorshipAvailable,this.planProductType=e.planProductType,this.keyConnectorEnabled=e.keyConnectorEnabled,this.keyConnectorUrl=e.keyConnectorUrl,this.familySponsorshipLastSyncDate=e.familySponsorshipLastSyncDate,this.familySponsorshipValidUntil=e.familySponsorshipValidUntil,this.familySponsorshipToDelete=e.familySponsorshipToDelete}}},67783:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordHistoryData=void 0;t.PasswordHistoryData=class{constructor(e){null!=e&&(this.password=e.password,this.lastUsedDate=e.lastUsedDate)}}},34144:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PolicyData=void 0;t.PolicyData=class{constructor(e){this.id=e.id,this.organizationId=e.organizationId,this.type=e.type,this.data=e.data,this.enabled=e.enabled}}},17835:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderData=void 0;t.ProviderData=class{constructor(e){this.id=e.id,this.name=e.name,this.status=e.status,this.type=e.type,this.enabled=e.enabled,this.userId=e.userId,this.useEvents=e.useEvents}}},85201:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecureNoteData=void 0;t.SecureNoteData=class{constructor(e){null!=e&&(this.type=e.type)}}},10425:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendData=void 0;const i=n(70149),r=n(57662),o=n(35861);t.SendData=class{constructor(e){if(null!=e)switch(this.id=e.id,this.accessId=e.accessId,this.type=e.type,this.name=e.name,this.notes=e.notes,this.key=e.key,this.maxAccessCount=e.maxAccessCount,this.accessCount=e.accessCount,this.revisionDate=e.revisionDate,this.expirationDate=e.expirationDate,this.deletionDate=e.deletionDate,this.password=e.password,this.disabled=e.disable,this.hideEmail=e.hideEmail,this.type){case i.SendType.Text:this.text=new o.SendTextData(e.text);break;case i.SendType.File:this.file=new r.SendFileData(e.file)}}}},57662:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendFileData=void 0;t.SendFileData=class{constructor(e){null!=e&&(this.id=e.id,this.fileName=e.fileName,this.size=e.size,this.sizeName=e.sizeName)}}},35861:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendTextData=void 0;t.SendTextData=class{constructor(e){null!=e&&(this.text=e.text,this.hidden=e.hidden)}}},31445:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Account=t.AccountTokens=t.AccountSettings=t.AccountProfile=t.AccountKeys=t.AccountData=t.DataEncryptionPair=t.EncryptionPair=void 0;const i=n(91185);class r{}t.EncryptionPair=r;class o{}t.DataEncryptionPair=o;class a{constructor(){this.ciphers=new o,this.folders=new o,this.sends=new o,this.collections=new o,this.policies=new o,this.passwordGenerationHistory=new r}}t.AccountData=a;class s{constructor(){this.cryptoSymmetricKey=new r,this.organizationKeys=new r,this.providerKeys=new r,this.privateKey=new r}}t.AccountKeys=s;class l{}t.AccountProfile=l;class c{constructor(){this.environmentUrls=new i.EnvironmentUrls,this.pinProtected=new r,this.vaultTimeoutAction="lock"}}t.AccountSettings=c;class d{}t.AccountTokens=d;t.Account=class{constructor(e){this.data=new a,this.keys=new s,this.profile=new l,this.settings=new c,this.tokens=new d,Object.assign(this,{data:Object.assign(Object.assign({},new a),null==e?void 0:e.data),keys:Object.assign(Object.assign({},new s),null==e?void 0:e.keys),profile:Object.assign(Object.assign({},new l),null==e?void 0:e.profile),settings:Object.assign(Object.assign({},new c),null==e?void 0:e.settings),tokens:Object.assign(Object.assign({},new d),null==e?void 0:e.tokens)})}}},73024:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Attachment=void 0;const r=n(82769),o=n(82999),a=n(57759),s=n(6183),l=n(69731);class c extends s.default{constructor(e){super(),null!=e&&(this.size=e.size,this.buildDomainModel(this,e,{id:null,url:null,sizeName:null,fileName:null,key:null},["id","url","sizeName"]))}decrypt(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.decryptObj(new a.AttachmentView(this),{fileName:null},e,t);if(null!=this.key){let o;const a=r.Utils.global.bitwardenContainerService;if(!a)throw new Error("global bitwardenContainerService not initialized.");o=a.getCryptoService();try{const i=yield o.getOrgKey(e),r=yield o.decryptToBytes(this.key,null!=i?i:t);n.key=new l.SymmetricCryptoKey(r)}catch(i){}}return n}))}toAttachmentData(){const e=new o.AttachmentData;return e.size=this.size,this.buildDataModel(this,e,{id:null,url:null,sizeName:null,fileName:null,key:null},["id","url","sizeName"]),e}}t.Attachment=c},20584:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuthResult=void 0;const i=n(82769);t.AuthResult=class{constructor(){this.captchaSiteKey="",this.resetMasterPassword=!1,this.forcePasswordReset=!1,this.twoFactorProviders=null}get requiresCaptcha(){return!i.Utils.isNullOrWhitespace(this.captchaSiteKey)}get requiresTwoFactor(){return null!=this.twoFactorProviders}}},53763:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Card=void 0;const i=n(23607),r=n(91766),o=n(6183);class a extends o.default{constructor(e){super(),null!=e&&this.buildDomainModel(this,e,{cardholderName:null,brand:null,number:null,expMonth:null,expYear:null,code:null},[])}decrypt(e,t){return this.decryptObj(new r.CardView,{cardholderName:null,brand:null,number:null,expMonth:null,expYear:null,code:null},e,t)}toCardData(){const e=new i.CardData;return this.buildDataModel(this,e,{cardholderName:null,brand:null,number:null,expMonth:null,expYear:null,code:null}),e}}t.Card=a},49624:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Cipher=void 0;const r=n(32773),o=n(82789),a=n(97144),s=n(73024),l=n(53763),c=n(6183),d=n(84379),p=n(809),u=n(89642),m=n(20929),h=n(7012);class v extends c.default{constructor(e,t=null){if(super(),null!=e){switch(this.buildDomainModel(this,e,{id:null,organizationId:null,folderId:null,name:null,notes:null},["id","organizationId","folderId"]),this.type=e.type,this.favorite=e.favorite,this.organizationUseTotp=e.organizationUseTotp,this.edit=e.edit,null!=e.viewPassword?this.viewPassword=e.viewPassword:this.viewPassword=!0,this.revisionDate=null!=e.revisionDate?new Date(e.revisionDate):null,this.collectionIds=e.collectionIds,this.localData=t,this.deletedDate=null!=e.deletedDate?new Date(e.deletedDate):null,this.reprompt=e.reprompt,this.type){case r.CipherType.Login:this.login=new u.Login(e.login);break;case r.CipherType.SecureNote:this.secureNote=new h.SecureNote(e.secureNote);break;case r.CipherType.Card:this.card=new l.Card(e.card);break;case r.CipherType.Identity:this.identity=new p.Identity(e.identity)}null!=e.attachments?this.attachments=e.attachments.map((e=>new s.Attachment(e))):this.attachments=null,null!=e.fields?this.fields=e.fields.map((e=>new d.Field(e))):this.fields=null,null!=e.passwordHistory?this.passwordHistory=e.passwordHistory.map((e=>new m.Password(e))):this.passwordHistory=null}}decrypt(e){return i(this,void 0,void 0,(function*(){const t=new a.CipherView(this);switch(yield this.decryptObj(t,{name:null,notes:null},this.organizationId,e),this.type){case r.CipherType.Login:t.login=yield this.login.decrypt(this.organizationId,e);break;case r.CipherType.SecureNote:t.secureNote=yield this.secureNote.decrypt(this.organizationId,e);break;case r.CipherType.Card:t.card=yield this.card.decrypt(this.organizationId,e);break;case r.CipherType.Identity:t.identity=yield this.identity.decrypt(this.organizationId,e)}const n=this.organizationId;if(null!=this.attachments&&this.attachments.length>0){const i=[];yield this.attachments.reduce(((t,r)=>t.then((()=>r.decrypt(n,e))).then((e=>{i.push(e)}))),Promise.resolve()),t.attachments=i}if(null!=this.fields&&this.fields.length>0){const i=[];yield this.fields.reduce(((t,r)=>t.then((()=>r.decrypt(n,e))).then((e=>{i.push(e)}))),Promise.resolve()),t.fields=i}if(null!=this.passwordHistory&&this.passwordHistory.length>0){const i=[];yield this.passwordHistory.reduce(((t,r)=>t.then((()=>r.decrypt(n,e))).then((e=>{i.push(e)}))),Promise.resolve()),t.passwordHistory=i}return t}))}toCipherData(){const e=new o.CipherData;switch(e.id=this.id,e.organizationId=this.organizationId,e.folderId=this.folderId,e.edit=this.edit,e.viewPassword=this.viewPassword,e.organizationUseTotp=this.organizationUseTotp,e.favorite=this.favorite,e.revisionDate=null!=this.revisionDate?this.revisionDate.toISOString():null,e.type=this.type,e.collectionIds=this.collectionIds,e.deletedDate=null!=this.deletedDate?this.deletedDate.toISOString():null,e.reprompt=this.reprompt,this.buildDataModel(this,e,{name:null,notes:null}),e.type){case r.CipherType.Login:e.login=this.login.toLoginData();break;case r.CipherType.SecureNote:e.secureNote=this.secureNote.toSecureNoteData();break;case r.CipherType.Card:e.card=this.card.toCardData();break;case r.CipherType.Identity:e.identity=this.identity.toIdentityData()}return null!=this.fields&&(e.fields=this.fields.map((e=>e.toFieldData()))),null!=this.attachments&&(e.attachments=this.attachments.map((e=>e.toAttachmentData()))),null!=this.passwordHistory&&(e.passwordHistory=this.passwordHistory.map((e=>e.toPasswordHistoryData()))),e}}t.Cipher=v},65642:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Collection=void 0;const i=n(86001),r=n(6183);class o extends r.default{constructor(e){super(),null!=e&&this.buildDomainModel(this,e,{id:null,organizationId:null,name:null,externalId:null,readOnly:null,hidePasswords:null},["id","organizationId","externalId","readOnly","hidePasswords"])}decrypt(){return this.decryptObj(new i.CollectionView(this),{name:null},this.organizationId)}}t.Collection=o},15755:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DecryptParameters=void 0;t.DecryptParameters=class{}},6183:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const r=n(22205);t.default=class{buildDomainModel(e,t,n,i=[]){for(const o in n){if(!n.hasOwnProperty(o))continue;const a=t[n[o]||o];i.indexOf(o)>-1?e[o]=a||null:e[o]=a?new r.EncString(a):null}}buildDataModel(e,t,n,i=[]){for(const r in n){if(!n.hasOwnProperty(r))continue;const o=e[n[r]||r];i.indexOf(r)>-1?t[r]=null!=o?o:null:t[r]=null!=o?o.encryptedString:null}}decryptObj(e,t,n,r=null){return i(this,void 0,void 0,(function*(){const i=[],o=this;for(const a in t)t.hasOwnProperty(a)&&function(a){const s=Promise.resolve().then((()=>{const e=t[a]||a;return o[e]?o[e].decrypt(n,r):null})).then((t=>{e[a]=t}));i.push(s)}(a);return yield Promise.all(i),e}))}}},16131:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EncArrayBuffer=void 0;t.EncArrayBuffer=class{constructor(e){this.buffer=e}}},22205:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EncString=void 0;const r=n(28588),o=n(82769);t.EncString=class{constructor(e,t,n,i){if(null!=t){const r=e;return this.encryptedString=null!=n?r+"."+n+"|"+t:r+"."+t,null!=i&&(this.encryptedString+="|"+i),this.encryptionType=r,this.data=t,this.iv=n,void(this.mac=i)}if(this.encryptedString=e,!this.encryptedString)return;const o=this.encryptedString.split(".");let a=null;if(2===o.length)try{this.encryptionType=parseInt(o[0],null),a=o[1].split("|")}catch(s){return}else a=this.encryptedString.split("|"),this.encryptionType=3===a.length?r.EncryptionType.AesCbc128_HmacSha256_B64:r.EncryptionType.AesCbc256_B64;switch(this.encryptionType){case r.EncryptionType.AesCbc128_HmacSha256_B64:case r.EncryptionType.AesCbc256_HmacSha256_B64:if(3!==a.length)return;this.iv=a[0],this.data=a[1],this.mac=a[2];break;case r.EncryptionType.AesCbc256_B64:if(2!==a.length)return;this.iv=a[0],this.data=a[1];break;case r.EncryptionType.Rsa2048_OaepSha256_B64:case r.EncryptionType.Rsa2048_OaepSha1_B64:if(1!==a.length)return;this.data=a[0];break;default:return}}decrypt(e,t=null){return i(this,void 0,void 0,(function*(){if(null!=this.decryptedValue)return this.decryptedValue;let n;const i=o.Utils.global.bitwardenContainerService;if(!i)throw new Error("global bitwardenContainerService not initialized.");n=i.getCryptoService();try{null==t&&(t=yield n.getOrgKey(e)),this.decryptedValue=yield n.decryptToUtf8(this,t)}catch(r){this.decryptedValue="[error: cannot decrypt]"}return this.decryptedValue}))}}},6394:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EncryptedObject=void 0;t.EncryptedObject=class{}},91185:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EnvironmentUrls=void 0;t.EnvironmentUrls=class{constructor(){this.base=null,this.api=null,this.identity=null,this.icons=null,this.notifications=null,this.events=null,this.webVault=null,this.keyConnector=null}}},84379:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Field=void 0;const i=n(93001),r=n(58545),o=n(6183);class a extends o.default{constructor(e){super(),null!=e&&(this.type=e.type,this.linkedId=e.linkedId,this.buildDomainModel(this,e,{name:null,value:null},[]))}decrypt(e,t){return this.decryptObj(new r.FieldView(this),{name:null,value:null},e,t)}toFieldData(){const e=new i.FieldData;return this.buildDataModel(this,e,{name:null,value:null,type:null,linkedId:null},["type","linkedId"]),e}}t.Field=a},59738:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Folder=void 0;const i=n(36914),r=n(6183);class o extends r.default{constructor(e){super(),null!=e&&(this.buildDomainModel(this,e,{id:null,name:null},["id"]),this.revisionDate=null!=e.revisionDate?new Date(e.revisionDate):null)}decrypt(){return this.decryptObj(new i.FolderView(this),{name:null},null)}}t.Folder=o},77665:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GeneratedPasswordHistory=void 0;t.GeneratedPasswordHistory=class{constructor(e,t){this.password=e,this.date=t}}},99010:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalState=void 0;const i=n(40898),r=n(14538),o=n(91185),a=n(95672);t.GlobalState=class{constructor(){this.theme=r.ThemeType.System,this.window=new a.WindowState,this.stateVersion=i.StateVersion.One,this.environmentUrls=new o.EnvironmentUrls}}},809:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Identity=void 0;const i=n(64218),r=n(48830),o=n(6183);class a extends o.default{constructor(e){super(),null!=e&&this.buildDomainModel(this,e,{title:null,firstName:null,middleName:null,lastName:null,address1:null,address2:null,address3:null,city:null,state:null,postalCode:null,country:null,company:null,email:null,phone:null,ssn:null,username:null,passportNumber:null,licenseNumber:null},[])}decrypt(e,t){return this.decryptObj(new r.IdentityView,{title:null,firstName:null,middleName:null,lastName:null,address1:null,address2:null,address3:null,city:null,state:null,postalCode:null,country:null,company:null,email:null,phone:null,ssn:null,username:null,passportNumber:null,licenseNumber:null},e,t)}toIdentityData(){const e=new i.IdentityData;return this.buildDataModel(this,e,{title:null,firstName:null,middleName:null,lastName:null,address1:null,address2:null,address3:null,city:null,state:null,postalCode:null,country:null,company:null,email:null,phone:null,ssn:null,username:null,passportNumber:null,licenseNumber:null}),e}}t.Identity=a},2859:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImportResult=void 0;t.ImportResult=class{constructor(){this.success=!1,this.missingPassword=!1,this.ciphers=[],this.folders=[],this.folderRelationships=[],this.collections=[],this.collectionRelationships=[]}}},70045:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApiLogInCredentials=t.SsoLogInCredentials=t.PasswordLogInCredentials=void 0;const i=n(2231);t.PasswordLogInCredentials=class{constructor(e,t,n,r){this.email=e,this.masterPassword=t,this.captchaToken=n,this.twoFactor=r,this.type=i.AuthenticationType.Password}};t.SsoLogInCredentials=class{constructor(e,t,n,r,o){this.code=e,this.codeVerifier=t,this.redirectUrl=n,this.orgId=r,this.twoFactor=o,this.type=i.AuthenticationType.Sso}};t.ApiLogInCredentials=class{constructor(e,t){this.clientId=e,this.clientSecret=t,this.type=i.AuthenticationType.Api}}},89642:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Login=void 0;const r=n(33396),o=n(28331),a=n(6183),s=n(28947);class l extends a.default{constructor(e){super(),null!=e&&(this.passwordRevisionDate=null!=e.passwordRevisionDate?new Date(e.passwordRevisionDate):null,this.autofillOnPageLoad=e.autofillOnPageLoad,this.buildDomainModel(this,e,{username:null,password:null,totp:null},[]),e.uris&&(this.uris=[],e.uris.forEach((e=>{this.uris.push(new s.LoginUri(e))}))))}decrypt(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.decryptObj(new o.LoginView(this),{username:null,password:null,totp:null},e,t);if(null!=this.uris){n.uris=[];for(let i=0;i0&&(e.uris=[],this.uris.forEach((t=>{e.uris.push(t.toLoginUriData())}))),e}}t.Login=l},28947:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoginUri=void 0;const i=n(20968),r=n(16506),o=n(6183);class a extends o.default{constructor(e){super(),null!=e&&(this.match=e.match,this.buildDomainModel(this,e,{uri:null},[]))}decrypt(e,t){return this.decryptObj(new r.LoginUriView(this),{uri:null},e,t)}toLoginUriData(){const e=new i.LoginUriData;return this.buildDataModel(this,e,{uri:null,match:null},["match"]),e}}t.LoginUri=a},27053:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MasterPasswordPolicyOptions=void 0;const i=n(6183);class r extends i.default{constructor(){super(...arguments),this.minComplexity=0,this.minLength=0,this.requireUpper=!1,this.requireLower=!1,this.requireNumbers=!1,this.requireSpecial=!1}}t.MasterPasswordPolicyOptions=r},27957:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Organization=void 0;const i=n(7368),r=n(33712),o=n(47880);t.Organization=class{constructor(e){null!=e&&(this.id=e.id,this.name=e.name,this.status=e.status,this.type=e.type,this.enabled=e.enabled,this.usePolicies=e.usePolicies,this.useGroups=e.useGroups,this.useDirectory=e.useDirectory,this.useEvents=e.useEvents,this.useTotp=e.useTotp,this.use2fa=e.use2fa,this.useApi=e.useApi,this.useSso=e.useSso,this.useKeyConnector=e.useKeyConnector,this.useResetPassword=e.useResetPassword,this.selfHost=e.selfHost,this.usersGetPremium=e.usersGetPremium,this.seats=e.seats,this.maxCollections=e.maxCollections,this.maxStorageGb=e.maxStorageGb,this.ssoBound=e.ssoBound,this.identifier=e.identifier,this.permissions=e.permissions,this.resetPasswordEnrolled=e.resetPasswordEnrolled,this.userId=e.userId,this.hasPublicAndPrivateKeys=e.hasPublicAndPrivateKeys,this.providerId=e.providerId,this.providerName=e.providerName,this.isProviderUser=e.isProviderUser,this.familySponsorshipFriendlyName=e.familySponsorshipFriendlyName,this.familySponsorshipAvailable=e.familySponsorshipAvailable,this.planProductType=e.planProductType,this.keyConnectorEnabled=e.keyConnectorEnabled,this.keyConnectorUrl=e.keyConnectorUrl,this.familySponsorshipLastSyncDate=e.familySponsorshipLastSyncDate,this.familySponsorshipValidUntil=e.familySponsorshipValidUntil,this.familySponsorshipToDelete=e.familySponsorshipToDelete)}get canAccess(){return this.type===r.OrganizationUserType.Owner||this.enabled&&this.status===i.OrganizationUserStatusType.Confirmed}get isManager(){return this.type===r.OrganizationUserType.Manager||this.type===r.OrganizationUserType.Owner||this.type===r.OrganizationUserType.Admin}get isAdmin(){return this.type===r.OrganizationUserType.Owner||this.type===r.OrganizationUserType.Admin}get isOwner(){return this.type===r.OrganizationUserType.Owner||this.isProviderUser}get canAccessEventLogs(){return this.isAdmin||this.permissions.accessEventLogs}get canAccessImportExport(){return this.isAdmin||this.permissions.accessImportExport}get canAccessReports(){return this.isAdmin||this.permissions.accessReports}get canCreateNewCollections(){var e;return this.isManager||(null!==(e=this.permissions.createNewCollections)&&void 0!==e?e:this.permissions.manageAllCollections)}get canEditAnyCollection(){var e;return this.isAdmin||(null!==(e=this.permissions.editAnyCollection)&&void 0!==e?e:this.permissions.manageAllCollections)}get canDeleteAnyCollection(){var e;return this.isAdmin||(null!==(e=this.permissions.deleteAnyCollection)&&void 0!==e?e:this.permissions.manageAllCollections)}get canViewAllCollections(){return this.canCreateNewCollections||this.canEditAnyCollection||this.canDeleteAnyCollection}get canEditAssignedCollections(){var e;return this.isManager||(null!==(e=this.permissions.editAssignedCollections)&&void 0!==e?e:this.permissions.manageAssignedCollections)}get canDeleteAssignedCollections(){var e;return this.isManager||(null!==(e=this.permissions.deleteAssignedCollections)&&void 0!==e?e:this.permissions.manageAssignedCollections)}get canViewAssignedCollections(){return this.canDeleteAssignedCollections||this.canEditAssignedCollections}get canManageGroups(){return this.isAdmin||this.permissions.manageGroups}get canManageSso(){return this.isAdmin||this.permissions.manageSso}get canManagePolicies(){return this.isAdmin||this.permissions.managePolicies}get canManageUsers(){return this.isAdmin||this.permissions.manageUsers}get canManageUsersPassword(){return this.isAdmin||this.permissions.manageResetPassword}get isExemptFromPolicies(){return this.canManagePolicies}hasAnyPermission(e){return(e.includes(o.Permissions.AccessEventLogs)&&this.canAccessEventLogs||e.includes(o.Permissions.AccessImportExport)&&this.canAccessImportExport||e.includes(o.Permissions.AccessReports)&&this.canAccessReports||e.includes(o.Permissions.CreateNewCollections)&&this.canCreateNewCollections||e.includes(o.Permissions.EditAnyCollection)&&this.canEditAnyCollection||e.includes(o.Permissions.DeleteAnyCollection)&&this.canDeleteAnyCollection||e.includes(o.Permissions.EditAssignedCollections)&&this.canEditAssignedCollections||e.includes(o.Permissions.DeleteAssignedCollections)&&this.canDeleteAssignedCollections||e.includes(o.Permissions.ManageGroups)&&this.canManageGroups||e.includes(o.Permissions.ManageOrganization)&&this.isOwner||e.includes(o.Permissions.ManagePolicies)&&this.canManagePolicies||e.includes(o.Permissions.ManageUsers)&&this.canManageUsers||e.includes(o.Permissions.ManageUsersPassword)&&this.canManageUsersPassword||e.includes(o.Permissions.ManageSso)&&this.canManageSso||e.includes(o.Permissions.ManageBilling)&&this.canManageBilling)&&(this.enabled||this.isOwner)}get canManageBilling(){return this.isOwner&&(this.isProviderUser||!this.hasProvider)}get hasProvider(){return null!=this.providerId||null!=this.providerName}}},20929:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Password=void 0;const i=n(67783),r=n(40170),o=n(6183);class a extends o.default{constructor(e){super(),null!=e&&(this.buildDomainModel(this,e,{password:null}),this.lastUsedDate=new Date(e.lastUsedDate))}decrypt(e,t){return this.decryptObj(new r.PasswordHistoryView(this),{password:null},e,t)}toPasswordHistoryData(){const e=new i.PasswordHistoryData;return e.lastUsedDate=this.lastUsedDate.toISOString(),this.buildDataModel(this,e,{password:null}),e}}t.Password=a},49471:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordGeneratorPolicyOptions=void 0;const i=n(6183);class r extends i.default{constructor(){super(...arguments),this.defaultType="",this.minLength=0,this.useUppercase=!1,this.useLowercase=!1,this.useNumbers=!1,this.numberCount=0,this.useSpecial=!1,this.specialCount=0,this.minNumberWords=0,this.capitalize=!1,this.includeNumber=!1}inEffect(){return""!==this.defaultType||this.minLength>0||this.numberCount>0||this.specialCount>0||this.useUppercase||this.useLowercase||this.useNumbers||this.useSpecial||this.minNumberWords>0||this.capitalize||this.includeNumber}}t.PasswordGeneratorPolicyOptions=r},41317:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Policy=void 0;const i=n(6183);class r extends i.default{constructor(e){super(),null!=e&&(this.id=e.id,this.organizationId=e.organizationId,this.type=e.type,this.data=e.data,this.enabled=e.enabled)}}t.Policy=r},61453:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Provider=void 0;const i=n(72418),r=n(30185);t.Provider=class{constructor(e){null!=e&&(this.id=e.id,this.name=e.name,this.status=e.status,this.type=e.type,this.enabled=e.enabled,this.userId=e.userId,this.useEvents=e.useEvents)}get canAccess(){return!!this.isProviderAdmin||this.enabled&&this.status===i.ProviderUserStatusType.Confirmed}get canCreateOrganizations(){return this.enabled&&this.isProviderAdmin}get canManageUsers(){return this.isProviderAdmin}get canAccessEventLogs(){return this.isProviderAdmin}get isProviderAdmin(){return this.type===r.ProviderUserType.ProviderAdmin}}},41389:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResetPasswordPolicyOptions=void 0;const i=n(6183);class r extends i.default{constructor(){super(...arguments),this.autoEnrollEnabled=!1}}t.ResetPasswordPolicyOptions=r},7012:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecureNote=void 0;const i=n(85201),r=n(99364),o=n(6183);class a extends o.default{constructor(e){super(),null!=e&&(this.type=e.type)}decrypt(e,t){return Promise.resolve(new r.SecureNoteView(this))}toSecureNoteData(){const e=new i.SecureNoteData;return e.type=this.type,e}}t.SecureNote=a},38265:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Send=void 0;const r=n(70149),o=n(82769),a=n(1725),s=n(6183),l=n(32924),c=n(22785);class d extends s.default{constructor(e){if(super(),null!=e)switch(this.buildDomainModel(this,e,{id:null,accessId:null,name:null,notes:null,key:null},["id","accessId"]),this.type=e.type,this.maxAccessCount=e.maxAccessCount,this.accessCount=e.accessCount,this.password=e.password,this.disabled=e.disabled,this.revisionDate=null!=e.revisionDate?new Date(e.revisionDate):null,this.deletionDate=null!=e.deletionDate?new Date(e.deletionDate):null,this.expirationDate=null!=e.expirationDate?new Date(e.expirationDate):null,this.hideEmail=e.hideEmail,this.type){case r.SendType.Text:this.text=new c.SendText(e.text);break;case r.SendType.File:this.file=new l.SendFile(e.file)}}decrypt(){return i(this,void 0,void 0,(function*(){const e=new a.SendView(this);let t;const n=o.Utils.global.bitwardenContainerService;if(!n)throw new Error("global bitwardenContainerService not initialized.");t=n.getCryptoService();try{e.key=yield t.decryptToBytes(this.key,null),e.cryptoKey=yield t.makeSendKey(e.key)}catch(i){}switch(yield this.decryptObj(e,{name:null,notes:null},null,e.cryptoKey),this.type){case r.SendType.File:e.file=yield this.file.decrypt(e.cryptoKey);break;case r.SendType.Text:e.text=yield this.text.decrypt(e.cryptoKey)}return e}))}}t.Send=d},95708:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SendAccess=void 0;const r=n(70149),o=n(46984),a=n(6183),s=n(32924),l=n(22785);class c extends a.default{constructor(e){if(super(),null!=e)switch(this.buildDomainModel(this,e,{id:null,name:null,expirationDate:null,creatorIdentifier:null},["id","expirationDate","creatorIdentifier"]),this.type=e.type,this.type){case r.SendType.Text:this.text=new l.SendText(e.text);break;case r.SendType.File:this.file=new s.SendFile(e.file)}}decrypt(e){return i(this,void 0,void 0,(function*(){const t=new o.SendAccessView(this);switch(yield this.decryptObj(t,{name:null},null,e),this.type){case r.SendType.File:t.file=yield this.file.decrypt(e);break;case r.SendType.Text:t.text=yield this.text.decrypt(e)}return t}))}}t.SendAccess=c},32924:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SendFile=void 0;const r=n(22620),o=n(6183);class a extends o.default{constructor(e){super(),null!=e&&(this.size=e.size,this.buildDomainModel(this,e,{id:null,sizeName:null,fileName:null},["id","sizeName"]))}decrypt(e){return i(this,void 0,void 0,(function*(){return yield this.decryptObj(new r.SendFileView(this),{fileName:null},null,e)}))}}t.SendFile=a},22785:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendText=void 0;const i=n(59884),r=n(6183);class o extends r.default{constructor(e){super(),null!=e&&(this.hidden=e.hidden,this.buildDomainModel(this,e,{text:null},[]))}decrypt(e){return this.decryptObj(new i.SendTextView(this),{text:null},null,e)}}t.SendText=o},20126:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SortedCiphersCache=void 0;t.SortedCiphersCache=class{constructor(e){this.comparator=e,this.sortedCiphersByUrl=new Map,this.timeouts=new Map}isCached(e){return this.sortedCiphersByUrl.has(e)}addCiphers(e,t){t.sort(this.comparator),this.sortedCiphersByUrl.set(e,new n(t)),this.resetTimer(e)}getLastUsed(e){return this.resetTimer(e),this.isCached(e)?this.sortedCiphersByUrl.get(e).getLastUsed():null}getLastLaunched(e){return this.isCached(e)?this.sortedCiphersByUrl.get(e).getLastLaunched():null}getNext(e){return this.resetTimer(e),this.isCached(e)?this.sortedCiphersByUrl.get(e).getNext():null}updateLastUsedIndex(e){this.isCached(e)&&this.sortedCiphersByUrl.get(e).updateLastUsedIndex()}clear(){this.sortedCiphersByUrl.clear(),this.timeouts.clear()}resetTimer(e){clearTimeout(this.timeouts.get(e)),this.timeouts.set(e,setTimeout((()=>{this.sortedCiphersByUrl.delete(e),this.timeouts.delete(e)}),3e3))}};class n{constructor(e){this.ciphers=e,this.lastUsedIndex=-1}getLastUsed(){return this.lastUsedIndex=Math.max(this.lastUsedIndex,0),this.ciphers[this.lastUsedIndex]}getLastLaunched(){return this.ciphers.filter((e=>{var t;return null===(t=e.localData)||void 0===t?void 0:t.lastLaunched})).sort(((e,t)=>t.localData.lastLaunched.valueOf()-e.localData.lastLaunched.valueOf()))[0]}getNextIndex(){return(this.lastUsedIndex+1)%this.ciphers.length}getNext(){return this.ciphers[this.getNextIndex()]}updateLastUsedIndex(){this.lastUsedIndex=this.getNextIndex()}}},43208:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.State=void 0;t.State=class{constructor(e){this.accounts={},this.authenticatedAccounts=[],this.accountActivity={},this.globals=e}}},69731:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SymmetricCryptoKey=void 0;const i=n(28588),r=n(82769);t.SymmetricCryptoKey=class{constructor(e,t){if(null==e)throw new Error("Must provide key");if(null==t)if(32===e.byteLength)t=i.EncryptionType.AesCbc256_B64;else{if(64!==e.byteLength)throw new Error("Unable to determine encType.");t=i.EncryptionType.AesCbc256_HmacSha256_B64}if(this.key=e,this.encType=t,t===i.EncryptionType.AesCbc256_B64&&32===e.byteLength)this.encKey=e,this.macKey=null;else if(t===i.EncryptionType.AesCbc128_HmacSha256_B64&&32===e.byteLength)this.encKey=e.slice(0,16),this.macKey=e.slice(16,32);else{if(t!==i.EncryptionType.AesCbc256_HmacSha256_B64||64!==e.byteLength)throw new Error("Unsupported encType/key length.");this.encKey=e.slice(0,32),this.macKey=e.slice(32,64)}null!=this.key&&(this.keyB64=r.Utils.fromBufferToB64(this.key)),null!=this.encKey&&(this.encKeyB64=r.Utils.fromBufferToB64(this.encKey)),null!=this.macKey&&(this.macKeyB64=r.Utils.fromBufferToB64(this.macKey))}}},51301:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeNode=void 0;t.TreeNode=class{constructor(e,t,n){this.children=[],this.parent=n,this.node=e,this.node.name=t}}},95672:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WindowState=void 0;t.WindowState=class{}},24030:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CardExport=void 0;const i=n(53763),r=n(22205),o=n(91766);class a{constructor(e){var t,n,i,r,a,s;null!=e&&(e instanceof o.CardView?(this.cardholderName=e.cardholderName,this.brand=e.brand,this.number=e.number,this.expMonth=e.expMonth,this.expYear=e.expYear,this.code=e.code):(this.cardholderName=null===(t=e.cardholderName)||void 0===t?void 0:t.encryptedString,this.brand=null===(n=e.brand)||void 0===n?void 0:n.encryptedString,this.number=null===(i=e.number)||void 0===i?void 0:i.encryptedString,this.expMonth=null===(r=e.expMonth)||void 0===r?void 0:r.encryptedString,this.expYear=null===(a=e.expYear)||void 0===a?void 0:a.encryptedString,this.code=null===(s=e.code)||void 0===s?void 0:s.encryptedString))}static template(){const e=new a;return e.cardholderName="John Doe",e.brand="visa",e.number="4242424242424242",e.expMonth="04",e.expYear="2023",e.code="123",e}static toView(e,t=new o.CardView){return t.cardholderName=e.cardholderName,t.brand=e.brand,t.number=e.number,t.expMonth=e.expMonth,t.expYear=e.expYear,t.code=e.code,t}static toDomain(e,t=new i.Card){return t.cardholderName=null!=e.cardholderName?new r.EncString(e.cardholderName):null,t.brand=null!=e.brand?new r.EncString(e.brand):null,t.number=null!=e.number?new r.EncString(e.number):null,t.expMonth=null!=e.expMonth?new r.EncString(e.expMonth):null,t.expYear=null!=e.expYear?new r.EncString(e.expYear):null,t.code=null!=e.code?new r.EncString(e.code):null,t}}t.CardExport=a},54655:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherExport=void 0;const i=n(34453),r=n(32773),o=n(49624),a=n(22205),s=n(97144),l=n(24030),c=n(85890),d=n(90397),p=n(35473),u=n(46187);class m{static template(){const e=new m;return e.organizationId=null,e.collectionIds=null,e.folderId=null,e.type=r.CipherType.Login,e.name="Item name",e.notes="Some notes about this item.",e.favorite=!1,e.fields=[],e.login=null,e.secureNote=null,e.card=null,e.identity=null,e.reprompt=i.CipherRepromptType.None,e}static toView(e,t=new s.CipherView){var n,o,a;if(t.type=e.type,t.folderId=e.folderId,null==t.organizationId&&(t.organizationId=e.organizationId),t.collectionIds||e.collectionIds){const i=new Set((null!==(n=t.collectionIds)&&void 0!==n?n:[]).concat(null!==(o=e.collectionIds)&&void 0!==o?o:[]));t.collectionIds=Array.from(i.values())}switch(t.name=e.name,t.notes=e.notes,t.favorite=e.favorite,t.reprompt=null!==(a=e.reprompt)&&void 0!==a?a:i.CipherRepromptType.None,null!=e.fields&&(t.fields=e.fields.map((e=>c.FieldExport.toView(e)))),e.type){case r.CipherType.Login:t.login=p.LoginExport.toView(e.login);break;case r.CipherType.SecureNote:t.secureNote=u.SecureNoteExport.toView(e.secureNote);break;case r.CipherType.Card:t.card=l.CardExport.toView(e.card);break;case r.CipherType.Identity:t.identity=d.IdentityExport.toView(e.identity)}return t}static toDomain(e,t=new o.Cipher){var n;switch(t.type=e.type,t.folderId=e.folderId,null==t.organizationId&&(t.organizationId=e.organizationId),t.name=null!=e.name?new a.EncString(e.name):null,t.notes=null!=e.notes?new a.EncString(e.notes):null,t.favorite=e.favorite,t.reprompt=null!==(n=e.reprompt)&&void 0!==n?n:i.CipherRepromptType.None,null!=e.fields&&(t.fields=e.fields.map((e=>c.FieldExport.toDomain(e)))),e.type){case r.CipherType.Login:t.login=p.LoginExport.toDomain(e.login);break;case r.CipherType.SecureNote:t.secureNote=u.SecureNoteExport.toDomain(e.secureNote);break;case r.CipherType.Card:t.card=l.CardExport.toDomain(e.card);break;case r.CipherType.Identity:t.identity=d.IdentityExport.toDomain(e.identity)}return t}build(e){var t,n;switch(this.organizationId=e.organizationId,this.folderId=e.folderId,this.type=e.type,this.reprompt=e.reprompt,e instanceof s.CipherView?(this.name=e.name,this.notes=e.notes):(this.name=null===(t=e.name)||void 0===t?void 0:t.encryptedString,this.notes=null===(n=e.notes)||void 0===n?void 0:n.encryptedString),this.favorite=e.favorite,null!=e.fields&&(s.CipherView,this.fields=e.fields.map((e=>new c.FieldExport(e)))),e.type){case r.CipherType.Login:this.login=new p.LoginExport(e.login);break;case r.CipherType.SecureNote:this.secureNote=new u.SecureNoteExport(e.secureNote);break;case r.CipherType.Card:this.card=new l.CardExport(e.card);break;case r.CipherType.Identity:this.identity=new d.IdentityExport(e.identity)}}}t.CipherExport=m},83460:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherWithIdExport=void 0;const i=n(54655);class r extends i.CipherExport{build(e){this.id=e.id,super.build(e),this.collectionIds=e.collectionIds}}t.CipherWithIdExport=r},21923:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionExport=void 0;const i=n(65642),r=n(22205),o=n(86001);class a{static template(){const e=new a;return e.organizationId="00000000-0000-0000-0000-000000000000",e.name="Collection name",e.externalId=null,e}static toView(e,t=new o.CollectionView){return t.name=e.name,t.externalId=e.externalId,null==t.organizationId&&(t.organizationId=e.organizationId),t}static toDomain(e,t=new i.Collection){return t.name=null!=e.name?new r.EncString(e.name):null,t.externalId=e.externalId,null==t.organizationId&&(t.organizationId=e.organizationId),t}build(e){var t;this.organizationId=e.organizationId,e instanceof o.CollectionView?this.name=e.name:this.name=null===(t=e.name)||void 0===t?void 0:t.encryptedString,this.externalId=e.externalId}}t.CollectionExport=a},5136:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionWithIdExport=void 0;const i=n(21923);class r extends i.CollectionExport{build(e){this.id=e.id,super.build(e)}}t.CollectionWithIdExport=r},42587:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventExport=void 0;const i=n(80253);t.EventExport=class{constructor(e){this.message=e.humanReadableMessage,this.appIcon=e.appIcon,this.appName=e.appName,this.userId=e.userId,this.userName=e.userName,this.userEmail=e.userEmail,this.date=e.date,this.ip=e.ip,this.type=i.EventType[e.type],this.installationId=e.installationId}}},85890:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FieldExport=void 0;const i=n(67577),r=n(22205),o=n(84379),a=n(58545);class s{constructor(e){var t,n;null!=e&&(e instanceof a.FieldView?(this.name=e.name,this.value=e.value):(this.name=null===(t=e.name)||void 0===t?void 0:t.encryptedString,this.value=null===(n=e.value)||void 0===n?void 0:n.encryptedString),this.type=e.type,this.linkedId=e.linkedId)}static template(){const e=new s;return e.name="Field name",e.value="Some value",e.type=i.FieldType.Text,e}static toView(e,t=new a.FieldView){return t.type=e.type,t.value=e.value,t.name=e.name,t.linkedId=e.linkedId,t}static toDomain(e,t=new o.Field){return t.type=e.type,t.value=null!=e.value?new r.EncString(e.value):null,t.name=null!=e.name?new r.EncString(e.name):null,t.linkedId=e.linkedId,t}}t.FieldExport=s},8787:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FolderExport=void 0;const i=n(22205),r=n(59738),o=n(36914);class a{static template(){const e=new a;return e.name="Folder name",e}static toView(e,t=new o.FolderView){return t.name=e.name,t}static toDomain(e,t=new r.Folder){return t.name=null!=e.name?new i.EncString(e.name):null,t}build(e){var t;e instanceof o.FolderView?this.name=e.name:this.name=null===(t=e.name)||void 0===t?void 0:t.encryptedString}}t.FolderExport=a},31087:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FolderWithIdExport=void 0;const i=n(8787);class r extends i.FolderExport{build(e){this.id=e.id,super.build(e)}}t.FolderWithIdExport=r},90397:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityExport=void 0;const i=n(22205),r=n(809),o=n(48830);class a{constructor(e){var t,n,i,r,a,s,l,c,d,p,u,m,h,v,f,g,y,x;null!=e&&(e instanceof o.IdentityView?(this.title=e.title,this.firstName=e.firstName,this.middleName=e.middleName,this.lastName=e.lastName,this.address1=e.address1,this.address2=e.address2,this.address3=e.address3,this.city=e.city,this.state=e.state,this.postalCode=e.postalCode,this.country=e.country,this.company=e.company,this.email=e.email,this.phone=e.phone,this.ssn=e.ssn,this.username=e.username,this.passportNumber=e.passportNumber,this.licenseNumber=e.licenseNumber):(this.title=null===(t=e.title)||void 0===t?void 0:t.encryptedString,this.firstName=null===(n=e.firstName)||void 0===n?void 0:n.encryptedString,this.middleName=null===(i=e.middleName)||void 0===i?void 0:i.encryptedString,this.lastName=null===(r=e.lastName)||void 0===r?void 0:r.encryptedString,this.address1=null===(a=e.address1)||void 0===a?void 0:a.encryptedString,this.address2=null===(s=e.address2)||void 0===s?void 0:s.encryptedString,this.address3=null===(l=e.address3)||void 0===l?void 0:l.encryptedString,this.city=null===(c=e.city)||void 0===c?void 0:c.encryptedString,this.state=null===(d=e.state)||void 0===d?void 0:d.encryptedString,this.postalCode=null===(p=e.postalCode)||void 0===p?void 0:p.encryptedString,this.country=null===(u=e.country)||void 0===u?void 0:u.encryptedString,this.company=null===(m=e.company)||void 0===m?void 0:m.encryptedString,this.email=null===(h=e.email)||void 0===h?void 0:h.encryptedString,this.phone=null===(v=e.phone)||void 0===v?void 0:v.encryptedString,this.ssn=null===(f=e.ssn)||void 0===f?void 0:f.encryptedString,this.username=null===(g=e.username)||void 0===g?void 0:g.encryptedString,this.passportNumber=null===(y=e.passportNumber)||void 0===y?void 0:y.encryptedString,this.licenseNumber=null===(x=e.licenseNumber)||void 0===x?void 0:x.encryptedString))}static template(){const e=new a;return e.title="Mr",e.firstName="John",e.middleName="William",e.lastName="Doe",e.address1="123 Any St",e.address2="Apt #123",e.address3=null,e.city="New York",e.state="NY",e.postalCode="10001",e.country="US",e.company="Acme Inc.",e.email="john@company.com",e.phone="5555551234",e.ssn="000-123-4567",e.username="jdoe",e.passportNumber="US-123456789",e.licenseNumber="D123-12-123-12333",e}static toView(e,t=new o.IdentityView){return t.title=e.title,t.firstName=e.firstName,t.middleName=e.middleName,t.lastName=e.lastName,t.address1=e.address1,t.address2=e.address2,t.address3=e.address3,t.city=e.city,t.state=e.state,t.postalCode=e.postalCode,t.country=e.country,t.company=e.company,t.email=e.email,t.phone=e.phone,t.ssn=e.ssn,t.username=e.username,t.passportNumber=e.passportNumber,t.licenseNumber=e.licenseNumber,t}static toDomain(e,t=new r.Identity){return t.title=null!=e.title?new i.EncString(e.title):null,t.firstName=null!=e.firstName?new i.EncString(e.firstName):null,t.middleName=null!=e.middleName?new i.EncString(e.middleName):null,t.lastName=null!=e.lastName?new i.EncString(e.lastName):null,t.address1=null!=e.address1?new i.EncString(e.address1):null,t.address2=null!=e.address2?new i.EncString(e.address2):null,t.address3=null!=e.address3?new i.EncString(e.address3):null,t.city=null!=e.city?new i.EncString(e.city):null,t.state=null!=e.state?new i.EncString(e.state):null,t.postalCode=null!=e.postalCode?new i.EncString(e.postalCode):null,t.country=null!=e.country?new i.EncString(e.country):null,t.company=null!=e.company?new i.EncString(e.company):null,t.email=null!=e.email?new i.EncString(e.email):null,t.phone=null!=e.phone?new i.EncString(e.phone):null,t.ssn=null!=e.ssn?new i.EncString(e.ssn):null,t.username=null!=e.username?new i.EncString(e.username):null,t.passportNumber=null!=e.passportNumber?new i.EncString(e.passportNumber):null,t.licenseNumber=null!=e.licenseNumber?new i.EncString(e.licenseNumber):null,t}}t.IdentityExport=a},35473:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoginExport=void 0;const i=n(22205),r=n(89642),o=n(28331),a=n(34931);class s{constructor(e){var t,n,i;null!=e&&(null!=e.uris&&(o.LoginView,this.uris=e.uris.map((e=>new a.LoginUriExport(e)))),e instanceof o.LoginView?(this.username=e.username,this.password=e.password,this.totp=e.totp):(this.username=null===(t=e.username)||void 0===t?void 0:t.encryptedString,this.password=null===(n=e.password)||void 0===n?void 0:n.encryptedString,this.totp=null===(i=e.totp)||void 0===i?void 0:i.encryptedString))}static template(){const e=new s;return e.uris=[],e.username="jdoe",e.password="myp@ssword123",e.totp="JBSWY3DPEHPK3PXP",e}static toView(e,t=new o.LoginView){return null!=e.uris&&(t.uris=e.uris.map((e=>a.LoginUriExport.toView(e)))),t.username=e.username,t.password=e.password,t.totp=e.totp,t}static toDomain(e,t=new r.Login){return null!=e.uris&&(t.uris=e.uris.map((e=>a.LoginUriExport.toDomain(e)))),t.username=null!=e.username?new i.EncString(e.username):null,t.password=null!=e.password?new i.EncString(e.password):null,t.totp=null!=e.totp?new i.EncString(e.totp):null,t}}t.LoginExport=s},34931:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoginUriExport=void 0;const i=n(22205),r=n(28947),o=n(16506);class a{constructor(e){var t;this.match=null,null!=e&&(e instanceof o.LoginUriView?this.uri=e.uri:this.uri=null===(t=e.uri)||void 0===t?void 0:t.encryptedString,this.match=e.match)}static template(){const e=new a;return e.uri="https://google.com",e.match=null,e}static toView(e,t=new o.LoginUriView){return t.uri=e.uri,t.match=e.match,t}static toDomain(e,t=new r.LoginUri){return t.uri=null!=e.uri?new i.EncString(e.uri):null,t.match=e.match,t}}t.LoginUriExport=a},46187:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecureNoteExport=void 0;const i=n(76716),r=n(7012),o=n(99364);class a{constructor(e){null!=e&&(this.type=e.type)}static template(){const e=new a;return e.type=i.SecureNoteType.Generic,e}static toView(e,t=new o.SecureNoteView){return t.type=e.type,t}static toDomain(e,t=new r.SecureNote){return t.type=e.type,t}}t.SecureNoteExport=a},50738:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SetKeyConnectorKeyRequest=void 0;t.SetKeyConnectorKeyRequest=class{constructor(e,t,n,i,r){this.key=e,this.kdf=t,this.kdfIterations=n,this.orgIdentifier=i,this.keys=r}}},12680:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VerifyOTPRequest=void 0;t.VerifyOTPRequest=class{constructor(e){this.OTP=e}}},84054:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttachmentRequest=void 0;t.AttachmentRequest=class{}},29602:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BillingSyncConfigRequest=void 0;t.BillingSyncConfigRequest=class{constructor(e){this.billingSyncKey=e}}},34191:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BitPayInvoiceRequest=void 0;t.BitPayInvoiceRequest=class{}},82890:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherBulkDeleteRequest=void 0;t.CipherBulkDeleteRequest=class{constructor(e,t){this.ids=null==e?[]:e,this.organizationId=t}}},34392:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherBulkMoveRequest=void 0;t.CipherBulkMoveRequest=class{constructor(e,t){this.ids=null==e?[]:e,this.folderId=t}}},8488:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherBulkRestoreRequest=void 0;t.CipherBulkRestoreRequest=class{constructor(e){this.ids=null==e?[]:e}}},61418:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherBulkShareRequest=void 0;const i=n(24906);t.CipherBulkShareRequest=class{constructor(e,t){null!=e&&(this.ciphers=[],e.forEach((e=>{this.ciphers.push(new i.CipherWithIdRequest(e))}))),this.collectionIds=t}}},53994:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherCollectionsRequest=void 0;t.CipherCollectionsRequest=class{constructor(e){this.collectionIds=null==e?[]:e}}},62415:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherCreateRequest=void 0;const i=n(16391);t.CipherCreateRequest=class{constructor(e){this.cipher=new i.CipherRequest(e),this.collectionIds=e.collectionIds}}},16391:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherRequest=void 0;const i=n(32773),r=n(59773),o=n(9592),a=n(25327),s=n(89387),l=n(32357),c=n(3865),d=n(84054);t.CipherRequest=class{constructor(e){switch(this.type=e.type,this.folderId=e.folderId,this.organizationId=e.organizationId,this.name=e.name?e.name.encryptedString:null,this.notes=e.notes?e.notes.encryptedString:null,this.favorite=e.favorite,this.lastKnownRevisionDate=e.revisionDate,this.reprompt=e.reprompt,this.type){case i.CipherType.Login:this.login=new s.LoginApi,this.login.uris=null,this.login.username=e.login.username?e.login.username.encryptedString:null,this.login.password=e.login.password?e.login.password.encryptedString:null,this.login.passwordRevisionDate=null!=e.login.passwordRevisionDate?e.login.passwordRevisionDate.toISOString():null,this.login.totp=e.login.totp?e.login.totp.encryptedString:null,this.login.autofillOnPageLoad=e.login.autofillOnPageLoad,null!=e.login.uris&&(this.login.uris=e.login.uris.map((e=>{const t=new l.LoginUriApi;return t.uri=null!=e.uri?e.uri.encryptedString:null,t.match=null!=e.match?e.match:null,t})));break;case i.CipherType.SecureNote:this.secureNote=new c.SecureNoteApi,this.secureNote.type=e.secureNote.type;break;case i.CipherType.Card:this.card=new r.CardApi,this.card.cardholderName=null!=e.card.cardholderName?e.card.cardholderName.encryptedString:null,this.card.brand=null!=e.card.brand?e.card.brand.encryptedString:null,this.card.number=null!=e.card.number?e.card.number.encryptedString:null,this.card.expMonth=null!=e.card.expMonth?e.card.expMonth.encryptedString:null,this.card.expYear=null!=e.card.expYear?e.card.expYear.encryptedString:null,this.card.code=null!=e.card.code?e.card.code.encryptedString:null;break;case i.CipherType.Identity:this.identity=new a.IdentityApi,this.identity.title=null!=e.identity.title?e.identity.title.encryptedString:null,this.identity.firstName=null!=e.identity.firstName?e.identity.firstName.encryptedString:null,this.identity.middleName=null!=e.identity.middleName?e.identity.middleName.encryptedString:null,this.identity.lastName=null!=e.identity.lastName?e.identity.lastName.encryptedString:null,this.identity.address1=null!=e.identity.address1?e.identity.address1.encryptedString:null,this.identity.address2=null!=e.identity.address2?e.identity.address2.encryptedString:null,this.identity.address3=null!=e.identity.address3?e.identity.address3.encryptedString:null,this.identity.city=null!=e.identity.city?e.identity.city.encryptedString:null,this.identity.state=null!=e.identity.state?e.identity.state.encryptedString:null,this.identity.postalCode=null!=e.identity.postalCode?e.identity.postalCode.encryptedString:null,this.identity.country=null!=e.identity.country?e.identity.country.encryptedString:null,this.identity.company=null!=e.identity.company?e.identity.company.encryptedString:null,this.identity.email=null!=e.identity.email?e.identity.email.encryptedString:null,this.identity.phone=null!=e.identity.phone?e.identity.phone.encryptedString:null,this.identity.ssn=null!=e.identity.ssn?e.identity.ssn.encryptedString:null,this.identity.username=null!=e.identity.username?e.identity.username.encryptedString:null,this.identity.passportNumber=null!=e.identity.passportNumber?e.identity.passportNumber.encryptedString:null,this.identity.licenseNumber=null!=e.identity.licenseNumber?e.identity.licenseNumber.encryptedString:null}null!=e.fields&&(this.fields=e.fields.map((e=>{const t=new o.FieldApi;return t.type=e.type,t.name=e.name?e.name.encryptedString:null,t.value=e.value?e.value.encryptedString:null,t.linkedId=e.linkedId,t}))),null!=e.passwordHistory&&(this.passwordHistory=[],e.passwordHistory.forEach((e=>{this.passwordHistory.push({lastUsedDate:e.lastUsedDate,password:e.password?e.password.encryptedString:null})}))),null!=e.attachments&&(this.attachments={},this.attachments2={},e.attachments.forEach((e=>{const t=e.fileName?e.fileName.encryptedString:null;this.attachments[e.id]=t;const n=new d.AttachmentRequest;n.fileName=t,null!=e.key&&(n.key=e.key.encryptedString),this.attachments2[e.id]=n})))}}},3467:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherShareRequest=void 0;const i=n(16391);t.CipherShareRequest=class{constructor(e){this.cipher=new i.CipherRequest(e),this.collectionIds=e.collectionIds}}},24906:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherWithIdRequest=void 0;const i=n(16391);class r extends i.CipherRequest{constructor(e){super(e),this.id=e.id}}t.CipherWithIdRequest=r},54554:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionRequest=void 0;t.CollectionRequest=class{constructor(e){this.groups=[],null!=e&&(this.name=e.name?e.name.encryptedString:null,this.externalId=e.externalId)}}},12666:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteRecoverRequest=void 0;t.DeleteRecoverRequest=class{}},92829:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeviceRequest=void 0;t.DeviceRequest=class{constructor(e,t){this.type=t.getDevice(),this.name=t.getDeviceString(),this.identifier=e,this.pushToken=null}}},79669:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmailRequest=void 0;const i=n(8283);class r extends i.EmailTokenRequest{}t.EmailRequest=r},8283:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmailTokenRequest=void 0;const i=n(36119);class r extends i.SecretVerificationRequest{}t.EmailTokenRequest=r},51128:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAccessAcceptRequest=void 0;t.EmergencyAccessAcceptRequest=class{}},16657:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAccessConfirmRequest=void 0;t.EmergencyAccessConfirmRequest=class{}},85985:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAccessInviteRequest=void 0;t.EmergencyAccessInviteRequest=class{}},64288:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAccessPasswordRequest=void 0;t.EmergencyAccessPasswordRequest=class{}},8468:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAccessUpdateRequest=void 0;t.EmergencyAccessUpdateRequest=class{}},20604:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventRequest=void 0;t.EventRequest=class{}},16466:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FolderRequest=void 0;t.FolderRequest=class{constructor(e){this.name=e.name?e.name.encryptedString:null}}},49586:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FolderWithIdRequest=void 0;const i=n(16466);class r extends i.FolderRequest{constructor(e){super(e),this.id=e.id}}t.FolderWithIdRequest=r},13234:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GroupRequest=void 0;t.GroupRequest=class{constructor(){this.collections=[]}}},81047:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApiTokenRequest=void 0;const i=n(77886);class r extends i.TokenRequest{constructor(e,t,n,i){super(n,i),this.clientId=e,this.clientSecret=t,this.twoFactor=n}toIdentityToken(){const e=super.toIdentityToken(this.clientId);return e.scope=this.clientId.startsWith("organization")?"api.organization":"api",e.grant_type="client_credentials",e.client_secret=this.clientSecret,e}}t.ApiTokenRequest=r},10037:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordTokenRequest=void 0;const i=n(82769),r=n(77886);class o extends r.TokenRequest{constructor(e,t,n,i,r){super(i,r),this.email=e,this.masterPasswordHash=t,this.captchaResponse=n,this.twoFactor=i}toIdentityToken(e){const t=super.toIdentityToken(e);return t.grant_type="password",t.username=this.email,t.password=this.masterPasswordHash,null!=this.captchaResponse&&(t.captchaResponse=this.captchaResponse),t}alterIdentityTokenHeaders(e){e.set("Auth-Email",i.Utils.fromUtf8ToUrlB64(this.email))}}t.PasswordTokenRequest=o},11685:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SsoTokenRequest=void 0;const i=n(77886);class r extends i.TokenRequest{constructor(e,t,n,i,r){super(i,r),this.code=e,this.codeVerifier=t,this.redirectUri=n,this.twoFactor=i}toIdentityToken(e){const t=super.toIdentityToken(e);return t.grant_type="authorization_code",t.code=this.code,t.code_verifier=this.codeVerifier,t.redirect_uri=this.redirectUri,t}}t.SsoTokenRequest=r},77886:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenRequest=void 0;t.TokenRequest=class{constructor(e,t){this.twoFactor=e,this.device=null!=t?t:null}alterIdentityTokenHeaders(e){}setTwoFactor(e){this.twoFactor=e}toIdentityToken(e){const t={scope:"api offline_access",client_id:e};return this.device&&(t.deviceType=this.device.type,t.deviceIdentifier=this.device.identifier,t.deviceName=this.device.name),this.twoFactor.token&&null!=this.twoFactor.provider&&(t.twoFactorToken=this.twoFactor.token,t.twoFactorProvider=this.twoFactor.provider,t.twoFactorRemember=this.twoFactor.remember?"1":"0"),t}}},74598:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenRequestTwoFactor=void 0;t.TokenRequestTwoFactor=class{constructor(e=null,t=null,n=!1){this.provider=e,this.token=t,this.remember=n}}},89537:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImportCiphersRequest=void 0;t.ImportCiphersRequest=class{constructor(){this.ciphers=[],this.folders=[],this.folderRelationships=[]}}},85644:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImportOrganizationCiphersRequest=void 0;t.ImportOrganizationCiphersRequest=class{constructor(){this.ciphers=[],this.collections=[],this.collectionRelationships=[]}}},17287:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KdfRequest=void 0;const i=n(49472);class r extends i.PasswordRequest{}t.KdfRequest=r},35711:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeyConnectorUserKeyRequest=void 0;t.KeyConnectorUserKeyRequest=class{constructor(e){this.key=e}}},74284:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeysRequest=void 0;t.KeysRequest=class{constructor(e,t){this.publicKey=e,this.encryptedPrivateKey=t}}},58795:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KvpRequest=void 0;t.KvpRequest=class{constructor(e,t){this.key=e,this.value=t}}},75118:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationSponsorshipRedeemRequest=void 0;t.OrganizationSponsorshipRedeemRequest=class{}},20577:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationSsoRequest=void 0;t.OrganizationSsoRequest=class{constructor(){this.enabled=!1}}},32137:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationApiKeyRequest=void 0;const i=n(43497),r=n(36119);class o extends r.SecretVerificationRequest{constructor(){super(...arguments),this.type=i.OrganizationApiKeyType.Default}}t.OrganizationApiKeyRequest=o},19036:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationConnectionRequest=void 0;t.OrganizationConnectionRequest=class{constructor(e,t,n,i){this.organizationId=e,this.type=t,this.enabled=n,this.config=i}}},7017:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationCreateRequest=void 0;t.OrganizationCreateRequest=class{}},39950:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationKeysRequest=void 0;const i=n(74284);class r extends i.KeysRequest{constructor(e,t){super(e,t)}}t.OrganizationKeysRequest=r},83828:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationSubscriptionUpdateRequest=void 0;t.OrganizationSubscriptionUpdateRequest=class{constructor(e,t){this.seatAdjustment=e,this.maxAutoscaleSeats=t}}},91260:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationTaxInfoUpdateRequest=void 0;const i=n(26374);class r extends i.TaxInfoUpdateRequest{}t.OrganizationTaxInfoUpdateRequest=r},20086:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUpdateRequest=void 0;t.OrganizationUpdateRequest=class{}},80006:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUpgradeRequest=void 0;t.OrganizationUpgradeRequest=class{}},1992:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserAcceptRequest=void 0;t.OrganizationUserAcceptRequest=class{}},23405:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserBulkConfirmRequest=void 0;t.OrganizationUserBulkConfirmRequest=class{constructor(e){this.keys=e}}},91247:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserBulkRequest=void 0;t.OrganizationUserBulkRequest=class{constructor(e){this.ids=null==e?[]:e}}},87169:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserConfirmRequest=void 0;t.OrganizationUserConfirmRequest=class{}},3714:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserInviteRequest=void 0;t.OrganizationUserInviteRequest=class{constructor(){this.emails=[],this.collections=[]}}},27784:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserResetPasswordEnrollmentRequest=void 0;t.OrganizationUserResetPasswordEnrollmentRequest=class{}},32593:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserResetPasswordRequest=void 0;t.OrganizationUserResetPasswordRequest=class{}},50533:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserUpdateGroupsRequest=void 0;t.OrganizationUserUpdateGroupsRequest=class{constructor(){this.groupIds=[]}}},57981:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserUpdateRequest=void 0;t.OrganizationUserUpdateRequest=class{constructor(){this.collections=[]}}},77992:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordHintRequest=void 0;t.PasswordHintRequest=class{constructor(e){this.email=e}}},49472:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordRequest=void 0;const i=n(36119);class r extends i.SecretVerificationRequest{}t.PasswordRequest=r},84707:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PaymentRequest=void 0;const i=n(91260);class r extends i.OrganizationTaxInfoUpdateRequest{}t.PaymentRequest=r},17200:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PolicyRequest=void 0;t.PolicyRequest=class{}},59791:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PreloginRequest=void 0;t.PreloginRequest=class{constructor(e){this.email=e}}},47298:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderAddOrganizationRequest=void 0;t.ProviderAddOrganizationRequest=class{}},16567:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderOrganizationCreateRequest=void 0;t.ProviderOrganizationCreateRequest=class{constructor(e,t){this.clientOwnerEmail=e,this.organizationCreateRequest=t}}},22748:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderSetupRequest=void 0;t.ProviderSetupRequest=class{}},23839:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUpdateRequest=void 0;t.ProviderUpdateRequest=class{}},82900:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserAcceptRequest=void 0;t.ProviderUserAcceptRequest=class{}},64279:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserBulkConfirmRequest=void 0;t.ProviderUserBulkConfirmRequest=class{constructor(e){this.keys=e}}},69316:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserBulkRequest=void 0;t.ProviderUserBulkRequest=class{constructor(e){this.ids=null==e?[]:e}}},98407:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserConfirmRequest=void 0;t.ProviderUserConfirmRequest=class{}},7896:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserInviteRequest=void 0;t.ProviderUserInviteRequest=class{constructor(){this.emails=[]}}},731:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserUpdateRequest=void 0;t.ProviderUserUpdateRequest=class{}},90185:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReferenceEventRequest=void 0;t.ReferenceEventRequest=class{}},6556:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RegisterRequest=void 0;t.RegisterRequest=class{constructor(e,t,n,i,r,o,a,s,l){this.email=e,this.name=t,this.masterPasswordHash=n,this.key=r,this.kdf=o,this.kdfIterations=a,this.referenceData=s,this.captchaResponse=l,this.masterPasswordHint=i||null}}},36119:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecretVerificationRequest=void 0;t.SecretVerificationRequest=class{}},11342:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionReadOnlyRequest=void 0;t.SelectionReadOnlyRequest=class{constructor(e,t,n){this.id=e,this.readOnly=t,this.hidePasswords=n}}},74012:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendAccessRequest=void 0;t.SendAccessRequest=class{}},34386:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendRequest=void 0;const i=n(70149),r=n(39255),o=n(8057);t.SendRequest=class{constructor(e,t){switch(this.type=e.type,this.fileLength=t,this.name=e.name?e.name.encryptedString:null,this.notes=e.notes?e.notes.encryptedString:null,this.maxAccessCount=e.maxAccessCount,this.expirationDate=null!=e.expirationDate?e.expirationDate.toISOString():null,this.deletionDate=null!=e.deletionDate?e.deletionDate.toISOString():null,this.key=null!=e.key?e.key.encryptedString:null,this.password=e.password,this.disabled=e.disabled,this.hideEmail=e.hideEmail,this.type){case i.SendType.Text:this.text=new o.SendTextApi,this.text.text=null!=e.text.text?e.text.text.encryptedString:null,this.text.hidden=e.text.hidden;break;case i.SendType.File:this.file=new r.SendFileApi,this.file.fileName=null!=e.file.fileName?e.file.fileName.encryptedString:null}}}},12909:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendWithIdRequest=void 0;const i=n(34386);class r extends i.SendRequest{constructor(e){super(e),this.id=e.id}}t.SendWithIdRequest=r},57751:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SetPasswordRequest=void 0;t.SetPasswordRequest=class{constructor(e,t,n,i,r,o,a){this.masterPasswordHash=e,this.key=t,this.masterPasswordHint=n,this.kdf=i,this.kdfIterations=r,this.orgIdentifier=o,this.keys=a}}},78703:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StorageRequest=void 0;t.StorageRequest=class{}},26374:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaxInfoUpdateRequest=void 0;t.TaxInfoUpdateRequest=class{}},88307:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorEmailRequest=void 0;const i=n(36119);class r extends i.SecretVerificationRequest{}t.TwoFactorEmailRequest=r},40205:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorProviderRequest=void 0;const i=n(36119);class r extends i.SecretVerificationRequest{}t.TwoFactorProviderRequest=r},6188:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorRecoveryRequest=void 0;const i=n(36119);class r extends i.SecretVerificationRequest{}t.TwoFactorRecoveryRequest=r},55785:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateDomainsRequest=void 0;t.UpdateDomainsRequest=class{}},93357:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateKeyRequest=void 0;t.UpdateKeyRequest=class{constructor(){this.ciphers=[],this.folders=[],this.sends=[]}}},82567:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateProfileRequest=void 0;t.UpdateProfileRequest=class{constructor(e,t){this.culture="en-US",this.name=e,this.masterPasswordHint=t||null}}},55931:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateTempPasswordRequest=void 0;const i=n(32593);class r extends i.OrganizationUserResetPasswordRequest{}t.UpdateTempPasswordRequest=r},57952:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateTwoFactorAuthenticatorRequest=void 0;const i=n(36119);class r extends i.SecretVerificationRequest{}t.UpdateTwoFactorAuthenticatorRequest=r},37682:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateTwoFactorDuoRequest=void 0;const i=n(36119);class r extends i.SecretVerificationRequest{}t.UpdateTwoFactorDuoRequest=r},3191:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateTwoFactorEmailRequest=void 0;const i=n(36119);class r extends i.SecretVerificationRequest{}t.UpdateTwoFactorEmailRequest=r},40088:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateTwoFactorWebAuthnDeleteRequest=void 0;const i=n(36119);class r extends i.SecretVerificationRequest{}t.UpdateTwoFactorWebAuthnDeleteRequest=r},72842:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateTwoFactorWebAuthnRequest=void 0;const i=n(36119);class r extends i.SecretVerificationRequest{}t.UpdateTwoFactorWebAuthnRequest=r},17128:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateTwoFactorYubioOtpRequest=void 0;const i=n(36119);class r extends i.SecretVerificationRequest{}t.UpdateTwoFactorYubioOtpRequest=r},85314:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VerifyBankRequest=void 0;t.VerifyBankRequest=class{}},25086:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VerifyDeleteRecoverRequest=void 0;t.VerifyDeleteRecoverRequest=class{constructor(e,t){this.userId=e,this.token=t}}},81106:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VerifyEmailRequest=void 0;t.VerifyEmailRequest=class{constructor(e,t){this.userId=e,this.token=t}}},92666:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApiKeyResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.apiKey=this.getResponseProperty("ApiKey"),this.revisionDate=new Date(this.getResponseProperty("RevisionDate"))}}t.ApiKeyResponse=r},33146:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttachmentResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.url=this.getResponseProperty("Url"),this.fileName=this.getResponseProperty("FileName"),this.key=this.getResponseProperty("Key"),this.size=this.getResponseProperty("Size"),this.sizeName=this.getResponseProperty("SizeName")}}t.AttachmentResponse=r},15487:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttachmentUploadDataResponse=void 0;const i=n(17273),r=n(31238);class o extends i.BaseResponse{constructor(e){super(e),this.url=null,this.attachmentId=this.getResponseProperty("AttachmentId"),this.fileUploadType=this.getResponseProperty("FileUploadType");const t=this.getResponseProperty("CipherResponse"),n=this.getResponseProperty("CipherMiniResponse");this.cipherResponse=null==t?null:new r.CipherResponse(t),this.cipherMiniResponse=null==n?null:new r.CipherResponse(n),this.url=this.getResponseProperty("Url")}}t.AttachmentUploadDataResponse=o},17273:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseResponse=void 0;t.BaseResponse=class{constructor(e){this.response=e}getResponseProperty(e,t=null,n=!1){if(null==e||""===e)throw new Error("propertyName must not be null/empty.");if(null==t&&null!=this.response&&(t=this.response),null==t)return null;if(!n&&void 0===t[e]){let n=null;n=e.charAt(0)===e.charAt(0).toUpperCase()?e.charAt(0).toLowerCase():e.charAt(0).toUpperCase(),e.length>1&&(n+=e.slice(1)),void 0===t[e=n]&&(e=e.toLowerCase()),void 0===t[e]&&(e=e.toUpperCase())}return t[e]}}},56215:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BillingHistoryResponse=void 0;const i=n(17273),r=n(61700);class o extends i.BaseResponse{constructor(e){super(e),this.invoices=[],this.transactions=[];const t=this.getResponseProperty("Transactions"),n=this.getResponseProperty("Invoices");null!=t&&(this.transactions=t.map((e=>new r.BillingTransactionResponse(e)))),null!=n&&(this.invoices=n.map((e=>new r.BillingInvoiceResponse(e))))}get hasNoHistory(){return 0==this.invoices.length&&0==this.transactions.length}}t.BillingHistoryResponse=o},90070:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BillingPaymentResponse=void 0;const i=n(17273),r=n(61700);class o extends i.BaseResponse{constructor(e){super(e),this.balance=this.getResponseProperty("Balance");const t=this.getResponseProperty("PaymentSource");this.paymentSource=null==t?null:new r.BillingSourceResponse(t)}}t.BillingPaymentResponse=o},61700:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BillingTransactionResponse=t.BillingInvoiceResponse=t.BillingSourceResponse=t.BillingResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.invoices=[],this.transactions=[],this.balance=this.getResponseProperty("Balance");const t=this.getResponseProperty("PaymentSource"),n=this.getResponseProperty("Transactions"),i=this.getResponseProperty("Invoices");this.paymentSource=null==t?null:new o(t),null!=n&&(this.transactions=n.map((e=>new s(e)))),null!=i&&(this.invoices=i.map((e=>new a(e))))}}t.BillingResponse=r;class o extends i.BaseResponse{constructor(e){super(e),this.type=this.getResponseProperty("Type"),this.cardBrand=this.getResponseProperty("CardBrand"),this.description=this.getResponseProperty("Description"),this.needsVerification=this.getResponseProperty("NeedsVerification")}}t.BillingSourceResponse=o;class a extends i.BaseResponse{constructor(e){super(e),this.url=this.getResponseProperty("Url"),this.pdfUrl=this.getResponseProperty("PdfUrl"),this.number=this.getResponseProperty("Number"),this.paid=this.getResponseProperty("Paid"),this.date=this.getResponseProperty("Date"),this.amount=this.getResponseProperty("Amount")}}t.BillingInvoiceResponse=a;class s extends i.BaseResponse{constructor(e){super(e),this.createdDate=this.getResponseProperty("CreatedDate"),this.amount=this.getResponseProperty("Amount"),this.refunded=this.getResponseProperty("Refunded"),this.partiallyRefunded=this.getResponseProperty("PartiallyRefunded"),this.refundedAmount=this.getResponseProperty("RefundedAmount"),this.type=this.getResponseProperty("Type"),this.paymentMethodType=this.getResponseProperty("PaymentMethodType"),this.details=this.getResponseProperty("Details")}}t.BillingTransactionResponse=s},15461:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BreachAccountResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.addedDate=this.getResponseProperty("AddedDate"),this.breachDate=this.getResponseProperty("BreachDate"),this.dataClasses=this.getResponseProperty("DataClasses"),this.description=this.getResponseProperty("Description"),this.domain=this.getResponseProperty("Domain"),this.isActive=this.getResponseProperty("IsActive"),this.isVerified=this.getResponseProperty("IsVerified"),this.logoPath=this.getResponseProperty("LogoPath"),this.modifiedDate=this.getResponseProperty("ModifiedDate"),this.name=this.getResponseProperty("Name"),this.pwnCount=this.getResponseProperty("PwnCount"),this.title=this.getResponseProperty("Title")}}t.BreachAccountResponse=r},31238:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherResponse=void 0;const i=n(34453),r=n(59773),o=n(9592),a=n(25327),s=n(89387),l=n(3865),c=n(33146),d=n(17273),p=n(43567);class u extends d.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.organizationId=this.getResponseProperty("OrganizationId"),this.folderId=this.getResponseProperty("FolderId")||null,this.type=this.getResponseProperty("Type"),this.name=this.getResponseProperty("Name"),this.notes=this.getResponseProperty("Notes"),this.favorite=this.getResponseProperty("Favorite")||!1,this.edit=!!this.getResponseProperty("Edit"),null==this.getResponseProperty("ViewPassword")?this.viewPassword=!0:this.viewPassword=this.getResponseProperty("ViewPassword"),this.organizationUseTotp=this.getResponseProperty("OrganizationUseTotp"),this.revisionDate=this.getResponseProperty("RevisionDate"),this.collectionIds=this.getResponseProperty("CollectionIds"),this.deletedDate=this.getResponseProperty("DeletedDate");const t=this.getResponseProperty("Login");null!=t&&(this.login=new s.LoginApi(t));const n=this.getResponseProperty("Card");null!=n&&(this.card=new r.CardApi(n));const d=this.getResponseProperty("Identity");null!=d&&(this.identity=new a.IdentityApi(d));const u=this.getResponseProperty("SecureNote");null!=u&&(this.secureNote=new l.SecureNoteApi(u));const m=this.getResponseProperty("Fields");null!=m&&(this.fields=m.map((e=>new o.FieldApi(e))));const h=this.getResponseProperty("Attachments");null!=h&&(this.attachments=h.map((e=>new c.AttachmentResponse(e))));const v=this.getResponseProperty("PasswordHistory");null!=v&&(this.passwordHistory=v.map((e=>new p.PasswordHistoryResponse(e)))),this.reprompt=this.getResponseProperty("Reprompt")||i.CipherRepromptType.None}}t.CipherResponse=u},11228:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionGroupDetailsResponse=t.CollectionDetailsResponse=t.CollectionResponse=void 0;const i=n(17273),r=n(61747);class o extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.organizationId=this.getResponseProperty("OrganizationId"),this.name=this.getResponseProperty("Name"),this.externalId=this.getResponseProperty("ExternalId")}}t.CollectionResponse=o;t.CollectionDetailsResponse=class extends o{constructor(e){super(e),this.readOnly=this.getResponseProperty("ReadOnly")||!1}};t.CollectionGroupDetailsResponse=class extends o{constructor(e){super(e),this.groups=[];const t=this.getResponseProperty("Groups");null!=t&&(this.groups=t.map((e=>new r.SelectionReadOnlyResponse(e))))}}},91266:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DomainsResponse=void 0;const i=n(17273),r=n(89457);class o extends i.BaseResponse{constructor(e){super(e),this.globalEquivalentDomains=[],this.equivalentDomains=this.getResponseProperty("EquivalentDomains");const t=this.getResponseProperty("GlobalEquivalentDomains");this.globalEquivalentDomains=null!=t?t.map((e=>new r.GlobalDomainResponse(e))):[]}}t.DomainsResponse=o},50881:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAccessViewResponse=t.EmergencyAccessTakeoverResponse=t.EmergencyAccessGrantorDetailsResponse=t.EmergencyAccessGranteeDetailsResponse=void 0;const i=n(17273),r=n(31238);class o extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.granteeId=this.getResponseProperty("GranteeId"),this.name=this.getResponseProperty("Name"),this.email=this.getResponseProperty("Email"),this.type=this.getResponseProperty("Type"),this.status=this.getResponseProperty("Status"),this.waitTimeDays=this.getResponseProperty("WaitTimeDays"),this.creationDate=this.getResponseProperty("CreationDate")}}t.EmergencyAccessGranteeDetailsResponse=o;class a extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.grantorId=this.getResponseProperty("GrantorId"),this.name=this.getResponseProperty("Name"),this.email=this.getResponseProperty("Email"),this.type=this.getResponseProperty("Type"),this.status=this.getResponseProperty("Status"),this.waitTimeDays=this.getResponseProperty("WaitTimeDays"),this.creationDate=this.getResponseProperty("CreationDate")}}t.EmergencyAccessGrantorDetailsResponse=a;class s extends i.BaseResponse{constructor(e){super(e),this.keyEncrypted=this.getResponseProperty("KeyEncrypted"),this.kdf=this.getResponseProperty("Kdf"),this.kdfIterations=this.getResponseProperty("KdfIterations")}}t.EmergencyAccessTakeoverResponse=s;class l extends i.BaseResponse{constructor(e){super(e),this.ciphers=[],this.keyEncrypted=this.getResponseProperty("KeyEncrypted");const t=this.getResponseProperty("Ciphers");null!=t&&(this.ciphers=t.map((e=>new r.CipherResponse(e))))}}t.EmergencyAccessViewResponse=l},33018:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorResponse=void 0;const i=n(82769),r=n(17273);class o extends r.BaseResponse{constructor(e,t,n){var r,o;super(e);let a=null;if(null!=e){const t=this.getResponseProperty("ErrorModel");a=t&&n?t:e}a?(this.message=this.getResponseProperty("Message",a),this.validationErrors=this.getResponseProperty("ValidationErrors",a),this.captchaSiteKey=null===(o=null===(r=this.validationErrors)||void 0===r?void 0:r.HCaptcha_SiteKey)||void 0===o?void 0:o[0],this.captchaRequired=!i.Utils.isNullOrWhitespace(this.captchaSiteKey)):429===t&&(this.message="Rate limit exceeded. Try again later."),this.statusCode=t}getSingleMessage(){if(null==this.validationErrors)return this.message;for(const e in this.validationErrors)if(this.validationErrors.hasOwnProperty(e)&&this.validationErrors[e].length)return this.validationErrors[e][0];return this.message}getAllMessages(){const e=[];if(null==this.validationErrors)return e;for(const t in this.validationErrors)this.validationErrors.hasOwnProperty(t)&&this.validationErrors[t].forEach((n=>{let i="";if(t.indexOf("[")>-1&&t.indexOf("]")>-1){const e=t.lastIndexOf(".");i=t.substr(0,e>-1?e:t.length)+": "}e.push(i+n)}));return e}}t.ErrorResponse=o},88850:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.type=this.getResponseProperty("Type"),this.userId=this.getResponseProperty("UserId"),this.organizationId=this.getResponseProperty("OrganizationId"),this.providerId=this.getResponseProperty("ProviderId"),this.cipherId=this.getResponseProperty("CipherId"),this.collectionId=this.getResponseProperty("CollectionId"),this.groupId=this.getResponseProperty("GroupId"),this.policyId=this.getResponseProperty("PolicyId"),this.organizationUserId=this.getResponseProperty("OrganizationUserId"),this.providerUserId=this.getResponseProperty("ProviderUserId"),this.providerOrganizationId=this.getResponseProperty("ProviderOrganizationId"),this.actingUserId=this.getResponseProperty("ActingUserId"),this.date=this.getResponseProperty("Date"),this.deviceType=this.getResponseProperty("DeviceType"),this.ipAddress=this.getResponseProperty("IpAddress"),this.installationId=this.getResponseProperty("InstallationId")}}t.EventResponse=r},8823:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FolderResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.name=this.getResponseProperty("Name"),this.revisionDate=this.getResponseProperty("RevisionDate")}}t.FolderResponse=r},89457:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalDomainResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.type=this.getResponseProperty("Type"),this.domains=this.getResponseProperty("Domains"),this.excluded=this.getResponseProperty("Excluded")}}t.GlobalDomainResponse=r},70529:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GroupDetailsResponse=t.GroupResponse=void 0;const i=n(17273),r=n(61747);class o extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.organizationId=this.getResponseProperty("OrganizationId"),this.name=this.getResponseProperty("Name"),this.accessAll=this.getResponseProperty("AccessAll"),this.externalId=this.getResponseProperty("ExternalId")}}t.GroupResponse=o;t.GroupDetailsResponse=class extends o{constructor(e){super(e),this.collections=[];const t=this.getResponseProperty("Collections");null!=t&&(this.collections=t.map((e=>new r.SelectionReadOnlyResponse(e))))}}},56659:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityCaptchaResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.siteKey=this.getResponseProperty("HCaptcha_SiteKey")}}t.IdentityCaptchaResponse=r},7269:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityTokenResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.accessToken=e.access_token,this.expiresIn=e.expires_in,this.refreshToken=e.refresh_token,this.tokenType=e.token_type,this.resetMasterPassword=this.getResponseProperty("ResetMasterPassword"),this.privateKey=this.getResponseProperty("PrivateKey"),this.key=this.getResponseProperty("Key"),this.twoFactorToken=this.getResponseProperty("TwoFactorToken"),this.kdf=this.getResponseProperty("Kdf"),this.kdfIterations=this.getResponseProperty("KdfIterations"),this.forcePasswordReset=this.getResponseProperty("ForcePasswordReset"),this.apiUseKeyConnector=this.getResponseProperty("ApiUseKeyConnector"),this.keyConnectorUrl=this.getResponseProperty("KeyConnectorUrl")}}t.IdentityTokenResponse=r},38326:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityTwoFactorResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.twoFactorProviders2=new Map,this.captchaToken=this.getResponseProperty("CaptchaBypassToken"),this.twoFactorProviders=this.getResponseProperty("TwoFactorProviders");const t=this.getResponseProperty("TwoFactorProviders2");if(null!=t)for(const n in t)t.hasOwnProperty(n)&&this.twoFactorProviders2.set(parseInt(n,null),t[n])}}t.IdentityTwoFactorResponse=r},93140:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeyConnectorUserKeyResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.key=this.getResponseProperty("Key")}}t.KeyConnectorUserKeyResponse=r},14325:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeysResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.privateKey=this.getResponseProperty("PrivateKey"),this.publicKey=this.getResponseProperty("PublicKey")}}t.KeysResponse=r},7865:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e,t){super(e);const n=this.getResponseProperty("Data");this.data=null==n?[]:n.map((e=>new t(e))),this.continuationToken=this.getResponseProperty("ContinuationToken")}}t.ListResponse=r},16178:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SyncSendNotification=t.UserNotification=t.SyncFolderNotification=t.SyncCipherNotification=t.NotificationResponse=void 0;const i=n(7837),r=n(17273);class o extends r.BaseResponse{constructor(e){super(e),this.contextId=this.getResponseProperty("ContextId"),this.type=this.getResponseProperty("Type");const t=this.getResponseProperty("Payload");switch(this.type){case i.NotificationType.SyncCipherCreate:case i.NotificationType.SyncCipherDelete:case i.NotificationType.SyncCipherUpdate:case i.NotificationType.SyncLoginDelete:this.payload=new a(t);break;case i.NotificationType.SyncFolderCreate:case i.NotificationType.SyncFolderDelete:case i.NotificationType.SyncFolderUpdate:this.payload=new s(t);break;case i.NotificationType.SyncVault:case i.NotificationType.SyncCiphers:case i.NotificationType.SyncOrgKeys:case i.NotificationType.SyncSettings:case i.NotificationType.LogOut:this.payload=new l(t);break;case i.NotificationType.SyncSendCreate:case i.NotificationType.SyncSendUpdate:case i.NotificationType.SyncSendDelete:this.payload=new c(t)}}}t.NotificationResponse=o;class a extends r.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.userId=this.getResponseProperty("UserId"),this.organizationId=this.getResponseProperty("OrganizationId"),this.collectionIds=this.getResponseProperty("CollectionIds"),this.revisionDate=new Date(this.getResponseProperty("RevisionDate"))}}t.SyncCipherNotification=a;class s extends r.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.userId=this.getResponseProperty("UserId"),this.revisionDate=new Date(this.getResponseProperty("RevisionDate"))}}t.SyncFolderNotification=s;class l extends r.BaseResponse{constructor(e){super(e),this.userId=this.getResponseProperty("UserId"),this.date=new Date(this.getResponseProperty("Date"))}}t.UserNotification=l;class c extends r.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.userId=this.getResponseProperty("UserId"),this.revisionDate=new Date(this.getResponseProperty("RevisionDate"))}}t.SyncSendNotification=c},57344:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationSsoResponse=void 0;const i=n(21021),r=n(17273);class o extends r.BaseResponse{constructor(e){super(e),this.enabled=this.getResponseProperty("Enabled"),this.data=null!=this.getResponseProperty("Data")?new i.SsoConfigApi(this.getResponseProperty("Data")):null,this.urls=new a(this.getResponseProperty("Urls"))}}t.OrganizationSsoResponse=o;class a extends r.BaseResponse{constructor(e){super(e),this.callbackPath=this.getResponseProperty("CallbackPath"),this.signedOutCallbackPath=this.getResponseProperty("SignedOutCallbackPath"),this.spEntityId=this.getResponseProperty("SpEntityId"),this.spMetadataUrl=this.getResponseProperty("SpMetadataUrl"),this.spAcsUrl=this.getResponseProperty("SpAcsUrl")}}},53661:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationApiKeyInformationResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.keyType=this.getResponseProperty("KeyType")}}t.OrganizationApiKeyInformationResponse=r},12386:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationAutoEnrollStatusResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.resetPasswordEnabled=this.getResponseProperty("ResetPasswordEnabled")}}t.OrganizationAutoEnrollStatusResponse=r},27847:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationConnectionResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e,t){super(e),this.id=this.getResponseProperty("Id"),this.type=this.getResponseProperty("Type"),this.organizationId=this.getResponseProperty("OrganizationId"),this.enabled=this.getResponseProperty("Enabled");const n=this.getResponseProperty("Config");this.config=null==n?null:new t(n)}}t.OrganizationConnectionResponse=r},37595:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationKeysResponse=void 0;const i=n(14325);class r extends i.KeysResponse{constructor(e){super(e)}}t.OrganizationKeysResponse=r},68673:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationResponse=void 0;const i=n(17273),r=n(88290);class o extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.identifier=this.getResponseProperty("Identifier"),this.name=this.getResponseProperty("Name"),this.businessName=this.getResponseProperty("BusinessName"),this.businessAddress1=this.getResponseProperty("BusinessAddress1"),this.businessAddress2=this.getResponseProperty("BusinessAddress2"),this.businessAddress3=this.getResponseProperty("BusinessAddress3"),this.businessCountry=this.getResponseProperty("BusinessCountry"),this.businessTaxNumber=this.getResponseProperty("BusinessTaxNumber"),this.billingEmail=this.getResponseProperty("BillingEmail");const t=this.getResponseProperty("Plan");this.plan=null==t?null:new r.PlanResponse(t),this.planType=this.getResponseProperty("PlanType"),this.seats=this.getResponseProperty("Seats"),this.maxAutoscaleSeats=this.getResponseProperty("MaxAutoscaleSeats"),this.maxCollections=this.getResponseProperty("MaxCollections"),this.maxStorageGb=this.getResponseProperty("MaxStorageGb"),this.useGroups=this.getResponseProperty("UseGroups"),this.useDirectory=this.getResponseProperty("UseDirectory"),this.useEvents=this.getResponseProperty("UseEvents"),this.useTotp=this.getResponseProperty("UseTotp"),this.use2fa=this.getResponseProperty("Use2fa"),this.useApi=this.getResponseProperty("UseApi"),this.useResetPassword=this.getResponseProperty("UseResetPassword"),this.hasPublicAndPrivateKeys=this.getResponseProperty("HasPublicAndPrivateKeys")}}t.OrganizationResponse=o},62560:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationSponsorshipSyncStatusResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e);const t=this.getResponseProperty("LastSyncDate");t&&(this.lastSyncDate=new Date(t))}}t.OrganizationSponsorshipSyncStatusResponse=r},71098:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationSubscriptionResponse=void 0;const i=n(68673),r=n(71892);class o extends i.OrganizationResponse{constructor(e){super(e),this.storageName=this.getResponseProperty("StorageName"),this.storageGb=this.getResponseProperty("StorageGb");const t=this.getResponseProperty("Subscription");this.subscription=null==t?null:new r.BillingSubscriptionResponse(t);const n=this.getResponseProperty("UpcomingInvoice");this.upcomingInvoice=null==n?null:new r.BillingSubscriptionUpcomingInvoiceResponse(n),this.expiration=this.getResponseProperty("Expiration")}}t.OrganizationSubscriptionResponse=o},89072:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserBulkPublicKeyResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.userId=this.getResponseProperty("UserId"),this.key=this.getResponseProperty("Key")}}t.OrganizationUserBulkPublicKeyResponse=r},55022:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserBulkResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.error=this.getResponseProperty("Error")}}t.OrganizationUserBulkResponse=r},68749:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserResetPasswordDetailsReponse=t.OrganizationUserDetailsResponse=t.OrganizationUserUserDetailsResponse=t.OrganizationUserResponse=void 0;const i=n(96926),r=n(17273),o=n(61747);class a extends r.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.userId=this.getResponseProperty("UserId"),this.type=this.getResponseProperty("Type"),this.status=this.getResponseProperty("Status"),this.permissions=new i.PermissionsApi(this.getResponseProperty("Permissions")),this.accessAll=this.getResponseProperty("AccessAll"),this.resetPasswordEnrolled=this.getResponseProperty("ResetPasswordEnrolled")}}t.OrganizationUserResponse=a;t.OrganizationUserUserDetailsResponse=class extends a{constructor(e){var t;super(e),this.name=this.getResponseProperty("Name"),this.email=this.getResponseProperty("Email"),this.twoFactorEnabled=this.getResponseProperty("TwoFactorEnabled"),this.usesKeyConnector=null!==(t=this.getResponseProperty("UsesKeyConnector"))&&void 0!==t&&t}};t.OrganizationUserDetailsResponse=class extends a{constructor(e){super(e),this.collections=[];const t=this.getResponseProperty("Collections");null!=t&&(this.collections=t.map((e=>new o.SelectionReadOnlyResponse(e))))}};class s extends r.BaseResponse{constructor(e){super(e),this.kdf=this.getResponseProperty("Kdf"),this.kdfIterations=this.getResponseProperty("KdfIterations"),this.resetPasswordKey=this.getResponseProperty("ResetPasswordKey"),this.encryptedPrivateKey=this.getResponseProperty("EncryptedPrivateKey")}}t.OrganizationUserResetPasswordDetailsReponse=s},43567:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordHistoryResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.password=this.getResponseProperty("Password"),this.lastUsedDate=this.getResponseProperty("LastUsedDate")}}t.PasswordHistoryResponse=r},38402:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PaymentResponse=void 0;const i=n(17273),r=n(59665);class o extends i.BaseResponse{constructor(e){super(e);const t=this.getResponseProperty("UserProfile");null!=t&&(this.userProfile=new r.ProfileResponse(t)),this.paymentIntentClientSecret=this.getResponseProperty("PaymentIntentClientSecret"),this.success=this.getResponseProperty("Success")}}t.PaymentResponse=o},88290:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlanResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.type=this.getResponseProperty("Type"),this.product=this.getResponseProperty("Product"),this.name=this.getResponseProperty("Name"),this.isAnnual=this.getResponseProperty("IsAnnual"),this.nameLocalizationKey=this.getResponseProperty("NameLocalizationKey"),this.descriptionLocalizationKey=this.getResponseProperty("DescriptionLocalizationKey"),this.canBeUsedByBusiness=this.getResponseProperty("CanBeUsedByBusiness"),this.baseSeats=this.getResponseProperty("BaseSeats"),this.baseStorageGb=this.getResponseProperty("BaseStorageGb"),this.maxCollections=this.getResponseProperty("MaxCollections"),this.maxUsers=this.getResponseProperty("MaxUsers"),this.hasAdditionalSeatsOption=this.getResponseProperty("HasAdditionalSeatsOption"),this.maxAdditionalSeats=this.getResponseProperty("MaxAdditionalSeats"),this.hasAdditionalStorageOption=this.getResponseProperty("HasAdditionalStorageOption"),this.maxAdditionalStorage=this.getResponseProperty("MaxAdditionalStorage"),this.hasPremiumAccessOption=this.getResponseProperty("HasPremiumAccessOption"),this.trialPeriodDays=this.getResponseProperty("TrialPeriodDays"),this.hasSelfHost=this.getResponseProperty("HasSelfHost"),this.hasPolicies=this.getResponseProperty("HasPolicies"),this.hasGroups=this.getResponseProperty("HasGroups"),this.hasDirectory=this.getResponseProperty("HasDirectory"),this.hasEvents=this.getResponseProperty("HasEvents"),this.hasTotp=this.getResponseProperty("HasTotp"),this.has2fa=this.getResponseProperty("Has2fa"),this.hasApi=this.getResponseProperty("HasApi"),this.hasSso=this.getResponseProperty("HasSso"),this.hasResetPassword=this.getResponseProperty("HasResetPassword"),this.usersGetPremium=this.getResponseProperty("UsersGetPremium"),this.upgradeSortOrder=this.getResponseProperty("UpgradeSortOrder"),this.displaySortOrder=this.getResponseProperty("SortOrder"),this.legacyYear=this.getResponseProperty("LegacyYear"),this.disabled=this.getResponseProperty("Disabled"),this.stripePlanId=this.getResponseProperty("StripePlanId"),this.stripeSeatPlanId=this.getResponseProperty("StripeSeatPlanId"),this.stripeStoragePlanId=this.getResponseProperty("StripeStoragePlanId"),this.stripePremiumAccessPlanId=this.getResponseProperty("StripePremiumAccessPlanId"),this.basePrice=this.getResponseProperty("BasePrice"),this.seatPrice=this.getResponseProperty("SeatPrice"),this.additionalStoragePricePerGb=this.getResponseProperty("AdditionalStoragePricePerGb"),this.premiumAccessOptionPrice=this.getResponseProperty("PremiumAccessOptionPrice")}}t.PlanResponse=r},64030:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PolicyResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.organizationId=this.getResponseProperty("OrganizationId"),this.type=this.getResponseProperty("Type"),this.data=this.getResponseProperty("Data"),this.enabled=this.getResponseProperty("Enabled")}}t.PolicyResponse=r},52196:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PreloginResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.kdf=this.getResponseProperty("Kdf"),this.kdfIterations=this.getResponseProperty("KdfIterations")}}t.PreloginResponse=r},68475:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProfileOrganizationResponse=void 0;const i=n(96926),r=n(17273);class o extends r.BaseResponse{constructor(e){var t,n;super(e),this.id=this.getResponseProperty("Id"),this.name=this.getResponseProperty("Name"),this.usePolicies=this.getResponseProperty("UsePolicies"),this.useGroups=this.getResponseProperty("UseGroups"),this.useDirectory=this.getResponseProperty("UseDirectory"),this.useEvents=this.getResponseProperty("UseEvents"),this.useTotp=this.getResponseProperty("UseTotp"),this.use2fa=this.getResponseProperty("Use2fa"),this.useApi=this.getResponseProperty("UseApi"),this.useSso=this.getResponseProperty("UseSso"),this.useKeyConnector=null!==(t=this.getResponseProperty("UseKeyConnector"))&&void 0!==t&&t,this.useResetPassword=this.getResponseProperty("UseResetPassword"),this.selfHost=this.getResponseProperty("SelfHost"),this.usersGetPremium=this.getResponseProperty("UsersGetPremium"),this.seats=this.getResponseProperty("Seats"),this.maxCollections=this.getResponseProperty("MaxCollections"),this.maxStorageGb=this.getResponseProperty("MaxStorageGb"),this.key=this.getResponseProperty("Key"),this.hasPublicAndPrivateKeys=this.getResponseProperty("HasPublicAndPrivateKeys"),this.status=this.getResponseProperty("Status"),this.type=this.getResponseProperty("Type"),this.enabled=this.getResponseProperty("Enabled"),this.ssoBound=this.getResponseProperty("SsoBound"),this.identifier=this.getResponseProperty("Identifier"),this.permissions=new i.PermissionsApi(this.getResponseProperty("permissions")),this.resetPasswordEnrolled=this.getResponseProperty("ResetPasswordEnrolled"),this.userId=this.getResponseProperty("UserId"),this.providerId=this.getResponseProperty("ProviderId"),this.providerName=this.getResponseProperty("ProviderName"),this.familySponsorshipFriendlyName=this.getResponseProperty("FamilySponsorshipFriendlyName"),this.familySponsorshipAvailable=this.getResponseProperty("FamilySponsorshipAvailable"),this.planProductType=this.getResponseProperty("PlanProductType"),this.keyConnectorEnabled=null!==(n=this.getResponseProperty("KeyConnectorEnabled"))&&void 0!==n&&n,this.keyConnectorUrl=this.getResponseProperty("KeyConnectorUrl");const r=this.getResponseProperty("FamilySponsorshipLastSyncDate");r&&(this.familySponsorshipLastSyncDate=new Date(r));const o=this.getResponseProperty("FamilySponsorshipValidUntil");o&&(this.familySponsorshipValidUntil=new Date(o)),this.familySponsorshipToDelete=this.getResponseProperty("FamilySponsorshipToDelete")}}t.ProfileOrganizationResponse=o},13949:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProfileProviderOrganizationResponse=void 0;const i=n(68475);class r extends i.ProfileOrganizationResponse{constructor(e){super(e),this.keyConnectorEnabled=!1}}t.ProfileProviderOrganizationResponse=r},65116:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProfileProviderResponse=void 0;const i=n(96926),r=n(17273);class o extends r.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.name=this.getResponseProperty("Name"),this.key=this.getResponseProperty("Key"),this.status=this.getResponseProperty("Status"),this.type=this.getResponseProperty("Type"),this.enabled=this.getResponseProperty("Enabled"),this.permissions=new i.PermissionsApi(this.getResponseProperty("permissions")),this.userId=this.getResponseProperty("UserId"),this.useEvents=this.getResponseProperty("UseEvents")}}t.ProfileProviderResponse=o},59665:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProfileResponse=void 0;const i=n(17273),r=n(68475),o=n(13949),a=n(65116);class s extends i.BaseResponse{constructor(e){var t,n;super(e),this.organizations=[],this.providers=[],this.providerOrganizations=[],this.id=this.getResponseProperty("Id"),this.name=this.getResponseProperty("Name"),this.email=this.getResponseProperty("Email"),this.emailVerified=this.getResponseProperty("EmailVerified"),this.masterPasswordHint=this.getResponseProperty("MasterPasswordHint"),this.premium=this.getResponseProperty("Premium"),this.culture=this.getResponseProperty("Culture"),this.twoFactorEnabled=this.getResponseProperty("TwoFactorEnabled"),this.key=this.getResponseProperty("Key"),this.privateKey=this.getResponseProperty("PrivateKey"),this.securityStamp=this.getResponseProperty("SecurityStamp"),this.forcePasswordReset=null!==(t=this.getResponseProperty("ForcePasswordReset"))&&void 0!==t&&t,this.usesKeyConnector=null!==(n=this.getResponseProperty("UsesKeyConnector"))&&void 0!==n&&n;const i=this.getResponseProperty("Organizations");null!=i&&(this.organizations=i.map((e=>new r.ProfileOrganizationResponse(e))));const s=this.getResponseProperty("Providers");null!=s&&(this.providers=s.map((e=>new a.ProfileProviderResponse(e))));const l=this.getResponseProperty("ProviderOrganizations");null!=l&&(this.providerOrganizations=l.map((e=>new o.ProfileProviderOrganizationResponse(e))))}}t.ProfileResponse=s},89001:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderOrganizationOrganizationDetailsResponse=t.ProviderOrganizationResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.providerId=this.getResponseProperty("ProviderId"),this.organizationId=this.getResponseProperty("OrganizationId"),this.key=this.getResponseProperty("Key"),this.settings=this.getResponseProperty("Settings"),this.creationDate=this.getResponseProperty("CreationDate"),this.revisionDate=this.getResponseProperty("RevisionDate")}}t.ProviderOrganizationResponse=r;t.ProviderOrganizationOrganizationDetailsResponse=class extends r{constructor(e){super(e),this.organizationName=this.getResponseProperty("OrganizationName")}}},98073:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.name=this.getResponseProperty("Name"),this.businessName=this.getResponseProperty("BusinessName"),this.billingEmail=this.getResponseProperty("BillingEmail")}}t.ProviderResponse=r},82842:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserBulkPublicKeyResponse=void 0;const i=n(89072);class r extends i.OrganizationUserBulkPublicKeyResponse{}t.ProviderUserBulkPublicKeyResponse=r},62161:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserBulkResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.error=this.getResponseProperty("Error")}}t.ProviderUserBulkResponse=r},67177:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserUserDetailsResponse=t.ProviderUserResponse=void 0;const i=n(96926),r=n(17273);class o extends r.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.userId=this.getResponseProperty("UserId"),this.type=this.getResponseProperty("Type"),this.status=this.getResponseProperty("Status"),this.permissions=new i.PermissionsApi(this.getResponseProperty("Permissions"))}}t.ProviderUserResponse=o;t.ProviderUserUserDetailsResponse=class extends o{constructor(e){super(e),this.name=this.getResponseProperty("Name"),this.email=this.getResponseProperty("Email")}}},61747:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionReadOnlyResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.readOnly=this.getResponseProperty("ReadOnly"),this.hidePasswords=this.getResponseProperty("HidePasswords")}}t.SelectionReadOnlyResponse=r},3882:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendAccessResponse=void 0;const i=n(39255),r=n(8057),o=n(17273);class a extends o.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.type=this.getResponseProperty("Type"),this.name=this.getResponseProperty("Name");const t=this.getResponseProperty("Text");null!=t&&(this.text=new r.SendTextApi(t));const n=this.getResponseProperty("File");null!=n&&(this.file=new i.SendFileApi(n)),this.expirationDate=this.getResponseProperty("ExpirationDate"),this.creatorIdentifier=this.getResponseProperty("CreatorIdentifier")}}t.SendAccessResponse=a},56247:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendFileDownloadDataResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.id=null,this.url=null,this.id=this.getResponseProperty("Id"),this.url=this.getResponseProperty("Url")}}t.SendFileDownloadDataResponse=r},69654:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendFileUploadDataResponse=void 0;const i=n(17273),r=n(22391);class o extends i.BaseResponse{constructor(e){super(e),this.url=null,this.fileUploadType=this.getResponseProperty("FileUploadType");const t=this.getResponseProperty("SendResponse");this.sendResponse=null==t?null:new r.SendResponse(t),this.url=this.getResponseProperty("Url")}}t.SendFileUploadDataResponse=o},22391:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendResponse=void 0;const i=n(39255),r=n(8057),o=n(17273);class a extends o.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.accessId=this.getResponseProperty("AccessId"),this.type=this.getResponseProperty("Type"),this.name=this.getResponseProperty("Name"),this.notes=this.getResponseProperty("Notes"),this.key=this.getResponseProperty("Key"),this.maxAccessCount=this.getResponseProperty("MaxAccessCount"),this.accessCount=this.getResponseProperty("AccessCount"),this.revisionDate=this.getResponseProperty("RevisionDate"),this.expirationDate=this.getResponseProperty("ExpirationDate"),this.deletionDate=this.getResponseProperty("DeletionDate"),this.password=this.getResponseProperty("Password"),this.disable=this.getResponseProperty("Disabled")||!1,this.hideEmail=this.getResponseProperty("HideEmail")||!1;const t=this.getResponseProperty("Text");null!=t&&(this.text=new r.SendTextApi(t));const n=this.getResponseProperty("File");null!=n&&(this.file=new i.SendFileApi(n))}}t.SendResponse=a},71892:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BillingSubscriptionUpcomingInvoiceResponse=t.BillingSubscriptionItemResponse=t.BillingSubscriptionResponse=t.SubscriptionResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.storageName=this.getResponseProperty("StorageName"),this.storageGb=this.getResponseProperty("StorageGb"),this.maxStorageGb=this.getResponseProperty("MaxStorageGb"),this.license=this.getResponseProperty("License"),this.expiration=this.getResponseProperty("Expiration"),this.usingInAppPurchase=this.getResponseProperty("UsingInAppPurchase");const t=this.getResponseProperty("Subscription"),n=this.getResponseProperty("UpcomingInvoice");this.subscription=null==t?null:new o(t),this.upcomingInvoice=null==n?null:new s(n)}}t.SubscriptionResponse=r;class o extends i.BaseResponse{constructor(e){super(e),this.items=[],this.trialEndDate=this.getResponseProperty("TrialStartDate"),this.trialEndDate=this.getResponseProperty("TrialEndDate"),this.periodStartDate=this.getResponseProperty("PeriodStartDate"),this.periodEndDate=this.getResponseProperty("PeriodEndDate"),this.cancelledDate=this.getResponseProperty("CancelledDate"),this.cancelAtEndDate=this.getResponseProperty("CancelAtEndDate"),this.status=this.getResponseProperty("Status"),this.cancelled=this.getResponseProperty("Cancelled");const t=this.getResponseProperty("Items");null!=t&&(this.items=t.map((e=>new a(e))))}}t.BillingSubscriptionResponse=o;class a extends i.BaseResponse{constructor(e){super(e),this.name=this.getResponseProperty("Name"),this.amount=this.getResponseProperty("Amount"),this.quantity=this.getResponseProperty("Quantity"),this.interval=this.getResponseProperty("Interval"),this.sponsoredSubscriptionItem=this.getResponseProperty("SponsoredSubscriptionItem")}}t.BillingSubscriptionItemResponse=a;class s extends i.BaseResponse{constructor(e){super(e),this.date=this.getResponseProperty("Date"),this.amount=this.getResponseProperty("Amount")}}t.BillingSubscriptionUpcomingInvoiceResponse=s},79230:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SyncResponse=void 0;const i=n(17273),r=n(31238),o=n(11228),a=n(91266),s=n(8823),l=n(64030),c=n(59665),d=n(22391);class p extends i.BaseResponse{constructor(e){super(e),this.folders=[],this.collections=[],this.ciphers=[],this.policies=[],this.sends=[];const t=this.getResponseProperty("Profile");null!=t&&(this.profile=new c.ProfileResponse(t));const n=this.getResponseProperty("Folders");null!=n&&(this.folders=n.map((e=>new s.FolderResponse(e))));const i=this.getResponseProperty("Collections");null!=i&&(this.collections=i.map((e=>new o.CollectionDetailsResponse(e))));const p=this.getResponseProperty("Ciphers");null!=p&&(this.ciphers=p.map((e=>new r.CipherResponse(e))));const u=this.getResponseProperty("Domains");null!=u&&(this.domains=new a.DomainsResponse(u));const m=this.getResponseProperty("Policies");null!=m&&(this.policies=m.map((e=>new l.PolicyResponse(e))));const h=this.getResponseProperty("Sends");null!=h&&(this.sends=h.map((e=>new d.SendResponse(e))))}}t.SyncResponse=p},10273:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaxInfoResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.taxId=this.getResponseProperty("TaxIdNumber"),this.taxIdType=this.getResponseProperty("TaxIdType"),this.line1=this.getResponseProperty("Line1"),this.line2=this.getResponseProperty("Line2"),this.city=this.getResponseProperty("City"),this.state=this.getResponseProperty("State"),this.postalCode=this.getResponseProperty("PostalCode"),this.country=this.getResponseProperty("Country")}}t.TaxInfoResponse=r},67955:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaxRateResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.country=this.getResponseProperty("Country"),this.state=this.getResponseProperty("State"),this.postalCode=this.getResponseProperty("PostalCode"),this.rate=this.getResponseProperty("Rate")}}t.TaxRateResponse=r},1244:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorAuthenticatorResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.enabled=this.getResponseProperty("Enabled"),this.key=this.getResponseProperty("Key")}}t.TwoFactorAuthenticatorResponse=r},33111:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorDuoResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.enabled=this.getResponseProperty("Enabled"),this.host=this.getResponseProperty("Host"),this.secretKey=this.getResponseProperty("SecretKey"),this.integrationKey=this.getResponseProperty("IntegrationKey")}}t.TwoFactorDuoResponse=r},88540:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorEmailResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.enabled=this.getResponseProperty("Enabled"),this.email=this.getResponseProperty("Email")}}t.TwoFactorEmailResponse=r},50891:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorProviderResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.enabled=this.getResponseProperty("Enabled"),this.type=this.getResponseProperty("Type")}}t.TwoFactorProviderResponse=r},40387:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorRecoverResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.code=this.getResponseProperty("Code")}}t.TwoFactorRecoverResponse=r},61329:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChallengeResponse=t.KeyResponse=t.TwoFactorWebAuthnResponse=void 0;const i=n(82769),r=n(17273);class o extends r.BaseResponse{constructor(e){super(e),this.enabled=this.getResponseProperty("Enabled");const t=this.getResponseProperty("Keys");this.keys=null==t?null:t.map((e=>new a(e)))}}t.TwoFactorWebAuthnResponse=o;class a extends r.BaseResponse{constructor(e){super(e),this.name=this.getResponseProperty("Name"),this.id=this.getResponseProperty("Id"),this.migrated=this.getResponseProperty("Migrated")}}t.KeyResponse=a;class s extends r.BaseResponse{constructor(e){super(e),this.attestation=this.getResponseProperty("attestation"),this.authenticatorSelection=this.getResponseProperty("authenticatorSelection"),this.challenge=i.Utils.fromUrlB64ToArray(this.getResponseProperty("challenge")),this.excludeCredentials=this.getResponseProperty("excludeCredentials").map((e=>(e.id=i.Utils.fromUrlB64ToArray(e.id).buffer,e))),this.extensions=this.getResponseProperty("extensions"),this.pubKeyCredParams=this.getResponseProperty("pubKeyCredParams"),this.rp=this.getResponseProperty("rp"),this.timeout=this.getResponseProperty("timeout");const t=this.getResponseProperty("user");t.id=i.Utils.fromUrlB64ToArray(t.id),this.user=t}}t.ChallengeResponse=s},78086:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorYubiKeyResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.enabled=this.getResponseProperty("Enabled"),this.key1=this.getResponseProperty("Key1"),this.key2=this.getResponseProperty("Key2"),this.key3=this.getResponseProperty("Key3"),this.key4=this.getResponseProperty("Key4"),this.key5=this.getResponseProperty("Key5"),this.nfc=this.getResponseProperty("Nfc")}}t.TwoFactorYubiKeyResponse=r},86457:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserKeyResponse=void 0;const i=n(17273);class r extends i.BaseResponse{constructor(e){super(e),this.userId=this.getResponseProperty("UserId"),this.publicKey=this.getResponseProperty("PublicKey")}}t.UserKeyResponse=r},57759:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttachmentView=void 0;t.AttachmentView=class{constructor(e){this.id=null,this.url=null,this.size=null,this.sizeName=null,this.fileName=null,this.key=null,e&&(this.id=e.id,this.url=e.url,this.size=e.size,this.sizeName=e.sizeName)}get fileSize(){try{if(null!=this.size)return parseInt(this.size,null)}catch(e){}return 0}}},91766:function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.CardView=void 0;const o=n(31909),a=n(60628),s=n(63262);class l extends s.ItemView{constructor(){super(),this.cardholderName=null,this.expMonth=null,this.expYear=null,this.code=null,this._brand=null,this._number=null,this._subTitle=null}get maskedCode(){return null!=this.code?"•".repeat(this.code.length):null}get maskedNumber(){return null!=this.number?"•".repeat(this.number.length):null}get brand(){return this._brand}set brand(e){this._brand=e,this._subTitle=null}get number(){return this._number}set number(e){this._number=e,this._subTitle=null}get subTitle(){if(null==this._subTitle&&(this._subTitle=this.brand,null!=this.number&&this.number.length>=4)){null!=this._subTitle&&""!==this._subTitle?this._subTitle+=", ":this._subTitle="";const e=this.number.length>=5&&null!=this.number.match(new RegExp("^3[47]"))?5:4;this._subTitle+="*"+this.number.substr(this.number.length-e)}return this._subTitle}get expiration(){if(!this.expMonth&&!this.expYear)return null;let e=null!=this.expMonth?("0"+this.expMonth).slice(-2):"__";return e+=" / "+(null!=this.expYear?this.formatYear(this.expYear):"____"),e}formatYear(e){return 2===e.length?"20"+e:e}}i([a.linkedFieldOption(o.CardLinkedId.CardholderName),r("design:type",String)],l.prototype,"cardholderName",void 0),i([a.linkedFieldOption(o.CardLinkedId.ExpMonth,"expirationMonth"),r("design:type",String)],l.prototype,"expMonth",void 0),i([a.linkedFieldOption(o.CardLinkedId.ExpYear,"expirationYear"),r("design:type",String)],l.prototype,"expYear",void 0),i([a.linkedFieldOption(o.CardLinkedId.Code,"securityCode"),r("design:type",String)],l.prototype,"code",void 0),i([a.linkedFieldOption(o.CardLinkedId.Brand),r("design:type",String),r("design:paramtypes",[String])],l.prototype,"brand",null),i([a.linkedFieldOption(o.CardLinkedId.Number),r("design:type",String),r("design:paramtypes",[String])],l.prototype,"number",null),t.CardView=l},97144:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherView=void 0;const i=n(34453),r=n(32773),o=n(91766),a=n(48830),s=n(28331),l=n(99364);t.CipherView=class{constructor(e){var t;this.id=null,this.organizationId=null,this.folderId=null,this.name=null,this.notes=null,this.type=null,this.favorite=!1,this.organizationUseTotp=!1,this.edit=!1,this.viewPassword=!0,this.login=new s.LoginView,this.identity=new a.IdentityView,this.card=new o.CardView,this.secureNote=new l.SecureNoteView,this.attachments=null,this.fields=null,this.passwordHistory=null,this.collectionIds=null,this.revisionDate=null,this.deletedDate=null,this.reprompt=i.CipherRepromptType.None,e&&(this.id=e.id,this.organizationId=e.organizationId,this.folderId=e.folderId,this.favorite=e.favorite,this.organizationUseTotp=e.organizationUseTotp,this.edit=e.edit,this.viewPassword=e.viewPassword,this.type=e.type,this.localData=e.localData,this.collectionIds=e.collectionIds,this.revisionDate=e.revisionDate,this.deletedDate=e.deletedDate,this.reprompt=null!==(t=e.reprompt)&&void 0!==t?t:i.CipherRepromptType.None)}get item(){switch(this.type){case r.CipherType.Login:return this.login;case r.CipherType.SecureNote:return this.secureNote;case r.CipherType.Card:return this.card;case r.CipherType.Identity:return this.identity}return null}get subTitle(){return this.item.subTitle}get hasPasswordHistory(){return this.passwordHistory&&this.passwordHistory.length>0}get hasAttachments(){return this.attachments&&this.attachments.length>0}get hasOldAttachments(){if(this.hasAttachments)for(let e=0;e0}get passwordRevisionDisplayDate(){return this.type!==r.CipherType.Login||null==this.login||null==this.login.password||""===this.login.password?null:this.login.passwordRevisionDate}get isDeleted(){return null!=this.deletedDate}get linkedFieldOptions(){return this.item.linkedFieldOptions}linkedFieldValue(e){var t;const n=null===(t=this.linkedFieldOptions)||void 0===t?void 0:t.get(e);if(null==n)return null;this.item;return this.item[n.propertyKey]}linkedFieldI18nKey(e){var t;return null===(t=this.linkedFieldOptions.get(e))||void 0===t?void 0:t.i18nKey}}},86001:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionView=void 0;const i=n(65642);t.CollectionView=class{constructor(e){this.id=null,this.organizationId=null,this.name=null,this.externalId=null,this.readOnly=null,this.hidePasswords=null,e&&(this.id=e.id,this.organizationId=e.organizationId,this.externalId=e.externalId,e instanceof i.Collection&&(this.readOnly=e.readOnly,this.hidePasswords=e.hidePasswords))}}},63412:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventView=void 0;t.EventView=class{constructor(e){this.message=e.message,this.humanReadableMessage=e.humanReadableMessage,this.appIcon=e.appIcon,this.appName=e.appName,this.userId=e.userId,this.userName=e.userName,this.userEmail=e.userEmail,this.date=e.date,this.ip=e.ip,this.type=e.type,this.installationId=e.installationId}}},58545:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FieldView=void 0;t.FieldView=class{constructor(e){this.name=null,this.value=null,this.type=null,this.newField=!1,this.showValue=!1,this.showCount=!1,this.linkedId=null,e&&(this.type=e.type,this.linkedId=e.linkedId)}get maskedValue(){return null!=this.value?"••••••••":null}}},36914:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FolderView=void 0;t.FolderView=class{constructor(e){this.id=null,this.name=null,this.revisionDate=null,e&&(this.id=e.id,this.revisionDate=e.revisionDate)}}},48830:function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityView=void 0;const o=n(31909),a=n(60628),s=n(82769),l=n(63262);class c extends l.ItemView{constructor(){super(),this.title=null,this.middleName=null,this.address1=null,this.address2=null,this.address3=null,this.city=null,this.state=null,this.postalCode=null,this.country=null,this.company=null,this.email=null,this.phone=null,this.ssn=null,this.username=null,this.passportNumber=null,this.licenseNumber=null,this._firstName=null,this._lastName=null,this._subTitle=null}get firstName(){return this._firstName}set firstName(e){this._firstName=e,this._subTitle=null}get lastName(){return this._lastName}set lastName(e){this._lastName=e,this._subTitle=null}get subTitle(){return null!=this._subTitle||null==this.firstName&&null==this.lastName||(this._subTitle="",null!=this.firstName&&(this._subTitle=this.firstName),null!=this.lastName&&(""!==this._subTitle&&(this._subTitle+=" "),this._subTitle+=this.lastName)),this._subTitle}get fullName(){if(null!=this.title||null!=this.firstName||null!=this.middleName||null!=this.lastName){let e="";return null!=this.title&&(e+=this.title+" "),null!=this.firstName&&(e+=this.firstName+" "),null!=this.middleName&&(e+=this.middleName+" "),null!=this.lastName&&(e+=this.lastName),e.trim()}return null}get fullAddress(){let e=this.address1;return s.Utils.isNullOrWhitespace(this.address2)||(s.Utils.isNullOrWhitespace(e)||(e+=", "),e+=this.address2),s.Utils.isNullOrWhitespace(this.address3)||(s.Utils.isNullOrWhitespace(e)||(e+=", "),e+=this.address3),e}get fullAddressPart2(){if(null==this.city&&null==this.state&&null==this.postalCode)return null;const e=this.city||"-",t=this.state,n=this.postalCode||"-";let i=e;return s.Utils.isNullOrWhitespace(t)||(i+=", "+t),i+=", "+n,i}}i([a.linkedFieldOption(o.IdentityLinkedId.Title),r("design:type",String)],c.prototype,"title",void 0),i([a.linkedFieldOption(o.IdentityLinkedId.MiddleName),r("design:type",String)],c.prototype,"middleName",void 0),i([a.linkedFieldOption(o.IdentityLinkedId.Address1),r("design:type",String)],c.prototype,"address1",void 0),i([a.linkedFieldOption(o.IdentityLinkedId.Address2),r("design:type",String)],c.prototype,"address2",void 0),i([a.linkedFieldOption(o.IdentityLinkedId.Address3),r("design:type",String)],c.prototype,"address3",void 0),i([a.linkedFieldOption(o.IdentityLinkedId.City,"cityTown"),r("design:type",String)],c.prototype,"city",void 0),i([a.linkedFieldOption(o.IdentityLinkedId.State,"stateProvince"),r("design:type",String)],c.prototype,"state",void 0),i([a.linkedFieldOption(o.IdentityLinkedId.PostalCode,"zipPostalCode"),r("design:type",String)],c.prototype,"postalCode",void 0),i([a.linkedFieldOption(o.IdentityLinkedId.Country),r("design:type",String)],c.prototype,"country",void 0),i([a.linkedFieldOption(o.IdentityLinkedId.Company),r("design:type",String)],c.prototype,"company",void 0),i([a.linkedFieldOption(o.IdentityLinkedId.Email),r("design:type",String)],c.prototype,"email",void 0),i([a.linkedFieldOption(o.IdentityLinkedId.Phone),r("design:type",String)],c.prototype,"phone",void 0),i([a.linkedFieldOption(o.IdentityLinkedId.Ssn),r("design:type",String)],c.prototype,"ssn",void 0),i([a.linkedFieldOption(o.IdentityLinkedId.Username),r("design:type",String)],c.prototype,"username",void 0),i([a.linkedFieldOption(o.IdentityLinkedId.PassportNumber),r("design:type",String)],c.prototype,"passportNumber",void 0),i([a.linkedFieldOption(o.IdentityLinkedId.LicenseNumber),r("design:type",String)],c.prototype,"licenseNumber",void 0),i([a.linkedFieldOption(o.IdentityLinkedId.FirstName),r("design:type",String),r("design:paramtypes",[String])],c.prototype,"firstName",null),i([a.linkedFieldOption(o.IdentityLinkedId.LastName),r("design:type",String),r("design:paramtypes",[String])],c.prototype,"lastName",null),i([a.linkedFieldOption(o.IdentityLinkedId.FullName),r("design:type",String),r("design:paramtypes",[])],c.prototype,"fullName",null),t.IdentityView=c},63262:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ItemView=void 0;t.ItemView=class{}},16506:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoginUriView=void 0;const i=n(71703),r=n(82769),o=["https://","http://","ssh://","ftp://","sftp://","irc://","vnc://","rdp://","ms-rd:","chrome://","iosapp://","androidapp://"];t.LoginUriView=class{constructor(e){this.match=null,this._uri=null,this._domain=null,this._hostname=null,this._host=null,this._canLaunch=null,e&&(this.match=e.match)}get uri(){return this._uri}set uri(e){this._uri=e,this._domain=null,this._canLaunch=null}get domain(){return null==this._domain&&null!=this.uri&&(this._domain=r.Utils.getDomain(this.uri),""===this._domain&&(this._domain=null)),this._domain}get hostname(){return this.match===i.UriMatchType.RegularExpression?null:(null==this._hostname&&null!=this.uri&&(this._hostname=r.Utils.getHostname(this.uri),""===this._hostname&&(this._hostname=null)),this._hostname)}get host(){return this.match===i.UriMatchType.RegularExpression?null:(null==this._host&&null!=this.uri&&(this._host=r.Utils.getHost(this.uri),""===this._host&&(this._host=null)),this._host)}get hostnameOrUri(){return null!=this.hostname?this.hostname:this.uri}get hostOrUri(){return null!=this.host?this.host:this.uri}get isWebsite(){return null!=this.uri&&(0===this.uri.indexOf("http://")||0===this.uri.indexOf("https://")||this.uri.indexOf("://")<0&&r.Utils.tldEndingRegex.test(this.uri))}get canLaunch(){if(null!=this._canLaunch)return this._canLaunch;if(null!=this.uri&&this.match!==i.UriMatchType.RegularExpression){const e=this.launchUri;for(let t=0;t=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.LoginView=void 0;const o=n(31909),a=n(60628),s=n(82769),l=n(63262);class c extends l.ItemView{constructor(e){super(),this.username=null,this.password=null,this.passwordRevisionDate=null,this.totp=null,this.uris=null,this.autofillOnPageLoad=null,e&&(this.passwordRevisionDate=e.passwordRevisionDate,this.autofillOnPageLoad=e.autofillOnPageLoad)}get uri(){return this.hasUris?this.uris[0].uri:null}get maskedPassword(){return null!=this.password?"••••••••":null}get subTitle(){return this.username}get canLaunch(){return this.hasUris&&this.uris.some((e=>e.canLaunch))}get hasTotp(){return!s.Utils.isNullOrWhitespace(this.totp)}get launchUri(){if(this.hasUris){const e=this.uris.find((e=>e.canLaunch));if(null!=e)return e.launchUri}return null}get hasUris(){return null!=this.uris&&this.uris.length>0}}i([a.linkedFieldOption(o.LoginLinkedId.Username),r("design:type",String)],c.prototype,"username",void 0),i([a.linkedFieldOption(o.LoginLinkedId.Password),r("design:type",String)],c.prototype,"password",void 0),t.LoginView=c},40170:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordHistoryView=void 0;t.PasswordHistoryView=class{constructor(e){this.password=null,this.lastUsedDate=null,e&&(this.lastUsedDate=e.lastUsedDate)}}},99364:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecureNoteView=void 0;const i=n(63262);class r extends i.ItemView{constructor(e){super(),this.type=null,e&&(this.type=e.type)}get subTitle(){return null}}t.SecureNoteView=r},46984:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendAccessView=void 0;const i=n(22620),r=n(59884);t.SendAccessView=class{constructor(e){this.id=null,this.name=null,this.type=null,this.text=new r.SendTextView,this.file=new i.SendFileView,this.expirationDate=null,this.creatorIdentifier=null,e&&(this.id=e.id,this.type=e.type,this.expirationDate=e.expirationDate,this.creatorIdentifier=e.creatorIdentifier)}}},22620:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendFileView=void 0;t.SendFileView=class{constructor(e){this.id=null,this.size=null,this.sizeName=null,this.fileName=null,e&&(this.id=e.id,this.size=e.size,this.sizeName=e.sizeName)}get fileSize(){try{if(null!=this.size)return parseInt(this.size,null)}catch(e){}return 0}}},59884:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendTextView=void 0;t.SendTextView=class{constructor(e){this.text=null,e&&(this.hidden=e.hidden)}get maskedText(){return null!=this.text?"••••••••":null}}},1725:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendView=void 0;const i=n(82769),r=n(22620),o=n(59884);t.SendView=class{constructor(e){this.id=null,this.accessId=null,this.name=null,this.notes=null,this.type=null,this.text=new o.SendTextView,this.file=new r.SendFileView,this.maxAccessCount=null,this.accessCount=0,this.revisionDate=null,this.deletionDate=null,this.expirationDate=null,this.password=null,this.disabled=!1,this.hideEmail=!1,e&&(this.id=e.id,this.accessId=e.accessId,this.type=e.type,this.maxAccessCount=e.maxAccessCount,this.accessCount=e.accessCount,this.revisionDate=e.revisionDate,this.deletionDate=e.deletionDate,this.expirationDate=e.expirationDate,this.disabled=e.disabled,this.password=e.password,this.hideEmail=e.hideEmail)}get urlB64Key(){return i.Utils.fromBufferToUrlB64(this.key)}get maxAccessCountReached(){return null!=this.maxAccessCount&&this.accessCount>=this.maxAccessCount}get expired(){return null!=this.expirationDate&&this.expirationDate<=new Date}get pendingDelete(){return this.deletionDate<=new Date}}},56259:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SsoConfigView=void 0;const i=n(37084),r=n(41943);class o extends r.View{constructor(e){super(),null!=e&&(this.configType=e.configType,this.keyConnectorEnabled=e.keyConnectorEnabled,this.keyConnectorUrl=e.keyConnectorUrl,this.configType===i.SsoType.OpenIdConnect?this.openId={authority:e.authority,clientId:e.clientId,clientSecret:e.clientSecret,metadataAddress:e.metadataAddress,redirectBehavior:e.redirectBehavior,getClaimsFromUserInfoEndpoint:e.getClaimsFromUserInfoEndpoint,additionalScopes:e.additionalScopes,additionalUserIdClaimTypes:e.additionalUserIdClaimTypes,additionalEmailClaimTypes:e.additionalEmailClaimTypes,additionalNameClaimTypes:e.additionalNameClaimTypes,acrValues:e.acrValues,expectedReturnAcrValue:e.expectedReturnAcrValue}:this.configType===i.SsoType.Saml2&&(this.saml={spNameIdFormat:e.spNameIdFormat,spOutboundSigningAlgorithm:e.spOutboundSigningAlgorithm,spSigningBehavior:e.spSigningBehavior,spMinIncomingSigningAlgorithm:e.spMinIncomingSigningAlgorithm,spWantAssertionsSigned:e.spWantAssertionsSigned,spValidateCertificates:e.spValidateCertificates,idpEntityId:e.idpEntityId,idpBindingType:e.idpBindingType,idpSingleSignOnServiceUrl:e.idpSingleSignOnServiceUrl,idpSingleLogoutServiceUrl:e.idpSingleLogoutServiceUrl,idpX509PublicCert:e.idpX509PublicCert,idpOutboundSigningAlgorithm:e.idpOutboundSigningAlgorithm,idpAllowUnsolicitedAuthnResponse:e.idpAllowUnsolicitedAuthnResponse,idpWantAuthnRequestsSigned:e.idpWantAuthnRequestsSigned,idpAllowOutboundLogoutRequests:null==e.idpDisableOutboundLogoutRequests?null:!e.idpDisableOutboundLogoutRequests}))}}t.SsoConfigView=o},41943:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.View=void 0;t.View=class{}},48475:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ApiService=void 0;const r=n(92829),o=n(74598),a=n(56215),s=n(90070),l=n(27847),c=n(2779),d=n(82769),p=n(81047),u=n(92666),m=n(33146),h=n(15487),v=n(61700),f=n(15461),g=n(31238),y=n(11228),x=n(91266),S=n(50881),b=n(33018),w=n(88850),C=n(8823),I=n(70529),E=n(56659),P=n(7269),O=n(38326),k=n(93140),A=n(7865),T=n(57344),M=n(53661),B=n(12386),D=n(37595),R=n(68673),F=n(62560),U=n(71098),V=n(89072),N=n(55022),_=n(68749),j=n(38402),z=n(88290),H=n(64030),L=n(52196),K=n(59665),q=n(89001),G=n(98073),W=n(82842),$=n(62161),Y=n(67177),Q=n(61747),J=n(3882),Z=n(56247),X=n(69654),ee=n(22391),te=n(71892),ne=n(79230),ie=n(10273),re=n(67955),oe=n(1244),ae=n(33111),se=n(88540),le=n(50891),ce=n(40387),de=n(61329),pe=n(78086),ue=n(86457);t.ApiService=class{constructor(e,t,n,i,r,o=null){this.tokenService=e,this.platformUtilsService=t,this.environmentService=n,this.appIdService=i,this.logoutCallback=r,this.customUserAgent=o,this.isWebClient=!1,this.isDesktopClient=!1,this.device=t.getDevice(),this.deviceType=this.device.toString(),this.isWebClient=this.device===c.DeviceType.IEBrowser||this.device===c.DeviceType.ChromeBrowser||this.device===c.DeviceType.EdgeBrowser||this.device===c.DeviceType.FirefoxBrowser||this.device===c.DeviceType.OperaBrowser||this.device===c.DeviceType.SafariBrowser||this.device===c.DeviceType.UnknownBrowser||this.device===c.DeviceType.VivaldiBrowser,this.isDesktopClient=this.device===c.DeviceType.WindowsDesktop||this.device===c.DeviceType.MacOsDesktop||this.device===c.DeviceType.LinuxDesktop}postIdentityToken(e){return i(this,void 0,void 0,(function*(){const t=new Headers({"Content-Type":"application/x-www-form-urlencoded; charset=utf-8",Accept:"application/json","Device-Type":this.deviceType});null!=this.customUserAgent&&t.set("User-Agent",this.customUserAgent),e.alterIdentityTokenHeaders(t);const n=e instanceof p.ApiTokenRequest?e.toIdentityToken():e.toIdentityToken(this.platformUtilsService.getClientType()),i=yield this.fetch(new Request(this.environmentService.getIdentityUrl()+"/connect/token",{body:this.qsStringify(n),credentials:this.getCredentials(),cache:"no-store",headers:t,method:"POST"}));let r=null;if(this.isJsonResponse(i)&&(r=yield i.json()),null!=r){if(200===i.status)return new P.IdentityTokenResponse(r);if(400===i.status&&r.TwoFactorProviders2&&Object.keys(r.TwoFactorProviders2).length)return yield this.tokenService.clearTwoFactorToken(),new O.IdentityTwoFactorResponse(r);if(400===i.status&&r.HCaptcha_SiteKey&&Object.keys(r.HCaptcha_SiteKey).length)return new E.IdentityCaptchaResponse(r)}return Promise.reject(new b.ErrorResponse(r,i.status,!0))}))}refreshIdentityToken(){return i(this,void 0,void 0,(function*(){try{yield this.doAuthRefresh()}catch(e){return Promise.reject(null)}}))}getProfile(){return i(this,void 0,void 0,(function*(){const e=yield this.send("GET","/accounts/profile",null,!0,!0);return new K.ProfileResponse(e)}))}getUserSubscription(){return i(this,void 0,void 0,(function*(){const e=yield this.send("GET","/accounts/subscription",null,!0,!0);return new te.SubscriptionResponse(e)}))}getTaxInfo(){return i(this,void 0,void 0,(function*(){const e=yield this.send("GET","/accounts/tax",null,!0,!0);return new ie.TaxInfoResponse(e)}))}putProfile(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("PUT","/accounts/profile",e,!0,!0);return new K.ProfileResponse(t)}))}putTaxInfo(e){return this.send("PUT","/accounts/tax",e,!0,!1)}postPrelogin(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/accounts/prelogin",e,!1,!0,this.platformUtilsService.isDev()?this.environmentService.getIdentityUrl():this.environmentService.getApiUrl());return new L.PreloginResponse(t)}))}postEmailToken(e){return this.send("POST","/accounts/email-token",e,!0,!1)}postEmail(e){return this.send("POST","/accounts/email",e,!0,!1)}postPassword(e){return this.send("POST","/accounts/password",e,!0,!1)}setPassword(e){return this.send("POST","/accounts/set-password",e,!0,!1)}postSetKeyConnectorKey(e){return this.send("POST","/accounts/set-key-connector-key",e,!0,!1)}postSecurityStamp(e){return this.send("POST","/accounts/security-stamp",e,!0,!1)}deleteAccount(e){return this.send("DELETE","/accounts",e,!0,!1)}getAccountRevisionDate(){return i(this,void 0,void 0,(function*(){return yield this.send("GET","/accounts/revision-date",null,!0,!0)}))}postPasswordHint(e){return this.send("POST","/accounts/password-hint",e,!1,!1)}postRegister(e){return this.send("POST","/accounts/register",e,!1,!1,this.platformUtilsService.isDev()?this.environmentService.getIdentityUrl():this.environmentService.getApiUrl())}postPremium(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/accounts/premium",e,!0,!0);return new j.PaymentResponse(t)}))}postIapCheck(e){return i(this,void 0,void 0,(function*(){return this.send("POST","/accounts/iap-check",e,!0,!1)}))}postReinstatePremium(){return this.send("POST","/accounts/reinstate-premium",null,!0,!1)}postCancelPremium(){return this.send("POST","/accounts/cancel-premium",null,!0,!1)}postAccountStorage(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/accounts/storage",e,!0,!0);return new j.PaymentResponse(t)}))}postAccountPayment(e){return this.send("POST","/accounts/payment",e,!0,!1)}postAccountLicense(e){return this.send("POST","/accounts/license",e,!0,!1)}postAccountKeys(e){return this.send("POST","/accounts/keys",e,!0,!1)}postAccountKey(e){return this.send("POST","/accounts/key",e,!0,!1)}postAccountVerifyEmail(){return this.send("POST","/accounts/verify-email",null,!0,!1)}postAccountVerifyEmailToken(e){return this.send("POST","/accounts/verify-email-token",e,!1,!1)}postAccountVerifyPassword(e){return this.send("POST","/accounts/verify-password",e,!0,!1)}postAccountRecoverDelete(e){return this.send("POST","/accounts/delete-recover",e,!1,!1)}postAccountRecoverDeleteToken(e){return this.send("POST","/accounts/delete-recover-token",e,!1,!1)}postAccountKdf(e){return this.send("POST","/accounts/kdf",e,!0,!1)}deleteSsoUser(e){return i(this,void 0,void 0,(function*(){return this.send("DELETE","/accounts/sso/"+e,null,!0,!1)}))}getSsoUserIdentifier(){return i(this,void 0,void 0,(function*(){return this.send("GET","/accounts/sso/user-identifier",null,!0,!0)}))}postUserApiKey(e,t){return i(this,void 0,void 0,(function*(){const e=yield this.send("POST","/accounts/api-key",t,!0,!0);return new u.ApiKeyResponse(e)}))}postUserRotateApiKey(e,t){return i(this,void 0,void 0,(function*(){const e=yield this.send("POST","/accounts/rotate-api-key",t,!0,!0);return new u.ApiKeyResponse(e)}))}putUpdateTempPassword(e){return this.send("PUT","/accounts/update-temp-password",e,!0,!1)}postAccountRequestOTP(){return this.send("POST","/accounts/request-otp",null,!0,!1)}postAccountVerifyOTP(e){return this.send("POST","/accounts/verify-otp",e,!0,!1)}postConvertToKeyConnector(){return this.send("POST","/accounts/convert-to-key-connector",null,!0,!1)}getUserBillingHistory(){return i(this,void 0,void 0,(function*(){const e=yield this.send("GET","/accounts/billing/history",null,!0,!0);return new a.BillingHistoryResponse(e)}))}getUserBillingPayment(){return i(this,void 0,void 0,(function*(){const e=yield this.send("GET","/accounts/billing/payment-method",null,!0,!0);return new s.BillingPaymentResponse(e)}))}getFolder(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/folders/"+e,null,!0,!0);return new C.FolderResponse(t)}))}postFolder(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/folders",e,!0,!0);return new C.FolderResponse(t)}))}putFolder(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("PUT","/folders/"+e,t,!0,!0);return new C.FolderResponse(n)}))}deleteFolder(e){return this.send("DELETE","/folders/"+e,null,!0,!1)}getSend(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/sends/"+e,null,!0,!0);return new ee.SendResponse(t)}))}postSendAccess(e,t,n){return i(this,void 0,void 0,(function*(){const i=yield this.send("POST","/sends/access/"+e,t,!1,!0,n,(t=>{t.set("Send-Id",e)}));return new J.SendAccessResponse(i)}))}getSendFileDownloadData(e,t,n){return i(this,void 0,void 0,(function*(){const i=yield this.send("POST","/sends/"+e.id+"/access/file/"+e.file.id,t,!1,!0,n,(t=>{t.set("Send-Id",e.id)}));return new Z.SendFileDownloadDataResponse(i)}))}getSends(){return i(this,void 0,void 0,(function*(){const e=yield this.send("GET","/sends",null,!0,!0);return new A.ListResponse(e,ee.SendResponse)}))}postSend(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/sends",e,!0,!0);return new ee.SendResponse(t)}))}postFileTypeSend(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/sends/file/v2",e,!0,!0);return new X.SendFileUploadDataResponse(t)}))}renewSendFileUploadUrl(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("GET","/sends/"+e+"/file/"+t,null,!0,!0);return new X.SendFileUploadDataResponse(n)}))}postSendFile(e,t,n){return this.send("POST","/sends/"+e+"/file/"+t,n,!0,!1)}postSendFileLegacy(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/sends/file",e,!0,!0);return new ee.SendResponse(t)}))}putSend(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("PUT","/sends/"+e,t,!0,!0);return new ee.SendResponse(n)}))}putSendRemovePassword(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("PUT","/sends/"+e+"/remove-password",null,!0,!0);return new ee.SendResponse(t)}))}deleteSend(e){return this.send("DELETE","/sends/"+e,null,!0,!1)}getCipher(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/ciphers/"+e,null,!0,!0);return new g.CipherResponse(t)}))}getCipherAdmin(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/ciphers/"+e+"/admin",null,!0,!0);return new g.CipherResponse(t)}))}getCiphersOrganization(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/ciphers/organization-details?organizationId="+e,null,!0,!0);return new A.ListResponse(t,g.CipherResponse)}))}postCipher(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/ciphers",e,!0,!0);return new g.CipherResponse(t)}))}postCipherCreate(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/ciphers/create",e,!0,!0);return new g.CipherResponse(t)}))}postCipherAdmin(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/ciphers/admin",e,!0,!0);return new g.CipherResponse(t)}))}putCipher(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("PUT","/ciphers/"+e,t,!0,!0);return new g.CipherResponse(n)}))}putCipherAdmin(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("PUT","/ciphers/"+e+"/admin",t,!0,!0);return new g.CipherResponse(n)}))}deleteCipher(e){return this.send("DELETE","/ciphers/"+e,null,!0,!1)}deleteCipherAdmin(e){return this.send("DELETE","/ciphers/"+e+"/admin",null,!0,!1)}deleteManyCiphers(e){return this.send("DELETE","/ciphers",e,!0,!1)}deleteManyCiphersAdmin(e){return this.send("DELETE","/ciphers/admin",e,!0,!1)}putMoveCiphers(e){return this.send("PUT","/ciphers/move",e,!0,!1)}putShareCipher(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("PUT","/ciphers/"+e+"/share",t,!0,!0);return new g.CipherResponse(n)}))}putShareCiphers(e){return this.send("PUT","/ciphers/share",e,!0,!1)}putCipherCollections(e,t){return this.send("PUT","/ciphers/"+e+"/collections",t,!0,!1)}putCipherCollectionsAdmin(e,t){return this.send("PUT","/ciphers/"+e+"/collections-admin",t,!0,!1)}postPurgeCiphers(e,t=null){let n="/ciphers/purge";return null!=t&&(n+="?organizationId="+t),this.send("POST",n,e,!0,!1)}postImportCiphers(e){return this.send("POST","/ciphers/import",e,!0,!1)}postImportOrganizationCiphers(e,t){return this.send("POST","/ciphers/import-organization?organizationId="+e,t,!0,!1)}putDeleteCipher(e){return this.send("PUT","/ciphers/"+e+"/delete",null,!0,!1)}putDeleteCipherAdmin(e){return this.send("PUT","/ciphers/"+e+"/delete-admin",null,!0,!1)}putDeleteManyCiphers(e){return this.send("PUT","/ciphers/delete",e,!0,!1)}putDeleteManyCiphersAdmin(e){return this.send("PUT","/ciphers/delete-admin",e,!0,!1)}putRestoreCipher(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("PUT","/ciphers/"+e+"/restore",null,!0,!0);return new g.CipherResponse(t)}))}putRestoreCipherAdmin(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("PUT","/ciphers/"+e+"/restore-admin",null,!0,!0);return new g.CipherResponse(t)}))}putRestoreManyCiphers(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("PUT","/ciphers/restore",e,!0,!0);return new A.ListResponse(t,g.CipherResponse)}))}getAttachmentData(e,t,n){return i(this,void 0,void 0,(function*(){const i=(null!=n?"/emergency-access/"+n+"/":"/ciphers/")+e+"/attachment/"+t,r=yield this.send("GET",i,null,!0,!0);return new m.AttachmentResponse(r)}))}postCipherAttachment(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/ciphers/"+e+"/attachment/v2",t,!0,!0);return new h.AttachmentUploadDataResponse(n)}))}postCipherAttachmentLegacy(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/ciphers/"+e+"/attachment",t,!0,!0);return new g.CipherResponse(n)}))}postCipherAttachmentAdminLegacy(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/ciphers/"+e+"/attachment-admin",t,!0,!0);return new g.CipherResponse(n)}))}deleteCipherAttachment(e,t){return this.send("DELETE","/ciphers/"+e+"/attachment/"+t,null,!0,!1)}deleteCipherAttachmentAdmin(e,t){return this.send("DELETE","/ciphers/"+e+"/attachment/"+t+"/admin",null,!0,!1)}postShareCipherAttachment(e,t,n,i){return this.send("POST","/ciphers/"+e+"/attachment/"+t+"/share?organizationId="+i,n,!0,!1)}renewAttachmentUploadUrl(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("GET","/ciphers/"+e+"/attachment/"+t+"/renew",null,!0,!0);return new h.AttachmentUploadDataResponse(n)}))}postAttachmentFile(e,t,n){return this.send("POST","/ciphers/"+e+"/attachment/"+t,n,!0,!1)}getCollectionDetails(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("GET","/organizations/"+e+"/collections/"+t+"/details",null,!0,!0);return new y.CollectionGroupDetailsResponse(n)}))}getUserCollections(){return i(this,void 0,void 0,(function*(){const e=yield this.send("GET","/collections",null,!0,!0);return new A.ListResponse(e,y.CollectionResponse)}))}getCollections(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/organizations/"+e+"/collections",null,!0,!0);return new A.ListResponse(t,y.CollectionResponse)}))}getCollectionUsers(e,t){return i(this,void 0,void 0,(function*(){return(yield this.send("GET","/organizations/"+e+"/collections/"+t+"/users",null,!0,!0)).map((e=>new Q.SelectionReadOnlyResponse(e)))}))}postCollection(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/organizations/"+e+"/collections",t,!0,!0);return new y.CollectionResponse(n)}))}putCollection(e,t,n){return i(this,void 0,void 0,(function*(){const i=yield this.send("PUT","/organizations/"+e+"/collections/"+t,n,!0,!0);return new y.CollectionResponse(i)}))}putCollectionUsers(e,t,n){return i(this,void 0,void 0,(function*(){yield this.send("PUT","/organizations/"+e+"/collections/"+t+"/users",n,!0,!1)}))}deleteCollection(e,t){return this.send("DELETE","/organizations/"+e+"/collections/"+t,null,!0,!1)}deleteCollectionUser(e,t,n){return this.send("DELETE","/organizations/"+e+"/collections/"+t+"/user/"+n,null,!0,!1)}getGroupDetails(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("GET","/organizations/"+e+"/groups/"+t+"/details",null,!0,!0);return new I.GroupDetailsResponse(n)}))}getGroups(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/organizations/"+e+"/groups",null,!0,!0);return new A.ListResponse(t,I.GroupResponse)}))}getGroupUsers(e,t){return i(this,void 0,void 0,(function*(){return yield this.send("GET","/organizations/"+e+"/groups/"+t+"/users",null,!0,!0)}))}postGroup(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/organizations/"+e+"/groups",t,!0,!0);return new I.GroupResponse(n)}))}putGroup(e,t,n){return i(this,void 0,void 0,(function*(){const i=yield this.send("PUT","/organizations/"+e+"/groups/"+t,n,!0,!0);return new I.GroupResponse(i)}))}putGroupUsers(e,t,n){return i(this,void 0,void 0,(function*(){yield this.send("PUT","/organizations/"+e+"/groups/"+t+"/users",n,!0,!1)}))}deleteGroup(e,t){return this.send("DELETE","/organizations/"+e+"/groups/"+t,null,!0,!1)}deleteGroupUser(e,t,n){return this.send("DELETE","/organizations/"+e+"/groups/"+t+"/user/"+n,null,!0,!1)}getPolicy(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("GET","/organizations/"+e+"/policies/"+t,null,!0,!0);return new H.PolicyResponse(n)}))}getPolicies(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/organizations/"+e+"/policies",null,!0,!0);return new A.ListResponse(t,H.PolicyResponse)}))}getPoliciesByToken(e,t,n,r){return i(this,void 0,void 0,(function*(){const i=yield this.send("GET","/organizations/"+e+"/policies/token?token="+encodeURIComponent(t)+"&email="+encodeURIComponent(n)+"&organizationUserId="+r,null,!1,!0);return new A.ListResponse(i,H.PolicyResponse)}))}getPoliciesByInvitedUser(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("GET","/organizations/"+e+"/policies/invited-user?userId="+t,null,!1,!0);return new A.ListResponse(n,H.PolicyResponse)}))}putPolicy(e,t,n){return i(this,void 0,void 0,(function*(){const i=yield this.send("PUT","/organizations/"+e+"/policies/"+t,n,!0,!0);return new H.PolicyResponse(i)}))}getOrganizationUser(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("GET","/organizations/"+e+"/users/"+t,null,!0,!0);return new _.OrganizationUserDetailsResponse(n)}))}getOrganizationUserGroups(e,t){return i(this,void 0,void 0,(function*(){return yield this.send("GET","/organizations/"+e+"/users/"+t+"/groups",null,!0,!0)}))}getOrganizationUsers(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/organizations/"+e+"/users",null,!0,!0);return new A.ListResponse(t,_.OrganizationUserUserDetailsResponse)}))}getOrganizationUserResetPasswordDetails(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("GET","/organizations/"+e+"/users/"+t+"/reset-password-details",null,!0,!0);return new _.OrganizationUserResetPasswordDetailsReponse(n)}))}getOrganizationAutoEnrollStatus(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/organizations/"+e+"/auto-enroll-status",null,!0,!0);return new B.OrganizationAutoEnrollStatusResponse(t)}))}postOrganizationUserInvite(e,t){return this.send("POST","/organizations/"+e+"/users/invite",t,!0,!1)}postOrganizationUserReinvite(e,t){return this.send("POST","/organizations/"+e+"/users/"+t+"/reinvite",null,!0,!1)}postManyOrganizationUserReinvite(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/organizations/"+e+"/users/reinvite",t,!0,!0);return new A.ListResponse(n,N.OrganizationUserBulkResponse)}))}postOrganizationUserAccept(e,t,n){return this.send("POST","/organizations/"+e+"/users/"+t+"/accept",n,!0,!1)}postOrganizationUserConfirm(e,t,n){return this.send("POST","/organizations/"+e+"/users/"+t+"/confirm",n,!0,!1)}postOrganizationUsersPublicKey(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/organizations/"+e+"/users/public-keys",t,!0,!0);return new A.ListResponse(n,V.OrganizationUserBulkPublicKeyResponse)}))}postOrganizationUserBulkConfirm(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/organizations/"+e+"/users/confirm",t,!0,!0);return new A.ListResponse(n,N.OrganizationUserBulkResponse)}))}putOrganizationUser(e,t,n){return this.send("PUT","/organizations/"+e+"/users/"+t,n,!0,!1)}putOrganizationUserGroups(e,t,n){return this.send("PUT","/organizations/"+e+"/users/"+t+"/groups",n,!0,!1)}putOrganizationUserResetPasswordEnrollment(e,t,n){return this.send("PUT","/organizations/"+e+"/users/"+t+"/reset-password-enrollment",n,!0,!1)}putOrganizationUserResetPassword(e,t,n){return this.send("PUT","/organizations/"+e+"/users/"+t+"/reset-password",n,!0,!1)}deleteOrganizationUser(e,t){return this.send("DELETE","/organizations/"+e+"/users/"+t,null,!0,!1)}deleteManyOrganizationUsers(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("DELETE","/organizations/"+e+"/users",t,!0,!0);return new A.ListResponse(n,N.OrganizationUserBulkResponse)}))}getPlans(){return i(this,void 0,void 0,(function*(){const e=yield this.send("GET","/plans/",null,!0,!0);return new A.ListResponse(e,z.PlanResponse)}))}postImportDirectory(e,t){return i(this,void 0,void 0,(function*(){return this.send("POST","/organizations/"+e+"/import",t,!0,!1)}))}postPublicImportDirectory(e){return i(this,void 0,void 0,(function*(){return this.send("POST","/public/organization/import",e,!0,!1)}))}getTaxRates(){return i(this,void 0,void 0,(function*(){const e=yield this.send("GET","/plans/sales-tax-rates/",null,!0,!0);return new A.ListResponse(e,re.TaxRateResponse)}))}getSettingsDomains(){return i(this,void 0,void 0,(function*(){const e=yield this.send("GET","/settings/domains",null,!0,!0);return new x.DomainsResponse(e)}))}putSettingsDomains(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("PUT","/settings/domains",e,!0,!0);return new x.DomainsResponse(t)}))}getSync(){return i(this,void 0,void 0,(function*(){const e=this.isDesktopClient||this.isWebClient?"/sync?excludeDomains=true":"/sync",t=yield this.send("GET",e,null,!0,!0);return new ne.SyncResponse(t)}))}getTwoFactorProviders(){return i(this,void 0,void 0,(function*(){const e=yield this.send("GET","/two-factor",null,!0,!0);return new A.ListResponse(e,le.TwoFactorProviderResponse)}))}getTwoFactorOrganizationProviders(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/organizations/"+e+"/two-factor",null,!0,!0);return new A.ListResponse(t,le.TwoFactorProviderResponse)}))}getTwoFactorAuthenticator(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/two-factor/get-authenticator",e,!0,!0);return new oe.TwoFactorAuthenticatorResponse(t)}))}getTwoFactorEmail(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/two-factor/get-email",e,!0,!0);return new se.TwoFactorEmailResponse(t)}))}getTwoFactorDuo(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/two-factor/get-duo",e,!0,!0);return new ae.TwoFactorDuoResponse(t)}))}getTwoFactorOrganizationDuo(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/organizations/"+e+"/two-factor/get-duo",t,!0,!0);return new ae.TwoFactorDuoResponse(n)}))}getTwoFactorYubiKey(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/two-factor/get-yubikey",e,!0,!0);return new pe.TwoFactorYubiKeyResponse(t)}))}getTwoFactorWebAuthn(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/two-factor/get-webauthn",e,!0,!0);return new de.TwoFactorWebAuthnResponse(t)}))}getTwoFactorWebAuthnChallenge(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/two-factor/get-webauthn-challenge",e,!0,!0);return new de.ChallengeResponse(t)}))}getTwoFactorRecover(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/two-factor/get-recover",e,!0,!0);return new ce.TwoFactorRecoverResponse(t)}))}putTwoFactorAuthenticator(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("PUT","/two-factor/authenticator",e,!0,!0);return new oe.TwoFactorAuthenticatorResponse(t)}))}putTwoFactorEmail(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("PUT","/two-factor/email",e,!0,!0);return new se.TwoFactorEmailResponse(t)}))}putTwoFactorDuo(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("PUT","/two-factor/duo",e,!0,!0);return new ae.TwoFactorDuoResponse(t)}))}putTwoFactorOrganizationDuo(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("PUT","/organizations/"+e+"/two-factor/duo",t,!0,!0);return new ae.TwoFactorDuoResponse(n)}))}putTwoFactorYubiKey(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("PUT","/two-factor/yubikey",e,!0,!0);return new pe.TwoFactorYubiKeyResponse(t)}))}putTwoFactorWebAuthn(e){return i(this,void 0,void 0,(function*(){const t=e.deviceResponse.response,n=Object.assign({},e);n.deviceResponse={id:e.deviceResponse.id,rawId:btoa(e.deviceResponse.id),type:e.deviceResponse.type,extensions:e.deviceResponse.getClientExtensionResults(),response:{AttestationObject:d.Utils.fromBufferToB64(t.attestationObject),clientDataJson:d.Utils.fromBufferToB64(t.clientDataJSON)}};const i=yield this.send("PUT","/two-factor/webauthn",n,!0,!0);return new de.TwoFactorWebAuthnResponse(i)}))}deleteTwoFactorWebAuthn(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("DELETE","/two-factor/webauthn",e,!0,!0);return new de.TwoFactorWebAuthnResponse(t)}))}putTwoFactorDisable(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("PUT","/two-factor/disable",e,!0,!0);return new le.TwoFactorProviderResponse(t)}))}putTwoFactorOrganizationDisable(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("PUT","/organizations/"+e+"/two-factor/disable",t,!0,!0);return new le.TwoFactorProviderResponse(n)}))}postTwoFactorRecover(e){return this.send("POST","/two-factor/recover",e,!1,!1)}postTwoFactorEmailSetup(e){return this.send("POST","/two-factor/send-email",e,!0,!1)}postTwoFactorEmail(e){return this.send("POST","/two-factor/send-email-login",e,!1,!1)}getEmergencyAccessTrusted(){return i(this,void 0,void 0,(function*(){const e=yield this.send("GET","/emergency-access/trusted",null,!0,!0);return new A.ListResponse(e,S.EmergencyAccessGranteeDetailsResponse)}))}getEmergencyAccessGranted(){return i(this,void 0,void 0,(function*(){const e=yield this.send("GET","/emergency-access/granted",null,!0,!0);return new A.ListResponse(e,S.EmergencyAccessGrantorDetailsResponse)}))}getEmergencyAccess(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/emergency-access/"+e,null,!0,!0);return new S.EmergencyAccessGranteeDetailsResponse(t)}))}getEmergencyGrantorPolicies(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/emergency-access/"+e+"/policies",null,!0,!0);return new A.ListResponse(t,H.PolicyResponse)}))}putEmergencyAccess(e,t){return this.send("PUT","/emergency-access/"+e,t,!0,!1)}deleteEmergencyAccess(e){return this.send("DELETE","/emergency-access/"+e,null,!0,!1)}postEmergencyAccessInvite(e){return this.send("POST","/emergency-access/invite",e,!0,!1)}postEmergencyAccessReinvite(e){return this.send("POST","/emergency-access/"+e+"/reinvite",null,!0,!1)}postEmergencyAccessAccept(e,t){return this.send("POST","/emergency-access/"+e+"/accept",t,!0,!1)}postEmergencyAccessConfirm(e,t){return this.send("POST","/emergency-access/"+e+"/confirm",t,!0,!1)}postEmergencyAccessInitiate(e){return this.send("POST","/emergency-access/"+e+"/initiate",null,!0,!1)}postEmergencyAccessApprove(e){return this.send("POST","/emergency-access/"+e+"/approve",null,!0,!1)}postEmergencyAccessReject(e){return this.send("POST","/emergency-access/"+e+"/reject",null,!0,!1)}postEmergencyAccessTakeover(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/emergency-access/"+e+"/takeover",null,!0,!0);return new S.EmergencyAccessTakeoverResponse(t)}))}postEmergencyAccessPassword(e,t){return i(this,void 0,void 0,(function*(){yield this.send("POST","/emergency-access/"+e+"/password",t,!0,!0)}))}postEmergencyAccessView(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/emergency-access/"+e+"/view",null,!0,!0);return new S.EmergencyAccessViewResponse(t)}))}getOrganization(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/organizations/"+e,null,!0,!0);return new R.OrganizationResponse(t)}))}getOrganizationBilling(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/organizations/"+e+"/billing",null,!0,!0);return new v.BillingResponse(t)}))}getOrganizationSubscription(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/organizations/"+e+"/subscription",null,!0,!0);return new U.OrganizationSubscriptionResponse(t)}))}getCloudCommunicationsEnabled(){return i(this,void 0,void 0,(function*(){return yield this.send("GET","/organizations/connections/enabled",null,!0,!0)}))}getOrganizationConnection(e,t,n){return i(this,void 0,void 0,(function*(){const i=yield this.send("GET",`/organizations/connections/${e}/${t}`,null,!0,!0);return new l.OrganizationConnectionResponse(i,n)}))}createOrganizationConnection(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/organizations/connections/",e,!0,!0);return new l.OrganizationConnectionResponse(n,t)}))}updateOrganizationConnection(e,t,n){return i(this,void 0,void 0,(function*(){const i=yield this.send("PUT","/organizations/connections/"+n,e,!0,!0);return new l.OrganizationConnectionResponse(i,t)}))}deleteOrganizationConnection(e){return i(this,void 0,void 0,(function*(){return this.send("DELETE","/organizations/connections/"+e,null,!0,!1)}))}getOrganizationLicense(e,t){return i(this,void 0,void 0,(function*(){return this.send("GET","/organizations/"+e+"/license?installationId="+t,null,!0,!0)}))}getOrganizationTaxInfo(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/organizations/"+e+"/tax",null,!0,!0);return new ie.TaxInfoResponse(t)}))}getOrganizationSso(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/organizations/"+e+"/sso",null,!0,!0);return new T.OrganizationSsoResponse(t)}))}postOrganization(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/organizations",e,!0,!0);return new R.OrganizationResponse(t)}))}putOrganization(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("PUT","/organizations/"+e,t,!0,!0);return new R.OrganizationResponse(n)}))}putOrganizationTaxInfo(e,t){return i(this,void 0,void 0,(function*(){return this.send("PUT","/organizations/"+e+"/tax",t,!0,!1)}))}postLeaveOrganization(e){return this.send("POST","/organizations/"+e+"/leave",null,!0,!1)}postOrganizationLicense(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/organizations/license",e,!0,!0);return new R.OrganizationResponse(t)}))}postOrganizationLicenseUpdate(e,t){return i(this,void 0,void 0,(function*(){return this.send("POST","/organizations/"+e+"/license",t,!0,!1)}))}postOrganizationApiKey(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/organizations/"+e+"/api-key",t,!0,!0);return new u.ApiKeyResponse(n)}))}getOrganizationApiKeyInformation(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/organizations/"+e+"/api-key-information",null,!0,!0);return new A.ListResponse(t,M.OrganizationApiKeyInformationResponse)}))}postOrganizationRotateApiKey(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/organizations/"+e+"/rotate-api-key",t,!0,!0);return new u.ApiKeyResponse(n)}))}postOrganizationSso(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/organizations/"+e+"/sso",t,!0,!0);return new T.OrganizationSsoResponse(n)}))}postOrganizationUpgrade(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/organizations/"+e+"/upgrade",t,!0,!0);return new j.PaymentResponse(n)}))}postOrganizationUpdateSubscription(e,t){return i(this,void 0,void 0,(function*(){return this.send("POST","/organizations/"+e+"/subscription",t,!0,!1)}))}postOrganizationSeat(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/organizations/"+e+"/seat",t,!0,!0);return new j.PaymentResponse(n)}))}postOrganizationStorage(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/organizations/"+e+"/storage",t,!0,!0);return new j.PaymentResponse(n)}))}postOrganizationPayment(e,t){return this.send("POST","/organizations/"+e+"/payment",t,!0,!1)}postOrganizationVerifyBank(e,t){return this.send("POST","/organizations/"+e+"/verify-bank",t,!0,!1)}postOrganizationCancel(e){return this.send("POST","/organizations/"+e+"/cancel",null,!0,!1)}postOrganizationReinstate(e){return this.send("POST","/organizations/"+e+"/reinstate",null,!0,!1)}deleteOrganization(e,t){return this.send("DELETE","/organizations/"+e,t,!0,!1)}getOrganizationKeys(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/organizations/"+e+"/keys",null,!0,!0);return new D.OrganizationKeysResponse(t)}))}postOrganizationKeys(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/organizations/"+e+"/keys",t,!0,!0);return new D.OrganizationKeysResponse(n)}))}postProviderSetup(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/providers/"+e+"/setup",t,!0,!0);return new G.ProviderResponse(n)}))}getProvider(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/providers/"+e,null,!0,!0);return new G.ProviderResponse(t)}))}putProvider(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("PUT","/providers/"+e,t,!0,!0);return new G.ProviderResponse(n)}))}getProviderUsers(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/providers/"+e+"/users",null,!0,!0);return new A.ListResponse(t,Y.ProviderUserUserDetailsResponse)}))}getProviderUser(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("GET","/providers/"+e+"/users/"+t,null,!0,!0);return new Y.ProviderUserResponse(n)}))}postProviderUserInvite(e,t){return this.send("POST","/providers/"+e+"/users/invite",t,!0,!1)}postProviderUserReinvite(e,t){return this.send("POST","/providers/"+e+"/users/"+t+"/reinvite",null,!0,!1)}postManyProviderUserReinvite(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/providers/"+e+"/users/reinvite",t,!0,!0);return new A.ListResponse(n,$.ProviderUserBulkResponse)}))}postProviderUserBulkConfirm(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/providers/"+e+"/users/confirm",t,!0,!0);return new A.ListResponse(n,$.ProviderUserBulkResponse)}))}deleteManyProviderUsers(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("DELETE","/providers/"+e+"/users",t,!0,!0);return new A.ListResponse(n,$.ProviderUserBulkResponse)}))}postProviderUserAccept(e,t,n){return this.send("POST","/providers/"+e+"/users/"+t+"/accept",n,!0,!1)}postProviderUserConfirm(e,t,n){return this.send("POST","/providers/"+e+"/users/"+t+"/confirm",n,!0,!1)}postProviderUsersPublicKey(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/providers/"+e+"/users/public-keys",t,!0,!0);return new A.ListResponse(n,W.ProviderUserBulkPublicKeyResponse)}))}putProviderUser(e,t,n){return this.send("PUT","/providers/"+e+"/users/"+t,n,!0,!1)}deleteProviderUser(e,t){return this.send("DELETE","/providers/"+e+"/users/"+t,null,!0,!1)}getProviderClients(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/providers/"+e+"/organizations",null,!0,!0);return new A.ListResponse(t,q.ProviderOrganizationOrganizationDetailsResponse)}))}postProviderAddOrganization(e,t){return this.send("POST","/providers/"+e+"/organizations/add",t,!0,!1)}postProviderCreateOrganization(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/providers/"+e+"/organizations",t,!0,!0);return new q.ProviderOrganizationResponse(n)}))}deleteProviderOrganization(e,t){return this.send("DELETE","/providers/"+e+"/organizations/"+t,null,!0,!1)}getEvents(e,t,n){return i(this,void 0,void 0,(function*(){const i=yield this.send("GET",this.addEventParameters("/events",e,t,n),null,!0,!0);return new A.ListResponse(i,w.EventResponse)}))}getEventsCipher(e,t,n,r){return i(this,void 0,void 0,(function*(){const i=yield this.send("GET",this.addEventParameters("/ciphers/"+e+"/events",t,n,r),null,!0,!0);return new A.ListResponse(i,w.EventResponse)}))}getEventsOrganization(e,t,n,r){return i(this,void 0,void 0,(function*(){const i=yield this.send("GET",this.addEventParameters("/organizations/"+e+"/events",t,n,r),null,!0,!0);return new A.ListResponse(i,w.EventResponse)}))}getEventsOrganizationUser(e,t,n,r,o){return i(this,void 0,void 0,(function*(){const i=yield this.send("GET",this.addEventParameters("/organizations/"+e+"/users/"+t+"/events",n,r,o),null,!0,!0);return new A.ListResponse(i,w.EventResponse)}))}getEventsProvider(e,t,n,r){return i(this,void 0,void 0,(function*(){const i=yield this.send("GET",this.addEventParameters("/providers/"+e+"/events",t,n,r),null,!0,!0);return new A.ListResponse(i,w.EventResponse)}))}getEventsProviderUser(e,t,n,r,o){return i(this,void 0,void 0,(function*(){const i=yield this.send("GET",this.addEventParameters("/providers/"+e+"/users/"+t+"/events",n,r,o),null,!0,!0);return new A.ListResponse(i,w.EventResponse)}))}postEventsCollect(e){return i(this,void 0,void 0,(function*(){const t=yield this.getActiveBearerToken(),n=new Headers({"Device-Type":this.deviceType,Authorization:"Bearer "+t,"Content-Type":"application/json; charset=utf-8"});null!=this.customUserAgent&&n.set("User-Agent",this.customUserAgent);if(200!==(yield this.fetch(new Request(this.environmentService.getEventsUrl()+"/collect",{cache:"no-store",credentials:this.getCredentials(),method:"POST",body:JSON.stringify(e),headers:n}))).status)return Promise.reject("Event post failed.")}))}getUserPublicKey(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/users/"+e+"/public-key",null,!0,!0);return new ue.UserKeyResponse(t)}))}getHibpBreach(e){return i(this,void 0,void 0,(function*(){return(yield this.send("GET","/hibp/breach?username="+e,null,!0,!0)).map((e=>new f.BreachAccountResponse(e)))}))}postBitPayInvoice(e){return i(this,void 0,void 0,(function*(){return yield this.send("POST","/bitpay-invoice",e,!0,!0)}))}postSetupPayment(){return i(this,void 0,void 0,(function*(){return yield this.send("POST","/setup-payment",null,!0,!0)}))}getUserKeyFromKeyConnector(e){return i(this,void 0,void 0,(function*(){const t=yield this.getActiveBearerToken(),n=yield this.fetch(new Request(e+"/user-keys",{cache:"no-store",method:"GET",headers:new Headers({Accept:"application/json",Authorization:"Bearer "+t})}));if(200!==n.status){const e=yield this.handleError(n,!1,!0);return Promise.reject(e)}return new k.KeyConnectorUserKeyResponse(yield n.json())}))}postUserKeyToKeyConnector(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getActiveBearerToken(),i=yield this.fetch(new Request(e+"/user-keys",{cache:"no-store",method:"POST",headers:new Headers({Accept:"application/json",Authorization:"Bearer "+n,"Content-Type":"application/json; charset=utf-8"}),body:JSON.stringify(t)}));if(200!==i.status){const e=yield this.handleError(i,!1,!0);return Promise.reject(e)}}))}getKeyConnectorAlive(e){return i(this,void 0,void 0,(function*(){const t=yield this.fetch(new Request(e+"/alive",{cache:"no-store",method:"GET",headers:new Headers({Accept:"application/json","Content-Type":"application/json; charset=utf-8"})}));if(200!==t.status){const e=yield this.handleError(t,!1,!0);return Promise.reject(e)}}))}getActiveBearerToken(){return i(this,void 0,void 0,(function*(){let e=yield this.tokenService.getToken();return(yield this.tokenService.tokenNeedsRefresh())&&(yield this.doAuthRefresh(),e=yield this.tokenService.getToken()),e}))}fetch(e){return i(this,void 0,void 0,(function*(){return"GET"===e.method&&(e.headers.set("Cache-Control","no-store"),e.headers.set("Pragma","no-cache")),e.headers.set("Bitwarden-Client-Name",this.platformUtilsService.getClientType()),e.headers.set("Bitwarden-Client-Version",yield this.platformUtilsService.getApplicationVersion()),this.nativeFetch(e)}))}nativeFetch(e){return fetch(e)}preValidateSso(e){return i(this,void 0,void 0,(function*(){if(null==e||""===e)throw new Error("Organization Identifier was not provided.");const t=new Headers({Accept:"application/json","Device-Type":this.deviceType});null!=this.customUserAgent&&t.set("User-Agent",this.customUserAgent);const n=`/account/prevalidate?domainHint=${encodeURIComponent(e)}`,i=yield this.fetch(new Request(this.environmentService.getIdentityUrl()+n,{cache:"no-store",credentials:this.getCredentials(),headers:t,method:"GET"}));if(200===i.status)return!0;{const e=yield this.handleError(i,!1,!0);return Promise.reject(e)}}))}postCreateSponsorship(e,t){return i(this,void 0,void 0,(function*(){return yield this.send("POST","/organization/sponsorship/"+(this.platformUtilsService.isSelfHost()?"self-hosted/":"")+e+"/families-for-enterprise",t,!0,!1)}))}getSponsorshipSyncStatus(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/organization/sponsorship/"+e+"/sync-status",null,!0,!0);return new F.OrganizationSponsorshipSyncStatusResponse(t)}))}deleteRevokeSponsorship(e){return i(this,void 0,void 0,(function*(){return yield this.send("DELETE","/organization/sponsorship/"+(this.platformUtilsService.isSelfHost()?"self-hosted/":"")+e,null,!0,!1)}))}deleteRemoveSponsorship(e){return i(this,void 0,void 0,(function*(){return yield this.send("DELETE","/organization/sponsorship/sponsored/"+e,null,!0,!1)}))}postPreValidateSponsorshipToken(e){return i(this,void 0,void 0,(function*(){return yield this.send("POST","/organization/sponsorship/validate-token?sponsorshipToken="+encodeURIComponent(e),null,!0,!0)}))}postRedeemSponsorship(e,t){return i(this,void 0,void 0,(function*(){return yield this.send("POST","/organization/sponsorship/redeem?sponsorshipToken="+encodeURIComponent(e),t,!0,!1)}))}postResendSponsorshipOffer(e){return i(this,void 0,void 0,(function*(){return yield this.send("POST","/organization/sponsorship/"+e+"/families-for-enterprise/resend",null,!0,!1)}))}doAuthRefresh(){return i(this,void 0,void 0,(function*(){const e=yield this.tokenService.getRefreshToken();if(null!=e&&""!==e)return this.doRefreshToken();const t=yield this.tokenService.getClientId(),n=yield this.tokenService.getClientSecret();if(!d.Utils.isNullOrWhitespace(t)&&!d.Utils.isNullOrWhitespace(n))return this.doApiTokenRefresh();throw new Error("Cannot refresh token, no refresh token or api keys are stored")}))}doRefreshToken(){return i(this,void 0,void 0,(function*(){const e=yield this.tokenService.getRefreshToken();if(null==e||""===e)throw new Error;const t=new Headers({"Content-Type":"application/x-www-form-urlencoded; charset=utf-8",Accept:"application/json","Device-Type":this.deviceType});null!=this.customUserAgent&&t.set("User-Agent",this.customUserAgent);const n=yield this.tokenService.decodeToken(),i=yield this.fetch(new Request(this.environmentService.getIdentityUrl()+"/connect/token",{body:this.qsStringify({grant_type:"refresh_token",client_id:n.client_id,refresh_token:e}),cache:"no-store",credentials:this.getCredentials(),headers:t,method:"POST"}));if(200!==i.status){const e=yield this.handleError(i,!0,!0);return Promise.reject(e)}{const e=yield i.json(),t=new P.IdentityTokenResponse(e);yield this.tokenService.setTokens(t.accessToken,t.refreshToken,null)}}))}doApiTokenRefresh(){return i(this,void 0,void 0,(function*(){const e=yield this.tokenService.getClientId(),t=yield this.tokenService.getClientSecret(),n=yield this.appIdService.getAppId(),i=new r.DeviceRequest(n,this.platformUtilsService),a=new p.ApiTokenRequest(e,t,new o.TokenRequestTwoFactor,i),s=yield this.postIdentityToken(a);if(!(s instanceof P.IdentityTokenResponse))throw new Error("Invalid response received when refreshing api token");yield this.tokenService.setToken(s.accessToken)}))}send(e,t,n,r,o,a,s){return i(this,void 0,void 0,(function*(){const i=(a=d.Utils.isNullOrWhitespace(a)?this.environmentService.getApiUrl():a)+t;if(new URL(i).href!==i)return Promise.reject("Invalid request url path.");const l=new Headers({"Device-Type":this.deviceType});null!=this.customUserAgent&&l.set("User-Agent",this.customUserAgent);const c={cache:"no-store",credentials:this.getCredentials(),method:e};if(r){const e=yield this.getActiveBearerToken();l.set("Authorization","Bearer "+e)}null!=n&&("string"==typeof n?(c.body=n,l.set("Content-Type","application/x-www-form-urlencoded; charset=utf-8")):"object"==typeof n&&(n instanceof FormData?c.body=n:(l.set("Content-Type","application/json; charset=utf-8"),c.body=JSON.stringify(n)))),o&&l.set("Accept","application/json"),null!=s&&s(l),c.headers=l;const p=yield this.fetch(new Request(i,c));if(o&&200===p.status){return yield p.json()}if(200!==p.status){const e=yield this.handleError(p,!1,r);return Promise.reject(e)}}))}handleError(e,t,n){return i(this,void 0,void 0,(function*(){if(n&&(t&&400===e.status||401===e.status||403===e.status))return yield this.logoutCallback(!0),null;let i=null;return this.isJsonResponse(e)?i=yield e.json():this.isTextResponse(e)&&(i={Message:yield e.text()}),new b.ErrorResponse(i,e.status,t)}))}qsStringify(e){return Object.keys(e).map((t=>encodeURIComponent(t)+"="+encodeURIComponent(e[t]))).join("&")}getCredentials(){if(!this.isWebClient||this.environmentService.hasBaseUrl())return"include"}addEventParameters(e,t,n,i){return null!=t&&(e+="?start="+t),null!=n&&(e+=e.indexOf("?")>-1?"&":"?",e+="end="+n),null!=i&&(e+=e.indexOf("?")>-1?"&":"?",e+="continuationToken="+i),e}isJsonResponse(e){const t=e.headers.get("content-type");return null!=t&&t.indexOf("application/json")>-1}isTextResponse(e){const t=e.headers.get("content-type");return null!=t&&t.indexOf("text")>-1}}},97979:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AppIdService=void 0;const r=n(46632),o=n(82769);t.AppIdService=class{constructor(e){this.storageService=e}getAppId(){return this.makeAndGetAppId("appId")}getAnonymousAppId(){return this.makeAndGetAppId("anonymousAppId")}makeAndGetAppId(e){return i(this,void 0,void 0,(function*(){const t=yield this.storageService.get(e,{htmlStorageLocation:r.HtmlStorageLocation.Local});if(null!=t)return t;const n=o.Utils.newGuid();return yield this.storageService.save(e,n,{htmlStorageLocation:r.HtmlStorageLocation.Local}),n}))}}},36472:function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AuditService=void 0;const a=n(80699),s=n(82769);class l{constructor(e,t){this.cryptoFunctionService=e,this.apiService=t}passwordLeaked(e){return o(this,void 0,void 0,(function*(){const t=yield this.cryptoFunctionService.hash(e,"sha1"),n=s.Utils.fromBufferToHex(t).toUpperCase(),i=n.substr(0,5),r=n.substr(5),o=yield this.apiService.nativeFetch(new Request("https://api.pwnedpasswords.com/range/"+i)),a=(yield o.text()).split(/\r?\n/).find((e=>e.split(":")[0]===r));return null!=a?parseInt(a.split(":")[1],10):0}))}breachedAccounts(e){return o(this,void 0,void 0,(function*(){try{return yield this.apiService.getHibpBreach(e)}catch(t){if(404===t.statusCode)return[];throw new Error}}))}}i([a.throttle(100,(()=>"passwordLeaked")),r("design:type",Function),r("design:paramtypes",[String]),r("design:returntype",Promise)],l.prototype,"passwordLeaked",null),t.AuditService=l},47262:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AuthService=void 0;const r=n(72440),o=n(2231),a=n(7980),s=n(83825),l=n(74044),c=n(41956),d=n(59791),p=n(33018);t.AuthService=class{constructor(e,t,n,i,r,o,a,s,l,c,d,p){this.cryptoService=e,this.apiService=t,this.tokenService=n,this.appIdService=i,this.platformUtilsService=r,this.messagingService=o,this.logService=a,this.keyConnectorService=s,this.environmentService=l,this.stateService=c,this.twoFactorService=d,this.i18nService=p}get email(){return this.logInStrategy instanceof l.PasswordLogInStrategy?this.logInStrategy.email:null}get masterPasswordHash(){return this.logInStrategy instanceof l.PasswordLogInStrategy?this.logInStrategy.masterPasswordHash:null}logIn(e){return i(this,void 0,void 0,(function*(){let t;this.clearState(),e.type===o.AuthenticationType.Password?t=new l.PasswordLogInStrategy(this.cryptoService,this.apiService,this.tokenService,this.appIdService,this.platformUtilsService,this.messagingService,this.logService,this.stateService,this.twoFactorService,this):e.type===o.AuthenticationType.Sso?t=new c.SsoLogInStrategy(this.cryptoService,this.apiService,this.tokenService,this.appIdService,this.platformUtilsService,this.messagingService,this.logService,this.stateService,this.twoFactorService,this.keyConnectorService):e.type===o.AuthenticationType.Api&&(t=new s.ApiLogInStrategy(this.cryptoService,this.apiService,this.tokenService,this.appIdService,this.platformUtilsService,this.messagingService,this.logService,this.stateService,this.twoFactorService,this.environmentService,this.keyConnectorService));const n=yield t.logIn(e);return(null==n?void 0:n.requiresTwoFactor)&&this.saveState(t),n}))}logInTwoFactor(e,t){return i(this,void 0,void 0,(function*(){if(null==this.logInStrategy)throw new Error(this.i18nService.t("sessionTimeout"));try{const n=yield this.logInStrategy.logInTwoFactor(e,t);return n.requiresTwoFactor||n.requiresCaptcha||this.clearState(),n}catch(n){throw n instanceof p.ErrorResponse||this.clearState(),n}}))}logOut(e){e(),this.messagingService.send("loggedOut")}authingWithApiKey(){return this.logInStrategy instanceof s.ApiLogInStrategy}authingWithSso(){return this.logInStrategy instanceof c.SsoLogInStrategy}authingWithPassword(){return this.logInStrategy instanceof l.PasswordLogInStrategy}getAuthStatus(e){return i(this,void 0,void 0,(function*(){if(!(yield this.stateService.getIsAuthenticated({userId:e})))return r.AuthenticationStatus.LoggedOut;(yield this.cryptoService.hasKeyStored(a.KeySuffixOptions.Auto,e))&&!(yield this.stateService.getEverBeenUnlocked({userId:e}))&&(yield this.cryptoService.getKey(a.KeySuffixOptions.Auto,e));return(yield this.cryptoService.hasKeyInMemory(e))?r.AuthenticationStatus.Unlocked:r.AuthenticationStatus.Locked}))}makePreloginKey(e,t){return i(this,void 0,void 0,(function*(){t=t.trim().toLowerCase();let n=null,i=null;try{const e=yield this.apiService.postPrelogin(new d.PreloginRequest(t));null!=e&&(n=e.kdf,i=e.kdfIterations)}catch(r){if(null==r||404!==r.statusCode)throw r}return this.cryptoService.makeKey(e,t,n,i)}))}saveState(e){this.logInStrategy=e,this.startSessionTimeout()}clearState(){this.logInStrategy=null,this.clearSessionTimeout()}startSessionTimeout(){this.clearSessionTimeout(),this.sessionTimeout=setTimeout((()=>this.clearState()),12e4)}clearSessionTimeout(){null!=this.sessionTimeout&&clearTimeout(this.sessionTimeout)}}},71545:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AzureFileUploadService=void 0;const r=n(82769);t.AzureFileUploadService=class{constructor(e){this.logService=e}upload(e,t,n){return i(this,void 0,void 0,(function*(){return t.buffer.byteLength<=268435456?yield this.azureUploadBlob(e,t):yield this.azureUploadBlocks(e,t,n)}))}azureUploadBlob(e,t){return i(this,void 0,void 0,(function*(){const n=r.Utils.getUrl(e),i=new Headers({"x-ms-date":(new Date).toUTCString(),"x-ms-version":n.searchParams.get("sv"),"Content-Length":t.buffer.byteLength.toString(),"x-ms-blob-type":"BlockBlob"}),o=new Request(e,{body:t.buffer,cache:"no-store",method:"PUT",headers:i}),a=yield fetch(o);if(201!==a.status)throw new Error(`Failed to create Azure blob: ${a.status}`)}))}azureUploadBlocks(e,t,n){return i(this,void 0,void 0,(function*(){const i=r.Utils.getUrl(e),o=this.getMaxBlockSize(i.searchParams.get("sv"));let a=0;const s=Math.ceil(t.buffer.byteLength/o),l=[];if(s>5e4)throw new Error("Cannot upload file, exceeds maximum size of "+5e4*o);try{for(;a{t+=`${e}`})),t+="",t}getMaxBlockSize(e){return o.compare(e,"2019-12-12")>=0?4194304e3:o.compare(e,"2016-05-31")>=0?104857600:4194304}};class o{constructor(e){this.year=0,this.month=0,this.day=0;try{const t=e.split("-").map((e=>Number.parseInt(e,10)));this.year=t[0],this.month=t[1],this.day=t[2]}catch(t){}}static compare(e,t){return"string"==typeof e&&(e=new o(e)),"string"==typeof t&&(t=new o(t)),e.year!==t.year?e.year-t.year:e.month!==t.month?e.month-t.month:e.day!==t.day?e.day-t.day:0}compare(e){return o.compare(this,e)}}},29911:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BitwardenFileUploadService=void 0;const r=n(82769);t.BitwardenFileUploadService=class{constructor(e){this.apiService=e}upload(e,t,n){return i(this,void 0,void 0,(function*(){const i=new FormData;try{const n=new Blob([t.buffer],{type:"application/octet-stream"});i.append("data",n,e)}catch(o){if(!r.Utils.isNode||r.Utils.isBrowser)throw o;i.append("data",Buffer.from(t.buffer),{filepath:e,contentType:"application/octet-stream"})}yield n(i)}))}}},45921:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BroadcasterService=void 0;t.BroadcasterService=class{constructor(){this.subscribers=new Map}send(e,t){null==t?this.subscribers.forEach((t=>{t(e)})):this.subscribers.has(t)&&this.subscribers.get(t)(e)}subscribe(e,t){this.subscribers.set(e,t)}unsubscribe(e){this.subscribers.has(e)&&this.subscribers.delete(e)}}},36833:function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CipherService=void 0;const a=n(32773),s=n(67577),l=n(71703),c=n(27605),d=n(82769),p=n(82789),u=n(73024),m=n(53763),h=n(49624),v=n(84379),f=n(809),g=n(89642),y=n(28947),x=n(20929),S=n(7012),b=n(20126),w=n(82890),C=n(34392),I=n(8488),E=n(61418),P=n(53994),O=n(62415),k=n(16391),A=n(3467),T=n(33018),M=n(40170),B=new Map([["google.com",new Set(["script.google.com"])]]);class D{constructor(e,t,n,i,r,o,a,s){this.cryptoService=e,this.settingsService=t,this.apiService=n,this.fileUploadService=i,this.i18nService=r,this.searchService=o,this.logService=a,this.stateService=s,this.sortedCiphersCache=new b.SortedCiphersCache(this.sortCiphersByLastUsed)}getDecryptedCipherCache(){return o(this,void 0,void 0,(function*(){return yield this.stateService.getDecryptedCiphers()}))}setDecryptedCipherCache(e){return o(this,void 0,void 0,(function*(){yield this.stateService.setDecryptedCiphers(e),null!=this.searchService&&(null==e?this.searchService().clearIndex():this.searchService().indexCiphers())}))}clearCache(e){return o(this,void 0,void 0,(function*(){yield this.clearDecryptedCiphersState(e)}))}encrypt(e,t,n=null){return o(this,void 0,void 0,(function*(){if(null!=e.id){if(null==n&&(n=yield this.get(e.id)),null!=n){const t=yield n.decrypt();if(e.passwordHistory=t.passwordHistory||[],e.type===a.CipherType.Login&&t.type===a.CipherType.Login)if(null!=t.login.password&&""!==t.login.password&&t.login.password!==e.login.password){const n=new M.PasswordHistoryView;n.password=t.login.password,n.lastUsedDate=e.login.passwordRevisionDate=new Date,e.passwordHistory.splice(0,0,n)}else e.login.passwordRevisionDate=t.login.passwordRevisionDate;if(t.hasFields){const n=t.fields.filter((e=>e.type===s.FieldType.Hidden&&null!=e.name&&""!==e.name&&null!=e.value&&""!==e.value)),i=null==e.fields?[]:e.fields.filter((e=>e.type===s.FieldType.Hidden&&null!=e.name&&""!==e.name));n.forEach((t=>{const n=i.find((e=>e.name===t.name));if(null==n||n.value!==t.value){const n=new M.PasswordHistoryView;n.password=t.name+": "+t.value,n.lastUsedDate=new Date,e.passwordHistory.splice(0,0,n)}}))}}null!=e.passwordHistory&&0===e.passwordHistory.length?e.passwordHistory=null:null!=e.passwordHistory&&e.passwordHistory.length>5&&(e.passwordHistory=e.passwordHistory.slice(0,5))}const i=new h.Cipher;if(i.id=e.id,i.folderId=e.folderId,i.favorite=e.favorite,i.organizationId=e.organizationId,i.type=e.type,i.collectionIds=e.collectionIds,i.revisionDate=e.revisionDate,i.reprompt=e.reprompt,null==t&&null!=i.organizationId&&null==(t=yield this.cryptoService.getOrgKey(i.organizationId)))throw new Error("Cannot encrypt cipher for organization. No key.");return yield Promise.all([this.encryptObjProperty(e,i,{name:null,notes:null},t),this.encryptCipherData(i,e,t),this.encryptFields(e.fields,t).then((e=>{i.fields=e})),this.encryptPasswordHistories(e.passwordHistory,t).then((e=>{i.passwordHistory=e})),this.encryptAttachments(e.attachments,t).then((e=>{i.attachments=e}))]),i}))}encryptAttachments(e,t){return o(this,void 0,void 0,(function*(){if(null==e||0===e.length)return null;const n=[],i=[];return e.forEach((e=>o(this,void 0,void 0,(function*(){const r=new u.Attachment;r.id=e.id,r.size=e.size,r.sizeName=e.sizeName,r.url=e.url;const a=this.encryptObjProperty(e,r,{fileName:null},t).then((()=>o(this,void 0,void 0,(function*(){null!=e.key&&(r.key=yield this.cryptoService.encrypt(e.key.key,t)),i.push(r)}))));n.push(a)})))),yield Promise.all(n),i}))}encryptFields(e,t){return o(this,void 0,void 0,(function*(){if(!e||!e.length)return null;const n=this,i=[];return yield e.reduce(((e,r)=>o(this,void 0,void 0,(function*(){yield e;const o=yield n.encryptField(r,t);i.push(o)}))),Promise.resolve()),i}))}encryptField(e,t){return o(this,void 0,void 0,(function*(){const n=new v.Field;return n.type=e.type,n.linkedId=e.linkedId,e.type===s.FieldType.Boolean&&"true"!==e.value&&(e.value="false"),yield this.encryptObjProperty(e,n,{name:null,value:null},t),n}))}encryptPasswordHistories(e,t){return o(this,void 0,void 0,(function*(){if(!e||!e.length)return null;const n=this,i=[];return yield e.reduce(((e,r)=>o(this,void 0,void 0,(function*(){yield e;const o=yield n.encryptPasswordHistory(r,t);i.push(o)}))),Promise.resolve()),i}))}encryptPasswordHistory(e,t){return o(this,void 0,void 0,(function*(){const n=new x.Password;return n.lastUsedDate=e.lastUsedDate,yield this.encryptObjProperty(e,n,{password:null},t),n}))}get(e){return o(this,void 0,void 0,(function*(){const t=yield this.stateService.getEncryptedCiphers();if(null==t||!t.hasOwnProperty(e))return null;const n=yield this.stateService.getLocalData();return new h.Cipher(t[e],n?n[e]:null)}))}getAll(){return o(this,void 0,void 0,(function*(){const e=yield this.stateService.getLocalData(),t=yield this.stateService.getEncryptedCiphers(),n=[];for(const i in t)t.hasOwnProperty(i)&&n.push(new h.Cipher(t[i],e?e[i]:null));return n}))}getAllDecrypted(){var e;return o(this,void 0,void 0,(function*(){const t=yield this.stateService.getUserId();if(null!=(yield this.getDecryptedCipherCache()))return null!=this.searchService&&(null!==(e=this.searchService().indexedEntityId)&&void 0!==e?e:t)!==t&&(yield this.searchService().indexCiphers(t,yield this.getDecryptedCipherCache())),yield this.getDecryptedCipherCache();const n=[];if(!(yield this.cryptoService.hasKey()))throw new Error("No key.");const i=[];return(yield this.getAll()).forEach((e=>o(this,void 0,void 0,(function*(){i.push(e.decrypt().then((e=>n.push(e))))})))),yield Promise.all(i),n.sort(this.getLocaleSortingFunction()),yield this.setDecryptedCipherCache(n),n}))}getAllDecryptedForGrouping(e,t=!0){return o(this,void 0,void 0,(function*(){return(yield this.getAllDecrypted()).filter((n=>!n.isDeleted&&(!(!t||n.folderId!==e)||!t&&null!=n.collectionIds&&n.collectionIds.indexOf(e)>-1)))}))}getAllDecryptedForUrl(e,t,n=null){return o(this,void 0,void 0,(function*(){if(null==e&&null==t)return Promise.resolve([]);const i=d.Utils.getDomain(e),r=null==i?Promise.resolve([]):this.settingsService.getEquivalentDomains().then((e=>{let t=[];return e.forEach((e=>{e.length&&e.indexOf(i)>=0&&(t=t.concat(e))})),t.length||t.push(i),t})),o=yield Promise.all([r,this.getAllDecrypted()]),s=o[0],c=o[1];return null==n&&null==(n=yield this.stateService.getDefaultUriMatch())&&(n=l.UriMatchType.Domain),c.filter((r=>{if(null!=r.deletedDate)return!1;if(null!=t&&t.indexOf(r.type)>-1)return!0;if(null!=e&&r.type===a.CipherType.Login&&null!=r.login.uris)for(let t=0;t-1){if(!B.has(a.domain))return!0;{const t=d.Utils.getHost(e);if(!B.get(a.domain).has(t))return!0}}break;case l.UriMatchType.Host:{const t=d.Utils.getHost(e);if(null!=t&&t===d.Utils.getHost(a.uri))return!0;break}case l.UriMatchType.Exact:if(e===a.uri)return!0;break;case l.UriMatchType.StartsWith:if(e.startsWith(a.uri))return!0;break;case l.UriMatchType.RegularExpression:try{if(new RegExp(a.uri,"i").test(e))return!0}catch(o){this.logService.error(o)}case l.UriMatchType.Never:}}return!1}))}))}getAllFromApiForOrganization(e){return o(this,void 0,void 0,(function*(){const t=yield this.apiService.getCiphersOrganization(e);if(null!=t&&null!=t.data&&t.data.length){const e=[],n=[];return t.data.forEach((t=>{const i=new p.CipherData(t),r=new h.Cipher(i);n.push(r.decrypt().then((t=>e.push(t))))})),yield Promise.all(n),e.sort(this.getLocaleSortingFunction()),e}return[]}))}getLastUsedForUrl(e,t=!1){return o(this,void 0,void 0,(function*(){return this.getCipherForUrl(e,!0,!1,t)}))}getLastLaunchedForUrl(e,t=!1){return o(this,void 0,void 0,(function*(){return this.getCipherForUrl(e,!1,!0,t)}))}getNextCipherForUrl(e){return o(this,void 0,void 0,(function*(){return this.getCipherForUrl(e,!1,!1,!1)}))}updateLastUsedIndexForUrl(e){this.sortedCiphersCache.updateLastUsedIndex(e)}updateLastUsedDate(e){return o(this,void 0,void 0,(function*(){let t=yield this.stateService.getLocalData();t||(t={}),t[e]?t[e].lastUsedDate=(new Date).getTime():t[e]={lastUsedDate:(new Date).getTime()},yield this.stateService.setLocalData(t);const n=yield this.stateService.getDecryptedCiphers();if(n){for(let i=0;i{null==n.key&&i.push(this.shareAttachmentWithServer(n,e.id,t))})),yield Promise.all(i),e.organizationId=t,e.collectionIds=n;const r=yield this.encrypt(e),o=new A.CipherShareRequest(r),a=yield this.apiService.putShareCipher(e.id,o),s=new p.CipherData(a,n);yield this.upsert(s)}))}shareManyWithServer(e,t,n){return o(this,void 0,void 0,(function*(){const i=[],r=[];for(const s of e)s.organizationId=t,s.collectionIds=n,i.push(this.encrypt(s).then((e=>{r.push(e)})));yield Promise.all(i);const o=new E.CipherBulkShareRequest(r,n);try{yield this.apiService.putShareCiphers(o)}catch(a){for(const t of e)t.organizationId=null,t.collectionIds=null;throw a}yield this.upsert(r.map((e=>e.toCipherData())))}))}saveAttachmentWithServer(e,t,n=!1){return new Promise(((i,r)=>{const a=new FileReader;a.readAsArrayBuffer(t),a.onload=a=>o(this,void 0,void 0,(function*(){try{const r=yield this.saveAttachmentRawWithServer(e,t.name,a.target.result,n);i(r)}catch(o){r(o)}})),a.onerror=()=>{r("Error reading file.")}}))}saveAttachmentRawWithServer(e,t,n,i=!1){return o(this,void 0,void 0,(function*(){const r=yield this.cryptoService.getOrgKey(e.organizationId),o=yield this.cryptoService.encrypt(t,r),a=yield this.cryptoService.makeEncKey(r),s=yield this.cryptoService.encryptToBytes(n,a[0]),l={key:a[1].encryptedString,fileName:o.encryptedString,fileSize:s.buffer.byteLength,adminRequest:i};let c;try{const t=yield this.apiService.postCipherAttachment(e.id,l);c=i?t.cipherMiniResponse:t.cipherResponse,yield this.fileUploadService.uploadCipherAttachment(i,t,o,s)}catch(u){if(!(u instanceof T.ErrorResponse&&404===u.statusCode||405===u.statusCode))throw u instanceof T.ErrorResponse?new Error(u.getSingleMessage()):u;c=yield this.legacyServerAttachmentFileUpload(i,e.id,o,s,a[1])}const d=new p.CipherData(c,e.collectionIds);return i||(yield this.upsert(d)),new h.Cipher(d)}))}legacyServerAttachmentFileUpload(e,t,n,i,r){return o(this,void 0,void 0,(function*(){const o=new FormData;try{const e=new Blob([i.buffer],{type:"application/octet-stream"});o.append("key",r.encryptedString),o.append("data",e,n.encryptedString)}catch(s){if(!d.Utils.isNode||d.Utils.isBrowser)throw s;o.append("key",r.encryptedString),o.append("data",Buffer.from(i.buffer),{filepath:n.encryptedString,contentType:"application/octet-stream"})}let a;try{a=e?yield this.apiService.postCipherAttachmentAdminLegacy(t,o):yield this.apiService.postCipherAttachmentLegacy(t,o)}catch(s){throw new Error(s.getSingleMessage())}return a}))}saveCollectionsWithServer(e){return o(this,void 0,void 0,(function*(){const t=new P.CipherCollectionsRequest(e.collectionIds);yield this.apiService.putCipherCollections(e.id,t);const n=e.toCipherData();yield this.upsert(n)}))}upsert(e){return o(this,void 0,void 0,(function*(){let t=yield this.stateService.getEncryptedCiphers();if(null==t&&(t={}),e instanceof p.CipherData){const n=e;t[n.id]=n}else e.forEach((e=>{t[e.id]=e}));yield this.replace(t)}))}replace(e){return o(this,void 0,void 0,(function*(){yield this.clearDecryptedCiphersState(),yield this.stateService.setEncryptedCiphers(e)}))}clear(e){return o(this,void 0,void 0,(function*(){yield this.clearEncryptedCiphersState(e),yield this.clearCache(e)}))}moveManyWithServer(e,t){return o(this,void 0,void 0,(function*(){yield this.apiService.putMoveCiphers(new C.CipherBulkMoveRequest(e,t));let n=yield this.stateService.getEncryptedCiphers();null==n&&(n={}),e.forEach((e=>{n.hasOwnProperty(e)&&(n[e].folderId=t)})),yield this.clearCache(),yield this.stateService.setEncryptedCiphers(n)}))}delete(e){return o(this,void 0,void 0,(function*(){const t=yield this.stateService.getEncryptedCiphers();if(null!=t){if("string"==typeof e){if(null==t[e])return;delete t[e]}else e.forEach((e=>{delete t[e]}));yield this.clearCache(),yield this.stateService.setEncryptedCiphers(t)}}))}deleteWithServer(e){return o(this,void 0,void 0,(function*(){yield this.apiService.deleteCipher(e),yield this.delete(e)}))}deleteManyWithServer(e){return o(this,void 0,void 0,(function*(){yield this.apiService.deleteManyCiphers(new w.CipherBulkDeleteRequest(e)),yield this.delete(e)}))}deleteAttachment(e,t){return o(this,void 0,void 0,(function*(){const n=yield this.stateService.getEncryptedCiphers();if(null!=n&&n.hasOwnProperty(e)&&null!=n[e].attachments){for(let i=0;ii?-1:null!=i&&null==n?1:0}sortCiphersByLastUsedThenName(e,t){const n=this.sortCiphersByLastUsed(e,t);return 0!==n?n:this.getLocaleSortingFunction()(e,t)}getLocaleSortingFunction(){return(e,t)=>{let n=e.name,i=t.name;if(null==n&&null!=i)return-1;if(null!=n&&null==i)return 1;if(null==n&&null==i)return 0;const r=this.i18nService.collator?this.i18nService.collator.compare(n,i):n.localeCompare(i);return 0!==r||e.type!==a.CipherType.Login||t.type!==a.CipherType.Login?r:(null!=e.login.username&&(n+=e.login.username),null!=t.login.username&&(i+=t.login.username),this.i18nService.collator?this.i18nService.collator.compare(n,i):n.localeCompare(i))}}softDelete(e){return o(this,void 0,void 0,(function*(){const t=yield this.stateService.getEncryptedCiphers();if(null==t)return;const n=e=>{null!=t[e]&&(t[e].deletedDate=(new Date).toISOString())};"string"==typeof e?n(e):e.forEach(n),yield this.clearCache(),yield this.stateService.setEncryptedCiphers(t)}))}softDeleteWithServer(e){return o(this,void 0,void 0,(function*(){yield this.apiService.putDeleteCipher(e),yield this.softDelete(e)}))}softDeleteManyWithServer(e){return o(this,void 0,void 0,(function*(){yield this.apiService.putDeleteManyCiphers(new w.CipherBulkDeleteRequest(e)),yield this.softDelete(e)}))}restore(e){return o(this,void 0,void 0,(function*(){const t=yield this.stateService.getEncryptedCiphers();if(null==t)return;const n=e=>{null!=t[e.id]&&(t[e.id].deletedDate=null,t[e.id].revisionDate=e.revisionDate)};e.constructor.name===Array.name?e.forEach(n):n(e),yield this.clearCache(),yield this.stateService.setEncryptedCiphers(t)}))}restoreWithServer(e){return o(this,void 0,void 0,(function*(){const t=yield this.apiService.putRestoreCipher(e);yield this.restore({id:e,revisionDate:t.revisionDate})}))}restoreManyWithServer(e){return o(this,void 0,void 0,(function*(){const t=yield this.apiService.putRestoreManyCiphers(new I.CipherBulkRestoreRequest(e)),n=[];for(const e of t.data)n.push({id:e.id,revisionDate:e.revisionDate});yield this.restore(n)}))}shareAttachmentWithServer(e,t,n){return o(this,void 0,void 0,(function*(){const i=yield this.apiService.nativeFetch(new Request(e.url,{cache:"no-store"}));if(200!==i.status)throw Error("Failed to download attachment: "+i.status.toString());const r=yield i.arrayBuffer(),o=yield this.cryptoService.decryptFromBytes(r,null),a=yield this.cryptoService.getOrgKey(n),s=yield this.cryptoService.encrypt(e.fileName,a),l=yield this.cryptoService.makeEncKey(a),c=yield this.cryptoService.encryptToBytes(o,l[0]),p=new FormData;try{const e=new Blob([c.buffer],{type:"application/octet-stream"});p.append("key",l[1].encryptedString),p.append("data",e,s.encryptedString)}catch(u){if(!d.Utils.isNode||d.Utils.isBrowser)throw u;p.append("key",l[1].encryptedString),p.append("data",Buffer.from(c.buffer),{filepath:s.encryptedString,contentType:"application/octet-stream"})}try{yield this.apiService.postShareCipherAttachment(t,e.id,p,n)}catch(u){throw new Error(u.getSingleMessage())}}))}encryptObjProperty(e,t,n,i){return o(this,void 0,void 0,(function*(){const r=[],o=this;for(const a in n)n.hasOwnProperty(a)&&function(t,a){const s=Promise.resolve().then((()=>{const r=e[n[t]||t];return r&&""!==r?o.cryptoService.encrypt(r,i):null})).then((e=>{a[t]=e}));r.push(s)}(a,t);yield Promise.all(r)}))}encryptCipherData(e,t,n){return o(this,void 0,void 0,(function*(){switch(e.type){case a.CipherType.Login:if(e.login=new g.Login,e.login.passwordRevisionDate=t.login.passwordRevisionDate,e.login.autofillOnPageLoad=t.login.autofillOnPageLoad,yield this.encryptObjProperty(t.login,e.login,{username:null,password:null,totp:null},n),null!=t.login.uris){e.login.uris=[];for(let i=0;it.login.autofillOnPageLoad||null==t.login.autofillOnPageLoad&&!1!==e)),0===t.length)return null}this.sortedCiphersCache.addCiphers(r,t)}return n?this.sortedCiphersCache.getLastLaunched(r):t?this.sortedCiphersCache.getLastUsed(r):this.sortedCiphersCache.getNext(r)}))}clearEncryptedCiphersState(e){return o(this,void 0,void 0,(function*(){yield this.stateService.setEncryptedCiphers(null,{userId:e})}))}clearDecryptedCiphersState(e){return o(this,void 0,void 0,(function*(){yield this.stateService.setDecryptedCiphers(null,{userId:e}),this.clearSortedCiphers()}))}clearSortedCiphers(){this.sortedCiphersCache.clear()}}i([c.sequentialize((()=>"getAllDecrypted")),r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",Promise)],D.prototype,"getAllDecrypted",null),t.CipherService=D},94778:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionService=void 0;const r=n(39814),o=n(82769),a=n(34917),s=n(65642),l=n(86001);t.CollectionService=class{constructor(e,t,n){this.cryptoService=e,this.i18nService=t,this.stateService=n}clearCache(e){return i(this,void 0,void 0,(function*(){yield this.stateService.setDecryptedCollections(null,{userId:e})}))}encrypt(e){return i(this,void 0,void 0,(function*(){if(null==e.organizationId)throw new Error("Collection has no organization id.");const t=yield this.cryptoService.getOrgKey(e.organizationId);if(null==t)throw new Error("No key for this collection's organization.");const n=new s.Collection;return n.id=e.id,n.organizationId=e.organizationId,n.readOnly=e.readOnly,n.name=yield this.cryptoService.encrypt(e.name,t),n}))}decryptMany(e){return i(this,void 0,void 0,(function*(){if(null==e)return[];const t=[],n=[];return e.forEach((e=>{n.push(e.decrypt().then((e=>t.push(e))))})),yield Promise.all(n),t.sort(o.Utils.getSortFunction(this.i18nService,"name"))}))}get(e){return i(this,void 0,void 0,(function*(){const t=yield this.stateService.getEncryptedCollections();return null!=t&&t.hasOwnProperty(e)?new s.Collection(t[e]):null}))}getAll(){return i(this,void 0,void 0,(function*(){const e=yield this.stateService.getEncryptedCollections(),t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(new s.Collection(e[n]));return t}))}getAllDecrypted(){return i(this,void 0,void 0,(function*(){let e=yield this.stateService.getDecryptedCollections();if(null!=e)return e;if(!(yield this.cryptoService.hasKey()))throw new Error("No key.");const t=yield this.getAll();return e=yield this.decryptMany(t),yield this.stateService.setDecryptedCollections(e),e}))}getAllNested(e=null){return i(this,void 0,void 0,(function*(){null==e&&(e=yield this.getAllDecrypted());const t=[];return e.forEach((e=>{const n=new l.CollectionView;n.id=e.id,n.organizationId=e.organizationId;const i=null!=e.name?e.name.replace(/^\/+|\/+$/g,"").split("/"):[];r.ServiceUtils.nestedTraverse(t,0,i,n,null,"/")})),t}))}getNested(e){return i(this,void 0,void 0,(function*(){const t=yield this.getAllNested();return r.ServiceUtils.getTreeNodeObject(t,e)}))}upsert(e){return i(this,void 0,void 0,(function*(){let t=yield this.stateService.getEncryptedCollections();if(null==t&&(t={}),e instanceof a.CollectionData){const n=e;t[n.id]=n}else e.forEach((e=>{t[e.id]=e}));yield this.replace(t)}))}replace(e){return i(this,void 0,void 0,(function*(){yield this.clearCache(),yield this.stateService.setEncryptedCollections(e)}))}clear(e){return i(this,void 0,void 0,(function*(){yield this.clearCache(e),yield this.stateService.setEncryptedCollections(null,{userId:e})}))}delete(e){return i(this,void 0,void 0,(function*(){const t=yield this.stateService.getEncryptedCollections();null!=t&&("string"==typeof e?delete t[e]:e.forEach((e=>{delete t[e]})),yield this.replace(t))}))}}},27944:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConsoleLogService=void 0;const i=n(40827),r=n(71518);t.ConsoleLogService=class{constructor(e,t=null){this.isDev=e,this.filter=t,this.timersMap=new Map}debug(e){this.isDev&&this.write(r.LogLevelType.Debug,e)}info(e){this.write(r.LogLevelType.Info,e)}warning(e){this.write(r.LogLevelType.Warning,e)}error(e){this.write(r.LogLevelType.Error,e)}write(e,t){if(null==this.filter||!this.filter(e))switch(e){case r.LogLevelType.Debug:case r.LogLevelType.Info:console.log(t);break;case r.LogLevelType.Warning:console.warn(t);break;case r.LogLevelType.Error:console.error(t)}}time(e="default"){this.timersMap.has(e)||this.timersMap.set(e,i())}timeEnd(e="default"){const t=i(this.timersMap.get(e));return this.timersMap.delete(e),this.write(r.LogLevelType.Info,`${e}: ${1e3*t[0]+t[1]/1e7}ms`),t}}},74901:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerService=void 0;t.ContainerService=class{constructor(e){this.cryptoService=e}attachToWindow(e){this.attachToGlobal(e)}attachToGlobal(e){e.bitwardenContainerService||(e.bitwardenContainerService=this)}getCryptoService(){return this.cryptoService}}},47165:function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CryptoService=void 0;const a=n(24736),s=n(28588),l=n(43578),c=n(20971),d=n(7980),p=n(27605),u=n(82769),m=n(40596),h=n(16131),v=n(22205),f=n(6394),g=n(69731);class y{constructor(e,t,n,i){this.cryptoFunctionService=e,this.platformUtilService=t,this.logService=n,this.stateService=i}setKey(e,t){return o(this,void 0,void 0,(function*(){yield this.stateService.setCryptoMasterKey(e,{userId:t}),yield this.storeKey(e,t)}))}setKeyHash(e){return o(this,void 0,void 0,(function*(){yield this.stateService.setKeyHash(e)}))}setEncKey(e){return o(this,void 0,void 0,(function*(){null!=e&&(yield this.stateService.setDecryptedCryptoSymmetricKey(null),yield this.stateService.setEncryptedCryptoSymmetricKey(e))}))}setEncPrivateKey(e){return o(this,void 0,void 0,(function*(){null!=e&&(yield this.stateService.setDecryptedPrivateKey(null),yield this.stateService.setEncryptedPrivateKey(e))}))}setOrgKeys(e,t){return o(this,void 0,void 0,(function*(){const n={};e.forEach((e=>{n[e.id]=e.key}));for(const e of t){const t=yield this.getProviderKey(e.providerId),i=yield this.decryptToBytes(new v.EncString(e.key),t);n[e.id]=(yield this.rsaEncrypt(i)).encryptedString}return yield this.stateService.setDecryptedOrganizationKeys(null),yield this.stateService.setEncryptedOrganizationKeys(n)}))}setProviderKeys(e){return o(this,void 0,void 0,(function*(){const t={};return e.forEach((e=>{t[e.id]=e.key})),yield this.stateService.setDecryptedProviderKeys(null),yield this.stateService.setEncryptedProviderKeys(t)}))}getKey(e,t){return o(this,void 0,void 0,(function*(){const n=yield this.stateService.getCryptoMasterKey({userId:t});if(null!=n)return n;e||(e=d.KeySuffixOptions.Auto);const i=yield this.getKeyFromStorage(e,t);return null!=i&&this.setKey(i,t),i}))}getKeyFromStorage(e,t){return o(this,void 0,void 0,(function*(){const n=yield this.retrieveKeyFromStorage(e,t);if(null!=n){const e=new g.SymmetricCryptoKey(u.Utils.fromB64ToArray(n).buffer);return(yield this.validateKey(e))?e:(this.logService.warning("Wrong key, throwing away stored key"),yield this.clearSecretKeyStore(t),null)}return null}))}getKeyHash(){return o(this,void 0,void 0,(function*(){return yield this.stateService.getKeyHash()}))}compareAndUpdateKeyHash(e,t){return o(this,void 0,void 0,(function*(){const n=yield this.getKeyHash();if(null!=e&&null!=n){const i=yield this.hashPassword(e,t,l.HashPurpose.LocalAuthorization);if(null!=i&&n===i)return!0;const r=yield this.hashPassword(e,t,l.HashPurpose.ServerAuthorization);if(null!=r&&n===r)return yield this.setKeyHash(i),!0}return!1}))}getEncKey(e=null){return this.getEncKeyHelper(e)}getPublicKey(){return o(this,void 0,void 0,(function*(){const e=yield this.stateService.getPublicKey();if(null!=e)return e;const t=yield this.getPrivateKey();if(null==t)return null;const n=yield this.cryptoFunctionService.rsaExtractPublicKey(t);return yield this.stateService.setPublicKey(n),n}))}getPrivateKey(){return o(this,void 0,void 0,(function*(){const e=yield this.stateService.getDecryptedPrivateKey();if(null!=e)return e;const t=yield this.stateService.getEncryptedPrivateKey();if(null==t)return null;const n=yield this.decryptToBytes(new v.EncString(t),null);return yield this.stateService.setDecryptedPrivateKey(n),n}))}getFingerprint(e,t){return o(this,void 0,void 0,(function*(){if(null==t&&(t=yield this.getPublicKey()),null===t)throw new Error("No public key available.");const n=yield this.cryptoFunctionService.hash(t,"sha256"),i=yield this.cryptoFunctionService.hkdfExpand(n,e,32,"sha256");return this.hashPhrase(i)}))}getOrgKeys(){return o(this,void 0,void 0,(function*(){const e=new Map,t=yield this.stateService.getDecryptedOrganizationKeys();if(null!=t&&t.size>0)return t;const n=yield this.stateService.getEncryptedOrganizationKeys();if(null==n)return null;let i=!1;for(const r in n){if(!n.hasOwnProperty(r))continue;const t=yield this.rsaDecrypt(n[r]);e.set(r,new g.SymmetricCryptoKey(t)),i=!0}return i&&(yield this.stateService.setDecryptedOrganizationKeys(e)),e}))}getOrgKey(e){return o(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.getOrgKeys();return null!=t&&t.has(e)?t.get(e):null}))}getProviderKeys(){return o(this,void 0,void 0,(function*(){const e=new Map,t=yield this.stateService.getDecryptedProviderKeys();if(null!=t&&t.size>0)return t;const n=yield this.stateService.getEncryptedProviderKeys();if(null==n)return null;let i=!1;for(const r in n){if(!n.hasOwnProperty(r))continue;const t=yield this.rsaDecrypt(n[r]);e.set(r,new g.SymmetricCryptoKey(t)),i=!0}return i&&(yield this.stateService.setDecryptedProviderKeys(e)),e}))}getProviderKey(e){return o(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.getProviderKeys();return null!=t&&t.has(e)?t.get(e):null}))}hasKey(){return o(this,void 0,void 0,(function*(){return(yield this.hasKeyInMemory())||(yield this.hasKeyStored(d.KeySuffixOptions.Auto))||(yield this.hasKeyStored(d.KeySuffixOptions.Biometric))}))}hasKeyInMemory(e){return o(this,void 0,void 0,(function*(){return null!=(yield this.stateService.getCryptoMasterKey({userId:e}))}))}hasKeyStored(e,t){return o(this,void 0,void 0,(function*(){switch(e){case d.KeySuffixOptions.Auto:return null!=(yield this.stateService.getCryptoMasterKeyAuto({userId:t}));case d.KeySuffixOptions.Biometric:return!0===(yield this.stateService.hasCryptoMasterKeyBiometric({userId:t}));default:return!1}}))}hasEncKey(){return o(this,void 0,void 0,(function*(){return null!=(yield this.stateService.getEncryptedCryptoSymmetricKey())}))}clearKey(e=!0,t){return o(this,void 0,void 0,(function*(){yield this.stateService.setCryptoMasterKey(null,{userId:t}),yield this.stateService.setLegacyEtmKey(null,{userId:t}),e&&(yield this.clearSecretKeyStore(t))}))}clearStoredKey(e){return o(this,void 0,void 0,(function*(){e===d.KeySuffixOptions.Auto?yield this.stateService.setCryptoMasterKeyAuto(null):yield this.stateService.setCryptoMasterKeyBiometric(null)}))}clearKeyHash(e){return o(this,void 0,void 0,(function*(){return yield this.stateService.setKeyHash(null,{userId:e})}))}clearEncKey(e,t){return o(this,void 0,void 0,(function*(){yield this.stateService.setDecryptedCryptoSymmetricKey(null,{userId:t}),e||(yield this.stateService.setEncryptedCryptoSymmetricKey(null,{userId:t}))}))}clearKeyPair(e,t){return o(this,void 0,void 0,(function*(){const n=[this.stateService.setDecryptedPrivateKey(null,{userId:t}),this.stateService.setPublicKey(null,{userId:t})];return e||n.push(this.stateService.setEncryptedPrivateKey(null,{userId:t})),Promise.all(n)}))}clearOrgKeys(e,t){return o(this,void 0,void 0,(function*(){yield this.stateService.setDecryptedOrganizationKeys(null,{userId:t}),e||(yield this.stateService.setEncryptedOrganizationKeys(null,{userId:t}))}))}clearProviderKeys(e,t){return o(this,void 0,void 0,(function*(){yield this.stateService.setDecryptedProviderKeys(null,{userId:t}),e||(yield this.stateService.setEncryptedProviderKeys(null,{userId:t}))}))}clearPinProtectedKey(e){return o(this,void 0,void 0,(function*(){return yield this.stateService.setEncryptedPinProtected(null,{userId:e})}))}clearKeys(e){return o(this,void 0,void 0,(function*(){yield this.clearKey(!0,e),yield this.clearKeyHash(e),yield this.clearOrgKeys(!1,e),yield this.clearProviderKeys(!1,e),yield this.clearEncKey(!1,e),yield this.clearKeyPair(!1,e),yield this.clearPinProtectedKey(e)}))}toggleKey(){return o(this,void 0,void 0,(function*(){const e=yield this.getKey();yield this.setKey(e)}))}makeKey(e,t,n,i){return o(this,void 0,void 0,(function*(){let r=null;if(null!=n&&n!==c.KdfType.PBKDF2_SHA256)throw new Error("Unknown Kdf.");if(null==i)i=5e3;else if(i<5e3)throw new Error("PBKDF2 iteration minimum is 5000.");return r=yield this.cryptoFunctionService.pbkdf2(e,t,"sha256",i),new g.SymmetricCryptoKey(r)}))}makeKeyFromPin(e,t,n,i,r=null){return o(this,void 0,void 0,(function*(){if(null==r){const e=yield this.stateService.getEncryptedPinProtected();if(null==e)throw new Error("No PIN protected key found.");r=new v.EncString(e)}const o=yield this.makePinKey(e,t,n,i),a=yield this.decryptToBytes(r,o);return new g.SymmetricCryptoKey(a)}))}makeShareKey(){return o(this,void 0,void 0,(function*(){const e=yield this.cryptoFunctionService.randomBytes(64),t=yield this.getPublicKey();return[yield this.rsaEncrypt(e,t),new g.SymmetricCryptoKey(e)]}))}makeKeyPair(e){return o(this,void 0,void 0,(function*(){const t=yield this.cryptoFunctionService.rsaGenerateKeyPair(2048);return[u.Utils.fromBufferToB64(t[0]),yield this.encrypt(t[1],e)]}))}makePinKey(e,t,n,i){return o(this,void 0,void 0,(function*(){const r=yield this.makeKey(e,t,n,i);return yield this.stretchKey(r)}))}makeSendKey(e){return o(this,void 0,void 0,(function*(){const t=yield this.cryptoFunctionService.hkdf(e,"bitwarden-send","send",64,"sha256");return new g.SymmetricCryptoKey(t)}))}hashPassword(e,t,n){return o(this,void 0,void 0,(function*(){if(null==t&&(t=yield this.getKey()),null==e||null==t)throw new Error("Invalid parameters.");const i=n===l.HashPurpose.LocalAuthorization?2:1,r=yield this.cryptoFunctionService.pbkdf2(t.key,e,"sha256",i);return u.Utils.fromBufferToB64(r)}))}makeEncKey(e){return o(this,void 0,void 0,(function*(){const t=yield this.getKeyForEncryption(e),n=yield this.cryptoFunctionService.randomBytes(64);return this.buildEncKey(t,n)}))}remakeEncKey(e,t){return o(this,void 0,void 0,(function*(){return null==t&&(t=yield this.getEncKey()),this.buildEncKey(e,t.key)}))}encrypt(e,t){return o(this,void 0,void 0,(function*(){if(null==e)return Promise.resolve(null);let n;n="string"==typeof e?u.Utils.fromUtf8ToArray(e).buffer:e;const i=yield this.aesEncrypt(n,t),r=u.Utils.fromBufferToB64(i.iv),o=u.Utils.fromBufferToB64(i.data),a=null!=i.mac?u.Utils.fromBufferToB64(i.mac):null;return new v.EncString(i.key.encType,o,r,a)}))}encryptToBytes(e,t){return o(this,void 0,void 0,(function*(){const n=yield this.aesEncrypt(e,t);let i=0;null!=n.mac&&(i=n.mac.byteLength);const r=new Uint8Array(1+n.iv.byteLength+i+n.data.byteLength);return r.set([n.key.encType]),r.set(new Uint8Array(n.iv),1),null!=n.mac&&r.set(new Uint8Array(n.mac),1+n.iv.byteLength),r.set(new Uint8Array(n.data),1+n.iv.byteLength+i),new h.EncArrayBuffer(r.buffer)}))}rsaEncrypt(e,t){return o(this,void 0,void 0,(function*(){if(null==t&&(t=yield this.getPublicKey()),null==t)throw new Error("Public key unavailable.");const n=yield this.cryptoFunctionService.rsaEncrypt(e,t,"sha1");return new v.EncString(s.EncryptionType.Rsa2048_OaepSha1_B64,u.Utils.fromBufferToB64(n))}))}rsaDecrypt(e,t){return o(this,void 0,void 0,(function*(){const n=e.split(".");let i,r=null;if(1===n.length)r=s.EncryptionType.Rsa2048_OaepSha256_B64,i=[n[0]];else if(2===n.length)try{r=parseInt(n[0],null),i=n[1].split("|")}catch(c){this.logService.error(c)}switch(r){case s.EncryptionType.Rsa2048_OaepSha256_B64:case s.EncryptionType.Rsa2048_OaepSha1_B64:case s.EncryptionType.Rsa2048_OaepSha256_HmacSha256_B64:case s.EncryptionType.Rsa2048_OaepSha1_HmacSha256_B64:break;default:throw new Error("encType unavailable.")}if(null==i||i.length<=0)throw new Error("encPieces unavailable.");const o=u.Utils.fromB64ToArray(i[0]).buffer,a=null!=t?t:yield this.getPrivateKey();if(null==a)throw new Error("No private key.");let l="sha1";switch(r){case s.EncryptionType.Rsa2048_OaepSha256_B64:case s.EncryptionType.Rsa2048_OaepSha256_HmacSha256_B64:l="sha256";break;case s.EncryptionType.Rsa2048_OaepSha1_B64:case s.EncryptionType.Rsa2048_OaepSha1_HmacSha256_B64:break;default:throw new Error("encType unavailable.")}return this.cryptoFunctionService.rsaDecrypt(o,a,l)}))}decryptToBytes(e,t){return o(this,void 0,void 0,(function*(){const n=u.Utils.fromB64ToArray(e.iv).buffer,i=u.Utils.fromB64ToArray(e.data).buffer,r=e.mac?u.Utils.fromB64ToArray(e.mac).buffer:null,o=yield this.aesDecryptToBytes(e.encryptionType,i,n,r,t);return null==o?null:o}))}decryptToUtf8(e,t){return o(this,void 0,void 0,(function*(){return yield this.aesDecryptToUtf8(e.encryptionType,e.data,e.iv,e.mac,t)}))}decryptFromBytes(e,t){return o(this,void 0,void 0,(function*(){if(null==e)throw new Error("no encBuf.");const n=new Uint8Array(e),i=n[0];let r=null,o=null,a=null;switch(i){case s.EncryptionType.AesCbc128_HmacSha256_B64:case s.EncryptionType.AesCbc256_HmacSha256_B64:if(n.length<=49)return null;o=n.slice(1,17),a=n.slice(17,49),r=n.slice(49);break;case s.EncryptionType.AesCbc256_B64:if(n.length<=17)return null;o=n.slice(1,17),r=n.slice(17);break;default:return null}return yield this.aesDecryptToBytes(i,r.buffer,o.buffer,null!=a?a.buffer:null,t)}))}randomNumber(e,t){return o(this,void 0,void 0,(function*(){let n=0;const i=t-e+1,r=Math.ceil(Math.log2(i));if(r>53)throw new Error("We cannot generate numbers larger than 53 bits.");const o=Math.ceil(r/8),a=Math.pow(2,r)-1,s=new Uint8Array(yield this.cryptoFunctionService.randomBytes(o));let l=8*(o-1);for(let e=0;e=i?this.randomNumber(e,t):e+n}))}validateKey(e){return o(this,void 0,void 0,(function*(){try{const t=yield this.stateService.getEncryptedPrivateKey(),n=yield this.getEncKeyHelper(e);if(null==t||null==n)return!1;const i=yield this.decryptToBytes(new v.EncString(t),n);yield this.cryptoFunctionService.rsaExtractPublicKey(i)}catch(t){return!1}return!0}))}storeKey(e,t){return o(this,void 0,void 0,(function*(){(yield this.shouldStoreKey(d.KeySuffixOptions.Auto,t))?yield this.stateService.setCryptoMasterKeyAuto(e.keyB64,{userId:t}):(yield this.shouldStoreKey(d.KeySuffixOptions.Biometric,t))?yield this.stateService.setCryptoMasterKeyBiometric(e.keyB64,{userId:t}):(yield this.stateService.setCryptoMasterKeyAuto(null,{userId:t}),yield this.stateService.setCryptoMasterKeyBiometric(null,{userId:t}))}))}shouldStoreKey(e,t){return o(this,void 0,void 0,(function*(){let n=!1;if(e===d.KeySuffixOptions.Auto){n=null==(yield this.stateService.getVaultTimeout({userId:t}))}else if(e===d.KeySuffixOptions.Biometric){n=(yield this.stateService.getBiometricUnlock({userId:t}))&&this.platformUtilService.supportsSecureStorage()}return n}))}retrieveKeyFromStorage(e,t){return o(this,void 0,void 0,(function*(){return e===d.KeySuffixOptions.Auto?yield this.stateService.getCryptoMasterKeyAuto({userId:t}):yield this.stateService.getCryptoMasterKeyBiometric({userId:t})}))}aesEncrypt(e,t){return o(this,void 0,void 0,(function*(){const n=new f.EncryptedObject;if(n.key=yield this.getKeyForEncryption(t),n.iv=yield this.cryptoFunctionService.randomBytes(16),n.data=yield this.cryptoFunctionService.aesEncrypt(e,n.iv,n.key.encKey),null!=n.key.macKey){const e=new Uint8Array(n.iv.byteLength+n.data.byteLength);e.set(new Uint8Array(n.iv),0),e.set(new Uint8Array(n.data),n.iv.byteLength),n.mac=yield this.cryptoFunctionService.hmac(e.buffer,n.key.macKey,"sha256")}return n}))}aesDecryptToUtf8(e,t,n,i,r){return o(this,void 0,void 0,(function*(){const o=yield this.getKeyForEncryption(r),a=yield this.resolveLegacyKey(e,o);if(null!=a.macKey&&null==i)return this.logService.error("mac required."),null;if(a.encType!==e)return this.logService.error("encType unavailable."),null;const s=this.cryptoFunctionService.aesDecryptFastParameters(t,n,i,a);if(null!=s.macKey&&null!=s.mac){const e=yield this.cryptoFunctionService.hmacFast(s.macData,s.macKey,"sha256");if(!(yield this.cryptoFunctionService.compareFast(s.mac,e)))return this.logService.error("mac failed."),null}return this.cryptoFunctionService.aesDecryptFast(s)}))}aesDecryptToBytes(e,t,n,i,r){return o(this,void 0,void 0,(function*(){const o=yield this.getKeyForEncryption(r),a=yield this.resolveLegacyKey(e,o);if(null!=a.macKey&&null==i)return null;if(a.encType!==e)return null;if(null!=a.macKey&&null!=i){const e=new Uint8Array(n.byteLength+t.byteLength);e.set(new Uint8Array(n),0),e.set(new Uint8Array(t),n.byteLength);const r=yield this.cryptoFunctionService.hmac(e.buffer,a.macKey,"sha256");if(null===r)return null;if(!(yield this.cryptoFunctionService.compare(i,r)))return this.logService.error("mac failed."),null}return yield this.cryptoFunctionService.aesDecrypt(t,n,a.encKey)}))}getKeyForEncryption(e){return o(this,void 0,void 0,(function*(){if(null!=e)return e;const t=yield this.getEncKey();return null!=t?t:yield this.getKey()}))}resolveLegacyKey(e,t){return o(this,void 0,void 0,(function*(){if(e===s.EncryptionType.AesCbc128_HmacSha256_B64&&t.encType===s.EncryptionType.AesCbc256_B64){let e=yield this.stateService.getLegacyEtmKey();return null==e&&(e=new g.SymmetricCryptoKey(t.key,s.EncryptionType.AesCbc128_HmacSha256_B64),yield this.stateService.setLegacyEtmKey(e)),e}return t}))}stretchKey(e){return o(this,void 0,void 0,(function*(){const t=new Uint8Array(64),n=yield this.cryptoFunctionService.hkdfExpand(e.key,"enc",32,"sha256"),i=yield this.cryptoFunctionService.hkdfExpand(e.key,"mac",32,"sha256");return t.set(new Uint8Array(n)),t.set(new Uint8Array(i),32),new g.SymmetricCryptoKey(t.buffer)}))}hashPhrase(e,t=64){return o(this,void 0,void 0,(function*(){const n=Math.log(m.EEFLongWordList.length)/Math.log(2);let i=Math.ceil(t/n);const r=Array.from(new Uint8Array(e));if(i*n>4*r.length)throw new Error("Output entropy of hash function is too small");const o=[];let s=a.fromArray(r,256);for(;i--;){const e=s.mod(m.EEFLongWordList.length);s=s.divide(m.EEFLongWordList.length),o.push(m.EEFLongWordList[e])}return o}))}buildEncKey(e,t){return o(this,void 0,void 0,(function*(){let n=null;if(32===e.key.byteLength){const i=yield this.stretchKey(e);n=yield this.encrypt(t,i)}else{if(64!==e.key.byteLength)throw new Error("Invalid key size.");n=yield this.encrypt(t,e)}return[new g.SymmetricCryptoKey(t),n]}))}clearSecretKeyStore(e){return o(this,void 0,void 0,(function*(){yield this.stateService.setCryptoMasterKeyAuto(null,{userId:e}),yield this.stateService.setCryptoMasterKeyBiometric(null,{userId:e})}))}getEncKeyHelper(e=null){return o(this,void 0,void 0,(function*(){const t=yield this.stateService.getDecryptedCryptoSymmetricKey();if(null!=t)return t;const n=yield this.stateService.getEncryptedCryptoSymmetricKey();if(null==n)return null;if(null==e&&(e=yield this.getKey()),null==e)return null;let i;const r=new v.EncString(n);if(r.encryptionType===s.EncryptionType.AesCbc256_B64)i=yield this.decryptToBytes(r,e);else{if(r.encryptionType!==s.EncryptionType.AesCbc256_HmacSha256_B64)throw new Error("Unsupported encKey type.");{const t=yield this.stretchKey(e);i=yield this.decryptToBytes(r,t)}}if(null==i)return null;const o=new g.SymmetricCryptoKey(i);return yield this.stateService.setDecryptedCryptoSymmetricKey(o),o}))}}i([p.sequentialize((()=>"getEncKey")),r("design:type",Function),r("design:paramtypes",[g.SymmetricCryptoKey]),r("design:returntype",Promise)],y.prototype,"getEncKey",null),i([p.sequentialize((()=>"getOrgKeys")),r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",Promise)],y.prototype,"getOrgKeys",null),i([p.sequentialize((()=>"getProviderKeys")),r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",Promise)],y.prototype,"getProviderKeys",null),t.CryptoService=y},86683:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EnvironmentService=void 0;const r=n(72872),o=n(91185);t.EnvironmentService=class{constructor(e){this.stateService=e,this.urlsSubject=new r.Subject,this.urls=this.urlsSubject,this.stateService.activeAccount.subscribe((()=>i(this,void 0,void 0,(function*(){yield this.setUrlsFromStorage()}))))}hasBaseUrl(){return null!=this.baseUrl}getNotificationsUrl(){return null!=this.notificationsUrl?this.notificationsUrl:null!=this.baseUrl?this.baseUrl+"/notifications":"https://notifications.bitwarden.com"}getWebVaultUrl(){return null!=this.webVaultUrl?this.webVaultUrl:this.baseUrl?this.baseUrl:"https://vault.bitwarden.com"}getSendUrl(){return"https://vault.bitwarden.com"===this.getWebVaultUrl()?"https://send.bitwarden.com/#":this.getWebVaultUrl()+"/#/send/"}getIconsUrl(){return null!=this.iconsUrl?this.iconsUrl:this.baseUrl?this.baseUrl+"/icons":"https://icons.bitwarden.net"}getApiUrl(){return null!=this.apiUrl?this.apiUrl:this.baseUrl?this.baseUrl+"/api":"https://api.bitwarden.com"}getIdentityUrl(){return null!=this.identityUrl?this.identityUrl:this.baseUrl?this.baseUrl+"/identity":"https://identity.bitwarden.com"}getEventsUrl(){return null!=this.eventsUrl?this.eventsUrl:this.baseUrl?this.baseUrl+"/events":"https://events.bitwarden.com"}getKeyConnectorUrl(){return this.keyConnectorUrl}setUrlsFromStorage(){return i(this,void 0,void 0,(function*(){const e=yield this.stateService.getEnvironmentUrls(),t=new o.EnvironmentUrls;this.baseUrl=t.base=e.base,this.webVaultUrl=e.webVault,this.apiUrl=t.api=e.api,this.identityUrl=t.identity=e.identity,this.iconsUrl=e.icons,this.notificationsUrl=e.notifications,this.eventsUrl=t.events=e.events,this.keyConnectorUrl=e.keyConnector}))}setUrls(e){return i(this,void 0,void 0,(function*(){return e.base=this.formatUrl(e.base),e.webVault=this.formatUrl(e.webVault),e.api=this.formatUrl(e.api),e.identity=this.formatUrl(e.identity),e.icons=this.formatUrl(e.icons),e.notifications=this.formatUrl(e.notifications),e.events=this.formatUrl(e.events),e.keyConnector=this.formatUrl(e.keyConnector),yield this.stateService.setEnvironmentUrls({base:e.base,api:e.api,identity:e.identity,webVault:e.webVault,icons:e.icons,notifications:e.notifications,events:e.events,keyConnector:e.keyConnector}),this.baseUrl=e.base,this.webVaultUrl=e.webVault,this.apiUrl=e.api,this.identityUrl=e.identity,this.iconsUrl=e.icons,this.notificationsUrl=e.notifications,this.eventsUrl=e.events,this.keyConnectorUrl=e.keyConnector,this.urlsSubject.next(e),e}))}getUrls(){return{base:this.baseUrl,webVault:this.webVaultUrl,api:this.apiUrl,identity:this.identityUrl,icons:this.iconsUrl,notifications:this.notificationsUrl,events:this.eventsUrl,keyConnector:this.keyConnectorUrl}}formatUrl(e){return null==e||""===e?null:((e=e.replace(/\/+$/g,"")).startsWith("http://")||e.startsWith("https://")||(e="https://"+e),e.trim())}}},14215:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EventService=void 0;const r=n(93053),o=n(20604);t.EventService=class{constructor(e,t,n,i,r){this.apiService=e,this.cipherService=t,this.stateService=n,this.logService=i,this.organizationService=r,this.inited=!1}init(e){this.inited||(this.inited=!0,e&&(this.uploadEvents(),setInterval((()=>this.uploadEvents()),6e4)))}collect(e,t=null,n=!1){return i(this,void 0,void 0,(function*(){if(!(yield this.stateService.getIsAuthenticated()))return;const i=yield this.organizationService.getAll();if(null==i)return;const o=new Set(i.filter((e=>e.useEvents)).map((e=>e.id)));if(0===o.size)return;if(null!=t){const e=yield this.cipherService.get(t);if(null==e||null==e.organizationId||!o.has(e.organizationId))return}let a=yield this.stateService.getEventCollection();null==a&&(a=[]);const s=new r.EventData;s.type=e,s.cipherId=t,s.date=(new Date).toISOString(),a.push(s),yield this.stateService.setEventCollection(a),n&&(yield this.uploadEvents())}))}uploadEvents(e){return i(this,void 0,void 0,(function*(){if(!(yield this.stateService.getIsAuthenticated({userId:e})))return;const t=yield this.stateService.getEventCollection({userId:e});if(null==t||0===t.length)return;const n=t.map((e=>{const t=new o.EventRequest;return t.type=e.type,t.cipherId=e.cipherId,t.date=e.date,t}));try{yield this.apiService.postEventsCollect(n),this.clearEvents(e)}catch(i){this.logService.error(i)}}))}clearEvents(e){return i(this,void 0,void 0,(function*(){yield this.stateService.setEventCollection(null,{userId:e})}))}}},48698:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ExportService=void 0;const r=n(57460),o=n(32773),a=n(20971),s=n(82769),l=n(82789),c=n(34917),d=n(49624),p=n(65642),u=n(83460),m=n(5136),h=n(42587),v=n(31087);t.ExportService=class{constructor(e,t,n,i,r){this.folderService=e,this.cipherService=t,this.apiService=n,this.cryptoService=i,this.cryptoFunctionService=r}getExport(e="csv",t){return i(this,void 0,void 0,(function*(){return t?yield this.getOrganizationExport(t,e):"encrypted_json"===e?this.getEncryptedExport():this.getDecryptedExport(e)}))}getPasswordProtectedExport(e,t){return i(this,void 0,void 0,(function*(){const n=t?yield this.getOrganizationExport(t,"json"):yield this.getExport("json"),i=s.Utils.fromBufferToB64(yield this.cryptoFunctionService.randomBytes(16)),r=a.DEFAULT_KDF_ITERATIONS,o=yield this.cryptoService.makePinKey(e,i,a.KdfType.PBKDF2_SHA256,r),l=yield this.cryptoService.encrypt(s.Utils.newGuid(),o),c=yield this.cryptoService.encrypt(n,o),d={encrypted:!0,passwordProtected:!0,salt:i,kdfIterations:r,kdfType:a.KdfType.PBKDF2_SHA256,encKeyValidation_DO_NOT_EDIT:l.encryptedString,data:c.encryptedString};return JSON.stringify(d,null," ")}))}getOrganizationExport(e,t="csv"){return i(this,void 0,void 0,(function*(){return"encrypted_json"===t?this.getOrganizationEncryptedExport(e):this.getOrganizationDecryptedExport(e,t)}))}getEventExport(e){return i(this,void 0,void 0,(function*(){return r.unparse(e.map((e=>new h.EventExport(e))))}))}getFileName(e=null,t="csv"){const n=new Date;return"bitwarden"+(e?"_"+e:"")+"_export_"+(n.getFullYear()+""+this.padNumber(n.getMonth()+1,2)+this.padNumber(n.getDate(),2)+this.padNumber(n.getHours(),2)+this.padNumber(n.getMinutes(),2)+this.padNumber(n.getSeconds(),2))+"."+t}getDecryptedExport(e){return i(this,void 0,void 0,(function*(){let t=[],n=[];const i=[];if(i.push(this.folderService.getAllDecrypted().then((e=>{t=e}))),i.push(this.cipherService.getAllDecrypted().then((e=>{n=e.filter((e=>null==e.deletedDate))}))),yield Promise.all(i),"csv"===e){const e=new Map;t.forEach((t=>{null!=t.id&&e.set(t.id,t)}));const i=[];return n.forEach((t=>{if(t.type!==o.CipherType.Login&&t.type!==o.CipherType.SecureNote)return;if(null!=t.organizationId)return;const n={};n.folder=null!=t.folderId&&e.has(t.folderId)?e.get(t.folderId).name:null,n.favorite=t.favorite?1:null,this.buildCommonCipher(n,t),i.push(n)})),r.unparse(i)}{const e={encrypted:!1,folders:[],items:[]};return t.forEach((t=>{if(null==t.id)return;const n=new v.FolderWithIdExport;n.build(t),e.folders.push(n)})),n.forEach((t=>{if(null!=t.organizationId)return;const n=new u.CipherWithIdExport;n.build(t),n.collectionIds=null,e.items.push(n)})),JSON.stringify(e,null," ")}}))}getEncryptedExport(){return i(this,void 0,void 0,(function*(){let e=[],t=[];const n=[];n.push(this.folderService.getAll().then((t=>{e=t}))),n.push(this.cipherService.getAll().then((e=>{t=e.filter((e=>null==e.deletedDate))}))),yield Promise.all(n);const i={encrypted:!0,encKeyValidation_DO_NOT_EDIT:(yield this.cryptoService.encrypt(s.Utils.newGuid())).encryptedString,folders:[],items:[]};return e.forEach((e=>{if(null==e.id)return;const t=new v.FolderWithIdExport;t.build(e),i.folders.push(t)})),t.forEach((e=>{if(null!=e.organizationId)return;const t=new u.CipherWithIdExport;t.build(e),t.collectionIds=null,i.items.push(t)})),JSON.stringify(i,null," ")}))}getOrganizationDecryptedExport(e,t){return i(this,void 0,void 0,(function*(){const n=[],i=[],a=[];if(a.push(this.apiService.getCollections(e).then((e=>{const t=[];return null!=e&&null!=e.data&&e.data.length>0&&e.data.forEach((e=>{const i=new p.Collection(new c.CollectionData(e));t.push(i.decrypt().then((e=>{n.push(e)})))})),Promise.all(t)}))),a.push(this.apiService.getCiphersOrganization(e).then((e=>{const t=[];return null!=e&&null!=e.data&&e.data.length>0&&e.data.filter((e=>null===e.deletedDate)).forEach((e=>{const n=new d.Cipher(new l.CipherData(e));t.push(n.decrypt().then((e=>{i.push(e)})))})),Promise.all(t)}))),yield Promise.all(a),"csv"===t){const e=new Map;n.forEach((t=>{e.set(t.id,t)}));const t=[];return i.forEach((n=>{if(n.type!==o.CipherType.Login&&n.type!==o.CipherType.SecureNote)return;const i={collections:[]};null!=n.collectionIds&&(i.collections=n.collectionIds.filter((t=>e.has(t))).map((t=>e.get(t).name))),this.buildCommonCipher(i,n),t.push(i)})),r.unparse(t)}{const e={encrypted:!1,collections:[],items:[]};return n.forEach((t=>{const n=new m.CollectionWithIdExport;n.build(t),e.collections.push(n)})),i.forEach((t=>{const n=new u.CipherWithIdExport;n.build(t),e.items.push(n)})),JSON.stringify(e,null," ")}}))}getOrganizationEncryptedExport(e){return i(this,void 0,void 0,(function*(){const t=[],n=[],i=[];i.push(this.apiService.getCollections(e).then((e=>(null!=e&&null!=e.data&&e.data.length>0&&e.data.forEach((e=>{const n=new p.Collection(new c.CollectionData(e));t.push(n)})),Promise.all([]))))),i.push(this.apiService.getCiphersOrganization(e).then((e=>(null!=e&&null!=e.data&&e.data.length>0&&e.data.filter((e=>null===e.deletedDate)).forEach((e=>{const t=new d.Cipher(new l.CipherData(e));n.push(t)})),Promise.all([]))))),yield Promise.all(i);const r=yield this.cryptoService.getOrgKey(e),o={encrypted:!0,encKeyValidation_DO_NOT_EDIT:(yield this.cryptoService.encrypt(s.Utils.newGuid(),r)).encryptedString,collections:[],items:[]};return t.forEach((e=>{const t=new m.CollectionWithIdExport;t.build(e),o.collections.push(t)})),n.forEach((e=>{const t=new u.CipherWithIdExport;t.build(e),o.items.push(t)})),JSON.stringify(o,null," ")}))}padNumber(e,t,n="0"){const i=e.toString();return i.length>=t?i:new Array(t-i.length+1).join(n)+i}buildCommonCipher(e,t){switch(e.type=null,e.name=t.name,e.notes=t.notes,e.fields=null,e.reprompt=t.reprompt,e.login_uri=null,e.login_username=null,e.login_password=null,e.login_totp=null,t.fields&&t.fields.forEach((t=>{e.fields?e.fields+="\n":e.fields="",e.fields+=(t.name||"")+": "+t.value})),t.type){case o.CipherType.Login:e.type="login",e.login_username=t.login.username,e.login_password=t.login.password,e.login_totp=t.login.totp,t.login.uris&&(e.login_uri=[],t.login.uris.forEach((t=>{e.login_uri.push(t.uri)})));break;case o.CipherType.SecureNote:e.type="note";break;default:return}return e}}},1803:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.FileUploadService=void 0;const r=n(25423),o=n(71545),a=n(29911);t.FileUploadService=class{constructor(e,t){this.logService=e,this.apiService=t,this.azureFileUploadService=new o.AzureFileUploadService(e),this.bitwardenFileUploadService=new a.BitwardenFileUploadService(t)}uploadSendFile(e,t,n){return i(this,void 0,void 0,(function*(){try{switch(e.fileUploadType){case r.FileUploadType.Direct:yield this.bitwardenFileUploadService.upload(t.encryptedString,n,(t=>this.apiService.postSendFile(e.sendResponse.id,e.sendResponse.file.id,t)));break;case r.FileUploadType.Azure:{const t=()=>i(this,void 0,void 0,(function*(){return(yield this.apiService.renewSendFileUploadUrl(e.sendResponse.id,e.sendResponse.file.id)).url}));yield this.azureFileUploadService.upload(e.url,n,t);break}default:throw new Error("Unknown file upload type")}}catch(o){throw yield this.apiService.deleteSend(e.sendResponse.id),o}}))}uploadCipherAttachment(e,t,n,o){return i(this,void 0,void 0,(function*(){const a=e?t.cipherMiniResponse:t.cipherResponse;try{switch(t.fileUploadType){case r.FileUploadType.Direct:yield this.bitwardenFileUploadService.upload(n.encryptedString,o,(e=>this.apiService.postAttachmentFile(a.id,t.attachmentId,e)));break;case r.FileUploadType.Azure:{const e=()=>i(this,void 0,void 0,(function*(){return(yield this.apiService.renewAttachmentUploadUrl(a.id,t.attachmentId)).url}));yield this.azureFileUploadService.upload(t.url,o,e);break}default:throw new Error("Unknown file upload type.")}}catch(s){throw e?yield this.apiService.deleteCipherAttachmentAdmin(a.id,t.attachmentId):yield this.apiService.deleteCipherAttachment(a.id,t.attachmentId),s}}))}}},66369:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.FolderService=void 0;const r=n(39814),o=n(82769),a=n(12835),s=n(59738),l=n(16466),c=n(36914);t.FolderService=class{constructor(e,t,n,i,r){this.cryptoService=e,this.apiService=t,this.i18nService=n,this.cipherService=i,this.stateService=r}clearCache(e){return i(this,void 0,void 0,(function*(){yield this.stateService.setDecryptedFolders(null,{userId:e})}))}encrypt(e,t){return i(this,void 0,void 0,(function*(){const n=new s.Folder;return n.id=e.id,n.name=yield this.cryptoService.encrypt(e.name,t),n}))}get(e){return i(this,void 0,void 0,(function*(){const t=yield this.stateService.getEncryptedFolders();return null!=t&&t.hasOwnProperty(e)?new s.Folder(t[e]):null}))}getAll(){return i(this,void 0,void 0,(function*(){const e=yield this.stateService.getEncryptedFolders(),t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(new s.Folder(e[n]));return t}))}getAllDecrypted(){return i(this,void 0,void 0,(function*(){const e=yield this.stateService.getDecryptedFolders();if(null!=e)return e;if(!(yield this.cryptoService.hasKey()))throw new Error("No key.");const t=[],n=[];(yield this.getAll()).forEach((e=>{n.push(e.decrypt().then((e=>t.push(e))))})),yield Promise.all(n),t.sort(o.Utils.getSortFunction(this.i18nService,"name"));const i=new c.FolderView;return i.name=this.i18nService.t("noneFolder"),t.push(i),yield this.stateService.setDecryptedFolders(t),t}))}getAllNested(e){return i(this,void 0,void 0,(function*(){e=null!=e?e:yield this.getAllDecrypted();const t=[];return e.forEach((e=>{const n=new c.FolderView;n.id=e.id,n.revisionDate=e.revisionDate;const i=null!=e.name?e.name.replace(/^\/+|\/+$/g,"").split("/"):[];r.ServiceUtils.nestedTraverse(t,0,i,n,null,"/")})),t}))}getNested(e){return i(this,void 0,void 0,(function*(){const t=yield this.getAllNested();return r.ServiceUtils.getTreeNodeObject(t,e)}))}saveWithServer(e){return i(this,void 0,void 0,(function*(){const t=new l.FolderRequest(e);let n;null==e.id?(n=yield this.apiService.postFolder(t),e.id=n.id):n=yield this.apiService.putFolder(e.id,t);const i=new a.FolderData(n);yield this.upsert(i)}))}upsert(e){return i(this,void 0,void 0,(function*(){let t=yield this.stateService.getEncryptedFolders();if(null==t&&(t={}),e instanceof a.FolderData){const n=e;t[n.id]=n}else e.forEach((e=>{t[e.id]=e}));yield this.stateService.setDecryptedFolders(null),yield this.stateService.setEncryptedFolders(t)}))}replace(e){return i(this,void 0,void 0,(function*(){yield this.stateService.setDecryptedFolders(null),yield this.stateService.setEncryptedFolders(e)}))}clear(e){return i(this,void 0,void 0,(function*(){yield this.stateService.setDecryptedFolders(null,{userId:e}),yield this.stateService.setEncryptedFolders(null,{userId:e})}))}delete(e){return i(this,void 0,void 0,(function*(){const t=yield this.stateService.getEncryptedFolders();if(null==t)return;if("string"==typeof e){if(null==t[e])return;delete t[e]}else e.forEach((e=>{delete t[e]}));yield this.stateService.setDecryptedFolders(null),yield this.stateService.setEncryptedFolders(t);const n=yield this.stateService.getEncryptedCiphers();if(null!=n){const t=[];for(const i in n)n[i].folderId===e&&(n[i].folderId=null,t.push(n[i]));t.length>0&&this.cipherService.upsert(t)}}))}deleteWithServer(e){return i(this,void 0,void 0,(function*(){yield this.apiService.deleteFolder(e),yield this.delete(e)}))}}},17578:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.I18nService=void 0;t.I18nService=class{constructor(e,t,n){this.systemLanguage=e,this.localesDirectory=t,this.getLocalesJson=n,this.supportedTranslationLocales=["en"],this.localeNames=new Map([["af","Afrikaans"],["az","Azərbaycanca"],["be","Беларуская"],["bg","български"],["bn","বাংলা"],["bs","bosanski jezik"],["ca","català"],["cs","čeština"],["da","dansk"],["de","Deutsch"],["el","Ελληνικά"],["en","English"],["en-GB","English (British)"],["en-IN","English (India)"],["eo","Esperanto"],["es","español"],["et","eesti"],["fa","فارسی"],["fi","suomi"],["fil","Wikang Filipino"],["fr","français"],["he","עברית"],["hi","हिन्दी"],["hr","hrvatski"],["hu","magyar"],["id","Bahasa Indonesia"],["it","italiano"],["ja","日本語"],["ka","ქართული"],["km","ខ្មែរ, ខេមរភាសា, ភាសាខ្មែរ"],["kn","ಕನ್ನಡ"],["ko","한국어"],["lt","lietuvių kalba"],["lv","Latvietis"],["me","црногорски"],["ml","മലയാളം"],["nb","norsk (bokmål)"],["nl","Nederlands"],["nn","Norsk Nynorsk"],["pl","polski"],["pt-BR","português do Brasil"],["pt-PT","português"],["ro","română"],["ru","русский"],["si","සිංහල"],["sk","slovenčina"],["sl","Slovenski jezik, Slovenščina"],["sr","Српски"],["sv","svenska"],["th","ไทย"],["tr","Türkçe"],["uk","українська"],["vi","Tiếng Việt"],["zh-CN","中文(中国大陆)"],["zh-TW","中文(台灣)"]]),this.defaultMessages={},this.localeMessages={},this.systemLanguage=e.replace("_","-")}init(e){return n(this,void 0,void 0,(function*(){if(this.inited)throw new Error("i18n already initialized.");if(null==this.supportedTranslationLocales||0===this.supportedTranslationLocales.length)throw new Error("supportedTranslationLocales not set.");this.inited=!0,this.locale=this.translationLocale=null!=e?e:this.systemLanguage;try{this.collator=new Intl.Collator(this.locale,{numeric:!0,sensitivity:"base"})}catch(t){this.collator=null}-1===this.supportedTranslationLocales.indexOf(this.translationLocale)&&(this.translationLocale=this.translationLocale.slice(0,2),-1===this.supportedTranslationLocales.indexOf(this.translationLocale)&&(this.translationLocale=this.supportedTranslationLocales[0])),null!=this.localesDirectory&&(yield this.loadMessages(this.translationLocale,this.localeMessages),this.translationLocale!==this.supportedTranslationLocales[0]&&(yield this.loadMessages(this.supportedTranslationLocales[0],this.defaultMessages)))}))}t(e,t,n,i){return this.translate(e,t,n,i)}translate(e,t,n,i){let r;return r=this.localeMessages.hasOwnProperty(e)&&this.localeMessages[e]?this.localeMessages[e]:this.defaultMessages.hasOwnProperty(e)&&this.defaultMessages[e]?this.defaultMessages[e]:"",""!==r&&(null!=t&&(r=r.split("__$1__").join(t)),null!=n&&(r=r.split("__$2__").join(n)),null!=i&&(r=r.split("__$3__").join(i))),r}loadMessages(e,t){return n(this,void 0,void 0,(function*(){const n=e.replace("-","_"),i=yield this.getLocalesJson(n);for(const e in i)if(i.hasOwnProperty(e)&&(t[e]=i[e].message,i[e].placeholders))for(const n in i[e].placeholders){if(!i[e].placeholders.hasOwnProperty(n)||!i[e].placeholders[n].content)continue;const r="\\$"+n.toUpperCase()+"\\$";let o=i[e].placeholders[n].content;"$1"!==o&&"$2"!==o&&"$3"!==o||(o="__$"+o+"__"),t[e]=t[e].replace(new RegExp(r,"g"),o)}}))}}},12514:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ImportService=void 0;const r=n(32773),o=n(55766),a=n(51214),s=n(60006),l=n(14494),c=n(51272),d=n(25690),p=n(10614),u=n(20312),m=n(19326),h=n(68360),v=n(33268),f=n(58141),g=n(86025),y=n(42752),x=n(99552),S=n(31188),b=n(42578),w=n(41933),C=n(84783),I=n(62709),E=n(47340),P=n(72378),O=n(89696),k=n(16164),A=n(86419),T=n(68781),M=n(64521),B=n(57763),D=n(78103),R=n(52580),F=n(39510),U=n(64101),V=n(82530),N=n(80414),_=n(42584),j=n(55529),z=n(88755),H=n(60784),L=n(477),K=n(91350),q=n(79506),G=n(29990),W=n(84972),$=n(65588),Y=n(45970),Q=n(54706),J=n(43897),Z=n(91645),X=n(72739),ee=n(29406),te=n(64817),ne=n(70402),ie=n(89757),re=n(1254),oe=n(74962),ae=n(86220),se=n(6884),le=n(8170),ce=n(82769),de=n(16391),pe=n(54554),ue=n(16466),me=n(89537),he=n(85644),ve=n(58795),fe=n(33018);t.ImportService=class{constructor(e,t,n,i,r,a,s){this.cipherService=e,this.folderService=t,this.apiService=n,this.i18nService=i,this.collectionService=r,this.platformUtilsService=a,this.cryptoService=s,this.featuredImportOptions=o.featuredImportOptions,this.regularImportOptions=o.regularImportOptions}getImportOptions(){return this.featuredImportOptions.concat(this.regularImportOptions)}import(e,t,n=null){return i(this,void 0,void 0,(function*(){const i=yield e.parse(t);if(i.success){if(0===i.folders.length&&0===i.ciphers.length)return new O.ImportError(this.i18nService.t("importNothingError"));if(i.ciphers.length>0){const e=Math.floor(i.ciphers.length/2),t=i.ciphers.length-1;if(this.badData(i.ciphers[0])&&this.badData(i.ciphers[e])&&this.badData(i.ciphers[t]))return new O.ImportError(this.i18nService.t("importFormatError"))}try{yield this.postImport(i,n)}catch(r){const e=new fe.ErrorResponse(r,400);return this.handleServerError(e,i)}return null}return ce.Utils.isNullOrWhitespace(i.errorMessage)?new O.ImportError(this.i18nService.t("importFormatError"),i.missingPassword):new O.ImportError(i.errorMessage,i.missingPassword)}))}getImporter(e,t=null,n=null){const i=this.getImporterInstance(e,n);return null==i?null:(i.organizationId=t,i)}getImporterInstance(e,t){if(null==e)return null;switch(e){case"bitwardencsv":return new d.BitwardenCsvImporter;case"bitwardenjson":return new p.BitwardenJsonImporter(this.cryptoService,this.i18nService);case"bitwardenpasswordprotected":return new u.BitwardenPasswordProtectedImporter(this.cryptoService,this.i18nService,t);case"lastpasscsv":case"passboltcsv":return new B.LastPassCsvImporter;case"keepassxcsv":return new T.KeePassXCsvImporter;case"aviracsv":return new c.AviraCsvImporter;case"blurcsv":return new h.BlurCsvImporter;case"safeincloudxml":return new ee.SafeInCloudXmlImporter;case"padlockcsv":return new H.PadlockCsvImporter;case"keepass2xml":return new A.KeePass2XmlImporter;case"chromecsv":case"operacsv":case"vivaldicsv":return new f.ChromeCsvImporter;case"firefoxcsv":return new I.FirefoxCsvImporter;case"upmcsv":return new ae.UpmCsvImporter;case"saferpasscsv":return new te.SaferPassCsvImporter;case"safaricsv":return new X.SafariCsvImporter;case"meldiumcsv":return new R.MeldiumCsvImporter;case"1password1pif":return new N.OnePassword1PifImporter;case"1password1pux":return new _.OnePassword1PuxImporter;case"1passwordwincsv":return new z.OnePasswordWinCsvImporter;case"1passwordmaccsv":return new j.OnePasswordMacCsvImporter;case"keepercsv":return new M.KeeperCsvImporter;case"passworddragonxml":return new $.PasswordDragonXmlImporter;case"enpasscsv":return new w.EnpassCsvImporter;case"enpassjson":return new C.EnpassJsonImporter;case"pwsafexml":return new Y.PasswordSafeXmlImporter;case"dashlanecsv":return new x.DashlaneCsvImporter;case"dashlanejson":return new S.DashlaneJsonImporter;case"msecurecsv":return new F.MSecureCsvImporter;case"stickypasswordxml":return new re.StickyPasswordXmlImporter;case"truekeycsv":return new oe.TrueKeyCsvImporter;case"clipperzhtml":return new g.ClipperzHtmlImporter;case"roboformcsv":return new Z.RoboFormCsvImporter;case"ascendocsv":return new a.AscendoCsvImporter;case"passwordbossjson":return new W.PasswordBossJsonImporter;case"zohovaultcsv":return new le.ZohoVaultCsvImporter;case"splashidcsv":return new ie.SplashIdCsvImporter;case"passkeepcsv":return new L.PassKeepCsvImporter;case"gnomejson":return new P.GnomeJsonImporter;case"passwordagentcsv":return new G.PasswordAgentCsvImporter;case"passpackcsv":return new q.PasspackCsvImporter;case"passmanjson":return new K.PassmanJsonImporter;case"avastcsv":return new s.AvastCsvImporter;case"avastjson":return new l.AvastJsonImporter;case"fsecurefsk":return new E.FSecureFskImporter;case"kasperskytxt":return new k.KasperskyTxtImporter;case"remembearcsv":return new J.RememBearCsvImporter;case"passwordwallettxt":return new Q.PasswordWalletTxtImporter;case"mykicsv":return new U.MykiCsvImporter;case"securesafecsv":return new ne.SecureSafeCsvImporter;case"logmeoncecsv":return new D.LogMeOnceCsvImporter;case"blackberrycsv":return new m.BlackBerryCsvImporter;case"buttercupcsv":return new v.ButtercupCsvImporter;case"codebookcsv":return new y.CodebookCsvImporter;case"encryptrcsv":return new b.EncryptrCsvImporter;case"yoticsv":return new se.YotiCsvImporter;case"nordpasscsv":return new V.NordPassCsvImporter;default:return null}}postImport(e,t=null){return i(this,void 0,void 0,(function*(){if(null==t){const t=new me.ImportCiphersRequest;for(let n=0;nt.folderRelationships.push(new ve.KvpRequest(e[0],e[1])))),yield this.apiService.postImportCiphers(t)}{const n=new he.ImportOrganizationCiphersRequest;for(let i=0;in.collectionRelationships.push(new ve.KvpRequest(e[0],e[1])))),yield this.apiService.postImportOrganizationCiphers(t,n)}}))}badData(e){return(null==e.name||"--"===e.name)&&e.type===r.CipherType.Login&&null!=e.login&&ce.Utils.isNullOrWhitespace(e.login.password)}handleServerError(e,t){if(null==e.validationErrors)return new O.ImportError(e.message);let n="";return Object.entries(e.validationErrors).forEach((([e,i],o)=>{let a,s;const l=Number(e.match(/[0-9]+/)[0]);switch(e.match(/^\w+/)[0]){case"Ciphers":a=t.ciphers[l],s=r.CipherType[a.type];break;case"Folders":a=t.folders[l],s="Folder";break;case"Collections":a=t.collections[l],s="Collection";break;default:return}o>0&&(n+="\n\n"),"Folder"!==s&&"Collection"!==s&&(n+="["+(l+1)+"] "),n+="["+s+'] "'+a.name+'": '+i})),new O.ImportError(n)}}},32840:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.KeyConnectorService=void 0;const r=n(33712),o=n(82769),a=n(69731),s=n(50738),l=n(35711),c=n(74284);t.KeyConnectorService=class{constructor(e,t,n,i,r,o,a,s){this.stateService=e,this.cryptoService=t,this.apiService=n,this.tokenService=i,this.logService=r,this.organizationService=o,this.cryptoFunctionService=a,this.logoutCallback=s}setUsesKeyConnector(e){return this.stateService.setUsesKeyConnector(e)}getUsesKeyConnector(){return i(this,void 0,void 0,(function*(){return yield this.stateService.getUsesKeyConnector()}))}userNeedsMigration(){return i(this,void 0,void 0,(function*(){const e=yield this.tokenService.getIsExternal(),t=null!=(yield this.getManagingOrganization()),n=!(yield this.getUsesKeyConnector());return e&&t&&n}))}migrateUser(){return i(this,void 0,void 0,(function*(){const e=yield this.getManagingOrganization(),t=yield this.cryptoService.getKey(),n=new l.KeyConnectorUserKeyRequest(t.encKeyB64);try{yield this.apiService.postUserKeyToKeyConnector(e.keyConnectorUrl,n)}catch(i){this.handleKeyConnectorError(i)}yield this.apiService.postConvertToKeyConnector()}))}getAndSetKey(e){return i(this,void 0,void 0,(function*(){try{const t=yield this.apiService.getUserKeyFromKeyConnector(e),n=o.Utils.fromB64ToArray(t.key),i=new a.SymmetricCryptoKey(n);yield this.cryptoService.setKey(i)}catch(t){this.handleKeyConnectorError(t)}}))}getManagingOrganization(){return i(this,void 0,void 0,(function*(){return(yield this.organizationService.getAll()).find((e=>e.keyConnectorEnabled&&e.type!==r.OrganizationUserType.Admin&&e.type!==r.OrganizationUserType.Owner&&!e.isProviderUser))}))}convertNewSsoUserToKeyConnector(e,t){return i(this,void 0,void 0,(function*(){const{kdf:n,kdfIterations:i,keyConnectorUrl:r}=e,a=yield this.cryptoFunctionService.randomBytes(64),d=yield this.cryptoService.makeKey(o.Utils.fromBufferToB64(a),yield this.tokenService.getEmail(),n,i),p=new l.KeyConnectorUserKeyRequest(d.encKeyB64);yield this.cryptoService.setKey(d);const u=yield this.cryptoService.makeEncKey(d);yield this.cryptoService.setEncKey(u[1].encryptedString);const[m,h]=yield this.cryptoService.makeKeyPair();try{yield this.apiService.postUserKeyToKeyConnector(r,p)}catch(g){this.handleKeyConnectorError(g)}const v=new c.KeysRequest(m,h.encryptedString),f=new s.SetKeyConnectorKeyRequest(u[1].encryptedString,n,i,t,v);yield this.apiService.postSetKeyConnectorKey(f)}))}setConvertAccountRequired(e){return i(this,void 0,void 0,(function*(){yield this.stateService.setConvertAccountToKeyConnector(e)}))}getConvertAccountRequired(){return i(this,void 0,void 0,(function*(){return yield this.stateService.getConvertAccountToKeyConnector()}))}removeConvertAccountRequired(){return i(this,void 0,void 0,(function*(){yield this.stateService.setConvertAccountToKeyConnector(null)}))}clear(){return i(this,void 0,void 0,(function*(){yield this.removeConvertAccountRequired()}))}handleKeyConnectorError(e){throw this.logService.error(e),null!=this.logoutCallback&&this.logoutCallback(!1),new Error("Key Connector error")}}},63231:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.NotificationsService=void 0;const r=n(27749),o=n(31683),a=n(72440),s=n(7837),l=n(16178);t.NotificationsService=class{constructor(e,t,n,i,r,o,a,s){this.syncService=e,this.appIdService=t,this.apiService=n,this.environmentService=i,this.logoutCallback=r,this.logService=o,this.stateService=a,this.authService=s,this.connected=!1,this.inited=!1,this.inactive=!1,this.reconnectTimer=null,this.environmentService.urls.subscribe((()=>{this.inited&&this.init()}))}init(){return i(this,void 0,void 0,(function*(){this.inited=!1,this.url=this.environmentService.getNotificationsUrl(),"https://-"!==this.url&&(null!=this.signalrConnection&&(this.signalrConnection.off("ReceiveMessage"),this.signalrConnection.off("Heartbeat"),yield this.signalrConnection.stop(),this.connected=!1,this.signalrConnection=null),this.signalrConnection=(new r.HubConnectionBuilder).withUrl(this.url+"/hub",{accessTokenFactory:()=>this.apiService.getActiveBearerToken(),skipNegotiation:!0,transport:r.HttpTransportType.WebSockets}).withHubProtocol(new o.MessagePackHubProtocol).build(),this.signalrConnection.on("ReceiveMessage",(e=>this.processNotification(new l.NotificationResponse(e)))),this.signalrConnection.on("Heartbeat",(e=>{})),this.signalrConnection.onclose((()=>{this.connected=!1,this.reconnect(!0)})),this.inited=!0,(yield this.isAuthedAndUnlocked())&&(yield this.reconnect(!1)))}))}updateConnection(e=!1){return i(this,void 0,void 0,(function*(){if(this.inited)try{(yield this.isAuthedAndUnlocked())?yield this.reconnect(e):yield this.signalrConnection.stop()}catch(t){this.logService.error(t.toString())}}))}reconnectFromActivity(){return i(this,void 0,void 0,(function*(){this.inactive=!1,this.inited&&!this.connected&&(yield this.reconnect(!0))}))}disconnectFromInactivity(){return i(this,void 0,void 0,(function*(){this.inactive=!0,this.inited&&this.connected&&(yield this.signalrConnection.stop())}))}processNotification(e){return i(this,void 0,void 0,(function*(){const t=yield this.appIdService.getAppId();if(null==e||e.contextId===t)return;const n=yield this.stateService.getIsAuthenticated(),i=e.payload.userId||e.payload.UserId,r=yield this.stateService.getUserId();if(!n||null==i||i===r)switch(e.type){case s.NotificationType.SyncCipherCreate:case s.NotificationType.SyncCipherUpdate:yield this.syncService.syncUpsertCipher(e.payload,e.type===s.NotificationType.SyncCipherUpdate);break;case s.NotificationType.SyncCipherDelete:case s.NotificationType.SyncLoginDelete:yield this.syncService.syncDeleteCipher(e.payload);break;case s.NotificationType.SyncFolderCreate:case s.NotificationType.SyncFolderUpdate:yield this.syncService.syncUpsertFolder(e.payload,e.type===s.NotificationType.SyncFolderUpdate);break;case s.NotificationType.SyncFolderDelete:yield this.syncService.syncDeleteFolder(e.payload);break;case s.NotificationType.SyncVault:case s.NotificationType.SyncCiphers:case s.NotificationType.SyncSettings:n&&(yield this.syncService.fullSync(!1));break;case s.NotificationType.SyncOrgKeys:n&&(yield this.syncService.fullSync(!0),yield this.signalrConnection.stop());break;case s.NotificationType.LogOut:n&&this.logoutCallback(!0);break;case s.NotificationType.SyncSendCreate:case s.NotificationType.SyncSendUpdate:yield this.syncService.syncUpsertSend(e.payload,e.type===s.NotificationType.SyncSendUpdate);break;case s.NotificationType.SyncSendDelete:yield this.syncService.syncDeleteSend(e.payload)}}))}reconnect(e){return i(this,void 0,void 0,(function*(){if(null!=this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.connected||!this.inited||this.inactive)return;if(yield this.isAuthedAndUnlocked()){try{yield this.signalrConnection.start(),this.connected=!0,e&&(yield this.syncService.fullSync(!1))}catch(t){this.logService.error(t)}this.connected||(this.reconnectTimer=setTimeout((()=>this.reconnect(e)),this.random(12e4,3e5)))}}))}isAuthedAndUnlocked(){return i(this,void 0,void 0,(function*(){return(yield this.authService.getAuthStatus())>=a.AuthenticationStatus.Unlocked}))}random(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e}}},59135:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationService=void 0;const r=n(27957);t.OrganizationService=class{constructor(e){this.stateService=e}get(e){return i(this,void 0,void 0,(function*(){const t=yield this.stateService.getOrganizations();return null!=t&&t.hasOwnProperty(e)?new r.Organization(t[e]):null}))}getByIdentifier(e){return i(this,void 0,void 0,(function*(){const t=yield this.getAll();return null==t||0===t.length?null:t.find((t=>t.identifier===e))}))}getAll(e){return i(this,void 0,void 0,(function*(){const t=yield this.stateService.getOrganizations({userId:e}),n=[];for(const e in t)t.hasOwnProperty(e)&&!t[e].isProviderUser&&n.push(new r.Organization(t[e]));return n}))}save(e){return i(this,void 0,void 0,(function*(){return yield this.stateService.setOrganizations(e)}))}canManageSponsorships(){return i(this,void 0,void 0,(function*(){return(yield this.getAll()).some((e=>e.familySponsorshipAvailable||null!==e.familySponsorshipFriendlyName))}))}hasOrganizations(e){return i(this,void 0,void 0,(function*(){return(yield this.getAll(e)).length>0}))}}},50142:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordGenerationService=void 0;const r=n(21322),o=n(49906),a=n(40596),s=n(22205),l=n(77665),c=n(49471),d={length:14,ambiguous:!1,number:!0,minNumber:1,uppercase:!0,minUppercase:0,lowercase:!0,minLowercase:0,special:!1,minSpecial:1,type:"password",numWords:3,wordSeparator:"-",capitalize:!1,includeNumber:!1};t.PasswordGenerationService=class{constructor(e,t,n){this.cryptoService=e,this.policyService=t,this.stateService=n}generatePassword(e){return i(this,void 0,void 0,(function*(){const t=Object.assign({},d,e);if("passphrase"===t.type)return this.generatePassphrase(e);this.sanitizePasswordLength(t,!0);const n=t.minUppercase+t.minLowercase+t.minNumber+t.minSpecial;t.length0)for(let e=0;e0)for(let e=0;e0)for(let e=0;e0)for(let e=0;e1)&&(t.wordSeparator=" "),null==t.capitalize&&(t.capitalize=!1),null==t.includeNumber&&(t.includeNumber=!1);const n=a.EEFLongWordList.length-1,i=new Array(t.numWords);for(let e=0;ee.length&&(e.minSpecial=e.length-e.minNumber),e.numWords{e.enabled&&null!=e.data&&(null==t&&(t=new c.PasswordGeneratorPolicyOptions),null!=e.data.defaultType&&"password"!==t.defaultType&&(t.defaultType=e.data.defaultType),null!=e.data.minLength&&e.data.minLength>t.minLength&&(t.minLength=e.data.minLength),e.data.useUpper&&(t.useUppercase=!0),e.data.useLower&&(t.useLowercase=!0),e.data.useNumbers&&(t.useNumbers=!0),null!=e.data.minNumbers&&e.data.minNumbers>t.numberCount&&(t.numberCount=e.data.minNumbers),e.data.useSpecial&&(t.useSpecial=!0),null!=e.data.minSpecial&&e.data.minSpecial>t.specialCount&&(t.specialCount=e.data.minSpecial),null!=e.data.minNumberWords&&e.data.minNumberWords>t.minNumberWords&&(t.minNumberWords=e.data.minNumberWords),e.data.capitalize&&(t.capitalize=!0),e.data.includeNumber&&(t.includeNumber=!0))})),t}))}saveOptions(e){return i(this,void 0,void 0,(function*(){yield this.stateService.setPasswordGenerationOptions(e)}))}getHistory(){return i(this,void 0,void 0,(function*(){if(!(yield this.cryptoService.hasKey()))return new Array;if(null==(yield this.stateService.getDecryptedPasswordGenerationHistory())){const e=yield this.stateService.getEncryptedPasswordGenerationHistory(),t=yield this.decryptHistory(e);yield this.stateService.setDecryptedPasswordGenerationHistory(t)}const e=yield this.stateService.getDecryptedPasswordGenerationHistory();return null!=e?e:new Array}))}addHistory(e){return i(this,void 0,void 0,(function*(){if(!(yield this.cryptoService.hasKey()))return;const t=yield this.getHistory();if(this.matchesPrevious(e,t))return;t.unshift(new l.GeneratedPasswordHistory(e,Date.now())),t.length>100&&t.pop();const n=yield this.encryptHistory(t);return yield this.stateService.setEncryptedPasswordGenerationHistory(n)}))}clear(e){return i(this,void 0,void 0,(function*(){yield this.stateService.setEncryptedPasswordGenerationHistory(null,{userId:e}),yield this.stateService.setDecryptedPasswordGenerationHistory(null,{userId:e})}))}passwordStrength(e,t=null){if(null==e||0===e.length)return null;let n=["bitwarden","bit","warden"];null!=t&&t.length>0&&(n=n.concat(t));const i=Array.from(new Set(n));return r(e,i)}normalizeOptions(e,t){e.minLowercase=0,e.minUppercase=0,!e.length||e.length<5?e.length=5:e.length>128&&(e.length=128),e.lengthe.length?e.minNumber=e.length:e.minNumber>9&&(e.minNumber=9):e.minNumber=0,e.minNumbere.length?e.minSpecial=e.length:e.minSpecial>9&&(e.minSpecial=9):e.minSpecial=0,e.minSpeciale.length&&(e.minSpecial=e.length-e.minNumber),null==e.numWords||e.length<3?e.numWords=3:e.numWords>20&&(e.numWords=20),e.numWords1&&(e.wordSeparator=e.wordSeparator[0]),this.sanitizePasswordLength(e,!1)}capitalize(e){return e.charAt(0).toUpperCase()+e.slice(1)}appendRandomNumberToRandomWord(e){return i(this,void 0,void 0,(function*(){if(null==e||e.length<=0)return;const t=yield this.cryptoService.randomNumber(0,e.length-1),n=yield this.cryptoService.randomNumber(0,9);e[t]=e[t]+n}))}encryptHistory(e){return i(this,void 0,void 0,(function*(){if(null==e||0===e.length)return Promise.resolve([]);const t=e.map((e=>i(this,void 0,void 0,(function*(){const t=yield this.cryptoService.encrypt(e.password);return new l.GeneratedPasswordHistory(t.encryptedString,e.date)}))));return yield Promise.all(t)}))}decryptHistory(e){return i(this,void 0,void 0,(function*(){if(null==e||0===e.length)return Promise.resolve([]);const t=e.map((e=>i(this,void 0,void 0,(function*(){const t=yield this.cryptoService.decryptToUtf8(new s.EncString(e.password));return new l.GeneratedPasswordHistory(t,e.date)}))));return yield Promise.all(t)}))}matchesPrevious(e,t){return null!=t&&0!==t.length&&t[t.length-1].password===e}shuffleArray(e){return i(this,void 0,void 0,(function*(){for(let t=e.length-1;t>0;t--){const n=yield this.cryptoService.randomNumber(0,t);[e[t],e[n]]=[e[n],e[t]]}}))}sanitizePasswordLength(e,t){let n=0,i=0,r=e.minNumber,o=e.minSpecial;e.uppercase&&e.minUppercase<=0?n=1:e.uppercase||(n=0),e.lowercase&&e.minLowercase<=0?i=1:e.lowercase||(i=0),e.number&&e.minNumber<=0?r=1:e.number||(r=0),e.special&&e.minSpecial<=0?o=1:e.special||(o=0),(!e.length||e.length<1)&&(e.length=10);const a=n+i+r+o;e.lengtht.type===e)):n}))}getPolicyForOrganization(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.organizationService.get(t);if(null==n?void 0:n.isProviderUser){const e=(yield this.apiService.getPolicies(t)).data.find((e=>e.organizationId===t));return null==e?null:new c.Policy(new s.PolicyData(e))}return(yield this.getAll(e)).find((e=>e.organizationId===t))}))}replace(e){return i(this,void 0,void 0,(function*(){yield this.stateService.setDecryptedPolicies(null),yield this.stateService.setEncryptedPolicies(e)}))}clear(e){return i(this,void 0,void 0,(function*(){yield this.stateService.setDecryptedPolicies(null,{userId:e}),yield this.stateService.setEncryptedPolicies(null,{userId:e})}))}getMasterPasswordPoliciesForInvitedUsers(e){return i(this,void 0,void 0,(function*(){const t=yield this.stateService.getUserId(),n=yield this.apiService.getPoliciesByInvitedUser(e,t),i=yield this.mapPoliciesFromToken(n);return this.getMasterPasswordPolicyOptions(i)}))}getMasterPasswordPolicyOptions(e){return i(this,void 0,void 0,(function*(){let t=null;return null==(e=null==e?yield this.getAll(a.PolicyType.MasterPassword):e.filter((e=>e.type===a.PolicyType.MasterPassword)))||0===e.length||e.forEach((e=>{e.enabled&&null!=e.data&&(null==t&&(t=new l.MasterPasswordPolicyOptions),null!=e.data.minComplexity&&e.data.minComplexity>t.minComplexity&&(t.minComplexity=e.data.minComplexity),null!=e.data.minLength&&e.data.minLength>t.minLength&&(t.minLength=e.data.minLength),e.data.requireUpper&&(t.requireUpper=!0),e.data.requireLower&&(t.requireLower=!0),e.data.requireNumbers&&(t.requireNumbers=!0),e.data.requireSpecial&&(t.requireSpecial=!0))})),t}))}evaluateMasterPassword(e,t,n){return null==n||!(n.minComplexity>0&&n.minComplexity>e)&&(!(n.minLength>0&&n.minLength>t.length)&&((!n.requireUpper||t.toLocaleLowerCase()!==t)&&((!n.requireLower||t.toLocaleUpperCase()!==t)&&(!(n.requireNumbers&&!/[0-9]/.test(t))&&!(n.requireSpecial&&!/[!@#$%\^&*]/g.test(t))))))}getResetPasswordPolicyOptions(e,t){var n,i,r;const o=new d.ResetPasswordPolicyOptions;if(null==e||null==t)return[o,!1];const s=e.find((e=>e.organizationId===t&&e.type===a.PolicyType.ResetPassword&&e.enabled));return o.autoEnrollEnabled=null!==(i=null===(n=null==s?void 0:s.data)||void 0===n?void 0:n.autoEnrollEnabled)&&void 0!==i&&i,[o,null!==(r=null==s?void 0:s.enabled)&&void 0!==r&&r]}mapPoliciesFromToken(e){if(null==e||null==e.data)return null;return e.data.map((e=>new s.PolicyData(e))).map((e=>new c.Policy(e)))}policyAppliesToUser(e,t,n){return i(this,void 0,void 0,(function*(){const i=yield this.getAll(e,n),o=yield this.organizationService.getAll(n);let a;a=null!=t?i.filter((e=>e.enabled&&t(e))):i.filter((e=>e.enabled));const s=new Set(a.map((e=>e.organizationId)));return o.some((t=>t.enabled&&t.status>=r.OrganizationUserStatusType.Accepted&&t.usePolicies&&!this.isExcemptFromPolicies(t,e)&&s.has(t.id)))}))}isExcemptFromPolicies(e,t){return t===a.PolicyType.MaximumVaultTimeout?e.type===o.OrganizationUserType.Owner:e.isExemptFromPolicies}}},59695:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderService=void 0;const r=n(61453);t.ProviderService=class{constructor(e){this.stateService=e}get(e){return i(this,void 0,void 0,(function*(){const t=yield this.stateService.getProviders();return null!=t&&t.hasOwnProperty(e)?new r.Provider(t[e]):null}))}getAll(){return i(this,void 0,void 0,(function*(){const e=yield this.stateService.getProviders(),t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(new r.Provider(e[n]));return t}))}save(e){return i(this,void 0,void 0,(function*(){yield this.stateService.setProviders(e)}))}}},32471:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SearchService=void 0;const r=n(31336),o=n(32773),a=n(67577),s=n(71703);t.SearchService=class{constructor(e,t,n){this.cipherService=e,this.logService=t,this.i18nService=n,this.indexedEntityId=null,this.indexing=!1,this.index=null,this.searchableMinLength=2,-1!==["zh-CN","zh-TW"].indexOf(n.locale)&&(this.searchableMinLength=1)}clearIndex(){this.indexedEntityId=null,this.index=null}isSearchable(e){return!(null==e||null==this.index&&e.length"))}indexCiphers(e,t){return i(this,void 0,void 0,(function*(){if(this.indexing)return;this.logService.time("search indexing"),this.indexing=!0,this.indexedEntityId=e,this.index=null;const n=new r.Builder;n.ref("id"),n.field("shortid",{boost:100,extractor:e=>e.id.substr(0,8)}),n.field("name",{boost:10}),n.field("subtitle",{boost:5,extractor:e=>null!=e.subTitle&&e.type===o.CipherType.Card?e.subTitle.replace(/\*/g,""):e.subTitle}),n.field("notes"),n.field("login.username",{extractor:e=>e.type===o.CipherType.Login&&null!=e.login?e.login.username:null}),n.field("login.uris",{boost:2,extractor:e=>this.uriExtractor(e)}),n.field("fields",{extractor:e=>this.fieldExtractor(e,!1)}),n.field("fields_joined",{extractor:e=>this.fieldExtractor(e,!0)}),n.field("attachments",{extractor:e=>this.attachmentExtractor(e,!1)}),n.field("attachments_joined",{extractor:e=>this.attachmentExtractor(e,!0)}),n.field("organizationid",{extractor:e=>e.organizationId}),(t=t||(yield this.cipherService.getAllDecrypted())).forEach((e=>n.add(e))),this.index=n.build(),this.indexing=!1,this.logService.timeEnd("search indexing")}))}searchCiphers(e,t=null,n=null){return i(this,void 0,void 0,(function*(){const i=[];if(null!=e&&(e=e.trim().toLowerCase()),""===e&&(e=null),null==n&&(n=yield this.cipherService.getAllDecrypted()),null!=t&&Array.isArray(t)&&t.length>0?n=n.filter((e=>t.every((t=>null==t||t(e))))):null!=t&&(n=n.filter(t)),!this.isSearchable(e))return n;this.indexing&&(yield new Promise((e=>setTimeout(e,250))),this.indexing&&(yield new Promise((e=>setTimeout(e,500)))));const o=this.getIndexForSearch();if(null==o)return this.searchCiphersBasic(n,e);const a=new Map;n.forEach((e=>a.set(e.id,e)));let s=null;if(null!=e&&e.length>1&&0===e.indexOf(">"))try{s=o.search(e.substr(1).trim())}catch(l){this.logService.error(l)}else{const t=r.Query.wildcard.LEADING|r.Query.wildcard.TRAILING;s=o.query((n=>{r.tokenizer(e).forEach((e=>{const i=e.toString();n.term(i,{fields:["name"],wildcard:t}),n.term(i,{fields:["subtitle"],wildcard:t}),n.term(i,{fields:["login.uris"],wildcard:t}),n.term(i,{})}))}))}return null!=s&&s.forEach((e=>{a.has(e.ref)&&i.push(a.get(e.ref))})),i}))}searchCiphersBasic(e,t,n=!1){return t=t.trim().toLowerCase(),e.filter((e=>n===e.isDeleted&&(null!=e.name&&e.name.toLowerCase().indexOf(t)>-1||(!!(t.length>=8&&e.id.startsWith(t))||(null!=e.subTitle&&e.subTitle.toLowerCase().indexOf(t)>-1||!!(e.login&&null!=e.login.uri&&e.login.uri.toLowerCase().indexOf(t)>-1))))))}searchSends(e,t){return t=t.trim().toLocaleLowerCase(),e.filter((e=>{var n,i,r;return null!=e.name&&e.name.toLowerCase().indexOf(t)>-1||(!!(t.length>=8&&(e.id.startsWith(t)||e.accessId.toLocaleLowerCase().startsWith(t)||null!=(null===(n=e.file)||void 0===n?void 0:n.id)&&e.file.id.startsWith(t)))||(null!=e.notes&&e.notes.toLowerCase().indexOf(t)>-1||(null!=(null===(i=e.text)||void 0===i?void 0:i.text)&&e.text.text.toLowerCase().indexOf(t)>-1||(null!=(null===(r=e.file)||void 0===r?void 0:r.fileName)&&e.file.fileName.toLowerCase().indexOf(t)>-1||void 0))))}))}getIndexForSearch(){return this.index}fieldExtractor(e,t){if(!e.hasFields)return null;let n=[];return e.fields.forEach((e=>{null!=e.name&&n.push(e.name),e.type===a.FieldType.Text&&null!=e.value&&n.push(e.value)})),n=n.filter((e=>""!==e.trim())),0===n.length?null:t?n.join(" "):n}attachmentExtractor(e,t){if(!e.hasAttachments)return null;let n=[];return e.attachments.forEach((e=>{null!=e&&null!=e.fileName&&(t&&e.fileName.indexOf(".")>-1?n.push(e.fileName.substr(0,e.fileName.lastIndexOf("."))):n.push(e.fileName))})),n=n.filter((e=>""!==e.trim())),0===n.length?null:t?n.join(" "):n}uriExtractor(e){if(e.type!==o.CipherType.Login||null==e.login||!e.login.hasUris)return null;const t=[];return e.login.uris.forEach((e=>{if(null==e.uri||""===e.uri)return;if(null!=e.hostname)return void t.push(e.hostname);let n=e.uri;if(e.match!==s.UriMatchType.RegularExpression){const e=n.indexOf("://");e>-1&&(n=n.substr(e+3));const t=n.search(/\?|&|#/);t>-1&&(n=n.substring(0,t))}t.push(n)})),t.length>0?t:null}}},23566:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SendService=void 0;const r=n(20971),o=n(70149),a=n(82769),s=n(10425),l=n(38265),c=n(32924),d=n(22785),p=n(34386),u=n(33018);t.SendService=class{constructor(e,t,n,i,r,o){this.cryptoService=e,this.apiService=t,this.fileUploadService=n,this.i18nService=i,this.cryptoFunctionService=r,this.stateService=o}clearCache(){return i(this,void 0,void 0,(function*(){yield this.stateService.setDecryptedSends(null)}))}encrypt(e,t,n,s){return i(this,void 0,void 0,(function*(){let i=null;const p=new l.Send;if(p.id=e.id,p.type=e.type,p.disabled=e.disabled,p.hideEmail=e.hideEmail,p.maxAccessCount=e.maxAccessCount,null==e.key&&(e.key=yield this.cryptoFunctionService.randomBytes(16),e.cryptoKey=yield this.cryptoService.makeSendKey(e.key)),null!=n){const t=yield this.cryptoFunctionService.pbkdf2(n,e.key,"sha256",r.SEND_KDF_ITERATIONS);p.password=a.Utils.fromBufferToB64(t)}if(p.key=yield this.cryptoService.encrypt(e.key,s),p.name=yield this.cryptoService.encrypt(e.name,e.cryptoKey),p.notes=yield this.cryptoService.encrypt(e.notes,e.cryptoKey),p.type===o.SendType.Text)p.text=new d.SendText,p.text.text=yield this.cryptoService.encrypt(e.text.text,e.cryptoKey),p.text.hidden=e.text.hidden;else if(p.type===o.SendType.File&&(p.file=new c.SendFile,null!=t))if(t instanceof ArrayBuffer){const[n,r]=yield this.encryptFileData(e.file.fileName,t,e.cryptoKey);p.file.fileName=n,i=r}else i=yield this.parseFile(p,t,e.cryptoKey);return[p,i]}))}get(e){return i(this,void 0,void 0,(function*(){const t=yield this.stateService.getEncryptedSends();return null!=t&&t.hasOwnProperty(e)?new l.Send(t[e]):null}))}getAll(){return i(this,void 0,void 0,(function*(){const e=yield this.stateService.getEncryptedSends(),t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(new l.Send(e[n]));return t}))}getAllDecrypted(){return i(this,void 0,void 0,(function*(){let e=yield this.stateService.getDecryptedSends();if(null!=e)return e;e=[];if(!(yield this.cryptoService.hasKey()))throw new Error("No key.");const t=[];return(yield this.getAll()).forEach((n=>{t.push(n.decrypt().then((t=>e.push(t))))})),yield Promise.all(t),e.sort(a.Utils.getSortFunction(this.i18nService,"name")),yield this.stateService.setDecryptedSends(e),e}))}saveWithServer(e){var t;return i(this,void 0,void 0,(function*(){const n=new p.SendRequest(e[0],null===(t=e[1])||void 0===t?void 0:t.buffer.byteLength);let i;if(null==e[0].id){if(e[0].type===o.SendType.Text)i=yield this.apiService.postSend(n);else try{const t=yield this.apiService.postFileTypeSend(n);i=t.sendResponse,yield this.fileUploadService.uploadSendFile(t,e[0].file.fileName,e[1])}catch(a){if(!(a instanceof u.ErrorResponse&&404===a.statusCode))throw a instanceof u.ErrorResponse?new Error(a.getSingleMessage()):a;i=yield this.legacyServerSendFileUpload(e,n)}e[0].id=i.id,e[0].accessId=i.accessId}else i=yield this.apiService.putSend(e[0].id,n);const r=new s.SendData(i);yield this.upsert(r)}))}legacyServerSendFileUpload(e,t){return i(this,void 0,void 0,(function*(){const n=new FormData;try{const i=new Blob([e[1].buffer],{type:"application/octet-stream"});n.append("model",JSON.stringify(t)),n.append("data",i,e[0].file.fileName.encryptedString)}catch(i){if(!a.Utils.isNode||a.Utils.isBrowser)throw i;n.append("model",JSON.stringify(t)),n.append("data",Buffer.from(e[1].buffer),{filepath:e[0].file.fileName.encryptedString,contentType:"application/octet-stream"})}return yield this.apiService.postSendFileLegacy(n)}))}upsert(e){return i(this,void 0,void 0,(function*(){let t=yield this.stateService.getEncryptedSends();if(null==t&&(t={}),e instanceof s.SendData){const n=e;t[n.id]=n}else e.forEach((e=>{t[e.id]=e}));yield this.replace(t)}))}replace(e){return i(this,void 0,void 0,(function*(){yield this.stateService.setDecryptedSends(null),yield this.stateService.setEncryptedSends(e)}))}clear(){return i(this,void 0,void 0,(function*(){yield this.stateService.setDecryptedSends(null),yield this.stateService.setEncryptedSends(null)}))}delete(e){return i(this,void 0,void 0,(function*(){const t=yield this.stateService.getEncryptedSends();if(null!=t){if("string"==typeof e){if(null==t[e])return;delete t[e]}else e.forEach((e=>{delete t[e]}));yield this.replace(t)}}))}deleteWithServer(e){return i(this,void 0,void 0,(function*(){yield this.apiService.deleteSend(e),yield this.delete(e)}))}removePasswordWithServer(e){return i(this,void 0,void 0,(function*(){const t=yield this.apiService.putSendRemovePassword(e),n=new s.SendData(t);yield this.upsert(n)}))}parseFile(e,t,n){return new Promise(((r,o)=>{const a=new FileReader;a.readAsArrayBuffer(t),a.onload=a=>i(this,void 0,void 0,(function*(){try{const[i,o]=yield this.encryptFileData(t.name,a.target.result,n);e.file.fileName=i,r(o)}catch(i){o(i)}})),a.onerror=()=>{o("Error reading file.")}}))}encryptFileData(e,t,n){return i(this,void 0,void 0,(function*(){return[yield this.cryptoService.encrypt(e,n),yield this.cryptoService.encryptToBytes(t,n)]}))}}},94822:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsService=void 0;const i="equivalentDomains";t.SettingsService=class{constructor(e){this.stateService=e}clearCache(){return n(this,void 0,void 0,(function*(){yield this.stateService.setSettings(null)}))}getEquivalentDomains(){return this.getSettingsKey(i)}setEquivalentDomains(e){return n(this,void 0,void 0,(function*(){yield this.setSettingsKey(i,e)}))}clear(e){return n(this,void 0,void 0,(function*(){yield this.stateService.setSettings(null,{userId:e})}))}getSettings(){return n(this,void 0,void 0,(function*(){const e=yield this.stateService.getSettings();if(null==e){yield this.stateService.getUserId()}return e}))}getSettingsKey(e){return n(this,void 0,void 0,(function*(){const t=yield this.getSettings();return null!=t&&t[e]?t[e]:null}))}setSettingsKey(e,t){return n(this,void 0,void 0,(function*(){let n=yield this.getSettings();n||(n={}),n[e]=t,yield this.stateService.setSettings(n)}))}}},13998:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.StateService=void 0;const r=n(72872),o=n(46632),a=n(67223),s=n(31445),l=n(91185),c=n(43208),d=n(95672),p="global",u="authenticatedAccounts",m="activeUserId",h="tempAccountSettings",v="accountActivity",f="_masterkey_auto",g="_masterkey_biometric",y="_masterkey";t.StateService=class{constructor(e,t,n,i,o,a=!0){this.storageService=e,this.secureStorageService=t,this.logService=n,this.stateMigrationService=i,this.stateFactory=o,this.useAccountCache=a,this.accounts=new r.BehaviorSubject({}),this.activeAccount=new r.BehaviorSubject(null),this.state=new c.State(this.createGlobals()),this.hasBeenInited=!1,this.accountDiskCache=new Map}init(){return i(this,void 0,void 0,(function*(){this.hasBeenInited||((yield this.stateMigrationService.needsMigration())&&(yield this.stateMigrationService.migrate()),yield this.initAccountState(),this.hasBeenInited=!0)}))}initAccountState(){var e;return i(this,void 0,void 0,(function*(){this.state.authenticatedAccounts=null!==(e=yield this.storageService.get(u))&&void 0!==e?e:[];for(const e in this.state.authenticatedAccounts)null!=e&&(yield this.syncAccountFromDisk(this.state.authenticatedAccounts[e]));const t=yield this.storageService.get(m);null!=t&&(this.state.activeUserId=t),yield this.pushAccounts(),this.activeAccount.next(this.state.activeUserId)}))}syncAccountFromDisk(e){return i(this,void 0,void 0,(function*(){if(null==e)return;this.state.accounts[e]=this.createAccount();const t=yield this.getAccountFromDisk({userId:e});this.state.accounts[e].profile=t.profile}))}addAccount(e){return i(this,void 0,void 0,(function*(){e=yield this.setAccountEnvironmentUrls(e),this.state.authenticatedAccounts.push(e.profile.userId),yield this.storageService.save(u,this.state.authenticatedAccounts),this.state.accounts[e.profile.userId]=e,yield this.scaffoldNewAccountStorage(e),yield this.setLastActive((new Date).getTime(),{userId:e.profile.userId}),yield this.setActiveUser(e.profile.userId),this.activeAccount.next(e.profile.userId)}))}setActiveUser(e){return i(this,void 0,void 0,(function*(){this.clearDecryptedDataForActiveUser(),this.state.activeUserId=e,yield this.storageService.save(m,e),this.activeAccount.next(this.state.activeUserId),yield this.pushAccounts()}))}clean(e){return i(this,void 0,void 0,(function*(){e=this.reconcileOptions(e,this.defaultInMemoryOptions),yield this.deAuthenticateAccount(e.userId),e.userId===this.state.activeUserId&&(yield this.dynamicallySetActiveUser()),yield this.removeAccountFromDisk(null==e?void 0:e.userId),this.removeAccountFromMemory(null==e?void 0:e.userId),yield this.pushAccounts()}))}getAccessToken(e){var t,n;return i(this,void 0,void 0,(function*(){return e=yield this.getTimeoutBasedStorageOptions(e),null===(n=null===(t=yield this.getAccount(e))||void 0===t?void 0:t.tokens)||void 0===n?void 0:n.accessToken}))}setAccessToken(e,t){return i(this,void 0,void 0,(function*(){t=yield this.getTimeoutBasedStorageOptions(t);const n=yield this.getAccount(t);n.tokens.accessToken=e,yield this.saveAccount(n,t)}))}getAddEditCipherInfo(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.data)||void 0===n?void 0:n.addEditCipherInfo}))}setAddEditCipherInfo(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.data.addEditCipherInfo=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getAlwaysShowDock(e){var t,n;return i(this,void 0,void 0,(function*(){return null!==(n=null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.alwaysShowDock)&&void 0!==n&&n}))}setAlwaysShowDock(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.alwaysShowDock=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getApiKeyClientId(e){var t,n;return i(this,void 0,void 0,(function*(){return e=yield this.getTimeoutBasedStorageOptions(e),null===(n=null===(t=yield this.getAccount(e))||void 0===t?void 0:t.profile)||void 0===n?void 0:n.apiKeyClientId}))}setApiKeyClientId(e,t){return i(this,void 0,void 0,(function*(){t=yield this.getTimeoutBasedStorageOptions(t);const n=yield this.getAccount(t);n.profile.apiKeyClientId=e,yield this.saveAccount(n,t)}))}getApiKeyClientSecret(e){var t,n;return i(this,void 0,void 0,(function*(){return e=yield this.getTimeoutBasedStorageOptions(e),null===(n=null===(t=yield this.getAccount(e))||void 0===t?void 0:t.keys)||void 0===n?void 0:n.apiKeyClientSecret}))}setApiKeyClientSecret(e,t){return i(this,void 0,void 0,(function*(){t=yield this.getTimeoutBasedStorageOptions(t);const n=yield this.getAccount(t);n.keys.apiKeyClientSecret=e,yield this.saveAccount(n,t)}))}getAutoConfirmFingerPrints(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.autoConfirmFingerPrints)&&void 0!==r&&r}))}setAutoConfirmFingerprints(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.autoConfirmFingerPrints=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getAutoFillOnPageLoadDefault(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.autoFillOnPageLoadDefault)||void 0===r||r}))}setAutoFillOnPageLoadDefault(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.autoFillOnPageLoadDefault=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getBiometricAwaitingAcceptance(e){var t,n;return i(this,void 0,void 0,(function*(){return null!==(n=null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.biometricAwaitingAcceptance)&&void 0!==n&&n}))}setBiometricAwaitingAcceptance(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.biometricAwaitingAcceptance=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getBiometricFingerprintValidated(e){var t,n;return i(this,void 0,void 0,(function*(){return null!==(n=null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.biometricFingerprintValidated)&&void 0!==n&&n}))}setBiometricFingerprintValidated(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.biometricFingerprintValidated=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getBiometricLocked(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.biometricLocked)&&void 0!==r&&r}))}setBiometricLocked(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.settings.biometricLocked=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getBiometricText(e){var t;return i(this,void 0,void 0,(function*(){return null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.biometricText}))}setBiometricText(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.biometricText=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getBiometricUnlock(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.biometricUnlock)&&void 0!==r&&r}))}setBiometricUnlock(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.biometricUnlock=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getCanAccessPremium(e){return i(this,void 0,void 0,(function*(){if(!(yield this.getIsAuthenticated(e)))return!1;if((yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions()))).profile.hasPremiumPersonally)return!0;const t=yield this.getOrganizations(e);if(null==t)return!1;for(const e of Object.keys(t)){const n=t[e];if(n.enabled&&n.usersGetPremium&&!n.isProviderUser)return!0}return!1}))}getClearClipboard(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.clearClipboard)&&void 0!==r?r:null}))}setClearClipboard(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()));n.settings.clearClipboard=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()))}))}getCollapsedGroupings(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.collapsedGroupings}))}setCollapsedGroupings(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()));n.settings.collapsedGroupings=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()))}))}getConvertAccountToKeyConnector(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.profile)||void 0===n?void 0:n.convertAccountToKeyConnector}))}setConvertAccountToKeyConnector(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.profile.convertAccountToKeyConnector=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getCryptoMasterKey(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.keys)||void 0===n?void 0:n.cryptoMasterKey}))}setCryptoMasterKey(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.keys.cryptoMasterKey=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getCryptoMasterKeyAuto(e){return i(this,void 0,void 0,(function*(){return null==(null==(e=this.reconcileOptions(this.reconcileOptions(e,{keySuffix:"auto"}),yield this.defaultSecureStorageOptions()))?void 0:e.userId)?null:yield this.secureStorageService.get(`${e.userId}${f}`,e)}))}setCryptoMasterKeyAuto(e,t){return i(this,void 0,void 0,(function*(){null!=(null==(t=this.reconcileOptions(this.reconcileOptions(t,{keySuffix:"auto"}),yield this.defaultSecureStorageOptions()))?void 0:t.userId)&&(yield this.saveSecureStorageKey(f,e,t))}))}getCryptoMasterKeyB64(e){return i(this,void 0,void 0,(function*(){return null==(null==(e=this.reconcileOptions(e,yield this.defaultSecureStorageOptions()))?void 0:e.userId)?null:yield this.secureStorageService.get(`${null==e?void 0:e.userId}${y}`,e)}))}setCryptoMasterKeyB64(e,t){return i(this,void 0,void 0,(function*(){null!=(null==(t=this.reconcileOptions(t,yield this.defaultSecureStorageOptions()))?void 0:t.userId)&&(yield this.saveSecureStorageKey(y,e,t))}))}getCryptoMasterKeyBiometric(e){return i(this,void 0,void 0,(function*(){return null==(null==(e=this.reconcileOptions(this.reconcileOptions(e,{keySuffix:"biometric"}),yield this.defaultSecureStorageOptions()))?void 0:e.userId)?null:yield this.secureStorageService.get(`${e.userId}${g}`,e)}))}hasCryptoMasterKeyBiometric(e){return i(this,void 0,void 0,(function*(){return null!=(null==(e=this.reconcileOptions(this.reconcileOptions(e,{keySuffix:"biometric"}),yield this.defaultSecureStorageOptions()))?void 0:e.userId)&&(yield this.secureStorageService.has(`${e.userId}${g}`,e))}))}setCryptoMasterKeyBiometric(e,t){return i(this,void 0,void 0,(function*(){null!=(null==(t=this.reconcileOptions(this.reconcileOptions(t,{keySuffix:"biometric"}),yield this.defaultSecureStorageOptions()))?void 0:t.userId)&&(yield this.saveSecureStorageKey(g,e,t))}))}getDecodedToken(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.tokens)||void 0===n?void 0:n.decodedToken}))}setDecodedToken(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.tokens.decodedToken=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getDecryptedCiphers(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.data)||void 0===n?void 0:n.ciphers)||void 0===r?void 0:r.decrypted}))}setDecryptedCiphers(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.data.ciphers.decrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getDecryptedCollections(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.data)||void 0===n?void 0:n.collections)||void 0===r?void 0:r.decrypted}))}setDecryptedCollections(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.data.collections.decrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getDecryptedCryptoSymmetricKey(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.keys)||void 0===n?void 0:n.cryptoSymmetricKey)||void 0===r?void 0:r.decrypted}))}setDecryptedCryptoSymmetricKey(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.keys.cryptoSymmetricKey.decrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getDecryptedFolders(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.data)||void 0===n?void 0:n.folders)||void 0===r?void 0:r.decrypted}))}setDecryptedFolders(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.data.folders.decrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getDecryptedOrganizationKeys(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.keys)||void 0===n?void 0:n.organizationKeys)||void 0===r?void 0:r.decrypted}))}setDecryptedOrganizationKeys(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.keys.organizationKeys.decrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getDecryptedPasswordGenerationHistory(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.data)||void 0===n?void 0:n.passwordGenerationHistory)||void 0===r?void 0:r.decrypted}))}setDecryptedPasswordGenerationHistory(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.data.passwordGenerationHistory.decrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getDecryptedPinProtected(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.pinProtected)||void 0===r?void 0:r.decrypted}))}setDecryptedPinProtected(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.settings.pinProtected.decrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getDecryptedPolicies(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.data)||void 0===n?void 0:n.policies)||void 0===r?void 0:r.decrypted}))}setDecryptedPolicies(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.data.policies.decrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getDecryptedPrivateKey(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.keys)||void 0===n?void 0:n.privateKey)||void 0===r?void 0:r.decrypted}))}setDecryptedPrivateKey(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.keys.privateKey.decrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getDecryptedProviderKeys(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.keys)||void 0===n?void 0:n.providerKeys)||void 0===r?void 0:r.decrypted}))}setDecryptedProviderKeys(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.keys.providerKeys.decrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getDecryptedSends(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.data)||void 0===n?void 0:n.sends)||void 0===r?void 0:r.decrypted}))}setDecryptedSends(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.data.sends.decrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getDefaultUriMatch(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.defaultUriMatch}))}setDefaultUriMatch(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.defaultUriMatch=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getDisableAddLoginNotification(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.disableAddLoginNotification)&&void 0!==r&&r}))}setDisableAddLoginNotification(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.disableAddLoginNotification=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getDisableAutoBiometricsPrompt(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.disableAutoBiometricsPrompt)&&void 0!==r&&r}))}setDisableAutoBiometricsPrompt(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.disableAutoBiometricsPrompt=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getDisableAutoTotpCopy(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.disableAutoTotpCopy)&&void 0!==r&&r}))}setDisableAutoTotpCopy(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.disableAutoTotpCopy=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getDisableBadgeCounter(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.disableBadgeCounter)&&void 0!==r&&r}))}setDisableBadgeCounter(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.disableBadgeCounter=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getDisableChangedPasswordNotification(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.disableChangedPasswordNotification)&&void 0!==r&&r}))}setDisableChangedPasswordNotification(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.disableChangedPasswordNotification=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getDisableContextMenuItem(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.disableContextMenuItem)&&void 0!==r&&r}))}setDisableContextMenuItem(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.disableContextMenuItem=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getDisableFavicon(e){var t,n;return i(this,void 0,void 0,(function*(){return null!==(n=null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===t?void 0:t.disableFavicon)&&void 0!==n&&n}))}setDisableFavicon(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()));n.disableFavicon=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()))}))}getDisableGa(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.disableGa)&&void 0!==r&&r}))}setDisableGa(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.disableGa=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getDontShowCardsCurrentTab(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.dontShowCardsCurrentTab)&&void 0!==r&&r}))}setDontShowCardsCurrentTab(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.dontShowCardsCurrentTab=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getDontShowIdentitiesCurrentTab(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.dontShowIdentitiesCurrentTab)&&void 0!==r&&r}))}setDontShowIdentitiesCurrentTab(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.dontShowIdentitiesCurrentTab=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEmail(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.profile)||void 0===n?void 0:n.email}))}setEmail(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.profile.email=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getEmailVerified(e){var t,n;return i(this,void 0,void 0,(function*(){return null!==(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.profile.emailVerified)&&void 0!==n&&n}))}setEmailVerified(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.profile.emailVerified=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEnableAlwaysOnTop(e){var t,n,r,o;return i(this,void 0,void 0,(function*(){const i=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.enableAlwaysOnTop,a=null===(r=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===r?void 0:r.enableAlwaysOnTop;return null!==(o=null!=i?i:a)&&void 0!==o&&o}))}setEnableAlwaysOnTop(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.enableAlwaysOnTop=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()));const i=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));i.enableAlwaysOnTop=e,yield this.saveGlobals(i,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEnableAutoFillOnPageLoad(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.enableAutoFillOnPageLoad)&&void 0!==r&&r}))}setEnableAutoFillOnPageLoad(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.enableAutoFillOnPageLoad=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEnableBiometric(e){var t,n;return i(this,void 0,void 0,(function*(){return null!==(n=null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.enableBiometrics)&&void 0!==n&&n}))}setEnableBiometric(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.enableBiometrics=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEnableBrowserIntegration(e){var t,n;return i(this,void 0,void 0,(function*(){return null!==(n=null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.enableBrowserIntegration)&&void 0!==n&&n}))}setEnableBrowserIntegration(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.enableBrowserIntegration=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEnableBrowserIntegrationFingerprint(e){var t,n;return i(this,void 0,void 0,(function*(){return null!==(n=null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.enableBrowserIntegrationFingerprint)&&void 0!==n&&n}))}setEnableBrowserIntegrationFingerprint(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.enableBrowserIntegrationFingerprint=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEnableCloseToTray(e){var t,n;return i(this,void 0,void 0,(function*(){return null!==(n=null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.enableCloseToTray)&&void 0!==n&&n}))}setEnableCloseToTray(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.enableCloseToTray=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEnableFullWidth(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.enableFullWidth)&&void 0!==r&&r}))}setEnableFullWidth(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()));n.settings.enableFullWidth=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()))}))}getEnableGravitars(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.enableGravitars)&&void 0!==r&&r}))}setEnableGravitars(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()));n.settings.enableGravitars=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()))}))}getEnableMinimizeToTray(e){var t,n;return i(this,void 0,void 0,(function*(){return null!==(n=null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.enableMinimizeToTray)&&void 0!==n&&n}))}setEnableMinimizeToTray(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.enableMinimizeToTray=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEnableStartToTray(e){var t,n;return i(this,void 0,void 0,(function*(){return null!==(n=null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.enableStartToTray)&&void 0!==n&&n}))}setEnableStartToTray(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.enableStartToTray=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEnableTray(e){var t,n;return i(this,void 0,void 0,(function*(){return null!==(n=null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.enableTray)&&void 0!==n&&n}))}setEnableTray(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.enableTray=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEncryptedCiphers(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskMemoryOptions())))||void 0===t?void 0:t.data)||void 0===n?void 0:n.ciphers)||void 0===r?void 0:r.encrypted}))}setEncryptedCiphers(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskMemoryOptions()));n.data.ciphers.encrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskMemoryOptions()))}))}getEncryptedCollections(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskMemoryOptions())))||void 0===t?void 0:t.data)||void 0===n?void 0:n.collections)||void 0===r?void 0:r.encrypted}))}setEncryptedCollections(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskMemoryOptions()));n.data.collections.encrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskMemoryOptions()))}))}getEncryptedCryptoSymmetricKey(e){var t;return i(this,void 0,void 0,(function*(){return null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.keys.cryptoSymmetricKey.encrypted}))}setEncryptedCryptoSymmetricKey(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.keys.cryptoSymmetricKey.encrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEncryptedFolders(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskMemoryOptions())))||void 0===t?void 0:t.data)||void 0===n?void 0:n.folders)||void 0===r?void 0:r.encrypted}))}setEncryptedFolders(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskMemoryOptions()));n.data.folders.encrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskMemoryOptions()))}))}getEncryptedOrganizationKeys(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.keys)||void 0===n?void 0:n.organizationKeys.encrypted}))}setEncryptedOrganizationKeys(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.keys.organizationKeys.encrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEncryptedPasswordGenerationHistory(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.data)||void 0===n?void 0:n.passwordGenerationHistory)||void 0===r?void 0:r.encrypted}))}setEncryptedPasswordGenerationHistory(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.data.passwordGenerationHistory.encrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEncryptedPinProtected(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.pinProtected)||void 0===r?void 0:r.encrypted}))}setEncryptedPinProtected(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.pinProtected.encrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEncryptedPolicies(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.data)||void 0===n?void 0:n.policies)||void 0===r?void 0:r.encrypted}))}setEncryptedPolicies(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.data.policies.encrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEncryptedPrivateKey(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.keys)||void 0===n?void 0:n.privateKey)||void 0===r?void 0:r.encrypted}))}setEncryptedPrivateKey(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.keys.privateKey.encrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEncryptedProviderKeys(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.keys)||void 0===n?void 0:n.providerKeys)||void 0===r?void 0:r.encrypted}))}setEncryptedProviderKeys(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.keys.providerKeys.encrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEncryptedSends(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskMemoryOptions())))||void 0===t?void 0:t.data)||void 0===n?void 0:n.sends.encrypted}))}setEncryptedSends(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskMemoryOptions()));n.data.sends.encrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskMemoryOptions()))}))}getEntityId(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===t?void 0:t.profile)||void 0===n?void 0:n.entityId}))}setEntityId(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()));n.profile.entityId=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()))}))}getEntityType(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===t?void 0:t.profile)||void 0===n?void 0:n.entityType}))}setEntityType(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()));n.profile.entityType=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()))}))}getEnvironmentUrls(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null==this.state.activeUserId?yield this.getGlobalEnvironmentUrls(e):(e=this.reconcileOptions(e,yield this.defaultOnDiskOptions()),null!==(r=null===(n=null===(t=yield this.getAccount(e))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.environmentUrls)&&void 0!==r?r:new l.EnvironmentUrls)}))}setEnvironmentUrls(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.environmentUrls=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEquivalentDomains(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.equivalentDomains}))}setEquivalentDomains(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.equivalentDomains=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEventCollection(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.data)||void 0===n?void 0:n.eventCollection}))}setEventCollection(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.data.eventCollection=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEverBeenUnlocked(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.profile)||void 0===n?void 0:n.everBeenUnlocked)&&void 0!==r&&r}))}setEverBeenUnlocked(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.profile.everBeenUnlocked=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getForcePasswordReset(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.profile)||void 0===n?void 0:n.forcePasswordReset)&&void 0!==r&&r}))}setForcePasswordReset(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.profile.forcePasswordReset=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getInstalledVersion(e){var t;return i(this,void 0,void 0,(function*(){return null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.installedVersion}))}setInstalledVersion(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.installedVersion=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getIsAuthenticated(e){return i(this,void 0,void 0,(function*(){return null!=(yield this.getAccessToken(e))&&null!=(yield this.getUserId(e))}))}getKdfIterations(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.profile)||void 0===n?void 0:n.kdfIterations}))}setKdfIterations(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.profile.kdfIterations=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getKdfType(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.profile)||void 0===n?void 0:n.kdfType}))}setKdfType(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.profile.kdfType=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getKeyHash(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.profile)||void 0===n?void 0:n.keyHash}))}setKeyHash(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.profile.keyHash=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getLastActive(e){return i(this,void 0,void 0,(function*(){e=this.reconcileOptions(e,yield this.defaultOnDiskOptions());const t=yield this.storageService.get(v,e);return null==t||Object.keys(t).length<1?null:t[e.userId]}))}setLastActive(e,t){var n;return i(this,void 0,void 0,(function*(){if(null==(t=this.reconcileOptions(t,yield this.defaultOnDiskOptions())).userId)return;const i=null!==(n=yield this.storageService.get(v,t))&&void 0!==n?n:{};i[t.userId]=e,yield this.storageService.save(v,i,t)}))}getLastSync(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskMemoryOptions())))||void 0===t?void 0:t.profile)||void 0===n?void 0:n.lastSync}))}setLastSync(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskMemoryOptions()));n.profile.lastSync=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskMemoryOptions()))}))}getLegacyEtmKey(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.keys)||void 0===n?void 0:n.legacyEtmKey}))}setLegacyEtmKey(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.keys.legacyEtmKey=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getLocalData(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===t?void 0:t.data)||void 0===n?void 0:n.localData}))}setLocalData(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()));n.data.localData=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()))}))}getLocale(e){var t;return i(this,void 0,void 0,(function*(){return null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===t?void 0:t.locale}))}setLocale(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()));n.locale=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()))}))}getMainWindowSize(e){var t;return i(this,void 0,void 0,(function*(){return null===(t=yield this.getGlobals(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.mainWindowSize}))}setMainWindowSize(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,this.defaultInMemoryOptions));n.mainWindowSize=e,yield this.saveGlobals(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getMinimizeOnCopyToClipboard(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.minimizeOnCopyToClipboard)&&void 0!==r&&r}))}setMinimizeOnCopyToClipboard(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.minimizeOnCopyToClipboard=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getNeverDomains(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.neverDomains}))}setNeverDomains(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.neverDomains=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getNoAutoPromptBiometrics(e){var t,n;return i(this,void 0,void 0,(function*(){return null!==(n=null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.noAutoPromptBiometrics)&&void 0!==n&&n}))}setNoAutoPromptBiometrics(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.noAutoPromptBiometrics=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getNoAutoPromptBiometricsText(e){var t;return i(this,void 0,void 0,(function*(){return null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.noAutoPromptBiometricsText}))}setNoAutoPromptBiometricsText(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.noAutoPromptBiometricsText=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getOpenAtLogin(e){var t,n;return i(this,void 0,void 0,(function*(){return null!==(n=null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.openAtLogin)&&void 0!==n&&n}))}setOpenAtLogin(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.openAtLogin=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getOrganizationInvitation(e){var t;return i(this,void 0,void 0,(function*(){return null===(t=yield this.getGlobals(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.organizationInvitation}))}setOrganizationInvitation(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,this.defaultInMemoryOptions));n.organizationInvitation=e,yield this.saveGlobals(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getOrganizations(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.data)||void 0===n?void 0:n.organizations}))}setOrganizations(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.data.organizations=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getPasswordGenerationOptions(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.passwordGenerationOptions}))}setPasswordGenerationOptions(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()));n.settings.passwordGenerationOptions=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()))}))}getUsernameGenerationOptions(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.usernameGenerationOptions}))}setUsernameGenerationOptions(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()));n.settings.usernameGenerationOptions=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()))}))}getGeneratorOptions(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.generatorOptions}))}setGeneratorOptions(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()));n.settings.generatorOptions=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()))}))}getProtectedPin(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.protectedPin}))}setProtectedPin(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.protectedPin=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getProviders(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.data)||void 0===n?void 0:n.providers}))}setProviders(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.data.providers=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getPublicKey(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.keys)||void 0===n?void 0:n.publicKey}))}setPublicKey(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.keys.publicKey=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getRefreshToken(e){var t,n;return i(this,void 0,void 0,(function*(){return e=yield this.getTimeoutBasedStorageOptions(e),null===(n=null===(t=yield this.getAccount(e))||void 0===t?void 0:t.tokens)||void 0===n?void 0:n.refreshToken}))}setRefreshToken(e,t){return i(this,void 0,void 0,(function*(){t=yield this.getTimeoutBasedStorageOptions(t);const n=yield this.getAccount(t);n.tokens.refreshToken=e,yield this.saveAccount(n,t)}))}getRememberedEmail(e){var t;return i(this,void 0,void 0,(function*(){return null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===t?void 0:t.rememberedEmail}))}setRememberedEmail(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()));n.rememberedEmail=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()))}))}getSecurityStamp(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.tokens)||void 0===n?void 0:n.securityStamp}))}setSecurityStamp(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.tokens.securityStamp=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getSettings(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskMemoryOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.settings}))}setSettings(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskMemoryOptions()));n.settings.settings=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskMemoryOptions()))}))}getSsoCodeVerifier(e){var t;return i(this,void 0,void 0,(function*(){return null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.ssoCodeVerifier}))}setSsoCodeVerifier(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.ssoCodeVerifier=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getSsoOrgIdentifier(e){var t;return i(this,void 0,void 0,(function*(){return null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===t?void 0:t.ssoOrganizationIdentifier}))}setSsoOrganizationIdentifier(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()));n.ssoOrganizationIdentifier=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()))}))}getSsoState(e){var t;return i(this,void 0,void 0,(function*(){return null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.ssoState}))}setSsoState(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.ssoState=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getTheme(e){var t;return i(this,void 0,void 0,(function*(){return null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===t?void 0:t.theme}))}setTheme(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()));n.theme=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()))}))}getTwoFactorToken(e){var t;return i(this,void 0,void 0,(function*(){return null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===t?void 0:t.twoFactorToken}))}setTwoFactorToken(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()));n.twoFactorToken=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()))}))}getUserId(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.profile)||void 0===n?void 0:n.userId}))}getUsesKeyConnector(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.profile)||void 0===n?void 0:n.usesKeyConnector}))}setUsesKeyConnector(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.profile.usesKeyConnector=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getVaultTimeout(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.vaultTimeout}))}setVaultTimeout(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()));n.settings.vaultTimeout=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()))}))}getVaultTimeoutAction(e){var t,n,r;return i(this,void 0,void 0,(function*(){const i=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.vaultTimeoutAction,o=null===(r=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===r?void 0:r.vaultTimeoutAction;return null!=i?i:o}))}setVaultTimeoutAction(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()));n.settings.vaultTimeoutAction=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()))}))}getStateVersion(){var e;return i(this,void 0,void 0,(function*(){return null!==(e=(yield this.getGlobals(yield this.defaultOnDiskLocalOptions())).stateVersion)&&void 0!==e?e:1}))}setStateVersion(e){return i(this,void 0,void 0,(function*(){const t=yield this.getGlobals(yield this.defaultOnDiskOptions());t.stateVersion=e,yield this.saveGlobals(t,yield this.defaultOnDiskOptions())}))}getWindow(){return i(this,void 0,void 0,(function*(){const e=yield this.getGlobals(yield this.defaultOnDiskOptions());return null!=(null==e?void 0:e.window)&&Object.keys(e.window).length>0?e.window:new d.WindowState}))}setWindow(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));return n.window=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getGlobals(e){return i(this,void 0,void 0,(function*(){let t;return this.useMemory(e.storageLocation)&&(t=this.getGlobalsFromMemory()),this.useDisk&&null==t&&(t=yield this.getGlobalsFromDisk(e)),null!=t?t:this.createGlobals()}))}saveGlobals(e,t){return i(this,void 0,void 0,(function*(){return this.useMemory(t.storageLocation)?this.saveGlobalsToMemory(e):yield this.saveGlobalsToDisk(e,t)}))}getGlobalsFromMemory(){return this.state.globals}getGlobalsFromDisk(e){return i(this,void 0,void 0,(function*(){return yield this.storageService.get(p,e)}))}saveGlobalsToMemory(e){this.state.globals=e}saveGlobalsToDisk(e,t){return i(this,void 0,void 0,(function*(){t.useSecureStorage?yield this.secureStorageService.save(p,e,t):yield this.storageService.save(p,e,t)}))}getAccount(e){return i(this,void 0,void 0,(function*(){try{let t;return this.useMemory(e.storageLocation)&&(t=this.getAccountFromMemory(e)),this.useDisk(e.storageLocation)&&null==t&&(t=yield this.getAccountFromDisk(e)),t}catch(t){this.logService.error(t)}}))}getAccountFromMemory(e){return null==this.state.accounts?null:this.state.accounts[this.getUserIdFromMemory(e)]}getUserIdFromMemory(e){var t,n;return null!=(null==e?void 0:e.userId)?null===(n=null===(t=this.state.accounts[e.userId])||void 0===t?void 0:t.profile)||void 0===n?void 0:n.userId:this.state.activeUserId}getAccountFromDisk(e){var t;return i(this,void 0,void 0,(function*(){if(null==(null==e?void 0:e.userId)&&null==this.state.activeUserId)return null;if(this.useAccountCache){const t=this.accountDiskCache.get(e.userId);if(null!=t)return t}const n=(null==e?void 0:e.useSecureStorage)?null!==(t=yield this.secureStorageService.get(e.userId,e))&&void 0!==t?t:yield this.storageService.get(e.userId,this.reconcileOptions(e,{htmlStorageLocation:o.HtmlStorageLocation.Local})):yield this.storageService.get(e.userId,e);return this.useAccountCache&&this.accountDiskCache.set(e.userId,n),n}))}useMemory(e){return e===a.StorageLocation.Memory||e===a.StorageLocation.Both}useDisk(e){return e===a.StorageLocation.Disk||e===a.StorageLocation.Both}saveAccount(e,t={storageLocation:a.StorageLocation.Both,useSecureStorage:!1}){return i(this,void 0,void 0,(function*(){return this.useMemory(t.storageLocation)?yield this.saveAccountToMemory(e):yield this.saveAccountToDisk(e,t)}))}saveAccountToDisk(e,t){return i(this,void 0,void 0,(function*(){const n=t.useSecureStorage?this.secureStorageService:this.storageService;yield n.save(`${t.userId}`,e,t),this.useAccountCache&&this.accountDiskCache.delete(t.userId)}))}saveAccountToMemory(e){return i(this,void 0,void 0,(function*(){null!==this.getAccountFromMemory({userId:e.profile.userId})&&(this.state.accounts[e.profile.userId]=e),yield this.pushAccounts()}))}scaffoldNewAccountStorage(e){return i(this,void 0,void 0,(function*(){const t=JSON.parse(JSON.stringify(e));yield this.scaffoldNewAccountLocalStorage(t),yield this.scaffoldNewAccountSessionStorage(t),yield this.scaffoldNewAccountMemoryStorage(t)}))}scaffoldNewAccountLocalStorage(e){return i(this,void 0,void 0,(function*(){const t=yield this.getAccount(this.reconcileOptions({userId:e.profile.userId},yield this.defaultOnDiskLocalOptions())),n=e.settings.environmentUrls;null!=(null==t?void 0:t.settings)?e.settings=t.settings:(yield this.storageService.has(h))&&(e.settings=yield this.storageService.get(h),yield this.storageService.remove(h)),e.settings.environmentUrls=n,"logOut"===e.settings.vaultTimeoutAction&&null!=e.settings.vaultTimeout&&(e.tokens.accessToken=null,e.tokens.refreshToken=null,e.profile.apiKeyClientId=null,e.keys.apiKeyClientSecret=null),yield this.saveAccount(e,this.reconcileOptions({userId:e.profile.userId},yield this.defaultOnDiskLocalOptions()))}))}scaffoldNewAccountMemoryStorage(e){return i(this,void 0,void 0,(function*(){const t=yield this.getAccount(this.reconcileOptions({userId:e.profile.userId},yield this.defaultOnDiskMemoryOptions()));null!=(null==t?void 0:t.settings)&&(t.settings.environmentUrls=e.settings.environmentUrls,e.settings=t.settings),yield this.storageService.save(e.profile.userId,e,yield this.defaultOnDiskMemoryOptions()),yield this.saveAccount(e,this.reconcileOptions({userId:e.profile.userId},yield this.defaultOnDiskMemoryOptions()))}))}scaffoldNewAccountSessionStorage(e){return i(this,void 0,void 0,(function*(){const t=yield this.getAccount(this.reconcileOptions({userId:e.profile.userId},yield this.defaultOnDiskOptions()));null!=(null==t?void 0:t.settings)&&(t.settings.environmentUrls=e.settings.environmentUrls,e.settings=t.settings),yield this.storageService.save(e.profile.userId,e,yield this.defaultOnDiskMemoryOptions()),yield this.saveAccount(e,this.reconcileOptions({userId:e.profile.userId},yield this.defaultOnDiskOptions()))}))}pushAccounts(){var e;return i(this,void 0,void 0,(function*(){yield this.pruneInMemoryAccounts(),null==(null===(e=this.state)||void 0===e?void 0:e.accounts)||Object.keys(this.state.accounts).length<1?this.accounts.next(null):this.accounts.next(this.state.accounts)}))}reconcileOptions(e,t){var n,i,r,o,a;return null==e?t:(e.userId=null!==(n=null==e?void 0:e.userId)&&void 0!==n?n:t.userId,e.storageLocation=null!==(i=null==e?void 0:e.storageLocation)&&void 0!==i?i:t.storageLocation,e.useSecureStorage=null!==(r=null==e?void 0:e.useSecureStorage)&&void 0!==r?r:t.useSecureStorage,e.htmlStorageLocation=null!==(o=null==e?void 0:e.htmlStorageLocation)&&void 0!==o?o:t.htmlStorageLocation,e.keySuffix=null!==(a=null==e?void 0:e.keySuffix)&&void 0!==a?a:t.keySuffix,e)}get defaultInMemoryOptions(){return{storageLocation:a.StorageLocation.Memory,userId:this.state.activeUserId}}defaultOnDiskOptions(){var e;return i(this,void 0,void 0,(function*(){return{storageLocation:a.StorageLocation.Disk,htmlStorageLocation:o.HtmlStorageLocation.Session,userId:null!==(e=this.state.activeUserId)&&void 0!==e?e:yield this.getActiveUserIdFromStorage(),useSecureStorage:!1}}))}defaultOnDiskLocalOptions(){var e;return i(this,void 0,void 0,(function*(){return{storageLocation:a.StorageLocation.Disk,htmlStorageLocation:o.HtmlStorageLocation.Local,userId:null!==(e=this.state.activeUserId)&&void 0!==e?e:yield this.getActiveUserIdFromStorage(),useSecureStorage:!1}}))}defaultOnDiskMemoryOptions(){var e;return i(this,void 0,void 0,(function*(){return{storageLocation:a.StorageLocation.Disk,htmlStorageLocation:o.HtmlStorageLocation.Memory,userId:null!==(e=this.state.activeUserId)&&void 0!==e?e:yield this.getUserId(),useSecureStorage:!1}}))}defaultSecureStorageOptions(){var e;return i(this,void 0,void 0,(function*(){return{storageLocation:a.StorageLocation.Disk,useSecureStorage:!0,userId:null!==(e=this.state.activeUserId)&&void 0!==e?e:yield this.getActiveUserIdFromStorage()}}))}getActiveUserIdFromStorage(){return i(this,void 0,void 0,(function*(){return yield this.storageService.get(m)}))}removeAccountFromLocalStorage(e=this.state.activeUserId){return i(this,void 0,void 0,(function*(){const t=yield this.getAccount(this.reconcileOptions({userId:e},yield this.defaultOnDiskLocalOptions()));yield this.saveAccount(this.resetAccount(t),this.reconcileOptions({userId:e},yield this.defaultOnDiskLocalOptions()))}))}removeAccountFromSessionStorage(e=this.state.activeUserId){return i(this,void 0,void 0,(function*(){const t=yield this.getAccount(this.reconcileOptions({userId:e},yield this.defaultOnDiskOptions()));yield this.saveAccount(this.resetAccount(t),this.reconcileOptions({userId:e},yield this.defaultOnDiskOptions()))}))}removeAccountFromSecureStorage(e=this.state.activeUserId){return i(this,void 0,void 0,(function*(){yield this.setCryptoMasterKeyAuto(null,{userId:e}),yield this.setCryptoMasterKeyBiometric(null,{userId:e}),yield this.setCryptoMasterKeyB64(null,{userId:e})}))}removeAccountFromMemory(e=this.state.activeUserId){delete this.state.accounts[e],this.useAccountCache&&this.accountDiskCache.delete(e)}pruneInMemoryAccounts(){return i(this,void 0,void 0,(function*(){for(const e in this.state.accounts)(yield this.getIsAuthenticated({userId:e}))||this.removeAccountFromMemory(e)}))}resetAccount(e){const t={settings:e.settings};return Object.assign(this.createAccount(),t)}setAccountEnvironmentUrls(e){return i(this,void 0,void 0,(function*(){return e.settings.environmentUrls=yield this.getGlobalEnvironmentUrls(),e}))}getGlobalEnvironmentUrls(e){var t;return i(this,void 0,void 0,(function*(){return e=this.reconcileOptions(e,yield this.defaultOnDiskOptions()),null!==(t=(yield this.getGlobals(e)).environmentUrls)&&void 0!==t?t:new l.EnvironmentUrls}))}clearDecryptedDataForActiveUser(){var e,t;const n=this.state.activeUserId;null!=n&&null!=(null===(t=null===(e=this.state)||void 0===e?void 0:e.accounts[n])||void 0===t?void 0:t.data)&&(this.state.accounts[n].data=new s.AccountData)}createAccount(e=null){return this.stateFactory.createAccount(e)}createGlobals(e=null){return this.stateFactory.createGlobal(e)}deAuthenticateAccount(e){return i(this,void 0,void 0,(function*(){yield this.setAccessToken(null,{userId:e}),yield this.setLastActive(null,{userId:e}),this.state.authenticatedAccounts=this.state.authenticatedAccounts.filter((t=>t!==e)),yield this.storageService.save(u,this.state.authenticatedAccounts)}))}removeAccountFromDisk(e){return i(this,void 0,void 0,(function*(){yield this.removeAccountFromSessionStorage(e),yield this.removeAccountFromLocalStorage(e),yield this.removeAccountFromSecureStorage(e)}))}dynamicallySetActiveUser(){return i(this,void 0,void 0,(function*(){if(null==this.state.accounts||Object.keys(this.state.accounts).length<1)yield this.setActiveUser(null);else for(const e in this.state.accounts)if(null!=e){if(yield this.getIsAuthenticated({userId:e})){yield this.setActiveUser(e);break}yield this.setActiveUser(null)}}))}getTimeoutBasedStorageOptions(e){return i(this,void 0,void 0,(function*(){const t=yield this.getVaultTimeoutAction({userId:null==e?void 0:e.userId}),n=yield this.getVaultTimeout({userId:null==e?void 0:e.userId}),i="logOut"===t&&null!=n?this.defaultInMemoryOptions:yield this.defaultOnDiskOptions();return this.reconcileOptions(e,i)}))}saveSecureStorageKey(e,t,n){return i(this,void 0,void 0,(function*(){return null==t?yield this.secureStorageService.remove(`${n.userId}${e}`,n):yield this.secureStorageService.save(`${n.userId}${e}`,t,n)}))}}},8357:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.StateMigrationService=void 0;const r=n(46632),o=n(40898),a=n(7790),s={accessToken:"accessToken",alwaysShowDock:"alwaysShowDock",autoConfirmFingerprints:"autoConfirmFingerprints",autoFillOnPageLoadDefault:"autoFillOnPageLoadDefault",biometricAwaitingAcceptance:"biometricAwaitingAcceptance",biometricFingerprintValidated:"biometricFingerprintValidated",biometricText:"biometricText",biometricUnlock:"biometric",clearClipboard:"clearClipboardKey",clientId:"apikey_clientId",clientSecret:"apikey_clientSecret",collapsedGroupings:"collapsedGroupings",convertAccountToKeyConnector:"convertAccountToKeyConnector",defaultUriMatch:"defaultUriMatch",disableAddLoginNotification:"disableAddLoginNotification",disableAutoBiometricsPrompt:"noAutoPromptBiometrics",disableAutoTotpCopy:"disableAutoTotpCopy",disableBadgeCounter:"disableBadgeCounter",disableChangedPasswordNotification:"disableChangedPasswordNotification",disableContextMenuItem:"disableContextMenuItem",disableFavicon:"disableFavicon",disableGa:"disableGa",dontShowCardsCurrentTab:"dontShowCardsCurrentTab",dontShowIdentitiesCurrentTab:"dontShowIdentitiesCurrentTab",emailVerified:"emailVerified",enableAlwaysOnTop:"enableAlwaysOnTopKey",enableAutoFillOnPageLoad:"enableAutoFillOnPageLoad",enableBiometric:"enabledBiometric",enableBrowserIntegration:"enableBrowserIntegration",enableBrowserIntegrationFingerprint:"enableBrowserIntegrationFingerprint",enableCloseToTray:"enableCloseToTray",enableFullWidth:"enableFullWidth",enableGravatars:"enableGravatars",enableMinimizeToTray:"enableMinimizeToTray",enableStartToTray:"enableStartToTrayKey",enableTray:"enableTray",encKey:"encKey",encOrgKeys:"encOrgKeys",encPrivate:"encPrivateKey",encProviderKeys:"encProviderKeys",entityId:"entityId",entityType:"entityType",environmentUrls:"environmentUrls",equivalentDomains:"equivalentDomains",eventCollection:"eventCollection",forcePasswordReset:"forcePasswordReset",history:"generatedPasswordHistory",installedVersion:"installedVersion",kdf:"kdf",kdfIterations:"kdfIterations",key:"key",keyHash:"keyHash",lastActive:"lastActive",localData:"sitesLocalData",locale:"locale",mainWindowSize:"mainWindowSize",minimizeOnCopyToClipboard:"minimizeOnCopyToClipboardKey",neverDomains:"neverDomains",noAutoPromptBiometricsText:"noAutoPromptBiometricsText",openAtLogin:"openAtLogin",passwordGenerationOptions:"passwordGenerationOptions",pinProtected:"pinProtectedKey",protectedPin:"protectedPin",refreshToken:"refreshToken",ssoCodeVerifier:"ssoCodeVerifier",ssoIdentifier:"ssoOrgIdentifier",ssoState:"ssoState",stamp:"securityStamp",theme:"theme",userEmail:"userEmail",userId:"userId",usesConnector:"usesKeyConnector",vaultTimeoutAction:"vaultTimeoutAction",vaultTimeout:"lockOption",rememberedEmail:"rememberedEmail"},l={ciphers:"ciphers_",collections:"collections_",folders:"folders_",lastSync:"lastSync_",policies:"policies_",twoFactorToken:"twoFactorToken_",organizations:"organizations_",providers:"providers_",sends:"sends_",settings:"settings_"},c="global",d="authenticatedAccounts",p="activeUserId",u="tempAccountSettings",m="accountActivity",h="_masterkey_auto",v="_masterkey_biometric",f="_masterkey";t.StateMigrationService=class{constructor(e,t,n){this.storageService=e,this.secureStorageService=t,this.stateFactory=n}needsMigration(){return i(this,void 0,void 0,(function*(){const e=yield this.getCurrentStateVersion();return null==e||ei(this,void 0,void 0,(function*(){for(const e in s)null!=e&&(yield this.set(s[e],null));if(null!=e)for(const e in l)null!=e&&(yield this.set(l[e]+le,null))})),se=null!==(e=yield this.get(c))&&void 0!==e?e:this.stateFactory.createGlobal(null);se.stateVersion=o.StateVersion.Two,se.environmentUrls=null!==(t=yield this.get(s.environmentUrls))&&void 0!==t?t:se.environmentUrls,se.locale=null!==(n=yield this.get(s.locale))&&void 0!==n?n:se.locale,se.noAutoPromptBiometrics=null!==(r=yield this.get(s.disableAutoBiometricsPrompt))&&void 0!==r?r:se.noAutoPromptBiometrics,se.noAutoPromptBiometricsText=null!==(a=yield this.get(s.noAutoPromptBiometricsText))&&void 0!==a?a:se.noAutoPromptBiometricsText,se.ssoCodeVerifier=null!==(g=yield this.get(s.ssoCodeVerifier))&&void 0!==g?g:se.ssoCodeVerifier,se.ssoOrganizationIdentifier=null!==(y=yield this.get(s.ssoIdentifier))&&void 0!==y?y:se.ssoOrganizationIdentifier,se.ssoState=null!==(x=yield this.get(s.ssoState))&&void 0!==x?x:se.ssoState,se.rememberedEmail=null!==(S=yield this.get(s.rememberedEmail))&&void 0!==S?S:se.rememberedEmail,se.theme=null!==(b=yield this.get(s.theme))&&void 0!==b?b:se.theme,se.vaultTimeout=null!==(w=yield this.get(s.vaultTimeout))&&void 0!==w?w:se.vaultTimeout,se.vaultTimeoutAction=null!==(C=yield this.get(s.vaultTimeoutAction))&&void 0!==C?C:se.vaultTimeoutAction,se.window=null!==(I=yield this.get(s.mainWindowSize))&&void 0!==I?I:se.window,se.enableTray=null!==(E=yield this.get(s.enableTray))&&void 0!==E?E:se.enableTray,se.enableMinimizeToTray=null!==(P=yield this.get(s.enableMinimizeToTray))&&void 0!==P?P:se.enableMinimizeToTray,se.enableCloseToTray=null!==(O=yield this.get(s.enableCloseToTray))&&void 0!==O?O:se.enableCloseToTray,se.enableStartToTray=null!==(k=yield this.get(s.enableStartToTray))&&void 0!==k?k:se.enableStartToTray,se.openAtLogin=null!==(A=yield this.get(s.openAtLogin))&&void 0!==A?A:se.openAtLogin,se.alwaysShowDock=null!==(T=yield this.get(s.alwaysShowDock))&&void 0!==T?T:se.alwaysShowDock,se.enableBrowserIntegration=null!==(M=yield this.get(s.enableBrowserIntegration))&&void 0!==M?M:se.enableBrowserIntegration,se.enableBrowserIntegrationFingerprint=null!==(B=yield this.get(s.enableBrowserIntegrationFingerprint))&&void 0!==B?B:se.enableBrowserIntegrationFingerprint;const le=null!==(D=yield this.get(s.userId))&&void 0!==D?D:yield this.get(s.entityId),ce=this.stateFactory.createAccount(null),de={autoConfirmFingerPrints:null!==(R=yield this.get(s.autoConfirmFingerprints))&&void 0!==R?R:ce.settings.autoConfirmFingerPrints,autoFillOnPageLoadDefault:null!==(F=yield this.get(s.autoFillOnPageLoadDefault))&&void 0!==F?F:ce.settings.autoFillOnPageLoadDefault,biometricLocked:null,biometricUnlock:null!==(U=yield this.get(s.biometricUnlock))&&void 0!==U?U:ce.settings.biometricUnlock,clearClipboard:null!==(V=yield this.get(s.clearClipboard))&&void 0!==V?V:ce.settings.clearClipboard,defaultUriMatch:null!==(N=yield this.get(s.defaultUriMatch))&&void 0!==N?N:ce.settings.defaultUriMatch,disableAddLoginNotification:null!==(_=yield this.get(s.disableAddLoginNotification))&&void 0!==_?_:ce.settings.disableAddLoginNotification,disableAutoBiometricsPrompt:null!==(j=yield this.get(s.disableAutoBiometricsPrompt))&&void 0!==j?j:ce.settings.disableAutoBiometricsPrompt,disableAutoTotpCopy:null!==(z=yield this.get(s.disableAutoTotpCopy))&&void 0!==z?z:ce.settings.disableAutoTotpCopy,disableBadgeCounter:null!==(H=yield this.get(s.disableBadgeCounter))&&void 0!==H?H:ce.settings.disableBadgeCounter,disableChangedPasswordNotification:null!==(L=yield this.get(s.disableChangedPasswordNotification))&&void 0!==L?L:ce.settings.disableChangedPasswordNotification,disableContextMenuItem:null!==(K=yield this.get(s.disableContextMenuItem))&&void 0!==K?K:ce.settings.disableContextMenuItem,disableGa:null!==(q=yield this.get(s.disableGa))&&void 0!==q?q:ce.settings.disableGa,dontShowCardsCurrentTab:null!==(G=yield this.get(s.dontShowCardsCurrentTab))&&void 0!==G?G:ce.settings.dontShowCardsCurrentTab,dontShowIdentitiesCurrentTab:null!==(W=yield this.get(s.dontShowIdentitiesCurrentTab))&&void 0!==W?W:ce.settings.dontShowIdentitiesCurrentTab,enableAlwaysOnTop:null!==($=yield this.get(s.enableAlwaysOnTop))&&void 0!==$?$:ce.settings.enableAlwaysOnTop,enableAutoFillOnPageLoad:null!==(Y=yield this.get(s.enableAutoFillOnPageLoad))&&void 0!==Y?Y:ce.settings.enableAutoFillOnPageLoad,enableBiometric:null!==(Q=yield this.get(s.enableBiometric))&&void 0!==Q?Q:ce.settings.enableBiometric,enableFullWidth:null!==(J=yield this.get(s.enableFullWidth))&&void 0!==J?J:ce.settings.enableFullWidth,enableGravitars:null!==(Z=yield this.get(s.enableGravatars))&&void 0!==Z?Z:ce.settings.enableGravitars,environmentUrls:null!==(X=se.environmentUrls)&&void 0!==X?X:ce.settings.environmentUrls,equivalentDomains:null!==(ee=yield this.get(s.equivalentDomains))&&void 0!==ee?ee:ce.settings.equivalentDomains,minimizeOnCopyToClipboard:null!==(te=yield this.get(s.minimizeOnCopyToClipboard))&&void 0!==te?te:ce.settings.minimizeOnCopyToClipboard,neverDomains:null!==(ne=yield this.get(s.neverDomains))&&void 0!==ne?ne:ce.settings.neverDomains,passwordGenerationOptions:null!==(ie=yield this.get(s.passwordGenerationOptions))&&void 0!==ie?ie:ce.settings.passwordGenerationOptions,pinProtected:{decrypted:null,encrypted:yield this.get(s.pinProtected)},protectedPin:yield this.get(s.protectedPin),settings:null==le?null:yield this.get(l.settings+le),vaultTimeout:null!==(re=yield this.get(s.vaultTimeout))&&void 0!==re?re:ce.settings.vaultTimeout,vaultTimeoutAction:null!==(oe=yield this.get(s.vaultTimeoutAction))&&void 0!==oe?oe:ce.settings.vaultTimeoutAction};if(null==le)return yield this.set(u,de),yield this.set(c,se),yield this.set(d,[]),yield this.set(p,null),void(yield ae());se.twoFactorToken=yield this.get(l.twoFactorToken+le),yield this.set(c,se),yield this.set(le,{data:{addEditCipherInfo:null,ciphers:{decrypted:null,encrypted:yield this.get(l.ciphers+le)},collapsedGroupings:null,collections:{decrypted:null,encrypted:yield this.get(l.collections+le)},eventCollection:yield this.get(s.eventCollection),folders:{decrypted:null,encrypted:yield this.get(l.folders+le)},localData:null,organizations:yield this.get(l.organizations+le),passwordGenerationHistory:{decrypted:null,encrypted:yield this.get(s.history)},policies:{decrypted:null,encrypted:yield this.get(l.policies+le)},providers:yield this.get(l.providers+le),sends:{decrypted:null,encrypted:yield this.get(l.sends+le)}},keys:{apiKeyClientSecret:yield this.get(s.clientSecret),cryptoMasterKey:null,cryptoMasterKeyAuto:null,cryptoMasterKeyB64:null,cryptoMasterKeyBiometric:null,cryptoSymmetricKey:{encrypted:yield this.get(s.encKey),decrypted:null},legacyEtmKey:null,organizationKeys:{decrypted:null,encrypted:yield this.get(s.encOrgKeys)},privateKey:{decrypted:null,encrypted:yield this.get(s.encPrivate)},providerKeys:{decrypted:null,encrypted:yield this.get(s.encProviderKeys)},publicKey:null},profile:{apiKeyClientId:yield this.get(s.clientId),authenticationStatus:null,convertAccountToKeyConnector:yield this.get(s.convertAccountToKeyConnector),email:yield this.get(s.userEmail),emailVerified:yield this.get(s.emailVerified),entityId:null,entityType:null,everBeenUnlocked:null,forcePasswordReset:null,hasPremiumPersonally:null,kdfIterations:yield this.get(s.kdfIterations),kdfType:yield this.get(s.kdf),keyHash:yield this.get(s.keyHash),lastSync:null,userId:le,usesKeyConnector:null},settings:de,tokens:{accessToken:yield this.get(s.accessToken),decodedToken:null,refreshToken:yield this.get(s.refreshToken),securityStamp:null}}),yield this.set(d,[le]),yield this.set(p,le);const pe={[le]:yield this.get(s.lastActive)};pe[le]=yield this.get(s.lastActive),yield this.set(m,pe),yield ae(le),(yield this.secureStorageService.has(s.key,{keySuffix:"biometric"}))&&(yield this.secureStorageService.save(`${le}${v}`,yield this.secureStorageService.get(s.key,{keySuffix:"biometric"}),{keySuffix:"biometric"}),yield this.secureStorageService.remove(s.key,{keySuffix:"biometric"})),(yield this.secureStorageService.has(s.key,{keySuffix:"auto"}))&&(yield this.secureStorageService.save(`${le}${h}`,yield this.secureStorageService.get(s.key,{keySuffix:"auto"}),{keySuffix:"auto"}),yield this.secureStorageService.remove(s.key,{keySuffix:"auto"})),(yield this.secureStorageService.has(s.key))&&(yield this.secureStorageService.save(`${le}${f}`,yield this.secureStorageService.get(s.key)),yield this.secureStorageService.remove(s.key))}))}migrateStateFrom2To3(){return i(this,void 0,void 0,(function*(){const e=yield this.get(d);yield Promise.all(e.map((e=>i(this,void 0,void 0,(function*(){var t,n;const i=yield this.get(e);if(null===(null===(t=null==i?void 0:i.profile)||void 0===t?void 0:t.hasPremiumPersonally)&&null!=(null===(n=i.tokens)||void 0===n?void 0:n.accessToken)){const t=yield a.TokenService.decodeToken(i.tokens.accessToken);i.profile.hasPremiumPersonally=t.premium,yield this.set(e,i)}})))));const t=yield this.getGlobals();t.stateVersion=o.StateVersion.Three,yield this.set(c,t)}))}migrateStateFrom3To4(){return i(this,void 0,void 0,(function*(){const e=yield this.get(d);yield Promise.all(e.map((e=>i(this,void 0,void 0,(function*(){var t;const n=yield this.get(e);if(null!=(null===(t=null==n?void 0:n.profile)||void 0===t?void 0:t.everBeenUnlocked))return delete n.profile.everBeenUnlocked,this.set(e,n)})))));const t=yield this.getGlobals();t.stateVersion=o.StateVersion.Four,yield this.set(c,t)}))}get options(){return{htmlStorageLocation:r.HtmlStorageLocation.Local}}get(e){return this.storageService.get(e,this.options)}set(e,t){return null==t?this.storageService.remove(e,this.options):this.storageService.save(e,t,this.options)}getGlobals(){return i(this,void 0,void 0,(function*(){return yield this.get(c)}))}getCurrentStateVersion(){var e,t;return i(this,void 0,void 0,(function*(){return null!==(t=null===(e=yield this.getGlobals())||void 0===e?void 0:e.stateVersion)&&void 0!==t?t:o.StateVersion.One}))}}},86257:function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SyncService=void 0;const a=n(27605),s=n(82789),l=n(34917),c=n(12835),d=n(8681),p=n(34144),u=n(17835),m=n(10425);class h{constructor(e,t,n,i,r,o,a,s,l,c,d,p,u,m,h){this.apiService=e,this.settingsService=t,this.folderService=n,this.cipherService=i,this.cryptoService=r,this.collectionService=o,this.messagingService=a,this.policyService=s,this.sendService=l,this.logService=c,this.keyConnectorService=d,this.stateService=p,this.organizationService=u,this.providerService=m,this.logoutCallback=h,this.syncInProgress=!1}getLastSync(){return o(this,void 0,void 0,(function*(){if(null==(yield this.stateService.getUserId()))return null;const e=yield this.stateService.getLastSync();return e?new Date(e):null}))}setLastSync(e,t){return o(this,void 0,void 0,(function*(){yield this.stateService.setLastSync(e.toJSON(),{userId:t})}))}fullSync(e,t=!1){return o(this,void 0,void 0,(function*(){this.syncStarted();if(!(yield this.stateService.getIsAuthenticated()))return this.syncCompleted(!1);const n=new Date;let i=!1;try{i=yield this.needsSyncing(e)}catch(r){if(t)throw r}if(!i)return yield this.setLastSync(n),this.syncCompleted(!1);try{yield this.apiService.refreshIdentityToken();const e=yield this.apiService.getSync();return yield this.syncProfile(e.profile),yield this.syncFolders(e.folders),yield this.syncCollections(e.collections),yield this.syncCiphers(e.ciphers),yield this.syncSends(e.sends),yield this.syncSettings(e.domains),yield this.syncPolicies(e.policies),yield this.setLastSync(n),this.syncCompleted(!0)}catch(r){if(t)throw r;return this.syncCompleted(!1)}}))}syncUpsertFolder(e,t){return o(this,void 0,void 0,(function*(){if(this.syncStarted(),yield this.stateService.getIsAuthenticated())try{const n=yield this.folderService.get(e.id);if(!t&&null==n||t&&null!=n&&n.revisionDate=e.revisionDate&&(n=!1);let r=!1;if(n&&(t?(n=null!=i,r=!0):null==e.collectionIds||null==e.organizationId?n=null==i:(n=!1,r=!0)),!n&&r&&null!=e.organizationId&&null!=e.collectionIds&&e.collectionIds.length>0){const t=yield this.collectionService.getAll();if(null!=t)for(let i=0;i-1){n=!0;break}}if(n){const t=yield this.apiService.getCipher(e.id);if(null!=t)return yield this.cipherService.upsert(new s.CipherData(t)),this.messagingService.send("syncedUpsertedCipher",{cipherId:e.id}),this.syncCompleted(!0)}}catch(n){if(null!=n&&404===n.statusCode&&t)return yield this.cipherService.delete(e.id),this.messagingService.send("syncedDeletedCipher",{cipherId:e.id}),this.syncCompleted(!0)}return this.syncCompleted(!1)}))}syncDeleteCipher(e){return o(this,void 0,void 0,(function*(){return this.syncStarted(),(yield this.stateService.getIsAuthenticated())?(yield this.cipherService.delete(e.id),this.messagingService.send("syncedDeletedCipher",{cipherId:e.id}),this.syncCompleted(!0)):this.syncCompleted(!1)}))}syncUpsertSend(e,t){return o(this,void 0,void 0,(function*(){if(this.syncStarted(),yield this.stateService.getIsAuthenticated())try{const n=yield this.sendService.get(e.id);if(!t&&null==n||t&&null!=n&&n.revisionDate{n[e.id]=new d.OrganizationData(e)}));const i={};e.providers.forEach((e=>{i[e.id]=new u.ProviderData(e)})),e.providerOrganizations.forEach((e=>{null==n[e.id]&&(n[e.id]=new d.OrganizationData(e),n[e.id].isProviderUser=!0)})),yield this.organizationService.save(n),yield this.providerService.save(i),(yield this.keyConnectorService.userNeedsMigration())?(yield this.keyConnectorService.setConvertAccountRequired(!0),this.messagingService.send("convertAccountToKeyConnector")):this.keyConnectorService.removeConvertAccountRequired()}))}syncFolders(e){return o(this,void 0,void 0,(function*(){const t={};return e.forEach((e=>{t[e.id]=new c.FolderData(e)})),yield this.folderService.replace(t)}))}syncCollections(e){return o(this,void 0,void 0,(function*(){const t={};return e.forEach((e=>{t[e.id]=new l.CollectionData(e)})),yield this.collectionService.replace(t)}))}syncCiphers(e){return o(this,void 0,void 0,(function*(){const t={};return e.forEach((e=>{t[e.id]=new s.CipherData(e)})),yield this.cipherService.replace(t)}))}syncSends(e){return o(this,void 0,void 0,(function*(){const t={};return e.forEach((e=>{t[e.id]=new m.SendData(e)})),yield this.sendService.replace(t)}))}syncSettings(e){return o(this,void 0,void 0,(function*(){let t=[];return null!=e&&null!=e.equivalentDomains&&(t=t.concat(e.equivalentDomains)),null!=e&&null!=e.globalEquivalentDomains&&e.globalEquivalentDomains.forEach((e=>{e.domains.length>0&&t.push(e.domains)})),this.settingsService.setEquivalentDomains(t)}))}syncPolicies(e){return o(this,void 0,void 0,(function*(){const t={};return null!=e&&e.forEach((e=>{t[e.id]=new p.PolicyData(e)})),yield this.policyService.replace(t)}))}}i([a.sequentialize((()=>"fullSync")),r("design:type",Function),r("design:paramtypes",[Boolean,Object]),r("design:returntype",Promise)],h.prototype,"fullSync",null),t.SyncService=h},7790:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TokenService=void 0;const r=n(82769);class o{constructor(e){this.stateService=e}static decodeToken(e){if(null==e)throw new Error("Token not provided.");const t=e.split(".");if(3!==t.length)throw new Error("JWT must have 3 parts");const n=r.Utils.fromUrlB64ToUtf8(t[1]);if(null==n)throw new Error("Cannot decode the token");return JSON.parse(n)}setTokens(e,t,n){return i(this,void 0,void 0,(function*(){yield this.setToken(e),yield this.setRefreshToken(t),null!=n&&(yield this.setClientId(n[0]),yield this.setClientSecret(n[1]))}))}setClientId(e){return i(this,void 0,void 0,(function*(){return yield this.stateService.setApiKeyClientId(e)}))}getClientId(){return i(this,void 0,void 0,(function*(){return yield this.stateService.getApiKeyClientId()}))}setClientSecret(e){return i(this,void 0,void 0,(function*(){return yield this.stateService.setApiKeyClientSecret(e)}))}getClientSecret(){return i(this,void 0,void 0,(function*(){return yield this.stateService.getApiKeyClientSecret()}))}setToken(e){return i(this,void 0,void 0,(function*(){yield this.stateService.setAccessToken(e)}))}getToken(){return i(this,void 0,void 0,(function*(){return yield this.stateService.getAccessToken()}))}setRefreshToken(e){return i(this,void 0,void 0,(function*(){return yield this.stateService.setRefreshToken(e)}))}getRefreshToken(){return i(this,void 0,void 0,(function*(){return yield this.stateService.getRefreshToken()}))}setTwoFactorToken(e){return i(this,void 0,void 0,(function*(){return yield this.stateService.setTwoFactorToken(e.twoFactorToken)}))}getTwoFactorToken(){return i(this,void 0,void 0,(function*(){return yield this.stateService.getTwoFactorToken()}))}clearTwoFactorToken(){return i(this,void 0,void 0,(function*(){return yield this.stateService.setTwoFactorToken(null)}))}clearToken(e){return i(this,void 0,void 0,(function*(){yield this.stateService.setAccessToken(null,{userId:e}),yield this.stateService.setRefreshToken(null,{userId:e}),yield this.stateService.setApiKeyClientId(null,{userId:e}),yield this.stateService.setApiKeyClientSecret(null,{userId:e})}))}decodeToken(e){return i(this,void 0,void 0,(function*(){const t=yield this.stateService.getDecodedToken();if(null===e&&null!=t)return t;if(null==(e=null!=e?e:yield this.stateService.getAccessToken()))throw new Error("Token not found.");return o.decodeToken(e)}))}getTokenExpirationDate(){return i(this,void 0,void 0,(function*(){const e=yield this.decodeToken();if(void 0===e.exp)return null;const t=new Date(0);return t.setUTCSeconds(e.exp),t}))}tokenSecondsRemaining(e=0){return i(this,void 0,void 0,(function*(){const t=yield this.getTokenExpirationDate();if(null==t)return 0;const n=t.valueOf()-((new Date).valueOf()+1e3*e);return Math.round(n/1e3)}))}tokenNeedsRefresh(e=5){return i(this,void 0,void 0,(function*(){return(yield this.tokenSecondsRemaining())<60*e}))}getUserId(){return i(this,void 0,void 0,(function*(){const e=yield this.decodeToken();if(void 0===e.sub)throw new Error("No user id found");return e.sub}))}getEmail(){return i(this,void 0,void 0,(function*(){const e=yield this.decodeToken();if(void 0===e.email)throw new Error("No email found");return e.email}))}getEmailVerified(){return i(this,void 0,void 0,(function*(){const e=yield this.decodeToken();if(void 0===e.email_verified)throw new Error("No email verification found");return e.email_verified}))}getName(){return i(this,void 0,void 0,(function*(){const e=yield this.decodeToken();return void 0===e.name?null:e.name}))}getPremium(){return i(this,void 0,void 0,(function*(){const e=yield this.decodeToken();return void 0!==e.premium&&e.premium}))}getIssuer(){return i(this,void 0,void 0,(function*(){const e=yield this.decodeToken();if(void 0===e.iss)throw new Error("No issuer found");return e.iss}))}getIsExternal(){return i(this,void 0,void 0,(function*(){const e=yield this.decodeToken();return Array.isArray(e.amr)&&e.amr.includes("external")}))}}t.TokenService=o},87703:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TotpService=void 0;const r=n(82769),o="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",a="23456789BCDFGHJKMNPQRTVWXY";t.TotpService=class{constructor(e,t,n){this.cryptoFunctionService=e,this.logService=t,this.stateService=n}getCode(e){return i(this,void 0,void 0,(function*(){if(null==e)return null;let t=30,n="sha1",i=6,o=e;const s=0===e.toLowerCase().indexOf("otpauth://"),l=!s&&0===e.toLowerCase().indexOf("steam://");if(s){const a=r.Utils.getQueryParams(e);if(a.has("digits")&&null!=a.get("digits"))try{const e=parseInt(a.get("digits").trim(),null);e>10?i=10:e>0&&(i=e)}catch(g){this.logService.error("Invalid digits param.")}if(a.has("period")&&null!=a.get("period"))try{const e=parseInt(a.get("period").trim(),null);e>0&&(t=e)}catch(y){this.logService.error("Invalid period param.")}if(a.has("secret")&&null!=a.get("secret")&&(o=a.get("secret")),a.has("algorithm")&&null!=a.get("algorithm")){const e=a.get("algorithm").toLowerCase();"sha1"!==e&&"sha256"!==e&&"sha512"!==e||(n=e)}}else l&&(o=e.substr("steam://".length),i=5);const c=Math.round((new Date).getTime()/1e3),d=this.leftPad(this.decToHex(Math.floor(c/t)),16,"0"),p=r.Utils.fromHexToArray(d),u=this.b32ToBytes(o);if(!u.length||!p.length)return null;const m=yield this.sign(u,p,n);if(0===m.length)return null;const h=15&m[m.length-1],v=(127&m[h])<<24|(255&m[h+1])<<16|(255&m[h+2])<<8|255&m[h+3];let f="";if(l){let e=2147483647&v;for(let t=0;t=e.length&&(e=Array(t+1-e.length).join(n)+e),e}decToHex(e){return(e<15.5?"0":"")+Math.round(e).toString(16)}b32ToHex(e){e=e.toUpperCase();let t="";for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorService=t.TwoFactorProviders=void 0;const i=n(97374);t.TwoFactorProviders={[i.TwoFactorProviderType.Authenticator]:{type:i.TwoFactorProviderType.Authenticator,name:null,description:null,priority:1,sort:1,premium:!1},[i.TwoFactorProviderType.Yubikey]:{type:i.TwoFactorProviderType.Yubikey,name:null,description:null,priority:3,sort:2,premium:!0},[i.TwoFactorProviderType.Duo]:{type:i.TwoFactorProviderType.Duo,name:"Duo",description:null,priority:2,sort:3,premium:!0},[i.TwoFactorProviderType.OrganizationDuo]:{type:i.TwoFactorProviderType.OrganizationDuo,name:"Duo (Organization)",description:null,priority:10,sort:4,premium:!1},[i.TwoFactorProviderType.Email]:{type:i.TwoFactorProviderType.Email,name:null,description:null,priority:0,sort:6,premium:!1},[i.TwoFactorProviderType.WebAuthn]:{type:i.TwoFactorProviderType.WebAuthn,name:null,description:null,priority:4,sort:5,premium:!0}};t.TwoFactorService=class{constructor(e,t){this.i18nService=e,this.platformUtilsService=t,this.selectedTwoFactorProviderType=null}init(){t.TwoFactorProviders[i.TwoFactorProviderType.Email].name=this.i18nService.t("emailTitle"),t.TwoFactorProviders[i.TwoFactorProviderType.Email].description=this.i18nService.t("emailDesc"),t.TwoFactorProviders[i.TwoFactorProviderType.Authenticator].name=this.i18nService.t("authenticatorAppTitle"),t.TwoFactorProviders[i.TwoFactorProviderType.Authenticator].description=this.i18nService.t("authenticatorAppDesc"),t.TwoFactorProviders[i.TwoFactorProviderType.Duo].description=this.i18nService.t("duoDesc"),t.TwoFactorProviders[i.TwoFactorProviderType.OrganizationDuo].name="Duo ("+this.i18nService.t("organization")+")",t.TwoFactorProviders[i.TwoFactorProviderType.OrganizationDuo].description=this.i18nService.t("duoOrganizationDesc"),t.TwoFactorProviders[i.TwoFactorProviderType.WebAuthn].name=this.i18nService.t("webAuthnTitle"),t.TwoFactorProviders[i.TwoFactorProviderType.WebAuthn].description=this.i18nService.t("webAuthnDesc"),t.TwoFactorProviders[i.TwoFactorProviderType.Yubikey].name=this.i18nService.t("yubiKeyTitle"),t.TwoFactorProviders[i.TwoFactorProviderType.Yubikey].description=this.i18nService.t("yubiKeyDesc")}getSupportedProviders(e){const n=[];return null==this.twoFactorProvidersData||(this.twoFactorProvidersData.has(i.TwoFactorProviderType.OrganizationDuo)&&this.platformUtilsService.supportsDuo()&&n.push(t.TwoFactorProviders[i.TwoFactorProviderType.OrganizationDuo]),this.twoFactorProvidersData.has(i.TwoFactorProviderType.Authenticator)&&n.push(t.TwoFactorProviders[i.TwoFactorProviderType.Authenticator]),this.twoFactorProvidersData.has(i.TwoFactorProviderType.Yubikey)&&n.push(t.TwoFactorProviders[i.TwoFactorProviderType.Yubikey]),this.twoFactorProvidersData.has(i.TwoFactorProviderType.Duo)&&this.platformUtilsService.supportsDuo()&&n.push(t.TwoFactorProviders[i.TwoFactorProviderType.Duo]),this.twoFactorProvidersData.has(i.TwoFactorProviderType.WebAuthn)&&this.platformUtilsService.supportsWebAuthn(e)&&n.push(t.TwoFactorProviders[i.TwoFactorProviderType.WebAuthn]),this.twoFactorProvidersData.has(i.TwoFactorProviderType.Email)&&n.push(t.TwoFactorProviders[i.TwoFactorProviderType.Email])),n}getDefaultProvider(e){if(null==this.twoFactorProvidersData)return null;if(null!=this.selectedTwoFactorProviderType&&this.twoFactorProvidersData.has(this.selectedTwoFactorProviderType))return this.selectedTwoFactorProviderType;let n=null,r=-1;return this.twoFactorProvidersData.forEach(((o,a)=>{const s=t.TwoFactorProviders[a];if(null!=s&&s.priority>r){if(a===i.TwoFactorProviderType.WebAuthn&&!e)return;n=a,r=s.priority}})),n}setSelectedProvider(e){this.selectedTwoFactorProviderType=e}clearSelectedProvider(){this.selectedTwoFactorProviderType=null}setProviders(e){this.twoFactorProvidersData=e.twoFactorProviders2}clearProviders(){this.twoFactorProvidersData=null}getProviders(){return this.twoFactorProvidersData}}},26981:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UserVerificationService=void 0;const r=n(44254),o=n(12680),a=n(36119);t.UserVerificationService=class{constructor(e,t,n){this.cryptoService=e,this.i18nService=t,this.apiService=n}buildRequest(e,t,n){return i(this,void 0,void 0,(function*(){this.validateInput(e);const i=null!=t?new t:new a.SecretVerificationRequest;return e.type===r.VerificationType.OTP?i.otp=e.secret:i.masterPasswordHash=n?e.secret:yield this.cryptoService.hashPassword(e.secret,null),i}))}verifyUser(e){return i(this,void 0,void 0,(function*(){if(this.validateInput(e),e.type===r.VerificationType.OTP){const n=new o.VerifyOTPRequest(e.secret);try{yield this.apiService.postAccountVerifyOTP(n)}catch(t){throw new Error(this.i18nService.t("invalidVerificationCode"))}}else{if(!(yield this.cryptoService.compareAndUpdateKeyHash(e.secret,null)))throw new Error(this.i18nService.t("invalidMasterPassword"))}return!0}))}requestOTP(){return i(this,void 0,void 0,(function*(){yield this.apiService.postAccountRequestOTP()}))}validateInput(e){if(null==(null==e?void 0:e.secret)||""===e.secret)throw e.type===r.VerificationType.OTP?new Error(this.i18nService.t("verificationCodeRequired")):new Error(this.i18nService.t("masterPassRequired"))}}},42133:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UsernameGenerationService=void 0;const r=n(40596),o={type:"word",wordCapitalize:!0,wordIncludeNumber:!0,subaddressType:"random",catchallType:"random",forwardedService:"simplelogin",forwardedAnonAddyDomain:"anonaddy.me"};t.UsernameGenerationService=class{constructor(e,t,n){this.cryptoService=e,this.stateService=t,this.apiService=n}generateUsername(e){return"catchall"===e.type?this.generateCatchall(e):"subaddress"===e.type?this.generateSubaddress(e):"forwarded"===e.type?this.generateForwarded(e):this.generateWord(e)}generateWord(e){return i(this,void 0,void 0,(function*(){const t=Object.assign({},o,e);null==t.wordCapitalize&&(t.wordCapitalize=!0),null==t.wordIncludeNumber&&(t.wordIncludeNumber=!0);const n=yield this.cryptoService.randomNumber(0,r.EEFLongWordList.length-1);let i=r.EEFLongWordList[n];if(t.wordCapitalize&&(i=i.charAt(0).toUpperCase()+i.slice(1)),t.wordIncludeNumber){const e=yield this.cryptoService.randomNumber(1,9999);i+=this.zeroPad(e.toString(),4)}return i}))}generateSubaddress(e){return i(this,void 0,void 0,(function*(){const t=Object.assign({},o,e),n=t.subaddressEmail;if(null==n||n.length<3)return t.subaddressEmail;const i=n.indexOf("@");if(i<1||i>=n.length-1)return n;null==t.subaddressType&&(t.subaddressType="random");const r=n.substr(0,i),a=n.substr(i+1,n.length);let s="";return"random"===t.subaddressType?s=yield this.randomString(8):"website-name"===t.subaddressType&&(s=t.website),r+"+"+s+"@"+a}))}generateCatchall(e){return i(this,void 0,void 0,(function*(){const t=Object.assign({},o,e);if(null==t.catchallDomain||""===t.catchallDomain)return null;null==t.catchallType&&(t.catchallType="random");let n="";return"random"===t.catchallType?n=yield this.randomString(8):"website-name"===t.catchallType&&(n=t.website),n+"@"+t.catchallDomain}))}generateForwarded(e){return i(this,void 0,void 0,(function*(){const t=Object.assign({},o,e);return null==t.forwardedService?null:"simplelogin"===t.forwardedService?null==t.forwardedSimpleLoginApiKey||""===t.forwardedSimpleLoginApiKey?null:this.generateSimpleLoginAlias(t.forwardedSimpleLoginApiKey,t.website):"anonaddy"===t.forwardedService?null==t.forwardedAnonAddyApiToken||""===t.forwardedAnonAddyApiToken||null==t.forwardedAnonAddyDomain||""==t.forwardedAnonAddyDomain?null:this.generateAnonAddyAlias(t.forwardedAnonAddyApiToken,t.forwardedAnonAddyDomain,t.website):"firefoxrelay"===t.forwardedService?null==t.forwardedFirefoxApiToken||""===t.forwardedFirefoxApiToken?null:this.generateFirefoxRelayAlias(t.forwardedFirefoxApiToken,t.website):null}))}getOptions(){return i(this,void 0,void 0,(function*(){let e=yield this.stateService.getUsernameGenerationOptions();return e=null==e?Object.assign({},o):Object.assign({},o,e),yield this.stateService.setUsernameGenerationOptions(e),e}))}saveOptions(e){return i(this,void 0,void 0,(function*(){yield this.stateService.setUsernameGenerationOptions(e)}))}randomString(e){return i(this,void 0,void 0,(function*(){let t="";const n="abcdefghijklmnopqrstuvwxyz1234567890";for(let i=0;i=t?e:new Array(t-e.length+1).join("0")+e}generateSimpleLoginAlias(e,t){return i(this,void 0,void 0,(function*(){if(null==e||""===e)throw"Invalid SimpleLogin API key.";const n={redirect:"manual",cache:"no-store",method:"POST",headers:new Headers({Authentication:e,"Content-Type":"application/json"})};let i="https://app.simplelogin.io/api/alias/random/new";null!=t&&(i+="?hostname="+t),n.body=JSON.stringify({note:(null!=t?"Website: "+t+". ":"")+"Generated by Bitwarden."});const r=new Request(i,n),o=yield this.apiService.nativeFetch(r);if(200===o.status||201===o.status){return(yield o.json()).alias}if(401===o.status)throw"Invalid SimpleLogin API key.";try{const e=yield o.json();if(null!=(null==e?void 0:e.error))throw"SimpleLogin error:"+e.error}catch(a){}throw"Unknown SimpleLogin error occurred."}))}generateAnonAddyAlias(e,t,n){var r;return i(this,void 0,void 0,(function*(){if(null==e||""===e)throw"Invalid AnonAddy API token.";const i={redirect:"manual",cache:"no-store",method:"POST",headers:new Headers({Authorization:"Bearer "+e,"Content-Type":"application/json"})};i.body=JSON.stringify({domain:t,description:(null!=n?"Website: "+n+". ":"")+"Generated by Bitwarden."});const o=new Request("https://app.anonaddy.com/api/v1/aliases",i),a=yield this.apiService.nativeFetch(o);if(200===a.status||201===a.status){const e=yield a.json();return null===(r=null==e?void 0:e.data)||void 0===r?void 0:r.email}if(401===a.status)throw"Invalid AnonAddy API token.";throw"Unknown AnonAddy error occurred."}))}generateFirefoxRelayAlias(e,t){return i(this,void 0,void 0,(function*(){if(null==e||""===e)throw"Invalid Firefox Relay API token.";const n={redirect:"manual",cache:"no-store",method:"POST",headers:new Headers({Authorization:"Token "+e,"Content-Type":"application/json"})};n.body=JSON.stringify({enabled:!0,generated_for:t,description:(null!=t?t+" - ":"")+"Generated by Bitwarden."});const i=new Request("https://relay.firefox.com/api/v1/relayaddresses/",n),r=yield this.apiService.nativeFetch(i);if(200===r.status||201===r.status){const e=yield r.json();return null==e?void 0:e.full_address}if(401===r.status)throw"Invalid Firefox Relay API token.";throw"Unknown Firefox Relay error occurred."}))}}},44988:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.VaultTimeoutService=void 0;const r=n(72440),o=n(49906);t.VaultTimeoutService=class{constructor(e,t,n,i,r,o,a,s,l,c,d,p,u=null,m=null){this.cipherService=e,this.folderService=t,this.collectionService=n,this.cryptoService=i,this.platformUtilsService=r,this.messagingService=o,this.searchService=a,this.tokenService=s,this.policyService=l,this.keyConnectorService=c,this.stateService=d,this.authService=p,this.lockedCallback=u,this.loggedOutCallback=m,this.inited=!1}init(e){this.inited||(this.inited=!0,e&&this.startCheck())}startCheck(){this.checkVaultTimeout(),setInterval((()=>this.checkVaultTimeout()),1e4)}checkVaultTimeout(){return i(this,void 0,void 0,(function*(){if(!(yield this.platformUtilsService.isViewOpen()))for(const e in this.stateService.accounts.getValue())null!=e&&(yield this.shouldLock(e))&&(yield this.executeTimeoutAction(e))}))}lock(e=!1,t){return i(this,void 0,void 0,(function*(){if(yield this.stateService.getIsAuthenticated({userId:t})){if(yield this.keyConnectorService.getUsesKeyConnector()){const e=yield this.isPinLockSet();e[0]&&null!=(yield this.stateService.getDecryptedPinProtected())||e[1]||(yield this.isBiometricLockSet())||(yield this.logOut(t))}null!=t&&t!==(yield this.stateService.getUserId())||this.searchService.clearIndex(),yield this.stateService.setEverBeenUnlocked(!0,{userId:t}),yield this.stateService.setBiometricLocked(!0,{userId:t}),yield this.stateService.setCryptoMasterKeyAuto(null,{userId:t}),yield this.cryptoService.clearKey(!1,t),yield this.cryptoService.clearOrgKeys(!0,t),yield this.cryptoService.clearKeyPair(!0,t),yield this.cryptoService.clearEncKey(!0,t),yield this.folderService.clearCache(t),yield this.cipherService.clearCache(t),yield this.collectionService.clearCache(t),this.messagingService.send("locked",{userId:t}),null!=this.lockedCallback&&(yield this.lockedCallback(t))}}))}logOut(e){return i(this,void 0,void 0,(function*(){null!=this.loggedOutCallback&&(yield this.loggedOutCallback(!1,e))}))}setVaultTimeoutOptions(e,t){return i(this,void 0,void 0,(function*(){yield this.stateService.setVaultTimeout(e);const n=yield this.tokenService.getToken(),i=yield this.tokenService.getRefreshToken(),r=yield this.tokenService.getClientId(),o=yield this.tokenService.getClientSecret(),a=yield this.stateService.getVaultTimeoutAction();null==e&&0!==e||"logOut"!==t||t===a||(yield this.tokenService.clearToken()),yield this.stateService.setVaultTimeoutAction(t),yield this.tokenService.setToken(n),yield this.tokenService.setRefreshToken(i),yield this.tokenService.setClientId(r),yield this.tokenService.setClientSecret(o),yield this.cryptoService.toggleKey()}))}isPinLockSet(){return i(this,void 0,void 0,(function*(){return[null!=(yield this.stateService.getProtectedPin()),null!=(yield this.stateService.getEncryptedPinProtected())]}))}isBiometricLockSet(){return i(this,void 0,void 0,(function*(){return yield this.stateService.getBiometricUnlock()}))}getVaultTimeout(e){return i(this,void 0,void 0,(function*(){const t=yield this.stateService.getVaultTimeout({userId:e});if(yield this.policyService.policyAppliesToUser(o.PolicyType.MaximumVaultTimeout,null,e)){const n=yield this.policyService.getAll(o.PolicyType.MaximumVaultTimeout,e);let i=Math.min(t,n[0].data.minutes);return(null==t||i<0)&&(i=n[0].data.minutes),t!==i&&(yield this.stateService.setVaultTimeout(i,{userId:e})),i}return t}))}clear(e){return i(this,void 0,void 0,(function*(){yield this.stateService.setEverBeenUnlocked(!1,{userId:e}),yield this.stateService.setDecryptedPinProtected(null,{userId:e}),yield this.stateService.setProtectedPin(null,{userId:e})}))}shouldLock(e){return i(this,void 0,void 0,(function*(){const t=yield this.authService.getAuthStatus(e);if(t===r.AuthenticationStatus.Locked||t===r.AuthenticationStatus.LoggedOut)return!1;const n=yield this.getVaultTimeout(e);if(null==n||n<0)return!1;const i=yield this.stateService.getLastActive({userId:e});if(null==i)return!1;const o=60*n;return((new Date).getTime()-i)/1e3>=o}))}executeTimeoutAction(e){return i(this,void 0,void 0,(function*(){"logOut"===(yield this.stateService.getVaultTimeoutAction({userId:e}))?yield this.logOut(e):yield this.lock(!0,e)}))}}},75408:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.WebCryptoFunctionService=void 0;const r=n(22079),o=n(82769),a=n(15755);t.WebCryptoFunctionService=class{constructor(e){this.crypto=void 0!==e.crypto?e.crypto:null,this.subtle=this.crypto&&void 0!==e.crypto.subtle?e.crypto.subtle:null}pbkdf2(e,t,n,r){return i(this,void 0,void 0,(function*(){const i="sha256"===n?256:512,o=this.toBuf(e),a={name:"PBKDF2",salt:this.toBuf(t),iterations:r,hash:{name:this.toWebCryptoAlgorithm(n)}},s=yield this.subtle.importKey("raw",o,{name:"PBKDF2"},!1,["deriveBits"]);return yield this.subtle.deriveBits(a,s,i)}))}hkdf(e,t,n,r,o){return i(this,void 0,void 0,(function*(){const i={name:"HKDF",salt:this.toBuf(t),info:this.toBuf(n),hash:{name:this.toWebCryptoAlgorithm(o)}},a=yield this.subtle.importKey("raw",e,{name:"HKDF"},!1,["deriveBits"]);return yield this.subtle.deriveBits(i,a,8*r)}))}hkdfExpand(e,t,n,r){return i(this,void 0,void 0,(function*(){const i="sha256"===r?32:64;if(n>255*i)throw new Error("outputByteSize is too large.");if(new Uint8Array(e).length=n)break}return d.slice(0,n).buffer}))}hash(e,t){return i(this,void 0,void 0,(function*(){if("md5"===t){const n="md5"===t?r.md.md5.create():r.md.sha1.create(),i=this.toByteString(e);return n.update(i,"raw"),o.Utils.fromByteStringToArray(n.digest().data).buffer}const n=this.toBuf(e);return yield this.subtle.digest({name:this.toWebCryptoAlgorithm(t)},n)}))}hmac(e,t,n){return i(this,void 0,void 0,(function*(){const i={name:"HMAC",hash:{name:this.toWebCryptoAlgorithm(n)}},r=yield this.subtle.importKey("raw",t,i,!1,["sign"]);return yield this.subtle.sign(i,r,e)}))}compare(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.randomBytes(32),i={name:"HMAC",hash:{name:"SHA-256"}},r=yield this.subtle.importKey("raw",n,i,!1,["sign"]),o=yield this.subtle.sign(i,r,e),a=yield this.subtle.sign(i,r,t);if(o.byteLength!==a.byteLength)return!1;const s=new Uint8Array(o),l=new Uint8Array(a);for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BadgeComponent=void 0;n(32621);const i=n(32621),r={primary:["tw-bg-primary-500"],secondary:["tw-bg-text-muted"],success:["tw-bg-success-500"],danger:["tw-bg-danger-500"],warning:["tw-bg-warning-500"],info:["tw-bg-info-500"]},o={primary:["hover:tw-bg-primary-700"],secondary:["hover:tw-bg-secondary-700"],success:["hover:tw-bg-success-700"],danger:["hover:tw-bg-danger-700"],warning:["hover:tw-bg-warning-700"],info:["hover:tw-bg-info-700"]};class a{constructor(e){var t;this.el=e,this.classList="",this.badgeType="primary",this.isSpan=!1,this.isSpan="SPAN"==(null===(t=null==e?void 0:e.nativeElement)||void 0===t?void 0:t.nodeName)}ngOnInit(){this.classList=this.classes.join(" ")}ngOnChanges(){this.ngOnInit()}get classes(){return["tw-inline-block","tw-py-1","tw-px-1.5","tw-font-bold","tw-leading-none","tw-text-center","!tw-text-contrast","tw-rounded","tw-border-none","tw-box-border","tw-whitespace-no-wrap","tw-text-xs","hover:tw-no-underline","focus:tw-outline-none","focus:tw-ring","focus:tw-ring-offset-2","focus:tw-ring-primary-700"].concat(r[this.badgeType]).concat(this.isSpan?[]:o[this.badgeType])}}t.BadgeComponent=a,a.ɵfac=function(e){return new(e||a)(i.ɵɵdirectiveInject(i.ElementRef))},a.ɵdir=i.ɵɵdefineDirective({type:a,selectors:[["span","bit-badge",""],["a","bit-badge",""],["button","bit-badge",""]],hostVars:2,hostBindings:function(e,t){2&e&&i.ɵɵclassMap(t.classList)},inputs:{classList:["class","classList"],badgeType:"badgeType"},features:[i.ɵɵNgOnChangesFeature]})},41889:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BadgeModule=void 0;const i=n(57490),r=n(32621);class o{}t.BadgeModule=o,o.ɵfac=function(e){return new(e||o)},o.ɵmod=r.ɵɵdefineNgModule({type:o}),o.ɵinj=r.ɵɵdefineInjector({imports:[[i.CommonModule]]})},97407:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(25108),t),r(n(41889),t)},82768:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BannerComponent=void 0;const i=n(32621),r=n(32621),o=n(57490);function a(e,t){if(1&e&&r.ɵɵelement(0,"i",5),2&e){const e=r.ɵɵnextContext();r.ɵɵproperty("ngClass",e.icon)}}function s(e,t){1&e&&r.ɵɵelement(0,"i",6)}const l={premium:"bwi-star",info:"bwi-info-circle",warning:"bwi-exclamation-triangle",danger:"bwi-error"};class c{constructor(){this.bannerType="info",this.useAlertRole=!0,this.onClose=new i.EventEmitter}ngOnInit(){var e;null!==(e=this.icon)&&void 0!==e||(this.icon=l[this.bannerType])}get bannerClass(){switch(this.bannerType){case"danger":return"tw-bg-danger-500";case"info":return"tw-bg-info-500";case"premium":return"tw-bg-success-500";case"warning":return"tw-bg-warning-500"}}}t.BannerComponent=c,c.ɵfac=function(e){return new(e||c)},c.ɵcmp=r.ɵɵdefineComponent({type:c,selectors:[["bit-banner"]],inputs:{bannerType:"bannerType",icon:"icon",useAlertRole:"useAlertRole"},outputs:{onClose:"onClose"},ngContentSelectors:["*"],decls:15,vars:5,consts:[[1,"tw-py-2.5","tw-px-4","tw-text-contrast","tw-flex","tw-gap-2","tw-items-center",3,"ngClass"],["class","bwi tw-align-middle","aria-hidden","true",3,"ngClass",4,"ngIf"],[1,"tw-text-base","tw-grow"],[1,"tw-border-0","tw-bg-transparent","tw-text-contrast","tw-p-0",3,"click"],["class","bwi bwi-close tw-text-sm","aria-hidden","true",4,"ngIf"],["aria-hidden","true",1,"bwi","tw-align-middle",3,"ngClass"],["aria-hidden","true",1,"bwi","bwi-close","tw-text-sm"]],template:function(e,t){1&e&&(r.ɵɵprojectionDef(),r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵtemplate(2,a,1,1,"i",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"span",2),r.ɵɵtext(5,"\n "),r.ɵɵprojection(6),r.ɵɵtext(7,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"button",3),r.ɵɵlistener("click",(function(){return t.onClose.emit()})),r.ɵɵtext(10,"\n "),r.ɵɵtemplate(11,s,1,0,"i",4),r.ɵɵtext(12,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(13,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(14,"\n")),2&e&&(r.ɵɵproperty("ngClass",t.bannerClass),r.ɵɵattribute("role",t.useAlertRole?"status":null)("aria-live",t.useAlertRole?"polite":null),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.icon),r.ɵɵadvance(9),r.ɵɵproperty("ngIf",t.icon))},directives:[o.NgClass,o.NgIf],encapsulation:2})},84352:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BannerModule=void 0;const i=n(57490),r=n(32621);class o{}t.BannerModule=o,o.ɵfac=function(e){return new(e||o)},o.ɵmod=r.ɵɵdefineNgModule({type:o}),o.ɵinj=r.ɵɵdefineInjector({imports:[[i.CommonModule]]})},63229:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(82768),t),r(n(84352),t)},52767:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ButtonComponent=void 0;const i=n(32621),r={primary:["tw-border-primary-500","tw-bg-primary-500","!tw-text-contrast","hover:tw-bg-primary-700","hover:tw-border-primary-700","focus:tw-bg-primary-700","focus:tw-border-primary-700"].join(" "),secondary:["tw-bg-transparent","tw-border-text-muted","!tw-text-muted","hover:tw-bg-secondary-500","hover:tw-border-secondary-500","hover:!tw-text-contrast","focus:tw-bg-secondary-500","focus:tw-border-secondary-500","focus:!tw-text-contrast"].join(" "),danger:["tw-bg-transparent","tw-border-danger-500","!tw-text-danger","hover:tw-bg-danger-500","hover:tw-border-danger-500","hover:!tw-text-contrast","focus:tw-bg-danger-500","focus:tw-border-danger-500","focus:!tw-text-contrast"].join(" ")};class o{constructor(){this.classList="",this.buttonType="secondary",this.block=!1}ngOnInit(){this.classList=this.classes.join(" ")}ngOnChanges(){this.ngOnInit()}get classes(){var e;return["tw-font-semibold","tw-py-1.5","tw-px-3","tw-rounded","tw-transition","tw-border","tw-border-solid","tw-text-center","hover:tw-no-underline","disabled:tw-bg-secondary-100","disabled:tw-border-secondary-100","disabled:!tw-text-main","focus:tw-outline-none","focus:tw-ring","focus:tw-ring-offset-2","focus:tw-ring-primary-700",this.block?"tw-w-full tw-block":"tw-inline-block",r[null!==(e=this.buttonType)&&void 0!==e?e:"secondary"]]}}t.ButtonComponent=o,o.ɵfac=function(e){return new(e||o)},o.ɵdir=i.ɵɵdefineDirective({type:o,selectors:[["button","bit-button",""],["a","bit-button",""]],hostVars:2,hostBindings:function(e,t){2&e&&i.ɵɵclassMap(t.classList)},inputs:{classList:"classList",buttonType:"buttonType",block:"block"},features:[i.ɵɵNgOnChangesFeature]})},10549:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ButtonModule=void 0;const i=n(57490),r=n(32621);class o{}t.ButtonModule=o,o.ɵfac=function(e){return new(e||o)},o.ɵmod=r.ɵɵdefineNgModule({type:o}),o.ɵinj=r.ɵɵdefineInjector({imports:[[i.CommonModule]]})},47236:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(52767),t),r(n(10549),t)},20138:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CalloutComponent=void 0;n(51554);const i=n(32621),r=n(51554),o=n(57490);function a(e,t){if(1&e&&i.ɵɵelement(0,"i",4),2&e){const e=i.ɵɵnextContext(2);i.ɵɵclassMapInterpolate1("bwi ",e.icon,"")}}function s(e,t){if(1&e&&(i.ɵɵelementStart(0,"h3",2),i.ɵɵtext(1,"\n "),i.ɵɵtemplate(2,a,1,3,"i",3),i.ɵɵtext(3),i.ɵɵelementEnd()),2&e){const e=i.ɵɵnextContext();i.ɵɵproperty("ngClass",e.headerClass),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",e.icon),i.ɵɵadvance(1),i.ɵɵtextInterpolate1("\n ",e.title,"\n ")}}const l={success:"bwi-check",info:"bwi-info-circle",warning:"bwi-exclamation-triangle",danger:"bwi-error"},c={warning:"warning",danger:"error"};class d{constructor(e){this.i18nService=e,this.type="info",this.useAlertRole=!1}ngOnInit(){var e;null!==(e=this.icon)&&void 0!==e||(this.icon=l[this.type]),null==this.title&&null!=c[this.type]&&(this.title=this.i18nService.t(c[this.type]))}get calloutClass(){switch(this.type){case"danger":return"tw-border-l-danger-500";case"info":return"tw-border-l-info-500";case"success":return"tw-border-l-success-500";case"warning":return"tw-border-l-warning-500"}}get headerClass(){switch(this.type){case"danger":return"!tw-text-danger";case"info":return"!tw-text-info";case"success":return"!tw-text-success";case"warning":return"!tw-text-warning"}}}t.CalloutComponent=d,d.ɵfac=function(e){return new(e||d)(i.ɵɵdirectiveInject(r.I18nService))},d.ɵcmp=i.ɵɵdefineComponent({type:d,selectors:[["bit-callout"]],inputs:{type:"type",icon:"icon",title:"title",useAlertRole:"useAlertRole"},ngContentSelectors:["*"],decls:7,vars:2,consts:[[1,"tw-py-3","tw-px-5","tw-mb-4","tw-leading-5","tw-rounded","tw-bg-background-alt","tw-border","tw-border-secondary-300","tw-border-solid","tw-box-border","tw-border-l-8","tw-text-main",3,"ngClass"],["class","tw-mt-0 tw-mb-2 tw-text-base tw-font-bold tw-uppercase",3,"ngClass",4,"ngIf"],[1,"tw-mt-0","tw-mb-2","tw-text-base","tw-font-bold","tw-uppercase",3,"ngClass"],["aria-hidden","true",3,"class",4,"ngIf"],["aria-hidden","true"]],template:function(e,t){1&e&&(i.ɵɵprojectionDef(),i.ɵɵelementStart(0,"div",0),i.ɵɵtext(1,"\n "),i.ɵɵtemplate(2,s,4,3,"h3",1),i.ɵɵtext(3,"\n "),i.ɵɵprojection(4),i.ɵɵtext(5,"\n"),i.ɵɵelementEnd(),i.ɵɵtext(6,"\n")),2&e&&(i.ɵɵproperty("ngClass",t.calloutClass),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",t.title))},directives:[o.NgClass,o.NgIf],encapsulation:2})},3509:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CalloutModule=void 0;const i=n(57490),r=n(32621);class o{}t.CalloutModule=o,o.ɵfac=function(e){return new(e||o)},o.ɵmod=r.ɵɵdefineNgModule({type:o}),o.ɵinj=r.ɵɵdefineInjector({imports:[[i.CommonModule]]})},69297:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(3509),t),r(n(20138),t)},30202:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(97407),t),r(n(63229),t),r(n(47236),t),r(n(69297),t),r(n(79762),t)},79762:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(59912),t),r(n(44653),t),r(n(6373),t),r(n(62985),t),r(n(37342),t)},37342:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MenuDividerComponent=void 0;const i=n(32621);class r{}t.MenuDividerComponent=r,r.ɵfac=function(e){return new(e||r)},r.ɵcmp=i.ɵɵdefineComponent({type:r,selectors:[["bit-menu-divider"]],decls:2,vars:0,consts:[["role","separator",1,"tw-border-solid","tw-border-0","tw-border-t","tw-border-t-secondary-500","tw-my-2"]],template:function(e,t){1&e&&(i.ɵɵelement(0,"div",0),i.ɵɵtext(1,"\n"))},encapsulation:2})},62985:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MenuItemComponent=void 0;n(32621);const i=n(32621);class r{constructor(e){this.elementRef=e,this.classList=["tw-block","tw-py-1","tw-px-4","!tw-text-main","!tw-no-underline","tw-cursor-pointer","tw-border-none","tw-bg-background","tw-text-left","hover:tw-bg-secondary-100","focus:tw-bg-secondary-100","focus:tw-z-50","focus:tw-outline-none","focus:tw-ring","focus:tw-ring-offset-2","focus:tw-ring-primary-700","active:!tw-ring-0","active:!tw-ring-offset-0"].join(" "),this.role="menuitem",this.tabIndex="-1"}focus(){this.elementRef.nativeElement.focus()}}t.MenuItemComponent=r,r.ɵfac=function(e){return new(e||r)(i.ɵɵdirectiveInject(i.ElementRef))},r.ɵcmp=i.ɵɵdefineComponent({type:r,selectors:[["","bit-menu-item",""]],hostVars:4,hostBindings:function(e,t){2&e&&(i.ɵɵhostProperty("tabIndex",t.tabIndex),i.ɵɵattribute("role",t.role),i.ɵɵclassMap(t.classList))},attrs:["bit-menu-item",""],ngContentSelectors:["*"],decls:1,vars:0,template:function(e,t){1&e&&(i.ɵɵprojectionDef(),i.ɵɵprojection(0))},encapsulation:2})},6373:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MenuTriggerForDirective=void 0;n(2336);const i=n(80872),r=(n(32621),n(14857)),o=(n(44653),n(32621)),a=n(2336);class s{constructor(e,t,n){this.elementRef=e,this.viewContainerRef=t,this.overlay=n,this.isOpen=!1,this.hasPopup="menu",this.role="button",this.defaultMenuConfig={panelClass:"bit-menu-panel",hasBackdrop:!0,backdropClass:"cdk-overlay-transparent-backdrop",scrollStrategy:this.overlay.scrollStrategies.reposition(),positionStrategy:this.overlay.position().flexibleConnectedTo(this.elementRef).withPositions([{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}]).withLockedPosition(!0).withFlexibleDimensions(!1).withPush(!1)}}toggleMenu(){this.isOpen?this.destroyMenu():this.openMenu()}ngOnDestroy(){this.disposeAll()}openMenu(){if(null==this.menu)throw new Error("Cannot find bit-menu element");this.isOpen=!0,this.overlayRef=this.overlay.create(this.defaultMenuConfig);const e=new i.TemplatePortal(this.menu.templateRef,this.viewContainerRef);this.overlayRef.attach(e),this.closedEventsSub=this.getClosedEvents().subscribe((e=>{"Tab"===(null==e?void 0:e.key)&&this.elementRef.nativeElement.focus(),this.destroyMenu()})),this.keyDownEventsSub=this.overlayRef.keydownEvents().subscribe((e=>this.menu.keyManager.onKeydown(e)))}destroyMenu(){null!=this.overlayRef&&this.isOpen&&(this.isOpen=!1,this.disposeAll())}getClosedEvents(){const e=this.overlayRef.detachments(),t=this.overlayRef.keydownEvents().pipe(r.filter((e=>"Escape"===e.key||"Tab"===e.key))),n=this.overlayRef.backdropClick(),i=this.menu.closed;return e.pipe(r.mergeWith(t,n,i))}disposeAll(){var e,t,n;null===(e=this.closedEventsSub)||void 0===e||e.unsubscribe(),null===(t=this.overlayRef)||void 0===t||t.dispose(),null===(n=this.keyDownEventsSub)||void 0===n||n.unsubscribe()}}t.MenuTriggerForDirective=s,s.ɵfac=function(e){return new(e||s)(o.ɵɵdirectiveInject(o.ElementRef),o.ɵɵdirectiveInject(o.ViewContainerRef),o.ɵɵdirectiveInject(a.Overlay))},s.ɵdir=o.ɵɵdefineDirective({type:s,selectors:[["","bitMenuTriggerFor",""]],hostVars:3,hostBindings:function(e,t){1&e&&o.ɵɵlistener("click",(function(){return t.toggleMenu()})),2&e&&o.ɵɵattribute("aria-expanded",t.isOpen)("aria-haspopup",t.hasPopup)("role",t.role)},inputs:{menu:["bitMenuTriggerFor","menu"]}})},44653:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MenuComponent=void 0;const i=n(46915),r=n(32621),o=n(62985),a=n(32621);function s(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵtext(0,"\n "),a.ɵɵelementStart(1,"div",0),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);return a.ɵɵnextContext().closed.emit()})),a.ɵɵtext(2,"\n "),a.ɵɵprojection(3),a.ɵɵtext(4,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n")}}class l{constructor(){this.closed=new r.EventEmitter}ngAfterContentInit(){this.keyManager=new i.FocusKeyManager(this.menuItems).withWrap()}}t.MenuComponent=l,l.ɵfac=function(e){return new(e||l)},l.ɵcmp=a.ɵɵdefineComponent({type:l,selectors:[["bit-menu"]],contentQueries:function(e,t,n){if(1&e&&a.ɵɵcontentQuery(n,o.MenuItemComponent,5),2&e){let e;a.ɵɵqueryRefresh(e=a.ɵɵloadQuery())&&(t.menuItems=e)}},viewQuery:function(e,t){if(1&e&&a.ɵɵviewQuery(r.TemplateRef,5),2&e){let e;a.ɵɵqueryRefresh(e=a.ɵɵloadQuery())&&(t.templateRef=e.first)}},outputs:{closed:"closed"},exportAs:["menuComponent"],ngContentSelectors:["*"],decls:2,vars:0,consts:[["role","menu",1,"tw-flex","tw-flex-col","tw-bg-background","tw-border","tw-border-solid","tw-rounded","tw-border-secondary-500","tw-bg-clip-padding","tw-py-2","tw-shrink-0",3,"click"]],template:function(e,t){1&e&&(a.ɵɵprojectionDef(),a.ɵɵtemplate(0,s,6,0,"ng-template"),a.ɵɵtext(1,"\n"))},encapsulation:2})},59912:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MenuModule=void 0;const i=n(2336),r=n(57490),o=n(32621);class a{}t.MenuModule=a,a.ɵfac=function(e){return new(e||a)},a.ɵmod=o.ɵɵdefineNgModule({type:a}),a.ɵinj=o.ɵɵdefineInjector({imports:[[r.CommonModule,i.OverlayModule]]})},15156:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StateService=void 0;const i=n(73569);class r extends i.StateService{}t.StateService=r},33642:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AcceptEmergencyComponent=void 0;n(68012),n(91674),n(51554),n(73828),n(73569);const r=n(51128),o=n(50009),a=n(32621),s=n(68012),l=n(73828),c=n(51554),d=n(91674),p=n(73569),u=n(57490),m=n(99729);function h(e,t){1&e&&(a.ɵɵelementStart(0,"div",2),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div"),a.ɵɵtext(3,"\n "),a.ɵɵelement(4,"img",3),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"p",4),a.ɵɵtext(7,"\n "),a.ɵɵelement(8,"i",5),a.ɵɵpipe(9,"i18n"),a.ɵɵtext(10,"\n "),a.ɵɵelementStart(11,"span",6),a.ɵɵtext(12),a.ɵɵpipe(13,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(15,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(16,"\n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(8),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(9,2,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(13,4,"loading")))}const v=function(e){return{email:e}};function f(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",7),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",8),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"div",9),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"p",10),a.ɵɵtext(7),a.ɵɵpipe(8,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(9,"\n "),a.ɵɵelementStart(10,"div",11),a.ɵɵtext(11,"\n "),a.ɵɵelementStart(12,"div",12),a.ɵɵtext(13,"\n "),a.ɵɵelementStart(14,"p",4),a.ɵɵtext(15),a.ɵɵelementEnd(),a.ɵɵtext(16,"\n "),a.ɵɵelementStart(17,"p"),a.ɵɵtext(18),a.ɵɵpipe(19,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(20,"\n "),a.ɵɵelement(21,"hr"),a.ɵɵtext(22,"\n "),a.ɵɵelementStart(23,"div",13),a.ɵɵtext(24,"\n "),a.ɵɵelementStart(25,"a",14),a.ɵɵtext(26),a.ɵɵpipe(27,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(28,"\n "),a.ɵɵelementStart(29,"a",15),a.ɵɵtext(30),a.ɵɵpipe(31,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(32,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(33,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(34,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(35,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(36,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(37,"\n"),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext();a.ɵɵadvance(7),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(8,7,"emergencyAccess")),a.ɵɵadvance(8),a.ɵɵtextInterpolate1("\n ",e.name,"\n "),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(19,9,"acceptEmergencyAccess")),a.ɵɵadvance(7),a.ɵɵproperty("queryParams",a.ɵɵpureFunction1(15,v,e.email)),a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(27,11,"logIn"),"\n "),a.ɵɵadvance(3),a.ɵɵproperty("queryParams",a.ɵɵpureFunction1(17,v,e.email)),a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(31,13,"createAccount"),"\n ")}}class g extends o.BaseAcceptComponent{constructor(e,t,n,i,r,o){super(e,t,n,i,o),this.apiService=r,this.requiredParameters=["id","name","email","token"],this.failedShortMessage="emergencyInviteAcceptFailedShort",this.failedMessage="emergencyInviteAcceptFailed"}authedHandler(e){return i(this,void 0,void 0,(function*(){const t=new r.EmergencyAccessAcceptRequest;t.token=e.token,this.actionPromise=this.apiService.postEmergencyAccessAccept(e.id,t),yield this.actionPromise,this.platformUtilService.showToast("success",this.i18nService.t("inviteAccepted"),this.i18nService.t("emergencyInviteAcceptedDesc"),{timeout:1e4}),this.router.navigate(["/vault"])}))}unauthedHandler(e){return i(this,void 0,void 0,(function*(){this.name=e.name,null!=this.name&&(this.name=this.name.replace(/\+/g," "))}))}}t.AcceptEmergencyComponent=g,g.ɵfac=function(e){return new(e||g)(a.ɵɵdirectiveInject(s.Router),a.ɵɵdirectiveInject(l.PlatformUtilsService),a.ɵɵdirectiveInject(c.I18nService),a.ɵɵdirectiveInject(s.ActivatedRoute),a.ɵɵdirectiveInject(d.ApiService),a.ɵɵdirectiveInject(p.StateService))},g.ɵcmp=a.ɵɵdefineComponent({type:g,selectors:[["app-accept-emergency"]],features:[a.ɵɵInheritDefinitionFeature],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,t){1&e&&(a.ɵɵtemplate(0,h,17,6,"div",0),a.ɵɵtext(1,"\n"),a.ɵɵtemplate(2,f,38,19,"div",1),a.ɵɵtext(3,"\n")),2&e&&(a.ɵɵproperty("ngIf",t.loading),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!t.loading&&!t.authed))},directives:[u.NgIf,s.RouterLinkWithHref],pipes:[m.I18nPipe],encapsulation:2})},4802:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AcceptOrganizationComponent=void 0;n(68012),n(91674),n(85714),n(51554),n(36631),n(73828),n(62166),n(73569);const r=n(82769),o=n(1992),a=n(27784),s=n(50009),l=n(32621),c=n(68012),d=n(73828),p=n(51554),u=n(91674),m=n(73569),h=n(85714),v=n(62166),f=n(36631),g=n(57490),y=n(99729);function x(e,t){1&e&&(l.ɵɵelementStart(0,"div",2),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div"),l.ɵɵtext(3,"\n "),l.ɵɵelement(4,"img",3),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"p",4),l.ɵɵtext(7,"\n "),l.ɵɵelement(8,"i",5),l.ɵɵpipe(9,"i18n"),l.ɵɵtext(10,"\n "),l.ɵɵelementStart(11,"span",6),l.ɵɵtext(12),l.ɵɵpipe(13,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(14,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(15,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(16,"\n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(8),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(9,2,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(13,4,"loading")))}const S=function(e){return{email:e}};function b(e,t){if(1&e&&(l.ɵɵelementStart(0,"div",7),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",8),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"div",9),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"p",10),l.ɵɵtext(7),l.ɵɵpipe(8,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(9,"\n "),l.ɵɵelementStart(10,"div",11),l.ɵɵtext(11,"\n "),l.ɵɵelementStart(12,"div",12),l.ɵɵtext(13,"\n "),l.ɵɵelementStart(14,"p",4),l.ɵɵtext(15),l.ɵɵelementStart(16,"strong",13),l.ɵɵtext(17),l.ɵɵelementEnd(),l.ɵɵtext(18,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(19,"\n "),l.ɵɵelementStart(20,"p"),l.ɵɵtext(21),l.ɵɵpipe(22,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(23,"\n "),l.ɵɵelement(24,"hr"),l.ɵɵtext(25,"\n "),l.ɵɵelementStart(26,"div",14),l.ɵɵtext(27,"\n "),l.ɵɵelementStart(28,"a",15),l.ɵɵtext(29),l.ɵɵpipe(30,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(31,"\n "),l.ɵɵelementStart(32,"a",16),l.ɵɵtext(33),l.ɵɵpipe(34,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(35,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(36,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(37,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(38,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(39,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(40,"\n"),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext();l.ɵɵadvance(7),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(8,8,"joinOrganization")),l.ɵɵadvance(8),l.ɵɵtextInterpolate1("\n ",e.orgName,"\n "),l.ɵɵadvance(2),l.ɵɵtextInterpolate(e.email),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(22,10,"joinOrganizationDesc")),l.ɵɵadvance(7),l.ɵɵproperty("queryParams",l.ɵɵpureFunction1(16,S,e.email)),l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(30,12,"logIn"),"\n "),l.ɵɵadvance(3),l.ɵɵproperty("queryParams",l.ɵɵpureFunction1(18,S,e.email)),l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(34,14,"createAccount"),"\n ")}}class w extends s.BaseAcceptComponent{constructor(e,t,n,i,r,o,a,s,l){super(e,t,n,i,o),this.apiService=r,this.cryptoService=a,this.policyService=s,this.logService=l,this.requiredParameters=["organizationId","organizationUserId","token"]}authedHandler(e){return i(this,void 0,void 0,(function*(){const t=new o.OrganizationUserAcceptRequest;t.token=e.token,(yield this.performResetPasswordAutoEnroll(e))?this.actionPromise=this.apiService.postOrganizationUserAccept(e.organizationId,e.organizationUserId,t).then((()=>this.apiService.getOrganizationKeys(e.organizationId))).then((t=>i(this,void 0,void 0,(function*(){if(null==t)throw new Error(this.i18nService.t("resetPasswordOrgKeysError"));const n=r.Utils.fromB64ToArray(t.publicKey),i=yield this.cryptoService.getEncKey(),o=yield this.cryptoService.rsaEncrypt(i.key,n.buffer),s=new a.OrganizationUserResetPasswordEnrollmentRequest;return s.resetPasswordKey=o.encryptedString,this.apiService.putOrganizationUserResetPasswordEnrollment(e.organizationId,yield this.stateService.getUserId(),s)})))):this.actionPromise=this.apiService.postOrganizationUserAccept(e.organizationId,e.organizationUserId,t),yield this.actionPromise,this.platformUtilService.showToast("success",this.i18nService.t("inviteAccepted"),this.i18nService.t("inviteAcceptedDesc"),{timeout:1e4}),yield this.stateService.setOrganizationInvitation(null),this.router.navigate(["/vault"])}))}unauthedHandler(e){return i(this,void 0,void 0,(function*(){this.orgName=e.organizationName,null!=this.orgName&&(this.orgName=this.orgName.replace(/\+/g," ")),yield this.stateService.setOrganizationInvitation(e)}))}performResetPasswordAutoEnroll(e){return i(this,void 0,void 0,(function*(){let t=null;try{const n=yield this.apiService.getPoliciesByToken(e.organizationId,e.token,e.email,e.organizationUserId);t=this.policyService.mapPoliciesFromToken(n)}catch(n){this.logService.error(n)}if(null!=t){const n=this.policyService.getResetPasswordPolicyOptions(t,e.organizationId);return n[1]&&n[0].autoEnrollEnabled}return!1}))}}t.AcceptOrganizationComponent=w,w.ɵfac=function(e){return new(e||w)(l.ɵɵdirectiveInject(c.Router),l.ɵɵdirectiveInject(d.PlatformUtilsService),l.ɵɵdirectiveInject(p.I18nService),l.ɵɵdirectiveInject(c.ActivatedRoute),l.ɵɵdirectiveInject(u.ApiService),l.ɵɵdirectiveInject(m.StateService),l.ɵɵdirectiveInject(h.CryptoService),l.ɵɵdirectiveInject(v.PolicyService),l.ɵɵdirectiveInject(f.LogService))},w.ɵcmp=l.ɵɵdefineComponent({type:w,selectors:[["app-accept-organization"]],features:[l.ɵɵInheritDefinitionFeature],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"],["src","../../images/logo-dark@2x.png","alt","Bitwarden",1,"mb-4","logo"],[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-block","mt-2"],[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,t){1&e&&(l.ɵɵtemplate(0,x,17,6,"div",0),l.ɵɵtext(1,"\n"),l.ɵɵtemplate(2,b,41,20,"div",1),l.ɵɵtext(3,"\n")),2&e&&(l.ɵɵproperty("ngIf",t.loading),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!t.loading&&!t.authed))},directives:[g.NgIf,c.RouterLinkWithHref],pipes:[y.I18nPipe],encapsulation:2})},33154:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HintComponent=void 0;n(68012);const i=n(43337),r=(n(91674),n(51554),n(36631),n(73828),n(32621)),o=n(68012),a=n(51554),s=n(91674),l=n(73828),c=n(36631),d=n(96832),p=n(56820),u=n(45728),m=n(48198),h=n(99729);class v extends i.HintComponent{constructor(e,t,n,i,r){super(e,t,n,i,r)}}t.HintComponent=v,v.ɵfac=function(e){return new(e||v)(r.ɵɵdirectiveInject(o.Router),r.ɵɵdirectiveInject(a.I18nService),r.ɵɵdirectiveInject(s.ApiService),r.ɵɵdirectiveInject(l.PlatformUtilsService),r.ɵɵdirectiveInject(c.LogService))},v.ɵcmp=r.ɵɵdefineComponent({type:v,selectors:[["app-hint"]],features:[r.ɵɵInheritDefinitionFeature],decls:52,vars:22,consts:[["ngNativeValidate","",1,"container",3,"appApiAction","ngSubmit"],["form",""],[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,"form-group"],["for","email"],["id","email","type","text","name","Email","required","","appAutofocus","","inputmode","email","appInputVerbatim","false",1,"form-control",3,"ngModel","ngModelChange"],[1,"form-text","text-muted"],[1,"d-flex"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],[3,"hidden"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["routerLink","/login",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0"]],template:function(e,t){if(1&e&&(r.ɵɵelementStart(0,"form",0,1),r.ɵɵlistener("ngSubmit",(function(){return t.submit()})),r.ɵɵtext(2,"\n "),r.ɵɵelementStart(3,"div",2),r.ɵɵtext(4,"\n "),r.ɵɵelementStart(5,"div",3),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"p",4),r.ɵɵtext(8),r.ɵɵpipe(9,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(10,"\n "),r.ɵɵelementStart(11,"div",5),r.ɵɵtext(12,"\n "),r.ɵɵelementStart(13,"div",6),r.ɵɵtext(14,"\n "),r.ɵɵelementStart(15,"div",7),r.ɵɵtext(16,"\n "),r.ɵɵelementStart(17,"label",8),r.ɵɵtext(18),r.ɵɵpipe(19,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(20,"\n "),r.ɵɵelementStart(21,"input",9),r.ɵɵlistener("ngModelChange",(function(e){return t.email=e})),r.ɵɵelementEnd(),r.ɵɵtext(22,"\n "),r.ɵɵelementStart(23,"small",10),r.ɵɵtext(24),r.ɵɵpipe(25,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(26,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(27,"\n "),r.ɵɵelement(28,"hr"),r.ɵɵtext(29,"\n "),r.ɵɵelementStart(30,"div",11),r.ɵɵtext(31,"\n "),r.ɵɵelementStart(32,"button",12),r.ɵɵtext(33,"\n "),r.ɵɵelementStart(34,"span",13),r.ɵɵtext(35),r.ɵɵpipe(36,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(37,"\n "),r.ɵɵelement(38,"i",14),r.ɵɵpipe(39,"i18n"),r.ɵɵtext(40,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(41,"\n "),r.ɵɵelementStart(42,"a",15),r.ɵɵtext(43),r.ɵɵpipe(44,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(45,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(46,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(47,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(48,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(49,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(50,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(51,"\n")),2&e){const e=r.ɵɵreference(1);r.ɵɵproperty("appApiAction",t.formPromise),r.ɵɵadvance(8),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(9,10,"passwordHint")),r.ɵɵadvance(10),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(19,12,"emailAddress")),r.ɵɵadvance(3),r.ɵɵproperty("ngModel",t.email),r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(25,14,"enterEmailToGetHint")),r.ɵɵadvance(8),r.ɵɵproperty("disabled",e.loading),r.ɵɵadvance(2),r.ɵɵproperty("hidden",e.loading),r.ɵɵadvance(1),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(36,16,"submit")),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(39,18,"loading")),r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(44,20,"cancel"),"\n ")}},directives:[d.NgControlStatusGroup,d.NgForm,p.ApiActionDirective,d.DefaultValueAccessor,d.RequiredValidator,u.AutofocusDirective,m.InputVerbatimDirective,d.NgControlStatus,d.NgModel,o.RouterLinkWithHref],pipes:[h.I18nPipe],encapsulation:2})},79346:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.LockComponent=void 0;n(32621),n(68012);const r=n(33793),o=(n(91674),n(85714),n(56071),n(51554),n(72277),n(36631),n(45552),n(73828),n(73569),n(82656),n(77459),n(32621)),a=n(68012),s=n(51554),l=n(73828),c=n(45552),d=n(85714),p=n(82656),u=n(56071),m=n(77459),h=n(73569),v=n(91674),f=n(36631),g=n(72277),y=n(96832),x=n(56820),S=n(45728),b=n(48198),w=n(8863),C=n(57490),I=n(99729),E=function(e,t){return{"bwi-eye":e,"bwi-eye-slash":t}};class P extends r.LockComponent{constructor(e,t,n,i,r,o,a,s,l,c,d,p,u){super(e,t,n,i,r,o,a,l,c,d,p,u),this.routerService=s}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){yield e.ngOnInit.call(this),this.onSuccessfulSubmit=()=>i(this,void 0,void 0,(function*(){const e=this.routerService.getPreviousUrl();e&&"/"!==e&&-1===e.indexOf("lock")&&(this.successRoute=e),this.router.navigateByUrl(this.successRoute)}))}))}}t.LockComponent=P,P.ɵfac=function(e){return new(e||P)(o.ɵɵdirectiveInject(a.Router),o.ɵɵdirectiveInject(s.I18nService),o.ɵɵdirectiveInject(l.PlatformUtilsService),o.ɵɵdirectiveInject(c.MessagingService),o.ɵɵdirectiveInject(d.CryptoService),o.ɵɵdirectiveInject(p.VaultTimeoutService),o.ɵɵdirectiveInject(u.EnvironmentService),o.ɵɵdirectiveInject(m.RouterService),o.ɵɵdirectiveInject(h.StateService),o.ɵɵdirectiveInject(v.ApiService),o.ɵɵdirectiveInject(f.LogService),o.ɵɵdirectiveInject(g.KeyConnectorService),o.ɵɵdirectiveInject(o.NgZone))},P.ɵcmp=o.ɵɵdefineComponent({type:P,selectors:[["app-lock"]],features:[o.ɵɵInheritDefinitionFeature],decls:68,vars:31,consts:[["ngNativeValidate","",1,"container",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],[1,"text-center","mb-4"],["aria-hidden","true",1,"bwi","bwi-lock","bwi-4x","text-muted"],[1,"lead","text-center","mx-4","mb-4"],[1,"card","d-block"],[1,"card-body"],[1,"form-group"],["for","masterPassword"],[1,"d-flex"],["id","masterPassword","name","MasterPassword","required","","appAutofocus","","appInputVerbatim","",1,"text-monospace","form-control",3,"type","ngModel","ngModelChange"],["type","button",1,"ml-1","btn","btn-link",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-lg",3,"ngClass"],[1,"text-muted","form-text"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-unlock"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0",3,"click"]],template:function(e,t){if(1&e&&(o.ɵɵelementStart(0,"form",0,1),o.ɵɵlistener("ngSubmit",(function(){return t.submit()})),o.ɵɵtext(2,"\n "),o.ɵɵelementStart(3,"div",2),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"div",3),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"p",4),o.ɵɵtext(8,"\n "),o.ɵɵelement(9,"i",5),o.ɵɵtext(10,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"p",6),o.ɵɵtext(13),o.ɵɵpipe(14,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"div",7),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"div",8),o.ɵɵtext(19,"\n "),o.ɵɵelementStart(20,"div",9),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"label",10),o.ɵɵtext(23),o.ɵɵpipe(24,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵelementStart(26,"div",11),o.ɵɵtext(27,"\n "),o.ɵɵelementStart(28,"input",12),o.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n "),o.ɵɵelementStart(30,"button",13),o.ɵɵlistener("click",(function(){return t.togglePassword()})),o.ɵɵpipe(31,"i18n"),o.ɵɵtext(32,"\n "),o.ɵɵelement(33,"i",14),o.ɵɵtext(34,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(35,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(36,"\n "),o.ɵɵelementStart(37,"small",15),o.ɵɵtext(38),o.ɵɵpipe(39,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(40,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(41,"\n "),o.ɵɵelement(42,"hr"),o.ɵɵtext(43,"\n "),o.ɵɵelementStart(44,"div",11),o.ɵɵtext(45,"\n "),o.ɵɵelementStart(46,"button",16),o.ɵɵtext(47,"\n "),o.ɵɵelementStart(48,"span"),o.ɵɵtext(49," "),o.ɵɵelement(50,"i",17),o.ɵɵtext(51),o.ɵɵpipe(52,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(53,"\n "),o.ɵɵelement(54,"i",18),o.ɵɵpipe(55,"i18n"),o.ɵɵtext(56,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(57,"\n "),o.ɵɵelementStart(58,"button",19),o.ɵɵlistener("click",(function(){return t.logOut()})),o.ɵɵtext(59),o.ɵɵpipe(60,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(61,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(62,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(63,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(64,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(65,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(66,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(67,"\n")),2&e){const e=o.ɵɵreference(1);o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(13),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(14,12,"yourVaultIsLocked")),o.ɵɵadvance(10),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(24,14,"masterPass")),o.ɵɵadvance(5),o.ɵɵpropertyInterpolate("type",t.showPassword?"text":"password"),o.ɵɵproperty("ngModel",t.masterPassword),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(31,16,"toggleVisibility")),o.ɵɵadvance(3),o.ɵɵproperty("ngClass",o.ɵɵpureFunction2(28,E,!t.showPassword,t.showPassword)),o.ɵɵadvance(5),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind3(39,18,"loggedInAsEmailOn",t.email,t.webVaultHostname),"\n "),o.ɵɵadvance(8),o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(5),o.ɵɵtextInterpolate1(" ",o.ɵɵpipeBind1(52,22,"unlock")," "),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(55,24,"loading")),o.ɵɵadvance(5),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(60,26,"logOut"),"\n ")}},directives:[y.NgControlStatusGroup,y.NgForm,x.ApiActionDirective,y.DefaultValueAccessor,y.RequiredValidator,S.AutofocusDirective,b.InputVerbatimDirective,y.NgControlStatus,y.NgModel,w.A11yTitleDirective,C.NgClass],pipes:[I.I18nPipe],encapsulation:2})},36729:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.LoginComponent=void 0;n(32621),n(68012);const r=n(14857),o=n(13744),a=(n(91674),n(62694),n(1659),n(56071),n(51554),n(36631),n(45552),n(84275),n(73828),n(62166),n(34144)),s=(n(15156),n(77459),n(32621)),l=n(62694),c=n(68012),d=n(51554),p=n(73828),u=n(56071),m=n(84275),h=n(1659),v=n(91674),f=n(62166),g=n(36631),y=n(15156),x=n(45552),S=n(77459),b=n(96832),w=n(56820),C=n(57490),I=n(48198),E=n(8863),P=n(51626),O=n(99729);function k(e,t){1&e&&(s.ɵɵelementStart(0,"app-callout",31),s.ɵɵpipe(1,"i18n"),s.ɵɵtext(2),s.ɵɵpipe(3,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(1,2,"resetPasswordPolicyAutoEnroll")),s.ɵɵadvance(2),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(3,4,"resetPasswordAutoEnrollInviteWarning"),"\n "))}const A=function(e,t){return{"bwi-eye":e,"bwi-eye-slash":t}},T=function(e){return{email:e}};class M extends o.LoginComponent{constructor(e,t,n,r,o,a,s,l,c,d,p,u,m,h,v){super(e,t,o,n,m,a,s,l,p,u),this.route=r,this.apiService=c,this.policyService=d,this.stateService=m,this.messagingService=h,this.routerService=v,this.showResetPasswordAutoEnrollWarning=!1,this.onSuccessfulLogin=()=>i(this,void 0,void 0,(function*(){this.messagingService.send("setFullWidth")})),this.onSuccessfulLoginNavigate=this.goAfterLogIn}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){this.route.queryParams.pipe(r.first()).subscribe((t=>i(this,void 0,void 0,(function*(){if(null!=t.email&&t.email.indexOf("@")>-1&&(this.email=t.email),null!=t.premium)this.routerService.setPreviousUrl("/settings/premium");else if(null!=t.org){const e=this.router.createUrlTree(["create-organization"],{queryParams:{plan:t.org}});this.routerService.setPreviousUrl(e.toString())}if(null!=t.sponsorshipToken){const e=this.router.createUrlTree(["setup/families-for-enterprise"],{queryParams:{token:t.sponsorshipToken}});this.routerService.setPreviousUrl(e.toString())}yield e.ngOnInit.call(this),this.rememberEmail=yield this.stateService.getRememberEmail()}))));const t=yield this.stateService.getOrganizationInvitation();if(null!=t){let e=null;try{this.policies=yield this.apiService.getPoliciesByToken(t.organizationId,t.token,t.email,t.organizationUserId),e=this.policyService.mapPoliciesFromToken(this.policies)}catch(n){this.logService.error(n)}if(null!=e){const n=this.policyService.getResetPasswordPolicyOptions(e,t.organizationId);this.showResetPasswordAutoEnrollWarning=n[1]&&n[0].autoEnrollEnabled,this.enforcedPasswordPolicyOptions=yield this.policyService.getMasterPasswordPolicyOptions(e)}}}))}goAfterLogIn(){return i(this,void 0,void 0,(function*(){if(null!=this.enforcedPasswordPolicyOptions){const e=this.passwordGenerationService.passwordStrength(this.masterPassword,this.getPasswordStrengthUserInput()),t=null==e?null:e.score;if(!this.policyService.evaluateMasterPassword(t,this.masterPassword,this.enforcedPasswordPolicyOptions)){const e={};return this.policies.data.map((t=>e[t.id]=new a.PolicyData(t))),yield this.policyService.replace(e),void this.router.navigate(["update-password"])}}const e=this.routerService.getPreviousUrl();e?this.router.navigateByUrl(e):this.router.navigate([this.successRoute])}))}submit(){const e=Object.create(null,{submit:{get:()=>super.submit}});return i(this,void 0,void 0,(function*(){yield this.stateService.setRememberEmail(this.rememberEmail),this.rememberEmail||(yield this.stateService.setRememberedEmail(null)),yield e.submit.call(this)}))}getPasswordStrengthUserInput(){let e=[];const t=this.email.indexOf("@");return t>-1&&(e=e.concat(this.email.substr(0,t).trim().toLowerCase().split(/[^A-Za-z0-9]/))),e}}t.LoginComponent=M,M.ɵfac=function(e){return new(e||M)(s.ɵɵdirectiveInject(l.AuthService),s.ɵɵdirectiveInject(c.Router),s.ɵɵdirectiveInject(d.I18nService),s.ɵɵdirectiveInject(c.ActivatedRoute),s.ɵɵdirectiveInject(p.PlatformUtilsService),s.ɵɵdirectiveInject(u.EnvironmentService),s.ɵɵdirectiveInject(m.PasswordGenerationService),s.ɵɵdirectiveInject(h.CryptoFunctionService),s.ɵɵdirectiveInject(v.ApiService),s.ɵɵdirectiveInject(f.PolicyService),s.ɵɵdirectiveInject(g.LogService),s.ɵɵdirectiveInject(s.NgZone),s.ɵɵdirectiveInject(y.StateService),s.ɵɵdirectiveInject(x.MessagingService),s.ɵɵdirectiveInject(S.RouterService))},M.ɵcmp=s.ɵɵdefineComponent({type:M,selectors:[["app-login"]],features:[s.ɵɵInheritDefinitionFeature],decls:104,vars:45,consts:[["ngNativeValidate","",1,"container",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],["alt","Bitwarden",1,"mb-2","logo","logo-themed"],[1,"lead","text-center","mx-4","mb-4"],[1,"card","d-block"],[1,"card-body"],["type","warning",3,"title",4,"ngIf"],[1,"form-group"],["for","email"],["id","email","type","text","name","Email","required","","inputmode","email","appInputVerbatim","false",1,"form-control",3,"ngModel","ngModelChange"],["for","masterPassword"],[1,"d-flex"],["id","masterPassword","name","MasterPassword","required","","appInputVerbatim","",1,"text-monospace","form-control",3,"type","ngModel","ngModelChange"],["type","button",1,"ml-1","btn","btn-link",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-lg",3,"ngClass"],[1,"form-text"],["routerLink","/hint"],[1,"form-check","mb-3"],["type","checkbox","id","rememberEmail","name","RememberEmail",1,"form-check-input",3,"ngModel","ngModelChange"],["for","rememberEmail",1,"form-check-label"],[1,"mb-n3",3,"hidden"],["id","hcaptcha_iframe","height","80"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-sign-in"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["routerLink","/register",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0",3,"queryParams"],["aria-hidden","true",1,"bwi","bwi-pencil-square"],["routerLink","/sso",1,"btn","btn-outline-secondary","btn-block","mt-2"],["aria-hidden","true",1,"bwi","bwi-bank"],["type","warning",3,"title"]],template:function(e,t){if(1&e&&(s.ɵɵelementStart(0,"form",0,1),s.ɵɵlistener("ngSubmit",(function(){return t.submit()})),s.ɵɵtext(2,"\n "),s.ɵɵelementStart(3,"div",2),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"div",3),s.ɵɵtext(6,"\n "),s.ɵɵelement(7,"img",4),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"p",5),s.ɵɵtext(10),s.ɵɵpipe(11,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"div",6),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"div",7),s.ɵɵtext(16,"\n "),s.ɵɵtemplate(17,k,4,6,"app-callout",8),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"div",9),s.ɵɵtext(20,"\n "),s.ɵɵelementStart(21,"label",10),s.ɵɵtext(22),s.ɵɵpipe(23,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(24,"\n "),s.ɵɵelementStart(25,"input",11),s.ɵɵlistener("ngModelChange",(function(e){return t.email=e})),s.ɵɵelementEnd(),s.ɵɵtext(26,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n "),s.ɵɵelementStart(28,"div",9),s.ɵɵtext(29,"\n "),s.ɵɵelementStart(30,"label",12),s.ɵɵtext(31),s.ɵɵpipe(32,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(33,"\n "),s.ɵɵelementStart(34,"div",13),s.ɵɵtext(35,"\n "),s.ɵɵelementStart(36,"input",14),s.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),s.ɵɵelementEnd(),s.ɵɵtext(37,"\n "),s.ɵɵelementStart(38,"button",15),s.ɵɵlistener("click",(function(){return t.togglePassword()})),s.ɵɵpipe(39,"i18n"),s.ɵɵtext(40,"\n "),s.ɵɵelement(41,"i",16),s.ɵɵtext(42,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(43,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(44,"\n "),s.ɵɵelementStart(45,"small",17),s.ɵɵtext(46,"\n "),s.ɵɵelementStart(47,"a",18),s.ɵɵtext(48),s.ɵɵpipe(49,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(50,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(51,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(52,"\n "),s.ɵɵelementStart(53,"div",19),s.ɵɵtext(54,"\n "),s.ɵɵelementStart(55,"input",20),s.ɵɵlistener("ngModelChange",(function(e){return t.rememberEmail=e})),s.ɵɵelementEnd(),s.ɵɵtext(56,"\n "),s.ɵɵelementStart(57,"label",21),s.ɵɵtext(58),s.ɵɵpipe(59,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(60,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(61,"\n "),s.ɵɵelementStart(62,"div",22),s.ɵɵtext(63,"\n "),s.ɵɵelement(64,"iframe",23),s.ɵɵtext(65,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(66,"\n "),s.ɵɵelement(67,"hr"),s.ɵɵtext(68,"\n "),s.ɵɵelementStart(69,"div",13),s.ɵɵtext(70,"\n "),s.ɵɵelementStart(71,"button",24),s.ɵɵtext(72,"\n "),s.ɵɵelementStart(73,"span"),s.ɵɵtext(74," "),s.ɵɵelement(75,"i",25),s.ɵɵtext(76),s.ɵɵpipe(77,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(78,"\n "),s.ɵɵelement(79,"i",26),s.ɵɵpipe(80,"i18n"),s.ɵɵtext(81,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(82,"\n "),s.ɵɵelementStart(83,"a",27),s.ɵɵtext(84,"\n "),s.ɵɵelement(85,"i",28),s.ɵɵtext(86),s.ɵɵpipe(87,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(88,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(89,"\n "),s.ɵɵelementStart(90,"div",13),s.ɵɵtext(91,"\n "),s.ɵɵelementStart(92,"a",29),s.ɵɵtext(93,"\n "),s.ɵɵelement(94,"i",30),s.ɵɵtext(95),s.ɵɵpipe(96,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(97,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(98,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(99,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(100,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(101,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(102,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(103,"\n")),2&e){const e=s.ɵɵreference(1);s.ɵɵproperty("appApiAction",t.formPromise),s.ɵɵadvance(10),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(11,20,"loginOrCreateNewAccount")),s.ɵɵadvance(7),s.ɵɵproperty("ngIf",t.showResetPasswordAutoEnrollWarning),s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(23,22,"emailAddress")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",t.email),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(32,24,"masterPass")),s.ɵɵadvance(5),s.ɵɵpropertyInterpolate("type",t.showPassword?"text":"password"),s.ɵɵproperty("ngModel",t.masterPassword),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(39,26,"toggleVisibility")),s.ɵɵadvance(3),s.ɵɵproperty("ngClass",s.ɵɵpureFunction2(40,A,!t.showPassword,t.showPassword)),s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(49,28,"getMasterPasswordHint")),s.ɵɵadvance(7),s.ɵɵproperty("ngModel",t.rememberEmail),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(59,30,"rememberEmail")),s.ɵɵadvance(4),s.ɵɵproperty("hidden",!t.showCaptcha()),s.ɵɵadvance(9),s.ɵɵproperty("disabled",e.loading),s.ɵɵadvance(5),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(77,32,"logIn")," "),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(80,34,"loading")),s.ɵɵadvance(4),s.ɵɵproperty("queryParams",s.ɵɵpureFunction1(43,T,t.email)),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(87,36,"createAccount"),"\n "),s.ɵɵadvance(9),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(96,38,"enterpriseSingleSignOn"),"\n ")}},directives:[b.NgControlStatusGroup,b.NgForm,w.ApiActionDirective,C.NgIf,b.DefaultValueAccessor,b.RequiredValidator,I.InputVerbatimDirective,b.NgControlStatus,b.NgModel,E.A11yTitleDirective,C.NgClass,c.RouterLinkWithHref,b.CheckboxControlValueAccessor,P.CalloutComponent],pipes:[O.I18nPipe],encapsulation:2})},39253:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.RecoverDeleteComponent=void 0;n(68012),n(91674),n(51554),n(36631),n(73828);const r=n(12666),o=n(32621),a=n(68012),s=n(91674),l=n(73828),c=n(51554),d=n(36631),p=n(96832),u=n(56820),m=n(45728),h=n(48198),v=n(99729);class f{constructor(e,t,n,i,r){this.router=e,this.apiService=t,this.platformUtilsService=n,this.i18nService=i,this.logService=r}submit(){return i(this,void 0,void 0,(function*(){try{const e=new r.DeleteRecoverRequest;e.email=this.email.trim().toLowerCase(),this.formPromise=this.apiService.postAccountRecoverDelete(e),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("deleteRecoverEmailSent")),this.router.navigate(["/"])}catch(e){this.logService.error(e)}}))}}t.RecoverDeleteComponent=f,f.ɵfac=function(e){return new(e||f)(o.ɵɵdirectiveInject(a.Router),o.ɵɵdirectiveInject(s.ApiService),o.ɵɵdirectiveInject(l.PlatformUtilsService),o.ɵɵdirectiveInject(c.I18nService),o.ɵɵdirectiveInject(d.LogService))},f.ɵcmp=o.ɵɵdefineComponent({type:f,selectors:[["app-recover-delete"]],decls:52,vars:21,consts:[["ngNativeValidate","",1,"container",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],[1,"lead","text-center","mb-4"],[1,"card"],[1,"card-body"],[1,"form-group"],["for","email"],["id","email","type","text","name","Email","required","","appAutofocus","","inputmode","email","appInputVerbatim","false",1,"form-control",3,"ngModel","ngModelChange"],[1,"d-flex"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["routerLink","/login",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0"]],template:function(e,t){if(1&e&&(o.ɵɵelementStart(0,"form",0,1),o.ɵɵlistener("ngSubmit",(function(){return t.submit()})),o.ɵɵtext(2,"\n "),o.ɵɵelementStart(3,"div",2),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"div",3),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"p",4),o.ɵɵtext(8),o.ɵɵpipe(9,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵelementStart(11,"div",5),o.ɵɵtext(12,"\n "),o.ɵɵelementStart(13,"div",6),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"p"),o.ɵɵtext(16),o.ɵɵpipe(17,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementStart(19,"div",7),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"label",8),o.ɵɵtext(22),o.ɵɵpipe(23,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵelementStart(25,"input",9),o.ɵɵlistener("ngModelChange",(function(e){return t.email=e})),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelement(28,"hr"),o.ɵɵtext(29,"\n "),o.ɵɵelementStart(30,"div",10),o.ɵɵtext(31,"\n "),o.ɵɵelementStart(32,"button",11),o.ɵɵtext(33,"\n "),o.ɵɵelementStart(34,"span"),o.ɵɵtext(35),o.ɵɵpipe(36,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(37,"\n "),o.ɵɵelement(38,"i",12),o.ɵɵpipe(39,"i18n"),o.ɵɵtext(40,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(41,"\n "),o.ɵɵelementStart(42,"a",13),o.ɵɵtext(43),o.ɵɵpipe(44,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(45,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(46,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(47,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(48,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(49,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(50,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(51,"\n")),2&e){const e=o.ɵɵreference(1);o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(9,9,"deleteAccount")),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(17,11,"deleteRecoverDesc")),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(23,13,"emailAddress")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",t.email),o.ɵɵadvance(7),o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(36,15,"submit")),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(39,17,"loading")),o.ɵɵadvance(5),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(44,19,"cancel"),"\n ")}},directives:[p.NgControlStatusGroup,p.NgForm,u.ApiActionDirective,p.DefaultValueAccessor,p.RequiredValidator,m.AutofocusDirective,h.InputVerbatimDirective,p.NgControlStatus,p.NgModel,a.RouterLinkWithHref],pipes:[v.I18nPipe],encapsulation:2})},85175:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.RecoverTwoFactorComponent=void 0;n(68012),n(91674),n(62694),n(85714),n(51554),n(36631),n(73828);const r=n(6188),o=n(32621),a=n(68012),s=n(91674),l=n(73828),c=n(51554),d=n(85714),p=n(62694),u=n(36631),m=n(96832),h=n(56820),v=n(45728),f=n(48198),g=n(99729);class y{constructor(e,t,n,i,r,o,a){this.router=e,this.apiService=t,this.platformUtilsService=n,this.i18nService=i,this.cryptoService=r,this.authService=o,this.logService=a}submit(){return i(this,void 0,void 0,(function*(){try{const e=new r.TwoFactorRecoveryRequest;e.recoveryCode=this.recoveryCode.replace(/\s/g,"").toLowerCase(),e.email=this.email.trim().toLowerCase();const t=yield this.authService.makePreloginKey(this.masterPassword,e.email);e.masterPasswordHash=yield this.cryptoService.hashPassword(this.masterPassword,t),this.formPromise=this.apiService.postTwoFactorRecover(e),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("twoStepRecoverDisabled")),this.router.navigate(["/"])}catch(e){this.logService.error(e)}}))}}t.RecoverTwoFactorComponent=y,y.ɵfac=function(e){return new(e||y)(o.ɵɵdirectiveInject(a.Router),o.ɵɵdirectiveInject(s.ApiService),o.ɵɵdirectiveInject(l.PlatformUtilsService),o.ɵɵdirectiveInject(c.I18nService),o.ɵɵdirectiveInject(d.CryptoService),o.ɵɵdirectiveInject(p.AuthService),o.ɵɵdirectiveInject(u.LogService))},y.ɵcmp=o.ɵɵdefineComponent({type:y,selectors:[["app-recover-two-factor"]],decls:74,vars:32,consts:[["ngNativeValidate","",1,"container",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],[1,"lead","text-center","mb-4"],[1,"card"],[1,"card-body"],["href","https://bitwarden.com/help/lost-two-step-device/","target","_blank","rel","noopener"],[1,"form-group"],["for","email"],["id","email","type","text","name","Email","required","","appAutofocus","","inputmode","email","appInputVerbatim","false",1,"form-control",3,"ngModel","ngModelChange"],["for","masterPassword"],["id","masterPassword","type","password","name","MasterPassword","required","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],["for","recoveryCode"],["id","recoveryCode","type","text","name","RecoveryCode","required","","appInputVerbatim","",1,"text-monospace","form-control",3,"ngModel","ngModelChange"],[1,"d-flex"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["routerLink","/login",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0"]],template:function(e,t){if(1&e&&(o.ɵɵelementStart(0,"form",0,1),o.ɵɵlistener("ngSubmit",(function(){return t.submit()})),o.ɵɵtext(2,"\n "),o.ɵɵelementStart(3,"div",2),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"div",3),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"p",4),o.ɵɵtext(8),o.ɵɵpipe(9,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵelementStart(11,"div",5),o.ɵɵtext(12,"\n "),o.ɵɵelementStart(13,"div",6),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"p"),o.ɵɵtext(16),o.ɵɵpipe(17,"i18n"),o.ɵɵelementStart(18,"a",7),o.ɵɵtext(19),o.ɵɵpipe(20,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(22,"\n "),o.ɵɵelementStart(23,"div",8),o.ɵɵtext(24,"\n "),o.ɵɵelementStart(25,"label",9),o.ɵɵtext(26),o.ɵɵpipe(27,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(28,"\n "),o.ɵɵelementStart(29,"input",10),o.ɵɵlistener("ngModelChange",(function(e){return t.email=e})),o.ɵɵelementEnd(),o.ɵɵtext(30,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(31,"\n "),o.ɵɵelementStart(32,"div",8),o.ɵɵtext(33,"\n "),o.ɵɵelementStart(34,"label",11),o.ɵɵtext(35),o.ɵɵpipe(36,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(37,"\n "),o.ɵɵelementStart(38,"input",12),o.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),o.ɵɵelementEnd(),o.ɵɵtext(39,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(40,"\n "),o.ɵɵelementStart(41,"div",8),o.ɵɵtext(42,"\n "),o.ɵɵelementStart(43,"label",13),o.ɵɵtext(44),o.ɵɵpipe(45,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(46,"\n "),o.ɵɵelementStart(47,"input",14),o.ɵɵlistener("ngModelChange",(function(e){return t.recoveryCode=e})),o.ɵɵelementEnd(),o.ɵɵtext(48,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(49,"\n "),o.ɵɵelement(50,"hr"),o.ɵɵtext(51,"\n "),o.ɵɵelementStart(52,"div",15),o.ɵɵtext(53,"\n "),o.ɵɵelementStart(54,"button",16),o.ɵɵtext(55,"\n "),o.ɵɵelementStart(56,"span"),o.ɵɵtext(57),o.ɵɵpipe(58,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(59,"\n "),o.ɵɵelement(60,"i",17),o.ɵɵpipe(61,"i18n"),o.ɵɵtext(62,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(63,"\n "),o.ɵɵelementStart(64,"a",18),o.ɵɵtext(65),o.ɵɵpipe(66,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(67,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(68,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(69,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(70,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(71,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(72,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(73,"\n")),2&e){const e=o.ɵɵreference(1);o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(9,14,"recoverAccountTwoStep")),o.ɵɵadvance(8),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(17,16,"recoverAccountTwoStepDesc"),"\n "),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(20,18,"learnMore")),o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(27,20,"emailAddress")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",t.email),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(36,22,"masterPass")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",t.masterPassword),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(45,24,"recoveryCodeTitle")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",t.recoveryCode),o.ɵɵadvance(7),o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(58,26,"submit")),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(61,28,"loading")),o.ɵɵadvance(5),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(66,30,"cancel"),"\n ")}},directives:[m.NgControlStatusGroup,m.NgForm,h.ApiActionDirective,m.DefaultValueAccessor,m.RequiredValidator,v.AutofocusDirective,f.InputVerbatimDirective,m.NgControlStatus,m.NgModel,a.RouterLinkWithHref],pipes:[g.I18nPipe],encapsulation:2})},48229:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.RegisterComponent=void 0;n(68012);const r=n(14857),o=n(11405),a=(n(91674),n(62694),n(85714),n(56071),n(51554),n(36631),n(84275),n(73828),n(62166),n(73569),n(34144)),s=n(41317),l=n(90185),c=(n(77459),n(32621)),d=n(62694),p=n(68012),u=n(51554),m=n(85714),h=n(91674),v=n(73569),f=n(73828),g=n(84275),y=n(62166),x=n(56071),S=n(36631),b=n(77459),w=n(57490),C=n(96832),I=n(56820),E=n(48198),P=n(45728),O=n(40946),k=n(8863),A=n(51626),T=n(99729);function M(e,t){1&e&&(c.ɵɵelementStart(0,"header",41),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",42),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"div",4),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"div",43),c.ɵɵtext(7,"\n "),c.ɵɵelement(8,"img",44),c.ɵɵtext(9,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(10,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(11,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(12,"\n "),c.ɵɵelementEnd())}function B(e,t){1&e&&(c.ɵɵelementStart(0,"div"),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"h1"),c.ɵɵtext(3,"The Bitwarden Password Manager"),c.ɵɵelementEnd(),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"h2"),c.ɵɵtext(6,"\n Trusted by millions of individuals, teams, and organizations worldwide for secure\n password storage and sharing.\n "),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"p"),c.ɵɵtext(9,"Store logins, secure notes, and more"),c.ɵɵelementEnd(),c.ɵɵtext(10,"\n "),c.ɵɵelementStart(11,"p"),c.ɵɵtext(12,"Collaborate and share securely"),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"p"),c.ɵɵtext(15,"Access anywhere on any device"),c.ɵɵelementEnd(),c.ɵɵtext(16,"\n "),c.ɵɵelementStart(17,"p"),c.ɵɵtext(18,"Create your account to get started"),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵelementEnd())}function D(e,t){1&e&&(c.ɵɵelementStart(0,"span"),c.ɵɵtext(1,"Teams"),c.ɵɵelement(2,"br"),c.ɵɵelementEnd())}function R(e,t){1&e&&(c.ɵɵelementStart(0,"span"),c.ɵɵtext(1,"Enterprise"),c.ɵɵelementEnd())}function F(e,t){if(1&e&&(c.ɵɵelementStart(0,"div"),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"h1"),c.ɵɵtext(3,"\n Start Your "),c.ɵɵtemplate(4,D,3,0,"span",39),c.ɵɵtemplate(5,R,2,0,"span",39),c.ɵɵtext(6," Free Trial Now\n "),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"h2"),c.ɵɵtext(9,"\n Millions of individuals, teams, and organizations worldwide trust Bitwarden for secure\n password storage and sharing.\n "),c.ɵɵelementEnd(),c.ɵɵtext(10,"\n "),c.ɵɵelementStart(11,"p"),c.ɵɵtext(12,"Collaborate and share securely"),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"p"),c.ɵɵtext(15,"Deploy and manage quickly and easily"),c.ɵɵelementEnd(),c.ɵɵtext(16,"\n "),c.ɵɵelementStart(17,"p"),c.ɵɵtext(18,"Access anywhere on any device"),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵelementStart(20,"p"),c.ɵɵtext(21,"Create your account to get started"),c.ɵɵelementEnd(),c.ɵɵtext(22,"\n "),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(4),c.ɵɵproperty("ngIf","teams1"===e.layout||"teams1"===e.layout),c.ɵɵadvance(1),c.ɵɵproperty("ngIf","enterprise2"===e.layout)}}function U(e,t){1&e&&(c.ɵɵelementStart(0,"span"),c.ɵɵtext(1,"Teams"),c.ɵɵelement(2,"br"),c.ɵɵelementEnd())}function V(e,t){1&e&&(c.ɵɵelementStart(0,"span"),c.ɵɵtext(1,"Enterprise"),c.ɵɵelementEnd())}function N(e,t){if(1&e&&(c.ɵɵelementStart(0,"div"),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"h1"),c.ɵɵtext(3,"\n Start Your "),c.ɵɵtemplate(4,U,3,0,"span",39),c.ɵɵtemplate(5,V,2,0,"span",39),c.ɵɵtext(6," Free Trial Now\n "),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"h2"),c.ɵɵtext(9,"\n Millions of individuals, teams, and organizations worldwide trust Bitwarden for secure\n password storage and sharing.\n "),c.ɵɵelementEnd(),c.ɵɵtext(10,"\n "),c.ɵɵelementStart(11,"p"),c.ɵɵtext(12,"Collaborate and share securely"),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"p"),c.ɵɵtext(15,"Deploy and manage quickly and easily"),c.ɵɵelementEnd(),c.ɵɵtext(16,"\n "),c.ɵɵelementStart(17,"p"),c.ɵɵtext(18,"Access anywhere on any device"),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵelementStart(20,"p"),c.ɵɵtext(21,"Create your account to get started"),c.ɵɵelementEnd(),c.ɵɵtext(22,"\n "),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(4),c.ɵɵproperty("ngIf","cnetcmpgnteams"===e.layout),c.ɵɵadvance(1),c.ɵɵproperty("ngIf","cnetcmpgnent"===e.layout)}}function _(e,t){1&e&&(c.ɵɵelementStart(0,"div"),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"h1"),c.ɵɵtext(3,"Start Your Premium Account Now"),c.ɵɵelementEnd(),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"h2"),c.ɵɵtext(6,"\n Millions of individuals, teams, and organizations worldwide trust Bitwarden for secure\n password storage and sharing.\n "),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"p"),c.ɵɵtext(9,"Store logins, secure notes, and more"),c.ɵɵelementEnd(),c.ɵɵtext(10,"\n "),c.ɵɵelementStart(11,"p"),c.ɵɵtext(12,"Secure your account with advanced two-step login"),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"p"),c.ɵɵtext(15,"Access anywhere on any device"),c.ɵɵelementEnd(),c.ɵɵtext(16,"\n "),c.ɵɵelementStart(17,"p"),c.ɵɵtext(18,"Create your account to get started"),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵelementEnd())}function j(e,t){if(1&e&&(c.ɵɵelementStart(0,"div",43),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",45),c.ɵɵtext(3,"\n "),c.ɵɵtext(4,"\n "),c.ɵɵtemplate(5,B,20,0,"div",39),c.ɵɵtext(6,"\n\n "),c.ɵɵtext(7,"\n "),c.ɵɵtemplate(8,F,23,2,"div",39),c.ɵɵtext(9,"\n\n "),c.ɵɵtext(10,"\n "),c.ɵɵtemplate(11,N,23,2,"div",39),c.ɵɵtext(12,"\n\n "),c.ɵɵtext(13,"\n "),c.ɵɵtemplate(14,_,20,0,"div",39),c.ɵɵtext(15,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(16,"\n "),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext();c.ɵɵadvance(5),c.ɵɵproperty("ngIf","teams"===e.layout||"enterprise"===e.layout||"enterprise1"===e.layout||"default"===e.layout),c.ɵɵadvance(3),c.ɵɵproperty("ngIf","teams1"===e.layout||"teams2"===e.layout||"enterprise2"===e.layout),c.ɵɵadvance(3),c.ɵɵproperty("ngIf","cnetcmpgnteams"===e.layout||"cnetcmpgnent"===e.layout),c.ɵɵadvance(3),c.ɵɵproperty("ngIf","cnetcmpgnind"===e.layout)}}function z(e,t){1&e&&(c.ɵɵelementStart(0,"p",46),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(2,1,"createAccount")))}function H(e,t){1&e&&(c.ɵɵelementStart(0,"app-callout",47),c.ɵɵpipe(1,"i18n"),c.ɵɵtext(2),c.ɵɵpipe(3,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(1,2,"createOrganizationStep1")),c.ɵɵadvance(2),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(3,4,"createOrganizationCreatePersonalAccount"),"\n "))}function L(e,t){if(1&e&&(c.ɵɵelementStart(0,"app-callout",48),c.ɵɵtext(1,"\n "),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext();c.ɵɵproperty("enforcedPolicyOptions",e.enforcedPolicyOptions)}}function K(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div",12),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",49),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"input",50),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext().acceptPolicies=t})),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"label",51),c.ɵɵtext(7),c.ɵɵpipe(8,"i18n"),c.ɵɵelement(9,"br"),c.ɵɵtext(10,"\n "),c.ɵɵelementStart(11,"a",52),c.ɵɵtext(12),c.ɵɵpipe(13,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(14,",\n "),c.ɵɵelementStart(15,"a",53),c.ɵɵtext(16),c.ɵɵpipe(17,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(18,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(20,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵnextContext();c.ɵɵadvance(4),c.ɵɵproperty("ngModel",e.acceptPolicies),c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(8,4,"acceptPolicies"),""),c.ɵɵadvance(5),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(13,6,"termsOfService")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(17,8,"privacyPolicy"))}}function q(e,t){1&e&&(c.ɵɵelementStart(0,"div"),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"figure"),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"figcaption"),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"cite"),c.ɵɵtext(7,"\n "),c.ɵɵelement(8,"img",54),c.ɵɵtext(9,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(10,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(11,"\n "),c.ɵɵelementStart(12,"blockquote",55),c.ɵɵtext(13,'\n "No more excuses; start using Bitwarden today. The identity you save could be your\n own. The money definitely will be."\n '),c.ɵɵelementEnd(),c.ɵɵtext(14,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(15,"\n "),c.ɵɵelementEnd())}function G(e,t){1&e&&(c.ɵɵelementStart(0,"div"),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"figure"),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"figcaption"),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"cite"),c.ɵɵtext(7,"\n "),c.ɵɵelement(8,"img",56),c.ɵɵtext(9,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(10,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(11,"\n "),c.ɵɵelementStart(12,"blockquote",55),c.ɵɵtext(13,"\n “Bitwarden boasts the backing of some of the world's best security experts and an\n attractive, easy-to-use interface”\n "),c.ɵɵelementEnd(),c.ɵɵtext(14,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(15,"\n "),c.ɵɵelementEnd())}function W(e,t){1&e&&(c.ɵɵelementStart(0,"div",57),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"img",58),c.ɵɵtext(3,"\n "),c.ɵɵelementEnd())}function $(e,t){1&e&&(c.ɵɵelementStart(0,"div",57),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"img",58),c.ɵɵtext(3,"\n "),c.ɵɵelementEnd())}const Y=function(e){return["layout",e]},Q=function(e,t){return{"col-5":e,"col-12":t}},J=function(e,t){return{"bwi-eye":e,"bwi-eye-slash":t}};class Z extends o.RegisterComponent{constructor(e,t,n,i,r,o,a,s,l,c,d,p,u){super(e,t,n,i,r,a,s,l,d,p),this.route=o,this.policyService=c,this.routerService=u,this.showCreateOrgMessage=!1,this.layout=""}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){this.route.queryParams.pipe(r.first()).subscribe((e=>{if(this.referenceData=new l.ReferenceEventRequest,null!=e.email&&e.email.indexOf("@")>-1&&(this.email=e.email),null!=e.premium)this.routerService.setPreviousUrl("/settings/premium");else if(null!=e.org){this.showCreateOrgMessage=!0,this.referenceData.flow=e.org;const t=this.router.createUrlTree(["create-organization"],{queryParams:{plan:e.org}});this.routerService.setPreviousUrl(t.toString())}if(null!=e.layout&&(this.layout=this.referenceData.layout=e.layout),null!=e.reference?this.referenceData.id=e.reference:this.referenceData.id=("; "+document.cookie).split("; reference=").pop().split(";").shift(),null!=e.sponsorshipToken){const t=this.router.createUrlTree(["setup/families-for-enterprise"],{queryParams:{plan:e.sponsorshipToken}});this.routerService.setPreviousUrl(t.toString())}""===this.referenceData.id&&(this.referenceData.id=null)}));const t=yield this.stateService.getOrganizationInvitation();if(null!=t)try{const e=yield this.apiService.getPoliciesByToken(t.organizationId,t.token,t.email,t.organizationUserId);if(null!=e.data){const t=e.data.map((e=>new a.PolicyData(e)));this.policies=t.map((e=>new s.Policy(e)))}}catch(n){this.logService.error(n)}null!=this.policies&&(this.enforcedPolicyOptions=yield this.policyService.getMasterPasswordPolicyOptions(this.policies)),yield e.ngOnInit.call(this)}))}submit(){const e=Object.create(null,{submit:{get:()=>super.submit}});return i(this,void 0,void 0,(function*(){null==this.enforcedPolicyOptions||this.policyService.evaluateMasterPassword(this.masterPasswordScore,this.masterPassword,this.enforcedPolicyOptions)?yield e.submit.call(this):this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPasswordPolicyRequirementsNotMet"))}))}}t.RegisterComponent=Z,Z.ɵfac=function(e){return new(e||Z)(c.ɵɵdirectiveInject(d.AuthService),c.ɵɵdirectiveInject(p.Router),c.ɵɵdirectiveInject(u.I18nService),c.ɵɵdirectiveInject(m.CryptoService),c.ɵɵdirectiveInject(h.ApiService),c.ɵɵdirectiveInject(p.ActivatedRoute),c.ɵɵdirectiveInject(v.StateService),c.ɵɵdirectiveInject(f.PlatformUtilsService),c.ɵɵdirectiveInject(g.PasswordGenerationService),c.ɵɵdirectiveInject(y.PolicyService),c.ɵɵdirectiveInject(x.EnvironmentService),c.ɵɵdirectiveInject(S.LogService),c.ɵɵdirectiveInject(b.RouterService))},Z.ɵcmp=c.ɵɵdefineComponent({type:Z,selectors:[["app-register"]],features:[c.ɵɵInheritDefinitionFeature],decls:166,vars:85,consts:[[1,"layout",3,"ngClass"],["class","header",4,"ngIf"],["ngNativeValidate","",1,"container",3,"appApiAction","ngSubmit"],["form",""],[1,"row"],["class","col-7",4,"ngIf"],[3,"ngClass"],[1,"row","justify-content-md-center","mt-5"],["class","lead text-center mb-4",4,"ngIf"],[1,"card","d-block"],[1,"card-body"],["type","info","icon","bwi bwi-thumb-tack",3,"title",4,"ngIf"],[1,"form-group"],["for","email"],["id","email","type","text","name","Email","required","","inputmode","email","appInputVerbatim","false",1,"form-control",3,"ngModel","appAutofocus","ngModelChange"],[1,"form-text","text-muted"],["for","name"],["id","name","type","text","name","Name",1,"form-control",3,"ngModel","appAutofocus","ngModelChange"],["type","info",3,"enforcedPolicyOptions",4,"ngIf"],["for","masterPassword"],[1,"d-flex"],[1,"w-100"],["id","masterPassword","name","MasterPassword","required","","appInputVerbatim","",1,"text-monospace","form-control","mb-1",3,"type","ngModel","ngModelChange","input"],[3,"score","showText"],["type","button",1,"ml-1","btn","btn-link",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-lg",3,"ngClass"],[1,"progress-bar","invisible"],["for","masterPasswordRetype"],["id","masterPasswordRetype","name","MasterPasswordRetype","required","","appInputVerbatim","",1,"text-monospace","form-control",3,"type","ngModel","ngModelChange"],["for","hint"],["id","hint","type","text","name","Hint",1,"form-control",3,"ngModel","ngModelChange"],[3,"hidden"],["id","hcaptcha_iframe","height","80"],["class","form-group",4,"ngIf"],[1,"d-flex","mb-2"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["routerLink","/login",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0"],[1,"col-7","d-flex","align-items-center"],[4,"ngIf"],["class","col-5 d-flex align-items-center justify-content-center",4,"ngIf"],[1,"header"],[1,"container"],[1,"col-7"],["alt","Bitwarden","src","../../images/register-layout/logo-horizontal-white.svg",1,"logo","mb-2"],[1,"mt-5"],[1,"lead","text-center","mb-4"],["type","info","icon","bwi bwi-thumb-tack",3,"title"],["type","info",3,"enforcedPolicyOptions"],[1,"form-check"],["type","checkbox","id","acceptPolicies","name","AcceptPolicies",1,"form-check-input",3,"ngModel","ngModelChange"],["for","acceptPolicies",1,"form-check-label","small","text-muted"],["href","https://bitwarden.com/terms/","target","_blank","rel","noopener"],["href","https://bitwarden.com/privacy/","target","_blank","rel","noopener"],["src","../../images/register-layout/cnet-logo.svg","alt","cnet logo",1,"w-25","d-block","mx-auto"],[1,"mx-auto","text-center","px-4"],["src","../../images/register-layout/forbes-logo.svg","alt","Forbes Logo",1,"w-25","d-block","mx-auto"],[1,"col-5","d-flex","align-items-center","justify-content-center"],["src","../../images/register-layout/usnews-360-badge.svg","alt","US News 360 Reviews Best Password Manager",1,"w-50","d-block"]],template:function(e,t){if(1&e&&(c.ɵɵelementStart(0,"div",0),c.ɵɵtext(1,"\n "),c.ɵɵtext(2,"\n "),c.ɵɵtemplate(3,M,13,0,"header",1),c.ɵɵtext(4,"\n\n "),c.ɵɵelementStart(5,"form",2,3),c.ɵɵlistener("ngSubmit",(function(){return t.submit()})),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"div",4),c.ɵɵtext(9,"\n "),c.ɵɵtemplate(10,j,17,4,"div",5),c.ɵɵtext(11,"\n "),c.ɵɵelementStart(12,"div",6),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"div",7),c.ɵɵtext(15,"\n "),c.ɵɵelementStart(16,"div",6),c.ɵɵtext(17,"\n "),c.ɵɵtemplate(18,z,3,3,"p",8),c.ɵɵtext(19,"\n "),c.ɵɵelementStart(20,"div",9),c.ɵɵtext(21,"\n "),c.ɵɵelementStart(22,"div",10),c.ɵɵtext(23,"\n "),c.ɵɵtemplate(24,H,4,6,"app-callout",11),c.ɵɵtext(25,"\n "),c.ɵɵelementStart(26,"div",12),c.ɵɵtext(27,"\n "),c.ɵɵelementStart(28,"label",13),c.ɵɵtext(29),c.ɵɵpipe(30,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(31,"\n "),c.ɵɵelementStart(32,"input",14),c.ɵɵlistener("ngModelChange",(function(e){return t.email=e})),c.ɵɵelementEnd(),c.ɵɵtext(33,"\n "),c.ɵɵelementStart(34,"small",15),c.ɵɵtext(35),c.ɵɵpipe(36,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(37,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(38,"\n "),c.ɵɵelementStart(39,"div",12),c.ɵɵtext(40,"\n "),c.ɵɵelementStart(41,"label",16),c.ɵɵtext(42),c.ɵɵpipe(43,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(44,"\n "),c.ɵɵelementStart(45,"input",17),c.ɵɵlistener("ngModelChange",(function(e){return t.name=e})),c.ɵɵelementEnd(),c.ɵɵtext(46,"\n "),c.ɵɵelementStart(47,"small",15),c.ɵɵtext(48),c.ɵɵpipe(49,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(50,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(51,"\n "),c.ɵɵelementStart(52,"div",12),c.ɵɵtext(53,"\n "),c.ɵɵtemplate(54,L,2,1,"app-callout",18),c.ɵɵtext(55,"\n "),c.ɵɵelementStart(56,"label",19),c.ɵɵtext(57),c.ɵɵpipe(58,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(59,"\n "),c.ɵɵelementStart(60,"div",20),c.ɵɵtext(61,"\n "),c.ɵɵelementStart(62,"div",21),c.ɵɵtext(63,"\n "),c.ɵɵelementStart(64,"input",22),c.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e}))("input",(function(){return t.updatePasswordStrength()})),c.ɵɵelementEnd(),c.ɵɵtext(65,"\n "),c.ɵɵelementStart(66,"app-password-strength",23),c.ɵɵtext(67,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(68,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(69,"\n "),c.ɵɵelementStart(70,"div"),c.ɵɵtext(71,"\n "),c.ɵɵelementStart(72,"button",24),c.ɵɵlistener("click",(function(){return t.togglePassword(!1)})),c.ɵɵpipe(73,"i18n"),c.ɵɵtext(74,"\n "),c.ɵɵelement(75,"i",25),c.ɵɵtext(76,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(77,"\n "),c.ɵɵelement(78,"div",26),c.ɵɵtext(79,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(80,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(81,"\n "),c.ɵɵelementStart(82,"small",15),c.ɵɵtext(83),c.ɵɵpipe(84,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(85,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(86,"\n "),c.ɵɵelementStart(87,"div",12),c.ɵɵtext(88,"\n "),c.ɵɵelementStart(89,"label",27),c.ɵɵtext(90),c.ɵɵpipe(91,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(92,"\n "),c.ɵɵelementStart(93,"div",20),c.ɵɵtext(94,"\n "),c.ɵɵelementStart(95,"input",28),c.ɵɵlistener("ngModelChange",(function(e){return t.confirmMasterPassword=e})),c.ɵɵelementEnd(),c.ɵɵtext(96,"\n "),c.ɵɵelementStart(97,"button",24),c.ɵɵlistener("click",(function(){return t.togglePassword(!0)})),c.ɵɵpipe(98,"i18n"),c.ɵɵtext(99,"\n "),c.ɵɵelement(100,"i",25),c.ɵɵtext(101,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(102,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(103,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(104,"\n "),c.ɵɵelementStart(105,"div",12),c.ɵɵtext(106,"\n "),c.ɵɵelementStart(107,"label",29),c.ɵɵtext(108),c.ɵɵpipe(109,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(110,"\n "),c.ɵɵelementStart(111,"input",30),c.ɵɵlistener("ngModelChange",(function(e){return t.hint=e})),c.ɵɵelementEnd(),c.ɵɵtext(112,"\n "),c.ɵɵelementStart(113,"small",15),c.ɵɵtext(114),c.ɵɵpipe(115,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(116,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(117,"\n "),c.ɵɵelementStart(118,"div",31),c.ɵɵtext(119,"\n "),c.ɵɵelement(120,"iframe",32),c.ɵɵtext(121,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(122,"\n "),c.ɵɵtemplate(123,K,21,10,"div",33),c.ɵɵtext(124,"\n "),c.ɵɵelement(125,"hr"),c.ɵɵtext(126,"\n "),c.ɵɵelementStart(127,"div",34),c.ɵɵtext(128,"\n "),c.ɵɵelementStart(129,"button",35),c.ɵɵtext(130,"\n "),c.ɵɵelementStart(131,"span"),c.ɵɵtext(132),c.ɵɵpipe(133,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(134,"\n "),c.ɵɵelement(135,"i",36),c.ɵɵpipe(136,"i18n"),c.ɵɵtext(137,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(138,"\n "),c.ɵɵelementStart(139,"a",37),c.ɵɵtext(140),c.ɵɵpipe(141,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(142,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(143,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(144,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(145,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(146,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(147,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(148,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(149,"\n "),c.ɵɵelementStart(150,"div",4),c.ɵɵtext(151,"\n "),c.ɵɵelementStart(152,"div",38),c.ɵɵtext(153,"\n "),c.ɵɵtemplate(154,q,16,0,"div",39),c.ɵɵtext(155,"\n\n "),c.ɵɵtemplate(156,G,16,0,"div",39),c.ɵɵtext(157,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(158,"\n "),c.ɵɵtemplate(159,W,4,0,"div",40),c.ɵɵtext(160,"\n "),c.ɵɵtemplate(161,$,4,0,"div",40),c.ɵɵtext(162,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(163,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(164,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(165,"\n")),2&e){const e=c.ɵɵreference(6);c.ɵɵproperty("ngClass",c.ɵɵpureFunction1(71,Y,t.layout)),c.ɵɵadvance(3),c.ɵɵproperty("ngIf","default"===t.layout||"teams"===t.layout||"teams1"===t.layout||"teams2"===t.layout||"enterprise"===t.layout||"enterprise1"===t.layout||"enterprise2"===t.layout||"cnetcmpgnent"===t.layout||"cnetcmpgnteams"===t.layout||"cnetcmpgnind"===t.layout),c.ɵɵadvance(2),c.ɵɵproperty("appApiAction",t.formPromise),c.ɵɵadvance(5),c.ɵɵproperty("ngIf",t.layout),c.ɵɵadvance(2),c.ɵɵproperty("ngClass",c.ɵɵpureFunction2(73,Q,t.layout,!t.layout)),c.ɵɵadvance(4),c.ɵɵproperty("ngClass",c.ɵɵpureFunction2(76,Q,!t.layout,t.layout)),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!t.layout),c.ɵɵadvance(6),c.ɵɵproperty("ngIf",t.showCreateOrgMessage),c.ɵɵadvance(5),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(30,43,"emailAddress")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",t.email)("appAutofocus",""===t.email),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(36,45,"emailAddressDesc")),c.ɵɵadvance(7),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(43,47,"yourName")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",t.name)("appAutofocus",""!==t.email),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(49,49,"yourNameDesc")),c.ɵɵadvance(6),c.ɵɵproperty("ngIf",t.enforcedPolicyOptions),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(58,51,"masterPass")),c.ɵɵadvance(7),c.ɵɵpropertyInterpolate("type",t.showPassword?"text":"password"),c.ɵɵproperty("ngModel",t.masterPassword),c.ɵɵadvance(2),c.ɵɵproperty("score",t.masterPasswordScore)("showText",!0),c.ɵɵadvance(6),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(73,53,"toggleVisibility")),c.ɵɵadvance(3),c.ɵɵproperty("ngClass",c.ɵɵpureFunction2(79,J,!t.showPassword,t.showPassword)),c.ɵɵadvance(8),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(84,55,"masterPassDesc")),c.ɵɵadvance(7),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(91,57,"reTypeMasterPass")),c.ɵɵadvance(5),c.ɵɵpropertyInterpolate("type",t.showPassword?"text":"password"),c.ɵɵproperty("ngModel",t.confirmMasterPassword),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(98,59,"toggleVisibility")),c.ɵɵadvance(3),c.ɵɵproperty("ngClass",c.ɵɵpureFunction2(82,J,!t.showPassword,t.showPassword)),c.ɵɵadvance(8),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(109,61,"masterPassHint")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",t.hint),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(115,63,"masterPassHintDesc")),c.ɵɵadvance(4),c.ɵɵproperty("hidden",!t.showCaptcha()),c.ɵɵadvance(5),c.ɵɵproperty("ngIf",t.showTerms),c.ɵɵadvance(6),c.ɵɵproperty("disabled",e.loading),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(133,65,"submit")),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(136,67,"loading")),c.ɵɵadvance(5),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(141,69,"cancel"),"\n "),c.ɵɵadvance(14),c.ɵɵproperty("ngIf","cnetcmpgnent"===t.layout||"cnetcmpgnteams"===t.layout||"cnetcmpgnind"===t.layout),c.ɵɵadvance(2),c.ɵɵproperty("ngIf","teams"===t.layout||"teams1"===t.layout||"teams2"===t.layout||"enterprise"===t.layout||"enterprise1"===t.layout||"enterprise2"===t.layout||"default"===t.layout),c.ɵɵadvance(3),c.ɵɵproperty("ngIf","cnetcmpgnent"===t.layout||"cnetcmpgnteams"===t.layout||"cnetcmpgnind"===t.layout),c.ɵɵadvance(2),c.ɵɵproperty("ngIf","teams"===t.layout||"teams1"===t.layout||"teams2"===t.layout||"enterprise"===t.layout||"enterprise1"===t.layout||"enterprise2"===t.layout||"default"===t.layout)}},directives:[w.NgClass,w.NgIf,C.NgControlStatusGroup,C.NgForm,I.ApiActionDirective,C.DefaultValueAccessor,C.RequiredValidator,E.InputVerbatimDirective,C.NgControlStatus,C.NgModel,P.AutofocusDirective,O.PasswordStrengthComponent,k.A11yTitleDirective,p.RouterLinkWithHref,A.CalloutComponent,C.CheckboxControlValueAccessor],pipes:[T.I18nPipe],encapsulation:2})},66686:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RemovePasswordComponent=void 0;const i=n(42893),r=n(32621),o=n(57490),a=n(99729);function s(e,t){1&e&&(r.ɵɵelementStart(0,"div",2),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div"),r.ɵɵtext(3,"\n "),r.ɵɵelement(4,"img",3),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"p",4),r.ɵɵtext(7,"\n "),r.ɵɵelement(8,"i",5),r.ɵɵpipe(9,"i18n"),r.ɵɵtext(10,"\n "),r.ɵɵelementStart(11,"span",6),r.ɵɵtext(12),r.ɵɵpipe(13,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(14,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(15,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(16,"\n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(8),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(9,2,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(13,4,"loading")))}function l(e,t){1&e&&(r.ɵɵelement(0,"i",16),r.ɵɵpipe(1,"i18n")),2&e&&r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(1,1,"loading"))}function c(e,t){1&e&&(r.ɵɵelement(0,"i",16),r.ɵɵpipe(1,"i18n")),2&e&&r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(1,1,"loading"))}function d(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"div",7),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",8),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",9),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"p",10),r.ɵɵtext(7),r.ɵɵpipe(8,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelement(10,"hr"),r.ɵɵtext(11,"\n "),r.ɵɵelementStart(12,"div",11),r.ɵɵtext(13,"\n "),r.ɵɵelementStart(14,"div",12),r.ɵɵtext(15,"\n "),r.ɵɵelementStart(16,"p"),r.ɵɵtext(17),r.ɵɵpipe(18,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n\n "),r.ɵɵelementStart(20,"button",13),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext().convert()})),r.ɵɵtext(21,"\n "),r.ɵɵtemplate(22,l,2,3,"i",14),r.ɵɵtext(23),r.ɵɵpipe(24,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(25,"\n "),r.ɵɵelementStart(26,"button",15),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext().leave()})),r.ɵɵtext(27,"\n "),r.ɵɵtemplate(28,c,2,3,"i",14),r.ɵɵtext(29),r.ɵɵpipe(30,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(31,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(32,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(33,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(34,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(35,"\n"),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(7),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(8,8,"removeMasterPassword")),r.ɵɵadvance(10),r.ɵɵtextInterpolate(r.ɵɵpipeBind2(18,10,"convertOrganizationEncryptionDesc",e.organization.name)),r.ɵɵadvance(3),r.ɵɵproperty("disabled",e.actionPromise),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.continuing),r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(24,13,"removeMasterPassword"),"\n "),r.ɵɵadvance(3),r.ɵɵproperty("disabled",e.actionPromise),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.leaving),r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(30,15,"leaveOrganization"),"\n ")}}class p extends i.RemovePasswordComponent{}t.RemovePasswordComponent=p,p.ɵfac=function(){let e;return function(t){return(e||(e=r.ɵɵgetInheritedFactory(p)))(t||p)}}(),p.ɵcmp=r.ɵɵdefineComponent({type:p,selectors:[["app-remove-password"]],features:[r.ɵɵInheritDefinitionFeature],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"],["type","button",1,"btn","btn-primary","btn-block",3,"disabled","click"],["class","bwi bwi-spinner bwi-spin","aria-hidden","true",3,"title",4,"ngIf"],["type","button",1,"btn","btn-outline-secondary","btn-block",3,"disabled","click"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"]],template:function(e,t){1&e&&(r.ɵɵtemplate(0,s,17,6,"div",0),r.ɵɵtext(1,"\n"),r.ɵɵtemplate(2,d,36,17,"div",1),r.ɵɵtext(3,"\n")),2&e&&(r.ɵɵproperty("ngIf",t.loading),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",!t.loading))},directives:[o.NgIf],pipes:[a.I18nPipe],encapsulation:2})},12579:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SetPasswordComponent=void 0;n(68012);const i=n(24656),r=(n(91674),n(85714),n(51554),n(45552),n(84275),n(73828),n(62166),n(73569),n(9724),n(32621)),o=n(91674),a=n(51554),s=n(85714),l=n(45552),c=n(84275),d=n(73828),p=n(62166),u=n(68012),m=n(9724),h=n(73569),v=n(96832),f=n(56820),g=n(57490),y=n(51626),x=n(48198),S=n(40946),b=n(8863),w=n(99729);function C(e,t){1&e&&(r.ɵɵelementStart(0,"div",8),r.ɵɵtext(1,"\n "),r.ɵɵelement(2,"i",9),r.ɵɵpipe(3,"i18n"),r.ɵɵtext(4),r.ɵɵpipe(5,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(3,2,"loading")),r.ɵɵadvance(2),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(5,4,"loading"),"\n "))}function I(e,t){1&e&&(r.ɵɵelementStart(0,"app-callout",30),r.ɵɵpipe(1,"i18n"),r.ɵɵtext(2),r.ɵɵpipe(3,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(1,2,"resetPasswordPolicyAutoEnroll")),r.ɵɵadvance(2),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(3,4,"resetPasswordAutoEnrollInviteWarning"),"\n "))}function E(e,t){if(1&e&&(r.ɵɵelementStart(0,"app-callout",31),r.ɵɵtext(1,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵproperty("enforcedPolicyOptions",e.enforcedPolicyOptions)}}const P=function(e,t){return{"bwi-eye":e,"bwi-eye-slash":t}};function O(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"div",10),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"app-callout",11),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵtemplate(6,I,4,6,"app-callout",12),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"div",13),r.ɵɵtext(9,"\n "),r.ɵɵtemplate(10,E,2,1,"app-callout",14),r.ɵɵtext(11,"\n "),r.ɵɵelementStart(12,"label",15),r.ɵɵtext(13),r.ɵɵpipe(14,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(15,"\n "),r.ɵɵelementStart(16,"div",16),r.ɵɵtext(17,"\n "),r.ɵɵelementStart(18,"div",17),r.ɵɵtext(19,"\n "),r.ɵɵelementStart(20,"input",18),r.ɵɵlistener("ngModelChange",(function(t){r.ɵɵrestoreView(e);return r.ɵɵnextContext().masterPassword=t}))("input",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext().updatePasswordStrength()})),r.ɵɵelementEnd(),r.ɵɵtext(21,"\n "),r.ɵɵelementStart(22,"app-password-strength",19),r.ɵɵtext(23,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(24,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(25,"\n "),r.ɵɵelementStart(26,"div"),r.ɵɵtext(27,"\n "),r.ɵɵelementStart(28,"button",20),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext().togglePassword(!1)})),r.ɵɵpipe(29,"i18n"),r.ɵɵtext(30,"\n "),r.ɵɵelement(31,"i",21),r.ɵɵtext(32,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(33,"\n "),r.ɵɵelement(34,"div",22),r.ɵɵtext(35,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(36,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(37,"\n "),r.ɵɵelementStart(38,"small",23),r.ɵɵtext(39),r.ɵɵpipe(40,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(41,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(42,"\n "),r.ɵɵelementStart(43,"div",13),r.ɵɵtext(44,"\n "),r.ɵɵelementStart(45,"label",24),r.ɵɵtext(46),r.ɵɵpipe(47,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(48,"\n "),r.ɵɵelementStart(49,"div",16),r.ɵɵtext(50,"\n "),r.ɵɵelementStart(51,"input",25),r.ɵɵlistener("ngModelChange",(function(t){r.ɵɵrestoreView(e);return r.ɵɵnextContext().masterPasswordRetype=t})),r.ɵɵelementEnd(),r.ɵɵtext(52,"\n "),r.ɵɵelementStart(53,"button",20),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext().togglePassword(!0)})),r.ɵɵpipe(54,"i18n"),r.ɵɵtext(55,"\n "),r.ɵɵelement(56,"i",21),r.ɵɵtext(57,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(58,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(59,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(60,"\n "),r.ɵɵelementStart(61,"div",13),r.ɵɵtext(62,"\n "),r.ɵɵelementStart(63,"label",26),r.ɵɵtext(64),r.ɵɵpipe(65,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(66,"\n "),r.ɵɵelementStart(67,"input",27),r.ɵɵlistener("ngModelChange",(function(t){r.ɵɵrestoreView(e);return r.ɵɵnextContext().hint=t})),r.ɵɵelementEnd(),r.ɵɵtext(68,"\n "),r.ɵɵelementStart(69,"small",23),r.ɵɵtext(70),r.ɵɵpipe(71,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(72,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(73,"\n "),r.ɵɵelement(74,"hr"),r.ɵɵtext(75,"\n "),r.ɵɵelementStart(76,"div",16),r.ɵɵtext(77,"\n "),r.ɵɵelementStart(78,"button",28),r.ɵɵtext(79,"\n "),r.ɵɵelement(80,"i",9),r.ɵɵpipe(81,"i18n"),r.ɵɵtext(82,"\n "),r.ɵɵelementStart(83,"span"),r.ɵɵtext(84),r.ɵɵpipe(85,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(86,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(87,"\n "),r.ɵɵelementStart(88,"button",29),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext().logOut()})),r.ɵɵtext(89),r.ɵɵpipe(90,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(91,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(92,"\n "),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext(),t=r.ɵɵreference(1);r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(4,23,"ssoCompleteRegistration")),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",e.resetPasswordAutoEnroll),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",e.enforcedPolicyOptions),r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(14,25,"masterPass")),r.ɵɵadvance(7),r.ɵɵpropertyInterpolate("type",e.showPassword?"text":"password"),r.ɵɵproperty("ngModel",e.masterPassword),r.ɵɵadvance(2),r.ɵɵproperty("score",e.masterPasswordScore)("showText",!0),r.ɵɵadvance(6),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(29,27,"toggleVisibility")),r.ɵɵadvance(3),r.ɵɵproperty("ngClass",r.ɵɵpureFunction2(45,P,!e.showPassword,e.showPassword)),r.ɵɵadvance(8),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(40,29,"masterPassDesc")),r.ɵɵadvance(7),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(47,31,"reTypeMasterPass")),r.ɵɵadvance(5),r.ɵɵpropertyInterpolate("type",e.showPassword?"text":"password"),r.ɵɵproperty("ngModel",e.masterPasswordRetype),r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(54,33,"toggleVisibility")),r.ɵɵadvance(3),r.ɵɵproperty("ngClass",r.ɵɵpureFunction2(48,P,!e.showPassword,e.showPassword)),r.ɵɵadvance(8),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(65,35,"masterPassHint")),r.ɵɵadvance(3),r.ɵɵproperty("ngModel",e.hint),r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(71,37,"masterPassHintDesc")),r.ɵɵadvance(8),r.ɵɵproperty("disabled",t.loading),r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(81,39,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(85,41,"submit")),r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(90,43,"logOut"),"\n ")}}class k extends i.SetPasswordComponent{constructor(e,t,n,i,r,o,a,s,l,c,d){super(t,n,i,r,o,a,s,e,l,c,d)}}t.SetPasswordComponent=k,k.ɵfac=function(e){return new(e||k)(r.ɵɵdirectiveInject(o.ApiService),r.ɵɵdirectiveInject(a.I18nService),r.ɵɵdirectiveInject(s.CryptoService),r.ɵɵdirectiveInject(l.MessagingService),r.ɵɵdirectiveInject(c.PasswordGenerationService),r.ɵɵdirectiveInject(d.PlatformUtilsService),r.ɵɵdirectiveInject(p.PolicyService),r.ɵɵdirectiveInject(u.Router),r.ɵɵdirectiveInject(m.SyncService),r.ɵɵdirectiveInject(u.ActivatedRoute),r.ɵɵdirectiveInject(h.StateService))},k.ɵcmp=r.ɵɵdefineComponent({type:k,selectors:[["app-set-password"]],features:[r.ɵɵInheritDefinitionFeature],decls:21,vars:6,consts:[["ngNativeValidate","","autocomplete","off",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],[1,"lead","text-center","mb-4"],[1,"card","d-block"],["class","card-body text-center",4,"ngIf"],["class","card-body",4,"ngIf"],[1,"card-body","text-center"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[1,"card-body"],["type","info"],["type","warning",3,"title",4,"ngIf"],[1,"form-group"],["type","info",3,"enforcedPolicyOptions",4,"ngIf"],["for","masterPassword"],[1,"d-flex"],[1,"w-100"],["id","masterPassword","name","MasterPasswordHash","required","","appInputVerbatim","",1,"text-monospace","form-control","mb-1",3,"type","ngModel","ngModelChange","input"],[3,"score","showText"],["type","button",1,"ml-1","btn","btn-link",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-lg",3,"ngClass"],[1,"progress-bar","invisible"],[1,"form-text","text-muted"],["for","masterPasswordRetype"],["id","masterPasswordRetype","name","MasterPasswordRetype","required","","appInputVerbatim","",1,"text-monospace","form-control",3,"type","ngModel","ngModelChange"],["for","hint"],["id","hint","type","text","name","Hint",1,"form-control",3,"ngModel","ngModelChange"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],["type","button",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0",3,"click"],["type","warning",3,"title"],["type","info",3,"enforcedPolicyOptions"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"form",0,1),r.ɵɵlistener("ngSubmit",(function(){return t.submit()})),r.ɵɵtext(2,"\n "),r.ɵɵelementStart(3,"div",2),r.ɵɵtext(4,"\n "),r.ɵɵelementStart(5,"div",3),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"p",4),r.ɵɵtext(8),r.ɵɵpipe(9,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(10,"\n "),r.ɵɵelementStart(11,"div",5),r.ɵɵtext(12,"\n "),r.ɵɵtemplate(13,C,6,6,"div",6),r.ɵɵtext(14,"\n "),r.ɵɵtemplate(15,O,93,51,"div",7),r.ɵɵtext(16,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(17,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(20,"\n")),2&e&&(r.ɵɵproperty("appApiAction",t.formPromise),r.ɵɵadvance(8),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(9,4,"setMasterPassword")),r.ɵɵadvance(5),r.ɵɵproperty("ngIf",t.syncLoading),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",!t.syncLoading))},directives:[v.NgControlStatusGroup,v.NgForm,f.ApiActionDirective,g.NgIf,y.CalloutComponent,v.DefaultValueAccessor,v.RequiredValidator,x.InputVerbatimDirective,v.NgControlStatus,v.NgModel,S.PasswordStrengthComponent,b.A11yTitleDirective,g.NgClass],pipes:[w.I18nPipe],encapsulation:2})},23291:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SsoComponent=void 0;n(68012);const r=n(14857),o=n(25563),a=(n(91674),n(62694),n(1659),n(56071),n(51554),n(36631),n(84275),n(73828),n(73569),n(32621)),s=n(62694),l=n(68012),c=n(51554),d=n(73569),p=n(73828),u=n(91674),m=n(1659),h=n(56071),v=n(84275),f=n(36631),g=n(96832),y=n(56820),x=n(57490),S=n(45728),b=n(99729);function w(e,t){1&e&&(a.ɵɵelementStart(0,"div",7),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",8),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4),a.ɵɵpipe(5,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"loading")),a.ɵɵadvance(2),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(5,4,"loading"),"\n "))}function C(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"div",7),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"p"),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"div",9),a.ɵɵtext(7,"\n "),a.ɵɵelementStart(8,"label",10),a.ɵɵtext(9),a.ɵɵpipe(10,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(11,"\n "),a.ɵɵelementStart(12,"input",11),a.ɵɵlistener("ngModelChange",(function(t){a.ɵɵrestoreView(e);return a.ɵɵnextContext().identifier=t})),a.ɵɵelementEnd(),a.ɵɵtext(13,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelement(15,"hr"),a.ɵɵtext(16,"\n "),a.ɵɵelementStart(17,"div",12),a.ɵɵtext(18,"\n "),a.ɵɵelementStart(19,"button",13),a.ɵɵtext(20,"\n "),a.ɵɵelementStart(21,"span"),a.ɵɵtext(22," "),a.ɵɵelement(23,"i",14),a.ɵɵtext(24),a.ɵɵpipe(25,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(26,"\n "),a.ɵɵelement(27,"i",8),a.ɵɵpipe(28,"i18n"),a.ɵɵtext(29,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(30,"\n "),a.ɵɵelementStart(31,"a",15),a.ɵɵtext(32),a.ɵɵpipe(33,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(34,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(35,"\n "),a.ɵɵelementEnd()}if(2&e){const e=a.ɵɵnextContext(),t=a.ɵɵreference(1);a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,7,"ssoLogInWithOrgIdentifier")),a.ɵɵadvance(6),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(10,9,"organizationIdentifier")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",e.identifier),a.ɵɵadvance(7),a.ɵɵproperty("disabled",t.loading),a.ɵɵadvance(5),a.ɵɵtextInterpolate1(" ",a.ɵɵpipeBind1(25,11,"logIn")," "),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(28,13,"loading")),a.ɵɵadvance(5),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(33,15,"cancel"),"\n ")}}class I extends o.SsoComponent{constructor(e,t,n,i,r,o,a,s,l,c,d){super(e,t,n,i,r,o,a,s,l,c,d),this.redirectUri=window.location.origin+"/sso-connector.html",this.clientId="web"}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){e.ngOnInit.call(this),this.route.queryParams.pipe(r.first()).subscribe((e=>i(this,void 0,void 0,(function*(){if(null!=e.identifier)this.identifier=e.identifier;else{const e=yield this.stateService.getSsoOrgIdentifier();null!=e&&(this.identifier=e)}}))))}))}submit(){const e=Object.create(null,{submit:{get:()=>super.submit}});return i(this,void 0,void 0,(function*(){yield this.stateService.setSsoOrganizationIdentifier(this.identifier),"browser"===this.clientId&&(document.cookie=`ssoHandOffMessage=${this.i18nService.t("ssoHandOff")};SameSite=strict`),e.submit.call(this)}))}}t.SsoComponent=I,I.ɵfac=function(e){return new(e||I)(a.ɵɵdirectiveInject(s.AuthService),a.ɵɵdirectiveInject(l.Router),a.ɵɵdirectiveInject(c.I18nService),a.ɵɵdirectiveInject(l.ActivatedRoute),a.ɵɵdirectiveInject(d.StateService),a.ɵɵdirectiveInject(p.PlatformUtilsService),a.ɵɵdirectiveInject(u.ApiService),a.ɵɵdirectiveInject(m.CryptoFunctionService),a.ɵɵdirectiveInject(h.EnvironmentService),a.ɵɵdirectiveInject(v.PasswordGenerationService),a.ɵɵdirectiveInject(f.LogService))},I.ɵcmp=a.ɵɵdefineComponent({type:I,selectors:[["app-sso"]],features:[a.ɵɵInheritDefinitionFeature],decls:19,vars:3,consts:[["ngNativeValidate","",1,"container",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],["alt","Bitwarden",1,"logo","mb-2","logo-themed"],[1,"card","d-block","mt-4"],["class","card-body",4,"ngIf"],[1,"card-body"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[1,"form-group"],["for","identifier"],["id","identifier","type","text","name","Identifier","required","","appAutofocus","",1,"form-control",3,"ngModel","ngModelChange"],[1,"d-flex"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-sign-in"],["routerLink","/login",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0"]],template:function(e,t){1&e&&(a.ɵɵelementStart(0,"form",0,1),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(2,"\n "),a.ɵɵelementStart(3,"div",2),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"div",3),a.ɵɵtext(6,"\n "),a.ɵɵelement(7,"img",4),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"div",5),a.ɵɵtext(10,"\n "),a.ɵɵtemplate(11,w,6,6,"div",6),a.ɵɵtext(12,"\n "),a.ɵɵtemplate(13,C,36,17,"div",6),a.ɵɵtext(14,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(15,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(16,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(18,"\n")),2&e&&(a.ɵɵproperty("appApiAction",t.initiateSsoFormPromise),a.ɵɵadvance(11),a.ɵɵproperty("ngIf",t.loggingIn),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!t.loggingIn))},directives:[g.NgControlStatusGroup,g.NgForm,y.ApiActionDirective,x.NgIf,g.DefaultValueAccessor,g.RequiredValidator,S.AutofocusDirective,g.NgControlStatus,g.NgModel,l.RouterLinkWithHref],pipes:[b.I18nPipe],encapsulation:2})},76126:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorOptionsComponent=void 0;n(68012);const i=n(63736),r=(n(51554),n(73828),n(27458),n(32621)),o=n(27458),a=n(68012),s=n(51554),l=n(73828),c=n(8863),d=n(57490),p=n(99729);function u(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"div",19),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",11),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",12),r.ɵɵtext(5,"\n "),r.ɵɵelement(6,"img",20),r.ɵɵtext(7,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"div",14),r.ɵɵtext(10,"\n "),r.ɵɵelementStart(11,"h3"),r.ɵɵtext(12),r.ɵɵelementEnd(),r.ɵɵtext(13),r.ɵɵelementEnd(),r.ɵɵtext(14,"\n "),r.ɵɵelementStart(15,"div",15),r.ɵɵtext(16,"\n "),r.ɵɵelementStart(17,"button",16),r.ɵɵlistener("click",(function(){const t=r.ɵɵrestoreView(e).$implicit;return r.ɵɵnextContext().choose(t)})),r.ɵɵtext(18),r.ɵɵpipe(19,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(20,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(21,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(22,"\n "),r.ɵɵelementEnd()}if(2&e){const e=t.$implicit;r.ɵɵadvance(6),r.ɵɵclassMap("mfaType"+e.type),r.ɵɵproperty("alt",e.name+" logo"),r.ɵɵadvance(6),r.ɵɵtextInterpolate(e.name),r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",e.description,"\n "),r.ɵɵadvance(4),r.ɵɵattribute("aria-describedby",e.name),r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(19,7,"select"),"\n ")}}class m extends i.TwoFactorOptionsComponent{constructor(e,t,n,i){super(e,t,n,i,window)}}t.TwoFactorOptionsComponent=m,m.ɵfac=function(e){return new(e||m)(r.ɵɵdirectiveInject(o.TwoFactorService),r.ɵɵdirectiveInject(a.Router),r.ɵɵdirectiveInject(s.I18nService),r.ɵɵdirectiveInject(l.PlatformUtilsService))},m.ɵcmp=r.ɵɵdefineComponent({type:m,selectors:[["app-two-factor-options"]],features:[r.ɵɵInheritDefinitionFeature],decls:65,vars:22,consts:[["role","dialog","aria-modal","true","aria-labelledby","twoStepOptionsTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],[1,"modal-content"],[1,"modal-header"],["id","twoStepOptionsTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],[1,"list-group","list-group-flush-2fa"],["class","list-group-item list-group-item-action",4,"ngFor","ngForOf"],[1,"list-group-item","list-group-item-action",3,"click"],[1,"two-factor-content"],[1,"logo-col"],["alt","rc logo",1,"recovery-code-img"],[1,"text-col"],[1,"btn-col"],["type","button",1,"btn","btn-outline-secondary","btn-sm",3,"click"],[1,"modal-footer"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"list-group-item","list-group-item-action"],[3,"alt"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",2),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"div",3),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"h2",4),r.ɵɵtext(9),r.ɵɵpipe(10,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n "),r.ɵɵelementStart(12,"button",5),r.ɵɵpipe(13,"i18n"),r.ɵɵtext(14,"\n "),r.ɵɵelementStart(15,"span",6),r.ɵɵtext(16,"×"),r.ɵɵelementEnd(),r.ɵɵtext(17,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵelementStart(20,"div",7),r.ɵɵtext(21,"\n "),r.ɵɵelementStart(22,"div",8),r.ɵɵtext(23,"\n "),r.ɵɵtemplate(24,u,23,9,"div",9),r.ɵɵtext(25,"\n "),r.ɵɵelementStart(26,"div",10),r.ɵɵlistener("click",(function(){return t.recover()})),r.ɵɵtext(27,"\n "),r.ɵɵelementStart(28,"div",11),r.ɵɵtext(29,"\n "),r.ɵɵelementStart(30,"div",12),r.ɵɵtext(31,"\n "),r.ɵɵelement(32,"img",13),r.ɵɵtext(33,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(34,"\n "),r.ɵɵelementStart(35,"div",14),r.ɵɵtext(36,"\n "),r.ɵɵelementStart(37,"h3"),r.ɵɵtext(38),r.ɵɵpipe(39,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(40),r.ɵɵpipe(41,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(42,"\n "),r.ɵɵelementStart(43,"div",15),r.ɵɵtext(44,"\n "),r.ɵɵelementStart(45,"button",16),r.ɵɵlistener("click",(function(){return t.recover()})),r.ɵɵpipe(46,"i18n"),r.ɵɵtext(47),r.ɵɵpipe(48,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(49,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(50,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(51,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(52,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(53,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(54,"\n "),r.ɵɵelementStart(55,"div",17),r.ɵɵtext(56,"\n "),r.ɵɵelementStart(57,"button",18),r.ɵɵtext(58),r.ɵɵpipe(59,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(60,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(61,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(62,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(63,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(64,"\n")),2&e&&(r.ɵɵadvance(9),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(10,8,"twoStepOptions")),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(13,10,"close")),r.ɵɵadvance(12),r.ɵɵproperty("ngForOf",t.providers),r.ɵɵadvance(14),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(39,12,"recoveryCodeTitle")),r.ɵɵadvance(2),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(41,14,"recoveryCodeDesc"),"\n "),r.ɵɵadvance(5),r.ɵɵattribute("aria-descibedby",r.ɵɵpipeBind1(46,16,"recoveryCodeTitle")),r.ɵɵadvance(2),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(48,18,"select"),"\n "),r.ɵɵadvance(11),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(59,20,"close"),"\n "))},directives:[c.A11yTitleDirective,d.NgForOf],pipes:[p.I18nPipe],encapsulation:2})},27359:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorComponent=void 0;const r=n(32621),o=(n(68012),n(71116)),a=(n(64684),n(91674),n(5576),n(62694),n(56071),n(51554),n(36631),n(73828),n(73569),n(27458),n(77459),n(76126)),s=n(32621),l=n(62694),c=n(68012),d=n(51554),p=n(91674),u=n(73828),m=n(73569),h=n(56071),v=n(64684),f=n(36631),g=n(27458),y=n(5576),x=n(77459),S=n(96832),b=n(56820),w=n(57490),C=n(1142),I=n(45728),E=n(48198),P=n(99729),O=["twoFactorOptions"];function k(e,t){1&e&&(s.ɵɵelementStart(0,"p"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,1,"enterVerificationCodeApp"),"\n "))}function A(e,t){if(1&e&&(s.ɵɵelementStart(0,"p"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind2(2,1,"enterVerificationCodeEmail",e.twoFactorEmail),"\n ")}}function T(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"a",24),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(3).sendEmail(!0)})),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext(3);s.ɵɵproperty("appApiAction",e.emailPromise),s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,2,"sendVerificationCodeEmailAgain"),"\n ")}}function M(e,t){if(1&e&&(s.ɵɵelementStart(0,"small",22),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,T,3,4,"a",23),s.ɵɵtext(3,"\n "),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.selectedProviderType===e.providerType.Email)}}function B(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,k,3,3,"p",7),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,A,3,4,"p",7),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"div",18),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"label",19),s.ɵɵtext(9),s.ɵɵpipe(10,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"input",20),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().token=t})),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n "),s.ɵɵtemplate(14,M,4,1,"small",21),s.ɵɵtext(15,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(16,"\n "),s.ɵɵelementContainerEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.selectedProviderType===e.providerType.Authenticator),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.selectedProviderType===e.providerType.Email),s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(10,5,"verificationCode")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.token),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.selectedProviderType===e.providerType.Email)}}function D(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"p",15),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"picture"),s.ɵɵtext(7,"\n "),s.ɵɵelement(8,"source",25),s.ɵɵtext(9,"\n "),s.ɵɵelement(10,"source",26),s.ɵɵtext(11,"\n "),s.ɵɵelement(12,"img",27),s.ɵɵtext(13,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"div",18),s.ɵɵtext(16,"\n "),s.ɵɵelementStart(17,"label",19),s.ɵɵtext(18),s.ɵɵpipe(19,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵelementStart(21,"input",28),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().token=t})),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(23,"\n "),s.ɵɵelementContainerEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,3,"insertYubiKey")),s.ɵɵadvance(15),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(19,5,"verificationCode")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.token)}}function R(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",29),s.ɵɵtext(3,"\n "),s.ɵɵelement(4,"iframe",30),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementContainerEnd()),2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(4),s.ɵɵproperty("allow",e.webAuthnAllow)}}function F(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",31),s.ɵɵtext(3,"\n "),s.ɵɵelement(4,"iframe",32),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementContainerEnd())}function U(e,t){1&e&&(s.ɵɵelement(0,"i",33),s.ɵɵpipe(1,"i18n")),2&e&&s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(1,1,"loading"))}function V(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",34),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"input",35),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().remember=t})),s.ɵɵelementEnd(),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"label",36),s.ɵɵtext(5),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(2),s.ɵɵproperty("ngModel",e.remember),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(6,2,"rememberMe"))}}function N(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"p"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"p"),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,2,"noTwoStepProviders")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,4,"noTwoStepProviders2")))}function _(e,t){if(1&e&&(s.ɵɵelementStart(0,"button",37),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"span"),s.ɵɵtext(3,"\n "),s.ɵɵelement(4,"i",38),s.ɵɵtext(5),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelement(8,"i",39),s.ɵɵpipe(9,"i18n"),s.ɵɵtext(10,"\n "),s.ɵɵelementEnd()),2&e){s.ɵɵnextContext();const e=s.ɵɵreference(1);s.ɵɵproperty("disabled",e.loading),s.ɵɵadvance(5),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(6,3,"continue"),"\n "),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(9,5,"loading"))}}function j(e,t){}const z=function(e){return{"col-9":e}};class H extends o.TwoFactorComponent{constructor(e,t,n,i,r,o,a,s,l,c,d,p,u){super(e,t,n,i,r,window,a,o,l,c,d,p),this.modalService=s,this.routerService=u,this.onSuccessfulLoginNavigate=this.goAfterLogIn}anotherMethod(){return i(this,void 0,void 0,(function*(){const[e]=yield this.modalService.openViewRef(a.TwoFactorOptionsComponent,this.twoFactorOptionsModal,(t=>{t.onProviderSelected.subscribe((t=>i(this,void 0,void 0,(function*(){e.close(),this.selectedProviderType=t,yield this.init()})))),t.onRecoverSelected.subscribe((()=>{e.close()}))}))}))}goAfterLogIn(){return i(this,void 0,void 0,(function*(){const e=this.routerService.getPreviousUrl();e?this.router.navigateByUrl(e):this.router.navigate([this.successRoute],{queryParams:{identifier:this.identifier}})}))}}t.TwoFactorComponent=H,H.ɵfac=function(e){return new(e||H)(s.ɵɵdirectiveInject(l.AuthService),s.ɵɵdirectiveInject(c.Router),s.ɵɵdirectiveInject(d.I18nService),s.ɵɵdirectiveInject(p.ApiService),s.ɵɵdirectiveInject(u.PlatformUtilsService),s.ɵɵdirectiveInject(m.StateService),s.ɵɵdirectiveInject(h.EnvironmentService),s.ɵɵdirectiveInject(v.ModalService),s.ɵɵdirectiveInject(c.ActivatedRoute),s.ɵɵdirectiveInject(f.LogService),s.ɵɵdirectiveInject(g.TwoFactorService),s.ɵɵdirectiveInject(y.AppIdService),s.ɵɵdirectiveInject(x.RouterService))},H.ɵcmp=s.ɵɵdefineComponent({type:H,selectors:[["app-two-factor"]],viewQuery:function(e,t){if(1&e&&s.ɵɵviewQuery(O,7,r.ViewContainerRef),2&e){let e;s.ɵɵqueryRefresh(e=s.ɵɵloadQuery())&&(t.twoFactorOptionsModal=e.first)}},features:[s.ɵɵInheritDefinitionFeature],decls:59,vars:20,consts:[["ngNativeValidate","","autocomplete","off",1,"container",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-md-center","mt-5"],[1,"col-5",3,"ngClass"],[1,"lead","text-center","mb-4"],[1,"card","d-block"],[1,"card-body"],[4,"ngIf"],["class","bwi bwi-spinner text-muted bwi-spin pull-right","aria-hidden","true",3,"title",4,"ngIf"],["class","form-check",4,"ngIf"],[3,"hidden"],["id","hcaptcha_iframe","height","80"],[1,"d-flex","mb-3"],["type","submit","class","btn btn-primary btn-block btn-submit",3,"disabled",4,"ngIf"],["routerLink","/login",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0"],[1,"text-center"],["href","#","appStopClick","",3,"click"],["twoFactorOptions",""],[1,"form-group"],["for","code",1,"sr-only"],["id","code","type","text","name","Code","required","","appAutofocus","","inputmode","tel","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],["class","form-text",4,"ngIf"],[1,"form-text"],["href","#","appStopClick","",3,"appApiAction","click",4,"ngIf"],["href","#","appStopClick","",3,"appApiAction","click"],["srcset","../../images/yubikey.avif","type","image/avif"],["srcset","../../images/yubikey.webp","type","image/webp"],["src","../../images/yubikey.jpg","alt","",1,"rounded","img-fluid","mb-3"],["id","code","type","password","name","Code","required","","appAutofocus","","appInputVerbatim","","autocomplete","new-password",1,"form-control",3,"ngModel","ngModelChange"],["id","web-authn-frame",1,"mb-3"],["id","webauthn_iframe",3,"allow"],["id","duo-frame",1,"mb-3"],["id","duo_iframe"],["aria-hidden","true",1,"bwi","bwi-spinner","text-muted","bwi-spin","pull-right",3,"title"],[1,"form-check"],["id","remember","type","checkbox","name","Remember",1,"form-check-input",3,"ngModel","ngModelChange"],["for","remember",1,"form-check-label"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-sign-in"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"]],template:function(e,t){if(1&e&&(s.ɵɵelementStart(0,"form",0,1),s.ɵɵlistener("ngSubmit",(function(){return t.submit()})),s.ɵɵtext(2,"\n "),s.ɵɵelementStart(3,"div",2),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"div",3),s.ɵɵtext(6,"\n "),s.ɵɵelementStart(7,"p",4),s.ɵɵtext(8),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"div",5),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"div",6),s.ɵɵtext(13,"\n "),s.ɵɵtemplate(14,B,17,7,"ng-container",7),s.ɵɵtext(15,"\n "),s.ɵɵtemplate(16,D,24,7,"ng-container",7),s.ɵɵtext(17,"\n "),s.ɵɵtemplate(18,R,7,1,"ng-container",7),s.ɵɵtext(19,"\n "),s.ɵɵtemplate(20,F,7,0,"ng-container",7),s.ɵɵtext(21,"\n "),s.ɵɵtemplate(22,U,2,3,"i",8),s.ɵɵtext(23,"\n "),s.ɵɵtemplate(24,V,8,4,"div",9),s.ɵɵtext(25,"\n "),s.ɵɵtemplate(26,N,10,6,"ng-container",7),s.ɵɵtext(27,"\n "),s.ɵɵelement(28,"hr"),s.ɵɵtext(29,"\n "),s.ɵɵelementStart(30,"div",10),s.ɵɵtext(31,"\n "),s.ɵɵelement(32,"iframe",11),s.ɵɵtext(33,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(34,"\n "),s.ɵɵelementStart(35,"div",12),s.ɵɵtext(36,"\n "),s.ɵɵtemplate(37,_,11,7,"button",13),s.ɵɵtext(38,"\n "),s.ɵɵelementStart(39,"a",14),s.ɵɵtext(40),s.ɵɵpipe(41,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(42,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(43,"\n "),s.ɵɵelementStart(44,"div",15),s.ɵɵtext(45,"\n "),s.ɵɵelementStart(46,"a",16),s.ɵɵlistener("click",(function(){return t.anotherMethod()})),s.ɵɵtext(47),s.ɵɵpipe(48,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(49,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(50,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(51,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(52,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(53,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(54,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(55,"\n"),s.ɵɵtemplate(56,j,0,0,"ng-template",null,17,s.ɵɵtemplateRefExtractor),s.ɵɵtext(58,"\n")),2&e){const e=s.ɵɵreference(1);s.ɵɵproperty("appApiAction",t.formPromise),s.ɵɵadvance(5),s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(18,z,t.selectedProviderType===t.providerType.Duo||t.selectedProviderType===t.providerType.OrganizationDuo)),s.ɵɵadvance(3),s.ɵɵtextInterpolate(t.title),s.ɵɵadvance(6),s.ɵɵproperty("ngIf",t.selectedProviderType===t.providerType.Email||t.selectedProviderType===t.providerType.Authenticator),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.selectedProviderType===t.providerType.Yubikey),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.selectedProviderType===t.providerType.WebAuthn),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.selectedProviderType===t.providerType.Duo||t.selectedProviderType===t.providerType.OrganizationDuo),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.loading&&t.selectedProviderType===t.providerType.WebAuthn),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",null!=t.selectedProviderType),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",null==t.selectedProviderType),s.ɵɵadvance(4),s.ɵɵproperty("hidden",!t.showCaptcha()),s.ɵɵadvance(7),s.ɵɵproperty("ngIf",null!=t.selectedProviderType&&t.selectedProviderType!==t.providerType.Duo&&t.selectedProviderType!==t.providerType.OrganizationDuo&&t.selectedProviderType!==t.providerType.WebAuthn),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(41,14,"cancel"),"\n "),s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(48,16,"useAnotherTwoStepMethod"))}},directives:[S.NgControlStatusGroup,S.NgForm,b.ApiActionDirective,w.NgClass,w.NgIf,c.RouterLinkWithHref,C.StopClickDirective,S.DefaultValueAccessor,S.RequiredValidator,I.AutofocusDirective,E.InputVerbatimDirective,S.NgControlStatus,S.NgModel,S.CheckboxControlValueAccessor],pipes:[P.I18nPipe],encapsulation:2})},37565:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UpdatePasswordComponent=void 0;n(68012);const i=n(56117),r=(n(91674),n(85714),n(51554),n(36631),n(45552),n(84275),n(73828),n(62166),n(73569),n(57055),n(32621)),o=n(68012),a=n(51554),s=n(73828),l=n(84275),c=n(62166),d=n(85714),p=n(45552),u=n(91674),m=n(36631),h=n(73569),v=n(57055),f=n(96832),g=n(56820),y=n(51626),x=n(57490),S=n(48198),b=n(40946),w=n(99729);function C(e,t){if(1&e&&r.ɵɵelement(0,"app-callout",22),2&e){const e=r.ɵɵnextContext();r.ɵɵproperty("enforcedPolicyOptions",e.enforcedPolicyOptions)}}class I extends i.UpdatePasswordComponent{constructor(e,t,n,i,r,o,a,s,l,c,d){super(e,t,n,i,r,o,a,s,c,d,l)}}t.UpdatePasswordComponent=I,I.ɵfac=function(e){return new(e||I)(r.ɵɵdirectiveInject(o.Router),r.ɵɵdirectiveInject(a.I18nService),r.ɵɵdirectiveInject(s.PlatformUtilsService),r.ɵɵdirectiveInject(l.PasswordGenerationService),r.ɵɵdirectiveInject(c.PolicyService),r.ɵɵdirectiveInject(d.CryptoService),r.ɵɵdirectiveInject(p.MessagingService),r.ɵɵdirectiveInject(u.ApiService),r.ɵɵdirectiveInject(m.LogService),r.ɵɵdirectiveInject(h.StateService),r.ɵɵdirectiveInject(v.UserVerificationService))},I.ɵcmp=r.ɵɵdefineComponent({type:I,selectors:[["app-update-password"]],features:[r.ɵɵInheritDefinitionFeature],decls:91,vars:33,consts:[["ngNativeValidate","","autocomplete","off",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-md-center","mt-5"],[1,"col-4"],[1,"lead","text-center","mb-4"],[1,"card","d-block"],[1,"card-body"],["type","warning"],["type","info",3,"enforcedPolicyOptions",4,"ngIf"],[1,"row"],[1,"col-6"],[1,"form-group"],["for","currentMasterPassword"],["id","currentMasterPassword","type","password","name","MasterPasswordHash","required","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],["for","newMasterPassword"],["id","newMasterPassword","type","password","name","NewMasterPasswordHash","required","","appInputVerbatim","","autocomplete","new-password",1,"form-control","mb-1",3,"ngModel","ngModelChange","input"],[3,"score","showText"],["for","masterPasswordRetype"],["id","masterPasswordRetype","type","password","name","MasterPasswordRetype","required","","appInputVerbatim","","autocomplete","new-password",1,"form-control",3,"ngModel","ngModelChange"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["type","info",3,"enforcedPolicyOptions"]],template:function(e,t){if(1&e&&(r.ɵɵelementStart(0,"form",0,1),r.ɵɵlistener("ngSubmit",(function(){return t.submit()})),r.ɵɵtext(2,"\n "),r.ɵɵelementStart(3,"div",2),r.ɵɵtext(4,"\n "),r.ɵɵelementStart(5,"div",3),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"p",4),r.ɵɵtext(8),r.ɵɵpipe(9,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(10,"\n "),r.ɵɵelementStart(11,"div",5),r.ɵɵtext(12,"\n "),r.ɵɵelementStart(13,"div",6),r.ɵɵtext(14,"\n "),r.ɵɵelementStart(15,"app-callout",7),r.ɵɵtext(16),r.ɵɵpipe(17,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵtemplate(19,C,1,1,"app-callout",8),r.ɵɵtext(20,"\n\n "),r.ɵɵelementStart(21,"form",0,1),r.ɵɵlistener("ngSubmit",(function(){return t.submit()})),r.ɵɵtext(23,"\n "),r.ɵɵelementStart(24,"div",9),r.ɵɵtext(25,"\n "),r.ɵɵelementStart(26,"div",10),r.ɵɵtext(27,"\n "),r.ɵɵelementStart(28,"div",11),r.ɵɵtext(29,"\n "),r.ɵɵelementStart(30,"label",12),r.ɵɵtext(31),r.ɵɵpipe(32,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(33,"\n "),r.ɵɵelementStart(34,"input",13),r.ɵɵlistener("ngModelChange",(function(e){return t.currentMasterPassword=e})),r.ɵɵelementEnd(),r.ɵɵtext(35,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(36,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(37,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(38,"\n "),r.ɵɵelementStart(39,"div",9),r.ɵɵtext(40,"\n "),r.ɵɵelementStart(41,"div",10),r.ɵɵtext(42,"\n "),r.ɵɵelementStart(43,"div",11),r.ɵɵtext(44,"\n "),r.ɵɵelementStart(45,"label",14),r.ɵɵtext(46),r.ɵɵpipe(47,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(48,"\n "),r.ɵɵelementStart(49,"input",15),r.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e}))("input",(function(){return t.updatePasswordStrength()})),r.ɵɵelementEnd(),r.ɵɵtext(50,"\n "),r.ɵɵelement(51,"app-password-strength",16),r.ɵɵtext(52,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(53,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(54,"\n "),r.ɵɵelementStart(55,"div",10),r.ɵɵtext(56,"\n "),r.ɵɵelementStart(57,"div",11),r.ɵɵtext(58,"\n "),r.ɵɵelementStart(59,"label",17),r.ɵɵtext(60),r.ɵɵpipe(61,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(62,"\n "),r.ɵɵelementStart(63,"input",18),r.ɵɵlistener("ngModelChange",(function(e){return t.masterPasswordRetype=e})),r.ɵɵelementEnd(),r.ɵɵtext(64,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(65,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(66,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(67,"\n "),r.ɵɵelementStart(68,"button",19),r.ɵɵtext(69,"\n "),r.ɵɵelement(70,"i",20),r.ɵɵpipe(71,"i18n"),r.ɵɵtext(72,"\n "),r.ɵɵelementStart(73,"span"),r.ɵɵtext(74),r.ɵɵpipe(75,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(76,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(77,"\n "),r.ɵɵelementStart(78,"button",21),r.ɵɵlistener("click",(function(){return t.cancel()})),r.ɵɵtext(79,"\n "),r.ɵɵelementStart(80,"span"),r.ɵɵtext(81),r.ɵɵpipe(82,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(83,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(84,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(85,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(86,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(87,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(88,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(89,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(90,"\n")),2&e){const e=r.ɵɵreference(1);r.ɵɵproperty("appApiAction",t.formPromise),r.ɵɵadvance(8),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(9,17,"updateMasterPassword")),r.ɵɵadvance(8),r.ɵɵtextInterpolate1("",r.ɵɵpipeBind1(17,19,"masterPasswordInvalidWarning")," "),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",t.enforcedPolicyOptions),r.ɵɵadvance(2),r.ɵɵproperty("appApiAction",t.formPromise),r.ɵɵadvance(10),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(32,21,"currentMasterPass")),r.ɵɵadvance(3),r.ɵɵproperty("ngModel",t.currentMasterPassword),r.ɵɵadvance(12),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(47,23,"newMasterPass")),r.ɵɵadvance(3),r.ɵɵproperty("ngModel",t.masterPassword),r.ɵɵadvance(2),r.ɵɵproperty("score",t.masterPasswordScore)("showText",!0),r.ɵɵadvance(9),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(61,25,"confirmNewMasterPass")),r.ɵɵadvance(3),r.ɵɵproperty("ngModel",t.masterPasswordRetype),r.ɵɵadvance(5),r.ɵɵproperty("disabled",e.loading),r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(71,27,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(75,29,"changeMasterPassword")),r.ɵɵadvance(7),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(82,31,"cancel"))}},directives:[f.NgControlStatusGroup,f.NgForm,g.ApiActionDirective,y.CalloutComponent,x.NgIf,f.DefaultValueAccessor,f.RequiredValidator,S.InputVerbatimDirective,f.NgControlStatus,f.NgModel,b.PasswordStrengthComponent],pipes:[w.I18nPipe],encapsulation:2})},6745:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateTempPasswordComponent=void 0;const i=n(73295),r=(n(91674),n(85714),n(51554),n(36631),n(45552),n(84275),n(73828),n(62166),n(73569),n(9724),n(32621)),o=n(51554),a=n(73828),s=n(84275),l=n(62166),c=n(85714),d=n(45552),p=n(91674),u=n(36631),m=n(73569),h=n(9724),v=n(96832),f=n(56820),g=n(51626),y=n(57490),x=n(48198),S=n(40946),b=n(8863),w=n(99729);function C(e,t){if(1&e&&(r.ɵɵelementStart(0,"app-callout",26),r.ɵɵtext(1,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵproperty("enforcedPolicyOptions",e.enforcedPolicyOptions)}}const I=function(e,t){return{"bwi-eye":e,"bwi-eye-slash":t}};class E extends i.UpdateTempPasswordComponent{constructor(e,t,n,i,r,o,a,s,l,c){super(e,t,n,i,r,o,a,l,c,s)}}t.UpdateTempPasswordComponent=E,E.ɵfac=function(e){return new(e||E)(r.ɵɵdirectiveInject(o.I18nService),r.ɵɵdirectiveInject(a.PlatformUtilsService),r.ɵɵdirectiveInject(s.PasswordGenerationService),r.ɵɵdirectiveInject(l.PolicyService),r.ɵɵdirectiveInject(c.CryptoService),r.ɵɵdirectiveInject(d.MessagingService),r.ɵɵdirectiveInject(p.ApiService),r.ɵɵdirectiveInject(u.LogService),r.ɵɵdirectiveInject(m.StateService),r.ɵɵdirectiveInject(h.SyncService))},E.ɵcmp=r.ɵɵdefineComponent({type:E,selectors:[["app-update-temp-password"]],features:[r.ɵɵInheritDefinitionFeature],decls:105,vars:51,consts:[["ngNativeValidate","","autocomplete","off",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-md-center","mt-5"],[1,"col-4"],[1,"lead","text-center","mb-4"],[1,"card","d-block"],[1,"card-body"],["type","warning"],[1,"form-group"],["type","info",3,"enforcedPolicyOptions",4,"ngIf"],["for","masterPassword"],[1,"d-flex"],[1,"w-100"],["id","masterPassword","name","MasterPasswordHash","required","","appInputVerbatim","",1,"text-monospace","form-control","mb-1",3,"type","ngModel","ngModelChange","input"],[3,"score","showText"],["type","button",1,"ml-1","btn","btn-link",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-lg",3,"ngClass"],[1,"progress-bar","invisible"],["for","masterPasswordRetype"],["id","masterPasswordRetype","name","MasterPasswordRetype","required","","appInputVerbatim","",1,"text-monospace","form-control",3,"type","ngModel","ngModelChange"],["for","hint"],["id","hint","type","text","name","Hint",1,"form-control",3,"ngModel","ngModelChange"],[1,"form-text","text-muted"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0",3,"click"],["type","info",3,"enforcedPolicyOptions"]],template:function(e,t){if(1&e&&(r.ɵɵelementStart(0,"form",0,1),r.ɵɵlistener("ngSubmit",(function(){return t.submit()})),r.ɵɵtext(2,"\n "),r.ɵɵelementStart(3,"div",2),r.ɵɵtext(4,"\n "),r.ɵɵelementStart(5,"div",3),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"p",4),r.ɵɵtext(8),r.ɵɵpipe(9,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(10,"\n "),r.ɵɵelementStart(11,"div",5),r.ɵɵtext(12,"\n "),r.ɵɵelementStart(13,"div",6),r.ɵɵtext(14,"\n "),r.ɵɵelementStart(15,"app-callout",7),r.ɵɵtext(16),r.ɵɵpipe(17,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵelementStart(19,"div",8),r.ɵɵtext(20,"\n "),r.ɵɵtemplate(21,C,2,1,"app-callout",9),r.ɵɵtext(22,"\n "),r.ɵɵelementStart(23,"label",10),r.ɵɵtext(24),r.ɵɵpipe(25,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(26,"\n "),r.ɵɵelementStart(27,"div",11),r.ɵɵtext(28,"\n "),r.ɵɵelementStart(29,"div",12),r.ɵɵtext(30,"\n "),r.ɵɵelementStart(31,"input",13),r.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e}))("input",(function(){return t.updatePasswordStrength()})),r.ɵɵelementEnd(),r.ɵɵtext(32,"\n "),r.ɵɵelementStart(33,"app-password-strength",14),r.ɵɵtext(34,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(35,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(36,"\n "),r.ɵɵelementStart(37,"div"),r.ɵɵtext(38,"\n "),r.ɵɵelementStart(39,"button",15),r.ɵɵlistener("click",(function(){return t.togglePassword(!1)})),r.ɵɵpipe(40,"i18n"),r.ɵɵtext(41,"\n "),r.ɵɵelement(42,"i",16),r.ɵɵtext(43,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(44,"\n "),r.ɵɵelement(45,"div",17),r.ɵɵtext(46,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(47,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(48,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(49,"\n "),r.ɵɵelementStart(50,"div",8),r.ɵɵtext(51,"\n "),r.ɵɵelementStart(52,"label",18),r.ɵɵtext(53),r.ɵɵpipe(54,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(55,"\n "),r.ɵɵelementStart(56,"div",11),r.ɵɵtext(57,"\n "),r.ɵɵelementStart(58,"input",19),r.ɵɵlistener("ngModelChange",(function(e){return t.masterPasswordRetype=e})),r.ɵɵelementEnd(),r.ɵɵtext(59,"\n "),r.ɵɵelementStart(60,"button",15),r.ɵɵlistener("click",(function(){return t.togglePassword(!0)})),r.ɵɵpipe(61,"i18n"),r.ɵɵtext(62,"\n "),r.ɵɵelement(63,"i",16),r.ɵɵtext(64,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(65,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(66,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(67,"\n "),r.ɵɵelementStart(68,"div",8),r.ɵɵtext(69,"\n "),r.ɵɵelementStart(70,"label",20),r.ɵɵtext(71),r.ɵɵpipe(72,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(73,"\n "),r.ɵɵelementStart(74,"input",21),r.ɵɵlistener("ngModelChange",(function(e){return t.hint=e})),r.ɵɵelementEnd(),r.ɵɵtext(75,"\n "),r.ɵɵelementStart(76,"small",22),r.ɵɵtext(77),r.ɵɵpipe(78,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(79,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(80,"\n "),r.ɵɵelement(81,"hr"),r.ɵɵtext(82,"\n "),r.ɵɵelementStart(83,"div",11),r.ɵɵtext(84,"\n "),r.ɵɵelementStart(85,"button",23),r.ɵɵtext(86,"\n "),r.ɵɵelement(87,"i",24),r.ɵɵpipe(88,"i18n"),r.ɵɵtext(89,"\n "),r.ɵɵelementStart(90,"span"),r.ɵɵtext(91),r.ɵɵpipe(92,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(93,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(94,"\n "),r.ɵɵelementStart(95,"button",25),r.ɵɵlistener("click",(function(){return t.logOut()})),r.ɵɵtext(96),r.ɵɵpipe(97,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(98,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(99,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(100,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(101,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(102,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(103,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(104,"\n")),2&e){const e=r.ɵɵreference(1);r.ɵɵproperty("appApiAction",t.formPromise),r.ɵɵadvance(8),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(9,23,"updateMasterPassword")),r.ɵɵadvance(8),r.ɵɵtextInterpolate1("",r.ɵɵpipeBind1(17,25,"updateMasterPasswordWarning")," "),r.ɵɵadvance(5),r.ɵɵproperty("ngIf",t.enforcedPolicyOptions),r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(25,27,"masterPass")),r.ɵɵadvance(7),r.ɵɵpropertyInterpolate("type",t.showPassword?"text":"password"),r.ɵɵproperty("ngModel",t.masterPassword),r.ɵɵadvance(2),r.ɵɵproperty("score",t.masterPasswordScore)("showText",!0),r.ɵɵadvance(6),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(40,29,"toggleVisibility")),r.ɵɵadvance(3),r.ɵɵproperty("ngClass",r.ɵɵpureFunction2(45,I,!t.showPassword,t.showPassword)),r.ɵɵadvance(11),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(54,31,"reTypeMasterPass")),r.ɵɵadvance(5),r.ɵɵpropertyInterpolate("type",t.showPassword?"text":"password"),r.ɵɵproperty("ngModel",t.masterPasswordRetype),r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(61,33,"toggleVisibility")),r.ɵɵadvance(3),r.ɵɵproperty("ngClass",r.ɵɵpureFunction2(48,I,!t.showPassword,t.showPassword)),r.ɵɵadvance(8),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(72,35,"masterPassHint")),r.ɵɵadvance(3),r.ɵɵproperty("ngModel",t.hint),r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(78,37,"masterPassHintDesc")),r.ɵɵadvance(8),r.ɵɵproperty("disabled",e.loading),r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(88,39,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(92,41,"submit")),r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(97,43,"logOut"),"\n ")}},directives:[v.NgControlStatusGroup,v.NgForm,f.ApiActionDirective,g.CalloutComponent,y.NgIf,v.DefaultValueAccessor,v.RequiredValidator,x.InputVerbatimDirective,v.NgControlStatus,v.NgModel,S.PasswordStrengthComponent,b.A11yTitleDirective,y.NgClass],pipes:[w.I18nPipe],encapsulation:2})},85002:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.VerifyEmailTokenComponent=void 0;n(68012);const r=n(14857),o=(n(91674),n(51554),n(36631),n(73828),n(73569),n(81106)),a=n(32621),s=n(68012),l=n(73828),c=n(51554),d=n(91674),p=n(36631),u=n(73569),m=n(99729);class h{constructor(e,t,n,i,r,o,a){this.router=e,this.platformUtilsService=t,this.i18nService=n,this.route=i,this.apiService=r,this.logService=o,this.stateService=a}ngOnInit(){this.route.queryParams.pipe(r.first()).subscribe((e=>i(this,void 0,void 0,(function*(){if(null!=e.userId&&null!=e.token)try{return yield this.apiService.postAccountVerifyEmailToken(new o.VerifyEmailRequest(e.userId,e.token)),(yield this.stateService.getIsAuthenticated())&&(yield this.apiService.refreshIdentityToken()),this.platformUtilsService.showToast("success",null,this.i18nService.t("emailVerified")),void this.router.navigate(["/"])}catch(t){this.logService.error(t)}this.platformUtilsService.showToast("error",null,this.i18nService.t("emailVerifiedFailed")),this.router.navigate(["/"])}))))}}t.VerifyEmailTokenComponent=h,h.ɵfac=function(e){return new(e||h)(a.ɵɵdirectiveInject(s.Router),a.ɵɵdirectiveInject(l.PlatformUtilsService),a.ɵɵdirectiveInject(c.I18nService),a.ɵɵdirectiveInject(s.ActivatedRoute),a.ɵɵdirectiveInject(d.ApiService),a.ɵɵdirectiveInject(p.LogService),a.ɵɵdirectiveInject(u.StateService))},h.ɵcmp=a.ɵɵdefineComponent({type:h,selectors:[["app-verify-email-token"]],decls:18,vars:6,consts:[[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"]],template:function(e,t){1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div"),a.ɵɵtext(3,"\n "),a.ɵɵelement(4,"img",1),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"p",2),a.ɵɵtext(7,"\n "),a.ɵɵelement(8,"i",3),a.ɵɵpipe(9,"i18n"),a.ɵɵtext(10,"\n "),a.ɵɵelementStart(11,"span",4),a.ɵɵtext(12),a.ɵɵpipe(13,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(15,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(16,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n")),2&e&&(a.ɵɵadvance(8),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(9,2,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(13,4,"loading")))},pipes:[m.I18nPipe],encapsulation:2})},52e3:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.VerifyRecoverDeleteComponent=void 0;n(68012);const r=n(14857),o=(n(91674),n(51554),n(36631),n(73828),n(25086)),a=n(32621),s=n(68012),l=n(91674),c=n(73828),d=n(51554),p=n(36631),u=n(96832),m=n(56820),h=n(51626),v=n(99729);class f{constructor(e,t,n,i,r,o){this.router=e,this.apiService=t,this.platformUtilsService=n,this.i18nService=i,this.route=r,this.logService=o}ngOnInit(){this.route.queryParams.pipe(r.first()).subscribe((e=>i(this,void 0,void 0,(function*(){null!=e.userId&&null!=e.token&&null!=e.email?(this.userId=e.userId,this.token=e.token,this.email=e.email):this.router.navigate(["/"])}))))}submit(){return i(this,void 0,void 0,(function*(){try{const e=new o.VerifyDeleteRecoverRequest(this.userId,this.token);this.formPromise=this.apiService.postAccountRecoverDeleteToken(e),yield this.formPromise,this.platformUtilsService.showToast("success",this.i18nService.t("accountDeleted"),this.i18nService.t("accountDeletedDesc")),this.router.navigate(["/"])}catch(e){this.logService.error(e)}}))}}t.VerifyRecoverDeleteComponent=f,f.ɵfac=function(e){return new(e||f)(a.ɵɵdirectiveInject(s.Router),a.ɵɵdirectiveInject(l.ApiService),a.ɵɵdirectiveInject(c.PlatformUtilsService),a.ɵɵdirectiveInject(d.I18nService),a.ɵɵdirectiveInject(s.ActivatedRoute),a.ɵɵdirectiveInject(p.LogService))},f.ɵcmp=a.ɵɵdefineComponent({type:f,selectors:[["app-verify-recover-delete"]],decls:53,vars:21,consts:[["ngNativeValidate","",1,"container",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],[1,"lead","text-center","mb-4"],[1,"card"],[1,"card-body"],["type","warning"],[1,"text-center"],[1,"d-flex"],["type","submit",1,"btn","btn-danger","btn-block","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["routerLink","/login",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0"]],template:function(e,t){if(1&e&&(a.ɵɵelementStart(0,"form",0,1),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(2,"\n "),a.ɵɵelementStart(3,"div",2),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"div",3),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"p",4),a.ɵɵtext(8),a.ɵɵpipe(9,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(10,"\n "),a.ɵɵelementStart(11,"div",5),a.ɵɵtext(12,"\n "),a.ɵɵelementStart(13,"div",6),a.ɵɵtext(14,"\n "),a.ɵɵelementStart(15,"app-callout",7),a.ɵɵtext(16),a.ɵɵpipe(17,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(18,"\n "),a.ɵɵelementStart(19,"p",8),a.ɵɵtext(20,"\n "),a.ɵɵelementStart(21,"strong"),a.ɵɵtext(22),a.ɵɵelementEnd(),a.ɵɵtext(23,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(24,"\n "),a.ɵɵelementStart(25,"p"),a.ɵɵtext(26),a.ɵɵpipe(27,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(28,"\n "),a.ɵɵelement(29,"hr"),a.ɵɵtext(30,"\n "),a.ɵɵelementStart(31,"div",9),a.ɵɵtext(32,"\n "),a.ɵɵelementStart(33,"button",10),a.ɵɵtext(34,"\n "),a.ɵɵelementStart(35,"span"),a.ɵɵtext(36),a.ɵɵpipe(37,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(38,"\n "),a.ɵɵelement(39,"i",11),a.ɵɵpipe(40,"i18n"),a.ɵɵtext(41,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(42,"\n "),a.ɵɵelementStart(43,"a",12),a.ɵɵtext(44),a.ɵɵpipe(45,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(46,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(47,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(48,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(49,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(50,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(51,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(52,"\n")),2&e){const e=a.ɵɵreference(1);a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(8),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(9,9,"deleteAccount")),a.ɵɵadvance(8),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(17,11,"deleteAccountWarning")),a.ɵɵadvance(6),a.ɵɵtextInterpolate(t.email),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(27,13,"deleteRecoverConfirmDesc")),a.ɵɵadvance(7),a.ɵɵproperty("disabled",e.loading),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(37,15,"deleteAccount")),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(40,17,"loading")),a.ɵɵadvance(5),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(45,19,"cancel"),"\n ")}},directives:[u.NgControlStatusGroup,u.NgForm,m.ApiActionDirective,h.CalloutComponent,s.RouterLinkWithHref],pipes:[v.I18nPipe],encapsulation:2})},27914:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AppComponent=void 0;const r=n(32621),o=(n(61248),n(68012)),a=n(19755),s=(n(68290),n(78764)),l=(n(62694),n(8470),n(45330),n(3174),n(85714),n(32034),n(88308),n(51554),n(72277),n(38249),n(84275),n(73828),n(62166),n(60421),n(2810),n(73569),n(9724),n(30694),n(82656),n(22991)),c=n(34568),d=n(39123),p=n(34912),u=n(60764),m=n(40558),h=n(57037),v=n(82862),f=n(43909),g=(n(55453),n(77459),n(32621)),y=n(8470),x=n(30694),S=n(88308),b=n(2810),w=n(9724),C=n(84275),I=n(45330),E=n(62694),P=n(68012),O=n(68290),k=n(51554),A=n(73828),T=n(82656),M=n(85714),B=n(3174),D=n(61248),R=n(60421),F=n(38249),U=n(77459),V=n(73569),N=n(32034),_=n(62166),j=n(55453),z=n(72277),H="AppComponent";class L{constructor(e,t,n,i,r,o,a,s,l,c,d,p,u,m,h,v,f,g,y,x,S,b,w,C,I){this.broadcasterService=e,this.tokenService=t,this.folderService=n,this.settingsService=i,this.syncService=r,this.passwordGenerationService=o,this.cipherService=a,this.authService=s,this.router=l,this.toastrService=c,this.i18nService=d,this.platformUtilsService=p,this.ngZone=u,this.vaultTimeoutService=m,this.cryptoService=h,this.collectionService=v,this.sanitizer=f,this.searchService=g,this.notificationsService=y,this.routerService=x,this.stateService=S,this.eventService=b,this.policyService=w,this.policyListService=C,this.keyConnectorService=I,this.lastActivity=null,this.idleTimer=null,this.isIdle=!1}ngOnInit(){this.ngZone.runOutsideAngular((()=>{window.onmousemove=()=>this.recordActivity(),window.onmousedown=()=>this.recordActivity(),window.ontouchstart=()=>this.recordActivity(),window.onclick=()=>this.recordActivity(),window.onscroll=()=>this.recordActivity(),window.onkeypress=()=>this.recordActivity()})),this.broadcasterService.subscribe(H,(e=>i(this,void 0,void 0,(function*(){this.ngZone.run((()=>i(this,void 0,void 0,(function*(){switch(e.command){case"loggedIn":case"unlocked":this.notificationsService.updateConnection(!1);break;case"loggedOut":this.routerService.setPreviousUrl(null),this.notificationsService.updateConnection(!1);break;case"authBlocked":this.routerService.setPreviousUrl(e.url),this.router.navigate(["/"]);break;case"logout":this.logOut(!!e.expired);break;case"lockVault":yield this.vaultTimeoutService.lock();break;case"locked":this.notificationsService.updateConnection(!1),this.router.navigate(["lock"]);break;case"lockedUrl":this.routerService.setPreviousUrl(e.url);break;case"syncStarted":case"syncCompleted":default:break;case"upgradeOrganization":(yield this.platformUtilsService.showDialog(this.i18nService.t("upgradeOrganizationDesc"),this.i18nService.t("upgradeOrganization"),this.i18nService.t("upgradeOrganization"),this.i18nService.t("cancel")))&&this.router.navigate(["organizations",e.organizationId,"settings","billing"]);break;case"premiumRequired":(yield this.platformUtilsService.showDialog(this.i18nService.t("premiumRequiredDesc"),this.i18nService.t("premiumRequired"),this.i18nService.t("learnMore"),this.i18nService.t("cancel")))&&this.router.navigate(["settings/premium"]);break;case"emailVerificationRequired":(yield this.platformUtilsService.showDialog(this.i18nService.t("emailVerificationRequiredDesc"),this.i18nService.t("emailVerificationRequired"),this.i18nService.t("learnMore"),this.i18nService.t("cancel")))&&this.platformUtilsService.launchUri("https://bitwarden.com/help/create-bitwarden-account/");break;case"showToast":this.showToast(e);break;case"setFullWidth":this.setFullWidth();break;case"convertAccountToKeyConnector":this.router.navigate(["/remove-password"])}}))))})))),this.router.events.subscribe((e=>{if(e instanceof o.NavigationEnd){const e=Array.from(document.querySelectorAll(".modal"));for(const t of e)a(t).modal("hide");null!=document.querySelector(".swal-modal")&&s.default.close(void 0)}})),this.policyListService.addPolicies([new f.TwoFactorAuthenticationPolicy,new c.MasterPasswordPolicy,new d.PasswordGeneratorPolicy,new v.SingleOrgPolicy,new u.RequireSsoPolicy,new p.PersonalOwnershipPolicy,new l.DisableSendPolicy,new h.SendOptionsPolicy,new m.ResetPasswordPolicy]),this.setFullWidth()}ngOnDestroy(){this.broadcasterService.unsubscribe(H)}logOut(e){return i(this,void 0,void 0,(function*(){yield this.eventService.uploadEvents();const t=yield this.stateService.getUserId();yield Promise.all([this.eventService.clearEvents(),this.syncService.setLastSync(new Date(0)),this.cryptoService.clearKeys(),this.settingsService.clear(t),this.cipherService.clear(t),this.folderService.clear(t),this.collectionService.clear(t),this.policyService.clear(t),this.passwordGenerationService.clear(),this.keyConnectorService.clear()]),this.searchService.clearIndex(),this.authService.logOut((()=>i(this,void 0,void 0,(function*(){e&&this.platformUtilsService.showToast("warning",this.i18nService.t("loggedOut"),this.i18nService.t("loginExpired")),yield this.stateService.clean({userId:t}),s.default.close(),this.router.navigate(["/"])}))))}))}recordActivity(){return i(this,void 0,void 0,(function*(){const e=(new Date).getTime();null!=this.lastActivity&&e-this.lastActivity<250||(this.lastActivity=e,this.stateService.setLastActive(e),this.isIdle&&(this.isIdle=!1,this.idleStateChanged()),null!=this.idleTimer&&(window.clearTimeout(this.idleTimer),this.idleTimer=null),this.idleTimer=window.setTimeout((()=>{this.isIdle||(this.isIdle=!0,this.idleStateChanged())}),6e5))}))}showToast(e){let t="";const n={};"string"==typeof e.text?t=e.text:1===e.text.length?t=e.text[0]:(e.text.forEach((e=>t+="

"+this.sanitizer.sanitize(r.SecurityContext.HTML,e)+"

")),n.enableHtml=!0),null!=e.options&&(!0===e.options.trustedHtml&&(n.enableHtml=!0),null!=e.options.timeout&&e.options.timeout>0&&(n.timeOut=e.options.timeout)),this.toastrService.show(t,e.title,n,"toast-"+e.type)}idleStateChanged(){this.isIdle?this.notificationsService.disconnectFromInactivity():this.notificationsService.reconnectFromActivity()}setFullWidth(){return i(this,void 0,void 0,(function*(){(yield this.stateService.getEnableFullWidth())?document.body.classList.add("full-width"):document.body.classList.remove("full-width")}))}}t.AppComponent=L,L.ɵfac=function(e){return new(e||L)(g.ɵɵdirectiveInject(y.BroadcasterService),g.ɵɵdirectiveInject(x.TokenService),g.ɵɵdirectiveInject(S.FolderService),g.ɵɵdirectiveInject(b.SettingsService),g.ɵɵdirectiveInject(w.SyncService),g.ɵɵdirectiveInject(C.PasswordGenerationService),g.ɵɵdirectiveInject(I.CipherService),g.ɵɵdirectiveInject(E.AuthService),g.ɵɵdirectiveInject(P.Router),g.ɵɵdirectiveInject(O.ToastrService),g.ɵɵdirectiveInject(k.I18nService),g.ɵɵdirectiveInject(A.PlatformUtilsService),g.ɵɵdirectiveInject(g.NgZone),g.ɵɵdirectiveInject(T.VaultTimeoutService),g.ɵɵdirectiveInject(M.CryptoService),g.ɵɵdirectiveInject(B.CollectionService),g.ɵɵdirectiveInject(D.DomSanitizer),g.ɵɵdirectiveInject(R.SearchService),g.ɵɵdirectiveInject(F.NotificationsService),g.ɵɵdirectiveInject(U.RouterService),g.ɵɵdirectiveInject(V.StateService),g.ɵɵdirectiveInject(N.EventService),g.ɵɵdirectiveInject(_.PolicyService),g.ɵɵdirectiveInject(j.PolicyListService),g.ɵɵdirectiveInject(z.KeyConnectorService))},L.ɵcmp=g.ɵɵdefineComponent({type:L,selectors:[["app-root"]],decls:2,vars:0,template:function(e,t){1&e&&(g.ɵɵelement(0,"router-outlet"),g.ɵɵtext(1,"\n"))},directives:[P.RouterOutlet],encapsulation:2})},50009:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseAcceptComponent=void 0;n(68012);const r=n(14857),o=(n(51554),n(73828),n(73569),n(32621)),a=n(68012),s=n(73828),l=n(51554),c=n(73569);class d{constructor(e,t,n,i,r){this.router=e,this.platformUtilService=t,this.i18nService=n,this.route=i,this.stateService=r,this.loading=!0,this.authed=!1,this.requiredParameters=[],this.failedShortMessage="inviteAcceptFailedShort",this.failedMessage="inviteAcceptFailed"}ngOnInit(){this.route.queryParams.pipe(r.first()).subscribe((e=>i(this,void 0,void 0,(function*(){let t=this.requiredParameters.some((t=>null==(null==e?void 0:e[t])||""===e[t])),n=null;if(!t)if(this.authed=yield this.stateService.getIsAuthenticated(),this.authed)try{yield this.authedHandler(e)}catch(i){t=!0,n=i.message}else this.email=e.email,yield this.unauthedHandler(e);if(t){const e=null!=n?this.i18nService.t(this.failedShortMessage,n):this.i18nService.t(this.failedMessage);this.platformUtilService.showToast("error",null,e,{timeout:1e4}),this.router.navigate(["/"])}this.loading=!1}))))}}t.BaseAcceptComponent=d,d.ɵfac=function(e){return new(e||d)(o.ɵɵdirectiveInject(a.Router),o.ɵɵdirectiveInject(s.PlatformUtilsService),o.ɵɵdirectiveInject(l.I18nService),o.ɵɵdirectiveInject(a.ActivatedRoute),o.ɵɵdirectiveInject(c.StateService))},d.ɵdir=o.ɵɵdefineDirective({type:d})},75512:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseEventsComponent=void 0;n(97445),n(51554),n(36631),n(73828);const r=n(63412),o=(n(3202),n(32621)),a=n(3202),s=n(51554),l=n(97445),c=n(73828),d=n(36631);class p{constructor(e,t,n,i,r){this.eventService=e,this.i18nService=t,this.exportService=n,this.platformUtilsService=i,this.logService=r,this.loading=!0,this.loaded=!1,this.dirtyDates=!0;const o=this.eventService.getDefaultDateFilters();this.start=o[0],this.end=o[1]}exportEvents(){return i(this,void 0,void 0,(function*(){if(this.appApiPromiseUnfulfilled()||this.dirtyDates)return;this.loading=!0;const e=this.parseDates();if(null!=e){try{this.exportPromise=this.export(e[0],e[1]),yield this.exportPromise}catch(t){this.logService.error(`Handled exception: ${t}`)}this.exportPromise=null,this.loading=!1}}))}loadEvents(e){return i(this,void 0,void 0,(function*(){if(this.appApiPromiseUnfulfilled())return;const t=this.parseDates();if(null==t)return;this.loading=!0;let n=[];try{const i=this.loadAndParseEvents(t[0],t[1],e?null:this.continuationToken);e?this.refreshPromise=i:this.morePromise=i;const r=yield i;this.continuationToken=r.continuationToken,n=r.events}catch(i){this.logService.error(`Handled exception: ${i}`)}!e&&null!=this.events&&this.events.length>0?this.events=this.events.concat(n):this.events=n,this.dirtyDates=!1,this.loading=!1,this.morePromise=null,this.refreshPromise=null}))}loadAndParseEvents(e,t,n){return i(this,void 0,void 0,(function*(){const o=yield this.requestEvents(e,t,n),a=yield Promise.all(o.data.map((e=>i(this,void 0,void 0,(function*(){const t=null==e.actingUserId?e.userId:e.actingUserId,n=yield this.eventService.getEventInfo(e),i=this.getUserName(e,t),o=null!=i?i.name:this.i18nService.t("unknown");return new r.EventView({message:n.message,humanReadableMessage:n.humanReadableMessage,appIcon:n.appIcon,appName:n.appName,userId:t,userName:null!=e.installationId?`Installation: ${e.installationId}`:o,userEmail:null!=i?i.email:"",date:e.date,ip:e.ipAddress,type:e.type,installationId:e.installationId})})))));return{continuationToken:o.continuationToken,events:a}}))}parseDates(){let e=null;try{e=this.eventService.formatDateFilters(this.start,this.end)}catch(t){return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("invalidDateRange")),null}return e}appApiPromiseUnfulfilled(){return null!=this.refreshPromise||null!=this.morePromise||null!=this.exportPromise}export(e,t){return i(this,void 0,void 0,(function*(){let n=this.continuationToken,i=[].concat(this.events);for(;null!=n;){const r=yield this.loadAndParseEvents(e,t,n);n=r.continuationToken,i=i.concat(r.events)}const r=yield this.exportService.getEventExport(i),o=this.exportService.getFileName(this.exportFileName,"csv");this.platformUtilsService.saveFile(window,r,{type:"text/plain"},o)}))}}t.BaseEventsComponent=p,p.ɵfac=function(e){return new(e||p)(o.ɵɵdirectiveInject(a.EventService),o.ɵɵdirectiveInject(s.I18nService),o.ɵɵdirectiveInject(l.ExportService),o.ɵɵdirectiveInject(c.PlatformUtilsService),o.ɵɵdirectiveInject(d.LogService))},p.ɵdir=o.ɵɵdefineDirective({type:p})},1833:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BasePeopleComponent=void 0;const r=n(32621),o=(n(50154),n(52080),n(64684),n(47594),n(91674),n(85714),n(51554),n(36631),n(73828),n(60421),n(73569),n(82769)),a=n(85331),s=n(32621),l=n(91674),c=n(60421),d=n(51554),p=n(73828),u=n(85714),m=n(47594),h=n(64684),v=n(36631),f=n(50154),g=n(52080),y=n(73569),x=["confirmTemplate"];class S{constructor(e,t,n,i,r,o,a,s,l,c,d){this.apiService=e,this.searchService=t,this.i18nService=n,this.platformUtilsService=i,this.cryptoService=r,this.validationService=o,this.modalService=a,this.logService=s,this.searchPipe=l,this.userNamePipe=c,this.stateService=d,this.loading=!0,this.statusMap=new Map,this.users=[],this.pagedUsers=[],this.allUsers=[],this.didScroll=!1,this.pageSize=100,this.pagedUsersCount=0}get allCount(){return null!=this.allUsers?this.allUsers.length:0}get invitedCount(){return this.statusMap.has(this.userStatusType.Invited)?this.statusMap.get(this.userStatusType.Invited).length:0}get acceptedCount(){return this.statusMap.has(this.userStatusType.Accepted)?this.statusMap.get(this.userStatusType.Accepted).length:0}get confirmedCount(){return this.statusMap.has(this.userStatusType.Confirmed)?this.statusMap.get(this.userStatusType.Confirmed).length:0}get showConfirmUsers(){return null!=this.allUsers&&null!=this.statusMap&&this.allUsers.length>1&&this.confirmedCount>0&&this.confirmedCount<3&&this.acceptedCount>0}get showBulkConfirmUsers(){return this.acceptedCount>0}load(){return i(this,void 0,void 0,(function*(){const e=yield this.getUsers();this.statusMap.clear();for(const t of o.Utils.iterateEnum(this.userStatusType))this.statusMap.set(t,[]);this.allUsers=null!=e.data&&e.data.length>0?e.data:[],this.allUsers.sort(o.Utils.getSortFunction(this.i18nService,"email")),this.allUsers.forEach((e=>{this.statusMap.has(e.status)?this.statusMap.get(e.status).push(e):this.statusMap.set(e.status,[e])})),this.filter(this.status),this.loading=!1}))}filter(e){this.status=e,null!=this.status?this.users=this.statusMap.get(this.status):this.users=this.allUsers,this.selectAll(!1),this.resetPaging()}loadMore(){if(!this.users||this.users.length<=this.pageSize)return;const e=this.pagedUsers.length;let t=this.pageSize;0===e&&this.pagedUsersCount>this.pageSize&&(t=this.pagedUsersCount),this.users.length>e&&(this.pagedUsers=this.pagedUsers.concat(this.users.slice(e,e+t))),this.pagedUsersCount=this.pagedUsers.length,this.didScroll=this.pagedUsers.length>this.pageSize}checkUser(e,t){e.checked=null==t?!e.checked:t}selectAll(e){e&&this.selectAll(!1);const t=this.searchPipe.transform(this.users,this.searchText,"name","email","id"),n=e&&t.length>500?500:t.length;for(let i=0;ii(this,void 0,void 0,(function*(){try{this.actionPromise=this.confirmUser(e,t),yield this.actionPromise,function(t){e.status=t.userStatusType.Confirmed;const n=t.statusMap.get(t.userStatusType.Accepted).indexOf(e);n>-1&&(t.statusMap.get(t.userStatusType.Accepted).splice(n,1),t.statusMap.get(t.userStatusType.Confirmed).push(e))}(this),this.platformUtilsService.showToast("success",null,this.i18nService.t("hasBeenConfirmed",this.userNamePipe.transform(e)))}catch(n){throw this.validationService.showError(n),n}finally{this.actionPromise=null}}));if(null==this.actionPromise)try{const r=yield this.apiService.getUserPublicKey(e.userId),s=o.Utils.fromB64ToArray(r.publicKey),l=yield this.stateService.getAutoConfirmFingerPrints();if(null==l||!l){const[n]=yield this.modalService.openViewRef(a.UserConfirmComponent,this.confirmModalRef,(r=>{r.name=this.userNamePipe.transform(e),r.userId=null!=e?e.userId:null,r.publicKey=s,r.onConfirmedUser.subscribe((()=>i(this,void 0,void 0,(function*(){try{r.formPromise=t(s),yield r.formPromise,n.close()}catch(e){this.logService.error(e)}}))))}));return}try{const t=yield this.cryptoService.getFingerprint(e.userId,s.buffer);this.logService.info(`User's fingerprint: ${t.join("-")}`)}catch(n){this.logService.error(n)}yield t(s)}catch(n){this.logService.error(`Handled exception: ${n}`)}}))}isSearching(){return this.searchService.isSearchable(this.searchText)}isPaging(){const e=this.isSearching();return e&&this.didScroll&&this.resetPaging(),!e&&this.users&&this.users.length>this.pageSize}deleteWarningMessage(e){return this.i18nService.t("removeUserConfirmation")}getCheckedUsers(){return this.users.filter((e=>e.checked))}removeUser(e){let t=this.users.indexOf(e);t>-1&&(this.users.splice(t,1),this.resetPaging()),this.statusMap.has(e.status)&&(t=this.statusMap.get(e.status).indexOf(e),t>-1&&this.statusMap.get(e.status).splice(t,1))}}t.BasePeopleComponent=S,S.ɵfac=function(e){return new(e||S)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.SearchService),s.ɵɵdirectiveInject(d.I18nService),s.ɵɵdirectiveInject(p.PlatformUtilsService),s.ɵɵdirectiveInject(u.CryptoService),s.ɵɵdirectiveInject(m.ValidationService),s.ɵɵdirectiveInject(h.ModalService),s.ɵɵdirectiveInject(v.LogService),s.ɵɵdirectiveInject(f.SearchPipe),s.ɵɵdirectiveInject(g.UserNamePipe),s.ɵɵdirectiveInject(y.StateService))},S.ɵdir=s.ɵɵdefineDirective({type:S,viewQuery:function(e,t){if(1&e&&s.ɵɵviewQuery(x,7,r.ViewContainerRef),2&e){let e;s.ɵɵqueryRefresh(e=s.ɵɵloadQuery())&&(t.confirmModalRef=e.first)}}})},64713:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NestedCheckboxComponent=void 0;const i=n(32621),r=n(82769),o=n(32621),a=n(96832),s=n(57490),l=n(99729);function c(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",6),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"input",7),o.ɵɵlistener("ngModelChange",(function(t){return o.ɵɵrestoreView(e).$implicit.set(t)})),o.ɵɵelementEnd(),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"label",3),o.ɵɵtext(5),o.ɵɵpipe(6,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("name",n.pascalize(e.id))("id",e.id)("ngModel",e.get()),o.ɵɵadvance(2),o.ɵɵproperty("for",e.id),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(6,5,e.id),"\n ")}}class d{constructor(){this.onSavedUser=new i.EventEmitter,this.onDeletedUser=new i.EventEmitter}get parentIndeterminate(){return!this.parentChecked&&this.checkboxes.some((e=>e.get()))}get parentChecked(){return this.checkboxes.every((e=>e.get()))}set parentChecked(e){this.checkboxes.forEach((t=>{t.set(e)}))}pascalize(e){return r.Utils.camelToPascalCase(e)}}t.NestedCheckboxComponent=d,d.ɵfac=function(e){return new(e||d)},d.ɵcmp=o.ɵɵdefineComponent({type:d,selectors:[["app-nested-checkbox"]],inputs:{parentId:"parentId",checkboxes:"checkboxes"},outputs:{onSavedUser:"onSavedUser",onDeletedUser:"onDeletedUser"},decls:17,vars:9,consts:[[1,"form-group","mb-0"],[1,"form-check","mt-1","form-check-block"],["type","checkbox",1,"form-check-input",3,"name","id","ngModel","indeterminate","ngModelChange"],[1,"form-check-label","font-weight-normal",3,"for"],[1,"form-group","form-group-child-check","mb-0"],["class","form-check mt-1",4,"ngFor","ngForOf"],[1,"form-check","mt-1"],["type","checkbox",1,"form-check-input",3,"name","id","ngModel","ngModelChange"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"input",2),o.ɵɵlistener("ngModelChange",(function(e){return t.parentChecked=e})),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"label",3),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵelementStart(11,"div",4),o.ɵɵtext(12,"\n "),o.ɵɵtemplate(13,c,8,7,"div",5),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n")),2&e&&(o.ɵɵadvance(4),o.ɵɵproperty("name",t.pascalize(t.parentId))("id",t.parentId)("ngModel",t.parentChecked)("indeterminate",t.parentIndeterminate),o.ɵɵadvance(2),o.ɵɵproperty("for",t.parentId),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(8,7,t.parentId),"\n "),o.ɵɵadvance(6),o.ɵɵproperty("ngForOf",t.checkboxes))},directives:[a.CheckboxControlValueAccessor,a.NgControlStatus,a.NgModel,s.NgForOf],pipes:[l.I18nPipe],encapsulation:2})},13045:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationSwitcherComponent=void 0;n(51554),n(63513);const r=n(82769),o=(n(27957),n(13637)),a=n(32621),s=n(63513),l=n(51554),c=n(57490),d=n(8863),p=n(6373),u=n(15370),m=n(44653),h=n(37342),v=n(68012),f=n(62985),g=n(99729);function y(e,t){1&e&&(a.ɵɵelementStart(0,"div",16),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",17),a.ɵɵtext(3,"\n "),a.ɵɵelement(4,"i",18),a.ɵɵtext(5),a.ɵɵpipe(6,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(7,"\n "),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(5),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(6,1,"organizationIsDisabled"),"\n "))}function x(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",19),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",17),a.ɵɵtext(3,"\n "),a.ɵɵelement(4,"i",18),a.ɵɵtext(5),a.ɵɵpipe(6,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(7,"\n "),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext(2);a.ɵɵadvance(5),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind2(6,1,"accessingUsingProvider",e.activeOrganization.providerName),"\n ")}}const S=function(e){return["/organizations",e]};function b(e,t){if(1&e&&(a.ɵɵelementStart(0,"li",20),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"a",21),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"i",22),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"span",23),a.ɵɵtext(7),a.ɵɵpipe(8,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(9,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(10),a.ɵɵelementEnd(),a.ɵɵtext(11,"\n "),a.ɵɵelementEnd()),2&e){const e=t.$implicit,n=a.ɵɵnextContext(2);a.ɵɵadvance(2),a.ɵɵproperty("routerLink",a.ɵɵpureFunction1(6,S,e.id)),a.ɵɵadvance(2),a.ɵɵproperty("ngClass",e.id===n.activeOrganization.id?"visible":"invisible"),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(8,4,"currentOrganization")),a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function w(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",1),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"button",2),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelement(5,"app-avatar",3),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"div",1),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"div",4),a.ɵɵtext(10,"\n "),a.ɵɵelementStart(11,"span"),a.ɵɵtext(12),a.ɵɵelementEnd(),a.ɵɵtext(13,"\n "),a.ɵɵelementStart(14,"small",5),a.ɵɵtext(15),a.ɵɵpipe(16,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(18,"\n "),a.ɵɵelementStart(19,"div",6),a.ɵɵtext(20,"\n "),a.ɵɵelement(21,"i",7),a.ɵɵtext(22,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(23,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(24,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(25,"\n "),a.ɵɵelementStart(26,"div"),a.ɵɵtext(27,"\n "),a.ɵɵtemplate(28,y,8,3,"div",8),a.ɵɵtext(29,"\n "),a.ɵɵtemplate(30,x,8,4,"div",9),a.ɵɵtext(31,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(32,"\n\n "),a.ɵɵelementStart(33,"bit-menu",null,10),a.ɵɵtext(35,"\n "),a.ɵɵelementStart(36,"ul",11),a.ɵɵtext(37,"\n "),a.ɵɵtemplate(38,b,12,8,"li",12),a.ɵɵtext(39,"\n "),a.ɵɵelement(40,"bit-menu-divider"),a.ɵɵtext(41,"\n "),a.ɵɵelementStart(42,"li",13),a.ɵɵtext(43,"\n "),a.ɵɵelementStart(44,"a",14),a.ɵɵtext(45,"\n "),a.ɵɵelement(46,"i",15),a.ɵɵtext(47),a.ɵɵpipe(48,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(49,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(50,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(51,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(52,"\n"),a.ɵɵelementEnd()),2&e){const e=a.ɵɵreference(34),t=a.ɵɵnextContext();a.ɵɵadvance(2),a.ɵɵproperty("appA11yTitle",a.ɵɵpipeBind1(3,11,"organizationPicker"))("bitMenuTriggerFor",e),a.ɵɵadvance(3),a.ɵɵproperty("data",t.activeOrganization.name)("circle",!0)("dynamic",!0),a.ɵɵadvance(7),a.ɵɵtextInterpolate(t.activeOrganization.name),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(16,13,"organization")),a.ɵɵadvance(13),a.ɵɵproperty("ngIf",!t.activeOrganization.enabled),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.activeOrganization.isProviderUser),a.ɵɵadvance(8),a.ɵɵproperty("ngForOf",t.organizations),a.ɵɵadvance(9),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(48,15,"newOrganization"),"")}}class C{constructor(e,t){this.organizationService=e,this.i18nService=t,this.activeOrganization=null,this.organizations=[],this.loaded=!1}ngOnInit(){return i(this,void 0,void 0,(function*(){yield this.load()}))}load(){return i(this,void 0,void 0,(function*(){const e=yield this.organizationService.getAll();this.organizations=e.filter((e=>o.NavigationPermissionsService.canAccessAdmin(e))).sort(r.Utils.getSortFunction(this.i18nService,"name")),this.loaded=!0}))}}t.OrganizationSwitcherComponent=C,C.ɵfac=function(e){return new(e||C)(a.ɵɵdirectiveInject(s.OrganizationService),a.ɵɵdirectiveInject(l.I18nService))},C.ɵcmp=a.ɵɵdefineComponent({type:C,selectors:[["app-organization-switcher"]],inputs:{activeOrganization:"activeOrganization"},decls:2,vars:1,consts:[["class","tw-flex",4,"ngIf"],[1,"tw-flex"],["type","button","id","pickerButton",1,"tw-flex","tw-items-center","tw-bg-background-alt","tw-border-none",3,"appA11yTitle","bitMenuTriggerFor"],["size","45",3,"data","circle","dynamic"],[1,"org-name","tw-ml-3"],[1,"tw-text-muted"],[1,"tw-ml-3"],["aria-hidden","true",1,"bwi","bwi-angle-down","tw-text-main"],["class","tw-ml-3 tw-border tw-border-solid tw-rounded tw-border-danger-500 tw-text-danger",4,"ngIf"],["class","tw-ml-3 tw-border tw-border-solid tw-rounded tw-border-info-500 tw-text-info",4,"ngIf"],["orgPickerMenu",""],["aria-labelledby","pickerButton",1,"tw-p-0","tw-m-0"],["class","tw-list-none tw-flex tw-flex-col","role","none",4,"ngFor","ngForOf"],["role","none",1,"tw-list-none"],["bit-menu-item","","routerLink","/create-organization"],[1,"bwi","bwi-plus","mr-2"],[1,"tw-ml-3","tw-border","tw-border-solid","tw-rounded","tw-border-danger-500","tw-text-danger"],[1,"tw-py-2","tw-px-5"],["aria-hidden","true",1,"bwi","bwi-exclamation-triangle"],[1,"tw-ml-3","tw-border","tw-border-solid","tw-rounded","tw-border-info-500","tw-text-info"],["role","none",1,"tw-list-none","tw-flex","tw-flex-col"],["bit-menu-item","",3,"routerLink"],[1,"bwi","bwi-check","mr-2",3,"ngClass"],[1,"tw-sr-only"]],template:function(e,t){1&e&&(a.ɵɵtemplate(0,w,53,17,"div",0),a.ɵɵtext(1,"\n")),2&e&&a.ɵɵproperty("ngIf",t.loaded&&null!=t.activeOrganization)},directives:[c.NgIf,d.A11yTitleDirective,p.MenuTriggerForDirective,u.AvatarComponent,m.MenuComponent,c.NgForOf,h.MenuDividerComponent,v.RouterLinkWithHref,f.MenuItemComponent,c.NgClass],pipes:[g.I18nPipe],encapsulation:2})},30563:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordRepromptComponent=void 0;const i=n(38991),r=n(32621),o=n(96832),a=n(45728),s=n(48198),l=n(8863),c=n(57490),d=n(53142),p=n(99729),u=function(e,t){return{"bwi-eye":e,"bwi-eye-slash":t}};class m extends i.PasswordRepromptComponent{}t.PasswordRepromptComponent=m,m.ɵfac=function(){let e;return function(t){return(e||(e=r.ɵɵgetInheritedFactory(m)))(t||m)}}(),m.ɵcmp=r.ɵɵdefineComponent({type:m,selectors:[["ng-component"]],features:[r.ɵɵInheritDefinitionFeature],decls:59,vars:24,consts:[["role","dialog","aria-modal","true","aria-labelledby","confirmUserTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],[1,"modal-content",3,"ngSubmit"],["form",""],[1,"modal-header"],["id","confirmUserTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close"],["aria-hidden","true"],[1,"modal-body"],[1,"form-group"],["for","masterPassword"],[1,"d-flex"],["id","masterPassword","name","MasterPassword","required","","appAutofocus","","appInputVerbatim","",1,"text-monospace","form-control",3,"type","ngModel","ngModelChange"],["type","button",1,"ml-1","btn","btn-link",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-lg",3,"ngClass"],[1,"modal-footer"],["type","submit","appBlurClick","",1,"btn","btn-primary","btn-submit"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"form",2,3),r.ɵɵlistener("ngSubmit",(function(){return t.submit()})),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"div",4),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"h2",5),r.ɵɵtext(10),r.ɵɵpipe(11,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelementStart(13,"button",6),r.ɵɵtext(14,"\n "),r.ɵɵelementStart(15,"span",7),r.ɵɵtext(16,"×"),r.ɵɵelementEnd(),r.ɵɵtext(17,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵelementStart(20,"div",8),r.ɵɵtext(21),r.ɵɵpipe(22,"i18n"),r.ɵɵelementStart(23,"div",9),r.ɵɵtext(24,"\n "),r.ɵɵelementStart(25,"label",10),r.ɵɵtext(26),r.ɵɵpipe(27,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(28,"\n "),r.ɵɵelementStart(29,"div",11),r.ɵɵtext(30,"\n "),r.ɵɵelementStart(31,"input",12),r.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),r.ɵɵelementEnd(),r.ɵɵtext(32,"\n "),r.ɵɵelementStart(33,"button",13),r.ɵɵlistener("click",(function(){return t.togglePassword()})),r.ɵɵpipe(34,"i18n"),r.ɵɵtext(35,"\n "),r.ɵɵelement(36,"i",14),r.ɵɵtext(37,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(38,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(39,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(40,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(41,"\n "),r.ɵɵelementStart(42,"div",15),r.ɵɵtext(43,"\n "),r.ɵɵelementStart(44,"button",16),r.ɵɵtext(45,"\n "),r.ɵɵelementStart(46,"span"),r.ɵɵtext(47),r.ɵɵpipe(48,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(49,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(50,"\n "),r.ɵɵelementStart(51,"button",17),r.ɵɵtext(52),r.ɵɵpipe(53,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(54,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(55,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(56,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(57,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(58,"\n")),2&e&&(r.ɵɵadvance(10),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(11,9,"passwordConfirmation"),"\n "),r.ɵɵadvance(11),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(22,11,"passwordConfirmationDesc"),"\n\n "),r.ɵɵadvance(5),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(27,13,"masterPass")),r.ɵɵadvance(5),r.ɵɵpropertyInterpolate("type",t.showPassword?"text":"password"),r.ɵɵproperty("ngModel",t.masterPassword),r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(34,15,"toggleVisibility")),r.ɵɵadvance(3),r.ɵɵproperty("ngClass",r.ɵɵpureFunction2(21,u,!t.showPassword,t.showPassword)),r.ɵɵadvance(11),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(48,17,"ok")),r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(53,19,"cancel"),"\n "))},directives:[o.ɵNgNoValidate,o.NgControlStatusGroup,o.NgForm,o.DefaultValueAccessor,o.RequiredValidator,a.AutofocusDirective,s.InputVerbatimDirective,o.NgControlStatus,o.NgModel,l.A11yTitleDirective,c.NgClass,d.BlurClickDirective],pipes:[p.I18nPipe],encapsulation:2})},40946:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordStrengthComponent=void 0;n(51554);const i=n(32621),r=n(51554),o=n(57490);function a(e,t){if(1&e&&(i.ɵɵelementContainerStart(0),i.ɵɵtext(1),i.ɵɵelementContainerEnd()),2&e){const e=i.ɵɵnextContext();i.ɵɵadvance(1),i.ɵɵtextInterpolate1("\n ",e.text,"\n ")}}const s=function(e){return{width:e}};class l{constructor(e){this.i18nService=e,this.showText=!1,this.scoreWidth=0,this.color="bg-danger"}ngOnChanges(){switch(this.scoreWidth=null==this.score?0:20*(this.score+1),this.score){case 4:this.color="bg-success",this.text=this.i18nService.t("strong");break;case 3:this.color="bg-primary",this.text=this.i18nService.t("good");break;case 2:this.color="bg-warning",this.text=this.i18nService.t("weak");break;default:this.color="bg-danger",this.text=null!=this.score?this.i18nService.t("weak"):null}}}t.PasswordStrengthComponent=l,l.ɵfac=function(e){return new(e||l)(i.ɵɵdirectiveInject(r.I18nService))},l.ɵcmp=i.ɵɵdefineComponent({type:l,selectors:[["app-password-strength"]],inputs:{score:"score",showText:"showText"},features:[i.ɵɵNgOnChangesFeature],decls:8,vars:8,consts:[[1,"progress"],["role","progressbar","aria-valuemin","0","aria-valuemax","100",3,"ngStyle"],[4,"ngIf"]],template:function(e,t){1&e&&(i.ɵɵelementStart(0,"div",0),i.ɵɵtext(1,"\n "),i.ɵɵelementStart(2,"div",1),i.ɵɵtext(3,"\n "),i.ɵɵtemplate(4,a,2,1,"ng-container",2),i.ɵɵtext(5,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(6,"\n"),i.ɵɵelementEnd(),i.ɵɵtext(7,"\n")),2&e&&(i.ɵɵadvance(2),i.ɵɵclassMapInterpolate1("progress-bar ",t.color,""),i.ɵɵproperty("ngStyle",i.ɵɵpureFunction1(6,s,t.scoreWidth+"%")),i.ɵɵattribute("aria-valuenow",t.scoreWidth),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",t.showText&&t.text))},directives:[o.NgStyle,o.NgIf],encapsulation:2})},48403:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PremiumBadgeComponent=void 0;n(45552);const i=n(32621),r=n(45552),o=n(25243),a=n(25108),s=n(99729);function l(e,t){if(1&e){const e=i.ɵɵgetCurrentView();i.ɵɵelementStart(0,"button",1),i.ɵɵlistener("click",(function(){i.ɵɵrestoreView(e);return i.ɵɵnextContext().premiumRequired()})),i.ɵɵtext(1),i.ɵɵpipe(2,"i18n"),i.ɵɵelementEnd()}2&e&&(i.ɵɵadvance(1),i.ɵɵtextInterpolate1("\n ",i.ɵɵpipeBind1(2,1,"premium"),"\n "))}class c{constructor(e){this.messagingService=e}premiumRequired(){this.messagingService.send("premiumRequired")}}t.PremiumBadgeComponent=c,c.ɵfac=function(e){return new(e||c)(i.ɵɵdirectiveInject(r.MessagingService))},c.ɵcmp=i.ɵɵdefineComponent({type:c,selectors:[["app-premium-badge"]],decls:3,vars:0,consts:[["bit-badge","","badgeType","success",3,"click",4,"appNotPremium"],["bit-badge","","badgeType","success",3,"click"]],template:function(e,t){1&e&&(i.ɵɵtext(0,"\n "),i.ɵɵtemplate(1,l,3,3,"button",0),i.ɵɵtext(2,"\n "))},directives:[o.NotPremiumDirective,a.BadgeComponent],pipes:[s.I18nPipe],encapsulation:2})},61841:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.HomeGuard=void 0;n(68012),n(62694);const r=n(72440),o=n(32621),a=n(68012),s=n(62694);class l{constructor(e,t){this.router=e,this.authService=t}canActivate(e){return i(this,void 0,void 0,(function*(){const t=yield this.authService.getAuthStatus();return t===r.AuthenticationStatus.LoggedOut?this.router.createUrlTree(["/login"],{queryParams:e.queryParams}):t===r.AuthenticationStatus.Locked?this.router.createUrlTree(["/lock"],{queryParams:e.queryParams}):this.router.createUrlTree(["/vault"],{queryParams:e.queryParams})}))}}t.HomeGuard=l,l.ɵfac=function(e){return new(e||l)(o.ɵɵinject(a.Router),o.ɵɵinject(s.AuthService))},l.ɵprov=o.ɵɵdefineInjectable({token:l,factory:l.ɵfac})},59964:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.FooterComponent=void 0;n(73828);const r=n(32621),o=n(73828),a=n(99729);class s{constructor(e){this.platformUtilsService=e,this.year="2015"}ngOnInit(){return i(this,void 0,void 0,(function*(){this.year=(new Date).getFullYear().toString(),this.version=yield this.platformUtilsService.getApplicationVersion()}))}}t.FooterComponent=s,s.ɵfac=function(e){return new(e||s)(r.ɵɵdirectiveInject(o.PlatformUtilsService))},s.ɵcmp=r.ɵɵdefineComponent({type:s,selectors:[["app-footer"]],decls:15,vars:5,consts:[[1,"container","footer","text-muted"],[1,"row"],[1,"col"],[1,"col","text-center"],[1,"col","text-right"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",2),r.ɵɵtext(5),r.ɵɵelementEnd(),r.ɵɵtext(6,"\n "),r.ɵɵelement(7,"div",3),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"div",4),r.ɵɵtext(10),r.ɵɵpipe(11,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(13,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(14,"\n")),2&e&&(r.ɵɵadvance(5),r.ɵɵtextInterpolate1("© ",t.year,", Bitwarden Inc."),r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind2(11,2,"versionNumber",t.version),"\n "))},pipes:[a.I18nPipe],encapsulation:2})},16823:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.FrontendLayoutComponent=void 0;n(73828);const r=n(32621),o=n(73828),a=n(68012),s=n(99729);class l{constructor(e){this.platformUtilsService=e,this.year="2015"}ngOnInit(){return i(this,void 0,void 0,(function*(){this.year=(new Date).getFullYear().toString(),this.version=yield this.platformUtilsService.getApplicationVersion(),document.body.classList.add("layout_frontend")}))}ngOnDestroy(){document.body.classList.remove("layout_frontend")}}t.FrontendLayoutComponent=l,l.ɵfac=function(e){return new(e||l)(r.ɵɵdirectiveInject(o.PlatformUtilsService))},l.ɵcmp=r.ɵɵdefineComponent({type:l,selectors:[["app-frontend-layout"]],decls:8,vars:5,consts:[[1,"container","my-5","text-muted","text-center"]],template:function(e,t){1&e&&(r.ɵɵelement(0,"router-outlet"),r.ɵɵtext(1,"\n"),r.ɵɵelementStart(2,"div",0),r.ɵɵtext(3),r.ɵɵelement(4,"br"),r.ɵɵtext(5),r.ɵɵpipe(6,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(7,"\n")),2&e&&(r.ɵɵadvance(3),r.ɵɵtextInterpolate1("\n © ",t.year,", Bitwarden Inc. "),r.ɵɵadvance(2),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind2(6,2,"versionNumber",t.version),"\n"))},directives:[a.RouterOutlet],pipes:[s.I18nPipe],encapsulation:2})},53280:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.NavbarComponent=void 0;n(32621),n(8470),n(51554),n(45552),n(63513),n(73828),n(68291),n(9724),n(30694);const r=n(82769),o=n(13637),a=n(32621),s=n(45552),l=n(73828),c=n(30694),d=n(68291),p=n(9724),u=n(63513),m=n(51554),h=n(8470),v=n(57490),f=n(68012),g=n(8863),y=n(6373),x=n(44653),S=n(37342),b=n(62985),w=n(39159),C=n(15370),I=n(99729),E=function(e){return["/organizations",e]};function P(e,t){if(1&e&&(a.ɵɵelementStart(0,"li",6),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"a",30),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext();a.ɵɵadvance(2),a.ɵɵproperty("routerLink",a.ɵɵpureFunction1(4,E,e.organizations[0].id)),a.ɵɵadvance(1),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,2,"organizations"))}}const O=function(e){return["/providers",e]};function k(e,t){if(1&e&&(a.ɵɵelementStart(0,"li",6),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"a",30),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext(2);a.ɵɵadvance(2),a.ɵɵproperty("routerLink",a.ɵɵpureFunction1(4,O,e.providers[0].id)),a.ɵɵadvance(1),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,2,"provider"))}}function A(e,t){1&e&&(a.ɵɵelementStart(0,"li",6),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"a",31),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,1,"provider")))}function T(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵtemplate(2,k,6,6,"li",11),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,A,6,3,"li",11),a.ɵɵtext(5,"\n "),a.ɵɵelementContainerEnd()),2&e){const e=a.ɵɵnextContext();a.ɵɵadvance(2),a.ɵɵproperty("ngIf",1==e.providers.length),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.providers.length>1)}}function M(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",32),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"app-avatar",33),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"div",34),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"span"),a.ɵɵtext(7),a.ɵɵpipe(8,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(9,"\n "),a.ɵɵelementStart(10,"small",35),a.ɵɵtext(11),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(13,"\n "),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext();a.ɵɵadvance(2),a.ɵɵproperty("data",e.name)("email",e.email)("circle",!0),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(8,5,"loggedInAs")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(e.name)}}const B=function(e){return{"nav-background-alt":e}};class D{constructor(e,t,n,i,r,o,a,s,l){this.messagingService=e,this.platformUtilsService=t,this.tokenService=n,this.providerService=i,this.syncService=r,this.organizationService=o,this.i18nService=a,this.broadcasterService=s,this.ngZone=l,this.selfHosted=!1,this.providers=[],this.organizations=[],this.selfHosted=this.platformUtilsService.isSelfHost()}ngOnInit(){return i(this,void 0,void 0,(function*(){this.name=yield this.tokenService.getName(),this.email=yield this.tokenService.getEmail(),null!=this.name&&""!==this.name.trim()||(this.name=this.email),null==(yield this.syncService.getLastSync())&&(yield this.syncService.fullSync(!1)),this.providers=yield this.providerService.getAll(),this.organizations=yield this.buildOrganizations(),this.broadcasterService.subscribe(this.constructor.name,(e=>i(this,void 0,void 0,(function*(){this.ngZone.run((()=>i(this,void 0,void 0,(function*(){if("organizationCreated"===e.command)this.organizations.length<1&&(this.organizations=yield this.buildOrganizations())}))))}))))}))}buildOrganizations(){return i(this,void 0,void 0,(function*(){return(yield this.organizationService.getAll()).filter((e=>o.NavigationPermissionsService.canAccessAdmin(e))).sort(r.Utils.getSortFunction(this.i18nService,"name"))}))}lock(){this.messagingService.send("lockVault")}logOut(){this.messagingService.send("logout")}}t.NavbarComponent=D,D.ɵfac=function(e){return new(e||D)(a.ɵɵdirectiveInject(s.MessagingService),a.ɵɵdirectiveInject(l.PlatformUtilsService),a.ɵɵdirectiveInject(c.TokenService),a.ɵɵdirectiveInject(d.ProviderService),a.ɵɵdirectiveInject(p.SyncService),a.ɵɵdirectiveInject(u.OrganizationService),a.ɵɵdirectiveInject(m.I18nService),a.ɵɵdirectiveInject(h.BroadcasterService),a.ɵɵdirectiveInject(a.NgZone))},D.ɵcmp=a.ɵɵdefineComponent({type:D,selectors:[["app-navbar"]],decls:106,vars:38,consts:[[1,"navbar","navbar-expand","navbar-dark",3,"ngClass"],[1,"container"],["routerLink","/",1,"navbar-brand",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-shield"],[1,"collapse","navbar-collapse"],[1,"navbar-nav"],["routerLinkActive","active",1,"nav-item"],["routerLink","/vault",1,"nav-link"],["routerLink","/sends",1,"nav-link"],["routerLink","/tools",1,"nav-link"],["routerLink","/reports",1,"nav-link"],["class","nav-item","routerLinkActive","active",4,"ngIf"],[4,"ngIf"],[1,"navbar-nav","flex-row","ml-md-auto","d-none","d-md-flex"],[1,"tw-border-0","tw-bg-transparent","tw-text-alt2","tw-opacity-70","hover:tw-opacity-90",3,"bitMenuTriggerFor"],["aria-hidden","true",1,"bwi","bwi-user-circle","bwi-lg"],["aria-hidden","true",1,"bwi","bwi-caret-down","bwi-sm"],[1,"dropdown-menu"],["accountMenu",""],[1,"tw-max-w-[300px]","tw-min-w-[200px]","tw-flex","tw-flex-col"],["class","tw-flex tw-items-center tw-leading-tight tw-text-info tw-py-1 tw-px-4","appStopProp","",4,"ngIf"],["bit-menu-item","","routerLink","/settings/account"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-user"],["bit-menu-item","","href","https://bitwarden.com/help/","target","_blank","rel","noopener"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-question-circle"],["bit-menu-item","","href","https://bitwarden.com/download/","target","_blank","rel","noopener"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-download"],["bit-menu-item","","type","button",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-lock"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-sign-out"],[1,"nav-link",3,"routerLink"],["routerLink","/providers",1,"nav-link"],["appStopProp","",1,"tw-flex","tw-items-center","tw-leading-tight","tw-text-info","tw-py-1","tw-px-4"],["size","25","fontSize","14",3,"data","email","circle"],[1,"tw-ml-2","tw-block","tw-overflow-hidden","tw-whitespace-nowrap"],[1,"tw-text-muted","tw-block","tw-overflow-hidden","tw-whitespace-nowrap"]],template:function(e,t){if(1&e&&(a.ɵɵelementStart(0,"nav",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",1),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"a",2),a.ɵɵpipe(5,"i18n"),a.ɵɵtext(6,"\n "),a.ɵɵelement(7,"i",3),a.ɵɵtext(8,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(9,"\n "),a.ɵɵelementStart(10,"div",4),a.ɵɵtext(11,"\n "),a.ɵɵelementStart(12,"ul",5),a.ɵɵtext(13,"\n "),a.ɵɵelementStart(14,"li",6),a.ɵɵtext(15,"\n "),a.ɵɵelementStart(16,"a",7),a.ɵɵtext(17),a.ɵɵpipe(18,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(19,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(20,"\n "),a.ɵɵelementStart(21,"li",6),a.ɵɵtext(22,"\n "),a.ɵɵelementStart(23,"a",8),a.ɵɵtext(24),a.ɵɵpipe(25,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(26,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(27,"\n "),a.ɵɵelementStart(28,"li",6),a.ɵɵtext(29,"\n "),a.ɵɵelementStart(30,"a",9),a.ɵɵtext(31),a.ɵɵpipe(32,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(33,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(34,"\n "),a.ɵɵelementStart(35,"li",6),a.ɵɵtext(36,"\n "),a.ɵɵelementStart(37,"a",10),a.ɵɵtext(38),a.ɵɵpipe(39,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(40,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(41,"\n "),a.ɵɵtemplate(42,P,6,6,"li",11),a.ɵɵtext(43,"\n "),a.ɵɵtemplate(44,T,6,2,"ng-container",12),a.ɵɵtext(45,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(46,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(47,"\n "),a.ɵɵelementStart(48,"ul",13),a.ɵɵtext(49,"\n "),a.ɵɵelementStart(50,"li"),a.ɵɵtext(51,"\n "),a.ɵɵelementStart(52,"button",14),a.ɵɵtext(53,"\n "),a.ɵɵelement(54,"i",15),a.ɵɵtext(55,"\n "),a.ɵɵelement(56,"i",16),a.ɵɵtext(57,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(58,"\n "),a.ɵɵelementStart(59,"bit-menu",17,18),a.ɵɵtext(61,"\n "),a.ɵɵelementStart(62,"div",19),a.ɵɵtext(63,"\n "),a.ɵɵtemplate(64,M,14,7,"div",20),a.ɵɵtext(65,"\n "),a.ɵɵelement(66,"bit-menu-divider"),a.ɵɵtext(67,"\n "),a.ɵɵelementStart(68,"a",21),a.ɵɵtext(69,"\n "),a.ɵɵelement(70,"i",22),a.ɵɵtext(71),a.ɵɵpipe(72,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(73,"\n "),a.ɵɵelementStart(74,"a",23),a.ɵɵtext(75,"\n "),a.ɵɵelement(76,"i",24),a.ɵɵtext(77),a.ɵɵpipe(78,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(79,"\n "),a.ɵɵelementStart(80,"a",25),a.ɵɵtext(81,"\n "),a.ɵɵelement(82,"i",26),a.ɵɵtext(83),a.ɵɵpipe(84,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(85,"\n "),a.ɵɵelement(86,"bit-menu-divider"),a.ɵɵtext(87,"\n "),a.ɵɵelementStart(88,"button",27),a.ɵɵlistener("click",(function(){return t.lock()})),a.ɵɵtext(89,"\n "),a.ɵɵelement(90,"i",28),a.ɵɵtext(91),a.ɵɵpipe(92,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(93,"\n "),a.ɵɵelementStart(94,"button",27),a.ɵɵlistener("click",(function(){return t.logOut()})),a.ɵɵtext(95,"\n "),a.ɵɵelement(96,"i",29),a.ɵɵtext(97),a.ɵɵpipe(98,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(99,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(100,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(101,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(102,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(103,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(104,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(105,"\n")),2&e){const e=a.ɵɵreference(60);a.ɵɵproperty("ngClass",a.ɵɵpureFunction1(36,B,t.selfHosted)),a.ɵɵadvance(4),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind2(5,15,"pageTitle","Bitwarden")),a.ɵɵadvance(13),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(18,18,"vaults")),a.ɵɵadvance(7),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(25,20,"send")),a.ɵɵadvance(7),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(32,22,"tools")),a.ɵɵadvance(7),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(39,24,"reports")),a.ɵɵadvance(4),a.ɵɵproperty("ngIf",t.organizations.length>=1),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.providers.length>=1),a.ɵɵadvance(8),a.ɵɵproperty("bitMenuTriggerFor",e),a.ɵɵadvance(12),a.ɵɵproperty("ngIf",t.name),a.ɵɵadvance(7),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(72,26,"accountSettings"),"\n "),a.ɵɵadvance(6),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(78,28,"getHelp"),"\n "),a.ɵɵadvance(6),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(84,30,"getApps"),"\n "),a.ɵɵadvance(8),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(92,32,"lockNow"),"\n "),a.ɵɵadvance(6),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(98,34,"logOut"),"\n ")}},directives:[v.NgClass,f.RouterLinkWithHref,g.A11yTitleDirective,f.RouterLinkActive,v.NgIf,y.MenuTriggerForDirective,x.MenuComponent,S.MenuDividerComponent,b.MenuItemComponent,w.StopPropDirective,C.AvatarComponent],pipes:[I.I18nPipe],encapsulation:2})},53767:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserLayoutComponent=void 0;const i=n(32621),r=n(53280),o=n(68012),a=n(59964);class s{ngOnInit(){document.body.classList.remove("layout_frontend")}}t.UserLayoutComponent=s,s.ɵfac=function(e){return new(e||s)},s.ɵcmp=i.ɵɵdefineComponent({type:s,selectors:[["app-user-layout"]],decls:6,vars:0,template:function(e,t){1&e&&(i.ɵɵelement(0,"app-navbar"),i.ɵɵtext(1,"\n"),i.ɵɵelement(2,"router-outlet"),i.ɵɵtext(3,"\n"),i.ɵɵelement(4,"app-footer"),i.ɵɵtext(5,"\n"))},directives:[r.NavbarComponent,o.RouterOutlet,a.FooterComponent],encapsulation:2})},30322:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LooseComponentsModule=void 0;const i=n(65691),r=n(84696),o=n(38595),a=n(98528),s=n(32621);class l{}t.LooseComponentsModule=l,l.ɵfac=function(e){return new(e||l)},l.ɵmod=s.ɵɵdefineNgModule({type:l}),l.ɵinj=s.ɵɵdefineInjector({imports:[[r.SharedModule,o.VaultFilterModule,a.OrganizationBadgeModule,i.PipesModule]]})},53397:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GetOrgNameFromIdPipe=void 0;const i=n(32621);class r{transform(e,t){var n;return null===(n=t.find((t=>t.id===e)))||void 0===n?void 0:n.name}}t.GetOrgNameFromIdPipe=r,r.ɵfac=function(e){return new(e||r)},r.ɵpipe=i.ɵɵdefinePipe({name:"orgNameFromId",type:r,pure:!0})},65691:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PipesModule=void 0;const i=n(32621);class r{}t.PipesModule=r,r.ɵfac=function(e){return new(e||r)},r.ɵmod=i.ɵɵdefineNgModule({type:r}),r.ɵinj=i.ɵɵdefineInjector({imports:[[]]})},84696:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SharedModule=void 0;const i=n(83072),r=n(57490),o=n(3276),a=n(34956),s=n(76775),l=n(12352),c=n(11155),d=n(3951),p=n(59413),u=n(53151),m=n(81114),h=n(78611),v=n(59267),f=n(32406),g=n(31861),y=n(73986),x=n(57548),S=n(77015),b=n(54556),w=n(54996),C=n(74299),I=n(66173),E=n(56649),P=n(12734),O=n(64273),k=n(80585),A=n(96119),T=n(23806),M=n(53734),B=n(88609),D=n(96133),R=n(65989),F=n(99643),U=n(17964),V=n(56168),N=n(7972),_=n(12774),j=n(99692),z=n(91679),H=n(84782),L=n(98204),K=n(85247),q=n(16407),G=n(13418),W=n(96053),$=n(22671),Y=n(81262),Q=n(2487),J=n(72377),Z=n(66598),X=n(15419),ee=n(32584),te=n(96832),ne=n(68012),ie=n(30202),re=n(37407),oe=n(68290),ae=n(44926),se=n(32621);r.registerLocaleData(o.default,"af"),r.registerLocaleData(a.default,"az"),r.registerLocaleData(s.default,"be"),r.registerLocaleData(l.default,"bg"),r.registerLocaleData(c.default,"bn"),r.registerLocaleData(d.default,"bs"),r.registerLocaleData(p.default,"ca"),r.registerLocaleData(u.default,"cs"),r.registerLocaleData(m.default,"da"),r.registerLocaleData(h.default,"de"),r.registerLocaleData(v.default,"el"),r.registerLocaleData(f.default,"en-GB"),r.registerLocaleData(g.default,"en-IN"),r.registerLocaleData(y.default,"eo"),r.registerLocaleData(x.default,"es"),r.registerLocaleData(S.default,"et"),r.registerLocaleData(b.default,"fi"),r.registerLocaleData(w.default,"fil"),r.registerLocaleData(C.default,"fr"),r.registerLocaleData(I.default,"he"),r.registerLocaleData(E.default,"hi"),r.registerLocaleData(P.default,"hr"),r.registerLocaleData(O.default,"hu"),r.registerLocaleData(k.default,"id"),r.registerLocaleData(A.default,"it"),r.registerLocaleData(T.default,"ja"),r.registerLocaleData(M.default,"ka"),r.registerLocaleData(B.default,"km"),r.registerLocaleData(D.default,"kn"),r.registerLocaleData(R.default,"ko"),r.registerLocaleData(F.default,"lv"),r.registerLocaleData(U.default,"ml"),r.registerLocaleData(V.default,"nb"),r.registerLocaleData(N.default,"nl"),r.registerLocaleData(_.default,"nn"),r.registerLocaleData(j.default,"pl"),r.registerLocaleData(z.default,"pt-BR"),r.registerLocaleData(H.default,"pt-PT"),r.registerLocaleData(L.default,"ro"),r.registerLocaleData(K.default,"ru"),r.registerLocaleData(q.default,"si"),r.registerLocaleData(G.default,"sk"),r.registerLocaleData(W.default,"sl"),r.registerLocaleData($.default,"sr"),r.registerLocaleData(Y.default,"sv"),r.registerLocaleData(Q.default,"tr"),r.registerLocaleData(J.default,"uk"),r.registerLocaleData(Z.default,"vi"),r.registerLocaleData(X.default,"zh-CN"),r.registerLocaleData(ee.default,"zh-TW");class le{}t.SharedModule=le,le.ɵfac=function(e){return new(e||le)},le.ɵmod=se.ɵɵdefineNgModule({type:le}),le.ɵinj=se.ɵɵdefineInjector({providers:[r.DatePipe],imports:[[r.CommonModule,i.DragDropModule,te.FormsModule,re.InfiniteScrollModule,ae.JslibModule,te.ReactiveFormsModule,ne.RouterModule,ie.BadgeModule,ie.ButtonModule,ie.CalloutModule,oe.ToastrModule,ie.BadgeModule,ie.ButtonModule,ie.MenuModule],r.CommonModule,i.DragDropModule,te.FormsModule,re.InfiniteScrollModule,ae.JslibModule,te.ReactiveFormsModule,ne.RouterModule,ie.BadgeModule,ie.ButtonModule,ie.CalloutModule,oe.ToastrModule,ie.BadgeModule,ie.ButtonModule,ie.MenuModule]})},43310:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionFilterComponent=void 0;const i=n(57563),r=n(32621),o=n(57490),a=n(99729),s=function(e,t){return{"bwi-angle-right":e,"bwi-angle-down":t}};function l(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"button",16),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);const t=r.ɵɵnextContext().$implicit;return r.ɵɵnextContext(4).toggleCollapse(t.node)})),r.ɵɵpipe(1,"i18n"),r.ɵɵtext(2,"\n "),r.ɵɵelement(3,"i",3),r.ɵɵtext(4,"\n "),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext().$implicit,t=r.ɵɵnextContext(4);r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(1,4,"toggleCollapse")),r.ɵɵattribute("aria-expanded",!t.isCollapsed(e.node))("aria-controls",e.node.name+"_children"),r.ɵɵadvance(3),r.ɵɵproperty("ngClass",r.ɵɵpureFunction2(6,s,t.isCollapsed(e.node),!t.isCollapsed(e.node)))}}function c(e,t){1&e&&r.ɵɵelement(0,"i",17)}function d(e,t){1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵelementContainerEnd())}const p=function(e){return{$implicit:e}};function u(e,t){if(1&e&&(r.ɵɵelementStart(0,"ul",18),r.ɵɵtext(1,"\n "),r.ɵɵtemplate(2,d,2,0,"ng-container",8),r.ɵɵtext(3,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext().$implicit;r.ɵɵnextContext(2);const t=r.ɵɵreference(3);r.ɵɵproperty("id",e.node.name+"_children"),r.ɵɵadvance(2),r.ɵɵproperty("ngTemplateOutlet",t)("ngTemplateOutletContext",r.ɵɵpureFunction1(3,p,e.children))}}const m=function(e){return{active:e}};function h(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"li",10),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"span",11),r.ɵɵtext(3,"\n "),r.ɵɵtemplate(4,l,5,9,"button",12),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"button",13),r.ɵɵlistener("click",(function(){const t=r.ɵɵrestoreView(e).$implicit;return r.ɵɵnextContext(4).applyFilter(t.node)})),r.ɵɵtext(7,"\n "),r.ɵɵtemplate(8,c,1,0,"i",14),r.ɵɵtext(9),r.ɵɵelementEnd(),r.ɵɵtext(10,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n "),r.ɵɵtemplate(12,u,4,5,"ul",15),r.ɵɵtext(13,"\n "),r.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=r.ɵɵnextContext(4);r.ɵɵproperty("ngClass",r.ɵɵpureFunction1(5,m,e.node.id===n.activeFilter.selectedCollectionId)),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",e.children.length),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",0===e.children.length),r.ɵɵadvance(1),r.ɵɵtextInterpolate1(" ",e.node.name,"\n "),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",e.children.length&&!n.isCollapsed(e.node))}}function v(e,t){if(1&e&&(r.ɵɵtext(0,"\n "),r.ɵɵtemplate(1,h,14,7,"li",9),r.ɵɵtext(2,"\n ")),2&e){const e=t.$implicit;r.ɵɵadvance(1),r.ɵɵproperty("ngForOf",e)}}function f(e,t){1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵelementContainerEnd())}function g(e,t){if(1&e&&(r.ɵɵelementStart(0,"ul",6),r.ɵɵtext(1,"\n "),r.ɵɵtemplate(2,v,3,1,"ng-template",null,7,r.ɵɵtemplateRefExtractor),r.ɵɵtext(4,"\n "),r.ɵɵtemplate(5,f,2,0,"ng-container",8),r.ɵɵtext(6,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵreference(3),t=r.ɵɵnextContext(2);r.ɵɵadvance(5),r.ɵɵproperty("ngTemplateOutlet",e)("ngTemplateOutletContext",r.ɵɵpureFunction1(2,p,t.nestedCollections))}}function y(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"button",2),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);const t=r.ɵɵnextContext();return t.toggleCollapse(t.collectionsGrouping)})),r.ɵɵpipe(5,"i18n"),r.ɵɵtext(6,"\n "),r.ɵɵelement(7,"i",3),r.ɵɵtext(8,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementStart(10,"h3",4),r.ɵɵtext(11),r.ɵɵpipe(12,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(13,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(14,"\n "),r.ɵɵtemplate(15,g,7,4,"ul",5),r.ɵɵtext(16,"\n"),r.ɵɵelementContainerEnd()}if(2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(4),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(5,5,"toggleCollapse")),r.ɵɵattribute("aria-expanded",!e.isCollapsed(e.collectionsGrouping)),r.ɵɵadvance(3),r.ɵɵproperty("ngClass",r.ɵɵpureFunction2(9,s,e.isCollapsed(e.collectionsGrouping),!e.isCollapsed(e.collectionsGrouping))),r.ɵɵadvance(4),r.ɵɵtextInterpolate1(" ",r.ɵɵpipeBind1(12,7,e.collectionsGrouping.name),""),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",!e.isCollapsed(e.collectionsGrouping))}}class x extends i.CollectionFilterComponent{}t.CollectionFilterComponent=x,x.ɵfac=function(){let e;return function(t){return(e||(e=r.ɵɵgetInheritedFactory(x)))(t||x)}}(),x.ɵcmp=r.ɵɵdefineComponent({type:x,selectors:[["app-collection-filter"]],features:[r.ɵɵInheritDefinitionFeature],decls:2,vars:1,consts:[[4,"ngIf"],[1,"filter-heading"],["aria-controls","collection-filters",1,"toggle-button",3,"title","click"],["aria-hidden","true",1,"bwi","bwi-fw",3,"ngClass"],[1,"filter-title"],["id","collection-filters","class","filter-options",4,"ngIf"],["id","collection-filters",1,"filter-options"],["recursiveCollections",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","filter-option",3,"ngClass",4,"ngFor","ngForOf"],[1,"filter-option",3,"ngClass"],[1,"filter-buttons"],["class","toggle-button",3,"title","click",4,"ngIf"],[1,"filter-button",3,"click"],["class","bwi bwi-collection bwi-fw","aria-hidden","true",4,"ngIf"],["class","nested-filter-options",3,"id",4,"ngIf"],[1,"toggle-button",3,"title","click"],["aria-hidden","true",1,"bwi","bwi-collection","bwi-fw"],[1,"nested-filter-options",3,"id"]],template:function(e,t){1&e&&(r.ɵɵtemplate(0,y,17,12,"ng-container",0),r.ɵɵtext(1,"\n")),2&e&&r.ɵɵproperty("ngIf",t.show)},directives:[o.NgIf,o.NgClass,o.NgTemplateOutlet,o.NgForOf],pipes:[a.I18nPipe],encapsulation:2})},94642:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FolderFilterComponent=void 0;const i=n(73821),r=n(32621),o=n(57490),a=n(8863),s=n(99729),l=function(e,t){return{"bwi-angle-right":e,"bwi-angle-down":t}};function c(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"button",19),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);const t=r.ɵɵnextContext().$implicit;return r.ɵɵnextContext(4).toggleCollapse(t.node)})),r.ɵɵpipe(1,"i18n"),r.ɵɵtext(2,"\n "),r.ɵɵelement(3,"i",3),r.ɵɵtext(4,"\n "),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext().$implicit,t=r.ɵɵnextContext(4);r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(1,4,"toggleCollapse")),r.ɵɵattribute("aria-expanded",!t.isCollapsed(e.node))("aria-controls",e.node.name+"_children"),r.ɵɵadvance(3),r.ɵɵproperty("ngClass",r.ɵɵpureFunction2(6,l,t.isCollapsed(e.node),!t.isCollapsed(e.node)))}}function d(e,t){1&e&&r.ɵɵelement(0,"i",20)}function p(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"button",21),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);const t=r.ɵɵnextContext().$implicit;return r.ɵɵnextContext(4).editFolder(t.node)})),r.ɵɵpipe(1,"i18n"),r.ɵɵtext(2,"\n "),r.ɵɵelement(3,"i",22),r.ɵɵtext(4,"\n "),r.ɵɵelementEnd()}2&e&&r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(1,1,"editFolder"))}function u(e,t){1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵelementContainerEnd())}const m=function(e){return{$implicit:e}};function h(e,t){if(1&e&&(r.ɵɵelementStart(0,"ul",23),r.ɵɵtext(1,"\n "),r.ɵɵtemplate(2,u,2,0,"ng-container",10),r.ɵɵtext(3,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext().$implicit;r.ɵɵnextContext(2);const t=r.ɵɵreference(3);r.ɵɵproperty("id",e.node.name+"_children"),r.ɵɵadvance(2),r.ɵɵproperty("ngTemplateOutlet",t)("ngTemplateOutletContext",r.ɵɵpureFunction1(3,m,e.children))}}const v=function(e){return{active:e}};function f(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"li",12),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"span",13),r.ɵɵtext(3,"\n "),r.ɵɵtemplate(4,c,5,9,"button",14),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"button",15),r.ɵɵlistener("click",(function(){const t=r.ɵɵrestoreView(e).$implicit;return r.ɵɵnextContext(4).applyFilter(t.node)})),r.ɵɵtext(7,"\n "),r.ɵɵtemplate(8,d,1,0,"i",16),r.ɵɵtext(9),r.ɵɵelementEnd(),r.ɵɵtext(10,"\n "),r.ɵɵtemplate(11,p,5,3,"button",17),r.ɵɵtext(12,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(13,"\n "),r.ɵɵtemplate(14,h,4,5,"ul",18),r.ɵɵtext(15,"\n "),r.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=r.ɵɵnextContext(4);r.ɵɵproperty("ngClass",r.ɵɵpureFunction1(6,v,e.node.id===n.activeFilter.selectedFolderId&&n.activeFilter.selectedFolder)),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",e.children.length),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",0===e.children.length),r.ɵɵadvance(1),r.ɵɵtextInterpolate1(" ",e.node.name,"\n "),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.node.id),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",e.children.length&&!n.isCollapsed(e.node))}}function g(e,t){if(1&e&&(r.ɵɵtext(0,"\n "),r.ɵɵtemplate(1,f,16,8,"li",11),r.ɵɵtext(2,"\n ")),2&e){const e=t.$implicit;r.ɵɵadvance(1),r.ɵɵproperty("ngForOf",e)}}function y(e,t){1&e&&r.ɵɵelementContainer(0)}function x(e,t){if(1&e&&(r.ɵɵelementStart(0,"ul",8),r.ɵɵtext(1,"\n "),r.ɵɵtemplate(2,g,3,1,"ng-template",null,9,r.ɵɵtemplateRefExtractor),r.ɵɵtext(4,"\n "),r.ɵɵtemplate(5,y,1,0,"ng-container",10),r.ɵɵtext(6,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵreference(3),t=r.ɵɵnextContext(2);r.ɵɵadvance(5),r.ɵɵproperty("ngTemplateOutlet",e)("ngTemplateOutletContext",r.ɵɵpureFunction1(2,m,t.nestedFolders))}}function S(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"button",2),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);const t=r.ɵɵnextContext();return t.toggleCollapse(t.foldersGrouping)})),r.ɵɵpipe(5,"i18n"),r.ɵɵtext(6,"\n "),r.ɵɵelement(7,"i",3),r.ɵɵtext(8,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementStart(10,"h3",4),r.ɵɵtext(11),r.ɵɵpipe(12,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(13,"\n "),r.ɵɵelementStart(14,"button",5),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext().addFolder()})),r.ɵɵpipe(15,"i18n"),r.ɵɵtext(16,"\n "),r.ɵɵelement(17,"i",6),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(20,"\n "),r.ɵɵtemplate(21,x,7,4,"ul",7),r.ɵɵtext(22,"\n"),r.ɵɵelementContainerEnd()}if(2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(4),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(5,6,"toggleCollapse")),r.ɵɵattribute("aria-expanded",!e.isCollapsed(e.foldersGrouping)),r.ɵɵadvance(3),r.ɵɵproperty("ngClass",r.ɵɵpureFunction2(12,l,e.isCollapsed(e.foldersGrouping),!e.isCollapsed(e.foldersGrouping))),r.ɵɵadvance(4),r.ɵɵtextInterpolate1(" ",r.ɵɵpipeBind1(12,8,"folders"),""),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(15,10,"addFolder")),r.ɵɵadvance(7),r.ɵɵproperty("ngIf",!e.isCollapsed(e.foldersGrouping))}}class b extends i.FolderFilterComponent{}t.FolderFilterComponent=b,b.ɵfac=function(){let e;return function(t){return(e||(e=r.ɵɵgetInheritedFactory(b)))(t||b)}}(),b.ɵcmp=r.ɵɵdefineComponent({type:b,selectors:[["app-folder-filter"]],features:[r.ɵɵInheritDefinitionFeature],decls:2,vars:1,consts:[[4,"ngIf"],[1,"filter-heading"],["aria-controls","folder-filters",1,"toggle-button",3,"title","click"],["aria-hidden","true",1,"bwi","bwi-fw",3,"ngClass"],[1,"filter-title"],[1,"text-muted","ml-auto","add-button",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-plus","bwi-fw"],["id","folder-filters","class","filter-options",4,"ngIf"],["id","folder-filters",1,"filter-options"],["recursiveFolders",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","filter-option",3,"ngClass",4,"ngFor","ngForOf"],[1,"filter-option",3,"ngClass"],[1,"filter-buttons"],["class","toggle-button",3,"title","click",4,"ngIf"],[1,"filter-button",3,"click"],["class","bwi bwi-fw bwi-folder","aria-hidden","true",4,"ngIf"],["class","edit-button",3,"appA11yTitle","click",4,"ngIf"],["class","nested-filter-options",3,"id",4,"ngIf"],[1,"toggle-button",3,"title","click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-folder"],[1,"edit-button",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-pencil","bwi-fw"],[1,"nested-filter-options",3,"id"]],template:function(e,t){1&e&&(r.ɵɵtemplate(0,S,23,15,"ng-container",0),r.ɵɵtext(1,"\n")),2&e&&r.ɵɵproperty("ngIf",!t.hide)},directives:[o.NgIf,o.NgClass,a.A11yTitleDirective,o.NgTemplateOutlet,o.NgForOf],pipes:[s.I18nPipe],encapsulation:2})},71735:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.LinkSsoComponent=void 0;n(68012);const r=n(25563),o=(n(91674),n(62694),n(1659),n(56071),n(51554),n(36631),n(84275),n(73828),n(73569),n(27957),n(32621)),a=n(73828),s=n(51554),l=n(91674),c=n(62694),d=n(68012),p=n(1659),u=n(84275),m=n(73569),h=n(56071),v=n(36631),f=n(1142),g=n(99729);class y extends r.SsoComponent{constructor(e,t,n,i,r,o,a,s,l,c,d){super(i,r,t,o,l,e,n,a,c,s,d),this.returnUri="/settings/organizations",this.returnUri="/settings/organizations",this.redirectUri=window.location.origin+"/sso-connector.html",this.clientId="web"}ngAfterContentInit(){return i(this,void 0,void 0,(function*(){this.identifier=this.organization.identifier}))}}t.LinkSsoComponent=y,y.ɵfac=function(e){return new(e||y)(o.ɵɵdirectiveInject(a.PlatformUtilsService),o.ɵɵdirectiveInject(s.I18nService),o.ɵɵdirectiveInject(l.ApiService),o.ɵɵdirectiveInject(c.AuthService),o.ɵɵdirectiveInject(d.Router),o.ɵɵdirectiveInject(d.ActivatedRoute),o.ɵɵdirectiveInject(p.CryptoFunctionService),o.ɵɵdirectiveInject(u.PasswordGenerationService),o.ɵɵdirectiveInject(m.StateService),o.ɵɵdirectiveInject(h.EnvironmentService),o.ɵɵdirectiveInject(v.LogService))},y.ɵcmp=o.ɵɵdefineComponent({type:y,selectors:[["app-link-sso"]],inputs:{organization:"organization"},features:[o.ɵɵInheritDefinitionFeature],decls:6,vars:3,consts:[["href","#","appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-link"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"a",0),o.ɵɵlistener("click",(function(){return t.submit(t.returnUri,!0)})),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",1),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n")),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,1,"linkSso"),"\n"))},directives:[f.StopClickDirective],pipes:[g.I18nPipe],encapsulation:2})},24188:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationFilterComponent=void 0;const i=n(9177),r=n(32621),o=n(57490),a=n(68012),s=n(6373),l=n(44653),c=n(14253),d=n(99729);function p(e,t){1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"ul",4),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"li",5),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"span",6),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"button",7),r.ɵɵtext(9,"\n "),r.ɵɵelement(10,"i",8),r.ɵɵtext(11),r.ɵɵpipe(12,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(13,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(14,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(15,"\n "),r.ɵɵelementStart(16,"li",9),r.ɵɵtext(17,"\n "),r.ɵɵelementStart(18,"span",6),r.ɵɵtext(19,"\n "),r.ɵɵelementStart(20,"a",10),r.ɵɵtext(21,"\n "),r.ɵɵelement(22,"i",11),r.ɵɵtext(23),r.ɵɵpipe(24,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(25,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(26,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(27,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(28,"\n "),r.ɵɵelementContainerEnd()),2&e&&(r.ɵɵadvance(11),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(12,2,"myVault"),"\n "),r.ɵɵadvance(12),r.ɵɵtextInterpolate1("\n  ",r.ɵɵpipeBind1(24,4,"newOrganization"),"\n "))}function u(e,t){if(1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"button",22),r.ɵɵtext(3,"\n "),r.ɵɵelement(4,"i",23),r.ɵɵtext(5,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"bit-menu",24,25),r.ɵɵtext(9,"\n "),r.ɵɵelement(10,"app-organization-options",26),r.ɵɵtext(11,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelementContainerEnd()),2&e){const e=r.ɵɵreference(8),t=r.ɵɵnextContext().$implicit;r.ɵɵadvance(2),r.ɵɵproperty("bitMenuTriggerFor",e),r.ɵɵadvance(8),r.ɵɵproperty("organization",t)}}const m=function(e){return{active:e}};function h(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"li",19),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"span",6),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"button",20),r.ɵɵlistener("click",(function(){const t=r.ɵɵrestoreView(e).$implicit;return r.ɵɵnextContext(4).applyOrganizationFilter(t)})),r.ɵɵtext(5,"\n "),r.ɵɵelement(6,"i",21),r.ɵɵtext(7),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵtemplate(9,u,13,2,"ng-container",0),r.ɵɵtext(10,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n "),r.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=r.ɵɵnextContext(4);r.ɵɵproperty("ngClass",r.ɵɵpureFunction1(3,m,e.id===n.activeFilter.selectedOrganizationId)),r.ɵɵadvance(7),r.ɵɵtextInterpolate1("\n ",e.name,"\n "),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.id===n.activeFilter.selectedOrganizationId)}}function v(e,t){if(1&e&&(r.ɵɵelementStart(0,"ul",17),r.ɵɵtext(1,"\n "),r.ɵɵtemplate(2,h,12,5,"li",18),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"li",9),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"span",6),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"a",10),r.ɵɵtext(9,"\n "),r.ɵɵelement(10,"i",11),r.ɵɵtext(11),r.ɵɵpipe(12,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(13,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(14,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(15,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(3);r.ɵɵadvance(2),r.ɵɵproperty("ngForOf",e.organizations),r.ɵɵadvance(9),r.ɵɵtextInterpolate1("\n  ",r.ɵɵpipeBind1(12,2,"newOrganization"),"\n ")}}const f=function(e,t){return{"bwi-angle-right":e,"bwi-angle-down":t}};function g(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",12),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"button",13),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(2).toggleCollapse()})),r.ɵɵpipe(5,"i18n"),r.ɵɵtext(6,"\n "),r.ɵɵelement(7,"i",14),r.ɵɵtext(8,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementStart(10,"button",15),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(2).clearFilter()})),r.ɵɵtext(11),r.ɵɵpipe(12,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(13,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(14,"\n "),r.ɵɵtemplate(15,v,16,4,"ul",16),r.ɵɵtext(16,"\n "),r.ɵɵelementContainerEnd()}if(2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(4),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(5,6,"toggleCollapse")),r.ɵɵattribute("aria-expanded",!e.isCollapsed),r.ɵɵadvance(3),r.ɵɵproperty("ngClass",r.ɵɵpureFunction2(10,f,e.isCollapsed,!e.isCollapsed)),r.ɵɵadvance(3),r.ɵɵproperty("ngClass",r.ɵɵpureFunction1(13,m,!e.hasActiveFilter)),r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n  ",r.ɵɵpipeBind1(12,8,e.organizationGrouping.name),"\n "),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",!e.isCollapsed)}}function y(e,t){if(1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",12),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"button",27),r.ɵɵtext(5,"\n "),r.ɵɵelement(6,"i",21),r.ɵɵtext(7),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementContainerEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(7),r.ɵɵtextInterpolate1("\n ",e.organizations[0].name,"\n ")}}function x(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"li",19),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"span",6),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"button",20),r.ɵɵlistener("click",(function(){const t=r.ɵɵrestoreView(e).$implicit;return r.ɵɵnextContext(4).applyOrganizationFilter(t)})),r.ɵɵtext(5,"\n "),r.ɵɵelement(6,"i",21),r.ɵɵtext(7),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementContainerStart(9),r.ɵɵtext(10,"\n "),r.ɵɵelementStart(11,"button",22),r.ɵɵtext(12,"\n "),r.ɵɵelement(13,"i",23),r.ɵɵtext(14,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(15,"\n "),r.ɵɵelementStart(16,"bit-menu",24,25),r.ɵɵtext(18,"\n "),r.ɵɵelement(19,"app-organization-options",26),r.ɵɵtext(20,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(21,"\n "),r.ɵɵelementContainerEnd(),r.ɵɵtext(22,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(23,"\n "),r.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=r.ɵɵreference(17),i=r.ɵɵnextContext(4);r.ɵɵproperty("ngClass",r.ɵɵpureFunction1(4,m,e.id===i.activeFilter.selectedOrganizationId)),r.ɵɵadvance(7),r.ɵɵtextInterpolate1("\n ",e.name,"\n "),r.ɵɵadvance(4),r.ɵɵproperty("bitMenuTriggerFor",n),r.ɵɵadvance(8),r.ɵɵproperty("organization",e)}}function S(e,t){1&e&&(r.ɵɵelementStart(0,"li",9),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"span",6),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"a",10),r.ɵɵtext(5,"\n "),r.ɵɵelement(6,"i",11),r.ɵɵtext(7),r.ɵɵpipe(8,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(10,"\n "),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(7),r.ɵɵtextInterpolate1("\n  ",r.ɵɵpipeBind1(8,1,"newOrganization"),"\n "))}function b(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"ul",17),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"li",19),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"span",6),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"button",20),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(3).applyMyVaultFilter()})),r.ɵɵtext(7,"\n "),r.ɵɵelement(8,"i",8),r.ɵɵtext(9),r.ɵɵpipe(10,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(13,"\n "),r.ɵɵtemplate(14,x,24,6,"li",18),r.ɵɵtext(15,"\n "),r.ɵɵtemplate(16,S,11,3,"li",28),r.ɵɵtext(17,"\n "),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext(3);r.ɵɵadvance(2),r.ɵɵproperty("ngClass",r.ɵɵpureFunction1(6,m,e.activeFilter.myVaultOnly)),r.ɵɵadvance(7),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(10,4,"myVault"),"\n "),r.ɵɵadvance(5),r.ɵɵproperty("ngForOf",e.organizations),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",!("singleOrganizationPolicy"===e.displayMode))}}function w(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",12),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"button",13),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(2).toggleCollapse()})),r.ɵɵpipe(5,"i18n"),r.ɵɵtext(6,"\n "),r.ɵɵelement(7,"i",14),r.ɵɵtext(8,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementStart(10,"button",15),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(2).clearFilter()})),r.ɵɵtext(11),r.ɵɵpipe(12,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(13,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(14,"\n "),r.ɵɵtemplate(15,b,18,8,"ul",16),r.ɵɵtext(16,"\n "),r.ɵɵelementContainerEnd()}if(2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(4),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(5,6,"toggleCollapse")),r.ɵɵattribute("aria-expanded",!e.isCollapsed),r.ɵɵadvance(3),r.ɵɵproperty("ngClass",r.ɵɵpureFunction2(10,f,e.isCollapsed,!e.isCollapsed)),r.ɵɵadvance(3),r.ɵɵproperty("ngClass",r.ɵɵpureFunction1(13,m,!e.hasActiveFilter)),r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n  ",r.ɵɵpipeBind1(12,8,e.organizationGrouping.name),"\n "),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",!e.isCollapsed)}}function C(e,t){if(1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵelementContainerStart(2,1),r.ɵɵtext(3,"\n "),r.ɵɵtemplate(4,p,29,6,"ng-container",2),r.ɵɵtext(5,"\n "),r.ɵɵtemplate(6,g,17,15,"ng-container",2),r.ɵɵtext(7,"\n "),r.ɵɵtemplate(8,y,10,1,"ng-container",2),r.ɵɵtext(9,"\n "),r.ɵɵtemplate(10,w,17,15,"ng-container",3),r.ɵɵtext(11,"\n "),r.ɵɵelementContainerEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelement(13,"hr"),r.ɵɵtext(14,"\n"),r.ɵɵelementContainerEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(2),r.ɵɵproperty("ngSwitch",e.displayMode),r.ɵɵadvance(2),r.ɵɵproperty("ngSwitchCase","noOrganizations"),r.ɵɵadvance(2),r.ɵɵproperty("ngSwitchCase","personalOwnershipPolicy"),r.ɵɵadvance(2),r.ɵɵproperty("ngSwitchCase","singleOrganizationAndPersonalOwnershipPolicies")}}class I extends i.OrganizationFilterComponent{constructor(){super(...arguments),this.displayText="allVaults"}}t.OrganizationFilterComponent=I,I.ɵfac=function(){let e;return function(t){return(e||(e=r.ɵɵgetInheritedFactory(I)))(t||I)}}(),I.ɵcmp=r.ɵɵdefineComponent({type:I,selectors:[["app-organization-filter"]],features:[r.ɵɵInheritDefinitionFeature],decls:2,vars:1,consts:[[4,"ngIf"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[1,"filter-options"],[1,"filter-option","active"],[1,"filter-buttons"],[1,"filter-button"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-user"],[1,"filter-option"],["href","#","routerLink","/create-organization",1,"filter-button"],["aria-hidden","true",1,"bwi","bwi-plus","bwi-fw"],[1,"filter-heading"],["aria-controls","organization-filters",1,"toggle-button",3,"title","click"],["aria-hidden","true",1,"bwi","bwi-fw",3,"ngClass"],[1,"filter-button",3,"ngClass","click"],["id","organization-filters","class","filter-options",4,"ngIf"],["id","organization-filters",1,"filter-options"],["class","filter-option",3,"ngClass",4,"ngFor","ngForOf"],[1,"filter-option",3,"ngClass"],[1,"filter-button",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-business"],[1,"org-options","ml-auto",3,"bitMenuTriggerFor"],["aria-hidden","true",1,"bwi","bwi-ellipsis-v"],[1,"filter-organization-options"],["orgMenu",""],[3,"organization"],[1,"filter-button","active"],["class","filter-option",4,"ngIf"]],template:function(e,t){1&e&&(r.ɵɵtemplate(0,C,15,4,"ng-container",0),r.ɵɵtext(1,"\n")),2&e&&r.ɵɵproperty("ngIf",!t.hide)},directives:[o.NgIf,o.NgSwitch,o.NgSwitchCase,o.NgSwitchDefault,a.RouterLinkWithHref,o.NgClass,o.NgForOf,s.MenuTriggerForDirective,l.MenuComponent,c.OrganizationOptionsComponent],pipes:[d.I18nPipe],encapsulation:2})},14253:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationOptionsComponent=void 0;n(91674),n(85714),n(51554),n(36631),n(73828),n(62166),n(9724);const r=n(49906),o=n(82769),a=(n(27957),n(27784)),s=n(32621),l=n(73828),c=n(51554),d=n(91674),p=n(9724),u=n(85714),m=n(62166),h=n(36631),v=n(57490),f=n(71735),g=n(99729);function y(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",2),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",3),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n"),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"loading")))}function x(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"button",8),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);const t=s.ɵɵnextContext(2);return t.toggleResetPasswordEnrollment(t.organization)})),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",9),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd()}2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(4,1,"enrollPasswordReset"),"\n "))}function S(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"button",8),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);const t=s.ɵɵnextContext(2);return t.toggleResetPasswordEnrollment(t.organization)})),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",10),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd()}2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(4,1,"withdrawPasswordReset"),"\n "))}function b(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"button",8),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);const t=s.ɵɵnextContext(3);return t.unlinkSso(t.organization)})),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",13),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd()}2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(4,1,"unlinkSso"),"\n "))}function w(e,t){if(1&e&&(s.ɵɵtext(0,"\n "),s.ɵɵelementStart(1,"app-link-sso",14),s.ɵɵtext(2," "),s.ɵɵelementEnd(),s.ɵɵtext(3,"\n ")),2&e){const e=s.ɵɵnextContext(3);s.ɵɵadvance(1),s.ɵɵproperty("organization",e.organization)}}function C(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,b,5,3,"button",11),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,w,4,1,"ng-template",null,12,s.ɵɵtemplateRefExtractor),s.ɵɵtext(6,"\n "),s.ɵɵelementContainerEnd()),2&e){const e=s.ɵɵreference(5),t=s.ɵɵnextContext(2);s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.organization.ssoBound)("ngIfElse",e)}}function I(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",4),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,x,5,3,"button",5),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,S,5,3,"button",5),s.ɵɵtext(5,"\n "),s.ɵɵtemplate(6,C,7,2,"ng-container",0),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"button",6),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);const t=s.ɵɵnextContext();return t.leave(t.organization)})),s.ɵɵtext(9,"\n "),s.ɵɵelement(10,"i",7),s.ɵɵtext(11),s.ɵɵpipe(12,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n"),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.allowEnrollmentChanges(e.organization)&&!e.organization.resetPasswordEnrolled),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.allowEnrollmentChanges(e.organization)&&e.organization.resetPasswordEnrolled),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.organization.useSso&&e.organization.identifier),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(12,4,"leave"),"\n ")}}class E{constructor(e,t,n,i,r,o,a){this.platformUtilsService=e,this.i18nService=t,this.apiService=n,this.syncService=i,this.cryptoService=r,this.policyService=o,this.logService=a,this.loaded=!1}ngOnInit(){return i(this,void 0,void 0,(function*(){yield this.load()}))}load(){return i(this,void 0,void 0,(function*(){this.policies=yield this.policyService.getAll(r.PolicyType.ResetPassword),this.loaded=!0}))}allowEnrollmentChanges(e){if(e.usePolicies&&e.useResetPassword&&e.hasPublicAndPrivateKeys){const t=this.policies.find((t=>t.organizationId===e.id));if(null!=t&&t.enabled)return!e.resetPasswordEnrolled||!t.data.autoEnrollEnabled}return!1}showEnrolledStatus(e){return e.useResetPassword&&e.resetPasswordEnrolled&&this.policies.some((t=>t.organizationId===e.id&&t.enabled))}unlinkSso(e){return i(this,void 0,void 0,(function*(){if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("unlinkSsoConfirmation"),e.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{this.actionPromise=this.apiService.deleteSsoUser(e.id).then((()=>this.syncService.fullSync(!0))),yield this.actionPromise,this.platformUtilsService.showToast("success",null,"Unlinked SSO"),yield this.load()}catch(t){this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),t.message),this.logService.error(t)}}))}leave(e){return i(this,void 0,void 0,(function*(){if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("leaveOrganizationConfirmation"),e.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{this.actionPromise=this.apiService.postLeaveOrganization(e.id).then((()=>this.syncService.fullSync(!0))),yield this.actionPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("leftOrganization")),yield this.load()}catch(t){this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),t.message),this.logService.error(t)}}))}toggleResetPasswordEnrollment(e){return i(this,void 0,void 0,(function*(){let t=null,n="withdrawPasswordResetSuccess";if(e.resetPasswordEnrolled){const n=new a.OrganizationUserResetPasswordEnrollmentRequest;n.resetPasswordKey=t,this.actionPromise=this.apiService.putOrganizationUserResetPasswordEnrollment(e.id,e.userId,n).then((()=>this.syncService.fullSync(!0)))}else{if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("resetPasswordEnrollmentWarning"),null,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return;this.actionPromise=this.apiService.getOrganizationKeys(e.id).then((r=>i(this,void 0,void 0,(function*(){if(null==r)throw new Error(this.i18nService.t("resetPasswordOrgKeysError"));const i=o.Utils.fromB64ToArray(r.publicKey),s=yield this.cryptoService.getEncKey(),l=yield this.cryptoService.rsaEncrypt(s.key,i.buffer);t=l.encryptedString,n="enrollPasswordResetSuccess";const c=new a.OrganizationUserResetPasswordEnrollmentRequest;return c.resetPasswordKey=t,this.apiService.putOrganizationUserResetPasswordEnrollment(e.id,e.userId,c)})))).then((()=>this.syncService.fullSync(!0)))}try{yield this.actionPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t(n)),yield this.load()}catch(r){this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),r.message),this.logService.error(r)}}))}}t.OrganizationOptionsComponent=E,E.ɵfac=function(e){return new(e||E)(s.ɵɵdirectiveInject(l.PlatformUtilsService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(d.ApiService),s.ɵɵdirectiveInject(p.SyncService),s.ɵɵdirectiveInject(u.CryptoService),s.ɵɵdirectiveInject(m.PolicyService),s.ɵɵdirectiveInject(h.LogService))},E.ɵcmp=s.ɵɵdefineComponent({type:E,selectors:[["app-organization-options"]],inputs:{organization:"organization"},decls:4,vars:2,consts:[[4,"ngIf"],["class","tw-max-w-[300px] tw-min-w-[200px] tw-flex tw-flex-col",4,"ngIf"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted","tw-m-2",3,"title"],[1,"sr-only"],[1,"tw-max-w-[300px]","tw-min-w-[200px]","tw-flex","tw-flex-col"],["class","dropdown-item",3,"click",4,"ngIf"],[1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-sign-out"],[1,"dropdown-item",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-key"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-undo"],["class","dropdown-item",3,"click",4,"ngIf","ngIfElse"],["linkSso",""],["aria-hidden","true",1,"bwi","bwi-fw","bwi-chain-broken"],[3,"organization"]],template:function(e,t){1&e&&(s.ɵɵtemplate(0,y,9,6,"ng-container",0),s.ɵɵtext(1,"\n"),s.ɵɵtemplate(2,I,14,6,"div",1),s.ɵɵtext(3,"\n")),2&e&&(s.ɵɵproperty("ngIf",!t.loaded),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.loaded))},directives:[v.NgIf,f.LinkSsoComponent],pipes:[g.I18nPipe],encapsulation:2})},38371:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatusFilterComponent=void 0;const i=n(80617),r=n(32621),o=n(57490),a=n(99729),s=function(e){return{active:e}};function l(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"li",2),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"span",3),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"button",4),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(2).applyFilter("favorites")})),r.ɵɵtext(5,"\n "),r.ɵɵelement(6,"i",7),r.ɵɵtext(7),r.ɵɵpipe(8,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(10,"\n "),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext(2);r.ɵɵproperty("ngClass",r.ɵɵpureFunction1(4,s,"favorites"===e.activeFilter.status)),r.ɵɵadvance(7),r.ɵɵtextInterpolate1(" ",r.ɵɵpipeBind1(8,2,"favorites"),"\n ")}}function c(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"li",2),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"span",3),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"button",4),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(2).applyFilter("trash")})),r.ɵɵtext(5,"\n "),r.ɵɵelement(6,"i",8),r.ɵɵtext(7),r.ɵɵpipe(8,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(10,"\n "),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext(2);r.ɵɵproperty("ngClass",r.ɵɵpureFunction1(4,s,"trash"===e.activeFilter.status)),r.ɵɵadvance(7),r.ɵɵtextInterpolate1(" ",r.ɵɵpipeBind1(8,2,"trash"),"\n ")}}function d(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"ul",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"li",2),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"span",3),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"button",4),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext().applyFilter("all")})),r.ɵɵtext(9,"\n "),r.ɵɵelement(10,"i",5),r.ɵɵtext(11),r.ɵɵpipe(12,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(13,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(14,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(15,"\n "),r.ɵɵtemplate(16,l,11,6,"li",6),r.ɵɵtext(17,"\n "),r.ɵɵtemplate(18,c,11,6,"li",6),r.ɵɵtext(19,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(20,"\n"),r.ɵɵelementContainerEnd()}if(2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(4),r.ɵɵproperty("ngClass",r.ɵɵpureFunction1(6,s,"all"===e.activeFilter.status)),r.ɵɵadvance(7),r.ɵɵtextInterpolate1(" ",r.ɵɵpipeBind1(12,4,"allItems"),"\n "),r.ɵɵadvance(5),r.ɵɵproperty("ngIf",!e.hideFavorites),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",!e.hideTrash)}}class p extends i.StatusFilterComponent{}t.StatusFilterComponent=p,p.ɵfac=function(){let e;return function(t){return(e||(e=r.ɵɵgetInheritedFactory(p)))(t||p)}}(),p.ɵcmp=r.ɵɵdefineComponent({type:p,selectors:[["app-status-filter"]],features:[r.ɵɵInheritDefinitionFeature],decls:2,vars:1,consts:[[4,"ngIf"],[1,"filter-options"],[1,"filter-option",3,"ngClass"],[1,"filter-buttons"],[1,"filter-button",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-filter"],["class","filter-option",3,"ngClass",4,"ngIf"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-star"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-trash"]],template:function(e,t){1&e&&(r.ɵɵtemplate(0,d,21,8,"ng-container",0),r.ɵɵtext(1,"\n")),2&e&&r.ɵɵproperty("ngIf",t.show)},directives:[o.NgIf,o.NgClass],pipes:[a.I18nPipe],encapsulation:2})},73937:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeFilterComponent=void 0;const i=n(74951),r=n(32621),o=n(57490),a=n(99729),s=function(e){return{active:e}};function l(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"ul",4),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"li",5),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"span",6),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"button",7),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);const t=r.ɵɵnextContext();return t.applyFilter(t.cipherTypeEnum.Login)})),r.ɵɵtext(7,"\n "),r.ɵɵelement(8,"i",8),r.ɵɵtext(9),r.ɵɵpipe(10,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(13,"\n "),r.ɵɵelementStart(14,"li",5),r.ɵɵtext(15,"\n "),r.ɵɵelementStart(16,"span",6),r.ɵɵtext(17,"\n "),r.ɵɵelementStart(18,"button",7),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);const t=r.ɵɵnextContext();return t.applyFilter(t.cipherTypeEnum.Card)})),r.ɵɵtext(19,"\n "),r.ɵɵelement(20,"i",9),r.ɵɵtext(21),r.ɵɵpipe(22,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(23,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(24,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(25,"\n "),r.ɵɵelementStart(26,"li",5),r.ɵɵtext(27,"\n "),r.ɵɵelementStart(28,"span",6),r.ɵɵtext(29,"\n "),r.ɵɵelementStart(30,"button",7),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);const t=r.ɵɵnextContext();return t.applyFilter(t.cipherTypeEnum.Identity)})),r.ɵɵtext(31,"\n "),r.ɵɵelement(32,"i",10),r.ɵɵtext(33),r.ɵɵpipe(34,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(35,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(36,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(37,"\n "),r.ɵɵelementStart(38,"li",5),r.ɵɵtext(39,"\n "),r.ɵɵelementStart(40,"span",6),r.ɵɵtext(41,"\n "),r.ɵɵelementStart(42,"button",7),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);const t=r.ɵɵnextContext();return t.applyFilter(t.cipherTypeEnum.SecureNote)})),r.ɵɵtext(43,"\n "),r.ɵɵelement(44,"i",11),r.ɵɵtext(45),r.ɵɵpipe(46,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(47,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(48,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(49,"\n"),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(2),r.ɵɵproperty("ngClass",r.ɵɵpureFunction1(16,s,e.activeFilter.cipherType===e.cipherTypeEnum.Login)),r.ɵɵadvance(7),r.ɵɵtextInterpolate1(" ",r.ɵɵpipeBind1(10,8,"typeLogin"),"\n "),r.ɵɵadvance(5),r.ɵɵproperty("ngClass",r.ɵɵpureFunction1(18,s,e.activeFilter.cipherType===e.cipherTypeEnum.Card)),r.ɵɵadvance(7),r.ɵɵtextInterpolate1(" ",r.ɵɵpipeBind1(22,10,"typeCard"),"\n "),r.ɵɵadvance(5),r.ɵɵproperty("ngClass",r.ɵɵpureFunction1(20,s,e.activeFilter.cipherType===e.cipherTypeEnum.Identity)),r.ɵɵadvance(7),r.ɵɵtextInterpolate1(" ",r.ɵɵpipeBind1(34,12,"typeIdentity"),"\n "),r.ɵɵadvance(5),r.ɵɵproperty("ngClass",r.ɵɵpureFunction1(22,s,e.activeFilter.cipherType===e.cipherTypeEnum.SecureNote)),r.ɵɵadvance(7),r.ɵɵtextInterpolate1(" ",r.ɵɵpipeBind1(46,14,"typeSecureNote"),"\n ")}}const c=function(e,t){return{"bwi-angle-right":e,"bwi-angle-down":t}};class d extends i.TypeFilterComponent{}t.TypeFilterComponent=d,d.ɵfac=function(){let e;return function(t){return(e||(e=r.ɵɵgetInheritedFactory(d)))(t||d)}}(),d.ɵcmp=r.ɵɵdefineComponent({type:d,selectors:[["app-type-filter"]],features:[r.ɵɵInheritDefinitionFeature],decls:15,vars:12,consts:[[1,"filter-heading"],["aria-controls","type-filters",1,"toggle-button",3,"title","click"],["aria-hidden","true",1,"bwi","bwi-fw",3,"ngClass"],["id","type-filters","class","filter-options",4,"ngIf"],["id","type-filters",1,"filter-options"],[1,"filter-option",3,"ngClass"],[1,"filter-buttons"],[1,"filter-button",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-globe"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-credit-card"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-id-card"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-sticky-note"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"button",1),r.ɵɵlistener("click",(function(){return t.toggleCollapse()})),r.ɵɵpipe(3,"i18n"),r.ɵɵtext(4,"\n "),r.ɵɵelement(5,"i",2),r.ɵɵtext(6,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"h3"),r.ɵɵtext(9),r.ɵɵpipe(10,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n"),r.ɵɵtemplate(13,l,50,24,"ul",3),r.ɵɵtext(14,"\n")),2&e&&(r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(3,5,"toggleCollapse")),r.ɵɵattribute("aria-expanded",!t.isCollapsed),r.ɵɵadvance(3),r.ɵɵproperty("ngClass",r.ɵɵpureFunction2(9,c,t.isCollapsed,!t.isCollapsed)),r.ɵɵadvance(4),r.ɵɵtextInterpolate1(" ",r.ɵɵpipeBind1(10,7,"types"),""),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",!t.isCollapsed))},directives:[o.NgClass,o.NgIf],pipes:[a.I18nPipe],encapsulation:2})},25398:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationVaultFilterComponent=void 0;const r=n(91843),o=n(32621),a=n(57490),s=n(8863),l=n(96832),c=n(45728),d=n(24188),p=n(38371),u=n(73937),m=n(94642),h=n(43310),v=n(99729);function f(e,t){1&e&&(o.ɵɵelementStart(0,"div",3),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",4),o.ɵɵtext(3,"\n "),o.ɵɵelementEnd())}function g(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",5),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementStart(5,"a",6),o.ɵɵpipe(6,"i18n"),o.ɵɵtext(7,"\n "),o.ɵɵelement(8,"i",7),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"div",8),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"input",9),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().searchText=t}))("input",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext().searchTextChanged()})),o.ɵɵpipe(15,"i18n"),o.ɵɵpipe(16,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"app-organization-filter",10),o.ɵɵlistener("onNodeCollapseStateChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().toggleFilterNodeCollapseState(t)}))("onFilterChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().applyFilter(t)})),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelementStart(20,"div",11),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"app-status-filter",12),o.ɵɵlistener("onFilterChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().applyFilter(t)})),o.ɵɵelementEnd(),o.ɵɵtext(23,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵelementStart(25,"div",11),o.ɵɵtext(26,"\n "),o.ɵɵelementStart(27,"app-type-filter",13),o.ɵɵlistener("onNodeCollapseStateChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().toggleFilterNodeCollapseState(t)}))("onFilterChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().applyFilter(t)})),o.ɵɵelementEnd(),o.ɵɵtext(28,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n "),o.ɵɵelementStart(30,"div",11),o.ɵɵtext(31,"\n "),o.ɵɵelementStart(32,"app-folder-filter",14),o.ɵɵlistener("onNodeCollapseStateChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().toggleFilterNodeCollapseState(t)}))("onFilterChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().applyFilter(t)}))("onAddFolder",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext().addFolder()}))("onEditFolder",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().editFolder(t)})),o.ɵɵelementEnd(),o.ɵɵtext(33,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(34,"\n "),o.ɵɵelementStart(35,"div",11),o.ɵɵtext(36,"\n "),o.ɵɵelementStart(37,"app-collection-filter",15),o.ɵɵlistener("onNodeCollapseStateChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().toggleFilterNodeCollapseState(t)}))("onFilterChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().applyFilter(t)})),o.ɵɵelementEnd(),o.ɵɵtext(38,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(39,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(40,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,23,"filters"),"\n "),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(6,25,"learnMore")),o.ɵɵadvance(9),o.ɵɵpropertyInterpolate("placeholder",o.ɵɵpipeBind1(15,27,e.searchPlaceholder)||o.ɵɵpipeBind1(16,29,"searchVault")),o.ɵɵproperty("ngModel",e.searchText),o.ɵɵadvance(4),o.ɵɵproperty("hide",e.hideOrganizations)("activeFilter",e.activeFilter)("collapsedFilterNodes",e.collapsedFilterNodes)("organizations",e.organizations)("activePersonalOwnershipPolicy",e.activePersonalOwnershipPolicy)("activeSingleOrganizationPolicy",e.activeSingleOrganizationPolicy),o.ɵɵadvance(4),o.ɵɵproperty("hideFavorites",e.hideFavorites)("hideTrash",e.hideTrash)("activeFilter",e.activeFilter),o.ɵɵadvance(5),o.ɵɵproperty("activeFilter",e.activeFilter)("collapsedFilterNodes",e.collapsedFilterNodes),o.ɵɵadvance(5),o.ɵɵproperty("hide",e.hideFolders)("activeFilter",e.activeFilter)("collapsedFilterNodes",e.collapsedFilterNodes)("folderNodes",e.folders),o.ɵɵadvance(5),o.ɵɵproperty("hide",e.hideCollections)("activeFilter",e.activeFilter)("collapsedFilterNodes",e.collapsedFilterNodes)("collectionNodes",e.collections)}}class y extends r.VaultFilterComponent{constructor(){super(...arguments),this.hideOrganizations=!0,this.hideFavorites=!0,this.hideFolders=!0}initCollections(){return i(this,void 0,void 0,(function*(){return this.organization.canEditAnyCollection?yield this.vaultFilterService.buildAdminCollections(this.organization.id):yield this.vaultFilterService.buildCollections(this.organization.id)}))}reloadCollectionsAndFolders(){return i(this,void 0,void 0,(function*(){this.collections=yield this.initCollections()}))}}t.OrganizationVaultFilterComponent=y,y.ɵfac=function(){let e;return function(t){return(e||(e=o.ɵɵgetInheritedFactory(y)))(t||y)}}(),y.ɵcmp=o.ɵɵdefineComponent({type:y,selectors:[["app-organization-vault-filter"]],features:[o.ɵɵInheritDefinitionFeature],decls:7,vars:2,consts:[[1,"card","vault-filters"],["class","container loading-spinner",4,"ngIf"],[4,"ngIf"],[1,"container","loading-spinner"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-3x"],[1,"card-header","d-flex"],["href","https://bitwarden.com/help/searching-vault/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],[1,"card-body"],["type","search","id","search","autocomplete","off","appAutofocus","",1,"form-control",3,"placeholder","ngModel","ngModelChange","input"],[3,"hide","activeFilter","collapsedFilterNodes","organizations","activePersonalOwnershipPolicy","activeSingleOrganizationPolicy","onNodeCollapseStateChange","onFilterChange"],[1,"filter"],[3,"hideFavorites","hideTrash","activeFilter","onFilterChange"],[3,"activeFilter","collapsedFilterNodes","onNodeCollapseStateChange","onFilterChange"],[3,"hide","activeFilter","collapsedFilterNodes","folderNodes","onNodeCollapseStateChange","onFilterChange","onAddFolder","onEditFolder"],[3,"hide","activeFilter","collapsedFilterNodes","collectionNodes","onNodeCollapseStateChange","onFilterChange"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,f,4,0,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,g,41,31,"div",2),o.ɵɵtext(5,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n")),2&e&&(o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!t.isLoaded),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.isLoaded))},directives:[a.NgIf,s.A11yTitleDirective,l.DefaultValueAccessor,c.AutofocusDirective,l.NgControlStatus,l.NgModel,d.OrganizationFilterComponent,p.StatusFilterComponent,u.TypeFilterComponent,m.FolderFilterComponent,h.CollectionFilterComponent],pipes:[v.I18nPipe],encapsulation:2})},91843:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.VaultFilterComponent=void 0;const r=n(32621),o=n(48237),a=(n(33275),n(32621)),s=n(33275),l=n(57490),c=n(8863),d=n(96832),p=n(45728),u=n(24188),m=n(38371),h=n(73937),v=n(94642),f=n(43310),g=n(99729);function y(e,t){1&e&&(a.ɵɵelementStart(0,"div",3),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",4),a.ɵɵtext(3,"\n "),a.ɵɵelementEnd())}function x(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"div"),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",5),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementStart(5,"a",6),a.ɵɵpipe(6,"i18n"),a.ɵɵtext(7,"\n "),a.ɵɵelement(8,"i",7),a.ɵɵtext(9,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(10,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(11,"\n "),a.ɵɵelementStart(12,"div",8),a.ɵɵtext(13,"\n "),a.ɵɵelementStart(14,"input",9),a.ɵɵlistener("ngModelChange",(function(t){a.ɵɵrestoreView(e);return a.ɵɵnextContext().searchText=t}))("input",(function(){a.ɵɵrestoreView(e);return a.ɵɵnextContext().searchTextChanged()})),a.ɵɵpipe(15,"i18n"),a.ɵɵpipe(16,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n "),a.ɵɵelementStart(18,"app-organization-filter",10),a.ɵɵlistener("onNodeCollapseStateChange",(function(t){a.ɵɵrestoreView(e);return a.ɵɵnextContext().toggleFilterNodeCollapseState(t)}))("onFilterChange",(function(t){a.ɵɵrestoreView(e);return a.ɵɵnextContext().applyFilter(t)})),a.ɵɵelementEnd(),a.ɵɵtext(19,"\n "),a.ɵɵelementStart(20,"div",11),a.ɵɵtext(21,"\n "),a.ɵɵelementStart(22,"app-status-filter",12),a.ɵɵlistener("onFilterChange",(function(t){a.ɵɵrestoreView(e);return a.ɵɵnextContext().applyFilter(t)})),a.ɵɵelementEnd(),a.ɵɵtext(23,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(24,"\n "),a.ɵɵelementStart(25,"div",11),a.ɵɵtext(26,"\n "),a.ɵɵelementStart(27,"app-type-filter",13),a.ɵɵlistener("onNodeCollapseStateChange",(function(t){a.ɵɵrestoreView(e);return a.ɵɵnextContext().toggleFilterNodeCollapseState(t)}))("onFilterChange",(function(t){a.ɵɵrestoreView(e);return a.ɵɵnextContext().applyFilter(t)})),a.ɵɵelementEnd(),a.ɵɵtext(28,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(29,"\n "),a.ɵɵelementStart(30,"div",11),a.ɵɵtext(31,"\n "),a.ɵɵelementStart(32,"app-folder-filter",14),a.ɵɵlistener("onNodeCollapseStateChange",(function(t){a.ɵɵrestoreView(e);return a.ɵɵnextContext().toggleFilterNodeCollapseState(t)}))("onFilterChange",(function(t){a.ɵɵrestoreView(e);return a.ɵɵnextContext().applyFilter(t)}))("onAddFolder",(function(){a.ɵɵrestoreView(e);return a.ɵɵnextContext().addFolder()}))("onEditFolder",(function(t){a.ɵɵrestoreView(e);return a.ɵɵnextContext().editFolder(t)})),a.ɵɵelementEnd(),a.ɵɵtext(33,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(34,"\n "),a.ɵɵelementStart(35,"div",11),a.ɵɵtext(36,"\n "),a.ɵɵelementStart(37,"app-collection-filter",15),a.ɵɵlistener("onNodeCollapseStateChange",(function(t){a.ɵɵrestoreView(e);return a.ɵɵnextContext().toggleFilterNodeCollapseState(t)}))("onFilterChange",(function(t){a.ɵɵrestoreView(e);return a.ɵɵnextContext().applyFilter(t)})),a.ɵɵelementEnd(),a.ɵɵtext(38,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(39,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(40,"\n "),a.ɵɵelementEnd()}if(2&e){const e=a.ɵɵnextContext();a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,23,"filters"),"\n "),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(6,25,"learnMore")),a.ɵɵadvance(9),a.ɵɵpropertyInterpolate("placeholder",a.ɵɵpipeBind1(15,27,e.searchPlaceholder)||a.ɵɵpipeBind1(16,29,"searchVault")),a.ɵɵproperty("ngModel",e.searchText),a.ɵɵadvance(4),a.ɵɵproperty("hide",e.hideOrganizations)("activeFilter",e.activeFilter)("collapsedFilterNodes",e.collapsedFilterNodes)("organizations",e.organizations)("activePersonalOwnershipPolicy",e.activePersonalOwnershipPolicy)("activeSingleOrganizationPolicy",e.activeSingleOrganizationPolicy),a.ɵɵadvance(4),a.ɵɵproperty("hideFavorites",e.hideFavorites)("hideTrash",e.hideTrash)("activeFilter",e.activeFilter),a.ɵɵadvance(5),a.ɵɵproperty("activeFilter",e.activeFilter)("collapsedFilterNodes",e.collapsedFilterNodes),a.ɵɵadvance(5),a.ɵɵproperty("hide",e.hideFolders)("activeFilter",e.activeFilter)("collapsedFilterNodes",e.collapsedFilterNodes)("folderNodes",e.folders),a.ɵɵadvance(5),a.ɵɵproperty("hide",e.hideCollections)("activeFilter",e.activeFilter)("collapsedFilterNodes",e.collapsedFilterNodes)("collectionNodes",e.collections)}}class S extends o.VaultFilterComponent{constructor(e){super(e),this.vaultFilterService=e,this.onSearchTextChanged=new r.EventEmitter,this.searchText=""}searchTextChanged(){this.onSearchTextChanged.emit(this.searchText)}reloadOrganizations(){return i(this,void 0,void 0,(function*(){this.organizations=yield this.vaultFilterService.buildOrganizations(),this.activePersonalOwnershipPolicy=yield this.vaultFilterService.checkForPersonalOwnershipPolicy(),this.activeSingleOrganizationPolicy=yield this.vaultFilterService.checkForSingleOrganizationPolicy()}))}}t.VaultFilterComponent=S,S.ɵfac=function(e){return new(e||S)(a.ɵɵdirectiveInject(s.VaultFilterService))},S.ɵcmp=a.ɵɵdefineComponent({type:S,selectors:[["app-vault-filter"]],outputs:{onSearchTextChanged:"onSearchTextChanged"},features:[a.ɵɵInheritDefinitionFeature],decls:7,vars:2,consts:[[1,"card","vault-filters"],["class","container loading-spinner",4,"ngIf"],[4,"ngIf"],[1,"container","loading-spinner"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-3x"],[1,"card-header","d-flex"],["href","https://bitwarden.com/help/searching-vault/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],[1,"card-body"],["type","search","id","search","autocomplete","off","appAutofocus","",1,"form-control",3,"placeholder","ngModel","ngModelChange","input"],[3,"hide","activeFilter","collapsedFilterNodes","organizations","activePersonalOwnershipPolicy","activeSingleOrganizationPolicy","onNodeCollapseStateChange","onFilterChange"],[1,"filter"],[3,"hideFavorites","hideTrash","activeFilter","onFilterChange"],[3,"activeFilter","collapsedFilterNodes","onNodeCollapseStateChange","onFilterChange"],[3,"hide","activeFilter","collapsedFilterNodes","folderNodes","onNodeCollapseStateChange","onFilterChange","onAddFolder","onEditFolder"],[3,"hide","activeFilter","collapsedFilterNodes","collectionNodes","onNodeCollapseStateChange","onFilterChange"]],template:function(e,t){1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵtemplate(2,y,4,0,"div",1),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,x,41,31,"div",2),a.ɵɵtext(5,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n")),2&e&&(a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!t.isLoaded),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.isLoaded))},directives:[l.NgIf,c.A11yTitleDirective,d.DefaultValueAccessor,p.AutofocusDirective,d.NgControlStatus,d.NgModel,u.OrganizationFilterComponent,m.StatusFilterComponent,h.TypeFilterComponent,v.FolderFilterComponent,f.CollectionFilterComponent],pipes:[g.I18nPipe],encapsulation:2})},38595:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VaultFilterModule=void 0;const i=n(84696),r=n(33275),o=n(32621);class a{}t.VaultFilterModule=a,a.ɵfac=function(e){return new(e||a)},a.ɵmod=o.ɵɵdefineNgModule({type:a}),a.ɵinj=o.ɵɵdefineInjector({providers:[r.VaultFilterService],imports:[[i.SharedModule]]})},33275:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.VaultFilterService=void 0;const r=n(93370),o=n(27113),a=(n(91674),n(45330),n(3174),n(88308),n(63513),n(62166),n(73569),n(34917)),s=n(65642),l=n(32621),c=n(73569),d=n(63513),p=n(88308),u=n(45330),m=n(3174),h=n(62166),v=n(91674);class f extends o.VaultFilterService{constructor(e,t,n,i,r,o,a){super(e,t,n,i,r,o),this.apiService=a}buildAdminCollections(e){return i(this,void 0,void 0,(function*(){let t=[];const n=yield this.apiService.getCollections(e);if(null!=(null==n?void 0:n.data)&&n.data.length){const e=n.data.map((e=>new s.Collection(new a.CollectionData(e))));t=yield this.collectionService.decryptMany(e)}const i=yield this.collectionService.getAllNested(t);return new r.DynamicTreeNode({fullList:t,nestedList:i})}))}}t.VaultFilterService=f,f.ɵfac=function(e){return new(e||f)(l.ɵɵinject(c.StateService),l.ɵɵinject(d.OrganizationService),l.ɵɵinject(p.FolderService),l.ɵɵinject(u.CipherService),l.ɵɵinject(m.CollectionService),l.ɵɵinject(h.PolicyService),l.ɵɵinject(v.ApiService))},f.ɵprov=l.ɵɵdefineInjectable({token:f,factory:f.ɵfac})},97417:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IndividualVaultRoutingModule=void 0;const i=n(68012),r=n(2525),o=n(32621),a=(n(68012),[{path:"",component:r.IndividualVaultComponent,data:{titleId:"vaults"}}]);class s{}t.IndividualVaultRoutingModule=s,s.ɵfac=function(e){return new(e||s)},s.ɵmod=o.ɵɵdefineNgModule({type:s}),s.ɵinj=o.ɵɵdefineInjector({imports:[[i.RouterModule.forChild(a)],i.RouterModule]})},2525:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.IndividualVaultComponent=void 0;const r=n(32621),o=(n(68012),n(14857)),a=n(94735),s=(n(64684),n(8470),n(45330),n(85714),n(51554),n(45552),n(63513),n(44809),n(73828),n(73569),n(9724),n(30694),n(97144)),l=n(95414),c=n(41141),d=n(94652),p=n(91434),u=n(86305),m=n(27672),h=n(55715),v=(n(91843),n(81617),n(32621)),f=n(9724),g=n(68012),y=n(51554),x=n(64684),S=n(30694),b=n(85714),w=n(45552),C=n(73828),I=n(8470),E=n(73569),P=n(63513),O=n(81617),k=n(45330),A=n(44809),T=n(91843),M=n(57490),B=n(56820),D=n(23582),R=n(91434),F=n(51626),U=n(80945),V=n(99729),N=["vaultFilter"],_=["attachments"],j=["folderAddEdit"],z=["cipherAddEdit"],H=["share"],L=["collections"],K=["updateKeyTemplate"];function q(e,t){1&e&&(v.ɵɵelementContainerStart(0),v.ɵɵtext(1,"\n "),v.ɵɵelement(2,"i",27),v.ɵɵpipe(3,"i18n"),v.ɵɵtext(4,"\n "),v.ɵɵelementStart(5,"span",28),v.ɵɵtext(6),v.ɵɵpipe(7,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(8,"\n "),v.ɵɵelementContainerEnd()),2&e&&(v.ɵɵadvance(2),v.ɵɵpropertyInterpolate("title",v.ɵɵpipeBind1(3,2,"loading")),v.ɵɵadvance(4),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(7,4,"loading")))}function G(e,t){if(1&e){const e=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"button",29),v.ɵɵlistener("click",(function(){v.ɵɵrestoreView(e);return v.ɵɵnextContext().addCipher()})),v.ɵɵtext(1,"\n "),v.ɵɵelement(2,"i",30),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd()}2&e&&(v.ɵɵadvance(3),v.ɵɵtextInterpolate1("",v.ɵɵpipeBind1(4,1,"addItem"),"\n "))}function W(e,t){if(1&e&&(v.ɵɵelementStart(0,"app-callout",31),v.ɵɵtext(1),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext();v.ɵɵadvance(1),v.ɵɵtextInterpolate1("\n ",e.trashCleanupWarning,"\n ")}}function $(e,t){if(1&e){const e=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"div",32),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"div",33),v.ɵɵtext(3,"\n "),v.ɵɵelement(4,"i",34),v.ɵɵtext(5),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(7,"\n "),v.ɵɵelementStart(8,"div",35),v.ɵɵtext(9,"\n "),v.ɵɵelementStart(10,"p"),v.ɵɵtext(11),v.ɵɵpipe(12,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(13,"\n "),v.ɵɵelementStart(14,"button",36),v.ɵɵlistener("click",(function(){v.ɵɵrestoreView(e);return v.ɵɵnextContext().updateKey()})),v.ɵɵtext(15),v.ɵɵpipe(16,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(17,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(18,"\n "),v.ɵɵelementEnd()}2&e&&(v.ɵɵadvance(5),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(6,3,"updateKeyTitle"),"\n "),v.ɵɵadvance(6),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(12,5,"updateEncryptionKeyShortDesc")),v.ɵɵadvance(4),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(16,7,"updateEncryptionKey"),"\n "))}function Y(e,t){1&e&&v.ɵɵelement(0,"app-verify-email",37)}function Q(e,t){1&e&&(v.ɵɵelementStart(0,"div",32),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"div",33),v.ɵɵtext(3,"\n "),v.ɵɵelement(4,"i",34),v.ɵɵtext(5),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(7,"\n "),v.ɵɵelementStart(8,"div",35),v.ɵɵtext(9,"\n "),v.ɵɵelementStart(10,"p"),v.ɵɵtext(11),v.ɵɵpipe(12,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(13,"\n "),v.ɵɵelementStart(14,"a",38),v.ɵɵtext(15),v.ɵɵpipe(16,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(17,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(18,"\n "),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(5),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(6,3,"updateBrowser"),"\n "),v.ɵɵadvance(6),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(12,5,"updateBrowserDesc")),v.ɵɵadvance(4),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(16,7,"updateBrowser"),"\n "))}function J(e,t){1&e&&(v.ɵɵelementStart(0,"div",39),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"div",40),v.ɵɵtext(3,"\n "),v.ɵɵelement(4,"i",41),v.ɵɵtext(5),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(7,"\n "),v.ɵɵelementStart(8,"div",35),v.ɵɵtext(9,"\n "),v.ɵɵelementStart(10,"p"),v.ɵɵtext(11),v.ɵɵpipe(12,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(13,"\n "),v.ɵɵelementStart(14,"a",42),v.ɵɵtext(15),v.ɵɵpipe(16,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(17,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(18,"\n "),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(5),v.ɵɵtextInterpolate1(" ",v.ɵɵpipeBind1(6,3,"goPremium"),"\n "),v.ɵɵadvance(6),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(12,5,"premiumUpgradeUnlockFeatures")),v.ɵɵadvance(4),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(16,7,"goPremium"),"\n "))}function Z(e,t){}function X(e,t){}function ee(e,t){}function te(e,t){}function ne(e,t){}function ie(e,t){}const re=function(e,t){return{"col-6":e,"col-9":t}},oe="VaultComponent";class ae{constructor(e,t,n,i,r,o,s,l,c,d,p,u,m,h,v,f,g){this.syncService=e,this.route=t,this.router=n,this.changeDetectorRef=i,this.i18nService=r,this.modalService=o,this.tokenService=s,this.cryptoService=l,this.messagingService=c,this.platformUtilsService=d,this.broadcasterService=p,this.ngZone=u,this.stateService=m,this.organizationService=h,this.vaultService=v,this.cipherService=f,this.passwordRepromptService=g,this.favorites=!1,this.type=null,this.folderId=null,this.collectionId=null,this.organizationId=null,this.myVaultOnly=!1,this.showVerifyEmail=!1,this.showBrowserOutdated=!1,this.showUpdateKey=!1,this.showPremiumCallout=!1,this.deleted=!1,this.trashCleanupWarning=null,this.activeFilter=new a.VaultFilter}ngOnInit(){return i(this,void 0,void 0,(function*(){this.showVerifyEmail=!(yield this.tokenService.getEmailVerified()),this.showBrowserOutdated=-1!==window.navigator.userAgent.indexOf("MSIE"),this.trashCleanupWarning=this.i18nService.t(this.platformUtilsService.isSelfHost()?"trashCleanupWarningSelfHosted":"trashCleanupWarning"),this.route.queryParams.pipe(o.first()).subscribe((e=>i(this,void 0,void 0,(function*(){yield this.syncService.fullSync(!1);const t=yield this.stateService.getCanAccessPremium();if(this.showPremiumCallout=!this.showVerifyEmail&&!t&&!this.platformUtilsService.isSelfHost(),this.filterComponent.reloadCollectionsAndFolders(this.activeFilter),this.filterComponent.reloadOrganizations(),this.showUpdateKey=!(yield this.cryptoService.hasEncKey()),e.cipherId){const t=new s.CipherView;t.id=e.cipherId,"clone"===e.action?yield this.cloneCipher(t):"edit"===e.action&&(yield this.editCipher(t))}yield this.ciphersComponent.reload(),this.route.queryParams.subscribe((e=>i(this,void 0,void 0,(function*(){e.cipherId&&(null!=(yield this.cipherService.get(e.cipherId))?this.editCipherId(e.cipherId):(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("unknownCipher")),this.router.navigate([],{queryParams:{cipherId:null},queryParamsHandling:"merge"})))})))),this.broadcasterService.subscribe(oe,(e=>{this.ngZone.run((()=>i(this,void 0,void 0,(function*(){if("syncCompleted"===e.command)e.successfully&&(yield Promise.all([this.filterComponent.reloadCollectionsAndFolders(this.activeFilter),this.filterComponent.reloadOrganizations(),this.ciphersComponent.load(this.ciphersComponent.filter)]),this.changeDetectorRef.detectChanges())}))))}))}))))}))}get isShowingCards(){return this.showBrowserOutdated||this.showPremiumCallout||this.showUpdateKey||this.showVerifyEmail}ngOnDestroy(){this.broadcasterService.unsubscribe(oe)}applyVaultFilter(e){return i(this,void 0,void 0,(function*(){this.ciphersComponent.showAddNew="trash"!==e.status,this.activeFilter=e,yield this.ciphersComponent.reload(this.buildFilter(),"trash"===e.status),this.filterComponent.searchPlaceholder=this.vaultService.calculateSearchBarLocalizationString(this.activeFilter),this.go()}))}applyOrganizationFilter(e){return i(this,void 0,void 0,(function*(){null==e?(this.activeFilter.resetOrganization(),this.activeFilter.myVaultOnly=!0):this.activeFilter.selectedOrganizationId=e,yield this.applyVaultFilter(this.activeFilter)}))}filterSearchText(e){this.ciphersComponent.searchText=e,this.ciphersComponent.search(200)}buildFilter(){return e=>{let t=!0;return"favorites"===this.activeFilter.status&&t&&(t=e.favorite),"trash"===this.activeFilter.status&&t&&(t=e.isDeleted),null!=this.activeFilter.cipherType&&t&&(t=e.type===this.activeFilter.cipherType),this.activeFilter.selectedFolder&&"none"!=this.activeFilter.selectedFolderId&&t&&(t=e.folderId===this.activeFilter.selectedFolderId),null!=this.activeFilter.selectedCollectionId&&t&&(t=null!=e.collectionIds&&e.collectionIds.indexOf(this.activeFilter.selectedCollectionId)>-1),null!=this.activeFilter.selectedOrganizationId&&t&&(t=e.organizationId===this.activeFilter.selectedOrganizationId),this.activeFilter.myVaultOnly&&t&&(t=null===e.organizationId),t}}editCipherAttachments(e){return i(this,void 0,void 0,(function*(){const t=yield this.stateService.getCanAccessPremium();if(null==e.organizationId&&!t)return void this.messagingService.send("premiumRequired");if(null!=e.organizationId){const t=yield this.organizationService.get(e.organizationId);if(null!=t&&(null==t.maxStorageGb||0===t.maxStorageGb))return void this.messagingService.send("upgradeOrganization",{organizationId:e.organizationId})}let n=!1;const[r]=yield this.modalService.openViewRef(d.AttachmentsComponent,this.attachmentsModalRef,(t=>{t.cipherId=e.id,t.onUploadedAttachment.subscribe((()=>n=!0)),t.onDeletedAttachment.subscribe((()=>n=!0)),t.onReuploadedAttachment.subscribe((()=>n=!0))}));r.onClosed.subscribe((()=>i(this,void 0,void 0,(function*(){n&&(yield this.ciphersComponent.refresh()),n=!1}))))}))}shareCipher(e){return i(this,void 0,void 0,(function*(){const[t]=yield this.modalService.openViewRef(h.ShareComponent,this.shareModalRef,(n=>{n.cipherId=e.id,n.onSharedCipher.subscribe((()=>i(this,void 0,void 0,(function*(){t.close(),yield this.ciphersComponent.refresh()}))))}))}))}editCipherCollections(e){return i(this,void 0,void 0,(function*(){const[t]=yield this.modalService.openViewRef(u.CollectionsComponent,this.collectionsModalRef,(n=>{n.cipherId=e.id,n.onSavedCollections.subscribe((()=>i(this,void 0,void 0,(function*(){t.close(),yield this.ciphersComponent.refresh()}))))}))}))}addFolder(){return i(this,void 0,void 0,(function*(){const[e]=yield this.modalService.openViewRef(m.FolderAddEditComponent,this.folderAddEditModalRef,(t=>{t.folderId=null,t.onSavedFolder.subscribe((()=>i(this,void 0,void 0,(function*(){e.close(),yield this.filterComponent.reloadCollectionsAndFolders(this.activeFilter)}))))}))}))}editFolder(e){return i(this,void 0,void 0,(function*(){const[t]=yield this.modalService.openViewRef(m.FolderAddEditComponent,this.folderAddEditModalRef,(n=>{n.folderId=e,n.onSavedFolder.subscribe((()=>i(this,void 0,void 0,(function*(){t.close(),yield this.filterComponent.reloadCollectionsAndFolders(this.activeFilter)})))),n.onDeletedFolder.subscribe((()=>i(this,void 0,void 0,(function*(){t.close(),yield this.filterComponent.reloadCollectionsAndFolders(this.activeFilter)}))))}))}))}addCipher(){return i(this,void 0,void 0,(function*(){const e=yield this.editCipher(null);if(e.type=this.type,e.folderId="none"===this.folderId?null:this.folderId,null!=this.activeFilter.selectedCollectionId){const t=this.filterComponent.collections.fullList.filter((e=>e.id===this.activeFilter.selectedCollectionId));t.length>0&&(e.organizationId=t[0].organizationId,e.collectionIds=[this.activeFilter.selectedCollectionId])}this.activeFilter.selectedFolderId&&this.activeFilter.selectedFolder&&(e.folderId=this.activeFilter.selectedFolderId),this.activeFilter.selectedOrganizationId&&(e.organizationId=this.activeFilter.selectedOrganizationId)}))}editCipher(e){return i(this,void 0,void 0,(function*(){return this.editCipherId(null==e?void 0:e.id)}))}editCipherId(e){return i(this,void 0,void 0,(function*(){const t=yield this.cipherService.get(e);if(null!=t&&0!=t.reprompt&&!(yield this.passwordRepromptService.showPasswordPrompt()))return void this.go({cipherId:null});const[n,r]=yield this.modalService.openViewRef(c.AddEditComponent,this.cipherAddEditModalRef,(t=>{t.cipherId=e,t.onSavedCipher.subscribe((()=>i(this,void 0,void 0,(function*(){n.close(),yield this.ciphersComponent.refresh()})))),t.onDeletedCipher.subscribe((()=>i(this,void 0,void 0,(function*(){n.close(),yield this.ciphersComponent.refresh()})))),t.onRestoredCipher.subscribe((()=>i(this,void 0,void 0,(function*(){n.close(),yield this.ciphersComponent.refresh()}))))}));return n.onClosedPromise().then((()=>{this.go({cipherId:null})})),r}))}cloneCipher(e){return i(this,void 0,void 0,(function*(){(yield this.editCipher(e)).cloneMode=!0}))}updateKey(){return i(this,void 0,void 0,(function*(){yield this.modalService.openViewRef(l.UpdateKeyComponent,this.updateKeyModalRef)}))}go(e=null){null==e&&(e={favorites:!!this.favorites||null,type:this.type,folderId:this.folderId,collectionId:this.collectionId,deleted:!!this.deleted||null}),this.router.navigate([],{relativeTo:this.route,queryParams:e,queryParamsHandling:"merge",replaceUrl:!0})}}t.IndividualVaultComponent=ae,ae.ɵfac=function(e){return new(e||ae)(v.ɵɵdirectiveInject(f.SyncService),v.ɵɵdirectiveInject(g.ActivatedRoute),v.ɵɵdirectiveInject(g.Router),v.ɵɵdirectiveInject(v.ChangeDetectorRef),v.ɵɵdirectiveInject(y.I18nService),v.ɵɵdirectiveInject(x.ModalService),v.ɵɵdirectiveInject(S.TokenService),v.ɵɵdirectiveInject(b.CryptoService),v.ɵɵdirectiveInject(w.MessagingService),v.ɵɵdirectiveInject(C.PlatformUtilsService),v.ɵɵdirectiveInject(I.BroadcasterService),v.ɵɵdirectiveInject(v.NgZone),v.ɵɵdirectiveInject(E.StateService),v.ɵɵdirectiveInject(P.OrganizationService),v.ɵɵdirectiveInject(O.VaultService),v.ɵɵdirectiveInject(k.CipherService),v.ɵɵdirectiveInject(A.PasswordRepromptService))},ae.ɵcmp=v.ɵɵdefineComponent({type:ae,selectors:[["app-vault"]],viewQuery:function(e,t){if(1&e&&(v.ɵɵviewQuery(N,7),v.ɵɵviewQuery(p.CiphersComponent,7),v.ɵɵviewQuery(_,7,r.ViewContainerRef),v.ɵɵviewQuery(j,7,r.ViewContainerRef),v.ɵɵviewQuery(z,7,r.ViewContainerRef),v.ɵɵviewQuery(H,7,r.ViewContainerRef),v.ɵɵviewQuery(L,7,r.ViewContainerRef),v.ɵɵviewQuery(K,7,r.ViewContainerRef)),2&e){let e;v.ɵɵqueryRefresh(e=v.ɵɵloadQuery())&&(t.filterComponent=e.first),v.ɵɵqueryRefresh(e=v.ɵɵloadQuery())&&(t.ciphersComponent=e.first),v.ɵɵqueryRefresh(e=v.ɵɵloadQuery())&&(t.attachmentsModalRef=e.first),v.ɵɵqueryRefresh(e=v.ɵɵloadQuery())&&(t.folderAddEditModalRef=e.first),v.ɵɵqueryRefresh(e=v.ɵɵloadQuery())&&(t.cipherAddEditModalRef=e.first),v.ɵɵqueryRefresh(e=v.ɵɵloadQuery())&&(t.shareModalRef=e.first),v.ɵɵqueryRefresh(e=v.ɵɵloadQuery())&&(t.collectionsModalRef=e.first),v.ɵɵqueryRefresh(e=v.ɵɵloadQuery())&&(t.updateKeyModalRef=e.first)}},decls:79,vars:18,consts:[[1,"container","page-content"],[1,"row"],[1,"col-3"],[1,"groupings"],[1,"content"],[1,"inner-content"],[3,"activeFilter","onFilterChange","onAddFolder","onEditFolder","onSearchTextChanged"],["vaultFilter",""],[3,"ngClass"],[1,"page-header","d-flex"],[3,"appApiAction"],["actionSpinner",""],[4,"ngIf"],[1,"ml-auto","d-flex"],[3,"ciphersComponent","deleted"],["type","button","class","btn btn-outline-primary btn-sm",3,"click",4,"ngIf"],["type","warning","icon","bwi-exclamation-triangle",4,"ngIf"],[3,"onCipherClicked","onAttachmentsClicked","onAddCipher","onShareClicked","onCollectionsClicked","onCloneClicked","onOrganzationBadgeClicked"],["class","card border-warning mb-4",4,"ngIf"],["class","d-block mb-4",4,"ngIf"],["class","card border-success mb-4",4,"ngIf"],["attachments",""],["folderAddEdit",""],["cipherAddEdit",""],["share",""],["collections",""],["updateKeyTemplate",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["type","button",1,"btn","btn-outline-primary","btn-sm",3,"click"],["aria-hidden","true",1,"bwi","bwi-plus","bwi-fw"],["type","warning","icon","bwi-exclamation-triangle"],[1,"card","border-warning","mb-4"],[1,"card-header","bg-warning","text-white"],["aria-hidden","true",1,"bwi","bwi-exclamation-triangle","bwi-fw"],[1,"card-body"],["type","button",1,"btn","btn-block","btn-outline-secondary",3,"click"],[1,"d-block","mb-4"],["target","_blank","href","https://browser-update.org/update-browser.html","rel","noopener",1,"btn","btn-block","btn-outline-secondary"],[1,"card","border-success","mb-4"],[1,"card-header","bg-success","text-white"],["aria-hidden","true",1,"bwi","bwi-star-f","bwi-fw"],["routerLink","/settings/subscription/premium",1,"btn","btn-block","btn-outline-secondary"]],template:function(e,t){if(1&e&&(v.ɵɵelementStart(0,"div",0),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"div",1),v.ɵɵtext(3,"\n "),v.ɵɵelementStart(4,"div",2),v.ɵɵtext(5,"\n "),v.ɵɵelementStart(6,"div",3),v.ɵɵtext(7,"\n "),v.ɵɵelementStart(8,"div",4),v.ɵɵtext(9,"\n "),v.ɵɵelementStart(10,"div",5),v.ɵɵtext(11,"\n "),v.ɵɵelementStart(12,"app-vault-filter",6,7),v.ɵɵlistener("onFilterChange",(function(e){return t.applyVaultFilter(e)}))("onAddFolder",(function(){return t.addFolder()}))("onEditFolder",(function(e){return t.editFolder(e.id)}))("onSearchTextChanged",(function(e){return t.filterSearchText(e)})),v.ɵɵelementEnd(),v.ɵɵtext(14,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(15,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(16,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(17,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(18,"\n "),v.ɵɵelementStart(19,"div",8),v.ɵɵtext(20,"\n "),v.ɵɵelementStart(21,"div",9),v.ɵɵtext(22,"\n "),v.ɵɵelementStart(23,"h1"),v.ɵɵtext(24),v.ɵɵpipe(25,"i18n"),v.ɵɵelementStart(26,"small",10,11),v.ɵɵtext(28,"\n "),v.ɵɵtemplate(29,q,9,6,"ng-container",12),v.ɵɵtext(30,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(31,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(32,"\n "),v.ɵɵelementStart(33,"div",13),v.ɵɵtext(34,"\n "),v.ɵɵelementStart(35,"app-vault-bulk-actions",14),v.ɵɵtext(36,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(37,"\n "),v.ɵɵtemplate(38,G,5,3,"button",15),v.ɵɵtext(39,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(40,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(41,"\n "),v.ɵɵtemplate(42,W,2,1,"app-callout",16),v.ɵɵtext(43,"\n "),v.ɵɵelementStart(44,"app-vault-ciphers",17),v.ɵɵlistener("onCipherClicked",(function(e){return t.editCipher(e)}))("onAttachmentsClicked",(function(e){return t.editCipherAttachments(e)}))("onAddCipher",(function(){return t.addCipher()}))("onShareClicked",(function(e){return t.shareCipher(e)}))("onCollectionsClicked",(function(e){return t.editCipherCollections(e)}))("onCloneClicked",(function(e){return t.cloneCipher(e)}))("onOrganzationBadgeClicked",(function(e){return t.applyOrganizationFilter(e)})),v.ɵɵtext(45,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(46,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(47,"\n "),v.ɵɵelementStart(48,"div",2),v.ɵɵtext(49,"\n "),v.ɵɵtemplate(50,$,19,9,"div",18),v.ɵɵtext(51,"\n "),v.ɵɵtemplate(52,Y,1,0,"app-verify-email",19),v.ɵɵtext(53,"\n "),v.ɵɵtemplate(54,Q,19,9,"div",18),v.ɵɵtext(55,"\n "),v.ɵɵtemplate(56,J,19,9,"div",20),v.ɵɵtext(57,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(58,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(59,"\n"),v.ɵɵelementEnd(),v.ɵɵtext(60,"\n"),v.ɵɵtemplate(61,Z,0,0,"ng-template",null,21,v.ɵɵtemplateRefExtractor),v.ɵɵtext(63,"\n"),v.ɵɵtemplate(64,X,0,0,"ng-template",null,22,v.ɵɵtemplateRefExtractor),v.ɵɵtext(66,"\n"),v.ɵɵtemplate(67,ee,0,0,"ng-template",null,23,v.ɵɵtemplateRefExtractor),v.ɵɵtext(69,"\n"),v.ɵɵtemplate(70,te,0,0,"ng-template",null,24,v.ɵɵtemplateRefExtractor),v.ɵɵtext(72,"\n"),v.ɵɵtemplate(73,ne,0,0,"ng-template",null,25,v.ɵɵtemplateRefExtractor),v.ɵɵtext(75,"\n"),v.ɵɵtemplate(76,ie,0,0,"ng-template",null,26,v.ɵɵtemplateRefExtractor),v.ɵɵtext(78,"\n")),2&e){const e=v.ɵɵreference(27);v.ɵɵadvance(12),v.ɵɵproperty("activeFilter",t.activeFilter),v.ɵɵadvance(7),v.ɵɵproperty("ngClass",v.ɵɵpureFunction2(15,re,t.isShowingCards,!t.isShowingCards)),v.ɵɵadvance(5),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(25,13,"vaultItems"),"\n "),v.ɵɵadvance(2),v.ɵɵproperty("appApiAction",t.ciphersComponent.actionPromise),v.ɵɵadvance(3),v.ɵɵproperty("ngIf",e.loading),v.ɵɵadvance(6),v.ɵɵproperty("ciphersComponent",t.ciphersComponent)("deleted","trash"===t.activeFilter.status),v.ɵɵadvance(3),v.ɵɵproperty("ngIf","trash"!==t.activeFilter.status),v.ɵɵadvance(4),v.ɵɵproperty("ngIf","trash"===t.activeFilter.status),v.ɵɵadvance(8),v.ɵɵproperty("ngIf",t.showUpdateKey),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",t.showVerifyEmail),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",t.showBrowserOutdated),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",t.showPremiumCallout)}},directives:[T.VaultFilterComponent,M.NgClass,B.ApiActionDirective,M.NgIf,D.BulkActionsComponent,R.CiphersComponent,F.CalloutComponent,U.VerifyEmailComponent,g.RouterLinkWithHref],pipes:[V.I18nPipe],encapsulation:2})},85006:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IndividualVaultModule=void 0;const i=n(77844),r=n(97417),o=n(32621);class a{}t.IndividualVaultModule=a,a.ɵfac=function(e){return new(e||a)},a.ɵmod=o.ɵɵdefineNgModule({type:a}),a.ɵinj=o.ɵɵdefineInjector({imports:[[i.VaultModule,r.IndividualVaultRoutingModule]]})},98528:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationBadgeModule=void 0;const i=n(84696),r=n(32621);class o{}t.OrganizationBadgeModule=o,o.ɵfac=function(e){return new(e||o)},o.ɵmod=r.ɵɵdefineNgModule({type:o}),o.ɵinj=r.ɵɵdefineInjector({imports:[[i.SharedModule]]})},99237:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationNameBadgeComponent=void 0;const i=n(32621),r=(n(51554),n(32621)),o=n(51554),a=n(25108),s=n(8863),l=n(91131);class c{constructor(e){this.i18nService=e,this.onOrganizationClicked=new i.EventEmitter}ngOnInit(){null!=this.organizationName&&""!==this.organizationName||(this.organizationName=this.i18nService.t("me"),this.color=this.stringToColor(this.profileName.toUpperCase())),null==this.color&&(this.color=this.stringToColor(this.organizationName.toUpperCase())),this.textColor=this.pickTextColorBasedOnBgColor()}stringToColor(e){let t=0;for(let i=0;i>8*i&255).toString(16)).substr(-2)}return n}pickTextColorBasedOnBgColor(){const e="#"===this.color.charAt(0)?this.color.substring(1,7):this.color;return.299*parseInt(e.substring(0,2),16)+.587*parseInt(e.substring(2,4),16)+.114*parseInt(e.substring(4,6),16)>186?"black !important":"white !important"}emitOnOrganizationClicked(){this.onOrganizationClicked.emit()}}t.OrganizationNameBadgeComponent=c,c.ɵfac=function(e){return new(e||c)(r.ɵɵdirectiveInject(o.I18nService))},c.ɵcmp=r.ɵɵdefineComponent({type:c,selectors:[["app-org-badge"]],inputs:{organizationName:"organizationName",profileName:"profileName"},outputs:{onOrganizationClicked:"onOrganizationClicked"},decls:4,vars:9,consts:[["bit-badge","",3,"appA11yTitle","click"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"button",0),r.ɵɵlistener("click",(function(){return t.emitOnOrganizationClicked()})),r.ɵɵtext(1),r.ɵɵpipe(2,"ellipsis"),r.ɵɵelementEnd(),r.ɵɵtext(3,"\n")),2&e&&(r.ɵɵstyleProp("color",t.textColor)("background-color",t.color),r.ɵɵpropertyInterpolate("appA11yTitle",t.organizationName),r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind2(2,6,t.organizationName,13),"\n"))},directives:[a.BadgeComponent,s.A11yTitleDirective],pipes:[l.EllipsisPipe],encapsulation:2})},1690:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationVaultRoutingModule=void 0;const i=n(68012),r=n(71808),o=n(32621),a=(n(68012),[{path:"",component:r.OrganizationVaultComponent,data:{titleId:"vaults"}}]);class s{}t.OrganizationVaultRoutingModule=s,s.ɵfac=function(e){return new(e||s)},s.ɵmod=o.ɵɵdefineNgModule({type:s}),s.ɵinj=o.ɵɵdefineInjector({imports:[[i.RouterModule.forChild(a)],i.RouterModule]})},71808:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationVaultComponent=void 0;const r=n(32621),o=(n(68012),n(14857)),a=n(94735),s=(n(64684),n(8470),n(45330),n(51554),n(45552),n(63513),n(44809),n(73828),n(9724),n(87876)),l=n(93880),c=n(31597),d=n(7203),p=n(60962),u=(n(25398),n(81617),n(32621)),m=n(68012),h=n(63513),v=n(9724),f=n(51554),g=n(64684),y=n(45552),x=n(8470),S=n(73828),b=n(81617),w=n(45330),C=n(44809),I=n(25398),E=n(56820),P=n(57490),O=n(23582),k=n(7203),A=n(51626),T=n(99729),M=["vaultFilter"],B=["attachments"],D=["cipherAddEdit"],R=["collections"],F=["eventsTemplate"];function U(e,t){1&e&&(u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",22),u.ɵɵpipe(3,"i18n"),u.ɵɵtext(4,"\n "),u.ɵɵelementStart(5,"span",23),u.ɵɵtext(6),u.ɵɵpipe(7,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(8,"\n "),u.ɵɵelementContainerEnd()),2&e&&(u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(3,2,"loading")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(7,4,"loading")))}function V(e,t){if(1&e){const e=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"button",24),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(e);return u.ɵɵnextContext().addCipher()})),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",25),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd()}2&e&&(u.ɵɵadvance(3),u.ɵɵtextInterpolate1("",u.ɵɵpipeBind1(4,1,"addItem"),"\n "))}function N(e,t){if(1&e&&(u.ɵɵelementStart(0,"app-callout",26),u.ɵɵtext(1),u.ɵɵelementEnd()),2&e){const e=u.ɵɵnextContext();u.ɵɵadvance(1),u.ɵɵtextInterpolate1("\n ",e.trashCleanupWarning,"\n ")}}function _(e,t){}function j(e,t){}function z(e,t){}function H(e,t){}const L="OrgVaultComponent";class K{constructor(e,t,n,i,r,o,s,l,c,d,p,u,m,h){this.route=e,this.organizationService=t,this.router=n,this.changeDetectorRef=i,this.syncService=r,this.i18nService=o,this.modalService=s,this.messagingService=l,this.broadcasterService=c,this.ngZone=d,this.platformUtilsService=p,this.vaultService=u,this.cipherService=m,this.passwordRepromptService=h,this.collectionId=null,this.type=null,this.deleted=!1,this.trashCleanupWarning=null,this.activeFilter=new a.VaultFilter,this.firstLoaded=!0}ngOnInit(){this.trashCleanupWarning=this.i18nService.t(this.platformUtilsService.isSelfHost()?"trashCleanupWarningSelfHosted":"trashCleanupWarning"),this.route.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.organization=yield this.organizationService.get(e.organizationId),this.vaultFilterComponent.organization=this.organization,this.ciphersComponent.organization=this.organization,this.route.queryParams.pipe(o.first()).subscribe((e=>i(this,void 0,void 0,(function*(){if(this.ciphersComponent.searchText=this.vaultFilterComponent.searchText=e.search,this.organization.canViewAllCollections||(yield this.syncService.fullSync(!1),this.broadcasterService.subscribe(L,(e=>{this.ngZone.run((()=>i(this,void 0,void 0,(function*(){if("syncCompleted"===e.command)e.successfully&&(yield Promise.all([this.vaultFilterComponent.reloadCollectionsAndFolders(),this.ciphersComponent.refresh()]),this.changeDetectorRef.detectChanges())}))))}))),this.firstLoaded||(yield this.vaultFilterComponent.reloadCollectionsAndFolders()),this.firstLoaded=!1,yield this.ciphersComponent.reload(),null!=e.viewEvents){const t=this.ciphersComponent.ciphers.filter((t=>t.id===e.viewEvents));t.length>0&&this.viewEvents(t[0])}this.route.queryParams.subscribe((e=>i(this,void 0,void 0,(function*(){e.cipherId&&(this.organization.canEditAnyCollection||null!=(yield this.cipherService.get(e.cipherId))?this.editCipherId(e.cipherId):(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("unknownCipher")),this.router.navigate([],{queryParams:{cipherId:null},queryParamsHandling:"merge"})))}))))}))))}))))}ngOnDestroy(){this.broadcasterService.unsubscribe(L)}applyVaultFilter(e){return i(this,void 0,void 0,(function*(){this.ciphersComponent.showAddNew="trash"!==e.status,this.activeFilter=e,yield this.ciphersComponent.reload(this.buildFilter(),"trash"===e.status),this.vaultFilterComponent.searchPlaceholder=this.vaultService.calculateSearchBarLocalizationString(this.activeFilter),this.go()}))}buildFilter(){return e=>{let t=!0;return"favorites"===this.activeFilter.status&&t&&(t=e.favorite),"trash"===this.activeFilter.status&&t&&(t=e.isDeleted),null!=this.activeFilter.cipherType&&t&&(t=e.type===this.activeFilter.cipherType),null!=this.activeFilter.selectedFolder&&"none"!=this.activeFilter.selectedFolderId&&t&&(t=e.folderId===this.activeFilter.selectedFolderId),null!=this.activeFilter.selectedCollectionId&&t&&(t=null!=e.collectionIds&&e.collectionIds.indexOf(this.activeFilter.selectedCollectionId)>-1),null!=this.activeFilter.selectedOrganizationId&&t&&(t=e.organizationId===this.activeFilter.selectedOrganizationId),this.activeFilter.myVaultOnly&&t&&(t=null===e.organizationId),t}}filterSearchText(e){this.ciphersComponent.searchText=e,this.ciphersComponent.search(200)}editCipherAttachments(e){return i(this,void 0,void 0,(function*(){if(null==this.organization.maxStorageGb||0===this.organization.maxStorageGb)return void this.messagingService.send("upgradeOrganization",{organizationId:e.organizationId});let t=!1;const[n]=yield this.modalService.openViewRef(c.AttachmentsComponent,this.attachmentsModalRef,(n=>{n.organization=this.organization,n.cipherId=e.id,n.onUploadedAttachment.subscribe((()=>t=!0)),n.onDeletedAttachment.subscribe((()=>t=!0))}));n.onClosed.subscribe((()=>i(this,void 0,void 0,(function*(){t&&(yield this.ciphersComponent.refresh()),t=!1}))))}))}editCipherCollections(e){return i(this,void 0,void 0,(function*(){const[t]=yield this.modalService.openViewRef(p.CollectionsComponent,this.collectionsModalRef,(n=>{this.organization.canEditAnyCollection&&(n.collectionIds=e.collectionIds,n.collections=this.vaultFilterComponent.collections.fullList.filter((e=>!e.readOnly))),n.organization=this.organization,n.cipherId=e.id,n.onSavedCollections.subscribe((()=>i(this,void 0,void 0,(function*(){t.close(),yield this.ciphersComponent.refresh()}))))}))}))}addCipher(){return i(this,void 0,void 0,(function*(){const e=yield this.editCipher(null);e.organizationId=this.organization.id,e.type=this.type,this.organization.canEditAnyCollection&&(e.collections=this.vaultFilterComponent.collections.fullList.filter((e=>!e.readOnly))),null!=this.collectionId&&(e.collectionIds=[this.collectionId])}))}editCipher(e){return i(this,void 0,void 0,(function*(){return this.editCipherId(null==e?void 0:e.id)}))}editCipherId(e){return i(this,void 0,void 0,(function*(){const t=yield this.cipherService.get(e);if(null!=t&&0!=t.reprompt&&!(yield this.passwordRepromptService.showPasswordPrompt()))return void this.go({cipherId:null});const[n,r]=yield this.modalService.openViewRef(l.AddEditComponent,this.cipherAddEditModalRef,(t=>{t.organization=this.organization,t.cipherId=e,t.onSavedCipher.subscribe((()=>i(this,void 0,void 0,(function*(){n.close(),yield this.ciphersComponent.refresh()})))),t.onDeletedCipher.subscribe((()=>i(this,void 0,void 0,(function*(){n.close(),yield this.ciphersComponent.refresh()})))),t.onRestoredCipher.subscribe((()=>i(this,void 0,void 0,(function*(){n.close(),yield this.ciphersComponent.refresh()}))))}));return n.onClosedPromise().then((()=>{this.go({cipherId:null})})),r}))}cloneCipher(e){return i(this,void 0,void 0,(function*(){const t=yield this.editCipher(e);t.cloneMode=!0,t.organizationId=this.organization.id,this.organization.canEditAnyCollection&&(t.collections=this.vaultFilterComponent.collections.fullList.filter((e=>!e.readOnly))),t.collectionIds=e.collectionIds}))}viewEvents(e){return i(this,void 0,void 0,(function*(){yield this.modalService.openViewRef(s.EntityEventsComponent,this.eventsModalRef,(t=>{t.name=e.name,t.organizationId=this.organization.id,t.entityId=e.id,t.showUser=!0,t.entity="cipher"}))}))}clearFilters(){this.collectionId=null,this.type=null,this.deleted=!1}go(e=null){null==e&&(e={type:this.type,collectionId:this.collectionId,deleted:!!this.deleted||null}),this.router.navigate([],{relativeTo:this.route,queryParams:e,queryParamsHandling:"merge",replaceUrl:!0})}}t.OrganizationVaultComponent=K,K.ɵfac=function(e){return new(e||K)(u.ɵɵdirectiveInject(m.ActivatedRoute),u.ɵɵdirectiveInject(h.OrganizationService),u.ɵɵdirectiveInject(m.Router),u.ɵɵdirectiveInject(u.ChangeDetectorRef),u.ɵɵdirectiveInject(v.SyncService),u.ɵɵdirectiveInject(f.I18nService),u.ɵɵdirectiveInject(g.ModalService),u.ɵɵdirectiveInject(y.MessagingService),u.ɵɵdirectiveInject(x.BroadcasterService),u.ɵɵdirectiveInject(u.NgZone),u.ɵɵdirectiveInject(S.PlatformUtilsService),u.ɵɵdirectiveInject(b.VaultService),u.ɵɵdirectiveInject(w.CipherService),u.ɵɵdirectiveInject(C.PasswordRepromptService))},K.ɵcmp=u.ɵɵdefineComponent({type:K,selectors:[["app-org-vault"]],viewQuery:function(e,t){if(1&e&&(u.ɵɵviewQuery(M,7),u.ɵɵviewQuery(d.CiphersComponent,7),u.ɵɵviewQuery(B,7,r.ViewContainerRef),u.ɵɵviewQuery(D,7,r.ViewContainerRef),u.ɵɵviewQuery(R,7,r.ViewContainerRef),u.ɵɵviewQuery(F,7,r.ViewContainerRef)),2&e){let e;u.ɵɵqueryRefresh(e=u.ɵɵloadQuery())&&(t.vaultFilterComponent=e.first),u.ɵɵqueryRefresh(e=u.ɵɵloadQuery())&&(t.ciphersComponent=e.first),u.ɵɵqueryRefresh(e=u.ɵɵloadQuery())&&(t.attachmentsModalRef=e.first),u.ɵɵqueryRefresh(e=u.ɵɵloadQuery())&&(t.cipherAddEditModalRef=e.first),u.ɵɵqueryRefresh(e=u.ɵɵloadQuery())&&(t.collectionsModalRef=e.first),u.ɵɵqueryRefresh(e=u.ɵɵloadQuery())&&(t.eventsModalRef=e.first)}},decls:62,vars:11,consts:[[1,"container","page-content"],[1,"row"],[1,"col-3"],[1,"groupings"],[1,"content"],[1,"inner-content"],[3,"activeFilter","onFilterChange","onSearchTextChanged"],["vaultFilter",""],[1,"col-9"],[1,"page-header","d-flex"],[3,"appApiAction"],["actionSpinner",""],[4,"ngIf"],[1,"ml-auto","d-flex"],[3,"ciphersComponent","deleted","organization"],["type","button","class","btn btn-outline-primary btn-sm ml-auto",3,"click",4,"ngIf"],["type","warning","icon","bwi bwi-exclamation-triangle",4,"ngIf"],[3,"onCipherClicked","onAttachmentsClicked","onAddCipher","onCollectionsClicked","onEventsClicked","onCloneClicked"],["attachments",""],["cipherAddEdit",""],["collections",""],["eventsTemplate",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["type","button",1,"btn","btn-outline-primary","btn-sm","ml-auto",3,"click"],["aria-hidden","true",1,"bwi","bwi-plus","bwi-fw"],["type","warning","icon","bwi bwi-exclamation-triangle"]],template:function(e,t){if(1&e&&(u.ɵɵelementStart(0,"div",0),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"div",1),u.ɵɵtext(3,"\n "),u.ɵɵelementStart(4,"div",2),u.ɵɵtext(5,"\n "),u.ɵɵelementStart(6,"div",3),u.ɵɵtext(7,"\n "),u.ɵɵelementStart(8,"div",4),u.ɵɵtext(9,"\n "),u.ɵɵelementStart(10,"div",5),u.ɵɵtext(11,"\n "),u.ɵɵelementStart(12,"app-organization-vault-filter",6,7),u.ɵɵlistener("onFilterChange",(function(e){return t.applyVaultFilter(e)}))("onSearchTextChanged",(function(e){return t.filterSearchText(e)})),u.ɵɵelementEnd(),u.ɵɵtext(14,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(15,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(16,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(17,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(18,"\n "),u.ɵɵelementStart(19,"div",8),u.ɵɵtext(20,"\n "),u.ɵɵelementStart(21,"div",9),u.ɵɵtext(22,"\n "),u.ɵɵelementStart(23,"h1"),u.ɵɵtext(24),u.ɵɵpipe(25,"i18n"),u.ɵɵelementStart(26,"small",10,11),u.ɵɵtext(28,"\n "),u.ɵɵtemplate(29,U,9,6,"ng-container",12),u.ɵɵtext(30,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(31,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(32,"\n "),u.ɵɵelementStart(33,"div",13),u.ɵɵtext(34,"\n "),u.ɵɵelementStart(35,"app-vault-bulk-actions",14),u.ɵɵtext(36,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(37,"\n "),u.ɵɵtemplate(38,V,5,3,"button",15),u.ɵɵtext(39,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(40,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(41,"\n "),u.ɵɵtemplate(42,N,2,1,"app-callout",16),u.ɵɵtext(43,"\n "),u.ɵɵelementStart(44,"app-org-vault-ciphers",17),u.ɵɵlistener("onCipherClicked",(function(e){return t.editCipher(e)}))("onAttachmentsClicked",(function(e){return t.editCipherAttachments(e)}))("onAddCipher",(function(){return t.addCipher()}))("onCollectionsClicked",(function(e){return t.editCipherCollections(e)}))("onEventsClicked",(function(e){return t.viewEvents(e)}))("onCloneClicked",(function(e){return t.cloneCipher(e)})),u.ɵɵtext(45,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(46,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(47,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(48,"\n"),u.ɵɵelementEnd(),u.ɵɵtext(49,"\n"),u.ɵɵtemplate(50,_,0,0,"ng-template",null,18,u.ɵɵtemplateRefExtractor),u.ɵɵtext(52,"\n"),u.ɵɵtemplate(53,j,0,0,"ng-template",null,19,u.ɵɵtemplateRefExtractor),u.ɵɵtext(55,"\n"),u.ɵɵtemplate(56,z,0,0,"ng-template",null,20,u.ɵɵtemplateRefExtractor),u.ɵɵtext(58,"\n"),u.ɵɵtemplate(59,H,0,0,"ng-template",null,21,u.ɵɵtemplateRefExtractor),u.ɵɵtext(61,"\n")),2&e){const e=u.ɵɵreference(27);u.ɵɵadvance(12),u.ɵɵproperty("activeFilter",t.activeFilter),u.ɵɵadvance(12),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(25,9,"vaultItems"),"\n "),u.ɵɵadvance(2),u.ɵɵproperty("appApiAction",t.ciphersComponent.actionPromise),u.ɵɵadvance(3),u.ɵɵproperty("ngIf",e.loading),u.ɵɵadvance(6),u.ɵɵproperty("ciphersComponent",t.ciphersComponent)("deleted",t.deleted)("organization",t.organization),u.ɵɵadvance(3),u.ɵɵproperty("ngIf",!t.deleted),u.ɵɵadvance(4),u.ɵɵproperty("ngIf",t.deleted)}},directives:[I.OrganizationVaultFilterComponent,E.ApiActionDirective,P.NgIf,O.BulkActionsComponent,k.CiphersComponent,A.CalloutComponent],pipes:[T.I18nPipe],encapsulation:2})},32459:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationVaultModule=void 0;const i=n(77844),r=n(1690),o=n(32621);class a{}t.OrganizationVaultModule=a,a.ɵfac=function(e){return new(e||a)},a.ɵmod=o.ɵɵdefineNgModule({type:a}),a.ɵinj=o.ɵɵdefineInjector({imports:[[i.VaultModule,r.OrganizationVaultRoutingModule]]})},77844:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VaultModule=void 0;const i=n(30322),r=n(84696),o=n(38595),a=n(81617),s=n(32621);class l{}t.VaultModule=l,l.ɵfac=function(e){return new(e||l)},l.ɵmod=s.ɵɵdefineNgModule({type:l}),l.ɵinj=s.ɵɵdefineInjector({providers:[{provide:a.VaultService,useClass:a.VaultService}],imports:[[r.SharedModule,o.VaultFilterModule,i.LooseComponentsModule],r.SharedModule,o.VaultFilterModule,i.LooseComponentsModule]})},81617:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VaultService=void 0;t.VaultService=class{calculateSearchBarLocalizationString(e){return"favorites"===e.status?"searchFavorites":"trash"===e.status?"searchTrash":null!=e.cipherType?"searchType":null!=e.selectedFolderId&&"none"!=e.selectedFolderId?"searchFolder":null!=e.selectedCollectionId?"searchCollection":null!=e.selectedOrganizationId?"searchOrganization":e.myVaultOnly?"searchMyVault":"searchVault"}}},70734:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.PermissionsGuard=void 0;n(68012),n(51554),n(63513),n(73828),n(9724);const r=n(32621),o=n(68012),a=n(63513),s=n(73828),l=n(51554),c=n(9724);class d{constructor(e,t,n,i,r){this.router=e,this.organizationService=t,this.platformUtilsService=n,this.i18nService=i,this.syncService=r}canActivate(e,t){return i(this,void 0,void 0,(function*(){null==(yield this.syncService.getLastSync())&&(yield this.syncService.fullSync(!1));const n=yield this.organizationService.get(e.params.organizationId);if(null==n)return this.router.createUrlTree(["/"]);if(!n.isOwner&&!n.enabled)return this.platformUtilsService.showToast("error",null,this.i18nService.t("organizationIsDisabled")),this.router.createUrlTree(["/"]);const i=null==e.data?[]:e.data.permissions;return!(null!=i&&!n.hasAnyPermission(i))||(t.root.queryParamMap.has("cipherId")?this.router.createUrlTree(["/vault"],{queryParams:{cipherId:t.root.queryParamMap.get("cipherId")}}):(this.platformUtilsService.showToast("error",null,this.i18nService.t("accessDenied")),this.router.createUrlTree(["/"])))}))}}t.PermissionsGuard=d,d.ɵfac=function(e){return new(e||d)(r.ɵɵinject(o.Router),r.ɵɵinject(a.OrganizationService),r.ɵɵinject(s.PlatformUtilsService),r.ɵɵinject(l.I18nService),r.ɵɵinject(c.SyncService))},d.ɵprov=r.ɵɵdefineInjectable({token:d,factory:d.ɵfac})},45231:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationLayoutComponent=void 0;n(32621),n(68012),n(8470),n(63513);const r=n(13637),o=n(32621),a=n(68012),s=n(63513),l=n(8470),c=n(53280),d=n(57490),p=n(59964),u=n(13045),m=n(99729);function h(e,t){if(1&e&&(o.ɵɵelementStart(0,"li",6),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"a",10),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"i",11),o.ɵɵtext(5),o.ɵɵpipe(6,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(2),o.ɵɵproperty("routerLink",e.manageRoute),o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(6,2,"manage"),"\n ")}}function v(e,t){if(1&e&&(o.ɵɵelementStart(0,"li",6),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"a",10),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"i",12),o.ɵɵtext(5),o.ɵɵpipe(6,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(2),o.ɵɵproperty("routerLink",e.toolsRoute),o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(6,2,"tools"),"\n ")}}function f(e,t){1&e&&(o.ɵɵelementStart(0,"li",6),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"a",13),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"i",14),o.ɵɵtext(5),o.ɵɵpipe(6,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(5),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(6,1,"settings"),"\n "))}function g(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",1),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",2),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"div",3),o.ɵɵtext(5,"\n "),o.ɵɵelement(6,"app-organization-switcher",4),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"ul",5),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"li",6),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"a",7),o.ɵɵtext(13,"\n "),o.ɵɵelement(14,"i",8),o.ɵɵtext(15),o.ɵɵpipe(16,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵtemplate(19,h,8,4,"li",9),o.ɵɵtext(20,"\n "),o.ɵɵtemplate(21,v,8,4,"li",9),o.ɵɵtext(22,"\n "),o.ɵɵtemplate(23,f,8,3,"li",9),o.ɵɵtext(24,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n"),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(6),o.ɵɵproperty("activeOrganization",e.organization),o.ɵɵadvance(9),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(16,5,"vault"),"\n "),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",e.showManageTab),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.showToolsTab),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.showSettingsTab)}}const y="OrganizationLayoutComponent";class x{constructor(e,t,n,i){this.route=e,this.organizationService=t,this.broadcasterService=n,this.ngZone=i}ngOnInit(){document.body.classList.remove("layout_frontend"),this.route.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.organizationId=e.organizationId,yield this.load()})))),this.broadcasterService.subscribe(y,(e=>{this.ngZone.run((()=>i(this,void 0,void 0,(function*(){if("updatedOrgLicense"===e.command)yield this.load()}))))}))}ngOnDestroy(){this.broadcasterService.unsubscribe(y)}load(){return i(this,void 0,void 0,(function*(){this.organization=yield this.organizationService.get(this.organizationId)}))}get showManageTab(){return r.NavigationPermissionsService.canAccessManage(this.organization)}get showToolsTab(){return r.NavigationPermissionsService.canAccessTools(this.organization)}get showSettingsTab(){return r.NavigationPermissionsService.canAccessSettings(this.organization)}get toolsRoute(){return this.organization.canAccessImportExport?"tools/import":"tools/exposed-passwords-report"}get manageRoute(){let e;switch(!0){case this.organization.canManageUsers:e="manage/people";break;case this.organization.canViewAssignedCollections||this.organization.canViewAllCollections:e="manage/collections";break;case this.organization.canManageGroups:e="manage/groups";break;case this.organization.canManagePolicies:e="manage/policies";break;case this.organization.canAccessEventLogs:e="manage/events"}return e}}t.OrganizationLayoutComponent=x,x.ɵfac=function(e){return new(e||x)(o.ɵɵdirectiveInject(a.ActivatedRoute),o.ɵɵdirectiveInject(s.OrganizationService),o.ɵɵdirectiveInject(l.BroadcasterService),o.ɵɵdirectiveInject(o.NgZone))},x.ɵcmp=o.ɵɵdefineComponent({type:x,selectors:[["app-organization-layout"]],decls:8,vars:1,consts:[["class","org-nav",4,"ngIf"],[1,"org-nav"],[1,"container","d-flex"],[1,"d-flex","flex-column"],[1,"my-auto","pl-1",3,"activeOrganization"],[1,"nav","nav-tabs"],[1,"nav-item"],["routerLink","vault","routerLinkActive","active",1,"nav-link"],["aria-hidden","true",1,"bwi","bwi-lock"],["class","nav-item",4,"ngIf"],["routerLinkActive","active",1,"nav-link",3,"routerLink"],["aria-hidden","true",1,"bwi","bwi-sliders"],["aria-hidden","true",1,"bwi","bwi-wrench"],["routerLink","settings","routerLinkActive","active",1,"nav-link"],["aria-hidden","true",1,"bwi","bwi-cogs"]],template:function(e,t){1&e&&(o.ɵɵelement(0,"app-navbar"),o.ɵɵtext(1,"\n"),o.ɵɵtemplate(2,g,28,7,"div",0),o.ɵɵtext(3,"\n"),o.ɵɵelement(4,"router-outlet"),o.ɵɵtext(5,"\n"),o.ɵɵelement(6,"app-footer"),o.ɵɵtext(7,"\n")),2&e&&(o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.organization))},directives:[c.NavbarComponent,d.NgIf,a.RouterOutlet,p.FooterComponent,u.OrganizationSwitcherComponent,a.RouterLinkWithHref,a.RouterLinkActive],pipes:[m.I18nPipe],encapsulation:2})},61692:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BulkConfirmComponent=void 0;n(91674),n(85714),n(51554);const r=n(7368),o=n(82769),a=n(23405),s=n(91247),l=n(32621),c=n(85714),d=n(91674),p=n(51554),u=n(8863),m=n(57490),h=n(51626),v=n(15370),f=n(99729),g=n(52080);function y(e,t){1&e&&(l.ɵɵelementStart(0,"div",15),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",16),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4),l.ɵɵpipe(5,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,2,"loading")),l.ɵɵadvance(2),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(5,4,"loading"),"\n "))}function x(e,t){1&e&&(l.ɵɵelementStart(0,"app-callout",17),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(2,1,"noSelectedUsersApplicable"),"\n "))}function S(e,t){if(1&e&&(l.ɵɵelementStart(0,"app-callout",18),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext();l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",e.error,"\n ")}}function b(e,t){if(1&e&&(l.ɵɵelementStart(0,"small",26),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext().$implicit;l.ɵɵadvance(1),l.ɵɵtextInterpolate(e.name)}}function w(e,t){if(1&e&&(l.ɵɵelementStart(0,"tr"),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"td",23),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"app-avatar",24),l.ɵɵpipe(5,"userName"),l.ɵɵtext(6,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(7,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"td"),l.ɵɵtext(10),l.ɵɵtemplate(11,b,2,1,"small",25),l.ɵɵtext(12,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(13,"\n "),l.ɵɵelementStart(14,"td"),l.ɵɵtext(15),l.ɵɵelementEnd(),l.ɵɵtext(16,"\n "),l.ɵɵelementEnd()),2&e){const e=t.$implicit,n=l.ɵɵnextContext(2);l.ɵɵadvance(4),l.ɵɵproperty("data",l.ɵɵpipeBind1(5,7,e))("email",e.email)("circle",!0)("fontSize",14),l.ɵɵadvance(6),l.ɵɵtextInterpolate1("\n ",e.email,"\n "),l.ɵɵadvance(1),l.ɵɵproperty("ngIf",e.name),l.ɵɵadvance(4),l.ɵɵtextInterpolate1("\n ",n.fingerprints.get(e.id),"\n ")}}function C(e,t){if(1&e&&(l.ɵɵelementStart(0,"small",26),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext().$implicit;l.ɵɵadvance(1),l.ɵɵtextInterpolate(e.name)}}function I(e,t){if(1&e&&(l.ɵɵelementStart(0,"tr"),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"td",23),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"app-avatar",24),l.ɵɵpipe(5,"userName"),l.ɵɵtext(6,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(7,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"td"),l.ɵɵtext(10),l.ɵɵtemplate(11,C,2,1,"small",25),l.ɵɵtext(12,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(13,"\n "),l.ɵɵelementStart(14,"td"),l.ɵɵtext(15),l.ɵɵpipe(16,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(17,"\n "),l.ɵɵelementEnd()),2&e){const e=t.$implicit;l.ɵɵadvance(4),l.ɵɵproperty("data",l.ɵɵpipeBind1(5,7,e))("email",e.email)("circle",!0)("fontSize",14),l.ɵɵadvance(6),l.ɵɵtextInterpolate1("\n ",e.email,"\n "),l.ɵɵadvance(1),l.ɵɵproperty("ngIf",e.name),l.ɵɵadvance(4),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(16,9,"bulkFilteredMessage"),"\n ")}}function E(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"p"),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementStart(5,"a",19),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(9,"\n "),l.ɵɵelementStart(10,"table",20),l.ɵɵtext(11,"\n "),l.ɵɵelementStart(12,"thead"),l.ɵɵtext(13,"\n "),l.ɵɵelementStart(14,"tr"),l.ɵɵtext(15,"\n "),l.ɵɵelementStart(16,"th",21),l.ɵɵtext(17),l.ɵɵpipe(18,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(19,"\n "),l.ɵɵelementStart(20,"th"),l.ɵɵtext(21),l.ɵɵpipe(22,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(23,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(24,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(25,"\n "),l.ɵɵtemplate(26,w,17,9,"tr",22),l.ɵɵtext(27,"\n "),l.ɵɵtemplate(28,I,18,11,"tr",22),l.ɵɵtext(29,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(30,"\n "),l.ɵɵelementContainerEnd()),2&e){const e=l.ɵɵnextContext();l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(4,6,"fingerprintEnsureIntegrityVerify"),"\n "),l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(7,8,"learnMore"),""),l.ɵɵadvance(11),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(18,10,"user")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(22,12,"fingerprint")),l.ɵɵadvance(5),l.ɵɵproperty("ngForOf",e.filteredUsers),l.ɵɵadvance(2),l.ɵɵproperty("ngForOf",e.excludedUsers)}}function P(e,t){if(1&e&&(l.ɵɵelementStart(0,"small",26),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext().$implicit;l.ɵɵadvance(1),l.ɵɵtextInterpolate(e.name)}}function O(e,t){if(1&e&&(l.ɵɵelementStart(0,"td"),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext().$implicit,t=l.ɵɵnextContext(2);l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",t.statuses.get(e.id),"\n ")}}function k(e,t){1&e&&(l.ɵɵelementStart(0,"td"),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(2,1,"bulkFilteredMessage"),"\n "))}function A(e,t){if(1&e&&(l.ɵɵelementStart(0,"tr"),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"td",23),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"app-avatar",24),l.ɵɵpipe(5,"userName"),l.ɵɵtext(6,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(7,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"td"),l.ɵɵtext(10),l.ɵɵtemplate(11,P,2,1,"small",25),l.ɵɵtext(12,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(13,"\n "),l.ɵɵtemplate(14,O,2,1,"td",11),l.ɵɵtext(15,"\n "),l.ɵɵtemplate(16,k,3,3,"td",11),l.ɵɵtext(17,"\n "),l.ɵɵelementEnd()),2&e){const e=t.$implicit,n=l.ɵɵnextContext(2);l.ɵɵadvance(4),l.ɵɵproperty("data",l.ɵɵpipeBind1(5,8,e))("email",e.email)("circle",!0)("fontSize",14),l.ɵɵadvance(6),l.ɵɵtextInterpolate1("\n ",e.email,"\n "),l.ɵɵadvance(1),l.ɵɵproperty("ngIf",e.name),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",n.statuses.has(e.id)),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!n.statuses.has(e.id))}}function T(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"table",20),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"thead"),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"tr"),l.ɵɵtext(7,"\n "),l.ɵɵelementStart(8,"th",21),l.ɵɵtext(9),l.ɵɵpipe(10,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(11,"\n "),l.ɵɵelementStart(12,"th"),l.ɵɵtext(13),l.ɵɵpipe(14,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(15,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(16,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(17,"\n "),l.ɵɵtemplate(18,A,18,10,"tr",22),l.ɵɵtext(19,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(20,"\n "),l.ɵɵelementContainerEnd()),2&e){const e=l.ɵɵnextContext();l.ɵɵadvance(9),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(10,3,"user")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(14,5,"status")),l.ɵɵadvance(5),l.ɵɵproperty("ngForOf",e.filteredUsers)}}function M(e,t){if(1&e){const e=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"button",27),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(e);return l.ɵɵnextContext().submit()})),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",16),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"span"),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementEnd()}if(2&e){const e=l.ɵɵnextContext();l.ɵɵproperty("disabled",e.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,3,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,5,"confirm"))}}class B{constructor(e,t,n){this.cryptoService=e,this.apiService=t,this.i18nService=n,this.publicKeys=new Map,this.fingerprints=new Map,this.statuses=new Map,this.loading=!0,this.done=!1}ngOnInit(){return i(this,void 0,void 0,(function*(){this.excludedUsers=this.users.filter((e=>!this.isAccepted(e))),this.filteredUsers=this.users.filter((e=>this.isAccepted(e))),this.filteredUsers.length<=0&&(this.done=!0);const e=yield this.getPublicKeys();for(const t of e.data){const e=o.Utils.fromB64ToArray(t.key),n=yield this.cryptoService.getFingerprint(t.userId,e.buffer);null!=n&&(this.publicKeys.set(t.id,e),this.fingerprints.set(t.id,n.join("-")))}this.loading=!1}))}submit(){return i(this,void 0,void 0,(function*(){this.loading=!0;try{const e=yield this.getCryptoKey(),t=[];for(const n of this.filteredUsers){const i=this.publicKeys.get(n.id);if(null==i)continue;const r=yield this.cryptoService.rsaEncrypt(e.key,i.buffer);t.push({id:n.id,key:r.encryptedString})}(yield this.postConfirmRequest(t)).data.forEach((e=>{const t=""!==e.error?e.error:this.i18nService.t("bulkConfirmMessage");this.statuses.set(e.id,t)})),this.done=!0}catch(e){this.error=e.message}this.loading=!1}))}isAccepted(e){return e.status===r.OrganizationUserStatusType.Accepted}getPublicKeys(){return i(this,void 0,void 0,(function*(){const e=new s.OrganizationUserBulkRequest(this.filteredUsers.map((e=>e.id)));return yield this.apiService.postOrganizationUsersPublicKey(this.organizationId,e)}))}getCryptoKey(){return this.cryptoService.getOrgKey(this.organizationId)}postConfirmRequest(e){return i(this,void 0,void 0,(function*(){const t=new a.OrganizationUserBulkConfirmRequest(e);return yield this.apiService.postOrganizationUserBulkConfirm(this.organizationId,t)}))}}t.BulkConfirmComponent=B,B.ɵfac=function(e){return new(e||B)(l.ɵɵdirectiveInject(c.CryptoService),l.ɵɵdirectiveInject(d.ApiService),l.ɵɵdirectiveInject(p.I18nService))},B.ɵcmp=l.ɵɵdefineComponent({type:B,selectors:[["app-bulk-confirm"]],inputs:{organizationId:"organizationId",users:"users"},decls:45,vars:15,consts:[["role","dialog","aria-modal","true","aria-labelledby","bulkTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],[1,"modal-content"],[1,"modal-header"],["id","bulkTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["class","card-body text-center",4,"ngIf"],["type","danger",4,"ngIf"],["type","error",4,"ngIf"],[4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled","click",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"card-body","text-center"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","danger"],["type","error"],["href","https://bitwarden.com/help/fingerprint-phrase/","target","_blank","rel","noopener"],[1,"table","table-hover","table-list"],["colspan","2"],[4,"ngFor","ngForOf"],["width","30"],["size","25",3,"data","email","circle","fontSize"],["class","text-muted d-block",4,"ngIf"],[1,"text-muted","d-block"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled","click"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"div",2),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"div",3),l.ɵɵtext(7,"\n "),l.ɵɵelementStart(8,"h2",4),l.ɵɵtext(9),l.ɵɵpipe(10,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(11,"\n "),l.ɵɵelementStart(12,"button",5),l.ɵɵpipe(13,"i18n"),l.ɵɵtext(14,"\n "),l.ɵɵelementStart(15,"span",6),l.ɵɵtext(16,"×"),l.ɵɵelementEnd(),l.ɵɵtext(17,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(18,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(19,"\n "),l.ɵɵelementStart(20,"div",7),l.ɵɵtext(21,"\n "),l.ɵɵtemplate(22,y,6,6,"div",8),l.ɵɵtext(23,"\n "),l.ɵɵtemplate(24,x,3,3,"app-callout",9),l.ɵɵtext(25,"\n "),l.ɵɵtemplate(26,S,2,1,"app-callout",10),l.ɵɵtext(27,"\n "),l.ɵɵtemplate(28,E,31,14,"ng-container",11),l.ɵɵtext(29,"\n "),l.ɵɵtemplate(30,T,21,7,"ng-container",11),l.ɵɵtext(31,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(32,"\n "),l.ɵɵelementStart(33,"div",12),l.ɵɵtext(34,"\n "),l.ɵɵtemplate(35,M,9,7,"button",13),l.ɵɵtext(36,"\n "),l.ɵɵelementStart(37,"button",14),l.ɵɵtext(38),l.ɵɵpipe(39,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(40,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(41,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(42,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(43,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(44,"\n")),2&e&&(l.ɵɵadvance(9),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(10,9,"confirmUsers"),"\n "),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(13,11,"close")),l.ɵɵadvance(10),l.ɵɵproperty("ngIf",t.loading),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.filteredUsers.length<=0),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.error),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!t.loading&&!t.done),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!t.loading&&t.done),l.ɵɵadvance(5),l.ɵɵproperty("ngIf",!t.done),l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(39,13,"close"),"\n "))},directives:[u.A11yTitleDirective,m.NgIf,h.CalloutComponent,m.NgForOf,v.AvatarComponent],pipes:[f.I18nPipe,g.UserNamePipe],encapsulation:2})},37131:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BulkRemoveComponent=void 0;n(91674),n(51554);const r=n(91247),o=n(32621),a=n(91674),s=n(51554),l=n(8863),c=n(57490),d=n(51626),p=n(15370),u=n(99729),m=n(52080);function h(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",14),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"noSelectedUsersApplicable"),"\n "))}function v(e,t){if(1&e&&(o.ɵɵelementStart(0,"app-callout",15),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",e.error,"\n ")}}function f(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",20),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"removeUsersWarning"),"\n "))}function g(e,t){if(1&e&&(o.ɵɵelementStart(0,"small",24),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext().$implicit;o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}function y(e,t){if(1&e&&(o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td",21),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"app-avatar",22),o.ɵɵpipe(5,"userName"),o.ɵɵtext(6,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"td"),o.ɵɵtext(10),o.ɵɵtemplate(11,g,2,1,"small",23),o.ɵɵtext(12,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵadvance(4),o.ɵɵproperty("data",o.ɵɵpipeBind1(5,6,e))("email",e.email)("circle",!0)("fontSize",14),o.ɵɵadvance(6),o.ɵɵtextInterpolate1("\n ",e.email,"\n "),o.ɵɵadvance(1),o.ɵɵproperty("ngIf",e.name)}}function x(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,f,3,3,"app-callout",16),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"table",17),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"thead"),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"tr"),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"th",18),o.ɵɵtext(11),o.ɵɵpipe(12,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵtemplate(16,y,14,8,"tr",19),o.ɵɵtext(17,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.users.length>0&&!e.error),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(12,3,"user")),o.ɵɵadvance(5),o.ɵɵproperty("ngForOf",e.users)}}function S(e,t){if(1&e&&(o.ɵɵelementStart(0,"small",24),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext().$implicit;o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}function b(e,t){if(1&e&&(o.ɵɵelementStart(0,"td"),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext().$implicit,t=o.ɵɵnextContext(2);o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",t.statuses.get(e.id),"\n ")}}function w(e,t){1&e&&(o.ɵɵelementStart(0,"td"),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"bulkFilteredMessage"),"\n "))}function C(e,t){if(1&e&&(o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td",21),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"app-avatar",22),o.ɵɵpipe(5,"userName"),o.ɵɵtext(6,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"td"),o.ɵɵtext(10),o.ɵɵtemplate(11,S,2,1,"small",23),o.ɵɵtext(12,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵtemplate(14,b,2,1,"td",10),o.ɵɵtext(15,"\n "),o.ɵɵtemplate(16,w,3,3,"td",10),o.ɵɵtext(17,"\n "),o.ɵɵelementEnd()),2&e){const e=t.$implicit,n=o.ɵɵnextContext(2);o.ɵɵadvance(4),o.ɵɵproperty("data",o.ɵɵpipeBind1(5,8,e))("email",e.email)("circle",!0)("fontSize",14),o.ɵɵadvance(6),o.ɵɵtextInterpolate1("\n ",e.email,"\n "),o.ɵɵadvance(1),o.ɵɵproperty("ngIf",e.name),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",n.statuses.has(e.id)),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!n.statuses.has(e.id))}}function I(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"table",17),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"thead"),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"tr"),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"th",18),o.ɵɵtext(9),o.ɵɵpipe(10,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"th"),o.ɵɵtext(13),o.ɵɵpipe(14,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵtemplate(18,C,18,10,"tr",19),o.ɵɵtext(19,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(10,3,"user")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(14,5,"status")),o.ɵɵadvance(5),o.ɵɵproperty("ngForOf",e.users)}}function E(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"button",25),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext().submit()})),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",26),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span"),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext();o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,3,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,5,"removeUsers"))}}class P{constructor(e,t){this.apiService=e,this.i18nService=t,this.statuses=new Map,this.loading=!1,this.done=!1}submit(){return i(this,void 0,void 0,(function*(){this.loading=!0;try{(yield this.deleteUsers()).data.forEach((e=>{const t=""!==e.error?e.error:this.i18nService.t("bulkRemovedMessage");this.statuses.set(e.id,t)})),this.done=!0}catch(e){this.error=e.message}this.loading=!1}))}deleteUsers(){return i(this,void 0,void 0,(function*(){const e=new r.OrganizationUserBulkRequest(this.users.map((e=>e.id)));return yield this.apiService.deleteManyOrganizationUsers(this.organizationId,e)}))}}t.BulkRemoveComponent=P,P.ɵfac=function(e){return new(e||P)(o.ɵɵdirectiveInject(a.ApiService),o.ɵɵdirectiveInject(s.I18nService))},P.ɵcmp=o.ɵɵdefineComponent({type:P,selectors:[["app-bulk-remove"]],inputs:{organizationId:"organizationId",users:"users"},decls:43,vars:14,consts:[["role","dialog","aria-modal","true","aria-labelledby","bulkTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],[1,"modal-content"],[1,"modal-header"],["id","bulkTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["type","danger",4,"ngIf"],["type","error",4,"ngIf"],[4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled","click",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["type","danger"],["type","error"],["type","warning",4,"ngIf"],[1,"table","table-hover","table-list"],["colspan","2"],[4,"ngFor","ngForOf"],["type","warning"],["width","30"],["size","25",3,"data","email","circle","fontSize"],["class","text-muted d-block",4,"ngIf"],[1,"text-muted","d-block"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled","click"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"div",2),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",3),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"h2",4),o.ɵɵtext(9),o.ɵɵpipe(10,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"button",5),o.ɵɵpipe(13,"i18n"),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"span",6),o.ɵɵtext(16,"×"),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelementStart(20,"div",7),o.ɵɵtext(21,"\n "),o.ɵɵtemplate(22,h,3,3,"app-callout",8),o.ɵɵtext(23,"\n "),o.ɵɵtemplate(24,v,2,1,"app-callout",9),o.ɵɵtext(25,"\n "),o.ɵɵtemplate(26,x,19,5,"ng-container",10),o.ɵɵtext(27,"\n "),o.ɵɵtemplate(28,I,21,7,"ng-container",10),o.ɵɵtext(29,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(30,"\n "),o.ɵɵelementStart(31,"div",11),o.ɵɵtext(32,"\n "),o.ɵɵtemplate(33,E,9,7,"button",12),o.ɵɵtext(34,"\n "),o.ɵɵelementStart(35,"button",13),o.ɵɵtext(36),o.ɵɵpipe(37,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(38,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(39,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(40,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(41,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(42,"\n")),2&e&&(o.ɵɵadvance(9),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(10,8,"removeUsers"),"\n "),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(13,10,"close")),o.ɵɵadvance(10),o.ɵɵproperty("ngIf",t.users.length<=0),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.error),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!t.done),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.done),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",!t.done&&t.users.length>0),o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(37,12,"close"),"\n "))},directives:[l.A11yTitleDirective,c.NgIf,d.CalloutComponent,c.NgForOf,p.AvatarComponent],pipes:[u.I18nPipe,m.UserNamePipe],encapsulation:2})},33747:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BulkStatusComponent=void 0;const i=n(32621),r=n(8863),o=n(57490),a=n(15370),s=n(99729),l=n(52080);function c(e,t){1&e&&(i.ɵɵelementStart(0,"div",12),i.ɵɵtext(1,"\n "),i.ɵɵelement(2,"i",13),i.ɵɵpipe(3,"i18n"),i.ɵɵtext(4),i.ɵɵpipe(5,"i18n"),i.ɵɵelementEnd()),2&e&&(i.ɵɵadvance(2),i.ɵɵpropertyInterpolate("title",i.ɵɵpipeBind1(3,2,"loading")),i.ɵɵadvance(2),i.ɵɵtextInterpolate1("\n ",i.ɵɵpipeBind1(5,4,"loading"),"\n "))}function d(e,t){if(1&e&&(i.ɵɵelementStart(0,"small",22),i.ɵɵtext(1),i.ɵɵelementEnd()),2&e){const e=i.ɵɵnextContext().$implicit;i.ɵɵadvance(1),i.ɵɵtextInterpolate(e.user.name)}}function p(e,t){if(1&e&&(i.ɵɵelementStart(0,"td",23),i.ɵɵtext(1),i.ɵɵelementEnd()),2&e){const e=i.ɵɵnextContext().$implicit;i.ɵɵadvance(1),i.ɵɵtextInterpolate1("\n ",e.message,"\n ")}}function u(e,t){if(1&e&&(i.ɵɵelementStart(0,"td"),i.ɵɵtext(1),i.ɵɵelementEnd()),2&e){const e=i.ɵɵnextContext().$implicit;i.ɵɵadvance(1),i.ɵɵtextInterpolate1("\n ",e.message,"\n ")}}function m(e,t){if(1&e&&(i.ɵɵelementStart(0,"tr"),i.ɵɵtext(1,"\n "),i.ɵɵelementStart(2,"td",17),i.ɵɵtext(3,"\n "),i.ɵɵelement(4,"app-avatar",18),i.ɵɵpipe(5,"userName"),i.ɵɵtext(6,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(7,"\n "),i.ɵɵelementStart(8,"td"),i.ɵɵtext(9),i.ɵɵtemplate(10,d,2,1,"small",19),i.ɵɵtext(11,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(12,"\n "),i.ɵɵtemplate(13,p,2,1,"td",20),i.ɵɵtext(14,"\n "),i.ɵɵtemplate(15,u,2,1,"td",21),i.ɵɵtext(16,"\n "),i.ɵɵelementEnd()),2&e){const e=t.$implicit;i.ɵɵadvance(4),i.ɵɵproperty("data",i.ɵɵpipeBind1(5,8,e.user))("email",e.user.email)("circle",!0)("fontSize",14),i.ɵɵadvance(5),i.ɵɵtextInterpolate1("\n ",e.user.email,"\n "),i.ɵɵadvance(1),i.ɵɵproperty("ngIf",e.user.name),i.ɵɵadvance(3),i.ɵɵproperty("ngIf",e.error),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",!e.error)}}function h(e,t){if(1&e&&(i.ɵɵelementStart(0,"table",14),i.ɵɵtext(1,"\n "),i.ɵɵelementStart(2,"thead"),i.ɵɵtext(3,"\n "),i.ɵɵelementStart(4,"tr"),i.ɵɵtext(5,"\n "),i.ɵɵelementStart(6,"th",15),i.ɵɵtext(7),i.ɵɵpipe(8,"i18n"),i.ɵɵelementEnd(),i.ɵɵtext(9,"\n "),i.ɵɵelementStart(10,"th"),i.ɵɵtext(11),i.ɵɵpipe(12,"i18n"),i.ɵɵelementEnd(),i.ɵɵtext(13,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(14,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(15,"\n "),i.ɵɵtemplate(16,m,17,10,"tr",16),i.ɵɵtext(17,"\n "),i.ɵɵelementEnd()),2&e){const e=i.ɵɵnextContext();i.ɵɵadvance(7),i.ɵɵtextInterpolate(i.ɵɵpipeBind1(8,3,"user")),i.ɵɵadvance(4),i.ɵɵtextInterpolate(i.ɵɵpipeBind1(12,5,"status")),i.ɵɵadvance(5),i.ɵɵproperty("ngForOf",e.users)}}class v{constructor(){this.loading=!1}}t.BulkStatusComponent=v,v.ɵfac=function(e){return new(e||v)},v.ɵcmp=i.ɵɵdefineComponent({type:v,selectors:[["app-bulk-status"]],decls:37,vars:11,consts:[["role","dialog","aria-modal","true","aria-labelledby","bulkTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],[1,"modal-content"],[1,"modal-header"],["id","bulkTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["class","card-body text-center",4,"ngIf"],["class","table table-hover table-list",4,"ngIf"],[1,"modal-footer"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"card-body","text-center"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[1,"table","table-hover","table-list"],["colspan","2"],[4,"ngFor","ngForOf"],["width","30"],["size","25",3,"data","email","circle","fontSize"],["class","text-muted d-block",4,"ngIf"],["class","text-danger",4,"ngIf"],[4,"ngIf"],[1,"text-muted","d-block"],[1,"text-danger"]],template:function(e,t){1&e&&(i.ɵɵelementStart(0,"div",0),i.ɵɵtext(1,"\n "),i.ɵɵelementStart(2,"div",1),i.ɵɵtext(3,"\n "),i.ɵɵelementStart(4,"div",2),i.ɵɵtext(5,"\n "),i.ɵɵelementStart(6,"div",3),i.ɵɵtext(7,"\n "),i.ɵɵelementStart(8,"h2",4),i.ɵɵtext(9),i.ɵɵpipe(10,"i18n"),i.ɵɵelementEnd(),i.ɵɵtext(11,"\n "),i.ɵɵelementStart(12,"button",5),i.ɵɵpipe(13,"i18n"),i.ɵɵtext(14,"\n "),i.ɵɵelementStart(15,"span",6),i.ɵɵtext(16,"×"),i.ɵɵelementEnd(),i.ɵɵtext(17,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(18,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(19,"\n "),i.ɵɵelementStart(20,"div",7),i.ɵɵtext(21,"\n "),i.ɵɵtemplate(22,c,6,6,"div",8),i.ɵɵtext(23,"\n "),i.ɵɵtemplate(24,h,18,7,"table",9),i.ɵɵtext(25,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(26,"\n "),i.ɵɵelementStart(27,"div",10),i.ɵɵtext(28,"\n "),i.ɵɵelementStart(29,"button",11),i.ɵɵtext(30),i.ɵɵpipe(31,"i18n"),i.ɵɵelementEnd(),i.ɵɵtext(32,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(33,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(34,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(35,"\n"),i.ɵɵelementEnd(),i.ɵɵtext(36,"\n")),2&e&&(i.ɵɵadvance(9),i.ɵɵtextInterpolate1("\n ",i.ɵɵpipeBind1(10,5,"bulkConfirmStatus"),"\n "),i.ɵɵadvance(3),i.ɵɵpropertyInterpolate("appA11yTitle",i.ɵɵpipeBind1(13,7,"close")),i.ɵɵadvance(10),i.ɵɵproperty("ngIf",t.loading),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",!t.loading),i.ɵɵadvance(6),i.ɵɵtextInterpolate1("\n ",i.ɵɵpipeBind1(31,9,"close"),"\n "))},directives:[r.A11yTitleDirective,o.NgIf,o.NgForOf,a.AvatarComponent],pipes:[s.I18nPipe,l.UserNamePipe],encapsulation:2})},75912:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionAddEditComponent=void 0;const r=n(32621),o=(n(91674),n(85714),n(51554),n(36631),n(63513),n(73828),n(82769)),a=n(22205),s=n(54554),l=n(11342),c=n(32621),d=n(91674),p=n(51554),u=n(73828),m=n(85714),h=n(36631),v=n(63513),f=n(96832),g=n(56820),y=n(8863),x=n(57490),S=n(45728),b=n(39159),w=n(99729);function C(e,t){1&e&&(c.ɵɵelementStart(0,"div",13),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",14),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",15),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"loading")))}function I(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div",25),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"button",26),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(3).selectAll(!0)})),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"button",26),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(3).selectAll(!1)})),c.ɵɵtext(7),c.ɵɵpipe(8,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(9,"\n "),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,2,"selectAll"),"\n "),c.ɵɵadvance(4),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(8,4,"unselectAll"),"\n "))}function E(e,t){1&e&&(c.ɵɵelementStart(0,"div"),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(2,1,"noGroupsInList"),"\n "))}function P(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",35),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",15),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"groupAccessAllItems")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"groupAccessAllItems")))}function O(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"tr"),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"td",30),c.ɵɵlistener("click",(function(){const t=c.ɵɵrestoreView(e).$implicit;return c.ɵɵnextContext(4).check(t)})),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"input",31),c.ɵɵlistener("ngModelChange",(function(t){return c.ɵɵrestoreView(e).$implicit.checked=t})),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(6,"\n "),c.ɵɵelementStart(7,"td",32),c.ɵɵlistener("click",(function(){const t=c.ɵɵrestoreView(e).$implicit;return c.ɵɵnextContext(4).check(t)})),c.ɵɵtext(8),c.ɵɵtemplate(9,P,9,6,"ng-container",22),c.ɵɵtext(10,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(11,"\n "),c.ɵɵelementStart(12,"td",33),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"input",34),c.ɵɵlistener("ngModelChange",(function(t){return c.ɵɵrestoreView(e).$implicit.hidePasswords=t})),c.ɵɵelementEnd(),c.ɵɵtext(15,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(16,"\n "),c.ɵɵelementStart(17,"td",33),c.ɵɵtext(18,"\n "),c.ɵɵelementStart(19,"input",34),c.ɵɵlistener("ngModelChange",(function(t){return c.ɵɵrestoreView(e).$implicit.readOnly=t})),c.ɵɵelementEnd(),c.ɵɵtext(20,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(21,"\n "),c.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=t.index,i=c.ɵɵnextContext(4);c.ɵɵadvance(4),c.ɵɵpropertyInterpolate1("name","Groups[",n,"].Checked"),c.ɵɵproperty("ngModel",e.checked)("disabled",e.accessAll||!i.canSave),c.ɵɵadvance(4),c.ɵɵtextInterpolate1("\n ",e.name,"\n "),c.ɵɵadvance(1),c.ɵɵproperty("ngIf",e.accessAll),c.ɵɵadvance(5),c.ɵɵpropertyInterpolate1("name","Groups[",n,"].HidePasswords"),c.ɵɵproperty("ngModel",e.hidePasswords)("disabled",!e.checked||e.accessAll||!i.canSave),c.ɵɵadvance(5),c.ɵɵpropertyInterpolate1("name","Groups[",n,"].ReadOnly"),c.ɵɵproperty("ngModel",e.readOnly)("disabled",!e.checked||e.accessAll||!i.canSave)}}function k(e,t){if(1&e&&(c.ɵɵelementStart(0,"table",27),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"thead"),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"tr"),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"th"),c.ɵɵtext(7," "),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementStart(9,"th"),c.ɵɵtext(10),c.ɵɵpipe(11,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(12,"\n "),c.ɵɵelementStart(13,"th",28),c.ɵɵtext(14),c.ɵɵpipe(15,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(16,"\n "),c.ɵɵelementStart(17,"th",28),c.ɵɵtext(18),c.ɵɵpipe(19,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(20,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(21,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(22,"\n "),c.ɵɵelementStart(23,"tbody"),c.ɵɵtext(24,"\n "),c.ɵɵtemplate(25,O,22,11,"tr",29),c.ɵɵtext(26,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(27,"\n "),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext(3);c.ɵɵadvance(10),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(11,4,"name")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(15,6,"hidePasswords")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(19,8,"readOnly")),c.ɵɵadvance(7),c.ɵɵproperty("ngForOf",e.groups)}}function A(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"h3",23),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵtemplate(5,I,10,6,"div",12),c.ɵɵtext(6,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵtemplate(8,E,3,3,"div",22),c.ɵɵtext(9,"\n "),c.ɵɵtemplate(10,k,28,10,"table",24),c.ɵɵtext(11,"\n "),c.ɵɵelementContainerEnd()),2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,4,"groupAccess"),"\n "),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.groups&&e.groups.length&&e.canSave),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",!e.groups||!e.groups.length),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.groups&&e.groups.length)}}function T(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div",13),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",16),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"label",17),c.ɵɵtext(5),c.ɵɵpipe(6,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"input",18),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext().name=t})),c.ɵɵelementEnd(),c.ɵɵtext(9,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(10,"\n "),c.ɵɵelementStart(11,"div",16),c.ɵɵtext(12,"\n "),c.ɵɵelementStart(13,"label",19),c.ɵɵtext(14),c.ɵɵpipe(15,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(16,"\n "),c.ɵɵelementStart(17,"input",20),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext().externalId=t})),c.ɵɵelementEnd(),c.ɵɵtext(18,"\n "),c.ɵɵelementStart(19,"small",21),c.ɵɵtext(20),c.ɵɵpipe(21,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(22,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(23,"\n "),c.ɵɵtemplate(24,A,12,6,"ng-container",22),c.ɵɵtext(25,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵnextContext();c.ɵɵadvance(5),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(6,8,"name")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.name)("disabled",!e.canSave),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(15,10,"externalId")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.externalId)("disabled",!e.canSave),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(21,12,"externalIdDesc")),c.ɵɵadvance(4),c.ɵɵproperty("ngIf",e.accessGroups)}}function M(e,t){if(1&e&&(c.ɵɵelementStart(0,"button",36),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",37),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span"),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementEnd()),2&e){c.ɵɵnextContext();const e=c.ɵɵreference(5);c.ɵɵproperty("disabled",e.loading),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,3,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,5,"save"))}}function B(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"button",39,40),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).delete()})),c.ɵɵpipe(2,"i18n"),c.ɵɵtext(3,"\n "),c.ɵɵelement(4,"i",41),c.ɵɵtext(5,"\n "),c.ɵɵelement(6,"i",42),c.ɵɵpipe(7,"i18n"),c.ɵɵtext(8,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵreference(1),t=c.ɵɵnextContext(2);c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(2,6,"delete")),c.ɵɵproperty("disabled",e.loading)("appApiAction",t.deletePromise),c.ɵɵadvance(4),c.ɵɵproperty("hidden",e.loading),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(7,8,"loading")),c.ɵɵproperty("hidden",!e.loading)}}function D(e,t){if(1&e&&(c.ɵɵelementStart(0,"div",25),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,B,9,10,"button",38),c.ɵɵtext(3,"\n "),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext();c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.editMode)}}class R{constructor(e,t,n,i,o,a){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.cryptoService=i,this.logService=o,this.organizationService=a,this.onSavedCollection=new r.EventEmitter,this.onDeletedCollection=new r.EventEmitter,this.loading=!0,this.editMode=!1,this.accessGroups=!1,this.groups=[]}ngOnInit(){return i(this,void 0,void 0,(function*(){const e=yield this.organizationService.get(this.organizationId);if(this.accessGroups=e.useGroups,this.editMode=this.loading=null!=this.collectionId,this.accessGroups){const e=yield this.apiService.getGroups(this.organizationId);this.groups=e.data.map((e=>e)).sort(o.Utils.getSortFunction(this.i18nService,"name"))}if(this.orgKey=yield this.cryptoService.getOrgKey(this.organizationId),this.editMode){this.editMode=!0,this.title=this.i18nService.t("editCollection");try{const e=yield this.apiService.getCollectionDetails(this.organizationId,this.collectionId);this.name=yield this.cryptoService.decryptToUtf8(new a.EncString(e.name),this.orgKey),this.externalId=e.externalId,null!=e.groups&&this.groups.length>0&&e.groups.forEach((e=>{const t=this.groups.filter((t=>!t.accessAll&&t.id===e.id));null!=t&&t.length>0&&(t[0].checked=!0,t[0].readOnly=e.readOnly,t[0].hidePasswords=e.hidePasswords)}))}catch(t){this.logService.error(t)}}else this.title=this.i18nService.t("addCollection");this.groups.forEach((e=>{e.accessAll&&(e.checked=!0)})),this.loading=!1}))}check(e,t){e.accessAll||(e.checked=null==t?!e.checked:t,e.checked||(e.readOnly=!1,e.hidePasswords=!1))}selectAll(e){this.groups.forEach((t=>this.check(t,e)))}submit(){return i(this,void 0,void 0,(function*(){if(null==this.orgKey)throw new Error("No encryption key for this organization.");const e=new s.CollectionRequest;e.name=(yield this.cryptoService.encrypt(this.name,this.orgKey)).encryptedString,e.externalId=this.externalId,e.groups=this.groups.filter((e=>e.checked&&!e.accessAll)).map((e=>new l.SelectionReadOnlyRequest(e.id,!!e.readOnly,!!e.hidePasswords)));try{this.editMode?this.formPromise=this.apiService.putCollection(this.organizationId,this.collectionId,e):this.formPromise=this.apiService.postCollection(this.organizationId,e),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t(this.editMode?"editedCollectionId":"createdCollectionId",this.name)),this.onSavedCollection.emit()}catch(t){this.logService.error(t)}}))}delete(){return i(this,void 0,void 0,(function*(){if(!this.editMode)return;if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("deleteCollectionConfirmation"),this.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{this.deletePromise=this.apiService.deleteCollection(this.organizationId,this.collectionId),yield this.deletePromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("deletedCollectionId",this.name)),this.onDeletedCollection.emit()}catch(e){this.logService.error(e)}}))}}t.CollectionAddEditComponent=R,R.ɵfac=function(e){return new(e||R)(c.ɵɵdirectiveInject(d.ApiService),c.ɵɵdirectiveInject(p.I18nService),c.ɵɵdirectiveInject(u.PlatformUtilsService),c.ɵɵdirectiveInject(m.CryptoService),c.ɵɵdirectiveInject(h.LogService),c.ɵɵdirectiveInject(v.OrganizationService))},R.ɵcmp=c.ɵɵdefineComponent({type:R,selectors:[["app-collection-add-edit"]],inputs:{collectionId:"collectionId",organizationId:"organizationId",canSave:"canSave",canDelete:"canDelete"},outputs:{onSavedCollection:"onSavedCollection",onDeletedCollection:"onDeletedCollection"},decls:38,vars:12,consts:[["role","dialog","aria-modal","true","aria-labelledby","collectionAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","collectionAddEditTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["class","ml-auto",4,"ngIf"],[1,"modal-body"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"form-group"],["for","name"],["id","name","type","text","name","Name","required","","appAutofocus","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","externalId"],["id","externalId","type","text","name","ExternalId",1,"form-control",3,"ngModel","disabled","ngModelChange"],[1,"form-text","text-muted"],[4,"ngIf"],[1,"mt-4","d-flex","mb-0"],["class","table table-hover table-list mb-0",4,"ngIf"],[1,"ml-auto"],["type","button",1,"btn","btn-link","btn-sm","py-0",3,"click"],[1,"table","table-hover","table-list","mb-0"],["width","100",1,"text-center"],[4,"ngFor","ngForOf"],[1,"table-list-checkbox",3,"click"],["type","checkbox","appStopProp","",3,"ngModel","name","disabled","ngModelChange"],[3,"click"],[1,"text-center"],["type","checkbox",3,"ngModel","name","disabled","ngModelChange"],["aria-hidden","true",1,"bwi","bwi-filter","text-muted","bwi-fw",3,"title"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click",4,"ngIf"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click"],["deleteBtn",""],["aria-hidden","true",1,"bwi","bwi-trash","bwi-lg","bwi-fw",3,"hidden"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-lg","bwi-fw",3,"hidden","title"]],template:function(e,t){1&e&&(c.ɵɵelementStart(0,"div",0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",1),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"form",2,3),c.ɵɵlistener("ngSubmit",(function(){return t.submit()})),c.ɵɵtext(6,"\n "),c.ɵɵelementStart(7,"div",4),c.ɵɵtext(8,"\n "),c.ɵɵelementStart(9,"h2",5),c.ɵɵtext(10),c.ɵɵelementEnd(),c.ɵɵtext(11,"\n "),c.ɵɵelementStart(12,"button",6),c.ɵɵpipe(13,"i18n"),c.ɵɵtext(14,"\n "),c.ɵɵelementStart(15,"span",7),c.ɵɵtext(16,"×"),c.ɵɵelementEnd(),c.ɵɵtext(17,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(18,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵtemplate(20,C,9,6,"div",8),c.ɵɵtext(21,"\n "),c.ɵɵtemplate(22,T,26,14,"div",8),c.ɵɵtext(23,"\n "),c.ɵɵelementStart(24,"div",9),c.ɵɵtext(25,"\n "),c.ɵɵtemplate(26,M,9,7,"button",10),c.ɵɵtext(27,"\n "),c.ɵɵelementStart(28,"button",11),c.ɵɵtext(29),c.ɵɵpipe(30,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(31,"\n "),c.ɵɵtemplate(32,D,4,1,"div",12),c.ɵɵtext(33,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(34,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(35,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(36,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(37,"\n")),2&e&&(c.ɵɵadvance(4),c.ɵɵproperty("appApiAction",t.formPromise),c.ɵɵadvance(6),c.ɵɵtextInterpolate(t.title),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(13,8,"close")),c.ɵɵadvance(8),c.ɵɵproperty("ngIf",t.loading),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!t.loading),c.ɵɵadvance(4),c.ɵɵproperty("ngIf",t.canSave),c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(30,10,"cancel"),"\n "),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",t.canDelete))},directives:[f.NgControlStatusGroup,f.NgForm,g.ApiActionDirective,y.A11yTitleDirective,x.NgIf,f.DefaultValueAccessor,f.RequiredValidator,S.AutofocusDirective,f.NgControlStatus,f.NgModel,x.NgForOf,f.CheckboxControlValueAccessor,b.StopPropDirective],pipes:[w.I18nPipe],encapsulation:2})},26092:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionsComponent=void 0;const r=n(32621),o=(n(68012),n(14857)),a=(n(64684),n(91674),n(3174),n(51554),n(36631),n(63513),n(73828),n(60421),n(34917)),s=n(65642),l=n(75912),c=n(60763),d=n(32621),p=n(91674),u=n(68012),m=n(3174),h=n(64684),v=n(51554),f=n(73828),g=n(60421),y=n(36631),x=n(63513),S=n(96832),b=n(57490),w=n(37407),C=n(1142),I=n(8863),E=n(99729),P=n(50154),O=["addEdit"],k=["usersTemplate"];function A(e,t){if(1&e){const e=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"button",8),d.ɵɵlistener("click",(function(){d.ɵɵrestoreView(e);return d.ɵɵnextContext().add()})),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"i",9),d.ɵɵtext(3),d.ɵɵpipe(4,"i18n"),d.ɵɵelementEnd()}2&e&&(d.ɵɵadvance(3),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(4,1,"newCollection"),"\n "))}function T(e,t){1&e&&(d.ɵɵelementContainerStart(0),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"i",10),d.ɵɵpipe(3,"i18n"),d.ɵɵtext(4,"\n "),d.ɵɵelementStart(5,"span",11),d.ɵɵtext(6),d.ɵɵpipe(7,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(8,"\n"),d.ɵɵelementContainerEnd()),2&e&&(d.ɵɵadvance(2),d.ɵɵpropertyInterpolate("title",d.ɵɵpipeBind1(3,2,"loading")),d.ɵɵadvance(4),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(7,4,"loading")))}function M(e,t){1&e&&(d.ɵɵelementStart(0,"p"),d.ɵɵtext(1),d.ɵɵpipe(2,"i18n"),d.ɵɵelementEnd()),2&e&&(d.ɵɵadvance(1),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(2,1,"noCollectionsInList")))}function B(e,t){if(1&e){const e=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"a",24),d.ɵɵlistener("click",(function(){d.ɵɵrestoreView(e);const t=d.ɵɵnextContext(2).$implicit;return d.ɵɵnextContext(3).users(t)})),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"i",25),d.ɵɵtext(3),d.ɵɵpipe(4,"i18n"),d.ɵɵelementEnd()}2&e&&(d.ɵɵadvance(3),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(4,1,"users"),"\n "))}function D(e,t){if(1&e){const e=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"a",26),d.ɵɵlistener("click",(function(){d.ɵɵrestoreView(e);const t=d.ɵɵnextContext(2).$implicit;return d.ɵɵnextContext(3).delete(t)})),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"i",27),d.ɵɵtext(3),d.ɵɵpipe(4,"i18n"),d.ɵɵelementEnd()}2&e&&(d.ɵɵadvance(3),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(4,1,"delete"),"\n "))}function R(e,t){if(1&e&&(d.ɵɵelementStart(0,"div",18),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"button",19),d.ɵɵpipe(3,"i18n"),d.ɵɵtext(4,"\n "),d.ɵɵelement(5,"i",20),d.ɵɵtext(6,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(7,"\n "),d.ɵɵelementStart(8,"div",21),d.ɵɵtext(9,"\n "),d.ɵɵtemplate(10,B,5,3,"a",22),d.ɵɵtext(11,"\n "),d.ɵɵtemplate(12,D,5,3,"a",23),d.ɵɵtext(13,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(14,"\n "),d.ɵɵelementEnd()),2&e){const e=d.ɵɵnextContext().$implicit,t=d.ɵɵnextContext(3);d.ɵɵadvance(2),d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(3,3,"options")),d.ɵɵadvance(8),d.ɵɵproperty("ngIf",t.canEdit(e)),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",t.canDelete(e))}}function F(e,t){if(1&e){const e=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"tr"),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"td"),d.ɵɵtext(3,"\n "),d.ɵɵelementStart(4,"a",15),d.ɵɵlistener("click",(function(){const t=d.ɵɵrestoreView(e).$implicit;return d.ɵɵnextContext(3).edit(t)})),d.ɵɵtext(5),d.ɵɵelementEnd(),d.ɵɵtext(6,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(7,"\n "),d.ɵɵelementStart(8,"td",16),d.ɵɵtext(9,"\n "),d.ɵɵtemplate(10,R,15,5,"div",17),d.ɵɵtext(11,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(12,"\n "),d.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=d.ɵɵnextContext(3);d.ɵɵadvance(5),d.ɵɵtextInterpolate(e.name),d.ɵɵadvance(5),d.ɵɵproperty("ngIf",n.canEdit(e)||n.canDelete(e))}}function U(e,t){if(1&e){const e=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"table",13),d.ɵɵlistener("scrolled",(function(){d.ɵɵrestoreView(e);return d.ɵɵnextContext(2).loadMore()})),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"tbody"),d.ɵɵtext(3,"\n "),d.ɵɵtemplate(4,F,13,2,"tr",14),d.ɵɵtext(5,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(6,"\n "),d.ɵɵelementEnd()}if(2&e){const e=d.ɵɵnextContext().ngIf,t=d.ɵɵnextContext();d.ɵɵproperty("infiniteScrollDistance",1)("infiniteScrollDisabled",!t.isPaging()),d.ɵɵadvance(4),d.ɵɵproperty("ngForOf",e)}}function V(e,t){if(1&e&&(d.ɵɵelementContainerStart(0),d.ɵɵtext(1,"\n "),d.ɵɵtemplate(2,M,3,3,"p",5),d.ɵɵtext(3,"\n "),d.ɵɵtemplate(4,U,7,3,"table",12),d.ɵɵtext(5,"\n"),d.ɵɵelementContainerEnd()),2&e){const e=t.ngIf;d.ɵɵadvance(2),d.ɵɵproperty("ngIf",!e.length),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",e.length)}}function N(e,t){}function _(e,t){}class j{constructor(e,t,n,i,r,o,a,s,l){this.apiService=e,this.route=t,this.collectionService=n,this.modalService=i,this.i18nService=r,this.platformUtilsService=o,this.searchService=a,this.logService=s,this.organizationService=l,this.loading=!0,this.canCreate=!1,this.didScroll=!1,this.pageSize=100,this.pagedCollectionsCount=0}ngOnInit(){return i(this,void 0,void 0,(function*(){this.route.parent.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.organizationId=e.organizationId,yield this.load(),this.route.queryParams.pipe(o.first()).subscribe((e=>i(this,void 0,void 0,(function*(){this.searchText=e.search}))))}))))}))}load(){return i(this,void 0,void 0,(function*(){this.organization=yield this.organizationService.get(this.organizationId),this.canCreate=this.organization.canCreateNewCollections;const e=e=>i(this,void 0,void 0,(function*(){const t=e.data.filter((e=>e.organizationId===this.organizationId)).map((e=>new s.Collection(new a.CollectionData(e))));return yield this.collectionService.decryptMany(t)}));if(this.organization.canViewAssignedCollections){const t=yield this.apiService.getUserCollections();this.assignedCollections=yield e(t)}if(this.organization.canViewAllCollections){const t=yield this.apiService.getCollections(this.organizationId);this.collections=yield e(t)}else this.collections=this.assignedCollections;this.resetPaging(),this.loading=!1}))}loadMore(){if(!this.collections||this.collections.length<=this.pageSize)return;const e=this.pagedCollections.length;let t=this.pageSize;0===e&&this.pagedCollectionsCount>this.pageSize&&(t=this.pagedCollectionsCount),this.collections.length>e&&(this.pagedCollections=this.pagedCollections.concat(this.collections.slice(e,e+t))),this.pagedCollectionsCount=this.pagedCollections.length,this.didScroll=this.pagedCollections.length>this.pageSize}edit(e){return i(this,void 0,void 0,(function*(){const t=null==e&&this.canCreate,n=null!=e&&this.canEdit(e),i=null!=e&&this.canDelete(e);if(!(t||n||i))return void this.platformUtilsService.showToast("error",null,this.i18nService.t("missingPermissions"));const[r]=yield this.modalService.openViewRef(l.CollectionAddEditComponent,this.addEditModalRef,(o=>{o.organizationId=this.organizationId,o.collectionId=null!=e?e.id:null,o.canSave=t||n,o.canDelete=i,o.onSavedCollection.subscribe((()=>{r.close(),this.load()})),o.onDeletedCollection.subscribe((()=>{r.close(),this.removeCollection(e)}))}))}))}add(){this.edit(null)}delete(e){return i(this,void 0,void 0,(function*(){if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("deleteCollectionConfirmation"),e.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{yield this.apiService.deleteCollection(this.organizationId,e.id),this.platformUtilsService.showToast("success",null,this.i18nService.t("deletedCollectionId",e.name)),this.removeCollection(e)}catch(t){this.logService.error(t),this.platformUtilsService.showToast("error",null,this.i18nService.t("missingPermissions"))}}))}users(e){return i(this,void 0,void 0,(function*(){const[t]=yield this.modalService.openViewRef(c.EntityUsersComponent,this.usersModalRef,(n=>{n.organizationId=this.organizationId,n.entity="collection",n.entityId=e.id,n.entityName=e.name,n.onEditedUsers.subscribe((()=>{this.load(),t.close()}))}))}))}resetPaging(){return i(this,void 0,void 0,(function*(){this.pagedCollections=[],this.loadMore()}))}isSearching(){return this.searchService.isSearchable(this.searchText)}isPaging(){const e=this.isSearching();return e&&this.didScroll&&this.resetPaging(),!e&&this.collections&&this.collections.length>this.pageSize}canEdit(e){return!!this.organization.canEditAnyCollection||!(!this.organization.canEditAssignedCollections||!this.assignedCollections.some((t=>t.id===e.id)))}canDelete(e){return!!this.organization.canDeleteAnyCollection||!(!this.organization.canDeleteAssignedCollections||!this.assignedCollections.some((t=>t.id===e.id)))}removeCollection(e){const t=this.collections.indexOf(e);t>-1&&(this.collections.splice(t,1),this.resetPaging())}}t.CollectionsComponent=j,j.ɵfac=function(e){return new(e||j)(d.ɵɵdirectiveInject(p.ApiService),d.ɵɵdirectiveInject(u.ActivatedRoute),d.ɵɵdirectiveInject(m.CollectionService),d.ɵɵdirectiveInject(h.ModalService),d.ɵɵdirectiveInject(v.I18nService),d.ɵɵdirectiveInject(f.PlatformUtilsService),d.ɵɵdirectiveInject(g.SearchService),d.ɵɵdirectiveInject(y.LogService),d.ɵɵdirectiveInject(x.OrganizationService))},j.ɵcmp=d.ɵɵdefineComponent({type:j,selectors:[["app-org-manage-collections"]],viewQuery:function(e,t){if(1&e&&(d.ɵɵviewQuery(O,7,r.ViewContainerRef),d.ɵɵviewQuery(k,7,r.ViewContainerRef)),2&e){let e;d.ɵɵqueryRefresh(e=d.ɵɵloadQuery())&&(t.addEditModalRef=e.first),d.ɵɵqueryRefresh(e=d.ɵɵloadQuery())&&(t.usersModalRef=e.first)}},decls:33,vars:18,consts:[[1,"page-header","d-flex"],[1,"ml-auto","d-flex"],["for","search",1,"sr-only"],["type","search","id","search",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange"],["type","button","class","btn btn-sm btn-outline-primary ml-3",3,"click",4,"ngIf"],[4,"ngIf"],["addEdit",""],["usersTemplate",""],["type","button",1,"btn","btn-sm","btn-outline-primary","ml-3",3,"click"],["aria-hidden","true",1,"bwi","bwi-plus","bwi-fw"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["class","table table-hover table-list","infiniteScroll","",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled",4,"ngIf"],["infiniteScroll","",1,"table","table-hover","table-list",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled"],[4,"ngFor","ngForOf"],["href","#","appStopClick","",3,"click"],[1,"table-list-options"],["class","dropdown","appListDropdown","",4,"ngIf"],["appListDropdown","",1,"dropdown"],["type","button","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-cog","bwi-lg"],[1,"dropdown-menu","dropdown-menu-right"],["class","dropdown-item","href","#","appStopClick","",3,"click",4,"ngIf"],["class","dropdown-item text-danger","href","#","appStopClick","",3,"click",4,"ngIf"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-users"],["href","#","appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-trash"]],template:function(e,t){1&e&&(d.ɵɵelementStart(0,"div",0),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"h1"),d.ɵɵtext(3),d.ɵɵpipe(4,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(5,"\n "),d.ɵɵelementStart(6,"div",1),d.ɵɵtext(7,"\n "),d.ɵɵelementStart(8,"div"),d.ɵɵtext(9,"\n "),d.ɵɵelementStart(10,"label",2),d.ɵɵtext(11),d.ɵɵpipe(12,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(13,"\n "),d.ɵɵelementStart(14,"input",3),d.ɵɵlistener("ngModelChange",(function(e){return t.searchText=e})),d.ɵɵpipe(15,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(16,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(17,"\n "),d.ɵɵtemplate(18,A,5,3,"button",4),d.ɵɵtext(19,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(20,"\n"),d.ɵɵelementEnd(),d.ɵɵtext(21,"\n"),d.ɵɵtemplate(22,T,9,6,"ng-container",5),d.ɵɵtext(23,"\n"),d.ɵɵtemplate(24,V,6,2,"ng-container",5),d.ɵɵpipe(25,"search"),d.ɵɵtext(26,"\n"),d.ɵɵtemplate(27,N,0,0,"ng-template",null,6,d.ɵɵtemplateRefExtractor),d.ɵɵtext(29,"\n"),d.ɵɵtemplate(30,_,0,0,"ng-template",null,7,d.ɵɵtemplateRefExtractor),d.ɵɵtext(32,"\n")),2&e&&(d.ɵɵadvance(3),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(4,7,"collections")),d.ɵɵadvance(8),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(12,9,"search")),d.ɵɵadvance(3),d.ɵɵpropertyInterpolate("placeholder",d.ɵɵpipeBind1(15,11,"search")),d.ɵɵproperty("ngModel",t.searchText),d.ɵɵadvance(4),d.ɵɵproperty("ngIf",t.canCreate),d.ɵɵadvance(4),d.ɵɵproperty("ngIf",t.loading),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",!t.loading&&(t.isPaging()?t.pagedCollections:d.ɵɵpipeBind4(25,13,t.collections,t.searchText,"name","id"))))},directives:[S.DefaultValueAccessor,S.NgControlStatus,S.NgModel,b.NgIf,w.InfiniteScrollDirective,b.NgForOf,C.StopClickDirective,I.A11yTitleDirective],pipes:[E.I18nPipe,P.SearchPipe],encapsulation:2})},87876:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EntityEventsComponent=void 0;n(52080),n(91674),n(51554),n(36631),n(73828),n(3202);const r=n(32621),o=n(91674),a=n(51554),s=n(3202),l=n(73828),c=n(52080),d=n(36631),p=n(57490),u=n(8863),m=n(96832),h=n(56820),v=n(99729);function f(e,t){if(1&e&&(r.ɵɵelementStart(0,"small",11),r.ɵɵtext(1),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(1),r.ɵɵtextInterpolate(e.name)}}function g(e,t){1&e&&(r.ɵɵelementStart(0,"div",12),r.ɵɵtext(1,"\n "),r.ɵɵelement(2,"i",13),r.ɵɵpipe(3,"i18n"),r.ɵɵtext(4,"\n "),r.ɵɵelementStart(5,"span",14),r.ɵɵtext(6),r.ɵɵpipe(7,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(3,2,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(7,4,"loading")))}function y(e,t){1&e&&(r.ɵɵelementStart(0,"div"),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"noEventsInList"),"\n "))}function x(e,t){1&e&&(r.ɵɵelementStart(0,"th",34),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(2,1,"user")))}function S(e,t){if(1&e&&(r.ɵɵelementStart(0,"td"),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"span",37),r.ɵɵtext(3),r.ɵɵelementEnd(),r.ɵɵtext(4,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext().$implicit;r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("appA11yTitle",e.userEmail),r.ɵɵadvance(1),r.ɵɵtextInterpolate(e.userName)}}function b(e,t){if(1&e&&(r.ɵɵelementStart(0,"tr"),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"td"),r.ɵɵtext(3),r.ɵɵpipe(4,"date"),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"td"),r.ɵɵtext(7,"\n "),r.ɵɵelement(8,"i",35),r.ɵɵtext(9,"\n "),r.ɵɵelementStart(10,"span",14),r.ɵɵtext(11),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(13,"\n "),r.ɵɵtemplate(14,S,5,2,"td",25),r.ɵɵtext(15,"\n "),r.ɵɵelement(16,"td",36),r.ɵɵtext(17,"\n "),r.ɵɵelementEnd()),2&e){const e=t.$implicit,n=r.ɵɵnextContext(3);r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind2(4,10,e.date,"medium")),r.ɵɵadvance(5),r.ɵɵclassMapInterpolate1("text-muted bwi bwi-lg ",e.appIcon,""),r.ɵɵpropertyInterpolate2("title","",e.appName,", ",e.ip,""),r.ɵɵadvance(3),r.ɵɵtextInterpolate2("",e.appName,", ",e.ip,""),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",n.showUser),r.ɵɵadvance(2),r.ɵɵproperty("innerHTML",e.message,r.ɵɵsanitizeHtml)}}function w(e,t){if(1&e&&(r.ɵɵelementStart(0,"table",28),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"thead"),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"tr"),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"th",29),r.ɵɵtext(7),r.ɵɵpipe(8,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementStart(10,"th",30),r.ɵɵtext(11,"\n "),r.ɵɵelementStart(12,"span",14),r.ɵɵtext(13),r.ɵɵpipe(14,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(15,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(16,"\n "),r.ɵɵtemplate(17,x,3,3,"th",31),r.ɵɵtext(18,"\n "),r.ɵɵelementStart(19,"th",32),r.ɵɵtext(20),r.ɵɵpipe(21,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(22,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(23,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(24,"\n "),r.ɵɵelementStart(25,"tbody"),r.ɵɵtext(26,"\n "),r.ɵɵtemplate(27,b,18,13,"tr",33),r.ɵɵtext(28,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(29,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(7),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(8,5,"timestamp")),r.ɵɵadvance(6),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(14,7,"device")),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",e.showUser),r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(21,9,"event")),r.ɵɵadvance(7),r.ɵɵproperty("ngForOf",e.events)}}function C(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"button",38,39),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(2).loadEvents(!1)})),r.ɵɵtext(2,"\n "),r.ɵɵelement(3,"i",40),r.ɵɵpipe(4,"i18n"),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"span"),r.ɵɵtext(7),r.ɵɵpipe(8,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵreference(1),t=r.ɵɵnextContext(2);r.ɵɵproperty("appApiAction",t.morePromise)("disabled",t.loaded&&e.loading),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(4,4,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(8,6,"loadMore"))}}const I=function(e){return{"bwi-spin":e}};function E(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"div",12),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",15),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",16),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"label",17),r.ɵɵtext(7),r.ɵɵpipe(8,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementStart(10,"input",18),r.ɵɵlistener("ngModelChange",(function(t){r.ɵɵrestoreView(e);return r.ɵɵnextContext().start=t})),r.ɵɵpipe(11,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelementStart(13,"span",19),r.ɵɵtext(14,"-"),r.ɵɵelementEnd(),r.ɵɵtext(15,"\n "),r.ɵɵelementStart(16,"label",20),r.ɵɵtext(17),r.ɵɵpipe(18,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵelementStart(20,"input",21),r.ɵɵlistener("ngModelChange",(function(t){r.ɵɵrestoreView(e);return r.ɵɵnextContext().end=t})),r.ɵɵpipe(21,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(22,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(23,"\n "),r.ɵɵelementStart(24,"button",22,23),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext().loadEvents(!0)})),r.ɵɵtext(26,"\n "),r.ɵɵelement(27,"i",24),r.ɵɵtext(28),r.ɵɵpipe(29,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(30,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(31,"\n "),r.ɵɵelement(32,"hr"),r.ɵɵtext(33,"\n "),r.ɵɵtemplate(34,y,3,3,"div",25),r.ɵɵtext(35,"\n "),r.ɵɵtemplate(36,w,30,11,"table",26),r.ɵɵtext(37,"\n "),r.ɵɵtemplate(38,C,10,8,"button",27),r.ɵɵtext(39,"\n "),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵreference(25),t=r.ɵɵnextContext();r.ɵɵadvance(7),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(8,13,"startDate")),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("placeholder",r.ɵɵpipeBind1(11,15,"startDate")),r.ɵɵproperty("ngModel",t.start),r.ɵɵadvance(7),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(18,17,"endDate")),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("placeholder",r.ɵɵpipeBind1(21,19,"endDate")),r.ɵɵproperty("ngModel",t.end),r.ɵɵadvance(4),r.ɵɵproperty("appApiAction",t.refreshPromise)("disabled",t.loaded&&e.loading),r.ɵɵadvance(3),r.ɵɵproperty("ngClass",r.ɵɵpureFunction1(23,I,t.loaded&&e.loading)),r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(29,21,"refresh"),"\n "),r.ɵɵadvance(6),r.ɵɵproperty("ngIf",!t.events||!t.events.length),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.events&&t.events.length),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.continuationToken)}}class P{constructor(e,t,n,i,r,o){this.apiService=e,this.i18nService=t,this.eventService=n,this.platformUtilsService=i,this.userNamePipe=r,this.logService=o,this.showUser=!1,this.loading=!0,this.loaded=!1,this.orgUsersUserIdMap=new Map,this.orgUsersIdMap=new Map}ngOnInit(){return i(this,void 0,void 0,(function*(){const e=this.eventService.getDefaultDateFilters();this.start=e[0],this.end=e[1],yield this.load()}))}load(){return i(this,void 0,void 0,(function*(){if(this.showUser){(yield this.apiService.getOrganizationUsers(this.organizationId)).data.forEach((e=>{const t=this.userNamePipe.transform(e);this.orgUsersIdMap.set(e.id,{name:t,email:e.email}),this.orgUsersUserIdMap.set(e.userId,{name:t,email:e.email})}))}yield this.loadEvents(!0),this.loaded=!0}))}loadEvents(e){return i(this,void 0,void 0,(function*(){if(null!=this.refreshPromise||null!=this.morePromise)return;let t,n=null;try{n=this.eventService.formatDateFilters(this.start,this.end)}catch(o){return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("invalidDateRange"))}this.loading=!0;try{let i;i="user"===this.entity&&this.providerId?this.apiService.getEventsProviderUser(this.providerId,this.entityId,n[0],n[1],e?null:this.continuationToken):"user"===this.entity?this.apiService.getEventsOrganizationUser(this.organizationId,this.entityId,n[0],n[1],e?null:this.continuationToken):this.apiService.getEventsCipher(this.entityId,n[0],n[1],e?null:this.continuationToken),e?this.refreshPromise=i:this.morePromise=i,t=yield i}catch(o){this.logService.error(o)}this.continuationToken=t.continuationToken;const r=yield Promise.all(t.data.map((e=>i(this,void 0,void 0,(function*(){const t=null==e.actingUserId?e.userId:e.actingUserId,n=yield this.eventService.getEventInfo(e),i=this.showUser&&null!=t&&this.orgUsersUserIdMap.has(t)?this.orgUsersUserIdMap.get(t):null;return{message:n.message,appIcon:n.appIcon,appName:n.appName,userId:t,userName:null!=i?i.name:this.showUser?this.i18nService.t("unknown"):null,userEmail:null!=i?i.email:this.showUser?"":null,date:e.date,ip:e.ipAddress,type:e.type}})))));!e&&null!=this.events&&this.events.length>0?this.events=this.events.concat(r):this.events=r,this.loading=!1,this.morePromise=null,this.refreshPromise=null}))}}t.EntityEventsComponent=P,P.ɵfac=function(e){return new(e||P)(r.ɵɵdirectiveInject(o.ApiService),r.ɵɵdirectiveInject(a.I18nService),r.ɵɵdirectiveInject(s.EventService),r.ɵɵdirectiveInject(l.PlatformUtilsService),r.ɵɵdirectiveInject(c.UserNamePipe),r.ɵɵdirectiveInject(d.LogService))},P.ɵcmp=r.ɵɵdefineComponent({type:P,selectors:[["app-entity-events"]],inputs:{name:"name",entity:"entity",entityId:"entityId",organizationId:"organizationId",providerId:"providerId",showUser:"showUser"},decls:36,vars:12,consts:[["role","dialog","aria-modal","true","aria-labelledby","eventLogsTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],[1,"modal-content"],[1,"modal-header"],["id","eventLogsTitle",1,"modal-title"],["class","text-muted",4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"text-muted"],[1,"modal-body"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"d-flex"],[1,"form-inline"],["for","start",1,"sr-only"],["type","datetime-local","id","start","placeholder","YYYY-MM-DDTHH:MM",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange"],[1,"mx-2"],["for","end",1,"sr-only"],["type","datetime-local","id","end","placeholder","YYYY-MM-DDTHH:MM",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange"],["type","button",1,"btn","btn-sm","btn-outline-primary","ml-3",3,"appApiAction","disabled","click"],["refreshBtn",""],["aria-hidden","true",1,"bwi","bwi-refresh","bwi-fw",3,"ngClass"],[4,"ngIf"],["class","table table-hover mb-0",4,"ngIf"],["type","button","class","btn btn-block btn-link btn-submit",3,"appApiAction","disabled","click",4,"ngIf"],[1,"table","table-hover","mb-0"],["width","210",1,"border-top-0"],["width","40",1,"border-top-0"],["class","border-top-0","width","150",4,"ngIf"],[1,"border-top-0"],[4,"ngFor","ngForOf"],["width","150",1,"border-top-0"],["aria-hidden","true",3,"title"],[3,"innerHTML"],[3,"appA11yTitle"],["type","button",1,"btn","btn-block","btn-link","btn-submit",3,"appApiAction","disabled","click"],["moreBtn",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",2),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"div",3),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"h2",4),r.ɵɵtext(9),r.ɵɵpipe(10,"i18n"),r.ɵɵtemplate(11,f,2,1,"small",5),r.ɵɵtext(12,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(13,"\n "),r.ɵɵelementStart(14,"button",6),r.ɵɵpipe(15,"i18n"),r.ɵɵtext(16,"\n "),r.ɵɵelementStart(17,"span",7),r.ɵɵtext(18,"×"),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(20,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(21,"\n "),r.ɵɵtemplate(22,g,9,6,"div",8),r.ɵɵtext(23,"\n "),r.ɵɵtemplate(24,E,40,25,"div",8),r.ɵɵtext(25,"\n "),r.ɵɵelementStart(26,"div",9),r.ɵɵtext(27,"\n "),r.ɵɵelementStart(28,"button",10),r.ɵɵtext(29),r.ɵɵpipe(30,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(31,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(32,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(33,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(34,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(35,"\n")),2&e&&(r.ɵɵadvance(9),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(10,6,"eventLogs"),"\n "),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.name),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(15,8,"close")),r.ɵɵadvance(8),r.ɵɵproperty("ngIf",!t.loaded),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.loaded),r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(30,10,"close"),"\n "))},directives:[p.NgIf,u.A11yTitleDirective,m.DefaultValueAccessor,m.NgControlStatus,m.NgModel,h.ApiActionDirective,p.NgClass,p.NgForOf],pipes:[v.I18nPipe,p.DatePipe],encapsulation:2})},60763:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EntityUsersComponent=void 0;const r=n(32621),o=(n(91674),n(51554),n(36631),n(73828),n(7368)),a=n(33712),s=n(82769),l=n(11342),c=n(32621),d=n(91674),p=n(51554),u=n(73828),m=n(36631),h=n(96832),v=n(56820),f=n(8863),g=n(57490),y=n(39159),x=n(15370),S=n(99729),b=n(50154),w=n(52080);function C(e,t){1&e&&(c.ɵɵelementStart(0,"div",13),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",14),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",15),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"loading")))}function I(e,t){if(1&e&&(c.ɵɵelementStart(0,"span",24),c.ɵɵtext(1),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(1),c.ɵɵtextInterpolate(e.selectedCount)}}function E(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"hr"),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,1,"noUsersInList"),"\n "))}function P(e,t){1&e&&(c.ɵɵelementStart(0,"th"),c.ɵɵtext(1," "),c.ɵɵelementEnd())}function O(e,t){1&e&&(c.ɵɵelementStart(0,"th",28),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(2,1,"hidePasswords"),"\n "))}function k(e,t){1&e&&(c.ɵɵelementStart(0,"th",28),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(2,1,"readOnly"),"\n "))}function A(e,t){1&e&&(c.ɵɵelementStart(0,"span",37),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(2,1,"invited")))}function T(e,t){1&e&&(c.ɵɵelementStart(0,"span",38),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(2,1,"accepted")))}function M(e,t){if(1&e&&(c.ɵɵelementStart(0,"small",39),c.ɵɵtext(1),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext().$implicit;c.ɵɵadvance(1),c.ɵɵtextInterpolate(e.name)}}function B(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",40),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",15),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"userAccessAllItems")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"userAccessAllItems")))}function D(e,t){if(1&e&&(c.ɵɵelementStart(0,"td"),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,B,9,6,"ng-container",23),c.ɵɵtext(3,"\n "),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext().$implicit;c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.accessAll)}}function R(e,t){1&e&&(c.ɵɵelementStart(0,"span"),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(2,1,"owner")))}function F(e,t){1&e&&(c.ɵɵelementStart(0,"span"),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(2,1,"admin")))}function U(e,t){1&e&&(c.ɵɵelementStart(0,"span"),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(2,1,"manager")))}function V(e,t){1&e&&(c.ɵɵelementStart(0,"span"),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(2,1,"user")))}function N(e,t){1&e&&(c.ɵɵelementStart(0,"span"),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(2,1,"custom")))}function _(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"td",41),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"input",42),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext().$implicit.hidePasswords=t})),c.ɵɵelementEnd(),c.ɵɵtext(3,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵnextContext().$implicit;c.ɵɵadvance(2),c.ɵɵpropertyInterpolate1("name","",e.id.substr(0,8),"_HidePasswords"),c.ɵɵproperty("ngModel",e.hidePasswords)("disabled",e.accessAll||!e.checked)}}function j(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"td",41),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"input",42),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext().$implicit.readOnly=t})),c.ɵɵelementEnd(),c.ɵɵtext(3,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵnextContext().$implicit;c.ɵɵadvance(2),c.ɵɵpropertyInterpolate1("name","",e.id.substr(0,8),"_ReadOnly"),c.ɵɵproperty("ngModel",e.readOnly)("disabled",e.accessAll||!e.checked)}}function z(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"tr"),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"td",29),c.ɵɵlistener("click",(function(){const t=c.ɵɵrestoreView(e).$implicit;return c.ɵɵnextContext(3).check(t)})),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"input",30),c.ɵɵlistener("ngModelChange",(function(t){return c.ɵɵrestoreView(e).$implicit.checked=t}))("change",(function(){const t=c.ɵɵrestoreView(e).$implicit;return c.ɵɵnextContext(3).selectedChanged(t)})),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(6,"\n "),c.ɵɵelementStart(7,"td",31),c.ɵɵlistener("click",(function(){const t=c.ɵɵrestoreView(e).$implicit;return c.ɵɵnextContext(3).check(t)})),c.ɵɵtext(8,"\n "),c.ɵɵelementStart(9,"app-avatar",32),c.ɵɵpipe(10,"userName"),c.ɵɵtext(11,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(12,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"td"),c.ɵɵtext(15),c.ɵɵtemplate(16,A,3,3,"span",33),c.ɵɵtext(17,"\n "),c.ɵɵtemplate(18,T,3,3,"span",34),c.ɵɵtext(19,"\n "),c.ɵɵtemplate(20,M,2,1,"small",35),c.ɵɵtext(21,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(22,"\n "),c.ɵɵtemplate(23,D,4,1,"td",23),c.ɵɵtext(24,"\n "),c.ɵɵelementStart(25,"td"),c.ɵɵtext(26,"\n "),c.ɵɵtemplate(27,R,3,3,"span",23),c.ɵɵtext(28,"\n "),c.ɵɵtemplate(29,F,3,3,"span",23),c.ɵɵtext(30,"\n "),c.ɵɵtemplate(31,U,3,3,"span",23),c.ɵɵtext(32,"\n "),c.ɵɵtemplate(33,V,3,3,"span",23),c.ɵɵtext(34,"\n "),c.ɵɵtemplate(35,N,3,3,"span",23),c.ɵɵtext(36,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(37,"\n "),c.ɵɵtemplate(38,_,4,3,"td",36),c.ɵɵtext(39,"\n "),c.ɵɵtemplate(40,j,4,3,"td",36),c.ɵɵtext(41,"\n "),c.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=c.ɵɵnextContext(3);c.ɵɵadvance(4),c.ɵɵpropertyInterpolate1("name","",e.id.substr(0,8),"_Checked"),c.ɵɵproperty("ngModel",e.checked)("disabled","collection"===n.entity&&e.accessAll),c.ɵɵadvance(5),c.ɵɵproperty("data",c.ɵɵpipeBind1(10,19,e))("email",e.email)("circle",!0)("fontSize",14),c.ɵɵadvance(6),c.ɵɵtextInterpolate1("\n ",e.email,"\n "),c.ɵɵadvance(1),c.ɵɵproperty("ngIf",e.status===n.organizationUserStatusType.Invited),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.status===n.organizationUserStatusType.Accepted),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.name),c.ɵɵadvance(3),c.ɵɵproperty("ngIf","collection"===n.entity),c.ɵɵadvance(4),c.ɵɵproperty("ngIf",e.type===n.organizationUserType.Owner),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.type===n.organizationUserType.Admin),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.type===n.organizationUserType.Manager),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.type===n.organizationUserType.User),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.type===n.organizationUserType.Custom),c.ɵɵadvance(3),c.ɵɵproperty("ngIf","collection"===n.entity),c.ɵɵadvance(2),c.ɵɵproperty("ngIf","collection"===n.entity)}}function H(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"table",25),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"thead"),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"tr"),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"th"),c.ɵɵtext(9," "),c.ɵɵelementEnd(),c.ɵɵtext(10,"\n "),c.ɵɵelementStart(11,"th"),c.ɵɵtext(12," "),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"th"),c.ɵɵtext(15),c.ɵɵpipe(16,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(17,"\n "),c.ɵɵtemplate(18,P,2,0,"th",23),c.ɵɵtext(19,"\n "),c.ɵɵelementStart(20,"th"),c.ɵɵtext(21),c.ɵɵpipe(22,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(23,"\n "),c.ɵɵtemplate(24,O,3,3,"th",26),c.ɵɵtext(25,"\n "),c.ɵɵtemplate(26,k,3,3,"th",26),c.ɵɵtext(27,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(28,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(29,"\n "),c.ɵɵelementStart(30,"tbody"),c.ɵɵtext(31,"\n "),c.ɵɵtemplate(32,z,42,21,"tr",27),c.ɵɵtext(33,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(34,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(35,"\n "),c.ɵɵelementContainerEnd()),2&e){const e=c.ɵɵnextContext().ngIf,t=c.ɵɵnextContext();c.ɵɵadvance(15),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(16,6,"name")),c.ɵɵadvance(3),c.ɵɵproperty("ngIf","collection"===t.entity),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(22,8,"userType")),c.ɵɵadvance(3),c.ɵɵproperty("ngIf","collection"===t.entity),c.ɵɵadvance(2),c.ɵɵproperty("ngIf","collection"===t.entity),c.ɵɵadvance(6),c.ɵɵproperty("ngForOf",e)}}const L=function(e){return{active:e}};function K(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div",13),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",16),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"div",17),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"label",18),c.ɵɵtext(7),c.ɵɵpipe(8,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(9,"\n "),c.ɵɵelementStart(10,"input",19),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext().searchText=t})),c.ɵɵpipe(11,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(12,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"div",20),c.ɵɵtext(15,"\n "),c.ɵɵelementStart(16,"button",21),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext().filterSelected(!1)})),c.ɵɵtext(17),c.ɵɵpipe(18,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵelementStart(20,"button",21),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext().filterSelected(!0)})),c.ɵɵtext(21),c.ɵɵpipe(22,"i18n"),c.ɵɵtemplate(23,I,2,1,"span",22),c.ɵɵtext(24,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(25,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(26,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(27,"\n "),c.ɵɵtemplate(28,E,5,3,"ng-container",23),c.ɵɵtext(29,"\n "),c.ɵɵtemplate(30,H,36,10,"ng-container",23),c.ɵɵtext(31,"\n "),c.ɵɵelementEnd()}if(2&e){const e=t.ngIf,n=c.ɵɵnextContext();c.ɵɵadvance(7),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(8,10,"search")),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("placeholder",c.ɵɵpipeBind1(11,12,"search")),c.ɵɵproperty("ngModel",n.searchText),c.ɵɵadvance(6),c.ɵɵproperty("ngClass",c.ɵɵpureFunction1(18,L,!n.showSelected)),c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(18,14,"all"),"\n "),c.ɵɵadvance(3),c.ɵɵproperty("ngClass",c.ɵɵpureFunction1(20,L,n.showSelected)),c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(22,16,"selected"),"\n "),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",n.selectedCount),c.ɵɵadvance(5),c.ɵɵproperty("ngIf",!e.length),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.length)}}const q=function(e,t){return[e,t,"name","email","id"]};class G{constructor(e,t,n,i){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.logService=i,this.onEditedUsers=new r.EventEmitter,this.organizationUserType=a.OrganizationUserType,this.organizationUserStatusType=o.OrganizationUserStatusType,this.showSelected=!1,this.loading=!0,this.selectedCount=0,this.allUsers=[]}ngOnInit(){return i(this,void 0,void 0,(function*(){yield this.loadUsers(),this.loading=!1}))}get users(){return this.showSelected?this.allUsers.filter((e=>e.checked)):this.allUsers}loadUsers(){return i(this,void 0,void 0,(function*(){const e=yield this.apiService.getOrganizationUsers(this.organizationId);if(this.allUsers=e.data.map((e=>e)).sort(s.Utils.getSortFunction(this.i18nService,"email")),"group"===this.entity){const t=yield this.apiService.getGroupUsers(this.organizationId,this.entityId);null!=t&&e.data.length>0&&t.forEach((t=>{const n=e.data.filter((e=>e.id===t));null!=n&&n.length>0&&(n[0].checked=!0)}))}else if("collection"===this.entity){const t=yield this.apiService.getCollectionUsers(this.organizationId,this.entityId);null!=t&&e.data.length>0&&t.forEach((t=>{const n=e.data.filter((e=>!e.accessAll&&e.id===t.id));null!=n&&n.length>0&&(n[0].checked=!0,n[0].readOnly=t.readOnly,n[0].hidePasswords=t.hidePasswords)}))}this.allUsers.forEach((e=>{"collection"===this.entity&&e.accessAll&&(e.checked=!0),e.checked&&this.selectedCount++}))}))}check(e){"collection"===this.entity&&e.accessAll||(e.checked=!e.checked,this.selectedChanged(e))}selectedChanged(e){e.checked?this.selectedCount++:("collection"===this.entity&&(e.readOnly=!1,e.hidePasswords=!1),this.selectedCount--)}filterSelected(e){this.showSelected=e}submit(){return i(this,void 0,void 0,(function*(){try{if("group"===this.entity){const e=this.users.filter((e=>e.checked)).map((e=>e.id));this.formPromise=this.apiService.putGroupUsers(this.organizationId,this.entityId,e)}else{const e=this.users.filter((e=>e.checked&&!e.accessAll)).map((e=>new l.SelectionReadOnlyRequest(e.id,!!e.readOnly,!!e.hidePasswords)));this.formPromise=this.apiService.putCollectionUsers(this.organizationId,this.entityId,e)}yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("updatedUsers")),this.onEditedUsers.emit()}catch(e){this.logService.error(e)}}))}}t.EntityUsersComponent=G,G.ɵfac=function(e){return new(e||G)(c.ɵɵdirectiveInject(d.ApiService),c.ɵɵdirectiveInject(p.I18nService),c.ɵɵdirectiveInject(u.PlatformUtilsService),c.ɵɵdirectiveInject(m.LogService))},G.ɵcmp=c.ɵɵdefineComponent({type:G,selectors:[["app-entity-users"]],inputs:{entity:"entity",entityId:"entityId",entityName:"entityName",organizationId:"organizationId"},outputs:{onEditedUsers:"onEditedUsers"},decls:49,vars:29,consts:[["role","dialog","aria-modal","true","aria-labelledby","userAccessTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","userAccessTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"modal-body"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"d-flex"],[1,"mr-3"],["for","search",1,"sr-only"],["type","search","id","search","name","SearchText",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange"],["role","group",1,"btn-group","btn-group-sm"],["type","button",1,"btn","btn-outline-secondary",3,"ngClass","click"],["class","badge badge-pill badge-info",4,"ngIf"],[4,"ngIf"],[1,"badge","badge-pill","badge-info"],[1,"table","table-hover","table-list","mb-0"],["width","100","class","text-center",4,"ngIf"],[4,"ngFor","ngForOf"],["width","100",1,"text-center"],[1,"table-list-checkbox",3,"click"],["type","checkbox","appStopProp","",3,"ngModel","name","disabled","ngModelChange","change"],["width","30",3,"click"],["size","25",3,"data","email","circle","fontSize"],["class","badge badge-secondary",4,"ngIf"],["class","badge badge-warning",4,"ngIf"],["class","text-muted d-block",4,"ngIf"],["class","text-center",4,"ngIf"],[1,"badge","badge-secondary"],[1,"badge","badge-warning"],[1,"text-muted","d-block"],["aria-hidden","true",1,"bwi","bwi-filter",3,"title"],[1,"text-center"],["type","checkbox",3,"ngModel","name","disabled","ngModelChange"]],template:function(e,t){if(1&e&&(c.ɵɵelementStart(0,"div",0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",1),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"form",2,3),c.ɵɵlistener("ngSubmit",(function(){return t.submit()})),c.ɵɵtext(6,"\n "),c.ɵɵelementStart(7,"div",4),c.ɵɵtext(8,"\n "),c.ɵɵelementStart(9,"h2",5),c.ɵɵtext(10),c.ɵɵpipe(11,"i18n"),c.ɵɵelementStart(12,"small"),c.ɵɵtext(13),c.ɵɵelementEnd(),c.ɵɵtext(14,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(15,"\n "),c.ɵɵelementStart(16,"button",6),c.ɵɵpipe(17,"i18n"),c.ɵɵtext(18,"\n "),c.ɵɵelementStart(19,"span",7),c.ɵɵtext(20,"×"),c.ɵɵelementEnd(),c.ɵɵtext(21,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(22,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(23,"\n "),c.ɵɵtemplate(24,C,9,6,"div",8),c.ɵɵtext(25,"\n "),c.ɵɵtemplate(26,K,32,22,"div",8),c.ɵɵpipe(27,"search"),c.ɵɵtext(28,"\n "),c.ɵɵelementStart(29,"div",9),c.ɵɵtext(30,"\n "),c.ɵɵelementStart(31,"button",10),c.ɵɵtext(32,"\n "),c.ɵɵelement(33,"i",11),c.ɵɵpipe(34,"i18n"),c.ɵɵtext(35,"\n "),c.ɵɵelementStart(36,"span"),c.ɵɵtext(37),c.ɵɵpipe(38,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(39,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(40,"\n "),c.ɵɵelementStart(41,"button",12),c.ɵɵtext(42),c.ɵɵpipe(43,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(44,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(45,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(46,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(47,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(48,"\n")),2&e){const e=c.ɵɵreference(5);c.ɵɵadvance(4),c.ɵɵproperty("appApiAction",t.formPromise),c.ɵɵadvance(6),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(11,10,"userAccess"),"\n "),c.ɵɵadvance(3),c.ɵɵtextInterpolate(t.entityName),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(17,12,"close")),c.ɵɵadvance(8),c.ɵɵproperty("ngIf",t.loading||!t.users),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!t.loading&&t.users&&c.ɵɵpipeBindV(27,14,c.ɵɵpureFunction2(26,q,t.users,t.searchText))),c.ɵɵadvance(5),c.ɵɵproperty("disabled",e.loading),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(34,20,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(38,22,"save")),c.ɵɵadvance(5),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(43,24,"close"),"\n ")}},directives:[h.NgControlStatusGroup,h.NgForm,v.ApiActionDirective,f.A11yTitleDirective,g.NgIf,h.DefaultValueAccessor,h.NgControlStatus,h.NgModel,g.NgClass,g.NgForOf,h.CheckboxControlValueAccessor,y.StopPropDirective,x.AvatarComponent],pipes:[S.I18nPipe,b.SearchPipe,w.UserNamePipe],encapsulation:2})},25829:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EventsComponent=void 0;n(68012),n(52080),n(91674),n(97445),n(51554),n(36631),n(63513),n(73828),n(68291);const r=n(75512),o=(n(3202),n(32621)),a=n(91674),s=n(68012),l=n(3202),c=n(51554),d=n(97445),p=n(73828),u=n(36631),m=n(52080),h=n(63513),v=n(68291),f=n(96832),g=n(56820),y=n(57490),x=n(99729);function S(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",16),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",17),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function b(e,t){1&e&&(o.ɵɵelementStart(0,"p"),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(2,1,"noEventsInList")))}function w(e,t){if(1&e&&(o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td"),o.ɵɵtext(3),o.ɵɵpipe(4,"date"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"td"),o.ɵɵtext(7,"\n "),o.ɵɵelement(8,"i",26),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"span",17),o.ɵɵtext(11),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"td"),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"span",27),o.ɵɵtext(17),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelement(20,"td",28),o.ɵɵtext(21,"\n "),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind2(4,11,e.date,"medium")),o.ɵɵadvance(5),o.ɵɵclassMapInterpolate1("text-muted bwi bwi-lg ",e.appIcon,""),o.ɵɵpropertyInterpolate2("title","",e.appName,", ",e.ip,""),o.ɵɵadvance(3),o.ɵɵtextInterpolate2("",e.appName,", ",e.ip,""),o.ɵɵadvance(5),o.ɵɵpropertyInterpolate("title",e.userEmail),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.userName),o.ɵɵadvance(3),o.ɵɵproperty("innerHTML",e.message,o.ɵɵsanitizeHtml)}}function C(e,t){if(1&e&&(o.ɵɵelementStart(0,"table",20),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"thead"),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"tr"),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"th",21),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"th",22),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"span",17),o.ɵɵtext(13),o.ɵɵpipe(14,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵelementStart(17,"th",23),o.ɵɵtext(18),o.ɵɵpipe(19,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"th",24),o.ɵɵtext(22),o.ɵɵpipe(23,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementStart(27,"tbody"),o.ɵɵtext(28,"\n "),o.ɵɵtemplate(29,w,22,14,"tr",25),o.ɵɵtext(30,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(31,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,5,"timestamp")),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(14,7,"device")),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(19,9,"user")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(23,11,"event")),o.ɵɵadvance(7),o.ɵɵproperty("ngForOf",e.events)}}function I(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"button",29,30),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).loadEvents(!1)})),o.ɵɵtext(2,"\n "),o.ɵɵelement(3,"i",31),o.ɵɵpipe(4,"i18n"),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"span"),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵreference(1),t=o.ɵɵnextContext(2);o.ɵɵproperty("appApiAction",t.morePromise)("disabled",t.loaded&&e.loading),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(4,4,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,6,"loadMore"))}}function E(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,b,3,3,"p",15),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,C,32,13,"table",18),o.ɵɵtext(5,"\n "),o.ɵɵtemplate(6,I,10,8,"button",19),o.ɵɵtext(7,"\n"),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.events||!e.events.length),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.events&&e.events.length),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.continuationToken)}}const P=function(e){return{"bwi-spin":e}},O=function(e){return{loading:e}};class k extends r.BaseEventsComponent{constructor(e,t,n,i,r,o,a,s,l,c,d){super(n,i,r,o,s),this.apiService=e,this.route=t,this.router=a,this.userNamePipe=l,this.organizationService=c,this.providerService=d,this.exportFileName="org-events",this.orgUsersUserIdMap=new Map}ngOnInit(){return i(this,void 0,void 0,(function*(){this.route.parent.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.organizationId=e.organizationId,this.organization=yield this.organizationService.get(this.organizationId),null!=this.organization&&this.organization.useEvents?yield this.load():this.router.navigate(["/organizations",this.organizationId])}))))}))}load(){return i(this,void 0,void 0,(function*(){if((yield this.apiService.getOrganizationUsers(this.organizationId)).data.forEach((e=>{const t=this.userNamePipe.transform(e);this.orgUsersUserIdMap.set(e.userId,{name:t,email:e.email})})),null!=this.organization.providerId)try{if(null!=(yield this.providerService.get(this.organization.providerId))&&(yield this.providerService.get(this.organization.providerId)).canManageUsers){(yield this.apiService.getProviderUsers(this.organization.providerId)).data.forEach((e=>{const t=this.userNamePipe.transform(e);this.orgUsersUserIdMap.set(e.userId,{name:`${t} (${this.organization.providerName})`,email:e.email})}))}}catch(e){this.logService.warning(e)}yield this.loadEvents(!0),this.loaded=!0}))}requestEvents(e,t,n){return this.apiService.getEventsOrganization(this.organizationId,e,t,n)}getUserName(e,t){return null==t?null:this.orgUsersUserIdMap.has(t)?this.orgUsersUserIdMap.get(t):null!=e.providerId&&e.providerId===this.organization.providerId?{name:this.organization.providerName}:null}}t.EventsComponent=k,k.ɵfac=function(e){return new(e||k)(o.ɵɵdirectiveInject(a.ApiService),o.ɵɵdirectiveInject(s.ActivatedRoute),o.ɵɵdirectiveInject(l.EventService),o.ɵɵdirectiveInject(c.I18nService),o.ɵɵdirectiveInject(d.ExportService),o.ɵɵdirectiveInject(p.PlatformUtilsService),o.ɵɵdirectiveInject(s.Router),o.ɵɵdirectiveInject(u.LogService),o.ɵɵdirectiveInject(m.UserNamePipe),o.ɵɵdirectiveInject(h.OrganizationService),o.ɵɵdirectiveInject(v.ProviderService))},k.ɵcmp=o.ɵɵdefineComponent({type:k,selectors:[["app-org-events"]],features:[o.ɵɵInheritDefinitionFeature],decls:57,vars:35,consts:[[1,"page-header","d-flex"],[1,"ml-auto","d-flex"],[1,"form-inline"],["for","start",1,"sr-only"],["type","datetime-local","id","start","placeholder","YYYY-MM-DDTHH:MM",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange","change"],[1,"mx-2"],["for","end",1,"sr-only"],["type","datetime-local","id","end","placeholder","YYYY-MM-DDTHH:MM",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange","change"],[1,"d-inline",3,"appApiAction"],["refreshForm",""],["type","button",1,"btn","btn-sm","btn-outline-primary","ml-3",3,"disabled","click"],["aria-hidden","true",1,"bwi","bwi-refresh","bwi-fw",3,"ngClass"],["exportForm",""],["type","button",1,"btn","btn-sm","btn-outline-primary","btn-submit","manual","ml-3",3,"ngClass","disabled","click"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin"],[4,"ngIf"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["class","table table-hover",4,"ngIf"],["type","button","class","btn btn-block btn-link btn-submit",3,"appApiAction","disabled","click",4,"ngIf"],[1,"table","table-hover"],["width","210",1,"border-top-0"],["width","40",1,"border-top-0"],["width","150",1,"border-top-0"],[1,"border-top-0"],[4,"ngFor","ngForOf"],["aria-hidden","true",3,"title"],[3,"title"],[3,"innerHTML"],["type","button",1,"btn","btn-block","btn-link","btn-submit",3,"appApiAction","disabled","click"],["moreBtn",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"]],template:function(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h1"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",1),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"div",2),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"label",3),o.ɵɵtext(11),o.ɵɵpipe(12,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"input",4),o.ɵɵlistener("ngModelChange",(function(e){return t.start=e}))("change",(function(){return t.dirtyDates=!0})),o.ɵɵpipe(15,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵelementStart(17,"span",5),o.ɵɵtext(18,"-"),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelementStart(20,"label",6),o.ɵɵtext(21),o.ɵɵpipe(22,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(23,"\n "),o.ɵɵelementStart(24,"input",7),o.ɵɵlistener("ngModelChange",(function(e){return t.end=e}))("change",(function(){return t.dirtyDates=!0})),o.ɵɵpipe(25,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelementStart(28,"form",8,9),o.ɵɵtext(30,"\n "),o.ɵɵelementStart(31,"button",10),o.ɵɵlistener("click",(function(){return t.loadEvents(!0)})),o.ɵɵtext(32,"\n "),o.ɵɵelement(33,"i",11),o.ɵɵtext(34),o.ɵɵpipe(35,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(36,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(37,"\n "),o.ɵɵelementStart(38,"form",8,12),o.ɵɵtext(40,"\n "),o.ɵɵelementStart(41,"button",13),o.ɵɵlistener("click",(function(){return t.exportEvents()})),o.ɵɵtext(42,"\n "),o.ɵɵelement(43,"i",14),o.ɵɵtext(44,"\n "),o.ɵɵelementStart(45,"span"),o.ɵɵtext(46),o.ɵɵpipe(47,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(48,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(49,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(50,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(51,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(52,"\n"),o.ɵɵtemplate(53,S,9,6,"ng-container",15),o.ɵɵtext(54,"\n"),o.ɵɵtemplate(55,E,8,3,"ng-container",15),o.ɵɵtext(56,"\n")),2&e){const e=o.ɵɵreference(29),n=o.ɵɵreference(39);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,17,"eventLogs")),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(12,19,"startDate")),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("placeholder",o.ɵɵpipeBind1(15,21,"startDate")),o.ɵɵproperty("ngModel",t.start),o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(22,23,"endDate")),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("placeholder",o.ɵɵpipeBind1(25,25,"endDate")),o.ɵɵproperty("ngModel",t.end),o.ɵɵadvance(4),o.ɵɵproperty("appApiAction",t.refreshPromise),o.ɵɵadvance(3),o.ɵɵproperty("disabled",t.loaded&&e.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngClass",o.ɵɵpureFunction1(31,P,t.loaded&&e.loading)),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(35,27,"refresh"),"\n "),o.ɵɵadvance(4),o.ɵɵproperty("appApiAction",t.exportPromise),o.ɵɵadvance(3),o.ɵɵproperty("ngClass",o.ɵɵpureFunction1(33,O,n.loading))("disabled",t.loaded&&n.loading||t.dirtyDates),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(47,29,"export")),o.ɵɵadvance(7),o.ɵɵproperty("ngIf",!t.loaded),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.loaded)}},directives:[f.DefaultValueAccessor,f.NgControlStatus,f.NgModel,f.ɵNgNoValidate,f.NgControlStatusGroup,f.NgForm,g.ApiActionDirective,y.NgClass,y.NgIf,y.NgForOf],pipes:[x.I18nPipe,y.DatePipe],encapsulation:2})},27611:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.GroupAddEditComponent=void 0;const r=n(32621),o=(n(91674),n(3174),n(51554),n(36631),n(73828),n(34917)),a=n(65642),s=n(13234),l=n(11342),c=n(32621),d=n(91674),p=n(51554),u=n(3174),m=n(73828),h=n(36631),v=n(96832),f=n(56820),g=n(8863),y=n(57490),x=n(39159),S=n(99729);function b(e,t){1&e&&(c.ɵɵelementStart(0,"div",15),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",16),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",17),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"loading")))}function w(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div",13),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"button",36),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).selectAll(!0)})),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"button",36),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).selectAll(!1)})),c.ɵɵtext(7),c.ɵɵpipe(8,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(9,"\n "),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,2,"selectAll"),"\n "),c.ɵɵadvance(4),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(8,4,"unselectAll"),"\n "))}function C(e,t){1&e&&(c.ɵɵelementStart(0,"div"),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(2,1,"noCollectionsInList"),"\n "))}function I(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"tr"),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"td",41),c.ɵɵlistener("click",(function(){const t=c.ɵɵrestoreView(e).$implicit;return c.ɵɵnextContext(4).check(t)})),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"input",42),c.ɵɵlistener("ngModelChange",(function(t){return c.ɵɵrestoreView(e).$implicit.checked=t})),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(6,"\n "),c.ɵɵelementStart(7,"td",43),c.ɵɵlistener("click",(function(){const t=c.ɵɵrestoreView(e).$implicit;return c.ɵɵnextContext(4).check(t)})),c.ɵɵtext(8),c.ɵɵelementEnd(),c.ɵɵtext(9,"\n "),c.ɵɵelementStart(10,"td",44),c.ɵɵtext(11,"\n "),c.ɵɵelementStart(12,"input",45),c.ɵɵlistener("ngModelChange",(function(t){return c.ɵɵrestoreView(e).$implicit.hidePasswords=t})),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(14,"\n "),c.ɵɵelementStart(15,"td",44),c.ɵɵtext(16,"\n "),c.ɵɵelementStart(17,"input",45),c.ɵɵlistener("ngModelChange",(function(t){return c.ɵɵrestoreView(e).$implicit.readOnly=t})),c.ɵɵelementEnd(),c.ɵɵtext(18,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=t.index;c.ɵɵadvance(4),c.ɵɵpropertyInterpolate1("name","Collection[",n,"].Checked"),c.ɵɵproperty("ngModel",e.checked),c.ɵɵadvance(4),c.ɵɵtextInterpolate1("\n ",e.name,"\n "),c.ɵɵadvance(4),c.ɵɵpropertyInterpolate1("name","Collection[",n,"].HidePasswords"),c.ɵɵproperty("ngModel",e.hidePasswords)("disabled",!e.checked),c.ɵɵadvance(5),c.ɵɵpropertyInterpolate1("name","Collection[",n,"].ReadOnly"),c.ɵɵproperty("ngModel",e.readOnly)("disabled",!e.checked)}}function E(e,t){if(1&e&&(c.ɵɵelementStart(0,"table",38),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"thead"),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"tr"),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"th"),c.ɵɵtext(7," "),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementStart(9,"th"),c.ɵɵtext(10),c.ɵɵpipe(11,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(12,"\n "),c.ɵɵelementStart(13,"th",39),c.ɵɵtext(14),c.ɵɵpipe(15,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(16,"\n "),c.ɵɵelementStart(17,"th",39),c.ɵɵtext(18),c.ɵɵpipe(19,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(20,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(21,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(22,"\n "),c.ɵɵelementStart(23,"tbody"),c.ɵɵtext(24,"\n "),c.ɵɵtemplate(25,I,20,9,"tr",40),c.ɵɵtext(26,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(27,"\n "),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext(3);c.ɵɵadvance(10),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(11,4,"name")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(15,6,"hidePasswords")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(19,8,"readOnly")),c.ɵɵadvance(7),c.ɵɵproperty("ngForOf",e.collections)}}function P(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,C,3,3,"div",35),c.ɵɵtext(3,"\n "),c.ɵɵtemplate(4,E,28,10,"table",37),c.ɵɵtext(5,"\n "),c.ɵɵelementContainerEnd()),2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!e.collections||!e.collections.length),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.collections&&e.collections.length)}}const O=function(e){return{"mb-0":e}};function k(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div",15),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",18),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"label",19),c.ɵɵtext(5),c.ɵɵpipe(6,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"input",20),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext().name=t})),c.ɵɵelementEnd(),c.ɵɵtext(9,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(10,"\n "),c.ɵɵelementStart(11,"div",18),c.ɵɵtext(12,"\n "),c.ɵɵelementStart(13,"label",21),c.ɵɵtext(14),c.ɵɵpipe(15,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(16,"\n "),c.ɵɵelementStart(17,"input",22),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext().externalId=t})),c.ɵɵelementEnd(),c.ɵɵtext(18,"\n "),c.ɵɵelementStart(19,"small",23),c.ɵɵtext(20),c.ɵɵpipe(21,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(22,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(23,"\n "),c.ɵɵelementStart(24,"h3",24),c.ɵɵtext(25,"\n "),c.ɵɵelementStart(26,"div",25),c.ɵɵtext(27),c.ɵɵpipe(28,"i18n"),c.ɵɵelementStart(29,"a",26),c.ɵɵpipe(30,"i18n"),c.ɵɵtext(31,"\n "),c.ɵɵelement(32,"i",27),c.ɵɵtext(33,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(34,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(35,"\n "),c.ɵɵtemplate(36,w,10,6,"div",28),c.ɵɵtext(37,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(38,"\n "),c.ɵɵelementStart(39,"div",29),c.ɵɵtext(40,"\n "),c.ɵɵelementStart(41,"div",30),c.ɵɵtext(42,"\n "),c.ɵɵelementStart(43,"input",31),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext().access=t})),c.ɵɵelementEnd(),c.ɵɵtext(44,"\n "),c.ɵɵelementStart(45,"label",32),c.ɵɵtext(46),c.ɵɵpipe(47,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(48,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(49,"\n "),c.ɵɵelementStart(50,"div",30),c.ɵɵtext(51,"\n "),c.ɵɵelementStart(52,"input",33),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext().access=t})),c.ɵɵelementEnd(),c.ɵɵtext(53,"\n "),c.ɵɵelementStart(54,"label",34),c.ɵɵtext(55),c.ɵɵpipe(56,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(57,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(58,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(59,"\n "),c.ɵɵtemplate(60,P,6,2,"ng-container",35),c.ɵɵtext(61,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵnextContext();c.ɵɵadvance(5),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(6,14,"name")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.name),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(15,16,"externalId")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.externalId),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(21,18,"externalIdDesc")),c.ɵɵadvance(7),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(28,20,"accessControl"),"\n "),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(30,22,"learnMore")),c.ɵɵadvance(7),c.ɵɵproperty("ngIf","selected"===e.access&&e.collections&&e.collections.length),c.ɵɵadvance(3),c.ɵɵproperty("ngClass",c.ɵɵpureFunction1(28,O,"selected"!==e.access)),c.ɵɵadvance(4),c.ɵɵproperty("ngModel",e.access),c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(47,24,"groupAccessAllItems"),"\n "),c.ɵɵadvance(6),c.ɵɵproperty("ngModel",e.access),c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(56,26,"groupAccessSelectedCollections"),"\n "),c.ɵɵadvance(5),c.ɵɵproperty("ngIf","selected"===e.access)}}function A(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"button",46,47),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext().delete()})),c.ɵɵpipe(2,"i18n"),c.ɵɵtext(3,"\n "),c.ɵɵelement(4,"i",48),c.ɵɵtext(5,"\n "),c.ɵɵelement(6,"i",49),c.ɵɵpipe(7,"i18n"),c.ɵɵtext(8,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵreference(1),t=c.ɵɵnextContext();c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(2,6,"delete")),c.ɵɵproperty("disabled",e.loading)("appApiAction",t.deletePromise),c.ɵɵadvance(4),c.ɵɵproperty("hidden",e.loading),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(7,8,"loading")),c.ɵɵproperty("hidden",!e.loading)}}class T{constructor(e,t,n,i,o){this.apiService=e,this.i18nService=t,this.collectionService=n,this.platformUtilsService=i,this.logService=o,this.onSavedGroup=new r.EventEmitter,this.onDeletedGroup=new r.EventEmitter,this.loading=!0,this.editMode=!1,this.access="selected",this.collections=[]}ngOnInit(){return i(this,void 0,void 0,(function*(){if(this.editMode=this.loading=null!=this.groupId,yield this.loadCollections(),this.editMode){this.editMode=!0,this.title=this.i18nService.t("editGroup");try{const e=yield this.apiService.getGroupDetails(this.organizationId,this.groupId);this.access=e.accessAll?"all":"selected",this.name=e.name,this.externalId=e.externalId,null!=e.collections&&null!=this.collections&&e.collections.forEach((e=>{const t=this.collections.filter((t=>t.id===e.id));null!=t&&t.length>0&&(t[0].checked=!0,t[0].readOnly=e.readOnly,t[0].hidePasswords=e.hidePasswords)}))}catch(e){this.logService.error(e)}}else this.title=this.i18nService.t("addGroup");this.loading=!1}))}loadCollections(){return i(this,void 0,void 0,(function*(){const e=(yield this.apiService.getCollections(this.organizationId)).data.map((e=>new a.Collection(new o.CollectionData(e))));this.collections=yield this.collectionService.decryptMany(e)}))}check(e,t){e.checked=null==t?!e.checked:t,e.checked||(e.readOnly=!1)}selectAll(e){this.collections.forEach((t=>this.check(t,e)))}submit(){return i(this,void 0,void 0,(function*(){const e=new s.GroupRequest;e.name=this.name,e.externalId=this.externalId,e.accessAll="all"===this.access,e.accessAll||(e.collections=this.collections.filter((e=>e.checked)).map((e=>new l.SelectionReadOnlyRequest(e.id,!!e.readOnly,!!e.hidePasswords))));try{this.editMode?this.formPromise=this.apiService.putGroup(this.organizationId,this.groupId,e):this.formPromise=this.apiService.postGroup(this.organizationId,e),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t(this.editMode?"editedGroupId":"createdGroupId",this.name)),this.onSavedGroup.emit()}catch(t){this.logService.error(t)}}))}delete(){return i(this,void 0,void 0,(function*(){if(!this.editMode)return;if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("deleteGroupConfirmation"),this.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{this.deletePromise=this.apiService.deleteGroup(this.organizationId,this.groupId),yield this.deletePromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("deletedGroupId",this.name)),this.onDeletedGroup.emit()}catch(e){this.logService.error(e)}}))}}t.GroupAddEditComponent=T,T.ɵfac=function(e){return new(e||T)(c.ɵɵdirectiveInject(d.ApiService),c.ɵɵdirectiveInject(p.I18nService),c.ɵɵdirectiveInject(u.CollectionService),c.ɵɵdirectiveInject(m.PlatformUtilsService),c.ɵɵdirectiveInject(h.LogService))},T.ɵcmp=c.ɵɵdefineComponent({type:T,selectors:[["app-group-add-edit"]],inputs:{groupId:"groupId",organizationId:"organizationId"},outputs:{onSavedGroup:"onSavedGroup",onDeletedGroup:"onDeletedGroup"},decls:49,vars:18,consts:[["role","dialog","aria-modal","true","aria-labelledby","groupAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","groupAddEditTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"ml-auto"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click",4,"ngIf"],[1,"modal-body"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"form-group"],["for","name"],["id","name","type","text","name","Name","required","",1,"form-control",3,"ngModel","ngModelChange"],["for","externalId"],["id","externalId","type","text","name","ExternalId",1,"form-control",3,"ngModel","ngModelChange"],[1,"form-text","text-muted"],[1,"mt-4","d-flex"],[1,"mb-2"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/user-types-access-control/#access-control",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],["class","ml-auto",4,"ngIf"],[1,"form-group",3,"ngClass"],[1,"form-check"],["type","radio","name","access","id","accessAll","value","all",1,"form-check-input",3,"ngModel","ngModelChange"],["for","accessAll",1,"form-check-label"],["type","radio","name","access","id","accessSelected","value","selected",1,"form-check-input",3,"ngModel","ngModelChange"],["for","accessSelected",1,"form-check-label"],[4,"ngIf"],["type","button",1,"btn","btn-link","btn-sm","py-0",3,"click"],["class","table table-hover table-list mb-0",4,"ngIf"],[1,"table","table-hover","table-list","mb-0"],["width","100",1,"text-center"],[4,"ngFor","ngForOf"],[1,"table-list-checkbox",3,"click"],["type","checkbox","appStopProp","",3,"ngModel","name","ngModelChange"],[3,"click"],[1,"text-center"],["type","checkbox",3,"ngModel","name","disabled","ngModelChange"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click"],["deleteBtn",""],["aria-hidden","true",1,"bwi","bwi-trash","bwi-lg","bwi-fw",3,"hidden"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-lg","bwi-fw",3,"hidden","title"]],template:function(e,t){if(1&e&&(c.ɵɵelementStart(0,"div",0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",1),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"form",2,3),c.ɵɵlistener("ngSubmit",(function(){return t.submit()})),c.ɵɵtext(6,"\n "),c.ɵɵelementStart(7,"div",4),c.ɵɵtext(8,"\n "),c.ɵɵelementStart(9,"h2",5),c.ɵɵtext(10),c.ɵɵelementEnd(),c.ɵɵtext(11,"\n "),c.ɵɵelementStart(12,"button",6),c.ɵɵpipe(13,"i18n"),c.ɵɵtext(14,"\n "),c.ɵɵelementStart(15,"span",7),c.ɵɵtext(16,"×"),c.ɵɵelementEnd(),c.ɵɵtext(17,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(18,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵtemplate(20,b,9,6,"div",8),c.ɵɵtext(21,"\n "),c.ɵɵtemplate(22,k,62,30,"div",8),c.ɵɵtext(23,"\n "),c.ɵɵelementStart(24,"div",9),c.ɵɵtext(25,"\n "),c.ɵɵelementStart(26,"button",10),c.ɵɵtext(27,"\n "),c.ɵɵelement(28,"i",11),c.ɵɵpipe(29,"i18n"),c.ɵɵtext(30,"\n "),c.ɵɵelementStart(31,"span"),c.ɵɵtext(32),c.ɵɵpipe(33,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(34,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(35,"\n "),c.ɵɵelementStart(36,"button",12),c.ɵɵtext(37),c.ɵɵpipe(38,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(39,"\n "),c.ɵɵelementStart(40,"div",13),c.ɵɵtext(41,"\n "),c.ɵɵtemplate(42,A,9,10,"button",14),c.ɵɵtext(43,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(44,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(45,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(46,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(47,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(48,"\n")),2&e){const e=c.ɵɵreference(5);c.ɵɵadvance(4),c.ɵɵproperty("appApiAction",t.formPromise),c.ɵɵadvance(6),c.ɵɵtextInterpolate(t.title),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(13,10,"close")),c.ɵɵadvance(8),c.ɵɵproperty("ngIf",t.loading),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!t.loading),c.ɵɵadvance(4),c.ɵɵproperty("disabled",e.loading),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(29,12,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(33,14,"save")),c.ɵɵadvance(5),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(38,16,"cancel"),"\n "),c.ɵɵadvance(5),c.ɵɵproperty("ngIf",t.editMode)}},directives:[v.NgControlStatusGroup,v.NgForm,f.ApiActionDirective,g.A11yTitleDirective,y.NgIf,v.DefaultValueAccessor,v.RequiredValidator,v.NgControlStatus,v.NgModel,y.NgClass,v.RadioControlValueAccessor,y.NgForOf,v.CheckboxControlValueAccessor,x.StopPropDirective],pipes:[S.I18nPipe],encapsulation:2})},41204:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.GroupsComponent=void 0;const r=n(32621),o=(n(68012),n(14857)),a=(n(64684),n(91674),n(51554),n(36631),n(63513),n(73828),n(60421),n(82769)),s=n(60763),l=n(27611),c=n(32621),d=n(91674),p=n(68012),u=n(51554),m=n(64684),h=n(73828),v=n(60421),f=n(36631),g=n(63513),y=n(96832),x=n(57490),S=n(37407),b=n(1142),w=n(8863),C=n(99729),I=n(50154),E=["addEdit"],P=["usersTemplate"];function O(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",9),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",10),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n"),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"loading")))}function k(e,t){1&e&&(c.ɵɵelementStart(0,"p"),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(2,1,"noGroupsInList")))}function A(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"tr"),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"td"),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"a",14),c.ɵɵlistener("click",(function(){const t=c.ɵɵrestoreView(e).$implicit;return c.ɵɵnextContext(3).edit(t)})),c.ɵɵtext(5),c.ɵɵelementEnd(),c.ɵɵtext(6,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"td",15),c.ɵɵtext(9,"\n "),c.ɵɵelementStart(10,"div",16),c.ɵɵtext(11,"\n "),c.ɵɵelementStart(12,"button",17),c.ɵɵpipe(13,"i18n"),c.ɵɵtext(14,"\n "),c.ɵɵelement(15,"i",18),c.ɵɵtext(16,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(17,"\n "),c.ɵɵelementStart(18,"div",19),c.ɵɵtext(19,"\n "),c.ɵɵelementStart(20,"a",20),c.ɵɵlistener("click",(function(){const t=c.ɵɵrestoreView(e).$implicit;return c.ɵɵnextContext(3).users(t)})),c.ɵɵtext(21,"\n "),c.ɵɵelement(22,"i",21),c.ɵɵtext(23),c.ɵɵpipe(24,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(25,"\n "),c.ɵɵelementStart(26,"a",22),c.ɵɵlistener("click",(function(){const t=c.ɵɵrestoreView(e).$implicit;return c.ɵɵnextContext(3).delete(t)})),c.ɵɵtext(27,"\n "),c.ɵɵelement(28,"i",23),c.ɵɵtext(29),c.ɵɵpipe(30,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(31,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(32,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(33,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(34,"\n "),c.ɵɵelementEnd()}if(2&e){const e=t.$implicit;c.ɵɵadvance(5),c.ɵɵtextInterpolate(e.name),c.ɵɵadvance(7),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(13,4,"options")),c.ɵɵadvance(11),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(24,6,"users"),"\n "),c.ɵɵadvance(6),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(30,8,"delete"),"\n ")}}function T(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"table",12),c.ɵɵlistener("scrolled",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).loadMore()})),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"tbody"),c.ɵɵtext(3,"\n "),c.ɵɵtemplate(4,A,35,10,"tr",13),c.ɵɵtext(5,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(6,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵnextContext().ngIf,t=c.ɵɵnextContext();c.ɵɵproperty("infiniteScrollDistance",1)("infiniteScrollDisabled",!t.isPaging()),c.ɵɵadvance(4),c.ɵɵproperty("ngForOf",e)}}function M(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,k,3,3,"p",6),c.ɵɵtext(3,"\n "),c.ɵɵtemplate(4,T,7,3,"table",11),c.ɵɵtext(5,"\n"),c.ɵɵelementContainerEnd()),2&e){const e=t.ngIf;c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!e.length),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.length)}}function B(e,t){}function D(e,t){}class R{constructor(e,t,n,i,r,o,a,s,l){this.apiService=e,this.route=t,this.i18nService=n,this.modalService=i,this.platformUtilsService=r,this.router=o,this.searchService=a,this.logService=s,this.organizationService=l,this.loading=!0,this.didScroll=!1,this.pageSize=100,this.pagedGroupsCount=0}ngOnInit(){return i(this,void 0,void 0,(function*(){this.route.parent.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.organizationId=e.organizationId;const t=yield this.organizationService.get(this.organizationId);null!=t&&t.useGroups?(yield this.load(),this.route.queryParams.pipe(o.first()).subscribe((e=>i(this,void 0,void 0,(function*(){this.searchText=e.search}))))):this.router.navigate(["/organizations",this.organizationId])}))))}))}load(){return i(this,void 0,void 0,(function*(){const e=yield this.apiService.getGroups(this.organizationId),t=null!=e.data&&e.data.length>0?e.data:[];t.sort(a.Utils.getSortFunction(this.i18nService,"name")),this.groups=t,this.resetPaging(),this.loading=!1}))}loadMore(){if(!this.groups||this.groups.length<=this.pageSize)return;const e=this.pagedGroups.length;let t=this.pageSize;0===e&&this.pagedGroupsCount>this.pageSize&&(t=this.pagedGroupsCount),this.groups.length>e&&(this.pagedGroups=this.pagedGroups.concat(this.groups.slice(e,e+t))),this.pagedGroupsCount=this.pagedGroups.length,this.didScroll=this.pagedGroups.length>this.pageSize}edit(e){return i(this,void 0,void 0,(function*(){const[t]=yield this.modalService.openViewRef(l.GroupAddEditComponent,this.addEditModalRef,(n=>{n.organizationId=this.organizationId,n.groupId=null!=e?e.id:null,n.onSavedGroup.subscribe((()=>{t.close(),this.load()})),n.onDeletedGroup.subscribe((()=>{t.close(),this.removeGroup(e)}))}))}))}add(){this.edit(null)}delete(e){return i(this,void 0,void 0,(function*(){if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("deleteGroupConfirmation"),e.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{yield this.apiService.deleteGroup(this.organizationId,e.id),this.platformUtilsService.showToast("success",null,this.i18nService.t("deletedGroupId",e.name)),this.removeGroup(e)}catch(t){this.logService.error(t)}}))}users(e){return i(this,void 0,void 0,(function*(){const[t]=yield this.modalService.openViewRef(s.EntityUsersComponent,this.usersModalRef,(n=>{n.organizationId=this.organizationId,n.entity="group",n.entityId=e.id,n.entityName=e.name,n.onEditedUsers.subscribe((()=>{t.close()}))}))}))}resetPaging(){return i(this,void 0,void 0,(function*(){this.pagedGroups=[],this.loadMore()}))}isSearching(){return this.searchService.isSearchable(this.searchText)}isPaging(){const e=this.isSearching();return e&&this.didScroll&&this.resetPaging(),!e&&this.groups&&this.groups.length>this.pageSize}removeGroup(e){const t=this.groups.indexOf(e);t>-1&&(this.groups.splice(t,1),this.resetPaging())}}t.GroupsComponent=R,R.ɵfac=function(e){return new(e||R)(c.ɵɵdirectiveInject(d.ApiService),c.ɵɵdirectiveInject(p.ActivatedRoute),c.ɵɵdirectiveInject(u.I18nService),c.ɵɵdirectiveInject(m.ModalService),c.ɵɵdirectiveInject(h.PlatformUtilsService),c.ɵɵdirectiveInject(p.Router),c.ɵɵdirectiveInject(v.SearchService),c.ɵɵdirectiveInject(f.LogService),c.ɵɵdirectiveInject(g.OrganizationService))},R.ɵcmp=c.ɵɵdefineComponent({type:R,selectors:[["app-org-groups"]],viewQuery:function(e,t){if(1&e&&(c.ɵɵviewQuery(E,7,r.ViewContainerRef),c.ɵɵviewQuery(P,7,r.ViewContainerRef)),2&e){let e;c.ɵɵqueryRefresh(e=c.ɵɵloadQuery())&&(t.addEditModalRef=e.first),c.ɵɵqueryRefresh(e=c.ɵɵloadQuery())&&(t.usersModalRef=e.first)}},decls:37,vars:20,consts:[[1,"page-header","d-flex"],[1,"ml-auto","d-flex"],["for","search",1,"sr-only"],["type","search","id","search",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange"],["type","button",1,"btn","btn-sm","btn-outline-primary","ml-3",3,"click"],["aria-hidden","true",1,"bwi","bwi-plus","bwi-fw"],[4,"ngIf"],["addEdit",""],["usersTemplate",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["class","table table-hover table-list","infiniteScroll","",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled",4,"ngIf"],["infiniteScroll","",1,"table","table-hover","table-list",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled"],[4,"ngFor","ngForOf"],["href","#","appStopClick","",3,"click"],[1,"table-list-options"],["appListDropdown","",1,"dropdown"],["type","button","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-cog","bwi-lg"],[1,"dropdown-menu","dropdown-menu-right"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-users"],["href","#","appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-trash"]],template:function(e,t){1&e&&(c.ɵɵelementStart(0,"div",0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"h1"),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"div",1),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"div"),c.ɵɵtext(9,"\n "),c.ɵɵelementStart(10,"label",2),c.ɵɵtext(11),c.ɵɵpipe(12,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"input",3),c.ɵɵlistener("ngModelChange",(function(e){return t.searchText=e})),c.ɵɵpipe(15,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(16,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(17,"\n "),c.ɵɵelementStart(18,"button",4),c.ɵɵlistener("click",(function(){return t.add()})),c.ɵɵtext(19,"\n "),c.ɵɵelement(20,"i",5),c.ɵɵtext(21),c.ɵɵpipe(22,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(23,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(24,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(25,"\n"),c.ɵɵtemplate(26,O,9,6,"ng-container",6),c.ɵɵtext(27,"\n"),c.ɵɵtemplate(28,M,6,2,"ng-container",6),c.ɵɵpipe(29,"search"),c.ɵɵtext(30,"\n"),c.ɵɵtemplate(31,B,0,0,"ng-template",null,7,c.ɵɵtemplateRefExtractor),c.ɵɵtext(33,"\n"),c.ɵɵtemplate(34,D,0,0,"ng-template",null,8,c.ɵɵtemplateRefExtractor),c.ɵɵtext(36,"\n")),2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(4,7,"groups")),c.ɵɵadvance(8),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(12,9,"search")),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("placeholder",c.ɵɵpipeBind1(15,11,"search")),c.ɵɵproperty("ngModel",t.searchText),c.ɵɵadvance(7),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(22,13,"newGroup"),"\n "),c.ɵɵadvance(5),c.ɵɵproperty("ngIf",t.loading),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!t.loading&&(t.isPaging()?t.pagedGroups:c.ɵɵpipeBind4(29,15,t.groups,t.searchText,"name","id"))))},directives:[y.DefaultValueAccessor,y.NgControlStatus,y.NgModel,x.NgIf,S.InfiniteScrollDirective,x.NgForOf,b.StopClickDirective,w.A11yTitleDirective],pipes:[C.I18nPipe,I.SearchPipe],encapsulation:2})},2021:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ManageComponent=void 0;n(68012),n(63513);const r=n(32621),o=n(68012),a=n(63513),s=n(57490),l=n(99729);function c(e,t){1&e&&(r.ɵɵelementStart(0,"a",14),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"people"),"\n "))}function d(e,t){1&e&&(r.ɵɵelementStart(0,"a",15),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"collections"),"\n "))}function p(e,t){1&e&&(r.ɵɵelementStart(0,"a",16),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"groups"),"\n "))}function u(e,t){1&e&&(r.ɵɵelementStart(0,"a",17),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"policies"),"\n "))}function m(e,t){1&e&&(r.ɵɵelementStart(0,"a",18),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"singleSignOn"),"\n "))}function h(e,t){1&e&&(r.ɵɵelementStart(0,"a",19),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"eventLogs"),"\n "))}function v(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",5),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",6),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"div",7),r.ɵɵtext(7,"\n "),r.ɵɵtemplate(8,c,3,3,"a",8),r.ɵɵtext(9,"\n "),r.ɵɵtemplate(10,d,3,3,"a",9),r.ɵɵtext(11,"\n "),r.ɵɵtemplate(12,p,3,3,"a",10),r.ɵɵtext(13,"\n "),r.ɵɵtemplate(14,u,3,3,"a",11),r.ɵɵtext(15,"\n "),r.ɵɵtemplate(16,m,3,3,"a",12),r.ɵɵtext(17,"\n "),r.ɵɵtemplate(18,h,3,3,"a",13),r.ɵɵtext(19,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(20,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(4,7,"manage")),r.ɵɵadvance(5),r.ɵɵproperty("ngIf",e.organization.canManageUsers),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.organization.canViewAllCollections||e.organization.canViewAssignedCollections),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.organization.canManageGroups&&e.accessGroups),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.organization.canManagePolicies&&e.accessPolicies),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.organization.canManageSso&&e.accessSso),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.organization.canAccessEventLogs&&e.accessEvents)}}class f{constructor(e,t){this.route=e,this.organizationService=t,this.accessPolicies=!1,this.accessGroups=!1,this.accessEvents=!1,this.accessSso=!1}ngOnInit(){this.route.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.organization=yield this.organizationService.get(e.organizationId),this.accessPolicies=this.organization.usePolicies,this.accessSso=this.organization.useSso,this.accessEvents=this.organization.useEvents,this.accessGroups=this.organization.useGroups}))))}}t.ManageComponent=f,f.ɵfac=function(e){return new(e||f)(r.ɵɵdirectiveInject(o.ActivatedRoute),r.ɵɵdirectiveInject(a.OrganizationService))},f.ɵcmp=r.ɵɵdefineComponent({type:f,selectors:[["app-org-manage"]],decls:16,vars:1,consts:[[1,"container","page-content"],[1,"row"],[1,"col-3"],["class","card",4,"ngIf"],[1,"col-9"],[1,"card"],[1,"card-header"],[1,"list-group","list-group-flush"],["routerLink","people","class","list-group-item","routerLinkActive","active",4,"ngIf"],["routerLink","collections","class","list-group-item","routerLinkActive","active",4,"ngIf"],["routerLink","groups","class","list-group-item","routerLinkActive","active",4,"ngIf"],["routerLink","policies","class","list-group-item","routerLinkActive","active",4,"ngIf"],["routerLink","sso","class","list-group-item","routerLinkActive","active",4,"ngIf"],["routerLink","events","class","list-group-item","routerLinkActive","active",4,"ngIf"],["routerLink","people","routerLinkActive","active",1,"list-group-item"],["routerLink","collections","routerLinkActive","active",1,"list-group-item"],["routerLink","groups","routerLinkActive","active",1,"list-group-item"],["routerLink","policies","routerLinkActive","active",1,"list-group-item"],["routerLink","sso","routerLinkActive","active",1,"list-group-item"],["routerLink","events","routerLinkActive","active",1,"list-group-item"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",2),r.ɵɵtext(5,"\n "),r.ɵɵtemplate(6,v,21,9,"div",3),r.ɵɵtext(7,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"div",4),r.ɵɵtext(10,"\n "),r.ɵɵelement(11,"router-outlet"),r.ɵɵtext(12,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(13,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(14,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(15,"\n")),2&e&&(r.ɵɵadvance(6),r.ɵɵproperty("ngIf",t.organization))},directives:[s.NgIf,o.RouterOutlet,o.RouterLinkWithHref,o.RouterLinkActive],pipes:[l.I18nPipe],encapsulation:2})},74147:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.PeopleComponent=void 0;const r=n(32621),o=(n(68012),n(14857)),a=(n(50154),n(52080),n(64684),n(47594),n(91674),n(85714),n(51554),n(36631),n(63513),n(73828),n(62166),n(60421),n(73569),n(9724),n(7368)),s=n(33712),l=n(49906),c=n(39950),d=n(91247),p=n(87169),u=n(1833),m=n(61692),h=n(37131),v=n(33747),f=n(87876),g=n(34236),y=n(28546),x=n(68535),S=n(32621),b=n(91674),w=n(68012),C=n(51554),I=n(64684),E=n(73828),P=n(85714),O=n(60421),k=n(47594),A=n(62166),T=n(36631),M=n(50154),B=n(52080),D=n(9724),R=n(73569),F=n(63513),U=n(57490),V=n(96832),N=n(8863),_=n(1142),j=n(37407),z=n(51626),H=n(39159),L=n(15370),K=n(99729),q=n(50154),G=n(52080),W=["addEdit"],$=["groupsTemplate"],Y=["eventsTemplate"],Q=["confirmTemplate"],J=["resetPasswordTemplate"],Z=["bulkStatusTemplate"],X=["bulkConfirmTemplate"],ee=["bulkRemoveTemplate"];function te(e,t){if(1&e&&(S.ɵɵelementStart(0,"span",32),S.ɵɵtext(1),S.ɵɵelementEnd()),2&e){const e=S.ɵɵnextContext();S.ɵɵadvance(1),S.ɵɵtextInterpolate(e.allCount)}}function ne(e,t){if(1&e&&(S.ɵɵelementStart(0,"span",32),S.ɵɵtext(1),S.ɵɵelementEnd()),2&e){const e=S.ɵɵnextContext();S.ɵɵadvance(1),S.ɵɵtextInterpolate(e.invitedCount)}}function ie(e,t){if(1&e&&(S.ɵɵelementStart(0,"span",33),S.ɵɵtext(1),S.ɵɵelementEnd()),2&e){const e=S.ɵɵnextContext();S.ɵɵadvance(1),S.ɵɵtextInterpolate(e.acceptedCount)}}function re(e,t){if(1&e){const e=S.ɵɵgetCurrentView();S.ɵɵelementStart(0,"button",34),S.ɵɵlistener("click",(function(){S.ɵɵrestoreView(e);return S.ɵɵnextContext().bulkConfirm()})),S.ɵɵtext(1,"\n "),S.ɵɵelement(2,"i",35),S.ɵɵtext(3),S.ɵɵpipe(4,"i18n"),S.ɵɵelementEnd()}2&e&&(S.ɵɵadvance(3),S.ɵɵtextInterpolate1("\n ",S.ɵɵpipeBind1(4,1,"confirmSelected"),"\n "))}function oe(e,t){1&e&&(S.ɵɵelementContainerStart(0),S.ɵɵtext(1,"\n "),S.ɵɵelement(2,"i",36),S.ɵɵpipe(3,"i18n"),S.ɵɵtext(4,"\n "),S.ɵɵelementStart(5,"span",37),S.ɵɵtext(6),S.ɵɵpipe(7,"i18n"),S.ɵɵelementEnd(),S.ɵɵtext(8,"\n"),S.ɵɵelementContainerEnd()),2&e&&(S.ɵɵadvance(2),S.ɵɵpropertyInterpolate("title",S.ɵɵpipeBind1(3,2,"loading")),S.ɵɵadvance(4),S.ɵɵtextInterpolate(S.ɵɵpipeBind1(7,4,"loading")))}function ae(e,t){1&e&&(S.ɵɵelementStart(0,"p"),S.ɵɵtext(1),S.ɵɵpipe(2,"i18n"),S.ɵɵelementEnd()),2&e&&(S.ɵɵadvance(1),S.ɵɵtextInterpolate(S.ɵɵpipeBind1(2,1,"noUsersInList")))}function se(e,t){1&e&&(S.ɵɵelementStart(0,"app-callout",41),S.ɵɵpipe(1,"i18n"),S.ɵɵtext(2),S.ɵɵpipe(3,"i18n"),S.ɵɵelementEnd()),2&e&&(S.ɵɵpropertyInterpolate("title",S.ɵɵpipeBind1(1,2,"confirmUsers")),S.ɵɵadvance(2),S.ɵɵtextInterpolate1("\n ",S.ɵɵpipeBind1(3,4,"usersNeedConfirmed"),"\n "))}function le(e,t){1&e&&(S.ɵɵelementStart(0,"span",58),S.ɵɵtext(1),S.ɵɵpipe(2,"i18n"),S.ɵɵelementEnd()),2&e&&(S.ɵɵadvance(1),S.ɵɵtextInterpolate(S.ɵɵpipeBind1(2,1,"invited")))}function ce(e,t){1&e&&(S.ɵɵelementStart(0,"span",59),S.ɵɵtext(1),S.ɵɵpipe(2,"i18n"),S.ɵɵelementEnd()),2&e&&(S.ɵɵadvance(1),S.ɵɵtextInterpolate(S.ɵɵpipeBind1(2,1,"accepted")))}function de(e,t){if(1&e&&(S.ɵɵelementStart(0,"small",60),S.ɵɵtext(1),S.ɵɵelementEnd()),2&e){const e=S.ɵɵnextContext().$implicit;S.ɵɵadvance(1),S.ɵɵtextInterpolate(e.name)}}function pe(e,t){1&e&&(S.ɵɵelementContainerStart(0),S.ɵɵtext(1,"\n "),S.ɵɵelement(2,"i",61),S.ɵɵpipe(3,"i18n"),S.ɵɵtext(4,"\n "),S.ɵɵelementStart(5,"span",37),S.ɵɵtext(6),S.ɵɵpipe(7,"i18n"),S.ɵɵelementEnd(),S.ɵɵtext(8,"\n "),S.ɵɵelementContainerEnd()),2&e&&(S.ɵɵadvance(2),S.ɵɵpropertyInterpolate("title",S.ɵɵpipeBind1(3,2,"userUsingTwoStep")),S.ɵɵadvance(4),S.ɵɵtextInterpolate(S.ɵɵpipeBind1(7,4,"userUsingTwoStep")))}function ue(e,t){1&e&&(S.ɵɵelementContainerStart(0),S.ɵɵtext(1,"\n "),S.ɵɵelement(2,"i",62),S.ɵɵpipe(3,"i18n"),S.ɵɵtext(4,"\n "),S.ɵɵelementStart(5,"span",37),S.ɵɵtext(6),S.ɵɵpipe(7,"i18n"),S.ɵɵelementEnd(),S.ɵɵtext(8,"\n "),S.ɵɵelementContainerEnd()),2&e&&(S.ɵɵadvance(2),S.ɵɵpropertyInterpolate("title",S.ɵɵpipeBind1(3,2,"enrolledPasswordReset")),S.ɵɵadvance(4),S.ɵɵtextInterpolate(S.ɵɵpipeBind1(7,4,"enrolledPasswordReset")))}function me(e,t){1&e&&(S.ɵɵelementStart(0,"span"),S.ɵɵtext(1),S.ɵɵpipe(2,"i18n"),S.ɵɵelementEnd()),2&e&&(S.ɵɵadvance(1),S.ɵɵtextInterpolate(S.ɵɵpipeBind1(2,1,"owner")))}function he(e,t){1&e&&(S.ɵɵelementStart(0,"span"),S.ɵɵtext(1),S.ɵɵpipe(2,"i18n"),S.ɵɵelementEnd()),2&e&&(S.ɵɵadvance(1),S.ɵɵtextInterpolate(S.ɵɵpipeBind1(2,1,"admin")))}function ve(e,t){1&e&&(S.ɵɵelementStart(0,"span"),S.ɵɵtext(1),S.ɵɵpipe(2,"i18n"),S.ɵɵelementEnd()),2&e&&(S.ɵɵadvance(1),S.ɵɵtextInterpolate(S.ɵɵpipeBind1(2,1,"manager")))}function fe(e,t){1&e&&(S.ɵɵelementStart(0,"span"),S.ɵɵtext(1),S.ɵɵpipe(2,"i18n"),S.ɵɵelementEnd()),2&e&&(S.ɵɵadvance(1),S.ɵɵtextInterpolate(S.ɵɵpipeBind1(2,1,"user")))}function ge(e,t){1&e&&(S.ɵɵelementStart(0,"span"),S.ɵɵtext(1),S.ɵɵpipe(2,"i18n"),S.ɵɵelementEnd()),2&e&&(S.ɵɵadvance(1),S.ɵɵtextInterpolate(S.ɵɵpipeBind1(2,1,"custom")))}function ye(e,t){if(1&e){const e=S.ɵɵgetCurrentView();S.ɵɵelementStart(0,"a",63),S.ɵɵlistener("click",(function(){S.ɵɵrestoreView(e);const t=S.ɵɵnextContext().$implicit;return S.ɵɵnextContext(3).reinvite(t)})),S.ɵɵtext(1,"\n "),S.ɵɵelement(2,"i",14),S.ɵɵtext(3),S.ɵɵpipe(4,"i18n"),S.ɵɵelementEnd()}2&e&&(S.ɵɵadvance(3),S.ɵɵtextInterpolate1("\n ",S.ɵɵpipeBind1(4,1,"resendInvitation"),"\n "))}function xe(e,t){if(1&e){const e=S.ɵɵgetCurrentView();S.ɵɵelementStart(0,"a",64),S.ɵɵlistener("click",(function(){S.ɵɵrestoreView(e);const t=S.ɵɵnextContext().$implicit;return S.ɵɵnextContext(3).confirm(t)})),S.ɵɵtext(1,"\n "),S.ɵɵelement(2,"i",35),S.ɵɵtext(3),S.ɵɵpipe(4,"i18n"),S.ɵɵelementEnd()}2&e&&(S.ɵɵadvance(3),S.ɵɵtextInterpolate1("\n ",S.ɵɵpipeBind1(4,1,"confirm"),"\n "))}function Se(e,t){if(1&e){const e=S.ɵɵgetCurrentView();S.ɵɵelementStart(0,"a",63),S.ɵɵlistener("click",(function(){S.ɵɵrestoreView(e);const t=S.ɵɵnextContext().$implicit;return S.ɵɵnextContext(3).groups(t)})),S.ɵɵtext(1,"\n "),S.ɵɵelement(2,"i",65),S.ɵɵtext(3),S.ɵɵpipe(4,"i18n"),S.ɵɵelementEnd()}2&e&&(S.ɵɵadvance(3),S.ɵɵtextInterpolate1("\n ",S.ɵɵpipeBind1(4,1,"groups"),"\n "))}function be(e,t){if(1&e){const e=S.ɵɵgetCurrentView();S.ɵɵelementStart(0,"a",63),S.ɵɵlistener("click",(function(){S.ɵɵrestoreView(e);const t=S.ɵɵnextContext().$implicit;return S.ɵɵnextContext(3).events(t)})),S.ɵɵtext(1,"\n "),S.ɵɵelement(2,"i",66),S.ɵɵtext(3),S.ɵɵpipe(4,"i18n"),S.ɵɵelementEnd()}2&e&&(S.ɵɵadvance(3),S.ɵɵtextInterpolate1("\n ",S.ɵɵpipeBind1(4,1,"eventLogs"),"\n "))}function we(e,t){if(1&e){const e=S.ɵɵgetCurrentView();S.ɵɵelementStart(0,"a",63),S.ɵɵlistener("click",(function(){S.ɵɵrestoreView(e);const t=S.ɵɵnextContext().$implicit;return S.ɵɵnextContext(3).resetPassword(t)})),S.ɵɵtext(1,"\n "),S.ɵɵelement(2,"i",67),S.ɵɵtext(3),S.ɵɵpipe(4,"i18n"),S.ɵɵelementEnd()}2&e&&(S.ɵɵadvance(3),S.ɵɵtextInterpolate1("\n ",S.ɵɵpipeBind1(4,1,"resetPassword"),"\n "))}function Ce(e,t){if(1&e){const e=S.ɵɵgetCurrentView();S.ɵɵelementStart(0,"tr"),S.ɵɵtext(1,"\n "),S.ɵɵelementStart(2,"td",42),S.ɵɵlistener("click",(function(){const t=S.ɵɵrestoreView(e).$implicit;return S.ɵɵnextContext(3).checkUser(t)})),S.ɵɵtext(3,"\n "),S.ɵɵelementStart(4,"input",43),S.ɵɵlistener("ngModelChange",(function(t){return S.ɵɵrestoreView(e).$implicit.checked=t})),S.ɵɵelementEnd(),S.ɵɵtext(5,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(6,"\n "),S.ɵɵelementStart(7,"td",44),S.ɵɵtext(8,"\n "),S.ɵɵelementStart(9,"app-avatar",45),S.ɵɵpipe(10,"userName"),S.ɵɵtext(11,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(12,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(13,"\n "),S.ɵɵelementStart(14,"td"),S.ɵɵtext(15,"\n "),S.ɵɵelementStart(16,"a",46),S.ɵɵlistener("click",(function(){const t=S.ɵɵrestoreView(e).$implicit;return S.ɵɵnextContext(3).edit(t)})),S.ɵɵtext(17),S.ɵɵelementEnd(),S.ɵɵtext(18,"\n "),S.ɵɵtemplate(19,le,3,3,"span",47),S.ɵɵtext(20,"\n "),S.ɵɵtemplate(21,ce,3,3,"span",48),S.ɵɵtext(22,"\n "),S.ɵɵtemplate(23,de,2,1,"small",49),S.ɵɵtext(24,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(25,"\n "),S.ɵɵelementStart(26,"td"),S.ɵɵtext(27,"\n "),S.ɵɵtemplate(28,pe,9,6,"ng-container",23),S.ɵɵtext(29,"\n "),S.ɵɵtemplate(30,ue,9,6,"ng-container",23),S.ɵɵtext(31,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(32,"\n "),S.ɵɵelementStart(33,"td"),S.ɵɵtext(34,"\n "),S.ɵɵtemplate(35,me,3,3,"span",23),S.ɵɵtext(36,"\n "),S.ɵɵtemplate(37,he,3,3,"span",23),S.ɵɵtext(38,"\n "),S.ɵɵtemplate(39,ve,3,3,"span",23),S.ɵɵtext(40,"\n "),S.ɵɵtemplate(41,fe,3,3,"span",23),S.ɵɵtext(42,"\n "),S.ɵɵtemplate(43,ge,3,3,"span",23),S.ɵɵtext(44,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(45,"\n "),S.ɵɵelementStart(46,"td",50),S.ɵɵtext(47,"\n "),S.ɵɵelementStart(48,"div",51),S.ɵɵtext(49,"\n "),S.ɵɵelementStart(50,"button",52),S.ɵɵpipe(51,"i18n"),S.ɵɵtext(52,"\n "),S.ɵɵelement(53,"i",53),S.ɵɵtext(54,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(55,"\n "),S.ɵɵelementStart(56,"div",54),S.ɵɵtext(57,"\n "),S.ɵɵtemplate(58,ye,5,3,"a",55),S.ɵɵtext(59,"\n "),S.ɵɵtemplate(60,xe,5,3,"a",56),S.ɵɵtext(61,"\n "),S.ɵɵtemplate(62,Se,5,3,"a",55),S.ɵɵtext(63,"\n "),S.ɵɵtemplate(64,be,5,3,"a",55),S.ɵɵtext(65,"\n "),S.ɵɵtemplate(66,we,5,3,"a",55),S.ɵɵtext(67,"\n "),S.ɵɵelementStart(68,"a",57),S.ɵɵlistener("click",(function(){const t=S.ɵɵrestoreView(e).$implicit;return S.ɵɵnextContext(3).remove(t)})),S.ɵɵtext(69,"\n "),S.ɵɵelement(70,"i",17),S.ɵɵtext(71),S.ɵɵpipe(72,"i18n"),S.ɵɵelementEnd(),S.ɵɵtext(73,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(74,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(75,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(76,"\n "),S.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=S.ɵɵnextContext(3);S.ɵɵadvance(4),S.ɵɵproperty("ngModel",e.checked),S.ɵɵadvance(5),S.ɵɵproperty("data",S.ɵɵpipeBind1(10,23,e))("email",e.email)("circle",!0)("fontSize",14),S.ɵɵadvance(8),S.ɵɵtextInterpolate(e.email),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",e.status===n.userStatusType.Invited),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",e.status===n.userStatusType.Accepted),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",e.name),S.ɵɵadvance(5),S.ɵɵproperty("ngIf",e.twoFactorEnabled),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",n.showEnrolledStatus(e)),S.ɵɵadvance(5),S.ɵɵproperty("ngIf",e.type===n.userType.Owner),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",e.type===n.userType.Admin),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",e.type===n.userType.Manager),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",e.type===n.userType.User),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",e.type===n.userType.Custom),S.ɵɵadvance(7),S.ɵɵpropertyInterpolate("appA11yTitle",S.ɵɵpipeBind1(51,25,"options")),S.ɵɵadvance(8),S.ɵɵproperty("ngIf",e.status===n.userStatusType.Invited),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",e.status===n.userStatusType.Accepted),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",n.accessGroups),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",n.accessEvents&&e.status===n.userStatusType.Confirmed),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",n.allowResetPassword(e)),S.ɵɵadvance(5),S.ɵɵtextInterpolate1("\n ",S.ɵɵpipeBind1(72,27,"remove"),"\n ")}}function Ie(e,t){if(1&e){const e=S.ɵɵgetCurrentView();S.ɵɵelementContainerStart(0),S.ɵɵtext(1,"\n "),S.ɵɵtemplate(2,se,4,6,"app-callout",38),S.ɵɵtext(3,"\n "),S.ɵɵelementStart(4,"table",39),S.ɵɵlistener("scrolled",(function(){S.ɵɵrestoreView(e);return S.ɵɵnextContext(2).loadMore()})),S.ɵɵtext(5,"\n "),S.ɵɵelementStart(6,"tbody"),S.ɵɵtext(7,"\n "),S.ɵɵtemplate(8,Ce,77,29,"tr",40),S.ɵɵtext(9,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(10,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(11,"\n "),S.ɵɵelementContainerEnd()}if(2&e){const e=S.ɵɵnextContext().ngIf,t=S.ɵɵnextContext();S.ɵɵadvance(2),S.ɵɵproperty("ngIf",t.showConfirmUsers),S.ɵɵadvance(2),S.ɵɵproperty("infiniteScrollDistance",1)("infiniteScrollDisabled",!t.isPaging()),S.ɵɵadvance(4),S.ɵɵproperty("ngForOf",e)}}function Ee(e,t){if(1&e&&(S.ɵɵelementContainerStart(0),S.ɵɵtext(1,"\n "),S.ɵɵtemplate(2,ae,3,3,"p",23),S.ɵɵtext(3,"\n "),S.ɵɵtemplate(4,Ie,12,4,"ng-container",23),S.ɵɵtext(5,"\n"),S.ɵɵelementContainerEnd()),2&e){const e=t.ngIf;S.ɵɵadvance(2),S.ɵɵproperty("ngIf",!e.length),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",e.length)}}function Pe(e,t){}function Oe(e,t){}function ke(e,t){}function Ae(e,t){}function Te(e,t){}function Me(e,t){}function Be(e,t){}function De(e,t){}const Re=function(e){return{active:e}},Fe=function(e,t){return[e,t,"name","email","id"]};class Ue extends u.BasePeopleComponent{constructor(e,t,n,i,r,o,l,c,d,p,u,m,h,v,f,g){super(e,c,n,r,o,d,i,u,m,h,f),this.route=t,this.router=l,this.policyService=p,this.syncService=v,this.organizationService=g,this.userType=s.OrganizationUserType,this.userStatusType=a.OrganizationUserStatusType,this.status=null,this.accessEvents=!1,this.accessGroups=!1,this.canResetPassword=!1,this.orgUseResetPassword=!1,this.orgHasKeys=!1,this.orgResetPasswordPolicyEnabled=!1,this.callingUserType=null}ngOnInit(){return i(this,void 0,void 0,(function*(){this.route.parent.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.organizationId=e.organizationId;const t=yield this.organizationService.get(this.organizationId);if(t.canManageUsers){if(this.accessEvents=t.useEvents,this.accessGroups=t.useGroups,this.canResetPassword=t.canManageUsersPassword,this.orgUseResetPassword=t.useResetPassword,this.callingUserType=t.type,this.orgHasKeys=t.hasPublicAndPrivateKeys,this.canResetPassword&&!this.orgHasKeys){const e=yield this.cryptoService.getOrgKey(this.organizationId),t=yield this.cryptoService.makeKeyPair(e),n=new c.OrganizationKeysRequest(t[0],t[1].encryptedString),i=yield this.apiService.postOrganizationKeys(this.organizationId,n);if(null==i)throw new Error(this.i18nService.t("resetPasswordOrgKeysError"));this.orgHasKeys=null!=i.publicKey&&null!=i.privateKey,yield this.syncService.fullSync(!0)}yield this.load(),this.route.queryParams.pipe(o.first()).subscribe((e=>i(this,void 0,void 0,(function*(){if(this.searchText=e.search,null!=e.viewEvents){const t=this.users.filter((t=>t.id===e.viewEvents));t.length>0&&t[0].status===a.OrganizationUserStatusType.Confirmed&&this.events(t[0])}}))))}else this.router.navigate(["../collections"],{relativeTo:this.route})}))))}))}load(){const e=Object.create(null,{load:{get:()=>super.load}});return i(this,void 0,void 0,(function*(){const t=yield this.policyService.getPolicyForOrganization(l.PolicyType.ResetPassword,this.organizationId);this.orgResetPasswordPolicyEnabled=null==t?void 0:t.enabled,e.load.call(this)}))}getUsers(){return this.apiService.getOrganizationUsers(this.organizationId)}deleteUser(e){return this.apiService.deleteOrganizationUser(this.organizationId,e)}reinviteUser(e){return this.apiService.postOrganizationUserReinvite(this.organizationId,e)}confirmUser(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.cryptoService.getOrgKey(this.organizationId),i=yield this.cryptoService.rsaEncrypt(n.key,t.buffer),r=new p.OrganizationUserConfirmRequest;r.key=i.encryptedString,yield this.apiService.postOrganizationUserConfirm(this.organizationId,e.id,r)}))}allowResetPassword(e){let t=!1;switch(this.callingUserType){case s.OrganizationUserType.Owner:t=!0;break;case s.OrganizationUserType.Admin:t=e.type!==s.OrganizationUserType.Owner;break;case s.OrganizationUserType.Custom:t=e.type!==s.OrganizationUserType.Owner&&e.type!==s.OrganizationUserType.Admin}return this.canResetPassword&&t&&this.orgUseResetPassword&&this.orgHasKeys&&e.resetPasswordEnrolled&&this.orgResetPasswordPolicyEnabled&&e.status===a.OrganizationUserStatusType.Confirmed}showEnrolledStatus(e){return this.orgUseResetPassword&&e.resetPasswordEnrolled&&this.orgResetPasswordPolicyEnabled}edit(e){return i(this,void 0,void 0,(function*(){const[t]=yield this.modalService.openViewRef(y.UserAddEditComponent,this.addEditModalRef,(n=>{n.name=this.userNamePipe.transform(e),n.organizationId=this.organizationId,n.organizationUserId=null!=e?e.id:null,n.usesKeyConnector=null==e?void 0:e.usesKeyConnector,n.onSavedUser.subscribe((()=>{t.close(),this.load()})),n.onDeletedUser.subscribe((()=>{t.close(),this.removeUser(e)}))}))}))}groups(e){return i(this,void 0,void 0,(function*(){const[t]=yield this.modalService.openViewRef(x.UserGroupsComponent,this.groupsModalRef,(n=>{n.name=this.userNamePipe.transform(e),n.organizationId=this.organizationId,n.organizationUserId=null!=e?e.id:null,n.onSavedUser.subscribe((()=>{t.close()}))}))}))}bulkRemove(){return i(this,void 0,void 0,(function*(){if(null!=this.actionPromise)return;const[e]=yield this.modalService.openViewRef(h.BulkRemoveComponent,this.bulkRemoveModalRef,(e=>{e.organizationId=this.organizationId,e.users=this.getCheckedUsers()}));yield e.onClosedPromise(),yield this.load()}))}bulkReinvite(){return i(this,void 0,void 0,(function*(){if(null!=this.actionPromise)return;const e=this.getCheckedUsers(),t=e.filter((e=>e.status===a.OrganizationUserStatusType.Invited));if(t.length<=0)this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("noSelectedUsersApplicable"));else{try{const n=new d.OrganizationUserBulkRequest(t.map((e=>e.id))),i=this.apiService.postManyOrganizationUserReinvite(this.organizationId,n);this.showBulkStatus(e,t,i,this.i18nService.t("bulkReinviteMessage"))}catch(n){this.validationService.showError(n)}this.actionPromise=null}}))}bulkConfirm(){return i(this,void 0,void 0,(function*(){if(null!=this.actionPromise)return;const[e]=yield this.modalService.openViewRef(m.BulkConfirmComponent,this.bulkConfirmModalRef,(e=>{e.organizationId=this.organizationId,e.users=this.getCheckedUsers()}));yield e.onClosedPromise(),yield this.load()}))}events(e){return i(this,void 0,void 0,(function*(){yield this.modalService.openViewRef(f.EntityEventsComponent,this.eventsModalRef,(t=>{t.name=this.userNamePipe.transform(e),t.organizationId=this.organizationId,t.entityId=e.id,t.showUser=!1,t.entity="user"}))}))}resetPassword(e){return i(this,void 0,void 0,(function*(){const[t]=yield this.modalService.openViewRef(g.ResetPasswordComponent,this.resetPasswordModalRef,(n=>{n.name=this.userNamePipe.transform(e),n.email=null!=e?e.email:null,n.organizationId=this.organizationId,n.id=null!=e?e.id:null,n.onPasswordReset.subscribe((()=>{t.close(),this.load()}))}))}))}deleteWarningMessage(e){return e.usesKeyConnector?this.i18nService.t("removeUserConfirmationKeyConnector"):super.deleteWarningMessage(e)}showBulkStatus(e,t,n,r){return i(this,void 0,void 0,(function*(){const[i,o]=yield this.modalService.openViewRef(v.BulkStatusComponent,this.bulkStatusModalRef,(e=>{e.loading=!0}));let a=!1;i.onShown.subscribe((()=>{a&&i.close()}));try{const a=yield n;if(i){const n=a.data.filter((e=>""!==e.error)).reduce(((e,t)=>Object.assign(Object.assign({},e),{[t.id]:t.error})),{}),i=t.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t.id]:t})),{});o.users=e.map((e=>{var t;let o=null!==(t=n[e.id])&&void 0!==t?t:r;return i.hasOwnProperty(e.id)||(o=this.i18nService.t("bulkFilteredMessage")),{user:e,error:n.hasOwnProperty(e.id),message:o}})),o.loading=!1}}catch(s){a=!0,i.close()}}))}}t.PeopleComponent=Ue,Ue.ɵfac=function(e){return new(e||Ue)(S.ɵɵdirectiveInject(b.ApiService),S.ɵɵdirectiveInject(w.ActivatedRoute),S.ɵɵdirectiveInject(C.I18nService),S.ɵɵdirectiveInject(I.ModalService),S.ɵɵdirectiveInject(E.PlatformUtilsService),S.ɵɵdirectiveInject(P.CryptoService),S.ɵɵdirectiveInject(w.Router),S.ɵɵdirectiveInject(O.SearchService),S.ɵɵdirectiveInject(k.ValidationService),S.ɵɵdirectiveInject(A.PolicyService),S.ɵɵdirectiveInject(T.LogService),S.ɵɵdirectiveInject(M.SearchPipe),S.ɵɵdirectiveInject(B.UserNamePipe),S.ɵɵdirectiveInject(D.SyncService),S.ɵɵdirectiveInject(R.StateService),S.ɵɵdirectiveInject(F.OrganizationService))},Ue.ɵcmp=S.ɵɵdefineComponent({type:Ue,selectors:[["app-org-people"]],viewQuery:function(e,t){if(1&e&&(S.ɵɵviewQuery(W,7,r.ViewContainerRef),S.ɵɵviewQuery($,7,r.ViewContainerRef),S.ɵɵviewQuery(Y,7,r.ViewContainerRef),S.ɵɵviewQuery(Q,7,r.ViewContainerRef),S.ɵɵviewQuery(J,7,r.ViewContainerRef),S.ɵɵviewQuery(Z,7,r.ViewContainerRef),S.ɵɵviewQuery(X,7,r.ViewContainerRef),S.ɵɵviewQuery(ee,7,r.ViewContainerRef)),2&e){let e;S.ɵɵqueryRefresh(e=S.ɵɵloadQuery())&&(t.addEditModalRef=e.first),S.ɵɵqueryRefresh(e=S.ɵɵloadQuery())&&(t.groupsModalRef=e.first),S.ɵɵqueryRefresh(e=S.ɵɵloadQuery())&&(t.eventsModalRef=e.first),S.ɵɵqueryRefresh(e=S.ɵɵloadQuery())&&(t.confirmModalRef=e.first),S.ɵɵqueryRefresh(e=S.ɵɵloadQuery())&&(t.resetPasswordModalRef=e.first),S.ɵɵqueryRefresh(e=S.ɵɵloadQuery())&&(t.bulkStatusModalRef=e.first),S.ɵɵqueryRefresh(e=S.ɵɵloadQuery())&&(t.bulkConfirmModalRef=e.first),S.ɵɵqueryRefresh(e=S.ɵɵloadQuery())&&(t.bulkRemoveModalRef=e.first)}},features:[S.ɵɵInheritDefinitionFeature],decls:116,vars:61,consts:[[1,"page-header","d-flex"],[1,"ml-auto","d-flex"],["role","group",1,"btn-group","btn-group-sm"],["type","button",1,"btn","btn-outline-secondary",3,"ngClass","click"],["class","badge badge-pill badge-info",4,"ngIf"],["class","badge badge-pill badge-warning",4,"ngIf"],[1,"ml-3"],["for","search",1,"sr-only"],["type","search","id","search",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange"],["appListDropdown","",1,"dropdown","ml-3"],["type","button","id","bulkActionsButton","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-sm","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-cog"],["aria-labelledby","bulkActionsButton",1,"dropdown-menu","dropdown-menu-right"],["appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-envelope"],["class","dropdown-item text-success","appStopClick","",3,"click",4,"ngIf"],["appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-close"],[1,"dropdown-divider"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-check-square"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-minus-square"],["type","button",1,"btn","btn-sm","btn-outline-primary","ml-3",3,"click"],["aria-hidden","true",1,"bwi","bwi-plus","bwi-fw"],[4,"ngIf"],["addEdit",""],["groupsTemplate",""],["eventsTemplate",""],["confirmTemplate",""],["resetPasswordTemplate",""],["bulkStatusTemplate",""],["bulkConfirmTemplate",""],["bulkRemoveTemplate",""],[1,"badge","badge-pill","badge-info"],[1,"badge","badge-pill","badge-warning"],["appStopClick","",1,"dropdown-item","text-success",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-check"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["type","info","icon","bwi bwi-check-circle",3,"title",4,"ngIf"],["infiniteScroll","",1,"table","table-hover","table-list",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled"],[4,"ngFor","ngForOf"],["type","info","icon","bwi bwi-check-circle",3,"title"],[1,"table-list-checkbox",3,"click"],["type","checkbox","appStopProp","",3,"ngModel","ngModelChange"],["width","30"],["size","25",3,"data","email","circle","fontSize"],["href","#","appStopClick","",3,"click"],["class","badge badge-secondary",4,"ngIf"],["class","badge badge-warning",4,"ngIf"],["class","text-muted d-block",4,"ngIf"],[1,"table-list-options"],["appListDropdown","",1,"dropdown"],["type","button","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-cog","bwi-lg"],[1,"dropdown-menu","dropdown-menu-right"],["class","dropdown-item","href","#","appStopClick","",3,"click",4,"ngIf"],["class","dropdown-item text-success","href","#","appStopClick","",3,"click",4,"ngIf"],["href","#","appStopClick","",1,"dropdown-item","text-danger",3,"click"],[1,"badge","badge-secondary"],[1,"badge","badge-warning"],[1,"text-muted","d-block"],["aria-hidden","true",1,"bwi","bwi-lock",3,"title"],["aria-hidden","true",1,"bwi","bwi-key",3,"title"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["href","#","appStopClick","",1,"dropdown-item","text-success",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-sitemap"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-file-text"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-key"]],template:function(e,t){1&e&&(S.ɵɵelementStart(0,"div",0),S.ɵɵtext(1,"\n "),S.ɵɵelementStart(2,"h1"),S.ɵɵtext(3),S.ɵɵpipe(4,"i18n"),S.ɵɵelementEnd(),S.ɵɵtext(5,"\n "),S.ɵɵelementStart(6,"div",1),S.ɵɵtext(7,"\n "),S.ɵɵelementStart(8,"div",2),S.ɵɵtext(9,"\n "),S.ɵɵelementStart(10,"button",3),S.ɵɵlistener("click",(function(){return t.filter(null)})),S.ɵɵtext(11),S.ɵɵpipe(12,"i18n"),S.ɵɵtemplate(13,te,2,1,"span",4),S.ɵɵtext(14,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(15,"\n "),S.ɵɵelementStart(16,"button",3),S.ɵɵlistener("click",(function(){return t.filter(t.userStatusType.Invited)})),S.ɵɵtext(17),S.ɵɵpipe(18,"i18n"),S.ɵɵtemplate(19,ne,2,1,"span",4),S.ɵɵtext(20,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(21,"\n "),S.ɵɵelementStart(22,"button",3),S.ɵɵlistener("click",(function(){return t.filter(t.userStatusType.Accepted)})),S.ɵɵtext(23),S.ɵɵpipe(24,"i18n"),S.ɵɵtemplate(25,ie,2,1,"span",5),S.ɵɵtext(26,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(27,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(28,"\n "),S.ɵɵelementStart(29,"div",6),S.ɵɵtext(30,"\n "),S.ɵɵelementStart(31,"label",7),S.ɵɵtext(32),S.ɵɵpipe(33,"i18n"),S.ɵɵelementEnd(),S.ɵɵtext(34,"\n "),S.ɵɵelementStart(35,"input",8),S.ɵɵlistener("ngModelChange",(function(e){return t.searchText=e})),S.ɵɵpipe(36,"i18n"),S.ɵɵelementEnd(),S.ɵɵtext(37,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(38,"\n "),S.ɵɵelementStart(39,"div",9),S.ɵɵtext(40,"\n "),S.ɵɵelementStart(41,"button",10),S.ɵɵpipe(42,"i18n"),S.ɵɵtext(43,"\n "),S.ɵɵelement(44,"i",11),S.ɵɵtext(45,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(46,"\n "),S.ɵɵelementStart(47,"div",12),S.ɵɵtext(48,"\n "),S.ɵɵelementStart(49,"button",13),S.ɵɵlistener("click",(function(){return t.bulkReinvite()})),S.ɵɵtext(50,"\n "),S.ɵɵelement(51,"i",14),S.ɵɵtext(52),S.ɵɵpipe(53,"i18n"),S.ɵɵelementEnd(),S.ɵɵtext(54,"\n "),S.ɵɵtemplate(55,re,5,3,"button",15),S.ɵɵtext(56,"\n "),S.ɵɵelementStart(57,"button",16),S.ɵɵlistener("click",(function(){return t.bulkRemove()})),S.ɵɵtext(58,"\n "),S.ɵɵelement(59,"i",17),S.ɵɵtext(60),S.ɵɵpipe(61,"i18n"),S.ɵɵelementEnd(),S.ɵɵtext(62,"\n "),S.ɵɵelement(63,"div",18),S.ɵɵtext(64,"\n "),S.ɵɵelementStart(65,"button",13),S.ɵɵlistener("click",(function(){return t.selectAll(!0)})),S.ɵɵtext(66,"\n "),S.ɵɵelement(67,"i",19),S.ɵɵtext(68),S.ɵɵpipe(69,"i18n"),S.ɵɵelementEnd(),S.ɵɵtext(70,"\n "),S.ɵɵelementStart(71,"button",13),S.ɵɵlistener("click",(function(){return t.selectAll(!1)})),S.ɵɵtext(72,"\n "),S.ɵɵelement(73,"i",20),S.ɵɵtext(74),S.ɵɵpipe(75,"i18n"),S.ɵɵelementEnd(),S.ɵɵtext(76,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(77,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(78,"\n "),S.ɵɵelementStart(79,"button",21),S.ɵɵlistener("click",(function(){return t.invite()})),S.ɵɵtext(80,"\n "),S.ɵɵelement(81,"i",22),S.ɵɵtext(82),S.ɵɵpipe(83,"i18n"),S.ɵɵelementEnd(),S.ɵɵtext(84,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(85,"\n"),S.ɵɵelementEnd(),S.ɵɵtext(86,"\n"),S.ɵɵtemplate(87,oe,9,6,"ng-container",23),S.ɵɵtext(88,"\n"),S.ɵɵtemplate(89,Ee,6,2,"ng-container",23),S.ɵɵpipe(90,"search"),S.ɵɵtext(91,"\n"),S.ɵɵtemplate(92,Pe,0,0,"ng-template",null,24,S.ɵɵtemplateRefExtractor),S.ɵɵtext(94,"\n"),S.ɵɵtemplate(95,Oe,0,0,"ng-template",null,25,S.ɵɵtemplateRefExtractor),S.ɵɵtext(97,"\n"),S.ɵɵtemplate(98,ke,0,0,"ng-template",null,26,S.ɵɵtemplateRefExtractor),S.ɵɵtext(100,"\n"),S.ɵɵtemplate(101,Ae,0,0,"ng-template",null,27,S.ɵɵtemplateRefExtractor),S.ɵɵtext(103,"\n"),S.ɵɵtemplate(104,Te,0,0,"ng-template",null,28,S.ɵɵtemplateRefExtractor),S.ɵɵtext(106,"\n"),S.ɵɵtemplate(107,Me,0,0,"ng-template",null,29,S.ɵɵtemplateRefExtractor),S.ɵɵtext(109,"\n"),S.ɵɵtemplate(110,Be,0,0,"ng-template",null,30,S.ɵɵtemplateRefExtractor),S.ɵɵtext(112,"\n"),S.ɵɵtemplate(113,De,0,0,"ng-template",null,31,S.ɵɵtemplateRefExtractor),S.ɵɵtext(115,"\n")),2&e&&(S.ɵɵadvance(3),S.ɵɵtextInterpolate(S.ɵɵpipeBind1(4,22,"people")),S.ɵɵadvance(7),S.ɵɵproperty("ngClass",S.ɵɵpureFunction1(52,Re,null==t.status)),S.ɵɵadvance(1),S.ɵɵtextInterpolate1("\n ",S.ɵɵpipeBind1(12,24,"all"),"\n "),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",t.allCount),S.ɵɵadvance(3),S.ɵɵproperty("ngClass",S.ɵɵpureFunction1(54,Re,t.status==t.userStatusType.Invited)),S.ɵɵadvance(1),S.ɵɵtextInterpolate1("\n ",S.ɵɵpipeBind1(18,26,"invited"),"\n "),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",t.invitedCount),S.ɵɵadvance(3),S.ɵɵproperty("ngClass",S.ɵɵpureFunction1(56,Re,t.status==t.userStatusType.Accepted)),S.ɵɵadvance(1),S.ɵɵtextInterpolate1("\n ",S.ɵɵpipeBind1(24,28,"accepted"),"\n "),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",t.acceptedCount),S.ɵɵadvance(7),S.ɵɵtextInterpolate(S.ɵɵpipeBind1(33,30,"search")),S.ɵɵadvance(3),S.ɵɵpropertyInterpolate("placeholder",S.ɵɵpipeBind1(36,32,"search")),S.ɵɵproperty("ngModel",t.searchText),S.ɵɵadvance(6),S.ɵɵpropertyInterpolate("appA11yTitle",S.ɵɵpipeBind1(42,34,"options")),S.ɵɵadvance(11),S.ɵɵtextInterpolate1("\n ",S.ɵɵpipeBind1(53,36,"reinviteSelected"),"\n "),S.ɵɵadvance(3),S.ɵɵproperty("ngIf",t.showBulkConfirmUsers),S.ɵɵadvance(5),S.ɵɵtextInterpolate1("\n ",S.ɵɵpipeBind1(61,38,"remove"),"\n "),S.ɵɵadvance(8),S.ɵɵtextInterpolate1("\n ",S.ɵɵpipeBind1(69,40,"selectAll"),"\n "),S.ɵɵadvance(6),S.ɵɵtextInterpolate1("\n ",S.ɵɵpipeBind1(75,42,"unselectAll"),"\n "),S.ɵɵadvance(8),S.ɵɵtextInterpolate1("\n ",S.ɵɵpipeBind1(83,44,"inviteUser"),"\n "),S.ɵɵadvance(5),S.ɵɵproperty("ngIf",t.loading),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",!t.loading&&(t.isPaging()?t.pagedUsers:S.ɵɵpipeBindV(90,46,S.ɵɵpureFunction2(58,Fe,t.users,t.searchText)))))},directives:[U.NgClass,U.NgIf,V.DefaultValueAccessor,V.NgControlStatus,V.NgModel,N.A11yTitleDirective,_.StopClickDirective,j.InfiniteScrollDirective,U.NgForOf,z.CalloutComponent,V.CheckboxControlValueAccessor,H.StopPropDirective,L.AvatarComponent],pipes:[K.I18nPipe,q.SearchPipe,G.UserNamePipe],encapsulation:2})},6029:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.PoliciesComponent=void 0;const r=n(32621),o=(n(68012),n(14857)),a=(n(64684),n(91674),n(63513),n(55453),n(40171)),s=n(32621),l=n(91674),c=n(68012),d=n(64684),p=n(63513),u=n(55453),m=n(57490),h=n(1142),v=n(99729),f=["editTemplate"];function g(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",4),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",5),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n"),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"loading")))}function y(e,t){1&e&&(s.ɵɵelementStart(0,"span",11),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,1,"enabled")))}function x(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"td"),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"a",8),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);const t=s.ɵɵnextContext().$implicit;return s.ɵɵnextContext(2).edit(t)})),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵtemplate(6,y,3,3,"span",9),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"small",10),s.ɵɵtext(9),s.ɵɵpipe(10,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext().$implicit,t=s.ɵɵnextContext(2);s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,3,e.name)),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",t.policiesEnabledMap.get(e.type)),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(10,5,e.description))}}function S(e,t){if(1&e&&(s.ɵɵelementStart(0,"tr"),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,x,12,7,"td",1),s.ɵɵtext(3,"\n "),s.ɵɵelementEnd()),2&e){const e=t.$implicit,n=s.ɵɵnextContext(2);s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.display(n.organization))}}function b(e,t){if(1&e&&(s.ɵɵelementStart(0,"table",6),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"tbody"),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,S,4,1,"tr",7),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n"),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(4),s.ɵɵproperty("ngForOf",e.policies)}}function w(e,t){}class C{constructor(e,t,n,i,r,o){this.apiService=e,this.route=t,this.modalService=n,this.organizationService=i,this.policyListService=r,this.router=o,this.loading=!0,this.policiesEnabledMap=new Map}ngOnInit(){return i(this,void 0,void 0,(function*(){this.route.parent.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.organizationId=e.organizationId,this.organization=yield this.organizationService.get(this.organizationId),null!=this.organization&&this.organization.usePolicies?(this.policies=this.policyListService.getPolicies(),yield this.load(),this.route.queryParams.pipe(o.first()).subscribe((e=>i(this,void 0,void 0,(function*(){if(null!=e.policyId){const t=e.policyId;for(const e of this.orgPolicies)if(e.id===t){for(let t=0;t0?e.data:[],this.orgPolicies.forEach((e=>{this.policiesEnabledMap.set(e.type,e.enabled)})),this.loading=!1}))}edit(e){return i(this,void 0,void 0,(function*(){const[t]=yield this.modalService.openViewRef(a.PolicyEditComponent,this.editModalRef,(n=>{n.policy=e,n.organizationId=this.organizationId,n.policiesEnabledMap=this.policiesEnabledMap,n.onSavedPolicy.subscribe((()=>{t.close(),this.load()}))}))}))}}t.PoliciesComponent=C,C.ɵfac=function(e){return new(e||C)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.ActivatedRoute),s.ɵɵdirectiveInject(d.ModalService),s.ɵɵdirectiveInject(p.OrganizationService),s.ɵɵdirectiveInject(u.PolicyListService),s.ɵɵdirectiveInject(c.Router))},C.ɵcmp=s.ɵɵdefineComponent({type:C,selectors:[["app-org-policies"]],viewQuery:function(e,t){if(1&e&&s.ɵɵviewQuery(f,7,r.ViewContainerRef),2&e){let e;s.ɵɵqueryRefresh(e=s.ɵɵloadQuery())&&(t.editModalRef=e.first)}},decls:14,vars:5,consts:[[1,"page-header","d-flex"],[4,"ngIf"],["class","table table-hover table-list",4,"ngIf"],["editTemplate",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"table","table-hover","table-list"],[4,"ngFor","ngForOf"],["href","#","appStopClick","",3,"click"],["class","badge badge-success",4,"ngIf"],[1,"text-muted","d-block"],[1,"badge","badge-success"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"h1"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n"),s.ɵɵtemplate(7,g,9,6,"ng-container",1),s.ɵɵtext(8,"\n"),s.ɵɵtemplate(9,b,7,1,"table",2),s.ɵɵtext(10,"\n"),s.ɵɵtemplate(11,w,0,0,"ng-template",null,3,s.ɵɵtemplateRefExtractor),s.ɵɵtext(13,"\n")),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,3,"policies")),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",t.loading),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!t.loading))},directives:[m.NgIf,m.NgForOf,h.StopClickDirective],pipes:[v.I18nPipe],encapsulation:2})},40171:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.PolicyEditComponent=void 0;const r=n(32621),o=(n(91674),n(51554),n(36631),n(73828),n(49906)),a=n(64030),s=(n(81824),n(32621)),l=n(91674),c=n(51554),d=n(73828),p=n(36631),u=n(96832),m=n(56820),h=n(8863),v=n(57490),f=n(99729),g=["policyForm"];function y(e,t){1&e&&(s.ɵɵelementStart(0,"div",8),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",16),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",17),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"loading")))}function x(e,t){}class S{constructor(e,t,n,i,a,s){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.componentFactoryResolver=i,this.cdr=a,this.logService=s,this.policiesEnabledMap=new Map,this.onSavedPolicy=new r.EventEmitter,this.policyType=o.PolicyType,this.loading=!0,this.enabled=!1}ngAfterViewInit(){return i(this,void 0,void 0,(function*(){yield this.load(),this.loading=!1;const e=this.componentFactoryResolver.resolveComponentFactory(this.policy.component);this.policyComponent=this.policyFormRef.createComponent(e).instance,this.policyComponent.policy=this.policy,this.policyComponent.policyResponse=this.policyResponse,this.cdr.detectChanges()}))}load(){return i(this,void 0,void 0,(function*(){try{this.policyResponse=yield this.apiService.getPolicy(this.organizationId,this.policy.type)}catch(e){if(404!==e.statusCode)throw e;this.policyResponse=new a.PolicyResponse({Enabled:!1})}}))}submit(){return i(this,void 0,void 0,(function*(){let e;try{e=yield this.policyComponent.buildRequest(this.policiesEnabledMap)}catch(t){return void this.platformUtilsService.showToast("error",null,t.message)}try{this.formPromise=this.apiService.putPolicy(this.organizationId,this.policy.type,e),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("editedPolicyId",this.i18nService.t(this.policy.name))),this.onSavedPolicy.emit()}catch(t){this.logService.error(t)}}))}}t.PolicyEditComponent=S,S.ɵfac=function(e){return new(e||S)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(d.PlatformUtilsService),s.ɵɵdirectiveInject(s.ComponentFactoryResolver),s.ɵɵdirectiveInject(s.ChangeDetectorRef),s.ɵɵdirectiveInject(p.LogService))},S.ɵcmp=s.ɵɵdefineComponent({type:S,selectors:[["app-policy-edit"]],viewQuery:function(e,t){if(1&e&&s.ɵɵviewQuery(g,7,r.ViewContainerRef),2&e){let e;s.ɵɵqueryRefresh(e=s.ɵɵloadQuery())&&(t.policyFormRef=e.first)}},inputs:{policy:"policy",organizationId:"organizationId",policiesEnabledMap:"policiesEnabledMap"},outputs:{onSavedPolicy:"onSavedPolicy"},decls:57,vars:25,consts:[["role","dialog","aria-modal","true","aria-labelledby","policiesEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","policiesEditTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["class","modal-body",4,"ngIf"],[3,"hidden"],["policyForm",""],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"]],template:function(e,t){if(1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",1),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"form",2,3),s.ɵɵlistener("ngSubmit",(function(){return t.submit()})),s.ɵɵtext(6,"\n "),s.ɵɵelementStart(7,"div",4),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"h2",5),s.ɵɵtext(10),s.ɵɵpipe(11,"i18n"),s.ɵɵpipe(12,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n "),s.ɵɵelementStart(14,"button",6),s.ɵɵpipe(15,"i18n"),s.ɵɵtext(16,"\n "),s.ɵɵelementStart(17,"span",7),s.ɵɵtext(18,"×"),s.ɵɵelementEnd(),s.ɵɵtext(19,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n\n "),s.ɵɵelementStart(22,"div",8),s.ɵɵtext(23,"\n "),s.ɵɵtemplate(24,y,9,6,"div",9),s.ɵɵtext(25,"\n "),s.ɵɵelementStart(26,"div",10),s.ɵɵtext(27,"\n "),s.ɵɵelementStart(28,"p"),s.ɵɵtext(29),s.ɵɵpipe(30,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(31,"\n "),s.ɵɵtemplate(32,x,0,0,"ng-template",null,11,s.ɵɵtemplateRefExtractor),s.ɵɵtext(34,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(35,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(36,"\n "),s.ɵɵelementStart(37,"div",12),s.ɵɵtext(38,"\n "),s.ɵɵelementStart(39,"button",13),s.ɵɵtext(40,"\n "),s.ɵɵelement(41,"i",14),s.ɵɵpipe(42,"i18n"),s.ɵɵtext(43,"\n "),s.ɵɵelementStart(44,"span"),s.ɵɵtext(45),s.ɵɵpipe(46,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(47,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(48,"\n "),s.ɵɵelementStart(49,"button",15),s.ɵɵtext(50),s.ɵɵpipe(51,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(52,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(53,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(54,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(55,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(56,"\n")),2&e){const e=s.ɵɵreference(5);s.ɵɵadvance(4),s.ɵɵproperty("appApiAction",t.formPromise),s.ɵɵadvance(6),s.ɵɵtextInterpolate2("\n ",s.ɵɵpipeBind1(11,11,"editPolicy")," - ",s.ɵɵpipeBind1(12,13,t.policy.name),"\n "),s.ɵɵadvance(4),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(15,15,"close")),s.ɵɵadvance(10),s.ɵɵproperty("ngIf",t.loading),s.ɵɵadvance(2),s.ɵɵproperty("hidden",t.loading),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(30,17,t.policy.description)),s.ɵɵadvance(10),s.ɵɵproperty("disabled",e.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(42,19,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(46,21,"save")),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(51,23,"cancel"),"\n ")}},directives:[u.NgControlStatusGroup,u.NgForm,m.ApiActionDirective,h.A11yTitleDirective,v.NgIf],pipes:[f.I18nPipe],encapsulation:2})},34236:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ResetPasswordComponent=void 0;const r=n(32621),o=(n(91674),n(85714),n(51554),n(36631),n(84275),n(73828),n(62166),n(22205)),a=n(69731),s=n(32593),l=n(32621),c=n(91674),d=n(51554),p=n(73828),u=n(84275),m=n(62166),h=n(85714),v=n(36631),f=n(96832),g=n(56820),y=n(57490),x=n(8863),S=n(51626),b=n(1142),w=n(45728),C=n(48198),I=n(40946),E=n(99729);function P(e,t){if(1&e&&(l.ɵɵelementStart(0,"small",30),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext();l.ɵɵadvance(1),l.ɵɵtextInterpolate(e.name)}}function O(e,t){if(1&e&&(l.ɵɵelementStart(0,"app-callout",31),l.ɵɵpipe(1,"i18n"),l.ɵɵtext(2,"\n "),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext();l.ɵɵpropertyInterpolate("enforcedPolicyMessage",l.ɵɵpipeBind1(1,2,"resetPasswordMasterPasswordPolicyInEffect")),l.ɵɵproperty("enforcedPolicyOptions",e.enforcedPolicyOptions)}}const k=function(e,t){return{"bwi-eye":e,"bwi-eye-slash":t}};class A{constructor(e,t,n,i,o,a,s){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.passwordGenerationService=i,this.policyService=o,this.cryptoService=a,this.logService=s,this.onPasswordReset=new r.EventEmitter,this.newPassword=null,this.showPassword=!1}ngOnInit(){return i(this,void 0,void 0,(function*(){this.enforcedPolicyOptions=yield this.policyService.getMasterPasswordPolicyOptions()}))}get loggedOutWarningName(){return null!=this.name?this.name:this.i18nService.t("thisUser")}generatePassword(){return i(this,void 0,void 0,(function*(){const e=(yield this.passwordGenerationService.getOptions())[0];this.newPassword=yield this.passwordGenerationService.generatePassword(e),this.updatePasswordStrength()}))}togglePassword(){this.showPassword=!this.showPassword,document.getElementById("newPassword").focus()}copy(e){null!=e&&(this.platformUtilsService.copyToClipboard(e,{window}),this.platformUtilsService.showToast("info",null,this.i18nService.t("valueCopied",this.i18nService.t("password"))))}submit(){return i(this,void 0,void 0,(function*(){if(null==this.newPassword||""===this.newPassword)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassRequired")),!1;if(this.newPassword.length<8)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassLength")),!1;if(null==this.enforcedPolicyOptions||this.policyService.evaluateMasterPassword(this.masterPasswordScore,this.newPassword,this.enforcedPolicyOptions)){if(this.masterPasswordScore<3){if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("weakMasterPasswordDesc"),this.i18nService.t("weakMasterPassword"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1}try{this.formPromise=this.apiService.getOrganizationUserResetPasswordDetails(this.organizationId,this.id).then((e=>i(this,void 0,void 0,(function*(){if(null==e)throw new Error(this.i18nService.t("resetPasswordDetailsError"));const t=e.kdf,n=e.kdfIterations,i=e.resetPasswordKey,r=e.encryptedPrivateKey,l=yield this.cryptoService.getOrgKey(this.organizationId),c=yield this.cryptoService.decryptToBytes(new o.EncString(r),l),d=yield this.cryptoService.rsaDecrypt(i,c),p=new a.SymmetricCryptoKey(d),u=yield this.cryptoService.makeKey(this.newPassword,this.email.trim().toLowerCase(),t,n),m=yield this.cryptoService.hashPassword(this.newPassword,u),h=yield this.cryptoService.remakeEncKey(u,p),v=new s.OrganizationUserResetPasswordRequest;return v.key=h[1].encryptedString,v.newMasterPasswordHash=m,this.apiService.putOrganizationUserResetPassword(this.organizationId,this.id,v)})))),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("resetPasswordSuccess")),this.onPasswordReset.emit()}catch(e){this.logService.error(e)}}else this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPasswordPolicyRequirementsNotMet"))}))}updatePasswordStrength(){null!=this.newPasswordStrengthTimeout&&clearTimeout(this.newPasswordStrengthTimeout),this.newPasswordStrengthTimeout=setTimeout((()=>{const e=this.passwordGenerationService.passwordStrength(this.newPassword,this.getPasswordStrengthUserInput());this.masterPasswordScore=null==e?null:e.score}),300)}getPasswordStrengthUserInput(){let e=[];const t=this.email.indexOf("@");return t>-1&&(e=e.concat(this.email.substr(0,t).trim().toLowerCase().split(/[^A-Za-z0-9]/))),null!=this.name&&""!==this.name&&(e=e.concat(this.name.trim().toLowerCase().split(" "))),e}}t.ResetPasswordComponent=A,A.ɵfac=function(e){return new(e||A)(l.ɵɵdirectiveInject(c.ApiService),l.ɵɵdirectiveInject(d.I18nService),l.ɵɵdirectiveInject(p.PlatformUtilsService),l.ɵɵdirectiveInject(u.PasswordGenerationService),l.ɵɵdirectiveInject(m.PolicyService),l.ɵɵdirectiveInject(h.CryptoService),l.ɵɵdirectiveInject(v.LogService))},A.ɵcmp=l.ɵɵdefineComponent({type:A,selectors:[["app-reset-password"]],inputs:{name:"name",email:"email",id:"id",organizationId:"organizationId"},outputs:{onPasswordReset:"onPasswordReset"},decls:97,vars:43,consts:[["role","dialog","aria-modal","true","aria-labelledby","resetPasswordTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],[1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","resetPasswordTitle",1,"modal-title"],["class","text-muted",4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["type","warning"],["type","info",3,"enforcedPolicyOptions","enforcedPolicyMessage",4,"ngIf"],[1,"row"],[1,"col","form-group"],[1,"d-flex"],["for","newPassword"],[1,"ml-auto","d-flex"],["href","#","appStopClick","",1,"d-block","mr-2","bwi-icon-above-input",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-fw","bwi-refresh"],[1,"input-group","mb-1"],["id","newPassword","appAutofocus","","name","NewPassword","required","","appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"type","ngModel","ngModelChange","input"],[1,"input-group-append"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-lg",3,"ngClass"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-clone"],[3,"score","showText"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"text-muted"],["type","info",3,"enforcedPolicyOptions","enforcedPolicyMessage"]],template:function(e,t){if(1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"form",2,3),l.ɵɵlistener("ngSubmit",(function(){return t.submit()})),l.ɵɵtext(6,"\n "),l.ɵɵelementStart(7,"div",4),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"h2",5),l.ɵɵtext(10),l.ɵɵpipe(11,"i18n"),l.ɵɵtemplate(12,P,2,1,"small",6),l.ɵɵtext(13,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(14,"\n "),l.ɵɵelementStart(15,"button",7),l.ɵɵpipe(16,"i18n"),l.ɵɵtext(17,"\n "),l.ɵɵelementStart(18,"span",8),l.ɵɵtext(19,"×"),l.ɵɵelementEnd(),l.ɵɵtext(20,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(21,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(22,"\n "),l.ɵɵelementStart(23,"div",9),l.ɵɵtext(24,"\n "),l.ɵɵelementStart(25,"app-callout",10),l.ɵɵtext(26),l.ɵɵpipe(27,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(28,"\n "),l.ɵɵtemplate(29,O,3,4,"app-callout",11),l.ɵɵtext(30,"\n "),l.ɵɵelementStart(31,"div",12),l.ɵɵtext(32,"\n "),l.ɵɵelementStart(33,"div",13),l.ɵɵtext(34,"\n "),l.ɵɵelementStart(35,"div",14),l.ɵɵtext(36,"\n "),l.ɵɵelementStart(37,"label",15),l.ɵɵtext(38),l.ɵɵpipe(39,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(40,"\n "),l.ɵɵelementStart(41,"div",16),l.ɵɵtext(42,"\n "),l.ɵɵelementStart(43,"a",17),l.ɵɵlistener("click",(function(){return t.generatePassword()})),l.ɵɵpipe(44,"i18n"),l.ɵɵtext(45,"\n "),l.ɵɵelement(46,"i",18),l.ɵɵtext(47,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(48,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(49,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(50,"\n "),l.ɵɵelementStart(51,"div",19),l.ɵɵtext(52,"\n "),l.ɵɵelementStart(53,"input",20),l.ɵɵlistener("ngModelChange",(function(e){return t.newPassword=e}))("input",(function(){return t.updatePasswordStrength()})),l.ɵɵelementEnd(),l.ɵɵtext(54,"\n "),l.ɵɵelementStart(55,"div",21),l.ɵɵtext(56,"\n "),l.ɵɵelementStart(57,"button",22),l.ɵɵlistener("click",(function(){return t.togglePassword()})),l.ɵɵpipe(58,"i18n"),l.ɵɵtext(59,"\n "),l.ɵɵelement(60,"i",23),l.ɵɵtext(61,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(62,"\n "),l.ɵɵelementStart(63,"button",22),l.ɵɵlistener("click",(function(){return t.copy(t.newPassword)})),l.ɵɵpipe(64,"i18n"),l.ɵɵtext(65,"\n "),l.ɵɵelement(66,"i",24),l.ɵɵtext(67,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(68,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(69,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(70,"\n "),l.ɵɵelementStart(71,"app-password-strength",25),l.ɵɵtext(72,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(73,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(74,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(75,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(76,"\n "),l.ɵɵelementStart(77,"div",26),l.ɵɵtext(78,"\n "),l.ɵɵelementStart(79,"button",27),l.ɵɵtext(80,"\n "),l.ɵɵelement(81,"i",28),l.ɵɵpipe(82,"i18n"),l.ɵɵtext(83,"\n "),l.ɵɵelementStart(84,"span"),l.ɵɵtext(85),l.ɵɵpipe(86,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(87,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(88,"\n "),l.ɵɵelementStart(89,"button",29),l.ɵɵtext(90),l.ɵɵpipe(91,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(92,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(93,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(94,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(95,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(96,"\n")),2&e){const e=l.ɵɵreference(5);l.ɵɵadvance(4),l.ɵɵproperty("appApiAction",t.formPromise),l.ɵɵadvance(6),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(11,19,"resetPassword"),"\n "),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.name),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(16,21,"close")),l.ɵɵadvance(11),l.ɵɵtextInterpolate1("",l.ɵɵpipeBind2(27,23,"resetPasswordLoggedOutWarning",t.loggedOutWarningName),"\n "),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",t.enforcedPolicyOptions),l.ɵɵadvance(9),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(39,26,"newPassword")),l.ɵɵadvance(5),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(44,28,"generatePassword")),l.ɵɵadvance(10),l.ɵɵpropertyInterpolate("type",t.showPassword?"text":"password"),l.ɵɵproperty("ngModel",t.newPassword),l.ɵɵadvance(4),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(58,30,"toggleVisibility")),l.ɵɵadvance(3),l.ɵɵproperty("ngClass",l.ɵɵpureFunction2(40,k,!t.showPassword,t.showPassword)),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(64,32,"copyPassword")),l.ɵɵadvance(8),l.ɵɵproperty("score",t.masterPasswordScore)("showText",!0),l.ɵɵadvance(8),l.ɵɵproperty("disabled",e.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(82,34,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(86,36,"save")),l.ɵɵadvance(5),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(91,38,"cancel"),"\n ")}},directives:[f.ɵNgNoValidate,f.NgControlStatusGroup,f.NgForm,g.ApiActionDirective,y.NgIf,x.A11yTitleDirective,S.CalloutComponent,b.StopClickDirective,f.DefaultValueAccessor,w.AutofocusDirective,f.RequiredValidator,C.InputVerbatimDirective,f.NgControlStatus,f.NgModel,y.NgClass,I.PasswordStrengthComponent],pipes:[E.I18nPipe],encapsulation:2})},28546:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UserAddEditComponent=void 0;const r=n(32621),o=(n(91674),n(3174),n(51554),n(36631),n(73828),n(33712)),a=n(96926),s=n(34917),l=n(65642),c=n(3714),d=n(57981),p=n(11342),u=n(32621),m=n(91674),h=n(51554),v=n(3174),f=n(73828),g=n(36631),y=n(96832),x=n(56820),S=n(57490),b=n(8863),w=n(64713),C=n(39159),I=n(99729);function E(e,t){if(1&e&&(u.ɵɵelementStart(0,"small",16),u.ɵɵtext(1),u.ɵɵelementEnd()),2&e){const e=u.ɵɵnextContext();u.ɵɵadvance(1),u.ɵɵtextInterpolate(e.name)}}function P(e,t){1&e&&(u.ɵɵelementStart(0,"div",17),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",18),u.ɵɵpipe(3,"i18n"),u.ɵɵtext(4,"\n "),u.ɵɵelementStart(5,"span",19),u.ɵɵtext(6),u.ɵɵpipe(7,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(8,"\n "),u.ɵɵelementEnd()),2&e&&(u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(3,2,"loading")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(7,4,"loading")))}function O(e,t){if(1&e){const e=u.ɵɵgetCurrentView();u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"p"),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(5,"\n "),u.ɵɵelementStart(6,"div",44),u.ɵɵtext(7,"\n "),u.ɵɵelementStart(8,"label",45),u.ɵɵtext(9),u.ɵɵpipe(10,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(11,"\n "),u.ɵɵelementStart(12,"input",46),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext(2).emails=t})),u.ɵɵelementEnd(),u.ɵɵtext(13,"\n "),u.ɵɵelementStart(14,"small",16),u.ɵɵtext(15),u.ɵɵpipe(16,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(17,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(18,"\n "),u.ɵɵelementContainerEnd()}if(2&e){const e=u.ɵɵnextContext(2);u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(4,4,"inviteUserDesc")),u.ɵɵadvance(6),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(10,6,"email")),u.ɵɵadvance(3),u.ɵɵproperty("ngModel",e.emails),u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind2(16,8,"inviteMultipleEmailDesc","20"))}}function k(e,t){if(1&e){const e=u.ɵɵgetCurrentView();u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"h3",34),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(5,"\n "),u.ɵɵelementStart(6,"div",47),u.ɵɵtext(7,"\n "),u.ɵɵelementStart(8,"div",48),u.ɵɵtext(9,"\n "),u.ɵɵelementStart(10,"div",35),u.ɵɵtext(11,"\n "),u.ɵɵelementStart(12,"label",49),u.ɵɵtext(13,"Manager Permissions"),u.ɵɵelementEnd(),u.ɵɵtext(14,"\n "),u.ɵɵelement(15,"hr",50),u.ɵɵtext(16,"\n "),u.ɵɵelementStart(17,"app-nested-checkbox",51),u.ɵɵtext(18,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(19,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(20,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(21,"\n "),u.ɵɵelementStart(22,"div",48),u.ɵɵtext(23,"\n "),u.ɵɵelementStart(24,"div",35),u.ɵɵtext(25,"\n "),u.ɵɵelementStart(26,"label",49),u.ɵɵtext(27,"Admin Permissions"),u.ɵɵelementEnd(),u.ɵɵtext(28,"\n "),u.ɵɵelement(29,"hr",50),u.ɵɵtext(30,"\n "),u.ɵɵelementStart(31,"div",52),u.ɵɵtext(32,"\n "),u.ɵɵelementStart(33,"div",53),u.ɵɵtext(34,"\n "),u.ɵɵelementStart(35,"input",54),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext(2).permissions.accessEventLogs=t})),u.ɵɵelementEnd(),u.ɵɵtext(36,"\n "),u.ɵɵelementStart(37,"label",55),u.ɵɵtext(38),u.ɵɵpipe(39,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(40,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(41,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(42,"\n "),u.ɵɵelementStart(43,"div",52),u.ɵɵtext(44,"\n "),u.ɵɵelementStart(45,"div",53),u.ɵɵtext(46,"\n "),u.ɵɵelementStart(47,"input",56),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext(2).permissions.accessImportExport=t})),u.ɵɵelementEnd(),u.ɵɵtext(48,"\n "),u.ɵɵelementStart(49,"label",57),u.ɵɵtext(50),u.ɵɵpipe(51,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(52,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(53,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(54,"\n "),u.ɵɵelementStart(55,"div",52),u.ɵɵtext(56,"\n "),u.ɵɵelementStart(57,"div",53),u.ɵɵtext(58,"\n "),u.ɵɵelementStart(59,"input",58),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext(2).permissions.accessReports=t})),u.ɵɵelementEnd(),u.ɵɵtext(60,"\n "),u.ɵɵelementStart(61,"label",59),u.ɵɵtext(62),u.ɵɵpipe(63,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(64,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(65,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(66,"\n "),u.ɵɵelementStart(67,"app-nested-checkbox",60),u.ɵɵtext(68,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(69,"\n "),u.ɵɵelementStart(70,"div",52),u.ɵɵtext(71,"\n "),u.ɵɵelementStart(72,"div",53),u.ɵɵtext(73,"\n "),u.ɵɵelementStart(74,"input",61),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext(2).permissions.manageGroups=t})),u.ɵɵelementEnd(),u.ɵɵtext(75,"\n "),u.ɵɵelementStart(76,"label",62),u.ɵɵtext(77),u.ɵɵpipe(78,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(79,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(80,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(81,"\n "),u.ɵɵelementStart(82,"div",52),u.ɵɵtext(83,"\n "),u.ɵɵelementStart(84,"div",53),u.ɵɵtext(85,"\n "),u.ɵɵelementStart(86,"input",63),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext(2).permissions.manageSso=t})),u.ɵɵelementEnd(),u.ɵɵtext(87,"\n "),u.ɵɵelementStart(88,"label",64),u.ɵɵtext(89),u.ɵɵpipe(90,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(91,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(92,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(93,"\n "),u.ɵɵelementStart(94,"div",52),u.ɵɵtext(95,"\n "),u.ɵɵelementStart(96,"div",53),u.ɵɵtext(97,"\n "),u.ɵɵelementStart(98,"input",65),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext(2).permissions.managePolicies=t})),u.ɵɵelementEnd(),u.ɵɵtext(99,"\n "),u.ɵɵelementStart(100,"label",66),u.ɵɵtext(101),u.ɵɵpipe(102,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(103,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(104,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(105,"\n "),u.ɵɵelementStart(106,"div",52),u.ɵɵtext(107,"\n "),u.ɵɵelementStart(108,"div",53),u.ɵɵtext(109,"\n "),u.ɵɵelementStart(110,"input",67),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext(2).permissions.manageUsers=t}))("change",(function(){u.ɵɵrestoreView(e);return u.ɵɵnextContext(2).handleDependentPermissions()})),u.ɵɵelementEnd(),u.ɵɵtext(111,"\n "),u.ɵɵelementStart(112,"label",68),u.ɵɵtext(113),u.ɵɵpipe(114,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(115,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(116,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(117,"\n "),u.ɵɵelementStart(118,"div",52),u.ɵɵtext(119,"\n "),u.ɵɵelementStart(120,"div",53),u.ɵɵtext(121,"\n "),u.ɵɵelementStart(122,"input",69),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext(2).permissions.manageResetPassword=t}))("change",(function(){u.ɵɵrestoreView(e);return u.ɵɵnextContext(2).handleDependentPermissions()})),u.ɵɵelementEnd(),u.ɵɵtext(123,"\n "),u.ɵɵelementStart(124,"label",70),u.ɵɵtext(125),u.ɵɵpipe(126,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(127,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(128,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(129,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(130,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(131,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(132,"\n "),u.ɵɵelementContainerEnd()}if(2&e){const e=u.ɵɵnextContext(2);u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(4,19,"permissions"),"\n "),u.ɵɵadvance(14),u.ɵɵproperty("checkboxes",e.manageAssignedCollectionsCheckboxes),u.ɵɵadvance(18),u.ɵɵproperty("ngModel",e.permissions.accessEventLogs),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(39,21,"accessEventLogs"),"\n "),u.ɵɵadvance(9),u.ɵɵproperty("ngModel",e.permissions.accessImportExport),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(51,23,"accessImportExport"),"\n "),u.ɵɵadvance(9),u.ɵɵproperty("ngModel",e.permissions.accessReports),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(63,25,"accessReports"),"\n "),u.ɵɵadvance(5),u.ɵɵproperty("checkboxes",e.manageAllCollectionsCheckboxes),u.ɵɵadvance(7),u.ɵɵproperty("ngModel",e.permissions.manageGroups),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(78,27,"manageGroups"),"\n "),u.ɵɵadvance(9),u.ɵɵproperty("ngModel",e.permissions.manageSso),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(90,29,"manageSso"),"\n "),u.ɵɵadvance(9),u.ɵɵproperty("ngModel",e.permissions.managePolicies),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(102,31,"managePolicies"),"\n "),u.ɵɵadvance(9),u.ɵɵproperty("ngModel",e.permissions.manageUsers),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(114,33,"manageUsers"),"\n "),u.ɵɵadvance(9),u.ɵɵproperty("ngModel",e.permissions.manageResetPassword),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(126,35,"manageResetPassword"),"\n ")}}function A(e,t){if(1&e){const e=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"div",14),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"button",71),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(e);return u.ɵɵnextContext(2).selectAll(!0)})),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(5,"\n "),u.ɵɵelementStart(6,"button",71),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(e);return u.ɵɵnextContext(2).selectAll(!1)})),u.ɵɵtext(7),u.ɵɵpipe(8,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(9,"\n "),u.ɵɵelementEnd()}2&e&&(u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(4,2,"selectAll"),"\n "),u.ɵɵadvance(4),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(8,4,"unselectAll"),"\n "))}function T(e,t){1&e&&(u.ɵɵelementStart(0,"div"),u.ɵɵtext(1),u.ɵɵpipe(2,"i18n"),u.ɵɵelementEnd()),2&e&&(u.ɵɵadvance(1),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(2,1,"noCollectionsInList"),"\n "))}function M(e,t){if(1&e){const e=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"tr"),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"td",76),u.ɵɵlistener("click",(function(){const t=u.ɵɵrestoreView(e).$implicit;return u.ɵɵnextContext(4).check(t)})),u.ɵɵtext(3,"\n "),u.ɵɵelementStart(4,"input",77),u.ɵɵlistener("ngModelChange",(function(t){return u.ɵɵrestoreView(e).$implicit.checked=t})),u.ɵɵelementEnd(),u.ɵɵtext(5,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(6,"\n "),u.ɵɵelementStart(7,"td",78),u.ɵɵlistener("click",(function(){const t=u.ɵɵrestoreView(e).$implicit;return u.ɵɵnextContext(4).check(t)})),u.ɵɵtext(8),u.ɵɵelementEnd(),u.ɵɵtext(9,"\n "),u.ɵɵelementStart(10,"td",79),u.ɵɵtext(11,"\n "),u.ɵɵelementStart(12,"input",80),u.ɵɵlistener("ngModelChange",(function(t){return u.ɵɵrestoreView(e).$implicit.hidePasswords=t})),u.ɵɵelementEnd(),u.ɵɵtext(13,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(14,"\n "),u.ɵɵelementStart(15,"td",79),u.ɵɵtext(16,"\n "),u.ɵɵelementStart(17,"input",80),u.ɵɵlistener("ngModelChange",(function(t){return u.ɵɵrestoreView(e).$implicit.readOnly=t})),u.ɵɵelementEnd(),u.ɵɵtext(18,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(19,"\n "),u.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=t.index;u.ɵɵadvance(4),u.ɵɵpropertyInterpolate1("name","Collection[",n,"].Checked"),u.ɵɵproperty("ngModel",e.checked),u.ɵɵadvance(4),u.ɵɵtextInterpolate1("\n ",e.name,"\n "),u.ɵɵadvance(4),u.ɵɵpropertyInterpolate1("name","Collection[",n,"].HidePasswords"),u.ɵɵproperty("ngModel",e.hidePasswords)("disabled",!e.checked),u.ɵɵadvance(5),u.ɵɵpropertyInterpolate1("name","Collection[",n,"].ReadOnly"),u.ɵɵproperty("ngModel",e.readOnly)("disabled",!e.checked)}}function B(e,t){if(1&e&&(u.ɵɵelementStart(0,"table",73),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"thead"),u.ɵɵtext(3,"\n "),u.ɵɵelementStart(4,"tr"),u.ɵɵtext(5,"\n "),u.ɵɵelementStart(6,"th"),u.ɵɵtext(7," "),u.ɵɵelementEnd(),u.ɵɵtext(8,"\n "),u.ɵɵelementStart(9,"th"),u.ɵɵtext(10),u.ɵɵpipe(11,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(12,"\n "),u.ɵɵelementStart(13,"th",74),u.ɵɵtext(14),u.ɵɵpipe(15,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(16,"\n "),u.ɵɵelementStart(17,"th",74),u.ɵɵtext(18),u.ɵɵpipe(19,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(20,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(21,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(22,"\n "),u.ɵɵelementStart(23,"tbody"),u.ɵɵtext(24,"\n "),u.ɵɵtemplate(25,M,20,9,"tr",75),u.ɵɵtext(26,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(27,"\n "),u.ɵɵelementEnd()),2&e){const e=u.ɵɵnextContext(3);u.ɵɵadvance(10),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(11,4,"name")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(15,6,"hidePasswords")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(19,8,"readOnly")),u.ɵɵadvance(7),u.ɵɵproperty("ngForOf",e.collections)}}function D(e,t){if(1&e&&(u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵtemplate(2,T,3,3,"div",20),u.ɵɵtext(3,"\n "),u.ɵɵtemplate(4,B,28,10,"table",72),u.ɵɵtext(5,"\n "),u.ɵɵelementContainerEnd()),2&e){const e=u.ɵɵnextContext(2);u.ɵɵadvance(2),u.ɵɵproperty("ngIf",!e.collections||!e.collections.length),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",e.collections&&e.collections.length)}}const R=function(e){return{"mb-0":e}};function F(e,t){if(1&e){const e=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"div",17),u.ɵɵtext(1,"\n "),u.ɵɵtemplate(2,O,19,11,"ng-container",20),u.ɵɵtext(3,"\n "),u.ɵɵelementStart(4,"h3"),u.ɵɵtext(5),u.ɵɵpipe(6,"i18n"),u.ɵɵelementStart(7,"a",21),u.ɵɵpipe(8,"i18n"),u.ɵɵtext(9,"\n "),u.ɵɵelement(10,"i",22),u.ɵɵtext(11,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(12,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(13,"\n "),u.ɵɵelementStart(14,"div",23),u.ɵɵtext(15,"\n "),u.ɵɵelementStart(16,"input",24),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext().type=t})),u.ɵɵelementEnd(),u.ɵɵtext(17,"\n "),u.ɵɵelementStart(18,"label",25),u.ɵɵtext(19),u.ɵɵpipe(20,"i18n"),u.ɵɵelementStart(21,"small"),u.ɵɵtext(22),u.ɵɵpipe(23,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(24,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(25,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(26,"\n "),u.ɵɵelementStart(27,"div",23),u.ɵɵtext(28,"\n "),u.ɵɵelementStart(29,"input",26),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext().type=t})),u.ɵɵelementEnd(),u.ɵɵtext(30,"\n "),u.ɵɵelementStart(31,"label",27),u.ɵɵtext(32),u.ɵɵpipe(33,"i18n"),u.ɵɵelementStart(34,"small"),u.ɵɵtext(35),u.ɵɵpipe(36,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(37,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(38,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(39,"\n "),u.ɵɵelementStart(40,"div",23),u.ɵɵtext(41,"\n "),u.ɵɵelementStart(42,"input",28),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext().type=t})),u.ɵɵelementEnd(),u.ɵɵtext(43,"\n "),u.ɵɵelementStart(44,"label",29),u.ɵɵtext(45),u.ɵɵpipe(46,"i18n"),u.ɵɵelementStart(47,"small"),u.ɵɵtext(48),u.ɵɵpipe(49,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(50,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(51,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(52,"\n "),u.ɵɵelementStart(53,"div",23),u.ɵɵtext(54,"\n "),u.ɵɵelementStart(55,"input",30),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext().type=t})),u.ɵɵelementEnd(),u.ɵɵtext(56,"\n "),u.ɵɵelementStart(57,"label",31),u.ɵɵtext(58),u.ɵɵpipe(59,"i18n"),u.ɵɵelementStart(60,"small"),u.ɵɵtext(61),u.ɵɵpipe(62,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(63,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(64,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(65,"\n "),u.ɵɵelementStart(66,"div",23),u.ɵɵtext(67,"\n "),u.ɵɵelementStart(68,"input",32),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext().type=t})),u.ɵɵelementEnd(),u.ɵɵtext(69,"\n "),u.ɵɵelementStart(70,"label",33),u.ɵɵtext(71),u.ɵɵpipe(72,"i18n"),u.ɵɵelementStart(73,"small"),u.ɵɵtext(74),u.ɵɵpipe(75,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(76,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(77,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(78,"\n "),u.ɵɵtemplate(79,k,133,37,"ng-container",20),u.ɵɵtext(80,"\n "),u.ɵɵelementStart(81,"h3",34),u.ɵɵtext(82,"\n "),u.ɵɵelementStart(83,"div",35),u.ɵɵtext(84),u.ɵɵpipe(85,"i18n"),u.ɵɵelementStart(86,"a",36),u.ɵɵpipe(87,"i18n"),u.ɵɵtext(88,"\n "),u.ɵɵelement(89,"i",22),u.ɵɵtext(90,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(91,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(92,"\n "),u.ɵɵtemplate(93,A,10,6,"div",37),u.ɵɵtext(94,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(95,"\n "),u.ɵɵelementStart(96,"div",38),u.ɵɵtext(97,"\n "),u.ɵɵelementStart(98,"div",39),u.ɵɵtext(99,"\n "),u.ɵɵelementStart(100,"input",40),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext().access=t})),u.ɵɵelementEnd(),u.ɵɵtext(101,"\n "),u.ɵɵelementStart(102,"label",41),u.ɵɵtext(103),u.ɵɵpipe(104,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(105,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(106,"\n "),u.ɵɵelementStart(107,"div",39),u.ɵɵtext(108,"\n "),u.ɵɵelementStart(109,"input",42),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext().access=t})),u.ɵɵelementEnd(),u.ɵɵtext(110,"\n "),u.ɵɵelementStart(111,"label",43),u.ɵɵtext(112),u.ɵɵpipe(113,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(114,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(115,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(116,"\n "),u.ɵɵtemplate(117,D,6,2,"ng-container",20),u.ɵɵtext(118,"\n "),u.ɵɵelementEnd()}if(2&e){const e=u.ɵɵnextContext();u.ɵɵadvance(2),u.ɵɵproperty("ngIf",!e.editMode),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(6,33,"userType"),"\n "),u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("appA11yTitle",u.ɵɵpipeBind1(8,35,"learnMore")),u.ɵɵadvance(9),u.ɵɵproperty("value",e.organizationUserType.User)("ngModel",e.type),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(20,37,"user"),"\n "),u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(23,39,"userDesc")),u.ɵɵadvance(7),u.ɵɵproperty("value",e.organizationUserType.Manager)("ngModel",e.type),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(33,41,"manager"),"\n "),u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(36,43,"managerDesc")),u.ɵɵadvance(7),u.ɵɵproperty("value",e.organizationUserType.Admin)("ngModel",e.type),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(46,45,"admin"),"\n "),u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(49,47,"adminDesc")),u.ɵɵadvance(7),u.ɵɵproperty("value",e.organizationUserType.Owner)("ngModel",e.type),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(59,49,"owner"),"\n "),u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(62,51,"ownerDesc")),u.ɵɵadvance(7),u.ɵɵproperty("value",e.organizationUserType.Custom)("ngModel",e.type),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(72,53,"custom"),"\n "),u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(75,55,"customDesc")),u.ɵɵadvance(5),u.ɵɵproperty("ngIf",e.customUserTypeSelected),u.ɵɵadvance(5),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(85,57,"accessControl"),"\n "),u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("appA11yTitle",u.ɵɵpipeBind1(87,59,"learnMore")),u.ɵɵadvance(7),u.ɵɵproperty("ngIf","selected"===e.access&&e.collections&&e.collections.length),u.ɵɵadvance(3),u.ɵɵproperty("ngClass",u.ɵɵpureFunction1(65,R,"selected"!==e.access)),u.ɵɵadvance(4),u.ɵɵproperty("ngModel",e.access),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(104,61,"userAccessAllItems"),"\n "),u.ɵɵadvance(6),u.ɵɵproperty("ngModel",e.access),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(113,63,"userAccessSelectedCollections"),"\n "),u.ɵɵadvance(5),u.ɵɵproperty("ngIf","selected"===e.access)}}function U(e,t){if(1&e){const e=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"button",81,82),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(e);return u.ɵɵnextContext().delete()})),u.ɵɵpipe(2,"i18n"),u.ɵɵtext(3,"\n "),u.ɵɵelement(4,"i",83),u.ɵɵtext(5,"\n "),u.ɵɵelement(6,"i",84),u.ɵɵpipe(7,"i18n"),u.ɵɵtext(8,"\n "),u.ɵɵelementEnd()}if(2&e){const e=u.ɵɵreference(1),t=u.ɵɵnextContext();u.ɵɵpropertyInterpolate("appA11yTitle",u.ɵɵpipeBind1(2,6,"delete")),u.ɵɵproperty("disabled",e.loading)("appApiAction",t.deletePromise),u.ɵɵadvance(4),u.ɵɵproperty("hidden",e.loading),u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(7,8,"loading")),u.ɵɵproperty("hidden",!e.loading)}}class V{constructor(e,t,n,i,s){this.apiService=e,this.i18nService=t,this.collectionService=n,this.platformUtilsService=i,this.logService=s,this.usesKeyConnector=!1,this.onSavedUser=new r.EventEmitter,this.onDeletedUser=new r.EventEmitter,this.loading=!0,this.editMode=!1,this.type=o.OrganizationUserType.User,this.permissions=new a.PermissionsApi,this.showCustom=!1,this.access="selected",this.collections=[],this.organizationUserType=o.OrganizationUserType,this.manageAllCollectionsCheckboxes=[{id:"createNewCollections",get:()=>this.permissions.createNewCollections,set:e=>this.permissions.createNewCollections=e},{id:"editAnyCollection",get:()=>this.permissions.editAnyCollection,set:e=>this.permissions.editAnyCollection=e},{id:"deleteAnyCollection",get:()=>this.permissions.deleteAnyCollection,set:e=>this.permissions.deleteAnyCollection=e}],this.manageAssignedCollectionsCheckboxes=[{id:"editAssignedCollections",get:()=>this.permissions.editAssignedCollections,set:e=>this.permissions.editAssignedCollections=e},{id:"deleteAssignedCollections",get:()=>this.permissions.deleteAssignedCollections,set:e=>this.permissions.deleteAssignedCollections=e}]}get customUserTypeSelected(){return this.type===o.OrganizationUserType.Custom}ngOnInit(){return i(this,void 0,void 0,(function*(){if(this.editMode=this.loading=null!=this.organizationUserId,yield this.loadCollections(),this.editMode){this.editMode=!0,this.title=this.i18nService.t("editUser");try{const e=yield this.apiService.getOrganizationUser(this.organizationId,this.organizationUserId);this.access=e.accessAll?"all":"selected",this.type=e.type,e.type===o.OrganizationUserType.Custom&&(this.permissions=e.permissions),null!=e.collections&&null!=this.collections&&e.collections.forEach((e=>{const t=this.collections.filter((t=>t.id===e.id));null!=t&&t.length>0&&(t[0].checked=!0,t[0].readOnly=e.readOnly,t[0].hidePasswords=e.hidePasswords)}))}catch(e){this.logService.error(e)}}else this.title=this.i18nService.t("inviteUser");this.loading=!1}))}loadCollections(){return i(this,void 0,void 0,(function*(){const e=(yield this.apiService.getCollections(this.organizationId)).data.map((e=>new l.Collection(new s.CollectionData(e))));this.collections=yield this.collectionService.decryptMany(e)}))}check(e,t){e.checked=null==t?!e.checked:t,e.checked||(e.readOnly=!1)}selectAll(e){this.collections.forEach((t=>this.check(t,e)))}setRequestPermissions(e,t){return Object.assign(e,t?new a.PermissionsApi:this.permissions),e}handleDependentPermissions(){this.permissions.manageResetPassword&&!this.permissions.manageUsers&&(this.permissions.manageUsers=!0,document.getElementById("manageUsers").checked=!0,this.platformUtilsService.showToast("info",null,this.i18nService.t("resetPasswordManageUsers")))}submit(){var e,t;return i(this,void 0,void 0,(function*(){let n=null;"all"!==this.access&&(n=this.collections.filter((e=>e.checked)).map((e=>new p.SelectionReadOnlyRequest(e.id,!!e.readOnly,!!e.hidePasswords))));try{if(this.editMode){const t=new d.OrganizationUserUpdateRequest;t.accessAll="all"===this.access,t.type=this.type,t.collections=n,t.permissions=this.setRequestPermissions(null!==(e=t.permissions)&&void 0!==e?e:new a.PermissionsApi,t.type!==o.OrganizationUserType.Custom),this.formPromise=this.apiService.putOrganizationUser(this.organizationId,this.organizationUserId,t)}else{const e=new c.OrganizationUserInviteRequest;e.emails=this.emails.trim().split(/\s*,\s*/),e.accessAll="all"===this.access,e.type=this.type,e.permissions=this.setRequestPermissions(null!==(t=e.permissions)&&void 0!==t?t:new a.PermissionsApi,e.type!==o.OrganizationUserType.Custom),e.collections=n,this.formPromise=this.apiService.postOrganizationUserInvite(this.organizationId,e)}yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t(this.editMode?"editedUserId":"invitedUsers",this.name)),this.onSavedUser.emit()}catch(i){this.logService.error(i)}}))}delete(){return i(this,void 0,void 0,(function*(){if(!this.editMode)return;const e=this.usesKeyConnector?"removeUserConfirmationKeyConnector":"removeUserConfirmation";if(!(yield this.platformUtilsService.showDialog(this.i18nService.t(e),this.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{this.deletePromise=this.apiService.deleteOrganizationUser(this.organizationId,this.organizationUserId),yield this.deletePromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("removedUserId",this.name)),this.onDeletedUser.emit()}catch(t){this.logService.error(t)}}))}}t.UserAddEditComponent=V,V.ɵfac=function(e){return new(e||V)(u.ɵɵdirectiveInject(m.ApiService),u.ɵɵdirectiveInject(h.I18nService),u.ɵɵdirectiveInject(v.CollectionService),u.ɵɵdirectiveInject(f.PlatformUtilsService),u.ɵɵdirectiveInject(g.LogService))},V.ɵcmp=u.ɵɵdefineComponent({type:V,selectors:[["app-user-add-edit"]],inputs:{name:"name",organizationUserId:"organizationUserId",organizationId:"organizationId",usesKeyConnector:"usesKeyConnector"},outputs:{onSavedUser:"onSavedUser",onDeletedUser:"onDeletedUser"},decls:51,vars:19,consts:[["role","dialog","aria-modal","true","aria-labelledby","userAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","userAddEditTitle",1,"modal-title"],["class","text-muted",4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"ml-auto"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click",4,"ngIf"],[1,"text-muted"],[1,"modal-body"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[4,"ngIf"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/provider-users/",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],[1,"form-check","mt-2","form-check-block"],["type","radio","name","userType","id","userTypeUser",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","userTypeUser",1,"form-check-label"],["type","radio","name","userType","id","userTypeManager",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","userTypeManager",1,"form-check-label"],["type","radio","name","userType","id","userTypeAdmin",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","userTypeAdmin",1,"form-check-label"],["type","radio","name","userType","id","userTypeOwner",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","userTypeOwner",1,"form-check-label"],["type","radio","name","userType","id","userTypeCustom",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","userTypeCustom",1,"form-check-label"],[1,"mt-4","d-flex"],[1,"mb-3"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/user-types-access-control/#access-control",3,"appA11yTitle"],["class","ml-auto",4,"ngIf"],[1,"form-group",3,"ngClass"],[1,"form-check"],["type","radio","name","access","id","accessAll","value","all",1,"form-check-input",3,"ngModel","ngModelChange"],["for","accessAll",1,"form-check-label"],["type","radio","name","access","id","accessSelected","value","selected",1,"form-check-input",3,"ngModel","ngModelChange"],["for","accessSelected",1,"form-check-label"],[1,"form-group","mb-4"],["for","emails"],["id","emails","type","text","name","Emails","required","","appAutoFocus","",1,"form-control",3,"ngModel","ngModelChange"],[1,"row"],[1,"col-6"],[1,"font-weight-bold","mb-0"],[1,"my-0","mr-2"],["parentId","manageAssignedCollections",3,"checkboxes"],[1,"form-group","mb-0"],[1,"form-check","mt-1","form-check-block"],["type","checkbox","name","accessEventLogs","id","accessEventLogs",1,"form-check-input",3,"ngModel","ngModelChange"],["for","accessEventLogs",1,"form-check-label","font-weight-normal"],["type","checkbox","name","accessImportExport","id","accessImportExport",1,"form-check-input",3,"ngModel","ngModelChange"],["for","accessImportExport",1,"form-check-label","font-weight-normal"],["type","checkbox","name","accessReports","id","accessReports",1,"form-check-input",3,"ngModel","ngModelChange"],["for","accessReports",1,"form-check-label","font-weight-normal"],["parentId","manageAllCollections",3,"checkboxes"],["type","checkbox","name","manageGroups","id","manageGroups",1,"form-check-input",3,"ngModel","ngModelChange"],["for","manageGroups",1,"form-check-label","font-weight-normal"],["type","checkbox","name","manageSso","id","managePolicies",1,"form-check-input",3,"ngModel","ngModelChange"],["for","manageSso",1,"form-check-label","font-weight-normal"],["type","checkbox","name","managePolicies","id","managePolicies",1,"form-check-input",3,"ngModel","ngModelChange"],["for","managePolicies",1,"form-check-label","font-weight-normal"],["type","checkbox","name","manageUsers","id","manageUsers",1,"form-check-input",3,"ngModel","ngModelChange","change"],["for","manageUsers",1,"form-check-label","font-weight-normal"],["type","checkbox","name","manageResetPassword","id","manageResetPassword",1,"form-check-input",3,"ngModel","ngModelChange","change"],["for","manageResetPassword",1,"form-check-label","font-weight-normal"],["type","button",1,"btn","btn-link","btn-sm","py-0",3,"click"],["class","table table-hover table-list mb-0",4,"ngIf"],[1,"table","table-hover","table-list","mb-0"],["width","100",1,"text-center"],[4,"ngFor","ngForOf"],[1,"table-list-checkbox",3,"click"],["type","checkbox","appStopProp","",3,"ngModel","name","ngModelChange"],[3,"click"],[1,"text-center"],["type","checkbox",3,"ngModel","name","disabled","ngModelChange"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click"],["deleteBtn",""],["aria-hidden","true",1,"bwi","bwi-trash","bwi-lg","bwi-fw",3,"hidden"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-lg","bwi-fw",3,"hidden","title"]],template:function(e,t){if(1&e&&(u.ɵɵelementStart(0,"div",0),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"div",1),u.ɵɵtext(3,"\n "),u.ɵɵelementStart(4,"form",2,3),u.ɵɵlistener("ngSubmit",(function(){return t.submit()})),u.ɵɵtext(6,"\n "),u.ɵɵelementStart(7,"div",4),u.ɵɵtext(8,"\n "),u.ɵɵelementStart(9,"h2",5),u.ɵɵtext(10),u.ɵɵtemplate(11,E,2,1,"small",6),u.ɵɵtext(12,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(13,"\n "),u.ɵɵelementStart(14,"button",7),u.ɵɵpipe(15,"i18n"),u.ɵɵtext(16,"\n "),u.ɵɵelementStart(17,"span",8),u.ɵɵtext(18,"×"),u.ɵɵelementEnd(),u.ɵɵtext(19,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(20,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(21,"\n "),u.ɵɵtemplate(22,P,9,6,"div",9),u.ɵɵtext(23,"\n "),u.ɵɵtemplate(24,F,119,67,"div",9),u.ɵɵtext(25,"\n "),u.ɵɵelementStart(26,"div",10),u.ɵɵtext(27,"\n "),u.ɵɵelementStart(28,"button",11),u.ɵɵtext(29,"\n "),u.ɵɵelement(30,"i",12),u.ɵɵpipe(31,"i18n"),u.ɵɵtext(32,"\n "),u.ɵɵelementStart(33,"span"),u.ɵɵtext(34),u.ɵɵpipe(35,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(36,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(37,"\n "),u.ɵɵelementStart(38,"button",13),u.ɵɵtext(39),u.ɵɵpipe(40,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(41,"\n "),u.ɵɵelementStart(42,"div",14),u.ɵɵtext(43,"\n "),u.ɵɵtemplate(44,U,9,10,"button",15),u.ɵɵtext(45,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(46,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(47,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(48,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(49,"\n"),u.ɵɵelementEnd(),u.ɵɵtext(50,"\n")),2&e){const e=u.ɵɵreference(5);u.ɵɵadvance(4),u.ɵɵproperty("appApiAction",t.formPromise),u.ɵɵadvance(6),u.ɵɵtextInterpolate1("\n ",t.title,"\n "),u.ɵɵadvance(1),u.ɵɵproperty("ngIf",t.name),u.ɵɵadvance(3),u.ɵɵpropertyInterpolate("appA11yTitle",u.ɵɵpipeBind1(15,11,"close")),u.ɵɵadvance(8),u.ɵɵproperty("ngIf",t.loading),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",!t.loading),u.ɵɵadvance(4),u.ɵɵproperty("disabled",e.loading),u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(31,13,"loading")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(35,15,"save")),u.ɵɵadvance(5),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(40,17,"cancel"),"\n "),u.ɵɵadvance(5),u.ɵɵproperty("ngIf",t.editMode)}},directives:[y.NgControlStatusGroup,y.NgForm,x.ApiActionDirective,S.NgIf,b.A11yTitleDirective,y.RadioControlValueAccessor,y.DefaultValueAccessor,y.NgControlStatus,y.NgModel,S.NgClass,y.RequiredValidator,w.NestedCheckboxComponent,y.CheckboxControlValueAccessor,S.NgForOf,C.StopPropDirective],pipes:[I.I18nPipe],encapsulation:2})},85331:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UserConfirmComponent=void 0;const r=n(32621),o=(n(85714),n(36631),n(73569),n(32621)),a=n(85714),s=n(36631),l=n(73569),c=n(96832),d=n(56820),p=n(57490),u=n(8863),m=n(99729);function h(e,t){if(1&e&&(o.ɵɵelementStart(0,"small",18),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}class v{constructor(e,t,n){this.cryptoService=e,this.logService=t,this.stateService=n,this.onConfirmedUser=new r.EventEmitter,this.dontAskAgain=!1,this.loading=!0}ngOnInit(){return i(this,void 0,void 0,(function*(){try{if(null!=this.publicKey){const e=yield this.cryptoService.getFingerprint(this.userId,this.publicKey.buffer);null!=e&&(this.fingerprint=e.join("-"))}}catch(e){this.logService.error(e)}this.loading=!1}))}submit(){return i(this,void 0,void 0,(function*(){this.loading||(this.dontAskAgain&&(yield this.stateService.setAutoConfirmFingerprints(!0)),this.onConfirmedUser.emit())}))}}t.UserConfirmComponent=v,v.ɵfac=function(e){return new(e||v)(o.ɵɵdirectiveInject(a.CryptoService),o.ɵɵdirectiveInject(s.LogService),o.ɵɵdirectiveInject(l.StateService))},v.ɵcmp=o.ɵɵdefineComponent({type:v,selectors:[["app-user-confirm"]],inputs:{name:"name",userId:"userId",publicKey:"publicKey"},outputs:{onConfirmedUser:"onConfirmedUser"},decls:69,vars:29,consts:[["role","dialog","aria-modal","true","aria-labelledby","confirmUserTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],[1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","confirmUserTitle",1,"modal-title"],["class","text-muted",4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["href","https://bitwarden.com/help/fingerprint-phrase/","target","_blank","rel","noopener"],[1,"form-check"],["type","checkbox","id","dontAskAgain","name","DontAskAgain",1,"form-check-input",3,"ngModel","ngModelChange"],["for","dontAskAgain",1,"form-check-label"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"text-muted"]],template:function(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"form",2,3),o.ɵɵlistener("ngSubmit",(function(){return t.submit()})),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"div",4),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"h2",5),o.ɵɵtext(10),o.ɵɵpipe(11,"i18n"),o.ɵɵtemplate(12,h,2,1,"small",6),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"button",7),o.ɵɵpipe(16,"i18n"),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"span",8),o.ɵɵtext(19,"×"),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(22,"\n "),o.ɵɵelementStart(23,"div",9),o.ɵɵtext(24,"\n "),o.ɵɵelementStart(25,"p"),o.ɵɵtext(26),o.ɵɵpipe(27,"i18n"),o.ɵɵelementStart(28,"a",10),o.ɵɵtext(29),o.ɵɵpipe(30,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(31,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(32,"\n "),o.ɵɵelementStart(33,"p"),o.ɵɵtext(34,"\n "),o.ɵɵelementStart(35,"code"),o.ɵɵtext(36),o.ɵɵelementEnd(),o.ɵɵtext(37,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(38,"\n "),o.ɵɵelementStart(39,"div",11),o.ɵɵtext(40,"\n "),o.ɵɵelementStart(41,"input",12),o.ɵɵlistener("ngModelChange",(function(e){return t.dontAskAgain=e})),o.ɵɵelementEnd(),o.ɵɵtext(42,"\n "),o.ɵɵelementStart(43,"label",13),o.ɵɵtext(44),o.ɵɵpipe(45,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(46,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(47,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(48,"\n "),o.ɵɵelementStart(49,"div",14),o.ɵɵtext(50,"\n "),o.ɵɵelementStart(51,"button",15),o.ɵɵtext(52,"\n "),o.ɵɵelement(53,"i",16),o.ɵɵpipe(54,"i18n"),o.ɵɵtext(55,"\n "),o.ɵɵelementStart(56,"span"),o.ɵɵtext(57),o.ɵɵpipe(58,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(59,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(60,"\n "),o.ɵɵelementStart(61,"button",17),o.ɵɵtext(62),o.ɵɵpipe(63,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(64,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(65,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(66,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(67,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(68,"\n")),2&e){const e=o.ɵɵreference(5);o.ɵɵadvance(4),o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(6),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(11,13,"confirmUser"),"\n "),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.name),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(16,15,"close")),o.ɵɵadvance(11),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(27,17,"fingerprintEnsureIntegrityVerify"),"\n "),o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(30,19,"learnMore"),""),o.ɵɵadvance(7),o.ɵɵtextInterpolate(t.fingerprint),o.ɵɵadvance(5),o.ɵɵproperty("ngModel",t.dontAskAgain),o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(45,21,"dontAskFingerprintAgain"),"\n "),o.ɵɵadvance(7),o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(54,23,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(58,25,"confirm")),o.ɵɵadvance(5),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(63,27,"cancel"),"\n ")}},directives:[c.ɵNgNoValidate,c.NgControlStatusGroup,c.NgForm,d.ApiActionDirective,p.NgIf,u.A11yTitleDirective,c.CheckboxControlValueAccessor,c.NgControlStatus,c.NgModel],pipes:[m.I18nPipe],encapsulation:2})},68535:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UserGroupsComponent=void 0;const r=n(32621),o=(n(91674),n(51554),n(36631),n(73828),n(82769)),a=n(50533),s=n(32621),l=n(91674),c=n(51554),d=n(73828),p=n(36631),u=n(96832),m=n(56820),h=n(57490),v=n(8863),f=n(39159),g=n(99729);function y(e,t){if(1&e&&(s.ɵɵelementStart(0,"small",14),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(1),s.ɵɵtextInterpolate(e.name)}}function x(e,t){1&e&&(s.ɵɵelementStart(0,"div",15),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",16),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",17),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"loading")))}function S(e,t){1&e&&(s.ɵɵelementStart(0,"div"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,1,"noGroupsInList"),"\n "))}function b(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"tr"),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"td",22),s.ɵɵlistener("click",(function(){const t=s.ɵɵrestoreView(e).$implicit;return s.ɵɵnextContext(3).check(t)})),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"input",23),s.ɵɵlistener("ngModelChange",(function(t){return s.ɵɵrestoreView(e).$implicit.checked=t})),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementStart(7,"td",24),s.ɵɵlistener("click",(function(){const t=s.ɵɵrestoreView(e).$implicit;return s.ɵɵnextContext(3).check(t)})),s.ɵɵtext(8),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=t.index;s.ɵɵadvance(4),s.ɵɵpropertyInterpolate1("name","Groups[",n,"].Checked"),s.ɵɵproperty("ngModel",e.checked),s.ɵɵadvance(4),s.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function w(e,t){if(1&e&&(s.ɵɵelementStart(0,"table",20),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"tbody"),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,b,10,3,"tr",21),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(4),s.ɵɵproperty("ngForOf",e.groups)}}function C(e,t){if(1&e&&(s.ɵɵelementStart(0,"div",15),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"p"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵtemplate(6,S,3,3,"div",18),s.ɵɵtext(7,"\n "),s.ɵɵtemplate(8,w,7,1,"table",19),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,3,"groupAccessUserDesc")),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!e.groups||!e.groups.length),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.groups&&e.groups.length)}}class I{constructor(e,t,n,i){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.logService=i,this.onSavedUser=new r.EventEmitter,this.loading=!0,this.groups=[]}ngOnInit(){return i(this,void 0,void 0,(function*(){const e=(yield this.apiService.getGroups(this.organizationId)).data.map((e=>e));e.sort(o.Utils.getSortFunction(this.i18nService,"name")),this.groups=e;try{const e=yield this.apiService.getOrganizationUserGroups(this.organizationId,this.organizationUserId);null!=e&&null!=this.groups&&e.forEach((e=>{const t=this.groups.filter((t=>t.id===e));null!=t&&t.length>0&&(t[0].checked=!0)}))}catch(t){this.logService.error(t)}this.loading=!1}))}check(e,t){e.checked=null==t?!e.checked:t,e.checked||(e.readOnly=!1)}selectAll(e){this.groups.forEach((t=>this.check(t,e)))}submit(){return i(this,void 0,void 0,(function*(){const e=new a.OrganizationUserUpdateGroupsRequest;e.groupIds=this.groups.filter((e=>e.checked)).map((e=>e.id));try{this.formPromise=this.apiService.putOrganizationUserGroups(this.organizationId,this.organizationUserId,e),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("editedGroupsForUser",this.name)),this.onSavedUser.emit()}catch(t){this.logService.error(t)}}))}}t.UserGroupsComponent=I,I.ɵfac=function(e){return new(e||I)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(d.PlatformUtilsService),s.ɵɵdirectiveInject(p.LogService))},I.ɵcmp=s.ɵɵdefineComponent({type:I,selectors:[["app-user-groups"]],inputs:{name:"name",organizationUserId:"organizationUserId",organizationId:"organizationId"},outputs:{onSavedUser:"onSavedUser"},decls:47,vars:20,consts:[["role","dialog","aria-modal","true","aria-labelledby","groupAccessTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],[1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","groupAccessTitle",1,"modal-title"],["class","text-muted",4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"text-muted"],[1,"modal-body"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[4,"ngIf"],["class","table table-hover table-list mb-0",4,"ngIf"],[1,"table","table-hover","table-list","mb-0"],[4,"ngFor","ngForOf"],[1,"table-list-checkbox",3,"click"],["type","checkbox","appStopProp","",3,"ngModel","name","ngModelChange"],[3,"click"]],template:function(e,t){if(1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",1),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"form",2,3),s.ɵɵlistener("ngSubmit",(function(){return t.submit()})),s.ɵɵtext(6,"\n "),s.ɵɵelementStart(7,"div",4),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"h2",5),s.ɵɵtext(10),s.ɵɵpipe(11,"i18n"),s.ɵɵtemplate(12,y,2,1,"small",6),s.ɵɵtext(13,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"button",7),s.ɵɵpipe(16,"i18n"),s.ɵɵtext(17,"\n "),s.ɵɵelementStart(18,"span",8),s.ɵɵtext(19,"×"),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵtemplate(23,x,9,6,"div",9),s.ɵɵtext(24,"\n "),s.ɵɵtemplate(25,C,10,5,"div",9),s.ɵɵtext(26,"\n "),s.ɵɵelementStart(27,"div",10),s.ɵɵtext(28,"\n "),s.ɵɵelementStart(29,"button",11),s.ɵɵtext(30,"\n "),s.ɵɵelement(31,"i",12),s.ɵɵpipe(32,"i18n"),s.ɵɵtext(33,"\n "),s.ɵɵelementStart(34,"span"),s.ɵɵtext(35),s.ɵɵpipe(36,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(37,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(38,"\n "),s.ɵɵelementStart(39,"button",13),s.ɵɵtext(40),s.ɵɵpipe(41,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(42,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(43,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(44,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(45,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(46,"\n")),2&e){const e=s.ɵɵreference(5);s.ɵɵadvance(4),s.ɵɵproperty("appApiAction",t.formPromise),s.ɵɵadvance(6),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(11,10,"groupAccess"),"\n "),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.name),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(16,12,"close")),s.ɵɵadvance(8),s.ɵɵproperty("ngIf",t.loading),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!t.loading),s.ɵɵadvance(4),s.ɵɵproperty("disabled",e.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(32,14,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(36,16,"save")),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(41,18,"cancel"),"\n ")}},directives:[u.ɵNgNoValidate,u.NgControlStatusGroup,u.NgForm,m.ApiActionDirective,h.NgIf,v.A11yTitleDirective,h.NgForOf,u.CheckboxControlValueAccessor,f.StopPropDirective,u.NgControlStatus,u.NgModel],pipes:[g.I18nPipe],encapsulation:2})},64525:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationsRoutingModule=void 0;const r=n(68012),o=n(76299),a=n(47880),s=n(70734),l=n(45231),c=n(26092),d=n(25829),p=n(41204),u=n(2021),m=n(74147),h=n(6029),v=n(13637),f=n(39722),g=n(31627),y=n(2516),x=n(78027),S=n(38359),b=n(79002),w=n(44336),C=n(65347),I=n(86661),E=n(1128),P=n(706),O=n(43850),k=n(57785),A=n(32621),T=(n(68012),[{path:":organizationId",component:l.OrganizationLayoutComponent,canActivate:[o.AuthGuard,s.PermissionsGuard],data:{permissions:v.NavigationPermissionsService.getPermissions("admin")},children:[{path:"",pathMatch:"full",redirectTo:"vault"},{path:"vault",loadChildren:()=>i(void 0,void 0,void 0,(function*(){return(yield Promise.resolve().then((()=>n(32459)))).OrganizationVaultModule}))},{path:"tools",component:P.ToolsComponent,canActivate:[s.PermissionsGuard],data:{permissions:v.NavigationPermissionsService.getPermissions("tools")},children:[{path:"",pathMatch:"full",redirectTo:"import"},{path:"import",component:C.ImportComponent,canActivate:[s.PermissionsGuard],data:{titleId:"importData",permissions:[a.Permissions.AccessImportExport]}},{path:"export",component:b.ExportComponent,canActivate:[s.PermissionsGuard],data:{titleId:"exportVault",permissions:[a.Permissions.AccessImportExport]}},{path:"exposed-passwords-report",component:w.ExposedPasswordsReportComponent,canActivate:[s.PermissionsGuard],data:{titleId:"exposedPasswordsReport",permissions:[a.Permissions.AccessReports]}},{path:"inactive-two-factor-report",component:I.InactiveTwoFactorReportComponent,canActivate:[s.PermissionsGuard],data:{titleId:"inactive2faReport",permissions:[a.Permissions.AccessReports]}},{path:"reused-passwords-report",component:E.ReusedPasswordsReportComponent,canActivate:[s.PermissionsGuard],data:{titleId:"reusedPasswordsReport",permissions:[a.Permissions.AccessReports]}},{path:"unsecured-websites-report",component:O.UnsecuredWebsitesReportComponent,canActivate:[s.PermissionsGuard],data:{titleId:"unsecuredWebsitesReport",permissions:[a.Permissions.AccessReports]}},{path:"weak-passwords-report",component:k.WeakPasswordsReportComponent,canActivate:[s.PermissionsGuard],data:{titleId:"weakPasswordsReport",permissions:[a.Permissions.AccessReports]}}]},{path:"manage",component:u.ManageComponent,canActivate:[s.PermissionsGuard],data:{permissions:v.NavigationPermissionsService.getPermissions("manage")},children:[{path:"",pathMatch:"full",redirectTo:"people"},{path:"collections",component:c.CollectionsComponent,canActivate:[s.PermissionsGuard],data:{titleId:"collections",permissions:[a.Permissions.CreateNewCollections,a.Permissions.EditAnyCollection,a.Permissions.DeleteAnyCollection,a.Permissions.EditAssignedCollections,a.Permissions.DeleteAssignedCollections]}},{path:"events",component:d.EventsComponent,canActivate:[s.PermissionsGuard],data:{titleId:"eventLogs",permissions:[a.Permissions.AccessEventLogs]}},{path:"groups",component:p.GroupsComponent,canActivate:[s.PermissionsGuard],data:{titleId:"groups",permissions:[a.Permissions.ManageGroups]}},{path:"people",component:m.PeopleComponent,canActivate:[s.PermissionsGuard],data:{titleId:"people",permissions:[a.Permissions.ManageUsers,a.Permissions.ManageUsersPassword]}},{path:"policies",component:h.PoliciesComponent,canActivate:[s.PermissionsGuard],data:{titleId:"policies",permissions:[a.Permissions.ManagePolicies]}}]},{path:"settings",component:x.SettingsComponent,canActivate:[s.PermissionsGuard],data:{permissions:v.NavigationPermissionsService.getPermissions("settings")},children:[{path:"",pathMatch:"full",redirectTo:"account"},{path:"account",component:f.AccountComponent,data:{titleId:"myOrganization"}},{path:"two-factor",component:S.TwoFactorSetupComponent,data:{titleId:"twoStepLogin"}},{path:"billing",component:g.OrganizationBillingComponent,canActivate:[s.PermissionsGuard],data:{titleId:"billing",permissions:[a.Permissions.ManageBilling]}},{path:"subscription",component:y.OrganizationSubscriptionComponent,data:{titleId:"subscription"}}]}]}]);class M{}t.OrganizationsRoutingModule=M,M.ɵfac=function(e){return new(e||M)},M.ɵmod=A.ɵɵdefineNgModule({type:M}),M.ɵinj=A.ɵɵdefineInjector({imports:[[r.RouterModule.forChild(T)],r.RouterModule]})},81824:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasePolicyComponent=t.BasePolicy=void 0;const i=n(96832),r=n(17200),o=(n(64030),n(32621));t.BasePolicy=class{display(e){return!0}};class a{constructor(){this.enabled=new i.FormControl(!1),this.data=null}ngOnInit(){this.enabled.setValue(this.policyResponse.enabled),null!=this.policyResponse.data&&this.loadData()}loadData(){var e;this.data.patchValue(null!==(e=this.policyResponse.data)&&void 0!==e?e:{})}buildRequestData(){return null!=this.data?this.data.value:null}buildRequest(e){const t=new r.PolicyRequest;return t.enabled=this.enabled.value,t.type=this.policy.type,t.data=this.buildRequestData(),Promise.resolve(t)}}t.BasePolicyComponent=a,a.ɵfac=function(e){return new(e||a)},a.ɵdir=o.ɵɵdefineDirective({type:a,inputs:{policyResponse:"policyResponse",policy:"policy"}})},22991:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DisableSendPolicyComponent=t.DisableSendPolicy=void 0;const i=n(49906),r=n(81824),o=n(32621),a=n(51626),s=n(96832),l=n(99729);class c extends r.BasePolicy{constructor(){super(...arguments),this.name="disableSend",this.description="disableSendPolicyDesc",this.type=i.PolicyType.DisableSend,this.component=d}}t.DisableSendPolicy=c;class d extends r.BasePolicyComponent{}t.DisableSendPolicyComponent=d,d.ɵfac=function(){let e;return function(t){return(e||(e=o.ɵɵgetInheritedFactory(d)))(t||d)}}(),d.ɵcmp=o.ɵɵdefineComponent({type:d,selectors:[["policy-disable-send"]],features:[o.ɵɵInheritDefinitionFeature],decls:16,vars:7,consts:[["type","warning"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",0),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(3,"\n\n"),o.ɵɵelementStart(4,"div",1),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",2),o.ɵɵtext(7,"\n "),o.ɵɵelement(8,"input",3),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"label",4),o.ɵɵtext(11),o.ɵɵpipe(12,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n")),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,3,"disableSendExemption"),"\n"),o.ɵɵadvance(7),o.ɵɵproperty("formControl",t.enabled),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(12,5,"enabled")))},directives:[a.CalloutComponent,s.CheckboxControlValueAccessor,s.NgControlStatus,s.FormControlDirective],pipes:[l.I18nPipe],encapsulation:2})},34568:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.MasterPasswordPolicyComponent=t.MasterPasswordPolicy=void 0;n(96832),n(51554),n(63513);const r=n(49906),o=n(81824),a=n(32621),s=n(96832),l=n(51554),c=n(63513),d=n(57490),p=n(51626),u=n(99729);function m(e,t){1&e&&(a.ɵɵelementStart(0,"app-callout",21),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(2,1,"keyConnectorPolicyRestriction"),"\n"))}function h(e,t){if(1&e&&(a.ɵɵelementStart(0,"option",22),a.ɵɵtext(1),a.ɵɵelementEnd()),2&e){const e=t.$implicit;a.ɵɵproperty("ngValue",e.value),a.ɵɵadvance(1),a.ɵɵtextInterpolate(e.name)}}class v extends o.BasePolicy{constructor(){super(...arguments),this.name="masterPass",this.description="masterPassPolicyDesc",this.type=r.PolicyType.MasterPassword,this.component=f}}t.MasterPasswordPolicy=v;class f extends o.BasePolicyComponent{constructor(e,t,n){super(),this.formBuilder=e,this.organizationService=n,this.data=this.formBuilder.group({minComplexity:[null],minLength:[null],requireUpper:[null],requireLower:[null],requireNumbers:[null],requireSpecial:[null]}),this.showKeyConnectorInfo=!1,this.passwordScores=[{name:"-- "+t.t("select")+" --",value:null},{name:t.t("weak")+" (0)",value:0},{name:t.t("weak")+" (1)",value:1},{name:t.t("weak")+" (2)",value:2},{name:t.t("good")+" (3)",value:3},{name:t.t("strong")+" (4)",value:4}]}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){e.ngOnInit.call(this);const t=yield this.organizationService.get(this.policyResponse.organizationId);this.showKeyConnectorInfo=t.keyConnectorEnabled}))}}t.MasterPasswordPolicyComponent=f,f.ɵfac=function(e){return new(e||f)(a.ɵɵdirectiveInject(s.FormBuilder),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(c.OrganizationService))},f.ɵcmp=a.ɵɵdefineComponent({type:f,selectors:[["policy-master-password"]],features:[a.ɵɵInheritDefinitionFeature],decls:73,vars:13,consts:[["type","info",4,"ngIf"],[3,"formGroup"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"],[1,"row"],[1,"col-6","form-group"],["for","minComplexity"],["id","minComplexity","name","minComplexity","formControlName","minComplexity",1,"form-control"],[3,"ngValue",4,"ngFor","ngForOf"],["for","minLength"],["id","minLength","type","number","min","8","name","minLength","formControlName","minLength",1,"form-control"],["type","checkbox","id","requireUpper","name","requireUpper","formControlName","requireUpper",1,"form-check-input"],["for","requireUpper",1,"form-check-label"],["type","checkbox","id","requireLower","name","requireLower","formControlName","requireLower",1,"form-check-input"],["for","requireLower",1,"form-check-label"],["type","checkbox","id","requireNumbers","name","requireNumbers","formControlName","requireNumbers",1,"form-check-input"],["for","requireNumbers",1,"form-check-label"],["type","checkbox","id","requireSpecial","name","requireSpecial","formControlName","requireSpecial",1,"form-check-input"],["for","requireSpecial",1,"form-check-label"],["type","info"],[3,"ngValue"]],template:function(e,t){1&e&&(a.ɵɵtemplate(0,m,3,3,"app-callout",0),a.ɵɵtext(1,"\n\n"),a.ɵɵelementStart(2,"div",1),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"div",2),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"div",3),a.ɵɵtext(7,"\n "),a.ɵɵelement(8,"input",4),a.ɵɵtext(9,"\n "),a.ɵɵelementStart(10,"label",5),a.ɵɵtext(11),a.ɵɵpipe(12,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(13,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(15,"\n\n "),a.ɵɵelementStart(16,"div",6),a.ɵɵtext(17,"\n "),a.ɵɵelementStart(18,"div",7),a.ɵɵtext(19,"\n "),a.ɵɵelementStart(20,"label",8),a.ɵɵtext(21),a.ɵɵpipe(22,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(23,"\n "),a.ɵɵelementStart(24,"select",9),a.ɵɵtext(25,"\n "),a.ɵɵtemplate(26,h,2,2,"option",10),a.ɵɵtext(27,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(28,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(29,"\n "),a.ɵɵelementStart(30,"div",7),a.ɵɵtext(31,"\n "),a.ɵɵelementStart(32,"label",11),a.ɵɵtext(33),a.ɵɵpipe(34,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(35,"\n "),a.ɵɵelement(36,"input",12),a.ɵɵtext(37,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(38,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(39,"\n "),a.ɵɵelementStart(40,"div",3),a.ɵɵtext(41,"\n "),a.ɵɵelement(42,"input",13),a.ɵɵtext(43,"\n "),a.ɵɵelementStart(44,"label",14),a.ɵɵtext(45,"A-Z"),a.ɵɵelementEnd(),a.ɵɵtext(46,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(47,"\n "),a.ɵɵelementStart(48,"div",3),a.ɵɵtext(49,"\n "),a.ɵɵelement(50,"input",15),a.ɵɵtext(51,"\n "),a.ɵɵelementStart(52,"label",16),a.ɵɵtext(53,"a-z"),a.ɵɵelementEnd(),a.ɵɵtext(54,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(55,"\n "),a.ɵɵelementStart(56,"div",3),a.ɵɵtext(57,"\n "),a.ɵɵelement(58,"input",17),a.ɵɵtext(59,"\n "),a.ɵɵelementStart(60,"label",18),a.ɵɵtext(61,"0-9"),a.ɵɵelementEnd(),a.ɵɵtext(62,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(63,"\n "),a.ɵɵelementStart(64,"div",3),a.ɵɵtext(65,"\n "),a.ɵɵelement(66,"input",19),a.ɵɵtext(67,"\n "),a.ɵɵelementStart(68,"label",20),a.ɵɵtext(69,"!@#$%^&*"),a.ɵɵelementEnd(),a.ɵɵtext(70,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(71,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(72,"\n")),2&e&&(a.ɵɵproperty("ngIf",t.showKeyConnectorInfo),a.ɵɵadvance(2),a.ɵɵproperty("formGroup",t.data),a.ɵɵadvance(6),a.ɵɵproperty("formControl",t.enabled),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(12,7,"enabled")),a.ɵɵadvance(10),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(22,9,"minComplexityScore")),a.ɵɵadvance(5),a.ɵɵproperty("ngForOf",t.passwordScores),a.ɵɵadvance(7),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(34,11,"minLength")))},directives:[d.NgIf,s.NgControlStatusGroup,s.FormGroupDirective,s.CheckboxControlValueAccessor,s.NgControlStatus,s.FormControlDirective,s.SelectControlValueAccessor,s.FormControlName,d.NgForOf,s.MinValidator,s.NumberValueAccessor,s.DefaultValueAccessor,p.CalloutComponent,s.NgSelectOption,s.ɵNgSelectMultipleOption],pipes:[u.I18nPipe],encapsulation:2})},39123:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordGeneratorPolicyComponent=t.PasswordGeneratorPolicy=void 0;n(96832),n(51554);const i=n(49906),r=n(81824),o=n(32621),a=n(96832),s=n(51554),l=n(57490),c=n(99729);function d(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",32),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.value),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}class p extends r.BasePolicy{constructor(){super(...arguments),this.name="passwordGenerator",this.description="passwordGeneratorPolicyDesc",this.type=i.PolicyType.PasswordGenerator,this.component=u}}t.PasswordGeneratorPolicy=p;class u extends r.BasePolicyComponent{constructor(e,t){super(),this.formBuilder=e,this.data=this.formBuilder.group({defaultType:[null],minLength:[null],useUpper:[null],useLower:[null],useNumbers:[null],useSpecial:[null],minNumbers:[null],minSpecial:[null],minNumberWords:[null],capitalize:[null],includeNumber:[null]}),this.defaultTypes=[{name:t.t("userPreference"),value:null},{name:t.t("password"),value:"password"},{name:t.t("passphrase"),value:"passphrase"}]}}t.PasswordGeneratorPolicyComponent=u,u.ɵfac=function(e){return new(e||u)(o.ɵɵdirectiveInject(a.FormBuilder),o.ɵɵdirectiveInject(s.I18nService))},u.ɵcmp=o.ɵɵdefineComponent({type:u,selectors:[["policy-password-generator"]],features:[o.ɵɵInheritDefinitionFeature],decls:133,vars:33,consts:[[3,"formGroup"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"],[1,"row"],[1,"col-6","form-group","mb-0"],["for","defaultType"],["id","defaultType","name","defaultType","formControlName","defaultType",1,"form-control"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"mt-4"],[1,"col-6","form-group"],["for","minLength"],["id","minLength","type","number","name","minLength","min","5","max","128","formControlName","minLength",1,"form-control"],["for","minNumbers"],["id","minNumbers","type","number","name","minNumbers","min","0","max","9","formControlName","minNumbers",1,"form-control"],["for","minSpecial"],["id","minSpecial","type","number","name","minSpecial","min","0","max","9","formControlName","minSpecial",1,"form-control"],["type","checkbox","id","useUpper","formControlName","useUpper","name","useUpper",1,"form-check-input"],["for","useUpper",1,"form-check-label"],["type","checkbox","id","useLower","name","useLower","formControlName","useLower",1,"form-check-input"],["for","useLower",1,"form-check-label"],["type","checkbox","id","useNumbers","name","useNumbers","formControlName","useNumbers",1,"form-check-input"],["for","useNumbers",1,"form-check-label"],["type","checkbox","id","useSpecial","name","useSpecial","formControlName","useSpecial",1,"form-check-input"],["for","useSpecial",1,"form-check-label"],["for","minNumberWords"],["id","minNumberWords","type","number","name","minNumberWords","min","3","max","20","formControlName","minNumberWords",1,"form-control"],["type","checkbox","id","capitalize","name","capitalize","formControlName","capitalize",1,"form-check-input"],["for","capitalize",1,"form-check-label"],["type","checkbox","id","includeNumber","name","includeNumber","formControlName","includeNumber",1,"form-check-input"],["for","includeNumber",1,"form-check-label"],[3,"ngValue"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"div",2),o.ɵɵtext(5,"\n "),o.ɵɵelement(6,"input",3),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"label",4),o.ɵɵtext(9),o.ɵɵpipe(10,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n\n "),o.ɵɵelementStart(14,"div",5),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"div",6),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"label",7),o.ɵɵtext(19),o.ɵɵpipe(20,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"select",8),o.ɵɵtext(23,"\n "),o.ɵɵtemplate(24,d,2,2,"option",9),o.ɵɵtext(25,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(28,"\n "),o.ɵɵelementStart(29,"h3",10),o.ɵɵtext(30),o.ɵɵpipe(31,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(32,"\n "),o.ɵɵelementStart(33,"div",5),o.ɵɵtext(34,"\n "),o.ɵɵelementStart(35,"div",11),o.ɵɵtext(36,"\n "),o.ɵɵelementStart(37,"label",12),o.ɵɵtext(38),o.ɵɵpipe(39,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(40,"\n "),o.ɵɵelement(41,"input",13),o.ɵɵtext(42,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(43,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(44,"\n "),o.ɵɵelementStart(45,"div",5),o.ɵɵtext(46,"\n "),o.ɵɵelementStart(47,"div",11),o.ɵɵtext(48,"\n "),o.ɵɵelementStart(49,"label",14),o.ɵɵtext(50),o.ɵɵpipe(51,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(52,"\n "),o.ɵɵelement(53,"input",15),o.ɵɵtext(54,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(55,"\n "),o.ɵɵelementStart(56,"div",11),o.ɵɵtext(57,"\n "),o.ɵɵelementStart(58,"label",16),o.ɵɵtext(59),o.ɵɵpipe(60,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(61,"\n "),o.ɵɵelement(62,"input",17),o.ɵɵtext(63,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(64,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(65,"\n "),o.ɵɵelementStart(66,"div",2),o.ɵɵtext(67,"\n "),o.ɵɵelement(68,"input",18),o.ɵɵtext(69,"\n "),o.ɵɵelementStart(70,"label",19),o.ɵɵtext(71,"A-Z"),o.ɵɵelementEnd(),o.ɵɵtext(72,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(73,"\n "),o.ɵɵelementStart(74,"div",2),o.ɵɵtext(75,"\n "),o.ɵɵelement(76,"input",20),o.ɵɵtext(77,"\n "),o.ɵɵelementStart(78,"label",21),o.ɵɵtext(79,"a-z"),o.ɵɵelementEnd(),o.ɵɵtext(80,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(81,"\n "),o.ɵɵelementStart(82,"div",2),o.ɵɵtext(83,"\n "),o.ɵɵelement(84,"input",22),o.ɵɵtext(85,"\n "),o.ɵɵelementStart(86,"label",23),o.ɵɵtext(87,"0-9"),o.ɵɵelementEnd(),o.ɵɵtext(88,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(89,"\n "),o.ɵɵelementStart(90,"div",2),o.ɵɵtext(91,"\n "),o.ɵɵelement(92,"input",24),o.ɵɵtext(93,"\n "),o.ɵɵelementStart(94,"label",25),o.ɵɵtext(95,"!@#$%^&*"),o.ɵɵelementEnd(),o.ɵɵtext(96,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(97,"\n "),o.ɵɵelementStart(98,"h3",10),o.ɵɵtext(99),o.ɵɵpipe(100,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(101,"\n "),o.ɵɵelementStart(102,"div",5),o.ɵɵtext(103,"\n "),o.ɵɵelementStart(104,"div",11),o.ɵɵtext(105,"\n "),o.ɵɵelementStart(106,"label",26),o.ɵɵtext(107),o.ɵɵpipe(108,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(109,"\n "),o.ɵɵelement(110,"input",27),o.ɵɵtext(111,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(112,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(113,"\n "),o.ɵɵelementStart(114,"div",2),o.ɵɵtext(115,"\n "),o.ɵɵelement(116,"input",28),o.ɵɵtext(117,"\n "),o.ɵɵelementStart(118,"label",29),o.ɵɵtext(119),o.ɵɵpipe(120,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(121,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(122,"\n "),o.ɵɵelementStart(123,"div",2),o.ɵɵtext(124,"\n "),o.ɵɵelement(125,"input",30),o.ɵɵtext(126,"\n "),o.ɵɵelementStart(127,"label",31),o.ɵɵtext(128),o.ɵɵpipe(129,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(130,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(131,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(132,"\n")),2&e&&(o.ɵɵproperty("formGroup",t.data),o.ɵɵadvance(6),o.ɵɵproperty("formControl",t.enabled),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(10,13,"enabled")),o.ɵɵadvance(10),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(20,15,"defaultType")),o.ɵɵadvance(5),o.ɵɵproperty("ngForOf",t.defaultTypes),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(31,17,"password")),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(39,19,"minLength")),o.ɵɵadvance(12),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(51,21,"minNumbers")),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(60,23,"minSpecial")),o.ɵɵadvance(40),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(100,25,"passphrase")),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(108,27,"minimumNumberOfWords")),o.ɵɵadvance(12),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(120,29,"capitalize")),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(129,31,"includeNumber")))},directives:[a.NgControlStatusGroup,a.FormGroupDirective,a.CheckboxControlValueAccessor,a.NgControlStatus,a.FormControlDirective,a.SelectControlValueAccessor,a.FormControlName,l.NgForOf,a.MinValidator,a.MaxValidator,a.NumberValueAccessor,a.DefaultValueAccessor,a.NgSelectOption,a.ɵNgSelectMultipleOption],pipes:[c.I18nPipe],encapsulation:2})},34912:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PersonalOwnershipPolicyComponent=t.PersonalOwnershipPolicy=void 0;const i=n(49906),r=n(81824),o=n(32621),a=n(51626),s=n(96832),l=n(99729);class c extends r.BasePolicy{constructor(){super(...arguments),this.name="personalOwnership",this.description="personalOwnershipPolicyDesc",this.type=i.PolicyType.PersonalOwnership,this.component=d}}t.PersonalOwnershipPolicy=c;class d extends r.BasePolicyComponent{}t.PersonalOwnershipPolicyComponent=d,d.ɵfac=function(){let e;return function(t){return(e||(e=o.ɵɵgetInheritedFactory(d)))(t||d)}}(),d.ɵcmp=o.ɵɵdefineComponent({type:d,selectors:[["policy-personal-ownership"]],features:[o.ɵɵInheritDefinitionFeature],decls:16,vars:7,consts:[["type","warning"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",0),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(3,"\n\n"),o.ɵɵelementStart(4,"div",1),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",2),o.ɵɵtext(7,"\n "),o.ɵɵelement(8,"input",3),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"label",4),o.ɵɵtext(11),o.ɵɵpipe(12,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n")),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,3,"personalOwnershipExemption"),"\n"),o.ɵɵadvance(7),o.ɵɵproperty("formControl",t.enabled),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(12,5,"personalOwnershipCheckboxDesc")))},directives:[a.CalloutComponent,s.CheckboxControlValueAccessor,s.NgControlStatus,s.FormControlDirective],pipes:[l.I18nPipe],encapsulation:2})},60764:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RequireSsoPolicyComponent=t.RequireSsoPolicy=void 0;n(51554);const i=n(49906),r=n(81824),o=n(32621),a=n(51554),s=n(51626),l=n(96832),c=n(99729);class d extends r.BasePolicy{constructor(){super(...arguments),this.name="requireSso",this.description="requireSsoPolicyDesc",this.type=i.PolicyType.RequireSso,this.component=p}display(e){return e.useSso}}t.RequireSsoPolicy=d;class p extends r.BasePolicyComponent{constructor(e){super(),this.i18nService=e}buildRequest(e){var t;const n=null!==(t=e.get(i.PolicyType.SingleOrg))&&void 0!==t&&t;if(this.enabled.value&&!n)throw new Error(this.i18nService.t("requireSsoPolicyReqError"));return super.buildRequest(e)}}t.RequireSsoPolicyComponent=p,p.ɵfac=function(e){return new(e||p)(o.ɵɵdirectiveInject(a.I18nService))},p.ɵcmp=o.ɵɵdefineComponent({type:p,selectors:[["policy-require-sso"]],features:[o.ɵɵInheritDefinitionFeature],decls:21,vars:13,consts:[["type","tip",3,"title"],["type","warning"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",0),o.ɵɵpipe(1,"i18n"),o.ɵɵtext(2),o.ɵɵpipe(3,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(4,"\n"),o.ɵɵelementStart(5,"app-callout",1),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n\n"),o.ɵɵelementStart(9,"div",2),o.ɵɵtext(10,"\n "),o.ɵɵelementStart(11,"div",3),o.ɵɵtext(12,"\n "),o.ɵɵelement(13,"input",4),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"label",5),o.ɵɵtext(16),o.ɵɵpipe(17,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n")),2&e&&(o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(1,5,"prerequisite")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(3,7,"requireSsoPolicyReq"),"\n"),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(7,9,"requireSsoExemption"),"\n"),o.ɵɵadvance(7),o.ɵɵproperty("formControl",t.enabled),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(17,11,"enabled")))},directives:[s.CalloutComponent,l.CheckboxControlValueAccessor,l.NgControlStatus,l.FormControlDirective],pipes:[c.I18nPipe],encapsulation:2})},40558:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ResetPasswordPolicyComponent=t.ResetPasswordPolicy=void 0;n(96832),n(63513);const r=n(49906),o=n(81824),a=n(32621),s=n(96832),l=n(63513),c=n(57490),d=n(51626),p=n(99729);function u(e,t){1&e&&(a.ɵɵelementStart(0,"app-callout",10),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(2,1,"keyConnectorPolicyRestriction"),"\n"))}class m extends o.BasePolicy{constructor(){super(...arguments),this.name="resetPasswordPolicy",this.description="resetPasswordPolicyDescription",this.type=r.PolicyType.ResetPassword,this.component=h}display(e){return e.useResetPassword}}t.ResetPasswordPolicy=m;class h extends o.BasePolicyComponent{constructor(e,t){super(),this.formBuilder=e,this.organizationService=t,this.data=this.formBuilder.group({autoEnrollEnabled:!1}),this.showKeyConnectorInfo=!1}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){e.ngOnInit.call(this);const t=yield this.organizationService.get(this.policyResponse.organizationId);this.showKeyConnectorInfo=t.keyConnectorEnabled}))}}t.ResetPasswordPolicyComponent=h,h.ɵfac=function(e){return new(e||h)(a.ɵɵdirectiveInject(s.FormBuilder),a.ɵɵdirectiveInject(l.OrganizationService))},h.ɵcmp=a.ɵɵdefineComponent({type:h,selectors:[["policy-reset-password"]],features:[a.ɵɵInheritDefinitionFeature],decls:42,vars:21,consts:[["type","info",4,"ngIf"],["type","warning"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"],[3,"formGroup"],[1,"mt-4"],["type","checkbox","id","autoEnrollEnabled","name","AutoEnrollEnabled","formControlName","autoEnrollEnabled",1,"form-check-input"],["for","autoEnrollEnabled",1,"form-check-label"],["type","info"]],template:function(e,t){1&e&&(a.ɵɵtemplate(0,u,3,3,"app-callout",0),a.ɵɵtext(1,"\n\n"),a.ɵɵelementStart(2,"app-callout",1),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n\n"),a.ɵɵelementStart(6,"div",2),a.ɵɵtext(7,"\n "),a.ɵɵelementStart(8,"div",3),a.ɵɵtext(9,"\n "),a.ɵɵelement(10,"input",4),a.ɵɵtext(11,"\n "),a.ɵɵelementStart(12,"label",5),a.ɵɵtext(13),a.ɵɵpipe(14,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(15,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(16,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n\n"),a.ɵɵelementStart(18,"div",6),a.ɵɵtext(19,"\n "),a.ɵɵelementStart(20,"h3",7),a.ɵɵtext(21),a.ɵɵpipe(22,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(23,"\n "),a.ɵɵelementStart(24,"p"),a.ɵɵtext(25),a.ɵɵpipe(26,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(27,"\n "),a.ɵɵelementStart(28,"app-callout",1),a.ɵɵtext(29),a.ɵɵpipe(30,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(31,"\n "),a.ɵɵelementStart(32,"div",3),a.ɵɵtext(33,"\n "),a.ɵɵelement(34,"input",8),a.ɵɵtext(35,"\n "),a.ɵɵelementStart(36,"label",9),a.ɵɵtext(37),a.ɵɵpipe(38,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(39,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(40,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(41,"\n")),2&e&&(a.ɵɵproperty("ngIf",t.showKeyConnectorInfo),a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,9,"resetPasswordPolicyWarning"),"\n"),a.ɵɵadvance(7),a.ɵɵproperty("formControl",t.enabled),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(14,11,"enabled")),a.ɵɵadvance(5),a.ɵɵproperty("formGroup",t.data),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(22,13,"resetPasswordPolicyAutoEnroll")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(26,15,"resetPasswordPolicyAutoEnrollDescription")),a.ɵɵadvance(4),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(30,17,"resetPasswordPolicyAutoEnrollWarning"),"\n "),a.ɵɵadvance(8),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(38,19,"resetPasswordPolicyAutoEnrollCheckbox"),"\n "))},directives:[c.NgIf,d.CalloutComponent,s.CheckboxControlValueAccessor,s.NgControlStatus,s.FormControlDirective,s.NgControlStatusGroup,s.FormGroupDirective,s.FormControlName],pipes:[p.I18nPipe],encapsulation:2})},57037:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendOptionsPolicyComponent=t.SendOptionsPolicy=void 0;n(96832);const i=n(49906),r=n(81824),o=n(32621),a=n(96832),s=n(51626),l=n(99729);class c extends r.BasePolicy{constructor(){super(...arguments),this.name="sendOptions",this.description="sendOptionsPolicyDesc",this.type=i.PolicyType.SendOptions,this.component=d}}t.SendOptionsPolicy=c;class d extends r.BasePolicyComponent{constructor(e){super(),this.formBuilder=e,this.data=this.formBuilder.group({disableHideEmail:!1})}}t.SendOptionsPolicyComponent=d,d.ɵfac=function(e){return new(e||d)(o.ɵɵdirectiveInject(a.FormBuilder))},d.ɵcmp=o.ɵɵdefineComponent({type:d,selectors:[["policy-send-options"]],features:[o.ɵɵInheritDefinitionFeature],decls:32,vars:14,consts:[["type","warning"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"],[3,"formGroup"],[1,"mt-4"],["type","checkbox","id","disableHideEmail","name","DisableHideEmail","formControlName","disableHideEmail",1,"form-check-input"],["for","disableHideEmail",1,"form-check-label"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",0),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(3,"\n\n"),o.ɵɵelementStart(4,"div",1),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",2),o.ɵɵtext(7,"\n "),o.ɵɵelement(8,"input",3),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"label",4),o.ɵɵtext(11),o.ɵɵpipe(12,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n\n"),o.ɵɵelementStart(16,"div",5),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"h3",6),o.ɵɵtext(19),o.ɵɵpipe(20,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"div",2),o.ɵɵtext(23,"\n "),o.ɵɵelement(24,"input",7),o.ɵɵtext(25,"\n "),o.ɵɵelementStart(26,"label",8),o.ɵɵtext(27),o.ɵɵpipe(28,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(30,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(31,"\n")),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,6,"sendOptionsExemption"),"\n"),o.ɵɵadvance(7),o.ɵɵproperty("formControl",t.enabled),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(12,8,"enabled")),o.ɵɵadvance(5),o.ɵɵproperty("formGroup",t.data),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(20,10,"options")),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(28,12,"disableHideEmail")))},directives:[s.CalloutComponent,a.CheckboxControlValueAccessor,a.NgControlStatus,a.FormControlDirective,a.NgControlStatusGroup,a.FormGroupDirective,a.FormControlName],pipes:[l.I18nPipe],encapsulation:2})},82862:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SingleOrgPolicyComponent=t.SingleOrgPolicy=void 0;n(51554);const i=n(49906),r=n(81824),o=n(32621),a=n(51554),s=n(51626),l=n(96832),c=n(99729);class d extends r.BasePolicy{constructor(){super(...arguments),this.name="singleOrg",this.description="singleOrgDesc",this.type=i.PolicyType.SingleOrg,this.component=p}}t.SingleOrgPolicy=d;class p extends r.BasePolicyComponent{constructor(e){super(),this.i18nService=e}buildRequest(e){var t,n;if(!this.enabled.value){if(null!==(t=e.get(i.PolicyType.RequireSso))&&void 0!==t&&t)throw new Error(this.i18nService.t("disableRequiredError",this.i18nService.t("requireSso")));if(null!==(n=e.get(i.PolicyType.MaximumVaultTimeout))&&void 0!==n&&n)throw new Error(this.i18nService.t("disableRequiredError",this.i18nService.t("maximumVaultTimeoutLabel")))}return super.buildRequest(e)}}t.SingleOrgPolicyComponent=p,p.ɵfac=function(e){return new(e||p)(o.ɵɵdirectiveInject(a.I18nService))},p.ɵcmp=o.ɵɵdefineComponent({type:p,selectors:[["policy-single-org"]],features:[o.ɵɵInheritDefinitionFeature],decls:16,vars:7,consts:[["type","warning"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",0),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(3,"\n\n"),o.ɵɵelementStart(4,"div",1),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",2),o.ɵɵtext(7,"\n "),o.ɵɵelement(8,"input",3),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"label",4),o.ɵɵtext(11),o.ɵɵpipe(12,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n")),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,3,"singleOrgPolicyWarning"),"\n"),o.ɵɵadvance(7),o.ɵɵproperty("formControl",t.enabled),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(12,5,"enabled")))},directives:[s.CalloutComponent,l.CheckboxControlValueAccessor,l.NgControlStatus,l.FormControlDirective],pipes:[c.I18nPipe],encapsulation:2})},43909:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorAuthenticationPolicyComponent=t.TwoFactorAuthenticationPolicy=void 0;const i=n(49906),r=n(81824),o=n(32621),a=n(51626),s=n(96832),l=n(99729);class c extends r.BasePolicy{constructor(){super(...arguments),this.name="twoStepLogin",this.description="twoStepLoginPolicyDesc",this.type=i.PolicyType.TwoFactorAuthentication,this.component=d}}t.TwoFactorAuthenticationPolicy=c;class d extends r.BasePolicyComponent{}t.TwoFactorAuthenticationPolicyComponent=d,d.ɵfac=function(){let e;return function(t){return(e||(e=o.ɵɵgetInheritedFactory(d)))(t||d)}}(),d.ɵcmp=o.ɵɵdefineComponent({type:d,selectors:[["policy-two-factor-authentication"]],features:[o.ɵɵInheritDefinitionFeature],decls:16,vars:7,consts:[["type","warning"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",0),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(3,"\n\n"),o.ɵɵelementStart(4,"div",1),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",2),o.ɵɵtext(7,"\n "),o.ɵɵelement(8,"input",3),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"label",4),o.ɵɵtext(11),o.ɵɵpipe(12,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n")),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,3,"twoStepLoginPolicyWarning"),"\n"),o.ɵɵadvance(7),o.ɵɵproperty("formControl",t.enabled),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(12,5,"enabled")))},directives:[a.CalloutComponent,s.CheckboxControlValueAccessor,s.NgControlStatus,s.FormControlDirective],pipes:[l.I18nPipe],encapsulation:2})},13637:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NavigationPermissionsService=void 0;const i=n(47880),r={manage:[i.Permissions.CreateNewCollections,i.Permissions.EditAnyCollection,i.Permissions.DeleteAnyCollection,i.Permissions.EditAssignedCollections,i.Permissions.DeleteAssignedCollections,i.Permissions.AccessEventLogs,i.Permissions.ManageGroups,i.Permissions.ManageUsers,i.Permissions.ManagePolicies],tools:[i.Permissions.AccessImportExport,i.Permissions.AccessReports],settings:[i.Permissions.ManageOrganization]};class o{static getPermissions(e){return"admin"===e?Object.values(r).reduce(((e,t)=>e.concat(t)),[]):r[e]}static canAccessAdmin(e){return this.canAccessTools(e)||this.canAccessSettings(e)||this.canAccessManage(e)}static canAccessTools(e){return e.hasAnyPermission(o.getPermissions("tools"))}static canAccessSettings(e){return e.hasAnyPermission(o.getPermissions("settings"))}static canAccessManage(e){return e.hasAnyPermission(o.getPermissions("manage"))}}t.NavigationPermissionsService=o},39722:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AccountComponent=void 0;const r=n(32621),o=(n(68012),n(64684),n(91674),n(85714),n(51554),n(36631),n(63513),n(73828),n(9724),n(39950)),a=n(20086),s=n(83011),l=n(56796),c=n(41799),d=n(5092),p=n(32621),u=n(64684),m=n(91674),h=n(51554),v=n(68012),f=n(9724),g=n(73828),y=n(85714),x=n(36631),S=n(63513),b=n(57490),w=n(96832),C=n(56820),I=n(15370),E=n(41799),P=n(99729),O=["deleteOrganizationTemplate"],k=["purgeOrganizationTemplate"],A=["apiKeyTemplate"],T=["rotateApiKeyTemplate"];function M(e,t){1&e&&(p.ɵɵelementStart(0,"div"),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"i",12),p.ɵɵpipe(3,"i18n"),p.ɵɵtext(4,"\n "),p.ɵɵelementStart(5,"span",13),p.ɵɵtext(6),p.ɵɵpipe(7,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(8,"\n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(3,2,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(7,4,"loading")))}function B(e,t){if(1&e){const e=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"form",14,15),p.ɵɵlistener("ngSubmit",(function(){p.ɵɵrestoreView(e);return p.ɵɵnextContext().submit()})),p.ɵɵtext(2,"\n "),p.ɵɵelementStart(3,"div",16),p.ɵɵtext(4,"\n "),p.ɵɵelementStart(5,"div",17),p.ɵɵtext(6,"\n "),p.ɵɵelementStart(7,"div",18),p.ɵɵtext(8,"\n "),p.ɵɵelementStart(9,"label",19),p.ɵɵtext(10),p.ɵɵpipe(11,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(12,"\n "),p.ɵɵelementStart(13,"input",20),p.ɵɵlistener("ngModelChange",(function(t){p.ɵɵrestoreView(e);return p.ɵɵnextContext().org.name=t})),p.ɵɵelementEnd(),p.ɵɵtext(14,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(15,"\n "),p.ɵɵelementStart(16,"div",18),p.ɵɵtext(17,"\n "),p.ɵɵelementStart(18,"label",21),p.ɵɵtext(19),p.ɵɵpipe(20,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(21,"\n "),p.ɵɵelementStart(22,"input",22),p.ɵɵlistener("ngModelChange",(function(t){p.ɵɵrestoreView(e);return p.ɵɵnextContext().org.billingEmail=t})),p.ɵɵelementEnd(),p.ɵɵtext(23,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(24,"\n "),p.ɵɵelementStart(25,"div",18),p.ɵɵtext(26,"\n "),p.ɵɵelementStart(27,"label",23),p.ɵɵtext(28),p.ɵɵpipe(29,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(30,"\n "),p.ɵɵelementStart(31,"input",24),p.ɵɵlistener("ngModelChange",(function(t){p.ɵɵrestoreView(e);return p.ɵɵnextContext().org.businessName=t})),p.ɵɵelementEnd(),p.ɵɵtext(32,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(33,"\n "),p.ɵɵelementStart(34,"div",18),p.ɵɵtext(35,"\n "),p.ɵɵelementStart(36,"label",25),p.ɵɵtext(37),p.ɵɵpipe(38,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(39,"\n "),p.ɵɵelementStart(40,"input",26),p.ɵɵlistener("ngModelChange",(function(t){p.ɵɵrestoreView(e);return p.ɵɵnextContext().org.identifier=t})),p.ɵɵelementEnd(),p.ɵɵtext(41,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(42,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(43,"\n "),p.ɵɵelementStart(44,"div",17),p.ɵɵtext(45,"\n "),p.ɵɵelement(46,"app-avatar",27),p.ɵɵtext(47,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(48,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(49,"\n "),p.ɵɵelementStart(50,"button",28),p.ɵɵtext(51,"\n "),p.ɵɵelement(52,"i",29),p.ɵɵpipe(53,"i18n"),p.ɵɵtext(54,"\n "),p.ɵɵelementStart(55,"span"),p.ɵɵtext(56),p.ɵɵpipe(57,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(58,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(59,"\n"),p.ɵɵelementEnd()}if(2&e){const e=p.ɵɵreference(1),t=p.ɵɵnextContext();p.ɵɵproperty("appApiAction",t.formPromise),p.ɵɵadvance(10),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(11,16,"organizationName")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",t.org.name)("disabled",t.selfHosted),p.ɵɵadvance(6),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(20,18,"billingEmail")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",t.org.billingEmail)("disabled",t.selfHosted||!t.canManageBilling),p.ɵɵadvance(6),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(29,20,"businessName")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",t.org.businessName)("disabled",t.selfHosted||!t.canManageBilling),p.ɵɵadvance(6),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(38,22,"identifier")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",t.org.identifier),p.ɵɵadvance(6),p.ɵɵpropertyInterpolate("data",t.org.name),p.ɵɵadvance(4),p.ɵɵproperty("disabled",e.loading),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(53,24,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(57,26,"save"))}}function D(e,t){if(1&e){const e=p.ɵɵgetCurrentView();p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"div",3),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"h1"),p.ɵɵtext(5),p.ɵɵpipe(6,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(7,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(8,"\n "),p.ɵɵelementStart(9,"p"),p.ɵɵtext(10),p.ɵɵpipe(11,"i18n"),p.ɵɵelementStart(12,"a",30),p.ɵɵtext(13),p.ɵɵpipe(14,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(15,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(16,"\n "),p.ɵɵelementStart(17,"button",31),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(e);return p.ɵɵnextContext().viewApiKey()})),p.ɵɵtext(18),p.ɵɵpipe(19,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(20,"\n "),p.ɵɵelementStart(21,"button",31),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(e);return p.ɵɵnextContext().rotateApiKey()})),p.ɵɵtext(22),p.ɵɵpipe(23,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(24,"\n"),p.ɵɵelementContainerEnd()}2&e&&(p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(6,5,"apiKey")),p.ɵɵadvance(5),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(11,7,"apiKeyDesc"),"\n "),p.ɵɵadvance(3),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(14,9,"learnMore"),"\n "),p.ɵɵadvance(5),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(19,11,"viewApiKey"),"\n "),p.ɵɵadvance(4),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(23,13,"rotateApiKey"),"\n "))}function R(e,t){1&e&&(p.ɵɵelementStart(0,"div"),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"i",12),p.ɵɵpipe(3,"i18n"),p.ɵɵtext(4,"\n "),p.ɵɵelementStart(5,"span",13),p.ɵɵtext(6),p.ɵɵpipe(7,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(8,"\n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(3,2,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(7,4,"loading")))}function F(e,t){if(1&e){const e=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"form",14,32),p.ɵɵlistener("ngSubmit",(function(){p.ɵɵrestoreView(e);return p.ɵɵnextContext().submitTaxInfo()})),p.ɵɵtext(2,"\n "),p.ɵɵelement(3,"app-tax-info"),p.ɵɵtext(4,"\n "),p.ɵɵelementStart(5,"button",28),p.ɵɵtext(6,"\n "),p.ɵɵelement(7,"i",29),p.ɵɵpipe(8,"i18n"),p.ɵɵtext(9,"\n "),p.ɵɵelementStart(10,"span"),p.ɵɵtext(11),p.ɵɵpipe(12,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(13,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(14,"\n"),p.ɵɵelementEnd()}if(2&e){const e=p.ɵɵreference(1),t=p.ɵɵnextContext();p.ɵɵproperty("appApiAction",t.taxFormPromise),p.ɵɵadvance(5),p.ɵɵproperty("disabled",e.loading),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(8,4,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(12,6,"save"))}}function U(e,t){}function V(e,t){}function N(e,t){}function _(e,t){}class j{constructor(e,t,n,i,r,o,a,s,l,c){this.modalService=e,this.apiService=t,this.i18nService=n,this.route=i,this.syncService=r,this.platformUtilsService=o,this.cryptoService=a,this.logService=s,this.router=l,this.organizationService=c,this.selfHosted=!1,this.canManageBilling=!0,this.loading=!0,this.canUseApi=!1}ngOnInit(){return i(this,void 0,void 0,(function*(){this.selfHosted=this.platformUtilsService.isSelfHost(),this.route.parent.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.organizationId=e.organizationId,this.canManageBilling=(yield this.organizationService.get(this.organizationId)).canManageBilling;try{this.org=yield this.apiService.getOrganization(this.organizationId),this.canUseApi=this.org.useApi}catch(t){this.logService.error(t)}})))),this.loading=!1}))}submit(){return i(this,void 0,void 0,(function*(){try{const e=new a.OrganizationUpdateRequest;if(e.name=this.org.name,e.businessName=this.org.businessName,e.billingEmail=this.org.billingEmail,e.identifier=this.org.identifier,!this.org.hasPublicAndPrivateKeys){const t=yield this.cryptoService.getOrgKey(this.organizationId),n=yield this.cryptoService.makeKeyPair(t);e.keys=new o.OrganizationKeysRequest(n[0],n[1].encryptedString)}this.formPromise=this.apiService.putOrganization(this.organizationId,e).then((()=>this.syncService.fullSync(!0))),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("organizationUpdated"))}catch(e){this.logService.error(e)}}))}submitTaxInfo(){return i(this,void 0,void 0,(function*(){this.taxFormPromise=this.taxInfo.submitTaxInfo(),yield this.taxFormPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("taxInfoUpdated"))}))}deleteOrganization(){return i(this,void 0,void 0,(function*(){yield this.modalService.openViewRef(d.DeleteOrganizationComponent,this.deleteModalRef,(e=>{e.organizationId=this.organizationId,e.onSuccess.subscribe((()=>{this.router.navigate(["/"])}))}))}))}purgeVault(){return i(this,void 0,void 0,(function*(){yield this.modalService.openViewRef(l.PurgeVaultComponent,this.purgeModalRef,(e=>{e.organizationId=this.organizationId}))}))}viewApiKey(){return i(this,void 0,void 0,(function*(){yield this.modalService.openViewRef(s.ApiKeyComponent,this.apiKeyModalRef,(e=>{e.keyType="organization",e.entityId=this.organizationId,e.postKey=this.apiService.postOrganizationApiKey.bind(this.apiService),e.scope="api.organization",e.grantType="client_credentials",e.apiKeyTitle="apiKey",e.apiKeyWarning="apiKeyWarning",e.apiKeyDescription="apiKeyDesc"}))}))}rotateApiKey(){return i(this,void 0,void 0,(function*(){yield this.modalService.openViewRef(s.ApiKeyComponent,this.rotateApiKeyModalRef,(e=>{e.keyType="organization",e.isRotation=!0,e.entityId=this.organizationId,e.postKey=this.apiService.postOrganizationRotateApiKey.bind(this.apiService),e.scope="api.organization",e.grantType="client_credentials",e.apiKeyTitle="apiKey",e.apiKeyWarning="apiKeyWarning",e.apiKeyDescription="apiKeyRotateDesc"}))}))}}t.AccountComponent=j,j.ɵfac=function(e){return new(e||j)(p.ɵɵdirectiveInject(u.ModalService),p.ɵɵdirectiveInject(m.ApiService),p.ɵɵdirectiveInject(h.I18nService),p.ɵɵdirectiveInject(v.ActivatedRoute),p.ɵɵdirectiveInject(f.SyncService),p.ɵɵdirectiveInject(g.PlatformUtilsService),p.ɵɵdirectiveInject(y.CryptoService),p.ɵɵdirectiveInject(x.LogService),p.ɵɵdirectiveInject(v.Router),p.ɵɵdirectiveInject(S.OrganizationService))},j.ɵcmp=p.ɵɵdefineComponent({type:j,selectors:[["app-org-account"]],viewQuery:function(e,t){if(1&e&&(p.ɵɵviewQuery(O,7,r.ViewContainerRef),p.ɵɵviewQuery(k,7,r.ViewContainerRef),p.ɵɵviewQuery(A,7,r.ViewContainerRef),p.ɵɵviewQuery(T,7,r.ViewContainerRef),p.ɵɵviewQuery(c.TaxInfoComponent,5)),2&e){let e;p.ɵɵqueryRefresh(e=p.ɵɵloadQuery())&&(t.deleteModalRef=e.first),p.ɵɵqueryRefresh(e=p.ɵɵloadQuery())&&(t.purgeModalRef=e.first),p.ɵɵqueryRefresh(e=p.ɵɵloadQuery())&&(t.apiKeyModalRef=e.first),p.ɵɵqueryRefresh(e=p.ɵɵloadQuery())&&(t.rotateApiKeyModalRef=e.first),p.ɵɵqueryRefresh(e=p.ɵɵloadQuery())&&(t.taxInfo=e.first)}},decls:65,vars:26,consts:[[1,"page-header"],[4,"ngIf"],["ngNativeValidate","",3,"appApiAction","ngSubmit",4,"ngIf"],[1,"secondary-header","border-0","mb-0"],[1,"secondary-header","text-danger","border-0","mb-0"],[1,"card","border-danger"],[1,"card-body"],["type","button",1,"btn","btn-outline-danger",3,"click"],["deleteOrganizationTemplate",""],["purgeOrganizationTemplate",""],["apiKeyTemplate",""],["rotateApiKeyTemplate",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"row"],[1,"col-6"],[1,"form-group"],["for","name"],["id","name","type","text","name","Name",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","billingEmail"],["id","billingEmail","type","text","name","BillingEmail",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","businessName"],["id","businessName","type","text","name","BusinessName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","identifier"],["id","identifier","type","text","name","Identifier",1,"form-control",3,"ngModel","ngModelChange"],["dynamic","true","size","75","fontSize","35",3,"data"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["href","https://docs.bitwarden.com","target","_blank","rel","noopener"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["formTax",""]],template:function(e,t){1&e&&(p.ɵɵelementStart(0,"div",0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"h1"),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(5,"\n"),p.ɵɵelementEnd(),p.ɵɵtext(6,"\n"),p.ɵɵtemplate(7,M,9,6,"div",1),p.ɵɵtext(8,"\n"),p.ɵɵtemplate(9,B,60,28,"form",2),p.ɵɵtext(10,"\n"),p.ɵɵtemplate(11,D,25,15,"ng-container",1),p.ɵɵtext(12,"\n"),p.ɵɵelementStart(13,"div",3),p.ɵɵtext(14,"\n "),p.ɵɵelementStart(15,"h1"),p.ɵɵtext(16),p.ɵɵpipe(17,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(18,"\n"),p.ɵɵelementEnd(),p.ɵɵtext(19,"\n"),p.ɵɵelementStart(20,"p"),p.ɵɵtext(21),p.ɵɵpipe(22,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(23,"\n"),p.ɵɵtemplate(24,R,9,6,"div",1),p.ɵɵtext(25,"\n"),p.ɵɵtemplate(26,F,15,8,"form",2),p.ɵɵtext(27,"\n"),p.ɵɵelementStart(28,"div",4),p.ɵɵtext(29,"\n "),p.ɵɵelementStart(30,"h1"),p.ɵɵtext(31),p.ɵɵpipe(32,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(33,"\n"),p.ɵɵelementEnd(),p.ɵɵtext(34,"\n"),p.ɵɵelementStart(35,"div",5),p.ɵɵtext(36,"\n "),p.ɵɵelementStart(37,"div",6),p.ɵɵtext(38,"\n "),p.ɵɵelementStart(39,"p"),p.ɵɵtext(40),p.ɵɵpipe(41,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(42,"\n "),p.ɵɵelementStart(43,"button",7),p.ɵɵlistener("click",(function(){return t.deleteOrganization()})),p.ɵɵtext(44),p.ɵɵpipe(45,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(46,"\n "),p.ɵɵelementStart(47,"button",7),p.ɵɵlistener("click",(function(){return t.purgeVault()})),p.ɵɵtext(48),p.ɵɵpipe(49,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(50,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(51,"\n"),p.ɵɵelementEnd(),p.ɵɵtext(52,"\n"),p.ɵɵtemplate(53,U,0,0,"ng-template",null,8,p.ɵɵtemplateRefExtractor),p.ɵɵtext(55,"\n"),p.ɵɵtemplate(56,V,0,0,"ng-template",null,9,p.ɵɵtemplateRefExtractor),p.ɵɵtext(58,"\n"),p.ɵɵtemplate(59,N,0,0,"ng-template",null,10,p.ɵɵtemplateRefExtractor),p.ɵɵtext(61,"\n"),p.ɵɵtemplate(62,_,0,0,"ng-template",null,11,p.ɵɵtemplateRefExtractor),p.ɵɵtext(64,"\n")),2&e&&(p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(4,12,"myOrganization")),p.ɵɵadvance(4),p.ɵɵproperty("ngIf",t.loading),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",t.org&&!t.loading),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",t.canUseApi),p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(17,14,"taxInformation")),p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(22,16,"taxInformationDesc")),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",!t.org||t.loading),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",t.org&&!t.loading),p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(32,18,"dangerZone")),p.ɵɵadvance(9),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(41,20,"dangerZoneDesc")),p.ɵɵadvance(4),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(45,22,"deleteOrganization"),"\n "),p.ɵɵadvance(4),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(49,24,"purgeVault"),"\n "))},directives:[b.NgIf,w.NgControlStatusGroup,w.NgForm,C.ApiActionDirective,w.DefaultValueAccessor,w.NgControlStatus,w.NgModel,I.AvatarComponent,E.TaxInfoComponent],pipes:[P.I18nPipe],encapsulation:2})},76137:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AdjustSubscription=void 0;const r=n(32621),o=(n(91674),n(51554),n(36631),n(73828),n(83828)),a=n(32621),s=n(91674),l=n(51554),c=n(73828),d=n(36631),p=n(96832),u=n(56820),m=n(17337),h=n(99729),v=n(57490);class f{constructor(e,t,n,i){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.logService=i,this.seatPrice=0,this.interval="year",this.onAdjusted=new r.EventEmitter}ngOnInit(){this.limitSubscription=null!=this.maxAutoscaleSeats,this.newSeatCount=this.currentSeatCount,this.newMaxSeats=this.maxAutoscaleSeats}submit(){return i(this,void 0,void 0,(function*(){try{const e=this.newSeatCount-this.currentSeatCount,t=new o.OrganizationSubscriptionUpdateRequest(e,this.newMaxSeats);this.formPromise=this.apiService.postOrganizationUpdateSubscription(this.organizationId,t),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("subscriptionUpdated"))}catch(e){this.logService.error(e)}this.onAdjusted.emit()}))}limitSubscriptionChanged(){this.limitSubscription||(this.newMaxSeats=null)}get adjustedSeatTotal(){return this.newSeatCount*this.seatPrice}get maxSeatTotal(){return this.newMaxSeats*this.seatPrice}}t.AdjustSubscription=f,f.ɵfac=function(e){return new(e||f)(a.ɵɵdirectiveInject(s.ApiService),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(c.PlatformUtilsService),a.ɵɵdirectiveInject(d.LogService))},f.ɵcmp=a.ɵɵdefineComponent({type:f,selectors:[["app-adjust-subscription"]],inputs:{organizationId:"organizationId",maxAutoscaleSeats:"maxAutoscaleSeats",currentSeatCount:"currentSeatCount",seatPrice:"seatPrice",interval:"interval"},outputs:{onAdjusted:"onAdjusted"},decls:82,vars:57,consts:[["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"row"],[1,"form-group","col-6"],["for","newSeatCount"],["id","newSeatCount","type","number","name","NewSeatCount","min","0","step","1","required","",1,"form-control",3,"ngModel","ngModelChange"],[1,"d-block","text-muted","mb-4"],[1,"row","mb-4"],[1,"form-group","col-sm"],[1,"form-check"],["id","limitSubscription","type","checkbox","name","LimitSubscription",1,"form-check-input",3,"ngModel","ngModelChange","change"],["for","limitSubscription"],[1,"d-block","text-muted"],[1,"row","mb-4",3,"hidden"],["for","maxAutoscaleSeats"],["id","maxAutoscaleSeats","type","number","name","MaxAutoscaleSeats","step","1",1,"form-control","col-6",3,"ngModel","min","required","ngModelChange"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[3,"showMethods"]],template:function(e,t){if(1&e&&(a.ɵɵelementStart(0,"form",0,1),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(2,"\n "),a.ɵɵelementStart(3,"div"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"div",2),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"div",3),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"label",4),a.ɵɵtext(10),a.ɵɵpipe(11,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n "),a.ɵɵelementStart(13,"input",5),a.ɵɵlistener("ngModelChange",(function(e){return t.newSeatCount=e})),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementStart(15,"small",6),a.ɵɵtext(16,"\n "),a.ɵɵelementStart(17,"strong"),a.ɵɵtext(18),a.ɵɵpipe(19,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(20),a.ɵɵpipe(21,"currency"),a.ɵɵpipe(22,"currency"),a.ɵɵpipe(23,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(24,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(25,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(26,"\n "),a.ɵɵelementStart(27,"div",7),a.ɵɵtext(28,"\n "),a.ɵɵelementStart(29,"div",8),a.ɵɵtext(30,"\n "),a.ɵɵelementStart(31,"div",9),a.ɵɵtext(32,"\n "),a.ɵɵelementStart(33,"input",10),a.ɵɵlistener("ngModelChange",(function(e){return t.limitSubscription=e}))("change",(function(){return t.limitSubscriptionChanged()})),a.ɵɵelementEnd(),a.ɵɵtext(34,"\n "),a.ɵɵelementStart(35,"label",11),a.ɵɵtext(36),a.ɵɵpipe(37,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(38,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(39,"\n "),a.ɵɵelementStart(40,"small",12),a.ɵɵtext(41),a.ɵɵpipe(42,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(43,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(44,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(45,"\n "),a.ɵɵelementStart(46,"div",13),a.ɵɵtext(47,"\n "),a.ɵɵelementStart(48,"div",8),a.ɵɵtext(49,"\n "),a.ɵɵelementStart(50,"label",14),a.ɵɵtext(51),a.ɵɵpipe(52,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(53,"\n "),a.ɵɵelementStart(54,"input",15),a.ɵɵlistener("ngModelChange",(function(e){return t.newMaxSeats=e})),a.ɵɵelementEnd(),a.ɵɵtext(55,"\n "),a.ɵɵelementStart(56,"small",12),a.ɵɵtext(57,"\n "),a.ɵɵelementStart(58,"strong"),a.ɵɵtext(59),a.ɵɵpipe(60,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(61),a.ɵɵpipe(62,"currency"),a.ɵɵpipe(63,"currency"),a.ɵɵpipe(64,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(65,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(66,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(67,"\n "),a.ɵɵelementStart(68,"button",16),a.ɵɵtext(69,"\n "),a.ɵɵelement(70,"i",17),a.ɵɵpipe(71,"i18n"),a.ɵɵtext(72,"\n "),a.ɵɵelementStart(73,"span"),a.ɵɵtext(74),a.ɵɵpipe(75,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(76,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(77,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(78,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(79,"\n"),a.ɵɵelement(80,"app-payment",18),a.ɵɵtext(81,"\n")),2&e){const e=a.ɵɵreference(1);a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(10),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(11,25,"subscriptionSeats")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",t.newSeatCount),a.ɵɵadvance(5),a.ɵɵtextInterpolate1("",a.ɵɵpipeBind1(19,27,"total"),":"),a.ɵɵadvance(2),a.ɵɵtextInterpolate4(" ",t.newSeatCount||0," ×\n ",a.ɵɵpipeBind2(21,29,t.seatPrice,"$")," = ",a.ɵɵpipeBind2(22,32,t.adjustedSeatTotal,"$")," /\n ",a.ɵɵpipeBind1(23,35,t.interval),"\n "),a.ɵɵadvance(13),a.ɵɵproperty("ngModel",t.limitSubscription),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(37,37,"limitSubscription")),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(42,39,"limitSubscriptionDesc")),a.ɵɵadvance(5),a.ɵɵproperty("hidden",!t.limitSubscription),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(52,41,"maxSeatLimit")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",t.newMaxSeats)("min",null==t.newSeatCount?1:t.newSeatCount)("required",t.limitSubscription),a.ɵɵadvance(5),a.ɵɵtextInterpolate1("",a.ɵɵpipeBind1(60,43,"maxSeatCost"),":"),a.ɵɵadvance(2),a.ɵɵtextInterpolate4(" ",t.newMaxSeats||0," ×\n ",a.ɵɵpipeBind2(62,45,t.seatPrice,"$")," = ",a.ɵɵpipeBind2(63,48,t.maxSeatTotal,"$")," /\n ",a.ɵɵpipeBind1(64,51,t.interval),"\n "),a.ɵɵadvance(7),a.ɵɵproperty("disabled",e.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(71,53,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(75,55,"save")),a.ɵɵadvance(6),a.ɵɵproperty("showMethods",!1)}},directives:[p.NgControlStatusGroup,p.NgForm,u.ApiActionDirective,p.MinValidator,p.NumberValueAccessor,p.DefaultValueAccessor,p.RequiredValidator,p.NgControlStatus,p.NgModel,p.CheckboxControlValueAccessor,m.PaymentComponent],pipes:[h.I18nPipe,v.CurrencyPipe],encapsulation:2})},73738:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BillingSyncApiKeyComponent=void 0;n(91674),n(51554),n(73828),n(57055);const r=n(43497),o=n(32137),a=n(32621),s=n(57055),l=n(91674),c=n(73828),d=n(51554),p=n(96832),u=n(56820),m=n(8863),h=n(57490),v=n(4158),f=n(51626),g=n(99729);function y(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"app-user-verification",15),a.ɵɵlistener("ngModelChange",(function(t){a.ɵɵrestoreView(e);return a.ɵɵnextContext().masterPassword=t})),a.ɵɵtext(1,"\n "),a.ɵɵelementEnd()}if(2&e){const e=a.ɵɵnextContext();a.ɵɵproperty("ngModel",e.masterPassword)}}function x(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"p"),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"app-callout",16),a.ɵɵtext(7),a.ɵɵpipe(8,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(9,"\n "),a.ɵɵelementContainerEnd()),2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,2,"rotateBillingSyncTokenTitle")),a.ɵɵadvance(4),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(8,4,"rotateBillingSyncTokenWarning"),"\n "))}function S(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",25),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"b",26),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5),a.ɵɵpipe(6,"date"),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext(2);a.ɵɵadvance(3),a.ɵɵtextInterpolate1("",a.ɵɵpipeBind1(4,2,"lastSync"),":"),a.ɵɵadvance(2),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind2(6,4,e.lastSyncDate,"medium"),"\n ")}}function b(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",27),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",28),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext(2);a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind2(4,1,1===e.daysBetween?"awaitingSyncSingular":"awaitingSyncPlural",e.daysBetween),"\n ")}}function w(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"div"),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"p"),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"label",17),a.ɵɵtext(7,"Billing Sync Key"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"div",18),a.ɵɵtext(10,"\n "),a.ɵɵelementStart(11,"input",19),a.ɵɵlistener("ngModelChange",(function(t){a.ɵɵrestoreView(e);return a.ɵɵnextContext().clientSecret=t})),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n "),a.ɵɵelementStart(13,"div",20),a.ɵɵtext(14,"\n "),a.ɵɵelementStart(15,"button",21),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);return a.ɵɵnextContext().copy()})),a.ɵɵpipe(16,"i18n"),a.ɵɵtext(17,"\n "),a.ɵɵelement(18,"i",22),a.ɵɵtext(19,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(20,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(21,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(22,"\n "),a.ɵɵtemplate(23,S,7,7,"div",23),a.ɵɵtext(24,"\n "),a.ɵɵtemplate(25,b,5,4,"div",24),a.ɵɵtext(26,"\n "),a.ɵɵelementEnd()}if(2&e){const e=a.ɵɵnextContext();a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,5,"copyPasteBillingSync")),a.ɵɵadvance(8),a.ɵɵproperty("ngModel",e.clientSecret),a.ɵɵadvance(4),a.ɵɵproperty("appA11yTitle",a.ɵɵpipeBind1(16,7,"copy")),a.ɵɵadvance(8),a.ɵɵproperty("ngIf",e.showLastSyncText),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.showAwaitingSyncText)}}function C(e,t){1&e&&(a.ɵɵelement(0,"i",31),a.ɵɵpipe(1,"i18n")),2&e&&a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(1,1,"loading"))}function I(e,t){if(1&e&&(a.ɵɵelementStart(0,"button",29),a.ɵɵtext(1,"\n "),a.ɵɵtemplate(2,C,2,3,"i",30),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"span"),a.ɵɵtext(5),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n "),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext(),t=a.ɵɵreference(5);a.ɵɵproperty("disabled",t.loading),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.loading),a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",e.submitButtonText,"\n ")}}function E(e,t){1&e&&(a.ɵɵelementStart(0,"button",32),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(2,1,"close"),"\n "))}function P(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"button",33),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);return a.ɵɵnextContext().cancelRotate()})),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(2,1,"cancel"),"\n "))}function O(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"button",33),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);return a.ɵɵnextContext().rotateToken()})),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(2,1,"rotateToken"),"\n "))}class k{constructor(e,t,n,i){this.userVerificationService=e,this.apiService=t,this.platformUtilsService=n,this.i18nService=i,this.lastSyncDate=null}copy(){this.platformUtilsService.copyToClipboard(this.clientSecret)}submit(){return i(this,void 0,void 0,(function*(){if(this.showRotateScreen){this.formPromise=this.userVerificationService.buildRequest(this.masterPassword,o.OrganizationApiKeyRequest).then((e=>(e.type=r.OrganizationApiKeyType.BillingSync,this.apiService.postOrganizationRotateApiKey(this.organizationId,e))));const e=yield this.formPromise;yield this.load(e),this.showRotateScreen=!1,this.platformUtilsService.showToast("success",null,this.i18nService.t("billingSyncApiKeyRotated"))}else{this.formPromise=this.userVerificationService.buildRequest(this.masterPassword,o.OrganizationApiKeyRequest).then((e=>(e.type=r.OrganizationApiKeyType.BillingSync,this.apiService.postOrganizationApiKey(this.organizationId,e))));const e=yield this.formPromise;yield this.load(e)}}))}load(e){return i(this,void 0,void 0,(function*(){this.clientSecret=e.apiKey,this.keyRevisionDate=e.revisionDate,this.hasBillingToken=!0;const t=yield this.apiService.getSponsorshipSyncStatus(this.organizationId);this.lastSyncDate=t.lastSyncDate}))}cancelRotate(){this.showRotateScreen=!1}rotateToken(){this.showRotateScreen=!0}dayDiff(e,t){const n=Math.abs(t.getTime()-e.getTime());return Math.round(n/864e5)}get submitButtonText(){return this.showRotateScreen?this.i18nService.t("rotateToken"):this.i18nService.t(this.hasBillingToken?"continue":"generateToken")}get showLastSyncText(){return this.lastSyncDate&&this.lastSyncDate>this.keyRevisionDate}get showAwaitingSyncText(){return this.lastSyncDate&&this.lastSyncDate<=this.keyRevisionDate}get daysBetween(){return this.dayDiff(this.keyRevisionDate,new Date)}}t.BillingSyncApiKeyComponent=k,k.ɵfac=function(e){return new(e||k)(a.ɵɵdirectiveInject(s.UserVerificationService),a.ɵɵdirectiveInject(l.ApiService),a.ɵɵdirectiveInject(c.PlatformUtilsService),a.ɵɵdirectiveInject(d.I18nService))},k.ɵcmp=a.ɵɵdefineComponent({type:k,selectors:[["app-billing-sync-api-key"]],decls:44,vars:14,consts:[["role","dialog","aria-modal","true","aria-labelledby","billingSyncApiKeyTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","billingSyncApiKeyTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["ngDefaultControl","","name","secret",3,"ngModel","ngModelChange",4,"ngIf"],[4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled",4,"ngIf"],["type","button","class","btn btn-outline-secondary","data-dismiss","modal",4,"ngIf"],["type","button","class","btn btn-outline-secondary",3,"click",4,"ngIf"],["ngDefaultControl","","name","secret",3,"ngModel","ngModelChange"],["type","warning"],["for","clientSecret"],[1,"input-group"],["id","clientSecret","type","text","name","clientSecret","disabled","",1,"form-control","text-monospace",3,"ngModel","ngModelChange"],[1,"input-group-append"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-clone"],["class","small text-muted mt-2",4,"ngIf"],["class","small text-danger mt-2",4,"ngIf"],[1,"small","text-muted","mt-2"],[1,"font-weight-semibold"],[1,"small","text-danger","mt-2"],[1,"bwi","bwi-error"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["class","bwi bwi-spinner bwi-spin",3,"title",4,"ngIf"],[1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["type","button",1,"btn","btn-outline-secondary",3,"click"]],template:function(e,t){1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",1),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"form",2,3),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"div",4),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"h2",5),a.ɵɵtext(10),a.ɵɵpipe(11,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n "),a.ɵɵelementStart(13,"button",6),a.ɵɵpipe(14,"i18n"),a.ɵɵtext(15,"\n "),a.ɵɵelementStart(16,"span",7),a.ɵɵtext(17,"×"),a.ɵɵelementEnd(),a.ɵɵtext(18,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(19,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(20,"\n "),a.ɵɵelementStart(21,"div",8),a.ɵɵtext(22,"\n "),a.ɵɵtemplate(23,y,2,1,"app-user-verification",9),a.ɵɵtext(24,"\n "),a.ɵɵtemplate(25,x,10,6,"ng-container",10),a.ɵɵtext(26,"\n\n "),a.ɵɵtemplate(27,w,27,9,"div",10),a.ɵɵtext(28,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(29,"\n "),a.ɵɵelementStart(30,"div",11),a.ɵɵtext(31,"\n "),a.ɵɵtemplate(32,I,7,3,"button",12),a.ɵɵtext(33,"\n "),a.ɵɵtemplate(34,E,3,3,"button",13),a.ɵɵtext(35,"\n "),a.ɵɵtemplate(36,P,3,3,"button",14),a.ɵɵtext(37,"\n "),a.ɵɵtemplate(38,O,3,3,"button",14),a.ɵɵtext(39,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(40,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(41,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(42,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(43,"\n")),2&e&&(a.ɵɵadvance(4),a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(6),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(11,10,t.hasBillingToken?"viewBillingSyncToken":"generateBillingSyncToken"),"\n "),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(14,12,"close")),a.ɵɵadvance(10),a.ɵɵproperty("ngIf",!t.clientSecret),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.clientSecret&&t.showRotateScreen),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.clientSecret&&!t.showRotateScreen),a.ɵɵadvance(5),a.ɵɵproperty("ngIf",!t.clientSecret||t.showRotateScreen),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!t.showRotateScreen),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.showRotateScreen),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.clientSecret&&!t.showRotateScreen))},directives:[p.NgControlStatusGroup,p.NgForm,u.ApiActionDirective,m.A11yTitleDirective,h.NgIf,v.UserVerificationComponent,p.DefaultValueAccessor,p.NgControlStatus,p.NgModel,f.CalloutComponent],pipes:[g.I18nPipe,h.DatePipe],encapsulation:2})},61857:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ChangePlanComponent=void 0;const r=n(32621),o=(n(36631),n(47937)),a=n(96066),s=n(32621),l=n(36631),c=n(8863),d=n(28360),p=n(99729);class u{constructor(e){this.logService=e,this.onChanged=new r.EventEmitter,this.onCanceled=new r.EventEmitter,this.defaultUpgradePlan=o.PlanType.FamiliesAnnually,this.defaultUpgradeProduct=a.ProductType.Families}submit(){return i(this,void 0,void 0,(function*(){try{this.onChanged.emit()}catch(e){this.logService.error(e)}}))}cancel(){this.onCanceled.emit()}}t.ChangePlanComponent=u,u.ɵfac=function(e){return new(e||u)(s.ɵɵdirectiveInject(l.LogService))},u.ɵcmp=s.ɵɵdefineComponent({type:u,selectors:[["app-change-plan"]],inputs:{organizationId:"organizationId"},outputs:{onChanged:"onChanged",onCanceled:"onCanceled"},decls:24,vars:14,consts:[[1,"card","card-org-plans"],[1,"card-body"],["type","button",1,"close",3,"appA11yTitle","click"],["aria-hidden","true"],[1,"card-body-header"],[1,"mb-0"],[3,"showFree","showCancel","plan","product","organizationId","onCanceled"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",1),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"button",2),s.ɵɵlistener("click",(function(){return t.cancel()})),s.ɵɵpipe(5,"i18n"),s.ɵɵtext(6,"\n "),s.ɵɵelementStart(7,"span",3),s.ɵɵtext(8,"×"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n "),s.ɵɵelementStart(11,"h2",4),s.ɵɵtext(12),s.ɵɵpipe(13,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"p",5),s.ɵɵtext(16),s.ɵɵpipe(17,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"app-organization-plans",6),s.ɵɵlistener("onCanceled",(function(){return t.cancel()})),s.ɵɵtext(20,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(23,"\n")),2&e&&(s.ɵɵadvance(4),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(5,8,"cancel")),s.ɵɵadvance(8),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(13,10,"changeBillingPlan")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(17,12,"changeBillingPlanUpgrade")),s.ɵɵadvance(3),s.ɵɵproperty("showFree",!1)("showCancel",!0)("plan",t.defaultUpgradePlan)("product",t.defaultUpgradeProduct)("organizationId",t.organizationId))},directives:[c.A11yTitleDirective,d.OrganizationPlansComponent],pipes:[p.I18nPipe],encapsulation:2})},5092:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteOrganizationComponent=void 0;const r=n(32621),o=(n(91674),n(45330),n(51554),n(36631),n(63513),n(73828),n(57055),n(32773)),a=n(82769),s=n(32621),l=n(91674),c=n(51554),d=n(73828),p=n(57055),u=n(36631),m=n(45330),h=n(63513),v=n(57490),f=n(96832),g=n(56820),y=n(8863),x=n(51626),S=n(4158),b=n(99729);function w(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,1,"orgCreatedSponsorshipInvalid"),"\n "))}function C(e,t){if(1&e&&(s.ɵɵelementStart(0,"li"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e){const e=t.$implicit;s.ɵɵadvance(1),s.ɵɵtextInterpolate2("\n ",e.count," ",s.ɵɵpipeBind1(2,2,e.localizationKey),"\n ")}}function I(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementStart(3,"ul"),s.ɵɵtext(4,"\n "),s.ɵɵtemplate(5,C,3,4,"li",20),s.ɵɵtext(6,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementContainerEnd()),2&e){const e=s.ɵɵnextContext(3);s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind2(2,3,"deletingOrganizationContentWarning",e.organizationName),"\n "),s.ɵɵadvance(4),s.ɵɵproperty("ngForOf",e.organizationContentSummary.itemCountByType),s.ɵɵadvance(2),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(8,6,"deletingOrganizationActiveUserAccountsWarning"),"\n ")}}function E(e,t){if(1&e&&(s.ɵɵtext(0,"\n "),s.ɵɵtemplate(1,I,9,8,"ng-container",19),s.ɵɵtext(2,"\n ")),2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(1),s.ɵɵproperty("ngIf",e.organizationContentSummary.totalItemCount>0)}}function P(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"form",3,4),s.ɵɵlistener("ngSubmit",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().submit()})),s.ɵɵtext(2,"\n "),s.ɵɵelementStart(3,"div",5),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"h2",6),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"button",7),s.ɵɵpipe(10,"i18n"),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"span",8),s.ɵɵtext(13,"×"),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(15,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(16,"\n "),s.ɵɵelementStart(17,"div",9),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"app-callout",10),s.ɵɵtext(20),s.ɵɵpipe(21,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵelementStart(23,"p",11),s.ɵɵtext(24,"\n "),s.ɵɵtemplate(25,w,3,3,"ng-container",12),s.ɵɵtext(26,"\n "),s.ɵɵtemplate(27,E,3,1,"ng-template",null,13,s.ɵɵtemplateRefExtractor),s.ɵɵtext(29,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(30,"\n "),s.ɵɵelementStart(31,"app-user-verification",14),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().masterPassword=t})),s.ɵɵtext(32,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(33,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(34,"\n "),s.ɵɵelementStart(35,"div",15),s.ɵɵtext(36,"\n "),s.ɵɵelementStart(37,"button",16),s.ɵɵtext(38,"\n "),s.ɵɵelement(39,"i",17),s.ɵɵpipe(40,"i18n"),s.ɵɵtext(41,"\n "),s.ɵɵelementStart(42,"span"),s.ɵɵtext(43),s.ɵɵpipe(44,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(45,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(46,"\n "),s.ɵɵelementStart(47,"button",18),s.ɵɵtext(48),s.ɵɵpipe(49,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(50,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(51,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵreference(1),t=s.ɵɵreference(28),n=s.ɵɵnextContext();s.ɵɵproperty("appApiAction",n.formPromise),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,11,"deleteOrganization")),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(10,13,"close")),s.ɵɵadvance(11),s.ɵɵtextInterpolate(s.ɵɵpipeBind2(21,15,"deletingOrganizationIsPermanentWarning",n.organizationName)),s.ɵɵadvance(5),s.ɵɵproperty("ngIf","InvalidFamiliesForEnterprise"===n.deleteOrganizationRequestType)("ngIfElse",t),s.ɵɵadvance(6),s.ɵɵproperty("ngModel",n.masterPassword),s.ɵɵadvance(6),s.ɵɵproperty("disabled",e.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(40,18,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(44,20,"deleteOrganization")),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(49,22,"close"),"\n ")}}class O{constructor(e,t){this.singular=e,this.plural=t}getKey(e){return 1==e?this.singular:this.plural}}class k{constructor(e,t){this.count=e,this.localizationKeyOptions=t}get localizationKey(){return this.localizationKeyOptions.getKey(this.count)}}class A{constructor(){this.totalItemCount=0,this.itemCountByType=[]}}class T{constructor(e,t,n,i,o,a,s){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.userVerificationService=i,this.logService=o,this.cipherService=a,this.organizationService=s,this.deleteOrganizationRequestType="RegularDelete",this.organizationContentSummary=new A,this.onSuccess=new r.EventEmitter}ngOnInit(){return i(this,void 0,void 0,(function*(){yield this.load()}))}submit(){return i(this,void 0,void 0,(function*(){try{this.formPromise=this.userVerificationService.buildRequest(this.masterPassword).then((e=>this.apiService.deleteOrganization(this.organizationId,e))),yield this.formPromise,this.platformUtilsService.showToast("success",this.i18nService.t("organizationDeleted"),this.i18nService.t("organizationDeletedDesc")),this.onSuccess.emit()}catch(e){this.logService.error(e)}}))}load(){return i(this,void 0,void 0,(function*(){this.organizationName=(yield this.organizationService.get(this.organizationId)).name,this.organizationContentSummary=yield this.buildOrganizationContentSummary(),this.loaded=!0}))}buildOrganizationContentSummary(){return i(this,void 0,void 0,(function*(){const e=new A,t=(yield this.cipherService.getAllFromApiForOrganization(this.organizationId)).filter((e=>null==e.deletedDate));if(t.length<1)return e;e.totalItemCount=t.length;for(const n of a.Utils.iterateEnum(o.CipherType)){const i=this.getOrganizationItemCountByType(t,n);i>0&&e.itemCountByType.push(new k(i,this.getOrganizationItemLocalizationKeysByType(o.CipherType[n])))}return e}))}getOrganizationItemCountByType(e,t){return e.filter((e=>e.type==t)).length}getOrganizationItemLocalizationKeysByType(e){return new O(`type${e}`,`type${e}Plural`)}}t.DeleteOrganizationComponent=T,T.ɵfac=function(e){return new(e||T)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(d.PlatformUtilsService),s.ɵɵdirectiveInject(p.UserVerificationService),s.ɵɵdirectiveInject(u.LogService),s.ɵɵdirectiveInject(m.CipherService),s.ɵɵdirectiveInject(h.OrganizationService))},T.ɵcmp=s.ɵɵdefineComponent({type:T,selectors:[["app-delete-organization"]],outputs:{onSuccess:"onSuccess"},decls:8,vars:1,consts:[["role","dialog","aria-modal","true","aria-labelledby","deleteOrganizationTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],["class","modal-content","ngNativeValidate","",3,"appApiAction","ngSubmit",4,"ngIf"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","deleteOrganizationTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["type","warning"],["id","organizationDeleteDescription"],[4,"ngIf","ngIfElse"],["regularDelete",""],["ngDefaultControl","","name","secret",3,"ngModel","ngModelChange"],[1,"modal-footer"],["type","submit",1,"btn","btn-danger","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[4,"ngIf"],[4,"ngFor","ngForOf"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",1),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,P,52,24,"form",2),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n")),2&e&&(s.ɵɵadvance(4),s.ɵɵproperty("ngIf",t.loaded))},directives:[v.NgIf,f.NgControlStatusGroup,f.NgForm,g.ApiActionDirective,y.A11yTitleDirective,x.CalloutComponent,S.UserVerificationComponent,f.DefaultValueAccessor,f.NgControlStatus,f.NgModel,v.NgForOf],pipes:[b.I18nPipe],encapsulation:2})},24547:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadLicenseComponent=void 0;const r=n(32621),o=(n(91674),n(36631),n(73828),n(32621)),a=n(91674),s=n(73828),l=n(36631),c=n(96832),d=n(56820),p=n(8863),u=n(99729);class m{constructor(e,t,n){this.apiService=e,this.platformUtilsService=t,this.logService=n,this.onDownloaded=new r.EventEmitter,this.onCanceled=new r.EventEmitter}submit(){return i(this,void 0,void 0,(function*(){if(null!=this.installationId&&""!==this.installationId)try{this.formPromise=this.apiService.getOrganizationLicense(this.organizationId,this.installationId);const e=yield this.formPromise,t=JSON.stringify(e,null,2);this.platformUtilsService.saveFile(window,t,null,"bitwarden_organization_license.json"),this.onDownloaded.emit()}catch(e){this.logService.error(e)}}))}cancel(){this.onCanceled.emit()}}t.DownloadLicenseComponent=m,m.ɵfac=function(e){return new(e||m)(o.ɵɵdirectiveInject(a.ApiService),o.ɵɵdirectiveInject(s.PlatformUtilsService),o.ɵɵdirectiveInject(l.LogService))},m.ɵcmp=o.ɵɵdefineComponent({type:m,selectors:[["app-download-license"]],inputs:{organizationId:"organizationId"},outputs:{onDownloaded:"onDownloaded",onCanceled:"onCanceled"},decls:53,vars:24,consts:[["ngNativeValidate","",1,"card",3,"appApiAction","ngSubmit"],["form",""],[1,"card-body"],["type","button",1,"close",3,"appA11yTitle","click"],["aria-hidden","true"],[1,"card-body-header"],[1,"row"],[1,"form-group","col-6"],[1,"d-flex"],["for","installationId"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/licensing-on-premise/#organization-account-sharing",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],["id","installationId","type","text","name","InstallationId","required","",1,"form-control",3,"ngModel","ngModelChange"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button",1,"btn","btn-outline-secondary",3,"click"]],template:function(e,t){if(1&e&&(o.ɵɵelementStart(0,"form",0,1),o.ɵɵlistener("ngSubmit",(function(){return t.submit()})),o.ɵɵtext(2,"\n "),o.ɵɵelementStart(3,"div",2),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"button",3),o.ɵɵlistener("click",(function(){return t.cancel()})),o.ɵɵpipe(6,"i18n"),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"span",4),o.ɵɵtext(9,"×"),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"h3",5),o.ɵɵtext(13),o.ɵɵpipe(14,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"div",6),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"div",7),o.ɵɵtext(19,"\n "),o.ɵɵelementStart(20,"div",8),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"label",9),o.ɵɵtext(23),o.ɵɵpipe(24,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵelementStart(26,"a",10),o.ɵɵpipe(27,"i18n"),o.ɵɵtext(28,"\n "),o.ɵɵelement(29,"i",11),o.ɵɵtext(30,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(31,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(32,"\n "),o.ɵɵelementStart(33,"input",12),o.ɵɵlistener("ngModelChange",(function(e){return t.installationId=e})),o.ɵɵelementEnd(),o.ɵɵtext(34,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(35,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(36,"\n "),o.ɵɵelementStart(37,"button",13),o.ɵɵtext(38,"\n "),o.ɵɵelement(39,"i",14),o.ɵɵpipe(40,"i18n"),o.ɵɵtext(41,"\n "),o.ɵɵelementStart(42,"span"),o.ɵɵtext(43),o.ɵɵpipe(44,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(45,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(46,"\n "),o.ɵɵelementStart(47,"button",15),o.ɵɵlistener("click",(function(){return t.cancel()})),o.ɵɵtext(48),o.ɵɵpipe(49,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(50,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(51,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(52,"\n")),2&e){const e=o.ɵɵreference(1);o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(5),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(6,10,"cancel")),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(14,12,"downloadLicense")),o.ɵɵadvance(10),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(24,14,"enterInstallationId")),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(27,16,"learnMore")),o.ɵɵadvance(7),o.ɵɵproperty("ngModel",t.installationId),o.ɵɵadvance(4),o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(40,18,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(44,20,"submit")),o.ɵɵadvance(5),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(49,22,"cancel"),"\n ")}},directives:[c.NgControlStatusGroup,c.NgForm,d.ApiActionDirective,p.A11yTitleDirective,c.DefaultValueAccessor,c.RequiredValidator,c.NgControlStatus,c.NgModel],pipes:[u.I18nPipe],encapsulation:2})},75051:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImageSubscriptionHiddenComponent=void 0;const i=n(32621);class r{}t.ImageSubscriptionHiddenComponent=r,r.ɵfac=function(e){return new(e||r)},r.ɵcmp=i.ɵɵdefineComponent({type:r,selectors:[["app-image-org-subscription-hidden"]],decls:38,vars:0,consts:[["width","216","height","231","viewBox","0 0 216 231","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M133.356 85.6618C133.136 85.43 132.871 85.2457 132.577 85.1198C132.283 84.9939 131.968 84.93 131.648 84.9318H87.8482C87.5289 84.93 87.2113 84.9939 86.9175 85.1198C86.6237 85.2457 86.359 85.43 86.14 85.6618C85.9083 85.8808 85.7239 86.1473 85.598 86.4411C85.4721 86.7349 85.4082 87.0506 85.41 87.37V116.57C85.4192 118.793 85.8499 120.994 86.6802 123.056C87.4705 125.091 88.5326 127.011 89.8375 128.761C91.1789 130.515 92.6808 132.137 94.3233 133.612C95.8472 135.01 97.4532 136.318 99.1304 137.528C100.59 138.565 102.123 139.547 103.729 140.474C105.335 141.401 106.469 142.027 107.131 142.354C107.799 142.682 108.339 142.941 108.741 143.113C109.055 143.264 109.4 143.339 109.748 143.332C110.091 143.337 110.431 143.257 110.737 143.102C111.146 142.923 111.679 142.671 112.354 142.343C113.03 142.014 114.179 141.386 115.756 140.463C117.333 139.539 118.884 138.554 120.355 137.517C122.034 136.306 123.642 134.999 125.169 133.601C126.814 132.128 128.316 130.504 129.655 128.75C130.958 126.998 132.021 125.08 132.813 123.045C133.645 120.983 134.075 118.782 134.083 116.559V87.3591C134.085 87.0415 134.021 86.7276 133.895 86.4356C133.769 86.1436 133.586 85.8808 133.356 85.6618ZM127.71 116.836C127.71 127.421 109.748 136.514 109.748 136.514V91.1879H127.71V116.836Z","fill","var(--color-secondary-700)"],["d","M24.6216 122.3C24.7144 123.4 25.6819 124.217 26.7825 124.125C27.8832 124.032 28.7002 123.064 28.6074 121.964L24.6216 122.3ZM151.501 45.7445C152.57 45.4679 153.213 44.3768 152.936 43.3074L148.429 25.8809C148.152 24.8115 147.061 24.1688 145.992 24.4454C144.922 24.722 144.28 25.8131 144.556 26.8825L148.563 42.3728L133.073 46.3793C132.003 46.6559 131.361 47.747 131.637 48.8164C131.914 49.8858 133.005 50.5285 134.074 50.2519L151.501 45.7445ZM28.6074 121.964C26.6788 99.0874 34.4658 75.5543 51.9661 58.054L49.1377 55.2256C30.7695 73.5938 22.5982 98.2999 24.6216 122.3L28.6074 121.964ZM51.9661 58.054C78.5404 31.4797 119.036 27.3026 149.985 45.5315L152.015 42.0849C119.534 22.9534 77.0327 27.3306 49.1377 55.2256L51.9661 58.054Z","fill","var(--color-secondary-700)"],["d","M67.4747 185.062C66.4089 185.352 65.7801 186.451 66.0701 187.517L70.797 204.885C71.0871 205.951 72.1862 206.58 73.252 206.29C74.3179 205.999 74.9467 204.9 74.6567 203.834L70.455 188.396L85.8934 184.194C86.9592 183.904 87.5881 182.805 87.298 181.739C87.008 180.674 85.9088 180.045 84.843 180.335L67.4747 185.062ZM192.478 100.283C192.286 99.1952 191.248 98.4697 190.16 98.6625C189.072 98.8552 188.347 99.8931 188.54 100.981L192.478 100.283ZM166.138 172.225C139.813 198.55 99.8271 202.897 68.9932 185.255L67.0068 188.727C99.3669 207.242 141.333 202.687 168.966 175.054L166.138 172.225ZM188.54 100.981C192.985 126.07 185.516 152.847 166.138 172.225L168.966 175.054C189.307 154.713 197.142 126.603 192.478 100.283L188.54 100.981Z","fill","var(--color-secondary-700)"],["d","M37.726 108.132C39.283 92.1931 46.1655 76.6765 58.3734 64.4686C75.2893 47.5527 98.5583 40.8618 120.5 44.396","stroke","var(--color-secondary-700)","stroke-width","2","stroke-linecap","round"],["d","M180.595 119.132C179.653 136.119 172.693 152.834 159.717 165.811C144.44 181.088 123.982 188.025 104 186.623","stroke","var(--color-secondary-700)","stroke-width","2","stroke-linecap","round"],["x","153.5","y","56.1317","width","49","height","34","rx","2.5","stroke","var(--color-secondary-700)","stroke-width","3"],["d","M153.5 63.6317V63.6317C153.5 66.9454 156.186 69.6317 159.5 69.6317H172.509M202.5 63.6317V63.6317C202.5 66.9454 199.814 69.6317 196.5 69.6317H183.491","stroke","var(--color-secondary-700)","stroke-width","3"],["id","path-8-inside-1_1000_26057","fill","white"],["x","172","y","65.6317","width","12","height","9","rx","1.25"],["x","172","y","65.6317","width","12","height","9","rx","1.25","stroke","var(--color-secondary-700)","stroke-width","6","mask","url(#path-8-inside-1_1000_26057)"],["d","M187 54.6317C187 54.6317 187 53.6317 187 52.6317C187 51.6317 186.053 50.6317 185.105 50.6317C184.158 50.6317 171.842 50.6317 170.895 50.6317C169.947 50.6317 169 51.6317 169 52.6317C169 53.6317 169 54.6317 169 54.6317","stroke","var(--color-secondary-700)","stroke-width","3"],["cx","48","cy","141","r","10.5","fill","var(--color-background)","stroke","var(--color-secondary-700)","stroke-width","3"],["d","M64.9935 168.5H64.9126H64.8318H64.7512H64.6708H64.5905H64.5104H64.4304H64.3506H64.2709H64.1914H64.1121H64.0329H63.9538H63.8749H63.7962H63.7176H63.6392H63.5609H63.4828H63.4048H63.3269H63.2492H63.1717H63.0943H63.017H62.9399H62.8629H62.7861H62.7094H62.6329H62.5565H62.4802H62.4041H62.3281H62.2523H62.1766H62.101H62.0256H61.9503H61.8751H61.8001H61.7252H61.6504H61.5758H61.5013H61.4269H61.3527H61.2786H61.2046H61.1308H61.0571H60.9835H60.91H60.8367H60.7635H60.6904H60.6175H60.5446H60.4719H60.3993H60.3269H60.2545H60.1823H60.1102H60.0382H59.9664H59.8946H59.823H59.7515H59.6801H59.6088H59.5376H59.4666H59.3956H59.3248H59.2541H59.1835H59.113H59.0426H58.9724H58.9022H58.8322H58.7622H58.6924H58.6226H58.553H58.4835H58.4141H58.3448H58.2756H58.2065H58.1375H58.0686H57.9998H57.9311H57.8625H57.794H57.7256H57.6572H57.589H57.5209H57.4529H57.385H57.3172H57.2494H57.1818H57.1142H57.0468H56.9794H56.9121H56.8449H56.7779H56.7108H56.6439H56.5771H56.5103H56.4437H56.3771H56.3106H56.2442H56.1779H56.1117H56.0455H55.9794H55.9134H55.8475H55.7817H55.7159H55.6502H55.5846H55.5191H55.4537H55.3883H55.323H55.2578H55.1926H55.1275H55.0625H54.9976H54.9328H54.868H54.8032H54.7386H54.674H54.6095H54.5451H54.4807H54.4164H54.3521H54.2879H54.2238H54.1598H54.0958H54.0318H53.968H53.9042H53.8404H53.7767H53.7131H53.6495H53.586H53.5226H53.4592H53.3958H53.3325H53.2693H53.2061H53.143H53.0799H53.0169H52.9539H52.891H52.8281H52.7653H52.7025H52.6398H52.5771H52.5145H52.4519H52.3894H52.3269H52.2645H52.202H52.1397H52.0774H52.0151H51.9528H51.8907H51.8285H51.7664H51.7043H51.6423H51.5803H51.5183H51.4564H51.3945H51.3326H51.2708H51.209H51.1472H51.0855H51.0238H50.9621H50.9005H50.8389H50.7773H50.7157H50.6542H50.5927H50.5312H50.4698H50.4084H50.347H50.2856H50.2243H50.1629H50.1016H50.0404H49.9791H49.9178H49.8566H49.7954H49.7342H49.6731H49.6119H49.5508H49.4896H49.4285H49.3674H49.3064H49.2453H49.1842H49.1232H49.0622H49.0011H48.9401H48.8791H48.8181H48.7571H48.6962H48.6352H48.5742H48.5133H48.4523H48.3913H48.3304H48.2694H48.2085H48.1475H48.0866H48.0257H47.9647H47.9038H47.8428H47.7819H47.7209H47.6599H47.599H47.538H47.477H47.416H47.3551H47.2941H47.2331H47.172H47.111H47.05H46.9889H46.9279H46.8668H46.8057H46.7446H46.6835H46.6224H46.5612H46.5001H46.4389H46.3777H46.3165H46.2553H46.194H46.1328H46.0715H46.0102H45.9489H45.8875H45.8261H45.7647H45.7033H45.6418H45.5804H45.5189H45.4573H45.3958H45.3342H45.2726H45.2109H45.1493H45.0876H45.0258H44.9641H44.9023H44.8404H44.7786H44.7166H44.6547H44.5927H44.5307H44.4687H44.4066H44.3445H44.2823H44.2201H44.1578H44.0956H44.0332H43.9709H43.9084H43.846H43.7835H43.7209H43.6583H43.5957H43.533H43.4703H43.4075H43.3447H43.2818H43.2189H43.1559H43.0929H43.0298H42.9666H42.9034H42.8402H42.7769H42.7135H42.6501H42.5867H42.5231H42.4596H42.3959H42.3322H42.2685H42.2046H42.1408H42.0768H42.0128H41.9487H41.8846H41.8204H41.7562H41.6918H41.6274H41.563H41.4985H41.4339H41.3692H41.3045H41.2397H41.1748H41.1098H41.0448H40.9797H40.9146H40.8493H40.784H40.7186H40.6532H40.5876H40.522H40.4563H40.3905H40.3247H40.2588H40.1928H40.1267H40.0605H39.9942H39.9279H39.8615H39.795H39.7284H39.6617H39.5949H39.5281H39.4611H39.3941H39.327H39.2598H39.1925H39.1251H39.0576H38.9901H38.9224H38.8547H38.7868H38.7189H38.6508H38.5827H38.5145H38.4461H38.3777H38.3092H38.2406H38.1719H38.103H38.0341H37.9651H37.896H37.8267H37.7574H37.688H37.6184H37.5488H37.479H37.4092H37.3392H37.2691H37.199H37.1287H37.0583H36.9878H36.9171H36.8464H36.7755H36.7046H36.6335H36.5623H36.491H36.4196H36.3481H36.2764H36.2046H36.1328H36.0607H35.9886H35.9164H35.844H35.7715H35.6989H35.6262H35.5533H35.4803H35.4072H35.334H35.2606H35.1872H35.1135H35.0398H34.9659H34.8919H34.8178H34.7436H34.6692H34.5947H34.52H34.4452H34.3703H34.2952H34.2201H34.1447H34.0693H33.9937H33.9179H33.8421H33.7661H33.6899H33.6136H33.5372H33.4606H33.3839H33.3071H33.2301H33.1529H33.0756H32.9982H32.9206H32.8429H32.765H32.687H32.6088H32.5305H32.452H32.3734H32.2946H32.2157H32.1367H32.0574H31.978H31.8985H31.8188H31.739H31.659H31.5788H31.4985H31.418H31.3374H31.2566H31.1757H31.0946H31.0133H30.9318H30.8503H30.7685H30.6866H30.6045H30.5222H30.4398H30.3572H30.2745H30.1915C30.0489 168.5 29.9693 168.466 29.9164 168.433C29.8553 168.394 29.7779 168.322 29.702 168.192C29.5361 167.906 29.4608 167.48 29.5197 167.111C30.9235 158.322 38.6474 151.574 47.9925 151.574C57.3375 151.574 65.0615 158.322 66.4652 167.111C66.5751 167.799 66.4037 168.054 66.3124 168.149C66.1888 168.278 65.8364 168.5 64.9935 168.5Z","fill","var(--color-background)","stroke","var(--color-secondary-700)","stroke-width","3"],["cx","20","cy","141","r","10.5","fill","var(--color-background)","stroke","var(--color-secondary-700)","stroke-width","3"],["d","M36.9935 168.5H36.9126H36.8318H36.7512H36.6708H36.5905H36.5104H36.4304H36.3506H36.2709H36.1914H36.1121H36.0329H35.9538H35.8749H35.7962H35.7176H35.6392H35.5609H35.4828H35.4048H35.3269H35.2492H35.1717H35.0943H35.017H34.9399H34.8629H34.7861H34.7094H34.6329H34.5565H34.4802H34.4041H34.3281H34.2523H34.1766H34.101H34.0256H33.9503H33.8751H33.8001H33.7252H33.6504H33.5758H33.5013H33.4269H33.3527H33.2786H33.2046H33.1308H33.0571H32.9835H32.91H32.8367H32.7635H32.6904H32.6175H32.5446H32.4719H32.3993H32.3269H32.2545H32.1823H32.1102H32.0382H31.9664H31.8946H31.823H31.7515H31.6801H31.6088H31.5376H31.4666H31.3956H31.3248H31.2541H31.1835H31.113H31.0426H30.9724H30.9022H30.8322H30.7622H30.6924H30.6226H30.553H30.4835H30.4141H30.3448H30.2756H30.2065H30.1375H30.0686H29.9998H29.9311H29.8625H29.794H29.7256H29.6572H29.589H29.5209H29.4529H29.385H29.3172H29.2494H29.1818H29.1142H29.0468H28.9794H28.9121H28.8449H28.7779H28.7108H28.6439H28.5771H28.5103H28.4437H28.3771H28.3106H28.2442H28.1779H28.1117H28.0455H27.9794H27.9134H27.8475H27.7817H27.7159H27.6502H27.5846H27.5191H27.4537H27.3883H27.323H27.2578H27.1926H27.1275H27.0625H26.9976H26.9328H26.868H26.8032H26.7386H26.674H26.6095H26.5451H26.4807H26.4164H26.3521H26.2879H26.2238H26.1598H26.0958H26.0318H25.968H25.9042H25.8404H25.7767H25.7131H25.6495H25.586H25.5226H25.4592H25.3958H25.3325H25.2693H25.2061H25.143H25.0799H25.0169H24.9539H24.891H24.8281H24.7653H24.7025H24.6398H24.5771H24.5145H24.4519H24.3894H24.3269H24.2645H24.202H24.1397H24.0774H24.0151H23.9528H23.8907H23.8285H23.7664H23.7043H23.6423H23.5803H23.5183H23.4564H23.3945H23.3326H23.2708H23.209H23.1472H23.0855H23.0238H22.9621H22.9005H22.8389H22.7773H22.7157H22.6542H22.5927H22.5312H22.4698H22.4084H22.347H22.2856H22.2243H22.1629H22.1016H22.0404H21.9791H21.9178H21.8566H21.7954H21.7342H21.6731H21.6119H21.5508H21.4896H21.4285H21.3674H21.3064H21.2453H21.1842H21.1232H21.0622H21.0011H20.9401H20.8791H20.8181H20.7571H20.6962H20.6352H20.5742H20.5133H20.4523H20.3913H20.3304H20.2694H20.2085H20.1475H20.0866H20.0257H19.9647H19.9038H19.8428H19.7819H19.7209H19.6599H19.599H19.538H19.477H19.416H19.3551H19.2941H19.2331H19.172H19.111H19.05H18.9889H18.9279H18.8668H18.8057H18.7446H18.6835H18.6224H18.5612H18.5001H18.4389H18.3777H18.3165H18.2553H18.194H18.1328H18.0715H18.0102H17.9489H17.8875H17.8261H17.7647H17.7033H17.6418H17.5804H17.5189H17.4573H17.3958H17.3342H17.2726H17.2109H17.1493H17.0876H17.0258H16.9641H16.9023H16.8404H16.7786H16.7166H16.6547H16.5927H16.5307H16.4687H16.4066H16.3445H16.2823H16.2201H16.1578H16.0956H16.0332H15.9709H15.9084H15.846H15.7835H15.7209H15.6583H15.5957H15.533H15.4703H15.4075H15.3447H15.2818H15.2189H15.1559H15.0929H15.0298H14.9666H14.9034H14.8402H14.7769H14.7135H14.6501H14.5867H14.5231H14.4596H14.3959H14.3322H14.2685H14.2046H14.1408H14.0768H14.0128H13.9487H13.8846H13.8204H13.7562H13.6918H13.6274H13.563H13.4985H13.4339H13.3692H13.3045H13.2397H13.1748H13.1098H13.0448H12.9797H12.9146H12.8493H12.784H12.7186H12.6532H12.5876H12.522H12.4563H12.3905H12.3247H12.2588H12.1928H12.1267H12.0605H11.9942H11.9279H11.8615H11.795H11.7284H11.6617H11.5949H11.5281H11.4611H11.3941H11.327H11.2598H11.1925H11.1251H11.0576H10.9901H10.9224H10.8547H10.7868H10.7189H10.6508H10.5827H10.5145H10.4461H10.3777H10.3092H10.2406H10.1719H10.103H10.0341H9.9651H9.89597H9.82674H9.75741H9.68798H9.61843H9.54879H9.47904H9.40918H9.33921H9.26914H9.19896H9.12867H9.05826H8.98775H8.91713H8.8464H8.77555H8.70459H8.63351H8.56232H8.49102H8.4196H8.34807H8.27641H8.20464H8.13276H8.06075H7.98862H7.91638H7.84401H7.77152H7.69891H7.62617H7.55332H7.48034H7.40723H7.334H7.26064H7.18716H7.11355H7.03981H6.96594H6.89195H6.81782H6.74356H6.66918H6.59466H6.52H6.44522H6.3703H6.29525H6.22006H6.14474H6.06928H5.99368H5.91795H5.84208H5.76607H5.68992H5.61363H5.5372H5.46062H5.38391H5.30705H5.23005H5.15291H5.07562H4.99819H4.92061H4.84288H4.76501H4.68699H4.60882H4.5305H4.45203H4.37342H4.29465H4.21573H4.13665H4.05743H3.97805H3.89851H3.81882H3.73898H3.65898H3.57882H3.49851H3.41804H3.33741H3.25662H3.17566H3.09455H3.01328H2.93185H2.85025H2.76849H2.68657H2.60448H2.52223H2.43981H2.35722H2.27447H2.19155C2.04893 168.5 1.96927 168.466 1.91645 168.433C1.85532 168.394 1.77792 168.322 1.702 168.192C1.53613 167.906 1.46078 167.48 1.51975 167.111C2.92347 158.322 10.6474 151.574 19.9925 151.574C29.3375 151.574 37.0615 158.322 38.4652 167.111C38.5751 167.799 38.4037 168.054 38.3124 168.149C38.1888 168.278 37.8364 168.5 36.9935 168.5Z","fill","var(--color-background)","stroke","var(--color-secondary-700)","stroke-width","3"],["cx","34","cy","154","r","10.5","fill","var(--color-background)","stroke","var(--color-secondary-700)","stroke-width","3"],["d","M50.9935 181.5H50.9126H50.8318H50.7512H50.6708H50.5905H50.5104H50.4304H50.3506H50.2709H50.1914H50.1121H50.0329H49.9538H49.8749H49.7962H49.7176H49.6392H49.5609H49.4828H49.4048H49.3269H49.2492H49.1717H49.0943H49.017H48.9399H48.8629H48.7861H48.7094H48.6329H48.5565H48.4802H48.4041H48.3281H48.2523H48.1766H48.101H48.0256H47.9503H47.8751H47.8001H47.7252H47.6504H47.5758H47.5013H47.4269H47.3527H47.2786H47.2046H47.1308H47.0571H46.9835H46.91H46.8367H46.7635H46.6904H46.6175H46.5446H46.4719H46.3993H46.3269H46.2545H46.1823H46.1102H46.0382H45.9664H45.8946H45.823H45.7515H45.6801H45.6088H45.5376H45.4666H45.3956H45.3248H45.2541H45.1835H45.113H45.0426H44.9724H44.9022H44.8322H44.7622H44.6924H44.6226H44.553H44.4835H44.4141H44.3448H44.2756H44.2065H44.1375H44.0686H43.9998H43.9311H43.8625H43.794H43.7256H43.6572H43.589H43.5209H43.4529H43.385H43.3172H43.2494H43.1818H43.1142H43.0468H42.9794H42.9121H42.8449H42.7779H42.7108H42.6439H42.5771H42.5103H42.4437H42.3771H42.3106H42.2442H42.1779H42.1117H42.0455H41.9794H41.9134H41.8475H41.7817H41.7159H41.6502H41.5846H41.5191H41.4537H41.3883H41.323H41.2578H41.1926H41.1275H41.0625H40.9976H40.9328H40.868H40.8032H40.7386H40.674H40.6095H40.5451H40.4807H40.4164H40.3521H40.2879H40.2238H40.1598H40.0958H40.0318H39.968H39.9042H39.8404H39.7767H39.7131H39.6495H39.586H39.5226H39.4592H39.3958H39.3325H39.2693H39.2061H39.143H39.0799H39.0169H38.9539H38.891H38.8281H38.7653H38.7025H38.6398H38.5771H38.5145H38.4519H38.3894H38.3269H38.2645H38.202H38.1397H38.0774H38.0151H37.9528H37.8907H37.8285H37.7664H37.7043H37.6423H37.5803H37.5183H37.4564H37.3945H37.3326H37.2708H37.209H37.1472H37.0855H37.0238H36.9621H36.9005H36.8389H36.7773H36.7157H36.6542H36.5927H36.5312H36.4698H36.4084H36.347H36.2856H36.2243H36.1629H36.1016H36.0404H35.9791H35.9178H35.8566H35.7954H35.7342H35.6731H35.6119H35.5508H35.4896H35.4285H35.3674H35.3064H35.2453H35.1842H35.1232H35.0622H35.0011H34.9401H34.8791H34.8181H34.7571H34.6962H34.6352H34.5742H34.5133H34.4523H34.3913H34.3304H34.2694H34.2085H34.1475H34.0866H34.0257H33.9647H33.9038H33.8428H33.7819H33.7209H33.6599H33.599H33.538H33.477H33.416H33.3551H33.2941H33.2331H33.172H33.111H33.05H32.9889H32.9279H32.8668H32.8057H32.7446H32.6835H32.6224H32.5612H32.5001H32.4389H32.3777H32.3165H32.2553H32.194H32.1328H32.0715H32.0102H31.9489H31.8875H31.8261H31.7647H31.7033H31.6418H31.5804H31.5189H31.4573H31.3958H31.3342H31.2726H31.2109H31.1493H31.0876H31.0258H30.9641H30.9023H30.8404H30.7786H30.7166H30.6547H30.5927H30.5307H30.4687H30.4066H30.3445H30.2823H30.2201H30.1578H30.0956H30.0332H29.9709H29.9084H29.846H29.7835H29.7209H29.6583H29.5957H29.533H29.4703H29.4075H29.3447H29.2818H29.2189H29.1559H29.0929H29.0298H28.9666H28.9034H28.8402H28.7769H28.7135H28.6501H28.5867H28.5231H28.4596H28.3959H28.3322H28.2685H28.2046H28.1408H28.0768H28.0128H27.9487H27.8846H27.8204H27.7562H27.6918H27.6274H27.563H27.4985H27.4339H27.3692H27.3045H27.2397H27.1748H27.1098H27.0448H26.9797H26.9146H26.8493H26.784H26.7186H26.6532H26.5876H26.522H26.4563H26.3905H26.3247H26.2588H26.1928H26.1267H26.0605H25.9942H25.9279H25.8615H25.795H25.7284H25.6617H25.5949H25.5281H25.4611H25.3941H25.327H25.2598H25.1925H25.1251H25.0576H24.9901H24.9224H24.8547H24.7868H24.7189H24.6508H24.5827H24.5145H24.4461H24.3777H24.3092H24.2406H24.1719H24.103H24.0341H23.9651H23.896H23.8267H23.7574H23.688H23.6184H23.5488H23.479H23.4092H23.3392H23.2691H23.199H23.1287H23.0583H22.9878H22.9171H22.8464H22.7755H22.7046H22.6335H22.5623H22.491H22.4196H22.3481H22.2764H22.2046H22.1328H22.0607H21.9886H21.9164H21.844H21.7715H21.6989H21.6262H21.5533H21.4803H21.4072H21.334H21.2606H21.1872H21.1135H21.0398H20.9659H20.8919H20.8178H20.7436H20.6692H20.5947H20.52H20.4452H20.3703H20.2952H20.2201H20.1447H20.0693H19.9937H19.9179H19.8421H19.7661H19.6899H19.6136H19.5372H19.4606H19.3839H19.3071H19.2301H19.1529H19.0756H18.9982H18.9206H18.8429H18.765H18.687H18.6088H18.5305H18.452H18.3734H18.2946H18.2157H18.1367H18.0574H17.978H17.8985H17.8188H17.739H17.659H17.5788H17.4985H17.418H17.3374H17.2566H17.1757H17.0946H17.0133H16.9318H16.8503H16.7685H16.6866H16.6045H16.5222H16.4398H16.3572H16.2745H16.1915C16.045 181.5 15.9628 181.465 15.9092 181.432C15.8479 181.394 15.772 181.324 15.6978 181.198C15.5354 180.922 15.4617 180.509 15.5193 180.153C16.9196 171.496 24.6325 164.823 33.9925 164.823C43.3524 164.823 51.0654 171.496 52.4657 180.153C52.574 180.823 52.4052 181.064 52.319 181.152C52.1962 181.279 51.8413 181.5 50.9935 181.5Z","fill","var(--color-background)","stroke","var(--color-secondary-700)","stroke-width","3"]],template:function(e,t){1&e&&(i.ɵɵnamespaceSVG(),i.ɵɵelementStart(0,"svg",0),i.ɵɵtext(1,"\n "),i.ɵɵelement(2,"path",1),i.ɵɵtext(3,"\n "),i.ɵɵelement(4,"path",2),i.ɵɵtext(5,"\n "),i.ɵɵelement(6,"path",3),i.ɵɵtext(7,"\n "),i.ɵɵelement(8,"path",4),i.ɵɵtext(9,"\n "),i.ɵɵelement(10,"path",5),i.ɵɵtext(11,"\n "),i.ɵɵelement(12,"rect",6),i.ɵɵtext(13,"\n "),i.ɵɵelement(14,"path",7),i.ɵɵtext(15,"\n "),i.ɵɵelementStart(16,"mask",8),i.ɵɵtext(17,"\n "),i.ɵɵelement(18,"rect",9),i.ɵɵtext(19,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(20,"\n "),i.ɵɵelement(21,"rect",10),i.ɵɵtext(22,"\n "),i.ɵɵelement(23,"path",11),i.ɵɵtext(24,"\n "),i.ɵɵelement(25,"circle",12),i.ɵɵtext(26,"\n "),i.ɵɵelement(27,"path",13),i.ɵɵtext(28,"\n "),i.ɵɵelement(29,"circle",14),i.ɵɵtext(30,"\n "),i.ɵɵelement(31,"path",15),i.ɵɵtext(32,"\n "),i.ɵɵelement(33,"circle",16),i.ɵɵtext(34,"\n "),i.ɵɵelement(35,"path",17),i.ɵɵtext(36,"\n"),i.ɵɵelementEnd(),i.ɵɵtext(37,"\n"))},encapsulation:2})},31627:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationBillingComponent=void 0;n(68012),n(91674),n(51554),n(36631),n(73828);const r=n(98523),o=n(94285),a=n(85314),s=n(32621),l=n(91674),c=n(51554),d=n(68012),p=n(73828),u=n(36631),m=n(57490),h=n(449),v=n(51626),f=n(96832),g=n(56820),y=n(55732),x=n(8863),S=n(99729),b=function(e){return{"bwi-spin":e}};function w(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"button",3),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().load()})),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",4),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵproperty("disabled",e.loading),s.ɵɵadvance(2),s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(5,b,e.loading)),s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(4,3,"refresh"),"\n ")}}function C(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",5),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",6),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n"),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"loading")))}function I(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"button",14),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).addCredit()})),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()}2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,1,"addCredit"),"\n "))}function E(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"app-add-credit",15),s.ɵɵlistener("onAdded",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).closeAddCredit(!0)}))("onCanceled",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).closeAddCredit(!1)})),s.ɵɵtext(1,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵproperty("organizationId",e.organizationId)}}function P(e,t){1&e&&(s.ɵɵelementStart(0,"p"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,1,"noPaymentMethod")))}function O(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"app-callout",18),s.ɵɵpipe(1,"i18n"),s.ɵɵtext(2,"\n "),s.ɵɵelementStart(3,"p"),s.ɵɵtext(4),s.ɵɵpipe(5,"i18n"),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"form",19,20),s.ɵɵlistener("ngSubmit",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(3).verifyBank()})),s.ɵɵtext(10,"\n "),s.ɵɵelementStart(11,"label",21),s.ɵɵtext(12),s.ɵɵpipe(13,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"div",22),s.ɵɵtext(16,"\n "),s.ɵɵelementStart(17,"div",23),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"div",24),s.ɵɵtext(20,"$0."),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵelementStart(23,"input",25),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(3).verifyAmount1=t})),s.ɵɵelementEnd(),s.ɵɵtext(24,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(25,"\n "),s.ɵɵelementStart(26,"label",26),s.ɵɵtext(27),s.ɵɵpipe(28,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(29,"\n "),s.ɵɵelementStart(30,"div",22),s.ɵɵtext(31,"\n "),s.ɵɵelementStart(32,"div",23),s.ɵɵtext(33,"\n "),s.ɵɵelementStart(34,"div",24),s.ɵɵtext(35,"$0."),s.ɵɵelementEnd(),s.ɵɵtext(36,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(37,"\n "),s.ɵɵelementStart(38,"input",27),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(3).verifyAmount2=t})),s.ɵɵelementEnd(),s.ɵɵtext(39,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(40,"\n "),s.ɵɵelementStart(41,"button",28),s.ɵɵtext(42,"\n "),s.ɵɵelement(43,"i",29),s.ɵɵpipe(44,"i18n"),s.ɵɵtext(45,"\n "),s.ɵɵelementStart(46,"span"),s.ɵɵtext(47),s.ɵɵpipe(48,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(49,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(50,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(51,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵreference(9),t=s.ɵɵnextContext(3);s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(1,11,"verifyBankAccount")),s.ɵɵadvance(4),s.ɵɵtextInterpolate2("",s.ɵɵpipeBind1(5,13,"verifyBankAccountDesc")," ",s.ɵɵpipeBind1(6,15,"verifyBankAccountFailureWarning"),""),s.ɵɵadvance(4),s.ɵɵproperty("appApiAction",t.verifyBankPromise),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind2(13,17,"amount","1")),s.ɵɵadvance(11),s.ɵɵproperty("ngModel",t.verifyAmount1),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind2(28,20,"amount","2")),s.ɵɵadvance(11),s.ɵɵproperty("ngModel",t.verifyAmount2),s.ɵɵadvance(3),s.ɵɵproperty("disabled",e.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(44,23,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(48,25,"verifyBankAccount"))}}function k(e,t){1&e&&(s.ɵɵelementStart(0,"span"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,1,"inAppPurchase")))}const A=function(e,t,n,i,r,o){return{"bwi-credit-card":e,"bwi-bank":t,"bwi-money":n,"bwi-paypal text-primary":i,"bwi-apple text-muted":r,"bwi-google text-muted":o}};function T(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,O,52,27,"app-callout",16),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"p"),s.ɵɵtext(5,"\n "),s.ɵɵelement(6,"i",17),s.ɵɵtext(7,"\n "),s.ɵɵtemplate(8,k,3,3,"span",2),s.ɵɵtext(9),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n "),s.ɵɵelementContainerEnd()),2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.paymentSource.type===e.paymentMethodType.BankAccount&&e.paymentSource.needsVerification),s.ɵɵadvance(4),s.ɵɵproperty("ngClass",s.ɵɵpureFunction6(4,A,e.paymentSource.type===e.paymentMethodType.Card,e.paymentSource.type===e.paymentMethodType.BankAccount,e.paymentSource.type===e.paymentMethodType.Check,e.paymentSource.type===e.paymentMethodType.PayPal,e.paymentSource.type===e.paymentMethodType.AppleInApp,e.paymentSource.type===e.paymentMethodType.GoogleInApp)),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.paymentSourceInApp),s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",e.paymentSource.description,"\n ")}}function M(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"button",14),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).changePayment()})),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,1,e.paymentSource?"changePaymentMethod":"addPaymentMethod"),"\n ")}}function B(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"app-adjust-payment",30),s.ɵɵlistener("onAdjusted",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).closePayment(!0)}))("onCanceled",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).closePayment(!1)})),s.ɵɵtext(1,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵproperty("currentType",null!=e.paymentSource?e.paymentSource.type:null)("organizationId",e.organizationId)}}function D(e,t){1&e&&(s.ɵɵelementStart(0,"p"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,1,"noInvoices")))}function R(e,t){1&e&&(s.ɵɵelementStart(0,"span"),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",36),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(4,1,"paid"),"\n "))}function F(e,t){1&e&&(s.ɵɵelementStart(0,"span"),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",37),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(4,1,"unpaid"),"\n "))}function U(e,t){if(1&e&&(s.ɵɵelementStart(0,"tr"),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"td"),s.ɵɵtext(3),s.ɵɵpipe(4,"date"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"td"),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"a",33),s.ɵɵpipe(9,"i18n"),s.ɵɵtext(10,"\n "),s.ɵɵelement(11,"i",34),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"a",35),s.ɵɵpipe(14,"i18n"),s.ɵɵtext(15),s.ɵɵpipe(16,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(17,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"td"),s.ɵɵtext(20),s.ɵɵpipe(21,"currency"),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵelementStart(23,"td"),s.ɵɵtext(24,"\n "),s.ɵɵtemplate(25,R,5,3,"span",2),s.ɵɵtext(26,"\n "),s.ɵɵtemplate(27,F,5,3,"span",2),s.ɵɵtext(28,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(29,"\n "),s.ɵɵelementEnd()),2&e){const e=t.$implicit;s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind2(4,9,e.date,"mediumDate")),s.ɵɵadvance(5),s.ɵɵpropertyInterpolate("href",e.pdfUrl,s.ɵɵsanitizeUrl),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(9,12,"downloadInvoice")),s.ɵɵadvance(5),s.ɵɵpropertyInterpolate("href",e.url,s.ɵɵsanitizeUrl),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(14,14,"viewInvoice")),s.ɵɵadvance(2),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind2(16,16,"invoiceNumber",e.number),""),s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind2(21,19,e.amount,"$")),s.ɵɵadvance(5),s.ɵɵproperty("ngIf",e.paid),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!e.paid)}}function V(e,t){if(1&e&&(s.ɵɵelementStart(0,"table",31),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"tbody"),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,U,30,22,"tr",32),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(4),s.ɵɵproperty("ngForOf",e.invoices)}}function N(e,t){1&e&&(s.ɵɵelementStart(0,"p"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,1,"noTransactions")))}function _(e,t){1&e&&(s.ɵɵelementStart(0,"span"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,1,"chargeNoun"),"\n "))}function j(e,t){1&e&&(s.ɵɵelementStart(0,"span"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,1,"refundNoun")))}const z=function(e,t,n,i){return{"bwi-credit-card":e,"bwi-bank":t,"bwi-bitcoin text-warning":n,"bwi-paypal text-primary":i}};function H(e,t){if(1&e&&s.ɵɵelement(0,"i",40),2&e){const e=s.ɵɵnextContext().$implicit,t=s.ɵɵnextContext(3);s.ɵɵproperty("ngClass",s.ɵɵpureFunction4(1,z,e.paymentMethodType===t.paymentMethodType.Card,e.paymentMethodType===t.paymentMethodType.BankAccount||e.paymentMethodType===t.paymentMethodType.WireTransfer,e.paymentMethodType===t.paymentMethodType.BitPay,e.paymentMethodType===t.paymentMethodType.PayPal))}}const L=function(e){return{"text-strike":e}};function K(e,t){if(1&e&&(s.ɵɵelementStart(0,"tr"),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"td"),s.ɵɵtext(3),s.ɵɵpipe(4,"date"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"td"),s.ɵɵtext(7,"\n "),s.ɵɵtemplate(8,_,3,3,"span",2),s.ɵɵtext(9,"\n "),s.ɵɵtemplate(10,j,3,3,"span",2),s.ɵɵtext(11,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"td"),s.ɵɵtext(14,"\n "),s.ɵɵtemplate(15,H,1,6,"i",38),s.ɵɵtext(16),s.ɵɵelementEnd(),s.ɵɵtext(17,"\n "),s.ɵɵelementStart(18,"td",39),s.ɵɵpipe(19,"i18n"),s.ɵɵtext(20),s.ɵɵpipe(21,"currency"),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵelementEnd()),2&e){const e=t.$implicit,n=s.ɵɵnextContext(3);s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind2(4,8,e.createdDate,"mediumDate")),s.ɵɵadvance(5),s.ɵɵproperty("ngIf",e.type===n.transactionType.Charge||e.type===n.transactionType.Credit),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.type===n.transactionType.Refund),s.ɵɵadvance(5),s.ɵɵproperty("ngIf",e.paymentMethodType),s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",e.details,"\n "),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(19,11,e.refunded?"refunded":"")),s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(16,L,e.refunded)),s.ɵɵadvance(2),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind2(21,13,e.amount,"$"),"\n ")}}function q(e,t){if(1&e&&(s.ɵɵelementStart(0,"table",31),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"tbody"),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,K,23,18,"tr",32),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(4),s.ɵɵproperty("ngForOf",e.transactions)}}function G(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"h2"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"p",7),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"strong"),s.ɵɵtext(9),s.ɵɵpipe(10,"currency"),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"p"),s.ɵɵtext(14),s.ɵɵpipe(15,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(16,"\n "),s.ɵɵtemplate(17,I,3,3,"button",8),s.ɵɵtext(18,"\n "),s.ɵɵtemplate(19,E,2,1,"app-add-credit",9),s.ɵɵtext(20,"\n "),s.ɵɵelementStart(21,"h2",10),s.ɵɵtext(22),s.ɵɵpipe(23,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(24,"\n "),s.ɵɵtemplate(25,P,3,3,"p",2),s.ɵɵtext(26,"\n "),s.ɵɵtemplate(27,T,11,11,"ng-container",2),s.ɵɵtext(28,"\n "),s.ɵɵtemplate(29,M,3,3,"button",8),s.ɵɵtext(30,"\n "),s.ɵɵtemplate(31,B,2,2,"app-adjust-payment",11),s.ɵɵtext(32,"\n "),s.ɵɵelementStart(33,"h2",10),s.ɵɵtext(34),s.ɵɵpipe(35,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(36,"\n "),s.ɵɵtemplate(37,D,3,3,"p",2),s.ɵɵtext(38,"\n "),s.ɵɵtemplate(39,V,7,1,"table",12),s.ɵɵtext(40,"\n "),s.ɵɵelementStart(41,"h2",10),s.ɵɵtext(42),s.ɵɵpipe(43,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(44,"\n "),s.ɵɵtemplate(45,N,3,3,"p",2),s.ɵɵtext(46,"\n "),s.ɵɵtemplate(47,q,7,1,"table",12),s.ɵɵtext(48,"\n "),s.ɵɵelementStart(49,"small",13),s.ɵɵtext(50),s.ɵɵpipe(51,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(52,"\n"),s.ɵɵelementContainerEnd()),2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,17,e.isCreditBalance?"accountCredit":"accountBalance")),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind2(10,19,e.creditOrBalance,"$")),s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(15,22,"creditAppliedDesc")),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!e.showAddCredit),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.showAddCredit),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(23,24,"paymentMethod")),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!e.paymentSource),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.paymentSource),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!e.showAdjustPayment),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.showAdjustPayment),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(35,26,"invoices")),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!e.invoices||!e.invoices.length),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.invoices&&e.invoices.length),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(43,28,"transactions")),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!e.transactions||!e.transactions.length),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.transactions&&e.transactions.length),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("* ",s.ɵɵpipeBind2(51,30,"chargesStatement","BITWARDEN"),"")}}class W{constructor(e,t,n,i,a){this.apiService=e,this.i18nService=t,this.route=n,this.platformUtilsService=i,this.logService=a,this.loading=!1,this.firstLoaded=!1,this.showAdjustPayment=!1,this.showAddCredit=!1,this.paymentMethodType=r.PaymentMethodType,this.transactionType=o.TransactionType}ngOnInit(){return i(this,void 0,void 0,(function*(){this.route.parent.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.organizationId=e.organizationId,yield this.load(),this.firstLoaded=!0}))))}))}load(){return i(this,void 0,void 0,(function*(){this.loading||(this.loading=!0,null!=this.organizationId&&(this.billing=yield this.apiService.getOrganizationBilling(this.organizationId)),this.loading=!1)}))}verifyBank(){return i(this,void 0,void 0,(function*(){if(!this.loading)try{const e=new a.VerifyBankRequest;e.amount1=this.verifyAmount1,e.amount2=this.verifyAmount2,this.verifyBankPromise=this.apiService.postOrganizationVerifyBank(this.organizationId,e),yield this.verifyBankPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("verifiedBankAccount")),this.load()}catch(e){this.logService.error(e)}}))}addCredit(){this.paymentSourceInApp?this.platformUtilsService.showDialog(this.i18nService.t("cannotPerformInAppPurchase"),this.i18nService.t("addCredit"),null,null,"warning"):this.showAddCredit=!0}closeAddCredit(e){this.showAddCredit=!1,e&&this.load()}changePayment(){this.paymentSourceInApp?this.platformUtilsService.showDialog(this.i18nService.t("cannotPerformInAppPurchase"),this.i18nService.t("changePaymentMethod"),null,null,"warning"):this.showAdjustPayment=!0}closePayment(e){this.showAdjustPayment=!1,e&&this.load()}get isCreditBalance(){return null==this.billing||this.billing.balance<=0}get creditOrBalance(){return Math.abs(null!=this.billing?this.billing.balance:0)}get paymentSource(){return null!=this.billing?this.billing.paymentSource:null}get paymentSourceInApp(){return null!=this.paymentSource&&(this.paymentSource.type===r.PaymentMethodType.AppleInApp||this.paymentSource.type===r.PaymentMethodType.GoogleInApp)}get invoices(){return null!=this.billing?this.billing.invoices:null}get transactions(){return null!=this.billing?this.billing.transactions:null}}t.OrganizationBillingComponent=W,W.ɵfac=function(e){return new(e||W)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(d.ActivatedRoute),s.ɵɵdirectiveInject(p.PlatformUtilsService),s.ɵɵdirectiveInject(u.LogService))},W.ɵcmp=s.ɵɵdefineComponent({type:W,selectors:[["app-org-billing"]],decls:13,vars:6,consts:[[1,"page-header","d-flex"],["class","btn btn-sm btn-outline-primary ml-auto",3,"disabled","click",4,"ngIf"],[4,"ngIf"],[1,"btn","btn-sm","btn-outline-primary","ml-auto",3,"disabled","click"],["aria-hidden","true",1,"bwi","bwi-refresh","bwi-fw",3,"ngClass"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"text-lg"],["type","button","class","btn btn-outline-secondary",3,"click",4,"ngIf"],[3,"organizationId","onAdded","onCanceled",4,"ngIf"],[1,"spaced-header"],[3,"currentType","organizationId","onAdjusted","onCanceled",4,"ngIf"],["class","table mb-2",4,"ngIf"],[1,"text-muted"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[3,"organizationId","onAdded","onCanceled"],["type","warning",3,"title",4,"ngIf"],[1,"bwi","bwi-fw",3,"ngClass"],["type","warning",3,"title"],["ngNativeValidate","",1,"form-inline",3,"appApiAction","ngSubmit"],["verifyForm",""],["for","verifyAmount1",1,"sr-only"],[1,"input-group","mr-2"],[1,"input-group-prepend"],[1,"input-group-text"],["type","number","id","verifyAmount1","placeholder","xx","name","Amount1","min","1","max","99","step","1","required","",1,"form-control",3,"ngModel","ngModelChange"],["for","verifyAmount2",1,"sr-only"],["type","number","id","verifyAmount2","placeholder","xx","name","Amount2","min","1","max","99","step","1","required","",1,"form-control",3,"ngModel","ngModelChange"],["type","submit",1,"btn","btn-outline-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[3,"currentType","organizationId","onAdjusted","onCanceled"],[1,"table","mb-2"],[4,"ngFor","ngForOf"],["target","_blank","rel","noopener",1,"mr-2",3,"href","appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-file-pdf"],["target","_blank","rel","noopener",3,"href","title"],["aria-hidden","true",1,"bwi","bwi-check","text-success"],["aria-hidden","true",1,"bwi","bwi-exclamation-circle","text-muted"],["class","bwi bwi-fw","aria-hidden","true",3,"ngClass",4,"ngIf"],[3,"ngClass","title"],["aria-hidden","true",1,"bwi","bwi-fw",3,"ngClass"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"h1"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵtemplate(6,w,5,7,"button",1),s.ɵɵtext(7,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n"),s.ɵɵtemplate(9,C,9,6,"ng-container",2),s.ɵɵtext(10,"\n"),s.ɵɵtemplate(11,G,53,33,"ng-container",2),s.ɵɵtext(12,"\n")),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(4,4,"billing"),"\n "),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",t.firstLoaded),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!t.firstLoaded&&t.loading),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.billing))},directives:[m.NgIf,m.NgClass,h.AddCreditComponent,v.CalloutComponent,f.NgControlStatusGroup,f.NgForm,g.ApiActionDirective,f.MinValidator,f.MaxValidator,f.NumberValueAccessor,f.DefaultValueAccessor,f.RequiredValidator,f.NgControlStatus,f.NgModel,y.AdjustPaymentComponent,m.NgForOf,x.A11yTitleDirective],pipes:[S.I18nPipe,m.CurrencyPipe,m.DatePipe],encapsulation:2})},2516:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationSubscriptionComponent=void 0;const r=n(32621),o=(n(68012),n(64684),n(91674),n(51554),n(36631),n(45552),n(63513),n(73828),n(43497)),a=n(24643),s=n(47937),l=n(79977),c=n(6131),d=n(73738),p=n(32621),u=n(91674),m=n(73828),h=n(51554),v=n(45552),f=n(68012),g=n(63513),y=n(36631),x=n(64684),S=n(57490),b=n(75051),w=n(51626),C=n(56820),I=n(61857),E=n(76137),P=n(34959),O=n(24547),k=n(8863),A=n(13205),T=n(99729),M=["setupBillingSyncTemplate"],B=["rotateBillingSyncKeyTemplate"];function D(e,t){1&e&&(p.ɵɵelementStart(0,"small"),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"i",4),p.ɵɵpipe(3,"i18n"),p.ɵɵtext(4,"\n "),p.ɵɵelementStart(5,"span",5),p.ɵɵtext(6),p.ɵɵpipe(7,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(8,"\n "),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(3,2,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(7,4,"loading")))}function R(e,t){1&e&&(p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"i",6),p.ɵɵpipe(3,"i18n"),p.ɵɵtext(4,"\n "),p.ɵɵelementStart(5,"span",5),p.ɵɵtext(6),p.ɵɵpipe(7,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(8,"\n"),p.ɵɵelementContainerEnd()),2&e&&(p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(3,2,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(7,4,"loading")))}function F(e,t){if(1&e&&(p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"div",7),p.ɵɵtext(3,"\n "),p.ɵɵelement(4,"app-image-org-subscription-hidden"),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"p",8),p.ɵɵtext(7),p.ɵɵpipe(8,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(9,"\n "),p.ɵɵelementStart(10,"p"),p.ɵɵtext(11),p.ɵɵpipe(12,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(13,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(14,"\n"),p.ɵɵelementContainerEnd()),2&e){const e=p.ɵɵnextContext();p.ɵɵadvance(7),p.ɵɵtextInterpolate(p.ɵɵpipeBind2(8,2,"billingManagedByProvider",e.userOrg.providerName)),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(12,5,"billingContactProviderForAssistance"))}}function U(e,t){1&e&&(p.ɵɵelementStart(0,"app-callout",10),p.ɵɵpipe(1,"i18n"),p.ɵɵtext(2),p.ɵɵpipe(3,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(1,2,"canceled")),p.ɵɵadvance(2),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(3,4,"subscriptionCanceled"),""))}function V(e,t){if(1&e){const e=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"app-callout",10),p.ɵɵpipe(1,"i18n"),p.ɵɵtext(2,"\n "),p.ɵɵelementStart(3,"p"),p.ɵɵtext(4),p.ɵɵpipe(5,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(6,"\n "),p.ɵɵelementStart(7,"button",11,12),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(e);return p.ɵɵnextContext(2).reinstate()})),p.ɵɵtext(9,"\n "),p.ɵɵelement(10,"i",13),p.ɵɵpipe(11,"i18n"),p.ɵɵtext(12,"\n "),p.ɵɵelementStart(13,"span"),p.ɵɵtext(14),p.ɵɵpipe(15,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(16,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(17,"\n "),p.ɵɵelementEnd()}if(2&e){const e=p.ɵɵreference(8),t=p.ɵɵnextContext(2);p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(1,6,"pendingCancellation")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(5,8,"subscriptionPendingCanceled")),p.ɵɵadvance(3),p.ɵɵproperty("appApiAction",t.reinstatePromise)("disabled",e.loading),p.ɵɵadvance(3),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(11,10,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(15,12,"reinstateSubscription"))}}function N(e,t){1&e&&(p.ɵɵelementStart(0,"span",31),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(2,1,"pendingCancellation")))}function _(e,t){if(1&e&&(p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"dt"),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"dd"),p.ɵɵtext(7,"\n "),p.ɵɵelementStart(8,"span",29),p.ɵɵtext(9),p.ɵɵelementEnd(),p.ɵɵtext(10,"\n "),p.ɵɵtemplate(11,N,3,3,"span",30),p.ɵɵtext(12,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(13,"\n "),p.ɵɵelementStart(14,"dt"),p.ɵɵtext(15),p.ɵɵpipe(16,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(17,"\n "),p.ɵɵelementStart(18,"dd"),p.ɵɵtext(19),p.ɵɵpipe(20,"date"),p.ɵɵpipe(21,"currency"),p.ɵɵelementEnd(),p.ɵɵtext(22,"\n "),p.ɵɵelementContainerEnd()),2&e){const e=p.ɵɵnextContext(3);p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(4,5,"status")),p.ɵɵadvance(6),p.ɵɵtextInterpolate(e.isSponsoredSubscription?"sponsored":e.subscription.status||"-"),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",e.subscriptionMarkedForCancel),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(16,7,"nextCharge")),p.ɵɵadvance(4),p.ɵɵtextInterpolate1("\n ",e.nextInvoice?p.ɵɵpipeBind2(20,9,e.nextInvoice.date,"mediumDate")+", "+p.ɵɵpipeBind2(21,12,e.nextInvoice.amount,"$"):"-","\n ")}}function j(e,t){if(1&e&&(p.ɵɵelementStart(0,"tr"),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"td"),p.ɵɵtext(3),p.ɵɵpipe(4,"currency"),p.ɵɵelementEnd(),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"td"),p.ɵɵtext(7),p.ɵɵpipe(8,"currency"),p.ɵɵpipe(9,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(10,"\n "),p.ɵɵelementEnd()),2&e){const e=t.$implicit;p.ɵɵadvance(3),p.ɵɵtextInterpolate3("\n ",e.name," ",e.quantity>1?"×"+e.quantity:""," @\n ",p.ɵɵpipeBind2(4,5,e.amount,"$"),"\n "),p.ɵɵadvance(4),p.ɵɵtextInterpolate2("",p.ɵɵpipeBind2(8,8,e.quantity*e.amount,"$")," /",p.ɵɵpipeBind1(9,11,e.interval),"")}}function z(e,t){if(1&e&&(p.ɵɵelementStart(0,"div",32),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"strong",33),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"table",34),p.ɵɵtext(7,"\n "),p.ɵɵelementStart(8,"tbody"),p.ɵɵtext(9,"\n "),p.ɵɵtemplate(10,j,11,13,"tr",35),p.ɵɵtext(11,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(12,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(13,"\n "),p.ɵɵelementEnd()),2&e){const e=p.ɵɵnextContext(3);p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(4,2,"details")),p.ɵɵadvance(7),p.ɵɵproperty("ngForOf",e.subscription.items)}}function H(e,t){if(1&e&&(p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"div",36),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"dl"),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"dt"),p.ɵɵtext(7),p.ɵɵpipe(8,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(9,"\n "),p.ɵɵelementStart(10,"dd"),p.ɵɵtext(11),p.ɵɵpipe(12,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(13,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(14,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(15,"\n "),p.ɵɵelementContainerEnd()),2&e){const e=p.ɵɵnextContext(3);p.ɵɵadvance(7),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(8,2,"provider")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind2(12,4,"yourProviderIs",e.userOrg.providerName))}}function L(e,t){if(1&e){const e=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"button",37),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(e);return p.ɵɵnextContext(3).changePlan()})),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()}2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(2,1,"changeBillingPlan"),"\n "))}function K(e,t){if(1&e){const e=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"app-change-plan",38),p.ɵɵlistener("onChanged",(function(){p.ɵɵrestoreView(e);return p.ɵɵnextContext(3).closeChangePlan(!0)}))("onCanceled",(function(){p.ɵɵrestoreView(e);return p.ɵɵnextContext(3).closeChangePlan(!1)})),p.ɵɵelementEnd()}if(2&e){const e=p.ɵɵnextContext(3);p.ɵɵproperty("organizationId",e.organizationId)}}function q(e,t){if(1&e){const e=p.ɵɵgetCurrentView();p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"div",39),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"app-adjust-subscription",40),p.ɵɵlistener("onAdjusted",(function(){p.ɵɵrestoreView(e);return p.ɵɵnextContext(3).subscriptionAdjusted()})),p.ɵɵtext(5,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(6,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(7,"\n "),p.ɵɵelementContainerEnd()}if(2&e){const e=p.ɵɵnextContext(3);p.ɵɵadvance(4),p.ɵɵproperty("seatPrice",e.seatPrice)("organizationId",e.organizationId)("interval",e.billingInterval)("currentSeatCount",e.seats)("maxAutoscaleSeats",e.maxAutoscaleSeats)}}function G(e,t){if(1&e){const e=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"button",41,42),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(e);return p.ɵɵnextContext(3).removeSponsorship()})),p.ɵɵtext(2,"\n "),p.ɵɵelement(3,"i",13),p.ɵɵpipe(4,"i18n"),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"span"),p.ɵɵtext(7),p.ɵɵpipe(8,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(9,"\n "),p.ɵɵelementEnd()}if(2&e){const e=p.ɵɵreference(1),t=p.ɵɵnextContext(3);p.ɵɵproperty("appApiAction",t.removeSponsorshipPromise)("disabled",e.loading),p.ɵɵadvance(3),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(4,4,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(8,6,"removeSponsorship"))}}function W(e,t){if(1&e){const e=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"div",24),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"button",37),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(e);return p.ɵɵnextContext(4).adjustStorage(!0)})),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"button",45),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(e);return p.ɵɵnextContext(4).adjustStorage(!1)})),p.ɵɵtext(7),p.ɵɵpipe(8,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(9,"\n "),p.ɵɵelementEnd()}2&e&&(p.ɵɵadvance(3),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(4,2,"addStorage"),"\n "),p.ɵɵadvance(4),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(8,4,"removeStorage"),"\n "))}function $(e,t){if(1&e){const e=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"app-adjust-storage",46),p.ɵɵlistener("onAdjusted",(function(){p.ɵɵrestoreView(e);return p.ɵɵnextContext(4).closeStorage(!0)}))("onCanceled",(function(){p.ɵɵrestoreView(e);return p.ɵɵnextContext(4).closeStorage(!1)})),p.ɵɵelementEnd()}if(2&e){const e=p.ɵɵnextContext(4);p.ɵɵproperty("storageGbPrice",e.storageGbPrice)("add",e.adjustStorageAdd)("organizationId",e.organizationId)("interval",e.billingInterval)}}function Y(e,t){if(1&e&&(p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"div",39),p.ɵɵtext(3,"\n "),p.ɵɵtemplate(4,W,10,6,"div",43),p.ɵɵtext(5,"\n "),p.ɵɵtemplate(6,$,1,4,"app-adjust-storage",44),p.ɵɵtext(7,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(8,"\n "),p.ɵɵelementContainerEnd()),2&e){const e=p.ɵɵnextContext(3);p.ɵɵadvance(4),p.ɵɵproperty("ngIf",!e.showAdjustStorage),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",e.showAdjustStorage)}}function Q(e,t){if(1&e){const e=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"button",47),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(e);return p.ɵɵnextContext(3).downloadLicense()})),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()}if(2&e){const e=p.ɵɵnextContext(3);p.ɵɵproperty("disabled",e.showDownloadLicense),p.ɵɵadvance(1),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(2,2,"downloadLicense"),"\n ")}}function J(e,t){if(1&e){const e=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"button",45),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(e);return p.ɵɵnextContext(3).manageBillingSync()})),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()}if(2&e){const e=p.ɵɵnextContext(3);p.ɵɵadvance(1),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(2,1,e.hasBillingSyncToken?"manageBillingSync":"setUpBillingSync"),"\n ")}}function Z(e,t){if(1&e){const e=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"div",39),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"app-download-license",48),p.ɵɵlistener("onDownloaded",(function(){p.ɵɵrestoreView(e);return p.ɵɵnextContext(3).closeDownloadLicense()}))("onCanceled",(function(){p.ɵɵrestoreView(e);return p.ɵɵnextContext(3).closeDownloadLicense()})),p.ɵɵelementEnd(),p.ɵɵtext(3,"\n "),p.ɵɵelementEnd()}if(2&e){const e=p.ɵɵnextContext(3);p.ɵɵadvance(2),p.ɵɵproperty("organizationId",e.organizationId)}}function X(e,t){if(1&e){const e=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"button",49,50),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(e);return p.ɵɵnextContext(3).cancel()})),p.ɵɵtext(2,"\n "),p.ɵɵelement(3,"i",13),p.ɵɵpipe(4,"i18n"),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"span"),p.ɵɵtext(7),p.ɵɵpipe(8,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(9,"\n "),p.ɵɵelementEnd()}if(2&e){const e=p.ɵɵreference(1),t=p.ɵɵnextContext(3);p.ɵɵproperty("appApiAction",t.cancelPromise)("disabled",e.loading),p.ɵɵadvance(3),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(4,4,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(8,6,"cancelSubscription"))}}const ee=function(e){return{width:e}};function te(e,t){if(1&e&&(p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"div",14),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"div",15),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"dl"),p.ɵɵtext(7,"\n "),p.ɵɵelementStart(8,"dt"),p.ɵɵtext(9),p.ɵɵpipe(10,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(11,"\n "),p.ɵɵelementStart(12,"dd"),p.ɵɵtext(13),p.ɵɵelementEnd(),p.ɵɵtext(14,"\n "),p.ɵɵtemplate(15,_,23,15,"ng-container",1),p.ɵɵtext(16,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(17,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(18,"\n "),p.ɵɵtemplate(19,z,14,4,"div",16),p.ɵɵtext(20,"\n "),p.ɵɵtemplate(21,H,16,7,"ng-container",1),p.ɵɵtext(22,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(23,"\n "),p.ɵɵelementContainerStart(24),p.ɵɵtext(25,"\n "),p.ɵɵtemplate(26,L,3,3,"button",17),p.ɵɵtext(27,"\n "),p.ɵɵtemplate(28,K,1,1,"app-change-plan",18),p.ɵɵtext(29,"\n "),p.ɵɵelementContainerEnd(),p.ɵɵtext(30,"\n "),p.ɵɵelementStart(31,"h2",19),p.ɵɵtext(32),p.ɵɵpipe(33,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(34,"\n "),p.ɵɵelementStart(35,"p",20),p.ɵɵtext(36),p.ɵɵelementEnd(),p.ɵɵtext(37,"\n "),p.ɵɵtemplate(38,q,8,5,"ng-container",1),p.ɵɵtext(39,"\n "),p.ɵɵtemplate(40,G,10,8,"button",21),p.ɵɵtext(41,"\n "),p.ɵɵelementStart(42,"h2",19),p.ɵɵtext(43),p.ɵɵpipe(44,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(45,"\n "),p.ɵɵelementStart(46,"p"),p.ɵɵtext(47),p.ɵɵpipe(48,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(49,"\n "),p.ɵɵelementStart(50,"div",22),p.ɵɵtext(51,"\n "),p.ɵɵelementStart(52,"div",23),p.ɵɵtext(53),p.ɵɵpipe(54,"percent"),p.ɵɵelementEnd(),p.ɵɵtext(55,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(56,"\n "),p.ɵɵtemplate(57,Y,9,2,"ng-container",1),p.ɵɵtext(58,"\n "),p.ɵɵtext(59,"\n "),p.ɵɵelementStart(60,"h2",19),p.ɵɵtext(61),p.ɵɵpipe(62,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(63,"\n "),p.ɵɵelementStart(64,"p",20),p.ɵɵtext(65),p.ɵɵpipe(66,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(67,"\n "),p.ɵɵelementStart(68,"div",24),p.ɵɵtext(69,"\n "),p.ɵɵtemplate(70,Q,3,4,"button",25),p.ɵɵtext(71,"\n "),p.ɵɵtemplate(72,J,3,3,"button",26),p.ɵɵtext(73,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(74,"\n "),p.ɵɵtemplate(75,Z,4,1,"div",27),p.ɵɵtext(76,"\n "),p.ɵɵelementStart(77,"h2",19),p.ɵɵtext(78),p.ɵɵpipe(79,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(80,"\n "),p.ɵɵelementStart(81,"p",20),p.ɵɵtext(82),p.ɵɵpipe(83,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(84,"\n "),p.ɵɵelementStart(85,"div",24),p.ɵɵtext(86,"\n "),p.ɵɵtemplate(87,X,10,8,"button",28),p.ɵɵtext(88,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(89,"\n "),p.ɵɵelementContainerEnd()),2&e){const e=p.ɵɵnextContext(2);p.ɵɵadvance(9),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(10,25,"billingPlan")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(e.sub.plan.name),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",e.subscription),p.ɵɵadvance(4),p.ɵɵproperty("ngIf",e.subscription),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",null!=(null==e.userOrg?null:e.userOrg.providerId)),p.ɵɵadvance(5),p.ɵɵproperty("ngIf",e.showChangePlanButton),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",e.showChangePlan),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(33,27,"manageSubscription")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(e.subscriptionDesc),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",e.subscription&&e.canAdjustSeats&&!e.subscription.cancelled&&!e.subscriptionMarkedForCancel),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",e.isSponsoredSubscription),p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(44,29,"storage")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind3(48,31,"subscriptionStorage",e.sub.maxStorageGb||0,e.sub.storageName||"0 MB")),p.ɵɵadvance(5),p.ɵɵproperty("ngStyle",p.ɵɵpureFunction1(45,ee,e.storageProgressWidth+"%")),p.ɵɵattribute("aria-valuenow",e.storagePercentage),p.ɵɵadvance(1),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(54,35,e.storagePercentage/100),"\n "),p.ɵɵadvance(4),p.ɵɵproperty("ngIf",e.subscription&&!e.subscription.cancelled&&!e.subscriptionMarkedForCancel),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(62,37,"selfHostingTitle")),p.ɵɵadvance(4),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(66,39,"selfHostingEnterpriseOrganizationSectionCopy"),"\n "),p.ɵɵadvance(5),p.ɵɵproperty("ngIf",e.canDownloadLicense),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",e.canManageBillingSync),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",e.showDownloadLicense),p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(79,41,"additionalOptions")),p.ɵɵadvance(4),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(83,43,"additionalOptionsDesc"),"\n "),p.ɵɵadvance(5),p.ɵɵproperty("ngIf",e.subscription&&!e.subscription.cancelled&&!e.subscriptionMarkedForCancel)}}function ne(e,t){1&e&&(p.ɵɵelementStart(0,"span",54),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"i",55),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(3),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(4,1,"licenseIsExpired"),"\n "))}function ie(e,t){if(1&e&&(p.ɵɵelementStart(0,"dd"),p.ɵɵtext(1),p.ɵɵpipe(2,"date"),p.ɵɵtemplate(3,ne,5,3,"span",53),p.ɵɵtext(4,"\n "),p.ɵɵelementEnd()),2&e){const e=p.ɵɵnextContext(3);p.ɵɵadvance(1),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind2(2,2,e.sub.expiration,"mediumDate"),"\n "),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",e.isExpired)}}function re(e,t){1&e&&(p.ɵɵelementStart(0,"dd"),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(2,1,"neverExpires")))}function oe(e,t){if(1&e){const e=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"div",56),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"div",57),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"button",58),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(e);return p.ɵɵnextContext(3).closeUpdateLicense(!1)})),p.ɵɵpipe(5,"i18n"),p.ɵɵtext(6,"\n "),p.ɵɵelementStart(7,"span",59),p.ɵɵtext(8,"×"),p.ɵɵelementEnd(),p.ɵɵtext(9,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(10,"\n "),p.ɵɵelementStart(11,"h3",60),p.ɵɵtext(12),p.ɵɵpipe(13,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(14,"\n "),p.ɵɵelementStart(15,"app-update-license",61),p.ɵɵlistener("onUpdated",(function(){p.ɵɵrestoreView(e);return p.ɵɵnextContext(3).closeUpdateLicense(!0)}))("onCanceled",(function(){p.ɵɵrestoreView(e);return p.ɵɵnextContext(3).closeUpdateLicense(!1)})),p.ɵɵelementEnd(),p.ɵɵtext(16,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(17,"\n "),p.ɵɵelementEnd()}if(2&e){const e=p.ɵɵnextContext(3);p.ɵɵadvance(4),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(5,3,"cancel")),p.ɵɵadvance(8),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(13,5,"updateLicense")),p.ɵɵadvance(3),p.ɵɵproperty("organizationId",e.organizationId)}}function ae(e,t){if(1&e&&(p.ɵɵelementStart(0,"span"),p.ɵɵtext(1),p.ɵɵpipe(2,"date"),p.ɵɵelementEnd()),2&e){const e=p.ɵɵnextContext(5);p.ɵɵadvance(1),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind2(2,1,e.userOrg.familySponsorshipLastSyncDate,"medium"),"\n ")}}function se(e,t){1&e&&(p.ɵɵelementStart(0,"span"),p.ɵɵtext(1),p.ɵɵpipe(2,"lowercase"),p.ɵɵpipe(3,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(2,1,p.ɵɵpipeBind1(3,3,"never")),"\n "))}function le(e,t){if(1&e&&(p.ɵɵelementStart(0,"small",64),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵtemplate(3,ae,3,4,"span",1),p.ɵɵtext(4,"\n "),p.ɵɵtemplate(5,se,4,5,"span",1),p.ɵɵtext(6,"\n "),p.ɵɵelementEnd()),2&e){const e=p.ɵɵnextContext(4);p.ɵɵadvance(1),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(2,3,"lastSync"),":\n "),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",null!=e.userOrg.familySponsorshipLastSyncDate),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",null==e.userOrg.familySponsorshipLastSyncDate)}}function ce(e,t){if(1&e){const e=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"div"),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"h2",62),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"p"),p.ɵɵtext(7),p.ɵɵpipe(8,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(9,"\n "),p.ɵɵelementStart(10,"button",37),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(e);return p.ɵɵnextContext(3).manageBillingSyncSelfHosted()})),p.ɵɵtext(11),p.ɵɵpipe(12,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(13,"\n "),p.ɵɵtemplate(14,le,7,5,"small",63),p.ɵɵtext(15,"\n "),p.ɵɵelementEnd()}if(2&e){const e=p.ɵɵnextContext(3);p.ɵɵadvance(3),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(4,4,"billingSync"),"\n "),p.ɵɵadvance(4),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(8,6,"billingSyncDesc"),"\n "),p.ɵɵadvance(4),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(12,8,"manageBillingSync"),"\n "),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",e.billingSyncSetUp)}}function de(e,t){if(1&e){const e=p.ɵɵgetCurrentView();p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"dl"),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"dt"),p.ɵɵtext(5),p.ɵɵpipe(6,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(7,"\n "),p.ɵɵelementStart(8,"dd"),p.ɵɵtext(9),p.ɵɵelementEnd(),p.ɵɵtext(10,"\n "),p.ɵɵelementStart(11,"dt"),p.ɵɵtext(12),p.ɵɵpipe(13,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(14,"\n "),p.ɵɵtemplate(15,ie,5,5,"dd",1),p.ɵɵtext(16,"\n "),p.ɵɵtemplate(17,re,3,3,"dd",1),p.ɵɵtext(18,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(19,"\n "),p.ɵɵelementStart(20,"div"),p.ɵɵtext(21,"\n "),p.ɵɵelementStart(22,"button",37),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(e);return p.ɵɵnextContext(2).updateLicense()})),p.ɵɵtext(23),p.ɵɵpipe(24,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(25,"\n "),p.ɵɵelementStart(26,"a",51),p.ɵɵtext(27),p.ɵɵpipe(28,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(29,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(30,"\n "),p.ɵɵtemplate(31,oe,18,7,"div",52),p.ɵɵtext(32,"\n "),p.ɵɵtemplate(33,ce,16,10,"div",1),p.ɵɵtext(34,"\n "),p.ɵɵelementContainerEnd()}if(2&e){const e=p.ɵɵnextContext(2);p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(6,9,"billingPlan")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(e.sub.plan.name),p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(13,11,"expiration")),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",e.sub.expiration),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!e.sub.expiration),p.ɵɵadvance(6),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(24,13,"updateLicense"),"\n "),p.ɵɵadvance(4),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(28,15,"manageSubscription"),"\n "),p.ɵɵadvance(4),p.ɵɵproperty("ngIf",e.showUpdateLicense),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",e.showBillingSyncKey)}}function pe(e,t){if(1&e&&(p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵtemplate(2,U,4,6,"app-callout",9),p.ɵɵtext(3,"\n "),p.ɵɵtemplate(4,V,18,14,"app-callout",9),p.ɵɵtext(5,"\n "),p.ɵɵtemplate(6,te,90,47,"ng-container",1),p.ɵɵtext(7,"\n "),p.ɵɵtemplate(8,de,35,17,"ng-container",1),p.ɵɵtext(9,"\n"),p.ɵɵelementContainerEnd()),2&e){const e=p.ɵɵnextContext();p.ɵɵadvance(2),p.ɵɵproperty("ngIf",e.subscription&&e.subscription.cancelled),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",e.subscriptionMarkedForCancel),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!e.selfHosted),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",e.selfHosted)}}function ue(e,t){}function me(e,t){}class he{constructor(e,t,n,i,r,o,a,s){this.apiService=e,this.platformUtilsService=t,this.i18nService=n,this.messagingService=i,this.route=r,this.organizationService=o,this.logService=a,this.modalService=s,this.loading=!1,this.firstLoaded=!1,this.adjustSeatsAdd=!0,this.showAdjustSeats=!1,this.showAdjustSeatAutoscale=!1,this.adjustStorageAdd=!0,this.showAdjustStorage=!1,this.showUpdateLicense=!1,this.showBillingSyncKey=!1,this.showDownloadLicense=!1,this.showChangePlan=!1,this.selfHosted=!1,this.selfHosted=t.isSelfHost()}ngOnInit(){return i(this,void 0,void 0,(function*(){this.route.parent.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.organizationId=e.organizationId,yield this.load(),this.firstLoaded=!0}))))}))}load(){return i(this,void 0,void 0,(function*(){if(this.loading)return;this.loading=!0,this.userOrg=yield this.organizationService.get(this.organizationId),this.userOrg.canManageBilling&&(this.sub=yield this.apiService.getOrganizationSubscription(this.organizationId));const e=yield this.apiService.getOrganizationApiKeyInformation(this.organizationId);this.hasBillingSyncToken=e.data.some((e=>e.keyType===o.OrganizationApiKeyType.BillingSync)),this.selfHosted&&(this.showBillingSyncKey=yield this.apiService.getCloudCommunicationsEnabled()),this.showBillingSyncKey&&(this.existingBillingSyncConnection=yield this.apiService.getOrganizationConnection(this.organizationId,a.OrganizationConnectionType.CloudBillingSync,l.BillingSyncConfigApi)),this.loading=!1}))}reinstate(){return i(this,void 0,void 0,(function*(){if(this.loading)return;if(yield this.platformUtilsService.showDialog(this.i18nService.t("reinstateConfirmation"),this.i18nService.t("reinstateSubscription"),this.i18nService.t("yes"),this.i18nService.t("cancel")))try{this.reinstatePromise=this.apiService.postOrganizationReinstate(this.organizationId),yield this.reinstatePromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("reinstated")),this.load()}catch(e){this.logService.error(e)}}))}cancel(){return i(this,void 0,void 0,(function*(){if(this.loading)return;if(yield this.platformUtilsService.showDialog(this.i18nService.t("cancelConfirmation"),this.i18nService.t("cancelSubscription"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning"))try{this.cancelPromise=this.apiService.postOrganizationCancel(this.organizationId),yield this.cancelPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("canceledSubscription")),this.load()}catch(e){this.logService.error(e)}}))}changePlan(){return i(this,void 0,void 0,(function*(){this.showChangePlan=!this.showChangePlan}))}closeChangePlan(e){this.showChangePlan=!1}downloadLicense(){this.showDownloadLicense=!this.showDownloadLicense}manageBillingSync(){return i(this,void 0,void 0,(function*(){const[e]=yield this.modalService.openViewRef(d.BillingSyncApiKeyComponent,this.setupBillingSyncModalRef,(e=>{e.organizationId=this.organizationId,e.hasBillingToken=this.hasBillingSyncToken}));e.onClosed.subscribe((()=>i(this,void 0,void 0,(function*(){yield this.load()}))))}))}closeDownloadLicense(){this.showDownloadLicense=!1}updateLicense(){this.loading||(this.showUpdateLicense=!0)}closeUpdateLicense(e){this.showUpdateLicense=!1,e&&(this.load(),this.messagingService.send("updatedOrgLicense"))}subscriptionAdjusted(){this.load()}adjustStorage(e){this.adjustStorageAdd=e,this.showAdjustStorage=!0}closeStorage(e){this.showAdjustStorage=!1,e&&this.load()}removeSponsorship(){return i(this,void 0,void 0,(function*(){if(yield this.platformUtilsService.showDialog(this.i18nService.t("removeSponsorshipConfirmation"),this.i18nService.t("removeSponsorship"),this.i18nService.t("remove"),this.i18nService.t("cancel"),"warning"))try{this.removeSponsorshipPromise=this.apiService.deleteRemoveSponsorship(this.organizationId),yield this.removeSponsorshipPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("removeSponsorshipSuccess")),yield this.load()}catch(e){this.logService.error(e)}}))}manageBillingSyncSelfHosted(){return i(this,void 0,void 0,(function*(){this.billingSyncKeyRef=yield this.modalService.openViewRef(c.BillingSyncKeyComponent,this.billingSyncKeyViewContainerRef,(e=>{var t,n,i;e.entityId=this.organizationId,e.existingConnectionId=null===(t=this.existingBillingSyncConnection)||void 0===t?void 0:t.id,e.billingSyncKey=null===(i=null===(n=this.existingBillingSyncConnection)||void 0===n?void 0:n.config)||void 0===i?void 0:i.billingSyncKey,e.setParentConnection=e=>{this.existingBillingSyncConnection=e,this.billingSyncKeyRef[0].close()}}))}))}get isExpired(){return null!=this.sub&&null!=this.sub.expiration&&new Date(this.sub.expiration)e.sponsoredSubscriptionItem))}get canDownloadLicense(){return this.sub.planType!==s.PlanType.Free&&null==this.subscription||null!=this.subscription&&!this.subscription.cancelled}get canManageBillingSync(){return!this.selfHosted&&(this.sub.planType===s.PlanType.EnterpriseAnnually||this.sub.planType===s.PlanType.EnterpriseMonthly||this.sub.planType===s.PlanType.EnterpriseAnnually2019||this.sub.planType===s.PlanType.EnterpriseMonthly2019)}get subscriptionDesc(){return this.sub.planType===s.PlanType.Free?this.i18nService.t("subscriptionFreePlan",this.sub.seats.toString()):this.sub.planType===s.PlanType.FamiliesAnnually||this.sub.planType===s.PlanType.FamiliesAnnually2019?this.isSponsoredSubscription?this.i18nService.t("subscriptionSponsoredFamiliesPlan",this.sub.seats.toString()):this.i18nService.t("subscriptionFamiliesPlan",this.sub.seats.toString()):this.sub.maxAutoscaleSeats===this.sub.seats&&null!=this.sub.seats?this.i18nService.t("subscriptionMaxReached",this.sub.seats.toString()):null==this.sub.maxAutoscaleSeats?this.i18nService.t("subscriptionUserSeatsUnlimitedAutoscale"):this.i18nService.t("subscriptionUserSeatsLimitedAutoscale",this.sub.maxAutoscaleSeats.toString())}get showChangePlanButton(){return null==this.subscription&&this.sub.planType===s.PlanType.Free&&!this.showChangePlan}get billingSyncSetUp(){var e;return null!=(null===(e=this.existingBillingSyncConnection)||void 0===e?void 0:e.id)}}t.OrganizationSubscriptionComponent=he,he.ɵfac=function(e){return new(e||he)(p.ɵɵdirectiveInject(u.ApiService),p.ɵɵdirectiveInject(m.PlatformUtilsService),p.ɵɵdirectiveInject(h.I18nService),p.ɵɵdirectiveInject(v.MessagingService),p.ɵɵdirectiveInject(f.ActivatedRoute),p.ɵɵdirectiveInject(g.OrganizationService),p.ɵɵdirectiveInject(y.LogService),p.ɵɵdirectiveInject(x.ModalService))},he.ɵcmp=p.ɵɵdefineComponent({type:he,selectors:[["app-org-subscription"]],viewQuery:function(e,t){if(1&e&&(p.ɵɵviewQuery(M,7,r.ViewContainerRef),p.ɵɵviewQuery(B,7,r.ViewContainerRef)),2&e){let e;p.ɵɵqueryRefresh(e=p.ɵɵloadQuery())&&(t.setupBillingSyncModalRef=e.first),p.ɵɵqueryRefresh(e=p.ɵɵloadQuery())&&(t.billingSyncKeyViewContainerRef=e.first)}},decls:21,vars:7,consts:[[1,"page-header"],[4,"ngIf"],["setupBillingSyncTemplate",""],["rotateBillingSyncKeyTemplate",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"tw-flex","tw-flex-col","tw-items-center","tw-text-info"],[1,"tw-font-bold"],["type","warning",3,"title",4,"ngIf"],["type","warning",3,"title"],["type","button",1,"btn","btn-outline-secondary","btn-submit",3,"appApiAction","disabled","click"],["reinstateBtn",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[1,"row"],[1,"col-4"],["class","col-8",4,"ngIf"],["type","button","class","btn btn-outline-secondary",3,"click",4,"ngIf"],[3,"organizationId","onChanged","onCanceled",4,"ngIf"],[1,"spaced-header"],[1,"mb-4"],["type","button","class","btn btn-outline-danger btn-submit",3,"appApiAction","disabled","click",4,"ngIf"],[1,"progress"],["role","progressbar","aria-valuemin","0","aria-valuemax","100",1,"progress-bar","bg-success",3,"ngStyle"],[1,"d-flex"],["type","button","class","btn btn-outline-secondary",3,"disabled","click",4,"ngIf"],["type","button","class","btn btn-outline-secondary ml-1",3,"click",4,"ngIf"],["class","mt-3",4,"ngIf"],["type","button","class","btn btn-outline-danger btn-submit ml-1",3,"appApiAction","disabled","click",4,"ngIf"],[1,"text-capitalize"],["class","badge badge-warning",4,"ngIf"],[1,"badge","badge-warning"],[1,"col-8"],[1,"d-block","mb-1"],[1,"table"],[4,"ngFor","ngForOf"],[1,"col-sm"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[3,"organizationId","onChanged","onCanceled"],[1,"mt-3"],[3,"seatPrice","organizationId","interval","currentSeatCount","maxAutoscaleSeats","onAdjusted"],["type","button",1,"btn","btn-outline-danger","btn-submit",3,"appApiAction","disabled","click"],["removeSponsorshipBtn",""],["class","d-flex",4,"ngIf"],[3,"storageGbPrice","add","organizationId","interval","onAdjusted","onCanceled",4,"ngIf"],["type","button",1,"btn","btn-outline-secondary","ml-1",3,"click"],[3,"storageGbPrice","add","organizationId","interval","onAdjusted","onCanceled"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],[3,"organizationId","onDownloaded","onCanceled"],["type","button",1,"btn","btn-outline-danger","btn-submit","ml-1",3,"appApiAction","disabled","click"],["cancelBtn",""],["href","https://vault.bitwarden.com","target","_blank","rel","noopener",1,"btn","btn-outline-secondary"],["class","card mt-3",4,"ngIf"],["class","text-danger ml-2",4,"ngIf"],[1,"text-danger","ml-2"],["aria-hidden","true",1,"bwi","bwi-exclamation-triangle"],[1,"card","mt-3"],[1,"card-body"],["type","button",1,"close",3,"appA11yTitle","click"],["aria-hidden","true"],[1,"card-body-header"],[3,"organizationId","onUpdated","onCanceled"],[1,"mt-5"],["class","form-text text-muted",4,"ngIf"],[1,"form-text","text-muted"]],template:function(e,t){1&e&&(p.ɵɵelementStart(0,"div",0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"h1"),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵtemplate(5,D,9,6,"small",1),p.ɵɵtext(6,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(7,"\n"),p.ɵɵelementEnd(),p.ɵɵtext(8,"\n"),p.ɵɵtemplate(9,R,9,6,"ng-container",1),p.ɵɵtext(10,"\n\n"),p.ɵɵtemplate(11,F,15,7,"ng-container",1),p.ɵɵtext(12,"\n\n"),p.ɵɵtemplate(13,pe,10,4,"ng-container",1),p.ɵɵtext(14,"\n"),p.ɵɵtemplate(15,ue,0,0,"ng-template",null,2,p.ɵɵtemplateRefExtractor),p.ɵɵtext(17,"\n"),p.ɵɵtemplate(18,me,0,0,"ng-template",null,3,p.ɵɵtemplateRefExtractor),p.ɵɵtext(20,"\n")),2&e&&(p.ɵɵadvance(3),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(4,5,"subscription"),"\n "),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",t.firstLoaded&&t.loading),p.ɵɵadvance(4),p.ɵɵproperty("ngIf",!t.firstLoaded&&t.loading),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",t.firstLoaded&&!t.userOrg.canManageBilling),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",t.sub))},directives:[S.NgIf,b.ImageSubscriptionHiddenComponent,w.CalloutComponent,C.ApiActionDirective,S.NgStyle,S.NgForOf,I.ChangePlanComponent,E.AdjustSubscription,P.AdjustStorageComponent,O.DownloadLicenseComponent,k.A11yTitleDirective,A.UpdateLicenseComponent],pipes:[T.I18nPipe,S.PercentPipe,S.DatePipe,S.CurrencyPipe,S.LowerCasePipe],encapsulation:2})},78027:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsComponent=void 0;n(68012),n(63513),n(73828);const r=n(32621),o=n(68012),a=n(63513),s=n(73828),l=n(57490),c=n(99729);function d(e,t){1&e&&(r.ɵɵelementStart(0,"a",11),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"billing"),"\n "))}function p(e,t){1&e&&(r.ɵɵelementStart(0,"a",12),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"twoStepLogin"),"\n "))}class u{constructor(e,t,n){this.route=e,this.organizationService=t,this.platformUtilsService=n,this.access2fa=!1}ngOnInit(){this.route.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){const t=yield this.organizationService.get(e.organizationId);this.showBilling=!this.platformUtilsService.isSelfHost()&&t.canManageBilling,this.access2fa=t.use2fa}))))}}t.SettingsComponent=u,u.ɵfac=function(e){return new(e||u)(r.ɵɵdirectiveInject(o.ActivatedRoute),r.ɵɵdirectiveInject(a.OrganizationService),r.ɵɵdirectiveInject(s.PlatformUtilsService))},u.ɵcmp=r.ɵɵdefineComponent({type:u,selectors:[["app-org-settings"]],decls:36,vars:11,consts:[[1,"container","page-content"],[1,"row"],[1,"col-3"],[1,"card"],[1,"card-header"],[1,"list-group","list-group-flush"],["routerLink","account","routerLinkActive","active",1,"list-group-item"],["routerLink","subscription","routerLinkActive","active",1,"list-group-item"],["routerLink","billing","class","list-group-item","routerLinkActive","active",4,"ngIf"],["routerLink","two-factor","class","list-group-item","routerLinkActive","active",4,"ngIf"],[1,"col-9"],["routerLink","billing","routerLinkActive","active",1,"list-group-item"],["routerLink","two-factor","routerLinkActive","active",1,"list-group-item"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",2),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"div",3),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"div",4),r.ɵɵtext(9),r.ɵɵpipe(10,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n "),r.ɵɵelementStart(12,"div",5),r.ɵɵtext(13,"\n "),r.ɵɵelementStart(14,"a",6),r.ɵɵtext(15),r.ɵɵpipe(16,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(17,"\n "),r.ɵɵelementStart(18,"a",7),r.ɵɵtext(19),r.ɵɵpipe(20,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(21,"\n "),r.ɵɵtemplate(22,d,3,3,"a",8),r.ɵɵtext(23,"\n "),r.ɵɵtemplate(24,p,3,3,"a",9),r.ɵɵtext(25,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(26,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(27,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(28,"\n "),r.ɵɵelementStart(29,"div",10),r.ɵɵtext(30,"\n "),r.ɵɵelement(31,"router-outlet"),r.ɵɵtext(32,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(33,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(34,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(35,"\n")),2&e&&(r.ɵɵadvance(9),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(10,5,"settings")),r.ɵɵadvance(6),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(16,7,"myOrganization"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(20,9,"subscription"),"\n "),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",t.showBilling),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.access2fa))},directives:[o.RouterLinkWithHref,o.RouterLinkActive,l.NgIf,o.RouterOutlet],pipes:[c.I18nPipe],encapsulation:2})},38359:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorSetupComponent=void 0;n(68012),n(64684),n(91674),n(45552),n(62166),n(73569);const r=n(97374),o=n(71790),a=n(35906),s=n(32621),l=n(91674),c=n(64684),d=n(45552),p=n(62166),u=n(68012),m=n(73569),h=n(57490),v=n(20138),f=n(52767),g=n(48403),y=n(99729);function x(e,t){1&e&&(s.ɵɵelementStart(0,"p"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,1,"twoStepLoginDesc")))}function S(e,t){1&e&&(s.ɵɵelementStart(0,"p"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,1,"twoStepLoginOrganizationDesc")))}function b(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"bit-callout",12),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"p"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"button",13),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().recoveryCode()})),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n"),s.ɵɵelementEnd()}2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,2,"twoStepLoginRecoveryWarning")),s.ɵɵadvance(4),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(8,4,"viewRecoveryCode"),"\n "))}function w(e,t){1&e&&(s.ɵɵelementStart(0,"small"),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",14),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",15),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"loading")))}function C(e,t){1&e&&(s.ɵɵelementStart(0,"bit-callout",12),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,1,"twoStepLoginPolicyUserWarning"),"\n"))}function I(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",23),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",15),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"enabled")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"enabled")))}function E(e,t){1&e&&s.ɵɵelement(0,"app-premium-badge")}function P(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"li",16),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",17),s.ɵɵtext(3,"\n "),s.ɵɵelement(4,"img",18),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementStart(7,"div",19),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"h3",20),s.ɵɵtext(10),s.ɵɵtemplate(11,I,9,6,"ng-container",1),s.ɵɵtext(12,"\n "),s.ɵɵtemplate(13,E,1,0,"app-premium-badge",1),s.ɵɵtext(14,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(15),s.ɵɵelementEnd(),s.ɵɵtext(16,"\n "),s.ɵɵelementStart(17,"div",21),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"button",22),s.ɵɵlistener("click",(function(){const t=s.ɵɵrestoreView(e).$implicit;return s.ɵɵnextContext().manage(t.type)})),s.ɵɵtext(20),s.ɵɵpipe(21,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(23,"\n "),s.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=s.ɵɵnextContext();s.ɵɵadvance(4),s.ɵɵclassMap("mfaType"+e.type),s.ɵɵproperty("alt",e.name+" logo"),s.ɵɵadvance(6),s.ɵɵtextInterpolate1("\n ",e.name,"\n "),s.ɵɵadvance(1),s.ɵɵproperty("ngIf",e.enabled),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.premium),s.ɵɵadvance(2),s.ɵɵtextInterpolate1("\n ",e.description,"\n "),s.ɵɵadvance(4),s.ɵɵproperty("disabled",!n.canAccessPremium&&e.premium),s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(21,9,"manage"),"\n ")}}function O(e,t){}function k(e,t){}function A(e,t){}function T(e,t){}function M(e,t){}function B(e,t){}const D=function(e){return{"mt-5":e}};class R extends a.TwoFactorSetupComponent{constructor(e,t,n,i,r,o){super(e,t,n,i,o),this.route=r}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){this.route.parent.parent.params.subscribe((t=>i(this,void 0,void 0,(function*(){this.organizationId=t.organizationId,yield e.ngOnInit.call(this)}))))}))}manage(e){return i(this,void 0,void 0,(function*(){switch(e){case r.TwoFactorProviderType.OrganizationDuo:{const e=yield this.openModal(this.duoModalRef,o.TwoFactorDuoComponent);e.type=r.TwoFactorProviderType.OrganizationDuo,e.organizationId=this.organizationId,e.onUpdated.subscribe((e=>{this.updateStatus(e,r.TwoFactorProviderType.OrganizationDuo)}));break}}}))}getTwoFactorProviders(){return this.apiService.getTwoFactorOrganizationProviders(this.organizationId)}filterProvider(e){return e!==r.TwoFactorProviderType.OrganizationDuo}}t.TwoFactorSetupComponent=R,R.ɵfac=function(e){return new(e||R)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.ModalService),s.ɵɵdirectiveInject(d.MessagingService),s.ɵɵdirectiveInject(p.PolicyService),s.ɵɵdirectiveInject(u.ActivatedRoute),s.ɵɵdirectiveInject(m.StateService))},R.ɵcmp=s.ɵɵdefineComponent({type:R,selectors:[["app-two-factor-setup"]],features:[s.ɵɵInheritDefinitionFeature],decls:44,vars:15,consts:[[1,"tabbed-header"],[4,"ngIf"],["type","warning",4,"ngIf"],[3,"ngClass"],[1,"list-group","list-group-2fa"],["class","list-group-item d-flex align-items-center",4,"ngFor","ngForOf"],["authenticatorTemplate",""],["recoveryTemplate",""],["duoTemplate",""],["emailTemplate",""],["yubikeyTemplate",""],["webAuthnTemplate",""],["type","warning"],["bit-button","","buttonType","secondary",3,"click"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-fw","text-muted",3,"title"],[1,"sr-only"],[1,"list-group-item","d-flex","align-items-center"],[1,"logo-2fa","d-flex","justify-content-center"],[3,"alt"],[1,"mx-4"],[1,"mb-0"],[1,"ml-auto"],["bit-button","","buttonType","secondary",3,"disabled","click"],["aria-hidden","true",1,"bwi","bwi-check","text-success","bwi-fw",3,"title"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"h1"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n"),s.ɵɵtemplate(7,x,3,3,"p",1),s.ɵɵtext(8,"\n"),s.ɵɵtemplate(9,S,3,3,"p",1),s.ɵɵtext(10,"\n"),s.ɵɵtemplate(11,b,10,6,"bit-callout",2),s.ɵɵtext(12,"\n"),s.ɵɵelementStart(13,"h2",3),s.ɵɵtext(14),s.ɵɵpipe(15,"i18n"),s.ɵɵtemplate(16,w,9,6,"small",1),s.ɵɵtext(17,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n"),s.ɵɵtemplate(19,C,3,3,"bit-callout",2),s.ɵɵtext(20,"\n"),s.ɵɵelementStart(21,"ul",4),s.ɵɵtext(22,"\n "),s.ɵɵtemplate(23,P,24,11,"li",5),s.ɵɵtext(24,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(25,"\n\n"),s.ɵɵtemplate(26,O,0,0,"ng-template",null,6,s.ɵɵtemplateRefExtractor),s.ɵɵtext(28,"\n"),s.ɵɵtemplate(29,k,0,0,"ng-template",null,7,s.ɵɵtemplateRefExtractor),s.ɵɵtext(31,"\n"),s.ɵɵtemplate(32,A,0,0,"ng-template",null,8,s.ɵɵtemplateRefExtractor),s.ɵɵtext(34,"\n"),s.ɵɵtemplate(35,T,0,0,"ng-template",null,9,s.ɵɵtemplateRefExtractor),s.ɵɵtext(37,"\n"),s.ɵɵtemplate(38,M,0,0,"ng-template",null,10,s.ɵɵtemplateRefExtractor),s.ɵɵtext(40,"\n"),s.ɵɵtemplate(41,B,0,0,"ng-template",null,11,s.ɵɵtemplateRefExtractor),s.ɵɵtext(43,"\n")),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,9,"twoStepLogin")),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",!t.organizationId),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.organizationId),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!t.organizationId),s.ɵɵadvance(2),s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(13,D,!t.organizationId)),s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(15,11,"providers"),"\n "),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.loading),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",t.showPolicyWarning),s.ɵɵadvance(4),s.ɵɵproperty("ngForOf",t.providers))},directives:[h.NgIf,h.NgClass,h.NgForOf,v.CalloutComponent,f.ButtonComponent,g.PremiumBadgeComponent],pipes:[y.I18nPipe],encapsulation:2})},74155:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AcceptFamilySponsorshipComponent=void 0;const r=n(50009),o=n(32621),a=n(57490),s=n(99729);function l(e,t){1&e&&(o.ɵɵelementStart(0,"div",1),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div"),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"img",2),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"p",3),o.ɵɵtext(7,"\n "),o.ɵɵelement(8,"i",4),o.ɵɵpipe(9,"i18n"),o.ɵɵtext(10,"\n "),o.ɵɵelementStart(11,"span",5),o.ɵɵtext(12),o.ɵɵpipe(13,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(8),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(9,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(13,4,"loading")))}class c extends r.BaseAcceptComponent{constructor(){super(...arguments),this.failedShortMessage="inviteAcceptFailedShort",this.failedMessage="inviteAcceptFailed",this.requiredParameters=["email","token"]}authedHandler(e){return i(this,void 0,void 0,(function*(){this.router.navigate(["/setup/families-for-enterprise"],{queryParams:e})}))}unauthedHandler(e){return i(this,void 0,void 0,(function*(){e.register?this.router.navigate(["/register"],{queryParams:{email:e.email}}):this.router.navigate(["/login"],{queryParams:{email:e.email}})}))}}t.AcceptFamilySponsorshipComponent=c,c.ɵfac=function(){let e;return function(t){return(e||(e=o.ɵɵgetInheritedFactory(c)))(t||c)}}(),c.ɵcmp=o.ɵɵdefineComponent({type:c,selectors:[["app-accept-family-sponsorship"]],features:[o.ɵɵInheritDefinitionFeature],decls:2,vars:1,consts:[["class","mt-5 d-flex justify-content-center",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"]],template:function(e,t){1&e&&(o.ɵɵtemplate(0,l,17,6,"div",0),o.ɵɵtext(1,"\n")),2&e&&o.ɵɵproperty("ngIf",t.loading)},directives:[a.NgIf],pipes:[s.I18nPipe],encapsulation:2})},72855:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.FamiliesForEnterpriseSetupComponent=void 0;const r=n(32621),o=(n(68012),n(14857)),a=(n(64684),n(47594),n(91674),n(51554),n(63513),n(73828),n(9724),n(22931)),s=n(47937),l=n(96066),c=n(75118),d=n(5092),p=n(28360),u=n(32621),m=n(68012),h=n(73828),v=n(51554),f=n(91674),g=n(9724),y=n(47594),x=n(63513),S=n(64684),b=n(57490),w=n(96832),C=n(56820),I=n(28360),E=n(99729),P=["deleteOrganizationTemplate"];function O(e,t){1&e&&(u.ɵɵelementStart(0,"div",5),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",6),u.ɵɵpipe(3,"i18n"),u.ɵɵtext(4,"\n "),u.ɵɵelementStart(5,"span",7),u.ɵɵtext(6),u.ɵɵpipe(7,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(8,"\n "),u.ɵɵelementEnd()),2&e&&(u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(3,2,"loading")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(7,4,"loading")))}function k(e,t){1&e&&(u.ɵɵelementStart(0,"div",5),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"span"),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(5,"\n "),u.ɵɵelementEnd()),2&e&&(u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(4,1,"badToken")))}function A(e,t){if(1&e&&(u.ɵɵelementStart(0,"option",18),u.ɵɵtext(1),u.ɵɵelementEnd()),2&e){const e=t.$implicit;u.ɵɵproperty("ngValue",e.id),u.ɵɵadvance(1),u.ɵɵtextInterpolate(e.name)}}function T(e,t){1&e&&(u.ɵɵelementStart(0,"div",19),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"app-organization-plans"),u.ɵɵtext(3,"\n "),u.ɵɵelementEnd())}function M(e,t){if(1&e&&(u.ɵɵelementStart(0,"div",10),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"button",20),u.ɵɵtext(3,"\n "),u.ɵɵelement(4,"i",21),u.ɵɵpipe(5,"i18n"),u.ɵɵtext(6,"\n "),u.ɵɵelementStart(7,"span"),u.ɵɵtext(8),u.ɵɵpipe(9,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(10,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(11,"\n "),u.ɵɵelementEnd()),2&e){u.ɵɵnextContext();const e=u.ɵɵreference(1);u.ɵɵadvance(2),u.ɵɵproperty("disabled",e.loading),u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(5,3,"loading")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(9,5,"acceptOffer"))}}function B(e,t){if(1&e){const e=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"form",8,9),u.ɵɵlistener("ngSubmit",(function(){u.ɵɵrestoreView(e);return u.ɵɵnextContext().submit()})),u.ɵɵtext(2,"\n "),u.ɵɵelementStart(3,"p"),u.ɵɵtext(4,"\n "),u.ɵɵelementStart(5,"span"),u.ɵɵtext(6),u.ɵɵpipe(7,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(8,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(9,"\n "),u.ɵɵelementStart(10,"div",10),u.ɵɵtext(11,"\n "),u.ɵɵelementStart(12,"label",11),u.ɵɵtext(13),u.ɵɵpipe(14,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(15,"\n "),u.ɵɵelementStart(16,"select",12),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext().selectedFamilyOrganizationId=t})),u.ɵɵtext(17,"\n "),u.ɵɵelementStart(18,"option",13),u.ɵɵtext(19),u.ɵɵpipe(20,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(21,"\n "),u.ɵɵelementStart(22,"option",14),u.ɵɵtext(23),u.ɵɵpipe(24,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(25,"\n "),u.ɵɵtemplate(26,A,2,2,"option",15),u.ɵɵtext(27,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(28,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(29,"\n "),u.ɵɵtemplate(30,T,4,0,"div",16),u.ɵɵtext(31,"\n "),u.ɵɵtemplate(32,M,12,7,"div",17),u.ɵɵtext(33,"\n "),u.ɵɵelementEnd()}if(2&e){const e=u.ɵɵnextContext();u.ɵɵproperty("appApiAction",e.formPromise),u.ɵɵadvance(6),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(7,9,"acceptBitwardenFamiliesHelp")),u.ɵɵadvance(7),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(14,11,"sponsoredFamiliesSelectOffer")),u.ɵɵadvance(3),u.ɵɵproperty("ngModel",e.selectedFamilyOrganizationId),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("-- ",u.ɵɵpipeBind1(20,13,"select")," --"),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(24,15,"newFamiliesOrganization")),u.ɵɵadvance(3),u.ɵɵproperty("ngForOf",e.existingFamilyOrganizations),u.ɵɵadvance(4),u.ɵɵproperty("ngIf",e.showNewOrganization),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",!e.showNewOrganization)}}function D(e,t){}class R{constructor(e,t,n,i,r,o,a,s,l){this.router=e,this.platformUtilsService=t,this.i18nService=n,this.route=i,this.apiService=r,this.syncService=o,this.validationService=a,this.organizationService=s,this.modalService=l,this.loading=!0,this.badToken=!1,this.showNewOrganization=!1,this._selectedFamilyOrganizationId=""}set organizationPlansComponent(e){e&&(e.plan=s.PlanType.FamiliesAnnually,e.product=l.ProductType.Families,e.acceptingSponsorship=!0,e.onSuccess.subscribe(this.onOrganizationCreateSuccess.bind(this)))}ngOnInit(){return i(this,void 0,void 0,(function*(){document.body.classList.remove("layout_frontend"),this.route.queryParams.pipe(o.first()).subscribe((e=>i(this,void 0,void 0,(function*(){if(null==e.token)return this.platformUtilsService.showToast("error",null,this.i18nService.t("sponsoredFamiliesAcceptFailed"),{timeout:1e4}),void this.router.navigate(["/"]);this.token=e.token,yield this.syncService.fullSync(!0),this.badToken=!(yield this.apiService.postPreValidateSponsorshipToken(this.token)),this.loading=!1,this.existingFamilyOrganizations=(yield this.organizationService.getAll()).filter((e=>e.planProductType===l.ProductType.Families)),0===this.existingFamilyOrganizations.length&&(this.selectedFamilyOrganizationId="createNew")}))))}))}submit(){return i(this,void 0,void 0,(function*(){this.formPromise=this.doSubmit(this._selectedFamilyOrganizationId),yield this.formPromise,this.formPromise=null}))}get selectedFamilyOrganizationId(){return this._selectedFamilyOrganizationId}set selectedFamilyOrganizationId(e){this._selectedFamilyOrganizationId=e,this.showNewOrganization="createNew"===e}doSubmit(e){return i(this,void 0,void 0,(function*(){try{const t=new c.OrganizationSponsorshipRedeemRequest;t.planSponsorshipType=a.PlanSponsorshipType.FamiliesForEnterprise,t.sponsoredOrganizationId=e,yield this.apiService.postRedeemSponsorship(this.token,t),this.platformUtilsService.showToast("success",null,this.i18nService.t("sponsoredFamiliesOfferRedeemed")),yield this.syncService.fullSync(!0),this.router.navigate(["/"])}catch(t){this.showNewOrganization&&(yield this.modalService.openViewRef(d.DeleteOrganizationComponent,this.deleteModalRef,(t=>{t.organizationId=e,t.deleteOrganizationRequestType="InvalidFamiliesForEnterprise",t.onSuccess.subscribe((()=>{this.router.navigate(["/"])}))}))),this.validationService.showError(this.i18nService.t("sponsorshipTokenHasExpired"))}}))}onOrganizationCreateSuccess(e){return i(this,void 0,void 0,(function*(){yield this.doSubmit(e.organizationId)}))}}t.FamiliesForEnterpriseSetupComponent=R,R.ɵfac=function(e){return new(e||R)(u.ɵɵdirectiveInject(m.Router),u.ɵɵdirectiveInject(h.PlatformUtilsService),u.ɵɵdirectiveInject(v.I18nService),u.ɵɵdirectiveInject(m.ActivatedRoute),u.ɵɵdirectiveInject(f.ApiService),u.ɵɵdirectiveInject(g.SyncService),u.ɵɵdirectiveInject(y.ValidationService),u.ɵɵdirectiveInject(x.OrganizationService),u.ɵɵdirectiveInject(S.ModalService))},R.ɵcmp=u.ɵɵdefineComponent({type:R,selectors:[["families-for-enterprise-setup"]],viewQuery:function(e,t){if(1&e&&(u.ɵɵviewQuery(p.OrganizationPlansComponent,5),u.ɵɵviewQuery(P,7,r.ViewContainerRef)),2&e){let e;u.ɵɵqueryRefresh(e=u.ɵɵloadQuery())&&(t.organizationPlansComponent=e.first),u.ɵɵqueryRefresh(e=u.ɵɵloadQuery())&&(t.deleteModalRef=e.first)}},decls:19,vars:6,consts:[[1,"container","page-content"],[1,"page-header"],["class","mt-5 d-flex justify-content-center",4,"ngIf"],["ngNativeValidate","",3,"appApiAction","ngSubmit",4,"ngIf"],["deleteOrganizationTemplate",""],[1,"mt-5","d-flex","justify-content-center"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-2x","text-muted",3,"title"],[1,"sr-only"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"form-group","col-6"],["for","availableSponsorshipOrg"],["id","availableSponsorshipOrg","name","Available Sponsorship Organization","required","",1,"form-control",3,"ngModel","ngModelChange"],["value","","disabled",""],["value","createNew"],[3,"ngValue",4,"ngFor","ngForOf"],["class","col-12",4,"ngIf"],["class","form-group col-6",4,"ngIf"],[3,"ngValue"],[1,"col-12"],["type","submit",1,"btn","btn-primary","mt-2","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"]],template:function(e,t){1&e&&(u.ɵɵelementStart(0,"div",0),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"div",1),u.ɵɵtext(3,"\n "),u.ɵɵelementStart(4,"h1"),u.ɵɵtext(5),u.ɵɵpipe(6,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(7,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(8,"\n "),u.ɵɵtemplate(9,O,9,6,"div",2),u.ɵɵtext(10,"\n "),u.ɵɵtemplate(11,k,6,3,"div",2),u.ɵɵtext(12,"\n "),u.ɵɵtemplate(13,B,34,17,"form",3),u.ɵɵtext(14,"\n"),u.ɵɵelementEnd(),u.ɵɵtext(15,"\n"),u.ɵɵtemplate(16,D,0,0,"ng-template",null,4,u.ɵɵtemplateRefExtractor),u.ɵɵtext(18,"\n")),2&e&&(u.ɵɵadvance(5),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(6,4,"sponsoredFamiliesOffer")),u.ɵɵadvance(4),u.ɵɵproperty("ngIf",t.loading),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",!t.loading&&t.badToken),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",!t.loading&&!t.badToken))},directives:[b.NgIf,w.NgControlStatusGroup,w.NgForm,C.ApiActionDirective,w.SelectControlValueAccessor,w.RequiredValidator,w.NgControlStatus,w.NgModel,w.NgSelectOption,w.ɵNgSelectMultipleOption,b.NgForOf,I.OrganizationPlansComponent],pipes:[E.I18nPipe],encapsulation:2})},79002:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ExportComponent=void 0;n(96832),n(68012),n(85714),n(32034),n(97445),n(51554),n(36631),n(73828),n(62166),n(57055);const r=n(26140),o=n(32621),a=n(85714),s=n(51554),l=n(73828),c=n(97445),d=n(32034),p=n(68012),u=n(62166),m=n(36631),h=n(57055),v=n(96832),f=n(56820),g=n(57490),y=n(4158),x=n(51626),S=n(44995),b=n(99729);function w(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",13),o.ɵɵpipe(1,"i18n"),o.ɵɵtext(2),o.ɵɵpipe(3,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(1,2,"vaultExportDisabled")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(3,4,"personalVaultExportPolicyInEffect"),"\n "))}function C(e,t){if(1&e&&o.ɵɵelement(0,"app-export-scope-callout",14),2&e){const e=o.ɵɵnextContext();o.ɵɵproperty("organizationId",e.organizationId)}}function I(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",15),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("value",e.value),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}class E extends r.ExportComponent{constructor(e,t,n,i,r,o,a,s,l,c){super(e,t,n,i,r,a,s,l,c),this.route=o}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){this.route.parent.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.organizationId=e.organizationId})))),yield e.ngOnInit.call(this)}))}checkExportDisabled(){return i(this,void 0,void 0,(function*(){}))}getExportData(){return this.exportService.getOrganizationExport(this.organizationId,this.format)}getFileName(){return super.getFileName("org")}collectEvent(){return i(this,void 0,void 0,(function*(){}))}}t.ExportComponent=E,E.ɵfac=function(e){return new(e||E)(o.ɵɵdirectiveInject(a.CryptoService),o.ɵɵdirectiveInject(s.I18nService),o.ɵɵdirectiveInject(l.PlatformUtilsService),o.ɵɵdirectiveInject(c.ExportService),o.ɵɵdirectiveInject(d.EventService),o.ɵɵdirectiveInject(p.ActivatedRoute),o.ɵɵdirectiveInject(u.PolicyService),o.ɵɵdirectiveInject(m.LogService),o.ɵɵdirectiveInject(h.UserVerificationService),o.ɵɵdirectiveInject(v.FormBuilder))},E.ɵcmp=o.ɵɵdefineComponent({type:E,selectors:[["app-org-export"]],features:[o.ɵɵInheritDefinitionFeature],decls:49,vars:18,consts:[["ngNativeValidate","",3,"appApiAction","formGroup","ngSubmit"],["form",""],[1,"page-header"],["type","error",3,"title",4,"ngIf"],[3,"organizationId",4,"ngIf"],[1,"row"],[1,"form-group","col-6"],["for","format"],["id","format","name","Format","formControlName","format",1,"form-control"],[3,"value",4,"ngFor","ngForOf"],["ngDefaultControl","","formControlName","secret","name","secret"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","error",3,"title"],[3,"organizationId"],[3,"value"]],template:function(e,t){if(1&e&&(o.ɵɵelementStart(0,"form",0,1),o.ɵɵlistener("ngSubmit",(function(){return t.submit()})),o.ɵɵtext(2,"\n "),o.ɵɵelementStart(3,"div",2),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"h1"),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n\n "),o.ɵɵtemplate(10,w,4,6,"app-callout",3),o.ɵɵtext(11,"\n "),o.ɵɵtemplate(12,C,1,1,"app-export-scope-callout",4),o.ɵɵtext(13,"\n\n "),o.ɵɵelementStart(14,"div",5),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"div",6),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"label",7),o.ɵɵtext(19),o.ɵɵpipe(20,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"select",8),o.ɵɵtext(23,"\n "),o.ɵɵtemplate(24,I,2,2,"option",9),o.ɵɵtext(25,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(28,"\n "),o.ɵɵelementStart(29,"div",5),o.ɵɵtext(30,"\n "),o.ɵɵelementStart(31,"div",6),o.ɵɵtext(32,"\n "),o.ɵɵelementStart(33,"app-user-verification",10),o.ɵɵtext(34,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(35,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(36,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(37,"\n "),o.ɵɵelementStart(38,"button",11),o.ɵɵtext(39,"\n "),o.ɵɵelement(40,"i",12),o.ɵɵpipe(41,"i18n"),o.ɵɵtext(42,"\n "),o.ɵɵelementStart(43,"span"),o.ɵɵtext(44),o.ɵɵpipe(45,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(46,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(47,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(48,"\n")),2&e){const e=o.ɵɵreference(1);o.ɵɵproperty("appApiAction",t.formPromise)("formGroup",t.exportForm),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,10,"exportVault")),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",t.disabledByPolicy),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!t.disabledByPolicy),o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(20,12,"fileFormat")),o.ɵɵadvance(5),o.ɵɵproperty("ngForOf",t.formatOptions),o.ɵɵadvance(14),o.ɵɵproperty("disabled",e.loading||t.exportForm.disabled),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(41,14,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(45,16,"exportVault"))}},directives:[v.NgControlStatusGroup,f.ApiActionDirective,v.FormGroupDirective,g.NgIf,v.SelectControlValueAccessor,v.NgControlStatus,v.FormControlName,g.NgForOf,y.UserVerificationComponent,v.DefaultValueAccessor,x.CalloutComponent,S.ExportScopeCalloutComponent,v.NgSelectOption,v.ɵNgSelectMultipleOption],pipes:[b.I18nPipe],encapsulation:2})},44336:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ExposedPasswordsReportComponent=void 0;n(68012),n(64684),n(42982),n(45330),n(45552),n(63513),n(44809),n(73569);const r=n(8489),o=n(32621),a=n(45330),s=n(42982),l=n(64684),c=n(45552),d=n(73569),p=n(63513),u=n(68012),m=n(44809),h=n(52767),v=n(57490),f=n(51626),g=n(18310),y=n(1142),x=n(39159),S=n(99729);function b(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",8),o.ɵɵpipe(1,"i18n"),o.ɵɵtext(2),o.ɵɵpipe(3,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(1,2,"goodNews")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(3,4,"noExposedPasswords"),"\n "))}function w(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"a",19),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext().$implicit;return o.ɵɵnextContext(3).selectCipher(t)})),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementContainerEnd()}if(2&e){const e=o.ɵɵnextContext().$implicit;o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"editItem")),o.ɵɵadvance(2),o.ɵɵtextInterpolate(e.name)}}function C(e,t){if(1&e&&(o.ɵɵtext(0,"\n "),o.ɵɵelementStart(1,"span"),o.ɵɵtext(2),o.ɵɵelementEnd(),o.ɵɵtext(3,"\n ")),2&e){const e=o.ɵɵnextContext().$implicit;o.ɵɵadvance(2),o.ɵɵtextInterpolate(e.name)}}function I(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",20),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",21),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"shared")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"shared")))}function E(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",22),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",21),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"attachments")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"attachments")))}function P(e,t){if(1&e&&(o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td",12),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"app-vault-icon",13),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"td",14),o.ɵɵtext(8,"\n "),o.ɵɵtemplate(9,w,6,4,"ng-container",15),o.ɵɵtext(10,"\n "),o.ɵɵtemplate(11,C,4,1,"ng-template",null,16,o.ɵɵtemplateRefExtractor),o.ɵɵtext(13,"\n "),o.ɵɵtemplate(14,I,9,6,"ng-container",7),o.ɵɵtext(15,"\n "),o.ɵɵtemplate(16,E,9,6,"ng-container",7),o.ɵɵtext(17,"\n "),o.ɵɵelement(18,"br"),o.ɵɵtext(19,"\n "),o.ɵɵelementStart(20,"small"),o.ɵɵtext(21),o.ɵɵelementEnd(),o.ɵɵtext(22,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(23,"\n "),o.ɵɵelementStart(24,"td",17),o.ɵɵtext(25,"\n "),o.ɵɵelementStart(26,"span",18),o.ɵɵtext(27),o.ɵɵpipe(28,"i18n"),o.ɵɵpipe(29,"number"),o.ɵɵelementEnd(),o.ɵɵtext(30,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(31,"\n "),o.ɵɵelementEnd()),2&e){const e=t.$implicit,n=o.ɵɵreference(12),i=o.ɵɵnextContext(3);o.ɵɵadvance(4),o.ɵɵproperty("cipher",e),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",!i.organization||i.canManageCipher(e))("ngIfElse",n),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",!i.organization&&e.organizationId),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.hasAttachments),o.ɵɵadvance(5),o.ɵɵtextInterpolate(e.subTitle),o.ɵɵadvance(6),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind2(28,7,"exposedXTimes",o.ɵɵpipeBind1(29,10,i.exposedPasswordMap.get(e.id))),"\n ")}}function O(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"app-callout",9),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4),o.ɵɵpipe(5,"i18n"),o.ɵɵpipe(6,"number"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"table",10),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"tbody"),o.ɵɵtext(11,"\n "),o.ɵɵtemplate(12,P,32,12,"tr",11),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,4,"exposedPasswordsFound")),o.ɵɵproperty("useAlertRole",!0),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind2(5,6,"exposedPasswordsFoundDesc",o.ɵɵpipeBind1(6,9,e.ciphers.length)),"\n "),o.ɵɵadvance(8),o.ɵɵproperty("ngForOf",e.ciphers)}}function k(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",5),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,b,4,6,"app-callout",6),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,O,16,11,"ng-container",7),o.ɵɵtext(5,"\n"),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.ciphers.length),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.ciphers.length)}}function A(e,t){}class T extends r.ExposedPasswordsReportComponent{constructor(e,t,n,i,r,o,a,s){super(e,t,n,i,r,s),this.organizationService=o,this.route=a}ngOnInit(){this.route.parent.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.organization=yield this.organizationService.get(e.organizationId),this.manageableCiphers=yield this.cipherService.getAll(),yield this.checkAccess()}))))}getAllCiphers(){return this.cipherService.getAllFromApiForOrganization(this.organization.id)}canManageCipher(e){return this.manageableCiphers.some((t=>t.id===e.id))}}t.ExposedPasswordsReportComponent=T,T.ɵfac=function(e){return new(e||T)(o.ɵɵdirectiveInject(a.CipherService),o.ɵɵdirectiveInject(s.AuditService),o.ɵɵdirectiveInject(l.ModalService),o.ɵɵdirectiveInject(c.MessagingService),o.ɵɵdirectiveInject(d.StateService),o.ɵɵdirectiveInject(p.OrganizationService),o.ɵɵdirectiveInject(u.ActivatedRoute),o.ɵɵdirectiveInject(m.PasswordRepromptService))},T.ɵcmp=o.ɵɵdefineComponent({type:T,selectors:[["app-org-exposed-passwords-report"]],features:[o.ɵɵInheritDefinitionFeature],decls:26,vars:14,consts:[[1,"page-header"],["bit-button","","buttonType","primary","type","button",1,"btn-submit",3,"disabled","click"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],[4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title","useAlertRole"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],[4,"ngIf","ngIfElse"],["cantManage",""],[1,"text-right"],[1,"badge","badge-warning"],["href","#","appStopClick","",3,"title","click"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-collection",3,"title"],[1,"sr-only"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-paperclip",3,"title"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h1"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n"),o.ɵɵelementStart(7,"p"),o.ɵɵtext(8),o.ɵɵpipe(9,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n"),o.ɵɵelementStart(11,"button",1),o.ɵɵlistener("click",(function(){return t.load()})),o.ɵɵtext(12,"\n "),o.ɵɵelement(13,"i",2),o.ɵɵpipe(14,"i18n"),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"span"),o.ɵɵtext(17),o.ɵɵpipe(18,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n"),o.ɵɵtemplate(21,k,6,2,"div",3),o.ɵɵtext(22,"\n"),o.ɵɵtemplate(23,A,0,0,"ng-template",null,4,o.ɵɵtemplateRefExtractor),o.ɵɵtext(25,"\n")),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,6,"exposedPasswordsReport")),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(9,8,"exposedPasswordsReportDesc")),o.ɵɵadvance(3),o.ɵɵproperty("disabled",t.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(14,10,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(18,12,"checkExposedPasswords")),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",t.hasLoaded))},directives:[h.ButtonComponent,v.NgIf,f.CalloutComponent,v.NgForOf,g.IconComponent,y.StopClickDirective,x.StopPropDirective],pipes:[S.I18nPipe,v.DecimalPipe],encapsulation:2})},65347:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ImportComponent=void 0;n(68012),n(51554),n(11223),n(36631),n(63513),n(73828),n(62166);const r=n(56038),o=n(32621),a=n(51554),s=n(11223),l=n(68012),c=n(73828),d=n(62166),p=n(63513),u=n(36631),m=n(57490),h=n(96832),v=n(51626),f=n(99729);function g(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",18),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"personalOwnershipPolicyInEffectImports"),"\n"))}function y(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",19),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.id),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}function x(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",19),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.id),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}function S(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"option",20),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,x,2,2,"option",9),o.ɵɵtext(5,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(4),o.ɵɵproperty("ngForOf",e.importOptions)}}function b(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n See detailed instructions on our help site at\n "),o.ɵɵelementStart(2,"a",22),o.ɵɵtext(3,"\n https://bitwarden.com/help/export-your-data/"),o.ɵɵelementEnd(),o.ɵɵtext(4,"\n "),o.ɵɵelementContainerEnd())}function w(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n See detailed instructions on our help site at\n "),o.ɵɵelementStart(2,"a",23),o.ɵɵtext(3,"\n https://bitwarden.com/help/import-from-lastpass/"),o.ɵɵelementEnd(),o.ɵɵtext(4,"\n "),o.ɵɵelementContainerEnd())}function C(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the KeePassX desktop application, navigate to "Database" → "Export to CSV file" and\n save the CSV file.\n '),o.ɵɵelementContainerEnd())}function I(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n In the Avira web vault, go to "Settings" → "My Data" → "Export data" and save the\n CSV file.\n '),o.ɵɵelementContainerEnd())}function E(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n In the Blur web vault, click your username at the top and go to "Settings" → "Export\n Data", then click "Export CSV" for your "Accounts".\n '),o.ɵɵelementContainerEnd())}function P(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the SaveInCloud desktop application, navigate to "File" → "Export" → "As XML"\n and save the XML file.\n '),o.ɵɵelementContainerEnd())}function O(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the Padlock desktop application, click the hamburger icon in the top left corner and\n navigate to "Settings" → "Export" button and save the file "As CSV".\n '),o.ɵɵelementContainerEnd())}function k(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the KeePass 2 desktop application, navigate to "File" → "Export" and select the\n "KeePass XML (2.x)" option.\n '),o.ɵɵelementContainerEnd())}function A(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the Universal Password Manager desktop application, navigate to "Database" →\n "Export" and save the CSV file.\n '),o.ɵɵelementContainerEnd())}function T(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the SaferPass browser extension, click the hamburger icon in the top left corner and\n navigate to "Settings". Click the "Export accounts" button to save the CSV file.\n '),o.ɵɵelementContainerEnd())}function M(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the Meldium web vault, navigate to "Settings". Locate the "Export data" function and\n click "Show me my data" to save the CSV file.\n '),o.ɵɵelementContainerEnd())}function B(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Log into the Keeper web vault (keepersecurity.com/vault). Click on your "account email" (top\n right) and select "Settings". Go to "Export" and find the "Export to .csv File" option. Click\n "Export" to save the CSV file.\n '),o.ɵɵelementContainerEnd())}function D(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Log into the Keeper web vault (keepersecurity.com/vault). Click on your "account email" (top\n right) and select "Settings". Go to "Export" and find the "Export to .json File" option. Click\n "Export" to save the JSON file.\n '),o.ɵɵelementContainerEnd())}function R(e,t){1&e&&(o.ɵɵelementStart(0,"span"),o.ɵɵtext(1,"\n The process is exactly the same as importing from Google Chrome.\n "),o.ɵɵelementEnd())}function F(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,R,2,0,"span",10),o.ɵɵtext(3,"\n See detailed instructions on our help site at\n "),o.ɵɵelementStart(4,"a",24),o.ɵɵtext(5,"\n https://bitwarden.com/help/import-from-chrome/"),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(2),o.ɵɵproperty("ngIf","chromecsv"!==e.format)}}function U(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n See detailed instructions on our help site at\n "),o.ɵɵelementStart(2,"a",25),o.ɵɵtext(3,"\n https://bitwarden.com/help/import-from-firefox/"),o.ɵɵelementEnd(),o.ɵɵtext(4,".\n "),o.ɵɵelementContainerEnd())}function V(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n See detailed instructions on our help site at\n "),o.ɵɵelementStart(2,"a",26),o.ɵɵtext(3,"\n https://bitwarden.com/help/import-from-safari/"),o.ɵɵelementEnd(),o.ɵɵtext(4,".\n "),o.ɵɵelementContainerEnd())}function N(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n See detailed instructions on our help site at\n "),o.ɵɵelementStart(2,"a",27),o.ɵɵtext(3,"\n https://bitwarden.com/help/import-from-1password/"),o.ɵɵelementEnd(),o.ɵɵtext(4,".\n "),o.ɵɵelementContainerEnd())}function _(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the Password Dragon desktop application, navigate to "File" → "Export" → "To\n XML". In the dialog that pops up select "All Rows" and check all fields. Click the "Export"\n button and save the XML file.\n '),o.ɵɵelementContainerEnd())}function j(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the Enpass desktop application, navigate to "File" → "Export" → "As CSV".\n Select "OK" to the warning alert and save the CSV file. Note that the importer only supports\n files exported while Enpass is set to the English language, so adjust your settings\n accordingly.\n '),o.ɵɵelementContainerEnd())}function z(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the Enpass 6 desktop application, click the menu button and navigate to "File" →\n "Export". Select the ".json" file format option and save the JSON file.\n '),o.ɵɵelementContainerEnd())}function H(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the Password Safe desktop application, navigate to "File" → "Export To" → "XML\n format..." and save the XML file.\n '),o.ɵɵelementContainerEnd())}function L(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Log in to Dashlane, click on "My Account" → "Settings" → "Export file" and select\n "Export as a CSV file". This will download a zip archive containing various CSV files. Unzip\n the archive and import each CSV file individually.\n '),o.ɵɵelementContainerEnd())}function K(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n Dashlane no longer supports the JSON format. Only use this if you have an existing JSON for\n import. Use the CSV importer when creating new exports.\n "),o.ɵɵelementContainerEnd())}function q(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the mSecure desktop application, navigate to "File" → "Export" → "CSV File..."\n and save the CSV file.\n '),o.ɵɵelementContainerEnd())}function G(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the Sticky Password desktop application, navigate to "Menu" (top right) → "Export"\n → "Export all". Select the unencrypted format XML option and save the XML file.\n '),o.ɵɵelementContainerEnd())}function W(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the True Key desktop application, click the gear icon (top right) and then navigate to\n "App Settings". Click the "Export" button, enter your password and save the CSV file.\n '),o.ɵɵelementContainerEnd())}function $(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Log into the Clipperz web application (clipperz.is/app). Click the hamburger menu icon in the\n top right to expand the navigation bar. Navigate to "Data" → "Export". Click the\n "download HTML+JSON" button to save the HTML file.\n '),o.ɵɵelementContainerEnd())}function Y(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the RoboForm Editor desktop application, navigate to "RoboForm" (top left) →\n "Options" → "Account & Data" and click the "Export" button. Select all of your data,\n change the "Format" to "CSV file" and then click the "Export" button to save the CSV file.\n Note: RoboForm only allows you to export Logins. Other items will not be exported.\n '),o.ɵɵelementContainerEnd())}function Q(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Log into the Passbolt web vault and navigate to the "Passwords" listing. Select all of the\n passwords you would like to export and click the "Export" button at the top of the listing.\n Choose the "csv (lastpass)" export format and click the "Export" button.\n '),o.ɵɵelementContainerEnd())}function J(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the Ascendo DataVault desktop application, navigate to "Tools" → "Export". In the\n dialog that pops up, select the "All Items (DVX, CSV)" option. Click the "Ok" button to save\n the CSV file.\n '),o.ɵɵelementContainerEnd())}function Z(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the Password Boss desktop application, navigate to "File" → "Export data" →\n "Password Boss JSON - not encrypted" and save the JSON file.\n '),o.ɵɵelementContainerEnd())}function X(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Log into the Zoho web vault (vault.zoho.com). Navigate to "Tools" → "Export Secrets".\n Select "All Secrets" and click the "Zoho Vault Format CSV" button. Highlight and copy the data\n from the textarea. Open a text editor like Notepad and paste the data. Save the data from the\n text editor as\n '),o.ɵɵelementStart(2,"code"),o.ɵɵtext(3,"zoho_export.csv"),o.ɵɵelementEnd(),o.ɵɵtext(4,".\n "),o.ɵɵelementContainerEnd())}function ee(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the SplashID Safe desktop application, click on the SplashID blue lock logo in the top\n right corner. Navigate to "Export" → "Export as CSV" and save the CSV file.\n '),o.ɵɵelementContainerEnd())}function te(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the PassKeep mobile app, navigate to "Backup/Restore". Locate the "CSV Backup/Restore"\n section and click "Backup to CSV" to save the CSV file.\n '),o.ɵɵelementContainerEnd())}function ne(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n Make sure you have python-keyring and python-gnomekeyring installed. Save the\n "),o.ɵɵelementStart(2,"a",28),o.ɵɵtext(3,"GNOME Keyring Import/Export"),o.ɵɵelementEnd(),o.ɵɵtext(4,"\n python script to your desktop as "),o.ɵɵelementStart(5,"code"),o.ɵɵtext(6,"pw_helper.py"),o.ɵɵelementEnd(),o.ɵɵtext(7,". Open terminal and run\n "),o.ɵɵelementStart(8,"code"),o.ɵɵtext(9,"chmod +rx Desktop/pw_helper.py"),o.ɵɵelementEnd(),o.ɵɵtext(10," and then\n "),o.ɵɵelementStart(11,"code"),o.ɵɵtext(12,"python Desktop/pw_helper.py export Desktop/my_passwords.json"),o.ɵɵelementEnd(),o.ɵɵtext(13,". Then upload the\n resulting "),o.ɵɵelementStart(14,"code"),o.ɵɵtext(15,"my_passwords.json"),o.ɵɵelementEnd(),o.ɵɵtext(16," file here to Bitwarden.\n "),o.ɵɵelementContainerEnd())}function ie(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the Password Agent desktop application navigate to "File" → "Export", select the\n "Fields to export" button and check all of the fields, change the "Output format" to "CSV",\n and then click the "Start" button to save the CSV file.\n '),o.ɵɵelementContainerEnd())}function re(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Log into the Passpack website vault and navigate to "Settings" → "Export", then click the\n "Download" button to save the CSV file.\n '),o.ɵɵelementContainerEnd())}function oe(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Open your Passman vault and click on "Settings" in the bottom left corner. In the "Settings"\n window switch to the "Export credentials" tab and choose "JSON" as the export type. Enter your\n vault\'s passphrase and click the "Export" button to save the JSON file.\n '),o.ɵɵelementContainerEnd())}function ae(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Open the Avast Passwords desktop application and navigate to "Settings" → "Import/export\n data". Select the "Export" button for the "Export to CSV file" option to save the CSV file.\n '),o.ɵɵelementContainerEnd())}function se(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Open the Avast Passwords desktop application and navigate to "Settings" → "Import/export\n data". Select the "Export" button for the "Export to JSON file" option to save the JSON file.\n '),o.ɵɵelementContainerEnd())}function le(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Open the F-Secure KEY desktop application and navigate to "Settings" → "Export\n Passwords". Select the "Export" button, enter your master password, and save the FSK file.\n '),o.ɵɵelementContainerEnd())}function ce(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Open the Kaspersky Password Manager desktop application and navigate to "Settings" →\n "Import/Export". Locate the "Export to text file" section and select the "Export" button to\n save the TXT file.\n '),o.ɵɵelementContainerEnd())}function de(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Open the RememBear desktop application and navigate to "Settings" → "Account" →\n "Export". Enter your master password and select the "Export Anyway" button to save the CSV\n file.\n '),o.ɵɵelementContainerEnd())}function pe(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Open the PasswordWallet desktop application and navigate to "File" → "Export" →\n "Visible entries to text file". Enter your password and select the "Ok" button to save the TXT\n file.\n '),o.ɵɵelementContainerEnd())}function ue(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Open the Myki desktop browser extension and navigate to "Advanced" → "Export Accounts"\n and then scan the QR code with your mobile device. Various CSV files will then be saved to\n your computer\'s downloads folder.\n '),o.ɵɵelementContainerEnd())}function me(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n Export your SecureSafe password safe to a CSV file with a comma delimiter.\n "),o.ɵɵelementContainerEnd())}function he(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Open the LogMeOnce browser extension, then navigate to "Open Menu" → "Export To" and\n select "CSV File" to save the CSV file.\n '),o.ɵɵelementContainerEnd())}function ve(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Open the BlackBerry Password Keeper application, then navigate to "Settings" →\n "Import/Export". Select "Export Passwords" and follow the instructions on screen to save the\n unencrypted CSV file.\n '),o.ɵɵelementContainerEnd())}function fe(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Open the Buttercup desktop application and unlock your vault. Right click on your vault\'s icon\n and select "Export" to save the CSV file.\n '),o.ɵɵelementContainerEnd())}function ge(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Open the Codebook desktop application and log in. Navigate to "File" → "Export all", then\n click "Yes" on the dialog and save the CSV file.\n '),o.ɵɵelementContainerEnd())}function ye(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n Open the newest version of the Encryptr desktop application and allow all of your data to\n sync. Once syncing of your data is complete, the download icon in the top right corner will\n turn pink. Click the download icon and save the CSV file.\n "),o.ɵɵelementContainerEnd())}function xe(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n From the Yoti browser extension, click on "Settings", then "Export Saved Logins" and save the\n CSV file.\n '),o.ɵɵelementContainerEnd())}function Se(e,t){if(1&e&&(o.ɵɵelementStart(0,"app-callout",21),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,b,5,0,"ng-container",10),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,w,5,0,"ng-container",10),o.ɵɵtext(5,"\n "),o.ɵɵtemplate(6,C,2,0,"ng-container",10),o.ɵɵtext(7,"\n "),o.ɵɵtemplate(8,I,2,0,"ng-container",10),o.ɵɵtext(9,"\n "),o.ɵɵtemplate(10,E,2,0,"ng-container",10),o.ɵɵtext(11,"\n "),o.ɵɵtemplate(12,P,2,0,"ng-container",10),o.ɵɵtext(13,"\n "),o.ɵɵtemplate(14,O,2,0,"ng-container",10),o.ɵɵtext(15,"\n "),o.ɵɵtemplate(16,k,2,0,"ng-container",10),o.ɵɵtext(17,"\n "),o.ɵɵtemplate(18,A,2,0,"ng-container",10),o.ɵɵtext(19,"\n "),o.ɵɵtemplate(20,T,2,0,"ng-container",10),o.ɵɵtext(21,"\n "),o.ɵɵtemplate(22,M,2,0,"ng-container",10),o.ɵɵtext(23,"\n "),o.ɵɵtemplate(24,B,2,0,"ng-container",10),o.ɵɵtext(25,"\n "),o.ɵɵtemplate(26,D,2,0,"ng-container",10),o.ɵɵtext(27,"\n "),o.ɵɵtemplate(28,F,7,1,"ng-container",10),o.ɵɵtext(29,"\n "),o.ɵɵtemplate(30,U,5,0,"ng-container",10),o.ɵɵtext(31,"\n "),o.ɵɵtemplate(32,V,5,0,"ng-container",10),o.ɵɵtext(33,"\n "),o.ɵɵtemplate(34,N,5,0,"ng-container",10),o.ɵɵtext(35,"\n "),o.ɵɵtemplate(36,_,2,0,"ng-container",10),o.ɵɵtext(37,"\n "),o.ɵɵtemplate(38,j,2,0,"ng-container",10),o.ɵɵtext(39,"\n "),o.ɵɵtemplate(40,z,2,0,"ng-container",10),o.ɵɵtext(41,"\n "),o.ɵɵtemplate(42,H,2,0,"ng-container",10),o.ɵɵtext(43,"\n "),o.ɵɵtemplate(44,L,2,0,"ng-container",10),o.ɵɵtext(45,"\n "),o.ɵɵtemplate(46,K,2,0,"ng-container",10),o.ɵɵtext(47,"\n "),o.ɵɵtemplate(48,q,2,0,"ng-container",10),o.ɵɵtext(49,"\n "),o.ɵɵtemplate(50,G,2,0,"ng-container",10),o.ɵɵtext(51,"\n "),o.ɵɵtemplate(52,W,2,0,"ng-container",10),o.ɵɵtext(53,"\n "),o.ɵɵtemplate(54,$,2,0,"ng-container",10),o.ɵɵtext(55,"\n "),o.ɵɵtemplate(56,Y,2,0,"ng-container",10),o.ɵɵtext(57,"\n "),o.ɵɵtemplate(58,Q,2,0,"ng-container",10),o.ɵɵtext(59,"\n "),o.ɵɵtemplate(60,J,2,0,"ng-container",10),o.ɵɵtext(61,"\n "),o.ɵɵtemplate(62,Z,2,0,"ng-container",10),o.ɵɵtext(63,"\n "),o.ɵɵtemplate(64,X,5,0,"ng-container",10),o.ɵɵtext(65,"\n "),o.ɵɵtemplate(66,ee,2,0,"ng-container",10),o.ɵɵtext(67,"\n "),o.ɵɵtemplate(68,te,2,0,"ng-container",10),o.ɵɵtext(69,"\n "),o.ɵɵtemplate(70,ne,17,0,"ng-container",10),o.ɵɵtext(71,"\n "),o.ɵɵtemplate(72,ie,2,0,"ng-container",10),o.ɵɵtext(73,"\n "),o.ɵɵtemplate(74,re,2,0,"ng-container",10),o.ɵɵtext(75,"\n "),o.ɵɵtemplate(76,oe,2,0,"ng-container",10),o.ɵɵtext(77,"\n "),o.ɵɵtemplate(78,ae,2,0,"ng-container",10),o.ɵɵtext(79,"\n "),o.ɵɵtemplate(80,se,2,0,"ng-container",10),o.ɵɵtext(81,"\n "),o.ɵɵtemplate(82,le,2,0,"ng-container",10),o.ɵɵtext(83,"\n "),o.ɵɵtemplate(84,ce,2,0,"ng-container",10),o.ɵɵtext(85,"\n "),o.ɵɵtemplate(86,de,2,0,"ng-container",10),o.ɵɵtext(87,"\n "),o.ɵɵtemplate(88,pe,2,0,"ng-container",10),o.ɵɵtext(89,"\n "),o.ɵɵtemplate(90,ue,2,0,"ng-container",10),o.ɵɵtext(91,"\n "),o.ɵɵtemplate(92,me,2,0,"ng-container",10),o.ɵɵtext(93,"\n "),o.ɵɵtemplate(94,he,2,0,"ng-container",10),o.ɵɵtext(95,"\n "),o.ɵɵtemplate(96,ve,2,0,"ng-container",10),o.ɵɵtext(97,"\n "),o.ɵɵtemplate(98,fe,2,0,"ng-container",10),o.ɵɵtext(99,"\n "),o.ɵɵtemplate(100,ge,2,0,"ng-container",10),o.ɵɵtext(101,"\n "),o.ɵɵtemplate(102,ye,2,0,"ng-container",10),o.ɵɵtext(103,"\n "),o.ɵɵtemplate(104,xe,2,0,"ng-container",10),o.ɵɵtext(105,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵpropertyInterpolate("title",e.getFormatInstructionTitle()),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","bitwardencsv"===e.format||"bitwardenjson"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","lastpasscsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","keepassxcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","aviracsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","blurcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","safeincloudxml"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","padlockcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","keepass2xml"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","upmcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","saferpasscsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","meldiumcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","keepercsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","keeperjson"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","chromecsv"===e.format||"operacsv"===e.format||"vivaldicsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","firefoxcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","safaricsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","1password1pux"===e.format||"1password1pif"===e.format||"1passwordwincsv"===e.format||"1passwordmaccsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","passworddragonxml"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","enpasscsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","enpassjson"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","pwsafexml"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","dashlanecsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","dashlanejson"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","msecurecsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","stickypasswordxml"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","truekeycsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","clipperzhtml"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","roboformcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","passboltcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","ascendocsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","passwordbossjson"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","zohovaultcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","splashidcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","passkeepcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","gnomejson"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","passwordagentcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","passpackcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","passmanjson"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","avastcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","avastjson"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","fsecurefsk"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","kasperskytxt"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","remembearcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","passwordwallettxt"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","mykicsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","securesafecsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","logmeoncecsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","blackberrycsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","buttercupcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","codebookcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","encryptrcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","yoticsv"===e.format)}}const be=function(e){return{manual:e}};class we extends r.ImportComponent{constructor(e,t,n,i,r,o,a,s){super(e,t,n,r,o,s),this.route=i,this.organizationService=a}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){this.route.parent.parent.params.subscribe((t=>i(this,void 0,void 0,(function*(){this.organizationId=t.organizationId,this.successNavigate=["organizations",this.organizationId,"vault"],yield e.ngOnInit.call(this),this.importBlockedByPolicy=!1}))));const t=yield this.organizationService.get(this.organizationId);this.organizationName=t.name}))}submit(){const e=Object.create(null,{submit:{get:()=>super.submit}});return i(this,void 0,void 0,(function*(){(yield this.platformUtilsService.showDialog(this.i18nService.t("importWarning",this.organizationName),this.i18nService.t("warning"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning"))&&e.submit.call(this)}))}}t.ImportComponent=we,we.ɵfac=function(e){return new(e||we)(o.ɵɵdirectiveInject(a.I18nService),o.ɵɵdirectiveInject(s.ImportService),o.ɵɵdirectiveInject(l.Router),o.ɵɵdirectiveInject(l.ActivatedRoute),o.ɵɵdirectiveInject(c.PlatformUtilsService),o.ɵɵdirectiveInject(d.PolicyService),o.ɵɵdirectiveInject(p.OrganizationService),o.ɵɵdirectiveInject(u.LogService))},we.ɵcmp=o.ɵɵdefineComponent({type:we,selectors:[["app-org-import"]],features:[o.ɵɵInheritDefinitionFeature],decls:69,vars:31,consts:[[1,"page-header"],["type","info",4,"ngIf"],["ngNativeValidate","",3,"ngSubmit"],["form",""],[1,"row"],[1,"col-6"],[1,"form-group"],["for","type"],["id","type","name","Format","required","",1,"form-control",3,"ngModel","disabled","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[4,"ngIf"],["type","info",3,"title",4,"ngIf"],["for","file"],["type","file","id","file","name","file",1,"form-control-file",3,"disabled"],["for","fileContents"],["id","fileContents","name","FileContents",1,"form-control",3,"ngModel","disabled","ngModelChange"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled","ngClass"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","info"],[3,"ngValue"],["value","-","disabled",""],["type","info",3,"title"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/export-your-data/"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/import-from-lastpass/"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/import-from-chrome/"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/import-from-firefox/"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/import-from-safari/"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/import-from-1password/"],["target","_blank","rel","noopener","href","https://bit.ly/2GpOMTg"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h1"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n"),o.ɵɵtemplate(7,g,3,3,"app-callout",1),o.ɵɵtext(8,"\n"),o.ɵɵelementStart(9,"form",2,3),o.ɵɵlistener("ngSubmit",(function(){return t.submit()})),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"div",4),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"div",5),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"div",6),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"label",7),o.ɵɵtext(19),o.ɵɵpipe(20,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"select",8),o.ɵɵlistener("ngModelChange",(function(e){return t.format=e})),o.ɵɵtext(23,"\n "),o.ɵɵtemplate(24,y,2,2,"option",9),o.ɵɵtext(25,"\n "),o.ɵɵtemplate(26,S,6,1,"ng-container",10),o.ɵɵtext(27,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(28,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(30,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(31,"\n "),o.ɵɵtemplate(32,Se,106,53,"app-callout",11),o.ɵɵtext(33,"\n "),o.ɵɵelementStart(34,"div",4),o.ɵɵtext(35,"\n "),o.ɵɵelementStart(36,"div",5),o.ɵɵtext(37,"\n "),o.ɵɵelementStart(38,"div",6),o.ɵɵtext(39,"\n "),o.ɵɵelementStart(40,"label",12),o.ɵɵtext(41),o.ɵɵpipe(42,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(43,"\n "),o.ɵɵelement(44,"input",13),o.ɵɵtext(45,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(46,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(47,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(48,"\n "),o.ɵɵelementStart(49,"div",6),o.ɵɵtext(50,"\n "),o.ɵɵelementStart(51,"label",14),o.ɵɵtext(52),o.ɵɵpipe(53,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(54,"\n "),o.ɵɵelementStart(55,"textarea",15),o.ɵɵlistener("ngModelChange",(function(e){return t.fileContents=e})),o.ɵɵelementEnd(),o.ɵɵtext(56,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(57,"\n "),o.ɵɵelementStart(58,"button",16),o.ɵɵtext(59,"\n "),o.ɵɵelement(60,"i",17),o.ɵɵpipe(61,"i18n"),o.ɵɵtext(62,"\n "),o.ɵɵelementStart(63,"span"),o.ɵɵtext(64),o.ɵɵpipe(65,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(66,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(67,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(68,"\n")),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,17,"importData")),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",t.importBlockedByPolicy),o.ɵɵadvance(12),o.ɵɵtextInterpolate1("1. ",o.ɵɵpipeBind1(20,19,"selectFormat"),""),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",t.format)("disabled",t.importBlockedByPolicy),o.ɵɵadvance(2),o.ɵɵproperty("ngForOf",t.featuredImportOptions),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.importOptions&&t.importOptions.length),o.ɵɵadvance(6),o.ɵɵproperty("ngIf",t.format),o.ɵɵadvance(9),o.ɵɵtextInterpolate1("2. ",o.ɵɵpipeBind1(42,21,"selectImportFile"),""),o.ɵɵadvance(3),o.ɵɵproperty("disabled",t.importBlockedByPolicy),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(53,23,"orCopyPasteFileContents")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",t.fileContents)("disabled",t.importBlockedByPolicy),o.ɵɵadvance(3),o.ɵɵproperty("disabled",t.loading||t.importBlockedByPolicy)("ngClass",o.ɵɵpureFunction1(29,be,t.importBlockedByPolicy)),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(61,25,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(65,27,"importData")))},directives:[m.NgIf,h.NgControlStatusGroup,h.NgForm,h.SelectControlValueAccessor,h.RequiredValidator,h.NgControlStatus,h.NgModel,m.NgForOf,h.DefaultValueAccessor,m.NgClass,v.CalloutComponent,h.NgSelectOption,h.ɵNgSelectMultipleOption],pipes:[f.I18nPipe],encapsulation:2})},86661:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.InactiveTwoFactorReportComponent=void 0;n(68012),n(64684),n(45330),n(36631),n(45552),n(63513),n(44809),n(73569);const r=n(66916),o=n(32621),a=n(45330),s=n(64684),l=n(45552),c=n(73569),d=n(68012),p=n(36631),u=n(44809),m=n(63513),h=n(57490),v=n(51626),f=n(18310),g=n(1142),y=n(39159),x=n(99729);function S(e,t){1&e&&(o.ɵɵelementStart(0,"small"),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",4),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",5),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function b(e,t){1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",4),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",5),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function w(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",8),o.ɵɵpipe(1,"i18n"),o.ɵɵtext(2),o.ɵɵpipe(3,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(1,2,"goodNews")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(3,4,"noInactive2fa"),"\n "))}function C(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",18),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",5),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"shared")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"shared")))}function I(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",19),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",5),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"attachments")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"attachments")))}function E(e,t){if(1&e&&(o.ɵɵelementStart(0,"a",20),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext().$implicit,t=o.ɵɵnextContext(3);o.ɵɵpropertyInterpolate("href",t.cipherDocs.get(e.id),o.ɵɵsanitizeUrl),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,2,"instructions"),"")}}function P(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td",12),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"app-vault-icon",13),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"td",14),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"a",15),o.ɵɵlistener("click",(function(){const t=o.ɵɵrestoreView(e).$implicit;return o.ɵɵnextContext(3).selectCipher(t)})),o.ɵɵpipe(10,"i18n"),o.ɵɵtext(11),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵtemplate(13,C,9,6,"ng-container",1),o.ɵɵtext(14,"\n "),o.ɵɵtemplate(15,I,9,6,"ng-container",1),o.ɵɵtext(16,"\n "),o.ɵɵelement(17,"br"),o.ɵɵtext(18,"\n "),o.ɵɵelementStart(19,"small"),o.ɵɵtext(20),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(22,"\n "),o.ɵɵelementStart(23,"td",16),o.ɵɵtext(24,"\n "),o.ɵɵtemplate(25,E,3,4,"a",17),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=o.ɵɵnextContext(3);o.ɵɵadvance(4),o.ɵɵproperty("cipher",e),o.ɵɵadvance(5),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(10,7,"editItem")),o.ɵɵadvance(2),o.ɵɵtextInterpolate(e.name),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!n.organization&&e.organizationId),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.hasAttachments),o.ɵɵadvance(5),o.ɵɵtextInterpolate(e.subTitle),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",n.cipherDocs.has(e.id))}}function O(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"app-callout",9),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4),o.ɵɵpipe(5,"i18n"),o.ɵɵpipe(6,"number"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"table",10),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"tbody"),o.ɵɵtext(11,"\n "),o.ɵɵtemplate(12,P,28,9,"tr",11),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,3,"inactive2faFound")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind2(5,5,"inactive2faFoundDesc",o.ɵɵpipeBind1(6,8,e.ciphers.length)),"\n "),o.ɵɵadvance(8),o.ɵɵproperty("ngForOf",e.ciphers)}}function k(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",6),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,w,4,6,"app-callout",7),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,O,16,10,"ng-container",1),o.ɵɵtext(5,"\n"),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.ciphers.length),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.ciphers.length)}}function A(e,t){}class T extends r.InactiveTwoFactorReportComponent{constructor(e,t,n,i,r,o,a,s){super(e,t,n,i,o,a),this.route=r,this.organizationService=s}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){this.route.parent.parent.params.subscribe((t=>i(this,void 0,void 0,(function*(){this.organization=yield this.organizationService.get(t.organizationId),yield e.ngOnInit.call(this)}))))}))}getAllCiphers(){return this.cipherService.getAllFromApiForOrganization(this.organization.id)}}t.InactiveTwoFactorReportComponent=T,T.ɵfac=function(e){return new(e||T)(o.ɵɵdirectiveInject(a.CipherService),o.ɵɵdirectiveInject(s.ModalService),o.ɵɵdirectiveInject(l.MessagingService),o.ɵɵdirectiveInject(c.StateService),o.ɵɵdirectiveInject(d.ActivatedRoute),o.ɵɵdirectiveInject(p.LogService),o.ɵɵdirectiveInject(u.PasswordRepromptService),o.ɵɵdirectiveInject(m.OrganizationService))},T.ɵcmp=o.ɵɵdefineComponent({type:T,selectors:[["app-inactive-two-factor-report"]],features:[o.ɵɵInheritDefinitionFeature],decls:20,vars:9,consts:[[1,"page-header"],[4,"ngIf"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],["href","#","appStopClick","",3,"title","click"],[1,"text-right"],["class","badge badge-primary","target","_blank","rel","noopener",3,"href",4,"ngIf"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-collection",3,"title"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-paperclip",3,"title"],["target","_blank","rel","noopener",1,"badge","badge-primary",3,"href"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h1"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵtemplate(5,S,9,6,"small",1),o.ɵɵtext(6,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵelementStart(9,"p"),o.ɵɵtext(10),o.ɵɵpipe(11,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n"),o.ɵɵtemplate(13,b,9,6,"div",1),o.ɵɵtext(14,"\n"),o.ɵɵtemplate(15,k,6,2,"div",2),o.ɵɵtext(16,"\n"),o.ɵɵtemplate(17,A,0,0,"ng-template",null,3,o.ɵɵtemplateRefExtractor),o.ɵɵtext(19,"\n")),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,5,"inactive2faReport"),"\n "),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.hasLoaded&&t.loading),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(11,7,"inactive2faReportDesc")),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!t.hasLoaded&&t.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.hasLoaded))},directives:[h.NgIf,v.CalloutComponent,h.NgForOf,f.IconComponent,g.StopClickDirective,y.StopPropDirective],pipes:[x.I18nPipe,h.DecimalPipe],encapsulation:2})},1128:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ReusedPasswordsReportComponent=void 0;n(68012),n(64684),n(45330),n(45552),n(63513),n(44809),n(73569);const r=n(99997),o=n(32621),a=n(45330),s=n(64684),l=n(45552),c=n(73569),d=n(68012),p=n(63513),u=n(44809),m=n(57490),h=n(51626),v=n(18310),f=n(1142),g=n(39159),y=n(99729);function x(e,t){1&e&&(o.ɵɵelementStart(0,"small"),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",4),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",5),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function S(e,t){1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",4),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",5),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function b(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",8),o.ɵɵpipe(1,"i18n"),o.ɵɵtext(2),o.ɵɵpipe(3,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(1,2,"goodNews")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(3,4,"noReusedPasswords"),"\n "))}function w(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"a",19),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext().$implicit;return o.ɵɵnextContext(3).selectCipher(t)})),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementContainerEnd()}if(2&e){const e=o.ɵɵnextContext().$implicit;o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"editItem")),o.ɵɵadvance(2),o.ɵɵtextInterpolate(e.name)}}function C(e,t){if(1&e&&(o.ɵɵtext(0,"\n "),o.ɵɵelementStart(1,"span"),o.ɵɵtext(2),o.ɵɵelementEnd(),o.ɵɵtext(3,"\n ")),2&e){const e=o.ɵɵnextContext().$implicit;o.ɵɵadvance(2),o.ɵɵtextInterpolate(e.name)}}function I(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",20),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",5),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"shared")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"shared")))}function E(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",21),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",5),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"attachments")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"attachments")))}function P(e,t){if(1&e&&(o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td",12),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"app-vault-icon",13),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"td",14),o.ɵɵtext(8,"\n "),o.ɵɵtemplate(9,w,6,4,"ng-container",15),o.ɵɵtext(10,"\n "),o.ɵɵtemplate(11,C,4,1,"ng-template",null,16,o.ɵɵtemplateRefExtractor),o.ɵɵtext(13,"\n "),o.ɵɵtemplate(14,I,9,6,"ng-container",1),o.ɵɵtext(15,"\n "),o.ɵɵtemplate(16,E,9,6,"ng-container",1),o.ɵɵtext(17,"\n "),o.ɵɵelement(18,"br"),o.ɵɵtext(19,"\n "),o.ɵɵelementStart(20,"small"),o.ɵɵtext(21),o.ɵɵelementEnd(),o.ɵɵtext(22,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(23,"\n "),o.ɵɵelementStart(24,"td",17),o.ɵɵtext(25,"\n "),o.ɵɵelementStart(26,"span",18),o.ɵɵtext(27),o.ɵɵpipe(28,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(30,"\n "),o.ɵɵelementEnd()),2&e){const e=t.$implicit,n=o.ɵɵreference(12),i=o.ɵɵnextContext(3);o.ɵɵadvance(4),o.ɵɵproperty("cipher",e),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",!i.organization||i.canManageCipher(e))("ngIfElse",n),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",!i.organization&&e.organizationId),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.hasAttachments),o.ɵɵadvance(5),o.ɵɵtextInterpolate(e.subTitle),o.ɵɵadvance(6),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind2(28,7,"reusedXTimes",i.passwordUseMap.get(e.login.password)),"\n ")}}function O(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"app-callout",9),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4),o.ɵɵpipe(5,"i18n"),o.ɵɵpipe(6,"number"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"table",10),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"tbody"),o.ɵɵtext(11,"\n "),o.ɵɵtemplate(12,P,31,10,"tr",11),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,3,"reusedPasswordsFound")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind2(5,5,"reusedPasswordsFoundDesc",o.ɵɵpipeBind1(6,8,e.ciphers.length)),"\n "),o.ɵɵadvance(8),o.ɵɵproperty("ngForOf",e.ciphers)}}function k(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",6),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,b,4,6,"app-callout",7),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,O,16,10,"ng-container",1),o.ɵɵtext(5,"\n"),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.ciphers.length),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.ciphers.length)}}function A(e,t){}class T extends r.ReusedPasswordsReportComponent{constructor(e,t,n,i,r,o,a){super(e,t,n,i,a),this.route=r,this.organizationService=o}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){this.route.parent.parent.params.subscribe((t=>i(this,void 0,void 0,(function*(){this.organization=yield this.organizationService.get(t.organizationId),this.manageableCiphers=yield this.cipherService.getAll(),yield e.ngOnInit.call(this)}))))}))}getAllCiphers(){return this.cipherService.getAllFromApiForOrganization(this.organization.id)}canManageCipher(e){return this.manageableCiphers.some((t=>t.id===e.id))}}t.ReusedPasswordsReportComponent=T,T.ɵfac=function(e){return new(e||T)(o.ɵɵdirectiveInject(a.CipherService),o.ɵɵdirectiveInject(s.ModalService),o.ɵɵdirectiveInject(l.MessagingService),o.ɵɵdirectiveInject(c.StateService),o.ɵɵdirectiveInject(d.ActivatedRoute),o.ɵɵdirectiveInject(p.OrganizationService),o.ɵɵdirectiveInject(u.PasswordRepromptService))},T.ɵcmp=o.ɵɵdefineComponent({type:T,selectors:[["app-reused-passwords-report"]],features:[o.ɵɵInheritDefinitionFeature],decls:20,vars:9,consts:[[1,"page-header"],[4,"ngIf"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],[4,"ngIf","ngIfElse"],["cantManage",""],[1,"text-right"],[1,"badge","badge-warning"],["href","#","appStopClick","",3,"title","click"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-collection",3,"title"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-paperclip",3,"title"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h1"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵtemplate(5,x,9,6,"small",1),o.ɵɵtext(6,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵelementStart(9,"p"),o.ɵɵtext(10),o.ɵɵpipe(11,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n"),o.ɵɵtemplate(13,S,9,6,"div",1),o.ɵɵtext(14,"\n"),o.ɵɵtemplate(15,k,6,2,"div",2),o.ɵɵtext(16,"\n"),o.ɵɵtemplate(17,A,0,0,"ng-template",null,3,o.ɵɵtemplateRefExtractor),o.ɵɵtext(19,"\n")),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,5,"reusedPasswordsReport"),"\n "),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.hasLoaded&&t.loading),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(11,7,"reusedPasswordsReportDesc")),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!t.hasLoaded&&t.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.hasLoaded))},directives:[m.NgIf,h.CalloutComponent,m.NgForOf,v.IconComponent,f.StopClickDirective,g.StopPropDirective],pipes:[y.I18nPipe,m.DecimalPipe],encapsulation:2})},706:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ToolsComponent=void 0;n(68012),n(45552),n(63513);const r=n(32621),o=n(68012),a=n(63513),s=n(45552),l=n(57490),c=n(1142),d=n(99729);function p(e,t){1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵelement(2,"i",2),r.ɵɵpipe(3,"i18n"),r.ɵɵtext(4,"\n "),r.ɵɵelementStart(5,"span",3),r.ɵɵtext(6),r.ɵɵpipe(7,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementContainerEnd()),2&e&&(r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(3,2,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(7,4,"loading")))}function u(e,t){1&e&&(r.ɵɵelementStart(0,"div",9),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",10),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"div",11),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"a",12),r.ɵɵtext(9),r.ɵɵpipe(10,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n "),r.ɵɵelementStart(12,"a",13),r.ɵɵtext(13),r.ɵɵpipe(14,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(15,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(16,"\n "),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(4,3,"tools")),r.ɵɵadvance(6),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(10,5,"importData"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(14,7,"exportVault"),"\n "))}function m(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"a",23),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(3).upgradeOrganization()})),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()}2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"upgrade"),"\n "))}function h(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",14),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",15),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵelementStart(5,"div",16),r.ɵɵtext(6,"\n "),r.ɵɵtemplate(7,m,3,3,"a",17),r.ɵɵtext(8,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(10,"\n "),r.ɵɵelementStart(11,"div",11),r.ɵɵtext(12,"\n "),r.ɵɵelementStart(13,"a",18),r.ɵɵtext(14),r.ɵɵpipe(15,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(16,"\n "),r.ɵɵelementStart(17,"a",19),r.ɵɵtext(18),r.ɵɵpipe(19,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(20,"\n "),r.ɵɵelementStart(21,"a",20),r.ɵɵtext(22),r.ɵɵpipe(23,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(24,"\n "),r.ɵɵelementStart(25,"a",21),r.ɵɵtext(26),r.ɵɵpipe(27,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(28,"\n "),r.ɵɵelementStart(29,"a",22),r.ɵɵtext(30),r.ɵɵpipe(31,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(32,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(33,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(3),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(4,7,"reports"),"\n "),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",!e.accessReports),r.ɵɵadvance(7),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(15,9,"exposedPasswordsReport"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(19,11,"reusedPasswordsReport"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(23,13,"weakPasswordsReport"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(27,15,"unsecuredWebsitesReport"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(31,17,"inactive2faReport"),"\n ")}}function v(e,t){if(1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",4),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",5),r.ɵɵtext(5,"\n "),r.ɵɵtemplate(6,u,17,9,"div",6),r.ɵɵtext(7,"\n "),r.ɵɵtemplate(8,h,34,19,"div",7),r.ɵɵtext(9,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(10,"\n "),r.ɵɵelementStart(11,"div",8),r.ɵɵtext(12,"\n "),r.ɵɵelement(13,"router-outlet"),r.ɵɵtext(14,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(15,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(16,"\n "),r.ɵɵelementContainerEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(6),r.ɵɵproperty("ngIf",e.organization.canAccessImportExport),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.organization.canAccessReports)}}class f{constructor(e,t,n){this.route=e,this.organizationService=t,this.messagingService=n,this.accessReports=!1,this.loading=!0}ngOnInit(){this.route.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.organization=yield this.organizationService.get(e.organizationId),this.accessReports=this.organization.useTotp,this.loading=!1}))))}upgradeOrganization(){this.messagingService.send("upgradeOrganization",{organizationId:this.organization.id})}}t.ToolsComponent=f,f.ɵfac=function(e){return new(e||f)(r.ɵɵdirectiveInject(o.ActivatedRoute),r.ɵɵdirectiveInject(a.OrganizationService),r.ɵɵdirectiveInject(s.MessagingService))},f.ɵcmp=r.ɵɵdefineComponent({type:f,selectors:[["app-org-tools"]],decls:7,vars:2,consts:[[1,"container","page-content"],[4,"ngIf"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"row"],[1,"col-3"],["class","card mb-4",4,"ngIf"],["class","card",4,"ngIf"],[1,"col-9"],[1,"card","mb-4"],[1,"card-header"],[1,"list-group","list-group-flush"],["routerLink","import","routerLinkActive","active",1,"list-group-item"],["routerLink","export","routerLinkActive","active",1,"list-group-item"],[1,"card"],[1,"card-header","d-flex"],[1,"ml-auto"],["href","#","appStopClick","","class","badge badge-primary",3,"click",4,"ngIf"],["routerLink","exposed-passwords-report","routerLinkActive","active",1,"list-group-item"],["routerLink","reused-passwords-report","routerLinkActive","active",1,"list-group-item"],["routerLink","weak-passwords-report","routerLinkActive","active",1,"list-group-item"],["routerLink","unsecured-websites-report","routerLinkActive","active",1,"list-group-item"],["routerLink","inactive-two-factor-report","routerLinkActive","active",1,"list-group-item"],["href","#","appStopClick","",1,"badge","badge-primary",3,"click"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵtemplate(2,p,9,6,"ng-container",1),r.ɵɵtext(3,"\n "),r.ɵɵtemplate(4,v,17,2,"ng-container",1),r.ɵɵtext(5,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(6,"\n")),2&e&&(r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.loading),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",!t.loading))},directives:[l.NgIf,o.RouterOutlet,o.RouterLinkWithHref,o.RouterLinkActive,c.StopClickDirective],pipes:[d.I18nPipe],encapsulation:2})},43850:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UnsecuredWebsitesReportComponent=void 0;n(68012),n(64684),n(45330),n(45552),n(63513),n(44809),n(73569);const r=n(51948),o=n(32621),a=n(45330),s=n(64684),l=n(45552),c=n(73569),d=n(68012),p=n(63513),u=n(44809),m=n(57490),h=n(51626),v=n(18310),f=n(1142),g=n(39159),y=n(99729);function x(e,t){1&e&&(o.ɵɵelementStart(0,"small"),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",4),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",5),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function S(e,t){1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",4),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",5),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function b(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",8),o.ɵɵpipe(1,"i18n"),o.ɵɵtext(2),o.ɵɵpipe(3,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(1,2,"goodNews")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(3,4,"noUnsecuredWebsites"),"\n "))}function w(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",16),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",5),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"shared")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"shared")))}function C(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",17),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",5),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"attachments")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"attachments")))}function I(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td",12),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"app-vault-icon",13),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"td",14),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"a",15),o.ɵɵlistener("click",(function(){const t=o.ɵɵrestoreView(e).$implicit;return o.ɵɵnextContext(3).selectCipher(t)})),o.ɵɵpipe(10,"i18n"),o.ɵɵtext(11),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵtemplate(13,w,9,6,"ng-container",1),o.ɵɵtext(14,"\n "),o.ɵɵtemplate(15,C,9,6,"ng-container",1),o.ɵɵtext(16,"\n "),o.ɵɵelement(17,"br"),o.ɵɵtext(18,"\n "),o.ɵɵelementStart(19,"small"),o.ɵɵtext(20),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(22,"\n "),o.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=o.ɵɵnextContext(3);o.ɵɵadvance(4),o.ɵɵproperty("cipher",e),o.ɵɵadvance(5),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(10,6,"editItem")),o.ɵɵadvance(2),o.ɵɵtextInterpolate(e.name),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!n.organization&&e.organizationId),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.hasAttachments),o.ɵɵadvance(5),o.ɵɵtextInterpolate(e.subTitle)}}function E(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"app-callout",9),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4),o.ɵɵpipe(5,"i18n"),o.ɵɵpipe(6,"number"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"table",10),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"tbody"),o.ɵɵtext(11,"\n "),o.ɵɵtemplate(12,I,23,8,"tr",11),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,3,"unsecuredWebsitesFound")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind2(5,5,"unsecuredWebsitesFoundDesc",o.ɵɵpipeBind1(6,8,e.ciphers.length)),"\n "),o.ɵɵadvance(8),o.ɵɵproperty("ngForOf",e.ciphers)}}function P(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",6),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,b,4,6,"app-callout",7),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,E,16,10,"ng-container",1),o.ɵɵtext(5,"\n"),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.ciphers.length),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.ciphers.length)}}function O(e,t){}class k extends r.UnsecuredWebsitesReportComponent{constructor(e,t,n,i,r,o,a){super(e,t,n,i,a),this.route=r,this.organizationService=o}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){this.route.parent.parent.params.subscribe((t=>i(this,void 0,void 0,(function*(){this.organization=yield this.organizationService.get(t.organizationId),yield e.ngOnInit.call(this)}))))}))}getAllCiphers(){return this.cipherService.getAllFromApiForOrganization(this.organization.id)}}t.UnsecuredWebsitesReportComponent=k,k.ɵfac=function(e){return new(e||k)(o.ɵɵdirectiveInject(a.CipherService),o.ɵɵdirectiveInject(s.ModalService),o.ɵɵdirectiveInject(l.MessagingService),o.ɵɵdirectiveInject(c.StateService),o.ɵɵdirectiveInject(d.ActivatedRoute),o.ɵɵdirectiveInject(p.OrganizationService),o.ɵɵdirectiveInject(u.PasswordRepromptService))},k.ɵcmp=o.ɵɵdefineComponent({type:k,selectors:[["app-unsecured-websites-report"]],features:[o.ɵɵInheritDefinitionFeature],decls:20,vars:9,consts:[[1,"page-header"],[4,"ngIf"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],["href","#","appStopClick","",3,"title","click"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-collection",3,"title"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-paperclip",3,"title"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h1"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵtemplate(5,x,9,6,"small",1),o.ɵɵtext(6,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵelementStart(9,"p"),o.ɵɵtext(10),o.ɵɵpipe(11,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n"),o.ɵɵtemplate(13,S,9,6,"div",1),o.ɵɵtext(14,"\n"),o.ɵɵtemplate(15,P,6,2,"div",2),o.ɵɵtext(16,"\n"),o.ɵɵtemplate(17,O,0,0,"ng-template",null,3,o.ɵɵtemplateRefExtractor),o.ɵɵtext(19,"\n")),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,5,"unsecuredWebsitesReport"),"\n "),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.hasLoaded&&t.loading),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(11,7,"unsecuredWebsitesReportDesc")),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!t.hasLoaded&&t.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.hasLoaded))},directives:[m.NgIf,h.CalloutComponent,m.NgForOf,v.IconComponent,f.StopClickDirective,g.StopPropDirective],pipes:[y.I18nPipe,m.DecimalPipe],encapsulation:2})},57785:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.WeakPasswordsReportComponent=void 0;n(68012),n(64684),n(45330),n(45552),n(63513),n(84275),n(44809),n(73569);const r=n(64021),o=n(32621),a=n(45330),s=n(84275),l=n(64684),c=n(45552),d=n(73569),p=n(68012),u=n(63513),m=n(44809),h=n(57490),v=n(51626),f=n(18310),g=n(1142),y=n(39159),x=n(99729);function S(e,t){1&e&&(o.ɵɵelementStart(0,"small"),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",4),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",5),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function b(e,t){1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",4),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",5),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function w(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",8),o.ɵɵpipe(1,"i18n"),o.ɵɵtext(2),o.ɵɵpipe(3,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(1,2,"goodNews")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(3,4,"noWeakPasswords"),"\n "))}function C(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"a",18),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext().$implicit;return o.ɵɵnextContext(3).selectCipher(t)})),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementContainerEnd()}if(2&e){const e=o.ɵɵnextContext().$implicit;o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"editItem")),o.ɵɵadvance(2),o.ɵɵtextInterpolate(e.name)}}function I(e,t){if(1&e&&(o.ɵɵtext(0,"\n "),o.ɵɵelementStart(1,"span"),o.ɵɵtext(2),o.ɵɵelementEnd(),o.ɵɵtext(3,"\n ")),2&e){const e=o.ɵɵnextContext().$implicit;o.ɵɵadvance(2),o.ɵɵtextInterpolate(e.name)}}function E(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",19),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",5),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"shared")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"shared")))}function P(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",20),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",5),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"attachments")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"attachments")))}function O(e,t){if(1&e&&(o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td",12),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"app-vault-icon",13),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"td",14),o.ɵɵtext(8,"\n "),o.ɵɵtemplate(9,C,6,4,"ng-container",15),o.ɵɵtext(10,"\n "),o.ɵɵtemplate(11,I,4,1,"ng-template",null,16,o.ɵɵtemplateRefExtractor),o.ɵɵtext(13,"\n "),o.ɵɵtemplate(14,E,9,6,"ng-container",1),o.ɵɵtext(15,"\n "),o.ɵɵtemplate(16,P,9,6,"ng-container",1),o.ɵɵtext(17,"\n "),o.ɵɵelement(18,"br"),o.ɵɵtext(19,"\n "),o.ɵɵelementStart(20,"small"),o.ɵɵtext(21),o.ɵɵelementEnd(),o.ɵɵtext(22,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(23,"\n "),o.ɵɵelementStart(24,"td",17),o.ɵɵtext(25,"\n "),o.ɵɵelementStart(26,"span"),o.ɵɵtext(27),o.ɵɵpipe(28,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(30,"\n "),o.ɵɵelementEnd()),2&e){const e=t.$implicit,n=o.ɵɵreference(12),i=o.ɵɵnextContext(3);o.ɵɵadvance(4),o.ɵɵproperty("cipher",e),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",!i.organization||i.canManageCipher(e))("ngIfElse",n),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",!i.organization&&e.organizationId),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.hasAttachments),o.ɵɵadvance(5),o.ɵɵtextInterpolate(e.subTitle),o.ɵɵadvance(5),o.ɵɵclassMapInterpolate1("badge badge-",i.passwordStrengthMap.get(e.id)[1],""),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(28,10,i.passwordStrengthMap.get(e.id)[0]),"\n ")}}function k(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"app-callout",9),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4),o.ɵɵpipe(5,"i18n"),o.ɵɵpipe(6,"number"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"table",10),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"tbody"),o.ɵɵtext(11,"\n "),o.ɵɵtemplate(12,O,31,12,"tr",11),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,3,"weakPasswordsFound")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind2(5,5,"weakPasswordsFoundDesc",o.ɵɵpipeBind1(6,8,e.ciphers.length)),"\n "),o.ɵɵadvance(8),o.ɵɵproperty("ngForOf",e.ciphers)}}function A(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",6),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,w,4,6,"app-callout",7),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,k,16,10,"ng-container",1),o.ɵɵtext(5,"\n"),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.ciphers.length),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.ciphers.length)}}function T(e,t){}class M extends r.WeakPasswordsReportComponent{constructor(e,t,n,i,r,o,a,s){super(e,t,n,i,r,s),this.route=o,this.organizationService=a}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){this.route.parent.parent.params.subscribe((t=>i(this,void 0,void 0,(function*(){this.organization=yield this.organizationService.get(t.organizationId),this.manageableCiphers=yield this.cipherService.getAll(),yield e.ngOnInit.call(this)}))))}))}getAllCiphers(){return this.cipherService.getAllFromApiForOrganization(this.organization.id)}canManageCipher(e){return this.manageableCiphers.some((t=>t.id===e.id))}}t.WeakPasswordsReportComponent=M,M.ɵfac=function(e){return new(e||M)(o.ɵɵdirectiveInject(a.CipherService),o.ɵɵdirectiveInject(s.PasswordGenerationService),o.ɵɵdirectiveInject(l.ModalService),o.ɵɵdirectiveInject(c.MessagingService),o.ɵɵdirectiveInject(d.StateService),o.ɵɵdirectiveInject(p.ActivatedRoute),o.ɵɵdirectiveInject(u.OrganizationService),o.ɵɵdirectiveInject(m.PasswordRepromptService))},M.ɵcmp=o.ɵɵdefineComponent({type:M,selectors:[["app-weak-passwords-report"]],features:[o.ɵɵInheritDefinitionFeature],decls:20,vars:9,consts:[[1,"page-header"],[4,"ngIf"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],[4,"ngIf","ngIfElse"],["cantManage",""],[1,"text-right"],["href","#","appStopClick","",3,"title","click"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-collection",3,"title"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-paperclip",3,"title"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h1"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵtemplate(5,S,9,6,"small",1),o.ɵɵtext(6,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵelementStart(9,"p"),o.ɵɵtext(10),o.ɵɵpipe(11,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n"),o.ɵɵtemplate(13,b,9,6,"div",1),o.ɵɵtext(14,"\n"),o.ɵɵtemplate(15,A,6,2,"div",2),o.ɵɵtext(16,"\n"),o.ɵɵtemplate(17,T,0,0,"ng-template",null,3,o.ɵɵtemplateRefExtractor),o.ɵɵtext(19,"\n")),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,5,"weakPasswordsReport"),"\n "),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.hasLoaded&&t.loading),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(11,7,"weakPasswordsReportDesc")),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!t.hasLoaded&&t.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.hasLoaded))},directives:[h.NgIf,v.CalloutComponent,h.NgForOf,f.IconComponent,g.StopClickDirective,y.StopPropDirective],pipes:[x.I18nPipe,h.DecimalPipe],encapsulation:2})},93880:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AddEditComponent=void 0;n(91674),n(42982),n(45330),n(3174),n(32034),n(88308),n(51554),n(36631),n(45552),n(63513),n(84275),n(44809),n(73828),n(62166),n(73569),n(52344);const r=n(82789),o=n(49624),a=n(62415),s=n(16391),l=n(41141),c=n(32621),d=n(45330),p=n(88308),u=n(51554),m=n(73828),h=n(42982),v=n(73569),f=n(3174),g=n(52344),y=n(84275),x=n(91674),S=n(45552),b=n(32034),w=n(62166),C=n(36631),I=n(44809),E=n(63513),P=n(96832),O=n(56820),k=n(8863),A=n(57490),T=n(95746),M=n(51626),B=n(45728),D=n(48198),R=n(1142),F=n(48403),U=n(99729);function V(e,t){1&e&&(c.ɵɵelementStart(0,"app-callout",26),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(2,1,"personalOwnershipPolicyInEffect"),"\n "))}function N(e,t){if(1&e&&(c.ɵɵelementStart(0,"option",30),c.ɵɵtext(1),c.ɵɵelementEnd()),2&e){const e=t.$implicit;c.ɵɵproperty("ngValue",e.value),c.ɵɵadvance(1),c.ɵɵtextInterpolate(e.name)}}function _(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div",16),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",17),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"label",27),c.ɵɵtext(5),c.ɵɵpipe(6,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"select",28),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.type=t})),c.ɵɵtext(9,"\n "),c.ɵɵtemplate(10,N,2,2,"option",29),c.ɵɵtext(11,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(12,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(5),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(6,4,"whatTypeOfItem")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.type)("disabled",e.cipher.isDeleted),c.ɵɵadvance(2),c.ɵɵproperty("ngForOf",e.typeOptions)}}function j(e,t){if(1&e&&(c.ɵɵelementStart(0,"option",30),c.ɵɵtext(1),c.ɵɵelementEnd()),2&e){const e=t.$implicit;c.ɵɵproperty("ngValue",e.id),c.ɵɵadvance(1),c.ɵɵtextInterpolate(e.name)}}function z(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div",17),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"label",31),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"select",32),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.folderId=t})),c.ɵɵtext(7,"\n "),c.ɵɵtemplate(8,j,2,2,"option",29),c.ɵɵtext(9,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(10,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(4,4,"folder")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.folderId)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(2),c.ɵɵproperty("ngForOf",e.folders)}}function H(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div",41),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"button",50),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);const t=c.ɵɵnextContext(3);return t.copy(t.cipher.login.username,"username","Username")})),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelement(5,"i",44),c.ɵɵtext(6,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(3,1,"copyUsername")))}function L(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"a",57),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(4).generatePassword()})),c.ɵɵpipe(1,"i18n"),c.ɵɵtext(2,"\n "),c.ɵɵelement(3,"i",58),c.ɵɵtext(4,"\n "),c.ɵɵelementEnd()}2&e&&c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(1,1,"generatePassword"))}function K(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div",51),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,L,5,3,"a",52),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"a",53,54),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(3).checkPassword()})),c.ɵɵpipe(6,"i18n"),c.ɵɵtext(7,"\n "),c.ɵɵelement(8,"i",55),c.ɵɵtext(9,"\n "),c.ɵɵelement(10,"i",56),c.ɵɵpipe(11,"i18n"),c.ɵɵtext(12,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵreference(5),t=c.ɵɵnextContext(3);c.ɵɵadvance(2),c.ɵɵproperty("ngIf",t.cipher.viewPassword),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(6,6,"checkPassword")),c.ɵɵproperty("appApiAction",t.checkPasswordPromise),c.ɵɵadvance(4),c.ɵɵproperty("hidden",e.loading),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(11,8,"loading")),c.ɵɵproperty("hidden",!e.loading)}}function q(e,t){1&e&&c.ɵɵelement(0,"app-premium-badge",62)}function G(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"a",63),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(4).upgradeOrganization()})),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(2,1,"upgrade"),"\n "))}function W(e,t){if(1&e&&(c.ɵɵelementStart(0,"div"),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"img",59),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵtemplate(5,q,1,0,"app-premium-badge",60),c.ɵɵtext(6,"\n "),c.ɵɵtemplate(7,G,3,3,"a",61),c.ɵɵtext(8,"\n "),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext(3);c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,3,"verificationCodeTotp")),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",!e.organization&&!e.cipher.organizationId),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.organization&&!e.organization.useTotp||!e.organization&&!e.canAccessPremium&&e.cipher.organizationId&&!e.cipher.organizationUseTotp)}}const $=function(e){return{"stroke-dashoffset.px":e}};function Y(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div",64),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"span",65),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"span",66),c.ɵɵtext(5),c.ɵɵelementEnd(),c.ɵɵtext(6,"\n "),c.ɵɵnamespaceSVG(),c.ɵɵelementStart(7,"svg"),c.ɵɵtext(8,"\n "),c.ɵɵelementStart(9,"g"),c.ɵɵtext(10,"\n "),c.ɵɵelement(11,"circle",67),c.ɵɵtext(12,"\n "),c.ɵɵelement(13,"circle",68),c.ɵɵtext(14,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(15,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(16,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(17,"\n "),c.ɵɵnamespaceHTML(),c.ɵɵelementStart(18,"span",69),c.ɵɵpipe(19,"i18n"),c.ɵɵtext(20),c.ɵɵelementEnd(),c.ɵɵtext(21,"\n "),c.ɵɵelementStart(22,"button",70),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);const t=c.ɵɵnextContext(3);return t.copy(t.totpCode,"verificationCodeTotp","TOTP")})),c.ɵɵpipe(23,"i18n"),c.ɵɵtext(24,"\n "),c.ɵɵelement(25,"i",71),c.ɵɵtext(26,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(27,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵnextContext(3);c.ɵɵadvance(5),c.ɵɵtextInterpolate(e.totpSec),c.ɵɵadvance(6),c.ɵɵproperty("ngStyle",c.ɵɵpureFunction1(9,$,e.totpDash)),c.ɵɵadvance(7),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(19,5,"verificationCodeTotp")),c.ɵɵadvance(2),c.ɵɵtextInterpolate(e.totpCodeFormatted),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(23,7,"copyVerificationCode"))}}function Q(e,t){if(1&e&&(c.ɵɵelementStart(0,"option",30),c.ɵɵtext(1),c.ɵɵelementEnd()),2&e){const e=t.$implicit;c.ɵɵproperty("ngValue",e.value),c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function J(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"button",82),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);const t=c.ɵɵnextContext().$implicit;return c.ɵɵnextContext(4).removeUri(t)})),c.ɵɵpipe(1,"i18n"),c.ɵɵtext(2,"\n "),c.ɵɵelement(3,"i",83),c.ɵɵtext(4,"\n "),c.ɵɵelementEnd()}2&e&&c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(1,1,"remove"))}function Z(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div",16),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",73),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"label",74),c.ɵɵtext(5),c.ɵɵpipe(6,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"div",34),c.ɵɵtext(9,"\n "),c.ɵɵelementStart(10,"input",75),c.ɵɵlistener("ngModelChange",(function(t){return c.ɵɵrestoreView(e).$implicit.uri=t})),c.ɵɵpipe(11,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(12,"\n "),c.ɵɵelementStart(13,"div",41),c.ɵɵtext(14,"\n "),c.ɵɵelementStart(15,"button",42),c.ɵɵlistener("click",(function(){const t=c.ɵɵrestoreView(e).$implicit;return c.ɵɵnextContext(4).launch(t)})),c.ɵɵpipe(16,"i18n"),c.ɵɵtext(17,"\n "),c.ɵɵelement(18,"i",76),c.ɵɵtext(19,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(20,"\n "),c.ɵɵelementStart(21,"button",50),c.ɵɵlistener("click",(function(){const t=c.ɵɵrestoreView(e).$implicit;return c.ɵɵnextContext(4).copy(t.uri,"uri","URI")})),c.ɵɵpipe(22,"i18n"),c.ɵɵtext(23,"\n "),c.ɵɵelement(24,"i",44),c.ɵɵtext(25,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(26,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(27,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(28,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(29,"\n "),c.ɵɵelementStart(30,"div",77),c.ɵɵtext(31,"\n "),c.ɵɵelementStart(32,"div",37),c.ɵɵtext(33,"\n "),c.ɵɵelementStart(34,"label",74),c.ɵɵtext(35),c.ɵɵpipe(36,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(37,"\n "),c.ɵɵelementStart(38,"a",78),c.ɵɵpipe(39,"i18n"),c.ɵɵtext(40,"\n "),c.ɵɵelement(41,"i",79),c.ɵɵtext(42,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(43,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(44,"\n "),c.ɵɵelementStart(45,"div",37),c.ɵɵtext(46,"\n "),c.ɵɵelementStart(47,"select",80),c.ɵɵlistener("ngModelChange",(function(t){return c.ɵɵrestoreView(e).$implicit.match=t}))("change",(function(){const t=c.ɵɵrestoreView(e).$implicit;return c.ɵɵnextContext(4).loginUriMatchChanged(t)})),c.ɵɵtext(48,"\n "),c.ɵɵtemplate(49,Q,2,2,"option",29),c.ɵɵtext(50,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(51,"\n "),c.ɵɵtemplate(52,J,5,3,"button",81),c.ɵɵtext(53,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(54,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(55,"\n "),c.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=t.index,i=c.ɵɵnextContext(4);c.ɵɵadvance(4),c.ɵɵpropertyInterpolate1("for","loginUri",n,""),c.ɵɵadvance(1),c.ɵɵtextInterpolate(c.ɵɵpipeBind2(6,19,"uriPosition",n+1)),c.ɵɵadvance(5),c.ɵɵpropertyInterpolate1("id","loginUri",n,""),c.ɵɵpropertyInterpolate1("name","Login.Uris[",n,"].Uri"),c.ɵɵpropertyInterpolate1("placeholder","",c.ɵɵpipeBind1(11,22,"ex")," https://google.com"),c.ɵɵproperty("ngModel",e.uri)("disabled",i.cipher.isDeleted||i.viewOnly),c.ɵɵadvance(5),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(16,24,"launch")),c.ɵɵproperty("disabled",!e.canLaunch),c.ɵɵadvance(6),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(22,26,"copyUri")),c.ɵɵadvance(13),c.ɵɵpropertyInterpolate1("for","loginUriMatch",n,""),c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(36,28,"matchDetection"),"\n "),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(39,30,"learnMore")),c.ɵɵadvance(9),c.ɵɵpropertyInterpolate1("id","loginUriMatch",n,""),c.ɵɵpropertyInterpolate1("name","Login.Uris[",n,"].Match"),c.ɵɵproperty("ngModel",e.match)("disabled",i.cipher.isDeleted||i.viewOnly),c.ɵɵadvance(2),c.ɵɵproperty("ngForOf",i.uriMatchOptions),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",!i.cipher.isDeleted&&!i.viewOnly)}}function X(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,Z,56,32,"div",72),c.ɵɵtext(3,"\n "),c.ɵɵelementContainerEnd()),2&e){const e=c.ɵɵnextContext(3);c.ɵɵadvance(2),c.ɵɵproperty("ngForOf",e.cipher.login.uris)("ngForTrackBy",e.trackByFunction)}}function ee(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"a",84),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(3).addUri()})),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",85),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1(" ",c.ɵɵpipeBind1(4,1,"newUri"),"\n "))}const te=function(e,t){return{"bwi-eye":e,"bwi-eye-slash":t}},ne=function(e){return{low:e}};function ie(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",16),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"div",17),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"label",33),c.ɵɵtext(7),c.ɵɵpipe(8,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(9,"\n "),c.ɵɵelementStart(10,"div",34),c.ɵɵtext(11,"\n "),c.ɵɵelementStart(12,"input",35),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.login.username=t})),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵtemplate(14,H,8,3,"div",36),c.ɵɵtext(15,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(16,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(17,"\n "),c.ɵɵelementStart(18,"div",17),c.ɵɵtext(19,"\n "),c.ɵɵelementStart(20,"div",37),c.ɵɵtext(21,"\n "),c.ɵɵelementStart(22,"label",38),c.ɵɵtext(23),c.ɵɵpipe(24,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(25,"\n "),c.ɵɵtemplate(26,K,14,10,"div",39),c.ɵɵtext(27,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(28,"\n "),c.ɵɵelementStart(29,"div",34),c.ɵɵtext(30,"\n "),c.ɵɵelementStart(31,"input",40),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.login.password=t})),c.ɵɵelementEnd(),c.ɵɵtext(32,"\n "),c.ɵɵelementStart(33,"div",41),c.ɵɵtext(34,"\n "),c.ɵɵelementStart(35,"button",42),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).togglePassword()})),c.ɵɵpipe(36,"i18n"),c.ɵɵtext(37,"\n "),c.ɵɵelement(38,"i",43),c.ɵɵtext(39,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(40,"\n "),c.ɵɵelementStart(41,"button",42),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);const t=c.ɵɵnextContext(2);return t.copy(t.cipher.login.password,"password","Password")})),c.ɵɵpipe(42,"i18n"),c.ɵɵtext(43,"\n "),c.ɵɵelement(44,"i",44),c.ɵɵtext(45,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(46,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(47,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(48,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(49,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(50,"\n "),c.ɵɵelementStart(51,"div",16),c.ɵɵtext(52,"\n "),c.ɵɵelementStart(53,"div",17),c.ɵɵtext(54,"\n "),c.ɵɵelementStart(55,"label",45),c.ɵɵtext(56),c.ɵɵpipe(57,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(58,"\n "),c.ɵɵelementStart(59,"input",46),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.login.totp=t})),c.ɵɵelementEnd(),c.ɵɵtext(60,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(61,"\n "),c.ɵɵelementStart(62,"div",47),c.ɵɵtext(63,"\n "),c.ɵɵtemplate(64,W,9,5,"div",21),c.ɵɵtext(65,"\n "),c.ɵɵtemplate(66,Y,28,11,"div",48),c.ɵɵtext(67,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(68,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(69,"\n "),c.ɵɵtemplate(70,X,4,2,"ng-container",21),c.ɵɵtext(71,"\n "),c.ɵɵtemplate(72,ee,5,3,"a",49),c.ɵɵtext(73,"\n "),c.ɵɵelementContainerEnd()}if(2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(7),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(8,23,"username")),c.ɵɵadvance(5),c.ɵɵproperty("ngModel",e.cipher.login.username)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!e.cipher.isDeleted),c.ɵɵadvance(9),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(24,25,"password")),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",!e.cipher.isDeleted&&!e.viewOnly),c.ɵɵadvance(5),c.ɵɵpropertyInterpolate("type",e.showPassword?"text":"password"),c.ɵɵproperty("ngModel",e.cipher.login.password)("disabled",e.cipher.isDeleted||!e.cipher.viewPassword||e.viewOnly),c.ɵɵadvance(4),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(36,27,"toggleVisibility")),c.ɵɵproperty("disabled",!e.cipher.viewPassword),c.ɵɵadvance(3),c.ɵɵproperty("ngClass",c.ɵɵpureFunction2(33,te,!e.showPassword,e.showPassword)),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(42,29,"copyPassword")),c.ɵɵproperty("disabled",!e.cipher.viewPassword),c.ɵɵadvance(15),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(57,31,"authenticatorKeyTotp")),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("type",e.cipher.viewPassword?"text":"password"),c.ɵɵproperty("ngModel",e.cipher.login.totp)("disabled",e.cipher.isDeleted||!e.cipher.viewPassword||e.viewOnly),c.ɵɵadvance(3),c.ɵɵproperty("ngClass",c.ɵɵpureFunction1(36,ne,e.totpLow)),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!e.cipher.login.totp||!e.totpCode),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.cipher.login.totp&&e.totpCode),c.ɵɵadvance(4),c.ɵɵproperty("ngIf",e.cipher.login.hasUris),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!e.cipher.isDeleted&&!e.viewOnly)}}function re(e,t){if(1&e&&(c.ɵɵelementStart(0,"option",30),c.ɵɵtext(1),c.ɵɵelementEnd()),2&e){const e=t.$implicit;c.ɵɵproperty("ngValue",e.value),c.ɵɵadvance(1),c.ɵɵtextInterpolate(e.name)}}function oe(e,t){if(1&e&&(c.ɵɵelementStart(0,"option",30),c.ɵɵtext(1),c.ɵɵelementEnd()),2&e){const e=t.$implicit;c.ɵɵproperty("ngValue",e.value),c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function ae(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",16),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"div",17),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"label",86),c.ɵɵtext(7),c.ɵɵpipe(8,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(9,"\n "),c.ɵɵelementStart(10,"input",87),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.card.cardholderName=t})),c.ɵɵelementEnd(),c.ɵɵtext(11,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(12,"\n "),c.ɵɵelementStart(13,"div",17),c.ɵɵtext(14,"\n "),c.ɵɵelementStart(15,"label",88),c.ɵɵtext(16),c.ɵɵpipe(17,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(18,"\n "),c.ɵɵelementStart(19,"select",89),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.card.brand=t})),c.ɵɵtext(20,"\n "),c.ɵɵtemplate(21,re,2,2,"option",29),c.ɵɵtext(22,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(23,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(24,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(25,"\n "),c.ɵɵelementStart(26,"div",16),c.ɵɵtext(27,"\n "),c.ɵɵelementStart(28,"div",17),c.ɵɵtext(29,"\n "),c.ɵɵelementStart(30,"label",90),c.ɵɵtext(31),c.ɵɵpipe(32,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(33,"\n "),c.ɵɵelementStart(34,"div",34),c.ɵɵtext(35,"\n "),c.ɵɵelementStart(36,"input",91),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.card.number=t})),c.ɵɵelementEnd(),c.ɵɵtext(37,"\n "),c.ɵɵelementStart(38,"div",41),c.ɵɵtext(39,"\n "),c.ɵɵelementStart(40,"button",50),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).toggleCardNumber()})),c.ɵɵpipe(41,"i18n"),c.ɵɵtext(42,"\n "),c.ɵɵelement(43,"i",43),c.ɵɵtext(44,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(45,"\n "),c.ɵɵelementStart(46,"button",50),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);const t=c.ɵɵnextContext(2);return t.copy(t.cipher.card.number,"number","Number")})),c.ɵɵpipe(47,"i18n"),c.ɵɵtext(48,"\n "),c.ɵɵelement(49,"i",44),c.ɵɵtext(50,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(51,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(52,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(53,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(54,"\n "),c.ɵɵelementStart(55,"div",92),c.ɵɵtext(56,"\n "),c.ɵɵelementStart(57,"label",93),c.ɵɵtext(58),c.ɵɵpipe(59,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(60,"\n "),c.ɵɵelementStart(61,"select",94),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.card.expMonth=t})),c.ɵɵtext(62,"\n "),c.ɵɵtemplate(63,oe,2,2,"option",29),c.ɵɵtext(64,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(65,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(66,"\n "),c.ɵɵelementStart(67,"div",92),c.ɵɵtext(68,"\n "),c.ɵɵelementStart(69,"label",95),c.ɵɵtext(70),c.ɵɵpipe(71,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(72,"\n "),c.ɵɵelementStart(73,"input",96),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.card.expYear=t})),c.ɵɵpipe(74,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(75,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(76,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(77,"\n "),c.ɵɵelementStart(78,"div",16),c.ɵɵtext(79,"\n "),c.ɵɵelementStart(80,"div",17),c.ɵɵtext(81,"\n "),c.ɵɵelementStart(82,"label",97),c.ɵɵtext(83),c.ɵɵpipe(84,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(85,"\n "),c.ɵɵelementStart(86,"div",34),c.ɵɵtext(87,"\n "),c.ɵɵelementStart(88,"input",98),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.card.code=t})),c.ɵɵelementEnd(),c.ɵɵtext(89,"\n "),c.ɵɵelementStart(90,"div",41),c.ɵɵtext(91,"\n "),c.ɵɵelementStart(92,"button",50),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).toggleCardCode()})),c.ɵɵpipe(93,"i18n"),c.ɵɵtext(94,"\n "),c.ɵɵelement(95,"i",43),c.ɵɵtext(96,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(97,"\n "),c.ɵɵelementStart(98,"button",50),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);const t=c.ɵɵnextContext(2);return t.copy(t.cipher.card.code,"securityCode","Security Code")})),c.ɵɵpipe(99,"i18n"),c.ɵɵtext(100,"\n "),c.ɵɵelement(101,"i",44),c.ɵɵtext(102,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(103,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(104,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(105,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(106,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(107,"\n "),c.ɵɵelementContainerEnd()}if(2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(7),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(8,29,"cardholderName")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.card.cardholderName)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(17,31,"brand")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.card.brand)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(2),c.ɵɵproperty("ngForOf",e.cardBrandOptions),c.ɵɵadvance(10),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(32,33,"number")),c.ɵɵadvance(5),c.ɵɵpropertyInterpolate("type",e.showCardNumber?"text":"password"),c.ɵɵproperty("ngModel",e.cipher.card.number)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(4),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(41,35,"toggleVisibility")),c.ɵɵadvance(3),c.ɵɵproperty("ngClass",c.ɵɵpureFunction2(51,te,!e.showCardNumber,e.showCardNumber)),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(47,37,"copyNumber")),c.ɵɵadvance(12),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(59,39,"expirationMonth")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.card.expMonth)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(2),c.ɵɵproperty("ngForOf",e.cardExpMonthOptions),c.ɵɵadvance(7),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(71,41,"expirationYear")),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate1("placeholder","",c.ɵɵpipeBind1(74,43,"ex")," 2019"),c.ɵɵproperty("ngModel",e.cipher.card.expYear)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(10),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(84,45,"securityCode")),c.ɵɵadvance(5),c.ɵɵpropertyInterpolate("type",e.showCardCode?"text":"password"),c.ɵɵproperty("ngModel",e.cipher.card.code)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(4),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(93,47,"toggleVisibility")),c.ɵɵadvance(3),c.ɵɵproperty("ngClass",c.ɵɵpureFunction2(54,te,!e.showCardCode,e.showCardCode)),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(99,49,"securityCode"))}}function se(e,t){if(1&e&&(c.ɵɵelementStart(0,"option",30),c.ɵɵtext(1),c.ɵɵelementEnd()),2&e){const e=t.$implicit;c.ɵɵproperty("ngValue",e.value),c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function le(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",16),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"div",99),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"label",100),c.ɵɵtext(7),c.ɵɵpipe(8,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(9,"\n "),c.ɵɵelementStart(10,"select",101),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.title=t})),c.ɵɵtext(11,"\n "),c.ɵɵtemplate(12,se,2,2,"option",29),c.ɵɵtext(13,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(14,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(15,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(16,"\n "),c.ɵɵelementStart(17,"div",16),c.ɵɵtext(18,"\n "),c.ɵɵelementStart(19,"div",99),c.ɵɵtext(20,"\n "),c.ɵɵelementStart(21,"label",102),c.ɵɵtext(22),c.ɵɵpipe(23,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(24,"\n "),c.ɵɵelementStart(25,"input",103),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.firstName=t})),c.ɵɵelementEnd(),c.ɵɵtext(26,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(27,"\n "),c.ɵɵelementStart(28,"div",99),c.ɵɵtext(29,"\n "),c.ɵɵelementStart(30,"label",104),c.ɵɵtext(31),c.ɵɵpipe(32,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(33,"\n "),c.ɵɵelementStart(34,"input",105),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.middleName=t})),c.ɵɵelementEnd(),c.ɵɵtext(35,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(36,"\n "),c.ɵɵelementStart(37,"div",99),c.ɵɵtext(38,"\n "),c.ɵɵelementStart(39,"label",106),c.ɵɵtext(40),c.ɵɵpipe(41,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(42,"\n "),c.ɵɵelementStart(43,"input",107),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.lastName=t})),c.ɵɵelementEnd(),c.ɵɵtext(44,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(45,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(46,"\n "),c.ɵɵelementStart(47,"div",16),c.ɵɵtext(48,"\n "),c.ɵɵelementStart(49,"div",99),c.ɵɵtext(50,"\n "),c.ɵɵelementStart(51,"label",108),c.ɵɵtext(52),c.ɵɵpipe(53,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(54,"\n "),c.ɵɵelementStart(55,"input",109),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.username=t})),c.ɵɵelementEnd(),c.ɵɵtext(56,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(57,"\n "),c.ɵɵelementStart(58,"div",99),c.ɵɵtext(59,"\n "),c.ɵɵelementStart(60,"label",110),c.ɵɵtext(61),c.ɵɵpipe(62,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(63,"\n "),c.ɵɵelementStart(64,"input",111),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.company=t})),c.ɵɵelementEnd(),c.ɵɵtext(65,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(66,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(67,"\n "),c.ɵɵelementStart(68,"div",16),c.ɵɵtext(69,"\n "),c.ɵɵelementStart(70,"div",99),c.ɵɵtext(71,"\n "),c.ɵɵelementStart(72,"label",112),c.ɵɵtext(73),c.ɵɵpipe(74,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(75,"\n "),c.ɵɵelementStart(76,"input",113),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.ssn=t})),c.ɵɵelementEnd(),c.ɵɵtext(77,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(78,"\n "),c.ɵɵelementStart(79,"div",99),c.ɵɵtext(80,"\n "),c.ɵɵelementStart(81,"label",114),c.ɵɵtext(82),c.ɵɵpipe(83,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(84,"\n "),c.ɵɵelementStart(85,"input",115),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.passportNumber=t})),c.ɵɵelementEnd(),c.ɵɵtext(86,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(87,"\n "),c.ɵɵelementStart(88,"div",99),c.ɵɵtext(89,"\n "),c.ɵɵelementStart(90,"label",116),c.ɵɵtext(91),c.ɵɵpipe(92,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(93,"\n "),c.ɵɵelementStart(94,"input",117),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.licenseNumber=t})),c.ɵɵelementEnd(),c.ɵɵtext(95,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(96,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(97,"\n "),c.ɵɵelementStart(98,"div",16),c.ɵɵtext(99,"\n "),c.ɵɵelementStart(100,"div",17),c.ɵɵtext(101,"\n "),c.ɵɵelementStart(102,"label",118),c.ɵɵtext(103),c.ɵɵpipe(104,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(105,"\n "),c.ɵɵelementStart(106,"input",119),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.email=t})),c.ɵɵelementEnd(),c.ɵɵtext(107,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(108,"\n "),c.ɵɵelementStart(109,"div",17),c.ɵɵtext(110,"\n "),c.ɵɵelementStart(111,"label",120),c.ɵɵtext(112),c.ɵɵpipe(113,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(114,"\n "),c.ɵɵelementStart(115,"input",121),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.phone=t})),c.ɵɵelementEnd(),c.ɵɵtext(116,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(117,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(118,"\n "),c.ɵɵelementStart(119,"div",16),c.ɵɵtext(120,"\n "),c.ɵɵelementStart(121,"div",17),c.ɵɵtext(122,"\n "),c.ɵɵelementStart(123,"label",122),c.ɵɵtext(124),c.ɵɵpipe(125,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(126,"\n "),c.ɵɵelementStart(127,"input",123),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.address1=t})),c.ɵɵelementEnd(),c.ɵɵtext(128,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(129,"\n "),c.ɵɵelementStart(130,"div",17),c.ɵɵtext(131,"\n "),c.ɵɵelementStart(132,"label",124),c.ɵɵtext(133),c.ɵɵpipe(134,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(135,"\n "),c.ɵɵelementStart(136,"input",125),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.address2=t})),c.ɵɵelementEnd(),c.ɵɵtext(137,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(138,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(139,"\n "),c.ɵɵelementStart(140,"div",16),c.ɵɵtext(141,"\n "),c.ɵɵelementStart(142,"div",17),c.ɵɵtext(143,"\n "),c.ɵɵelementStart(144,"label",126),c.ɵɵtext(145),c.ɵɵpipe(146,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(147,"\n "),c.ɵɵelementStart(148,"input",127),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.address3=t})),c.ɵɵelementEnd(),c.ɵɵtext(149,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(150,"\n "),c.ɵɵelementStart(151,"div",17),c.ɵɵtext(152,"\n "),c.ɵɵelementStart(153,"label",128),c.ɵɵtext(154),c.ɵɵpipe(155,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(156,"\n "),c.ɵɵelementStart(157,"input",129),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.city=t})),c.ɵɵelementEnd(),c.ɵɵtext(158,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(159,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(160,"\n "),c.ɵɵelementStart(161,"div",16),c.ɵɵtext(162,"\n "),c.ɵɵelementStart(163,"div",17),c.ɵɵtext(164,"\n "),c.ɵɵelementStart(165,"label",130),c.ɵɵtext(166),c.ɵɵpipe(167,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(168,"\n "),c.ɵɵelementStart(169,"input",131),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.state=t})),c.ɵɵelementEnd(),c.ɵɵtext(170,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(171,"\n "),c.ɵɵelementStart(172,"div",17),c.ɵɵtext(173,"\n "),c.ɵɵelementStart(174,"label",132),c.ɵɵtext(175),c.ɵɵpipe(176,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(177,"\n "),c.ɵɵelementStart(178,"input",133),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.postalCode=t})),c.ɵɵelementEnd(),c.ɵɵtext(179,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(180,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(181,"\n "),c.ɵɵelementStart(182,"div",16),c.ɵɵtext(183,"\n "),c.ɵɵelementStart(184,"div",17),c.ɵɵtext(185,"\n "),c.ɵɵelementStart(186,"label",134),c.ɵɵtext(187),c.ɵɵpipe(188,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(189,"\n "),c.ɵɵelementStart(190,"input",135),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.country=t})),c.ɵɵelementEnd(),c.ɵɵtext(191,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(192,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(193,"\n "),c.ɵɵelementContainerEnd()}if(2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(7),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(8,55,"title")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.title)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(2),c.ɵɵproperty("ngForOf",e.identityTitleOptions),c.ɵɵadvance(10),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(23,57,"firstName")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.firstName)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(32,59,"middleName")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.middleName)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(41,61,"lastName")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.lastName)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(9),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(53,63,"username")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.username)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(62,65,"company")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.company)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(9),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(74,67,"ssn")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.ssn)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(83,69,"passportNumber")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.passportNumber)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(92,71,"licenseNumber")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.licenseNumber)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(9),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(104,73,"email")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.email)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(113,75,"phone")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.phone)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(9),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(125,77,"address1")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.address1)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(134,79,"address2")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.address2)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(9),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(146,81,"address3")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.address3)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(155,83,"cityTown")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.city)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(9),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(167,85,"stateProvince")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.state)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(176,87,"zipPostalCode")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.postalCode)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(9),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(188,89,"country")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.country)("disabled",e.cipher.isDeleted||e.viewOnly)}}function ce(e,t){if(1&e&&(c.ɵɵelementStart(0,"option",30),c.ɵɵtext(1),c.ɵɵelementEnd()),2&e){const e=t.$implicit;c.ɵɵproperty("ngValue",e.value),c.ɵɵadvance(1),c.ɵɵtextInterpolate(e.name)}}function de(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"h3",136),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"div",16),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"div",137),c.ɵɵtext(9,"\n "),c.ɵɵelementStart(10,"label",138),c.ɵɵtext(11),c.ɵɵpipe(12,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"select",139),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.organizationId=t}))("change",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).organizationChanged()})),c.ɵɵtext(15,"\n "),c.ɵɵtemplate(16,ce,2,2,"option",29),c.ɵɵtext(17,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(18,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(20,"\n "),c.ɵɵelementContainerEnd()}if(2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(4,5,"ownership")),c.ɵɵadvance(8),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(12,7,"whoOwnsThisItem")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.organizationId)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(2),c.ɵɵproperty("ngForOf",e.ownershipOptions)}}function pe(e,t){1&e&&(c.ɵɵelementStart(0,"div"),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(2,1,"noCollectionsInList"),"\n "))}function ue(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div",141),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"input",142),c.ɵɵlistener("ngModelChange",(function(t){return c.ɵɵrestoreView(e).$implicit.checked=t})),c.ɵɵelementEnd(),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"label",143),c.ɵɵtext(5),c.ɵɵelementEnd(),c.ɵɵtext(6,"\n "),c.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=t.index,i=c.ɵɵnextContext(4);c.ɵɵadvance(2),c.ɵɵpropertyInterpolate1("id","collection-",n,""),c.ɵɵpropertyInterpolate1("name","Collection[",n,"].Checked"),c.ɵɵproperty("ngModel",e.checked)("disabled",i.cipher.isDeleted||i.viewOnly),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate1("for","collection-",n,""),c.ɵɵadvance(1),c.ɵɵtextInterpolate(e.name)}}function me(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,ue,7,6,"div",140),c.ɵɵtext(3,"\n "),c.ɵɵelementContainerEnd()),2&e){const e=c.ɵɵnextContext(3);c.ɵɵadvance(2),c.ɵɵproperty("ngForOf",e.collections)}}function he(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"h3",136),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵtemplate(6,pe,3,3,"div",21),c.ɵɵtext(7,"\n "),c.ɵɵtemplate(8,me,4,1,"ng-container",21),c.ɵɵtext(9,"\n "),c.ɵɵelementContainerEnd()),2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(4,3,"collections")),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",!e.collections||!e.collections.length),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.collections&&e.collections.length)}}function ve(e,t){if(1&e&&(c.ɵɵelementStart(0,"div"),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"b",145),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5),c.ɵɵpipe(6,"date"),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext(3);c.ɵɵadvance(3),c.ɵɵtextInterpolate1("",c.ɵɵpipeBind1(4,2,"datePasswordUpdated"),":"),c.ɵɵadvance(2),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind2(6,4,e.cipher.passwordRevisionDisplayDate,"medium"),"\n ")}}function fe(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div"),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"b",145),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"a",146),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(3).viewHistory()})),c.ɵɵpipe(7,"i18n"),c.ɵɵtext(8),c.ɵɵelementEnd(),c.ɵɵtext(9,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵnextContext(3);c.ɵɵadvance(3),c.ɵɵtextInterpolate1("",c.ɵɵpipeBind1(4,3,"passwordHistory"),":"),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(7,5,"view")),c.ɵɵadvance(2),c.ɵɵtextInterpolate1("\n ",e.cipher.passwordHistory.length,"\n ")}}function ge(e,t){if(1&e&&(c.ɵɵelementStart(0,"div"),c.ɵɵtext(1),c.ɵɵpipe(2,"date"),c.ɵɵelementStart(3,"span",148),c.ɵɵtext(4),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementEnd()),2&e){const e=t.$implicit;c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind2(2,2,e.lastUsedDate,"short")," -\n "),c.ɵɵadvance(3),c.ɵɵtextInterpolate(e.password)}}function ye(e,t){if(1&e&&(c.ɵɵelementStart(0,"div",62),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,ge,6,5,"div",147),c.ɵɵtext(3,"\n "),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext(3);c.ɵɵadvance(2),c.ɵɵproperty("ngForOf",e.cipher.passwordHistory)}}function xe(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",144),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"div"),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"b",145),c.ɵɵtext(7),c.ɵɵpipe(8,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(9),c.ɵɵpipe(10,"date"),c.ɵɵelementEnd(),c.ɵɵtext(11,"\n "),c.ɵɵtemplate(12,ve,7,7,"div",21),c.ɵɵtext(13,"\n "),c.ɵɵtemplate(14,fe,10,7,"div",21),c.ɵɵtext(15,"\n "),c.ɵɵtemplate(16,ye,4,1,"div",60),c.ɵɵtext(17,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(18,"\n "),c.ɵɵelementContainerEnd()),2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(7),c.ɵɵtextInterpolate1("",c.ɵɵpipeBind1(8,5,"dateUpdated"),":"),c.ɵɵadvance(2),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind2(10,7,e.cipher.revisionDate,"medium"),"\n "),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",e.showRevisionDate),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.hasPasswordHistory),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.viewingPasswordHistory)}}function Se(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"h3",136),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"div",141),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"input",149),c.ɵɵlistener("change",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).repromptChanged()})),c.ɵɵelementEnd(),c.ɵɵtext(9,"\n "),c.ɵɵelementStart(10,"label",150),c.ɵɵtext(11),c.ɵɵpipe(12,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"a",151),c.ɵɵpipe(15,"i18n"),c.ɵɵtext(16,"\n "),c.ɵɵelement(17,"i",79),c.ɵɵtext(18,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(20,"\n "),c.ɵɵelementContainerEnd()}if(2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(4,5,"options")),c.ɵɵadvance(5),c.ɵɵproperty("ngModel",e.reprompt)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(12,7,"passwordPrompt")),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(15,9,"learnMore"))}}function be(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div",13),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,V,3,3,"app-callout",14),c.ɵɵtext(3,"\n "),c.ɵɵtemplate(4,_,14,6,"div",15),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"div",16),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"div",17),c.ɵɵtext(9,"\n "),c.ɵɵelementStart(10,"label",18),c.ɵɵtext(11),c.ɵɵpipe(12,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"input",19),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext().cipher.name=t})),c.ɵɵelementEnd(),c.ɵɵtext(15,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(16,"\n "),c.ɵɵtemplate(17,z,11,6,"div",20),c.ɵɵtext(18,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵtext(20,"\n "),c.ɵɵtemplate(21,ie,74,38,"ng-container",21),c.ɵɵtext(22,"\n "),c.ɵɵtext(23,"\n "),c.ɵɵtemplate(24,ae,108,57,"ng-container",21),c.ɵɵtext(25,"\n "),c.ɵɵtext(26,"\n "),c.ɵɵtemplate(27,le,194,91,"ng-container",21),c.ɵɵtext(28,"\n "),c.ɵɵelementStart(29,"div",22),c.ɵɵtext(30,"\n "),c.ɵɵelementStart(31,"label",23),c.ɵɵtext(32),c.ɵɵpipe(33,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(34,"\n "),c.ɵɵelementStart(35,"textarea",24),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext().cipher.notes=t})),c.ɵɵelementEnd(),c.ɵɵtext(36,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(37,"\n "),c.ɵɵelement(38,"app-vault-add-edit-custom-fields",25),c.ɵɵtext(39,"\n "),c.ɵɵtemplate(40,de,21,9,"ng-container",21),c.ɵɵtext(41,"\n "),c.ɵɵtemplate(42,he,10,5,"ng-container",21),c.ɵɵtext(43,"\n "),c.ɵɵtemplate(44,xe,19,10,"ng-container",21),c.ɵɵtext(45,"\n "),c.ɵɵtemplate(46,Se,21,11,"ng-container",21),c.ɵɵtext(47,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵnextContext();c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.allowOwnershipAssignment()&&!e.allowPersonal),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!e.editMode&&!e.viewOnly),c.ɵɵadvance(7),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(12,20,"name")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.name)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",!e.organization),c.ɵɵadvance(4),c.ɵɵproperty("ngIf",e.cipher.type===e.cipherType.Login),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",e.cipher.type===e.cipherType.Card),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",e.cipher.type===e.cipherType.Identity),c.ɵɵadvance(5),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(33,22,"notes")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.notes)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(3),c.ɵɵproperty("cipher",e.cipher)("thisCipherType",e.cipher.type)("viewOnly",e.viewOnly)("copy",e.copy.bind(e)),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.allowOwnershipAssignment()),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",(!e.editMode||e.cloneMode)&&e.cipher.organizationId),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.editMode),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.canUseReprompt)}}function we(e,t){if(1&e&&(c.ɵɵelementStart(0,"button",152),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",153),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span"),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext(),t=c.ɵɵreference(5);c.ɵɵproperty("disabled",t.loading),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,3,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,5,null!=e.cipher&&e.cipher.isDeleted?"restore":"save"))}}const Ce=function(e,t){return{"bwi-star-f":e,"bwi-star":t}};function Ie(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"button",70),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).toggleFavorite()})),c.ɵɵpipe(1,"i18n"),c.ɵɵtext(2,"\n "),c.ɵɵelement(3,"i",43),c.ɵɵtext(4,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵnextContext(2);c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(1,2,e.cipher.favorite?"unfavorite":"favorite")),c.ɵɵadvance(3),c.ɵɵproperty("ngClass",c.ɵɵpureFunction2(4,Ce,e.cipher.favorite,!e.cipher.favorite))}}function Ee(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"button",157,158),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).delete()})),c.ɵɵpipe(2,"i18n"),c.ɵɵtext(3,"\n "),c.ɵɵelement(4,"i",159),c.ɵɵtext(5,"\n "),c.ɵɵelement(6,"i",160),c.ɵɵpipe(7,"i18n"),c.ɵɵtext(8,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵreference(1),t=c.ɵɵnextContext(2);c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(2,6,t.cipher.isDeleted?"permanentlyDelete":"delete")),c.ɵɵproperty("disabled",e.loading)("appApiAction",t.deletePromise),c.ɵɵadvance(4),c.ɵɵproperty("hidden",e.loading),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(7,8,"loading")),c.ɵɵproperty("hidden",!e.loading)}}function Pe(e,t){if(1&e&&(c.ɵɵelementStart(0,"div",154),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,Ie,5,7,"button",155),c.ɵɵtext(3,"\n "),c.ɵɵtemplate(4,Ee,9,10,"button",156),c.ɵɵtext(5,"\n "),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext();c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!e.organization&&!e.cipher.isDeleted),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.editMode&&!e.cloneMode)}}class Oe extends l.AddEditComponent{constructor(e,t,n,i,r,o,a,s,l,c,d,p,u,m,h,v){super(e,t,n,i,r,o,a,s,l,d,p,u,v,m,h),this.apiService=c,this.originalCipher=null}allowOwnershipAssignment(){return null!=this.ownershipOptions&&(this.ownershipOptions.length>1||!this.allowPersonal)&&(null!=this.organization?this.cloneMode&&this.organization.canEditAnyCollection:!this.editMode||this.cloneMode)}loadCollections(){return this.organization.canEditAnyCollection?Promise.resolve(this.collections):super.loadCollections()}loadCipher(){const e=Object.create(null,{loadCipher:{get:()=>super.loadCipher}});return i(this,void 0,void 0,(function*(){if(!this.organization.canEditAnyCollection)return yield e.loadCipher.call(this);const t=yield this.apiService.getCipherAdmin(this.cipherId),n=new r.CipherData(t);return this.originalCipher=new o.Cipher(n),new o.Cipher(n)}))}encryptCipher(){return this.organization.canEditAnyCollection?this.cipherService.encrypt(this.cipher,null,this.originalCipher):super.encryptCipher()}saveCipher(e){const t=Object.create(null,{saveCipher:{get:()=>super.saveCipher}});return i(this,void 0,void 0,(function*(){if(!this.organization.canEditAnyCollection||null==e.organizationId)return t.saveCipher.call(this,e);if(this.editMode&&!this.cloneMode){const t=new s.CipherRequest(e);return this.apiService.putCipherAdmin(this.cipherId,t)}{const t=new a.CipherCreateRequest(e);return this.apiService.postCipherAdmin(t)}}))}deleteCipher(){const e=Object.create(null,{deleteCipher:{get:()=>super.deleteCipher}});return i(this,void 0,void 0,(function*(){return this.organization.canEditAnyCollection?this.cipher.isDeleted?this.apiService.deleteCipherAdmin(this.cipherId):this.apiService.putDeleteCipherAdmin(this.cipherId):e.deleteCipher.call(this)}))}}t.AddEditComponent=Oe,Oe.ɵfac=function(e){return new(e||Oe)(c.ɵɵdirectiveInject(d.CipherService),c.ɵɵdirectiveInject(p.FolderService),c.ɵɵdirectiveInject(u.I18nService),c.ɵɵdirectiveInject(m.PlatformUtilsService),c.ɵɵdirectiveInject(h.AuditService),c.ɵɵdirectiveInject(v.StateService),c.ɵɵdirectiveInject(f.CollectionService),c.ɵɵdirectiveInject(g.TotpService),c.ɵɵdirectiveInject(y.PasswordGenerationService),c.ɵɵdirectiveInject(x.ApiService),c.ɵɵdirectiveInject(S.MessagingService),c.ɵɵdirectiveInject(b.EventService),c.ɵɵdirectiveInject(w.PolicyService),c.ɵɵdirectiveInject(C.LogService),c.ɵɵdirectiveInject(I.PasswordRepromptService),c.ɵɵdirectiveInject(E.OrganizationService))},Oe.ɵcmp=c.ɵɵdefineComponent({type:Oe,selectors:[["app-org-vault-add-edit"]],features:[c.ɵɵInheritDefinitionFeature],decls:36,vars:11,consts:[["role","dialog","aria-modal","true","aria-labelledby","cipherAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],["ngNativeValidate","","autocomplete","off",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","cipherAddEditTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["class","ml-auto",4,"ngIf"],[1,"modal-body"],["type","info",4,"ngIf"],["class","row",4,"ngIf"],[1,"row"],[1,"col-6","form-group"],["for","name"],["id","name","type","text","name","Name","required","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["class","col-6 form-group",4,"ngIf"],[4,"ngIf"],[1,"form-group"],["for","notes"],["id","notes","name","Notes","rows","6",1,"form-control",3,"ngModel","disabled","ngModelChange"],[3,"cipher","thisCipherType","viewOnly","copy"],["type","info"],["for","type"],["id","type","name","Type","appAutofocus","",1,"form-control",3,"ngModel","disabled","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[3,"ngValue"],["for","folder"],["id","folder","name","FolderId",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","loginUsername"],[1,"input-group"],["id","loginUsername","type","text","name","Login.Username","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["class","input-group-append",4,"ngIf"],[1,"d-flex"],["for","loginPassword"],["class","ml-auto d-flex",4,"ngIf"],["id","loginPassword","name","Login.Password","appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"input-group-append"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","disabled","click"],["aria-hidden","true",1,"bwi","bwi-lg",3,"ngClass"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-clone"],["for","loginTotp"],["id","loginTotp","name","Login.Totp","appInputVerbatim","",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"col-6","form-group","totp","d-flex","align-items-end",3,"ngClass"],["class","d-flex align-items-center",4,"ngIf"],["href","#","appStopClick","","class","d-inline-block mb-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","click"],[1,"ml-auto","d-flex"],["href","#","class","d-block mr-2 bwi-icon-above-input","appStopClick","",3,"appA11yTitle","click",4,"ngIf"],["href","#","appStopClick","",1,"d-block","bwi-icon-above-input",3,"appA11yTitle","appApiAction","click"],["checkPasswordBtn",""],["aria-hidden","true",1,"bwi","bwi-lg","bwi-fw","bwi-check-circle",3,"hidden"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-fw","bwi-spinner","bwi-spin",3,"hidden","title"],["href","#","appStopClick","",1,"d-block","mr-2","bwi-icon-above-input",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-fw","bwi-generate"],["src","../../images/totp-countdown.png","id","totpImage",1,"ml-2",3,"title"],["class","ml-3",4,"ngIf"],["href","#","appStopClick","","class","badge badge-primary ml-3",3,"click",4,"ngIf"],[1,"ml-3"],["href","#","appStopClick","",1,"badge","badge-primary","ml-3",3,"click"],[1,"d-flex","align-items-center"],[1,"totp-countdown","mr-3","ml-2"],[1,"totp-sec"],["r","12.6","cy","16","cx","16",1,"totp-circle","inner",3,"ngStyle"],["r","14","cy","16","cx","16",1,"totp-circle","outer"],[1,"totp-code","mr-2",3,"title"],["type","button",1,"btn","btn-link",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-clone"],["class","row",4,"ngFor","ngForOf","ngForTrackBy"],[1,"col-7","form-group"],[3,"for"],["type","text","appInputVerbatim","",1,"form-control",3,"id","name","ngModel","disabled","placeholder","ngModelChange"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-share-square"],[1,"col-5","form-group"],["href","https://bitwarden.com/help/uri-match-detection/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],[1,"form-control","overflow-hidden",3,"id","name","ngModel","disabled","ngModelChange","change"],["type","button","class","btn btn-link text-danger ml-2",3,"appA11yTitle","click",4,"ngIf"],["type","button",1,"btn","btn-link","text-danger","ml-2",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-minus-circle","bwi-lg"],["href","#","appStopClick","",1,"d-inline-block","mb-3",3,"click"],["aria-hidden","true",1,"bwi","bwi-plus-circle","bwi-fw"],["for","cardCardholderName"],["id","cardCardholderName","type","text","name","Card.CardCardholderName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","cardBrand"],["id","cardBrand","name","Card.Brand",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","cardNumber"],["id","cardNumber","name","Card.Number","appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"col","form-group"],["for","cardExpMonth"],["id","cardExpMonth","name","Card.ExpMonth",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","cardExpYear"],["id","cardExpYear","type","text","name","Card.ExpYear",1,"form-control",3,"ngModel","placeholder","disabled","ngModelChange"],["for","cardCode"],["id","cardCode","name","Card.Code","appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"col-4","form-group"],["for","idTitle"],["id","idTitle","name","Identity.Title",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idFirstName"],["id","idFirstName","type","text","name","Identity.FirstName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idMiddleName"],["id","idMiddleName","type","text","name","Identity.MiddleName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idLastName"],["id","idLastName","type","text","name","Identity.LastName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idUsername"],["id","idUsername","type","text","name","Identity.Username","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idCompany"],["id","idCompany","type","text","name","Identity.Company",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idSsn"],["id","idSsn","type","text","name","Identity.SSN","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPassportNumber"],["id","idPassportNumber","type","text","name","Identity.PassportNumber","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idLicenseNumber"],["id","idLicenseNumber","type","text","name","Identity.LicenseNumber","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idEmail"],["id","idEmail","type","text","inputmode","email","name","Identity.Email","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPhone"],["id","idPhone","type","text","inputmode","tel","name","Identity.Phone",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idAddress1"],["id","idAddress1","type","text","name","Identity.Address1",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idAddress2"],["id","idAddress2","type","text","name","Identity.Address2",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idAddress3"],["id","idAddress3","type","text","name","Identity.Address3",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idCity"],["id","idCity","type","text","name","Identity.City",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idState"],["id","idState","type","text","name","Identity.State",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPostalCode"],["id","idPostalCode","type","text","name","Identity.PostalCode",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idCountry"],["id","idCountry","type","text","name","Identity.Country",1,"form-control",3,"ngModel","disabled","ngModelChange"],[1,"mt-4"],[1,"col-5"],["for","organizationId"],["id","organizationId","name","OrganizationId",1,"form-control",3,"ngModel","disabled","ngModelChange","change"],["class","form-check",4,"ngFor","ngForOf"],[1,"form-check"],["type","checkbox",1,"form-check-input",3,"ngModel","id","name","disabled","ngModelChange"],[1,"form-check-label",3,"for"],[1,"small","text-muted","mt-4"],[1,"font-weight-semibold"],["href","#","appStopClick","",3,"title","click"],[4,"ngFor","ngForOf"],[1,"generated-wrapper","text-monospace","ml-2"],["type","checkbox","id","passwordPrompt","name","passwordPrompt",1,"form-check-input",3,"ngModel","disabled","change"],["for","passwordPrompt",1,"form-check-label"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/managing-items/#protect-individual-items",3,"appA11yTitle"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[1,"ml-auto"],["type","button","class","btn btn-link",3,"appA11yTitle","click",4,"ngIf"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click",4,"ngIf"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click"],["deleteBtn",""],["aria-hidden","true",1,"bwi","bwi-trash","bwi-lg","bwi-fw",3,"hidden"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-lg","bwi-fw",3,"hidden","title"]],template:function(e,t){1&e&&(c.ɵɵelementStart(0,"div",0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",1),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"form",2,3),c.ɵɵlistener("ngSubmit",(function(){return t.submit()})),c.ɵɵtext(6,"\n "),c.ɵɵelementStart(7,"div",4),c.ɵɵtext(8,"\n "),c.ɵɵelementStart(9,"h2",5),c.ɵɵtext(10),c.ɵɵelementEnd(),c.ɵɵtext(11,"\n "),c.ɵɵelementStart(12,"button",6),c.ɵɵpipe(13,"i18n"),c.ɵɵtext(14,"\n "),c.ɵɵelementStart(15,"span",7),c.ɵɵtext(16,"×"),c.ɵɵelementEnd(),c.ɵɵtext(17,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(18,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵtemplate(20,be,48,24,"div",8),c.ɵɵtext(21,"\n "),c.ɵɵelementStart(22,"div",9),c.ɵɵtext(23,"\n "),c.ɵɵtemplate(24,we,9,7,"button",10),c.ɵɵtext(25,"\n "),c.ɵɵelementStart(26,"button",11),c.ɵɵtext(27),c.ɵɵpipe(28,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(29,"\n "),c.ɵɵtemplate(30,Pe,6,2,"div",12),c.ɵɵtext(31,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(32,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(33,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(34,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(35,"\n")),2&e&&(c.ɵɵadvance(4),c.ɵɵproperty("appApiAction",t.formPromise),c.ɵɵadvance(6),c.ɵɵtextInterpolate(t.title),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(13,7,"close")),c.ɵɵadvance(8),c.ɵɵproperty("ngIf",t.cipher),c.ɵɵadvance(4),c.ɵɵproperty("ngIf",!t.viewOnly),c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(28,9,t.viewOnly?"close":"cancel"),"\n "),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",t.cipher&&!t.viewOnly))},directives:[P.NgControlStatusGroup,P.NgForm,O.ApiActionDirective,k.A11yTitleDirective,A.NgIf,P.DefaultValueAccessor,P.RequiredValidator,P.NgControlStatus,P.NgModel,T.AddEditCustomFieldsComponent,M.CalloutComponent,P.SelectControlValueAccessor,B.AutofocusDirective,A.NgForOf,P.NgSelectOption,P.ɵNgSelectMultipleOption,D.InputVerbatimDirective,A.NgClass,R.StopClickDirective,F.PremiumBadgeComponent,A.NgStyle,P.CheckboxControlValueAccessor],pipes:[U.I18nPipe,A.DatePipe],encapsulation:2})},31597:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AttachmentsComponent=void 0;n(91674),n(45330),n(85714),n(51554),n(36631),n(73828),n(73569);const r=n(82789),o=n(49624),a=n(94652),s=n(32621),l=n(45330),c=n(51554),d=n(85714),p=n(73569),u=n(73828),m=n(91674),h=n(36631),v=n(96832),f=n(56820),g=n(57490),y=n(8863),x=n(1142),S=n(99729);function b(e,t){if(1&e&&(s.ɵɵelementStart(0,"small"),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(1),s.ɵɵtextInterpolate(e.cipher.name)}}function w(e,t){1&e&&s.ɵɵelement(0,"i",24)}function C(e,t){1&e&&s.ɵɵelement(0,"i",25)}function I(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",26),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"a",27),s.ɵɵtext(3,"\n "),s.ɵɵelement(4,"i",28),s.ɵɵpipe(5,"i18n"),s.ɵɵtext(6,"\n "),s.ɵɵelementStart(7,"span",29),s.ɵɵtext(8),s.ɵɵpipe(9,"i18n"),s.ɵɵelementEnd(),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n "),s.ɵɵelementStart(11,"button",30,31),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);const t=s.ɵɵnextContext().$implicit;return s.ɵɵnextContext(2).reupload(t)})),s.ɵɵtext(13),s.ɵɵpipe(14,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(15,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵreference(12),t=s.ɵɵnextContext().$implicit,n=s.ɵɵnextContext(2);s.ɵɵadvance(4),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(5,5,"attachmentFixDesc")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(9,7,"attachmentFixDesc")),s.ɵɵadvance(3),s.ɵɵproperty("appApiAction",n.reuploadPromises[t.id])("disabled",e.loading),s.ɵɵadvance(2),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(14,9,"fix"),"\n ")}}function E(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"td",32),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"button",33,34),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);const t=s.ɵɵnextContext().$implicit;return s.ɵɵnextContext(2).delete(t)})),s.ɵɵpipe(4,"i18n"),s.ɵɵtext(5,"\n "),s.ɵɵelement(6,"i",35),s.ɵɵtext(7,"\n "),s.ɵɵelement(8,"i",36),s.ɵɵpipe(9,"i18n"),s.ɵɵtext(10,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵreference(3),t=s.ɵɵnextContext().$implicit,n=s.ɵɵnextContext(2);s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(4,6,"delete")),s.ɵɵproperty("appApiAction",n.deletePromises[t.id])("disabled",e.loading),s.ɵɵadvance(4),s.ɵɵproperty("hidden",e.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(9,8,"loading")),s.ɵɵproperty("hidden",!e.loading)}}function P(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"tr"),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"td",16),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,w,1,0,"i",17),s.ɵɵtext(5,"\n "),s.ɵɵtemplate(6,C,1,0,"i",18),s.ɵɵtext(7,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"td",19),s.ɵɵtext(10,"\n "),s.ɵɵelementStart(11,"div",20),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"a",21),s.ɵɵlistener("click",(function(){const t=s.ɵɵrestoreView(e).$implicit;return s.ɵɵnextContext(2).download(t)})),s.ɵɵtext(14),s.ɵɵelementEnd(),s.ɵɵtext(15,"\n "),s.ɵɵtemplate(16,I,16,11,"div",22),s.ɵɵtext(17,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"small"),s.ɵɵtext(20),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵtemplate(23,E,12,10,"td",23),s.ɵɵtext(24,"\n "),s.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=s.ɵɵnextContext(2);s.ɵɵadvance(4),s.ɵɵproperty("ngIf",!e.downloading),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.downloading),s.ɵɵadvance(8),s.ɵɵtextInterpolate(e.fileName),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",n.showFixOldAttachments(e)),s.ɵɵadvance(4),s.ɵɵtextInterpolate(e.sizeName),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!n.viewOnly)}}function O(e,t){if(1&e&&(s.ɵɵelementStart(0,"table",14),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"tbody"),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,P,25,6,"tr",15),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(4),s.ɵɵproperty("ngForOf",e.cipher.attachments)}}function k(e,t){1&e&&(s.ɵɵelementStart(0,"div"),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"h3"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"label",37),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelement(10,"input",38),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"small",39),s.ɵɵtext(13),s.ɵɵpipe(14,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(15,"\n "),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,3,"newAttachment")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,5,"file")),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(14,7,"maxFileSize")))}function A(e,t){if(1&e&&(s.ɵɵelementStart(0,"button",40),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",41),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span"),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementEnd()),2&e){s.ɵɵnextContext();const e=s.ɵɵreference(5);s.ɵɵproperty("disabled",e.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,3,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,5,"save"))}}class T extends a.AttachmentsComponent{constructor(e,t,n,i,r,o,a){super(e,t,n,i,r,o,a),this.viewOnly=!1}reupload(e){const t=Object.create(null,{reuploadCipherAttachment:{get:()=>super.reuploadCipherAttachment}});return i(this,void 0,void 0,(function*(){this.organization.canEditAnyCollection&&this.showFixOldAttachments(e)&&(yield t.reuploadCipherAttachment.call(this,e,!0))}))}loadCipher(){const e=Object.create(null,{loadCipher:{get:()=>super.loadCipher}});return i(this,void 0,void 0,(function*(){if(!this.organization.canEditAnyCollection)return yield e.loadCipher.call(this);const t=yield this.apiService.getCipherAdmin(this.cipherId);return new o.Cipher(new r.CipherData(t))}))}saveCipherAttachment(e){return this.cipherService.saveAttachmentWithServer(this.cipherDomain,e,this.organization.canEditAnyCollection)}deleteCipherAttachment(e){return this.organization.canEditAnyCollection?this.apiService.deleteCipherAttachmentAdmin(this.cipherId,e):super.deleteCipherAttachment(e)}showFixOldAttachments(e){return null==e.key&&this.organization.canEditAnyCollection}}t.AttachmentsComponent=T,T.ɵfac=function(e){return new(e||T)(s.ɵɵdirectiveInject(l.CipherService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(d.CryptoService),s.ɵɵdirectiveInject(p.StateService),s.ɵɵdirectiveInject(u.PlatformUtilsService),s.ɵɵdirectiveInject(m.ApiService),s.ɵɵdirectiveInject(h.LogService))},T.ɵcmp=s.ɵɵdefineComponent({type:T,selectors:[["app-org-vault-attachments"]],features:[s.ɵɵInheritDefinitionFeature],decls:42,vars:14,consts:[["role","dialog","aria-modal","true","aria-labelledby","attachmentsTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","attachmentsTitle",1,"modal-title"],[4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["class","table table-hover table-list",4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"table","table-hover","table-list"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],["class","bwi bwi-fw bwi-lg bwi-file","aria-hidden","true",4,"ngIf"],["class","bwi bwi-spinner bwi-lg bwi-fw bwi-spin","aria-hidden","true",4,"ngIf"],[1,"wrap"],[1,"d-flex"],["href","#","appStopClick","",3,"click"],["class","ml-2",4,"ngIf"],["class","table-list-options",4,"ngIf"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-lg","bwi-file"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-lg","bwi-fw","bwi-spin"],[1,"ml-2"],["href","https://bitwarden.com/help/attachments/#fixing-old-attachments","target","_blank","rel","noopener"],["aria-hidden","true",1,"bwi","bwi-exclamation-triangle","text-warning",3,"title"],[1,"sr-only"],["type","button",1,"btn","btn-outline-primary","btn-sm","m-0","py-0","px-2",3,"appApiAction","disabled","click"],["reuploadBtn",""],[1,"table-list-options"],["type","button","appStopClick","",1,"btn","btn-outline-danger",3,"appA11yTitle","appApiAction","disabled","click"],["deleteBtn",""],["aria-hidden","true",1,"bwi","bwi-trash","bwi-lg","bwi-fw",3,"hidden"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-lg","bwi-fw",3,"hidden","title"],["for","file",1,"sr-only"],["type","file","id","file","name","file","required","",1,"form-control-file"],[1,"form-text","text-muted"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",1),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"form",2,3),s.ɵɵlistener("ngSubmit",(function(){return t.submit()})),s.ɵɵtext(6,"\n "),s.ɵɵelementStart(7,"div",4),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"h2",5),s.ɵɵtext(10),s.ɵɵpipe(11,"i18n"),s.ɵɵtemplate(12,b,2,1,"small",6),s.ɵɵtext(13,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"button",7),s.ɵɵpipe(16,"i18n"),s.ɵɵtext(17,"\n "),s.ɵɵelementStart(18,"span",8),s.ɵɵtext(19,"×"),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵelementStart(23,"div",9),s.ɵɵtext(24,"\n "),s.ɵɵtemplate(25,O,7,1,"table",10),s.ɵɵtext(26,"\n "),s.ɵɵtemplate(27,k,16,9,"div",6),s.ɵɵtext(28,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(29,"\n "),s.ɵɵelementStart(30,"div",11),s.ɵɵtext(31,"\n "),s.ɵɵtemplate(32,A,9,7,"button",12),s.ɵɵtext(33,"\n "),s.ɵɵelementStart(34,"button",13),s.ɵɵtext(35),s.ɵɵpipe(36,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(37,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(38,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(39,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(40,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(41,"\n")),2&e&&(s.ɵɵadvance(4),s.ɵɵproperty("appApiAction",t.formPromise),s.ɵɵadvance(6),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(11,8,"attachments"),"\n "),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.cipher),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(16,10,"close")),s.ɵɵadvance(10),s.ɵɵproperty("ngIf",t.cipher&&t.cipher.hasAttachments),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!t.viewOnly),s.ɵɵadvance(5),s.ɵɵproperty("ngIf",!t.viewOnly),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(36,12,"close"),"\n "))},directives:[v.NgControlStatusGroup,v.NgForm,f.ApiActionDirective,g.NgIf,y.A11yTitleDirective,g.NgForOf,x.StopClickDirective],pipes:[S.I18nPipe],encapsulation:2})},7203:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CiphersComponent=void 0;const r=n(32621),o=(n(91674),n(45330),n(32034),n(51554),n(36631),n(63513),n(44809),n(73828),n(60421),n(73569),n(30694),n(52344),n(91434)),a=n(32621),s=n(60421),l=n(51554),c=n(73828),d=n(45330),p=n(32034),u=n(52344),m=n(44809),h=n(36631),v=n(73569),f=n(63513),g=n(30694),y=n(91674),x=n(57490),S=n(37407),b=n(96832),w=n(39159),C=n(18310),I=n(68012),E=n(6373),P=n(8863),O=n(44653),k=n(62985),A=n(99237),T=n(99729),M=n(53397);function B(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",24),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",23),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementContainerEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"attachmentsNeedFix")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"attachmentsNeedFix")))}function D(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",22),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",23),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵtemplate(9,B,9,6,"ng-container",0),a.ɵɵtext(10,"\n "),a.ɵɵelementContainerEnd()),2&e){const e=a.ɵɵnextContext().$implicit,t=a.ɵɵnextContext(3);a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,3,"attachments")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,5,"attachments")),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",t.showFixOldAttachments(e))}}function R(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"td",25),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"app-org-badge",26),a.ɵɵlistener("onOrganizationClicked",(function(){a.ɵɵrestoreView(e);const t=a.ɵɵnextContext().$implicit;return a.ɵɵnextContext(3).onOrganizationClicked(t.organizationId)})),a.ɵɵpipe(3,"orgNameFromId"),a.ɵɵtext(4,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementEnd()}if(2&e){const e=a.ɵɵnextContext().$implicit,t=a.ɵɵnextContext(3);a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("organizationName",a.ɵɵpipeBind2(3,2,e.organizationId,t.organizations)),a.ɵɵpropertyInterpolate("profileName",t.profileName)}}function F(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"button",17),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);const t=a.ɵɵnextContext(2).$implicit;return a.ɵɵnextContext(3).copy(t,t.login.password,"password","Password")})),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",27),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,1,"copyPassword"),"\n "))}function U(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"button",17),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);const t=a.ɵɵnextContext(2).$implicit;return a.ɵɵnextContext(3).copy(t,t.login.totp,"verificationCodeTotp","TOTP")})),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",27),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,1,"copyVerificationCode"),"\n "))}function V(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"button",17),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);const t=a.ɵɵnextContext(2).$implicit;return a.ɵɵnextContext(3).launch(t.login.launchUri)})),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",28),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,1,"launch"),"\n "))}function N(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"button",17),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);const t=a.ɵɵnextContext().$implicit;return a.ɵɵnextContext(3).copy(t,t.login.username,"username","Username")})),a.ɵɵtext(3,"\n "),a.ɵɵelement(4,"i",27),a.ɵɵtext(5),a.ɵɵpipe(6,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(7,"\n "),a.ɵɵtemplate(8,F,5,3,"button",19),a.ɵɵtext(9,"\n "),a.ɵɵtemplate(10,U,5,3,"button",19),a.ɵɵtext(11,"\n "),a.ɵɵtemplate(12,V,5,3,"button",19),a.ɵɵtext(13,"\n "),a.ɵɵelementContainerEnd()}if(2&e){const e=a.ɵɵnextContext().$implicit,t=a.ɵɵnextContext(3);a.ɵɵadvance(5),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(6,4,"copyUsername"),"\n "),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",e.viewPassword),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.displayTotpCopyButton(e)),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.login.canLaunch)}}function _(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"button",17),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);const t=a.ɵɵnextContext().$implicit;return a.ɵɵnextContext(3).clone(t)})),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",29),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,1,"clone"),"\n "))}function j(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"button",17),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);const t=a.ɵɵnextContext().$implicit;return a.ɵɵnextContext(3).share(t)})),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",30),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,1,"moveToOrganization"),"\n "))}function z(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"button",17),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);const t=a.ɵɵnextContext().$implicit;return a.ɵɵnextContext(3).collections(t)})),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",31),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,1,"collections"),"\n "))}function H(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"button",17),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);const t=a.ɵɵnextContext().$implicit;return a.ɵɵnextContext(3).events(t)})),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",32),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,1,"eventLogs"),"\n "))}function L(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"button",17),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);const t=a.ɵɵnextContext().$implicit;return a.ɵɵnextContext(3).restore(t)})),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",33),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,1,"restore"),"\n "))}const K=function(){return[]},q=function(e){return{cipherId:e}};function G(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"tr"),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"td",5),a.ɵɵlistener("click",(function(){const t=a.ɵɵrestoreView(e).$implicit;return a.ɵɵnextContext(3).checkCipher(t)})),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"input",6),a.ɵɵlistener("ngModelChange",(function(t){return a.ɵɵrestoreView(e).$implicit.checked=t})),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"td",7),a.ɵɵlistener("click",(function(){const t=a.ɵɵrestoreView(e).$implicit;return a.ɵɵnextContext(3).checkCipher(t)})),a.ɵɵtext(8,"\n "),a.ɵɵelement(9,"app-vault-icon",8),a.ɵɵtext(10,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(11,"\n "),a.ɵɵelementStart(12,"td",9),a.ɵɵlistener("click",(function(){const t=a.ɵɵrestoreView(e).$implicit;return a.ɵɵnextContext(3).checkCipher(t)})),a.ɵɵtext(13,"\n "),a.ɵɵelementStart(14,"a",10),a.ɵɵpipe(15,"i18n"),a.ɵɵtext(16),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n "),a.ɵɵtemplate(18,D,11,7,"ng-container",0),a.ɵɵtext(19,"\n "),a.ɵɵelement(20,"br"),a.ɵɵtext(21,"\n "),a.ɵɵelementStart(22,"small",11),a.ɵɵtext(23),a.ɵɵelementEnd(),a.ɵɵtext(24,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(25,"\n "),a.ɵɵtemplate(26,R,6,5,"td",12),a.ɵɵtext(27,"\n "),a.ɵɵelementStart(28,"td",13),a.ɵɵtext(29,"\n "),a.ɵɵelementStart(30,"button",14),a.ɵɵpipe(31,"i18n"),a.ɵɵtext(32,"\n "),a.ɵɵelement(33,"i",15),a.ɵɵtext(34,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(35,"\n "),a.ɵɵelementStart(36,"bit-menu",null,16),a.ɵɵtext(38,"\n "),a.ɵɵtemplate(39,N,14,6,"ng-container",0),a.ɵɵtext(40,"\n "),a.ɵɵelementStart(41,"button",17),a.ɵɵlistener("click",(function(){const t=a.ɵɵrestoreView(e).$implicit;return a.ɵɵnextContext(3).attachments(t)})),a.ɵɵtext(42,"\n "),a.ɵɵelement(43,"i",18),a.ɵɵtext(44),a.ɵɵpipe(45,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(46,"\n "),a.ɵɵtemplate(47,_,5,3,"button",19),a.ɵɵtext(48,"\n "),a.ɵɵtemplate(49,j,5,3,"button",19),a.ɵɵtext(50,"\n "),a.ɵɵtemplate(51,z,5,3,"button",19),a.ɵɵtext(52,"\n "),a.ɵɵtemplate(53,H,5,3,"button",19),a.ɵɵtext(54,"\n "),a.ɵɵtemplate(55,L,5,3,"button",19),a.ɵɵtext(56,"\n "),a.ɵɵelementStart(57,"button",17),a.ɵɵlistener("click",(function(){const t=a.ɵɵrestoreView(e).$implicit;return a.ɵɵnextContext(3).delete(t)})),a.ɵɵtext(58,"\n "),a.ɵɵelementStart(59,"span",20),a.ɵɵtext(60,"\n "),a.ɵɵelement(61,"i",21),a.ɵɵtext(62),a.ɵɵpipe(63,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(64,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(65,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(66,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(67,"\n "),a.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=a.ɵɵreference(37),i=a.ɵɵnextContext(3);a.ɵɵadvance(4),a.ɵɵproperty("ngModel",e.checked),a.ɵɵadvance(5),a.ɵɵproperty("cipher",e),a.ɵɵadvance(5),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(15,19,"editItem")),a.ɵɵproperty("routerLink",a.ɵɵpureFunction0(27,K))("queryParams",a.ɵɵpureFunction1(28,q,e.id)),a.ɵɵadvance(2),a.ɵɵtextInterpolate(e.name),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.hasAttachments),a.ɵɵadvance(5),a.ɵɵtextInterpolate(e.subTitle),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",i.organizations.length>0&&!i.organization),a.ɵɵadvance(4),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(31,21,"options")),a.ɵɵproperty("bitMenuTriggerFor",n),a.ɵɵadvance(9),a.ɵɵproperty("ngIf",e.type===i.cipherType.Login&&!e.isDeleted),a.ɵɵadvance(5),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(45,23,"attachments"),"\n "),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",(!i.organization&&!e.organizationId||i.organization)&&!e.isDeleted),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!i.organization&&!e.organizationId&&!e.isDeleted),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.organizationId&&!e.isDeleted),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.organizationId&&i.accessEvents),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.isDeleted),a.ɵɵadvance(7),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(63,25,e.isDeleted?"permanentlyDelete":"delete"),"\n ")}}function W(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"table",3),a.ɵɵlistener("scrolled",(function(){a.ɵɵrestoreView(e);return a.ɵɵnextContext(2).loadMore()})),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"tbody"),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,G,68,30,"tr",4),a.ɵɵtext(5,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n "),a.ɵɵelementEnd()}if(2&e){const e=a.ɵɵnextContext().ngIf,t=a.ɵɵnextContext();a.ɵɵproperty("infiniteScrollDistance",1)("infiniteScrollDisabled",!t.isPaging()),a.ɵɵadvance(4),a.ɵɵproperty("ngForOf",e)}}function $(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",35),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",23),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementContainerEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"loading")))}function Y(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"button",37),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);return a.ɵɵnextContext(4).addCipher()})),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",38),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("",a.ɵɵpipeBind1(4,1,"addItem"),"\n "))}function Q(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"p"),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵtemplate(6,Y,5,3,"button",36),a.ɵɵtext(7,"\n "),a.ɵɵelementContainerEnd()),2&e){const e=a.ɵɵnextContext(3);a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,2,"noItemsInList")),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",e.showAddNew)}}function J(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",34),a.ɵɵtext(1,"\n "),a.ɵɵtemplate(2,$,9,6,"ng-container",0),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,Q,8,4,"ng-container",0),a.ɵɵtext(5,"\n "),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext(2);a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!e.loaded),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.loaded)}}function Z(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵtemplate(2,W,7,3,"table",1),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,J,6,2,"div",2),a.ɵɵtext(5,"\n"),a.ɵɵelementContainerEnd()),2&e){const e=t.ngIf;a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.length),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!e.length)}}class X extends o.CiphersComponent{constructor(e,t,n,i,o,a,s,l,c,d,p,u){super(e,t,n,i,o,a,c,s,l,d,p),this.apiService=u,this.onEventsClicked=new r.EventEmitter,this.accessEvents=!1,this.allCiphers=[]}load(e=null,t=!1){return i(this,void 0,void 0,(function*(){this.deleted=t||!1,this.organization.canEditAnyCollection?(this.accessEvents=this.organization.useEvents,this.allCiphers=yield this.cipherService.getAllFromApiForOrganization(this.organization.id)):this.allCiphers=(yield this.cipherService.getAllDecrypted()).filter((e=>e.organizationId===this.organization.id)),yield this.searchService.indexCiphers(this.organization.id,this.allCiphers),yield this.applyFilter(e),this.loaded=!0}))}applyFilter(e=null){const t=Object.create(null,{applyFilter:{get:()=>super.applyFilter}});return i(this,void 0,void 0,(function*(){if(this.organization.canViewAllCollections)yield t.applyFilter.call(this,e);else{const n=t=>t.organizationId===this.organization.id&&(null==e||e(t));yield t.applyFilter.call(this,n)}}))}search(e=null){const t=Object.create(null,{search:{get:()=>super.search}});return i(this,void 0,void 0,(function*(){yield t.search.call(this,e,this.allCiphers)}))}events(e){this.onEventsClicked.emit(e)}deleteCipher(e){return this.organization.canEditAnyCollection?this.deleted?this.apiService.deleteCipherAdmin(e):this.apiService.putDeleteCipherAdmin(e):super.deleteCipher(e,this.deleted)}showFixOldAttachments(e){return this.organization.canEditAnyCollection&&e.hasOldAttachments}}t.CiphersComponent=X,X.ɵfac=function(e){return new(e||X)(a.ɵɵdirectiveInject(s.SearchService),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(c.PlatformUtilsService),a.ɵɵdirectiveInject(d.CipherService),a.ɵɵdirectiveInject(p.EventService),a.ɵɵdirectiveInject(u.TotpService),a.ɵɵdirectiveInject(m.PasswordRepromptService),a.ɵɵdirectiveInject(h.LogService),a.ɵɵdirectiveInject(v.StateService),a.ɵɵdirectiveInject(f.OrganizationService),a.ɵɵdirectiveInject(g.TokenService),a.ɵɵdirectiveInject(y.ApiService))},X.ɵcmp=a.ɵɵdefineComponent({type:X,selectors:[["app-org-vault-ciphers"]],outputs:{onEventsClicked:"onEventsClicked"},features:[a.ɵɵInheritDefinitionFeature],decls:2,vars:1,consts:[[4,"ngIf"],["class","table table-hover table-list table-ciphers","infiniteScroll","",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled",4,"ngIf"],["class","no-items",4,"ngIf"],["infiniteScroll","",1,"table","table-hover","table-list","table-ciphers",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled"],[4,"ngFor","ngForOf"],[1,"table-list-checkbox",3,"click"],["type","checkbox","appStopProp","",3,"ngModel","ngModelChange"],[1,"table-list-icon",3,"click"],[3,"cipher"],[1,"reduced-lh","wrap",3,"click"],["appStopProp","","queryParamsHandling","merge",3,"routerLink","queryParams","title"],["appStopProp",""],["class","tw-w-28",4,"ngIf"],[1,"table-list-options"],["type","button",1,"tw-border-none","tw-bg-transparent","tw-text-main",3,"bitMenuTriggerFor","appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-ellipsis-v","bwi-lg"],["cipherOptions",""],["bit-menu-item","",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-paperclip"],["bit-menu-item","",3,"click",4,"ngIf"],[1,"tw-text-danger"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-trash"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-paperclip",3,"title"],[1,"sr-only"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-exclamation-triangle","text-warning",3,"title"],[1,"tw-w-28"],[3,"organizationName","profileName","onOrganizationClicked"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-clone"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-share-square"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-files"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-arrow-circle-right"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-collection"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-file-text"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-undo"],[1,"no-items"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],["class","btn btn-outline-primary",3,"click",4,"ngIf"],[1,"btn","btn-outline-primary",3,"click"],[1,"bwi","bwi-plus","bwi-fw"]],template:function(e,t){1&e&&(a.ɵɵtemplate(0,Z,6,2,"ng-container",0),a.ɵɵtext(1,"\n")),2&e&&a.ɵɵproperty("ngIf",t.isPaging()?t.pagedCiphers:t.ciphers)},directives:[x.NgIf,S.InfiniteScrollDirective,x.NgForOf,b.CheckboxControlValueAccessor,w.StopPropDirective,b.NgControlStatus,b.NgModel,C.IconComponent,I.RouterLinkWithHref,E.MenuTriggerForDirective,P.A11yTitleDirective,O.MenuComponent,k.MenuItemComponent,A.OrganizationNameBadgeComponent],pipes:[T.I18nPipe,M.GetOrgNameFromIdPipe],encapsulation:2})},60962:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionsComponent=void 0;n(91674),n(45330),n(3174),n(51554),n(36631),n(73828);const r=n(82789),o=n(49624),a=n(53994),s=n(86305),l=n(32621),c=n(3174),d=n(73828),p=n(51554),u=n(45330),m=n(91674),h=n(36631),v=n(96832),f=n(56820),g=n(57490),y=n(8863),x=n(39159),S=n(99729);function b(e,t){if(1&e&&(l.ɵɵelementStart(0,"small"),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext();l.ɵɵadvance(1),l.ɵɵtextInterpolate(e.cipher.name)}}function w(e,t){if(1&e){const e=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"div",17),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"button",18),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(e);return l.ɵɵnextContext().selectAll(!0)})),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"button",18),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(e);return l.ɵɵnextContext().selectAll(!1)})),l.ɵɵtext(7),l.ɵɵpipe(8,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(9,"\n "),l.ɵɵelementEnd()}2&e&&(l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(4,2,"selectAll"),"\n "),l.ɵɵadvance(4),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(8,4,"unselectAll"),"\n "))}function C(e,t){1&e&&(l.ɵɵelementStart(0,"div"),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(2,1,"noCollectionsInList"),"\n "))}function I(e,t){if(1&e){const e=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"tr",21),l.ɵɵlistener("click",(function(){const t=l.ɵɵrestoreView(e).$implicit;return l.ɵɵnextContext(2).check(t)})),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"td",22),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"input",23),l.ɵɵlistener("ngModelChange",(function(t){return l.ɵɵrestoreView(e).$implicit.checked=t})),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(6,"\n "),l.ɵɵelementStart(7,"td"),l.ɵɵtext(8),l.ɵɵelementEnd(),l.ɵɵtext(9,"\n "),l.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=t.index;l.ɵɵadvance(4),l.ɵɵpropertyInterpolate1("name","Collection[",n,"].Checked"),l.ɵɵproperty("ngModel",e.checked),l.ɵɵadvance(4),l.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function E(e,t){if(1&e&&(l.ɵɵelementStart(0,"table",19),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"tbody"),l.ɵɵtext(3,"\n "),l.ɵɵtemplate(4,I,10,3,"tr",20),l.ɵɵtext(5,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(6,"\n "),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext();l.ɵɵadvance(4),l.ɵɵproperty("ngForOf",e.collections)}}class P extends s.CollectionsComponent{constructor(e,t,n,i,r,o){super(e,t,n,i,o),this.apiService=r,this.allowSelectNone=!0}loadCipher(){const e=Object.create(null,{loadCipher:{get:()=>super.loadCipher}});return i(this,void 0,void 0,(function*(){if(!this.organization.canViewAllCollections)return yield e.loadCipher.call(this);const t=yield this.apiService.getCipherAdmin(this.cipherId);return new o.Cipher(new r.CipherData(t))}))}loadCipherCollections(){return this.organization.canViewAllCollections?this.collectionIds:super.loadCipherCollections()}loadCollections(){return this.organization.canViewAllCollections?Promise.resolve(this.collections):super.loadCollections()}saveCollections(){if(this.organization.canEditAnyCollection){const e=new a.CipherCollectionsRequest(this.cipherDomain.collectionIds);return this.apiService.putCipherCollectionsAdmin(this.cipherId,e)}return super.saveCollections()}}t.CollectionsComponent=P,P.ɵfac=function(e){return new(e||P)(l.ɵɵdirectiveInject(c.CollectionService),l.ɵɵdirectiveInject(d.PlatformUtilsService),l.ɵɵdirectiveInject(p.I18nService),l.ɵɵdirectiveInject(u.CipherService),l.ɵɵdirectiveInject(m.ApiService),l.ɵɵdirectiveInject(h.LogService))},P.ɵcmp=l.ɵɵdefineComponent({type:P,selectors:[["app-org-vault-collections"]],features:[l.ɵɵInheritDefinitionFeature],decls:63,vars:27,consts:[["role","dialog","aria-modal","true","aria-labelledby","collectionsTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],[1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","collectionsTitle",1,"modal-title"],[4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],[1,"d-flex"],["class","ml-auto d-flex",4,"ngIf"],["class","table table-hover table-list mb-0",4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"ml-auto","d-flex"],["type","button",1,"btn","btn-link","btn-sm","py-0",3,"click"],[1,"table","table-hover","table-list","mb-0"],[3,"click",4,"ngFor","ngForOf"],[3,"click"],[1,"table-list-checkbox"],["type","checkbox","appStopProp","",3,"ngModel","name","ngModelChange"]],template:function(e,t){if(1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"form",2,3),l.ɵɵlistener("ngSubmit",(function(){return t.submit()})),l.ɵɵtext(6,"\n "),l.ɵɵelementStart(7,"div",4),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"h2",5),l.ɵɵtext(10),l.ɵɵpipe(11,"i18n"),l.ɵɵtemplate(12,b,2,1,"small",6),l.ɵɵtext(13,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(14,"\n "),l.ɵɵelementStart(15,"button",7),l.ɵɵpipe(16,"i18n"),l.ɵɵtext(17,"\n "),l.ɵɵelementStart(18,"span",8),l.ɵɵtext(19,"×"),l.ɵɵelementEnd(),l.ɵɵtext(20,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(21,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(22,"\n "),l.ɵɵelementStart(23,"div",9),l.ɵɵtext(24,"\n "),l.ɵɵelementStart(25,"p"),l.ɵɵtext(26),l.ɵɵpipe(27,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(28,"\n "),l.ɵɵelementStart(29,"div",10),l.ɵɵtext(30,"\n "),l.ɵɵelementStart(31,"h3"),l.ɵɵtext(32),l.ɵɵpipe(33,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(34,"\n "),l.ɵɵtemplate(35,w,10,6,"div",11),l.ɵɵtext(36,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(37,"\n "),l.ɵɵtemplate(38,C,3,3,"div",6),l.ɵɵtext(39,"\n "),l.ɵɵtemplate(40,E,7,1,"table",12),l.ɵɵtext(41,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(42,"\n "),l.ɵɵelementStart(43,"div",13),l.ɵɵtext(44,"\n "),l.ɵɵelementStart(45,"button",14),l.ɵɵtext(46,"\n "),l.ɵɵelement(47,"i",15),l.ɵɵpipe(48,"i18n"),l.ɵɵtext(49,"\n "),l.ɵɵelementStart(50,"span"),l.ɵɵtext(51),l.ɵɵpipe(52,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(53,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(54,"\n "),l.ɵɵelementStart(55,"button",16),l.ɵɵtext(56),l.ɵɵpipe(57,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(58,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(59,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(60,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(61,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(62,"\n")),2&e){const e=l.ɵɵreference(5);l.ɵɵadvance(4),l.ɵɵproperty("appApiAction",t.formPromise),l.ɵɵadvance(6),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(11,13,"collections"),"\n "),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.cipher),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(16,15,"close")),l.ɵɵadvance(11),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(27,17,"collectionsDesc")),l.ɵɵadvance(6),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(33,19,"collections")),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",t.collections&&t.collections.length),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",!t.collections||!t.collections.length),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.collections&&t.collections.length),l.ɵɵadvance(5),l.ɵɵproperty("disabled",e.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(48,21,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(52,23,"save")),l.ɵɵadvance(5),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(57,25,"cancel"),"\n ")}},directives:[v.ɵNgNoValidate,v.NgControlStatusGroup,v.NgForm,f.ApiActionDirective,g.NgIf,y.A11yTitleDirective,g.NgForOf,v.CheckboxControlValueAccessor,x.StopPropDirective,v.NgControlStatus,v.NgModel],pipes:[S.I18nPipe],encapsulation:2})},49173:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.OssRoutingModule=void 0;const r=n(68012),o=n(76299),a=n(10517),s=n(2821),l=n(33642),c=n(4802),d=n(33154),p=n(79346),u=n(36729),m=n(39253),h=n(85175),v=n(48229),f=n(66686),g=n(12579),y=n(23291),x=n(27359),S=n(37565),b=n(6745),w=n(85002),C=n(52e3),I=n(61841),E=n(16823),P=n(53767),O=n(74155),k=n(72855),A=n(78482),T=n(82813),M=n(58728),B=n(532),D=n(10116),R=n(12721),F=n(41764),U=n(28964),V=n(82477),N=n(21362),_=n(26140),j=n(8042),z=n(56038),H=n(44118),L=n(32621),K=(n(68012),[{path:"",component:E.FrontendLayoutComponent,data:{doNotSaveUrl:!0},children:[{path:"",pathMatch:"full",children:[],canActivate:[I.HomeGuard]},{path:"login",component:u.LoginComponent,canActivate:[s.UnauthGuard]},{path:"2fa",component:x.TwoFactorComponent,canActivate:[s.UnauthGuard]},{path:"register",component:v.RegisterComponent,canActivate:[s.UnauthGuard],data:{titleId:"createAccount"}},{path:"sso",component:y.SsoComponent,canActivate:[s.UnauthGuard],data:{titleId:"enterpriseSingleSignOn"}},{path:"set-password",component:g.SetPasswordComponent,data:{titleId:"setMasterPassword"}},{path:"hint",component:d.HintComponent,canActivate:[s.UnauthGuard],data:{titleId:"passwordHint"}},{path:"lock",component:p.LockComponent,canActivate:[a.LockGuard]},{path:"verify-email",component:w.VerifyEmailTokenComponent},{path:"accept-organization",component:c.AcceptOrganizationComponent,data:{titleId:"joinOrganization",doNotSaveUrl:!1}},{path:"accept-emergency",component:l.AcceptEmergencyComponent,data:{titleId:"acceptEmergency",doNotSaveUrl:!1}},{path:"accept-families-for-enterprise",component:O.AcceptFamilySponsorshipComponent,data:{titleId:"acceptFamilySponsorship",doNotSaveUrl:!1}},{path:"recover",pathMatch:"full",redirectTo:"recover-2fa"},{path:"recover-2fa",component:h.RecoverTwoFactorComponent,canActivate:[s.UnauthGuard],data:{titleId:"recoverAccountTwoStep"}},{path:"recover-delete",component:m.RecoverDeleteComponent,canActivate:[s.UnauthGuard],data:{titleId:"deleteAccount"}},{path:"verify-recover-delete",component:C.VerifyRecoverDeleteComponent,canActivate:[s.UnauthGuard],data:{titleId:"deleteAccount"}},{path:"send/:sendId/:key",component:A.AccessComponent,data:{title:"Bitwarden Send"}},{path:"update-temp-password",component:b.UpdateTempPasswordComponent,canActivate:[o.AuthGuard],data:{titleId:"updateTempPassword"}},{path:"update-password",component:S.UpdatePasswordComponent,canActivate:[o.AuthGuard],data:{titleId:"updatePassword"}},{path:"remove-password",component:f.RemovePasswordComponent,canActivate:[o.AuthGuard],data:{titleId:"removeMasterPassword"}}]},{path:"",component:P.UserLayoutComponent,canActivate:[o.AuthGuard],children:[{path:"vault",loadChildren:()=>i(void 0,void 0,void 0,(function*(){return(yield Promise.resolve().then((()=>n(85006)))).IndividualVaultModule}))},{path:"sends",component:T.SendComponent,data:{title:"Send"}},{path:"create-organization",component:B.CreateOrganizationComponent,data:{titleId:"newOrganization"}},{path:"settings",component:V.SettingsComponent,children:[{path:"",pathMatch:"full",redirectTo:"account"},{path:"account",component:M.AccountComponent,data:{titleId:"myAccount"}},{path:"preferences",component:U.PreferencesComponent,data:{titleId:"preferences"}},{path:"security",loadChildren:()=>i(void 0,void 0,void 0,(function*(){return(yield Promise.resolve().then((()=>n(17587)))).SecurityRoutingModule}))},{path:"domain-rules",component:D.DomainRulesComponent,data:{titleId:"domainRules"}},{path:"subscription",loadChildren:()=>i(void 0,void 0,void 0,(function*(){return(yield Promise.resolve().then((()=>n(63067)))).SubscriptionRoutingModule}))},{path:"emergency-access",children:[{path:"",component:F.EmergencyAccessComponent,data:{titleId:"emergencyAccess"}},{path:":id",component:R.EmergencyAccessViewComponent,data:{titleId:"emergencyAccess"}}]},{path:"sponsored-families",component:N.SponsoredFamiliesComponent,data:{titleId:"sponsoredFamilies"}}]},{path:"tools",component:H.ToolsComponent,canActivate:[o.AuthGuard],children:[{path:"",pathMatch:"full",redirectTo:"generator"},{path:"import",component:z.ImportComponent,data:{titleId:"importData"}},{path:"export",component:_.ExportComponent,data:{titleId:"exportVault"}},{path:"generator",component:j.GeneratorComponent,data:{titleId:"generator"}}]},{path:"reports",loadChildren:()=>i(void 0,void 0,void 0,(function*(){return(yield Promise.resolve().then((()=>n(26627)))).ReportsRoutingModule}))},{path:"setup/families-for-enterprise",component:k.FamiliesForEnterpriseSetupComponent}]},{path:"organizations",loadChildren:()=>Promise.resolve().then((()=>n(64525))).then((e=>e.OrganizationsRoutingModule))}]);class q{}t.OssRoutingModule=q,q.ɵfac=function(e){return new(e||q)},q.ɵmod=L.ɵɵdefineNgModule({type:q}),q.ɵinj=L.ɵɵdefineInjector({imports:[[r.RouterModule.forRoot(K,{useHash:!0,paramsInheritanceStrategy:"always"})],r.RouterModule]})},77537:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OssModule=void 0;const i=n(30322),r=n(65691),o=n(84696),a=n(38595),s=n(98528),l=n(32621);class c{}t.OssModule=c,c.ɵfac=function(e){return new(e||c)},c.ɵmod=l.ɵɵdefineNgModule({type:c}),c.ɵinj=l.ɵɵdefineInjector({imports:[[o.SharedModule,i.LooseComponentsModule,a.VaultFilterModule,s.OrganizationBadgeModule,r.PipesModule],i.LooseComponentsModule,a.VaultFilterModule,s.OrganizationBadgeModule,r.PipesModule]})},30773:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ProvidersComponent=void 0;n(51554),n(68291);const r=n(82769),o=n(32621),a=n(68291),s=n(51554),l=n(53280),c=n(57490),d=n(59964),p=n(15370),u=n(68012),m=n(99729);function h(e,t){1&e&&(o.ɵɵelementStart(0,"p",4),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",5),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",6),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function v(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",13),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",6),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"providerIsDisabled")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"providerIsDisabled")))}const f=function(e){return["/providers",e]};function g(e,t){if(1&e&&(o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td",10),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"app-avatar",11),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"td"),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"a",12),o.ɵɵtext(10),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵtemplate(12,v,9,6,"ng-container",3),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵadvance(4),o.ɵɵproperty("data",e.name)("circle",!0)("fontSize",14),o.ɵɵadvance(5),o.ɵɵproperty("routerLink",o.ɵɵpureFunction1(6,f,e.id)),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.enabled)}}function y(e,t){if(1&e&&(o.ɵɵelementStart(0,"table",8),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"tbody"),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,g,15,8,"tr",9),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(4),o.ɵɵproperty("ngForOf",e.providers)}}function x(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,y,7,1,"table",7),o.ɵɵtext(3,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.providers&&e.providers.length)}}class S{constructor(e,t){this.providerService=e,this.i18nService=t,this.loaded=!1}ngOnInit(){return i(this,void 0,void 0,(function*(){document.body.classList.remove("layout_frontend"),yield this.load()}))}load(){return i(this,void 0,void 0,(function*(){const e=yield this.providerService.getAll();e.sort(r.Utils.getSortFunction(this.i18nService,"name")),this.providers=e,this.loaded=!0}))}}t.ProvidersComponent=S,S.ɵfac=function(e){return new(e||S)(o.ɵɵdirectiveInject(a.ProviderService),o.ɵɵdirectiveInject(s.I18nService))},S.ɵcmp=o.ɵɵdefineComponent({type:S,selectors:[["app-providers"]],decls:18,vars:5,consts:[[1,"container","page-content"],[1,"page-header","d-flex"],["class","text-muted",4,"ngIf"],[4,"ngIf"],[1,"text-muted"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[1,"sr-only"],["class","table table-hover table-list",4,"ngIf"],[1,"table","table-hover","table-list"],[4,"ngFor","ngForOf"],["width","30"],["size","25",3,"data","circle","fontSize"],["href","#",3,"routerLink"],["aria-hidden","true",1,"bwi","bwi-exclamation-triangle","text-danger",3,"title"]],template:function(e,t){1&e&&(o.ɵɵelement(0,"app-navbar"),o.ɵɵtext(1,"\n"),o.ɵɵelementStart(2,"div",0),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"div",1),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"h1"),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵtemplate(11,h,9,6,"p",2),o.ɵɵtext(12,"\n "),o.ɵɵtemplate(13,x,4,1,"ng-container",3),o.ɵɵtext(14,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n"),o.ɵɵelement(16,"app-footer"),o.ɵɵtext(17,"\n")),2&e&&(o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,3,"providers")),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",!t.loaded),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.loaded))},directives:[l.NavbarComponent,c.NgIf,d.FooterComponent,c.NgForOf,p.AvatarComponent,u.RouterLinkWithHref],pipes:[m.I18nPipe],encapsulation:2})},80446:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BreachReportComponent=void 0;n(42982),n(73569);const r=n(32621),o=n(42982),a=n(73569),s=n(96832),l=n(56820),c=n(52767),d=n(57490),p=n(51626),u=n(99729);function m(e,t){1&e&&(r.ɵɵelementStart(0,"p"),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("",r.ɵɵpipeBind1(2,1,"reportError"),"..."))}function h(e,t){if(1&e&&(r.ɵɵelementStart(0,"app-callout",16),r.ɵɵpipe(1,"i18n"),r.ɵɵtext(2),r.ɵɵpipe(3,"i18n"),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(3);r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(1,2,"goodNews")),r.ɵɵadvance(2),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind2(3,4,"breachUsernameNotFound",e.checkedUsername),"\n ")}}function v(e,t){if(1&e&&(r.ɵɵelementStart(0,"app-callout",17),r.ɵɵpipe(1,"i18n"),r.ɵɵtext(2),r.ɵɵpipe(3,"i18n"),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(3);r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(1,2,"breachFound")),r.ɵɵadvance(2),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind3(3,4,"breachUsernameFound",e.checkedUsername,e.breachedAccounts.length),"\n ")}}function f(e,t){if(1&e&&(r.ɵɵelementStart(0,"li"),r.ɵɵtext(1),r.ɵɵelementEnd()),2&e){const e=t.$implicit;r.ɵɵadvance(1),r.ɵɵtextInterpolate(e)}}function g(e,t){if(1&e&&(r.ɵɵelementStart(0,"li",20),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",3),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",21),r.ɵɵtext(5,"\n "),r.ɵɵelement(6,"img",22),r.ɵɵtext(7,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"div",23),r.ɵɵtext(10,"\n "),r.ɵɵelementStart(11,"h3",24),r.ɵɵtext(12),r.ɵɵelementEnd(),r.ɵɵtext(13,"\n "),r.ɵɵelement(14,"p",25),r.ɵɵtext(15,"\n "),r.ɵɵelementStart(16,"p",26),r.ɵɵtext(17),r.ɵɵpipe(18,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵelementStart(20,"ul"),r.ɵɵtext(21,"\n "),r.ɵɵtemplate(22,f,2,1,"li",27),r.ɵɵtext(23,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(24,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(25,"\n "),r.ɵɵelementStart(26,"div",28),r.ɵɵtext(27,"\n "),r.ɵɵelementStart(28,"dl"),r.ɵɵtext(29,"\n "),r.ɵɵelementStart(30,"dt"),r.ɵɵtext(31),r.ɵɵpipe(32,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(33,"\n "),r.ɵɵelementStart(34,"dd"),r.ɵɵtext(35),r.ɵɵelementEnd(),r.ɵɵtext(36,"\n "),r.ɵɵelementStart(37,"dt"),r.ɵɵtext(38),r.ɵɵpipe(39,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(40,"\n "),r.ɵɵelementStart(41,"dd"),r.ɵɵtext(42),r.ɵɵpipe(43,"number"),r.ɵɵelementEnd(),r.ɵɵtext(44,"\n "),r.ɵɵelementStart(45,"dt"),r.ɵɵtext(46),r.ɵɵpipe(47,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(48,"\n "),r.ɵɵelementStart(49,"dd"),r.ɵɵtext(50),r.ɵɵpipe(51,"date"),r.ɵɵelementEnd(),r.ɵɵtext(52,"\n "),r.ɵɵelementStart(53,"dt"),r.ɵɵtext(54),r.ɵɵpipe(55,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(56,"\n "),r.ɵɵelementStart(57,"dd"),r.ɵɵtext(58),r.ɵɵpipe(59,"date"),r.ɵɵelementEnd(),r.ɵɵtext(60,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(61,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(62,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(63,"\n "),r.ɵɵelementEnd()),2&e){const e=t.$implicit;r.ɵɵadvance(6),r.ɵɵproperty("src",e.logoPath,r.ɵɵsanitizeUrl),r.ɵɵadvance(6),r.ɵɵtextInterpolate(e.title),r.ɵɵadvance(2),r.ɵɵproperty("innerHTML",e.description,r.ɵɵsanitizeHtml),r.ɵɵadvance(3),r.ɵɵtextInterpolate1("",r.ɵɵpipeBind1(18,13,"compromisedData"),":"),r.ɵɵadvance(5),r.ɵɵproperty("ngForOf",e.dataClasses),r.ɵɵadvance(9),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(32,15,"website")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(e.domain),r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(39,17,"affectedUsers")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(43,19,e.pwnCount)),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(47,21,"breachOccurred")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind2(51,23,e.breachDate,"mediumDate")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(55,26,"breachReported")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind2(59,28,e.addedDate,"mediumDate"))}}function y(e,t){if(1&e&&(r.ɵɵelementStart(0,"ul",18),r.ɵɵtext(1,"\n "),r.ɵɵtemplate(2,g,64,31,"li",19),r.ɵɵtext(3,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(3);r.ɵɵadvance(2),r.ɵɵproperty("ngForOf",e.breachedAccounts)}}function x(e,t){if(1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵtemplate(2,h,4,7,"app-callout",13),r.ɵɵtext(3,"\n "),r.ɵɵtemplate(4,v,4,8,"app-callout",14),r.ɵɵtext(5,"\n "),r.ɵɵtemplate(6,y,4,1,"ul",15),r.ɵɵtext(7,"\n "),r.ɵɵelementContainerEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(2),r.ɵɵproperty("ngIf",!e.breachedAccounts.length),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.breachedAccounts.length),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.breachedAccounts.length)}}function S(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",11),r.ɵɵtext(1,"\n "),r.ɵɵtemplate(2,m,3,3,"p",12),r.ɵɵtext(3,"\n "),r.ɵɵtemplate(4,x,8,3,"ng-container",12),r.ɵɵtext(5,"\n"),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.error),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",!e.error)}}class b{constructor(e,t){this.auditService=e,this.stateService=t,this.error=!1,this.breachedAccounts=[]}ngOnInit(){return i(this,void 0,void 0,(function*(){this.username=yield this.stateService.getEmail()}))}submit(){return i(this,void 0,void 0,(function*(){this.error=!1,this.username=this.username.toLowerCase();try{this.formPromise=this.auditService.breachedAccounts(this.username),this.breachedAccounts=yield this.formPromise}catch(e){this.error=!0}this.checkedUsername=this.username}))}}t.BreachReportComponent=b,b.ɵfac=function(e){return new(e||b)(r.ɵɵdirectiveInject(o.AuditService),r.ɵɵdirectiveInject(a.StateService))},b.ɵcmp=r.ɵɵdefineComponent({type:b,selectors:[["app-breach-report"]],decls:43,vars:22,consts:[[1,"page-header"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"row"],[1,"form-group","col-6"],["for","username"],["id","username","type","text","name","Username","required","",1,"form-control",3,"ngModel","ngModelChange"],[1,"form-text","text-muted"],["bit-button","","buttonType","primary","type","submit",1,"btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["class","mt-4",4,"ngIf"],[1,"mt-4"],[4,"ngIf"],["type","success",3,"title",4,"ngIf"],["type","danger",3,"title",4,"ngIf"],["class","list-group list-group-breach",4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title"],[1,"list-group","list-group-breach"],["class","list-group-item min-height-fix",4,"ngFor","ngForOf"],[1,"list-group-item","min-height-fix"],[1,"col-2","text-center"],["alt","",1,"img-fluid",3,"src"],[1,"col-7"],[1,"text-lg"],[3,"innerHTML"],[1,"mb-1"],[4,"ngFor","ngForOf"],[1,"col-3"]],template:function(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"h1"),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(6,"\n"),r.ɵɵelementStart(7,"p"),r.ɵɵtext(8),r.ɵɵpipe(9,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(10,"\n"),r.ɵɵelementStart(11,"form",1,2),r.ɵɵlistener("ngSubmit",(function(){return t.submit()})),r.ɵɵtext(13,"\n "),r.ɵɵelementStart(14,"div",3),r.ɵɵtext(15,"\n "),r.ɵɵelementStart(16,"div",4),r.ɵɵtext(17,"\n "),r.ɵɵelementStart(18,"label",5),r.ɵɵtext(19),r.ɵɵpipe(20,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(21,"\n "),r.ɵɵelementStart(22,"input",6),r.ɵɵlistener("ngModelChange",(function(e){return t.username=e})),r.ɵɵelementEnd(),r.ɵɵtext(23,"\n "),r.ɵɵelementStart(24,"small",7),r.ɵɵtext(25),r.ɵɵpipe(26,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(27,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(28,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(29,"\n "),r.ɵɵelementStart(30,"button",8),r.ɵɵtext(31,"\n "),r.ɵɵelement(32,"i",9),r.ɵɵpipe(33,"i18n"),r.ɵɵtext(34,"\n "),r.ɵɵelementStart(35,"span"),r.ɵɵtext(36),r.ɵɵpipe(37,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(38,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(39,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(40,"\n"),r.ɵɵtemplate(41,S,6,2,"div",10),r.ɵɵtext(42,"\n")),2&e){const e=r.ɵɵreference(12);r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(4,10,"dataBreachReport")),r.ɵɵadvance(5),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(9,12,"breachDesc")),r.ɵɵadvance(3),r.ɵɵproperty("appApiAction",t.formPromise),r.ɵɵadvance(8),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(20,14,"username")),r.ɵɵadvance(3),r.ɵɵproperty("ngModel",t.username),r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(26,16,"breachCheckUsernameEmail")),r.ɵɵadvance(5),r.ɵɵproperty("disabled",e.loading),r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(33,18,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(37,20,"checkBreaches")),r.ɵɵadvance(5),r.ɵɵproperty("ngIf",!e.loading&&t.checkedUsername)}},directives:[s.NgControlStatusGroup,s.NgForm,l.ApiActionDirective,s.DefaultValueAccessor,s.RequiredValidator,s.NgControlStatus,s.NgModel,c.ButtonComponent,d.NgIf,p.CalloutComponent,d.NgForOf],pipes:[u.I18nPipe,d.DecimalPipe,d.DatePipe],encapsulation:2})},84507:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CipherReportComponent=void 0;const r=n(32621),o=(n(64684),n(45552),n(44809),n(73569),n(34453)),a=n(93880),s=n(41141),l=n(32621),c=(n(64684),n(45552),n(73569),n(44809),["cipherAddEdit"]);class d{constructor(e,t,n,i,r){this.modalService=e,this.messagingService=t,this.requiresPaid=n,this.stateService=i,this.passwordRepromptService=r,this.loading=!1,this.hasLoaded=!1,this.ciphers=[]}load(){return i(this,void 0,void 0,(function*(){this.loading=!0,yield this.setCiphers(),this.loading=!1,this.hasLoaded=!0}))}selectCipher(e){return i(this,void 0,void 0,(function*(){if(!(yield this.repromptCipher(e)))return;const t=null!=this.organization?a.AddEditComponent:s.AddEditComponent,[n,r]=yield this.modalService.openViewRef(t,this.cipherAddEditModalRef,(t=>{null!=this.organization&&(t.organization=this.organization,t.organizationId=this.organization.id),t.cipherId=null==e?null:e.id,t.onSavedCipher.subscribe((()=>i(this,void 0,void 0,(function*(){n.close(),yield this.load()})))),t.onDeletedCipher.subscribe((()=>i(this,void 0,void 0,(function*(){n.close(),yield this.load()})))),t.onRestoredCipher.subscribe((()=>i(this,void 0,void 0,(function*(){n.close(),yield this.load()}))))}));return r}))}checkAccess(){return i(this,void 0,void 0,(function*(){if(null!=this.organization){if(this.requiresPaid&&!this.organization.useTotp)return this.messagingService.send("upgradeOrganization",{organizationId:this.organization.id}),!1}else{const e=yield this.stateService.getCanAccessPremium();if(this.requiresPaid&&!e)return this.messagingService.send("premiumRequired"),this.loading=!1,!1}return!0}))}setCiphers(){return i(this,void 0,void 0,(function*(){this.ciphers=[]}))}repromptCipher(e){return i(this,void 0,void 0,(function*(){return e.reprompt===o.CipherRepromptType.None||(yield this.passwordRepromptService.showPasswordPrompt())}))}}t.CipherReportComponent=d,d.ɵfac=function(e){l.ɵɵinvalidFactory()},d.ɵdir=l.ɵɵdefineDirective({type:d,viewQuery:function(e,t){if(1&e&&l.ɵɵviewQuery(c,7,r.ViewContainerRef),2&e){let e;l.ɵɵqueryRefresh(e=l.ɵɵloadQuery())&&(t.cipherAddEditModalRef=e.first)}}})},8489:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ExposedPasswordsReportComponent=void 0;n(64684),n(42982),n(45330),n(45552),n(44809),n(73569);const r=n(32773),o=n(84507),a=n(32621),s=n(45330),l=n(42982),c=n(64684),d=n(45552),p=n(73569),u=n(44809),m=n(52767),h=n(57490),v=n(51626),f=n(18310),g=n(1142),y=n(39159),x=n(99729);function S(e,t){1&e&&(a.ɵɵelementStart(0,"app-callout",8),a.ɵɵpipe(1,"i18n"),a.ɵɵtext(2),a.ɵɵpipe(3,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(1,2,"goodNews")),a.ɵɵadvance(2),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(3,4,"noExposedPasswords"),"\n "))}function b(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"a",19),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);const t=a.ɵɵnextContext().$implicit;return a.ɵɵnextContext(3).selectCipher(t)})),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementContainerEnd()}if(2&e){const e=a.ɵɵnextContext().$implicit;a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"editItem")),a.ɵɵadvance(2),a.ɵɵtextInterpolate(e.name)}}function w(e,t){if(1&e&&(a.ɵɵtext(0,"\n "),a.ɵɵelementStart(1,"span"),a.ɵɵtext(2),a.ɵɵelementEnd(),a.ɵɵtext(3,"\n ")),2&e){const e=a.ɵɵnextContext().$implicit;a.ɵɵadvance(2),a.ɵɵtextInterpolate(e.name)}}function C(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",20),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",21),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementContainerEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"shared")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"shared")))}function I(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",22),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",21),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementContainerEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"attachments")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"attachments")))}function E(e,t){if(1&e&&(a.ɵɵelementStart(0,"tr"),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"td",12),a.ɵɵtext(3,"\n "),a.ɵɵelement(4,"app-vault-icon",13),a.ɵɵtext(5,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"td",14),a.ɵɵtext(8,"\n "),a.ɵɵtemplate(9,b,6,4,"ng-container",15),a.ɵɵtext(10,"\n "),a.ɵɵtemplate(11,w,4,1,"ng-template",null,16,a.ɵɵtemplateRefExtractor),a.ɵɵtext(13,"\n "),a.ɵɵtemplate(14,C,9,6,"ng-container",7),a.ɵɵtext(15,"\n "),a.ɵɵtemplate(16,I,9,6,"ng-container",7),a.ɵɵtext(17,"\n "),a.ɵɵelement(18,"br"),a.ɵɵtext(19,"\n "),a.ɵɵelementStart(20,"small"),a.ɵɵtext(21),a.ɵɵelementEnd(),a.ɵɵtext(22,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(23,"\n "),a.ɵɵelementStart(24,"td",17),a.ɵɵtext(25,"\n "),a.ɵɵelementStart(26,"span",18),a.ɵɵtext(27),a.ɵɵpipe(28,"i18n"),a.ɵɵpipe(29,"number"),a.ɵɵelementEnd(),a.ɵɵtext(30,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(31,"\n "),a.ɵɵelementEnd()),2&e){const e=t.$implicit,n=a.ɵɵreference(12),i=a.ɵɵnextContext(3);a.ɵɵadvance(4),a.ɵɵproperty("cipher",e),a.ɵɵadvance(5),a.ɵɵproperty("ngIf",!i.organization||i.canManageCipher(e))("ngIfElse",n),a.ɵɵadvance(5),a.ɵɵproperty("ngIf",!i.organization&&e.organizationId),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.hasAttachments),a.ɵɵadvance(5),a.ɵɵtextInterpolate(e.subTitle),a.ɵɵadvance(6),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind2(28,7,"exposedXTimes",a.ɵɵpipeBind1(29,10,i.exposedPasswordMap.get(e.id))),"\n ")}}function P(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"app-callout",9),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4),a.ɵɵpipe(5,"i18n"),a.ɵɵpipe(6,"number"),a.ɵɵelementEnd(),a.ɵɵtext(7,"\n "),a.ɵɵelementStart(8,"table",10),a.ɵɵtext(9,"\n "),a.ɵɵelementStart(10,"tbody"),a.ɵɵtext(11,"\n "),a.ɵɵtemplate(12,E,32,12,"tr",11),a.ɵɵtext(13,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(15,"\n "),a.ɵɵelementContainerEnd()),2&e){const e=a.ɵɵnextContext(2);a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,4,"exposedPasswordsFound")),a.ɵɵproperty("useAlertRole",!0),a.ɵɵadvance(2),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind2(5,6,"exposedPasswordsFoundDesc",a.ɵɵpipeBind1(6,9,e.ciphers.length)),"\n "),a.ɵɵadvance(8),a.ɵɵproperty("ngForOf",e.ciphers)}}function O(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",5),a.ɵɵtext(1,"\n "),a.ɵɵtemplate(2,S,4,6,"app-callout",6),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,P,16,11,"ng-container",7),a.ɵɵtext(5,"\n"),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext();a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!e.ciphers.length),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.ciphers.length)}}function k(e,t){}class A extends o.CipherReportComponent{constructor(e,t,n,i,r,o){super(n,i,!0,r,o),this.cipherService=e,this.auditService=t,this.exposedPasswordMap=new Map}ngOnInit(){this.checkAccess()}load(){const e=Object.create(null,{load:{get:()=>super.load}});return i(this,void 0,void 0,(function*(){(yield this.checkAccess())&&e.load.call(this)}))}setCiphers(){return i(this,void 0,void 0,(function*(){const e=yield this.getAllCiphers(),t=[],n=[];e.forEach((e=>{if(e.type!==r.CipherType.Login||null==e.login.password||""===e.login.password||e.isDeleted)return;const i=this.auditService.passwordLeaked(e.login.password).then((n=>{n>0&&(t.push(e),this.exposedPasswordMap.set(e.id,n))}));n.push(i)})),yield Promise.all(n),this.ciphers=t}))}getAllCiphers(){return this.cipherService.getAllDecrypted()}canManageCipher(e){return!0}}t.ExposedPasswordsReportComponent=A,A.ɵfac=function(e){return new(e||A)(a.ɵɵdirectiveInject(s.CipherService),a.ɵɵdirectiveInject(l.AuditService),a.ɵɵdirectiveInject(c.ModalService),a.ɵɵdirectiveInject(d.MessagingService),a.ɵɵdirectiveInject(p.StateService),a.ɵɵdirectiveInject(u.PasswordRepromptService))},A.ɵcmp=a.ɵɵdefineComponent({type:A,selectors:[["app-exposed-passwords-report"]],features:[a.ɵɵInheritDefinitionFeature],decls:26,vars:14,consts:[[1,"page-header"],["bit-button","","buttonType","primary","type","button",1,"btn-submit",3,"disabled","click"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],[4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title","useAlertRole"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],[4,"ngIf","ngIfElse"],["cantManage",""],[1,"text-right"],[1,"badge","badge-warning"],["href","#","appStopClick","",3,"title","click"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-collection",3,"title"],[1,"sr-only"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-paperclip",3,"title"]],template:function(e,t){1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"h1"),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n"),a.ɵɵelementStart(7,"p"),a.ɵɵtext(8),a.ɵɵpipe(9,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(10,"\n"),a.ɵɵelementStart(11,"button",1),a.ɵɵlistener("click",(function(){return t.load()})),a.ɵɵtext(12,"\n "),a.ɵɵelement(13,"i",2),a.ɵɵpipe(14,"i18n"),a.ɵɵtext(15,"\n "),a.ɵɵelementStart(16,"span"),a.ɵɵtext(17),a.ɵɵpipe(18,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(19,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(20,"\n"),a.ɵɵtemplate(21,O,6,2,"div",3),a.ɵɵtext(22,"\n"),a.ɵɵtemplate(23,k,0,0,"ng-template",null,4,a.ɵɵtemplateRefExtractor),a.ɵɵtext(25,"\n")),2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,6,"exposedPasswordsReport")),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(9,8,"exposedPasswordsReportDesc")),a.ɵɵadvance(3),a.ɵɵproperty("disabled",t.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(14,10,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(18,12,"checkExposedPasswords")),a.ɵɵadvance(4),a.ɵɵproperty("ngIf",t.hasLoaded))},directives:[m.ButtonComponent,h.NgIf,v.CalloutComponent,h.NgForOf,f.IconComponent,g.StopClickDirective,y.StopPropDirective],pipes:[x.I18nPipe,h.DecimalPipe],encapsulation:2})},66916:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.InactiveTwoFactorReportComponent=void 0;n(64684),n(45330),n(36631),n(45552),n(44809),n(73569);const r=n(32773),o=n(82769),a=n(84507),s=n(32621),l=n(45330),c=n(64684),d=n(45552),p=n(73569),u=n(36631),m=n(44809),h=n(57490),v=n(51626),f=n(18310),g=n(1142),y=n(39159),x=n(99729);function S(e,t){1&e&&(s.ɵɵelementStart(0,"small"),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",4),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",5),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"loading")))}function b(e,t){1&e&&(s.ɵɵelementStart(0,"div"),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",4),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",5),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"loading")))}function w(e,t){1&e&&(s.ɵɵelementStart(0,"app-callout",8),s.ɵɵpipe(1,"i18n"),s.ɵɵtext(2),s.ɵɵpipe(3,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(1,2,"goodNews")),s.ɵɵadvance(2),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(3,4,"noInactive2fa"),"\n "))}function C(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",18),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",5),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"shared")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"shared")))}function I(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",19),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",5),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"attachments")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"attachments")))}function E(e,t){if(1&e&&(s.ɵɵelementStart(0,"a",20),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext().$implicit,t=s.ɵɵnextContext(3);s.ɵɵpropertyInterpolate("href",t.cipherDocs.get(e.id),s.ɵɵsanitizeUrl),s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,2,"instructions"),"")}}function P(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"tr"),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"td",12),s.ɵɵtext(3,"\n "),s.ɵɵelement(4,"app-vault-icon",13),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementStart(7,"td",14),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"a",15),s.ɵɵlistener("click",(function(){const t=s.ɵɵrestoreView(e).$implicit;return s.ɵɵnextContext(3).selectCipher(t)})),s.ɵɵpipe(10,"i18n"),s.ɵɵtext(11),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵtemplate(13,C,9,6,"ng-container",1),s.ɵɵtext(14,"\n "),s.ɵɵtemplate(15,I,9,6,"ng-container",1),s.ɵɵtext(16,"\n "),s.ɵɵelement(17,"br"),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"small"),s.ɵɵtext(20),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵelementStart(23,"td",16),s.ɵɵtext(24,"\n "),s.ɵɵtemplate(25,E,3,4,"a",17),s.ɵɵtext(26,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n "),s.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=s.ɵɵnextContext(3);s.ɵɵadvance(4),s.ɵɵproperty("cipher",e),s.ɵɵadvance(5),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(10,7,"editItem")),s.ɵɵadvance(2),s.ɵɵtextInterpolate(e.name),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!n.organization&&e.organizationId),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.hasAttachments),s.ɵɵadvance(5),s.ɵɵtextInterpolate(e.subTitle),s.ɵɵadvance(5),s.ɵɵproperty("ngIf",n.cipherDocs.has(e.id))}}function O(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"app-callout",9),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4),s.ɵɵpipe(5,"i18n"),s.ɵɵpipe(6,"number"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"table",10),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"tbody"),s.ɵɵtext(11,"\n "),s.ɵɵtemplate(12,P,28,9,"tr",11),s.ɵɵtext(13,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(15,"\n "),s.ɵɵelementContainerEnd()),2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,3,"inactive2faFound")),s.ɵɵadvance(2),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind2(5,5,"inactive2faFoundDesc",s.ɵɵpipeBind1(6,8,e.ciphers.length)),"\n "),s.ɵɵadvance(8),s.ɵɵproperty("ngForOf",e.ciphers)}}function k(e,t){if(1&e&&(s.ɵɵelementStart(0,"div",6),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,w,4,6,"app-callout",7),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,O,16,10,"ng-container",1),s.ɵɵtext(5,"\n"),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!e.ciphers.length),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.ciphers.length)}}function A(e,t){}class T extends a.CipherReportComponent{constructor(e,t,n,i,r,o){super(t,n,!0,i,o),this.cipherService=e,this.logService=r,this.services=new Map,this.cipherDocs=new Map}ngOnInit(){const e=Object.create(null,{load:{get:()=>super.load}});return i(this,void 0,void 0,(function*(){(yield this.checkAccess())&&(yield e.load.call(this))}))}setCiphers(){return i(this,void 0,void 0,(function*(){try{yield this.load2fa()}catch(e){this.logService.error(e)}if(this.services.size>0){const e=yield this.getAllCiphers(),t=[],n=[],i=new Map;e.forEach((e=>{if(e.type===r.CipherType.Login&&(null==e.login.totp||""===e.login.totp)&&e.login.hasUris&&!e.isDeleted)for(let n=0;n0)return;const e=yield fetch(new Request("https://2fa.directory/api/v3/totp.json"));if(200!==e.status)throw new Error;const t=yield e.json();for(const n of t){const e=n[1];if(null!=e.domain&&null!=e.documentation){if(null!=e["additional-domains"])for(const t of e["additional-domains"])this.services.set(t,e.documentation);this.services.set(e.domain,e.documentation)}}}))}}t.InactiveTwoFactorReportComponent=T,T.ɵfac=function(e){return new(e||T)(s.ɵɵdirectiveInject(l.CipherService),s.ɵɵdirectiveInject(c.ModalService),s.ɵɵdirectiveInject(d.MessagingService),s.ɵɵdirectiveInject(p.StateService),s.ɵɵdirectiveInject(u.LogService),s.ɵɵdirectiveInject(m.PasswordRepromptService))},T.ɵcmp=s.ɵɵdefineComponent({type:T,selectors:[["app-inactive-two-factor-report"]],features:[s.ɵɵInheritDefinitionFeature],decls:20,vars:9,consts:[[1,"page-header"],[4,"ngIf"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],["href","#","appStopClick","",3,"title","click"],[1,"text-right"],["class","badge badge-primary","target","_blank","rel","noopener",3,"href",4,"ngIf"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-collection",3,"title"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-paperclip",3,"title"],["target","_blank","rel","noopener",1,"badge","badge-primary",3,"href"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"h1"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵtemplate(5,S,9,6,"small",1),s.ɵɵtext(6,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n"),s.ɵɵelementStart(9,"p"),s.ɵɵtext(10),s.ɵɵpipe(11,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n"),s.ɵɵtemplate(13,b,9,6,"div",1),s.ɵɵtext(14,"\n"),s.ɵɵtemplate(15,k,6,2,"div",2),s.ɵɵtext(16,"\n"),s.ɵɵtemplate(17,A,0,0,"ng-template",null,3,s.ɵɵtemplateRefExtractor),s.ɵɵtext(19,"\n")),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(4,5,"inactive2faReport"),"\n "),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.hasLoaded&&t.loading),s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(11,7,"inactive2faReportDesc")),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!t.hasLoaded&&t.loading),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.hasLoaded))},directives:[h.NgIf,v.CalloutComponent,h.NgForOf,f.IconComponent,g.StopClickDirective,y.StopPropDirective],pipes:[x.I18nPipe,h.DecimalPipe],encapsulation:2})},50702:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ReportCardComponent=t.ReportTypes=void 0;n(61248),n(45552),n(73569);const r=n(32621),o=n(73569),a=n(45552),s=n(61248),l=n(68012),c=n(57490),d=n(25108),p=n(99729);function u(e,t){1&e&&(r.ɵɵelementStart(0,"span",8),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(2,1,"premium")))}const m=function(e){return{"tw-grayscale":e}};!function(e){e.exposedPasswords="exposedPasswords",e.reusedPasswords="reusedPasswords",e.weakPasswords="weakPasswords",e.unsecuredWebsites="unsecuredWebsites",e.inactive2fa="inactive2fa",e.dataBreach="dataBreach"}(t.ReportTypes||(t.ReportTypes={}));const h={exposedPasswords:{title:"exposedPasswordsReport",description:"exposedPasswordsReportDesc",route:"exposed-passwords-report",icon:'\n \n \n \n \n \n \n \n \n \n \n \n \n ',requiresPremium:!0},reusedPasswords:{title:"reusedPasswordsReport",description:"reusedPasswordsReportDesc",route:"reused-passwords-report",icon:'\n \n \n \n \n \n ',requiresPremium:!0},weakPasswords:{title:"weakPasswordsReport",description:"weakPasswordsReportDesc",route:"weak-passwords-report",icon:'\n \n \n \n \n \n \n ',requiresPremium:!0},unsecuredWebsites:{title:"unsecuredWebsitesReport",description:"unsecuredWebsitesReportDesc",route:"unsecured-websites-report",icon:'\n \n \n \n \n \n \n \n \n ',requiresPremium:!0},inactive2fa:{title:"inactive2faReport",description:"inactive2faReportDesc",route:"inactive-two-factor-report",icon:'\n \n \n \n \n \n \n ',requiresPremium:!0},dataBreach:{title:"dataBreachReport",description:"breachDesc",route:"breach-report",icon:'\n \n \n \n \n \n \n \n \n \n \n ',requiresPremium:!1}};class v{constructor(e,t,n){this.stateService=e,this.messagingService=t,this.sanitizer=n}ngOnInit(){return i(this,void 0,void 0,(function*(){this.report=h[this.type],this.hasPremium=yield this.stateService.getCanAccessPremium()}))}get premium(){return this.report.requiresPremium&&!this.hasPremium}get route(){return this.premium?null:this.report.route}get icon(){return this.sanitizer.bypassSecurityTrustHtml(this.report.icon)}click(){this.premium&&this.messagingService.send("premiumRequired")}}t.ReportCardComponent=v,v.ɵfac=function(e){return new(e||v)(r.ɵɵdirectiveInject(o.StateService),r.ɵɵdirectiveInject(a.MessagingService),r.ɵɵdirectiveInject(s.DomSanitizer))},v.ɵcmp=r.ɵɵdefineComponent({type:v,selectors:[["app-report-card"]],inputs:{type:"type"},decls:24,vars:15,consts:[[1,"tw-border","tw-border-solid","tw-border-secondary-300","tw-rounded","tw-overflow-hidden","tw-h-full","tw-w-72","tw-block","!tw-text-main","hover:tw-no-underline","hover:tw-scale-105","tw-transition-all","focus:tw-outline-none","focus:tw-ring","focus:tw-ring-offset-2","focus:tw-ring-primary-700",3,"routerLink","click"],[1,"tw-relative"],[1,"tw-text-center","tw-h-28","tw-flex","tw-bg-background-alt2","tw-text-primary-300",3,"ngClass"],[1,"tw-m-auto",3,"innerHtml"],[1,"tw-p-5",3,"ngClass"],[1,"tw-text-xl","tw-font-bold","tw-mb-4"],[1,"tw-mb-0"],["bit-badge","","badgeType","success","class","tw-absolute tw-left-2 tw-top-2 tw-leading-none",4,"ngIf"],["bit-badge","","badgeType","success",1,"tw-absolute","tw-left-2","tw-top-2","tw-leading-none"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"a",0),r.ɵɵlistener("click",(function(){return t.click()})),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",2),r.ɵɵtext(5,"\n "),r.ɵɵelement(6,"div",3),r.ɵɵtext(7,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"div",4),r.ɵɵtext(10,"\n "),r.ɵɵelementStart(11,"h3",5),r.ɵɵtext(12),r.ɵɵpipe(13,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(14,"\n "),r.ɵɵelementStart(15,"p",6),r.ɵɵtext(16),r.ɵɵpipe(17,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵtemplate(20,u,3,3,"span",7),r.ɵɵtext(21,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(22,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(23,"\n")),2&e&&(r.ɵɵproperty("routerLink",t.route),r.ɵɵadvance(4),r.ɵɵproperty("ngClass",r.ɵɵpureFunction1(11,m,t.premium)),r.ɵɵadvance(2),r.ɵɵproperty("innerHtml",t.icon,r.ɵɵsanitizeHtml),r.ɵɵadvance(3),r.ɵɵproperty("ngClass",r.ɵɵpureFunction1(13,m,t.report.requiresPremium)),r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(13,7,t.report.title)),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(17,9,t.report.description)),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",t.premium))},directives:[l.RouterLinkWithHref,c.NgClass,c.NgIf,d.BadgeComponent],pipes:[p.I18nPipe],encapsulation:2})},9539:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReportListComponent=void 0;const i=n(50702),r=n(32621),o=n(57490),a=n(50702),s=n(99729);function l(e,t){if(1&e&&(r.ɵɵelementStart(0,"div"),r.ɵɵtext(1,"\n "),r.ɵɵelement(2,"app-report-card",3),r.ɵɵtext(3,"\n "),r.ɵɵelementEnd()),2&e){const e=t.$implicit;r.ɵɵadvance(2),r.ɵɵproperty("type",e)}}class c{constructor(){this.reports=[i.ReportTypes.exposedPasswords,i.ReportTypes.reusedPasswords,i.ReportTypes.weakPasswords,i.ReportTypes.unsecuredWebsites,i.ReportTypes.inactive2fa,i.ReportTypes.dataBreach]}}t.ReportListComponent=c,c.ɵfac=function(e){return new(e||c)},c.ɵcmp=r.ɵɵdefineComponent({type:c,selectors:[["app-report-list"]],decls:16,vars:7,consts:[[1,"page-header"],[1,"tw-inline-grid","tw-grid-cols-3","tw-gap-4"],[4,"ngFor","ngForOf"],[3,"type"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"h1"),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(6,"\n\n"),r.ɵɵelementStart(7,"p"),r.ɵɵtext(8),r.ɵɵpipe(9,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(10,"\n\n"),r.ɵɵelementStart(11,"div",1),r.ɵɵtext(12,"\n "),r.ɵɵtemplate(13,l,4,1,"div",2),r.ɵɵtext(14,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(15,"\n")),2&e&&(r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(4,3,"reports")),r.ɵɵadvance(5),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(9,5,"reportsDesc")),r.ɵɵadvance(5),r.ɵɵproperty("ngForOf",t.reports))},directives:[o.NgForOf,a.ReportCardComponent],pipes:[s.I18nPipe],encapsulation:2})},26627:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReportsRoutingModule=void 0;const i=n(68012),r=n(76299),o=n(80446),a=n(8489),s=n(66916),l=n(9539),c=n(8351),d=n(99997),p=n(51948),u=n(64021),m=n(32621),h=(n(68012),[{path:"",component:c.ReportsComponent,canActivate:[r.AuthGuard],children:[{path:"",pathMatch:"full",component:l.ReportListComponent,data:{homepage:!0}},{path:"breach-report",component:o.BreachReportComponent,data:{titleId:"dataBreachReport"}},{path:"reused-passwords-report",component:d.ReusedPasswordsReportComponent,data:{titleId:"reusedPasswordsReport"}},{path:"unsecured-websites-report",component:p.UnsecuredWebsitesReportComponent,data:{titleId:"unsecuredWebsitesReport"}},{path:"weak-passwords-report",component:u.WeakPasswordsReportComponent,data:{titleId:"weakPasswordsReport"}},{path:"exposed-passwords-report",component:a.ExposedPasswordsReportComponent,data:{titleId:"exposedPasswordsReport"}},{path:"inactive-two-factor-report",component:s.InactiveTwoFactorReportComponent,data:{titleId:"inactive2faReport"}}]}]);class v{}t.ReportsRoutingModule=v,v.ɵfac=function(e){return new(e||v)},v.ɵmod=m.ɵɵdefineNgModule({type:v}),v.ɵinj=m.ɵɵdefineInjector({imports:[[i.RouterModule.forChild(h)],i.RouterModule]})},8351:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReportsComponent=void 0;const i=n(68012),r=n(14857),o=n(32621),a=n(68012),s=n(57490),l=n(52767),c=n(99729);function d(e,t){1&e&&(o.ɵɵelementStart(0,"a",4),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",5),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,1,"backToReports"),"\n "))}class p{constructor(e){this.homepage=!0,this.subscription=e.events.pipe(r.filter((e=>e instanceof i.NavigationEnd))).subscribe((e=>{this.homepage="/reports"==e.url}))}ngOnDestroy(){var e;null===(e=this.subscription)||void 0===e||e.unsubscribe()}}t.ReportsComponent=p,p.ɵfac=function(e){return new(e||p)(o.ɵɵdirectiveInject(a.Router))},p.ɵcmp=o.ɵɵdefineComponent({type:p,selectors:[["app-reports"]],decls:13,vars:1,consts:[[1,"container","page-content"],[1,"row","mt-4"],[1,"col"],["bit-button","","routerLink","./",4,"ngIf"],["bit-button","","routerLink","./"],["aria-hidden","true",1,"bwi","bwi-angle-left"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"router-outlet"),o.ɵɵtext(3,"\n\n "),o.ɵɵelementStart(4,"div",1),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",2),o.ɵɵtext(7,"\n "),o.ɵɵtemplate(8,d,5,3,"a",3),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n")),2&e&&(o.ɵɵadvance(8),o.ɵɵproperty("ngIf",!t.homepage))},directives:[a.RouterOutlet,s.NgIf,l.ButtonComponent,a.RouterLinkWithHref],pipes:[c.I18nPipe],encapsulation:2})},99997:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ReusedPasswordsReportComponent=void 0;n(64684),n(45330),n(45552),n(44809),n(73569);const r=n(32773),o=n(84507),a=n(32621),s=n(45330),l=n(64684),c=n(45552),d=n(73569),p=n(44809),u=n(57490),m=n(51626),h=n(18310),v=n(1142),f=n(39159),g=n(99729);function y(e,t){1&e&&(a.ɵɵelementStart(0,"small"),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",4),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",5),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"loading")))}function x(e,t){1&e&&(a.ɵɵelementStart(0,"div"),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",4),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",5),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"loading")))}function S(e,t){1&e&&(a.ɵɵelementStart(0,"app-callout",8),a.ɵɵpipe(1,"i18n"),a.ɵɵtext(2),a.ɵɵpipe(3,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(1,2,"goodNews")),a.ɵɵadvance(2),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(3,4,"noReusedPasswords"),"\n "))}function b(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"a",19),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);const t=a.ɵɵnextContext().$implicit;return a.ɵɵnextContext(3).selectCipher(t)})),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementContainerEnd()}if(2&e){const e=a.ɵɵnextContext().$implicit;a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"editItem")),a.ɵɵadvance(2),a.ɵɵtextInterpolate(e.name)}}function w(e,t){if(1&e&&(a.ɵɵtext(0,"\n "),a.ɵɵelementStart(1,"span"),a.ɵɵtext(2),a.ɵɵelementEnd(),a.ɵɵtext(3,"\n ")),2&e){const e=a.ɵɵnextContext().$implicit;a.ɵɵadvance(2),a.ɵɵtextInterpolate(e.name)}}function C(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",20),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",5),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementContainerEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"shared")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"shared")))}function I(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",21),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",5),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementContainerEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"attachments")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"attachments")))}function E(e,t){if(1&e&&(a.ɵɵelementStart(0,"tr"),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"td",12),a.ɵɵtext(3,"\n "),a.ɵɵelement(4,"app-vault-icon",13),a.ɵɵtext(5,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"td",14),a.ɵɵtext(8,"\n "),a.ɵɵtemplate(9,b,6,4,"ng-container",15),a.ɵɵtext(10,"\n "),a.ɵɵtemplate(11,w,4,1,"ng-template",null,16,a.ɵɵtemplateRefExtractor),a.ɵɵtext(13,"\n "),a.ɵɵtemplate(14,C,9,6,"ng-container",1),a.ɵɵtext(15,"\n "),a.ɵɵtemplate(16,I,9,6,"ng-container",1),a.ɵɵtext(17,"\n "),a.ɵɵelement(18,"br"),a.ɵɵtext(19,"\n "),a.ɵɵelementStart(20,"small"),a.ɵɵtext(21),a.ɵɵelementEnd(),a.ɵɵtext(22,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(23,"\n "),a.ɵɵelementStart(24,"td",17),a.ɵɵtext(25,"\n "),a.ɵɵelementStart(26,"span",18),a.ɵɵtext(27),a.ɵɵpipe(28,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(29,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(30,"\n "),a.ɵɵelementEnd()),2&e){const e=t.$implicit,n=a.ɵɵreference(12),i=a.ɵɵnextContext(3);a.ɵɵadvance(4),a.ɵɵproperty("cipher",e),a.ɵɵadvance(5),a.ɵɵproperty("ngIf",!i.organization||i.canManageCipher(e))("ngIfElse",n),a.ɵɵadvance(5),a.ɵɵproperty("ngIf",!i.organization&&e.organizationId),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.hasAttachments),a.ɵɵadvance(5),a.ɵɵtextInterpolate(e.subTitle),a.ɵɵadvance(6),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind2(28,7,"reusedXTimes",i.passwordUseMap.get(e.login.password)),"\n ")}}function P(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"app-callout",9),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4),a.ɵɵpipe(5,"i18n"),a.ɵɵpipe(6,"number"),a.ɵɵelementEnd(),a.ɵɵtext(7,"\n "),a.ɵɵelementStart(8,"table",10),a.ɵɵtext(9,"\n "),a.ɵɵelementStart(10,"tbody"),a.ɵɵtext(11,"\n "),a.ɵɵtemplate(12,E,31,10,"tr",11),a.ɵɵtext(13,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(15,"\n "),a.ɵɵelementContainerEnd()),2&e){const e=a.ɵɵnextContext(2);a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,3,"reusedPasswordsFound")),a.ɵɵadvance(2),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind2(5,5,"reusedPasswordsFoundDesc",a.ɵɵpipeBind1(6,8,e.ciphers.length)),"\n "),a.ɵɵadvance(8),a.ɵɵproperty("ngForOf",e.ciphers)}}function O(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",6),a.ɵɵtext(1,"\n "),a.ɵɵtemplate(2,S,4,6,"app-callout",7),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,P,16,10,"ng-container",1),a.ɵɵtext(5,"\n"),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext();a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!e.ciphers.length),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.ciphers.length)}}function k(e,t){}class A extends o.CipherReportComponent{constructor(e,t,n,i,r){super(t,n,!0,i,r),this.cipherService=e}ngOnInit(){const e=Object.create(null,{load:{get:()=>super.load}});return i(this,void 0,void 0,(function*(){(yield this.checkAccess())&&(yield e.load.call(this))}))}setCiphers(){return i(this,void 0,void 0,(function*(){const e=yield this.getAllCiphers(),t=[];this.passwordUseMap=new Map,e.forEach((e=>{e.type!==r.CipherType.Login||null==e.login.password||""===e.login.password||e.isDeleted||(t.push(e),this.passwordUseMap.has(e.login.password)?this.passwordUseMap.set(e.login.password,this.passwordUseMap.get(e.login.password)+1):this.passwordUseMap.set(e.login.password,1))}));const n=t.filter((e=>this.passwordUseMap.has(e.login.password)&&this.passwordUseMap.get(e.login.password)>1));this.ciphers=n}))}getAllCiphers(){return this.cipherService.getAllDecrypted()}canManageCipher(e){return!0}}t.ReusedPasswordsReportComponent=A,A.ɵfac=function(e){return new(e||A)(a.ɵɵdirectiveInject(s.CipherService),a.ɵɵdirectiveInject(l.ModalService),a.ɵɵdirectiveInject(c.MessagingService),a.ɵɵdirectiveInject(d.StateService),a.ɵɵdirectiveInject(p.PasswordRepromptService))},A.ɵcmp=a.ɵɵdefineComponent({type:A,selectors:[["app-reused-passwords-report"]],features:[a.ɵɵInheritDefinitionFeature],decls:20,vars:9,consts:[[1,"page-header"],[4,"ngIf"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],[4,"ngIf","ngIfElse"],["cantManage",""],[1,"text-right"],[1,"badge","badge-warning"],["href","#","appStopClick","",3,"title","click"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-collection",3,"title"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-paperclip",3,"title"]],template:function(e,t){1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"h1"),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵtemplate(5,y,9,6,"small",1),a.ɵɵtext(6,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(7,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n"),a.ɵɵelementStart(9,"p"),a.ɵɵtext(10),a.ɵɵpipe(11,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n"),a.ɵɵtemplate(13,x,9,6,"div",1),a.ɵɵtext(14,"\n"),a.ɵɵtemplate(15,O,6,2,"div",2),a.ɵɵtext(16,"\n"),a.ɵɵtemplate(17,k,0,0,"ng-template",null,3,a.ɵɵtemplateRefExtractor),a.ɵɵtext(19,"\n")),2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,5,"reusedPasswordsReport"),"\n "),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.hasLoaded&&t.loading),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(11,7,"reusedPasswordsReportDesc")),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",!t.hasLoaded&&t.loading),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.hasLoaded))},directives:[u.NgIf,m.CalloutComponent,u.NgForOf,h.IconComponent,v.StopClickDirective,f.StopPropDirective],pipes:[g.I18nPipe,u.DecimalPipe],encapsulation:2})},51948:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UnsecuredWebsitesReportComponent=void 0;n(64684),n(45330),n(45552),n(44809),n(73569);const r=n(32773),o=n(84507),a=n(32621),s=n(45330),l=n(64684),c=n(45552),d=n(73569),p=n(44809),u=n(57490),m=n(51626),h=n(18310),v=n(1142),f=n(39159),g=n(99729);function y(e,t){1&e&&(a.ɵɵelementStart(0,"small"),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",4),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",5),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"loading")))}function x(e,t){1&e&&(a.ɵɵelementStart(0,"div"),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",4),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",5),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"loading")))}function S(e,t){1&e&&(a.ɵɵelementStart(0,"app-callout",8),a.ɵɵpipe(1,"i18n"),a.ɵɵtext(2),a.ɵɵpipe(3,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(1,2,"goodNews")),a.ɵɵadvance(2),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(3,4,"noUnsecuredWebsites"),"\n "))}function b(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",16),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",5),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementContainerEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"shared")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"shared")))}function w(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",17),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",5),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementContainerEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"attachments")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"attachments")))}function C(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"tr"),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"td",12),a.ɵɵtext(3,"\n "),a.ɵɵelement(4,"app-vault-icon",13),a.ɵɵtext(5,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"td",14),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"a",15),a.ɵɵlistener("click",(function(){const t=a.ɵɵrestoreView(e).$implicit;return a.ɵɵnextContext(3).selectCipher(t)})),a.ɵɵpipe(10,"i18n"),a.ɵɵtext(11),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n "),a.ɵɵtemplate(13,b,9,6,"ng-container",1),a.ɵɵtext(14,"\n "),a.ɵɵtemplate(15,w,9,6,"ng-container",1),a.ɵɵtext(16,"\n "),a.ɵɵelement(17,"br"),a.ɵɵtext(18,"\n "),a.ɵɵelementStart(19,"small"),a.ɵɵtext(20),a.ɵɵelementEnd(),a.ɵɵtext(21,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(22,"\n "),a.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=a.ɵɵnextContext(3);a.ɵɵadvance(4),a.ɵɵproperty("cipher",e),a.ɵɵadvance(5),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(10,6,"editItem")),a.ɵɵadvance(2),a.ɵɵtextInterpolate(e.name),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!n.organization&&e.organizationId),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.hasAttachments),a.ɵɵadvance(5),a.ɵɵtextInterpolate(e.subTitle)}}function I(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"app-callout",9),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4),a.ɵɵpipe(5,"i18n"),a.ɵɵpipe(6,"number"),a.ɵɵelementEnd(),a.ɵɵtext(7,"\n "),a.ɵɵelementStart(8,"table",10),a.ɵɵtext(9,"\n "),a.ɵɵelementStart(10,"tbody"),a.ɵɵtext(11,"\n "),a.ɵɵtemplate(12,C,23,8,"tr",11),a.ɵɵtext(13,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(15,"\n "),a.ɵɵelementContainerEnd()),2&e){const e=a.ɵɵnextContext(2);a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,3,"unsecuredWebsitesFound")),a.ɵɵadvance(2),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind2(5,5,"unsecuredWebsitesFoundDesc",a.ɵɵpipeBind1(6,8,e.ciphers.length)),"\n "),a.ɵɵadvance(8),a.ɵɵproperty("ngForOf",e.ciphers)}}function E(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",6),a.ɵɵtext(1,"\n "),a.ɵɵtemplate(2,S,4,6,"app-callout",7),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,I,16,10,"ng-container",1),a.ɵɵtext(5,"\n"),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext();a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!e.ciphers.length),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.ciphers.length)}}function P(e,t){}class O extends o.CipherReportComponent{constructor(e,t,n,i,r){super(t,n,!0,i,r),this.cipherService=e}ngOnInit(){const e=Object.create(null,{load:{get:()=>super.load}});return i(this,void 0,void 0,(function*(){(yield this.checkAccess())&&(yield e.load.call(this))}))}setCiphers(){return i(this,void 0,void 0,(function*(){const e=(yield this.getAllCiphers()).filter((e=>!(e.type!==r.CipherType.Login||!e.login.hasUris||e.isDeleted)&&e.login.uris.some((e=>null!=e.uri&&0===e.uri.indexOf("http://")))));this.ciphers=e}))}getAllCiphers(){return this.cipherService.getAllDecrypted()}}t.UnsecuredWebsitesReportComponent=O,O.ɵfac=function(e){return new(e||O)(a.ɵɵdirectiveInject(s.CipherService),a.ɵɵdirectiveInject(l.ModalService),a.ɵɵdirectiveInject(c.MessagingService),a.ɵɵdirectiveInject(d.StateService),a.ɵɵdirectiveInject(p.PasswordRepromptService))},O.ɵcmp=a.ɵɵdefineComponent({type:O,selectors:[["app-unsecured-websites-report"]],features:[a.ɵɵInheritDefinitionFeature],decls:20,vars:9,consts:[[1,"page-header"],[4,"ngIf"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],["href","#","appStopClick","",3,"title","click"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-collection",3,"title"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-paperclip",3,"title"]],template:function(e,t){1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"h1"),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵtemplate(5,y,9,6,"small",1),a.ɵɵtext(6,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(7,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n"),a.ɵɵelementStart(9,"p"),a.ɵɵtext(10),a.ɵɵpipe(11,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n"),a.ɵɵtemplate(13,x,9,6,"div",1),a.ɵɵtext(14,"\n"),a.ɵɵtemplate(15,E,6,2,"div",2),a.ɵɵtext(16,"\n"),a.ɵɵtemplate(17,P,0,0,"ng-template",null,3,a.ɵɵtemplateRefExtractor),a.ɵɵtext(19,"\n")),2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,5,"unsecuredWebsitesReport"),"\n "),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.hasLoaded&&t.loading),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(11,7,"unsecuredWebsitesReportDesc")),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",!t.hasLoaded&&t.loading),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.hasLoaded))},directives:[u.NgIf,m.CalloutComponent,u.NgForOf,h.IconComponent,v.StopClickDirective,f.StopPropDirective],pipes:[g.I18nPipe,u.DecimalPipe],encapsulation:2})},64021:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.WeakPasswordsReportComponent=void 0;n(64684),n(45330),n(45552),n(84275),n(44809),n(73569);const r=n(32773),o=n(84507),a=n(32621),s=n(45330),l=n(84275),c=n(64684),d=n(45552),p=n(73569),u=n(44809),m=n(57490),h=n(51626),v=n(18310),f=n(1142),g=n(39159),y=n(99729);function x(e,t){1&e&&(a.ɵɵelementStart(0,"small"),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",4),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",5),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"loading")))}function S(e,t){1&e&&(a.ɵɵelementStart(0,"div"),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",4),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",5),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"loading")))}function b(e,t){1&e&&(a.ɵɵelementStart(0,"app-callout",8),a.ɵɵpipe(1,"i18n"),a.ɵɵtext(2),a.ɵɵpipe(3,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(1,2,"goodNews")),a.ɵɵadvance(2),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(3,4,"noWeakPasswords"),"\n "))}function w(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"a",18),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);const t=a.ɵɵnextContext().$implicit;return a.ɵɵnextContext(3).selectCipher(t)})),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementContainerEnd()}if(2&e){const e=a.ɵɵnextContext().$implicit;a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"editItem")),a.ɵɵadvance(2),a.ɵɵtextInterpolate(e.name)}}function C(e,t){if(1&e&&(a.ɵɵtext(0,"\n "),a.ɵɵelementStart(1,"span"),a.ɵɵtext(2),a.ɵɵelementEnd(),a.ɵɵtext(3,"\n ")),2&e){const e=a.ɵɵnextContext().$implicit;a.ɵɵadvance(2),a.ɵɵtextInterpolate(e.name)}}function I(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",19),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",5),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementContainerEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"shared")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"shared")))}function E(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",20),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",5),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementContainerEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"attachments")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"attachments")))}function P(e,t){if(1&e&&(a.ɵɵelementStart(0,"tr"),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"td",12),a.ɵɵtext(3,"\n "),a.ɵɵelement(4,"app-vault-icon",13),a.ɵɵtext(5,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"td",14),a.ɵɵtext(8,"\n "),a.ɵɵtemplate(9,w,6,4,"ng-container",15),a.ɵɵtext(10,"\n "),a.ɵɵtemplate(11,C,4,1,"ng-template",null,16,a.ɵɵtemplateRefExtractor),a.ɵɵtext(13,"\n "),a.ɵɵtemplate(14,I,9,6,"ng-container",1),a.ɵɵtext(15,"\n "),a.ɵɵtemplate(16,E,9,6,"ng-container",1),a.ɵɵtext(17,"\n "),a.ɵɵelement(18,"br"),a.ɵɵtext(19,"\n "),a.ɵɵelementStart(20,"small"),a.ɵɵtext(21),a.ɵɵelementEnd(),a.ɵɵtext(22,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(23,"\n "),a.ɵɵelementStart(24,"td",17),a.ɵɵtext(25,"\n "),a.ɵɵelementStart(26,"span"),a.ɵɵtext(27),a.ɵɵpipe(28,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(29,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(30,"\n "),a.ɵɵelementEnd()),2&e){const e=t.$implicit,n=a.ɵɵreference(12),i=a.ɵɵnextContext(3);a.ɵɵadvance(4),a.ɵɵproperty("cipher",e),a.ɵɵadvance(5),a.ɵɵproperty("ngIf",!i.organization||i.canManageCipher(e))("ngIfElse",n),a.ɵɵadvance(5),a.ɵɵproperty("ngIf",!i.organization&&e.organizationId),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.hasAttachments),a.ɵɵadvance(5),a.ɵɵtextInterpolate(e.subTitle),a.ɵɵadvance(5),a.ɵɵclassMapInterpolate1("badge badge-",i.passwordStrengthMap.get(e.id)[1],""),a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(28,10,i.passwordStrengthMap.get(e.id)[0]),"\n ")}}function O(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"app-callout",9),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4),a.ɵɵpipe(5,"i18n"),a.ɵɵpipe(6,"number"),a.ɵɵelementEnd(),a.ɵɵtext(7,"\n "),a.ɵɵelementStart(8,"table",10),a.ɵɵtext(9,"\n "),a.ɵɵelementStart(10,"tbody"),a.ɵɵtext(11,"\n "),a.ɵɵtemplate(12,P,31,12,"tr",11),a.ɵɵtext(13,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(15,"\n "),a.ɵɵelementContainerEnd()),2&e){const e=a.ɵɵnextContext(2);a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,3,"weakPasswordsFound")),a.ɵɵadvance(2),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind2(5,5,"weakPasswordsFoundDesc",a.ɵɵpipeBind1(6,8,e.ciphers.length)),"\n "),a.ɵɵadvance(8),a.ɵɵproperty("ngForOf",e.ciphers)}}function k(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",6),a.ɵɵtext(1,"\n "),a.ɵɵtemplate(2,b,4,6,"app-callout",7),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,O,16,10,"ng-container",1),a.ɵɵtext(5,"\n"),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext();a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!e.ciphers.length),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.ciphers.length)}}function A(e,t){}class T extends o.CipherReportComponent{constructor(e,t,n,i,r,o){super(n,i,!0,r,o),this.cipherService=e,this.passwordGenerationService=t,this.passwordStrengthMap=new Map,this.passwordStrengthCache=new Map}ngOnInit(){const e=Object.create(null,{load:{get:()=>super.load}});return i(this,void 0,void 0,(function*(){(yield this.checkAccess())&&(yield e.load.call(this))}))}setCiphers(){return i(this,void 0,void 0,(function*(){const e=yield this.getAllCiphers(),t=[],n=e=>null!=e.login.username&&""!==e.login.username.trim(),i=e=>e.login.password+"_____"+(n(e)?e.login.username:"");e.forEach((e=>{if(e.type!==r.CipherType.Login||null==e.login.password||""===e.login.password||e.isDeleted)return;const o=n(e),a=i(e);if(!this.passwordStrengthCache.has(a)){let t=[];if(o){const n=e.login.username.indexOf("@");t=n>-1?t.concat(e.login.username.substr(0,n).trim().toLowerCase().split(/[^A-Za-z0-9]/)).filter((e=>e.length>=3)):e.login.username.trim().toLowerCase().split(/[^A-Za-z0-9]/).filter((e=>e.length>=3))}const n=this.passwordGenerationService.passwordStrength(e.login.password,t.length>0?t:null);this.passwordStrengthCache.set(a,n.score)}const s=this.passwordStrengthCache.get(a);null!=s&&s<=2&&(this.passwordStrengthMap.set(e.id,this.scoreKey(s)),t.push(e))})),t.sort(((e,t)=>this.passwordStrengthCache.get(i(e))-this.passwordStrengthCache.get(i(t)))),this.ciphers=t}))}getAllCiphers(){return this.cipherService.getAllDecrypted()}canManageCipher(e){return!0}scoreKey(e){switch(e){case 4:return["strong","success"];case 3:return["good","primary"];case 2:return["weak","warning"];default:return["veryWeak","danger"]}}}t.WeakPasswordsReportComponent=T,T.ɵfac=function(e){return new(e||T)(a.ɵɵdirectiveInject(s.CipherService),a.ɵɵdirectiveInject(l.PasswordGenerationService),a.ɵɵdirectiveInject(c.ModalService),a.ɵɵdirectiveInject(d.MessagingService),a.ɵɵdirectiveInject(p.StateService),a.ɵɵdirectiveInject(u.PasswordRepromptService))},T.ɵcmp=a.ɵɵdefineComponent({type:T,selectors:[["app-weak-passwords-report"]],features:[a.ɵɵInheritDefinitionFeature],decls:20,vars:9,consts:[[1,"page-header"],[4,"ngIf"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],[4,"ngIf","ngIfElse"],["cantManage",""],[1,"text-right"],["href","#","appStopClick","",3,"title","click"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-collection",3,"title"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-paperclip",3,"title"]],template:function(e,t){1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"h1"),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵtemplate(5,x,9,6,"small",1),a.ɵɵtext(6,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(7,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n"),a.ɵɵelementStart(9,"p"),a.ɵɵtext(10),a.ɵɵpipe(11,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n"),a.ɵɵtemplate(13,S,9,6,"div",1),a.ɵɵtext(14,"\n"),a.ɵɵtemplate(15,k,6,2,"div",2),a.ɵɵtext(16,"\n"),a.ɵɵtemplate(17,A,0,0,"ng-template",null,3,a.ɵɵtemplateRefExtractor),a.ɵɵtext(19,"\n")),2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,5,"weakPasswordsReport"),"\n "),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.hasLoaded&&t.loading),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(11,7,"weakPasswordsReportDesc")),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",!t.hasLoaded&&t.loading),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.hasLoaded))},directives:[m.NgIf,h.CalloutComponent,m.NgForOf,v.IconComponent,f.StopClickDirective,g.StopPropDirective],pipes:[y.I18nPipe,m.DecimalPipe],encapsulation:2})},78482:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AccessComponent=void 0;n(68012),n(91674),n(85714),n(1659),n(51554),n(73828);const r=n(20971),o=n(70149),a=n(82769),s=n(95708),l=n(74012),c=n(33018),d=n(32621),p=n(51554),u=n(1659),m=n(91674),h=n(73828),v=n(68012),f=n(85714),g=n(96832),y=n(56820),x=n(57490),S=n(51626),b=n(48198),w=n(45728),C=n(99729);function I(e,t){if(1&e&&(d.ɵɵelementStart(0,"div",16),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"p"),d.ɵɵtext(3),d.ɵɵpipe(4,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(5,"\n "),d.ɵɵelementEnd()),2&e){const e=d.ɵɵnextContext();d.ɵɵadvance(3),d.ɵɵtextInterpolate(d.ɵɵpipeBind2(4,1,"sendCreatorIdentifier",e.creatorIdentifier))}}function E(e,t){1&e&&(d.ɵɵelementStart(0,"div",17),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"app-callout",18),d.ɵɵpipe(3,"i18n"),d.ɵɵtext(4),d.ɵɵpipe(5,"i18n"),d.ɵɵelementStart(6,"a",19),d.ɵɵtext(7),d.ɵɵpipe(8,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(9,".\n "),d.ɵɵelementEnd(),d.ɵɵtext(10,"\n "),d.ɵɵelementEnd()),2&e&&(d.ɵɵadvance(2),d.ɵɵpropertyInterpolate("title",d.ɵɵpipeBind1(3,3,"warning")),d.ɵɵadvance(2),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(5,5,"viewSendHiddenEmailWarning"),"\n "),d.ɵɵadvance(3),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(8,7,"learnMore")))}function P(e,t){1&e&&(d.ɵɵelementStart(0,"div",20),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"i",21),d.ɵɵpipe(3,"i18n"),d.ɵɵtext(4,"\n "),d.ɵɵelementStart(5,"span",22),d.ɵɵtext(6),d.ɵɵpipe(7,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(8,"\n "),d.ɵɵelementEnd()),2&e&&(d.ɵɵadvance(2),d.ɵɵpropertyInterpolate("title",d.ɵɵpipeBind1(3,2,"loading")),d.ɵɵadvance(4),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(7,4,"loading")))}function O(e,t){if(1&e){const e=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"div",23),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"p"),d.ɵɵtext(3),d.ɵɵpipe(4,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(5,"\n "),d.ɵɵelementStart(6,"p"),d.ɵɵtext(7),d.ɵɵpipe(8,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(9,"\n "),d.ɵɵelementStart(10,"div",24),d.ɵɵtext(11,"\n "),d.ɵɵelementStart(12,"label",25),d.ɵɵtext(13),d.ɵɵpipe(14,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(15,"\n "),d.ɵɵelementStart(16,"input",26),d.ɵɵlistener("ngModelChange",(function(t){d.ɵɵrestoreView(e);return d.ɵɵnextContext().password=t})),d.ɵɵelementEnd(),d.ɵɵtext(17,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(18,"\n "),d.ɵɵelementStart(19,"div",27),d.ɵɵtext(20,"\n "),d.ɵɵelementStart(21,"button",28),d.ɵɵtext(22,"\n "),d.ɵɵelementStart(23,"span"),d.ɵɵtext(24,"\n "),d.ɵɵelement(25,"i",29),d.ɵɵtext(26),d.ɵɵpipe(27,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(28,"\n "),d.ɵɵelement(29,"i",30),d.ɵɵpipe(30,"i18n"),d.ɵɵtext(31,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(32,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(33,"\n "),d.ɵɵelementEnd()}if(2&e){const e=d.ɵɵnextContext(),t=d.ɵɵreference(1);d.ɵɵadvance(3),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(4,7,"sendProtectedPassword")),d.ɵɵadvance(4),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(8,9,"sendProtectedPasswordDontKnow")),d.ɵɵadvance(6),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(14,11,"password")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",e.password),d.ɵɵadvance(5),d.ɵɵproperty("disabled",t.loading),d.ɵɵadvance(5),d.ɵɵtextInterpolate1(" ",d.ɵɵpipeBind1(27,13,"continue"),"\n "),d.ɵɵadvance(3),d.ɵɵpropertyInterpolate("title",d.ɵɵpipeBind1(30,15,"loading"))}}function k(e,t){1&e&&(d.ɵɵelementStart(0,"div",23),d.ɵɵtext(1),d.ɵɵpipe(2,"i18n"),d.ɵɵelementEnd()),2&e&&(d.ɵɵadvance(1),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(2,1,"sendAccessUnavailable"),"\n "))}function A(e,t){1&e&&(d.ɵɵelementStart(0,"div",23),d.ɵɵtext(1),d.ɵɵpipe(2,"i18n"),d.ɵɵelementEnd()),2&e&&(d.ɵɵadvance(1),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(2,1,"unexpectedError"),"\n "))}function T(e,t){1&e&&(d.ɵɵelementStart(0,"app-callout",38),d.ɵɵtext(1),d.ɵɵpipe(2,"i18n"),d.ɵɵelementEnd()),2&e&&(d.ɵɵadvance(1),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(2,1,"sendHiddenByDefault")))}const M=function(e,t){return{"bwi-eye":e,"bwi-eye-slash":t}};function B(e,t){if(1&e){const e=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"button",36),d.ɵɵlistener("click",(function(){d.ɵɵrestoreView(e);return d.ɵɵnextContext(3).toggleText()})),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"i",39),d.ɵɵtext(3),d.ɵɵpipe(4,"i18n"),d.ɵɵelementEnd()}if(2&e){const e=d.ɵɵnextContext(3);d.ɵɵadvance(2),d.ɵɵproperty("ngClass",d.ɵɵpureFunction2(4,M,!e.showText,e.showText)),d.ɵɵadvance(1),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(4,2,"toggleVisibility"),"\n ")}}function D(e,t){if(1&e){const e=d.ɵɵgetCurrentView();d.ɵɵelementContainerStart(0),d.ɵɵtext(1,"\n "),d.ɵɵtemplate(2,T,3,3,"app-callout",33),d.ɵɵtext(3,"\n "),d.ɵɵelementStart(4,"div",24),d.ɵɵtext(5,"\n "),d.ɵɵelementStart(6,"textarea",34),d.ɵɵlistener("ngModelChange",(function(t){d.ɵɵrestoreView(e);return d.ɵɵnextContext(2).sendText=t})),d.ɵɵelementEnd(),d.ɵɵtext(7,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(8,"\n "),d.ɵɵtemplate(9,B,5,7,"button",35),d.ɵɵtext(10,"\n "),d.ɵɵelementStart(11,"button",36),d.ɵɵlistener("click",(function(){d.ɵɵrestoreView(e);return d.ɵɵnextContext(2).copyText()})),d.ɵɵtext(12,"\n "),d.ɵɵelement(13,"i",37),d.ɵɵtext(14),d.ɵɵpipe(15,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(16,"\n "),d.ɵɵelementContainerEnd()}if(2&e){const e=d.ɵɵnextContext(2);d.ɵɵadvance(2),d.ɵɵproperty("ngIf",e.send.text.hidden),d.ɵɵadvance(4),d.ɵɵproperty("ngModel",e.sendText),d.ɵɵadvance(3),d.ɵɵproperty("ngIf",e.send.text.hidden),d.ɵɵadvance(5),d.ɵɵtextInterpolate1(" ",d.ɵɵpipeBind1(15,4,"copyValue"),"\n ")}}function R(e,t){if(1&e){const e=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"button",42),d.ɵɵlistener("click",(function(){d.ɵɵrestoreView(e);return d.ɵɵnextContext(3).download()})),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"i",43),d.ɵɵtext(3),d.ɵɵpipe(4,"i18n"),d.ɵɵelementEnd()}if(2&e){const e=d.ɵɵnextContext(3);d.ɵɵadvance(3),d.ɵɵtextInterpolate2("\n ",d.ɵɵpipeBind1(4,2,"downloadFile")," (",e.send.file.sizeName,")\n ")}}function F(e,t){1&e&&(d.ɵɵelementStart(0,"button",44),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"i",30),d.ɵɵpipe(3,"i18n"),d.ɵɵtext(4,"\n "),d.ɵɵelementEnd()),2&e&&(d.ɵɵadvance(2),d.ɵɵpropertyInterpolate("title",d.ɵɵpipeBind1(3,1,"loading")))}function U(e,t){if(1&e&&(d.ɵɵelementContainerStart(0),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"p"),d.ɵɵtext(3),d.ɵɵelementEnd(),d.ɵɵtext(4,"\n "),d.ɵɵtemplate(5,R,5,4,"button",40),d.ɵɵtext(6,"\n "),d.ɵɵtemplate(7,F,5,3,"button",41),d.ɵɵtext(8,"\n "),d.ɵɵelementContainerEnd()),2&e){const e=d.ɵɵnextContext(2);d.ɵɵadvance(3),d.ɵɵtextInterpolate(e.send.file.fileName),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",!e.downloading),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",e.downloading)}}function V(e,t){if(1&e&&(d.ɵɵelementStart(0,"p",45),d.ɵɵtext(1),d.ɵɵpipe(2,"date"),d.ɵɵelementEnd()),2&e){const e=d.ɵɵnextContext(2);d.ɵɵadvance(1),d.ɵɵtextInterpolate1("\n Expires: ",d.ɵɵpipeBind2(2,1,e.expirationDate,"medium"),"\n ")}}function N(e,t){if(1&e&&(d.ɵɵelementStart(0,"div",23),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"p",20),d.ɵɵtext(3,"\n "),d.ɵɵelementStart(4,"b"),d.ɵɵtext(5),d.ɵɵelementEnd(),d.ɵɵtext(6,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(7,"\n "),d.ɵɵelement(8,"hr"),d.ɵɵtext(9,"\n "),d.ɵɵtext(10,"\n "),d.ɵɵtemplate(11,D,17,6,"ng-container",31),d.ɵɵtext(12,"\n "),d.ɵɵtext(13,"\n "),d.ɵɵtemplate(14,U,9,3,"ng-container",31),d.ɵɵtext(15,"\n "),d.ɵɵtemplate(16,V,3,4,"p",32),d.ɵɵtext(17,"\n "),d.ɵɵelementEnd()),2&e){const e=d.ɵɵnextContext();d.ɵɵadvance(5),d.ɵɵtextInterpolate(e.send.name),d.ɵɵadvance(6),d.ɵɵproperty("ngIf",e.send.type===e.sendType.Text),d.ɵɵadvance(3),d.ɵɵproperty("ngIf",e.send.type===e.sendType.File),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",e.expirationDate)}}class _{constructor(e,t,n,i,r,a){this.i18nService=e,this.cryptoFunctionService=t,this.apiService=n,this.platformUtilsService=i,this.route=r,this.cryptoService=a,this.sendType=o.SendType,this.downloading=!1,this.loading=!0,this.passwordRequired=!1,this.showText=!1,this.unavailable=!1,this.error=!1,this.hideEmail=!1}get sendText(){return null==this.send||null==this.send.text?null:this.showText?this.send.text.text:this.send.text.maskedText}get expirationDate(){return null==this.send||null==this.send.expirationDate?null:this.send.expirationDate}get creatorIdentifier(){return null==this.send||null==this.send.creatorIdentifier?null:this.send.creatorIdentifier}ngOnInit(){this.route.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.id=e.sendId,this.key=e.key,null!=this.key&&null!=this.id&&(yield this.load())}))))}download(){return i(this,void 0,void 0,(function*(){if(null==this.send||null==this.decKey)return;if(this.downloading)return;const e=yield this.apiService.getSendFileDownloadData(this.send,this.accessRequest);if(a.Utils.isNullOrWhitespace(e.url))return void this.platformUtilsService.showToast("error",null,this.i18nService.t("missingSendFile"));this.downloading=!0;const t=yield fetch(new Request(e.url,{cache:"no-store"}));if(200!==t.status)return this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred")),void(this.downloading=!1);try{const e=yield t.arrayBuffer(),n=yield this.cryptoService.decryptFromBytes(e,this.decKey);this.platformUtilsService.saveFile(window,n,null,this.send.file.fileName)}catch(n){this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred"))}this.downloading=!1}))}copyText(){this.platformUtilsService.copyToClipboard(this.send.text.text),this.platformUtilsService.showToast("success",null,this.i18nService.t("valueCopied",this.i18nService.t("sendTypeText")))}toggleText(){this.showText=!this.showText}load(){return i(this,void 0,void 0,(function*(){this.unavailable=!1,this.error=!1,this.hideEmail=!1;const e=a.Utils.fromUrlB64ToArray(this.key);if(this.accessRequest=new l.SendAccessRequest,null!=this.password){const t=yield this.cryptoFunctionService.pbkdf2(this.password,e,"sha256",r.SEND_KDF_ITERATIONS);this.accessRequest.password=a.Utils.fromBufferToB64(t)}try{let t=null;this.loading?t=yield this.apiService.postSendAccess(this.id,this.accessRequest):(this.formPromise=this.apiService.postSendAccess(this.id,this.accessRequest),t=yield this.formPromise),this.passwordRequired=!1;const n=new s.SendAccess(t);this.decKey=yield this.cryptoService.makeSendKey(e),this.send=yield n.decrypt(this.decKey),this.showText=null==this.send.text||!this.send.text.hidden}catch(t){t instanceof c.ErrorResponse&&(401===t.statusCode?this.passwordRequired=!0:404===t.statusCode?this.unavailable=!0:this.error=!0)}this.loading=!1,this.hideEmail=null==this.creatorIdentifier&&!this.passwordRequired&&!this.loading&&!this.unavailable}))}}t.AccessComponent=_,_.ɵfac=function(e){return new(e||_)(d.ɵɵdirectiveInject(p.I18nService),d.ɵɵdirectiveInject(u.CryptoFunctionService),d.ɵɵdirectiveInject(m.ApiService),d.ɵɵdirectiveInject(h.PlatformUtilsService),d.ɵɵdirectiveInject(v.ActivatedRoute),d.ɵɵdirectiveInject(f.CryptoService))},_.ɵcmp=d.ɵɵdefineComponent({type:_,selectors:[["app-send-access"]],decls:55,vars:23,consts:[["ngNativeValidate","",1,"container",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-center","mt-5"],[1,"col-12"],[1,"lead","text-center","mb-4"],["class","col-12 text-center",4,"ngIf"],["class","col-8",4,"ngIf"],[1,"row","justify-content-center"],[1,"col-5"],[1,"card","d-block"],["class","card-body","class","text-center",4,"ngIf"],["class","card-body",4,"ngIf"],[1,"col-12","text-center","mt-5","text-muted"],[1,"mb-0"],["href","https://www.bitwarden.com/products/send?source=web-vault","target","_blank"],["href","https://vault.bitwarden.com/#/register","target","_blank"],[1,"col-12","text-center"],[1,"col-8"],["type","warning",3,"title"],["href","https://bitwarden.com/help/receive-send/","target","_blank"],[1,"text-center"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-2x","text-muted",3,"title"],[1,"sr-only"],[1,"card-body"],[1,"form-group"],["for","password"],["id","password","type","password","name","Password","required","","appInputVerbatim","","appAutofocus","",1,"text-monospace","form-control",3,"ngModel","ngModelChange"],[1,"d-flex"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-sign-in"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[4,"ngIf"],["class","text-center text-muted",4,"ngIf"],["type","tip",4,"ngIf"],["id","text","rows","8","name","Text","readonly","",1,"form-control",3,"ngModel","ngModelChange"],["class","btn btn-block btn-link","type","button",3,"click",4,"ngIf"],["type","button",1,"btn","btn-block","btn-link",3,"click"],["aria-hidden","true",1,"bwi","bwi-copy"],["type","tip"],["aria-hidden","true",1,"bwi","bwi-lg",3,"ngClass"],["class","btn btn-primary btn-block","type","button",3,"click",4,"ngIf"],["class","btn btn-primary btn-block","type","button","disabled","true",4,"ngIf"],["type","button",1,"btn","btn-primary","btn-block",3,"click"],["aria-hidden","true",1,"bwi","bwi-download"],["type","button","disabled","true",1,"btn","btn-primary","btn-block"],[1,"text-center","text-muted"]],template:function(e,t){1&e&&(d.ɵɵelementStart(0,"form",0,1),d.ɵɵlistener("ngSubmit",(function(){return t.load()})),d.ɵɵtext(2,"\n "),d.ɵɵelementStart(3,"div",2),d.ɵɵtext(4,"\n "),d.ɵɵelementStart(5,"div",3),d.ɵɵtext(6,"\n "),d.ɵɵelementStart(7,"p",4),d.ɵɵtext(8,"Bitwarden Send"),d.ɵɵelementEnd(),d.ɵɵtext(9,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(10,"\n "),d.ɵɵtemplate(11,I,6,4,"div",5),d.ɵɵtext(12,"\n "),d.ɵɵtemplate(13,E,11,9,"div",6),d.ɵɵtext(14,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(15,"\n "),d.ɵɵelementStart(16,"div",7),d.ɵɵtext(17,"\n "),d.ɵɵelementStart(18,"div",8),d.ɵɵtext(19,"\n "),d.ɵɵelementStart(20,"div",9),d.ɵɵtext(21,"\n "),d.ɵɵtemplate(22,P,9,6,"div",10),d.ɵɵtext(23,"\n "),d.ɵɵtemplate(24,O,34,17,"div",11),d.ɵɵtext(25,"\n "),d.ɵɵtemplate(26,k,3,3,"div",11),d.ɵɵtext(27,"\n "),d.ɵɵtemplate(28,A,3,3,"div",11),d.ɵɵtext(29,"\n "),d.ɵɵtemplate(30,N,18,4,"div",11),d.ɵɵtext(31,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(32,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(33,"\n "),d.ɵɵelementStart(34,"div",12),d.ɵɵtext(35,"\n "),d.ɵɵelementStart(36,"p",13),d.ɵɵtext(37),d.ɵɵpipe(38,"i18n"),d.ɵɵelement(39,"br"),d.ɵɵtext(40),d.ɵɵpipe(41,"i18n"),d.ɵɵelementStart(42,"a",14),d.ɵɵtext(43,"Bitwarden Send"),d.ɵɵelementEnd(),d.ɵɵtext(44),d.ɵɵpipe(45,"i18n"),d.ɵɵelementStart(46,"a",15),d.ɵɵtext(47),d.ɵɵpipe(48,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(49),d.ɵɵpipe(50,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(51,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(52,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(53,"\n"),d.ɵɵelementEnd(),d.ɵɵtext(54,"\n")),2&e&&(d.ɵɵproperty("appApiAction",t.formPromise),d.ɵɵadvance(11),d.ɵɵproperty("ngIf",null!=t.creatorIdentifier),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",t.hideEmail),d.ɵɵadvance(9),d.ɵɵproperty("ngIf",t.loading),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",!t.loading&&t.passwordRequired),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",!t.loading&&t.unavailable),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",!t.loading&&t.error),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",!t.loading&&!t.passwordRequired&&t.send),d.ɵɵadvance(7),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(38,13,"sendAccessTaglineProductDesc"),""),d.ɵɵadvance(3),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(41,15,"sendAccessTaglineLearnMore"),"\n "),d.ɵɵadvance(4),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(45,17,"sendAccessTaglineOr"),"\n "),d.ɵɵadvance(3),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(48,19,"sendAccessTaglineSignUp")),d.ɵɵadvance(2),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(50,21,"sendAccessTaglineTryToday"),"\n "))},directives:[g.NgControlStatusGroup,g.NgForm,y.ApiActionDirective,x.NgIf,S.CalloutComponent,g.DefaultValueAccessor,g.RequiredValidator,b.InputVerbatimDirective,w.AutofocusDirective,g.NgControlStatus,g.NgModel,x.NgClass],pipes:[C.I18nPipe,x.DatePipe],encapsulation:2})},167:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AddEditComponent=void 0;n(57490);const r=n(83810),o=(n(56071),n(51554),n(36631),n(45552),n(73828),n(62166),n(76532),n(73569),n(32621)),a=n(51554),s=n(73828),l=n(56071),c=n(57490),d=n(76532),p=n(73569),u=n(45552),m=n(62166),h=n(36631),v=n(96832),f=n(56820),g=n(8863),y=n(1142),x=n(70452),S=n(51626),b=n(99729);function w(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"span"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,1,"sendDisabledWarning")))}function C(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"span"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"ul",50),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"li"),o.ɵɵtext(9),o.ɵɵpipe(10,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,2,"sendOptionsPolicyInEffect")),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(10,4,"sendDisableHideEmailInEffect")))}function I(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",25),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"input",52),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(3).send.type=t}))("change",(function(){const t=o.ɵɵrestoreView(e).$implicit;return o.ɵɵnextContext(3).typeChanged(t)})),o.ɵɵelementEnd(),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"label",53),o.ɵɵtext(5),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=o.ɵɵnextContext(3);o.ɵɵadvance(2),o.ɵɵpropertyInterpolate1("name","Type_",e.value,""),o.ɵɵpropertyInterpolate1("id","type_",e.value,""),o.ɵɵproperty("ngModel",n.send.type)("value",e.value)("checked",n.send.type===e.value),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate1("for","type_",e.value,""),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function E(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",16),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",17),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"label"),o.ɵɵtext(5),o.ɵɵpipe(6,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵtemplate(8,I,7,7,"div",51),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(6,2,"whatTypeOfSend")),o.ɵɵadvance(3),o.ɵɵproperty("ngForOf",e.typeOptions)}}function P(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",24),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"label",54),o.ɵɵtext(5),o.ɵɵpipe(6,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"textarea",55),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).send.text.text=t})),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"small",20),o.ɵɵtext(11),o.ɵɵpipe(12,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"div",24),o.ɵɵtext(16,"\n "),o.ɵɵelementStart(17,"div",25),o.ɵɵtext(18,"\n "),o.ɵɵelementStart(19,"input",56),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).send.text.hidden=t})),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"label",57),o.ɵɵtext(22),o.ɵɵpipe(23,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementContainerEnd()}if(2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(6,7,"sendTypeText")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.send.text.text)("readOnly",e.disableSend),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(12,9,"sendTextDesc")),o.ɵɵadvance(8),o.ɵɵproperty("ngModel",e.send.text.hidden)("disabled",e.disableSend),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(23,11,"textHiddenByDefault"))}}function O(e,t){if(1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"strong",58),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext(3);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,3,"file")),o.ɵɵadvance(2),o.ɵɵtextInterpolate2("\n ",e.send.file.fileName," (",e.send.file.sizeName,")\n ")}}function k(e,t){if(1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"label",59),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelement(6,"input",60),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"small",20),o.ɵɵtext(9),o.ɵɵpipe(10,"i18n"),o.ɵɵpipe(11,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext(3);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,4,"file")),o.ɵɵadvance(3),o.ɵɵproperty("disabled",e.disableSend),o.ɵɵadvance(3),o.ɵɵtextInterpolate2("",o.ɵɵpipeBind1(10,6,"sendFileDesc")," ",o.ɵɵpipeBind1(11,8,"maxFileSize"),"")}}function A(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",24),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,O,6,5,"div",15),o.ɵɵtext(5,"\n "),o.ɵɵtemplate(6,k,13,10,"div",15),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(4),o.ɵɵproperty("ngIf",e.editMode),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.editMode)}}function T(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",24),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"label",61),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"input",62),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).link=t})),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,2,"sendLinkLabel")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.link)}}function M(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",17),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"label",63),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"input",64),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).send.accessCount=t})),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,2,"currentAccessCount")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.send.accessCount)}}function B(e,t){1&e&&(o.ɵɵelementStart(0,"label",65),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(2,1,"password")))}function D(e,t){1&e&&(o.ɵɵelementStart(0,"label",65),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(2,1,"newPassword")))}const R=function(e,t){return{"bwi-angle-down":e,"bwi-chevron-up":t}},F=function(e,t){return{"bwi-eye":e,"bwi-eye-slash":t}};function U(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",14),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,w,6,3,"app-callout",15),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,C,13,6,"app-callout",15),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",16),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"div",17),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"label",18),o.ɵɵtext(11),o.ɵɵpipe(12,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"input",19),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().send.name=t})),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"small",20),o.ɵɵtext(17),o.ɵɵpipe(18,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵtemplate(22,E,11,4,"div",21),o.ɵɵtext(23,"\n "),o.ɵɵtext(24,"\n "),o.ɵɵtemplate(25,P,27,13,"ng-container",15),o.ɵɵtext(26,"\n "),o.ɵɵtext(27,"\n "),o.ɵɵtemplate(28,A,9,2,"ng-container",15),o.ɵɵtext(29,"\n "),o.ɵɵelementStart(30,"h3",22),o.ɵɵtext(31),o.ɵɵpipe(32,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(33,"\n "),o.ɵɵtemplate(34,T,8,4,"div",23),o.ɵɵtext(35,"\n "),o.ɵɵelementStart(36,"div",24),o.ɵɵtext(37,"\n "),o.ɵɵelementStart(38,"div",25),o.ɵɵtext(39,"\n "),o.ɵɵelementStart(40,"input",26),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().copyLink=t})),o.ɵɵelementEnd(),o.ɵɵtext(41,"\n "),o.ɵɵelementStart(42,"label",27),o.ɵɵtext(43),o.ɵɵpipe(44,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(45,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(46,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(47,"\n "),o.ɵɵelementStart(48,"div",28),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext().toggleOptions()})),o.ɵɵtext(49,"\n "),o.ɵɵelementStart(50,"h3",29),o.ɵɵtext(51),o.ɵɵpipe(52,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(53,"\n "),o.ɵɵelementStart(54,"a",30),o.ɵɵtext(55,"\n "),o.ɵɵelement(56,"i",31),o.ɵɵtext(57,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(58,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(59,"\n "),o.ɵɵelementStart(60,"div",32),o.ɵɵtext(61,"\n "),o.ɵɵelementStart(62,"app-send-efflux-dates",33),o.ɵɵlistener("datesChanged",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().setDates(t)})),o.ɵɵtext(63,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(64,"\n "),o.ɵɵelementStart(65,"div",16),o.ɵɵtext(66,"\n "),o.ɵɵelementStart(67,"div",17),o.ɵɵtext(68,"\n "),o.ɵɵelementStart(69,"label",34),o.ɵɵtext(70),o.ɵɵpipe(71,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(72,"\n "),o.ɵɵelementStart(73,"input",35),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().send.maxAccessCount=t})),o.ɵɵelementEnd(),o.ɵɵtext(74,"\n "),o.ɵɵelementStart(75,"div",36),o.ɵɵtext(76),o.ɵɵpipe(77,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(78,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(79,"\n "),o.ɵɵtemplate(80,M,8,4,"div",37),o.ɵɵtext(81,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(82,"\n "),o.ɵɵelementStart(83,"div",16),o.ɵɵtext(84,"\n "),o.ɵɵelementStart(85,"div",17),o.ɵɵtext(86,"\n "),o.ɵɵtemplate(87,B,3,3,"label",38),o.ɵɵtext(88,"\n "),o.ɵɵtemplate(89,D,3,3,"label",38),o.ɵɵtext(90,"\n "),o.ɵɵelementStart(91,"div",39),o.ɵɵtext(92,"\n "),o.ɵɵelementStart(93,"input",40),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().password=t})),o.ɵɵelementEnd(),o.ɵɵtext(94,"\n "),o.ɵɵelementStart(95,"div",41),o.ɵɵtext(96,"\n "),o.ɵɵelementStart(97,"button",42),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext().togglePasswordVisible()})),o.ɵɵpipe(98,"i18n"),o.ɵɵtext(99,"\n "),o.ɵɵelement(100,"i",43),o.ɵɵtext(101,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(102,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(103,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(104,"\n "),o.ɵɵelementStart(105,"div",36),o.ɵɵtext(106),o.ɵɵpipe(107,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(108,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(109,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(110,"\n "),o.ɵɵelementStart(111,"div",24),o.ɵɵtext(112,"\n "),o.ɵɵelementStart(113,"label",44),o.ɵɵtext(114),o.ɵɵpipe(115,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(116,"\n "),o.ɵɵelementStart(117,"textarea",45),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().send.notes=t})),o.ɵɵelementEnd(),o.ɵɵtext(118,"\n "),o.ɵɵelementStart(119,"div",36),o.ɵɵtext(120),o.ɵɵpipe(121,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(122,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(123,"\n "),o.ɵɵelementStart(124,"div",24),o.ɵɵtext(125,"\n "),o.ɵɵelementStart(126,"div",25),o.ɵɵtext(127,"\n "),o.ɵɵelementStart(128,"input",46),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().send.hideEmail=t})),o.ɵɵelementEnd(),o.ɵɵtext(129,"\n "),o.ɵɵelementStart(130,"label",47),o.ɵɵtext(131),o.ɵɵpipe(132,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(133,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(134,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(135,"\n "),o.ɵɵelementStart(136,"div",24),o.ɵɵtext(137,"\n "),o.ɵɵelementStart(138,"div",25),o.ɵɵtext(139,"\n "),o.ɵɵelementStart(140,"input",48),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().send.disabled=t})),o.ɵɵelementEnd(),o.ɵɵtext(141,"\n "),o.ɵɵelementStart(142,"label",49),o.ɵɵtext(143),o.ɵɵpipe(144,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(145,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(146,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(147,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(148,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.disableSend),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.disableSend&&e.disableHideEmail),o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(12,43,"name")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.send.name)("readOnly",e.disableSend),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(18,45,"sendNameDesc")),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",!e.editMode),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",e.send.type===e.sendType.Text),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",e.send.type===e.sendType.File),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(32,47,"share")),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",e.link),o.ɵɵadvance(6),o.ɵɵproperty("ngModel",e.copyLink),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(44,49,"copySendLinkOnSave")),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(52,51,"options")),o.ɵɵadvance(5),o.ɵɵproperty("ngClass",o.ɵɵpureFunction2(69,R,!e.showOptions,e.showOptions)),o.ɵɵadvance(4),o.ɵɵproperty("hidden",!e.showOptions),o.ɵɵadvance(2),o.ɵɵproperty("initialDeletionDate",e.send.deletionDate)("initialExpirationDate",e.send.expirationDate)("editMode",e.editMode)("disabled",e.disableSend),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(71,53,"maxAccessCount")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.send.maxAccessCount)("readOnly",e.disableSend),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(77,55,"maxAccessCountDesc")),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",e.editMode),o.ɵɵadvance(7),o.ɵɵproperty("ngIf",!e.hasPassword),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.hasPassword),o.ɵɵadvance(4),o.ɵɵpropertyInterpolate("type",e.showPassword?"text":"password"),o.ɵɵproperty("ngModel",e.password)("readOnly",e.disableSend),o.ɵɵadvance(4),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(98,57,"toggleVisibility")),o.ɵɵadvance(3),o.ɵɵproperty("ngClass",o.ɵɵpureFunction2(72,F,!e.showPassword,e.showPassword)),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(107,59,"sendPasswordDesc")),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(115,61,"notes")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.send.notes)("readOnly",e.disableSend),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(121,63,"sendNotesDesc")),o.ɵɵadvance(8),o.ɵɵproperty("ngModel",e.send.hideEmail)("disabled",e.disableHideEmail&&!e.send.hideEmail||e.disableSend),o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(132,65,"hideEmail"),"\n "),o.ɵɵadvance(9),o.ɵɵproperty("ngModel",e.send.disabled)("disabled",e.disableSend),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(144,67,"disableThisSend"))}}function V(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"button",68,69),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).delete()})),o.ɵɵpipe(2,"i18n"),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"i",70),o.ɵɵtext(5,"\n "),o.ɵɵelement(6,"i",71),o.ɵɵpipe(7,"i18n"),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵreference(1),t=o.ɵɵnextContext(2);o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(2,6,"delete")),o.ɵɵproperty("disabled",e.loading)("appApiAction",t.deletePromise),o.ɵɵadvance(4),o.ɵɵproperty("hidden",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(7,8,"loading")),o.ɵɵproperty("hidden",!e.loading)}}function N(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",66),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,V,9,10,"button",67),o.ɵɵtext(3,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.editMode)}}const _=function(e){return{loading:e}};class j extends r.AddEditComponent{constructor(e,t,n,i,r,o,a,s,l){super(e,t,n,i,r,a,s,l,o)}copyLinkToClipboard(e){const t=Object.create(null,{copyLinkToClipboard:{get:()=>super.copyLinkToClipboard}});return i(this,void 0,void 0,(function*(){return new Promise((n=>{window.setTimeout((()=>n(t.copyLinkToClipboard.call(this,e))),500)}))}))}}t.AddEditComponent=j,j.ɵfac=function(e){return new(e||j)(o.ɵɵdirectiveInject(a.I18nService),o.ɵɵdirectiveInject(s.PlatformUtilsService),o.ɵɵdirectiveInject(l.EnvironmentService),o.ɵɵdirectiveInject(c.DatePipe),o.ɵɵdirectiveInject(d.SendService),o.ɵɵdirectiveInject(p.StateService),o.ɵɵdirectiveInject(u.MessagingService),o.ɵɵdirectiveInject(m.PolicyService),o.ɵɵdirectiveInject(h.LogService))},j.ɵcmp=o.ɵɵdefineComponent({type:j,selectors:[["app-send-add-edit"]],features:[o.ɵɵInheritDefinitionFeature],decls:44,vars:20,consts:[["role","dialog","aria-modal","true","aria-labelledby","sendAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],["ngNativeValidate","","autocomplete","off",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","sendAddEditTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit","manual",3,"ngClass","disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["class","ml-auto",4,"ngIf"],[1,"modal-body"],[4,"ngIf"],[1,"row"],[1,"col-6","form-group"],["for","name"],["id","name","type","text","name","Name","required","",1,"form-control",3,"ngModel","readOnly","ngModelChange"],[1,"form-text","text-muted"],["class","row",4,"ngIf"],[1,"mt-5"],["class","form-group",4,"ngIf"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","copy-link","name","CopyLink",1,"form-check-input",3,"ngModel","ngModelChange"],["for","copy-link",1,"form-check-label"],["id","options-header",1,"section-header","d-flex","flex-row","align-items-center","mt-5",3,"click"],[1,"mb-0","mr-2"],["href","#","appStopClick","","role","button",1,"mb-1"],["aria-hidden","true",1,"bwi",3,"ngClass"],["id","options",3,"hidden"],[3,"initialDeletionDate","initialExpirationDate","editMode","disabled","datesChanged"],["for","maxAccessCount"],["id","maxAccessCount","type","number","name","MaxAccessCount","min","1",1,"form-control",3,"ngModel","readOnly","ngModelChange"],[1,"form-text","text-muted","small"],["class","col-6 form-group",4,"ngIf"],["for","password",4,"ngIf"],[1,"input-group"],["id","password","name","Password",1,"form-control","text-monospace",3,"type","ngModel","readOnly","ngModelChange"],[1,"input-group-append"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-lg",3,"ngClass"],["for","notes"],["id","notes","name","Notes","rows","6",1,"form-control",3,"ngModel","readOnly","ngModelChange"],["type","checkbox","id","hideEmail","name","HideEmail",1,"form-check-input",3,"ngModel","disabled","ngModelChange"],["for","hideEmail",1,"form-check-label"],["type","checkbox","id","disabled","name","Disabled",1,"form-check-input",3,"ngModel","disabled","ngModelChange"],["for","disabled",1,"form-check-label"],[1,"mb-0"],["class","form-check",4,"ngFor","ngForOf"],["type","radio",1,"form-check-input",3,"ngModel","name","id","value","checked","ngModelChange","change"],[1,"form-check-label",3,"for"],["for","text"],["id","text","name","Text.Text","rows","6",1,"form-control",3,"ngModel","readOnly","ngModelChange"],["type","checkbox","id","text-hidden","name","Text.Hidden",1,"form-check-input",3,"ngModel","disabled","ngModelChange"],["for","text-hidden",1,"form-check-label"],[1,"d-block"],["for","file"],["type","file","id","file","name","file","required","",1,"form-control-file",3,"disabled"],["for","link"],["type","text","readonly","","id","link","name","Link",1,"form-control",3,"ngModel","ngModelChange"],["for","accessCount"],["id","accessCount","type","text","name","AccessCount","readonly","",1,"form-control",3,"ngModel","ngModelChange"],["for","password"],[1,"ml-auto"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click",4,"ngIf"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click"],["deleteBtn",""],["aria-hidden","true",1,"bwi","bwi-trash","bwi-lg","bwi-fw",3,"hidden"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-lg","bwi-fw",3,"hidden","title"]],template:function(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"form",2,3),o.ɵɵlistener("ngSubmit",(function(){return t.submit()})),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"div",4),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"h2",5),o.ɵɵtext(10),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"button",6),o.ɵɵpipe(13,"i18n"),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"span",7),o.ɵɵtext(16,"×"),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵtemplate(20,U,149,75,"div",8),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"div",9),o.ɵɵtext(23,"\n "),o.ɵɵelementStart(24,"button",10),o.ɵɵtext(25,"\n "),o.ɵɵelement(26,"i",11),o.ɵɵpipe(27,"i18n"),o.ɵɵtext(28,"\n "),o.ɵɵelementStart(29,"span"),o.ɵɵtext(30),o.ɵɵpipe(31,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(32,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(33,"\n "),o.ɵɵelementStart(34,"button",12),o.ɵɵtext(35),o.ɵɵpipe(36,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(37,"\n "),o.ɵɵtemplate(38,N,4,1,"div",13),o.ɵɵtext(39,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(40,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(41,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(42,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(43,"\n")),2&e){const e=o.ɵɵreference(5);o.ɵɵadvance(4),o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(6),o.ɵɵtextInterpolate(t.title),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(13,10,"close")),o.ɵɵadvance(8),o.ɵɵproperty("ngIf",t.send),o.ɵɵadvance(4),o.ɵɵproperty("ngClass",o.ɵɵpureFunction1(18,_,e.loading))("disabled",e.loading||t.disableSend),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(27,12,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(31,14,"save")),o.ɵɵadvance(5),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(36,16,"cancel"),"\n "),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",t.send)}},directives:[v.NgControlStatusGroup,v.NgForm,f.ApiActionDirective,g.A11yTitleDirective,c.NgIf,c.NgClass,v.DefaultValueAccessor,v.RequiredValidator,v.NgControlStatus,v.NgModel,v.CheckboxControlValueAccessor,y.StopClickDirective,x.EffluxDatesComponent,v.MinValidator,v.NumberValueAccessor,S.CalloutComponent,c.NgForOf,v.RadioControlValueAccessor],pipes:[b.I18nPipe],encapsulation:2})},70452:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EffluxDatesComponent=void 0;n(57490);const i=n(96832),r=n(95546),o=(n(51554),n(73828),n(32621)),a=n(51554),s=n(73828),l=n(57490),c=n(96832),d=n(1142),p=n(99729);function u(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",13),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"input",14),o.ɵɵtext(5,"\n "),o.ɵɵelement(6,"input",15),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(4),o.ɵɵproperty("readOnly",e.disableSend),o.ɵɵadvance(2),o.ɵɵproperty("readOnly",e.disableSend)}}function m(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",18),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.twentyFourHour),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",e.twelveHour,"\n ")}}function h(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",13),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"input",14),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"select",16),o.ɵɵtext(7,"\n "),o.ɵɵtemplate(8,m,2,2,"option",17),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(4),o.ɵɵproperty("readOnly",e.disableSend),o.ɵɵadvance(2),o.ɵɵproperty("required",!e.editMode),o.ɵɵadvance(2),o.ɵɵproperty("ngForOf",e.safariDeletionTimePresetOptions)}}function v(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"input",19),o.ɵɵtext(3,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(2),o.ɵɵproperty("readOnly",e.disabled)}}function f(e,t){if(1&e&&(o.ɵɵtext(0,"\n "),o.ɵɵelementContainerStart(1,10),o.ɵɵtext(2,"\n "),o.ɵɵtemplate(3,u,9,2,"ng-container",11),o.ɵɵtext(4,"\n "),o.ɵɵtemplate(5,h,12,3,"ng-container",11),o.ɵɵtext(6,"\n "),o.ɵɵtemplate(7,v,4,1,"ng-container",12),o.ɵɵtext(8,"\n "),o.ɵɵelementContainerEnd(),o.ɵɵtext(9,"\n ")),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(1),o.ɵɵproperty("ngSwitch",e.browserPath),o.ɵɵadvance(2),o.ɵɵproperty("ngSwitchCase","firefox"),o.ɵɵadvance(2),o.ɵɵproperty("ngSwitchCase","safari")}}function g(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",18),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.value),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}function y(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1," "),o.ɵɵelementContainerEnd())}function x(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,y,2,0,"ng-container",21),o.ɵɵtext(3,"\n "),o.ɵɵelementContainerEnd()),2&e){o.ɵɵnextContext(2);const e=o.ɵɵreference(9);o.ɵɵadvance(2),o.ɵɵproperty("ngTemplateOutlet",e)}}function S(e,t){if(1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"select",20),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,g,2,2,"option",17),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵtemplate(7,x,4,1,"ng-container",4),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(4),o.ɵɵproperty("ngForOf",e.deletionDatePresets),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",0===e.selectedDeletionDatePreset.value)}}function b(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1," "),o.ɵɵelementContainerEnd())}function w(e,t){if(1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,b,2,0,"ng-container",21),o.ɵɵtext(3,"\n "),o.ɵɵelementEnd()),2&e){o.ɵɵnextContext();const e=o.ɵɵreference(9);o.ɵɵadvance(2),o.ɵɵproperty("ngTemplateOutlet",e)}}function C(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"a",22),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext().clearExpiration()})),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()}2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"clear"),"\n "))}function I(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",13),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"input",24),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"input",25),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(2),o.ɵɵproperty("required",!e.editMode)("readOnly",e.disabled),o.ɵɵadvance(2),o.ɵɵproperty("required",!e.editMode)("readOnly",e.disabled)}}function E(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",18),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.twentyFourHour),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",e.twelveHour,"\n ")}}function P(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",13),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"input",24),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"select",26),o.ɵɵtext(5,"\n "),o.ɵɵtemplate(6,E,2,2,"option",17),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(2),o.ɵɵproperty("required",!e.editMode)("readOnly",e.disabled),o.ɵɵadvance(2),o.ɵɵproperty("required",!e.editMode),o.ɵɵadvance(2),o.ɵɵproperty("ngForOf",e.safariExpirationTimePresetOptions)}}function O(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"input",27),o.ɵɵtext(3,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(2),o.ɵɵproperty("readOnly",e.disabled)}}function k(e,t){if(1&e&&(o.ɵɵtext(0,"\n "),o.ɵɵelementContainerStart(1,10),o.ɵɵtext(2,"\n "),o.ɵɵtemplate(3,I,6,4,"div",23),o.ɵɵtext(4,"\n "),o.ɵɵtext(5,"\n "),o.ɵɵtemplate(6,P,9,4,"div",23),o.ɵɵtext(7,"\n "),o.ɵɵtemplate(8,O,4,1,"ng-container",12),o.ɵɵtext(9,"\n "),o.ɵɵelementContainerEnd(),o.ɵɵtext(10,"\n ")),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(1),o.ɵɵproperty("ngSwitch",e.browserPath),o.ɵɵadvance(2),o.ɵɵproperty("ngSwitchCase","firefox"),o.ɵɵadvance(3),o.ɵɵproperty("ngSwitchCase","safari")}}function A(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",18),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.value),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}function T(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1," "),o.ɵɵelementContainerEnd())}function M(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,T,2,0,"ng-container",21),o.ɵɵtext(3,"\n "),o.ɵɵelementContainerEnd()),2&e){o.ɵɵnextContext(2);const e=o.ɵɵreference(32);o.ɵɵadvance(2),o.ɵɵproperty("ngTemplateOutlet",e)}}function B(e,t){if(1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"select",28),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,A,2,2,"option",17),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵtemplate(7,M,4,1,"ng-container",4),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(4),o.ɵɵproperty("ngForOf",e.expirationDatePresets),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",0===e.selectedExpirationDatePreset.value)}}function D(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1," "),o.ɵɵelementContainerEnd())}function R(e,t){if(1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,D,2,0,"ng-container",21),o.ɵɵtext(3,"\n "),o.ɵɵelementEnd()),2&e){o.ɵɵnextContext();const e=o.ɵɵreference(32);o.ɵɵadvance(2),o.ɵɵproperty("ngTemplateOutlet",e)}}class F extends r.EffluxDatesComponent{constructor(e,t,n){super(e,t,n),this.i18nService=e,this.platformUtilsService=t,this.datePipe=n}}t.EffluxDatesComponent=F,F.ɵfac=function(e){return new(e||F)(o.ɵɵdirectiveInject(a.I18nService),o.ɵɵdirectiveInject(s.PlatformUtilsService),o.ɵɵdirectiveInject(l.DatePipe))},F.ɵcmp=o.ɵɵdefineComponent({type:F,selectors:[["app-send-efflux-dates"]],features:[o.ɵɵProvidersFeature([],[{provide:i.ControlContainer,useExisting:i.NgForm}]),o.ɵɵInheritDefinitionFeature],decls:44,vars:18,consts:[[1,"row",3,"formGroup"],[1,"col-6","form-group"],["for","deletionDate"],["deletionDateCustom",""],[4,"ngIf"],[1,"form-text","text-muted","small"],[1,"d-flex"],["for","expirationDate"],["href","#","appStopClick","","class","ml-auto",3,"click",4,"ngIf"],["expirationDateCustom",""],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[1,"d-flex","justify-content-around"],["id","deletionDateCustomFallback","type","date","name","DeletionDateFallback","formControlName","fallbackDeletionDate","required","","placeholder","MM/DD/YYYY","data-date-format","mm/dd/yyyy",1,"form-control","mt-1",3,"readOnly"],["id","deletionTimeCustomFallback","type","time","name","DeletionTimeDate","formControlName","fallbackDeletionTime","required","","placeholder","HH:MM AM/PM",1,"form-control","mt-1","ml-1",3,"readOnly"],["id","deletionTimeCustomFallback","formControlName","fallbackDeletionTime","name","SafariDeletionTime",1,"form-control","mt-1","ml-1",3,"required"],[3,"ngValue",4,"ngFor","ngForOf"],[3,"ngValue"],["id","deletionDateCustom","type","datetime-local","name","DeletionDate","formControlName","defaultDeletionDateTime","required","","placeholder","MM/DD/YYYY HH:MM AM/PM",1,"form-control","mt-1",3,"readOnly"],["id","deletionDate","name","SelectedDeletionDatePreset","formControlName","selectedDeletionDatePreset","required","",1,"form-control"],[4,"ngTemplateOutlet"],["href","#","appStopClick","",1,"ml-auto",3,"click"],["class","d-flex justify-content-around",4,"ngSwitchCase"],["id","expirationDateCustomFallback","type","date","name","ExpirationDateFallback","formControlName","fallbackExpirationDate","placeholder","MM/DD/YYYY","data-date-format","mm/dd/yyyy",1,"form-control","mt-1",3,"required","readOnly"],["id","expirationTimeCustomFallback","type","time","name","ExpirationTimeFallback","formControlName","fallbackExpirationTime","placeholder","HH:MM AM/PM",1,"form-control","mt-1","ml-1",3,"required","readOnly"],["id","expirationTimeCustomFallback","formControlName","fallbackExpirationTime","name","SafariExpirationTime",1,"form-control","mt-1","ml-1",3,"required"],["id","expirationDateCustom","type","datetime-local","name","ExpirationDate","formControlName","defaultExpirationDateTime","placeholder","MM/DD/YYYY HH:MM AM/PM",1,"form-control","mt-1",3,"readOnly"],["id","expirationDate","name","SelectedExpirationDatePreset","formControlName","selectedExpirationDatePreset","required","",1,"form-control"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"label",2),o.ɵɵtext(5),o.ɵɵpipe(6,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵtemplate(8,f,10,3,"ng-template",null,3,o.ɵɵtemplateRefExtractor),o.ɵɵtext(10,"\n "),o.ɵɵtemplate(11,S,9,2,"div",4),o.ɵɵtext(12,"\n "),o.ɵɵtemplate(13,w,4,1,"div",4),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"div",5),o.ɵɵtext(16),o.ɵɵpipe(17,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelementStart(20,"div",1),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"div",6),o.ɵɵtext(23,"\n "),o.ɵɵelementStart(24,"label",7),o.ɵɵtext(25),o.ɵɵpipe(26,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵtemplate(28,C,3,3,"a",8),o.ɵɵtext(29,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(30,"\n "),o.ɵɵtemplate(31,k,11,3,"ng-template",null,9,o.ɵɵtemplateRefExtractor),o.ɵɵtext(33,"\n "),o.ɵɵtemplate(34,B,9,2,"div",4),o.ɵɵtext(35,"\n "),o.ɵɵtemplate(36,R,4,1,"div",4),o.ɵɵtext(37,"\n "),o.ɵɵelementStart(38,"div",5),o.ɵɵtext(39),o.ɵɵpipe(40,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(41,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(42,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(43,"\n")),2&e&&(o.ɵɵproperty("formGroup",t.datesForm),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(6,10,"deletionDate")),o.ɵɵadvance(6),o.ɵɵproperty("ngIf",!t.editMode),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.editMode),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(17,12,"deletionDateDesc")),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(26,14,"expirationDate")),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",t.editMode&&!t.disabled),o.ɵɵadvance(6),o.ɵɵproperty("ngIf",!t.editMode),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.editMode),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(40,16,"expirationDateDesc")))},directives:[c.NgControlStatusGroup,c.FormGroupDirective,l.NgIf,l.NgSwitch,l.NgSwitchCase,l.NgSwitchDefault,c.DefaultValueAccessor,c.NgControlStatus,c.FormControlName,c.RequiredValidator,c.SelectControlValueAccessor,l.NgForOf,c.NgSelectOption,c.ɵNgSelectMultipleOption,l.NgTemplateOutlet,d.StopClickDirective],pipes:[p.I18nPipe],encapsulation:2})},82813:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SendComponent=void 0;const r=n(32621),o=n(23446),a=(n(64684),n(8470),n(56071),n(51554),n(36631),n(73828),n(62166),n(60421),n(76532),n(167)),s=n(32621),l=n(76532),c=n(51554),d=n(73828),p=n(56071),u=n(60421),m=n(62166),h=n(64684),v=n(8470),f=n(36631),g=n(57490),y=n(96832),x=n(45728),S=n(52767),b=n(1142),w=n(56820),C=n(51626),I=n(39159),E=n(6373),P=n(8863),O=n(44653),k=n(62985),A=n(99729),T=["sendAddEdit"];function M(e,t){1&e&&(s.ɵɵelementStart(0,"app-callout",28),s.ɵɵpipe(1,"i18n"),s.ɵɵtext(2,"\n "),s.ɵɵelementStart(3,"span"),s.ɵɵtext(4),s.ɵɵpipe(5,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementEnd()),2&e&&(s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(1,2,"sendDisabled")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(5,4,"sendDisabledWarning")))}function B(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",29),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",30),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"loading")))}function D(e,t){1&e&&s.ɵɵelement(0,"i",49)}function R(e,t){1&e&&s.ɵɵelement(0,"i",50)}function F(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",51),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",30),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"disabled")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"disabled")))}function U(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",52),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",30),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"password")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"password")))}function V(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",53),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",30),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"maxAccessCountReached")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"maxAccessCountReached")))}function N(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",54),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",30),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"expired")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"expired")))}function _(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",55),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",30),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"pendingDeletion")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"pendingDeletion")))}function j(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"button",44),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);const t=s.ɵɵnextContext().$implicit;return s.ɵɵnextContext(2).removePassword(t)})),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",56),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd()}2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(4,1,"removePassword"),"\n "))}function z(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"tr"),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"td",33),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"div",34),s.ɵɵtext(5,"\n "),s.ɵɵtemplate(6,D,1,0,"i",35),s.ɵɵtext(7,"\n "),s.ɵɵtemplate(8,R,1,0,"i",36),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"td",37),s.ɵɵtext(13,"\n "),s.ɵɵelementStart(14,"a",38),s.ɵɵlistener("click",(function(){const t=s.ɵɵrestoreView(e).$implicit;return s.ɵɵnextContext(2).editSend(t)})),s.ɵɵtext(15),s.ɵɵelementEnd(),s.ɵɵtext(16,"\n "),s.ɵɵtemplate(17,F,9,6,"ng-container",21),s.ɵɵtext(18,"\n "),s.ɵɵtemplate(19,U,9,6,"ng-container",21),s.ɵɵtext(20,"\n "),s.ɵɵtemplate(21,V,9,6,"ng-container",21),s.ɵɵtext(22,"\n "),s.ɵɵtemplate(23,N,9,6,"ng-container",21),s.ɵɵtext(24,"\n "),s.ɵɵtemplate(25,_,9,6,"ng-container",21),s.ɵɵtext(26,"\n "),s.ɵɵelement(27,"br"),s.ɵɵtext(28,"\n "),s.ɵɵelementStart(29,"small",39),s.ɵɵtext(30),s.ɵɵpipe(31,"date"),s.ɵɵelementEnd(),s.ɵɵtext(32,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(33,"\n "),s.ɵɵelementStart(34,"td",40),s.ɵɵtext(35,"\n "),s.ɵɵelementStart(36,"button",41),s.ɵɵpipe(37,"i18n"),s.ɵɵtext(38,"\n "),s.ɵɵelement(39,"i",42),s.ɵɵtext(40,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(41,"\n "),s.ɵɵelementStart(42,"bit-menu",null,43),s.ɵɵtext(44,"\n "),s.ɵɵelementStart(45,"button",44),s.ɵɵlistener("click",(function(){const t=s.ɵɵrestoreView(e).$implicit;return s.ɵɵnextContext(2).copy(t)})),s.ɵɵtext(46,"\n "),s.ɵɵelement(47,"i",45),s.ɵɵtext(48),s.ɵɵpipe(49,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(50,"\n "),s.ɵɵtemplate(51,j,5,3,"button",46),s.ɵɵtext(52,"\n "),s.ɵɵelementStart(53,"button",44),s.ɵɵlistener("click",(function(){const t=s.ɵɵrestoreView(e).$implicit;return s.ɵɵnextContext(2).delete(t)})),s.ɵɵtext(54,"\n "),s.ɵɵelementStart(55,"span",47),s.ɵɵtext(56,"\n "),s.ɵɵelement(57,"i",48),s.ɵɵtext(58),s.ɵɵpipe(59,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(60,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(61,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(62,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(63,"\n "),s.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=s.ɵɵreference(43),i=s.ɵɵnextContext(2);s.ɵɵadvance(6),s.ɵɵproperty("ngIf",e.type==i.sendType.File),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.type==i.sendType.Text),s.ɵɵadvance(7),s.ɵɵtextInterpolate(e.name),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.disabled),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.password),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.maxAccessCountReached),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.expired),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.pendingDelete),s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind2(31,14,e.deletionDate,"medium")),s.ɵɵadvance(6),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(37,17,"options")),s.ɵɵproperty("bitMenuTriggerFor",n),s.ɵɵadvance(12),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(49,19,"copySendLink"),"\n "),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",e.password&&!i.disableSend),s.ɵɵadvance(7),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(59,21,"delete"),"\n ")}}function H(e,t){if(1&e&&(s.ɵɵelementStart(0,"table",31),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"tbody"),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,z,64,23,"tr",32),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(4),s.ɵɵproperty("ngForOf",e.filteredSends)}}function L(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",29),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",30),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"loading")))}function K(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"p"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"button",58),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).addSend()})),s.ɵɵtext(7,"\n "),s.ɵɵelement(8,"i",59),s.ɵɵtext(9),s.ɵɵpipe(10,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementContainerEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,3,"noSendsInList")),s.ɵɵadvance(3),s.ɵɵproperty("disabled",e.disableSend),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(10,5,"createSend"),"\n ")}}function q(e,t){if(1&e&&(s.ɵɵelementStart(0,"div",57),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,L,9,6,"ng-container",21),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,K,12,7,"ng-container",21),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!e.loaded),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.loaded)}}function G(e,t){}const W=function(e){return{active:e}},$="SendComponent";class Y extends o.SendComponent{constructor(e,t,n,i,r,o,a,s,l,c){super(e,t,n,i,r,o,a,c),this.modalService=s,this.broadcasterService=l}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){yield e.ngOnInit.call(this),yield this.load(),this.broadcasterService.subscribe($,(e=>{this.ngZone.run((()=>i(this,void 0,void 0,(function*(){if("syncCompleted"===e.command)e.successfully&&(yield this.load())}))))}))}))}ngOnDestroy(){this.broadcasterService.unsubscribe($)}addSend(){return i(this,void 0,void 0,(function*(){if(this.disableSend)return;(yield this.editSend(null)).type=this.type}))}editSend(e){return i(this,void 0,void 0,(function*(){const[t,n]=yield this.modalService.openViewRef(a.AddEditComponent,this.sendAddEditModalRef,(n=>{n.sendId=null==e?null:e.id,n.onSavedSend.subscribe((()=>i(this,void 0,void 0,(function*(){t.close(),yield this.load()})))),n.onDeletedSend.subscribe((()=>i(this,void 0,void 0,(function*(){t.close(),yield this.load()}))))}));return n}))}}t.SendComponent=Y,Y.ɵfac=function(e){return new(e||Y)(s.ɵɵdirectiveInject(l.SendService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(d.PlatformUtilsService),s.ɵɵdirectiveInject(p.EnvironmentService),s.ɵɵdirectiveInject(s.NgZone),s.ɵɵdirectiveInject(u.SearchService),s.ɵɵdirectiveInject(m.PolicyService),s.ɵɵdirectiveInject(h.ModalService),s.ɵɵdirectiveInject(v.BroadcasterService),s.ɵɵdirectiveInject(f.LogService))},Y.ɵcmp=s.ɵɵdefineComponent({type:Y,selectors:[["app-send"]],viewQuery:function(e,t){if(1&e&&s.ɵɵviewQuery(T,7,r.ViewContainerRef),2&e){let e;s.ɵɵqueryRefresh(e=s.ɵɵloadQuery())&&(t.sendAddEditModalRef=e.first)}},features:[s.ɵɵInheritDefinitionFeature],decls:112,vars:40,consts:[[1,"container","page-content"],["type","warning",3,"title",4,"ngIf"],[1,"row"],[1,"col-3","groupings"],[1,"card","vault-filters"],[1,"card-header","d-flex"],[1,"card-body"],["type","search","id","search","autocomplete","off","appAutofocus","",1,"form-control",3,"placeholder","ngModel","ngModelChange","input"],[1,"filter"],[1,"filter-options"],[1,"filter-option",3,"ngClass"],[1,"filter-buttons"],["bit-button","","appStopClick","",1,"filter-button",3,"click"],[1,"bwi","bwi-fw","bwi-filter"],[1,"filter-heading"],[1,"bwi","bwi-fw","bwi-file-text"],[1,"bwi","bwi-fw","bwi-file"],[1,"col-9"],[1,"page-header","d-flex"],[3,"appApiAction"],["actionSpinner",""],[4,"ngIf"],[1,"ml-auto","d-flex"],["type","button",1,"btn","btn-outline-primary","btn-sm",3,"disabled","click"],["aria-hidden","true",1,"bwi","bwi-plus","bwi-fw"],["class","table table-hover table-list",4,"ngIf"],["class","no-items",4,"ngIf"],["sendAddEdit",""],["type","warning",3,"title"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"table","table-hover","table-list"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],["aria-hidden","true",1,"icon"],["class","bwi bwi-fw bwi-lg bwi-file",4,"ngIf"],["class","bwi bwi-fw bwi-lg bwi-file-text",4,"ngIf"],[1,"reduced-lh","wrap"],["href","#","appStopClick","","appStopProp","",3,"click"],["appStopProp",""],[1,"table-list-options"],["type","button",1,"tw-border-none","tw-bg-transparent","tw-text-main",3,"bitMenuTriggerFor","appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-ellipsis-v","bwi-lg"],["sendOptions",""],["bit-menu-item","",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-clone"],["bit-menu-item","",3,"click",4,"ngIf"],[1,"tw-text-danger"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-trash"],[1,"bwi","bwi-fw","bwi-lg","bwi-file"],[1,"bwi","bwi-fw","bwi-lg","bwi-file-text"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-exclamation-triangle",3,"title"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-key",3,"title"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-ban",3,"title"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-clock",3,"title"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-trash",3,"title"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-close"],[1,"no-items"],[1,"btn","btn-outline-primary",3,"disabled","click"],[1,"bwi","bwi-plus","bwi-fw"]],template:function(e,t){if(1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,M,7,6,"app-callout",1),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"div",2),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"div",3),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"div",4),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"div",5),s.ɵɵtext(11),s.ɵɵpipe(12,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n "),s.ɵɵelementStart(14,"div",6),s.ɵɵtext(15,"\n "),s.ɵɵelementStart(16,"input",7),s.ɵɵlistener("ngModelChange",(function(e){return t.searchText=e}))("input",(function(){return t.searchTextChanged()})),s.ɵɵpipe(17,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"div",8),s.ɵɵtext(20,"\n "),s.ɵɵelementStart(21,"ul",9),s.ɵɵtext(22,"\n "),s.ɵɵelementStart(23,"li",10),s.ɵɵtext(24,"\n "),s.ɵɵelementStart(25,"span",11),s.ɵɵtext(26,"\n "),s.ɵɵelementStart(27,"button",12),s.ɵɵlistener("click",(function(){return t.selectAll()})),s.ɵɵtext(28,"\n "),s.ɵɵelement(29,"i",13),s.ɵɵtext(30),s.ɵɵpipe(31,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(32,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(33,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(34,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(35,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(36,"\n "),s.ɵɵelementStart(37,"div",8),s.ɵɵtext(38,"\n "),s.ɵɵelementStart(39,"div",14),s.ɵɵtext(40,"\n "),s.ɵɵelementStart(41,"h3"),s.ɵɵtext(42),s.ɵɵpipe(43,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(44,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(45,"\n "),s.ɵɵelementStart(46,"ul",9),s.ɵɵtext(47,"\n "),s.ɵɵelementStart(48,"li",10),s.ɵɵtext(49,"\n "),s.ɵɵelementStart(50,"span",11),s.ɵɵtext(51,"\n "),s.ɵɵelementStart(52,"button",12),s.ɵɵlistener("click",(function(){return t.selectType(t.sendType.Text)})),s.ɵɵtext(53,"\n "),s.ɵɵelement(54,"i",15),s.ɵɵtext(55),s.ɵɵpipe(56,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(57,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(58,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(59,"\n "),s.ɵɵelementStart(60,"li",10),s.ɵɵtext(61,"\n "),s.ɵɵelementStart(62,"span",11),s.ɵɵtext(63,"\n "),s.ɵɵelementStart(64,"button",12),s.ɵɵlistener("click",(function(){return t.selectType(t.sendType.File)})),s.ɵɵtext(65,"\n "),s.ɵɵelement(66,"i",16),s.ɵɵtext(67),s.ɵɵpipe(68,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(69,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(70,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(71,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(72,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(73,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(74,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(75,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(76,"\n "),s.ɵɵelementStart(77,"div",17),s.ɵɵtext(78,"\n "),s.ɵɵelementStart(79,"div",18),s.ɵɵtext(80,"\n "),s.ɵɵelementStart(81,"h1"),s.ɵɵtext(82),s.ɵɵpipe(83,"i18n"),s.ɵɵelementStart(84,"small",19,20),s.ɵɵtext(86,"\n "),s.ɵɵtemplate(87,B,9,6,"ng-container",21),s.ɵɵtext(88,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(89,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(90,"\n "),s.ɵɵelementStart(91,"div",22),s.ɵɵtext(92,"\n "),s.ɵɵelementStart(93,"button",23),s.ɵɵlistener("click",(function(){return t.addSend()})),s.ɵɵtext(94,"\n "),s.ɵɵelement(95,"i",24),s.ɵɵtext(96),s.ɵɵpipe(97,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(98,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(99,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(100,"\n "),s.ɵɵtext(101,"\n "),s.ɵɵtemplate(102,H,7,1,"table",25),s.ɵɵtext(103,"\n "),s.ɵɵtemplate(104,q,6,2,"div",26),s.ɵɵtext(105,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(106,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(107,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(108,"\n"),s.ɵɵtemplate(109,G,0,0,"ng-template",null,27,s.ɵɵtemplateRefExtractor),s.ɵɵtext(111,"\n")),2&e){const e=s.ɵɵreference(85);s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.disableSend),s.ɵɵadvance(9),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(12,18,"filters"),"\n "),s.ɵɵadvance(5),s.ɵɵpropertyInterpolate("placeholder",t.searchPlaceholder||s.ɵɵpipeBind1(17,20,"searchSends")),s.ɵɵproperty("ngModel",t.searchText),s.ɵɵadvance(7),s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(34,W,t.selectedAll)),s.ɵɵadvance(7),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(31,22,"allSends"),"\n "),s.ɵɵadvance(12),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(43,24,"types")),s.ɵɵadvance(6),s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(36,W,t.selectedType===t.sendType.Text)),s.ɵɵadvance(7),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(56,26,"sendTypeText"),"\n "),s.ɵɵadvance(5),s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(38,W,t.selectedType===t.sendType.File)),s.ɵɵadvance(7),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(68,28,"sendTypeFile"),"\n "),s.ɵɵadvance(15),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(83,30,"send"),"\n "),s.ɵɵadvance(2),s.ɵɵproperty("appApiAction",t.actionPromise),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",e.loading),s.ɵɵadvance(6),s.ɵɵproperty("disabled",t.disableSend),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(97,32,"createSend"),"\n "),s.ɵɵadvance(6),s.ɵɵproperty("ngIf",t.filteredSends&&t.filteredSends.length),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.filteredSends&&!t.filteredSends.length)}},directives:[g.NgIf,y.DefaultValueAccessor,x.AutofocusDirective,y.NgControlStatus,y.NgModel,g.NgClass,S.ButtonComponent,b.StopClickDirective,w.ApiActionDirective,C.CalloutComponent,g.NgForOf,I.StopPropDirective,E.MenuTriggerForDirective,P.A11yTitleDirective,O.MenuComponent,k.MenuItemComponent],pipes:[A.I18nPipe,g.DatePipe],encapsulation:2})},3202:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EventOptions=t.EventInfo=t.EventService=void 0;n(51554),n(62166);const r=n(2779),o=n(80253),a=n(49906),s=n(32621),l=n(51554),c=n(62166);class d{constructor(e,t){this.i18nService=e,this.policyService=t}getDefaultDateFilters(){const e=new Date,t=new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59);e.setDate(e.getDate()-30);const n=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0);return[this.toDateTimeLocalString(n),this.toDateTimeLocalString(t)]}formatDateFilters(e,t){const n=new Date(e),i=new Date(t+":59.999");if(isNaN(n.getTime())||isNaN(i.getTime())||it.id===e.policyId))[0];let r=this.getShortId(e.policyId);null!=t&&(r=a.PolicyType[t.type]),i=this.i18nService.t("modifiedPolicyId",r);break}case o.EventType.ProviderUser_Invited:n=this.i18nService.t("invitedUserId",this.formatProviderUserId(e)),i=this.i18nService.t("invitedUserId",this.getShortId(e.providerUserId));break;case o.EventType.ProviderUser_Confirmed:n=this.i18nService.t("confirmedUserId",this.formatProviderUserId(e)),i=this.i18nService.t("confirmedUserId",this.getShortId(e.providerUserId));break;case o.EventType.ProviderUser_Updated:n=this.i18nService.t("editedUserId",this.formatProviderUserId(e)),i=this.i18nService.t("editedUserId",this.getShortId(e.providerUserId));break;case o.EventType.ProviderUser_Removed:n=this.i18nService.t("removedUserId",this.formatProviderUserId(e)),i=this.i18nService.t("removedUserId",this.getShortId(e.providerUserId));break;case o.EventType.ProviderOrganization_Created:n=this.i18nService.t("createdOrganizationId",this.formatProviderOrganizationId(e)),i=this.i18nService.t("createdOrganizationId",this.getShortId(e.providerOrganizationId));break;case o.EventType.ProviderOrganization_Added:n=this.i18nService.t("addedOrganizationId",this.formatProviderOrganizationId(e)),i=this.i18nService.t("addedOrganizationId",this.getShortId(e.providerOrganizationId));break;case o.EventType.ProviderOrganization_Removed:n=this.i18nService.t("removedOrganizationId",this.formatProviderOrganizationId(e)),i=this.i18nService.t("removedOrganizationId",this.getShortId(e.providerOrganizationId));break;case o.EventType.ProviderOrganization_VaultAccessed:n=this.i18nService.t("accessedClientVault",this.formatProviderOrganizationId(e)),i=this.i18nService.t("accessedClientVault",this.getShortId(e.providerOrganizationId))}return{message:""===n?null:n,humanReadableMessage:""===i?null:i}}))}getAppInfo(e){switch(e){case r.DeviceType.Android:return["bwi-android",this.i18nService.t("mobile")+" - Android"];case r.DeviceType.iOS:return["bwi-apple",this.i18nService.t("mobile")+" - iOS"];case r.DeviceType.UWP:return["bwi-windows",this.i18nService.t("mobile")+" - Windows"];case r.DeviceType.ChromeExtension:return["bwi-chrome",this.i18nService.t("extension")+" - Chrome"];case r.DeviceType.FirefoxExtension:return["bwi-firefox",this.i18nService.t("extension")+" - Firefox"];case r.DeviceType.OperaExtension:return["bwi-opera",this.i18nService.t("extension")+" - Opera"];case r.DeviceType.EdgeExtension:return["bwi-edge",this.i18nService.t("extension")+" - Edge"];case r.DeviceType.VivaldiExtension:return["bwi-puzzle",this.i18nService.t("extension")+" - Vivaldi"];case r.DeviceType.SafariExtension:return["bwi-safari",this.i18nService.t("extension")+" - Safari"];case r.DeviceType.WindowsDesktop:return["bwi-windows",this.i18nService.t("desktop")+" - Windows"];case r.DeviceType.MacOsDesktop:return["bwi-apple",this.i18nService.t("desktop")+" - macOS"];case r.DeviceType.LinuxDesktop:return["bwi-linux",this.i18nService.t("desktop")+" - Linux"];case r.DeviceType.ChromeBrowser:return["bwi-globe",this.i18nService.t("webVault")+" - Chrome"];case r.DeviceType.FirefoxBrowser:return["bwi-globe",this.i18nService.t("webVault")+" - Firefox"];case r.DeviceType.OperaBrowser:return["bwi-globe",this.i18nService.t("webVault")+" - Opera"];case r.DeviceType.SafariBrowser:return["bwi-globe",this.i18nService.t("webVault")+" - Safari"];case r.DeviceType.VivaldiBrowser:return["bwi-globe",this.i18nService.t("webVault")+" - Vivaldi"];case r.DeviceType.EdgeBrowser:return["bwi-globe",this.i18nService.t("webVault")+" - Edge"];case r.DeviceType.IEBrowser:return["bwi-globe",this.i18nService.t("webVault")+" - IE"];case r.DeviceType.UnknownBrowser:return["bwi-globe",this.i18nService.t("webVault")+" - "+this.i18nService.t("unknown")];default:return["bwi-globe",this.i18nService.t("unknown")]}}formatCipherId(e,t){const n=this.getShortId(e.cipherId);if(null==e.organizationId||!t.cipherInfo)return""+n+"";const i=this.makeAnchor(n);return i.setAttribute("href","#/organizations/"+e.organizationId+"/vault?search="+n+"&viewEvents="+e.cipherId),i.outerHTML}formatGroupId(e){const t=this.getShortId(e.groupId),n=this.makeAnchor(t);return n.setAttribute("href","#/organizations/"+e.organizationId+"/manage/groups?search="+t),n.outerHTML}formatCollectionId(e){const t=this.getShortId(e.collectionId),n=this.makeAnchor(t);return n.setAttribute("href","#/organizations/"+e.organizationId+"/manage/collections?search="+t),n.outerHTML}formatOrgUserId(e){const t=this.getShortId(e.organizationUserId),n=this.makeAnchor(t);return n.setAttribute("href","#/organizations/"+e.organizationId+"/manage/people?search="+t+"&viewEvents="+e.organizationUserId),n.outerHTML}formatProviderUserId(e){const t=this.getShortId(e.providerUserId),n=this.makeAnchor(t);return n.setAttribute("href","#/providers/"+e.providerId+"/manage/people?search="+t+"&viewEvents="+e.providerUserId),n.outerHTML}formatProviderOrganizationId(e){const t=this.getShortId(e.providerOrganizationId),n=this.makeAnchor(t);return n.setAttribute("href","#/providers/"+e.providerId+"/clients?search="+t),n.outerHTML}formatPolicyId(e){const t=this.getShortId(e.policyId),n=this.makeAnchor(t);return n.setAttribute("href","#/organizations/"+e.organizationId+"/manage/policies?policyId="+e.policyId),n.outerHTML}makeAnchor(e){const t=document.createElement("a");return t.title=this.i18nService.t("view"),t.innerHTML=""+e+"",t}getShortId(e){return null==e?void 0:e.substring(0,8)}toDateTimeLocalString(e){return e.getFullYear()+"-"+this.pad(e.getMonth()+1)+"-"+this.pad(e.getDate())+"T"+this.pad(e.getHours())+":"+this.pad(e.getMinutes())}pad(e){const t=Math.floor(Math.abs(e));return(t<10?"0":"")+t}}t.EventService=d,d.ɵfac=function(e){return new(e||d)(s.ɵɵinject(l.I18nService),s.ɵɵinject(c.PolicyService))},d.ɵprov=s.ɵɵdefineInjectable({token:d,factory:d.ɵfac});t.EventInfo=class{};class p{constructor(){this.cipherInfo=!0}}t.EventOptions=p},8674:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.InitService=void 0;const r=n(41058),o=(n(85714),n(56071),n(32034),n(51554),n(38249),n(73828),n(73569),n(27458),n(82656),n(14538)),a=n(74901),s=n(32621),l=n(56071),c=n(38249),d=n(82656),p=n(51554),u=n(32034),m=n(27458),h=n(73569),v=n(73828),f=n(85714);class g{constructor(e,t,n,i,r,o,a,s,l,c){this.win=e,this.environmentService=t,this.notificationsService=n,this.vaultTimeoutService=i,this.i18nService=r,this.eventLoggingService=o,this.twoFactorService=a,this.stateService=s,this.platformUtilsService=l,this.cryptoService=c}init(){return()=>i(this,void 0,void 0,(function*(){var e;yield this.stateService.init();const t={icons:"https://icons.bitwarden.net",notifications:"https://notifications.bitwarden.com"};null!==(e=t.base)&&void 0!==e||(t.base=this.win.location.origin),this.environmentService.setUrls(t),setTimeout((()=>this.notificationsService.init()),3e3),this.vaultTimeoutService.init(!0);const n=yield this.stateService.getLocale();yield this.i18nService.init(n),this.eventLoggingService.init(!0),this.twoFactorService.init();const r=this.win.document.documentElement;r.classList.add("locale_"+this.i18nService.translationLocale),this.platformUtilsService.onDefaultSystemThemeChange((e=>i(this,void 0,void 0,(function*(){(yield this.stateService.getTheme())===o.ThemeType.System&&(r.classList.remove("theme_"+o.ThemeType.Light,"theme_"+o.ThemeType.Dark),r.classList.add("theme_"+e))}))));new a.ContainerService(this.cryptoService).attachToWindow(this.win)}))}}t.InitService=g,g.ɵfac=function(e){return new(e||g)(s.ɵɵinject(r.WINDOW),s.ɵɵinject(l.EnvironmentService),s.ɵɵinject(c.NotificationsService),s.ɵɵinject(d.VaultTimeoutService),s.ɵɵinject(p.I18nService),s.ɵɵinject(u.EventService),s.ɵɵinject(m.TwoFactorService),s.ɵɵinject(h.StateService),s.ɵɵinject(v.PlatformUtilsService),s.ɵɵinject(f.CryptoService))},g.ɵprov=s.ɵɵdefineInjectable({token:g,factory:g.ɵfac})},93817:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModalService=void 0;n(32621);const i=n(19755),r=n(14857),o=n(64684),a=(n(45552),n(82769)),s=n(32621),l=n(45552);class c extends o.ModalService{constructor(e,t,n,i){super(e,t,n),this.messagingService=i,this.el=null,this.modalOpen=!1}setupHandlers(e){e.onCreated.pipe(r.first()).subscribe((()=>{const t=Array.from(document.querySelectorAll(".modal"));t.length>0&&(this.el=i(t[0]),this.el.modal("show"),this.el.on("show.bs.modal",(()=>{e.show(),this.messagingService.send("modalShow")})),this.el.on("shown.bs.modal",(()=>{e.shown(),this.messagingService.send("modalShown"),a.Utils.isMobileBrowser||this.el.find("*[appAutoFocus]").focus()})),this.el.on("hide.bs.modal",(()=>{this.messagingService.send("modalClose")})),this.el.on("hidden.bs.modal",(()=>{e.closed(),this.messagingService.send("modalClosed")})))})),e.onClose.pipe(r.first()).subscribe((()=>{null!=this.el&&this.el.modal("hide")}))}}t.ModalService=c,c.ɵfac=function(e){return new(e||c)(s.ɵɵinject(s.ComponentFactoryResolver),s.ɵɵinject(s.ApplicationRef),s.ɵɵinject(s.Injector),s.ɵɵinject(l.MessagingService))},c.ɵprov=s.ɵɵdefineInjectable({token:c,factory:c.ɵfac})},55453:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PolicyListService=void 0;t.PolicyListService=class{constructor(){this.policies=[]}addPolicies(e){this.policies.push(...e)}getPolicies(){return this.policies}}},77459:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RouterService=void 0;n(61248);const i=n(68012),r=n(72872),o=(n(51554),n(32621)),a=n(68012),s=n(61248),l=n(51554);class c{constructor(e,t,n,o){this.router=e,this.activatedRoute=t,this.titleService=n,this.previousUrl=void 0,this.currentUrl=void 0,this.currentUrl=this.router.url,e.events.pipe(r.filter((e=>e instanceof i.NavigationEnd))).subscribe((e=>{var t,n,i,r,a,s,l;this.currentUrl=e.url;let c=o.t("pageTitle","Bitwarden"),d=this.activatedRoute.firstChild;for(;d.firstChild;)d=d.firstChild;const p=null===(n=null===(t=null==d?void 0:d.snapshot)||void 0===t?void 0:t.data)||void 0===n?void 0:n.titleId,u=null===(r=null===(i=null==d?void 0:d.snapshot)||void 0===i?void 0:i.data)||void 0===r?void 0:r.title,m=null===(l=!(null===(s=null===(a=null==d?void 0:d.snapshot)||void 0===a?void 0:a.data)||void 0===s?void 0:s.doNotSaveUrl))||void 0===l||l;if(null!=p||null!=u){const e=null!=u?u:o.t(p);null!=e&&""!==e&&(c=e+" | "+c)}this.titleService.setTitle(c),m&&this.setPreviousUrl(this.currentUrl)}))}getPreviousUrl(){return this.previousUrl}setPreviousUrl(e){this.previousUrl=e}}t.RouterService=c,c.ɵfac=function(e){return new(e||c)(o.ɵɵinject(a.Router),o.ɵɵinject(a.ActivatedRoute),o.ɵɵinject(s.Title),o.ɵɵinject(l.I18nService))},c.ɵprov=o.ɵɵdefineInjectable({token:c,factory:c.ɵfac})},52976:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServicesModule=void 0;const i=n(32621),r=n(68290),o=n(41058),a=n(64684),s=n(91674),l=n(45330),c=n(3174),d=n(85714),p=n(88308),u=n(51554),m=n(11223),h=n(36631),v=n(45552),f=n(44809),g=n(73828),y=n(73569),x=n(6924),S=n(39566),b=n(35266),w=n(12514),C=n(15156),I=n(74657),E=n(82062),P=n(79046),O=n(57096),k=n(28455),A=n(97853),T=n(14020),M=n(91621),B=n(31113),D=n(51601),R=n(61841),F=n(70734),U=n(13637),V=n(3202),N=n(8674),_=n(93817),j=n(55453),z=n(77459),H=n(32621);class L{}t.ServicesModule=L,L.ɵfac=function(e){return new(e||L)},L.ɵmod=H.ɵɵdefineNgModule({type:L}),L.ɵinj=H.ɵɵdefineInjector({providers:[U.NavigationPermissionsService,F.PermissionsGuard,N.InitService,z.RouterService,V.EventService,j.PolicyListService,{provide:i.APP_INITIALIZER,useFactory:e=>e.init(),deps:[N.InitService],multi:!0},{provide:o.STATE_FACTORY,useValue:new b.StateFactory(E.GlobalState,I.Account)},{provide:o.STATE_SERVICE_USE_CACHE,useValue:!1},{provide:u.I18nService,useClass:k.I18nService,deps:[o.SYSTEM_LANGUAGE,o.LOCALES_DIRECTORY]},{provide:S.StorageService,useClass:O.HtmlStorageService},{provide:o.SECURE_STORAGE,useClass:A.MemoryStorageService},{provide:g.PlatformUtilsService,useClass:D.WebPlatformUtilsService},{provide:v.MessagingService,useClass:P.BroadcasterMessagingService},{provide:a.ModalService,useClass:_.ModalService},{provide:m.ImportService,useClass:w.ImportService,deps:[l.CipherService,p.FolderService,s.ApiService,u.I18nService,c.CollectionService,g.PlatformUtilsService,d.CryptoService]},{provide:x.StateMigrationService,useClass:B.StateMigrationService,deps:[S.StorageService,o.SECURE_STORAGE,o.STATE_FACTORY]},{provide:C.StateService,useClass:M.StateService,deps:[S.StorageService,o.SECURE_STORAGE,h.LogService,x.StateMigrationService,o.STATE_FACTORY,o.STATE_SERVICE_USE_CACHE]},{provide:y.StateService,useExisting:C.StateService},{provide:f.PasswordRepromptService,useClass:T.PasswordRepromptService},R.HomeGuard],imports:[[r.ToastrModule,o.JslibServicesModule]]})},58728:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AccountComponent=void 0;const r=n(32621),o=(n(64684),n(91674),n(72277),n(73569),n(26083)),a=n(6430),s=n(56796),l=n(32621),c=n(64684),d=n(91674),p=n(72277),u=n(73569),m=n(93276),h=n(57490),v=n(52767),f=n(74939),g=n(99729),y=["deauthorizeSessionsTemplate"],x=["purgeVaultTemplate"],S=["deleteAccountTemplate"];function b(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",11),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"h1"),l.ɵɵtext(5),l.ɵɵpipe(6,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(7,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelement(9,"app-change-email"),l.ɵɵtext(10,"\n"),l.ɵɵelementContainerEnd()),2&e&&(l.ɵɵadvance(5),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(6,1,"changeEmail")))}function w(e,t){}function C(e,t){}function I(e,t){}function E(e,t){}function P(e,t){}class O{constructor(e,t,n,i){this.modalService=e,this.apiService=t,this.keyConnectorService=n,this.stateService=i,this.showChangeEmail=!0}ngOnInit(){return i(this,void 0,void 0,(function*(){this.showChangeEmail=!(yield this.keyConnectorService.getUsesKeyConnector())}))}deauthorizeSessions(){return i(this,void 0,void 0,(function*(){yield this.modalService.openViewRef(o.DeauthorizeSessionsComponent,this.deauthModalRef)}))}purgeVault(){return i(this,void 0,void 0,(function*(){yield this.modalService.openViewRef(s.PurgeVaultComponent,this.purgeModalRef)}))}deleteAccount(){return i(this,void 0,void 0,(function*(){yield this.modalService.openViewRef(a.DeleteAccountComponent,this.deleteModalRef)}))}}t.AccountComponent=O,O.ɵfac=function(e){return new(e||O)(l.ɵɵdirectiveInject(c.ModalService),l.ɵɵdirectiveInject(d.ApiService),l.ɵɵdirectiveInject(p.KeyConnectorService),l.ɵɵdirectiveInject(u.StateService))},O.ɵcmp=l.ɵɵdefineComponent({type:O,selectors:[["app-account"]],viewQuery:function(e,t){if(1&e&&(l.ɵɵviewQuery(y,7,r.ViewContainerRef),l.ɵɵviewQuery(x,7,r.ViewContainerRef),l.ɵɵviewQuery(S,7,r.ViewContainerRef)),2&e){let e;l.ɵɵqueryRefresh(e=l.ɵɵloadQuery())&&(t.deauthModalRef=e.first),l.ɵɵqueryRefresh(e=l.ɵɵloadQuery())&&(t.purgeModalRef=e.first),l.ɵɵqueryRefresh(e=l.ɵɵloadQuery())&&(t.deleteModalRef=e.first)}},decls:55,vars:19,consts:[[1,"page-header"],[4,"ngIf"],[1,"secondary-header","text-danger","border-0","mb-0"],[1,"card","border-danger"],[1,"card-body"],["bit-button","","buttonType","danger",3,"click"],["deauthorizeSessionsTemplate",""],["purgeVaultTemplate",""],["deleteAccountTemplate",""],["viewUserApiKeyTemplate",""],["rotateUserApiKeyTemplate",""],[1,"secondary-header"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"h1"),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(6,"\n"),l.ɵɵelement(7,"app-profile"),l.ɵɵtext(8,"\n"),l.ɵɵtemplate(9,b,11,3,"ng-container",1),l.ɵɵtext(10,"\n"),l.ɵɵelementStart(11,"div",2),l.ɵɵtext(12,"\n "),l.ɵɵelementStart(13,"h1"),l.ɵɵtext(14),l.ɵɵpipe(15,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(16,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(17,"\n"),l.ɵɵelementStart(18,"div",3),l.ɵɵtext(19,"\n "),l.ɵɵelementStart(20,"div",4),l.ɵɵtext(21,"\n "),l.ɵɵelementStart(22,"p"),l.ɵɵtext(23),l.ɵɵpipe(24,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(25,"\n "),l.ɵɵelementStart(26,"button",5),l.ɵɵlistener("click",(function(){return t.deauthorizeSessions()})),l.ɵɵtext(27),l.ɵɵpipe(28,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(29,"\n "),l.ɵɵelementStart(30,"button",5),l.ɵɵlistener("click",(function(){return t.purgeVault()})),l.ɵɵtext(31),l.ɵɵpipe(32,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(33,"\n "),l.ɵɵelementStart(34,"button",5),l.ɵɵlistener("click",(function(){return t.deleteAccount()})),l.ɵɵtext(35),l.ɵɵpipe(36,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(37,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(38,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(39,"\n"),l.ɵɵtemplate(40,w,0,0,"ng-template",null,6,l.ɵɵtemplateRefExtractor),l.ɵɵtext(42,"\n"),l.ɵɵtemplate(43,C,0,0,"ng-template",null,7,l.ɵɵtemplateRefExtractor),l.ɵɵtext(45,"\n"),l.ɵɵtemplate(46,I,0,0,"ng-template",null,8,l.ɵɵtemplateRefExtractor),l.ɵɵtext(48,"\n"),l.ɵɵtemplate(49,E,0,0,"ng-template",null,9,l.ɵɵtemplateRefExtractor),l.ɵɵtext(51,"\n"),l.ɵɵtemplate(52,P,0,0,"ng-template",null,10,l.ɵɵtemplateRefExtractor),l.ɵɵtext(54,"\n")),2&e&&(l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(4,7,"myAccount")),l.ɵɵadvance(6),l.ɵɵproperty("ngIf",t.showChangeEmail),l.ɵɵadvance(5),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(15,9,"dangerZone")),l.ɵɵadvance(9),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(24,11,"dangerZoneDesc")),l.ɵɵadvance(4),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(28,13,"deauthorizeSessions"),"\n "),l.ɵɵadvance(4),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(32,15,"purgeVault"),"\n "),l.ɵɵadvance(4),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(36,17,"deleteAccount"),"\n "))},directives:[m.ProfileComponent,h.NgIf,v.ButtonComponent,f.ChangeEmailComponent],pipes:[g.I18nPipe],encapsulation:2})},449:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AddCreditComponent=void 0;const r=n(32621),o=(n(91674),n(36631),n(63513),n(73828),n(73569),n(98523)),a=n(34191),s=n(32621),l=n(73569),c=n(91674),d=n(73828),p=n(63513),u=n(36631),m=n(96832),h=n(56820),v=n(8863),f=n(57490),g=n(99729),y=["ppButtonForm"];function x(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",36),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",37),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"input",38),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().method=t})),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"label",39),s.ɵɵtext(7,"\n "),s.ɵɵelement(8,"i",40),s.ɵɵtext(9," PayPal"),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"div",37),s.ɵɵtext(13,"\n "),s.ɵɵelementStart(14,"input",41),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().method=t})),s.ɵɵelementEnd(),s.ɵɵtext(15,"\n "),s.ɵɵelementStart(16,"label",42),s.ɵɵtext(17,"\n "),s.ɵɵelement(18,"i",43),s.ɵɵtext(19," Bitcoin"),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(4),s.ɵɵproperty("value",e.paymentMethodType.PayPal)("ngModel",e.method),s.ɵɵadvance(10),s.ɵɵproperty("value",e.paymentMethodType.BitPay)("ngModel",e.method)}}class S{constructor(e,t,n,i,a){this.stateService=e,this.apiService=t,this.platformUtilsService=n,this.organizationService=i,this.logService=a,this.showOptions=!0,this.method=o.PaymentMethodType.PayPal,this.onAdded=new r.EventEmitter,this.onCanceled=new r.EventEmitter,this.paymentMethodType=o.PaymentMethodType,this.ppLoading=!1;const s="4ZDA7DLUUJGMN",l="https://www.paypal.com/cgi-bin/webscr";this.ppButtonFormAction=l,this.ppButtonBusinessId=s}ngOnInit(){return i(this,void 0,void 0,(function*(){if(null!=this.organizationId){null==this.creditAmount&&(this.creditAmount="20.00"),this.ppButtonCustomField="organization_id:"+this.organizationId;const e=yield this.organizationService.get(this.organizationId);null!=e&&(this.subject=e.name,this.name=e.name)}else null==this.creditAmount&&(this.creditAmount="10.00"),this.userId=yield this.stateService.getUserId(),this.subject=yield this.stateService.getEmail(),this.email=this.subject,this.ppButtonCustomField="user_id:"+this.userId;this.ppButtonCustomField+=",account_credit:1",this.returnUrl=window.location.href}))}submit(){return i(this,void 0,void 0,(function*(){if(null!=this.creditAmount&&""!==this.creditAmount){if(this.method===o.PaymentMethodType.PayPal)return this.ppButtonFormRef.nativeElement.submit(),void(this.ppLoading=!0);if(this.method!==o.PaymentMethodType.BitPay)try{this.onAdded.emit()}catch(e){this.logService.error(e)}else try{const e=new a.BitPayInvoiceRequest;e.email=this.email,e.name=this.name,e.credit=!0,e.amount=this.creditAmountNumber,e.organizationId=this.organizationId,e.userId=this.userId,e.returnUrl=this.returnUrl,this.formPromise=this.apiService.postBitPayInvoice(e);const t=yield this.formPromise;this.platformUtilsService.launchUri(t)}catch(e){this.logService.error(e)}}}))}cancel(){this.onCanceled.emit()}formatAmount(){try{if(null!=this.creditAmount&&""!==this.creditAmount){const e=Math.abs(parseFloat(this.creditAmount));if(e>0)return void(this.creditAmount=parseFloat((Math.round(100*e)/100).toString()).toFixed(2).toString())}}catch(e){this.logService.error(e)}this.creditAmount=""}get creditAmountNumber(){if(null!=this.creditAmount&&""!==this.creditAmount)try{return parseFloat(this.creditAmount)}catch(e){this.logService.error(e)}return null}}t.AddCreditComponent=S,S.ɵfac=function(e){return new(e||S)(s.ɵɵdirectiveInject(l.StateService),s.ɵɵdirectiveInject(c.ApiService),s.ɵɵdirectiveInject(d.PlatformUtilsService),s.ɵɵdirectiveInject(p.OrganizationService),s.ɵɵdirectiveInject(u.LogService))},S.ɵcmp=s.ɵɵdefineComponent({type:S,selectors:[["app-add-credit"]],viewQuery:function(e,t){if(1&e&&s.ɵɵviewQuery(y,7,r.ElementRef),2&e){let e;s.ɵɵqueryRefresh(e=s.ɵɵloadQuery())&&(t.ppButtonFormRef=e.first)}},inputs:{creditAmount:"creditAmount",showOptions:"showOptions",method:"method",organizationId:"organizationId"},outputs:{onAdded:"onAdded",onCanceled:"onCanceled"},decls:94,vars:32,consts:[["ngNativeValidate","",1,"card",3,"appApiAction","ngSubmit"],["form",""],[1,"card-body"],["type","button",1,"close",3,"appA11yTitle","click"],["aria-hidden","true"],[1,"card-body-header"],["class","mb-4 text-lg",4,"ngIf"],[1,"form-group"],[1,"row"],[1,"col-4"],["for","creditAmount"],[1,"input-group"],[1,"input-group-prepend"],[1,"input-group-text"],["id","creditAmount","type","text","name","CreditAmount","required","",1,"form-control",3,"ngModel","ngModelChange","blur"],[1,"form-text","text-muted"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["method","post","target","_top",3,"action"],["ppButtonForm",""],["type","hidden","name","cmd","value","_xclick"],["type","hidden","name","business",3,"value"],["type","hidden","name","button_subtype","value","services"],["type","hidden","name","no_note","value","1"],["type","hidden","name","no_shipping","value","1"],["type","hidden","name","rm","value","1"],["type","hidden","name","return",3,"value"],["type","hidden","name","cancel_return",3,"value"],["type","hidden","name","currency_code","value","USD"],["type","hidden","name","image_url","value","https://bitwarden.com/images/paypal-banner.png"],["type","hidden","name","bn","value","PP-BuyNowBF:btn_buynow_LG.gif:NonHosted"],["type","hidden","name","amount",3,"value"],["type","hidden","name","custom",3,"value"],["type","hidden","name","item_name","value","Bitwarden Account Credit"],["type","hidden","name","item_number",3,"value"],[1,"mb-4","text-lg"],[1,"form-check","form-check-inline"],["type","radio","name","Method","id","credit-method-paypal",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","credit-method-paypal",1,"form-check-label"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-paypal"],["type","radio","name","Method","id","credit-method-bitcoin",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","credit-method-bitcoin",1,"form-check-label"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-bitcoin"]],template:function(e,t){if(1&e&&(s.ɵɵelementStart(0,"form",0,1),s.ɵɵlistener("ngSubmit",(function(){return t.submit()})),s.ɵɵtext(2,"\n "),s.ɵɵelementStart(3,"div",2),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"button",3),s.ɵɵlistener("click",(function(){return t.cancel()})),s.ɵɵpipe(6,"i18n"),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"span",4),s.ɵɵtext(9,"×"),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"h3",5),s.ɵɵtext(13),s.ɵɵpipe(14,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(15,"\n "),s.ɵɵtemplate(16,x,22,4,"div",6),s.ɵɵtext(17,"\n "),s.ɵɵelementStart(18,"div",7),s.ɵɵtext(19,"\n "),s.ɵɵelementStart(20,"div",8),s.ɵɵtext(21,"\n "),s.ɵɵelementStart(22,"div",9),s.ɵɵtext(23,"\n "),s.ɵɵelementStart(24,"label",10),s.ɵɵtext(25),s.ɵɵpipe(26,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n "),s.ɵɵelementStart(28,"div",11),s.ɵɵtext(29,"\n "),s.ɵɵelementStart(30,"div",12),s.ɵɵelementStart(31,"span",13),s.ɵɵtext(32,"$USD"),s.ɵɵelementEnd(),s.ɵɵelementEnd(),s.ɵɵtext(33,"\n "),s.ɵɵelementStart(34,"input",14),s.ɵɵlistener("ngModelChange",(function(e){return t.creditAmount=e}))("blur",(function(){return t.formatAmount()})),s.ɵɵelementEnd(),s.ɵɵtext(35,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(36,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(37,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(38,"\n "),s.ɵɵelementStart(39,"small",15),s.ɵɵtext(40),s.ɵɵpipe(41,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(42,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(43,"\n "),s.ɵɵelementStart(44,"button",16),s.ɵɵtext(45,"\n "),s.ɵɵelement(46,"i",17),s.ɵɵpipe(47,"i18n"),s.ɵɵtext(48,"\n "),s.ɵɵelementStart(49,"span"),s.ɵɵtext(50),s.ɵɵpipe(51,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(52,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(53,"\n "),s.ɵɵelementStart(54,"button",18),s.ɵɵlistener("click",(function(){return t.cancel()})),s.ɵɵtext(55),s.ɵɵpipe(56,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(57,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(58,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(59,"\n"),s.ɵɵelementStart(60,"form",19,20),s.ɵɵtext(62,"\n "),s.ɵɵelement(63,"input",21),s.ɵɵtext(64,"\n "),s.ɵɵelement(65,"input",22),s.ɵɵtext(66,"\n "),s.ɵɵelement(67,"input",23),s.ɵɵtext(68,"\n "),s.ɵɵelement(69,"input",24),s.ɵɵtext(70,"\n "),s.ɵɵelement(71,"input",25),s.ɵɵtext(72,"\n "),s.ɵɵelement(73,"input",26),s.ɵɵtext(74,"\n "),s.ɵɵelement(75,"input",27),s.ɵɵtext(76,"\n "),s.ɵɵelement(77,"input",28),s.ɵɵtext(78,"\n "),s.ɵɵelement(79,"input",29),s.ɵɵtext(80,"\n "),s.ɵɵelement(81,"input",30),s.ɵɵtext(82,"\n "),s.ɵɵelement(83,"input",31),s.ɵɵtext(84,"\n "),s.ɵɵelement(85,"input",32),s.ɵɵtext(86,"\n "),s.ɵɵelement(87,"input",33),s.ɵɵtext(88,"\n "),s.ɵɵelement(89,"input",34),s.ɵɵtext(90,"\n "),s.ɵɵelement(91,"input",35),s.ɵɵtext(92,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(93,"\n")),2&e){const e=s.ɵɵreference(1);s.ɵɵproperty("appApiAction",t.formPromise),s.ɵɵadvance(5),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(6,18,"cancel")),s.ɵɵadvance(8),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(14,20,"addCredit")),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",t.showOptions),s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(26,22,"amount")),s.ɵɵadvance(9),s.ɵɵproperty("ngModel",t.creditAmount),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(41,24,"creditDelayed")),s.ɵɵadvance(4),s.ɵɵproperty("disabled",e.loading||t.ppLoading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(47,26,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(51,28,"submit")),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(56,30,"cancel"),"\n "),s.ɵɵadvance(5),s.ɵɵpropertyInterpolate("action",t.ppButtonFormAction,s.ɵɵsanitizeUrl),s.ɵɵadvance(5),s.ɵɵpropertyInterpolate("value",t.ppButtonBusinessId),s.ɵɵadvance(10),s.ɵɵpropertyInterpolate("value",t.returnUrl),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("value",t.returnUrl),s.ɵɵadvance(8),s.ɵɵpropertyInterpolate("value",t.creditAmount),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("value",t.ppButtonCustomField),s.ɵɵadvance(4),s.ɵɵpropertyInterpolate("value",t.subject)}},directives:[m.NgControlStatusGroup,m.NgForm,h.ApiActionDirective,v.A11yTitleDirective,f.NgIf,m.DefaultValueAccessor,m.RequiredValidator,m.NgControlStatus,m.NgModel,m.ɵNgNoValidate,m.RadioControlValueAccessor],pipes:[g.I18nPipe],encapsulation:2})},55732:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AdjustPaymentComponent=void 0;const r=n(32621),o=(n(91674),n(51554),n(36631),n(73828),n(98523)),a=n(84707),s=n(17337),l=n(41799),c=n(32621),d=n(91674),p=n(51554),u=n(73828),m=n(36631),h=n(96832),v=n(56820),f=n(8863),g=n(17337),y=n(41799),x=n(99729);class S{constructor(e,t,n,i){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.logService=i,this.onAdjusted=new r.EventEmitter,this.onCanceled=new r.EventEmitter,this.paymentMethodType=o.PaymentMethodType}submit(){return i(this,void 0,void 0,(function*(){try{const e=new a.PaymentRequest;this.formPromise=this.paymentComponent.createPaymentToken().then((t=>(e.paymentToken=t[0],e.paymentMethodType=t[1],e.postalCode=this.taxInfoComponent.taxInfo.postalCode,e.country=this.taxInfoComponent.taxInfo.country,null==this.organizationId?this.apiService.postAccountPayment(e):(e.taxId=this.taxInfoComponent.taxInfo.taxId,e.state=this.taxInfoComponent.taxInfo.state,e.line1=this.taxInfoComponent.taxInfo.line1,e.line2=this.taxInfoComponent.taxInfo.line2,e.city=this.taxInfoComponent.taxInfo.city,e.state=this.taxInfoComponent.taxInfo.state,this.apiService.postOrganizationPayment(this.organizationId,e))))),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("updatedPaymentMethod")),this.onAdjusted.emit()}catch(e){this.logService.error(e)}}))}cancel(){this.onCanceled.emit()}changeCountry(){"US"===this.taxInfoComponent.taxInfo.country?this.paymentComponent.hideBank=!this.organizationId:(this.paymentComponent.hideBank=!0,this.paymentComponent.method===o.PaymentMethodType.BankAccount&&(this.paymentComponent.method=o.PaymentMethodType.Card,this.paymentComponent.changeMethod()))}}t.AdjustPaymentComponent=S,S.ɵfac=function(e){return new(e||S)(c.ɵɵdirectiveInject(d.ApiService),c.ɵɵdirectiveInject(p.I18nService),c.ɵɵdirectiveInject(u.PlatformUtilsService),c.ɵɵdirectiveInject(m.LogService))},S.ɵcmp=c.ɵɵdefineComponent({type:S,selectors:[["app-adjust-payment"]],viewQuery:function(e,t){if(1&e&&(c.ɵɵviewQuery(s.PaymentComponent,7),c.ɵɵviewQuery(l.TaxInfoComponent,7)),2&e){let e;c.ɵɵqueryRefresh(e=c.ɵɵloadQuery())&&(t.paymentComponent=e.first),c.ɵɵqueryRefresh(e=c.ɵɵloadQuery())&&(t.taxInfoComponent=e.first)}},inputs:{currentType:"currentType",organizationId:"organizationId"},outputs:{onAdjusted:"onAdjusted",onCanceled:"onCanceled"},decls:36,vars:19,consts:[["ngNativeValidate","",1,"card",3,"appApiAction","ngSubmit"],["form",""],[1,"card-body"],["type","button",1,"close",3,"appA11yTitle","click"],["aria-hidden","true"],[1,"card-body-header"],[3,"hideBank","hideCredit"],[3,"onCountryChanged"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button",1,"btn","btn-outline-secondary",3,"click"]],template:function(e,t){if(1&e&&(c.ɵɵelementStart(0,"form",0,1),c.ɵɵlistener("ngSubmit",(function(){return t.submit()})),c.ɵɵtext(2,"\n "),c.ɵɵelementStart(3,"div",2),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"button",3),c.ɵɵlistener("click",(function(){return t.cancel()})),c.ɵɵpipe(6,"i18n"),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"span",4),c.ɵɵtext(9,"×"),c.ɵɵelementEnd(),c.ɵɵtext(10,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(11,"\n "),c.ɵɵelementStart(12,"h3",5),c.ɵɵtext(13),c.ɵɵpipe(14,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(15,"\n "),c.ɵɵelement(16,"app-payment",6),c.ɵɵtext(17,"\n "),c.ɵɵelementStart(18,"app-tax-info",7),c.ɵɵlistener("onCountryChanged",(function(){return t.changeCountry()})),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵelementStart(20,"button",8),c.ɵɵtext(21,"\n "),c.ɵɵelement(22,"i",9),c.ɵɵpipe(23,"i18n"),c.ɵɵtext(24,"\n "),c.ɵɵelementStart(25,"span"),c.ɵɵtext(26),c.ɵɵpipe(27,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(28,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(29,"\n "),c.ɵɵelementStart(30,"button",10),c.ɵɵlistener("click",(function(){return t.cancel()})),c.ɵɵtext(31),c.ɵɵpipe(32,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(33,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(34,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(35,"\n")),2&e){const e=c.ɵɵreference(1);c.ɵɵproperty("appApiAction",t.formPromise),c.ɵɵadvance(5),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(6,9,"cancel")),c.ɵɵadvance(8),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(14,11,null!=t.currentType?"changePaymentMethod":"addPaymentMethod"),"\n "),c.ɵɵadvance(3),c.ɵɵproperty("hideBank",!t.organizationId)("hideCredit",!0),c.ɵɵadvance(4),c.ɵɵproperty("disabled",e.loading),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(23,13,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(27,15,"submit")),c.ɵɵadvance(5),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(32,17,"cancel"),"\n ")}},directives:[h.NgControlStatusGroup,h.NgForm,v.ApiActionDirective,f.A11yTitleDirective,g.PaymentComponent,y.TaxInfoComponent],pipes:[x.I18nPipe],encapsulation:2})},34959:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AdjustStorageComponent=void 0;const r=n(32621),o=(n(68012),n(91674),n(51554),n(36631),n(73828),n(78703)),a=n(17337),s=n(32621),l=n(91674),c=n(51554),d=n(73828),p=n(68012),u=n(36631),m=n(96832),h=n(56820),v=n(8863),f=n(57490),g=n(17337),y=n(99729);function x(e,t){if(1&e&&(s.ɵɵelementStart(0,"div",16),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"strong"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5),s.ɵɵpipe(6,"currency"),s.ɵɵpipe(7,"currency"),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(3),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(4,5,"total"),":"),s.ɵɵadvance(2),s.ɵɵtextInterpolate4(" ",e.storageAdjustment||0," GB ×\n ",s.ɵɵpipeBind2(6,7,e.storageGbPrice,"$")," = ",s.ɵɵpipeBind2(7,10,e.adjustedStorageTotal,"$")," /",s.ɵɵpipeBind1(8,13,e.interval),"\n ")}}class S{constructor(e,t,n,i,o,a){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.router=i,this.activatedRoute=o,this.logService=a,this.storageGbPrice=0,this.add=!0,this.interval="year",this.onAdjusted=new r.EventEmitter,this.onCanceled=new r.EventEmitter,this.storageAdjustment=0}submit(){return i(this,void 0,void 0,(function*(){try{const e=new o.StorageRequest;e.storageGbAdjustment=this.storageAdjustment,this.add||(e.storageGbAdjustment*=-1);let t=!1;const n=()=>i(this,void 0,void 0,(function*(){let n;n=null==this.organizationId?this.formPromise=this.apiService.postAccountStorage(e):this.formPromise=this.apiService.postOrganizationStorage(this.organizationId,e);const i=yield n;if(null!=i&&null!=i.paymentIntentClientSecret)try{yield this.paymentComponent.handleStripeCardPayment(i.paymentIntentClientSecret,null)}catch(r){t=!0}}));this.formPromise=n(),yield this.formPromise,this.onAdjusted.emit(this.storageAdjustment),t?(this.platformUtilsService.showToast("warning",null,this.i18nService.t("couldNotChargeCardPayInvoice"),{timeout:1e4}),this.router.navigate(["../billing"],{relativeTo:this.activatedRoute})):this.platformUtilsService.showToast("success",null,this.i18nService.t("adjustedStorage",e.storageGbAdjustment.toString()))}catch(e){this.logService.error(e)}}))}cancel(){this.onCanceled.emit()}get adjustedStorageTotal(){return this.storageGbPrice*this.storageAdjustment}}t.AdjustStorageComponent=S,S.ɵfac=function(e){return new(e||S)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(d.PlatformUtilsService),s.ɵɵdirectiveInject(p.Router),s.ɵɵdirectiveInject(p.ActivatedRoute),s.ɵɵdirectiveInject(u.LogService))},S.ɵcmp=s.ɵɵdefineComponent({type:S,selectors:[["app-adjust-storage"]],viewQuery:function(e,t){if(1&e&&s.ɵɵviewQuery(a.PaymentComponent,7),2&e){let e;s.ɵɵqueryRefresh(e=s.ɵɵloadQuery())&&(t.paymentComponent=e.first)}},inputs:{storageGbPrice:"storageGbPrice",add:"add",organizationId:"organizationId",interval:"interval"},outputs:{onAdjusted:"onAdjusted",onCanceled:"onCanceled"},decls:52,vars:26,consts:[["ngNativeValidate","",1,"card",3,"appApiAction","ngSubmit"],["form",""],[1,"card-body"],["type","button",1,"close",3,"appA11yTitle","click"],["aria-hidden","true"],[1,"card-body-header"],[1,"row"],[1,"form-group","col-6"],["for","storageAdjustment"],["id","storageAdjustment","type","number","name","StroageGbAdjustment","min","0","max","99","step","1","required","",1,"form-control",3,"ngModel","ngModelChange"],["class","mb-3",4,"ngIf"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"d-block","text-muted","mt-3"],[3,"showMethods"],[1,"mb-3"]],template:function(e,t){if(1&e&&(s.ɵɵelementStart(0,"form",0,1),s.ɵɵlistener("ngSubmit",(function(){return t.submit()})),s.ɵɵtext(2,"\n "),s.ɵɵelementStart(3,"div",2),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"button",3),s.ɵɵlistener("click",(function(){return t.cancel()})),s.ɵɵpipe(6,"i18n"),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"span",4),s.ɵɵtext(9,"×"),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"h3",5),s.ɵɵtext(13),s.ɵɵpipe(14,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(15,"\n "),s.ɵɵelementStart(16,"div",6),s.ɵɵtext(17,"\n "),s.ɵɵelementStart(18,"div",7),s.ɵɵtext(19,"\n "),s.ɵɵelementStart(20,"label",8),s.ɵɵtext(21),s.ɵɵpipe(22,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(23,"\n "),s.ɵɵelementStart(24,"input",9),s.ɵɵlistener("ngModelChange",(function(e){return t.storageAdjustment=e})),s.ɵɵelementEnd(),s.ɵɵtext(25,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(26,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n "),s.ɵɵtemplate(28,x,9,15,"div",10),s.ɵɵtext(29,"\n "),s.ɵɵelementStart(30,"button",11),s.ɵɵtext(31,"\n "),s.ɵɵelement(32,"i",12),s.ɵɵpipe(33,"i18n"),s.ɵɵtext(34,"\n "),s.ɵɵelementStart(35,"span"),s.ɵɵtext(36),s.ɵɵpipe(37,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(38,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(39,"\n "),s.ɵɵelementStart(40,"button",13),s.ɵɵlistener("click",(function(){return t.cancel()})),s.ɵɵtext(41),s.ɵɵpipe(42,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(43,"\n "),s.ɵɵelementStart(44,"small",14),s.ɵɵtext(45),s.ɵɵpipe(46,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(47,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(48,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(49,"\n"),s.ɵɵelement(50,"app-payment",15),s.ɵɵtext(51,"\n")),2&e){const e=s.ɵɵreference(1);s.ɵɵproperty("appApiAction",t.formPromise),s.ɵɵadvance(5),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(6,12,"cancel")),s.ɵɵadvance(8),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(14,14,t.add?"addStorage":"removeStorage")),s.ɵɵadvance(8),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(22,16,t.add?"gbStorageAdd":"gbStorageRemove")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",t.storageAdjustment),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",t.add),s.ɵɵadvance(2),s.ɵɵproperty("disabled",e.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(33,18,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(37,20,"submit")),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(42,22,"cancel"),"\n "),s.ɵɵadvance(4),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(46,24,t.add?"storageAddNote":"storageRemoveNote"),"\n "),s.ɵɵadvance(5),s.ɵɵproperty("showMethods",!1)}},directives:[m.NgControlStatusGroup,m.NgForm,h.ApiActionDirective,v.A11yTitleDirective,m.MinValidator,m.MaxValidator,m.NumberValueAccessor,m.DefaultValueAccessor,m.RequiredValidator,m.NgControlStatus,m.NgModel,f.NgIf,g.PaymentComponent],pipes:[y.I18nPipe,f.CurrencyPipe],encapsulation:2})},83011:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ApiKeyComponent=void 0;n(36631),n(57055);const r=n(32621),o=n(57055),a=n(36631),s=n(96832),l=n(56820),c=n(8863),d=n(57490),p=n(4158),u=n(51626),m=n(99729);function h(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"app-user-verification",15),r.ɵɵlistener("ngModelChange",(function(t){r.ɵɵrestoreView(e);return r.ɵɵnextContext().masterPassword=t})),r.ɵɵtext(1,"\n "),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext();r.ɵɵproperty("ngModel",e.masterPassword)}}function v(e,t){if(1&e&&(r.ɵɵelementStart(0,"app-callout",16),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(1),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(2,1,e.apiKeyWarning))}}function f(e,t){if(1&e&&(r.ɵɵelementStart(0,"app-callout",17),r.ɵɵpipe(1,"i18n"),r.ɵɵtext(2,"\n "),r.ɵɵelementStart(3,"p",18),r.ɵɵtext(4,"\n "),r.ɵɵelementStart(5,"strong"),r.ɵɵtext(6,"client_id:"),r.ɵɵelementEnd(),r.ɵɵelement(7,"br"),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"code"),r.ɵɵtext(10),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelementStart(13,"p",18),r.ɵɵtext(14,"\n "),r.ɵɵelementStart(15,"strong"),r.ɵɵtext(16,"client_secret:"),r.ɵɵelementEnd(),r.ɵɵelement(17,"br"),r.ɵɵtext(18,"\n "),r.ɵɵelementStart(19,"code"),r.ɵɵtext(20),r.ɵɵelementEnd(),r.ɵɵtext(21,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(22,"\n "),r.ɵɵelementStart(23,"p",18),r.ɵɵtext(24,"\n "),r.ɵɵelementStart(25,"strong"),r.ɵɵtext(26,"scope:"),r.ɵɵelementEnd(),r.ɵɵelement(27,"br"),r.ɵɵtext(28,"\n "),r.ɵɵelementStart(29,"code"),r.ɵɵtext(30),r.ɵɵelementEnd(),r.ɵɵtext(31,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(32,"\n "),r.ɵɵelementStart(33,"p",19),r.ɵɵtext(34,"\n "),r.ɵɵelementStart(35,"strong"),r.ɵɵtext(36,"grant_type:"),r.ɵɵelementEnd(),r.ɵɵelement(37,"br"),r.ɵɵtext(38,"\n "),r.ɵɵelementStart(39,"code"),r.ɵɵtext(40),r.ɵɵelementEnd(),r.ɵɵtext(41,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(42,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(1,5,"oauth2ClientCredentials")),r.ɵɵadvance(10),r.ɵɵtextInterpolate(e.clientId),r.ɵɵadvance(10),r.ɵɵtextInterpolate(e.clientSecret),r.ɵɵadvance(10),r.ɵɵtextInterpolate(e.scope),r.ɵɵadvance(10),r.ɵɵtextInterpolate(e.grantType)}}function g(e,t){if(1&e&&(r.ɵɵelementStart(0,"button",20),r.ɵɵtext(1,"\n "),r.ɵɵelement(2,"i",21),r.ɵɵpipe(3,"i18n"),r.ɵɵtext(4,"\n "),r.ɵɵelementStart(5,"span"),r.ɵɵtext(6),r.ɵɵpipe(7,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(),t=r.ɵɵreference(5);r.ɵɵproperty("disabled",t.loading),r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(3,3,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(7,5,e.isRotation?"rotateApiKey":"viewApiKey"))}}class y{constructor(e,t){this.userVerificationService=e,this.logService=t}submit(){return i(this,void 0,void 0,(function*(){try{this.formPromise=this.userVerificationService.buildRequest(this.masterPassword).then((e=>this.postKey(this.entityId,e)));const e=yield this.formPromise;this.clientSecret=e.apiKey,this.clientId=`${this.keyType}.${this.entityId}`}catch(e){this.logService.error(e)}}))}}t.ApiKeyComponent=y,y.ɵfac=function(e){return new(e||y)(r.ɵɵdirectiveInject(o.UserVerificationService),r.ɵɵdirectiveInject(a.LogService))},y.ɵcmp=r.ɵɵdefineComponent({type:y,selectors:[["app-api-key"]],decls:46,vars:17,consts:[["role","dialog","aria-modal","true","aria-labelledby","apiKeyTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","apiKeyTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["ngDefaultControl","","name","secret",3,"ngModel","ngModelChange",4,"ngIf"],["type","warning",4,"ngIf"],["type","info","icon","bwi bwi-key",3,"title",4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["ngDefaultControl","","name","secret",3,"ngModel","ngModelChange"],["type","warning"],["type","info","icon","bwi bwi-key",3,"title"],[1,"mb-1"],[1,"mb-0"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"form",2,3),r.ɵɵlistener("ngSubmit",(function(){return t.submit()})),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"div",4),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"h2",5),r.ɵɵtext(10),r.ɵɵpipe(11,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelementStart(13,"button",6),r.ɵɵpipe(14,"i18n"),r.ɵɵtext(15,"\n "),r.ɵɵelementStart(16,"span",7),r.ɵɵtext(17,"×"),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(20,"\n "),r.ɵɵelementStart(21,"div",8),r.ɵɵtext(22,"\n "),r.ɵɵelementStart(23,"p"),r.ɵɵtext(24),r.ɵɵpipe(25,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(26,"\n "),r.ɵɵtemplate(27,h,2,1,"app-user-verification",9),r.ɵɵtext(28,"\n\n "),r.ɵɵtemplate(29,v,3,3,"app-callout",10),r.ɵɵtext(30,"\n "),r.ɵɵtemplate(31,f,43,7,"app-callout",11),r.ɵɵtext(32,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(33,"\n "),r.ɵɵelementStart(34,"div",12),r.ɵɵtext(35,"\n "),r.ɵɵtemplate(36,g,9,7,"button",13),r.ɵɵtext(37,"\n "),r.ɵɵelementStart(38,"button",14),r.ɵɵtext(39),r.ɵɵpipe(40,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(41,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(42,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(43,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(44,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(45,"\n")),2&e&&(r.ɵɵadvance(4),r.ɵɵproperty("appApiAction",t.formPromise),r.ɵɵadvance(6),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(11,9,t.apiKeyTitle)),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(14,11,"close")),r.ɵɵadvance(11),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(25,13,t.apiKeyDescription)),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",!t.clientSecret),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.clientSecret),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.clientSecret),r.ɵɵadvance(5),r.ɵɵproperty("ngIf",!t.clientSecret),r.ɵɵadvance(3),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(40,15,"close"),"\n "))},directives:[s.NgControlStatusGroup,s.NgForm,l.ApiActionDirective,c.A11yTitleDirective,d.NgIf,p.UserVerificationComponent,s.DefaultValueAccessor,s.NgControlStatus,s.NgModel,u.CalloutComponent],pipes:[m.I18nPipe],encapsulation:2})},6131:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BillingSyncKeyComponent=void 0;n(91674),n(36631);const r=n(24643),o=n(79977),a=n(29602),s=n(19036),l=n(32621),c=n(91674),d=n(36631),p=n(96832),u=n(56820),m=n(8863),h=n(45728),v=n(48198),f=n(99729);class g{constructor(e,t){this.apiService=e,this.logService=t}submit(){var e;return i(this,void 0,void 0,(function*(){try{const t=new s.OrganizationConnectionRequest(this.entityId,r.OrganizationConnectionType.CloudBillingSync,!0,new a.BillingSyncConfigRequest(this.billingSyncKey));null==this.existingConnectionId?this.formPromise=this.apiService.createOrganizationConnection(t,o.BillingSyncConfigApi):this.formPromise=this.apiService.updateOrganizationConnection(t,o.BillingSyncConfigApi,this.existingConnectionId);const n=yield this.formPromise;this.existingConnectionId=null==n?void 0:n.id,this.billingSyncKey=null===(e=null==n?void 0:n.config)||void 0===e?void 0:e.billingSyncKey,this.setParentConnection(n)}catch(t){this.logService.error(t)}}))}deleteConnection(){return i(this,void 0,void 0,(function*(){this.formPromise=this.apiService.deleteOrganizationConnection(this.existingConnectionId),yield this.formPromise,this.setParentConnection(null)}))}}t.BillingSyncKeyComponent=g,g.ɵfac=function(e){return new(e||g)(l.ɵɵdirectiveInject(c.ApiService),l.ɵɵdirectiveInject(d.LogService))},g.ɵcmp=l.ɵɵdefineComponent({type:g,selectors:[["app-billing-sync-key"]],decls:77,vars:36,consts:[["role","dialog","aria-modal","true","aria-labelledby","billingSyncTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","billingSyncTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],[1,"form-group"],["for","billingSyncKey"],["id","billingSyncKey","type","input","name","billingSyncKey","required","","appAutofocus","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"ml-auto"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","click"],["deleteBtn",""],["aria-hidden","true",1,"bwi","bwi-trash","bwi-lg","bwi-fw",3,"hidden"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-lg","bwi-fw",3,"hidden","title"]],template:function(e,t){if(1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"form",2,3),l.ɵɵlistener("ngSubmit",(function(){return t.submit()})),l.ɵɵtext(6,"\n "),l.ɵɵelementStart(7,"div",4),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"h2",5),l.ɵɵtext(10),l.ɵɵpipe(11,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(12,"\n "),l.ɵɵelementStart(13,"button",6),l.ɵɵpipe(14,"i18n"),l.ɵɵtext(15,"\n "),l.ɵɵelementStart(16,"span",7),l.ɵɵtext(17,"×"),l.ɵɵelementEnd(),l.ɵɵtext(18,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(19,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(20,"\n "),l.ɵɵelementStart(21,"div",8),l.ɵɵtext(22,"\n "),l.ɵɵelementStart(23,"p"),l.ɵɵtext(24),l.ɵɵpipe(25,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(26,"\n "),l.ɵɵelementStart(27,"div",9),l.ɵɵtext(28,"\n "),l.ɵɵelementStart(29,"label",10),l.ɵɵtext(30),l.ɵɵpipe(31,"i18n"),l.ɵɵelementStart(32,"small"),l.ɵɵtext(33,"("),l.ɵɵelementEnd(),l.ɵɵelementStart(34,"small"),l.ɵɵtext(35),l.ɵɵpipe(36,"i18n"),l.ɵɵelementEnd(),l.ɵɵelementStart(37,"small"),l.ɵɵtext(38,")"),l.ɵɵelementEnd(),l.ɵɵelementEnd(),l.ɵɵtext(39,"\n "),l.ɵɵelementStart(40,"input",11),l.ɵɵlistener("ngModelChange",(function(e){return t.billingSyncKey=e})),l.ɵɵelementEnd(),l.ɵɵtext(41,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(42,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(43,"\n "),l.ɵɵelementStart(44,"div",12),l.ɵɵtext(45,"\n "),l.ɵɵelementStart(46,"button",13),l.ɵɵtext(47,"\n "),l.ɵɵelement(48,"i",14),l.ɵɵpipe(49,"i18n"),l.ɵɵtext(50,"\n "),l.ɵɵelementStart(51,"span"),l.ɵɵtext(52),l.ɵɵpipe(53,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(54,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(55,"\n "),l.ɵɵelementStart(56,"button",15),l.ɵɵtext(57),l.ɵɵpipe(58,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(59,"\n "),l.ɵɵelementStart(60,"div",16),l.ɵɵtext(61,"\n "),l.ɵɵelementStart(62,"button",17,18),l.ɵɵlistener("click",(function(){return t.deleteConnection()})),l.ɵɵpipe(64,"i18n"),l.ɵɵtext(65,"\n "),l.ɵɵelement(66,"i",19),l.ɵɵtext(67,"\n "),l.ɵɵelement(68,"i",20),l.ɵɵpipe(69,"i18n"),l.ɵɵtext(70,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(71,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(72,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(73,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(74,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(75,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(76,"\n")),2&e){const e=l.ɵɵreference(5);l.ɵɵadvance(4),l.ɵɵproperty("appApiAction",t.formPromise),l.ɵɵadvance(6),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(11,16,"manageBillingSync")),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(14,18,"close")),l.ɵɵadvance(11),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(25,20,"billingSyncKeyDesc")),l.ɵɵadvance(6),l.ɵɵtextInterpolate1("",l.ɵɵpipeBind1(31,22,"billingSyncKey")," "),l.ɵɵadvance(5),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(36,24,"required")),l.ɵɵadvance(5),l.ɵɵproperty("ngModel",t.billingSyncKey),l.ɵɵadvance(6),l.ɵɵproperty("disabled",e.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(49,26,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(53,28,"save")),l.ɵɵadvance(5),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(58,30,"cancel"),"\n "),l.ɵɵadvance(5),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(64,32,"delete")),l.ɵɵproperty("disabled",e.loading),l.ɵɵadvance(4),l.ɵɵproperty("hidden",e.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(69,34,"loading")),l.ɵɵproperty("hidden",!e.loading)}},directives:[p.NgControlStatusGroup,p.NgForm,u.ApiActionDirective,m.A11yTitleDirective,p.DefaultValueAccessor,p.RequiredValidator,h.AutofocusDirective,v.InputVerbatimDirective,p.NgControlStatus,p.NgModel],pipes:[f.I18nPipe],encapsulation:2})},74939:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeEmailComponent=void 0;n(91674),n(85714),n(51554),n(36631),n(45552),n(73828),n(73569);const r=n(97374),o=n(79669),a=n(8283),s=n(32621),l=n(91674),c=n(51554),d=n(73828),p=n(85714),u=n(45552),m=n(36631),h=n(73569),v=n(96832),f=n(56820),g=n(57490),y=n(48198),x=n(51626),S=n(99729);function b(e,t){1&e&&(s.ɵɵelementStart(0,"app-callout",14),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,1,"changeEmailTwoFactorWarning"),"\n "))}function w(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"hr"),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"p"),s.ɵɵtext(5),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"app-callout",14),s.ɵɵtext(9),s.ɵɵpipe(10,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"div",3),s.ɵɵtext(13,"\n "),s.ɵɵelementStart(14,"div",4),s.ɵɵtext(15,"\n "),s.ɵɵelementStart(16,"div",5),s.ɵɵtext(17,"\n "),s.ɵɵelementStart(18,"label",15),s.ɵɵtext(19),s.ɵɵpipe(20,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementStart(22,"input",16),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().token=t})),s.ɵɵelementEnd(),s.ɵɵtext(23,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(24,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(25,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(26,"\n "),s.ɵɵelementContainerEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind2(6,4,"changeEmailDesc",e.newEmail)),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(10,7,"loggedOutWarning")),s.ɵɵadvance(10),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(20,9,"code")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.token)}}function C(e,t){1&e&&(s.ɵɵelementStart(0,"span"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,1,"continue")))}function I(e,t){1&e&&(s.ɵɵelementStart(0,"span"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,1,"changeEmail")))}function E(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"button",17),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().reset()})),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()}2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,1,"cancel"),"\n "))}class P{constructor(e,t,n,i,r,o,a){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.cryptoService=i,this.messagingService=r,this.logService=o,this.stateService=a,this.tokenSent=!1,this.showTwoFactorEmailWarning=!1}ngOnInit(){return i(this,void 0,void 0,(function*(){const e=yield this.apiService.getTwoFactorProviders();this.showTwoFactorEmailWarning=e.data.some((e=>e.type===r.TwoFactorProviderType.Email&&e.enabled))}))}submit(){return i(this,void 0,void 0,(function*(){if(yield this.cryptoService.hasEncKey())if(this.newEmail=this.newEmail.trim().toLowerCase(),this.tokenSent){const t=new o.EmailRequest;t.token=this.token,t.newEmail=this.newEmail,t.masterPasswordHash=yield this.cryptoService.hashPassword(this.masterPassword,null);const n=yield this.stateService.getKdfType(),i=yield this.stateService.getKdfIterations(),r=yield this.cryptoService.makeKey(this.masterPassword,this.newEmail,n,i);t.newMasterPasswordHash=yield this.cryptoService.hashPassword(this.masterPassword,r);const a=yield this.cryptoService.remakeEncKey(r);t.key=a[1].encryptedString;try{this.formPromise=this.apiService.postEmail(t),yield this.formPromise,this.reset(),this.platformUtilsService.showToast("success",this.i18nService.t("emailChanged"),this.i18nService.t("logBackIn")),this.messagingService.send("logout")}catch(e){this.logService.error(e)}}else{const t=new a.EmailTokenRequest;t.newEmail=this.newEmail,t.masterPasswordHash=yield this.cryptoService.hashPassword(this.masterPassword,null);try{this.formPromise=this.apiService.postEmailToken(t),yield this.formPromise,this.tokenSent=!0}catch(e){this.logService.error(e)}}else this.platformUtilsService.showToast("error",null,this.i18nService.t("updateKey"))}))}reset(){this.token=this.newEmail=this.masterPassword=null,this.tokenSent=!1}}t.ChangeEmailComponent=P,P.ɵfac=function(e){return new(e||P)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(d.PlatformUtilsService),s.ɵɵdirectiveInject(p.CryptoService),s.ɵɵdirectiveInject(u.MessagingService),s.ɵɵdirectiveInject(m.LogService),s.ɵɵdirectiveInject(h.StateService))},P.ɵcmp=s.ɵɵdefineComponent({type:P,selectors:[["app-change-email"]],decls:44,vars:20,consts:[["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],["type","warning",4,"ngIf"],[1,"row"],[1,"col-6"],[1,"form-group"],["for","masterPassword"],["id","masterPassword","type","password","name","MasterPasswordHash","required","","appInputVerbatim","",1,"form-control",3,"ngModel","readonly","ngModelChange"],["for","newEmail"],["id","newEmail","type","text","name","NewEmail","required","","inputmode","email","appInputVerbatim","false",1,"form-control",3,"ngModel","readonly","ngModelChange"],[4,"ngIf"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","class","btn btn-outline-secondary",3,"click",4,"ngIf"],["type","warning"],["for","token"],["id","token","type","text","name","Token","required","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],["type","button",1,"btn","btn-outline-secondary",3,"click"]],template:function(e,t){if(1&e&&(s.ɵɵelementStart(0,"form",0,1),s.ɵɵlistener("ngSubmit",(function(){return t.submit()})),s.ɵɵtext(2,"\n "),s.ɵɵtemplate(3,b,3,3,"app-callout",2),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"div",3),s.ɵɵtext(6,"\n "),s.ɵɵelementStart(7,"div",4),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"div",5),s.ɵɵtext(10,"\n "),s.ɵɵelementStart(11,"label",6),s.ɵɵtext(12),s.ɵɵpipe(13,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"input",7),s.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),s.ɵɵelementEnd(),s.ɵɵtext(16,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(17,"\n "),s.ɵɵelementStart(18,"div",5),s.ɵɵtext(19,"\n "),s.ɵɵelementStart(20,"label",8),s.ɵɵtext(21),s.ɵɵpipe(22,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(23,"\n "),s.ɵɵelementStart(24,"input",9),s.ɵɵlistener("ngModelChange",(function(e){return t.newEmail=e})),s.ɵɵelementEnd(),s.ɵɵtext(25,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(26,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(28,"\n "),s.ɵɵtemplate(29,w,27,11,"ng-container",10),s.ɵɵtext(30,"\n "),s.ɵɵelementStart(31,"button",11),s.ɵɵtext(32,"\n "),s.ɵɵelement(33,"i",12),s.ɵɵpipe(34,"i18n"),s.ɵɵtext(35,"\n "),s.ɵɵtemplate(36,C,3,3,"span",10),s.ɵɵtext(37,"\n "),s.ɵɵtemplate(38,I,3,3,"span",10),s.ɵɵtext(39,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(40,"\n "),s.ɵɵtemplate(41,E,3,3,"button",13),s.ɵɵtext(42,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(43,"\n")),2&e){const e=s.ɵɵreference(1);s.ɵɵproperty("appApiAction",t.formPromise),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",t.showTwoFactorEmailWarning),s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(13,14,"masterPass")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",t.masterPassword)("readonly",t.tokenSent),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(22,16,"newEmail")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",t.newEmail)("readonly",t.tokenSent),s.ɵɵadvance(5),s.ɵɵproperty("ngIf",t.tokenSent),s.ɵɵadvance(2),s.ɵɵproperty("disabled",e.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(34,18,"loading")),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!t.tokenSent),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.tokenSent),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",t.tokenSent)}},directives:[v.NgControlStatusGroup,v.NgForm,f.ApiActionDirective,g.NgIf,v.DefaultValueAccessor,v.RequiredValidator,y.InputVerbatimDirective,v.NgControlStatus,v.NgModel,x.CalloutComponent],pipes:[S.I18nPipe],encapsulation:2})},48381:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeKdfComponent=void 0;n(91674),n(85714),n(51554),n(36631),n(45552),n(73828),n(73569);const r=n(20971),o=n(17287),a=n(32621),s=n(91674),l=n(51554),c=n(73828),d=n(85714),p=n(45552),u=n(36631),m=n(73569),h=n(20138),v=n(96832),f=n(56820),g=n(48198),y=n(8863),x=n(57490),S=n(52767),b=n(99729);function w(e,t){if(1&e&&(a.ɵɵelementStart(0,"option",22),a.ɵɵtext(1),a.ɵɵelementEnd()),2&e){const e=t.$implicit;a.ɵɵproperty("ngValue",e.value),a.ɵɵadvance(1),a.ɵɵtextInterpolate(e.name)}}class C{constructor(e,t,n,i,o,a,s){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.cryptoService=i,this.messagingService=o,this.logService=a,this.stateService=s,this.kdf=r.KdfType.PBKDF2_SHA256,this.kdfOptions=[],this.recommendedKdfIterations=r.DEFAULT_KDF_ITERATIONS,this.kdfOptions=[{name:"PBKDF2 SHA-256",value:r.KdfType.PBKDF2_SHA256}]}ngOnInit(){return i(this,void 0,void 0,(function*(){this.kdf=yield this.stateService.getKdfType(),this.kdfIterations=yield this.stateService.getKdfIterations()}))}submit(){return i(this,void 0,void 0,(function*(){if(!(yield this.cryptoService.hasEncKey()))return void this.platformUtilsService.showToast("error",null,this.i18nService.t("updateKey"));const e=new o.KdfRequest;e.kdf=this.kdf,e.kdfIterations=this.kdfIterations,e.masterPasswordHash=yield this.cryptoService.hashPassword(this.masterPassword,null);const t=yield this.stateService.getEmail(),n=yield this.cryptoService.makeKey(this.masterPassword,t,this.kdf,this.kdfIterations);e.newMasterPasswordHash=yield this.cryptoService.hashPassword(this.masterPassword,n);const i=yield this.cryptoService.remakeEncKey(n);e.key=i[1].encryptedString;try{this.formPromise=this.apiService.postAccountKdf(e),yield this.formPromise,this.platformUtilsService.showToast("success",this.i18nService.t("encKeySettingsChanged"),this.i18nService.t("logBackIn")),this.messagingService.send("logout")}catch(r){this.logService.error(r)}}))}}t.ChangeKdfComponent=C,C.ɵfac=function(e){return new(e||C)(a.ɵɵdirectiveInject(s.ApiService),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(c.PlatformUtilsService),a.ɵɵdirectiveInject(d.CryptoService),a.ɵɵdirectiveInject(p.MessagingService),a.ɵɵdirectiveInject(u.LogService),a.ɵɵdirectiveInject(m.StateService))},C.ɵcmp=a.ɵɵdefineComponent({type:C,selectors:[["app-change-kdf"]],decls:102,vars:48,consts:[[1,"tabbed-header"],["type","warning"],["ngNativeValidate","","autocomplete","off",3,"appApiAction","ngSubmit"],["form",""],[1,"row"],[1,"col-6"],[1,"form-group"],["for","kdfMasterPassword"],["id","kdfMasterPassword","type","password","name","MasterPasswordHash","required","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],[1,"form-group","mb-0"],["for","kdf"],["href","https://en.wikipedia.org/wiki/Key_derivation_function","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],["id","kdf","name","Kdf","required","",1,"form-control",3,"ngModel","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],["for","kdfIterations"],["href","https://bitwarden.com/help/what-encryption-is-used/#pbkdf2","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["id","kdfIterations","type","number","min","5000","max","2000000","name","KdfIterations","required","",1,"form-control",3,"ngModel","ngModelChange"],[1,"col-12"],[1,"small","form-text","text-muted"],["bit-button","","buttonType","primary",1,"btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[3,"ngValue"]],template:function(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"h1"),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n"),a.ɵɵelementStart(7,"bit-callout",1),a.ɵɵtext(8),a.ɵɵpipe(9,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(10,"\n"),a.ɵɵelementStart(11,"form",2,3),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(13,"\n "),a.ɵɵelementStart(14,"div",4),a.ɵɵtext(15,"\n "),a.ɵɵelementStart(16,"div",5),a.ɵɵtext(17,"\n "),a.ɵɵelementStart(18,"div",6),a.ɵɵtext(19,"\n "),a.ɵɵelementStart(20,"label",7),a.ɵɵtext(21),a.ɵɵpipe(22,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(23,"\n "),a.ɵɵelementStart(24,"input",8),a.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),a.ɵɵelementEnd(),a.ɵɵtext(25,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(26,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(27,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(28,"\n "),a.ɵɵelementStart(29,"div",4),a.ɵɵtext(30,"\n "),a.ɵɵelementStart(31,"div",5),a.ɵɵtext(32,"\n "),a.ɵɵelementStart(33,"div",9),a.ɵɵtext(34,"\n "),a.ɵɵelementStart(35,"label",10),a.ɵɵtext(36),a.ɵɵpipe(37,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(38,"\n "),a.ɵɵelementStart(39,"a",11),a.ɵɵpipe(40,"i18n"),a.ɵɵtext(41,"\n "),a.ɵɵelement(42,"i",12),a.ɵɵtext(43,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(44,"\n "),a.ɵɵelementStart(45,"select",13),a.ɵɵlistener("ngModelChange",(function(e){return t.kdf=e})),a.ɵɵtext(46,"\n "),a.ɵɵtemplate(47,w,2,2,"option",14),a.ɵɵtext(48,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(49,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(50,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(51,"\n "),a.ɵɵelementStart(52,"div",5),a.ɵɵtext(53,"\n "),a.ɵɵelementStart(54,"div",9),a.ɵɵtext(55,"\n "),a.ɵɵelementStart(56,"label",15),a.ɵɵtext(57),a.ɵɵpipe(58,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(59,"\n "),a.ɵɵelementStart(60,"a",16),a.ɵɵpipe(61,"i18n"),a.ɵɵtext(62,"\n "),a.ɵɵelement(63,"i",12),a.ɵɵtext(64,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(65,"\n "),a.ɵɵelementStart(66,"input",17),a.ɵɵlistener("ngModelChange",(function(e){return t.kdfIterations=e})),a.ɵɵelementEnd(),a.ɵɵtext(67,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(68,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(69,"\n "),a.ɵɵelementStart(70,"div",18),a.ɵɵtext(71,"\n "),a.ɵɵelementStart(72,"div",6),a.ɵɵtext(73,"\n "),a.ɵɵelementStart(74,"div",19),a.ɵɵtext(75,"\n "),a.ɵɵelementStart(76,"p"),a.ɵɵtext(77),a.ɵɵpipe(78,"i18n"),a.ɵɵpipe(79,"number"),a.ɵɵelementEnd(),a.ɵɵtext(80,"\n "),a.ɵɵelementStart(81,"strong"),a.ɵɵtext(82),a.ɵɵpipe(83,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(84),a.ɵɵpipe(85,"i18n"),a.ɵɵpipe(86,"number"),a.ɵɵelementEnd(),a.ɵɵtext(87,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(88,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(89,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(90,"\n "),a.ɵɵelementStart(91,"button",20),a.ɵɵtext(92,"\n "),a.ɵɵelement(93,"i",21),a.ɵɵpipe(94,"i18n"),a.ɵɵtext(95,"\n "),a.ɵɵelementStart(96,"span"),a.ɵɵtext(97),a.ɵɵpipe(98,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(99,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(100,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(101,"\n")),2&e){const e=a.ɵɵreference(12);a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,18,"encKeySettings")),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(9,20,"loggedOutWarning")),a.ɵɵadvance(3),a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(10),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(22,22,"masterPass")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",t.masterPassword),a.ɵɵadvance(12),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(37,24,"kdfAlgorithm")),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(40,26,"learnMore")),a.ɵɵadvance(6),a.ɵɵproperty("ngModel",t.kdf),a.ɵɵadvance(2),a.ɵɵproperty("ngForOf",t.kdfOptions),a.ɵɵadvance(10),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(58,28,"kdfIterations")),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(61,30,"learnMore")),a.ɵɵadvance(6),a.ɵɵproperty("ngModel",t.kdfIterations),a.ɵɵadvance(11),a.ɵɵtextInterpolate(a.ɵɵpipeBind2(78,32,"kdfIterationsDesc",a.ɵɵpipeBind1(79,35,t.recommendedKdfIterations))),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(83,37,"warning")),a.ɵɵadvance(2),a.ɵɵtextInterpolate1(": ",a.ɵɵpipeBind2(85,39,"kdfIterationsWarning",a.ɵɵpipeBind1(86,42,5e4)),"\n "),a.ɵɵadvance(7),a.ɵɵproperty("disabled",e.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(94,44,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(98,46,"changeKdf"))}},directives:[h.CalloutComponent,v.NgControlStatusGroup,v.NgForm,f.ApiActionDirective,v.DefaultValueAccessor,v.RequiredValidator,g.InputVerbatimDirective,v.NgControlStatus,v.NgModel,y.A11yTitleDirective,v.SelectControlValueAccessor,x.NgForOf,v.MinValidator,v.MaxValidator,v.NumberValueAccessor,S.ButtonComponent,v.NgSelectOption,v.ɵNgSelectMultipleOption],pipes:[b.I18nPipe,x.DecimalPipe],encapsulation:2})},11676:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ChangePasswordComponent=void 0;n(68012);const r=n(16545),o=(n(91674),n(45330),n(85714),n(88308),n(51554),n(72277),n(45552),n(63513),n(84275),n(73828),n(62166),n(76532),n(73569),n(9724),n(47200)),a=n(82769),s=n(24906),l=n(8468),c=n(49586),d=n(27784),p=n(49472),u=n(12909),m=n(93357),h=n(32621),v=n(51554),f=n(85714),g=n(45552),y=n(73569),x=n(84275),S=n(73828),b=n(62166),w=n(88308),C=n(45330),I=n(9724),E=n(91674),P=n(76532),O=n(63513),k=n(72277),A=n(68012),T=n(20138),M=n(57490),B=n(96832),D=n(56820),R=n(48198),F=n(40946),U=n(8863),V=n(52767),N=n(51626),_=n(99729);function j(e,t){if(1&e&&(h.ɵɵelementStart(0,"app-callout",22),h.ɵɵtext(1,"\n"),h.ɵɵelementEnd()),2&e){const e=h.ɵɵnextContext();h.ɵɵproperty("enforcedPolicyOptions",e.enforcedPolicyOptions)}}class z extends r.ChangePasswordComponent{constructor(e,t,n,i,r,o,a,s,l,c,d,p,u,m,h){super(e,t,n,r,o,a,i),this.folderService=s,this.cipherService=l,this.syncService=c,this.apiService=d,this.sendService=p,this.organizationService=u,this.keyConnectorService=m,this.router=h,this.rotateEncKey=!1}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){(yield this.keyConnectorService.getUsesKeyConnector())&&this.router.navigate(["/settings/security/two-factor"]),yield e.ngOnInit.call(this)}))}rotateEncKeyClicked(){return i(this,void 0,void 0,(function*(){if(this.rotateEncKey){const e=yield this.cipherService.getAllDecrypted();let t=!1;if(null!=e)for(let n=0;nsuper.submit}});return i(this,void 0,void 0,(function*(){(yield this.cryptoService.hasEncKey())?yield e.submit.call(this):this.platformUtilsService.showToast("error",null,this.i18nService.t("updateKey"))}))}setupSubmitActions(){const e=Object.create(null,{setupSubmitActions:{get:()=>super.setupSubmitActions}});return i(this,void 0,void 0,(function*(){return null==this.currentMasterPassword||""===this.currentMasterPassword?(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassRequired")),!1):(this.rotateEncKey&&(yield this.syncService.fullSync(!0)),e.setupSubmitActions.call(this))}))}performSubmitActions(e,t,n){return i(this,void 0,void 0,(function*(){const i=new p.PasswordRequest;i.masterPasswordHash=yield this.cryptoService.hashPassword(this.currentMasterPassword,null),i.newMasterPasswordHash=e,i.key=n[1].encryptedString;try{this.rotateEncKey?this.formPromise=this.apiService.postPassword(i).then((()=>this.updateKey(t,i.newMasterPasswordHash))):this.formPromise=this.apiService.postPassword(i),yield this.formPromise,this.platformUtilsService.showToast("success",this.i18nService.t("masterPasswordChanged"),this.i18nService.t("logBackIn")),this.messagingService.send("logout")}catch(r){this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred"))}}))}updateKey(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.cryptoService.makeEncKey(e),r=yield this.cryptoService.getPrivateKey();let o=null;null!=r&&(o=yield this.cryptoService.encrypt(r,n[0]));const a=new m.UpdateKeyRequest;a.privateKey=null!=o?o.encryptedString:null,a.key=n[1].encryptedString,a.masterPasswordHash=t;const l=yield this.folderService.getAllDecrypted();for(let e=0;ei(this,void 0,void 0,(function*(){var t;const i=yield this.cryptoService.decryptToBytes(e.key,null);e.key=null!==(t=yield this.cryptoService.encrypt(i,n[0]))&&void 0!==t?t:e.key,a.sends.push(new u.SendWithIdRequest(e))}))))),yield this.apiService.postAccountKey(a),yield this.updateEmergencyAccesses(n[0]),yield this.updateAllResetPasswordKeys(n[0])}))}updateEmergencyAccesses(e){return i(this,void 0,void 0,(function*(){const t=yield this.apiService.getEmergencyAccessTrusted(),n=[o.EmergencyAccessStatusType.Confirmed,o.EmergencyAccessStatusType.RecoveryInitiated,o.EmergencyAccessStatusType.RecoveryApproved],i=t.data.filter((e=>n.includes(e.status)));for(const r of i){const t=yield this.apiService.getUserPublicKey(r.granteeId),n=a.Utils.fromB64ToArray(t.publicKey),i=yield this.cryptoService.rsaEncrypt(e.key,n.buffer),o=new l.EmergencyAccessUpdateRequest;o.type=r.type,o.waitTimeDays=r.waitTimeDays,o.keyEncrypted=i.encryptedString,yield this.apiService.putEmergencyAccess(r.id,o)}}))}updateAllResetPasswordKeys(e){return i(this,void 0,void 0,(function*(){const t=yield this.organizationService.getAll();for(const n of t){if(!n.resetPasswordEnrolled)continue;const t=yield this.apiService.getOrganizationKeys(n.id),i=a.Utils.fromB64ToArray(null==t?void 0:t.publicKey),r=yield this.cryptoService.rsaEncrypt(e.key,i.buffer),o=new d.OrganizationUserResetPasswordEnrollmentRequest;o.resetPasswordKey=r.encryptedString,yield this.apiService.putOrganizationUserResetPasswordEnrollment(n.id,n.userId,o)}}))}}t.ChangePasswordComponent=z,z.ɵfac=function(e){return new(e||z)(h.ɵɵdirectiveInject(v.I18nService),h.ɵɵdirectiveInject(f.CryptoService),h.ɵɵdirectiveInject(g.MessagingService),h.ɵɵdirectiveInject(y.StateService),h.ɵɵdirectiveInject(x.PasswordGenerationService),h.ɵɵdirectiveInject(S.PlatformUtilsService),h.ɵɵdirectiveInject(b.PolicyService),h.ɵɵdirectiveInject(w.FolderService),h.ɵɵdirectiveInject(C.CipherService),h.ɵɵdirectiveInject(I.SyncService),h.ɵɵdirectiveInject(E.ApiService),h.ɵɵdirectiveInject(P.SendService),h.ɵɵdirectiveInject(O.OrganizationService),h.ɵɵdirectiveInject(k.KeyConnectorService),h.ɵɵdirectiveInject(A.Router))},z.ɵcmp=h.ɵɵdefineComponent({type:z,selectors:[["app-change-password"]],features:[h.ɵɵInheritDefinitionFeature],decls:89,vars:36,consts:[[1,"tabbed-header"],["type","warning"],["type","info",3,"enforcedPolicyOptions",4,"ngIf"],["ngNativeValidate","","autocomplete","off",3,"appApiAction","ngSubmit"],["form",""],[1,"row"],[1,"col-6"],[1,"form-group"],["for","currentMasterPassword"],["id","currentMasterPassword","type","password","name","MasterPasswordHash","required","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],["for","newMasterPassword"],["id","newMasterPassword","type","password","name","NewMasterPasswordHash","required","","appInputVerbatim","","autocomplete","new-password",1,"form-control","mb-1",3,"ngModel","ngModelChange","input"],[3,"score","showText"],["for","masterPasswordRetype"],["id","masterPasswordRetype","type","password","name","MasterPasswordRetype","required","","appInputVerbatim","","autocomplete","new-password",1,"form-control",3,"ngModel","ngModelChange"],[1,"form-check"],["type","checkbox","id","rotateEncKey","name","RotateEncKey",1,"form-check-input",3,"ngModel","ngModelChange","change"],["for","rotateEncKey",1,"form-check-label"],["href","https://bitwarden.com/help/account-encryption-key/#rotate-your-encryption-key","target","_blank","rel","noopener",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],["bit-button","","buttonType","primary",1,"btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","info",3,"enforcedPolicyOptions"]],template:function(e,t){if(1&e&&(h.ɵɵelementStart(0,"div",0),h.ɵɵtext(1,"\n "),h.ɵɵelementStart(2,"h1"),h.ɵɵtext(3),h.ɵɵpipe(4,"i18n"),h.ɵɵelementEnd(),h.ɵɵtext(5,"\n"),h.ɵɵelementEnd(),h.ɵɵtext(6,"\n\n"),h.ɵɵelementStart(7,"bit-callout",1),h.ɵɵtext(8),h.ɵɵpipe(9,"i18n"),h.ɵɵelementEnd(),h.ɵɵtext(10,"\n"),h.ɵɵtemplate(11,j,2,1,"app-callout",2),h.ɵɵtext(12,"\n\n"),h.ɵɵelementStart(13,"form",3,4),h.ɵɵlistener("ngSubmit",(function(){return t.submit()})),h.ɵɵtext(15,"\n "),h.ɵɵelementStart(16,"div",5),h.ɵɵtext(17,"\n "),h.ɵɵelementStart(18,"div",6),h.ɵɵtext(19,"\n "),h.ɵɵelementStart(20,"div",7),h.ɵɵtext(21,"\n "),h.ɵɵelementStart(22,"label",8),h.ɵɵtext(23),h.ɵɵpipe(24,"i18n"),h.ɵɵelementEnd(),h.ɵɵtext(25,"\n "),h.ɵɵelementStart(26,"input",9),h.ɵɵlistener("ngModelChange",(function(e){return t.currentMasterPassword=e})),h.ɵɵelementEnd(),h.ɵɵtext(27,"\n "),h.ɵɵelementEnd(),h.ɵɵtext(28,"\n "),h.ɵɵelementEnd(),h.ɵɵtext(29,"\n "),h.ɵɵelementEnd(),h.ɵɵtext(30,"\n "),h.ɵɵelementStart(31,"div",5),h.ɵɵtext(32,"\n "),h.ɵɵelementStart(33,"div",6),h.ɵɵtext(34,"\n "),h.ɵɵelementStart(35,"div",7),h.ɵɵtext(36,"\n "),h.ɵɵelementStart(37,"label",10),h.ɵɵtext(38),h.ɵɵpipe(39,"i18n"),h.ɵɵelementEnd(),h.ɵɵtext(40,"\n "),h.ɵɵelementStart(41,"input",11),h.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e}))("input",(function(){return t.updatePasswordStrength()})),h.ɵɵelementEnd(),h.ɵɵtext(42,"\n "),h.ɵɵelement(43,"app-password-strength",12),h.ɵɵtext(44,"\n "),h.ɵɵelementEnd(),h.ɵɵtext(45,"\n "),h.ɵɵelementEnd(),h.ɵɵtext(46,"\n "),h.ɵɵelementStart(47,"div",6),h.ɵɵtext(48,"\n "),h.ɵɵelementStart(49,"div",7),h.ɵɵtext(50,"\n "),h.ɵɵelementStart(51,"label",13),h.ɵɵtext(52),h.ɵɵpipe(53,"i18n"),h.ɵɵelementEnd(),h.ɵɵtext(54,"\n "),h.ɵɵelementStart(55,"input",14),h.ɵɵlistener("ngModelChange",(function(e){return t.masterPasswordRetype=e})),h.ɵɵelementEnd(),h.ɵɵtext(56,"\n "),h.ɵɵelementEnd(),h.ɵɵtext(57,"\n "),h.ɵɵelementEnd(),h.ɵɵtext(58,"\n "),h.ɵɵelementEnd(),h.ɵɵtext(59,"\n "),h.ɵɵelementStart(60,"div",7),h.ɵɵtext(61,"\n "),h.ɵɵelementStart(62,"div",15),h.ɵɵtext(63,"\n "),h.ɵɵelementStart(64,"input",16),h.ɵɵlistener("ngModelChange",(function(e){return t.rotateEncKey=e}))("change",(function(){return t.rotateEncKeyClicked()})),h.ɵɵelementEnd(),h.ɵɵtext(65,"\n "),h.ɵɵelementStart(66,"label",17),h.ɵɵtext(67),h.ɵɵpipe(68,"i18n"),h.ɵɵelementEnd(),h.ɵɵtext(69,"\n "),h.ɵɵelementStart(70,"a",18),h.ɵɵpipe(71,"i18n"),h.ɵɵtext(72,"\n "),h.ɵɵelement(73,"i",19),h.ɵɵtext(74,"\n "),h.ɵɵelementEnd(),h.ɵɵtext(75,"\n "),h.ɵɵelementEnd(),h.ɵɵtext(76,"\n "),h.ɵɵelementEnd(),h.ɵɵtext(77,"\n "),h.ɵɵelementStart(78,"button",20),h.ɵɵtext(79,"\n "),h.ɵɵelement(80,"i",21),h.ɵɵpipe(81,"i18n"),h.ɵɵtext(82,"\n "),h.ɵɵelementStart(83,"span"),h.ɵɵtext(84),h.ɵɵpipe(85,"i18n"),h.ɵɵelementEnd(),h.ɵɵtext(86,"\n "),h.ɵɵelementEnd(),h.ɵɵtext(87,"\n"),h.ɵɵelementEnd(),h.ɵɵtext(88,"\n")),2&e){const e=h.ɵɵreference(14);h.ɵɵadvance(3),h.ɵɵtextInterpolate(h.ɵɵpipeBind1(4,18,"changeMasterPassword")),h.ɵɵadvance(5),h.ɵɵtextInterpolate(h.ɵɵpipeBind1(9,20,"loggedOutWarning")),h.ɵɵadvance(3),h.ɵɵproperty("ngIf",t.enforcedPolicyOptions),h.ɵɵadvance(2),h.ɵɵproperty("appApiAction",t.formPromise),h.ɵɵadvance(10),h.ɵɵtextInterpolate(h.ɵɵpipeBind1(24,22,"currentMasterPass")),h.ɵɵadvance(3),h.ɵɵproperty("ngModel",t.currentMasterPassword),h.ɵɵadvance(12),h.ɵɵtextInterpolate(h.ɵɵpipeBind1(39,24,"newMasterPass")),h.ɵɵadvance(3),h.ɵɵproperty("ngModel",t.masterPassword),h.ɵɵadvance(2),h.ɵɵproperty("score",t.masterPasswordScore)("showText",!0),h.ɵɵadvance(9),h.ɵɵtextInterpolate(h.ɵɵpipeBind1(53,26,"confirmNewMasterPass")),h.ɵɵadvance(3),h.ɵɵproperty("ngModel",t.masterPasswordRetype),h.ɵɵadvance(9),h.ɵɵproperty("ngModel",t.rotateEncKey),h.ɵɵadvance(3),h.ɵɵtextInterpolate1("\n ",h.ɵɵpipeBind1(68,28,"rotateAccountEncKey"),"\n "),h.ɵɵadvance(3),h.ɵɵpropertyInterpolate("appA11yTitle",h.ɵɵpipeBind1(71,30,"learnMore")),h.ɵɵadvance(8),h.ɵɵproperty("disabled",e.loading),h.ɵɵadvance(2),h.ɵɵpropertyInterpolate("title",h.ɵɵpipeBind1(81,32,"loading")),h.ɵɵadvance(4),h.ɵɵtextInterpolate(h.ɵɵpipeBind1(85,34,"changeMasterPassword"))}},directives:[T.CalloutComponent,M.NgIf,B.NgControlStatusGroup,B.NgForm,D.ApiActionDirective,B.DefaultValueAccessor,B.RequiredValidator,R.InputVerbatimDirective,B.NgControlStatus,B.NgModel,F.PasswordStrengthComponent,B.CheckboxControlValueAccessor,U.A11yTitleDirective,V.ButtonComponent,N.CalloutComponent],pipes:[_.I18nPipe],encapsulation:2})},532:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateOrganizationComponent=void 0;n(68012);const r=n(14857),o=n(47937),a=n(96066),s=n(28360),l=n(32621),c=n(68012),d=n(28360),p=n(99729);class u{constructor(e){this.route=e}ngOnInit(){this.route.queryParams.pipe(r.first()).subscribe((e=>i(this,void 0,void 0,(function*(){"families"===e.plan?(this.orgPlansComponent.plan=o.PlanType.FamiliesAnnually,this.orgPlansComponent.product=a.ProductType.Families):"teams"===e.plan?(this.orgPlansComponent.plan=o.PlanType.TeamsAnnually,this.orgPlansComponent.product=a.ProductType.Teams):"enterprise"===e.plan&&(this.orgPlansComponent.plan=o.PlanType.EnterpriseAnnually,this.orgPlansComponent.product=a.ProductType.Enterprise)}))))}}t.CreateOrganizationComponent=u,u.ɵfac=function(e){return new(e||u)(l.ɵɵdirectiveInject(c.ActivatedRoute))},u.ɵcmp=l.ɵɵdefineComponent({type:u,selectors:[["app-create-organization"]],viewQuery:function(e,t){if(1&e&&l.ɵɵviewQuery(s.OrganizationPlansComponent,7),2&e){let e;l.ɵɵqueryRefresh(e=l.ɵɵloadQuery())&&(t.orgPlansComponent=e.first)}},decls:22,vars:6,consts:[[1,"container","page-content"],[1,"row"],[1,"col-12"],[1,"page-header"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"div",2),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"div",3),l.ɵɵtext(7,"\n "),l.ɵɵelementStart(8,"h1"),l.ɵɵtext(9),l.ɵɵpipe(10,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(11,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(12,"\n "),l.ɵɵelementStart(13,"p"),l.ɵɵtext(14),l.ɵɵpipe(15,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(16,"\n "),l.ɵɵelement(17,"app-organization-plans"),l.ɵɵtext(18,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(19,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(20,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(21,"\n")),2&e&&(l.ɵɵadvance(9),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(10,2,"newOrganization")),l.ɵɵadvance(5),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(15,4,"newOrganizationDesc")))},directives:[d.OrganizationPlansComponent],pipes:[p.I18nPipe],encapsulation:2})},26083:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.DeauthorizeSessionsComponent=void 0;n(91674),n(51554),n(36631),n(45552),n(73828),n(57055);const r=n(32621),o=n(91674),a=n(51554),s=n(73828),l=n(57055),c=n(45552),d=n(36631),p=n(96832),u=n(56820),m=n(8863),h=n(51626),v=n(4158),f=n(99729);class g{constructor(e,t,n,i,r,o){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.userVerificationService=i,this.messagingService=r,this.logService=o}submit(){return i(this,void 0,void 0,(function*(){try{this.formPromise=this.userVerificationService.buildRequest(this.masterPassword).then((e=>this.apiService.postSecurityStamp(e))),yield this.formPromise,this.platformUtilsService.showToast("success",this.i18nService.t("sessionsDeauthorized"),this.i18nService.t("logBackIn")),this.messagingService.send("logout")}catch(e){this.logService.error(e)}}))}}t.DeauthorizeSessionsComponent=g,g.ɵfac=function(e){return new(e||g)(r.ɵɵdirectiveInject(o.ApiService),r.ɵɵdirectiveInject(a.I18nService),r.ɵɵdirectiveInject(s.PlatformUtilsService),r.ɵɵdirectiveInject(l.UserVerificationService),r.ɵɵdirectiveInject(c.MessagingService),r.ɵɵdirectiveInject(d.LogService))},g.ɵcmp=r.ɵɵdefineComponent({type:g,selectors:[["app-deauthorize-sessions"]],decls:55,vars:24,consts:[["role","dialog","aria-modal","true","aria-labelledby","deAuthTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","deAuthTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["type","warning"],["ngDefaultControl","","name","secret",3,"ngModel","ngModelChange"],[1,"modal-footer"],["type","submit",1,"btn","btn-danger","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"]],template:function(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"form",2,3),r.ɵɵlistener("ngSubmit",(function(){return t.submit()})),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"div",4),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"h2",5),r.ɵɵtext(10),r.ɵɵpipe(11,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelementStart(13,"button",6),r.ɵɵpipe(14,"i18n"),r.ɵɵtext(15,"\n "),r.ɵɵelementStart(16,"span",7),r.ɵɵtext(17,"×"),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(20,"\n "),r.ɵɵelementStart(21,"div",8),r.ɵɵtext(22,"\n "),r.ɵɵelementStart(23,"p"),r.ɵɵtext(24),r.ɵɵpipe(25,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(26,"\n "),r.ɵɵelementStart(27,"app-callout",9),r.ɵɵtext(28),r.ɵɵpipe(29,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(30,"\n "),r.ɵɵelementStart(31,"app-user-verification",10),r.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),r.ɵɵtext(32,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(33,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(34,"\n "),r.ɵɵelementStart(35,"div",11),r.ɵɵtext(36,"\n "),r.ɵɵelementStart(37,"button",12),r.ɵɵtext(38,"\n "),r.ɵɵelement(39,"i",13),r.ɵɵpipe(40,"i18n"),r.ɵɵtext(41,"\n "),r.ɵɵelementStart(42,"span"),r.ɵɵtext(43),r.ɵɵpipe(44,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(45,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(46,"\n "),r.ɵɵelementStart(47,"button",14),r.ɵɵtext(48),r.ɵɵpipe(49,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(50,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(51,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(52,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(53,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(54,"\n")),2&e){const e=r.ɵɵreference(5);r.ɵɵadvance(4),r.ɵɵproperty("appApiAction",t.formPromise),r.ɵɵadvance(6),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(11,10,"deauthorizeSessions")),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(14,12,"close")),r.ɵɵadvance(11),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(25,14,"deauthorizeSessionsDesc")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(29,16,"deauthorizeSessionsWarning")),r.ɵɵadvance(3),r.ɵɵproperty("ngModel",t.masterPassword),r.ɵɵadvance(6),r.ɵɵproperty("disabled",e.loading),r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(40,18,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(44,20,"deauthorizeSessions")),r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(49,22,"close"),"\n ")}},directives:[p.NgControlStatusGroup,p.NgForm,u.ApiActionDirective,m.A11yTitleDirective,h.CalloutComponent,v.UserVerificationComponent,p.DefaultValueAccessor,p.NgControlStatus,p.NgModel],pipes:[f.I18nPipe],encapsulation:2})},6430:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteAccountComponent=void 0;n(91674),n(51554),n(36631),n(45552),n(73828),n(57055);const r=n(32621),o=n(91674),a=n(51554),s=n(73828),l=n(57055),c=n(45552),d=n(36631),p=n(96832),u=n(56820),m=n(8863),h=n(51626),v=n(4158),f=n(99729);class g{constructor(e,t,n,i,r,o){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.userVerificationService=i,this.messagingService=r,this.logService=o}submit(){return i(this,void 0,void 0,(function*(){try{this.formPromise=this.userVerificationService.buildRequest(this.masterPassword).then((e=>this.apiService.deleteAccount(e))),yield this.formPromise,this.platformUtilsService.showToast("success",this.i18nService.t("accountDeleted"),this.i18nService.t("accountDeletedDesc")),this.messagingService.send("logout")}catch(e){this.logService.error(e)}}))}}t.DeleteAccountComponent=g,g.ɵfac=function(e){return new(e||g)(r.ɵɵdirectiveInject(o.ApiService),r.ɵɵdirectiveInject(a.I18nService),r.ɵɵdirectiveInject(s.PlatformUtilsService),r.ɵɵdirectiveInject(l.UserVerificationService),r.ɵɵdirectiveInject(c.MessagingService),r.ɵɵdirectiveInject(d.LogService))},g.ɵcmp=r.ɵɵdefineComponent({type:g,selectors:[["app-delete-account"]],decls:55,vars:24,consts:[["role","dialog","aria-modal","true","aria-labelledby","deleteAccountTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","deleteAccountTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["type","warning"],["ngDefaultControl","","name","secret",3,"ngModel","ngModelChange"],[1,"modal-footer"],["type","submit",1,"btn","btn-danger","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"]],template:function(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"form",2,3),r.ɵɵlistener("ngSubmit",(function(){return t.submit()})),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"div",4),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"h2",5),r.ɵɵtext(10),r.ɵɵpipe(11,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelementStart(13,"button",6),r.ɵɵpipe(14,"i18n"),r.ɵɵtext(15,"\n "),r.ɵɵelementStart(16,"span",7),r.ɵɵtext(17,"×"),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(20,"\n "),r.ɵɵelementStart(21,"div",8),r.ɵɵtext(22,"\n "),r.ɵɵelementStart(23,"p"),r.ɵɵtext(24),r.ɵɵpipe(25,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(26,"\n "),r.ɵɵelementStart(27,"app-callout",9),r.ɵɵtext(28),r.ɵɵpipe(29,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(30,"\n "),r.ɵɵelementStart(31,"app-user-verification",10),r.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),r.ɵɵtext(32,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(33,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(34,"\n "),r.ɵɵelementStart(35,"div",11),r.ɵɵtext(36,"\n "),r.ɵɵelementStart(37,"button",12),r.ɵɵtext(38,"\n "),r.ɵɵelement(39,"i",13),r.ɵɵpipe(40,"i18n"),r.ɵɵtext(41,"\n "),r.ɵɵelementStart(42,"span"),r.ɵɵtext(43),r.ɵɵpipe(44,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(45,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(46,"\n "),r.ɵɵelementStart(47,"button",14),r.ɵɵtext(48),r.ɵɵpipe(49,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(50,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(51,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(52,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(53,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(54,"\n")),2&e){const e=r.ɵɵreference(5);r.ɵɵadvance(4),r.ɵɵproperty("appApiAction",t.formPromise),r.ɵɵadvance(6),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(11,10,"deleteAccount")),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(14,12,"close")),r.ɵɵadvance(11),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(25,14,"deleteAccountDesc")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(29,16,"deleteAccountWarning")),r.ɵɵadvance(3),r.ɵɵproperty("ngModel",t.masterPassword),r.ɵɵadvance(6),r.ɵɵproperty("disabled",e.loading),r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(40,18,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(44,20,"deleteAccount")),r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(49,22,"close"),"\n ")}},directives:[p.NgControlStatusGroup,p.NgForm,u.ApiActionDirective,m.A11yTitleDirective,h.CalloutComponent,v.UserVerificationComponent,p.DefaultValueAccessor,p.NgControlStatus,p.NgModel],pipes:[f.I18nPipe],encapsulation:2})},10116:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.DomainRulesComponent=void 0;n(91674),n(51554),n(36631),n(73828);const r=n(55785),o=n(32621),a=n(91674),s=n(51554),l=n(73828),c=n(36631),d=n(96832),p=n(56820),u=n(57490),m=n(8863),h=n(1142),v=n(99729);function f(e,t){1&e&&(o.ɵɵelementStart(0,"p"),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",8),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",9),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function g(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",14),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",15),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"label",16),o.ɵɵtext(5),o.ɵɵpipe(6,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"textarea",17),o.ɵɵlistener("ngModelChange",(function(t){const n=o.ɵɵrestoreView(e).index;return o.ɵɵnextContext(2).custom[n]=t})),o.ɵɵpipe(9,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"button",18),o.ɵɵlistener("click",(function(){const t=o.ɵɵrestoreView(e).index;return o.ɵɵnextContext(2).remove(t)})),o.ɵɵpipe(13,"i18n"),o.ɵɵtext(14,"\n "),o.ɵɵelement(15,"i",19),o.ɵɵtext(16,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵelementEnd()}if(2&e){const e=t.index,n=o.ɵɵnextContext(2);o.ɵɵadvance(4),o.ɵɵpropertyInterpolate1("for","customDomain_",e,""),o.ɵɵadvance(1),o.ɵɵtextInterpolate(o.ɵɵpipeBind2(6,7,"customDomainX",e+1)),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate1("name","CustomDomain[",e,"]"),o.ɵɵpropertyInterpolate1("id","customDomain_",e,""),o.ɵɵpropertyInterpolate1("placeholder","",o.ɵɵpipeBind1(9,10,"ex")," google.com, gmail.com"),o.ɵɵproperty("ngModel",n.custom[e]),o.ɵɵadvance(4),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(13,12,"remove"))}}function y(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,g,18,14,"div",10),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"button",11),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext().add()})),o.ɵɵtext(5,"\n "),o.ɵɵelement(6,"i",12),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"small",13),o.ɵɵtext(11),o.ɵɵpipe(12,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementContainerEnd()}if(2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("ngForOf",e.custom)("ngForTrackBy",e.indexTrackBy),o.ɵɵadvance(5),o.ɵɵtextInterpolate1(" ",o.ɵɵpipeBind1(8,4,"newCustomDomain"),"\n "),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(12,6,"newCustomDomainDesc"))}}function x(e,t){1&e&&(o.ɵɵelementStart(0,"p"),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",8),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",9),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function S(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"a",29),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext().$implicit;return o.ɵɵnextContext(2).toggleExcluded(t)})),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",31),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd()}2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,1,"exclude"),"\n "))}function b(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"a",29),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext().$implicit;return o.ɵɵnextContext(2).toggleExcluded(t)})),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",32),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd()}2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,1,"include"),"\n "))}const w=function(e){return{"table-list-strike":e}};function C(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td",22),o.ɵɵtext(3),o.ɵɵelementEnd(),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"td",23),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"div",24),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"button",25),o.ɵɵpipe(10,"i18n"),o.ɵɵtext(11,"\n "),o.ɵɵelement(12,"i",26),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"div",27),o.ɵɵtext(16,"\n "),o.ɵɵtemplate(17,S,5,3,"a",28),o.ɵɵtext(18,"\n "),o.ɵɵtemplate(19,b,5,3,"a",28),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"a",29),o.ɵɵlistener("click",(function(){const t=o.ɵɵrestoreView(e).$implicit;return o.ɵɵnextContext(2).customize(t)})),o.ɵɵtext(22,"\n "),o.ɵɵelement(23,"i",30),o.ɵɵtext(24),o.ɵɵpipe(25,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(28,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n "),o.ɵɵelementEnd()}if(2&e){const e=t.$implicit;o.ɵɵadvance(2),o.ɵɵproperty("ngClass",o.ɵɵpureFunction1(10,w,e.excluded)),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.domains),o.ɵɵadvance(6),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(10,6,"options")),o.ɵɵadvance(8),o.ɵɵproperty("ngIf",!e.excluded),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.excluded),o.ɵɵadvance(5),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(25,8,"customize"),"\n ")}}function I(e,t){if(1&e&&(o.ɵɵelementStart(0,"table",20),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"tbody"),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,C,30,12,"tr",21),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(4),o.ɵɵproperty("ngForOf",e.global)}}class E{constructor(e,t,n,i){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.logService=i,this.loading=!0,this.custom=[],this.global=[]}ngOnInit(){return i(this,void 0,void 0,(function*(){const e=yield this.apiService.getSettingsDomains();this.loading=!1,null!=e.equivalentDomains&&(this.custom=e.equivalentDomains.map((e=>e.join(", ")))),null!=e.globalEquivalentDomains&&(this.global=e.globalEquivalentDomains.map((e=>({domains:e.domains.join(", "),excluded:e.excluded,key:e.type}))))}))}toggleExcluded(e){e.excluded=!e.excluded}customize(e){e.excluded=!0,this.custom.push(e.domains)}remove(e){this.custom.splice(e,1)}add(){this.custom.push("")}submit(){return i(this,void 0,void 0,(function*(){const e=new r.UpdateDomainsRequest;e.excludedGlobalEquivalentDomains=this.global.filter((e=>e.excluded)).map((e=>e.key)),0===e.excludedGlobalEquivalentDomains.length&&(e.excludedGlobalEquivalentDomains=null),e.equivalentDomains=this.custom.filter((e=>null!=e&&""!==e.trim())).map((e=>e.split(",").map((e=>e.trim())))),0===e.equivalentDomains.length&&(e.equivalentDomains=null);try{this.formPromise=this.apiService.putSettingsDomains(e),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("domainsUpdated"))}catch(t){this.logService.error(t)}}))}indexTrackBy(e,t){return e}}t.DomainRulesComponent=E,E.ɵfac=function(e){return new(e||E)(o.ɵɵdirectiveInject(a.ApiService),o.ɵɵdirectiveInject(s.I18nService),o.ɵɵdirectiveInject(l.PlatformUtilsService),o.ɵɵdirectiveInject(c.LogService))},E.ɵcmp=o.ɵɵdefineComponent({type:E,selectors:[["app-domain-rules"]],decls:51,vars:31,consts:[[1,"page-header"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[4,"ngIf"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[1,"spaced-header"],["class","table table-hover table-list",4,"ngIf"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["class","form-group d-flex",4,"ngFor","ngForOf","ngForTrackBy"],["type","button",1,"btn","btn-outline-secondary","btn-sm","mb-2",3,"click"],["aria-hidden","true",1,"bwi","bwi-plus","bwi-fw"],[1,"text-muted","d-block","mb-3"],[1,"form-group","d-flex"],[1,"flex-fill"],[1,"sr-only",3,"for"],["required","",1,"form-control",3,"name","id","ngModel","placeholder","ngModelChange"],["type","button",1,"btn","btn-link","text-danger","ml-2",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-minus-circle","bwi-lg"],[1,"table","table-hover","table-list"],[4,"ngFor","ngForOf"],[3,"ngClass"],[1,"table-list-options"],["appListDropdown","",1,"dropdown"],["type","button","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-cog","bwi-lg"],[1,"dropdown-menu","dropdown-menu-right"],["class","dropdown-item","href","#","appStopClick","",3,"click",4,"ngIf"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-cut"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-close"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-plus"]],template:function(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h1"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n"),o.ɵɵelementStart(7,"p"),o.ɵɵtext(8),o.ɵɵpipe(9,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n"),o.ɵɵelementStart(11,"form",1,2),o.ɵɵlistener("ngSubmit",(function(){return t.submit()})),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"h2"),o.ɵɵtext(15),o.ɵɵpipe(16,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵtemplate(18,f,9,6,"p",3),o.ɵɵtext(19,"\n "),o.ɵɵtemplate(20,y,14,8,"ng-container",3),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"button",4),o.ɵɵtext(23,"\n "),o.ɵɵelement(24,"i",5),o.ɵɵpipe(25,"i18n"),o.ɵɵtext(26,"\n "),o.ɵɵelementStart(27,"span"),o.ɵɵtext(28),o.ɵɵpipe(29,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(30,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(31,"\n "),o.ɵɵelementStart(32,"h2",6),o.ɵɵtext(33),o.ɵɵpipe(34,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(35,"\n "),o.ɵɵtemplate(36,x,9,6,"p",3),o.ɵɵtext(37,"\n "),o.ɵɵtemplate(38,I,7,1,"table",7),o.ɵɵtext(39,"\n "),o.ɵɵelementStart(40,"button",4),o.ɵɵtext(41,"\n "),o.ɵɵelement(42,"i",5),o.ɵɵpipe(43,"i18n"),o.ɵɵtext(44,"\n "),o.ɵɵelementStart(45,"span"),o.ɵɵtext(46),o.ɵɵpipe(47,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(48,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(49,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(50,"\n")),2&e){const e=o.ɵɵreference(12);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,15,"domainRules")),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(9,17,"domainRulesDesc")),o.ɵɵadvance(3),o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(16,19,"customEqDomains")),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",t.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!t.loading),o.ɵɵadvance(2),o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(25,21,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(29,23,"save")),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(34,25,"globalEqDomains")),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",t.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!t.loading&&t.global.length>0),o.ɵɵadvance(2),o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(43,27,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(47,29,"save"))}},directives:[d.NgControlStatusGroup,d.NgForm,p.ApiActionDirective,u.NgIf,u.NgForOf,d.DefaultValueAccessor,d.RequiredValidator,d.NgControlStatus,d.NgModel,m.A11yTitleDirective,u.NgClass,h.StopClickDirective],pipes:[v.I18nPipe],encapsulation:2})},36894:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAccessAddEditComponent=void 0;const r=n(32621),o=(n(91674),n(51554),n(36631),n(73828),n(82838)),a=n(85985),s=n(8468),l=n(32621),c=n(91674),d=n(51554),p=n(73828),u=n(36631),m=n(96832),h=n(56820),v=n(57490),f=n(8863),g=n(48403),y=n(99729);function x(e,t){1&e&&l.ɵɵelement(0,"app-premium-badge")}function S(e,t){if(1&e&&(l.ɵɵelementStart(0,"small",18),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext();l.ɵɵadvance(1),l.ɵɵtextInterpolate(e.name)}}function b(e,t){1&e&&(l.ɵɵelementStart(0,"div",19),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",20),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"span",21),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,2,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,4,"loading")))}function w(e,t){if(1&e){const e=l.ɵɵgetCurrentView();l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"p"),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"div",33),l.ɵɵtext(7,"\n "),l.ɵɵelementStart(8,"label",34),l.ɵɵtext(9),l.ɵɵpipe(10,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(11,"\n "),l.ɵɵelementStart(12,"input",35),l.ɵɵlistener("ngModelChange",(function(t){l.ɵɵrestoreView(e);return l.ɵɵnextContext(2).email=t})),l.ɵɵelementEnd(),l.ɵɵtext(13,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(14,"\n "),l.ɵɵelementContainerEnd()}if(2&e){const e=l.ɵɵnextContext(2);l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(4,3,"inviteEmergencyContactDesc")),l.ɵɵadvance(6),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(10,5,"email")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",e.email)}}function C(e,t){if(1&e&&(l.ɵɵelementStart(0,"option",36),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){const e=t.$implicit;l.ɵɵproperty("ngValue",e.value),l.ɵɵadvance(1),l.ɵɵtextInterpolate(e.name)}}function I(e,t){if(1&e){const e=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"div",19),l.ɵɵtext(1,"\n "),l.ɵɵtemplate(2,w,15,7,"ng-container",6),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"h3"),l.ɵɵtext(5),l.ɵɵpipe(6,"i18n"),l.ɵɵelementStart(7,"a",22),l.ɵɵpipe(8,"i18n"),l.ɵɵtext(9,"\n "),l.ɵɵelement(10,"i",23),l.ɵɵtext(11,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(12,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(13,"\n "),l.ɵɵelementStart(14,"div",24),l.ɵɵtext(15,"\n "),l.ɵɵelementStart(16,"input",25),l.ɵɵlistener("ngModelChange",(function(t){l.ɵɵrestoreView(e);return l.ɵɵnextContext().type=t})),l.ɵɵelementEnd(),l.ɵɵtext(17,"\n "),l.ɵɵelementStart(18,"label",26),l.ɵɵtext(19),l.ɵɵpipe(20,"i18n"),l.ɵɵelementStart(21,"small"),l.ɵɵtext(22),l.ɵɵpipe(23,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(24,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(25,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(26,"\n "),l.ɵɵelementStart(27,"div",24),l.ɵɵtext(28,"\n "),l.ɵɵelementStart(29,"input",27),l.ɵɵlistener("ngModelChange",(function(t){l.ɵɵrestoreView(e);return l.ɵɵnextContext().type=t})),l.ɵɵelementEnd(),l.ɵɵtext(30,"\n "),l.ɵɵelementStart(31,"label",28),l.ɵɵtext(32),l.ɵɵpipe(33,"i18n"),l.ɵɵelementStart(34,"small"),l.ɵɵtext(35),l.ɵɵpipe(36,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(37,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(38,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(39,"\n "),l.ɵɵelementStart(40,"div",29),l.ɵɵtext(41,"\n "),l.ɵɵelementStart(42,"label",30),l.ɵɵtext(43),l.ɵɵpipe(44,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(45,"\n "),l.ɵɵelementStart(46,"select",31),l.ɵɵlistener("ngModelChange",(function(t){l.ɵɵrestoreView(e);return l.ɵɵnextContext().waitTime=t})),l.ɵɵtext(47,"\n "),l.ɵɵtemplate(48,C,2,2,"option",32),l.ɵɵtext(49,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(50,"\n "),l.ɵɵelementStart(51,"small",18),l.ɵɵtext(52),l.ɵɵpipe(53,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(54,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(55,"\n "),l.ɵɵelementEnd()}if(2&e){const e=l.ɵɵnextContext();l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!e.editMode),l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(6,17,"userAccess"),"\n "),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(8,19,"learnMore")),l.ɵɵadvance(9),l.ɵɵproperty("value",e.emergencyAccessType.View)("ngModel",e.type),l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(20,21,"view"),"\n "),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(23,23,"viewDesc")),l.ɵɵadvance(7),l.ɵɵproperty("value",e.emergencyAccessType.Takeover)("ngModel",e.type)("disabled",e.readOnly),l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(33,25,"takeover"),"\n "),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(36,27,"takeoverDesc")),l.ɵɵadvance(8),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(44,29,"waitTime")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",e.waitTime)("disabled",e.readOnly),l.ɵɵadvance(2),l.ɵɵproperty("ngForOf",e.waitTimes),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(53,31,"waitTimeDesc"))}}function E(e,t){1&e&&(l.ɵɵelement(0,"i",37),l.ɵɵpipe(1,"i18n")),2&e&&l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(1,1,"loading"))}function P(e,t){1&e&&(l.ɵɵelementStart(0,"span"),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(2,1,"save")))}function O(e,t){if(1&e){const e=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"button",38,39),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(e);return l.ɵɵnextContext().delete()})),l.ɵɵpipe(2,"i18n"),l.ɵɵtext(3,"\n "),l.ɵɵelement(4,"i",40),l.ɵɵtext(5,"\n "),l.ɵɵelement(6,"i",41),l.ɵɵpipe(7,"i18n"),l.ɵɵtext(8,"\n "),l.ɵɵelementEnd()}if(2&e){const e=l.ɵɵreference(1);l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(2,5,"delete")),l.ɵɵproperty("disabled",e.loading),l.ɵɵadvance(4),l.ɵɵproperty("hidden",e.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(7,7,"loading")),l.ɵɵproperty("hidden",!e.loading)}}class k{constructor(e,t,n,i){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.logService=i,this.onSaved=new r.EventEmitter,this.onDeleted=new r.EventEmitter,this.loading=!0,this.readOnly=!1,this.editMode=!1,this.type=o.EmergencyAccessType.View,this.emergencyAccessType=o.EmergencyAccessType}ngOnInit(){return i(this,void 0,void 0,(function*(){if(this.editMode=this.loading=null!=this.emergencyAccessId,this.waitTimes=[{name:this.i18nService.t("oneDay"),value:1},{name:this.i18nService.t("days","2"),value:2},{name:this.i18nService.t("days","7"),value:7},{name:this.i18nService.t("days","14"),value:14},{name:this.i18nService.t("days","30"),value:30},{name:this.i18nService.t("days","90"),value:90}],this.editMode){this.editMode=!0,this.title=this.i18nService.t("editEmergencyContact");try{const e=yield this.apiService.getEmergencyAccess(this.emergencyAccessId);this.type=e.type,this.waitTime=e.waitTimeDays}catch(e){this.logService.error(e)}}else this.title=this.i18nService.t("inviteEmergencyContact"),this.waitTime=this.waitTimes[2].value;this.loading=!1}))}submit(){return i(this,void 0,void 0,(function*(){try{if(this.editMode){const e=new s.EmergencyAccessUpdateRequest;e.type=this.type,e.waitTimeDays=this.waitTime,this.formPromise=this.apiService.putEmergencyAccess(this.emergencyAccessId,e)}else{const e=new a.EmergencyAccessInviteRequest;e.email=this.email.trim(),e.type=this.type,e.waitTimeDays=this.waitTime,this.formPromise=this.apiService.postEmergencyAccessInvite(e)}yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t(this.editMode?"editedUserId":"invitedUsers",this.name)),this.onSaved.emit()}catch(e){this.logService.error(e)}}))}delete(){return i(this,void 0,void 0,(function*(){this.onDeleted.emit()}))}}t.EmergencyAccessAddEditComponent=k,k.ɵfac=function(e){return new(e||k)(l.ɵɵdirectiveInject(c.ApiService),l.ɵɵdirectiveInject(d.I18nService),l.ɵɵdirectiveInject(p.PlatformUtilsService),l.ɵɵdirectiveInject(u.LogService))},k.ɵcmp=l.ɵɵdefineComponent({type:k,selectors:[["emergency-access-add-edit"]],inputs:{name:"name",emergencyAccessId:"emergencyAccessId"},outputs:{onSaved:"onSaved",onDeleted:"onDeleted"},decls:51,vars:16,consts:[["role","dialog","aria-modal","true","aria-labelledby","userAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","userAddEditTitle",1,"modal-title"],[4,"ngIf"],["class","text-muted",4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary",3,"disabled"],["submitBtn",""],["class","bwi bwi-spinner bwi-spin","aria-hidden","true",3,"title",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"ml-auto"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","click",4,"ngIf"],[1,"text-muted"],[1,"modal-body"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/emergency-access/#user-access",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],[1,"form-check","mt-2","form-check-block"],["type","radio","name","userType","id","emergencyTypeView",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","emergencyTypeView",1,"form-check-label"],["type","radio","name","userType","id","emergencyTypeTakeover",1,"form-check-input",3,"value","ngModel","disabled","ngModelChange"],["for","emergencyTypeTakeover",1,"form-check-label"],[1,"form-group","col-6","mt-4"],["for","waitTime"],["id","waitTime","name","waitTime",1,"form-control",3,"ngModel","disabled","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"form-group","mb-4"],["for","email"],["id","email","type","text","name","Email","required","",1,"form-control",3,"ngModel","ngModelChange"],[3,"ngValue"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","click"],["deleteBtn",""],["aria-hidden","true",1,"bwi","bwi-trash","bwi-lg","bwi-fw",3,"hidden"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-lg","bwi-fw",3,"hidden","title"]],template:function(e,t){if(1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"form",2,3),l.ɵɵlistener("ngSubmit",(function(){return t.submit()})),l.ɵɵtext(6,"\n "),l.ɵɵelementStart(7,"div",4),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"h2",5),l.ɵɵtext(10,"\n "),l.ɵɵtemplate(11,x,1,0,"app-premium-badge",6),l.ɵɵtext(12),l.ɵɵtemplate(13,S,2,1,"small",7),l.ɵɵtext(14,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(15,"\n "),l.ɵɵelementStart(16,"button",8),l.ɵɵpipe(17,"i18n"),l.ɵɵtext(18,"\n "),l.ɵɵelementStart(19,"span",9),l.ɵɵtext(20,"×"),l.ɵɵelementEnd(),l.ɵɵtext(21,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(22,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(23,"\n "),l.ɵɵtemplate(24,b,9,6,"div",10),l.ɵɵtext(25,"\n "),l.ɵɵtemplate(26,I,56,33,"div",10),l.ɵɵtext(27,"\n "),l.ɵɵelementStart(28,"div",11),l.ɵɵtext(29,"\n "),l.ɵɵelementStart(30,"button",12,13),l.ɵɵtext(32,"\n "),l.ɵɵtemplate(33,E,2,3,"i",14),l.ɵɵtext(34,"\n "),l.ɵɵtemplate(35,P,3,3,"span",6),l.ɵɵtext(36,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(37,"\n "),l.ɵɵelementStart(38,"button",15),l.ɵɵtext(39),l.ɵɵpipe(40,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(41,"\n "),l.ɵɵelementStart(42,"div",16),l.ɵɵtext(43,"\n "),l.ɵɵtemplate(44,O,9,9,"button",17),l.ɵɵtext(45,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(46,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(47,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(48,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(49,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(50,"\n")),2&e){const e=l.ɵɵreference(31);l.ɵɵadvance(4),l.ɵɵproperty("appApiAction",t.formPromise),l.ɵɵadvance(7),l.ɵɵproperty("ngIf",t.readOnly),l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",t.title,"\n "),l.ɵɵadvance(1),l.ɵɵproperty("ngIf",t.name),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(17,12,"close")),l.ɵɵadvance(8),l.ɵɵproperty("ngIf",t.loading),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!t.loading),l.ɵɵadvance(4),l.ɵɵproperty("disabled",t.loading||e.loading||t.readOnly),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",t.loading||e.loading),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!t.loading&&!e.loading),l.ɵɵadvance(4),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(40,14,"cancel"),"\n "),l.ɵɵadvance(5),l.ɵɵproperty("ngIf",t.editMode)}},directives:[m.NgControlStatusGroup,m.NgForm,h.ApiActionDirective,v.NgIf,f.A11yTitleDirective,g.PremiumBadgeComponent,m.RadioControlValueAccessor,m.DefaultValueAccessor,m.NgControlStatus,m.NgModel,m.SelectControlValueAccessor,v.NgForOf,m.RequiredValidator,m.NgSelectOption,m.ɵNgSelectMultipleOption],pipes:[y.I18nPipe],encapsulation:2})},4034:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAccessAttachmentsComponent=void 0;const r=n(93705),o=(n(91674),n(45330),n(85714),n(51554),n(36631),n(73828),n(73569),n(32621)),a=n(45330),s=n(51554),l=n(85714),c=n(73569),d=n(73828),p=n(91674),u=n(36631),m=n(96832),h=n(56820),v=n(57490),f=n(8863),g=n(1142),y=n(99729);function x(e,t){if(1&e&&(o.ɵɵelementStart(0,"small"),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.cipher.name)}}function S(e,t){1&e&&o.ɵɵelement(0,"i",24)}function b(e,t){1&e&&o.ɵɵelement(0,"i",25)}function w(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",26),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"a",27),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"i",28),o.ɵɵpipe(5,"i18n"),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"span",29),o.ɵɵtext(8),o.ɵɵpipe(9,"i18n"),o.ɵɵelementEnd(),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵelementStart(11,"button",30,31),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext().$implicit;return o.ɵɵnextContext(2).reupload(t)})),o.ɵɵtext(13),o.ɵɵpipe(14,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵreference(12),t=o.ɵɵnextContext().$implicit,n=o.ɵɵnextContext(2);o.ɵɵadvance(4),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(5,5,"attachmentFixDesc")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(9,7,"attachmentFixDesc")),o.ɵɵadvance(3),o.ɵɵproperty("appApiAction",n.reuploadPromises[t.id])("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(14,9,"fix"),"\n ")}}function C(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"td",32),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"button",33,34),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext().$implicit;return o.ɵɵnextContext(2).delete(t)})),o.ɵɵpipe(4,"i18n"),o.ɵɵtext(5,"\n "),o.ɵɵelement(6,"i",35),o.ɵɵtext(7,"\n "),o.ɵɵelement(8,"i",36),o.ɵɵpipe(9,"i18n"),o.ɵɵtext(10,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵreference(3),t=o.ɵɵnextContext().$implicit,n=o.ɵɵnextContext(2);o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(4,6,"delete")),o.ɵɵproperty("appApiAction",n.deletePromises[t.id])("disabled",e.loading),o.ɵɵadvance(4),o.ɵɵproperty("hidden",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(9,8,"loading")),o.ɵɵproperty("hidden",!e.loading)}}function I(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td",16),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,S,1,0,"i",17),o.ɵɵtext(5,"\n "),o.ɵɵtemplate(6,b,1,0,"i",18),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"td",19),o.ɵɵtext(10,"\n "),o.ɵɵelementStart(11,"div",20),o.ɵɵtext(12,"\n "),o.ɵɵelementStart(13,"a",21),o.ɵɵlistener("click",(function(){const t=o.ɵɵrestoreView(e).$implicit;return o.ɵɵnextContext(2).download(t)})),o.ɵɵtext(14),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵtemplate(16,w,16,11,"div",22),o.ɵɵtext(17,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementStart(19,"small"),o.ɵɵtext(20),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(22,"\n "),o.ɵɵtemplate(23,C,12,10,"td",23),o.ɵɵtext(24,"\n "),o.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=o.ɵɵnextContext(2);o.ɵɵadvance(4),o.ɵɵproperty("ngIf",!e.downloading),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.downloading),o.ɵɵadvance(8),o.ɵɵtextInterpolate(e.fileName),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",n.showFixOldAttachments(e)),o.ɵɵadvance(4),o.ɵɵtextInterpolate(e.sizeName),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!n.viewOnly)}}function E(e,t){if(1&e&&(o.ɵɵelementStart(0,"table",14),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"tbody"),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,I,25,6,"tr",15),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(4),o.ɵɵproperty("ngForOf",e.cipher.attachments)}}function P(e,t){1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h3"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"label",37),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelement(10,"input",38),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"small",39),o.ɵɵtext(13),o.ɵɵpipe(14,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,3,"newAttachment")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,5,"file")),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(14,7,"maxFileSize")))}function O(e,t){if(1&e&&(o.ɵɵelementStart(0,"button",40),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",41),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span"),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e){o.ɵɵnextContext();const e=o.ɵɵreference(5);o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,3,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,5,"save"))}}class k extends r.AttachmentsComponent{constructor(e,t,n,i,r,o,a){super(e,t,n,r,o,window,a,i),this.viewOnly=!0,this.canAccessAttachments=!0}init(){return i(this,void 0,void 0,(function*(){}))}showFixOldAttachments(e){return!1}}t.EmergencyAccessAttachmentsComponent=k,k.ɵfac=function(e){return new(e||k)(o.ɵɵdirectiveInject(a.CipherService),o.ɵɵdirectiveInject(s.I18nService),o.ɵɵdirectiveInject(l.CryptoService),o.ɵɵdirectiveInject(c.StateService),o.ɵɵdirectiveInject(d.PlatformUtilsService),o.ɵɵdirectiveInject(p.ApiService),o.ɵɵdirectiveInject(u.LogService))},k.ɵcmp=o.ɵɵdefineComponent({type:k,selectors:[["emergency-access-attachments"]],features:[o.ɵɵInheritDefinitionFeature],decls:42,vars:14,consts:[["role","dialog","aria-modal","true","aria-labelledby","attachmentsTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","attachmentsTitle",1,"modal-title"],[4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["class","table table-hover table-list",4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"table","table-hover","table-list"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],["class","bwi bwi-fw bwi-lg bwi-file","aria-hidden","true",4,"ngIf"],["class","bwi bwi-spinner bwi-lg bwi-fw bwi-spin","aria-hidden","true",4,"ngIf"],[1,"wrap"],[1,"d-flex"],["href","#","appStopClick","",3,"click"],["class","ml-2",4,"ngIf"],["class","table-list-options",4,"ngIf"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-lg","bwi-file"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-lg","bwi-fw","bwi-spin"],[1,"ml-2"],["href","https://bitwarden.com/help/attachments/#fixing-old-attachments","target","_blank","rel","noopener"],["aria-hidden","true",1,"bwi","bwi-exclamation-triangle","text-warning",3,"title"],[1,"sr-only"],["type","button",1,"btn","btn-outline-primary","btn-sm","m-0","py-0","px-2",3,"appApiAction","disabled","click"],["reuploadBtn",""],[1,"table-list-options"],["type","button","appStopClick","",1,"btn","btn-outline-danger",3,"appA11yTitle","appApiAction","disabled","click"],["deleteBtn",""],["aria-hidden","true",1,"bwi","bwi-trash","bwi-lg","bwi-fw",3,"hidden"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-lg","bwi-fw",3,"hidden","title"],["for","file",1,"sr-only"],["type","file","id","file","name","file","required","",1,"form-control-file"],[1,"form-text","text-muted"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"form",2,3),o.ɵɵlistener("ngSubmit",(function(){return t.submit()})),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"div",4),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"h2",5),o.ɵɵtext(10),o.ɵɵpipe(11,"i18n"),o.ɵɵtemplate(12,x,2,1,"small",6),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"button",7),o.ɵɵpipe(16,"i18n"),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"span",8),o.ɵɵtext(19,"×"),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(22,"\n "),o.ɵɵelementStart(23,"div",9),o.ɵɵtext(24,"\n "),o.ɵɵtemplate(25,E,7,1,"table",10),o.ɵɵtext(26,"\n "),o.ɵɵtemplate(27,P,16,9,"div",6),o.ɵɵtext(28,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n "),o.ɵɵelementStart(30,"div",11),o.ɵɵtext(31,"\n "),o.ɵɵtemplate(32,O,9,7,"button",12),o.ɵɵtext(33,"\n "),o.ɵɵelementStart(34,"button",13),o.ɵɵtext(35),o.ɵɵpipe(36,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(37,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(38,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(39,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(40,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(41,"\n")),2&e&&(o.ɵɵadvance(4),o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(6),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(11,8,"attachments"),"\n "),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.cipher),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(16,10,"close")),o.ɵɵadvance(10),o.ɵɵproperty("ngIf",t.cipher&&t.cipher.hasAttachments),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!t.viewOnly),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",!t.viewOnly),o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(36,12,"close"),"\n "))},directives:[m.NgControlStatusGroup,m.NgForm,h.ApiActionDirective,v.NgIf,f.A11yTitleDirective,v.NgForOf,g.StopClickDirective],pipes:[y.I18nPipe],encapsulation:2})},94423:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAccessConfirmComponent=void 0;const r=n(32621),o=(n(91674),n(85714),n(36631),n(73569),n(82769)),a=n(32621),s=n(91674),l=n(85714),c=n(73569),d=n(36631),p=n(96832),u=n(56820),m=n(57490),h=n(8863),v=n(99729);function f(e,t){if(1&e&&(a.ɵɵelementStart(0,"small",18),a.ɵɵtext(1),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext();a.ɵɵadvance(1),a.ɵɵtextInterpolate(e.name)}}class g{constructor(e,t,n,i){this.apiService=e,this.cryptoService=t,this.stateService=n,this.logService=i,this.onConfirmed=new r.EventEmitter,this.dontAskAgain=!1,this.loading=!0}ngOnInit(){return i(this,void 0,void 0,(function*(){try{const e=yield this.apiService.getUserPublicKey(this.userId);if(null!=e){const t=o.Utils.fromB64ToArray(e.publicKey),n=yield this.cryptoService.getFingerprint(this.userId,t.buffer);null!=n&&(this.fingerprint=n.join("-"))}}catch(e){this.logService.error(e)}this.loading=!1}))}submit(){return i(this,void 0,void 0,(function*(){if(!this.loading){this.dontAskAgain&&(yield this.stateService.setAutoConfirmFingerprints(!0));try{this.onConfirmed.emit()}catch(e){this.logService.error(e)}}}))}}t.EmergencyAccessConfirmComponent=g,g.ɵfac=function(e){return new(e||g)(a.ɵɵdirectiveInject(s.ApiService),a.ɵɵdirectiveInject(l.CryptoService),a.ɵɵdirectiveInject(c.StateService),a.ɵɵdirectiveInject(d.LogService))},g.ɵcmp=a.ɵɵdefineComponent({type:g,selectors:[["emergency-access-confirm"]],inputs:{name:"name",userId:"userId",emergencyAccessId:"emergencyAccessId",formPromise:"formPromise"},outputs:{onConfirmed:"onConfirmed"},decls:69,vars:29,consts:[["role","dialog","aria-modal","true","aria-labelledby","confirmUserTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],[1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","confirmUserTitle",1,"modal-title"],["class","text-muted",4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["href","https://bitwarden.com/help/fingerprint-phrase/","target","_blank","rel","noopener"],[1,"form-check"],["type","checkbox","id","dontAskAgain","name","DontAskAgain",1,"form-check-input",3,"ngModel","ngModelChange"],["for","dontAskAgain",1,"form-check-label"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"text-muted"]],template:function(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",1),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"form",2,3),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"div",4),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"h2",5),a.ɵɵtext(10),a.ɵɵpipe(11,"i18n"),a.ɵɵtemplate(12,f,2,1,"small",6),a.ɵɵtext(13,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementStart(15,"button",7),a.ɵɵpipe(16,"i18n"),a.ɵɵtext(17,"\n "),a.ɵɵelementStart(18,"span",8),a.ɵɵtext(19,"×"),a.ɵɵelementEnd(),a.ɵɵtext(20,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(21,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(22,"\n "),a.ɵɵelementStart(23,"div",9),a.ɵɵtext(24,"\n "),a.ɵɵelementStart(25,"p"),a.ɵɵtext(26),a.ɵɵpipe(27,"i18n"),a.ɵɵelementStart(28,"a",10),a.ɵɵtext(29),a.ɵɵpipe(30,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(31,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(32,"\n "),a.ɵɵelementStart(33,"p"),a.ɵɵtext(34,"\n "),a.ɵɵelementStart(35,"code"),a.ɵɵtext(36),a.ɵɵelementEnd(),a.ɵɵtext(37,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(38,"\n "),a.ɵɵelementStart(39,"div",11),a.ɵɵtext(40,"\n "),a.ɵɵelementStart(41,"input",12),a.ɵɵlistener("ngModelChange",(function(e){return t.dontAskAgain=e})),a.ɵɵelementEnd(),a.ɵɵtext(42,"\n "),a.ɵɵelementStart(43,"label",13),a.ɵɵtext(44),a.ɵɵpipe(45,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(46,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(47,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(48,"\n "),a.ɵɵelementStart(49,"div",14),a.ɵɵtext(50,"\n "),a.ɵɵelementStart(51,"button",15),a.ɵɵtext(52,"\n "),a.ɵɵelement(53,"i",16),a.ɵɵpipe(54,"i18n"),a.ɵɵtext(55,"\n "),a.ɵɵelementStart(56,"span"),a.ɵɵtext(57),a.ɵɵpipe(58,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(59,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(60,"\n "),a.ɵɵelementStart(61,"button",17),a.ɵɵtext(62),a.ɵɵpipe(63,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(64,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(65,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(66,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(67,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(68,"\n")),2&e){const e=a.ɵɵreference(5);a.ɵɵadvance(4),a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(6),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(11,13,"confirmUser"),"\n "),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.name),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(16,15,"close")),a.ɵɵadvance(11),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(27,17,"fingerprintEnsureIntegrityVerify"),"\n "),a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(30,19,"learnMore"),""),a.ɵɵadvance(7),a.ɵɵtextInterpolate(t.fingerprint),a.ɵɵadvance(5),a.ɵɵproperty("ngModel",t.dontAskAgain),a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(45,21,"dontAskFingerprintAgain"),"\n "),a.ɵɵadvance(7),a.ɵɵproperty("disabled",e.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(54,23,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(58,25,"confirm")),a.ɵɵadvance(5),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(63,27,"cancel"),"\n ")}},directives:[p.ɵNgNoValidate,p.NgControlStatusGroup,p.NgForm,u.ApiActionDirective,m.NgIf,h.A11yTitleDirective,p.CheckboxControlValueAccessor,p.NgControlStatus,p.NgModel],pipes:[v.I18nPipe],encapsulation:2})},36485:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAccessTakeoverComponent=void 0;const r=n(32621),o=n(16545),a=(n(91674),n(85714),n(51554),n(36631),n(45552),n(84275),n(73828),n(62166),n(73569),n(20971),n(34144)),s=n(41317),l=n(69731),c=n(64288),d=n(32621),p=n(51554),u=n(85714),m=n(45552),h=n(73569),v=n(84275),f=n(73828),g=n(62166),y=n(91674),x=n(36631),S=n(96832),b=n(56820),w=n(57490),C=n(8863),I=n(51626),E=n(48198),P=n(40946),O=n(99729);function k(e,t){if(1&e&&(d.ɵɵelementStart(0,"small",24),d.ɵɵtext(1),d.ɵɵelementEnd()),2&e){const e=d.ɵɵnextContext();d.ɵɵadvance(1),d.ɵɵtextInterpolate(e.name)}}function A(e,t){if(1&e&&(d.ɵɵelementStart(0,"app-callout",25),d.ɵɵtext(1,"\n "),d.ɵɵelementEnd()),2&e){const e=d.ɵɵnextContext();d.ɵɵproperty("enforcedPolicyOptions",e.enforcedPolicyOptions)}}class T extends o.ChangePasswordComponent{constructor(e,t,n,i,o,a,s,l,c){super(e,t,n,o,a,s,i),this.apiService=l,this.logService=c,this.onDone=new r.EventEmitter}ngOnInit(){return i(this,void 0,void 0,(function*(){const e=yield this.apiService.getEmergencyGrantorPolicies(this.emergencyAccessId);if(null!=e.data&&e.data.length>0){const t=e.data.map((e=>new s.Policy(new a.PolicyData(e))));this.enforcedPolicyOptions=yield this.policyService.getMasterPasswordPolicyOptions(t)}}))}submit(){return i(this,void 0,void 0,(function*(){if(!(yield this.strongPassword()))return;const e=yield this.apiService.postEmergencyAccessTakeover(this.emergencyAccessId),t=yield this.cryptoService.rsaDecrypt(e.keyEncrypted),n=new l.SymmetricCryptoKey(t);if(null==n)return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("unexpectedError"));const i=yield this.cryptoService.makeKey(this.masterPassword,this.email,e.kdf,e.kdfIterations),r=yield this.cryptoService.hashPassword(this.masterPassword,i),o=yield this.cryptoService.remakeEncKey(i,n),a=new c.EmergencyAccessPasswordRequest;a.newMasterPasswordHash=r,a.key=o[1].encryptedString,this.apiService.postEmergencyAccessPassword(this.emergencyAccessId,a);try{this.onDone.emit()}catch(s){this.logService.error(s)}}))}}t.EmergencyAccessTakeoverComponent=T,T.ɵfac=function(e){return new(e||T)(d.ɵɵdirectiveInject(p.I18nService),d.ɵɵdirectiveInject(u.CryptoService),d.ɵɵdirectiveInject(m.MessagingService),d.ɵɵdirectiveInject(h.StateService),d.ɵɵdirectiveInject(v.PasswordGenerationService),d.ɵɵdirectiveInject(f.PlatformUtilsService),d.ɵɵdirectiveInject(g.PolicyService),d.ɵɵdirectiveInject(y.ApiService),d.ɵɵdirectiveInject(x.LogService))},T.ɵcmp=d.ɵɵdefineComponent({type:T,selectors:[["emergency-access-takeover"]],inputs:{emergencyAccessId:"emergencyAccessId",name:"name",email:"email",kdf:"kdf",kdfIterations:"kdfIterations"},outputs:{onDone:"onDone"},features:[d.ɵɵInheritDefinitionFeature],decls:82,vars:32,consts:[["role","dialog","aria-modal","true","aria-labelledby","userAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","userAddEditTitle",1,"modal-title"],["class","text-muted",4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["type","warning"],["type","info",3,"enforcedPolicyOptions",4,"ngIf"],[1,"row"],[1,"col-6"],[1,"form-group"],["for","masterPassword"],["id","masterPassword","type","password","name","NewMasterPasswordHash","required","","appInputVerbatim","","autocomplete","new-password",1,"form-control","mb-1",3,"ngModel","ngModelChange","input"],[3,"score","showText"],["for","masterPasswordRetype"],["id","masterPasswordRetype","type","password","name","MasterPasswordRetype","required","","appInputVerbatim","","autocomplete","new-password",1,"form-control",3,"ngModel","ngModelChange"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"text-muted"],["type","info",3,"enforcedPolicyOptions"]],template:function(e,t){if(1&e&&(d.ɵɵelementStart(0,"div",0),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"div",1),d.ɵɵtext(3,"\n "),d.ɵɵelementStart(4,"form",2,3),d.ɵɵlistener("ngSubmit",(function(){return t.submit()})),d.ɵɵtext(6,"\n "),d.ɵɵelementStart(7,"div",4),d.ɵɵtext(8,"\n "),d.ɵɵelementStart(9,"h2",5),d.ɵɵtext(10),d.ɵɵpipe(11,"i18n"),d.ɵɵtemplate(12,k,2,1,"small",6),d.ɵɵtext(13,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(14,"\n "),d.ɵɵelementStart(15,"button",7),d.ɵɵpipe(16,"i18n"),d.ɵɵtext(17,"\n "),d.ɵɵelementStart(18,"span",8),d.ɵɵtext(19,"×"),d.ɵɵelementEnd(),d.ɵɵtext(20,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(21,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(22,"\n "),d.ɵɵelementStart(23,"div",9),d.ɵɵtext(24,"\n "),d.ɵɵelementStart(25,"app-callout",10),d.ɵɵtext(26),d.ɵɵpipe(27,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(28,"\n "),d.ɵɵtemplate(29,A,2,1,"app-callout",11),d.ɵɵtext(30,"\n "),d.ɵɵelementStart(31,"div",12),d.ɵɵtext(32,"\n "),d.ɵɵelementStart(33,"div",13),d.ɵɵtext(34,"\n "),d.ɵɵelementStart(35,"div",14),d.ɵɵtext(36,"\n "),d.ɵɵelementStart(37,"label",15),d.ɵɵtext(38),d.ɵɵpipe(39,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(40,"\n "),d.ɵɵelementStart(41,"input",16),d.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e}))("input",(function(){return t.updatePasswordStrength()})),d.ɵɵelementEnd(),d.ɵɵtext(42,"\n "),d.ɵɵelementStart(43,"app-password-strength",17),d.ɵɵtext(44,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(45,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(46,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(47,"\n "),d.ɵɵelementStart(48,"div",13),d.ɵɵtext(49,"\n "),d.ɵɵelementStart(50,"div",14),d.ɵɵtext(51,"\n "),d.ɵɵelementStart(52,"label",18),d.ɵɵtext(53),d.ɵɵpipe(54,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(55,"\n "),d.ɵɵelementStart(56,"input",19),d.ɵɵlistener("ngModelChange",(function(e){return t.masterPasswordRetype=e})),d.ɵɵelementEnd(),d.ɵɵtext(57,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(58,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(59,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(60,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(61,"\n "),d.ɵɵelementStart(62,"div",20),d.ɵɵtext(63,"\n "),d.ɵɵelementStart(64,"button",21),d.ɵɵtext(65,"\n "),d.ɵɵelement(66,"i",22),d.ɵɵpipe(67,"i18n"),d.ɵɵtext(68,"\n "),d.ɵɵelementStart(69,"span"),d.ɵɵtext(70),d.ɵɵpipe(71,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(72,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(73,"\n "),d.ɵɵelementStart(74,"button",23),d.ɵɵtext(75),d.ɵɵpipe(76,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(77,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(78,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(79,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(80,"\n"),d.ɵɵelementEnd(),d.ɵɵtext(81,"\n")),2&e){const e=d.ɵɵreference(5);d.ɵɵadvance(4),d.ɵɵproperty("appApiAction",t.formPromise),d.ɵɵadvance(6),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(11,16,"takeover"),"\n "),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",t.name),d.ɵɵadvance(3),d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(16,18,"close")),d.ɵɵadvance(11),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(27,20,"loggedOutWarning")),d.ɵɵadvance(3),d.ɵɵproperty("ngIf",t.enforcedPolicyOptions),d.ɵɵadvance(9),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(39,22,"newMasterPass")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",t.masterPassword),d.ɵɵadvance(2),d.ɵɵproperty("score",t.masterPasswordScore)("showText",!0),d.ɵɵadvance(10),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(54,24,"confirmNewMasterPass")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",t.masterPasswordRetype),d.ɵɵadvance(8),d.ɵɵproperty("disabled",e.loading),d.ɵɵadvance(2),d.ɵɵpropertyInterpolate("title",d.ɵɵpipeBind1(67,26,"loading")),d.ɵɵadvance(4),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(71,28,"save")),d.ɵɵadvance(5),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(76,30,"cancel"),"\n ")}},directives:[S.NgControlStatusGroup,S.NgForm,b.ApiActionDirective,w.NgIf,C.A11yTitleDirective,I.CalloutComponent,S.DefaultValueAccessor,S.RequiredValidator,E.InputVerbatimDirective,S.NgControlStatus,S.NgModel,P.PasswordStrengthComponent],pipes:[O.I18nPipe],encapsulation:2})},12721:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAccessViewComponent=void 0;const r=n(32621),o=(n(68012),n(64684),n(91674),n(45330),n(85714),n(82789)),a=n(49624),s=n(69731),l=n(4034),c=n(19733),d=n(32621),p=n(45330),u=n(85714),m=n(64684),h=n(68012),v=n(91674),f=n(57490),g=n(18310),y=n(1142),x=n(39159),S=n(8863),b=n(99729),w=["cipherAddEdit"],C=["attachments"];function I(e,t){1&e&&(d.ɵɵelementContainerStart(0),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"i",13),d.ɵɵpipe(3,"i18n"),d.ɵɵtext(4,"\n "),d.ɵɵelementStart(5,"span",14),d.ɵɵtext(6),d.ɵɵpipe(7,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(8,"\n "),d.ɵɵelementContainerEnd()),2&e&&(d.ɵɵadvance(2),d.ɵɵpropertyInterpolate("title",d.ɵɵpipeBind1(3,2,"shared")),d.ɵɵadvance(4),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(7,4,"shared")))}function E(e,t){1&e&&(d.ɵɵelementContainerStart(0),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"i",15),d.ɵɵpipe(3,"i18n"),d.ɵɵtext(4,"\n "),d.ɵɵelementStart(5,"span",14),d.ɵɵtext(6),d.ɵɵpipe(7,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(8,"\n "),d.ɵɵelementContainerEnd()),2&e&&(d.ɵɵadvance(2),d.ɵɵpropertyInterpolate("title",d.ɵɵpipeBind1(3,2,"attachments")),d.ɵɵadvance(4),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(7,4,"attachments")))}function P(e,t){if(1&e){const e=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"div",16),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"button",17),d.ɵɵpipe(3,"i18n"),d.ɵɵtext(4,"\n "),d.ɵɵelement(5,"i",18),d.ɵɵtext(6,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(7,"\n "),d.ɵɵelementStart(8,"div",19),d.ɵɵtext(9,"\n "),d.ɵɵelementStart(10,"a",20),d.ɵɵlistener("click",(function(){d.ɵɵrestoreView(e);const t=d.ɵɵnextContext().$implicit;return d.ɵɵnextContext(2).viewAttachments(t)})),d.ɵɵtext(11,"\n "),d.ɵɵelement(12,"i",21),d.ɵɵtext(13),d.ɵɵpipe(14,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(15,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(16,"\n "),d.ɵɵelementEnd()}2&e&&(d.ɵɵadvance(2),d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(3,2,"options")),d.ɵɵadvance(11),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(14,4,"attachments"),"\n "))}function O(e,t){if(1&e){const e=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"tr"),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"td",7),d.ɵɵtext(3,"\n "),d.ɵɵelement(4,"app-vault-icon",8),d.ɵɵtext(5,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(6,"\n "),d.ɵɵelementStart(7,"td",9),d.ɵɵtext(8,"\n "),d.ɵɵelementStart(9,"a",10),d.ɵɵlistener("click",(function(){const t=d.ɵɵrestoreView(e).$implicit;return d.ɵɵnextContext(2).selectCipher(t)})),d.ɵɵpipe(10,"i18n"),d.ɵɵtext(11),d.ɵɵelementEnd(),d.ɵɵtext(12,"\n "),d.ɵɵtemplate(13,I,9,6,"ng-container",2),d.ɵɵtext(14,"\n "),d.ɵɵtemplate(15,E,9,6,"ng-container",2),d.ɵɵtext(16,"\n "),d.ɵɵelement(17,"br"),d.ɵɵtext(18,"\n "),d.ɵɵelementStart(19,"small"),d.ɵɵtext(20),d.ɵɵelementEnd(),d.ɵɵtext(21,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(22,"\n "),d.ɵɵelementStart(23,"td",11),d.ɵɵtext(24,"\n "),d.ɵɵtemplate(25,P,17,6,"div",12),d.ɵɵtext(26,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(27,"\n "),d.ɵɵelementEnd()}if(2&e){const e=t.$implicit;d.ɵɵadvance(4),d.ɵɵproperty("cipher",e),d.ɵɵadvance(5),d.ɵɵpropertyInterpolate("title",d.ɵɵpipeBind1(10,7,"editItem")),d.ɵɵadvance(2),d.ɵɵtextInterpolate(e.name),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",e.organizationId),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",e.hasAttachments),d.ɵɵadvance(5),d.ɵɵtextInterpolate(e.subTitle),d.ɵɵadvance(5),d.ɵɵproperty("ngIf",e.hasAttachments)}}function k(e,t){if(1&e&&(d.ɵɵelementContainerStart(0),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"table",5),d.ɵɵtext(3,"\n "),d.ɵɵelementStart(4,"tbody"),d.ɵɵtext(5,"\n "),d.ɵɵtemplate(6,O,28,9,"tr",6),d.ɵɵtext(7,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(8,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(9,"\n "),d.ɵɵelementContainerEnd()),2&e){const e=d.ɵɵnextContext();d.ɵɵadvance(6),d.ɵɵproperty("ngForOf",e.ciphers)}}function A(e,t){1&e&&(d.ɵɵelementContainerStart(0),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"i",22),d.ɵɵpipe(3,"i18n"),d.ɵɵtext(4,"\n "),d.ɵɵelementStart(5,"span",14),d.ɵɵtext(6),d.ɵɵpipe(7,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(8,"\n "),d.ɵɵelementContainerEnd()),2&e&&(d.ɵɵadvance(2),d.ɵɵpropertyInterpolate("title",d.ɵɵpipeBind1(3,2,"loading")),d.ɵɵadvance(4),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(7,4,"loading")))}function T(e,t){}function M(e,t){}class B{constructor(e,t,n,i,r,o){this.cipherService=e,this.cryptoService=t,this.modalService=n,this.router=i,this.route=r,this.apiService=o,this.ciphers=[],this.loaded=!1}ngOnInit(){this.route.params.subscribe((e=>{if(null==e.id)return this.router.navigate(["settings/emergency-access"]);this.id=e.id,this.load()}))}selectCipher(e){return i(this,void 0,void 0,(function*(){const[t,n]=yield this.modalService.openViewRef(c.EmergencyAddEditComponent,this.cipherAddEditModalRef,(t=>{t.cipherId=null==e?null:e.id,t.cipher=e}));return n}))}load(){return i(this,void 0,void 0,(function*(){const e=yield this.apiService.postEmergencyAccessView(this.id);this.ciphers=yield this.getAllCiphers(e),this.loaded=!0}))}viewAttachments(e){return i(this,void 0,void 0,(function*(){yield this.modalService.openViewRef(l.EmergencyAccessAttachmentsComponent,this.attachmentsModalRef,(t=>{t.cipher=e,t.emergencyAccessId=this.id}))}))}getAllCiphers(e){return i(this,void 0,void 0,(function*(){const t=e.ciphers,n=[],i=yield this.cryptoService.rsaDecrypt(e.keyEncrypted),r=new s.SymmetricCryptoKey(i),l=[];return t.forEach((e=>{const t=new o.CipherData(e),i=new a.Cipher(t);l.push(i.decrypt(r).then((e=>n.push(e))))})),yield Promise.all(l),n.sort(this.cipherService.getLocaleSortingFunction()),n}))}}t.EmergencyAccessViewComponent=B,B.ɵfac=function(e){return new(e||B)(d.ɵɵdirectiveInject(p.CipherService),d.ɵɵdirectiveInject(u.CryptoService),d.ɵɵdirectiveInject(m.ModalService),d.ɵɵdirectiveInject(h.Router),d.ɵɵdirectiveInject(h.ActivatedRoute),d.ɵɵdirectiveInject(v.ApiService))},B.ɵcmp=d.ɵɵdefineComponent({type:B,selectors:[["emergency-access-view"]],viewQuery:function(e,t){if(1&e&&(d.ɵɵviewQuery(w,7,r.ViewContainerRef),d.ɵɵviewQuery(C,7,r.ViewContainerRef)),2&e){let e;d.ɵɵqueryRefresh(e=d.ɵɵloadQuery())&&(t.cipherAddEditModalRef=e.first),d.ɵɵqueryRefresh(e=d.ɵɵloadQuery())&&(t.attachmentsModalRef=e.first)}},decls:20,vars:5,consts:[[1,"page-header"],[1,"mt-4"],[4,"ngIf"],["cipherAddEdit",""],["attachments",""],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],["href","#","appStopClick","",3,"title","click"],[1,"table-list-options"],["class","dropdown","appListDropdown","",4,"ngIf"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-collection",3,"title"],[1,"sr-only"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-paperclip",3,"title"],["appListDropdown","",1,"dropdown"],["type","button","id","dropdownMenuButton","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-cog","bwi-lg"],["aria-labelledby","dropdownMenuButton",1,"dropdown-menu","dropdown-menu-right"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-paperclip"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"]],template:function(e,t){1&e&&(d.ɵɵelementStart(0,"div",0),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"h1"),d.ɵɵtext(3),d.ɵɵpipe(4,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(5,"\n"),d.ɵɵelementEnd(),d.ɵɵtext(6,"\n"),d.ɵɵelementStart(7,"div",1),d.ɵɵtext(8,"\n "),d.ɵɵtemplate(9,k,10,1,"ng-container",2),d.ɵɵtext(10,"\n "),d.ɵɵtemplate(11,A,9,6,"ng-container",2),d.ɵɵtext(12,"\n"),d.ɵɵelementEnd(),d.ɵɵtext(13,"\n"),d.ɵɵtemplate(14,T,0,0,"ng-template",null,3,d.ɵɵtemplateRefExtractor),d.ɵɵtext(16,"\n"),d.ɵɵtemplate(17,M,0,0,"ng-template",null,4,d.ɵɵtemplateRefExtractor),d.ɵɵtext(19,"\n")),2&e&&(d.ɵɵadvance(3),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(4,3,"vault")),d.ɵɵadvance(6),d.ɵɵproperty("ngIf",t.ciphers.length),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",!t.loaded))},directives:[f.NgIf,f.NgForOf,g.IconComponent,y.StopClickDirective,x.StopPropDirective,S.A11yTitleDirective],pipes:[b.I18nPipe],encapsulation:2})},41764:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAccessComponent=void 0;const r=n(32621),o=(n(52080),n(64684),n(91674),n(85714),n(51554),n(36631),n(45552),n(63513),n(73828),n(73569),n(47200)),a=n(82838),s=n(82769),l=n(16657),c=n(50881),d=n(36894),p=n(94423),u=n(36485),m=n(32621),h=n(91674),v=n(51554),f=n(64684),g=n(73828),y=n(85714),x=n(45552),S=n(52080),b=n(36631),w=n(73569),C=n(63513),I=n(57490),E=n(48403),P=n(15370),O=n(1142),k=n(8863),A=n(68012),T=n(99729),M=n(52080),B=["addEdit"],D=["takeoverTemplate"],R=["confirmTemplate"];function F(e,t){1&e&&(m.ɵɵelementStart(0,"p"),m.ɵɵtext(1,"\n "),m.ɵɵelementStart(2,"b"),m.ɵɵtext(3),m.ɵɵpipe(4,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(5),m.ɵɵpipe(6,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(3),m.ɵɵtextInterpolate1("",m.ɵɵpipeBind1(4,2,"warning"),":"),m.ɵɵadvance(2),m.ɵɵtextInterpolate1(" ",m.ɵɵpipeBind1(6,4,"emergencyAccessOwnerWarning"),"\n"))}function U(e,t){1&e&&(m.ɵɵelementStart(0,"span",32),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(2,1,"invited")))}function V(e,t){1&e&&(m.ɵɵelementStart(0,"span",33),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(2,1,"accepted")))}function N(e,t){1&e&&(m.ɵɵelementStart(0,"span",33),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(2,1,"emergencyAccessRecoveryInitiated")))}function _(e,t){1&e&&(m.ɵɵelementStart(0,"span",34),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(2,1,"emergencyAccessRecoveryApproved")))}function j(e,t){1&e&&(m.ɵɵelementStart(0,"span",35),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(2,1,"view")))}function z(e,t){1&e&&(m.ɵɵelementStart(0,"span",35),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(2,1,"takeover")))}function H(e,t){if(1&e&&(m.ɵɵelementStart(0,"small",36),m.ɵɵtext(1),m.ɵɵelementEnd()),2&e){const e=m.ɵɵnextContext().$implicit;m.ɵɵadvance(1),m.ɵɵtextInterpolate(e.name)}}function L(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"a",37),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext().$implicit;return m.ɵɵnextContext(2).reinvite(t)})),m.ɵɵtext(1,"\n "),m.ɵɵelement(2,"i",38),m.ɵɵtext(3),m.ɵɵpipe(4,"i18n"),m.ɵɵelementEnd()}2&e&&(m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(4,1,"resendInvitation"),"\n "))}function K(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"a",39),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext().$implicit;return m.ɵɵnextContext(2).confirm(t)})),m.ɵɵtext(1,"\n "),m.ɵɵelement(2,"i",40),m.ɵɵtext(3),m.ɵɵpipe(4,"i18n"),m.ɵɵelementEnd()}2&e&&(m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(4,1,"confirm"),"\n "))}function q(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"a",39),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext().$implicit;return m.ɵɵnextContext(2).approve(t)})),m.ɵɵtext(1,"\n "),m.ɵɵelement(2,"i",40),m.ɵɵtext(3),m.ɵɵpipe(4,"i18n"),m.ɵɵelementEnd()}2&e&&(m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(4,1,"approve"),"\n "))}function G(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"a",41),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext().$implicit;return m.ɵɵnextContext(2).reject(t)})),m.ɵɵtext(1,"\n "),m.ɵɵelement(2,"i",31),m.ɵɵtext(3),m.ɵɵpipe(4,"i18n"),m.ɵɵelementEnd()}2&e&&(m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(4,1,"reject"),"\n "))}function W(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"tr"),m.ɵɵtext(1,"\n "),m.ɵɵelementStart(2,"td",14),m.ɵɵtext(3,"\n "),m.ɵɵelementStart(4,"app-avatar",15),m.ɵɵpipe(5,"userName"),m.ɵɵtext(6,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(7,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(8,"\n "),m.ɵɵelementStart(9,"td"),m.ɵɵtext(10,"\n "),m.ɵɵelementStart(11,"a",16),m.ɵɵlistener("click",(function(){const t=m.ɵɵrestoreView(e).$implicit;return m.ɵɵnextContext(2).edit(t)})),m.ɵɵtext(12),m.ɵɵelementEnd(),m.ɵɵtext(13,"\n "),m.ɵɵtemplate(14,U,3,3,"span",17),m.ɵɵtext(15,"\n "),m.ɵɵtemplate(16,V,3,3,"span",18),m.ɵɵtext(17,"\n "),m.ɵɵtemplate(18,N,3,3,"span",18),m.ɵɵtext(19,"\n "),m.ɵɵtemplate(20,_,3,3,"span",19),m.ɵɵtext(21,"\n\n "),m.ɵɵtemplate(22,j,3,3,"span",20),m.ɵɵtext(23,"\n "),m.ɵɵtemplate(24,z,3,3,"span",20),m.ɵɵtext(25,"\n\n "),m.ɵɵtemplate(26,H,2,1,"small",21),m.ɵɵtext(27,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(28,"\n "),m.ɵɵelementStart(29,"td",22),m.ɵɵtext(30,"\n "),m.ɵɵelementStart(31,"div",23),m.ɵɵtext(32,"\n "),m.ɵɵelementStart(33,"button",24),m.ɵɵpipe(34,"i18n"),m.ɵɵtext(35,"\n "),m.ɵɵelement(36,"i",25),m.ɵɵtext(37,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(38,"\n "),m.ɵɵelementStart(39,"div",26),m.ɵɵtext(40,"\n "),m.ɵɵtemplate(41,L,5,3,"a",27),m.ɵɵtext(42,"\n "),m.ɵɵtemplate(43,K,5,3,"a",28),m.ɵɵtext(44,"\n "),m.ɵɵtemplate(45,q,5,3,"a",28),m.ɵɵtext(46,"\n "),m.ɵɵtemplate(47,G,5,3,"a",29),m.ɵɵtext(48,"\n "),m.ɵɵelementStart(49,"a",30),m.ɵɵlistener("click",(function(){const t=m.ɵɵrestoreView(e).$implicit;return m.ɵɵnextContext(2).remove(t)})),m.ɵɵtext(50,"\n "),m.ɵɵelement(51,"i",31),m.ɵɵtext(52),m.ɵɵpipe(53,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(54,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(55,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(56,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(57,"\n "),m.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=m.ɵɵnextContext(2);m.ɵɵadvance(4),m.ɵɵproperty("data",m.ɵɵpipeBind1(5,18,e))("email",e.email)("circle",!0)("fontSize",14),m.ɵɵadvance(8),m.ɵɵtextInterpolate(e.email),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.status===n.emergencyAccessStatusType.Invited),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.status===n.emergencyAccessStatusType.Accepted),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.status===n.emergencyAccessStatusType.RecoveryInitiated),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.status===n.emergencyAccessStatusType.RecoveryApproved),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.type===n.emergencyAccessType.View),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.type===n.emergencyAccessType.Takeover),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.name),m.ɵɵadvance(7),m.ɵɵpropertyInterpolate("appA11yTitle",m.ɵɵpipeBind1(34,20,"options")),m.ɵɵadvance(8),m.ɵɵproperty("ngIf",e.status===n.emergencyAccessStatusType.Invited),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.status===n.emergencyAccessStatusType.Accepted),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.status===n.emergencyAccessStatusType.RecoveryInitiated),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.status===n.emergencyAccessStatusType.RecoveryInitiated||e.status===n.emergencyAccessStatusType.RecoveryApproved),m.ɵɵadvance(5),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(53,22,"remove"),"\n ")}}function $(e,t){if(1&e&&(m.ɵɵelementStart(0,"table",12),m.ɵɵtext(1,"\n "),m.ɵɵelementStart(2,"tbody"),m.ɵɵtext(3,"\n "),m.ɵɵtemplate(4,W,58,24,"tr",13),m.ɵɵtext(5,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(6,"\n"),m.ɵɵelementEnd()),2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(4),m.ɵɵproperty("ngForOf",e.trustedContacts)}}function Y(e,t){1&e&&(m.ɵɵelementStart(0,"p"),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(2,1,"noTrustedContacts")))}function Q(e,t){1&e&&(m.ɵɵelementStart(0,"span",32),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(2,1,"invited")))}function J(e,t){1&e&&(m.ɵɵelementStart(0,"span",33),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(2,1,"accepted")))}function Z(e,t){1&e&&(m.ɵɵelementStart(0,"span",33),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(2,1,"emergencyAccessRecoveryInitiated")))}function X(e,t){1&e&&(m.ɵɵelementStart(0,"span",34),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(2,1,"emergencyAccessRecoveryApproved")))}function ee(e,t){1&e&&(m.ɵɵelementStart(0,"span",35),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(2,1,"view")))}function te(e,t){1&e&&(m.ɵɵelementStart(0,"span",35),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(2,1,"takeover")))}function ne(e,t){if(1&e&&(m.ɵɵelementStart(0,"small",36),m.ɵɵtext(1),m.ɵɵelementEnd()),2&e){const e=m.ɵɵnextContext().$implicit;m.ɵɵadvance(1),m.ɵɵtextInterpolate(e.name)}}function ie(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"a",37),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext().$implicit;return m.ɵɵnextContext(2).requestAccess(t)})),m.ɵɵtext(1,"\n "),m.ɵɵelement(2,"i",38),m.ɵɵtext(3),m.ɵɵpipe(4,"i18n"),m.ɵɵelementEnd()}2&e&&(m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(4,1,"requestAccess"),"\n "))}function re(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"a",37),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext().$implicit;return m.ɵɵnextContext(2).takeover(t)})),m.ɵɵtext(1,"\n "),m.ɵɵelement(2,"i",43),m.ɵɵtext(3),m.ɵɵpipe(4,"i18n"),m.ɵɵelementEnd()}2&e&&(m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(4,1,"takeover"),"\n "))}function oe(e,t){if(1&e&&(m.ɵɵelementStart(0,"a",44),m.ɵɵtext(1,"\n "),m.ɵɵelement(2,"i",45),m.ɵɵtext(3),m.ɵɵpipe(4,"i18n"),m.ɵɵelementEnd()),2&e){const e=m.ɵɵnextContext().$implicit;m.ɵɵproperty("routerLink",e.id),m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(4,2,"view"),"\n ")}}function ae(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"tr"),m.ɵɵtext(1,"\n "),m.ɵɵelementStart(2,"td",14),m.ɵɵtext(3,"\n "),m.ɵɵelementStart(4,"app-avatar",15),m.ɵɵpipe(5,"userName"),m.ɵɵtext(6,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(7,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(8,"\n "),m.ɵɵelementStart(9,"td"),m.ɵɵtext(10,"\n "),m.ɵɵelementStart(11,"span"),m.ɵɵtext(12),m.ɵɵelementEnd(),m.ɵɵtext(13,"\n "),m.ɵɵtemplate(14,Q,3,3,"span",17),m.ɵɵtext(15,"\n "),m.ɵɵtemplate(16,J,3,3,"span",18),m.ɵɵtext(17,"\n "),m.ɵɵtemplate(18,Z,3,3,"span",18),m.ɵɵtext(19,"\n "),m.ɵɵtemplate(20,X,3,3,"span",19),m.ɵɵtext(21,"\n\n "),m.ɵɵtemplate(22,ee,3,3,"span",20),m.ɵɵtext(23,"\n "),m.ɵɵtemplate(24,te,3,3,"span",20),m.ɵɵtext(25,"\n\n "),m.ɵɵtemplate(26,ne,2,1,"small",21),m.ɵɵtext(27,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(28,"\n "),m.ɵɵelementStart(29,"td",22),m.ɵɵtext(30,"\n "),m.ɵɵelementStart(31,"div",23),m.ɵɵtext(32,"\n "),m.ɵɵelementStart(33,"button",24),m.ɵɵpipe(34,"i18n"),m.ɵɵtext(35,"\n "),m.ɵɵelement(36,"i",25),m.ɵɵtext(37,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(38,"\n "),m.ɵɵelementStart(39,"div",26),m.ɵɵtext(40,"\n "),m.ɵɵtemplate(41,ie,5,3,"a",27),m.ɵɵtext(42,"\n "),m.ɵɵtemplate(43,re,5,3,"a",27),m.ɵɵtext(44,"\n "),m.ɵɵtemplate(45,oe,5,4,"a",42),m.ɵɵtext(46,"\n "),m.ɵɵelementStart(47,"a",30),m.ɵɵlistener("click",(function(){const t=m.ɵɵrestoreView(e).$implicit;return m.ɵɵnextContext(2).remove(t)})),m.ɵɵtext(48,"\n "),m.ɵɵelement(49,"i",31),m.ɵɵtext(50),m.ɵɵpipe(51,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(52,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(53,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(54,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(55,"\n "),m.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=m.ɵɵnextContext(2);m.ɵɵadvance(4),m.ɵɵproperty("data",m.ɵɵpipeBind1(5,17,e))("email",e.email)("circle",!0)("fontSize",14),m.ɵɵadvance(8),m.ɵɵtextInterpolate(e.email),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.status===n.emergencyAccessStatusType.Invited),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.status===n.emergencyAccessStatusType.Accepted),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.status===n.emergencyAccessStatusType.RecoveryInitiated),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.status===n.emergencyAccessStatusType.RecoveryApproved),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.type===n.emergencyAccessType.View),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.type===n.emergencyAccessType.Takeover),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.name),m.ɵɵadvance(7),m.ɵɵpropertyInterpolate("appA11yTitle",m.ɵɵpipeBind1(34,19,"options")),m.ɵɵadvance(8),m.ɵɵproperty("ngIf",e.status===n.emergencyAccessStatusType.Confirmed),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.status===n.emergencyAccessStatusType.RecoveryApproved&&e.type===n.emergencyAccessType.Takeover),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.status===n.emergencyAccessStatusType.RecoveryApproved&&e.type===n.emergencyAccessType.View),m.ɵɵadvance(5),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(51,21,"remove"),"\n ")}}function se(e,t){if(1&e&&(m.ɵɵelementStart(0,"table",12),m.ɵɵtext(1,"\n "),m.ɵɵelementStart(2,"tbody"),m.ɵɵtext(3,"\n "),m.ɵɵtemplate(4,ae,56,23,"tr",13),m.ɵɵtext(5,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(6,"\n"),m.ɵɵelementEnd()),2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(4),m.ɵɵproperty("ngForOf",e.grantedContacts)}}function le(e,t){1&e&&(m.ɵɵelementStart(0,"p"),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(2,1,"noGrantedAccess")))}function ce(e,t){}function de(e,t){}function pe(e,t){}class ue{constructor(e,t,n,i,r,s,l,c,d,p){this.apiService=e,this.i18nService=t,this.modalService=n,this.platformUtilsService=i,this.cryptoService=r,this.messagingService=s,this.userNamePipe=l,this.logService=c,this.stateService=d,this.organizationService=p,this.emergencyAccessType=a.EmergencyAccessType,this.emergencyAccessStatusType=o.EmergencyAccessStatusType}ngOnInit(){return i(this,void 0,void 0,(function*(){this.canAccessPremium=yield this.stateService.getCanAccessPremium();const e=yield this.organizationService.getAll();this.isOrganizationOwner=e.some((e=>e.isOwner)),this.load()}))}load(){return i(this,void 0,void 0,(function*(){this.trustedContacts=(yield this.apiService.getEmergencyAccessTrusted()).data,this.grantedContacts=(yield this.apiService.getEmergencyAccessGranted()).data}))}premiumRequired(){return i(this,void 0,void 0,(function*(){this.canAccessPremium||this.messagingService.send("premiumRequired")}))}edit(e){return i(this,void 0,void 0,(function*(){const[t]=yield this.modalService.openViewRef(d.EmergencyAccessAddEditComponent,this.addEditModalRef,(n=>{n.name=this.userNamePipe.transform(e),n.emergencyAccessId=null==e?void 0:e.id,n.readOnly=!this.canAccessPremium,n.onSaved.subscribe((()=>{t.close(),this.load()})),n.onDeleted.subscribe((()=>{t.close(),this.remove(e)}))}))}))}invite(){this.edit(null)}reinvite(e){return i(this,void 0,void 0,(function*(){null==this.actionPromise&&(this.actionPromise=this.apiService.postEmergencyAccessReinvite(e.id),yield this.actionPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("hasBeenReinvited",e.email)),this.actionPromise=null)}))}confirm(e){return i(this,void 0,void 0,(function*(){function t(){e.status=o.EmergencyAccessStatusType.Confirmed}if(null!=this.actionPromise)return;const n=yield this.stateService.getAutoConfirmFingerPrints();if(null!=n&&n)this.actionPromise=this.doConfirmation(e),yield this.actionPromise,t(),this.platformUtilsService.showToast("success",null,this.i18nService.t("hasBeenConfirmed",this.userNamePipe.transform(e))),this.actionPromise=null;else{const[n]=yield this.modalService.openViewRef(p.EmergencyAccessConfirmComponent,this.confirmModalRef,(r=>{r.name=this.userNamePipe.transform(e),r.emergencyAccessId=e.id,r.userId=null==e?void 0:e.granteeId,r.onConfirmed.subscribe((()=>i(this,void 0,void 0,(function*(){n.close(),r.formPromise=this.doConfirmation(e),yield r.formPromise,t(),this.platformUtilsService.showToast("success",null,this.i18nService.t("hasBeenConfirmed",this.userNamePipe.transform(e)))}))))}))}}))}remove(e){return i(this,void 0,void 0,(function*(){if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("removeUserConfirmation"),this.userNamePipe.transform(e),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{yield this.apiService.deleteEmergencyAccess(e.id),this.platformUtilsService.showToast("success",null,this.i18nService.t("removedUserId",this.userNamePipe.transform(e))),e instanceof c.EmergencyAccessGranteeDetailsResponse?this.removeGrantee(e):this.removeGrantor(e)}catch(t){this.logService.error(t)}}))}requestAccess(e){return i(this,void 0,void 0,(function*(){if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("requestAccessConfirmation",e.waitTimeDays.toString()),this.userNamePipe.transform(e),this.i18nService.t("requestAccess"),this.i18nService.t("no"),"warning")))return!1;yield this.apiService.postEmergencyAccessInitiate(e.id),e.status=o.EmergencyAccessStatusType.RecoveryInitiated,this.platformUtilsService.showToast("success",null,this.i18nService.t("requestSent",this.userNamePipe.transform(e)))}))}approve(e){return i(this,void 0,void 0,(function*(){const t=this.i18nService.t(e.type===a.EmergencyAccessType.View?"view":"takeover");if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("approveAccessConfirmation",this.userNamePipe.transform(e),t),this.userNamePipe.transform(e),this.i18nService.t("approve"),this.i18nService.t("no"),"warning")))return!1;yield this.apiService.postEmergencyAccessApprove(e.id),e.status=o.EmergencyAccessStatusType.RecoveryApproved,this.platformUtilsService.showToast("success",null,this.i18nService.t("emergencyApproved",this.userNamePipe.transform(e)))}))}reject(e){return i(this,void 0,void 0,(function*(){yield this.apiService.postEmergencyAccessReject(e.id),e.status=o.EmergencyAccessStatusType.Confirmed,this.platformUtilsService.showToast("success",null,this.i18nService.t("emergencyRejected",this.userNamePipe.transform(e)))}))}takeover(e){return i(this,void 0,void 0,(function*(){const[t]=yield this.modalService.openViewRef(u.EmergencyAccessTakeoverComponent,this.takeoverModalRef,(n=>{n.name=this.userNamePipe.transform(e),n.email=e.email,n.emergencyAccessId=null!=e?e.id:null,n.onDone.subscribe((()=>{t.close(),this.platformUtilsService.showToast("success",null,this.i18nService.t("passwordResetFor",this.userNamePipe.transform(e)))}))}))}))}removeGrantee(e){const t=this.trustedContacts.indexOf(e);t>-1&&this.trustedContacts.splice(t,1)}removeGrantor(e){const t=this.grantedContacts.indexOf(e);t>-1&&this.grantedContacts.splice(t,1)}doConfirmation(e){return i(this,void 0,void 0,(function*(){const t=yield this.cryptoService.getEncKey(),n=yield this.apiService.getUserPublicKey(e.granteeId),i=s.Utils.fromB64ToArray(n.publicKey);try{this.logService.debug("User's fingerprint: "+(yield this.cryptoService.getFingerprint(e.granteeId,i.buffer)).join("-"))}catch(a){}const r=yield this.cryptoService.rsaEncrypt(t.key,i.buffer),o=new l.EmergencyAccessConfirmRequest;o.key=r.encryptedString,yield this.apiService.postEmergencyAccessConfirm(e.id,o)}))}}t.EmergencyAccessComponent=ue,ue.ɵfac=function(e){return new(e||ue)(m.ɵɵdirectiveInject(h.ApiService),m.ɵɵdirectiveInject(v.I18nService),m.ɵɵdirectiveInject(f.ModalService),m.ɵɵdirectiveInject(g.PlatformUtilsService),m.ɵɵdirectiveInject(y.CryptoService),m.ɵɵdirectiveInject(x.MessagingService),m.ɵɵdirectiveInject(S.UserNamePipe),m.ɵɵdirectiveInject(b.LogService),m.ɵɵdirectiveInject(w.StateService),m.ɵɵdirectiveInject(C.OrganizationService))},ue.ɵcmp=m.ɵɵdefineComponent({type:ue,selectors:[["emergency-access"]],viewQuery:function(e,t){if(1&e&&(m.ɵɵviewQuery(B,7,r.ViewContainerRef),m.ɵɵviewQuery(D,7,r.ViewContainerRef),m.ɵɵviewQuery(R,7,r.ViewContainerRef)),2&e){let e;m.ɵɵqueryRefresh(e=m.ɵɵloadQuery())&&(t.addEditModalRef=e.first),m.ɵɵqueryRefresh(e=m.ɵɵloadQuery())&&(t.takeoverModalRef=e.first),m.ɵɵqueryRefresh(e=m.ɵɵloadQuery())&&(t.confirmModalRef=e.first)}},decls:59,vars:24,consts:[[1,"page-header"],["href","https://bitwarden.com/help/emergency-access/","target","_blank","rel","noopener"],[4,"ngIf"],[1,"page-header","d-flex"],[1,"ml-auto","d-flex"],["type","button",1,"btn","btn-sm","btn-outline-primary","ml-3",3,"disabled","click"],["aria-hidden","true",1,"bwi","bwi-plus","bwi-fw"],["class","table table-hover table-list mb-0",4,"ngIf"],[1,"page-header","spaced-header"],["addEdit",""],["takeoverTemplate",""],["confirmTemplate",""],[1,"table","table-hover","table-list","mb-0"],[4,"ngFor","ngForOf"],["width","30"],["size","25",3,"data","email","circle","fontSize"],["href","#","appStopClick","",3,"click"],["class","badge badge-secondary",4,"ngIf"],["class","badge badge-warning",4,"ngIf"],["class","badge badge-success",4,"ngIf"],["class","badge badge-primary",4,"ngIf"],["class","text-muted d-block",4,"ngIf"],[1,"table-list-options"],["appListDropdown","",1,"dropdown"],["type","button","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-cog","bwi-lg"],[1,"dropdown-menu","dropdown-menu-right"],["class","dropdown-item","href","#","appStopClick","",3,"click",4,"ngIf"],["class","dropdown-item text-success","href","#","appStopClick","",3,"click",4,"ngIf"],["class","dropdown-item text-warning","href","#","appStopClick","",3,"click",4,"ngIf"],["href","#","appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-close"],[1,"badge","badge-secondary"],[1,"badge","badge-warning"],[1,"badge","badge-success"],[1,"badge","badge-primary"],[1,"text-muted","d-block"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-envelope"],["href","#","appStopClick","",1,"dropdown-item","text-success",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-check"],["href","#","appStopClick","",1,"dropdown-item","text-warning",3,"click"],["class","dropdown-item",3,"routerLink",4,"ngIf"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-key"],[1,"dropdown-item",3,"routerLink"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-eye"]],template:function(e,t){1&e&&(m.ɵɵelementStart(0,"div",0),m.ɵɵtext(1,"\n "),m.ɵɵelementStart(2,"h1"),m.ɵɵtext(3),m.ɵɵpipe(4,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(5,"\n"),m.ɵɵelementEnd(),m.ɵɵtext(6,"\n"),m.ɵɵelementStart(7,"p"),m.ɵɵtext(8),m.ɵɵpipe(9,"i18n"),m.ɵɵelementStart(10,"a",1),m.ɵɵtext(11),m.ɵɵpipe(12,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(13,"\n"),m.ɵɵelementEnd(),m.ɵɵtext(14,"\n\n"),m.ɵɵtemplate(15,F,7,6,"p",2),m.ɵɵtext(16,"\n\n"),m.ɵɵelementStart(17,"div",3),m.ɵɵtext(18,"\n "),m.ɵɵelementStart(19,"h2"),m.ɵɵtext(20),m.ɵɵpipe(21,"i18n"),m.ɵɵelement(22,"app-premium-badge"),m.ɵɵtext(23,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(24,"\n "),m.ɵɵelementStart(25,"div",4),m.ɵɵtext(26,"\n "),m.ɵɵelementStart(27,"button",5),m.ɵɵlistener("click",(function(){return t.invite()})),m.ɵɵtext(28,"\n "),m.ɵɵelement(29,"i",6),m.ɵɵtext(30),m.ɵɵpipe(31,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(32,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(33,"\n"),m.ɵɵelementEnd(),m.ɵɵtext(34,"\n\n"),m.ɵɵtemplate(35,$,7,1,"table",7),m.ɵɵtext(36,"\n\n"),m.ɵɵtemplate(37,Y,3,3,"p",2),m.ɵɵtext(38,"\n\n"),m.ɵɵelementStart(39,"div",8),m.ɵɵtext(40,"\n "),m.ɵɵelementStart(41,"h2"),m.ɵɵtext(42),m.ɵɵpipe(43,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(44,"\n"),m.ɵɵelementEnd(),m.ɵɵtext(45,"\n\n"),m.ɵɵtemplate(46,se,7,1,"table",7),m.ɵɵtext(47,"\n\n"),m.ɵɵtemplate(48,le,3,3,"p",2),m.ɵɵtext(49,"\n\n"),m.ɵɵtemplate(50,ce,0,0,"ng-template",null,9,m.ɵɵtemplateRefExtractor),m.ɵɵtext(52,"\n"),m.ɵɵtemplate(53,de,0,0,"ng-template",null,10,m.ɵɵtemplateRefExtractor),m.ɵɵtext(55,"\n"),m.ɵɵtemplate(56,pe,0,0,"ng-template",null,11,m.ɵɵtemplateRefExtractor),m.ɵɵtext(58,"\n")),2&e&&(m.ɵɵadvance(3),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(4,12,"emergencyAccess")),m.ɵɵadvance(5),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(9,14,"emergencyAccessDesc"),"\n "),m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(12,16,"learnMore"),".\n "),m.ɵɵadvance(4),m.ɵɵproperty("ngIf",t.isOrganizationOwner),m.ɵɵadvance(5),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(21,18,"trustedEmergencyContacts"),"\n "),m.ɵɵadvance(7),m.ɵɵproperty("disabled",!t.canAccessPremium),m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(31,20,"addEmergencyContact"),"\n "),m.ɵɵadvance(5),m.ɵɵproperty("ngIf",t.trustedContacts&&t.trustedContacts.length),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",!t.trustedContacts||!t.trustedContacts.length),m.ɵɵadvance(5),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(43,22,"designatedEmergencyContacts")),m.ɵɵadvance(4),m.ɵɵproperty("ngIf",t.grantedContacts&&t.grantedContacts.length),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",!t.grantedContacts||!t.grantedContacts.length))},directives:[I.NgIf,E.PremiumBadgeComponent,I.NgForOf,P.AvatarComponent,O.StopClickDirective,k.A11yTitleDirective,A.RouterLinkWithHref],pipes:[T.I18nPipe,M.UserNamePipe],encapsulation:2})},19733:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAddEditComponent=void 0;n(42982),n(45330),n(3174),n(32034),n(88308),n(51554),n(36631),n(45552),n(63513),n(84275),n(44809),n(73828),n(62166),n(73569),n(52344);const r=n(41141),o=n(32621),a=n(45330),s=n(88308),l=n(51554),c=n(73828),d=n(42982),p=n(73569),u=n(3174),m=n(52344),h=n(84275),v=n(45552),f=n(32034),g=n(62166),y=n(44809),x=n(63513),S=n(36631),b=n(96832),w=n(56820),C=n(8863),I=n(57490),E=n(95746),P=n(51626),O=n(45728),k=n(48198),A=n(1142),T=n(48403),M=n(99729);function B(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",26),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"personalOwnershipPolicyInEffect"),"\n "))}function D(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",30),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.value),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}function R(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",16),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",17),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"label",27),o.ɵɵtext(5),o.ɵɵpipe(6,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"select",28),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.type=t})),o.ɵɵtext(9,"\n "),o.ɵɵtemplate(10,D,2,2,"option",29),o.ɵɵtext(11,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(6,4,"whatTypeOfItem")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.type)("disabled",e.cipher.isDeleted),o.ɵɵadvance(2),o.ɵɵproperty("ngForOf",e.typeOptions)}}function F(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",30),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.id),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}function U(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",17),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"label",31),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"select",32),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.folderId=t})),o.ɵɵtext(7,"\n "),o.ɵɵtemplate(8,F,2,2,"option",29),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,4,"folder")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.folderId)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(2),o.ɵɵproperty("ngForOf",e.folders)}}function V(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",41),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"button",50),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext(3);return t.copy(t.cipher.login.username,"username","Username")})),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelement(5,"i",44),o.ɵɵtext(6,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd()}2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(3,1,"copyUsername")))}function N(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"a",57),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(4).generatePassword()})),o.ɵɵpipe(1,"i18n"),o.ɵɵtext(2,"\n "),o.ɵɵelement(3,"i",58),o.ɵɵtext(4,"\n "),o.ɵɵelementEnd()}2&e&&o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(1,1,"generatePassword"))}function _(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",51),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,N,5,3,"a",52),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"a",53,54),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(3).checkPassword()})),o.ɵɵpipe(6,"i18n"),o.ɵɵtext(7,"\n "),o.ɵɵelement(8,"i",55),o.ɵɵtext(9,"\n "),o.ɵɵelement(10,"i",56),o.ɵɵpipe(11,"i18n"),o.ɵɵtext(12,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵreference(5),t=o.ɵɵnextContext(3);o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.cipher.viewPassword),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(6,6,"checkPassword")),o.ɵɵproperty("appApiAction",t.checkPasswordPromise),o.ɵɵadvance(4),o.ɵɵproperty("hidden",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(11,8,"loading")),o.ɵɵproperty("hidden",!e.loading)}}function j(e,t){1&e&&o.ɵɵelement(0,"app-premium-badge",62)}function z(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"a",63),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(4).upgradeOrganization()})),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()}2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"upgrade"),"\n "))}function H(e,t){if(1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"img",59),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵtemplate(5,j,1,0,"app-premium-badge",60),o.ɵɵtext(6,"\n "),o.ɵɵtemplate(7,z,3,3,"a",61),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext(3);o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,3,"verificationCodeTotp")),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!e.organization&&!e.cipher.organizationId),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.organization&&!e.organization.useTotp||!e.organization&&!e.canAccessPremium&&e.cipher.organizationId&&!e.cipher.organizationUseTotp)}}const L=function(e){return{"stroke-dashoffset.px":e}};function K(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",64),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"span",65),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"span",66),o.ɵɵtext(5),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵnamespaceSVG(),o.ɵɵelementStart(7,"svg"),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"g"),o.ɵɵtext(10,"\n "),o.ɵɵelement(11,"circle",67),o.ɵɵtext(12,"\n "),o.ɵɵelement(13,"circle",68),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵnamespaceHTML(),o.ɵɵelementStart(18,"span",69),o.ɵɵpipe(19,"i18n"),o.ɵɵtext(20),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"button",70),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext(3);return t.copy(t.totpCode,"verificationCodeTotp","TOTP")})),o.ɵɵpipe(23,"i18n"),o.ɵɵtext(24,"\n "),o.ɵɵelement(25,"i",71),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext(3);o.ɵɵadvance(5),o.ɵɵtextInterpolate(e.totpSec),o.ɵɵadvance(6),o.ɵɵproperty("ngStyle",o.ɵɵpureFunction1(9,L,e.totpDash)),o.ɵɵadvance(7),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(19,5,"verificationCodeTotp")),o.ɵɵadvance(2),o.ɵɵtextInterpolate(e.totpCodeFormatted),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(23,7,"copyVerificationCode"))}}function q(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",30),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.value),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function G(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"button",82),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext().$implicit;return o.ɵɵnextContext(4).removeUri(t)})),o.ɵɵpipe(1,"i18n"),o.ɵɵtext(2,"\n "),o.ɵɵelement(3,"i",83),o.ɵɵtext(4,"\n "),o.ɵɵelementEnd()}2&e&&o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(1,1,"remove"))}function W(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",16),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",73),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"label",74),o.ɵɵtext(5),o.ɵɵpipe(6,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"div",34),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"input",75),o.ɵɵlistener("ngModelChange",(function(t){return o.ɵɵrestoreView(e).$implicit.uri=t})),o.ɵɵpipe(11,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementStart(13,"div",41),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"button",42),o.ɵɵlistener("click",(function(){const t=o.ɵɵrestoreView(e).$implicit;return o.ɵɵnextContext(4).launch(t)})),o.ɵɵpipe(16,"i18n"),o.ɵɵtext(17,"\n "),o.ɵɵelement(18,"i",76),o.ɵɵtext(19,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"button",50),o.ɵɵlistener("click",(function(){const t=o.ɵɵrestoreView(e).$implicit;return o.ɵɵnextContext(4).copy(t.uri,"uri","URI")})),o.ɵɵpipe(22,"i18n"),o.ɵɵtext(23,"\n "),o.ɵɵelement(24,"i",44),o.ɵɵtext(25,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(28,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n "),o.ɵɵelementStart(30,"div",77),o.ɵɵtext(31,"\n "),o.ɵɵelementStart(32,"div",37),o.ɵɵtext(33,"\n "),o.ɵɵelementStart(34,"label",74),o.ɵɵtext(35),o.ɵɵpipe(36,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(37,"\n "),o.ɵɵelementStart(38,"a",78),o.ɵɵpipe(39,"i18n"),o.ɵɵtext(40,"\n "),o.ɵɵelement(41,"i",79),o.ɵɵtext(42,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(43,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(44,"\n "),o.ɵɵelementStart(45,"div",37),o.ɵɵtext(46,"\n "),o.ɵɵelementStart(47,"select",80),o.ɵɵlistener("ngModelChange",(function(t){return o.ɵɵrestoreView(e).$implicit.match=t}))("change",(function(){const t=o.ɵɵrestoreView(e).$implicit;return o.ɵɵnextContext(4).loginUriMatchChanged(t)})),o.ɵɵtext(48,"\n "),o.ɵɵtemplate(49,q,2,2,"option",29),o.ɵɵtext(50,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(51,"\n "),o.ɵɵtemplate(52,G,5,3,"button",81),o.ɵɵtext(53,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(54,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(55,"\n "),o.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=t.index,i=o.ɵɵnextContext(4);o.ɵɵadvance(4),o.ɵɵpropertyInterpolate1("for","loginUri",n,""),o.ɵɵadvance(1),o.ɵɵtextInterpolate(o.ɵɵpipeBind2(6,19,"uriPosition",n+1)),o.ɵɵadvance(5),o.ɵɵpropertyInterpolate1("id","loginUri",n,""),o.ɵɵpropertyInterpolate1("name","Login.Uris[",n,"].Uri"),o.ɵɵpropertyInterpolate1("placeholder","",o.ɵɵpipeBind1(11,22,"ex")," https://google.com"),o.ɵɵproperty("ngModel",e.uri)("disabled",i.cipher.isDeleted||i.viewOnly),o.ɵɵadvance(5),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(16,24,"launch")),o.ɵɵproperty("disabled",!e.canLaunch),o.ɵɵadvance(6),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(22,26,"copyUri")),o.ɵɵadvance(13),o.ɵɵpropertyInterpolate1("for","loginUriMatch",n,""),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(36,28,"matchDetection"),"\n "),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(39,30,"learnMore")),o.ɵɵadvance(9),o.ɵɵpropertyInterpolate1("id","loginUriMatch",n,""),o.ɵɵpropertyInterpolate1("name","Login.Uris[",n,"].Match"),o.ɵɵproperty("ngModel",e.match)("disabled",i.cipher.isDeleted||i.viewOnly),o.ɵɵadvance(2),o.ɵɵproperty("ngForOf",i.uriMatchOptions),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!i.cipher.isDeleted&&!i.viewOnly)}}function $(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,W,56,32,"div",72),o.ɵɵtext(3,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(3);o.ɵɵadvance(2),o.ɵɵproperty("ngForOf",e.cipher.login.uris)("ngForTrackBy",e.trackByFunction)}}function Y(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"a",84),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(3).addUri()})),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",85),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd()}2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate1(" ",o.ɵɵpipeBind1(4,1,"newUri"),"\n "))}const Q=function(e,t){return{"bwi-eye":e,"bwi-eye-slash":t}},J=function(e){return{low:e}};function Z(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",16),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"div",17),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"label",33),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"div",34),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"input",35),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.login.username=t})),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵtemplate(14,V,8,3,"div",36),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"div",17),o.ɵɵtext(19,"\n "),o.ɵɵelementStart(20,"div",37),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"label",38),o.ɵɵtext(23),o.ɵɵpipe(24,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵtemplate(26,_,14,10,"div",39),o.ɵɵtext(27,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(28,"\n "),o.ɵɵelementStart(29,"div",34),o.ɵɵtext(30,"\n "),o.ɵɵelementStart(31,"input",40),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.login.password=t})),o.ɵɵelementEnd(),o.ɵɵtext(32,"\n "),o.ɵɵelementStart(33,"div",41),o.ɵɵtext(34,"\n "),o.ɵɵelementStart(35,"button",42),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).togglePassword()})),o.ɵɵpipe(36,"i18n"),o.ɵɵtext(37,"\n "),o.ɵɵelement(38,"i",43),o.ɵɵtext(39,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(40,"\n "),o.ɵɵelementStart(41,"button",42),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext(2);return t.copy(t.cipher.login.password,"password","Password")})),o.ɵɵpipe(42,"i18n"),o.ɵɵtext(43,"\n "),o.ɵɵelement(44,"i",44),o.ɵɵtext(45,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(46,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(47,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(48,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(49,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(50,"\n "),o.ɵɵelementStart(51,"div",16),o.ɵɵtext(52,"\n "),o.ɵɵelementStart(53,"div",17),o.ɵɵtext(54,"\n "),o.ɵɵelementStart(55,"label",45),o.ɵɵtext(56),o.ɵɵpipe(57,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(58,"\n "),o.ɵɵelementStart(59,"input",46),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.login.totp=t})),o.ɵɵelementEnd(),o.ɵɵtext(60,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(61,"\n "),o.ɵɵelementStart(62,"div",47),o.ɵɵtext(63,"\n "),o.ɵɵtemplate(64,H,9,5,"div",21),o.ɵɵtext(65,"\n "),o.ɵɵtemplate(66,K,28,11,"div",48),o.ɵɵtext(67,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(68,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(69,"\n "),o.ɵɵtemplate(70,$,4,2,"ng-container",21),o.ɵɵtext(71,"\n "),o.ɵɵtemplate(72,Y,5,3,"a",49),o.ɵɵtext(73,"\n "),o.ɵɵelementContainerEnd()}if(2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,23,"username")),o.ɵɵadvance(5),o.ɵɵproperty("ngModel",e.cipher.login.username)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.cipher.isDeleted),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(24,25,"password")),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!e.cipher.isDeleted&&!e.viewOnly),o.ɵɵadvance(5),o.ɵɵpropertyInterpolate("type",e.showPassword?"text":"password"),o.ɵɵproperty("ngModel",e.cipher.login.password)("disabled",e.cipher.isDeleted||!e.cipher.viewPassword||e.viewOnly),o.ɵɵadvance(4),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(36,27,"toggleVisibility")),o.ɵɵproperty("disabled",!e.cipher.viewPassword),o.ɵɵadvance(3),o.ɵɵproperty("ngClass",o.ɵɵpureFunction2(33,Q,!e.showPassword,e.showPassword)),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(42,29,"copyPassword")),o.ɵɵproperty("disabled",!e.cipher.viewPassword),o.ɵɵadvance(15),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(57,31,"authenticatorKeyTotp")),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("type",e.cipher.viewPassword?"text":"password"),o.ɵɵproperty("ngModel",e.cipher.login.totp)("disabled",e.cipher.isDeleted||!e.cipher.viewPassword||e.viewOnly),o.ɵɵadvance(3),o.ɵɵproperty("ngClass",o.ɵɵpureFunction1(36,J,e.totpLow)),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.cipher.login.totp||!e.totpCode),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.cipher.login.totp&&e.totpCode),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",e.cipher.login.hasUris),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.cipher.isDeleted&&!e.viewOnly)}}function X(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",30),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.value),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}function ee(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",30),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.value),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function te(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",16),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"div",17),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"label",86),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"input",87),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.card.cardholderName=t})),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementStart(13,"div",17),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"label",88),o.ɵɵtext(16),o.ɵɵpipe(17,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementStart(19,"select",89),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.card.brand=t})),o.ɵɵtext(20,"\n "),o.ɵɵtemplate(21,X,2,2,"option",29),o.ɵɵtext(22,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(23,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵelementStart(26,"div",16),o.ɵɵtext(27,"\n "),o.ɵɵelementStart(28,"div",17),o.ɵɵtext(29,"\n "),o.ɵɵelementStart(30,"label",90),o.ɵɵtext(31),o.ɵɵpipe(32,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(33,"\n "),o.ɵɵelementStart(34,"div",34),o.ɵɵtext(35,"\n "),o.ɵɵelementStart(36,"input",91),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.card.number=t})),o.ɵɵelementEnd(),o.ɵɵtext(37,"\n "),o.ɵɵelementStart(38,"div",41),o.ɵɵtext(39,"\n "),o.ɵɵelementStart(40,"button",50),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).toggleCardNumber()})),o.ɵɵpipe(41,"i18n"),o.ɵɵtext(42,"\n "),o.ɵɵelement(43,"i",43),o.ɵɵtext(44,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(45,"\n "),o.ɵɵelementStart(46,"button",50),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext(2);return t.copy(t.cipher.card.number,"number","Number")})),o.ɵɵpipe(47,"i18n"),o.ɵɵtext(48,"\n "),o.ɵɵelement(49,"i",44),o.ɵɵtext(50,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(51,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(52,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(53,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(54,"\n "),o.ɵɵelementStart(55,"div",92),o.ɵɵtext(56,"\n "),o.ɵɵelementStart(57,"label",93),o.ɵɵtext(58),o.ɵɵpipe(59,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(60,"\n "),o.ɵɵelementStart(61,"select",94),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.card.expMonth=t})),o.ɵɵtext(62,"\n "),o.ɵɵtemplate(63,ee,2,2,"option",29),o.ɵɵtext(64,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(65,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(66,"\n "),o.ɵɵelementStart(67,"div",92),o.ɵɵtext(68,"\n "),o.ɵɵelementStart(69,"label",95),o.ɵɵtext(70),o.ɵɵpipe(71,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(72,"\n "),o.ɵɵelementStart(73,"input",96),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.card.expYear=t})),o.ɵɵpipe(74,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(75,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(76,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(77,"\n "),o.ɵɵelementStart(78,"div",16),o.ɵɵtext(79,"\n "),o.ɵɵelementStart(80,"div",17),o.ɵɵtext(81,"\n "),o.ɵɵelementStart(82,"label",97),o.ɵɵtext(83),o.ɵɵpipe(84,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(85,"\n "),o.ɵɵelementStart(86,"div",34),o.ɵɵtext(87,"\n "),o.ɵɵelementStart(88,"input",98),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.card.code=t})),o.ɵɵelementEnd(),o.ɵɵtext(89,"\n "),o.ɵɵelementStart(90,"div",41),o.ɵɵtext(91,"\n "),o.ɵɵelementStart(92,"button",50),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).toggleCardCode()})),o.ɵɵpipe(93,"i18n"),o.ɵɵtext(94,"\n "),o.ɵɵelement(95,"i",43),o.ɵɵtext(96,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(97,"\n "),o.ɵɵelementStart(98,"button",50),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext(2);return t.copy(t.cipher.card.code,"securityCode","Security Code")})),o.ɵɵpipe(99,"i18n"),o.ɵɵtext(100,"\n "),o.ɵɵelement(101,"i",44),o.ɵɵtext(102,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(103,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(104,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(105,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(106,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(107,"\n "),o.ɵɵelementContainerEnd()}if(2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,29,"cardholderName")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.card.cardholderName)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(17,31,"brand")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.card.brand)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(2),o.ɵɵproperty("ngForOf",e.cardBrandOptions),o.ɵɵadvance(10),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(32,33,"number")),o.ɵɵadvance(5),o.ɵɵpropertyInterpolate("type",e.showCardNumber?"text":"password"),o.ɵɵproperty("ngModel",e.cipher.card.number)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(4),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(41,35,"toggleVisibility")),o.ɵɵadvance(3),o.ɵɵproperty("ngClass",o.ɵɵpureFunction2(51,Q,!e.showCardNumber,e.showCardNumber)),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(47,37,"copyNumber")),o.ɵɵadvance(12),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(59,39,"expirationMonth")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.card.expMonth)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(2),o.ɵɵproperty("ngForOf",e.cardExpMonthOptions),o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(71,41,"expirationYear")),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate1("placeholder","",o.ɵɵpipeBind1(74,43,"ex")," 2019"),o.ɵɵproperty("ngModel",e.cipher.card.expYear)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(10),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(84,45,"securityCode")),o.ɵɵadvance(5),o.ɵɵpropertyInterpolate("type",e.showCardCode?"text":"password"),o.ɵɵproperty("ngModel",e.cipher.card.code)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(4),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(93,47,"toggleVisibility")),o.ɵɵadvance(3),o.ɵɵproperty("ngClass",o.ɵɵpureFunction2(54,Q,!e.showCardCode,e.showCardCode)),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(99,49,"securityCode"))}}function ne(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",30),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.value),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function ie(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",16),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"div",99),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"label",100),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"select",101),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.title=t})),o.ɵɵtext(11,"\n "),o.ɵɵtemplate(12,ne,2,2,"option",29),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵelementStart(17,"div",16),o.ɵɵtext(18,"\n "),o.ɵɵelementStart(19,"div",99),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"label",102),o.ɵɵtext(22),o.ɵɵpipe(23,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵelementStart(25,"input",103),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.firstName=t})),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelementStart(28,"div",99),o.ɵɵtext(29,"\n "),o.ɵɵelementStart(30,"label",104),o.ɵɵtext(31),o.ɵɵpipe(32,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(33,"\n "),o.ɵɵelementStart(34,"input",105),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.middleName=t})),o.ɵɵelementEnd(),o.ɵɵtext(35,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(36,"\n "),o.ɵɵelementStart(37,"div",99),o.ɵɵtext(38,"\n "),o.ɵɵelementStart(39,"label",106),o.ɵɵtext(40),o.ɵɵpipe(41,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(42,"\n "),o.ɵɵelementStart(43,"input",107),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.lastName=t})),o.ɵɵelementEnd(),o.ɵɵtext(44,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(45,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(46,"\n "),o.ɵɵelementStart(47,"div",16),o.ɵɵtext(48,"\n "),o.ɵɵelementStart(49,"div",99),o.ɵɵtext(50,"\n "),o.ɵɵelementStart(51,"label",108),o.ɵɵtext(52),o.ɵɵpipe(53,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(54,"\n "),o.ɵɵelementStart(55,"input",109),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.username=t})),o.ɵɵelementEnd(),o.ɵɵtext(56,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(57,"\n "),o.ɵɵelementStart(58,"div",99),o.ɵɵtext(59,"\n "),o.ɵɵelementStart(60,"label",110),o.ɵɵtext(61),o.ɵɵpipe(62,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(63,"\n "),o.ɵɵelementStart(64,"input",111),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.company=t})),o.ɵɵelementEnd(),o.ɵɵtext(65,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(66,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(67,"\n "),o.ɵɵelementStart(68,"div",16),o.ɵɵtext(69,"\n "),o.ɵɵelementStart(70,"div",99),o.ɵɵtext(71,"\n "),o.ɵɵelementStart(72,"label",112),o.ɵɵtext(73),o.ɵɵpipe(74,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(75,"\n "),o.ɵɵelementStart(76,"input",113),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.ssn=t})),o.ɵɵelementEnd(),o.ɵɵtext(77,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(78,"\n "),o.ɵɵelementStart(79,"div",99),o.ɵɵtext(80,"\n "),o.ɵɵelementStart(81,"label",114),o.ɵɵtext(82),o.ɵɵpipe(83,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(84,"\n "),o.ɵɵelementStart(85,"input",115),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.passportNumber=t})),o.ɵɵelementEnd(),o.ɵɵtext(86,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(87,"\n "),o.ɵɵelementStart(88,"div",99),o.ɵɵtext(89,"\n "),o.ɵɵelementStart(90,"label",116),o.ɵɵtext(91),o.ɵɵpipe(92,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(93,"\n "),o.ɵɵelementStart(94,"input",117),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.licenseNumber=t})),o.ɵɵelementEnd(),o.ɵɵtext(95,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(96,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(97,"\n "),o.ɵɵelementStart(98,"div",16),o.ɵɵtext(99,"\n "),o.ɵɵelementStart(100,"div",17),o.ɵɵtext(101,"\n "),o.ɵɵelementStart(102,"label",118),o.ɵɵtext(103),o.ɵɵpipe(104,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(105,"\n "),o.ɵɵelementStart(106,"input",119),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.email=t})),o.ɵɵelementEnd(),o.ɵɵtext(107,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(108,"\n "),o.ɵɵelementStart(109,"div",17),o.ɵɵtext(110,"\n "),o.ɵɵelementStart(111,"label",120),o.ɵɵtext(112),o.ɵɵpipe(113,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(114,"\n "),o.ɵɵelementStart(115,"input",121),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.phone=t})),o.ɵɵelementEnd(),o.ɵɵtext(116,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(117,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(118,"\n "),o.ɵɵelementStart(119,"div",16),o.ɵɵtext(120,"\n "),o.ɵɵelementStart(121,"div",17),o.ɵɵtext(122,"\n "),o.ɵɵelementStart(123,"label",122),o.ɵɵtext(124),o.ɵɵpipe(125,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(126,"\n "),o.ɵɵelementStart(127,"input",123),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.address1=t})),o.ɵɵelementEnd(),o.ɵɵtext(128,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(129,"\n "),o.ɵɵelementStart(130,"div",17),o.ɵɵtext(131,"\n "),o.ɵɵelementStart(132,"label",124),o.ɵɵtext(133),o.ɵɵpipe(134,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(135,"\n "),o.ɵɵelementStart(136,"input",125),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.address2=t})),o.ɵɵelementEnd(),o.ɵɵtext(137,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(138,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(139,"\n "),o.ɵɵelementStart(140,"div",16),o.ɵɵtext(141,"\n "),o.ɵɵelementStart(142,"div",17),o.ɵɵtext(143,"\n "),o.ɵɵelementStart(144,"label",126),o.ɵɵtext(145),o.ɵɵpipe(146,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(147,"\n "),o.ɵɵelementStart(148,"input",127),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.address3=t})),o.ɵɵelementEnd(),o.ɵɵtext(149,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(150,"\n "),o.ɵɵelementStart(151,"div",17),o.ɵɵtext(152,"\n "),o.ɵɵelementStart(153,"label",128),o.ɵɵtext(154),o.ɵɵpipe(155,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(156,"\n "),o.ɵɵelementStart(157,"input",129),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.city=t})),o.ɵɵelementEnd(),o.ɵɵtext(158,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(159,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(160,"\n "),o.ɵɵelementStart(161,"div",16),o.ɵɵtext(162,"\n "),o.ɵɵelementStart(163,"div",17),o.ɵɵtext(164,"\n "),o.ɵɵelementStart(165,"label",130),o.ɵɵtext(166),o.ɵɵpipe(167,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(168,"\n "),o.ɵɵelementStart(169,"input",131),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.state=t})),o.ɵɵelementEnd(),o.ɵɵtext(170,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(171,"\n "),o.ɵɵelementStart(172,"div",17),o.ɵɵtext(173,"\n "),o.ɵɵelementStart(174,"label",132),o.ɵɵtext(175),o.ɵɵpipe(176,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(177,"\n "),o.ɵɵelementStart(178,"input",133),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.postalCode=t})),o.ɵɵelementEnd(),o.ɵɵtext(179,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(180,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(181,"\n "),o.ɵɵelementStart(182,"div",16),o.ɵɵtext(183,"\n "),o.ɵɵelementStart(184,"div",17),o.ɵɵtext(185,"\n "),o.ɵɵelementStart(186,"label",134),o.ɵɵtext(187),o.ɵɵpipe(188,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(189,"\n "),o.ɵɵelementStart(190,"input",135),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.country=t})),o.ɵɵelementEnd(),o.ɵɵtext(191,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(192,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(193,"\n "),o.ɵɵelementContainerEnd()}if(2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,55,"title")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.title)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(2),o.ɵɵproperty("ngForOf",e.identityTitleOptions),o.ɵɵadvance(10),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(23,57,"firstName")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.firstName)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(32,59,"middleName")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.middleName)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(41,61,"lastName")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.lastName)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(53,63,"username")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.username)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(62,65,"company")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.company)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(74,67,"ssn")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.ssn)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(83,69,"passportNumber")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.passportNumber)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(92,71,"licenseNumber")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.licenseNumber)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(104,73,"email")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.email)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(113,75,"phone")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.phone)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(125,77,"address1")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.address1)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(134,79,"address2")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.address2)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(146,81,"address3")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.address3)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(155,83,"cityTown")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.city)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(167,85,"stateProvince")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.state)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(176,87,"zipPostalCode")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.postalCode)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(188,89,"country")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.country)("disabled",e.cipher.isDeleted||e.viewOnly)}}function re(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",30),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.value),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}function oe(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h3",136),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",16),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"div",137),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"label",138),o.ɵɵtext(11),o.ɵɵpipe(12,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"select",139),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.organizationId=t}))("change",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).organizationChanged()})),o.ɵɵtext(15,"\n "),o.ɵɵtemplate(16,re,2,2,"option",29),o.ɵɵtext(17,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵelementContainerEnd()}if(2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,5,"ownership")),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(12,7,"whoOwnsThisItem")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.organizationId)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(2),o.ɵɵproperty("ngForOf",e.ownershipOptions)}}function ae(e,t){1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"noCollectionsInList"),"\n "))}function se(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",141),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"input",142),o.ɵɵlistener("ngModelChange",(function(t){return o.ɵɵrestoreView(e).$implicit.checked=t})),o.ɵɵelementEnd(),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"label",143),o.ɵɵtext(5),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=t.index,i=o.ɵɵnextContext(4);o.ɵɵadvance(2),o.ɵɵpropertyInterpolate1("id","collection-",n,""),o.ɵɵpropertyInterpolate1("name","Collection[",n,"].Checked"),o.ɵɵproperty("ngModel",e.checked)("disabled",i.cipher.isDeleted||i.viewOnly),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate1("for","collection-",n,""),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}function le(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,se,7,6,"div",140),o.ɵɵtext(3,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(3);o.ɵɵadvance(2),o.ɵɵproperty("ngForOf",e.collections)}}function ce(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h3",136),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵtemplate(6,ae,3,3,"div",21),o.ɵɵtext(7,"\n "),o.ɵɵtemplate(8,le,4,1,"ng-container",21),o.ɵɵtext(9,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,3,"collections")),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!e.collections||!e.collections.length),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.collections&&e.collections.length)}}function de(e,t){if(1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"b",145),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5),o.ɵɵpipe(6,"date"),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext(3);o.ɵɵadvance(3),o.ɵɵtextInterpolate1("",o.ɵɵpipeBind1(4,2,"datePasswordUpdated"),":"),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind2(6,4,e.cipher.passwordRevisionDisplayDate,"medium"),"\n ")}}function pe(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"b",145),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"a",146),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(3).viewHistory()})),o.ɵɵpipe(7,"i18n"),o.ɵɵtext(8),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext(3);o.ɵɵadvance(3),o.ɵɵtextInterpolate1("",o.ɵɵpipeBind1(4,3,"passwordHistory"),":"),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(7,5,"view")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",e.cipher.passwordHistory.length,"\n ")}}function ue(e,t){if(1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1),o.ɵɵpipe(2,"date"),o.ɵɵelementStart(3,"span",148),o.ɵɵtext(4),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind2(2,2,e.lastUsedDate,"short")," -\n "),o.ɵɵadvance(3),o.ɵɵtextInterpolate(e.password)}}function me(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",62),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,ue,6,5,"div",147),o.ɵɵtext(3,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext(3);o.ɵɵadvance(2),o.ɵɵproperty("ngForOf",e.cipher.passwordHistory)}}function he(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",144),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"div"),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"b",145),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9),o.ɵɵpipe(10,"date"),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵtemplate(12,de,7,7,"div",21),o.ɵɵtext(13,"\n "),o.ɵɵtemplate(14,pe,10,7,"div",21),o.ɵɵtext(15,"\n "),o.ɵɵtemplate(16,me,4,1,"div",60),o.ɵɵtext(17,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(7),o.ɵɵtextInterpolate1("",o.ɵɵpipeBind1(8,5,"dateUpdated"),":"),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind2(10,7,e.cipher.revisionDate,"medium"),"\n "),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",e.showRevisionDate),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.hasPasswordHistory),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.viewingPasswordHistory)}}function ve(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h3",136),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",141),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"input",149),o.ɵɵlistener("change",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).repromptChanged()})),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"label",150),o.ɵɵtext(11),o.ɵɵpipe(12,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"a",151),o.ɵɵpipe(15,"i18n"),o.ɵɵtext(16,"\n "),o.ɵɵelement(17,"i",79),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵelementContainerEnd()}if(2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,5,"options")),o.ɵɵadvance(5),o.ɵɵproperty("ngModel",e.reprompt)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(12,7,"passwordPrompt")),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(15,9,"learnMore"))}}function fe(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",13),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,B,3,3,"app-callout",14),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,R,14,6,"div",15),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",16),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"div",17),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"label",18),o.ɵɵtext(11),o.ɵɵpipe(12,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"input",19),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().cipher.name=t})),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵtemplate(17,U,11,6,"div",20),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵtext(20,"\n "),o.ɵɵtemplate(21,Z,74,38,"ng-container",21),o.ɵɵtext(22,"\n "),o.ɵɵtext(23,"\n "),o.ɵɵtemplate(24,te,108,57,"ng-container",21),o.ɵɵtext(25,"\n "),o.ɵɵtext(26,"\n "),o.ɵɵtemplate(27,ie,194,91,"ng-container",21),o.ɵɵtext(28,"\n "),o.ɵɵelementStart(29,"div",22),o.ɵɵtext(30,"\n "),o.ɵɵelementStart(31,"label",23),o.ɵɵtext(32),o.ɵɵpipe(33,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(34,"\n "),o.ɵɵelementStart(35,"textarea",24),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().cipher.notes=t})),o.ɵɵelementEnd(),o.ɵɵtext(36,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(37,"\n "),o.ɵɵelement(38,"app-vault-add-edit-custom-fields",25),o.ɵɵtext(39,"\n "),o.ɵɵtemplate(40,oe,21,9,"ng-container",21),o.ɵɵtext(41,"\n "),o.ɵɵtemplate(42,ce,10,5,"ng-container",21),o.ɵɵtext(43,"\n "),o.ɵɵtemplate(44,he,19,10,"ng-container",21),o.ɵɵtext(45,"\n "),o.ɵɵtemplate(46,ve,21,11,"ng-container",21),o.ɵɵtext(47,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.allowOwnershipAssignment()&&!e.allowPersonal),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.editMode&&!e.viewOnly),o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(12,20,"name")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.name)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!e.organization),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",e.cipher.type===e.cipherType.Login),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",e.cipher.type===e.cipherType.Card),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",e.cipher.type===e.cipherType.Identity),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(33,22,"notes")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.notes)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(3),o.ɵɵproperty("cipher",e.cipher)("thisCipherType",e.cipher.type)("viewOnly",e.viewOnly)("copy",e.copy.bind(e)),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.allowOwnershipAssignment()),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",(!e.editMode||e.cloneMode)&&e.cipher.organizationId),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.editMode),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.canUseReprompt)}}function ge(e,t){if(1&e&&(o.ɵɵelementStart(0,"button",152),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",153),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span"),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext(),t=o.ɵɵreference(5);o.ɵɵproperty("disabled",t.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,3,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,5,null!=e.cipher&&e.cipher.isDeleted?"restore":"save"))}}const ye=function(e,t){return{"bwi-star-f":e,"bwi-star":t}};function xe(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"button",70),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).toggleFavorite()})),o.ɵɵpipe(1,"i18n"),o.ɵɵtext(2,"\n "),o.ɵɵelement(3,"i",43),o.ɵɵtext(4,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext(2);o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(1,2,e.cipher.favorite?"unfavorite":"favorite")),o.ɵɵadvance(3),o.ɵɵproperty("ngClass",o.ɵɵpureFunction2(4,ye,e.cipher.favorite,!e.cipher.favorite))}}function Se(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"button",157,158),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).delete()})),o.ɵɵpipe(2,"i18n"),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"i",159),o.ɵɵtext(5,"\n "),o.ɵɵelement(6,"i",160),o.ɵɵpipe(7,"i18n"),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵreference(1),t=o.ɵɵnextContext(2);o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(2,6,t.cipher.isDeleted?"permanentlyDelete":"delete")),o.ɵɵproperty("disabled",e.loading)("appApiAction",t.deletePromise),o.ɵɵadvance(4),o.ɵɵproperty("hidden",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(7,8,"loading")),o.ɵɵproperty("hidden",!e.loading)}}function be(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",154),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,xe,5,7,"button",155),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,Se,9,10,"button",156),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.organization&&!e.cipher.isDeleted),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.editMode&&!e.cloneMode)}}class we extends r.AddEditComponent{constructor(e,t,n,i,r,o,a,s,l,c,d,p,u,m,h){super(e,t,n,i,r,o,a,s,l,c,d,p,m,h,u),this.originalCipher=null,this.viewOnly=!0}load(){return i(this,void 0,void 0,(function*(){this.title=this.i18nService.t("viewItem")}))}loadCipher(){return i(this,void 0,void 0,(function*(){return Promise.resolve(this.originalCipher)}))}}t.EmergencyAddEditComponent=we,we.ɵfac=function(e){return new(e||we)(o.ɵɵdirectiveInject(a.CipherService),o.ɵɵdirectiveInject(s.FolderService),o.ɵɵdirectiveInject(l.I18nService),o.ɵɵdirectiveInject(c.PlatformUtilsService),o.ɵɵdirectiveInject(d.AuditService),o.ɵɵdirectiveInject(p.StateService),o.ɵɵdirectiveInject(u.CollectionService),o.ɵɵdirectiveInject(m.TotpService),o.ɵɵdirectiveInject(h.PasswordGenerationService),o.ɵɵdirectiveInject(v.MessagingService),o.ɵɵdirectiveInject(f.EventService),o.ɵɵdirectiveInject(g.PolicyService),o.ɵɵdirectiveInject(y.PasswordRepromptService),o.ɵɵdirectiveInject(x.OrganizationService),o.ɵɵdirectiveInject(S.LogService))},we.ɵcmp=o.ɵɵdefineComponent({type:we,selectors:[["app-org-vault-add-edit"]],features:[o.ɵɵInheritDefinitionFeature],decls:36,vars:11,consts:[["role","dialog","aria-modal","true","aria-labelledby","cipherAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],["ngNativeValidate","","autocomplete","off",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","cipherAddEditTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["class","ml-auto",4,"ngIf"],[1,"modal-body"],["type","info",4,"ngIf"],["class","row",4,"ngIf"],[1,"row"],[1,"col-6","form-group"],["for","name"],["id","name","type","text","name","Name","required","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["class","col-6 form-group",4,"ngIf"],[4,"ngIf"],[1,"form-group"],["for","notes"],["id","notes","name","Notes","rows","6",1,"form-control",3,"ngModel","disabled","ngModelChange"],[3,"cipher","thisCipherType","viewOnly","copy"],["type","info"],["for","type"],["id","type","name","Type","appAutofocus","",1,"form-control",3,"ngModel","disabled","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[3,"ngValue"],["for","folder"],["id","folder","name","FolderId",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","loginUsername"],[1,"input-group"],["id","loginUsername","type","text","name","Login.Username","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["class","input-group-append",4,"ngIf"],[1,"d-flex"],["for","loginPassword"],["class","ml-auto d-flex",4,"ngIf"],["id","loginPassword","name","Login.Password","appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"input-group-append"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","disabled","click"],["aria-hidden","true",1,"bwi","bwi-lg",3,"ngClass"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-clone"],["for","loginTotp"],["id","loginTotp","name","Login.Totp","appInputVerbatim","",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"col-6","form-group","totp","d-flex","align-items-end",3,"ngClass"],["class","d-flex align-items-center",4,"ngIf"],["href","#","appStopClick","","class","d-inline-block mb-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","click"],[1,"ml-auto","d-flex"],["href","#","class","d-block mr-2 bwi-icon-above-input","appStopClick","",3,"appA11yTitle","click",4,"ngIf"],["href","#","appStopClick","",1,"d-block","bwi-icon-above-input",3,"appA11yTitle","appApiAction","click"],["checkPasswordBtn",""],["aria-hidden","true",1,"bwi","bwi-lg","bwi-fw","bwi-check-circle",3,"hidden"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-fw","bwi-spinner","bwi-spin",3,"hidden","title"],["href","#","appStopClick","",1,"d-block","mr-2","bwi-icon-above-input",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-fw","bwi-generate"],["src","../../images/totp-countdown.png","id","totpImage",1,"ml-2",3,"title"],["class","ml-3",4,"ngIf"],["href","#","appStopClick","","class","badge badge-primary ml-3",3,"click",4,"ngIf"],[1,"ml-3"],["href","#","appStopClick","",1,"badge","badge-primary","ml-3",3,"click"],[1,"d-flex","align-items-center"],[1,"totp-countdown","mr-3","ml-2"],[1,"totp-sec"],["r","12.6","cy","16","cx","16",1,"totp-circle","inner",3,"ngStyle"],["r","14","cy","16","cx","16",1,"totp-circle","outer"],[1,"totp-code","mr-2",3,"title"],["type","button",1,"btn","btn-link",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-clone"],["class","row",4,"ngFor","ngForOf","ngForTrackBy"],[1,"col-7","form-group"],[3,"for"],["type","text","appInputVerbatim","",1,"form-control",3,"id","name","ngModel","disabled","placeholder","ngModelChange"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-share-square"],[1,"col-5","form-group"],["href","https://bitwarden.com/help/uri-match-detection/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],[1,"form-control","overflow-hidden",3,"id","name","ngModel","disabled","ngModelChange","change"],["type","button","class","btn btn-link text-danger ml-2",3,"appA11yTitle","click",4,"ngIf"],["type","button",1,"btn","btn-link","text-danger","ml-2",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-minus-circle","bwi-lg"],["href","#","appStopClick","",1,"d-inline-block","mb-3",3,"click"],["aria-hidden","true",1,"bwi","bwi-plus-circle","bwi-fw"],["for","cardCardholderName"],["id","cardCardholderName","type","text","name","Card.CardCardholderName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","cardBrand"],["id","cardBrand","name","Card.Brand",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","cardNumber"],["id","cardNumber","name","Card.Number","appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"col","form-group"],["for","cardExpMonth"],["id","cardExpMonth","name","Card.ExpMonth",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","cardExpYear"],["id","cardExpYear","type","text","name","Card.ExpYear",1,"form-control",3,"ngModel","placeholder","disabled","ngModelChange"],["for","cardCode"],["id","cardCode","name","Card.Code","appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"col-4","form-group"],["for","idTitle"],["id","idTitle","name","Identity.Title",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idFirstName"],["id","idFirstName","type","text","name","Identity.FirstName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idMiddleName"],["id","idMiddleName","type","text","name","Identity.MiddleName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idLastName"],["id","idLastName","type","text","name","Identity.LastName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idUsername"],["id","idUsername","type","text","name","Identity.Username","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idCompany"],["id","idCompany","type","text","name","Identity.Company",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idSsn"],["id","idSsn","type","text","name","Identity.SSN","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPassportNumber"],["id","idPassportNumber","type","text","name","Identity.PassportNumber","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idLicenseNumber"],["id","idLicenseNumber","type","text","name","Identity.LicenseNumber","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idEmail"],["id","idEmail","type","text","inputmode","email","name","Identity.Email","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPhone"],["id","idPhone","type","text","inputmode","tel","name","Identity.Phone",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idAddress1"],["id","idAddress1","type","text","name","Identity.Address1",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idAddress2"],["id","idAddress2","type","text","name","Identity.Address2",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idAddress3"],["id","idAddress3","type","text","name","Identity.Address3",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idCity"],["id","idCity","type","text","name","Identity.City",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idState"],["id","idState","type","text","name","Identity.State",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPostalCode"],["id","idPostalCode","type","text","name","Identity.PostalCode",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idCountry"],["id","idCountry","type","text","name","Identity.Country",1,"form-control",3,"ngModel","disabled","ngModelChange"],[1,"mt-4"],[1,"col-5"],["for","organizationId"],["id","organizationId","name","OrganizationId",1,"form-control",3,"ngModel","disabled","ngModelChange","change"],["class","form-check",4,"ngFor","ngForOf"],[1,"form-check"],["type","checkbox",1,"form-check-input",3,"ngModel","id","name","disabled","ngModelChange"],[1,"form-check-label",3,"for"],[1,"small","text-muted","mt-4"],[1,"font-weight-semibold"],["href","#","appStopClick","",3,"title","click"],[4,"ngFor","ngForOf"],[1,"generated-wrapper","text-monospace","ml-2"],["type","checkbox","id","passwordPrompt","name","passwordPrompt",1,"form-check-input",3,"ngModel","disabled","change"],["for","passwordPrompt",1,"form-check-label"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/managing-items/#protect-individual-items",3,"appA11yTitle"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[1,"ml-auto"],["type","button","class","btn btn-link",3,"appA11yTitle","click",4,"ngIf"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click",4,"ngIf"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click"],["deleteBtn",""],["aria-hidden","true",1,"bwi","bwi-trash","bwi-lg","bwi-fw",3,"hidden"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-lg","bwi-fw",3,"hidden","title"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"form",2,3),o.ɵɵlistener("ngSubmit",(function(){return t.submit()})),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"div",4),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"h2",5),o.ɵɵtext(10),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"button",6),o.ɵɵpipe(13,"i18n"),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"span",7),o.ɵɵtext(16,"×"),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵtemplate(20,fe,48,24,"div",8),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"div",9),o.ɵɵtext(23,"\n "),o.ɵɵtemplate(24,ge,9,7,"button",10),o.ɵɵtext(25,"\n "),o.ɵɵelementStart(26,"button",11),o.ɵɵtext(27),o.ɵɵpipe(28,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n "),o.ɵɵtemplate(30,be,6,2,"div",12),o.ɵɵtext(31,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(32,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(33,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(34,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(35,"\n")),2&e&&(o.ɵɵadvance(4),o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(6),o.ɵɵtextInterpolate(t.title),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(13,7,"close")),o.ɵɵadvance(8),o.ɵɵproperty("ngIf",t.cipher),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",!t.viewOnly),o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(28,9,t.viewOnly?"close":"cancel"),"\n "),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",t.cipher&&!t.viewOnly))},directives:[b.NgControlStatusGroup,b.NgForm,w.ApiActionDirective,C.A11yTitleDirective,I.NgIf,b.DefaultValueAccessor,b.RequiredValidator,b.NgControlStatus,b.NgModel,E.AddEditCustomFieldsComponent,P.CalloutComponent,b.SelectControlValueAccessor,O.AutofocusDirective,I.NgForOf,b.NgSelectOption,b.ɵNgSelectMultipleOption,k.InputVerbatimDirective,I.NgClass,A.StopClickDirective,T.PremiumBadgeComponent,I.NgStyle,b.CheckboxControlValueAccessor],pipes:[M.I18nPipe,I.DatePipe],encapsulation:2})},28360:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationPlansComponent=void 0;const r=n(32621),o=(n(68012),n(91674),n(85714),n(51554),n(36631),n(45552),n(63513),n(73828),n(62166),n(9724),n(98523)),a=n(47937),s=n(49906),l=n(96066),c=n(7017),d=n(39950),p=n(80006),u=n(16567),m=n(17337),h=n(41799),v=n(32621),f=n(91674),g=n(51554),y=n(73828),x=n(85714),S=n(68012),b=n(9724),w=n(62166),C=n(63513),I=n(36631),E=n(45552),P=n(57490),O=n(96832),k=n(56820),A=n(41799),T=n(17337),M=n(51626),B=n(99729);function D(e,t){1&e&&(v.ɵɵelementContainerStart(0),v.ɵɵtext(1,"\n "),v.ɵɵelement(2,"i",2),v.ɵɵpipe(3,"i18n"),v.ɵɵtext(4,"\n "),v.ɵɵelementStart(5,"span",3),v.ɵɵtext(6),v.ɵɵpipe(7,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(8,"\n"),v.ɵɵelementContainerEnd()),2&e&&(v.ɵɵadvance(2),v.ɵɵpropertyInterpolate("title",v.ɵɵpipeBind1(3,2,"loading")),v.ɵɵadvance(4),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(7,4,"loading")))}function R(e,t){if(1&e){const e=v.ɵɵgetCurrentView();v.ɵɵelementContainerStart(0),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"p"),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(5,"\n "),v.ɵɵelementStart(6,"form",4,5),v.ɵɵlistener("ngSubmit",(function(){v.ɵɵrestoreView(e);return v.ɵɵnextContext().submit()})),v.ɵɵtext(8,"\n "),v.ɵɵelementStart(9,"div",6),v.ɵɵtext(10,"\n "),v.ɵɵelementStart(11,"label",7),v.ɵɵtext(12),v.ɵɵpipe(13,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(14,"\n "),v.ɵɵelement(15,"input",8),v.ɵɵtext(16,"\n "),v.ɵɵelementStart(17,"small",9),v.ɵɵtext(18),v.ɵɵpipe(19,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(20,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(21,"\n "),v.ɵɵelementStart(22,"button",10),v.ɵɵtext(23,"\n "),v.ɵɵelement(24,"i",11),v.ɵɵpipe(25,"i18n"),v.ɵɵtext(26,"\n "),v.ɵɵelementStart(27,"span"),v.ɵɵtext(28),v.ɵɵpipe(29,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(30,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(31,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(32,"\n"),v.ɵɵelementContainerEnd()}if(2&e){const e=v.ɵɵreference(7),t=v.ɵɵnextContext();v.ɵɵadvance(3),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(4,7,"uploadLicenseFileOrg")),v.ɵɵadvance(3),v.ɵɵproperty("appApiAction",t.formPromise),v.ɵɵadvance(6),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(13,9,"licenseFile")),v.ɵɵadvance(6),v.ɵɵtextInterpolate(v.ɵɵpipeBind2(19,11,"licenseFileDesc","bitwarden_organization_license.json")),v.ɵɵadvance(4),v.ɵɵproperty("disabled",e.loading),v.ɵɵadvance(2),v.ɵɵpropertyInterpolate("title",v.ɵɵpipeBind1(25,14,"loading")),v.ɵɵadvance(4),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(29,16,"submit"))}}function F(e,t){if(1&e){const e=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"div",19),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"label",25),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(5,"\n "),v.ɵɵelementStart(6,"input",26),v.ɵɵlistener("ngModelChange",(function(t){v.ɵɵrestoreView(e);return v.ɵɵnextContext(3).clientOwnerEmail=t})),v.ɵɵelementEnd(),v.ɵɵtext(7,"\n "),v.ɵɵelementStart(8,"small",27),v.ɵɵtext(9),v.ɵɵpipe(10,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(11,"\n "),v.ɵɵelementEnd()}if(2&e){const e=v.ɵɵnextContext(3);v.ɵɵadvance(3),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(4,3,"clientOwnerEmail")),v.ɵɵadvance(3),v.ɵɵproperty("ngModel",e.clientOwnerEmail),v.ɵɵadvance(3),v.ɵɵtextInterpolate(v.ɵɵpipeBind2(10,5,"clientOwnerDesc","20"))}}function U(e,t){if(1&e){const e=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"div",18),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"div",19),v.ɵɵtext(3,"\n "),v.ɵɵelementStart(4,"label",20),v.ɵɵtext(5),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(7,"\n "),v.ɵɵelementStart(8,"input",21),v.ɵɵlistener("ngModelChange",(function(t){v.ɵɵrestoreView(e);return v.ɵɵnextContext(2).name=t})),v.ɵɵelementEnd(),v.ɵɵtext(9,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(10,"\n "),v.ɵɵelementStart(11,"div",19),v.ɵɵtext(12,"\n "),v.ɵɵelementStart(13,"label",22),v.ɵɵtext(14),v.ɵɵpipe(15,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(16,"\n "),v.ɵɵelementStart(17,"input",23),v.ɵɵlistener("ngModelChange",(function(t){v.ɵɵrestoreView(e);return v.ɵɵnextContext(2).billingEmail=t})),v.ɵɵelementEnd(),v.ɵɵtext(18,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(19,"\n "),v.ɵɵtemplate(20,F,12,8,"div",24),v.ɵɵtext(21,"\n "),v.ɵɵelementEnd()}if(2&e){const e=v.ɵɵnextContext(2);v.ɵɵadvance(5),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(6,5,"organizationName")),v.ɵɵadvance(3),v.ɵɵproperty("ngModel",e.name),v.ɵɵadvance(6),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(15,7,"billingEmail")),v.ɵɵadvance(3),v.ɵɵproperty("ngModel",e.billingEmail),v.ɵɵadvance(3),v.ɵɵproperty("ngIf",!!e.providerId)}}function V(e,t){if(1&e){const e=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"div",18),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"div",19),v.ɵɵtext(3,"\n "),v.ɵɵelementStart(4,"label",31),v.ɵɵtext(5),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(7,"\n "),v.ɵɵelementStart(8,"input",32),v.ɵɵlistener("ngModelChange",(function(t){v.ɵɵrestoreView(e);return v.ɵɵnextContext(3).businessName=t})),v.ɵɵelementEnd(),v.ɵɵtext(9,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(10,"\n "),v.ɵɵelementEnd()}if(2&e){const e=v.ɵɵnextContext(3);v.ɵɵadvance(5),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(6,2,"businessName")),v.ɵɵadvance(3),v.ɵɵproperty("ngModel",e.businessName)}}function N(e,t){if(1&e){const e=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"div"),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"div",28),v.ɵɵtext(3,"\n "),v.ɵɵelementStart(4,"input",29),v.ɵɵlistener("ngModelChange",(function(t){v.ɵɵrestoreView(e);return v.ɵɵnextContext(2).ownedBusiness=t}))("change",(function(){v.ɵɵrestoreView(e);return v.ɵɵnextContext(2).changedOwnedBusiness()})),v.ɵɵelementEnd(),v.ɵɵtext(5,"\n "),v.ɵɵelementStart(6,"label",30),v.ɵɵtext(7),v.ɵɵpipe(8,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(9,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(10,"\n "),v.ɵɵtemplate(11,V,11,4,"div",13),v.ɵɵtext(12,"\n "),v.ɵɵelementEnd()}if(2&e){const e=v.ɵɵnextContext(2);v.ɵɵadvance(4),v.ɵɵproperty("ngModel",e.ownedBusiness),v.ɵɵadvance(3),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(8,3,"accountOwnedBusiness")),v.ɵɵadvance(4),v.ɵɵproperty("ngIf",e.ownedBusiness)}}function _(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(2,1,"onPremHostingOptional"),""))}function j(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(2,1,"includeSsoAuthentication"),""))}function z(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(2,1,"includeEnterprisePolicies"),""))}function H(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate1("•\n ",v.ɵɵpipeBind2(2,1,"xDayFreeTrial",e.trialPeriodDays),"\n ")}}function L(e,t){if(1&e&&(v.ɵɵelementContainerStart(0),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"small"),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(5,"\n "),v.ɵɵtemplate(6,_,3,3,"small",0),v.ɵɵtext(7,"\n "),v.ɵɵtemplate(8,j,3,3,"small",0),v.ɵɵtext(9,"\n "),v.ɵɵtemplate(10,z,3,3,"small",0),v.ɵɵtext(11,"\n "),v.ɵɵtemplate(12,H,3,4,"small",0),v.ɵɵtext(13,"\n "),v.ɵɵelementContainerEnd()),2&e){const e=v.ɵɵnextContext().$implicit,t=v.ɵɵnextContext(2);v.ɵɵadvance(3),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(4,5,"includeAllTeamsFeatures"),""),v.ɵɵadvance(3),v.ɵɵproperty("ngIf",e.hasSelfHost),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.hasSso),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.hasPolicies),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.trialPeriodDays&&t.createOrganization)}}function K(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind2(2,1,"limitedUsers",e.maxUsers),"")}}function q(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind2(2,1,"addShareLimitedUsers",e.maxUsers),"")}}function G(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(2,1,"addShareUnlimitedUsers"),""))}function W(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind2(2,1,"limitedCollections",e.maxCollections),"")}}function $(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind2(2,1,"addShareLimitedUsers",e.maxAdditionalSeats),"")}}function Y(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(2,1,"createUnlimitedCollections"),""))}function Q(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind2(2,1,"gbEncryptedFileStorage",e.baseStorageGb+"GB"),"")}}function J(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(2,1,"controlAccessWithGroups"),""))}function Z(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(2,1,"trackAuditLogs"),""))}function X(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(2,1,"syncUsersFromDirectory"),""))}function ee(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(2,1,"onPremHostingOptional"),""))}function te(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(2,1,"usersGetPremium"),""))}function ne(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(2,1,"priorityCustomerSupport"),""))}function ie(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate1("•\n ",v.ɵɵpipeBind2(2,1,"xDayFreeTrial",e.trialPeriodDays),"\n ")}}function re(e,t){if(1&e&&(v.ɵɵtext(0,"\n "),v.ɵɵtemplate(1,K,3,4,"small",0),v.ɵɵtext(2,"\n "),v.ɵɵtemplate(3,q,3,4,"small",0),v.ɵɵtext(4,"\n "),v.ɵɵtemplate(5,G,3,3,"small",0),v.ɵɵtext(6,"\n "),v.ɵɵtemplate(7,W,3,4,"small",0),v.ɵɵtext(8,"\n "),v.ɵɵtemplate(9,$,3,4,"small",0),v.ɵɵtext(10,"\n "),v.ɵɵtemplate(11,Y,3,3,"small",0),v.ɵɵtext(12,"\n "),v.ɵɵtemplate(13,Q,3,4,"small",0),v.ɵɵtext(14,"\n "),v.ɵɵtemplate(15,J,3,3,"small",0),v.ɵɵtext(16,"\n "),v.ɵɵtemplate(17,Z,3,3,"small",0),v.ɵɵtext(18,"\n "),v.ɵɵtemplate(19,X,3,3,"small",0),v.ɵɵtext(20,"\n "),v.ɵɵtemplate(21,ee,3,3,"small",0),v.ɵɵtext(22,"\n "),v.ɵɵtemplate(23,te,3,3,"small",0),v.ɵɵtext(24,"\n "),v.ɵɵtemplate(25,ne,3,3,"small",0),v.ɵɵtext(26,"\n "),v.ɵɵtemplate(27,ie,3,4,"small",0),v.ɵɵtext(28,"\n ")),2&e){const e=v.ɵɵnextContext().$implicit,t=v.ɵɵnextContext(2);v.ɵɵadvance(1),v.ɵɵproperty("ngIf",e.product==t.productTypes.Free),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.product!=t.productTypes.Free&&e.maxUsers),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",!e.maxUsers),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.maxCollections),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.maxAdditionalSeats),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",!e.maxCollections),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.baseStorageGb),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.hasGroups),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.hasApi),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.hasDirectory),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.hasSelfHost),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.usersGetPremium),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.product!=t.productTypes.Free),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.trialPeriodDays&&t.createOrganization)}}function oe(e,t){if(1&e&&(v.ɵɵelementContainerStart(0),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵpipe(3,"currency"),v.ɵɵpipe(4,"i18n"),v.ɵɵelementContainerEnd()),2&e){const e=v.ɵɵnextContext(3).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate3("\n ",v.ɵɵpipeBind1(2,3,"additionalUsers").toLowerCase(),"\n ",v.ɵɵpipeBind2(3,5,e.seatPrice/12,"$")," /",v.ɵɵpipeBind1(4,8,"month"),"\n ")}}function ae(e,t){if(1&e&&(v.ɵɵelementContainerStart(0),v.ɵɵtext(1),v.ɵɵpipe(2,"currency"),v.ɵɵpipe(3,"i18n"),v.ɵɵpipe(4,"i18n"),v.ɵɵtemplate(5,oe,5,10,"ng-container",0),v.ɵɵtext(6,"\n "),v.ɵɵelementContainerEnd()),2&e){const e=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate3("\n ",v.ɵɵpipeBind2(2,4,e.basePrice/12,"$")," /",v.ɵɵpipeBind1(3,7,"month"),",\n ",v.ɵɵpipeBind2(4,9,"includesXUsers",e.baseSeats),"\n "),v.ɵɵadvance(4),v.ɵɵproperty("ngIf",e.hasAdditionalSeatsOption)}}function se(e,t){if(1&e&&(v.ɵɵelementStart(0,"span"),v.ɵɵtext(1,"\n "),v.ɵɵtemplate(2,ae,7,12,"ng-container",0),v.ɵɵtext(3,"\n "),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext().$implicit,t=v.ɵɵnextContext(2);v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.basePrice&&!t.acceptingSponsorship)}}function le(e,t){if(1&e&&(v.ɵɵelementStart(0,"span"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵpipe(3,"currency"),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext().$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate2("\n ",v.ɵɵpipeBind2(2,2,"costPerUser",v.ɵɵpipeBind2(3,5,e.seatPrice/12,"$"))," /",v.ɵɵpipeBind1(4,8,"month"),"\n ")}}function ce(e,t){1&e&&(v.ɵɵelementStart(0,"span"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(2,1,"freeForever")))}function de(e,t){if(1&e){const e=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"div",33),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"input",34),v.ɵɵlistener("ngModelChange",(function(t){v.ɵɵrestoreView(e);return v.ɵɵnextContext(2).product=t}))("change",(function(){v.ɵɵrestoreView(e);return v.ɵɵnextContext(2).changedProduct()})),v.ɵɵelementEnd(),v.ɵɵtext(3,"\n "),v.ɵɵelementStart(4,"label",35),v.ɵɵtext(5),v.ɵɵpipe(6,"i18n"),v.ɵɵelementStart(7,"small",36),v.ɵɵtext(8),v.ɵɵpipe(9,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(10,"\n "),v.ɵɵtemplate(11,L,14,7,"ng-container",37),v.ɵɵtext(12,"\n "),v.ɵɵtemplate(13,re,29,14,"ng-template",null,38,v.ɵɵtemplateRefExtractor),v.ɵɵtext(15,"\n "),v.ɵɵtemplate(16,se,4,1,"span",0),v.ɵɵtext(17,"\n "),v.ɵɵtemplate(18,le,5,10,"span",0),v.ɵɵtext(19,"\n "),v.ɵɵtemplate(20,ce,3,3,"span",0),v.ɵɵtext(21,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(22,"\n "),v.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=v.ɵɵreference(14),i=v.ɵɵnextContext(2);v.ɵɵadvance(2),v.ɵɵpropertyInterpolate1("id","product",e.product,""),v.ɵɵproperty("value",e.product)("ngModel",i.product),v.ɵɵadvance(2),v.ɵɵpropertyInterpolate1("for","product",e.product,""),v.ɵɵadvance(1),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(6,11,e.nameLocalizationKey),"\n "),v.ɵɵadvance(3),v.ɵɵtextInterpolate(v.ɵɵpipeBind2(9,13,e.descriptionLocalizationKey,"1")),v.ɵɵadvance(3),v.ɵɵproperty("ngIf",e.product===i.productTypes.Enterprise)("ngIfElse",n),v.ɵɵadvance(5),v.ɵɵproperty("ngIf",e.product!=i.productTypes.Free),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",!e.basePrice&&e.hasAdditionalSeatsOption),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.product==i.productTypes.Free)}}function pe(e,t){if(1&e){const e=v.ɵɵgetCurrentView();v.ɵɵelementContainerStart(0),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"h2",12),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(5,"\n "),v.ɵɵelementStart(6,"div",18),v.ɵɵtext(7,"\n "),v.ɵɵelementStart(8,"div",52),v.ɵɵtext(9,"\n "),v.ɵɵelementStart(10,"label",53),v.ɵɵtext(11),v.ɵɵpipe(12,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(13,"\n "),v.ɵɵelementStart(14,"input",54),v.ɵɵlistener("ngModelChange",(function(t){v.ɵɵrestoreView(e);return v.ɵɵnextContext(3).additionalSeats=t})),v.ɵɵpipe(15,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(16,"\n "),v.ɵɵelementStart(17,"small",41),v.ɵɵtext(18),v.ɵɵpipe(19,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(20,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(21,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(22,"\n "),v.ɵɵelementContainerEnd()}if(2&e){const e=v.ɵɵnextContext(3);v.ɵɵadvance(3),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(4,5,"users")),v.ɵɵadvance(8),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(12,7,"userSeats")),v.ɵɵadvance(3),v.ɵɵpropertyInterpolate("placeholder",v.ɵɵpipeBind1(15,9,"userSeatsDesc")),v.ɵɵproperty("ngModel",e.additionalSeats),v.ɵɵadvance(4),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(19,11,"userSeatsHowManyDesc"))}}function ue(e,t){if(1&e){const e=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"div",18),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"div",19),v.ɵɵtext(3,"\n "),v.ɵɵelementStart(4,"label",53),v.ɵɵtext(5),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(7,"\n "),v.ɵɵelementStart(8,"input",55),v.ɵɵlistener("ngModelChange",(function(t){v.ɵɵrestoreView(e);return v.ɵɵnextContext(3).additionalSeats=t})),v.ɵɵpipe(9,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(10,"\n "),v.ɵɵelementStart(11,"small",41),v.ɵɵtext(12),v.ɵɵpipe(13,"i18n"),v.ɵɵpipe(14,"currency"),v.ɵɵelementEnd(),v.ɵɵtext(15,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(16,"\n "),v.ɵɵelementEnd()}if(2&e){const e=v.ɵɵnextContext(3);v.ɵɵadvance(5),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(6,4,"additionalUserSeats")),v.ɵɵadvance(3),v.ɵɵpropertyInterpolate("placeholder",v.ɵɵpipeBind1(9,6,"userSeatsDesc")),v.ɵɵproperty("ngModel",e.additionalSeats),v.ɵɵadvance(4),v.ɵɵtextInterpolate(v.ɵɵpipeBind3(13,8,"userSeatsAdditionalDesc",e.selectedPlan.baseSeats,v.ɵɵpipeBind2(14,12,e.seatPriceMonthly(e.selectedPlan),"$")))}}function me(e,t){if(1&e){const e=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"div",19),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"div",56),v.ɵɵtext(3,"\n "),v.ɵɵelementStart(4,"input",57),v.ɵɵlistener("ngModelChange",(function(t){v.ɵɵrestoreView(e);return v.ɵɵnextContext(3).premiumAccessAddon=t})),v.ɵɵelementEnd(),v.ɵɵtext(5,"\n "),v.ɵɵelementStart(6,"label",58),v.ɵɵtext(7),v.ɵɵpipe(8,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(9,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(10,"\n "),v.ɵɵelementStart(11,"small",41),v.ɵɵtext(12),v.ɵɵpipe(13,"i18n"),v.ɵɵpipe(14,"currency"),v.ɵɵpipe(15,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(16,"\n "),v.ɵɵelementEnd()}if(2&e){const e=v.ɵɵnextContext(3);v.ɵɵadvance(4),v.ɵɵproperty("ngModel",e.premiumAccessAddon),v.ɵɵadvance(3),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(8,3,"premiumAccess")),v.ɵɵadvance(5),v.ɵɵtextInterpolate(v.ɵɵpipeBind3(13,5,"premiumAccessDesc",v.ɵɵpipeBind2(14,9,3.33,"$"),v.ɵɵpipeBind1(15,12,"month")))}}function he(e,t){if(1&e&&(v.ɵɵelementContainerStart(0),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"span",61),v.ɵɵtext(3),v.ɵɵpipe(4,"currency"),v.ɵɵelementEnd(),v.ɵɵtext(5),v.ɵɵpipe(6,"i18n"),v.ɵɵelementContainerEnd()),2&e){const e=v.ɵɵnextContext(3).$implicit;v.ɵɵadvance(3),v.ɵɵtextInterpolate(v.ɵɵpipeBind2(4,2,e.basePrice,"$")),v.ɵɵadvance(2),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(6,5,"freeWithSponsorship"),"\n ")}}function ve(e,t){if(1&e&&(v.ɵɵtext(0),v.ɵɵpipe(1,"currency"),v.ɵɵpipe(2,"i18n")),2&e){const e=v.ɵɵnextContext(3).$implicit;v.ɵɵtextInterpolate2("\n ",v.ɵɵpipeBind2(1,2,e.basePrice,"$"),"\n /",v.ɵɵpipeBind1(2,5,"year"),"\n ")}}function fe(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵpipe(3,"currency"),v.ɵɵpipe(4,"i18n"),v.ɵɵtemplate(5,he,7,7,"ng-container",37),v.ɵɵtext(6,"\n "),v.ɵɵtemplate(7,ve,3,7,"ng-template",null,60,v.ɵɵtemplateRefExtractor),v.ɵɵtext(9,"\n "),v.ɵɵelementEnd()),2&e){const e=v.ɵɵreference(8),t=v.ɵɵnextContext(2).$implicit,n=v.ɵɵnextContext(3);v.ɵɵadvance(1),v.ɵɵtextInterpolate3("\n ",v.ɵɵpipeBind1(2,5,"basePrice"),": ",v.ɵɵpipeBind2(3,7,t.basePrice/12,"$")," × 12\n ",v.ɵɵpipeBind1(4,10,"monthAbbr"),"\n =\n "),v.ɵɵadvance(4),v.ɵɵproperty("ngIf",n.acceptingSponsorship)("ngIfElse",e)}}function ge(e,t){1&e&&(v.ɵɵelementStart(0,"span"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("",v.ɵɵpipeBind1(2,1,"additionalUsers"),":"))}function ye(e,t){1&e&&(v.ɵɵelementStart(0,"span"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("",v.ɵɵpipeBind1(2,1,"users"),":"))}function xe(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1,"\n "),v.ɵɵtemplate(2,ge,3,3,"span",0),v.ɵɵtext(3,"\n "),v.ɵɵtemplate(4,ye,3,3,"span",0),v.ɵɵtext(5),v.ɵɵpipe(6,"currency"),v.ɵɵpipe(7,"i18n"),v.ɵɵpipe(8,"currency"),v.ɵɵpipe(9,"i18n"),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext(2).$implicit,t=v.ɵɵnextContext(3);v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.baseSeats),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",!e.baseSeats),v.ɵɵadvance(1),v.ɵɵtextInterpolate5("\n ",t.additionalSeats||0," ×\n ",v.ɵɵpipeBind2(6,7,e.seatPrice/12,"$")," × 12\n ",v.ɵɵpipeBind1(7,10,"monthAbbr")," = ",v.ɵɵpipeBind2(8,12,t.seatTotal(e),"$")," /",v.ɵɵpipeBind1(9,15,"year"),"\n ")}}function Se(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵpipe(3,"currency"),v.ɵɵpipe(4,"i18n"),v.ɵɵpipe(5,"currency"),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext(2).$implicit,t=v.ɵɵnextContext(3);v.ɵɵadvance(1),v.ɵɵtextInterpolate6("\n ",v.ɵɵpipeBind1(2,6,"additionalStorageGb"),": ",t.additionalStorage||0," ×\n ",v.ɵɵpipeBind2(3,8,e.additionalStoragePricePerGb/12,"$")," × 12\n ",v.ɵɵpipeBind1(4,11,"monthAbbr")," =\n ",v.ɵɵpipeBind2(5,13,t.additionalStorageTotal(e),"$")," /",v.ɵɵpipeBind1(6,16,"year"),"\n ")}}function be(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵpipe(3,"currency"),v.ɵɵpipe(4,"i18n"),v.ɵɵpipe(5,"currency"),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate5("\n ",v.ɵɵpipeBind1(2,5,"premiumAccess"),":\n ",v.ɵɵpipeBind2(3,7,e.premiumAccessOptionCost/12,"$")," × 12\n ",v.ɵɵpipeBind1(4,10,"monthAbbr"),"\n =\n ",v.ɵɵpipeBind2(5,12,40,"$"),"\n /",v.ɵɵpipeBind1(6,15,"year"),"\n ")}}function we(e,t){if(1&e&&(v.ɵɵelementContainerStart(0),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵtemplate(3,fe,10,12,"small",0),v.ɵɵtext(4,"\n "),v.ɵɵtemplate(5,xe,10,17,"small",0),v.ɵɵtext(6,"\n "),v.ɵɵtemplate(7,Se,7,18,"small",0),v.ɵɵtext(8,"\n "),v.ɵɵtemplate(9,be,7,17,"small",0),v.ɵɵtext(10,"\n "),v.ɵɵelementContainerEnd()),2&e){const e=v.ɵɵnextContext().$implicit,t=v.ɵɵnextContext(3);v.ɵɵadvance(1),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(2,5,"annually"),"\n "),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.basePrice),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.hasAdditionalSeatsOption),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.hasAdditionalStorageOption),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.hasPremiumAccessOption&&t.premiumAccessAddon)}}function Ce(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵpipe(3,"currency"),v.ɵɵpipe(4,"i18n"),v.ɵɵpipe(5,"currency"),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate5("\n ",v.ɵɵpipeBind1(2,5,"basePrice"),": ",v.ɵɵpipeBind2(3,7,e.basePrice,"$"),"\n ",v.ɵɵpipeBind1(4,10,"monthAbbr"),"\n =\n ",v.ɵɵpipeBind2(5,12,e.basePrice,"$"),"\n /",v.ɵɵpipeBind1(6,15,"month"),"\n ")}}function Ie(e,t){1&e&&(v.ɵɵelementStart(0,"span"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("",v.ɵɵpipeBind1(2,1,"additionalUsers"),":"))}function Ee(e,t){1&e&&(v.ɵɵelementStart(0,"span"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("",v.ɵɵpipeBind1(2,1,"users"),":"))}function Pe(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1,"\n "),v.ɵɵtemplate(2,Ie,3,3,"span",0),v.ɵɵtext(3,"\n "),v.ɵɵtemplate(4,Ee,3,3,"span",0),v.ɵɵtext(5),v.ɵɵpipe(6,"currency"),v.ɵɵpipe(7,"i18n"),v.ɵɵpipe(8,"currency"),v.ɵɵpipe(9,"i18n"),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext(2).$implicit,t=v.ɵɵnextContext(3);v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.baseSeats),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",!e.baseSeats),v.ɵɵadvance(1),v.ɵɵtextInterpolate5("\n ",t.additionalSeats||0," × ",v.ɵɵpipeBind2(6,7,e.seatPrice,"$"),"\n ",v.ɵɵpipeBind1(7,10,"monthAbbr")," = ",v.ɵɵpipeBind2(8,12,t.seatTotal(e),"$")," /",v.ɵɵpipeBind1(9,15,"month"),"\n ")}}function Oe(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵpipe(3,"currency"),v.ɵɵpipe(4,"i18n"),v.ɵɵpipe(5,"currency"),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext(2).$implicit,t=v.ɵɵnextContext(3);v.ɵɵadvance(1),v.ɵɵtextInterpolate6("\n ",v.ɵɵpipeBind1(2,6,"additionalStorageGb"),": ",t.additionalStorage||0," ×\n ",v.ɵɵpipeBind2(3,8,e.additionalStoragePricePerGb,"$"),"\n ",v.ɵɵpipeBind1(4,11,"monthAbbr")," =\n ",v.ɵɵpipeBind2(5,13,t.additionalStorageTotal(e),"$")," /",v.ɵɵpipeBind1(6,16,"month"),"\n ")}}function ke(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵpipe(3,"currency"),v.ɵɵpipe(4,"i18n"),v.ɵɵpipe(5,"currency"),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate5("\n ",v.ɵɵpipeBind1(2,5,"premiumAccess"),":\n ",v.ɵɵpipeBind2(3,7,e.premiumAccessOptionCost,"$")," ",v.ɵɵpipeBind1(4,10,"monthAbbr")," =\n ",v.ɵɵpipeBind2(5,12,40,"$"),"\n /",v.ɵɵpipeBind1(6,15,"month"),"\n ")}}function Ae(e,t){if(1&e&&(v.ɵɵelementContainerStart(0),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵtemplate(3,Ce,7,17,"small",0),v.ɵɵtext(4,"\n "),v.ɵɵtemplate(5,Pe,10,17,"small",0),v.ɵɵtext(6,"\n "),v.ɵɵtemplate(7,Oe,7,18,"small",0),v.ɵɵtext(8,"\n "),v.ɵɵtemplate(9,ke,7,17,"small",0),v.ɵɵtext(10,"\n "),v.ɵɵelementContainerEnd()),2&e){const e=v.ɵɵnextContext().$implicit,t=v.ɵɵnextContext(3);v.ɵɵadvance(1),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(2,5,"monthly"),"\n "),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.basePrice),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.hasAdditionalSeatsOption),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.hasAdditionalStorageOption),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.hasPremiumAccessOption&&t.premiumAccessAddon)}}function Te(e,t){if(1&e){const e=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"div",33),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"input",59),v.ɵɵlistener("ngModelChange",(function(t){v.ɵɵrestoreView(e);return v.ɵɵnextContext(3).plan=t})),v.ɵɵelementEnd(),v.ɵɵtext(3,"\n "),v.ɵɵelementStart(4,"label",35),v.ɵɵtext(5,"\n "),v.ɵɵtemplate(6,we,11,7,"ng-container",0),v.ɵɵtext(7,"\n "),v.ɵɵtemplate(8,Ae,11,7,"ng-container",0),v.ɵɵtext(9,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(10,"\n "),v.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=v.ɵɵnextContext(3);v.ɵɵadvance(2),v.ɵɵpropertyInterpolate1("id","interval",e.type,""),v.ɵɵproperty("value",e.type)("ngModel",n.plan),v.ɵɵadvance(2),v.ɵɵpropertyInterpolate1("for","interval",e.type,""),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.isAnnual),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",!e.isAnnual)}}function Me(e,t){1&e&&v.ɵɵelement(0,"app-payment",62),2&e&&v.ɵɵproperty("hideCredit",!0)}function Be(e,t){1&e&&(v.ɵɵelementContainerStart(0),v.ɵɵtext(1,"\n "),v.ɵɵelement(2,"app-payment",63),v.ɵɵtext(3,"\n "),v.ɵɵelementContainerEnd()),2&e&&(v.ɵɵadvance(2),v.ɵɵproperty("showMethods",!1))}function De(e,t){if(1&e){const e=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"div"),v.ɵɵtext(1,"\n "),v.ɵɵtemplate(2,pe,23,13,"ng-container",0),v.ɵɵtext(3,"\n "),v.ɵɵelementStart(4,"h2",12),v.ɵɵtext(5),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(7,"\n "),v.ɵɵtemplate(8,ue,17,15,"div",13),v.ɵɵtext(9,"\n "),v.ɵɵelementStart(10,"div",18),v.ɵɵtext(11,"\n "),v.ɵɵelementStart(12,"div",19),v.ɵɵtext(13,"\n "),v.ɵɵelementStart(14,"label",39),v.ɵɵtext(15),v.ɵɵpipe(16,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(17,"\n "),v.ɵɵelementStart(18,"input",40),v.ɵɵlistener("ngModelChange",(function(t){v.ɵɵrestoreView(e);return v.ɵɵnextContext(2).additionalStorage=t})),v.ɵɵpipe(19,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(20,"\n "),v.ɵɵelementStart(21,"small",41),v.ɵɵtext(22),v.ɵɵpipe(23,"i18n"),v.ɵɵpipe(24,"currency"),v.ɵɵpipe(25,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(26,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(27,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(28,"\n "),v.ɵɵelementStart(29,"div",18),v.ɵɵtext(30,"\n "),v.ɵɵtemplate(31,me,17,14,"div",24),v.ɵɵtext(32,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(33,"\n "),v.ɵɵelementStart(34,"h2",42),v.ɵɵtext(35),v.ɵɵpipe(36,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(37,"\n "),v.ɵɵtemplate(38,Te,11,6,"div",14),v.ɵɵtext(39,"\n "),v.ɵɵelement(40,"hr",43),v.ɵɵtext(41,"\n "),v.ɵɵelementStart(42,"h2",44),v.ɵɵtext(43),v.ɵɵpipe(44,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(45,"\n "),v.ɵɵelementStart(46,"small",45),v.ɵɵtext(47),v.ɵɵelementEnd(),v.ɵɵtext(48,"\n "),v.ɵɵtemplate(49,Me,1,1,"app-payment",46),v.ɵɵtext(50,"\n "),v.ɵɵelementStart(51,"app-tax-info",47),v.ɵɵlistener("onCountryChanged",(function(){v.ɵɵrestoreView(e);return v.ɵɵnextContext(2).changedCountry()})),v.ɵɵelementEnd(),v.ɵɵtext(52,"\n "),v.ɵɵelementStart(53,"div",48),v.ɵɵtext(54,"\n "),v.ɵɵelementStart(55,"div",49),v.ɵɵtext(56),v.ɵɵpipe(57,"i18n"),v.ɵɵpipe(58,"currency"),v.ɵɵelement(59,"br"),v.ɵɵtext(60,"\n "),v.ɵɵelementContainerStart(61),v.ɵɵtext(62),v.ɵɵpipe(63,"i18n"),v.ɵɵpipe(64,"currency"),v.ɵɵelementContainerEnd(),v.ɵɵtext(65,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(66,"\n "),v.ɵɵelement(67,"hr",50),v.ɵɵtext(68,"\n "),v.ɵɵelementStart(69,"p",51),v.ɵɵtext(70,"\n "),v.ɵɵelementStart(71,"strong"),v.ɵɵtext(72),v.ɵɵpipe(73,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(74),v.ɵɵpipe(75,"currency"),v.ɵɵpipe(76,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(77,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(78,"\n "),v.ɵɵtemplate(79,Be,4,1,"ng-container",0),v.ɵɵtext(80,"\n "),v.ɵɵelementEnd()}if(2&e){const e=v.ɵɵnextContext(2);v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.selectedPlan.hasAdditionalSeatsOption&&!e.selectedPlan.baseSeats),v.ɵɵadvance(3),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(6,21,"addons")),v.ɵɵadvance(3),v.ɵɵproperty("ngIf",e.selectedPlan.hasAdditionalSeatsOption&&e.selectedPlan.baseSeats),v.ɵɵadvance(7),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(16,23,"additionalStorageGb")),v.ɵɵadvance(3),v.ɵɵpropertyInterpolate("placeholder",v.ɵɵpipeBind1(19,25,"additionalStorageGbDesc")),v.ɵɵproperty("ngModel",e.additionalStorage),v.ɵɵadvance(4),v.ɵɵtextInterpolate(v.ɵɵpipeBind4(23,27,"additionalStorageIntervalDesc","1 GB",v.ɵɵpipeBind2(24,32,e.additionalStoragePriceMonthly(e.selectedPlan),"$"),v.ɵɵpipeBind1(25,35,"month"))),v.ɵɵadvance(9),v.ɵɵproperty("ngIf",e.selectedPlan.hasPremiumAccessOption),v.ɵɵadvance(4),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(36,37,"summary")),v.ɵɵadvance(3),v.ɵɵproperty("ngForOf",e.selectablePlans),v.ɵɵadvance(5),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(44,39,e.createOrganization?"paymentInformation":"billingInformation"),"\n "),v.ɵɵadvance(4),v.ɵɵtextInterpolate1("\n ",e.paymentDesc,"\n "),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.createOrganization),v.ɵɵadvance(7),v.ɵɵtextInterpolate2("\n ",v.ɵɵpipeBind1(57,41,"planPrice"),": ",v.ɵɵpipeBind2(58,43,e.subtotal,"USD $"),"\n "),v.ɵɵadvance(6),v.ɵɵtextInterpolate2("\n ",v.ɵɵpipeBind1(63,46,"estimatedTax"),": ",v.ɵɵpipeBind2(64,48,e.taxCharges,"USD $"),"\n "),v.ɵɵadvance(10),v.ɵɵtextInterpolate1("",v.ɵɵpipeBind1(73,51,"total"),":"),v.ɵɵadvance(2),v.ɵɵtextInterpolate2(" ",v.ɵɵpipeBind2(75,53,e.total,"USD $"),"/",v.ɵɵpipeBind1(76,56,e.selectedPlanInterval),"\n "),v.ɵɵadvance(5),v.ɵɵproperty("ngIf",!e.createOrganization)}}function Re(e,t){1&e&&(v.ɵɵelementStart(0,"div",16),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"app-callout",64),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(5,"\n "),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(2),v.ɵɵproperty("type","error"),v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(4,2,"singleOrgBlockCreateMessage")))}function Fe(e,t){if(1&e){const e=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"button",65),v.ɵɵlistener("click",(function(){v.ɵɵrestoreView(e);return v.ɵɵnextContext(2).cancel()})),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()}2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(2,1,"cancel"),"\n "))}function Ue(e,t){if(1&e){const e=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"form",4,5),v.ɵɵlistener("ngSubmit",(function(){v.ɵɵrestoreView(e);return v.ɵɵnextContext().submit()})),v.ɵɵtext(2,"\n "),v.ɵɵelementStart(3,"h2",12),v.ɵɵtext(4),v.ɵɵpipe(5,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(6,"\n "),v.ɵɵtemplate(7,U,22,9,"div",13),v.ɵɵtext(8,"\n "),v.ɵɵtemplate(9,N,13,5,"div",0),v.ɵɵtext(10,"\n "),v.ɵɵelementStart(11,"h2",12),v.ɵɵtext(12),v.ɵɵpipe(13,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(14,"\n "),v.ɵɵtemplate(15,de,23,16,"div",14),v.ɵɵtext(16,"\n "),v.ɵɵtemplate(17,De,81,58,"div",0),v.ɵɵtext(18,"\n "),v.ɵɵtemplate(19,Re,6,4,"div",15),v.ɵɵtext(20,"\n "),v.ɵɵelementStart(21,"div",16),v.ɵɵtext(22,"\n "),v.ɵɵelementStart(23,"button",10),v.ɵɵtext(24,"\n "),v.ɵɵelement(25,"i",11),v.ɵɵpipe(26,"i18n"),v.ɵɵtext(27,"\n "),v.ɵɵelementStart(28,"span"),v.ɵɵtext(29),v.ɵɵpipe(30,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(31,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(32,"\n "),v.ɵɵtemplate(33,Fe,3,3,"button",17),v.ɵɵtext(34,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(35,"\n"),v.ɵɵelementEnd()}if(2&e){const e=v.ɵɵreference(1),t=v.ɵɵnextContext();v.ɵɵproperty("appApiAction",t.formPromise),v.ɵɵadvance(4),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(5,12,"generalInformation")),v.ɵɵadvance(3),v.ɵɵproperty("ngIf",t.createOrganization),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",!t.providerId&&!t.acceptingSponsorship),v.ɵɵadvance(3),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(13,14,"chooseYourPlan")),v.ɵɵadvance(3),v.ɵɵproperty("ngForOf",t.selectableProducts),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",t.product!==t.productTypes.Free),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",t.singleOrgPolicyBlock),v.ɵɵadvance(4),v.ɵɵproperty("disabled",e.loading),v.ɵɵadvance(2),v.ɵɵpropertyInterpolate("title",v.ɵɵpipeBind1(26,16,"loading")),v.ɵɵadvance(4),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(30,18,"submit")),v.ɵɵadvance(4),v.ɵɵproperty("ngIf",t.showCancel)}}class Ve{constructor(e,t,n,i,o,s,c,d,p,u){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.cryptoService=i,this.router=o,this.syncService=s,this.policyService=c,this.organizationService=d,this.logService=p,this.messagingService=u,this.showFree=!0,this.showCancel=!1,this.acceptingSponsorship=!1,this.product=l.ProductType.Free,this.plan=a.PlanType.Free,this.onSuccess=new r.EventEmitter,this.onCanceled=new r.EventEmitter,this.loading=!0,this.selfHosted=!1,this.ownedBusiness=!1,this.premiumAccessAddon=!1,this.additionalStorage=0,this.additionalSeats=0,this.productTypes=l.ProductType,this.singleOrgPolicyBlock=!1,this.discount=0,this.selfHosted=n.isSelfHost()}ngOnInit(){return i(this,void 0,void 0,(function*(){if(!this.selfHosted){const e=yield this.apiService.getPlans();this.plans=e.data,this.product!==l.ProductType.Enterprise&&this.product!==l.ProductType.Teams||(this.ownedBusiness=!0)}this.providerId&&(this.ownedBusiness=!0,this.changedOwnedBusiness()),this.loading=!1}))}get createOrganization(){return null==this.organizationId}get selectedPlan(){return this.plans.find((e=>e.type===this.plan))}get selectedPlanInterval(){return this.selectedPlan.isAnnual?"year":"month"}get selectableProducts(){let e=this.plans.filter((e=>e.type!==a.PlanType.Custom));if(this.ownedBusiness&&(e=e.filter((e=>e.canBeUsedByBusiness))),this.showFree||(e=e.filter((e=>e.product!==l.ProductType.Free))),e=e.filter((e=>!e.legacyYear&&!e.disabled&&(e.isAnnual||e.product===this.productTypes.Free))),this.acceptingSponsorship){const t=this.plans.find((e=>e.type===a.PlanType.FamiliesAnnually));this.discount=t.basePrice,e=[t]}return e}get selectablePlans(){return this.plans.filter((e=>!e.legacyYear&&!e.disabled&&e.product===this.product))}additionalStoragePriceMonthly(e){return e.isAnnual?e.additionalStoragePricePerGb/12:e.additionalStoragePricePerGb}seatPriceMonthly(e){return e.isAnnual?e.seatPrice/12:e.seatPrice}additionalStorageTotal(e){return e.hasAdditionalStorageOption?e.additionalStoragePricePerGb*Math.abs(this.additionalStorage||0):0}seatTotal(e){return e.hasAdditionalSeatsOption?e.seatPrice*Math.abs(this.additionalSeats||0):0}get subtotal(){let e=this.selectedPlan.basePrice;return this.selectedPlan.hasAdditionalSeatsOption&&this.additionalSeats&&(e+=this.seatTotal(this.selectedPlan)),this.selectedPlan.hasAdditionalStorageOption&&this.additionalStorage&&(e+=this.additionalStorageTotal(this.selectedPlan)),this.selectedPlan.hasPremiumAccessOption&&this.premiumAccessAddon&&(e+=this.selectedPlan.premiumAccessOptionPrice),e-this.discount}get freeTrial(){return null!=this.selectedPlan.trialPeriodDays}get taxCharges(){return null!=this.taxComponent&&null!=this.taxComponent.taxRate?this.taxComponent.taxRate/100*this.subtotal:0}get total(){return this.subtotal+this.taxCharges||0}get paymentDesc(){return this.acceptingSponsorship?this.i18nService.t("paymentSponsored"):this.freeTrial&&this.createOrganization?this.i18nService.t("paymentChargedWithTrial"):this.i18nService.t("paymentCharged",this.i18nService.t(this.selectedPlanInterval))}changedProduct(){this.plan=this.selectablePlans[0].type,this.selectedPlan.hasPremiumAccessOption||(this.premiumAccessAddon=!1),this.selectedPlan.hasAdditionalStorageOption||(this.additionalStorage=0),this.selectedPlan.hasAdditionalSeatsOption?this.additionalSeats||this.selectedPlan.baseSeats||!this.selectedPlan.hasAdditionalSeatsOption||(this.additionalSeats=1):this.additionalSeats=0}changedOwnedBusiness(){this.ownedBusiness&&!this.selectedPlan.canBeUsedByBusiness&&(this.product=l.ProductType.Teams,this.plan=a.PlanType.TeamsAnnually)}changedCountry(){this.paymentComponent.hideBank="US"!==this.taxComponent.taxInfo.country,this.paymentComponent.hideBank&&this.paymentComponent.method===o.PaymentMethodType.BankAccount&&(this.paymentComponent.method=o.PaymentMethodType.Card,this.paymentComponent.changeMethod())}cancel(){this.onCanceled.emit()}submit(){return i(this,void 0,void 0,(function*(){if(this.singleOrgPolicyBlock=yield this.userHasBlockingSingleOrgPolicy(),!this.singleOrgPolicyBlock)try{const e=()=>i(this,void 0,void 0,(function*(){let e=null;if(this.createOrganization){const t=yield this.cryptoService.makeShareKey(),n=t[0].encryptedString,i=(yield this.cryptoService.encrypt(this.i18nService.t("defaultCollection"),t[1])).encryptedString,r=yield this.cryptoService.makeKeyPair(t[1]);e=this.selfHosted?yield this.createSelfHosted(n,i,r):yield this.createCloudHosted(n,i,r,t[1]),this.platformUtilsService.showToast("success",this.i18nService.t("organizationCreated"),this.i18nService.t("organizationReadyToGo"))}else e=yield this.updateOrganization(e),this.platformUtilsService.showToast("success",null,this.i18nService.t("organizationUpgraded"));return yield this.apiService.refreshIdentityToken(),yield this.syncService.fullSync(!0),this.acceptingSponsorship||this.router.navigate(["/organizations/"+e]),e}));this.formPromise=e();const t=yield this.formPromise;this.onSuccess.emit({organizationId:t}),this.messagingService.send("organizationCreated",t)}catch(e){this.logService.error(e)}}))}userHasBlockingSingleOrgPolicy(){return i(this,void 0,void 0,(function*(){return this.policyService.policyAppliesToUser(s.PolicyType.SingleOrg)}))}updateOrganization(e){return i(this,void 0,void 0,(function*(){const e=new p.OrganizationUpgradeRequest;e.businessName=this.ownedBusiness?this.businessName:null,e.additionalSeats=this.additionalSeats,e.additionalStorageGb=this.additionalStorage,e.premiumAccessAddon=this.selectedPlan.hasPremiumAccessOption&&this.premiumAccessAddon,e.planType=this.selectedPlan.type,e.billingAddressCountry=this.taxComponent.taxInfo.country,e.billingAddressPostalCode=this.taxComponent.taxInfo.postalCode;if(!(yield this.organizationService.get(this.organizationId)).hasPublicAndPrivateKeys){const t=yield this.cryptoService.getOrgKey(this.organizationId),n=yield this.cryptoService.makeKeyPair(t);e.keys=new d.OrganizationKeysRequest(n[0],n[1].encryptedString)}const t=yield this.apiService.postOrganizationUpgrade(this.organizationId,e);return t.success||null==t.paymentIntentClientSecret||(yield this.paymentComponent.handleStripeCardPayment(t.paymentIntentClientSecret,null)),this.organizationId}))}createCloudHosted(e,t,n,r){return i(this,void 0,void 0,(function*(){const i=new c.OrganizationCreateRequest;if(i.key=e,i.collectionName=t,i.name=this.name,i.billingEmail=this.billingEmail,i.keys=new d.OrganizationKeysRequest(n[0],n[1].encryptedString),this.selectedPlan.type===a.PlanType.Free)i.planType=a.PlanType.Free;else{const e=yield this.paymentComponent.createPaymentToken();i.paymentToken=e[0],i.paymentMethodType=e[1],i.businessName=this.ownedBusiness?this.businessName:null,i.additionalSeats=this.additionalSeats,i.additionalStorageGb=this.additionalStorage,i.premiumAccessAddon=this.selectedPlan.hasPremiumAccessOption&&this.premiumAccessAddon,i.planType=this.selectedPlan.type,i.billingAddressPostalCode=this.taxComponent.taxInfo.postalCode,i.billingAddressCountry=this.taxComponent.taxInfo.country,this.taxComponent.taxInfo.includeTaxId&&(i.taxIdNumber=this.taxComponent.taxInfo.taxId,i.billingAddressLine1=this.taxComponent.taxInfo.line1,i.billingAddressLine2=this.taxComponent.taxInfo.line2,i.billingAddressCity=this.taxComponent.taxInfo.city,i.billingAddressState=this.taxComponent.taxInfo.state)}if(this.providerId){const e=new u.ProviderOrganizationCreateRequest(this.clientOwnerEmail,i),t=yield this.cryptoService.getProviderKey(this.providerId);e.organizationCreateRequest.key=(yield this.cryptoService.encrypt(r.key,t)).encryptedString;return(yield this.apiService.postProviderCreateOrganization(this.providerId,e)).organizationId}return(yield this.apiService.postOrganization(i)).id}))}createSelfHosted(e,t,n){return i(this,void 0,void 0,(function*(){const i=document.getElementById("file").files;if(null==i||0===i.length)throw new Error(this.i18nService.t("selectFile"));const r=new FormData;r.append("license",i[0]),r.append("key",e),r.append("collectionName",t);const o=(yield this.apiService.postOrganizationLicense(r)).id,a=new d.OrganizationKeysRequest(n[0],n[1].encryptedString);return yield this.apiService.postOrganizationKeys(o,a),o}))}}t.OrganizationPlansComponent=Ve,Ve.ɵfac=function(e){return new(e||Ve)(v.ɵɵdirectiveInject(f.ApiService),v.ɵɵdirectiveInject(g.I18nService),v.ɵɵdirectiveInject(y.PlatformUtilsService),v.ɵɵdirectiveInject(x.CryptoService),v.ɵɵdirectiveInject(S.Router),v.ɵɵdirectiveInject(b.SyncService),v.ɵɵdirectiveInject(w.PolicyService),v.ɵɵdirectiveInject(C.OrganizationService),v.ɵɵdirectiveInject(I.LogService),v.ɵɵdirectiveInject(E.MessagingService))},Ve.ɵcmp=v.ɵɵdefineComponent({type:Ve,selectors:[["app-organization-plans"]],viewQuery:function(e,t){if(1&e&&(v.ɵɵviewQuery(m.PaymentComponent,5),v.ɵɵviewQuery(h.TaxInfoComponent,5)),2&e){let e;v.ɵɵqueryRefresh(e=v.ɵɵloadQuery())&&(t.paymentComponent=e.first),v.ɵɵqueryRefresh(e=v.ɵɵloadQuery())&&(t.taxComponent=e.first)}},inputs:{organizationId:"organizationId",showFree:"showFree",showCancel:"showCancel",acceptingSponsorship:"acceptingSponsorship",product:"product",plan:"plan",providerId:"providerId"},outputs:{onSuccess:"onSuccess",onCanceled:"onCanceled"},decls:6,vars:3,consts:[[4,"ngIf"],["ngNativeValidate","",3,"appApiAction","ngSubmit",4,"ngIf"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"form-group"],["for","file"],["type","file","id","file","name","file","required","",1,"form-control-file"],[1,"form-text","text-muted"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[1,"mt-5"],["class","row",4,"ngIf"],["class","form-check form-check-block",4,"ngFor","ngForOf"],["class","mt-4",4,"ngIf"],[1,"mt-4"],["type","button","class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"row"],[1,"form-group","col-6"],["for","name"],["id","name","type","text","name","Name","required","",1,"form-control",3,"ngModel","ngModelChange"],["for","billingEmail"],["id","billingEmail","type","text","name","BillingEmail","required","",1,"form-control",3,"ngModel","ngModelChange"],["class","form-group col-6",4,"ngIf"],["for","email"],["id","email","type","text","name","Email","required","",1,"form-control",3,"ngModel","ngModelChange"],[1,"text-muted"],[1,"form-group","form-check"],["id","ownedBusiness","type","checkbox","name","OwnedBusiness",1,"form-check-input",3,"ngModel","ngModelChange","change"],["for","ownedBusiness",1,"form-check-label"],["for","businessName"],["id","businessName","type","text","name","BusinessName",1,"form-control",3,"ngModel","ngModelChange"],[1,"form-check","form-check-block"],["type","radio","name","product",1,"form-check-input",3,"id","value","ngModel","ngModelChange","change"],[1,"form-check-label",3,"for"],[1,"mb-1"],[4,"ngIf","ngIfElse"],["fullFeatureList",""],["for","additionalStorage"],["id","additionalStorage","type","number","name","AdditionalStorageGb","min","0","max","99","step","1",1,"form-control",3,"ngModel","placeholder","ngModelChange"],[1,"text-muted","form-text"],[1,"spaced-header"],[1,"my-3"],[1,"spaced-header","mb-4"],[1,"text-muted","font-italic","mb-3","d-block"],[3,"hideCredit",4,"ngIf"],[3,"onCountryChanged"],["id","price",1,"my-4"],[1,"text-muted","text-sm"],[1,"my-1","col-3","ml-0"],[1,"text-lg"],[1,"col-6"],["for","additionalSeats"],["id","additionalSeats","type","number","name","AdditionalSeats","min","1","max","100000","required","",1,"form-control",3,"ngModel","placeholder","ngModelChange"],["id","additionalSeats","type","number","name","AdditionalSeats","min","0","max","100000",1,"form-control",3,"ngModel","placeholder","ngModelChange"],[1,"form-check"],["id","premiumAccess","type","checkbox","name","PremiumAccessAddon",1,"form-check-input",3,"ngModel","ngModelChange"],["for","premiumAccess",1,"form-check-label","bold"],["type","radio","name","BillingInterval",1,"form-check-input",3,"id","value","ngModel","ngModelChange"],["notAcceptingSponsorship",""],[2,"text-decoration","line-through"],[3,"hideCredit"],[3,"showMethods"],[3,"type"],["type","button",1,"btn","btn-outline-secondary",3,"click"]],template:function(e,t){1&e&&(v.ɵɵtemplate(0,D,9,6,"ng-container",0),v.ɵɵtext(1,"\n"),v.ɵɵtemplate(2,R,33,18,"ng-container",0),v.ɵɵtext(3,"\n"),v.ɵɵtemplate(4,Ue,36,20,"form",1),v.ɵɵtext(5,"\n")),2&e&&(v.ɵɵproperty("ngIf",t.loading),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",t.createOrganization&&t.selfHosted),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",!t.loading&&!t.selfHosted&&t.plans))},directives:[P.NgIf,O.NgControlStatusGroup,O.NgForm,k.ApiActionDirective,P.NgForOf,O.DefaultValueAccessor,O.RequiredValidator,O.NgControlStatus,O.NgModel,O.CheckboxControlValueAccessor,O.RadioControlValueAccessor,O.MinValidator,O.MaxValidator,O.NumberValueAccessor,A.TaxInfoComponent,T.PaymentComponent,M.CalloutComponent],pipes:[B.I18nPipe,P.CurrencyPipe],encapsulation:2})},88691:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.PaymentMethodComponent=void 0;n(68012),n(91674),n(51554),n(73828);const r=n(98523),o=n(32621),a=n(91674),s=n(51554),l=n(73828),c=n(68012),d=n(57490),p=n(52767),u=n(449),m=n(55732),h=n(99729),v=function(e){return{"bwi-spin":e}};function f(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"button",3),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext().load()})),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",4),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext();o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngClass",o.ɵɵpureFunction1(5,v,e.loading)),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,3,"refresh"),"\n ")}}function g(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",5),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",6),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function y(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"button",12),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).addCredit()})),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()}2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"addCredit"),"\n "))}function x(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"app-add-credit",13),o.ɵɵlistener("onAdded",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).closeAddCredit(!0)}))("onCanceled",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).closeAddCredit(!1)})),o.ɵɵtext(1,"\n "),o.ɵɵelementEnd()}}function S(e,t){1&e&&(o.ɵɵelementStart(0,"p"),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(2,1,"noPaymentMethod")))}function b(e,t){1&e&&(o.ɵɵelementStart(0,"span"),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(2,1,"inAppPurchase")))}const w=function(e,t,n,i,r,o){return{"bwi-credit-card":e,"bwi-bank":t,"bwi-money":n,"bwi-paypal text-primary":i,"bwi-apple text-muted":r,"bwi-google text-muted":o}};function C(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"p"),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"i",14),o.ɵɵtext(5,"\n "),o.ɵɵtemplate(6,b,3,3,"span",2),o.ɵɵtext(7),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(4),o.ɵɵproperty("ngClass",o.ɵɵpureFunction6(3,w,e.paymentSource.type===e.paymentMethodType.Card,e.paymentSource.type===e.paymentMethodType.BankAccount,e.paymentSource.type===e.paymentMethodType.Check,e.paymentSource.type===e.paymentMethodType.PayPal,e.paymentSource.type===e.paymentMethodType.AppleInApp,e.paymentSource.type===e.paymentMethodType.GoogleInApp)),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.paymentSourceInApp),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",e.paymentSource.description,"\n ")}}function I(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"button",12),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).changePayment()})),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,e.paymentSource?"changePaymentMethod":"addPaymentMethod"),"\n ")}}function E(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"app-adjust-payment",15),o.ɵɵlistener("onAdjusted",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).closePayment(!0)}))("onCanceled",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).closePayment(!1)})),o.ɵɵtext(1,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext(2);o.ɵɵproperty("currentType",null!=e.paymentSource?e.paymentSource.type:null)}}function P(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h2"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"p",7),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"strong"),o.ɵɵtext(9),o.ɵɵpipe(10,"currency"),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementStart(13,"p"),o.ɵɵtext(14),o.ɵɵpipe(15,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵtemplate(17,y,3,3,"button",8),o.ɵɵtext(18,"\n "),o.ɵɵtemplate(19,x,2,0,"app-add-credit",9),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"h2",10),o.ɵɵtext(22),o.ɵɵpipe(23,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵtemplate(25,S,3,3,"p",2),o.ɵɵtext(26,"\n "),o.ɵɵtemplate(27,C,9,10,"ng-container",2),o.ɵɵtext(28,"\n "),o.ɵɵtemplate(29,I,3,3,"button",8),o.ɵɵtext(30,"\n "),o.ɵɵtemplate(31,E,2,1,"app-adjust-payment",11),o.ɵɵtext(32,"\n"),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,10,e.isCreditBalance?"accountCredit":"accountBalance")),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind2(10,12,e.creditOrBalance,"$")),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(15,15,"creditAppliedDesc")),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!e.showAddCredit),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.showAddCredit),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(23,17,"paymentMethod")),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!e.paymentSource),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.paymentSource),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.showAdjustPayment),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.showAdjustPayment)}}class O{constructor(e,t,n,i){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.router=i,this.loading=!1,this.firstLoaded=!1,this.showAdjustPayment=!1,this.showAddCredit=!1,this.paymentMethodType=r.PaymentMethodType}ngOnInit(){return i(this,void 0,void 0,(function*(){this.platformUtilsService.isSelfHost()&&this.router.navigate(["/settings/subscription"]),yield this.load(),this.firstLoaded=!0}))}load(){return i(this,void 0,void 0,(function*(){this.loading||(this.loading=!0,this.billing=yield this.apiService.getUserBillingPayment(),this.loading=!1)}))}addCredit(){this.paymentSourceInApp?this.platformUtilsService.showDialog(this.i18nService.t("cannotPerformInAppPurchase"),this.i18nService.t("addCredit"),null,null,"warning"):this.showAddCredit=!0}closeAddCredit(e){this.showAddCredit=!1,e&&this.load()}changePayment(){this.paymentSourceInApp?this.platformUtilsService.showDialog(this.i18nService.t("cannotPerformInAppPurchase"),this.i18nService.t("changePaymentMethod"),null,null,"warning"):this.showAdjustPayment=!0}closePayment(e){this.showAdjustPayment=!1,e&&this.load()}get isCreditBalance(){return null==this.billing||this.billing.balance<=0}get creditOrBalance(){return Math.abs(null!=this.billing?this.billing.balance:0)}get paymentSource(){return null!=this.billing?this.billing.paymentSource:null}get paymentSourceInApp(){return null!=this.paymentSource&&(this.paymentSource.type===r.PaymentMethodType.AppleInApp||this.paymentSource.type===r.PaymentMethodType.GoogleInApp)}}t.PaymentMethodComponent=O,O.ɵfac=function(e){return new(e||O)(o.ɵɵdirectiveInject(a.ApiService),o.ɵɵdirectiveInject(s.I18nService),o.ɵɵdirectiveInject(l.PlatformUtilsService),o.ɵɵdirectiveInject(c.Router))},O.ɵcmp=o.ɵɵdefineComponent({type:O,selectors:[["app-payment-method"]],decls:13,vars:6,consts:[[1,"tabbed-header","d-flex"],["bit-button","","buttonType","secondary","class","tw-ml-auto",3,"disabled","click",4,"ngIf"],[4,"ngIf"],["bit-button","","buttonType","secondary",1,"tw-ml-auto",3,"disabled","click"],["aria-hidden","true",1,"bwi","bwi-refresh","bwi-fw",3,"ngClass"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"text-lg"],["bit-button","","buttonType","secondary",3,"click",4,"ngIf"],[3,"onAdded","onCanceled",4,"ngIf"],[1,"spaced-header"],[3,"currentType","onAdjusted","onCanceled",4,"ngIf"],["bit-button","","buttonType","secondary",3,"click"],[3,"onAdded","onCanceled"],[1,"bwi","bwi-fw",3,"ngClass"],[3,"currentType","onAdjusted","onCanceled"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h1"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵtemplate(6,f,5,7,"button",1),o.ɵɵtext(7,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵtemplate(9,g,9,6,"ng-container",2),o.ɵɵtext(10,"\n"),o.ɵɵtemplate(11,P,33,19,"ng-container",2),o.ɵɵtext(12,"\n")),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,4,"paymentMethod"),"\n "),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",t.firstLoaded),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!t.firstLoaded&&t.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.billing))},directives:[d.NgIf,p.ButtonComponent,d.NgClass,u.AddCreditComponent,m.AdjustPaymentComponent],pipes:[h.I18nPipe,d.CurrencyPipe],encapsulation:2})},17337:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.PaymentComponent=void 0;n(91674),n(36631),n(73828);const r=n(98523),o=n(14538),a=n(83706),s=n(32621),l=n(73828),c=n(91674),d=n(36631),p=n(57490),u=n(96832),m=n(8863),h=n(51626),v=n(48198),f=n(99729);function g(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",3),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"input",9),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).method=t}))("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).changeMethod()})),s.ɵɵelementEnd(),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"label",10),s.ɵɵtext(5,"\n "),s.ɵɵelement(6,"i",11),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(2),s.ɵɵproperty("value",e.paymentMethodType.BankAccount)("ngModel",e.method),s.ɵɵadvance(5),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(8,3,"bankAccount"),"")}}function y(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",12),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"input",13),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).method=t}))("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).changeMethod()})),s.ɵɵelementEnd(),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"label",14),s.ɵɵtext(5,"\n "),s.ɵɵelement(6,"i",15),s.ɵɵtext(7," PayPal"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(2),s.ɵɵproperty("value",e.paymentMethodType.PayPal)("ngModel",e.method)}}function x(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",12),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"input",16),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).method=t}))("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).changeMethod()})),s.ɵɵelementEnd(),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"label",17),s.ɵɵtext(5,"\n "),s.ɵɵelement(6,"i",18),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(2),s.ɵɵproperty("value",e.paymentMethodType.Credit)("ngModel",e.method),s.ɵɵadvance(5),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(8,3,"accountCredit"),"")}}function S(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",2),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",3),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"input",4),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().method=t}))("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().changeMethod()})),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"label",5),s.ɵɵtext(7,"\n "),s.ɵɵelement(8,"i",6),s.ɵɵtext(9),s.ɵɵpipe(10,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵtemplate(13,g,10,5,"div",7),s.ɵɵtext(14,"\n "),s.ɵɵtemplate(15,y,9,2,"div",8),s.ɵɵtext(16,"\n "),s.ɵɵtemplate(17,x,10,5,"div",8),s.ɵɵtext(18,"\n"),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(4),s.ɵɵproperty("value",e.paymentMethodType.Card)("ngModel",e.method),s.ɵɵadvance(5),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(10,6,"creditCard"),""),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",!e.hideBank),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!e.hidePaypal),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!e.hideCredit)}}function b(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",19),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"div",20),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"label",21),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelement(10,"div",22),s.ɵɵtext(11,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"div",23),s.ɵɵtext(14,"\n "),s.ɵɵelement(15,"img",24),s.ɵɵtext(16,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(17,"\n "),s.ɵɵelementStart(18,"div",20),s.ɵɵtext(19,"\n "),s.ɵɵelementStart(20,"label",25),s.ɵɵtext(21),s.ɵɵpipe(22,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(23,"\n "),s.ɵɵelement(24,"div",26),s.ɵɵtext(25,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(26,"\n "),s.ɵɵelementStart(27,"div",20),s.ɵɵtext(28,"\n "),s.ɵɵelementStart(29,"div",27),s.ɵɵtext(30,"\n "),s.ɵɵelementStart(31,"label",28),s.ɵɵtext(32),s.ɵɵpipe(33,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(34,"\n "),s.ɵɵelementStart(35,"a",29),s.ɵɵpipe(36,"i18n"),s.ɵɵtext(37,"\n "),s.ɵɵelement(38,"i",30),s.ɵɵtext(39,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(40,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(41,"\n "),s.ɵɵelement(42,"div",31),s.ɵɵtext(43,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(44,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(45,"\n"),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,4,"number")),s.ɵɵadvance(14),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(22,6,"expiration")),s.ɵɵadvance(11),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(33,8,"securityCode"),"\n "),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(36,10,"learnMore")))}function w(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"app-callout",32),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4),s.ɵɵpipe(5,"i18n"),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"div",19),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"div",33),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"label",34),s.ɵɵtext(13),s.ɵɵpipe(14,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(15,"\n "),s.ɵɵelementStart(16,"input",35),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().bank.routing_number=t})),s.ɵɵelementEnd(),s.ɵɵtext(17,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"div",33),s.ɵɵtext(20,"\n "),s.ɵɵelementStart(21,"label",36),s.ɵɵtext(22),s.ɵɵpipe(23,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(24,"\n "),s.ɵɵelementStart(25,"input",37),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().bank.account_number=t})),s.ɵɵelementEnd(),s.ɵɵtext(26,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n "),s.ɵɵelementStart(28,"div",33),s.ɵɵtext(29,"\n "),s.ɵɵelementStart(30,"label",38),s.ɵɵtext(31),s.ɵɵpipe(32,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(33,"\n "),s.ɵɵelementStart(34,"input",39),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().bank.account_holder_name=t})),s.ɵɵelementEnd(),s.ɵɵtext(35,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(36,"\n "),s.ɵɵelementStart(37,"div",33),s.ɵɵtext(38,"\n "),s.ɵɵelementStart(39,"label",40),s.ɵɵtext(40),s.ɵɵpipe(41,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(42,"\n "),s.ɵɵelementStart(43,"select",41),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().bank.account_holder_type=t})),s.ɵɵtext(44,"\n "),s.ɵɵelementStart(45,"option",42),s.ɵɵtext(46),s.ɵɵpipe(47,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(48,"\n "),s.ɵɵelementStart(49,"option",43),s.ɵɵtext(50),s.ɵɵpipe(51,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(52,"\n "),s.ɵɵelementStart(53,"option",44),s.ɵɵtext(54),s.ɵɵpipe(55,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(56,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(57,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(58,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(59,"\n"),s.ɵɵelementContainerEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,14,"verifyBankAccount")),s.ɵɵadvance(2),s.ɵɵtextInterpolate2("\n ",s.ɵɵpipeBind1(5,16,"verifyBankAccountInitialDesc")," ",s.ɵɵpipeBind1(6,18,"verifyBankAccountFailureWarning"),"\n "),s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(14,20,"routingNumber")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.bank.routing_number),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(23,22,"accountNumber")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.bank.account_number),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(32,24,"accountHolderName")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.bank.account_holder_name),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(41,26,"bankAccountType")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.bank.account_holder_type),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("-- ",s.ɵɵpipeBind1(47,28,"select")," --"),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(51,30,"bankAccountTypeCompany")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(55,32,"bankAccountTypeIndividual"))}}function C(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",45),s.ɵɵtext(3,"\n "),s.ɵɵelement(4,"div",46),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"small",47),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n"),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,1,"paypalClickSubmit")))}function I(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"app-callout",48),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n"),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(4,1,"makeSureEnoughCredit"),"\n "))}const E=a.default.lightInputColor,P=a.default.lightInputPlaceholderColor,O=a.default.darkInputColor,k=a.default.darkInputPlaceholderColor;class A{constructor(e,t,n){this.platformUtilsService=e,this.apiService=t,this.logService=n,this.showMethods=!0,this.showOptions=!0,this.method=r.PaymentMethodType.Card,this.hideBank=!1,this.hidePaypal=!1,this.hideCredit=!1,this.bank={routing_number:null,account_number:null,account_holder_name:null,account_holder_type:"",currency:"USD",country:"US"},this.paymentMethodType=r.PaymentMethodType,this.btInstance=null,this.stripe=null,this.stripeElements=null,this.stripeCardNumberElement=null,this.stripeCardExpiryElement=null,this.stripeCardCvcElement=null,this.stripeScript=window.document.createElement("script"),this.stripeScript.src="https://js.stripe.com/v3/",this.stripeScript.async=!0,this.stripeScript.onload=()=>{this.stripe=window.Stripe("pk_live_bpN0P37nMxrMQkcaHXtAybJk"),this.stripeElements=this.stripe.elements(),this.setStripeElement()},this.btScript=window.document.createElement("script"),this.btScript.src="scripts/dropin.js?cache=y4t72",this.btScript.async=!0,this.StripeElementStyle={base:{color:null,fontFamily:'"Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontSize:"14px",fontSmoothing:"antialiased","::placeholder":{color:null}},invalid:{color:null}},this.StripeElementClasses={focus:"is-focused",empty:"is-empty",invalid:"is-invalid"}}ngOnInit(){return i(this,void 0,void 0,(function*(){this.showOptions||(this.hidePaypal=this.method!==r.PaymentMethodType.PayPal,this.hideBank=this.method!==r.PaymentMethodType.BankAccount,this.hideCredit=this.method!==r.PaymentMethodType.Credit),yield this.setTheme(),window.document.head.appendChild(this.stripeScript),this.hidePaypal||window.document.head.appendChild(this.btScript)}))}ngOnDestroy(){window.document.head.removeChild(this.stripeScript),window.setTimeout((()=>{Array.from(window.document.querySelectorAll("iframe")).forEach((e=>{if(null!=e.src&&e.src.indexOf("stripe")>-1)try{window.document.body.removeChild(e)}catch(t){this.logService.error(t)}}))}),500),this.hidePaypal||(window.document.head.removeChild(this.btScript),window.setTimeout((()=>{Array.from(window.document.head.querySelectorAll("script")).forEach((e=>{if(null!=e.src&&e.src.indexOf("paypal")>-1)try{window.document.head.removeChild(e)}catch(t){this.logService.error(t)}}));const e=window.document.head.querySelector("#braintree-dropin-stylesheet");if(null!=e)try{window.document.head.removeChild(e)}catch(t){this.logService.error(t)}}),500))}changeMethod(){this.btInstance=null,this.method===r.PaymentMethodType.PayPal?window.setTimeout((()=>{window.braintree.dropin.create({authorization:"production_qfbsv8kc_njj2zjtyngtjmbjd",container:"#bt-dropin-container",paymentOptionPriority:["paypal"],paypal:{flow:"vault",buttonStyle:{label:"pay",size:"medium",shape:"pill",color:"blue",tagline:"false"}}},((e,t)=>{null==e?this.btInstance=t:console.error(e)}))}),250):this.setStripeElement()}createPaymentToken(){return new Promise(((e,t)=>{this.method===r.PaymentMethodType.Credit?e([null,this.method]):this.method===r.PaymentMethodType.PayPal?this.btInstance.requestPaymentMethod().then((t=>{e([t.nonce,this.method])})).catch((e=>{t(e.message)})):this.method!==r.PaymentMethodType.Card&&this.method!==r.PaymentMethodType.BankAccount||(this.method===r.PaymentMethodType.Card?this.apiService.postSetupPayment().then((e=>this.stripe.handleCardSetup(e,this.stripeCardNumberElement))).then((n=>{n.error?t(n.error.message):n.setupIntent&&"succeeded"===n.setupIntent.status?e([n.setupIntent.payment_method,this.method]):t()})):this.stripe.createToken("bank_account",this.bank).then((n=>{n.error?t(n.error.message):n.token&&null!=n.token.id?e([n.token.id,this.method]):t()})))}))}handleStripeCardPayment(e,t){return new Promise(((n,r)=>{if(this.showMethods&&null==this.stripeCardNumberElement)return void r();return(()=>this.showMethods?this.stripe.handleCardSetup(e,this.stripeCardNumberElement):this.stripe.handleCardSetup(e))().then((e=>i(this,void 0,void 0,(function*(){e.error?r(e.error.message):e.paymentIntent&&"succeeded"===e.paymentIntent.status?(null!=t&&(yield t()),n()):r()}))))}))}setStripeElement(){window.setTimeout((()=>{this.showMethods&&this.method===r.PaymentMethodType.Card&&(null==this.stripeCardNumberElement&&(this.stripeCardNumberElement=this.stripeElements.create("cardNumber",{style:this.StripeElementStyle,classes:this.StripeElementClasses,placeholder:""})),null==this.stripeCardExpiryElement&&(this.stripeCardExpiryElement=this.stripeElements.create("cardExpiry",{style:this.StripeElementStyle,classes:this.StripeElementClasses})),null==this.stripeCardCvcElement&&(this.stripeCardCvcElement=this.stripeElements.create("cardCvc",{style:this.StripeElementStyle,classes:this.StripeElementClasses,placeholder:""})),this.stripeCardNumberElement.mount("#stripe-card-number-element"),this.stripeCardExpiryElement.mount("#stripe-card-expiry-element"),this.stripeCardCvcElement.mount("#stripe-card-cvc-element"))}),50)}setTheme(){return i(this,void 0,void 0,(function*(){(yield this.platformUtilsService.getEffectiveTheme())===o.ThemeType.Dark?(this.StripeElementStyle.base.color=O,this.StripeElementStyle.base["::placeholder"].color=k,this.StripeElementStyle.invalid.color=O):(this.StripeElementStyle.base.color=E,this.StripeElementStyle.base["::placeholder"].color=P,this.StripeElementStyle.invalid.color=E)}))}}t.PaymentComponent=A,A.ɵfac=function(e){return new(e||A)(s.ɵɵdirectiveInject(l.PlatformUtilsService),s.ɵɵdirectiveInject(c.ApiService),s.ɵɵdirectiveInject(d.LogService))},A.ɵcmp=s.ɵɵdefineComponent({type:A,selectors:[["app-payment"]],inputs:{showMethods:"showMethods",showOptions:"showOptions",method:"method",hideBank:"hideBank",hidePaypal:"hidePaypal",hideCredit:"hideCredit"},decls:10,vars:5,consts:[["class","mb-4 text-lg",4,"ngIf"],[4,"ngIf"],[1,"mb-4","text-lg"],[1,"form-check","form-check-inline","mr-4"],["type","radio","name","Method","id","method-card",1,"form-check-input",3,"value","ngModel","ngModelChange","change"],["for","method-card",1,"form-check-label"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-credit-card"],["class","form-check form-check-inline mr-4",4,"ngIf"],["class","form-check form-check-inline",4,"ngIf"],["type","radio","name","Method","id","method-bank",1,"form-check-input",3,"value","ngModel","ngModelChange","change"],["for","method-bank",1,"form-check-label"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-bank"],[1,"form-check","form-check-inline"],["type","radio","name","Method","id","method-paypal",1,"form-check-input",3,"value","ngModel","ngModelChange","change"],["for","method-paypal",1,"form-check-label"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-paypal"],["type","radio","name","Method","id","method-credit",1,"form-check-input",3,"value","ngModel","ngModelChange","change"],["for","method-credit",1,"form-check-label"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-dollar"],[1,"row"],[1,"form-group","col-4"],["for","stripe-card-number-element"],["id","stripe-card-number-element",1,"form-control","stripe-form-control"],[1,"form-group","col-8","d-flex","align-items-end"],["src","../../images/cards.png","alt","Visa, MasterCard, Discover, AmEx, JCB, Diners Club, UnionPay","width","323","height","32"],["for","stripe-card-expiry-element"],["id","stripe-card-expiry-element",1,"form-control","stripe-form-control"],[1,"d-flex"],["for","stripe-card-cvc-element"],["href","https://www.cvvnumber.com/cvv.html","tabindex","-1","target","_blank","rel","noopener noreferrer",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],["id","stripe-card-cvc-element",1,"form-control","stripe-form-control"],["type","warning",3,"title"],[1,"form-group","col-6"],["for","routing_number"],["id","routing_number","type","text","name","routing_number","required","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],["for","account_number"],["id","account_number","type","text","name","account_number","required","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],["for","account_holder_name"],["id","account_holder_name","type","text","name","account_holder_name","required","",1,"form-control",3,"ngModel","ngModelChange"],["for","account_holder_type"],["id","account_holder_type","name","account_holder_type","required","",1,"form-control",3,"ngModel","ngModelChange"],["value",""],["value","company"],["value","individual"],[1,"mb-3"],["id","bt-dropin-container",1,"mb-1"],[1,"text-muted"],["type","note"]],template:function(e,t){1&e&&(s.ɵɵtemplate(0,S,19,8,"div",0),s.ɵɵtext(1,"\n"),s.ɵɵtemplate(2,b,46,12,"ng-container",1),s.ɵɵtext(3,"\n"),s.ɵɵtemplate(4,w,60,34,"ng-container",1),s.ɵɵtext(5,"\n"),s.ɵɵtemplate(6,C,11,3,"ng-container",1),s.ɵɵtext(7,"\n"),s.ɵɵtemplate(8,I,6,3,"ng-container",1),s.ɵɵtext(9,"\n")),2&e&&(s.ɵɵproperty("ngIf",t.showOptions&&t.showMethods),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.showMethods&&t.method===t.paymentMethodType.Card),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.showMethods&&t.method===t.paymentMethodType.BankAccount),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.showMethods&&t.method===t.paymentMethodType.PayPal),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.showMethods&&t.method===t.paymentMethodType.Credit))},directives:[p.NgIf,u.RadioControlValueAccessor,u.DefaultValueAccessor,u.NgControlStatus,u.NgModel,m.A11yTitleDirective,h.CalloutComponent,u.RequiredValidator,v.InputVerbatimDirective,u.SelectControlValueAccessor,u.NgSelectOption,u.ɵNgSelectMultipleOption],pipes:[f.I18nPipe],encapsulation:2})},28964:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.PreferencesComponent=void 0;const r=n(96832),o=(n(51554),n(45552),n(73828),n(73569),n(82656),n(14538)),a=n(82769),s=n(32621),l=n(73569),c=n(51554),d=n(82656),p=n(73828),u=n(45552),m=n(96832),h=n(81397),v=n(8863),f=n(57490),g=n(99729);function y(e,t){if(1&e&&(s.ɵɵelementStart(0,"option",31),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){const e=t.$implicit;s.ɵɵproperty("ngValue",e.value),s.ɵɵadvance(1),s.ɵɵtextInterpolate(e.name)}}function x(e,t){if(1&e&&(s.ɵɵelementStart(0,"option",31),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){const e=t.$implicit;s.ɵɵproperty("ngValue",e.value),s.ɵɵadvance(1),s.ɵɵtextInterpolate(e.name)}}class S{constructor(e,t,n,i,s){this.stateService=e,this.i18nService=t,this.vaultTimeoutService=n,this.platformUtilsService=i,this.messagingService=s,this.vaultTimeoutAction="lock",this.vaultTimeout=new r.FormControl(null),this.vaultTimeouts=[{name:t.t("oneMinute"),value:1},{name:t.t("fiveMinutes"),value:5},{name:t.t("fifteenMinutes"),value:15},{name:t.t("thirtyMinutes"),value:30},{name:t.t("oneHour"),value:60},{name:t.t("fourHours"),value:240},{name:t.t("onRefresh"),value:-1}],this.platformUtilsService.isDev()&&this.vaultTimeouts.push({name:t.t("never"),value:null});const l=[];t.supportedTranslationLocales.forEach((e=>{let n=e;t.localeNames.has(e)&&(n+=" - "+t.localeNames.get(e)),l.push({name:n,value:e})})),l.sort(a.Utils.getSortFunction(t,"name")),l.splice(0,0,{name:t.t("default"),value:null}),this.localeOptions=l,this.themeOptions=[{name:t.t("themeLight"),value:o.ThemeType.Light},{name:t.t("themeDark"),value:o.ThemeType.Dark},{name:t.t("themeSystem"),value:o.ThemeType.System}]}ngOnInit(){var e;return i(this,void 0,void 0,(function*(){this.vaultTimeout.setValue(yield this.vaultTimeoutService.getVaultTimeout()),this.vaultTimeoutAction=yield this.stateService.getVaultTimeoutAction(),this.disableIcons=yield this.stateService.getDisableFavicon(),this.enableGravatars=yield this.stateService.getEnableGravitars(),this.enableFullWidth=yield this.stateService.getEnableFullWidth(),this.locale=null!==(e=yield this.stateService.getLocale())&&void 0!==e?e:null,this.startingLocale=this.locale,this.theme=yield this.stateService.getTheme(),this.startingTheme=this.theme}))}submit(){return i(this,void 0,void 0,(function*(){if(this.vaultTimeout.valid){if(yield this.vaultTimeoutService.setVaultTimeoutOptions(this.vaultTimeout.value,this.vaultTimeoutAction),yield this.stateService.setDisableFavicon(this.disableIcons),yield this.stateService.setEnableGravitars(this.enableGravatars),yield this.stateService.setEnableFullWidth(this.enableFullWidth),this.messagingService.send("setFullWidth"),this.theme!==this.startingTheme){yield this.stateService.setTheme(this.theme),this.startingTheme=this.theme;const e=yield this.platformUtilsService.getEffectiveTheme(),t=window.document.documentElement;t.classList.remove("theme_"+o.ThemeType.Light,"theme_"+o.ThemeType.Dark),t.classList.add("theme_"+e)}yield this.stateService.setLocale(this.locale),this.locale!==this.startingLocale?window.location.reload():this.platformUtilsService.showToast("success",null,this.i18nService.t("preferencesUpdated"))}else this.platformUtilsService.showToast("error",null,this.i18nService.t("vaultTimeoutToLarge"))}))}vaultTimeoutActionChanged(e){return i(this,void 0,void 0,(function*(){if("logOut"===e){if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("vaultTimeoutLogOutConfirmation"),this.i18nService.t("vaultTimeoutLogOutConfirmationTitle"),this.i18nService.t("yes"),this.i18nService.t("cancel"),"warning")))return void(this.vaultTimeoutAction="lock")}this.vaultTimeoutAction=e}))}}t.PreferencesComponent=S,S.ɵfac=function(e){return new(e||S)(s.ɵɵdirectiveInject(l.StateService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(d.VaultTimeoutService),s.ɵɵdirectiveInject(p.PlatformUtilsService),s.ɵɵdirectiveInject(u.MessagingService))},S.ɵcmp=s.ɵɵdefineComponent({type:S,selectors:[["app-preferences"]],decls:173,vars:74,consts:[[1,"page-header"],["ngNativeValidate","",3,"ngSubmit"],[1,"row"],[1,"col-6"],["ngDefaultControl","",3,"vaultTimeouts","formControl"],[1,"form-group"],[1,"form-check","form-check-block"],["type","radio","name","vaultTimeoutAction","id","vaultTimeoutActionLock","value","lock",1,"form-check-input",3,"ngModel","ngModelChange"],["for","vaultTimeoutActionLock",1,"form-check-label"],[1,"form-check","mt-2","form-check-block"],["type","radio","name","vaultTimeoutAction","id","vaultTimeoutActionLogOut","value","logOut",1,"form-check-input",3,"ngModel","ngModelChange"],["for","vaultTimeoutActionLogOut",1,"form-check-label"],[1,"d-flex"],["for","locale"],["href","https://bitwarden.com/help/localization/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],["id","locale","name","Locale",1,"form-control",3,"ngModel","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"form-text","text-muted"],[1,"form-check"],["type","checkbox","id","disableIcons","name","DisableIcons",1,"form-check-input",3,"ngModel","ngModelChange"],["for","disableIcons",1,"form-check-label"],["href","https://bitwarden.com/help/website-icons/","target","_blank","rel","noopener",3,"appA11yTitle"],["type","checkbox","id","enableGravatars","name","enableGravatars",1,"form-check-input",3,"ngModel","ngModelChange"],["for","enableGravatars",1,"form-check-label"],["href","https://gravatar.com/","target","_blank","rel","noopener",3,"appA11yTitle"],["type","checkbox","id","enableFullWidth","name","enableFullWidth",1,"form-check-input",3,"ngModel","ngModelChange"],["for","enableFullWidth",1,"form-check-label"],["for","theme"],["id","theme","name","theme",1,"form-control",3,"ngModel","ngModelChange"],["type","submit",1,"btn","btn-primary"],[3,"ngValue"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"h1"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n"),s.ɵɵelementStart(7,"p"),s.ɵɵtext(8),s.ɵɵpipe(9,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n"),s.ɵɵelementStart(11,"form",1),s.ɵɵlistener("ngSubmit",(function(){return t.submit()})),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"div",2),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"div",3),s.ɵɵtext(16,"\n "),s.ɵɵelementStart(17,"app-vault-timeout-input",4),s.ɵɵtext(18,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(19,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementStart(22,"div",5),s.ɵɵtext(23,"\n "),s.ɵɵelementStart(24,"label"),s.ɵɵtext(25),s.ɵɵpipe(26,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n "),s.ɵɵelementStart(28,"div",6),s.ɵɵtext(29,"\n "),s.ɵɵelementStart(30,"input",7),s.ɵɵlistener("ngModelChange",(function(e){return t.vaultTimeoutAction=e})),s.ɵɵelementEnd(),s.ɵɵtext(31,"\n "),s.ɵɵelementStart(32,"label",8),s.ɵɵtext(33),s.ɵɵpipe(34,"i18n"),s.ɵɵelementStart(35,"small"),s.ɵɵtext(36),s.ɵɵpipe(37,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(38,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(39,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(40,"\n "),s.ɵɵelementStart(41,"div",9),s.ɵɵtext(42,"\n "),s.ɵɵelementStart(43,"input",10),s.ɵɵlistener("ngModelChange",(function(e){return t.vaultTimeoutAction=e}))("ngModelChange",(function(e){return t.vaultTimeoutActionChanged(e)})),s.ɵɵelementEnd(),s.ɵɵtext(44,"\n "),s.ɵɵelementStart(45,"label",11),s.ɵɵtext(46),s.ɵɵpipe(47,"i18n"),s.ɵɵelementStart(48,"small"),s.ɵɵtext(49),s.ɵɵpipe(50,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(51,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(52,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(53,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(54,"\n "),s.ɵɵelementStart(55,"div",2),s.ɵɵtext(56,"\n "),s.ɵɵelementStart(57,"div",3),s.ɵɵtext(58,"\n "),s.ɵɵelementStart(59,"div",5),s.ɵɵtext(60,"\n "),s.ɵɵelementStart(61,"div",12),s.ɵɵtext(62,"\n "),s.ɵɵelementStart(63,"label",13),s.ɵɵtext(64),s.ɵɵpipe(65,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(66,"\n "),s.ɵɵelementStart(67,"a",14),s.ɵɵpipe(68,"i18n"),s.ɵɵtext(69,"\n "),s.ɵɵelement(70,"i",15),s.ɵɵtext(71,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(72,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(73,"\n "),s.ɵɵelementStart(74,"select",16),s.ɵɵlistener("ngModelChange",(function(e){return t.locale=e})),s.ɵɵtext(75,"\n "),s.ɵɵtemplate(76,y,2,2,"option",17),s.ɵɵtext(77,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(78,"\n "),s.ɵɵelementStart(79,"small",18),s.ɵɵtext(80),s.ɵɵpipe(81,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(82,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(83,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(84,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(85,"\n "),s.ɵɵelementStart(86,"div",5),s.ɵɵtext(87,"\n "),s.ɵɵelementStart(88,"div",19),s.ɵɵtext(89,"\n "),s.ɵɵelementStart(90,"input",20),s.ɵɵlistener("ngModelChange",(function(e){return t.disableIcons=e})),s.ɵɵelementEnd(),s.ɵɵtext(91,"\n "),s.ɵɵelementStart(92,"label",21),s.ɵɵtext(93),s.ɵɵpipe(94,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(95,"\n "),s.ɵɵelementStart(96,"a",22),s.ɵɵpipe(97,"i18n"),s.ɵɵtext(98,"\n "),s.ɵɵelement(99,"i",15),s.ɵɵtext(100,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(101,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(102,"\n "),s.ɵɵelementStart(103,"small",18),s.ɵɵtext(104),s.ɵɵpipe(105,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(106,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(107,"\n "),s.ɵɵelementStart(108,"div",5),s.ɵɵtext(109,"\n "),s.ɵɵelementStart(110,"div",19),s.ɵɵtext(111,"\n "),s.ɵɵelementStart(112,"input",23),s.ɵɵlistener("ngModelChange",(function(e){return t.enableGravatars=e})),s.ɵɵelementEnd(),s.ɵɵtext(113,"\n "),s.ɵɵelementStart(114,"label",24),s.ɵɵtext(115),s.ɵɵpipe(116,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(117,"\n "),s.ɵɵelementStart(118,"a",25),s.ɵɵpipe(119,"i18n"),s.ɵɵtext(120,"\n "),s.ɵɵelement(121,"i",15),s.ɵɵtext(122,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(123,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(124,"\n "),s.ɵɵelementStart(125,"small",18),s.ɵɵtext(126),s.ɵɵpipe(127,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(128,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(129,"\n "),s.ɵɵelementStart(130,"div",5),s.ɵɵtext(131,"\n "),s.ɵɵelementStart(132,"div",19),s.ɵɵtext(133,"\n "),s.ɵɵelementStart(134,"input",26),s.ɵɵlistener("ngModelChange",(function(e){return t.enableFullWidth=e})),s.ɵɵelementEnd(),s.ɵɵtext(135,"\n "),s.ɵɵelementStart(136,"label",27),s.ɵɵtext(137),s.ɵɵpipe(138,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(139,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(140,"\n "),s.ɵɵelementStart(141,"small",18),s.ɵɵtext(142),s.ɵɵpipe(143,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(144,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(145,"\n "),s.ɵɵelementStart(146,"div",2),s.ɵɵtext(147,"\n "),s.ɵɵelementStart(148,"div",3),s.ɵɵtext(149,"\n "),s.ɵɵelementStart(150,"div",5),s.ɵɵtext(151,"\n "),s.ɵɵelementStart(152,"label",28),s.ɵɵtext(153),s.ɵɵpipe(154,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(155,"\n "),s.ɵɵelementStart(156,"select",29),s.ɵɵlistener("ngModelChange",(function(e){return t.theme=e})),s.ɵɵtext(157,"\n "),s.ɵɵtemplate(158,x,2,2,"option",17),s.ɵɵtext(159,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(160,"\n "),s.ɵɵelementStart(161,"small",18),s.ɵɵtext(162),s.ɵɵpipe(163,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(164,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(165,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(166,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(167,"\n "),s.ɵɵelementStart(168,"button",30),s.ɵɵtext(169),s.ɵɵpipe(170,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(171,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(172,"\n")),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,32,"preferences")),s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(9,34,"preferencesDesc")),s.ɵɵadvance(9),s.ɵɵproperty("vaultTimeouts",t.vaultTimeouts)("formControl",t.vaultTimeout),s.ɵɵadvance(8),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(26,36,"vaultTimeoutAction")),s.ɵɵadvance(5),s.ɵɵproperty("ngModel",t.vaultTimeoutAction),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(34,38,"lock"),"\n "),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(37,40,"vaultTimeoutActionLockDesc")),s.ɵɵadvance(7),s.ɵɵproperty("ngModel",t.vaultTimeoutAction),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(47,42,"logOut"),"\n "),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(50,44,"vaultTimeoutActionLogOutDesc")),s.ɵɵadvance(15),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(65,46,"language")),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(68,48,"learnMore")),s.ɵɵadvance(7),s.ɵɵproperty("ngModel",t.locale),s.ɵɵadvance(2),s.ɵɵproperty("ngForOf",t.localeOptions),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(81,50,"languageDesc")),s.ɵɵadvance(10),s.ɵɵproperty("ngModel",t.disableIcons),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(94,52,"disableIcons"),"\n "),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(97,54,"learnMore")),s.ɵɵadvance(8),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(105,56,"disableIconsDesc")),s.ɵɵadvance(8),s.ɵɵproperty("ngModel",t.enableGravatars),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(116,58,"enableGravatars"),"\n "),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(119,60,"learnMore")),s.ɵɵadvance(8),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(127,62,"enableGravatarsDesc")),s.ɵɵadvance(8),s.ɵɵproperty("ngModel",t.enableFullWidth),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(138,64,"enableFullWidth"),"\n "),s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(143,66,"enableFullWidthDesc")),s.ɵɵadvance(11),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(154,68,"theme")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",t.theme),s.ɵɵadvance(2),s.ɵɵproperty("ngForOf",t.themeOptions),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(163,70,"themeDesc")),s.ɵɵadvance(7),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(170,72,"save"),"\n "))},directives:[m.NgControlStatusGroup,m.NgForm,h.VaultTimeoutInputComponent,m.DefaultValueAccessor,m.NgControlStatus,m.FormControlDirective,m.RadioControlValueAccessor,m.NgModel,v.A11yTitleDirective,m.SelectControlValueAccessor,f.NgForOf,m.CheckboxControlValueAccessor,m.NgSelectOption,m.ɵNgSelectMultipleOption],pipes:[g.I18nPipe],encapsulation:2})},28800:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.PremiumComponent=void 0;n(68012),n(91674),n(51554),n(36631),n(45552),n(73828),n(73569),n(9724),n(30694);const r=n(17337),o=n(41799),a=n(32621),s=n(91674),l=n(51554),c=n(73828),d=n(30694),p=n(68012),u=n(45552),m=n(9724),h=n(36631),v=n(73569),f=n(57490),g=n(20138),y=n(52767),x=n(96832),S=n(56820),b=n(17337),w=n(41799),C=n(99729);function I(e,t){1&e&&(a.ɵɵelementStart(0,"div",10),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"h1"),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,1,"subscription")))}function E(e,t){1&e&&(a.ɵɵelementStart(0,"div",11),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"h1"),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,1,"goPremium")))}function P(e,t){1&e&&(a.ɵɵelementStart(0,"bit-callout",12),a.ɵɵpipe(1,"i18n"),a.ɵɵtext(2),a.ɵɵpipe(3,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(1,2,"youHavePremiumAccess")),a.ɵɵadvance(2),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(3,4,"alreadyPremiumFromOrg"),"\n"))}function O(e,t){1&e&&(a.ɵɵelementStart(0,"a",13),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(2,1,"purchasePremium"),"\n "))}function k(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"p"),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"form",14,15),a.ɵɵlistener("ngSubmit",(function(){a.ɵɵrestoreView(e);return a.ɵɵnextContext().submit()})),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"div",16),a.ɵɵtext(10,"\n "),a.ɵɵelementStart(11,"label",17),a.ɵɵtext(12),a.ɵɵpipe(13,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelement(15,"input",18),a.ɵɵtext(16,"\n "),a.ɵɵelementStart(17,"small",19),a.ɵɵtext(18),a.ɵɵpipe(19,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(20,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(21,"\n "),a.ɵɵelementStart(22,"button",20),a.ɵɵtext(23,"\n "),a.ɵɵelement(24,"i",21),a.ɵɵpipe(25,"i18n"),a.ɵɵtext(26,"\n "),a.ɵɵelementStart(27,"span"),a.ɵɵtext(28),a.ɵɵpipe(29,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(30,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(31,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(32,"\n"),a.ɵɵelementContainerEnd()}if(2&e){const e=a.ɵɵreference(7),t=a.ɵɵnextContext();a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,7,"uploadLicenseFilePremium")),a.ɵɵadvance(3),a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(6),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(13,9,"licenseFile")),a.ɵɵadvance(6),a.ɵɵtextInterpolate(a.ɵɵpipeBind2(19,11,"licenseFileDesc","bitwarden_premium_license.json")),a.ɵɵadvance(4),a.ɵɵproperty("disabled",e.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(25,14,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(29,16,"submit"))}}function A(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"form",14,15),a.ɵɵlistener("ngSubmit",(function(){a.ɵɵrestoreView(e);return a.ɵɵnextContext().submit()})),a.ɵɵtext(2,"\n "),a.ɵɵelementStart(3,"h2",22),a.ɵɵtext(4),a.ɵɵpipe(5,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"div",23),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"div",24),a.ɵɵtext(10,"\n "),a.ɵɵelementStart(11,"label",25),a.ɵɵtext(12),a.ɵɵpipe(13,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementStart(15,"input",26),a.ɵɵlistener("ngModelChange",(function(t){a.ɵɵrestoreView(e);return a.ɵɵnextContext().additionalStorage=t})),a.ɵɵpipe(16,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n "),a.ɵɵelementStart(18,"small",27),a.ɵɵtext(19),a.ɵɵpipe(20,"i18n"),a.ɵɵpipe(21,"currency"),a.ɵɵpipe(22,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(23,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(24,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(25,"\n "),a.ɵɵelementStart(26,"h2",28),a.ɵɵtext(27),a.ɵɵpipe(28,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(29),a.ɵɵpipe(30,"i18n"),a.ɵɵpipe(31,"currency"),a.ɵɵelement(32,"br"),a.ɵɵtext(33),a.ɵɵpipe(34,"i18n"),a.ɵɵpipe(35,"currency"),a.ɵɵpipe(36,"currency"),a.ɵɵelement(37,"hr",29),a.ɵɵtext(38,"\n "),a.ɵɵelementStart(39,"h2",30),a.ɵɵtext(40),a.ɵɵpipe(41,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(42,"\n "),a.ɵɵelement(43,"app-payment",31),a.ɵɵtext(44,"\n "),a.ɵɵelement(45,"app-tax-info"),a.ɵɵtext(46,"\n "),a.ɵɵelementStart(47,"div",32),a.ɵɵtext(48,"\n "),a.ɵɵelementStart(49,"div",33),a.ɵɵtext(50),a.ɵɵpipe(51,"i18n"),a.ɵɵpipe(52,"currency"),a.ɵɵelement(53,"br"),a.ɵɵtext(54,"\n "),a.ɵɵelementContainerStart(55),a.ɵɵtext(56),a.ɵɵpipe(57,"i18n"),a.ɵɵpipe(58,"currency"),a.ɵɵelementContainerEnd(),a.ɵɵtext(59,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(60,"\n "),a.ɵɵelement(61,"hr",34),a.ɵɵtext(62,"\n "),a.ɵɵelementStart(63,"p",35),a.ɵɵtext(64,"\n "),a.ɵɵelementStart(65,"strong"),a.ɵɵtext(66),a.ɵɵpipe(67,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(68),a.ɵɵpipe(69,"currency"),a.ɵɵpipe(70,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(71,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(72,"\n "),a.ɵɵelementStart(73,"small",36),a.ɵɵtext(74),a.ɵɵpipe(75,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(76,"\n "),a.ɵɵelementStart(77,"button",20),a.ɵɵtext(78,"\n "),a.ɵɵelement(79,"i",21),a.ɵɵpipe(80,"i18n"),a.ɵɵtext(81,"\n "),a.ɵɵelementStart(82,"span"),a.ɵɵtext(83),a.ɵɵpipe(84,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(85,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(86,"\n"),a.ɵɵelementEnd()}if(2&e){const e=a.ɵɵreference(1),t=a.ɵɵnextContext();a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(5,26,"addons")),a.ɵɵadvance(8),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(13,28,"additionalStorageGb")),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("placeholder",a.ɵɵpipeBind1(16,30,"additionalStorageGbDesc")),a.ɵɵproperty("ngModel",t.additionalStorage),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind4(20,32,"additionalStorageIntervalDesc","1 GB",a.ɵɵpipeBind2(21,37,t.storageGbPrice,"$"),a.ɵɵpipeBind1(22,40,"year"))),a.ɵɵadvance(8),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(28,42,"summary")),a.ɵɵadvance(2),a.ɵɵtextInterpolate2("\n ",a.ɵɵpipeBind1(30,44,"premiumMembership"),": ",a.ɵɵpipeBind2(31,46,t.premiumPrice,"$")," "),a.ɵɵadvance(4),a.ɵɵtextInterpolate4("\n ",a.ɵɵpipeBind1(34,49,"additionalStorageGb"),": ",t.additionalStorage||0," GB ×\n ",a.ɵɵpipeBind2(35,51,t.storageGbPrice,"$")," =\n ",a.ɵɵpipeBind2(36,54,t.additionalStorageTotal,"$"),"\n "),a.ɵɵadvance(7),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(41,57,"paymentInformation")),a.ɵɵadvance(3),a.ɵɵproperty("hideBank",!0),a.ɵɵadvance(7),a.ɵɵtextInterpolate2("\n ",a.ɵɵpipeBind1(51,59,"planPrice"),": ",a.ɵɵpipeBind2(52,61,t.subtotal,"USD $"),"\n "),a.ɵɵadvance(6),a.ɵɵtextInterpolate2("\n ",a.ɵɵpipeBind1(57,64,"estimatedTax"),": ",a.ɵɵpipeBind2(58,66,t.taxCharges,"USD $"),"\n "),a.ɵɵadvance(10),a.ɵɵtextInterpolate1("",a.ɵɵpipeBind1(67,69,"total"),":"),a.ɵɵadvance(2),a.ɵɵtextInterpolate2(" ",a.ɵɵpipeBind2(69,71,t.total,"USD $"),"/",a.ɵɵpipeBind1(70,74,"year"),"\n "),a.ɵɵadvance(6),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(75,76,"paymentChargedAnnually")),a.ɵɵadvance(3),a.ɵɵproperty("disabled",e.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(80,78,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(84,80,"submit"))}}const T=function(e){return{"mb-0":e}};class M{constructor(e,t,n,i,r,o,a,s,l){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.tokenService=i,this.router=r,this.messagingService=o,this.syncService=a,this.logService=s,this.stateService=l,this.canAccessPremium=!1,this.selfHosted=!1,this.premiumPrice=10,this.storageGbPrice=4,this.additionalStorage=0,this.selfHosted=n.isSelfHost()}ngOnInit(){return i(this,void 0,void 0,(function*(){this.canAccessPremium=yield this.stateService.getCanAccessPremium();(yield this.tokenService.getPremium())&&this.router.navigate(["/settings/subscription/user-subscription"])}))}submit(){return i(this,void 0,void 0,(function*(){let e=null;if(this.selfHosted){if(e=document.getElementById("file").files,null==e||0===e.length)return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectFile"))}try{if(this.selfHosted){if(!this.tokenService.getEmailVerified())return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("verifyEmailFirst"));const t=new FormData;t.append("license",e[0]),this.formPromise=this.apiService.postAccountLicense(t).then((()=>this.finalizePremium()))}else this.formPromise=this.paymentComponent.createPaymentToken().then((e=>{const t=new FormData;return t.append("paymentMethodType",e[1].toString()),null!=e[0]&&t.append("paymentToken",e[0]),t.append("additionalStorageGb",(this.additionalStorage||0).toString()),t.append("country",this.taxInfoComponent.taxInfo.country),t.append("postalCode",this.taxInfoComponent.taxInfo.postalCode),this.apiService.postPremium(t)})).then((e=>e.success||null==e.paymentIntentClientSecret?this.finalizePremium():this.paymentComponent.handleStripeCardPayment(e.paymentIntentClientSecret,(()=>this.finalizePremium()))));yield this.formPromise}catch(t){this.logService.error(t)}}))}finalizePremium(){return i(this,void 0,void 0,(function*(){yield this.apiService.refreshIdentityToken(),yield this.syncService.fullSync(!0),this.platformUtilsService.showToast("success",null,this.i18nService.t("premiumUpdated")),this.messagingService.send("purchasedPremium"),this.router.navigate(["/settings/subscription/user-subscription"])}))}get additionalStorageTotal(){return this.storageGbPrice*Math.abs(this.additionalStorage||0)}get subtotal(){return this.premiumPrice+this.additionalStorageTotal}get taxCharges(){return null!=this.taxInfoComponent&&null!=this.taxInfoComponent.taxRate?this.taxInfoComponent.taxRate/100*this.subtotal:0}get total(){return this.subtotal+this.taxCharges||0}}t.PremiumComponent=M,M.ɵfac=function(e){return new(e||M)(a.ɵɵdirectiveInject(s.ApiService),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(c.PlatformUtilsService),a.ɵɵdirectiveInject(d.TokenService),a.ɵɵdirectiveInject(p.Router),a.ɵɵdirectiveInject(u.MessagingService),a.ɵɵdirectiveInject(m.SyncService),a.ɵɵdirectiveInject(h.LogService),a.ɵɵdirectiveInject(v.StateService))},M.ɵcmp=a.ɵɵdefineComponent({type:M,selectors:[["app-premium"]],viewQuery:function(e,t){if(1&e&&(a.ɵɵviewQuery(r.PaymentComponent,5),a.ɵɵviewQuery(o.TaxInfoComponent,5)),2&e){let e;a.ɵɵqueryRefresh(e=a.ɵɵloadQuery())&&(t.paymentComponent=e.first),a.ɵɵqueryRefresh(e=a.ɵɵloadQuery())&&(t.taxInfoComponent=e.first)}},decls:69,vars:40,consts:[["class","page-header",4,"ngIf"],["class","tabbed-header",4,"ngIf"],["type","info","icon","bwi bwi-star-f",3,"title",4,"ngIf"],["type","success"],[1,"bwi-ul"],["aria-hidden","true",1,"bwi","bwi-check","text-success","bwi-li"],[1,"text-lg",3,"ngClass"],["bit-button","","href","https://vault.bitwarden.com/#/settings/premium","target","_blank","rel","noopener","buttonType","secondary",4,"ngIf"],[4,"ngIf"],["ngNativeValidate","",3,"appApiAction","ngSubmit",4,"ngIf"],[1,"page-header"],[1,"tabbed-header"],["type","info","icon","bwi bwi-star-f",3,"title"],["bit-button","","href","https://vault.bitwarden.com/#/settings/premium","target","_blank","rel","noopener","buttonType","secondary"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"form-group"],["for","file"],["type","file","id","file","name","file","required","",1,"form-control-file"],[1,"form-text","text-muted"],["bit-button","","buttonType","primary","type","submit",1,"btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[1,"mt-5"],[1,"row"],[1,"form-group","col-6"],["for","additionalStorage"],["id","additionalStorage","type","number","name","AdditionalStorageGb","min","0","max","99","step","1",1,"form-control",3,"ngModel","placeholder","ngModelChange"],[1,"text-muted","form-text"],[1,"spaced-header"],[1,"my-3"],[1,"spaced-header","mb-4"],[3,"hideBank"],["id","price",1,"my-4"],[1,"text-muted","text-sm"],[1,"my-1","col-3","ml-0"],[1,"text-lg"],[1,"text-muted","font-italic"]],template:function(e,t){1&e&&(a.ɵɵtemplate(0,I,6,3,"div",0),a.ɵɵtext(1,"\n"),a.ɵɵtemplate(2,E,6,3,"div",1),a.ɵɵtext(3,"\n"),a.ɵɵtemplate(4,P,4,6,"bit-callout",2),a.ɵɵtext(5,"\n"),a.ɵɵelementStart(6,"bit-callout",3),a.ɵɵtext(7,"\n "),a.ɵɵelementStart(8,"p"),a.ɵɵtext(9),a.ɵɵpipe(10,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(11,"\n "),a.ɵɵelementStart(12,"ul",4),a.ɵɵtext(13,"\n "),a.ɵɵelementStart(14,"li"),a.ɵɵtext(15,"\n "),a.ɵɵelement(16,"i",5),a.ɵɵtext(17),a.ɵɵpipe(18,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(19,"\n "),a.ɵɵelementStart(20,"li"),a.ɵɵtext(21,"\n "),a.ɵɵelement(22,"i",5),a.ɵɵtext(23),a.ɵɵpipe(24,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(25,"\n "),a.ɵɵelementStart(26,"li"),a.ɵɵtext(27,"\n "),a.ɵɵelement(28,"i",5),a.ɵɵtext(29),a.ɵɵpipe(30,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(31,"\n "),a.ɵɵelementStart(32,"li"),a.ɵɵtext(33,"\n "),a.ɵɵelement(34,"i",5),a.ɵɵtext(35),a.ɵɵpipe(36,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(37,"\n "),a.ɵɵelementStart(38,"li"),a.ɵɵtext(39,"\n "),a.ɵɵelement(40,"i",5),a.ɵɵtext(41),a.ɵɵpipe(42,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(43,"\n "),a.ɵɵelementStart(44,"li"),a.ɵɵtext(45,"\n "),a.ɵɵelement(46,"i",5),a.ɵɵtext(47),a.ɵɵpipe(48,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(49,"\n "),a.ɵɵelementStart(50,"li"),a.ɵɵtext(51,"\n "),a.ɵɵelement(52,"i",5),a.ɵɵtext(53),a.ɵɵpipe(54,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(55,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(56,"\n "),a.ɵɵelementStart(57,"p",6),a.ɵɵtext(58),a.ɵɵpipe(59,"i18n"),a.ɵɵpipe(60,"currency"),a.ɵɵelementEnd(),a.ɵɵtext(61,"\n "),a.ɵɵtemplate(62,O,3,3,"a",7),a.ɵɵtext(63,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(64,"\n"),a.ɵɵtemplate(65,k,33,18,"ng-container",8),a.ɵɵtext(66,"\n"),a.ɵɵtemplate(67,A,87,82,"form",9),a.ɵɵtext(68,"\n")),2&e&&(a.ɵɵproperty("ngIf",t.selfHosted),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!t.selfHosted),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.canAccessPremium),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(10,16,"premiumUpgradeUnlockFeatures")),a.ɵɵadvance(8),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(18,18,"premiumSignUpStorage"),"\n "),a.ɵɵadvance(6),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(24,20,"premiumSignUpTwoStep"),"\n "),a.ɵɵadvance(6),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(30,22,"premiumSignUpEmergency"),"\n "),a.ɵɵadvance(6),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(36,24,"premiumSignUpReports"),"\n "),a.ɵɵadvance(6),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(42,26,"premiumSignUpTotp"),"\n "),a.ɵɵadvance(6),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(48,28,"premiumSignUpSupport"),"\n "),a.ɵɵadvance(6),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(54,30,"premiumSignUpFuture"),"\n "),a.ɵɵadvance(4),a.ɵɵproperty("ngClass",a.ɵɵpureFunction1(38,T,!t.selfHosted)),a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind2(59,32,"premiumPrice",a.ɵɵpipeBind2(60,35,t.premiumPrice,"$")),"\n "),a.ɵɵadvance(4),a.ɵɵproperty("ngIf",t.selfHosted),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",t.selfHosted),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!t.selfHosted))},directives:[f.NgIf,g.CalloutComponent,f.NgClass,y.ButtonComponent,x.NgControlStatusGroup,x.NgForm,S.ApiActionDirective,x.MinValidator,x.MaxValidator,x.NumberValueAccessor,x.DefaultValueAccessor,x.NgControlStatus,x.NgModel,b.PaymentComponent,w.TaxInfoComponent],pipes:[C.I18nPipe,f.CurrencyPipe],encapsulation:2})},93276:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ProfileComponent=void 0;n(91674),n(85714),n(51554),n(72277),n(36631),n(73828),n(73569);const r=n(82567),o=n(32621),a=n(91674),s=n(51554),l=n(73828),c=n(85714),d=n(36631),p=n(72277),u=n(73569),m=n(57490),h=n(96832),v=n(56820),f=n(15370),g=n(8863),y=n(99729),x=n(52080);function S(e,t){1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",2),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",3),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function b(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",8),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"label",18),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"input",19),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).profile.masterPasswordHint=t})),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,2,"masterPassHintLabel")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.profile.masterPasswordHint)}}function w(e,t){if(1&e&&(o.ɵɵelementStart(0,"p"),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementStart(3,"a",20),o.ɵɵpipe(4,"i18n"),o.ɵɵtext(5,"\n "),o.ɵɵelement(6,"i",21),o.ɵɵelementEnd(),o.ɵɵelement(7,"br"),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"code"),o.ɵɵtext(10),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,3,"yourAccountsFingerprint"),":\n "),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(4,5,"learnMore")),o.ɵɵadvance(7),o.ɵɵtextInterpolate(e.fingerprint)}}function C(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"form",4,5),o.ɵɵlistener("ngSubmit",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext().submit()})),o.ɵɵtext(2,"\n "),o.ɵɵelementStart(3,"div",6),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"div",7),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"div",8),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"label",9),o.ɵɵtext(10),o.ɵɵpipe(11,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementStart(13,"input",10),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().profile.name=t})),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"div",8),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"label",11),o.ɵɵtext(19),o.ɵɵpipe(20,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"input",12),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().profile.email=t})),o.ɵɵelementEnd(),o.ɵɵtext(23,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵtemplate(25,b,8,4,"div",13),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelementStart(28,"div",7),o.ɵɵtext(29,"\n "),o.ɵɵelementStart(30,"div",14),o.ɵɵtext(31,"\n "),o.ɵɵelementStart(32,"app-avatar",15),o.ɵɵpipe(33,"userName"),o.ɵɵtext(34,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(35,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(36,"\n "),o.ɵɵelement(37,"hr"),o.ɵɵtext(38,"\n "),o.ɵɵtemplate(39,w,12,7,"p",0),o.ɵɵtext(40,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(41,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(42,"\n "),o.ɵɵelementStart(43,"button",16),o.ɵɵtext(44,"\n "),o.ɵɵelement(45,"i",17),o.ɵɵpipe(46,"i18n"),o.ɵɵtext(47,"\n "),o.ɵɵelementStart(48,"span"),o.ɵɵtext(49),o.ɵɵpipe(50,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(51,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(52,"\n"),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵreference(1),t=o.ɵɵnextContext();o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(10),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(11,12,"name")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",t.profile.name),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(20,14,"email")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",t.profile.email),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!t.hidePasswordHint),o.ɵɵadvance(7),o.ɵɵpropertyInterpolate("data",o.ɵɵpipeBind1(33,16,t.profile)),o.ɵɵproperty("email",t.profile.email),o.ɵɵadvance(7),o.ɵɵproperty("ngIf",t.fingerprint),o.ɵɵadvance(4),o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(46,18,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(50,20,"save"))}}class I{constructor(e,t,n,i,r,o,a){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.cryptoService=i,this.logService=r,this.keyConnectorService=o,this.stateService=a,this.loading=!0,this.hidePasswordHint=!1}ngOnInit(){return i(this,void 0,void 0,(function*(){this.profile=yield this.apiService.getProfile(),this.loading=!1;const e=yield this.cryptoService.getFingerprint(yield this.stateService.getUserId());null!=e&&(this.fingerprint=e.join("-")),this.hidePasswordHint=yield this.keyConnectorService.getUsesKeyConnector()}))}submit(){return i(this,void 0,void 0,(function*(){try{const e=new r.UpdateProfileRequest(this.profile.name,this.profile.masterPasswordHint);this.formPromise=this.apiService.putProfile(e),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("accountUpdated"))}catch(e){this.logService.error(e)}}))}}t.ProfileComponent=I,I.ɵfac=function(e){return new(e||I)(o.ɵɵdirectiveInject(a.ApiService),o.ɵɵdirectiveInject(s.I18nService),o.ɵɵdirectiveInject(l.PlatformUtilsService),o.ɵɵdirectiveInject(c.CryptoService),o.ɵɵdirectiveInject(d.LogService),o.ɵɵdirectiveInject(p.KeyConnectorService),o.ɵɵdirectiveInject(u.StateService))},I.ɵcmp=o.ɵɵdefineComponent({type:I,selectors:[["app-profile"]],decls:4,vars:2,consts:[[4,"ngIf"],["ngNativeValidate","",3,"appApiAction","ngSubmit",4,"ngIf"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"row"],[1,"col-6"],[1,"form-group"],["for","name"],["id","name","type","text","name","Name",1,"form-control",3,"ngModel","ngModelChange"],["for","email"],["id","email","type","text","name","Email","readonly","",1,"form-control",3,"ngModel","ngModelChange"],["class","form-group",4,"ngIf"],[1,"mb-3"],["dynamic","true","size","75","fontSize","35",3,"data","email"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["for","masterPasswordHint"],["id","masterPasswordHint","type","text","name","MasterPasswordHint",1,"form-control",3,"ngModel","ngModelChange"],["href","https://bitwarden.com/help/fingerprint-phrase/","target","_blank","rel","noopener",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"]],template:function(e,t){1&e&&(o.ɵɵtemplate(0,S,9,6,"div",0),o.ɵɵtext(1,"\n"),o.ɵɵtemplate(2,C,53,22,"form",1),o.ɵɵtext(3,"\n")),2&e&&(o.ɵɵproperty("ngIf",t.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.profile&&!t.loading))},directives:[m.NgIf,h.NgControlStatusGroup,h.NgForm,v.ApiActionDirective,h.DefaultValueAccessor,h.NgControlStatus,h.NgModel,f.AvatarComponent,g.A11yTitleDirective],pipes:[y.I18nPipe,x.UserNamePipe],encapsulation:2})},56796:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.PurgeVaultComponent=void 0;n(68012),n(91674),n(51554),n(36631),n(73828),n(57055);const r=n(32621),o=n(91674),a=n(51554),s=n(73828),l=n(57055),c=n(68012),d=n(36631),p=n(96832),u=n(56820),m=n(8863),h=n(51626),v=n(4158),f=n(99729);class g{constructor(e,t,n,i,r,o){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.userVerificationService=i,this.router=r,this.logService=o,this.organizationId=null}submit(){return i(this,void 0,void 0,(function*(){try{this.formPromise=this.userVerificationService.buildRequest(this.masterPassword).then((e=>this.apiService.postPurgeCiphers(e,this.organizationId))),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("vaultPurged")),null!=this.organizationId?this.router.navigate(["organizations",this.organizationId,"vault"]):this.router.navigate(["vault"])}catch(e){this.logService.error(e)}}))}}t.PurgeVaultComponent=g,g.ɵfac=function(e){return new(e||g)(r.ɵɵdirectiveInject(o.ApiService),r.ɵɵdirectiveInject(a.I18nService),r.ɵɵdirectiveInject(s.PlatformUtilsService),r.ɵɵdirectiveInject(l.UserVerificationService),r.ɵɵdirectiveInject(c.Router),r.ɵɵdirectiveInject(d.LogService))},g.ɵcmp=r.ɵɵdefineComponent({type:g,selectors:[["app-purge-vault"]],inputs:{organizationId:"organizationId"},decls:55,vars:24,consts:[["role","dialog","aria-modal","true","aria-labelledby","purgeVaultTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","purgeVaultTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["type","warning"],["ngDefaultControl","","name","secret",3,"ngModel","ngModelChange"],[1,"modal-footer"],["type","submit",1,"btn","btn-danger","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"]],template:function(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"form",2,3),r.ɵɵlistener("ngSubmit",(function(){return t.submit()})),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"div",4),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"h2",5),r.ɵɵtext(10),r.ɵɵpipe(11,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelementStart(13,"button",6),r.ɵɵpipe(14,"i18n"),r.ɵɵtext(15,"\n "),r.ɵɵelementStart(16,"span",7),r.ɵɵtext(17,"×"),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(20,"\n "),r.ɵɵelementStart(21,"div",8),r.ɵɵtext(22,"\n "),r.ɵɵelementStart(23,"p"),r.ɵɵtext(24),r.ɵɵpipe(25,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(26,"\n "),r.ɵɵelementStart(27,"app-callout",9),r.ɵɵtext(28),r.ɵɵpipe(29,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(30,"\n "),r.ɵɵelementStart(31,"app-user-verification",10),r.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),r.ɵɵtext(32,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(33,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(34,"\n "),r.ɵɵelementStart(35,"div",11),r.ɵɵtext(36,"\n "),r.ɵɵelementStart(37,"button",12),r.ɵɵtext(38,"\n "),r.ɵɵelement(39,"i",13),r.ɵɵpipe(40,"i18n"),r.ɵɵtext(41,"\n "),r.ɵɵelementStart(42,"span"),r.ɵɵtext(43),r.ɵɵpipe(44,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(45,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(46,"\n "),r.ɵɵelementStart(47,"button",14),r.ɵɵtext(48),r.ɵɵpipe(49,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(50,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(51,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(52,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(53,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(54,"\n")),2&e){const e=r.ɵɵreference(5);r.ɵɵadvance(4),r.ɵɵproperty("appApiAction",t.formPromise),r.ɵɵadvance(6),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(11,10,"purgeVault")),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(14,12,"close")),r.ɵɵadvance(11),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(25,14,t.organizationId?"purgeOrgVaultDesc":"purgeVaultDesc")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(29,16,"purgeVaultWarning")),r.ɵɵadvance(3),r.ɵɵproperty("ngModel",t.masterPassword),r.ɵɵadvance(6),r.ɵɵproperty("disabled",e.loading),r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(40,18,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(44,20,"purgeVault")),r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(49,22,"close"),"\n ")}},directives:[p.NgControlStatusGroup,p.NgForm,u.ApiActionDirective,m.A11yTitleDirective,h.CalloutComponent,v.UserVerificationComponent,p.DefaultValueAccessor,p.NgControlStatus,p.NgModel],pipes:[f.I18nPipe],encapsulation:2})},80793:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SecurityKeysComponent=void 0;const r=n(32621),o=(n(64684),n(91674),n(72277),n(73569),n(83011)),a=n(32621),s=n(72277),l=n(73569),c=n(64684),d=n(91674),p=n(57490),u=n(52767),m=n(48381),h=n(99729),v=["viewUserApiKeyTemplate"],f=["rotateUserApiKeyTemplate"];function g(e,t){1&e&&a.ɵɵelement(0,"app-change-kdf")}function y(e,t){}function x(e,t){}const S=function(e,t){return{"tabbed-header":e,"secondary-header":t}};class b{constructor(e,t,n,i){this.keyConnectorService=e,this.stateService=t,this.modalService=n,this.apiService=i,this.showChangeKdf=!0}ngOnInit(){return i(this,void 0,void 0,(function*(){this.showChangeKdf=!(yield this.keyConnectorService.getUsesKeyConnector())}))}viewUserApiKey(){return i(this,void 0,void 0,(function*(){const e=yield this.stateService.getUserId();yield this.modalService.openViewRef(o.ApiKeyComponent,this.viewUserApiKeyModalRef,(t=>{t.keyType="user",t.entityId=e,t.postKey=this.apiService.postUserApiKey.bind(this.apiService),t.scope="api",t.grantType="client_credentials",t.apiKeyTitle="apiKey",t.apiKeyWarning="userApiKeyWarning",t.apiKeyDescription="userApiKeyDesc"}))}))}rotateUserApiKey(){return i(this,void 0,void 0,(function*(){const e=yield this.stateService.getUserId();yield this.modalService.openViewRef(o.ApiKeyComponent,this.rotateUserApiKeyModalRef,(t=>{t.keyType="user",t.isRotation=!0,t.entityId=e,t.postKey=this.apiService.postUserRotateApiKey.bind(this.apiService),t.scope="api",t.grantType="client_credentials",t.apiKeyTitle="apiKey",t.apiKeyWarning="userApiKeyWarning",t.apiKeyDescription="apiKeyRotateDesc"}))}))}}t.SecurityKeysComponent=b,b.ɵfac=function(e){return new(e||b)(a.ɵɵdirectiveInject(s.KeyConnectorService),a.ɵɵdirectiveInject(l.StateService),a.ɵɵdirectiveInject(c.ModalService),a.ɵɵdirectiveInject(d.ApiService))},b.ɵcmp=a.ɵɵdefineComponent({type:b,selectors:[["app-security-keys"]],viewQuery:function(e,t){if(1&e&&(a.ɵɵviewQuery(v,7,r.ViewContainerRef),a.ɵɵviewQuery(f,7,r.ViewContainerRef)),2&e){let e;a.ɵɵqueryRefresh(e=a.ɵɵloadQuery())&&(t.viewUserApiKeyModalRef=e.first),a.ɵɵqueryRefresh(e=a.ɵɵloadQuery())&&(t.rotateUserApiKeyModalRef=e.first)}},decls:27,vars:17,consts:[[4,"ngIf"],[1,"border-0","mb-0",3,"ngClass"],["bit-button","","buttonType","secondary",3,"click"],["viewUserApiKeyTemplate",""],["rotateUserApiKeyTemplate",""]],template:function(e,t){1&e&&(a.ɵɵtemplate(0,g,1,0,"app-change-kdf",0),a.ɵɵtext(1,"\n"),a.ɵɵelementStart(2,"div",1),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"h1"),a.ɵɵtext(5),a.ɵɵpipe(6,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(7,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n"),a.ɵɵelementStart(9,"p"),a.ɵɵtext(10),a.ɵɵpipe(11,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n"),a.ɵɵelementStart(13,"button",2),a.ɵɵlistener("click",(function(){return t.viewUserApiKey()})),a.ɵɵtext(14),a.ɵɵpipe(15,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(16,"\n"),a.ɵɵelementStart(17,"button",2),a.ɵɵlistener("click",(function(){return t.rotateUserApiKey()})),a.ɵɵtext(18),a.ɵɵpipe(19,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(20,"\n"),a.ɵɵtemplate(21,y,0,0,"ng-template",null,3,a.ɵɵtemplateRefExtractor),a.ɵɵtext(23,"\n"),a.ɵɵtemplate(24,x,0,0,"ng-template",null,4,a.ɵɵtemplateRefExtractor),a.ɵɵtext(26,"\n")),2&e&&(a.ɵɵproperty("ngIf",t.showChangeKdf),a.ɵɵadvance(2),a.ɵɵproperty("ngClass",a.ɵɵpureFunction2(14,S,!t.showChangeKdf,t.showChangeKdf)),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(6,6,"apiKey")),a.ɵɵadvance(5),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(11,8,"userApiKeyDesc"),"\n"),a.ɵɵadvance(4),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(15,10,"viewApiKey"),"\n"),a.ɵɵadvance(4),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(19,12,"rotateApiKey"),"\n"))},directives:[p.NgIf,p.NgClass,u.ButtonComponent,m.ChangeKdfComponent],pipes:[h.I18nPipe],encapsulation:2})},17587:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecurityRoutingModule=void 0;const i=n(68012),r=n(11676),o=n(80793),a=n(75024),s=n(35906),l=n(32621),c=(n(68012),[{path:"",component:a.SecurityComponent,data:{titleId:"security"},children:[{path:"",pathMatch:"full",redirectTo:"change-password"},{path:"change-password",component:r.ChangePasswordComponent,data:{titleId:"masterPassword"}},{path:"two-factor",component:s.TwoFactorSetupComponent,data:{titleId:"twoStepLogin"}},{path:"security-keys",component:o.SecurityKeysComponent,data:{titleId:"keys"}}]}]);class d{}t.SecurityRoutingModule=d,d.ɵfac=function(e){return new(e||d)},d.ɵmod=l.ɵɵdefineNgModule({type:d}),d.ɵinj=l.ɵɵdefineInjector({imports:[[i.RouterModule.forChild(c)],i.RouterModule]})},75024:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SecurityComponent=void 0;n(72277);const r=n(32621),o=n(72277),a=n(57490),s=n(68012),l=n(99729);function c(e,t){1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"li",3),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"a",6),r.ɵɵtext(5),r.ɵɵpipe(6,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(7,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementContainerEnd()),2&e&&(r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(6,1,"masterPassword"),"\n "))}class d{constructor(e){this.keyConnectorService=e,this.showChangePassword=!0}ngOnInit(){return i(this,void 0,void 0,(function*(){this.showChangePassword=!(yield this.keyConnectorService.getUsesKeyConnector())}))}}t.SecurityComponent=d,d.ɵfac=function(e){return new(e||d)(r.ɵɵdirectiveInject(o.KeyConnectorService))},d.ɵcmp=r.ɵɵdefineComponent({type:d,selectors:[["app-security"]],decls:24,vars:7,consts:[[1,"tabbed-nav","d-flex","flex-column"],[1,"nav","nav-tabs"],[4,"ngIf"],[1,"nav-item"],["routerLink","two-factor","routerLinkActive","active",1,"nav-link"],["routerLink","security-keys","routerLinkActive","active",1,"nav-link"],["routerLink","change-password","routerLinkActive","active",1,"nav-link"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"ul",1),r.ɵɵtext(3,"\n "),r.ɵɵtemplate(4,c,9,3,"ng-container",2),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"li",3),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"a",4),r.ɵɵtext(9),r.ɵɵpipe(10,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelementStart(13,"li",3),r.ɵɵtext(14,"\n "),r.ɵɵelementStart(15,"a",5),r.ɵɵtext(16),r.ɵɵpipe(17,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(20,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(21,"\n"),r.ɵɵelement(22,"router-outlet"),r.ɵɵtext(23,"\n")),2&e&&(r.ɵɵadvance(4),r.ɵɵproperty("ngIf",t.showChangePassword),r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(10,3,"twoStepLogin"),"\n "),r.ɵɵadvance(7),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(17,5,"keys"),"\n "))},directives:[a.NgIf,s.RouterLinkWithHref,s.RouterLinkActive,s.RouterOutlet],pipes:[l.I18nPipe],encapsulation:2})},82477:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsComponent=void 0;n(32621),n(91674),n(8470),n(63513),n(73828),n(30694),n(15156);const r=n(32621),o=n(30694),a=n(8470),s=n(73828),l=n(63513),c=n(15156),d=n(91674),p=n(68012),u=n(57490),m=n(99729);function h(e,t){1&e&&(r.ɵɵelementStart(0,"a",14),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"subscription"),"\n "))}function v(e,t){1&e&&(r.ɵɵelementStart(0,"a",15),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"sponsoredFamilies"),"\n "))}const f="SettingsComponent";class g{constructor(e,t,n,i,r,o,a){this.tokenService=e,this.broadcasterService=t,this.ngZone=n,this.platformUtilsService=i,this.organizationService=r,this.stateService=o,this.apiService=a}ngOnInit(){return i(this,void 0,void 0,(function*(){this.broadcasterService.subscribe(f,(e=>i(this,void 0,void 0,(function*(){this.ngZone.run((()=>i(this,void 0,void 0,(function*(){if("purchasedPremium"===e.command)yield this.load()}))))})))),this.selfHosted=yield this.platformUtilsService.isSelfHost(),yield this.load()}))}ngOnDestroy(){this.broadcasterService.unsubscribe(f)}load(){return i(this,void 0,void 0,(function*(){this.premium=yield this.tokenService.getPremium(),this.hasFamilySponsorshipAvailable=yield this.organizationService.canManageSponsorships();const e=yield this.stateService.getCanAccessPremium();let t=null;this.selfHosted||(t=yield this.apiService.getUserBillingHistory()),this.hideSubscription=!this.premium&&e&&(this.selfHosted||(null==t?void 0:t.hasNoHistory))}))}}t.SettingsComponent=g,g.ɵfac=function(e){return new(e||g)(r.ɵɵdirectiveInject(o.TokenService),r.ɵɵdirectiveInject(a.BroadcasterService),r.ɵɵdirectiveInject(r.NgZone),r.ɵɵdirectiveInject(s.PlatformUtilsService),r.ɵɵdirectiveInject(l.OrganizationService),r.ɵɵdirectiveInject(c.StateService),r.ɵɵdirectiveInject(d.ApiService))},g.ɵcmp=r.ɵɵdefineComponent({type:g,selectors:[["app-settings"]],decls:48,vars:20,consts:[[1,"container","page-content"],[1,"row"],[1,"col-3"],[1,"card"],[1,"card-header"],[1,"list-group","list-group-flush"],["routerLink","account","routerLinkActive","active",1,"list-group-item"],["routerLink","security","routerLinkActive","active",1,"list-group-item"],["routerLink","preferences","routerLinkActive","active",1,"list-group-item"],["routerLink","subscription","class","list-group-item","routerLinkActive","active",4,"ngIf"],["routerLink","domain-rules","routerLinkActive","active",1,"list-group-item"],["routerLink","emergency-access","routerLinkActive","active",1,"list-group-item"],["routerLink","sponsored-families","class","list-group-item","routerLinkActive","active",4,"ngIf"],[1,"col-9"],["routerLink","subscription","routerLinkActive","active",1,"list-group-item"],["routerLink","sponsored-families","routerLinkActive","active",1,"list-group-item"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",2),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"div",3),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"div",4),r.ɵɵtext(9),r.ɵɵpipe(10,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n "),r.ɵɵelementStart(12,"div",5),r.ɵɵtext(13,"\n "),r.ɵɵelementStart(14,"a",6),r.ɵɵtext(15),r.ɵɵpipe(16,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(17,"\n "),r.ɵɵelementStart(18,"a",7),r.ɵɵtext(19),r.ɵɵpipe(20,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(21,"\n "),r.ɵɵelementStart(22,"a",8),r.ɵɵtext(23),r.ɵɵpipe(24,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(25,"\n "),r.ɵɵtemplate(26,h,3,3,"a",9),r.ɵɵtext(27,"\n "),r.ɵɵelementStart(28,"a",10),r.ɵɵtext(29),r.ɵɵpipe(30,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(31,"\n "),r.ɵɵelementStart(32,"a",11),r.ɵɵtext(33),r.ɵɵpipe(34,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(35,"\n "),r.ɵɵtemplate(36,v,3,3,"a",12),r.ɵɵtext(37,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(38,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(39,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(40,"\n "),r.ɵɵelementStart(41,"div",13),r.ɵɵtext(42,"\n "),r.ɵɵelement(43,"router-outlet"),r.ɵɵtext(44,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(45,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(46,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(47,"\n")),2&e&&(r.ɵɵadvance(9),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(10,8,"accountSettings")),r.ɵɵadvance(6),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(16,10,"myAccount"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(20,12,"security"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(24,14,"preferences"),"\n "),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",!t.hideSubscription),r.ɵɵadvance(3),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(30,16,"domainRules"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(34,18,"emergencyAccess"),"\n "),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",t.hasFamilySponsorshipAvailable))},directives:[p.RouterLinkWithHref,p.RouterLinkActive,u.NgIf,p.RouterOutlet],pipes:[m.I18nPipe],encapsulation:2})},21362:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SponsoredFamiliesComponent=void 0;const r=n(96832),o=n(55939),a=(n(91674),n(51554),n(63513),n(73828),n(73569),n(9724),n(22931)),s=n(32621),l=n(91674),c=n(51554),d=n(73828),p=n(9724),u=n(63513),m=n(96832),h=n(73569),v=n(57490),f=n(56820),g=n(73618),y=n(99729);function x(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",2),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",3),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n"),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"loading")))}function S(e,t){if(1&e&&(s.ɵɵelementStart(0,"option",18),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){const e=t.$implicit;s.ɵɵproperty("ngValue",e.id),s.ɵɵadvance(1),s.ɵɵtextInterpolate(e.name)}}function b(e,t){1&e&&(s.ɵɵelementStart(0,"small",19),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",20),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(4,1,"cannotSponsorSelf"),"\n "))}function w(e,t){1&e&&(s.ɵɵelementStart(0,"small",19),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",20),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(4,1,"invalidEmail"),"\n "))}function C(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"form",6,7),s.ɵɵlistener("ngSubmit",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).submit()})),s.ɵɵtext(2,"\n "),s.ɵɵelementStart(3,"div",8),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"label",9),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"select",10),s.ɵɵtext(10,"\n "),s.ɵɵelementStart(11,"option",11),s.ɵɵtext(12),s.ɵɵpipe(13,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n "),s.ɵɵtemplate(15,S,2,2,"option",12),s.ɵɵtext(16,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(17,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"div",8),s.ɵɵtext(20,"\n "),s.ɵɵelementStart(21,"label",13),s.ɵɵtext(22),s.ɵɵpipe(23,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(24,"\n "),s.ɵɵelement(25,"input",14),s.ɵɵtext(26,"\n "),s.ɵɵtemplate(27,b,5,3,"small",15),s.ɵɵtext(28,"\n "),s.ɵɵtemplate(29,w,5,3,"small",15),s.ɵɵtext(30,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(31,"\n "),s.ɵɵelementStart(32,"div",8),s.ɵɵtext(33,"\n "),s.ɵɵelementStart(34,"button",16),s.ɵɵtext(35,"\n "),s.ɵɵelement(36,"i",17),s.ɵɵpipe(37,"i18n"),s.ɵɵtext(38,"\n "),s.ɵɵelementStart(39,"span"),s.ɵɵtext(40),s.ɵɵpipe(41,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(42,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(43,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(44,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵreference(1),t=s.ɵɵnextContext(2);s.ɵɵproperty("appApiAction",t.formPromise)("formGroup",t.sponsorshipForm),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,12,"familiesSponsoringOrgSelect")),s.ɵɵadvance(6),s.ɵɵtextInterpolate1("-- ",s.ɵɵpipeBind1(13,14,"select")," --"),s.ɵɵadvance(3),s.ɵɵproperty("ngForOf",t.availableSponsorshipOrgs),s.ɵɵadvance(7),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(23,16,"sponsoredFamiliesEmail"),":"),s.ɵɵadvance(3),s.ɵɵattribute("aria-invalid",t.sponsorshipEmailControl.invalid),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",null==t.sponsorshipEmailControl.errors?null:t.sponsorshipEmailControl.errors.notAllowedValue),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",null==t.sponsorshipEmailControl.errors?null:t.sponsorshipEmailControl.errors.email),s.ɵɵadvance(5),s.ɵɵproperty("disabled",e.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(37,18,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(41,20,"redeem"))}}function I(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"tr",24),s.ɵɵlistener("sponsorshipRemoved",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(3).load(!0)})),s.ɵɵelementEnd(),s.ɵɵtext(3,"\n "),s.ɵɵelementContainerEnd()}if(2&e){const e=t.$implicit,n=s.ɵɵnextContext(3);s.ɵɵadvance(2),s.ɵɵproperty("sponsoringOrg",e)("isSelfHosted",n.isSelfHosted)}}function E(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",21),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"table",22),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"thead"),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"tr"),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"th"),s.ɵɵtext(11),s.ɵɵpipe(12,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n "),s.ɵɵelementStart(14,"th"),s.ɵɵtext(15),s.ɵɵpipe(16,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(17,"\n "),s.ɵɵelementStart(18,"th"),s.ɵɵtext(19),s.ɵɵpipe(20,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelement(22,"th"),s.ɵɵtext(23,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(24,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(25,"\n "),s.ɵɵelementStart(26,"tbody"),s.ɵɵtext(27,"\n "),s.ɵɵtemplate(28,I,4,2,"ng-container",23),s.ɵɵtext(29,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(30,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(31,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(32,"\n "),s.ɵɵelementStart(33,"small"),s.ɵɵtext(34),s.ɵɵpipe(35,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(36,"\n "),s.ɵɵelementContainerEnd()),2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(11),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(12,5,"recipient")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(16,7,"sponsoringOrg")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(20,9,"status")),s.ɵɵadvance(9),s.ɵɵproperty("ngForOf",e.activeSponsorshipOrgs),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(35,11,"sponsoredFamiliesLeaveCopy"))}}function P(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"p"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"div"),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementStart(9,"ul",4),s.ɵɵtext(10,"\n "),s.ɵɵelementStart(11,"li"),s.ɵɵtext(12),s.ɵɵpipe(13,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"li"),s.ɵɵtext(16),s.ɵɵpipe(17,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(19,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵtemplate(21,C,45,22,"form",5),s.ɵɵtext(22,"\n "),s.ɵɵtemplate(23,E,37,13,"ng-container",1),s.ɵɵtext(24,"\n"),s.ɵɵelementContainerEnd()),2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(4,6,"sponsoredFamiliesEligible"),"\n "),s.ɵɵadvance(4),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(8,8,"sponsoredFamiliesInclude"),":\n "),s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(13,10,"sponsoredFamiliesPremiumAccess")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(17,12,"sponsoredFamiliesSharedCollections")),s.ɵɵadvance(5),s.ɵɵproperty("ngIf",e.anyOrgsAvailable),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.anyActiveSponsorships)}}class O{constructor(e,t,n,a,s,l,c){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.syncService=a,this.organizationService=s,this.formBuilder=l,this.stateService=c,this.loading=!1,this.availableSponsorshipOrgs=[],this.activeSponsorshipOrgs=[],this.sponsorshipForm=this.formBuilder.group({selectedSponsorshipOrgId:["",{validators:[r.Validators.required]}],sponsorshipEmail:["",{validators:[r.Validators.email],asyncValidators:[o.notAllowedValueAsync((()=>i(this,void 0,void 0,(function*(){return yield this.stateService.getEmail()}))),!0)],updateOn:"blur"}]})}ngOnInit(){return i(this,void 0,void 0,(function*(){yield this.load()}))}submit(){return i(this,void 0,void 0,(function*(){this.formPromise=this.apiService.postCreateSponsorship(this.sponsorshipForm.value.selectedSponsorshipOrgId,{sponsoredEmail:this.sponsorshipForm.value.sponsorshipEmail,planSponsorshipType:a.PlanSponsorshipType.FamiliesForEnterprise,friendlyName:this.sponsorshipForm.value.sponsorshipEmail}),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("sponsorshipCreated")),this.formPromise=null,this.resetForm(),yield this.load(!0)}))}load(e=!1){return i(this,void 0,void 0,(function*(){if(this.loading)return;this.loading=!0,e&&(yield this.syncService.fullSync(!0));const t=yield this.organizationService.getAll();this.availableSponsorshipOrgs=t.filter((e=>e.familySponsorshipAvailable)),this.activeSponsorshipOrgs=t.filter((e=>null!==e.familySponsorshipFriendlyName)),1===this.availableSponsorshipOrgs.length&&this.sponsorshipForm.patchValue({selectedSponsorshipOrgId:this.availableSponsorshipOrgs[0].id}),this.loading=!1}))}get sponsorshipEmailControl(){return this.sponsorshipForm.controls.sponsorshipEmail}resetForm(){return i(this,void 0,void 0,(function*(){this.sponsorshipForm.reset()}))}get anyActiveSponsorships(){return this.activeSponsorshipOrgs.length>0}get anyOrgsAvailable(){return this.availableSponsorshipOrgs.length>0}get isSelfHosted(){return this.platformUtilsService.isSelfHost()}}t.SponsoredFamiliesComponent=O,O.ɵfac=function(e){return new(e||O)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(d.PlatformUtilsService),s.ɵɵdirectiveInject(p.SyncService),s.ɵɵdirectiveInject(u.OrganizationService),s.ɵɵdirectiveInject(m.FormBuilder),s.ɵɵdirectiveInject(h.StateService))},O.ɵcmp=s.ɵɵdefineComponent({type:O,selectors:[["app-sponsored-families"]],decls:11,vars:5,consts:[[1,"page-header"],[4,"ngIf"],[1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"inset-list"],["ngNativeValidate","",3,"appApiAction","formGroup","ngSubmit",4,"ngIf"],["ngNativeValidate","",3,"appApiAction","formGroup","ngSubmit"],["form",""],[1,"form-group","col-7"],["for","availableSponsorshipOrg"],["id","availableSponsorshipOrg","name","Available Sponsorship Organization","formControlName","selectedSponsorshipOrgId","required","",1,"form-control"],["disabled","true","value",""],[3,"ngValue",4,"ngFor","ngForOf"],["for","sponsorshipEmail"],["id","sponsorshipEmail","inputmode","email","formControlName","sponsorshipEmail","name","sponsorshipEmail","required","",1,"form-control"],["aria-errormessage","sponsorshipEmail","class","error-inline","role","alert",4,"ngIf"],["type","submit",1,"btn","btn-primary","btn-submit","mt-2",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[3,"ngValue"],["aria-errormessage","sponsorshipEmail","role","alert",1,"error-inline"],["aria-hidden","true",1,"bwi","bwi-error"],[1,"border-bottom"],[1,"table","table-hover","table-list"],[4,"ngFor","ngForOf"],["sponsoring-org-row","",3,"sponsoringOrg","isSelfHosted","sponsorshipRemoved"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"h1"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n"),s.ɵɵtemplate(7,x,9,6,"ng-container",1),s.ɵɵtext(8,"\n"),s.ɵɵtemplate(9,P,25,14,"ng-container",1),s.ɵɵtext(10,"\n")),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,3,"sponsoredFamilies")),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",t.loading),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!t.loading))},directives:[v.NgIf,m.NgControlStatusGroup,f.ApiActionDirective,m.FormGroupDirective,m.SelectControlValueAccessor,m.NgControlStatus,m.FormControlName,m.RequiredValidator,m.NgSelectOption,m.ɵNgSelectMultipleOption,v.NgForOf,m.DefaultValueAccessor,g.SponsoringOrgRowComponent],pipes:[y.I18nPipe],encapsulation:2})},73618:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SponsoringOrgRowComponent=void 0;const r=n(57490),o=n(32621),a=(n(91674),n(51554),n(36631),n(73828),n(27957),n(32621)),s=n(91674),l=n(51554),c=n(36631),d=n(73828),p=n(57490),u=n(56820),m=n(8863),h=n(99729);function v(e,t){1&e&&(a.ɵɵelementStart(0,"button",9),a.ɵɵpipe(1,"i18n"),a.ɵɵtext(2,"\n "),a.ɵɵelement(3,"i",10),a.ɵɵtext(4,"\n "),a.ɵɵelementEnd()),2&e&&a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(1,1,"options"))}function f(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"button",11,12),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);return a.ɵɵnextContext().resendEmail()})),a.ɵɵpipe(2,"i18n"),a.ɵɵtext(3,"\n "),a.ɵɵelement(4,"i",8),a.ɵɵpipe(5,"i18n"),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"span"),a.ɵɵtext(8),a.ɵɵpipe(9,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(10,"\n "),a.ɵɵelementEnd()}if(2&e){const e=a.ɵɵreference(1),t=a.ɵɵnextContext();a.ɵɵproperty("appApiAction",t.resendEmailPromise)("disabled",e.loading),a.ɵɵattribute("aria-label",a.ɵɵpipeBind2(2,5,"resendEmailLabel",t.sponsoringOrg.familySponsorshipFriendlyName)),a.ɵɵadvance(4),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(5,8,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(9,10,"resendEmail"))}}class g{constructor(e,t,n,i){this.apiService=e,this.i18nService=t,this.logService=n,this.platformUtilsService=i,this.sponsoringOrg=null,this.isSelfHosted=!1,this.sponsorshipRemoved=new o.EventEmitter,this.statusMessage="loading",this.statusClass="text-success"}ngOnInit(){this.setStatus(this.isSelfHosted,this.sponsoringOrg.familySponsorshipToDelete,this.sponsoringOrg.familySponsorshipValidUntil,this.sponsoringOrg.familySponsorshipLastSyncDate)}revokeSponsorship(){return i(this,void 0,void 0,(function*(){try{this.revokeSponsorshipPromise=this.doRevokeSponsorship(),yield this.revokeSponsorshipPromise}catch(e){this.logService.error(e)}this.revokeSponsorshipPromise=null}))}resendEmail(){return i(this,void 0,void 0,(function*(){this.resendEmailPromise=this.apiService.postResendSponsorshipOffer(this.sponsoringOrg.id),yield this.resendEmailPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("emailSent")),this.resendEmailPromise=null}))}get isSentAwaitingSync(){return this.isSelfHosted&&!this.sponsoringOrg.familySponsorshipLastSyncDate}doRevokeSponsorship(){return i(this,void 0,void 0,(function*(){(yield this.platformUtilsService.showDialog(this.i18nService.t("revokeSponsorshipConfirmation"),`${this.i18nService.t("remove")} ${this.sponsoringOrg.familySponsorshipFriendlyName}?`,this.i18nService.t("remove"),this.i18nService.t("cancel"),"warning"))&&(yield this.apiService.deleteRevokeSponsorship(this.sponsoringOrg.id),this.platformUtilsService.showToast("success",null,this.i18nService.t("reclaimedFreePlan")),this.sponsorshipRemoved.emit())}))}setStatus(e,t,n,i){t&&n?(this.statusMessage=this.i18nService.t("revokeWhenExpired",r.formatDate(n,"MM/dd/yyyy",this.i18nService.locale)),this.statusClass="text-danger"):t?(this.statusMessage=this.i18nService.t("requestRemoved"),this.statusClass="text-danger"):n?(this.statusMessage=this.i18nService.t("active"),this.statusClass="text-success"):e&&i?(this.statusMessage=this.i18nService.t("sent"),this.statusClass="text-success"):e?(this.statusMessage=this.i18nService.t("requested"),this.statusClass="text-success"):(this.statusMessage=this.i18nService.t("sent"),this.statusClass="text-success")}}t.SponsoringOrgRowComponent=g,g.ɵfac=function(e){return new(e||g)(a.ɵɵdirectiveInject(s.ApiService),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(c.LogService),a.ɵɵdirectiveInject(d.PlatformUtilsService))},g.ɵcmp=a.ɵɵdefineComponent({type:g,selectors:[["","sponsoring-org-row",""]],inputs:{sponsoringOrg:"sponsoringOrg",isSelfHosted:"isSelfHosted"},outputs:{sponsorshipRemoved:"sponsorshipRemoved"},attrs:["sponsoring-org-row",""],decls:37,vars:18,consts:[[3,"ngClass"],[1,"table-action-right"],["appListDropdown","",1,"dropdown"],["class","btn btn-outline-secondary dropdown-toggle","type","button","id","dropdownMenuButton","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",3,"appA11yTitle",4,"ngIf"],["aria-labelledby","dropdownMenuButton",1,"dropdown-menu","dropdown-menu-right"],["class","dropdown-item btn-submit",3,"appApiAction","disabled","click",4,"ngIf"],[1,"dropdown-item","text-danger","btn-submit",3,"appApiAction","disabled","click"],["revokeSponsorshipBtn",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","id","dropdownMenuButton","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-cog","bwi-lg"],[1,"dropdown-item","btn-submit",3,"appApiAction","disabled","click"],["resendEmailBtn",""]],template:function(e,t){if(1&e&&(a.ɵɵelementStart(0,"td"),a.ɵɵtext(1),a.ɵɵelementEnd(),a.ɵɵtext(2,"\n"),a.ɵɵelementStart(3,"td"),a.ɵɵtext(4),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n"),a.ɵɵelementStart(6,"td"),a.ɵɵtext(7,"\n "),a.ɵɵelementStart(8,"span",0),a.ɵɵtext(9),a.ɵɵelementEnd(),a.ɵɵtext(10,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(11,"\n"),a.ɵɵelementStart(12,"td",1),a.ɵɵtext(13,"\n "),a.ɵɵelementStart(14,"div",2),a.ɵɵtext(15,"\n "),a.ɵɵtemplate(16,v,5,3,"button",3),a.ɵɵtext(17,"\n "),a.ɵɵelementStart(18,"div",4),a.ɵɵtext(19,"\n "),a.ɵɵtemplate(20,f,11,12,"button",5),a.ɵɵtext(21,"\n "),a.ɵɵelementStart(22,"button",6,7),a.ɵɵlistener("click",(function(){return t.revokeSponsorship()})),a.ɵɵpipe(24,"i18n"),a.ɵɵtext(25,"\n "),a.ɵɵelement(26,"i",8),a.ɵɵpipe(27,"i18n"),a.ɵɵtext(28,"\n "),a.ɵɵelementStart(29,"span"),a.ɵɵtext(30),a.ɵɵpipe(31,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(32,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(33,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(34,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(35,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(36,"\n")),2&e){const e=a.ɵɵreference(23);a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",t.sponsoringOrg.familySponsorshipFriendlyName,"\n"),a.ɵɵadvance(3),a.ɵɵtextInterpolate(t.sponsoringOrg.name),a.ɵɵadvance(4),a.ɵɵproperty("ngClass",t.statusClass),a.ɵɵadvance(1),a.ɵɵtextInterpolate(t.statusMessage),a.ɵɵadvance(7),a.ɵɵproperty("ngIf",!t.sponsoringOrg.familySponsorshipToDelete),a.ɵɵadvance(4),a.ɵɵproperty("ngIf",!t.isSelfHosted&&!t.sponsoringOrg.familySponsorshipValidUntil),a.ɵɵadvance(2),a.ɵɵproperty("appApiAction",t.revokeSponsorshipPromise)("disabled",e.loading),a.ɵɵattribute("aria-label",a.ɵɵpipeBind2(24,11,"revokeAccount",t.sponsoringOrg.familySponsorshipFriendlyName)),a.ɵɵadvance(4),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(27,14,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(31,16,"remove"))}},directives:[p.NgClass,p.NgIf,u.ApiActionDirective,m.A11yTitleDirective],pipes:[h.I18nPipe],encapsulation:2})},63067:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SubscriptionRoutingModule=void 0;const i=n(68012),r=n(88691),o=n(28800),a=n(31960),s=n(89805),l=n(67562),c=n(32621),d=(n(68012),[{path:"",component:a.SubscriptionComponent,data:{titleId:"subscription"},children:[{path:"",pathMatch:"full",redirectTo:"premium"},{path:"user-subscription",component:l.UserSubscriptionComponent,data:{titleId:"premiumMembership"}},{path:"premium",component:o.PremiumComponent,data:{titleId:"goPremium"}},{path:"payment-method",component:r.PaymentMethodComponent,data:{titleId:"paymentMethod"}},{path:"billing-history",component:s.UserBillingHistoryComponent,data:{titleId:"billingHistory"}}]}]);class p{}t.SubscriptionRoutingModule=p,p.ɵfac=function(e){return new(e||p)},p.ɵmod=c.ɵɵdefineNgModule({type:p}),p.ɵinj=c.ɵɵdefineInjector({imports:[[i.RouterModule.forChild(d)],i.RouterModule]})},31960:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SubscriptionComponent=void 0;n(73828),n(30694);const r=n(32621),o=n(30694),a=n(73828),s=n(57490),l=n(68012),c=n(99729);function d(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",1),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"ul",2),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"li",3),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"a",4),r.ɵɵtext(7),r.ɵɵpipe(8,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(10,"\n "),r.ɵɵelementStart(11,"li",3),r.ɵɵtext(12,"\n "),r.ɵɵelementStart(13,"a",5),r.ɵɵtext(14),r.ɵɵpipe(15,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(16,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(17,"\n "),r.ɵɵelementStart(18,"li",3),r.ɵɵtext(19,"\n "),r.ɵɵelementStart(20,"a",6),r.ɵɵtext(21),r.ɵɵpipe(22,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(23,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(24,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(25,"\n"),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(6),r.ɵɵproperty("routerLink",e.subscriptionRoute),r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(8,4,"subscription"),"\n "),r.ɵɵadvance(7),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(15,6,"paymentMethod"),"\n "),r.ɵɵadvance(7),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(22,8,"billingHistory"),"\n ")}}class p{constructor(e,t){this.tokenService=e,this.platformUtilsService=t}ngOnInit(){return i(this,void 0,void 0,(function*(){this.hasPremium=yield this.tokenService.getPremium(),this.selfHosted=this.platformUtilsService.isSelfHost()}))}get subscriptionRoute(){return this.hasPremium?"user-subscription":"premium"}}t.SubscriptionComponent=p,p.ɵfac=function(e){return new(e||p)(r.ɵɵdirectiveInject(o.TokenService),r.ɵɵdirectiveInject(a.PlatformUtilsService))},p.ɵcmp=r.ɵɵdefineComponent({type:p,selectors:[["app-subscription"]],decls:4,vars:1,consts:[["class","tabbed-nav d-flex flex-column",4,"ngIf"],[1,"tabbed-nav","d-flex","flex-column"],[1,"nav","nav-tabs"],[1,"nav-item"],["routerLinkActive","active",1,"nav-link",3,"routerLink"],["routerLink","payment-method","routerLinkActive","active",1,"nav-link"],["routerLink","billing-history","routerLinkActive","active",1,"nav-link"]],template:function(e,t){1&e&&(r.ɵɵtemplate(0,d,26,10,"div",0),r.ɵɵtext(1,"\n"),r.ɵɵelement(2,"router-outlet"),r.ɵɵtext(3,"\n")),2&e&&r.ɵɵproperty("ngIf",!t.selfHosted)},directives:[s.NgIf,l.RouterOutlet,l.RouterLinkWithHref,l.RouterLinkActive],pipes:[c.I18nPipe],encapsulation:2})},41799:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TaxInfoComponent=void 0;const r=n(32621),o=(n(68012),n(91674),n(36631),n(91260)),a=n(26374),s=n(32621),l=n(91674),c=n(68012),d=n(36631),p=n(96832),u=n(57490),m=n(99729);function h(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",1),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",261),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"input",262),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().taxInfo.includeTaxId=t})),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"label",263),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(4),s.ɵɵproperty("ngModel",e.taxInfo.includeTaxId),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,2,"includeVAT"))}}function v(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",1),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"div",2),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"label",264),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"input",265),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().taxInfo.taxId=t})),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n"),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,2,"taxIdNumber")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.taxInfo.taxId)}}function f(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",1),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"div",2),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"label",266),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"input",267),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().taxInfo.line1=t})),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n "),s.ɵɵelementStart(14,"div",1),s.ɵɵtext(15,"\n "),s.ɵɵelementStart(16,"div",2),s.ɵɵtext(17,"\n "),s.ɵɵelementStart(18,"label",268),s.ɵɵtext(19),s.ɵɵpipe(20,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementStart(22,"input",269),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().taxInfo.line2=t})),s.ɵɵelementEnd(),s.ɵɵtext(23,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(24,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(25,"\n "),s.ɵɵelementStart(26,"div",1),s.ɵɵtext(27,"\n "),s.ɵɵelementStart(28,"div",2),s.ɵɵtext(29,"\n "),s.ɵɵelementStart(30,"label",270),s.ɵɵtext(31),s.ɵɵpipe(32,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(33,"\n "),s.ɵɵelementStart(34,"input",271),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().taxInfo.city=t})),s.ɵɵelementEnd(),s.ɵɵtext(35,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(36,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(37,"\n "),s.ɵɵelementStart(38,"div",1),s.ɵɵtext(39,"\n "),s.ɵɵelementStart(40,"div",2),s.ɵɵtext(41,"\n "),s.ɵɵelementStart(42,"label",272),s.ɵɵtext(43),s.ɵɵpipe(44,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(45,"\n "),s.ɵɵelementStart(46,"input",273),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().taxInfo.state=t})),s.ɵɵelementEnd(),s.ɵɵtext(47,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(48,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(49,"\n"),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,8,"address1")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.taxInfo.line1),s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(20,10,"address2")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.taxInfo.line2),s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(32,12,"cityTown")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.taxInfo.city),s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(44,14,"stateProvince")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.taxInfo.state)}}class g{constructor(e,t,n){this.apiService=e,this.route=t,this.logService=n,this.onCountryChanged=new r.EventEmitter,this.loading=!0,this.taxInfo={taxId:null,line1:null,line2:null,city:null,state:null,postalCode:null,country:"US",includeTaxId:!1},this.pristine={taxId:null,line1:null,line2:null,city:null,state:null,postalCode:null,country:"US",includeTaxId:!1}}ngOnInit(){return i(this,void 0,void 0,(function*(){this.route.parent.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){if(this.organizationId=e.organizationId,this.organizationId)try{const e=yield this.apiService.getOrganizationTaxInfo(this.organizationId);e&&(this.taxInfo.taxId=e.taxId,this.taxInfo.state=e.state,this.taxInfo.line1=e.line1,this.taxInfo.line2=e.line2,this.taxInfo.city=e.city,this.taxInfo.state=e.state,this.taxInfo.postalCode=e.postalCode,this.taxInfo.country=e.country||"US",this.taxInfo.includeTaxId=!("US"===this.taxInfo.country||!e.taxId&&!e.line1&&!e.line2&&!e.city&&!e.state))}catch(t){this.logService.error(t)}else try{const e=yield this.apiService.getTaxInfo();e&&(this.taxInfo.postalCode=e.postalCode,this.taxInfo.country=e.country||"US")}catch(t){this.logService.error(t)}this.pristine=Object.assign({},this.taxInfo),"US"!==this.taxInfo.country&&this.onCountryChanged.emit()}))));try{const e=yield this.apiService.getTaxRates();e&&(this.taxRates=e.data)}catch(e){this.logService.error(e)}finally{this.loading=!1}}))}get taxRate(){var e;if(null!=this.taxRates){const t=this.taxRates.find((e=>e.country===this.taxInfo.country&&e.postalCode===this.taxInfo.postalCode));return null!==(e=null==t?void 0:t.rate)&&void 0!==e?e:null}}getTaxInfoRequest(){if(this.organizationId){const e=new o.OrganizationTaxInfoUpdateRequest;return e.taxId=this.taxInfo.taxId,e.state=this.taxInfo.state,e.line1=this.taxInfo.line1,e.line2=this.taxInfo.line2,e.city=this.taxInfo.city,e.state=this.taxInfo.state,e.postalCode=this.taxInfo.postalCode,e.country=this.taxInfo.country,e}{const e=new a.TaxInfoUpdateRequest;return e.postalCode=this.taxInfo.postalCode,e.country=this.taxInfo.country,e}}submitTaxInfo(){if(!this.hasChanged())return new Promise((e=>{e()}));const e=this.getTaxInfoRequest();return this.organizationId?this.apiService.putOrganizationTaxInfo(this.organizationId,e):this.apiService.putTaxInfo(e)}changeCountry(){"US"===this.taxInfo.country&&(this.taxInfo.includeTaxId=!1,this.taxInfo.taxId=null,this.taxInfo.line1=null,this.taxInfo.line2=null,this.taxInfo.city=null,this.taxInfo.state=null),this.onCountryChanged.emit()}hasChanged(){for(const e in this.taxInfo)if(this.pristine.hasOwnProperty(e)&&this.pristine[e]!==this.taxInfo[e])return!0;return!1}}t.TaxInfoComponent=g,g.ɵfac=function(e){return new(e||g)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.ActivatedRoute),s.ɵɵdirectiveInject(d.LogService))},g.ɵcmp=s.ɵɵdefineComponent({type:g,selectors:[["app-tax-info"]],outputs:{onCountryChanged:"onCountryChanged"},decls:786,vars:12,consts:[[1,"row"],[1,"col-6"],[1,"form-group"],["for","addressCountry"],["id","addressCountry","required","","name","addressCountry","autocomplete","country",1,"form-control",3,"ngModel","ngModelChange","change"],["value",""],["value","US"],["value","CN"],["value","FR"],["value","DE"],["value","CA"],["value","GB"],["value","AU"],["value","IN"],["value","-","disabled",""],["value","AF"],["value","AX"],["value","AL"],["value","DZ"],["value","AS"],["value","AD"],["value","AO"],["value","AI"],["value","AQ"],["value","AG"],["value","AR"],["value","AM"],["value","AW"],["value","AT"],["value","AZ"],["value","BS"],["value","BH"],["value","BD"],["value","BB"],["value","BY"],["value","BE"],["value","BZ"],["value","BJ"],["value","BM"],["value","BT"],["value","BO"],["value","BQ"],["value","BA"],["value","BW"],["value","BV"],["value","BR"],["value","IO"],["value","BN"],["value","BG"],["value","BF"],["value","BI"],["value","KH"],["value","CM"],["value","CV"],["value","KY"],["value","CF"],["value","TD"],["value","CL"],["value","CX"],["value","CC"],["value","CO"],["value","KM"],["value","CG"],["value","CD"],["value","CK"],["value","CR"],["value","CI"],["value","HR"],["value","CU"],["value","CW"],["value","CY"],["value","CZ"],["value","DK"],["value","DJ"],["value","DM"],["value","DO"],["value","EC"],["value","EG"],["value","SV"],["value","GQ"],["value","ER"],["value","EE"],["value","ET"],["value","FK"],["value","FO"],["value","FJ"],["value","FI"],["value","GF"],["value","PF"],["value","TF"],["value","GA"],["value","GM"],["value","GE"],["value","GH"],["value","GI"],["value","GR"],["value","GL"],["value","GD"],["value","GP"],["value","GU"],["value","GT"],["value","GG"],["value","GN"],["value","GW"],["value","GY"],["value","HT"],["value","HM"],["value","VA"],["value","HN"],["value","HK"],["value","HU"],["value","IS"],["value","ID"],["value","IR"],["value","IQ"],["value","IE"],["value","IM"],["value","IL"],["value","IT"],["value","JM"],["value","JP"],["value","JE"],["value","JO"],["value","KZ"],["value","KE"],["value","KI"],["value","KP"],["value","KR"],["value","KW"],["value","KG"],["value","LA"],["value","LV"],["value","LB"],["value","LS"],["value","LR"],["value","LY"],["value","LI"],["value","LT"],["value","LU"],["value","MO"],["value","MK"],["value","MG"],["value","MW"],["value","MY"],["value","MV"],["value","ML"],["value","MT"],["value","MH"],["value","MQ"],["value","MR"],["value","MU"],["value","YT"],["value","MX"],["value","FM"],["value","MD"],["value","MC"],["value","MN"],["value","ME"],["value","MS"],["value","MA"],["value","MZ"],["value","MM"],["value","NA"],["value","NR"],["value","NP"],["value","NL"],["value","NC"],["value","NZ"],["value","NI"],["value","NE"],["value","NG"],["value","NU"],["value","NF"],["value","MP"],["value","NO"],["value","OM"],["value","PK"],["value","PW"],["value","PS"],["value","PA"],["value","PG"],["value","PY"],["value","PE"],["value","PH"],["value","PN"],["value","PL"],["value","PT"],["value","PR"],["value","QA"],["value","RE"],["value","RO"],["value","RU"],["value","RW"],["value","BL"],["value","SH"],["value","KN"],["value","LC"],["value","MF"],["value","PM"],["value","VC"],["value","WS"],["value","SM"],["value","ST"],["value","SA"],["value","SN"],["value","RS"],["value","SC"],["value","SL"],["value","SG"],["value","SX"],["value","SK"],["value","SI"],["value","SB"],["value","SO"],["value","ZA"],["value","GS"],["value","SS"],["value","ES"],["value","LK"],["value","SD"],["value","SR"],["value","SJ"],["value","SZ"],["value","SE"],["value","CH"],["value","SY"],["value","TW"],["value","TJ"],["value","TZ"],["value","TH"],["value","TL"],["value","TG"],["value","TK"],["value","TO"],["value","TT"],["value","TN"],["value","TR"],["value","TM"],["value","TC"],["value","TV"],["value","UG"],["value","UA"],["value","AE"],["value","UM"],["value","UY"],["value","UZ"],["value","VU"],["value","VE"],["value","VN"],["value","VG"],["value","VI"],["value","WF"],["value","EH"],["value","YE"],["value","ZM"],["value","ZW"],[1,"col-3"],["for","addressPostalCode"],["id","addressPostalCode","type","text","name","addressPostalCode","autocomplete","postal-code",1,"form-control",3,"ngModel","required","ngModelChange"],["class","col-6",4,"ngIf"],["class","row",4,"ngIf"],[1,"form-group","form-check"],["id","addressIncludeTaxId","name","addressIncludeTaxId","type","checkbox",1,"form-check-input",3,"ngModel","ngModelChange"],["for","addressIncludeTaxId",1,"form-check-label"],["for","taxId"],["id","taxId","type","text","name","taxId",1,"form-control",3,"ngModel","ngModelChange"],["for","addressLine1"],["id","addressLine1","type","text","name","addressLine1","autocomplete","address-line1",1,"form-control",3,"ngModel","ngModelChange"],["for","addressLine2"],["id","addressLine2","type","text","name","addressLine2","autocomplete","address-line2",1,"form-control",3,"ngModel","ngModelChange"],["for","addressCity"],["id","addressCity","type","text","name","addressCity","autocomplete","address-level2",1,"form-control",3,"ngModel","ngModelChange"],["for","addressState"],["id","addressState","type","text","name","addressState","autocomplete","address-level1",1,"form-control",3,"ngModel","ngModelChange"]],template:function(e,t){if(1&e){s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",1),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"div",2),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"label",3),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"select",4),s.ɵɵlistener("ngModelChange",(function(e){return t.taxInfo.country=e}))("change",(function(){return t.changeCountry()})),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"option",5),s.ɵɵtext(13,"-- Select --"),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"option",6),s.ɵɵtext(16,"United States"),s.ɵɵelementEnd(),s.ɵɵtext(17,"\n "),s.ɵɵelementStart(18,"option",7),s.ɵɵtext(19,"China"),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵelementStart(21,"option",8),s.ɵɵtext(22,"France"),s.ɵɵelementEnd(),s.ɵɵtext(23,"\n "),s.ɵɵelementStart(24,"option",9),s.ɵɵtext(25,"Germany"),s.ɵɵelementEnd(),s.ɵɵtext(26,"\n "),s.ɵɵelementStart(27,"option",10),s.ɵɵtext(28,"Canada"),s.ɵɵelementEnd(),s.ɵɵtext(29,"\n "),s.ɵɵelementStart(30,"option",11),s.ɵɵtext(31,"United Kingdom"),s.ɵɵelementEnd(),s.ɵɵtext(32,"\n "),s.ɵɵelementStart(33,"option",12),s.ɵɵtext(34,"Australia"),s.ɵɵelementEnd(),s.ɵɵtext(35,"\n "),s.ɵɵelementStart(36,"option",13),s.ɵɵtext(37,"India"),s.ɵɵelementEnd(),s.ɵɵtext(38,"\n "),s.ɵɵelement(39,"option",14),s.ɵɵtext(40,"\n "),s.ɵɵelementStart(41,"option",15),s.ɵɵtext(42,"Afghanistan"),s.ɵɵelementEnd(),s.ɵɵtext(43,"\n "),s.ɵɵelementStart(44,"option",16),s.ɵɵtext(45,"Åland Islands"),s.ɵɵelementEnd(),s.ɵɵtext(46,"\n "),s.ɵɵelementStart(47,"option",17),s.ɵɵtext(48,"Albania"),s.ɵɵelementEnd(),s.ɵɵtext(49,"\n "),s.ɵɵelementStart(50,"option",18),s.ɵɵtext(51,"Algeria"),s.ɵɵelementEnd(),s.ɵɵtext(52,"\n "),s.ɵɵelementStart(53,"option",19),s.ɵɵtext(54,"American Samoa"),s.ɵɵelementEnd(),s.ɵɵtext(55,"\n "),s.ɵɵelementStart(56,"option",20),s.ɵɵtext(57,"Andorra"),s.ɵɵelementEnd(),s.ɵɵtext(58,"\n "),s.ɵɵelementStart(59,"option",21),s.ɵɵtext(60,"Angola"),s.ɵɵelementEnd(),s.ɵɵtext(61,"\n "),s.ɵɵelementStart(62,"option",22),s.ɵɵtext(63,"Anguilla"),s.ɵɵelementEnd(),s.ɵɵtext(64,"\n "),s.ɵɵelementStart(65,"option",23),s.ɵɵtext(66,"Antarctica"),s.ɵɵelementEnd(),s.ɵɵtext(67,"\n "),s.ɵɵelementStart(68,"option",24),s.ɵɵtext(69,"Antigua and Barbuda"),s.ɵɵelementEnd(),s.ɵɵtext(70,"\n "),s.ɵɵelementStart(71,"option",25),s.ɵɵtext(72,"Argentina"),s.ɵɵelementEnd(),s.ɵɵtext(73,"\n "),s.ɵɵelementStart(74,"option",26),s.ɵɵtext(75,"Armenia"),s.ɵɵelementEnd(),s.ɵɵtext(76,"\n "),s.ɵɵelementStart(77,"option",27),s.ɵɵtext(78,"Aruba"),s.ɵɵelementEnd(),s.ɵɵtext(79,"\n "),s.ɵɵelementStart(80,"option",28),s.ɵɵtext(81,"Austria"),s.ɵɵelementEnd(),s.ɵɵtext(82,"\n "),s.ɵɵelementStart(83,"option",29),s.ɵɵtext(84,"Azerbaijan"),s.ɵɵelementEnd(),s.ɵɵtext(85,"\n "),s.ɵɵelementStart(86,"option",30),s.ɵɵtext(87,"Bahamas"),s.ɵɵelementEnd(),s.ɵɵtext(88,"\n "),s.ɵɵelementStart(89,"option",31),s.ɵɵtext(90,"Bahrain"),s.ɵɵelementEnd(),s.ɵɵtext(91,"\n "),s.ɵɵelementStart(92,"option",32),s.ɵɵtext(93,"Bangladesh"),s.ɵɵelementEnd(),s.ɵɵtext(94,"\n "),s.ɵɵelementStart(95,"option",33),s.ɵɵtext(96,"Barbados"),s.ɵɵelementEnd(),s.ɵɵtext(97,"\n "),s.ɵɵelementStart(98,"option",34),s.ɵɵtext(99,"Belarus"),s.ɵɵelementEnd(),s.ɵɵtext(100,"\n "),s.ɵɵelementStart(101,"option",35),s.ɵɵtext(102,"Belgium"),s.ɵɵelementEnd(),s.ɵɵtext(103,"\n "),s.ɵɵelementStart(104,"option",36),s.ɵɵtext(105,"Belize"),s.ɵɵelementEnd(),s.ɵɵtext(106,"\n "),s.ɵɵelementStart(107,"option",37),s.ɵɵtext(108,"Benin"),s.ɵɵelementEnd(),s.ɵɵtext(109,"\n "),s.ɵɵelementStart(110,"option",38),s.ɵɵtext(111,"Bermuda"),s.ɵɵelementEnd(),s.ɵɵtext(112,"\n "),s.ɵɵelementStart(113,"option",39),s.ɵɵtext(114,"Bhutan"),s.ɵɵelementEnd(),s.ɵɵtext(115,"\n "),s.ɵɵelementStart(116,"option",40),s.ɵɵtext(117,"Bolivia, Plurinational State of"),s.ɵɵelementEnd(),s.ɵɵtext(118,"\n "),s.ɵɵelementStart(119,"option",41),s.ɵɵtext(120,"Bonaire, Sint Eustatius and Saba"),s.ɵɵelementEnd(),s.ɵɵtext(121,"\n "),s.ɵɵelementStart(122,"option",42),s.ɵɵtext(123,"Bosnia and Herzegovina"),s.ɵɵelementEnd(),s.ɵɵtext(124,"\n "),s.ɵɵelementStart(125,"option",43),s.ɵɵtext(126,"Botswana"),s.ɵɵelementEnd(),s.ɵɵtext(127,"\n "),s.ɵɵelementStart(128,"option",44),s.ɵɵtext(129,"Bouvet Island"),s.ɵɵelementEnd(),s.ɵɵtext(130,"\n "),s.ɵɵelementStart(131,"option",45),s.ɵɵtext(132,"Brazil"),s.ɵɵelementEnd(),s.ɵɵtext(133,"\n "),s.ɵɵelementStart(134,"option",46),s.ɵɵtext(135,"British Indian Ocean Territory"),s.ɵɵelementEnd(),s.ɵɵtext(136,"\n "),s.ɵɵelementStart(137,"option",47),s.ɵɵtext(138,"Brunei Darussalam"),s.ɵɵelementEnd(),s.ɵɵtext(139,"\n "),s.ɵɵelementStart(140,"option",48),s.ɵɵtext(141,"Bulgaria"),s.ɵɵelementEnd(),s.ɵɵtext(142,"\n "),s.ɵɵelementStart(143,"option",49),s.ɵɵtext(144,"Burkina Faso"),s.ɵɵelementEnd(),s.ɵɵtext(145,"\n "),s.ɵɵelementStart(146,"option",50),s.ɵɵtext(147,"Burundi"),s.ɵɵelementEnd(),s.ɵɵtext(148,"\n "),s.ɵɵelementStart(149,"option",51),s.ɵɵtext(150,"Cambodia"),s.ɵɵelementEnd(),s.ɵɵtext(151,"\n "),s.ɵɵelementStart(152,"option",52),s.ɵɵtext(153,"Cameroon"),s.ɵɵelementEnd(),s.ɵɵtext(154,"\n "),s.ɵɵelementStart(155,"option",53),s.ɵɵtext(156,"Cape Verde"),s.ɵɵelementEnd(),s.ɵɵtext(157,"\n "),s.ɵɵelementStart(158,"option",54),s.ɵɵtext(159,"Cayman Islands"),s.ɵɵelementEnd(),s.ɵɵtext(160,"\n "),s.ɵɵelementStart(161,"option",55),s.ɵɵtext(162,"Central African Republic"),s.ɵɵelementEnd(),s.ɵɵtext(163,"\n "),s.ɵɵelementStart(164,"option",56),s.ɵɵtext(165,"Chad"),s.ɵɵelementEnd(),s.ɵɵtext(166,"\n "),s.ɵɵelementStart(167,"option",57),s.ɵɵtext(168,"Chile"),s.ɵɵelementEnd(),s.ɵɵtext(169,"\n "),s.ɵɵelementStart(170,"option",58),s.ɵɵtext(171,"Christmas Island"),s.ɵɵelementEnd(),s.ɵɵtext(172,"\n "),s.ɵɵelementStart(173,"option",59),s.ɵɵtext(174,"Cocos (Keeling) Islands"),s.ɵɵelementEnd(),s.ɵɵtext(175,"\n "),s.ɵɵelementStart(176,"option",60),s.ɵɵtext(177,"Colombia"),s.ɵɵelementEnd(),s.ɵɵtext(178,"\n "),s.ɵɵelementStart(179,"option",61),s.ɵɵtext(180,"Comoros"),s.ɵɵelementEnd(),s.ɵɵtext(181,"\n "),s.ɵɵelementStart(182,"option",62),s.ɵɵtext(183,"Congo"),s.ɵɵelementEnd(),s.ɵɵtext(184,"\n "),s.ɵɵelementStart(185,"option",63),s.ɵɵtext(186,"Congo, the Democratic Republic of the"),s.ɵɵelementEnd(),s.ɵɵtext(187,"\n "),s.ɵɵelementStart(188,"option",64),s.ɵɵtext(189,"Cook Islands"),s.ɵɵelementEnd(),s.ɵɵtext(190,"\n "),s.ɵɵelementStart(191,"option",65),s.ɵɵtext(192,"Costa Rica"),s.ɵɵelementEnd(),s.ɵɵtext(193,"\n "),s.ɵɵelementStart(194,"option",66),s.ɵɵtext(195,"Côte d'Ivoire"),s.ɵɵelementEnd(),s.ɵɵtext(196,"\n "),s.ɵɵelementStart(197,"option",67),s.ɵɵtext(198,"Croatia"),s.ɵɵelementEnd(),s.ɵɵtext(199,"\n "),s.ɵɵelementStart(200,"option",68),s.ɵɵtext(201,"Cuba"),s.ɵɵelementEnd(),s.ɵɵtext(202,"\n "),s.ɵɵelementStart(203,"option",69),s.ɵɵtext(204,"Curaçao"),s.ɵɵelementEnd(),s.ɵɵtext(205,"\n "),s.ɵɵelementStart(206,"option",70),s.ɵɵtext(207,"Cyprus"),s.ɵɵelementEnd(),s.ɵɵtext(208,"\n "),s.ɵɵelementStart(209,"option",71),s.ɵɵtext(210,"Czech Republic"),s.ɵɵelementEnd(),s.ɵɵtext(211,"\n "),s.ɵɵelementStart(212,"option",72),s.ɵɵtext(213,"Denmark"),s.ɵɵelementEnd(),s.ɵɵtext(214,"\n "),s.ɵɵelementStart(215,"option",73),s.ɵɵtext(216,"Djibouti"),s.ɵɵelementEnd(),s.ɵɵtext(217,"\n "),s.ɵɵelementStart(218,"option",74),s.ɵɵtext(219,"Dominica"),s.ɵɵelementEnd(),s.ɵɵtext(220,"\n "),s.ɵɵelementStart(221,"option",75),s.ɵɵtext(222,"Dominican Republic"),s.ɵɵelementEnd(),s.ɵɵtext(223,"\n "),s.ɵɵelementStart(224,"option",76),s.ɵɵtext(225,"Ecuador"),s.ɵɵelementEnd(),s.ɵɵtext(226,"\n "),s.ɵɵelementStart(227,"option",77),s.ɵɵtext(228,"Egypt"),s.ɵɵelementEnd(),s.ɵɵtext(229,"\n "),s.ɵɵelementStart(230,"option",78),s.ɵɵtext(231,"El Salvador"),s.ɵɵelementEnd(),s.ɵɵtext(232,"\n "),s.ɵɵelementStart(233,"option",79),s.ɵɵtext(234,"Equatorial Guinea"),s.ɵɵelementEnd(),s.ɵɵtext(235,"\n "),s.ɵɵelementStart(236,"option",80),s.ɵɵtext(237,"Eritrea"),s.ɵɵelementEnd(),s.ɵɵtext(238,"\n "),s.ɵɵelementStart(239,"option",81),s.ɵɵtext(240,"Estonia"),s.ɵɵelementEnd(),s.ɵɵtext(241,"\n "),s.ɵɵelementStart(242,"option",82),s.ɵɵtext(243,"Ethiopia"),s.ɵɵelementEnd(),s.ɵɵtext(244,"\n "),s.ɵɵelementStart(245,"option",83),s.ɵɵtext(246,"Falkland Islands (Malvinas)"),s.ɵɵelementEnd(),s.ɵɵtext(247,"\n "),s.ɵɵelementStart(248,"option",84),s.ɵɵtext(249,"Faroe Islands"),s.ɵɵelementEnd(),s.ɵɵtext(250,"\n "),s.ɵɵelementStart(251,"option",85),s.ɵɵtext(252,"Fiji"),s.ɵɵelementEnd(),s.ɵɵtext(253,"\n "),s.ɵɵelementStart(254,"option",86),s.ɵɵtext(255,"Finland"),s.ɵɵelementEnd(),s.ɵɵtext(256,"\n "),s.ɵɵelementStart(257,"option",87),s.ɵɵtext(258,"French Guiana"),s.ɵɵelementEnd(),s.ɵɵtext(259,"\n "),s.ɵɵelementStart(260,"option",88),s.ɵɵtext(261,"French Polynesia"),s.ɵɵelementEnd(),s.ɵɵtext(262,"\n "),s.ɵɵelementStart(263,"option",89),s.ɵɵtext(264,"French Southern Territories"),s.ɵɵelementEnd(),s.ɵɵtext(265,"\n "),s.ɵɵelementStart(266,"option",90),s.ɵɵtext(267,"Gabon"),s.ɵɵelementEnd(),s.ɵɵtext(268,"\n "),s.ɵɵelementStart(269,"option",91),s.ɵɵtext(270,"Gambia"),s.ɵɵelementEnd(),s.ɵɵtext(271,"\n "),s.ɵɵelementStart(272,"option",92),s.ɵɵtext(273,"Georgia"),s.ɵɵelementEnd(),s.ɵɵtext(274,"\n "),s.ɵɵelementStart(275,"option",93),s.ɵɵtext(276,"Ghana"),s.ɵɵelementEnd(),s.ɵɵtext(277,"\n "),s.ɵɵelementStart(278,"option",94),s.ɵɵtext(279,"Gibraltar"),s.ɵɵelementEnd(),s.ɵɵtext(280,"\n "),s.ɵɵelementStart(281,"option",95),s.ɵɵtext(282,"Greece"),s.ɵɵelementEnd(),s.ɵɵtext(283,"\n "),s.ɵɵelementStart(284,"option",96),s.ɵɵtext(285,"Greenland"),s.ɵɵelementEnd(),s.ɵɵtext(286,"\n "),s.ɵɵelementStart(287,"option",97),s.ɵɵtext(288,"Grenada"),s.ɵɵelementEnd(),s.ɵɵtext(289,"\n "),s.ɵɵelementStart(290,"option",98),s.ɵɵtext(291,"Guadeloupe"),s.ɵɵelementEnd(),s.ɵɵtext(292,"\n "),s.ɵɵelementStart(293,"option",99),s.ɵɵtext(294,"Guam"),s.ɵɵelementEnd(),s.ɵɵtext(295,"\n "),s.ɵɵelementStart(296,"option",100),s.ɵɵtext(297,"Guatemala"),s.ɵɵelementEnd(),s.ɵɵtext(298,"\n "),s.ɵɵelementStart(299,"option",101),s.ɵɵtext(300,"Guernsey"),s.ɵɵelementEnd(),s.ɵɵtext(301,"\n "),s.ɵɵelementStart(302,"option",102),s.ɵɵtext(303,"Guinea"),s.ɵɵelementEnd(),s.ɵɵtext(304,"\n "),s.ɵɵelementStart(305,"option",103),s.ɵɵtext(306,"Guinea-Bissau"),s.ɵɵelementEnd(),s.ɵɵtext(307,"\n "),s.ɵɵelementStart(308,"option",104),s.ɵɵtext(309,"Guyana"),s.ɵɵelementEnd(),s.ɵɵtext(310,"\n "),s.ɵɵelementStart(311,"option",105),s.ɵɵtext(312,"Haiti"),s.ɵɵelementEnd(),s.ɵɵtext(313,"\n "),s.ɵɵelementStart(314,"option",106),s.ɵɵtext(315,"Heard Island and McDonald Islands"),s.ɵɵelementEnd(),s.ɵɵtext(316,"\n "),s.ɵɵelementStart(317,"option",107),s.ɵɵtext(318,"Holy See (Vatican City State)"),s.ɵɵelementEnd(),s.ɵɵtext(319,"\n "),s.ɵɵelementStart(320,"option",108),s.ɵɵtext(321,"Honduras"),s.ɵɵelementEnd(),s.ɵɵtext(322,"\n "),s.ɵɵelementStart(323,"option",109),s.ɵɵtext(324,"Hong Kong"),s.ɵɵelementEnd(),s.ɵɵtext(325,"\n "),s.ɵɵelementStart(326,"option",110),s.ɵɵtext(327,"Hungary"),s.ɵɵelementEnd(),s.ɵɵtext(328,"\n "),s.ɵɵelementStart(329,"option",111),s.ɵɵtext(330,"Iceland"),s.ɵɵelementEnd(),s.ɵɵtext(331,"\n "),s.ɵɵelementStart(332,"option",112),s.ɵɵtext(333,"Indonesia"),s.ɵɵelementEnd(),s.ɵɵtext(334,"\n "),s.ɵɵelementStart(335,"option",113),s.ɵɵtext(336,"Iran, Islamic Republic of"),s.ɵɵelementEnd(),s.ɵɵtext(337,"\n "),s.ɵɵelementStart(338,"option",114),s.ɵɵtext(339,"Iraq"),s.ɵɵelementEnd(),s.ɵɵtext(340,"\n "),s.ɵɵelementStart(341,"option",115),s.ɵɵtext(342,"Ireland"),s.ɵɵelementEnd(),s.ɵɵtext(343,"\n "),s.ɵɵelementStart(344,"option",116),s.ɵɵtext(345,"Isle of Man"),s.ɵɵelementEnd(),s.ɵɵtext(346,"\n "),s.ɵɵelementStart(347,"option",117),s.ɵɵtext(348,"Israel"),s.ɵɵelementEnd(),s.ɵɵtext(349,"\n "),s.ɵɵelementStart(350,"option",118),s.ɵɵtext(351,"Italy"),s.ɵɵelementEnd(),s.ɵɵtext(352,"\n "),s.ɵɵelementStart(353,"option",119),s.ɵɵtext(354,"Jamaica"),s.ɵɵelementEnd(),s.ɵɵtext(355,"\n "),s.ɵɵelementStart(356,"option",120),s.ɵɵtext(357,"Japan"),s.ɵɵelementEnd(),s.ɵɵtext(358,"\n "),s.ɵɵelementStart(359,"option",121),s.ɵɵtext(360,"Jersey"),s.ɵɵelementEnd(),s.ɵɵtext(361,"\n "),s.ɵɵelementStart(362,"option",122),s.ɵɵtext(363,"Jordan"),s.ɵɵelementEnd(),s.ɵɵtext(364,"\n "),s.ɵɵelementStart(365,"option",123),s.ɵɵtext(366,"Kazakhstan"),s.ɵɵelementEnd(),s.ɵɵtext(367,"\n "),s.ɵɵelementStart(368,"option",124),s.ɵɵtext(369,"Kenya"),s.ɵɵelementEnd(),s.ɵɵtext(370,"\n "),s.ɵɵelementStart(371,"option",125),s.ɵɵtext(372,"Kiribati"),s.ɵɵelementEnd(),s.ɵɵtext(373,"\n "),s.ɵɵelementStart(374,"option",126),s.ɵɵtext(375,"Korea, Democratic People's Republic of"),s.ɵɵelementEnd(),s.ɵɵtext(376,"\n "),s.ɵɵelementStart(377,"option",127),s.ɵɵtext(378,"Korea, Republic of"),s.ɵɵelementEnd(),s.ɵɵtext(379,"\n "),s.ɵɵelementStart(380,"option",128),s.ɵɵtext(381,"Kuwait"),s.ɵɵelementEnd(),s.ɵɵtext(382,"\n "),s.ɵɵelementStart(383,"option",129),s.ɵɵtext(384,"Kyrgyzstan"),s.ɵɵelementEnd(),s.ɵɵtext(385,"\n "),s.ɵɵelementStart(386,"option",130),s.ɵɵtext(387,"Lao People's Democratic Republic"),s.ɵɵelementEnd(),s.ɵɵtext(388,"\n "),s.ɵɵelementStart(389,"option",131),s.ɵɵtext(390,"Latvia"),s.ɵɵelementEnd(),s.ɵɵtext(391,"\n "),s.ɵɵelementStart(392,"option",132),s.ɵɵtext(393,"Lebanon"),s.ɵɵelementEnd(),s.ɵɵtext(394,"\n "),s.ɵɵelementStart(395,"option",133),s.ɵɵtext(396,"Lesotho"),s.ɵɵelementEnd(),s.ɵɵtext(397,"\n "),s.ɵɵelementStart(398,"option",134),s.ɵɵtext(399,"Liberia"),s.ɵɵelementEnd(),s.ɵɵtext(400,"\n "),s.ɵɵelementStart(401,"option",135),s.ɵɵtext(402,"Libya"),s.ɵɵelementEnd(),s.ɵɵtext(403,"\n "),s.ɵɵelementStart(404,"option",136),s.ɵɵtext(405,"Liechtenstein"),s.ɵɵelementEnd(),s.ɵɵtext(406,"\n "),s.ɵɵelementStart(407,"option",137),s.ɵɵtext(408,"Lithuania"),s.ɵɵelementEnd(),s.ɵɵtext(409,"\n "),s.ɵɵelementStart(410,"option",138),s.ɵɵtext(411,"Luxembourg"),s.ɵɵelementEnd(),s.ɵɵtext(412,"\n "),s.ɵɵelementStart(413,"option",139),s.ɵɵtext(414,"Macao"),s.ɵɵelementEnd(),s.ɵɵtext(415,"\n "),s.ɵɵelementStart(416,"option",140),s.ɵɵtext(417,"Macedonia, the former Yugoslav Republic of"),s.ɵɵelementEnd(),s.ɵɵtext(418,"\n "),s.ɵɵelementStart(419,"option",141),s.ɵɵtext(420,"Madagascar"),s.ɵɵelementEnd(),s.ɵɵtext(421,"\n "),s.ɵɵelementStart(422,"option",142),s.ɵɵtext(423,"Malawi"),s.ɵɵelementEnd(),s.ɵɵtext(424,"\n "),s.ɵɵelementStart(425,"option",143),s.ɵɵtext(426,"Malaysia"),s.ɵɵelementEnd(),s.ɵɵtext(427,"\n "),s.ɵɵelementStart(428,"option",144),s.ɵɵtext(429,"Maldives"),s.ɵɵelementEnd(),s.ɵɵtext(430,"\n "),s.ɵɵelementStart(431,"option",145),s.ɵɵtext(432,"Mali"),s.ɵɵelementEnd(),s.ɵɵtext(433,"\n "),s.ɵɵelementStart(434,"option",146),s.ɵɵtext(435,"Malta"),s.ɵɵelementEnd(),s.ɵɵtext(436,"\n "),s.ɵɵelementStart(437,"option",147),s.ɵɵtext(438,"Marshall Islands"),s.ɵɵelementEnd(),s.ɵɵtext(439,"\n "),s.ɵɵelementStart(440,"option",148),s.ɵɵtext(441,"Martinique"),s.ɵɵelementEnd(),s.ɵɵtext(442,"\n "),s.ɵɵelementStart(443,"option",149),s.ɵɵtext(444,"Mauritania"),s.ɵɵelementEnd(),s.ɵɵtext(445,"\n "),s.ɵɵelementStart(446,"option",150),s.ɵɵtext(447,"Mauritius"),s.ɵɵelementEnd(),s.ɵɵtext(448,"\n "),s.ɵɵelementStart(449,"option",151),s.ɵɵtext(450,"Mayotte"),s.ɵɵelementEnd(),s.ɵɵtext(451,"\n "),s.ɵɵelementStart(452,"option",152),s.ɵɵtext(453,"Mexico"),s.ɵɵelementEnd(),s.ɵɵtext(454,"\n "),s.ɵɵelementStart(455,"option",153),s.ɵɵtext(456,"Micronesia, Federated States of"),s.ɵɵelementEnd(),s.ɵɵtext(457,"\n "),s.ɵɵelementStart(458,"option",154),s.ɵɵtext(459,"Moldova, Republic of"),s.ɵɵelementEnd(),s.ɵɵtext(460,"\n "),s.ɵɵelementStart(461,"option",155),s.ɵɵtext(462,"Monaco"),s.ɵɵelementEnd(),s.ɵɵtext(463,"\n "),s.ɵɵelementStart(464,"option",156),s.ɵɵtext(465,"Mongolia"),s.ɵɵelementEnd(),s.ɵɵtext(466,"\n "),s.ɵɵelementStart(467,"option",157),s.ɵɵtext(468,"Montenegro"),s.ɵɵelementEnd(),s.ɵɵtext(469,"\n "),s.ɵɵelementStart(470,"option",158),s.ɵɵtext(471,"Montserrat"),s.ɵɵelementEnd(),s.ɵɵtext(472,"\n "),s.ɵɵelementStart(473,"option",159),s.ɵɵtext(474,"Morocco"),s.ɵɵelementEnd(),s.ɵɵtext(475,"\n "),s.ɵɵelementStart(476,"option",160),s.ɵɵtext(477,"Mozambique"),s.ɵɵelementEnd(),s.ɵɵtext(478,"\n "),s.ɵɵelementStart(479,"option",161),s.ɵɵtext(480,"Myanmar"),s.ɵɵelementEnd(),s.ɵɵtext(481,"\n "),s.ɵɵelementStart(482,"option",162),s.ɵɵtext(483,"Namibia"),s.ɵɵelementEnd(),s.ɵɵtext(484,"\n "),s.ɵɵelementStart(485,"option",163),s.ɵɵtext(486,"Nauru"),s.ɵɵelementEnd(),s.ɵɵtext(487,"\n "),s.ɵɵelementStart(488,"option",164),s.ɵɵtext(489,"Nepal"),s.ɵɵelementEnd(),s.ɵɵtext(490,"\n "),s.ɵɵelementStart(491,"option",165),s.ɵɵtext(492,"Netherlands"),s.ɵɵelementEnd(),s.ɵɵtext(493,"\n "),s.ɵɵelementStart(494,"option",166),s.ɵɵtext(495,"New Caledonia"),s.ɵɵelementEnd(),s.ɵɵtext(496,"\n "),s.ɵɵelementStart(497,"option",167),s.ɵɵtext(498,"New Zealand"),s.ɵɵelementEnd(),s.ɵɵtext(499,"\n "),s.ɵɵelementStart(500,"option",168),s.ɵɵtext(501,"Nicaragua"),s.ɵɵelementEnd(),s.ɵɵtext(502,"\n "),s.ɵɵelementStart(503,"option",169),s.ɵɵtext(504,"Niger"),s.ɵɵelementEnd(),s.ɵɵtext(505,"\n "),s.ɵɵelementStart(506,"option",170),s.ɵɵtext(507,"Nigeria"),s.ɵɵelementEnd(),s.ɵɵtext(508,"\n "),s.ɵɵelementStart(509,"option",171),s.ɵɵtext(510,"Niue"),s.ɵɵelementEnd(),s.ɵɵtext(511,"\n "),s.ɵɵelementStart(512,"option",172),s.ɵɵtext(513,"Norfolk Island"),s.ɵɵelementEnd(),s.ɵɵtext(514,"\n "),s.ɵɵelementStart(515,"option",173),s.ɵɵtext(516,"Northern Mariana Islands"),s.ɵɵelementEnd(),s.ɵɵtext(517,"\n "),s.ɵɵelementStart(518,"option",174),s.ɵɵtext(519,"Norway"),s.ɵɵelementEnd(),s.ɵɵtext(520,"\n "),s.ɵɵelementStart(521,"option",175),s.ɵɵtext(522,"Oman"),s.ɵɵelementEnd(),s.ɵɵtext(523,"\n "),s.ɵɵelementStart(524,"option",176),s.ɵɵtext(525,"Pakistan"),s.ɵɵelementEnd(),s.ɵɵtext(526,"\n "),s.ɵɵelementStart(527,"option",177),s.ɵɵtext(528,"Palau"),s.ɵɵelementEnd(),s.ɵɵtext(529,"\n "),s.ɵɵelementStart(530,"option",178),s.ɵɵtext(531,"Palestinian Territory, Occupied"),s.ɵɵelementEnd(),s.ɵɵtext(532,"\n "),s.ɵɵelementStart(533,"option",179),s.ɵɵtext(534,"Panama"),s.ɵɵelementEnd(),s.ɵɵtext(535,"\n "),s.ɵɵelementStart(536,"option",180),s.ɵɵtext(537,"Papua New Guinea"),s.ɵɵelementEnd(),s.ɵɵtext(538,"\n "),s.ɵɵelementStart(539,"option",181),s.ɵɵtext(540,"Paraguay"),s.ɵɵelementEnd(),s.ɵɵtext(541,"\n "),s.ɵɵelementStart(542,"option",182),s.ɵɵtext(543,"Peru"),s.ɵɵelementEnd(),s.ɵɵtext(544,"\n "),s.ɵɵelementStart(545,"option",183),s.ɵɵtext(546,"Philippines"),s.ɵɵelementEnd(),s.ɵɵtext(547,"\n "),s.ɵɵelementStart(548,"option",184),s.ɵɵtext(549,"Pitcairn"),s.ɵɵelementEnd(),s.ɵɵtext(550,"\n "),s.ɵɵelementStart(551,"option",185),s.ɵɵtext(552,"Poland"),s.ɵɵelementEnd(),s.ɵɵtext(553,"\n "),s.ɵɵelementStart(554,"option",186),s.ɵɵtext(555,"Portugal"),s.ɵɵelementEnd(),s.ɵɵtext(556,"\n "),s.ɵɵelementStart(557,"option",187),s.ɵɵtext(558,"Puerto Rico"),s.ɵɵelementEnd(),s.ɵɵtext(559,"\n "),s.ɵɵelementStart(560,"option",188),s.ɵɵtext(561,"Qatar"),s.ɵɵelementEnd(),s.ɵɵtext(562,"\n "),s.ɵɵelementStart(563,"option",189),s.ɵɵtext(564,"Réunion"),s.ɵɵelementEnd(),s.ɵɵtext(565,"\n "),s.ɵɵelementStart(566,"option",190),s.ɵɵtext(567,"Romania"),s.ɵɵelementEnd(),s.ɵɵtext(568,"\n "),s.ɵɵelementStart(569,"option",191),s.ɵɵtext(570,"Russian Federation"),s.ɵɵelementEnd(),s.ɵɵtext(571,"\n "),s.ɵɵelementStart(572,"option",192),s.ɵɵtext(573,"Rwanda"),s.ɵɵelementEnd(),s.ɵɵtext(574,"\n "),s.ɵɵelementStart(575,"option",193),s.ɵɵtext(576,"Saint Barthélemy"),s.ɵɵelementEnd(),s.ɵɵtext(577,"\n "),s.ɵɵelementStart(578,"option",194),s.ɵɵtext(579,"Saint Helena, Ascension and Tristan da Cunha"),s.ɵɵelementEnd(),s.ɵɵtext(580,"\n "),s.ɵɵelementStart(581,"option",195),s.ɵɵtext(582,"Saint Kitts and Nevis"),s.ɵɵelementEnd(),s.ɵɵtext(583,"\n "),s.ɵɵelementStart(584,"option",196),s.ɵɵtext(585,"Saint Lucia"),s.ɵɵelementEnd(),s.ɵɵtext(586,"\n "),s.ɵɵelementStart(587,"option",197),s.ɵɵtext(588,"Saint Martin (French part)"),s.ɵɵelementEnd(),s.ɵɵtext(589,"\n "),s.ɵɵelementStart(590,"option",198),s.ɵɵtext(591,"Saint Pierre and Miquelon"),s.ɵɵelementEnd(),s.ɵɵtext(592,"\n "),s.ɵɵelementStart(593,"option",199),s.ɵɵtext(594,"Saint Vincent and the Grenadines"),s.ɵɵelementEnd(),s.ɵɵtext(595,"\n "),s.ɵɵelementStart(596,"option",200),s.ɵɵtext(597,"Samoa"),s.ɵɵelementEnd(),s.ɵɵtext(598,"\n "),s.ɵɵelementStart(599,"option",201),s.ɵɵtext(600,"San Marino"),s.ɵɵelementEnd(),s.ɵɵtext(601,"\n ");s.ɵɵelementStart(602,"option",202),s.ɵɵtext(603,"Sao Tome and Principe"),s.ɵɵelementEnd(),s.ɵɵtext(604,"\n "),s.ɵɵelementStart(605,"option",203),s.ɵɵtext(606,"Saudi Arabia"),s.ɵɵelementEnd(),s.ɵɵtext(607,"\n "),s.ɵɵelementStart(608,"option",204),s.ɵɵtext(609,"Senegal"),s.ɵɵelementEnd(),s.ɵɵtext(610,"\n "),s.ɵɵelementStart(611,"option",205),s.ɵɵtext(612,"Serbia"),s.ɵɵelementEnd(),s.ɵɵtext(613,"\n "),s.ɵɵelementStart(614,"option",206),s.ɵɵtext(615,"Seychelles"),s.ɵɵelementEnd(),s.ɵɵtext(616,"\n "),s.ɵɵelementStart(617,"option",207),s.ɵɵtext(618,"Sierra Leone"),s.ɵɵelementEnd(),s.ɵɵtext(619,"\n "),s.ɵɵelementStart(620,"option",208),s.ɵɵtext(621,"Singapore"),s.ɵɵelementEnd(),s.ɵɵtext(622,"\n "),s.ɵɵelementStart(623,"option",209),s.ɵɵtext(624,"Sint Maarten (Dutch part)"),s.ɵɵelementEnd(),s.ɵɵtext(625,"\n "),s.ɵɵelementStart(626,"option",210),s.ɵɵtext(627,"Slovakia"),s.ɵɵelementEnd(),s.ɵɵtext(628,"\n "),s.ɵɵelementStart(629,"option",211),s.ɵɵtext(630,"Slovenia"),s.ɵɵelementEnd(),s.ɵɵtext(631,"\n "),s.ɵɵelementStart(632,"option",212),s.ɵɵtext(633,"Solomon Islands"),s.ɵɵelementEnd(),s.ɵɵtext(634,"\n "),s.ɵɵelementStart(635,"option",213),s.ɵɵtext(636,"Somalia"),s.ɵɵelementEnd(),s.ɵɵtext(637,"\n "),s.ɵɵelementStart(638,"option",214),s.ɵɵtext(639,"South Africa"),s.ɵɵelementEnd(),s.ɵɵtext(640,"\n "),s.ɵɵelementStart(641,"option",215),s.ɵɵtext(642,"South Georgia and the South Sandwich Islands"),s.ɵɵelementEnd(),s.ɵɵtext(643,"\n "),s.ɵɵelementStart(644,"option",216),s.ɵɵtext(645,"South Sudan"),s.ɵɵelementEnd(),s.ɵɵtext(646,"\n "),s.ɵɵelementStart(647,"option",217),s.ɵɵtext(648,"Spain"),s.ɵɵelementEnd(),s.ɵɵtext(649,"\n "),s.ɵɵelementStart(650,"option",218),s.ɵɵtext(651,"Sri Lanka"),s.ɵɵelementEnd(),s.ɵɵtext(652,"\n "),s.ɵɵelementStart(653,"option",219),s.ɵɵtext(654,"Sudan"),s.ɵɵelementEnd(),s.ɵɵtext(655,"\n "),s.ɵɵelementStart(656,"option",220),s.ɵɵtext(657,"Suriname"),s.ɵɵelementEnd(),s.ɵɵtext(658,"\n "),s.ɵɵelementStart(659,"option",221),s.ɵɵtext(660,"Svalbard and Jan Mayen"),s.ɵɵelementEnd(),s.ɵɵtext(661,"\n "),s.ɵɵelementStart(662,"option",222),s.ɵɵtext(663,"Swaziland"),s.ɵɵelementEnd(),s.ɵɵtext(664,"\n "),s.ɵɵelementStart(665,"option",223),s.ɵɵtext(666,"Sweden"),s.ɵɵelementEnd(),s.ɵɵtext(667,"\n "),s.ɵɵelementStart(668,"option",224),s.ɵɵtext(669,"Switzerland"),s.ɵɵelementEnd(),s.ɵɵtext(670,"\n "),s.ɵɵelementStart(671,"option",225),s.ɵɵtext(672,"Syrian Arab Republic"),s.ɵɵelementEnd(),s.ɵɵtext(673,"\n "),s.ɵɵelementStart(674,"option",226),s.ɵɵtext(675,"Taiwan"),s.ɵɵelementEnd(),s.ɵɵtext(676,"\n "),s.ɵɵelementStart(677,"option",227),s.ɵɵtext(678,"Tajikistan"),s.ɵɵelementEnd(),s.ɵɵtext(679,"\n "),s.ɵɵelementStart(680,"option",228),s.ɵɵtext(681,"Tanzania, United Republic of"),s.ɵɵelementEnd(),s.ɵɵtext(682,"\n "),s.ɵɵelementStart(683,"option",229),s.ɵɵtext(684,"Thailand"),s.ɵɵelementEnd(),s.ɵɵtext(685,"\n "),s.ɵɵelementStart(686,"option",230),s.ɵɵtext(687,"Timor-Leste"),s.ɵɵelementEnd(),s.ɵɵtext(688,"\n "),s.ɵɵelementStart(689,"option",231),s.ɵɵtext(690,"Togo"),s.ɵɵelementEnd(),s.ɵɵtext(691,"\n "),s.ɵɵelementStart(692,"option",232),s.ɵɵtext(693,"Tokelau"),s.ɵɵelementEnd(),s.ɵɵtext(694,"\n "),s.ɵɵelementStart(695,"option",233),s.ɵɵtext(696,"Tonga"),s.ɵɵelementEnd(),s.ɵɵtext(697,"\n "),s.ɵɵelementStart(698,"option",234),s.ɵɵtext(699,"Trinidad and Tobago"),s.ɵɵelementEnd(),s.ɵɵtext(700,"\n "),s.ɵɵelementStart(701,"option",235),s.ɵɵtext(702,"Tunisia"),s.ɵɵelementEnd(),s.ɵɵtext(703,"\n "),s.ɵɵelementStart(704,"option",236),s.ɵɵtext(705,"Turkey"),s.ɵɵelementEnd(),s.ɵɵtext(706,"\n "),s.ɵɵelementStart(707,"option",237),s.ɵɵtext(708,"Turkmenistan"),s.ɵɵelementEnd(),s.ɵɵtext(709,"\n "),s.ɵɵelementStart(710,"option",238),s.ɵɵtext(711,"Turks and Caicos Islands"),s.ɵɵelementEnd(),s.ɵɵtext(712,"\n "),s.ɵɵelementStart(713,"option",239),s.ɵɵtext(714,"Tuvalu"),s.ɵɵelementEnd(),s.ɵɵtext(715,"\n "),s.ɵɵelementStart(716,"option",240),s.ɵɵtext(717,"Uganda"),s.ɵɵelementEnd(),s.ɵɵtext(718,"\n "),s.ɵɵelementStart(719,"option",241),s.ɵɵtext(720,"Ukraine"),s.ɵɵelementEnd(),s.ɵɵtext(721,"\n "),s.ɵɵelementStart(722,"option",242),s.ɵɵtext(723,"United Arab Emirates"),s.ɵɵelementEnd(),s.ɵɵtext(724,"\n "),s.ɵɵelementStart(725,"option",243),s.ɵɵtext(726,"United States Minor Outlying Islands"),s.ɵɵelementEnd(),s.ɵɵtext(727,"\n "),s.ɵɵelementStart(728,"option",244),s.ɵɵtext(729,"Uruguay"),s.ɵɵelementEnd(),s.ɵɵtext(730,"\n "),s.ɵɵelementStart(731,"option",245),s.ɵɵtext(732,"Uzbekistan"),s.ɵɵelementEnd(),s.ɵɵtext(733,"\n "),s.ɵɵelementStart(734,"option",246),s.ɵɵtext(735,"Vanuatu"),s.ɵɵelementEnd(),s.ɵɵtext(736,"\n "),s.ɵɵelementStart(737,"option",247),s.ɵɵtext(738,"Venezuela, Bolivarian Republic of"),s.ɵɵelementEnd(),s.ɵɵtext(739,"\n "),s.ɵɵelementStart(740,"option",248),s.ɵɵtext(741,"Viet Nam"),s.ɵɵelementEnd(),s.ɵɵtext(742,"\n "),s.ɵɵelementStart(743,"option",249),s.ɵɵtext(744,"Virgin Islands, British"),s.ɵɵelementEnd(),s.ɵɵtext(745,"\n "),s.ɵɵelementStart(746,"option",250),s.ɵɵtext(747,"Virgin Islands, U.S."),s.ɵɵelementEnd(),s.ɵɵtext(748,"\n "),s.ɵɵelementStart(749,"option",251),s.ɵɵtext(750,"Wallis and Futuna"),s.ɵɵelementEnd(),s.ɵɵtext(751,"\n "),s.ɵɵelementStart(752,"option",252),s.ɵɵtext(753,"Western Sahara"),s.ɵɵelementEnd(),s.ɵɵtext(754,"\n "),s.ɵɵelementStart(755,"option",253),s.ɵɵtext(756,"Yemen"),s.ɵɵelementEnd(),s.ɵɵtext(757,"\n "),s.ɵɵelementStart(758,"option",254),s.ɵɵtext(759,"Zambia"),s.ɵɵelementEnd(),s.ɵɵtext(760,"\n "),s.ɵɵelementStart(761,"option",255),s.ɵɵtext(762,"Zimbabwe"),s.ɵɵelementEnd(),s.ɵɵtext(763,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(764,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(765,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(766,"\n "),s.ɵɵelementStart(767,"div",256),s.ɵɵtext(768,"\n "),s.ɵɵelementStart(769,"div",2),s.ɵɵtext(770,"\n "),s.ɵɵelementStart(771,"label",257),s.ɵɵtext(772),s.ɵɵpipe(773,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(774,"\n "),s.ɵɵelementStart(775,"input",258),s.ɵɵlistener("ngModelChange",(function(e){return t.taxInfo.postalCode=e})),s.ɵɵelementEnd(),s.ɵɵtext(776,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(777,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(778,"\n "),s.ɵɵtemplate(779,h,11,4,"div",259),s.ɵɵtext(780,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(781,"\n"),s.ɵɵtemplate(782,v,14,4,"div",260),s.ɵɵtext(783,"\n"),s.ɵɵtemplate(784,f,50,16,"div",260),s.ɵɵtext(785,"\n")}2&e&&(s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,8,"country")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",t.taxInfo.country),s.ɵɵadvance(762),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(773,10,"zipPostalCode")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",t.taxInfo.postalCode)("required","US"===t.taxInfo.country),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",t.organizationId&&"US"!==t.taxInfo.country),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",t.organizationId&&t.taxInfo.includeTaxId),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.organizationId&&t.taxInfo.includeTaxId))},directives:[p.SelectControlValueAccessor,p.RequiredValidator,p.NgControlStatus,p.NgModel,p.NgSelectOption,p.ɵNgSelectMultipleOption,p.DefaultValueAccessor,u.NgIf,p.CheckboxControlValueAccessor],pipes:[m.I18nPipe],encapsulation:2})},59751:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorAuthenticatorComponent=void 0;n(91674),n(51554),n(36631),n(73828),n(73569),n(57055);const r=n(97374),o=n(57952),a=n(40906),s=n(32621),l=n(91674),c=n(51554),d=n(57055),p=n(73828),u=n(36631),m=n(73569),h=n(8863),v=n(57490),f=n(12720),g=n(96832),y=n(56820),x=n(51626),S=n(48198),b=n(99729);function w(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"app-two-factor-verify",9),s.ɵɵlistener("onAuthed",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().auth(t)})),s.ɵɵtext(1,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵproperty("organizationId",e.organizationId)("type",e.type)}}function C(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"img",28),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"p"),s.ɵɵtext(5),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"p"),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"strong"),s.ɵɵtext(11),s.ɵɵpipe(12,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(6,2,"twoStepAuthenticatorDesc")),s.ɵɵadvance(6),s.ɵɵtextInterpolate1("1. ",s.ɵɵpipeBind1(12,4,"twoStepAuthenticatorDownloadApp"),""))}function I(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"app-callout",29),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"p"),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8),s.ɵɵpipe(9,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n "),s.ɵɵelement(11,"img",28),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"p"),s.ɵɵtext(14),s.ɵɵpipe(15,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(16,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,4,"enabled")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,6,"twoStepLoginProviderEnabled")),s.ɵɵadvance(2),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(9,8,"twoStepAuthenticatorReaddDesc"),"\n "),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(15,10,"twoStepAuthenticatorNeedApp")))}function E(e,t){1&e&&(s.ɵɵelementStart(0,"p"),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"strong"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1("2. ",s.ɵɵpipeBind1(4,1,"twoStepAuthenticatorScanCode"),""))}function P(e,t){1&e&&s.ɵɵelement(0,"hr")}function O(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"label",30),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"input",31),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).token=t})),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelementContainerEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(3),s.ɵɵtextInterpolate1("3. ",s.ɵɵpipeBind1(4,2,"twoStepAuthenticatorEnterCode"),""),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.token)}}function k(e,t){1&e&&(s.ɵɵelementStart(0,"span"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,1,"enable")))}function A(e,t){1&e&&(s.ɵɵelementStart(0,"span"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,1,"disable")))}const T=function(e){return{"mb-0":e}};function M(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"form",10,11),s.ɵɵlistener("ngSubmit",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().submit()})),s.ɵɵtext(2,"\n "),s.ɵɵelementStart(3,"div",12),s.ɵɵtext(4,"\n "),s.ɵɵtemplate(5,C,15,6,"ng-container",13),s.ɵɵtext(6,"\n "),s.ɵɵtemplate(7,I,17,12,"ng-container",13),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"ul",14),s.ɵɵtext(10,"\n "),s.ɵɵelementStart(11,"li"),s.ɵɵtext(12,"\n "),s.ɵɵelement(13,"i",15),s.ɵɵtext(14),s.ɵɵpipe(15,"i18n"),s.ɵɵelementStart(16,"a",16),s.ɵɵtext(17,"Authy"),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(19,"\n "),s.ɵɵelementStart(20,"li"),s.ɵɵtext(21,"\n "),s.ɵɵelement(22,"i",17),s.ɵɵtext(23),s.ɵɵpipe(24,"i18n"),s.ɵɵelementStart(25,"a",18),s.ɵɵtext(26,"Authy"),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(28,"\n "),s.ɵɵelementStart(29,"li"),s.ɵɵtext(30,"\n "),s.ɵɵelement(31,"i",19),s.ɵɵtext(32),s.ɵɵpipe(33,"i18n"),s.ɵɵelementStart(34,"a",20),s.ɵɵtext(35,"Microsoft Authenticator"),s.ɵɵelementEnd(),s.ɵɵtext(36,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(37,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(38,"\n "),s.ɵɵelementStart(39,"p"),s.ɵɵtext(40),s.ɵɵpipe(41,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(42,"\n "),s.ɵɵtemplate(43,E,6,3,"p",13),s.ɵɵtext(44,"\n "),s.ɵɵtemplate(45,P,1,0,"hr",13),s.ɵɵtext(46,"\n "),s.ɵɵelementStart(47,"p",21),s.ɵɵtext(48,"\n "),s.ɵɵelement(49,"canvas",22),s.ɵɵelement(50,"br"),s.ɵɵtext(51,"\n "),s.ɵɵelementStart(52,"code",23),s.ɵɵpipe(53,"i18n"),s.ɵɵtext(54),s.ɵɵelementEnd(),s.ɵɵtext(55,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(56,"\n "),s.ɵɵtemplate(57,O,8,4,"ng-container",13),s.ɵɵtext(58,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(59,"\n "),s.ɵɵelementStart(60,"div",24),s.ɵɵtext(61,"\n "),s.ɵɵelementStart(62,"button",25),s.ɵɵtext(63,"\n "),s.ɵɵelement(64,"i",26),s.ɵɵpipe(65,"i18n"),s.ɵɵtext(66,"\n "),s.ɵɵtemplate(67,k,3,3,"span",13),s.ɵɵtext(68,"\n "),s.ɵɵtemplate(69,A,3,3,"span",13),s.ɵɵtext(70,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(71,"\n "),s.ɵɵelementStart(72,"button",27),s.ɵɵtext(73),s.ɵɵpipe(74,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(75,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(76,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵreference(1),t=s.ɵɵnextContext();s.ɵɵproperty("appApiAction",t.formPromise),s.ɵɵadvance(5),s.ɵɵproperty("ngIf",!t.enabled),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.enabled),s.ɵɵadvance(7),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(15,18,"iosDevices"),":\n "),s.ɵɵadvance(9),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(24,20,"androidDevices"),":\n "),s.ɵɵadvance(9),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(33,22,"windowsDevices"),":\n "),s.ɵɵadvance(8),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(41,24,"twoStepAuthenticatorAppsRecommended")),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!t.enabled),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.enabled),s.ɵɵadvance(2),s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(32,T,t.enabled)),s.ɵɵadvance(5),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(53,26,"key")),s.ɵɵadvance(2),s.ɵɵtextInterpolate(t.key),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!t.enabled),s.ɵɵadvance(5),s.ɵɵproperty("disabled",e.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(65,28,"loading")),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!t.enabled),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.enabled),s.ɵɵadvance(4),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(74,30,"close"),"\n ")}}class B extends a.TwoFactorBaseComponent{constructor(e,t,n,i,o,a){super(e,t,i,o,n),this.stateService=a,this.type=r.TwoFactorProviderType.Authenticator,this.qrScript=window.document.createElement("script"),this.qrScript.src="scripts/qrious.min.js",this.qrScript.async=!0}ngOnInit(){window.document.body.appendChild(this.qrScript)}ngOnDestroy(){window.document.body.removeChild(this.qrScript)}auth(e){return super.auth(e),this.processResponse(e.response)}submit(){return this.enabled?super.disable(this.formPromise):this.enable()}enable(){const e=Object.create(null,{enable:{get:()=>super.enable}});return i(this,void 0,void 0,(function*(){const t=yield this.buildRequestModel(o.UpdateTwoFactorAuthenticatorRequest);return t.token=this.token,t.key=this.key,e.enable.call(this,(()=>i(this,void 0,void 0,(function*(){this.formPromise=this.apiService.putTwoFactorAuthenticator(t);const e=yield this.formPromise;yield this.processResponse(e)}))))}))}processResponse(e){return i(this,void 0,void 0,(function*(){this.token=null,this.enabled=e.enabled,this.key=e.key;const t=yield this.stateService.getEmail();window.setTimeout((()=>{new window.QRious({element:document.getElementById("qr"),value:"otpauth://totp/Bitwarden:"+encodeURIComponent(t)+"?secret="+encodeURIComponent(this.key)+"&issuer=Bitwarden",size:160})}),100)}))}}t.TwoFactorAuthenticatorComponent=B,B.ɵfac=function(e){return new(e||B)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(d.UserVerificationService),s.ɵɵdirectiveInject(p.PlatformUtilsService),s.ɵɵdirectiveInject(u.LogService),s.ɵɵdirectiveInject(m.StateService))},B.ɵcmp=s.ɵɵdefineComponent({type:B,selectors:[["app-two-factor-authenticator"]],features:[s.ɵɵInheritDefinitionFeature],decls:31,vars:11,consts:[["role","dialog","aria-modal","true","aria-labelledby","2faAuthenticatorTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],[1,"modal-content"],[1,"modal-header"],["id","2faAuthenticatorTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[3,"organizationId","type","onAuthed",4,"ngIf"],["ngNativeValidate","",3,"appApiAction","ngSubmit",4,"ngIf"],[3,"organizationId","type","onAuthed"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-body"],[4,"ngIf"],[1,"bwi-ul"],[1,"bwi","bwi-li","bwi-apple"],["href","https://itunes.apple.com/us/app/authy/id494168017?mt=8","target","_blank","rel","noopener"],[1,"bwi","bwi-li","bwi-android"],["href","https://play.google.com/store/apps/details?id=com.authy.authy","target","_blank","rel","noopener"],[1,"bwi","bwi-li","bwi-windows"],["href","https://www.microsoft.com/p/authenticator/9wzdncrfj3rj","target","_blank","rel","noopener"],[1,"text-center",3,"ngClass"],["id","qr"],[3,"appA11yTitle"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["alt","Authenticator app logo",1,"float-right","mfaType0"],["type","success","icon","bwi bwi-check-circle",3,"title"],["for","token"],["id","token","type","text","name","Token","required","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",1),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"div",2),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"div",3),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"h2",4),s.ɵɵtext(9),s.ɵɵpipe(10,"i18n"),s.ɵɵelementStart(11,"small"),s.ɵɵtext(12),s.ɵɵpipe(13,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(15,"\n "),s.ɵɵelementStart(16,"button",5),s.ɵɵpipe(17,"i18n"),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"span",6),s.ɵɵtext(20,"×"),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(23,"\n "),s.ɵɵtemplate(24,w,2,2,"app-two-factor-verify",7),s.ɵɵtext(25,"\n "),s.ɵɵtemplate(26,M,77,34,"form",8),s.ɵɵtext(27,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(28,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(29,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(30,"\n")),2&e&&(s.ɵɵadvance(9),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(10,5,"twoStepLogin"),"\n "),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(13,7,"authenticatorAppTitle")),s.ɵɵadvance(4),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(17,9,"close")),s.ɵɵadvance(8),s.ɵɵproperty("ngIf",!t.authed),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.authed))},directives:[h.A11yTitleDirective,v.NgIf,f.TwoFactorVerifyComponent,g.NgControlStatusGroup,g.NgForm,y.ApiActionDirective,v.NgClass,x.CalloutComponent,g.DefaultValueAccessor,g.RequiredValidator,S.InputVerbatimDirective,g.NgControlStatus,g.NgModel],pipes:[b.I18nPipe],encapsulation:2})},40906:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorBaseComponent=void 0;const r=n(32621),o=(n(91674),n(51554),n(36631),n(73828),n(57055),n(97374)),a=n(40205),s=n(32621),l=n(91674),c=n(51554),d=n(73828),p=n(36631),u=n(57055);class m{constructor(e,t,n,i,a){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.logService=i,this.userVerificationService=a,this.onUpdated=new r.EventEmitter,this.twoFactorProviderType=o.TwoFactorProviderType,this.enabled=!1,this.authed=!1}auth(e){this.hashedSecret=e.secret,this.verificationType=e.verificationType,this.authed=!0}enable(e){return i(this,void 0,void 0,(function*(){try{yield e(),this.onUpdated.emit(!0)}catch(t){this.logService.error(t)}}))}disable(e){return i(this,void 0,void 0,(function*(){if(yield this.platformUtilsService.showDialog(this.i18nService.t("twoStepDisableDesc"),this.i18nService.t("disable"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning"))try{const t=yield this.buildRequestModel(a.TwoFactorProviderRequest);t.type=this.type,e=null!=this.organizationId?this.apiService.putTwoFactorOrganizationDisable(this.organizationId,t):this.apiService.putTwoFactorDisable(t),yield e,this.enabled=!1,this.platformUtilsService.showToast("success",null,this.i18nService.t("twoStepDisabled")),this.onUpdated.emit(!1)}catch(t){this.logService.error(t)}}))}buildRequestModel(e){return i(this,void 0,void 0,(function*(){return this.userVerificationService.buildRequest({secret:this.hashedSecret,type:this.verificationType},e,!0)}))}}t.TwoFactorBaseComponent=m,m.ɵfac=function(e){return new(e||m)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(d.PlatformUtilsService),s.ɵɵdirectiveInject(p.LogService),s.ɵɵdirectiveInject(u.UserVerificationService))},m.ɵdir=s.ɵɵdefineDirective({type:m,outputs:{onUpdated:"onUpdated"}})},71790:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorDuoComponent=void 0;n(91674),n(51554),n(36631),n(73828),n(57055);const r=n(97374),o=n(37682),a=n(40906),s=n(32621),l=n(91674),c=n(51554),d=n(73828),p=n(36631),u=n(57055),m=n(8863),h=n(57490),v=n(12720),f=n(96832),g=n(56820),y=n(51626),x=n(48198),S=n(99729);function b(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"app-two-factor-verify",9),s.ɵɵlistener("onAuthed",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().auth(t)})),s.ɵɵtext(1,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵproperty("organizationId",e.organizationId)("type",e.type)}}function w(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"app-callout",18),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4),s.ɵɵpipe(5,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelement(7,"img",19),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"strong"),s.ɵɵtext(10),s.ɵɵpipe(11,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(12),s.ɵɵelement(13,"br"),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"strong"),s.ɵɵtext(16),s.ɵɵpipe(17,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(18),s.ɵɵelement(19,"br"),s.ɵɵtext(20,"\n "),s.ɵɵelementStart(21,"strong"),s.ɵɵtext(22),s.ɵɵpipe(23,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(24),s.ɵɵelementContainerEnd()),2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,8,"enabled")),s.ɵɵadvance(2),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(5,10,"twoStepLoginProviderEnabled"),"\n "),s.ɵɵadvance(6),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(11,12,"twoFactorDuoIntegrationKey"),":"),s.ɵɵadvance(2),s.ɵɵtextInterpolate1(" ",e.ikey,"\n "),s.ɵɵadvance(4),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(17,14,"twoFactorDuoSecretKey"),":"),s.ɵɵadvance(2),s.ɵɵtextInterpolate1(" ",e.skey,"\n "),s.ɵɵadvance(4),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(23,16,"twoFactorDuoApiHostname"),":"),s.ɵɵadvance(2),s.ɵɵtextInterpolate1(" ",e.host,"\n ")}}function C(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"img",19),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"p"),s.ɵɵtext(5),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"div",20),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"label",21),s.ɵɵtext(11),s.ɵɵpipe(12,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n "),s.ɵɵelementStart(14,"input",22),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).ikey=t})),s.ɵɵelementEnd(),s.ɵɵtext(15,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(16,"\n "),s.ɵɵelementStart(17,"div",20),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"label",23),s.ɵɵtext(20),s.ɵɵpipe(21,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵelementStart(23,"input",24),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).skey=t})),s.ɵɵelementEnd(),s.ɵɵtext(24,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(25,"\n "),s.ɵɵelementStart(26,"div",20),s.ɵɵtext(27,"\n "),s.ɵɵelementStart(28,"label",25),s.ɵɵtext(29),s.ɵɵpipe(30,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(31,"\n "),s.ɵɵelementStart(32,"input",26),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).host=t})),s.ɵɵpipe(33,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(34,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(35,"\n "),s.ɵɵelementContainerEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(6,8,"twoFactorDuoDesc")),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(12,10,"twoFactorDuoIntegrationKey")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.ikey),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(21,12,"twoFactorDuoSecretKey")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.skey),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(30,14,"twoFactorDuoApiHostname")),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate1("placeholder","",s.ɵɵpipeBind1(33,16,"ex")," api-xxxxxxxx.duosecurity.com"),s.ɵɵproperty("ngModel",e.host)}}function I(e,t){1&e&&(s.ɵɵelementStart(0,"span"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,1,"enable")))}function E(e,t){1&e&&(s.ɵɵelementStart(0,"span"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,1,"disable")))}function P(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"form",10,11),s.ɵɵlistener("ngSubmit",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().submit()})),s.ɵɵtext(2,"\n "),s.ɵɵelementStart(3,"div",12),s.ɵɵtext(4,"\n "),s.ɵɵtemplate(5,w,25,18,"ng-container",13),s.ɵɵtext(6,"\n "),s.ɵɵtemplate(7,C,36,18,"ng-container",13),s.ɵɵtext(8,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"div",14),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"button",15),s.ɵɵtext(13,"\n "),s.ɵɵelement(14,"i",16),s.ɵɵpipe(15,"i18n"),s.ɵɵtext(16,"\n "),s.ɵɵtemplate(17,I,3,3,"span",13),s.ɵɵtext(18,"\n "),s.ɵɵtemplate(19,E,3,3,"span",13),s.ɵɵtext(20,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementStart(22,"button",17),s.ɵɵtext(23),s.ɵɵpipe(24,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(25,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(26,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵreference(1),t=s.ɵɵnextContext();s.ɵɵproperty("appApiAction",t.formPromise),s.ɵɵadvance(5),s.ɵɵproperty("ngIf",t.enabled),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!t.enabled),s.ɵɵadvance(5),s.ɵɵproperty("disabled",e.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(15,8,"loading")),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!t.enabled),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.enabled),s.ɵɵadvance(4),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(24,10,"close"),"\n ")}}class O extends a.TwoFactorBaseComponent{constructor(e,t,n,i,o){super(e,t,n,i,o),this.type=r.TwoFactorProviderType.Duo}auth(e){super.auth(e),this.processResponse(e.response)}submit(){return this.enabled?super.disable(this.formPromise):this.enable()}enable(){const e=Object.create(null,{enable:{get:()=>super.enable}});return i(this,void 0,void 0,(function*(){const t=yield this.buildRequestModel(o.UpdateTwoFactorDuoRequest);return t.integrationKey=this.ikey,t.secretKey=this.skey,t.host=this.host,e.enable.call(this,(()=>i(this,void 0,void 0,(function*(){null!=this.organizationId?this.formPromise=this.apiService.putTwoFactorOrganizationDuo(this.organizationId,t):this.formPromise=this.apiService.putTwoFactorDuo(t);const e=yield this.formPromise;yield this.processResponse(e)}))))}))}processResponse(e){this.ikey=e.integrationKey,this.skey=e.secretKey,this.host=e.host,this.enabled=e.enabled}}t.TwoFactorDuoComponent=O,O.ɵfac=function(e){return new(e||O)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(d.PlatformUtilsService),s.ɵɵdirectiveInject(p.LogService),s.ɵɵdirectiveInject(u.UserVerificationService))},O.ɵcmp=s.ɵɵdefineComponent({type:O,selectors:[["app-two-factor-duo"]],features:[s.ɵɵInheritDefinitionFeature],decls:30,vars:8,consts:[["role","dialog","aria-modal","true","aria-labelledby","2faDuoTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],[1,"modal-content"],[1,"modal-header"],["title","2faDuoTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[3,"organizationId","type","onAuthed",4,"ngIf"],["ngNativeValidate","","autocomplete","off",3,"appApiAction","ngSubmit",4,"ngIf"],[3,"organizationId","type","onAuthed"],["ngNativeValidate","","autocomplete","off",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-body"],[4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["type","success","icon","bwi bwi-check-circle",3,"title"],["alt","Duo logo",1,"float-right","ml-3","mfaType2"],[1,"form-group"],["for","ikey"],["id","ikey","type","text","name","IntegrationKey","required","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],["for","skey"],["id","skey","type","password","name","SecretKey","required","","appInputVerbatim","","autocomplete","new-password",1,"form-control",3,"ngModel","ngModelChange"],["for","host"],["id","host","type","text","name","Host","required","","appInputVerbatim","",1,"form-control",3,"ngModel","placeholder","ngModelChange"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",1),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"div",2),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"div",3),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"h2",4),s.ɵɵtext(9),s.ɵɵpipe(10,"i18n"),s.ɵɵelementStart(11,"small"),s.ɵɵtext(12,"Duo"),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"button",5),s.ɵɵpipe(16,"i18n"),s.ɵɵtext(17,"\n "),s.ɵɵelementStart(18,"span",6),s.ɵɵtext(19,"×"),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵtemplate(23,b,2,2,"app-two-factor-verify",7),s.ɵɵtext(24,"\n "),s.ɵɵtemplate(25,P,27,12,"form",8),s.ɵɵtext(26,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(28,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(29,"\n")),2&e&&(s.ɵɵadvance(9),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(10,4,"twoStepLogin"),"\n "),s.ɵɵadvance(6),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(16,6,"close")),s.ɵɵadvance(8),s.ɵɵproperty("ngIf",!t.authed),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.authed))},directives:[m.A11yTitleDirective,h.NgIf,v.TwoFactorVerifyComponent,f.NgControlStatusGroup,f.NgForm,g.ApiActionDirective,y.CalloutComponent,f.DefaultValueAccessor,f.RequiredValidator,x.InputVerbatimDirective,f.NgControlStatus,f.NgModel],pipes:[S.I18nPipe],encapsulation:2})},96055:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorEmailComponent=void 0;n(91674),n(51554),n(36631),n(73828),n(73569),n(57055);const r=n(97374),o=n(88307),a=n(3191),s=n(40906),l=n(32621),c=n(91674),d=n(51554),p=n(73828),u=n(36631),m=n(57055),h=n(73569),v=n(8863),f=n(57490),g=n(12720),y=n(96832),x=n(56820),S=n(51626),b=n(48198),w=n(99729);function C(e,t){if(1&e){const e=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"app-two-factor-verify",9),l.ɵɵlistener("onAuthed",(function(t){l.ɵɵrestoreView(e);return l.ɵɵnextContext().auth(t)})),l.ɵɵtext(1,"\n "),l.ɵɵelementEnd()}if(2&e){const e=l.ɵɵnextContext();l.ɵɵproperty("organizationId",e.organizationId)("type",e.type)}}function I(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"app-callout",18),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4),l.ɵɵpipe(5,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(6,"\n "),l.ɵɵelementStart(7,"strong"),l.ɵɵtext(8),l.ɵɵpipe(9,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(10),l.ɵɵelementContainerEnd()),2&e){const e=l.ɵɵnextContext(2);l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,4,"enabled")),l.ɵɵadvance(2),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(5,6,"twoStepLoginProviderEnabled"),"\n "),l.ɵɵadvance(4),l.ɵɵtextInterpolate1("",l.ɵɵpipeBind1(9,8,"email"),":"),l.ɵɵadvance(2),l.ɵɵtextInterpolate1(" ",e.email,"\n ")}}function E(e,t){if(1&e&&(l.ɵɵelementStart(0,"span",31),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext(3);l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind2(2,1,"verificationCodeEmailSent",e.sentEmail),"\n ")}}function P(e,t){if(1&e){const e=l.ɵɵgetCurrentView();l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"p",19),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"span",20),l.ɵɵtext(5),l.ɵɵpipe(6,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(7,"\n "),l.ɵɵelement(8,"img",21),l.ɵɵtext(9,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(10,"\n "),l.ɵɵelementStart(11,"div",22),l.ɵɵtext(12,"\n "),l.ɵɵelementStart(13,"label",23),l.ɵɵtext(14),l.ɵɵpipe(15,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(16,"\n "),l.ɵɵelementStart(17,"input",24),l.ɵɵlistener("ngModelChange",(function(t){l.ɵɵrestoreView(e);return l.ɵɵnextContext(2).email=t})),l.ɵɵelementEnd(),l.ɵɵtext(18,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(19,"\n "),l.ɵɵelementStart(20,"div",25),l.ɵɵtext(21,"\n "),l.ɵɵelementStart(22,"button",26,27),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(e);return l.ɵɵnextContext(2).sendEmail()})),l.ɵɵtext(24,"\n "),l.ɵɵelement(25,"i",16),l.ɵɵpipe(26,"i18n"),l.ɵɵtext(27,"\n "),l.ɵɵelementStart(28,"span"),l.ɵɵtext(29),l.ɵɵpipe(30,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(31,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(32,"\n "),l.ɵɵtemplate(33,E,3,4,"span",28),l.ɵɵtext(34,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(35,"\n "),l.ɵɵelementStart(36,"div",22),l.ɵɵtext(37,"\n "),l.ɵɵelementStart(38,"label",29),l.ɵɵtext(39),l.ɵɵpipe(40,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(41,"\n "),l.ɵɵelementStart(42,"input",30),l.ɵɵlistener("ngModelChange",(function(t){l.ɵɵrestoreView(e);return l.ɵɵnextContext(2).token=t})),l.ɵɵelementEnd(),l.ɵɵtext(43,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(44,"\n "),l.ɵɵelementContainerEnd()}if(2&e){const e=l.ɵɵreference(23),t=l.ɵɵnextContext(2);l.ɵɵadvance(5),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(6,10,"twoFactorEmailDesc")),l.ɵɵadvance(9),l.ɵɵtextInterpolate1("1. ",l.ɵɵpipeBind1(15,12,"twoFactorEmailEnterEmail"),""),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",t.email),l.ɵɵadvance(5),l.ɵɵproperty("appApiAction",t.emailPromise)("disabled",e.loading),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(26,14,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(30,16,"sendEmail")),l.ɵɵadvance(4),l.ɵɵproperty("ngIf",t.sentEmail),l.ɵɵadvance(6),l.ɵɵtextInterpolate1("2. ",l.ɵɵpipeBind1(40,18,"twoFactorEmailEnterCode"),""),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",t.token)}}function O(e,t){1&e&&(l.ɵɵelementStart(0,"span"),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(2,1,"enable")))}function k(e,t){1&e&&(l.ɵɵelementStart(0,"span"),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(2,1,"disable")))}function A(e,t){if(1&e){const e=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"form",10,11),l.ɵɵlistener("ngSubmit",(function(){l.ɵɵrestoreView(e);return l.ɵɵnextContext().submit()})),l.ɵɵtext(2,"\n "),l.ɵɵelementStart(3,"div",12),l.ɵɵtext(4,"\n "),l.ɵɵtemplate(5,I,11,10,"ng-container",13),l.ɵɵtext(6,"\n "),l.ɵɵtemplate(7,P,45,20,"ng-container",13),l.ɵɵtext(8,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(9,"\n "),l.ɵɵelementStart(10,"div",14),l.ɵɵtext(11,"\n "),l.ɵɵelementStart(12,"button",15),l.ɵɵtext(13,"\n "),l.ɵɵelement(14,"i",16),l.ɵɵpipe(15,"i18n"),l.ɵɵtext(16,"\n "),l.ɵɵtemplate(17,O,3,3,"span",13),l.ɵɵtext(18,"\n "),l.ɵɵtemplate(19,k,3,3,"span",13),l.ɵɵtext(20,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(21,"\n "),l.ɵɵelementStart(22,"button",17),l.ɵɵtext(23),l.ɵɵpipe(24,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(25,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(26,"\n "),l.ɵɵelementEnd()}if(2&e){const e=l.ɵɵreference(1),t=l.ɵɵnextContext();l.ɵɵproperty("appApiAction",t.formPromise),l.ɵɵadvance(5),l.ɵɵproperty("ngIf",t.enabled),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!t.enabled),l.ɵɵadvance(5),l.ɵɵproperty("disabled",e.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(15,8,"loading")),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",!t.enabled),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.enabled),l.ɵɵadvance(4),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(24,10,"close"),"\n ")}}class T extends s.TwoFactorBaseComponent{constructor(e,t,n,i,o,a){super(e,t,n,i,o),this.stateService=a,this.type=r.TwoFactorProviderType.Email}auth(e){return super.auth(e),this.processResponse(e.response)}submit(){return this.enabled?super.disable(this.formPromise):this.enable()}sendEmail(){return i(this,void 0,void 0,(function*(){try{const e=yield this.buildRequestModel(o.TwoFactorEmailRequest);e.email=this.email,this.emailPromise=this.apiService.postTwoFactorEmailSetup(e),yield this.emailPromise,this.sentEmail=this.email}catch(e){this.logService.error(e)}}))}enable(){const e=Object.create(null,{enable:{get:()=>super.enable}});return i(this,void 0,void 0,(function*(){const t=yield this.buildRequestModel(a.UpdateTwoFactorEmailRequest);return t.email=this.email,t.token=this.token,e.enable.call(this,(()=>i(this,void 0,void 0,(function*(){this.formPromise=this.apiService.putTwoFactorEmail(t);const e=yield this.formPromise;yield this.processResponse(e)}))))}))}processResponse(e){return i(this,void 0,void 0,(function*(){this.token=null,this.email=e.email,this.enabled=e.enabled,this.enabled||null!=this.email&&""!==this.email||(this.email=yield this.stateService.getEmail())}))}}t.TwoFactorEmailComponent=T,T.ɵfac=function(e){return new(e||T)(l.ɵɵdirectiveInject(c.ApiService),l.ɵɵdirectiveInject(d.I18nService),l.ɵɵdirectiveInject(p.PlatformUtilsService),l.ɵɵdirectiveInject(u.LogService),l.ɵɵdirectiveInject(m.UserVerificationService),l.ɵɵdirectiveInject(h.StateService))},T.ɵcmp=l.ɵɵdefineComponent({type:T,selectors:[["app-two-factor-email"]],features:[l.ɵɵInheritDefinitionFeature],decls:31,vars:11,consts:[["role","dialog","aria-modal","true","aria-labelledby","2faEmailTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],[1,"modal-content"],[1,"modal-header"],["id","2faEmailTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[3,"organizationId","type","onAuthed",4,"ngIf"],["ngNativeValidate","",3,"appApiAction","ngSubmit",4,"ngIf"],[3,"organizationId","type","onAuthed"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-body"],[4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["type","success","icon","bwi bwi-check-circle",3,"title"],[1,"d-flex"],[1,"mr-3"],["alt","Email logo",1,"float-right","ml-auto","mfaType1"],[1,"form-group"],["for","email"],["id","email","type","text","name","Email","required","","inputmode","email","appInputVerbatim","false",1,"form-control",3,"ngModel","ngModelChange"],[1,"mb-3","d-flex"],["type","button",1,"btn","btn-outline-primary","btn-sm","btn-submit","align-self-start",3,"appApiAction","disabled","click"],["sendBtn",""],["class","text-success ml-3",4,"ngIf"],["for","token"],["id","token","type","text","name","Token","required","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],[1,"text-success","ml-3"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"div",2),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"div",3),l.ɵɵtext(7,"\n "),l.ɵɵelementStart(8,"h2",4),l.ɵɵtext(9),l.ɵɵpipe(10,"i18n"),l.ɵɵelementStart(11,"small"),l.ɵɵtext(12),l.ɵɵpipe(13,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(14,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(15,"\n "),l.ɵɵelementStart(16,"button",5),l.ɵɵpipe(17,"i18n"),l.ɵɵtext(18,"\n "),l.ɵɵelementStart(19,"span",6),l.ɵɵtext(20,"×"),l.ɵɵelementEnd(),l.ɵɵtext(21,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(22,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(23,"\n "),l.ɵɵtemplate(24,C,2,2,"app-two-factor-verify",7),l.ɵɵtext(25,"\n "),l.ɵɵtemplate(26,A,27,12,"form",8),l.ɵɵtext(27,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(28,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(29,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(30,"\n")),2&e&&(l.ɵɵadvance(9),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(10,5,"twoStepLogin"),"\n "),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(13,7,"emailTitle")),l.ɵɵadvance(4),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(17,9,"close")),l.ɵɵadvance(8),l.ɵɵproperty("ngIf",!t.authed),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.authed))},directives:[v.A11yTitleDirective,f.NgIf,g.TwoFactorVerifyComponent,y.NgControlStatusGroup,y.NgForm,x.ApiActionDirective,S.CalloutComponent,y.DefaultValueAccessor,y.RequiredValidator,b.InputVerbatimDirective,y.NgControlStatus,y.NgModel],pipes:[w.I18nPipe],encapsulation:2})},64542:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorRecoveryComponent=void 0;n(51554);const i=n(97374),r=n(32621),o=n(51554),a=n(8863),s=n(57490),l=n(12720),c=n(99729);function d(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"app-two-factor-verify",9),r.ɵɵlistener("onAuthed",(function(t){r.ɵɵrestoreView(e);return r.ɵɵnextContext().auth(t)})),r.ɵɵtext(1,"\n "),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext();r.ɵɵproperty("organizationId",e.organizationId)("type",e.type)}}function p(e,t){if(1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"p"),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"code",14),r.ɵɵtext(7),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementContainerEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(3),r.ɵɵtextInterpolate1("",r.ɵɵpipeBind1(4,2,"twoFactorRecoveryYourCode"),":"),r.ɵɵadvance(4),r.ɵɵtextInterpolate(e.code)}}function u(e,t){1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementContainerEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"twoFactorRecoveryNoCode"),"\n "))}function m(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"button",15),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(2).print()})),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()}2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"printCode"),"\n "))}function h(e,t){if(1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",10),r.ɵɵtext(3,"\n "),r.ɵɵtemplate(4,p,9,4,"ng-container",8),r.ɵɵtext(5,"\n "),r.ɵɵtemplate(6,u,3,3,"ng-container",8),r.ɵɵtext(7,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"div",11),r.ɵɵtext(10,"\n "),r.ɵɵtemplate(11,m,3,3,"button",12),r.ɵɵtext(12,"\n "),r.ɵɵelementStart(13,"button",13),r.ɵɵtext(14),r.ɵɵpipe(15,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(16,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(17,"\n "),r.ɵɵelementContainerEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(4),r.ɵɵproperty("ngIf",e.code),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",!e.code),r.ɵɵadvance(5),r.ɵɵproperty("ngIf",e.code),r.ɵɵadvance(3),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(15,4,"close"),"\n ")}}class v{constructor(e){this.i18nService=e,this.type=-1,this.twoFactorProviderType=i.TwoFactorProviderType}auth(e){this.authed=!0,this.processResponse(e.response)}print(){const e=window.open();e.document.write('

'+this.i18nService.t("twoFactorRecoveryYourCode")+":

"+this.code+'

'+new Date+"

"),e.onafterprint=()=>e.close(),e.print()}formatString(e){return null==e?null:e.replace(/(.{4})/g,"$1 ").trim().toUpperCase()}processResponse(e){this.code=this.formatString(e.code)}}t.TwoFactorRecoveryComponent=v,v.ɵfac=function(e){return new(e||v)(r.ɵɵdirectiveInject(o.I18nService))},v.ɵcmp=r.ɵɵdefineComponent({type:v,selectors:[["app-two-factor-recovery"]],decls:31,vars:11,consts:[["role","dialog","aria-modal","true","aria-labelledby","2faRecoveryTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],[1,"modal-content"],[1,"modal-header"],["id","2faRecoveryTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[3,"organizationId","type","onAuthed",4,"ngIf"],[4,"ngIf"],[3,"organizationId","type","onAuthed"],[1,"modal-body","text-center"],[1,"modal-footer"],["type","button","class","btn btn-primary",3,"click",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"text-lg"],["type","button",1,"btn","btn-primary",3,"click"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",2),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"div",3),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"h2",4),r.ɵɵtext(9),r.ɵɵpipe(10,"i18n"),r.ɵɵelementStart(11,"small"),r.ɵɵtext(12),r.ɵɵpipe(13,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(14,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(15,"\n "),r.ɵɵelementStart(16,"button",5),r.ɵɵpipe(17,"i18n"),r.ɵɵtext(18,"\n "),r.ɵɵelementStart(19,"span",6),r.ɵɵtext(20,"×"),r.ɵɵelementEnd(),r.ɵɵtext(21,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(22,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(23,"\n "),r.ɵɵtemplate(24,d,2,2,"app-two-factor-verify",7),r.ɵɵtext(25,"\n "),r.ɵɵtemplate(26,h,18,6,"ng-container",8),r.ɵɵtext(27,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(28,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(29,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(30,"\n")),2&e&&(r.ɵɵadvance(9),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(10,5,"twoStepLogin"),"\n "),r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(13,7,"recoveryCodeTitle")),r.ɵɵadvance(4),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(17,9,"close")),r.ɵɵadvance(8),r.ɵɵproperty("ngIf",!t.authed),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.authed))},directives:[a.A11yTitleDirective,s.NgIf,l.TwoFactorVerifyComponent],pipes:[c.I18nPipe],encapsulation:2})},35906:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorSetupComponent=void 0;const r=n(32621),o=(n(64684),n(91674),n(45552),n(62166),n(73569),n(49906)),a=n(97374),s=n(96837),l=n(59751),c=n(71790),d=n(96055),p=n(64542),u=n(84472),m=n(80445),h=n(32621),v=n(91674),f=n(64684),g=n(45552),y=n(62166),x=n(73569),S=n(57490),b=n(20138),w=n(52767),C=n(48403),I=n(99729),E=["recoveryTemplate"],P=["authenticatorTemplate"],O=["yubikeyTemplate"],k=["duoTemplate"],A=["emailTemplate"],T=["webAuthnTemplate"];function M(e,t){1&e&&(h.ɵɵelementStart(0,"p"),h.ɵɵtext(1),h.ɵɵpipe(2,"i18n"),h.ɵɵelementEnd()),2&e&&(h.ɵɵadvance(1),h.ɵɵtextInterpolate(h.ɵɵpipeBind1(2,1,"twoStepLoginDesc")))}function B(e,t){1&e&&(h.ɵɵelementStart(0,"p"),h.ɵɵtext(1),h.ɵɵpipe(2,"i18n"),h.ɵɵelementEnd()),2&e&&(h.ɵɵadvance(1),h.ɵɵtextInterpolate(h.ɵɵpipeBind1(2,1,"twoStepLoginOrganizationDesc")))}function D(e,t){if(1&e){const e=h.ɵɵgetCurrentView();h.ɵɵelementStart(0,"bit-callout",12),h.ɵɵtext(1,"\n "),h.ɵɵelementStart(2,"p"),h.ɵɵtext(3),h.ɵɵpipe(4,"i18n"),h.ɵɵelementEnd(),h.ɵɵtext(5,"\n "),h.ɵɵelementStart(6,"button",13),h.ɵɵlistener("click",(function(){h.ɵɵrestoreView(e);return h.ɵɵnextContext().recoveryCode()})),h.ɵɵtext(7),h.ɵɵpipe(8,"i18n"),h.ɵɵelementEnd(),h.ɵɵtext(9,"\n"),h.ɵɵelementEnd()}2&e&&(h.ɵɵadvance(3),h.ɵɵtextInterpolate(h.ɵɵpipeBind1(4,2,"twoStepLoginRecoveryWarning")),h.ɵɵadvance(4),h.ɵɵtextInterpolate1("\n ",h.ɵɵpipeBind1(8,4,"viewRecoveryCode"),"\n "))}function R(e,t){1&e&&(h.ɵɵelementStart(0,"small"),h.ɵɵtext(1,"\n "),h.ɵɵelement(2,"i",14),h.ɵɵpipe(3,"i18n"),h.ɵɵtext(4,"\n "),h.ɵɵelementStart(5,"span",15),h.ɵɵtext(6),h.ɵɵpipe(7,"i18n"),h.ɵɵelementEnd(),h.ɵɵtext(8,"\n "),h.ɵɵelementEnd()),2&e&&(h.ɵɵadvance(2),h.ɵɵpropertyInterpolate("title",h.ɵɵpipeBind1(3,2,"loading")),h.ɵɵadvance(4),h.ɵɵtextInterpolate(h.ɵɵpipeBind1(7,4,"loading")))}function F(e,t){1&e&&(h.ɵɵelementStart(0,"bit-callout",12),h.ɵɵtext(1),h.ɵɵpipe(2,"i18n"),h.ɵɵelementEnd()),2&e&&(h.ɵɵadvance(1),h.ɵɵtextInterpolate1("\n ",h.ɵɵpipeBind1(2,1,"twoStepLoginPolicyUserWarning"),"\n"))}function U(e,t){1&e&&(h.ɵɵelementContainerStart(0),h.ɵɵtext(1,"\n "),h.ɵɵelement(2,"i",23),h.ɵɵpipe(3,"i18n"),h.ɵɵtext(4,"\n "),h.ɵɵelementStart(5,"span",15),h.ɵɵtext(6),h.ɵɵpipe(7,"i18n"),h.ɵɵelementEnd(),h.ɵɵtext(8,"\n "),h.ɵɵelementContainerEnd()),2&e&&(h.ɵɵadvance(2),h.ɵɵpropertyInterpolate("title",h.ɵɵpipeBind1(3,2,"enabled")),h.ɵɵadvance(4),h.ɵɵtextInterpolate(h.ɵɵpipeBind1(7,4,"enabled")))}function V(e,t){1&e&&h.ɵɵelement(0,"app-premium-badge")}function N(e,t){if(1&e){const e=h.ɵɵgetCurrentView();h.ɵɵelementStart(0,"li",16),h.ɵɵtext(1,"\n "),h.ɵɵelementStart(2,"div",17),h.ɵɵtext(3,"\n "),h.ɵɵelement(4,"img",18),h.ɵɵtext(5,"\n "),h.ɵɵelementEnd(),h.ɵɵtext(6,"\n "),h.ɵɵelementStart(7,"div",19),h.ɵɵtext(8,"\n "),h.ɵɵelementStart(9,"h3",20),h.ɵɵtext(10),h.ɵɵtemplate(11,U,9,6,"ng-container",1),h.ɵɵtext(12,"\n "),h.ɵɵtemplate(13,V,1,0,"app-premium-badge",1),h.ɵɵtext(14,"\n "),h.ɵɵelementEnd(),h.ɵɵtext(15),h.ɵɵelementEnd(),h.ɵɵtext(16,"\n "),h.ɵɵelementStart(17,"div",21),h.ɵɵtext(18,"\n "),h.ɵɵelementStart(19,"button",22),h.ɵɵlistener("click",(function(){const t=h.ɵɵrestoreView(e).$implicit;return h.ɵɵnextContext().manage(t.type)})),h.ɵɵtext(20),h.ɵɵpipe(21,"i18n"),h.ɵɵelementEnd(),h.ɵɵtext(22,"\n "),h.ɵɵelementEnd(),h.ɵɵtext(23,"\n "),h.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=h.ɵɵnextContext();h.ɵɵadvance(4),h.ɵɵclassMap("mfaType"+e.type),h.ɵɵproperty("alt",e.name+" logo"),h.ɵɵadvance(6),h.ɵɵtextInterpolate1("\n ",e.name,"\n "),h.ɵɵadvance(1),h.ɵɵproperty("ngIf",e.enabled),h.ɵɵadvance(2),h.ɵɵproperty("ngIf",e.premium),h.ɵɵadvance(2),h.ɵɵtextInterpolate1("\n ",e.description,"\n "),h.ɵɵadvance(4),h.ɵɵproperty("disabled",!n.canAccessPremium&&e.premium),h.ɵɵadvance(1),h.ɵɵtextInterpolate1("\n ",h.ɵɵpipeBind1(21,9,"manage"),"\n ")}}function _(e,t){}function j(e,t){}function z(e,t){}function H(e,t){}function L(e,t){}function K(e,t){}const q=function(e){return{"mt-5":e}};class G{constructor(e,t,n,i,r){this.apiService=e,this.modalService=t,this.messagingService=n,this.policyService=i,this.stateService=r,this.providers=[],this.showPolicyWarning=!1,this.loading=!0}ngOnInit(){return i(this,void 0,void 0,(function*(){this.canAccessPremium=yield this.stateService.getCanAccessPremium();for(const e in s.TwoFactorProviders){if(!s.TwoFactorProviders.hasOwnProperty(e))continue;const t=s.TwoFactorProviders[e];this.filterProvider(t.type)||this.providers.push({type:t.type,name:t.name,description:t.description,enabled:!1,premium:t.premium,sort:t.sort})}this.providers.sort(((e,t)=>e.sort-t.sort)),yield this.load()}))}load(){return i(this,void 0,void 0,(function*(){this.loading=!0;(yield this.getTwoFactorProviders()).data.forEach((e=>{this.providers.forEach((t=>{e.type===t.type&&(t.enabled=e.enabled)}))})),this.evaluatePolicies(),this.loading=!1}))}manage(e){return i(this,void 0,void 0,(function*(){switch(e){case a.TwoFactorProviderType.Authenticator:(yield this.openModal(this.authenticatorModalRef,l.TwoFactorAuthenticatorComponent)).onUpdated.subscribe((e=>{this.updateStatus(e,a.TwoFactorProviderType.Authenticator)}));break;case a.TwoFactorProviderType.Yubikey:(yield this.openModal(this.yubikeyModalRef,m.TwoFactorYubiKeyComponent)).onUpdated.subscribe((e=>{this.updateStatus(e,a.TwoFactorProviderType.Yubikey)}));break;case a.TwoFactorProviderType.Duo:(yield this.openModal(this.duoModalRef,c.TwoFactorDuoComponent)).onUpdated.subscribe((e=>{this.updateStatus(e,a.TwoFactorProviderType.Duo)}));break;case a.TwoFactorProviderType.Email:(yield this.openModal(this.emailModalRef,d.TwoFactorEmailComponent)).onUpdated.subscribe((e=>{this.updateStatus(e,a.TwoFactorProviderType.Email)}));break;case a.TwoFactorProviderType.WebAuthn:(yield this.openModal(this.webAuthnModalRef,u.TwoFactorWebAuthnComponent)).onUpdated.subscribe((e=>{this.updateStatus(e,a.TwoFactorProviderType.WebAuthn)}));break}}))}recoveryCode(){this.openModal(this.recoveryModalRef,p.TwoFactorRecoveryComponent)}premiumRequired(){return i(this,void 0,void 0,(function*(){this.canAccessPremium||this.messagingService.send("premiumRequired")}))}getTwoFactorProviders(){return this.apiService.getTwoFactorProviders()}filterProvider(e){return e===a.TwoFactorProviderType.OrganizationDuo}openModal(e,t){return i(this,void 0,void 0,(function*(){const[n,i]=yield this.modalService.openViewRef(t,e);return this.modal=n,i}))}updateStatus(e,t){e||null==this.modal||this.modal.close(),this.providers.forEach((n=>{n.type===t&&(n.enabled=e)})),this.evaluatePolicies()}evaluatePolicies(){return i(this,void 0,void 0,(function*(){null==this.organizationId&&1===this.providers.filter((e=>e.enabled)).length?this.showPolicyWarning=yield this.policyService.policyAppliesToUser(o.PolicyType.TwoFactorAuthentication):this.showPolicyWarning=!1}))}}t.TwoFactorSetupComponent=G,G.ɵfac=function(e){return new(e||G)(h.ɵɵdirectiveInject(v.ApiService),h.ɵɵdirectiveInject(f.ModalService),h.ɵɵdirectiveInject(g.MessagingService),h.ɵɵdirectiveInject(y.PolicyService),h.ɵɵdirectiveInject(x.StateService))},G.ɵcmp=h.ɵɵdefineComponent({type:G,selectors:[["app-two-factor-setup"]],viewQuery:function(e,t){if(1&e&&(h.ɵɵviewQuery(E,7,r.ViewContainerRef),h.ɵɵviewQuery(P,7,r.ViewContainerRef),h.ɵɵviewQuery(O,7,r.ViewContainerRef),h.ɵɵviewQuery(k,7,r.ViewContainerRef),h.ɵɵviewQuery(A,7,r.ViewContainerRef),h.ɵɵviewQuery(T,7,r.ViewContainerRef)),2&e){let e;h.ɵɵqueryRefresh(e=h.ɵɵloadQuery())&&(t.recoveryModalRef=e.first),h.ɵɵqueryRefresh(e=h.ɵɵloadQuery())&&(t.authenticatorModalRef=e.first),h.ɵɵqueryRefresh(e=h.ɵɵloadQuery())&&(t.yubikeyModalRef=e.first),h.ɵɵqueryRefresh(e=h.ɵɵloadQuery())&&(t.duoModalRef=e.first),h.ɵɵqueryRefresh(e=h.ɵɵloadQuery())&&(t.emailModalRef=e.first),h.ɵɵqueryRefresh(e=h.ɵɵloadQuery())&&(t.webAuthnModalRef=e.first)}},decls:44,vars:15,consts:[[1,"tabbed-header"],[4,"ngIf"],["type","warning",4,"ngIf"],[3,"ngClass"],[1,"list-group","list-group-2fa"],["class","list-group-item d-flex align-items-center",4,"ngFor","ngForOf"],["authenticatorTemplate",""],["recoveryTemplate",""],["duoTemplate",""],["emailTemplate",""],["yubikeyTemplate",""],["webAuthnTemplate",""],["type","warning"],["bit-button","","buttonType","secondary",3,"click"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-fw","text-muted",3,"title"],[1,"sr-only"],[1,"list-group-item","d-flex","align-items-center"],[1,"logo-2fa","d-flex","justify-content-center"],[3,"alt"],[1,"mx-4"],[1,"mb-0"],[1,"ml-auto"],["bit-button","","buttonType","secondary",3,"disabled","click"],["aria-hidden","true",1,"bwi","bwi-check","text-success","bwi-fw",3,"title"]],template:function(e,t){1&e&&(h.ɵɵelementStart(0,"div",0),h.ɵɵtext(1,"\n "),h.ɵɵelementStart(2,"h1"),h.ɵɵtext(3),h.ɵɵpipe(4,"i18n"),h.ɵɵelementEnd(),h.ɵɵtext(5,"\n"),h.ɵɵelementEnd(),h.ɵɵtext(6,"\n"),h.ɵɵtemplate(7,M,3,3,"p",1),h.ɵɵtext(8,"\n"),h.ɵɵtemplate(9,B,3,3,"p",1),h.ɵɵtext(10,"\n"),h.ɵɵtemplate(11,D,10,6,"bit-callout",2),h.ɵɵtext(12,"\n"),h.ɵɵelementStart(13,"h2",3),h.ɵɵtext(14),h.ɵɵpipe(15,"i18n"),h.ɵɵtemplate(16,R,9,6,"small",1),h.ɵɵtext(17,"\n"),h.ɵɵelementEnd(),h.ɵɵtext(18,"\n"),h.ɵɵtemplate(19,F,3,3,"bit-callout",2),h.ɵɵtext(20,"\n"),h.ɵɵelementStart(21,"ul",4),h.ɵɵtext(22,"\n "),h.ɵɵtemplate(23,N,24,11,"li",5),h.ɵɵtext(24,"\n"),h.ɵɵelementEnd(),h.ɵɵtext(25,"\n\n"),h.ɵɵtemplate(26,_,0,0,"ng-template",null,6,h.ɵɵtemplateRefExtractor),h.ɵɵtext(28,"\n"),h.ɵɵtemplate(29,j,0,0,"ng-template",null,7,h.ɵɵtemplateRefExtractor),h.ɵɵtext(31,"\n"),h.ɵɵtemplate(32,z,0,0,"ng-template",null,8,h.ɵɵtemplateRefExtractor),h.ɵɵtext(34,"\n"),h.ɵɵtemplate(35,H,0,0,"ng-template",null,9,h.ɵɵtemplateRefExtractor),h.ɵɵtext(37,"\n"),h.ɵɵtemplate(38,L,0,0,"ng-template",null,10,h.ɵɵtemplateRefExtractor),h.ɵɵtext(40,"\n"),h.ɵɵtemplate(41,K,0,0,"ng-template",null,11,h.ɵɵtemplateRefExtractor),h.ɵɵtext(43,"\n")),2&e&&(h.ɵɵadvance(3),h.ɵɵtextInterpolate(h.ɵɵpipeBind1(4,9,"twoStepLogin")),h.ɵɵadvance(4),h.ɵɵproperty("ngIf",!t.organizationId),h.ɵɵadvance(2),h.ɵɵproperty("ngIf",t.organizationId),h.ɵɵadvance(2),h.ɵɵproperty("ngIf",!t.organizationId),h.ɵɵadvance(2),h.ɵɵproperty("ngClass",h.ɵɵpureFunction1(13,q,!t.organizationId)),h.ɵɵadvance(1),h.ɵɵtextInterpolate1("\n ",h.ɵɵpipeBind1(15,11,"providers"),"\n "),h.ɵɵadvance(2),h.ɵɵproperty("ngIf",t.loading),h.ɵɵadvance(3),h.ɵɵproperty("ngIf",t.showPolicyWarning),h.ɵɵadvance(4),h.ɵɵproperty("ngForOf",t.providers))},directives:[S.NgIf,S.NgClass,S.NgForOf,b.CalloutComponent,w.ButtonComponent,C.PremiumBadgeComponent],pipes:[I.I18nPipe],encapsulation:2})},12720:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorVerifyComponent=void 0;const r=n(32621),o=(n(91674),n(36631),n(57055),n(97374)),a=n(44254),s=n(32621),l=n(91674),c=n(36631),d=n(57055),p=n(96832),u=n(56820),m=n(4158),h=n(99729);class v{constructor(e,t,n){this.apiService=e,this.logService=t,this.userVerificationService=n,this.onAuthed=new r.EventEmitter}submit(){return i(this,void 0,void 0,(function*(){let e;try{this.formPromise=this.userVerificationService.buildRequest(this.secret).then((t=>(e=this.secret.type===a.VerificationType.MasterPassword?t.masterPasswordHash:t.otp,this.apiCall(t))));const t=yield this.formPromise;this.onAuthed.emit({response:t,secret:e,verificationType:this.secret.type})}catch(t){this.logService.error(t)}}))}apiCall(e){switch(this.type){case-1:return this.apiService.getTwoFactorRecover(e);case o.TwoFactorProviderType.Duo:case o.TwoFactorProviderType.OrganizationDuo:return null!=this.organizationId?this.apiService.getTwoFactorOrganizationDuo(this.organizationId,e):this.apiService.getTwoFactorDuo(e);case o.TwoFactorProviderType.Email:return this.apiService.getTwoFactorEmail(e);case o.TwoFactorProviderType.WebAuthn:return this.apiService.getTwoFactorWebAuthn(e);case o.TwoFactorProviderType.Authenticator:return this.apiService.getTwoFactorAuthenticator(e);case o.TwoFactorProviderType.Yubikey:return this.apiService.getTwoFactorYubiKey(e)}}}t.TwoFactorVerifyComponent=v,v.ɵfac=function(e){return new(e||v)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.LogService),s.ɵɵdirectiveInject(d.UserVerificationService))},v.ɵcmp=s.ɵɵdefineComponent({type:v,selectors:[["app-two-factor-verify"]],inputs:{type:"type",organizationId:"organizationId"},outputs:{onAuthed:"onAuthed"},decls:31,vars:15,consts:[["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-body"],["ngDefaultControl","","name","secret",3,"ngModel","ngModelChange"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"]],template:function(e,t){if(1&e&&(s.ɵɵelementStart(0,"form",0,1),s.ɵɵlistener("ngSubmit",(function(){return t.submit()})),s.ɵɵtext(2,"\n "),s.ɵɵelementStart(3,"div",2),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"p"),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"app-user-verification",3),s.ɵɵlistener("ngModelChange",(function(e){return t.secret=e})),s.ɵɵtext(10,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"div",4),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"button",5),s.ɵɵtext(16,"\n "),s.ɵɵelement(17,"i",6),s.ɵɵpipe(18,"i18n"),s.ɵɵtext(19,"\n "),s.ɵɵelementStart(20,"span"),s.ɵɵtext(21),s.ɵɵpipe(22,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(23,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(24,"\n "),s.ɵɵelementStart(25,"button",7),s.ɵɵtext(26),s.ɵɵpipe(27,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(28,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(29,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(30,"\n")),2&e){const e=s.ɵɵreference(1);s.ɵɵproperty("appApiAction",t.formPromise),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,7,"twoStepLoginAuthDesc")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",t.secret),s.ɵɵadvance(6),s.ɵɵproperty("disabled",e.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(18,9,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(22,11,"continue")),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(27,13,"close"),"\n ")}},directives:[p.NgControlStatusGroup,p.NgForm,u.ApiActionDirective,m.UserVerificationComponent,p.DefaultValueAccessor,p.NgControlStatus,p.NgModel],pipes:[h.I18nPipe],encapsulation:2})},84472:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorWebAuthnComponent=void 0;n(32621),n(91674),n(51554),n(36631),n(73828),n(57055);const r=n(97374),o=n(36119),a=n(40088),s=n(72842),l=n(40906),c=n(32621),d=n(91674),p=n(51554),u=n(73828),m=n(36631),h=n(57055),v=n(8863),f=n(57490),g=n(12720),y=n(96832),x=n(56820),S=n(51626),b=n(1142),w=n(99729);function C(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"app-two-factor-verify",9),c.ɵɵlistener("onAuthed",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext().auth(t)})),c.ɵɵtext(1,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵnextContext();c.ɵɵproperty("organizationId",e.organizationId)("type",e.type)}}function I(e,t){1&e&&(c.ɵɵelementStart(0,"app-callout",31),c.ɵɵpipe(1,"i18n"),c.ɵɵtext(2),c.ɵɵpipe(3,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(1,2,"enabled")),c.ɵɵadvance(2),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(3,4,"twoStepLoginProviderEnabled"),"\n "))}function E(e,t){if(1&e&&(c.ɵɵelementStart(0,"strong"),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext().index;c.ɵɵadvance(1),c.ɵɵtextInterpolate(c.ɵɵpipeBind2(2,1,"webAuthnkeyX",e+1))}}function P(e,t){if(1&e&&(c.ɵɵelementStart(0,"strong"),c.ɵɵtext(1),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext().$implicit;c.ɵɵadvance(1),c.ɵɵtextInterpolate(e.name)}}function O(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"span"),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(4,1,"webAuthnMigrated")))}function k(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,O,6,3,"ng-container",25),c.ɵɵtext(3,"\n "),c.ɵɵelementContainerEnd()),2&e){const e=c.ɵɵnextContext().$implicit;c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.migrated)}}function A(e,t){1&e&&(c.ɵɵelement(0,"i",37),c.ɵɵpipe(1,"i18n")),2&e&&c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(1,1,"loading"))}function T(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,A,2,3,"i",35),c.ɵɵtext(3,"\n -\n "),c.ɵɵelementStart(4,"a",36),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);const t=c.ɵɵnextContext().$implicit;return c.ɵɵnextContext(2).remove(t)})),c.ɵɵtext(5),c.ɵɵpipe(6,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵelementContainerEnd()}if(2&e){c.ɵɵnextContext();const e=c.ɵɵreference(1);c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.loading),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(6,2,"remove"))}}function M(e,t){if(1&e&&(c.ɵɵelementStart(0,"li",32,33),c.ɵɵtext(2,"\n "),c.ɵɵelement(3,"i",34),c.ɵɵtext(4,"\n "),c.ɵɵtemplate(5,E,3,4,"strong",25),c.ɵɵtext(6,"\n "),c.ɵɵtemplate(7,P,2,1,"strong",25),c.ɵɵtext(8,"\n "),c.ɵɵtemplate(9,k,4,1,"ng-container",25),c.ɵɵtext(10,"\n "),c.ɵɵtemplate(11,T,8,4,"ng-container",25),c.ɵɵtext(12,"\n "),c.ɵɵelementEnd()),2&e){const e=t.$implicit,n=c.ɵɵreference(1),i=c.ɵɵnextContext(2);c.ɵɵproperty("appApiAction",e.removePromise),c.ɵɵadvance(5),c.ɵɵproperty("ngIf",!e.configured||!e.name),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.configured&&e.name),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.configured&&!n.loading),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",i.keysConfiguredCount>1&&e.configured)}}function B(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",38),c.ɵɵtext(3,"\n "),c.ɵɵelementContainerEnd())}function D(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",38),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,1,"twoFactorU2fWaiting"),"...\n "))}function R(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",39),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,1,"twoFactorU2fClickSave"),"\n "))}function F(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",40),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,1,"twoFactorU2fProblemReadingTryAgain"),"\n "))}function U(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,D,5,3,"ng-container",25),c.ɵɵtext(3,"\n "),c.ɵɵtemplate(4,R,5,3,"ng-container",25),c.ɵɵtext(5,"\n "),c.ɵɵtemplate(6,F,5,3,"ng-container",25),c.ɵɵtext(7,"\n "),c.ɵɵelementContainerEnd()),2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.webAuthnListening),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.webAuthnResponse),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.webAuthnError)}}function V(e,t){1&e&&(c.ɵɵelement(0,"i",41),c.ɵɵpipe(1,"i18n")),2&e&&c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(1,1,"loading"))}function N(e,t){1&e&&(c.ɵɵelementStart(0,"span"),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(2,1,"save")))}function _(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"button",42,43),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).disable()})),c.ɵɵtext(2,"\n "),c.ɵɵelement(3,"i",41),c.ɵɵpipe(4,"i18n"),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"span"),c.ɵɵtext(7),c.ɵɵpipe(8,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(9,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵreference(1),t=c.ɵɵnextContext(2);c.ɵɵproperty("appApiAction",t.disablePromise)("disabled",e.loading),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(4,4,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(8,6,"disableAllKeys"))}}function j(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"form",10,11),c.ɵɵlistener("ngSubmit",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext().submit()})),c.ɵɵtext(2,"\n "),c.ɵɵelementStart(3,"div",12),c.ɵɵtext(4,"\n "),c.ɵɵtemplate(5,I,4,6,"app-callout",13),c.ɵɵtext(6,"\n "),c.ɵɵelementStart(7,"app-callout",14),c.ɵɵtext(8,"\n "),c.ɵɵelementStart(9,"p"),c.ɵɵtext(10),c.ɵɵpipe(11,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(12,"\n "),c.ɵɵelementStart(13,"ul",15),c.ɵɵtext(14,"\n "),c.ɵɵelementStart(15,"li"),c.ɵɵtext(16),c.ɵɵpipe(17,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(18,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(20,"\n "),c.ɵɵelement(21,"img",16),c.ɵɵtext(22,"\n "),c.ɵɵelementStart(23,"ul",17),c.ɵɵtext(24,"\n "),c.ɵɵtemplate(25,M,13,5,"li",18),c.ɵɵtext(26,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(27,"\n "),c.ɵɵelement(28,"hr"),c.ɵɵtext(29,"\n "),c.ɵɵelementStart(30,"p"),c.ɵɵtext(31),c.ɵɵpipe(32,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(33,"\n "),c.ɵɵelementStart(34,"ol"),c.ɵɵtext(35,"\n "),c.ɵɵelementStart(36,"li"),c.ɵɵtext(37),c.ɵɵpipe(38,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(39,"\n "),c.ɵɵelementStart(40,"li"),c.ɵɵtext(41),c.ɵɵpipe(42,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(43,"\n "),c.ɵɵelementStart(44,"li"),c.ɵɵtext(45),c.ɵɵpipe(46,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(47,"\n "),c.ɵɵelementStart(48,"li"),c.ɵɵtext(49),c.ɵɵpipe(50,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(51,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(52,"\n "),c.ɵɵelementStart(53,"div",19),c.ɵɵtext(54,"\n "),c.ɵɵelementStart(55,"div",20),c.ɵɵtext(56,"\n "),c.ɵɵelementStart(57,"label",21),c.ɵɵtext(58),c.ɵɵpipe(59,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(60,"\n "),c.ɵɵelementStart(61,"input",22),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext().name=t})),c.ɵɵelementEnd(),c.ɵɵtext(62,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(63,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(64,"\n "),c.ɵɵelementStart(65,"button",23,24),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext().readKey()})),c.ɵɵtext(67),c.ɵɵpipe(68,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(69,"\n "),c.ɵɵtemplate(70,B,4,0,"ng-container",25),c.ɵɵtext(71,"\n "),c.ɵɵtemplate(72,U,8,3,"ng-container",25),c.ɵɵtext(73,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(74,"\n "),c.ɵɵelementStart(75,"div",26),c.ɵɵtext(76,"\n "),c.ɵɵelementStart(77,"button",27),c.ɵɵtext(78,"\n "),c.ɵɵtemplate(79,V,2,3,"i",28),c.ɵɵtext(80,"\n "),c.ɵɵtemplate(81,N,3,3,"span",25),c.ɵɵtext(82,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(83,"\n "),c.ɵɵtemplate(84,_,10,8,"button",29),c.ɵɵtext(85,"\n "),c.ɵɵelementStart(86,"button",30),c.ɵɵtext(87),c.ɵɵpipe(88,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(89,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(90,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵreference(1),t=c.ɵɵreference(66),n=c.ɵɵnextContext();c.ɵɵproperty("appApiAction",n.formPromise),c.ɵɵadvance(5),c.ɵɵproperty("ngIf",n.enabled),c.ɵɵadvance(5),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(11,23,"twoFactorWebAuthnWarning")),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(17,25,"twoFactorWebAuthnSupportWeb")),c.ɵɵadvance(9),c.ɵɵproperty("ngForOf",n.keys),c.ɵɵadvance(6),c.ɵɵtextInterpolate1("",c.ɵɵpipeBind1(32,27,"twoFactorWebAuthnAdd"),":"),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(38,29,"twoFactorU2fGiveName")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(42,31,"twoFactorU2fPlugInReadKey")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(46,33,"twoFactorU2fTouchButton")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(50,35,"twoFactorU2fSaveForm")),c.ɵɵadvance(9),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(59,37,"name")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",n.name)("disabled",!n.keyIdAvailable),c.ɵɵadvance(4),c.ɵɵproperty("disabled",t.loading||n.webAuthnListening||!n.keyIdAvailable)("appApiAction",n.challengePromise),c.ɵɵadvance(2),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(68,39,"readKey"),"\n "),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",t.loading),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!t.loading),c.ɵɵadvance(5),c.ɵɵproperty("disabled",e.loading||!n.webAuthnResponse),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.loading),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!e.loading),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",n.enabled),c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(88,41,"close"),"\n ")}}class z extends l.TwoFactorBaseComponent{constructor(e,t,n,i,o,a){super(e,t,n,o,a),this.ngZone=i,this.type=r.TwoFactorProviderType.WebAuthn,this.keyIdAvailable=null,this.keysConfiguredCount=0}auth(e){super.auth(e),this.processResponse(e.response)}submit(){const e=Object.create(null,{enable:{get:()=>super.enable}});return i(this,void 0,void 0,(function*(){if(null==this.webAuthnResponse||null==this.keyIdAvailable)return Promise.reject();const t=yield this.buildRequestModel(s.UpdateTwoFactorWebAuthnRequest);return t.deviceResponse=this.webAuthnResponse,t.id=this.keyIdAvailable,t.name=this.name,e.enable.call(this,(()=>i(this,void 0,void 0,(function*(){this.formPromise=this.apiService.putTwoFactorWebAuthn(t);const e=yield this.formPromise;yield this.processResponse(e)}))))}))}disable(){return super.disable(this.formPromise)}remove(e){return i(this,void 0,void 0,(function*(){if(this.keysConfiguredCount<=1||null!=e.removePromise)return;const t=null!=e.name?e.name:this.i18nService.t("webAuthnkeyX",e.id);if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("removeU2fConfirmation"),t,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return;const n=yield this.buildRequestModel(a.UpdateTwoFactorWebAuthnDeleteRequest);n.id=e.id;try{e.removePromise=this.apiService.deleteTwoFactorWebAuthn(n);const t=yield e.removePromise;e.removePromise=null,yield this.processResponse(t)}catch(i){this.logService.error(i)}}))}readKey(){return i(this,void 0,void 0,(function*(){if(null==this.keyIdAvailable)return;const e=yield this.buildRequestModel(o.SecretVerificationRequest);try{this.challengePromise=this.apiService.getTwoFactorWebAuthnChallenge(e);const t=yield this.challengePromise;this.readDevice(t)}catch(t){this.logService.error(t)}}))}readDevice(e){console.log("listening for key..."),this.resetWebAuthn(!0),navigator.credentials.create({publicKey:e}).then((e=>{this.ngZone.run((()=>{this.webAuthnListening=!1,this.webAuthnResponse=e}))})).catch((e=>{console.error(e),this.resetWebAuthn(!1),this.webAuthnError=!0}))}resetWebAuthn(e=!1){this.webAuthnResponse=null,this.webAuthnError=!1,this.webAuthnListening=e}processResponse(e){this.resetWebAuthn(),this.keys=[],this.keyIdAvailable=null,this.name=null,this.keysConfiguredCount=0;for(let t=1;t<=5;t++){if(null!=e.keys){const n=e.keys.filter((e=>e.id===t));if(n.length>0){this.keysConfiguredCount++,this.keys.push({id:t,name:n[0].name,configured:!0,migrated:n[0].migrated,removePromise:null});continue}}this.keys.push({id:t,name:null,configured:!1,removePromise:null}),null==this.keyIdAvailable&&(this.keyIdAvailable=t)}this.enabled=e.enabled}}t.TwoFactorWebAuthnComponent=z,z.ɵfac=function(e){return new(e||z)(c.ɵɵdirectiveInject(d.ApiService),c.ɵɵdirectiveInject(p.I18nService),c.ɵɵdirectiveInject(u.PlatformUtilsService),c.ɵɵdirectiveInject(c.NgZone),c.ɵɵdirectiveInject(m.LogService),c.ɵɵdirectiveInject(h.UserVerificationService))},z.ɵcmp=c.ɵɵdefineComponent({type:z,selectors:[["app-two-factor-webauthn"]],features:[c.ɵɵInheritDefinitionFeature],decls:31,vars:11,consts:[["role","dialog","aria-modal","true","aria-labelledby","2faU2fTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-lg"],[1,"modal-content"],[1,"modal-header"],["id","2faU2fTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[3,"organizationId","type","onAuthed",4,"ngIf"],["ngNativeValidate","",3,"appApiAction","ngSubmit",4,"ngIf"],[3,"organizationId","type","onAuthed"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-body"],["type","success","icon","bwi bwi-check-circle",3,"title",4,"ngIf"],["type","warning"],[1,"mb-0"],["alt","FIDO2 WebAuthn logo'",1,"float-right","ml-5","mfaType7"],[1,"bwi-ul"],[3,"appApiAction",4,"ngFor","ngForOf"],[1,"row"],[1,"form-group","col-6"],["for","name"],["id","name","type","text","name","Name",1,"form-control",3,"ngModel","disabled","ngModelChange"],["type","button",1,"btn","btn-outline-secondary","mr-2",3,"disabled","appApiAction","click"],["readKeyBtn",""],[4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary",3,"disabled"],["class","bwi bwi-spinner bwi-spin","aria-hidden","true",3,"title",4,"ngIf"],["type","button","class","btn btn-outline-secondary btn-submit",3,"appApiAction","disabled","click",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["type","success","icon","bwi bwi-check-circle",3,"title"],[3,"appApiAction"],["removeKeyBtn",""],[1,"bwi","bwi-li","bwi-key"],["class","bwi bwi-spin bwi-spinner text-muted bwi-fw","aria-hidden","true",3,"title",4,"ngIf"],["href","#","appStopClick","",3,"click"],["aria-hidden","true",1,"bwi","bwi-spin","bwi-spinner","text-muted","bwi-fw",3,"title"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted"],["aria-hidden","true",1,"bwi","bwi-check-circle","text-success"],["aria-hidden","true",1,"bwi","bwi-exclamation-triangle","text-danger"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button",1,"btn","btn-outline-secondary","btn-submit",3,"appApiAction","disabled","click"],["disableBtn",""]],template:function(e,t){1&e&&(c.ɵɵelementStart(0,"div",0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",1),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"div",2),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"div",3),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"h2",4),c.ɵɵtext(9),c.ɵɵpipe(10,"i18n"),c.ɵɵelementStart(11,"small"),c.ɵɵtext(12),c.ɵɵpipe(13,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(14,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(15,"\n "),c.ɵɵelementStart(16,"button",5),c.ɵɵpipe(17,"i18n"),c.ɵɵtext(18,"\n "),c.ɵɵelementStart(19,"span",6),c.ɵɵtext(20,"×"),c.ɵɵelementEnd(),c.ɵɵtext(21,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(22,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(23,"\n "),c.ɵɵtemplate(24,C,2,2,"app-two-factor-verify",7),c.ɵɵtext(25,"\n "),c.ɵɵtemplate(26,j,91,43,"form",8),c.ɵɵtext(27,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(28,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(29,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(30,"\n")),2&e&&(c.ɵɵadvance(9),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(10,5,"twoStepLogin"),"\n "),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(13,7,"webAuthnTitle")),c.ɵɵadvance(4),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(17,9,"close")),c.ɵɵadvance(8),c.ɵɵproperty("ngIf",!t.authed),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",t.authed))},directives:[v.A11yTitleDirective,f.NgIf,g.TwoFactorVerifyComponent,y.NgControlStatusGroup,y.NgForm,x.ApiActionDirective,S.CalloutComponent,f.NgForOf,y.DefaultValueAccessor,y.NgControlStatus,y.NgModel,b.StopClickDirective],pipes:[w.I18nPipe],encapsulation:2})},80445:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorYubiKeyComponent=void 0;n(91674),n(51554),n(36631),n(73828),n(57055);const r=n(97374),o=n(17128),a=n(40906),s=n(32621),l=n(91674),c=n(51554),d=n(73828),p=n(36631),u=n(57055),m=n(8863),h=n(57490),v=n(12720),f=n(96832),g=n(56820),y=n(51626),x=n(48198),S=n(99729);function b(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"app-two-factor-verify",9),s.ɵɵlistener("onAuthed",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().auth(t)})),s.ɵɵtext(1,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵproperty("organizationId",e.organizationId)("type",e.type)}}function w(e,t){1&e&&(s.ɵɵelementStart(0,"app-callout",29),s.ɵɵpipe(1,"i18n"),s.ɵɵtext(2),s.ɵɵpipe(3,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(1,2,"enabled")),s.ɵɵadvance(2),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(3,4,"twoStepLoginProviderEnabled"),"\n "))}function C(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"input",34),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().$implicit.key=t})),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext(),t=e.index,n=e.$implicit;s.ɵɵpropertyInterpolate1("id","key",t+1,""),s.ɵɵpropertyInterpolate1("name","Key",t+1,""),s.ɵɵproperty("ngModel",n.key)}}function I(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",35),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"span",36),s.ɵɵtext(3),s.ɵɵelementEnd(),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"button",37),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);const t=s.ɵɵnextContext().$implicit;return s.ɵɵnextContext(2).remove(t)})),s.ɵɵpipe(6,"i18n"),s.ɵɵtext(7,"\n "),s.ɵɵelement(8,"i",38),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext().$implicit;s.ɵɵadvance(3),s.ɵɵtextInterpolate(e.existingKey),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(6,2,"remove"))}}function E(e,t){if(1&e&&(s.ɵɵelementStart(0,"div",30),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"label",31),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵtemplate(6,C,1,3,"input",32),s.ɵɵtext(7,"\n "),s.ɵɵtemplate(8,I,11,4,"div",33),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd()),2&e){const e=t.$implicit,n=t.index;s.ɵɵadvance(2),s.ɵɵpropertyInterpolate1("for","key",n+1,""),s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind2(4,4,"yubikeyX",n+1)),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!e.existingKey),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.existingKey)}}function P(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"button",39,40),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).disable()})),s.ɵɵtext(2,"\n "),s.ɵɵelement(3,"i",26),s.ɵɵpipe(4,"i18n"),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"span"),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵreference(1),t=s.ɵɵnextContext(2);s.ɵɵproperty("appApiAction",t.disablePromise)("disabled",e.loading),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(4,4,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,6,"disableAllKeys"))}}function O(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"form",10,11),s.ɵɵlistener("ngSubmit",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().submit()})),s.ɵɵtext(2,"\n "),s.ɵɵelementStart(3,"div",12),s.ɵɵtext(4,"\n "),s.ɵɵtemplate(5,w,4,6,"app-callout",13),s.ɵɵtext(6,"\n "),s.ɵɵelementStart(7,"app-callout",14),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"p"),s.ɵɵtext(10),s.ɵɵpipe(11,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"ul",15),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"li"),s.ɵɵtext(16),s.ɵɵpipe(17,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"li"),s.ɵɵtext(20),s.ɵɵpipe(21,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(23,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(24,"\n "),s.ɵɵelement(25,"img",16),s.ɵɵtext(26,"\n "),s.ɵɵelementStart(27,"p"),s.ɵɵtext(28),s.ɵɵpipe(29,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(30,"\n "),s.ɵɵelementStart(31,"ol"),s.ɵɵtext(32,"\n "),s.ɵɵelementStart(33,"li"),s.ɵɵtext(34),s.ɵɵpipe(35,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(36,"\n "),s.ɵɵelementStart(37,"li"),s.ɵɵtext(38),s.ɵɵpipe(39,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(40,"\n "),s.ɵɵelementStart(41,"li"),s.ɵɵtext(42),s.ɵɵpipe(43,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(44,"\n "),s.ɵɵelementStart(45,"li"),s.ɵɵtext(46),s.ɵɵpipe(47,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(48,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(49,"\n "),s.ɵɵelement(50,"hr"),s.ɵɵtext(51,"\n "),s.ɵɵelementStart(52,"div",17),s.ɵɵtext(53,"\n "),s.ɵɵtemplate(54,E,10,7,"div",18),s.ɵɵtext(55,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(56,"\n "),s.ɵɵelementStart(57,"strong",19),s.ɵɵtext(58),s.ɵɵpipe(59,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(60,"\n "),s.ɵɵelementStart(61,"div",20),s.ɵɵtext(62,"\n "),s.ɵɵelementStart(63,"input",21),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().nfc=t})),s.ɵɵelementEnd(),s.ɵɵtext(64,"\n "),s.ɵɵelementStart(65,"label",22),s.ɵɵtext(66),s.ɵɵpipe(67,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(68,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(69,"\n "),s.ɵɵelementStart(70,"small",23),s.ɵɵtext(71),s.ɵɵpipe(72,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(73,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(74,"\n "),s.ɵɵelementStart(75,"div",24),s.ɵɵtext(76,"\n "),s.ɵɵelementStart(77,"button",25),s.ɵɵtext(78,"\n "),s.ɵɵelement(79,"i",26),s.ɵɵpipe(80,"i18n"),s.ɵɵtext(81,"\n "),s.ɵɵelementStart(82,"span"),s.ɵɵtext(83),s.ɵɵpipe(84,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(85,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(86,"\n "),s.ɵɵtemplate(87,P,10,8,"button",27),s.ɵɵtext(88,"\n "),s.ɵɵelementStart(89,"button",28),s.ɵɵtext(90),s.ɵɵpipe(91,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(92,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(93,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵreference(1),t=s.ɵɵnextContext();s.ɵɵproperty("appApiAction",t.formPromise),s.ɵɵadvance(5),s.ɵɵproperty("ngIf",t.enabled),s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(11,20,"twoFactorYubikeyWarning")),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(17,22,"twoFactorYubikeySupportUsb")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(21,24,"twoFactorYubikeySupportMobile")),s.ɵɵadvance(8),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(29,26,"twoFactorYubikeyAdd"),":"),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(35,28,"twoFactorYubikeyPlugIn")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(39,30,"twoFactorYubikeySelectKey")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(43,32,"twoFactorYubikeyTouchButton")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(47,34,"twoFactorYubikeySaveForm")),s.ɵɵadvance(8),s.ɵɵproperty("ngForOf",t.keys),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(59,36,"nfcSupport")),s.ɵɵadvance(5),s.ɵɵproperty("ngModel",t.nfc),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(67,38,"twoFactorYubikeySupportsNfc")),s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(72,40,"twoFactorYubikeySupportsNfcDesc")),s.ɵɵadvance(6),s.ɵɵproperty("disabled",e.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(80,42,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(84,44,"save")),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",t.enabled),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(91,46,"close"),"\n ")}}class k extends a.TwoFactorBaseComponent{constructor(e,t,n,i,o){super(e,t,n,i,o),this.type=r.TwoFactorProviderType.Yubikey,this.nfc=!1}auth(e){super.auth(e),this.processResponse(e.response)}submit(){const e=Object.create(null,{enable:{get:()=>super.enable}});return i(this,void 0,void 0,(function*(){const t=yield this.buildRequestModel(o.UpdateTwoFactorYubioOtpRequest);return t.key1=null!=this.keys&&this.keys.length>0?this.keys[0].key:null,t.key2=null!=this.keys&&this.keys.length>1?this.keys[1].key:null,t.key3=null!=this.keys&&this.keys.length>2?this.keys[2].key:null,t.key4=null!=this.keys&&this.keys.length>3?this.keys[3].key:null,t.key5=null!=this.keys&&this.keys.length>4?this.keys[4].key:null,t.nfc=this.nfc,e.enable.call(this,(()=>i(this,void 0,void 0,(function*(){this.formPromise=this.apiService.putTwoFactorYubiKey(t);const e=yield this.formPromise;yield this.processResponse(e),this.platformUtilsService.showToast("success",null,this.i18nService.t("yubikeysUpdated"))}))))}))}disable(){return super.disable(this.disablePromise)}remove(e){e.existingKey=null,e.key=null}processResponse(e){this.enabled=e.enabled,this.keys=[{key:e.key1,existingKey:this.padRight(e.key1)},{key:e.key2,existingKey:this.padRight(e.key2)},{key:e.key3,existingKey:this.padRight(e.key3)},{key:e.key4,existingKey:this.padRight(e.key4)},{key:e.key5,existingKey:this.padRight(e.key5)}],this.nfc=e.nfc||!e.enabled}padRight(e,t="•",n=44){if(null==e||null==t||e.length>=n)return e;const i=(n-e.length)/t.length;for(let r=0;rthis.apiService.postAccountKey(e))),yield this.formPromise,this.platformUtilsService.showToast("success",this.i18nService.t("keyUpdated"),this.i18nService.t("logBackInOthersToo"),{timeout:15e3}),this.messagingService.send("logout")}catch(e){this.logService.error(e)}else this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassRequired"))}))}makeRequest(){return i(this,void 0,void 0,(function*(){const e=yield this.cryptoService.getKey(),t=yield this.cryptoService.makeEncKey(e),n=yield this.cryptoService.getPrivateKey();let i=null;null!=n&&(i=yield this.cryptoService.encrypt(n,t[0]));const s=new a.UpdateKeyRequest;s.privateKey=null!=i?i.encryptedString:null,s.key=t[1].encryptedString,s.masterPasswordHash=yield this.cryptoService.hashPassword(this.masterPassword,null),yield this.syncService.fullSync(!0);const l=yield this.folderService.getAllDecrypted();for(let r=0;rthis.apiService.refreshIdentityToken())),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("updatedLicense")),this.onUpdated.emit()}catch(t){this.logService.error(t)}else this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectFile"))}))}cancel(){this.onCanceled.emit()}}t.UpdateLicenseComponent=m,m.ɵfac=function(e){return new(e||m)(o.ɵɵdirectiveInject(a.ApiService),o.ɵɵdirectiveInject(s.I18nService),o.ɵɵdirectiveInject(l.PlatformUtilsService),o.ɵɵdirectiveInject(c.LogService))},m.ɵcmp=o.ɵɵdefineComponent({type:m,selectors:[["app-update-license"]],inputs:{organizationId:"organizationId"},outputs:{onUpdated:"onUpdated",onCanceled:"onCanceled"},decls:31,vars:18,consts:[["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"form-group"],["for","file",1,"sr-only"],["type","file","id","file","name","file","required","",1,"form-control-file"],[1,"form-text","text-muted"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button",1,"btn","btn-outline-secondary",3,"click"]],template:function(e,t){if(1&e&&(o.ɵɵelementStart(0,"form",0,1),o.ɵɵlistener("ngSubmit",(function(){return t.submit()})),o.ɵɵtext(2,"\n "),o.ɵɵelementStart(3,"div",2),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"label",3),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelement(9,"input",4),o.ɵɵtext(10,"\n "),o.ɵɵelementStart(11,"small",5),o.ɵɵtext(12),o.ɵɵpipe(13,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"button",6),o.ɵɵtext(17,"\n "),o.ɵɵelement(18,"i",7),o.ɵɵpipe(19,"i18n"),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"span"),o.ɵɵtext(22),o.ɵɵpipe(23,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵelementStart(26,"button",8),o.ɵɵlistener("click",(function(){return t.cancel()})),o.ɵɵtext(27),o.ɵɵpipe(28,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(30,"\n")),2&e){const e=o.ɵɵreference(1);o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,7,"licenseFile")),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind2(13,9,"licenseFileDesc",t.organizationId?"bitwarden_organization_license.json":"bitwarden_premium_license.json")),o.ɵɵadvance(4),o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(19,12,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(23,14,"submit")),o.ɵɵadvance(5),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(28,16,"cancel"),"\n ")}},directives:[d.NgControlStatusGroup,d.NgForm,p.ApiActionDirective],pipes:[u.I18nPipe],encapsulation:2})},89805:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UserBillingHistoryComponent=void 0;n(68012),n(91674),n(51554),n(73828);const r=n(98523),o=n(94285),a=n(32621),s=n(91674),l=n(51554),c=n(73828),d=n(68012),p=n(57490),u=n(52767),m=n(8863),h=n(99729),v=function(e){return{"bwi-spin":e}};function f(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"button",3),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);return a.ɵɵnextContext().load()})),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",4),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd()}if(2&e){const e=a.ɵɵnextContext();a.ɵɵproperty("disabled",e.loading),a.ɵɵadvance(2),a.ɵɵproperty("ngClass",a.ɵɵpureFunction1(5,v,e.loading)),a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,3,"refresh"),"\n ")}}function g(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",5),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",6),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n"),a.ɵɵelementContainerEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"loading")))}function y(e,t){1&e&&(a.ɵɵelementStart(0,"p"),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(2,1,"noInvoices")))}function x(e,t){1&e&&(a.ɵɵelementStart(0,"span"),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",15),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,1,"paid"),"\n "))}function S(e,t){1&e&&(a.ɵɵelementStart(0,"span"),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",16),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,1,"unpaid"),"\n "))}function b(e,t){if(1&e&&(a.ɵɵelementStart(0,"tr"),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"td"),a.ɵɵtext(3),a.ɵɵpipe(4,"date"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"td"),a.ɵɵtext(7,"\n "),a.ɵɵelementStart(8,"a",12),a.ɵɵpipe(9,"i18n"),a.ɵɵtext(10,"\n "),a.ɵɵelement(11,"i",13),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n "),a.ɵɵelementStart(13,"a",14),a.ɵɵpipe(14,"i18n"),a.ɵɵtext(15),a.ɵɵpipe(16,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(18,"\n "),a.ɵɵelementStart(19,"td"),a.ɵɵtext(20),a.ɵɵpipe(21,"currency"),a.ɵɵelementEnd(),a.ɵɵtext(22,"\n "),a.ɵɵelementStart(23,"td"),a.ɵɵtext(24,"\n "),a.ɵɵtemplate(25,x,5,3,"span",2),a.ɵɵtext(26,"\n "),a.ɵɵtemplate(27,S,5,3,"span",2),a.ɵɵtext(28,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(29,"\n "),a.ɵɵelementEnd()),2&e){const e=t.$implicit;a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind2(4,9,e.date,"mediumDate")),a.ɵɵadvance(5),a.ɵɵpropertyInterpolate("href",e.pdfUrl,a.ɵɵsanitizeUrl),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(9,12,"downloadInvoice")),a.ɵɵadvance(5),a.ɵɵpropertyInterpolate("href",e.url,a.ɵɵsanitizeUrl),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(14,14,"viewInvoice")),a.ɵɵadvance(2),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind2(16,16,"invoiceNumber",e.number),""),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind2(21,19,e.amount,"$")),a.ɵɵadvance(5),a.ɵɵproperty("ngIf",e.paid),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!e.paid)}}function w(e,t){if(1&e&&(a.ɵɵelementStart(0,"table",10),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"tbody"),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,b,30,22,"tr",11),a.ɵɵtext(5,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n "),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext(2);a.ɵɵadvance(4),a.ɵɵproperty("ngForOf",e.invoices)}}function C(e,t){1&e&&(a.ɵɵelementStart(0,"p"),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(2,1,"noTransactions")))}function I(e,t){1&e&&(a.ɵɵelementStart(0,"span"),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(2,1,"chargeNoun"),"\n "))}function E(e,t){1&e&&(a.ɵɵelementStart(0,"span"),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(2,1,"refundNoun")))}const P=function(e,t,n,i){return{"bwi-credit-card":e,"bwi-bank":t,"bwi-bitcoin text-warning":n,"bwi-paypal text-primary":i}};function O(e,t){if(1&e&&a.ɵɵelement(0,"i",19),2&e){const e=a.ɵɵnextContext().$implicit,t=a.ɵɵnextContext(3);a.ɵɵproperty("ngClass",a.ɵɵpureFunction4(1,P,e.paymentMethodType===t.paymentMethodType.Card,e.paymentMethodType===t.paymentMethodType.BankAccount||e.paymentMethodType===t.paymentMethodType.WireTransfer,e.paymentMethodType===t.paymentMethodType.BitPay,e.paymentMethodType===t.paymentMethodType.PayPal))}}const k=function(e){return{"text-strike":e}};function A(e,t){if(1&e&&(a.ɵɵelementStart(0,"tr"),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"td"),a.ɵɵtext(3),a.ɵɵpipe(4,"date"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"td"),a.ɵɵtext(7,"\n "),a.ɵɵtemplate(8,I,3,3,"span",2),a.ɵɵtext(9,"\n "),a.ɵɵtemplate(10,E,3,3,"span",2),a.ɵɵtext(11,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n "),a.ɵɵelementStart(13,"td"),a.ɵɵtext(14,"\n "),a.ɵɵtemplate(15,O,1,6,"i",17),a.ɵɵtext(16),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n "),a.ɵɵelementStart(18,"td",18),a.ɵɵpipe(19,"i18n"),a.ɵɵtext(20),a.ɵɵpipe(21,"currency"),a.ɵɵelementEnd(),a.ɵɵtext(22,"\n "),a.ɵɵelementEnd()),2&e){const e=t.$implicit,n=a.ɵɵnextContext(3);a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind2(4,8,e.createdDate,"mediumDate")),a.ɵɵadvance(5),a.ɵɵproperty("ngIf",e.type===n.transactionType.Charge||e.type===n.transactionType.Credit),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.type===n.transactionType.Refund),a.ɵɵadvance(5),a.ɵɵproperty("ngIf",e.paymentMethodType),a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",e.details,"\n "),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(19,11,e.refunded?"refunded":"")),a.ɵɵproperty("ngClass",a.ɵɵpureFunction1(16,k,e.refunded)),a.ɵɵadvance(2),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind2(21,13,e.amount,"$"),"\n ")}}function T(e,t){if(1&e&&(a.ɵɵelementStart(0,"table",10),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"tbody"),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,A,23,18,"tr",11),a.ɵɵtext(5,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n "),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext(2);a.ɵɵadvance(4),a.ɵɵproperty("ngForOf",e.transactions)}}function M(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"h2"),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵtemplate(6,y,3,3,"p",2),a.ɵɵtext(7,"\n "),a.ɵɵtemplate(8,w,7,1,"table",7),a.ɵɵtext(9,"\n "),a.ɵɵelementStart(10,"h2",8),a.ɵɵtext(11),a.ɵɵpipe(12,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(13,"\n "),a.ɵɵtemplate(14,C,3,3,"p",2),a.ɵɵtext(15,"\n "),a.ɵɵtemplate(16,T,7,1,"table",7),a.ɵɵtext(17,"\n "),a.ɵɵelementStart(18,"small",9),a.ɵɵtext(19),a.ɵɵpipe(20,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(21,"\n"),a.ɵɵelementContainerEnd()),2&e){const e=a.ɵɵnextContext();a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,7,"invoices")),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",!e.invoices||!e.invoices.length),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.invoices&&e.invoices.length),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(12,9,"transactions")),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",!e.transactions||!e.transactions.length),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.transactions&&e.transactions.length),a.ɵɵadvance(3),a.ɵɵtextInterpolate1("* ",a.ɵɵpipeBind2(20,11,"chargesStatement","BITWARDEN"),"")}}class B{constructor(e,t,n,i){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.router=i,this.loading=!1,this.firstLoaded=!1,this.paymentMethodType=r.PaymentMethodType,this.transactionType=o.TransactionType}ngOnInit(){return i(this,void 0,void 0,(function*(){this.platformUtilsService.isSelfHost()&&this.router.navigate(["/settings/subscription"]),yield this.load(),this.firstLoaded=!0}))}load(){return i(this,void 0,void 0,(function*(){this.loading||(this.loading=!0,this.billing=yield this.apiService.getUserBillingHistory(),this.loading=!1)}))}get invoices(){return null!=this.billing?this.billing.invoices:null}get transactions(){return null!=this.billing?this.billing.transactions:null}}t.UserBillingHistoryComponent=B,B.ɵfac=function(e){return new(e||B)(a.ɵɵdirectiveInject(s.ApiService),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(c.PlatformUtilsService),a.ɵɵdirectiveInject(d.Router))},B.ɵcmp=a.ɵɵdefineComponent({type:B,selectors:[["app-user-billing"]],decls:13,vars:6,consts:[[1,"tabbed-header","d-flex"],["bit-button","","buttonType","secondary","class","tw-ml-auto",3,"disabled","click",4,"ngIf"],[4,"ngIf"],["bit-button","","buttonType","secondary",1,"tw-ml-auto",3,"disabled","click"],["aria-hidden","true",1,"bwi","bwi-refresh","bwi-fw",3,"ngClass"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["class","table mb-2",4,"ngIf"],[1,"spaced-header"],[1,"text-muted"],[1,"table","mb-2"],[4,"ngFor","ngForOf"],["target","_blank","rel","noopener",1,"mr-2",3,"href","appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-file-pdf"],["target","_blank","rel","noopener",3,"href","title"],["aria-hidden","true",1,"bwi","bwi-check","text-success"],["aria-hidden","true",1,"bwi","bwi-exclamation-circle","text-muted"],["class","bwi bwi-fw","aria-hidden","true",3,"ngClass",4,"ngIf"],[3,"ngClass","title"],["aria-hidden","true",1,"bwi","bwi-fw",3,"ngClass"]],template:function(e,t){1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"h1"),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵtemplate(6,f,5,7,"button",1),a.ɵɵtext(7,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n"),a.ɵɵtemplate(9,g,9,6,"ng-container",2),a.ɵɵtext(10,"\n"),a.ɵɵtemplate(11,M,22,14,"ng-container",2),a.ɵɵtext(12,"\n")),2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,4,"billingHistory"),"\n "),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",t.firstLoaded),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",!t.firstLoaded&&t.loading),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.billing))},directives:[p.NgIf,u.ButtonComponent,p.NgClass,p.NgForOf,m.A11yTitleDirective],pipes:[h.I18nPipe,p.DatePipe,p.CurrencyPipe],encapsulation:2})},67562:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UserSubscriptionComponent=void 0;n(68012),n(91674),n(51554),n(36631),n(73828),n(30694);const r=n(32621),o=n(30694),a=n(91674),s=n(73828),l=n(51554),c=n(68012),d=n(36631),p=n(57490),u=n(20138),m=n(52767),h=n(56820),v=n(25108),f=n(8863),g=n(13205),y=n(34959),x=n(99729);function S(e,t){1&e&&(r.ɵɵelementStart(0,"small"),r.ɵɵtext(1,"\n "),r.ɵɵelement(2,"i",2),r.ɵɵpipe(3,"i18n"),r.ɵɵtext(4,"\n "),r.ɵɵelementStart(5,"span",3),r.ɵɵtext(6),r.ɵɵpipe(7,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(3,2,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(7,4,"loading")))}function b(e,t){1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵelement(2,"i",2),r.ɵɵpipe(3,"i18n"),r.ɵɵtext(4,"\n "),r.ɵɵelementStart(5,"span",3),r.ɵɵtext(6),r.ɵɵpipe(7,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n"),r.ɵɵelementContainerEnd()),2&e&&(r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(3,2,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(7,4,"loading")))}function w(e,t){1&e&&(r.ɵɵelementStart(0,"bit-callout",6),r.ɵɵpipe(1,"i18n"),r.ɵɵtext(2),r.ɵɵpipe(3,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(1,2,"canceled")),r.ɵɵadvance(2),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(3,4,"subscriptionCanceled"),""))}function C(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"bit-callout",6),r.ɵɵpipe(1,"i18n"),r.ɵɵtext(2,"\n "),r.ɵɵelementStart(3,"p"),r.ɵɵtext(4),r.ɵɵpipe(5,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"button",7,8),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(2).reinstate()})),r.ɵɵtext(9,"\n "),r.ɵɵelement(10,"i",9),r.ɵɵpipe(11,"i18n"),r.ɵɵtext(12,"\n "),r.ɵɵelementStart(13,"span"),r.ɵɵtext(14),r.ɵɵpipe(15,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(16,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(17,"\n "),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵreference(8),t=r.ɵɵnextContext(2);r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(1,6,"pendingCancellation")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(5,8,"subscriptionPendingCanceled")),r.ɵɵadvance(3),r.ɵɵproperty("appApiAction",t.reinstatePromise)("disabled",e.loading),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(11,10,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(15,12,"reinstateSubscription"))}}function I(e,t){if(1&e&&(r.ɵɵelementStart(0,"dd"),r.ɵɵtext(1),r.ɵɵpipe(2,"date"),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(3);r.ɵɵadvance(1),r.ɵɵtextInterpolate(r.ɵɵpipeBind2(2,1,e.sub.expiration,"mediumDate"))}}function E(e,t){1&e&&(r.ɵɵelementStart(0,"dd"),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(2,1,"neverExpires")))}function P(e,t){if(1&e&&(r.ɵɵelementStart(0,"dl"),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"dt"),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵtemplate(6,I,3,4,"dd",1),r.ɵɵtext(7,"\n "),r.ɵɵtemplate(8,E,3,3,"dd",1),r.ɵɵtext(9,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(4,3,"expiration")),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",e.sub.expiration),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",!e.sub.expiration)}}function O(e,t){1&e&&(r.ɵɵelementStart(0,"span",15),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(2,1,"pendingCancellation")))}function k(e,t){if(1&e&&(r.ɵɵelementStart(0,"tr"),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"td"),r.ɵɵtext(3),r.ɵɵpipe(4,"currency"),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"td"),r.ɵɵtext(7),r.ɵɵpipe(8,"currency"),r.ɵɵpipe(9,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(10,"\n "),r.ɵɵelementEnd()),2&e){const e=t.$implicit;r.ɵɵadvance(3),r.ɵɵtextInterpolate3("\n ",e.name," ",e.quantity>1?"×"+e.quantity:""," @\n ",r.ɵɵpipeBind2(4,5,e.amount,"$"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate2("",r.ɵɵpipeBind2(8,8,e.quantity*e.amount,"$")," /",r.ɵɵpipeBind1(9,11,e.interval),"")}}function A(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",16),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"strong",17),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"table",18),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"tbody"),r.ɵɵtext(9,"\n "),r.ɵɵtemplate(10,k,11,13,"tr",19),r.ɵɵtext(11,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(13,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(3);r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(4,2,"details")),r.ɵɵadvance(7),r.ɵɵproperty("ngForOf",e.subscription.items)}}function T(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",10),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",11),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"dl"),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"dt"),r.ɵɵtext(7),r.ɵɵpipe(8,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementStart(10,"dd"),r.ɵɵtext(11,"\n "),r.ɵɵelementStart(12,"span",12),r.ɵɵtext(13),r.ɵɵelementEnd(),r.ɵɵtext(14,"\n "),r.ɵɵtemplate(15,O,3,3,"span",13),r.ɵɵtext(16,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(17,"\n "),r.ɵɵelementStart(18,"dt"),r.ɵɵtext(19),r.ɵɵpipe(20,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(21,"\n "),r.ɵɵelementStart(22,"dd"),r.ɵɵtext(23),r.ɵɵpipe(24,"date"),r.ɵɵpipe(25,"currency"),r.ɵɵelementEnd(),r.ɵɵtext(26,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(27,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(28,"\n "),r.ɵɵtemplate(29,A,14,4,"div",14),r.ɵɵtext(30,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(7),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(8,6,"status")),r.ɵɵadvance(6),r.ɵɵtextInterpolate(e.subscription&&e.subscription.status||"-"),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.subscriptionMarkedForCancel),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(20,8,"nextCharge")),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",e.nextInvoice?r.ɵɵpipeBind2(24,10,e.nextInvoice.date,"mediumDate")+", "+r.ɵɵpipeBind2(25,13,e.nextInvoice.amount,"$"):"-","\n "),r.ɵɵadvance(6),r.ɵɵproperty("ngIf",e.subscription)}}function M(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"div",23),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",24),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"button",25),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(3).closeUpdateLicense(!1)})),r.ɵɵpipe(5,"i18n"),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"span",26),r.ɵɵtext(8,"×"),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(10,"\n "),r.ɵɵelementStart(11,"h3",27),r.ɵɵtext(12),r.ɵɵpipe(13,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(14,"\n "),r.ɵɵelementStart(15,"app-update-license",28),r.ɵɵlistener("onUpdated",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(3).closeUpdateLicense(!0)}))("onCanceled",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(3).closeUpdateLicense(!1)})),r.ɵɵtext(16,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(17,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd()}2&e&&(r.ɵɵadvance(4),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(5,2,"cancel")),r.ɵɵadvance(8),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(13,4,"updateLicense")))}function B(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div"),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"button",20),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(2).updateLicense()})),r.ɵɵtext(5),r.ɵɵpipe(6,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"a",21),r.ɵɵtext(9),r.ɵɵpipe(10,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵtemplate(13,M,19,6,"div",22),r.ɵɵtext(14,"\n "),r.ɵɵelementContainerEnd()}if(2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(6,3,"updateLicense"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(10,5,"manageSubscription"),"\n "),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",e.showUpdateLicense)}}function D(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"button",35),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(3).downloadLicense()})),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()}2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"downloadLicense"),"\n "))}function R(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"button",36,37),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(3).cancel()})),r.ɵɵtext(2,"\n "),r.ɵɵelement(3,"i",9),r.ɵɵpipe(4,"i18n"),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"span"),r.ɵɵtext(7),r.ɵɵpipe(8,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵreference(1),t=r.ɵɵnextContext(3);r.ɵɵproperty("appApiAction",t.cancelPromise)("disabled",e.loading),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(4,4,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(8,6,"cancelSubscription"))}}function F(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"div",29),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"button",35),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(4).adjustStorage(!0)})),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"button",41),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(4).adjustStorage(!1)})),r.ɵɵtext(7),r.ɵɵpipe(8,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementEnd()}2&e&&(r.ɵɵadvance(3),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(4,2,"addStorage"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(8,4,"removeStorage"),"\n "))}function U(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"app-adjust-storage",42),r.ɵɵlistener("onAdjusted",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(4).closeStorage(!0)}))("onCanceled",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(4).closeStorage(!1)})),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext(4);r.ɵɵproperty("storageGbPrice",4)("add",e.adjustStorageAdd)}}function V(e,t){if(1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",38),r.ɵɵtext(3,"\n "),r.ɵɵtemplate(4,F,10,6,"div",39),r.ɵɵtext(5,"\n "),r.ɵɵtemplate(6,U,1,2,"app-adjust-storage",40),r.ɵɵtext(7,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementContainerEnd()),2&e){const e=r.ɵɵnextContext(3);r.ɵɵadvance(4),r.ɵɵproperty("ngIf",!e.showAdjustStorage),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.showAdjustStorage)}}const N=function(e){return{width:e}};function _(e,t){if(1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",29),r.ɵɵtext(3,"\n "),r.ɵɵtemplate(4,D,3,3,"button",30),r.ɵɵtext(5,"\n "),r.ɵɵtemplate(6,R,10,8,"button",31),r.ɵɵtext(7,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"h2",32),r.ɵɵtext(10),r.ɵɵpipe(11,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelementStart(13,"p"),r.ɵɵtext(14),r.ɵɵpipe(15,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(16,"\n "),r.ɵɵelementStart(17,"div",33),r.ɵɵtext(18,"\n "),r.ɵɵelementStart(19,"div",34),r.ɵɵtext(20),r.ɵɵpipe(21,"percent"),r.ɵɵelementEnd(),r.ɵɵtext(22,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(23,"\n "),r.ɵɵtemplate(24,V,9,2,"ng-container",1),r.ɵɵtext(25,"\n "),r.ɵɵelementContainerEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(4),r.ɵɵproperty("ngIf",!e.subscription||!e.subscription.cancelled),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.subscription&&!e.subscription.cancelled&&!e.subscriptionMarkedForCancel),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(11,8,"storage")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind3(15,10,"subscriptionStorage",e.sub.maxStorageGb||0,e.sub.storageName||"0 MB")),r.ɵɵadvance(5),r.ɵɵproperty("ngStyle",r.ɵɵpureFunction1(16,N,e.storageProgressWidth+"%")),r.ɵɵattribute("aria-valuenow",e.storagePercentage),r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(21,14,e.storagePercentage/100),"\n "),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",e.subscription&&!e.subscription.cancelled&&!e.subscriptionMarkedForCancel)}}function j(e,t){if(1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵtemplate(2,w,4,6,"bit-callout",4),r.ɵɵtext(3,"\n "),r.ɵɵtemplate(4,C,18,14,"bit-callout",4),r.ɵɵtext(5,"\n "),r.ɵɵtemplate(6,P,10,5,"dl",1),r.ɵɵtext(7,"\n "),r.ɵɵtemplate(8,T,31,16,"div",5),r.ɵɵtext(9,"\n "),r.ɵɵtemplate(10,B,15,7,"ng-container",1),r.ɵɵtext(11,"\n "),r.ɵɵtemplate(12,_,26,18,"ng-container",1),r.ɵɵtext(13,"\n"),r.ɵɵelementContainerEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.subscription&&e.subscription.cancelled),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.subscriptionMarkedForCancel),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.selfHosted),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",!e.selfHosted),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.selfHosted),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",!e.selfHosted)}}const z=function(e,t){return{"page-header":e,"tabbed-header":t}};class H{constructor(e,t,n,i,r,o){this.tokenService=e,this.apiService=t,this.platformUtilsService=n,this.i18nService=i,this.router=r,this.logService=o,this.loading=!1,this.firstLoaded=!1,this.adjustStorageAdd=!0,this.showAdjustStorage=!1,this.showUpdateLicense=!1,this.selfHosted=!1,this.selfHosted=n.isSelfHost()}ngOnInit(){return i(this,void 0,void 0,(function*(){yield this.load(),this.firstLoaded=!0}))}load(){return i(this,void 0,void 0,(function*(){this.loading||(this.tokenService.getPremium()?(this.loading=!0,this.sub=yield this.apiService.getUserSubscription(),this.loading=!1):this.router.navigate(["/settings/subscription/premium"]))}))}reinstate(){return i(this,void 0,void 0,(function*(){if(this.loading)return;if(this.usingInAppPurchase)return void this.platformUtilsService.showDialog(this.i18nService.t("manageSubscriptionFromStore"),this.i18nService.t("cancelSubscription"),null,null,"warning");if(yield this.platformUtilsService.showDialog(this.i18nService.t("reinstateConfirmation"),this.i18nService.t("reinstateSubscription"),this.i18nService.t("yes"),this.i18nService.t("cancel")))try{this.reinstatePromise=this.apiService.postReinstatePremium(),yield this.reinstatePromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("reinstated")),this.load()}catch(e){this.logService.error(e)}}))}cancel(){return i(this,void 0,void 0,(function*(){if(this.loading)return;if(this.usingInAppPurchase)return void this.platformUtilsService.showDialog(this.i18nService.t("manageSubscriptionFromStore"),this.i18nService.t("cancelSubscription"),null,null,"warning");if(yield this.platformUtilsService.showDialog(this.i18nService.t("cancelConfirmation"),this.i18nService.t("cancelSubscription"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning"))try{this.cancelPromise=this.apiService.postCancelPremium(),yield this.cancelPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("canceledSubscription")),this.load()}catch(e){this.logService.error(e)}}))}downloadLicense(){if(this.loading)return;const e=JSON.stringify(this.sub.license,null,2);this.platformUtilsService.saveFile(window,e,null,"bitwarden_premium_license.json")}updateLicense(){this.loading||(this.showUpdateLicense=!0)}closeUpdateLicense(e){this.showUpdateLicense=!1,e&&this.load()}adjustStorage(e){this.usingInAppPurchase?this.platformUtilsService.showDialog(this.i18nService.t("cannotPerformInAppPurchase"),this.i18nService.t(e?"addStorage":"removeStorage"),null,null,"warning"):(this.adjustStorageAdd=e,this.showAdjustStorage=!0)}closeStorage(e){this.showAdjustStorage=!1,e&&this.load()}get subscriptionMarkedForCancel(){return null!=this.subscription&&!this.subscription.cancelled&&this.subscription.cancelAtEndDate}get subscription(){return null!=this.sub?this.sub.subscription:null}get nextInvoice(){return null!=this.sub?this.sub.upcomingInvoice:null}get storagePercentage(){return null!=this.sub&&this.sub.maxStorageGb?+(this.sub.storageGb/this.sub.maxStorageGb*100).toFixed(2):0}get storageProgressWidth(){return this.storagePercentage<5?5:0}get usingInAppPurchase(){return null!=this.sub&&this.sub.usingInAppPurchase}get title(){return this.i18nService.t(this.selfHosted?"subscription":"premiumMembership")}}t.UserSubscriptionComponent=H,H.ɵfac=function(e){return new(e||H)(r.ɵɵdirectiveInject(o.TokenService),r.ɵɵdirectiveInject(a.ApiService),r.ɵɵdirectiveInject(s.PlatformUtilsService),r.ɵɵdirectiveInject(l.I18nService),r.ɵɵdirectiveInject(c.Router),r.ɵɵdirectiveInject(d.LogService))},H.ɵcmp=r.ɵɵdefineComponent({type:H,selectors:[["app-user-subscription"]],decls:12,vars:8,consts:[[3,"ngClass"],[4,"ngIf"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["type","warning",3,"title",4,"ngIf"],["class","row",4,"ngIf"],["type","warning",3,"title"],["bit-button","","type","button","buttonType","secondary",1,"btn-submit",3,"appApiAction","disabled","click"],["reinstateBtn",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[1,"row"],[1,"col-4"],[1,"text-capitalize"],["bit-badge","","badgeType","warning",4,"ngIf"],["class","col-8",4,"ngIf"],["bit-badge","","badgeType","warning"],[1,"col-8"],[1,"d-block","mb-1"],[1,"table"],[4,"ngFor","ngForOf"],["type","button","bit-button","","buttonType","secondary",3,"click"],["bit-button","","buttonType","secondary","href","https://vault.bitwarden.com/#/settings/subscription","target","_blank","rel","noopener"],["class","card mt-3",4,"ngIf"],[1,"card","mt-3"],[1,"card-body"],["type","button",1,"close",3,"appA11yTitle","click"],["aria-hidden","true"],[1,"card-body-header"],[3,"onUpdated","onCanceled"],[1,"d-flex"],["bit-button","","type","button","buttonType","secondary",3,"click",4,"ngIf"],["bit-button","","type","button","buttonType","danger","class","btn-submit tw-ml-auto",3,"appApiAction","disabled","click",4,"ngIf"],[1,"spaced-header"],[1,"progress"],["role","progressbar","aria-valuemin","0","aria-valuemax","100",1,"progress-bar","bg-success",3,"ngStyle"],["bit-button","","type","button","buttonType","secondary",3,"click"],["bit-button","","type","button","buttonType","danger",1,"btn-submit","tw-ml-auto",3,"appApiAction","disabled","click"],["cancelBtn",""],[1,"mt-3"],["class","d-flex",4,"ngIf"],[3,"storageGbPrice","add","onAdjusted","onCanceled",4,"ngIf"],["bit-button","","type","button","buttonType","secondary",1,"tw-ml-1",3,"click"],[3,"storageGbPrice","add","onAdjusted","onCanceled"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"h1"),r.ɵɵtext(3),r.ɵɵtemplate(4,S,9,6,"small",1),r.ɵɵtext(5,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(6,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(7,"\n"),r.ɵɵtemplate(8,b,9,6,"ng-container",1),r.ɵɵtext(9,"\n"),r.ɵɵtemplate(10,j,14,6,"ng-container",1),r.ɵɵtext(11,"\n")),2&e&&(r.ɵɵproperty("ngClass",r.ɵɵpureFunction2(5,z,t.selfHosted,!t.selfHosted)),r.ɵɵadvance(3),r.ɵɵtextInterpolate1("\n ",t.title,"\n "),r.ɵɵadvance(1),r.ɵɵproperty("ngIf",t.firstLoaded&&t.loading),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",!t.firstLoaded&&t.loading),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.sub))},directives:[p.NgClass,p.NgIf,u.CalloutComponent,m.ButtonComponent,h.ApiActionDirective,v.BadgeComponent,p.NgForOf,f.A11yTitleDirective,g.UpdateLicenseComponent,p.NgStyle,y.AdjustStorageComponent],pipes:[x.I18nPipe,p.DatePipe,p.CurrencyPipe,p.PercentPipe],encapsulation:2})},81397:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VaultTimeoutInputComponent=void 0;const i=n(96832),r=n(96853),o=n(32621),a=n(57490),s=n(96832),l=n(51626),c=n(99729);function d(e,t){if(1&e&&(o.ɵɵelementStart(0,"app-callout",8),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind3(2,1,"vaultTimeoutPolicyInEffect",e.vaultTimeoutPolicyHours,e.vaultTimeoutPolicyMinutes),"\n")}}function p(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",9),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.value),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}function u(e,t){1&e&&(o.ɵɵelementStart(0,"div",10),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"label",11),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",12),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"div",13),o.ɵɵtext(9,"\n "),o.ɵɵelement(10,"input",14),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"small"),o.ɵɵtext(13),o.ɵɵpipe(14,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵelementStart(17,"div",13),o.ɵɵtext(18,"\n "),o.ɵɵelement(19,"input",15),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"small"),o.ɵɵtext(22),o.ɵɵpipe(23,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,3,"customVaultTimeout")),o.ɵɵadvance(10),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(14,5,"hours")),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(23,7,"minutes")))}class m extends r.VaultTimeoutInputComponent{}t.VaultTimeoutInputComponent=m,m.ɵfac=function(){let e;return function(t){return(e||(e=o.ɵɵgetInheritedFactory(m)))(t||m)}}(),m.ɵcmp=o.ɵɵdefineComponent({type:m,selectors:[["app-vault-timeout-input"]],features:[o.ɵɵProvidersFeature([{provide:i.NG_VALUE_ACCESSOR,multi:!0,useExisting:m},{provide:i.NG_VALIDATORS,multi:!0,useExisting:m}]),o.ɵɵInheritDefinitionFeature],decls:23,vars:10,consts:[["type","info",4,"ngIf"],[3,"formGroup"],[1,"form-group"],["for","vaultTimeout"],["id","vaultTimeout","name","VaultTimeout","formControlName","vaultTimeout",1,"form-control"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"form-text","text-muted"],["class","form-group","formGroupName","custom",4,"ngIf"],["type","info"],[3,"ngValue"],["formGroupName","custom",1,"form-group"],["for","customVaultTimeout"],[1,"row"],[1,"col-6"],["id","hours","type","number","min","0","name","hours","formControlName","hours",1,"form-control"],["id","minutes","type","number","min","0","name","minutes","formControlName","minutes",1,"form-control"]],template:function(e,t){1&e&&(o.ɵɵtemplate(0,d,3,5,"app-callout",0),o.ɵɵtext(1,"\n\n"),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"div",2),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"label",3),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"select",4),o.ɵɵtext(11,"\n "),o.ɵɵtemplate(12,p,2,2,"option",5),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"small",6),o.ɵɵtext(16),o.ɵɵpipe(17,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵtemplate(20,u,27,9,"div",7),o.ɵɵtext(21,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(22,"\n")),2&e&&(o.ɵɵproperty("ngIf",t.vaultTimeoutPolicy),o.ɵɵadvance(2),o.ɵɵproperty("formGroup",t.form),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,6,"vaultTimeout")),o.ɵɵadvance(5),o.ɵɵproperty("ngForOf",t.vaultTimeouts),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(17,8,"vaultTimeoutDesc")),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",t.showCustom))},directives:[a.NgIf,s.NgControlStatusGroup,s.FormGroupDirective,s.SelectControlValueAccessor,s.NgControlStatus,s.FormControlName,a.NgForOf,l.CalloutComponent,s.NgSelectOption,s.ɵNgSelectMultipleOption,s.FormGroupName,s.MinValidator,s.NumberValueAccessor,s.DefaultValueAccessor],pipes:[c.I18nPipe],encapsulation:2})},80945:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.VerifyEmailComponent=void 0;n(91674),n(51554),n(36631),n(73828);const r=n(32621),o=n(91674),a=n(51554),s=n(73828),l=n(36631),c=n(56820),d=n(99729);class p{constructor(e,t,n,i){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.logService=i}send(){return i(this,void 0,void 0,(function*(){if(null==this.actionPromise){try{this.actionPromise=this.apiService.postAccountVerifyEmail(),yield this.actionPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("checkInboxForVerification"))}catch(e){this.logService.error(e)}this.actionPromise=null}}))}}t.VerifyEmailComponent=p,p.ɵfac=function(e){return new(e||p)(r.ɵɵdirectiveInject(o.ApiService),r.ɵɵdirectiveInject(a.I18nService),r.ɵɵdirectiveInject(s.PlatformUtilsService),r.ɵɵdirectiveInject(l.LogService))},p.ɵcmp=r.ɵɵdefineComponent({type:p,selectors:[["app-verify-email"]],decls:27,vars:14,consts:[[1,"card","border-warning"],[1,"card-header","bg-warning","text-white"],["aria-hidden","true",1,"bwi","bwi-envelope","bwi-fw"],[1,"card-body"],["type","button",1,"btn","btn-block","btn-outline-secondary","btn-submit",3,"appApiAction","disabled","click"],["sendBtn",""],["aria-hidden","true",1,"bwi","bwi-spin","bwi-spinner",3,"title"]],template:function(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelement(4,"i",2),r.ɵɵtext(5),r.ɵɵpipe(6,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"div",3),r.ɵɵtext(9,"\n "),r.ɵɵelementStart(10,"p"),r.ɵɵtext(11),r.ɵɵpipe(12,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(13,"\n "),r.ɵɵelementStart(14,"button",4,5),r.ɵɵlistener("click",(function(){return t.send()})),r.ɵɵtext(16,"\n "),r.ɵɵelement(17,"i",6),r.ɵɵpipe(18,"i18n"),r.ɵɵtext(19,"\n "),r.ɵɵelementStart(20,"span"),r.ɵɵtext(21),r.ɵɵpipe(22,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(23,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(24,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(25,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(26,"\n")),2&e){const e=r.ɵɵreference(15);r.ɵɵadvance(5),r.ɵɵtextInterpolate1(" ",r.ɵɵpipeBind1(6,6,"verifyEmail"),"\n "),r.ɵɵadvance(6),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(12,8,"verifyEmailDesc")),r.ɵɵadvance(3),r.ɵɵproperty("appApiAction",t.actionPromise)("disabled",e.loading),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(18,10,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(22,12,"sendEmail"),"\n ")}},directives:[c.ApiActionDirective],pipes:[d.I18nPipe],encapsulation:2})},26140:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExportComponent=void 0;n(96832);const i=n(21748),r=(n(85714),n(32034),n(97445),n(51554),n(36631),n(73828),n(62166),n(57055),n(32621)),o=n(85714),a=n(51554),s=n(73828),l=n(97445),c=n(32034),d=n(62166),p=n(36631),u=n(57055),m=n(96832),h=n(56820),v=n(57490),f=n(4158),g=n(51626),y=n(44995),x=n(99729);function S(e,t){1&e&&(r.ɵɵelementStart(0,"app-callout",13),r.ɵɵpipe(1,"i18n"),r.ɵɵtext(2),r.ɵɵpipe(3,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(1,2,"vaultExportDisabled")),r.ɵɵadvance(2),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(3,4,"personalVaultExportPolicyInEffect"),"\n "))}function b(e,t){if(1&e&&r.ɵɵelement(0,"app-export-scope-callout",14),2&e){const e=r.ɵɵnextContext();r.ɵɵproperty("organizationId",e.organizationId)}}function w(e,t){if(1&e&&(r.ɵɵelementStart(0,"option",15),r.ɵɵtext(1),r.ɵɵelementEnd()),2&e){const e=t.$implicit;r.ɵɵproperty("value",e.value),r.ɵɵadvance(1),r.ɵɵtextInterpolate(e.name)}}class C extends i.ExportComponent{constructor(e,t,n,i,r,o,a,s,l){super(e,t,n,i,r,o,window,a,s,l)}saved(){super.saved(),this.platformUtilsService.showToast("success",null,this.i18nService.t("exportSuccess"))}}t.ExportComponent=C,C.ɵfac=function(e){return new(e||C)(r.ɵɵdirectiveInject(o.CryptoService),r.ɵɵdirectiveInject(a.I18nService),r.ɵɵdirectiveInject(s.PlatformUtilsService),r.ɵɵdirectiveInject(l.ExportService),r.ɵɵdirectiveInject(c.EventService),r.ɵɵdirectiveInject(d.PolicyService),r.ɵɵdirectiveInject(p.LogService),r.ɵɵdirectiveInject(u.UserVerificationService),r.ɵɵdirectiveInject(m.FormBuilder))},C.ɵcmp=r.ɵɵdefineComponent({type:C,selectors:[["app-export"]],features:[r.ɵɵInheritDefinitionFeature],decls:49,vars:18,consts:[["ngNativeValidate","",3,"appApiAction","formGroup","ngSubmit"],["form",""],[1,"page-header"],["type","error",3,"title",4,"ngIf"],[3,"organizationId",4,"ngIf"],[1,"row"],[1,"form-group","col-6"],["for","format"],["id","format","name","Format","formControlName","format",1,"form-control"],[3,"value",4,"ngFor","ngForOf"],["ngDefaultControl","","formControlName","secret","name","secret"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","error",3,"title"],[3,"organizationId"],[3,"value"]],template:function(e,t){if(1&e&&(r.ɵɵelementStart(0,"form",0,1),r.ɵɵlistener("ngSubmit",(function(){return t.submit()})),r.ɵɵtext(2,"\n "),r.ɵɵelementStart(3,"div",2),r.ɵɵtext(4,"\n "),r.ɵɵelementStart(5,"h1"),r.ɵɵtext(6),r.ɵɵpipe(7,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n\n "),r.ɵɵtemplate(10,S,4,6,"app-callout",3),r.ɵɵtext(11,"\n "),r.ɵɵtemplate(12,b,1,1,"app-export-scope-callout",4),r.ɵɵtext(13,"\n\n "),r.ɵɵelementStart(14,"div",5),r.ɵɵtext(15,"\n "),r.ɵɵelementStart(16,"div",6),r.ɵɵtext(17,"\n "),r.ɵɵelementStart(18,"label",7),r.ɵɵtext(19),r.ɵɵpipe(20,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(21,"\n "),r.ɵɵelementStart(22,"select",8),r.ɵɵtext(23,"\n "),r.ɵɵtemplate(24,w,2,2,"option",9),r.ɵɵtext(25,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(26,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(27,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(28,"\n "),r.ɵɵelementStart(29,"div",5),r.ɵɵtext(30,"\n "),r.ɵɵelementStart(31,"div",6),r.ɵɵtext(32,"\n "),r.ɵɵelementStart(33,"app-user-verification",10),r.ɵɵtext(34,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(35,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(36,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(37,"\n "),r.ɵɵelementStart(38,"button",11),r.ɵɵtext(39,"\n "),r.ɵɵelement(40,"i",12),r.ɵɵpipe(41,"i18n"),r.ɵɵtext(42,"\n "),r.ɵɵelementStart(43,"span"),r.ɵɵtext(44),r.ɵɵpipe(45,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(46,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(47,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(48,"\n")),2&e){const e=r.ɵɵreference(1);r.ɵɵproperty("appApiAction",t.formPromise)("formGroup",t.exportForm),r.ɵɵadvance(6),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(7,10,"exportVault")),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",t.disabledByPolicy),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",!t.disabledByPolicy),r.ɵɵadvance(7),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(20,12,"fileFormat")),r.ɵɵadvance(5),r.ɵɵproperty("ngForOf",t.formatOptions),r.ɵɵadvance(14),r.ɵɵproperty("disabled",e.loading||t.exportForm.disabled),r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(41,14,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(45,16,"exportVault"))}},directives:[m.NgControlStatusGroup,h.ApiActionDirective,m.FormGroupDirective,v.NgIf,m.SelectControlValueAccessor,m.NgControlStatus,m.FormControlName,v.NgForOf,f.UserVerificationComponent,m.DefaultValueAccessor,g.CalloutComponent,y.ExportScopeCalloutComponent,m.NgSelectOption,m.ɵNgSelectMultipleOption],pipes:[x.I18nPipe],encapsulation:2})},8042:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.GeneratorComponent=void 0;const r=n(32621),o=(n(68012),n(5675)),a=(n(64684),n(51554),n(36631),n(84275),n(73828),n(73569),n(13444),n(4184)),s=n(32621),l=n(84275),c=n(13444),d=n(73569),p=n(73828),u=n(51554),m=n(36631),h=n(68012),v=n(64684),f=n(57490),g=n(51626),y=n(31161),x=n(96832),S=n(8863),b=n(56820),w=n(99729),C=n(86758),I=["historyTemplate"];function E(e,t){1&e&&(s.ɵɵelementStart(0,"app-callout",10),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,1,"passwordGeneratorPolicyInEffect"),"\n"))}function P(e,t){if(1&e&&(s.ɵɵelement(0,"div",11),s.ɵɵpipe(1,"colorPassword")),2&e){const e=s.ɵɵnextContext();s.ɵɵproperty("innerHTML",s.ɵɵpipeBind1(1,1,e.password),s.ɵɵsanitizeHtml)}}function O(e,t){if(1&e&&(s.ɵɵelement(0,"div",11),s.ɵɵpipe(1,"colorPassword")),2&e){const e=s.ɵɵnextContext();s.ɵɵproperty("innerHTML",s.ɵɵpipeBind1(1,1,e.username),s.ɵɵsanitizeHtml)}}function k(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",12),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"input",13),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().type=t}))("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().typeChanged()})),s.ɵɵelementEnd(),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"label",14),s.ɵɵtext(5),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=s.ɵɵnextContext();s.ɵɵadvance(2),s.ɵɵpropertyInterpolate1("id","type_",e.value,""),s.ɵɵproperty("ngModel",n.type)("value",e.value)("checked",n.type===e.value),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate1("for","type_",e.value,""),s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function A(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",12),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"input",23),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).passwordOptions.type=t}))("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).savePasswordOptions()})),s.ɵɵelementEnd(),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"label",14),s.ɵɵtext(5),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=s.ɵɵnextContext(2);s.ɵɵadvance(2),s.ɵɵpropertyInterpolate1("id","passwordType_",e.value,""),s.ɵɵproperty("ngModel",n.passwordOptions.type)("value",e.value)("checked",n.passwordOptions.type===e.value),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate1("for","passwordType_",e.value,""),s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function T(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",24),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"div",25),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"label",26),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"input",27),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).passwordOptions.numWords=t}))("blur",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).savePasswordOptions()})),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"div",25),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"label",28),s.ɵɵtext(16),s.ɵɵpipe(17,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"input",29),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).passwordOptions.wordSeparator=t}))("blur",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).savePasswordOptions()})),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵelementStart(23,"label",30),s.ɵɵtext(24),s.ɵɵpipe(25,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(26,"\n "),s.ɵɵelementStart(27,"div",31),s.ɵɵtext(28,"\n "),s.ɵɵelementStart(29,"div",32),s.ɵɵtext(30,"\n "),s.ɵɵelementStart(31,"input",33),s.ɵɵlistener("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).savePasswordOptions()}))("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).passwordOptions.capitalize=t})),s.ɵɵelementEnd(),s.ɵɵtext(32,"\n "),s.ɵɵelementStart(33,"label",34),s.ɵɵtext(34),s.ɵɵpipe(35,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(36,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(37,"\n "),s.ɵɵelementStart(38,"div",32),s.ɵɵtext(39,"\n "),s.ɵɵelementStart(40,"input",35),s.ɵɵlistener("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).savePasswordOptions()}))("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).passwordOptions.includeNumber=t})),s.ɵɵelementEnd(),s.ɵɵtext(41,"\n "),s.ɵɵelementStart(42,"label",36),s.ɵɵtext(43),s.ɵɵpipe(44,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(45,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(46,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(47,"\n "),s.ɵɵelementContainerEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,11,"numWords")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.passwordOptions.numWords),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(17,13,"wordSeparator")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.passwordOptions.wordSeparator),s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(25,15,"options")),s.ɵɵadvance(7),s.ɵɵproperty("ngModel",e.passwordOptions.capitalize)("disabled",null==e.enforcedPasswordPolicyOptions?null:e.enforcedPasswordPolicyOptions.capitalize),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(35,17,"capitalize")),s.ɵɵadvance(6),s.ɵɵproperty("ngModel",e.passwordOptions.includeNumber)("disabled",null==e.enforcedPasswordPolicyOptions?null:e.enforcedPasswordPolicyOptions.includeNumber),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(44,19,"includeNumber"))}}function M(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",24),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"div",25),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"label",37),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"input",38),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).passwordOptions.length=t}))("blur",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).savePasswordOptions()}))("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).lengthChanged()})),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"div",25),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"label",39),s.ɵɵtext(16),s.ɵɵpipe(17,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"input",40),s.ɵɵlistener("blur",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).savePasswordOptions()}))("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).passwordOptions.minNumber=t}))("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).minNumberChanged()})),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementStart(22,"div",25),s.ɵɵtext(23,"\n "),s.ɵɵelementStart(24,"label",41),s.ɵɵtext(25),s.ɵɵpipe(26,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n "),s.ɵɵelementStart(28,"input",42),s.ɵɵlistener("blur",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).savePasswordOptions()}))("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).passwordOptions.minSpecial=t}))("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).minSpecialChanged()})),s.ɵɵelementEnd(),s.ɵɵtext(29,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(30,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(31,"\n "),s.ɵɵelementStart(32,"label",30),s.ɵɵtext(33),s.ɵɵpipe(34,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(35,"\n "),s.ɵɵelementStart(36,"div",31),s.ɵɵtext(37,"\n "),s.ɵɵelementStart(38,"div",32),s.ɵɵtext(39,"\n "),s.ɵɵelementStart(40,"input",43),s.ɵɵlistener("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).savePasswordOptions()}))("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).passwordOptions.uppercase=t})),s.ɵɵpipe(41,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(42,"\n "),s.ɵɵelementStart(43,"label",44),s.ɵɵtext(44,"A-Z"),s.ɵɵelementEnd(),s.ɵɵtext(45,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(46,"\n "),s.ɵɵelementStart(47,"div",32),s.ɵɵtext(48,"\n "),s.ɵɵelementStart(49,"input",45),s.ɵɵlistener("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).savePasswordOptions()}))("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).passwordOptions.lowercase=t})),s.ɵɵpipe(50,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(51,"\n "),s.ɵɵelementStart(52,"label",46),s.ɵɵtext(53,"a-z"),s.ɵɵelementEnd(),s.ɵɵtext(54,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(55,"\n "),s.ɵɵelementStart(56,"div",32),s.ɵɵtext(57,"\n "),s.ɵɵelementStart(58,"input",47),s.ɵɵlistener("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).savePasswordOptions()}))("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).passwordOptions.number=t})),s.ɵɵpipe(59,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(60,"\n "),s.ɵɵelementStart(61,"label",48),s.ɵɵtext(62,"0-9"),s.ɵɵelementEnd(),s.ɵɵtext(63,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(64,"\n "),s.ɵɵelementStart(65,"div",32),s.ɵɵtext(66,"\n "),s.ɵɵelementStart(67,"input",49),s.ɵɵlistener("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).savePasswordOptions()}))("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).passwordOptions.special=t})),s.ɵɵpipe(68,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(69,"\n "),s.ɵɵelementStart(70,"label",50),s.ɵɵtext(71,"!@#$%^&*"),s.ɵɵelementEnd(),s.ɵɵtext(72,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(73,"\n "),s.ɵɵelementStart(74,"div",32),s.ɵɵtext(75,"\n "),s.ɵɵelementStart(76,"input",51),s.ɵɵlistener("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).savePasswordOptions()}))("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).avoidAmbiguous=t})),s.ɵɵelementEnd(),s.ɵɵtext(77,"\n "),s.ɵɵelementStart(78,"label",52),s.ɵɵtext(79),s.ɵɵpipe(80,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(81,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(82,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(83,"\n "),s.ɵɵelementContainerEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,21,"length")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.passwordOptions.length),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(17,23,"minNumbers")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.passwordOptions.minNumber),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(26,25,"minSpecial")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.passwordOptions.minSpecial),s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(34,27,"options")),s.ɵɵadvance(7),s.ɵɵproperty("ngModel",e.passwordOptions.uppercase)("disabled",null==e.enforcedPasswordPolicyOptions?null:e.enforcedPasswordPolicyOptions.useUppercase),s.ɵɵattribute("aria-label",s.ɵɵpipeBind1(41,29,"uppercase")),s.ɵɵadvance(9),s.ɵɵproperty("ngModel",e.passwordOptions.lowercase)("disabled",null==e.enforcedPasswordPolicyOptions?null:e.enforcedPasswordPolicyOptions.useLowercase),s.ɵɵattribute("aria-label",s.ɵɵpipeBind1(50,31,"lowercase")),s.ɵɵadvance(9),s.ɵɵproperty("ngModel",e.passwordOptions.number)("disabled",null==e.enforcedPasswordPolicyOptions?null:e.enforcedPasswordPolicyOptions.useNumbers),s.ɵɵattribute("aria-label",s.ɵɵpipeBind1(59,33,"numbers")),s.ɵɵadvance(9),s.ɵɵproperty("ngModel",e.passwordOptions.special)("disabled",null==e.enforcedPasswordPolicyOptions?null:e.enforcedPasswordPolicyOptions.useSpecial),s.ɵɵattribute("aria-label",s.ɵɵpipeBind1(68,35,"specialCharacters")),s.ɵɵadvance(9),s.ɵɵproperty("ngModel",e.avoidAmbiguous),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(80,37,"ambiguous"))}}function B(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",15),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"label",16),s.ɵɵtext(5),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵtemplate(8,A,7,6,"div",7),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n "),s.ɵɵtemplate(11,T,48,21,"ng-container",8),s.ɵɵtext(12,"\n "),s.ɵɵtemplate(13,M,84,39,"ng-container",8),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"div",17),s.ɵɵtext(16,"\n "),s.ɵɵelementStart(17,"div"),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"button",18),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().regenerate()})),s.ɵɵtext(20),s.ɵɵpipe(21,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵelementStart(23,"button",19),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().copy()})),s.ɵɵtext(24),s.ɵɵpipe(25,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(26,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n "),s.ɵɵelementStart(28,"div",20),s.ɵɵtext(29,"\n "),s.ɵɵelementStart(30,"button",21),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().history()})),s.ɵɵpipe(31,"i18n"),s.ɵɵtext(32,"\n "),s.ɵɵelement(33,"i",22),s.ɵɵtext(34,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(35,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(36,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(37,"\n"),s.ɵɵelementContainerEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(6,7,"passwordType")),s.ɵɵadvance(3),s.ɵɵproperty("ngForOf",e.passTypeOptions),s.ɵɵadvance(3),s.ɵɵproperty("ngIf","passphrase"===e.passwordOptions.type),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","password"===e.passwordOptions.type),s.ɵɵadvance(7),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(21,9,"regeneratePassword"),"\n "),s.ɵɵadvance(4),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(25,11,"copyPassword"),"\n "),s.ɵɵadvance(6),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(31,13,"passwordHistory"))}}function D(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",32),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"input",63),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).usernameOptions.type=t}))("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).saveUsernameOptions()})),s.ɵɵelementEnd(),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"label",14),s.ɵɵtext(5),s.ɵɵelementStart(6,"div",64),s.ɵɵtext(7),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=s.ɵɵnextContext(2);s.ɵɵadvance(2),s.ɵɵpropertyInterpolate1("id","usernameType_",e.value,""),s.ɵɵproperty("ngModel",n.usernameOptions.type)("value",e.value)("checked",n.usernameOptions.type===e.value),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate1("for","usernameType_",e.value,""),s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",e.name,"\n "),s.ɵɵadvance(2),s.ɵɵtextInterpolate(e.desc)}}function R(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",32),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"input",65),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(3).usernameOptions.forwardedService=t}))("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(3).saveUsernameOptions()})),s.ɵɵelementEnd(),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"label",14),s.ɵɵtext(5),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=s.ɵɵnextContext(3);s.ɵɵadvance(2),s.ɵɵpropertyInterpolate1("id","forwardtype_",e.value,""),s.ɵɵproperty("ngModel",n.usernameOptions.forwardedService)("value",e.value)("checked",n.usernameOptions.forwardedService===e.value),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate1("for","forwardtype_",e.value,""),s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function F(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",24),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",25),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"label",66),s.ɵɵtext(5),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"input",67),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(3).usernameOptions.forwardedSimpleLoginApiKey=t}))("blur",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(3).saveUsernameOptions()})),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext(3);s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(6,2,"apiKey")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.usernameOptions.forwardedSimpleLoginApiKey)}}function U(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",24),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",25),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"label",68),s.ɵɵtext(5),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"input",69),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(3).usernameOptions.forwardedAnonAddyApiToken=t}))("blur",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(3).saveUsernameOptions()})),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n "),s.ɵɵelementStart(11,"div",25),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"label",70),s.ɵɵtext(14),s.ɵɵpipe(15,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(16,"\n "),s.ɵɵelementStart(17,"input",71),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(3).usernameOptions.forwardedAnonAddyDomain=t}))("blur",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(3).saveUsernameOptions()})),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(19,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext(3);s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(6,4,"apiAccessToken")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.usernameOptions.forwardedAnonAddyApiToken),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(15,6,"domainName")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.usernameOptions.forwardedAnonAddyDomain)}}function V(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",24),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",25),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"label",72),s.ɵɵtext(5),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"input",73),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(3).usernameOptions.forwardedFirefoxApiToken=t}))("blur",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(3).saveUsernameOptions()})),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext(3);s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(6,2,"apiAccessToken")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.usernameOptions.forwardedFirefoxApiToken)}}function N(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",31),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"label",30),s.ɵɵtext(5),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵtemplate(8,R,7,6,"div",57),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n "),s.ɵɵtemplate(11,F,11,4,"div",58),s.ɵɵtext(12,"\n "),s.ɵɵtemplate(13,U,20,8,"div",58),s.ɵɵtext(14,"\n "),s.ɵɵtemplate(15,V,11,4,"div",58),s.ɵɵtext(16,"\n "),s.ɵɵelementContainerEnd()),2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(6,5,"service")),s.ɵɵadvance(3),s.ɵɵproperty("ngForOf",e.forwardOptions),s.ɵɵadvance(3),s.ɵɵproperty("ngIf","simplelogin"===e.usernameOptions.forwardedService),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","anonaddy"===e.usernameOptions.forwardedService),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","firefoxrelay"===e.usernameOptions.forwardedService)}}function _(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",24),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",25),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"label",74),s.ɵɵtext(5),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"input",75),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).usernameOptions.subaddressEmail=t}))("blur",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).saveUsernameOptions()})),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(6,2,"emailAddress")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.usernameOptions.subaddressEmail)}}function j(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",24),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",25),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"label",76),s.ɵɵtext(5),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"input",77),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).usernameOptions.catchallDomain=t}))("blur",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).saveUsernameOptions()})),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(6,2,"domainName")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.usernameOptions.catchallDomain)}}function z(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"label",30),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"div",24),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"div",31),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"div",32),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"input",78),s.ɵɵlistener("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).saveUsernameOptions()}))("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).usernameOptions.wordCapitalize=t})),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n "),s.ɵɵelementStart(14,"label",79),s.ɵɵtext(15),s.ɵɵpipe(16,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(17,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"div",32),s.ɵɵtext(20,"\n "),s.ɵɵelementStart(21,"input",80),s.ɵɵlistener("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).saveUsernameOptions()}))("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).usernameOptions.wordIncludeNumber=t})),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵelementStart(23,"label",81),s.ɵɵtext(24),s.ɵɵpipe(25,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(26,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(28,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(29,"\n "),s.ɵɵelementContainerEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,5,"options")),s.ɵɵadvance(9),s.ɵɵproperty("ngModel",e.usernameOptions.wordCapitalize),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(16,7,"capitalize")),s.ɵɵadvance(6),s.ɵɵproperty("ngModel",e.usernameOptions.wordIncludeNumber),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(25,9,"includeNumber"))}}function H(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",53),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"div",30),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"label",54),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"a",55),s.ɵɵpipe(11,"i18n"),s.ɵɵtext(12,"\n "),s.ɵɵelement(13,"i",56),s.ɵɵtext(14,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(15,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(16,"\n "),s.ɵɵtemplate(17,D,10,7,"div",57),s.ɵɵtext(18,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(19,"\n "),s.ɵɵtemplate(20,N,17,7,"ng-container",8),s.ɵɵtext(21,"\n "),s.ɵɵtemplate(22,_,11,4,"div",58),s.ɵɵtext(23,"\n "),s.ɵɵtemplate(24,j,11,4,"div",58),s.ɵɵtext(25,"\n "),s.ɵɵtemplate(26,z,30,11,"ng-container",8),s.ɵɵtext(27,"\n "),s.ɵɵelementStart(28,"div",59,60),s.ɵɵtext(30,"\n "),s.ɵɵelementStart(31,"button",61),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().regenerate()})),s.ɵɵtext(32,"\n "),s.ɵɵelement(33,"i",62),s.ɵɵpipe(34,"i18n"),s.ɵɵtext(35,"\n "),s.ɵɵelementStart(36,"span"),s.ɵɵtext(37),s.ɵɵpipe(38,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(39,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(40,"\n "),s.ɵɵelementStart(41,"button",19),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().copy()})),s.ɵɵtext(42),s.ɵɵpipe(43,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(44,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(45,"\n"),s.ɵɵelementContainerEnd()}if(2&e){const e=s.ɵɵreference(29),t=s.ɵɵnextContext();s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,12,"usernameType")),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(11,14,"learnMore")),s.ɵɵadvance(7),s.ɵɵproperty("ngForOf",t.usernameTypeOptions),s.ɵɵadvance(3),s.ɵɵproperty("ngIf","forwarded"===t.usernameOptions.type),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","subaddress"===t.usernameOptions.type),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","catchall"===t.usernameOptions.type),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","word"===t.usernameOptions.type),s.ɵɵadvance(2),s.ɵɵproperty("appApiAction",t.usernameGeneratingPromise),s.ɵɵadvance(3),s.ɵɵproperty("disabled",e.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(34,16,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(38,18,"regenerateUsername")),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(43,20,"copyUsername"),"\n ")}}function L(e,t){}class K extends o.GeneratorComponent{constructor(e,t,n,i,r,o,a,s){super(e,t,i,n,r,o,a,window),this.modalService=s,i.isSelfHost()&&this.forwardOptions.splice(this.forwardOptions.findIndex((e=>"firefoxrelay"===e.value)),1)}history(){return i(this,void 0,void 0,(function*(){yield this.modalService.openViewRef(a.PasswordGeneratorHistoryComponent,this.historyModalRef)}))}lengthChanged(){document.getElementById("length").focus()}minNumberChanged(){document.getElementById("min-number").focus()}minSpecialChanged(){document.getElementById("min-special").focus()}}t.GeneratorComponent=K,K.ɵfac=function(e){return new(e||K)(s.ɵɵdirectiveInject(l.PasswordGenerationService),s.ɵɵdirectiveInject(c.UsernameGenerationService),s.ɵɵdirectiveInject(d.StateService),s.ɵɵdirectiveInject(p.PlatformUtilsService),s.ɵɵdirectiveInject(u.I18nService),s.ɵɵdirectiveInject(m.LogService),s.ɵɵdirectiveInject(h.ActivatedRoute),s.ɵɵdirectiveInject(v.ModalService))},K.ɵcmp=s.ɵɵdefineComponent({type:K,selectors:[["app-generator"]],viewQuery:function(e,t){if(1&e&&s.ɵɵviewQuery(I,7,r.ViewContainerRef),2&e){let e;s.ɵɵqueryRefresh(e=s.ɵɵloadQuery())&&(t.historyModalRef=e.first)}},features:[s.ɵɵInheritDefinitionFeature],decls:35,vars:12,consts:[[1,"page-header"],["type","info",4,"ngIf"],[1,"card","card-generated","bg-light","my-4"],[1,"card-body"],["class","generated-wrapper","appSelectCopy","",3,"innerHTML",4,"ngIf"],["role","radiogroup","aria-labelledby","typeHeading",1,"form-group"],["id","typeHeading",1,"d-block"],["class","form-check form-check-inline",4,"ngFor","ngForOf"],[4,"ngIf"],["historyTemplate",""],["type","info"],["appSelectCopy","",1,"generated-wrapper",3,"innerHTML"],[1,"form-check","form-check-inline"],["type","radio","name","Type",1,"form-check-input",3,"ngModel","id","value","checked","ngModelChange","change"],[1,"form-check-label",3,"for"],["aria-labelledby","passwordTypeHeading","role","radiogroup",1,"form-group"],["id","passwordTypeHeading",1,"d-block"],[1,"d-flex"],["type","button",1,"btn","btn-primary",3,"click"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"ml-auto"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-clock","bwi-lg"],["type","radio","name","PasswordType",1,"form-check-input",3,"ngModel","id","value","checked","ngModelChange","change"],[1,"row"],[1,"form-group","col-4"],["for","num-words"],["id","num-words","type","number","min","3","max","20",1,"form-control",3,"ngModel","ngModelChange","blur"],["for","word-separator"],["id","word-separator","type","text","maxlength","1",1,"form-control",3,"ngModel","ngModelChange","blur"],[1,"d-block"],[1,"form-group"],[1,"form-check"],["id","capitalize","type","checkbox",1,"form-check-input",3,"ngModel","disabled","change","ngModelChange"],["for","capitalize",1,"form-check-label"],["id","include-number","type","checkbox",1,"form-check-input",3,"ngModel","disabled","change","ngModelChange"],["for","include-number",1,"form-check-label"],["for","length"],["id","length","type","number","min","5","max","128",1,"form-control",3,"ngModel","ngModelChange","blur","change"],["for","min-number"],["id","min-number","type","number","min","0","max","9",1,"form-control",3,"ngModel","blur","ngModelChange","change"],["for","min-special"],["id","min-special","type","number","min","0","max","9",1,"form-control",3,"ngModel","blur","ngModelChange","change"],["id","uppercase","type","checkbox",1,"form-check-input",3,"ngModel","disabled","change","ngModelChange"],["for","uppercase",1,"form-check-label"],["id","lowercase","type","checkbox",1,"form-check-input",3,"ngModel","disabled","change","ngModelChange"],["for","lowercase",1,"form-check-label"],["id","numbers","type","checkbox",1,"form-check-input",3,"ngModel","disabled","change","ngModelChange"],["for","numbers",1,"form-check-label"],["id","special","type","checkbox",1,"form-check-input",3,"ngModel","disabled","change","ngModelChange"],["for","special",1,"form-check-label"],["id","ambiguous","type","checkbox",1,"form-check-input",3,"ngModel","change","ngModelChange"],["for","ambiguous",1,"form-check-label"],["aria-labelledby","usernameTypeHeading","role","radiogroup",1,"form-group"],["id","usernameTypeHeading"],["href","https://bitwarden.com/help/generator/#username-types","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],["class","form-check",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],[3,"appApiAction"],["form",""],["type","button",1,"btn","btn-submit","btn-primary",3,"disabled","click"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","radio","name","UsernameType",1,"form-check-input",3,"ngModel","id","value","checked","ngModelChange","change"],[1,"small","text-muted"],["type","radio","name","ForwardType",1,"form-check-input",3,"ngModel","id","value","checked","ngModelChange","change"],["for","simplelogin-apikey"],["id","simplelogin-apikey","type","password",1,"form-control",3,"ngModel","ngModelChange","blur"],["for","anonaddy-apikey"],["id","anonaddy-apikey","type","password",1,"form-control",3,"ngModel","ngModelChange","blur"],["for","anonaddy-domain"],["id","anonaddy-domain","type","text",1,"form-control",3,"ngModel","ngModelChange","blur"],["for","firefox-apikey"],["id","firefox-apikey","type","password",1,"form-control",3,"ngModel","ngModelChange","blur"],["for","subaddress-email"],["id","subaddress-email","type","text",1,"form-control",3,"ngModel","ngModelChange","blur"],["for","catchall-domain"],["id","catchall-domain","type","text",1,"form-control",3,"ngModel","ngModelChange","blur"],["id","capitalizeUsername","type","checkbox",3,"ngModel","change","ngModelChange"],["for","capitalizeUsername",1,"form-check-label"],["id","includeNumberUsername","type","checkbox",3,"ngModel","change","ngModelChange"],["for","includeNumberUsername",1,"form-check-label"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"h1"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n"),s.ɵɵtemplate(7,E,3,3,"app-callout",1),s.ɵɵtext(8,"\n"),s.ɵɵelementStart(9,"div",2),s.ɵɵtext(10,"\n "),s.ɵɵelementStart(11,"div",3),s.ɵɵtext(12,"\n "),s.ɵɵtemplate(13,P,2,3,"div",4),s.ɵɵtext(14,"\n "),s.ɵɵtemplate(15,O,2,3,"div",4),s.ɵɵtext(16,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(17,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n"),s.ɵɵelementStart(19,"div",5),s.ɵɵtext(20,"\n "),s.ɵɵelementStart(21,"label",6),s.ɵɵtext(22),s.ɵɵpipe(23,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(24,"\n "),s.ɵɵtemplate(25,k,7,6,"div",7),s.ɵɵtext(26,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n"),s.ɵɵtemplate(28,B,38,15,"ng-container",8),s.ɵɵtext(29,"\n"),s.ɵɵtemplate(30,H,46,22,"ng-container",8),s.ɵɵtext(31,"\n"),s.ɵɵtemplate(32,L,0,0,"ng-template",null,9,s.ɵɵtemplateRefExtractor),s.ɵɵtext(34,"\n")),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,8,"generator")),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",(null==t.enforcedPasswordPolicyOptions?null:t.enforcedPasswordPolicyOptions.inEffect())&&"password"===t.type),s.ɵɵadvance(6),s.ɵɵproperty("ngIf","password"===t.type),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","username"===t.type),s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(23,10,"whatWouldYouLikeToGenerate")),s.ɵɵadvance(3),s.ɵɵproperty("ngForOf",t.typeOptions),s.ɵɵadvance(3),s.ɵɵproperty("ngIf","password"===t.type),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","username"===t.type))},directives:[f.NgIf,f.NgForOf,g.CalloutComponent,y.SelectCopyDirective,x.RadioControlValueAccessor,x.DefaultValueAccessor,x.NgControlStatus,x.NgModel,S.A11yTitleDirective,x.MinValidator,x.MaxValidator,x.NumberValueAccessor,x.MaxLengthValidator,x.CheckboxControlValueAccessor,b.ApiActionDirective],pipes:[w.I18nPipe,C.ColorPasswordPipe],encapsulation:2})},56038:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ImportComponent=void 0;n(68012);const r=n(55733),o=n(78764),a=(n(51554),n(11223),n(36631),n(73828),n(62166),n(49906)),s=n(32621),l=n(51554),c=n(11223),d=n(68012),p=n(73828),u=n(62166),m=n(36631),h=n(57490),v=n(96832),f=n(51626),g=n(99729);function y(e,t){1&e&&(s.ɵɵelementStart(0,"app-callout",18),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,1,"personalOwnershipPolicyInEffectImports"),"\n"))}function x(e,t){if(1&e&&(s.ɵɵelementStart(0,"option",19),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){const e=t.$implicit;s.ɵɵproperty("ngValue",e.id),s.ɵɵadvance(1),s.ɵɵtextInterpolate(e.name)}}function S(e,t){if(1&e&&(s.ɵɵelementStart(0,"option",19),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){const e=t.$implicit;s.ɵɵproperty("ngValue",e.id),s.ɵɵadvance(1),s.ɵɵtextInterpolate(e.name)}}function b(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"option",20),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,S,2,2,"option",9),s.ɵɵtext(5,"\n "),s.ɵɵelementContainerEnd()),2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(4),s.ɵɵproperty("ngForOf",e.importOptions)}}function w(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n See detailed instructions on our help site at\n "),s.ɵɵelementStart(2,"a",22),s.ɵɵtext(3,"\n https://bitwarden.com/help/export-your-data/"),s.ɵɵelementEnd(),s.ɵɵtext(4,"\n "),s.ɵɵelementContainerEnd())}function C(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n See detailed instructions on our help site at\n "),s.ɵɵelementStart(2,"a",23),s.ɵɵtext(3,"\n https://bitwarden.com/help/import-from-lastpass/"),s.ɵɵelementEnd(),s.ɵɵtext(4,"\n "),s.ɵɵelementContainerEnd())}function I(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the KeePassX desktop application, navigate to "Database" → "Export to CSV file" and\n save the CSV file.\n '),s.ɵɵelementContainerEnd())}function E(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n In the Avira web vault, go to "Settings" → "My Data" → "Export data" and save the\n CSV file.\n '),s.ɵɵelementContainerEnd())}function P(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n In the Blur web vault, click your username at the top and go to "Settings" → "Export\n Data", then click "Export CSV" for your "Accounts".\n '),s.ɵɵelementContainerEnd())}function O(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the SaveInCloud desktop application, navigate to "File" → "Export" → "As XML"\n and save the XML file.\n '),s.ɵɵelementContainerEnd())}function k(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the Padlock desktop application, click the hamburger icon in the top left corner and\n navigate to "Settings" → "Export" button and save the file "As CSV".\n '),s.ɵɵelementContainerEnd())}function A(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the KeePass 2 desktop application, navigate to "File" → "Export" and select the\n "KeePass XML (2.x)" option.\n '),s.ɵɵelementContainerEnd())}function T(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the Universal Password Manager desktop application, navigate to "Database" →\n "Export" and save the CSV file.\n '),s.ɵɵelementContainerEnd())}function M(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the SaferPass browser extension, click the hamburger icon in the top left corner and\n navigate to "Settings". Click the "Export accounts" button to save the CSV file.\n '),s.ɵɵelementContainerEnd())}function B(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the Meldium web vault, navigate to "Settings". Locate the "Export data" function and\n click "Show me my data" to save the CSV file.\n '),s.ɵɵelementContainerEnd())}function D(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Log into the Keeper web vault (keepersecurity.com/vault). Click on your "account email" (top\n right) and select "Settings". Go to "Export" and find the "Export to .csv File" option. Click\n "Export" to save the CSV file.\n '),s.ɵɵelementContainerEnd())}function R(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Log into the Keeper web vault (keepersecurity.com/vault). Click on your "account email" (top\n right) and select "Settings". Go to "Export" and find the "Export to .json File" option. Click\n "Export" to save the JSON file.\n '),s.ɵɵelementContainerEnd())}function F(e,t){1&e&&(s.ɵɵelementStart(0,"span"),s.ɵɵtext(1,"\n The process is exactly the same as importing from Google Chrome.\n "),s.ɵɵelementEnd())}function U(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,F,2,0,"span",10),s.ɵɵtext(3,"\n See detailed instructions on our help site at\n "),s.ɵɵelementStart(4,"a",24),s.ɵɵtext(5,"\n https://bitwarden.com/help/import-from-chrome/"),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementContainerEnd()),2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(2),s.ɵɵproperty("ngIf","chromecsv"!==e.format)}}function V(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n See detailed instructions on our help site at\n "),s.ɵɵelementStart(2,"a",25),s.ɵɵtext(3,"\n https://bitwarden.com/help/import-from-firefox/"),s.ɵɵelementEnd(),s.ɵɵtext(4,".\n "),s.ɵɵelementContainerEnd())}function N(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n See detailed instructions on our help site at\n "),s.ɵɵelementStart(2,"a",26),s.ɵɵtext(3,"\n https://bitwarden.com/help/import-from-safari/"),s.ɵɵelementEnd(),s.ɵɵtext(4,".\n "),s.ɵɵelementContainerEnd())}function _(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n See detailed instructions on our help site at\n "),s.ɵɵelementStart(2,"a",27),s.ɵɵtext(3,"\n https://bitwarden.com/help/import-from-1password/"),s.ɵɵelementEnd(),s.ɵɵtext(4,".\n "),s.ɵɵelementContainerEnd())}function j(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the Password Dragon desktop application, navigate to "File" → "Export" → "To\n XML". In the dialog that pops up select "All Rows" and check all fields. Click the "Export"\n button and save the XML file.\n '),s.ɵɵelementContainerEnd())}function z(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the Enpass desktop application, navigate to "File" → "Export" → "As CSV".\n Select "OK" to the warning alert and save the CSV file. Note that the importer only supports\n files exported while Enpass is set to the English language, so adjust your settings\n accordingly.\n '),s.ɵɵelementContainerEnd())}function H(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the Enpass 6 desktop application, click the menu button and navigate to "File" →\n "Export". Select the ".json" file format option and save the JSON file.\n '),s.ɵɵelementContainerEnd())}function L(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the Password Safe desktop application, navigate to "File" → "Export To" → "XML\n format..." and save the XML file.\n '),s.ɵɵelementContainerEnd())}function K(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Log in to Dashlane, click on "My Account" → "Settings" → "Export file" and select\n "Export as a CSV file". This will download a zip archive containing various CSV files. Unzip\n the archive and import each CSV file individually.\n '),s.ɵɵelementContainerEnd())}function q(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n Dashlane no longer supports the JSON format. Only use this if you have an existing JSON for\n import. Use the CSV importer when creating new exports.\n "),s.ɵɵelementContainerEnd())}function G(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the mSecure desktop application, navigate to "File" → "Export" → "CSV File..."\n and save the CSV file.\n '),s.ɵɵelementContainerEnd())}function W(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the Sticky Password desktop application, navigate to "Menu" (top right) → "Export"\n → "Export all". Select the unencrypted format XML option and save the XML file.\n '),s.ɵɵelementContainerEnd())}function $(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the True Key desktop application, click the gear icon (top right) and then navigate to\n "App Settings". Click the "Export" button, enter your password and save the CSV file.\n '),s.ɵɵelementContainerEnd())}function Y(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Log into the Clipperz web application (clipperz.is/app). Click the hamburger menu icon in the\n top right to expand the navigation bar. Navigate to "Data" → "Export". Click the\n "download HTML+JSON" button to save the HTML file.\n '),s.ɵɵelementContainerEnd())}function Q(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the RoboForm Editor desktop application, navigate to "RoboForm" (top left) →\n "Options" → "Account & Data" and click the "Export" button. Select all of your data,\n change the "Format" to "CSV file" and then click the "Export" button to save the CSV file.\n Note: RoboForm only allows you to export Logins. Other items will not be exported.\n '),s.ɵɵelementContainerEnd())}function J(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Log into the Passbolt web vault and navigate to the "Passwords" listing. Select all of the\n passwords you would like to export and click the "Export" button at the top of the listing.\n Choose the "csv (lastpass)" export format and click the "Export" button.\n '),s.ɵɵelementContainerEnd())}function Z(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the Ascendo DataVault desktop application, navigate to "Tools" → "Export". In the\n dialog that pops up, select the "All Items (DVX, CSV)" option. Click the "Ok" button to save\n the CSV file.\n '),s.ɵɵelementContainerEnd())}function X(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the Password Boss desktop application, navigate to "File" → "Export data" →\n "Password Boss JSON - not encrypted" and save the JSON file.\n '),s.ɵɵelementContainerEnd())}function ee(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Log into the Zoho web vault (vault.zoho.com). Navigate to "Tools" → "Export Secrets".\n Select "All Secrets" and click the "Zoho Vault Format CSV" button. Highlight and copy the data\n from the textarea. Open a text editor like Notepad and paste the data. Save the data from the\n text editor as\n '),s.ɵɵelementStart(2,"code"),s.ɵɵtext(3,"zoho_export.csv"),s.ɵɵelementEnd(),s.ɵɵtext(4,".\n "),s.ɵɵelementContainerEnd())}function te(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the SplashID Safe desktop application, click on the SplashID blue lock logo in the top\n right corner. Navigate to "Export" → "Export as CSV" and save the CSV file.\n '),s.ɵɵelementContainerEnd())}function ne(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the PassKeep mobile app, navigate to "Backup/Restore". Locate the "CSV Backup/Restore"\n section and click "Backup to CSV" to save the CSV file.\n '),s.ɵɵelementContainerEnd())}function ie(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n Make sure you have python-keyring and python-gnomekeyring installed. Save the\n "),s.ɵɵelementStart(2,"a",28),s.ɵɵtext(3,"GNOME Keyring Import/Export"),s.ɵɵelementEnd(),s.ɵɵtext(4,"\n python script to your desktop as "),s.ɵɵelementStart(5,"code"),s.ɵɵtext(6,"pw_helper.py"),s.ɵɵelementEnd(),s.ɵɵtext(7,". Open terminal and run\n "),s.ɵɵelementStart(8,"code"),s.ɵɵtext(9,"chmod +rx Desktop/pw_helper.py"),s.ɵɵelementEnd(),s.ɵɵtext(10," and then\n "),s.ɵɵelementStart(11,"code"),s.ɵɵtext(12,"python Desktop/pw_helper.py export Desktop/my_passwords.json"),s.ɵɵelementEnd(),s.ɵɵtext(13,". Then upload the\n resulting "),s.ɵɵelementStart(14,"code"),s.ɵɵtext(15,"my_passwords.json"),s.ɵɵelementEnd(),s.ɵɵtext(16," file here to Bitwarden.\n "),s.ɵɵelementContainerEnd())}function re(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the Password Agent desktop application navigate to "File" → "Export", select the\n "Fields to export" button and check all of the fields, change the "Output format" to "CSV",\n and then click the "Start" button to save the CSV file.\n '),s.ɵɵelementContainerEnd())}function oe(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Log into the Passpack website vault and navigate to "Settings" → "Export", then click the\n "Download" button to save the CSV file.\n '),s.ɵɵelementContainerEnd())}function ae(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Open your Passman vault and click on "Settings" in the bottom left corner. In the "Settings"\n window switch to the "Export credentials" tab and choose "JSON" as the export type. Enter your\n vault\'s passphrase and click the "Export" button to save the JSON file.\n '),s.ɵɵelementContainerEnd())}function se(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Open the Avast Passwords desktop application and navigate to "Settings" → "Import/export\n data". Select the "Export" button for the "Export to CSV file" option to save the CSV file.\n '),s.ɵɵelementContainerEnd())}function le(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Open the Avast Passwords desktop application and navigate to "Settings" → "Import/export\n data". Select the "Export" button for the "Export to JSON file" option to save the JSON file.\n '),s.ɵɵelementContainerEnd())}function ce(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Open the F-Secure KEY desktop application and navigate to "Settings" → "Export\n Passwords". Select the "Export" button, enter your master password, and save the FSK file.\n '),s.ɵɵelementContainerEnd())}function de(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Open the Kaspersky Password Manager desktop application and navigate to "Settings" →\n "Import/Export". Locate the "Export to text file" section and select the "Export" button to\n save the TXT file.\n '),s.ɵɵelementContainerEnd())}function pe(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Open the RememBear desktop application and navigate to "Settings" → "Account" →\n "Export". Enter your master password and select the "Export Anyway" button to save the CSV\n file.\n '),s.ɵɵelementContainerEnd())}function ue(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Open the PasswordWallet desktop application and navigate to "File" → "Export" →\n "Visible entries to text file". Enter your password and select the "Ok" button to save the TXT\n file.\n '),s.ɵɵelementContainerEnd())}function me(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Open the Myki desktop browser extension and navigate to "Advanced" → "Export Accounts"\n and then scan the QR code with your mobile device. Various CSV files will then be saved to\n your computer\'s downloads folder.\n '),s.ɵɵelementContainerEnd())}function he(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n Export your SecureSafe password safe to a CSV file with a comma delimiter.\n "),s.ɵɵelementContainerEnd())}function ve(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Open the LogMeOnce browser extension, then navigate to "Open Menu" → "Export To" and\n select "CSV File" to save the CSV file.\n '),s.ɵɵelementContainerEnd())}function fe(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Open the BlackBerry Password Keeper application, then navigate to "Settings" →\n "Import/Export". Select "Export Passwords" and follow the instructions on screen to save the\n unencrypted CSV file.\n '),s.ɵɵelementContainerEnd())}function ge(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Open the Buttercup desktop application and unlock your vault. Right click on your vault\'s icon\n and select "Export" to save the CSV file.\n '),s.ɵɵelementContainerEnd())}function ye(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Open the Codebook desktop application and log in. Navigate to "File" → "Export all", then\n click "Yes" on the dialog and save the CSV file.\n '),s.ɵɵelementContainerEnd())}function xe(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n Open the newest version of the Encryptr desktop application and allow all of your data to\n sync. Once syncing of your data is complete, the download icon in the top right corner will\n turn pink. Click the download icon and save the CSV file.\n "),s.ɵɵelementContainerEnd())}function Se(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n From the Yoti browser extension, click on "Settings", then "Export Saved Logins" and save the\n CSV file.\n '),s.ɵɵelementContainerEnd())}function be(e,t){if(1&e&&(s.ɵɵelementStart(0,"app-callout",21),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,w,5,0,"ng-container",10),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,C,5,0,"ng-container",10),s.ɵɵtext(5,"\n "),s.ɵɵtemplate(6,I,2,0,"ng-container",10),s.ɵɵtext(7,"\n "),s.ɵɵtemplate(8,E,2,0,"ng-container",10),s.ɵɵtext(9,"\n "),s.ɵɵtemplate(10,P,2,0,"ng-container",10),s.ɵɵtext(11,"\n "),s.ɵɵtemplate(12,O,2,0,"ng-container",10),s.ɵɵtext(13,"\n "),s.ɵɵtemplate(14,k,2,0,"ng-container",10),s.ɵɵtext(15,"\n "),s.ɵɵtemplate(16,A,2,0,"ng-container",10),s.ɵɵtext(17,"\n "),s.ɵɵtemplate(18,T,2,0,"ng-container",10),s.ɵɵtext(19,"\n "),s.ɵɵtemplate(20,M,2,0,"ng-container",10),s.ɵɵtext(21,"\n "),s.ɵɵtemplate(22,B,2,0,"ng-container",10),s.ɵɵtext(23,"\n "),s.ɵɵtemplate(24,D,2,0,"ng-container",10),s.ɵɵtext(25,"\n "),s.ɵɵtemplate(26,R,2,0,"ng-container",10),s.ɵɵtext(27,"\n "),s.ɵɵtemplate(28,U,7,1,"ng-container",10),s.ɵɵtext(29,"\n "),s.ɵɵtemplate(30,V,5,0,"ng-container",10),s.ɵɵtext(31,"\n "),s.ɵɵtemplate(32,N,5,0,"ng-container",10),s.ɵɵtext(33,"\n "),s.ɵɵtemplate(34,_,5,0,"ng-container",10),s.ɵɵtext(35,"\n "),s.ɵɵtemplate(36,j,2,0,"ng-container",10),s.ɵɵtext(37,"\n "),s.ɵɵtemplate(38,z,2,0,"ng-container",10),s.ɵɵtext(39,"\n "),s.ɵɵtemplate(40,H,2,0,"ng-container",10),s.ɵɵtext(41,"\n "),s.ɵɵtemplate(42,L,2,0,"ng-container",10),s.ɵɵtext(43,"\n "),s.ɵɵtemplate(44,K,2,0,"ng-container",10),s.ɵɵtext(45,"\n "),s.ɵɵtemplate(46,q,2,0,"ng-container",10),s.ɵɵtext(47,"\n "),s.ɵɵtemplate(48,G,2,0,"ng-container",10),s.ɵɵtext(49,"\n "),s.ɵɵtemplate(50,W,2,0,"ng-container",10),s.ɵɵtext(51,"\n "),s.ɵɵtemplate(52,$,2,0,"ng-container",10),s.ɵɵtext(53,"\n "),s.ɵɵtemplate(54,Y,2,0,"ng-container",10),s.ɵɵtext(55,"\n "),s.ɵɵtemplate(56,Q,2,0,"ng-container",10),s.ɵɵtext(57,"\n "),s.ɵɵtemplate(58,J,2,0,"ng-container",10),s.ɵɵtext(59,"\n "),s.ɵɵtemplate(60,Z,2,0,"ng-container",10),s.ɵɵtext(61,"\n "),s.ɵɵtemplate(62,X,2,0,"ng-container",10),s.ɵɵtext(63,"\n "),s.ɵɵtemplate(64,ee,5,0,"ng-container",10),s.ɵɵtext(65,"\n "),s.ɵɵtemplate(66,te,2,0,"ng-container",10),s.ɵɵtext(67,"\n "),s.ɵɵtemplate(68,ne,2,0,"ng-container",10),s.ɵɵtext(69,"\n "),s.ɵɵtemplate(70,ie,17,0,"ng-container",10),s.ɵɵtext(71,"\n "),s.ɵɵtemplate(72,re,2,0,"ng-container",10),s.ɵɵtext(73,"\n "),s.ɵɵtemplate(74,oe,2,0,"ng-container",10),s.ɵɵtext(75,"\n "),s.ɵɵtemplate(76,ae,2,0,"ng-container",10),s.ɵɵtext(77,"\n "),s.ɵɵtemplate(78,se,2,0,"ng-container",10),s.ɵɵtext(79,"\n "),s.ɵɵtemplate(80,le,2,0,"ng-container",10),s.ɵɵtext(81,"\n "),s.ɵɵtemplate(82,ce,2,0,"ng-container",10),s.ɵɵtext(83,"\n "),s.ɵɵtemplate(84,de,2,0,"ng-container",10),s.ɵɵtext(85,"\n "),s.ɵɵtemplate(86,pe,2,0,"ng-container",10),s.ɵɵtext(87,"\n "),s.ɵɵtemplate(88,ue,2,0,"ng-container",10),s.ɵɵtext(89,"\n "),s.ɵɵtemplate(90,me,2,0,"ng-container",10),s.ɵɵtext(91,"\n "),s.ɵɵtemplate(92,he,2,0,"ng-container",10),s.ɵɵtext(93,"\n "),s.ɵɵtemplate(94,ve,2,0,"ng-container",10),s.ɵɵtext(95,"\n "),s.ɵɵtemplate(96,fe,2,0,"ng-container",10),s.ɵɵtext(97,"\n "),s.ɵɵtemplate(98,ge,2,0,"ng-container",10),s.ɵɵtext(99,"\n "),s.ɵɵtemplate(100,ye,2,0,"ng-container",10),s.ɵɵtext(101,"\n "),s.ɵɵtemplate(102,xe,2,0,"ng-container",10),s.ɵɵtext(103,"\n "),s.ɵɵtemplate(104,Se,2,0,"ng-container",10),s.ɵɵtext(105,"\n "),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext();s.ɵɵpropertyInterpolate("title",e.getFormatInstructionTitle()),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","bitwardencsv"===e.format||"bitwardenjson"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","lastpasscsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","keepassxcsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","aviracsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","blurcsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","safeincloudxml"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","padlockcsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","keepass2xml"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","upmcsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","saferpasscsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","meldiumcsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","keepercsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","keeperjson"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","chromecsv"===e.format||"operacsv"===e.format||"vivaldicsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","firefoxcsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","safaricsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","1password1pux"===e.format||"1password1pif"===e.format||"1passwordwincsv"===e.format||"1passwordmaccsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","passworddragonxml"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","enpasscsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","enpassjson"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","pwsafexml"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","dashlanecsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","dashlanejson"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","msecurecsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","stickypasswordxml"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","truekeycsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","clipperzhtml"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","roboformcsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","passboltcsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","ascendocsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","passwordbossjson"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","zohovaultcsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","splashidcsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","passkeepcsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","gnomejson"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","passwordagentcsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","passpackcsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","passmanjson"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","avastcsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","avastjson"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","fsecurefsk"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","kasperskytxt"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","remembearcsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","passwordwallettxt"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","mykicsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","securesafecsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","logmeoncecsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","blackberrycsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","buttercupcsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","codebookcsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","encryptrcsv"===e.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","yoticsv"===e.format)}}const we=function(e){return{manual:e}};class Ce{constructor(e,t,n,i,r,o){this.i18nService=e,this.importService=t,this.router=n,this.platformUtilsService=i,this.policyService=r,this.logService=o,this.format=null,this.loading=!1,this.importBlockedByPolicy=!1,this.organizationId=null,this.successNavigate=["vault"]}ngOnInit(){return i(this,void 0,void 0,(function*(){this.setImportOptions(),this.importBlockedByPolicy=yield this.policyService.policyAppliesToUser(a.PolicyType.PersonalOwnership)}))}submit(){return i(this,void 0,void 0,(function*(){if(this.importBlockedByPolicy)return void this.platformUtilsService.showToast("error",null,this.i18nService.t("personalOwnershipPolicyInEffectImports"));this.loading=!0;const e=this.importService.getImporter(this.format,this.organizationId);if(null===e)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectFormat")),void(this.loading=!1);const t=document.getElementById("file").files;if(!(null!=t&&0!==t.length||null!=this.fileContents&&""!==this.fileContents))return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectFile")),void(this.loading=!1);let n=this.fileContents;if(null!=t&&t.length>0)try{const e=yield this.getFileContents(t[0]);null!=e&&(n=e)}catch(i){this.logService.error(i)}if(null==n||""===n)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectFile")),void(this.loading=!1);try{this.formPromise=this.importService.import(e,n,this.organizationId);const t=yield this.formPromise;if(null!=t)return this.error(t),void(this.loading=!1);this.platformUtilsService.showToast("success",null,this.i18nService.t("importSuccess")),this.router.navigate(this.successNavigate)}catch(i){this.logService.error(i)}this.loading=!1}))}getFormatInstructionTitle(){if(null==this.format)return null;const e=this.featuredImportOptions.concat(this.importOptions).filter((e=>e.id===this.format));return e.length>0?this.i18nService.t("instructionsFor",e[0].name):null}setImportOptions(){this.featuredImportOptions=[{id:null,name:"-- "+this.i18nService.t("select")+" --"},...this.importService.featuredImportOptions],this.importOptions=[...this.importService.regularImportOptions].sort(((e,t)=>null==e.name&&null!=t.name?-1:null!=e.name&&null==t.name?1:null==e.name&&null==t.name?0:this.i18nService.collator?this.i18nService.collator.compare(e.name,t.name):e.name.localeCompare(t.name)))}error(e){return i(this,void 0,void 0,(function*(){yield o.default.fire({heightAuto:!1,buttonsStyling:!1,icon:"error",iconHtml:'',input:"textarea",inputValue:e.message,inputAttributes:{readonly:"true"},titleText:this.i18nService.t("importError"),text:this.i18nService.t("importErrorDesc"),showConfirmButton:!0,confirmButtonText:this.i18nService.t("ok"),onOpen:e=>{e.querySelector(".swal2-textarea").scrollTo(0,0)}})}))}getFileContents(e){return"1password1pux"===this.format?this.extract1PuxContent(e):new Promise(((t,n)=>{const i=new FileReader;i.readAsText(e,"utf-8"),i.onload=i=>{if("lastpasscsv"===this.format&&"text/html"===e.type){const e=(new DOMParser).parseFromString(i.target.result,"text/html").querySelector("pre");return null!=e?void t(e.textContent):void n()}t(i.target.result)},i.onerror=()=>{n()}}))}extract1PuxContent(e){return(new r).loadAsync(e).then((e=>e.file("export.data").async("string"))).then((function(e){return e}),(function(e){return""}))}}t.ImportComponent=Ce,Ce.ɵfac=function(e){return new(e||Ce)(s.ɵɵdirectiveInject(l.I18nService),s.ɵɵdirectiveInject(c.ImportService),s.ɵɵdirectiveInject(d.Router),s.ɵɵdirectiveInject(p.PlatformUtilsService),s.ɵɵdirectiveInject(u.PolicyService),s.ɵɵdirectiveInject(m.LogService))},Ce.ɵcmp=s.ɵɵdefineComponent({type:Ce,selectors:[["app-import"]],decls:69,vars:31,consts:[[1,"page-header"],["type","info",4,"ngIf"],["ngNativeValidate","",3,"ngSubmit"],["form",""],[1,"row"],[1,"col-6"],[1,"form-group"],["for","type"],["id","type","name","Format","required","",1,"form-control",3,"ngModel","disabled","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[4,"ngIf"],["type","info",3,"title",4,"ngIf"],["for","file"],["type","file","id","file","name","file",1,"form-control-file",3,"disabled"],["for","fileContents"],["id","fileContents","name","FileContents",1,"form-control",3,"ngModel","disabled","ngModelChange"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled","ngClass"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","info"],[3,"ngValue"],["value","-","disabled",""],["type","info",3,"title"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/export-your-data/"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/import-from-lastpass/"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/import-from-chrome/"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/import-from-firefox/"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/import-from-safari/"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/import-from-1password/"],["target","_blank","rel","noopener","href","https://bit.ly/2GpOMTg"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"h1"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n"),s.ɵɵtemplate(7,y,3,3,"app-callout",1),s.ɵɵtext(8,"\n"),s.ɵɵelementStart(9,"form",2,3),s.ɵɵlistener("ngSubmit",(function(){return t.submit()})),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"div",4),s.ɵɵtext(13,"\n "),s.ɵɵelementStart(14,"div",5),s.ɵɵtext(15,"\n "),s.ɵɵelementStart(16,"div",6),s.ɵɵtext(17,"\n "),s.ɵɵelementStart(18,"label",7),s.ɵɵtext(19),s.ɵɵpipe(20,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementStart(22,"select",8),s.ɵɵlistener("ngModelChange",(function(e){return t.format=e})),s.ɵɵtext(23,"\n "),s.ɵɵtemplate(24,x,2,2,"option",9),s.ɵɵtext(25,"\n "),s.ɵɵtemplate(26,b,6,1,"ng-container",10),s.ɵɵtext(27,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(28,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(29,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(30,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(31,"\n "),s.ɵɵtemplate(32,be,106,53,"app-callout",11),s.ɵɵtext(33,"\n "),s.ɵɵelementStart(34,"div",4),s.ɵɵtext(35,"\n "),s.ɵɵelementStart(36,"div",5),s.ɵɵtext(37,"\n "),s.ɵɵelementStart(38,"div",6),s.ɵɵtext(39,"\n "),s.ɵɵelementStart(40,"label",12),s.ɵɵtext(41),s.ɵɵpipe(42,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(43,"\n "),s.ɵɵelement(44,"input",13),s.ɵɵtext(45,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(46,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(47,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(48,"\n "),s.ɵɵelementStart(49,"div",6),s.ɵɵtext(50,"\n "),s.ɵɵelementStart(51,"label",14),s.ɵɵtext(52),s.ɵɵpipe(53,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(54,"\n "),s.ɵɵelementStart(55,"textarea",15),s.ɵɵlistener("ngModelChange",(function(e){return t.fileContents=e})),s.ɵɵelementEnd(),s.ɵɵtext(56,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(57,"\n "),s.ɵɵelementStart(58,"button",16),s.ɵɵtext(59,"\n "),s.ɵɵelement(60,"i",17),s.ɵɵpipe(61,"i18n"),s.ɵɵtext(62,"\n "),s.ɵɵelementStart(63,"span"),s.ɵɵtext(64),s.ɵɵpipe(65,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(66,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(67,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(68,"\n")),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,17,"importData")),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",t.importBlockedByPolicy),s.ɵɵadvance(12),s.ɵɵtextInterpolate1("1. ",s.ɵɵpipeBind1(20,19,"selectFormat"),""),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",t.format)("disabled",t.importBlockedByPolicy),s.ɵɵadvance(2),s.ɵɵproperty("ngForOf",t.featuredImportOptions),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.importOptions&&t.importOptions.length),s.ɵɵadvance(6),s.ɵɵproperty("ngIf",t.format),s.ɵɵadvance(9),s.ɵɵtextInterpolate1("2. ",s.ɵɵpipeBind1(42,21,"selectImportFile"),""),s.ɵɵadvance(3),s.ɵɵproperty("disabled",t.importBlockedByPolicy),s.ɵɵadvance(8),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(53,23,"orCopyPasteFileContents")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",t.fileContents)("disabled",t.importBlockedByPolicy),s.ɵɵadvance(3),s.ɵɵproperty("disabled",t.loading||t.importBlockedByPolicy)("ngClass",s.ɵɵpureFunction1(29,we,t.importBlockedByPolicy)),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(61,25,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(65,27,"importData")))},directives:[h.NgIf,v.NgControlStatusGroup,v.NgForm,v.SelectControlValueAccessor,v.RequiredValidator,v.NgControlStatus,v.NgModel,h.NgForOf,v.DefaultValueAccessor,h.NgClass,f.CalloutComponent,v.NgSelectOption,v.ɵNgSelectMultipleOption],pipes:[g.I18nPipe],encapsulation:2})},4184:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordGeneratorHistoryComponent=void 0;const i=n(61738),r=(n(51554),n(84275),n(73828),n(32621)),o=n(84275),a=n(73828),s=n(51554),l=n(8863),c=n(57490),d=n(31161),p=n(99729),u=n(86758);function m(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"li",16),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",17),r.ɵɵtext(3,"\n "),r.ɵɵelement(4,"div",18),r.ɵɵpipe(5,"colorPassword"),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"small",19),r.ɵɵtext(8),r.ɵɵpipe(9,"date"),r.ɵɵelementEnd(),r.ɵɵtext(10,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n "),r.ɵɵelementStart(12,"div",10),r.ɵɵtext(13,"\n "),r.ɵɵelementStart(14,"button",20),r.ɵɵlistener("click",(function(){const t=r.ɵɵrestoreView(e).$implicit;return r.ɵɵnextContext(2).copy(t.password)})),r.ɵɵpipe(15,"i18n"),r.ɵɵtext(16,"\n "),r.ɵɵelement(17,"i",21),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(20,"\n "),r.ɵɵelementEnd()}if(2&e){const e=t.$implicit;r.ɵɵadvance(4),r.ɵɵproperty("innerHTML",r.ɵɵpipeBind1(5,3,e.password),r.ɵɵsanitizeHtml),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind2(9,5,e.date,"medium")),r.ɵɵadvance(6),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(15,8,"copyPassword"))}}function h(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",13),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"ul",14),r.ɵɵtext(3,"\n "),r.ɵɵtemplate(4,m,21,10,"li",15),r.ɵɵtext(5,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(6,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(4),r.ɵɵproperty("ngForOf",e.history)}}function v(e,t){1&e&&(r.ɵɵelementStart(0,"div",13),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"noPasswordsInList"),"\n "))}class f extends i.PasswordGeneratorHistoryComponent{constructor(e,t,n){super(e,t,n,window)}}t.PasswordGeneratorHistoryComponent=f,f.ɵfac=function(e){return new(e||f)(r.ɵɵdirectiveInject(o.PasswordGenerationService),r.ɵɵdirectiveInject(a.PlatformUtilsService),r.ɵɵdirectiveInject(s.I18nService))},f.ɵcmp=r.ɵɵdefineComponent({type:f,selectors:[["app-password-generator-history"]],features:[r.ɵɵInheritDefinitionFeature],decls:43,vars:14,consts:[["role","dialog","aria-modal","true","aria-labelledby","passHistoryTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],[1,"modal-content"],[1,"modal-header"],["id","passHistoryTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"ml-auto"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-trash","bwi-lg","bwi-fw"],[1,"modal-body"],[1,"list-group","list-group-flush"],["class","list-group-item d-flex",4,"ngFor","ngForOf"],[1,"list-group-item","d-flex"],[1,"password-row"],["appSelectCopy","",1,"text-monospace","generated-wrapper",3,"innerHTML"],[1,"text-muted"],[1,"btn","btn-link",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-clone"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",2),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"div",3),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"h2",4),r.ɵɵtext(9),r.ɵɵpipe(10,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n "),r.ɵɵelementStart(12,"button",5),r.ɵɵpipe(13,"i18n"),r.ɵɵtext(14,"\n "),r.ɵɵelementStart(15,"span",6),r.ɵɵtext(16,"×"),r.ɵɵelementEnd(),r.ɵɵtext(17,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵtemplate(20,h,7,1,"div",7),r.ɵɵtext(21,"\n "),r.ɵɵtemplate(22,v,3,3,"div",7),r.ɵɵtext(23,"\n "),r.ɵɵelementStart(24,"div",8),r.ɵɵtext(25,"\n "),r.ɵɵelementStart(26,"button",9),r.ɵɵtext(27),r.ɵɵpipe(28,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(29,"\n "),r.ɵɵelementStart(30,"div",10),r.ɵɵtext(31,"\n "),r.ɵɵelementStart(32,"button",11),r.ɵɵlistener("click",(function(){return t.clear()})),r.ɵɵpipe(33,"i18n"),r.ɵɵtext(34,"\n "),r.ɵɵelement(35,"i",12),r.ɵɵtext(36,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(37,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(38,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(39,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(40,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(41,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(42,"\n")),2&e&&(r.ɵɵadvance(9),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(10,6,"passwordHistory")),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(13,8,"close")),r.ɵɵadvance(8),r.ɵɵproperty("ngIf",t.history.length),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",!t.history.length),r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(28,10,"close"),"\n "),r.ɵɵadvance(5),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(33,12,"clear")))},directives:[l.A11yTitleDirective,c.NgIf,c.NgForOf,d.SelectCopyDirective],pipes:[p.I18nPipe,u.ColorPasswordPipe,c.DatePipe],encapsulation:2})},44118:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ToolsComponent=void 0;n(45552),n(73569);const r=n(32621),o=n(73569),a=n(45552),s=n(68012),l=n(99729);class c{constructor(e,t){this.stateService=e,this.messagingService=t,this.canAccessPremium=!1}ngOnInit(){return i(this,void 0,void 0,(function*(){this.canAccessPremium=yield this.stateService.getCanAccessPremium()}))}premiumRequired(){this.canAccessPremium||this.messagingService.send("premiumRequired")}}t.ToolsComponent=c,c.ɵfac=function(e){return new(e||c)(r.ɵɵdirectiveInject(o.StateService),r.ɵɵdirectiveInject(a.MessagingService))},c.ɵcmp=r.ɵɵdefineComponent({type:c,selectors:[["app-tools"]],decls:36,vars:12,consts:[[1,"container","page-content"],[1,"row"],[1,"col-3"],[1,"card","mb-4"],[1,"card-header"],[1,"list-group","list-group-flush"],["routerLink","generator","routerLinkActive","active",1,"list-group-item"],["routerLink","import","routerLinkActive","active",1,"list-group-item"],["routerLink","export","routerLinkActive","active",1,"list-group-item"],[1,"col-9"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",2),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"div",3),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"div",4),r.ɵɵtext(9),r.ɵɵpipe(10,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n "),r.ɵɵelementStart(12,"div",5),r.ɵɵtext(13,"\n "),r.ɵɵelementStart(14,"a",6),r.ɵɵtext(15),r.ɵɵpipe(16,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(17,"\n "),r.ɵɵelementStart(18,"a",7),r.ɵɵtext(19),r.ɵɵpipe(20,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(21,"\n "),r.ɵɵelementStart(22,"a",8),r.ɵɵtext(23),r.ɵɵpipe(24,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(25,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(26,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(27,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(28,"\n "),r.ɵɵelementStart(29,"div",9),r.ɵɵtext(30,"\n "),r.ɵɵelement(31,"router-outlet"),r.ɵɵtext(32,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(33,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(34,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(35,"\n")),2&e&&(r.ɵɵadvance(9),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(10,4,"tools")),r.ɵɵadvance(6),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(16,6,"generator"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(20,8,"importData"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(24,10,"exportVault"),"\n "))},directives:[s.RouterLinkWithHref,s.RouterLinkActive,s.RouterOutlet],pipes:[l.I18nPipe],encapsulation:2})},95746:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AddEditCustomFieldsComponent=void 0;const i=n(4758),r=(n(32034),n(51554),n(32621)),o=n(51554),a=n(32034),s=n(57490),l=n(83072),c=n(8863),d=n(96832),p=n(48198),u=n(13803),m=n(1142),h=n(99729);function v(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"div",20),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"input",12),r.ɵɵlistener("ngModelChange",(function(t){r.ɵɵrestoreView(e);return r.ɵɵnextContext().$implicit.value=t})),r.ɵɵelementEnd(),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",21),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"button",22),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);const t=r.ɵɵnextContext().$implicit;return r.ɵɵnextContext(2).copy(t.value,"value","Field")})),r.ɵɵpipe(7,"i18n"),r.ɵɵtext(8,"\n "),r.ɵɵelement(9,"i",23),r.ɵɵtext(10,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext(),t=e.index,n=e.$implicit,i=r.ɵɵnextContext(2);r.ɵɵadvance(2),r.ɵɵpropertyInterpolate1("id","fieldValue",t,""),r.ɵɵpropertyInterpolate1("name","Field.Value",t,""),r.ɵɵproperty("ngModel",n.value)("disabled",i.cipher.isDeleted||i.viewOnly),r.ɵɵadvance(4),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(7,5,"copyValue"))}}const f=function(e,t){return{"bwi-eye":e,"bwi-eye-slash":t}};function g(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"div",20),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"input",24),r.ɵɵlistener("ngModelChange",(function(t){r.ɵɵrestoreView(e);return r.ɵɵnextContext().$implicit.value=t})),r.ɵɵelementEnd(),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",21),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"button",25),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);const t=r.ɵɵnextContext().$implicit;return r.ɵɵnextContext(2).toggleFieldValue(t)})),r.ɵɵpipe(7,"i18n"),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"i",26),r.ɵɵtext(10,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelementStart(13,"button",25),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);const t=r.ɵɵnextContext().$implicit,n=r.ɵɵnextContext(2);return n.copy(t.value,"value",t.type===n.fieldType.Hidden?"H_Field":"Field")})),r.ɵɵpipe(14,"i18n"),r.ɵɵtext(15,"\n "),r.ɵɵelement(16,"i",23),r.ɵɵtext(17,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext(),t=e.index,n=e.$implicit,i=r.ɵɵnextContext(2);r.ɵɵadvance(2),r.ɵɵpropertyInterpolate1("id","fieldValue",t,""),r.ɵɵpropertyInterpolate("type",n.showValue?"text":"password"),r.ɵɵpropertyInterpolate1("name","Field.Value",t,""),r.ɵɵproperty("ngModel",n.value)("disabled",i.cipher.isDeleted||i.viewOnly||!i.cipher.viewPassword&&!n.newField),r.ɵɵadvance(4),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(7,10,"toggleVisibility")),r.ɵɵproperty("disabled",!i.cipher.viewPassword&&!n.newField),r.ɵɵadvance(3),r.ɵɵproperty("ngClass",r.ɵɵpureFunction2(14,f,!n.showValue,n.showValue)),r.ɵɵadvance(4),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(14,12,"copyValue")),r.ɵɵproperty("disabled",!i.cipher.viewPassword&&!n.newField)}}function y(e,t){if(1&e&&(r.ɵɵelementStart(0,"option",30),r.ɵɵtext(1),r.ɵɵelementEnd()),2&e){const e=t.$implicit;r.ɵɵproperty("ngValue",e.value),r.ɵɵadvance(1),r.ɵɵtextInterpolate(e.name)}}function x(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"select",28),r.ɵɵlistener("ngModelChange",(function(t){r.ɵɵrestoreView(e);return r.ɵɵnextContext(2).$implicit.linkedId=t})),r.ɵɵtext(1,"\n "),r.ɵɵtemplate(2,y,2,2,"option",29),r.ɵɵtext(3,"\n "),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext(2),t=e.index,n=e.$implicit,i=r.ɵɵnextContext(2);r.ɵɵpropertyInterpolate1("id","fieldValue",t,""),r.ɵɵpropertyInterpolate1("name","Field.Value",t,""),r.ɵɵproperty("ngModel",n.linkedId)("disabled",i.cipher.isDeleted||i.viewOnly),r.ɵɵadvance(2),r.ɵɵproperty("ngForOf",i.linkedFieldOptions)}}function S(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",20),r.ɵɵtext(1,"\n "),r.ɵɵtemplate(2,x,4,5,"select",27),r.ɵɵtext(3,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext().$implicit,t=r.ɵɵnextContext(2);r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.type===t.fieldType.Linked&&null!=t.cipher.linkedFieldOptions)}}function b(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"input",31),r.ɵɵlistener("ngModelChange",(function(t){r.ɵɵrestoreView(e);return r.ɵɵnextContext().$implicit.value=t})),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext(),t=e.index,n=e.$implicit,i=r.ɵɵnextContext(2);r.ɵɵpropertyInterpolate1("id","fieldValue",t,""),r.ɵɵpropertyInterpolate1("name","Field.Value",t,""),r.ɵɵproperty("ngModel",n.value)("disabled",i.cipher.isDeleted||i.viewOnly)}}function w(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"button",32),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);const t=r.ɵɵnextContext().$implicit;return r.ɵɵnextContext(2).removeField(t)})),r.ɵɵpipe(1,"i18n"),r.ɵɵtext(2,"\n "),r.ɵɵelement(3,"i",33),r.ɵɵtext(4,"\n "),r.ɵɵelementEnd()}2&e&&r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(1,1,"remove"))}function C(e,t){1&e&&(r.ɵɵelementStart(0,"button",34),r.ɵɵpipe(1,"i18n"),r.ɵɵtext(2,"\n "),r.ɵɵelement(3,"i",35),r.ɵɵtext(4,"\n "),r.ɵɵelementEnd()),2&e&&r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(1,1,"dragToSort"))}function I(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"div",6),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",7),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",8),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"label",9),r.ɵɵtext(7),r.ɵɵpipe(8,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementStart(10,"a",10),r.ɵɵpipe(11,"i18n"),r.ɵɵtext(12,"\n "),r.ɵɵelement(13,"i",11),r.ɵɵtext(14,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(15,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(16,"\n "),r.ɵɵelementStart(17,"input",12),r.ɵɵlistener("ngModelChange",(function(t){return r.ɵɵrestoreView(e).$implicit.name=t})),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵelementStart(20,"div",13),r.ɵɵtext(21,"\n "),r.ɵɵelementStart(22,"label",9),r.ɵɵtext(23),r.ɵɵpipe(24,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(25,"\n "),r.ɵɵelementStart(26,"div",14),r.ɵɵtext(27,"\n "),r.ɵɵtext(28,"\n "),r.ɵɵtemplate(29,v,13,7,"div",15),r.ɵɵtext(30,"\n "),r.ɵɵtext(31,"\n "),r.ɵɵtemplate(32,g,20,17,"div",15),r.ɵɵtext(33,"\n "),r.ɵɵtext(34,"\n "),r.ɵɵtemplate(35,S,4,1,"div",15),r.ɵɵtext(36,"\n "),r.ɵɵelementStart(37,"div",16),r.ɵɵtext(38,"\n "),r.ɵɵtext(39,"\n "),r.ɵɵtemplate(40,b,1,4,"input",17),r.ɵɵtext(41,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(42,"\n "),r.ɵɵtemplate(43,w,5,3,"button",18),r.ɵɵtext(44,"\n "),r.ɵɵtemplate(45,C,5,3,"button",19),r.ɵɵtext(46,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(47,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(48,"\n "),r.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=t.index,i=r.ɵɵnextContext(2);r.ɵɵadvance(6),r.ɵɵpropertyInterpolate1("for","fieldName",n,""),r.ɵɵadvance(1),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(8,15,"name")),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(11,17,"learnMore")),r.ɵɵadvance(7),r.ɵɵpropertyInterpolate1("id","fieldName",n,""),r.ɵɵpropertyInterpolate1("name","Field.Name",n,""),r.ɵɵproperty("ngModel",e.name)("disabled",i.cipher.isDeleted||i.viewOnly),r.ɵɵadvance(5),r.ɵɵpropertyInterpolate1("for","fieldValue",n,""),r.ɵɵadvance(1),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(24,19,"value")),r.ɵɵadvance(6),r.ɵɵproperty("ngIf",e.type===i.fieldType.Text),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",e.type===i.fieldType.Hidden),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",e.type===i.fieldType.Linked),r.ɵɵadvance(5),r.ɵɵproperty("ngIf",e.type===i.fieldType.Boolean),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",!i.cipher.isDeleted&&!i.viewOnly),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",!i.cipher.isDeleted&&!i.viewOnly)}}function E(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"div",4),r.ɵɵlistener("cdkDropListDropped",(function(t){r.ɵɵrestoreView(e);return r.ɵɵnextContext().drop(t)})),r.ɵɵtext(1,"\n "),r.ɵɵtemplate(2,I,49,21,"div",5),r.ɵɵtext(3,"\n "),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(2),r.ɵɵproperty("ngForOf",e.cipher.fields)("ngForTrackBy",e.trackByFunction)}}function P(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"a",36),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext().addField()})),r.ɵɵtext(1,"\n "),r.ɵɵelement(2,"i",37),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵelementEnd()}2&e&&(r.ɵɵadvance(3),r.ɵɵtextInterpolate1(" ",r.ɵɵpipeBind1(4,1,"newCustomField"),"\n "))}function O(e,t){if(1&e&&(r.ɵɵelementStart(0,"option",30),r.ɵɵtext(1),r.ɵɵelementEnd()),2&e){const e=t.$implicit;r.ɵɵproperty("ngValue",e.value),r.ɵɵadvance(1),r.ɵɵtextInterpolate(e.name)}}function k(e,t){if(1&e&&(r.ɵɵelementStart(0,"option",30),r.ɵɵtext(1),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵproperty("ngValue",e.addFieldLinkedTypeOption.value),r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",e.addFieldLinkedTypeOption.name,"\n ")}}function A(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"div",38),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",39),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"label",40),r.ɵɵtext(5),r.ɵɵpipe(6,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"select",41),r.ɵɵlistener("ngModelChange",(function(t){r.ɵɵrestoreView(e);return r.ɵɵnextContext().addFieldType=t})),r.ɵɵtext(9,"\n "),r.ɵɵtemplate(10,O,2,2,"option",29),r.ɵɵtext(11,"\n "),r.ɵɵtemplate(12,k,2,2,"option",42),r.ɵɵtext(13,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(14,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(15,"\n "),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(5),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(6,4,"type")),r.ɵɵadvance(3),r.ɵɵproperty("ngModel",e.addFieldType),r.ɵɵadvance(2),r.ɵɵproperty("ngForOf",e.addFieldTypeOptions),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",null!=e.cipher.linkedFieldOptions)}}class T extends i.AddEditCustomFieldsComponent{constructor(e,t){super(e,t)}}t.AddEditCustomFieldsComponent=T,T.ɵfac=function(e){return new(e||T)(r.ɵɵdirectiveInject(o.I18nService),r.ɵɵdirectiveInject(a.EventService))},T.ɵcmp=r.ɵɵdefineComponent({type:T,selectors:[["app-vault-add-edit-custom-fields"]],inputs:{viewOnly:"viewOnly",copy:"copy"},features:[r.ɵɵInheritDefinitionFeature],decls:14,vars:6,consts:[[1,"mt-4"],["cdkDropList","",3,"cdkDropListDropped",4,"ngIf"],["href","#","appStopClick","","class","d-inline-block mb-2",3,"click",4,"ngIf"],["class","row",4,"ngIf"],["cdkDropList","",3,"cdkDropListDropped"],["class","row","cdkDrag","",4,"ngFor","ngForOf","ngForTrackBy"],["cdkDrag","",1,"row"],[1,"col-5","form-group"],[1,"d-flex"],[3,"for"],["href","https://bitwarden.com/help/custom-fields/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],["type","text","appInputVerbatim","",1,"form-control",3,"id","name","ngModel","disabled","ngModelChange"],[1,"col-7","form-group"],[1,"d-flex","align-items-center"],["class","input-group",4,"ngIf"],[1,"flex-fill"],["type","checkbox","appTrueFalseValue","","trueValue","true","falseValue","false",3,"id","name","ngModel","disabled","ngModelChange",4,"ngIf"],["type","button","class","btn btn-link text-danger ml-2",3,"appA11yTitle","click",4,"ngIf"],["type","button","class","btn btn-link text-muted cursor-move",3,"appA11yTitle",4,"ngIf"],[1,"input-group"],[1,"input-group-append"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-clone"],["appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"id","type","name","ngModel","disabled","ngModelChange"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","disabled","click"],["aria-hidden","true",1,"bwi","bwi-lg",3,"ngClass"],["class","form-control",3,"id","name","ngModel","disabled","ngModelChange",4,"ngIf"],[1,"form-control",3,"id","name","ngModel","disabled","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[3,"ngValue"],["type","checkbox","appTrueFalseValue","","trueValue","true","falseValue","false",3,"id","name","ngModel","disabled","ngModelChange"],["type","button",1,"btn","btn-link","text-danger","ml-2",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-minus-circle","bwi-lg"],["type","button",1,"btn","btn-link","text-muted","cursor-move",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-hamburger","bwi-lg"],["href","#","appStopClick","",1,"d-inline-block","mb-2",3,"click"],["aria-hidden","true",1,"bwi","bwi-plus-circle","bwi-fw"],[1,"row"],[1,"col-5"],["for","addFieldType",1,"sr-only"],["id","addFieldType","name","AddFieldType",1,"form-control",3,"ngModel","ngModelChange"],[3,"ngValue",4,"ngIf"]],template:function(e,t){1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"h3",0),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵtemplate(6,E,4,2,"div",1),r.ɵɵtext(7,"\n "),r.ɵɵtext(8,"\n "),r.ɵɵtemplate(9,P,5,3,"a",2),r.ɵɵtext(10,"\n "),r.ɵɵtemplate(11,A,16,6,"div",3),r.ɵɵtext(12,"\n"),r.ɵɵelementContainerEnd(),r.ɵɵtext(13,"\n")),2&e&&(r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(4,4,"customFields")),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",t.cipher.hasFields),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",!t.cipher.isDeleted&&!t.viewOnly),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",!t.cipher.isDeleted&&!t.viewOnly))},directives:[s.NgIf,l.CdkDropList,s.NgForOf,l.CdkDrag,c.A11yTitleDirective,d.DefaultValueAccessor,p.InputVerbatimDirective,d.NgControlStatus,d.NgModel,s.NgClass,d.SelectControlValueAccessor,d.NgSelectOption,d.ɵNgSelectMultipleOption,u.TrueFalseValueDirective,d.CheckboxControlValueAccessor,m.StopClickDirective],pipes:[h.I18nPipe],encapsulation:2})},41141:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AddEditComponent=void 0;const r=n(7481),o=(n(42982),n(45330),n(3174),n(32034),n(88308),n(51554),n(36631),n(45552),n(63513),n(84275),n(44809),n(73828),n(62166),n(73569),n(52344),n(32773)),a=n(80253),s=n(32621),l=n(45330),c=n(88308),d=n(51554),p=n(73828),u=n(42982),m=n(73569),h=n(3174),v=n(52344),f=n(84275),g=n(45552),y=n(32034),x=n(62166),S=n(63513),b=n(36631),w=n(44809),C=n(96832),I=n(56820),E=n(8863),P=n(57490),O=n(95746),k=n(51626),A=n(45728),T=n(48198),M=n(1142),B=n(48403),D=n(99729);function R(e,t){1&e&&(s.ɵɵelementStart(0,"app-callout",26),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,1,"personalOwnershipPolicyInEffect"),"\n "))}function F(e,t){if(1&e&&(s.ɵɵelementStart(0,"option",30),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){const e=t.$implicit;s.ɵɵproperty("ngValue",e.value),s.ɵɵadvance(1),s.ɵɵtextInterpolate(e.name)}}function U(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",16),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",17),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"label",27),s.ɵɵtext(5),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"select",28),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.type=t})),s.ɵɵtext(9,"\n "),s.ɵɵtemplate(10,F,2,2,"option",29),s.ɵɵtext(11,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(6,4,"whatTypeOfItem")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.type)("disabled",e.cipher.isDeleted),s.ɵɵadvance(2),s.ɵɵproperty("ngForOf",e.typeOptions)}}function V(e,t){if(1&e&&(s.ɵɵelementStart(0,"option",30),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){const e=t.$implicit;s.ɵɵproperty("ngValue",e.id),s.ɵɵadvance(1),s.ɵɵtextInterpolate(e.name)}}function N(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",17),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"label",31),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"select",32),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.folderId=t})),s.ɵɵtext(7,"\n "),s.ɵɵtemplate(8,V,2,2,"option",29),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,4,"folder")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.folderId)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(2),s.ɵɵproperty("ngForOf",e.folders)}}function _(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",41),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"button",50),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);const t=s.ɵɵnextContext(3);return t.copy(t.cipher.login.username,"username","Username")})),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelement(5,"i",44),s.ɵɵtext(6,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelementEnd()}2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(3,1,"copyUsername")))}function j(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"a",57),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(4).generatePassword()})),s.ɵɵpipe(1,"i18n"),s.ɵɵtext(2,"\n "),s.ɵɵelement(3,"i",58),s.ɵɵtext(4,"\n "),s.ɵɵelementEnd()}2&e&&s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(1,1,"generatePassword"))}function z(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",51),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,j,5,3,"a",52),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"a",53,54),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(3).checkPassword()})),s.ɵɵpipe(6,"i18n"),s.ɵɵtext(7,"\n "),s.ɵɵelement(8,"i",55),s.ɵɵtext(9,"\n "),s.ɵɵelement(10,"i",56),s.ɵɵpipe(11,"i18n"),s.ɵɵtext(12,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵreference(5),t=s.ɵɵnextContext(3);s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.cipher.viewPassword),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(6,6,"checkPassword")),s.ɵɵproperty("appApiAction",t.checkPasswordPromise),s.ɵɵadvance(4),s.ɵɵproperty("hidden",e.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(11,8,"loading")),s.ɵɵproperty("hidden",!e.loading)}}function H(e,t){1&e&&s.ɵɵelement(0,"app-premium-badge",62)}function L(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"a",63),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(4).upgradeOrganization()})),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()}2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,1,"upgrade"),"\n "))}function K(e,t){if(1&e&&(s.ɵɵelementStart(0,"div"),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"img",59),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵtemplate(5,H,1,0,"app-premium-badge",60),s.ɵɵtext(6,"\n "),s.ɵɵtemplate(7,L,3,3,"a",61),s.ɵɵtext(8,"\n "),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext(3);s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,3,"verificationCodeTotp")),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!e.organization&&!e.cipher.organizationId),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.organization&&!e.organization.useTotp||!e.organization&&!e.canAccessPremium&&e.cipher.organizationId&&!e.cipher.organizationUseTotp)}}const q=function(e){return{"stroke-dashoffset.px":e}};function G(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",64),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"span",65),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"span",66),s.ɵɵtext(5),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵnamespaceSVG(),s.ɵɵelementStart(7,"svg"),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"g"),s.ɵɵtext(10,"\n "),s.ɵɵelement(11,"circle",67),s.ɵɵtext(12,"\n "),s.ɵɵelement(13,"circle",68),s.ɵɵtext(14,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(15,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(16,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(17,"\n "),s.ɵɵnamespaceHTML(),s.ɵɵelementStart(18,"span",69),s.ɵɵpipe(19,"i18n"),s.ɵɵtext(20),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementStart(22,"button",70),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);const t=s.ɵɵnextContext(3);return t.copy(t.totpCode,"verificationCodeTotp","TOTP")})),s.ɵɵpipe(23,"i18n"),s.ɵɵtext(24,"\n "),s.ɵɵelement(25,"i",71),s.ɵɵtext(26,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext(3);s.ɵɵadvance(5),s.ɵɵtextInterpolate(e.totpSec),s.ɵɵadvance(6),s.ɵɵproperty("ngStyle",s.ɵɵpureFunction1(9,q,e.totpDash)),s.ɵɵadvance(7),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(19,5,"verificationCodeTotp")),s.ɵɵadvance(2),s.ɵɵtextInterpolate(e.totpCodeFormatted),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(23,7,"copyVerificationCode"))}}function W(e,t){if(1&e&&(s.ɵɵelementStart(0,"option",30),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){const e=t.$implicit;s.ɵɵproperty("ngValue",e.value),s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function $(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"button",82),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);const t=s.ɵɵnextContext().$implicit;return s.ɵɵnextContext(4).removeUri(t)})),s.ɵɵpipe(1,"i18n"),s.ɵɵtext(2,"\n "),s.ɵɵelement(3,"i",83),s.ɵɵtext(4,"\n "),s.ɵɵelementEnd()}2&e&&s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(1,1,"remove"))}function Y(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",16),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",73),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"label",74),s.ɵɵtext(5),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"div",34),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"input",75),s.ɵɵlistener("ngModelChange",(function(t){return s.ɵɵrestoreView(e).$implicit.uri=t})),s.ɵɵpipe(11,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"div",41),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"button",42),s.ɵɵlistener("click",(function(){const t=s.ɵɵrestoreView(e).$implicit;return s.ɵɵnextContext(4).launch(t)})),s.ɵɵpipe(16,"i18n"),s.ɵɵtext(17,"\n "),s.ɵɵelement(18,"i",76),s.ɵɵtext(19,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵelementStart(21,"button",50),s.ɵɵlistener("click",(function(){const t=s.ɵɵrestoreView(e).$implicit;return s.ɵɵnextContext(4).copy(t.uri,"uri","URI")})),s.ɵɵpipe(22,"i18n"),s.ɵɵtext(23,"\n "),s.ɵɵelement(24,"i",44),s.ɵɵtext(25,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(26,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(28,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(29,"\n "),s.ɵɵelementStart(30,"div",77),s.ɵɵtext(31,"\n "),s.ɵɵelementStart(32,"div",37),s.ɵɵtext(33,"\n "),s.ɵɵelementStart(34,"label",74),s.ɵɵtext(35),s.ɵɵpipe(36,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(37,"\n "),s.ɵɵelementStart(38,"a",78),s.ɵɵpipe(39,"i18n"),s.ɵɵtext(40,"\n "),s.ɵɵelement(41,"i",79),s.ɵɵtext(42,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(43,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(44,"\n "),s.ɵɵelementStart(45,"div",37),s.ɵɵtext(46,"\n "),s.ɵɵelementStart(47,"select",80),s.ɵɵlistener("ngModelChange",(function(t){return s.ɵɵrestoreView(e).$implicit.match=t}))("change",(function(){const t=s.ɵɵrestoreView(e).$implicit;return s.ɵɵnextContext(4).loginUriMatchChanged(t)})),s.ɵɵtext(48,"\n "),s.ɵɵtemplate(49,W,2,2,"option",29),s.ɵɵtext(50,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(51,"\n "),s.ɵɵtemplate(52,$,5,3,"button",81),s.ɵɵtext(53,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(54,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(55,"\n "),s.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=t.index,i=s.ɵɵnextContext(4);s.ɵɵadvance(4),s.ɵɵpropertyInterpolate1("for","loginUri",n,""),s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind2(6,19,"uriPosition",n+1)),s.ɵɵadvance(5),s.ɵɵpropertyInterpolate1("id","loginUri",n,""),s.ɵɵpropertyInterpolate1("name","Login.Uris[",n,"].Uri"),s.ɵɵpropertyInterpolate1("placeholder","",s.ɵɵpipeBind1(11,22,"ex")," https://google.com"),s.ɵɵproperty("ngModel",e.uri)("disabled",i.cipher.isDeleted||i.viewOnly),s.ɵɵadvance(5),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(16,24,"launch")),s.ɵɵproperty("disabled",!e.canLaunch),s.ɵɵadvance(6),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(22,26,"copyUri")),s.ɵɵadvance(13),s.ɵɵpropertyInterpolate1("for","loginUriMatch",n,""),s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(36,28,"matchDetection"),"\n "),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(39,30,"learnMore")),s.ɵɵadvance(9),s.ɵɵpropertyInterpolate1("id","loginUriMatch",n,""),s.ɵɵpropertyInterpolate1("name","Login.Uris[",n,"].Match"),s.ɵɵproperty("ngModel",e.match)("disabled",i.cipher.isDeleted||i.viewOnly),s.ɵɵadvance(2),s.ɵɵproperty("ngForOf",i.uriMatchOptions),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!i.cipher.isDeleted&&!i.viewOnly)}}function Q(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,Y,56,32,"div",72),s.ɵɵtext(3,"\n "),s.ɵɵelementContainerEnd()),2&e){const e=s.ɵɵnextContext(3);s.ɵɵadvance(2),s.ɵɵproperty("ngForOf",e.cipher.login.uris)("ngForTrackBy",e.trackByFunction)}}function J(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"a",84),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(3).addUri()})),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",85),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd()}2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(4,1,"newUri"),"\n "))}const Z=function(e,t){return{"bwi-eye":e,"bwi-eye-slash":t}},X=function(e){return{low:e}};function ee(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",16),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"div",17),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"label",33),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"div",34),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"input",35),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.login.username=t})),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n "),s.ɵɵtemplate(14,_,8,3,"div",36),s.ɵɵtext(15,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(16,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(17,"\n "),s.ɵɵelementStart(18,"div",17),s.ɵɵtext(19,"\n "),s.ɵɵelementStart(20,"div",37),s.ɵɵtext(21,"\n "),s.ɵɵelementStart(22,"label",38),s.ɵɵtext(23),s.ɵɵpipe(24,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(25,"\n "),s.ɵɵtemplate(26,z,14,10,"div",39),s.ɵɵtext(27,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(28,"\n "),s.ɵɵelementStart(29,"div",34),s.ɵɵtext(30,"\n "),s.ɵɵelementStart(31,"input",40),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.login.password=t})),s.ɵɵelementEnd(),s.ɵɵtext(32,"\n "),s.ɵɵelementStart(33,"div",41),s.ɵɵtext(34,"\n "),s.ɵɵelementStart(35,"button",42),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).togglePassword()})),s.ɵɵpipe(36,"i18n"),s.ɵɵtext(37,"\n "),s.ɵɵelement(38,"i",43),s.ɵɵtext(39,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(40,"\n "),s.ɵɵelementStart(41,"button",42),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);const t=s.ɵɵnextContext(2);return t.copy(t.cipher.login.password,"password","Password")})),s.ɵɵpipe(42,"i18n"),s.ɵɵtext(43,"\n "),s.ɵɵelement(44,"i",44),s.ɵɵtext(45,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(46,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(47,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(48,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(49,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(50,"\n "),s.ɵɵelementStart(51,"div",16),s.ɵɵtext(52,"\n "),s.ɵɵelementStart(53,"div",17),s.ɵɵtext(54,"\n "),s.ɵɵelementStart(55,"label",45),s.ɵɵtext(56),s.ɵɵpipe(57,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(58,"\n "),s.ɵɵelementStart(59,"input",46),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.login.totp=t})),s.ɵɵelementEnd(),s.ɵɵtext(60,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(61,"\n "),s.ɵɵelementStart(62,"div",47),s.ɵɵtext(63,"\n "),s.ɵɵtemplate(64,K,9,5,"div",21),s.ɵɵtext(65,"\n "),s.ɵɵtemplate(66,G,28,11,"div",48),s.ɵɵtext(67,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(68,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(69,"\n "),s.ɵɵtemplate(70,Q,4,2,"ng-container",21),s.ɵɵtext(71,"\n "),s.ɵɵtemplate(72,J,5,3,"a",49),s.ɵɵtext(73,"\n "),s.ɵɵelementContainerEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,23,"username")),s.ɵɵadvance(5),s.ɵɵproperty("ngModel",e.cipher.login.username)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!e.cipher.isDeleted),s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(24,25,"password")),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!e.cipher.isDeleted&&!e.viewOnly),s.ɵɵadvance(5),s.ɵɵpropertyInterpolate("type",e.showPassword?"text":"password"),s.ɵɵproperty("ngModel",e.cipher.login.password)("disabled",e.cipher.isDeleted||!e.cipher.viewPassword||e.viewOnly),s.ɵɵadvance(4),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(36,27,"toggleVisibility")),s.ɵɵproperty("disabled",!e.cipher.viewPassword),s.ɵɵadvance(3),s.ɵɵproperty("ngClass",s.ɵɵpureFunction2(33,Z,!e.showPassword,e.showPassword)),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(42,29,"copyPassword")),s.ɵɵproperty("disabled",!e.cipher.viewPassword),s.ɵɵadvance(15),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(57,31,"authenticatorKeyTotp")),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("type",e.cipher.viewPassword?"text":"password"),s.ɵɵproperty("ngModel",e.cipher.login.totp)("disabled",e.cipher.isDeleted||!e.cipher.viewPassword||e.viewOnly),s.ɵɵadvance(3),s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(36,X,e.totpLow)),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!e.cipher.login.totp||!e.totpCode),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.cipher.login.totp&&e.totpCode),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",e.cipher.login.hasUris),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!e.cipher.isDeleted&&!e.viewOnly)}}function te(e,t){if(1&e&&(s.ɵɵelementStart(0,"option",30),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){const e=t.$implicit;s.ɵɵproperty("ngValue",e.value),s.ɵɵadvance(1),s.ɵɵtextInterpolate(e.name)}}function ne(e,t){if(1&e&&(s.ɵɵelementStart(0,"option",30),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){const e=t.$implicit;s.ɵɵproperty("ngValue",e.value),s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function ie(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",16),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"div",17),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"label",86),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"input",87),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.card.cardholderName=t})),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"div",17),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"label",88),s.ɵɵtext(16),s.ɵɵpipe(17,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"select",89),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.card.brand=t})),s.ɵɵtext(20,"\n "),s.ɵɵtemplate(21,te,2,2,"option",29),s.ɵɵtext(22,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(23,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(24,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(25,"\n "),s.ɵɵelementStart(26,"div",16),s.ɵɵtext(27,"\n "),s.ɵɵelementStart(28,"div",17),s.ɵɵtext(29,"\n "),s.ɵɵelementStart(30,"label",90),s.ɵɵtext(31),s.ɵɵpipe(32,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(33,"\n "),s.ɵɵelementStart(34,"div",34),s.ɵɵtext(35,"\n "),s.ɵɵelementStart(36,"input",91),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.card.number=t})),s.ɵɵelementEnd(),s.ɵɵtext(37,"\n "),s.ɵɵelementStart(38,"div",41),s.ɵɵtext(39,"\n "),s.ɵɵelementStart(40,"button",50),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).toggleCardNumber()})),s.ɵɵpipe(41,"i18n"),s.ɵɵtext(42,"\n "),s.ɵɵelement(43,"i",43),s.ɵɵtext(44,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(45,"\n "),s.ɵɵelementStart(46,"button",50),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);const t=s.ɵɵnextContext(2);return t.copy(t.cipher.card.number,"number","Number")})),s.ɵɵpipe(47,"i18n"),s.ɵɵtext(48,"\n "),s.ɵɵelement(49,"i",44),s.ɵɵtext(50,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(51,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(52,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(53,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(54,"\n "),s.ɵɵelementStart(55,"div",92),s.ɵɵtext(56,"\n "),s.ɵɵelementStart(57,"label",93),s.ɵɵtext(58),s.ɵɵpipe(59,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(60,"\n "),s.ɵɵelementStart(61,"select",94),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.card.expMonth=t})),s.ɵɵtext(62,"\n "),s.ɵɵtemplate(63,ne,2,2,"option",29),s.ɵɵtext(64,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(65,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(66,"\n "),s.ɵɵelementStart(67,"div",92),s.ɵɵtext(68,"\n "),s.ɵɵelementStart(69,"label",95),s.ɵɵtext(70),s.ɵɵpipe(71,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(72,"\n "),s.ɵɵelementStart(73,"input",96),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.card.expYear=t})),s.ɵɵpipe(74,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(75,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(76,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(77,"\n "),s.ɵɵelementStart(78,"div",16),s.ɵɵtext(79,"\n "),s.ɵɵelementStart(80,"div",17),s.ɵɵtext(81,"\n "),s.ɵɵelementStart(82,"label",97),s.ɵɵtext(83),s.ɵɵpipe(84,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(85,"\n "),s.ɵɵelementStart(86,"div",34),s.ɵɵtext(87,"\n "),s.ɵɵelementStart(88,"input",98),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.card.code=t})),s.ɵɵelementEnd(),s.ɵɵtext(89,"\n "),s.ɵɵelementStart(90,"div",41),s.ɵɵtext(91,"\n "),s.ɵɵelementStart(92,"button",50),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).toggleCardCode()})),s.ɵɵpipe(93,"i18n"),s.ɵɵtext(94,"\n "),s.ɵɵelement(95,"i",43),s.ɵɵtext(96,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(97,"\n "),s.ɵɵelementStart(98,"button",50),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);const t=s.ɵɵnextContext(2);return t.copy(t.cipher.card.code,"securityCode","Security Code")})),s.ɵɵpipe(99,"i18n"),s.ɵɵtext(100,"\n "),s.ɵɵelement(101,"i",44),s.ɵɵtext(102,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(103,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(104,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(105,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(106,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(107,"\n "),s.ɵɵelementContainerEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,29,"cardholderName")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.card.cardholderName)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(17,31,"brand")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.card.brand)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(2),s.ɵɵproperty("ngForOf",e.cardBrandOptions),s.ɵɵadvance(10),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(32,33,"number")),s.ɵɵadvance(5),s.ɵɵpropertyInterpolate("type",e.showCardNumber?"text":"password"),s.ɵɵproperty("ngModel",e.cipher.card.number)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(4),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(41,35,"toggleVisibility")),s.ɵɵadvance(3),s.ɵɵproperty("ngClass",s.ɵɵpureFunction2(51,Z,!e.showCardNumber,e.showCardNumber)),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(47,37,"copyNumber")),s.ɵɵadvance(12),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(59,39,"expirationMonth")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.card.expMonth)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(2),s.ɵɵproperty("ngForOf",e.cardExpMonthOptions),s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(71,41,"expirationYear")),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate1("placeholder","",s.ɵɵpipeBind1(74,43,"ex")," 2019"),s.ɵɵproperty("ngModel",e.cipher.card.expYear)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(10),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(84,45,"securityCode")),s.ɵɵadvance(5),s.ɵɵpropertyInterpolate("type",e.showCardCode?"text":"password"),s.ɵɵproperty("ngModel",e.cipher.card.code)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(4),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(93,47,"toggleVisibility")),s.ɵɵadvance(3),s.ɵɵproperty("ngClass",s.ɵɵpureFunction2(54,Z,!e.showCardCode,e.showCardCode)),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(99,49,"securityCode"))}}function re(e,t){if(1&e&&(s.ɵɵelementStart(0,"option",30),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){const e=t.$implicit;s.ɵɵproperty("ngValue",e.value),s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function oe(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",16),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"div",99),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"label",100),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"select",101),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.title=t})),s.ɵɵtext(11,"\n "),s.ɵɵtemplate(12,re,2,2,"option",29),s.ɵɵtext(13,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(15,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(16,"\n "),s.ɵɵelementStart(17,"div",16),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"div",99),s.ɵɵtext(20,"\n "),s.ɵɵelementStart(21,"label",102),s.ɵɵtext(22),s.ɵɵpipe(23,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(24,"\n "),s.ɵɵelementStart(25,"input",103),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.firstName=t})),s.ɵɵelementEnd(),s.ɵɵtext(26,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n "),s.ɵɵelementStart(28,"div",99),s.ɵɵtext(29,"\n "),s.ɵɵelementStart(30,"label",104),s.ɵɵtext(31),s.ɵɵpipe(32,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(33,"\n "),s.ɵɵelementStart(34,"input",105),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.middleName=t})),s.ɵɵelementEnd(),s.ɵɵtext(35,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(36,"\n "),s.ɵɵelementStart(37,"div",99),s.ɵɵtext(38,"\n "),s.ɵɵelementStart(39,"label",106),s.ɵɵtext(40),s.ɵɵpipe(41,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(42,"\n "),s.ɵɵelementStart(43,"input",107),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.lastName=t})),s.ɵɵelementEnd(),s.ɵɵtext(44,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(45,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(46,"\n "),s.ɵɵelementStart(47,"div",16),s.ɵɵtext(48,"\n "),s.ɵɵelementStart(49,"div",99),s.ɵɵtext(50,"\n "),s.ɵɵelementStart(51,"label",108),s.ɵɵtext(52),s.ɵɵpipe(53,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(54,"\n "),s.ɵɵelementStart(55,"input",109),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.username=t})),s.ɵɵelementEnd(),s.ɵɵtext(56,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(57,"\n "),s.ɵɵelementStart(58,"div",99),s.ɵɵtext(59,"\n "),s.ɵɵelementStart(60,"label",110),s.ɵɵtext(61),s.ɵɵpipe(62,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(63,"\n "),s.ɵɵelementStart(64,"input",111),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.company=t})),s.ɵɵelementEnd(),s.ɵɵtext(65,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(66,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(67,"\n "),s.ɵɵelementStart(68,"div",16),s.ɵɵtext(69,"\n "),s.ɵɵelementStart(70,"div",99),s.ɵɵtext(71,"\n "),s.ɵɵelementStart(72,"label",112),s.ɵɵtext(73),s.ɵɵpipe(74,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(75,"\n "),s.ɵɵelementStart(76,"input",113),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.ssn=t})),s.ɵɵelementEnd(),s.ɵɵtext(77,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(78,"\n "),s.ɵɵelementStart(79,"div",99),s.ɵɵtext(80,"\n "),s.ɵɵelementStart(81,"label",114),s.ɵɵtext(82),s.ɵɵpipe(83,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(84,"\n "),s.ɵɵelementStart(85,"input",115),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.passportNumber=t})),s.ɵɵelementEnd(),s.ɵɵtext(86,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(87,"\n "),s.ɵɵelementStart(88,"div",99),s.ɵɵtext(89,"\n "),s.ɵɵelementStart(90,"label",116),s.ɵɵtext(91),s.ɵɵpipe(92,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(93,"\n "),s.ɵɵelementStart(94,"input",117),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.licenseNumber=t})),s.ɵɵelementEnd(),s.ɵɵtext(95,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(96,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(97,"\n "),s.ɵɵelementStart(98,"div",16),s.ɵɵtext(99,"\n "),s.ɵɵelementStart(100,"div",17),s.ɵɵtext(101,"\n "),s.ɵɵelementStart(102,"label",118),s.ɵɵtext(103),s.ɵɵpipe(104,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(105,"\n "),s.ɵɵelementStart(106,"input",119),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.email=t})),s.ɵɵelementEnd(),s.ɵɵtext(107,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(108,"\n "),s.ɵɵelementStart(109,"div",17),s.ɵɵtext(110,"\n "),s.ɵɵelementStart(111,"label",120),s.ɵɵtext(112),s.ɵɵpipe(113,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(114,"\n "),s.ɵɵelementStart(115,"input",121),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.phone=t})),s.ɵɵelementEnd(),s.ɵɵtext(116,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(117,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(118,"\n "),s.ɵɵelementStart(119,"div",16),s.ɵɵtext(120,"\n "),s.ɵɵelementStart(121,"div",17),s.ɵɵtext(122,"\n "),s.ɵɵelementStart(123,"label",122),s.ɵɵtext(124),s.ɵɵpipe(125,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(126,"\n "),s.ɵɵelementStart(127,"input",123),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.address1=t})),s.ɵɵelementEnd(),s.ɵɵtext(128,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(129,"\n "),s.ɵɵelementStart(130,"div",17),s.ɵɵtext(131,"\n "),s.ɵɵelementStart(132,"label",124),s.ɵɵtext(133),s.ɵɵpipe(134,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(135,"\n "),s.ɵɵelementStart(136,"input",125),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.address2=t})),s.ɵɵelementEnd(),s.ɵɵtext(137,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(138,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(139,"\n "),s.ɵɵelementStart(140,"div",16),s.ɵɵtext(141,"\n "),s.ɵɵelementStart(142,"div",17),s.ɵɵtext(143,"\n "),s.ɵɵelementStart(144,"label",126),s.ɵɵtext(145),s.ɵɵpipe(146,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(147,"\n "),s.ɵɵelementStart(148,"input",127),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.address3=t})),s.ɵɵelementEnd(),s.ɵɵtext(149,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(150,"\n "),s.ɵɵelementStart(151,"div",17),s.ɵɵtext(152,"\n "),s.ɵɵelementStart(153,"label",128),s.ɵɵtext(154),s.ɵɵpipe(155,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(156,"\n "),s.ɵɵelementStart(157,"input",129),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.city=t})),s.ɵɵelementEnd(),s.ɵɵtext(158,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(159,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(160,"\n "),s.ɵɵelementStart(161,"div",16),s.ɵɵtext(162,"\n "),s.ɵɵelementStart(163,"div",17),s.ɵɵtext(164,"\n "),s.ɵɵelementStart(165,"label",130),s.ɵɵtext(166),s.ɵɵpipe(167,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(168,"\n "),s.ɵɵelementStart(169,"input",131),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.state=t})),s.ɵɵelementEnd(),s.ɵɵtext(170,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(171,"\n "),s.ɵɵelementStart(172,"div",17),s.ɵɵtext(173,"\n "),s.ɵɵelementStart(174,"label",132),s.ɵɵtext(175),s.ɵɵpipe(176,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(177,"\n "),s.ɵɵelementStart(178,"input",133),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.postalCode=t})),s.ɵɵelementEnd(),s.ɵɵtext(179,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(180,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(181,"\n "),s.ɵɵelementStart(182,"div",16),s.ɵɵtext(183,"\n "),s.ɵɵelementStart(184,"div",17),s.ɵɵtext(185,"\n "),s.ɵɵelementStart(186,"label",134),s.ɵɵtext(187),s.ɵɵpipe(188,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(189,"\n "),s.ɵɵelementStart(190,"input",135),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.country=t})),s.ɵɵelementEnd(),s.ɵɵtext(191,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(192,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(193,"\n "),s.ɵɵelementContainerEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,55,"title")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.title)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(2),s.ɵɵproperty("ngForOf",e.identityTitleOptions),s.ɵɵadvance(10),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(23,57,"firstName")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.firstName)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(32,59,"middleName")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.middleName)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(41,61,"lastName")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.lastName)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(53,63,"username")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.username)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(62,65,"company")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.company)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(74,67,"ssn")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.ssn)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(83,69,"passportNumber")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.passportNumber)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(92,71,"licenseNumber")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.licenseNumber)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(104,73,"email")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.email)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(113,75,"phone")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.phone)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(125,77,"address1")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.address1)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(134,79,"address2")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.address2)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(146,81,"address3")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.address3)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(155,83,"cityTown")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.city)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(167,85,"stateProvince")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.state)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(176,87,"zipPostalCode")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.postalCode)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(188,89,"country")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.country)("disabled",e.cipher.isDeleted||e.viewOnly)}}function ae(e,t){if(1&e&&(s.ɵɵelementStart(0,"option",30),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){const e=t.$implicit;s.ɵɵproperty("ngValue",e.value),s.ɵɵadvance(1),s.ɵɵtextInterpolate(e.name)}}function se(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"h3",136),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"div",16),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"div",137),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"label",138),s.ɵɵtext(11),s.ɵɵpipe(12,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n "),s.ɵɵelementStart(14,"select",139),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.organizationId=t}))("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).organizationChanged()})),s.ɵɵtext(15,"\n "),s.ɵɵtemplate(16,ae,2,2,"option",29),s.ɵɵtext(17,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(19,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵelementContainerEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,5,"ownership")),s.ɵɵadvance(8),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(12,7,"whoOwnsThisItem")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.organizationId)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(2),s.ɵɵproperty("ngForOf",e.ownershipOptions)}}function le(e,t){1&e&&(s.ɵɵelementStart(0,"div"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,1,"noCollectionsInList"),"\n "))}function ce(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",141),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"input",142),s.ɵɵlistener("ngModelChange",(function(t){return s.ɵɵrestoreView(e).$implicit.checked=t})),s.ɵɵelementEnd(),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"label",143),s.ɵɵtext(5),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=t.index,i=s.ɵɵnextContext(4);s.ɵɵadvance(2),s.ɵɵpropertyInterpolate1("id","collection-",n,""),s.ɵɵpropertyInterpolate1("name","Collection[",n,"].Checked"),s.ɵɵproperty("ngModel",e.checked)("disabled",i.cipher.isDeleted||i.viewOnly),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate1("for","collection-",n,""),s.ɵɵadvance(1),s.ɵɵtextInterpolate(e.name)}}function de(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,ce,7,6,"div",140),s.ɵɵtext(3,"\n "),s.ɵɵelementContainerEnd()),2&e){const e=s.ɵɵnextContext(3);s.ɵɵadvance(2),s.ɵɵproperty("ngForOf",e.collections)}}function pe(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"h3",136),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵtemplate(6,le,3,3,"div",21),s.ɵɵtext(7,"\n "),s.ɵɵtemplate(8,de,4,1,"ng-container",21),s.ɵɵtext(9,"\n "),s.ɵɵelementContainerEnd()),2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,3,"collections")),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!e.collections||!e.collections.length),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.collections&&e.collections.length)}}function ue(e,t){if(1&e&&(s.ɵɵelementStart(0,"div"),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"b",145),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5),s.ɵɵpipe(6,"date"),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext(3);s.ɵɵadvance(3),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(4,2,"datePasswordUpdated"),":"),s.ɵɵadvance(2),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind2(6,4,e.cipher.passwordRevisionDisplayDate,"medium"),"\n ")}}function me(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div"),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"b",145),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"a",146),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(3).viewHistory()})),s.ɵɵpipe(7,"i18n"),s.ɵɵtext(8),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext(3);s.ɵɵadvance(3),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(4,3,"passwordHistory"),":"),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(7,5,"view")),s.ɵɵadvance(2),s.ɵɵtextInterpolate1("\n ",e.cipher.passwordHistory.length,"\n ")}}function he(e,t){if(1&e&&(s.ɵɵelementStart(0,"div"),s.ɵɵtext(1),s.ɵɵpipe(2,"date"),s.ɵɵelementStart(3,"span",148),s.ɵɵtext(4),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd()),2&e){const e=t.$implicit;s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind2(2,2,e.lastUsedDate,"short")," -\n "),s.ɵɵadvance(3),s.ɵɵtextInterpolate(e.password)}}function ve(e,t){if(1&e&&(s.ɵɵelementStart(0,"div",62),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,he,6,5,"div",147),s.ɵɵtext(3,"\n "),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext(3);s.ɵɵadvance(2),s.ɵɵproperty("ngForOf",e.cipher.passwordHistory)}}function fe(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",144),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"div"),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"b",145),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9),s.ɵɵpipe(10,"date"),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵtemplate(12,ue,7,7,"div",21),s.ɵɵtext(13,"\n "),s.ɵɵtemplate(14,me,10,7,"div",21),s.ɵɵtext(15,"\n "),s.ɵɵtemplate(16,ve,4,1,"div",60),s.ɵɵtext(17,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementContainerEnd()),2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(7),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(8,5,"dateUpdated"),":"),s.ɵɵadvance(2),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind2(10,7,e.cipher.revisionDate,"medium"),"\n "),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",e.showRevisionDate),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.hasPasswordHistory),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.viewingPasswordHistory)}}function ge(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"h3",136),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"div",141),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"input",149),s.ɵɵlistener("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).repromptChanged()})),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"label",150),s.ɵɵtext(11),s.ɵɵpipe(12,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n "),s.ɵɵelementStart(14,"a",151),s.ɵɵpipe(15,"i18n"),s.ɵɵtext(16,"\n "),s.ɵɵelement(17,"i",79),s.ɵɵtext(18,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(19,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵelementContainerEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,5,"options")),s.ɵɵadvance(5),s.ɵɵproperty("ngModel",e.reprompt)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(12,7,"passwordPrompt")),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(15,9,"learnMore"))}}function ye(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",13),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,R,3,3,"app-callout",14),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,U,14,6,"div",15),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"div",16),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"div",17),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"label",18),s.ɵɵtext(11),s.ɵɵpipe(12,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n "),s.ɵɵelementStart(14,"input",19),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().cipher.name=t})),s.ɵɵelementEnd(),s.ɵɵtext(15,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(16,"\n "),s.ɵɵtemplate(17,N,11,6,"div",20),s.ɵɵtext(18,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(19,"\n "),s.ɵɵtext(20,"\n "),s.ɵɵtemplate(21,ee,74,38,"ng-container",21),s.ɵɵtext(22,"\n "),s.ɵɵtext(23,"\n "),s.ɵɵtemplate(24,ie,108,57,"ng-container",21),s.ɵɵtext(25,"\n "),s.ɵɵtext(26,"\n "),s.ɵɵtemplate(27,oe,194,91,"ng-container",21),s.ɵɵtext(28,"\n "),s.ɵɵelementStart(29,"div",22),s.ɵɵtext(30,"\n "),s.ɵɵelementStart(31,"label",23),s.ɵɵtext(32),s.ɵɵpipe(33,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(34,"\n "),s.ɵɵelementStart(35,"textarea",24),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().cipher.notes=t})),s.ɵɵelementEnd(),s.ɵɵtext(36,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(37,"\n "),s.ɵɵelement(38,"app-vault-add-edit-custom-fields",25),s.ɵɵtext(39,"\n "),s.ɵɵtemplate(40,se,21,9,"ng-container",21),s.ɵɵtext(41,"\n "),s.ɵɵtemplate(42,pe,10,5,"ng-container",21),s.ɵɵtext(43,"\n "),s.ɵɵtemplate(44,fe,19,10,"ng-container",21),s.ɵɵtext(45,"\n "),s.ɵɵtemplate(46,ge,21,11,"ng-container",21),s.ɵɵtext(47,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.allowOwnershipAssignment()&&!e.allowPersonal),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!e.editMode&&!e.viewOnly),s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(12,20,"name")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.name)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!e.organization),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",e.cipher.type===e.cipherType.Login),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",e.cipher.type===e.cipherType.Card),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",e.cipher.type===e.cipherType.Identity),s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(33,22,"notes")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.notes)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(3),s.ɵɵproperty("cipher",e.cipher)("thisCipherType",e.cipher.type)("viewOnly",e.viewOnly)("copy",e.copy.bind(e)),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.allowOwnershipAssignment()),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",(!e.editMode||e.cloneMode)&&e.cipher.organizationId),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.editMode),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.canUseReprompt)}}function xe(e,t){if(1&e&&(s.ɵɵelementStart(0,"button",152),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",153),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span"),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext(),t=s.ɵɵreference(5);s.ɵɵproperty("disabled",t.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,3,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,5,null!=e.cipher&&e.cipher.isDeleted?"restore":"save"))}}const Se=function(e,t){return{"bwi-star-f":e,"bwi-star":t}};function be(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"button",70),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).toggleFavorite()})),s.ɵɵpipe(1,"i18n"),s.ɵɵtext(2,"\n "),s.ɵɵelement(3,"i",43),s.ɵɵtext(4,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(1,2,e.cipher.favorite?"unfavorite":"favorite")),s.ɵɵadvance(3),s.ɵɵproperty("ngClass",s.ɵɵpureFunction2(4,Se,e.cipher.favorite,!e.cipher.favorite))}}function we(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"button",157,158),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).delete()})),s.ɵɵpipe(2,"i18n"),s.ɵɵtext(3,"\n "),s.ɵɵelement(4,"i",159),s.ɵɵtext(5,"\n "),s.ɵɵelement(6,"i",160),s.ɵɵpipe(7,"i18n"),s.ɵɵtext(8,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵreference(1),t=s.ɵɵnextContext(2);s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(2,6,t.cipher.isDeleted?"permanentlyDelete":"delete")),s.ɵɵproperty("disabled",e.loading)("appApiAction",t.deletePromise),s.ɵɵadvance(4),s.ɵɵproperty("hidden",e.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(7,8,"loading")),s.ɵɵproperty("hidden",!e.loading)}}function Ce(e,t){if(1&e&&(s.ɵɵelementStart(0,"div",154),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,be,5,7,"button",155),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,we,9,10,"button",156),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!e.organization&&!e.cipher.isDeleted),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.editMode&&!e.cloneMode)}}class Ie extends r.AddEditComponent{constructor(e,t,n,i,r,o,a,s,l,c,d,p,u,m,h){super(e,t,n,i,r,o,a,c,d,p,m,h,u),this.totpService=s,this.passwordGenerationService=l,this.messagingService=c,this.policyService=p,this.showRevisionDate=!1,this.hasPasswordHistory=!1,this.viewingPasswordHistory=!1,this.viewOnly=!1}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){if(yield e.ngOnInit.call(this),yield this.load(),this.showRevisionDate=null!=this.cipher.passwordRevisionDisplayDate,this.hasPasswordHistory=this.cipher.hasPasswordHistory,this.cleanUp(),this.canAccessPremium=yield this.stateService.getCanAccessPremium(),this.cipher.type===o.CipherType.Login&&this.cipher.login.totp&&(this.cipher.organizationUseTotp||this.canAccessPremium)){yield this.totpUpdateCode();const e=this.totpService.getTimeInterval(this.cipher.login.totp);yield this.totpTick(e),this.totpInterval=window.setInterval((()=>i(this,void 0,void 0,(function*(){yield this.totpTick(e)}))),1e3)}}))}toggleFavorite(){this.cipher.favorite=!this.cipher.favorite}launch(e){e.canLaunch&&this.platformUtilsService.launchUri(e.launchUri)}copy(e,t,n){null!=e&&(this.platformUtilsService.copyToClipboard(e,{window}),this.platformUtilsService.showToast("info",null,this.i18nService.t("valueCopied",this.i18nService.t(t))),this.editMode&&("password"===t?this.eventService.collect(a.EventType.Cipher_ClientToggledHiddenFieldVisible,this.cipherId):"securityCode"===t?this.eventService.collect(a.EventType.Cipher_ClientCopiedCardCode,this.cipherId):"H_Field"===n&&this.eventService.collect(a.EventType.Cipher_ClientCopiedHiddenField,this.cipherId)))}generatePassword(){const e=Object.create(null,{generatePassword:{get:()=>super.generatePassword}});return i(this,void 0,void 0,(function*(){const t=yield e.generatePassword.call(this);if(t){const e=(yield this.passwordGenerationService.getOptions())[0];this.cipher.login.password=yield this.passwordGenerationService.generatePassword(e)}return t}))}premiumRequired(){this.canAccessPremium||this.messagingService.send("premiumRequired")}upgradeOrganization(){this.messagingService.send("upgradeOrganization",{organizationId:this.cipher.organizationId})}viewHistory(){this.viewingPasswordHistory=!this.viewingPasswordHistory}cleanUp(){this.totpInterval&&window.clearInterval(this.totpInterval)}totpUpdateCode(){return i(this,void 0,void 0,(function*(){if(null!=this.cipher&&this.cipher.type===o.CipherType.Login&&null!=this.cipher.login.totp)if(this.totpCode=yield this.totpService.getCode(this.cipher.login.totp),null!=this.totpCode)if(this.totpCode.length>4){const e=Math.floor(this.totpCode.length/2);this.totpCodeFormatted=this.totpCode.substring(0,e)+" "+this.totpCode.substring(e)}else this.totpCodeFormatted=this.totpCode;else this.totpCodeFormatted=null,this.totpInterval&&window.clearInterval(this.totpInterval);else this.totpInterval&&window.clearInterval(this.totpInterval)}))}allowOwnershipAssignment(){return(!this.editMode||this.cloneMode)&&null!=this.ownershipOptions&&(this.ownershipOptions.length>1||!this.allowPersonal)}totpTick(e){return i(this,void 0,void 0,(function*(){const t=Math.round((new Date).getTime()/1e3)%e;this.totpSec=e-t,this.totpDash=+(Math.round(78.6/e*t+"e+2")+"e-2"),this.totpLow=this.totpSec<=7,0===t&&(yield this.totpUpdateCode())}))}}t.AddEditComponent=Ie,Ie.ɵfac=function(e){return new(e||Ie)(s.ɵɵdirectiveInject(l.CipherService),s.ɵɵdirectiveInject(c.FolderService),s.ɵɵdirectiveInject(d.I18nService),s.ɵɵdirectiveInject(p.PlatformUtilsService),s.ɵɵdirectiveInject(u.AuditService),s.ɵɵdirectiveInject(m.StateService),s.ɵɵdirectiveInject(h.CollectionService),s.ɵɵdirectiveInject(v.TotpService),s.ɵɵdirectiveInject(f.PasswordGenerationService),s.ɵɵdirectiveInject(g.MessagingService),s.ɵɵdirectiveInject(y.EventService),s.ɵɵdirectiveInject(x.PolicyService),s.ɵɵdirectiveInject(S.OrganizationService),s.ɵɵdirectiveInject(b.LogService),s.ɵɵdirectiveInject(w.PasswordRepromptService))},Ie.ɵcmp=s.ɵɵdefineComponent({type:Ie,selectors:[["app-vault-add-edit"]],features:[s.ɵɵInheritDefinitionFeature],decls:36,vars:11,consts:[["role","dialog","aria-modal","true","aria-labelledby","cipherAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],["ngNativeValidate","","autocomplete","off",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","cipherAddEditTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["class","ml-auto",4,"ngIf"],[1,"modal-body"],["type","info",4,"ngIf"],["class","row",4,"ngIf"],[1,"row"],[1,"col-6","form-group"],["for","name"],["id","name","type","text","name","Name","required","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["class","col-6 form-group",4,"ngIf"],[4,"ngIf"],[1,"form-group"],["for","notes"],["id","notes","name","Notes","rows","6",1,"form-control",3,"ngModel","disabled","ngModelChange"],[3,"cipher","thisCipherType","viewOnly","copy"],["type","info"],["for","type"],["id","type","name","Type","appAutofocus","",1,"form-control",3,"ngModel","disabled","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[3,"ngValue"],["for","folder"],["id","folder","name","FolderId",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","loginUsername"],[1,"input-group"],["id","loginUsername","type","text","name","Login.Username","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["class","input-group-append",4,"ngIf"],[1,"d-flex"],["for","loginPassword"],["class","ml-auto d-flex",4,"ngIf"],["id","loginPassword","name","Login.Password","appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"input-group-append"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","disabled","click"],["aria-hidden","true",1,"bwi","bwi-lg",3,"ngClass"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-clone"],["for","loginTotp"],["id","loginTotp","name","Login.Totp","appInputVerbatim","",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"col-6","form-group","totp","d-flex","align-items-end",3,"ngClass"],["class","d-flex align-items-center",4,"ngIf"],["href","#","appStopClick","","class","d-inline-block mb-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","click"],[1,"ml-auto","d-flex"],["href","#","class","d-block mr-2 bwi-icon-above-input","appStopClick","",3,"appA11yTitle","click",4,"ngIf"],["href","#","appStopClick","",1,"d-block","bwi-icon-above-input",3,"appA11yTitle","appApiAction","click"],["checkPasswordBtn",""],["aria-hidden","true",1,"bwi","bwi-lg","bwi-fw","bwi-check-circle",3,"hidden"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-fw","bwi-spinner","bwi-spin",3,"hidden","title"],["href","#","appStopClick","",1,"d-block","mr-2","bwi-icon-above-input",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-fw","bwi-generate"],["src","../../images/totp-countdown.png","id","totpImage",1,"ml-2",3,"title"],["class","ml-3",4,"ngIf"],["href","#","appStopClick","","class","badge badge-primary ml-3",3,"click",4,"ngIf"],[1,"ml-3"],["href","#","appStopClick","",1,"badge","badge-primary","ml-3",3,"click"],[1,"d-flex","align-items-center"],[1,"totp-countdown","mr-3","ml-2"],[1,"totp-sec"],["r","12.6","cy","16","cx","16",1,"totp-circle","inner",3,"ngStyle"],["r","14","cy","16","cx","16",1,"totp-circle","outer"],[1,"totp-code","mr-2",3,"title"],["type","button",1,"btn","btn-link",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-clone"],["class","row",4,"ngFor","ngForOf","ngForTrackBy"],[1,"col-7","form-group"],[3,"for"],["type","text","appInputVerbatim","",1,"form-control",3,"id","name","ngModel","disabled","placeholder","ngModelChange"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-share-square"],[1,"col-5","form-group"],["href","https://bitwarden.com/help/uri-match-detection/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],[1,"form-control","overflow-hidden",3,"id","name","ngModel","disabled","ngModelChange","change"],["type","button","class","btn btn-link text-danger ml-2",3,"appA11yTitle","click",4,"ngIf"],["type","button",1,"btn","btn-link","text-danger","ml-2",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-minus-circle","bwi-lg"],["href","#","appStopClick","",1,"d-inline-block","mb-3",3,"click"],["aria-hidden","true",1,"bwi","bwi-plus-circle","bwi-fw"],["for","cardCardholderName"],["id","cardCardholderName","type","text","name","Card.CardCardholderName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","cardBrand"],["id","cardBrand","name","Card.Brand",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","cardNumber"],["id","cardNumber","name","Card.Number","appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"col","form-group"],["for","cardExpMonth"],["id","cardExpMonth","name","Card.ExpMonth",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","cardExpYear"],["id","cardExpYear","type","text","name","Card.ExpYear",1,"form-control",3,"ngModel","placeholder","disabled","ngModelChange"],["for","cardCode"],["id","cardCode","name","Card.Code","appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"col-4","form-group"],["for","idTitle"],["id","idTitle","name","Identity.Title",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idFirstName"],["id","idFirstName","type","text","name","Identity.FirstName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idMiddleName"],["id","idMiddleName","type","text","name","Identity.MiddleName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idLastName"],["id","idLastName","type","text","name","Identity.LastName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idUsername"],["id","idUsername","type","text","name","Identity.Username","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idCompany"],["id","idCompany","type","text","name","Identity.Company",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idSsn"],["id","idSsn","type","text","name","Identity.SSN","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPassportNumber"],["id","idPassportNumber","type","text","name","Identity.PassportNumber","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idLicenseNumber"],["id","idLicenseNumber","type","text","name","Identity.LicenseNumber","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idEmail"],["id","idEmail","type","text","inputmode","email","name","Identity.Email","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPhone"],["id","idPhone","type","text","inputmode","tel","name","Identity.Phone",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idAddress1"],["id","idAddress1","type","text","name","Identity.Address1",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idAddress2"],["id","idAddress2","type","text","name","Identity.Address2",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idAddress3"],["id","idAddress3","type","text","name","Identity.Address3",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idCity"],["id","idCity","type","text","name","Identity.City",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idState"],["id","idState","type","text","name","Identity.State",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPostalCode"],["id","idPostalCode","type","text","name","Identity.PostalCode",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idCountry"],["id","idCountry","type","text","name","Identity.Country",1,"form-control",3,"ngModel","disabled","ngModelChange"],[1,"mt-4"],[1,"col-5"],["for","organizationId"],["id","organizationId","name","OrganizationId",1,"form-control",3,"ngModel","disabled","ngModelChange","change"],["class","form-check",4,"ngFor","ngForOf"],[1,"form-check"],["type","checkbox",1,"form-check-input",3,"ngModel","id","name","disabled","ngModelChange"],[1,"form-check-label",3,"for"],[1,"small","text-muted","mt-4"],[1,"font-weight-semibold"],["href","#","appStopClick","",3,"title","click"],[4,"ngFor","ngForOf"],[1,"generated-wrapper","text-monospace","ml-2"],["type","checkbox","id","passwordPrompt","name","passwordPrompt",1,"form-check-input",3,"ngModel","disabled","change"],["for","passwordPrompt",1,"form-check-label"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/managing-items/#protect-individual-items",3,"appA11yTitle"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[1,"ml-auto"],["type","button","class","btn btn-link",3,"appA11yTitle","click",4,"ngIf"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click",4,"ngIf"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click"],["deleteBtn",""],["aria-hidden","true",1,"bwi","bwi-trash","bwi-lg","bwi-fw",3,"hidden"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-lg","bwi-fw",3,"hidden","title"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",1),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"form",2,3),s.ɵɵlistener("ngSubmit",(function(){return t.submit()})),s.ɵɵtext(6,"\n "),s.ɵɵelementStart(7,"div",4),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"h2",5),s.ɵɵtext(10),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"button",6),s.ɵɵpipe(13,"i18n"),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"span",7),s.ɵɵtext(16,"×"),s.ɵɵelementEnd(),s.ɵɵtext(17,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(19,"\n "),s.ɵɵtemplate(20,ye,48,24,"div",8),s.ɵɵtext(21,"\n "),s.ɵɵelementStart(22,"div",9),s.ɵɵtext(23,"\n "),s.ɵɵtemplate(24,xe,9,7,"button",10),s.ɵɵtext(25,"\n "),s.ɵɵelementStart(26,"button",11),s.ɵɵtext(27),s.ɵɵpipe(28,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(29,"\n "),s.ɵɵtemplate(30,Ce,6,2,"div",12),s.ɵɵtext(31,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(32,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(33,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(34,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(35,"\n")),2&e&&(s.ɵɵadvance(4),s.ɵɵproperty("appApiAction",t.formPromise),s.ɵɵadvance(6),s.ɵɵtextInterpolate(t.title),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(13,7,"close")),s.ɵɵadvance(8),s.ɵɵproperty("ngIf",t.cipher),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",!t.viewOnly),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(28,9,t.viewOnly?"close":"cancel"),"\n "),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",t.cipher&&!t.viewOnly))},directives:[C.NgControlStatusGroup,C.NgForm,I.ApiActionDirective,E.A11yTitleDirective,P.NgIf,C.DefaultValueAccessor,C.RequiredValidator,C.NgControlStatus,C.NgModel,O.AddEditCustomFieldsComponent,k.CalloutComponent,C.SelectControlValueAccessor,A.AutofocusDirective,P.NgForOf,C.NgSelectOption,C.ɵNgSelectMultipleOption,T.InputVerbatimDirective,P.NgClass,M.StopClickDirective,B.PremiumBadgeComponent,P.NgStyle,C.CheckboxControlValueAccessor],pipes:[D.I18nPipe,P.DatePipe],encapsulation:2})},94652:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AttachmentsComponent=void 0;const r=n(93705),o=(n(91674),n(45330),n(85714),n(51554),n(36631),n(73828),n(73569),n(32621)),a=n(45330),s=n(51554),l=n(85714),c=n(73569),d=n(73828),p=n(91674),u=n(36631),m=n(96832),h=n(56820),v=n(57490),f=n(8863),g=n(1142),y=n(99729);function x(e,t){if(1&e&&(o.ɵɵelementStart(0,"small"),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.cipher.name)}}function S(e,t){1&e&&o.ɵɵelement(0,"i",24)}function b(e,t){1&e&&o.ɵɵelement(0,"i",25)}function w(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",26),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"a",27),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"i",28),o.ɵɵpipe(5,"i18n"),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"span",29),o.ɵɵtext(8),o.ɵɵpipe(9,"i18n"),o.ɵɵelementEnd(),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵelementStart(11,"button",30,31),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext().$implicit;return o.ɵɵnextContext(2).reupload(t)})),o.ɵɵtext(13),o.ɵɵpipe(14,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵreference(12),t=o.ɵɵnextContext().$implicit,n=o.ɵɵnextContext(2);o.ɵɵadvance(4),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(5,5,"attachmentFixDesc")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(9,7,"attachmentFixDesc")),o.ɵɵadvance(3),o.ɵɵproperty("appApiAction",n.reuploadPromises[t.id])("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(14,9,"fix"),"\n ")}}function C(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"td",32),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"button",33,34),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext().$implicit;return o.ɵɵnextContext(2).delete(t)})),o.ɵɵpipe(4,"i18n"),o.ɵɵtext(5,"\n "),o.ɵɵelement(6,"i",35),o.ɵɵtext(7,"\n "),o.ɵɵelement(8,"i",36),o.ɵɵpipe(9,"i18n"),o.ɵɵtext(10,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵreference(3),t=o.ɵɵnextContext().$implicit,n=o.ɵɵnextContext(2);o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(4,6,"delete")),o.ɵɵproperty("appApiAction",n.deletePromises[t.id])("disabled",e.loading),o.ɵɵadvance(4),o.ɵɵproperty("hidden",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(9,8,"loading")),o.ɵɵproperty("hidden",!e.loading)}}function I(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td",16),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,S,1,0,"i",17),o.ɵɵtext(5,"\n "),o.ɵɵtemplate(6,b,1,0,"i",18),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"td",19),o.ɵɵtext(10,"\n "),o.ɵɵelementStart(11,"div",20),o.ɵɵtext(12,"\n "),o.ɵɵelementStart(13,"a",21),o.ɵɵlistener("click",(function(){const t=o.ɵɵrestoreView(e).$implicit;return o.ɵɵnextContext(2).download(t)})),o.ɵɵtext(14),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵtemplate(16,w,16,11,"div",22),o.ɵɵtext(17,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementStart(19,"small"),o.ɵɵtext(20),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(22,"\n "),o.ɵɵtemplate(23,C,12,10,"td",23),o.ɵɵtext(24,"\n "),o.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=o.ɵɵnextContext(2);o.ɵɵadvance(4),o.ɵɵproperty("ngIf",!e.downloading),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.downloading),o.ɵɵadvance(8),o.ɵɵtextInterpolate(e.fileName),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",n.showFixOldAttachments(e)),o.ɵɵadvance(4),o.ɵɵtextInterpolate(e.sizeName),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!n.viewOnly)}}function E(e,t){if(1&e&&(o.ɵɵelementStart(0,"table",14),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"tbody"),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,I,25,6,"tr",15),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(4),o.ɵɵproperty("ngForOf",e.cipher.attachments)}}function P(e,t){1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h3"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"label",37),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelement(10,"input",38),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"small",39),o.ɵɵtext(13),o.ɵɵpipe(14,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,3,"newAttachment")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,5,"file")),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(14,7,"maxFileSize")))}function O(e,t){if(1&e&&(o.ɵɵelementStart(0,"button",40),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",41),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span"),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e){o.ɵɵnextContext();const e=o.ɵɵreference(5);o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,3,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,5,"save"))}}class k extends r.AttachmentsComponent{constructor(e,t,n,i,r,o,a){super(e,t,n,r,o,window,a,i),this.viewOnly=!1}reupload(e){return i(this,void 0,void 0,(function*(){this.showFixOldAttachments(e)&&(yield this.reuploadCipherAttachment(e,!1))}))}showFixOldAttachments(e){return null==e.key&&null==this.cipher.organizationId}}t.AttachmentsComponent=k,k.ɵfac=function(e){return new(e||k)(o.ɵɵdirectiveInject(a.CipherService),o.ɵɵdirectiveInject(s.I18nService),o.ɵɵdirectiveInject(l.CryptoService),o.ɵɵdirectiveInject(c.StateService),o.ɵɵdirectiveInject(d.PlatformUtilsService),o.ɵɵdirectiveInject(p.ApiService),o.ɵɵdirectiveInject(u.LogService))},k.ɵcmp=o.ɵɵdefineComponent({type:k,selectors:[["app-vault-attachments"]],features:[o.ɵɵInheritDefinitionFeature],decls:42,vars:14,consts:[["role","dialog","aria-modal","true","aria-labelledby","attachmentsTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","attachmentsTitle",1,"modal-title"],[4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["class","table table-hover table-list",4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"table","table-hover","table-list"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],["class","bwi bwi-fw bwi-lg bwi-file","aria-hidden","true",4,"ngIf"],["class","bwi bwi-spinner bwi-lg bwi-fw bwi-spin","aria-hidden","true",4,"ngIf"],[1,"wrap"],[1,"d-flex"],["href","#","appStopClick","",3,"click"],["class","ml-2",4,"ngIf"],["class","table-list-options",4,"ngIf"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-lg","bwi-file"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-lg","bwi-fw","bwi-spin"],[1,"ml-2"],["href","https://bitwarden.com/help/attachments/#fixing-old-attachments","target","_blank","rel","noopener"],["aria-hidden","true",1,"bwi","bwi-exclamation-triangle","text-warning",3,"title"],[1,"sr-only"],["type","button",1,"btn","btn-outline-primary","btn-sm","m-0","py-0","px-2",3,"appApiAction","disabled","click"],["reuploadBtn",""],[1,"table-list-options"],["type","button","appStopClick","",1,"btn","btn-outline-danger",3,"appA11yTitle","appApiAction","disabled","click"],["deleteBtn",""],["aria-hidden","true",1,"bwi","bwi-trash","bwi-lg","bwi-fw",3,"hidden"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-lg","bwi-fw",3,"hidden","title"],["for","file",1,"sr-only"],["type","file","id","file","name","file","required","",1,"form-control-file"],[1,"form-text","text-muted"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"form",2,3),o.ɵɵlistener("ngSubmit",(function(){return t.submit()})),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"div",4),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"h2",5),o.ɵɵtext(10),o.ɵɵpipe(11,"i18n"),o.ɵɵtemplate(12,x,2,1,"small",6),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"button",7),o.ɵɵpipe(16,"i18n"),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"span",8),o.ɵɵtext(19,"×"),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(22,"\n "),o.ɵɵelementStart(23,"div",9),o.ɵɵtext(24,"\n "),o.ɵɵtemplate(25,E,7,1,"table",10),o.ɵɵtext(26,"\n "),o.ɵɵtemplate(27,P,16,9,"div",6),o.ɵɵtext(28,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n "),o.ɵɵelementStart(30,"div",11),o.ɵɵtext(31,"\n "),o.ɵɵtemplate(32,O,9,7,"button",12),o.ɵɵtext(33,"\n "),o.ɵɵelementStart(34,"button",13),o.ɵɵtext(35),o.ɵɵpipe(36,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(37,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(38,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(39,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(40,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(41,"\n")),2&e&&(o.ɵɵadvance(4),o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(6),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(11,8,"attachments"),"\n "),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.cipher),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(16,10,"close")),o.ɵɵadvance(10),o.ɵɵproperty("ngIf",t.cipher&&t.cipher.hasAttachments),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!t.viewOnly),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",!t.viewOnly),o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(36,12,"close"),"\n "))},directives:[m.NgControlStatusGroup,m.NgForm,h.ApiActionDirective,v.NgIf,f.A11yTitleDirective,v.NgForOf,g.StopClickDirective],pipes:[y.I18nPipe],encapsulation:2})},23582:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BulkActionsComponent=void 0;const r=n(32621),o=(n(64684),n(51554),n(44809),n(73828),n(34453)),a=(n(27957),n(33865)),s=n(63683),l=n(77996),c=n(27838),d=(n(91434),n(32621)),p=n(73828),u=n(51554),m=n(64684),h=n(44809),v=n(8863),f=n(57490),g=n(1142),y=n(99729),x=["bulkDeleteTemplate"],S=["bulkRestoreTemplate"],b=["bulkMoveTemplate"],w=["bulkShareTemplate"];function C(e,t){if(1&e){const e=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"button",9),d.ɵɵlistener("click",(function(){d.ɵɵrestoreView(e);return d.ɵɵnextContext().bulkMove()})),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"i",16),d.ɵɵtext(3),d.ɵɵpipe(4,"i18n"),d.ɵɵelementEnd()}2&e&&(d.ɵɵadvance(3),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(4,1,"moveSelected"),"\n "))}function I(e,t){if(1&e){const e=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"button",9),d.ɵɵlistener("click",(function(){d.ɵɵrestoreView(e);return d.ɵɵnextContext().bulkShare()})),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"i",17),d.ɵɵtext(3),d.ɵɵpipe(4,"i18n"),d.ɵɵelementEnd()}2&e&&(d.ɵɵadvance(3),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(4,1,"moveSelectedToOrg"),"\n "))}function E(e,t){if(1&e){const e=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"button",18),d.ɵɵlistener("click",(function(){d.ɵɵrestoreView(e);return d.ɵɵnextContext().bulkRestore()})),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"i",19),d.ɵɵtext(3),d.ɵɵpipe(4,"i18n"),d.ɵɵelementEnd()}2&e&&(d.ɵɵadvance(3),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(4,1,"restoreSelected"),"\n "))}function P(e,t){}function O(e,t){}function k(e,t){}function A(e,t){}class T{constructor(e,t,n,i){this.platformUtilsService=e,this.i18nService=t,this.modalService=n,this.passwordRepromptService=i}bulkDelete(){return i(this,void 0,void 0,(function*(){if(!(yield this.promptPassword()))return;const e=this.ciphersComponent.getSelectedIds();if(0===e.length)return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("nothingSelected"));const[t]=yield this.modalService.openViewRef(a.BulkDeleteComponent,this.bulkDeleteModalRef,(n=>{n.permanent=this.deleted,n.cipherIds=e,n.organization=this.organization,n.onDeleted.subscribe((()=>i(this,void 0,void 0,(function*(){t.close(),yield this.ciphersComponent.refresh()}))))}))}))}bulkRestore(){return i(this,void 0,void 0,(function*(){if(!(yield this.promptPassword()))return;const e=this.ciphersComponent.getSelectedIds();if(0===e.length)return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("nothingSelected"));const[t]=yield this.modalService.openViewRef(l.BulkRestoreComponent,this.bulkRestoreModalRef,(n=>{n.cipherIds=e,n.onRestored.subscribe((()=>i(this,void 0,void 0,(function*(){t.close(),yield this.ciphersComponent.refresh()}))))}))}))}bulkShare(){return i(this,void 0,void 0,(function*(){if(!(yield this.promptPassword()))return;const e=this.ciphersComponent.getSelected();if(0===e.length)return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("nothingSelected"));const[t]=yield this.modalService.openViewRef(c.BulkShareComponent,this.bulkShareModalRef,(n=>{n.ciphers=e,n.onShared.subscribe((()=>i(this,void 0,void 0,(function*(){t.close(),yield this.ciphersComponent.refresh()}))))}))}))}bulkMove(){return i(this,void 0,void 0,(function*(){if(!(yield this.promptPassword()))return;const e=this.ciphersComponent.getSelectedIds();if(0===e.length)return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("nothingSelected"));const[t]=yield this.modalService.openViewRef(s.BulkMoveComponent,this.bulkMoveModalRef,(n=>{n.cipherIds=e,n.onMoved.subscribe((()=>i(this,void 0,void 0,(function*(){t.close(),yield this.ciphersComponent.refresh()}))))}))}))}selectAll(e){this.ciphersComponent.selectAll(e)}promptPassword(){return i(this,void 0,void 0,(function*(){return!this.ciphersComponent.getSelected().find((e=>e.reprompt!==o.CipherRepromptType.None))||(yield this.passwordRepromptService.showPasswordPrompt())}))}}t.BulkActionsComponent=T,T.ɵfac=function(e){return new(e||T)(d.ɵɵdirectiveInject(p.PlatformUtilsService),d.ɵɵdirectiveInject(u.I18nService),d.ɵɵdirectiveInject(m.ModalService),d.ɵɵdirectiveInject(h.PasswordRepromptService))},T.ɵcmp=d.ɵɵdefineComponent({type:T,selectors:[["app-vault-bulk-actions"]],viewQuery:function(e,t){if(1&e&&(d.ɵɵviewQuery(x,7,r.ViewContainerRef),d.ɵɵviewQuery(S,7,r.ViewContainerRef),d.ɵɵviewQuery(b,7,r.ViewContainerRef),d.ɵɵviewQuery(w,7,r.ViewContainerRef)),2&e){let e;d.ɵɵqueryRefresh(e=d.ɵɵloadQuery())&&(t.bulkDeleteModalRef=e.first),d.ɵɵqueryRefresh(e=d.ɵɵloadQuery())&&(t.bulkRestoreModalRef=e.first),d.ɵɵqueryRefresh(e=d.ɵɵloadQuery())&&(t.bulkMoveModalRef=e.first),d.ɵɵqueryRefresh(e=d.ɵɵloadQuery())&&(t.bulkShareModalRef=e.first)}},inputs:{ciphersComponent:"ciphersComponent",deleted:"deleted",organization:"organization"},decls:50,vars:15,consts:[["appListDropdown","",1,"dropdown","mr-2"],["type","button","id","bulkActionsButton","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-sm","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-cog"],["aria-labelledby","bulkActionsButton",1,"dropdown-menu","dropdown-menu-right"],["class","dropdown-item","appStopClick","",3,"click",4,"ngIf"],["class","dropdown-item",3,"click",4,"ngIf"],[1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-trash"],[1,"dropdown-divider"],["appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-check-square"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-minus-square"],["bulkDeleteTemplate",""],["bulkRestoreTemplate",""],["bulkMoveTemplate",""],["bulkShareTemplate",""],["aria-hidden","true",1,"bwi","bwi-fw","bwi-folder"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-arrow-circle-right"],[1,"dropdown-item",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-undo"]],template:function(e,t){1&e&&(d.ɵɵelementStart(0,"div",0),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"button",1),d.ɵɵpipe(3,"i18n"),d.ɵɵtext(4,"\n "),d.ɵɵelement(5,"i",2),d.ɵɵtext(6,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(7,"\n "),d.ɵɵelementStart(8,"div",3),d.ɵɵtext(9,"\n "),d.ɵɵtemplate(10,C,5,3,"button",4),d.ɵɵtext(11,"\n "),d.ɵɵtemplate(12,I,5,3,"button",4),d.ɵɵtext(13,"\n "),d.ɵɵtemplate(14,E,5,3,"button",5),d.ɵɵtext(15,"\n "),d.ɵɵelementStart(16,"button",6),d.ɵɵlistener("click",(function(){return t.bulkDelete()})),d.ɵɵtext(17,"\n "),d.ɵɵelement(18,"i",7),d.ɵɵtext(19),d.ɵɵpipe(20,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(21,"\n "),d.ɵɵelement(22,"div",8),d.ɵɵtext(23,"\n "),d.ɵɵelementStart(24,"button",9),d.ɵɵlistener("click",(function(){return t.selectAll(!0)})),d.ɵɵtext(25,"\n "),d.ɵɵelement(26,"i",10),d.ɵɵtext(27),d.ɵɵpipe(28,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(29,"\n "),d.ɵɵelementStart(30,"button",9),d.ɵɵlistener("click",(function(){return t.selectAll(!1)})),d.ɵɵtext(31,"\n "),d.ɵɵelement(32,"i",11),d.ɵɵtext(33),d.ɵɵpipe(34,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(35,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(36,"\n"),d.ɵɵelementEnd(),d.ɵɵtext(37,"\n\n"),d.ɵɵtemplate(38,P,0,0,"ng-template",null,12,d.ɵɵtemplateRefExtractor),d.ɵɵtext(40,"\n"),d.ɵɵtemplate(41,O,0,0,"ng-template",null,13,d.ɵɵtemplateRefExtractor),d.ɵɵtext(43,"\n"),d.ɵɵtemplate(44,k,0,0,"ng-template",null,14,d.ɵɵtemplateRefExtractor),d.ɵɵtext(46,"\n"),d.ɵɵtemplate(47,A,0,0,"ng-template",null,15,d.ɵɵtemplateRefExtractor),d.ɵɵtext(49,"\n")),2&e&&(d.ɵɵadvance(2),d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(3,7,"options")),d.ɵɵadvance(8),d.ɵɵproperty("ngIf",!t.deleted&&!t.organization),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",!t.deleted&&!t.organization),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",t.deleted&&!t.organization),d.ɵɵadvance(5),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(20,9,t.deleted?"permanentlyDeleteSelected":"deleteSelected"),"\n "),d.ɵɵadvance(8),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(28,11,"selectAll"),"\n "),d.ɵɵadvance(6),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(34,13,"unselectAll"),"\n "))},directives:[v.A11yTitleDirective,f.NgIf,g.StopClickDirective],pipes:[y.I18nPipe],encapsulation:2})},33865:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BulkDeleteComponent=void 0;const r=n(32621),o=(n(91674),n(45330),n(51554),n(73828),n(27957),n(82890)),a=n(32621),s=n(45330),l=n(73828),c=n(51554),d=n(91674),p=n(96832),u=n(56820),m=n(8863),h=n(99729);class v{constructor(e,t,n,i){this.cipherService=e,this.platformUtilsService=t,this.i18nService=n,this.apiService=i,this.cipherIds=[],this.permanent=!1,this.onDeleted=new r.EventEmitter}submit(){return i(this,void 0,void 0,(function*(){this.organization&&this.organization.canEditAnyCollection?yield this.deleteCiphersAdmin():yield this.deleteCiphers(),yield this.formPromise,this.onDeleted.emit(),this.platformUtilsService.showToast("success",null,this.i18nService.t(this.permanent?"permanentlyDeletedItems":"deletedItems"))}))}deleteCiphers(){return i(this,void 0,void 0,(function*(){this.permanent?this.formPromise=yield this.cipherService.deleteManyWithServer(this.cipherIds):this.formPromise=yield this.cipherService.softDeleteManyWithServer(this.cipherIds)}))}deleteCiphersAdmin(){return i(this,void 0,void 0,(function*(){const e=new o.CipherBulkDeleteRequest(this.cipherIds,this.organization.id);this.permanent?this.formPromise=yield this.apiService.deleteManyCiphersAdmin(e):this.formPromise=yield this.apiService.putDeleteManyCiphersAdmin(e)}))}}t.BulkDeleteComponent=v,v.ɵfac=function(e){return new(e||v)(a.ɵɵdirectiveInject(s.CipherService),a.ɵɵdirectiveInject(l.PlatformUtilsService),a.ɵɵdirectiveInject(c.I18nService),a.ɵɵdirectiveInject(d.ApiService))},v.ɵcmp=a.ɵɵdefineComponent({type:v,selectors:[["app-vault-bulk-delete"]],inputs:{cipherIds:"cipherIds",permanent:"permanent",organization:"organization"},outputs:{onDeleted:"onDeleted"},decls:45,vars:21,consts:[["role","dialog","aria-modal","true","aria-labelledby","deleteSelectedTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-sm"],[1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","deleteSelectedTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],[1,"modal-footer"],["appAutoFocus","","type","submit",1,"btn","btn-danger","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"]],template:function(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",1),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"form",2,3),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"div",4),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"h2",5),a.ɵɵtext(10),a.ɵɵpipe(11,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n "),a.ɵɵelementStart(13,"button",6),a.ɵɵpipe(14,"i18n"),a.ɵɵtext(15,"\n "),a.ɵɵelementStart(16,"span",7),a.ɵɵtext(17,"×"),a.ɵɵelementEnd(),a.ɵɵtext(18,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(19,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(20,"\n "),a.ɵɵelementStart(21,"div",8),a.ɵɵtext(22),a.ɵɵpipe(23,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(24,"\n "),a.ɵɵelementStart(25,"div",9),a.ɵɵtext(26,"\n "),a.ɵɵelementStart(27,"button",10),a.ɵɵtext(28,"\n "),a.ɵɵelement(29,"i",11),a.ɵɵpipe(30,"i18n"),a.ɵɵtext(31,"\n "),a.ɵɵelementStart(32,"span"),a.ɵɵtext(33),a.ɵɵpipe(34,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(35,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(36,"\n "),a.ɵɵelementStart(37,"button",12),a.ɵɵtext(38),a.ɵɵpipe(39,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(40,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(41,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(42,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(43,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(44,"\n")),2&e){const e=a.ɵɵreference(5);a.ɵɵadvance(4),a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(6),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(11,8,t.permanent?"permanentlyDeleteSelected":"deleteSelected"),"\n "),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(14,10,"close")),a.ɵɵadvance(9),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind2(23,12,t.permanent?"permanentlyDeleteSelectedItemsDesc":"deleteSelectedItemsDesc",t.cipherIds.length),"\n "),a.ɵɵadvance(5),a.ɵɵproperty("disabled",e.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(30,15,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(34,17,t.permanent?"permanentlyDelete":"delete")),a.ɵɵadvance(5),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(39,19,"cancel"),"\n ")}},directives:[p.ɵNgNoValidate,p.NgControlStatusGroup,p.NgForm,u.ApiActionDirective,m.A11yTitleDirective],pipes:[h.I18nPipe],encapsulation:2})},63683:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BulkMoveComponent=void 0;const r=n(32621),o=(n(45330),n(88308),n(51554),n(73828),n(32621)),a=n(45330),s=n(73828),l=n(51554),c=n(88308),d=n(96832),p=n(56820),u=n(8863),m=n(57490),h=n(99729);function v(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",17),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.id),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}class f{constructor(e,t,n,i){this.cipherService=e,this.platformUtilsService=t,this.i18nService=n,this.folderService=i,this.cipherIds=[],this.onMoved=new r.EventEmitter,this.folderId=null,this.folders=[]}ngOnInit(){return i(this,void 0,void 0,(function*(){this.folders=yield this.folderService.getAllDecrypted(),this.folderId=this.folders[0].id}))}submit(){return i(this,void 0,void 0,(function*(){this.formPromise=this.cipherService.moveManyWithServer(this.cipherIds,this.folderId),yield this.formPromise,this.onMoved.emit(),this.platformUtilsService.showToast("success",null,this.i18nService.t("movedItems"))}))}}t.BulkMoveComponent=f,f.ɵfac=function(e){return new(e||f)(o.ɵɵdirectiveInject(a.CipherService),o.ɵɵdirectiveInject(s.PlatformUtilsService),o.ɵɵdirectiveInject(l.I18nService),o.ɵɵdirectiveInject(c.FolderService))},f.ɵcmp=o.ɵɵdefineComponent({type:f,selectors:[["app-vault-bulk-move"]],inputs:{cipherIds:"cipherIds"},outputs:{onMoved:"onMoved"},decls:60,vars:26,consts:[["role","dialog","aria-modal","true","aria-labelledby","moveSelectedTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-sm"],[1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","moveSelectedTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],[1,"form-group"],["for","folder"],["id","folder","name","FolderId",1,"form-control",3,"ngModel","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[3,"ngValue"]],template:function(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"form",2,3),o.ɵɵlistener("ngSubmit",(function(){return t.submit()})),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"div",4),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"h2",5),o.ɵɵtext(10),o.ɵɵpipe(11,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementStart(13,"button",6),o.ɵɵpipe(14,"i18n"),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"span",7),o.ɵɵtext(17,"×"),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"div",8),o.ɵɵtext(22,"\n "),o.ɵɵelementStart(23,"p"),o.ɵɵtext(24),o.ɵɵpipe(25,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementStart(27,"div",9),o.ɵɵtext(28,"\n "),o.ɵɵelementStart(29,"label",10),o.ɵɵtext(30),o.ɵɵpipe(31,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(32,"\n "),o.ɵɵelementStart(33,"select",11),o.ɵɵlistener("ngModelChange",(function(e){return t.folderId=e})),o.ɵɵtext(34,"\n "),o.ɵɵtemplate(35,v,2,2,"option",12),o.ɵɵtext(36,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(37,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(38,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(39,"\n "),o.ɵɵelementStart(40,"div",13),o.ɵɵtext(41,"\n "),o.ɵɵelementStart(42,"button",14),o.ɵɵtext(43,"\n "),o.ɵɵelement(44,"i",15),o.ɵɵpipe(45,"i18n"),o.ɵɵtext(46,"\n "),o.ɵɵelementStart(47,"span"),o.ɵɵtext(48),o.ɵɵpipe(49,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(50,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(51,"\n "),o.ɵɵelementStart(52,"button",16),o.ɵɵtext(53),o.ɵɵpipe(54,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(55,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(56,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(57,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(58,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(59,"\n")),2&e){const e=o.ɵɵreference(5);o.ɵɵadvance(4),o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(6),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(11,11,"moveSelected"),"\n "),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(14,13,"close")),o.ɵɵadvance(11),o.ɵɵtextInterpolate(o.ɵɵpipeBind2(25,15,"moveSelectedItemsDesc",t.cipherIds.length)),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(31,18,"folder")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",t.folderId),o.ɵɵadvance(2),o.ɵɵproperty("ngForOf",t.folders),o.ɵɵadvance(7),o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(45,20,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(49,22,"save")),o.ɵɵadvance(5),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(54,24,"cancel"),"\n ")}},directives:[d.ɵNgNoValidate,d.NgControlStatusGroup,d.NgForm,p.ApiActionDirective,u.A11yTitleDirective,d.SelectControlValueAccessor,d.NgControlStatus,d.NgModel,m.NgForOf,d.NgSelectOption,d.ɵNgSelectMultipleOption],pipes:[h.I18nPipe],encapsulation:2})},77996:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BulkRestoreComponent=void 0;const r=n(32621),o=(n(45330),n(51554),n(73828),n(32621)),a=n(45330),s=n(73828),l=n(51554),c=n(96832),d=n(56820),p=n(8863),u=n(99729);class m{constructor(e,t,n){this.cipherService=e,this.platformUtilsService=t,this.i18nService=n,this.cipherIds=[],this.onRestored=new r.EventEmitter}submit(){return i(this,void 0,void 0,(function*(){this.formPromise=this.cipherService.restoreManyWithServer(this.cipherIds),yield this.formPromise,this.onRestored.emit(),this.platformUtilsService.showToast("success",null,this.i18nService.t("restoredItems"))}))}}t.BulkRestoreComponent=m,m.ɵfac=function(e){return new(e||m)(o.ɵɵdirectiveInject(a.CipherService),o.ɵɵdirectiveInject(s.PlatformUtilsService),o.ɵɵdirectiveInject(l.I18nService))},m.ɵcmp=o.ɵɵdefineComponent({type:m,selectors:[["app-vault-bulk-restore"]],inputs:{cipherIds:"cipherIds"},outputs:{onRestored:"onRestored"},decls:45,vars:21,consts:[["role","dialog","aria-modal","true","aria-labelledby","restoreSelectedTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-sm"],[1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","restoreSelectedTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],[1,"modal-footer"],["appAutoFocus","","type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"]],template:function(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"form",2,3),o.ɵɵlistener("ngSubmit",(function(){return t.submit()})),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"div",4),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"h2",5),o.ɵɵtext(10),o.ɵɵpipe(11,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementStart(13,"button",6),o.ɵɵpipe(14,"i18n"),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"span",7),o.ɵɵtext(17,"×"),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"div",8),o.ɵɵtext(22),o.ɵɵpipe(23,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵelementStart(25,"div",9),o.ɵɵtext(26,"\n "),o.ɵɵelementStart(27,"button",10),o.ɵɵtext(28,"\n "),o.ɵɵelement(29,"i",11),o.ɵɵpipe(30,"i18n"),o.ɵɵtext(31,"\n "),o.ɵɵelementStart(32,"span"),o.ɵɵtext(33),o.ɵɵpipe(34,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(35,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(36,"\n "),o.ɵɵelementStart(37,"button",12),o.ɵɵtext(38),o.ɵɵpipe(39,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(40,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(41,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(42,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(43,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(44,"\n")),2&e){const e=o.ɵɵreference(5);o.ɵɵadvance(4),o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(6),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(11,8,"restoreSelected"),"\n "),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(14,10,"close")),o.ɵɵadvance(9),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind2(23,12,"restoreSelectedItemsDesc",t.cipherIds.length),"\n "),o.ɵɵadvance(5),o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(30,15,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(34,17,"restore")),o.ɵɵadvance(5),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(39,19,"cancel"),"\n ")}},directives:[c.ɵNgNoValidate,c.NgControlStatusGroup,c.NgForm,d.ApiActionDirective,p.A11yTitleDirective],pipes:[u.I18nPipe],encapsulation:2})},27838:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BulkShareComponent=void 0;const r=n(32621),o=(n(45330),n(3174),n(51554),n(36631),n(63513),n(73828),n(32621)),a=n(45330),s=n(73828),l=n(51554),c=n(3174),d=n(63513),p=n(36631),u=n(96832),m=n(56820),h=n(8863),v=n(57490),f=n(39159),g=n(99729);function y(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",21),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.id),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}function x(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",22),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"button",23),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext().selectAll(!0)})),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"button",23),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext().selectAll(!1)})),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd()}2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,2,"selectAll"),"\n "),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(8,4,"unselectAll"),"\n "))}function S(e,t){1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"noCollectionsInList"),"\n "))}function b(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"tr",26),o.ɵɵlistener("click",(function(){const t=o.ɵɵrestoreView(e).$implicit;return o.ɵɵnextContext(2).check(t)})),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td",27),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"input",28),o.ɵɵlistener("ngModelChange",(function(t){return o.ɵɵrestoreView(e).$implicit.checked=t})),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"td"),o.ɵɵtext(8),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=t.index;o.ɵɵadvance(4),o.ɵɵpropertyInterpolate1("name","Collection[",n,"].Checked"),o.ɵɵproperty("ngModel",e.checked),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function w(e,t){if(1&e&&(o.ɵɵelementStart(0,"table",24),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"tbody"),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,b,10,3,"tr",25),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(4),o.ɵɵproperty("ngForOf",e.collections)}}const C=function(e){return{loading:e}};class I{constructor(e,t,n,i,o,a){this.cipherService=e,this.platformUtilsService=t,this.i18nService=n,this.collectionService=i,this.organizationService=o,this.logService=a,this.ciphers=[],this.onShared=new r.EventEmitter,this.nonShareableCount=0,this.collections=[],this.organizations=[],this.shareableCiphers=[],this.writeableCollections=[]}ngOnInit(){return i(this,void 0,void 0,(function*(){this.shareableCiphers=this.ciphers.filter((e=>!e.hasOldAttachments&&null==e.organizationId)),this.nonShareableCount=this.ciphers.length-this.shareableCiphers.length;const e=yield this.collectionService.getAllDecrypted();this.writeableCollections=e.filter((e=>!e.readOnly)),this.organizations=yield this.organizationService.getAll(),null==this.organizationId&&this.organizations.length>0&&(this.organizationId=this.organizations[0].id),this.filterCollections()}))}ngOnDestroy(){this.selectAll(!1)}filterCollections(){this.selectAll(!1),null==this.organizationId||0===this.writeableCollections.length?this.collections=[]:this.collections=this.writeableCollections.filter((e=>e.organizationId===this.organizationId))}submit(){var e,t;return i(this,void 0,void 0,(function*(){const n=this.collections.filter((e=>e.checked)).map((e=>e.id));try{this.formPromise=this.cipherService.shareManyWithServer(this.shareableCiphers,this.organizationId,n),yield this.formPromise,this.onShared.emit();const i=null!==(t=null===(e=this.organizations.find((e=>e.id===this.organizationId)))||void 0===e?void 0:e.name)&&void 0!==t?t:this.i18nService.t("organization");this.platformUtilsService.showToast("success",null,this.i18nService.t("movedItemsToOrg",i))}catch(i){this.logService.error(i)}}))}check(e,t){e.checked=null==t?!e.checked:t}selectAll(e){(e?this.collections:this.writeableCollections).forEach((t=>this.check(t,e)))}get canSave(){if(null!=this.shareableCiphers&&this.shareableCiphers.length>0&&null!=this.collections)for(let e=0;e0&&!i.organization),c.ɵɵadvance(4),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(31,21,"options")),c.ɵɵproperty("bitMenuTriggerFor",n),c.ɵɵadvance(9),c.ɵɵproperty("ngIf",e.type===i.cipherType.Login&&!e.isDeleted),c.ɵɵadvance(5),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(45,23,"attachments"),"\n "),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",(!i.organization&&!e.organizationId||i.organization)&&!e.isDeleted),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!i.organization&&!e.organizationId&&!e.isDeleted),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.organizationId&&!e.isDeleted),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.organizationId&&i.accessEvents),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.isDeleted),c.ɵɵadvance(7),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(63,25,e.isDeleted?"permanentlyDelete":"delete"),"\n ")}}function Y(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"table",3),c.ɵɵlistener("scrolled",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).loadMore()})),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"tbody"),c.ɵɵtext(3,"\n "),c.ɵɵtemplate(4,$,68,30,"tr",4),c.ɵɵtext(5,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(6,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵnextContext().ngIf,t=c.ɵɵnextContext();c.ɵɵproperty("infiniteScrollDistance",1)("infiniteScrollDisabled",!t.isPaging()),c.ɵɵadvance(4),c.ɵɵproperty("ngForOf",e)}}function Q(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",35),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",23),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"loading")))}function J(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"button",37),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(4).addCipher()})),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",38),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("",c.ɵɵpipeBind1(4,1,"addItem"),"\n "))}function Z(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"p"),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵtemplate(6,J,5,3,"button",36),c.ɵɵtext(7,"\n "),c.ɵɵelementContainerEnd()),2&e){const e=c.ɵɵnextContext(3);c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(4,2,"noItemsInList")),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",e.showAddNew)}}function X(e,t){if(1&e&&(c.ɵɵelementStart(0,"div",34),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,Q,9,6,"ng-container",0),c.ɵɵtext(3,"\n "),c.ɵɵtemplate(4,Z,8,4,"ng-container",0),c.ɵɵtext(5,"\n "),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!e.loaded),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.loaded)}}function ee(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,Y,7,3,"table",1),c.ɵɵtext(3,"\n "),c.ɵɵtemplate(4,X,6,2,"div",2),c.ɵɵtext(5,"\n"),c.ɵɵelementContainerEnd()),2&e){const e=t.ngIf;c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.length),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!e.length)}}class te extends o.CiphersComponent{constructor(e,t,n,i,o,a,l,c,d,p,u){super(e),this.i18nService=t,this.platformUtilsService=n,this.cipherService=i,this.eventService=o,this.totpService=a,this.stateService=l,this.passwordRepromptService=c,this.logService=d,this.organizationService=p,this.tokenService=u,this.showAddNew=!0,this.onAttachmentsClicked=new r.EventEmitter,this.onShareClicked=new r.EventEmitter,this.onCollectionsClicked=new r.EventEmitter,this.onCloneClicked=new r.EventEmitter,this.onOrganzationBadgeClicked=new r.EventEmitter,this.pagedCiphers=[],this.pageSize=200,this.cipherType=s.CipherType,this.userHasPremiumAccess=!1,this.organizations=[],this.didScroll=!1,this.pagedCiphersCount=0,this.refreshing=!1}ngOnDestroy(){this.selectAll(!1)}load(e=null,t=!1){const n=Object.create(null,{load:{get:()=>super.load}});return i(this,void 0,void 0,(function*(){yield n.load.call(this,e,t),this.profileName=yield this.tokenService.getName(),this.organizations=yield this.organizationService.getAll(),this.userHasPremiumAccess=yield this.stateService.getCanAccessPremium()}))}loadMore(){if(this.ciphers.length<=this.pageSize)return;const e=this.pagedCiphers.length;let t=this.pageSize;this.refreshing&&0===e&&this.pagedCiphersCount>this.pageSize&&(t=this.pagedCiphersCount),this.ciphers.length>e&&(this.pagedCiphers=this.pagedCiphers.concat(this.ciphers.slice(e,e+t))),this.pagedCiphersCount=this.pagedCiphers.length,this.didScroll=this.pagedCiphers.length>this.pageSize}refresh(){return i(this,void 0,void 0,(function*(){try{this.refreshing=!0,yield this.reload(this.filter,this.deleted)}finally{this.refreshing=!1}}))}isPaging(){const e=this.isSearching();return e&&this.didScroll&&this.resetPaging(),!e&&this.ciphers.length>this.pageSize}resetPaging(){return i(this,void 0,void 0,(function*(){this.pagedCiphers=[],this.loadMore()}))}doSearch(e){return i(this,void 0,void 0,(function*(){this.ciphers=yield this.searchService.searchCiphers(this.searchText,[this.filter,this.deletedFilter],e),this.resetPaging()}))}launch(e){this.platformUtilsService.launchUri(e)}attachments(e){return i(this,void 0,void 0,(function*(){(yield this.repromptCipher(e))&&this.onAttachmentsClicked.emit(e)}))}share(e){return i(this,void 0,void 0,(function*(){(yield this.repromptCipher(e))&&this.onShareClicked.emit(e)}))}collections(e){this.onCollectionsClicked.emit(e)}clone(e){return i(this,void 0,void 0,(function*(){(yield this.repromptCipher(e))&&this.onCloneClicked.emit(e)}))}delete(e){return i(this,void 0,void 0,(function*(){if(!(yield this.repromptCipher(e)))return;if(null!=this.actionPromise)return;const t=e.isDeleted;if(!(yield this.platformUtilsService.showDialog(this.i18nService.t(t?"permanentlyDeleteItemConfirmation":"deleteItemConfirmation"),this.i18nService.t(t?"permanentlyDeleteItem":"deleteItem"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{this.actionPromise=this.deleteCipher(e.id,t),yield this.actionPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t(t?"permanentlyDeletedItem":"deletedItem")),this.refresh()}catch(n){this.logService.error(n)}this.actionPromise=null}))}restore(e){return i(this,void 0,void 0,(function*(){if(null!=this.actionPromise||!e.isDeleted)return;if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("restoreItemConfirmation"),this.i18nService.t("restoreItem"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{this.actionPromise=this.cipherService.restoreWithServer(e.id),yield this.actionPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("restoredItem")),this.refresh()}catch(t){this.logService.error(t)}this.actionPromise=null}))}copy(e,t,n,r){return i(this,void 0,void 0,(function*(){this.passwordRepromptService.protectedFields().includes(r)&&!(yield this.repromptCipher(e))||null==t||"TOTP"===r&&!this.displayTotpCopyButton(e)||(t===e.login.totp&&(t=yield this.totpService.getCode(t)),e.viewPassword&&(this.platformUtilsService.copyToClipboard(t,{window}),this.platformUtilsService.showToast("info",null,this.i18nService.t("valueCopied",this.i18nService.t(n))),"password"===n||"verificationCodeTotp"===n?this.eventService.collect(l.EventType.Cipher_ClientToggledHiddenFieldVisible,e.id):"securityCode"===n&&this.eventService.collect(l.EventType.Cipher_ClientCopiedCardCode,e.id)))}))}selectAll(e){e&&this.selectAll(!1);const t=e&&this.ciphers.length>500?500:this.ciphers.length;for(let n=0;n!!e.checked))}getSelectedIds(){return this.getSelected().map((e=>e.id))}displayTotpCopyButton(e){var t,n;return null!==(n=null===(t=null==e?void 0:e.login)||void 0===t?void 0:t.hasTotp)&&void 0!==n&&n&&(e.organizationUseTotp||this.userHasPremiumAccess)}selectCipher(e){const t=Object.create(null,{selectCipher:{get:()=>super.selectCipher}});return i(this,void 0,void 0,(function*(){(yield this.repromptCipher(e))&&t.selectCipher.call(this,e)}))}onOrganizationClicked(e){this.onOrganzationBadgeClicked.emit(e)}deleteCipher(e,t){return t?this.cipherService.deleteWithServer(e):this.cipherService.softDeleteWithServer(e)}showFixOldAttachments(e){return e.hasOldAttachments&&null==e.organizationId}repromptCipher(e){return i(this,void 0,void 0,(function*(){return e.reprompt===a.CipherRepromptType.None||(yield this.passwordRepromptService.showPasswordPrompt())}))}}t.CiphersComponent=te,te.ɵfac=function(e){return new(e||te)(c.ɵɵdirectiveInject(d.SearchService),c.ɵɵdirectiveInject(p.I18nService),c.ɵɵdirectiveInject(u.PlatformUtilsService),c.ɵɵdirectiveInject(m.CipherService),c.ɵɵdirectiveInject(h.EventService),c.ɵɵdirectiveInject(v.TotpService),c.ɵɵdirectiveInject(f.StateService),c.ɵɵdirectiveInject(g.PasswordRepromptService),c.ɵɵdirectiveInject(y.LogService),c.ɵɵdirectiveInject(x.OrganizationService),c.ɵɵdirectiveInject(S.TokenService))},te.ɵcmp=c.ɵɵdefineComponent({type:te,selectors:[["app-vault-ciphers"]],inputs:{showAddNew:"showAddNew"},outputs:{onAttachmentsClicked:"onAttachmentsClicked",onShareClicked:"onShareClicked",onCollectionsClicked:"onCollectionsClicked",onCloneClicked:"onCloneClicked",onOrganzationBadgeClicked:"onOrganzationBadgeClicked"},features:[c.ɵɵInheritDefinitionFeature],decls:2,vars:1,consts:[[4,"ngIf"],["class","table table-hover table-list table-ciphers","infiniteScroll","",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled",4,"ngIf"],["class","no-items",4,"ngIf"],["infiniteScroll","",1,"table","table-hover","table-list","table-ciphers",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled"],[4,"ngFor","ngForOf"],[1,"table-list-checkbox",3,"click"],["type","checkbox","appStopProp","",3,"ngModel","ngModelChange"],[1,"table-list-icon",3,"click"],[3,"cipher"],[1,"reduced-lh","wrap",3,"click"],["appStopProp","","queryParamsHandling","merge",3,"routerLink","queryParams","title"],["appStopProp",""],["class","tw-w-28",4,"ngIf"],[1,"table-list-options"],["type","button",1,"tw-border-none","tw-bg-transparent","tw-text-main",3,"bitMenuTriggerFor","appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-ellipsis-v","bwi-lg"],["cipherOptions",""],["bit-menu-item","",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-paperclip"],["bit-menu-item","",3,"click",4,"ngIf"],[1,"tw-text-danger"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-trash"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-paperclip",3,"title"],[1,"sr-only"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-exclamation-triangle","text-warning",3,"title"],[1,"tw-w-28"],[3,"organizationName","profileName","onOrganizationClicked"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-clone"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-share-square"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-files"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-arrow-circle-right"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-collection"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-file-text"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-undo"],[1,"no-items"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],["class","btn btn-outline-primary",3,"click",4,"ngIf"],[1,"btn","btn-outline-primary",3,"click"],[1,"bwi","bwi-plus","bwi-fw"]],template:function(e,t){1&e&&(c.ɵɵtemplate(0,ee,6,2,"ng-container",0),c.ɵɵtext(1,"\n")),2&e&&c.ɵɵproperty("ngIf",t.isPaging()?t.pagedCiphers:t.ciphers)},directives:[b.NgIf,w.InfiniteScrollDirective,b.NgForOf,C.CheckboxControlValueAccessor,I.StopPropDirective,C.NgControlStatus,C.NgModel,E.IconComponent,P.RouterLinkWithHref,O.MenuTriggerForDirective,k.A11yTitleDirective,A.MenuComponent,T.MenuItemComponent,M.OrganizationNameBadgeComponent],pipes:[B.I18nPipe,D.GetOrgNameFromIdPipe],encapsulation:2})},86305:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionsComponent=void 0;const i=n(84415),r=(n(45330),n(3174),n(51554),n(36631),n(73828),n(32621)),o=n(3174),a=n(73828),s=n(51554),l=n(45330),c=n(36631),d=n(96832),p=n(56820),u=n(57490),m=n(8863),h=n(39159),v=n(99729);function f(e,t){if(1&e&&(r.ɵɵelementStart(0,"small"),r.ɵɵtext(1),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(1),r.ɵɵtextInterpolate(e.cipher.name)}}function g(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"div",17),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"button",18),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext().selectAll(!0)})),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"button",18),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext().selectAll(!1)})),r.ɵɵtext(7),r.ɵɵpipe(8,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementEnd()}2&e&&(r.ɵɵadvance(3),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(4,2,"selectAll"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(8,4,"unselectAll"),"\n "))}function y(e,t){1&e&&(r.ɵɵelementStart(0,"div"),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"noCollectionsInList"),"\n "))}function x(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"tr",21),r.ɵɵlistener("click",(function(){const t=r.ɵɵrestoreView(e).$implicit;return r.ɵɵnextContext(2).check(t)})),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"td",22),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"input",23),r.ɵɵlistener("ngModelChange",(function(t){return r.ɵɵrestoreView(e).$implicit.checked=t})),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"td"),r.ɵɵtext(8),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=t.index;r.ɵɵadvance(4),r.ɵɵpropertyInterpolate1("name","Collection[",n,"].Checked"),r.ɵɵproperty("ngModel",e.checked),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function S(e,t){if(1&e&&(r.ɵɵelementStart(0,"table",19),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"tbody"),r.ɵɵtext(3,"\n "),r.ɵɵtemplate(4,x,10,3,"tr",20),r.ɵɵtext(5,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(6,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(4),r.ɵɵproperty("ngForOf",e.collections)}}class b extends i.CollectionsComponent{constructor(e,t,n,i,r){super(e,t,n,i,r)}ngOnDestroy(){this.selectAll(!1)}check(e,t){e.checked=null==t?!e.checked:t}selectAll(e){this.collections.forEach((t=>this.check(t,e)))}}t.CollectionsComponent=b,b.ɵfac=function(e){return new(e||b)(r.ɵɵdirectiveInject(o.CollectionService),r.ɵɵdirectiveInject(a.PlatformUtilsService),r.ɵɵdirectiveInject(s.I18nService),r.ɵɵdirectiveInject(l.CipherService),r.ɵɵdirectiveInject(c.LogService))},b.ɵcmp=r.ɵɵdefineComponent({type:b,selectors:[["app-vault-collections"]],features:[r.ɵɵInheritDefinitionFeature],decls:63,vars:27,consts:[["role","dialog","aria-modal","true","aria-labelledby","collectionsTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],[1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","collectionsTitle",1,"modal-title"],[4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],[1,"d-flex"],["class","ml-auto d-flex",4,"ngIf"],["class","table table-hover table-list mb-0",4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"ml-auto","d-flex"],["type","button",1,"btn","btn-link","btn-sm","py-0",3,"click"],[1,"table","table-hover","table-list","mb-0"],[3,"click",4,"ngFor","ngForOf"],[3,"click"],[1,"table-list-checkbox"],["type","checkbox","appStopProp","",3,"ngModel","name","ngModelChange"]],template:function(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"form",2,3),r.ɵɵlistener("ngSubmit",(function(){return t.submit()})),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"div",4),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"h2",5),r.ɵɵtext(10),r.ɵɵpipe(11,"i18n"),r.ɵɵtemplate(12,f,2,1,"small",6),r.ɵɵtext(13,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(14,"\n "),r.ɵɵelementStart(15,"button",7),r.ɵɵpipe(16,"i18n"),r.ɵɵtext(17,"\n "),r.ɵɵelementStart(18,"span",8),r.ɵɵtext(19,"×"),r.ɵɵelementEnd(),r.ɵɵtext(20,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(21,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(22,"\n "),r.ɵɵelementStart(23,"div",9),r.ɵɵtext(24,"\n "),r.ɵɵelementStart(25,"p"),r.ɵɵtext(26),r.ɵɵpipe(27,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(28,"\n "),r.ɵɵelementStart(29,"div",10),r.ɵɵtext(30,"\n "),r.ɵɵelementStart(31,"h3"),r.ɵɵtext(32),r.ɵɵpipe(33,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(34,"\n "),r.ɵɵtemplate(35,g,10,6,"div",11),r.ɵɵtext(36,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(37,"\n "),r.ɵɵtemplate(38,y,3,3,"div",6),r.ɵɵtext(39,"\n "),r.ɵɵtemplate(40,S,7,1,"table",12),r.ɵɵtext(41,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(42,"\n "),r.ɵɵelementStart(43,"div",13),r.ɵɵtext(44,"\n "),r.ɵɵelementStart(45,"button",14),r.ɵɵtext(46,"\n "),r.ɵɵelement(47,"i",15),r.ɵɵpipe(48,"i18n"),r.ɵɵtext(49,"\n "),r.ɵɵelementStart(50,"span"),r.ɵɵtext(51),r.ɵɵpipe(52,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(53,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(54,"\n "),r.ɵɵelementStart(55,"button",16),r.ɵɵtext(56),r.ɵɵpipe(57,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(58,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(59,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(60,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(61,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(62,"\n")),2&e){const e=r.ɵɵreference(5);r.ɵɵadvance(4),r.ɵɵproperty("appApiAction",t.formPromise),r.ɵɵadvance(6),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(11,13,"collections"),"\n "),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.cipher),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(16,15,"close")),r.ɵɵadvance(11),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(27,17,"collectionsDesc")),r.ɵɵadvance(6),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(33,19,"collections")),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",t.collections&&t.collections.length),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",!t.collections||!t.collections.length),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.collections&&t.collections.length),r.ɵɵadvance(5),r.ɵɵproperty("disabled",e.loading),r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(48,21,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(52,23,"save")),r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(57,25,"cancel"),"\n ")}},directives:[d.ɵNgNoValidate,d.NgControlStatusGroup,d.NgForm,p.ApiActionDirective,u.NgIf,m.A11yTitleDirective,u.NgForOf,d.CheckboxControlValueAccessor,h.StopPropDirective,d.NgControlStatus,d.NgModel],pipes:[v.I18nPipe],encapsulation:2})},27672:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FolderAddEditComponent=void 0;const i=n(17301),r=(n(88308),n(51554),n(36631),n(73828),n(32621)),o=n(88308),a=n(51554),s=n(73828),l=n(36631),c=n(96832),d=n(56820),p=n(8863),u=n(45728),m=n(57490),h=n(99729);function v(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"button",17,18),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext().delete()})),r.ɵɵpipe(2,"i18n"),r.ɵɵtext(3,"\n "),r.ɵɵelement(4,"i",19),r.ɵɵtext(5,"\n "),r.ɵɵelement(6,"i",20),r.ɵɵpipe(7,"i18n"),r.ɵɵtext(8,"\n "),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵreference(1),t=r.ɵɵnextContext();r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(2,6,"delete")),r.ɵɵproperty("disabled",e.loading)("appApiAction",t.deletePromise),r.ɵɵadvance(4),r.ɵɵproperty("hidden",e.loading),r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(7,8,"loading")),r.ɵɵproperty("hidden",!e.loading)}}class f extends i.FolderAddEditComponent{constructor(e,t,n,i){super(e,t,n,i)}}t.FolderAddEditComponent=f,f.ɵfac=function(e){return new(e||f)(r.ɵɵdirectiveInject(o.FolderService),r.ɵɵdirectiveInject(a.I18nService),r.ɵɵdirectiveInject(s.PlatformUtilsService),r.ɵɵdirectiveInject(l.LogService))},f.ɵcmp=r.ɵɵdefineComponent({type:f,selectors:[["app-folder-add-edit"]],features:[r.ɵɵInheritDefinitionFeature],decls:54,vars:20,consts:[["role","dialog","aria-modal","true","aria-labelledby","folderAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-sm"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","folderAddEditTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["for","name"],["id","name","type","text","name","Name","required","","appAutofocus","",1,"form-control",3,"ngModel","ngModelChange"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"ml-auto"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click",4,"ngIf"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click"],["deleteBtn",""],["aria-hidden","true",1,"bwi","bwi-trash","bwi-lg","bwi-fw",3,"hidden"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-lg","bwi-fw",3,"hidden","title"]],template:function(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"form",2,3),r.ɵɵlistener("ngSubmit",(function(){return t.submit()})),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"div",4),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"h2",5),r.ɵɵtext(10),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n "),r.ɵɵelementStart(12,"button",6),r.ɵɵpipe(13,"i18n"),r.ɵɵtext(14,"\n "),r.ɵɵelementStart(15,"span",7),r.ɵɵtext(16,"×"),r.ɵɵelementEnd(),r.ɵɵtext(17,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵelementStart(20,"div",8),r.ɵɵtext(21,"\n "),r.ɵɵelementStart(22,"label",9),r.ɵɵtext(23),r.ɵɵpipe(24,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(25,"\n "),r.ɵɵelementStart(26,"input",10),r.ɵɵlistener("ngModelChange",(function(e){return t.folder.name=e})),r.ɵɵelementEnd(),r.ɵɵtext(27,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(28,"\n "),r.ɵɵelementStart(29,"div",11),r.ɵɵtext(30,"\n "),r.ɵɵelementStart(31,"button",12),r.ɵɵtext(32,"\n "),r.ɵɵelement(33,"i",13),r.ɵɵpipe(34,"i18n"),r.ɵɵtext(35,"\n "),r.ɵɵelementStart(36,"span"),r.ɵɵtext(37),r.ɵɵpipe(38,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(39,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(40,"\n "),r.ɵɵelementStart(41,"button",14),r.ɵɵtext(42),r.ɵɵpipe(43,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(44,"\n "),r.ɵɵelementStart(45,"div",15),r.ɵɵtext(46,"\n "),r.ɵɵtemplate(47,v,9,10,"button",16),r.ɵɵtext(48,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(49,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(50,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(51,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(52,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(53,"\n")),2&e){const e=r.ɵɵreference(5);r.ɵɵadvance(4),r.ɵɵproperty("appApiAction",t.formPromise),r.ɵɵadvance(6),r.ɵɵtextInterpolate(t.title),r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(13,10,"close")),r.ɵɵadvance(11),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(24,12,"name")),r.ɵɵadvance(3),r.ɵɵproperty("ngModel",t.folder.name),r.ɵɵadvance(5),r.ɵɵproperty("disabled",e.loading),r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(34,14,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(38,16,"save")),r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(43,18,"cancel"),"\n "),r.ɵɵadvance(5),r.ɵɵproperty("ngIf",t.editMode)}},directives:[c.NgControlStatusGroup,c.NgForm,d.ApiActionDirective,p.A11yTitleDirective,c.DefaultValueAccessor,c.RequiredValidator,u.AutofocusDirective,c.NgControlStatus,c.NgModel,m.NgIf],pipes:[h.I18nPipe],encapsulation:2})},55715:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShareComponent=void 0;const i=n(78927),r=(n(45330),n(3174),n(51554),n(36631),n(63513),n(73828),n(32621)),o=n(3174),a=n(73828),s=n(51554),l=n(45330),c=n(63513),d=n(36631),p=n(96832),u=n(56820),m=n(57490),h=n(8863),v=n(39159),f=n(68012),g=n(99729);function y(e,t){if(1&e&&(r.ɵɵelementStart(0,"small"),r.ɵɵtext(1),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(1),r.ɵɵtextInterpolate(e.cipher.name)}}function x(e,t){1&e&&(r.ɵɵelementStart(0,"div",14),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"noOrganizationsList"),"\n "))}function S(e,t){if(1&e&&(r.ɵɵelementStart(0,"option",22),r.ɵɵtext(1),r.ɵɵelementEnd()),2&e){const e=t.$implicit;r.ɵɵproperty("ngValue",e.id),r.ɵɵadvance(1),r.ɵɵtextInterpolate(e.name)}}function b(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"div",23),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"button",24),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(2).selectAll(!0)})),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"button",24),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(2).selectAll(!1)})),r.ɵɵtext(7),r.ɵɵpipe(8,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementEnd()}2&e&&(r.ɵɵadvance(3),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(4,2,"selectAll"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(8,4,"unselectAll"),"\n "))}function w(e,t){1&e&&(r.ɵɵelementStart(0,"div"),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"noCollectionsInList"),"\n "))}function C(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"tr",27),r.ɵɵlistener("click",(function(){const t=r.ɵɵrestoreView(e).$implicit;return r.ɵɵnextContext(3).check(t)})),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"td",28),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"input",29),r.ɵɵlistener("ngModelChange",(function(t){return r.ɵɵrestoreView(e).$implicit.checked=t})),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"td"),r.ɵɵtext(8),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=t.index;r.ɵɵadvance(4),r.ɵɵpropertyInterpolate1("name","Collection[",n,"].Checked"),r.ɵɵproperty("ngModel",e.checked),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function I(e,t){if(1&e&&(r.ɵɵelementStart(0,"table",25),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"tbody"),r.ɵɵtext(3,"\n "),r.ɵɵtemplate(4,C,10,3,"tr",26),r.ɵɵtext(5,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(6,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(4),r.ɵɵproperty("ngForOf",e.collections)}}function E(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"div",14),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"p"),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"div",15),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"label",16),r.ɵɵtext(9),r.ɵɵpipe(10,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n "),r.ɵɵelementStart(12,"select",17),r.ɵɵlistener("ngModelChange",(function(t){r.ɵɵrestoreView(e);return r.ɵɵnextContext().organizationId=t}))("change",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext().filterCollections()})),r.ɵɵtext(13,"\n "),r.ɵɵtemplate(14,S,2,2,"option",18),r.ɵɵtext(15,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(16,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(17,"\n "),r.ɵɵelementStart(18,"div",19),r.ɵɵtext(19,"\n "),r.ɵɵelementStart(20,"h3"),r.ɵɵtext(21),r.ɵɵpipe(22,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(23,"\n "),r.ɵɵtemplate(24,b,10,6,"div",20),r.ɵɵtext(25,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(26,"\n "),r.ɵɵtemplate(27,w,3,3,"div",6),r.ɵɵtext(28,"\n "),r.ɵɵtemplate(29,I,7,1,"table",21),r.ɵɵtext(30,"\n "),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(4,8,"moveToOrgDesc")),r.ɵɵadvance(6),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(10,10,"organization")),r.ɵɵadvance(3),r.ɵɵproperty("ngModel",e.organizationId),r.ɵɵadvance(2),r.ɵɵproperty("ngForOf",e.organizations),r.ɵɵadvance(7),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(22,12,"collections")),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",e.collections&&e.collections.length),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",!e.collections||!e.collections.length),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.collections&&e.collections.length)}}const P=function(e){return{loading:e}};function O(e,t){if(1&e&&(r.ɵɵelementStart(0,"button",30),r.ɵɵtext(1,"\n "),r.ɵɵelement(2,"i",31),r.ɵɵpipe(3,"i18n"),r.ɵɵtext(4,"\n "),r.ɵɵelementStart(5,"span"),r.ɵɵtext(6),r.ɵɵpipe(7,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(),t=r.ɵɵreference(5);r.ɵɵproperty("disabled",t.loading||!e.canSave)("ngClass",r.ɵɵpureFunction1(8,P,t.loading)),r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(3,4,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(7,6,"save"))}}function k(e,t){1&e&&(r.ɵɵelementStart(0,"a",32),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"newOrganization"),"\n "))}class A extends i.ShareComponent{constructor(e,t,n,i,r,o){super(e,t,n,i,o,r)}ngOnDestroy(){this.selectAll(!1)}check(e,t){e.checked=null==t?!e.checked:t}selectAll(e){(e?this.collections:this.writeableCollections).forEach((t=>this.check(t,e)))}}t.ShareComponent=A,A.ɵfac=function(e){return new(e||A)(r.ɵɵdirectiveInject(o.CollectionService),r.ɵɵdirectiveInject(a.PlatformUtilsService),r.ɵɵdirectiveInject(s.I18nService),r.ɵɵdirectiveInject(l.CipherService),r.ɵɵdirectiveInject(c.OrganizationService),r.ɵɵdirectiveInject(d.LogService))},A.ɵcmp=r.ɵɵdefineComponent({type:A,selectors:[["app-vault-share"]],features:[r.ɵɵInheritDefinitionFeature],decls:41,vars:15,consts:[["role","dialog","aria-modal","true","aria-labelledby","shareTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],[1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","shareTitle",1,"modal-title"],[4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit manual",3,"disabled","ngClass",4,"ngIf"],["href","#","routerLink","/create-organization","class","btn btn-primary",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"modal-body"],[1,"form-group"],["for","organization"],["id","organization","name","OrganizationId",1,"form-control",3,"ngModel","ngModelChange","change"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"d-flex"],["class","ml-auto d-flex",4,"ngIf"],["class","table table-hover table-list mb-0",4,"ngIf"],[3,"ngValue"],[1,"ml-auto","d-flex"],["type","button",1,"btn","btn-link","btn-sm","py-0",3,"click"],[1,"table","table-hover","table-list","mb-0"],[3,"click",4,"ngFor","ngForOf"],[3,"click"],[1,"table-list-checkbox"],["type","checkbox","appStopProp","",3,"ngModel","name","ngModelChange"],["type","submit",1,"btn","btn-primary","btn-submit","manual",3,"disabled","ngClass"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["href","#","routerLink","/create-organization",1,"btn","btn-primary"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"form",2,3),r.ɵɵlistener("ngSubmit",(function(){return t.submit()})),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"div",4),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"h2",5),r.ɵɵtext(10),r.ɵɵpipe(11,"i18n"),r.ɵɵtemplate(12,y,2,1,"small",6),r.ɵɵtext(13,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(14,"\n "),r.ɵɵelementStart(15,"button",7),r.ɵɵpipe(16,"i18n"),r.ɵɵtext(17,"\n "),r.ɵɵelementStart(18,"span",8),r.ɵɵtext(19,"×"),r.ɵɵelementEnd(),r.ɵɵtext(20,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(21,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(22,"\n "),r.ɵɵtemplate(23,x,3,3,"div",9),r.ɵɵtext(24,"\n "),r.ɵɵtemplate(25,E,31,14,"div",9),r.ɵɵtext(26,"\n "),r.ɵɵelementStart(27,"div",10),r.ɵɵtext(28,"\n "),r.ɵɵtemplate(29,O,9,10,"button",11),r.ɵɵtext(30,"\n "),r.ɵɵtemplate(31,k,3,3,"a",12),r.ɵɵtext(32,"\n "),r.ɵɵelementStart(33,"button",13),r.ɵɵtext(34),r.ɵɵpipe(35,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(36,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(37,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(38,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(39,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(40,"\n")),2&e&&(r.ɵɵadvance(4),r.ɵɵproperty("appApiAction",t.formPromise),r.ɵɵadvance(6),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(11,9,"moveToOrganization"),"\n "),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.cipher),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(16,11,"close")),r.ɵɵadvance(8),r.ɵɵproperty("ngIf",!t.organizations||!t.organizations.length),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.organizations&&t.organizations.length),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",t.organizations&&t.organizations.length),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",!t.organizations||!t.organizations.length),r.ɵɵadvance(3),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(35,13,"cancel"),"\n "))},directives:[p.ɵNgNoValidate,p.NgControlStatusGroup,p.NgForm,u.ApiActionDirective,m.NgIf,h.A11yTitleDirective,p.SelectControlValueAccessor,p.NgControlStatus,p.NgModel,m.NgForOf,p.NgSelectOption,p.ɵNgSelectMultipleOption,p.CheckboxControlValueAccessor,v.StopPropDirective,m.NgClass,f.RouterLinkWithHref],pipes:[g.I18nPipe],encapsulation:2})},7643:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WildcardRoutingModule=void 0;const i=n(68012),r=n(32621);n(68012);class o{}t.WildcardRoutingModule=o,o.ɵfac=function(e){return new(e||o)},o.ɵmod=r.ɵɵdefineNgModule({type:o}),o.ɵinj=r.ɵɵdefineInjector({imports:[[i.RouterModule.forChild([{path:"**",redirectTo:""}])],i.RouterModule]})},74657:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Account=t.AccountSettings=void 0;const i=n(31445);class r extends i.AccountSettings{constructor(){super(...arguments),this.vaultTimeout=15}}t.AccountSettings=r;class o extends i.Account{constructor(e){super(e),this.settings=new r,Object.assign(this.settings,Object.assign(Object.assign({},new r),this.settings))}}t.Account=o},82062:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalState=void 0;const i=n(14538),r=n(99010);class o extends r.GlobalState{constructor(){super(...arguments),this.theme=i.ThemeType.Light,this.rememberEmail=!0}}t.GlobalState=o},79046:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BroadcasterMessagingService=void 0;n(8470);const i=n(32621),r=n(8470);class o{constructor(e){this.broadcasterService=e}send(e,t={}){const n=Object.assign({},{command:e},t);this.broadcasterService.send(n)}}t.BroadcasterMessagingService=o,o.ɵfac=function(e){return new(e||o)(i.ɵɵinject(r.BroadcasterService))},o.ɵprov=i.ɵɵdefineInjectable({token:o,factory:o.ɵfac})},57096:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.HtmlStorageService=void 0;const r=n(46632),o=n(32621);class a{get defaultOptions(){return{htmlStorageLocation:r.HtmlStorageLocation.Session}}get(e,t=this.defaultOptions){let n=null;switch(t.htmlStorageLocation){case r.HtmlStorageLocation.Local:n=window.localStorage.getItem(e);break;case r.HtmlStorageLocation.Session:default:n=window.sessionStorage.getItem(e)}if(null!=n){const e=JSON.parse(n);return Promise.resolve(e)}return Promise.resolve(null)}has(e,t=this.defaultOptions){return i(this,void 0,void 0,(function*(){return null!=(yield this.get(e,t))}))}save(e,t,n=this.defaultOptions){if(null==t)return this.remove(e,n);t instanceof Set&&(t=Array.from(t));const i=JSON.stringify(t);switch(n.htmlStorageLocation){case r.HtmlStorageLocation.Local:window.localStorage.setItem(e,i);break;case r.HtmlStorageLocation.Session:default:window.sessionStorage.setItem(e,i)}return Promise.resolve()}remove(e,t=this.defaultOptions){switch(t.htmlStorageLocation){case r.HtmlStorageLocation.Local:window.localStorage.removeItem(e);break;case r.HtmlStorageLocation.Session:default:window.sessionStorage.removeItem(e)}return Promise.resolve()}}t.HtmlStorageService=a,a.ɵfac=function(e){return new(e||a)},a.ɵprov=o.ɵɵdefineInjectable({token:a,factory:a.ɵfac})},28455:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.I18nService=void 0;const r=n(17578);class o extends r.I18nService{constructor(e,t){super(e||"en-US",t,(e=>i(this,void 0,void 0,(function*(){const t=this.localesDirectory+"/"+e+"/messages.json?cache=y4t72",n=yield fetch(t);return yield n.json()})))),this.supportedTranslationLocales=["en","af","az","be","bg","bn","bs","ca","cs","da","de","el","en-GB","en-IN","eo","es","et","fi","fil","fr","he","hi","hr","hu","id","it","ja","ka","km","kn","ko","lv","ml","nb","nl","nn","pl","pt-PT","pt-BR","ro","ru","si","sk","sl","sr","sv","tr","uk","vi","zh-CN","zh-TW"]}}t.I18nService=o},97853:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.MemoryStorageService=void 0;t.MemoryStorageService=class{constructor(){this.store=new Map}get(e){if(this.store.has(e)){const t=this.store.get(e);return Promise.resolve(t)}return Promise.resolve(null)}has(e){return n(this,void 0,void 0,(function*(){return null!=this.get(e)}))}save(e,t){return null==t?this.remove(e):(this.store.set(e,t),Promise.resolve())}remove(e){return this.store.delete(e),Promise.resolve()}}},14020:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordRepromptService=void 0;const i=n(91603),r=n(30563),o=n(32621);class a extends i.PasswordRepromptService{constructor(){super(...arguments),this.component=r.PasswordRepromptComponent}}t.PasswordRepromptService=a,a.ɵfac=function(){let e;return function(t){return(e||(e=o.ɵɵgetInheritedFactory(a)))(t||a)}}(),a.ɵprov=o.ɵɵdefineInjectable({token:a,factory:a.ɵfac})},91621:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.StateService=void 0;const r=n(13998),o=n(74657);class a extends r.StateService{addAccount(e){const t=Object.create(null,{addAccount:{get:()=>super.addAccount}});return i(this,void 0,void 0,(function*(){e=new o.Account(e),yield t.addAccount.call(this,e)}))}getRememberEmail(e){var t;return i(this,void 0,void 0,(function*(){return null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===t?void 0:t.rememberEmail}))}setRememberEmail(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()));n.rememberEmail=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()))}))}getEncryptedCiphers(e){const t=Object.create(null,{getEncryptedCiphers:{get:()=>super.getEncryptedCiphers}});return i(this,void 0,void 0,(function*(){return e=this.reconcileOptions(e,this.defaultInMemoryOptions),yield t.getEncryptedCiphers.call(this,e)}))}setEncryptedCiphers(e,t){const n=Object.create(null,{setEncryptedCiphers:{get:()=>super.setEncryptedCiphers}});return i(this,void 0,void 0,(function*(){return t=this.reconcileOptions(t,this.defaultInMemoryOptions),yield n.setEncryptedCiphers.call(this,e,t)}))}getEncryptedCollections(e){const t=Object.create(null,{getEncryptedCollections:{get:()=>super.getEncryptedCollections}});return i(this,void 0,void 0,(function*(){return e=this.reconcileOptions(e,this.defaultInMemoryOptions),yield t.getEncryptedCollections.call(this,e)}))}setEncryptedCollections(e,t){const n=Object.create(null,{setEncryptedCollections:{get:()=>super.setEncryptedCollections}});return i(this,void 0,void 0,(function*(){return t=this.reconcileOptions(t,this.defaultInMemoryOptions),yield n.setEncryptedCollections.call(this,e,t)}))}getEncryptedFolders(e){const t=Object.create(null,{getEncryptedFolders:{get:()=>super.getEncryptedFolders}});return i(this,void 0,void 0,(function*(){return e=this.reconcileOptions(e,this.defaultInMemoryOptions),yield t.getEncryptedFolders.call(this,e)}))}setEncryptedFolders(e,t){const n=Object.create(null,{setEncryptedFolders:{get:()=>super.setEncryptedFolders}});return i(this,void 0,void 0,(function*(){return t=this.reconcileOptions(t,this.defaultInMemoryOptions),yield n.setEncryptedFolders.call(this,e,t)}))}getEncryptedSends(e){const t=Object.create(null,{getEncryptedSends:{get:()=>super.getEncryptedSends}});return i(this,void 0,void 0,(function*(){return e=this.reconcileOptions(e,this.defaultInMemoryOptions),yield t.getEncryptedSends.call(this,e)}))}setEncryptedSends(e,t){const n=Object.create(null,{setEncryptedSends:{get:()=>super.setEncryptedSends}});return i(this,void 0,void 0,(function*(){return t=this.reconcileOptions(t,this.defaultInMemoryOptions),yield n.setEncryptedSends.call(this,e,t)}))}getLastSync(e){const t=Object.create(null,{getLastSync:{get:()=>super.getLastSync}});return i(this,void 0,void 0,(function*(){return e=this.reconcileOptions(e,this.defaultInMemoryOptions),yield t.getLastSync.call(this,e)}))}setLastSync(e,t){const n=Object.create(null,{setLastSync:{get:()=>super.setLastSync}});return i(this,void 0,void 0,(function*(){return t=this.reconcileOptions(t,this.defaultInMemoryOptions),yield n.setLastSync.call(this,e,t)}))}}t.StateService=a},31113:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.StateMigrationService=void 0;const r=n(8357);class o extends r.StateMigrationService{migrationStateFrom1To2(){const e=Object.create(null,{migrateStateFrom1To2:{get:()=>super.migrateStateFrom1To2}});var t,n;return i(this,void 0,void 0,(function*(){yield e.migrateStateFrom1To2.call(this);const i=null!==(t=yield this.get("global"))&&void 0!==t?t:this.stateFactory.createGlobal(null);i.rememberEmail=null!==(n=yield this.get("rememberEmail"))&&void 0!==n?n:i.rememberEmail,yield this.set("global",i)}))}}t.StateMigrationService=o},51601:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.WebPlatformUtilsService=void 0;const r=n(78764),o=(n(51554),n(36631),n(45552),n(73569),n(69434)),a=n(2779),s=n(14538),l=n(32621),c=n(51554),d=n(45552),p=n(36631),u=n(73569);class m{constructor(e,t,n,i){this.i18nService=e,this.messagingService=t,this.logService=n,this.stateService=i,this.browserCache=null,this.prefersColorSchemeDark=window.matchMedia("(prefers-color-scheme: dark)")}getDevice(){return null!=this.browserCache||(-1!==navigator.userAgent.indexOf(" Firefox/")||-1!==navigator.userAgent.indexOf(" Gecko/")?this.browserCache=a.DeviceType.FirefoxBrowser:navigator.userAgent.indexOf(" OPR/")>=0?this.browserCache=a.DeviceType.OperaBrowser:-1!==navigator.userAgent.indexOf(" Edg/")?this.browserCache=a.DeviceType.EdgeBrowser:-1!==navigator.userAgent.indexOf(" Vivaldi/")?this.browserCache=a.DeviceType.VivaldiBrowser:-1!==navigator.userAgent.indexOf(" Safari/")&&-1===navigator.userAgent.indexOf("Chrome")?this.browserCache=a.DeviceType.SafariBrowser:window.chrome&&-1!==navigator.userAgent.indexOf(" Chrome/")?this.browserCache=a.DeviceType.ChromeBrowser:-1!==navigator.userAgent.indexOf(" Trident/")?this.browserCache=a.DeviceType.IEBrowser:this.browserCache=a.DeviceType.UnknownBrowser),this.browserCache}getDeviceString(){return a.DeviceType[this.getDevice()].toLowerCase().replace("browser","")}getClientType(){return o.ClientType.Web}isFirefox(){return this.getDevice()===a.DeviceType.FirefoxBrowser}isChrome(){return this.getDevice()===a.DeviceType.ChromeBrowser}isEdge(){return this.getDevice()===a.DeviceType.EdgeBrowser}isOpera(){return this.getDevice()===a.DeviceType.OperaBrowser}isVivaldi(){return this.getDevice()===a.DeviceType.VivaldiBrowser}isSafari(){return this.getDevice()===a.DeviceType.SafariBrowser}isMacAppStore(){return!1}isViewOpen(){return Promise.resolve(!1)}launchUri(e,t){const n=document.createElement("a");n.href=e,null!=t&&t.sameWindow||(n.target="_blank",n.rel="noreferrer noopener"),n.classList.add("d-none"),document.body.appendChild(n),n.click(),document.body.removeChild(n)}saveFile(e,t,n,i){let r=null,o=null;const a=i.toLowerCase();let s=!0;a.endsWith(".pdf")?(o="application/pdf",s=!1):a.endsWith(".xlsx")?o="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":a.endsWith(".docx")?o="application/vnd.openxmlformats-officedocument.wordprocessingml.document":a.endsWith(".pptx")?o="application/vnd.openxmlformats-officedocument.presentationml.presentation":a.endsWith(".csv")?o="text/csv":a.endsWith(".png")?o="image/png":a.endsWith(".jpg")||a.endsWith(".jpeg")?o="image/jpeg":a.endsWith(".gif")&&(o="image/gif"),null!=o&&null==(n=n||{}).type&&(n.type=o),r=null!=n?new Blob([t],n):new Blob([t]);const l=e.document.createElement("a");s?l.download=i:this.isSafari()||(l.target="_blank"),l.href=URL.createObjectURL(r),l.style.position="fixed",e.document.body.appendChild(l),l.click(),e.document.body.removeChild(l)}getApplicationVersion(){return Promise.resolve("2022.5.2")}supportsWebAuthn(e){return"undefined"!=typeof PublicKeyCredential}supportsDuo(){return!0}showToast(e,t,n,i){this.messagingService.send("showToast",{text:n,title:t,type:e,options:i})}showDialog(e,t,n,o,a,s=!1){return i(this,void 0,void 0,(function*(){let i=null;if(null!=a)switch(a){case"success":i="bwi-check text-success";break;case"warning":i="bwi-exclamation-triangle text-warning";break;case"error":i="bwi-error text-danger";break;case"info":i="bwi-info-circle text-info"}const l=document.querySelector("div.modal");null!=l&&l.removeAttribute("tabindex");const c=null!=i?``:void 0,d=yield r.default.fire({heightAuto:!1,buttonsStyling:!1,icon:a,iconHtml:c,text:s?null:e,html:s?e:null,titleText:t,showCancelButton:null!=o,cancelButtonText:o,showConfirmButton:!0,confirmButtonText:null==n?this.i18nService.t("ok"):n});return null!=l&&l.setAttribute("tabindex","-1"),d.value}))}isDev(){return!1}isSelfHost(){return"selfhosted"==="cloud".toString()}copyToClipboard(e,t){let n=window,i=window.document;if(t&&(t.window||t.win)?(n=t.window||t.win,i=n.document):t&&t.doc&&(i=t.doc),n.clipboardData&&n.clipboardData.setData)n.clipboardData.setData("Text",e);else if(i.queryCommandSupported&&i.queryCommandSupported("copy")){const t=i.createElement("textarea");t.textContent=e,t.style.position="fixed";let n=i.body;i.body.classList.contains("modal-open")&&(n=i.body.querySelector(".modal")),n.appendChild(t),t.select();let o=!1;try{o=i.execCommand("copy"),o||this.logService.debug("Copy command unsupported or disabled.")}catch(r){console.warn("Copy to clipboard failed.",r)}finally{n.removeChild(t)}return o}}readFromClipboard(e){throw new Error("Cannot read from clipboard on web.")}supportsBiometric(){return Promise.resolve(!1)}authenticateBiometric(){return Promise.resolve(!1)}supportsSecureStorage(){return!1}getDefaultSystemTheme(){return Promise.resolve(this.prefersColorSchemeDark.matches?s.ThemeType.Dark:s.ThemeType.Light)}getEffectiveTheme(){return i(this,void 0,void 0,(function*(){const e=yield this.stateService.getTheme();return e===s.ThemeType.Dark?s.ThemeType.Dark:e===s.ThemeType.System?this.getDefaultSystemTheme():s.ThemeType.Light}))}onDefaultSystemThemeChange(e){try{this.prefersColorSchemeDark.addEventListener("change",(({matches:t})=>{e(t?s.ThemeType.Dark:s.ThemeType.Light)}))}catch(t){this.prefersColorSchemeDark.addListener((t=>{e(t.matches?s.ThemeType.Dark:s.ThemeType.Light)}))}}}t.WebPlatformUtilsService=m,m.ɵfac=function(e){return new(e||m)(l.ɵɵinject(c.I18nService),l.ɵɵinject(d.MessagingService),l.ɵɵinject(p.LogService),l.ɵɵinject(u.StateService))},m.ɵprov=l.ɵɵdefineInjectable({token:m,factory:m.ɵfac})},51857:(e,t,n)=>{"use strict";n.r(t)},83706:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});const i={darkInputColor:"#fff",darkInputPlaceholderColor:"#bac0ce",lightInputColor:"#465057",lightInputPlaceholderColor:"#b6b8b8"}},5812:(e,t,n)=>{"use strict";n.r(t)},4958:()=>{},65971:()=>{},25819:()=>{},52361:()=>{},94616:()=>{}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={id:e,loaded:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.m=t,e=[],i.O=(t,n,r,o)=>{if(!n){var a=1/0;for(d=0;d=o)&&Object.keys(i.O).every((e=>i.O[e](n[l])))?n.splice(l--,1):(s=!1,o0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[n,r,o]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e={148:0};i.O.j=t=>0===e[t];var t=(t,n)=>{var r,o,[a,s,l]=n,c=0;if(a.some((t=>0!==e[t]))){for(r in s)i.o(s,r)&&(i.m[r]=s[r]);if(l)var d=l(i)}for(t&&t(n);ci(22977)));r=i.O(r)})(); //# sourceMappingURL=main.c9579dba2f85858b26f4.js.map