@burdenoff/fe-libs 2026.1023.7 → 2026.1023.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.
Files changed (35) hide show
  1. package/dist/shared/graphql/client.d.ts +9 -0
  2. package/dist/shared/graphql/client.js +241 -201
  3. package/dist/shared/graphql/fetch.js +135 -123
  4. package/dist/shared/graphql/index.d.ts +1 -0
  5. package/dist/shared/graphql/workspaceOperationGuard.d.ts +70 -0
  6. package/dist/shared/graphql/workspaceOperationGuard.js +62 -0
  7. package/dist/shared/providers/AppShellProvider.d.ts +16 -0
  8. package/dist/shared/providers/AppShellProvider.js +232 -226
  9. package/dist/shared/providers/shell/AuthProvider.d.ts +14 -1
  10. package/dist/shared/providers/shell/AuthProvider.js +105 -94
  11. package/dist/shared/providers/shell/MultiGatewayProvider.d.ts +8 -1
  12. package/dist/shared/providers/shell/MultiGatewayProvider.js +115 -119
  13. package/dist/shared/providers/shell/ProfileStorageManager.js +1 -1
  14. package/dist/shared/providers/shell/WorkspaceWriteRefusedToastListener.d.ts +4 -0
  15. package/dist/shared/providers/shell/WorkspaceWriteRefusedToastListener.js +23 -0
  16. package/dist/shared/providers/shell/authProvider/identityChange.d.ts +26 -0
  17. package/dist/shared/providers/shell/authProvider/identityChange.js +11 -0
  18. package/dist/shared/providers/shell/authProvider/useAuthActions.d.ts +4 -1
  19. package/dist/shared/providers/shell/authProvider/useAuthActions.js +105 -92
  20. package/dist/shared/providers/shell/authProvider/useBridgeInitialization.d.ts +27 -1
  21. package/dist/shared/providers/shell/authProvider/useBridgeInitialization.js +82 -62
  22. package/dist/shared/providers/shell/authProvider/useRemoteSLO.d.ts +4 -1
  23. package/dist/shared/providers/shell/authProvider/useRemoteSLO.js +16 -14
  24. package/dist/shared/providers/shell/authProvider/useStorageSync.d.ts +4 -1
  25. package/dist/shared/providers/shell/authProvider/useStorageSync.js +19 -14
  26. package/dist/shared/providers/shell/contextSwitchCache.d.ts +4 -0
  27. package/dist/shared/providers/shell/contextSwitchCache.js +17 -0
  28. package/dist/shared/providers/shell/identityQueryReset.d.ts +17 -0
  29. package/dist/shared/providers/shell/identityQueryReset.js +21 -0
  30. package/dist/shared/providers/shell/identityScopedQueryReset.d.ts +16 -0
  31. package/dist/shared/providers/shell/identityScopedQueryReset.js +30 -0
  32. package/dist/shared/providers/shell/index.d.ts +1 -1
  33. package/dist/shared-graphql.js +11 -10
  34. package/dist/shared.js +129 -128
  35. package/package.json +2 -2
@@ -2,51 +2,54 @@ import { emitProductSlug as e, legacyProductSlug as t } from "../config/productS
2
2
  import { isShellLessRoute as n } from "../config/shellRoutes.js";
3
3
  import { readActiveContextValueWithUrlPrecedence as r } from "./shell/ActiveContextStorage.js";
4
4
  import { BACKEND_ERROR_EVENT as i, CONNECTION_STATUS_EVENT as a, dispatchBackendErrorEvent as o, isBackendErrorDisplay as s, shouldToastBackendError as c } from "../utils/backendErrors.js";
