@firestitch/2fa 12.11.5 → 12.11.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/app/enums/index.d.ts +1 -1
  2. package/app/enums/verification-method-type.enum.d.ts +5 -5
  3. package/app/interfaces/index.d.ts +1 -1
  4. package/app/interfaces/verification-method.interface.d.ts +11 -11
  5. package/app/modules/code-input/code-input.module.d.ts +9 -9
  6. package/app/modules/code-input/components/code-input/code-input.component.d.ts +14 -13
  7. package/app/modules/code-input/components/code-input/index.d.ts +1 -1
  8. package/app/modules/code-input/index.d.ts +1 -1
  9. package/app/modules/defaulted/components/defaulted/defaulted.component.d.ts +5 -5
  10. package/app/modules/defaulted/components/defaulted/index.d.ts +1 -1
  11. package/app/modules/defaulted/defaulted.module.d.ts +7 -7
  12. package/app/modules/manage/components/2fa-manage/2fa-manage.component.d.ts +30 -30
  13. package/app/modules/manage/components/2fa-manage/index.d.ts +1 -1
  14. package/app/modules/manage/components/app/app.component.d.ts +32 -32
  15. package/app/modules/manage/components/app/index.d.ts +1 -1
  16. package/app/modules/manage/components/email/email.component.d.ts +27 -27
  17. package/app/modules/manage/components/email/index.d.ts +1 -1
  18. package/app/modules/manage/components/emails/emails.component.d.ts +19 -19
  19. package/app/modules/manage/components/emails/index.d.ts +1 -1
  20. package/app/modules/manage/components/manage-methods/index.d.ts +1 -1
  21. package/app/modules/manage/components/manage-methods/manage-methods.component.d.ts +35 -35
  22. package/app/modules/manage/components/number/index.d.ts +1 -1
  23. package/app/modules/manage/components/number/number.component.d.ts +28 -28
  24. package/app/modules/manage/components/numbers/index.d.ts +1 -1
  25. package/app/modules/manage/components/numbers/numbers.component.d.ts +20 -20
  26. package/app/modules/manage/components/qr-code/index.d.ts +1 -1
  27. package/app/modules/manage/components/qr-code/qr-code.component.d.ts +11 -11
  28. package/app/modules/manage/fs-2f-manage.module.d.ts +33 -33
  29. package/app/modules/manage/services/index.d.ts +1 -1
  30. package/app/modules/manage/services/two-factor-manage.service.d.ts +52 -52
  31. package/app/modules/resend/components/resend/index.d.ts +1 -1
  32. package/app/modules/resend/components/resend/resend.component.d.ts +14 -14
  33. package/app/modules/resend/resend.module.d.ts +9 -9
  34. package/app/modules/verification/components/2fa-verification/2fa-verification.component.d.ts +39 -38
  35. package/app/modules/verification/components/2fa-verification-code/2fa-verification-code.component.d.ts +21 -20
  36. package/app/modules/verification/components/2fa-verification-methods/2fa-verification-methods.component.d.ts +22 -22
  37. package/app/modules/verification/directives/2fa-verification-resend.directive.d.ts +11 -11
  38. package/app/modules/verification/directives/index.d.ts +1 -1
  39. package/app/modules/verification/fs-2fa-verification.module.d.ts +25 -25
  40. package/app/modules/verification-methods/components/verification-methods/index.d.ts +1 -1
  41. package/app/modules/verification-methods/components/verification-methods/verification-methods.component.d.ts +26 -26
  42. package/app/modules/verification-methods/fs-2f-verification-methods.module.d.ts +14 -14
  43. package/app/modules/verification-methods/index.d.ts +1 -1
  44. package/bundles/firestitch-2fa.umd.js +1489 -1480
  45. package/bundles/firestitch-2fa.umd.js.map +1 -1
  46. package/esm2015/app/enums/index.js +1 -1
  47. package/esm2015/app/enums/verification-method-type.enum.js +6 -6
  48. package/esm2015/app/interfaces/index.js +1 -1
  49. package/esm2015/app/interfaces/verification-method.interface.js +1 -1
  50. package/esm2015/app/modules/code-input/code-input.module.js +29 -29
  51. package/esm2015/app/modules/code-input/components/code-input/code-input.component.js +42 -37
  52. package/esm2015/app/modules/code-input/components/code-input/index.js +1 -1
  53. package/esm2015/app/modules/code-input/index.js +1 -1
  54. package/esm2015/app/modules/defaulted/components/defaulted/defaulted.component.js +15 -15
  55. package/esm2015/app/modules/defaulted/components/defaulted/index.js +1 -1
  56. package/esm2015/app/modules/defaulted/defaulted.module.js +17 -17
  57. package/esm2015/app/modules/manage/components/2fa-manage/2fa-manage.component.js +103 -103
  58. package/esm2015/app/modules/manage/components/2fa-manage/index.js +1 -1
  59. package/esm2015/app/modules/manage/components/app/app.component.js +88 -88
  60. package/esm2015/app/modules/manage/components/app/index.js +1 -1
  61. package/esm2015/app/modules/manage/components/email/email.component.js +82 -82
  62. package/esm2015/app/modules/manage/components/email/index.js +1 -1
  63. package/esm2015/app/modules/manage/components/emails/emails.component.js +49 -49
  64. package/esm2015/app/modules/manage/components/emails/index.js +1 -1
  65. package/esm2015/app/modules/manage/components/manage-methods/index.js +1 -1
  66. package/esm2015/app/modules/manage/components/manage-methods/manage-methods.component.js +127 -127
  67. package/esm2015/app/modules/manage/components/number/index.js +1 -1
  68. package/esm2015/app/modules/manage/components/number/number.component.js +87 -86
  69. package/esm2015/app/modules/manage/components/numbers/index.js +1 -1
  70. package/esm2015/app/modules/manage/components/numbers/numbers.component.js +50 -50
  71. package/esm2015/app/modules/manage/components/qr-code/index.js +1 -1
  72. package/esm2015/app/modules/manage/components/qr-code/qr-code.component.js +36 -36
  73. package/esm2015/app/modules/manage/fs-2f-manage.module.js +117 -117
  74. package/esm2015/app/modules/manage/services/index.js +1 -1
  75. package/esm2015/app/modules/manage/services/two-factor-manage.service.js +160 -160
  76. package/esm2015/app/modules/resend/components/resend/index.js +1 -1
  77. package/esm2015/app/modules/resend/components/resend/resend.component.js +39 -39
  78. package/esm2015/app/modules/resend/resend.module.js +29 -29
  79. package/esm2015/app/modules/verification/components/2fa-verification/2fa-verification.component.js +130 -128
  80. package/esm2015/app/modules/verification/components/2fa-verification-code/2fa-verification-code.component.js +63 -61
  81. package/esm2015/app/modules/verification/components/2fa-verification-methods/2fa-verification-methods.component.js +60 -60
  82. package/esm2015/app/modules/verification/directives/2fa-verification-resend.directive.js +31 -31
  83. package/esm2015/app/modules/verification/directives/index.js +1 -1
  84. package/esm2015/app/modules/verification/fs-2fa-verification.module.js +96 -96
  85. package/esm2015/app/modules/verification-methods/components/verification-methods/index.js +1 -1
  86. package/esm2015/app/modules/verification-methods/components/verification-methods/verification-methods.component.js +120 -120
  87. package/esm2015/app/modules/verification-methods/fs-2f-verification-methods.module.js +47 -47
  88. package/esm2015/app/modules/verification-methods/index.js +1 -1
  89. package/esm2015/firestitch-2fa.js +4 -4
  90. package/esm2015/public_api.js +8 -8
  91. package/fesm2015/firestitch-2fa.js +1334 -1325
  92. package/fesm2015/firestitch-2fa.js.map +1 -1
  93. package/firestitch-2fa.d.ts +5 -5
  94. package/package.json +1 -1
  95. package/public_api.d.ts +9 -9
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@angular/common'), require('@angular/material/icon'), require('@angular/material/radio'), require('@angular/material/button'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/checkbox'), require('@firestitch/form'), require('@firestitch/skeleton'), require('@firestitch/radiogroup'), require('@firestitch/dialog'), require('rxjs'), require('rxjs/operators'), require('@angular/material/dialog'), require('@firestitch/code-input'), require('@firestitch/message'), require('@firestitch/phone'), require('@angular/material/progress-spinner'), require('@firestitch/list'), require('@firestitch/label'), require('@firestitch/country'), require('qrcode'), require('@firestitch/prompt')) :
3
- typeof define === 'function' && define.amd ? define('@firestitch/2fa', ['exports', '@angular/core', '@angular/forms', '@angular/common', '@angular/material/icon', '@angular/material/radio', '@angular/material/button', '@angular/material/form-field', '@angular/material/input', '@angular/material/checkbox', '@firestitch/form', '@firestitch/skeleton', '@firestitch/radiogroup', '@firestitch/dialog', 'rxjs', 'rxjs/operators', '@angular/material/dialog', '@firestitch/code-input', '@firestitch/message', '@firestitch/phone', '@angular/material/progress-spinner', '@firestitch/list', '@firestitch/label', '@firestitch/country', 'qrcode', '@firestitch/prompt'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.firestitch = global.firestitch || {}, global.firestitch["2fa"] = {}), global.ng.core, global.ng.forms, global.ng.common, global.ng.material.icon, global.ng.material.radio, global.ng.material.button, global.ng.material.formField, global.ng.material.input, global.ng.material.checkbox, global.i9, global.i11$1, global.i3$1, global.i3, global.rxjs, global.rxjs.operators, global.ng.material.dialog, global.i1$1, global.i2, global.i8$1, global.ng.material.progressSpinner, global.i2$1, global.i3$2, global.i4$1, global.QRCode, global.i1$3));
5
- })(this, (function (exports, i0, i8, i9$1, i4, i5, i6, i5$1, i11, i6$1, i9, i11$1, i3$1, i3, rxjs, operators, i1, i1$1, i2, i8$1, i1$2, i2$1, i3$2, i4$1, QRCode, i1$3) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@angular/common'), require('@angular/material/icon'), require('@angular/material/radio'), require('@angular/material/button'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/checkbox'), require('@firestitch/form'), require('@firestitch/skeleton'), require('@firestitch/radiogroup'), require('@firestitch/dialog'), require('rxjs'), require('rxjs/operators'), require('@angular/material/dialog'), require('@firestitch/code-input'), require('@firestitch/message'), require('@firestitch/phone'), require('@angular/material/progress-spinner'), require('@firestitch/country'), require('@firestitch/label'), require('@firestitch/list'), require('@firestitch/prompt'), require('qrcode')) :
3
+ typeof define === 'function' && define.amd ? define('@firestitch/2fa', ['exports', '@angular/core', '@angular/forms', '@angular/common', '@angular/material/icon', '@angular/material/radio', '@angular/material/button', '@angular/material/form-field', '@angular/material/input', '@angular/material/checkbox', '@firestitch/form', '@firestitch/skeleton', '@firestitch/radiogroup', '@firestitch/dialog', 'rxjs', 'rxjs/operators', '@angular/material/dialog', '@firestitch/code-input', '@firestitch/message', '@firestitch/phone', '@angular/material/progress-spinner', '@firestitch/country', '@firestitch/label', '@firestitch/list', '@firestitch/prompt', 'qrcode'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.firestitch = global.firestitch || {}, global.firestitch["2fa"] = {}), global.ng.core, global.ng.forms, global.ng.common, global.ng.material.icon, global.ng.material.radio, global.ng.material.button, global.ng.material.formField, global.ng.material.input, global.ng.material.checkbox, global.i9, global.i11$1, global.i3$1, global.i3, global.rxjs, global.rxjs.operators, global.ng.material.dialog, global.i1$1, global.i2, global.i8$1, global.ng.material.progressSpinner, global.i4$1, global.i3$2, global.i2$1, global.i1$3, global.QRCode));
5
+ })(this, (function (exports, i0, i8, i9$1, i4, i5, i6, i5$1, i11, i6$1, i9, i11$1, i3$1, i3, rxjs, operators, i1, i1$1, i2, i8$1, i1$2, i4$1, i3$2, i2$1, i1$3, QRCode) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -42,1525 +42,1534 @@
42
42
  var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
43
43
  var i8__namespace$1 = /*#__PURE__*/_interopNamespace(i8$1);
44
44
  var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
45
- var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
46
- var i3__namespace$2 = /*#__PURE__*/_interopNamespace(i3$2);
47
45
  var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
48
- var QRCode__default = /*#__PURE__*/_interopDefaultLegacy(QRCode);
46
+ var i3__namespace$2 = /*#__PURE__*/_interopNamespace(i3$2);
47
+ var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
49
48
  var i1__namespace$3 = /*#__PURE__*/_interopNamespace(i1$3);
49
+ var QRCode__default = /*#__PURE__*/_interopDefaultLegacy(QRCode);
50
50
 
51
- exports.VerificationMethodType = void 0;
52
- (function (VerificationMethodType) {
53
- VerificationMethodType["Sms"] = "sms";
54
- VerificationMethodType["Email"] = "email";
55
- VerificationMethodType["App"] = "app";
51
+ exports.VerificationMethodType = void 0;
52
+ (function (VerificationMethodType) {
53
+ VerificationMethodType["Sms"] = "sms";
54
+ VerificationMethodType["Email"] = "email";
55
+ VerificationMethodType["App"] = "app";
56
56
  })(exports.VerificationMethodType || (exports.VerificationMethodType = {}));
57
57
 
58
- var Fs2faVerificationMethodsComponent = /** @class */ (function () {
59
- function Fs2faVerificationMethodsComponent(_dialogData, _dialogRef) {
60
- var _this = this;
61
- this._dialogData = _dialogData;
62
- this._dialogRef = _dialogRef;
63
- this.verificationMethodType = exports.VerificationMethodType;
64
- this.setVerificationMethod = function () {
65
- return _this._selectVerificationMethod(_this.verificationMethod)
66
- .pipe(operators.tap(function (method) {
67
- _this._dialogRef.close(method);
68
- }));
69
- };
70
- this._selectVerificationMethod = _dialogData.selectVerificationMethod;
71
- this._setActiveMethod();
72
- this._initMethods(_dialogData.verificationMethods);
73
- }
74
- Fs2faVerificationMethodsComponent.prototype.compareWith = function (o1, o2) {
75
- return o1 && o2 && o1.id === o2.id;
76
- };
77
- Fs2faVerificationMethodsComponent.prototype._setActiveMethod = function () {
78
- var _a;
79
- this.verificationMethod = (_a = this._dialogData) === null || _a === void 0 ? void 0 : _a.verificationMethod;
80
- };
81
- Fs2faVerificationMethodsComponent.prototype._initMethods = function (verificationMethods) {
82
- this.verificationMethods = verificationMethods
83
- .reduce(function (acc, method) {
84
- if (!acc[method.type]) {
85
- acc[method.type] = [];
86
- }
87
- acc[method.type].push(method);
88
- return acc;
89
- }, {});
90
- };
91
- return Fs2faVerificationMethodsComponent;
92
- }());
93
- Fs2faVerificationMethodsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faVerificationMethodsComponent, deps: [{ token: i1.MAT_DIALOG_DATA }, { token: i1__namespace.MatDialogRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
94
- Fs2faVerificationMethodsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2faVerificationMethodsComponent, selector: "ng-component", ngImport: i0__namespace, template: "<fs-dialog>\n <h1 mat-dialog-title>\n Verification Methods\n </h1>\n <form fsForm [submit]=\"setVerificationMethod\" [dirtySubmitButton]=\"false\">\n <mat-dialog-content>\n <ng-container>\n <fs-radio-group [(ngModel)]=\"verificationMethod\" name=\"method\" [compareWith]=\"compareWith\">\n <ng-container *ngFor=\"let methodMap of verificationMethods | keyvalue\">\n <div class=\"method\">\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n textsms\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Text Message</div>\n <div class=\"method-subtitle\">\n Send verification code to a mobile number\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n mail\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Email</div>\n <div class=\"method-subtitle\">\n Send verification code to an email address\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.App\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n phone_iphone\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Authenticator App</div>\n <div class=\"method-subtitle\">\n Send verification code to your authenticator app\n </div>\n </div>\n </div>\n </ng-container> \n </ng-container>\n\n <mat-radio-button class=\"method-item\" *ngFor=\"let method of methodMap.value\" [value]=\"method\">\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n {{ method.phoneNumber }}\n </ng-container>\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n {{ method.email }}\n </ng-container>\n <ng-container *ngSwitchCase=\"verificationMethodType.App\">\n Authenticator App\n </ng-container> \n </ng-container>\n </mat-radio-button>\n </div>\n </ng-container>\n </fs-radio-group>\n </ng-container>\n </mat-dialog-content>\n <mat-dialog-actions>\n <div class=\"actions\">\n <button mat-button type=\"submit\" color=\"primary\">Next</button>\n <button mat-button type=\"button\" [mat-dialog-close]=\"null\">Cancel</button>\n </div>\n </mat-dialog-actions>\n </form>\n</fs-dialog>\n", styles: [".method{display:block;margin-bottom:20px}.method .method-header{display:flex;align-items:flex-start}.method .method-header .method-name{margin-left:10px}.method .method-header .method-name .method-title{font-size:14px;font-weight:400}.method .method-header .method-name .method-subtitle{font-size:12px;color:#a3a3a3}.method .method-item{display:block;margin:10px 0 0 35px}\n"], components: [{ type: i3__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i3__namespace$1.FsRadioGroupComponent, selector: "fs-radio-group", inputs: ["orientation", "label", "name", "disabled", "radioPosition", "compareWith", "required"] }, { type: i4__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i5__namespace.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { type: i6__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i8__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i8__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i8__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9__namespace.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i8__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i9__namespace.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { type: i9__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i9__namespace$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i9__namespace$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i9__namespace.FsSubmitButtonDirective, selector: "button[type=\"submit\"]", inputs: ["name", "dirtySubmit"] }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], pipes: { "keyvalue": i9__namespace$1.KeyValuePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
95
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faVerificationMethodsComponent, decorators: [{
96
- type: i0.Component,
97
- args: [{
98
- templateUrl: './2fa-verification-methods.component.html',
99
- styleUrls: ['./2fa-verification-methods.component.scss'],
100
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
101
- }]
102
- }], ctorParameters: function () {
103
- return [{ type: undefined, decorators: [{
104
- type: i0.Inject,
105
- args: [i1.MAT_DIALOG_DATA]
106
- }] }, { type: i1__namespace.MatDialogRef }];
58
+ var Fs2faVerificationMethodsComponent = /** @class */ (function () {
59
+ function Fs2faVerificationMethodsComponent(_dialogData, _dialogRef) {
60
+ var _this = this;
61
+ this._dialogData = _dialogData;
62
+ this._dialogRef = _dialogRef;
63
+ this.verificationMethodType = exports.VerificationMethodType;
64
+ this.setVerificationMethod = function () {
65
+ return _this._selectVerificationMethod(_this.verificationMethod)
66
+ .pipe(operators.tap(function (method) {
67
+ _this._dialogRef.close(method);
68
+ }));
69
+ };
70
+ this._selectVerificationMethod = _dialogData.selectVerificationMethod;
71
+ this._setActiveMethod();
72
+ this._initMethods(_dialogData.verificationMethods);
73
+ }
74
+ Fs2faVerificationMethodsComponent.prototype.compareWith = function (o1, o2) {
75
+ return o1 && o2 && o1.id === o2.id;
76
+ };
77
+ Fs2faVerificationMethodsComponent.prototype._setActiveMethod = function () {
78
+ var _a;
79
+ this.verificationMethod = (_a = this._dialogData) === null || _a === void 0 ? void 0 : _a.verificationMethod;
80
+ };
81
+ Fs2faVerificationMethodsComponent.prototype._initMethods = function (verificationMethods) {
82
+ this.verificationMethods = verificationMethods
83
+ .reduce(function (acc, method) {
84
+ if (!acc[method.type]) {
85
+ acc[method.type] = [];
86
+ }
87
+ acc[method.type].push(method);
88
+ return acc;
89
+ }, {});
90
+ };
91
+ return Fs2faVerificationMethodsComponent;
92
+ }());
93
+ Fs2faVerificationMethodsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faVerificationMethodsComponent, deps: [{ token: i1.MAT_DIALOG_DATA }, { token: i1__namespace.MatDialogRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
94
+ Fs2faVerificationMethodsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2faVerificationMethodsComponent, selector: "ng-component", ngImport: i0__namespace, template: "<fs-dialog>\n <h1 mat-dialog-title>\n Verification Methods\n </h1>\n <form fsForm [submit]=\"setVerificationMethod\" [dirtySubmitButton]=\"false\">\n <mat-dialog-content>\n <ng-container>\n <fs-radio-group [(ngModel)]=\"verificationMethod\" name=\"method\" [compareWith]=\"compareWith\">\n <ng-container *ngFor=\"let methodMap of verificationMethods | keyvalue\">\n <div class=\"method\">\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n textsms\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Text Message</div>\n <div class=\"method-subtitle\">\n Send verification code to a mobile number\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n mail\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Email</div>\n <div class=\"method-subtitle\">\n Send verification code to an email address\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"verificationMethodType.App\">\n <div class=\"method-header\">\n <div class=\"method-icon\">\n <mat-icon>\n phone_iphone\n </mat-icon>\n </div>\n <div class=\"method-name\">\n <div class=\"method-title\">Authenticator App</div>\n <div class=\"method-subtitle\">\n Send verification code to your authenticator app\n </div>\n </div>\n </div>\n </ng-container> \n </ng-container>\n\n <mat-radio-button class=\"method-item\" *ngFor=\"let method of methodMap.value\" [value]=\"method\">\n <ng-container [ngSwitch]=\"methodMap.key\">\n <ng-container *ngSwitchCase=\"verificationMethodType.Sms\">\n {{ method.phoneNumber }}\n </ng-container>\n <ng-container *ngSwitchCase=\"verificationMethodType.Email\">\n {{ method.email }}\n </ng-container>\n <ng-container *ngSwitchCase=\"verificationMethodType.App\">\n Authenticator App\n </ng-container> \n </ng-container>\n </mat-radio-button>\n </div>\n </ng-container>\n </fs-radio-group>\n </ng-container>\n </mat-dialog-content>\n <mat-dialog-actions>\n <div class=\"actions\">\n <button mat-button type=\"submit\" color=\"primary\">Next</button>\n <button mat-button type=\"button\" [mat-dialog-close]=\"null\">Cancel</button>\n </div>\n </mat-dialog-actions>\n </form>\n</fs-dialog>\n", styles: [".method{display:block;margin-bottom:20px}.method .method-header{display:flex;align-items:flex-start}.method .method-header .method-name{margin-left:10px}.method .method-header .method-name .method-title{font-size:14px;font-weight:400}.method .method-header .method-name .method-subtitle{font-size:12px;color:#a3a3a3}.method .method-item{display:block;margin:10px 0 0 35px}\n"], components: [{ type: i3__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i3__namespace$1.FsRadioGroupComponent, selector: "fs-radio-group", inputs: ["orientation", "label", "name", "disabled", "radioPosition", "compareWith", "required"] }, { type: i4__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i5__namespace.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { type: i6__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i8__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i8__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i8__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9__namespace.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i8__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i9__namespace.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { type: i9__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i9__namespace$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i9__namespace$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i9__namespace.FsSubmitButtonDirective, selector: "button[type=\"submit\"]", inputs: ["name", "dirtySubmit"] }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], pipes: { "keyvalue": i9__namespace$1.KeyValuePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
95
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faVerificationMethodsComponent, decorators: [{
96
+ type: i0.Component,
97
+ args: [{
98
+ templateUrl: './2fa-verification-methods.component.html',
99
+ styleUrls: ['./2fa-verification-methods.component.scss'],
100
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
101
+ }]
102
+ }], ctorParameters: function () {
103
+ return [{ type: undefined, decorators: [{
104
+ type: i0.Inject,
105
+ args: [i1.MAT_DIALOG_DATA]
106
+ }] }, { type: i1__namespace.MatDialogRef }];
107
107
  } });
108
108
 
109
- var CodeInputComponent = /** @class */ (function () {
110
- function CodeInputComponent() {
111
- this.codeCompleted = new i0.EventEmitter();
112
- this.codeChanged = new i0.EventEmitter();
113
- }
114
- CodeInputComponent.prototype.focus = function () {
115
- this.codeInput.focusOnField(0);
116
- };
117
- return CodeInputComponent;
118
- }());
119
- CodeInputComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CodeInputComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
120
- CodeInputComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CodeInputComponent, selector: "app-code-input", inputs: { codeLength: "codeLength", code: "code" }, outputs: { codeCompleted: "codeCompleted", codeChanged: "codeChanged" }, viewQueries: [{ propertyName: "codeInput", first: true, predicate: i1$1.FsCodeInputComponent, descendants: true }], ngImport: i0__namespace, template: "<fs-code-input\n [codeLength]=\"6\"\n [ngModel]=\"code\"\n name=\"code\"\n [isPrevFocusableAfterClearing]=\"false\"\n (completed)=\"codeCompleted.emit($event)\"\n (ngModelChange)=\"codeChanged.emit($event)\">\n</fs-code-input>\n", styles: ["code-input{--item-spacing: 10px;--item-height: 20px;--item-border: none;--item-border-bottom: 2px solid #949494;--item-border-has-value: none;--item-border-bottom-has-value: 2px solid #949494;--item-border-focused: none;--item-border-bottom-focused: 2px solid #0061AF;--item-shadow-focused: none;--item-border-radius: 0px}code-input ::ng-deep span:first-child{padding-left:0!important}code-input ::ng-deep span:last-child{padding-right:0!important}code-input ::ng-deep input{font-size:20px!important;height:40px!important;padding:0!important}\n"], components: [{ type: i1__namespace$1.FsCodeInputComponent, selector: "fs-code-input", inputs: ["disabled", "codeLength", "inputType", "inputMode", "isCharsCode", "isCodeHidden", "autocapitalize", "initialFocusField", "isPrevFocusableAfterClearing", "isFocusingOnLastByClickIfFilled"], outputs: ["changed", "completed"] }], directives: [{ type: i8__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
121
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CodeInputComponent, decorators: [{
122
- type: i0.Component,
123
- args: [{
124
- selector: 'app-code-input',
125
- templateUrl: './code-input.component.html',
126
- styleUrls: ['./code-input.component.scss'],
127
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
128
- }]
129
- }], propDecorators: { codeInput: [{
130
- type: i0.ViewChild,
131
- args: [i1$1.FsCodeInputComponent]
132
- }], codeLength: [{
133
- type: i0.Input
134
- }], code: [{
135
- type: i0.Input
136
- }], codeCompleted: [{
137
- type: i0.Output
138
- }], codeChanged: [{
139
- type: i0.Output
109
+ var CodeInputComponent = /** @class */ (function () {
110
+ function CodeInputComponent() {
111
+ this.codeCompleted = new i0.EventEmitter();
112
+ this.codeChanged = new i0.EventEmitter();
113
+ }
114
+ CodeInputComponent.prototype.ngOnInit = function () {
115
+ if (!this.codeLength) {
116
+ this.codeLength = 6;
117
+ }
118
+ };
119
+ CodeInputComponent.prototype.focus = function () {
120
+ this.codeInput.focusOnField(0);
121
+ };
122
+ return CodeInputComponent;
123
+ }());
124
+ CodeInputComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CodeInputComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
125
+ CodeInputComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CodeInputComponent, selector: "app-code-input", inputs: { codeLength: "codeLength", code: "code" }, outputs: { codeCompleted: "codeCompleted", codeChanged: "codeChanged" }, viewQueries: [{ propertyName: "codeInput", first: true, predicate: i1$1.FsCodeInputComponent, descendants: true }], ngImport: i0__namespace, template: "<fs-code-input\n [codeLength]=\"codeLength\"\n [ngModel]=\"code\"\n name=\"code\"\n [isPrevFocusableAfterClearing]=\"false\"\n (completed)=\"codeCompleted.emit($event)\"\n (ngModelChange)=\"codeChanged.emit($event)\">\n</fs-code-input>\n", styles: ["code-input{--item-spacing: 10px;--item-height: 20px;--item-border: none;--item-border-bottom: 2px solid #949494;--item-border-has-value: none;--item-border-bottom-has-value: 2px solid #949494;--item-border-focused: none;--item-border-bottom-focused: 2px solid #0061AF;--item-shadow-focused: none;--item-border-radius: 0px}code-input ::ng-deep span:first-child{padding-left:0!important}code-input ::ng-deep span:last-child{padding-right:0!important}code-input ::ng-deep input{font-size:20px!important;height:40px!important;padding:0!important}\n"], components: [{ type: i1__namespace$1.FsCodeInputComponent, selector: "fs-code-input", inputs: ["disabled", "codeLength", "inputType", "inputMode", "isCharsCode", "isCodeHidden", "autocapitalize", "initialFocusField", "isPrevFocusableAfterClearing", "isFocusingOnLastByClickIfFilled"], outputs: ["changed", "completed"] }], directives: [{ type: i8__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
126
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CodeInputComponent, decorators: [{
127
+ type: i0.Component,
128
+ args: [{
129
+ selector: 'app-code-input',
130
+ templateUrl: './code-input.component.html',
131
+ styleUrls: ['./code-input.component.scss'],
132
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
133
+ }]
134
+ }], propDecorators: { codeInput: [{
135
+ type: i0.ViewChild,
136
+ args: [i1$1.FsCodeInputComponent]
137
+ }], codeLength: [{
138
+ type: i0.Input
139
+ }], code: [{
140
+ type: i0.Input
141
+ }], codeCompleted: [{
142
+ type: i0.Output
143
+ }], codeChanged: [{
144
+ type: i0.Output
140
145
  }] } });
141
146
 
142
- var Fs2faVerificationCodeComponent = /** @class */ (function () {
143
- function Fs2faVerificationCodeComponent(_form) {
144
- this._form = _form;
145
- this.codeChanged = new i0.EventEmitter();
146
- this.codeCompleted = new i0.EventEmitter();
147
- this.VerificationMethodType = exports.VerificationMethodType;
148
- }
149
- Fs2faVerificationCodeComponent.prototype.codeChange = function (code) {
150
- this.code = code;
151
- this.codeChanged.emit(this.code);
152
- this._form.dirty();
153
- };
154
- Fs2faVerificationCodeComponent.prototype.focus = function () {
155
- this.codeInputComponent.focus();
156
- };
157
- return Fs2faVerificationCodeComponent;
158
- }());
159
- Fs2faVerificationCodeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faVerificationCodeComponent, deps: [{ token: i9__namespace.FsFormDirective }], target: i0__namespace.ɵɵFactoryTarget.Component });
160
- Fs2faVerificationCodeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2faVerificationCodeComponent, selector: "fs-2fa-verification-code", inputs: { type: "type", recipient: "recipient", code: "code" }, outputs: { codeChanged: "codeChanged", codeCompleted: "codeCompleted" }, viewQueries: [{ propertyName: "codeInputComponent", first: true, predicate: CodeInputComponent, descendants: true }], ngImport: i0__namespace, template: "<ng-container *ngIf=\"type === VerificationMethodType.Sms\">\n <p class=\"description\">\n A text message with a verification code was just sent to <span style=\"white-space: nowrap;\">{{ recipient }}</span> to verify it's you.\n </p>\n\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-container *ngIf=\"type === VerificationMethodType.Email\">\n <p class=\"description\">\n An email with a verification code was just sent to {{ recipient }} to verify it's you.\n </p>\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-container *ngIf=\"type === VerificationMethodType.App\">\n <p class=\"description\">\n Enter the verification code generated by your 2 factor authenticator app to verify it's you.\n </p>\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-template #input> \n <app-code-input \n [code]=\"code\"\n (codeChanged)=\"codeChange($event)\"\n (codeCompleted)=\"codeCompleted.emit()\">\n </app-code-input> \n</ng-template> ", styles: ["mat-form-field{width:100%}mat-form-field ::ng-deep .mat-form-field-subscript-wrapper{min-height:unset!important}mat-form-field ::ng-deep .mat-form-field-subscript-wrapper .fs-form-error{padding-bottom:5px}app-code-input{margin-bottom:5px}\n"], components: [{ type: CodeInputComponent, selector: "app-code-input", inputs: ["codeLength", "code"], outputs: ["codeCompleted", "codeChanged"] }], directives: [{ type: i9__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9__namespace$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], viewProviders: [
161
- {
162
- provide: i8.ControlContainer,
163
- useExisting: i8.NgForm,
164
- },
165
- ], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
166
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faVerificationCodeComponent, decorators: [{
167
- type: i0.Component,
168
- args: [{
169
- selector: 'fs-2fa-verification-code',
170
- templateUrl: './2fa-verification-code.component.html',
171
- styleUrls: ['./2fa-verification-code.component.scss'],
172
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
173
- viewProviders: [
174
- {
175
- provide: i8.ControlContainer,
176
- useExisting: i8.NgForm,
177
- },
178
- ],
179
- }]
180
- }], ctorParameters: function () { return [{ type: i9__namespace.FsFormDirective }]; }, propDecorators: { codeInputComponent: [{
181
- type: i0.ViewChild,
182
- args: [CodeInputComponent]
183
- }], type: [{
184
- type: i0.Input
185
- }], recipient: [{
186
- type: i0.Input
187
- }], code: [{
188
- type: i0.Input
189
- }], codeChanged: [{
190
- type: i0.Output
191
- }], codeCompleted: [{
192
- type: i0.Output
147
+ var Fs2faVerificationCodeComponent = /** @class */ (function () {
148
+ function Fs2faVerificationCodeComponent(_form) {
149
+ this._form = _form;
150
+ this.codeChanged = new i0.EventEmitter();
151
+ this.codeCompleted = new i0.EventEmitter();
152
+ this.VerificationMethodType = exports.VerificationMethodType;
153
+ }
154
+ Fs2faVerificationCodeComponent.prototype.codeChange = function (code) {
155
+ this.code = code;
156
+ this.codeChanged.emit(this.code);
157
+ this._form.dirty();
158
+ };
159
+ Fs2faVerificationCodeComponent.prototype.focus = function () {
160
+ this.codeInputComponent.focus();
161
+ };
162
+ return Fs2faVerificationCodeComponent;
163
+ }());
164
+ Fs2faVerificationCodeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faVerificationCodeComponent, deps: [{ token: i9__namespace.FsFormDirective }], target: i0__namespace.ɵɵFactoryTarget.Component });
165
+ Fs2faVerificationCodeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2faVerificationCodeComponent, selector: "fs-2fa-verification-code", inputs: { type: "type", recipient: "recipient", codeLength: "codeLength", code: "code" }, outputs: { codeChanged: "codeChanged", codeCompleted: "codeCompleted" }, viewQueries: [{ propertyName: "codeInputComponent", first: true, predicate: CodeInputComponent, descendants: true }], ngImport: i0__namespace, template: "<ng-container *ngIf=\"type === VerificationMethodType.Sms\">\n <p class=\"description\">\n A text message with a verification code was just sent to <span style=\"white-space: nowrap;\">{{ recipient }}</span> to verify it's you.\n </p>\n\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-container *ngIf=\"type === VerificationMethodType.Email\">\n <p class=\"description\">\n An email with a verification code was just sent to {{ recipient }} to verify it's you.\n </p>\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-container *ngIf=\"type === VerificationMethodType.App\">\n <p class=\"description\">\n Enter the verification code generated by your 2 factor authenticator app to verify it's you.\n </p>\n <ng-container *ngTemplateOutlet=\"input\"></ng-container>\n</ng-container>\n\n<ng-template #input> \n <app-code-input \n [code]=\"code\"\n [codeLength]=\"codeLength\"\n (codeChanged)=\"codeChange($event)\"\n (codeCompleted)=\"codeCompleted.emit()\">\n </app-code-input> \n</ng-template> ", styles: ["mat-form-field{width:100%}mat-form-field ::ng-deep .mat-form-field-subscript-wrapper{min-height:unset!important}mat-form-field ::ng-deep .mat-form-field-subscript-wrapper .fs-form-error{padding-bottom:5px}app-code-input{margin-bottom:5px}\n"], components: [{ type: CodeInputComponent, selector: "app-code-input", inputs: ["codeLength", "code"], outputs: ["codeCompleted", "codeChanged"] }], directives: [{ type: i9__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9__namespace$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], viewProviders: [
166
+ {
167
+ provide: i8.ControlContainer,
168
+ useExisting: i8.NgForm,
169
+ },
170
+ ], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
171
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faVerificationCodeComponent, decorators: [{
172
+ type: i0.Component,
173
+ args: [{
174
+ selector: 'fs-2fa-verification-code',
175
+ templateUrl: './2fa-verification-code.component.html',
176
+ styleUrls: ['./2fa-verification-code.component.scss'],
177
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
178
+ viewProviders: [
179
+ {
180
+ provide: i8.ControlContainer,
181
+ useExisting: i8.NgForm,
182
+ },
183
+ ],
184
+ }]
185
+ }], ctorParameters: function () { return [{ type: i9__namespace.FsFormDirective }]; }, propDecorators: { codeInputComponent: [{
186
+ type: i0.ViewChild,
187
+ args: [CodeInputComponent]
188
+ }], type: [{
189
+ type: i0.Input
190
+ }], recipient: [{
191
+ type: i0.Input
192
+ }], codeLength: [{
193
+ type: i0.Input
194
+ }], code: [{
195
+ type: i0.Input
196
+ }], codeChanged: [{
197
+ type: i0.Output
198
+ }], codeCompleted: [{
199
+ type: i0.Output
193
200
  }] } });
194
201
 
195
- var Fs2faVerificationComponent = /** @class */ (function () {
196
- function Fs2faVerificationComponent(_cdRef, _dialog, _message) {
197
- this._cdRef = _cdRef;
198
- this._dialog = _dialog;
199
- this._message = _message;
200
- this.showTrustedDevice = true;
201
- this.trustDevice = true;
202
- this.formatRecipient = false;
203
- this.verified = new i0.EventEmitter();
204
- this.codeChanged = new i0.EventEmitter();
205
- this.codeCompleted = new i0.EventEmitter();
206
- this.trustDeviceChange = new i0.EventEmitter();
207
- this.code = '';
208
- this.VerificationMethodType = exports.VerificationMethodType;
209
- this._destroy$ = new rxjs.Subject();
210
- }
211
- Object.defineProperty(Fs2faVerificationComponent.prototype, "recipient", {
212
- get: function () {
213
- if (this.verificationMethod.type === exports.VerificationMethodType.Email) {
214
- return this.verificationMethod.email;
215
- }
216
- if (this.verificationMethod.type === exports.VerificationMethodType.Sms) {
217
- return this.verificationMethod.phoneNumber;
218
- }
219
- },
220
- enumerable: false,
221
- configurable: true
222
- });
223
- Fs2faVerificationComponent.prototype.ngOnInit = function () {
224
- var _this = this;
225
- this.codeChanged
226
- .pipe(operators.takeUntil(this._destroy$))
227
- .subscribe(function (code) {
228
- _this.code = code;
229
- });
230
- };
231
- Fs2faVerificationComponent.prototype.ngOnDestroy = function () {
232
- this._destroy$.next();
233
- this._destroy$.complete();
234
- };
235
- Fs2faVerificationComponent.prototype.ngAfterViewInit = function () {
236
- this.verificationCodeComponent.focus();
237
- };
238
- Fs2faVerificationComponent.prototype.resendCode = function () {
239
- var _this = this;
240
- return this.resend()
241
- .pipe(operators.tap(function () {
242
- _this.code = '';
243
- _this._message.success('Resent Code');
244
- }), operators.finalize(function () {
245
- _this.verificationCodeComponent.focus();
246
- }));
247
- };
248
- Fs2faVerificationComponent.prototype.showVerificationMethods = function () {
249
- var _this = this;
250
- this.getVerificationMethods()
251
- .subscribe(function (verificationMethods) {
252
- _this._dialog.open(Fs2faVerificationMethodsComponent, {
253
- data: {
254
- verificationMethod: _this.verificationMethod,
255
- verificationMethods: verificationMethods,
256
- selectVerificationMethod: _this.selectVerificationMethod,
257
- }
258
- })
259
- .afterClosed()
260
- .pipe(operators.filter(function (verificationMethod) { return !!verificationMethod; }))
261
- .subscribe(function (verificationMethod) {
262
- _this.verificationMethod = verificationMethod;
263
- _this.code = '';
264
- _this._cdRef.markForCheck();
265
- setTimeout(function () {
266
- _this.verificationCodeComponent.focus();
267
- });
268
- });
269
- });
270
- };
271
- return Fs2faVerificationComponent;
272
- }());
273
- Fs2faVerificationComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faVerificationComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: i3__namespace.FsDialog }, { token: i2__namespace.FsMessage }], target: i0__namespace.ɵɵFactoryTarget.Component });
274
- Fs2faVerificationComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2faVerificationComponent, selector: "fs-2fa-verification", inputs: { verificationMethod: "verificationMethod", resend: "resend", showTrustedDevice: "showTrustedDevice", trustDevice: "trustDevice", trustDays: "trustDays", formatRecipient: "formatRecipient", getVerificationMethods: "getVerificationMethods", selectVerificationMethod: "selectVerificationMethod" }, outputs: { verified: "verified", codeChanged: "codeChanged", codeCompleted: "codeCompleted", trustDeviceChange: "trustDeviceChange" }, viewQueries: [{ propertyName: "verificationCodeComponent", first: true, predicate: Fs2faVerificationCodeComponent, descendants: true }], ngImport: i0__namespace, template: "<div class=\"code-container\">\n <fs-2fa-verification-code\n [recipient]=\"(formatRecipient && verificationMethod.type === VerificationMethodType.Sms) ? (recipient | fsPhone) : recipient\"\n [type]=\"verificationMethod.type\"\n [code]=\"code\"\n (codeChanged)=\"codeChanged.emit($event)\"\n (codeCompleted)=\"codeCompleted.emit()\">\n </fs-2fa-verification-code>\n</div>\n\n<div class=\"additional\">\n <div \n class=\"trust-device\"\n *ngIf=\"showTrustedDevice\">\n <mat-checkbox\n name=\"trust-device\"\n [(ngModel)]=\"trustDevice\"\n (ngModelChange)=\"trustDeviceChange.emit($event)\">\n <div class=\"small\">\n Bypass verification \n <ng-container *ngIf=\"trustDays\">for {{trustDays}} days</ng-container> \n <ng-container *ngIf=\"!trustDays\">for future signins</ng-container> \n unless cookies are cleared\n </div>\n </mat-checkbox>\n </div>\n</div>", styles: [":host ::ng-deep .mat-checkbox{margin:2px 0}:host ::ng-deep .mat-checkbox .mat-checkbox-label{line-height:normal}:host ::ng-deep .mat-checkbox .mat-checkbox-layout{white-space:normal}.code-container{text-align:center}.additional{display:flex;justify-content:space-between;align-items:center;margin:4px 0 5px}.additional small{color:inherit}.additional .resend{cursor:pointer;text-transform:none}.additional .resend mat-spinner{display:inline-block;vertical-align:middle}\n"], components: [{ type: Fs2faVerificationCodeComponent, selector: "fs-2fa-verification-code", inputs: ["type", "recipient", "code"], outputs: ["codeChanged", "codeCompleted"] }, { type: i6__namespace$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], directives: [{ type: i9__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i9__namespace.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }], pipes: { "fsPhone": i8__namespace$1.FsPhonePipe }, viewProviders: [{ provide: i8.ControlContainer, useExisting: i8.NgForm }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
275
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faVerificationComponent, decorators: [{
276
- type: i0.Component,
277
- args: [{
278
- selector: 'fs-2fa-verification',
279
- templateUrl: './2fa-verification.component.html',
280
- styleUrls: ['./2fa-verification.component.scss'],
281
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
282
- viewProviders: [{ provide: i8.ControlContainer, useExisting: i8.NgForm }],
283
- }]
284
- }], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: i3__namespace.FsDialog }, { type: i2__namespace.FsMessage }]; }, propDecorators: { verificationCodeComponent: [{
285
- type: i0.ViewChild,
286
- args: [Fs2faVerificationCodeComponent]
287
- }], verificationMethod: [{
288
- type: i0.Input
289
- }], resend: [{
290
- type: i0.Input
291
- }], showTrustedDevice: [{
292
- type: i0.Input
293
- }], trustDevice: [{
294
- type: i0.Input
295
- }], trustDays: [{
296
- type: i0.Input
297
- }], formatRecipient: [{
298
- type: i0.Input
299
- }], getVerificationMethods: [{
300
- type: i0.Input
301
- }], selectVerificationMethod: [{
302
- type: i0.Input
303
- }], verified: [{
304
- type: i0.Output
305
- }], codeChanged: [{
306
- type: i0.Output
307
- }], codeCompleted: [{
308
- type: i0.Output
309
- }], trustDeviceChange: [{
310
- type: i0.Output
202
+ var Fs2faVerificationComponent = /** @class */ (function () {
203
+ function Fs2faVerificationComponent(_cdRef, _dialog, _message) {
204
+ this._cdRef = _cdRef;
205
+ this._dialog = _dialog;
206
+ this._message = _message;
207
+ this.showTrustedDevice = true;
208
+ this.trustDevice = true;
209
+ this.formatRecipient = false;
210
+ this.verified = new i0.EventEmitter();
211
+ this.codeChanged = new i0.EventEmitter();
212
+ this.codeCompleted = new i0.EventEmitter();
213
+ this.trustDeviceChange = new i0.EventEmitter();
214
+ this.code = '';
215
+ this.VerificationMethodType = exports.VerificationMethodType;
216
+ this._destroy$ = new rxjs.Subject();
217
+ }
218
+ Object.defineProperty(Fs2faVerificationComponent.prototype, "recipient", {
219
+ get: function () {
220
+ if (this.verificationMethod.type === exports.VerificationMethodType.Email) {
221
+ return this.verificationMethod.email;
222
+ }
223
+ if (this.verificationMethod.type === exports.VerificationMethodType.Sms) {
224
+ return this.verificationMethod.phoneNumber;
225
+ }
226
+ },
227
+ enumerable: false,
228
+ configurable: true
229
+ });
230
+ Fs2faVerificationComponent.prototype.ngOnInit = function () {
231
+ var _this = this;
232
+ this.codeChanged
233
+ .pipe(operators.takeUntil(this._destroy$))
234
+ .subscribe(function (code) {
235
+ _this.code = code;
236
+ });
237
+ };
238
+ Fs2faVerificationComponent.prototype.ngOnDestroy = function () {
239
+ this._destroy$.next();
240
+ this._destroy$.complete();
241
+ };
242
+ Fs2faVerificationComponent.prototype.ngAfterViewInit = function () {
243
+ this.verificationCodeComponent.focus();
244
+ };
245
+ Fs2faVerificationComponent.prototype.resendCode = function () {
246
+ var _this = this;
247
+ return this.resend()
248
+ .pipe(operators.tap(function () {
249
+ _this.code = '';
250
+ _this._message.success('Resent Code');
251
+ }), operators.finalize(function () {
252
+ _this.verificationCodeComponent.focus();
253
+ }));
254
+ };
255
+ Fs2faVerificationComponent.prototype.showVerificationMethods = function () {
256
+ var _this = this;
257
+ this.getVerificationMethods()
258
+ .subscribe(function (verificationMethods) {
259
+ _this._dialog.open(Fs2faVerificationMethodsComponent, {
260
+ data: {
261
+ verificationMethod: _this.verificationMethod,
262
+ verificationMethods: verificationMethods,
263
+ selectVerificationMethod: _this.selectVerificationMethod,
264
+ }
265
+ })
266
+ .afterClosed()
267
+ .pipe(operators.filter(function (verificationMethod) { return !!verificationMethod; }))
268
+ .subscribe(function (verificationMethod) {
269
+ _this.verificationMethod = verificationMethod;
270
+ _this.code = '';
271
+ _this._cdRef.markForCheck();
272
+ setTimeout(function () {
273
+ _this.verificationCodeComponent.focus();
274
+ });
275
+ });
276
+ });
277
+ };
278
+ return Fs2faVerificationComponent;
279
+ }());
280
+ Fs2faVerificationComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faVerificationComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: i3__namespace.FsDialog }, { token: i2__namespace.FsMessage }], target: i0__namespace.ɵɵFactoryTarget.Component });
281
+ Fs2faVerificationComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2faVerificationComponent, selector: "fs-2fa-verification", inputs: { verificationMethod: "verificationMethod", resend: "resend", showTrustedDevice: "showTrustedDevice", trustDevice: "trustDevice", codeLength: "codeLength", trustDays: "trustDays", formatRecipient: "formatRecipient", getVerificationMethods: "getVerificationMethods", selectVerificationMethod: "selectVerificationMethod" }, outputs: { verified: "verified", codeChanged: "codeChanged", codeCompleted: "codeCompleted", trustDeviceChange: "trustDeviceChange" }, viewQueries: [{ propertyName: "verificationCodeComponent", first: true, predicate: Fs2faVerificationCodeComponent, descendants: true }], ngImport: i0__namespace, template: "<div class=\"code-container\">\n <fs-2fa-verification-code\n [recipient]=\"(formatRecipient && verificationMethod.type === VerificationMethodType.Sms) ? (recipient | fsPhone) : recipient\"\n [type]=\"verificationMethod.type\"\n [code]=\"code\"\n [codeLength]=\"codeLength\"\n (codeChanged)=\"codeChanged.emit($event)\"\n (codeCompleted)=\"codeCompleted.emit()\">\n </fs-2fa-verification-code>\n</div>\n\n<div class=\"additional\">\n <div \n class=\"trust-device\"\n *ngIf=\"showTrustedDevice\">\n <mat-checkbox\n name=\"trust-device\"\n [(ngModel)]=\"trustDevice\"\n (ngModelChange)=\"trustDeviceChange.emit($event)\">\n <div class=\"small\">\n Bypass verification \n <ng-container *ngIf=\"trustDays\">for {{trustDays}} days</ng-container> \n <ng-container *ngIf=\"!trustDays\">for future signins</ng-container> \n unless cookies are cleared\n </div>\n </mat-checkbox>\n </div>\n</div>", styles: [":host ::ng-deep .mat-checkbox{margin:2px 0}:host ::ng-deep .mat-checkbox .mat-checkbox-label{line-height:normal}:host ::ng-deep .mat-checkbox .mat-checkbox-layout{white-space:normal}.code-container{text-align:center}.additional{display:flex;justify-content:space-between;align-items:center;margin:4px 0 5px}.additional small{color:inherit}.additional .resend{cursor:pointer;text-transform:none}.additional .resend mat-spinner{display:inline-block;vertical-align:middle}\n"], components: [{ type: Fs2faVerificationCodeComponent, selector: "fs-2fa-verification-code", inputs: ["type", "recipient", "codeLength", "code"], outputs: ["codeChanged", "codeCompleted"] }, { type: i6__namespace$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], directives: [{ type: i9__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i9__namespace.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }], pipes: { "fsPhone": i8__namespace$1.FsPhonePipe }, viewProviders: [{ provide: i8.ControlContainer, useExisting: i8.NgForm }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
282
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faVerificationComponent, decorators: [{
283
+ type: i0.Component,
284
+ args: [{
285
+ selector: 'fs-2fa-verification',
286
+ templateUrl: './2fa-verification.component.html',
287
+ styleUrls: ['./2fa-verification.component.scss'],
288
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
289
+ viewProviders: [{ provide: i8.ControlContainer, useExisting: i8.NgForm }],
290
+ }]
291
+ }], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: i3__namespace.FsDialog }, { type: i2__namespace.FsMessage }]; }, propDecorators: { verificationCodeComponent: [{
292
+ type: i0.ViewChild,
293
+ args: [Fs2faVerificationCodeComponent]
294
+ }], verificationMethod: [{
295
+ type: i0.Input
296
+ }], resend: [{
297
+ type: i0.Input
298
+ }], showTrustedDevice: [{
299
+ type: i0.Input
300
+ }], trustDevice: [{
301
+ type: i0.Input
302
+ }], codeLength: [{
303
+ type: i0.Input
304
+ }], trustDays: [{
305
+ type: i0.Input
306
+ }], formatRecipient: [{
307
+ type: i0.Input
308
+ }], getVerificationMethods: [{
309
+ type: i0.Input
310
+ }], selectVerificationMethod: [{
311
+ type: i0.Input
312
+ }], verified: [{
313
+ type: i0.Output
314
+ }], codeChanged: [{
315
+ type: i0.Output
316
+ }], codeCompleted: [{
317
+ type: i0.Output
318
+ }], trustDeviceChange: [{
319
+ type: i0.Output
311
320
  }] } });
312
321
 
313
- var CodeInputModule = /** @class */ (function () {
314
- function CodeInputModule() {
315
- }
316
- return CodeInputModule;
317
- }());
318
- CodeInputModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CodeInputModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
319
- CodeInputModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CodeInputModule, declarations: [CodeInputComponent], imports: [i8.FormsModule,
320
- i1$1.FsCodeInputModule], exports: [CodeInputComponent] });
321
- CodeInputModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CodeInputModule, imports: [[
322
- i8.FormsModule,
323
- i1$1.FsCodeInputModule,
324
- ]] });
325
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CodeInputModule, decorators: [{
326
- type: i0.NgModule,
327
- args: [{
328
- imports: [
329
- i8.FormsModule,
330
- i1$1.FsCodeInputModule,
331
- ],
332
- declarations: [
333
- CodeInputComponent,
334
- ],
335
- exports: [
336
- CodeInputComponent,
337
- ],
338
- }]
322
+ var CodeInputModule = /** @class */ (function () {
323
+ function CodeInputModule() {
324
+ }
325
+ return CodeInputModule;
326
+ }());
327
+ CodeInputModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CodeInputModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
328
+ CodeInputModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CodeInputModule, declarations: [CodeInputComponent], imports: [i8.FormsModule,
329
+ i1$1.FsCodeInputModule], exports: [CodeInputComponent] });
330
+ CodeInputModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CodeInputModule, imports: [[
331
+ i8.FormsModule,
332
+ i1$1.FsCodeInputModule,
333
+ ]] });
334
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CodeInputModule, decorators: [{
335
+ type: i0.NgModule,
336
+ args: [{
337
+ imports: [
338
+ i8.FormsModule,
339
+ i1$1.FsCodeInputModule,
340
+ ],
341
+ declarations: [
342
+ CodeInputComponent,
343
+ ],
344
+ exports: [
345
+ CodeInputComponent,
346
+ ],
347
+ }]
339
348
  }] });
