@keycloak/keycloak-account-ui 25.0.0 → 25.0.1

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 (50) hide show
  1. package/README.md +1 -1
  2. package/lib/.vite/manifest.json +234 -0
  3. package/lib/Applications-BZ7tT42a.js +249 -0
  4. package/lib/Applications-BZ7tT42a.js.map +1 -0
  5. package/lib/ContentComponent-zyAEvCly.js +31 -0
  6. package/lib/ContentComponent-zyAEvCly.js.map +1 -0
  7. package/lib/DataListItemCells-HvkrNuyf.js +23 -0
  8. package/lib/DataListItemCells-HvkrNuyf.js.map +1 -0
  9. package/lib/DataListItemRow-BgXGMhq_.js +151 -0
  10. package/lib/DataListItemRow-BgXGMhq_.js.map +1 -0
  11. package/lib/DescriptionListTerm-DATZJS1v.js +122 -0
  12. package/lib/DescriptionListTerm-DATZJS1v.js.map +1 -0
  13. package/lib/DeviceActivity-Csnh-n7-.js +183 -0
  14. package/lib/DeviceActivity-Csnh-n7-.js.map +1 -0
  15. package/lib/EmptyRow-BEKTnWmg.js +33 -0
  16. package/lib/EmptyRow-BEKTnWmg.js.map +1 -0
  17. package/lib/Form-CAogxqA7.js +28 -0
  18. package/lib/Form-CAogxqA7.js.map +1 -0
  19. package/lib/Groups-C7gi8oe4.js +128 -0
  20. package/lib/Groups-C7gi8oe4.js.map +1 -0
  21. package/lib/Label-DQilanR5.js +131 -0
  22. package/lib/Label-DQilanR5.js.map +1 -0
  23. package/lib/LinkedAccounts-BkzIU-tR.js +187 -0
  24. package/lib/LinkedAccounts-BkzIU-tR.js.map +1 -0
  25. package/lib/Oid4Vci-BFWeaH8S.js +133 -0
  26. package/lib/Oid4Vci-BFWeaH8S.js.map +1 -0
  27. package/lib/Page-LpWak9oZ.js +89 -0
  28. package/lib/Page-LpWak9oZ.js.map +1 -0
  29. package/lib/PersonalInfo-CbruQnwv.js +259 -0
  30. package/lib/PersonalInfo-CbruQnwv.js.map +1 -0
  31. package/lib/Resources-CxbWTaNc.js +3863 -0
  32. package/lib/Resources-CxbWTaNc.js.map +1 -0
  33. package/lib/SigningIn-CRvXRXLM.js +195 -0
  34. package/lib/SigningIn-CRvXRXLM.js.map +1 -0
  35. package/lib/SplitItem-CqwZrWVR.js +26 -0
  36. package/lib/SplitItem-CqwZrWVR.js.map +1 -0
  37. package/lib/api-D7GQNM0v.js +103 -0
  38. package/lib/api-D7GQNM0v.js.map +1 -0
  39. package/lib/formatDate-COJAU9LP.js +16 -0
  40. package/lib/formatDate-COJAU9LP.js.map +1 -0
  41. package/lib/keycloak-account-ui.js +4 -17585
  42. package/lib/keycloak-account-ui.js.map +1 -1
  43. package/lib/main-LT0fpout.js +12897 -0
  44. package/lib/main-LT0fpout.js.map +1 -0
  45. package/lib/methods-DjReSJIY.js +115 -0
  46. package/lib/methods-DjReSJIY.js.map +1 -0
  47. package/lib/style.css +1 -1
  48. package/package.json +4 -4
  49. package/lib/constants.d.ts +0 -4
  50. package/lib/utils/getRootPath.d.ts +0 -1
package/README.md CHANGED
@@ -22,7 +22,7 @@ import { KeycloakProvider } from "@keycloak/keycloak-account-ui";
22
22
  //...
23
23
 
24
24
  <KeycloakProvider environment={{
25
- authServerUrl: "http://localhost:8080",
25
+ serverBaseUrl: "http://localhost:8080",
26
26
  realm: "master",
27
27
  clientId: "security-admin-console"
28
28
  }}>
