@geowiki/core 0.16.9-dev.2 → 0.16.9-dev.21

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,
@@ -88,13 +88,21 @@ __export(src_exports, {
88
88
  ColorArrayCSSClass: () => ColorArrayCSSClass,
89
89
  Config: () => Config,
90
90
  DOTS: () => DOTS,
91
+ DefaultHead: () => DefaultHead,
92
+ DefaultImage: () => DefaultImage,
93
+ DefaultLink: () => DefaultLink,
94
+ DefaultScript: () => DefaultScript,
91
95
  FarmingSystem: () => FarmingSystem,
92
96
  Features: () => Features,
97
+ FrameworkProvider: () => FrameworkProvider,
98
+ Head: () => Head,
93
99
  HostService: () => HostService,
94
100
  HostType: () => HostType,
95
101
  HuntingManagement: () => HuntingManagement,
102
+ Image: () => Image,
96
103
  ImageError: () => ImageError,
97
104
  IsTokenExpired: () => IsTokenExpired,
105
+ Link: () => Link,
98
106
  LiveStock: () => LiveStock,
99
107
  LookUps: () => LookUps,
100
108
  MainAgriculturalAreas: () => MainAgriculturalAreas,
@@ -109,6 +117,7 @@ __export(src_exports, {
109
117
  ResourcesMenu: () => ResourcesMenu,
110
118
  Responsive: () => Responsive,
111
119
  SESSION_QUERY_KEY: () => SESSION_QUERY_KEY,
120
+ Script: () => Script,
112
121
  SessionProvider: () => SessionProvider,
113
122
  StyleType: () => StyleType,
114
123
  TaskEventType: () => TaskEventType,
@@ -119,9 +128,11 @@ __export(src_exports, {
119
128
  ViewStatus: () => ViewStatus,
120
129
  classNames: () => classNames,
121
130
  configStore: () => configStore,
131
+ defaultDynamic: () => defaultDynamic,
122
132
  delayedSlideInUp: () => delayedSlideInUp,
123
133
  downloadData: () => downloadData,
124
134
  downloadJSON: () => downloadJSON,
135
+ dynamic: () => dynamic,
125
136
  easing: () => easing,
126
137
  findHostInfo: () => findHostInfo,
127
138
  formatUnixDate: () => formatUnixDate,
@@ -146,6 +157,7 @@ __export(src_exports, {
146
157
  itemVariants: () => itemVariants,
147
158
  keyStr: () => keyStr,
148
159
  listVariants: () => listVariants,
160
+ queryToSearchParams: () => queryToSearchParams,
149
161
  rgbDataURL: () => rgbDataURL,
150
162
  routes: () => routes,
151
163
  scrollToFirstErrorElement: () => scrollToFirstErrorElement,
@@ -166,6 +178,7 @@ __export(src_exports, {
166
178
  trackUmamiEvent: () => trackUmamiEvent,
167
179
  trackUserEvent: () => trackUserEvent,
168
180
  triplet: () => triplet,
181
+ unwrapDefault: () => unwrapDefault,
169
182
  useAllNewsFromAllClusters: () => useAllNewsFromAllClusters,
170
183
  useApiImage: () => useApiImage,
171
184
  useApiUrl: () => useApiUrl,
@@ -199,7 +212,12 @@ __export(src_exports, {
199
212
  useCountries: () => useCountries,
200
213
  useCreateHost: () => useCreateHost,
201
214
  useCurrentUser: () => useCurrentUser,
215
+ useDefaultI18n: () => useDefaultI18n,
216
+ useDefaultNavigationRouter: () => useDefaultNavigationRouter,
217
+ useDefaultRouter: () => useDefaultRouter,
218
+ useDefaultSearchParams: () => useDefaultSearchParams,
202
219
  useDefaultSettings: () => useDefaultSettings,
220
+ useDefaultTheme: () => useDefaultTheme,
203
221
  useDeleteHost: () => useDeleteHost,
204
222
  useDimensions: () => useDimensions,
205
223
  useEmailing: () => useEmailing,
@@ -211,12 +229,14 @@ __export(src_exports, {
211
229
  useFileUpload: () => useFileUpload,
212
230
  useFileUrl: () => useFileUrl,
213
231
  useFilterClusters: () => useFilterClusters,
232
+ useFrameworkAdapters: () => useFrameworkAdapters,
214
233
  useGeoWikiSettings: () => useGeoWikiSettings,
215
234
  useGetUserProject: () => useGetUserProject,
216
235
  useGrantedPolicies: () => useGrantedPolicies,
217
236
  useGroupsInProject: () => useGroupsInProject,
218
237
  useHost: () => useHost,
219
238
  useHosts: () => useHosts,
239
+ useI18n: () => useI18n,
220
240
  useImageUrl: () => useImageUrl,
221
241
  useIntroTourSettings: () => useIntroTourSettings,
222
242
  useIsAdmin: () => useIsAdmin,
@@ -232,6 +252,7 @@ __export(src_exports, {
232
252
  useLockBodyScroll: () => useLockBodyScroll,
233
253
  useLookUp: () => useLookUp,
234
254
  useMapMenuItems: () => useMapMenuItems,
255
+ useNavigationRouter: () => useNavigationRouter,
235
256
  useNews: () => useNews,
236
257
  useNewsFromAllClusters: () => useNewsFromAllClusters,
237
258
  usePagination: () => usePagination,
@@ -254,6 +275,8 @@ __export(src_exports, {
254
275
  useResourceType: () => useResourceType,
255
276
  useReviewTaskBulkUpload: () => useReviewTaskBulkUpload,
256
277
  useRoles: () => useRoles,
278
+ useRouter: () => useRouter,
279
+ useSearchParams: () => useSearchParams,
257
280
  useSession: () => useSession,
258
281
  useTaskAnnotation: () => useTaskAnnotation,
259
282
  useTaskAnswers: () => useTaskAnswers,
@@ -265,6 +288,7 @@ __export(src_exports, {
265
288
  useTaskStatusList: () => useTaskStatusList,
266
289
  useTasksPerLocation: () => useTasksPerLocation,
267
290
  useTenants: () => useTenants,
291
+ useTheme: () => useTheme,
268
292
  useTopic: () => useTopic,
269
293
  useUpdateActiveGroupInProject: () => useUpdateActiveGroupInProject,
270
294
  useUpdateHost: () => useUpdateHost,
@@ -273,7 +297,7 @@ __export(src_exports, {
273
297
  useUserRoles: () => useUserRoles,
274
298
  useUsers: () => useUsers
275
299
  });
276
- module.exports = __toCommonJS(src_exports);
300
+ module.exports = __toCommonJS(index_exports);
277
301
 
278
302
  // src/Animation.ts
279
303
  var easing = [0.175, 0.85, 0.42, 0.96];
@@ -409,8 +433,6 @@ var QueryConstants = {
409
433
  GetTaskMultipleAnnotations: "GetTaskMultipleAnnotations",
410
434
  GetTaskSavedAnnotations: "GetTaskSavedAnnotations",
411
435
  DeleteTask: "DeleteTask",
412
- GetApiImage: "GetApiImage",
413
- GetCmsImage: "GetCmsImage",
414
436
  GetQuestionnaireForProject: "GetQuestionnaireForProject",
415
437
  GetTaskAnswers: "GetTaskAnswers",
416
438
  UploadTasks: "UploadTasks",
@@ -499,7 +521,7 @@ var import_evoland_api_proxy = require("@geowiki/evoland-api-proxy");
499
521
  var useEvolandWmsLayers = () => {
500
522
  return (0, import_react_query2.useQuery)({
501
523
  queryKey: [QueryNames.GetAvailableWmsLayers],
502
- queryFn: () => __async(void 0, null, function* () {
524
+ queryFn: () => __async(null, null, function* () {
503
525
  const data = yield import_evoland_api_proxy.ProjectService.getAvailableLayersAvailablelayersGet();
504
526
  return data;
505
527
  })
@@ -529,7 +551,7 @@ var import_api_proxy = require("@geowiki/api-proxy");
529
551
  var useAppConfig = () => {
530
552
  return (0, import_react_query3.useQuery)({
531
553
  queryKey: [QueryConstants.GetAppConfig],
532
- queryFn: () => __async(void 0, null, function* () {
554
+ queryFn: () => __async(null, null, function* () {
533
555
  const data = yield import_api_proxy.AbpApplicationConfigurationService.abpApplicationConfigurationGet();
534
556
  return data;
535
557
  }),
@@ -544,7 +566,7 @@ var import_react_query4 = require("@tanstack/react-query");
544
566
  var useAudience = () => {
545
567
  return (0, import_react_query4.useQuery)({
546
568
  queryKey: [QueryNames.GetAudience],
547
- queryFn: () => __async(void 0, null, function* () {
569
+ queryFn: () => __async(null, null, function* () {
548
570
  const data = yield import_api_proxy2.ResourceService.resourceGetAvailableAudience();
549
571
  return data;
550
572
  }),
@@ -560,7 +582,7 @@ var import_react_query5 = require("@tanstack/react-query");
560
582
  var useCluster = (id) => {
561
583
  return (0, import_react_query5.useQuery)({
562
584
  queryKey: [QueryNames.Cluster, id],
563
- queryFn: () => __async(void 0, null, function* () {
585
+ queryFn: () => __async(null, null, function* () {
564
586
  const data = yield import_api_proxy3.ClusterService.clusterGet(id);
565
587
  return data;
566
588
  })
@@ -573,7 +595,7 @@ var import_react_query6 = require("@tanstack/react-query");
573
595
  var useClusterFilterSettings = () => {
574
596
  return (0, import_react_query6.useQuery)({
575
597
  queryKey: [QueryNames.GetClusterFilterSettings],
576
- queryFn: () => __async(void 0, null, function* () {
598
+ queryFn: () => __async(null, null, function* () {
577
599
  var req = yield import_cms_proxy.SettingsService.settingsGetSiteSettings("ClusterFilter");
578
600
  return req;
579
601
  })
@@ -582,7 +604,7 @@ var useClusterFilterSettings = () => {
582
604
  var useConfigSettings = () => {
583
605
  return (0, import_react_query6.useQuery)({
584
606
  queryKey: [QueryNames.GetConfig],
585
- queryFn: () => __async(void 0, null, function* () {
607
+ queryFn: () => __async(null, null, function* () {
586
608
  var req = yield import_cms_proxy.SettingsService.settingsGetSiteSettings("Config");
587
609
  return req;
588
610
  })
@@ -595,7 +617,7 @@ var import_react_query7 = require("@tanstack/react-query");
595
617
  var useClusterMapInfo = () => {
596
618
  return (0, import_react_query7.useQuery)({
597
619
  queryKey: [QueryNames.GetClusterForMap],
598
- queryFn: () => __async(void 0, null, function* () {
620
+ queryFn: () => __async(null, null, function* () {
599
621
  const data = yield import_api_proxy4.ClusterService.clusterGetMapInfo();
600
622
  return data;
601
623
  })
@@ -608,7 +630,7 @@ var import_react_query8 = require("@tanstack/react-query");
608
630
  var useClusters = (fetchAll = false, sort = "", skip = 0, take = 100) => {
609
631
  return (0, import_react_query8.useQuery)({
610
632
  queryKey: [QueryNames.Clusters, skip, take],
611
- queryFn: () => __async(void 0, null, function* () {
633
+ queryFn: () => __async(null, null, function* () {
612
634
  if (fetchAll) {
613
635
  const data = yield import_api_proxy5.ClusterService.clusterGetAllClusters(
614
636
  sort,
@@ -627,7 +649,7 @@ var useClusters = (fetchAll = false, sort = "", skip = 0, take = 100) => {
627
649
  var useAllNewsFromAllClusters = (sort = "", skip = 0, take = 100) => {
628
650
  return (0, import_react_query8.useQuery)({
629
651
  queryKey: [QueryNames.GetFarmerClusterNews, sort, skip, take],
630
- queryFn: () => __async(void 0, null, function* () {
652
+ queryFn: () => __async(null, null, function* () {
631
653
  const data = yield import_api_proxy5.ClusterService.clusterGetAllNewsFromAllClusters(
632
654
  sort,
633
655
  skip,
@@ -640,7 +662,7 @@ var useAllNewsFromAllClusters = (sort = "", skip = 0, take = 100) => {
640
662
 
641
663
  // src/hooks/useHosts.ts
642
664
  var import_react_query9 = require("@tanstack/react-query");
643
- var getHosts = () => __async(void 0, null, function* () {
665
+ var getHosts = () => __async(null, null, function* () {
644
666
  const response = yield fetch("/api/hosts");
645
667
  if (!response.ok) {
646
668
  throw new Error("Failed to fetch hosts");
@@ -680,7 +702,7 @@ var import_api_proxy6 = require("@geowiki/api-proxy");
680
702
  var useCountries = (fetchAll = false) => {
681
703
  return (0, import_react_query10.useQuery)({
682
704
  queryKey: [QueryNames.GetCountries, fetchAll],
683
- queryFn: () => __async(void 0, null, function* () {
705
+ queryFn: () => __async(null, null, function* () {
684
706
  const data = yield import_api_proxy6.ClusterService.clusterGetCountries(fetchAll);
685
707
  data.sort((a, b) => {
686
708
  if (!a.country || !b.country) {
@@ -731,7 +753,7 @@ var useFileUrl = () => {
731
753
  var useFileUpload = (formData) => {
732
754
  return (0, import_react_query11.useQuery)({
733
755
  queryKey: [QueryNames.FileUpload, formData],
734
- queryFn: () => __async(void 0, null, function* () {
756
+ queryFn: () => __async(null, null, function* () {
735
757
  const data = yield import_api_proxy7.FileService.fileUpload(formData);
736
758
  return data;
737
759
  })
@@ -754,7 +776,7 @@ var useFilterClusters = (filter) => {
754
776
  filter.mainAgriculturalAreas,
755
777
  filter.sort
756
778
  ],
757
- queryFn: () => __async(void 0, null, function* () {
779
+ queryFn: () => __async(null, null, function* () {
758
780
  const data = yield import_api_proxy8.ClusterService.clusterFilter(filter);
759
781
  return data;
760
782
  })
@@ -767,7 +789,7 @@ var import_react_query13 = require("@tanstack/react-query");
767
789
  var useGeoWikiSettings = () => {
768
790
  return (0, import_react_query13.useQuery)({
769
791
  queryKey: [QueryNames.GetAppSettings],
770
- queryFn: () => __async(void 0, null, function* () {
792
+ queryFn: () => __async(null, null, function* () {
771
793
  var req = yield import_cms_proxy2.SettingsService.settingsGetSiteSettings("GeoWiki");
772
794
  return req;
773
795
  })
@@ -786,7 +808,7 @@ var import_react_query14 = require("@tanstack/react-query");
786
808
  var useIntroTourSettings = () => {
787
809
  return (0, import_react_query14.useQuery)({
788
810
  queryKey: [QueryNames.GetIntroTour],
789
- queryFn: () => __async(void 0, null, function* () {
811
+ queryFn: () => __async(null, null, function* () {
790
812
  var req = yield import_cms_proxy3.SettingsService.settingsGetSiteSettings("IntroTour");
791
813
  return req;
792
814
  })
@@ -823,7 +845,7 @@ var import_react_query15 = require("@tanstack/react-query");
823
845
  var useLanguages = () => {
824
846
  return (0, import_react_query15.useQuery)({
825
847
  queryKey: [QueryNames.GetLanguages],
826
- queryFn: () => __async(void 0, null, function* () {
848
+ queryFn: () => __async(null, null, function* () {
827
849
  const data = yield import_api_proxy9.ResourceService.resourceGetAvailableLanguages();
828
850
  return data;
829
851
  }),
@@ -838,7 +860,7 @@ var import_react_query16 = require("@tanstack/react-query");
838
860
  var useLayerInfo = (url, layerName) => {
839
861
  return (0, import_react_query16.useQuery)({
840
862
  queryKey: [QueryNames.GetUseLayerInfo, url, layerName],
841
- queryFn: () => __async(void 0, null, function* () {
863
+ queryFn: () => __async(null, null, function* () {
842
864
  var legendUrl = url + "?service=WMS&version=1.1.0&request=GetLegendGraphic&layer=" + layerName + "&format=application/json";
843
865
  var res = yield fetch(legendUrl);
844
866
  var data = yield res.json();
@@ -863,7 +885,7 @@ function useLocation() {
863
885
  var useLocationsForProject = (locationreq) => {
864
886
  return (0, import_react_query17.useQuery)({
865
887
  queryKey: [QueryConstants.GetLocations, locationreq],
866
- queryFn: () => __async(void 0, null, function* () {
888
+ queryFn: () => __async(null, null, function* () {
867
889
  return import_evoland_api_proxy2.ProjectService.searchLocationsLocationsPost(locationreq);
868
890
  })
869
891
  });
@@ -871,7 +893,7 @@ var useLocationsForProject = (locationreq) => {
871
893
  var useLocationBulkUpload = (uploadLocations, file, project_id, group_id) => {
872
894
  return (0, import_react_query17.useQuery)({
873
895
  queryKey: [QueryConstants.UploadLocations, uploadLocations, file, group_id],
874
- queryFn: () => __async(void 0, null, function* () {
896
+ queryFn: () => __async(null, null, function* () {
875
897
  try {
876
898
  const res = yield import_evoland_api_proxy2.LocationService.bulkUploadLocationsUploadlocationsPost({ file, project_id, group_id });
877
899
  return res;
@@ -885,7 +907,7 @@ var useLocationBulkUpload = (uploadLocations, file, project_id, group_id) => {
885
907
  var useTaskBulkUpload = (uploadTasks, file, project_id) => {
886
908
  return (0, import_react_query17.useQuery)({
887
909
  queryKey: [QueryConstants.UploadTasks, uploadTasks, file],
888
- queryFn: () => __async(void 0, null, function* () {
910
+ queryFn: () => __async(null, null, function* () {
889
911
  try {
890
912
  return import_evoland_api_proxy2.LocationService.uploadLocationTaskUploadlocationtaskPost({ file, project_id });
891
913
  } catch (error) {
@@ -898,7 +920,7 @@ var useTaskBulkUpload = (uploadTasks, file, project_id) => {
898
920
  var useReviewTaskBulkUpload = (uploadReviewTasks, file, project_id) => {
899
921
  return (0, import_react_query17.useQuery)({
900
922
  queryKey: [QueryConstants.UploadReviewTasks, uploadReviewTasks, file],
901
- queryFn: () => __async(void 0, null, function* () {
923
+ queryFn: () => __async(null, null, function* () {
902
924
  try {
903
925
  return import_evoland_api_proxy2.LocationService.bulkUploadReviewTasksUploadreviewtasksPost({ file, project_id });
904
926
  } catch (error) {
@@ -931,7 +953,7 @@ var import_api_proxy10 = require("@geowiki/api-proxy");
931
953
  var useNews = (lang = "all", skip = 0, take = 100) => {
932
954
  return (0, import_react_query19.useQuery)({
933
955
  queryKey: [QueryNames.GetNews, lang, skip, take],
934
- queryFn: () => __async(void 0, null, function* () {
956
+ queryFn: () => __async(null, null, function* () {
935
957
  if (lang == "all") {
936
958
  const res2 = yield import_api_proxy10.NewsService.newsGetExternalNews("", skip, take);
937
959
  return res2.items;
@@ -1012,7 +1034,7 @@ var import_react_query20 = require("@tanstack/react-query");
1012
1034
  var usePublicationSettings = () => {
1013
1035
  return (0, import_react_query20.useQuery)({
1014
1036
  queryKey: [QueryNames.GetPublicationSettings],
1015
- queryFn: () => __async(void 0, null, function* () {
1037
+ queryFn: () => __async(null, null, function* () {
1016
1038
  var req = yield import_cms_proxy5.SettingsService.settingsGetSiteSettings("Publication");
1017
1039
  return req;
1018
1040
  })
@@ -1025,7 +1047,7 @@ var import_react_query21 = require("@tanstack/react-query");
1025
1047
  var useResource = (search = "", sort = "", skip = 0, take = 100) => {
1026
1048
  return (0, import_react_query21.useQuery)({
1027
1049
  queryKey: [QueryNames.GetResource, search, sort, skip, take],
1028
- queryFn: () => __async(void 0, null, function* () {
1050
+ queryFn: () => __async(null, null, function* () {
1029
1051
  if (search !== "") {
1030
1052
  const data2 = yield import_api_proxy11.ResourceService.resourceSearch(search);
1031
1053
  return data2;
@@ -1057,7 +1079,7 @@ var useResourceFilter = (filter) => {
1057
1079
  filter.sorting,
1058
1080
  filter.isFramework
1059
1081
  ],
1060
- queryFn: () => __async(void 0, null, function* () {
1082
+ queryFn: () => __async(null, null, function* () {
1061
1083
  const data = yield import_api_proxy12.ResourceService.resourceFilter(filter);
1062
1084
  return data;
1063
1085
  })
@@ -1070,7 +1092,7 @@ var import_react_query23 = require("@tanstack/react-query");
1070
1092
  var useResourceType = () => {
1071
1093
  return (0, import_react_query23.useQuery)({
1072
1094
  queryKey: [QueryNames.GetResourceType],
1073
- queryFn: () => __async(void 0, null, function* () {
1095
+ queryFn: () => __async(null, null, function* () {
1074
1096
  var data = yield import_api_proxy13.ResourceService.resourceGetAvailableResourceType();
1075
1097
  return data;
1076
1098
  })
@@ -1083,7 +1105,7 @@ var import_react_query24 = require("@tanstack/react-query");
1083
1105
  var useTopic = () => {
1084
1106
  return (0, import_react_query24.useQuery)({
1085
1107
  queryKey: [QueryNames.GetTopic],
1086
- queryFn: () => __async(void 0, null, function* () {
1108
+ queryFn: () => __async(null, null, function* () {
1087
1109
  var data = yield import_api_proxy14.ResourceService.resourceGetAvailableTopic();
1088
1110
  return data;
1089
1111
  }),
@@ -1099,7 +1121,7 @@ var import_api_proxy15 = require("@geowiki/api-proxy");
1099
1121
  var useUserProfileGet = () => {
1100
1122
  return (0, import_react_query25.useQuery)({
1101
1123
  queryKey: [QueryNames.GetUserProfile],
1102
- queryFn: () => __async(void 0, null, function* () {
1124
+ queryFn: () => __async(null, null, function* () {
1103
1125
  var data = yield import_api_proxy15.ProfileService.profileGet();
1104
1126
  return data;
1105
1127
  })
@@ -1112,7 +1134,7 @@ var import_api_proxy16 = require("@geowiki/api-proxy");
1112
1134
  var useUsers = (pageIndex, pageSize, filter, sorting) => {
1113
1135
  return (0, import_react_query26.useQuery)({
1114
1136
  queryKey: [QueryConstants.GetUsers, pageIndex, pageSize, filter, sorting],
1115
- queryFn: () => __async(void 0, null, function* () {
1137
+ queryFn: () => __async(null, null, function* () {
1116
1138
  let skip = 0;
1117
1139
  if (pageIndex > 0) {
1118
1140
  skip = pageIndex * pageSize;
@@ -1132,7 +1154,7 @@ var useUsers = (pageIndex, pageSize, filter, sorting) => {
1132
1154
  var import_react5 = __toESM(require("react"));
1133
1155
  function useRenderInfo(name = "Unknown") {
1134
1156
  const count = import_react5.default.useRef(0);
1135
- const lastRender = import_react5.default.useRef();
1157
+ const lastRender = import_react5.default.useRef(void 0);
1136
1158
  const now = Date.now();
1137
1159
  count.current++;
1138
1160
  import_react5.default.useEffect(() => {
@@ -1156,7 +1178,7 @@ var import_react_query27 = require("@tanstack/react-query");
1156
1178
  var useDefaultSettings = () => {
1157
1179
  return (0, import_react_query27.useQuery)({
1158
1180
  queryKey: [QueryNames.DefaultSettings],
1159
- queryFn: () => __async(void 0, null, function* () {
1181
+ queryFn: () => __async(null, null, function* () {
1160
1182
  const req = yield import_cms_proxy6.SettingsService.settingsGetDefaultSiteSettings();
1161
1183
  return req;
1162
1184
  })
@@ -1175,7 +1197,7 @@ var import_react_query28 = require("@tanstack/react-query");
1175
1197
  var useEmailing = () => {
1176
1198
  return (0, import_react_query28.useQuery)({
1177
1199
  queryKey: [QueryConstants.GetEmailing],
1178
- queryFn: () => __async(void 0, null, function* () {
1200
+ queryFn: () => __async(null, null, function* () {
1179
1201
  const data = yield import_api_proxy17.EmailSettingsService.emailSettingsGet();
1180
1202
  return data;
1181
1203
  })
@@ -1205,7 +1227,7 @@ var import_react_query29 = require("@tanstack/react-query");
1205
1227
  var useFeatures = (providerName, providerKey) => {
1206
1228
  return (0, import_react_query29.useQuery)({
1207
1229
  queryKey: [QueryConstants.GetFeatures, providerName, providerKey],
1208
- queryFn: () => __async(void 0, null, function* () {
1230
+ queryFn: () => __async(null, null, function* () {
1209
1231
  const data = yield import_api_proxy18.FeaturesService.featuresGet(providerName, providerKey);
1210
1232
  return data;
1211
1233
  })
@@ -1218,7 +1240,7 @@ var import_api_proxy19 = require("@geowiki/api-proxy");
1218
1240
  var useAssignableRoles = () => {
1219
1241
  return (0, import_react_query30.useQuery)({
1220
1242
  queryKey: [QueryConstants.GetAssignableRoles],
1221
- queryFn: () => __async(void 0, null, function* () {
1243
+ queryFn: () => __async(null, null, function* () {
1222
1244
  const data = yield import_api_proxy19.UserService.userGetAssignableRoles();
1223
1245
  return data;
1224
1246
  })
@@ -1231,7 +1253,7 @@ var import_react_query31 = require("@tanstack/react-query");
1231
1253
  var useUserRoles = ({ userId }) => {
1232
1254
  return (0, import_react_query31.useQuery)({
1233
1255
  queryKey: [QueryConstants.GetUserRoles, userId],
1234
- queryFn: () => __async(void 0, null, function* () {
1256
+ queryFn: () => __async(null, null, function* () {
1235
1257
  const data = yield import_api_proxy20.UserService.userGetRoles(userId);
1236
1258
  return data;
1237
1259
  })
@@ -1244,7 +1266,7 @@ var import_react_query32 = require("@tanstack/react-query");
1244
1266
  var usePermissions = (providerName, providerKey) => {
1245
1267
  return (0, import_react_query32.useQuery)({
1246
1268
  queryKey: [QueryConstants.GetPermissions, providerName, providerKey],
1247
- queryFn: () => __async(void 0, null, function* () {
1269
+ queryFn: () => __async(null, null, function* () {
1248
1270
  const data = yield import_api_proxy21.PermissionsService.permissionsGet(
1249
1271
  providerName,
1250
1272
  providerKey
@@ -1260,7 +1282,7 @@ var import_api_proxy22 = require("@geowiki/api-proxy");
1260
1282
  var useRoles = (pageIndex, pageSize, filter, sorting) => {
1261
1283
  return (0, import_react_query33.useQuery)({
1262
1284
  queryKey: [QueryConstants.GetRoles, pageIndex, pageSize, filter, sorting],
1263
- queryFn: () => __async(void 0, null, function* () {
1285
+ queryFn: () => __async(null, null, function* () {
1264
1286
  let skip = 0;
1265
1287
  if (pageIndex > 0) {
1266
1288
  skip = pageIndex * pageSize;
@@ -1282,7 +1304,7 @@ var import_react_query34 = require("@tanstack/react-query");
1282
1304
  var useProfile = () => {
1283
1305
  return (0, import_react_query34.useQuery)({
1284
1306
  queryKey: [QueryConstants.GetProfile],
1285
- queryFn: () => __async(void 0, null, function* () {
1307
+ queryFn: () => __async(null, null, function* () {
1286
1308
  const data = yield import_api_proxy23.ProfileService.profileGet();
1287
1309
  return data;
1288
1310
  })
@@ -1295,7 +1317,7 @@ var import_api_proxy24 = require("@geowiki/api-proxy");
1295
1317
  var useTenants = (pageIndex, pageSize, filter, sorting) => {
1296
1318
  return (0, import_react_query35.useQuery)({
1297
1319
  queryKey: [QueryConstants.GetTenants, pageIndex, pageSize, filter, sorting],
1298
- queryFn: () => __async(void 0, null, function* () {
1320
+ queryFn: () => __async(null, null, function* () {
1299
1321
  let skip = 0;
1300
1322
  if (pageIndex > 0) {
1301
1323
  skip = pageIndex * pageSize;
@@ -1317,7 +1339,7 @@ var import_evoland_api_proxy3 = require("@geowiki/evoland-api-proxy");
1317
1339
  var useEvolandLabels = (projectId) => {
1318
1340
  return (0, import_react_query36.useQuery)({
1319
1341
  queryKey: [QueryNames.GetEvolandLabels, projectId],
1320
- queryFn: () => __async(void 0, null, function* () {
1342
+ queryFn: () => __async(null, null, function* () {
1321
1343
  const data = yield import_evoland_api_proxy3.ProjectService.getLabelsLabelsProjectIdProjectIdGet(projectId);
1322
1344
  return data;
1323
1345
  })
@@ -1331,7 +1353,7 @@ var useLookUp = (ServiceName, params, LookUpsClusterCountries, LookUpsClusterAct
1331
1353
  let result;
1332
1354
  return (0, import_react_query37.useQuery)({
1333
1355
  queryKey: [QueryNames.GetLookUp, ServiceName, params],
1334
- queryFn: () => __async(void 0, null, function* () {
1356
+ queryFn: () => __async(null, null, function* () {
1335
1357
  switch (ServiceName) {
1336
1358
  case LookUpsClusterCountries: {
1337
1359
  result = yield import_api_proxy25.ClusterService.clusterGetCountries(params);
@@ -1365,7 +1387,7 @@ var import_evoland_api_proxy4 = require("@geowiki/evoland-api-proxy");
1365
1387
  var useProjects = (fetch2, start = 0, amount = 9) => {
1366
1388
  return (0, import_react_query38.useQuery)({
1367
1389
  queryKey: [QueryConstants.GetProjects, fetch2, start, amount],
1368
- queryFn: () => __async(void 0, null, function* () {
1390
+ queryFn: () => __async(null, null, function* () {
1369
1391
  if (fetch2)
1370
1392
  return import_evoland_api_proxy4.ProjectService.listProjectsListprojectsStartidxStartidxAmountAmountGet(
1371
1393
  start,
@@ -1377,7 +1399,7 @@ var useProjects = (fetch2, start = 0, amount = 9) => {
1377
1399
  var useProjectDetails = (projectId, update) => {
1378
1400
  return (0, import_react_query38.useQuery)({
1379
1401
  queryKey: [QueryConstants.GetProjectDetails, projectId, update],
1380
- queryFn: () => __async(void 0, null, function* () {
1402
+ queryFn: () => __async(null, null, function* () {
1381
1403
  return import_evoland_api_proxy4.ProjectService.projectInfoProjectinfoProjectIdProjectIdGet(
1382
1404
  projectId
1383
1405
  );
@@ -1387,7 +1409,7 @@ var useProjectDetails = (projectId, update) => {
1387
1409
  var useTasksPerLocation = (data) => {
1388
1410
  return (0, import_react_query38.useQuery)({
1389
1411
  queryKey: [QueryConstants.GetTasksPerLocation, data],
1390
- queryFn: () => __async(void 0, null, function* () {
1412
+ queryFn: () => __async(null, null, function* () {
1391
1413
  return import_evoland_api_proxy4.ProjectService.getTasksTasksGet(
1392
1414
  data.locationProjectId,
1393
1415
  data.taskForReview,
@@ -1415,7 +1437,7 @@ var useTasksPerLocation = (data) => {
1415
1437
  var useRandomTasksPerLocation = (data) => {
1416
1438
  return (0, import_react_query38.useQuery)({
1417
1439
  queryKey: [QueryConstants.GetTasksPerLocation, data],
1418
- queryFn: () => __async(void 0, null, function* () {
1440
+ queryFn: () => __async(null, null, function* () {
1419
1441
  return import_evoland_api_proxy4.ProjectService.getRandomTaskRandomtaskGet(
1420
1442
  data.locationProjectId,
1421
1443
  data.taskForReview,
@@ -1442,7 +1464,7 @@ var useRandomTasksPerLocation = (data) => {
1442
1464
  var useTaskComments = (taskIds) => {
1443
1465
  return (0, import_react_query38.useQuery)({
1444
1466
  queryKey: [QueryConstants.GetTaskComment, taskIds],
1445
- queryFn: () => __async(void 0, null, function* () {
1467
+ queryFn: () => __async(null, null, function* () {
1446
1468
  return import_evoland_api_proxy4.TaskService.taskLatestComomentsTasklatestcommentPost({
1447
1469
  task_ids: taskIds
1448
1470
  });
@@ -1452,7 +1474,7 @@ var useTaskComments = (taskIds) => {
1452
1474
  var useGroupsInProject = (projectId, updateGroup) => {
1453
1475
  return (0, import_react_query38.useQuery)({
1454
1476
  queryKey: [QueryConstants.GetGroupsInProject, projectId, updateGroup],
1455
- queryFn: () => __async(void 0, null, function* () {
1477
+ queryFn: () => __async(null, null, function* () {
1456
1478
  return import_evoland_api_proxy4.ProjectService.getProjectGroupsProjectgroupsProjectIdProjectIdGet(
1457
1479
  projectId
1458
1480
  );
@@ -1462,7 +1484,7 @@ var useGroupsInProject = (projectId, updateGroup) => {
1462
1484
  var useProjectUsers = (projectId) => {
1463
1485
  return (0, import_react_query38.useQuery)({
1464
1486
  queryKey: [QueryConstants.GetProjectUsers, projectId],
1465
- queryFn: () => __async(void 0, null, function* () {
1487
+ queryFn: () => __async(null, null, function* () {
1466
1488
  return import_evoland_api_proxy4.ProjectService.projectAllUsersProjectusersProjectIdProjectIdGet(
1467
1489
  projectId
1468
1490
  );
@@ -1472,7 +1494,7 @@ var useProjectUsers = (projectId) => {
1472
1494
  var useTaskStatusList = () => {
1473
1495
  return (0, import_react_query38.useQuery)({
1474
1496
  queryKey: [QueryConstants.GetTaskStatusList],
1475
- queryFn: () => __async(void 0, null, function* () {
1497
+ queryFn: () => __async(null, null, function* () {
1476
1498
  return import_evoland_api_proxy4.TaskService.getTaskStatusesTaskstatusesGet();
1477
1499
  })
1478
1500
  });
@@ -1485,7 +1507,7 @@ var useUpdateActiveGroupInProject = (projectId, groupId, update) => {
1485
1507
  groupId,
1486
1508
  update
1487
1509
  ],
1488
- queryFn: () => __async(void 0, null, function* () {
1510
+ queryFn: () => __async(null, null, function* () {
1489
1511
  if (update)
1490
1512
  return import_evoland_api_proxy4.ProjectService.selectProjectGroupProjectselectgroupPost({
1491
1513
  project_id: projectId,
@@ -1497,7 +1519,7 @@ var useUpdateActiveGroupInProject = (projectId, groupId, update) => {
1497
1519
  var useTaskAnnotation = (taskId) => {
1498
1520
  return (0, import_react_query38.useQuery)({
1499
1521
  queryKey: [QueryConstants.GetTaskAnnotation, taskId],
1500
- queryFn: () => __async(void 0, null, function* () {
1522
+ queryFn: () => __async(null, null, function* () {
1501
1523
  if (taskId !== null && taskId !== 0 && taskId !== void 0)
1502
1524
  return import_evoland_api_proxy4.TaskService.getTaskAnnotationAssetTaskannotationTaskIdTaskIdGet(
1503
1525
  taskId
@@ -1508,7 +1530,7 @@ var useTaskAnnotation = (taskId) => {
1508
1530
  var useTaskMultipleAnnotations = (taskId) => {
1509
1531
  return (0, import_react_query38.useQuery)({
1510
1532
  queryKey: [QueryConstants.GetTaskMultipleAnnotations, taskId],
1511
- queryFn: () => __async(void 0, null, function* () {
1533
+ queryFn: () => __async(null, null, function* () {
1512
1534
  if (taskId !== null && taskId !== 0 && taskId !== void 0)
1513
1535
  return import_evoland_api_proxy4.TaskService.getTaskAnnotationAssetsTaskannotationsTaskIdTaskIdGet(
1514
1536
  taskId
@@ -1519,7 +1541,7 @@ var useTaskMultipleAnnotations = (taskId) => {
1519
1541
  var useTaskSavedAnnotations = (taskId) => {
1520
1542
  return (0, import_react_query38.useQuery)({
1521
1543
  queryKey: [QueryConstants.GetTaskSavedAnnotations, taskId],
1522
- queryFn: () => __async(void 0, null, function* () {
1544
+ queryFn: () => __async(null, null, function* () {
1523
1545
  if (taskId !== null && taskId !== 0 && taskId !== void 0)
1524
1546
  return import_evoland_api_proxy4.TaskService.getSavedAnnotationGetsavedannotationTaskIdTaskIdGet(
1525
1547
  taskId
@@ -1530,7 +1552,7 @@ var useTaskSavedAnnotations = (taskId) => {
1530
1552
  var useTaskDelete = (taskId, projectId, deleteTask) => {
1531
1553
  return (0, import_react_query38.useQuery)({
1532
1554
  queryKey: [QueryConstants.DeleteTask, taskId, projectId, deleteTask],
1533
- queryFn: () => __async(void 0, null, function* () {
1555
+ queryFn: () => __async(null, null, function* () {
1534
1556
  if (taskId !== null && taskId !== void 0 && taskId !== 0 && deleteTask === true)
1535
1557
  return import_evoland_api_proxy4.TaskService.deleteTaskDeletetaskPost({
1536
1558
  project_id: projectId,
@@ -1548,7 +1570,7 @@ var useProjectStatisticsByUser = (projectId, startDate, endDate, filterUserId) =
1548
1570
  endDate,
1549
1571
  filterUserId
1550
1572
  ],
1551
- queryFn: () => __async(void 0, null, function* () {
1573
+ queryFn: () => __async(null, null, function* () {
1552
1574
  return import_evoland_api_proxy4.StatisticService.getUserStatisticsUserstatisticsProjectIdProjectIdStartDateStartDateEndDateEndDateFilterUserIdFilterUserIdGet(
1553
1575
  projectId,
1554
1576
  endDate,
@@ -1567,7 +1589,7 @@ var useContractStatisticsByUser = (projectId, startDate, endDate, filterUserId)
1567
1589
  endDate,
1568
1590
  filterUserId
1569
1591
  ],
1570
- queryFn: () => __async(void 0, null, function* () {
1592
+ queryFn: () => __async(null, null, function* () {
1571
1593
  return import_evoland_api_proxy4.StatisticService.getUserStatisticsUserstatisticsProjectIdProjectIdStartDateStartDateEndDateEndDateFilterUserIdFilterUserIdGet(
1572
1594
  projectId,
1573
1595
  endDate,
@@ -1586,7 +1608,7 @@ var useLatestTaskOnLocation = (locationId, projectId, referenceDate) => {
1586
1608
  projectId,
1587
1609
  referenceDate
1588
1610
  ],
1589
- queryFn: () => __async(void 0, null, function* () {
1611
+ queryFn: () => __async(null, null, function* () {
1590
1612
  return import_evoland_api_proxy4.ProjectService.locationLatestTaskLocationtaskLocationIdLocationIdProjectIdProjectIdReferenceDateReferenceDateGet(
1591
1613
  locationId,
1592
1614
  projectId,
@@ -1598,7 +1620,7 @@ var useLatestTaskOnLocation = (locationId, projectId, referenceDate) => {
1598
1620
  var useAssignProjectToUser = (userRoleRequest, update) => {
1599
1621
  return (0, import_react_query38.useQuery)({
1600
1622
  queryKey: [QueryConstants.GetProjectDetails, userRoleRequest, update],
1601
- queryFn: () => __async(void 0, null, function* () {
1623
+ queryFn: () => __async(null, null, function* () {
1602
1624
  if (update)
1603
1625
  return import_evoland_api_proxy4.ProjectService.setUserRoleSetuserrolePost(userRoleRequest);
1604
1626
  }),
@@ -1608,7 +1630,7 @@ var useAssignProjectToUser = (userRoleRequest, update) => {
1608
1630
  var useGetUserProject = (user_id, fetchData) => {
1609
1631
  return (0, import_react_query38.useQuery)({
1610
1632
  queryKey: [QueryConstants.GetUserProject, user_id, fetchData],
1611
- queryFn: () => __async(void 0, null, function* () {
1633
+ queryFn: () => __async(null, null, function* () {
1612
1634
  if (fetchData)
1613
1635
  return import_evoland_api_proxy4.ProjectService.getUserRoleProjectGetuserroleprojectUserIdUserIdGet(
1614
1636
  user_id
@@ -1619,7 +1641,7 @@ var useGetUserProject = (user_id, fetchData) => {
1619
1641
  var useUpdateUserDetail = (userDetailRequest, update) => {
1620
1642
  return (0, import_react_query38.useQuery)({
1621
1643
  queryKey: [QueryConstants.SetUserDetail, userDetailRequest, update],
1622
- queryFn: () => __async(void 0, null, function* () {
1644
+ queryFn: () => __async(null, null, function* () {
1623
1645
  if (update)
1624
1646
  return import_evoland_api_proxy4.ProjectService.setUserDetailSetuserdetailPost(userDetailRequest);
1625
1647
  })
@@ -1633,7 +1655,7 @@ var useProjectsPointsDownload = (projectId, download, userRole) => {
1633
1655
  download,
1634
1656
  userRole
1635
1657
  ],
1636
- queryFn: () => __async(void 0, null, function* () {
1658
+ queryFn: () => __async(null, null, function* () {
1637
1659
  if (userRole == "admin" && download)
1638
1660
  return import_evoland_api_proxy4.ProjectService.getLocationsSummaryLocationssummaryProjectIdProjectIdGet(
1639
1661
  projectId
@@ -1644,7 +1666,7 @@ var useProjectsPointsDownload = (projectId, download, userRole) => {
1644
1666
  var useQuestionnaire = (projectId) => {
1645
1667
  return (0, import_react_query38.useQuery)({
1646
1668
  queryKey: [QueryConstants.GetQuestionnaireForProject, projectId],
1647
- queryFn: () => __async(void 0, null, function* () {
1669
+ queryFn: () => __async(null, null, function* () {
1648
1670
  return import_evoland_api_proxy4.QuestionService.getProjectQuestionsAnswersQuestionsAnswersProjectIdProjectIdGet(
1649
1671
  projectId
1650
1672
  );
@@ -1654,7 +1676,7 @@ var useQuestionnaire = (projectId) => {
1654
1676
  var useTaskAnswers = (taskId) => {
1655
1677
  return (0, import_react_query38.useQuery)({
1656
1678
  queryKey: [QueryConstants.GetTaskAnswers, taskId],
1657
- queryFn: () => __async(void 0, null, function* () {
1679
+ queryFn: () => __async(null, null, function* () {
1658
1680
  return import_evoland_api_proxy4.TaskService.getTaskAnswersTaskanswersTaskIdTaskIdGet(taskId);
1659
1681
  })
1660
1682
  });
@@ -1662,7 +1684,7 @@ var useTaskAnswers = (taskId) => {
1662
1684
  var useProjectResultSet = (download, projectId, is_geo_json) => {
1663
1685
  return (0, import_react_query38.useQuery)({
1664
1686
  queryKey: [QueryConstants.GetProjectResultSet, download, projectId, is_geo_json],
1665
- queryFn: () => __async(void 0, null, function* () {
1687
+ queryFn: () => __async(null, null, function* () {
1666
1688
  return import_evoland_api_proxy4.ProjectService.projectResultSetProjectresultsetProjectIdProjectIdIsGeoJsonIsGeoJsonGet(projectId, is_geo_json);
1667
1689
  }),
1668
1690
  enabled: !!download && !!projectId
@@ -1670,38 +1692,30 @@ var useProjectResultSet = (download, projectId, is_geo_json) => {
1670
1692
  };
1671
1693
 
1672
1694
  // src/hooks/useApiImage.tsx
1673
- var import_react_query39 = require("@tanstack/react-query");
1695
+ var NO_IMAGE_PLACEHOLDER = "/assets/farmer-cluster/no-image-available.png";
1696
+ var EMPTY_GUID = "00000000-0000-0000-0000-000000000000";
1674
1697
  var useApiImage = (imageId) => {
1675
- return (0, import_react_query39.useQuery)({
1676
- queryKey: [QueryConstants.GetApiImage, imageId],
1677
- queryFn: () => __async(void 0, null, function* () {
1678
- const res = yield fetch(`/api/api-image/${imageId}`);
1679
- const data = yield res.json();
1680
- return data.fileUrl;
1681
- })
1682
- });
1698
+ if (!imageId || imageId === EMPTY_GUID) return NO_IMAGE_PLACEHOLDER;
1699
+ const { apiUrl, tenantId } = config_default.getState();
1700
+ const params = tenantId ? `__tenant=${tenantId}&id=${imageId}` : `id=${imageId}`;
1701
+ return `${apiUrl}/api/app/file/view?${params}`;
1683
1702
  };
1684
1703
 
1685
1704
  // src/hooks/useCmsImage.tsx
1686
- var import_react_query40 = require("@tanstack/react-query");
1705
+ var NO_IMAGE_PLACEHOLDER2 = "/assets/farmer-cluster/no-image-available.png";
1687
1706
  var useCmsImage = (imageId) => {
1688
- return (0, import_react_query40.useQuery)({
1689
- queryKey: [QueryConstants.GetCmsImage, imageId],
1690
- queryFn: () => __async(void 0, null, function* () {
1691
- const res = yield fetch(`/api/cms-image/${imageId}`);
1692
- const data = yield res.json();
1693
- return data.fileUrl;
1694
- })
1695
- });
1707
+ const cmsUrl = useCmsUrl();
1708
+ if (!imageId) return NO_IMAGE_PLACEHOLDER2;
1709
+ return `${cmsUrl}/media/${imageId}`;
1696
1710
  };
1697
1711
 
1698
1712
  // src/hooks/useClusterGetJoinRequests.ts
1699
1713
  var import_api_proxy26 = require("@geowiki/api-proxy");
1700
- var import_react_query41 = require("@tanstack/react-query");
1714
+ var import_react_query39 = require("@tanstack/react-query");
1701
1715
  var useClusterGetJoinRequests = (clusterId) => {
1702
- return (0, import_react_query41.useQuery)({
1716
+ return (0, import_react_query39.useQuery)({
1703
1717
  queryKey: [QueryNames.JoinRequests, clusterId],
1704
- queryFn: () => __async(void 0, null, function* () {
1718
+ queryFn: () => __async(null, null, function* () {
1705
1719
  const data = yield import_api_proxy26.ClusterService.clusterGetJoinRequests(clusterId);
1706
1720
  return data;
1707
1721
  })
@@ -1710,11 +1724,11 @@ var useClusterGetJoinRequests = (clusterId) => {
1710
1724
 
1711
1725
  // src/hooks/useClusterGetNews.ts
1712
1726
  var import_api_proxy27 = require("@geowiki/api-proxy");
1713
- var import_react_query42 = require("@tanstack/react-query");
1727
+ var import_react_query40 = require("@tanstack/react-query");
1714
1728
  var useClusterGetNews = (clusterId, newsId) => {
1715
- return (0, import_react_query42.useQuery)({
1729
+ return (0, import_react_query40.useQuery)({
1716
1730
  queryKey: [QueryNames.ClusterGetNews, clusterId, newsId],
1717
- queryFn: () => __async(void 0, null, function* () {
1731
+ queryFn: () => __async(null, null, function* () {
1718
1732
  const data = yield import_api_proxy27.ClusterService.clusterGetNews(clusterId, newsId);
1719
1733
  return data;
1720
1734
  })
@@ -1723,11 +1737,11 @@ var useClusterGetNews = (clusterId, newsId) => {
1723
1737
 
1724
1738
  // src/hooks/useClusterGetNewsNextPreviousStatus.ts
1725
1739
  var import_api_proxy28 = require("@geowiki/api-proxy");
1726
- var import_react_query43 = require("@tanstack/react-query");
1740
+ var import_react_query41 = require("@tanstack/react-query");
1727
1741
  var useClusterGetNewsNextPreviousStatus = (clusterId, newsId) => {
1728
- return (0, import_react_query43.useQuery)({
1742
+ return (0, import_react_query41.useQuery)({
1729
1743
  queryKey: [QueryNames.ClusterNewsNextPrevious, clusterId, newsId],
1730
- queryFn: () => __async(void 0, null, function* () {
1744
+ queryFn: () => __async(null, null, function* () {
1731
1745
  const data = yield import_api_proxy28.ClusterService.clusterGetNewsNextPreviousStatus(
1732
1746
  clusterId,
1733
1747
  newsId
@@ -1739,11 +1753,11 @@ var useClusterGetNewsNextPreviousStatus = (clusterId, newsId) => {
1739
1753
 
1740
1754
  // src/hooks/useClusterImages.ts
1741
1755
  var import_api_proxy29 = require("@geowiki/api-proxy");
1742
- var import_react_query44 = require("@tanstack/react-query");
1756
+ var import_react_query42 = require("@tanstack/react-query");
1743
1757
  var useClusterImages = (id) => {
1744
- return (0, import_react_query44.useQuery)({
1758
+ return (0, import_react_query42.useQuery)({
1745
1759
  queryKey: [QueryNames.ClusterImages, id],
1746
- queryFn: () => __async(void 0, null, function* () {
1760
+ queryFn: () => __async(null, null, function* () {
1747
1761
  const data = yield import_api_proxy29.ClusterService.clusterGetClusterImages(id);
1748
1762
  return data;
1749
1763
  })
@@ -1752,11 +1766,11 @@ var useClusterImages = (id) => {
1752
1766
 
1753
1767
  // src/hooks/useClusterOverview.ts
1754
1768
  var import_api_proxy30 = require("@geowiki/api-proxy");
1755
- var import_react_query45 = require("@tanstack/react-query");
1769
+ var import_react_query43 = require("@tanstack/react-query");
1756
1770
  var useClusterOverview = (id) => {
1757
- return (0, import_react_query45.useQuery)({
1771
+ return (0, import_react_query43.useQuery)({
1758
1772
  queryKey: [QueryNames.GetClusterOverview, id],
1759
- queryFn: () => __async(void 0, null, function* () {
1773
+ queryFn: () => __async(null, null, function* () {
1760
1774
  const data = yield import_api_proxy30.ClusterService.clusterGetClusterOverview(id);
1761
1775
  return data;
1762
1776
  })
@@ -1765,9 +1779,9 @@ var useClusterOverview = (id) => {
1765
1779
 
1766
1780
  // src/hooks/useClusterAllNews.ts
1767
1781
  var import_api_proxy31 = require("@geowiki/api-proxy");
1768
- var import_react_query46 = require("@tanstack/react-query");
1782
+ var import_react_query44 = require("@tanstack/react-query");
1769
1783
  var useClusterAllNews = (id, refresh, sorting, skipCount, maxResultCount, status) => {
1770
- return (0, import_react_query46.useQuery)({
1784
+ return (0, import_react_query44.useQuery)({
1771
1785
  queryKey: [
1772
1786
  QueryNames.ClusterAllNews,
1773
1787
  id,
@@ -1777,7 +1791,7 @@ var useClusterAllNews = (id, refresh, sorting, skipCount, maxResultCount, status
1777
1791
  refresh,
1778
1792
  status
1779
1793
  ],
1780
- queryFn: () => __async(void 0, null, function* () {
1794
+ queryFn: () => __async(null, null, function* () {
1781
1795
  const data = yield import_api_proxy31.ClusterService.clusterGetAllNews(
1782
1796
  id,
1783
1797
  sorting,
@@ -1792,11 +1806,11 @@ var useClusterAllNews = (id, refresh, sorting, skipCount, maxResultCount, status
1792
1806
 
1793
1807
  // src/hooks/useNewsFromAllClusters.ts
1794
1808
  var import_api_proxy32 = require("@geowiki/api-proxy");
1795
- var import_react_query47 = require("@tanstack/react-query");
1809
+ var import_react_query45 = require("@tanstack/react-query");
1796
1810
  var useNewsFromAllClusters = (skip = 0, take = 10) => {
1797
- return (0, import_react_query47.useQuery)({
1811
+ return (0, import_react_query45.useQuery)({
1798
1812
  queryKey: [QueryNames.ClusterAllNews, skip, take],
1799
- queryFn: () => __async(void 0, null, function* () {
1813
+ queryFn: () => __async(null, null, function* () {
1800
1814
  const data = yield import_api_proxy32.ClusterService.clusterGetAllNewsFromAllClusters(
1801
1815
  "",
1802
1816
  skip,
@@ -1809,11 +1823,11 @@ var useNewsFromAllClusters = (skip = 0, take = 10) => {
1809
1823
 
1810
1824
  // src/hooks/useClusterNewsWithId.ts
1811
1825
  var import_api_proxy33 = require("@geowiki/api-proxy");
1812
- var import_react_query48 = require("@tanstack/react-query");
1826
+ var import_react_query46 = require("@tanstack/react-query");
1813
1827
  var useClusterNewsWithId = (id) => {
1814
- return (0, import_react_query48.useQuery)({
1828
+ return (0, import_react_query46.useQuery)({
1815
1829
  queryKey: [QueryNames.ClusterNewsWithId, id],
1816
- queryFn: () => __async(void 0, null, function* () {
1830
+ queryFn: () => __async(null, null, function* () {
1817
1831
  const data = yield import_api_proxy33.ClusterService.clusterGetClusterNewsById(id);
1818
1832
  return data;
1819
1833
  })
@@ -1821,19 +1835,19 @@ var useClusterNewsWithId = (id) => {
1821
1835
  };
1822
1836
 
1823
1837
  // src/hooks/useMapMenuItems.ts
1824
- var import_react_query49 = require("@tanstack/react-query");
1838
+ var import_react_query47 = require("@tanstack/react-query");
1825
1839
 
1826
1840
  // src/utils/CmsApi.ts
1827
1841
  var import_cms_proxy7 = require("@geowiki/cms-proxy");
1828
- var getGeoWikiSettings = () => __async(void 0, null, function* () {
1842
+ var getGeoWikiSettings = () => __async(null, null, function* () {
1829
1843
  const req = yield import_cms_proxy7.SettingsService.settingsGetSiteSettings("GeoWiki");
1830
1844
  return req;
1831
1845
  });
1832
- var getDefaultSettings = () => __async(void 0, null, function* () {
1846
+ var getDefaultSettings = () => __async(null, null, function* () {
1833
1847
  const req = yield import_cms_proxy7.SettingsService.settingsGetDefaultSiteSettings();
1834
1848
  return req;
1835
1849
  });
1836
- var getMenus = (displayName) => __async(void 0, null, function* () {
1850
+ var getMenus = (displayName) => __async(null, null, function* () {
1837
1851
  const req = yield getContentWithTypeAndDisplayName(
1838
1852
  "Menu",
1839
1853
  displayName
@@ -1841,7 +1855,7 @@ var getMenus = (displayName) => __async(void 0, null, function* () {
1841
1855
  const menus = req == null ? void 0 : req.items[0];
1842
1856
  return menus;
1843
1857
  });
1844
- var getPageContent = (displayName) => __async(void 0, null, function* () {
1858
+ var getPageContent = (displayName) => __async(null, null, function* () {
1845
1859
  const req = yield getContentWithTypeAndDisplayName(
1846
1860
  "Page",
1847
1861
  displayName
@@ -1849,27 +1863,27 @@ var getPageContent = (displayName) => __async(void 0, null, function* () {
1849
1863
  const page = req == null ? void 0 : req.items[0];
1850
1864
  return page;
1851
1865
  });
1852
- var getContentWithTypeAndDisplayName = (contentType, displayName) => __async(void 0, null, function* () {
1866
+ var getContentWithTypeAndDisplayName = (contentType, displayName) => __async(null, null, function* () {
1853
1867
  return import_cms_proxy7.QueryApiService.apiQueryGet(
1854
1868
  "GetContentByTypeAndDisplayText",
1855
1869
  `${JSON.stringify({ contenttype: contentType, displaytext: displayName })}`
1856
1870
  );
1857
1871
  });
1858
- var getContentWithSlug = (slug) => __async(void 0, null, function* () {
1872
+ var getContentWithSlug = (slug) => __async(null, null, function* () {
1859
1873
  const req = yield import_cms_proxy7.QueryApiService.apiQueryGet(
1860
1874
  "GetDocumentBySlug",
1861
1875
  `${JSON.stringify({ path: slug })}`
1862
1876
  );
1863
1877
  return req == null ? void 0 : req.items[0];
1864
1878
  });
1865
- var getContentsWithType = (contentType) => __async(void 0, null, function* () {
1879
+ var getContentsWithType = (contentType) => __async(null, null, function* () {
1866
1880
  const req = yield import_cms_proxy7.QueryApiService.apiQueryGet(
1867
1881
  "GetContentByType",
1868
1882
  `${JSON.stringify({ contenttype: contentType })}`
1869
1883
  );
1870
1884
  return req == null ? void 0 : req.items;
1871
1885
  });
1872
- var getPageProps = (ctx) => __async(void 0, null, function* () {
1886
+ var getPageProps = (ctx) => __async(null, null, function* () {
1873
1887
  var _a;
1874
1888
  var page = "index";
1875
1889
  const slugs = ctx.query.slug;
@@ -1885,9 +1899,9 @@ var getPageProps = (ctx) => __async(void 0, null, function* () {
1885
1899
 
1886
1900
  // src/hooks/useMapMenuItems.ts
1887
1901
  var useMapMenuItems = () => {
1888
- return (0, import_react_query49.useQuery)({
1902
+ return (0, import_react_query47.useQuery)({
1889
1903
  queryKey: [QueryNames.MapMenuItems],
1890
- queryFn: () => __async(void 0, null, function* () {
1904
+ queryFn: () => __async(null, null, function* () {
1891
1905
  const req = yield getContentsWithType("MapMenuItem");
1892
1906
  return req;
1893
1907
  })
@@ -1896,11 +1910,11 @@ var useMapMenuItems = () => {
1896
1910
 
1897
1911
  // src/hooks/useClusterLinks.ts
1898
1912
  var import_api_proxy34 = require("@geowiki/api-proxy");
1899
- var import_react_query50 = require("@tanstack/react-query");
1913
+ var import_react_query48 = require("@tanstack/react-query");
1900
1914
  var useClusterLinks = (id) => {
1901
- return (0, import_react_query50.useQuery)({
1915
+ return (0, import_react_query48.useQuery)({
1902
1916
  queryKey: [QueryNames.GetSocialLinks, id],
1903
- queryFn: () => __async(void 0, null, function* () {
1917
+ queryFn: () => __async(null, null, function* () {
1904
1918
  const data = yield import_api_proxy34.ClusterService.clusterGetLinksAndPartner(id);
1905
1919
  return data;
1906
1920
  })
@@ -1908,11 +1922,11 @@ var useClusterLinks = (id) => {
1908
1922
  };
1909
1923
 
1910
1924
  // src/hooks/useCmsContentWithType.ts
1911
- var import_react_query51 = require("@tanstack/react-query");
1925
+ var import_react_query49 = require("@tanstack/react-query");
1912
1926
  var useCmsContentWithType = (contentType) => {
1913
- return (0, import_react_query51.useQuery)({
1927
+ return (0, import_react_query49.useQuery)({
1914
1928
  queryKey: [QueryNames.GetCmsContentWithType],
1915
- queryFn: () => __async(void 0, null, function* () {
1929
+ queryFn: () => __async(null, null, function* () {
1916
1930
  const req = yield getContentsWithType(contentType);
1917
1931
  return req;
1918
1932
  })
@@ -1921,11 +1935,11 @@ var useCmsContentWithType = (contentType) => {
1921
1935
 
1922
1936
  // src/hooks/useClusterNews.ts
1923
1937
  var import_api_proxy35 = require("@geowiki/api-proxy");
1924
- var import_react_query52 = require("@tanstack/react-query");
1938
+ var import_react_query50 = require("@tanstack/react-query");
1925
1939
  var useClusterNews = (id, sort = "", skip = 0, take = 100) => {
1926
- return (0, import_react_query52.useQuery)({
1940
+ return (0, import_react_query50.useQuery)({
1927
1941
  queryKey: [QueryNames.ClusterNews, id, sort, skip, take],
1928
- queryFn: () => __async(void 0, null, function* () {
1942
+ queryFn: () => __async(null, null, function* () {
1929
1943
  const data = yield import_api_proxy35.ClusterService.clusterGetClusterNews(
1930
1944
  id,
1931
1945
  sort,
@@ -1939,11 +1953,11 @@ var useClusterNews = (id, sort = "", skip = 0, take = 100) => {
1939
1953
 
1940
1954
  // src/hooks/useClusterDescription.ts
1941
1955
  var import_api_proxy36 = require("@geowiki/api-proxy");
1942
- var import_react_query53 = require("@tanstack/react-query");
1956
+ var import_react_query51 = require("@tanstack/react-query");
1943
1957
  var useClusterDescription = (id) => {
1944
- return (0, import_react_query53.useQuery)({
1958
+ return (0, import_react_query51.useQuery)({
1945
1959
  queryKey: [QueryNames.GetClusterDescription, id],
1946
- queryFn: () => __async(void 0, null, function* () {
1960
+ queryFn: () => __async(null, null, function* () {
1947
1961
  const data = yield import_api_proxy36.ClusterService.clusterGetClusterDescription(id);
1948
1962
  return data;
1949
1963
  })
@@ -1952,11 +1966,11 @@ var useClusterDescription = (id) => {
1952
1966
 
1953
1967
  // src/hooks/useClusterDetails.ts
1954
1968
  var import_api_proxy37 = require("@geowiki/api-proxy");
1955
- var import_react_query54 = require("@tanstack/react-query");
1969
+ var import_react_query52 = require("@tanstack/react-query");
1956
1970
  var useClusterDetails = (id) => {
1957
- return (0, import_react_query54.useQuery)({
1971
+ return (0, import_react_query52.useQuery)({
1958
1972
  queryKey: [QueryNames.GetClusterDetails, id],
1959
- queryFn: () => __async(void 0, null, function* () {
1973
+ queryFn: () => __async(null, null, function* () {
1960
1974
  const data = yield import_api_proxy37.ClusterService.clusterGetClusterDetails(id);
1961
1975
  return data;
1962
1976
  })
@@ -1965,11 +1979,11 @@ var useClusterDetails = (id) => {
1965
1979
 
1966
1980
  // src/hooks/useClusterImagesAndVideos.ts
1967
1981
  var import_api_proxy38 = require("@geowiki/api-proxy");
1968
- var import_react_query55 = require("@tanstack/react-query");
1982
+ var import_react_query53 = require("@tanstack/react-query");
1969
1983
  var useClusterImagesAndVideos = (id) => {
1970
- return (0, import_react_query55.useQuery)({
1984
+ return (0, import_react_query53.useQuery)({
1971
1985
  queryKey: [QueryNames.GetImagesAndVideos, id],
1972
- queryFn: () => __async(void 0, null, function* () {
1986
+ queryFn: () => __async(null, null, function* () {
1973
1987
  const data = yield import_api_proxy38.ClusterService.clusterGetImagesAndVideos(id);
1974
1988
  return data;
1975
1989
  })
@@ -1977,8 +1991,8 @@ var useClusterImagesAndVideos = (id) => {
1977
1991
  };
1978
1992
 
1979
1993
  // src/hooks/useHost.ts
1980
- var import_react_query56 = require("@tanstack/react-query");
1981
- var getHost = () => __async(void 0, null, function* () {
1994
+ var import_react_query54 = require("@tanstack/react-query");
1995
+ var getHost = () => __async(null, null, function* () {
1982
1996
  const response = yield fetch("/api/host");
1983
1997
  if (!response.ok) {
1984
1998
  return Promise.reject(null);
@@ -1986,15 +2000,15 @@ var getHost = () => __async(void 0, null, function* () {
1986
2000
  return response.json();
1987
2001
  });
1988
2002
  function useHost() {
1989
- return (0, import_react_query56.useQuery)({
2003
+ return (0, import_react_query54.useQuery)({
1990
2004
  queryKey: [QueryNames.GetHost],
1991
2005
  queryFn: getHost
1992
2006
  });
1993
2007
  }
1994
2008
 
1995
2009
  // src/hooks/useHostManagement.ts
1996
- var import_react_query57 = require("@tanstack/react-query");
1997
- var createHost = (hostData) => __async(void 0, null, function* () {
2010
+ var import_react_query55 = require("@tanstack/react-query");
2011
+ var createHost = (hostData) => __async(null, null, function* () {
1998
2012
  const response = yield fetch("/api/hosts", {
1999
2013
  method: "POST",
2000
2014
  headers: {
@@ -2007,7 +2021,7 @@ var createHost = (hostData) => __async(void 0, null, function* () {
2007
2021
  }
2008
2022
  return response.json();
2009
2023
  });
2010
- var updateHost = (_a) => __async(void 0, null, function* () {
2024
+ var updateHost = (_a) => __async(null, null, function* () {
2011
2025
  var _b = _a, {
2012
2026
  host
2013
2027
  } = _b, hostData = __objRest(_b, [
@@ -2025,7 +2039,7 @@ var updateHost = (_a) => __async(void 0, null, function* () {
2025
2039
  }
2026
2040
  return response.json();
2027
2041
  });
2028
- var deleteHost = (host) => __async(void 0, null, function* () {
2042
+ var deleteHost = (host) => __async(null, null, function* () {
2029
2043
  const response = yield fetch(`/api/hosts/${host}`, {
2030
2044
  method: "DELETE"
2031
2045
  });
@@ -2034,8 +2048,8 @@ var deleteHost = (host) => __async(void 0, null, function* () {
2034
2048
  }
2035
2049
  });
2036
2050
  var useCreateHost = () => {
2037
- const queryClient = (0, import_react_query57.useQueryClient)();
2038
- return (0, import_react_query57.useMutation)({
2051
+ const queryClient = (0, import_react_query55.useQueryClient)();
2052
+ return (0, import_react_query55.useMutation)({
2039
2053
  mutationFn: createHost,
2040
2054
  onSuccess: () => {
2041
2055
  queryClient.invalidateQueries({ queryKey: [QueryNames.GetHosts] });
@@ -2043,8 +2057,8 @@ var useCreateHost = () => {
2043
2057
  });
2044
2058
  };
2045
2059
  var useUpdateHost = () => {
2046
- const queryClient = (0, import_react_query57.useQueryClient)();
2047
- return (0, import_react_query57.useMutation)({
2060
+ const queryClient = (0, import_react_query55.useQueryClient)();
2061
+ return (0, import_react_query55.useMutation)({
2048
2062
  mutationFn: updateHost,
2049
2063
  onSuccess: () => {
2050
2064
  queryClient.invalidateQueries({ queryKey: [QueryNames.GetHosts] });
@@ -2053,8 +2067,8 @@ var useUpdateHost = () => {
2053
2067
  });
2054
2068
  };
2055
2069
  var useDeleteHost = () => {
2056
- const queryClient = (0, import_react_query57.useQueryClient)();
2057
- return (0, import_react_query57.useMutation)({
2070
+ const queryClient = (0, import_react_query55.useQueryClient)();
2071
+ return (0, import_react_query55.useMutation)({
2058
2072
  mutationFn: deleteHost,
2059
2073
  onSuccess: () => {
2060
2074
  queryClient.invalidateQueries({ queryKey: [QueryNames.GetHosts] });
@@ -2071,7 +2085,8 @@ var HostType = /* @__PURE__ */ ((HostType2) => {
2071
2085
 
2072
2086
  // src/utils/ServerHostUtils.ts
2073
2087
  var getHostData = () => {
2074
- return process.env.NODE_ENV === "production" ? [
2088
+ const useProd = process.env.NODE_ENV === "production" || process.env.GEOWIKI_USE_PROD_HOSTS === "true";
2089
+ return useProd ? [
2075
2090
  {
2076
2091
  host: "v2.geo-wiki.org",
2077
2092
  cmsUrl: "https://cms.main.geo-wiki.org"
@@ -2316,8 +2331,7 @@ var HostService = class {
2316
2331
  * Utility: Check if a path is protected for a host
2317
2332
  */
2318
2333
  static isPathProtected(hostInfo, path) {
2319
- if (!(hostInfo == null ? void 0 : hostInfo.protectedPaths))
2320
- return false;
2334
+ if (!(hostInfo == null ? void 0 : hostInfo.protectedPaths)) return false;
2321
2335
  return hostInfo.protectedPaths.some(
2322
2336
  (protectedPath) => path.startsWith(protectedPath)
2323
2337
  );
@@ -2377,8 +2391,7 @@ var HostService = class {
2377
2391
  * Utility: Get host info for current window location (client-side only)
2378
2392
  */
2379
2393
  static getCurrentHostInfo(hosts) {
2380
- if (typeof window === "undefined")
2381
- return void 0;
2394
+ if (typeof window === "undefined") return void 0;
2382
2395
  return hosts.find((h) => h.host === window.location.host);
2383
2396
  }
2384
2397
  /**
@@ -2606,11 +2619,20 @@ var useBasfStore = (0, import_zustand4.create)((set) => ({
2606
2619
  // src/utils/common.ts
2607
2620
  var import_client = require("react-dom/client");
2608
2621
  var import_react_dom = require("react-dom");
2609
- var import_next_localization = require("next-localization");
2610
2622
  var import_driver = require("driver.js");
2611
2623
  var import_driver2 = require("driver.js/dist/driver.css");
2612
2624
  var XLSX = __toESM(require("xlsx"));
2613
- var i18n = (0, import_next_localization.I18n)();
2625
+ var createI18n = () => {
2626
+ let current = "en";
2627
+ return {
2628
+ locale: (next) => {
2629
+ if (next) current = next;
2630
+ return current;
2631
+ },
2632
+ t: (key) => key
2633
+ };
2634
+ };
2635
+ var i18n = createI18n();
2614
2636
  var getHtmlElementFromReactNode = (node) => {
2615
2637
  const div = document.createElement("div");
2616
2638
  const root = (0, import_client.createRoot)(div);
@@ -3262,7 +3284,7 @@ var trackMapEvent = {
3262
3284
 
3263
3285
  // src/auth/AuthContext.tsx
3264
3286
  var import_react7 = require("react");
3265
- var import_react_query58 = require("@tanstack/react-query");
3287
+ var import_react_query56 = require("@tanstack/react-query");
3266
3288
  var import_jsx_runtime = require("react/jsx-runtime");
3267
3289
  var SESSION_QUERY_KEY = ["geowiki-session"];
3268
3290
  var SessionContext = (0, import_react7.createContext)({
@@ -3290,8 +3312,8 @@ function SessionProvider({
3290
3312
  session: initialSession,
3291
3313
  onSessionChange
3292
3314
  }) {
3293
- const queryClient = (0, import_react_query58.useQueryClient)();
3294
- const { data, isLoading } = (0, import_react_query58.useQuery)({
3315
+ const queryClient = (0, import_react_query56.useQueryClient)();
3316
+ const { data, isLoading } = (0, import_react_query56.useQuery)({
3295
3317
  queryKey: SESSION_QUERY_KEY,
3296
3318
  queryFn: fetchSession,
3297
3319
  initialData: initialSession != null ? initialSession : void 0,
@@ -3332,6 +3354,338 @@ function signIn(_provider, _options, params) {
3332
3354
  function signOut() {
3333
3355
  window.location.href = "/api/auth/logout";
3334
3356
  }
3357
+
3358
+ // src/framework/index.tsx
3359
+ var import_react10 = require("react");
3360
+
3361
+ // src/framework/context.tsx
3362
+ var import_react9 = require("react");
3363
+
3364
+ // src/framework/defaults.tsx
3365
+ var import_react8 = require("react");
3366
+ var import_jsx_runtime2 = require("react/jsx-runtime");
3367
+ var isBrowser = () => typeof window !== "undefined";
3368
+ var queryToSearchParams = (query, target = new URLSearchParams()) => {
3369
+ if (!query) return target;
3370
+ for (const [key, value] of Object.entries(query)) {
3371
+ if (value === void 0 || value === null) continue;
3372
+ if (Array.isArray(value)) {
3373
+ for (const v of value) target.append(key, String(v));
3374
+ } else {
3375
+ target.set(key, String(value));
3376
+ }
3377
+ }
3378
+ return target;
3379
+ };
3380
+ var urlToHref = (url) => {
3381
+ if (typeof url === "string") return url;
3382
+ const { pathname = "", query, hash } = url;
3383
+ const qs = queryToSearchParams(query).toString();
3384
+ return `${pathname}${qs ? `?${qs}` : ""}${hash ? `#${hash}` : ""}`;
3385
+ };
3386
+ var unwrapDefault = (mod) => mod && typeof mod === "object" && "default" in mod ? mod : { default: mod };
3387
+ var DefaultLink = (0, import_react8.forwardRef)(
3388
+ function DefaultLink2(props, ref) {
3389
+ const _a = props, {
3390
+ href,
3391
+ as: _as,
3392
+ replace: _replace,
3393
+ scroll: _scroll,
3394
+ shallow: _shallow,
3395
+ passHref: _passHref,
3396
+ prefetch: _prefetch,
3397
+ locale: _locale,
3398
+ legacyBehavior: _legacyBehavior,
3399
+ children
3400
+ } = _a, rest = __objRest(_a, [
3401
+ "href",
3402
+ "as",
3403
+ "replace",
3404
+ "scroll",
3405
+ "shallow",
3406
+ "passHref",
3407
+ "prefetch",
3408
+ "locale",
3409
+ "legacyBehavior",
3410
+ "children"
3411
+ ]);
3412
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("a", __spreadProps(__spreadValues({ ref, href: urlToHref(href) }, rest), { children }));
3413
+ }
3414
+ );
3415
+ var DefaultImage = function DefaultImage2(props) {
3416
+ const _a = props, {
3417
+ src,
3418
+ alt,
3419
+ width,
3420
+ height,
3421
+ fill,
3422
+ sizes: _sizes,
3423
+ quality: _quality,
3424
+ priority: _priority,
3425
+ loading,
3426
+ placeholder: _placeholder,
3427
+ blurDataURL: _blurDataURL,
3428
+ unoptimized: _unoptimized,
3429
+ layout: _layout,
3430
+ objectFit,
3431
+ objectPosition,
3432
+ onLoadingComplete,
3433
+ style
3434
+ } = _a, rest = __objRest(_a, [
3435
+ "src",
3436
+ "alt",
3437
+ "width",
3438
+ "height",
3439
+ "fill",
3440
+ "sizes",
3441
+ "quality",
3442
+ "priority",
3443
+ "loading",
3444
+ "placeholder",
3445
+ "blurDataURL",
3446
+ "unoptimized",
3447
+ "layout",
3448
+ "objectFit",
3449
+ "objectPosition",
3450
+ "onLoadingComplete",
3451
+ "style"
3452
+ ]);
3453
+ const resolvedSrc = typeof src === "string" ? src : src == null ? void 0 : src.src;
3454
+ const mergedStyle = (0, import_react8.useMemo)(() => {
3455
+ if (!fill && !objectFit && !objectPosition && !style) return void 0;
3456
+ const out = __spreadValues({}, style);
3457
+ if (fill) Object.assign(out, { position: "absolute", inset: 0, width: "100%", height: "100%" });
3458
+ if (objectFit) out.objectFit = objectFit;
3459
+ if (objectPosition) out.objectPosition = objectPosition;
3460
+ return out;
3461
+ }, [fill, objectFit, objectPosition, style]);
3462
+ return (
3463
+ // eslint-disable-next-line @next/next/no-img-element, jsx-a11y/alt-text
3464
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
3465
+ "img",
3466
+ __spreadValues({
3467
+ src: resolvedSrc,
3468
+ alt,
3469
+ width: fill ? void 0 : width,
3470
+ height: fill ? void 0 : height,
3471
+ loading: loading != null ? loading : "lazy",
3472
+ style: mergedStyle,
3473
+ onLoad: (e) => onLoadingComplete == null ? void 0 : onLoadingComplete(e.currentTarget)
3474
+ }, rest)
3475
+ )
3476
+ );
3477
+ };
3478
+ var DefaultScript = function DefaultScript2(props) {
3479
+ const _a = props, { strategy: _strategy, onReady: _onReady } = _a, rest = __objRest(_a, ["strategy", "onReady"]);
3480
+ const { src, id, async, defer, type, nonce, onLoad, onError, children } = rest;
3481
+ const onLoadRef = (0, import_react8.useRef)(onLoad);
3482
+ const onErrorRef = (0, import_react8.useRef)(onError);
3483
+ onLoadRef.current = onLoad;
3484
+ onErrorRef.current = onError;
3485
+ (0, import_react8.useEffect)(() => {
3486
+ if (!src || !isBrowser()) return;
3487
+ const el = document.createElement("script");
3488
+ el.src = src;
3489
+ if (id) el.id = id;
3490
+ if (async) el.async = true;
3491
+ if (defer) el.defer = true;
3492
+ if (type) el.type = type;
3493
+ if (nonce) el.nonce = nonce;
3494
+ el.onload = () => {
3495
+ var _a2;
3496
+ return (_a2 = onLoadRef.current) == null ? void 0 : _a2.call(onLoadRef);
3497
+ };
3498
+ el.onerror = (e) => {
3499
+ var _a2;
3500
+ return (_a2 = onErrorRef.current) == null ? void 0 : _a2.call(onErrorRef, e);
3501
+ };
3502
+ document.head.appendChild(el);
3503
+ return () => {
3504
+ el.remove();
3505
+ };
3506
+ }, [src, id, async, defer, type, nonce]);
3507
+ if (children) {
3508
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("script", __spreadProps(__spreadValues({}, rest), { children }));
3509
+ }
3510
+ return null;
3511
+ };
3512
+ var DefaultHead = function DefaultHead2({ children: _children }) {
3513
+ return null;
3514
+ };
3515
+ var parseSearch = (search) => {
3516
+ const params = new URLSearchParams(search);
3517
+ const result = {};
3518
+ for (const key of new Set(params.keys())) {
3519
+ const all = params.getAll(key);
3520
+ result[key] = all.length > 1 ? all : all[0];
3521
+ }
3522
+ return result;
3523
+ };
3524
+ var useLocation2 = () => {
3525
+ const [tick, setTick] = (0, import_react8.useState)(0);
3526
+ (0, import_react8.useEffect)(() => {
3527
+ if (!isBrowser()) return;
3528
+ const handler = () => setTick((t) => t + 1);
3529
+ window.addEventListener("popstate", handler);
3530
+ return () => window.removeEventListener("popstate", handler);
3531
+ }, []);
3532
+ return (0, import_react8.useMemo)(() => {
3533
+ if (!isBrowser()) {
3534
+ return { pathname: "/", search: "", hash: "", asPath: "/" };
3535
+ }
3536
+ const { pathname, search, hash } = window.location;
3537
+ return {
3538
+ pathname,
3539
+ search,
3540
+ hash,
3541
+ asPath: `${pathname}${search}${hash}`
3542
+ };
3543
+ }, [tick]);
3544
+ };
3545
+ var useDefaultRouter = () => {
3546
+ const loc = useLocation2();
3547
+ const query = (0, import_react8.useMemo)(() => parseSearch(loc.search), [loc.search]);
3548
+ const push = (0, import_react8.useCallback)((url) => __async(null, null, function* () {
3549
+ if (!isBrowser()) return false;
3550
+ window.history.pushState({}, "", urlToHref(url));
3551
+ window.dispatchEvent(new PopStateEvent("popstate"));
3552
+ return true;
3553
+ }), []);
3554
+ const replace = (0, import_react8.useCallback)((url) => __async(null, null, function* () {
3555
+ if (!isBrowser()) return false;
3556
+ window.history.replaceState({}, "", urlToHref(url));
3557
+ window.dispatchEvent(new PopStateEvent("popstate"));
3558
+ return true;
3559
+ }), []);
3560
+ const back = (0, import_react8.useCallback)(() => {
3561
+ if (isBrowser()) window.history.back();
3562
+ }, []);
3563
+ const forward = (0, import_react8.useCallback)(() => {
3564
+ if (isBrowser()) window.history.forward();
3565
+ }, []);
3566
+ const reload = (0, import_react8.useCallback)(() => {
3567
+ if (isBrowser()) window.location.reload();
3568
+ }, []);
3569
+ return (0, import_react8.useMemo)(
3570
+ () => ({
3571
+ pathname: loc.pathname,
3572
+ asPath: loc.asPath,
3573
+ query,
3574
+ isReady: isBrowser(),
3575
+ push,
3576
+ replace,
3577
+ back,
3578
+ forward,
3579
+ reload
3580
+ }),
3581
+ [loc.pathname, loc.asPath, query, push, replace, back, forward, reload]
3582
+ );
3583
+ };
3584
+ var useDefaultNavigationRouter = () => {
3585
+ const router = useDefaultRouter();
3586
+ return (0, import_react8.useMemo)(
3587
+ () => ({
3588
+ push: (href) => router.push(href),
3589
+ replace: (href) => router.replace(href),
3590
+ back: () => router.back(),
3591
+ forward: () => {
3592
+ var _a;
3593
+ return (_a = router.forward) == null ? void 0 : _a.call(router);
3594
+ },
3595
+ refresh: () => router.reload(),
3596
+ prefetch: () => void 0
3597
+ }),
3598
+ [router]
3599
+ );
3600
+ };
3601
+ var useDefaultSearchParams = () => {
3602
+ const loc = useLocation2();
3603
+ return (0, import_react8.useMemo)(() => new URLSearchParams(loc.search), [loc.search]);
3604
+ };
3605
+ var useDefaultTheme = () => {
3606
+ const [theme, setThemeState] = (0, import_react8.useState)(void 0);
3607
+ const setTheme = (0, import_react8.useCallback)((next) => {
3608
+ setThemeState((prev) => prev === next ? prev : next);
3609
+ }, []);
3610
+ return (0, import_react8.useMemo)(
3611
+ () => ({ theme, resolvedTheme: theme, setTheme }),
3612
+ [theme, setTheme]
3613
+ );
3614
+ };
3615
+ var useDefaultI18n = () => ({
3616
+ locale: isBrowser() ? document.documentElement.lang || "en" : "en",
3617
+ t: (key) => key
3618
+ });
3619
+ var defaultDynamic = (loader, options) => {
3620
+ const Lazy = (0, import_react8.lazy)(() => __async(null, null, function* () {
3621
+ return unwrapDefault(yield loader());
3622
+ }));
3623
+ const Loading = options == null ? void 0 : options.loading;
3624
+ const Wrapped = (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react8.Suspense, { fallback: Loading ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Loading, {}) : null, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Lazy, __spreadValues({}, props)) });
3625
+ Wrapped.displayName = "DynamicDefault";
3626
+ return Wrapped;
3627
+ };
3628
+
3629
+ // src/framework/context.tsx
3630
+ var import_jsx_runtime3 = require("react/jsx-runtime");
3631
+ var defaultAdapters = {
3632
+ Link: DefaultLink,
3633
+ Image: DefaultImage,
3634
+ Script: DefaultScript,
3635
+ Head: DefaultHead,
3636
+ useRouter: useDefaultRouter,
3637
+ useNavigationRouter: useDefaultNavigationRouter,
3638
+ useSearchParams: useDefaultSearchParams,
3639
+ useTheme: useDefaultTheme,
3640
+ useI18n: useDefaultI18n,
3641
+ dynamic: defaultDynamic
3642
+ };
3643
+ var FrameworkContext = (0, import_react9.createContext)(defaultAdapters);
3644
+ var FrameworkProvider = ({ adapters, children }) => {
3645
+ const value = (0, import_react9.useMemo)(
3646
+ () => __spreadValues(__spreadValues({}, defaultAdapters), adapters),
3647
+ [adapters]
3648
+ );
3649
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FrameworkContext.Provider, { value, children });
3650
+ };
3651
+ var useFrameworkAdapters = () => (0, import_react9.useContext)(FrameworkContext);
3652
+
3653
+ // src/framework/index.tsx
3654
+ var import_jsx_runtime4 = require("react/jsx-runtime");
3655
+ var Link = (0, import_react10.forwardRef)(function Link2(props, ref) {
3656
+ const { Link: Adapter } = useFrameworkAdapters();
3657
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Adapter, __spreadValues({ ref }, props));
3658
+ });
3659
+ var Image = (props) => {
3660
+ const { Image: Adapter } = useFrameworkAdapters();
3661
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Adapter, __spreadValues({}, props));
3662
+ };
3663
+ var Script = (props) => {
3664
+ const { Script: Adapter } = useFrameworkAdapters();
3665
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Adapter, __spreadValues({}, props));
3666
+ };
3667
+ var Head = (props) => {
3668
+ const { Head: Adapter } = useFrameworkAdapters();
3669
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Adapter, __spreadValues({}, props));
3670
+ };
3671
+ var useRouter = () => useFrameworkAdapters().useRouter();
3672
+ var useNavigationRouter = () => useFrameworkAdapters().useNavigationRouter();
3673
+ var useSearchParams = () => useFrameworkAdapters().useSearchParams();
3674
+ var useTheme = () => useFrameworkAdapters().useTheme();
3675
+ var useI18n = () => useFrameworkAdapters().useI18n();
3676
+ function dynamic(loader, options) {
3677
+ let resolved;
3678
+ const Wrapper = (props) => {
3679
+ const { dynamic: dynamicAdapter } = useFrameworkAdapters();
3680
+ if (!resolved) {
3681
+ resolved = dynamicAdapter(loader, options);
3682
+ }
3683
+ const Component = resolved;
3684
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Component, __spreadValues({}, props));
3685
+ };
3686
+ Wrapper.displayName = "DynamicFrameworkWrapper";
3687
+ return Wrapper;
3688
+ }
3335
3689
  // Annotate the CommonJS export names for ESM import in node:
3336
3690
  0 && (module.exports = {
3337
3691
  ActivityStatus,
@@ -3343,13 +3697,21 @@ function signOut() {
3343
3697
  ColorArrayCSSClass,
3344
3698
  Config,
3345
3699
  DOTS,
3700
+ DefaultHead,
3701
+ DefaultImage,
3702
+ DefaultLink,
3703
+ DefaultScript,
3346
3704
  FarmingSystem,
3347
3705
  Features,
3706
+ FrameworkProvider,
3707
+ Head,
3348
3708
  HostService,
3349
3709
  HostType,
3350
3710
  HuntingManagement,
3711
+ Image,
3351
3712
  ImageError,
3352
3713
  IsTokenExpired,
3714
+ Link,
3353
3715
  LiveStock,
3354
3716
  LookUps,
3355
3717
  MainAgriculturalAreas,
@@ -3364,6 +3726,7 @@ function signOut() {
3364
3726
  ResourcesMenu,
3365
3727
  Responsive,
3366
3728
  SESSION_QUERY_KEY,
3729
+ Script,
3367
3730
  SessionProvider,
3368
3731
  StyleType,
3369
3732
  TaskEventType,
@@ -3374,9 +3737,11 @@ function signOut() {
3374
3737
  ViewStatus,
3375
3738
  classNames,
3376
3739
  configStore,
3740
+ defaultDynamic,
3377
3741
  delayedSlideInUp,
3378
3742
  downloadData,
3379
3743
  downloadJSON,
3744
+ dynamic,
3380
3745
  easing,
3381
3746
  findHostInfo,
3382
3747
  formatUnixDate,
@@ -3401,6 +3766,7 @@ function signOut() {
3401
3766
  itemVariants,
3402
3767
  keyStr,
3403
3768
  listVariants,
3769
+ queryToSearchParams,
3404
3770
  rgbDataURL,
3405
3771
  routes,
3406
3772
  scrollToFirstErrorElement,
@@ -3421,6 +3787,7 @@ function signOut() {
3421
3787
  trackUmamiEvent,
3422
3788
  trackUserEvent,
3423
3789
  triplet,
3790
+ unwrapDefault,
3424
3791
  useAllNewsFromAllClusters,
3425
3792
  useApiImage,
3426
3793
  useApiUrl,
@@ -3454,7 +3821,12 @@ function signOut() {
3454
3821
  useCountries,
3455
3822
  useCreateHost,
3456
3823
  useCurrentUser,
3824
+ useDefaultI18n,
3825
+ useDefaultNavigationRouter,
3826
+ useDefaultRouter,
3827
+ useDefaultSearchParams,
3457
3828
  useDefaultSettings,
3829
+ useDefaultTheme,
3458
3830
  useDeleteHost,
3459
3831
  useDimensions,
3460
3832
  useEmailing,
@@ -3466,12 +3838,14 @@ function signOut() {
3466
3838
  useFileUpload,
3467
3839
  useFileUrl,
3468
3840
  useFilterClusters,
3841
+ useFrameworkAdapters,
3469
3842
  useGeoWikiSettings,
3470
3843
  useGetUserProject,
3471
3844
  useGrantedPolicies,
3472
3845
  useGroupsInProject,
3473
3846
  useHost,
3474
3847
  useHosts,
3848
+ useI18n,
3475
3849
  useImageUrl,
3476
3850
  useIntroTourSettings,
3477
3851
  useIsAdmin,
@@ -3487,6 +3861,7 @@ function signOut() {
3487
3861
  useLockBodyScroll,
3488
3862
  useLookUp,
3489
3863
  useMapMenuItems,
3864
+ useNavigationRouter,
3490
3865
  useNews,
3491
3866
  useNewsFromAllClusters,
3492
3867
  usePagination,
@@ -3509,6 +3884,8 @@ function signOut() {
3509
3884
  useResourceType,
3510
3885
  useReviewTaskBulkUpload,
3511
3886
  useRoles,
3887
+ useRouter,
3888
+ useSearchParams,
3512
3889
  useSession,
3513
3890
  useTaskAnnotation,
3514
3891
  useTaskAnswers,
@@ -3520,6 +3897,7 @@ function signOut() {
3520
3897
  useTaskStatusList,
3521
3898
  useTasksPerLocation,
3522
3899
  useTenants,
3900
+ useTheme,
3523
3901
  useTopic,
3524
3902
  useUpdateActiveGroupInProject,
3525
3903
  useUpdateHost,