340
349
 
341
- var ResendComponent = /** @class */ (function () {
342
- function ResendComponent(_cdRef) {
343
- this._cdRef = _cdRef;
344
- this.resendInProgress = false;
345
- this._destroy$ = new rxjs.Subject();
346
- }
347
- ResendComponent.prototype.resendClick = function () {
348
- var _this = this;
349
- this.resendInProgress = true;
350
- this.resend()
351
- .pipe(operators.finalize(function () {
352
- _this.resendInProgress = false;
353
- _this._cdRef.markForCheck();
354
- }), operators.takeUntil(this._destroy$))
355
- .subscribe();
356
- };
357
- ResendComponent.prototype.ngOnDestroy = function () {
358
- this._destroy$.next();
359
- this._destroy$.complete();
360
- };
361
- return ResendComponent;
362
- }());
363
- ResendComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ResendComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
364
- ResendComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ResendComponent, selector: "app-resend", inputs: { resend: "resend" }, ngImport: i0__namespace, template: "<ng-container *ngIf=\"!resendInProgress else sending\">\n Didn't receive a code? <a (click)=\"resendClick()\">Resend</a>\n</ng-container>\n<ng-template #sending>\n <div class=\"sending\">\n <mat-spinner [diameter]=\"12\"></mat-spinner> Sending\n </div>\n</ng-template>\n\n", styles: ["small{color:inherit}.sending{display:inline-flex;align-items:center}.sending mat-spinner{margin-right:2px}\n"], components: [{ type: i1__namespace$2.MatSpinner, selector: "mat-spinner", inputs: ["color"] }], directives: [{ type: i9__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
365
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ResendComponent, decorators: [{
366
- type: i0.Component,
367
- args: [{
368
- selector: 'app-resend',
369
- templateUrl: './resend.component.html',
370
- styleUrls: ['./resend.component.scss'],
371
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
372
- }]
373
- }], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { resend: [{
374
- type: i0.Input
350
+ var ResendComponent = /** @class */ (function () {
351
+ function ResendComponent(_cdRef) {
352
+ this._cdRef = _cdRef;
353
+ this.resendInProgress = false;
354
+ this._destroy$ = new rxjs.Subject();
355
+ }
356
+ ResendComponent.prototype.resendClick = function () {
357
+ var _this = this;
358
+ this.resendInProgress = true;
359
+ this.resend()
360
+ .pipe(operators.finalize(function () {
361
+ _this.resendInProgress = false;
362
+ _this._cdRef.markForCheck();
363
+ }), operators.takeUntil(this._destroy$))
364
+ .subscribe();
365
+ };
366
+ ResendComponent.prototype.ngOnDestroy = function () {
367
+ this._destroy$.next();
368
+ this._destroy$.complete();
369
+ };
370
+ return ResendComponent;
371
+ }());
372
+ ResendComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ResendComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
373
+ ResendComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ResendComponent, selector: "app-resend", inputs: { resend: "resend" }, ngImport: i0__namespace, template: "<ng-container *ngIf=\"!resendInProgress else sending\">\n Didn't receive a code? <a (click)=\"resendClick()\">Resend</a>\n</ng-container>\n<ng-template #sending>\n <div class=\"sending\">\n <mat-spinner [diameter]=\"12\"></mat-spinner> Sending\n </div>\n</ng-template>\n\n", styles: ["small{color:inherit}.sending{display:inline-flex;align-items:center}.sending mat-spinner{margin-right:2px}\n"], components: [{ type: i1__namespace$2.MatSpinner, selector: "mat-spinner", inputs: ["color"] }], directives: [{ type: i9__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
374
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ResendComponent, decorators: [{
375
+ type: i0.Component,
376
+ args: [{
377
+ selector: 'app-resend',
378
+ templateUrl: './resend.component.html',
379
+ styleUrls: ['./resend.component.scss'],
380
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
381
+ }]
382
+ }], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { resend: [{
383
+ type: i0.Input
375
384
  }] } });
376
385
 
377
- var ResendModule = /** @class */ (function () {
378
- function ResendModule() {
379
- }
380
- return ResendModule;
381
- }());
382
- ResendModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ResendModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
383
- ResendModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ResendModule, declarations: [ResendComponent], imports: [i9$1.CommonModule,
384
- i1$2.MatProgressSpinnerModule], exports: [ResendComponent] });
385
- ResendModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ResendModule, imports: [[
386
- i9$1.CommonModule,
387
- i1$2.MatProgressSpinnerModule,
388
- ]] });
389
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ResendModule, decorators: [{
390
- type: i0.NgModule,
391
- args: [{
392
- imports: [
393
- i9$1.CommonModule,
394
- i1$2.MatProgressSpinnerModule,
395
- ],
396
- declarations: [
397
- ResendComponent,
398
- ],
399
- exports: [
400
- ResendComponent,
401
- ],
402
- }]
386
+ var ResendModule = /** @class */ (function () {
387
+ function ResendModule() {
388
+ }
389
+ return ResendModule;
390
+ }());
391
+ ResendModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ResendModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
392
+ ResendModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ResendModule, declarations: [ResendComponent], imports: [i9$1.CommonModule,
393
+ i1$2.MatProgressSpinnerModule], exports: [ResendComponent] });
394
+ ResendModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ResendModule, imports: [[
395
+ i9$1.CommonModule,
396
+ i1$2.MatProgressSpinnerModule,
397
+ ]] });
398
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ResendModule, decorators: [{
399
+ type: i0.NgModule,
400
+ args: [{
401
+ imports: [
402
+ i9$1.CommonModule,
403
+ i1$2.MatProgressSpinnerModule,
404
+ ],
405
+ declarations: [
406
+ ResendComponent,
407
+ ],
408
+ exports: [
409
+ ResendComponent,
410
+ ],
411
+ }]
403
412
  }] });
