@molecule/app-settings-panel-angular 2.0.2 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +131 -97
- package/dist/auth-section.component.d.ts +24 -7
- package/dist/auth-section.component.d.ts.map +1 -1
- package/dist/auth-section.component.js +144 -105
- package/dist/auth-section.component.js.map +1 -1
- package/dist/billing-section.component.d.ts +10 -7
- package/dist/billing-section.component.d.ts.map +1 -1
- package/dist/billing-section.component.js +38 -23
- package/dist/billing-section.component.js.map +1 -1
- package/dist/tiers-upgrade-section.component.d.ts +26 -15
- package/dist/tiers-upgrade-section.component.d.ts.map +1 -1
- package/dist/tiers-upgrade-section.component.js +167 -132
- package/dist/tiers-upgrade-section.component.js.map +1 -1
- package/dist/types.d.ts +9 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +8 -8
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
|
-
import { Component, computed, DestroyRef, ElementRef, inject,
|
|
6
|
+
import { Component, computed, DestroyRef, ElementRef, inject,
|
|
7
|
+
// The UI kit's text field is `Input` here, so the decorator takes another name.
|
|
8
|
+
Input as InputProperty, signal, } from '@angular/core';
|
|
7
9
|
import { MolPlacement, placeContentBefore, setElementPresent, useAuth, useChangePassword, useHttpClient, usePlacement, useTranslation, } from '@molecule/app-angular';
|
|
8
10
|
import { serverErrorMessage } from '@molecule/app-http';
|
|
9
11
|
import { getClassMap } from '@molecule/app-ui';
|
|
@@ -12,10 +14,10 @@ import * as i0 from "@angular/core";
|
|
|
12
14
|
import * as i1 from "@molecule/app-angular";
|
|
13
15
|
const _c0 = () => ({ defaultValue: "Authentication" });
|
|
14
16
|
const _c1 = () => ({ defaultValue: "Change password" });
|
|
15
|
-
const _c2 = () => ({ defaultValue: "
|
|
16
|
-
const _c3 = () => ({ defaultValue: "
|
|
17
|
-
const _c4 = () => ({ defaultValue: "
|
|
18
|
-
const _c5 = () => ({ defaultValue: "
|
|
17
|
+
const _c2 = () => ({ defaultValue: "Change Password" });
|
|
18
|
+
const _c3 = () => ({ defaultValue: "Current Password" });
|
|
19
|
+
const _c4 = () => ({ defaultValue: "New Password" });
|
|
20
|
+
const _c5 = () => ({ defaultValue: "Two-factor authentication" });
|
|
19
21
|
const _c6 = () => ({ defaultValue: "On" });
|
|
20
22
|
const _c7 = () => ({ defaultValue: "Disable" });
|
|
21
23
|
const _c8 = () => ({ defaultValue: "Enable" });
|
|
@@ -24,42 +26,61 @@ const _c10 = () => ({ defaultValue: "Scan this QR code with your authenticator a
|
|
|
24
26
|
const _c11 = () => ({ defaultValue: "Two-factor QR code" });
|
|
25
27
|
const _c12 = () => ({ defaultValue: "Authentication code" });
|
|
26
28
|
const _c13 = () => ({ defaultValue: "Verify & enable" });
|
|
27
|
-
function
|
|
29
|
+
function AuthSection_Conditional_0_Conditional_6_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
28
30
|
i0.ɵɵelementStart(0, "span");
|
|
29
31
|
i0.ɵɵtext(1);
|
|
30
32
|
i0.ɵɵelementEnd();
|
|
31
33
|
} if (rf & 2) {
|
|
32
|
-
const ctx_r1 = i0.ɵɵnextContext(
|
|
34
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
33
35
|
i0.ɵɵclassMap(ctx_r1.cm.cn(ctx_r1.cm.textSize("xs"), ctx_r1.cm.textSubtle, ctx_r1.cm.sp("ml", 2)));
|
|
34
36
|
i0.ɵɵadvance();
|
|
35
37
|
i0.ɵɵtextInterpolate(ctx_r1.t("settings.twoFactorOn", undefined, i0.ɵɵpureFunction0(3, _c6)));
|
|
36
38
|
} }
|
|
37
|
-
function
|
|
39
|
+
function AuthSection_Conditional_0_Conditional_6_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
38
40
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
39
|
-
i0.ɵɵelementStart(0, "button",
|
|
40
|
-
i0.ɵɵlistener("click", function
|
|
41
|
+
i0.ɵɵelementStart(0, "button", 14);
|
|
42
|
+
i0.ɵɵlistener("click", function AuthSection_Conditional_0_Conditional_6_Conditional_4_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.openDisableTf()); });
|
|
41
43
|
i0.ɵɵtext(1);
|
|
42
44
|
i0.ɵɵelementEnd();
|
|
43
45
|
} if (rf & 2) {
|
|
44
|
-
const ctx_r1 = i0.ɵɵnextContext(
|
|
46
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
45
47
|
i0.ɵɵproperty("variant", "outline")("size", "sm");
|
|
46
48
|
i0.ɵɵadvance();
|
|
47
49
|
i0.ɵɵtextInterpolate1(" ", ctx_r1.t("settings.twoFactorDisable", undefined, i0.ɵɵpureFunction0(3, _c7)), " ");
|
|
48
50
|
} }
|
|
49
|
-
function
|
|
51
|
+
function AuthSection_Conditional_0_Conditional_6_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
50
52
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
51
|
-
i0.ɵɵelementStart(0, "button",
|
|
52
|
-
i0.ɵɵlistener("click", function
|
|
53
|
+
i0.ɵɵelementStart(0, "button", 15);
|
|
54
|
+
i0.ɵɵlistener("click", function AuthSection_Conditional_0_Conditional_6_Conditional_5_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.startEnable()); });
|
|
53
55
|
i0.ɵɵtext(1);
|
|
54
56
|
i0.ɵɵelementEnd();
|
|
55
57
|
} if (rf & 2) {
|
|
56
|
-
const ctx_r1 = i0.ɵɵnextContext(
|
|
58
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
57
59
|
i0.ɵɵproperty("variant", "outline")("size", "sm");
|
|
58
60
|
i0.ɵɵadvance();
|
|
59
61
|
i0.ɵɵtextInterpolate1(" ", ctx_r1.t("settings.twoFactorEnable", undefined, i0.ɵɵpureFunction0(3, _c8)), " ");
|
|
60
62
|
} }
|
|
61
|
-
function
|
|
62
|
-
i0.ɵɵelementStart(0, "div",
|
|
63
|
+
function AuthSection_Conditional_0_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
64
|
+
i0.ɵɵelementStart(0, "div", 1)(1, "span");
|
|
65
|
+
i0.ɵɵtext(2);
|
|
66
|
+
i0.ɵɵconditionalCreate(3, AuthSection_Conditional_0_Conditional_6_Conditional_3_Template, 2, 4, "span", 11);
|
|
67
|
+
i0.ɵɵelementEnd();
|
|
68
|
+
i0.ɵɵconditionalCreate(4, AuthSection_Conditional_0_Conditional_6_Conditional_4_Template, 2, 4, "button", 12)(5, AuthSection_Conditional_0_Conditional_6_Conditional_5_Template, 2, 4, "button", 13);
|
|
69
|
+
i0.ɵɵelementEnd();
|
|
70
|
+
} if (rf & 2) {
|
|
71
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
72
|
+
i0.ɵɵproperty("align", "center")("justify", "between");
|
|
73
|
+
i0.ɵɵadvance();
|
|
74
|
+
i0.ɵɵclassMap(ctx_r1.cm.textSize("sm"));
|
|
75
|
+
i0.ɵɵadvance();
|
|
76
|
+
i0.ɵɵtextInterpolate(ctx_r1.t("settings.twoFactor", undefined, i0.ɵɵpureFunction0(7, _c5)));
|
|
77
|
+
i0.ɵɵadvance();
|
|
78
|
+
i0.ɵɵconditional(ctx_r1.twoFactorEnabled() ? 3 : -1);
|
|
79
|
+
i0.ɵɵadvance();
|
|
80
|
+
i0.ɵɵconditional(ctx_r1.twoFactorEnabled() ? 4 : 5);
|
|
81
|
+
} }
|
|
82
|
+
function AuthSection_Conditional_0_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
83
|
+
i0.ɵɵelementStart(0, "div", 3);
|
|
63
84
|
i0.ɵɵtext(1);
|
|
64
85
|
i0.ɵɵelementEnd();
|
|
65
86
|
} if (rf & 2) {
|
|
@@ -68,47 +89,47 @@ function AuthSection_Conditional_0_Conditional_13_Template(rf, ctx) { if (rf & 1
|
|
|
68
89
|
i0.ɵɵadvance();
|
|
69
90
|
i0.ɵɵtextInterpolate(ctx);
|
|
70
91
|
} }
|
|
71
|
-
function
|
|
92
|
+
function AuthSection_Conditional_0_Conditional_19_Template(rf, ctx) { if (rf & 1) {
|
|
72
93
|
i0.ɵɵtext(0);
|
|
73
94
|
} if (rf & 2) {
|
|
74
95
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
75
96
|
i0.ɵɵtextInterpolate1(" ", ctx_r1.t("settings.changePasswordModal.changing", undefined, i0.ɵɵpureFunction0(1, _c9)), " ");
|
|
76
97
|
} }
|
|
77
|
-
function
|
|
98
|
+
function AuthSection_Conditional_0_Conditional_20_Template(rf, ctx) { if (rf & 1) {
|
|
78
99
|
i0.ɵɵtext(0);
|
|
79
100
|
} if (rf & 2) {
|
|
80
101
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
81
102
|
i0.ɵɵtextInterpolate1(" ", ctx_r1.t("settings.changePassword", undefined, i0.ɵɵpureFunction0(1, _c1)), " ");
|
|
82
103
|
} }
|
|
83
|
-
function
|
|
84
|
-
i0.ɵɵelementStart(0, "div",
|
|
104
|
+
function AuthSection_Conditional_0_Conditional_21_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
105
|
+
i0.ɵɵelementStart(0, "div", 3);
|
|
85
106
|
i0.ɵɵtext(1);
|
|
86
107
|
i0.ɵɵelementEnd();
|
|
87
108
|
} if (rf & 2) {
|
|
88
|
-
const ctx_r1 = i0.ɵɵnextContext(
|
|
109
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
89
110
|
i0.ɵɵproperty("status", "error")("className", ctx_r1.cm.sp("mb", 4));
|
|
90
111
|
i0.ɵɵadvance();
|
|
91
112
|
i0.ɵɵtextInterpolate(ctx);
|
|
92
113
|
} }
|
|
93
|
-
function
|
|
114
|
+
function AuthSection_Conditional_0_Conditional_21_Conditional_2_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
94
115
|
i0.ɵɵelementStart(0, "p");
|
|
95
116
|
i0.ɵɵtext(1);
|
|
96
117
|
i0.ɵɵelementEnd();
|
|
97
118
|
} if (rf & 2) {
|
|
98
|
-
const ctx_r1 = i0.ɵɵnextContext(
|
|
119
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
99
120
|
i0.ɵɵclassMap(ctx_r1.cm.cn(ctx_r1.cm.textSize("xs"), ctx_r1.cm.textSubtle, ctx_r1.cm.settingsPanelTwoFactorSecret));
|
|
100
121
|
i0.ɵɵadvance();
|
|
101
122
|
i0.ɵɵtextInterpolate1(" ", ctx_r1.tfSetup()?.secret, " ");
|
|
102
123
|
} }
|
|
103
|
-
function
|
|
124
|
+
function AuthSection_Conditional_0_Conditional_21_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
104
125
|
i0.ɵɵelementStart(0, "div")(1, "p");
|
|
105
126
|
i0.ɵɵtext(2);
|
|
106
127
|
i0.ɵɵelementEnd();
|
|
107
128
|
i0.ɵɵelement(3, "img");
|
|
108
|
-
i0.ɵɵconditionalCreate(4,
|
|
129
|
+
i0.ɵɵconditionalCreate(4, AuthSection_Conditional_0_Conditional_21_Conditional_2_Conditional_4_Template, 2, 3, "p", 11);
|
|
109
130
|
i0.ɵɵelementEnd();
|
|
110
131
|
} if (rf & 2) {
|
|
111
|
-
const ctx_r1 = i0.ɵɵnextContext(
|
|
132
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
112
133
|
i0.ɵɵclassMap(ctx_r1.cm.cn(ctx_r1.cm.stack(3), ctx_r1.cm.sp("mb", 4)));
|
|
113
134
|
i0.ɵɵadvance();
|
|
114
135
|
i0.ɵɵclassMap(ctx_r1.cm.cn(ctx_r1.cm.textSize("sm"), ctx_r1.cm.textMuted));
|
|
@@ -120,33 +141,33 @@ function AuthSection_Conditional_0_Conditional_28_Template(rf, ctx) { if (rf & 1
|
|
|
120
141
|
i0.ɵɵadvance();
|
|
121
142
|
i0.ɵɵconditional(ctx_r1.tfSetup()?.secret ? 4 : -1);
|
|
122
143
|
} }
|
|
123
|
-
function
|
|
144
|
+
function AuthSection_Conditional_0_Conditional_21_Conditional_3_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
124
145
|
i0.ɵɵtext(0);
|
|
125
146
|
} if (rf & 2) {
|
|
126
|
-
const ctx_r1 = i0.ɵɵnextContext(
|
|
147
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
127
148
|
i0.ɵɵtextInterpolate1(" ", ctx_r1.t("settings.twoFactorDisable", undefined, i0.ɵɵpureFunction0(1, _c7)), " ");
|
|
128
149
|
} }
|
|
129
|
-
function
|
|
150
|
+
function AuthSection_Conditional_0_Conditional_21_Conditional_3_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
130
151
|
i0.ɵɵtext(0);
|
|
131
152
|
} if (rf & 2) {
|
|
132
|
-
const ctx_r1 = i0.ɵɵnextContext(
|
|
153
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
133
154
|
i0.ɵɵtextInterpolate1(" ", ctx_r1.t("settings.twoFactorVerify", undefined, i0.ɵɵpureFunction0(1, _c13)), " ");
|
|
134
155
|
} }
|
|
135
|
-
function
|
|
136
|
-
const
|
|
137
|
-
i0.ɵɵelementStart(0, "form",
|
|
138
|
-
i0.ɵɵlistener("submit", function
|
|
139
|
-
i0.ɵɵelementStart(1, "div")(2, "label",
|
|
156
|
+
function AuthSection_Conditional_0_Conditional_21_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
157
|
+
const _r6 = i0.ɵɵgetCurrentView();
|
|
158
|
+
i0.ɵɵelementStart(0, "form", 4);
|
|
159
|
+
i0.ɵɵlistener("submit", function AuthSection_Conditional_0_Conditional_21_Conditional_3_Template_form_submit_0_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.submitTfForm($event)); });
|
|
160
|
+
i0.ɵɵelementStart(1, "div")(2, "label", 16);
|
|
140
161
|
i0.ɵɵtext(3);
|
|
141
162
|
i0.ɵɵelementEnd();
|
|
142
|
-
i0.ɵɵelementStart(4, "div",
|
|
143
|
-
i0.ɵɵlistener("change", function
|
|
163
|
+
i0.ɵɵelementStart(4, "div", 17);
|
|
164
|
+
i0.ɵɵlistener("change", function AuthSection_Conditional_0_Conditional_21_Conditional_3_Template_div_change_4_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.tfToken.set($event.target.value)); });
|
|
144
165
|
i0.ɵɵelementEnd()();
|
|
145
|
-
i0.ɵɵelementStart(5, "button",
|
|
146
|
-
i0.ɵɵconditionalCreate(6,
|
|
166
|
+
i0.ɵɵelementStart(5, "button", 18);
|
|
167
|
+
i0.ɵɵconditionalCreate(6, AuthSection_Conditional_0_Conditional_21_Conditional_3_Conditional_6_Template, 1, 2)(7, AuthSection_Conditional_0_Conditional_21_Conditional_3_Conditional_7_Template, 1, 2);
|
|
147
168
|
i0.ɵɵelementEnd()();
|
|
148
169
|
} if (rf & 2) {
|
|
149
|
-
const ctx_r1 = i0.ɵɵnextContext(
|
|
170
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
150
171
|
i0.ɵɵclassMap(ctx_r1.cm.stack(4));
|
|
151
172
|
i0.ɵɵadvance(2);
|
|
152
173
|
i0.ɵɵclassMap(ctx_r1.cm.formLabel);
|
|
@@ -159,6 +180,25 @@ function AuthSection_Conditional_0_Conditional_29_Template(rf, ctx) { if (rf & 1
|
|
|
159
180
|
i0.ɵɵadvance();
|
|
160
181
|
i0.ɵɵconditional(ctx_r1.tfModal() === "disable" ? 6 : 7);
|
|
161
182
|
} }
|
|
183
|
+
function AuthSection_Conditional_0_Conditional_21_Template(rf, ctx) { if (rf & 1) {
|
|
184
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
185
|
+
i0.ɵɵelementStart(0, "mol-modal", 2);
|
|
186
|
+
i0.ɵɵlistener("close", function AuthSection_Conditional_0_Conditional_21_Template_mol_modal_close_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.closeTf()); });
|
|
187
|
+
i0.ɵɵconditionalCreate(1, AuthSection_Conditional_0_Conditional_21_Conditional_1_Template, 2, 3, "div", 3);
|
|
188
|
+
i0.ɵɵconditionalCreate(2, AuthSection_Conditional_0_Conditional_21_Conditional_2_Template, 5, 12, "div", 11);
|
|
189
|
+
i0.ɵɵconditionalCreate(3, AuthSection_Conditional_0_Conditional_21_Conditional_3_Template, 8, 13, "form", 11);
|
|
190
|
+
i0.ɵɵelementEnd();
|
|
191
|
+
} if (rf & 2) {
|
|
192
|
+
let tmp_4_0;
|
|
193
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
194
|
+
i0.ɵɵproperty("open", ctx_r1.tfModal() !== null)("title", ctx_r1.tfTitle());
|
|
195
|
+
i0.ɵɵadvance();
|
|
196
|
+
i0.ɵɵconditional((tmp_4_0 = ctx_r1.tfError()) ? 1 : -1, tmp_4_0);
|
|
197
|
+
i0.ɵɵadvance();
|
|
198
|
+
i0.ɵɵconditional(ctx_r1.tfModal() === "enable" && ctx_r1.tfSetup()?.QRImageUrl ? 2 : -1);
|
|
199
|
+
i0.ɵɵadvance();
|
|
200
|
+
i0.ɵɵconditional(ctx_r1.tfModal() === "disable" || ctx_r1.tfSetup() ? 3 : -1);
|
|
201
|
+
} }
|
|
162
202
|
function AuthSection_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
163
203
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
164
204
|
i0.ɵɵelementStart(0, "section")(1, "h3");
|
|
@@ -168,92 +208,68 @@ function AuthSection_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
168
208
|
i0.ɵɵlistener("click", function AuthSection_Conditional_0_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.showPasswordModal.set(true)); });
|
|
169
209
|
i0.ɵɵtext(5);
|
|
170
210
|
i0.ɵɵelementEnd();
|
|
171
|
-
i0.ɵɵ
|
|
172
|
-
i0.ɵɵ
|
|
173
|
-
i0.ɵɵ
|
|
174
|
-
i0.ɵɵ
|
|
175
|
-
i0.ɵɵconditionalCreate(
|
|
176
|
-
i0.ɵɵ
|
|
177
|
-
i0.ɵɵ
|
|
178
|
-
i0.ɵɵ
|
|
179
|
-
i0.ɵɵ
|
|
180
|
-
i0.ɵɵelementStart(14, "form", 7);
|
|
181
|
-
i0.ɵɵlistener("submit", function AuthSection_Conditional_0_Template_form_submit_14_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.submitPassword($event)); });
|
|
182
|
-
i0.ɵɵelementStart(15, "div")(16, "label", 8);
|
|
183
|
-
i0.ɵɵtext(17);
|
|
211
|
+
i0.ɵɵconditionalCreate(6, AuthSection_Conditional_0_Conditional_6_Template, 6, 8, "div", 1);
|
|
212
|
+
i0.ɵɵelementEnd()();
|
|
213
|
+
i0.ɵɵelementStart(7, "mol-modal", 2);
|
|
214
|
+
i0.ɵɵlistener("close", function AuthSection_Conditional_0_Template_mol_modal_close_7_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.closePasswordModal()); });
|
|
215
|
+
i0.ɵɵconditionalCreate(8, AuthSection_Conditional_0_Conditional_8_Template, 2, 3, "div", 3);
|
|
216
|
+
i0.ɵɵelementStart(9, "form", 4);
|
|
217
|
+
i0.ɵɵlistener("submit", function AuthSection_Conditional_0_Template_form_submit_9_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.submitPassword($event)); });
|
|
218
|
+
i0.ɵɵelementStart(10, "div")(11, "label", 5);
|
|
219
|
+
i0.ɵɵtext(12);
|
|
184
220
|
i0.ɵɵelementEnd();
|
|
185
|
-
i0.ɵɵelementStart(
|
|
186
|
-
i0.ɵɵlistener("change", function
|
|
221
|
+
i0.ɵɵelementStart(13, "div", 6);
|
|
222
|
+
i0.ɵɵlistener("change", function AuthSection_Conditional_0_Template_div_change_13_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.currentPassword.set($event.target.value)); });
|
|
187
223
|
i0.ɵɵelementEnd()();
|
|
188
|
-
i0.ɵɵelementStart(
|
|
189
|
-
i0.ɵɵtext(
|
|
224
|
+
i0.ɵɵelementStart(14, "div")(15, "label", 7);
|
|
225
|
+
i0.ɵɵtext(16);
|
|
190
226
|
i0.ɵɵelementEnd();
|
|
191
|
-
i0.ɵɵelementStart(
|
|
192
|
-
i0.ɵɵlistener("change", function
|
|
227
|
+
i0.ɵɵelementStart(17, "div", 8);
|
|
228
|
+
i0.ɵɵlistener("change", function AuthSection_Conditional_0_Template_div_change_17_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.newPassword.set($event.target.value)); });
|
|
193
229
|
i0.ɵɵelementEnd()();
|
|
194
|
-
i0.ɵɵelementStart(
|
|
195
|
-
i0.ɵɵconditionalCreate(
|
|
230
|
+
i0.ɵɵelementStart(18, "button", 9);
|
|
231
|
+
i0.ɵɵconditionalCreate(19, AuthSection_Conditional_0_Conditional_19_Template, 1, 2)(20, AuthSection_Conditional_0_Conditional_20_Template, 1, 2);
|
|
196
232
|
i0.ɵɵelementEnd()()();
|
|
197
|
-
i0.ɵɵ
|
|
198
|
-
i0.ɵɵlistener("close", function AuthSection_Conditional_0_Template_mol_modal_close_26_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.closeTf()); });
|
|
199
|
-
i0.ɵɵconditionalCreate(27, AuthSection_Conditional_0_Conditional_27_Template, 2, 3, "div", 6);
|
|
200
|
-
i0.ɵɵconditionalCreate(28, AuthSection_Conditional_0_Conditional_28_Template, 5, 12, "div", 2);
|
|
201
|
-
i0.ɵɵconditionalCreate(29, AuthSection_Conditional_0_Conditional_29_Template, 8, 13, "form", 2);
|
|
202
|
-
i0.ɵɵelementEnd();
|
|
233
|
+
i0.ɵɵconditionalCreate(21, AuthSection_Conditional_0_Conditional_21_Template, 4, 5, "mol-modal", 10);
|
|
203
234
|
} if (rf & 2) {
|
|
204
|
-
let
|
|
205
|
-
let tmp_32_0;
|
|
235
|
+
let tmp_10_0;
|
|
206
236
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
207
237
|
i0.ɵɵadvance();
|
|
208
238
|
i0.ɵɵclassMap(ctx_r1.cm.cn(ctx_r1.cm.sectionHeading, ctx_r1.cm.sp("mb", 3)));
|
|
209
239
|
i0.ɵɵadvance();
|
|
210
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r1.t("settings.authentication", undefined, i0.ɵɵpureFunction0(
|
|
240
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.t("settings.authentication", undefined, i0.ɵɵpureFunction0(30, _c0)), " ");
|
|
211
241
|
i0.ɵɵadvance();
|
|
212
242
|
i0.ɵɵclassMap(ctx_r1.cm.stack(3));
|
|
213
243
|
i0.ɵɵadvance();
|
|
214
244
|
i0.ɵɵproperty("variant", "outline")("size", "sm");
|
|
215
245
|
i0.ɵɵadvance();
|
|
216
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r1.t("settings.changePassword", undefined, i0.ɵɵpureFunction0(
|
|
217
|
-
i0.ɵɵadvance();
|
|
218
|
-
i0.ɵɵproperty("align", "center")("justify", "between");
|
|
219
|
-
i0.ɵɵadvance();
|
|
220
|
-
i0.ɵɵclassMap(ctx_r1.cm.textSize("sm"));
|
|
221
|
-
i0.ɵɵadvance();
|
|
222
|
-
i0.ɵɵtextInterpolate(ctx_r1.t("settings.twoFactor", undefined, i0.ɵɵpureFunction0(42, _c2)));
|
|
246
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.t("settings.changePassword", undefined, i0.ɵɵpureFunction0(31, _c1)), " ");
|
|
223
247
|
i0.ɵɵadvance();
|
|
224
|
-
i0.ɵɵconditional(ctx_r1.
|
|
248
|
+
i0.ɵɵconditional(ctx_r1.showTwoFactor() ? 6 : -1);
|
|
225
249
|
i0.ɵɵadvance();
|
|
226
|
-
i0.ɵɵ
|
|
227
|
-
i0.ɵɵadvance(2);
|
|
228
|
-
i0.ɵɵproperty("open", ctx_r1.showPasswordModal())("title", ctx_r1.t("settings.changePasswordModal.title", undefined, i0.ɵɵpureFunction0(43, _c3)));
|
|
250
|
+
i0.ɵɵproperty("open", ctx_r1.showPasswordModal())("title", ctx_r1.t("settings.changePasswordModal.title", undefined, i0.ɵɵpureFunction0(32, _c2)));
|
|
229
251
|
i0.ɵɵadvance();
|
|
230
|
-
i0.ɵɵconditional((
|
|
252
|
+
i0.ɵɵconditional((tmp_10_0 = ctx_r1.pwError()) ? 8 : -1, tmp_10_0);
|
|
231
253
|
i0.ɵɵadvance();
|
|
232
254
|
i0.ɵɵclassMap(ctx_r1.cm.stack(4));
|
|
233
255
|
i0.ɵɵadvance(2);
|
|
234
256
|
i0.ɵɵclassMap(ctx_r1.cm.formLabel);
|
|
235
257
|
i0.ɵɵadvance();
|
|
236
|
-
i0.ɵɵtextInterpolate(ctx_r1.t("settings.changePasswordModal.currentPassword", undefined, i0.ɵɵpureFunction0(
|
|
258
|
+
i0.ɵɵtextInterpolate(ctx_r1.t("settings.changePasswordModal.currentPassword", undefined, i0.ɵɵpureFunction0(33, _c3)));
|
|
237
259
|
i0.ɵɵadvance();
|
|
238
260
|
i0.ɵɵproperty("id", "current-pw")("required", true)("value", ctx_r1.currentPassword());
|
|
239
261
|
i0.ɵɵadvance(2);
|
|
240
262
|
i0.ɵɵclassMap(ctx_r1.cm.formLabel);
|
|
241
263
|
i0.ɵɵadvance();
|
|
242
|
-
i0.ɵɵtextInterpolate(ctx_r1.t("settings.changePasswordModal.newPassword", undefined, i0.ɵɵpureFunction0(
|
|
264
|
+
i0.ɵɵtextInterpolate(ctx_r1.t("settings.changePasswordModal.newPassword", undefined, i0.ɵɵpureFunction0(34, _c4)));
|
|
243
265
|
i0.ɵɵadvance();
|
|
244
266
|
i0.ɵɵproperty("id", "new-pw")("required", true)("value", ctx_r1.newPassword());
|
|
245
267
|
i0.ɵɵadvance();
|
|
246
268
|
i0.ɵɵproperty("fullWidth", true)("loading", ctx_r1.pwStatus() === "pending");
|
|
247
269
|
i0.ɵɵadvance();
|
|
248
|
-
i0.ɵɵconditional(ctx_r1.pwStatus() === "pending" ?
|
|
270
|
+
i0.ɵɵconditional(ctx_r1.pwStatus() === "pending" ? 19 : 20);
|
|
249
271
|
i0.ɵɵadvance(2);
|
|
250
|
-
i0.ɵɵ
|
|
251
|
-
i0.ɵɵadvance();
|
|
252
|
-
i0.ɵɵconditional((tmp_32_0 = ctx_r1.tfError()) ? 27 : -1, tmp_32_0);
|
|
253
|
-
i0.ɵɵadvance();
|
|
254
|
-
i0.ɵɵconditional(ctx_r1.tfModal() === "enable" && ctx_r1.tfSetup()?.QRImageUrl ? 28 : -1);
|
|
255
|
-
i0.ɵɵadvance();
|
|
256
|
-
i0.ɵɵconditional(ctx_r1.tfModal() === "disable" || ctx_r1.tfSetup() ? 29 : -1);
|
|
272
|
+
i0.ɵɵconditional(ctx_r1.showTwoFactor() ? 21 : -1);
|
|
257
273
|
} }
|
|
258
274
|
/**
|
|
259
275
|
* AuthSection component.
|
|
@@ -273,14 +289,25 @@ function AuthSection_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
273
289
|
* handler deliberately ignores — so it never actually enrolled 2FA.)
|
|
274
290
|
*
|
|
275
291
|
* Auto-hides for OAuth-only users (`user.oauthServer` truthy) since
|
|
276
|
-
* password / 2FA wouldn't apply.
|
|
277
|
-
* provider
|
|
292
|
+
* password / 2FA wouldn't apply. Pass `[twoFactor]="false"` when the app's API
|
|
293
|
+
* has no two-factor provider: it then serves no `verify-two-factor` route, so
|
|
294
|
+
* the section shows only the password change and reads no 2FA status.
|
|
278
295
|
*
|
|
279
296
|
* `useChangePassword`'s state is a live getter over a plain object (the
|
|
280
297
|
* Angular binding's `usePromise` port), so the pending/error reads are
|
|
281
298
|
* mediated by a version signal the handlers bump at React's re-render points.
|
|
282
299
|
*/
|
|
283
300
|
export class AuthSection {
|
|
301
|
+
/**
|
|
302
|
+
* Show the two-factor row. Set false when the API has no two-factor provider
|
|
303
|
+
* (no `POST /users/:id/verify-two-factor` route). Default true.
|
|
304
|
+
*/
|
|
305
|
+
set twoFactor(value) {
|
|
306
|
+
this.showTwoFactor.set(value);
|
|
307
|
+
}
|
|
308
|
+
/** The `twoFactor` input, as a signal the template reads. */
|
|
309
|
+
showTwoFactor = signal(true, /* @ts-ignore */
|
|
310
|
+
...(ngDevMode ? [{ debugName: "showTwoFactor" }] : /* istanbul ignore next */ []));
|
|
284
311
|
/** The signed-in user (React's `useAuth().user`). */
|
|
285
312
|
auth = useAuth();
|
|
286
313
|
/** Reactive translation, read in the injection context. */
|
|
@@ -363,11 +390,7 @@ export class AuthSection {
|
|
|
363
390
|
defaultValue: 'Enable two-factor authentication',
|
|
364
391
|
});
|
|
365
392
|
}
|
|
366
|
-
/**
|
|
367
|
-
* Reads the persisted 2FA status from `/users/me` on mount (React's mount
|
|
368
|
-
* effect); status read is best-effort and defaults to disabled. A result
|
|
369
|
-
* that lands after unmount is dropped like React's cancelled one.
|
|
370
|
-
*/
|
|
393
|
+
/** Places the section's content in the host's position and drops a late status read. */
|
|
371
394
|
constructor() {
|
|
372
395
|
usePlacement(() => {
|
|
373
396
|
// React's fragment (the section plus two modals) or nothing: the whole
|
|
@@ -379,6 +402,17 @@ export class AuthSection {
|
|
|
379
402
|
inject(DestroyRef).onDestroy(() => {
|
|
380
403
|
read.cancelled = true;
|
|
381
404
|
});
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Reads the persisted 2FA status from `/users/me` on mount (React's mount
|
|
408
|
+
* effect), once the inputs are set; status read is best-effort and defaults
|
|
409
|
+
* to disabled. A result that lands after unmount is dropped like React's
|
|
410
|
+
* cancelled one. Without the two-factor row there is nothing to read.
|
|
411
|
+
*/
|
|
412
|
+
ngOnInit() {
|
|
413
|
+
if (!this.showTwoFactor())
|
|
414
|
+
return;
|
|
415
|
+
const read = this.twoFactorRead;
|
|
382
416
|
void this.http
|
|
383
417
|
.get('/api/users/me')
|
|
384
418
|
.then((res) => {
|
|
@@ -498,8 +532,8 @@ export class AuthSection {
|
|
|
498
532
|
}
|
|
499
533
|
}
|
|
500
534
|
static ɵfac = function AuthSection_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AuthSection)(); };
|
|
501
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AuthSection, selectors: [["mol-auth-section"]], features: [i0.ɵɵHostDirectivesFeature([i1.MolPlacement])], decls: 1, vars: 1, consts: [["mol-button", "", 3, "click", "variant", "size"], ["mol-flex", "", 3, "align", "justify"], [3, "
|
|
502
|
-
i0.ɵɵconditionalCreate(0, AuthSection_Conditional_0_Template,
|
|
535
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AuthSection, selectors: [["mol-auth-section"]], inputs: { twoFactor: "twoFactor" }, features: [i0.ɵɵHostDirectivesFeature([i1.MolPlacement])], decls: 1, vars: 1, consts: [["mol-button", "", 3, "click", "variant", "size"], ["mol-flex", "", 3, "align", "justify"], [3, "close", "open", "title"], ["mol-alert", "", 3, "status", "className"], [3, "submit"], ["for", "current-pw"], ["mol-input", "", "type", "password", "autocomplete", "current-password", 3, "change", "id", "required", "value"], ["for", "new-pw"], ["mol-input", "", "type", "password", "autocomplete", "new-password", 3, "change", "id", "required", "value"], ["mol-button", "", "type", "submit", 3, "fullWidth", "loading"], [3, "open", "title"], [3, "class"], ["mol-button", "", "data-mol-id", "two-factor-disable", 3, "variant", "size"], ["mol-button", "", "data-mol-id", "two-factor-enable", 3, "variant", "size"], ["mol-button", "", "data-mol-id", "two-factor-disable", 3, "click", "variant", "size"], ["mol-button", "", "data-mol-id", "two-factor-enable", 3, "click", "variant", "size"], ["for", "tf-token"], ["mol-input", "", "type", "text", "autocomplete", "one-time-code", 3, "change", "id", "required", "value"], ["mol-button", "", "type", "submit", 3, "color", "fullWidth", "loading"]], template: function AuthSection_Template(rf, ctx) { if (rf & 1) {
|
|
536
|
+
i0.ɵɵconditionalCreate(0, AuthSection_Conditional_0_Template, 22, 35);
|
|
503
537
|
} if (rf & 2) {
|
|
504
538
|
i0.ɵɵconditional(!ctx.isOauthOnly() ? 0 : -1);
|
|
505
539
|
} }, dependencies: [Alert, Button, Flex, Input, Modal], encapsulation: 2 });
|
|
@@ -525,6 +559,7 @@ export class AuthSection {
|
|
|
525
559
|
>
|
|
526
560
|
{{ t('settings.changePassword', undefined, { defaultValue: 'Change password' }) }}
|
|
527
561
|
</button>
|
|
562
|
+
@if (showTwoFactor()) {
|
|
528
563
|
<div mol-flex [align]="'center'" [justify]="'between'">
|
|
529
564
|
<span [class]="cm.textSize('sm')">{{ t('settings.twoFactor', undefined, { defaultValue: 'Two-factor authentication' }) }}@if (twoFactorEnabled()) {<span [class]="cm.cn(cm.textSize('xs'), cm.textSubtle, cm.sp('ml', 2))">{{ t('settings.twoFactorOn', undefined, { defaultValue: 'On' }) }}</span>}</span>
|
|
530
565
|
@if (twoFactorEnabled()) {
|
|
@@ -549,6 +584,7 @@ export class AuthSection {
|
|
|
549
584
|
</button>
|
|
550
585
|
}
|
|
551
586
|
</div>
|
|
587
|
+
}
|
|
552
588
|
</div>
|
|
553
589
|
</section>
|
|
554
590
|
<mol-modal
|
|
@@ -605,6 +641,7 @@ export class AuthSection {
|
|
|
605
641
|
</button>
|
|
606
642
|
</form>
|
|
607
643
|
</mol-modal>
|
|
644
|
+
@if (showTwoFactor()) {
|
|
608
645
|
<mol-modal [open]="tfModal() !== null" (close)="closeTf()" [title]="tfTitle()">
|
|
609
646
|
@if (tfError(); as tfFailure) {
|
|
610
647
|
<div mol-alert [status]="'error'" [className]="cm.sp('mb', 4)">{{ tfFailure }}</div>
|
|
@@ -664,8 +701,10 @@ export class AuthSection {
|
|
|
664
701
|
</button>
|
|
665
702
|
</form>
|
|
666
703
|
}
|
|
667
|
-
</mol-modal>}`,
|
|
704
|
+
</mol-modal>}}`,
|
|
668
705
|
}]
|
|
669
|
-
}], () => [],
|
|
670
|
-
|
|
706
|
+
}], () => [], { twoFactor: [{
|
|
707
|
+
type: InputProperty
|
|
708
|
+
}] }); })();
|
|
709
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AuthSection, { className: "AuthSection", filePath: "auth-section.component.ts", lineNumber: 231 }); })();
|
|
671
710
|
//# sourceMappingURL=auth-section.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-section.component.js","sourceRoot":"","sources":["../src/auth-section.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"auth-section.component.js","sourceRoot":"","sources":["../src/auth-section.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,SAAS,EACT,QAAQ,EACR,UAAU,EACV,UAAU,EACV,MAAM;AACN,gFAAgF;AAChF,KAAK,IAAI,aAAa,EAEtB,MAAM,GACP,MAAM,eAAe,CAAA;AAEtB,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,OAAO,EACP,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,cAAc,GACf,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAEvD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,KAAK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,CAAC;YAChB,2EAA2E;QAC7E,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,GAAG,CAAC,CAAC,CAAA;QACjD,CAAC;IACH,CAAC;qGArPU,WAAW;6DAAX,WAAW;YA7JX,qEAAsB;;YAAtB,6CA2JK;4BA7JN,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK;;iFA+JhC,WAAW;cAnKvB,SAAS;eAAC;gBACT,QAAQ,EAAE,kBAAkB;gBAC5B,UAAU,EAAE,IAAI;gBAChB,cAAc,EAAE,CAAC,YAAY,CAAC;gBAC9B,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC;gBAC5C,kBAAkB;gBAClB,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBA2JO;aAClB;;kBAME,aAAa;;kFALH,WAAW"}
|
|
@@ -11,15 +11,18 @@ import * as i0 from "@angular/core";
|
|
|
11
11
|
* remains a fallback (e.g. for offline rendering or apps that don't expose
|
|
12
12
|
* `/billing/status`).
|
|
13
13
|
*
|
|
14
|
-
* The Upgrade button
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* `TiersUpgradeSection
|
|
14
|
+
* The Upgrade button opens `upgradeTo`, the app's page for choosing a plan
|
|
15
|
+
* (`/pricing`, `/billing`). It has no default: no one route is right for
|
|
16
|
+
* every app, and the settings page this section sits in has no plans to
|
|
17
|
+
* choose. An app with no such page renders `TiersUpgradeSection`, which lists
|
|
18
|
+
* the tiers and starts the checkout itself. A section given no `upgradeTo`
|
|
19
|
+
* anyway (from JavaScript, or a template the compiler does not check) shows the
|
|
20
|
+
* plan without the button.
|
|
18
21
|
*/
|
|
19
22
|
export declare class BillingSection {
|
|
20
23
|
/** Fallback plan name when `/api/billing/status` is unavailable. */
|
|
21
|
-
plan
|
|
22
|
-
/**
|
|
24
|
+
plan?: string;
|
|
25
|
+
/** The app's page for choosing a plan, which the Upgrade button opens. */
|
|
23
26
|
upgradeTo: string;
|
|
24
27
|
/** Reactive translation, read in the injection context. */
|
|
25
28
|
protected readonly i18n: import("@molecule/app-angular").UseTranslationResult;
|
|
@@ -47,6 +50,6 @@ export declare class BillingSection {
|
|
|
47
50
|
/** Navigates to the upgrade route (React's `navigate(upgradeTo)`). */
|
|
48
51
|
protected upgrade(): void;
|
|
49
52
|
static ɵfac: i0.ɵɵFactoryDeclaration<BillingSection, never>;
|
|
50
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BillingSection, "section[mol-settings-billing]", never, { "plan": { "alias": "plan"; "required": false; }; "upgradeTo": { "alias": "upgradeTo"; "required":
|
|
53
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BillingSection, "section[mol-settings-billing]", never, { "plan": { "alias": "plan"; "required": false; }; "upgradeTo": { "alias": "upgradeTo"; "required": true; }; }, {}, never, never, true, never>;
|
|
51
54
|
}
|
|
52
55
|
//# sourceMappingURL=billing-section.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing-section.component.d.ts","sourceRoot":"","sources":["../src/billing-section.component.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;;AAIlD
|
|
1
|
+
{"version":3,"file":"billing-section.component.d.ts","sourceRoot":"","sources":["../src/billing-section.component.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;;AAIlD;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAoBa,cAAc;IACzB,oEAAoE;IACpE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,0EAA0E;IAC1E,SAAS,EAAG,MAAM,CAAA;IAElB,2DAA2D;IAC3D,SAAS,CAAC,QAAQ,CAAC,IAAI,uDAAmB;IAE1C,iDAAiD;IACjD,SAAS,CAAC,CAAC,8IAAc;IAEzB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAkB;IAEvC,kFAAkF;IAClF,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;IAErC,gEAAgE;IAChE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA8B;IAEvD,mEAAmE;IACnE,SAAS,CAAC,QAAQ,CAAC,EAAE,EAAE,UAAU,CAAgB;IAEjD;;;OAGG;IACH,SAAS,CAAC,SAAS,IAAI,MAAM;IAQ7B;;;;;OAKG;;IAoBH,sEAAsE;IACtE,SAAS,CAAC,OAAO,IAAI,IAAI;yCA7Dd,cAAc;2CAAd,cAAc;CAgE1B"}
|