@burdenoff/fe-libs 2026.1013.14 → 2026.1014.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/dist/chrome/AppShellLayout.js +17 -8
- package/dist/shared/assistant/ui/AssistantOverlay.js +98 -95
- package/dist/shared/assistant/ui/assistantOverlayState.d.ts +12 -0
- package/dist/shared/assistant/ui/assistantOverlayState.js +14 -14
- package/dist/shared/providers/shell/AuthProvider.js +92 -97
- package/dist/shared/providers/shell/ProfileStorageManager.d.ts +20 -0
- package/dist/shared/providers/shell/ProfileStorageManager.js +88 -71
- package/dist/shared-assistant.js +127 -127
- package/package.json +2 -2
|
@@ -1,152 +1,147 @@
|
|
|
1
|
-
import { getActiveProfileId as e, getProfileTokens as t, getProfileUser as n, getProfileWorkspaceToken as
|
|
2
|
-
import { readShellSsoCookie as
|
|
3
|
-
import { useBridgeInitialization as
|
|
4
|
-
import { useTokenExpiryTimer as
|
|
5
|
-
import { useStorageSync as
|
|
6
|
-
import { useRemoteSLO as
|
|
7
|
-
import { useAuthActions as
|
|
8
|
-
import { useSsoDepositBootGuard as
|
|
9
|
-
import { createContext as
|
|
10
|
-
import { jsx as
|
|
1
|
+
import { getActiveProfileId as e, getProfileTokens as t, getProfileUser as n, getProfileWorkspaceToken as ee, getSwitchableProfiles as r, resolveActiveProfileId as te } from "./ProfileStorageManager.js";
|
|
2
|
+
import { readShellSsoCookie as i } from "../../utils/authCookie.js";
|
|
3
|
+
import { useBridgeInitialization as a } from "./authProvider/useBridgeInitialization.js";
|
|
4
|
+
import { useTokenExpiryTimer as o } from "./authProvider/useTokenExpiryTimer.js";
|
|
5
|
+
import { useStorageSync as ne } from "./authProvider/useStorageSync.js";
|
|
6
|
+
import { useRemoteSLO as s } from "./authProvider/useRemoteSLO.js";
|
|
7
|
+
import { useAuthActions as c } from "./authProvider/useAuthActions.js";
|
|
8
|
+
import { useSsoDepositBootGuard as l } from "./authProvider/useSsoDepositBootGuard.js";
|
|
9
|
+
import { createContext as u, use as d, useCallback as f, useMemo as p, useRef as m, useState as h } from "react";
|
|
10
|
+
import { jsx as g } from "react/jsx-runtime";
|
|
11
11
|
//#region src/shared/providers/shell/AuthProvider.tsx
|
|
12
|
-
var
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
var _ = u(null);
|
|
13
|
+
function v(e) {
|
|
14
|
+
return r(e).map((t) => ({
|
|
15
|
+
id: t.id,
|
|
16
|
+
email: t.email,
|
|
17
|
+
name: t.name,
|
|
18
|
+
avatar: t.avatar,
|
|
19
|
+
isActive: t.id === e,
|
|
20
|
+
lastLogin: t.lastLogin
|
|
21
|
+
}));
|
|
22
|
+
}
|
|
23
|
+
function y({ children: r, onTokenExpired: u, onSessionExpiringSoon: d, onRefreshToken: y, bridgeUrl: b, bridgeAllowedOrigins: x, bridgeDebug: S, onBridgeReady: C }) {
|
|
24
|
+
let w = m(!1), [T, E] = h(() => te()), [D, O] = h(() => T ? n(T) : null), [k, A] = h(() => T ? t(T) : null), [j, M] = h(() => T ? ee(T) : null), [N, P] = h(() => {
|
|
25
|
+
if (T && n(T)) return !1;
|
|
26
|
+
if (b) try {
|
|
27
|
+
let e = i()?.id ?? null;
|
|
18
28
|
if (e && localStorage.getItem(`bf-p-${e}-tokens`)) return !1;
|
|
19
29
|
} catch {}
|
|
20
|
-
return !!
|
|
21
|
-
}), [
|
|
22
|
-
id: e.id,
|
|
23
|
-
email: e.email,
|
|
24
|
-
name: e.name,
|
|
25
|
-
avatar: e.avatar,
|
|
26
|
-
isActive: e.id === E,
|
|
27
|
-
lastLogin: e.lastLogin
|
|
28
|
-
}))), B = p(() => {
|
|
30
|
+
return !!b;
|
|
31
|
+
}), [F, I] = h(!1), [L, re] = h(null), [R, z] = h(() => v(T)), B = f(() => {
|
|
29
32
|
z([]);
|
|
30
|
-
}, []), V =
|
|
31
|
-
|
|
32
|
-
z(i().map((e) => ({
|
|
33
|
-
id: e.id,
|
|
34
|
-
email: e.email,
|
|
35
|
-
name: e.name,
|
|
36
|
-
avatar: e.avatar,
|
|
37
|
-
isActive: e.id === t,
|
|
38
|
-
lastLogin: e.lastLogin
|
|
39
|
-
})));
|
|
33
|
+
}, []), V = f(() => {
|
|
34
|
+
z(v(e()));
|
|
40
35
|
}, []);
|
|
41
|
-
|
|
42
|
-
bridgeUrl:
|
|
43
|
-
bridgeAllowedOrigins:
|
|
44
|
-
bridgeDebug:
|
|
45
|
-
onBridgeReady:
|
|
46
|
-
bridgeSyncInProgress:
|
|
47
|
-
setIsLoading:
|
|
48
|
-
setActiveId:
|
|
49
|
-
setUser:
|
|
50
|
-
setTokens:
|
|
51
|
-
setWorkspaceTokenLocal:
|
|
36
|
+
a({
|
|
37
|
+
bridgeUrl: b,
|
|
38
|
+
bridgeAllowedOrigins: x,
|
|
39
|
+
bridgeDebug: S,
|
|
40
|
+
onBridgeReady: C,
|
|
41
|
+
bridgeSyncInProgress: w,
|
|
42
|
+
setIsLoading: P,
|
|
43
|
+
setActiveId: E,
|
|
44
|
+
setUser: O,
|
|
45
|
+
setTokens: A,
|
|
46
|
+
setWorkspaceTokenLocal: M,
|
|
52
47
|
clearAccounts: B,
|
|
53
48
|
refreshAccounts: V
|
|
54
49
|
});
|
|
55
|
-
let { login: H, logout: U, logoutAll: W, updateUser: G, refreshAccessToken: K, hasPermission: q, setWorkspaceToken: J, setMfaState: Y, switchAccount: X, addAccount: Z, removeAccount: Q } =
|
|
56
|
-
user:
|
|
57
|
-
tokens:
|
|
58
|
-
activeId:
|
|
59
|
-
bridgeSyncInProgress:
|
|
60
|
-
onRefreshToken:
|
|
61
|
-
onTokenExpired:
|
|
62
|
-
setActiveId:
|
|
63
|
-
setUser:
|
|
64
|
-
setTokens:
|
|
65
|
-
setWorkspaceTokenLocal:
|
|
66
|
-
setMfaRequiredState:
|
|
50
|
+
let { login: H, logout: U, logoutAll: W, updateUser: G, refreshAccessToken: K, hasPermission: q, setWorkspaceToken: J, setMfaState: Y, switchAccount: X, addAccount: Z, removeAccount: Q } = c({
|
|
51
|
+
user: D,
|
|
52
|
+
tokens: k,
|
|
53
|
+
activeId: T,
|
|
54
|
+
bridgeSyncInProgress: w,
|
|
55
|
+
onRefreshToken: y,
|
|
56
|
+
onTokenExpired: u,
|
|
57
|
+
setActiveId: E,
|
|
58
|
+
setUser: O,
|
|
59
|
+
setTokens: A,
|
|
60
|
+
setWorkspaceTokenLocal: M,
|
|
61
|
+
setMfaRequiredState: I,
|
|
67
62
|
setMfaChallengeIdState: re,
|
|
68
|
-
setIsLoading:
|
|
63
|
+
setIsLoading: P,
|
|
69
64
|
clearAccounts: B,
|
|
70
65
|
refreshAccounts: V
|
|
71
66
|
});
|
|
72
|
-
|
|
73
|
-
tokens:
|
|
74
|
-
onRefreshToken:
|
|
75
|
-
onTokenExpired:
|
|
76
|
-
onSessionExpiringSoon:
|
|
67
|
+
o({
|
|
68
|
+
tokens: k,
|
|
69
|
+
onRefreshToken: y,
|
|
70
|
+
onTokenExpired: u,
|
|
71
|
+
onSessionExpiringSoon: d,
|
|
77
72
|
refreshAccessToken: K
|
|
78
|
-
}),
|
|
79
|
-
user:
|
|
80
|
-
tokens:
|
|
81
|
-
workspaceToken:
|
|
82
|
-
activeId:
|
|
83
|
-
setUser:
|
|
84
|
-
setTokens:
|
|
85
|
-
setWorkspaceTokenLocal:
|
|
86
|
-
setActiveId:
|
|
73
|
+
}), ne({
|
|
74
|
+
user: D,
|
|
75
|
+
tokens: k,
|
|
76
|
+
workspaceToken: j,
|
|
77
|
+
activeId: T,
|
|
78
|
+
setUser: O,
|
|
79
|
+
setTokens: A,
|
|
80
|
+
setWorkspaceTokenLocal: M,
|
|
81
|
+
setActiveId: E,
|
|
87
82
|
clearAccounts: B,
|
|
88
83
|
refreshAccounts: V
|
|
89
|
-
}),
|
|
90
|
-
tokens:
|
|
91
|
-
bridgeUrl:
|
|
84
|
+
}), l(), s({
|
|
85
|
+
tokens: k,
|
|
86
|
+
bridgeUrl: b,
|
|
92
87
|
logout: U,
|
|
93
|
-
setActiveId:
|
|
94
|
-
setUser:
|
|
95
|
-
setTokens:
|
|
96
|
-
setWorkspaceTokenLocal:
|
|
88
|
+
setActiveId: E,
|
|
89
|
+
setUser: O,
|
|
90
|
+
setTokens: A,
|
|
91
|
+
setWorkspaceTokenLocal: M,
|
|
97
92
|
clearAccounts: B
|
|
98
93
|
});
|
|
99
|
-
let $ =
|
|
100
|
-
user:
|
|
101
|
-
tokens:
|
|
94
|
+
let $ = p(() => !!D && !!k, [D, k]), ie = p(() => ({
|
|
95
|
+
user: D,
|
|
96
|
+
tokens: k,
|
|
102
97
|
isAuthenticated: $,
|
|
103
|
-
isLoading:
|
|
98
|
+
isLoading: N,
|
|
104
99
|
login: H,
|
|
105
100
|
logout: U,
|
|
106
101
|
updateUser: G,
|
|
107
102
|
refreshAccessToken: K,
|
|
108
103
|
hasPermission: q,
|
|
109
104
|
setWorkspaceToken: J,
|
|
110
|
-
workspaceToken:
|
|
111
|
-
mfaRequired:
|
|
105
|
+
workspaceToken: j,
|
|
106
|
+
mfaRequired: F,
|
|
112
107
|
mfaChallengeId: L,
|
|
113
108
|
setMfaState: Y,
|
|
114
|
-
activeProfileId:
|
|
109
|
+
activeProfileId: T,
|
|
115
110
|
accounts: R,
|
|
116
111
|
switchAccount: X,
|
|
117
112
|
addAccount: Z,
|
|
118
113
|
removeAccount: Q,
|
|
119
114
|
logoutAll: W,
|
|
120
|
-
currentUser:
|
|
115
|
+
currentUser: D
|
|
121
116
|
}), [
|
|
122
|
-
|
|
123
|
-
|
|
117
|
+
D,
|
|
118
|
+
k,
|
|
124
119
|
$,
|
|
125
|
-
|
|
120
|
+
N,
|
|
126
121
|
H,
|
|
127
122
|
U,
|
|
128
123
|
G,
|
|
129
124
|
K,
|
|
130
125
|
q,
|
|
131
126
|
J,
|
|
132
|
-
|
|
133
|
-
|
|
127
|
+
j,
|
|
128
|
+
F,
|
|
134
129
|
L,
|
|
135
130
|
Y,
|
|
136
|
-
|
|
131
|
+
T,
|
|
137
132
|
R,
|
|
138
133
|
X,
|
|
139
134
|
Z,
|
|
140
135
|
Q,
|
|
141
136
|
W
|
|
142
137
|
]);
|
|
143
|
-
return /* @__PURE__ */ _
|
|
138
|
+
return /* @__PURE__ */ g(_.Provider, {
|
|
144
139
|
value: ie,
|
|
145
|
-
children:
|
|
140
|
+
children: r
|
|
146
141
|
});
|
|
147
142
|
}
|
|
148
143
|
function b() {
|
|
149
|
-
let e =
|
|
144
|
+
let e = d(_);
|
|
150
145
|
if (!e) throw Error("useAuth must be used within an AuthProvider");
|
|
151
146
|
return e;
|
|
152
147
|
}
|
|
@@ -58,6 +58,26 @@ export interface ProfileUser {
|
|
|
58
58
|
*/
|
|
59
59
|
export declare const PROFILE_STORAGE_CHANGE_EVENT = "bf-profile-storage-change";
|
|
60
60
|
export declare function getProfiles(): ProfileMeta[];
|
|
61
|
+
/**
|
|
62
|
+
* True when the stored user for a profile is an account whose email was never
|
|
63
|
+
* verified. Such an account can't sign in (the backend rejects it with
|
|
64
|
+
* EMAIL_NOT_VERIFIED), so it is never a valid active or switchable profile —
|
|
65
|
+
* older auth builds wrote one to the list on signup alone (BOFF-7215).
|
|
66
|
+
*/
|
|
67
|
+
export declare function isPendingVerificationProfile(profileId: string): boolean;
|
|
68
|
+
/** True when a profile holds credentials from a completed sign-in. */
|
|
69
|
+
export declare function hasProfileCredentials(profileId: string): boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Profiles that may become the active profile. Excludes pending-verification
|
|
72
|
+
* accounts only: a verified profile may briefly lack tokens mid-sign-in (user
|
|
73
|
+
* is written before tokens), and must still resolve as active then.
|
|
74
|
+
*/
|
|
75
|
+
export declare function getSelectableProfiles(): ProfileMeta[];
|
|
76
|
+
/**
|
|
77
|
+
* Profiles to list in the account switcher: selectable profiles that hold
|
|
78
|
+
* credentials, plus the active profile (whose tokens may be mid-write).
|
|
79
|
+
*/
|
|
80
|
+
export declare function getSwitchableProfiles(activeProfileId: string | null): ProfileMeta[];
|
|
61
81
|
export declare function setProfiles(profiles: ProfileMeta[]): void;
|
|
62
82
|
export declare function addProfile(meta: ProfileMeta): void;
|
|
63
83
|
export declare function removeProfile(profileId: string): void;
|
|
@@ -2,33 +2,37 @@ import { __exportAll as e } from "../../../_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
//#region src/shared/providers/shell/ProfileStorageManager.ts
|
|
3
3
|
var t = /* @__PURE__ */ e({
|
|
4
4
|
PROFILE_STORAGE_CHANGE_EVENT: () => s,
|
|
5
|
-
addProfile: () =>
|
|
6
|
-
clearActiveProfileId: () =>
|
|
7
|
-
getActiveContext: () =>
|
|
8
|
-
getActiveProfileId: () =>
|
|
9
|
-
getActiveTokens: () =>
|
|
10
|
-
getActiveUser: () =>
|
|
11
|
-
getActiveWorkspaceToken: () =>
|
|
12
|
-
getProfileContext: () =>
|
|
13
|
-
getProfileLocale: () =>
|
|
14
|
-
getProfileTokens: () =>
|
|
15
|
-
getProfileUser: () =>
|
|
16
|
-
getProfileWorkspaceToken: () =>
|
|
5
|
+
addProfile: () => y,
|
|
6
|
+
clearActiveProfileId: () => w,
|
|
7
|
+
getActiveContext: () => z,
|
|
8
|
+
getActiveProfileId: () => S,
|
|
9
|
+
getActiveTokens: () => L,
|
|
10
|
+
getActiveUser: () => I,
|
|
11
|
+
getActiveWorkspaceToken: () => R,
|
|
12
|
+
getProfileContext: () => M,
|
|
13
|
+
getProfileLocale: () => P,
|
|
14
|
+
getProfileTokens: () => O,
|
|
15
|
+
getProfileUser: () => E,
|
|
16
|
+
getProfileWorkspaceToken: () => A,
|
|
17
17
|
getProfiles: () => p,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
18
|
+
getSelectableProfiles: () => g,
|
|
19
|
+
getSwitchableProfiles: () => _,
|
|
20
|
+
hasProfileCredentials: () => h,
|
|
21
|
+
isPendingVerificationProfile: () => m,
|
|
22
|
+
loginProfile: () => B,
|
|
23
|
+
logoutActiveProfile: () => V,
|
|
24
|
+
logoutAllProfiles: () => H,
|
|
25
|
+
removeAllProfiles: () => x,
|
|
26
|
+
removeProfile: () => b,
|
|
27
|
+
resolveActiveProfileId: () => T,
|
|
28
|
+
setActiveProfileId: () => C,
|
|
29
|
+
setProfileContext: () => N,
|
|
30
|
+
setProfileLocale: () => F,
|
|
31
|
+
setProfileTokens: () => k,
|
|
32
|
+
setProfileUser: () => D,
|
|
33
|
+
setProfileWorkspaceToken: () => j,
|
|
34
|
+
setProfiles: () => v,
|
|
35
|
+
switchProfile: () => U
|
|
32
36
|
}), n = "bf-profiles", r = "bf-active-profile", i = "bf-last-active-profile", a = "bf-p", o = "session", s = "bf-profile-storage-change";
|
|
33
37
|
function c() {
|
|
34
38
|
typeof window < "u" && window.dispatchEvent(new Event(s));
|
|
@@ -54,14 +58,27 @@ function p() {
|
|
|
54
58
|
return d(n) ?? [];
|
|
55
59
|
}
|
|
56
60
|
function m(e) {
|
|
57
|
-
|
|
61
|
+
return E(e)?.emailVerified === !1;
|
|
58
62
|
}
|
|
59
63
|
function h(e) {
|
|
64
|
+
let t = O(e);
|
|
65
|
+
return !!(t?.accessToken || t?.refreshToken);
|
|
66
|
+
}
|
|
67
|
+
function g() {
|
|
68
|
+
return p().filter((e) => !m(e.id));
|
|
69
|
+
}
|
|
70
|
+
function _(e) {
|
|
71
|
+
return g().filter((t) => t.id === e || h(t.id));
|
|
72
|
+
}
|
|
73
|
+
function v(e) {
|
|
74
|
+
f(n, e);
|
|
75
|
+
}
|
|
76
|
+
function y(e) {
|
|
60
77
|
let t = p().filter((t) => t.id !== e.id);
|
|
61
|
-
t.push(e),
|
|
78
|
+
t.push(e), v(t);
|
|
62
79
|
}
|
|
63
|
-
function
|
|
64
|
-
|
|
80
|
+
function b(e) {
|
|
81
|
+
v(p().filter((t) => t.id !== e));
|
|
65
82
|
for (let t of [
|
|
66
83
|
"user",
|
|
67
84
|
"tokens",
|
|
@@ -76,25 +93,25 @@ function g(e) {
|
|
|
76
93
|
"sidebar-collapsed"
|
|
77
94
|
]) localStorage.removeItem(l(e, t)), sessionStorage.removeItem(u(e, t));
|
|
78
95
|
}
|
|
79
|
-
function
|
|
96
|
+
function x() {
|
|
80
97
|
let e = p();
|
|
81
|
-
for (let t of e)
|
|
98
|
+
for (let t of e) b(t.id);
|
|
82
99
|
localStorage.removeItem(n), sessionStorage.removeItem(r);
|
|
83
100
|
}
|
|
84
|
-
function
|
|
101
|
+
function S() {
|
|
85
102
|
return sessionStorage.getItem(r);
|
|
86
103
|
}
|
|
87
|
-
function
|
|
104
|
+
function C(e) {
|
|
88
105
|
sessionStorage.setItem(r, e);
|
|
89
106
|
try {
|
|
90
107
|
localStorage.setItem(i, e);
|
|
91
108
|
} catch {}
|
|
92
109
|
}
|
|
93
|
-
function
|
|
110
|
+
function w() {
|
|
94
111
|
sessionStorage.removeItem(r);
|
|
95
112
|
}
|
|
96
|
-
function
|
|
97
|
-
let e =
|
|
113
|
+
function T() {
|
|
114
|
+
let e = g(), t = S();
|
|
98
115
|
if (t && e.some((e) => e.id === t)) return t;
|
|
99
116
|
let n = null;
|
|
100
117
|
try {
|
|
@@ -102,30 +119,30 @@ function x() {
|
|
|
102
119
|
} catch {
|
|
103
120
|
n = null;
|
|
104
121
|
}
|
|
105
|
-
return n && e.some((e) => e.id === n) ? (
|
|
122
|
+
return n && e.some((e) => e.id === n) ? (C(n), n) : e.length > 0 ? (C(e[0].id), e[0].id) : null;
|
|
106
123
|
}
|
|
107
|
-
function
|
|
124
|
+
function E(e) {
|
|
108
125
|
return d(l(e, "user"));
|
|
109
126
|
}
|
|
110
|
-
function
|
|
127
|
+
function D(e, t) {
|
|
111
128
|
let n = l(e, "user");
|
|
112
129
|
t ? f(n, t) : localStorage.removeItem(n);
|
|
113
130
|
}
|
|
114
|
-
function
|
|
131
|
+
function O(e) {
|
|
115
132
|
return d(l(e, "tokens"));
|
|
116
133
|
}
|
|
117
|
-
function
|
|
134
|
+
function k(e, t) {
|
|
118
135
|
let n = l(e, "tokens");
|
|
119
136
|
t ? f(n, t) : localStorage.removeItem(n);
|
|
120
137
|
}
|
|
121
|
-
function
|
|
138
|
+
function A(e) {
|
|
122
139
|
try {
|
|
123
140
|
let t = sessionStorage.getItem(u(e, "workspace-token"));
|
|
124
141
|
if (t) return t;
|
|
125
142
|
} catch {}
|
|
126
143
|
return localStorage.getItem(l(e, "workspace-token"));
|
|
127
144
|
}
|
|
128
|
-
function
|
|
145
|
+
function j(e, t) {
|
|
129
146
|
let n = l(e, "workspace-token"), r = u(e, "workspace-token");
|
|
130
147
|
if (t) {
|
|
131
148
|
try {
|
|
@@ -140,53 +157,53 @@ function D(e, t) {
|
|
|
140
157
|
}
|
|
141
158
|
c();
|
|
142
159
|
}
|
|
143
|
-
function
|
|
160
|
+
function M(e) {
|
|
144
161
|
return d(l(e, "context"));
|
|
145
162
|
}
|
|
146
|
-
function
|
|
163
|
+
function N(e, t) {
|
|
147
164
|
f(l(e, "context"), t);
|
|
148
165
|
}
|
|
149
|
-
function
|
|
166
|
+
function P(e) {
|
|
150
167
|
return localStorage.getItem(l(e, "locale"));
|
|
151
168
|
}
|
|
152
|
-
function
|
|
169
|
+
function F(e, t) {
|
|
153
170
|
localStorage.setItem(l(e, "locale"), t);
|
|
154
171
|
}
|
|
155
|
-
function
|
|
156
|
-
let e =
|
|
157
|
-
return e ? S(e) : null;
|
|
158
|
-
}
|
|
159
|
-
function N() {
|
|
160
|
-
let e = x();
|
|
161
|
-
return e ? w(e) : null;
|
|
162
|
-
}
|
|
163
|
-
function P() {
|
|
164
|
-
let e = x();
|
|
172
|
+
function I() {
|
|
173
|
+
let e = T();
|
|
165
174
|
return e ? E(e) : null;
|
|
166
175
|
}
|
|
167
|
-
function
|
|
168
|
-
let e =
|
|
176
|
+
function L() {
|
|
177
|
+
let e = T();
|
|
169
178
|
return e ? O(e) : null;
|
|
170
179
|
}
|
|
171
|
-
function
|
|
180
|
+
function R() {
|
|
181
|
+
let e = T();
|
|
182
|
+
return e ? A(e) : null;
|
|
183
|
+
}
|
|
184
|
+
function z() {
|
|
185
|
+
let e = T();
|
|
186
|
+
return e ? M(e) : null;
|
|
187
|
+
}
|
|
188
|
+
function B(e, t) {
|
|
172
189
|
let n = e.id;
|
|
173
|
-
return
|
|
190
|
+
return y({
|
|
174
191
|
id: n,
|
|
175
192
|
email: e.email,
|
|
176
193
|
name: e.name ?? `${e.firstName ?? ""} ${e.lastName ?? ""}`.trim(),
|
|
177
194
|
avatar: e.avatar,
|
|
178
195
|
lastLogin: (/* @__PURE__ */ new Date()).toISOString()
|
|
179
|
-
}),
|
|
196
|
+
}), D(n, e), k(n, t), C(n), c(), n;
|
|
180
197
|
}
|
|
181
|
-
function
|
|
182
|
-
let e =
|
|
183
|
-
e && (
|
|
198
|
+
function V() {
|
|
199
|
+
let e = S();
|
|
200
|
+
e && (b(e), w(), T(), c());
|
|
184
201
|
}
|
|
185
|
-
function
|
|
186
|
-
|
|
202
|
+
function H() {
|
|
203
|
+
x(), c();
|
|
187
204
|
}
|
|
188
|
-
function
|
|
189
|
-
return
|
|
205
|
+
function U(e) {
|
|
206
|
+
return g().some((t) => t.id === e) ? (C(e), !0) : !1;
|
|
190
207
|
}
|
|
191
208
|
//#endregion
|
|
192
|
-
export { s as PROFILE_STORAGE_CHANGE_EVENT, t as ProfileStorageManager_exports,
|
|
209
|
+
export { s as PROFILE_STORAGE_CHANGE_EVENT, t as ProfileStorageManager_exports, y as addProfile, w as clearActiveProfileId, z as getActiveContext, S as getActiveProfileId, L as getActiveTokens, I as getActiveUser, R as getActiveWorkspaceToken, M as getProfileContext, P as getProfileLocale, O as getProfileTokens, E as getProfileUser, A as getProfileWorkspaceToken, p as getProfiles, _ as getSwitchableProfiles, B as loginProfile, V as logoutActiveProfile, H as logoutAllProfiles, x as removeAllProfiles, b as removeProfile, T as resolveActiveProfileId, C as setActiveProfileId, N as setProfileContext, F as setProfileLocale, k as setProfileTokens, D as setProfileUser, j as setProfileWorkspaceToken, v as setProfiles, U as switchProfile };
|