5
- import { SESSION_EXPIRED_EVENT as l, graphqlFetch as u } from "../graphql/fetch.js";
6
- import { attemptTokenRefresh as d, clearAuthSessionStorage as f, getSharedTokenRefreshRefs as p, isAuthNetworkError as m } from "../utils/authErrorHandling.js";
7
- import { AppShellContextProvider as h } from "./shell/AppShellContext.js";
8
- import { AuthProvider as g } from "./shell/AuthProvider.js";
9
- import { ActiveContextProvider as _ } from "./shell/ActiveContextProvider.js";
10
- import { LogManager as ee } from "../logger/LogManager.js";
11
- import { ConsoleTransport as te } from "../logger/ConsoleTransport.js";
12
- import { ThemeProvider as v } from "./shell/ThemeProvider.js";
13
- import { AuthTokenProvider as ne } from "./shell/AuthTokenProvider.js";
14
- import { ErrorFallback as re } from "../components/ErrorFallback.js";
15
- import { m as ie } from "../../node_modules/react-error-boundary/dist/react-error-boundary.js";
16
- import { PWAInstallBanner as y } from "../components/PWAInstallBanner.js";
17
- import { FeatureFlagsProvider as ae } from "./shell/FeatureFlagsProvider.js";
18
- import { FeatureFlagProvider as oe } from "../feature-flags/FeatureFlagProvider.js";
19
- import { GlobalUiProvider as b } from "./shell/GlobalUiProvider.js";
20
- import { ShellUiProvider as x } from "./shell/ShellUiProvider.js";
21
- import { ContextManagerProvider as se } from "./shell/ContextManagerProvider.js";
22
- import { MultiGatewayProvider as ce } from "./shell/MultiGatewayProvider.js";
23
- import { G as S, Q as C, j as w, w as le } from "../../node_modules/web-vitals/dist/web-vitals.js";
24
- import { ProfileI18nBridge as ue } from "./shell/ProfileI18nBridge.js";
25
- import { ProfileGeographyBridge as de } from "./shell/ProfileGeographyBridge.js";
26
- import { DesktopUpdateToast as fe } from "../components/DesktopUpdateToast.js";
27
- import { FLUIDGRIDS_RYBBIT_EVENTS as T } from "../events/fluidgrids.js";
28
- import { DevtoolsSink as E } from "../events/sinks/DevtoolsSink.js";
29
- import { BroadcastChannelSink as D } from "../events/sinks/BroadcastChannelSink.js";
30
- import { BackendAuditSink as O } from "../events/sinks/BackendAuditSink.js";
31
- import { AnalyticsConsentBanner as k, DEFAULT_RYBBIT_ALLOWLIST as A, RybbitSink as j } from "../events/sinks/RybbitSink.js";
32
- import { OtelBrowserSink as M } from "../events/sinks/OtelBrowserSink.js";
33
- import { EventBusProvider as pe, useEventBus as N } from "../../shared-events.js";
34
- import { useReferralAttribution as P } from "../hooks/useReferralAttribution.js";
35
- import { usePushDeviceRegistration as F } from "../hooks/usePushDeviceRegistration.js";
36
- import { TourPermissionsBoundary as I } from "../tours/TourPermissionsBoundary.js";
37
- import { resolveBrowserDirectionMode as me } from "./shell/directionMode.js";
38
- import { TourPlayerProvider as L } from "../tours/TourPlayerProvider.js";
39
- import { ToursProvider as R, useToursContext as z } from "../tours/ToursContext.js";
40
- import { TourInitializer as B } from "../tours/TourInitializer.js";
41
- import { setAssistantProductId as he } from "../assistant/productContext.js";
42
- import { useRegisterTourRouteCatalog as ge } from "../tours/useTourRouteCatalog.js";
43
- import { Suspense as V, useCallback as H, useEffect as U, useMemo as W, useRef as G, useState as _e } from "react";
44
- import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
45
- import { BrowserRouter as ve, useLocation as Y } from "react-router";
46
- import { Toaster as X, toast as Z } from "sonner";
47
- import { MutationCache as ye, QueryCache as be, QueryClient as xe, QueryClientProvider as Se } from "@tanstack/react-query";
5
+ import { SESSION_EXPIRED_EVENT as l, graphqlFetch as ee } from "../graphql/fetch.js";
6
+ import { attemptTokenRefresh as te, clearAuthSessionStorage as ne, getSharedTokenRefreshRefs as u, isAuthNetworkError as d } from "../utils/authErrorHandling.js";
7
+ import { AppShellContextProvider as f } from "./shell/AppShellContext.js";
8
+ import { AuthProvider as p } from "./shell/AuthProvider.js";
9
+ import { ActiveContextProvider as m } from "./shell/ActiveContextProvider.js";
10
+ import { LogManager as re } from "../logger/LogManager.js";
11
+ import { ConsoleTransport as ie } from "../logger/ConsoleTransport.js";
12
+ import { ThemeProvider as h } from "./shell/ThemeProvider.js";
13
+ import { AuthTokenProvider as ae } from "./shell/AuthTokenProvider.js";
14
+ import { ErrorFallback as oe } from "../components/ErrorFallback.js";
15
+ import { m as g } from "../../node_modules/react-error-boundary/dist/react-error-boundary.js";
16
+ import { PWAInstallBanner as _ } from "../components/PWAInstallBanner.js";
17
+ import { FeatureFlagsProvider as v } from "./shell/FeatureFlagsProvider.js";
18
+ import { FeatureFlagProvider as se } from "../feature-flags/FeatureFlagProvider.js";
19
+ import { GlobalUiProvider as y } from "./shell/GlobalUiProvider.js";
20
+ import { ShellUiProvider as b } from "./shell/ShellUiProvider.js";
21
+ import { ContextManagerProvider as ce } from "./shell/ContextManagerProvider.js";
22
+ import { MultiGatewayProvider as le } from "./shell/MultiGatewayProvider.js";
23
+ import { G as x, Q as ue, j as de, w as fe } from "../../node_modules/web-vitals/dist/web-vitals.js";
24
+ import { ProfileI18nBridge as pe } from "./shell/ProfileI18nBridge.js";
25
+ import { ProfileGeographyBridge as me } from "./shell/ProfileGeographyBridge.js";
26
+ import { DesktopUpdateToast as he } from "../components/DesktopUpdateToast.js";
27
+ import { FLUIDGRIDS_RYBBIT_EVENTS as S } from "../events/fluidgrids.js";
28
+ import { DevtoolsSink as C } from "../events/sinks/DevtoolsSink.js";
29
+ import { BroadcastChannelSink as w } from "../events/sinks/BroadcastChannelSink.js";
30
+ import { BackendAuditSink as T } from "../events/sinks/BackendAuditSink.js";
31
+ import { AnalyticsConsentBanner as E, DEFAULT_RYBBIT_ALLOWLIST as D, RybbitSink as O } from "../events/sinks/RybbitSink.js";
32
+ import { OtelBrowserSink as k } from "../events/sinks/OtelBrowserSink.js";
33
+ import { EventBusProvider as ge, useEventBus as A } from "../../shared-events.js";
34
+ import { useReferralAttribution as j } from "../hooks/useReferralAttribution.js";
35
+ import { usePushDeviceRegistration as M } from "../hooks/usePushDeviceRegistration.js";
36
+ import { useIdentityQueryReset as _e } from "./shell/identityQueryReset.js";
37
+ import { IdentityScopedQueryReset as ve } from "./shell/identityScopedQueryReset.js";
38
+ import { WorkspaceWriteRefusedToastListener as N } from "./shell/WorkspaceWriteRefusedToastListener.js";
39
+ import { TourPermissionsBoundary as P } from "../tours/TourPermissionsBoundary.js";
40
+ import { resolveBrowserDirectionMode as ye } from "./shell/directionMode.js";
41
+ import { TourPlayerProvider as F } from "../tours/TourPlayerProvider.js";
42
+ import { ToursProvider as I, useToursContext as L } from "../tours/ToursContext.js";
43
+ import { TourInitializer as R } from "../tours/TourInitializer.js";
44
+ import { setAssistantProductId as be } from "../assistant/productContext.js";
45
+ import { useRegisterTourRouteCatalog as xe } from "../tours/useTourRouteCatalog.js";
46
+ import { Suspense as z, useCallback as B, useEffect as V, useMemo as H, useRef as U, useState as Se } from "react";
47
+ import { Fragment as W, jsx as G, jsxs as K } from "react/jsx-runtime";
48
+ import { BrowserRouter as Ce, useLocation as q } from "react-router";
49
+ import { Toaster as J, toast as Y } from "sonner";
50
+ import { MutationCache as we, QueryCache as Te, QueryClient as Ee, QueryClientProvider as De } from "@tanstack/react-query";
48
51
  //#region src/shared/providers/AppShellProvider.tsx
