@burtson-labs/bandit-engine 2.0.99 → 2.0.100
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/{aiProviderStore-337QNQB3.mjs → aiProviderStore-FTD277QP.mjs} +2 -2
- package/dist/chat-PMO3WTM4.mjs +16 -0
- package/dist/chat-provider.js +152 -111
- package/dist/chat-provider.js.map +1 -1
- package/dist/chat-provider.mjs +5 -5
- package/dist/{chunk-J2PMXOV2.mjs → chunk-37JLV5PU.mjs} +18 -143
- package/dist/chunk-37JLV5PU.mjs.map +1 -0
- package/dist/{chunk-H3BYFEIE.mjs → chunk-43MLINPL.mjs} +157 -7
- package/dist/chunk-43MLINPL.mjs.map +1 -0
- package/dist/{chunk-L2EKYO4F.mjs → chunk-BN3D45E2.mjs} +4 -4
- package/dist/{chunk-I7WBZVTR.mjs → chunk-GGSK5RVZ.mjs} +12 -12
- package/dist/{chunk-ZLXWNTFK.mjs → chunk-HAUDGBUS.mjs} +3 -5
- package/dist/{chunk-ZLXWNTFK.mjs.map → chunk-HAUDGBUS.mjs.map} +1 -1
- package/dist/{chunk-RUMVTVNM.mjs → chunk-KYC7CC6C.mjs} +2 -2
- package/dist/{chunk-C2SY64XM.mjs → chunk-R3HBSHLE.mjs} +92 -46
- package/dist/chunk-R3HBSHLE.mjs.map +1 -0
- package/dist/{chunk-AGT77Z3A.mjs → chunk-RN3AKXKI.mjs} +4 -4
- package/dist/{chunk-IVLVUNIB.mjs → chunk-VIKZPBVO.mjs} +5 -5
- package/dist/{chunk-OSSZ7Z2O.mjs → chunk-VTKRZNLI.mjs} +8 -6
- package/dist/{chunk-OSSZ7Z2O.mjs.map → chunk-VTKRZNLI.mjs.map} +1 -1
- package/dist/index.js +105 -35
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -12
- package/dist/index.mjs.map +1 -1
- package/dist/management/management.js +251 -181
- package/dist/management/management.js.map +1 -1
- package/dist/management/management.mjs +8 -8
- package/dist/modals/chat-modal/chat-modal.js +161 -121
- package/dist/modals/chat-modal/chat-modal.js.map +1 -1
- package/dist/modals/chat-modal/chat-modal.mjs +4 -4
- package/package.json +1 -1
- package/dist/chat-IOBCRT5Y.mjs +0 -16
- package/dist/chunk-C2SY64XM.mjs.map +0 -1
- package/dist/chunk-H3BYFEIE.mjs.map +0 -1
- package/dist/chunk-J2PMXOV2.mjs.map +0 -1
- /package/dist/{aiProviderStore-337QNQB3.mjs.map → aiProviderStore-FTD277QP.mjs.map} +0 -0
- /package/dist/{chat-IOBCRT5Y.mjs.map → chat-PMO3WTM4.mjs.map} +0 -0
- /package/dist/{chunk-L2EKYO4F.mjs.map → chunk-BN3D45E2.mjs.map} +0 -0
- /package/dist/{chunk-I7WBZVTR.mjs.map → chunk-GGSK5RVZ.mjs.map} +0 -0
- /package/dist/{chunk-RUMVTVNM.mjs.map → chunk-KYC7CC6C.mjs.map} +0 -0
- /package/dist/{chunk-AGT77Z3A.mjs.map → chunk-RN3AKXKI.mjs.map} +0 -0
- /package/dist/{chunk-IVLVUNIB.mjs.map → chunk-VIKZPBVO.mjs.map} +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
management_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-GGSK5RVZ.mjs";
|
|
4
|
+
import "../chunk-KYC7CC6C.mjs";
|
|
5
|
+
import "../chunk-HAUDGBUS.mjs";
|
|
6
|
+
import "../chunk-BN3D45E2.mjs";
|
|
7
|
+
import "../chunk-RN3AKXKI.mjs";
|
|
8
|
+
import "../chunk-VIKZPBVO.mjs";
|
|
9
|
+
import "../chunk-37JLV5PU.mjs";
|
|
10
10
|
import "../chunk-LWHSOEPR.mjs";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-43MLINPL.mjs";
|
|
12
12
|
import "../chunk-KCI46M23.mjs";
|
|
13
13
|
import "../chunk-BJTO5JO5.mjs";
|
|
14
14
|
export {
|
|
@@ -1399,6 +1399,129 @@ var init_anthropic_provider = __esm({
|
|
|
1399
1399
|
}
|
|
1400
1400
|
});
|
|
1401
1401
|
|
|
1402
|
+
// src/store/authenticationStore.ts
|
|
1403
|
+
var import_zustand2, TOKEN_KEY, validToken, user, rawToken, useAuthenticationStore;
|
|
1404
|
+
var init_authenticationStore = __esm({
|
|
1405
|
+
"src/store/authenticationStore.ts"() {
|
|
1406
|
+
"use strict";
|
|
1407
|
+
import_zustand2 = require("zustand");
|
|
1408
|
+
TOKEN_KEY = "authToken";
|
|
1409
|
+
validToken = null;
|
|
1410
|
+
user = null;
|
|
1411
|
+
rawToken = localStorage.getItem(TOKEN_KEY);
|
|
1412
|
+
if (rawToken) {
|
|
1413
|
+
try {
|
|
1414
|
+
const base64Url = rawToken.split(".")[1];
|
|
1415
|
+
const base64 = base64Url.replace(/-/g, "+").replace(/_/g, "/");
|
|
1416
|
+
const jsonPayload = decodeURIComponent(
|
|
1417
|
+
atob(base64).split("").map((c) => "%" + ("00" + c.charCodeAt(0).toString(16)).slice(-2)).join("")
|
|
1418
|
+
);
|
|
1419
|
+
const decoded = JSON.parse(jsonPayload);
|
|
1420
|
+
if (decoded.exp * 1e3 > Date.now()) {
|
|
1421
|
+
validToken = rawToken;
|
|
1422
|
+
user = decoded;
|
|
1423
|
+
}
|
|
1424
|
+
} catch {
|
|
1425
|
+
validToken = null;
|
|
1426
|
+
user = null;
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
useAuthenticationStore = (0, import_zustand2.create)((set) => ({
|
|
1430
|
+
token: validToken,
|
|
1431
|
+
user,
|
|
1432
|
+
authError: null,
|
|
1433
|
+
setToken: (token) => {
|
|
1434
|
+
if (token) {
|
|
1435
|
+
try {
|
|
1436
|
+
const base64Url = token.split(".")[1];
|
|
1437
|
+
const base64 = base64Url.replace(/-/g, "+").replace(/_/g, "/");
|
|
1438
|
+
const jsonPayload = decodeURIComponent(
|
|
1439
|
+
atob(base64).split("").map((c) => "%" + ("00" + c.charCodeAt(0).toString(16)).slice(-2)).join("")
|
|
1440
|
+
);
|
|
1441
|
+
const user2 = JSON.parse(jsonPayload);
|
|
1442
|
+
localStorage.setItem(TOKEN_KEY, token);
|
|
1443
|
+
set({ token, authError: null, user: user2 });
|
|
1444
|
+
} catch {
|
|
1445
|
+
set({ token: null, authError: "Invalid token", user: null });
|
|
1446
|
+
}
|
|
1447
|
+
} else {
|
|
1448
|
+
set({ token: null, authError: null, user: null });
|
|
1449
|
+
}
|
|
1450
|
+
},
|
|
1451
|
+
clearToken: () => {
|
|
1452
|
+
localStorage.removeItem(TOKEN_KEY);
|
|
1453
|
+
set({ token: null, authError: null, user: null });
|
|
1454
|
+
}
|
|
1455
|
+
}));
|
|
1456
|
+
}
|
|
1457
|
+
});
|
|
1458
|
+
|
|
1459
|
+
// src/services/auth/authenticationService.ts
|
|
1460
|
+
function emitAuthTokenChanged(token) {
|
|
1461
|
+
if (typeof window === "undefined") {
|
|
1462
|
+
return;
|
|
1463
|
+
}
|
|
1464
|
+
window.dispatchEvent(new CustomEvent(AUTH_TOKEN_CHANGED_EVENT, {
|
|
1465
|
+
detail: { token }
|
|
1466
|
+
}));
|
|
1467
|
+
}
|
|
1468
|
+
var TOKEN_KEY2, AUTH_TOKEN_CHANGED_EVENT, AuthenticationService, authenticationService;
|
|
1469
|
+
var init_authenticationService = __esm({
|
|
1470
|
+
"src/services/auth/authenticationService.ts"() {
|
|
1471
|
+
"use strict";
|
|
1472
|
+
init_authenticationStore();
|
|
1473
|
+
init_debugLogger();
|
|
1474
|
+
TOKEN_KEY2 = "authToken";
|
|
1475
|
+
AUTH_TOKEN_CHANGED_EVENT = "bandit:auth-token-changed";
|
|
1476
|
+
AuthenticationService = class {
|
|
1477
|
+
getToken() {
|
|
1478
|
+
const token = localStorage.getItem(TOKEN_KEY2);
|
|
1479
|
+
return token;
|
|
1480
|
+
}
|
|
1481
|
+
setToken(token) {
|
|
1482
|
+
localStorage.setItem(TOKEN_KEY2, token);
|
|
1483
|
+
useAuthenticationStore.getState().setToken(token);
|
|
1484
|
+
emitAuthTokenChanged(token);
|
|
1485
|
+
}
|
|
1486
|
+
clearToken() {
|
|
1487
|
+
localStorage.removeItem(TOKEN_KEY2);
|
|
1488
|
+
useAuthenticationStore.getState().clearToken();
|
|
1489
|
+
emitAuthTokenChanged(null);
|
|
1490
|
+
}
|
|
1491
|
+
isAuthenticated() {
|
|
1492
|
+
const token = useAuthenticationStore.getState().token;
|
|
1493
|
+
return !!token && !this.isTokenExpired(token);
|
|
1494
|
+
}
|
|
1495
|
+
isTokenExpired(token) {
|
|
1496
|
+
try {
|
|
1497
|
+
if (!token) return true;
|
|
1498
|
+
const decoded = this.parseJwtClaims(token);
|
|
1499
|
+
if (!decoded) return true;
|
|
1500
|
+
return decoded.exp * 1e3 < Date.now();
|
|
1501
|
+
} catch {
|
|
1502
|
+
return true;
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
parseJwtClaims(token) {
|
|
1506
|
+
try {
|
|
1507
|
+
const base64Url = token.split(".")[1];
|
|
1508
|
+
const base64 = base64Url.replace(/-/g, "+").replace(/_/g, "/");
|
|
1509
|
+
const jsonPayload = decodeURIComponent(
|
|
1510
|
+
atob(base64).split("").map((c) => {
|
|
1511
|
+
return "%" + ("00" + c.charCodeAt(0).toString(16)).slice(-2);
|
|
1512
|
+
}).join("")
|
|
1513
|
+
);
|
|
1514
|
+
return JSON.parse(jsonPayload);
|
|
1515
|
+
} catch (error) {
|
|
1516
|
+
debugLogger.error("Failed to parse JWT claims:", { error });
|
|
1517
|
+
return null;
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
};
|
|
1521
|
+
authenticationService = new AuthenticationService();
|
|
1522
|
+
}
|
|
1523
|
+
});
|
|
1524
|
+
|
|
1402
1525
|
// src/services/gateway/gateway.service.ts
|
|
1403
1526
|
var import_axios, import_rxjs6, GatewayService;
|
|
1404
1527
|
var init_gateway_service = __esm({
|
|
@@ -1407,6 +1530,7 @@ var init_gateway_service = __esm({
|
|
|
1407
1530
|
import_axios = __toESM(require("axios"));
|
|
1408
1531
|
import_rxjs6 = require("rxjs");
|
|
1409
1532
|
init_debugLogger();
|
|
1533
|
+
init_authenticationService();
|
|
1410
1534
|
GatewayService = class {
|
|
1411
1535
|
constructor(_baseUrl, _tokenFactory, _feedbackEmail) {
|
|
1412
1536
|
this._baseUrl = _baseUrl;
|
|
@@ -1447,7 +1571,10 @@ var init_gateway_service = __esm({
|
|
|
1447
1571
|
});
|
|
1448
1572
|
instance.interceptors.response.use(
|
|
1449
1573
|
(response) => response,
|
|
1450
|
-
(error) =>
|
|
1574
|
+
(error) => {
|
|
1575
|
+
this._handleAuthFailure(error);
|
|
1576
|
+
return Promise.reject(this._normalizeAxiosError(error));
|
|
1577
|
+
}
|
|
1451
1578
|
);
|
|
1452
1579
|
return instance;
|
|
1453
1580
|
}
|
|
@@ -1468,6 +1595,24 @@ var init_gateway_service = __esm({
|
|
|
1468
1595
|
}
|
|
1469
1596
|
return new Error(error.message);
|
|
1470
1597
|
}
|
|
1598
|
+
_handleAuthFailure(error) {
|
|
1599
|
+
const status = error.response?.status;
|
|
1600
|
+
if (status !== 401 && status !== 403) {
|
|
1601
|
+
return;
|
|
1602
|
+
}
|
|
1603
|
+
const data = error.response?.data;
|
|
1604
|
+
const code = data?.code;
|
|
1605
|
+
if (code !== "FORCE_RELOGIN" && code !== "ACCOUNT_LOCKED") {
|
|
1606
|
+
return;
|
|
1607
|
+
}
|
|
1608
|
+
try {
|
|
1609
|
+
authenticationService.clearToken();
|
|
1610
|
+
} catch {
|
|
1611
|
+
}
|
|
1612
|
+
if (typeof window !== "undefined" && typeof window.dispatchEvent === "function") {
|
|
1613
|
+
window.dispatchEvent(new CustomEvent("auth:force-relogin", { detail: { code } }));
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1471
1616
|
_createHttpError(message, response) {
|
|
1472
1617
|
return Object.assign(new Error(message), { response });
|
|
1473
1618
|
}
|
|
@@ -3414,14 +3559,14 @@ var aiProviderStore_exports = {};
|
|
|
3414
3559
|
__export(aiProviderStore_exports, {
|
|
3415
3560
|
useAIProviderStore: () => useAIProviderStore
|
|
3416
3561
|
});
|
|
3417
|
-
var
|
|
3562
|
+
var import_zustand3, useAIProviderStore;
|
|
3418
3563
|
var init_aiProviderStore = __esm({
|
|
3419
3564
|
"src/store/aiProviderStore.ts"() {
|
|
3420
3565
|
"use strict";
|
|
3421
|
-
|
|
3566
|
+
import_zustand3 = require("zustand");
|
|
3422
3567
|
init_ai_provider_factory();
|
|
3423
3568
|
init_debugLogger();
|
|
3424
|
-
useAIProviderStore = (0,
|
|
3569
|
+
useAIProviderStore = (0, import_zustand3.create)((set, get) => ({
|
|
3425
3570
|
provider: null,
|
|
3426
3571
|
config: null,
|
|
3427
3572
|
setProvider: (provider, config) => set({ provider, config }),
|
|
@@ -3449,12 +3594,12 @@ var init_aiProviderStore = __esm({
|
|
|
3449
3594
|
});
|
|
3450
3595
|
|
|
3451
3596
|
// src/store/packageSettingsStore.ts
|
|
3452
|
-
var
|
|
3597
|
+
var import_zustand4, usePackageSettingsStore;
|
|
3453
3598
|
var init_packageSettingsStore = __esm({
|
|
3454
3599
|
"src/store/packageSettingsStore.ts"() {
|
|
3455
3600
|
"use strict";
|
|
3456
|
-
|
|
3457
|
-
usePackageSettingsStore = (0,
|
|
3601
|
+
import_zustand4 = require("zustand");
|
|
3602
|
+
usePackageSettingsStore = (0, import_zustand4.create)((set, get) => ({
|
|
3458
3603
|
settings: null,
|
|
3459
3604
|
setSettings: (settings) => set({ settings }),
|
|
3460
3605
|
getSettings: () => get().settings,
|
|
@@ -5282,13 +5427,13 @@ init_packageSettingsStore();
|
|
|
5282
5427
|
init_debugLogger();
|
|
5283
5428
|
|
|
5284
5429
|
// src/store/memoryStore.ts
|
|
5285
|
-
var
|
|
5430
|
+
var import_zustand5 = require("zustand");
|
|
5286
5431
|
init_indexedDBService();
|
|
5287
5432
|
var DB_NAME = "bandit-memory-db";
|
|
5288
5433
|
var STORE_NAME = "bandit-memory";
|
|
5289
5434
|
var storeConfigs = [{ name: STORE_NAME, keyPath: "id" }];
|
|
5290
5435
|
var normalize = (text) => text.toLowerCase().replace(/[^\w\s]|_/g, "").replace(/\s+/g, " ").trim();
|
|
5291
|
-
var useMemoryStore = (0,
|
|
5436
|
+
var useMemoryStore = (0, import_zustand5.create)((set, get) => ({
|
|
5292
5437
|
entries: [],
|
|
5293
5438
|
_hasHydrated: false,
|
|
5294
5439
|
hydrate: async () => {
|
|
@@ -7023,58 +7168,8 @@ var VectorMigrationService = class _VectorMigrationService {
|
|
|
7023
7168
|
};
|
|
7024
7169
|
var vectorMigrationService = new VectorMigrationService();
|
|
7025
7170
|
|
|
7026
|
-
// src/store/authenticationStore.ts
|
|
7027
|
-
var import_zustand5 = require("zustand");
|
|
7028
|
-
var TOKEN_KEY = "authToken";
|
|
7029
|
-
var validToken = null;
|
|
7030
|
-
var user = null;
|
|
7031
|
-
var rawToken = localStorage.getItem(TOKEN_KEY);
|
|
7032
|
-
if (rawToken) {
|
|
7033
|
-
try {
|
|
7034
|
-
const base64Url = rawToken.split(".")[1];
|
|
7035
|
-
const base64 = base64Url.replace(/-/g, "+").replace(/_/g, "/");
|
|
7036
|
-
const jsonPayload = decodeURIComponent(
|
|
7037
|
-
atob(base64).split("").map((c) => "%" + ("00" + c.charCodeAt(0).toString(16)).slice(-2)).join("")
|
|
7038
|
-
);
|
|
7039
|
-
const decoded = JSON.parse(jsonPayload);
|
|
7040
|
-
if (decoded.exp * 1e3 > Date.now()) {
|
|
7041
|
-
validToken = rawToken;
|
|
7042
|
-
user = decoded;
|
|
7043
|
-
}
|
|
7044
|
-
} catch {
|
|
7045
|
-
validToken = null;
|
|
7046
|
-
user = null;
|
|
7047
|
-
}
|
|
7048
|
-
}
|
|
7049
|
-
var useAuthenticationStore = (0, import_zustand5.create)((set) => ({
|
|
7050
|
-
token: validToken,
|
|
7051
|
-
user,
|
|
7052
|
-
authError: null,
|
|
7053
|
-
setToken: (token) => {
|
|
7054
|
-
if (token) {
|
|
7055
|
-
try {
|
|
7056
|
-
const base64Url = token.split(".")[1];
|
|
7057
|
-
const base64 = base64Url.replace(/-/g, "+").replace(/_/g, "/");
|
|
7058
|
-
const jsonPayload = decodeURIComponent(
|
|
7059
|
-
atob(base64).split("").map((c) => "%" + ("00" + c.charCodeAt(0).toString(16)).slice(-2)).join("")
|
|
7060
|
-
);
|
|
7061
|
-
const user2 = JSON.parse(jsonPayload);
|
|
7062
|
-
localStorage.setItem(TOKEN_KEY, token);
|
|
7063
|
-
set({ token, authError: null, user: user2 });
|
|
7064
|
-
} catch {
|
|
7065
|
-
set({ token: null, authError: "Invalid token", user: null });
|
|
7066
|
-
}
|
|
7067
|
-
} else {
|
|
7068
|
-
set({ token: null, authError: null, user: null });
|
|
7069
|
-
}
|
|
7070
|
-
},
|
|
7071
|
-
clearToken: () => {
|
|
7072
|
-
localStorage.removeItem(TOKEN_KEY);
|
|
7073
|
-
set({ token: null, authError: null, user: null });
|
|
7074
|
-
}
|
|
7075
|
-
}));
|
|
7076
|
-
|
|
7077
7171
|
// src/hooks/useVectorStore.tsx
|
|
7172
|
+
init_authenticationStore();
|
|
7078
7173
|
init_packageSettingsStore();
|
|
7079
7174
|
|
|
7080
7175
|
// src/hooks/useFeatures.ts
|
|
@@ -8020,70 +8115,11 @@ function emitProjectDelete(id) {
|
|
|
8020
8115
|
|
|
8021
8116
|
// src/store/conversationSyncStore.ts
|
|
8022
8117
|
init_packageSettingsStore();
|
|
8023
|
-
|
|
8024
|
-
// src/services/auth/authenticationService.ts
|
|
8025
|
-
init_debugLogger();
|
|
8026
|
-
var TOKEN_KEY2 = "authToken";
|
|
8027
|
-
var AUTH_TOKEN_CHANGED_EVENT = "bandit:auth-token-changed";
|
|
8028
|
-
function emitAuthTokenChanged(token) {
|
|
8029
|
-
if (typeof window === "undefined") {
|
|
8030
|
-
return;
|
|
8031
|
-
}
|
|
8032
|
-
window.dispatchEvent(new CustomEvent(AUTH_TOKEN_CHANGED_EVENT, {
|
|
8033
|
-
detail: { token }
|
|
8034
|
-
}));
|
|
8035
|
-
}
|
|
8036
|
-
var AuthenticationService = class {
|
|
8037
|
-
getToken() {
|
|
8038
|
-
const token = localStorage.getItem(TOKEN_KEY2);
|
|
8039
|
-
return token;
|
|
8040
|
-
}
|
|
8041
|
-
setToken(token) {
|
|
8042
|
-
localStorage.setItem(TOKEN_KEY2, token);
|
|
8043
|
-
useAuthenticationStore.getState().setToken(token);
|
|
8044
|
-
emitAuthTokenChanged(token);
|
|
8045
|
-
}
|
|
8046
|
-
clearToken() {
|
|
8047
|
-
localStorage.removeItem(TOKEN_KEY2);
|
|
8048
|
-
useAuthenticationStore.getState().clearToken();
|
|
8049
|
-
emitAuthTokenChanged(null);
|
|
8050
|
-
}
|
|
8051
|
-
isAuthenticated() {
|
|
8052
|
-
const token = useAuthenticationStore.getState().token;
|
|
8053
|
-
return !!token && !this.isTokenExpired(token);
|
|
8054
|
-
}
|
|
8055
|
-
isTokenExpired(token) {
|
|
8056
|
-
try {
|
|
8057
|
-
if (!token) return true;
|
|
8058
|
-
const decoded = this.parseJwtClaims(token);
|
|
8059
|
-
if (!decoded) return true;
|
|
8060
|
-
return decoded.exp * 1e3 < Date.now();
|
|
8061
|
-
} catch {
|
|
8062
|
-
return true;
|
|
8063
|
-
}
|
|
8064
|
-
}
|
|
8065
|
-
parseJwtClaims(token) {
|
|
8066
|
-
try {
|
|
8067
|
-
const base64Url = token.split(".")[1];
|
|
8068
|
-
const base64 = base64Url.replace(/-/g, "+").replace(/_/g, "/");
|
|
8069
|
-
const jsonPayload = decodeURIComponent(
|
|
8070
|
-
atob(base64).split("").map((c) => {
|
|
8071
|
-
return "%" + ("00" + c.charCodeAt(0).toString(16)).slice(-2);
|
|
8072
|
-
}).join("")
|
|
8073
|
-
);
|
|
8074
|
-
return JSON.parse(jsonPayload);
|
|
8075
|
-
} catch (error) {
|
|
8076
|
-
debugLogger.error("Failed to parse JWT claims:", { error });
|
|
8077
|
-
return null;
|
|
8078
|
-
}
|
|
8079
|
-
}
|
|
8080
|
-
};
|
|
8081
|
-
var authenticationService = new AuthenticationService();
|
|
8082
|
-
|
|
8083
|
-
// src/store/conversationSyncStore.ts
|
|
8118
|
+
init_authenticationService();
|
|
8084
8119
|
init_indexedDBService();
|
|
8085
8120
|
|
|
8086
8121
|
// src/services/conversationSync/conversationSyncService.ts
|
|
8122
|
+
init_authenticationService();
|
|
8087
8123
|
init_packageSettingsStore();
|
|
8088
8124
|
init_debugLogger();
|
|
8089
8125
|
var isRecord3 = (value) => typeof value === "object" && value !== null;
|
|
@@ -11540,6 +11576,7 @@ var import_zustand12 = require("zustand");
|
|
|
11540
11576
|
|
|
11541
11577
|
// src/services/tts/voiceService.ts
|
|
11542
11578
|
init_packageSettingsStore();
|
|
11579
|
+
init_authenticationService();
|
|
11543
11580
|
init_debugLogger();
|
|
11544
11581
|
var VoiceService = class _VoiceService {
|
|
11545
11582
|
static instance;
|
|
@@ -11646,6 +11683,7 @@ init_packageSettingsStore();
|
|
|
11646
11683
|
|
|
11647
11684
|
// src/services/tts/tts-client.ts
|
|
11648
11685
|
var import_rxjs16 = require("rxjs");
|
|
11686
|
+
init_authenticationService();
|
|
11649
11687
|
init_packageSettingsStore();
|
|
11650
11688
|
init_debugLogger();
|
|
11651
11689
|
var getOrAppendAuthHeader = (existing = {}) => {
|
|
@@ -12269,6 +12307,7 @@ var useTTS = () => {
|
|
|
12269
12307
|
var import_material7 = require("@mui/material");
|
|
12270
12308
|
var import_lucide_react2 = require("lucide-react");
|
|
12271
12309
|
init_debugLogger();
|
|
12310
|
+
init_authenticationService();
|
|
12272
12311
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
12273
12312
|
var AiResponseActionsBar = ({ text }) => {
|
|
12274
12313
|
const [copied, setCopied] = (0, import_react13.useState)(false);
|
|
@@ -16387,6 +16426,7 @@ var import_lucide_react3 = require("lucide-react");
|
|
|
16387
16426
|
init_modelStore();
|
|
16388
16427
|
init_packageSettingsStore();
|
|
16389
16428
|
init_gateway_service();
|
|
16429
|
+
init_authenticationService();
|
|
16390
16430
|
var import_styles4 = require("@mui/material/styles");
|
|
16391
16431
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
16392
16432
|
var feedbackCategories = {
|