@nanas-home/hub-common 0.16.407 → 0.25.447

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,6 +1,7 @@
1
1
  import dayjs from 'dayjs';
2
- import { Token, Container } from '@freshgum/typedi';
3
2
  import { jwtDecode } from 'jwt-decode';
3
+ import { FormatIcu } from '@tolgee/format-icu';
4
+ import { Tolgee, DevTools, BackendFetch } from '@tolgee/web';
4
5
 
5
6
  // src/constants/calendar.constants.ts
6
7
  var weekdayTranslationKeyOrder = [
@@ -56,6 +57,9 @@ var validUuidChars = [
56
57
  "F"
57
58
  ];
58
59
 
60
+ // src/contracts/dependencyInjection.ts
61
+ var createToken = (description) => ({ id: Symbol(description) });
62
+
59
63
  // src/contracts/generated/apiRoute.ts
60
64
  var apiRouteParam = {
61
65
  userUuid: ":userUuid",
@@ -247,8 +251,9 @@ var AppType = /* @__PURE__ */ ((AppType2) => {
247
251
  AppType2[AppType2["HubApi"] = 3] = "HubApi";
248
252
  AppType2[AppType2["BookingManager"] = 4] = "BookingManager";
249
253
  AppType2[AppType2["HostCalendar"] = 5] = "HostCalendar";
250
- AppType2[AppType2["Test"] = 6] = "Test";
251
- AppType2[AppType2["Interactive"] = 7] = "Interactive";
254
+ AppType2[AppType2["Landing"] = 6] = "Landing";
255
+ AppType2[AppType2["Test"] = 7] = "Test";
256
+ AppType2[AppType2["Interactive"] = 8] = "Interactive";
252
257
  return AppType2;
253
258
  })(AppType || {});
254
259
  var webAppTypes = [
@@ -712,28 +717,59 @@ ${(log.optionalParams ?? []).join("\n\r")}`;
712
717
  });
713
718
  };
714
719
 
715
- // src/services/internal/config/colour.config.ts
716
- var colourPalette = {
717
- nanasBackyard: "#97A571",
718
- creamPaw: "#F7F2ED",
719
- shadowCollar: "#393834",
720
- pineCollar: "#263A38",
721
- warmBiscuit: "#C88F65",
722
- whiskerWhite: "#ffffff",
723
- couchBreather: "#DCE5E3",
724
- snoutClay: "#9D8478",
725
- pawInk: "#000000",
726
- //
727
- pineCollar25PercentLighter: "#324644"
728
- };
729
- var defaultSiteColour = {
730
- primary: "#97A571",
731
- secondary: "#97A571"
720
+ // src/services/internal/dependencyInjection/dependencyInjectionContainer.ts
721
+ var DependencyInjectionContainer = class {
722
+ instances = /* @__PURE__ */ new Map();
723
+ factories = /* @__PURE__ */ new Map();
724
+ parent;
725
+ constructor(parent) {
726
+ this.parent = parent;
727
+ }
728
+ register(token, factory) {
729
+ if (this.instances.has(token)) {
730
+ this.instances.delete(token);
731
+ }
732
+ this.factories.set(token, factory);
733
+ }
734
+ override(token, instance) {
735
+ this.instances.set(token, instance);
736
+ }
737
+ resolve(token) {
738
+ if (this.instances.has(token)) {
739
+ return this.instances.get(token);
740
+ }
741
+ const factory = this.factories.get(token) ?? this.parent?.factories.get(token);
742
+ if (!factory) {
743
+ let serviceName = token.toString();
744
+ if (serviceName == "[object Object]") {
745
+ const bestGuessOfName = token?.id?.toString?.() ?? "unknown";
746
+ serviceName = bestGuessOfName.replace("Symbol(", "").replace(")", "");
747
+ }
748
+ throw new Error(`Service not registered: ${serviceName}`);
749
+ }
750
+ const instance = factory();
751
+ this.instances.set(token, instance);
752
+ return instance;
753
+ }
732
754
  };
733
- var dependencyInjectionSetup = (props) => {
734
- setContainerToken(APP_TYPE, props.appType);
735
- if (props.botPath != null) setContainerToken(BOT_PATH, props.botPath);
736
- if (props.siteConfig != null) setContainerToken(SITE_CONFIG, props.siteConfig);
755
+
756
+ // src/services/internal/dependencyInjection/setup.ts
757
+ var rootContainer = new DependencyInjectionContainer();
758
+ var BOT_PATH_TOKEN = createToken("BOT_PATH");
759
+ var getBotPath = () => rootContainer.resolve(BOT_PATH_TOKEN);
760
+ var APP_TYPE_TOKEN = createToken("APP_TYPE");
761
+ var getAppType = () => rootContainer.resolve(APP_TYPE_TOKEN);
762
+ var SITE_CONFIG_TOKEN = createToken("SITE_CONFIG");
763
+ var setSiteConfig = (site) => setContainerToken(SITE_CONFIG_TOKEN, site);
764
+ var getSiteConfig = () => rootContainer.resolve(SITE_CONFIG_TOKEN);
765
+ var SITE_COLOUR_TOKEN = createToken("SITE_COLOUR");
766
+ var getSiteColour = () => rootContainer.resolve(SITE_COLOUR_TOKEN);
767
+ var getCommonConfig = () => rootContainer.resolve(CommonConfigService);
768
+ var getLog = () => rootContainer.resolve(LogService);
769
+ var rootDependencyInjectionSetup = (props) => {
770
+ setContainerToken(APP_TYPE_TOKEN, props.appType);
771
+ if (props.botPath != null) setContainerToken(BOT_PATH_TOKEN, props.botPath);
772
+ if (props.siteConfig != null) setContainerToken(SITE_CONFIG_TOKEN, props.siteConfig);
737
773
  const loggerOptions = props?.setupLoggerOptions?.();
738
774
  const configService = new CommonConfigService();
739
775
  const logService = new LogService(
@@ -749,32 +785,12 @@ var dependencyInjectionSetup = (props) => {
749
785
  configService
750
786
  };
751
787
  };
752
- var BOT_PATH = new Token("BOT_PATH");
753
- var getBotPath = () => Container.get(BOT_PATH);
754
- var APP_TYPE = new Token("APP_TYPE");
755
- var getAppType = () => Container.get(APP_TYPE);
756
- var SITE_CONFIG = new Token("SITE_CONFIG");
757
- var setSiteConfig = (value) => Container.set({ id: SITE_CONFIG, value });
758
- var getSiteConfig = () => {
759
- try {
760
- return Container.get(SITE_CONFIG);
761
- } catch {
762
- console.error("unable to get site config. Did you set the config on app startup?");
763
- }
788
+ var setContainerToken = (token, value) => {
789
+ rootContainer.register(token, () => value);
764
790
  };
765
- var SITE_COLOUR = new Token("SITE_COLOUR");
766
- var setSiteColour = (value) => Container.set({ id: SITE_COLOUR, value });
767
- var getSiteColour = () => {
768
- try {
769
- return Container.get(SITE_COLOUR);
770
- } catch {
771
- setSiteColour(defaultSiteColour);
772
- return defaultSiteColour;
773
- }
791
+ var setContainerTokenLazy = (token, value) => {
792
+ rootContainer.register(token, value);
774
793
  };
775
- var setContainerToken = (id, value) => Container.set({ id, value });
776
- var getCommonConfig = () => Container.get(CommonConfigService);
777
- var getLog = () => Container.get(LogService);
778
794
 
779
795
  // src/helpers/arrayHelper.ts
780
796
  var makeArrayOrDefault = (propsVal, defaultValue = []) => {
@@ -1092,152 +1108,226 @@ var getPayloadFromJwt = (token) => {
1092
1108
 
1093
1109
  // src/assets/meta.json
1094
1110
  var meta_default = {
1095
- packageVersion: "0.16.0",
1096
- date: "2026-01-13",
1097
- gitCommitHash: "98f87615f44e7d4d5625a0506fa405c59df1bbae"
1111
+ packageVersion: "0.25.0",
1112
+ date: "2026-01-26",
1113
+ gitCommitHash: "fb1940793706b71221c87d3673ae00d590387af8"
1098
1114
  };
1099
1115
 
1100
1116
  // src/assets/packagesUsed.json
1101
1117
  var packagesUsed_default = {
1102
- generatedDate: "2026-01-13T15:36:32.076Z",
1103
- generatedDateFormat: "2026-01-13",
1104
- list: [
1105
- {
1106
- name: "@chromatic-com/storybook",
1107
- version: "5.0.0",
1108
- licenseType: "MIT",
1109
- repoUrl: "https://github.com/chromaui/addon-visual-tests.git",
1110
- licenceUrl: "https://github.com/chromaui/addon-visual-tests/blob/master/LICENSE"
1111
- },
1112
- {
1113
- name: "@storybook/addon-a11y",
1114
- version: "10.1.11",
1115
- licenseType: "MIT",
1116
- repoUrl: "https://github.com/storybookjs/storybook.git"
1117
- },
1118
- {
1119
- name: "@storybook/addon-docs",
1120
- version: "10.1.11",
1121
- licenseType: "MIT",
1122
- repoUrl: "https://github.com/storybookjs/storybook.git"
1123
- },
1124
- {
1125
- name: "@storybook/addon-links",
1126
- version: "10.1.11",
1127
- licenseType: "MIT",
1128
- repoUrl: "https://github.com/storybookjs/storybook.git"
1129
- },
1130
- {
1131
- name: "@storybook/addon-onboarding",
1132
- version: "10.1.11",
1133
- licenseType: "MIT",
1134
- repoUrl: "https://github.com/storybookjs/storybook.git"
1135
- },
1136
- {
1137
- name: "@storybook/addon-vitest",
1138
- version: "10.1.11",
1139
- licenseType: "MIT",
1140
- repoUrl: "https://github.com/storybookjs/storybook.git"
1141
- },
1142
- {
1143
- name: "@types/node",
1144
- version: "25.0.8",
1145
- licenseType: "MIT",
1146
- repoUrl: "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
1147
- licenceUrl: "https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/LICENSE"
1148
- },
1149
- {
1150
- name: "@vitest/browser",
1151
- version: "4.0.17",
1152
- licenseType: "MIT",
1153
- repoUrl: "https://github.com/vitest-dev/vitest.git",
1154
- licenceUrl: "https://github.com/vitest-dev/vitest/blob/master/LICENSE"
1155
- },
1156
- {
1157
- name: "@vitest/coverage-v8",
1158
- version: "4.0.17",
1159
- licenseType: "MIT",
1160
- repoUrl: "https://github.com/vitest-dev/vitest.git",
1161
- licenceUrl: "https://github.com/vitest-dev/vitest/blob/master/LICENSE"
1162
- },
1163
- {
1164
- name: "@vitest/ui",
1165
- version: "4.0.17",
1166
- licenseType: "MIT",
1167
- repoUrl: "https://github.com/vitest-dev/vitest.git",
1168
- licenceUrl: "https://github.com/vitest-dev/vitest/blob/master/LICENSE"
1169
- },
1170
- {
1171
- name: "dotenv-cli",
1172
- version: "11.0.0",
1173
- licenseType: "MIT",
1174
- repoUrl: "https://www.npmjs.com/package/dotenv-cli"
1175
- },
1176
- {
1177
- name: "jsdom",
1178
- version: "27.4.0",
1179
- licenseType: "MIT",
1180
- repoUrl: "https://github.com/jsdom/jsdom.git"
1181
- },
1182
- {
1183
- name: "sass",
1184
- version: "1.97.2",
1185
- licenseType: "MIT",
1186
- repoUrl: "https://github.com/sass/dart-sass",
1187
- licenceUrl: "https://github.com/sass/dart-sass/blob/master/LICENSE"
1188
- },
1189
- {
1190
- name: "storybook",
1191
- version: "10.1.11",
1192
- licenseType: "MIT",
1193
- repoUrl: "https://github.com/storybookjs/storybook.git"
1194
- },
1195
- {
1196
- name: "storybook-solidjs-vite",
1197
- version: "10.0.9",
1198
- licenseType: "MIT",
1199
- repoUrl: "https://github.com/solidjs-community/storybook.git",
1200
- licenceUrl: "https://github.com/solidjs-community/storybook/blob/master/LICENSE"
1201
- },
1202
- {
1203
- name: "tsup",
1204
- version: "8.5.1",
1205
- licenseType: "MIT",
1206
- repoUrl: "https://github.com/egoist/tsup.git",
1207
- licenceUrl: "https://github.com/egoist/tsup/blob/master/LICENSE"
1208
- },
1209
- {
1210
- name: "tsup-preset-solid",
1211
- version: "2.2.0",
1212
- licenseType: "MIT",
1213
- repoUrl: "https://github.com/solidjs-community/tsup-preset-solid.git",
1214
- licenceUrl: "https://github.com/solidjs-community/tsup-preset-solid/blob/master/LICENSE"
1215
- },
1216
- {
1217
- name: "typescript",
1218
- version: "5.9.3",
1219
- licenseType: "Apache-2.0",
1220
- repoUrl: "https://github.com/microsoft/TypeScript.git"
1221
- },
1222
- {
1223
- name: "vite",
1224
- version: "7.3.1",
1225
- licenseType: "MIT",
1226
- repoUrl: "https://github.com/vitejs/vite.git"
1227
- },
1228
- {
1229
- name: "vite-plugin-solid",
1230
- version: "2.11.10",
1231
- licenseType: "MIT",
1232
- repoUrl: "https://github.com/solidjs/vite-plugin-solid.git"
1233
- },
1234
- {
1235
- name: "vitest",
1236
- version: "4.0.17",
1237
- licenseType: "MIT",
1238
- repoUrl: "https://github.com/vitest-dev/vitest.git"
1239
- }
1240
- ]
1118
+ generatedDate: "2026-01-26T15:46:26.560Z",
1119
+ generatedDateFormat: "2026-01-26",
1120
+ list: {
1121
+ dependencies: [],
1122
+ peerDependencies: [
1123
+ {
1124
+ name: "@hcaptcha/types",
1125
+ version: "1.0.4",
1126
+ licenseType: "MIT",
1127
+ repoUrl: "https://www.npmjs.com/package/@hcaptcha/types"
1128
+ },
1129
+ {
1130
+ name: "@tolgee/format-icu",
1131
+ version: "6.2.6",
1132
+ licenseType: "MIT",
1133
+ repoUrl: "https://github.com/tolgee/tolgee-js",
1134
+ licenceUrl: "https://github.com/tolgee/tolgee-js/blob/master/LICENSE"
1135
+ },
1136
+ {
1137
+ name: "@tolgee/web",
1138
+ version: "6.2.6",
1139
+ licenseType: "BSD-3-Clause",
1140
+ repoUrl: "https://github.com/tolgee/tolgee-js.git",
1141
+ licenceUrl: "https://github.com/tolgee/tolgee-js/blob/master/LICENSE"
1142
+ },
1143
+ {
1144
+ name: "classnames",
1145
+ version: "2.5.1",
1146
+ licenseType: "MIT",
1147
+ repoUrl: "https://github.com/JedWatson/classnames.git",
1148
+ licenceUrl: "https://github.com/JedWatson/classnames/blob/master/LICENSE"
1149
+ },
1150
+ {
1151
+ name: "dayjs",
1152
+ version: "1.11.13",
1153
+ licenseType: "MIT",
1154
+ repoUrl: "https://github.com/iamkun/dayjs.git",
1155
+ licenceUrl: "https://github.com/iamkun/dayjs/blob/master/LICENSE"
1156
+ },
1157
+ {
1158
+ name: "favicons",
1159
+ version: "7.2.0",
1160
+ licenseType: "MIT",
1161
+ repoUrl: "https://github.com/itgalaxy/favicons.git",
1162
+ licenceUrl: "https://github.com/itgalaxy/favicons/blob/master/LICENSE"
1163
+ },
1164
+ {
1165
+ name: "jwt-decode",
1166
+ version: "4.0.0",
1167
+ licenseType: "MIT",
1168
+ repoUrl: "git://github.com/auth0/jwt-decode",
1169
+ licenceUrl: "https://github.com/auth0/jwt-decode/blob/master/LICENSE"
1170
+ },
1171
+ {
1172
+ name: "solid-js",
1173
+ version: "1.9.7",
1174
+ licenseType: "MIT",
1175
+ repoUrl: "https://github.com/solidjs/solid",
1176
+ licenceUrl: "https://github.com/solidjs/solid/blob/master/LICENSE"
1177
+ },
1178
+ {
1179
+ name: "solid-toast",
1180
+ version: "0.5.0",
1181
+ licenseType: "MIT",
1182
+ repoUrl: "https://github.com/ardeora/solid-toast.git",
1183
+ licenceUrl: "https://github.com/ardeora/solid-toast/blob/master/LICENSE"
1184
+ }
1185
+ ],
1186
+ devDependencies: [
1187
+ {
1188
+ name: "@chromatic-com/storybook",
1189
+ version: "5.0.0",
1190
+ licenseType: "MIT",
1191
+ repoUrl: "https://github.com/chromaui/addon-visual-tests.git",
1192
+ licenceUrl: "https://github.com/chromaui/addon-visual-tests/blob/master/LICENSE"
1193
+ },
1194
+ {
1195
+ name: "@storybook/addon-a11y",
1196
+ version: "10.2.0",
1197
+ licenseType: "MIT",
1198
+ repoUrl: "https://github.com/storybookjs/storybook.git"
1199
+ },
1200
+ {
1201
+ name: "@storybook/addon-docs",
1202
+ version: "10.2.0",
1203
+ licenseType: "MIT",
1204
+ repoUrl: "https://github.com/storybookjs/storybook.git"
1205
+ },
1206
+ {
1207
+ name: "@storybook/addon-links",
1208
+ version: "10.2.0",
1209
+ licenseType: "MIT",
1210
+ repoUrl: "https://github.com/storybookjs/storybook.git"
1211
+ },
1212
+ {
1213
+ name: "@storybook/addon-onboarding",
1214
+ version: "10.2.0",
1215
+ licenseType: "MIT",
1216
+ repoUrl: "https://github.com/storybookjs/storybook.git"
1217
+ },
1218
+ {
1219
+ name: "@storybook/addon-vitest",
1220
+ version: "10.2.0",
1221
+ licenseType: "MIT",
1222
+ repoUrl: "https://github.com/storybookjs/storybook.git"
1223
+ },
1224
+ {
1225
+ name: "@types/node",
1226
+ version: "25.0.9",
1227
+ licenseType: "MIT",
1228
+ repoUrl: "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
1229
+ licenceUrl: "https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/LICENSE"
1230
+ },
1231
+ {
1232
+ name: "@vitest/browser",
1233
+ version: "4.0.17",
1234
+ licenseType: "MIT",
1235
+ repoUrl: "https://github.com/vitest-dev/vitest.git",
1236
+ licenceUrl: "https://github.com/vitest-dev/vitest/blob/master/LICENSE"
1237
+ },
1238
+ {
1239
+ name: "@vitest/coverage-v8",
1240
+ version: "4.0.17",
1241
+ licenseType: "MIT",
1242
+ repoUrl: "https://github.com/vitest-dev/vitest.git",
1243
+ licenceUrl: "https://github.com/vitest-dev/vitest/blob/master/LICENSE"
1244
+ },
1245
+ {
1246
+ name: "@vitest/ui",
1247
+ version: "4.0.17",
1248
+ licenseType: "MIT",
1249
+ repoUrl: "https://github.com/vitest-dev/vitest.git",
1250
+ licenceUrl: "https://github.com/vitest-dev/vitest/blob/master/LICENSE"
1251
+ },
1252
+ {
1253
+ name: "dotenv-cli",
1254
+ version: "11.0.0",
1255
+ licenseType: "MIT",
1256
+ repoUrl: "https://www.npmjs.com/package/dotenv-cli"
1257
+ },
1258
+ {
1259
+ name: "jsdom",
1260
+ version: "27.4.0",
1261
+ licenseType: "MIT",
1262
+ repoUrl: "https://github.com/jsdom/jsdom.git"
1263
+ },
1264
+ {
1265
+ name: "node-html-parser",
1266
+ version: "7.0.2",
1267
+ licenseType: "MIT",
1268
+ repoUrl: "https://github.com/taoqf/node-fast-html-parser.git",
1269
+ licenceUrl: "https://github.com/taoqf/node-fast-html-parser/blob/master/LICENSE"
1270
+ },
1271
+ {
1272
+ name: "sass",
1273
+ version: "1.97.2",
1274
+ licenseType: "MIT",
1275
+ repoUrl: "https://github.com/sass/dart-sass",
1276
+ licenceUrl: "https://github.com/sass/dart-sass/blob/master/LICENSE"
1277
+ },
1278
+ {
1279
+ name: "storybook",
1280
+ version: "10.2.0",
1281
+ licenseType: "MIT",
1282
+ repoUrl: "https://github.com/storybookjs/storybook.git"
1283
+ },
1284
+ {
1285
+ name: "storybook-solidjs-vite",
1286
+ version: "10.0.9",
1287
+ licenseType: "MIT",
1288
+ repoUrl: "https://github.com/solidjs-community/storybook.git",
1289
+ licenceUrl: "https://github.com/solidjs-community/storybook/blob/master/LICENSE"
1290
+ },
1291
+ {
1292
+ name: "tsup",
1293
+ version: "8.5.1",
1294
+ licenseType: "MIT",
1295
+ repoUrl: "https://github.com/egoist/tsup.git",
1296
+ licenceUrl: "https://github.com/egoist/tsup/blob/master/LICENSE"
1297
+ },
1298
+ {
1299
+ name: "tsup-preset-solid",
1300
+ version: "2.2.0",
1301
+ licenseType: "MIT",
1302
+ repoUrl: "https://github.com/solidjs-community/tsup-preset-solid.git",
1303
+ licenceUrl: "https://github.com/solidjs-community/tsup-preset-solid/blob/master/LICENSE"
1304
+ },
1305
+ {
1306
+ name: "typescript",
1307
+ version: "5.9.3",
1308
+ licenseType: "Apache-2.0",
1309
+ repoUrl: "https://github.com/microsoft/TypeScript.git"
1310
+ },
1311
+ {
1312
+ name: "vite",
1313
+ version: "7.3.1",
1314
+ licenseType: "MIT",
1315
+ repoUrl: "https://github.com/vitejs/vite.git"
1316
+ },
1317
+ {
1318
+ name: "vite-plugin-solid",
1319
+ version: "2.11.10",
1320
+ licenseType: "MIT",
1321
+ repoUrl: "https://github.com/solidjs/vite-plugin-solid.git"
1322
+ },
1323
+ {
1324
+ name: "vitest",
1325
+ version: "4.0.17",
1326
+ licenseType: "MIT",
1327
+ repoUrl: "https://github.com/vitest-dev/vitest.git"
1328
+ }
1329
+ ]
1330
+ }
1241
1331
  };
1242
1332
 
1243
1333
  // src/helpers/metaHelper.ts
@@ -1370,6 +1460,57 @@ var urlRef = (url) => {
1370
1460
  return url + `?ref=${ref}`;
1371
1461
  };
1372
1462
 
1463
+ // src/services/internal/config/colour.config.ts
1464
+ var colourPalette = {
1465
+ nanasBackyard: "#97A571",
1466
+ creamPaw: "#F7F2ED",
1467
+ shadowCollar: "#393834",
1468
+ pineCollar: "#263A38",
1469
+ warmBiscuit: "#C88F65",
1470
+ whiskerWhite: "#ffffff",
1471
+ couchBreather: "#DCE5E3",
1472
+ snoutClay: "#9D8478",
1473
+ pawInk: "#000000",
1474
+ //
1475
+ pineCollar25PercentLighter: "#324644"
1476
+ };
1477
+ var defaultSiteColour = {
1478
+ primary: "#97A571",
1479
+ secondary: "#97A571"
1480
+ };
1481
+ var TranslationService = class {
1482
+ constructor(log, _config) {
1483
+ this._config = _config;
1484
+ this._logger = log.getLogger("TranslationService");
1485
+ }
1486
+ _logger;
1487
+ _tolgee;
1488
+ initialize = async () => {
1489
+ if (this._tolgee != null) return;
1490
+ this._tolgee = Tolgee().use(DevTools()).use(FormatIcu()).use(
1491
+ BackendFetch({
1492
+ prefix: "/assets/i18n",
1493
+ fallbackOnFail: true
1494
+ })
1495
+ ).init({
1496
+ defaultLanguage: "en",
1497
+ observerType: "text",
1498
+ observerOptions: { inputPrefix: "{{", inputSuffix: "}}" },
1499
+ // Dev mode only 👇
1500
+ apiKey: this._config.getTolgeeApiKey(),
1501
+ apiUrl: this._config.getTolgeeApiUrl(),
1502
+ projectId: this._config.getTolgeeProjectId()
1503
+ });
1504
+ await this._tolgee.run();
1505
+ this._logger.d("Tolgee initialised!");
1506
+ };
1507
+ instance = () => this._tolgee;
1508
+ t = (key, defaultValue, options) => (
1509
+ // this._tolgee.t(key, defaultValue, options);
1510
+ this._tolgee?.t?.(key, defaultValue, options) ?? defaultValue ?? key
1511
+ );
1512
+ };
1513
+
1373
1514
  // src/validation/arrayValidation.ts
1374
1515
  var minItems = (minLength2) => (values) => {
1375
1516
  const safeArr = makeArrayOrDefault(values);
@@ -1565,4 +1706,4 @@ var shouldBeYoutubeUrl = (value) => {
1565
1706
  };
1566
1707
  };
1567
1708
 
1568
- export { APP_TYPE, ActivityRestriction, ActivityType, AddressLinkType, AddressRestriction, AnswerLinkType, AnswerRestriction, AppType, BOT_PATH, BookingAddonRestriction, BookingAddonType, BookingRestriction, BookingStatusType, CommentLinkType, CommentRestriction, CommonConfigService, DrivingRouteRestriction, LogService, MembershipStatus, MembershipType, MouseButton, NetworkState, OrderDirectionType, PermissionRestriction, PermissionType, PetRestriction, PetSexType, PetStatusType, PetType, QuestionForType, QuestionRestriction, QuestionType, SITE_COLOUR, SITE_CONFIG, SearchableColumnType, UnavailabilityRestriction, UploadLinkType, UploadRestriction, UploadType, UserAccountFlagType, UserRestriction, UserType, addDays, addMinutes, addMonths, addSeconds, addSpacesForEnum, addToParallelTasks, anyObject, apiRoute, apiRouteParam, arrayContains, arrayOfNLength, capitalizeFirstLetter, changeMonth, colourPalette, convertToDate, convertToFullDateSelection, cyrb53, dateDiffInDays, debounceLeading, defaultSiteColour, dependencyInjectionSetup, fakePromise, formatDate, formatFileSize, formatForBookingDate, formatForDateDropdown, formatForDateLocal, formatForDateLocalDetailed, formatForDateOfBirth, formatForDateWithTime, getAgeInYears, getAllPetQuestionForType, getAppType, getArrFromEnum, getBotPath, getCalendarDropdownDisplayValue, getCalendarDropdownForDateOfBirthDisplayValue, getCommonConfig, getDayClassObject, getDayElements, getDayHeadingElements, getImageParams, getLog, getMeta, getMimeTypeFromExtension, getPackagesUsed, getPayloadFromJwt, getPerformanceTimer, getPetAvatarUrl, getSiteColour, getSiteConfig, getUserAvatarUrl, getUsersName, getWeekNumber, hasRequiredPermissions, isBefore, isDateAfterStart, isDateBeforeEnd, isDateDisabledByDisabledDays, isDateEnabledByEnabledDays, isNumber, isSameDay, isWebApp, lowercaseFirstLetter, makeArrayOrDefault, maxDate, maxItems, maxLength, mimeTypeLookup, minDate, minItems, minLength, minUrlLength, monthTranslationKeyOrder, multiValidation, nameof, noValidation, notNull, onlyUnique, portalGlyphLength, promiseFromValue, randomIntFromRange, randomItemFromArray, searchColumns, selectedItemsExist, selectedOptionIsInEnum, separateValidation, setContainerToken, setSiteColour, setSiteConfig, shouldBeUrl, shouldBeYoutubeUrl, showSecondCalendar, timeout, tryParseNumber, uploadsThatNeedEncryption, urlRef, uuidv4, validUuidChars, validateForEach, webAppTypes, weekdayTranslationKeyOrder };
1709
+ export { APP_TYPE_TOKEN, ActivityRestriction, ActivityType, AddressLinkType, AddressRestriction, AnswerLinkType, AnswerRestriction, AppType, BOT_PATH_TOKEN, BookingAddonRestriction, BookingAddonType, BookingRestriction, BookingStatusType, CommentLinkType, CommentRestriction, CommonConfigService, DependencyInjectionContainer, DrivingRouteRestriction, LogService, MembershipStatus, MembershipType, MouseButton, NetworkState, OrderDirectionType, PermissionRestriction, PermissionType, PetRestriction, PetSexType, PetStatusType, PetType, QuestionForType, QuestionRestriction, QuestionType, SITE_CONFIG_TOKEN, SearchableColumnType, TranslationService, UnavailabilityRestriction, UploadLinkType, UploadRestriction, UploadType, UserAccountFlagType, UserRestriction, UserType, addDays, addMinutes, addMonths, addSeconds, addSpacesForEnum, addToParallelTasks, anyObject, apiRoute, apiRouteParam, arrayContains, arrayOfNLength, capitalizeFirstLetter, changeMonth, colourPalette, convertToDate, convertToFullDateSelection, createToken, cyrb53, dateDiffInDays, debounceLeading, defaultSiteColour, fakePromise, formatDate, formatFileSize, formatForBookingDate, formatForDateDropdown, formatForDateLocal, formatForDateLocalDetailed, formatForDateOfBirth, formatForDateWithTime, getAgeInYears, getAllPetQuestionForType, getAppType, getArrFromEnum, getBotPath, getCalendarDropdownDisplayValue, getCalendarDropdownForDateOfBirthDisplayValue, getCommonConfig, getDayClassObject, getDayElements, getDayHeadingElements, getImageParams, getLog, getMeta, getMimeTypeFromExtension, getPackagesUsed, getPayloadFromJwt, getPerformanceTimer, getPetAvatarUrl, getSiteColour, getSiteConfig, getUserAvatarUrl, getUsersName, getWeekNumber, hasRequiredPermissions, isBefore, isDateAfterStart, isDateBeforeEnd, isDateDisabledByDisabledDays, isDateEnabledByEnabledDays, isNumber, isSameDay, isWebApp, lowercaseFirstLetter, makeArrayOrDefault, maxDate, maxItems, maxLength, mimeTypeLookup, minDate, minItems, minLength, minUrlLength, monthTranslationKeyOrder, multiValidation, nameof, noValidation, notNull, onlyUnique, portalGlyphLength, promiseFromValue, randomIntFromRange, randomItemFromArray, rootContainer, rootDependencyInjectionSetup, searchColumns, selectedItemsExist, selectedOptionIsInEnum, separateValidation, setContainerToken, setContainerTokenLazy, setSiteConfig, shouldBeUrl, shouldBeYoutubeUrl, showSecondCalendar, timeout, tryParseNumber, uploadsThatNeedEncryption, urlRef, uuidv4, validUuidChars, validateForEach, webAppTypes, weekdayTranslationKeyOrder };