@burdenoff/fe-libs 2026.1114.6 → 2026.1114.8
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/shared/assistant/index.d.ts +1 -0
- package/dist/shared/assistant/permissionError.js +5 -2
- package/dist/shared/assistant/profileFollowingStorage.d.ts +28 -0
- package/dist/shared/assistant/profileFollowingStorage.js +44 -0
- package/dist/shared/assistant/store.d.ts +29 -0
- package/dist/shared/assistant/store.js +91 -81
- package/dist/shared/providers/AppShellProvider.js +195 -191
- package/dist/shared/utils/backendErrors.d.ts +18 -0
- package/dist/shared/utils/backendErrors.js +128 -81
- package/dist/shared/utils/profileScopedStorage.d.ts +2 -13
- package/dist/shared/utils/profileScopedStorage.js +1 -1
- package/dist/shared-assistant.js +304 -303
- package/package.json +1 -1
|
@@ -7,57 +7,58 @@ import { MultiGatewayProvider as c } from "./shell/MultiGatewayProvider.js";
|
|
|
7
7
|
import { useIdentityQueryReset as l } from "./shell/identityQueryReset.js";
|
|
8
8
|
import { IdentityScopedQueryReset as u } from "./shell/identityScopedQueryReset.js";
|
|
9
9
|
import { WorkspaceWriteRefusedToastListener as d } from "./shell/WorkspaceWriteRefusedToastListener.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
10
|
+
import { useShellLabel as f } from "./shell/useShellLabel.js";
|
|
11
|
+
import { ActiveContextProvider as p } from "./shell/ActiveContextProvider.js";
|
|
12
|
+
import { TourPermissionsBoundary as m } from "../tours/TourPermissionsBoundary.js";
|
|
13
|
+
import { ContextManagerProvider as h } from "./shell/ContextManagerProvider.js";
|
|
14
|
+
import { ThemeProvider as g } from "./shell/ThemeProvider.js";
|
|
15
|
+
import { ProfileI18nBridge as _ } from "./shell/ProfileI18nBridge.js";
|
|
15
16
|
import { resolveBrowserDirectionMode as ee } from "./shell/directionMode.js";
|
|
16
|
-
import { ProfileGeographyBridge as
|
|
17
|
-
import { FeatureFlagsProvider as
|
|
18
|
-
import { GlobalUiProvider as
|
|
19
|
-
import { ShellUiProvider as
|
|
20
|
-
import { FeatureFlagProvider as
|
|
21
|
-
import { TourInitializer as
|
|
22
|
-
import { TourPlayerProvider as
|
|
23
|
-
import { ToursProvider as
|
|
24
|
-
import { tourRouteBootstrap as
|
|
25
|
-
import { BUILDMYIQ_RYBBIT_EVENTS as
|
|
26
|
-
import { GGNOMAD_RYBBIT_EVENTS as
|
|
17
|
+
import { ProfileGeographyBridge as v } from "./shell/ProfileGeographyBridge.js";
|
|
18
|
+
import { FeatureFlagsProvider as y } from "./shell/FeatureFlagsProvider.js";
|
|
19
|
+
import { GlobalUiProvider as b } from "./shell/GlobalUiProvider.js";
|
|
20
|
+
import { ShellUiProvider as te } from "./shell/ShellUiProvider.js";
|
|
21
|
+
import { FeatureFlagProvider as x } from "../feature-flags/FeatureFlagProvider.js";
|
|
22
|
+
import { TourInitializer as S } from "../tours/TourInitializer.js";
|
|
23
|
+
import { TourPlayerProvider as C } from "../tours/TourPlayerProvider.js";
|
|
24
|
+
import { ToursProvider as ne, useToursContext as w } from "../tours/ToursContext.js";
|
|
25
|
+
import { tourRouteBootstrap as T } from "../tours/routeBootstrap.js";
|
|
26
|
+
import { BUILDMYIQ_RYBBIT_EVENTS as E } from "../events/buildmyiq.js";
|
|
27
|
+
import { GGNOMAD_RYBBIT_EVENTS as re } from "../events/ggnomad.js";
|
|
27
28
|
import { ErrorFallback as ie } from "../components/ErrorFallback.js";
|
|
28
|
-
import { TIMECAMPUS_RYBBIT_EVENTS as
|
|
29
|
-
import { THECULTUREPOST_RYBBIT_EVENTS as
|
|
30
|
-
import { FLUIDGRIDS_RYBBIT_EVENTS as
|
|
29
|
+
import { TIMECAMPUS_RYBBIT_EVENTS as ae } from "../events/timecampus.js";
|
|
30
|
+
import { THECULTUREPOST_RYBBIT_EVENTS as D } from "../events/theculturepost.js";
|
|
31
|
+
import { FLUIDGRIDS_RYBBIT_EVENTS as oe } from "../events/fluidgrids.js";
|
|
31
32
|
import { DevtoolsSink as O } from "../events/sinks/DevtoolsSink.js";
|
|
32
33
|
import { BroadcastChannelSink as k } from "../events/sinks/BroadcastChannelSink.js";
|
|
33
34
|
import { BackendAuditSink as A } from "../events/sinks/BackendAuditSink.js";
|
|
34
|
-
import { OtelBrowserSink as
|
|
35
|
-
import { emitProductSlug as se, legacyProductSlug as
|
|
35
|
+
import { OtelBrowserSink as j } from "../events/sinks/OtelBrowserSink.js";
|
|
36
|
+
import { emitProductSlug as se, legacyProductSlug as M } from "../config/productSlug.js";
|
|
36
37
|
import { setAssistantProductId as ce } from "../assistant/productContext.js";
|
|
37
|
-
import { PWAInstallBanner as
|
|
38
|
-
import { DesktopUpdateToast as
|
|
39
|
-
import { EventBusProvider as
|
|
40
|
-
import { AnalyticsConsentBanner as
|
|
41
|
-
import { SEMANTICFED_ANALYTICS_ROUTES as
|
|
42
|
-
import { COMRADECIRCLE_ANALYTICS_ROUTES as
|
|
38
|
+
import { PWAInstallBanner as le } from "../components/PWAInstallBanner.js";
|
|
39
|
+
import { DesktopUpdateToast as ue } from "../components/DesktopUpdateToast.js";
|
|
40
|
+
import { EventBusProvider as de, useEventBus as fe } from "../../shared-events.js";
|
|
41
|
+
import { AnalyticsConsentBanner as pe, DEFAULT_RYBBIT_ALLOWLIST as me, RybbitSink as he } from "../events/sinks/RybbitSink.js";
|
|
42
|
+
import { SEMANTICFED_ANALYTICS_ROUTES as N, SEMANTICFED_RYBBIT_EVENTS as ge } from "../events/semanticfed.js";
|
|
43
|
+
import { COMRADECIRCLE_ANALYTICS_ROUTES as P, COMRADECIRCLE_RYBBIT_EVENTS as F } from "../events/comradecircle.js";
|
|
43
44
|
import { ATHELETEBRIDGE_ANALYTICS_ROUTES as I, ATHELETEBRIDGE_RYBBIT_EVENTS as L } from "../events/atheletebridge.js";
|
|
44
|
-
import { attemptTokenRefresh as
|
|
45
|
-
import { SESSION_EXPIRED_EVENT as R, graphqlFetch as
|
|
46
|
-
import { AppShellContextProvider as
|
|
45
|
+
import { attemptTokenRefresh as _e, clearAuthSessionStorage as ve, getSharedTokenRefreshRefs as ye, isAuthNetworkError as be } from "../utils/authErrorHandling.js";
|
|
46
|
+
import { SESSION_EXPIRED_EVENT as R, graphqlFetch as xe } from "../graphql/fetch.js";
|
|
47
|
+
import { AppShellContextProvider as Se } from "./shell/AppShellContext.js";
|
|
47
48
|
import { useReferralAttribution as z } from "../hooks/useReferralAttribution.js";
|
|
48
|
-
import { ConsoleTransport as
|
|
49
|
-
import { LogManager as
|
|
49
|
+
import { ConsoleTransport as Ce } from "../logger/ConsoleTransport.js";
|
|
50
|
+
import { LogManager as we } from "../logger/LogManager.js";
|
|
50
51
|
import { isShellLessRoute as B } from "../config/shellRoutes.js";
|
|
51
|
-
import { useRegisterTourRouteCatalog as
|
|
52
|
-
import { BACKEND_ERROR_EVENT as V, CONNECTION_STATUS_EVENT as H, dispatchBackendErrorEvent as
|
|
53
|
-
import { usePushDeviceRegistration as
|
|
54
|
-
import { Suspense as
|
|
55
|
-
import { Fragment as
|
|
56
|
-
import { BrowserRouter as
|
|
57
|
-
import { Toaster as
|
|
58
|
-
import { MutationCache as
|
|
52
|
+
import { useRegisterTourRouteCatalog as Te } from "../tours/useTourRouteCatalog.js";
|
|
53
|
+
import { BACKEND_ERROR_EVENT as V, CONNECTION_STATUS_EVENT as H, dispatchBackendErrorEvent as Ee, getBackendErrorToastDedupe as De, isBackendErrorDisplay as Oe, shouldToastBackendError as U } from "../utils/backendErrors.js";
|
|
54
|
+
import { usePushDeviceRegistration as W } from "../hooks/usePushDeviceRegistration.js";
|
|
55
|
+
import { Suspense as ke, useCallback as G, useEffect as K, useMemo as q, useRef as J, useState as Ae } from "react";
|
|
56
|
+
import { Fragment as je, jsx as Y, jsxs as X } from "react/jsx-runtime";
|
|
57
|
+
import { BrowserRouter as Me, useLocation as Z } from "react-router";
|
|
58
|
+
import { Toaster as Ne, toast as Q } from "sonner";
|
|
59
|
+
import { MutationCache as Pe, QueryCache as Fe, QueryClient as Ie, QueryClientProvider as Le } from "@tanstack/react-query";
|
|
59
60
|
// src/shared/providers/AppShellProvider.tsx
|
|
60
|
-
var
|
|
61
|
+
var Re = {
|
|
61
62
|
artistrybase: { prod: "cfbecacb6002" },
|
|
62
63
|
atheletebridge: { prod: "c34c6ead7aa8" },
|
|
63
64
|
adaptercloud: {},
|
|
@@ -86,7 +87,7 @@ var Le = {
|
|
|
86
87
|
subscriberbot: {},
|
|
87
88
|
intelwatchtower: {},
|
|
88
89
|
kadaikodi: {}
|
|
89
|
-
},
|
|
90
|
+
}, ze = [
|
|
90
91
|
"nav.route.changed",
|
|
91
92
|
"auth.signed_in",
|
|
92
93
|
"auth.signed_out",
|
|
@@ -129,10 +130,10 @@ var Le = {
|
|
|
129
130
|
"coolandlovely.wardrobe.item_added",
|
|
130
131
|
"coolandlovely.search.performed",
|
|
131
132
|
"vibecontrols.agent.registered",
|
|
133
|
+
...oe,
|
|
134
|
+
...E,
|
|
132
135
|
...D,
|
|
133
|
-
...
|
|
134
|
-
...ae,
|
|
135
|
-
...T,
|
|
136
|
+
...re,
|
|
136
137
|
...L,
|
|
137
138
|
"vibecontrols.agent.gateway_auth_setup",
|
|
138
139
|
"vibecontrols.session.created",
|
|
@@ -309,7 +310,7 @@ var Le = {
|
|
|
309
310
|
"labsofscience.pipeline.run_started",
|
|
310
311
|
"hookmovies.page.viewed",
|
|
311
312
|
"headshotmarketing.page.viewed",
|
|
312
|
-
...
|
|
313
|
+
...ae,
|
|
313
314
|
"kadaikodi.page.viewed",
|
|
314
315
|
"kadaikodi.discover.viewed",
|
|
315
316
|
"kadaikodi.discover.searched",
|
|
@@ -329,7 +330,7 @@ var Le = {
|
|
|
329
330
|
"project.created",
|
|
330
331
|
"workspace-member.added",
|
|
331
332
|
"project-member.added"
|
|
332
|
-
],
|
|
333
|
+
], Be = {
|
|
333
334
|
"--success-bg": "var(--color-status-success-bgSubtle)",
|
|
334
335
|
"--success-border": "var(--color-status-success-border)",
|
|
335
336
|
"--success-text": "var(--color-status-success-text)",
|
|
@@ -343,7 +344,7 @@ var Le = {
|
|
|
343
344
|
"--error-border": "var(--color-status-error-border)",
|
|
344
345
|
"--error-text": "var(--color-status-error-text)"
|
|
345
346
|
};
|
|
346
|
-
function
|
|
347
|
+
function Ve(e) {
|
|
347
348
|
let t = e.technicalMessage ?? e.extensions?.technicalMessage, n = {
|
|
348
349
|
code: e.code,
|
|
349
350
|
operationName: e.operationName,
|
|
@@ -355,13 +356,13 @@ function Be(e) {
|
|
|
355
356
|
};
|
|
356
357
|
console.error("[Burdenoff backend error]", e.message, n);
|
|
357
358
|
}
|
|
358
|
-
function
|
|
359
|
+
function He(e) {
|
|
359
360
|
return e === "prod" || e === "production" ? "prod" : e === "alpha" || e === "staging" ? "alpha" : "dev";
|
|
360
361
|
}
|
|
361
|
-
function
|
|
362
|
+
function Ue(e, t) {
|
|
362
363
|
return e.VITE_DISABLE_ANALYTICS === "true" ? !1 : e.VITE_ENABLE_ANALYTICS === "true" || e.PROD || t !== "dev" ? !0 : e.VITE_ENABLE_ANALYTICS !== "false";
|
|
363
364
|
}
|
|
364
|
-
function
|
|
365
|
+
function We() {
|
|
365
366
|
return {
|
|
366
367
|
BASE_URL: "/",
|
|
367
368
|
DEV: !1,
|
|
@@ -370,9 +371,9 @@ function Ue() {
|
|
|
370
371
|
SSR: !1
|
|
371
372
|
};
|
|
372
373
|
}
|
|
373
|
-
function
|
|
374
|
+
function Ge(e, t) {
|
|
374
375
|
if (!t || t.length === 0 || !e.rybbit) return e;
|
|
375
|
-
let n = e.rybbit.allowlist ??
|
|
376
|
+
let n = e.rybbit.allowlist ?? me, r = [.../* @__PURE__ */ new Set([...n, ...t])];
|
|
376
377
|
return {
|
|
377
378
|
...e,
|
|
378
379
|
rybbit: {
|
|
@@ -381,22 +382,22 @@ function We(e, t) {
|
|
|
381
382
|
}
|
|
382
383
|
};
|
|
383
384
|
}
|
|
384
|
-
var
|
|
385
|
+
var Ke = {
|
|
385
386
|
comradecircle: {
|
|
386
|
-
routes:
|
|
387
|
+
routes: P,
|
|
387
388
|
events: F
|
|
388
389
|
},
|
|
389
390
|
semanticfed: {
|
|
390
|
-
routes:
|
|
391
|
-
events:
|
|
391
|
+
routes: N,
|
|
392
|
+
events: ge
|
|
392
393
|
},
|
|
393
394
|
atheletebridge: {
|
|
394
395
|
routes: I,
|
|
395
396
|
events: L
|
|
396
397
|
}
|
|
397
398
|
};
|
|
398
|
-
function
|
|
399
|
-
let n =
|
|
399
|
+
function qe(e, t) {
|
|
400
|
+
let n = He(t.VITE_DEPLOY_ENV ?? t.MODE), r = Ue(t, n), i = Re[e] ?? Re[M(e)], a = n === "prod" ? i?.prod : i?.nonProd, o = t.VITE_RYBBIT_SITE_ID || a, s = Ke[e], c = t.VITE_BACKEND_AUDIT_ENDPOINT || (t.PROD ? "/api/fe-events" : void 0);
|
|
400
401
|
return {
|
|
401
402
|
enabled: r,
|
|
402
403
|
appVersion: t.VITE_APP_VERSION || "0.0.0",
|
|
@@ -409,7 +410,7 @@ function Ke(e, t) {
|
|
|
409
410
|
scriptUrl: t.VITE_RYBBIT_SCRIPT_URL,
|
|
410
411
|
eventEndpoint: s ? "https://app.rybbit.io/api/track" : void 0,
|
|
411
412
|
routeTemplates: s?.routes,
|
|
412
|
-
allowlist: s ? [...s.events] :
|
|
413
|
+
allowlist: s ? [...s.events] : ze,
|
|
413
414
|
identifyOn: "auth.signed_in",
|
|
414
415
|
rename: { "nav.route.changed": "pageview" }
|
|
415
416
|
},
|
|
@@ -424,8 +425,8 @@ function Ke(e, t) {
|
|
|
424
425
|
}
|
|
425
426
|
};
|
|
426
427
|
}
|
|
427
|
-
function
|
|
428
|
-
let { trackProgress: a, recordStepCompletion: o, trackEvent: s, progressScopeKey: c } =
|
|
428
|
+
function Je({ children: e, enablePWA: t, toasterPosition: n, productName: r, brandInitial: i }) {
|
|
429
|
+
let { trackProgress: a, recordStepCompletion: o, trackEvent: s, progressScopeKey: c } = w(), l = G((e, t) => e.steps?.[t], []), u = G((e) => {
|
|
429
430
|
a(e.id, "started"), s("TOUR_STARTED", e.id);
|
|
430
431
|
}, [s, a]), f = G((e) => {
|
|
431
432
|
a(e.id, "completed"), s("TOUR_COMPLETED", e.id);
|
|
@@ -456,7 +457,7 @@ function qe({ children: e, enablePWA: t, toasterPosition: n, productName: r, bra
|
|
|
456
457
|
o,
|
|
457
458
|
s
|
|
458
459
|
]);
|
|
459
|
-
return /* @__PURE__ */ X(
|
|
460
|
+
return /* @__PURE__ */ X(C, {
|
|
460
461
|
scopeKey: c,
|
|
461
462
|
onTourStart: u,
|
|
462
463
|
onTourComplete: f,
|
|
@@ -464,21 +465,21 @@ function qe({ children: e, enablePWA: t, toasterPosition: n, productName: r, bra
|
|
|
464
465
|
onStepChange: m,
|
|
465
466
|
onStepComplete: h,
|
|
466
467
|
children: [
|
|
467
|
-
/* @__PURE__ */ Y(
|
|
468
|
+
/* @__PURE__ */ Y(S, {}),
|
|
468
469
|
e,
|
|
469
|
-
/* @__PURE__ */ Y(
|
|
470
|
+
/* @__PURE__ */ Y(Ye, {}),
|
|
470
471
|
/* @__PURE__ */ Y(d, {}),
|
|
471
|
-
/* @__PURE__ */ Y(
|
|
472
|
-
/* @__PURE__ */ Y(
|
|
472
|
+
/* @__PURE__ */ Y(Ze, {}),
|
|
473
|
+
/* @__PURE__ */ Y(Ne, {
|
|
473
474
|
position: n,
|
|
474
475
|
richColors: !0,
|
|
475
476
|
closeButton: !0,
|
|
476
|
-
style:
|
|
477
|
+
style: Be
|
|
477
478
|
}),
|
|
478
|
-
/* @__PURE__ */ Y(
|
|
479
|
-
t && /* @__PURE__ */ Y(
|
|
479
|
+
/* @__PURE__ */ Y(ue, {}),
|
|
480
|
+
t && /* @__PURE__ */ Y(ke, {
|
|
480
481
|
fallback: null,
|
|
481
|
-
children: /* @__PURE__ */ Y(
|
|
482
|
+
children: /* @__PURE__ */ Y(le, {
|
|
482
483
|
productName: r,
|
|
483
484
|
brandInitial: i
|
|
484
485
|
})
|
|
@@ -486,24 +487,27 @@ function qe({ children: e, enablePWA: t, toasterPosition: n, productName: r, bra
|
|
|
486
487
|
]
|
|
487
488
|
});
|
|
488
489
|
}
|
|
489
|
-
function
|
|
490
|
-
let e = J(null);
|
|
490
|
+
function Ye() {
|
|
491
|
+
let e = J(null), t = f();
|
|
491
492
|
return K(() => {
|
|
492
|
-
let
|
|
493
|
-
let
|
|
494
|
-
if (!
|
|
495
|
-
|
|
496
|
-
let { key:
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
493
|
+
let n = (n) => {
|
|
494
|
+
let r = n instanceof CustomEvent && Oe(n.detail) ? n.detail : null;
|
|
495
|
+
if (!U(r)) return;
|
|
496
|
+
Ve(r);
|
|
497
|
+
let { key: i, windowMs: a } = De(r), o = Date.now(), s = e.current;
|
|
498
|
+
if (s?.key === i && o - s.shownAt < a) return;
|
|
499
|
+
e.current = {
|
|
500
|
+
key: i,
|
|
501
|
+
shownAt: o
|
|
502
|
+
};
|
|
503
|
+
let c = r.messageKey ? t(r.messageKey, r.message) : r.message;
|
|
504
|
+
Q.error(c, { duration: 7e3 });
|
|
501
505
|
};
|
|
502
|
-
return window.addEventListener(V,
|
|
503
|
-
}, []), null;
|
|
506
|
+
return window.addEventListener(V, n), () => window.removeEventListener(V, n);
|
|
507
|
+
}, [t]), null;
|
|
504
508
|
}
|
|
505
|
-
var $ = "burdenoff-connection-status",
|
|
506
|
-
function
|
|
509
|
+
var $ = "burdenoff-connection-status", Xe = 1500;
|
|
510
|
+
function Ze() {
|
|
507
511
|
let e = J(null), t = J(!1);
|
|
508
512
|
return K(() => {
|
|
509
513
|
let n = () => {
|
|
@@ -514,7 +518,7 @@ function Xe() {
|
|
|
514
518
|
}, r = () => {
|
|
515
519
|
t.current || e.current || (e.current = setTimeout(() => {
|
|
516
520
|
e.current = null, n();
|
|
517
|
-
},
|
|
521
|
+
}, Xe));
|
|
518
522
|
}, i = (n) => {
|
|
519
523
|
e.current &&= (clearTimeout(e.current), null), t.current ? (t.current = !1, n ? Q.success("Back online", {
|
|
520
524
|
id: $,
|
|
@@ -532,51 +536,51 @@ function Xe() {
|
|
|
532
536
|
};
|
|
533
537
|
}, []), null;
|
|
534
538
|
}
|
|
535
|
-
function
|
|
536
|
-
return
|
|
539
|
+
function Qe() {
|
|
540
|
+
return W(), null;
|
|
537
541
|
}
|
|
538
|
-
function
|
|
542
|
+
function $e({ children: t, i18nProductId: n, platformI18nProductId: r, directionMode: i, fallbackTranslations: a, defaultBrand: o, defaultMode: s, defaultDensity: c, defaultTypography: l, defaultGlass: u, productName: d, brandInitial: f, enablePWA: p, toasterPosition: h, tourPageIdFromPath: ee, enableWorkspaceTourPermissions: S }) {
|
|
539
543
|
let C = Z();
|
|
540
544
|
z();
|
|
541
|
-
let w =
|
|
545
|
+
let w = T(C.pathname, !!S), E = /* @__PURE__ */ Y(v, { children: /* @__PURE__ */ Y(y, { children: /* @__PURE__ */ Y(x, {
|
|
542
546
|
workspaceId: null,
|
|
543
547
|
gateway: "global",
|
|
544
548
|
defaultEnabled: !0,
|
|
545
|
-
children: /* @__PURE__ */ Y(
|
|
549
|
+
children: /* @__PURE__ */ Y(b, { children: /* @__PURE__ */ Y(te, { children: /* @__PURE__ */ Y(e, {
|
|
546
550
|
fallback: null,
|
|
547
|
-
children: /* @__PURE__ */ Y(
|
|
551
|
+
children: /* @__PURE__ */ Y(m, {
|
|
548
552
|
enabled: w.workspacePermissions,
|
|
549
|
-
children: /* @__PURE__ */ Y(
|
|
553
|
+
children: /* @__PURE__ */ Y(ne, {
|
|
550
554
|
requireWorkspace: w.requireWorkspace,
|
|
551
555
|
disabled: w.toursDisabled,
|
|
552
|
-
getPageIdFromPath:
|
|
553
|
-
children: /* @__PURE__ */ X(
|
|
554
|
-
enablePWA:
|
|
555
|
-
toasterPosition:
|
|
556
|
+
getPageIdFromPath: ee,
|
|
557
|
+
children: /* @__PURE__ */ X(Je, {
|
|
558
|
+
enablePWA: p,
|
|
559
|
+
toasterPosition: h,
|
|
556
560
|
productName: d,
|
|
557
561
|
brandInitial: f,
|
|
558
|
-
children: [/* @__PURE__ */ Y(
|
|
562
|
+
children: [/* @__PURE__ */ Y(Qe, {}), t]
|
|
559
563
|
})
|
|
560
564
|
})
|
|
561
565
|
})
|
|
562
566
|
}) }) })
|
|
563
567
|
}) }) });
|
|
564
|
-
return /* @__PURE__ */ X(
|
|
568
|
+
return /* @__PURE__ */ X(g, {
|
|
565
569
|
defaultBrand: o,
|
|
566
570
|
defaultMode: s,
|
|
567
571
|
defaultDensity: c,
|
|
568
572
|
defaultTypography: l,
|
|
569
573
|
defaultGlass: u,
|
|
570
|
-
children: [/* @__PURE__ */ Y(
|
|
574
|
+
children: [/* @__PURE__ */ Y(et, {}), /* @__PURE__ */ Y(_, {
|
|
571
575
|
i18nProductId: n,
|
|
572
576
|
platformI18nProductId: r,
|
|
573
577
|
directionMode: i,
|
|
574
578
|
fallbackTranslations: a,
|
|
575
|
-
children:
|
|
579
|
+
children: E
|
|
576
580
|
})]
|
|
577
581
|
});
|
|
578
582
|
}
|
|
579
|
-
function
|
|
583
|
+
function et() {
|
|
580
584
|
let e = Z();
|
|
581
585
|
return K(() => {
|
|
582
586
|
e.hash || requestAnimationFrame(() => {
|
|
@@ -596,7 +600,7 @@ function $e() {
|
|
|
596
600
|
e.hash
|
|
597
601
|
]), null;
|
|
598
602
|
}
|
|
599
|
-
function
|
|
603
|
+
function tt(e) {
|
|
600
604
|
if (e instanceof Error) return e.message;
|
|
601
605
|
if (typeof e == "string") return e;
|
|
602
606
|
try {
|
|
@@ -605,8 +609,8 @@ function et(e) {
|
|
|
605
609
|
return String(e);
|
|
606
610
|
}
|
|
607
611
|
}
|
|
608
|
-
function
|
|
609
|
-
let e =
|
|
612
|
+
function nt() {
|
|
613
|
+
let e = fe(), a = Z(), o = J(void 0), s = J(void 0), c = J(null);
|
|
610
614
|
return K(() => {
|
|
611
615
|
let t = `${a.pathname}${a.search}${a.hash}`;
|
|
612
616
|
if (s.current !== t) return c.current && clearTimeout(c.current), c.current = setTimeout(() => {
|
|
@@ -637,7 +641,7 @@ function tt() {
|
|
|
637
641
|
errorName: t.error instanceof Error ? t.error.name : void 0
|
|
638
642
|
});
|
|
639
643
|
}, n = (t) => {
|
|
640
|
-
e.emit("error.unhandledrejection", { reason:
|
|
644
|
+
e.emit("error.unhandledrejection", { reason: tt(t.reason) });
|
|
641
645
|
};
|
|
642
646
|
return window.addEventListener("error", t), window.addEventListener("unhandledrejection", n), () => {
|
|
643
647
|
window.removeEventListener("error", t), window.removeEventListener("unhandledrejection", n);
|
|
@@ -674,19 +678,19 @@ function tt() {
|
|
|
674
678
|
});
|
|
675
679
|
}, [e]), null;
|
|
676
680
|
}
|
|
677
|
-
function
|
|
681
|
+
function rt({ config: e, productSlug: t, productName: n, privacyConsent: r, privacyConsentReopen: i, consentRouteDenylist: a, rybbitSkipRoutes: o }) {
|
|
678
682
|
let { pathname: s } = Z(), c = B(s) || a?.(s) === !0;
|
|
679
|
-
return /* @__PURE__ */ X(
|
|
680
|
-
/* @__PURE__ */ Y(
|
|
681
|
-
r && !c ? /* @__PURE__ */ Y(
|
|
683
|
+
return /* @__PURE__ */ X(je, { children: [
|
|
684
|
+
/* @__PURE__ */ Y(nt, {}),
|
|
685
|
+
r && !c ? /* @__PURE__ */ Y(pe, {
|
|
682
686
|
productName: n,
|
|
683
687
|
reopenable: i
|
|
684
688
|
}) : null,
|
|
685
|
-
e.enabled === !1 ? null : /* @__PURE__ */ X(
|
|
689
|
+
e.enabled === !1 ? null : /* @__PURE__ */ X(je, { children: [
|
|
686
690
|
e.devtools ? /* @__PURE__ */ Y(O, { enabled: !0 }) : null,
|
|
687
691
|
e.broadcast === !1 ? null : /* @__PURE__ */ Y(k, {}),
|
|
688
692
|
e.backendAudit?.enabled && e.backendAudit.endpoint ? /* @__PURE__ */ Y(A, { endpoint: e.backendAudit.endpoint }) : null,
|
|
689
|
-
e.rybbit?.enabled && e.rybbit.siteId ? /* @__PURE__ */ Y(
|
|
693
|
+
e.rybbit?.enabled && e.rybbit.siteId ? /* @__PURE__ */ Y(he, {
|
|
690
694
|
siteId: e.rybbit.siteId,
|
|
691
695
|
scriptUrl: e.rybbit.scriptUrl,
|
|
692
696
|
eventEndpoint: e.rybbit.eventEndpoint,
|
|
@@ -697,7 +701,7 @@ function nt({ config: e, productSlug: t, productName: n, privacyConsent: r, priv
|
|
|
697
701
|
skipRoutes: o,
|
|
698
702
|
pathname: s
|
|
699
703
|
}) : null,
|
|
700
|
-
e.otel?.enabled && e.otel.endpoint ? /* @__PURE__ */ Y(
|
|
704
|
+
e.otel?.enabled && e.otel.endpoint ? /* @__PURE__ */ Y(j, {
|
|
701
705
|
endpoint: e.otel.endpoint,
|
|
702
706
|
serviceName: e.otel.serviceName ?? `${t}-app`,
|
|
703
707
|
flushInterval: e.otel.flushInterval
|
|
@@ -705,29 +709,29 @@ function nt({ config: e, productSlug: t, productName: n, privacyConsent: r, priv
|
|
|
705
709
|
] })
|
|
706
710
|
] });
|
|
707
711
|
}
|
|
708
|
-
function
|
|
709
|
-
let { productName: i, productSlug: d = i.toLowerCase().replace(/\s+/g, ""), tagline:
|
|
710
|
-
|
|
711
|
-
let [
|
|
712
|
-
enabled:
|
|
713
|
-
allowPreview:
|
|
714
|
-
})),
|
|
715
|
-
|
|
712
|
+
function it({ config: t, children: n, clearAuthStore: r }) {
|
|
713
|
+
let { productName: i, productSlug: d = i.toLowerCase().replace(/\s+/g, ""), tagline: f = "", domain: m, i18nProductId: g, platformI18nProductId: _, rtl: v, gatewayUrls: y, authBridge: b, defaultBrand: te = "default", defaultMode: x, defaultDensity: S, defaultTypography: C, defaultGlass: ne, enablePWA: w = !0, brandInitial: T = i.charAt(0), defaultGateway: E = "workspace", enableSubscriptions: re = !0, fallbackTranslations: ae, queryClientOptions: D, toasterPosition: oe = "bottom-right", observability: O, privacyConsent: k = !1, privacyConsentReopen: A = !1, consentRouteDenylist: j, rybbitEvents: M, rybbitSkipRoutes: le, tourPageIdFromPath: ue, tourRouteCatalog: fe, enableWorkspaceTourPermissions: pe = !1, workspaceOperationGuard: me = "off" } = t;
|
|
714
|
+
Te(d, fe), K(() => ce(se(d)), [d]);
|
|
715
|
+
let [he] = Ae(() => ee({
|
|
716
|
+
enabled: v?.enabled,
|
|
717
|
+
allowPreview: v?.preview
|
|
718
|
+
})), N = q(() => Ge(O ?? qe(d, We()), M), [
|
|
719
|
+
O,
|
|
716
720
|
d,
|
|
717
721
|
M
|
|
718
|
-
]),
|
|
722
|
+
]), ge = q(() => ({
|
|
719
723
|
productName: i,
|
|
720
724
|
productSlug: d,
|
|
721
|
-
brandInitial:
|
|
722
|
-
tagline:
|
|
723
|
-
domain:
|
|
725
|
+
brandInitial: T,
|
|
726
|
+
tagline: f,
|
|
727
|
+
domain: m
|
|
724
728
|
}), [
|
|
725
729
|
i,
|
|
726
730
|
d,
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
]),
|
|
731
|
+
T,
|
|
732
|
+
f,
|
|
733
|
+
m
|
|
734
|
+
]), P = J(!1), F = J(!!b?.url), I = G((e) => {
|
|
731
735
|
if (!e?.force && (() => {
|
|
732
736
|
try {
|
|
733
737
|
let e = sessionStorage.getItem("bf-active-profile");
|
|
@@ -737,21 +741,21 @@ function rt({ config: t, children: n, clearAuthStore: r }) {
|
|
|
737
741
|
} catch {
|
|
738
742
|
return !1;
|
|
739
743
|
}
|
|
740
|
-
})() ||
|
|
741
|
-
|
|
744
|
+
})() || F.current || P.current) return;
|
|
745
|
+
P.current = !0, ve(r);
|
|
742
746
|
let t = `${window.location.pathname}${window.location.search}`, n = `/auth/login?reason=session-expired&returnTo=${encodeURIComponent(t)}`, i = /^\/vibecontrols\/(share|deck)\//.test(window.location.pathname);
|
|
743
|
-
window.location.pathname.startsWith("/auth/") || B(window.location.pathname) || i ?
|
|
744
|
-
}, [r]),
|
|
745
|
-
globalBaseUrl:
|
|
746
|
-
...
|
|
747
|
-
}), [
|
|
748
|
-
window.location.pathname.startsWith("/auth/") || await
|
|
749
|
-
}, [
|
|
750
|
-
|
|
751
|
-
}, [
|
|
752
|
-
let t = await
|
|
747
|
+
window.location.pathname.startsWith("/auth/") || B(window.location.pathname) || i ? P.current = !1 : window.location.replace(n);
|
|
748
|
+
}, [r]), L = q(() => ({
|
|
749
|
+
globalBaseUrl: y.globalBaseUrl,
|
|
750
|
+
...ye()
|
|
751
|
+
}), [y.globalBaseUrl]), z = G(async () => _e(L), [L]), V = G(async () => {
|
|
752
|
+
window.location.pathname.startsWith("/auth/") || await z() || I({ force: !0 });
|
|
753
|
+
}, [z, I]), H = G(async (e) => {
|
|
754
|
+
be(e) ? await z() || I({ force: !0 }) : console.error("[Network] Backend unreachable:", e.message);
|
|
755
|
+
}, [z, I]), De = G(async (e) => {
|
|
756
|
+
let t = await xe({
|
|
753
757
|
gateway: "global",
|
|
754
|
-
baseUrl:
|
|
758
|
+
baseUrl: y.globalBaseUrl,
|
|
755
759
|
authToken: "",
|
|
756
760
|
query: "mutation RefreshToken($token: String!) {\n refreshToken(token: $token) {\n accessToken\n refreshToken\n expiresIn\n }\n }",
|
|
757
761
|
variables: { token: e }
|
|
@@ -763,17 +767,17 @@ function rt({ config: t, children: n, clearAuthStore: r }) {
|
|
|
763
767
|
refreshToken: n.refreshToken,
|
|
764
768
|
expiresAt: n.expiresIn ? Date.now() + n.expiresIn * 1e3 : void 0
|
|
765
769
|
};
|
|
766
|
-
}, [
|
|
767
|
-
let e = new
|
|
768
|
-
queryCache: new
|
|
769
|
-
|
|
770
|
+
}, [y.globalBaseUrl]), Oe = G(() => s("organization"), []), U = q(() => {
|
|
771
|
+
let e = new Ie({
|
|
772
|
+
queryCache: new Fe({ onError: (e) => {
|
|
773
|
+
Ee(e);
|
|
770
774
|
} }),
|
|
771
|
-
mutationCache: new
|
|
775
|
+
mutationCache: new Pe({
|
|
772
776
|
onSuccess: () => {
|
|
773
777
|
e.invalidateQueries();
|
|
774
778
|
},
|
|
775
779
|
onError: (e) => {
|
|
776
|
-
|
|
780
|
+
Ee(e);
|
|
777
781
|
}
|
|
778
782
|
}),
|
|
779
783
|
defaultOptions: { queries: {
|
|
@@ -786,77 +790,77 @@ function rt({ config: t, children: n, clearAuthStore: r }) {
|
|
|
786
790
|
}, [D]), W = l(U);
|
|
787
791
|
return K(() => {
|
|
788
792
|
let e = () => {
|
|
789
|
-
|
|
793
|
+
I({ force: !0 });
|
|
790
794
|
};
|
|
791
795
|
return window.addEventListener(R, e), () => {
|
|
792
796
|
window.removeEventListener(R, e);
|
|
793
797
|
};
|
|
794
|
-
}, [
|
|
795
|
-
let e =
|
|
796
|
-
e.getLogger("shell") || e.getLogger("shell").addTransport(new
|
|
797
|
-
}, []), /* @__PURE__ */ Y(
|
|
798
|
-
value:
|
|
799
|
-
children: /* @__PURE__ */ Y(
|
|
798
|
+
}, [I]), K(() => {
|
|
799
|
+
let e = we.getInstance();
|
|
800
|
+
e.getLogger("shell") || e.getLogger("shell").addTransport(new Ce());
|
|
801
|
+
}, []), /* @__PURE__ */ Y(Se, {
|
|
802
|
+
value: ge,
|
|
803
|
+
children: /* @__PURE__ */ Y(de, {
|
|
800
804
|
appName: d,
|
|
801
|
-
appVersion:
|
|
802
|
-
appEnv:
|
|
805
|
+
appVersion: N.appVersion,
|
|
806
|
+
appEnv: N.appEnv,
|
|
803
807
|
sourceMfe: d,
|
|
804
808
|
children: /* @__PURE__ */ Y(e, {
|
|
805
809
|
FallbackComponent: ie,
|
|
806
|
-
children: /* @__PURE__ */ X(
|
|
807
|
-
config:
|
|
810
|
+
children: /* @__PURE__ */ X(Me, { children: [/* @__PURE__ */ Y(rt, {
|
|
811
|
+
config: N,
|
|
808
812
|
productSlug: d,
|
|
809
813
|
productName: i,
|
|
810
|
-
privacyConsent:
|
|
811
|
-
privacyConsentReopen:
|
|
814
|
+
privacyConsent: k,
|
|
815
|
+
privacyConsentReopen: A,
|
|
812
816
|
consentRouteDenylist: j,
|
|
813
|
-
rybbitSkipRoutes:
|
|
814
|
-
}), /* @__PURE__ */ Y(
|
|
817
|
+
rybbitSkipRoutes: le
|
|
818
|
+
}), /* @__PURE__ */ Y(Le, {
|
|
815
819
|
client: U,
|
|
816
820
|
children: /* @__PURE__ */ Y(o, { children: /* @__PURE__ */ Y(c, {
|
|
817
|
-
workspaceBaseUrl:
|
|
818
|
-
globalBaseUrl:
|
|
821
|
+
workspaceBaseUrl: y.workspaceBaseUrl,
|
|
822
|
+
globalBaseUrl: y.globalBaseUrl,
|
|
819
823
|
organizationId: Oe,
|
|
820
824
|
productSlug: d,
|
|
821
|
-
defaultGateway:
|
|
822
|
-
enableSubscriptions:
|
|
823
|
-
onAuthError:
|
|
824
|
-
onNetworkError:
|
|
825
|
-
onRefreshToken:
|
|
826
|
-
workspaceOperationGuard:
|
|
825
|
+
defaultGateway: E,
|
|
826
|
+
enableSubscriptions: re,
|
|
827
|
+
onAuthError: V,
|
|
828
|
+
onNetworkError: H,
|
|
829
|
+
onRefreshToken: z,
|
|
830
|
+
workspaceOperationGuard: me,
|
|
827
831
|
children: /* @__PURE__ */ X(a, {
|
|
828
|
-
bridgeUrl:
|
|
829
|
-
bridgeAllowedOrigins:
|
|
830
|
-
bridgeDebug:
|
|
832
|
+
bridgeUrl: b?.url,
|
|
833
|
+
bridgeAllowedOrigins: b?.allowedOrigins,
|
|
834
|
+
bridgeDebug: b?.debug,
|
|
831
835
|
onRefreshToken: De,
|
|
832
836
|
onBridgeReady: () => {
|
|
833
|
-
|
|
837
|
+
F.current = !1;
|
|
834
838
|
},
|
|
835
839
|
onSessionExpiringSoon: () => {
|
|
836
840
|
console.warn("[Auth] Session will expire in 5 minutes");
|
|
837
841
|
},
|
|
838
842
|
onTokenExpired: () => {
|
|
839
|
-
|
|
843
|
+
I();
|
|
840
844
|
},
|
|
841
845
|
onBeforeIdentityChange: W.onBeforeIdentityChange,
|
|
842
|
-
children: [/* @__PURE__ */ Y(u, { announcementsRef: W.announcementsRef }), /* @__PURE__ */ Y(
|
|
846
|
+
children: [/* @__PURE__ */ Y(u, { announcementsRef: W.announcementsRef }), /* @__PURE__ */ Y(p, {
|
|
843
847
|
syncToUrl: !0,
|
|
844
|
-
children: /* @__PURE__ */ Y(
|
|
848
|
+
children: /* @__PURE__ */ Y(h, { children: /* @__PURE__ */ Y($e, {
|
|
845
849
|
i18nProductId: g,
|
|
846
|
-
platformI18nProductId:
|
|
847
|
-
directionMode:
|
|
850
|
+
platformI18nProductId: _,
|
|
851
|
+
directionMode: he,
|
|
848
852
|
fallbackTranslations: ae,
|
|
849
|
-
defaultBrand:
|
|
850
|
-
defaultMode:
|
|
851
|
-
defaultDensity:
|
|
852
|
-
defaultTypography:
|
|
853
|
-
defaultGlass:
|
|
853
|
+
defaultBrand: te,
|
|
854
|
+
defaultMode: x,
|
|
855
|
+
defaultDensity: S,
|
|
856
|
+
defaultTypography: C,
|
|
857
|
+
defaultGlass: ne,
|
|
854
858
|
productName: i,
|
|
855
|
-
brandInitial:
|
|
856
|
-
enablePWA:
|
|
857
|
-
toasterPosition:
|
|
859
|
+
brandInitial: T,
|
|
860
|
+
enablePWA: w,
|
|
861
|
+
toasterPosition: oe,
|
|
858
862
|
tourPageIdFromPath: ue,
|
|
859
|
-
enableWorkspaceTourPermissions:
|
|
863
|
+
enableWorkspaceTourPermissions: pe,
|
|
860
864
|
children: n
|
|
861
865
|
}) })
|
|
862
866
|
})]
|
|
@@ -867,4 +871,4 @@ function rt({ config: t, children: n, clearAuthStore: r }) {
|
|
|
867
871
|
})
|
|
868
872
|
});
|
|
869
873
|
}
|
|
870
|
-
export {
|
|
874
|
+
export { it as AppShellProvider, Be as RICH_TOAST_TOKEN_STYLE, qe as resolveAppShellObservabilityConfig, Ge as withShellRybbitEvents };
|