@burdenoff/fe-libs 2026.529.2 → 2026.529.4
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/node_modules/graphql-ws/dist/client.js +270 -0
- package/dist/node_modules/graphql-ws/dist/common-CGW11Fyb.js +60 -0
- package/dist/shared/graphql/client.d.ts.map +1 -1
- package/dist/shared/graphql/client.js +95 -83
- package/dist/shared/graphql/fetch.d.ts.map +1 -1
- package/dist/shared/graphql/fetch.js +130 -107
- package/dist/shared/graphql/index.d.ts +1 -0
- package/dist/shared/graphql/index.d.ts.map +1 -1
- package/dist/shared/graphql/links/ws-link.d.ts +30 -0
- package/dist/shared/graphql/links/ws-link.d.ts.map +1 -0
- package/dist/shared/graphql/links/ws-link.js +45 -0
- package/dist/shared/providers/AppShellProvider.d.ts.map +1 -1
- package/dist/shared/providers/AppShellProvider.js +215 -181
- package/dist/shared/tours/toursContext/useTourMutations.js +29 -29
- package/dist/shared/utils/backendErrors.d.ts.map +1 -1
- package/dist/shared/utils/backendErrors.js +121 -0
- package/dist/shared/utils/index.d.ts +4 -2
- package/dist/shared/utils/index.d.ts.map +1 -1
- package/dist/shared/utils/quotaErrors.js +11 -8
- package/dist/shared-graphql.js +4 -3
- package/dist/shared-tours.js +3 -3
- package/dist/shared-utils.js +12 -11
- package/dist/shared.js +97 -95
- package/dist/utils/index.js +1 -0
- package/package.json +2 -1
|
@@ -1,48 +1,45 @@
|
|
|
1
1
|
import { isShellLessRoute as e } from "../config/shellRoutes.js";
|
|
2
2
|
import { readActiveContextValueWithUrlPrecedence as t } from "./shell/ActiveContextStorage.js";
|
|
3
|
-
import {
|
|
4
|
-
import "
|
|
5
|
-
import { attemptTokenRefresh as
|
|
6
|
-
import { AuthProvider as
|
|
7
|
-
import { ActiveContextProvider as
|
|
8
|
-
import { LogManager as
|
|
9
|
-
import { ConsoleTransport as
|
|
10
|
-
import { ThemeProvider as
|
|
11
|
-
import { ErrorFallback as
|
|
12
|
-
import { m as
|
|
13
|
-
import { PWAInstallBanner as
|
|
14
|
-
import { I18nProvider as
|
|
15
|
-
import { FeatureFlagsProvider as
|
|
16
|
-
import { FeatureFlagProvider as
|
|
17
|
-
import "
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import "
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import "
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import { BrowserRouter as re, useLocation as G } from "react-router-dom";
|
|
42
|
-
import { Toaster as K } from "sonner";
|
|
43
|
-
import { QueryClient as ie, QueryClientProvider as q } from "@tanstack/react-query";
|
|
3
|
+
import { BACKEND_ERROR_EVENT as n, dispatchBackendErrorEvent as r, isBackendErrorDisplay as i, shouldToastBackendError as a } from "../utils/backendErrors.js";
|
|
4
|
+
import { graphqlFetch as o } from "../graphql/fetch.js";
|
|
5
|
+
import { attemptTokenRefresh as s, clearAuthSessionStorage as c, isAuthNetworkError as l } from "../utils/authErrorHandling.js";
|
|
6
|
+
import { AuthProvider as u } from "./shell/AuthProvider.js";
|
|
7
|
+
import { ActiveContextProvider as d } from "./shell/ActiveContextProvider.js";
|
|
8
|
+
import { LogManager as ee } from "../logger/LogManager.js";
|
|
9
|
+
import { ConsoleTransport as te } from "../logger/ConsoleTransport.js";
|
|
10
|
+
import { ThemeProvider as f } from "./shell/ThemeProvider.js";
|
|
11
|
+
import { ErrorFallback as ne } from "../components/ErrorFallback.js";
|
|
12
|
+
import { m as p } from "../../node_modules/react-error-boundary/dist/react-error-boundary.js";
|
|
13
|
+
import { PWAInstallBanner as m } from "../components/PWAInstallBanner.js";
|
|
14
|
+
import { I18nProvider as h } from "./shell/I18nProvider.js";
|
|
15
|
+
import { FeatureFlagsProvider as g } from "./shell/FeatureFlagsProvider.js";
|
|
16
|
+
import { FeatureFlagProvider as _ } from "../feature-flags/FeatureFlagProvider.js";
|
|
17
|
+
import { GlobalUiProvider as v } from "./shell/GlobalUiProvider.js";
|
|
18
|
+
import { ShellUiProvider as y } from "./shell/ShellUiProvider.js";
|
|
19
|
+
import { ContextManagerProvider as b } from "./shell/ContextManagerProvider.js";
|
|
20
|
+
import { AuthTokenProvider as x } from "./shell/AuthTokenProvider.js";
|
|
21
|
+
import { MultiGatewayProvider as re } from "./shell/MultiGatewayProvider.js";
|
|
22
|
+
import { G as S, j as C, w } from "../../node_modules/web-vitals/dist/web-vitals.js";
|
|
23
|
+
import { ProfileI18nBridge as T } from "./shell/ProfileI18nBridge.js";
|
|
24
|
+
import { ProfileGeographyBridge as E } from "./shell/ProfileGeographyBridge.js";
|
|
25
|
+
import { AppShellContextProvider as ie } from "./shell/AppShellContext.js";
|
|
26
|
+
import { DevtoolsSink as D } from "../events/sinks/DevtoolsSink.js";
|
|
27
|
+
import { BroadcastChannelSink as O } from "../events/sinks/BroadcastChannelSink.js";
|
|
28
|
+
import { BackendAuditSink as k } from "../events/sinks/BackendAuditSink.js";
|
|
29
|
+
import { RybbitSink as A } from "../events/sinks/RybbitSink.js";
|
|
30
|
+
import { OtelBrowserSink as j } from "../events/sinks/OtelBrowserSink.js";
|
|
31
|
+
import { EventBusProvider as ae, useEventBus as M } from "../../shared-events.js";
|
|
32
|
+
import { useReferralAttribution as N } from "../hooks/useReferralAttribution.js";
|
|
33
|
+
import { TourPlayerProvider as P } from "../tours/TourPlayerProvider.js";
|
|
34
|
+
import { ToursProvider as F, useToursContext as I } from "../tours/ToursContext.js";
|
|
35
|
+
import { TourInitializer as L } from "../tours/TourInitializer.js";
|
|
36
|
+
import { Suspense as R, useCallback as z, useEffect as B, useMemo as V, useRef as H } from "react";
|
|
37
|
+
import { Fragment as U, jsx as W, jsxs as G } from "react/jsx-runtime";
|
|
38
|
+
import { BrowserRouter as K, useLocation as q } from "react-router-dom";
|
|
39
|
+
import { Toaster as J, toast as Y } from "sonner";
|
|
40
|
+
import { MutationCache as oe, QueryCache as se, QueryClient as ce, QueryClientProvider as le } from "@tanstack/react-query";
|
|
44
41
|
//#region src/shared/providers/AppShellProvider.tsx
|
|
45
|
-
var
|
|
42
|
+
var X = {
|
|
46
43
|
bigconsole: {
|
|
47
44
|
prod: "292459a3e86c",
|
|
48
45
|
nonProd: "a7e7362b0de3"
|
|
@@ -61,7 +58,7 @@ var J = {
|
|
|
61
58
|
},
|
|
62
59
|
vibecontrols: { prod: "8a46449d9c07" },
|
|
63
60
|
workspaces: { prod: "da0c142f4b2e" }
|
|
64
|
-
},
|
|
61
|
+
}, Z = [
|
|
65
62
|
"nav.route.changed",
|
|
66
63
|
"auth.signed_in",
|
|
67
64
|
"auth.signed_out",
|
|
@@ -76,14 +73,26 @@ var J = {
|
|
|
76
73
|
"notification.admin.sent",
|
|
77
74
|
"notification.template.saved",
|
|
78
75
|
"notification.schedule.updated"
|
|
79
|
-
];
|
|
80
|
-
function
|
|
76
|
+
], ue = 4e3;
|
|
77
|
+
function de(e) {
|
|
78
|
+
let t = e.technicalMessage ?? e.extensions?.technicalMessage, n = {
|
|
79
|
+
code: e.code,
|
|
80
|
+
operationName: e.operationName,
|
|
81
|
+
serviceName: e.serviceName,
|
|
82
|
+
path: e.path,
|
|
83
|
+
requestId: e.requestId,
|
|
84
|
+
technicalMessage: t,
|
|
85
|
+
extensions: e.extensions
|
|
86
|
+
};
|
|
87
|
+
console.error("[Burdenoff backend error]", e.message, n);
|
|
88
|
+
}
|
|
89
|
+
function Q(e) {
|
|
81
90
|
return e === "prod" || e === "production" ? "prod" : e === "alpha" || e === "staging" ? "alpha" : "dev";
|
|
82
91
|
}
|
|
83
|
-
function
|
|
92
|
+
function fe(e, t) {
|
|
84
93
|
return e.VITE_DISABLE_ANALYTICS === "true" ? !1 : e.VITE_ENABLE_ANALYTICS === "true" || e.PROD || t !== "dev" ? !0 : e.VITE_ENABLE_ANALYTICS !== "false";
|
|
85
94
|
}
|
|
86
|
-
function
|
|
95
|
+
function pe() {
|
|
87
96
|
return {
|
|
88
97
|
BASE_URL: "/",
|
|
89
98
|
DEV: !1,
|
|
@@ -92,8 +101,8 @@ function ae() {
|
|
|
92
101
|
SSR: !1
|
|
93
102
|
};
|
|
94
103
|
}
|
|
95
|
-
function
|
|
96
|
-
let n =
|
|
104
|
+
function $(e, t) {
|
|
105
|
+
let n = Q(t.VITE_DEPLOY_ENV ?? t.MODE), r = fe(t, n), i = X[e], a = n === "prod" ? i?.prod : i?.nonProd, o = t.VITE_RYBBIT_SITE_ID || a, s = t.VITE_BACKEND_AUDIT_ENDPOINT || (t.PROD ? "/api/fe-events" : void 0);
|
|
97
106
|
return {
|
|
98
107
|
enabled: r,
|
|
99
108
|
appVersion: t.VITE_APP_VERSION || "0.0.0",
|
|
@@ -104,7 +113,7 @@ function Q(e, t) {
|
|
|
104
113
|
enabled: r && !!o,
|
|
105
114
|
siteId: o,
|
|
106
115
|
scriptUrl: t.VITE_RYBBIT_SCRIPT_URL,
|
|
107
|
-
allowlist:
|
|
116
|
+
allowlist: Z,
|
|
108
117
|
identifyOn: "auth.signed_in",
|
|
109
118
|
rename: { "nav.route.changed": "pageview" }
|
|
110
119
|
},
|
|
@@ -119,16 +128,16 @@ function Q(e, t) {
|
|
|
119
128
|
}
|
|
120
129
|
};
|
|
121
130
|
}
|
|
122
|
-
function
|
|
123
|
-
let { trackProgress: a, recordStepCompletion: o, trackEvent: s } =
|
|
124
|
-
return /* @__PURE__ */
|
|
125
|
-
onTourStart:
|
|
131
|
+
function me({ children: e, enablePWA: t, toasterPosition: n, productName: r, brandInitial: i }) {
|
|
132
|
+
let { trackProgress: a, recordStepCompletion: o, trackEvent: s } = I(), c = z((e, t) => e.steps?.[t], []);
|
|
133
|
+
return /* @__PURE__ */ G(P, {
|
|
134
|
+
onTourStart: z((e) => {
|
|
126
135
|
a(e.id, "started"), s("TOUR_STARTED", e.id);
|
|
127
136
|
}, [s, a]),
|
|
128
|
-
onTourComplete:
|
|
137
|
+
onTourComplete: z((e) => {
|
|
129
138
|
a(e.id, "completed"), s("TOUR_COMPLETED", e.id);
|
|
130
139
|
}, [s, a]),
|
|
131
|
-
onTourSkip:
|
|
140
|
+
onTourSkip: z((e, t) => {
|
|
132
141
|
let n = c(e, t);
|
|
133
142
|
a(e.id, "skipped"), s("TOUR_SKIPPED", e.id, {
|
|
134
143
|
stepId: n?.id,
|
|
@@ -139,14 +148,14 @@ function $({ children: e, enablePWA: t, toasterPosition: n, productName: r, bran
|
|
|
139
148
|
s,
|
|
140
149
|
a
|
|
141
150
|
]),
|
|
142
|
-
onStepChange:
|
|
151
|
+
onStepChange: z((e, t) => {
|
|
143
152
|
let n = c(e, t);
|
|
144
153
|
n && s("STEP_VIEWED", e.id, {
|
|
145
154
|
stepId: n.id,
|
|
146
155
|
stepOrder: n.stepOrder
|
|
147
156
|
});
|
|
148
157
|
}, [c, s]),
|
|
149
|
-
onStepComplete:
|
|
158
|
+
onStepComplete: z((e, t) => {
|
|
150
159
|
let n = c(e, t);
|
|
151
160
|
n && (o(e.id, n.id), s("STEP_COMPLETED", e.id, {
|
|
152
161
|
stepId: n.id,
|
|
@@ -158,16 +167,17 @@ function $({ children: e, enablePWA: t, toasterPosition: n, productName: r, bran
|
|
|
158
167
|
s
|
|
159
168
|
]),
|
|
160
169
|
children: [
|
|
161
|
-
/* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ W(L, {}),
|
|
162
171
|
e,
|
|
163
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ W(he, {}),
|
|
173
|
+
/* @__PURE__ */ W(J, {
|
|
164
174
|
position: n,
|
|
165
175
|
richColors: !0,
|
|
166
176
|
closeButton: !0
|
|
167
177
|
}),
|
|
168
|
-
t && /* @__PURE__ */
|
|
178
|
+
t && /* @__PURE__ */ W(R, {
|
|
169
179
|
fallback: null,
|
|
170
|
-
children: /* @__PURE__ */
|
|
180
|
+
children: /* @__PURE__ */ W(m, {
|
|
171
181
|
productName: r,
|
|
172
182
|
brandInitial: i
|
|
173
183
|
})
|
|
@@ -175,18 +185,34 @@ function $({ children: e, enablePWA: t, toasterPosition: n, productName: r, bran
|
|
|
175
185
|
]
|
|
176
186
|
});
|
|
177
187
|
}
|
|
178
|
-
function
|
|
179
|
-
let
|
|
180
|
-
|
|
181
|
-
|
|
188
|
+
function he() {
|
|
189
|
+
let e = H(null);
|
|
190
|
+
return B(() => {
|
|
191
|
+
let t = (t) => {
|
|
192
|
+
let n = t instanceof CustomEvent && i(t.detail) ? t.detail : null;
|
|
193
|
+
if (!a(n)) return;
|
|
194
|
+
de(n);
|
|
195
|
+
let r = `${n.code ?? ""}|${n.message}`, o = Date.now(), s = e.current;
|
|
196
|
+
s?.key === r && o - s.shownAt < ue || (e.current = {
|
|
197
|
+
key: r,
|
|
198
|
+
shownAt: o
|
|
199
|
+
}, Y.error(n.message, { duration: 7e3 }));
|
|
200
|
+
};
|
|
201
|
+
return window.addEventListener(n, t), () => window.removeEventListener(n, t);
|
|
202
|
+
}, []), null;
|
|
203
|
+
}
|
|
204
|
+
function ge({ children: e, i18nProductId: t, fallbackTranslations: n, defaultBrand: r, productName: i, brandInitial: a, enablePWA: o, toasterPosition: s }) {
|
|
205
|
+
let c = q();
|
|
206
|
+
N();
|
|
207
|
+
let l = c.pathname.startsWith("/auth/") || c.pathname.startsWith("/devportal") || c.pathname.startsWith("/organizations") || c.pathname.startsWith("/workspaces"), u = /* @__PURE__ */ W(E, { children: /* @__PURE__ */ W(g, { children: /* @__PURE__ */ W(_, {
|
|
182
208
|
workspaceId: null,
|
|
183
209
|
gateway: "global",
|
|
184
210
|
defaultEnabled: !0,
|
|
185
|
-
children: /* @__PURE__ */
|
|
211
|
+
children: /* @__PURE__ */ W(v, { children: /* @__PURE__ */ W(y, { children: /* @__PURE__ */ W(p, {
|
|
186
212
|
fallback: null,
|
|
187
|
-
children: /* @__PURE__ */
|
|
213
|
+
children: /* @__PURE__ */ W(F, {
|
|
188
214
|
disabled: l,
|
|
189
|
-
children: /* @__PURE__ */
|
|
215
|
+
children: /* @__PURE__ */ W(me, {
|
|
190
216
|
enablePWA: o,
|
|
191
217
|
toasterPosition: s,
|
|
192
218
|
productName: i,
|
|
@@ -196,9 +222,9 @@ function oe({ children: e, i18nProductId: t, fallbackTranslations: n, defaultBra
|
|
|
196
222
|
})
|
|
197
223
|
}) }) })
|
|
198
224
|
}) }) });
|
|
199
|
-
return /* @__PURE__ */
|
|
225
|
+
return /* @__PURE__ */ G(f, {
|
|
200
226
|
defaultBrand: r,
|
|
201
|
-
children: [/* @__PURE__ */
|
|
227
|
+
children: [/* @__PURE__ */ W(_e, {}), l ? /* @__PURE__ */ W(h, {
|
|
202
228
|
defaultLocale: "en",
|
|
203
229
|
translations: n ?? {
|
|
204
230
|
en: {},
|
|
@@ -211,17 +237,17 @@ function oe({ children: e, i18nProductId: t, fallbackTranslations: n, defaultBra
|
|
|
211
237
|
hi: {}
|
|
212
238
|
},
|
|
213
239
|
showChildrenWhileLoading: !0,
|
|
214
|
-
children:
|
|
215
|
-
}) : /* @__PURE__ */
|
|
240
|
+
children: u
|
|
241
|
+
}) : /* @__PURE__ */ W(T, {
|
|
216
242
|
i18nProductId: t,
|
|
217
243
|
fallbackTranslations: n,
|
|
218
|
-
children:
|
|
244
|
+
children: u
|
|
219
245
|
})]
|
|
220
246
|
});
|
|
221
247
|
}
|
|
222
|
-
function
|
|
223
|
-
let e =
|
|
224
|
-
return
|
|
248
|
+
function _e() {
|
|
249
|
+
let e = q();
|
|
250
|
+
return B(() => {
|
|
225
251
|
e.hash || requestAnimationFrame(() => {
|
|
226
252
|
window.scrollTo({
|
|
227
253
|
top: 0,
|
|
@@ -239,7 +265,7 @@ function se() {
|
|
|
239
265
|
e.hash
|
|
240
266
|
]), null;
|
|
241
267
|
}
|
|
242
|
-
function
|
|
268
|
+
function ve(e) {
|
|
243
269
|
if (e instanceof Error) return e.message;
|
|
244
270
|
if (typeof e == "string") return e;
|
|
245
271
|
try {
|
|
@@ -248,9 +274,9 @@ function ce(e) {
|
|
|
248
274
|
return String(e);
|
|
249
275
|
}
|
|
250
276
|
}
|
|
251
|
-
function
|
|
252
|
-
let e =
|
|
253
|
-
return
|
|
277
|
+
function ye() {
|
|
278
|
+
let e = M(), t = q(), n = H(void 0), r = H(void 0);
|
|
279
|
+
return B(() => {
|
|
254
280
|
let i = `${t.pathname}${t.search}${t.hash}`;
|
|
255
281
|
r.current !== i && (e.emit("nav.route.changed", {
|
|
256
282
|
pathname: t.pathname,
|
|
@@ -264,7 +290,7 @@ function le() {
|
|
|
264
290
|
t.hash,
|
|
265
291
|
t.pathname,
|
|
266
292
|
t.search
|
|
267
|
-
]),
|
|
293
|
+
]), B(() => {
|
|
268
294
|
let t = (t) => {
|
|
269
295
|
e.emit("error.runtime.caught", {
|
|
270
296
|
message: t.message || "Runtime error",
|
|
@@ -274,27 +300,27 @@ function le() {
|
|
|
274
300
|
errorName: t.error instanceof Error ? t.error.name : void 0
|
|
275
301
|
});
|
|
276
302
|
}, n = (t) => {
|
|
277
|
-
e.emit("error.unhandledrejection", { reason:
|
|
303
|
+
e.emit("error.unhandledrejection", { reason: ve(t.reason) });
|
|
278
304
|
};
|
|
279
305
|
return window.addEventListener("error", t), window.addEventListener("unhandledrejection", n), () => {
|
|
280
306
|
window.removeEventListener("error", t), window.removeEventListener("unhandledrejection", n);
|
|
281
307
|
};
|
|
282
|
-
}, [e]),
|
|
283
|
-
|
|
308
|
+
}, [e]), B(() => {
|
|
309
|
+
S((t) => {
|
|
284
310
|
e.emit("perf.lcp.measured", {
|
|
285
311
|
metric: "LCP",
|
|
286
312
|
value: t.value,
|
|
287
313
|
id: t.id,
|
|
288
314
|
rating: t.rating
|
|
289
315
|
});
|
|
290
|
-
}),
|
|
316
|
+
}), w((t) => {
|
|
291
317
|
e.emit("perf.cls.measured", {
|
|
292
318
|
metric: "CLS",
|
|
293
319
|
value: t.value,
|
|
294
320
|
id: t.id,
|
|
295
321
|
rating: t.rating
|
|
296
322
|
});
|
|
297
|
-
}),
|
|
323
|
+
}), C((t) => {
|
|
298
324
|
e.emit("perf.inp.measured", {
|
|
299
325
|
metric: "INP",
|
|
300
326
|
value: t.value,
|
|
@@ -304,39 +330,39 @@ function le() {
|
|
|
304
330
|
});
|
|
305
331
|
}, [e]), null;
|
|
306
332
|
}
|
|
307
|
-
function
|
|
308
|
-
return /* @__PURE__ */
|
|
309
|
-
e.devtools ? /* @__PURE__ */
|
|
310
|
-
e.broadcast === !1 ? null : /* @__PURE__ */
|
|
311
|
-
e.backendAudit?.enabled && e.backendAudit.endpoint ? /* @__PURE__ */
|
|
312
|
-
e.rybbit?.enabled && e.rybbit.siteId ? /* @__PURE__ */
|
|
333
|
+
function be({ config: e, productSlug: t }) {
|
|
334
|
+
return /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(ye, {}), e.enabled === !1 ? null : /* @__PURE__ */ G(U, { children: [
|
|
335
|
+
e.devtools ? /* @__PURE__ */ W(D, { enabled: !0 }) : null,
|
|
336
|
+
e.broadcast === !1 ? null : /* @__PURE__ */ W(O, {}),
|
|
337
|
+
e.backendAudit?.enabled && e.backendAudit.endpoint ? /* @__PURE__ */ W(k, { endpoint: e.backendAudit.endpoint }) : null,
|
|
338
|
+
e.rybbit?.enabled && e.rybbit.siteId ? /* @__PURE__ */ W(A, {
|
|
313
339
|
siteId: e.rybbit.siteId,
|
|
314
340
|
scriptUrl: e.rybbit.scriptUrl,
|
|
315
341
|
allowlist: e.rybbit.allowlist,
|
|
316
342
|
identifyOn: e.rybbit.identifyOn,
|
|
317
343
|
rename: e.rybbit.rename
|
|
318
344
|
}) : null,
|
|
319
|
-
e.otel?.enabled && e.otel.endpoint ? /* @__PURE__ */
|
|
345
|
+
e.otel?.enabled && e.otel.endpoint ? /* @__PURE__ */ W(j, {
|
|
320
346
|
endpoint: e.otel.endpoint,
|
|
321
347
|
serviceName: e.otel.serviceName ?? `${t}-app`,
|
|
322
348
|
flushInterval: e.otel.flushInterval
|
|
323
349
|
}) : null
|
|
324
350
|
] })] });
|
|
325
351
|
}
|
|
326
|
-
function
|
|
327
|
-
let { productName:
|
|
328
|
-
productName:
|
|
329
|
-
productSlug:
|
|
330
|
-
brandInitial:
|
|
331
|
-
tagline:
|
|
332
|
-
domain:
|
|
352
|
+
function xe({ config: n, children: i, clearAuthStore: a }) {
|
|
353
|
+
let { productName: f, productSlug: m = f.toLowerCase().replace(/\s+/g, ""), tagline: h = "", domain: g, i18nProductId: _, gatewayUrls: v, authBridge: y, defaultBrand: S = "default", enablePWA: C = !0, brandInitial: w = f.charAt(0), defaultGateway: T = "workspace", enableSubscriptions: E = !0, fallbackTranslations: D, queryClientOptions: O, toasterPosition: k = "bottom-right", observability: A } = n, j = A ?? $(m, pe()), M = V(() => ({
|
|
354
|
+
productName: f,
|
|
355
|
+
productSlug: m,
|
|
356
|
+
brandInitial: w,
|
|
357
|
+
tagline: h,
|
|
358
|
+
domain: g
|
|
333
359
|
}), [
|
|
360
|
+
f,
|
|
361
|
+
m,
|
|
362
|
+
w,
|
|
334
363
|
h,
|
|
335
|
-
g
|
|
336
|
-
|
|
337
|
-
_,
|
|
338
|
-
v
|
|
339
|
-
]), F = V(!1), I = V(!1), L = V(null), H = V(!!C?.url), G = R(() => {
|
|
364
|
+
g
|
|
365
|
+
]), N = H(!1), P = H(!1), F = H(null), I = H(!!y?.url), L = z(() => {
|
|
340
366
|
if ((() => {
|
|
341
367
|
try {
|
|
342
368
|
let e = sessionStorage.getItem("bf-active-profile");
|
|
@@ -346,93 +372,101 @@ function de({ config: u, children: p, clearAuthStore: m }) {
|
|
|
346
372
|
} catch {
|
|
347
373
|
return !1;
|
|
348
374
|
}
|
|
349
|
-
})() ||
|
|
350
|
-
|
|
375
|
+
})() || I.current || N.current) return;
|
|
376
|
+
N.current = !0, c(a);
|
|
351
377
|
let t = `${window.location.pathname}${window.location.search}`, n = `/auth/login?reason=session-expired&returnTo=${encodeURIComponent(t)}`, r = /^\/vibecontrols\/(share|deck)\//.test(window.location.pathname);
|
|
352
378
|
if (window.location.pathname.startsWith("/auth/") || e(window.location.pathname) || r) {
|
|
353
|
-
|
|
379
|
+
N.current = !1;
|
|
354
380
|
return;
|
|
355
381
|
}
|
|
356
382
|
window.location.replace(n);
|
|
357
|
-
}, [
|
|
358
|
-
globalBaseUrl:
|
|
359
|
-
isRefreshing:
|
|
360
|
-
refreshPromise:
|
|
361
|
-
}), [
|
|
362
|
-
window.location.pathname.startsWith("/auth/") || await
|
|
363
|
-
}, [
|
|
364
|
-
|
|
365
|
-
}, [
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
383
|
+
}, [a]), R = V(() => ({
|
|
384
|
+
globalBaseUrl: v.globalBaseUrl,
|
|
385
|
+
isRefreshing: P,
|
|
386
|
+
refreshPromise: F
|
|
387
|
+
}), [v.globalBaseUrl]), U = z(async () => s(R), [R]), q = z(async () => {
|
|
388
|
+
window.location.pathname.startsWith("/auth/") || await U() || L();
|
|
389
|
+
}, [U, L]), J = z(async (e) => {
|
|
390
|
+
l(e) ? await U() || L() : console.error("[Network] Backend unreachable:", e.message);
|
|
391
|
+
}, [U, L]), Y = z(async (e) => {
|
|
392
|
+
let t = await o({
|
|
393
|
+
gateway: "global",
|
|
394
|
+
baseUrl: v.globalBaseUrl,
|
|
395
|
+
authToken: "",
|
|
396
|
+
query: "mutation RefreshToken($token: String!) {\n refreshToken(token: $token) {\n accessToken\n refreshToken\n expiresIn\n }\n }",
|
|
397
|
+
variables: { token: e }
|
|
398
|
+
});
|
|
399
|
+
if (t.errors?.length) throw Error(t.errors[0].message ?? "Token refresh failed");
|
|
400
|
+
let n = t.data.refreshToken;
|
|
401
|
+
return {
|
|
402
|
+
accessToken: n.accessToken,
|
|
403
|
+
refreshToken: n.refreshToken,
|
|
404
|
+
expiresAt: n.expiresIn ? Date.now() + n.expiresIn * 1e3 : void 0
|
|
405
|
+
};
|
|
406
|
+
}, [v.globalBaseUrl]), X = z(() => t("organization"), []), Z = V(() => new ce({
|
|
407
|
+
queryCache: new se({ onError: (e) => {
|
|
408
|
+
r(e);
|
|
409
|
+
} }),
|
|
410
|
+
mutationCache: new oe({ onError: (e) => {
|
|
411
|
+
r(e);
|
|
412
|
+
} }),
|
|
413
|
+
defaultOptions: { queries: {
|
|
414
|
+
staleTime: O?.staleTime ?? 300 * 1e3,
|
|
415
|
+
retry: O?.retry ?? 1,
|
|
416
|
+
refetchOnWindowFocus: O?.refetchOnWindowFocus ?? !1
|
|
417
|
+
} }
|
|
418
|
+
}), [O]);
|
|
419
|
+
return B(() => {
|
|
420
|
+
let e = ee.getInstance();
|
|
421
|
+
e.getLogger("shell") || e.getLogger("shell").addTransport(new te());
|
|
422
|
+
}, []), /* @__PURE__ */ W(ie, {
|
|
423
|
+
value: M,
|
|
424
|
+
children: /* @__PURE__ */ W(ae, {
|
|
425
|
+
appName: m,
|
|
426
|
+
appVersion: j.appVersion,
|
|
427
|
+
appEnv: j.appEnv,
|
|
428
|
+
sourceMfe: m,
|
|
429
|
+
children: /* @__PURE__ */ W(p, {
|
|
430
|
+
FallbackComponent: ne,
|
|
431
|
+
children: /* @__PURE__ */ G(K, { children: [/* @__PURE__ */ W(be, {
|
|
432
|
+
config: j,
|
|
433
|
+
productSlug: m
|
|
434
|
+
}), /* @__PURE__ */ W(le, {
|
|
435
|
+
client: Z,
|
|
436
|
+
children: /* @__PURE__ */ W(x, { children: /* @__PURE__ */ W(re, {
|
|
437
|
+
workspaceBaseUrl: v.workspaceBaseUrl,
|
|
438
|
+
globalBaseUrl: v.globalBaseUrl,
|
|
439
|
+
organizationId: X,
|
|
440
|
+
defaultGateway: T,
|
|
441
|
+
enableSubscriptions: E,
|
|
442
|
+
onAuthError: q,
|
|
443
|
+
onNetworkError: J,
|
|
444
|
+
onRefreshToken: U,
|
|
445
|
+
children: /* @__PURE__ */ W(u, {
|
|
446
|
+
bridgeUrl: y?.url,
|
|
447
|
+
bridgeAllowedOrigins: y?.allowedOrigins,
|
|
448
|
+
bridgeDebug: y?.debug,
|
|
449
|
+
onRefreshToken: Y,
|
|
416
450
|
onBridgeReady: () => {
|
|
417
|
-
|
|
451
|
+
I.current = !1;
|
|
418
452
|
},
|
|
419
453
|
onSessionExpiringSoon: () => {
|
|
420
454
|
console.warn("[Auth] Session will expire in 5 minutes");
|
|
421
455
|
},
|
|
422
456
|
onTokenExpired: () => {
|
|
423
|
-
|
|
457
|
+
L();
|
|
424
458
|
},
|
|
425
|
-
children: /* @__PURE__ */
|
|
459
|
+
children: /* @__PURE__ */ W(d, {
|
|
426
460
|
syncToUrl: !0,
|
|
427
|
-
children: /* @__PURE__ */
|
|
428
|
-
i18nProductId:
|
|
429
|
-
fallbackTranslations:
|
|
430
|
-
defaultBrand:
|
|
431
|
-
productName:
|
|
432
|
-
brandInitial:
|
|
433
|
-
enablePWA:
|
|
434
|
-
toasterPosition:
|
|
435
|
-
children:
|
|
461
|
+
children: /* @__PURE__ */ W(b, { children: /* @__PURE__ */ W(ge, {
|
|
462
|
+
i18nProductId: _,
|
|
463
|
+
fallbackTranslations: D,
|
|
464
|
+
defaultBrand: S,
|
|
465
|
+
productName: f,
|
|
466
|
+
brandInitial: w,
|
|
467
|
+
enablePWA: C,
|
|
468
|
+
toasterPosition: k,
|
|
469
|
+
children: i
|
|
436
470
|
}) })
|
|
437
471
|
})
|
|
438
472
|
})
|
|
@@ -443,4 +477,4 @@ function de({ config: u, children: p, clearAuthStore: m }) {
|
|
|
443
477
|
});
|
|
444
478
|
}
|
|
445
479
|
//#endregion
|
|
446
|
-
export {
|
|
480
|
+
export { xe as AppShellProvider, $ as resolveAppShellObservabilityConfig };
|