404
413
 
405
- var Fs2faVerificationResendDirective = /** @class */ (function () {
406
- function Fs2faVerificationResendDirective(_button) {
407
- this._button = _button;
408
- }
409
- Fs2faVerificationResendDirective.prototype.click = function () {
410
- var _this = this;
411
- this._button.disabled = true;
412
- this.verification.resendCode()
413
- .pipe(operators.finalize(function () { return _this._button.disabled = false; }))
414
- .subscribe();
415
- };
416
- return Fs2faVerificationResendDirective;
417
- }());
418
- Fs2faVerificationResendDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faVerificationResendDirective, deps: [{ token: i6__namespace.MatButton }], target: i0__namespace.ɵɵFactoryTarget.Directive });
419
- Fs2faVerificationResendDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: Fs2faVerificationResendDirective, selector: "[fs2faVerificationResend]", inputs: { verification: ["fs2faVerificationResend", "verification"] }, host: { listeners: { "click": "click()" } }, ngImport: i0__namespace });
420
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faVerificationResendDirective, decorators: [{
421
- type: i0.Directive,
422
- args: [{
423
- selector: '[fs2faVerificationResend]',
424
- }]
425
- }], ctorParameters: function () { return [{ type: i6__namespace.MatButton }]; }, propDecorators: { verification: [{
426
- type: i0.Input,
427
- args: ['fs2faVerificationResend']
428
- }], click: [{
429
- type: i0.HostListener,
430
- args: ['click']
414
+ var Fs2faVerificationResendDirective = /** @class */ (function () {
415
+ function Fs2faVerificationResendDirective(_button) {
416
+ this._button = _button;
417
+ }
418
+ Fs2faVerificationResendDirective.prototype.click = function () {
419
+ var _this = this;
420
+ this._button.disabled = true;
421
+ this.verification.resendCode()
422
+ .pipe(operators.finalize(function () { return _this._button.disabled = false; }))
423
+ .subscribe();
424
+ };
425
+ return Fs2faVerificationResendDirective;
426
+ }());
427
+ Fs2faVerificationResendDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faVerificationResendDirective, deps: [{ token: i6__namespace.MatButton }], target: i0__namespace.ɵɵFactoryTarget.Directive });
428
+ Fs2faVerificationResendDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: Fs2faVerificationResendDirective, selector: "[fs2faVerificationResend]", inputs: { verification: ["fs2faVerificationResend", "verification"] }, host: { listeners: { "click": "click()" } }, ngImport: i0__namespace });
429
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faVerificationResendDirective, decorators: [{
430
+ type: i0.Directive,
431
+ args: [{
432
+ selector: '[fs2faVerificationResend]',
433
+ }]
434
+ }], ctorParameters: function () { return [{ type: i6__namespace.MatButton }]; }, propDecorators: { verification: [{
435
+ type: i0.Input,
436
+ args: ['fs2faVerificationResend']
437
+ }], click: [{
438
+ type: i0.HostListener,
439
+ args: ['click']
431
440
  }] } });
432
441
 
433
- var Fs2faVerificationModule = /** @class */ (function () {
434
- function Fs2faVerificationModule() {
435
- }
436
- return Fs2faVerificationModule;
437
- }());
438
- Fs2faVerificationModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faVerificationModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
439
- Fs2faVerificationModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faVerificationModule, declarations: [Fs2faVerificationComponent,
440
- Fs2faVerificationCodeComponent,
441
- Fs2faVerificationMethodsComponent,
442
- Fs2faVerificationResendDirective], imports: [i9$1.CommonModule,
443
- i8.FormsModule,
444
- i5$1.MatFormFieldModule,
445
- i11.MatInputModule,
446
- i6.MatButtonModule,
447
- i4.MatIconModule,
448
- i5.MatRadioModule,
449
- i6$1.MatCheckboxModule,
450
- i9.FsFormModule,
451
- i3$1.FsRadioGroupModule,
452
- i3.FsDialogModule,
453
- i11$1.FsSkeletonModule,
454
- i8$1.FsPhoneModule,
455
- i11$1.FsSkeletonModule,
456
- ResendModule,
457
- CodeInputModule], exports: [Fs2faVerificationComponent,
458
- Fs2faVerificationResendDirective] });
459
- Fs2faVerificationModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faVerificationModule, providers: [], imports: [[
460
- i9$1.CommonModule,
461
- i8.FormsModule,
462
- i5$1.MatFormFieldModule,
463
- i11.MatInputModule,
464
- i6.MatButtonModule,
465
- i4.MatIconModule,
466
- i5.MatRadioModule,
467
- i6$1.MatCheckboxModule,
468
- i9.FsFormModule,
469
- i3$1.FsRadioGroupModule,
470
- i3.FsDialogModule,
471
- i11$1.FsSkeletonModule,
472
- i8$1.FsPhoneModule,
473
- i11$1.FsSkeletonModule,
474
- ResendModule,
475
- CodeInputModule,
476
- ]] });
477
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faVerificationModule, decorators: [{
478
- type: i0.NgModule,
479
- args: [{
480
- imports: [
481
- i9$1.CommonModule,
482
- i8.FormsModule,
483
- i5$1.MatFormFieldModule,
484
- i11.MatInputModule,
485
- i6.MatButtonModule,
486
- i4.MatIconModule,
487
- i5.MatRadioModule,
488
- i6$1.MatCheckboxModule,
489
- i9.FsFormModule,
490
- i3$1.FsRadioGroupModule,
491
- i3.FsDialogModule,
492
- i11$1.FsSkeletonModule,
493
- i8$1.FsPhoneModule,
494
- i11$1.FsSkeletonModule,
495
- ResendModule,
496
- CodeInputModule,
497
- ],
498
- declarations: [
499
- Fs2faVerificationComponent,
500
- Fs2faVerificationCodeComponent,
501
- Fs2faVerificationMethodsComponent,
502
- Fs2faVerificationResendDirective,
503
- ],
504
- exports: [
505
- Fs2faVerificationComponent,
506
- Fs2faVerificationResendDirective,
507
- ],
508
- providers: [],
509
- }]
442
+ var Fs2faVerificationModule = /** @class */ (function () {
443
+ function Fs2faVerificationModule() {
444
+ }
445
+ return Fs2faVerificationModule;
446
+ }());
447
+ Fs2faVerificationModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faVerificationModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
448
+ Fs2faVerificationModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faVerificationModule, declarations: [Fs2faVerificationComponent,
449
+ Fs2faVerificationCodeComponent,
450
+ Fs2faVerificationMethodsComponent,
451
+ Fs2faVerificationResendDirective], imports: [i9$1.CommonModule,
452
+ i8.FormsModule,
453
+ i5$1.MatFormFieldModule,
454
+ i11.MatInputModule,
455
+ i6.MatButtonModule,
456
+ i4.MatIconModule,
457
+ i5.MatRadioModule,
458
+ i6$1.MatCheckboxModule,
459
+ i9.FsFormModule,
460
+ i3$1.FsRadioGroupModule,
461
+ i3.FsDialogModule,
462
+ i11$1.FsSkeletonModule,
463
+ i8$1.FsPhoneModule,
464
+ i11$1.FsSkeletonModule,
465
+ ResendModule,
466
+ CodeInputModule], exports: [Fs2faVerificationComponent,
467
+ Fs2faVerificationResendDirective] });
468
+ Fs2faVerificationModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faVerificationModule, providers: [], imports: [[
469
+ i9$1.CommonModule,
470
+ i8.FormsModule,
471
+ i5$1.MatFormFieldModule,
472
+ i11.MatInputModule,
473
+ i6.MatButtonModule,
474
+ i4.MatIconModule,
475
+ i5.MatRadioModule,
476
+ i6$1.MatCheckboxModule,
477
+ i9.FsFormModule,
478
+ i3$1.FsRadioGroupModule,
479
+ i3.FsDialogModule,
480
+ i11$1.FsSkeletonModule,
481
+ i8$1.FsPhoneModule,
482
+ i11$1.FsSkeletonModule,
483
+ ResendModule,
484
+ CodeInputModule,
485
+ ]] });
486
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faVerificationModule, decorators: [{
487
+ type: i0.NgModule,
488
+ args: [{
489
+ imports: [
490
+ i9$1.CommonModule,
491
+ i8.FormsModule,
492
+ i5$1.MatFormFieldModule,
493
+ i11.MatInputModule,
494
+ i6.MatButtonModule,
495
+ i4.MatIconModule,
496
+ i5.MatRadioModule,
497
+ i6$1.MatCheckboxModule,
498
+ i9.FsFormModule,
499
+ i3$1.FsRadioGroupModule,
500
+ i3.FsDialogModule,
501
+ i11$1.FsSkeletonModule,
502
+ i8$1.FsPhoneModule,
503
+ i11$1.FsSkeletonModule,
504
+ ResendModule,
505
+ CodeInputModule,
506
+ ],
507
+ declarations: [
508
+ Fs2faVerificationComponent,
509
+ Fs2faVerificationCodeComponent,
510
+ Fs2faVerificationMethodsComponent,
511
+ Fs2faVerificationResendDirective,
512
+ ],
513
+ exports: [
514
+ Fs2faVerificationComponent,
515
+ Fs2faVerificationResendDirective,
516
+ ],
517
+ providers: [],
518
+ }]
510
519
  }] });
511
520
 
512
- var QrCodeComponent = /** @class */ (function () {
513
- function QrCodeComponent(_cdRef) {
514
- this._cdRef = _cdRef;
515
- }
516
- QrCodeComponent.prototype.ngOnInit = function () {
517
- var _this = this;
518
- QRCode__default["default"].toDataURL(this.value, {
519
- errorCorrectionLevel: 'H',
520
- width: 300,
521
- height: 300,
522
- })
523
- .then(function (url) {
524
- _this.image = url;
525
- _this._cdRef.markForCheck();
526
- })
527
- .catch(function (err) {
528
- console.error(err);
529
- });
530
- };
531
- return QrCodeComponent;
532
- }());
533
- QrCodeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: QrCodeComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
534
- QrCodeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: QrCodeComponent, selector: "app-qr-code", inputs: { value: "value" }, ngImport: i0__namespace, template: "<ng-container *ngIf=\"image\">\n <img [src]=\"image\">\n</ng-container>", styles: ["img{display:flex;margin:auto}\n"], directives: [{ type: i9__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
535
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: QrCodeComponent, decorators: [{
536
- type: i0.Component,
537
- args: [{
538
- selector: 'app-qr-code',
539
- templateUrl: './qr-code.component.html',
540
- styleUrls: ['./qr-code.component.scss'],
541
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
542
- }]
543
- }], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { value: [{
544
- type: i0.Input
545
- }] } });
521
+ var DefaultedComponent = /** @class */ (function () {
522
+ function DefaultedComponent() {
523
+ }
524
+ return DefaultedComponent;
525
+ }());
526
+ DefaultedComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DefaultedComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
527
+ DefaultedComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DefaultedComponent, selector: "app-defaulted", ngImport: i0__namespace, template: "<span>Default</span>", styles: ["span{font-size:75%;background-color:#02a7f0;padding:2px 4px;border-radius:4px;color:#fff}:host{display:flex}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
528
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DefaultedComponent, decorators: [{
529
+ type: i0.Component,
530
+ args: [{
531
+ selector: 'app-defaulted',
532
+ templateUrl: './defaulted.component.html',
533
+ styleUrls: ['./defaulted.component.scss'],
534
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
535
+ }]
536
+ }] });
546
537
 
547
- var AppComponent = /** @class */ (function () {
548
- function AppComponent(_data, _dialogRef, _cdRef, _message) {
549
- var _this = this;
550
- this._data = _data;
551
- this._dialogRef = _dialogRef;
552
- this._cdRef = _cdRef;
553
- this._message = _message;
554
- this.mode = 'qr-code';
555
- this.verify = function () {
556
- return _this.twoFactorManageService.verificationMethodVerify$(_this.code, true)
557
- .pipe(operators.switchMap(function () {
558
- return _this.default && _this.twoFactorManageService.verificationMethodDefault$ ?
559
- _this.twoFactorManageService.verificationMethodDefault$(_this.verificationMethod) :
560
- rxjs.of(true);
561
- }), operators.tap(function () {
562
- _this._message.success('Created app authenticator verification method');
563
- _this._dialogRef.close(true);
564
- }));
565
- };
566
- }
567
- AppComponent.prototype.ngOnInit = function () {
568
- this.twoFactorManageService = this._data.twoFactorManageService;
569
- this.accountId = this._data.accountId;
570
- this.default = !this.twoFactorManageService.hasVerificationMethods;
571
- };
572
- AppComponent.prototype.appTypeGoogle = function () {
573
- this.appTypeSelect('google');
574
- };
575
- AppComponent.prototype.appTypeAuthy = function () {
576
- this.appTypeSelect('authy');
577
- };
578
- AppComponent.prototype.appTypeSelect = function (appType) {
579
- var _this = this;
580
- this.appType = appType;
581
- this.twoFactorManageService.verificationMethodCreate$({
582
- type: exports.VerificationMethodType.App,
583
- })
584
- .subscribe(function (verificationMethod) {
585
- _this.verificationMethod = verificationMethod;
586
- _this.qrCodeUrl = verificationMethod.qrCodeUrl;
587
- _this._cdRef.markForCheck();
588
- });
589
- };
590
- AppComponent.prototype.codeCompleted = function () {
591
- this.form.triggerSubmit();
592
- };
593
- AppComponent.prototype.codeChanged = function (code) {
594
- this.code = code;
595
- this.form.dirty();
596
- };
597
- AppComponent.prototype.next = function () {
598
- this.mode = 'code-input';
599
- };
600
- return AppComponent;
601
- }());
602
- AppComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AppComponent, deps: [{ token: i1.MAT_DIALOG_DATA }, { token: i1__namespace.MatDialogRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i2__namespace.FsMessage }], target: i0__namespace.ɵɵFactoryTarget.Component });
603
- AppComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: AppComponent, selector: "ng-component", viewQueries: [{ propertyName: "form", first: true, predicate: i9.FsFormDirective, descendants: true }], ngImport: i0__namespace, template: "<form fsForm [submit]=\"verify\">\n <fs-dialog>\n <h1 mat-dialog-title>Authenticator App Setup</h1>\n <mat-dialog-content>\n\n <div *ngIf=\"mode === 'qr-code'\" class=\"qr-code\">\n <ng-container *ngIf=\"appType\">\n <ol>\n <li>\n <ng-container *ngIf=\"appType === 'authy'\">\n Install the Authy Authenticator App from the <a href=\"https://apps.apple.com/us/app/authy/id494168017\" target=\"_blank\">App Store</a> or\n the <a href=\"https://play.google.com/store/apps/details?id=com.authy.authy\" target=\"_blank\">Google Play Store</a>.\n </ng-container>\n\n <ng-container *ngIf=\"appType === 'google'\">\n Install the Google Authenticator App from the <a href=\"https://apps.apple.com/us/app/google-authenticator/id388497605\" target=\"_blank\">App Store</a> or\n the <a href=\"https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&hl=en_US&gl=US\" target=\"_blank\">Google Play Store</a>.\n </ng-container>\n </li>\n <ng-container *ngIf=\"appType === 'authy'\">\n <li>\n Open the Authy app and select <b>Add Account</b>.\n </li>\n <li>\n Select <b>Scan QR Code</b> and scan the QR code below.\n </li>\n </ng-container> \n <ng-container *ngIf=\"appType === 'google'\">\n <li>\n Open the Google Authentictor app and click the <b>Plus icon</b> in the lower right corner.\n </li>\n <li>\n Select <b>Scan a QR code</b> and scan the QR code below.\n </li>\n </ng-container>\n </ol>\n\n <ng-container *fsSkeleton=\"qrCodeUrl\">\n <app-qr-code\n [value]=\"qrCodeUrl\">\n </app-qr-code>\n </ng-container>\n </ng-container>\n\n <div class=\"app-types\" *ngIf=\"!appType\">\n <p>Select the Authenticator App you prefer</p>\n\n <div class=\"row\">\n <span>\n <a (click)=\"appTypeAuthy()\">\n <svg width=\"50\" height=\"50\" viewBox=\"0 0 256 256\" xmlns=\"http://www.w3.org/2000/svg\" preserveAspectRatio=\"xMidYMid\"><path d=\"M256 127.998C256 198.696 198.694 256 127.997 256 57.304 256 0 198.696 0 127.998 0 57.305 57.304 0 127.997 0 198.694 0 256 57.305 256 127.998z\" fill=\"#EC1C24\"/><path d=\"M117.024 100.89l30.691 30.68c4.43 4.436 11.623 4.436 16.064 0 4.431-4.435 4.441-11.622 0-16.058L133.086 84.82C111.125 62.854 75.631 62.5 53.204 83.704a9.536 9.536 0 0 0-.605.548c-.098.098-.178.202-.275.29-.1.096-.202.182-.297.278-.194.193-.371.396-.54.597-21.215 22.437-20.85 57.932 1.113 79.897L83.292 196c4.44 4.433 11.623 4.433 16.062 0 4.442-4.437 4.442-11.633.011-16.06l-30.693-30.691c-13.398-13.393-13.488-35.129-.278-48.637 13.506-13.21 35.23-13.114 48.63.279zm39.612-40.873c-4.435 4.437-4.435 11.623.012 16.059l30.681 30.693c13.39 13.392 13.477 35.125.268 48.636-13.51 13.2-35.227 13.112-48.623-.282l-30.692-30.689c-4.438-4.437-11.633-4.437-16.066 0-4.443 4.433-4.443 11.642 0 16.065l30.682 30.694c21.968 21.965 57.458 22.322 79.889 1.116.208-.184.404-.355.61-.549.094-.095.182-.192.273-.29.1-.095.197-.183.29-.289.197-.183.365-.384.54-.594 21.215-22.428 20.86-57.911-1.102-79.889l-30.692-30.682c-4.436-4.443-11.638-4.443-16.07.001z\" fill=\"#FFF\"/></svg>\n </a>\n Authy\n </span>\n \n <span>\n <a (click)=\"appTypeGoogle()\"> \n <svg width=\"50\" height=\"50\" viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"m457.07 45.92c73.67-8.62 149.41.22 218.93 26.24 62.75 23.47 120.59 60.41 167.72 108.09-40.31 39.97-80.25 80.31-120.51 120.33-25.95-25.45-56.19-46.65-89.47-61.37-44.22-19.82-93.39-28.54-141.72-25.2-54.6 3.52-108.11 22.49-152.63 54.3-55.24 38.95-96.61 97.22-114.8 162.35-13.64 47.78-14.77 98.97-3.76 147.4 8.85 39.61 26.09 77.29 50.05 110.03 22.24 30.45 50.3 56.64 82.22 76.71 36.79 23.24 78.76 38.22 121.96 43.48 37.02 4.65 74.9 2.23 111.05-7 3.97-1.91 6.24 2.61 8.73 4.86 40.74 40.95 81.68 81.7 122.43 122.63-73.31 35.6-155.99 51.86-237.3 46.12-68.05-4.51-135.07-24.08-194.71-57.18-24.87-13.6-48.23-29.82-70.33-47.54-17.46-14.81-34.71-30.01-49.72-47.35-25.41-27.39-47.21-58.11-65.17-90.87-4-7.72-8.64-15.12-11.9-23.2-4.47-9.05-8.37-18.36-12.25-27.67-4.96-13.27-10.26-26.44-13.88-40.15-.43-1.81-1.53-3.33-2.52-4.85-8.3-28.66-12.95-58.33-15.44-88.04-2.62-37.36-1.33-75.05 4.78-112.03 12.18-75.48 43.41-147.74 89.86-208.44 30.12-39.5 66.53-74.21 107.46-102.35 62.44-43.11 135.53-70.69 210.92-79.3m49.18 50.48c-5.7.99-10.96 3.76-15.38 7.43-10.4 8.93-14.14 24.81-8.17 37.28 6.33 15.02 25.16 23.1 40.36 17 15.43-5.24 24.78-23.51 19.74-39.06-4.1-15.43-20.92-25.79-36.55-22.65m-267.96 111.99c-5.33.28-10.59 1.92-15.16 4.68-11.47 7.03-17.88 21.74-14.36 34.86 3.09 14.08 16.78 25.06 31.26 24.61 15.03.41 29.08-11.39 31.54-26.17 2.24-10.33-1.61-21.55-9.14-28.85-6.24-6.33-15.3-9.62-24.14-9.13m-115.96 272c-6.62 1.23-12.84 4.58-17.54 9.4-9.45 9.72-11.72 25.57-5.02 37.42 7.16 13.96 25.48 20.86 39.98 14.62 15.02-5.51 23.99-23.42 19.06-38.71-4.04-15.41-20.86-25.96-36.48-22.73m111.98 272.05c-11.49 1.95-21.48 10.72-24.84 21.88-3.87 11.63-.13 25.16 8.9 33.36 6.15 5.48 14.4 8.7 22.67 8.32 11.16-.25 21.98-6.87 27.12-16.8 4.93-8.83 5.15-20.02.71-29.1-5.82-12.78-20.81-20.33-34.56-17.66m272.06 112.03c-11.76 2.02-21.92 11.07-25.09 22.6-3.87 12.57 1.13 27.25 11.91 34.79 7.86 5.79 18.42 7.67 27.77 4.86 9.61-2.77 17.7-10.24 21.07-19.68 4.97-12.74.36-28.32-10.58-36.46-7.02-5.45-16.35-7.67-25.08-6.11z\" fill=\"#a0a0a0\"/>\n <g fill=\"#c1c1c1\">\n <path d=\"m506.25 96.4c15.63-3.14 32.45 7.22 36.55 22.65 5.04 15.55-4.31 33.82-19.74 39.06-15.2 6.1-34.03-1.98-40.36-17-5.97-12.47-2.23-28.35 8.17-37.28 4.42-3.67 9.68-6.44 15.38-7.43z\"/>\n <path d=\"m122.33 480.39c15.62-3.23 32.44 7.32 36.48 22.73 4.93 15.29-4.04 33.2-19.06 38.71-14.5 6.24-32.82-.66-39.98-14.62-6.7-11.85-4.43-27.7 5.02-37.42 4.7-4.82 10.92-8.17 17.54-9.4z\"/>\n </g>\n <path d=\"m843.72 180.25.11-.11c24.64 25.12 46.96 52.6 65.61 82.47 36.01 57.16 59.38 122.22 67.87 189.25 5.67 44.88 5.27 90.6-2.05 135.27-12.7 80.01-46.94 156.41-97.9 219.36-42.3 52.48-95.87 96.04-156.41 125.76l-.63-.26c-1.01-1.1-2.03-2.16-3.05-3.22-40.75-40.93-81.69-81.68-122.43-122.63-2.49-2.25-4.76-6.77-8.73-4.86-36.15 9.23-74.03 11.65-111.05 7-43.2-5.26-85.17-20.24-121.96-43.48-31.92-20.07-59.98-46.26-82.22-76.71-23.96-32.74-41.2-70.42-50.05-110.03-11.01-48.43-9.88-99.62 3.76-147.4 18.19-65.13 59.56-123.4 114.8-162.35 44.52-31.81 98.03-50.78 152.63-54.3 48.33-3.34 97.5 5.38 141.72 25.2 33.28 14.72 63.52 35.92 89.47 61.37 40.26-40.02 80.2-80.36 120.51-120.33m-351.75 183.97c-21.23 2.85-41.89 10.28-59.88 21.94-23.08 14.45-41.76 35.58-53.9 59.91-14.58 29.2-18.64 63.21-12.5 95.17 3.93 19.85 12.03 38.88 23.56 55.51 7.93 11.52 17.65 21.66 27.65 31.38 57.33 57.41 114.61 114.86 171.99 172.21 49.09-13.07 94.67-38.94 131.05-74.4 45.11-43.34 75.66-101.44 86.31-163.06.24-1.04.22-2.91 1.85-2.6 29.63.04 59.26-.01 88.9.05 19.04-.3 36.87-14.77 40.76-33.46.22-1.21 0-2.32-.67-3.35 1.22-5.71 2.08-11.58 1.38-17.43l-.24.4c-2.05-20.34-20.84-37.12-41.25-37.17-80.64-.07-161.28-.01-241.93-.07-6.44-22.08-18.5-42.33-34.03-59.23-25.8-27.5-62.26-45.01-100.02-46.82-9.68.02-19.44-.54-29.03 1.02m286.37 388.31c-12.64 2.06-23.37 12.59-25.7 25.18-1.48 8.14-.14 17.02 4.73 23.85 5.76 9.2 16.8 14.76 27.61 14.25 8.32.03 16.28-3.95 22.16-9.66 4.87-5.6 8.45-12.67 8.67-20.2.86-11.37-5.06-23.1-14.87-28.96-6.52-4.46-14.89-5.75-22.6-4.46z\" fill=\"#686868\"/>\n <path d=\"m238.29 208.39c8.84-.49 17.9 2.8 24.14 9.13 7.53 7.3 11.38 18.52 9.14 28.85-2.46 14.78-16.51 26.58-31.54 26.17-14.48.45-28.17-10.53-31.26-24.61-3.52-13.12 2.89-27.83 14.36-34.86 4.57-2.76 9.83-4.4 15.16-4.68z\" fill=\"#c3c3c3\"/>\n <path d=\"m491.97 364.22c9.59-1.56 19.35-1 29.03-1.02 37.76 1.81 74.22 19.32 100.02 46.82 15.53 16.9 27.59 37.15 34.03 59.23-47.67-.01-95.35-.01-143.03-.01-12.19-.11-24.23 5.42-32.21 14.61-6.01 6.85-9.74 15.65-10.44 24.74-1.19 14.17 5.36 28.7 16.69 37.28 7.62 5.91 17.28 9 26.92 8.8 126.69-.04 253.39-.06 380.08.03 4.76.04 9.59-.15 14.2-1.48 14.21-3.82 26.02-15.47 29.83-29.7.67 1.03.89 2.14.67 3.35-3.89 18.69-21.72 33.16-40.76 33.46-29.64-.06-59.27-.01-88.9-.05-1.63-.31-1.61 1.56-1.85 2.6-10.65 61.62-41.2 119.72-86.31 163.06-36.38 35.46-81.96 61.33-131.05 74.4-57.38-57.35-114.66-114.8-171.99-172.21-10-9.72-19.72-19.86-27.65-31.38-11.53-16.63-19.63-35.66-23.56-55.51-6.14-31.96-2.08-65.97 12.5-95.17 12.14-24.33 30.82-45.46 53.9-59.91 17.99-11.66 38.65-19.09 59.88-21.94z\" fill=\"#474747\"/>\n <g fill=\"#bfbfbf\">\n <path d=\"m479.81 483.85c7.98-9.19 20.02-14.72 32.21-14.61 47.68 0 95.36 0 143.03.01 80.65.06 161.29 0 241.93.07 20.41.05 39.2 16.83 41.25 37.17-.19.33-.58.97-.78 1.29-3.68-18.51-21.57-33.16-40.47-33.05-124.97.1-249.94.12-374.91.17-7.73.13-15.74-.8-23.15 1.96-9.06 2.84-16.73 9.1-22.27 16.7-3.34 4.55-4.39 10.24-7.28 15.03.7-9.09 4.43-17.89 10.44-24.74z\"/>\n <path d=\"m234.31 752.44c13.75-2.67 28.74 4.88 34.56 17.66 4.44 9.08 4.22 20.27-.71 29.1-5.14 9.93-15.96 16.55-27.12 16.8-8.27.38-16.52-2.84-22.67-8.32-9.03-8.2-12.77-21.73-8.9-33.36 3.36-11.16 13.35-19.93 24.84-21.88z\"/>\n </g>\n <path d=\"m498.92 476.86c7.41-2.76 15.42-1.83 23.15-1.96 124.97-.05 249.94-.07 374.91-.17 18.9-.11 36.79 14.54 40.47 33.05.2-.32.59-.96.78-1.29l.24-.4c.7 5.85-.16 11.72-1.38 17.43-3.81 14.23-15.62 25.88-29.83 29.7-4.61 1.33-9.44 1.52-14.2 1.48-126.69-.09-253.39-.07-380.08-.03-9.64.2-19.3-2.89-26.92-8.8-11.33-8.58-17.88-23.11-16.69-37.28 2.89-4.79 3.94-10.48 7.28-15.03 5.54-7.6 13.21-13.86 22.27-16.7z\" fill=\"#b0b0b0\"/>\n <path d=\"m59.49 636.08c.99 1.52 2.09 3.04 2.52 4.85 3.62 13.71 8.92 26.88 13.88 40.15 3.88 9.31 7.78 18.62 12.25 27.67 3.26 8.08 7.9 15.48 11.9 23.2 17.96 32.76 39.76 63.48 65.17 90.87 15.01 17.34 32.26 32.54 49.72 47.35 22.1 17.72 45.46 33.94 70.33 47.54 59.64 33.1 126.66 52.67 194.71 57.18 81.31 5.74 163.99-10.52 237.3-46.12 1.02 1.06 2.04 2.12 3.05 3.22l.03.61c-42.32 21.03-87.88 35.53-134.56 42.91-56.91 8.9-115.46 7.49-171.82-4.5-67.89-14.35-132.42-44.21-187.42-86.51-63.52-48.63-114.32-113.73-145.86-187.27-8.42-19.87-15.93-40.22-21.2-61.15z\" fill=\"#939393\"/>\n <path d=\"m778.34 752.53c7.71-1.29 16.08 0 22.6 4.46 9.81 5.86 15.73 17.59 14.87 28.96-.22 7.53-3.8 14.6-8.67 20.2-5.88 5.71-13.84 9.69-22.16 9.66-10.81.51-21.85-5.05-27.61-14.25-4.87-6.83-6.21-15.71-4.73-23.85 2.33-12.59 13.06-23.12 25.7-25.18z\" fill=\"#767676\"/>\n <path d=\"m506.37 864.47c8.73-1.56 18.06.66 25.08 6.11 10.94 8.14 15.55 23.72 10.58 36.46-3.37 9.44-11.46 16.91-21.07 19.68-9.35 2.81-19.91.93-27.77-4.86-10.78-7.54-15.78-22.22-11.91-34.79 3.17-11.53 13.33-20.58 25.09-22.6z\" fill=\"#bebebe\"/>\n </svg>\n </a>\n Google Authenticator\n </span>\n </div>\n </div>\n \n </div>\n\n <div *ngIf=\"mode === 'code-input'\" class=\"code-input\">\n <div>\n Enter the 6-digit code you see in the App.\n </div>\n\n <app-code-input\n [codeLength]=\"6\"\n (codeChanged)=\"codeChanged($event)\">\n </app-code-input>\n \n <div class=\"checkboxes\">\n <mat-checkbox name=\"default\" [(ngModel)]=\"default\" [disableRipple]=\"true\">\n Make this the default 2-step verification method\n </mat-checkbox>\n </div>\n </div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <ng-container *ngIf=\"appType\">\n <button\n *ngIf=\"mode === 'qr-code'\"\n type=\"button\"\n mat-button\n color=\"primary\"\n (click)=\"next()\">\n Next\n </button>\n <button\n *ngIf=\"mode === 'code-input'\"\n type=\"submit\"\n mat-button\n color=\"primary\"\n (click)=\"next()\">\n Verify\n </button> \n </ng-container>\n <button\n type=\"button\"\n mat-button\n [mat-dialog-close]=\"null\">\n Cancel\n </button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n", styles: ["ul{margin:0;padding-left:24px}qr-code{display:flex;justify-content:center;margin:30px}app-code-input{margin-top:10px}.code-input{width:400px}.app-types{text-align:center;padding:0 40px}.app-types .row{display:flex;justify-content:center}.app-types .row span{display:flex;flex-direction:column;text-align:center;max-width:100px}.app-types .row span+span{margin-left:40px}.checkboxes{margin:8px 0}.checkboxes mat-checkbox{display:block}\n"], components: [{ type: i3__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: QrCodeComponent, selector: "app-qr-code", inputs: ["value"] }, { type: CodeInputComponent, selector: "app-code-input", inputs: ["codeLength", "code"], outputs: ["codeCompleted", "codeChanged"] }, { type: i6__namespace$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i6__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i8__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i8__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i8__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9__namespace.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i9__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i11__namespace.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i8__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i9__namespace.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i9__namespace.FsSubmitButtonDirective, selector: "button[type=\"submit\"]", inputs: ["name", "dirtySubmit"] }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
604
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AppComponent, decorators: [{
605
- type: i0.Component,
606
- args: [{
607
- templateUrl: './app.component.html',
608
- styleUrls: ['./app.component.scss'],
609
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
610
- }]
611
- }], ctorParameters: function () {
612
- return [{ type: undefined, decorators: [{
613
- type: i0.Inject,
614
- args: [i1.MAT_DIALOG_DATA]
615
- }] }, { type: i1__namespace.MatDialogRef }, { type: i0__namespace.ChangeDetectorRef }, { type: i2__namespace.FsMessage }];
616
- }, propDecorators: { form: [{
617
- type: i0.ViewChild,
618
- args: [i9.FsFormDirective]
619
- }] } });
538
+ var DefautledModule = /** @class */ (function () {
539
+ function DefautledModule() {
540
+ }
541
+ return DefautledModule;
542
+ }());
543
+ DefautledModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DefautledModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
544
+ DefautledModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DefautledModule, declarations: [DefaultedComponent], exports: [DefaultedComponent] });
545
+ DefautledModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DefautledModule });
546
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DefautledModule, decorators: [{
547
+ type: i0.NgModule,
548
+ args: [{
549
+ declarations: [
550
+ DefaultedComponent,
551
+ ],
552
+ exports: [DefaultedComponent],
553
+ }]
554
+ }] });
620
555
 
