@geowiki/core 0.16.9-dev.9 → 0.16.9

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/index.js CHANGED
@@ -77,8 +77,8 @@ var __async = (__this, __arguments, generator) => {
77
77
  };
78
78
 
79
79
  // src/index.tsx
80
- var src_exports = {};
81
- __export(src_exports, {
80
+ var index_exports = {};
81
+ __export(index_exports, {
82
82
  ActivityStatus: () => ActivityStatus,
83
83
  AdminMenus: () => AdminMenus,
84
84
  AnnotationRequired: () => AnnotationRequired,
@@ -297,7 +297,7 @@ __export(src_exports, {
297
297
  useUserRoles: () => useUserRoles,
298
298
  useUsers: () => useUsers
299
299
  });
300
- module.exports = __toCommonJS(src_exports);
300
+ module.exports = __toCommonJS(index_exports);
301
301
 
302
302
  // src/Animation.ts
303
303
  var easing = [0.175, 0.85, 0.42, 0.96];
@@ -433,8 +433,6 @@ var QueryConstants = {
433
433
  GetTaskMultipleAnnotations: "GetTaskMultipleAnnotations",
434
434
  GetTaskSavedAnnotations: "GetTaskSavedAnnotations",
435
435
  DeleteTask: "DeleteTask",
436
- GetApiImage: "GetApiImage",
437
- GetCmsImage: "GetCmsImage",
438
436
  GetQuestionnaireForProject: "GetQuestionnaireForProject",
439
437
  GetTaskAnswers: "GetTaskAnswers",
440
438
  UploadTasks: "UploadTasks",
@@ -523,7 +521,7 @@ var import_evoland_api_proxy = require("@geowiki/evoland-api-proxy");
523
521
  var useEvolandWmsLayers = () => {
524
522
  return (0, import_react_query2.useQuery)({
525
523
  queryKey: [QueryNames.GetAvailableWmsLayers],
526
- queryFn: () => __async(void 0, null, function* () {
524
+ queryFn: () => __async(null, null, function* () {
527
525
  const data = yield import_evoland_api_proxy.ProjectService.getAvailableLayersAvailablelayersGet();
528
526
  return data;
529
527
  })
@@ -553,7 +551,7 @@ var import_api_proxy = require("@geowiki/api-proxy");
553
551
  var useAppConfig = () => {
554
552
  return (0, import_react_query3.useQuery)({
555
553
  queryKey: [QueryConstants.GetAppConfig],
556
- queryFn: () => __async(void 0, null, function* () {
554
+ queryFn: () => __async(null, null, function* () {
557
555
  const data = yield import_api_proxy.AbpApplicationConfigurationService.abpApplicationConfigurationGet();
558
556
  return data;
559
557
  }),
@@ -568,7 +566,7 @@ var import_react_query4 = require("@tanstack/react-query");
568
566
  var useAudience = () => {
569
567
  return (0, import_react_query4.useQuery)({
570
568
  queryKey: [QueryNames.GetAudience],
571
- queryFn: () => __async(void 0, null, function* () {
569
+ queryFn: () => __async(null, null, function* () {
572
570
  const data = yield import_api_proxy2.ResourceService.resourceGetAvailableAudience();
573
571
  return data;
574
572
  }),
@@ -584,7 +582,7 @@ var import_react_query5 = require("@tanstack/react-query");
584
582
  var useCluster = (id) => {
585
583
  return (0, import_react_query5.useQuery)({
586
584
  queryKey: [QueryNames.Cluster, id],
587
- queryFn: () => __async(void 0, null, function* () {
585
+ queryFn: () => __async(null, null, function* () {
588
586
  const data = yield import_api_proxy3.ClusterService.clusterGet(id);
589
587
  return data;
590
588
  })
@@ -597,7 +595,7 @@ var import_react_query6 = require("@tanstack/react-query");
597
595
  var useClusterFilterSettings = () => {
598
596
  return (0, import_react_query6.useQuery)({
599
597
  queryKey: [QueryNames.GetClusterFilterSettings],
600
- queryFn: () => __async(void 0, null, function* () {
598
+ queryFn: () => __async(null, null, function* () {
601
599
  var req = yield import_cms_proxy.SettingsService.settingsGetSiteSettings("ClusterFilter");
602
600
  return req;
603
601
  })
@@ -606,7 +604,7 @@ var useClusterFilterSettings = () => {
606
604
  var useConfigSettings = () => {
607
605
  return (0, import_react_query6.useQuery)({
608
606
  queryKey: [QueryNames.GetConfig],
609
- queryFn: () => __async(void 0, null, function* () {
607
+ queryFn: () => __async(null, null, function* () {
610
608
  var req = yield import_cms_proxy.SettingsService.settingsGetSiteSettings("Config");
611
609
  return req;
612
610
  })
@@ -619,7 +617,7 @@ var import_react_query7 = require("@tanstack/react-query");
619
617
  var useClusterMapInfo = () => {
620
618
  return (0, import_react_query7.useQuery)({
621
619
  queryKey: [QueryNames.GetClusterForMap],
622
- queryFn: () => __async(void 0, null, function* () {
620
+ queryFn: () => __async(null, null, function* () {
623
621
  const data = yield import_api_proxy4.ClusterService.clusterGetMapInfo();
624
622
  return data;
625
623
  })
@@ -632,7 +630,7 @@ var import_react_query8 = require("@tanstack/react-query");
632
630
  var useClusters = (fetchAll = false, sort = "", skip = 0, take = 100) => {
633
631
  return (0, import_react_query8.useQuery)({
634
632
  queryKey: [QueryNames.Clusters, skip, take],
635
- queryFn: () => __async(void 0, null, function* () {
633
+ queryFn: () => __async(null, null, function* () {
636
634
  if (fetchAll) {
637
635
  const data = yield import_api_proxy5.ClusterService.clusterGetAllClusters(
638
636
  sort,
@@ -651,7 +649,7 @@ var useClusters = (fetchAll = false, sort = "", skip = 0, take = 100) => {
651
649
  var useAllNewsFromAllClusters = (sort = "", skip = 0, take = 100) => {
652
650
  return (0, import_react_query8.useQuery)({
653
651
  queryKey: [QueryNames.GetFarmerClusterNews, sort, skip, take],
654
- queryFn: () => __async(void 0, null, function* () {
652
+ queryFn: () => __async(null, null, function* () {
655
653
  const data = yield import_api_proxy5.ClusterService.clusterGetAllNewsFromAllClusters(
656
654
  sort,
657
655
  skip,
@@ -664,7 +662,7 @@ var useAllNewsFromAllClusters = (sort = "", skip = 0, take = 100) => {
664
662
 
665
663
  // src/hooks/useHosts.ts
666
664
  var import_react_query9 = require("@tanstack/react-query");
667
- var getHosts = () => __async(void 0, null, function* () {
665
+ var getHosts = () => __async(null, null, function* () {
668
666
  const response = yield fetch("/api/hosts");
669
667
  if (!response.ok) {
670
668
  throw new Error("Failed to fetch hosts");
@@ -704,7 +702,7 @@ var import_api_proxy6 = require("@geowiki/api-proxy");
704
702
  var useCountries = (fetchAll = false) => {
705
703
  return (0, import_react_query10.useQuery)({
706
704
  queryKey: [QueryNames.GetCountries, fetchAll],
707
- queryFn: () => __async(void 0, null, function* () {
705
+ queryFn: () => __async(null, null, function* () {
708
706
  const data = yield import_api_proxy6.ClusterService.clusterGetCountries(fetchAll);
709
707
  data.sort((a, b) => {
710
708
  if (!a.country || !b.country) {
@@ -755,7 +753,7 @@ var useFileUrl = () => {
755
753
  var useFileUpload = (formData) => {
756
754
  return (0, import_react_query11.useQuery)({
757
755
  queryKey: [QueryNames.FileUpload, formData],
758
- queryFn: () => __async(void 0, null, function* () {
756
+ queryFn: () => __async(null, null, function* () {
759
757
  const data = yield import_api_proxy7.FileService.fileUpload(formData);
760
758
  return data;
761
759
  })
@@ -778,7 +776,7 @@ var useFilterClusters = (filter) => {
778
776
  filter.mainAgriculturalAreas,
779
777
  filter.sort
780
778
  ],
781
- queryFn: () => __async(void 0, null, function* () {
779
+ queryFn: () => __async(null, null, function* () {
782
780
  const data = yield import_api_proxy8.ClusterService.clusterFilter(filter);
783
781
  return data;
784
782
  })
@@ -791,7 +789,7 @@ var import_react_query13 = require("@tanstack/react-query");
791
789
  var useGeoWikiSettings = () => {
792
790
  return (0, import_react_query13.useQuery)({
793
791
  queryKey: [QueryNames.GetAppSettings],
794
- queryFn: () => __async(void 0, null, function* () {
792
+ queryFn: () => __async(null, null, function* () {
795
793
  var req = yield import_cms_proxy2.SettingsService.settingsGetSiteSettings("GeoWiki");
796
794
  return req;
797
795
  })
@@ -810,7 +808,7 @@ var import_react_query14 = require("@tanstack/react-query");
810
808
  var useIntroTourSettings = () => {
811
809
  return (0, import_react_query14.useQuery)({
812
810
  queryKey: [QueryNames.GetIntroTour],
813
- queryFn: () => __async(void 0, null, function* () {
811
+ queryFn: () => __async(null, null, function* () {
814
812
  var req = yield import_cms_proxy3.SettingsService.settingsGetSiteSettings("IntroTour");
815
813
  return req;
816
814
  })
@@ -847,7 +845,7 @@ var import_react_query15 = require("@tanstack/react-query");
847
845
  var useLanguages = () => {
848
846
  return (0, import_react_query15.useQuery)({
849
847
  queryKey: [QueryNames.GetLanguages],
850
- queryFn: () => __async(void 0, null, function* () {
848
+ queryFn: () => __async(null, null, function* () {
851
849
  const data = yield import_api_proxy9.ResourceService.resourceGetAvailableLanguages();
852
850
  return data;
853
851
  }),
@@ -862,7 +860,7 @@ var import_react_query16 = require("@tanstack/react-query");
862
860
  var useLayerInfo = (url, layerName) => {
863
861
  return (0, import_react_query16.useQuery)({
864
862
  queryKey: [QueryNames.GetUseLayerInfo, url, layerName],
865
- queryFn: () => __async(void 0, null, function* () {
863
+ queryFn: () => __async(null, null, function* () {
866
864
  var legendUrl = url + "?service=WMS&version=1.1.0&request=GetLegendGraphic&layer=" + layerName + "&format=application/json";
867
865
  var res = yield fetch(legendUrl);
868
866
  var data = yield res.json();
@@ -887,7 +885,7 @@ function useLocation() {
887
885
  var useLocationsForProject = (locationreq) => {
888
886
  return (0, import_react_query17.useQuery)({
889
887
  queryKey: [QueryConstants.GetLocations, locationreq],
890
- queryFn: () => __async(void 0, null, function* () {
888
+ queryFn: () => __async(null, null, function* () {
891
889
  return import_evoland_api_proxy2.ProjectService.searchLocationsLocationsPost(locationreq);
892
890
  })
893
891
  });
@@ -895,11 +893,13 @@ var useLocationsForProject = (locationreq) => {
895
893
  var useLocationBulkUpload = (uploadLocations, file, project_id, group_id) => {
896
894
  return (0, import_react_query17.useQuery)({
897
895
  queryKey: [QueryConstants.UploadLocations, uploadLocations, file, group_id],
898
- queryFn: () => __async(void 0, null, function* () {
896
+ queryFn: () => __async(null, null, function* () {
899
897
  try {
900
898
  const res = yield import_evoland_api_proxy2.LocationService.bulkUploadLocationsUploadlocationsPost({ file, project_id, group_id });
901
899
  return res;
902
900
  } catch (error) {
901
+ console.log(error);
902
+ console.log(error.body);
903
903
  return { data: error.body, isLoading: false, error: true };
904
904
  }
905
905
  }),
@@ -909,7 +909,7 @@ var useLocationBulkUpload = (uploadLocations, file, project_id, group_id) => {
909
909
  var useTaskBulkUpload = (uploadTasks, file, project_id) => {
910
910
  return (0, import_react_query17.useQuery)({
911
911
  queryKey: [QueryConstants.UploadTasks, uploadTasks, file],
912
- queryFn: () => __async(void 0, null, function* () {
912
+ queryFn: () => __async(null, null, function* () {
913
913
  try {
914
914
  return import_evoland_api_proxy2.LocationService.uploadLocationTaskUploadlocationtaskPost({ file, project_id });
915
915
  } catch (error) {
@@ -922,7 +922,7 @@ var useTaskBulkUpload = (uploadTasks, file, project_id) => {
922
922
  var useReviewTaskBulkUpload = (uploadReviewTasks, file, project_id) => {
923
923
  return (0, import_react_query17.useQuery)({
924
924
  queryKey: [QueryConstants.UploadReviewTasks, uploadReviewTasks, file],
925
- queryFn: () => __async(void 0, null, function* () {
925
+ queryFn: () => __async(null, null, function* () {
926
926
  try {
927
927
  return import_evoland_api_proxy2.LocationService.bulkUploadReviewTasksUploadreviewtasksPost({ file, project_id });
928
928
  } catch (error) {
@@ -955,7 +955,7 @@ var import_api_proxy10 = require("@geowiki/api-proxy");
955
955
  var useNews = (lang = "all", skip = 0, take = 100) => {
956
956
  return (0, import_react_query19.useQuery)({
957
957
  queryKey: [QueryNames.GetNews, lang, skip, take],
958
- queryFn: () => __async(void 0, null, function* () {
958
+ queryFn: () => __async(null, null, function* () {
959
959
  if (lang == "all") {
960
960
  const res2 = yield import_api_proxy10.NewsService.newsGetExternalNews("", skip, take);
961
961
  return res2.items;
@@ -1036,7 +1036,7 @@ var import_react_query20 = require("@tanstack/react-query");
1036
1036
  var usePublicationSettings = () => {
1037
1037
  return (0, import_react_query20.useQuery)({
1038
1038
  queryKey: [QueryNames.GetPublicationSettings],
1039
- queryFn: () => __async(void 0, null, function* () {
1039
+ queryFn: () => __async(null, null, function* () {
1040
1040
  var req = yield import_cms_proxy5.SettingsService.settingsGetSiteSettings("Publication");
1041
1041
  return req;
1042
1042
  })
@@ -1049,7 +1049,7 @@ var import_react_query21 = require("@tanstack/react-query");
1049
1049
  var useResource = (search = "", sort = "", skip = 0, take = 100) => {
1050
1050
  return (0, import_react_query21.useQuery)({
1051
1051
  queryKey: [QueryNames.GetResource, search, sort, skip, take],
1052
- queryFn: () => __async(void 0, null, function* () {
1052
+ queryFn: () => __async(null, null, function* () {
1053
1053
  if (search !== "") {
1054
1054
  const data2 = yield import_api_proxy11.ResourceService.resourceSearch(search);
1055
1055
  return data2;
@@ -1081,7 +1081,7 @@ var useResourceFilter = (filter) => {
1081
1081
  filter.sorting,
1082
1082
  filter.isFramework
1083
1083
  ],
1084
- queryFn: () => __async(void 0, null, function* () {
1084
+ queryFn: () => __async(null, null, function* () {
1085
1085
  const data = yield import_api_proxy12.ResourceService.resourceFilter(filter);
1086
1086
  return data;
1087
1087
  })
@@ -1094,7 +1094,7 @@ var import_react_query23 = require("@tanstack/react-query");
1094
1094
  var useResourceType = () => {
1095
1095
  return (0, import_react_query23.useQuery)({
1096
1096
  queryKey: [QueryNames.GetResourceType],
1097
- queryFn: () => __async(void 0, null, function* () {
1097
+ queryFn: () => __async(null, null, function* () {
1098
1098
  var data = yield import_api_proxy13.ResourceService.resourceGetAvailableResourceType();
1099
1099
  return data;
1100
1100
  })
@@ -1107,7 +1107,7 @@ var import_react_query24 = require("@tanstack/react-query");
1107
1107
  var useTopic = () => {
1108
1108
  return (0, import_react_query24.useQuery)({
1109
1109
  queryKey: [QueryNames.GetTopic],
1110
- queryFn: () => __async(void 0, null, function* () {
1110
+ queryFn: () => __async(null, null, function* () {
1111
1111
  var data = yield import_api_proxy14.ResourceService.resourceGetAvailableTopic();
1112
1112
  return data;
1113
1113
  }),
@@ -1123,7 +1123,7 @@ var import_api_proxy15 = require("@geowiki/api-proxy");
1123
1123
  var useUserProfileGet = () => {
1124
1124
  return (0, import_react_query25.useQuery)({
1125
1125
  queryKey: [QueryNames.GetUserProfile],
1126
- queryFn: () => __async(void 0, null, function* () {
1126
+ queryFn: () => __async(null, null, function* () {
1127
1127
  var data = yield import_api_proxy15.ProfileService.profileGet();
1128
1128
  return data;
1129
1129
  })
@@ -1136,7 +1136,7 @@ var import_api_proxy16 = require("@geowiki/api-proxy");
1136
1136
  var useUsers = (pageIndex, pageSize, filter, sorting) => {
1137
1137
  return (0, import_react_query26.useQuery)({
1138
1138
  queryKey: [QueryConstants.GetUsers, pageIndex, pageSize, filter, sorting],
1139
- queryFn: () => __async(void 0, null, function* () {
1139
+ queryFn: () => __async(null, null, function* () {
1140
1140
  let skip = 0;
1141
1141
  if (pageIndex > 0) {
1142
1142
  skip = pageIndex * pageSize;
@@ -1156,7 +1156,7 @@ var useUsers = (pageIndex, pageSize, filter, sorting) => {
1156
1156
  var import_react5 = __toESM(require("react"));
1157
1157
  function useRenderInfo(name = "Unknown") {
1158
1158
  const count = import_react5.default.useRef(0);
1159
- const lastRender = import_react5.default.useRef();
1159
+ const lastRender = import_react5.default.useRef(void 0);
1160
1160
  const now = Date.now();
1161
1161
  count.current++;
1162
1162
  import_react5.default.useEffect(() => {
@@ -1180,7 +1180,7 @@ var import_react_query27 = require("@tanstack/react-query");
1180
1180
  var useDefaultSettings = () => {
1181
1181
  return (0, import_react_query27.useQuery)({
1182
1182
  queryKey: [QueryNames.DefaultSettings],
1183
- queryFn: () => __async(void 0, null, function* () {
1183
+ queryFn: () => __async(null, null, function* () {
1184
1184
  const req = yield import_cms_proxy6.SettingsService.settingsGetDefaultSiteSettings();
1185
1185
  return req;
1186
1186
  })
@@ -1199,7 +1199,7 @@ var import_react_query28 = require("@tanstack/react-query");
1199
1199
  var useEmailing = () => {
1200
1200
  return (0, import_react_query28.useQuery)({
1201
1201
  queryKey: [QueryConstants.GetEmailing],
1202
- queryFn: () => __async(void 0, null, function* () {
1202
+ queryFn: () => __async(null, null, function* () {
1203
1203
  const data = yield import_api_proxy17.EmailSettingsService.emailSettingsGet();
1204
1204
  return data;
1205
1205
  })
@@ -1229,7 +1229,7 @@ var import_react_query29 = require("@tanstack/react-query");
1229
1229
  var useFeatures = (providerName, providerKey) => {
1230
1230
  return (0, import_react_query29.useQuery)({
1231
1231
  queryKey: [QueryConstants.GetFeatures, providerName, providerKey],
1232
- queryFn: () => __async(void 0, null, function* () {
1232
+ queryFn: () => __async(null, null, function* () {
1233
1233
  const data = yield import_api_proxy18.FeaturesService.featuresGet(providerName, providerKey);
1234
1234
  return data;
1235
1235
  })
@@ -1242,7 +1242,7 @@ var import_api_proxy19 = require("@geowiki/api-proxy");
1242
1242
  var useAssignableRoles = () => {
1243
1243
  return (0, import_react_query30.useQuery)({
1244
1244
  queryKey: [QueryConstants.GetAssignableRoles],
1245
- queryFn: () => __async(void 0, null, function* () {
1245
+ queryFn: () => __async(null, null, function* () {
1246
1246
  const data = yield import_api_proxy19.UserService.userGetAssignableRoles();
1247
1247
  return data;
1248
1248
  })
@@ -1255,7 +1255,7 @@ var import_react_query31 = require("@tanstack/react-query");
1255
1255
  var useUserRoles = ({ userId }) => {
1256
1256
  return (0, import_react_query31.useQuery)({
1257
1257
  queryKey: [QueryConstants.GetUserRoles, userId],
1258
- queryFn: () => __async(void 0, null, function* () {
1258
+ queryFn: () => __async(null, null, function* () {
1259
1259
  const data = yield import_api_proxy20.UserService.userGetRoles(userId);
1260
1260
  return data;
1261
1261
  })
@@ -1268,7 +1268,7 @@ var import_react_query32 = require("@tanstack/react-query");
1268
1268
  var usePermissions = (providerName, providerKey) => {
1269
1269
  return (0, import_react_query32.useQuery)({
1270
1270
  queryKey: [QueryConstants.GetPermissions, providerName, providerKey],
1271
- queryFn: () => __async(void 0, null, function* () {
1271
+ queryFn: () => __async(null, null, function* () {
1272
1272
  const data = yield import_api_proxy21.PermissionsService.permissionsGet(
1273
1273
  providerName,
1274
1274
  providerKey
@@ -1284,7 +1284,7 @@ var import_api_proxy22 = require("@geowiki/api-proxy");
1284
1284
  var useRoles = (pageIndex, pageSize, filter, sorting) => {
1285
1285
  return (0, import_react_query33.useQuery)({
1286
1286
  queryKey: [QueryConstants.GetRoles, pageIndex, pageSize, filter, sorting],
1287
- queryFn: () => __async(void 0, null, function* () {
1287
+ queryFn: () => __async(null, null, function* () {
1288
1288
  let skip = 0;
1289
1289
  if (pageIndex > 0) {
1290
1290
  skip = pageIndex * pageSize;
@@ -1306,7 +1306,7 @@ var import_react_query34 = require("@tanstack/react-query");
1306
1306
  var useProfile = () => {
1307
1307
  return (0, import_react_query34.useQuery)({
1308
1308
  queryKey: [QueryConstants.GetProfile],
1309
- queryFn: () => __async(void 0, null, function* () {
1309
+ queryFn: () => __async(null, null, function* () {
1310
1310
  const data = yield import_api_proxy23.ProfileService.profileGet();
1311
1311
  return data;
1312
1312
  })
@@ -1319,7 +1319,7 @@ var import_api_proxy24 = require("@geowiki/api-proxy");
1319
1319
  var useTenants = (pageIndex, pageSize, filter, sorting) => {
1320
1320
  return (0, import_react_query35.useQuery)({
1321
1321
  queryKey: [QueryConstants.GetTenants, pageIndex, pageSize, filter, sorting],
1322
- queryFn: () => __async(void 0, null, function* () {
1322
+ queryFn: () => __async(null, null, function* () {
1323
1323
  let skip = 0;
1324
1324
  if (pageIndex > 0) {
1325
1325
  skip = pageIndex * pageSize;
@@ -1341,7 +1341,7 @@ var import_evoland_api_proxy3 = require("@geowiki/evoland-api-proxy");
1341
1341
  var useEvolandLabels = (projectId) => {
1342
1342
  return (0, import_react_query36.useQuery)({
1343
1343
  queryKey: [QueryNames.GetEvolandLabels, projectId],
1344
- queryFn: () => __async(void 0, null, function* () {
1344
+ queryFn: () => __async(null, null, function* () {
1345
1345
  const data = yield import_evoland_api_proxy3.ProjectService.getLabelsLabelsProjectIdProjectIdGet(projectId);
1346
1346
  return data;
1347
1347
  })
@@ -1355,7 +1355,7 @@ var useLookUp = (ServiceName, params, LookUpsClusterCountries, LookUpsClusterAct
1355
1355
  let result;
1356
1356
  return (0, import_react_query37.useQuery)({
1357
1357
  queryKey: [QueryNames.GetLookUp, ServiceName, params],
1358
- queryFn: () => __async(void 0, null, function* () {
1358
+ queryFn: () => __async(null, null, function* () {
1359
1359
  switch (ServiceName) {
1360
1360
  case LookUpsClusterCountries: {
1361
1361
  result = yield import_api_proxy25.ClusterService.clusterGetCountries(params);
@@ -1389,7 +1389,7 @@ var import_evoland_api_proxy4 = require("@geowiki/evoland-api-proxy");
1389
1389
  var useProjects = (fetch2, start = 0, amount = 9) => {
1390
1390
  return (0, import_react_query38.useQuery)({
1391
1391
  queryKey: [QueryConstants.GetProjects, fetch2, start, amount],
1392
- queryFn: () => __async(void 0, null, function* () {
1392
+ queryFn: () => __async(null, null, function* () {
1393
1393
  if (fetch2)
1394
1394
  return import_evoland_api_proxy4.ProjectService.listProjectsListprojectsStartidxStartidxAmountAmountGet(
1395
1395
  start,
@@ -1401,7 +1401,7 @@ var useProjects = (fetch2, start = 0, amount = 9) => {
1401
1401
  var useProjectDetails = (projectId, update) => {
1402
1402
  return (0, import_react_query38.useQuery)({
1403
1403
  queryKey: [QueryConstants.GetProjectDetails, projectId, update],
1404
- queryFn: () => __async(void 0, null, function* () {
1404
+ queryFn: () => __async(null, null, function* () {
1405
1405
  return import_evoland_api_proxy4.ProjectService.projectInfoProjectinfoProjectIdProjectIdGet(
1406
1406
  projectId
1407
1407
  );
@@ -1411,7 +1411,7 @@ var useProjectDetails = (projectId, update) => {
1411
1411
  var useTasksPerLocation = (data) => {
1412
1412
  return (0, import_react_query38.useQuery)({
1413
1413
  queryKey: [QueryConstants.GetTasksPerLocation, data],
1414
- queryFn: () => __async(void 0, null, function* () {
1414
+ queryFn: () => __async(null, null, function* () {
1415
1415
  return import_evoland_api_proxy4.ProjectService.getTasksTasksGet(
1416
1416
  data.locationProjectId,
1417
1417
  data.taskForReview,
@@ -1439,7 +1439,7 @@ var useTasksPerLocation = (data) => {
1439
1439
  var useRandomTasksPerLocation = (data) => {
1440
1440
  return (0, import_react_query38.useQuery)({
1441
1441
  queryKey: [QueryConstants.GetTasksPerLocation, data],
1442
- queryFn: () => __async(void 0, null, function* () {
1442
+ queryFn: () => __async(null, null, function* () {
1443
1443
  return import_evoland_api_proxy4.ProjectService.getRandomTaskRandomtaskGet(
1444
1444
  data.locationProjectId,
1445
1445
  data.taskForReview,
@@ -1466,7 +1466,7 @@ var useRandomTasksPerLocation = (data) => {
1466
1466
  var useTaskComments = (taskIds) => {
1467
1467
  return (0, import_react_query38.useQuery)({
1468
1468
  queryKey: [QueryConstants.GetTaskComment, taskIds],
1469
- queryFn: () => __async(void 0, null, function* () {
1469
+ queryFn: () => __async(null, null, function* () {
1470
1470
  return import_evoland_api_proxy4.TaskService.taskLatestComomentsTasklatestcommentPost({
1471
1471
  task_ids: taskIds
1472
1472
  });
@@ -1476,7 +1476,7 @@ var useTaskComments = (taskIds) => {
1476
1476
  var useGroupsInProject = (projectId, updateGroup) => {
1477
1477
  return (0, import_react_query38.useQuery)({
1478
1478
  queryKey: [QueryConstants.GetGroupsInProject, projectId, updateGroup],
1479
- queryFn: () => __async(void 0, null, function* () {
1479
+ queryFn: () => __async(null, null, function* () {
1480
1480
  return import_evoland_api_proxy4.ProjectService.getProjectGroupsProjectgroupsProjectIdProjectIdGet(
1481
1481
  projectId
1482
1482
  );
@@ -1486,7 +1486,7 @@ var useGroupsInProject = (projectId, updateGroup) => {
1486
1486
  var useProjectUsers = (projectId) => {
1487
1487
  return (0, import_react_query38.useQuery)({
1488
1488
  queryKey: [QueryConstants.GetProjectUsers, projectId],
1489
- queryFn: () => __async(void 0, null, function* () {
1489
+ queryFn: () => __async(null, null, function* () {
1490
1490
  return import_evoland_api_proxy4.ProjectService.projectAllUsersProjectusersProjectIdProjectIdGet(
1491
1491
  projectId
1492
1492
  );
@@ -1496,7 +1496,7 @@ var useProjectUsers = (projectId) => {
1496
1496
  var useTaskStatusList = () => {
1497
1497
  return (0, import_react_query38.useQuery)({
1498
1498
  queryKey: [QueryConstants.GetTaskStatusList],
1499
- queryFn: () => __async(void 0, null, function* () {
1499
+ queryFn: () => __async(null, null, function* () {
1500
1500
  return import_evoland_api_proxy4.TaskService.getTaskStatusesTaskstatusesGet();
1501
1501
  })
1502
1502
  });
@@ -1509,7 +1509,7 @@ var useUpdateActiveGroupInProject = (projectId, groupId, update) => {
1509
1509
  groupId,
1510
1510
  update
1511
1511
  ],
1512
- queryFn: () => __async(void 0, null, function* () {
1512
+ queryFn: () => __async(null, null, function* () {
1513
1513
  if (update)
1514
1514
  return import_evoland_api_proxy4.ProjectService.selectProjectGroupProjectselectgroupPost({
1515
1515
  project_id: projectId,
@@ -1521,7 +1521,7 @@ var useUpdateActiveGroupInProject = (projectId, groupId, update) => {
1521
1521
  var useTaskAnnotation = (taskId) => {
1522
1522
  return (0, import_react_query38.useQuery)({
1523
1523
  queryKey: [QueryConstants.GetTaskAnnotation, taskId],
1524
- queryFn: () => __async(void 0, null, function* () {
1524
+ queryFn: () => __async(null, null, function* () {
1525
1525
  if (taskId !== null && taskId !== 0 && taskId !== void 0)
1526
1526
  return import_evoland_api_proxy4.TaskService.getTaskAnnotationAssetTaskannotationTaskIdTaskIdGet(
1527
1527
  taskId
@@ -1532,7 +1532,7 @@ var useTaskAnnotation = (taskId) => {
1532
1532
  var useTaskMultipleAnnotations = (taskId) => {
1533
1533
  return (0, import_react_query38.useQuery)({
1534
1534
  queryKey: [QueryConstants.GetTaskMultipleAnnotations, taskId],
1535
- queryFn: () => __async(void 0, null, function* () {
1535
+ queryFn: () => __async(null, null, function* () {
1536
1536
  if (taskId !== null && taskId !== 0 && taskId !== void 0)
1537
1537
  return import_evoland_api_proxy4.TaskService.getTaskAnnotationAssetsTaskannotationsTaskIdTaskIdGet(
1538
1538
  taskId
@@ -1543,7 +1543,7 @@ var useTaskMultipleAnnotations = (taskId) => {
1543
1543
  var useTaskSavedAnnotations = (taskId) => {
1544
1544
  return (0, import_react_query38.useQuery)({
1545
1545
  queryKey: [QueryConstants.GetTaskSavedAnnotations, taskId],
1546
- queryFn: () => __async(void 0, null, function* () {
1546
+ queryFn: () => __async(null, null, function* () {
1547
1547
  if (taskId !== null && taskId !== 0 && taskId !== void 0)
1548
1548
  return import_evoland_api_proxy4.TaskService.getSavedAnnotationGetsavedannotationTaskIdTaskIdGet(
1549
1549
  taskId
@@ -1554,7 +1554,7 @@ var useTaskSavedAnnotations = (taskId) => {
1554
1554
  var useTaskDelete = (taskId, projectId, deleteTask) => {
1555
1555
  return (0, import_react_query38.useQuery)({
1556
1556
  queryKey: [QueryConstants.DeleteTask, taskId, projectId, deleteTask],
1557
- queryFn: () => __async(void 0, null, function* () {
1557
+ queryFn: () => __async(null, null, function* () {
1558
1558
  if (taskId !== null && taskId !== void 0 && taskId !== 0 && deleteTask === true)
1559
1559
  return import_evoland_api_proxy4.TaskService.deleteTaskDeletetaskPost({
1560
1560
  project_id: projectId,
@@ -1572,7 +1572,7 @@ var useProjectStatisticsByUser = (projectId, startDate, endDate, filterUserId) =
1572
1572
  endDate,
1573
1573
  filterUserId
1574
1574
  ],
1575
- queryFn: () => __async(void 0, null, function* () {
1575
+ queryFn: () => __async(null, null, function* () {
1576
1576
  return import_evoland_api_proxy4.StatisticService.getUserStatisticsUserstatisticsProjectIdProjectIdStartDateStartDateEndDateEndDateFilterUserIdFilterUserIdGet(
1577
1577
  projectId,
1578
1578
  endDate,
@@ -1591,7 +1591,7 @@ var useContractStatisticsByUser = (projectId, startDate, endDate, filterUserId)
1591
1591
  endDate,
1592
1592
  filterUserId
1593
1593
  ],
1594
- queryFn: () => __async(void 0, null, function* () {
1594
+ queryFn: () => __async(null, null, function* () {
1595
1595
  return import_evoland_api_proxy4.StatisticService.getUserStatisticsUserstatisticsProjectIdProjectIdStartDateStartDateEndDateEndDateFilterUserIdFilterUserIdGet(
1596
1596
  projectId,
1597
1597
  endDate,
@@ -1610,7 +1610,7 @@ var useLatestTaskOnLocation = (locationId, projectId, referenceDate) => {
1610
1610
  projectId,
1611
1611
  referenceDate
1612
1612
  ],
1613
- queryFn: () => __async(void 0, null, function* () {
1613
+ queryFn: () => __async(null, null, function* () {
1614
1614
  return import_evoland_api_proxy4.ProjectService.locationLatestTaskLocationtaskLocationIdLocationIdProjectIdProjectIdReferenceDateReferenceDateGet(
1615
1615
  locationId,
1616
1616
  projectId,
@@ -1622,7 +1622,7 @@ var useLatestTaskOnLocation = (locationId, projectId, referenceDate) => {
1622
1622
  var useAssignProjectToUser = (userRoleRequest, update) => {
1623
1623
  return (0, import_react_query38.useQuery)({
1624
1624
  queryKey: [QueryConstants.GetProjectDetails, userRoleRequest, update],
1625
- queryFn: () => __async(void 0, null, function* () {
1625
+ queryFn: () => __async(null, null, function* () {
1626
1626
  if (update)
1627
1627
  return import_evoland_api_proxy4.ProjectService.setUserRoleSetuserrolePost(userRoleRequest);
1628
1628
  }),
@@ -1632,7 +1632,7 @@ var useAssignProjectToUser = (userRoleRequest, update) => {
1632
1632
  var useGetUserProject = (user_id, fetchData) => {
1633
1633
  return (0, import_react_query38.useQuery)({
1634
1634
  queryKey: [QueryConstants.GetUserProject, user_id, fetchData],
1635
- queryFn: () => __async(void 0, null, function* () {
1635
+ queryFn: () => __async(null, null, function* () {
1636
1636
  if (fetchData)
1637
1637
  return import_evoland_api_proxy4.ProjectService.getUserRoleProjectGetuserroleprojectUserIdUserIdGet(
1638
1638
  user_id
@@ -1643,7 +1643,7 @@ var useGetUserProject = (user_id, fetchData) => {
1643
1643
  var useUpdateUserDetail = (userDetailRequest, update) => {
1644
1644
  return (0, import_react_query38.useQuery)({
1645
1645
  queryKey: [QueryConstants.SetUserDetail, userDetailRequest, update],
1646
- queryFn: () => __async(void 0, null, function* () {
1646
+ queryFn: () => __async(null, null, function* () {
1647
1647
  if (update)
1648
1648
  return import_evoland_api_proxy4.ProjectService.setUserDetailSetuserdetailPost(userDetailRequest);
1649
1649
  })
@@ -1657,7 +1657,7 @@ var useProjectsPointsDownload = (projectId, download, userRole) => {
1657
1657
  download,
1658
1658
  userRole
1659
1659
  ],
1660
- queryFn: () => __async(void 0, null, function* () {
1660
+ queryFn: () => __async(null, null, function* () {
1661
1661
  if (userRole == "admin" && download)
1662
1662
  return import_evoland_api_proxy4.ProjectService.getLocationsSummaryLocationssummaryProjectIdProjectIdGet(
1663
1663
  projectId
@@ -1668,7 +1668,7 @@ var useProjectsPointsDownload = (projectId, download, userRole) => {
1668
1668
  var useQuestionnaire = (projectId) => {
1669
1669
  return (0, import_react_query38.useQuery)({
1670
1670
  queryKey: [QueryConstants.GetQuestionnaireForProject, projectId],
1671
- queryFn: () => __async(void 0, null, function* () {
1671
+ queryFn: () => __async(null, null, function* () {
1672
1672
  return import_evoland_api_proxy4.QuestionService.getProjectQuestionsAnswersQuestionsAnswersProjectIdProjectIdGet(
1673
1673
  projectId
1674
1674
  );
@@ -1678,7 +1678,7 @@ var useQuestionnaire = (projectId) => {
1678
1678
  var useTaskAnswers = (taskId) => {
1679
1679
  return (0, import_react_query38.useQuery)({
1680
1680
  queryKey: [QueryConstants.GetTaskAnswers, taskId],
1681
- queryFn: () => __async(void 0, null, function* () {
1681
+ queryFn: () => __async(null, null, function* () {
1682
1682
  return import_evoland_api_proxy4.TaskService.getTaskAnswersTaskanswersTaskIdTaskIdGet(taskId);
1683
1683
  })
1684
1684
  });
@@ -1686,7 +1686,7 @@ var useTaskAnswers = (taskId) => {
1686
1686
  var useProjectResultSet = (download, projectId, is_geo_json) => {
1687
1687
  return (0, import_react_query38.useQuery)({
1688
1688
  queryKey: [QueryConstants.GetProjectResultSet, download, projectId, is_geo_json],
1689
- queryFn: () => __async(void 0, null, function* () {
1689
+ queryFn: () => __async(null, null, function* () {
1690
1690
  return import_evoland_api_proxy4.ProjectService.projectResultSetProjectresultsetProjectIdProjectIdIsGeoJsonIsGeoJsonGet(projectId, is_geo_json);
1691
1691
  }),
1692
1692
  enabled: !!download && !!projectId
@@ -1694,38 +1694,30 @@ var useProjectResultSet = (download, projectId, is_geo_json) => {
1694
1694
  };
1695
1695
 
1696
1696
  // src/hooks/useApiImage.tsx
1697
- var import_react_query39 = require("@tanstack/react-query");
1697
+ var NO_IMAGE_PLACEHOLDER = "/assets/farmer-cluster/no-image-available.png";
1698
+ var EMPTY_GUID = "00000000-0000-0000-0000-000000000000";
1698
1699
  var useApiImage = (imageId) => {
1699
- return (0, import_react_query39.useQuery)({
1700
- queryKey: [QueryConstants.GetApiImage, imageId],
1701
- queryFn: () => __async(void 0, null, function* () {
1702
- const res = yield fetch(`/api/api-image/${imageId}`);
1703
- const data = yield res.json();
1704
- return data.fileUrl;
1705
- })
1706
- });
1700
+ if (!imageId || imageId === EMPTY_GUID) return NO_IMAGE_PLACEHOLDER;
1701
+ const { apiUrl, tenantId } = config_default.getState();
1702
+ const params = tenantId ? `__tenant=${tenantId}&id=${imageId}` : `id=${imageId}`;
1703
+ return `${apiUrl}/api/app/file/view?${params}`;
1707
1704
  };
1708
1705
 
1709
1706
  // src/hooks/useCmsImage.tsx
1710
- var import_react_query40 = require("@tanstack/react-query");
1707
+ var NO_IMAGE_PLACEHOLDER2 = "/assets/farmer-cluster/no-image-available.png";
1711
1708
  var useCmsImage = (imageId) => {
1712
- return (0, import_react_query40.useQuery)({
1713
- queryKey: [QueryConstants.GetCmsImage, imageId],
1714
- queryFn: () => __async(void 0, null, function* () {
1715
- const res = yield fetch(`/api/cms-image/${imageId}`);
1716
- const data = yield res.json();
1717
- return data.fileUrl;
1718
- })
1719
- });
1709
+ const cmsUrl = useCmsUrl();
1710
+ if (!imageId) return NO_IMAGE_PLACEHOLDER2;
1711
+ return `${cmsUrl}/media/${imageId}`;
1720
1712
  };
1721
1713
 
1722
1714
  // src/hooks/useClusterGetJoinRequests.ts
1723
1715
  var import_api_proxy26 = require("@geowiki/api-proxy");
1724
- var import_react_query41 = require("@tanstack/react-query");
1716
+ var import_react_query39 = require("@tanstack/react-query");
1725
1717
  var useClusterGetJoinRequests = (clusterId) => {
1726
- return (0, import_react_query41.useQuery)({
1718
+ return (0, import_react_query39.useQuery)({
1727
1719
  queryKey: [QueryNames.JoinRequests, clusterId],
1728
- queryFn: () => __async(void 0, null, function* () {
1720
+ queryFn: () => __async(null, null, function* () {
1729
1721
  const data = yield import_api_proxy26.ClusterService.clusterGetJoinRequests(clusterId);
1730
1722
  return data;
1731
1723
  })
@@ -1734,11 +1726,11 @@ var useClusterGetJoinRequests = (clusterId) => {
1734
1726
 
1735
1727
  // src/hooks/useClusterGetNews.ts
1736
1728
  var import_api_proxy27 = require("@geowiki/api-proxy");
1737
- var import_react_query42 = require("@tanstack/react-query");
1729
+ var import_react_query40 = require("@tanstack/react-query");
1738
1730
  var useClusterGetNews = (clusterId, newsId) => {
1739
- return (0, import_react_query42.useQuery)({
1731
+ return (0, import_react_query40.useQuery)({
1740
1732
  queryKey: [QueryNames.ClusterGetNews, clusterId, newsId],
1741
- queryFn: () => __async(void 0, null, function* () {
1733
+ queryFn: () => __async(null, null, function* () {
1742
1734
  const data = yield import_api_proxy27.ClusterService.clusterGetNews(clusterId, newsId);
1743
1735
  return data;
1744
1736
  })
@@ -1747,11 +1739,11 @@ var useClusterGetNews = (clusterId, newsId) => {
1747
1739
 
1748
1740
  // src/hooks/useClusterGetNewsNextPreviousStatus.ts
1749
1741
  var import_api_proxy28 = require("@geowiki/api-proxy");
1750
- var import_react_query43 = require("@tanstack/react-query");
1742
+ var import_react_query41 = require("@tanstack/react-query");
1751
1743
  var useClusterGetNewsNextPreviousStatus = (clusterId, newsId) => {
1752
- return (0, import_react_query43.useQuery)({
1744
+ return (0, import_react_query41.useQuery)({
1753
1745
  queryKey: [QueryNames.ClusterNewsNextPrevious, clusterId, newsId],
1754
- queryFn: () => __async(void 0, null, function* () {
1746
+ queryFn: () => __async(null, null, function* () {
1755
1747
  const data = yield import_api_proxy28.ClusterService.clusterGetNewsNextPreviousStatus(
1756
1748
  clusterId,
1757
1749
  newsId
@@ -1763,11 +1755,11 @@ var useClusterGetNewsNextPreviousStatus = (clusterId, newsId) => {
1763
1755
 
1764
1756
  // src/hooks/useClusterImages.ts
1765
1757
  var import_api_proxy29 = require("@geowiki/api-proxy");
1766
- var import_react_query44 = require("@tanstack/react-query");
1758
+ var import_react_query42 = require("@tanstack/react-query");
1767
1759
  var useClusterImages = (id) => {
1768
- return (0, import_react_query44.useQuery)({
1760
+ return (0, import_react_query42.useQuery)({
1769
1761
  queryKey: [QueryNames.ClusterImages, id],
1770
- queryFn: () => __async(void 0, null, function* () {
1762
+ queryFn: () => __async(null, null, function* () {
1771
1763
  const data = yield import_api_proxy29.ClusterService.clusterGetClusterImages(id);
1772
1764
  return data;
1773
1765
  })
@@ -1776,11 +1768,11 @@ var useClusterImages = (id) => {
1776
1768
 
1777
1769
  // src/hooks/useClusterOverview.ts
1778
1770
  var import_api_proxy30 = require("@geowiki/api-proxy");
1779
- var import_react_query45 = require("@tanstack/react-query");
1771
+ var import_react_query43 = require("@tanstack/react-query");
1780
1772
  var useClusterOverview = (id) => {
1781
- return (0, import_react_query45.useQuery)({
1773
+ return (0, import_react_query43.useQuery)({
1782
1774
  queryKey: [QueryNames.GetClusterOverview, id],
1783
- queryFn: () => __async(void 0, null, function* () {
1775
+ queryFn: () => __async(null, null, function* () {
1784
1776
  const data = yield import_api_proxy30.ClusterService.clusterGetClusterOverview(id);
1785
1777
  return data;
1786
1778
  })
@@ -1789,9 +1781,9 @@ var useClusterOverview = (id) => {
1789
1781
 
1790
1782
  // src/hooks/useClusterAllNews.ts
1791
1783
  var import_api_proxy31 = require("@geowiki/api-proxy");
1792
- var import_react_query46 = require("@tanstack/react-query");
1784
+ var import_react_query44 = require("@tanstack/react-query");
1793
1785
  var useClusterAllNews = (id, refresh, sorting, skipCount, maxResultCount, status) => {
1794
- return (0, import_react_query46.useQuery)({
1786
+ return (0, import_react_query44.useQuery)({
1795
1787
  queryKey: [
1796
1788
  QueryNames.ClusterAllNews,
1797
1789
  id,
@@ -1801,7 +1793,7 @@ var useClusterAllNews = (id, refresh, sorting, skipCount, maxResultCount, status
1801
1793
  refresh,
1802
1794
  status
1803
1795
  ],
1804
- queryFn: () => __async(void 0, null, function* () {
1796
+ queryFn: () => __async(null, null, function* () {
1805
1797
  const data = yield import_api_proxy31.ClusterService.clusterGetAllNews(
1806
1798
  id,
1807
1799
  sorting,
@@ -1816,11 +1808,11 @@ var useClusterAllNews = (id, refresh, sorting, skipCount, maxResultCount, status
1816
1808
 
1817
1809
  // src/hooks/useNewsFromAllClusters.ts
1818
1810
  var import_api_proxy32 = require("@geowiki/api-proxy");
1819
- var import_react_query47 = require("@tanstack/react-query");
1811
+ var import_react_query45 = require("@tanstack/react-query");
1820
1812
  var useNewsFromAllClusters = (skip = 0, take = 10) => {
1821
- return (0, import_react_query47.useQuery)({
1813
+ return (0, import_react_query45.useQuery)({
1822
1814
  queryKey: [QueryNames.ClusterAllNews, skip, take],
1823
- queryFn: () => __async(void 0, null, function* () {
1815
+ queryFn: () => __async(null, null, function* () {
1824
1816
  const data = yield import_api_proxy32.ClusterService.clusterGetAllNewsFromAllClusters(
1825
1817
  "",
1826
1818
  skip,
@@ -1833,11 +1825,11 @@ var useNewsFromAllClusters = (skip = 0, take = 10) => {
1833
1825
 
1834
1826
  // src/hooks/useClusterNewsWithId.ts
1835
1827
  var import_api_proxy33 = require("@geowiki/api-proxy");
1836
- var import_react_query48 = require("@tanstack/react-query");
1828
+ var import_react_query46 = require("@tanstack/react-query");
1837
1829
  var useClusterNewsWithId = (id) => {
1838
- return (0, import_react_query48.useQuery)({
1830
+ return (0, import_react_query46.useQuery)({
1839
1831
  queryKey: [QueryNames.ClusterNewsWithId, id],
1840
- queryFn: () => __async(void 0, null, function* () {
1832
+ queryFn: () => __async(null, null, function* () {
1841
1833
  const data = yield import_api_proxy33.ClusterService.clusterGetClusterNewsById(id);
1842
1834
  return data;
1843
1835
  })
@@ -1845,19 +1837,19 @@ var useClusterNewsWithId = (id) => {
1845
1837
  };
1846
1838
 
1847
1839
  // src/hooks/useMapMenuItems.ts
1848
- var import_react_query49 = require("@tanstack/react-query");
1840
+ var import_react_query47 = require("@tanstack/react-query");
1849
1841
 
1850
1842
  // src/utils/CmsApi.ts
1851
1843
  var import_cms_proxy7 = require("@geowiki/cms-proxy");
1852
- var getGeoWikiSettings = () => __async(void 0, null, function* () {
1844
+ var getGeoWikiSettings = () => __async(null, null, function* () {
1853
1845
  const req = yield import_cms_proxy7.SettingsService.settingsGetSiteSettings("GeoWiki");
1854
1846
  return req;
1855
1847
  });
1856
- var getDefaultSettings = () => __async(void 0, null, function* () {
1848
+ var getDefaultSettings = () => __async(null, null, function* () {
1857
1849
  const req = yield import_cms_proxy7.SettingsService.settingsGetDefaultSiteSettings();
1858
1850
  return req;
1859
1851
  });
1860
- var getMenus = (displayName) => __async(void 0, null, function* () {
1852
+ var getMenus = (displayName) => __async(null, null, function* () {
1861
1853
  const req = yield getContentWithTypeAndDisplayName(
1862
1854
  "Menu",
1863
1855
  displayName
@@ -1865,7 +1857,7 @@ var getMenus = (displayName) => __async(void 0, null, function* () {
1865
1857
  const menus = req == null ? void 0 : req.items[0];
1866
1858
  return menus;
1867
1859
  });
1868
- var getPageContent = (displayName) => __async(void 0, null, function* () {
1860
+ var getPageContent = (displayName) => __async(null, null, function* () {
1869
1861
  const req = yield getContentWithTypeAndDisplayName(
1870
1862
  "Page",
1871
1863
  displayName
@@ -1873,27 +1865,27 @@ var getPageContent = (displayName) => __async(void 0, null, function* () {
1873
1865
  const page = req == null ? void 0 : req.items[0];
1874
1866
  return page;
1875
1867
  });
1876
- var getContentWithTypeAndDisplayName = (contentType, displayName) => __async(void 0, null, function* () {
1868
+ var getContentWithTypeAndDisplayName = (contentType, displayName) => __async(null, null, function* () {
1877
1869
  return import_cms_proxy7.QueryApiService.apiQueryGet(
1878
1870
  "GetContentByTypeAndDisplayText",
1879
1871
  `${JSON.stringify({ contenttype: contentType, displaytext: displayName })}`
1880
1872
  );
1881
1873
  });
1882
- var getContentWithSlug = (slug) => __async(void 0, null, function* () {
1874
+ var getContentWithSlug = (slug) => __async(null, null, function* () {
1883
1875
  const req = yield import_cms_proxy7.QueryApiService.apiQueryGet(
1884
1876
  "GetDocumentBySlug",
1885
1877
  `${JSON.stringify({ path: slug })}`
1886
1878
  );
1887
1879
  return req == null ? void 0 : req.items[0];
1888
1880
  });
1889
- var getContentsWithType = (contentType) => __async(void 0, null, function* () {
1881
+ var getContentsWithType = (contentType) => __async(null, null, function* () {
1890
1882
  const req = yield import_cms_proxy7.QueryApiService.apiQueryGet(
1891
1883
  "GetContentByType",
1892
1884
  `${JSON.stringify({ contenttype: contentType })}`
1893
1885
  );
1894
1886
  return req == null ? void 0 : req.items;
1895
1887
  });
1896
- var getPageProps = (ctx) => __async(void 0, null, function* () {
1888
+ var getPageProps = (ctx) => __async(null, null, function* () {
1897
1889
  var _a;
1898
1890
  var page = "index";
1899
1891
  const slugs = ctx.query.slug;
@@ -1909,9 +1901,9 @@ var getPageProps = (ctx) => __async(void 0, null, function* () {
1909
1901
 
1910
1902
  // src/hooks/useMapMenuItems.ts
1911
1903
  var useMapMenuItems = () => {
1912
- return (0, import_react_query49.useQuery)({
1904
+ return (0, import_react_query47.useQuery)({
1913
1905
  queryKey: [QueryNames.MapMenuItems],
1914
- queryFn: () => __async(void 0, null, function* () {
1906
+ queryFn: () => __async(null, null, function* () {
1915
1907
  const req = yield getContentsWithType("MapMenuItem");
1916
1908
  return req;
1917
1909
  })
@@ -1920,11 +1912,11 @@ var useMapMenuItems = () => {
1920
1912
 
1921
1913
  // src/hooks/useClusterLinks.ts
1922
1914
  var import_api_proxy34 = require("@geowiki/api-proxy");
1923
- var import_react_query50 = require("@tanstack/react-query");
1915
+ var import_react_query48 = require("@tanstack/react-query");
1924
1916
  var useClusterLinks = (id) => {
1925
- return (0, import_react_query50.useQuery)({
1917
+ return (0, import_react_query48.useQuery)({
1926
1918
  queryKey: [QueryNames.GetSocialLinks, id],
1927
- queryFn: () => __async(void 0, null, function* () {
1919
+ queryFn: () => __async(null, null, function* () {
1928
1920
  const data = yield import_api_proxy34.ClusterService.clusterGetLinksAndPartner(id);
1929
1921
  return data;
1930
1922
  })
@@ -1932,11 +1924,11 @@ var useClusterLinks = (id) => {
1932
1924
  };
1933
1925
 
1934
1926
  // src/hooks/useCmsContentWithType.ts
1935
- var import_react_query51 = require("@tanstack/react-query");
1927
+ var import_react_query49 = require("@tanstack/react-query");
1936
1928
  var useCmsContentWithType = (contentType) => {
1937
- return (0, import_react_query51.useQuery)({
1929
+ return (0, import_react_query49.useQuery)({
1938
1930
  queryKey: [QueryNames.GetCmsContentWithType],
1939
- queryFn: () => __async(void 0, null, function* () {
1931
+ queryFn: () => __async(null, null, function* () {
1940
1932
  const req = yield getContentsWithType(contentType);
1941
1933
  return req;
1942
1934
  })
@@ -1945,11 +1937,11 @@ var useCmsContentWithType = (contentType) => {
1945
1937
 
1946
1938
  // src/hooks/useClusterNews.ts
1947
1939
  var import_api_proxy35 = require("@geowiki/api-proxy");
1948
- var import_react_query52 = require("@tanstack/react-query");
1940
+ var import_react_query50 = require("@tanstack/react-query");
1949
1941
  var useClusterNews = (id, sort = "", skip = 0, take = 100) => {
1950
- return (0, import_react_query52.useQuery)({
1942
+ return (0, import_react_query50.useQuery)({
1951
1943
  queryKey: [QueryNames.ClusterNews, id, sort, skip, take],
1952
- queryFn: () => __async(void 0, null, function* () {
1944
+ queryFn: () => __async(null, null, function* () {
1953
1945
  const data = yield import_api_proxy35.ClusterService.clusterGetClusterNews(
1954
1946
  id,
1955
1947
  sort,
@@ -1963,11 +1955,11 @@ var useClusterNews = (id, sort = "", skip = 0, take = 100) => {
1963
1955
 
1964
1956
  // src/hooks/useClusterDescription.ts
1965
1957
  var import_api_proxy36 = require("@geowiki/api-proxy");
1966
- var import_react_query53 = require("@tanstack/react-query");
1958
+ var import_react_query51 = require("@tanstack/react-query");
1967
1959
  var useClusterDescription = (id) => {
1968
- return (0, import_react_query53.useQuery)({
1960
+ return (0, import_react_query51.useQuery)({
1969
1961
  queryKey: [QueryNames.GetClusterDescription, id],
1970
- queryFn: () => __async(void 0, null, function* () {
1962
+ queryFn: () => __async(null, null, function* () {
1971
1963
  const data = yield import_api_proxy36.ClusterService.clusterGetClusterDescription(id);
1972
1964
  return data;
1973
1965
  })
@@ -1976,11 +1968,11 @@ var useClusterDescription = (id) => {
1976
1968
 
1977
1969
  // src/hooks/useClusterDetails.ts
1978
1970
  var import_api_proxy37 = require("@geowiki/api-proxy");
1979
- var import_react_query54 = require("@tanstack/react-query");
1971
+ var import_react_query52 = require("@tanstack/react-query");
1980
1972
  var useClusterDetails = (id) => {
1981
- return (0, import_react_query54.useQuery)({
1973
+ return (0, import_react_query52.useQuery)({
1982
1974
  queryKey: [QueryNames.GetClusterDetails, id],
1983
- queryFn: () => __async(void 0, null, function* () {
1975
+ queryFn: () => __async(null, null, function* () {
1984
1976
  const data = yield import_api_proxy37.ClusterService.clusterGetClusterDetails(id);
1985
1977
  return data;
1986
1978
  })
@@ -1989,11 +1981,11 @@ var useClusterDetails = (id) => {
1989
1981
 
1990
1982
  // src/hooks/useClusterImagesAndVideos.ts
1991
1983
  var import_api_proxy38 = require("@geowiki/api-proxy");
1992
- var import_react_query55 = require("@tanstack/react-query");
1984
+ var import_react_query53 = require("@tanstack/react-query");
1993
1985
  var useClusterImagesAndVideos = (id) => {
1994
- return (0, import_react_query55.useQuery)({
1986
+ return (0, import_react_query53.useQuery)({
1995
1987
  queryKey: [QueryNames.GetImagesAndVideos, id],
1996
- queryFn: () => __async(void 0, null, function* () {
1988
+ queryFn: () => __async(null, null, function* () {
1997
1989
  const data = yield import_api_proxy38.ClusterService.clusterGetImagesAndVideos(id);
1998
1990
  return data;
1999
1991
  })
@@ -2001,8 +1993,8 @@ var useClusterImagesAndVideos = (id) => {
2001
1993
  };
2002
1994
 
2003
1995
  // src/hooks/useHost.ts
2004
- var import_react_query56 = require("@tanstack/react-query");
2005
- var getHost = () => __async(void 0, null, function* () {
1996
+ var import_react_query54 = require("@tanstack/react-query");
1997
+ var getHost = () => __async(null, null, function* () {
2006
1998
  const response = yield fetch("/api/host");
2007
1999
  if (!response.ok) {
2008
2000
  return Promise.reject(null);
@@ -2010,15 +2002,15 @@ var getHost = () => __async(void 0, null, function* () {
2010
2002
  return response.json();
2011
2003
  });
2012
2004
  function useHost() {
2013
- return (0, import_react_query56.useQuery)({
2005
+ return (0, import_react_query54.useQuery)({
2014
2006
  queryKey: [QueryNames.GetHost],
2015
2007
  queryFn: getHost
2016
2008
  });
2017
2009
  }
2018
2010
 
2019
2011
  // src/hooks/useHostManagement.ts
2020
- var import_react_query57 = require("@tanstack/react-query");
2021
- var createHost = (hostData) => __async(void 0, null, function* () {
2012
+ var import_react_query55 = require("@tanstack/react-query");
2013
+ var createHost = (hostData) => __async(null, null, function* () {
2022
2014
  const response = yield fetch("/api/hosts", {
2023
2015
  method: "POST",
2024
2016
  headers: {
@@ -2031,7 +2023,7 @@ var createHost = (hostData) => __async(void 0, null, function* () {
2031
2023
  }
2032
2024
  return response.json();
2033
2025
  });
2034
- var updateHost = (_a) => __async(void 0, null, function* () {
2026
+ var updateHost = (_a) => __async(null, null, function* () {
2035
2027
  var _b = _a, {
2036
2028
  host
2037
2029
  } = _b, hostData = __objRest(_b, [
@@ -2049,7 +2041,7 @@ var updateHost = (_a) => __async(void 0, null, function* () {
2049
2041
  }
2050
2042
  return response.json();
2051
2043
  });
2052
- var deleteHost = (host) => __async(void 0, null, function* () {
2044
+ var deleteHost = (host) => __async(null, null, function* () {
2053
2045
  const response = yield fetch(`/api/hosts/${host}`, {
2054
2046
  method: "DELETE"
2055
2047
  });
@@ -2058,8 +2050,8 @@ var deleteHost = (host) => __async(void 0, null, function* () {
2058
2050
  }
2059
2051
  });
2060
2052
  var useCreateHost = () => {
2061
- const queryClient = (0, import_react_query57.useQueryClient)();
2062
- return (0, import_react_query57.useMutation)({
2053
+ const queryClient = (0, import_react_query55.useQueryClient)();
2054
+ return (0, import_react_query55.useMutation)({
2063
2055
  mutationFn: createHost,
2064
2056
  onSuccess: () => {
2065
2057
  queryClient.invalidateQueries({ queryKey: [QueryNames.GetHosts] });
@@ -2067,8 +2059,8 @@ var useCreateHost = () => {
2067
2059
  });
2068
2060
  };
2069
2061
  var useUpdateHost = () => {
2070
- const queryClient = (0, import_react_query57.useQueryClient)();
2071
- return (0, import_react_query57.useMutation)({
2062
+ const queryClient = (0, import_react_query55.useQueryClient)();
2063
+ return (0, import_react_query55.useMutation)({
2072
2064
  mutationFn: updateHost,
2073
2065
  onSuccess: () => {
2074
2066
  queryClient.invalidateQueries({ queryKey: [QueryNames.GetHosts] });
@@ -2077,8 +2069,8 @@ var useUpdateHost = () => {
2077
2069
  });
2078
2070
  };
2079
2071
  var useDeleteHost = () => {
2080
- const queryClient = (0, import_react_query57.useQueryClient)();
2081
- return (0, import_react_query57.useMutation)({
2072
+ const queryClient = (0, import_react_query55.useQueryClient)();
2073
+ return (0, import_react_query55.useMutation)({
2082
2074
  mutationFn: deleteHost,
2083
2075
  onSuccess: () => {
2084
2076
  queryClient.invalidateQueries({ queryKey: [QueryNames.GetHosts] });
@@ -2095,7 +2087,8 @@ var HostType = /* @__PURE__ */ ((HostType2) => {
2095
2087
 
2096
2088
  // src/utils/ServerHostUtils.ts
2097
2089
  var getHostData = () => {
2098
- return process.env.NODE_ENV === "production" ? [
2090
+ const useProd = process.env.NODE_ENV === "production" || process.env.GEOWIKI_USE_PROD_HOSTS === "true";
2091
+ return useProd ? [
2099
2092
  {
2100
2093
  host: "v2.geo-wiki.org",
2101
2094
  cmsUrl: "https://cms.main.geo-wiki.org"
@@ -2213,21 +2206,21 @@ var getHostData = () => {
2213
2206
  cmsUrl: "https://cms.geowiki.iiasa.ac.at/canopyatlas",
2214
2207
  tenantId: "3a1481ec-90a1-47d0-c34d-70610f97a4e5",
2215
2208
  redirectUrl: "/",
2216
- protectedPaths: ["/map"]
2209
+ protectedPaths: ["/canopy-atlas"]
2217
2210
  },
2218
2211
  {
2219
2212
  host: "canopyatlas.nodes.iiasa.ac.at",
2220
2213
  cmsUrl: "https://cms.geowiki.iiasa.ac.at/canopyatlas",
2221
2214
  tenantId: "3a1481ec-90a1-47d0-c34d-70610f97a4e5",
2222
2215
  redirectUrl: "/",
2223
- protectedPaths: ["/map"]
2216
+ protectedPaths: ["/canopy-atlas"]
2224
2217
  },
2225
2218
  {
2226
2219
  host: "basf.nodes.iiasa.ac.at",
2227
2220
  cmsUrl: "https://cms.main.geo-wiki.org/basf",
2228
2221
  tenantId: "3a16570a-6c13-db58-25f7-1866c09412b7",
2229
2222
  redirectUrl: "/",
2230
- protectedPaths: ["/map"]
2223
+ protectedPaths: ["/canopy-atlas"]
2231
2224
  },
2232
2225
  {
2233
2226
  host: "evo.nodes.iiasa.ac.at",
@@ -2267,6 +2260,13 @@ var getHostData = () => {
2267
2260
  host: "geowiki.local:3000",
2268
2261
  cmsUrl: "https://cms.main.geo-wiki.org"
2269
2262
  },
2263
+ {
2264
+ host: "canopyatlas.local:3000",
2265
+ cmsUrl: "https://cms.geowiki.iiasa.ac.at/canopyatlas",
2266
+ tenantId: "3a1481ec-90a1-47d0-c34d-70610f97a4e5",
2267
+ redirectUrl: "/",
2268
+ protectedPaths: ["/canopy-atlas"]
2269
+ },
2270
2270
  {
2271
2271
  host: "recodo.local:3000",
2272
2272
  cmsUrl: "https://framework.cms.geo-wiki.org"
@@ -2276,6 +2276,12 @@ var getHostData = () => {
2276
2276
  cmsUrl: "https://cms.main.geo-wiki.org/evoland",
2277
2277
  tenantId: "3a0d5d86-5eac-0234-6d1c-eeecdd06739d",
2278
2278
  redirectUrl: "/evoland/projects"
2279
+ },
2280
+ {
2281
+ host: "mowingquest.local:3000",
2282
+ cmsUrl: "https://cms.geowiki.iiasa.ac.at/mowing-quest",
2283
+ tenantId: "3a21f27b-c772-3945-10bb-658707d3670c",
2284
+ redirectUrl: "/"
2279
2285
  }
2280
2286
  ];
2281
2287
  };
@@ -2340,8 +2346,7 @@ var HostService = class {
2340
2346
  * Utility: Check if a path is protected for a host
2341
2347
  */
2342
2348
  static isPathProtected(hostInfo, path) {
2343
- if (!(hostInfo == null ? void 0 : hostInfo.protectedPaths))
2344
- return false;
2349
+ if (!(hostInfo == null ? void 0 : hostInfo.protectedPaths)) return false;
2345
2350
  return hostInfo.protectedPaths.some(
2346
2351
  (protectedPath) => path.startsWith(protectedPath)
2347
2352
  );
@@ -2401,8 +2406,7 @@ var HostService = class {
2401
2406
  * Utility: Get host info for current window location (client-side only)
2402
2407
  */
2403
2408
  static getCurrentHostInfo(hosts) {
2404
- if (typeof window === "undefined")
2405
- return void 0;
2409
+ if (typeof window === "undefined") return void 0;
2406
2410
  return hosts.find((h) => h.host === window.location.host);
2407
2411
  }
2408
2412
  /**
@@ -2637,8 +2641,7 @@ var createI18n = () => {
2637
2641
  let current = "en";
2638
2642
  return {
2639
2643
  locale: (next) => {
2640
- if (next)
2641
- current = next;
2644
+ if (next) current = next;
2642
2645
  return current;
2643
2646
  },
2644
2647
  t: (key) => key
@@ -3296,7 +3299,7 @@ var trackMapEvent = {
3296
3299
 
3297
3300
  // src/auth/AuthContext.tsx
3298
3301
  var import_react7 = require("react");
3299
- var import_react_query58 = require("@tanstack/react-query");
3302
+ var import_react_query56 = require("@tanstack/react-query");
3300
3303
  var import_jsx_runtime = require("react/jsx-runtime");
3301
3304
  var SESSION_QUERY_KEY = ["geowiki-session"];
3302
3305
  var SessionContext = (0, import_react7.createContext)({
@@ -3324,8 +3327,8 @@ function SessionProvider({
3324
3327
  session: initialSession,
3325
3328
  onSessionChange
3326
3329
  }) {
3327
- const queryClient = (0, import_react_query58.useQueryClient)();
3328
- const { data, isLoading } = (0, import_react_query58.useQuery)({
3330
+ const queryClient = (0, import_react_query56.useQueryClient)();
3331
+ const { data, isLoading } = (0, import_react_query56.useQuery)({
3329
3332
  queryKey: SESSION_QUERY_KEY,
3330
3333
  queryFn: fetchSession,
3331
3334
  initialData: initialSession != null ? initialSession : void 0,
@@ -3378,14 +3381,11 @@ var import_react8 = require("react");
3378
3381
  var import_jsx_runtime2 = require("react/jsx-runtime");
3379
3382
  var isBrowser = () => typeof window !== "undefined";
3380
3383
  var queryToSearchParams = (query, target = new URLSearchParams()) => {
3381
- if (!query)
3382
- return target;
3384
+ if (!query) return target;
3383
3385
  for (const [key, value] of Object.entries(query)) {
3384
- if (value === void 0 || value === null)
3385
- continue;
3386
+ if (value === void 0 || value === null) continue;
3386
3387
  if (Array.isArray(value)) {
3387
- for (const v of value)
3388
- target.append(key, String(v));
3388
+ for (const v of value) target.append(key, String(v));
3389
3389
  } else {
3390
3390
  target.set(key, String(value));
3391
3391
  }
@@ -3393,8 +3393,7 @@ var queryToSearchParams = (query, target = new URLSearchParams()) => {
3393
3393
  return target;
3394
3394
  };
3395
3395
  var urlToHref = (url) => {
3396
- if (typeof url === "string")
3397
- return url;
3396
+ if (typeof url === "string") return url;
3398
3397
  const { pathname = "", query, hash } = url;
3399
3398
  const qs = queryToSearchParams(query).toString();
3400
3399
  return `${pathname}${qs ? `?${qs}` : ""}${hash ? `#${hash}` : ""}`;
@@ -3468,15 +3467,11 @@ var DefaultImage = function DefaultImage2(props) {
3468
3467
  ]);
3469
3468
  const resolvedSrc = typeof src === "string" ? src : src == null ? void 0 : src.src;
3470
3469
  const mergedStyle = (0, import_react8.useMemo)(() => {
3471
- if (!fill && !objectFit && !objectPosition && !style)
3472
- return void 0;
3470
+ if (!fill && !objectFit && !objectPosition && !style) return void 0;
3473
3471
  const out = __spreadValues({}, style);
3474
- if (fill)
3475
- Object.assign(out, { position: "absolute", inset: 0, width: "100%", height: "100%" });
3476
- if (objectFit)
3477
- out.objectFit = objectFit;
3478
- if (objectPosition)
3479
- out.objectPosition = objectPosition;
3472
+ if (fill) Object.assign(out, { position: "absolute", inset: 0, width: "100%", height: "100%" });
3473
+ if (objectFit) out.objectFit = objectFit;
3474
+ if (objectPosition) out.objectPosition = objectPosition;
3480
3475
  return out;
3481
3476
  }, [fill, objectFit, objectPosition, style]);
3482
3477
  return (
@@ -3503,20 +3498,14 @@ var DefaultScript = function DefaultScript2(props) {
3503
3498
  onLoadRef.current = onLoad;
3504
3499
  onErrorRef.current = onError;
3505
3500
  (0, import_react8.useEffect)(() => {
3506
- if (!src || !isBrowser())
3507
- return;
3501
+ if (!src || !isBrowser()) return;
3508
3502
  const el = document.createElement("script");
3509
3503
  el.src = src;
3510
- if (id)
3511
- el.id = id;
3512
- if (async)
3513
- el.async = true;
3514
- if (defer)
3515
- el.defer = true;
3516
- if (type)
3517
- el.type = type;
3518
- if (nonce)
3519
- el.nonce = nonce;
3504
+ if (id) el.id = id;
3505
+ if (async) el.async = true;
3506
+ if (defer) el.defer = true;
3507
+ if (type) el.type = type;
3508
+ if (nonce) el.nonce = nonce;
3520
3509
  el.onload = () => {
3521
3510
  var _a2;
3522
3511
  return (_a2 = onLoadRef.current) == null ? void 0 : _a2.call(onLoadRef);
@@ -3550,8 +3539,7 @@ var parseSearch = (search) => {
3550
3539
  var useLocation2 = () => {
3551
3540
  const [tick, setTick] = (0, import_react8.useState)(0);
3552
3541
  (0, import_react8.useEffect)(() => {
3553
- if (!isBrowser())
3554
- return;
3542
+ if (!isBrowser()) return;
3555
3543
  const handler = () => setTick((t) => t + 1);
3556
3544
  window.addEventListener("popstate", handler);
3557
3545
  return () => window.removeEventListener("popstate", handler);
@@ -3572,31 +3560,26 @@ var useLocation2 = () => {
3572
3560
  var useDefaultRouter = () => {
3573
3561
  const loc = useLocation2();
3574
3562
  const query = (0, import_react8.useMemo)(() => parseSearch(loc.search), [loc.search]);
3575
- const push = (0, import_react8.useCallback)((url) => __async(void 0, null, function* () {
3576
- if (!isBrowser())
3577
- return false;
3563
+ const push = (0, import_react8.useCallback)((url) => __async(null, null, function* () {
3564
+ if (!isBrowser()) return false;
3578
3565
  window.history.pushState({}, "", urlToHref(url));
3579
3566
  window.dispatchEvent(new PopStateEvent("popstate"));
3580
3567
  return true;
3581
3568
  }), []);
3582
- const replace = (0, import_react8.useCallback)((url) => __async(void 0, null, function* () {
3583
- if (!isBrowser())
3584
- return false;
3569
+ const replace = (0, import_react8.useCallback)((url) => __async(null, null, function* () {
3570
+ if (!isBrowser()) return false;
3585
3571
  window.history.replaceState({}, "", urlToHref(url));
3586
3572
  window.dispatchEvent(new PopStateEvent("popstate"));
3587
3573
  return true;
3588
3574
  }), []);
3589
3575
  const back = (0, import_react8.useCallback)(() => {
3590
- if (isBrowser())
3591
- window.history.back();
3576
+ if (isBrowser()) window.history.back();
3592
3577
  }, []);
3593
3578
  const forward = (0, import_react8.useCallback)(() => {
3594
- if (isBrowser())
3595
- window.history.forward();
3579
+ if (isBrowser()) window.history.forward();
3596
3580
  }, []);
3597
3581
  const reload = (0, import_react8.useCallback)(() => {
3598
- if (isBrowser())
3599
- window.location.reload();
3582
+ if (isBrowser()) window.location.reload();
3600
3583
  }, []);
3601
3584
  return (0, import_react8.useMemo)(
3602
3585
  () => ({
@@ -3649,7 +3632,7 @@ var useDefaultI18n = () => ({
3649
3632
  t: (key) => key
3650
3633
  });
3651
3634
  var defaultDynamic = (loader, options) => {
3652
- const Lazy = (0, import_react8.lazy)(() => __async(void 0, null, function* () {
3635
+ const Lazy = (0, import_react8.lazy)(() => __async(null, null, function* () {
3653
3636
  return unwrapDefault(yield loader());
3654
3637
  }));
3655
3638
  const Loading = options == null ? void 0 : options.loading;