49
- var Q = {
52
+ var X = {
50
53
  artistrybase: { prod: "cfbecacb6002" },
51
54
  atheletebridge: { prod: "c34c6ead7aa8" },
52
55
  adaptercloud: {},
@@ -72,7 +75,7 @@ var Q = {
72
75
  subscriberbot: {},
73
76
  intelwatchtower: {},
74
77
  kadaikodi: {}
75
- }, Ce = [
78
+ }, Oe = [
76
79
  "nav.route.changed",
77
80
  "auth.signed_in",
78
81
  "auth.signed_out",
@@ -115,7 +118,7 @@ var Q = {
115
118
  "coolandlovely.wardrobe.item_added",
116
119
  "coolandlovely.search.performed",
117
120
  "vibecontrols.agent.registered",
118
- ...T,
121
+ ...S,
119
122
  "atheletebridge.page.viewed",
120
123
  "atheletebridge.team.created",
121
124
  "atheletebridge.fixture.created",
@@ -319,7 +322,7 @@ var Q = {
319
322
  "project.created",
320
323
  "workspace-member.added",
321
324
  "project-member.added"
322
- ], we = {
325
+ ], ke = {
323
326
  "--success-bg": "var(--color-status-success-bgSubtle)",
324
327
  "--success-border": "var(--color-status-success-border)",
325
328
  "--success-text": "var(--color-status-success-text)",
@@ -332,8 +335,8 @@ var Q = {
332
335
  "--error-bg": "var(--color-status-error-bgSubtle)",
333
336
  "--error-border": "var(--color-status-error-border)",
334
337
  "--error-text": "var(--color-status-error-text)"
335
- }, Te = 4e3;
336
- function Ee(e) {
338
+ }, Ae = 4e3;
339
+ function je(e) {
337
340
  let t = e.technicalMessage ?? e.extensions?.technicalMessage, n = {
338
341
  code: e.code,
339
342
  operationName: e.operationName,
@@ -345,13 +348,13 @@ function Ee(e) {
345
348
  };
346
349
  console.error("[Burdenoff backend error]", e.message, n);
347
350
  }
348
- function De(e) {
351
+ function Z(e) {
349
352
  return e === "prod" || e === "production" ? "prod" : e === "alpha" || e === "staging" ? "alpha" : "dev";
350
353
  }
351
- function Oe(e, t) {
354
+ function Q(e, t) {
352
355
  return e.VITE_DISABLE_ANALYTICS === "true" ? !1 : e.VITE_ENABLE_ANALYTICS === "true" || e.PROD || t !== "dev" ? !0 : e.VITE_ENABLE_ANALYTICS !== "false";
353
356
  }
354
- function ke() {
357
+ function Me() {
355
358
  return {
356
359
  BASE_URL: "/",
357
360
  DEV: !1,
@@ -360,9 +363,9 @@ function ke() {
360
363
  SSR: !1
361
364
  };
362
365
  }
363
- function Ae(e, t) {
366
+ function Ne(e, t) {
364
367
  if (!t || t.length === 0 || !e.rybbit) return e;
365
- let n = e.rybbit.allowlist ?? A, r = [...new Set([...n, ...t])];
368
+ let n = e.rybbit.allowlist ?? D, r = [...new Set([...n, ...t])];
366
369
  return {
367
370
  ...e,
368
371
  rybbit: {
@@ -371,8 +374,8 @@ function Ae(e, t) {
371
374
  }
372
375
  };
373
376
  }
374
- function je(e, n) {
375
- let r = De(n.VITE_DEPLOY_ENV ?? n.MODE), i = Oe(n, r), a = Q[e] ?? Q[t(e)], o = r === "prod" ? a?.prod : a?.nonProd, s = n.VITE_RYBBIT_SITE_ID || o, c = n.VITE_BACKEND_AUDIT_ENDPOINT || (n.PROD ? "/api/fe-events" : void 0);
377
+ function Pe(e, n) {
378
+ let r = Z(n.VITE_DEPLOY_ENV ?? n.MODE), i = Q(n, r), a = X[e] ?? X[t(e)], o = r === "prod" ? a?.prod : a?.nonProd, s = n.VITE_RYBBIT_SITE_ID || o, c = n.VITE_BACKEND_AUDIT_ENDPOINT || (n.PROD ? "/api/fe-events" : void 0);
376
379
  return {
377
380
  enabled: i,
378
381
  appVersion: n.VITE_APP_VERSION || "0.0.0",
@@ -383,7 +386,7 @@ function je(e, n) {
383
386
  enabled: i && !!s,
384
387
  siteId: s,
385
388
  scriptUrl: n.VITE_RYBBIT_SCRIPT_URL,
386
- allowlist: Ce,
389
+ allowlist: Oe,
387
390
  identifyOn: "auth.signed_in",
388
391
  rename: { "nav.route.changed": "pageview" }
389
392
  },
@@ -398,17 +401,17 @@ function je(e, n) {
398
401
  }
399
402
  };
400
403
  }
401
- function Me({ children: e, enablePWA: t, toasterPosition: n, productName: r, brandInitial: i }) {
402
- let { trackProgress: a, recordStepCompletion: o, trackEvent: s, progressScopeKey: c } = z(), l = H((e, t) => e.steps?.[t], []);
403
- return /* @__PURE__ */ J(L, {
404
+ function Fe({ children: e, enablePWA: t, toasterPosition: n, productName: r, brandInitial: i }) {
405
+ let { trackProgress: a, recordStepCompletion: o, trackEvent: s, progressScopeKey: c } = L(), l = B((e, t) => e.steps?.[t], []);
406
+ return /* @__PURE__ */ K(F, {
404
407
  scopeKey: c,
405
- onTourStart: H((e) => {
408
+ onTourStart: B((e) => {
406
409
  a(e.id, "started"), s("TOUR_STARTED", e.id);
407
410
  }, [s, a]),
408
- onTourComplete: H((e) => {
411
+ onTourComplete: B((e) => {
409
412
  a(e.id, "completed"), s("TOUR_COMPLETED", e.id);
410
413
  }, [s, a]),
411
- onTourSkip: H((e, t) => {
414
+ onTourSkip: B((e, t) => {
412
415
  let n = l(e, t);
413
416
  a(e.id, "skipped"), s("TOUR_SKIPPED", e.id, {
414
417
  stepId: n?.id,
@@ -419,14 +422,14 @@ function Me({ children: e, enablePWA: t, toasterPosition: n, productName: r, bra
419
422
  s,
420
423
  a
421
424
  ]),
422
- onStepChange: H((e, t) => {
425
+ onStepChange: B((e, t) => {
423
426
  let n = l(e, t);
424
427
  n && s("STEP_VIEWED", e.id, {
425
428
  stepId: n.id,
426
429
  stepOrder: n.stepOrder
427
430
  });
428
431
  }, [l, s]),
429
- onStepComplete: H((e, t) => {
432
+ onStepComplete: B((e, t) => {
430
433
  let n = l(e, t);
431
434
  n && (o(e.id, n.id), s("STEP_COMPLETED", e.id, {
432
435
  stepId: n.id,
@@ -438,20 +441,21 @@ function Me({ children: e, enablePWA: t, toasterPosition: n, productName: r, bra
438
441
  s
439
442
  ]),
440
443
  children: [
441
- /* @__PURE__ */ q(B, {}),
444
+ /* @__PURE__ */ G(R, {}),
442
445
  e,
443
- /* @__PURE__ */ q(Ne, {}),
444
- /* @__PURE__ */ q(Fe, {}),
445
- /* @__PURE__ */ q(X, {
446
+ /* @__PURE__ */ G(Ie, {}),
447
+ /* @__PURE__ */ G(N, {}),
448
+ /* @__PURE__ */ G(Re, {}),
449
+ /* @__PURE__ */ G(J, {
446
450
  position: n,
447
451
  richColors: !0,
448
452
  closeButton: !0,
449
- style: we
453
+ style: ke
450
454
  }),
451
- /* @__PURE__ */ q(fe, {}),
452
- t && /* @__PURE__ */ q(V, {
455
+ /* @__PURE__ */ G(he, {}),
456
+ t && /* @__PURE__ */ G(z, {
453
457
  fallback: null,
454
- children: /* @__PURE__ */ q(y, {
458
+ children: /* @__PURE__ */ G(_, {
455
459
  productName: r,
456
460
  brandInitial: i
457
461
  })
@@ -459,44 +463,44 @@ function Me({ children: e, enablePWA: t, toasterPosition: n, productName: r, bra
459
463
  ]
460
464
  });
461
465
  }
462
- function Ne() {
463
- let e = G(null);
464
- return U(() => {
466
+ function Ie() {
467
+ let e = U(null);
468
+ return V(() => {
465
469
  let t = (t) => {
466
470
  let n = t instanceof CustomEvent && s(t.detail) ? t.detail : null;
467
471
  if (!c(n)) return;
468
- Ee(n);
472
+ je(n);
469
473
  let r = `${n.code ?? ""}|${n.message}`, i = Date.now(), a = e.current;
470
- a?.key === r && i - a.shownAt < Te || (e.current = {
474
+ a?.key === r && i - a.shownAt < Ae || (e.current = {
471
475
  key: r,
472
476
  shownAt: i
473
- }, Z.error(n.message, { duration: 7e3 }));
477
+ }, Y.error(n.message, { duration: 7e3 }));
474
478
  };
475
479
  return window.addEventListener(i, t), () => window.removeEventListener(i, t);
476
480
  }, []), null;
477
481
  }
478
- var $ = "burdenoff-connection-status", Pe = 1500;
479
- function Fe() {
480
- let e = G(null), t = G(!1);
481
- return U(() => {
482
+ var $ = "burdenoff-connection-status", Le = 1500;
483
+ function Re() {
484
+ let e = U(null), t = U(!1);
485
+ return V(() => {
482
486
  let n = () => {
483
- t.current || (t.current = !0, Z.error("Connection lost. Trying to reconnect…", {
487
+ t.current || (t.current = !0, Y.error("Connection lost. Trying to reconnect…", {
484
488
  id: $,
485
489
  duration: Infinity
486
490
  }));
487
491
  }, r = () => {
488
492
  t.current || e.current || (e.current = setTimeout(() => {
489
493
  e.current = null, n();
490
- }, Pe));
494
+ }, Le));
491
495
  }, i = (n) => {
492
496
  if (e.current &&= (clearTimeout(e.current), null), !t.current) {
493
- Z.dismiss($);
497
+ Y.dismiss($);
494
498
  return;
495
499
  }
496
- t.current = !1, n ? Z.success("Back online", {
500
+ t.current = !1, n ? Y.success("Back online", {
497
501
  id: $,
498
502
  duration: 2500
499
- }) : Z.dismiss($);
503
+ }) : Y.dismiss($);
500
504
  }, o = (e) => {
501
505
  if (!(e instanceof CustomEvent)) return;
502
506
  let t = e.detail;
@@ -509,42 +513,42 @@ function Fe() {
509
513
  };
510
514
  }, []), null;
511
515
  }
512
- function Ie() {
513
- return F(), null;
516
+ function ze() {
517
+ return M(), null;
514
518
  }
515
- function Le({ children: e, i18nProductId: t, platformI18nProductId: n, directionMode: r, fallbackTranslations: i, defaultBrand: a, defaultMode: o, defaultDensity: s, defaultTypography: c, defaultGlass: l, productName: u, brandInitial: d, enablePWA: f, toasterPosition: p, tourPageIdFromPath: m, enableWorkspaceTourPermissions: h }) {
516
- let g = Y();
517
- P();
518
- let _ = g.pathname.startsWith("/devportal") || g.pathname.startsWith("/organizations") || g.pathname.startsWith("/workspaces");
519
- return /* @__PURE__ */ J(v, {
519
+ function Be({ children: e, i18nProductId: t, platformI18nProductId: n, directionMode: r, fallbackTranslations: i, defaultBrand: a, defaultMode: o, defaultDensity: s, defaultTypography: c, defaultGlass: l, productName: ee, brandInitial: te, enablePWA: ne, toasterPosition: u, tourPageIdFromPath: d, enableWorkspaceTourPermissions: f }) {
520
+ let p = q();
521
+ j();
522
+ let m = p.pathname.startsWith("/devportal") || p.pathname.startsWith("/organizations") || p.pathname.startsWith("/workspaces");
523
+ return /* @__PURE__ */ K(h, {
520
524
  defaultBrand: a,
521
525
  defaultMode: o,
522
526
  defaultDensity: s,
523
527
  defaultTypography: c,
524
528
  defaultGlass: l,
525
- children: [/* @__PURE__ */ q(Re, {}), /* @__PURE__ */ q(ue, {
529
+ children: [/* @__PURE__ */ G(Ve, {}), /* @__PURE__ */ G(pe, {
526
530
  i18nProductId: t,
527
531
  platformI18nProductId: n,
528
532
  directionMode: r,
529
533
  fallbackTranslations: i,
530
- children: /* @__PURE__ */ q(de, { children: /* @__PURE__ */ q(ae, { children: /* @__PURE__ */ q(oe, {
534
+ children: /* @__PURE__ */ G(me, { children: /* @__PURE__ */ G(v, { children: /* @__PURE__ */ G(se, {
531
535
  workspaceId: null,
532
536
  gateway: "global",
533
537
  defaultEnabled: !0,
534
- children: /* @__PURE__ */ q(b, { children: /* @__PURE__ */ q(x, { children: /* @__PURE__ */ q(ie, {
538
+ children: /* @__PURE__ */ G(y, { children: /* @__PURE__ */ G(b, { children: /* @__PURE__ */ G(g, {
535
539
  fallback: null,
536
- children: /* @__PURE__ */ q(I, {
537
- enabled: h && !_,
538
- children: /* @__PURE__ */ q(R, {
539
- requireWorkspace: h,
540
- disabled: _,
541
- getPageIdFromPath: m,
542
- children: /* @__PURE__ */ J(Me, {
543
- enablePWA: f,
544
- toasterPosition: p,
545
- productName: u,
546
- brandInitial: d,
547
- children: [/* @__PURE__ */ q(Ie, {}), e]
540
+ children: /* @__PURE__ */ G(P, {
541
+ enabled: f && !m,
542
+ children: /* @__PURE__ */ G(I, {
543
+ requireWorkspace: f,
544
+ disabled: m,
545
+ getPageIdFromPath: d,
546
+ children: /* @__PURE__ */ K(Fe, {
547
+ enablePWA: ne,
548
+ toasterPosition: u,
549
+ productName: ee,
550
+ brandInitial: te,
551
+ children: [/* @__PURE__ */ G(ze, {}), e]
548
552
  })
549
553
  })
550
554
  })
@@ -553,9 +557,9 @@ function Le({ children: e, i18nProductId: t, platformI18nProductId: n, direction
553
557
  })]
554
558
  });
555
559
  }
556
- function Re() {
557
- let e = Y();
558
- return U(() => {
560
+ function Ve() {
561
+ let e = q();
562
+ return V(() => {
559
563
  e.hash || requestAnimationFrame(() => {
560
564
  window.scrollTo({
561
565
  top: 0,
@@ -573,7 +577,7 @@ function Re() {
573
577
  e.hash
574
578
  ]), null;
575
579
  }
576
- function ze(e) {
580
+ function He(e) {
577
581
  if (e instanceof Error) return e.message;
578
582
  if (typeof e == "string") return e;
579
583
  try {
@@ -582,9 +586,9 @@ function ze(e) {
582
586
  return String(e);
583
587
  }
584
588
  }
585
- function Be() {
586
- let e = N(), t = Y(), n = G(void 0), r = G(void 0), i = G(null);
587
- return U(() => {
589
+ function Ue() {
590
+ let e = A(), t = q(), n = U(void 0), r = U(void 0), i = U(null);
591
+ return V(() => {
588
592
  let a = `${t.pathname}${t.search}${t.hash}`;
589
593
  if (r.current !== a) return i.current && clearTimeout(i.current), i.current = setTimeout(() => {
590
594
  i.current = null;
@@ -604,7 +608,7 @@ function Be() {
604
608
  t.hash,
605
609
  t.pathname,
606
610
  t.search
607
- ]), U(() => {
611
+ ]), V(() => {
608
612
  let t = (t) => {
609
613
  e.emit("error.runtime.caught", {
610
614
  message: t.message || "Runtime error",
@@ -614,34 +618,34 @@ function Be() {
614
618
  errorName: t.error instanceof Error ? t.error.name : void 0
615
619
  });
616
620
  }, n = (t) => {
617
- e.emit("error.unhandledrejection", { reason: ze(t.reason) });
621
+ e.emit("error.unhandledrejection", { reason: He(t.reason) });
618
622
  };
619
623
  return window.addEventListener("error", t), window.addEventListener("unhandledrejection", n), () => {
620
624
  window.removeEventListener("error", t), window.removeEventListener("unhandledrejection", n);
621
625
  };
622
- }, [e]), U(() => {
623
- S((t) => {
626
+ }, [e]), V(() => {
627
+ x((t) => {
624
628
  e.emit("perf.lcp.measured", {
625
629
  metric: "LCP",
626
630
  value: t.value,
627
631
  id: t.id,
628
632
  rating: t.rating
629
633
  });
630
- }), le((t) => {
634
+ }), fe((t) => {
631
635
  e.emit("perf.cls.measured", {
632
636
  metric: "CLS",
633
637
  value: t.value,
634
638
  id: t.id,
635
639
  rating: t.rating
636
640
  });
637
- }), w((t) => {
641
+ }), de((t) => {
638
642
  e.emit("perf.inp.measured", {
639
643
  metric: "INP",
640
644
  value: t.value,
641
645
  id: t.id,
642
646
  rating: t.rating
643
647
  });
644
- }), C((t) => {
648
+ }), ue((t) => {
645
649
  e.emit("perf.ttfb.measured", {
646
650
  metric: "TTFB",
647
651
  value: t.value,
@@ -651,16 +655,16 @@ function Be() {
651
655
  });
652
656
  }, [e]), null;
653
657
  }
654
- function Ve({ config: e, productSlug: t, privacyConsent: r, consentRouteDenylist: i, rybbitSkipRoutes: a }) {
655
- let { pathname: o } = Y(), s = n(o) || i?.(o) === !0;
656
- return /* @__PURE__ */ J(K, { children: [
657
- /* @__PURE__ */ q(Be, {}),
658
- r && !s ? /* @__PURE__ */ q(k, { productName: t }) : null,
659
- e.enabled === !1 ? null : /* @__PURE__ */ J(K, { children: [
660
- e.devtools ? /* @__PURE__ */ q(E, { enabled: !0 }) : null,
661
- e.broadcast === !1 ? null : /* @__PURE__ */ q(D, {}),
662
- e.backendAudit?.enabled && e.backendAudit.endpoint ? /* @__PURE__ */ q(O, { endpoint: e.backendAudit.endpoint }) : null,
663
- e.rybbit?.enabled && e.rybbit.siteId ? /* @__PURE__ */ q(j, {
658
+ function We({ config: e, productSlug: t, privacyConsent: r, consentRouteDenylist: i, rybbitSkipRoutes: a }) {
659
+ let { pathname: o } = q(), s = n(o) || i?.(o) === !0;
660
+ return /* @__PURE__ */ K(W, { children: [
661
+ /* @__PURE__ */ G(Ue, {}),
662
+ r && !s ? /* @__PURE__ */ G(E, { productName: t }) : null,
663
+ e.enabled === !1 ? null : /* @__PURE__ */ K(W, { children: [
664
+ e.devtools ? /* @__PURE__ */ G(C, { enabled: !0 }) : null,
665
+ e.broadcast === !1 ? null : /* @__PURE__ */ G(w, {}),
666
+ e.backendAudit?.enabled && e.backendAudit.endpoint ? /* @__PURE__ */ G(T, { endpoint: e.backendAudit.endpoint }) : null,
667
+ e.rybbit?.enabled && e.rybbit.siteId ? /* @__PURE__ */ G(O, {
664
668
  siteId: e.rybbit.siteId,
665
669
  scriptUrl: e.rybbit.scriptUrl,
666
670
  allowlist: e.rybbit.allowlist,
@@ -669,7 +673,7 @@ function Ve({ config: e, productSlug: t, privacyConsent: r, consentRouteDenylist
669
673
  skipRoutes: a,
670
674
  pathname: o
671
675
  }) : null,
672
- e.otel?.enabled && e.otel.endpoint ? /* @__PURE__ */ q(M, {
676
+ e.otel?.enabled && e.otel.endpoint ? /* @__PURE__ */ G(k, {
673
677
  endpoint: e.otel.endpoint,
674
678
  serviceName: e.otel.serviceName ?? `${t}-app`,
675
679
  flushInterval: e.otel.flushInterval
@@ -677,29 +681,29 @@ function Ve({ config: e, productSlug: t, privacyConsent: r, consentRouteDenylist
677
681
  ] })
678
682
  ] });
679
683
  }
680
- function He({ config: t, children: i, clearAuthStore: a }) {
681
- let { productName: s, productSlug: c = s.toLowerCase().replace(/\s+/g, ""), tagline: v = "", domain: y, i18nProductId: ae, platformI18nProductId: oe, rtl: b, gatewayUrls: x, authBridge: S, defaultBrand: C = "default", defaultMode: w, defaultDensity: le, defaultTypography: ue, defaultGlass: de, enablePWA: fe = !0, brandInitial: T = s.charAt(0), defaultGateway: E = "workspace", enableSubscriptions: D = !0, fallbackTranslations: O, queryClientOptions: k, toasterPosition: A = "bottom-right", observability: j, privacyConsent: M = !1, consentRouteDenylist: N, rybbitEvents: P, rybbitSkipRoutes: F, tourPageIdFromPath: I, tourRouteCatalog: L, enableWorkspaceTourPermissions: R = !1 } = t;
682
- ge(c, L), U(() => he(e(c)), [c]);
683
- let [z] = _e(() => me({
684
- enabled: b?.enabled,
685
- allowPreview: b?.preview
686
- })), B = W(() => Ae(j ?? je(c, ke()), P), [
687
- j,
684
+ function Ge({ config: t, children: i, clearAuthStore: a }) {
685
+ let { productName: s, productSlug: c = s.toLowerCase().replace(/\s+/g, ""), tagline: h = "", domain: _, i18nProductId: v, platformI18nProductId: se, rtl: y, gatewayUrls: b, authBridge: x, defaultBrand: ue = "default", defaultMode: de, defaultDensity: fe, defaultTypography: pe, defaultGlass: me, enablePWA: he = !0, brandInitial: S = s.charAt(0), defaultGateway: C = "workspace", enableSubscriptions: w = !0, fallbackTranslations: T, queryClientOptions: E, toasterPosition: D = "bottom-right", observability: O, privacyConsent: k = !1, consentRouteDenylist: A, rybbitEvents: j, rybbitSkipRoutes: M, tourPageIdFromPath: N, tourRouteCatalog: P, enableWorkspaceTourPermissions: F = !1, workspaceOperationGuard: I = "off" } = t;
686
+ xe(c, P), V(() => be(e(c)), [c]);
687
+ let [L] = Se(() => ye({
688
+ enabled: y?.enabled,
689
+ allowPreview: y?.preview
690
+ })), R = H(() => Ne(O ?? Pe(c, Me()), j), [
691
+ O,
688
692
  c,
689
- P
690
- ]), V = W(() => ({
693
+ j
694
+ ]), z = H(() => ({
691
695
  productName: s,
692
696
  productSlug: c,
693
- brandInitial: T,
694
- tagline: v,
695
- domain: y
697
+ brandInitial: S,
698
+ tagline: h,
699
+ domain: _
696
700
  }), [
697
701
  s,
698
702
  c,
699
- T,
700
- v,
701
- y
702
- ]), K = G(!1), Y = G(!!S?.url), X = H((e) => {
703
+ S,
704
+ h,
705
+ _
706
+ ]), W = U(!1), q = U(!!x?.url), J = B((e) => {
703
707
  if (!e?.force && (() => {
704
708
  try {
705
709
  let e = sessionStorage.getItem("bf-active-profile");
@@ -709,25 +713,25 @@ function He({ config: t, children: i, clearAuthStore: a }) {
709
713
  } catch {
710
714
  return !1;
711
715
  }
712
- })() || Y.current || K.current) return;
713
- K.current = !0, f(a);
716
+ })() || q.current || W.current) return;
717
+ W.current = !0, ne(a);
714
718
  let t = `${window.location.pathname}${window.location.search}`, r = `/auth/login?reason=session-expired&returnTo=${encodeURIComponent(t)}`, i = /^\/vibecontrols\/(share|deck)\//.test(window.location.pathname);
715
719
  if (window.location.pathname.startsWith("/auth/") || n(window.location.pathname) || i) {
716
- K.current = !1;
720
+ W.current = !1;
717
721
  return;
718
722
  }
719
723
  window.location.replace(r);
720
- }, [a]), Z = W(() => ({
721
- globalBaseUrl: x.globalBaseUrl,
722
- ...p()
723
- }), [x.globalBaseUrl]), Q = H(async () => d(Z), [Z]), Ce = H(async () => {
724
- window.location.pathname.startsWith("/auth/") || await Q() || X({ force: !0 });
725
- }, [Q, X]), we = H(async (e) => {
726
- m(e) ? await Q() || X({ force: !0 }) : console.error("[Network] Backend unreachable:", e.message);
727
- }, [Q, X]), Te = H(async (e) => {
728
- let t = await u({
724
+ }, [a]), Y = H(() => ({
725
+ globalBaseUrl: b.globalBaseUrl,
726
+ ...u()
727
+ }), [b.globalBaseUrl]), X = B(async () => te(Y), [Y]), Oe = B(async () => {
728
+ window.location.pathname.startsWith("/auth/") || await X() || J({ force: !0 });
729
+ }, [X, J]), ke = B(async (e) => {
730
+ d(e) ? await X() || J({ force: !0 }) : console.error("[Network] Backend unreachable:", e.message);
731
+ }, [X, J]), Ae = B(async (e) => {
732
+ let t = await ee({
729
733
  gateway: "global",
730
- baseUrl: x.globalBaseUrl,
734
+ baseUrl: b.globalBaseUrl,
731
735
  authToken: "",
732
736
  query: "mutation RefreshToken($token: String!) {\n refreshToken(token: $token) {\n accessToken\n refreshToken\n expiresIn\n }\n }",
733
737
  variables: { token: e }
@@ -739,12 +743,12 @@ function He({ config: t, children: i, clearAuthStore: a }) {
739
743
  refreshToken: n.refreshToken,
740
744
  expiresAt: n.expiresIn ? Date.now() + n.expiresIn * 1e3 : void 0
741
745
  };
742
- }, [x.globalBaseUrl]), Ee = H(() => r("organization"), []), De = W(() => {
743
- let e = new xe({
744
- queryCache: new be({ onError: (e) => {
746
+ }, [b.globalBaseUrl]), je = B(() => r("organization"), []), Z = H(() => {
747
+ let e = new Ee({
748
+ queryCache: new Te({ onError: (e) => {
745
749
  o(e);
746
750
  } }),
747
- mutationCache: new ye({
751
+ mutationCache: new we({
748
752
  onSuccess: () => {
749
753
  e.invalidateQueries();
750
754
  },
@@ -753,85 +757,87 @@ function He({ config: t, children: i, clearAuthStore: a }) {
753
757
  }
754
758
  }),
755
759
  defaultOptions: { queries: {
756
- staleTime: k?.staleTime ?? 300 * 1e3,
757
- retry: k?.retry ?? 2,
758
- refetchOnWindowFocus: k?.refetchOnWindowFocus ?? !1
760
+ staleTime: E?.staleTime ?? 300 * 1e3,
761
+ retry: E?.retry ?? 2,
762
+ refetchOnWindowFocus: E?.refetchOnWindowFocus ?? !1
759
763
  } }
760
764
  });
761
765
  return e;
762
- }, [k]);
763
- return U(() => {
766
+ }, [E]), Q = _e(Z);
767
+ return V(() => {
764
768
  let e = () => {
765
- X({ force: !0 });
769
+ J({ force: !0 });
766
770
  };
767
771
  return window.addEventListener(l, e), () => {
768
772
  window.removeEventListener(l, e);
769
773
  };
770
- }, [X]), U(() => {
771
- let e = ee.getInstance();
772
- e.getLogger("shell") || e.getLogger("shell").addTransport(new te());
773
- }, []), /* @__PURE__ */ q(h, {
774
- value: V,
775
- children: /* @__PURE__ */ q(pe, {
774
+ }, [J]), V(() => {
775
+ let e = re.getInstance();
776
+ e.getLogger("shell") || e.getLogger("shell").addTransport(new ie());
777
+ }, []), /* @__PURE__ */ G(f, {
778
+ value: z,
779
+ children: /* @__PURE__ */ G(ge, {
776
780
  appName: c,
777
- appVersion: B.appVersion,
778
- appEnv: B.appEnv,
781
+ appVersion: R.appVersion,
782
+ appEnv: R.appEnv,
779
783
  sourceMfe: c,
780
- children: /* @__PURE__ */ q(ie, {
781
- FallbackComponent: re,
782
- children: /* @__PURE__ */ J(ve, { children: [/* @__PURE__ */ q(Ve, {
783
- config: B,
784
+ children: /* @__PURE__ */ G(g, {
785
+ FallbackComponent: oe,
786
+ children: /* @__PURE__ */ K(Ce, { children: [/* @__PURE__ */ G(We, {
787
+ config: R,
784
788
  productSlug: c,
785
- privacyConsent: M,
786
- consentRouteDenylist: N,
787
- rybbitSkipRoutes: F
788
- }), /* @__PURE__ */ q(Se, {
789
- client: De,
790
- children: /* @__PURE__ */ q(ne, { children: /* @__PURE__ */ q(ce, {
791
- workspaceBaseUrl: x.workspaceBaseUrl,
792
- globalBaseUrl: x.globalBaseUrl,
793
- organizationId: Ee,
789
+ privacyConsent: k,
790
+ consentRouteDenylist: A,
791
+ rybbitSkipRoutes: M
792
+ }), /* @__PURE__ */ G(De, {
793
+ client: Z,
794
+ children: /* @__PURE__ */ G(ae, { children: /* @__PURE__ */ G(le, {
795
+ workspaceBaseUrl: b.workspaceBaseUrl,
796
+ globalBaseUrl: b.globalBaseUrl,
797
+ organizationId: je,
794
798
  productSlug: c,
795
- defaultGateway: E,
796
- enableSubscriptions: D,
797
- onAuthError: Ce,
798
- onNetworkError: we,
799
- onRefreshToken: Q,
800
- children: /* @__PURE__ */ q(g, {
801
- bridgeUrl: S?.url,
802
- bridgeAllowedOrigins: S?.allowedOrigins,
803
- bridgeDebug: S?.debug,
804
- onRefreshToken: Te,
799
+ defaultGateway: C,
800
+ enableSubscriptions: w,
801
+ onAuthError: Oe,
802
+ onNetworkError: ke,
803
+ onRefreshToken: X,
804
+ workspaceOperationGuard: I,
805
+ children: /* @__PURE__ */ K(p, {
806
+ bridgeUrl: x?.url,
807
+ bridgeAllowedOrigins: x?.allowedOrigins,
808
+ bridgeDebug: x?.debug,
809
+ onRefreshToken: Ae,
805
810
  onBridgeReady: () => {
806
- Y.current = !1;
811
+ q.current = !1;
807
812
  },
808
813
  onSessionExpiringSoon: () => {
809
814
  console.warn("[Auth] Session will expire in 5 minutes");
810
815
  },
811
816
  onTokenExpired: () => {
812
- X();
817
+ J();
813
818
  },
814
- children: /* @__PURE__ */ q(_, {
819
+ onBeforeIdentityChange: Q.onBeforeIdentityChange,
820
+ children: [/* @__PURE__ */ G(ve, { announcementsRef: Q.announcementsRef }), /* @__PURE__ */ G(m, {
815
821
  syncToUrl: !0,
816
- children: /* @__PURE__ */ q(se, { children: /* @__PURE__ */ q(Le, {
817
- i18nProductId: ae,
818
- platformI18nProductId: oe,
819
- directionMode: z,
820
- fallbackTranslations: O,
821
- defaultBrand: C,
822
- defaultMode: w,
823
- defaultDensity: le,
824
- defaultTypography: ue,
825
- defaultGlass: de,
822
+ children: /* @__PURE__ */ G(ce, { children: /* @__PURE__ */ G(Be, {
823
+ i18nProductId: v,
824
+ platformI18nProductId: se,
825
+ directionMode: L,
826
+ fallbackTranslations: T,
827
+ defaultBrand: ue,
828
+ defaultMode: de,
829
+ defaultDensity: fe,
830
+ defaultTypography: pe,
831
+ defaultGlass: me,
826
832
  productName: s,
827
- brandInitial: T,
828
- enablePWA: fe,
829
- toasterPosition: A,
830
- tourPageIdFromPath: I,
831
- enableWorkspaceTourPermissions: R,
833
+ brandInitial: S,
834
+ enablePWA: he,
835
+ toasterPosition: D,
836
+ tourPageIdFromPath: N,
837
+ enableWorkspaceTourPermissions: F,
832
838
  children: i
833
839
  }) })
834
- })
840
+ })]
835
841
  })
836
842
  }) })
837
843
  })] })
@@ -840,4 +846,4 @@ function He({ config: t, children: i, clearAuthStore: a }) {
840
846
  });
841
847
  }
842
848
  //#endregion
843
- export { He as AppShellProvider, je as resolveAppShellObservabilityConfig };
849
+ export { Ge as AppShellProvider, Pe as resolveAppShellObservabilityConfig };