621
- var EmailComponent = /** @class */ (function () {
622
- function EmailComponent(_data, _dialogRef, _cdRef, _message) {
623
- var _this = this;
624
- this._data = _data;
625
- this._dialogRef = _dialogRef;
626
- this._cdRef = _cdRef;
627
- this._message = _message;
628
- this.verificationMethod = null;
629
- this.trustDevice = true;
630
- this.resend = function () {
631
- return _this.twoFactorManageService.verificationMethodResend()
632
- .pipe(operators.tap(function () {
633
- _this._message.success('Resent verification code');
634
- }));
635
- };
636
- this.submit = function () {
637
- return rxjs.of(true)
638
- .pipe(operators.switchMap(function () {
639
- return _this.verificationMethod ?
640
- _this.twoFactorManageService.verificationMethodVerify$(_this.code, _this.trustDevice)
641
- .pipe(operators.tap(function (verificationMethod) {
642
- _this._message.success('Created email verification method');
643
- _this._dialogRef.close(verificationMethod);
644
- })) :
645
- _this.twoFactorManageService.verificationMethodCreate$({
646
- type: exports.VerificationMethodType.Email,
647
- email: _this.email,
648
- default: _this.default,
649
- })
650
- .pipe(operators.tap(function (verificationMethod) {
651
- _this.verificationMethod = verificationMethod;
652
- _this.form.clear();
653
- _this._cdRef.markForCheck();
654
- }));
655
- }));
656
- };
657
- this.twoFactorManageService = _data.twoFactorManageService;
658
- this.default = !this.twoFactorManageService.hasVerificationMethods;
659
- }
660
- EmailComponent.prototype.codeCompleted = function () {
661
- if (!this.form.submitting) {
662
- this.form.triggerSubmit();
663
- }
664
- };
665
- EmailComponent.prototype.codeChanged = function (code) {
666
- this.code = code;
667
- };
668
- return EmailComponent;
669
- }());
670
- EmailComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: EmailComponent, deps: [{ token: i1.MAT_DIALOG_DATA }, { token: i1__namespace.MatDialogRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i2__namespace.FsMessage }], target: i0__namespace.ɵɵFactoryTarget.Component });
671
- EmailComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: EmailComponent, selector: "ng-component", viewQueries: [{ propertyName: "form", first: true, predicate: i9.FsFormDirective, descendants: true }], ngImport: i0__namespace, template: "<form fsForm [submit]=\"submit\">\n <fs-dialog>\n <h1 mat-dialog-title>\n Email Setup\n </h1>\n <mat-dialog-content>\n <ng-container *ngIf=\"verificationMethod; else notVerificationMethod\">\n <fs-2fa-verification\n [verificationMethod]=\"verificationMethod\"\n (codeChanged)=\"codeChanged($event)\"\n [resend]=\"resend\"\n [(trustDevice)]=\"trustDevice\">\n </fs-2fa-verification>\n </ng-container>\n\n <ng-template #notVerificationMethod>\n <p>The app will only use this email for verifying your account security. </p>\n <mat-form-field>\n <mat-label>Email</mat-label>\n <input\n matInput\n [required]=\"true\"\n [(ngModel)]=\"email\"\n [fsFormEmail]=\"true\"\n name=\"email\">\n </mat-form-field>\n <mat-checkbox \n name=\"default\"\n [(ngModel)]=\"default\"\n [disableRipple]=\"true\">\n Make this the default 2-step verification method\n </mat-checkbox>\n </ng-template>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n color=\"primary\"\n type=\"submit\">\n Next\n </button>\n <button\n mat-button\n type=\"button\"\n [mat-dialog-close]=\"undefined\">\n Cancel\n </button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n", styles: [":host ::ng-deep mat-checkbox .mat-ripple{display:none}mat-form-field{width:100%}mat-dialog-content{width:400px}p{margin-top:0}app-code-input{margin-bottom:5px;display:block}\n"], components: [{ type: i3__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: Fs2faVerificationComponent, selector: "fs-2fa-verification", inputs: ["verificationMethod", "resend", "showTrustedDevice", "trustDevice", "trustDays", "formatRecipient", "getVerificationMethods", "selectVerificationMethod"], outputs: ["verified", "codeChanged", "codeCompleted", "trustDeviceChange"] }, { type: i5__namespace$1.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i6__namespace$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i6__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i8__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i8__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i8__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9__namespace.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i9__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$1.MatLabel, selector: "mat-label" }, { type: i11__namespace$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i8__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i8__namespace.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i8__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i9__namespace.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { type: i9__namespace.FsFormEmailDirective, selector: "[fsFormEmail]", inputs: ["fsFormEmail", "fsFormEmailMessage"] }, { type: i9__namespace.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i9__namespace.FsSubmitButtonDirective, selector: "button[type=\"submit\"]", inputs: ["name", "dirtySubmit"] }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
672
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: EmailComponent, decorators: [{
673
- type: i0.Component,
674
- args: [{
675
- templateUrl: './email.component.html',
676
- styleUrls: ['./email.component.scss'],
677
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
678
- }]
679
- }], ctorParameters: function () {
680
- return [{ type: undefined, decorators: [{
681
- type: i0.Inject,
682
- args: [i1.MAT_DIALOG_DATA]
683
- }] }, { type: i1__namespace.MatDialogRef }, { type: i0__namespace.ChangeDetectorRef }, { type: i2__namespace.FsMessage }];
684
- }, propDecorators: { form: [{
685
- type: i0.ViewChild,
686
- args: [i9.FsFormDirective, { static: false }]
556
+ var VerificationMethodsComponent = /** @class */ (function () {
557
+ function VerificationMethodsComponent(_prompt) {
558
+ this._prompt = _prompt;
559
+ this.deleted = new i0.EventEmitter();
560
+ this.VerificationMethodType = exports.VerificationMethodType;
561
+ }
562
+ VerificationMethodsComponent.prototype.ngOnInit = function () {
563
+ var _this = this;
564
+ var _a, _b, _c, _d;
565
+ if (!this.verificationMethodDefault && ((_a = this.twoFactorManageService) === null || _a === void 0 ? void 0 : _a.hasVerificationMethodDefault)) {
566
+ this.verificationMethodDefault = function (verificationMethod) {
567
+ return _this.twoFactorManageService.verificationMethodDefault$(verificationMethod);
568
+ };
569
+ }
570
+ if (!this.verificationMethodDelete && ((_b = this.twoFactorManageService) === null || _b === void 0 ? void 0 : _b.hasVerificationMethodDelete)) {
571
+ this.verificationMethodDelete = function (verificationMethod) {
572
+ return _this.twoFactorManageService.verificationMethodDelete$(verificationMethod);
573
+ };
574
+ }
575
+ if (!this.verificationMethodsFetch && ((_c = this.twoFactorManageService) === null || _c === void 0 ? void 0 : _c.hasVerificationMethodsFetch)) {
576
+ this.verificationMethodsFetch = function (query) {
577
+ return _this.twoFactorManageService.verificationMethodsFetch$(query);
578
+ };
579
+ }
580
+ if (!this.accountVerify && ((_d = this.twoFactorManageService) === null || _d === void 0 ? void 0 : _d.hasVerificationMethodVerify)) {
581
+ this.accountVerify = function () {
582
+ var _a;
583
+ return (_a = _this.twoFactorManageService) === null || _a === void 0 ? void 0 : _a.accountVerify$();
584
+ };
585
+ }
586
+ this.listConfig = {
587
+ paging: false,
588
+ rowActions: [
589
+ {
590
+ click: function (verificationMethod) {
591
+ _this.accountVerify()
592
+ .pipe(operators.switchMap(function () { return _this.verificationMethodDefault(verificationMethod); }))
593
+ .subscribe(function () {
594
+ _this.list.reload();
595
+ });
596
+ },
597
+ show: function (data) {
598
+ return !!_this.verificationMethodDefault && !data.default;
599
+ },
600
+ label: 'Set as Default',
601
+ },
602
+ {
603
+ click: function (verificationMethod) {
604
+ _this._prompt.confirm({
605
+ title: 'Confirm',
606
+ template: 'Would you like to delete this verification method?',
607
+ })
608
+ .pipe(operators.switchMap(function () { return _this.accountVerify(); }), operators.switchMap(function () { return _this.verificationMethodDelete(verificationMethod); }))
609
+ .subscribe(function () {
610
+ _this.deleted.emit();
611
+ _this.list.reload();
612
+ });
613
+ },
614
+ show: function () {
615
+ return !!_this.verificationMethodDelete;
616
+ },
617
+ label: 'Delete',
618
+ },
619
+ ],
620
+ fetch: function (query) {
621
+ query = Object.assign(Object.assign({}, query), { type: _this.type });
622
+ return _this.verificationMethodsFetch(query)
623
+ .pipe(operators.map(function (verificationMethods) { return ({
624
+ data: verificationMethods.filter(function (verificationMethod) {
625
+ return !_this.type || verificationMethod.type === _this.type;
626
+ }),
627
+ }); }));
628
+ },
629
+ };
630
+ };
631
+ VerificationMethodsComponent.prototype.reload = function () {
632
+ this.list.reload();
633
+ };
634
+ return VerificationMethodsComponent;
635
+ }());
636
+ VerificationMethodsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: VerificationMethodsComponent, deps: [{ token: i1__namespace$3.FsPrompt }], target: i0__namespace.ɵɵFactoryTarget.Component });
637
+ VerificationMethodsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: VerificationMethodsComponent, selector: "fs-2fa-verification-methods", inputs: { type: "type", accountVerify: "accountVerify", verificationMethodsFetch: "verificationMethodsFetch", verificationMethodDelete: "verificationMethodDelete", verificationMethodDefault: "verificationMethodDefault", twoFactorManageService: "twoFactorManageService" }, outputs: { deleted: "deleted" }, viewQueries: [{ propertyName: "list", first: true, predicate: i2$1.FsListComponent, descendants: true }], ngImport: i0__namespace, template: "<fs-list [config]=\"listConfig\">\n <fs-list-column class=\"col-icon\" width=\"1%\">\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.type === VerificationMethodType.Sms\">\n <mat-icon>textsms</mat-icon>\n </ng-container>\n\n <ng-container *ngIf=\"row.type === VerificationMethodType.Email\">\n <mat-icon>email</mat-icon>\n </ng-container>\n\n <ng-container *ngIf=\"row.type === VerificationMethodType.App\">\n <mat-icon>phone_iphone</mat-icon>\n </ng-container>\n </ng-template>\n </fs-list-column>\n <fs-list-column class=\"col-name\">\n <ng-template fs-list-cell let-row=\"row\">\n <div class=\"row\">\n <ng-container *ngIf=\"row.type === VerificationMethodType.Sms\">\n <div class=\"row\">\n <fs-country [code]=\"row.phoneCountry\" [showName]=\"false\"></fs-country> \n <span>{{row.phoneNumber | fsPhone}}</span>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"row.type === VerificationMethodType.Email\">\n {{row.email}}\n </ng-container>\n\n <ng-container *ngIf=\"row.type === VerificationMethodType.App\">\n App\n </ng-container>\n\n <app-defaulted *ngIf=\"row.default\"></app-defaulted>\n </div>\n </ng-template>\n </fs-list-column>\n</fs-list>", styles: [":host ::ng-deep .col-name .row{display:flex;align-items:center}:host ::ng-deep .col-name fs-country img{display:flex}fs-country{margin-right:5px}app-defaulted{margin-left:5px}\n"], components: [{ type: i2__namespace$1.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i4__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i4__namespace$1.FsCountryComponent, selector: "fs-country", inputs: ["code", "showIcon", "showName", "region", "width"] }, { type: DefaultedComponent, selector: "app-defaulted" }], directives: [{ type: i2__namespace$1.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2__namespace$1.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i9__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "fsPhone": i8__namespace$1.FsPhonePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
638
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: VerificationMethodsComponent, decorators: [{
639
+ type: i0.Component,
640
+ args: [{
641
+ selector: 'fs-2fa-verification-methods',
642
+ templateUrl: './verification-methods.component.html',
643
+ styleUrls: ['./verification-methods.component.scss'],
644
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
645
+ }]
646
+ }], ctorParameters: function () { return [{ type: i1__namespace$3.FsPrompt }]; }, propDecorators: { list: [{
647
+ type: i0.ViewChild,
648
+ args: [i2$1.FsListComponent]
649
+ }], type: [{
650
+ type: i0.Input
651
+ }], accountVerify: [{
652
+ type: i0.Input
653
+ }], verificationMethodsFetch: [{
654
+ type: i0.Input
655
+ }], verificationMethodDelete: [{
656
+ type: i0.Input
657
+ }], verificationMethodDefault: [{
658
+ type: i0.Input
659
+ }], twoFactorManageService: [{
660
+ type: i0.Input
661
+ }], deleted: [{
662
+ type: i0.Output
687
663
  }] } });
688
664
 
689
- var NumberComponent = /** @class */ (function () {
690
- function NumberComponent(_data, _dialogRef, _cdRef, _message) {
691
- var _this = this;
692
- this._data = _data;
693
- this._dialogRef = _dialogRef;
694
- this._cdRef = _cdRef;
695
- this._message = _message;
696
- this.trustDevice = true;
697
- this.verificationMethod = null;
698
- this.resend = function () {
699
- return _this.twoFactorManageService.verificationMethodResend()
700
- .pipe(operators.tap(function () {
701
- _this._message.success('Resent verification code');
702
- }));
703
- };
704
- this.submit = function () {
705
- return rxjs.of(true)
706
- .pipe(operators.switchMap(function () {
707
- return _this.verificationMethod ?
708
- _this.twoFactorManageService.verificationMethodVerify$(_this.code, _this.trustDevice)
709
- .pipe(operators.tap(function (verificationMethod) {
710
- _this._message.success('Created text message verification method');
711
- _this._dialogRef.close(verificationMethod);
712
- })) :
713
- _this.twoFactorManageService.verificationMethodCreate$({
714
- type: exports.VerificationMethodType.Sms,
715
- phoneNumber: _this.phone.number,
716
- phoneCode: _this.phone.countryCode,
717
- phoneCountry: _this.phone.isoCode,
718
- default: _this.default,
719
- })
720
- .pipe(operators.tap(function (verificationMethod) {
721
- _this.verificationMethod = verificationMethod;
722
- _this.form.clear();
723
- _this._cdRef.markForCheck();
724
- }));
725
- }));
726
- };
727
- this.twoFactorManageService = _data.twoFactorManageService;
728
- this.defaultCountry = _data.defaultCountry;
729
- this.default = !this.twoFactorManageService.hasVerificationMethods;
730
- }
731
- NumberComponent.prototype.codeCompleted = function () {
732
- if (!this.form.submitting) {
733
- this.form.triggerSubmit();
734
- }
735
- };
736
- NumberComponent.prototype.codeChanged = function (code) {
737
- this.code = code;
738
- };
739
- return NumberComponent;
740
- }());
741
- NumberComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: NumberComponent, deps: [{ token: i1.MAT_DIALOG_DATA }, { token: i1__namespace.MatDialogRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i2__namespace.FsMessage }], target: i0__namespace.ɵɵFactoryTarget.Component });
742
- NumberComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: NumberComponent, selector: "ng-component", viewQueries: [{ propertyName: "form", first: true, predicate: i9.FsFormDirective, descendants: true }], ngImport: i0__namespace, template: "<form fsForm [submit]=\"submit\" [autocomplete]=\"false\">\n <fs-dialog>\n <h1 mat-dialog-title>\n Text Message Setup\n </h1>\n <mat-dialog-content>\n <ng-container *ngIf=\"verificationMethod; else notVerificationMethod\">\n <fs-2fa-verification\n [verificationMethod]=\"verificationMethod\"\n (codeChanged)=\"codeChanged($event)\"\n [resend]=\"resend\"\n [formatRecipient]=\"true\"\n [(trustDevice)]=\"trustDevice\">\n </fs-2fa-verification>\n </ng-container>\n\n <ng-template #notVerificationMethod>\n <p>The app will only use this number for verifying your account security. Message and data rates may apply by your cell phone provider.</p>\n <mat-form-field>\n <mat-label>Phone number</mat-label>\n <fs-phone-field\n [(ngModel)]=\"phone\"\n [country]=\"defaultCountry\"\n name=\"phone\"\n [mode]=\"'object'\"\n autocomplete=\"off\"\n [required]=\"true\">\n </fs-phone-field>\n </mat-form-field>\n <mat-checkbox \n name=\"default\"\n [(ngModel)]=\"default\"\n [disableRipple]=\"true\">\n Make this the default 2-step verification method\n </mat-checkbox>\n </ng-template>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n color=\"primary\"\n type=\"submit\">\n Next\n </button>\n <button\n mat-button\n type=\"button\"\n [mat-dialog-close]=\"undefined\">\n Cancel\n </button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n", styles: [":host ::ng-deep mat-checkbox .mat-ripple{display:none}app-code-input{margin-bottom:5px;display:block}mat-form-field{width:100%}mat-dialog-content{width:400px}p{margin-top:0}h1{display:flex;align-items:center}h1 mat-icon{margin-right:5px}\n"], components: [{ type: i3__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: Fs2faVerificationComponent, selector: "fs-2fa-verification", inputs: ["verificationMethod", "resend", "showTrustedDevice", "trustDevice", "trustDays", "formatRecipient", "getVerificationMethods", "selectVerificationMethod"], outputs: ["verified", "codeChanged", "codeCompleted", "trustDeviceChange"] }, { type: i5__namespace$1.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i8__namespace$1.FsPhoneFieldComponent, selector: "fs-phone-field", inputs: ["allowNumberExt", "placeholder", "required", "disabled", "mode", "country", "name"] }, { type: i6__namespace$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i6__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i8__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i8__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i8__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9__namespace.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i9__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$1.MatLabel, selector: "mat-label" }, { type: i8__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i9__namespace.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { type: i8__namespace.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i9__namespace.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i9__namespace.FsSubmitButtonDirective, selector: "button[type=\"submit\"]", inputs: ["name", "dirtySubmit"] }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
743
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: NumberComponent, decorators: [{
744
- type: i0.Component,
745
- args: [{
746
- templateUrl: './number.component.html',
747
- styleUrls: ['./number.component.scss'],
748
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
749
- }]
750
- }], ctorParameters: function () {
751
- return [{ type: undefined, decorators: [{
752
- type: i0.Inject,
753
- args: [i1.MAT_DIALOG_DATA]
754
- }] }, { type: i1__namespace.MatDialogRef }, { type: i0__namespace.ChangeDetectorRef }, { type: i2__namespace.FsMessage }];
755
- }, propDecorators: { form: [{
756
- type: i0.ViewChild,
757
- args: [i9.FsFormDirective, { static: false }]
665
+ var Fs2faVerificationMethodsModule = /** @class */ (function () {
666
+ function Fs2faVerificationMethodsModule() {
667
+ }
668
+ return Fs2faVerificationMethodsModule;
669
+ }());
670
+ Fs2faVerificationMethodsModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faVerificationMethodsModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
671
+ Fs2faVerificationMethodsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faVerificationMethodsModule, declarations: [VerificationMethodsComponent], imports: [i9$1.CommonModule,
672
+ i8.FormsModule,
673
+ i4.MatIconModule,
674
+ i2$1.FsListModule,
675
+ i8$1.FsPhoneModule,
676
+ i4$1.FsCountryModule,
677
+ DefautledModule], exports: [VerificationMethodsComponent] });
678
+ Fs2faVerificationMethodsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faVerificationMethodsModule, imports: [[
679
+ i9$1.CommonModule,
680
+ i8.FormsModule,
681
+ i4.MatIconModule,
682
+ i2$1.FsListModule,
683
+ i8$1.FsPhoneModule,
684
+ i4$1.FsCountryModule,
685
+ DefautledModule,
686
+ ]] });
687
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faVerificationMethodsModule, decorators: [{
688
+ type: i0.NgModule,
689
+ args: [{
690
+ imports: [
691
+ i9$1.CommonModule,
692
+ i8.FormsModule,
693
+ i4.MatIconModule,
694
+ i2$1.FsListModule,
695
+ i8$1.FsPhoneModule,
696
+ i4$1.FsCountryModule,
697
+ DefautledModule,
698
+ ],
699
+ declarations: [
700
+ VerificationMethodsComponent,
701
+ ],
702
+ exports: [VerificationMethodsComponent],
703
+ }]
704
+ }] });
705
+
706
+ var QrCodeComponent = /** @class */ (function () {
707
+ function QrCodeComponent(_cdRef) {
708
+ this._cdRef = _cdRef;
709
+ }
710
+ QrCodeComponent.prototype.ngOnInit = function () {
711
+ var _this = this;
712
+ QRCode__default["default"].toDataURL(this.value, {
713
+ errorCorrectionLevel: 'H',
714
+ width: 300,
715
+ height: 300,
716
+ })
717
+ .then(function (url) {
718
+ _this.image = url;
719
+ _this._cdRef.markForCheck();
720
+ })
721
+ .catch(function (err) {
722
+ console.error(err);
723
+ });
724
+ };
725
+ return QrCodeComponent;
726
+ }());
727
+ QrCodeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: QrCodeComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
728
+ QrCodeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: QrCodeComponent, selector: "app-qr-code", inputs: { value: "value" }, ngImport: i0__namespace, template: "<ng-container *ngIf=\"image\">\n <img [src]=\"image\">\n</ng-container>", styles: ["img{display:flex;margin:auto}\n"], directives: [{ type: i9__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
729
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: QrCodeComponent, decorators: [{
730
+ type: i0.Component,
731
+ args: [{
732
+ selector: 'app-qr-code',
733
+ templateUrl: './qr-code.component.html',
734
+ styleUrls: ['./qr-code.component.scss'],
735
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
736
+ }]
737
+ }], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { value: [{
738
+ type: i0.Input
758
739
  }] } });
