@burdenoff/fe-libs 2026.904.2 → 2026.904.3

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.
@@ -1,13 +1,14 @@
1
- import { ALL_PRODUCT_DOMAINS as e } from "../config/gatewayUrls.js";
1
+ import { isCapacitorNative as e } from "../native/capacitor.js";
2
+ import { ALL_PRODUCT_DOMAINS as t } from "../config/gatewayUrls.js";
2
3
  //#region src/shared/utils/authCookie.ts
3
- var t = ["bf-sso", "bf-sso-profile"], n = "bf-sso-profile";
4
- function r(e, t = window.location.origin) {
4
+ var n = ["bf-sso", "bf-sso-profile"], r = "bf-sso-profile";
5
+ function i(e, t = window.location.origin) {
5
6
  return encodeURIComponent(JSON.stringify({
6
7
  id: e,
7
8
  origin: t
8
9
  }));
9
10
  }
10
- function i(e) {
11
+ function a(e) {
11
12
  try {
12
13
  let t = JSON.parse(decodeURIComponent(e));
13
14
  return typeof t == "string" ? {
@@ -24,66 +25,66 @@ function i(e) {
24
25
  };
25
26
  }
26
27
  }
27
- function a() {
28
+ function o() {
28
29
  return typeof window > "u" ? null : window.location.hostname.endsWith(".local.burdenoff.com") ? ".local.burdenoff.com" : null;
29
30
  }
30
- function o() {
31
+ function s() {
31
32
  if (typeof window > "u") return [];
32
- let e = window.location.hostname, t = [], n = a();
33
+ let e = window.location.hostname, t = [], n = o();
33
34
  return n && t.push(n), e && !["localhost", "127.0.0.1"].includes(e) && t.push(e), Array.from(new Set(t));
34
35
  }
35
- function s() {
36
- if (typeof window > "u") return !1;
37
- let e = window.location.hostname;
38
- return e.endsWith(".local.burdenoff.com") || e === "localhost" || e === "127.0.0.1";
36
+ function c() {
37
+ if (typeof window > "u" || e()) return !1;
38
+ let t = window.location.hostname;
39
+ return t.endsWith(".local.burdenoff.com") || t === "localhost" || t === "127.0.0.1";
39
40
  }
40
- function c(e = window.location.hostname) {
41
+ function l(e = window.location.hostname) {
41
42
  return e === "localhost" || e === "127.0.0.1" || e === "0.0.0.0" || e === "[::1]" || e === "::1" || e.endsWith(".localhost") || e.endsWith(".local.burdenoff.com");
42
43
  }
43
- function l(t) {
44
- if (!t) return !1;
44
+ function u(e) {
45
+ if (!e) return !1;
45
46
  try {
46
- let n = new URL(t);
47
+ let n = new URL(e);
47
48
  if (!["https:", "http:"].includes(n.protocol) || n.protocol === "http:" && !["localhost", "127.0.0.1"].includes(n.hostname)) return !1;
48
49
  if (n.hostname === "localhost" || n.hostname === "127.0.0.1" || n.hostname.endsWith(".local.burdenoff.com")) return !0;
49
- for (let t of e) if (n.hostname === t || n.hostname === `app.${t}` || n.hostname === `alphaapp.${t}` || n.hostname === `admin.${t}` || n.hostname === `alphaadmin.${t}` || n.hostname === `www.${t}`) return !0;
50
+ for (let e of t) if (n.hostname === e || n.hostname === `app.${e}` || n.hostname === `alphaapp.${e}` || n.hostname === `admin.${e}` || n.hostname === `alphaadmin.${e}` || n.hostname === `www.${e}`) return !0;
50
51
  return !1;
51
52
  } catch {
52
53
  return !1;
53
54
  }
54
55
  }
55
- function u(e, n = window.location.origin) {
56
+ function d(e, t = window.location.origin) {
56
57
  if (typeof document > "u") return;
57
- f();
58
- let i = a(), o = i ? `; domain=${i}` : "", s = window.location.protocol === "https:" ? "; secure" : "", c = r(e, n);
59
- for (let e of t) document.cookie = `${e}=${c}${o}; path=/; samesite=lax${s}; max-age=86400`;
58
+ p();
59
+ let r = o(), a = r ? `; domain=${r}` : "", s = window.location.protocol === "https:" ? "; secure" : "", c = i(e, t);
60
+ for (let e of n) document.cookie = `${e}=${c}${a}; path=/; samesite=lax${s}; max-age=86400`;
60
61
  }
61
- function d() {
62
+ function f() {
62
63
  if (typeof document > "u") return null;
63
- for (let e of t) {
64
+ for (let e of n) {
64
65
  let t = document.cookie.match(RegExp(`(?:^|;\\s*)${e}=([^;]*)`));
65
66
  if (!t) continue;
66
- let n = i(t[1]);
67
+ let n = a(t[1]);
67
68
  if (n?.id) return n;
68
69
  }
69
70
  return null;
70
71
  }
71
- function f() {
72
- if (!(typeof document > "u")) for (let e of t) {
72
+ function p() {
73
+ if (!(typeof document > "u")) for (let e of n) {
73
74
  document.cookie = `${e}=; path=/; max-age=0`;
74
- for (let t of o()) document.cookie = `${e}=; path=/; domain=${t}; max-age=0`;
75
+ for (let t of s()) document.cookie = `${e}=; path=/; domain=${t}; max-age=0`;
75
76
  }
76
77
  }
77
- function p(e) {
78
- u(e);
78
+ function m(e) {
79
+ d(e);
79
80
  }
80
- function m() {
81
+ function h() {
81
82
  if (typeof document > "u") return null;
82
- let e = document.cookie.match(RegExp(`(?:^|;\\s*)${n}=([^;]*)`));
83
- return e ? i(e[1])?.id ?? null : null;
83
+ let e = document.cookie.match(RegExp(`(?:^|;\\s*)${r}=([^;]*)`));
84
+ return e ? a(e[1])?.id ?? null : null;
84
85
  }
85
- function h() {
86
- f();
86
+ function g() {
87
+ p();
87
88
  }
88
89
  //#endregion
89
- export { h as clearSSoCookie, f as clearShellSsoCookies, m as getSSoCookie, c as isLocalDevSsoHost, s as isSharedSsoCookieDomain, l as isTrustedSsoOrigin, d as readShellSsoCookie, p as setSSoCookie, u as setShellSsoCookies };
90
+ export { g as clearSSoCookie, p as clearShellSsoCookies, h as getSSoCookie, l as isLocalDevSsoHost, c as isSharedSsoCookieDomain, u as isTrustedSsoOrigin, f as readShellSsoCookie, m as setSSoCookie, d as setShellSsoCookies };
@@ -1 +1 @@
1
- {"version":3,"file":"gatewayFetchRewrite.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/gatewayFetchRewrite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,kBAAkB;IACjC,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,sCAAsC;IACtC,KAAK,EAAE,YAAY,CAAC;CACrB;AA0GD,wBAAgB,gCAAgC,IAAI,IAAI,CAEvD;AAkPD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,CAAC,EAAE,kBAAkB,EAAE,EACpC,aAAa,CAAC,EAAE,YAAY,GAC3B,YAAY,CAmBd;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,OAAO,EAChB,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,EACpC,SAAS,CAAC,EAAE,MAAM,EAClB,aAAa,CAAC,EAAE,MAAM,GACrB,OAAO,CAET;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,QAAQ,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACzD;AAED;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,YAAY,EACnB,QAAQ,CAAC,EAAE,0BAA0B,GACpC,IAAI,CA6HN;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,SAAyB,GAAG,IAAI,CAQtE"}
1
+ {"version":3,"file":"gatewayFetchRewrite.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/gatewayFetchRewrite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,kBAAkB;IACjC,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,sCAAsC;IACtC,KAAK,EAAE,YAAY,CAAC;CACrB;AAgHD,wBAAgB,gCAAgC,IAAI,IAAI,CAEvD;AAkPD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,CAAC,EAAE,kBAAkB,EAAE,EACpC,aAAa,CAAC,EAAE,YAAY,GAC3B,YAAY,CAiCd;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,OAAO,EAChB,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,EACpC,SAAS,CAAC,EAAE,MAAM,EAClB,aAAa,CAAC,EAAE,MAAM,GACrB,OAAO,CAET;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,QAAQ,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACzD;AAED;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,YAAY,EACnB,QAAQ,CAAC,EAAE,0BAA0B,GACpC,IAAI,CA6HN;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,SAAyB,GAAG,IAAI,CAQtE"}
@@ -1,40 +1,44 @@
1
- import { getDesktopGatewayBases as e } from "../native/desktop.js";
2
- import { ALL_PRODUCT_DOMAINS as t } from "../config/gatewayUrls.js";
1
+ import { isCapacitorNative as e } from "../native/capacitor.js";
2
+ import { getDesktopGatewayBases as t } from "../native/desktop.js";
3
+ import { ALL_PRODUCT_DOMAINS as n, resolveNativeDeployTarget as r } from "../config/gatewayUrls.js";
3
4
  //#region src/shared/utils/gatewayFetchRewrite.ts
4
- var n = {
5
+ var i = {
5
6
  globalBase: "https://graphql.burdenoff.com",
6
7
  workspaceBase: "https://graphqlworkspaces.burdenoff.com"
7
8
  };
8
- function r(e) {
9
+ function a(e) {
9
10
  let t = `https://${e}`;
10
11
  return {
11
12
  globalBase: t,
12
13
  workspaceBase: t
13
14
  };
14
15
  }
15
- var i = [
16
- ...t.flatMap((e) => [{
16
+ var o = [
17
+ ...n.flatMap((e) => [{
17
18
  hostname: `app.${e}`,
18
- bases: n
19
+ bases: i
19
20
  }, {
20
21
  hostname: `alphaapp.${e}`,
21
- bases: r(`alphaapp.${e}`)
22
+ bases: a(`alphaapp.${e}`)
22
23
  }]),
23
24
  {
24
25
  hostname: "admin.burdenoff.com",
25
- bases: n
26
+ bases: i
26
27
  },
27
28
  {
28
29
  hostname: "alphaadmin.burdenoff.com",
29
- bases: r("alphaadmin.burdenoff.com")
30
+ bases: a("alphaadmin.burdenoff.com")
30
31
  }
31
- ], a = {
32
+ ], s = {
33
+ globalBase: "https://alphagraphql.burdenoff.com",
34
+ workspaceBase: "https://alphagraphqlworkspaces.burdenoff.com"
35
+ }, c = {
32
36
  globalBase: "https://gw-global.local.burdenoff.com",
33
37
  workspaceBase: "https://gw-wspace.local.burdenoff.com"
34
- }, o = 15e3, s = 1e4, c = {
38
+ }, l = 15e3, u = 1e4, d = {
35
39
  global: "https://alphagraphql.burdenoff.com/__cf-access-prime",
36
40
  workspace: "https://alphagraphqlworkspaces.burdenoff.com/__cf-access-prime"
37
- }, l = ["global", "workspace"], u = "bf-alpha-api-access-primed", d = 1200 * 60 * 1e3, f = "bf-alpha-api-access-prime-attempted", p = 15e3, m = new Set([
41
+ }, f = ["global", "workspace"], p = "bf-alpha-api-access-primed", m = 1200 * 60 * 1e3, h = "bf-alpha-api-access-prime-attempted", g = 15e3, _ = new Set([
38
42
  "/auth/oauth/callback",
39
43
  "/auth/session-bridge",
40
44
  "/auth/sso-callback",
@@ -42,11 +46,11 @@ var i = [
42
46
  "/auth/sso-deposit",
43
47
  "/auth/sso-relay",
44
48
  "/auth/sso/callback"
45
- ]), h = [
49
+ ]), v = [
46
50
  "traceparent",
47
51
  "tracestate",
48
52
  "baggage"
49
- ], g = [
53
+ ], y = [
50
54
  "authorization",
51
55
  "accept-language",
52
56
  "x-org-id",
@@ -56,53 +60,53 @@ var i = [
56
60
  "x-geo-currency",
57
61
  "x-geo-timezone"
58
62
  ];
59
- function _() {
63
+ function b() {
60
64
  let e = globalThis;
61
65
  return e.__boffGraphQLResponseCache ||= /* @__PURE__ */ new Map(), e.__boffGraphQLResponseCache;
62
66
  }
63
- function v() {
64
- _().clear();
67
+ function x() {
68
+ b().clear();
65
69
  }
66
- function y(e) {
67
- return e === "alphaadmin.burdenoff.com" || t.some((t) => e === `alphaapp.${t}`);
70
+ function S(e) {
71
+ return e === "alphaadmin.burdenoff.com" || n.some((t) => e === `alphaapp.${t}`);
68
72
  }
69
- function b(e) {
73
+ function C(e) {
70
74
  try {
71
75
  return new URL(e.globalBase).hostname === "alphagraphql.burdenoff.com" && new URL(e.workspaceBase).hostname === "alphagraphqlworkspaces.burdenoff.com";
72
76
  } catch {
73
77
  return !1;
74
78
  }
75
79
  }
76
- var x = "cf_primed";
77
- function S() {
80
+ var w = "cf_primed";
81
+ function T() {
78
82
  try {
79
83
  return globalThis.sessionStorage ?? null;
80
84
  } catch {
81
85
  return null;
82
86
  }
83
87
  }
84
- function C(e) {
85
- return `${u}-${e}-at`;
88
+ function E(e) {
89
+ return `${p}-${e}-at`;
86
90
  }
87
- function w(e) {
88
- return `${f}-${e}-at`;
91
+ function D(e) {
92
+ return `${h}-${e}-at`;
89
93
  }
90
- function T(e) {
94
+ function O(e) {
91
95
  try {
92
- return l.find((t) => e.getItem(w(t)) !== null) ?? null;
96
+ return f.find((t) => e.getItem(D(t)) !== null) ?? null;
93
97
  } catch {
94
98
  return null;
95
99
  }
96
100
  }
97
- function E(e, t, n) {
98
- let r = e.getItem(C(t)), i = r ? Number(r) : 0;
99
- return Number.isFinite(i) && n - i < d;
101
+ function k(e, t, n) {
102
+ let r = e.getItem(E(t)), i = r ? Number(r) : 0;
103
+ return Number.isFinite(i) && n - i < m;
100
104
  }
101
- function D(e, t, n) {
102
- let r = e.getItem(w(t)), i = r ? Number(r) : 0;
103
- return Number.isFinite(i) && n - i < p;
105
+ function A(e, t, n) {
106
+ let r = e.getItem(D(t)), i = r ? Number(r) : 0;
107
+ return Number.isFinite(i) && n - i < g;
104
108
  }
105
- function O() {
109
+ function j() {
106
110
  try {
107
111
  let e = new URL(window.location.href || window.location.origin);
108
112
  return e.hash = "", e.toString();
@@ -110,38 +114,38 @@ function O() {
110
114
  return window.location.origin;
111
115
  }
112
116
  }
113
- function k() {
114
- return window.location.hash ? !0 : m.has(window.location.pathname);
117
+ function M() {
118
+ return window.location.hash ? !0 : _.has(window.location.pathname);
115
119
  }
116
- function A(e, t) {
120
+ function N(e, t) {
117
121
  let n;
118
122
  try {
119
123
  n = new URL(window.location.href);
120
124
  } catch {
121
125
  return null;
122
126
  }
123
- let r = n.searchParams.get(x), i = r === "global" ? "global" : r === "workspace" ? "workspace" : r === "1" ? T(e) ?? "global" : null;
127
+ let r = n.searchParams.get(w), i = r === "global" ? "global" : r === "workspace" ? "workspace" : r === "1" ? O(e) ?? "global" : null;
124
128
  if (!i) return null;
125
- n.searchParams.delete(x);
129
+ n.searchParams.delete(w);
126
130
  try {
127
- e.setItem(C(i), String(t)), e.removeItem(w(i));
131
+ e.setItem(E(i), String(t)), e.removeItem(D(i));
128
132
  } catch {}
129
133
  return window.history.replaceState(window.history.state, "", n.toString()), i;
130
134
  }
131
- function j(e) {
132
- if (typeof window > "u" || !b(e) || !y(window.location.hostname.toLowerCase())) return !1;
133
- let t = S();
135
+ function P(e) {
136
+ if (typeof window > "u" || !C(e) || !S(window.location.hostname.toLowerCase())) return !1;
137
+ let t = T();
134
138
  if (!t) return !1;
135
139
  let n = Date.now();
136
- if (A(t, n), k()) return !1;
137
- let r = l.find((e) => !E(t, e, n));
138
- if (!r || D(t, r, n)) return !1;
140
+ if (N(t, n), M()) return !1;
141
+ let r = f.find((e) => !k(t, e, n));
142
+ if (!r || A(t, r, n)) return !1;
139
143
  try {
140
- t.setItem(w(r), String(n));
144
+ t.setItem(D(r), String(n));
141
145
  } catch {}
142
- let i = new URL(O());
143
- r === "workspace" && i.searchParams.set(x, r);
144
- let a = new URL(c[r]);
146
+ let i = new URL(j());
147
+ r === "workspace" && i.searchParams.set(w, r);
148
+ let a = new URL(d[r]);
145
149
  a.searchParams.set("returnTo", i.toString());
146
150
  try {
147
151
  return window.location.replace(a.toString()), !0;
@@ -149,25 +153,25 @@ function j(e) {
149
153
  return !1;
150
154
  }
151
155
  }
152
- function M(e) {
156
+ function F(e) {
153
157
  return typeof e.query == "string" ? /\bquery\b/.test(e.query) && !/\bmutation\b|\bsubscription\b/.test(e.query) : !1;
154
158
  }
155
- function N(e) {
159
+ function I(e) {
156
160
  return typeof e.operationName == "string" && e.operationName ? e.operationName : typeof e.query == "string" ? e.query.match(/(?:query|mutation|subscription)\s+([A-Za-z0-9_]+)/)?.[1] ?? null : null;
157
161
  }
158
- function P(e) {
159
- return Object.fromEntries(g.map((t) => [t, e.get(t) ?? ""]));
162
+ function L(e) {
163
+ return Object.fromEntries(y.map((t) => [t, e.get(t) ?? ""]));
160
164
  }
161
- function F(e, t) {
162
- let n = N(t);
163
- return !n || !M(t) ? null : JSON.stringify({
165
+ function R(e, t) {
166
+ let n = I(t);
167
+ return !n || !F(t) ? null : JSON.stringify({
164
168
  url: e.url,
165
- headers: P(e.headers),
169
+ headers: L(e.headers),
166
170
  operationName: n,
167
171
  variables: t.variables ?? null
168
172
  });
169
173
  }
170
- function I(e) {
174
+ function z(e) {
171
175
  try {
172
176
  let t = JSON.parse(e);
173
177
  return Array.isArray(t) ? t : t && typeof t == "object" ? [t] : null;
@@ -175,53 +179,57 @@ function I(e) {
175
179
  return null;
176
180
  }
177
181
  }
178
- function L(e, t) {
182
+ function B(e, t) {
179
183
  return new Response(JSON.stringify(t ? e : e[0]), {
180
184
  status: 200,
181
185
  headers: { "content-type": "application/json" }
182
186
  });
183
187
  }
184
- function R() {
185
- return typeof performance < "u" && performance.now() < s;
188
+ function V() {
189
+ return typeof performance < "u" && performance.now() < u;
186
190
  }
187
- function z(e) {
191
+ function H(e) {
188
192
  let t = new Headers(e.headers), n = !1;
189
- for (let e of h) t.has(e) && (t.delete(e), n = !0);
193
+ for (let e of v) t.has(e) && (t.delete(e), n = !0);
190
194
  return n ? new Request(e, { headers: t }) : e;
191
195
  }
192
- function B(t, n) {
193
- let r = e();
194
- if (r) return r;
195
- let o = window.location.hostname.toLowerCase(), s = [...i, ...t ?? []];
196
- for (let e of s) if (o === e.hostname) return e.bases;
197
- return n ?? a;
196
+ function U(n, a) {
197
+ let l = t();
198
+ if (l) return l;
199
+ if (e()) {
200
+ let e = r();
201
+ return e === "local" ? a ?? c : e === "alpha" ? s : i;
202
+ }
203
+ let u = window.location.hostname.toLowerCase(), d = [...o, ...n ?? []];
204
+ for (let e of d) if (u === e.hostname) return e.bases;
205
+ return a ?? c;
198
206
  }
199
- function V(e, t) {
207
+ function W(e, t) {
200
208
  let { globalBase: n, workspaceBase: r } = e;
201
209
  if (!n || !r) return;
202
- let i = j(e), a = globalThis.fetch.bind(globalThis), s = window.location.origin, c = new Set([s, "https://gw-global.local.burdenoff.com"]), l = new Set([s, "https://gw-wspace.local.burdenoff.com"]), u = (e) => /(?:^|\/)global\/graphql$/.test(e) ? "/global/graphql" : /(?:^|\/)workspaces\/graphql$/.test(e) ? "/workspaces/graphql" : "", d = (e) => {
210
+ let i = P(e), a = globalThis.fetch.bind(globalThis), o = window.location.origin, s = new Set([o, "https://gw-global.local.burdenoff.com"]), c = new Set([o, "https://gw-wspace.local.burdenoff.com"]), u = (e) => /(?:^|\/)global\/graphql$/.test(e) ? "/global/graphql" : /(?:^|\/)workspaces\/graphql$/.test(e) ? "/workspaces/graphql" : "", d = (e) => {
203
211
  let t = new URL(e, window.location.origin), i = u(t.pathname);
204
- return i === "/global/graphql" && c.has(t.origin) ? `${n}${i}${t.search}${t.hash}` : i === "/workspaces/graphql" && l.has(t.origin) ? `${r}${i}${t.search}${t.hash}` : e;
212
+ return i === "/global/graphql" && s.has(t.origin) ? `${n}${i}${t.search}${t.hash}` : i === "/workspaces/graphql" && c.has(t.origin) ? `${r}${i}${t.search}${t.hash}` : e;
205
213
  }, f = async (e) => {
206
214
  let t = /(?:^|\/)graphql$/.test(new URL(e.url).pathname);
207
215
  if (i && t) return new Promise(() => void 0);
208
216
  if (!(e.method.toUpperCase() === "POST" && t)) return a(e);
209
- let n = await e.clone().text(), r = z(e.clone()), s = I(n);
210
- if (!s?.length) return a(e);
211
- let c = n.trimStart().startsWith("["), l = s.map((e) => F(r, e));
212
- if (R() && l.every(Boolean)) {
213
- let e = _(), t = l.map((t) => e.get(t)), n = Date.now();
214
- if (t.every((e) => e && e.expiresAt > n)) return L(t.map((e) => e.value), c);
217
+ let n = await e.clone().text(), r = H(e.clone()), o = z(n);
218
+ if (!o?.length) return a(e);
219
+ let s = n.trimStart().startsWith("["), c = o.map((e) => R(r, e));
220
+ if (V() && c.every(Boolean)) {
221
+ let e = b(), t = c.map((t) => e.get(t)), n = Date.now();
222
+ if (t.every((e) => e && e.expiresAt > n)) return B(t.map((e) => e.value), s);
215
223
  }
216
224
  let u = await a(e);
217
- if (!u.ok || !l.some(Boolean) || !R()) return u;
225
+ if (!u.ok || !c.some(Boolean) || !V()) return u;
218
226
  try {
219
- let e = await u.clone().json(), t = Array.isArray(e) ? e : [e], n = _();
227
+ let e = await u.clone().json(), t = Array.isArray(e) ? e : [e], n = b();
220
228
  t.forEach((e, t) => {
221
- let r = l[t];
229
+ let r = c[t];
222
230
  r && (e && typeof e == "object" && "errors" in e && Array.isArray(e.errors) || n.set(r, {
223
231
  value: e,
224
- expiresAt: Date.now() + o
232
+ expiresAt: Date.now() + l
225
233
  }));
226
234
  });
227
235
  } catch {}
@@ -237,7 +245,7 @@ function V(e, t) {
237
245
  });
238
246
  p.preconnect && (m.preconnect = p.preconnect), globalThis.fetch = m;
239
247
  }
240
- function H(e = "VITE_VERBOSE_CONSOLE") {
248
+ function G(e = "VITE_VERBOSE_CONSOLE") {
241
249
  ({
242
250
  BASE_URL: "/",
243
251
  DEV: !1,
@@ -247,4 +255,4 @@ function H(e = "VITE_VERBOSE_CONSOLE") {
247
255
  })?.[e] !== "true" && (console.log = () => {}, console.info = () => {}, console.debug = () => {});
248
256
  }
249
257
  //#endregion
250
- export { v as clearGatewayGraphQLResponseCache, V as installGatewayFetchRewrite, B as resolveGatewayBases, H as suppressConsole };
258
+ export { x as clearGatewayGraphQLResponseCache, W as installGatewayFetchRewrite, U as resolveGatewayBases, G as suppressConsole };
@@ -24,8 +24,16 @@ function g(e) {
24
24
  return m[e];
25
25
  }
26
26
  function _(e, t) {
27
- let n = m[t], r = e || n.defaultBaseUrl;
27
+ let n = m[t], r = e || v(t) || n.defaultBaseUrl;
28
28
  return `${r.endsWith("/") ? r.slice(0, -1) : r}${n.graphql}`;
29
29
  }
30
+ function v(t) {
31
+ try {
32
+ let n = e();
33
+ return t === "workspace" ? n.workspaceBaseUrl : n.globalBaseUrl;
34
+ } catch {
35
+ return;
36
+ }
37
+ }
30
38
  //#endregion
31
39
  export { s as COMMON_SHELL_LESS_ROUTES, p as DEFAULT_PAGE_SIZE, c as DEFAULT_SHELL_CONFIG, m as GATEWAYS, r as PRODUCTS, i as PRODUCT_URLS, g as getGatewayConfig, _ as getGatewayUrl, h as getGraphQLEndpoint, a as getProductUrl, o as getProductsWithUrls, l as getShellConfig, u as isShellLessRoute, t as resolveAuthBridgeConfig, e as resolveGatewayUrls, n as resolveShellAuthBridgeConfig, d as shouldShowBreadcrumb, f as shouldShowSidebar };
@@ -1,23 +1,24 @@
1
- import { DESKTOP_UPDATE_UNSUPPORTED as e, DESKTOP_WINDOW_STATE_DEFAULT as t, bootDesktopShell as n, desktopCheckForUpdates as r, desktopDeepLinkToPath as i, desktopInstallUpdate as a, desktopNotify as o, desktopOpenExternal as s, desktopSetBadgeCount as c, desktopSetLocale as l, desktopSetTheme as u, desktopSetTrayQuickActions as d, getDesktopAuthBridgeConfig as f, getDesktopBridge as p, getDesktopGatewayBases as m, getDesktopGatewayUrls as h, getDesktopRuntimeConfig as g, getDesktopUpdateState as _, getDesktopWindowState as v, getLegacyDesktopRuntime as y, installDesktopDeepLinkHandler as b, installDesktopNavigateHandler as x, isDesktop as S, onDesktopUpdateState as C, onDesktopWindowState as w, registerDesktopNavigator as T } from "./shared/native/desktop.js";
2
- import { getNativeBridge as E } from "./shared/native/bridge.js";
3
- import { getPlatform as D, isAndroid as O, isElectron as k, isIOS as A, isInstalledApp as j, isNative as M, isStandalonePWA as N, isWeb as P, isWebBrowser as F } from "./shared/native/platform.js";
4
- import { nativeActionSheet as I, nativeConfirm as L, nativeCopyText as R, nativeImpact as z, nativeNotify as B, nativeOpenUrl as V, nativeSelection as H, nativeShare as U, nativeToast as W } from "./shared/native/consumers.js";
5
- import { SafeAreaView as G } from "./shared/native/SafeAreaView.js";
6
- import { readInitialNetworkStatus as K, reduceNetworkStatus as q, useNetworkStatus as J } from "./shared/native/hooks/useNetworkStatus.js";
7
- import { PULL_TO_REFRESH_THRESHOLD as Y, computePullOffset as X, computePullProgress as Z, usePullToRefresh as Q } from "./shared/native/hooks/usePullToRefresh.js";
8
- import { useNativePlatform as $ } from "./shared/native/hooks/useNativePlatform.js";
9
- import { useSafeArea as ee } from "./shared/native/hooks/useSafeArea.js";
10
- import { useNativeKeyboard as te } from "./shared/native/hooks/useNativeKeyboard.js";
11
- import { useAppState as ne } from "./shared/native/hooks/useAppState.js";
12
- import { useDeviceInfo as re } from "./shared/native/hooks/useDeviceInfo.js";
13
- import { useHaptics as ie } from "./shared/native/hooks/useHaptics.js";
14
- import { useStatusBar as ae } from "./shared/native/hooks/useStatusBar.js";
15
- import { resolveActionSheetOutcome as oe, useActionSheet as se } from "./shared/native/hooks/useActionSheet.js";
16
- import { useDesktop as ce } from "./shared/native/hooks/useDesktop.js";
17
- import { useDesktopUpdateState as le } from "./shared/native/hooks/useDesktopUpdateState.js";
18
- import { useDesktopWindowState as ue } from "./shared/native/hooks/useDesktopWindowState.js";
1
+ import { getCapacitorPlatform as e, isCapacitorNative as t } from "./shared/native/capacitor.js";
2
+ import { DESKTOP_UPDATE_UNSUPPORTED as n, DESKTOP_WINDOW_STATE_DEFAULT as r, bootDesktopShell as i, desktopCheckForUpdates as a, desktopDeepLinkToPath as o, desktopInstallUpdate as s, desktopNotify as c, desktopOpenExternal as l, desktopSetBadgeCount as u, desktopSetLocale as d, desktopSetTheme as f, desktopSetTrayQuickActions as p, getDesktopAuthBridgeConfig as m, getDesktopBridge as h, getDesktopGatewayBases as g, getDesktopGatewayUrls as _, getDesktopRuntimeConfig as v, getDesktopUpdateState as y, getDesktopWindowState as b, getLegacyDesktopRuntime as x, installDesktopDeepLinkHandler as S, installDesktopNavigateHandler as C, isDesktop as w, onDesktopUpdateState as T, onDesktopWindowState as E, registerDesktopNavigator as D } from "./shared/native/desktop.js";
3
+ import { getNativeBridge as O } from "./shared/native/bridge.js";
4
+ import { getPlatform as k, isAndroid as A, isElectron as j, isIOS as M, isInstalledApp as N, isNative as P, isStandalonePWA as F, isWeb as I, isWebBrowser as L } from "./shared/native/platform.js";
5
+ import { nativeActionSheet as R, nativeConfirm as z, nativeCopyText as B, nativeImpact as V, nativeNotify as H, nativeOpenUrl as U, nativeSelection as W, nativeShare as G, nativeToast as K } from "./shared/native/consumers.js";
6
+ import { SafeAreaView as q } from "./shared/native/SafeAreaView.js";
7
+ import { readInitialNetworkStatus as J, reduceNetworkStatus as Y, useNetworkStatus as X } from "./shared/native/hooks/useNetworkStatus.js";
8
+ import { PULL_TO_REFRESH_THRESHOLD as Z, computePullOffset as Q, computePullProgress as $, usePullToRefresh as ee } from "./shared/native/hooks/usePullToRefresh.js";
9
+ import { useNativePlatform as te } from "./shared/native/hooks/useNativePlatform.js";
10
+ import { useSafeArea as ne } from "./shared/native/hooks/useSafeArea.js";
11
+ import { useNativeKeyboard as re } from "./shared/native/hooks/useNativeKeyboard.js";
12
+ import { useAppState as ie } from "./shared/native/hooks/useAppState.js";
13
+ import { useDeviceInfo as ae } from "./shared/native/hooks/useDeviceInfo.js";
14
+ import { useHaptics as oe } from "./shared/native/hooks/useHaptics.js";
15
+ import { useStatusBar as se } from "./shared/native/hooks/useStatusBar.js";
16
+ import { resolveActionSheetOutcome as ce, useActionSheet as le } from "./shared/native/hooks/useActionSheet.js";
17
+ import { useDesktop as ue } from "./shared/native/hooks/useDesktop.js";
18
+ import { useDesktopUpdateState as de } from "./shared/native/hooks/useDesktopUpdateState.js";
19
+ import { useDesktopWindowState as fe } from "./shared/native/hooks/useDesktopWindowState.js";
19
20
  import "./shared/native/hooks/index.js";
20
- import { acknowledgeNativePurchase as de, getNativeProducts as fe, getNativePurchases as pe, installNativeIAP as me, isNativeIAPAvailable as he, purchaseNativeProduct as ge, restoreNativePurchases as _e } from "./shared/native/purchases.js";
21
- import { getNativeEntryRoutes as ve, shouldShowNativeWelcome as ye } from "./shared/native/entry.js";
22
- import { getPushOptInController as be, registerPushOptInController as xe } from "./shared/native/push-optin.js";
23
- export { e as DESKTOP_UPDATE_UNSUPPORTED, t as DESKTOP_WINDOW_STATE_DEFAULT, Y as PULL_TO_REFRESH_THRESHOLD, G as SafeAreaView, de as acknowledgeNativePurchase, n as bootDesktopShell, X as computePullOffset, Z as computePullProgress, r as desktopCheckForUpdates, i as desktopDeepLinkToPath, a as desktopInstallUpdate, o as desktopNotify, s as desktopOpenExternal, c as desktopSetBadgeCount, l as desktopSetLocale, u as desktopSetTheme, d as desktopSetTrayQuickActions, f as getDesktopAuthBridgeConfig, p as getDesktopBridge, m as getDesktopGatewayBases, h as getDesktopGatewayUrls, g as getDesktopRuntimeConfig, _ as getDesktopUpdateState, v as getDesktopWindowState, y as getLegacyDesktopRuntime, E as getNativeBridge, ve as getNativeEntryRoutes, fe as getNativeProducts, pe as getNativePurchases, D as getPlatform, be as getPushOptInController, b as installDesktopDeepLinkHandler, x as installDesktopNavigateHandler, me as installNativeIAP, O as isAndroid, S as isDesktop, k as isElectron, A as isIOS, j as isInstalledApp, M as isNative, he as isNativeIAPAvailable, N as isStandalonePWA, P as isWeb, F as isWebBrowser, I as nativeActionSheet, L as nativeConfirm, R as nativeCopyText, z as nativeImpact, B as nativeNotify, V as nativeOpenUrl, H as nativeSelection, U as nativeShare, W as nativeToast, C as onDesktopUpdateState, w as onDesktopWindowState, ge as purchaseNativeProduct, K as readInitialNetworkStatus, q as reduceNetworkStatus, T as registerDesktopNavigator, xe as registerPushOptInController, oe as resolveActionSheetOutcome, _e as restoreNativePurchases, ye as shouldShowNativeWelcome, se as useActionSheet, ne as useAppState, ce as useDesktop, le as useDesktopUpdateState, ue as useDesktopWindowState, re as useDeviceInfo, ie as useHaptics, te as useNativeKeyboard, $ as useNativePlatform, J as useNetworkStatus, Q as usePullToRefresh, ee as useSafeArea, ae as useStatusBar };
21
+ import { acknowledgeNativePurchase as pe, getNativeProducts as me, getNativePurchases as he, installNativeIAP as ge, isNativeIAPAvailable as _e, purchaseNativeProduct as ve, restoreNativePurchases as ye } from "./shared/native/purchases.js";
22
+ import { getNativeEntryRoutes as be, shouldShowNativeWelcome as xe } from "./shared/native/entry.js";
23
+ import { getPushOptInController as Se, registerPushOptInController as Ce } from "./shared/native/push-optin.js";
24
+ export { n as DESKTOP_UPDATE_UNSUPPORTED, r as DESKTOP_WINDOW_STATE_DEFAULT, Z as PULL_TO_REFRESH_THRESHOLD, q as SafeAreaView, pe as acknowledgeNativePurchase, i as bootDesktopShell, Q as computePullOffset, $ as computePullProgress, a as desktopCheckForUpdates, o as desktopDeepLinkToPath, s as desktopInstallUpdate, c as desktopNotify, l as desktopOpenExternal, u as desktopSetBadgeCount, d as desktopSetLocale, f as desktopSetTheme, p as desktopSetTrayQuickActions, e as getCapacitorPlatform, m as getDesktopAuthBridgeConfig, h as getDesktopBridge, g as getDesktopGatewayBases, _ as getDesktopGatewayUrls, v as getDesktopRuntimeConfig, y as getDesktopUpdateState, b as getDesktopWindowState, x as getLegacyDesktopRuntime, O as getNativeBridge, be as getNativeEntryRoutes, me as getNativeProducts, he as getNativePurchases, k as getPlatform, Se as getPushOptInController, S as installDesktopDeepLinkHandler, C as installDesktopNavigateHandler, ge as installNativeIAP, A as isAndroid, t as isCapacitorNative, w as isDesktop, j as isElectron, M as isIOS, N as isInstalledApp, P as isNative, _e as isNativeIAPAvailable, F as isStandalonePWA, I as isWeb, L as isWebBrowser, R as nativeActionSheet, z as nativeConfirm, B as nativeCopyText, V as nativeImpact, H as nativeNotify, U as nativeOpenUrl, W as nativeSelection, G as nativeShare, K as nativeToast, T as onDesktopUpdateState, E as onDesktopWindowState, ve as purchaseNativeProduct, J as readInitialNetworkStatus, Y as reduceNetworkStatus, D as registerDesktopNavigator, Ce as registerPushOptInController, ce as resolveActionSheetOutcome, ye as restoreNativePurchases, xe as shouldShowNativeWelcome, le as useActionSheet, ie as useAppState, ue as useDesktop, de as useDesktopUpdateState, fe as useDesktopWindowState, ae as useDeviceInfo, oe as useHaptics, re as useNativeKeyboard, te as useNativePlatform, X as useNetworkStatus, ee as usePullToRefresh, ne as useSafeArea, se as useStatusBar };