@@ -0,0 +1,234 @@
1
+ {
2
+ "_DataListItemCells-HvkrNuyf.js": {
3
+ "file": "DataListItemCells-HvkrNuyf.js",
4
+ "name": "DataListItemCells",
5
+ "imports": [
6
+ "_main-LT0fpout.js",
7
+ "_DataListItemRow-BgXGMhq_.js"
8
+ ]
9
+ },
10
+ "_DataListItemRow-BgXGMhq_.js": {
11
+ "file": "DataListItemRow-BgXGMhq_.js",
12
+ "name": "DataListItemRow",
13
+ "imports": [
14
+ "_main-LT0fpout.js"
15
+ ]
16
+ },
17
+ "_DescriptionListTerm-DATZJS1v.js": {
18
+ "file": "DescriptionListTerm-DATZJS1v.js",
19
+ "name": "DescriptionListTerm",
20
+ "imports": [
21
+ "_main-LT0fpout.js",
22
+ "_DataListItemRow-BgXGMhq_.js"
23
+ ]
24
+ },
25
+ "_EmptyRow-BEKTnWmg.js": {
26
+ "file": "EmptyRow-BEKTnWmg.js",
27
+ "name": "EmptyRow",
28
+ "imports": [
29
+ "_main-LT0fpout.js",
30
+ "_DataListItemRow-BgXGMhq_.js",
31
+ "_DataListItemCells-HvkrNuyf.js"
32
+ ]
33
+ },
34
+ "_Form-CAogxqA7.js": {
35
+ "file": "Form-CAogxqA7.js",
36
+ "name": "Form",
37
+ "imports": [
38
+ "_main-LT0fpout.js"
39
+ ]
40
+ },
41
+ "_Label-DQilanR5.js": {
42
+ "file": "Label-DQilanR5.js",
43
+ "name": "Label",
44
+ "imports": [
45
+ "_main-LT0fpout.js"
46
+ ]
47
+ },
48
+ "_Page-LpWak9oZ.js": {
49
+ "file": "Page-LpWak9oZ.js",
50
+ "name": "Page",
51
+ "imports": [
52
+ "_main-LT0fpout.js"
53
+ ]
54
+ },
55
+ "_SplitItem-CqwZrWVR.js": {
56
+ "file": "SplitItem-CqwZrWVR.js",
57
+ "name": "SplitItem",
58
+ "imports": [
59
+ "_main-LT0fpout.js"
60
+ ]
61
+ },
62
+ "_api-D7GQNM0v.js": {
63
+ "file": "api-D7GQNM0v.js",
64
+ "name": "api",
65
+ "imports": [
66
+ "_Page-LpWak9oZ.js",
67
+ "_main-LT0fpout.js"
68
+ ]
69
+ },
70
+ "_formatDate-COJAU9LP.js": {
71
+ "file": "formatDate-COJAU9LP.js",
72
+ "name": "formatDate",
73
+ "imports": [
74
+ "_main-LT0fpout.js"
75
+ ]
76
+ },
77
+ "_main-LT0fpout.js": {
78
+ "file": "main-LT0fpout.js",
79
+ "name": "main",
80
+ "dynamicImports": [
81
+ "src/account-security/DeviceActivity.tsx",
82
+ "src/account-security/LinkedAccounts.tsx",
83
+ "src/account-security/SigningIn.tsx",
84
+ "src/applications/Applications.tsx",
85
+ "src/groups/Groups.tsx",
86
+ "src/personal-info/PersonalInfo.tsx",
87
+ "src/resources/Resources.tsx",
88
+ "src/content/ContentComponent.tsx",
89
+ "src/oid4vci/Oid4Vci.tsx"
90
+ ]
91
+ },
92
+ "_methods-DjReSJIY.js": {
93
+ "file": "methods-DjReSJIY.js",
94
+ "name": "methods",
95
+ "imports": [
96
+ "_main-LT0fpout.js",
97
+ "_Page-LpWak9oZ.js"
98
+ ]
99
+ },
100
+ "src/account-security/DeviceActivity.tsx": {
101
+ "file": "DeviceActivity-Csnh-n7-.js",
102
+ "name": "DeviceActivity",
103
+ "src": "src/account-security/DeviceActivity.tsx",
104
+ "isDynamicEntry": true,
105
+ "imports": [
106
+ "_main-LT0fpout.js",
107
+ "_methods-DjReSJIY.js",
108
+ "_Page-LpWak9oZ.js",
109
+ "_formatDate-COJAU9LP.js",
110
+ "_SplitItem-CqwZrWVR.js",
111
+ "_DataListItemRow-BgXGMhq_.js",
112
+ "_DescriptionListTerm-DATZJS1v.js",
113
+ "_Label-DQilanR5.js"
114
+ ]
115
+ },
116
+ "src/account-security/LinkedAccounts.tsx": {
117
+ "file": "LinkedAccounts-BkzIU-tR.js",
118
+ "name": "LinkedAccounts",
119
+ "src": "src/account-security/LinkedAccounts.tsx",
120
+ "isDynamicEntry": true,
121
+ "imports": [
122
+ "_methods-DjReSJIY.js",
123
+ "_EmptyRow-BEKTnWmg.js",
124
+ "_Page-LpWak9oZ.js",
125
+ "_main-LT0fpout.js",
126
+ "_DataListItemRow-BgXGMhq_.js",
127
+ "_DataListItemCells-HvkrNuyf.js",
128
+ "_SplitItem-CqwZrWVR.js",
129
+ "_Label-DQilanR5.js"
130
+ ]
131
+ },
132
+ "src/account-security/SigningIn.tsx": {
133
+ "file": "SigningIn-CRvXRXLM.js",
134
+ "name": "SigningIn",
135
+ "src": "src/account-security/SigningIn.tsx",
136
+ "isDynamicEntry": true,
137
+ "imports": [
138
+ "_main-LT0fpout.js",
139
+ "_methods-DjReSJIY.js",
140
+ "_EmptyRow-BEKTnWmg.js",
141
+ "_Page-LpWak9oZ.js",
142
+ "_formatDate-COJAU9LP.js",
143
+ "_SplitItem-CqwZrWVR.js",
144
+ "_DataListItemRow-BgXGMhq_.js",
145
+ "_DataListItemCells-HvkrNuyf.js"
146
+ ]
147
+ },
148
+ "src/applications/Applications.tsx": {
149
+ "file": "Applications-BZ7tT42a.js",
150
+ "name": "Applications",
151
+ "src": "src/applications/Applications.tsx",
152
+ "isDynamicEntry": true,
153
+ "imports": [
154
+ "_main-LT0fpout.js",
155
+ "_methods-DjReSJIY.js",
156
+ "_Page-LpWak9oZ.js",
157
+ "_formatDate-COJAU9LP.js",
158
+ "_DataListItemRow-BgXGMhq_.js",
159
+ "_DataListItemCells-HvkrNuyf.js",
160
+ "_DescriptionListTerm-DATZJS1v.js"
161
+ ]
162
+ },
163
+ "src/content/ContentComponent.tsx": {
164
+ "file": "ContentComponent-zyAEvCly.js",
165
+ "name": "ContentComponent",
166
+ "src": "src/content/ContentComponent.tsx",
167
+ "isDynamicEntry": true,
168
+ "imports": [
169
+ "_main-LT0fpout.js"
170
+ ]
171
+ },
172
+ "src/groups/Groups.tsx": {
173
+ "file": "Groups-C7gi8oe4.js",
174
+ "name": "Groups",
175
+ "src": "src/groups/Groups.tsx",
176
+ "isDynamicEntry": true,
177
+ "imports": [
178
+ "_main-LT0fpout.js",
179
+ "_methods-DjReSJIY.js",
180
+ "_Page-LpWak9oZ.js",
181
+ "_DataListItemRow-BgXGMhq_.js",
182
+ "_DataListItemCells-HvkrNuyf.js"
183
+ ]
184
+ },
185
+ "src/main.tsx": {
186
+ "file": "keycloak-account-ui.js",
187
+ "name": "main",
188
+ "src": "src/main.tsx",
189
+ "isEntry": true,
190
+ "imports": [
191
+ "_main-LT0fpout.js"
192
+ ]
193
+ },
194
+ "src/oid4vci/Oid4Vci.tsx": {
195
+ "file": "Oid4Vci-BFWeaH8S.js",
196
+ "name": "Oid4Vci",
197
+ "src": "src/oid4vci/Oid4Vci.tsx",
198
+ "isDynamicEntry": true,
199
+ "imports": [
200
+ "_main-LT0fpout.js",
201
+ "_api-D7GQNM0v.js",
202
+ "_Page-LpWak9oZ.js"
203
+ ]
204
+ },
205
+ "src/personal-info/PersonalInfo.tsx": {
206
+ "file": "PersonalInfo-CbruQnwv.js",
207
+ "name": "PersonalInfo",
208
+ "src": "src/personal-info/PersonalInfo.tsx",
209
+ "isDynamicEntry": true,
210
+ "imports": [
211
+ "_main-LT0fpout.js",
212
+ "_methods-DjReSJIY.js",
213
+ "_Page-LpWak9oZ.js",
214
+ "_Form-CAogxqA7.js"
215
+ ]
216
+ },
217
+ "src/resources/Resources.tsx": {
218
+ "file": "Resources-CxbWTaNc.js",
219
+ "name": "Resources",
220
+ "src": "src/resources/Resources.tsx",
221
+ "isDynamicEntry": true,
222
+ "imports": [
223
+ "_main-LT0fpout.js",
224
+ "_api-D7GQNM0v.js",
225
+ "_methods-DjReSJIY.js",
226
+ "_Form-CAogxqA7.js",
227
+ "_Page-LpWak9oZ.js"
228
+ ]
229
+ },
230
+ "style.css": {
231
+ "file": "style.css",
232
+ "src": "style.css"
233
+ }
234
+ }
@@ -0,0 +1,249 @@
1
+ import { jsx as t, jsxs as n, Fragment as E } from "react/jsx-runtime";
2
+ import * as m from "react";
3
+ import { useState as b } from "react";
4
+ import { useTranslation as T } from "react-i18next";
5
+ import { _ as $, b as I, B as U, i as M, A as P, c as O, l as S, r as k, u as G, S as j, j as R, C as Z, G as B, a as D, s as V } from "./main-LT0fpout.js";
6
+ import { c as _, e as q } from "./methods-DjReSJIY.js";
7
+ import { P as F } from "./Page-LpWak9oZ.js";
8
+ import { f as H } from "./formatDate-COJAU9LP.js";
9
+ import { s as p, D as K, a as y, b as A } from "./DataListItemRow-BgXGMhq_.js";
10
+ import { D as N, a as d } from "./DataListItemCells-HvkrNuyf.js";
11
+ import { D as z, a as J, b as r, c as l, d as a } from "./DescriptionListTerm-DATZJS1v.js";
12
+ const v = (s) => {
13
+ var { className: h = "", isExpanded: g = !1, "aria-controls": f = "", "aria-label": c = "Details", rowid: C = "", id: o, buttonProps: L } = s, u = $(s, ["className", "isExpanded", "aria-controls", "aria-label", "rowid", "id", "buttonProps"]);
14
+ return m.createElement(
15
+ "div",
16
+ Object.assign({ className: I(p.dataListItemControl, h) }, u),
17
+ m.createElement(
18
+ "div",
19
+ { className: I(p.dataListToggle) },
20
+ m.createElement(
21
+ U,
22
+ Object.assign({ id: o, variant: M.plain, "aria-controls": f !== "" && f, "aria-label": c, "aria-labelledby": c !== "Details" ? null : `${C} ${o}`, "aria-expanded": g }, L),
23
+ m.createElement(
24
+ "div",
25
+ { className: I(p.dataListToggleIcon) },
26
+ m.createElement(P, null)
27
+ )
28
+ )
29
+ )
30
+ );
31
+ };
32
+ v.displayName = "DataListToggle";
33
+ const Q = {
34
+ name: "InfoAltIcon",
35
+ height: 1024,
36
+ width: 1024,
37
+ svgPath: "M592,369 L592,289 C592.013862,284.755109 590.320137,280.682962 587.3,277.7 C584.338831,274.647672 580.252355,272.947987 576,273 L464,273 C459.755109,272.986138 455.682962,274.679863 452.7,277.7 C449.647672,280.661169 447.947987,284.747645 447.99884,289 L447.99884,369 C447.986138,373.244891 449.679863,377.317038 452.7,380.3 C455.661169,383.352328 459.747645,385.052013 464,385 L576,385 C580.244891,385.013862 584.317038,383.320137 587.3,380.3 C590.359349,377.343612 592.060354,373.253963 592,369 Z M592,705 L592,465 C592,456.163444 584.836556,449 576,449 L432,449 C423.163444,449 416,456.163444 416,465 L416,497 C416,505.836556 423.163444,513 432,513 L448,513 L448,705 L416,705 C407.163444,705 400,712.163444 400,721 L400,753 C400,761.836556 407.163444,769 416,769 L624,769 C632.836556,769 640,761.836556 640,753 L640,721 C640,712.163444 632.836556,705 624,705 L592,705 Z M512,896 C300.2,896 128,723.9 128,512 C128,300.3 300.2,128 512,128 C723.8,128 896,300.2 896,512 C896,723.8 723.7,896 512,896 Z M512.1,0 C229.7,0 0,229.8 0,512 C0,794.2 229.8,1024 512.1,1024 C794.4,1024 1024,794.3 1024,512 C1024,229.7 794.4,0 512.1,0 Z",
38
+ yOffset: 0,
39
+ xOffset: 0
40
+ }, W = O(Q), ce = () => {
41
+ const { t: s } = T(), h = S(), { addAlert: g, addError: f } = k(), [c, C] = b(), [o, L] = b(1), u = () => L(o + 1);
42
+ G(
43
+ (e) => _({ signal: e, context: h }),
44
+ (e) => C(e.map((i) => ({ ...i, open: !1 }))),
45
+ [o]
46
+ );
47
+ const w = (e) => {
48
+ C([
49
+ ...c.map(
50
+ (i) => i.clientId === e ? { ...i, open: !i.open } : i
51
+ )
52
+ ]);
53
+ }, x = async (e) => {
54
+ try {
55
+ await q(h, e), u(), g(s("removeConsentSuccess"));
56
+ } catch (i) {
57
+ f(s("removeConsentError", { error: i }).toString());
58
+ }
59
+ };
60
+ return c ? /* @__PURE__ */ t(F, { title: s("application"), description: s("applicationsIntroMessage"), children: /* @__PURE__ */ n(K, { id: "applications-list", "aria-label": s("application"), children: [
61
+ /* @__PURE__ */ t(
62
+ y,
63
+ {
64
+ id: "applications-list-header",
65
+ "aria-labelledby": "Columns names",
66
+ children: /* @__PURE__ */ n(A, { children: [
67
+ /* @__PURE__ */ t("span", { style: { visibility: "hidden", height: 55 }, children: /* @__PURE__ */ t(
68
+ v,
69
+ {
70
+ id: "applications-list-header-invisible-toggle",
71
+ "aria-controls": "applications-list-content"
72
+ }
73
+ ) }),
74
+ /* @__PURE__ */ t(
75
+ N,
76
+ {
77
+ dataListCells: [
78
+ /* @__PURE__ */ t(
79
+ d,
80
+ {
81
+ width: 2,
82
+ className: "pf-v5-u-pt-md",
83
+ children: /* @__PURE__ */ t("strong", { children: s("name") })
84
+ },
85
+ "applications-list-client-id-header"
86
+ ),
87
+ /* @__PURE__ */ t(
88
+ d,
89
+ {
90
+ width: 2,
91
+ className: "pf-v5-u-pt-md",
92
+ children: /* @__PURE__ */ t("strong", { children: s("applicationType") })
93
+ },
94
+ "applications-list-app-type-header"
95
+ ),
96
+ /* @__PURE__ */ t(
97
+ d,
98
+ {
99
+ width: 2,
100
+ className: "pf-v5-u-pt-md",
101
+ children: /* @__PURE__ */ t("strong", { children: s("status") })
102
+ },
103
+ "applications-list-status"
104
+ )
105
+ ]
106
+ }
107
+ )
108
+ ] })
109
+ }
110
+ ),
111
+ c.map((e) => /* @__PURE__ */ n(
112
+ y,
113
+ {
114
+ "aria-labelledby": "applications-list",
115
+ "data-testid": "applications-list-item",
116
+ isExpanded: e.open,
117
+ children: [
118
+ /* @__PURE__ */ n(A, { className: "pf-v5-u-align-items-center", children: [
119
+ /* @__PURE__ */ t(
120
+ v,
121
+ {
122
+ onClick: () => w(e.clientId),
123
+ isExpanded: e.open,
124
+ id: `toggle-${e.clientId}`,
125
+ "aria-controls": `content-${e.clientId}`
126
+ }
127
+ ),
128
+ /* @__PURE__ */ t(
129
+ N,
130
+ {
131
+ className: "pf-v5-u-align-items-center",
132
+ dataListCells: [
133
+ /* @__PURE__ */ n(d, { width: 2, children: [
134
+ e.effectiveUrl && /* @__PURE__ */ n(
135
+ U,
136
+ {
137
+ className: "pf-v5-u-pl-0 title-case",
138
+ component: "a",
139
+ variant: "link",
140
+ onClick: () => window.open(e.effectiveUrl),
141
+ children: [
142
+ e.clientName || e.clientId,
143
+ " ",
144
+ /* @__PURE__ */ t(R, {})
145
+ ]
146
+ }
147
+ ),
148
+ !e.effectiveUrl && /* @__PURE__ */ t("span", { children: e.clientName || e.clientId })
149
+ ] }, `client${e.clientId}`),
150
+ /* @__PURE__ */ n(
151
+ d,
152
+ {
153
+ width: 2,
154
+ children: [
155
+ e.userConsentRequired ? s("thirdPartyApp") : s("internalApp"),
156
+ e.offlineAccess ? ", " + s("offlineAccess") : ""
157
+ ]
158
+ },
159
+ `internal${e.clientId}`
160
+ ),
161
+ /* @__PURE__ */ t(d, { width: 2, children: e.inUse ? s("inUse") : s("notInUse") }, `status${e.clientId}`)
162
+ ]
163
+ }
164
+ )
165
+ ] }),
166
+ /* @__PURE__ */ n(
167
+ z,
168
+ {
169
+ id: `content-${e.clientId}`,
170
+ className: "pf-v5-u-pl-4xl",
171
+ "aria-label": s("applicationDetails", {
172
+ clientId: e.clientId
173
+ }),
174
+ isHidden: !e.open,
175
+ children: [
176
+ /* @__PURE__ */ n(J, { children: [
177
+ /* @__PURE__ */ n(r, { children: [
178
+ /* @__PURE__ */ t(l, { children: s("client") }),
179
+ /* @__PURE__ */ t(a, { children: e.clientId })
180
+ ] }),
181
+ e.description && /* @__PURE__ */ n(r, { children: [
182
+ /* @__PURE__ */ t(l, { children: s("description") }),
183
+ /* @__PURE__ */ t(a, { children: e.description })
184
+ ] }),
185
+ e.effectiveUrl && /* @__PURE__ */ n(r, { children: [
186
+ /* @__PURE__ */ t(l, { children: "URL" }),
187
+ /* @__PURE__ */ t(a, { children: e.effectiveUrl.split('"') })
188
+ ] }),
189
+ e.consent && /* @__PURE__ */ n(E, { children: [
190
+ /* @__PURE__ */ n(r, { children: [
191
+ /* @__PURE__ */ t(l, { children: s("hasAccessTo") }),
192
+ e.consent.grantedScopes.map((i) => /* @__PURE__ */ n(a, { children: [
193
+ /* @__PURE__ */ t(Z, {}),
194
+ " ",
195
+ s(i.name)
196
+ ] }, `scope${i.id}`))
197
+ ] }),
198
+ e.tosUri && /* @__PURE__ */ n(r, { children: [
199
+ /* @__PURE__ */ t(l, { children: s("termsOfService") }),
200
+ /* @__PURE__ */ t(a, { children: e.tosUri })
201
+ ] }),
202
+ e.policyUri && /* @__PURE__ */ n(r, { children: [
203
+ /* @__PURE__ */ t(l, { children: s("privacyPolicy") }),
204
+ /* @__PURE__ */ t(a, { children: e.policyUri })
205
+ ] }),
206
+ e.logoUri && /* @__PURE__ */ n(r, { children: [
207
+ /* @__PURE__ */ t(l, { children: s("logo") }),
208
+ /* @__PURE__ */ t(a, { children: /* @__PURE__ */ t("img", { src: e.logoUri }) })
209
+ ] }),
210
+ /* @__PURE__ */ n(r, { children: [
211
+ /* @__PURE__ */ t(l, { children: s("accessGrantedOn") }),
212
+ /* @__PURE__ */ t(a, { children: H(new Date(e.consent.createdDate)) })
213
+ ] })
214
+ ] })
215
+ ] }),
216
+ (e.consent || e.offlineAccess) && /* @__PURE__ */ n(B, { hasGutter: !0, children: [
217
+ /* @__PURE__ */ t("hr", {}),
218
+ /* @__PURE__ */ t(D, { children: /* @__PURE__ */ t(
219
+ V,
220
+ {
221
+ buttonTitle: s("removeAccess"),
222
+ modalTitle: s("removeAccess"),
223
+ continueLabel: s("confirm"),
224
+ cancelLabel: s("cancel"),
225
+ buttonVariant: "secondary",
226
+ onContinue: () => x(e.clientId),
227
+ children: s("removeModalMessage", { name: e.clientId })
228
+ }
229
+ ) }),
230
+ /* @__PURE__ */ n(D, { children: [
231
+ /* @__PURE__ */ t(W, {}),
232
+ " ",
233
+ s("infoMessage")
234
+ ] })
235
+ ] })
236
+ ]
237
+ }
238
+ )
239
+ ]
240
+ },
241
+ e.clientId
242
+ ))
243
+ ] }) }) : /* @__PURE__ */ t(j, {});
244
+ };
245
+ export {
246
+ ce as Applications,
247
+ ce as default
248
+ };
249
+ //# sourceMappingURL=Applications-BZ7tT42a.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Applications-BZ7tT42a.js","sources":["../../../../node_modules/.pnpm/@patternfly+react-core@5.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@patternfly/react-core/dist/esm/components/DataList/DataListToggle.js","../../../../node_modules/.pnpm/@patternfly+react-icons@5.3.2_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@patternfly/react-icons/dist/esm/icons/info-alt-icon.js","../src/applications/Applications.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport * as React from 'react';\nimport { css } from '@patternfly/react-styles';\nimport AngleRightIcon from '@patternfly/react-icons/dist/esm/icons/angle-right-icon';\nimport styles from '@patternfly/react-styles/css/components/DataList/data-list.mjs';\nimport { Button, ButtonVariant } from '../Button';\nexport const DataListToggle = (_a) => {\n var { className = '', isExpanded = false, 'aria-controls': ariaControls = '', 'aria-label': ariaLabel = 'Details', rowid = '', id, buttonProps } = _a, props = __rest(_a, [\"className\", \"isExpanded\", 'aria-controls', 'aria-label', \"rowid\", \"id\", \"buttonProps\"]);\n return (React.createElement(\"div\", Object.assign({ className: css(styles.dataListItemControl, className) }, props),\n React.createElement(\"div\", { className: css(styles.dataListToggle) },\n React.createElement(Button, Object.assign({ id: id, variant: ButtonVariant.plain, \"aria-controls\": ariaControls !== '' && ariaControls, \"aria-label\": ariaLabel, \"aria-labelledby\": ariaLabel !== 'Details' ? null : `${rowid} ${id}`, \"aria-expanded\": isExpanded }, buttonProps),\n React.createElement(\"div\", { className: css(styles.dataListToggleIcon) },\n React.createElement(AngleRightIcon, null))))));\n};\nDataListToggle.displayName = 'DataListToggle';\n//# sourceMappingURL=DataListToggle.js.map","import { createIcon } from '../createIcon';\n\nexport const InfoAltIconConfig = {\n name: 'InfoAltIcon',\n height: 1024,\n width: 1024,\n svgPath: 'M592,369 L592,289 C592.013862,284.755109 590.320137,280.682962 587.3,277.7 C584.338831,274.647672 580.252355,272.947987 576,273 L464,273 C459.755109,272.986138 455.682962,274.679863 452.7,277.7 C449.647672,280.661169 447.947987,284.747645 447.99884,289 L447.99884,369 C447.986138,373.244891 449.679863,377.317038 452.7,380.3 C455.661169,383.352328 459.747645,385.052013 464,385 L576,385 C580.244891,385.013862 584.317038,383.320137 587.3,380.3 C590.359349,377.343612 592.060354,373.253963 592,369 Z M592,705 L592,465 C592,456.163444 584.836556,449 576,449 L432,449 C423.163444,449 416,456.163444 416,465 L416,497 C416,505.836556 423.163444,513 432,513 L448,513 L448,705 L416,705 C407.163444,705 400,712.163444 400,721 L400,753 C400,761.836556 407.163444,769 416,769 L624,769 C632.836556,769 640,761.836556 640,753 L640,721 C640,712.163444 632.836556,705 624,705 L592,705 Z M512,896 C300.2,896 128,723.9 128,512 C128,300.3 300.2,128 512,128 C723.8,128 896,300.2 896,512 C896,723.8 723.7,896 512,896 Z M512.1,0 C229.7,0 0,229.8 0,512 C0,794.2 229.8,1024 512.1,1024 C794.4,1024 1024,794.3 1024,512 C1024,229.7 794.4,0 512.1,0 Z',\n yOffset: 0,\n xOffset: 0,\n};\n\nexport const InfoAltIcon = createIcon(InfoAltIconConfig);\n\nexport default InfoAltIcon;","import {\n Button,\n DataList,\n DataListCell,\n DataListContent,\n DataListItem,\n DataListItemCells,\n DataListItemRow,\n DataListToggle,\n DescriptionList,\n DescriptionListDescription,\n DescriptionListGroup,\n DescriptionListTerm,\n Grid,\n GridItem,\n Spinner,\n} from \"@patternfly/react-core\";\nimport {\n CheckIcon,\n ExternalLinkAltIcon,\n InfoAltIcon,\n} from \"@patternfly/react-icons\";\nimport { useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport {\n ContinueCancelModal,\n useAlerts,\n useEnvironment,\n} from \"@keycloak/keycloak-ui-shared\";\nimport { deleteConsent, getApplications } from \"../api/methods\";\nimport { ClientRepresentation } from \"../api/representations\";\nimport { Page } from \"../components/page/Page\";\nimport { TFuncKey } from \"../i18n\";\nimport { formatDate } from \"../utils/formatDate\";\nimport { usePromise } from \"../utils/usePromise\";\n\ntype Application = ClientRepresentation & {\n open: boolean;\n};\n\nexport const Applications = () => {\n const { t } = useTranslation();\n const context = useEnvironment();\n const { addAlert, addError } = useAlerts();\n\n const [applications, setApplications] = useState<Application[]>();\n const [key, setKey] = useState(1);\n const refresh = () => setKey(key + 1);\n\n usePromise(\n (signal) => getApplications({ signal, context }),\n (clients) => setApplications(clients.map((c) => ({ ...c, open: false }))),\n [key],\n );\n\n const toggleOpen = (clientId: string) => {\n setApplications([\n ...applications!.map((a) =>\n a.clientId === clientId ? { ...a, open: !a.open } : a,\n ),\n ]);\n };\n\n const removeConsent = async (id: string) => {\n try {\n await deleteConsent(context, id);\n refresh();\n addAlert(t(\"removeConsentSuccess\"));\n } catch (error) {\n addError(t(\"removeConsentError\", { error }).toString());\n }\n };\n\n if (!applications) {\n return <Spinner />;\n }\n\n return (\n <Page title={t(\"application\")} description={t(\"applicationsIntroMessage\")}>\n <DataList id=\"applications-list\" aria-label={t(\"application\")}>\n <DataListItem\n id=\"applications-list-header\"\n aria-labelledby=\"Columns names\"\n >\n <DataListItemRow>\n <span style={{ visibility: \"hidden\", height: 55 }}>\n <DataListToggle\n id=\"applications-list-header-invisible-toggle\"\n aria-controls=\"applications-list-content\"\n />\n </span>\n <DataListItemCells\n dataListCells={[\n <DataListCell\n key=\"applications-list-client-id-header\"\n width={2}\n className=\"pf-v5-u-pt-md\"\n >\n <strong>{t(\"name\")}</strong>\n </DataListCell>,\n <DataListCell\n key=\"applications-list-app-type-header\"\n width={2}\n className=\"pf-v5-u-pt-md\"\n >\n <strong>{t(\"applicationType\")}</strong>\n </DataListCell>,\n <DataListCell\n key=\"applications-list-status\"\n width={2}\n className=\"pf-v5-u-pt-md\"\n >\n <strong>{t(\"status\")}</strong>\n </DataListCell>,\n ]}\n />\n </DataListItemRow>\n </DataListItem>\n {applications.map((application) => (\n <DataListItem\n key={application.clientId}\n aria-labelledby=\"applications-list\"\n data-testid=\"applications-list-item\"\n isExpanded={application.open}\n >\n <DataListItemRow className=\"pf-v5-u-align-items-center\">\n <DataListToggle\n onClick={() => toggleOpen(application.clientId)}\n isExpanded={application.open}\n id={`toggle-${application.clientId}`}\n aria-controls={`content-${application.clientId}`}\n />\n <DataListItemCells\n className=\"pf-v5-u-align-items-center\"\n dataListCells={[\n <DataListCell width={2} key={`client${application.clientId}`}>\n {application.effectiveUrl && (\n <Button\n className=\"pf-v5-u-pl-0 title-case\"\n component=\"a\"\n variant=\"link\"\n onClick={() => window.open(application.effectiveUrl)}\n >\n {application.clientName || application.clientId}{\" \"}\n <ExternalLinkAltIcon />\n </Button>\n )}\n {!application.effectiveUrl && (\n <span>\n {application.clientName || application.clientId}\n </span>\n )}\n </DataListCell>,\n <DataListCell\n width={2}\n key={`internal${application.clientId}`}\n >\n {application.userConsentRequired\n ? t(\"thirdPartyApp\")\n : t(\"internalApp\")}\n {application.offlineAccess ? \", \" + t(\"offlineAccess\") : \"\"}\n </DataListCell>,\n <DataListCell width={2} key={`status${application.clientId}`}>\n {application.inUse ? t(\"inUse\") : t(\"notInUse\")}\n </DataListCell>,\n ]}\n />\n </DataListItemRow>\n\n <DataListContent\n id={`content-${application.clientId}`}\n className=\"pf-v5-u-pl-4xl\"\n aria-label={t(\"applicationDetails\", {\n clientId: application.clientId,\n })}\n isHidden={!application.open}\n >\n <DescriptionList>\n <DescriptionListGroup>\n <DescriptionListTerm>{t(\"client\")}</DescriptionListTerm>\n <DescriptionListDescription>\n {application.clientId}\n </DescriptionListDescription>\n </DescriptionListGroup>\n {application.description && (\n <DescriptionListGroup>\n <DescriptionListTerm>\n {t(\"description\")}\n </DescriptionListTerm>\n <DescriptionListDescription>\n {application.description}\n </DescriptionListDescription>\n </DescriptionListGroup>\n )}\n {application.effectiveUrl && (\n <DescriptionListGroup>\n <DescriptionListTerm>URL</DescriptionListTerm>\n <DescriptionListDescription>\n {application.effectiveUrl.split('\"')}\n </DescriptionListDescription>\n </DescriptionListGroup>\n )}\n {application.consent && (\n <>\n <DescriptionListGroup>\n <DescriptionListTerm>\n {t(\"hasAccessTo\")}\n </DescriptionListTerm>\n {application.consent.grantedScopes.map((scope) => (\n <DescriptionListDescription key={`scope${scope.id}`}>\n <CheckIcon /> {t(scope.name as TFuncKey)}\n </DescriptionListDescription>\n ))}\n </DescriptionListGroup>\n {application.tosUri && (\n <DescriptionListGroup>\n <DescriptionListTerm>\n {t(\"termsOfService\")}\n </DescriptionListTerm>\n <DescriptionListDescription>\n {application.tosUri}\n </DescriptionListDescription>\n </DescriptionListGroup>\n )}\n {application.policyUri && (\n <DescriptionListGroup>\n <DescriptionListTerm>\n {t(\"privacyPolicy\")}\n </DescriptionListTerm>\n <DescriptionListDescription>\n {application.policyUri}\n </DescriptionListDescription>\n </DescriptionListGroup>\n )}\n {application.logoUri && (\n <DescriptionListGroup>\n <DescriptionListTerm>{t(\"logo\")}</DescriptionListTerm>\n <DescriptionListDescription>\n <img src={application.logoUri} />\n </DescriptionListDescription>\n </DescriptionListGroup>\n )}\n <DescriptionListGroup>\n <DescriptionListTerm>\n {t(\"accessGrantedOn\")}\n </DescriptionListTerm>\n <DescriptionListDescription>\n {formatDate(new Date(application.consent.createdDate))}\n </DescriptionListDescription>\n </DescriptionListGroup>\n </>\n )}\n </DescriptionList>\n {(application.consent || application.offlineAccess) && (\n <Grid hasGutter>\n <hr />\n <GridItem>\n <ContinueCancelModal\n buttonTitle={t(\"removeAccess\")}\n modalTitle={t(\"removeAccess\")}\n continueLabel={t(\"confirm\")}\n cancelLabel={t(\"cancel\")}\n buttonVariant=\"secondary\"\n onContinue={() => removeConsent(application.clientId)}\n >\n {t(\"removeModalMessage\", { name: application.clientId })}\n </ContinueCancelModal>\n </GridItem>\n <GridItem>\n <InfoAltIcon /> {t(\"infoMessage\")}\n </GridItem>\n </Grid>\n )}\n </DataListContent>\n </DataListItem>\n ))}\n </DataList>\n </Page>\n );\n};\n\nexport default Applications;\n"],"names":["DataListToggle","_a","className","isExpanded","ariaControls","ariaLabel","rowid","id","buttonProps","props","__rest","React","css","styles","Button","ButtonVariant","AngleRightIcon","InfoAltIconConfig","InfoAltIcon","createIcon","Applications","t","useTranslation","context","useEnvironment","addAlert","addError","useAlerts","applications","setApplications","useState","key","setKey","refresh","usePromise","signal","getApplications","clients","c","toggleOpen","clientId","a","removeConsent","deleteConsent","error","Page","DataList","jsx","DataListItem","DataListItemRow","DataListItemCells","DataListCell","application","jsxs","ExternalLinkAltIcon","DataListContent","DescriptionList","DescriptionListGroup","DescriptionListTerm","DescriptionListDescription","Fragment","scope","CheckIcon","formatDate","Grid","GridItem","ContinueCancelModal","Spinner"],"mappings":";;;;;;;;;;;AAMO,MAAMA,IAAiB,CAACC,MAAO;AAClC,MAAI,EAAE,WAAAC,IAAY,IAAI,YAAAC,IAAa,IAAO,iBAAiBC,IAAe,IAAI,cAAcC,IAAY,WAAW,OAAAC,IAAQ,IAAI,IAAAC,GAAI,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A,IAAA,CA2JpB;AAAA,EAAA,EACH,CAAA,EACF,CAAA,sBA3MQe,GAAQ,CAAA,CAAA;AA6MpB;","x_google_ignoreList":[0,1]}
@@ -0,0 +1,31 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { useState as c, useMemo as u, lazy as l, Suspense as f } from "react";
3
+ import { useParams as p } from "react-router-dom";
4
+ import { l as i, u as h, aF as d, S as C, aG as P } from "./main-LT0fpout.js";
5
+ function a(o, n) {
6
+ for (const t of o) {
7
+ if ("path" in t && t.path.endsWith(n) && "modulePath" in t)
8
+ return t.modulePath;
9
+ if ("children" in t)
10
+ return a(t.children, n);
11
+ }
12
+ }
13
+ const k = () => {
14
+ const o = i(), [n, t] = c(), { componentId: r } = p();
15
+ h((m) => P({ signal: m, context: o }), t);
16
+ const s = u(
17
+ () => a(n || [], r),
18
+ [n, r]
19
+ );
20
+ return s && /* @__PURE__ */ e(S, { modulePath: s });
21
+ }, S = ({ modulePath: o }) => {
22
+ const { environment: n } = i(), t = l(
23
+ () => import(d(n.resourceUrl, o))
24
+ );
25
+ return /* @__PURE__ */ e(f, { fallback: /* @__PURE__ */ e(C, {}), children: /* @__PURE__ */ e(t, {}) });
26
+ };
27
+ export {
28
+ k as ContentComponent,
29
+ k as default
30
+ };
31
+ //# sourceMappingURL=ContentComponent-zyAEvCly.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContentComponent-zyAEvCly.js","sources":["../src/content/ContentComponent.tsx"],"sourcesContent":["import { Spinner } from \"@patternfly/react-core\";\nimport { Suspense, lazy, useMemo, useState } from \"react\";\nimport { useParams } from \"react-router-dom\";\nimport { useEnvironment } from \"@keycloak/keycloak-ui-shared\";\nimport { MenuItem } from \"../root/PageNav\";\nimport { ContentComponentParams } from \"../routes\";\nimport { joinPath } from \"../utils/joinPath\";\nimport { usePromise } from \"../utils/usePromise\";\nimport fetchContentJson from \"./fetchContent\";\n\nfunction findComponent(\n content: MenuItem[],\n componentId: string,\n): string | undefined {\n for (const item of content) {\n if (\n \"path\" in item &&\n item.path.endsWith(componentId) &&\n \"modulePath\" in item\n ) {\n return item.modulePath;\n }\n if (\"children\" in item) {\n return findComponent(item.children, componentId);\n }\n }\n return undefined;\n}\n\nexport const ContentComponent = () => {\n const context = useEnvironment();\n\n const [content, setContent] = useState<MenuItem[]>();\n const { componentId } = useParams<ContentComponentParams>();\n\n usePromise((signal) => fetchContentJson({ signal, context }), setContent);\n const modulePath = useMemo(\n () => findComponent(content || [], componentId!),\n [content, componentId],\n );\n\n return modulePath && <Component modulePath={modulePath} />;\n};\n\ntype ComponentProps = {\n modulePath: string;\n};\n\nconst Component = ({ modulePath }: ComponentProps) => {\n const { environment } = useEnvironment();\n\n const Element = lazy(\n () => import(joinPath(environment.resourceUrl, modulePath)),\n );\n return (\n <Suspense fallback={<Spinner />}>\n <Element />\n </Suspense>\n );\n};\n\nexport default ContentComponent;\n"],"names":["findComponent","content","componentId","item","ContentComponent","context","useEnvironment","setContent","useState","useParams","usePromise","signal","fetchContentJson","modulePath","useMemo","jsx","Component","environment","Element","lazy","joinPath","Suspense","Spinner"],"mappings":";;;;AAUA,SAASA,EACPC,GACAC,GACoB;AACpB,aAAWC,KAAQF,GAAS;AAExB,QAAA,UAAUE,KACVA,EAAK,KAAK,SAASD,CAAW,KAC9B,gBAAgBC;AAEhB,aAAOA,EAAK;AAEd,QAAI,cAAcA;AACT,aAAAH,EAAcG,EAAK,UAAUD,CAAW;AAAA,EAEnD;AAEF;AAEO,MAAME,IAAmB,MAAM;AACpC,QAAMC,IAAUC,KAEV,CAACL,GAASM,CAAU,IAAIC,EAAqB,GAC7C,EAAE,aAAAN,MAAgBO;AAEb,EAAAC,EAAA,CAACC,MAAWC,EAAiB,EAAE,QAAAD,GAAQ,SAAAN,EAAS,CAAA,GAAGE,CAAU;AACxE,QAAMM,IAAaC;AAAA,IACjB,MAAMd,EAAcC,KAAW,IAAIC,CAAY;AAAA,IAC/C,CAACD,GAASC,CAAW;AAAA,EAAA;AAGhB,SAAAW,KAAe,gBAAAE,EAAAC,GAAA,EAAU,YAAAH,EAAwB,CAAA;AAC1D,GAMMG,IAAY,CAAC,EAAE,YAAAH,QAAiC;AAC9C,QAAA,EAAE,aAAAI,MAAgBX,KAElBY,IAAUC;AAAA,IACd,MAAM,OAAOC,EAASH,EAAY,aAAaJ,CAAU;AAAA,EAAA;AAGzD,SAAA,gBAAAE,EAACM,KAAS,UAAU,gBAAAN,EAACO,KAAQ,GAC3B,UAAA,gBAAAP,EAACG,IAAQ,CAAA,EACX,CAAA;AAEJ;"}
@@ -0,0 +1,23 @@
1
+ import { _ as o, b as m } from "./main-LT0fpout.js";
2
+ import * as d from "react";
3
+ import { s } from "./DataListItemRow-BgXGMhq_.js";
4
+ const p = (a) => {
5
+ var { children: i = null, className: e = "", width: t = 1, isFilled: l = !0, alignRight: n = !1, isIcon: c = !1, wrapModifier: r = null } = a, f = o(a, ["children", "className", "width", "isFilled", "alignRight", "isIcon", "wrapModifier"]);
6
+ return d.createElement("div", Object.assign({ className: m(s.dataListCell, t > 1 && s.modifiers[`flex_${t}`], !l && s.modifiers.noFill, n && s.modifiers.alignRight, c && s.modifiers.icon, e, r && s.modifiers[r]) }, f), i);
7
+ };
8
+ p.displayName = "DataListCell";
9
+ const g = (a) => {
10
+ var {
11
+ className: i = "",
12
+ dataListCells: e,
13
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
14
+ rowid: t = ""
15
+ } = a, l = o(a, ["className", "dataListCells", "rowid"]);
16
+ return d.createElement("div", Object.assign({ className: m(s.dataListItemContent, i) }, l), e);
17
+ };
18
+ g.displayName = "DataListItemCells";
19
+ export {
20
+ g as D,
21
+ p as a
22
+ };
23
+ //# sourceMappingURL=DataListItemCells-HvkrNuyf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataListItemCells-HvkrNuyf.js","sources":["../../../../node_modules/.pnpm/@patternfly+react-core@5.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@patternfly/react-core/dist/esm/components/DataList/DataListCell.js","../../../../node_modules/.pnpm/@patternfly+react-core@5.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@patternfly/react-core/dist/esm/components/DataList/DataListItemCells.js"],"sourcesContent":["import { __rest } from \"tslib\";\nimport * as React from 'react';\nimport { css } from '@patternfly/react-styles';\nimport styles from '@patternfly/react-styles/css/components/DataList/data-list.mjs';\nexport const DataListCell = (_a) => {\n var { children = null, className = '', width = 1, isFilled = true, alignRight = false, isIcon = false, wrapModifier = null } = _a, props = __rest(_a, [\"children\", \"className\", \"width\", \"isFilled\", \"alignRight\", \"isIcon\", \"wrapModifier\"]);\n return (React.createElement(\"div\", Object.assign({ className: css(styles.dataListCell, width > 1 && styles.modifiers[`flex_${width}`], !isFilled && styles.modifiers.noFill, alignRight && styles.modifiers.alignRight, isIcon && styles.modifiers.icon, className, wrapModifier && styles.modifiers[wrapModifier]) }, props), children));\n};\nDataListCell.displayName = 'DataListCell';\n//# sourceMappingURL=DataListCell.js.map","import { __rest } from \"tslib\";\nimport * as React from 'react';\nimport { css } from '@patternfly/react-styles';\nimport styles from '@patternfly/react-styles/css/components/DataList/data-list.mjs';\nexport const DataListItemCells = (_a) => {\n var { className = '', dataListCells, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n rowid = '' } = _a, props = __rest(_a, [\"className\", \"dataListCells\", \"rowid\"]);\n return (React.createElement(\"div\", Object.assign({ className: css(styles.dataListItemContent, className) }, props), dataListCells));\n};\nDataListItemCells.displayName = 'DataListItemCells';\n//# sourceMappingURL=DataListItemCells.js.map"],"names":["DataListCell","_a","children","className","width","isFilled","alignRight","isIcon","wrapModifier","props","__rest","React","css","styles","DataListItemCells","dataListCells","rowid"],"mappings":";;;AAIY,MAACA,IAAe,CAACC,MAAO;AAChC,MAAI,EAAE,UAAAC,IAAW,MAAM,WAAAC,IAAY,IAAI,OAAAC,IAAQ,GAAG,UAAAC,IAAW,IAAM,YAAAC,IAAa,IAAO,QAAAC,IAAS,IAAO,cAAAC,IAAe,KAAI,IAAKP,GAAIQ,IAAQC,EAAOT,GAAI,CAAC,YAAY,aAAa,SAAS,YAAY,cAAc,UAAU,cAAc,CAAC;AAC5O,SAAQU,EAAM,cAAc,OAAO,OAAO,OAAO,EAAE,WAAWC,EAAIC,EAAO,cAAcT,IAAQ,KAAKS,EAAO,UAAU,QAAQT,CAAK,EAAE,GAAG,CAACC,KAAYQ,EAAO,UAAU,QAAQP,KAAcO,EAAO,UAAU,YAAYN,KAAUM,EAAO,UAAU,MAAMV,GAAWK,KAAgBK,EAAO,UAAUL,CAAY,CAAC,KAAKC,CAAK,GAAGP,CAAQ;AAC3U;AACAF,EAAa,cAAc;ACJf,MAACc,IAAoB,CAACb,MAAO;AACrC,MAAI;AAAA,IAAE,WAAAE,IAAY;AAAA,IAAI,eAAAY;AAAA;AAAA,IAEtB,OAAAC,IAAQ;AAAA,EAAE,IAAKf,GAAIQ,IAAQC,EAAOT,GAAI,CAAC,aAAa,iBAAiB,OAAO,CAAC;AAC7E,SAAQU,EAAM,cAAc,OAAO,OAAO,OAAO,EAAE,WAAWC,EAAIC,EAAO,qBAAqBV,CAAS,EAAG,GAAEM,CAAK,GAAGM,CAAa;AACrI;AACAD,EAAkB,cAAc;","x_google_ignoreList":[0,1]}