759
740
 
760
- var TwoFactorManageService = /** @class */ (function () {
761
- function TwoFactorManageService(_dialog) {
762
- this._dialog = _dialog;
763
- this._destroy$ = new rxjs.Subject();
764
- this._verificationMethods$ = new rxjs.BehaviorSubject([]);
765
- }
766
- Object.defineProperty(TwoFactorManageService.prototype, "verificationMethods$", {
767
- get: function () {
768
- return this._verificationMethods$
769
- .pipe(operators.takeUntil(this._destroy$));
770
- },
771
- enumerable: false,
772
- configurable: true
773
- });
774
- Object.defineProperty(TwoFactorManageService.prototype, "verificationMethods", {
775
- get: function () {
776
- return this._verificationMethods$.getValue();
777
- },
778
- enumerable: false,
779
- configurable: true
780
- });
781
- Object.defineProperty(TwoFactorManageService.prototype, "hasVerificationMethods", {
782
- get: function () {
783
- return !!this._verificationMethods$.getValue().length;
784
- },
785
- enumerable: false,
786
- configurable: true
787
- });
788
- Object.defineProperty(TwoFactorManageService.prototype, "emailVerificationMethods", {
789
- get: function () {
790
- return this.getVerificationMethods(exports.VerificationMethodType.Email);
791
- },
792
- enumerable: false,
793
- configurable: true
794
- });
795
- Object.defineProperty(TwoFactorManageService.prototype, "smsVerificationMethods", {
796
- get: function () {
797
- return this.getVerificationMethods(exports.VerificationMethodType.Sms);
798
- },
799
- enumerable: false,
800
- configurable: true
801
- });
802
- Object.defineProperty(TwoFactorManageService.prototype, "appVerificationMethods", {
803
- get: function () {
804
- return this.getVerificationMethods(exports.VerificationMethodType.App);
805
- },
806
- enumerable: false,
807
- configurable: true
808
- });
809
- TwoFactorManageService.prototype.getVerificationMethods = function (type) {
810
- return this.verificationMethods
811
- .filter(function (verificationMethod) {
812
- return verificationMethod.type === type;
813
- });
814
- };
815
- TwoFactorManageService.prototype.hasVerificationMethod = function (type) {
816
- return this.verificationMethods
817
- .some(function (verificationMethod) {
818
- return verificationMethod.type === type;
819
- });
820
- };
821
- TwoFactorManageService.prototype.registerVerificationMethodDefault = function (value) {
822
- this._verificationMethodDefault = value;
823
- };
824
- TwoFactorManageService.prototype.registerVerificationMethodResend = function (value) {
825
- this._verificationMethodResend = value;
826
- };
827
- TwoFactorManageService.prototype.registerVerificationMethodsFetch = function (value) {
828
- this._verificationMethodsFetch = value;
829
- };
830
- TwoFactorManageService.prototype.registerVerificationMethodDelete = function (value) {
831
- this._verificationMethodDelete = value;
832
- };
833
- TwoFactorManageService.prototype.registerVerificationMethodCreate = function (value) {
834
- this._verificationMethodCreate = value;
835
- };
836
- TwoFactorManageService.prototype.registerVerificationMethodVerify = function (value) {
837
- this._verificationMethodVerify = value;
838
- };
839
- TwoFactorManageService.prototype.registerAccountVerify = function (value) {
840
- this._accountVerify = value;
841
- };
842
- Object.defineProperty(TwoFactorManageService.prototype, "hasVerificationMethodResend", {
843
- get: function () {
844
- return !!this._verificationMethodResend;
845
- },
846
- enumerable: false,
847
- configurable: true
848
- });
849
- Object.defineProperty(TwoFactorManageService.prototype, "hasVerificationMethodDefault", {
850
- get: function () {
851
- return !!this._verificationMethodDefault;
852
- },
853
- enumerable: false,
854
- configurable: true
855
- });
856
- Object.defineProperty(TwoFactorManageService.prototype, "hasVerificationMethodsFetch", {
857
- get: function () {
858
- return !!this._verificationMethodsFetch;
859
- },
860
- enumerable: false,
861
- configurable: true
862
- });
863
- Object.defineProperty(TwoFactorManageService.prototype, "hasVerificationMethodDelete", {
864
- get: function () {
865
- return !!this._verificationMethodDelete;
866
- },
867
- enumerable: false,
868
- configurable: true
869
- });
870
- Object.defineProperty(TwoFactorManageService.prototype, "hasVerificationMethodCreate", {
871
- get: function () {
872
- return !!this._verificationMethodCreate;
873
- },
874
- enumerable: false,
875
- configurable: true
876
- });
877
- Object.defineProperty(TwoFactorManageService.prototype, "hasVerificationMethodVerify", {
878
- get: function () {
879
- return !!this._verificationMethodVerify;
880
- },
881
- enumerable: false,
882
- configurable: true
883
- });
884
- TwoFactorManageService.prototype.verificationMethodDelete$ = function (verificationMethod) {
885
- var _this = this;
886
- return this._verificationMethodDelete(verificationMethod)
887
- .pipe(operators.tap(function () {
888
- _this.verificationMethodsFetch();
889
- }));
890
- };
891
- TwoFactorManageService.prototype.verificationMethodVerify$ = function (code, trustDevice) {
892
- var _this = this;
893
- return this._verificationMethodVerify(code, trustDevice)
894
- .pipe(operators.tap(function () {
895
- _this.verificationMethodsFetch();
896
- }));
897
- };
898
- TwoFactorManageService.prototype.verificationMethodCreate$ = function (verificationMethod) {
899
- return this._verificationMethodCreate(verificationMethod);
900
- };
901
- TwoFactorManageService.prototype.verificationMethodDefault$ = function (verificationMethod) {
902
- return this._verificationMethodDefault(verificationMethod);
903
- };
904
- TwoFactorManageService.prototype.verificationMethodResend = function () {
905
- return this._verificationMethodResend();
906
- };
907
- TwoFactorManageService.prototype.verificationMethodsFetch = function (query) {
908
- this.verificationMethodsFetch$(query)
909
- .subscribe();
910
- };
911
- TwoFactorManageService.prototype.verificationMethodsFetch$ = function (query) {
912
- var _this = this;
913
- return this._verificationMethodsFetch(query)
914
- .pipe(operators.tap(function (verificationMethods) {
915
- _this._verificationMethods$.next(verificationMethods);
916
- }));
917
- };
918
- TwoFactorManageService.prototype.accountVerify$ = function () {
919
- return this._accountVerify ? this._accountVerify() : rxjs.of(true);
920
- };
921
- TwoFactorManageService.prototype.ngOnDestroy = function () {
922
- this._destroy$.next();
923
- this._destroy$.complete();
924
- };
925
- TwoFactorManageService.prototype.addSms$ = function (defaultCountry) {
926
- var _this = this;
927
- return this.accountVerify$()
928
- .pipe(operators.switchMap(function () { return _this._dialog.open(NumberComponent, {
929
- data: {
930
- defaultCountry: defaultCountry,
931
- twoFactorManageService: _this,
932
- },
933
- })
934
- .afterClosed(); }), operators.tap(function () {
935
- _this.verificationMethodsFetch();
936
- }), operators.takeUntil(this._destroy$));
937
- };
938
- TwoFactorManageService.prototype.addEmail$ = function () {
939
- var _this = this;
940
- return this.accountVerify$()
941
- .pipe(operators.switchMap(function () { return _this._dialog.open(EmailComponent, {
942
- data: { twoFactorManageService: _this },
943
- })
944
- .afterClosed(); }), operators.tap(function () {
945
- _this.verificationMethodsFetch();
946
- }), operators.takeUntil(this._destroy$));
947
- };
948
- TwoFactorManageService.prototype.addApp$ = function () {
949
- var _this = this;
950
- return this.accountVerify$()
951
- .pipe(operators.switchMap(function () { return _this._dialog.open(AppComponent, {
952
- data: { twoFactorManageService: _this },
953
- })
954
- .afterClosed(); }), operators.tap(function () {
955
- _this.verificationMethodsFetch();
956
- }), operators.takeUntil(this._destroy$));
957
- };
958
- return TwoFactorManageService;
959
- }());
960
- TwoFactorManageService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TwoFactorManageService, deps: [{ token: i1__namespace.MatDialog }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
961
- TwoFactorManageService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TwoFactorManageService });
962
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TwoFactorManageService, decorators: [{
963
- type: i0.Injectable
964
- }], ctorParameters: function () { return [{ type: i1__namespace.MatDialog }]; } });
741
+ var AppComponent = /** @class */ (function () {
742
+ function AppComponent(_data, _dialogRef, _cdRef, _message) {
743
+ var _this = this;
744
+ this._data = _data;
745
+ this._dialogRef = _dialogRef;
746
+ this._cdRef = _cdRef;
747
+ this._message = _message;
748
+ this.mode = 'qr-code';
749
+ this.verify = function () {
750
+ return _this.twoFactorManageService.verificationMethodVerify$(_this.code, true)
751
+ .pipe(operators.switchMap(function () {
752
+ return _this.default && _this.twoFactorManageService.verificationMethodDefault$ ?
753
+ _this.twoFactorManageService.verificationMethodDefault$(_this.verificationMethod) :
754
+ rxjs.of(true);
755
+ }), operators.tap(function () {
756
+ _this._message.success('Created app authenticator verification method');
757
+ _this._dialogRef.close(true);
758
+ }));
759
+ };
760
+ }
761
+ AppComponent.prototype.ngOnInit = function () {
762
+ this.twoFactorManageService = this._data.twoFactorManageService;
763
+ this.accountId = this._data.accountId;
764
+ this.default = !this.twoFactorManageService.hasVerificationMethods;
765
+ };
766
+ AppComponent.prototype.appTypeGoogle = function () {
767
+ this.appTypeSelect('google');
768
+ };
769
+ AppComponent.prototype.appTypeAuthy = function () {
770
+ this.appTypeSelect('authy');
771
+ };
772
+ AppComponent.prototype.appTypeSelect = function (appType) {
773
+ var _this = this;
774
+ this.appType = appType;
775
+ this.twoFactorManageService.verificationMethodCreate$({
776
+ type: exports.VerificationMethodType.App,
777
+ })
778
+ .subscribe(function (verificationMethod) {
779
+ _this.verificationMethod = verificationMethod;
780
+ _this.qrCodeUrl = verificationMethod.qrCodeUrl;
781
+ _this._cdRef.markForCheck();
782
+ });
783
+ };
784
+ AppComponent.prototype.codeCompleted = function () {
785
+ this.form.triggerSubmit();
786
+ };
787
+ AppComponent.prototype.codeChanged = function (code) {
788
+ this.code = code;
789
+ this.form.dirty();
790
+ };
791
+ AppComponent.prototype.next = function () {
792
+ this.mode = 'code-input';
793
+ };
794
+ return AppComponent;
795
+ }());
796
+ AppComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AppComponent, deps: [{ token: i1.MAT_DIALOG_DATA }, { token: i1__namespace.MatDialogRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i2__namespace.FsMessage }], target: i0__namespace.ɵɵFactoryTarget.Component });
797
+ AppComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: AppComponent, selector: "ng-component", viewQueries: [{ propertyName: "form", first: true, predicate: i9.FsFormDirective, descendants: true }], ngImport: i0__namespace, template: "<form fsForm [submit]=\"verify\">\n <fs-dialog>\n <h1 mat-dialog-title>Authenticator App Setup</h1>\n <mat-dialog-content>\n\n <div *ngIf=\"mode === 'qr-code'\" class=\"qr-code\">\n <ng-container *ngIf=\"appType\">\n <ol>\n <li>\n <ng-container *ngIf=\"appType === 'authy'\">\n Install the Authy Authenticator App from the <a href=\"https://apps.apple.com/us/app/authy/id494168017\" target=\"_blank\">App Store</a> or\n the <a href=\"https://play.google.com/store/apps/details?id=com.authy.authy\" target=\"_blank\">Google Play Store</a>.\n </ng-container>\n\n <ng-container *ngIf=\"appType === 'google'\">\n Install the Google Authenticator App from the <a href=\"https://apps.apple.com/us/app/google-authenticator/id388497605\" target=\"_blank\">App Store</a> or\n the <a href=\"https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&hl=en_US&gl=US\" target=\"_blank\">Google Play Store</a>.\n </ng-container>\n </li>\n <ng-container *ngIf=\"appType === 'authy'\">\n <li>\n Open the Authy app and select <b>Add Account</b>.\n </li>\n <li>\n Select <b>Scan QR Code</b> and scan the QR code below.\n </li>\n </ng-container> \n <ng-container *ngIf=\"appType === 'google'\">\n <li>\n Open the Google Authentictor app and click the <b>Plus icon</b> in the lower right corner.\n </li>\n <li>\n Select <b>Scan a QR code</b> and scan the QR code below.\n </li>\n </ng-container>\n </ol>\n\n <ng-container *fsSkeleton=\"qrCodeUrl\">\n <app-qr-code\n [value]=\"qrCodeUrl\">\n </app-qr-code>\n </ng-container>\n </ng-container>\n\n <div class=\"app-types\" *ngIf=\"!appType\">\n <p>Select the Authenticator App you prefer</p>\n\n <div class=\"row\">\n <span>\n <a (click)=\"appTypeAuthy()\">\n <svg width=\"50\" height=\"50\" viewBox=\"0 0 256 256\" xmlns=\"http://www.w3.org/2000/svg\" preserveAspectRatio=\"xMidYMid\"><path d=\"M256 127.998C256 198.696 198.694 256 127.997 256 57.304 256 0 198.696 0 127.998 0 57.305 57.304 0 127.997 0 198.694 0 256 57.305 256 127.998z\" fill=\"#EC1C24\"/><path d=\"M117.024 100.89l30.691 30.68c4.43 4.436 11.623 4.436 16.064 0 4.431-4.435 4.441-11.622 0-16.058L133.086 84.82C111.125 62.854 75.631 62.5 53.204 83.704a9.536 9.536 0 0 0-.605.548c-.098.098-.178.202-.275.29-.1.096-.202.182-.297.278-.194.193-.371.396-.54.597-21.215 22.437-20.85 57.932 1.113 79.897L83.292 196c4.44 4.433 11.623 4.433 16.062 0 4.442-4.437 4.442-11.633.011-16.06l-30.693-30.691c-13.398-13.393-13.488-35.129-.278-48.637 13.506-13.21 35.23-13.114 48.63.279zm39.612-40.873c-4.435 4.437-4.435 11.623.012 16.059l30.681 30.693c13.39 13.392 13.477 35.125.268 48.636-13.51 13.2-35.227 13.112-48.623-.282l-30.692-30.689c-4.438-4.437-11.633-4.437-16.066 0-4.443 4.433-4.443 11.642 0 16.065l30.682 30.694c21.968 21.965 57.458 22.322 79.889 1.116.208-.184.404-.355.61-.549.094-.095.182-.192.273-.29.1-.095.197-.183.29-.289.197-.183.365-.384.54-.594 21.215-22.428 20.86-57.911-1.102-79.889l-30.692-30.682c-4.436-4.443-11.638-4.443-16.07.001z\" fill=\"#FFF\"/></svg>\n </a>\n Authy\n </span>\n \n <span>\n <a (click)=\"appTypeGoogle()\"> \n <svg width=\"50\" height=\"50\" viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"m457.07 45.92c73.67-8.62 149.41.22 218.93 26.24 62.75 23.47 120.59 60.41 167.72 108.09-40.31 39.97-80.25 80.31-120.51 120.33-25.95-25.45-56.19-46.65-89.47-61.37-44.22-19.82-93.39-28.54-141.72-25.2-54.6 3.52-108.11 22.49-152.63 54.3-55.24 38.95-96.61 97.22-114.8 162.35-13.64 47.78-14.77 98.97-3.76 147.4 8.85 39.61 26.09 77.29 50.05 110.03 22.24 30.45 50.3 56.64 82.22 76.71 36.79 23.24 78.76 38.22 121.96 43.48 37.02 4.65 74.9 2.23 111.05-7 3.97-1.91 6.24 2.61 8.73 4.86 40.74 40.95 81.68 81.7 122.43 122.63-73.31 35.6-155.99 51.86-237.3 46.12-68.05-4.51-135.07-24.08-194.71-57.18-24.87-13.6-48.23-29.82-70.33-47.54-17.46-14.81-34.71-30.01-49.72-47.35-25.41-27.39-47.21-58.11-65.17-90.87-4-7.72-8.64-15.12-11.9-23.2-4.47-9.05-8.37-18.36-12.25-27.67-4.96-13.27-10.26-26.44-13.88-40.15-.43-1.81-1.53-3.33-2.52-4.85-8.3-28.66-12.95-58.33-15.44-88.04-2.62-37.36-1.33-75.05 4.78-112.03 12.18-75.48 43.41-147.74 89.86-208.44 30.12-39.5 66.53-74.21 107.46-102.35 62.44-43.11 135.53-70.69 210.92-79.3m49.18 50.48c-5.7.99-10.96 3.76-15.38 7.43-10.4 8.93-14.14 24.81-8.17 37.28 6.33 15.02 25.16 23.1 40.36 17 15.43-5.24 24.78-23.51 19.74-39.06-4.1-15.43-20.92-25.79-36.55-22.65m-267.96 111.99c-5.33.28-10.59 1.92-15.16 4.68-11.47 7.03-17.88 21.74-14.36 34.86 3.09 14.08 16.78 25.06 31.26 24.61 15.03.41 29.08-11.39 31.54-26.17 2.24-10.33-1.61-21.55-9.14-28.85-6.24-6.33-15.3-9.62-24.14-9.13m-115.96 272c-6.62 1.23-12.84 4.58-17.54 9.4-9.45 9.72-11.72 25.57-5.02 37.42 7.16 13.96 25.48 20.86 39.98 14.62 15.02-5.51 23.99-23.42 19.06-38.71-4.04-15.41-20.86-25.96-36.48-22.73m111.98 272.05c-11.49 1.95-21.48 10.72-24.84 21.88-3.87 11.63-.13 25.16 8.9 33.36 6.15 5.48 14.4 8.7 22.67 8.32 11.16-.25 21.98-6.87 27.12-16.8 4.93-8.83 5.15-20.02.71-29.1-5.82-12.78-20.81-20.33-34.56-17.66m272.06 112.03c-11.76 2.02-21.92 11.07-25.09 22.6-3.87 12.57 1.13 27.25 11.91 34.79 7.86 5.79 18.42 7.67 27.77 4.86 9.61-2.77 17.7-10.24 21.07-19.68 4.97-12.74.36-28.32-10.58-36.46-7.02-5.45-16.35-7.67-25.08-6.11z\" fill=\"#a0a0a0\"/>\n <g fill=\"#c1c1c1\">\n <path d=\"m506.25 96.4c15.63-3.14 32.45 7.22 36.55 22.65 5.04 15.55-4.31 33.82-19.74 39.06-15.2 6.1-34.03-1.98-40.36-17-5.97-12.47-2.23-28.35 8.17-37.28 4.42-3.67 9.68-6.44 15.38-7.43z\"/>\n <path d=\"m122.33 480.39c15.62-3.23 32.44 7.32 36.48 22.73 4.93 15.29-4.04 33.2-19.06 38.71-14.5 6.24-32.82-.66-39.98-14.62-6.7-11.85-4.43-27.7 5.02-37.42 4.7-4.82 10.92-8.17 17.54-9.4z\"/>\n </g>\n <path d=\"m843.72 180.25.11-.11c24.64 25.12 46.96 52.6 65.61 82.47 36.01 57.16 59.38 122.22 67.87 189.25 5.67 44.88 5.27 90.6-2.05 135.27-12.7 80.01-46.94 156.41-97.9 219.36-42.3 52.48-95.87 96.04-156.41 125.76l-.63-.26c-1.01-1.1-2.03-2.16-3.05-3.22-40.75-40.93-81.69-81.68-122.43-122.63-2.49-2.25-4.76-6.77-8.73-4.86-36.15 9.23-74.03 11.65-111.05 7-43.2-5.26-85.17-20.24-121.96-43.48-31.92-20.07-59.98-46.26-82.22-76.71-23.96-32.74-41.2-70.42-50.05-110.03-11.01-48.43-9.88-99.62 3.76-147.4 18.19-65.13 59.56-123.4 114.8-162.35 44.52-31.81 98.03-50.78 152.63-54.3 48.33-3.34 97.5 5.38 141.72 25.2 33.28 14.72 63.52 35.92 89.47 61.37 40.26-40.02 80.2-80.36 120.51-120.33m-351.75 183.97c-21.23 2.85-41.89 10.28-59.88 21.94-23.08 14.45-41.76 35.58-53.9 59.91-14.58 29.2-18.64 63.21-12.5 95.17 3.93 19.85 12.03 38.88 23.56 55.51 7.93 11.52 17.65 21.66 27.65 31.38 57.33 57.41 114.61 114.86 171.99 172.21 49.09-13.07 94.67-38.94 131.05-74.4 45.11-43.34 75.66-101.44 86.31-163.06.24-1.04.22-2.91 1.85-2.6 29.63.04 59.26-.01 88.9.05 19.04-.3 36.87-14.77 40.76-33.46.22-1.21 0-2.32-.67-3.35 1.22-5.71 2.08-11.58 1.38-17.43l-.24.4c-2.05-20.34-20.84-37.12-41.25-37.17-80.64-.07-161.28-.01-241.93-.07-6.44-22.08-18.5-42.33-34.03-59.23-25.8-27.5-62.26-45.01-100.02-46.82-9.68.02-19.44-.54-29.03 1.02m286.37 388.31c-12.64 2.06-23.37 12.59-25.7 25.18-1.48 8.14-.14 17.02 4.73 23.85 5.76 9.2 16.8 14.76 27.61 14.25 8.32.03 16.28-3.95 22.16-9.66 4.87-5.6 8.45-12.67 8.67-20.2.86-11.37-5.06-23.1-14.87-28.96-6.52-4.46-14.89-5.75-22.6-4.46z\" fill=\"#686868\"/>\n <path d=\"m238.29 208.39c8.84-.49 17.9 2.8 24.14 9.13 7.53 7.3 11.38 18.52 9.14 28.85-2.46 14.78-16.51 26.58-31.54 26.17-14.48.45-28.17-10.53-31.26-24.61-3.52-13.12 2.89-27.83 14.36-34.86 4.57-2.76 9.83-4.4 15.16-4.68z\" fill=\"#c3c3c3\"/>\n <path d=\"m491.97 364.22c9.59-1.56 19.35-1 29.03-1.02 37.76 1.81 74.22 19.32 100.02 46.82 15.53 16.9 27.59 37.15 34.03 59.23-47.67-.01-95.35-.01-143.03-.01-12.19-.11-24.23 5.42-32.21 14.61-6.01 6.85-9.74 15.65-10.44 24.74-1.19 14.17 5.36 28.7 16.69 37.28 7.62 5.91 17.28 9 26.92 8.8 126.69-.04 253.39-.06 380.08.03 4.76.04 9.59-.15 14.2-1.48 14.21-3.82 26.02-15.47 29.83-29.7.67 1.03.89 2.14.67 3.35-3.89 18.69-21.72 33.16-40.76 33.46-29.64-.06-59.27-.01-88.9-.05-1.63-.31-1.61 1.56-1.85 2.6-10.65 61.62-41.2 119.72-86.31 163.06-36.38 35.46-81.96 61.33-131.05 74.4-57.38-57.35-114.66-114.8-171.99-172.21-10-9.72-19.72-19.86-27.65-31.38-11.53-16.63-19.63-35.66-23.56-55.51-6.14-31.96-2.08-65.97 12.5-95.17 12.14-24.33 30.82-45.46 53.9-59.91 17.99-11.66 38.65-19.09 59.88-21.94z\" fill=\"#474747\"/>\n <g fill=\"#bfbfbf\">\n <path d=\"m479.81 483.85c7.98-9.19 20.02-14.72 32.21-14.61 47.68 0 95.36 0 143.03.01 80.65.06 161.29 0 241.93.07 20.41.05 39.2 16.83 41.25 37.17-.19.33-.58.97-.78 1.29-3.68-18.51-21.57-33.16-40.47-33.05-124.97.1-249.94.12-374.91.17-7.73.13-15.74-.8-23.15 1.96-9.06 2.84-16.73 9.1-22.27 16.7-3.34 4.55-4.39 10.24-7.28 15.03.7-9.09 4.43-17.89 10.44-24.74z\"/>\n <path d=\"m234.31 752.44c13.75-2.67 28.74 4.88 34.56 17.66 4.44 9.08 4.22 20.27-.71 29.1-5.14 9.93-15.96 16.55-27.12 16.8-8.27.38-16.52-2.84-22.67-8.32-9.03-8.2-12.77-21.73-8.9-33.36 3.36-11.16 13.35-19.93 24.84-21.88z\"/>\n </g>\n <path d=\"m498.92 476.86c7.41-2.76 15.42-1.83 23.15-1.96 124.97-.05 249.94-.07 374.91-.17 18.9-.11 36.79 14.54 40.47 33.05.2-.32.59-.96.78-1.29l.24-.4c.7 5.85-.16 11.72-1.38 17.43-3.81 14.23-15.62 25.88-29.83 29.7-4.61 1.33-9.44 1.52-14.2 1.48-126.69-.09-253.39-.07-380.08-.03-9.64.2-19.3-2.89-26.92-8.8-11.33-8.58-17.88-23.11-16.69-37.28 2.89-4.79 3.94-10.48 7.28-15.03 5.54-7.6 13.21-13.86 22.27-16.7z\" fill=\"#b0b0b0\"/>\n <path d=\"m59.49 636.08c.99 1.52 2.09 3.04 2.52 4.85 3.62 13.71 8.92 26.88 13.88 40.15 3.88 9.31 7.78 18.62 12.25 27.67 3.26 8.08 7.9 15.48 11.9 23.2 17.96 32.76 39.76 63.48 65.17 90.87 15.01 17.34 32.26 32.54 49.72 47.35 22.1 17.72 45.46 33.94 70.33 47.54 59.64 33.1 126.66 52.67 194.71 57.18 81.31 5.74 163.99-10.52 237.3-46.12 1.02 1.06 2.04 2.12 3.05 3.22l.03.61c-42.32 21.03-87.88 35.53-134.56 42.91-56.91 8.9-115.46 7.49-171.82-4.5-67.89-14.35-132.42-44.21-187.42-86.51-63.52-48.63-114.32-113.73-145.86-187.27-8.42-19.87-15.93-40.22-21.2-61.15z\" fill=\"#939393\"/>\n <path d=\"m778.34 752.53c7.71-1.29 16.08 0 22.6 4.46 9.81 5.86 15.73 17.59 14.87 28.96-.22 7.53-3.8 14.6-8.67 20.2-5.88 5.71-13.84 9.69-22.16 9.66-10.81.51-21.85-5.05-27.61-14.25-4.87-6.83-6.21-15.71-4.73-23.85 2.33-12.59 13.06-23.12 25.7-25.18z\" fill=\"#767676\"/>\n <path d=\"m506.37 864.47c8.73-1.56 18.06.66 25.08 6.11 10.94 8.14 15.55 23.72 10.58 36.46-3.37 9.44-11.46 16.91-21.07 19.68-9.35 2.81-19.91.93-27.77-4.86-10.78-7.54-15.78-22.22-11.91-34.79 3.17-11.53 13.33-20.58 25.09-22.6z\" fill=\"#bebebe\"/>\n </svg>\n </a>\n Google Authenticator\n </span>\n </div>\n </div>\n \n </div>\n\n <div *ngIf=\"mode === 'code-input'\" class=\"code-input\">\n <div>\n Enter the 6-digit code you see in the App.\n </div>\n\n <app-code-input\n (codeChanged)=\"codeChanged($event)\">\n </app-code-input>\n \n <div class=\"checkboxes\">\n <mat-checkbox name=\"default\" [(ngModel)]=\"default\" [disableRipple]=\"true\">\n Make this the default 2-step verification method\n </mat-checkbox>\n </div>\n </div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <ng-container *ngIf=\"appType\">\n <button\n *ngIf=\"mode === 'qr-code'\"\n type=\"button\"\n mat-button\n color=\"primary\"\n (click)=\"next()\">\n Next\n </button>\n <button\n *ngIf=\"mode === 'code-input'\"\n type=\"submit\"\n mat-button\n color=\"primary\"\n (click)=\"next()\">\n Verify\n </button> \n </ng-container>\n <button\n type=\"button\"\n mat-button\n [mat-dialog-close]=\"null\">\n Cancel\n </button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n", styles: ["ul{margin:0;padding-left:24px}qr-code{display:flex;justify-content:center;margin:30px}app-code-input{margin-top:10px}.code-input{width:400px}.app-types{text-align:center;padding:0 40px}.app-types .row{display:flex;justify-content:center}.app-types .row span{display:flex;flex-direction:column;text-align:center;max-width:100px}.app-types .row span+span{margin-left:40px}.checkboxes{margin:8px 0}.checkboxes mat-checkbox{display:block}\n"], components: [{ type: i3__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: QrCodeComponent, selector: "app-qr-code", inputs: ["value"] }, { type: CodeInputComponent, selector: "app-code-input", inputs: ["codeLength", "code"], outputs: ["codeCompleted", "codeChanged"] }, { type: i6__namespace$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i6__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i8__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i8__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i8__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9__namespace.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i9__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i11__namespace.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i8__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i9__namespace.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i9__namespace.FsSubmitButtonDirective, selector: "button[type=\"submit\"]", inputs: ["name", "dirtySubmit"] }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
798
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AppComponent, decorators: [{
799
+ type: i0.Component,
800
+ args: [{
801
+ templateUrl: './app.component.html',
802
+ styleUrls: ['./app.component.scss'],
803
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
804
+ }]
805
+ }], ctorParameters: function () {
806
+ return [{ type: undefined, decorators: [{
807
+ type: i0.Inject,
808
+ args: [i1.MAT_DIALOG_DATA]
809
+ }] }, { type: i1__namespace.MatDialogRef }, { type: i0__namespace.ChangeDetectorRef }, { type: i2__namespace.FsMessage }];
810
+ }, propDecorators: { form: [{
811
+ type: i0.ViewChild,
812
+ args: [i9.FsFormDirective]
813
+ }] } });
965
814
 
966
- var DefaultedComponent = /** @class */ (function () {
967
- function DefaultedComponent() {
968
- }
969
- return DefaultedComponent;
970
- }());
971
- DefaultedComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DefaultedComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
972
- DefaultedComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DefaultedComponent, selector: "app-defaulted", ngImport: i0__namespace, template: "<span>Default</span>", styles: ["span{font-size:75%;background-color:#02a7f0;padding:2px 4px;border-radius:4px;color:#fff}:host{display:flex}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
973
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DefaultedComponent, decorators: [{
974
- type: i0.Component,
975
- args: [{
976
- selector: 'app-defaulted',
977
- templateUrl: './defaulted.component.html',
978
- styleUrls: ['./defaulted.component.scss'],
979
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
980
- }]
981
- }] });
815
+ var EmailComponent = /** @class */ (function () {
816
+ function EmailComponent(_data, _dialogRef, _cdRef, _message) {
817
+ var _this = this;
818
+ this._data = _data;
819
+ this._dialogRef = _dialogRef;
820
+ this._cdRef = _cdRef;
821
+ this._message = _message;
822
+ this.verificationMethod = null;
823
+ this.trustDevice = true;
824
+ this.resend = function () {
825
+ return _this.twoFactorManageService.verificationMethodResend()
826
+ .pipe(operators.tap(function () {
827
+ _this._message.success('Resent verification code');
828
+ }));
829
+ };
830
+ this.submit = function () {
831
+ return rxjs.of(true)
832
+ .pipe(operators.switchMap(function () {
833
+ return _this.verificationMethod ?
834
+ _this.twoFactorManageService.verificationMethodVerify$(_this.code, _this.trustDevice)
835
+ .pipe(operators.tap(function (verificationMethod) {
836
+ _this._message.success('Created email verification method');
837
+ _this._dialogRef.close(verificationMethod);
838
+ })) :
839
+ _this.twoFactorManageService.verificationMethodCreate$({
840
+ type: exports.VerificationMethodType.Email,
841
+ email: _this.email,
842
+ default: _this.default,
843
+ })
844
+ .pipe(operators.tap(function (verificationMethod) {
845
+ _this.verificationMethod = verificationMethod;
846
+ _this.form.clear();
847
+ _this._cdRef.markForCheck();
848
+ }));
849
+ }));
850
+ };
851
+ this.twoFactorManageService = _data.twoFactorManageService;
852
+ this.default = !this.twoFactorManageService.hasVerificationMethods;
853
+ }
854
+ EmailComponent.prototype.codeCompleted = function () {
855
+ if (!this.form.submitting) {
856
+ this.form.triggerSubmit();
857
+ }
858
+ };
859
+ EmailComponent.prototype.codeChanged = function (code) {
860
+ this.code = code;
861
+ };
862
+ return EmailComponent;
863
+ }());
864
+ EmailComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: EmailComponent, deps: [{ token: i1.MAT_DIALOG_DATA }, { token: i1__namespace.MatDialogRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i2__namespace.FsMessage }], target: i0__namespace.ɵɵFactoryTarget.Component });
865
+ EmailComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: EmailComponent, selector: "ng-component", viewQueries: [{ propertyName: "form", first: true, predicate: i9.FsFormDirective, descendants: true }], ngImport: i0__namespace, template: "<form fsForm [submit]=\"submit\">\n <fs-dialog>\n <h1 mat-dialog-title>\n Email Setup\n </h1>\n <mat-dialog-content>\n <ng-container *ngIf=\"verificationMethod; else notVerificationMethod\">\n <fs-2fa-verification\n [verificationMethod]=\"verificationMethod\"\n (codeChanged)=\"codeChanged($event)\"\n [resend]=\"resend\"\n [(trustDevice)]=\"trustDevice\">\n </fs-2fa-verification>\n </ng-container>\n\n <ng-template #notVerificationMethod>\n <p>The app will only use this email for verifying your account security. </p>\n <mat-form-field>\n <mat-label>Email</mat-label>\n <input\n matInput\n [required]=\"true\"\n [(ngModel)]=\"email\"\n [fsFormEmail]=\"true\"\n name=\"email\">\n </mat-form-field>\n <mat-checkbox \n name=\"default\"\n [(ngModel)]=\"default\"\n [disableRipple]=\"true\">\n Make this the default 2-step verification method\n </mat-checkbox>\n </ng-template>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n color=\"primary\"\n type=\"submit\">\n Next\n </button>\n <button\n mat-button\n type=\"button\"\n [mat-dialog-close]=\"undefined\">\n Cancel\n </button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n", styles: [":host ::ng-deep mat-checkbox .mat-ripple{display:none}mat-form-field{width:100%}mat-dialog-content{width:400px}p{margin-top:0}app-code-input{margin-bottom:5px;display:block}\n"], components: [{ type: i3__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: Fs2faVerificationComponent, selector: "fs-2fa-verification", inputs: ["verificationMethod", "resend", "showTrustedDevice", "trustDevice", "codeLength", "trustDays", "formatRecipient", "getVerificationMethods", "selectVerificationMethod"], outputs: ["verified", "codeChanged", "codeCompleted", "trustDeviceChange"] }, { type: i5__namespace$1.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i6__namespace$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i6__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i8__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i8__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i8__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9__namespace.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i9__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$1.MatLabel, selector: "mat-label" }, { type: i11__namespace$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i8__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i8__namespace.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i8__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i9__namespace.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { type: i9__namespace.FsFormEmailDirective, selector: "[fsFormEmail]", inputs: ["fsFormEmail", "fsFormEmailMessage"] }, { type: i9__namespace.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i9__namespace.FsSubmitButtonDirective, selector: "button[type=\"submit\"]", inputs: ["name", "dirtySubmit"] }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
866
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: EmailComponent, decorators: [{
867
+ type: i0.Component,
868
+ args: [{
869
+ templateUrl: './email.component.html',
870
+ styleUrls: ['./email.component.scss'],
871
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
872
+ }]
873
+ }], ctorParameters: function () {
874
+ return [{ type: undefined, decorators: [{
875
+ type: i0.Inject,
876
+ args: [i1.MAT_DIALOG_DATA]
877
+ }] }, { type: i1__namespace.MatDialogRef }, { type: i0__namespace.ChangeDetectorRef }, { type: i2__namespace.FsMessage }];
878
+ }, propDecorators: { form: [{
879
+ type: i0.ViewChild,
880
+ args: [i9.FsFormDirective, { static: false }]
881
+ }] } });
982
882
 
983
- var VerificationMethodsComponent = /** @class */ (function () {
984
- function VerificationMethodsComponent(_prompt) {
985
- this._prompt = _prompt;
986
- this.deleted = new i0.EventEmitter();
987
- this.VerificationMethodType = exports.VerificationMethodType;
988
- }
989
- VerificationMethodsComponent.prototype.ngOnInit = function () {
990
- var _this = this;
991
- var _a, _b, _c, _d;
992
- if (!this.verificationMethodDefault && ((_a = this.twoFactorManageService) === null || _a === void 0 ? void 0 : _a.hasVerificationMethodDefault)) {
993
- this.verificationMethodDefault = function (verificationMethod) {
994
- return _this.twoFactorManageService.verificationMethodDefault$(verificationMethod);
995
- };
996
- }
997
- if (!this.verificationMethodDelete && ((_b = this.twoFactorManageService) === null || _b === void 0 ? void 0 : _b.hasVerificationMethodDelete)) {
998
- this.verificationMethodDelete = function (verificationMethod) {
999
- return _this.twoFactorManageService.verificationMethodDelete$(verificationMethod);
1000
- };
1001
- }
1002
- if (!this.verificationMethodsFetch && ((_c = this.twoFactorManageService) === null || _c === void 0 ? void 0 : _c.hasVerificationMethodsFetch)) {
1003
- this.verificationMethodsFetch = function (query) {
1004
- return _this.twoFactorManageService.verificationMethodsFetch$(query);
1005
- };
1006
- }
1007
- if (!this.accountVerify && ((_d = this.twoFactorManageService) === null || _d === void 0 ? void 0 : _d.hasVerificationMethodVerify)) {
1008
- this.accountVerify = function () {
1009
- var _a;
1010
- return (_a = _this.twoFactorManageService) === null || _a === void 0 ? void 0 : _a.accountVerify$();
1011
- };
1012
- }
1013
- this.listConfig = {
1014
- paging: false,
1015
- rowActions: [
1016
- {
1017
- click: function (verificationMethod) {
1018
- _this.accountVerify()
1019
- .pipe(operators.switchMap(function () { return _this.verificationMethodDefault(verificationMethod); }))
1020
- .subscribe(function () {
1021
- _this.list.reload();
1022
- });
1023
- },
1024
- show: function (data) {
1025
- return !!_this.verificationMethodDefault && !data.default;
1026
- },
1027
- label: 'Set as Default',
1028
- },
1029
- {
1030
- click: function (verificationMethod) {
1031
- _this._prompt.confirm({
1032
- title: 'Confirm',
1033
- template: 'Would you like to delete this verification method?',
1034
- })
1035
- .pipe(operators.switchMap(function () { return _this.accountVerify(); }), operators.switchMap(function () { return _this.verificationMethodDelete(verificationMethod); }))
1036
- .subscribe(function () {
1037
- _this.deleted.emit();
1038
- _this.list.reload();
1039
- });
1040
- },
1041
- show: function () {
1042
- return !!_this.verificationMethodDelete;
1043
- },
1044
- label: 'Delete',
1045
- },
1046
- ],
1047
- fetch: function (query) {
1048
- query = Object.assign(Object.assign({}, query), { type: _this.type });
1049
- return _this.verificationMethodsFetch(query)
1050
- .pipe(operators.map(function (verificationMethods) { return ({
1051
- data: verificationMethods.filter(function (verificationMethod) {
1052
- return !_this.type || verificationMethod.type === _this.type;
1053
- }),
1054
- }); }));
1055
- },
1056
- };
1057
- };
1058
- VerificationMethodsComponent.prototype.reload = function () {
1059
- this.list.reload();
1060
- };
1061
- return VerificationMethodsComponent;
1062
- }());
1063
- VerificationMethodsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: VerificationMethodsComponent, deps: [{ token: i1__namespace$3.FsPrompt }], target: i0__namespace.ɵɵFactoryTarget.Component });
1064
- VerificationMethodsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: VerificationMethodsComponent, selector: "fs-2fa-verification-methods", inputs: { type: "type", accountVerify: "accountVerify", verificationMethodsFetch: "verificationMethodsFetch", verificationMethodDelete: "verificationMethodDelete", verificationMethodDefault: "verificationMethodDefault", twoFactorManageService: "twoFactorManageService" }, outputs: { deleted: "deleted" }, viewQueries: [{ propertyName: "list", first: true, predicate: i2$1.FsListComponent, descendants: true }], ngImport: i0__namespace, template: "<fs-list [config]=\"listConfig\">\n <fs-list-column class=\"col-icon\" width=\"1%\">\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.type === VerificationMethodType.Sms\">\n <mat-icon>textsms</mat-icon>\n </ng-container>\n\n <ng-container *ngIf=\"row.type === VerificationMethodType.Email\">\n <mat-icon>email</mat-icon>\n </ng-container>\n\n <ng-container *ngIf=\"row.type === VerificationMethodType.App\">\n <mat-icon>phone_iphone</mat-icon>\n </ng-container>\n </ng-template>\n </fs-list-column>\n <fs-list-column class=\"col-name\">\n <ng-template fs-list-cell let-row=\"row\">\n <div class=\"row\">\n <ng-container *ngIf=\"row.type === VerificationMethodType.Sms\">\n <div class=\"row\">\n <fs-country [code]=\"row.phoneCountry\" [showName]=\"false\"></fs-country> \n <span>{{row.phoneNumber | fsPhone}}</span>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"row.type === VerificationMethodType.Email\">\n {{row.email}}\n </ng-container>\n\n <ng-container *ngIf=\"row.type === VerificationMethodType.App\">\n App\n </ng-container>\n\n <app-defaulted *ngIf=\"row.default\"></app-defaulted>\n </div>\n </ng-template>\n </fs-list-column>\n</fs-list>", styles: [":host ::ng-deep .col-name .row{display:flex;align-items:center}:host ::ng-deep .col-name fs-country img{display:flex}fs-country{margin-right:5px}app-defaulted{margin-left:5px}\n"], components: [{ type: i2__namespace$1.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i4__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i4__namespace$1.FsCountryComponent, selector: "fs-country", inputs: ["code", "showIcon", "showName", "region", "width"] }, { type: DefaultedComponent, selector: "app-defaulted" }], directives: [{ type: i2__namespace$1.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2__namespace$1.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i9__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "fsPhone": i8__namespace$1.FsPhonePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1065
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: VerificationMethodsComponent, decorators: [{
1066
- type: i0.Component,
1067
- args: [{
1068
- selector: 'fs-2fa-verification-methods',
1069
- templateUrl: './verification-methods.component.html',
1070
- styleUrls: ['./verification-methods.component.scss'],
1071
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1072
- }]
1073
- }], ctorParameters: function () { return [{ type: i1__namespace$3.FsPrompt }]; }, propDecorators: { list: [{
1074
- type: i0.ViewChild,
1075
- args: [i2$1.FsListComponent]
1076
- }], type: [{
1077
- type: i0.Input
1078
- }], accountVerify: [{
1079
- type: i0.Input
1080
- }], verificationMethodsFetch: [{
1081
- type: i0.Input
1082
- }], verificationMethodDelete: [{
1083
- type: i0.Input
1084
- }], verificationMethodDefault: [{
1085
- type: i0.Input
1086
- }], twoFactorManageService: [{
1087
- type: i0.Input
1088
- }], deleted: [{
1089
- type: i0.Output
883
+ var NumberComponent = /** @class */ (function () {
884
+ function NumberComponent(_data, _dialogRef, _cdRef, _message) {
885
+ var _this = this;
886
+ this._data = _data;
887
+ this._dialogRef = _dialogRef;
888
+ this._cdRef = _cdRef;
889
+ this._message = _message;
890
+ this.trustDevice = true;
891
+ this.verificationMethod = null;
892
+ this.resend = function () {
893
+ return _this.twoFactorManageService.verificationMethodResend()
894
+ .pipe(operators.tap(function () {
895
+ _this._message.success('Resent verification code');
896
+ }));
897
+ };
898
+ this.submit = function () {
899
+ return rxjs.of(true)
900
+ .pipe(operators.switchMap(function () {
901
+ return _this.verificationMethod ?
902
+ _this.twoFactorManageService.verificationMethodVerify$(_this.code, _this.trustDevice)
903
+ .pipe(operators.tap(function (verificationMethod) {
904
+ _this._message.success('Created text message verification method');
905
+ _this._dialogRef.close(verificationMethod);
906
+ })) :
907
+ _this.twoFactorManageService.verificationMethodCreate$({
908
+ type: exports.VerificationMethodType.Sms,
909
+ phoneNumber: _this.phone.number,
910
+ phoneCode: _this.phone.countryCode,
911
+ phoneCountry: _this.phone.isoCode,
912
+ default: _this.default,
913
+ })
914
+ .pipe(operators.tap(function (verificationMethod) {
915
+ _this.verificationMethod = verificationMethod;
916
+ _this.form.clear();
917
+ _this._cdRef.markForCheck();
918
+ }));
919
+ }));
920
+ };
921
+ this.twoFactorManageService = _data.twoFactorManageService;
922
+ this.defaultCountry = _data.defaultCountry;
923
+ this.default = !this.twoFactorManageService.hasVerificationMethods;
924
+ }
925
+ NumberComponent.prototype.codeCompleted = function () {
926
+ if (!this.form.submitting) {
927
+ this.form.triggerSubmit();
928
+ }
929
+ };
930
+ NumberComponent.prototype.codeChanged = function (code) {
931
+ this.code = code;
932
+ };
933
+ return NumberComponent;
934
+ }());
935
+ NumberComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: NumberComponent, deps: [{ token: i1.MAT_DIALOG_DATA }, { token: i1__namespace.MatDialogRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i2__namespace.FsMessage }], target: i0__namespace.ɵɵFactoryTarget.Component });
936
+ NumberComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: NumberComponent, selector: "ng-component", viewQueries: [{ propertyName: "form", first: true, predicate: i9.FsFormDirective, descendants: true }], ngImport: i0__namespace, template: "<form fsForm [submit]=\"submit\" [autocomplete]=\"false\">\n <fs-dialog>\n <h1 mat-dialog-title>\n Text Message Setup\n </h1>\n <mat-dialog-content>\n <ng-container *ngIf=\"verificationMethod; else notVerificationMethod\">\n <fs-2fa-verification\n [verificationMethod]=\"verificationMethod\"\n (codeChanged)=\"codeChanged($event)\"\n [resend]=\"resend\"\n [formatRecipient]=\"true\"\n [(trustDevice)]=\"trustDevice\">\n </fs-2fa-verification>\n </ng-container>\n\n <ng-template #notVerificationMethod>\n <p>The app will only use this number for verifying your account security. Message and data rates may apply by your cell phone provider.</p>\n <mat-form-field>\n <mat-label>Phone number</mat-label>\n <input \n matInput\n fsPhoneField\n [(ngModel)]=\"phone\"\n [required]=\"true\"\n [country]=\"defaultCountry\"\n [mode]=\"'object'\"\n autocomplete=\"off\"\n name=\"phone\">\n </mat-form-field>\n <mat-checkbox \n name=\"default\"\n [(ngModel)]=\"default\"\n [disableRipple]=\"true\">\n Make this the default 2-step verification method\n </mat-checkbox>\n </ng-template>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n color=\"primary\"\n type=\"submit\">\n Next\n </button>\n <button\n mat-button\n type=\"button\"\n [mat-dialog-close]=\"undefined\">\n Cancel\n </button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n", styles: [":host ::ng-deep mat-checkbox .mat-ripple{display:none}app-code-input{margin-bottom:5px;display:block}mat-form-field{width:100%}mat-dialog-content{width:400px}p{margin-top:0}h1{display:flex;align-items:center}h1 mat-icon{margin-right:5px}\n"], components: [{ type: i3__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: Fs2faVerificationComponent, selector: "fs-2fa-verification", inputs: ["verificationMethod", "resend", "showTrustedDevice", "trustDevice", "codeLength", "trustDays", "formatRecipient", "getVerificationMethods", "selectVerificationMethod"], outputs: ["verified", "codeChanged", "codeCompleted", "trustDeviceChange"] }, { type: i5__namespace$1.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i8__namespace$1.FsPhoneFieldComponent, selector: "[fsPhoneField]", inputs: ["allowNumberExt", "placeholder", "required", "disabled", "mode", "country", "autocomplete"] }, { type: i6__namespace$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i6__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i8__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i8__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i8__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9__namespace.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i9__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$1.MatLabel, selector: "mat-label" }, { type: i11__namespace$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i8__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i8__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i9__namespace.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { type: i8__namespace.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i9__namespace.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i9__namespace.FsSubmitButtonDirective, selector: "button[type=\"submit\"]", inputs: ["name", "dirtySubmit"] }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
937
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: NumberComponent, decorators: [{
938
+ type: i0.Component,
939
+ args: [{
940
+ templateUrl: './number.component.html',
941
+ styleUrls: ['./number.component.scss'],
942
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
943
+ }]
944
+ }], ctorParameters: function () {
945
+ return [{ type: undefined, decorators: [{
946
+ type: i0.Inject,
947
+ args: [i1.MAT_DIALOG_DATA]
948
+ }] }, { type: i1__namespace.MatDialogRef }, { type: i0__namespace.ChangeDetectorRef }, { type: i2__namespace.FsMessage }];
949
+ }, propDecorators: { form: [{
950
+ type: i0.ViewChild,
951
+ args: [i9.FsFormDirective, { static: false }]
1090
952
  }] } });
1091
953
 
1092
- var NumbersComponent = /** @class */ (function () {
1093
- function NumbersComponent(_data, _dialogRef, _message) {
1094
- this._data = _data;
1095
- this._dialogRef = _dialogRef;
1096
- this._message = _message;
1097
- this.VerificationMethodType = exports.VerificationMethodType;
1098
- this.twoFactorManageService = _data.twoFactorManageService;
1099
- this.defaultCountry = _data.defaultCountry;
1100
- }
1101
- NumbersComponent.prototype.add = function () {
1102
- var _this = this;
1103
- this.twoFactorManageService.addSms$(this.defaultCountry)
1104
- .subscribe(function () {
1105
- _this.verificationMethods.reload();
1106
- });
1107
- };
1108
- NumbersComponent.prototype.deleted = function () {
1109
- this._message.success('Deleted text message verification method');
1110
- if (!this.twoFactorManageService.hasVerificationMethod(exports.VerificationMethodType.Sms)) {
1111
- this._dialogRef.close();
1112
- }
1113
- };
1114
- return NumbersComponent;
1115
- }());
1116
- NumbersComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: NumbersComponent, deps: [{ token: i1.MAT_DIALOG_DATA }, { token: i1__namespace.MatDialogRef }, { token: i2__namespace.FsMessage }], target: i0__namespace.ɵɵFactoryTarget.Component });
1117
- NumbersComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: NumbersComponent, selector: "ng-component", viewQueries: [{ propertyName: "verificationMethods", first: true, predicate: VerificationMethodsComponent, descendants: true }], ngImport: i0__namespace, template: "<fs-dialog>\n <h1 mat-dialog-title>\n <mat-icon>textsms</mat-icon> Text Message Numbers\n </h1>\n <mat-dialog-content>\n <fs-2fa-verification-methods\n [type]=\"VerificationMethodType.Sms\"\n [twoFactorManageService]=\"twoFactorManageService\"\n (deleted)=\"deleted()\">\n </fs-2fa-verification-methods> \n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [mat-dialog-close]=\"undefined\">\n Close\n </button>\n <button\n mat-button\n (click)=\"add()\"\n type=\"button\">\n Add Number\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [""], components: [{ type: i3__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i4__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: VerificationMethodsComponent, selector: "fs-2fa-verification-methods", inputs: ["type", "accountVerify", "verificationMethodsFetch", "verificationMethodDelete", "verificationMethodDefault", "twoFactorManageService"], outputs: ["deleted"] }, { type: i6__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1118
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: NumbersComponent, decorators: [{
1119
- type: i0.Component,
1120
- args: [{
1121
- templateUrl: './numbers.component.html',
1122
- styleUrls: ['./numbers.component.scss'],
1123
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1124
- }]
1125
- }], ctorParameters: function () {
1126
- return [{ type: undefined, decorators: [{
1127
- type: i0.Inject,
1128
- args: [i1.MAT_DIALOG_DATA]
1129
- }] }, { type: i1__namespace.MatDialogRef }, { type: i2__namespace.FsMessage }];
1130
- }, propDecorators: { verificationMethods: [{
1131
- type: i0.ViewChild,
1132
- args: [VerificationMethodsComponent]
954
+ var TwoFactorManageService = /** @class */ (function () {
955
+ function TwoFactorManageService(_dialog) {
956
+ this._dialog = _dialog;
957
+ this._destroy$ = new rxjs.Subject();
958
+ this._verificationMethods$ = new rxjs.BehaviorSubject([]);
959
+ }
960
+ Object.defineProperty(TwoFactorManageService.prototype, "verificationMethods$", {
961
+ get: function () {
962
+ return this._verificationMethods$
963
+ .pipe(operators.takeUntil(this._destroy$));
964
+ },
965
+ enumerable: false,
966
+ configurable: true
967
+ });
968
+ Object.defineProperty(TwoFactorManageService.prototype, "verificationMethods", {
969
+ get: function () {
970
+ return this._verificationMethods$.getValue();
971
+ },
972
+ enumerable: false,
973
+ configurable: true
974
+ });
975
+ Object.defineProperty(TwoFactorManageService.prototype, "hasVerificationMethods", {
976
+ get: function () {
977
+ return !!this._verificationMethods$.getValue().length;
978
+ },
979
+ enumerable: false,
980
+ configurable: true
981
+ });
982
+ Object.defineProperty(TwoFactorManageService.prototype, "emailVerificationMethods", {
983
+ get: function () {
984
+ return this.getVerificationMethods(exports.VerificationMethodType.Email);
985
+ },
986
+ enumerable: false,
987
+ configurable: true
988
+ });
989
+ Object.defineProperty(TwoFactorManageService.prototype, "smsVerificationMethods", {
990
+ get: function () {
991
+ return this.getVerificationMethods(exports.VerificationMethodType.Sms);
992
+ },
993
+ enumerable: false,
994
+ configurable: true
995
+ });
996
+ Object.defineProperty(TwoFactorManageService.prototype, "appVerificationMethods", {
997
+ get: function () {
998
+ return this.getVerificationMethods(exports.VerificationMethodType.App);
999
+ },
1000
+ enumerable: false,
1001
+ configurable: true
1002
+ });
1003
+ TwoFactorManageService.prototype.getVerificationMethods = function (type) {
1004
+ return this.verificationMethods
1005
+ .filter(function (verificationMethod) {
1006
+ return verificationMethod.type === type;
1007
+ });
1008
+ };
1009
+ TwoFactorManageService.prototype.hasVerificationMethod = function (type) {
1010
+ return this.verificationMethods
1011
+ .some(function (verificationMethod) {
1012
+ return verificationMethod.type === type;
1013
+ });
1014
+ };
1015
+ TwoFactorManageService.prototype.registerVerificationMethodDefault = function (value) {
1016
+ this._verificationMethodDefault = value;
1017
+ };
1018
+ TwoFactorManageService.prototype.registerVerificationMethodResend = function (value) {
1019
+ this._verificationMethodResend = value;
1020
+ };
1021
+ TwoFactorManageService.prototype.registerVerificationMethodsFetch = function (value) {
1022
+ this._verificationMethodsFetch = value;
1023
+ };
1024
+ TwoFactorManageService.prototype.registerVerificationMethodDelete = function (value) {
1025
+ this._verificationMethodDelete = value;
1026
+ };
1027
+ TwoFactorManageService.prototype.registerVerificationMethodCreate = function (value) {
1028
+ this._verificationMethodCreate = value;
1029
+ };
1030
+ TwoFactorManageService.prototype.registerVerificationMethodVerify = function (value) {
1031
+ this._verificationMethodVerify = value;
1032
+ };
1033
+ TwoFactorManageService.prototype.registerAccountVerify = function (value) {
1034
+ this._accountVerify = value;
1035
+ };
1036
+ Object.defineProperty(TwoFactorManageService.prototype, "hasVerificationMethodResend", {
1037
+ get: function () {
1038
+ return !!this._verificationMethodResend;
1039
+ },
1040
+ enumerable: false,
1041
+ configurable: true
1042
+ });
1043
+ Object.defineProperty(TwoFactorManageService.prototype, "hasVerificationMethodDefault", {
1044
+ get: function () {
1045
+ return !!this._verificationMethodDefault;
1046
+ },
1047
+ enumerable: false,
1048
+ configurable: true
1049
+ });
1050
+ Object.defineProperty(TwoFactorManageService.prototype, "hasVerificationMethodsFetch", {
1051
+ get: function () {
1052
+ return !!this._verificationMethodsFetch;
1053
+ },
1054
+ enumerable: false,
1055
+ configurable: true
1056
+ });
1057
+ Object.defineProperty(TwoFactorManageService.prototype, "hasVerificationMethodDelete", {
1058
+ get: function () {
1059
+ return !!this._verificationMethodDelete;
1060
+ },
1061
+ enumerable: false,
1062
+ configurable: true
1063
+ });
1064
+ Object.defineProperty(TwoFactorManageService.prototype, "hasVerificationMethodCreate", {
1065
+ get: function () {
1066
+ return !!this._verificationMethodCreate;
1067
+ },
1068
+ enumerable: false,
1069
+ configurable: true
1070
+ });
1071
+ Object.defineProperty(TwoFactorManageService.prototype, "hasVerificationMethodVerify", {
1072
+ get: function () {
1073
+ return !!this._verificationMethodVerify;
1074
+ },
1075
+ enumerable: false,
1076
+ configurable: true
1077
+ });
1078
+ TwoFactorManageService.prototype.verificationMethodDelete$ = function (verificationMethod) {
1079
+ var _this = this;
1080
+ return this._verificationMethodDelete(verificationMethod)
1081
+ .pipe(operators.tap(function () {
1082
+ _this.verificationMethodsFetch();
1083
+ }));
1084
+ };
1085
+ TwoFactorManageService.prototype.verificationMethodVerify$ = function (code, trustDevice) {
1086
+ var _this = this;
1087
+ return this._verificationMethodVerify(code, trustDevice)
1088
+ .pipe(operators.tap(function () {
1089
+ _this.verificationMethodsFetch();
1090
+ }));
1091
+ };
1092
+ TwoFactorManageService.prototype.verificationMethodCreate$ = function (verificationMethod) {
1093
+ return this._verificationMethodCreate(verificationMethod);
1094
+ };
1095
+ TwoFactorManageService.prototype.verificationMethodDefault$ = function (verificationMethod) {
1096
+ return this._verificationMethodDefault(verificationMethod);
1097
+ };
1098
+ TwoFactorManageService.prototype.verificationMethodResend = function () {
1099
+ return this._verificationMethodResend();
1100
+ };
1101
+ TwoFactorManageService.prototype.verificationMethodsFetch = function (query) {
1102
+ this.verificationMethodsFetch$(query)
1103
+ .subscribe();
1104
+ };
1105
+ TwoFactorManageService.prototype.verificationMethodsFetch$ = function (query) {
1106
+ var _this = this;
1107
+ return this._verificationMethodsFetch(query)
1108
+ .pipe(operators.tap(function (verificationMethods) {
1109
+ _this._verificationMethods$.next(verificationMethods);
1110
+ }));
1111
+ };
1112
+ TwoFactorManageService.prototype.accountVerify$ = function () {
1113
+ return this._accountVerify ? this._accountVerify() : rxjs.of(true);
1114
+ };
1115
+ TwoFactorManageService.prototype.ngOnDestroy = function () {
1116
+ this._destroy$.next();
1117
+ this._destroy$.complete();
1118
+ };
1119
+ TwoFactorManageService.prototype.addSms$ = function (defaultCountry) {
1120
+ var _this = this;
1121
+ return this.accountVerify$()
1122
+ .pipe(operators.switchMap(function () { return _this._dialog.open(NumberComponent, {
1123
+ data: {
1124
+ defaultCountry: defaultCountry,
1125
+ twoFactorManageService: _this,
1126
+ },
1127
+ })
1128
+ .afterClosed(); }), operators.tap(function () {
1129
+ _this.verificationMethodsFetch();
1130
+ }), operators.takeUntil(this._destroy$));
1131
+ };
1132
+ TwoFactorManageService.prototype.addEmail$ = function () {
1133
+ var _this = this;
1134
+ return this.accountVerify$()
1135
+ .pipe(operators.switchMap(function () { return _this._dialog.open(EmailComponent, {
1136
+ data: { twoFactorManageService: _this },
1137
+ })
1138
+ .afterClosed(); }), operators.tap(function () {
1139
+ _this.verificationMethodsFetch();
1140
+ }), operators.takeUntil(this._destroy$));
1141
+ };
1142
+ TwoFactorManageService.prototype.addApp$ = function () {
1143
+ var _this = this;
1144
+ return this.accountVerify$()
1145
+ .pipe(operators.switchMap(function () { return _this._dialog.open(AppComponent, {
1146
+ data: { twoFactorManageService: _this },
1147
+ })
1148
+ .afterClosed(); }), operators.tap(function () {
1149
+ _this.verificationMethodsFetch();
1150
+ }), operators.takeUntil(this._destroy$));
1151
+ };
1152
+ return TwoFactorManageService;
1153
+ }());
1154
+ TwoFactorManageService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TwoFactorManageService, deps: [{ token: i1__namespace.MatDialog }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1155
+ TwoFactorManageService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TwoFactorManageService });
1156
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TwoFactorManageService, decorators: [{
1157
+ type: i0.Injectable
1158
+ }], ctorParameters: function () { return [{ type: i1__namespace.MatDialog }]; } });
1159
+
1160
+ var NumbersComponent = /** @class */ (function () {
1161
+ function NumbersComponent(_data, _dialogRef, _message) {
1162
+ this._data = _data;
1163
+ this._dialogRef = _dialogRef;
1164
+ this._message = _message;
1165
+ this.VerificationMethodType = exports.VerificationMethodType;
1166
+ this.twoFactorManageService = _data.twoFactorManageService;
1167
+ this.defaultCountry = _data.defaultCountry;
1168
+ }
1169
+ NumbersComponent.prototype.add = function () {
1170
+ var _this = this;
1171
+ this.twoFactorManageService.addSms$(this.defaultCountry)
1172
+ .subscribe(function () {
1173
+ _this.verificationMethods.reload();
1174
+ });
1175
+ };
1176
+ NumbersComponent.prototype.deleted = function () {
1177
+ this._message.success('Deleted text message verification method');
1178
+ if (!this.twoFactorManageService.hasVerificationMethod(exports.VerificationMethodType.Sms)) {
1179
+ this._dialogRef.close();
1180
+ }
1181
+ };
1182
+ return NumbersComponent;
1183
+ }());
1184
+ NumbersComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: NumbersComponent, deps: [{ token: i1.MAT_DIALOG_DATA }, { token: i1__namespace.MatDialogRef }, { token: i2__namespace.FsMessage }], target: i0__namespace.ɵɵFactoryTarget.Component });
1185
+ NumbersComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: NumbersComponent, selector: "ng-component", viewQueries: [{ propertyName: "verificationMethods", first: true, predicate: VerificationMethodsComponent, descendants: true }], ngImport: i0__namespace, template: "<fs-dialog>\n <h1 mat-dialog-title>\n <mat-icon>textsms</mat-icon> Text Message Numbers\n </h1>\n <mat-dialog-content>\n <fs-2fa-verification-methods\n [type]=\"VerificationMethodType.Sms\"\n [twoFactorManageService]=\"twoFactorManageService\"\n (deleted)=\"deleted()\">\n </fs-2fa-verification-methods> \n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [mat-dialog-close]=\"undefined\">\n Close\n </button>\n <button\n mat-button\n (click)=\"add()\"\n type=\"button\">\n Add Number\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [""], components: [{ type: i3__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i4__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: VerificationMethodsComponent, selector: "fs-2fa-verification-methods", inputs: ["type", "accountVerify", "verificationMethodsFetch", "verificationMethodDelete", "verificationMethodDefault", "twoFactorManageService"], outputs: ["deleted"] }, { type: i6__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1186
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: NumbersComponent, decorators: [{
1187
+ type: i0.Component,
1188
+ args: [{
1189
+ templateUrl: './numbers.component.html',
1190
+ styleUrls: ['./numbers.component.scss'],
1191
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
1192
+ }]
1193
+ }], ctorParameters: function () {
1194
+ return [{ type: undefined, decorators: [{
1195
+ type: i0.Inject,
1196
+ args: [i1.MAT_DIALOG_DATA]
1197
+ }] }, { type: i1__namespace.MatDialogRef }, { type: i2__namespace.FsMessage }];
1198
+ }, propDecorators: { verificationMethods: [{
1199
+ type: i0.ViewChild,
1200
+ args: [VerificationMethodsComponent]
1133
1201
  }] } });
1134
1202
 
1135
- var EmailsComponent = /** @class */ (function () {
1136
- function EmailsComponent(_data, _dialogRef, _message) {
1137
- this._data = _data;
1138
- this._dialogRef = _dialogRef;
1139
- this._message = _message;
1140
- this.VerificationMethodType = exports.VerificationMethodType;
1141
- this.twoFactorManageService = _data.twoFactorManageService;
1142
- }
1143
- EmailsComponent.prototype.add = function () {
1144
- var _this = this;
1145
- this.twoFactorManageService.addEmail$()
1146
- .subscribe(function () {
1147
- _this.verificationMethods.reload();
1148
- });
1149
- };
1150
- EmailsComponent.prototype.deleted = function () {
1151
- this._message.success('Deleted email verification method');
1152
- if (!this.twoFactorManageService.hasVerificationMethod(exports.VerificationMethodType.Email)) {
1153
- this._dialogRef.close();
1154
- }
1155
- };
1156
- return EmailsComponent;
1157
- }());
1158
- EmailsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: EmailsComponent, deps: [{ token: i1.MAT_DIALOG_DATA }, { token: i1__namespace.MatDialogRef }, { token: i2__namespace.FsMessage }], target: i0__namespace.ɵɵFactoryTarget.Component });
1159
- EmailsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: EmailsComponent, selector: "ng-component", viewQueries: [{ propertyName: "verificationMethods", first: true, predicate: VerificationMethodsComponent, descendants: true }], ngImport: i0__namespace, template: "<fs-dialog>\n <h1 mat-dialog-title>\n <mat-icon>email</mat-icon> Emails\n </h1>\n <mat-dialog-content>\n <fs-2fa-verification-methods\n [type]=\"VerificationMethodType.Email\"\n [twoFactorManageService]=\"twoFactorManageService\"\n (deleted)=\"deleted()\">\n </fs-2fa-verification-methods>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [mat-dialog-close]=\"undefined\">\n Close\n </button>\n <button\n mat-button\n (click)=\"add()\"\n type=\"button\">\n Add Email\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: ["h1{display:flex;align-items:center}h1 mat-icon{margin-right:5px}\n"], components: [{ type: i3__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i4__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: VerificationMethodsComponent, selector: "fs-2fa-verification-methods", inputs: ["type", "accountVerify", "verificationMethodsFetch", "verificationMethodDelete", "verificationMethodDefault", "twoFactorManageService"], outputs: ["deleted"] }, { type: i6__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1160
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: EmailsComponent, decorators: [{
1161
- type: i0.Component,
1162
- args: [{
1163
- templateUrl: './emails.component.html',
1164
- styleUrls: ['./emails.component.scss'],
1165
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1166
- }]
1167
- }], ctorParameters: function () {
1168
- return [{ type: undefined, decorators: [{
1169
- type: i0.Inject,
1170
- args: [i1.MAT_DIALOG_DATA]
1171
- }] }, { type: i1__namespace.MatDialogRef }, { type: i2__namespace.FsMessage }];
1172
- }, propDecorators: { verificationMethods: [{
1173
- type: i0.ViewChild,
1174
- args: [VerificationMethodsComponent]
1203
+ var EmailsComponent = /** @class */ (function () {
1204
+ function EmailsComponent(_data, _dialogRef, _message) {
1205
+ this._data = _data;
1206
+ this._dialogRef = _dialogRef;
1207
+ this._message = _message;
1208
+ this.VerificationMethodType = exports.VerificationMethodType;
1209
+ this.twoFactorManageService = _data.twoFactorManageService;
1210
+ }
1211
+ EmailsComponent.prototype.add = function () {
1212
+ var _this = this;
1213
+ this.twoFactorManageService.addEmail$()
1214
+ .subscribe(function () {
1215
+ _this.verificationMethods.reload();
1216
+ });
1217
+ };
1218
+ EmailsComponent.prototype.deleted = function () {
1219
+ this._message.success('Deleted email verification method');
1220
+ if (!this.twoFactorManageService.hasVerificationMethod(exports.VerificationMethodType.Email)) {
1221
+ this._dialogRef.close();
1222
+ }
1223
+ };
1224
+ return EmailsComponent;
1225
+ }());
1226
+ EmailsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: EmailsComponent, deps: [{ token: i1.MAT_DIALOG_DATA }, { token: i1__namespace.MatDialogRef }, { token: i2__namespace.FsMessage }], target: i0__namespace.ɵɵFactoryTarget.Component });
1227
+ EmailsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: EmailsComponent, selector: "ng-component", viewQueries: [{ propertyName: "verificationMethods", first: true, predicate: VerificationMethodsComponent, descendants: true }], ngImport: i0__namespace, template: "<fs-dialog>\n <h1 mat-dialog-title>\n <mat-icon>email</mat-icon> Emails\n </h1>\n <mat-dialog-content>\n <fs-2fa-verification-methods\n [type]=\"VerificationMethodType.Email\"\n [twoFactorManageService]=\"twoFactorManageService\"\n (deleted)=\"deleted()\">\n </fs-2fa-verification-methods>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [mat-dialog-close]=\"undefined\">\n Close\n </button>\n <button\n mat-button\n (click)=\"add()\"\n type=\"button\">\n Add Email\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: ["h1{display:flex;align-items:center}h1 mat-icon{margin-right:5px}\n"], components: [{ type: i3__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i4__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: VerificationMethodsComponent, selector: "fs-2fa-verification-methods", inputs: ["type", "accountVerify", "verificationMethodsFetch", "verificationMethodDelete", "verificationMethodDefault", "twoFactorManageService"], outputs: ["deleted"] }, { type: i6__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1228
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: EmailsComponent, decorators: [{
1229
+ type: i0.Component,
1230
+ args: [{
1231
+ templateUrl: './emails.component.html',
1232
+ styleUrls: ['./emails.component.scss'],
1233
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
1234
+ }]
1235
+ }], ctorParameters: function () {
1236
+ return [{ type: undefined, decorators: [{
1237
+ type: i0.Inject,
1238
+ args: [i1.MAT_DIALOG_DATA]
1239
+ }] }, { type: i1__namespace.MatDialogRef }, { type: i2__namespace.FsMessage }];
1240
+ }, propDecorators: { verificationMethods: [{
1241
+ type: i0.ViewChild,
1242
+ args: [VerificationMethodsComponent]
1175
1243
  }] } });
1176
1244
 
1177
- var ManageMethodsComponent = /** @class */ (function () {
1178
- function ManageMethodsComponent(_data, _cdRef, _dialog, _message) {
1179
- this._data = _data;
1180
- this._cdRef = _cdRef;
1181
- this._dialog = _dialog;
1182
- this._message = _message;
1183
- this.verificationMethodTypes = {};
1184
- this.VerificationMethodType = exports.VerificationMethodType;
1185
- this._destroy$ = new rxjs.Subject();
1186
- }
1187
- ManageMethodsComponent.prototype.ngOnInit = function () {
1188
- var _this = this;
1189
- this._defaultCountry = this._data.defaultCountry;
1190
- this.twoFactorManageService = this._data.twoFactorManageService;
1191
- this.verificationMethodTypes = this._data.verificationMethodTypes
1192
- .reduce(function (verificationMethodTypes, verificationMethodType) {
1193
- verificationMethodTypes[verificationMethodType] = true;
1194
- return verificationMethodTypes;
1195
- }, {});
1196
- this.twoFactorManageService.verificationMethods$
1197
- .subscribe(function (verificationMethods) {
1198
- _this.verificationMethods = verificationMethods;
1199
- _this._cdRef.markForCheck();
1200
- });
1201
- };
1202
- Object.defineProperty(ManageMethodsComponent.prototype, "defaultSms", {
1203
- get: function () {
1204
- return this.twoFactorManageService.smsVerificationMethods
1205
- .some(function (verificationMethod) {
1206
- return verificationMethod.default;
1207
- });
1208
- },
1209
- enumerable: false,
1210
- configurable: true
1211
- });
1212
- Object.defineProperty(ManageMethodsComponent.prototype, "defaultApp", {
1213
- get: function () {
1214
- return this.twoFactorManageService.appVerificationMethods
1215
- .some(function (verificationMethod) {
1216
- return verificationMethod.default;
1217
- });
1218
- },
1219
- enumerable: false,
1220
- configurable: true
1221
- });
1222
- Object.defineProperty(ManageMethodsComponent.prototype, "defaultEmail", {
1223
- get: function () {
1224
- return this.twoFactorManageService.emailVerificationMethods
1225
- .some(function (verificationMethod) {
1226
- return verificationMethod.default;
1227
- });
1228
- },
1229
- enumerable: false,
1230
- configurable: true
1231
- });
1232
- Object.defineProperty(ManageMethodsComponent.prototype, "textHasVerificationMethod", {
1233
- get: function () {
1234
- return this.twoFactorManageService.hasVerificationMethod(exports.VerificationMethodType.Sms);
1235
- },
1236
- enumerable: false,
1237
- configurable: true
1238
- });
1239
- Object.defineProperty(ManageMethodsComponent.prototype, "appHasVerificationMethod", {
1240
- get: function () {
1241
- return this.twoFactorManageService.hasVerificationMethod(exports.VerificationMethodType.App);
1242
- },
1243
- enumerable: false,
1244
- configurable: true
1245
- });
1246
- Object.defineProperty(ManageMethodsComponent.prototype, "emailHasVerificationMethod", {
1247
- get: function () {
1248
- return this.twoFactorManageService.hasVerificationMethod(exports.VerificationMethodType.Email);
1249
- },
1250
- enumerable: false,
1251
- configurable: true
1252
- });
1253
- ManageMethodsComponent.prototype.textMessageManage = function () {
1254
- this._dialog.open(NumbersComponent, {
1255
- data: {
1256
- twoFactorManageService: this.twoFactorManageService,
1257
- defaultCountry: this._defaultCountry,
1258
- },
1259
- });
1260
- };
1261
- ManageMethodsComponent.prototype.textMessageAdd = function () {
1262
- this.twoFactorManageService.addSms$(this._defaultCountry)
1263
- .subscribe();
1264
- };
1265
- ManageMethodsComponent.prototype.emailMessageManage = function () {
1266
- this._dialog.open(EmailsComponent, {
1267
- data: {
1268
- twoFactorManageService: this.twoFactorManageService,
1269
- },
1270
- });
1271
- };
1272
- ManageMethodsComponent.prototype.emailMessageAdd = function () {
1273
- this.twoFactorManageService.addEmail$()
1274
- .subscribe();
1275
- };
1276
- ManageMethodsComponent.prototype.appRemove = function () {
1277
- var _this = this;
1278
- var verificationMethod = this.verificationMethods
1279
- .find(function (_verificationMethod) {
1280
- return _verificationMethod.type === exports.VerificationMethodType.App;
1281
- });
1282
- if (verificationMethod) {
1283
- this.twoFactorManageService.accountVerify$()
1284
- .pipe(operators.switchMap(function () { return _this.twoFactorManageService.verificationMethodDelete$(verificationMethod); }))
1285
- .subscribe(function () {
1286
- _this._message.success('Removed App Authenticator verification method');
1287
- _this._cdRef.markForCheck();
1288
- });
1289
- }
1290
- };
1291
- ManageMethodsComponent.prototype.appAdd = function () {
1292
- this.twoFactorManageService.addApp$()
1293
- .subscribe();
1294
- };
1295
- ManageMethodsComponent.prototype.ngOnDestroy = function () {
1296
- this._destroy$.next();
1297
- this._destroy$.complete();
1298
- };
1299
- return ManageMethodsComponent;
1300
- }());
1301
- ManageMethodsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ManageMethodsComponent, deps: [{ token: i1.MAT_DIALOG_DATA }, { token: i0__namespace.ChangeDetectorRef }, { token: i1__namespace.MatDialog }, { token: i2__namespace.FsMessage }], target: i0__namespace.ɵɵFactoryTarget.Component });
1302
- ManageMethodsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ManageMethodsComponent, selector: "ng-component", ngImport: i0__namespace, template: "<fs-dialog>\n <h1 mat-dialog-title>2-Step Verification</h1>\n <mat-dialog-content>\n <table>\n <tr *ngIf=\"verificationMethodTypes[VerificationMethodType.Sms]\">\n <td>\n <mat-icon>textsms</mat-icon>\n </td>\n <td>\n <div class=\"type\">\n <span>Text Message</span>\n <span *ngIf=\"textHasVerificationMethod\" class=\"enabled\"></span>\n <app-defaulted *ngIf=\"defaultSms\"></app-defaulted>\n </div>\n <div class=\"small\">\n Verification codes are sent by text message\n <ng-container *ngIf=\"textHasVerificationMethod\">\n to <span class=\"items\">\n <span *ngFor=\"let item of twoFactorManageService.smsVerificationMethods\">{{item.phoneNumber | fsPhone}}</span>\n </span>\n </ng-container>\n </div>\n </td>\n <td>\n <button \n *ngIf=\"textHasVerificationMethod; else textMessageManageButton\"\n mat-raised-button \n type=\"button\"\n (click)=\"textMessageManage()\">\n Manage\n </button>\n <ng-template #textMessageManageButton>\n <button \n mat-raised-button \n color=\"primary\"\n type=\"button\"\n (click)=\"textMessageAdd()\">\n Turn On\n </button>\n </ng-template>\n </td>\n </tr>\n <tr *ngIf=\"verificationMethodTypes[VerificationMethodType.Email]\">\n <td>\n <mat-icon>email</mat-icon>\n </td>\n <td>\n <div class=\"type\">\n <span>Email</span> \n <span *ngIf=\"emailHasVerificationMethod\" class=\"enabled\"></span>\n <app-defaulted *ngIf=\"defaultEmail\"></app-defaulted>\n </div>\n <div class=\"small\">\n Verification codes are sent by email\n <ng-container *ngIf=\"emailHasVerificationMethod\">\n to <span class=\"items\">\n <span *ngFor=\"let item of twoFactorManageService.emailVerificationMethods\">{{item.email}}</span>\n </span>\n </ng-container>\n </div>\n </td>\n <td>\n <button \n *ngIf=\"emailHasVerificationMethod; else emailMessageManageButton\"\n mat-raised-button \n type=\"button\"\n (click)=\"emailMessageManage()\">\n Manage\n </button>\n <ng-template #emailMessageManageButton>\n <button \n mat-raised-button \n color=\"primary\"\n type=\"button\"\n (click)=\"emailMessageAdd()\">\n Turn On\n </button>\n </ng-template>\n </td>\n </tr>\n <tr *ngIf=\"verificationMethodTypes[VerificationMethodType.App]\">\n <td>\n <mat-icon>phone_iphone</mat-icon>\n </td>\n <td>\n <div class=\"type\">\n <span>Authenticator App</span>\n <span *ngIf=\"appHasVerificationMethod\" class=\"enabled\"></span>\n <app-defaulted *ngIf=\"defaultApp\"></app-defaulted>\n </div>\n <div class=\"small\">Verification code is generated by an authenticator app such as Authy or Google Authenticator</div>\n </td>\n <td>\n <button \n *ngIf=\"appHasVerificationMethod; else appMessageManageButton\"\n mat-raised-button \n type=\"button\"\n (click)=\"appRemove()\">\n Remove\n </button>\n <ng-template #appMessageManageButton>\n <button \n mat-raised-button \n color=\"primary\"\n type=\"button\"\n (click)=\"appAdd()\">\n Turn On\n </button>\n </ng-template>\n </td>\n </tr> \n </table> \n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n color=\"primary\"\n type=\"button\"\n [mat-dialog-close]=\"undefined\">\n Close\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: ["mat-dialog-content{max-width:500px}.enabled{font-size:75%;background-color:#70b601;padding:2px 4px;border-radius:4px;color:#fff;margin-left:4px}.enabled:after{content:\"Enabled\"}table tr td:first-child,table tr td:last-child{width:1%}table tr td:first-child mat-icon,table tr td:last-child mat-icon{display:flex}table tr td{padding:6px;vertical-align:middle}table tr .type{display:flex;align-items:center}table tr .type app-defaulted{margin-left:4px}.items span+span:not(:last-child):before{content:\", \"}.items span+span:last-child:before{content:\" and \"}\n"], components: [{ type: i3__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i4__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: DefaultedComponent, selector: "app-defaulted" }, { type: i6__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i9__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], pipes: { "fsPhone": i8__namespace$1.FsPhonePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1303
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ManageMethodsComponent, decorators: [{
1304
- type: i0.Component,
1305
- args: [{
1306
- templateUrl: './manage-methods.component.html',
1307
- styleUrls: ['./manage-methods.component.scss'],
1308
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1309
- }]
1310
- }], ctorParameters: function () {
1311
- return [{ type: undefined, decorators: [{
1312
- type: i0.Inject,
1313
- args: [i1.MAT_DIALOG_DATA]
1314
- }] }, { type: i0__namespace.ChangeDetectorRef }, { type: i1__namespace.MatDialog }, { type: i2__namespace.FsMessage }];
1245
+ var ManageMethodsComponent = /** @class */ (function () {
1246
+ function ManageMethodsComponent(_data, _cdRef, _dialog, _message) {
1247
+ this._data = _data;
1248
+ this._cdRef = _cdRef;
1249
+ this._dialog = _dialog;
1250
+ this._message = _message;
1251
+ this.verificationMethodTypes = {};
1252
+ this.VerificationMethodType = exports.VerificationMethodType;
1253
+ this._destroy$ = new rxjs.Subject();
1254
+ }
1255
+ ManageMethodsComponent.prototype.ngOnInit = function () {
1256
+ var _this = this;
1257
+ this._defaultCountry = this._data.defaultCountry;
1258
+ this.twoFactorManageService = this._data.twoFactorManageService;
1259
+ this.verificationMethodTypes = this._data.verificationMethodTypes
1260
+ .reduce(function (verificationMethodTypes, verificationMethodType) {
1261
+ verificationMethodTypes[verificationMethodType] = true;
1262
+ return verificationMethodTypes;
1263
+ }, {});
1264
+ this.twoFactorManageService.verificationMethods$
1265
+ .subscribe(function (verificationMethods) {
1266
+ _this.verificationMethods = verificationMethods;
1267
+ _this._cdRef.markForCheck();
1268
+ });
1269
+ };
1270
+ Object.defineProperty(ManageMethodsComponent.prototype, "defaultSms", {
1271
+ get: function () {
1272
+ return this.twoFactorManageService.smsVerificationMethods
1273
+ .some(function (verificationMethod) {
1274
+ return verificationMethod.default;
1275
+ });
1276
+ },
1277
+ enumerable: false,
1278
+ configurable: true
1279
+ });
1280
+ Object.defineProperty(ManageMethodsComponent.prototype, "defaultApp", {
1281
+ get: function () {
1282
+ return this.twoFactorManageService.appVerificationMethods
1283
+ .some(function (verificationMethod) {
1284
+ return verificationMethod.default;
1285
+ });
1286
+ },
1287
+ enumerable: false,
1288
+ configurable: true
1289
+ });
1290
+ Object.defineProperty(ManageMethodsComponent.prototype, "defaultEmail", {
1291
+ get: function () {
1292
+ return this.twoFactorManageService.emailVerificationMethods
1293
+ .some(function (verificationMethod) {
1294
+ return verificationMethod.default;
1295
+ });
1296
+ },
1297
+ enumerable: false,
1298
+ configurable: true
1299
+ });
1300
+ Object.defineProperty(ManageMethodsComponent.prototype, "textHasVerificationMethod", {
1301
+ get: function () {
1302
+ return this.twoFactorManageService.hasVerificationMethod(exports.VerificationMethodType.Sms);
1303
+ },
1304
+ enumerable: false,
1305
+ configurable: true
1306
+ });
1307
+ Object.defineProperty(ManageMethodsComponent.prototype, "appHasVerificationMethod", {
1308
+ get: function () {
1309
+ return this.twoFactorManageService.hasVerificationMethod(exports.VerificationMethodType.App);
1310
+ },
1311
+ enumerable: false,
1312
+ configurable: true
1313
+ });
1314
+ Object.defineProperty(ManageMethodsComponent.prototype, "emailHasVerificationMethod", {
1315
+ get: function () {
1316
+ return this.twoFactorManageService.hasVerificationMethod(exports.VerificationMethodType.Email);
1317
+ },
1318
+ enumerable: false,
1319
+ configurable: true
1320
+ });
1321
+ ManageMethodsComponent.prototype.textMessageManage = function () {
1322
+ this._dialog.open(NumbersComponent, {
1323
+ data: {
1324
+ twoFactorManageService: this.twoFactorManageService,
1325
+ defaultCountry: this._defaultCountry,
1326
+ },
1327
+ });
1328
+ };
1329
+ ManageMethodsComponent.prototype.textMessageAdd = function () {
1330
+ this.twoFactorManageService.addSms$(this._defaultCountry)
1331
+ .subscribe();
1332
+ };
1333
+ ManageMethodsComponent.prototype.emailMessageManage = function () {
1334
+ this._dialog.open(EmailsComponent, {
1335
+ data: {
1336
+ twoFactorManageService: this.twoFactorManageService,
1337
+ },
1338
+ });
1339
+ };
1340
+ ManageMethodsComponent.prototype.emailMessageAdd = function () {
1341
+ this.twoFactorManageService.addEmail$()
1342
+ .subscribe();
1343
+ };
1344
+ ManageMethodsComponent.prototype.appRemove = function () {
1345
+ var _this = this;
1346
+ var verificationMethod = this.verificationMethods
1347
+ .find(function (_verificationMethod) {
1348
+ return _verificationMethod.type === exports.VerificationMethodType.App;
1349
+ });
1350
+ if (verificationMethod) {
1351
+ this.twoFactorManageService.accountVerify$()
1352
+ .pipe(operators.switchMap(function () { return _this.twoFactorManageService.verificationMethodDelete$(verificationMethod); }))
1353
+ .subscribe(function () {
1354
+ _this._message.success('Removed App Authenticator verification method');
1355
+ _this._cdRef.markForCheck();
1356
+ });
1357
+ }
1358
+ };
1359
+ ManageMethodsComponent.prototype.appAdd = function () {
1360
+ this.twoFactorManageService.addApp$()
1361
+ .subscribe();
1362
+ };
1363
+ ManageMethodsComponent.prototype.ngOnDestroy = function () {
1364
+ this._destroy$.next();
1365
+ this._destroy$.complete();
1366
+ };
1367
+ return ManageMethodsComponent;
1368
+ }());
1369
+ ManageMethodsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ManageMethodsComponent, deps: [{ token: i1.MAT_DIALOG_DATA }, { token: i0__namespace.ChangeDetectorRef }, { token: i1__namespace.MatDialog }, { token: i2__namespace.FsMessage }], target: i0__namespace.ɵɵFactoryTarget.Component });
1370
+ ManageMethodsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ManageMethodsComponent, selector: "ng-component", ngImport: i0__namespace, template: "<fs-dialog>\n <h1 mat-dialog-title>2-Step Verification</h1>\n <mat-dialog-content>\n <table>\n <tr *ngIf=\"verificationMethodTypes[VerificationMethodType.Sms]\">\n <td>\n <mat-icon>textsms</mat-icon>\n </td>\n <td>\n <div class=\"type\">\n <span>Text Message</span>\n <span *ngIf=\"textHasVerificationMethod\" class=\"enabled\"></span>\n <app-defaulted *ngIf=\"defaultSms\"></app-defaulted>\n </div>\n <div class=\"small\">\n Verification codes are sent by text message\n <ng-container *ngIf=\"textHasVerificationMethod\">\n to <span class=\"items\">\n <span *ngFor=\"let item of twoFactorManageService.smsVerificationMethods\">{{item.phoneNumber | fsPhone}}</span>\n </span>\n </ng-container>\n </div>\n </td>\n <td>\n <button \n *ngIf=\"textHasVerificationMethod; else textMessageManageButton\"\n mat-raised-button \n type=\"button\"\n (click)=\"textMessageManage()\">\n Manage\n </button>\n <ng-template #textMessageManageButton>\n <button \n mat-raised-button \n color=\"primary\"\n type=\"button\"\n (click)=\"textMessageAdd()\">\n Turn On\n </button>\n </ng-template>\n </td>\n </tr>\n <tr *ngIf=\"verificationMethodTypes[VerificationMethodType.Email]\">\n <td>\n <mat-icon>email</mat-icon>\n </td>\n <td>\n <div class=\"type\">\n <span>Email</span> \n <span *ngIf=\"emailHasVerificationMethod\" class=\"enabled\"></span>\n <app-defaulted *ngIf=\"defaultEmail\"></app-defaulted>\n </div>\n <div class=\"small\">\n Verification codes are sent by email\n <ng-container *ngIf=\"emailHasVerificationMethod\">\n to <span class=\"items\">\n <span *ngFor=\"let item of twoFactorManageService.emailVerificationMethods\">{{item.email}}</span>\n </span>\n </ng-container>\n </div>\n </td>\n <td>\n <button \n *ngIf=\"emailHasVerificationMethod; else emailMessageManageButton\"\n mat-raised-button \n type=\"button\"\n (click)=\"emailMessageManage()\">\n Manage\n </button>\n <ng-template #emailMessageManageButton>\n <button \n mat-raised-button \n color=\"primary\"\n type=\"button\"\n (click)=\"emailMessageAdd()\">\n Turn On\n </button>\n </ng-template>\n </td>\n </tr>\n <tr *ngIf=\"verificationMethodTypes[VerificationMethodType.App]\">\n <td>\n <mat-icon>phone_iphone</mat-icon>\n </td>\n <td>\n <div class=\"type\">\n <span>Authenticator App</span>\n <span *ngIf=\"appHasVerificationMethod\" class=\"enabled\"></span>\n <app-defaulted *ngIf=\"defaultApp\"></app-defaulted>\n </div>\n <div class=\"small\">Verification code is generated by an authenticator app such as Authy or Google Authenticator</div>\n </td>\n <td>\n <button \n *ngIf=\"appHasVerificationMethod; else appMessageManageButton\"\n mat-raised-button \n type=\"button\"\n (click)=\"appRemove()\">\n Remove\n </button>\n <ng-template #appMessageManageButton>\n <button \n mat-raised-button \n color=\"primary\"\n type=\"button\"\n (click)=\"appAdd()\">\n Turn On\n </button>\n </ng-template>\n </td>\n </tr> \n </table> \n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n color=\"primary\"\n type=\"button\"\n [mat-dialog-close]=\"undefined\">\n Close\n </button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: ["mat-dialog-content{max-width:500px}.enabled{font-size:75%;background-color:#70b601;padding:2px 4px;border-radius:4px;color:#fff;margin-left:4px}.enabled:after{content:\"Enabled\"}table tr td:first-child,table tr td:last-child{width:1%}table tr td:first-child mat-icon,table tr td:last-child mat-icon{display:flex}table tr td{padding:6px;vertical-align:middle}table tr .type{display:flex;align-items:center}table tr .type app-defaulted{margin-left:4px}.items span+span:not(:last-child):before{content:\", \"}.items span+span:last-child:before{content:\" and \"}\n"], components: [{ type: i3__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i4__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: DefaultedComponent, selector: "app-defaulted" }, { type: i6__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i9__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], pipes: { "fsPhone": i8__namespace$1.FsPhonePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1371
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ManageMethodsComponent, decorators: [{
1372
+ type: i0.Component,
1373
+ args: [{
1374
+ templateUrl: './manage-methods.component.html',
1375
+ styleUrls: ['./manage-methods.component.scss'],
1376
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
1377
+ }]
1378
+ }], ctorParameters: function () {
1379
+ return [{ type: undefined, decorators: [{
1380
+ type: i0.Inject,
1381
+ args: [i1.MAT_DIALOG_DATA]
1382
+ }] }, { type: i0__namespace.ChangeDetectorRef }, { type: i1__namespace.MatDialog }, { type: i2__namespace.FsMessage }];
1315
1383
  } });
1316
1384
 
1317
- var Fs2faManageComponent = /** @class */ (function () {
1318
- function Fs2faManageComponent(_cdRef, _dialog, _twoFactorManageService) {
1319
- this._cdRef = _cdRef;
1320
- this._dialog = _dialog;
1321
- this._twoFactorManageService = _twoFactorManageService;
1322
- this._destroy$ = new rxjs.Subject();
1323
- }
1324
- Fs2faManageComponent.prototype.ngOnInit = function () {
1325
- var _this = this;
1326
- this.verificationMethodTypes = this.verificationMethodTypes || [
1327
- exports.VerificationMethodType.Sms,
1328
- exports.VerificationMethodType.Email,
1329
- exports.VerificationMethodType.App
1330
- ];
1331
- this._twoFactorManageService.registerVerificationMethodsFetch(this.verificationMethodsFetch);
1332
- this._twoFactorManageService.registerVerificationMethodDelete(this.verificationMethodDelete);
1333
- this._twoFactorManageService.registerVerificationMethodCreate(this.verificationMethodCreate);
1334
- this._twoFactorManageService.registerVerificationMethodVerify(this.verificationMethodVerify);
1335
- this._twoFactorManageService.registerVerificationMethodResend(this.verificationMethodResend);
1336
- this._twoFactorManageService.registerVerificationMethodDefault(this.verificationMethodDefault);
1337
- this._twoFactorManageService.registerAccountVerify(this.accountVerify);
1338
- this._twoFactorManageService.verificationMethods$
1339
- .subscribe(function (verificationMethods) {
1340
- var types = {
1341
- sms: 'Text Message',
1342
- email: 'Email',
1343
- app: 'Authenticator App',
1344
- };
1345
- _this.statuses = Object.keys(verificationMethods.reduce(function (accum, verificationMethod) {
1346
- accum[verificationMethod.type] = true;
1347
- return accum;
1348
- }, {}))
1349
- .map(function (type) {
1350
- return types[type];
1351
- });
1352
- _this._cdRef.markForCheck();
1353
- });
1354
- this._twoFactorManageService.verificationMethodsFetch();
1355
- };
1356
- Fs2faManageComponent.prototype.manage = function () {
1357
- var _this = this;
1358
- var dialogRef = this._dialog.open(ManageMethodsComponent, {
1359
- autoFocus: false,
1360
- data: {
1361
- defaultCountry: this.defaultCountry,
1362
- twoFactorManageService: this._twoFactorManageService,
1363
- verificationMethodTypes: this.verificationMethodTypes,
1364
- },
1365
- });
1366
- dialogRef.afterClosed()
1367
- .pipe(operators.takeUntil(this._destroy$))
1368
- .subscribe(function () {
1369
- _this._cdRef.markForCheck();
1370
- });
1371
- };
1372
- Fs2faManageComponent.prototype.reload = function () {
1373
- this._twoFactorManageService.verificationMethodsFetch();
1374
- };
1375
- Fs2faManageComponent.prototype.ngOnDestroy = function () {
1376
- this._destroy$.next();
1377
- this._destroy$.complete();
1378
- };
1379
- return Fs2faManageComponent;
1380
- }());
1381
- Fs2faManageComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faManageComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: i1__namespace.MatDialog }, { token: TwoFactorManageService }], target: i0__namespace.ɵɵFactoryTarget.Component });
1382
- Fs2faManageComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2faManageComponent, selector: "fs-2fa-manage", inputs: { accountVerify: "accountVerify", defaultCountry: "defaultCountry", verificationMethodTypes: "verificationMethodTypes", verificationMethodsFetch: "verificationMethodsFetch", verificationMethodDelete: "verificationMethodDelete", verificationMethodCreate: "verificationMethodCreate", verificationMethodDefault: "verificationMethodDefault", verificationMethodVerify: "verificationMethodVerify", verificationMethodResend: "verificationMethodResend" }, providers: [TwoFactorManageService], ngImport: i0__namespace, template: "<fs-label-field>\n <fs-label>Status</fs-label>\n <ng-container *ngIf=\"statuses\">\n <ng-container *ngIf=\"statuses.length === 1\">\n {{statuses[0]}} verification is enabled\n </ng-container>\n\n <ng-container *ngIf=\"statuses.length > 1\">\n {{statuses.join(', ')}} verifications are enabled\n </ng-container>\n\n <ng-container *ngIf=\"statuses.length === 0\">\n No verification methods are enabled\n </ng-container>\n </ng-container>\n</fs-label-field>", styles: [""], components: [{ type: i3__namespace$2.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i3__namespace$2.FsLabelComponent, selector: "fs-label" }], directives: [{ type: i9__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1383
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faManageComponent, decorators: [{
1384
- type: i0.Component,
1385
- args: [{
1386
- selector: 'fs-2fa-manage',
1387
- templateUrl: './2fa-manage.component.html',
1388
- styleUrls: ['./2fa-manage.component.scss'],
1389
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1390
- providers: [TwoFactorManageService],
1391
- }]
1392
- }], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: i1__namespace.MatDialog }, { type: TwoFactorManageService }]; }, propDecorators: { accountVerify: [{
1393
- type: i0.Input
1394
- }], defaultCountry: [{
1395
- type: i0.Input
1396
- }], verificationMethodTypes: [{
1397
- type: i0.Input
1398
- }], verificationMethodsFetch: [{
1399
- type: i0.Input
1400
- }], verificationMethodDelete: [{
1401
- type: i0.Input
1402
- }], verificationMethodCreate: [{
1403
- type: i0.Input
1404
- }], verificationMethodDefault: [{
1405
- type: i0.Input
1406
- }], verificationMethodVerify: [{
1407
- type: i0.Input
1408
- }], verificationMethodResend: [{
1409
- type: i0.Input
1385
+ var Fs2faManageComponent = /** @class */ (function () {
1386
+ function Fs2faManageComponent(_cdRef, _dialog, _twoFactorManageService) {
1387
+ this._cdRef = _cdRef;
1388
+ this._dialog = _dialog;
1389
+ this._twoFactorManageService = _twoFactorManageService;
1390
+ this._destroy$ = new rxjs.Subject();
1391
+ }
1392
+ Fs2faManageComponent.prototype.ngOnInit = function () {
1393
+ var _this = this;
1394
+ this.verificationMethodTypes = this.verificationMethodTypes || [
1395
+ exports.VerificationMethodType.Sms,
1396
+ exports.VerificationMethodType.Email,
1397
+ exports.VerificationMethodType.App
1398
+ ];
1399
+ this._twoFactorManageService.registerVerificationMethodsFetch(this.verificationMethodsFetch);
1400
+ this._twoFactorManageService.registerVerificationMethodDelete(this.verificationMethodDelete);
1401
+ this._twoFactorManageService.registerVerificationMethodCreate(this.verificationMethodCreate);
1402
+ this._twoFactorManageService.registerVerificationMethodVerify(this.verificationMethodVerify);
1403
+ this._twoFactorManageService.registerVerificationMethodResend(this.verificationMethodResend);
1404
+ this._twoFactorManageService.registerVerificationMethodDefault(this.verificationMethodDefault);
1405
+ this._twoFactorManageService.registerAccountVerify(this.accountVerify);
1406
+ this._twoFactorManageService.verificationMethods$
1407
+ .subscribe(function (verificationMethods) {
1408
+ var types = {
1409
+ sms: 'Text Message',
1410
+ email: 'Email',
1411
+ app: 'Authenticator App',
1412
+ };
1413
+ _this.statuses = Object.keys(verificationMethods.reduce(function (accum, verificationMethod) {
1414
+ accum[verificationMethod.type] = true;
1415
+ return accum;
1416
+ }, {}))
1417
+ .map(function (type) {
1418
+ return types[type];
1419
+ });
1420
+ _this._cdRef.markForCheck();
1421
+ });
1422
+ this._twoFactorManageService.verificationMethodsFetch();
1423
+ };
1424
+ Fs2faManageComponent.prototype.manage = function () {
1425
+ var _this = this;
1426
+ var dialogRef = this._dialog.open(ManageMethodsComponent, {
1427
+ autoFocus: false,
1428
+ data: {
1429
+ defaultCountry: this.defaultCountry,
1430
+ twoFactorManageService: this._twoFactorManageService,
1431
+ verificationMethodTypes: this.verificationMethodTypes,
1432
+ },
1433
+ });
1434
+ dialogRef.afterClosed()
1435
+ .pipe(operators.takeUntil(this._destroy$))
1436
+ .subscribe(function () {
1437
+ _this._cdRef.markForCheck();
1438
+ });
1439
+ };
1440
+ Fs2faManageComponent.prototype.reload = function () {
1441
+ this._twoFactorManageService.verificationMethodsFetch();
1442
+ };
1443
+ Fs2faManageComponent.prototype.ngOnDestroy = function () {
1444
+ this._destroy$.next();
1445
+ this._destroy$.complete();
1446
+ };
1447
+ return Fs2faManageComponent;
1448
+ }());
1449
+ Fs2faManageComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faManageComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: i1__namespace.MatDialog }, { token: TwoFactorManageService }], target: i0__namespace.ɵɵFactoryTarget.Component });
1450
+ Fs2faManageComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: Fs2faManageComponent, selector: "fs-2fa-manage", inputs: { accountVerify: "accountVerify", defaultCountry: "defaultCountry", verificationMethodTypes: "verificationMethodTypes", verificationMethodsFetch: "verificationMethodsFetch", verificationMethodDelete: "verificationMethodDelete", verificationMethodCreate: "verificationMethodCreate", verificationMethodDefault: "verificationMethodDefault", verificationMethodVerify: "verificationMethodVerify", verificationMethodResend: "verificationMethodResend" }, providers: [TwoFactorManageService], ngImport: i0__namespace, template: "<fs-label-field>\n <fs-label>Status</fs-label>\n <ng-container *ngIf=\"statuses\">\n <ng-container *ngIf=\"statuses.length === 1\">\n {{statuses[0]}} verification is enabled\n </ng-container>\n\n <ng-container *ngIf=\"statuses.length > 1\">\n {{statuses.join(', ')}} verifications are enabled\n </ng-container>\n\n <ng-container *ngIf=\"statuses.length === 0\">\n No verification methods are enabled\n </ng-container>\n </ng-container>\n</fs-label-field>", styles: [""], components: [{ type: i3__namespace$2.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i3__namespace$2.FsLabelComponent, selector: "fs-label" }], directives: [{ type: i9__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1451
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faManageComponent, decorators: [{
1452
+ type: i0.Component,
1453
+ args: [{
1454
+ selector: 'fs-2fa-manage',
1455
+ templateUrl: './2fa-manage.component.html',
1456
+ styleUrls: ['./2fa-manage.component.scss'],
1457
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
1458
+ providers: [TwoFactorManageService],
1459
+ }]
1460
+ }], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: i1__namespace.MatDialog }, { type: TwoFactorManageService }]; }, propDecorators: { accountVerify: [{
1461
+ type: i0.Input
1462
+ }], defaultCountry: [{
1463
+ type: i0.Input
1464
+ }], verificationMethodTypes: [{
1465
+ type: i0.Input
1466
+ }], verificationMethodsFetch: [{
1467
+ type: i0.Input
1468
+ }], verificationMethodDelete: [{
1469
+ type: i0.Input
1470
+ }], verificationMethodCreate: [{
1471
+ type: i0.Input
1472
+ }], verificationMethodDefault: [{
1473
+ type: i0.Input
1474
+ }], verificationMethodVerify: [{
1475
+ type: i0.Input
1476
+ }], verificationMethodResend: [{
1477
+ type: i0.Input
1410
1478
  }] } });
1411
1479
 
1412
- var DefautledModule = /** @class */ (function () {
1413
- function DefautledModule() {
1414
- }
1415
- return DefautledModule;
1416
- }());
1417
- DefautledModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DefautledModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1418
- DefautledModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DefautledModule, declarations: [DefaultedComponent], exports: [DefaultedComponent] });
1419
- DefautledModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DefautledModule });
1420
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DefautledModule, decorators: [{
1421
- type: i0.NgModule,
1422
- args: [{
1423
- declarations: [
1424
- DefaultedComponent,
1425
- ],
1426
- exports: [DefaultedComponent],
1427
- }]
1428
- }] });
1429
-
1430
- var Fs2faVerificationMethodsModule = /** @class */ (function () {
1431
- function Fs2faVerificationMethodsModule() {
1432
- }
1433
- return Fs2faVerificationMethodsModule;
1434
- }());
1435
- Fs2faVerificationMethodsModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faVerificationMethodsModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1436
- Fs2faVerificationMethodsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faVerificationMethodsModule, declarations: [VerificationMethodsComponent], imports: [i9$1.CommonModule,
1437
- i8.FormsModule,
1438
- i4.MatIconModule,
1439
- i2$1.FsListModule,
1440
- i8$1.FsPhoneModule,
1441
- i4$1.FsCountryModule,
1442
- DefautledModule], exports: [VerificationMethodsComponent] });
1443
- Fs2faVerificationMethodsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faVerificationMethodsModule, imports: [[
1444
- i9$1.CommonModule,
1445
- i8.FormsModule,
1446
- i4.MatIconModule,
1447
- i2$1.FsListModule,
1448
- i8$1.FsPhoneModule,
1449
- i4$1.FsCountryModule,
1450
- DefautledModule,
1451
- ]] });
1452
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faVerificationMethodsModule, decorators: [{
1453
- type: i0.NgModule,
1454
- args: [{
1455
- imports: [
1456
- i9$1.CommonModule,
1457
- i8.FormsModule,
1458
- i4.MatIconModule,
1459
- i2$1.FsListModule,
1460
- i8$1.FsPhoneModule,
1461
- i4$1.FsCountryModule,
1462
- DefautledModule,
1463
- ],
1464
- declarations: [
1465
- VerificationMethodsComponent,
1466
- ],
1467
- exports: [VerificationMethodsComponent],
1468
- }]
1469
- }] });
1470
-
1471
- var Fs2faManageModule = /** @class */ (function () {
1472
- function Fs2faManageModule() {
1473
- }
1474
- return Fs2faManageModule;
1475
- }());
1476
- Fs2faManageModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faManageModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1477
- Fs2faManageModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faManageModule, declarations: [Fs2faManageComponent,
1478
- ManageMethodsComponent,
1479
- NumbersComponent,
1480
- AppComponent,
1481
- EmailComponent,
1482
- NumberComponent,
1483
- EmailsComponent,
1484
- QrCodeComponent], imports: [i9$1.CommonModule,
1485
- i8.FormsModule,
1486
- i6.MatButtonModule,
1487
- i1.MatDialogModule,
1488
- i11.MatInputModule,
1489
- i4.MatIconModule,
1490
- i6$1.MatCheckboxModule,
1491
- i3.FsDialogModule,
1492
- i2$1.FsListModule,
1493
- i9.FsFormModule,
1494
- i3$2.FsLabelModule,
1495
- i8$1.FsPhoneModule,
1496
- i11$1.FsSkeletonModule,
1497
- i4$1.FsCountryModule,
1498
- CodeInputModule,
1499
- ResendModule,
1500
- DefautledModule,
1501
- Fs2faVerificationModule,
1502
- Fs2faVerificationMethodsModule], exports: [Fs2faManageComponent] });
1503
- Fs2faManageModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faManageModule, imports: [[
1504
- i9$1.CommonModule,
1505
- i8.FormsModule,
1506
- i6.MatButtonModule,
1507
- i1.MatDialogModule,
1508
- i11.MatInputModule,
1509
- i4.MatIconModule,
1510
- i6$1.MatCheckboxModule,
1511
- i3.FsDialogModule,
1512
- i2$1.FsListModule,
1513
- i9.FsFormModule,
1514
- i3$2.FsLabelModule,
1515
- i8$1.FsPhoneModule,
1516
- i11$1.FsSkeletonModule,
1517
- i4$1.FsCountryModule,
1518
- CodeInputModule,
1519
- ResendModule,
1520
- DefautledModule,
1521
- Fs2faVerificationModule,
1522
- Fs2faVerificationMethodsModule,
1523
- ]] });
1524
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faManageModule, decorators: [{
1525
- type: i0.NgModule,
1526
- args: [{
1527
- imports: [
1528
- i9$1.CommonModule,
1529
- i8.FormsModule,
1530
- i6.MatButtonModule,
1531
- i1.MatDialogModule,
1532
- i11.MatInputModule,
1533
- i4.MatIconModule,
1534
- i6$1.MatCheckboxModule,
1535
- i3.FsDialogModule,
1536
- i2$1.FsListModule,
1537
- i9.FsFormModule,
1538
- i3$2.FsLabelModule,
1539
- i8$1.FsPhoneModule,
1540
- i11$1.FsSkeletonModule,
1541
- i4$1.FsCountryModule,
1542
- CodeInputModule,
1543
- ResendModule,
1544
- DefautledModule,
1545
- Fs2faVerificationModule,
1546
- Fs2faVerificationMethodsModule,
1547
- ],
1548
- declarations: [
1549
- Fs2faManageComponent,
1550
- ManageMethodsComponent,
1551
- NumbersComponent,
1552
- AppComponent,
1553
- EmailComponent,
1554
- NumberComponent,
1555
- EmailsComponent,
1556
- QrCodeComponent,
1557
- ],
1558
- exports: [Fs2faManageComponent],
1559
- }]
1480
+ var Fs2faManageModule = /** @class */ (function () {
1481
+ function Fs2faManageModule() {
1482
+ }
1483
+ return Fs2faManageModule;
1484
+ }());
1485
+ Fs2faManageModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faManageModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1486
+ Fs2faManageModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faManageModule, declarations: [Fs2faManageComponent,
1487
+ ManageMethodsComponent,
1488
+ NumbersComponent,
1489
+ AppComponent,
1490
+ EmailComponent,
1491
+ NumberComponent,
1492
+ EmailsComponent,
1493
+ QrCodeComponent], imports: [i9$1.CommonModule,
1494
+ i8.FormsModule,
1495
+ i6.MatButtonModule,
1496
+ i1.MatDialogModule,
1497
+ i11.MatInputModule,
1498
+ i4.MatIconModule,
1499
+ i6$1.MatCheckboxModule,
1500
+ i3.FsDialogModule,
1501
+ i2$1.FsListModule,
1502
+ i9.FsFormModule,
1503
+ i3$2.FsLabelModule,
1504
+ i8$1.FsPhoneModule,
1505
+ i11$1.FsSkeletonModule,
1506
+ i4$1.FsCountryModule,
1507
+ CodeInputModule,
1508
+ ResendModule,
1509
+ DefautledModule,
1510
+ Fs2faVerificationModule,
1511
+ Fs2faVerificationMethodsModule], exports: [Fs2faManageComponent] });
1512
+ Fs2faManageModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faManageModule, imports: [[
1513
+ i9$1.CommonModule,
1514
+ i8.FormsModule,
1515
+ i6.MatButtonModule,
1516
+ i1.MatDialogModule,
1517
+ i11.MatInputModule,
1518
+ i4.MatIconModule,
1519
+ i6$1.MatCheckboxModule,
1520
+ i3.FsDialogModule,
1521
+ i2$1.FsListModule,
1522
+ i9.FsFormModule,
1523
+ i3$2.FsLabelModule,
1524
+ i8$1.FsPhoneModule,
1525
+ i11$1.FsSkeletonModule,
1526
+ i4$1.FsCountryModule,
1527
+ CodeInputModule,
1528
+ ResendModule,
1529
+ DefautledModule,
1530
+ Fs2faVerificationModule,
1531
+ Fs2faVerificationMethodsModule,
1532
+ ]] });
1533
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: Fs2faManageModule, decorators: [{
1534
+ type: i0.NgModule,
1535
+ args: [{
1536
+ imports: [
1537
+ i9$1.CommonModule,
1538
+ i8.FormsModule,
1539
+ i6.MatButtonModule,
1540
+ i1.MatDialogModule,
1541
+ i11.MatInputModule,
1542
+ i4.MatIconModule,
1543
+ i6$1.MatCheckboxModule,
1544
+ i3.FsDialogModule,
1545
+ i2$1.FsListModule,
1546
+ i9.FsFormModule,
1547
+ i3$2.FsLabelModule,
1548
+ i8$1.FsPhoneModule,
1549
+ i11$1.FsSkeletonModule,
1550
+ i4$1.FsCountryModule,
1551
+ CodeInputModule,
1552
+ ResendModule,
1553
+ DefautledModule,
1554
+ Fs2faVerificationModule,
1555
+ Fs2faVerificationMethodsModule,
1556
+ ],
1557
+ declarations: [
1558
+ Fs2faManageComponent,
1559
+ ManageMethodsComponent,
1560
+ NumbersComponent,
1561
+ AppComponent,
1562
+ EmailComponent,
1563
+ NumberComponent,
1564
+ EmailsComponent,
1565
+ QrCodeComponent,
1566
+ ],
1567
+ exports: [Fs2faManageComponent],
1568
+ }]
1560
1569
  }] });
1561
1570
 
1562
- /**
1563
- * Generated bundle index. Do not edit.
1571
+ /**
1572
+ * Generated bundle index. Do not edit.
1564
1573
  */
1565
1574
 
1566
1575
  exports.Fs2faManageComponent = Fs2faManageComponent;