@geowiki/map 0.16.9-dev.3 → 0.16.9-dev.5

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
@@ -613,13 +613,13 @@ var prepareRGBImage = (array, width, height) => {
613
613
  var data = imageData == null ? void 0 : imageData.data;
614
614
  let index = 0;
615
615
  for (var i = 0; i < array.length; ) {
616
- const r = array[i++];
616
+ const r2 = array[i++];
617
617
  const g = array[i++];
618
618
  const b = array[i++];
619
- data[index++] = r;
619
+ data[index++] = r2;
620
620
  data[index++] = g;
621
621
  data[index++] = b;
622
- data[index++] = r === 0 && g === 0 && b === 0 ? 0 : 255;
622
+ data[index++] = r2 === 0 && g === 0 && b === 0 ? 0 : 255;
623
623
  }
624
624
  ctx == null ? void 0 : ctx.putImageData(imageData, 0, 0);
625
625
  return canvas;
@@ -2827,11 +2827,11 @@ var import_react4 = require("react");
2827
2827
  var import_react_leaflet4 = require("react-leaflet");
2828
2828
  var import_leaflet_draw = require("leaflet-draw");
2829
2829
  var import_core = require("@geowiki/core");
2830
- var import_router = require("next/router");
2830
+ var import_core2 = require("@geowiki/core");
2831
2831
  var PointSelection = (_props) => {
2832
2832
  var _a, _b, _c, _d, _e, _f;
2833
2833
  const map = (0, import_react_leaflet4.useMap)();
2834
- const router = (0, import_router.useRouter)();
2834
+ const router = (0, import_core2.useRouter)();
2835
2835
  const evolandStore = useEvolandStore();
2836
2836
  var mapStore = map_default();
2837
2837
  var panelStore = (0, import_core.usePanelStore)();
@@ -2959,7 +2959,7 @@ var SelectedPoint = () => {
2959
2959
  };
2960
2960
 
2961
2961
  // src/Components/LayerStoreList.tsx
2962
- var import_core7 = require("@geowiki/core");
2962
+ var import_core10 = require("@geowiki/core");
2963
2963
 
2964
2964
  // src/store/mapLayers.ts
2965
2965
  var import_zustand3 = require("zustand");
@@ -3091,7 +3091,7 @@ var useMapLayerStore = (0, import_zustand3.create)()((set, get) => ({
3091
3091
  var mapLayers_default = useMapLayerStore;
3092
3092
 
3093
3093
  // src/Components/CustomWMS.tsx
3094
- var import_core2 = require("@react-leaflet/core");
3094
+ var import_core3 = require("@react-leaflet/core");
3095
3095
 
3096
3096
  // src/utils/BetterWMS.ts
3097
3097
  var import_leaflet4 = __toESM(require("leaflet"));
@@ -3472,19 +3472,19 @@ var BetterWMS = class extends import_leaflet4.default.TileLayer.WMS {
3472
3472
  };
3473
3473
 
3474
3474
  // src/Components/CustomWMS.tsx
3475
- var CustomWMSTileLayer = (0, import_core2.createTileLayerComponent)(
3475
+ var CustomWMSTileLayer = (0, import_core3.createTileLayerComponent)(
3476
3476
  function createWMSTileLayer(_a, context) {
3477
3477
  var _b = _a, { params = {}, url } = _b, options = __objRest(_b, ["params", "url"]);
3478
3478
  var instance = new BetterWMS(url, __spreadValues(__spreadProps(__spreadValues({}, params), {
3479
3479
  url
3480
- }), (0, import_core2.withPane)(options, context)));
3480
+ }), (0, import_core3.withPane)(options, context)));
3481
3481
  return {
3482
3482
  instance,
3483
3483
  context
3484
3484
  };
3485
3485
  },
3486
3486
  function updateWMSTileLayer(layer, props, prevProps) {
3487
- (0, import_core2.updateGridLayer)(layer, props, prevProps);
3487
+ (0, import_core3.updateGridLayer)(layer, props, prevProps);
3488
3488
  if (props.params != null && props.params !== prevProps.params) {
3489
3489
  layer.setParams(props.params);
3490
3490
  }
@@ -3499,7 +3499,7 @@ var ReactDOMServer = __toESM(require("react-dom/server"));
3499
3499
  var import_ui6 = require("@geowiki/ui");
3500
3500
 
3501
3501
  // src/Components/MarkerClusterGroup.tsx
3502
- var import_core3 = require("@react-leaflet/core");
3502
+ var import_core4 = require("@react-leaflet/core");
3503
3503
  var L7 = __toESM(require("leaflet"));
3504
3504
  var import_leaflet5 = require("leaflet.markercluster");
3505
3505
  function getPropsAndEvents(props) {
@@ -3522,20 +3522,20 @@ function createMarkerClusterGroup(props, context) {
3522
3522
  const clusterEvent = `cluster${eventAsProp.substring(2).toLowerCase()}`;
3523
3523
  markerClusterGroup.on(clusterEvent, callback);
3524
3524
  });
3525
- return (0, import_core3.createElementObject)(
3525
+ return (0, import_core4.createElementObject)(
3526
3526
  markerClusterGroup,
3527
- (0, import_core3.extendContext)(context, { layerContainer: markerClusterGroup })
3527
+ (0, import_core4.extendContext)(context, { layerContainer: markerClusterGroup })
3528
3528
  );
3529
3529
  }
3530
3530
  var updateMarkerCluster = () => {
3531
3531
  };
3532
- var MarkerClusterGroup2 = (0, import_core3.createPathComponent)(
3532
+ var MarkerClusterGroup2 = (0, import_core4.createPathComponent)(
3533
3533
  createMarkerClusterGroup,
3534
3534
  updateMarkerCluster
3535
3535
  );
3536
3536
 
3537
3537
  // src/Components/GeoJsonProperties.tsx
3538
- var import_core4 = require("@geowiki/core");
3538
+ var import_core5 = require("@geowiki/core");
3539
3539
  var import_react5 = require("react");
3540
3540
 
3541
3541
  // src/Components/PropsContent.tsx
@@ -3549,7 +3549,7 @@ var PropsContent = ({ content }) => {
3549
3549
  var PropsContent_default = PropsContent;
3550
3550
 
3551
3551
  // src/Components/GeoJsonProperties.tsx
3552
- var import_image = __toESM(require("next/image"));
3552
+ var import_core6 = require("@geowiki/core");
3553
3553
  var import_ui2 = require("@geowiki/ui");
3554
3554
  var import_jsx_runtime7 = require("react/jsx-runtime");
3555
3555
  var parseProperties = (properties, serverProperties) => {
@@ -3571,7 +3571,7 @@ var GeoJsonPropertiesWidget = ({
3571
3571
  className
3572
3572
  }) => {
3573
3573
  var _a, _b, _c, _d;
3574
- const fileUrl = (0, import_core4.useFileUrl)();
3574
+ const fileUrl = (0, import_core5.useFileUrl)();
3575
3575
  const serverProperties = (0, import_react5.useMemo)(
3576
3576
  () => {
3577
3577
  var _a2, _b2, _c2, _d2;
@@ -3597,7 +3597,7 @@ var GeoJsonPropertiesWidget = ({
3597
3597
  const isFarmerCluster = properties ? "farmingSystem" in properties : false;
3598
3598
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: (0, import_ui2.cn)("bg-white rounded-sm", className), children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "space-y-4", children: [
3599
3599
  canShowImage && imageUri && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "relative h-64 w-full overflow-hidden rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
3600
- import_image.default,
3600
+ import_core6.Image,
3601
3601
  {
3602
3602
  src: imageUri,
3603
3603
  alt: "Property Image",
@@ -3625,11 +3625,11 @@ var GeoJsonPropertiesWidget = ({
3625
3625
  var GeoJsonProperties_default = GeoJsonPropertiesWidget;
3626
3626
 
3627
3627
  // src/Components/Recodo/FarmerClusterPopup.tsx
3628
- var import_core5 = require("@geowiki/core");
3628
+ var import_core7 = require("@geowiki/core");
3629
3629
  var import_ui3 = require("@geowiki/ui");
3630
3630
  var import_jsx_runtime8 = require("react/jsx-runtime");
3631
3631
  var FarmerClusterPopup = ({ properties }) => {
3632
- const fileUrl = (0, import_core5.useFileUrl)();
3632
+ const fileUrl = (0, import_core7.useFileUrl)();
3633
3633
  if (!properties)
3634
3634
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { children: "No properties found" });
3635
3635
  const name = properties["name"];
@@ -3682,9 +3682,9 @@ var BiodiversityObservationPopup = ({
3682
3682
 
3683
3683
  // src/Components/Ifbn/IfbnSitePopup.tsx
3684
3684
  var import_react6 = require("react");
3685
- var import_core6 = require("@geowiki/core");
3685
+ var import_core8 = require("@geowiki/core");
3686
3686
  var import_ui5 = require("@geowiki/ui");
3687
- var import_image2 = __toESM(require("next/image"));
3687
+ var import_core9 = require("@geowiki/core");
3688
3688
  var import_jsx_runtime10 = require("react/jsx-runtime");
3689
3689
  var SiteInformation = ({ data }) => {
3690
3690
  if (!data)
@@ -3862,7 +3862,7 @@ var IfbnSitePopup = ({ properties }) => {
3862
3862
  const [siteData, setSiteData] = (0, import_react6.useState)(null);
3863
3863
  const [isLoading, setIsLoading] = (0, import_react6.useState)(false);
3864
3864
  const [imageError, setImageError] = (0, import_react6.useState)(false);
3865
- const { status: sessionStatus, data: session } = (0, import_core6.useSession)();
3865
+ const { status: sessionStatus, data: session } = (0, import_core8.useSession)();
3866
3866
  if (!properties)
3867
3867
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { children: "No properties found" });
3868
3868
  const plotId = properties["Plot_ID"];
@@ -3936,7 +3936,7 @@ var IfbnSitePopup = ({ properties }) => {
3936
3936
  )
3937
3937
  ] }),
3938
3938
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3939
- import_image2.default,
3939
+ import_core9.Image,
3940
3940
  {
3941
3941
  alt: "",
3942
3942
  src: imageError ? fallbackUrl : imageUrl,
@@ -5141,7 +5141,7 @@ var GoogleSheetsPopup = ({
5141
5141
  return Object.keys(value).length === 0;
5142
5142
  return false;
5143
5143
  };
5144
- const isUrl = (value) => {
5144
+ const isUrl2 = (value) => {
5145
5145
  if (typeof value !== "string")
5146
5146
  return false;
5147
5147
  const trimmedValue = value.trim();
@@ -5167,7 +5167,7 @@ var GoogleSheetsPopup = ({
5167
5167
  return key.replace(/([A-Z])/g, " $1").replace(/^./, (str) => str.toUpperCase()).replace(/_/g, " ").replace(/\s+/g, " ").trim();
5168
5168
  };
5169
5169
  const formatFieldValue = (value) => {
5170
- if (isUrl(value)) {
5170
+ if (isUrl2(value)) {
5171
5171
  const url = value.startsWith("http") ? value : `https://${value}`;
5172
5172
  const displayText = value.length > 50 ? `${value.substring(0, 47)}...` : value;
5173
5173
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
@@ -5185,11 +5185,11 @@ var GoogleSheetsPopup = ({
5185
5185
  return String(value);
5186
5186
  };
5187
5187
  const urlFields = filteredProperties.filter(([_key, value]) => {
5188
- const isUrlValue = isUrl(value);
5188
+ const isUrlValue = isUrl2(value);
5189
5189
  return isUrlValue;
5190
5190
  });
5191
5191
  const otherFields = filteredProperties.filter(([_key, value]) => {
5192
- const isUrlValue = isUrl(value);
5192
+ const isUrlValue = isUrl2(value);
5193
5193
  return !isUrlValue;
5194
5194
  });
5195
5195
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "bg-white rounded-lg shadow-lg p-6 w-full max-w-md overflow-hidden", children: [
@@ -6639,7 +6639,7 @@ var import_jsx_runtime21 = require("react/jsx-runtime");
6639
6639
  var LayerStoreList = () => {
6640
6640
  const layerStore = useMapLayerStore();
6641
6641
  const mapStore = map_default();
6642
- const { data: mapMenuItems, isLoading } = (0, import_core7.useMapMenuItems)();
6642
+ const { data: mapMenuItems, isLoading } = (0, import_core10.useMapMenuItems)();
6643
6643
  const parsedMenuItems = parseMapMenuItems(mapMenuItems);
6644
6644
  const layerItems = parsedMenuItems == null ? void 0 : parsedMenuItems.map((menu) => menu.subMenus);
6645
6645
  (0, import_react12.useEffect)(() => {
@@ -6782,7 +6782,7 @@ var LabelButtonView = ({}) => {
6782
6782
  };
6783
6783
 
6784
6784
  // src/Components/MapSidebar.tsx
6785
- var import_core8 = require("@geowiki/core");
6785
+ var import_core11 = require("@geowiki/core");
6786
6786
 
6787
6787
  // src/Components/MiniMapElement.tsx
6788
6788
  var import_react_leaflet11 = require("react-leaflet");
@@ -6850,7 +6850,7 @@ var MiniMapElement_default = (0, import_react14.memo)(MiniMapElement);
6850
6850
  // src/Components/MapSidebar.tsx
6851
6851
  var import_jsx_runtime25 = require("react/jsx-runtime");
6852
6852
  var MapSidebar = ({}) => {
6853
- const { data: wmsLayerNames } = (0, import_core8.useEvolandWmsLayers)();
6853
+ const { data: wmsLayerNames } = (0, import_core11.useEvolandWmsLayers)();
6854
6854
  const layerStore = useMapLayerStore();
6855
6855
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "grid gap-1 p-2 grid-cols-1 overflow-y-scroll 3xl:grid-cols-2 h-[92.5vh] driver-left-panel", children: wmsLayerNames == null ? void 0 : wmsLayerNames.layers.map((layer) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "px-2", children: [
6856
6856
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("h3", { className: "w-60 lx:w-80 line-clamp-1", children: layer.layerDescription }),
@@ -6860,17 +6860,17 @@ var MapSidebar = ({}) => {
6860
6860
 
6861
6861
  // src/Components/Evoland/RasterPreview.tsx
6862
6862
  var import_evoland_api_proxy3 = require("@geowiki/evoland-api-proxy");
6863
- var import_navigation = require("next/navigation");
6863
+ var import_core12 = require("@geowiki/core");
6864
6864
  var import_react15 = require("react");
6865
- var import_core9 = require("@geowiki/core");
6865
+ var import_core13 = require("@geowiki/core");
6866
6866
  var import_ui10 = require("@geowiki/ui");
6867
6867
  var import_react_hotkeys_hook = require("react-hotkeys-hook");
6868
6868
  var import_jsx_runtime26 = require("react/jsx-runtime");
6869
6869
  var RasterPreview = (_props) => {
6870
6870
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E;
6871
6871
  const evolandStore = useEvolandStore();
6872
- const router = (0, import_navigation.useRouter)();
6873
- const searchParams = (0, import_navigation.useSearchParams)();
6872
+ const router = (0, import_core12.useNavigationRouter)();
6873
+ const searchParams = (0, import_core12.useSearchParams)();
6874
6874
  const layerStore = useMapLayerStore();
6875
6875
  const [noNextLocation, setNoNextLocation] = (0, import_react15.useState)(false);
6876
6876
  const [status, setStatus] = (0, import_react15.useState)();
@@ -6880,14 +6880,14 @@ var RasterPreview = (_props) => {
6880
6880
  const [disableSubmit, setDisableSubmit] = (0, import_react15.useState)(false);
6881
6881
  var projectId = searchParams.get("projectId");
6882
6882
  var locationId = searchParams.get("locationId");
6883
- const { data: tasks } = (0, import_core9.useRandomTasksPerLocation)({
6883
+ const { data: tasks } = (0, import_core13.useRandomTasksPerLocation)({
6884
6884
  taskForReview: evolandStore.task_for_review,
6885
6885
  pageIdx: 0,
6886
6886
  pageSize: 1,
6887
6887
  locationProjectId: parseInt(projectId),
6888
6888
  groupName: !localStorage.getItem("searchGroup") ? null : localStorage.getItem("searchGroup"),
6889
6889
  search: null,
6890
- statusIn: !localStorage.getItem("searchStatus") ? import_core9.TaskStatus.SUBMITTED : localStorage.getItem("searchStatus"),
6890
+ statusIn: !localStorage.getItem("searchStatus") ? import_core13.TaskStatus.SUBMITTED : localStorage.getItem("searchStatus"),
6891
6891
  dateGte: localStorage.getItem("fromDate") !== null ? localStorage.getItem("fromDate") : void 0,
6892
6892
  dateLte: !localStorage.getItem("toDate") ? void 0 : localStorage.getItem("toDate"),
6893
6893
  userUserAlias: !localStorage.getItem("searchUser") ? null : localStorage.getItem("searchUser"),
@@ -6916,20 +6916,20 @@ var RasterPreview = (_props) => {
6916
6916
  var { data: savedAnnotationBuffer, indexArr: savedAnnotationIndexArr } = evolandStore.savedAnnotations && evolandStore.isAnnualAnnotation ? { data: evolandStore.savedAnnotations.buffer, indexArr: 0 } : evolandStore.savedAnnotations ? flatten(evolandStore.savedAnnotations.buffer) : { data: void 0, indexArr: 0 };
6917
6917
  var { data: annotationBuffer, indexArr: annotationBufferIndexArr } = evolandStore.annotatedRasterAsset && evolandStore.isAnnualAnnotation ? { data: evolandStore.annotatedRasterAsset.buffer, indexArr: 0 } : evolandStore.annotatedRasterAsset ? flatten(evolandStore.annotatedRasterAsset.buffer) : { data: void 0, indexArr: 0 };
6918
6918
  setStatus(taskStatus[0]);
6919
- bufferData = taskStatus[1] === import_core9.AnnotationRequired.NOT_REQUIRED ? void 0 : taskStatus[1] === import_core9.AnnotationRequired.OPTIONAL && ((_b2 = (_a2 = evolandStore.annotationUndoRedo) == null ? void 0 : _a2.past) == null ? void 0 : _b2.length) == 0 && !evolandStore.savedAnnotations ? void 0 : taskStatus[1] === import_core9.AnnotationRequired.OPTIONAL && ((_d2 = (_c2 = evolandStore.annotationUndoRedo) == null ? void 0 : _c2.past) == null ? void 0 : _d2.length) == 0 && evolandStore.savedAnnotations ? Buffer.from(savedAnnotationBuffer == null ? void 0 : savedAnnotationBuffer.buffer).toString("base64") : Buffer.from(annotationBuffer == null ? void 0 : annotationBuffer.buffer).toString("base64");
6920
- var annotation_dates = evolandStore.isAnnualAnnotation ? void 0 : taskStatus[1] === import_core9.AnnotationRequired.NOT_REQUIRED ? void 0 : taskStatus[1] === import_core9.AnnotationRequired.OPTIONAL && ((_f2 = (_e2 = evolandStore.annotationUndoRedo) == null ? void 0 : _e2.past) == null ? void 0 : _f2.length) == 0 && !evolandStore.savedAnnotations ? void 0 : taskStatus[1] === import_core9.AnnotationRequired.OPTIONAL && ((_h2 = (_g2 = evolandStore.annotationUndoRedo) == null ? void 0 : _g2.past) == null ? void 0 : _h2.length) == 0 && evolandStore.savedAnnotations ? savedAnnotationIndexArr.map(
6919
+ bufferData = taskStatus[1] === import_core13.AnnotationRequired.NOT_REQUIRED ? void 0 : taskStatus[1] === import_core13.AnnotationRequired.OPTIONAL && ((_b2 = (_a2 = evolandStore.annotationUndoRedo) == null ? void 0 : _a2.past) == null ? void 0 : _b2.length) == 0 && !evolandStore.savedAnnotations ? void 0 : taskStatus[1] === import_core13.AnnotationRequired.OPTIONAL && ((_d2 = (_c2 = evolandStore.annotationUndoRedo) == null ? void 0 : _c2.past) == null ? void 0 : _d2.length) == 0 && evolandStore.savedAnnotations ? Buffer.from(savedAnnotationBuffer == null ? void 0 : savedAnnotationBuffer.buffer).toString("base64") : Buffer.from(annotationBuffer == null ? void 0 : annotationBuffer.buffer).toString("base64");
6920
+ var annotation_dates = evolandStore.isAnnualAnnotation ? void 0 : taskStatus[1] === import_core13.AnnotationRequired.NOT_REQUIRED ? void 0 : taskStatus[1] === import_core13.AnnotationRequired.OPTIONAL && ((_f2 = (_e2 = evolandStore.annotationUndoRedo) == null ? void 0 : _e2.past) == null ? void 0 : _f2.length) == 0 && !evolandStore.savedAnnotations ? void 0 : taskStatus[1] === import_core13.AnnotationRequired.OPTIONAL && ((_h2 = (_g2 = evolandStore.annotationUndoRedo) == null ? void 0 : _g2.past) == null ? void 0 : _h2.length) == 0 && evolandStore.savedAnnotations ? savedAnnotationIndexArr.map(
6921
6921
  (item) => evolandStore.reference_dates[item]
6922
6922
  ) : annotationBufferIndexArr.map(
6923
6923
  (item) => evolandStore.reference_dates[item]
6924
6924
  );
6925
- if (!evolandStore.isAnnualAnnotation && annotation_dates && annotation_dates.length < ((_i2 = evolandStore.projectDetail) == null ? void 0 : _i2.minimum_annotation) && taskStatus[1] === import_core9.AnnotationRequired.REQUIRED) {
6925
+ if (!evolandStore.isAnnualAnnotation && annotation_dates && annotation_dates.length < ((_i2 = evolandStore.projectDetail) == null ? void 0 : _i2.minimum_annotation) && taskStatus[1] === import_core13.AnnotationRequired.REQUIRED) {
6926
6926
  alert(
6927
6927
  "Task should have minimum " + ((_j2 = evolandStore.projectDetail) == null ? void 0 : _j2.minimum_annotation) + " annotations"
6928
6928
  );
6929
6929
  return;
6930
6930
  }
6931
6931
  if (evolandStore.annotatedRasterAsset && evolandStore.currentTask) {
6932
- if (taskStatus[1] === import_core9.AnnotationRequired.REQUIRED) {
6932
+ if (taskStatus[1] === import_core13.AnnotationRequired.REQUIRED) {
6933
6933
  if (evolandStore.isAnnualAnnotation && isBase64Zeros(bufferData)) {
6934
6934
  alert("Please provide annotation");
6935
6935
  return;
@@ -6941,16 +6941,16 @@ var RasterPreview = (_props) => {
6941
6941
  task_type: ((_k2 = evolandStore.projectDetail) == null ? void 0 : _k2.meta_data.ANNOTATION) ? [import_evoland_api_proxy3.TaskType.ANNOTATION] : [],
6942
6942
  target_status: taskStatus[0],
6943
6943
  base64_array: bufferData,
6944
- array_height: taskStatus[1] === import_core9.AnnotationRequired.NOT_REQUIRED ? void 0 : taskStatus[1] === import_core9.AnnotationRequired.OPTIONAL && ((_m2 = (_l2 = evolandStore.annotationUndoRedo) == null ? void 0 : _l2.past) == null ? void 0 : _m2.length) == 0 && !evolandStore.savedAnnotations ? void 0 : taskStatus[1] === import_core9.AnnotationRequired.OPTIONAL && ((_o2 = (_n2 = evolandStore.annotationUndoRedo) == null ? void 0 : _n2.past) == null ? void 0 : _o2.length) == 0 && evolandStore.savedAnnotations ? evolandStore.savedAnnotations.height : evolandStore.annotatedRasterAsset.height,
6945
- array_width: taskStatus[1] === import_core9.AnnotationRequired.NOT_REQUIRED ? void 0 : taskStatus[1] === import_core9.AnnotationRequired.OPTIONAL && ((_q2 = (_p2 = evolandStore.annotationUndoRedo) == null ? void 0 : _p2.past) == null ? void 0 : _q2.length) == 0 && !evolandStore.savedAnnotations ? void 0 : taskStatus[1] === import_core9.AnnotationRequired.OPTIONAL && ((_s2 = (_r2 = evolandStore.annotationUndoRedo) == null ? void 0 : _r2.past) == null ? void 0 : _s2.length) == 0 && evolandStore.savedAnnotations ? evolandStore.savedAnnotations.width : evolandStore.annotatedRasterAsset.width,
6946
- annotation_time: taskStatus[1] === (import_core9.AnnotationRequired.NOT_REQUIRED || import_core9.AnnotationRequired.OPTIONAL) ? void 0 : evolandStore.annotationTime,
6944
+ array_height: taskStatus[1] === import_core13.AnnotationRequired.NOT_REQUIRED ? void 0 : taskStatus[1] === import_core13.AnnotationRequired.OPTIONAL && ((_m2 = (_l2 = evolandStore.annotationUndoRedo) == null ? void 0 : _l2.past) == null ? void 0 : _m2.length) == 0 && !evolandStore.savedAnnotations ? void 0 : taskStatus[1] === import_core13.AnnotationRequired.OPTIONAL && ((_o2 = (_n2 = evolandStore.annotationUndoRedo) == null ? void 0 : _n2.past) == null ? void 0 : _o2.length) == 0 && evolandStore.savedAnnotations ? evolandStore.savedAnnotations.height : evolandStore.annotatedRasterAsset.height,
6945
+ array_width: taskStatus[1] === import_core13.AnnotationRequired.NOT_REQUIRED ? void 0 : taskStatus[1] === import_core13.AnnotationRequired.OPTIONAL && ((_q2 = (_p2 = evolandStore.annotationUndoRedo) == null ? void 0 : _p2.past) == null ? void 0 : _q2.length) == 0 && !evolandStore.savedAnnotations ? void 0 : taskStatus[1] === import_core13.AnnotationRequired.OPTIONAL && ((_s2 = (_r2 = evolandStore.annotationUndoRedo) == null ? void 0 : _r2.past) == null ? void 0 : _s2.length) == 0 && evolandStore.savedAnnotations ? evolandStore.savedAnnotations.width : evolandStore.annotatedRasterAsset.width,
6946
+ annotation_time: taskStatus[1] === (import_core13.AnnotationRequired.NOT_REQUIRED || import_core13.AnnotationRequired.OPTIONAL) ? void 0 : evolandStore.annotationTime,
6947
6947
  annotation_dates: !evolandStore.isAnnualAnnotation && (annotation_dates == null ? void 0 : annotation_dates.length) > 0 ? annotation_dates : null,
6948
6948
  comment: evolandStore.comment === "" ? void 0 : evolandStore.comment
6949
6949
  };
6950
6950
  try {
6951
6951
  var response = yield import_evoland_api_proxy3.TaskService.updateTaskUpdatetaskPost(submitReq);
6952
6952
  if (response !== void 0) {
6953
- response ? taskStatus[1] == import_core9.AnnotationRequired.REQUIRED || taskStatus[1] === import_core9.AnnotationRequired.OPTIONAL && ((_u2 = (_t2 = evolandStore.annotationUndoRedo) == null ? void 0 : _t2.past) == null ? void 0 : _u2.pop()) !== void 0 ? setSubmitNotificationMessage(
6953
+ response ? taskStatus[1] == import_core13.AnnotationRequired.REQUIRED || taskStatus[1] === import_core13.AnnotationRequired.OPTIONAL && ((_u2 = (_t2 = evolandStore.annotationUndoRedo) == null ? void 0 : _t2.past) == null ? void 0 : _u2.pop()) !== void 0 ? setSubmitNotificationMessage(
6954
6954
  "Annotation has been moved to " + taskStatus[0].toUpperCase() + " state successfully with a new annotation. Moving to next location, please wait."
6955
6955
  ) : setSubmitNotificationMessage(
6956
6956
  "Annotation has been moved to " + taskStatus[0].toUpperCase() + " successfully. Moving to next location, please wait."
@@ -7149,7 +7149,7 @@ var RasterPreview = (_props) => {
7149
7149
  if (layerStore.layerOpacity == 0)
7150
7150
  layerStore.setLayerOpacity(0.4);
7151
7151
  if (!goToNextTask && evolandStore.location !== null && evolandStore.location.locationId !== searchParams.get("locationId")) {
7152
- if (status == import_core9.TaskStatus.ACCEPTED || status == import_core9.TaskStatus.DISCARDED || status == import_core9.TaskStatus.TO_FIX) {
7152
+ if (status == import_core13.TaskStatus.ACCEPTED || status == import_core13.TaskStatus.DISCARDED || status == import_core13.TaskStatus.TO_FIX) {
7153
7153
  setGoToNextTask(true);
7154
7154
  if (_props.userRole === "admin")
7155
7155
  if (tasks == null ? void 0 : tasks.task)
@@ -7215,7 +7215,7 @@ var RasterPreview = (_props) => {
7215
7215
  }
7216
7216
  ) }),
7217
7217
  evolandStore.currentTask !== null && ((_h = (_g = evolandStore.currentTask) == null ? void 0 : _g.transition_states) == null ? void 0 : _h.length) > 0 && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center justify-center", children: [
7218
- ((_i = evolandStore.currentTask) == null ? void 0 : _i.status) !== import_core9.TaskStatus.SUBMITTED && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
7218
+ ((_i = evolandStore.currentTask) == null ? void 0 : _i.status) !== import_core13.TaskStatus.SUBMITTED && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
7219
7219
  import_ui10.Button,
7220
7220
  {
7221
7221
  className: "mb-2 mt-2 mr-2 text-xs -flex-col",
@@ -7271,13 +7271,13 @@ var RasterPreview = (_props) => {
7271
7271
  {
7272
7272
  disabled: disableSubmit,
7273
7273
  style: {
7274
- backgroundColor: import_core9.TaskStatusColor[x[0]]
7274
+ backgroundColor: import_core13.TaskStatusColor[x[0]]
7275
7275
  },
7276
7276
  className: "h-6 text-xs p-1 m-1 text-forground-black -px-4 -py-2 w-full",
7277
7277
  onClick: () => {
7278
7278
  onSubmit(x);
7279
7279
  },
7280
- children: import_core9.TaskState[x[0]]
7280
+ children: import_core13.TaskState[x[0]]
7281
7281
  }
7282
7282
  ) });
7283
7283
  }
@@ -7406,7 +7406,7 @@ var RasterPreview = (_props) => {
7406
7406
  );
7407
7407
  },
7408
7408
  alt: "annotation",
7409
- className: (0, import_core9.classNames)(
7409
+ className: (0, import_core13.classNames)(
7410
7410
  "text-xs w-48 border-y border-x border-gray-100 hover:border-gray-400",
7411
7411
  ((_q = evolandStore.selectedRasterAsset) == null ? void 0 : _q.id) === ((_r = evolandStore.annotatedRasterAsset) == null ? void 0 : _r.id) && " border-2 border-red-600 ",
7412
7412
  evolandStore.selectedRasterAsset === null || ((_s = evolandStore.selectedRasterAsset) == null ? void 0 : _s.id) !== ((_t = evolandStore.annotatedRasterAsset) == null ? void 0 : _t.id) && " border-gray-50"
@@ -7469,14 +7469,14 @@ var RasterPreview = (_props) => {
7469
7469
  // src/Components/Evoland/Annotation.tsx
7470
7470
  var import_ui11 = require("@geowiki/ui");
7471
7471
  var import_react16 = require("react");
7472
- var import_link = __toESM(require("next/link"));
7473
- var import_router2 = require("next/router");
7472
+ var import_core14 = require("@geowiki/core");
7473
+ var import_core15 = require("@geowiki/core");
7474
7474
  var import_evoland_api_proxy4 = require("@geowiki/evoland-api-proxy");
7475
7475
  var import_jsx_runtime27 = require("react/jsx-runtime");
7476
7476
  var Annotation = (props) => {
7477
7477
  var _a, _b, _c, _d;
7478
7478
  const evolandStore = evoland_default();
7479
- const router = (0, import_router2.useRouter)();
7479
+ const router = (0, import_core15.useRouter)();
7480
7480
  var projectId = router.query.projectId;
7481
7481
  var locationId = router.query.locationId;
7482
7482
  const [activeLearningLoading, setActiveLearningLoading] = (0, import_react16.useState)(false);
@@ -7931,7 +7931,7 @@ var Annotation = (props) => {
7931
7931
  /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "font-semibold text-xs inline-flex flex-row", children: [
7932
7932
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { children: "Currently selected label" }),
7933
7933
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7934
- import_link.default,
7934
+ import_core14.Link,
7935
7935
  {
7936
7936
  className: "w-5",
7937
7937
  href: "https://wirehaired-enquiry-b72.notion.site/Evoland-Annotation-System-Pilot-Manual-4ab47f880f944efebd2832861669bf1f",
@@ -8083,12 +8083,12 @@ var Annotation = (props) => {
8083
8083
  };
8084
8084
 
8085
8085
  // src/Components/Evoland/EvolandLeftSideBar.tsx
8086
- var import_router3 = require("next/router");
8087
- var import_core14 = require("@geowiki/core");
8086
+ var import_core20 = require("@geowiki/core");
8087
+ var import_core21 = require("@geowiki/core");
8088
8088
  var import_react20 = require("react");
8089
8089
  var import_ui15 = require("@geowiki/ui");
8090
8090
  var import_react_hotkeys_hook2 = require("react-hotkeys-hook");
8091
- var import_link2 = __toESM(require("next/link"));
8091
+ var import_core22 = require("@geowiki/core");
8092
8092
 
8093
8093
  // src/Components/Evoland/GeoWikiTools.tsx
8094
8094
  var turf5 = __toESM(require("@turf/turf"));
@@ -8522,10 +8522,10 @@ var AssetOpacity = (props) => {
8522
8522
 
8523
8523
  // src/Components/ViewAssets.tsx
8524
8524
  var import_react18 = require("react");
8525
- var import_core11 = require("@geowiki/core");
8525
+ var import_core17 = require("@geowiki/core");
8526
8526
 
8527
8527
  // src/Components/Evoland/RasterImage.tsx
8528
- var import_core10 = require("@geowiki/core");
8528
+ var import_core16 = require("@geowiki/core");
8529
8529
  var import_jsx_runtime30 = require("react/jsx-runtime");
8530
8530
  var RasterImageWithColorMap = (props) => {
8531
8531
  var _a, _b, _c, _d, _e;
@@ -8534,7 +8534,7 @@ var RasterImageWithColorMap = (props) => {
8534
8534
  imgUri && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
8535
8535
  "div",
8536
8536
  {
8537
- className: (0, import_core10.classNames)(
8537
+ className: (0, import_core16.classNames)(
8538
8538
  "relative text-xs border-y border-x hover:border-gray-600",
8539
8539
  ((_a = props.selectedItem) == null ? void 0 : _a.id) === ((_b = props.rasterAssetItem) == null ? void 0 : _b.id) && " border-blue-600 bg-primary",
8540
8540
  props.selectedItem === null || ((_c = props.selectedItem) == null ? void 0 : _c.id) !== ((_d = props.rasterAssetItem) == null ? void 0 : _d.id) && "border-gray-300"
@@ -8611,13 +8611,13 @@ var ViewAssets = (props) => {
8611
8611
  data: taskAnnotation,
8612
8612
  isLoading: IsTaskAnnotationLoading,
8613
8613
  error
8614
- } = (0, import_core11.useTaskMultipleAnnotations)(
8614
+ } = (0, import_core17.useTaskMultipleAnnotations)(
8615
8615
  props.taskId !== void 0 && props.taskId !== 0 && submittedAnnotations.length == 0 ? props.taskId : submittedAnnotations.length == 0 && evolandStore.currentTask != null && ((_a = evolandStore.currentTask) == null ? void 0 : _a.task_id) !== void 0 ? evolandStore.currentTask.task_id : null
8616
8616
  );
8617
- const { data: taskSavedAnnotation } = (0, import_core11.useTaskSavedAnnotations)(
8617
+ const { data: taskSavedAnnotation } = (0, import_core17.useTaskSavedAnnotations)(
8618
8618
  props.taskId !== void 0 && props.taskId !== 0 && savedAnnotations == null ? props.taskId : savedAnnotations == null && evolandStore.currentTask != null && ((_b = evolandStore.currentTask) == null ? void 0 : _b.task_id) !== void 0 && evolandStore.currentTask.saved_annotation !== null ? evolandStore.currentTask.task_id : null
8619
8619
  );
8620
- const { data: latestTaskOnLocation } = (0, import_core11.useLatestTaskOnLocation)(
8620
+ const { data: latestTaskOnLocation } = (0, import_core17.useLatestTaskOnLocation)(
8621
8621
  props.locationId,
8622
8622
  props.projectId,
8623
8623
  evolandStore.referenceDate
@@ -8764,7 +8764,7 @@ var ViewAssets = (props) => {
8764
8764
  (masks == null ? void 0 : masks.length) > 0 && evolandStore.maskAsset && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
8765
8765
  "button",
8766
8766
  {
8767
- className: (0, import_core11.classNames)(
8767
+ className: (0, import_core17.classNames)(
8768
8768
  "border-r border-t border-gray-300",
8769
8769
  !maskTab && "bg-primary"
8770
8770
  ),
@@ -8781,7 +8781,7 @@ var ViewAssets = (props) => {
8781
8781
  ((_d = evolandStore.changeMaskAsset) == null ? void 0 : _d.length) > 0 && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
8782
8782
  "button",
8783
8783
  {
8784
- className: (0, import_core11.classNames)(
8784
+ className: (0, import_core17.classNames)(
8785
8785
  "border-r border-t border-gray-300",
8786
8786
  !changeMaskTab && "bg-primary"
8787
8787
  ),
@@ -8798,7 +8798,7 @@ var ViewAssets = (props) => {
8798
8798
  showAnnotationTab && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
8799
8799
  "button",
8800
8800
  {
8801
- className: (0, import_core11.classNames)(
8801
+ className: (0, import_core17.classNames)(
8802
8802
  "border-r border-t border-gray-300 px-1",
8803
8803
  !annotationTab && "bg-primary"
8804
8804
  ),
@@ -8815,7 +8815,7 @@ var ViewAssets = (props) => {
8815
8815
  /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
8816
8816
  "button",
8817
8817
  {
8818
- className: (0, import_core11.classNames)(
8818
+ className: (0, import_core17.classNames)(
8819
8819
  "border-r border-t border-gray-300 px-1",
8820
8820
  !compositesTab && "bg-primary"
8821
8821
  ),
@@ -9117,15 +9117,15 @@ var ViewAssets = (props) => {
9117
9117
 
9118
9118
  // src/Components/Evoland/SearchAnnotation.tsx
9119
9119
  var import_react19 = require("react");
9120
- var import_core12 = require("@geowiki/core");
9120
+ var import_core18 = require("@geowiki/core");
9121
9121
  var import_ui14 = require("@geowiki/ui");
9122
9122
  var import_jsx_runtime32 = require("react/jsx-runtime");
9123
9123
  var SearchAnnotation = (props) => {
9124
- const { data: users, isLoading: IsUsersLoading } = (0, import_core12.useProjectUsers)(
9124
+ const { data: users, isLoading: IsUsersLoading } = (0, import_core18.useProjectUsers)(
9125
9125
  props.projectId
9126
9126
  );
9127
- const { data: taskStatusList, isLoading: IsTaskStatusLoading } = (0, import_core12.useTaskStatusList)();
9128
- const { data: groups, isLoading: IsGroupsLoading } = (0, import_core12.useGroupsInProject)(
9127
+ const { data: taskStatusList, isLoading: IsTaskStatusLoading } = (0, import_core18.useTaskStatusList)();
9128
+ const { data: groups, isLoading: IsGroupsLoading } = (0, import_core18.useGroupsInProject)(
9129
9129
  props.projectId
9130
9130
  );
9131
9131
  const [searchUser, setSearchUser] = (0, import_react19.useState)(
@@ -9135,7 +9135,7 @@ var SearchAnnotation = (props) => {
9135
9135
  !localStorage.getItem("searchGroup") ? "" : localStorage.getItem("searchGroup")
9136
9136
  );
9137
9137
  const [searchStatus, setSearchStatus] = (0, import_react19.useState)(
9138
- !localStorage.getItem("searchStatus") ? import_core12.TaskStatus.SUBMITTED : localStorage.getItem("searchStatus")
9138
+ !localStorage.getItem("searchStatus") ? import_core18.TaskStatus.SUBMITTED : localStorage.getItem("searchStatus")
9139
9139
  );
9140
9140
  const [fromDate, setFromDate] = (0, import_react19.useState)(
9141
9141
  localStorage.getItem("fromDate") !== null ? localStorage.getItem("fromDate") : ""
@@ -9143,13 +9143,13 @@ var SearchAnnotation = (props) => {
9143
9143
  const [toDate, setToDate] = (0, import_react19.useState)(
9144
9144
  !localStorage.getItem("toDate") ? "" : localStorage.getItem("toDate")
9145
9145
  );
9146
- const { data: tasks } = (0, import_core12.useRandomTasksPerLocation)({
9146
+ const { data: tasks } = (0, import_core18.useRandomTasksPerLocation)({
9147
9147
  taskForReview: props.taskForReview,
9148
9148
  pageIdx: 0,
9149
9149
  pageSize: searchUser == void 0 && searchGroup == void 0 ? 1 : 10,
9150
9150
  locationProjectId: props.projectId,
9151
9151
  groupName: searchGroup || null,
9152
- statusIn: searchUser == void 0 && searchStatus == void 0 ? import_core12.TaskStatus.SUBMITTED : searchStatus,
9152
+ statusIn: searchUser == void 0 && searchStatus == void 0 ? import_core18.TaskStatus.SUBMITTED : searchStatus,
9153
9153
  dateGte: fromDate,
9154
9154
  dateLte: toDate,
9155
9155
  userUserAlias: searchUser || null
@@ -9250,7 +9250,7 @@ var SearchAnnotation = (props) => {
9250
9250
  "option",
9251
9251
  {
9252
9252
  value: x,
9253
- selected: searchStatus === void 0 ? x === import_core12.TaskStatus.SUBMITTED : searchStatus == x,
9253
+ selected: searchStatus === void 0 ? x === import_core18.TaskStatus.SUBMITTED : searchStatus == x,
9254
9254
  children: x
9255
9255
  },
9256
9256
  index
@@ -9338,12 +9338,12 @@ var SearchAnnotation = (props) => {
9338
9338
  onClick: () => {
9339
9339
  setSearchUser("");
9340
9340
  setsearchGroup("");
9341
- setSearchStatus(import_core12.TaskStatus.SUBMITTED);
9341
+ setSearchStatus(import_core18.TaskStatus.SUBMITTED);
9342
9342
  setFromDate("");
9343
9343
  setToDate("");
9344
9344
  localStorage.removeItem("searchUser");
9345
9345
  localStorage.removeItem("searchGroup");
9346
- localStorage.setItem("searchStatus", import_core12.TaskStatus.SUBMITTED);
9346
+ localStorage.setItem("searchStatus", import_core18.TaskStatus.SUBMITTED);
9347
9347
  localStorage.removeItem("fromDate");
9348
9348
  localStorage.removeItem("toDate");
9349
9349
  },
@@ -9364,7 +9364,7 @@ var SearchAnnotation = (props) => {
9364
9364
  };
9365
9365
 
9366
9366
  // src/Components/Evoland/TaskEventLog.tsx
9367
- var import_core13 = require("@geowiki/core");
9367
+ var import_core19 = require("@geowiki/core");
9368
9368
  var import_jsx_runtime33 = require("react/jsx-runtime");
9369
9369
  var TaskEventLog = (props) => {
9370
9370
  return Object.entries(props.taskEventsGrouped).map(
@@ -9372,12 +9372,12 @@ var TaskEventLog = (props) => {
9372
9372
  var _a, _b, _c, _d;
9373
9373
  let tempAnnotationId = "";
9374
9374
  let tempComment = "";
9375
- if (x[1][0].event_type == import_core13.TaskEventType.NEW_ANNOTATION)
9375
+ if (x[1][0].event_type == import_core19.TaskEventType.NEW_ANNOTATION)
9376
9376
  tempAnnotationId = x[1][0].content;
9377
- if (x[1][0].event_type == import_core13.TaskEventType.COMMENT)
9377
+ if (x[1][0].event_type == import_core19.TaskEventType.COMMENT)
9378
9378
  tempComment = x[1][0].content;
9379
9379
  return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { children: [
9380
- x[1].length == 1 && (x[1][0].event_type == import_core13.TaskEventType.CREATED ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { children: [
9380
+ x[1].length == 1 && (x[1][0].event_type == import_core19.TaskEventType.CREATED ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { children: [
9381
9381
  /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "text-primary leading-5", children: [
9382
9382
  "System - ",
9383
9383
  (_a = x[1][0]) == null ? void 0 : _a.event_time
@@ -9388,13 +9388,13 @@ var TaskEventLog = (props) => {
9388
9388
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("i", { children: (_b = x[1][0]) == null ? void 0 : _b.actor_alias })
9389
9389
  ] })
9390
9390
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "text-white", children: [
9391
- x[1][0].event_type !== import_core13.TaskEventType.NEW_ANNOTATION && x[1][0].event_type !== import_core13.TaskEventType.COMMENT && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "text-primary leading-5 mt-2", children: [
9391
+ x[1][0].event_type !== import_core19.TaskEventType.NEW_ANNOTATION && x[1][0].event_type !== import_core19.TaskEventType.COMMENT && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "text-primary leading-5 mt-2", children: [
9392
9392
  (_c = x[1][0]) == null ? void 0 : _c.actor_alias,
9393
9393
  " - ",
9394
9394
  (_d = x[1][0]) == null ? void 0 : _d.event_time
9395
9395
  ] }),
9396
- x[1][0].event_type == import_core13.TaskEventType.REVIEW && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "text-black text-xs leading-5", children: x[1][0].content }),
9397
- (x[1][0].event_type == import_core13.TaskEventType.STATUS_UPDATED || x[1][0].event_type == import_core13.TaskEventType.COMMENT) && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "text-black text-xs leading-5", children: [
9396
+ x[1][0].event_type == import_core19.TaskEventType.REVIEW && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "text-black text-xs leading-5", children: x[1][0].content }),
9397
+ (x[1][0].event_type == import_core19.TaskEventType.STATUS_UPDATED || x[1][0].event_type == import_core19.TaskEventType.COMMENT) && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "text-black text-xs leading-5", children: [
9398
9398
  tempAnnotationId !== "" && tempComment == "" && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { children: [
9399
9399
  " ",
9400
9400
  "Status changed to : ",
@@ -9432,17 +9432,17 @@ var TaskEventLog = (props) => {
9432
9432
  ] })
9433
9433
  ] }, index)),
9434
9434
  x[1].length > 1 && x[1].map((y, yIndex) => {
9435
- if (y.event_type == import_core13.TaskEventType.NEW_ANNOTATION)
9435
+ if (y.event_type == import_core19.TaskEventType.NEW_ANNOTATION)
9436
9436
  tempAnnotationId = y.content;
9437
- if (y.event_type == import_core13.TaskEventType.COMMENT)
9437
+ if (y.event_type == import_core19.TaskEventType.COMMENT)
9438
9438
  tempComment = y.content;
9439
9439
  return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "text-white", children: [
9440
- y.event_type !== import_core13.TaskEventType.NEW_ANNOTATION && y.event_type !== import_core13.TaskEventType.COMMENT && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "text-primary leading-5 mt-2", children: [
9440
+ y.event_type !== import_core19.TaskEventType.NEW_ANNOTATION && y.event_type !== import_core19.TaskEventType.COMMENT && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "text-primary leading-5 mt-2", children: [
9441
9441
  y == null ? void 0 : y.actor_alias,
9442
9442
  " - ",
9443
9443
  y == null ? void 0 : y.event_time
9444
9444
  ] }),
9445
- (y.event_type == import_core13.TaskEventType.STATUS_UPDATED || y.event_type == import_core13.TaskEventType.COMMENT || y.event_type == import_core13.TaskEventType.QUESTIONNAIRE || y.event_type == import_core13.TaskEventType.REVIEW) && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "text-black text-xs leading-5", children: [
9445
+ (y.event_type == import_core19.TaskEventType.STATUS_UPDATED || y.event_type == import_core19.TaskEventType.COMMENT || y.event_type == import_core19.TaskEventType.QUESTIONNAIRE || y.event_type == import_core19.TaskEventType.REVIEW) && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "text-black text-xs leading-5", children: [
9446
9446
  tempAnnotationId !== "" && tempComment == "" && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { children: [
9447
9447
  " ",
9448
9448
  "Status changed to : ",
@@ -9450,12 +9450,12 @@ var TaskEventLog = (props) => {
9450
9450
  " with new Annotation :",
9451
9451
  tempAnnotationId
9452
9452
  ] }),
9453
- tempAnnotationId == "" && tempComment == "" && y.event_type !== import_core13.TaskEventType.QUESTIONNAIRE && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { children: [
9453
+ tempAnnotationId == "" && tempComment == "" && y.event_type !== import_core19.TaskEventType.QUESTIONNAIRE && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { children: [
9454
9454
  " ",
9455
9455
  "Status changed to : ",
9456
9456
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("i", { children: y.content })
9457
9457
  ] }),
9458
- tempAnnotationId == "" && tempComment == "" && y.event_type == import_core13.TaskEventType.QUESTIONNAIRE && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { children: "Questionnaire filled" }),
9458
+ tempAnnotationId == "" && tempComment == "" && y.event_type == import_core19.TaskEventType.QUESTIONNAIRE && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { children: "Questionnaire filled" }),
9459
9459
  tempComment !== "" && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex", children: [
9460
9460
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
9461
9461
  "svg",
@@ -9490,7 +9490,7 @@ var TaskEventLog = (props) => {
9490
9490
  var import_jsx_runtime34 = require("react/jsx-runtime");
9491
9491
  var EvolandLeftSideBar = (props) => {
9492
9492
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C;
9493
- const router = (0, import_router3.useRouter)();
9493
+ const router = (0, import_core20.useRouter)();
9494
9494
  var locationId = router.query.locationId;
9495
9495
  const projectId = parseInt(router.query.projectId);
9496
9496
  const review = router.query.review;
@@ -9507,7 +9507,7 @@ var EvolandLeftSideBar = (props) => {
9507
9507
  const [annotations, setAnnotations] = (0, import_react20.useState)([]);
9508
9508
  const [fetchMasks, setFetchMasks] = (0, import_react20.useState)(false);
9509
9509
  const [fetchChangeMasks, setFetchChangeMasks] = (0, import_react20.useState)(false);
9510
- const { data: latestTaskOnLocation } = (0, import_core14.useLatestTaskOnLocation)(
9510
+ const { data: latestTaskOnLocation } = (0, import_core21.useLatestTaskOnLocation)(
9511
9511
  locationId,
9512
9512
  projectId,
9513
9513
  evolandStore.referenceDate
@@ -9520,22 +9520,22 @@ var EvolandLeftSideBar = (props) => {
9520
9520
  const [adminTasks, setAdminTasks] = (0, import_react20.useState)();
9521
9521
  const [deleteTask, setDeleteTask] = (0, import_react20.useState)(false);
9522
9522
  var taskId = router.query.taskId == void 0 ? (_a = evolandStore.currentTask) == null ? void 0 : _a.task_id : router.query.taskId;
9523
- const { data: taskSavedAnnotation } = (0, import_core14.useTaskSavedAnnotations)(
9523
+ const { data: taskSavedAnnotation } = (0, import_core21.useTaskSavedAnnotations)(
9524
9524
  taskId !== void 0 && parseInt(taskId) !== 0 && savedAnnotations == null ? parseInt(taskId) : savedAnnotations == null && evolandStore.currentTask != null && ((_b = evolandStore.currentTask) == null ? void 0 : _b.task_id) !== void 0 && evolandStore.currentTask.saved_annotation !== null ? evolandStore.currentTask.task_id : !evolandStore.currentTask && latestTaskOnLocation && latestTaskOnLocation.exists ? latestTaskOnLocation.task_id : null
9525
9525
  );
9526
- const { data: TaskDeleted, isLoading: IsTaskDeletedLoading } = (0, import_core14.useTaskDelete)(
9526
+ const { data: TaskDeleted, isLoading: IsTaskDeletedLoading } = (0, import_core21.useTaskDelete)(
9527
9527
  taskId !== void 0 && parseInt(taskId) !== 0 ? parseInt(taskId) : (_c = evolandStore.currentTask) == null ? void 0 : _c.task_id,
9528
9528
  projectId,
9529
9529
  deleteTask
9530
9530
  );
9531
- const { data: tasks } = (0, import_core14.useRandomTasksPerLocation)({
9531
+ const { data: tasks } = (0, import_core21.useRandomTasksPerLocation)({
9532
9532
  taskForReview: evolandStore.task_for_review,
9533
9533
  pageIdx: 0,
9534
9534
  pageSize: 1,
9535
9535
  locationProjectId: projectId,
9536
9536
  groupName: !localStorage.getItem("searchGroup") ? null : localStorage.getItem("searchGroup"),
9537
9537
  search: null,
9538
- statusIn: !localStorage.getItem("searchStatus") ? import_core14.TaskStatus.SUBMITTED : localStorage.getItem("searchStatus"),
9538
+ statusIn: !localStorage.getItem("searchStatus") ? import_core21.TaskStatus.SUBMITTED : localStorage.getItem("searchStatus"),
9539
9539
  dateGte: localStorage.getItem("fromDate") !== null ? localStorage.getItem("fromDate") : void 0,
9540
9540
  dateLte: !localStorage.getItem("toDate") ? void 0 : localStorage.getItem("toDate"),
9541
9541
  userUserAlias: !localStorage.getItem("searchUser") ? null : localStorage.getItem("searchUser"),
@@ -9682,10 +9682,10 @@ var EvolandLeftSideBar = (props) => {
9682
9682
  "div",
9683
9683
  {
9684
9684
  style: {
9685
- backgroundColor: ((_p = evolandStore.currentTask) == null ? void 0 : _p.status) !== null && ((_q = evolandStore.currentTask) == null ? void 0 : _q.status) !== void 0 ? import_core14.TaskStatusColor[(_r = evolandStore.currentTask) == null ? void 0 : _r.status] : !evolandStore.currentTask && latestTaskOnLocation && latestTaskOnLocation.exists ? import_core14.TaskStatusColor[latestTaskOnLocation.task_status] : !evolandStore.currentTask && !(latestTaskOnLocation == null ? void 0 : latestTaskOnLocation.exists) ? "bg-primary text-primary-foreground" : "white"
9685
+ backgroundColor: ((_p = evolandStore.currentTask) == null ? void 0 : _p.status) !== null && ((_q = evolandStore.currentTask) == null ? void 0 : _q.status) !== void 0 ? import_core21.TaskStatusColor[(_r = evolandStore.currentTask) == null ? void 0 : _r.status] : !evolandStore.currentTask && latestTaskOnLocation && latestTaskOnLocation.exists ? import_core21.TaskStatusColor[latestTaskOnLocation.task_status] : !evolandStore.currentTask && !(latestTaskOnLocation == null ? void 0 : latestTaskOnLocation.exists) ? "bg-primary text-primary-foreground" : "white"
9686
9686
  },
9687
- className: "pl-2 pr-2 flex rounded-lg text-center " + (((_s = evolandStore.currentTask) == null ? void 0 : _s.status) !== null && ((_t = evolandStore.currentTask) == null ? void 0 : _t.status) !== void 0 ? "bg-" + import_core14.TaskStatusColor[(_u = evolandStore.currentTask) == null ? void 0 : _u.status] + "-500" : !evolandStore.currentTask && latestTaskOnLocation && latestTaskOnLocation.exists ? "bg-" + import_core14.TaskStatusColor[latestTaskOnLocation.task_status] + "-500" : !evolandStore.currentTask && !(latestTaskOnLocation == null ? void 0 : latestTaskOnLocation.exists) ? "bg-primary text-primary-foreground" : "bg-white-500"),
9688
- children: ((_v = evolandStore.currentTask) == null ? void 0 : _v.status) !== null && ((_w = evolandStore.currentTask) == null ? void 0 : _w.status) !== void 0 ? import_core14.TaskStatus[(_x = evolandStore.currentTask) == null ? void 0 : _x.status] : !evolandStore.currentTask && latestTaskOnLocation && latestTaskOnLocation.exists ? import_core14.TaskStatus[latestTaskOnLocation.task_status] : !evolandStore.currentTask && !(latestTaskOnLocation == null ? void 0 : latestTaskOnLocation.task_id) ? "Not started" : ""
9687
+ className: "pl-2 pr-2 flex rounded-lg text-center " + (((_s = evolandStore.currentTask) == null ? void 0 : _s.status) !== null && ((_t = evolandStore.currentTask) == null ? void 0 : _t.status) !== void 0 ? "bg-" + import_core21.TaskStatusColor[(_u = evolandStore.currentTask) == null ? void 0 : _u.status] + "-500" : !evolandStore.currentTask && latestTaskOnLocation && latestTaskOnLocation.exists ? "bg-" + import_core21.TaskStatusColor[latestTaskOnLocation.task_status] + "-500" : !evolandStore.currentTask && !(latestTaskOnLocation == null ? void 0 : latestTaskOnLocation.exists) ? "bg-primary text-primary-foreground" : "bg-white-500"),
9688
+ children: ((_v = evolandStore.currentTask) == null ? void 0 : _v.status) !== null && ((_w = evolandStore.currentTask) == null ? void 0 : _w.status) !== void 0 ? import_core21.TaskStatus[(_x = evolandStore.currentTask) == null ? void 0 : _x.status] : !evolandStore.currentTask && latestTaskOnLocation && latestTaskOnLocation.exists ? import_core21.TaskStatus[latestTaskOnLocation.task_status] : !evolandStore.currentTask && !(latestTaskOnLocation == null ? void 0 : latestTaskOnLocation.task_id) ? "Not started" : ""
9689
9689
  }
9690
9690
  ) }),
9691
9691
  locationId && projectId && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "text-xs", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_ui15.Popover, { children: [
@@ -9728,7 +9728,7 @@ var EvolandLeftSideBar = (props) => {
9728
9728
  !taskEventsGrouped && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_ui15.PopoverContent, { className: "bg-white text-xs flex", children: "No history yet" })
9729
9729
  ] }) }),
9730
9730
  /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9731
- import_link2.default,
9731
+ import_core22.Link,
9732
9732
  {
9733
9733
  href: "/evoland/tasks?projectId=" + projectId,
9734
9734
  target: "_blank",
@@ -9757,7 +9757,7 @@ var EvolandLeftSideBar = (props) => {
9757
9757
  }
9758
9758
  ) }),
9759
9759
  /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9760
- import_link2.default,
9760
+ import_core22.Link,
9761
9761
  {
9762
9762
  href: "/evoland/projects?projectId=" + projectId,
9763
9763
  target: "_blank",
@@ -9856,10 +9856,10 @@ var EvolandLeftSideBar = (props) => {
9856
9856
  "div",
9857
9857
  {
9858
9858
  style: {
9859
- backgroundColor: import_core14.TaskStatusColor[x.status]
9859
+ backgroundColor: import_core21.TaskStatusColor[x.status]
9860
9860
  },
9861
9861
  className: "pl-2 pr-2 flex rounded-lg text-center",
9862
- children: import_core14.TaskStatus[x.status]
9862
+ children: import_core21.TaskStatus[x.status]
9863
9863
  }
9864
9864
  )
9865
9865
  ] }, index)) })
@@ -9933,22 +9933,22 @@ var EvolandLeftSideBar = (props) => {
9933
9933
 
9934
9934
  // src/Components/Evoland/Questions.tsx
9935
9935
  var import_ui16 = require("@geowiki/ui");
9936
- var import_router4 = require("next/router");
9937
- var import_core15 = require("@geowiki/core");
9936
+ var import_core23 = require("@geowiki/core");
9937
+ var import_core24 = require("@geowiki/core");
9938
9938
  var import_react21 = require("react");
9939
9939
  var import_evoland_api_proxy5 = require("@geowiki/evoland-api-proxy");
9940
- var import_navigation2 = require("next/navigation");
9940
+ var import_core25 = require("@geowiki/core");
9941
9941
  var import_jsx_runtime35 = require("react/jsx-runtime");
9942
9942
  var Questions = (props) => {
9943
9943
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
9944
9944
  const evolandStore = evoland_default();
9945
- const router = (0, import_router4.useRouter)();
9946
- const searchParams = (0, import_navigation2.useSearchParams)();
9945
+ const router = (0, import_core23.useRouter)();
9946
+ const searchParams = (0, import_core25.useSearchParams)();
9947
9947
  const projectId = searchParams.get("projectId");
9948
9948
  const taskId = searchParams.get("taskId");
9949
- const { data: labels } = (0, import_core15.useEvolandLabels)(parseInt(projectId));
9949
+ const { data: labels } = (0, import_core24.useEvolandLabels)(parseInt(projectId));
9950
9950
  const [taskChangeDetail, setTaskChangeDetail] = (0, import_react21.useState)(null);
9951
- var { data: questionnaire, isLoading: IsQuestionnaireLoading } = (0, import_core15.useQuestionnaire)(parseInt(projectId));
9951
+ var { data: questionnaire, isLoading: IsQuestionnaireLoading } = (0, import_core24.useQuestionnaire)(parseInt(projectId));
9952
9952
  const [context, setContext] = (0, import_react21.useState)();
9953
9953
  const [singleChoice, setSingleChoice] = (0, import_react21.useState)();
9954
9954
  const [status, setStatus] = (0, import_react21.useState)();
@@ -9959,7 +9959,7 @@ var Questions = (props) => {
9959
9959
  const [disableSubmit, setDisableSubmit] = (0, import_react21.useState)(false);
9960
9960
  const [userAnswers, setUserAnswers] = (0, import_react21.useState)([]);
9961
9961
  let requiredUserAnswers = 0;
9962
- const { data: taskAnswers, isLoading: IsTaskAnswerLoading } = (0, import_core15.useTaskAnswers)(
9962
+ const { data: taskAnswers, isLoading: IsTaskAnswerLoading } = (0, import_core24.useTaskAnswers)(
9963
9963
  taskId ? parseInt(taskId) : ((_a = evolandStore.currentTask) == null ? void 0 : _a.task_id) ? (_b = evolandStore.currentTask) == null ? void 0 : _b.task_id : 0
9964
9964
  );
9965
9965
  (0, import_react21.useEffect)(() => {
@@ -10013,14 +10013,14 @@ var Questions = (props) => {
10013
10013
  });
10014
10014
  }
10015
10015
  };
10016
- const { data: tasks } = (0, import_core15.useRandomTasksPerLocation)({
10016
+ const { data: tasks } = (0, import_core24.useRandomTasksPerLocation)({
10017
10017
  taskForReview: evolandStore.task_for_review,
10018
10018
  pageIdx: 0,
10019
10019
  pageSize: 1,
10020
10020
  locationProjectId: parseInt(projectId),
10021
10021
  groupName: !localStorage.getItem("searchGroup") ? null : localStorage.getItem("searchGroup"),
10022
10022
  search: null,
10023
- statusIn: !localStorage.getItem("searchStatus") ? import_core15.TaskStatus.SUBMITTED : localStorage.getItem("searchStatus"),
10023
+ statusIn: !localStorage.getItem("searchStatus") ? import_core24.TaskStatus.SUBMITTED : localStorage.getItem("searchStatus"),
10024
10024
  dateGte: localStorage.getItem("fromDate") !== null ? localStorage.getItem("fromDate") : void 0,
10025
10025
  dateLte: !localStorage.getItem("toDate") ? void 0 : localStorage.getItem("toDate"),
10026
10026
  userUserAlias: !localStorage.getItem("searchUser") ? null : localStorage.getItem("searchUser"),
@@ -10038,7 +10038,7 @@ var Questions = (props) => {
10038
10038
  project_id: parseInt(projectId),
10039
10039
  target_status: taskStatus[0],
10040
10040
  task_type: ((_a2 = evolandStore.projectDetail) == null ? void 0 : _a2.meta_data.QUESTIONNAIRE) ? [import_evoland_api_proxy5.TaskType.QUESTIONNAIRE] : [],
10041
- annotation_time: taskStatus[1] === (import_core15.AnnotationRequired.NOT_REQUIRED || import_core15.AnnotationRequired.OPTIONAL) ? void 0 : evolandStore.annotationTime,
10041
+ annotation_time: taskStatus[1] === (import_core24.AnnotationRequired.NOT_REQUIRED || import_core24.AnnotationRequired.OPTIONAL) ? void 0 : evolandStore.annotationTime,
10042
10042
  questionnaire: userAnswers.map((item) => [
10043
10043
  item.question_id,
10044
10044
  item.answer_text
@@ -10048,7 +10048,7 @@ var Questions = (props) => {
10048
10048
  try {
10049
10049
  var response = yield import_evoland_api_proxy5.TaskService.updateTaskUpdatetaskPost(submitReq);
10050
10050
  if (response !== void 0) {
10051
- response ? taskStatus[1] == import_core15.AnnotationRequired.REQUIRED || taskStatus[1] === import_core15.AnnotationRequired.OPTIONAL && ((_c2 = (_b2 = evolandStore.annotationUndoRedo) == null ? void 0 : _b2.past) == null ? void 0 : _c2.pop()) !== void 0 ? setSubmitNotificationMessage(
10051
+ response ? taskStatus[1] == import_core24.AnnotationRequired.REQUIRED || taskStatus[1] === import_core24.AnnotationRequired.OPTIONAL && ((_c2 = (_b2 = evolandStore.annotationUndoRedo) == null ? void 0 : _b2.past) == null ? void 0 : _c2.pop()) !== void 0 ? setSubmitNotificationMessage(
10052
10052
  "Task has been moved to " + taskStatus[0].toUpperCase() + " state successfully with selected answers. Moving to next location, please wait."
10053
10053
  ) : setSubmitNotificationMessage(
10054
10054
  "Task has been moved to " + taskStatus[0].toUpperCase() + " successfully. Moving to next location, please wait."
@@ -10120,11 +10120,11 @@ var Questions = (props) => {
10120
10120
  });
10121
10121
  if (questionnaire && !context)
10122
10122
  setContext(
10123
- questionnaire.filter((x) => x.type == import_core15.QuestionnaireType.CONTEXT).sort((x, y) => x.order_id - y.order_id)
10123
+ questionnaire.filter((x) => x.type == import_core24.QuestionnaireType.CONTEXT).sort((x, y) => x.order_id - y.order_id)
10124
10124
  );
10125
10125
  if (questionnaire && !singleChoice)
10126
10126
  setSingleChoice(
10127
- questionnaire.filter((x) => x.type == import_core15.QuestionnaireType.SINGLE_CHOICE).sort((x, y) => x.order_id - y.order_id)
10127
+ questionnaire.filter((x) => x.type == import_core24.QuestionnaireType.SINGLE_CHOICE).sort((x, y) => x.order_id - y.order_id)
10128
10128
  );
10129
10129
  if (context && taskChangeDetail) {
10130
10130
  context.filter((x) => x.has_dynamic_answers).map((y) => {
@@ -10160,8 +10160,8 @@ var Questions = (props) => {
10160
10160
  if (Array.isArray(y.answers)) {
10161
10161
  y.answers = y.answers.filter((answer) => {
10162
10162
  const value = answer.text;
10163
- const isInteger = parseInt(value);
10164
- if (isInteger)
10163
+ const isInteger2 = parseInt(value);
10164
+ if (isInteger2)
10165
10165
  return Object.values(taskChangeDetail).includes(Number(value));
10166
10166
  return true;
10167
10167
  });
@@ -10180,7 +10180,7 @@ var Questions = (props) => {
10180
10180
  });
10181
10181
  }
10182
10182
  if (!goToNextTask && evolandStore.location !== null && evolandStore.location.locationId !== searchParams.get("locationId")) {
10183
- if (status == import_core15.TaskStatus.ACCEPTED || status == import_core15.TaskStatus.DISCARDED || status == import_core15.TaskStatus.TO_FIX) {
10183
+ if (status == import_core24.TaskStatus.ACCEPTED || status == import_core24.TaskStatus.DISCARDED || status == import_core24.TaskStatus.TO_FIX) {
10184
10184
  setGoToNextTask(true);
10185
10185
  if (props.userRole === "admin")
10186
10186
  if (tasks == null ? void 0 : tasks.task)
@@ -10273,7 +10273,7 @@ var Questions = (props) => {
10273
10273
  }
10274
10274
  ),
10275
10275
  evolandStore.currentTask !== null && ((_k = (_j = evolandStore.currentTask) == null ? void 0 : _j.transition_states) == null ? void 0 : _k.length) > 0 && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center justify-center", children: [
10276
- ((_l = evolandStore.currentTask) == null ? void 0 : _l.status) !== import_core15.TaskStatus.SUBMITTED && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
10276
+ ((_l = evolandStore.currentTask) == null ? void 0 : _l.status) !== import_core24.TaskStatus.SUBMITTED && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
10277
10277
  import_ui16.Button,
10278
10278
  {
10279
10279
  className: "mb-2 mt-2 mr-2 text-xs -flex-col",
@@ -10329,16 +10329,16 @@ var Questions = (props) => {
10329
10329
  {
10330
10330
  disabled: disableSubmit,
10331
10331
  style: {
10332
- backgroundColor: import_core15.TaskStatusColor[x[0]]
10332
+ backgroundColor: import_core24.TaskStatusColor[x[0]]
10333
10333
  },
10334
10334
  className: "h-6 text-xs p-1 m-1 text-forground-black -px-4 -py-2 w-full",
10335
10335
  onClick: () => {
10336
- if (import_core15.TaskState[x[0]] !== import_core15.TaskState.SKIPPED && import_core15.TaskState[x[0]] !== import_core15.TaskState.DISCARDED && import_core15.TaskState[x[0]] !== import_core15.TaskState.USER_DISCARDED && userAnswers.length !== requiredUserAnswers)
10336
+ if (import_core24.TaskState[x[0]] !== import_core24.TaskState.SKIPPED && import_core24.TaskState[x[0]] !== import_core24.TaskState.DISCARDED && import_core24.TaskState[x[0]] !== import_core24.TaskState.USER_DISCARDED && userAnswers.length !== requiredUserAnswers)
10337
10337
  alert("Please provide all answers");
10338
10338
  else
10339
10339
  onSubmit(x);
10340
10340
  },
10341
- children: import_core15.TaskState[x[0]]
10341
+ children: import_core24.TaskState[x[0]]
10342
10342
  }
10343
10343
  ) });
10344
10344
  }
@@ -10616,12 +10616,12 @@ var TimeSeries = () => {
10616
10616
  };
10617
10617
 
10618
10618
  // src/Components/OverlayLayer.tsx
10619
- var import_core16 = require("@geowiki/core");
10619
+ var import_core26 = require("@geowiki/core");
10620
10620
  var import_react23 = require("react");
10621
10621
  var import_jsx_runtime37 = require("react/jsx-runtime");
10622
10622
  var OverlayLayer = () => {
10623
10623
  const layerStore = useMapLayerStore();
10624
- const { data: wmsLayerNames } = (0, import_core16.useEvolandWmsLayers)();
10624
+ const { data: wmsLayerNames } = (0, import_core26.useEvolandWmsLayers)();
10625
10625
  const [showLayerOpacity, setShowLayerOpacity] = (0, import_react23.useState)(false);
10626
10626
  return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "w-full items-center mt-2 justify-center text-xs", children: [
10627
10627
  showLayerOpacity && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "mt-2", children: [
@@ -10682,7 +10682,7 @@ var OverlayLayer = () => {
10682
10682
  var import_leaflet10 = require("leaflet/dist/leaflet.css");
10683
10683
  var import_react36 = require("react");
10684
10684
  var import_react_leaflet15 = require("react-leaflet");
10685
- var import_core22 = require("@geowiki/core");
10685
+ var import_core33 = require("@geowiki/core");
10686
10686
 
10687
10687
  // src/Components/Map/LayerList.tsx
10688
10688
  var import_react24 = require("react");
@@ -10698,7 +10698,7 @@ var useBaseLayerStore = (0, import_zustand5.create)((set) => ({
10698
10698
  var import_react_leaflet12 = require("react-leaflet");
10699
10699
 
10700
10700
  // src/utils/BingLayer.ts
10701
- var import_core17 = require("@react-leaflet/core");
10701
+ var import_core27 = require("@react-leaflet/core");
10702
10702
 
10703
10703
  // src/utils/LeafletBing.ts
10704
10704
  var L13 = __toESM(require("leaflet"));
@@ -10760,12 +10760,12 @@ var BingLayer = class extends L13.TileLayer {
10760
10760
  (_a = document.getElementsByTagName("head")[0]) == null ? void 0 : _a.appendChild(script);
10761
10761
  }
10762
10762
  initMetadata(meta) {
10763
- const r = meta.resourceSets[0].resources[0];
10764
- this.options.subdomains = r.imageUrlSubdomains;
10765
- this._url = r.imageUrl;
10766
- if (r.imageryProviders) {
10767
- for (let i = 0; i < r.imageryProviders.length; i++) {
10768
- const p = r.imageryProviders[i];
10763
+ const r2 = meta.resourceSets[0].resources[0];
10764
+ this.options.subdomains = r2.imageUrlSubdomains;
10765
+ this._url = r2.imageUrl;
10766
+ if (r2.imageryProviders) {
10767
+ for (let i = 0; i < r2.imageryProviders.length; i++) {
10768
+ const p = r2.imageryProviders[i];
10769
10769
  for (let j = 0; j < p.coverageAreas.length; j++) {
10770
10770
  const c = p.coverageAreas[j];
10771
10771
  const bounds = new L13.LatLngBounds(
@@ -10825,7 +10825,7 @@ var BingLayer = class extends L13.TileLayer {
10825
10825
  };
10826
10826
 
10827
10827
  // src/utils/BingLayer.ts
10828
- var BingLeafletLayer = (0, import_core17.createLayerComponent)(function createBingLayer(_a, context) {
10828
+ var BingLeafletLayer = (0, import_core27.createLayerComponent)(function createBingLayer(_a, context) {
10829
10829
  var _b = _a, { apiKey } = _b, options = __objRest(_b, ["apiKey"]);
10830
10830
  const instance = new BingLayer(apiKey, options);
10831
10831
  return {
@@ -11316,7 +11316,7 @@ var CustomLegend = ({ layer }) => {
11316
11316
  };
11317
11317
 
11318
11318
  // src/Components/Controls/Legend.tsx
11319
- var import_core18 = require("@dnd-kit/core");
11319
+ var import_core28 = require("@dnd-kit/core");
11320
11320
  var import_sortable2 = require("@dnd-kit/sortable");
11321
11321
  var import_utilities = require("@dnd-kit/utilities");
11322
11322
  var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
@@ -11531,12 +11531,12 @@ var Legend = () => {
11531
11531
  const { layers, reorderLayers } = mapLayers_default();
11532
11532
  const [isLoading, setIsLoading] = (0, import_react25.useState)(true);
11533
11533
  const [isOneLegend, setIsOneLegend] = (0, import_react25.useState)(false);
11534
- const sensors = (0, import_core18.useSensors)(
11535
- (0, import_core18.useSensor)(import_core18.PointerSensor),
11536
- (0, import_core18.useSensor)(import_core18.KeyboardSensor, {
11534
+ const sensors = (0, import_core28.useSensors)(
11535
+ (0, import_core28.useSensor)(import_core28.PointerSensor),
11536
+ (0, import_core28.useSensor)(import_core28.KeyboardSensor, {
11537
11537
  coordinateGetter: import_sortable2.sortableKeyboardCoordinates
11538
11538
  }),
11539
- (0, import_core18.useSensor)(import_core18.TouchSensor, {
11539
+ (0, import_core28.useSensor)(import_core28.TouchSensor, {
11540
11540
  activationConstraint: {
11541
11541
  delay: 250,
11542
11542
  tolerance: 10
@@ -11577,10 +11577,10 @@ var Legend = () => {
11577
11577
  return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: " text-base font-medium leading-[120%] max-w-[280px]", children: "There are currently no active layers." });
11578
11578
  }
11579
11579
  return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "max-h-[60vh] overflow-y-auto space-y-3", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
11580
- import_core18.DndContext,
11580
+ import_core28.DndContext,
11581
11581
  {
11582
11582
  sensors,
11583
- collisionDetection: import_core18.closestCenter,
11583
+ collisionDetection: import_core28.closestCenter,
11584
11584
  onDragEnd: isOneLegend ? void 0 : handleDragEnd,
11585
11585
  children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
11586
11586
  import_sortable2.SortableContext,
@@ -11604,8 +11604,8 @@ var Legend = () => {
11604
11604
 
11605
11605
  // src/Components/Controls/CustomBaseLayerControl.tsx
11606
11606
  var import_react26 = require("react");
11607
- var import_image3 = __toESM(require("next/image"));
11608
- var import_core19 = require("@geowiki/core");
11607
+ var import_core29 = require("@geowiki/core");
11608
+ var import_core30 = require("@geowiki/core");
11609
11609
  var import_jsx_runtime45 = require("react/jsx-runtime");
11610
11610
  var BASE_LAYERS = [
11611
11611
  {
@@ -11644,7 +11644,7 @@ var LayerButton = ({
11644
11644
  onClick,
11645
11645
  children: [
11646
11646
  svg ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "relative", children: svg }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
11647
- import_image3.default,
11647
+ import_core29.Image,
11648
11648
  {
11649
11649
  alt: "Base Layer",
11650
11650
  src: link,
@@ -11663,7 +11663,7 @@ var CustomBaseLayerControl = () => {
11663
11663
  const visibleLayers = showAll ? BASE_LAYERS : BASE_LAYERS.slice(0, 3);
11664
11664
  const handleLayerChange = (layerName) => {
11665
11665
  setSelectedLayer(layerName);
11666
- import_core19.trackMapEvent.baseLayerChange(layerName);
11666
+ import_core30.trackMapEvent.baseLayerChange(layerName);
11667
11667
  };
11668
11668
  return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { children: [
11669
11669
  /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "hidden lg:grid lg:grid-cols-4 lg:gap-x-1 lg:gap-y-2", children: [
@@ -11722,7 +11722,7 @@ var CustomBaseLayerControl = () => {
11722
11722
 
11723
11723
  // src/Components/Controls/LayerSwitcher.tsx
11724
11724
  var import_react27 = require("react");
11725
- var import_core20 = require("@geowiki/core");
11725
+ var import_core31 = require("@geowiki/core");
11726
11726
  var import_ui21 = require("@geowiki/ui");
11727
11727
  var import_react28 = require("@headlessui/react");
11728
11728
  var import_react29 = require("react");
@@ -11917,7 +11917,7 @@ var LayerItem = (0, import_react27.memo)(
11917
11917
  );
11918
11918
  LayerItem.displayName = "LayerItem";
11919
11919
  var LayerSwitcher = (0, import_react27.memo)(() => {
11920
- const { data: mapMenuItems, error, isLoading } = (0, import_core20.useMapMenuItems)();
11920
+ const { data: mapMenuItems, error, isLoading } = (0, import_core31.useMapMenuItems)();
11921
11921
  const store = mapLayers_default();
11922
11922
  const { customLayers } = useCustomLayerStore();
11923
11923
  console.log("customLayers from layerSwitcher", customLayers);
@@ -12100,7 +12100,7 @@ var Popover5 = __toESM(require("@radix-ui/react-popover"));
12100
12100
  // src/Components/Controls/ControlComponents.tsx
12101
12101
  var import_react32 = __toESM(require("react"));
12102
12102
  var Popover4 = __toESM(require("@radix-ui/react-popover"));
12103
- var import_core21 = require("@geowiki/core");
12103
+ var import_core32 = require("@geowiki/core");
12104
12104
  var import_jsx_runtime48 = require("react/jsx-runtime");
12105
12105
  var ControlPanel = ({
12106
12106
  title,
@@ -12132,7 +12132,7 @@ var SimpleControlButton = import_react32.default.forwardRef(
12132
12132
  buttonName = "unknown_simple_button"
12133
12133
  }, ref) => {
12134
12134
  const handleClick = (event) => {
12135
- import_core21.trackUserEvent.mapControlClick(
12135
+ import_core32.trackUserEvent.mapControlClick(
12136
12136
  buttonName,
12137
12137
  isActive ? "active" : "inactive"
12138
12138
  );
@@ -12308,7 +12308,7 @@ var ControlItem = (0, import_react35.memo)(({ control, position }) => {
12308
12308
  ] });
12309
12309
  }
12310
12310
  const positionClass = POSITION_CLASSES2[position];
12311
- const getDefaultDirection = () => {
12311
+ const getDefaultDirection2 = () => {
12312
12312
  switch (position) {
12313
12313
  case "topleft":
12314
12314
  case "bottomleft":
@@ -12320,7 +12320,7 @@ var ControlItem = (0, import_react35.memo)(({ control, position }) => {
12320
12320
  return "right";
12321
12321
  }
12322
12322
  };
12323
- const popoverDirection = control.popoverDirection || getDefaultDirection();
12323
+ const popoverDirection = control.popoverDirection || getDefaultDirection2();
12324
12324
  return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
12325
12325
  /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "hidden lg:block", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Popover5.Root, { open: control.isOpen, children: [
12326
12326
  /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_ui24.Tooltip, { delayDuration: 100, children: [
@@ -12435,7 +12435,7 @@ var BasicMap = () => {
12435
12435
  ((_d = (_c = mapSettings == null ? void 0 : mapSettings.LocationPart) == null ? void 0 : _c.Latitude) == null ? void 0 : _d.Text) || 48.2082,
12436
12436
  ((_f = (_e = mapSettings == null ? void 0 : mapSettings.LocationPart) == null ? void 0 : _e.Longitude) == null ? void 0 : _f.Text) || 16.3738
12437
12437
  ];
12438
- (0, import_core22.useRenderInfo)("BasicMap");
12438
+ (0, import_core33.useRenderInfo)("BasicMap");
12439
12439
  if (isSettingsLoading)
12440
12440
  return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_ui25.LoaderFull, {});
12441
12441
  return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_jsx_runtime51.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
@@ -12473,20 +12473,20 @@ var import_useMapSettings2 = __toESM(require("@geowiki/core/src/hooks/useMapSett
12473
12473
  var import_ui33 = require("@geowiki/ui");
12474
12474
 
12475
12475
  // src/Components/Basf/BasfLayerList.tsx
12476
- var import_core24 = require("@geowiki/core");
12476
+ var import_core35 = require("@geowiki/core");
12477
12477
 
12478
12478
  // src/utils/WmsWithFilter.ts
12479
- var import_core23 = require("@react-leaflet/core");
12480
- var WMSWithFilterTileLayer = (0, import_core23.createTileLayerComponent)(
12479
+ var import_core34 = require("@react-leaflet/core");
12480
+ var WMSWithFilterTileLayer = (0, import_core34.createTileLayerComponent)(
12481
12481
  function createWMSTileLayer2(_a, context) {
12482
12482
  var _b = _a, { eventHandlers: _eh, params = {}, url } = _b, props = __objRest(_b, ["eventHandlers", "params", "url"]);
12483
12483
  const layer = new BetterWMS(url, __spreadValues(__spreadProps(__spreadValues({}, params), {
12484
12484
  url
12485
12485
  }), props));
12486
- return (0, import_core23.createElementObject)(layer, context);
12486
+ return (0, import_core34.createElementObject)(layer, context);
12487
12487
  },
12488
12488
  function updateWMSTileLayer2(layer, props, prevProps) {
12489
- (0, import_core23.updateGridLayer)(layer, props, prevProps);
12489
+ (0, import_core34.updateGridLayer)(layer, props, prevProps);
12490
12490
  if (props.params && props.params !== prevProps.params) {
12491
12491
  layer.setParams(props.params);
12492
12492
  }
@@ -12581,7 +12581,7 @@ var BasfMapLayer = (layerInfo) => {
12581
12581
  // src/Components/Basf/BasfLayerList.tsx
12582
12582
  var import_jsx_runtime53 = require("react/jsx-runtime");
12583
12583
  var BasfLayerList = () => {
12584
- const basfStore = (0, import_core24.useBasfStore)();
12584
+ const basfStore = (0, import_core35.useBasfStore)();
12585
12585
  return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { children: basfStore.selectedItems.map((mapItem) => {
12586
12586
  return mapItem.enabled ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(BasfMapLayer, __spreadValues({}, mapItem), mapItem.id) : null;
12587
12587
  }) });
@@ -12626,7 +12626,7 @@ var import_lucide_react4 = require("lucide-react");
12626
12626
  var import_react45 = require("react");
12627
12627
 
12628
12628
  // src/Components/Basf/BasfLegend.tsx
12629
- var import_core25 = require("@geowiki/core");
12629
+ var import_core36 = require("@geowiki/core");
12630
12630
 
12631
12631
  // src/Components/Basf/BasfItemCard.tsx
12632
12632
  var import_ui26 = require("@geowiki/ui");
@@ -12787,10 +12787,10 @@ var formatDisplayValue = (value) => value.replace(/[_-]/g, " ").replace(
12787
12787
  (txt) => txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase()
12788
12788
  );
12789
12789
  var BasfLegend = () => {
12790
- const removeItem = (0, import_core25.useBasfStore)((state) => state.removeItem);
12791
- const updateItemOpacity = (0, import_core25.useBasfStore)((state) => state.updateItemOpacity);
12792
- const updateItemEnabled = (0, import_core25.useBasfStore)((state) => state.updateItemEnabled);
12793
- const selectedItems = (0, import_core25.useBasfStore)((state) => state.selectedItems);
12790
+ const removeItem = (0, import_core36.useBasfStore)((state) => state.removeItem);
12791
+ const updateItemOpacity = (0, import_core36.useBasfStore)((state) => state.updateItemOpacity);
12792
+ const updateItemEnabled = (0, import_core36.useBasfStore)((state) => state.updateItemEnabled);
12793
+ const selectedItems = (0, import_core36.useBasfStore)((state) => state.selectedItems);
12794
12794
  return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
12795
12795
  "div",
12796
12796
  {
@@ -12819,7 +12819,7 @@ var import_react_hook_form3 = require("react-hook-form");
12819
12819
  var z = __toESM(require("zod"));
12820
12820
  var import_uuid3 = require("uuid");
12821
12821
  var import_zod = require("@hookform/resolvers/zod");
12822
- var import_core26 = require("@geowiki/core");
12822
+ var import_core37 = require("@geowiki/core");
12823
12823
 
12824
12824
  // src/Components/Basf/basf-form.tsx
12825
12825
  var import_react42 = require("react");
@@ -13122,8 +13122,8 @@ var BasfSelect = () => {
13122
13122
  const [isSubmitting, setIsSubmitting] = (0, import_react43.useState)(false);
13123
13123
  const { clearData } = useSelectedPixelStore();
13124
13124
  const [isReset, setIsReset] = (0, import_react43.useState)(false);
13125
- const addItem = (0, import_core26.useBasfStore)((0, import_react43.useCallback)((state) => state.addItem, []));
13126
- const selectedItems = (0, import_core26.useBasfStore)(
13125
+ const addItem = (0, import_core37.useBasfStore)((0, import_react43.useCallback)((state) => state.addItem, []));
13126
+ const selectedItems = (0, import_core37.useBasfStore)(
13127
13127
  (0, import_react43.useCallback)((state) => state.selectedItems, [])
13128
13128
  );
13129
13129
  const {
@@ -13269,7 +13269,7 @@ var import_react_leaflet17 = require("react-leaflet");
13269
13269
  var import_leaflet12 = __toESM(require("leaflet"));
13270
13270
  var import_leaflet13 = require("leaflet.polylinemeasure");
13271
13271
  var import_ui31 = require("@geowiki/ui");
13272
- var import_core27 = require("@geowiki/core");
13272
+ var import_core38 = require("@geowiki/core");
13273
13273
  var import_jsx_runtime60 = require("react/jsx-runtime");
13274
13274
  function PolylineMeasureControl() {
13275
13275
  const map = (0, import_react_leaflet17.useMap)();
@@ -13307,18 +13307,18 @@ function PolylineMeasureControl() {
13307
13307
  if (active) {
13308
13308
  controlRef.current._toggleMeasure();
13309
13309
  setActive(false);
13310
- import_core27.trackMapEvent.measurementTool("stop");
13310
+ import_core38.trackMapEvent.measurementTool("stop");
13311
13311
  } else {
13312
13312
  controlRef.current._toggleMeasure();
13313
13313
  setActive(true);
13314
- import_core27.trackMapEvent.measurementTool("start");
13314
+ import_core38.trackMapEvent.measurementTool("start");
13315
13315
  }
13316
13316
  };
13317
13317
  const clearMeasurements = () => {
13318
13318
  if (!controlRef.current)
13319
13319
  return;
13320
13320
  controlRef.current._clearAllMeasurements();
13321
- import_core27.trackMapEvent.measurementTool("clear");
13321
+ import_core38.trackMapEvent.measurementTool("clear");
13322
13322
  };
13323
13323
  return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex gap-2", children: [
13324
13324
  /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_ui31.Button, { onClick: togglePolylineMeasure, children: active ? "Stop" : "Start" }),
@@ -13463,15 +13463,15 @@ var import_react49 = require("react");
13463
13463
  // src/Components/Controls/GeoTreesDownloadContent.tsx
13464
13464
  var import_react47 = require("react");
13465
13465
  var import_react_hook_form4 = require("react-hook-form");
13466
- var import_core28 = require("@geowiki/core");
13467
- var import_core29 = require("@geowiki/core");
13466
+ var import_core39 = require("@geowiki/core");
13467
+ var import_core40 = require("@geowiki/core");
13468
13468
  var import_jsx_runtime63 = require("react/jsx-runtime");
13469
13469
  var GeoTreesDownloadContent = () => {
13470
13470
  var _a, _b;
13471
13471
  const [countries, setCountries] = (0, import_react47.useState)([]);
13472
13472
  const [versions, setVersions] = (0, import_react47.useState)([]);
13473
13473
  const baseUrl = process.env.NEXT_PUBLIC_GEO_TREE_API_URL;
13474
- const { data: session } = (0, import_core28.useSession)();
13474
+ const { data: session } = (0, import_core39.useSession)();
13475
13475
  const {
13476
13476
  register,
13477
13477
  handleSubmit,
@@ -13553,7 +13553,7 @@ var GeoTreesDownloadContent = () => {
13553
13553
  }, [baseUrl, session == null ? void 0 : session.accessToken]);
13554
13554
  const onSubmit = (data) => {
13555
13555
  const { format, purpose, email, name, country, version } = data;
13556
- import_core29.trackDownloadEvent.attempt(
13556
+ import_core40.trackDownloadEvent.attempt(
13557
13557
  format,
13558
13558
  country,
13559
13559
  version,
@@ -13598,10 +13598,10 @@ var GeoTreesDownloadContent = () => {
13598
13598
  link.click();
13599
13599
  document.body.removeChild(link);
13600
13600
  window.URL.revokeObjectURL(url);
13601
- import_core29.trackDownloadEvent.success(filename, purpose, session || void 0);
13601
+ import_core40.trackDownloadEvent.success(filename, purpose, session || void 0);
13602
13602
  }).catch((error) => {
13603
13603
  console.error("Error downloading file:", error);
13604
- import_core29.trackDownloadEvent.failure(
13604
+ import_core40.trackDownloadEvent.failure(
13605
13605
  error.message,
13606
13606
  purpose,
13607
13607
  session || void 0
@@ -13615,8 +13615,8 @@ var GeoTreesDownloadContent = () => {
13615
13615
  "button",
13616
13616
  {
13617
13617
  onClick: () => {
13618
- import_core29.trackDownloadEvent.loginAttempt(session || void 0);
13619
- (0, import_core28.signIn)();
13618
+ import_core40.trackDownloadEvent.loginAttempt(session || void 0);
13619
+ (0, import_core39.signIn)();
13620
13620
  },
13621
13621
  className: "w-full py-2 px-4 bg-blue-500 text-white rounded-md hover:bg-blue-600 transition-colors",
13622
13622
  children: "Login"
@@ -14559,7 +14559,7 @@ var GeoTreesMap = () => {
14559
14559
  var import_leaflet21 = require("leaflet/dist/leaflet.css");
14560
14560
  var import_react58 = require("react");
14561
14561
  var import_react_leaflet27 = require("react-leaflet");
14562
- var import_core30 = require("@geowiki/core");
14562
+ var import_core41 = require("@geowiki/core");
14563
14563
  var import_useMapSettings4 = __toESM(require("@geowiki/core/src/hooks/useMapSettings"));
14564
14564
  var import_ui41 = require("@geowiki/ui");
14565
14565
 
@@ -15819,7 +15819,7 @@ var CanopyMap = () => {
15819
15819
  ((_d = (_c = mapSettings == null ? void 0 : mapSettings.LocationPart) == null ? void 0 : _c.Latitude) == null ? void 0 : _d.Text) || 48.2082,
15820
15820
  ((_f = (_e = mapSettings == null ? void 0 : mapSettings.LocationPart) == null ? void 0 : _e.Longitude) == null ? void 0 : _f.Text) || 16.3738
15821
15821
  ];
15822
- (0, import_core30.useRenderInfo)("BasicMap");
15822
+ (0, import_core41.useRenderInfo)("BasicMap");
15823
15823
  if (isSettingsLoading)
15824
15824
  return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_ui41.LoaderFull, { showInCenter: false });
15825
15825
  return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_jsx_runtime74.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
@@ -15856,7 +15856,7 @@ var import_react_hook_form6 = require("react-hook-form");
15856
15856
  var z3 = __toESM(require("zod"));
15857
15857
  var import_uuid4 = require("uuid");
15858
15858
  var import_zod2 = require("@hookform/resolvers/zod");
15859
- var import_core31 = require("@geowiki/core");
15859
+ var import_core42 = require("@geowiki/core");
15860
15860
  var import_jsx_runtime75 = require("react/jsx-runtime");
15861
15861
  var formSchema2 = z3.object({
15862
15862
  formType: z3.enum(["Biomass", "CropProduction"], {
@@ -15913,14 +15913,14 @@ ForwardedSelect3.displayName = "ForwardedSelect";
15913
15913
  var BasfLeftPanel = () => {
15914
15914
  const [isSubmitting, setIsSubmitting] = (0, import_react59.useState)(false);
15915
15915
  const { clearData } = useSelectedPixelStore();
15916
- const isLeftOverlayOpen = (0, import_core31.useBasfStore)(
15916
+ const isLeftOverlayOpen = (0, import_core42.useBasfStore)(
15917
15917
  (0, import_react59.useCallback)((state) => state.leftPanelOpen, [])
15918
15918
  );
15919
- const setIsLeftOverlayOpen = (0, import_core31.useBasfStore)(
15919
+ const setIsLeftOverlayOpen = (0, import_core42.useBasfStore)(
15920
15920
  (0, import_react59.useCallback)((state) => state.updateLeftPanelOpen, [])
15921
15921
  );
15922
- const addItem = (0, import_core31.useBasfStore)((0, import_react59.useCallback)((state) => state.addItem, []));
15923
- const selectedItems = (0, import_core31.useBasfStore)(
15922
+ const addItem = (0, import_core42.useBasfStore)((0, import_react59.useCallback)((state) => state.addItem, []));
15923
+ const selectedItems = (0, import_core42.useBasfStore)(
15924
15924
  (0, import_react59.useCallback)((state) => state.selectedItems, [])
15925
15925
  );
15926
15926
  const {
@@ -16023,7 +16023,7 @@ var BasfLeftPanel = () => {
16023
16023
  var basf_left_panel_default = (0, import_react59.memo)(BasfLeftPanel);
16024
16024
 
16025
16025
  // src/Components/Basf/basf-right-panel.tsx
16026
- var import_core32 = require("@geowiki/core");
16026
+ var import_core43 = require("@geowiki/core");
16027
16027
  var import_jsx_runtime76 = require("react/jsx-runtime");
16028
16028
 
16029
16029
  // src/Components/Map/GeoWikiMap.tsx
@@ -16031,11 +16031,11 @@ var import_react60 = require("react");
16031
16031
  var import_react_leaflet28 = require("react-leaflet");
16032
16032
  var import_leaflet23 = require("leaflet/dist/leaflet.css");
16033
16033
  var import_dist = require("@bopen/leaflet-area-selection/dist/index.css");
16034
- var import_core34 = require("@geowiki/core");
16034
+ var import_core45 = require("@geowiki/core");
16035
16035
  var import_ui43 = require("@geowiki/ui");
16036
16036
 
16037
16037
  // ../../apps/geowiki/components/Map/CustomWMS.tsx
16038
- var import_core33 = require("@react-leaflet/core");
16038
+ var import_core44 = require("@react-leaflet/core");
16039
16039
 
16040
16040
  // ../../apps/geowiki/lib/utils/BetterWMS.ts
16041
16041
  var import_leaflet22 = __toESM(require("leaflet"));
@@ -16164,19 +16164,19 @@ var BetterWMS2 = class extends import_leaflet22.default.TileLayer.WMS {
16164
16164
  };
16165
16165
 
16166
16166
  // ../../apps/geowiki/components/Map/CustomWMS.tsx
16167
- var CustomWMSTileLayer2 = (0, import_core33.createTileLayerComponent)(
16167
+ var CustomWMSTileLayer2 = (0, import_core44.createTileLayerComponent)(
16168
16168
  function createWMSTileLayer3(_a, context) {
16169
16169
  var _b = _a, { params = {}, url } = _b, options = __objRest(_b, ["params", "url"]);
16170
16170
  var instance = new BetterWMS2(url, __spreadValues(__spreadProps(__spreadValues({}, params), {
16171
16171
  url
16172
- }), (0, import_core33.withPane)(options, context)));
16172
+ }), (0, import_core44.withPane)(options, context)));
16173
16173
  return {
16174
16174
  instance,
16175
16175
  context
16176
16176
  };
16177
16177
  },
16178
16178
  function updateWMSTileLayer3(layer, props, prevProps) {
16179
- (0, import_core33.updateGridLayer)(layer, props, prevProps);
16179
+ (0, import_core44.updateGridLayer)(layer, props, prevProps);
16180
16180
  if (props.params != null && props.params !== prevProps.params) {
16181
16181
  layer.setParams(props.params);
16182
16182
  }
@@ -16184,26 +16184,26 @@ var CustomWMSTileLayer2 = (0, import_core33.createTileLayerComponent)(
16184
16184
  );
16185
16185
 
16186
16186
  // src/Components/Map/GeoWikiMap.tsx
16187
- var import_router5 = require("next/router");
16187
+ var import_core46 = require("@geowiki/core");
16188
16188
  var import_react_hotkeys_hook3 = require("react-hotkeys-hook");
16189
16189
  var import_jsx_runtime77 = require("react/jsx-runtime");
16190
16190
  var GeoWikiMapComponent = ({ mapSettings, session }) => {
16191
16191
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
16192
16192
  const mapRef = (0, import_react60.useRef)();
16193
- const router = (0, import_router5.useRouter)();
16193
+ const router = (0, import_core46.useRouter)();
16194
16194
  var projectId = router.query.projectId;
16195
16195
  var locationId = router.query.locationId;
16196
16196
  var taskId = router.query.taskId !== void 0 ? parseInt(router.query.taskId) : 0;
16197
16197
  const layerStore = useMapLayerStore();
16198
16198
  const mapStore = useMapStore();
16199
16199
  const evolandStore = useEvolandStore();
16200
- const panelStore = (0, import_core34.usePanelStore)();
16201
- const evolandFeature = (0, import_core34.useFeature)("GeoWiki.EvoLand");
16202
- var userRole = (0, import_core34.tokenData)((_a = session.data) == null ? void 0 : _a.accessToken, "role");
16203
- var userId = (0, import_core34.tokenData)((_b = session.data) == null ? void 0 : _b.accessToken, "sub");
16204
- const { data: wmsLayerNames } = (0, import_core34.useEvolandWmsLayers)();
16205
- const { data: geoWikiSettings } = (0, import_core34.useGeoWikiSettings)();
16206
- const { data: introTourSteps } = (0, import_core34.useIntroTourSettings)();
16200
+ const panelStore = (0, import_core45.usePanelStore)();
16201
+ const evolandFeature = (0, import_core45.useFeature)("GeoWiki.EvoLand");
16202
+ var userRole = (0, import_core45.tokenData)((_a = session.data) == null ? void 0 : _a.accessToken, "role");
16203
+ var userId = (0, import_core45.tokenData)((_b = session.data) == null ? void 0 : _b.accessToken, "sub");
16204
+ const { data: wmsLayerNames } = (0, import_core45.useEvolandWmsLayers)();
16205
+ const { data: geoWikiSettings } = (0, import_core45.useGeoWikiSettings)();
16206
+ const { data: introTourSteps } = (0, import_core45.useIntroTourSettings)();
16207
16207
  const [showAsset, setShowAsset] = (0, import_react60.useState)(false);
16208
16208
  const [fetchLocationMetaData, setFetchLocationMetaData] = (0, import_react60.useState)(false);
16209
16209
  const [defaultActivityView, setDefaultActivityView] = (0, import_react60.useState)("");
@@ -16213,7 +16213,7 @@ var GeoWikiMapComponent = ({ mapSettings, session }) => {
16213
16213
  ((_f = (_e = mapSettings == null ? void 0 : mapSettings.LocationPart) == null ? void 0 : _e.Latitude) == null ? void 0 : _f.Text) || 48.2082,
16214
16214
  ((_h = (_g = mapSettings == null ? void 0 : mapSettings.LocationPart) == null ? void 0 : _g.Longitude) == null ? void 0 : _h.Text) || 16.3738
16215
16215
  ];
16216
- (0, import_core34.useRenderInfo)("GeoWikiMap");
16216
+ (0, import_core45.useRenderInfo)("GeoWikiMap");
16217
16217
  if (!fetchLocationMetaData && (evolandStore.referenceDate || evolandStore.reference_dates)) {
16218
16218
  evolandStore.getLocationMetaData(locationId, parseInt(projectId), taskId);
16219
16219
  setFetchLocationMetaData(true);
@@ -16269,7 +16269,7 @@ var GeoWikiMapComponent = ({ mapSettings, session }) => {
16269
16269
  };
16270
16270
  (0, import_react60.useEffect)(() => {
16271
16271
  var _a2;
16272
- if ((0, import_core34.IsTokenExpired)((_a2 = session.data) == null ? void 0 : _a2.expires)) {
16272
+ if ((0, import_core45.IsTokenExpired)((_a2 = session.data) == null ? void 0 : _a2.expires)) {
16273
16273
  evolandStore.setSessionTimeOut(true);
16274
16274
  }
16275
16275
  }, [evolandStore.sessionTimeOut, (_l = session.data) == null ? void 0 : _l.expires]);
@@ -16292,7 +16292,7 @@ var GeoWikiMapComponent = ({ mapSettings, session }) => {
16292
16292
  {
16293
16293
  variant: "outline",
16294
16294
  className: "flex ml-20",
16295
- onClick: () => (0, import_core34.showIntroTour)(selectIntroTourSteps()),
16295
+ onClick: () => (0, import_core45.showIntroTour)(selectIntroTourSteps()),
16296
16296
  children: "Guide"
16297
16297
  }
16298
16298
  ) }),
@@ -16576,15 +16576,15 @@ var GeoWikiMap = (0, import_react60.memo)(GeoWikiMapComponent);
16576
16576
  // src/Components/Map/WaybackTimelineMap.tsx
16577
16577
  var import_react61 = require("react");
16578
16578
  var import_react_leaflet29 = require("react-leaflet");
16579
- var import_core35 = require("@geowiki/core");
16580
- var import_navigation3 = require("next/navigation");
16579
+ var import_core47 = require("@geowiki/core");
16580
+ var import_core48 = require("@geowiki/core");
16581
16581
  var import_jsx_runtime78 = require("react/jsx-runtime");
16582
16582
  var WaybackTimelineMap = (props) => {
16583
16583
  var _a;
16584
16584
  const mapRef = (0, import_react61.useRef)(null);
16585
- const searchParams = (0, import_navigation3.useSearchParams)();
16585
+ const searchParams = (0, import_core48.useSearchParams)();
16586
16586
  var center4 = [48.2082, 16.3738];
16587
- (0, import_core35.useRenderInfo)("WaybackTimelineMap");
16587
+ (0, import_core47.useRenderInfo)("WaybackTimelineMap");
16588
16588
  const [WAYBACK_SNAPSHOTS, setWAYBACK_SNAPSHOTS] = (0, import_react61.useState)(null);
16589
16589
  function MapZoomEvents() {
16590
16590
  const mapEvents = (0, import_react_leaflet29.useMapEvents)({
@@ -16676,166 +16676,3330 @@ var WaybackTimelineMap = (props) => {
16676
16676
  };
16677
16677
 
16678
16678
  // src/Components/Map/MapLibre.tsx
16679
- var import_react62 = require("react");
16680
- var import_react63 = require("react");
16679
+ var import_react66 = require("react");
16680
+ var import_react67 = require("react");
16681
16681
  var import_maplibre_gl = __toESM(require("maplibre-gl"));
16682
16682
  var import_MapPinIcon4 = __toESM(require("@heroicons/react/24/solid/MapPinIcon"));
16683
16683
  var import_server8 = require("react-dom/server");
16684
- var import_jsx_runtime79 = require("react/jsx-runtime");
16685
- var MapLibre = (0, import_react63.forwardRef)(({ baseLayers, customLayers, mapControls, sourceData }, ref) => {
16686
- const mapContainer = ref;
16687
- const mapRef = (0, import_react62.useRef)(null);
16688
- console.log(customLayers);
16689
- const changeMapProjection = () => {
16684
+
16685
+ // src/Components/Generic/Map/LayerSwitcher.tsx
16686
+ var import_react62 = require("react");
16687
+ var import_ui44 = require("@geowiki/ui");
16688
+
16689
+ // src/Components/Generic/Map/store/mapLayers.ts
16690
+ var import_zustand9 = require("zustand");
16691
+ var import_sortable3 = require("@dnd-kit/sortable");
16692
+ var useMapLayerStore2 = (0, import_zustand9.create)()((set, get) => ({
16693
+ layers: [],
16694
+ add: (layer) => {
16690
16695
  var _a;
16691
- if (!mapRef.current)
16692
- return;
16693
- const map = mapRef.current;
16694
- const currentProjection = (_a = map.getProjection()) == null ? void 0 : _a.type;
16695
- const newProjection = currentProjection === "mercator" ? "globe" : "mercator";
16696
- map.setProjection({
16697
- type: newProjection
16698
- });
16699
- };
16700
- (0, import_react62.useEffect)(() => {
16701
- if (typeof mapContainer === "function")
16702
- return;
16703
- if (!(mapContainer == null ? void 0 : mapContainer.current))
16704
- return;
16705
- if (!sourceData)
16706
- return;
16707
- const map = new import_maplibre_gl.default.Map({
16708
- container: mapContainer == null ? void 0 : mapContainer.current,
16709
- style: {
16710
- version: 8,
16711
- sources: {
16712
- osm: {
16713
- type: "raster",
16714
- tiles: ["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png"],
16715
- tileSize: 256,
16716
- attribution: "&copy; OpenStreetMap Contributors",
16717
- maxzoom: 19
16718
- }
16719
- },
16720
- layers: [
16721
- {
16722
- id: "osm",
16723
- type: "raster",
16724
- source: "osm"
16725
- }
16726
- ],
16727
- sky: {}
16728
- },
16729
- center: [16.3713, 48.2081],
16730
- zoom: 3,
16731
- minZoom: 1.5,
16732
- renderWorldCopies: false,
16733
- canvasContextAttributes: { antialias: true }
16734
- });
16735
- mapRef.current = map;
16736
- map.scrollZoom.disable();
16737
- mapRef.current.getContainer().addEventListener("mouseenter", () => map.scrollZoom.enable());
16738
- mapRef.current.getContainer().addEventListener("mouseleave", () => map.scrollZoom.disable());
16739
- function loadSvgImage() {
16740
- return __async(this, null, function* () {
16741
- let svgText = (0, import_server8.renderToStaticMarkup)(
16742
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_MapPinIcon4.default, { className: "w-6 h-6" })
16696
+ if (layer.id === "geotrees-external-layer" || layer.title === "GEO-TREES Sites" || ((_a = layer.layerInfo) == null ? void 0 : _a.source) === "GeoTrees External API") {
16697
+ const existingGeoTreesLayer = get().layers.find(
16698
+ (existingLayer) => {
16699
+ var _a2;
16700
+ return existingLayer.id === "geotrees-external-layer" || existingLayer.title === "GEO-TREES Sites" || ((_a2 = existingLayer.layerInfo) == null ? void 0 : _a2.source) === "GeoTrees External API";
16701
+ }
16702
+ );
16703
+ if (existingGeoTreesLayer) {
16704
+ console.warn(
16705
+ "GeoTrees External layer already exists in map store, preventing duplicate addition"
16743
16706
  );
16744
- svgText = svgText.replace('fill="currentColor"', 'fill="#06b6d4"');
16745
- const img = new Image();
16746
- img.src = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(svgText);
16747
- img.width = 35;
16748
- img.height = 35;
16749
- yield img.decode();
16750
- return img;
16751
- });
16707
+ return;
16708
+ }
16752
16709
  }
16753
- map.on("load", () => __async(void 0, null, function* () {
16754
- changeMapProjection();
16755
- baseLayers == null ? void 0 : baseLayers.forEach((layer) => {
16756
- map.addSource(layer.name, {
16757
- type: layer.type,
16758
- url: layer.url,
16759
- tileSize: layer.tileSize
16710
+ set((state) => {
16711
+ const layersWithName = state.layers.filter((l) => l == null ? void 0 : l.layerName);
16712
+ const layersWithoutName = state.layers.filter((l) => !(l == null ? void 0 : l.layerName));
16713
+ if (layer.layerName) {
16714
+ const insertIndex = layersWithName.findIndex(
16715
+ (l) => {
16716
+ var _a2, _b, _c, _d;
16717
+ return ((_b = (_a2 = l.order) != null ? _a2 : l.index) != null ? _b : 0) > ((_d = (_c = layer.order) != null ? _c : layer.index) != null ? _d : 0);
16718
+ }
16719
+ );
16720
+ const updatedLayersWithName = insertIndex === -1 ? [...layersWithName, layer] : [
16721
+ ...layersWithName.slice(0, insertIndex),
16722
+ layer,
16723
+ ...layersWithName.slice(insertIndex)
16724
+ ];
16725
+ updatedLayersWithName.forEach((l, idx) => {
16726
+ l.index = updatedLayersWithName.length + layersWithoutName.length - idx;
16760
16727
  });
16761
- if (layer.layer_type == "terrainSource")
16762
- map.setTerrain({
16763
- source: "terrainSource",
16764
- exaggeration: 1
16765
- });
16766
- if (layer.layer_type == "hillshade")
16767
- map.addLayer({
16768
- id: layer.name,
16769
- type: layer.layer_type,
16770
- source: layer.name,
16771
- paint: { "hillshade-shadow-color": "#473B24" },
16772
- layout: { visibility: "visible" }
16773
- });
16774
- });
16775
- sourceData == null ? void 0 : sourceData.forEach((source) => __async(void 0, null, function* () {
16776
- if (source.is_cluster) {
16777
- map.addSource(source.name, {
16778
- type: source.type,
16779
- data: source.data,
16780
- cluster: true,
16781
- clusterMaxZoom: 10,
16782
- clusterRadius: 50
16783
- });
16784
- }
16785
- if (source.show_cluster_count) {
16786
- map.addLayer({
16787
- id: `${source.name}-cluster-circles`,
16788
- type: "circle",
16789
- source: source.name,
16790
- filter: ["has", "point_count"],
16791
- paint: {
16792
- "circle-color": source.style.cluster_color,
16793
- "circle-opacity": 1,
16794
- "circle-radius": 20,
16795
- "circle-stroke-width": 4,
16796
- "circle-stroke-color": source.style.cluster_stroke_color
16797
- }
16798
- });
16799
- map.addLayer({
16800
- id: `${source.name}-cluster-count`,
16801
- type: "symbol",
16802
- source: source.name,
16803
- filter: ["has", "point_count"],
16804
- layout: {
16805
- "text-field": "{point_count_abbreviated}",
16806
- "text-font": ["Open Sans Bold"],
16807
- "text-size": 14
16808
- },
16809
- paint: {
16810
- "text-color": "#f7f2f2"
16811
- }
16812
- });
16813
- if (!map.hasImage("pin")) {
16814
- const img = yield loadSvgImage();
16815
- map.addImage("pin", img);
16728
+ layersWithoutName.forEach((l, idx) => {
16729
+ l.index = layersWithoutName.length - idx;
16730
+ });
16731
+ const newState = {
16732
+ layers: [...updatedLayersWithName, ...layersWithoutName]
16733
+ };
16734
+ return newState;
16735
+ } else {
16736
+ const insertIndex = layersWithoutName.findIndex(
16737
+ (l) => {
16738
+ var _a2, _b, _c, _d;
16739
+ return ((_b = (_a2 = l.order) != null ? _a2 : l.index) != null ? _b : 0) > ((_d = (_c = layer.order) != null ? _c : layer.index) != null ? _d : 0);
16816
16740
  }
16817
- map.addLayer({
16818
- id: source.name + "-count",
16819
- type: "symbol",
16820
- source: source.name,
16821
- filter: ["!", ["has", "point_count"]],
16822
- layout: {
16823
- "icon-image": "pin",
16824
- "icon-size": 1,
16825
- "icon-allow-overlap": true,
16826
- "icon-anchor": "bottom"
16827
- }
16828
- });
16829
- }
16830
- }));
16831
- }));
16832
- return () => {
16833
- map.remove();
16834
- };
16835
- }, [sourceData, mapControls]);
16836
- if (!sourceData)
16837
- return;
16838
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "relative", style: { width: "100%", height: "100vh" }, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { ref: mapContainer, className: "w-full h-full" }) });
16741
+ );
16742
+ const updatedLayersWithoutName = insertIndex === -1 ? [...layersWithoutName, layer] : [
16743
+ ...layersWithoutName.slice(0, insertIndex),
16744
+ layer,
16745
+ ...layersWithoutName.slice(insertIndex)
16746
+ ];
16747
+ updatedLayersWithoutName.forEach((l, idx) => {
16748
+ l.index = updatedLayersWithoutName.length - idx;
16749
+ });
16750
+ layersWithName.forEach((l, idx) => {
16751
+ l.index = layersWithName.length + updatedLayersWithoutName.length - idx;
16752
+ });
16753
+ const newState = {
16754
+ layers: [...layersWithName, ...updatedLayersWithoutName]
16755
+ };
16756
+ console.log(
16757
+ "MapLayerStore: New state with unnamed layer:",
16758
+ newState.layers.length
16759
+ );
16760
+ return newState;
16761
+ }
16762
+ });
16763
+ },
16764
+ remove: (layer) => set((state) => {
16765
+ return { layers: state.layers.filter((l) => l.id !== layer.id) };
16766
+ }),
16767
+ updateOpacity: (id, opacity) => set((state) => {
16768
+ var index = state.layers.findIndex((l) => l.id === id);
16769
+ if (index > -1) {
16770
+ state.layers[index].opacity = opacity;
16771
+ }
16772
+ return { layers: state.layers };
16773
+ }),
16774
+ updateLayer: (id, updates) => set((state) => {
16775
+ var index = state.layers.findIndex((l) => l.id === id);
16776
+ if (index > -1) {
16777
+ state.layers[index] = __spreadValues(__spreadValues({}, state.layers[index]), updates);
16778
+ }
16779
+ return { layers: state.layers };
16780
+ }),
16781
+ reorderLayers: (oldIndex, newIndex) => set((state) => {
16782
+ const newLayers = [...state.layers];
16783
+ const layersWithoutName = newLayers.filter((layer) => !(layer == null ? void 0 : layer.layerName));
16784
+ const layersToReorder = newLayers.filter((layer) => layer == null ? void 0 : layer.layerName);
16785
+ const reorderedLayers = (0, import_sortable3.arrayMove)(layersToReorder, oldIndex, newIndex);
16786
+ reorderedLayers.forEach((layer, idx) => {
16787
+ layer.index = reorderedLayers.length + layersWithoutName.length - idx;
16788
+ });
16789
+ layersWithoutName.forEach((layer, idx) => {
16790
+ layer.index = layersWithoutName.length - idx;
16791
+ });
16792
+ const resultLayers = [...reorderedLayers, ...layersWithoutName];
16793
+ return { layers: resultLayers };
16794
+ }),
16795
+ refresh: () => set((state) => {
16796
+ return { layers: state.layers };
16797
+ }),
16798
+ selectedLayer: "",
16799
+ setSelectedLayer: (selectedLayer) => set({ selectedLayer }),
16800
+ layerOpacity: 0,
16801
+ setLayerOpacity: (layerOpacity) => set({ layerOpacity })
16802
+ }));
16803
+
16804
+ // src/Components/Generic/Map/LayerSwitcher.tsx
16805
+ var import_react63 = require("@headlessui/react");
16806
+ var import_react64 = require("react");
16807
+ var import_outline2 = require("@heroicons/react/24/outline");
16808
+ var import_react65 = require("@headlessui/react");
16809
+ var import_lucide_react9 = require("lucide-react");
16810
+ var import_uuid5 = require("uuid");
16811
+ var import_jsx_runtime79 = require("react/jsx-runtime");
16812
+ var LayerInfoIcon2 = (0, import_react62.memo)(({ onClick }) => /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
16813
+ "svg",
16814
+ {
16815
+ width: "20",
16816
+ height: "20",
16817
+ viewBox: "0 0 20 20",
16818
+ fill: "none",
16819
+ xmlns: "http://www.w3.org/2000/svg",
16820
+ className: "fill-tag-light-purple cursor-pointer",
16821
+ onClick,
16822
+ role: "button",
16823
+ "aria-label": "Show layer information",
16824
+ children: [
16825
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("circle", { cx: "10", cy: "10", r: "10", fill: "text-tag-light-purple" }),
16826
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
16827
+ "path",
16828
+ {
16829
+ d: "M9.24963 14V7.592H10.7496V14H9.24963ZM10.0056 6.536C9.72563 6.536 9.49363 6.448 9.30963 6.272C9.13363 6.096 9.04563 5.884 9.04563 5.636C9.04563 5.38 9.13363 5.168 9.30963 5C9.49363 4.824 9.72563 4.736 10.0056 4.736C10.2856 4.736 10.5136 4.82 10.6896 4.988C10.8736 5.148 10.9656 5.352 10.9656 5.6C10.9656 5.864 10.8776 6.088 10.7016 6.272C10.5256 6.448 10.2936 6.536 10.0056 6.536Z",
16830
+ fill: "white"
16831
+ }
16832
+ )
16833
+ ]
16834
+ }
16835
+ ));
16836
+ LayerInfoIcon2.displayName = "LayerInfoIcon";
16837
+ var LayerItemInfo2 = (0, import_react62.memo)(({ layer, open, setOpen }) => {
16838
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
16839
+ const isCustomLayer = "isCustom" in layer && layer.isCustom;
16840
+ const mapDetails = [
16841
+ {
16842
+ label: "Source",
16843
+ value: ((_b = (_a = layer.layerInfo) == null ? void 0 : _a.sourceLink) == null ? void 0 : _b.href) ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
16844
+ import_ui44.SimpleLink,
16845
+ {
16846
+ link: {
16847
+ title: (_c = layer.layerInfo.sourceLink.name) != null ? _c : "",
16848
+ href: (_d = layer.layerInfo.sourceLink.href) != null ? _d : "#",
16849
+ isNewTab: !((_e = layer.layerInfo.sourceLink.href) == null ? void 0 : _e.startsWith("/"))
16850
+ }
16851
+ }
16852
+ ) : ((_f = layer.layerInfo) == null ? void 0 : _f.source) || (isCustomLayer ? "Custom Layer" : void 0)
16853
+ },
16854
+ {
16855
+ label: "Geographic Coverage",
16856
+ value: (_g = layer.layerInfo) == null ? void 0 : _g.geographicCoverage
16857
+ },
16858
+ {
16859
+ label: "Citation",
16860
+ value: ((_i = (_h = layer.layerInfo) == null ? void 0 : _h.citationLink) == null ? void 0 : _i.href) ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
16861
+ import_ui44.SimpleLink,
16862
+ {
16863
+ link: {
16864
+ title: (_j = layer.layerInfo.citationLink.name) != null ? _j : "",
16865
+ href: (_k = layer.layerInfo.citationLink.href) != null ? _k : "#",
16866
+ isNewTab: !((_l = layer.layerInfo.citationLink.href) == null ? void 0 : _l.startsWith("/"))
16867
+ }
16868
+ }
16869
+ ) : (_m = layer.layerInfo) == null ? void 0 : _m.citation
16870
+ },
16871
+ ...isCustomLayer ? [
16872
+ { label: "Layer Type", value: layer.type },
16873
+ { label: "Custom Layer", value: "Yes" }
16874
+ ] : []
16875
+ ];
16876
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react63.Transition.Root, { show: open, as: import_react64.Fragment, "data-component": "ResourceView", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_react63.Dialog, { as: "div", className: "relative z-20", onClose: setOpen, children: [
16877
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
16878
+ import_react63.Transition.Child,
16879
+ {
16880
+ as: import_react64.Fragment,
16881
+ enter: "ease-out duration-300",
16882
+ enterFrom: "opacity-0",
16883
+ enterTo: "opacity-100",
16884
+ leave: "ease-in duration-200",
16885
+ leaveFrom: "opacity-100",
16886
+ leaveTo: "opacity-0",
16887
+ children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" })
16888
+ }
16889
+ ),
16890
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "fixed z-10 inset-0 overflow-y-auto text-black", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "flex items-end sm:items-center justify-center min-h-full text-center lg:p-4", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
16891
+ import_react63.Transition.Child,
16892
+ {
16893
+ as: import_react64.Fragment,
16894
+ enter: "ease-out duration-300",
16895
+ enterFrom: "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
16896
+ enterTo: "opacity-100 translate-y-0 sm:scale-100",
16897
+ leave: "ease-in duration-200",
16898
+ leaveFrom: "opacity-100 translate-y-0 sm:scale-100",
16899
+ leaveTo: "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
16900
+ children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_react63.Dialog.Panel, { className: "w-screen relative bg-white rounded-t-lg px-4 pt-5 pb-4 text-left overflow-hidden shadow-xl transform transition-all lg:rounded-lg sm:my-8 sm:w-[740px] sm:p-10", children: [
16901
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "absolute top-0 right-0 pt-3 pr-3 lg:pt-10 lg:pr-10", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
16902
+ "button",
16903
+ {
16904
+ type: "button",
16905
+ className: "rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2",
16906
+ onClick: () => setOpen(false),
16907
+ children: [
16908
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "sr-only", children: "Close" }),
16909
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_outline2.XMarkIcon, { className: "h-6 w-6", "aria-hidden": "true" })
16910
+ ]
16911
+ }
16912
+ ) }),
16913
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "flex flex-col items-start justify-center", children: [
16914
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "text-lg font-semibold lg:text-[2rem] lg:font-light leading-[120%]", children: layer.title }),
16915
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "w-full pt-6 space-y-4 text-grey leading-[130%]", children: [
16916
+ ((_n = layer.layerInfo) == null ? void 0 : _n.overview) && /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
16917
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "uppercase text-sm", children: "Overview" }),
16918
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "text-sm lg:text-base font-normal", children: (_o = layer.layerInfo) == null ? void 0 : _o.overview })
16919
+ ] }),
16920
+ mapDetails.map(
16921
+ (detail) => detail.value && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
16922
+ import_ui44.KeyInfoItem,
16923
+ {
16924
+ label: detail.label,
16925
+ value: detail.value
16926
+ },
16927
+ (0, import_uuid5.v4)()
16928
+ )
16929
+ )
16930
+ ] })
16931
+ ] })
16932
+ ] })
16933
+ }
16934
+ ) }) })
16935
+ ] }) });
16936
+ });
16937
+ LayerItemInfo2.displayName = "LayerItemInfo";
16938
+ var LayerItem2 = (0, import_react62.memo)(
16939
+ ({
16940
+ layer,
16941
+ isActive,
16942
+ onToggle,
16943
+ openHoverCardId,
16944
+ onInfoClick
16945
+ }) => {
16946
+ var _a;
16947
+ const [open, setOpen] = (0, import_react62.useState)(false);
16948
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("li", { className: "bg-white rounded-xl p-4 lg:w-[310px] lg:p-0", children: [
16949
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "flex flex-row justify-between items-center", children: [
16950
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "flex flex-row justify-start items-center space-x-2", children: [
16951
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "hidden lg:block", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
16952
+ import_ui44.Switch,
16953
+ {
16954
+ checked: isActive,
16955
+ onCheckedChange: onToggle,
16956
+ "aria-label": `Toggle ${layer.title} layer`
16957
+ }
16958
+ ) }),
16959
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: " text-base font-medium leading-[120%] break-words max-w-[210px] lg:max-w-none md:max-w-none", children: layer.title }),
16960
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "block lg:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(LayerInfoIcon2, { onClick: () => setOpen(true) }) })
16961
+ ] }),
16962
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "block lg:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
16963
+ import_ui44.Switch,
16964
+ {
16965
+ checked: isActive,
16966
+ onCheckedChange: onToggle,
16967
+ "aria-label": `Toggle ${layer.title} layer`
16968
+ }
16969
+ ) }),
16970
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "hidden lg:block", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
16971
+ import_ui44.HoverCard,
16972
+ {
16973
+ open: openHoverCardId === layer.id,
16974
+ onOpenChange: () => onInfoClick(layer.id),
16975
+ children: [
16976
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_ui44.HoverCardTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
16977
+ "div",
16978
+ {
16979
+ onClick: () => onInfoClick(layer.id),
16980
+ className: "cursor-pointer",
16981
+ children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(LayerInfoIcon2, { onClick: () => setOpen(true) })
16982
+ }
16983
+ ) }),
16984
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_ui44.HoverCardContent, { className: "w-80 rounded-2xl ", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "space-y-1", children: [
16985
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("h4", { className: "text-sm font-semibold", children: layer.title }),
16986
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("p", { className: "text-sm text-grey", children: ((_a = layer.layerInfo) == null ? void 0 : _a.hoverCardText) || "" })
16987
+ ] }) })
16988
+ ]
16989
+ }
16990
+ ) })
16991
+ ] }),
16992
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(LayerItemInfo2, { layer, open, setOpen })
16993
+ ] });
16994
+ }
16995
+ );
16996
+ LayerItem2.displayName = "LayerItem";
16997
+ var LayerSwitcher2 = (0, import_react62.memo)(({ mapMenuItems, customLayers }) => {
16998
+ const store = useMapLayerStore2();
16999
+ const [openHoverCardId, setOpenHoverCardId] = (0, import_react62.useState)(null);
17000
+ (0, import_react62.useEffect)(() => {
17001
+ if (store.layers.length == 0 && customLayers.length > 0)
17002
+ customLayers.map((layer) => store.add(layer));
17003
+ }, []);
17004
+ const handleToggle = (0, import_react62.useCallback)(
17005
+ (layer) => {
17006
+ store.layers.findIndex((l) => l.id === layer.id) !== -1 ? store.remove(layer) : store.add(layer);
17007
+ },
17008
+ [store]
17009
+ );
17010
+ const handleInfoClick = (0, import_react62.useCallback)(
17011
+ (id) => {
17012
+ setOpenHoverCardId(openHoverCardId === id ? null : id);
17013
+ },
17014
+ [openHoverCardId]
17015
+ );
17016
+ const hasRegularLayers = (mapMenuItems == null ? void 0 : mapMenuItems.length) > 0;
17017
+ const hasCustomLayers = customLayers.length > 0;
17018
+ if (!hasRegularLayers && !hasCustomLayers) {
17019
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { children: "No map layers available" });
17020
+ }
17021
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "lg:max-h-[calc(100dvh-15rem)] overflow-y-auto pr-1", children: mapMenuItems == null ? void 0 : mapMenuItems.map((menu, index) => {
17022
+ var _a;
17023
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { children: [
17024
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "hidden lg:block", children: [
17025
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
17026
+ import_react65.Disclosure,
17027
+ {
17028
+ "data-component": menu.title,
17029
+ defaultOpen: mapMenuItems.length === 1,
17030
+ children: ({ open }) => {
17031
+ var _a2;
17032
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
17033
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_react65.Disclosure.Button, { className: "w-[310px] flex-row flex justify-between items-center gap-2 border-zinc-300 ", children: [
17034
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "text-sm font-normal uppercase text-grey leading-[130%]", children: menu.title }),
17035
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
17036
+ import_lucide_react9.ChevronDown,
17037
+ {
17038
+ className: ` ${open ? "rotate-180 transform" : ""} h-7 w-7 `,
17039
+ stroke: "grey"
17040
+ }
17041
+ )
17042
+ ] }),
17043
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react65.Disclosure.Panel, { className: "space-y-2", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("ul", { className: "pt-2 space-y-2", children: [
17044
+ index === 0 && hasCustomLayers && customLayers.map((layer) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
17045
+ LayerItem2,
17046
+ {
17047
+ layer,
17048
+ isActive: store.layers.findIndex(
17049
+ (l) => l.id === layer.id
17050
+ ) !== -1,
17051
+ onToggle: () => {
17052
+ handleToggle(layer);
17053
+ if (layer.ontoggle)
17054
+ layer.ontoggle();
17055
+ },
17056
+ openHoverCardId,
17057
+ onInfoClick: handleInfoClick
17058
+ },
17059
+ layer.id
17060
+ )),
17061
+ (_a2 = menu.subMenus) == null ? void 0 : _a2.map((layer) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
17062
+ LayerItem2,
17063
+ {
17064
+ layer,
17065
+ isActive: store.layers.findIndex(
17066
+ (l) => l.id === layer.id
17067
+ ) !== -1,
17068
+ onToggle: () => handleToggle(layer),
17069
+ openHoverCardId,
17070
+ onInfoClick: handleInfoClick
17071
+ },
17072
+ layer.id
17073
+ ))
17074
+ ] }) }) })
17075
+ ] });
17076
+ }
17077
+ }
17078
+ ),
17079
+ index !== mapMenuItems.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "my-4 h-px bg-grey-light" })
17080
+ ] }),
17081
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "block lg:hidden px-5 pt-6", children: [
17082
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "text-sm font-normal uppercase text-grey leading-[130%]", children: menu.title }),
17083
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "space-y-2", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("ul", { className: "pt-2 space-y-2", children: [
17084
+ index === 0 && hasCustomLayers && customLayers.map((layer) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
17085
+ LayerItem2,
17086
+ {
17087
+ layer,
17088
+ isActive: store.layers.findIndex((l) => l.id === layer.id) !== -1,
17089
+ onToggle: () => handleToggle(layer),
17090
+ openHoverCardId,
17091
+ onInfoClick: handleInfoClick
17092
+ },
17093
+ layer.id
17094
+ )),
17095
+ (_a = menu.subMenus) == null ? void 0 : _a.map((layer) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
17096
+ LayerItem2,
17097
+ {
17098
+ layer,
17099
+ isActive: store.layers.findIndex((l) => l.id === layer.id) !== -1,
17100
+ onToggle: () => handleToggle(layer),
17101
+ openHoverCardId,
17102
+ onInfoClick: handleInfoClick
17103
+ },
17104
+ layer.id
17105
+ ))
17106
+ ] }) })
17107
+ ] })
17108
+ ] }, menu.id);
17109
+ }) });
17110
+ });
17111
+ LayerSwitcher2.displayName = "LayerSwitcher";
17112
+
17113
+ // src/Components/Generic/Map/MapControlToolbar.tsx
17114
+ var Popover7 = __toESM(require("@radix-ui/react-popover"));
17115
+ var import_ui45 = require("@geowiki/ui");
17116
+
17117
+ // ../../node_modules/clsx/dist/clsx.m.js
17118
+ function r(e) {
17119
+ var t, f, n = "";
17120
+ if ("string" == typeof e || "number" == typeof e)
17121
+ n += e;
17122
+ else if ("object" == typeof e)
17123
+ if (Array.isArray(e))
17124
+ for (t = 0; t < e.length; t++)
17125
+ e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
17126
+ else
17127
+ for (t in e)
17128
+ e[t] && (n && (n += " "), n += t);
17129
+ return n;
17130
+ }
17131
+ function clsx() {
17132
+ for (var e, t, f = 0, n = ""; f < arguments.length; )
17133
+ (e = arguments[f++]) && (t = r(e)) && (n && (n += " "), n += t);
17134
+ return n;
17135
+ }
17136
+
17137
+ // ../../node_modules/tailwind-merge/dist/lib/tw-join.mjs
17138
+ function twJoin() {
17139
+ var index = 0;
17140
+ var argument;
17141
+ var resolvedValue;
17142
+ var string4 = "";
17143
+ while (index < arguments.length) {
17144
+ if (argument = arguments[index++]) {
17145
+ if (resolvedValue = toValue(argument)) {
17146
+ string4 && (string4 += " ");
17147
+ string4 += resolvedValue;
17148
+ }
17149
+ }
17150
+ }
17151
+ return string4;
17152
+ }
17153
+ function toValue(mix) {
17154
+ if (typeof mix === "string") {
17155
+ return mix;
17156
+ }
17157
+ var resolvedValue;
17158
+ var string4 = "";
17159
+ for (var k = 0; k < mix.length; k++) {
17160
+ if (mix[k]) {
17161
+ if (resolvedValue = toValue(mix[k])) {
17162
+ string4 && (string4 += " ");
17163
+ string4 += resolvedValue;
17164
+ }
17165
+ }
17166
+ }
17167
+ return string4;
17168
+ }
17169
+
17170
+ // ../../node_modules/tailwind-merge/dist/lib/class-utils.mjs
17171
+ var CLASS_PART_SEPARATOR = "-";
17172
+ function createClassUtils(config) {
17173
+ var classMap = createClassMap(config);
17174
+ var conflictingClassGroups = config.conflictingClassGroups, _config$conflictingCl = config.conflictingClassGroupModifiers, conflictingClassGroupModifiers = _config$conflictingCl === void 0 ? {} : _config$conflictingCl;
17175
+ function getClassGroupId(className) {
17176
+ var classParts = className.split(CLASS_PART_SEPARATOR);
17177
+ if (classParts[0] === "" && classParts.length !== 1) {
17178
+ classParts.shift();
17179
+ }
17180
+ return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
17181
+ }
17182
+ function getConflictingClassGroupIds(classGroupId, hasPostfixModifier) {
17183
+ var conflicts = conflictingClassGroups[classGroupId] || [];
17184
+ if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
17185
+ return [].concat(conflicts, conflictingClassGroupModifiers[classGroupId]);
17186
+ }
17187
+ return conflicts;
17188
+ }
17189
+ return {
17190
+ getClassGroupId,
17191
+ getConflictingClassGroupIds
17192
+ };
17193
+ }
17194
+ function getGroupRecursive(classParts, classPartObject) {
17195
+ var _a;
17196
+ if (classParts.length === 0) {
17197
+ return classPartObject.classGroupId;
17198
+ }
17199
+ var currentClassPart = classParts[0];
17200
+ var nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
17201
+ var classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : void 0;
17202
+ if (classGroupFromNextClassPart) {
17203
+ return classGroupFromNextClassPart;
17204
+ }
17205
+ if (classPartObject.validators.length === 0) {
17206
+ return void 0;
17207
+ }
17208
+ var classRest = classParts.join(CLASS_PART_SEPARATOR);
17209
+ return (_a = classPartObject.validators.find(function(_ref) {
17210
+ var validator = _ref.validator;
17211
+ return validator(classRest);
17212
+ })) == null ? void 0 : _a.classGroupId;
17213
+ }
17214
+ var arbitraryPropertyRegex = /^\[(.+)\]$/;
17215
+ function getGroupIdForArbitraryProperty(className) {
17216
+ if (arbitraryPropertyRegex.test(className)) {
17217
+ var arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
17218
+ var property = arbitraryPropertyClassName == null ? void 0 : arbitraryPropertyClassName.substring(0, arbitraryPropertyClassName.indexOf(":"));
17219
+ if (property) {
17220
+ return "arbitrary.." + property;
17221
+ }
17222
+ }
17223
+ }
17224
+ function createClassMap(config) {
17225
+ var theme = config.theme, prefix = config.prefix;
17226
+ var classMap = {
17227
+ nextPart: /* @__PURE__ */ new Map(),
17228
+ validators: []
17229
+ };
17230
+ var prefixedClassGroupEntries = getPrefixedClassGroupEntries(Object.entries(config.classGroups), prefix);
17231
+ prefixedClassGroupEntries.forEach(function(_ref2) {
17232
+ var classGroupId = _ref2[0], classGroup = _ref2[1];
17233
+ processClassesRecursively(classGroup, classMap, classGroupId, theme);
17234
+ });
17235
+ return classMap;
17236
+ }
17237
+ function processClassesRecursively(classGroup, classPartObject, classGroupId, theme) {
17238
+ classGroup.forEach(function(classDefinition) {
17239
+ if (typeof classDefinition === "string") {
17240
+ var classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
17241
+ classPartObjectToEdit.classGroupId = classGroupId;
17242
+ return;
17243
+ }
17244
+ if (typeof classDefinition === "function") {
17245
+ if (isThemeGetter(classDefinition)) {
17246
+ processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
17247
+ return;
17248
+ }
17249
+ classPartObject.validators.push({
17250
+ validator: classDefinition,
17251
+ classGroupId
17252
+ });
17253
+ return;
17254
+ }
17255
+ Object.entries(classDefinition).forEach(function(_ref3) {
17256
+ var key = _ref3[0], classGroup2 = _ref3[1];
17257
+ processClassesRecursively(classGroup2, getPart(classPartObject, key), classGroupId, theme);
17258
+ });
17259
+ });
17260
+ }
17261
+ function getPart(classPartObject, path) {
17262
+ var currentClassPartObject = classPartObject;
17263
+ path.split(CLASS_PART_SEPARATOR).forEach(function(pathPart) {
17264
+ if (!currentClassPartObject.nextPart.has(pathPart)) {
17265
+ currentClassPartObject.nextPart.set(pathPart, {
17266
+ nextPart: /* @__PURE__ */ new Map(),
17267
+ validators: []
17268
+ });
17269
+ }
17270
+ currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);
17271
+ });
17272
+ return currentClassPartObject;
17273
+ }
17274
+ function isThemeGetter(func) {
17275
+ return func.isThemeGetter;
17276
+ }
17277
+ function getPrefixedClassGroupEntries(classGroupEntries, prefix) {
17278
+ if (!prefix) {
17279
+ return classGroupEntries;
17280
+ }
17281
+ return classGroupEntries.map(function(_ref4) {
17282
+ var classGroupId = _ref4[0], classGroup = _ref4[1];
17283
+ var prefixedClassGroup = classGroup.map(function(classDefinition) {
17284
+ if (typeof classDefinition === "string") {
17285
+ return prefix + classDefinition;
17286
+ }
17287
+ if (typeof classDefinition === "object") {
17288
+ return Object.fromEntries(Object.entries(classDefinition).map(function(_ref5) {
17289
+ var key = _ref5[0], value = _ref5[1];
17290
+ return [prefix + key, value];
17291
+ }));
17292
+ }
17293
+ return classDefinition;
17294
+ });
17295
+ return [classGroupId, prefixedClassGroup];
17296
+ });
17297
+ }
17298
+
17299
+ // ../../node_modules/tailwind-merge/dist/lib/lru-cache.mjs
17300
+ function createLruCache(maxCacheSize) {
17301
+ if (maxCacheSize < 1) {
17302
+ return {
17303
+ get: function get() {
17304
+ return void 0;
17305
+ },
17306
+ set: function set() {
17307
+ }
17308
+ };
17309
+ }
17310
+ var cacheSize = 0;
17311
+ var cache = /* @__PURE__ */ new Map();
17312
+ var previousCache = /* @__PURE__ */ new Map();
17313
+ function update(key, value) {
17314
+ cache.set(key, value);
17315
+ cacheSize++;
17316
+ if (cacheSize > maxCacheSize) {
17317
+ cacheSize = 0;
17318
+ previousCache = cache;
17319
+ cache = /* @__PURE__ */ new Map();
17320
+ }
17321
+ }
17322
+ return {
17323
+ get: function get(key) {
17324
+ var value = cache.get(key);
17325
+ if (value !== void 0) {
17326
+ return value;
17327
+ }
17328
+ if ((value = previousCache.get(key)) !== void 0) {
17329
+ update(key, value);
17330
+ return value;
17331
+ }
17332
+ },
17333
+ set: function set(key, value) {
17334
+ if (cache.has(key)) {
17335
+ cache.set(key, value);
17336
+ } else {
17337
+ update(key, value);
17338
+ }
17339
+ }
17340
+ };
17341
+ }
17342
+
17343
+ // ../../node_modules/tailwind-merge/dist/lib/modifier-utils.mjs
17344
+ var IMPORTANT_MODIFIER = "!";
17345
+ function createSplitModifiers(config) {
17346
+ var separator = config.separator || ":";
17347
+ var isSeparatorSingleCharacter = separator.length === 1;
17348
+ var firstSeparatorCharacter = separator[0];
17349
+ var separatorLength = separator.length;
17350
+ return function splitModifiers(className) {
17351
+ var modifiers = [];
17352
+ var bracketDepth = 0;
17353
+ var modifierStart = 0;
17354
+ var postfixModifierPosition;
17355
+ for (var index = 0; index < className.length; index++) {
17356
+ var currentCharacter = className[index];
17357
+ if (bracketDepth === 0) {
17358
+ if (currentCharacter === firstSeparatorCharacter && (isSeparatorSingleCharacter || className.slice(index, index + separatorLength) === separator)) {
17359
+ modifiers.push(className.slice(modifierStart, index));
17360
+ modifierStart = index + separatorLength;
17361
+ continue;
17362
+ }
17363
+ if (currentCharacter === "/") {
17364
+ postfixModifierPosition = index;
17365
+ continue;
17366
+ }
17367
+ }
17368
+ if (currentCharacter === "[") {
17369
+ bracketDepth++;
17370
+ } else if (currentCharacter === "]") {
17371
+ bracketDepth--;
17372
+ }
17373
+ }
17374
+ var baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
17375
+ var hasImportantModifier = baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER);
17376
+ var baseClassName = hasImportantModifier ? baseClassNameWithImportantModifier.substring(1) : baseClassNameWithImportantModifier;
17377
+ var maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
17378
+ return {
17379
+ modifiers,
17380
+ hasImportantModifier,
17381
+ baseClassName,
17382
+ maybePostfixModifierPosition
17383
+ };
17384
+ };
17385
+ }
17386
+ function sortModifiers(modifiers) {
17387
+ if (modifiers.length <= 1) {
17388
+ return modifiers;
17389
+ }
17390
+ var sortedModifiers = [];
17391
+ var unsortedModifiers = [];
17392
+ modifiers.forEach(function(modifier) {
17393
+ var isArbitraryVariant = modifier[0] === "[";
17394
+ if (isArbitraryVariant) {
17395
+ sortedModifiers.push.apply(sortedModifiers, unsortedModifiers.sort().concat([modifier]));
17396
+ unsortedModifiers = [];
17397
+ } else {
17398
+ unsortedModifiers.push(modifier);
17399
+ }
17400
+ });
17401
+ sortedModifiers.push.apply(sortedModifiers, unsortedModifiers.sort());
17402
+ return sortedModifiers;
17403
+ }
17404
+
17405
+ // ../../node_modules/tailwind-merge/dist/lib/config-utils.mjs
17406
+ function createConfigUtils(config) {
17407
+ return __spreadValues({
17408
+ cache: createLruCache(config.cacheSize),
17409
+ splitModifiers: createSplitModifiers(config)
17410
+ }, createClassUtils(config));
17411
+ }
17412
+
17413
+ // ../../node_modules/tailwind-merge/dist/lib/merge-classlist.mjs
17414
+ var SPLIT_CLASSES_REGEX = /\s+/;
17415
+ function mergeClassList(classList, configUtils) {
17416
+ var splitModifiers = configUtils.splitModifiers, getClassGroupId = configUtils.getClassGroupId, getConflictingClassGroupIds = configUtils.getConflictingClassGroupIds;
17417
+ var classGroupsInConflict = /* @__PURE__ */ new Set();
17418
+ return classList.trim().split(SPLIT_CLASSES_REGEX).map(function(originalClassName) {
17419
+ var _splitModifiers = splitModifiers(originalClassName), modifiers = _splitModifiers.modifiers, hasImportantModifier = _splitModifiers.hasImportantModifier, baseClassName = _splitModifiers.baseClassName, maybePostfixModifierPosition = _splitModifiers.maybePostfixModifierPosition;
17420
+ var classGroupId = getClassGroupId(maybePostfixModifierPosition ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
17421
+ var hasPostfixModifier = Boolean(maybePostfixModifierPosition);
17422
+ if (!classGroupId) {
17423
+ if (!maybePostfixModifierPosition) {
17424
+ return {
17425
+ isTailwindClass: false,
17426
+ originalClassName
17427
+ };
17428
+ }
17429
+ classGroupId = getClassGroupId(baseClassName);
17430
+ if (!classGroupId) {
17431
+ return {
17432
+ isTailwindClass: false,
17433
+ originalClassName
17434
+ };
17435
+ }
17436
+ hasPostfixModifier = false;
17437
+ }
17438
+ var variantModifier = sortModifiers(modifiers).join(":");
17439
+ var modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
17440
+ return {
17441
+ isTailwindClass: true,
17442
+ modifierId,
17443
+ classGroupId,
17444
+ originalClassName,
17445
+ hasPostfixModifier
17446
+ };
17447
+ }).reverse().filter(function(parsed) {
17448
+ if (!parsed.isTailwindClass) {
17449
+ return true;
17450
+ }
17451
+ var modifierId = parsed.modifierId, classGroupId = parsed.classGroupId, hasPostfixModifier = parsed.hasPostfixModifier;
17452
+ var classId = modifierId + classGroupId;
17453
+ if (classGroupsInConflict.has(classId)) {
17454
+ return false;
17455
+ }
17456
+ classGroupsInConflict.add(classId);
17457
+ getConflictingClassGroupIds(classGroupId, hasPostfixModifier).forEach(function(group) {
17458
+ return classGroupsInConflict.add(modifierId + group);
17459
+ });
17460
+ return true;
17461
+ }).reverse().map(function(parsed) {
17462
+ return parsed.originalClassName;
17463
+ }).join(" ");
17464
+ }
17465
+
17466
+ // ../../node_modules/tailwind-merge/dist/lib/create-tailwind-merge.mjs
17467
+ function createTailwindMerge() {
17468
+ for (var _len = arguments.length, createConfig = new Array(_len), _key = 0; _key < _len; _key++) {
17469
+ createConfig[_key] = arguments[_key];
17470
+ }
17471
+ var configUtils;
17472
+ var cacheGet;
17473
+ var cacheSet;
17474
+ var functionToCall = initTailwindMerge;
17475
+ function initTailwindMerge(classList) {
17476
+ var firstCreateConfig = createConfig[0], restCreateConfig = createConfig.slice(1);
17477
+ var config = restCreateConfig.reduce(function(previousConfig, createConfigCurrent) {
17478
+ return createConfigCurrent(previousConfig);
17479
+ }, firstCreateConfig());
17480
+ configUtils = createConfigUtils(config);
17481
+ cacheGet = configUtils.cache.get;
17482
+ cacheSet = configUtils.cache.set;
17483
+ functionToCall = tailwindMerge;
17484
+ return tailwindMerge(classList);
17485
+ }
17486
+ function tailwindMerge(classList) {
17487
+ var cachedResult = cacheGet(classList);
17488
+ if (cachedResult) {
17489
+ return cachedResult;
17490
+ }
17491
+ var result = mergeClassList(classList, configUtils);
17492
+ cacheSet(classList, result);
17493
+ return result;
17494
+ }
17495
+ return function callTailwindMerge() {
17496
+ return functionToCall(twJoin.apply(null, arguments));
17497
+ };
17498
+ }
17499
+
17500
+ // ../../node_modules/tailwind-merge/dist/lib/from-theme.mjs
17501
+ function fromTheme(key) {
17502
+ var themeGetter = function themeGetter2(theme) {
17503
+ return theme[key] || [];
17504
+ };
17505
+ themeGetter.isThemeGetter = true;
17506
+ return themeGetter;
17507
+ }
17508
+
17509
+ // ../../node_modules/tailwind-merge/dist/lib/validators.mjs
17510
+ var arbitraryValueRegex = /^\[(?:([a-z-]+):)?(.+)\]$/i;
17511
+ var fractionRegex = /^\d+\/\d+$/;
17512
+ var stringLengths = /* @__PURE__ */ new Set(["px", "full", "screen"]);
17513
+ var tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
17514
+ var lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))/;
17515
+ var shadowRegex = /^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
17516
+ function isLength(value) {
17517
+ return isNumber(value) || stringLengths.has(value) || fractionRegex.test(value) || isArbitraryLength(value);
17518
+ }
17519
+ function isArbitraryLength(value) {
17520
+ return getIsArbitraryValue(value, "length", isLengthOnly);
17521
+ }
17522
+ function isArbitrarySize(value) {
17523
+ return getIsArbitraryValue(value, "size", isNever);
17524
+ }
17525
+ function isArbitraryPosition(value) {
17526
+ return getIsArbitraryValue(value, "position", isNever);
17527
+ }
17528
+ function isArbitraryUrl(value) {
17529
+ return getIsArbitraryValue(value, "url", isUrl);
17530
+ }
17531
+ function isArbitraryNumber(value) {
17532
+ return getIsArbitraryValue(value, "number", isNumber);
17533
+ }
17534
+ function isNumber(value) {
17535
+ return !Number.isNaN(Number(value));
17536
+ }
17537
+ function isPercent(value) {
17538
+ return value.endsWith("%") && isNumber(value.slice(0, -1));
17539
+ }
17540
+ function isInteger(value) {
17541
+ return isIntegerOnly(value) || getIsArbitraryValue(value, "number", isIntegerOnly);
17542
+ }
17543
+ function isArbitraryValue(value) {
17544
+ return arbitraryValueRegex.test(value);
17545
+ }
17546
+ function isAny() {
17547
+ return true;
17548
+ }
17549
+ function isTshirtSize(value) {
17550
+ return tshirtUnitRegex.test(value);
17551
+ }
17552
+ function isArbitraryShadow(value) {
17553
+ return getIsArbitraryValue(value, "", isShadow);
17554
+ }
17555
+ function getIsArbitraryValue(value, label, testValue) {
17556
+ var result = arbitraryValueRegex.exec(value);
17557
+ if (result) {
17558
+ if (result[1]) {
17559
+ return result[1] === label;
17560
+ }
17561
+ return testValue(result[2]);
17562
+ }
17563
+ return false;
17564
+ }
17565
+ function isLengthOnly(value) {
17566
+ return lengthUnitRegex.test(value);
17567
+ }
17568
+ function isNever() {
17569
+ return false;
17570
+ }
17571
+ function isUrl(value) {
17572
+ return value.startsWith("url(");
17573
+ }
17574
+ function isIntegerOnly(value) {
17575
+ return Number.isInteger(Number(value));
17576
+ }
17577
+ function isShadow(value) {
17578
+ return shadowRegex.test(value);
17579
+ }
17580
+
17581
+ // ../../node_modules/tailwind-merge/dist/lib/default-config.mjs
17582
+ function getDefaultConfig() {
17583
+ var colors = fromTheme("colors");
17584
+ var spacing = fromTheme("spacing");
17585
+ var blur = fromTheme("blur");
17586
+ var brightness = fromTheme("brightness");
17587
+ var borderColor = fromTheme("borderColor");
17588
+ var borderRadius = fromTheme("borderRadius");
17589
+ var borderSpacing = fromTheme("borderSpacing");
17590
+ var borderWidth = fromTheme("borderWidth");
17591
+ var contrast = fromTheme("contrast");
17592
+ var grayscale = fromTheme("grayscale");
17593
+ var hueRotate = fromTheme("hueRotate");
17594
+ var invert = fromTheme("invert");
17595
+ var gap = fromTheme("gap");
17596
+ var gradientColorStops = fromTheme("gradientColorStops");
17597
+ var gradientColorStopPositions = fromTheme("gradientColorStopPositions");
17598
+ var inset = fromTheme("inset");
17599
+ var margin = fromTheme("margin");
17600
+ var opacity = fromTheme("opacity");
17601
+ var padding = fromTheme("padding");
17602
+ var saturate = fromTheme("saturate");
17603
+ var scale = fromTheme("scale");
17604
+ var sepia = fromTheme("sepia");
17605
+ var skew = fromTheme("skew");
17606
+ var space = fromTheme("space");
17607
+ var translate = fromTheme("translate");
17608
+ var getOverscroll = function getOverscroll2() {
17609
+ return ["auto", "contain", "none"];
17610
+ };
17611
+ var getOverflow = function getOverflow2() {
17612
+ return ["auto", "hidden", "clip", "visible", "scroll"];
17613
+ };
17614
+ var getSpacingWithAuto = function getSpacingWithAuto2() {
17615
+ return ["auto", spacing];
17616
+ };
17617
+ var getLengthWithEmpty = function getLengthWithEmpty2() {
17618
+ return ["", isLength];
17619
+ };
17620
+ var getNumberWithAutoAndArbitrary = function getNumberWithAutoAndArbitrary2() {
17621
+ return ["auto", isNumber, isArbitraryValue];
17622
+ };
17623
+ var getPositions = function getPositions2() {
17624
+ return ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"];
17625
+ };
17626
+ var getLineStyles = function getLineStyles2() {
17627
+ return ["solid", "dashed", "dotted", "double", "none"];
17628
+ };
17629
+ var getBlendModes = function getBlendModes2() {
17630
+ return ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity", "plus-lighter"];
17631
+ };
17632
+ var getAlign = function getAlign2() {
17633
+ return ["start", "end", "center", "between", "around", "evenly", "stretch"];
17634
+ };
17635
+ var getZeroAndEmpty = function getZeroAndEmpty2() {
17636
+ return ["", "0", isArbitraryValue];
17637
+ };
17638
+ var getBreaks = function getBreaks2() {
17639
+ return ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"];
17640
+ };
17641
+ var getNumber = function getNumber2() {
17642
+ return [isNumber, isArbitraryNumber];
17643
+ };
17644
+ var getNumberAndArbitrary = function getNumberAndArbitrary2() {
17645
+ return [isNumber, isArbitraryValue];
17646
+ };
17647
+ return {
17648
+ cacheSize: 500,
17649
+ theme: {
17650
+ colors: [isAny],
17651
+ spacing: [isLength],
17652
+ blur: ["none", "", isTshirtSize, isArbitraryLength],
17653
+ brightness: getNumber(),
17654
+ borderColor: [colors],
17655
+ borderRadius: ["none", "", "full", isTshirtSize, isArbitraryLength],
17656
+ borderSpacing: [spacing],
17657
+ borderWidth: getLengthWithEmpty(),
17658
+ contrast: getNumber(),
17659
+ grayscale: getZeroAndEmpty(),
17660
+ hueRotate: getNumberAndArbitrary(),
17661
+ invert: getZeroAndEmpty(),
17662
+ gap: [spacing],
17663
+ gradientColorStops: [colors],
17664
+ gradientColorStopPositions: [isPercent, isArbitraryLength],
17665
+ inset: getSpacingWithAuto(),
17666
+ margin: getSpacingWithAuto(),
17667
+ opacity: getNumber(),
17668
+ padding: [spacing],
17669
+ saturate: getNumber(),
17670
+ scale: getNumber(),
17671
+ sepia: getZeroAndEmpty(),
17672
+ skew: getNumberAndArbitrary(),
17673
+ space: [spacing],
17674
+ translate: [spacing]
17675
+ },
17676
+ classGroups: {
17677
+ // Layout
17678
+ /**
17679
+ * Aspect Ratio
17680
+ * @see https://tailwindcss.com/docs/aspect-ratio
17681
+ */
17682
+ aspect: [{
17683
+ aspect: ["auto", "square", "video", isArbitraryValue]
17684
+ }],
17685
+ /**
17686
+ * Container
17687
+ * @see https://tailwindcss.com/docs/container
17688
+ */
17689
+ container: ["container"],
17690
+ /**
17691
+ * Columns
17692
+ * @see https://tailwindcss.com/docs/columns
17693
+ */
17694
+ columns: [{
17695
+ columns: [isTshirtSize]
17696
+ }],
17697
+ /**
17698
+ * Break After
17699
+ * @see https://tailwindcss.com/docs/break-after
17700
+ */
17701
+ "break-after": [{
17702
+ "break-after": getBreaks()
17703
+ }],
17704
+ /**
17705
+ * Break Before
17706
+ * @see https://tailwindcss.com/docs/break-before
17707
+ */
17708
+ "break-before": [{
17709
+ "break-before": getBreaks()
17710
+ }],
17711
+ /**
17712
+ * Break Inside
17713
+ * @see https://tailwindcss.com/docs/break-inside
17714
+ */
17715
+ "break-inside": [{
17716
+ "break-inside": ["auto", "avoid", "avoid-page", "avoid-column"]
17717
+ }],
17718
+ /**
17719
+ * Box Decoration Break
17720
+ * @see https://tailwindcss.com/docs/box-decoration-break
17721
+ */
17722
+ "box-decoration": [{
17723
+ "box-decoration": ["slice", "clone"]
17724
+ }],
17725
+ /**
17726
+ * Box Sizing
17727
+ * @see https://tailwindcss.com/docs/box-sizing
17728
+ */
17729
+ box: [{
17730
+ box: ["border", "content"]
17731
+ }],
17732
+ /**
17733
+ * Display
17734
+ * @see https://tailwindcss.com/docs/display
17735
+ */
17736
+ display: ["block", "inline-block", "inline", "flex", "inline-flex", "table", "inline-table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row-group", "table-row", "flow-root", "grid", "inline-grid", "contents", "list-item", "hidden"],
17737
+ /**
17738
+ * Floats
17739
+ * @see https://tailwindcss.com/docs/float
17740
+ */
17741
+ "float": [{
17742
+ "float": ["right", "left", "none"]
17743
+ }],
17744
+ /**
17745
+ * Clear
17746
+ * @see https://tailwindcss.com/docs/clear
17747
+ */
17748
+ clear: [{
17749
+ clear: ["left", "right", "both", "none"]
17750
+ }],
17751
+ /**
17752
+ * Isolation
17753
+ * @see https://tailwindcss.com/docs/isolation
17754
+ */
17755
+ isolation: ["isolate", "isolation-auto"],
17756
+ /**
17757
+ * Object Fit
17758
+ * @see https://tailwindcss.com/docs/object-fit
17759
+ */
17760
+ "object-fit": [{
17761
+ object: ["contain", "cover", "fill", "none", "scale-down"]
17762
+ }],
17763
+ /**
17764
+ * Object Position
17765
+ * @see https://tailwindcss.com/docs/object-position
17766
+ */
17767
+ "object-position": [{
17768
+ object: [].concat(getPositions(), [isArbitraryValue])
17769
+ }],
17770
+ /**
17771
+ * Overflow
17772
+ * @see https://tailwindcss.com/docs/overflow
17773
+ */
17774
+ overflow: [{
17775
+ overflow: getOverflow()
17776
+ }],
17777
+ /**
17778
+ * Overflow X
17779
+ * @see https://tailwindcss.com/docs/overflow
17780
+ */
17781
+ "overflow-x": [{
17782
+ "overflow-x": getOverflow()
17783
+ }],
17784
+ /**
17785
+ * Overflow Y
17786
+ * @see https://tailwindcss.com/docs/overflow
17787
+ */
17788
+ "overflow-y": [{
17789
+ "overflow-y": getOverflow()
17790
+ }],
17791
+ /**
17792
+ * Overscroll Behavior
17793
+ * @see https://tailwindcss.com/docs/overscroll-behavior
17794
+ */
17795
+ overscroll: [{
17796
+ overscroll: getOverscroll()
17797
+ }],
17798
+ /**
17799
+ * Overscroll Behavior X
17800
+ * @see https://tailwindcss.com/docs/overscroll-behavior
17801
+ */
17802
+ "overscroll-x": [{
17803
+ "overscroll-x": getOverscroll()
17804
+ }],
17805
+ /**
17806
+ * Overscroll Behavior Y
17807
+ * @see https://tailwindcss.com/docs/overscroll-behavior
17808
+ */
17809
+ "overscroll-y": [{
17810
+ "overscroll-y": getOverscroll()
17811
+ }],
17812
+ /**
17813
+ * Position
17814
+ * @see https://tailwindcss.com/docs/position
17815
+ */
17816
+ position: ["static", "fixed", "absolute", "relative", "sticky"],
17817
+ /**
17818
+ * Top / Right / Bottom / Left
17819
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
17820
+ */
17821
+ inset: [{
17822
+ inset: [inset]
17823
+ }],
17824
+ /**
17825
+ * Right / Left
17826
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
17827
+ */
17828
+ "inset-x": [{
17829
+ "inset-x": [inset]
17830
+ }],
17831
+ /**
17832
+ * Top / Bottom
17833
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
17834
+ */
17835
+ "inset-y": [{
17836
+ "inset-y": [inset]
17837
+ }],
17838
+ /**
17839
+ * Start
17840
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
17841
+ */
17842
+ start: [{
17843
+ start: [inset]
17844
+ }],
17845
+ /**
17846
+ * End
17847
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
17848
+ */
17849
+ end: [{
17850
+ end: [inset]
17851
+ }],
17852
+ /**
17853
+ * Top
17854
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
17855
+ */
17856
+ top: [{
17857
+ top: [inset]
17858
+ }],
17859
+ /**
17860
+ * Right
17861
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
17862
+ */
17863
+ right: [{
17864
+ right: [inset]
17865
+ }],
17866
+ /**
17867
+ * Bottom
17868
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
17869
+ */
17870
+ bottom: [{
17871
+ bottom: [inset]
17872
+ }],
17873
+ /**
17874
+ * Left
17875
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
17876
+ */
17877
+ left: [{
17878
+ left: [inset]
17879
+ }],
17880
+ /**
17881
+ * Visibility
17882
+ * @see https://tailwindcss.com/docs/visibility
17883
+ */
17884
+ visibility: ["visible", "invisible", "collapse"],
17885
+ /**
17886
+ * Z-Index
17887
+ * @see https://tailwindcss.com/docs/z-index
17888
+ */
17889
+ z: [{
17890
+ z: ["auto", isInteger]
17891
+ }],
17892
+ // Flexbox and Grid
17893
+ /**
17894
+ * Flex Basis
17895
+ * @see https://tailwindcss.com/docs/flex-basis
17896
+ */
17897
+ basis: [{
17898
+ basis: [spacing]
17899
+ }],
17900
+ /**
17901
+ * Flex Direction
17902
+ * @see https://tailwindcss.com/docs/flex-direction
17903
+ */
17904
+ "flex-direction": [{
17905
+ flex: ["row", "row-reverse", "col", "col-reverse"]
17906
+ }],
17907
+ /**
17908
+ * Flex Wrap
17909
+ * @see https://tailwindcss.com/docs/flex-wrap
17910
+ */
17911
+ "flex-wrap": [{
17912
+ flex: ["wrap", "wrap-reverse", "nowrap"]
17913
+ }],
17914
+ /**
17915
+ * Flex
17916
+ * @see https://tailwindcss.com/docs/flex
17917
+ */
17918
+ flex: [{
17919
+ flex: ["1", "auto", "initial", "none", isArbitraryValue]
17920
+ }],
17921
+ /**
17922
+ * Flex Grow
17923
+ * @see https://tailwindcss.com/docs/flex-grow
17924
+ */
17925
+ grow: [{
17926
+ grow: getZeroAndEmpty()
17927
+ }],
17928
+ /**
17929
+ * Flex Shrink
17930
+ * @see https://tailwindcss.com/docs/flex-shrink
17931
+ */
17932
+ shrink: [{
17933
+ shrink: getZeroAndEmpty()
17934
+ }],
17935
+ /**
17936
+ * Order
17937
+ * @see https://tailwindcss.com/docs/order
17938
+ */
17939
+ order: [{
17940
+ order: ["first", "last", "none", isInteger]
17941
+ }],
17942
+ /**
17943
+ * Grid Template Columns
17944
+ * @see https://tailwindcss.com/docs/grid-template-columns
17945
+ */
17946
+ "grid-cols": [{
17947
+ "grid-cols": [isAny]
17948
+ }],
17949
+ /**
17950
+ * Grid Column Start / End
17951
+ * @see https://tailwindcss.com/docs/grid-column
17952
+ */
17953
+ "col-start-end": [{
17954
+ col: ["auto", {
17955
+ span: [isInteger]
17956
+ }, isArbitraryValue]
17957
+ }],
17958
+ /**
17959
+ * Grid Column Start
17960
+ * @see https://tailwindcss.com/docs/grid-column
17961
+ */
17962
+ "col-start": [{
17963
+ "col-start": getNumberWithAutoAndArbitrary()
17964
+ }],
17965
+ /**
17966
+ * Grid Column End
17967
+ * @see https://tailwindcss.com/docs/grid-column
17968
+ */
17969
+ "col-end": [{
17970
+ "col-end": getNumberWithAutoAndArbitrary()
17971
+ }],
17972
+ /**
17973
+ * Grid Template Rows
17974
+ * @see https://tailwindcss.com/docs/grid-template-rows
17975
+ */
17976
+ "grid-rows": [{
17977
+ "grid-rows": [isAny]
17978
+ }],
17979
+ /**
17980
+ * Grid Row Start / End
17981
+ * @see https://tailwindcss.com/docs/grid-row
17982
+ */
17983
+ "row-start-end": [{
17984
+ row: ["auto", {
17985
+ span: [isInteger]
17986
+ }, isArbitraryValue]
17987
+ }],
17988
+ /**
17989
+ * Grid Row Start
17990
+ * @see https://tailwindcss.com/docs/grid-row
17991
+ */
17992
+ "row-start": [{
17993
+ "row-start": getNumberWithAutoAndArbitrary()
17994
+ }],
17995
+ /**
17996
+ * Grid Row End
17997
+ * @see https://tailwindcss.com/docs/grid-row
17998
+ */
17999
+ "row-end": [{
18000
+ "row-end": getNumberWithAutoAndArbitrary()
18001
+ }],
18002
+ /**
18003
+ * Grid Auto Flow
18004
+ * @see https://tailwindcss.com/docs/grid-auto-flow
18005
+ */
18006
+ "grid-flow": [{
18007
+ "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"]
18008
+ }],
18009
+ /**
18010
+ * Grid Auto Columns
18011
+ * @see https://tailwindcss.com/docs/grid-auto-columns
18012
+ */
18013
+ "auto-cols": [{
18014
+ "auto-cols": ["auto", "min", "max", "fr", isArbitraryValue]
18015
+ }],
18016
+ /**
18017
+ * Grid Auto Rows
18018
+ * @see https://tailwindcss.com/docs/grid-auto-rows
18019
+ */
18020
+ "auto-rows": [{
18021
+ "auto-rows": ["auto", "min", "max", "fr", isArbitraryValue]
18022
+ }],
18023
+ /**
18024
+ * Gap
18025
+ * @see https://tailwindcss.com/docs/gap
18026
+ */
18027
+ gap: [{
18028
+ gap: [gap]
18029
+ }],
18030
+ /**
18031
+ * Gap X
18032
+ * @see https://tailwindcss.com/docs/gap
18033
+ */
18034
+ "gap-x": [{
18035
+ "gap-x": [gap]
18036
+ }],
18037
+ /**
18038
+ * Gap Y
18039
+ * @see https://tailwindcss.com/docs/gap
18040
+ */
18041
+ "gap-y": [{
18042
+ "gap-y": [gap]
18043
+ }],
18044
+ /**
18045
+ * Justify Content
18046
+ * @see https://tailwindcss.com/docs/justify-content
18047
+ */
18048
+ "justify-content": [{
18049
+ justify: ["normal"].concat(getAlign())
18050
+ }],
18051
+ /**
18052
+ * Justify Items
18053
+ * @see https://tailwindcss.com/docs/justify-items
18054
+ */
18055
+ "justify-items": [{
18056
+ "justify-items": ["start", "end", "center", "stretch"]
18057
+ }],
18058
+ /**
18059
+ * Justify Self
18060
+ * @see https://tailwindcss.com/docs/justify-self
18061
+ */
18062
+ "justify-self": [{
18063
+ "justify-self": ["auto", "start", "end", "center", "stretch"]
18064
+ }],
18065
+ /**
18066
+ * Align Content
18067
+ * @see https://tailwindcss.com/docs/align-content
18068
+ */
18069
+ "align-content": [{
18070
+ content: ["normal"].concat(getAlign(), ["baseline"])
18071
+ }],
18072
+ /**
18073
+ * Align Items
18074
+ * @see https://tailwindcss.com/docs/align-items
18075
+ */
18076
+ "align-items": [{
18077
+ items: ["start", "end", "center", "baseline", "stretch"]
18078
+ }],
18079
+ /**
18080
+ * Align Self
18081
+ * @see https://tailwindcss.com/docs/align-self
18082
+ */
18083
+ "align-self": [{
18084
+ self: ["auto", "start", "end", "center", "stretch", "baseline"]
18085
+ }],
18086
+ /**
18087
+ * Place Content
18088
+ * @see https://tailwindcss.com/docs/place-content
18089
+ */
18090
+ "place-content": [{
18091
+ "place-content": [].concat(getAlign(), ["baseline"])
18092
+ }],
18093
+ /**
18094
+ * Place Items
18095
+ * @see https://tailwindcss.com/docs/place-items
18096
+ */
18097
+ "place-items": [{
18098
+ "place-items": ["start", "end", "center", "baseline", "stretch"]
18099
+ }],
18100
+ /**
18101
+ * Place Self
18102
+ * @see https://tailwindcss.com/docs/place-self
18103
+ */
18104
+ "place-self": [{
18105
+ "place-self": ["auto", "start", "end", "center", "stretch"]
18106
+ }],
18107
+ // Spacing
18108
+ /**
18109
+ * Padding
18110
+ * @see https://tailwindcss.com/docs/padding
18111
+ */
18112
+ p: [{
18113
+ p: [padding]
18114
+ }],
18115
+ /**
18116
+ * Padding X
18117
+ * @see https://tailwindcss.com/docs/padding
18118
+ */
18119
+ px: [{
18120
+ px: [padding]
18121
+ }],
18122
+ /**
18123
+ * Padding Y
18124
+ * @see https://tailwindcss.com/docs/padding
18125
+ */
18126
+ py: [{
18127
+ py: [padding]
18128
+ }],
18129
+ /**
18130
+ * Padding Start
18131
+ * @see https://tailwindcss.com/docs/padding
18132
+ */
18133
+ ps: [{
18134
+ ps: [padding]
18135
+ }],
18136
+ /**
18137
+ * Padding End
18138
+ * @see https://tailwindcss.com/docs/padding
18139
+ */
18140
+ pe: [{
18141
+ pe: [padding]
18142
+ }],
18143
+ /**
18144
+ * Padding Top
18145
+ * @see https://tailwindcss.com/docs/padding
18146
+ */
18147
+ pt: [{
18148
+ pt: [padding]
18149
+ }],
18150
+ /**
18151
+ * Padding Right
18152
+ * @see https://tailwindcss.com/docs/padding
18153
+ */
18154
+ pr: [{
18155
+ pr: [padding]
18156
+ }],
18157
+ /**
18158
+ * Padding Bottom
18159
+ * @see https://tailwindcss.com/docs/padding
18160
+ */
18161
+ pb: [{
18162
+ pb: [padding]
18163
+ }],
18164
+ /**
18165
+ * Padding Left
18166
+ * @see https://tailwindcss.com/docs/padding
18167
+ */
18168
+ pl: [{
18169
+ pl: [padding]
18170
+ }],
18171
+ /**
18172
+ * Margin
18173
+ * @see https://tailwindcss.com/docs/margin
18174
+ */
18175
+ m: [{
18176
+ m: [margin]
18177
+ }],
18178
+ /**
18179
+ * Margin X
18180
+ * @see https://tailwindcss.com/docs/margin
18181
+ */
18182
+ mx: [{
18183
+ mx: [margin]
18184
+ }],
18185
+ /**
18186
+ * Margin Y
18187
+ * @see https://tailwindcss.com/docs/margin
18188
+ */
18189
+ my: [{
18190
+ my: [margin]
18191
+ }],
18192
+ /**
18193
+ * Margin Start
18194
+ * @see https://tailwindcss.com/docs/margin
18195
+ */
18196
+ ms: [{
18197
+ ms: [margin]
18198
+ }],
18199
+ /**
18200
+ * Margin End
18201
+ * @see https://tailwindcss.com/docs/margin
18202
+ */
18203
+ me: [{
18204
+ me: [margin]
18205
+ }],
18206
+ /**
18207
+ * Margin Top
18208
+ * @see https://tailwindcss.com/docs/margin
18209
+ */
18210
+ mt: [{
18211
+ mt: [margin]
18212
+ }],
18213
+ /**
18214
+ * Margin Right
18215
+ * @see https://tailwindcss.com/docs/margin
18216
+ */
18217
+ mr: [{
18218
+ mr: [margin]
18219
+ }],
18220
+ /**
18221
+ * Margin Bottom
18222
+ * @see https://tailwindcss.com/docs/margin
18223
+ */
18224
+ mb: [{
18225
+ mb: [margin]
18226
+ }],
18227
+ /**
18228
+ * Margin Left
18229
+ * @see https://tailwindcss.com/docs/margin
18230
+ */
18231
+ ml: [{
18232
+ ml: [margin]
18233
+ }],
18234
+ /**
18235
+ * Space Between X
18236
+ * @see https://tailwindcss.com/docs/space
18237
+ */
18238
+ "space-x": [{
18239
+ "space-x": [space]
18240
+ }],
18241
+ /**
18242
+ * Space Between X Reverse
18243
+ * @see https://tailwindcss.com/docs/space
18244
+ */
18245
+ "space-x-reverse": ["space-x-reverse"],
18246
+ /**
18247
+ * Space Between Y
18248
+ * @see https://tailwindcss.com/docs/space
18249
+ */
18250
+ "space-y": [{
18251
+ "space-y": [space]
18252
+ }],
18253
+ /**
18254
+ * Space Between Y Reverse
18255
+ * @see https://tailwindcss.com/docs/space
18256
+ */
18257
+ "space-y-reverse": ["space-y-reverse"],
18258
+ // Sizing
18259
+ /**
18260
+ * Width
18261
+ * @see https://tailwindcss.com/docs/width
18262
+ */
18263
+ w: [{
18264
+ w: ["auto", "min", "max", "fit", spacing]
18265
+ }],
18266
+ /**
18267
+ * Min-Width
18268
+ * @see https://tailwindcss.com/docs/min-width
18269
+ */
18270
+ "min-w": [{
18271
+ "min-w": ["min", "max", "fit", isLength]
18272
+ }],
18273
+ /**
18274
+ * Max-Width
18275
+ * @see https://tailwindcss.com/docs/max-width
18276
+ */
18277
+ "max-w": [{
18278
+ "max-w": ["0", "none", "full", "min", "max", "fit", "prose", {
18279
+ screen: [isTshirtSize]
18280
+ }, isTshirtSize, isArbitraryLength]
18281
+ }],
18282
+ /**
18283
+ * Height
18284
+ * @see https://tailwindcss.com/docs/height
18285
+ */
18286
+ h: [{
18287
+ h: [spacing, "auto", "min", "max", "fit"]
18288
+ }],
18289
+ /**
18290
+ * Min-Height
18291
+ * @see https://tailwindcss.com/docs/min-height
18292
+ */
18293
+ "min-h": [{
18294
+ "min-h": ["min", "max", "fit", isLength]
18295
+ }],
18296
+ /**
18297
+ * Max-Height
18298
+ * @see https://tailwindcss.com/docs/max-height
18299
+ */
18300
+ "max-h": [{
18301
+ "max-h": [spacing, "min", "max", "fit"]
18302
+ }],
18303
+ // Typography
18304
+ /**
18305
+ * Font Size
18306
+ * @see https://tailwindcss.com/docs/font-size
18307
+ */
18308
+ "font-size": [{
18309
+ text: ["base", isTshirtSize, isArbitraryLength]
18310
+ }],
18311
+ /**
18312
+ * Font Smoothing
18313
+ * @see https://tailwindcss.com/docs/font-smoothing
18314
+ */
18315
+ "font-smoothing": ["antialiased", "subpixel-antialiased"],
18316
+ /**
18317
+ * Font Style
18318
+ * @see https://tailwindcss.com/docs/font-style
18319
+ */
18320
+ "font-style": ["italic", "not-italic"],
18321
+ /**
18322
+ * Font Weight
18323
+ * @see https://tailwindcss.com/docs/font-weight
18324
+ */
18325
+ "font-weight": [{
18326
+ font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", isArbitraryNumber]
18327
+ }],
18328
+ /**
18329
+ * Font Family
18330
+ * @see https://tailwindcss.com/docs/font-family
18331
+ */
18332
+ "font-family": [{
18333
+ font: [isAny]
18334
+ }],
18335
+ /**
18336
+ * Font Variant Numeric
18337
+ * @see https://tailwindcss.com/docs/font-variant-numeric
18338
+ */
18339
+ "fvn-normal": ["normal-nums"],
18340
+ /**
18341
+ * Font Variant Numeric
18342
+ * @see https://tailwindcss.com/docs/font-variant-numeric
18343
+ */
18344
+ "fvn-ordinal": ["ordinal"],
18345
+ /**
18346
+ * Font Variant Numeric
18347
+ * @see https://tailwindcss.com/docs/font-variant-numeric
18348
+ */
18349
+ "fvn-slashed-zero": ["slashed-zero"],
18350
+ /**
18351
+ * Font Variant Numeric
18352
+ * @see https://tailwindcss.com/docs/font-variant-numeric
18353
+ */
18354
+ "fvn-figure": ["lining-nums", "oldstyle-nums"],
18355
+ /**
18356
+ * Font Variant Numeric
18357
+ * @see https://tailwindcss.com/docs/font-variant-numeric
18358
+ */
18359
+ "fvn-spacing": ["proportional-nums", "tabular-nums"],
18360
+ /**
18361
+ * Font Variant Numeric
18362
+ * @see https://tailwindcss.com/docs/font-variant-numeric
18363
+ */
18364
+ "fvn-fraction": ["diagonal-fractions", "stacked-fractons"],
18365
+ /**
18366
+ * Letter Spacing
18367
+ * @see https://tailwindcss.com/docs/letter-spacing
18368
+ */
18369
+ tracking: [{
18370
+ tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", isArbitraryLength]
18371
+ }],
18372
+ /**
18373
+ * Line Clamp
18374
+ * @see https://tailwindcss.com/docs/line-clamp
18375
+ */
18376
+ "line-clamp": [{
18377
+ "line-clamp": ["none", isNumber, isArbitraryNumber]
18378
+ }],
18379
+ /**
18380
+ * Line Height
18381
+ * @see https://tailwindcss.com/docs/line-height
18382
+ */
18383
+ leading: [{
18384
+ leading: ["none", "tight", "snug", "normal", "relaxed", "loose", isLength]
18385
+ }],
18386
+ /**
18387
+ * List Style Image
18388
+ * @see https://tailwindcss.com/docs/list-style-image
18389
+ */
18390
+ "list-image": [{
18391
+ "list-image": ["none", isArbitraryValue]
18392
+ }],
18393
+ /**
18394
+ * List Style Type
18395
+ * @see https://tailwindcss.com/docs/list-style-type
18396
+ */
18397
+ "list-style-type": [{
18398
+ list: ["none", "disc", "decimal", isArbitraryValue]
18399
+ }],
18400
+ /**
18401
+ * List Style Position
18402
+ * @see https://tailwindcss.com/docs/list-style-position
18403
+ */
18404
+ "list-style-position": [{
18405
+ list: ["inside", "outside"]
18406
+ }],
18407
+ /**
18408
+ * Placeholder Color
18409
+ * @deprecated since Tailwind CSS v3.0.0
18410
+ * @see https://tailwindcss.com/docs/placeholder-color
18411
+ */
18412
+ "placeholder-color": [{
18413
+ placeholder: [colors]
18414
+ }],
18415
+ /**
18416
+ * Placeholder Opacity
18417
+ * @see https://tailwindcss.com/docs/placeholder-opacity
18418
+ */
18419
+ "placeholder-opacity": [{
18420
+ "placeholder-opacity": [opacity]
18421
+ }],
18422
+ /**
18423
+ * Text Alignment
18424
+ * @see https://tailwindcss.com/docs/text-align
18425
+ */
18426
+ "text-alignment": [{
18427
+ text: ["left", "center", "right", "justify", "start", "end"]
18428
+ }],
18429
+ /**
18430
+ * Text Color
18431
+ * @see https://tailwindcss.com/docs/text-color
18432
+ */
18433
+ "text-color": [{
18434
+ text: [colors]
18435
+ }],
18436
+ /**
18437
+ * Text Opacity
18438
+ * @see https://tailwindcss.com/docs/text-opacity
18439
+ */
18440
+ "text-opacity": [{
18441
+ "text-opacity": [opacity]
18442
+ }],
18443
+ /**
18444
+ * Text Decoration
18445
+ * @see https://tailwindcss.com/docs/text-decoration
18446
+ */
18447
+ "text-decoration": ["underline", "overline", "line-through", "no-underline"],
18448
+ /**
18449
+ * Text Decoration Style
18450
+ * @see https://tailwindcss.com/docs/text-decoration-style
18451
+ */
18452
+ "text-decoration-style": [{
18453
+ decoration: [].concat(getLineStyles(), ["wavy"])
18454
+ }],
18455
+ /**
18456
+ * Text Decoration Thickness
18457
+ * @see https://tailwindcss.com/docs/text-decoration-thickness
18458
+ */
18459
+ "text-decoration-thickness": [{
18460
+ decoration: ["auto", "from-font", isLength]
18461
+ }],
18462
+ /**
18463
+ * Text Underline Offset
18464
+ * @see https://tailwindcss.com/docs/text-underline-offset
18465
+ */
18466
+ "underline-offset": [{
18467
+ "underline-offset": ["auto", isLength]
18468
+ }],
18469
+ /**
18470
+ * Text Decoration Color
18471
+ * @see https://tailwindcss.com/docs/text-decoration-color
18472
+ */
18473
+ "text-decoration-color": [{
18474
+ decoration: [colors]
18475
+ }],
18476
+ /**
18477
+ * Text Transform
18478
+ * @see https://tailwindcss.com/docs/text-transform
18479
+ */
18480
+ "text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"],
18481
+ /**
18482
+ * Text Overflow
18483
+ * @see https://tailwindcss.com/docs/text-overflow
18484
+ */
18485
+ "text-overflow": ["truncate", "text-ellipsis", "text-clip"],
18486
+ /**
18487
+ * Text Indent
18488
+ * @see https://tailwindcss.com/docs/text-indent
18489
+ */
18490
+ indent: [{
18491
+ indent: [spacing]
18492
+ }],
18493
+ /**
18494
+ * Vertical Alignment
18495
+ * @see https://tailwindcss.com/docs/vertical-align
18496
+ */
18497
+ "vertical-align": [{
18498
+ align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", isArbitraryLength]
18499
+ }],
18500
+ /**
18501
+ * Whitespace
18502
+ * @see https://tailwindcss.com/docs/whitespace
18503
+ */
18504
+ whitespace: [{
18505
+ whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"]
18506
+ }],
18507
+ /**
18508
+ * Word Break
18509
+ * @see https://tailwindcss.com/docs/word-break
18510
+ */
18511
+ "break": [{
18512
+ "break": ["normal", "words", "all", "keep"]
18513
+ }],
18514
+ /**
18515
+ * Hyphens
18516
+ * @see https://tailwindcss.com/docs/hyphens
18517
+ */
18518
+ hyphens: [{
18519
+ hyphens: ["none", "manual", "auto"]
18520
+ }],
18521
+ /**
18522
+ * Content
18523
+ * @see https://tailwindcss.com/docs/content
18524
+ */
18525
+ content: [{
18526
+ content: ["none", isArbitraryValue]
18527
+ }],
18528
+ // Backgrounds
18529
+ /**
18530
+ * Background Attachment
18531
+ * @see https://tailwindcss.com/docs/background-attachment
18532
+ */
18533
+ "bg-attachment": [{
18534
+ bg: ["fixed", "local", "scroll"]
18535
+ }],
18536
+ /**
18537
+ * Background Clip
18538
+ * @see https://tailwindcss.com/docs/background-clip
18539
+ */
18540
+ "bg-clip": [{
18541
+ "bg-clip": ["border", "padding", "content", "text"]
18542
+ }],
18543
+ /**
18544
+ * Background Opacity
18545
+ * @deprecated since Tailwind CSS v3.0.0
18546
+ * @see https://tailwindcss.com/docs/background-opacity
18547
+ */
18548
+ "bg-opacity": [{
18549
+ "bg-opacity": [opacity]
18550
+ }],
18551
+ /**
18552
+ * Background Origin
18553
+ * @see https://tailwindcss.com/docs/background-origin
18554
+ */
18555
+ "bg-origin": [{
18556
+ "bg-origin": ["border", "padding", "content"]
18557
+ }],
18558
+ /**
18559
+ * Background Position
18560
+ * @see https://tailwindcss.com/docs/background-position
18561
+ */
18562
+ "bg-position": [{
18563
+ bg: [].concat(getPositions(), [isArbitraryPosition])
18564
+ }],
18565
+ /**
18566
+ * Background Repeat
18567
+ * @see https://tailwindcss.com/docs/background-repeat
18568
+ */
18569
+ "bg-repeat": [{
18570
+ bg: ["no-repeat", {
18571
+ repeat: ["", "x", "y", "round", "space"]
18572
+ }]
18573
+ }],
18574
+ /**
18575
+ * Background Size
18576
+ * @see https://tailwindcss.com/docs/background-size
18577
+ */
18578
+ "bg-size": [{
18579
+ bg: ["auto", "cover", "contain", isArbitrarySize]
18580
+ }],
18581
+ /**
18582
+ * Background Image
18583
+ * @see https://tailwindcss.com/docs/background-image
18584
+ */
18585
+ "bg-image": [{
18586
+ bg: ["none", {
18587
+ "gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
18588
+ }, isArbitraryUrl]
18589
+ }],
18590
+ /**
18591
+ * Background Color
18592
+ * @see https://tailwindcss.com/docs/background-color
18593
+ */
18594
+ "bg-color": [{
18595
+ bg: [colors]
18596
+ }],
18597
+ /**
18598
+ * Gradient Color Stops From Position
18599
+ * @see https://tailwindcss.com/docs/gradient-color-stops
18600
+ */
18601
+ "gradient-from-pos": [{
18602
+ from: [gradientColorStopPositions]
18603
+ }],
18604
+ /**
18605
+ * Gradient Color Stops Via Position
18606
+ * @see https://tailwindcss.com/docs/gradient-color-stops
18607
+ */
18608
+ "gradient-via-pos": [{
18609
+ via: [gradientColorStopPositions]
18610
+ }],
18611
+ /**
18612
+ * Gradient Color Stops To Position
18613
+ * @see https://tailwindcss.com/docs/gradient-color-stops
18614
+ */
18615
+ "gradient-to-pos": [{
18616
+ to: [gradientColorStopPositions]
18617
+ }],
18618
+ /**
18619
+ * Gradient Color Stops From
18620
+ * @see https://tailwindcss.com/docs/gradient-color-stops
18621
+ */
18622
+ "gradient-from": [{
18623
+ from: [gradientColorStops]
18624
+ }],
18625
+ /**
18626
+ * Gradient Color Stops Via
18627
+ * @see https://tailwindcss.com/docs/gradient-color-stops
18628
+ */
18629
+ "gradient-via": [{
18630
+ via: [gradientColorStops]
18631
+ }],
18632
+ /**
18633
+ * Gradient Color Stops To
18634
+ * @see https://tailwindcss.com/docs/gradient-color-stops
18635
+ */
18636
+ "gradient-to": [{
18637
+ to: [gradientColorStops]
18638
+ }],
18639
+ // Borders
18640
+ /**
18641
+ * Border Radius
18642
+ * @see https://tailwindcss.com/docs/border-radius
18643
+ */
18644
+ rounded: [{
18645
+ rounded: [borderRadius]
18646
+ }],
18647
+ /**
18648
+ * Border Radius Start
18649
+ * @see https://tailwindcss.com/docs/border-radius
18650
+ */
18651
+ "rounded-s": [{
18652
+ "rounded-s": [borderRadius]
18653
+ }],
18654
+ /**
18655
+ * Border Radius End
18656
+ * @see https://tailwindcss.com/docs/border-radius
18657
+ */
18658
+ "rounded-e": [{
18659
+ "rounded-e": [borderRadius]
18660
+ }],
18661
+ /**
18662
+ * Border Radius Top
18663
+ * @see https://tailwindcss.com/docs/border-radius
18664
+ */
18665
+ "rounded-t": [{
18666
+ "rounded-t": [borderRadius]
18667
+ }],
18668
+ /**
18669
+ * Border Radius Right
18670
+ * @see https://tailwindcss.com/docs/border-radius
18671
+ */
18672
+ "rounded-r": [{
18673
+ "rounded-r": [borderRadius]
18674
+ }],
18675
+ /**
18676
+ * Border Radius Bottom
18677
+ * @see https://tailwindcss.com/docs/border-radius
18678
+ */
18679
+ "rounded-b": [{
18680
+ "rounded-b": [borderRadius]
18681
+ }],
18682
+ /**
18683
+ * Border Radius Left
18684
+ * @see https://tailwindcss.com/docs/border-radius
18685
+ */
18686
+ "rounded-l": [{
18687
+ "rounded-l": [borderRadius]
18688
+ }],
18689
+ /**
18690
+ * Border Radius Start Start
18691
+ * @see https://tailwindcss.com/docs/border-radius
18692
+ */
18693
+ "rounded-ss": [{
18694
+ "rounded-ss": [borderRadius]
18695
+ }],
18696
+ /**
18697
+ * Border Radius Start End
18698
+ * @see https://tailwindcss.com/docs/border-radius
18699
+ */
18700
+ "rounded-se": [{
18701
+ "rounded-se": [borderRadius]
18702
+ }],
18703
+ /**
18704
+ * Border Radius End End
18705
+ * @see https://tailwindcss.com/docs/border-radius
18706
+ */
18707
+ "rounded-ee": [{
18708
+ "rounded-ee": [borderRadius]
18709
+ }],
18710
+ /**
18711
+ * Border Radius End Start
18712
+ * @see https://tailwindcss.com/docs/border-radius
18713
+ */
18714
+ "rounded-es": [{
18715
+ "rounded-es": [borderRadius]
18716
+ }],
18717
+ /**
18718
+ * Border Radius Top Left
18719
+ * @see https://tailwindcss.com/docs/border-radius
18720
+ */
18721
+ "rounded-tl": [{
18722
+ "rounded-tl": [borderRadius]
18723
+ }],
18724
+ /**
18725
+ * Border Radius Top Right
18726
+ * @see https://tailwindcss.com/docs/border-radius
18727
+ */
18728
+ "rounded-tr": [{
18729
+ "rounded-tr": [borderRadius]
18730
+ }],
18731
+ /**
18732
+ * Border Radius Bottom Right
18733
+ * @see https://tailwindcss.com/docs/border-radius
18734
+ */
18735
+ "rounded-br": [{
18736
+ "rounded-br": [borderRadius]
18737
+ }],
18738
+ /**
18739
+ * Border Radius Bottom Left
18740
+ * @see https://tailwindcss.com/docs/border-radius
18741
+ */
18742
+ "rounded-bl": [{
18743
+ "rounded-bl": [borderRadius]
18744
+ }],
18745
+ /**
18746
+ * Border Width
18747
+ * @see https://tailwindcss.com/docs/border-width
18748
+ */
18749
+ "border-w": [{
18750
+ border: [borderWidth]
18751
+ }],
18752
+ /**
18753
+ * Border Width X
18754
+ * @see https://tailwindcss.com/docs/border-width
18755
+ */
18756
+ "border-w-x": [{
18757
+ "border-x": [borderWidth]
18758
+ }],
18759
+ /**
18760
+ * Border Width Y
18761
+ * @see https://tailwindcss.com/docs/border-width
18762
+ */
18763
+ "border-w-y": [{
18764
+ "border-y": [borderWidth]
18765
+ }],
18766
+ /**
18767
+ * Border Width Start
18768
+ * @see https://tailwindcss.com/docs/border-width
18769
+ */
18770
+ "border-w-s": [{
18771
+ "border-s": [borderWidth]
18772
+ }],
18773
+ /**
18774
+ * Border Width End
18775
+ * @see https://tailwindcss.com/docs/border-width
18776
+ */
18777
+ "border-w-e": [{
18778
+ "border-e": [borderWidth]
18779
+ }],
18780
+ /**
18781
+ * Border Width Top
18782
+ * @see https://tailwindcss.com/docs/border-width
18783
+ */
18784
+ "border-w-t": [{
18785
+ "border-t": [borderWidth]
18786
+ }],
18787
+ /**
18788
+ * Border Width Right
18789
+ * @see https://tailwindcss.com/docs/border-width
18790
+ */
18791
+ "border-w-r": [{
18792
+ "border-r": [borderWidth]
18793
+ }],
18794
+ /**
18795
+ * Border Width Bottom
18796
+ * @see https://tailwindcss.com/docs/border-width
18797
+ */
18798
+ "border-w-b": [{
18799
+ "border-b": [borderWidth]
18800
+ }],
18801
+ /**
18802
+ * Border Width Left
18803
+ * @see https://tailwindcss.com/docs/border-width
18804
+ */
18805
+ "border-w-l": [{
18806
+ "border-l": [borderWidth]
18807
+ }],
18808
+ /**
18809
+ * Border Opacity
18810
+ * @see https://tailwindcss.com/docs/border-opacity
18811
+ */
18812
+ "border-opacity": [{
18813
+ "border-opacity": [opacity]
18814
+ }],
18815
+ /**
18816
+ * Border Style
18817
+ * @see https://tailwindcss.com/docs/border-style
18818
+ */
18819
+ "border-style": [{
18820
+ border: [].concat(getLineStyles(), ["hidden"])
18821
+ }],
18822
+ /**
18823
+ * Divide Width X
18824
+ * @see https://tailwindcss.com/docs/divide-width
18825
+ */
18826
+ "divide-x": [{
18827
+ "divide-x": [borderWidth]
18828
+ }],
18829
+ /**
18830
+ * Divide Width X Reverse
18831
+ * @see https://tailwindcss.com/docs/divide-width
18832
+ */
18833
+ "divide-x-reverse": ["divide-x-reverse"],
18834
+ /**
18835
+ * Divide Width Y
18836
+ * @see https://tailwindcss.com/docs/divide-width
18837
+ */
18838
+ "divide-y": [{
18839
+ "divide-y": [borderWidth]
18840
+ }],
18841
+ /**
18842
+ * Divide Width Y Reverse
18843
+ * @see https://tailwindcss.com/docs/divide-width
18844
+ */
18845
+ "divide-y-reverse": ["divide-y-reverse"],
18846
+ /**
18847
+ * Divide Opacity
18848
+ * @see https://tailwindcss.com/docs/divide-opacity
18849
+ */
18850
+ "divide-opacity": [{
18851
+ "divide-opacity": [opacity]
18852
+ }],
18853
+ /**
18854
+ * Divide Style
18855
+ * @see https://tailwindcss.com/docs/divide-style
18856
+ */
18857
+ "divide-style": [{
18858
+ divide: getLineStyles()
18859
+ }],
18860
+ /**
18861
+ * Border Color
18862
+ * @see https://tailwindcss.com/docs/border-color
18863
+ */
18864
+ "border-color": [{
18865
+ border: [borderColor]
18866
+ }],
18867
+ /**
18868
+ * Border Color X
18869
+ * @see https://tailwindcss.com/docs/border-color
18870
+ */
18871
+ "border-color-x": [{
18872
+ "border-x": [borderColor]
18873
+ }],
18874
+ /**
18875
+ * Border Color Y
18876
+ * @see https://tailwindcss.com/docs/border-color
18877
+ */
18878
+ "border-color-y": [{
18879
+ "border-y": [borderColor]
18880
+ }],
18881
+ /**
18882
+ * Border Color Top
18883
+ * @see https://tailwindcss.com/docs/border-color
18884
+ */
18885
+ "border-color-t": [{
18886
+ "border-t": [borderColor]
18887
+ }],
18888
+ /**
18889
+ * Border Color Right
18890
+ * @see https://tailwindcss.com/docs/border-color
18891
+ */
18892
+ "border-color-r": [{
18893
+ "border-r": [borderColor]
18894
+ }],
18895
+ /**
18896
+ * Border Color Bottom
18897
+ * @see https://tailwindcss.com/docs/border-color
18898
+ */
18899
+ "border-color-b": [{
18900
+ "border-b": [borderColor]
18901
+ }],
18902
+ /**
18903
+ * Border Color Left
18904
+ * @see https://tailwindcss.com/docs/border-color
18905
+ */
18906
+ "border-color-l": [{
18907
+ "border-l": [borderColor]
18908
+ }],
18909
+ /**
18910
+ * Divide Color
18911
+ * @see https://tailwindcss.com/docs/divide-color
18912
+ */
18913
+ "divide-color": [{
18914
+ divide: [borderColor]
18915
+ }],
18916
+ /**
18917
+ * Outline Style
18918
+ * @see https://tailwindcss.com/docs/outline-style
18919
+ */
18920
+ "outline-style": [{
18921
+ outline: [""].concat(getLineStyles())
18922
+ }],
18923
+ /**
18924
+ * Outline Offset
18925
+ * @see https://tailwindcss.com/docs/outline-offset
18926
+ */
18927
+ "outline-offset": [{
18928
+ "outline-offset": [isLength]
18929
+ }],
18930
+ /**
18931
+ * Outline Width
18932
+ * @see https://tailwindcss.com/docs/outline-width
18933
+ */
18934
+ "outline-w": [{
18935
+ outline: [isLength]
18936
+ }],
18937
+ /**
18938
+ * Outline Color
18939
+ * @see https://tailwindcss.com/docs/outline-color
18940
+ */
18941
+ "outline-color": [{
18942
+ outline: [colors]
18943
+ }],
18944
+ /**
18945
+ * Ring Width
18946
+ * @see https://tailwindcss.com/docs/ring-width
18947
+ */
18948
+ "ring-w": [{
18949
+ ring: getLengthWithEmpty()
18950
+ }],
18951
+ /**
18952
+ * Ring Width Inset
18953
+ * @see https://tailwindcss.com/docs/ring-width
18954
+ */
18955
+ "ring-w-inset": ["ring-inset"],
18956
+ /**
18957
+ * Ring Color
18958
+ * @see https://tailwindcss.com/docs/ring-color
18959
+ */
18960
+ "ring-color": [{
18961
+ ring: [colors]
18962
+ }],
18963
+ /**
18964
+ * Ring Opacity
18965
+ * @see https://tailwindcss.com/docs/ring-opacity
18966
+ */
18967
+ "ring-opacity": [{
18968
+ "ring-opacity": [opacity]
18969
+ }],
18970
+ /**
18971
+ * Ring Offset Width
18972
+ * @see https://tailwindcss.com/docs/ring-offset-width
18973
+ */
18974
+ "ring-offset-w": [{
18975
+ "ring-offset": [isLength]
18976
+ }],
18977
+ /**
18978
+ * Ring Offset Color
18979
+ * @see https://tailwindcss.com/docs/ring-offset-color
18980
+ */
18981
+ "ring-offset-color": [{
18982
+ "ring-offset": [colors]
18983
+ }],
18984
+ // Effects
18985
+ /**
18986
+ * Box Shadow
18987
+ * @see https://tailwindcss.com/docs/box-shadow
18988
+ */
18989
+ shadow: [{
18990
+ shadow: ["", "inner", "none", isTshirtSize, isArbitraryShadow]
18991
+ }],
18992
+ /**
18993
+ * Box Shadow Color
18994
+ * @see https://tailwindcss.com/docs/box-shadow-color
18995
+ */
18996
+ "shadow-color": [{
18997
+ shadow: [isAny]
18998
+ }],
18999
+ /**
19000
+ * Opacity
19001
+ * @see https://tailwindcss.com/docs/opacity
19002
+ */
19003
+ opacity: [{
19004
+ opacity: [opacity]
19005
+ }],
19006
+ /**
19007
+ * Mix Beldn Mode
19008
+ * @see https://tailwindcss.com/docs/mix-blend-mode
19009
+ */
19010
+ "mix-blend": [{
19011
+ "mix-blend": getBlendModes()
19012
+ }],
19013
+ /**
19014
+ * Background Blend Mode
19015
+ * @see https://tailwindcss.com/docs/background-blend-mode
19016
+ */
19017
+ "bg-blend": [{
19018
+ "bg-blend": getBlendModes()
19019
+ }],
19020
+ // Filters
19021
+ /**
19022
+ * Filter
19023
+ * @deprecated since Tailwind CSS v3.0.0
19024
+ * @see https://tailwindcss.com/docs/filter
19025
+ */
19026
+ filter: [{
19027
+ filter: ["", "none"]
19028
+ }],
19029
+ /**
19030
+ * Blur
19031
+ * @see https://tailwindcss.com/docs/blur
19032
+ */
19033
+ blur: [{
19034
+ blur: [blur]
19035
+ }],
19036
+ /**
19037
+ * Brightness
19038
+ * @see https://tailwindcss.com/docs/brightness
19039
+ */
19040
+ brightness: [{
19041
+ brightness: [brightness]
19042
+ }],
19043
+ /**
19044
+ * Contrast
19045
+ * @see https://tailwindcss.com/docs/contrast
19046
+ */
19047
+ contrast: [{
19048
+ contrast: [contrast]
19049
+ }],
19050
+ /**
19051
+ * Drop Shadow
19052
+ * @see https://tailwindcss.com/docs/drop-shadow
19053
+ */
19054
+ "drop-shadow": [{
19055
+ "drop-shadow": ["", "none", isTshirtSize, isArbitraryValue]
19056
+ }],
19057
+ /**
19058
+ * Grayscale
19059
+ * @see https://tailwindcss.com/docs/grayscale
19060
+ */
19061
+ grayscale: [{
19062
+ grayscale: [grayscale]
19063
+ }],
19064
+ /**
19065
+ * Hue Rotate
19066
+ * @see https://tailwindcss.com/docs/hue-rotate
19067
+ */
19068
+ "hue-rotate": [{
19069
+ "hue-rotate": [hueRotate]
19070
+ }],
19071
+ /**
19072
+ * Invert
19073
+ * @see https://tailwindcss.com/docs/invert
19074
+ */
19075
+ invert: [{
19076
+ invert: [invert]
19077
+ }],
19078
+ /**
19079
+ * Saturate
19080
+ * @see https://tailwindcss.com/docs/saturate
19081
+ */
19082
+ saturate: [{
19083
+ saturate: [saturate]
19084
+ }],
19085
+ /**
19086
+ * Sepia
19087
+ * @see https://tailwindcss.com/docs/sepia
19088
+ */
19089
+ sepia: [{
19090
+ sepia: [sepia]
19091
+ }],
19092
+ /**
19093
+ * Backdrop Filter
19094
+ * @deprecated since Tailwind CSS v3.0.0
19095
+ * @see https://tailwindcss.com/docs/backdrop-filter
19096
+ */
19097
+ "backdrop-filter": [{
19098
+ "backdrop-filter": ["", "none"]
19099
+ }],
19100
+ /**
19101
+ * Backdrop Blur
19102
+ * @see https://tailwindcss.com/docs/backdrop-blur
19103
+ */
19104
+ "backdrop-blur": [{
19105
+ "backdrop-blur": [blur]
19106
+ }],
19107
+ /**
19108
+ * Backdrop Brightness
19109
+ * @see https://tailwindcss.com/docs/backdrop-brightness
19110
+ */
19111
+ "backdrop-brightness": [{
19112
+ "backdrop-brightness": [brightness]
19113
+ }],
19114
+ /**
19115
+ * Backdrop Contrast
19116
+ * @see https://tailwindcss.com/docs/backdrop-contrast
19117
+ */
19118
+ "backdrop-contrast": [{
19119
+ "backdrop-contrast": [contrast]
19120
+ }],
19121
+ /**
19122
+ * Backdrop Grayscale
19123
+ * @see https://tailwindcss.com/docs/backdrop-grayscale
19124
+ */
19125
+ "backdrop-grayscale": [{
19126
+ "backdrop-grayscale": [grayscale]
19127
+ }],
19128
+ /**
19129
+ * Backdrop Hue Rotate
19130
+ * @see https://tailwindcss.com/docs/backdrop-hue-rotate
19131
+ */
19132
+ "backdrop-hue-rotate": [{
19133
+ "backdrop-hue-rotate": [hueRotate]
19134
+ }],
19135
+ /**
19136
+ * Backdrop Invert
19137
+ * @see https://tailwindcss.com/docs/backdrop-invert
19138
+ */
19139
+ "backdrop-invert": [{
19140
+ "backdrop-invert": [invert]
19141
+ }],
19142
+ /**
19143
+ * Backdrop Opacity
19144
+ * @see https://tailwindcss.com/docs/backdrop-opacity
19145
+ */
19146
+ "backdrop-opacity": [{
19147
+ "backdrop-opacity": [opacity]
19148
+ }],
19149
+ /**
19150
+ * Backdrop Saturate
19151
+ * @see https://tailwindcss.com/docs/backdrop-saturate
19152
+ */
19153
+ "backdrop-saturate": [{
19154
+ "backdrop-saturate": [saturate]
19155
+ }],
19156
+ /**
19157
+ * Backdrop Sepia
19158
+ * @see https://tailwindcss.com/docs/backdrop-sepia
19159
+ */
19160
+ "backdrop-sepia": [{
19161
+ "backdrop-sepia": [sepia]
19162
+ }],
19163
+ // Tables
19164
+ /**
19165
+ * Border Collapse
19166
+ * @see https://tailwindcss.com/docs/border-collapse
19167
+ */
19168
+ "border-collapse": [{
19169
+ border: ["collapse", "separate"]
19170
+ }],
19171
+ /**
19172
+ * Border Spacing
19173
+ * @see https://tailwindcss.com/docs/border-spacing
19174
+ */
19175
+ "border-spacing": [{
19176
+ "border-spacing": [borderSpacing]
19177
+ }],
19178
+ /**
19179
+ * Border Spacing X
19180
+ * @see https://tailwindcss.com/docs/border-spacing
19181
+ */
19182
+ "border-spacing-x": [{
19183
+ "border-spacing-x": [borderSpacing]
19184
+ }],
19185
+ /**
19186
+ * Border Spacing Y
19187
+ * @see https://tailwindcss.com/docs/border-spacing
19188
+ */
19189
+ "border-spacing-y": [{
19190
+ "border-spacing-y": [borderSpacing]
19191
+ }],
19192
+ /**
19193
+ * Table Layout
19194
+ * @see https://tailwindcss.com/docs/table-layout
19195
+ */
19196
+ "table-layout": [{
19197
+ table: ["auto", "fixed"]
19198
+ }],
19199
+ /**
19200
+ * Caption Side
19201
+ * @see https://tailwindcss.com/docs/caption-side
19202
+ */
19203
+ caption: [{
19204
+ caption: ["top", "bottom"]
19205
+ }],
19206
+ // Transitions and Animation
19207
+ /**
19208
+ * Tranisition Property
19209
+ * @see https://tailwindcss.com/docs/transition-property
19210
+ */
19211
+ transition: [{
19212
+ transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", isArbitraryValue]
19213
+ }],
19214
+ /**
19215
+ * Transition Duration
19216
+ * @see https://tailwindcss.com/docs/transition-duration
19217
+ */
19218
+ duration: [{
19219
+ duration: getNumberAndArbitrary()
19220
+ }],
19221
+ /**
19222
+ * Transition Timing Function
19223
+ * @see https://tailwindcss.com/docs/transition-timing-function
19224
+ */
19225
+ ease: [{
19226
+ ease: ["linear", "in", "out", "in-out", isArbitraryValue]
19227
+ }],
19228
+ /**
19229
+ * Transition Delay
19230
+ * @see https://tailwindcss.com/docs/transition-delay
19231
+ */
19232
+ delay: [{
19233
+ delay: getNumberAndArbitrary()
19234
+ }],
19235
+ /**
19236
+ * Animation
19237
+ * @see https://tailwindcss.com/docs/animation
19238
+ */
19239
+ animate: [{
19240
+ animate: ["none", "spin", "ping", "pulse", "bounce", isArbitraryValue]
19241
+ }],
19242
+ // Transforms
19243
+ /**
19244
+ * Transform
19245
+ * @see https://tailwindcss.com/docs/transform
19246
+ */
19247
+ transform: [{
19248
+ transform: ["", "gpu", "none"]
19249
+ }],
19250
+ /**
19251
+ * Scale
19252
+ * @see https://tailwindcss.com/docs/scale
19253
+ */
19254
+ scale: [{
19255
+ scale: [scale]
19256
+ }],
19257
+ /**
19258
+ * Scale X
19259
+ * @see https://tailwindcss.com/docs/scale
19260
+ */
19261
+ "scale-x": [{
19262
+ "scale-x": [scale]
19263
+ }],
19264
+ /**
19265
+ * Scale Y
19266
+ * @see https://tailwindcss.com/docs/scale
19267
+ */
19268
+ "scale-y": [{
19269
+ "scale-y": [scale]
19270
+ }],
19271
+ /**
19272
+ * Rotate
19273
+ * @see https://tailwindcss.com/docs/rotate
19274
+ */
19275
+ rotate: [{
19276
+ rotate: [isInteger, isArbitraryValue]
19277
+ }],
19278
+ /**
19279
+ * Translate X
19280
+ * @see https://tailwindcss.com/docs/translate
19281
+ */
19282
+ "translate-x": [{
19283
+ "translate-x": [translate]
19284
+ }],
19285
+ /**
19286
+ * Translate Y
19287
+ * @see https://tailwindcss.com/docs/translate
19288
+ */
19289
+ "translate-y": [{
19290
+ "translate-y": [translate]
19291
+ }],
19292
+ /**
19293
+ * Skew X
19294
+ * @see https://tailwindcss.com/docs/skew
19295
+ */
19296
+ "skew-x": [{
19297
+ "skew-x": [skew]
19298
+ }],
19299
+ /**
19300
+ * Skew Y
19301
+ * @see https://tailwindcss.com/docs/skew
19302
+ */
19303
+ "skew-y": [{
19304
+ "skew-y": [skew]
19305
+ }],
19306
+ /**
19307
+ * Transform Origin
19308
+ * @see https://tailwindcss.com/docs/transform-origin
19309
+ */
19310
+ "transform-origin": [{
19311
+ origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", isArbitraryValue]
19312
+ }],
19313
+ // Interactivity
19314
+ /**
19315
+ * Accent Color
19316
+ * @see https://tailwindcss.com/docs/accent-color
19317
+ */
19318
+ accent: [{
19319
+ accent: ["auto", colors]
19320
+ }],
19321
+ /**
19322
+ * Appearance
19323
+ * @see https://tailwindcss.com/docs/appearance
19324
+ */
19325
+ appearance: ["appearance-none"],
19326
+ /**
19327
+ * Cursor
19328
+ * @see https://tailwindcss.com/docs/cursor
19329
+ */
19330
+ cursor: [{
19331
+ cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", isArbitraryValue]
19332
+ }],
19333
+ /**
19334
+ * Caret Color
19335
+ * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
19336
+ */
19337
+ "caret-color": [{
19338
+ caret: [colors]
19339
+ }],
19340
+ /**
19341
+ * Pointer Events
19342
+ * @see https://tailwindcss.com/docs/pointer-events
19343
+ */
19344
+ "pointer-events": [{
19345
+ "pointer-events": ["none", "auto"]
19346
+ }],
19347
+ /**
19348
+ * Resize
19349
+ * @see https://tailwindcss.com/docs/resize
19350
+ */
19351
+ resize: [{
19352
+ resize: ["none", "y", "x", ""]
19353
+ }],
19354
+ /**
19355
+ * Scroll Behavior
19356
+ * @see https://tailwindcss.com/docs/scroll-behavior
19357
+ */
19358
+ "scroll-behavior": [{
19359
+ scroll: ["auto", "smooth"]
19360
+ }],
19361
+ /**
19362
+ * Scroll Margin
19363
+ * @see https://tailwindcss.com/docs/scroll-margin
19364
+ */
19365
+ "scroll-m": [{
19366
+ "scroll-m": [spacing]
19367
+ }],
19368
+ /**
19369
+ * Scroll Margin X
19370
+ * @see https://tailwindcss.com/docs/scroll-margin
19371
+ */
19372
+ "scroll-mx": [{
19373
+ "scroll-mx": [spacing]
19374
+ }],
19375
+ /**
19376
+ * Scroll Margin Y
19377
+ * @see https://tailwindcss.com/docs/scroll-margin
19378
+ */
19379
+ "scroll-my": [{
19380
+ "scroll-my": [spacing]
19381
+ }],
19382
+ /**
19383
+ * Scroll Margin Start
19384
+ * @see https://tailwindcss.com/docs/scroll-margin
19385
+ */
19386
+ "scroll-ms": [{
19387
+ "scroll-ms": [spacing]
19388
+ }],
19389
+ /**
19390
+ * Scroll Margin End
19391
+ * @see https://tailwindcss.com/docs/scroll-margin
19392
+ */
19393
+ "scroll-me": [{
19394
+ "scroll-me": [spacing]
19395
+ }],
19396
+ /**
19397
+ * Scroll Margin Top
19398
+ * @see https://tailwindcss.com/docs/scroll-margin
19399
+ */
19400
+ "scroll-mt": [{
19401
+ "scroll-mt": [spacing]
19402
+ }],
19403
+ /**
19404
+ * Scroll Margin Right
19405
+ * @see https://tailwindcss.com/docs/scroll-margin
19406
+ */
19407
+ "scroll-mr": [{
19408
+ "scroll-mr": [spacing]
19409
+ }],
19410
+ /**
19411
+ * Scroll Margin Bottom
19412
+ * @see https://tailwindcss.com/docs/scroll-margin
19413
+ */
19414
+ "scroll-mb": [{
19415
+ "scroll-mb": [spacing]
19416
+ }],
19417
+ /**
19418
+ * Scroll Margin Left
19419
+ * @see https://tailwindcss.com/docs/scroll-margin
19420
+ */
19421
+ "scroll-ml": [{
19422
+ "scroll-ml": [spacing]
19423
+ }],
19424
+ /**
19425
+ * Scroll Padding
19426
+ * @see https://tailwindcss.com/docs/scroll-padding
19427
+ */
19428
+ "scroll-p": [{
19429
+ "scroll-p": [spacing]
19430
+ }],
19431
+ /**
19432
+ * Scroll Padding X
19433
+ * @see https://tailwindcss.com/docs/scroll-padding
19434
+ */
19435
+ "scroll-px": [{
19436
+ "scroll-px": [spacing]
19437
+ }],
19438
+ /**
19439
+ * Scroll Padding Y
19440
+ * @see https://tailwindcss.com/docs/scroll-padding
19441
+ */
19442
+ "scroll-py": [{
19443
+ "scroll-py": [spacing]
19444
+ }],
19445
+ /**
19446
+ * Scroll Padding Start
19447
+ * @see https://tailwindcss.com/docs/scroll-padding
19448
+ */
19449
+ "scroll-ps": [{
19450
+ "scroll-ps": [spacing]
19451
+ }],
19452
+ /**
19453
+ * Scroll Padding End
19454
+ * @see https://tailwindcss.com/docs/scroll-padding
19455
+ */
19456
+ "scroll-pe": [{
19457
+ "scroll-pe": [spacing]
19458
+ }],
19459
+ /**
19460
+ * Scroll Padding Top
19461
+ * @see https://tailwindcss.com/docs/scroll-padding
19462
+ */
19463
+ "scroll-pt": [{
19464
+ "scroll-pt": [spacing]
19465
+ }],
19466
+ /**
19467
+ * Scroll Padding Right
19468
+ * @see https://tailwindcss.com/docs/scroll-padding
19469
+ */
19470
+ "scroll-pr": [{
19471
+ "scroll-pr": [spacing]
19472
+ }],
19473
+ /**
19474
+ * Scroll Padding Bottom
19475
+ * @see https://tailwindcss.com/docs/scroll-padding
19476
+ */
19477
+ "scroll-pb": [{
19478
+ "scroll-pb": [spacing]
19479
+ }],
19480
+ /**
19481
+ * Scroll Padding Left
19482
+ * @see https://tailwindcss.com/docs/scroll-padding
19483
+ */
19484
+ "scroll-pl": [{
19485
+ "scroll-pl": [spacing]
19486
+ }],
19487
+ /**
19488
+ * Scroll Snap Align
19489
+ * @see https://tailwindcss.com/docs/scroll-snap-align
19490
+ */
19491
+ "snap-align": [{
19492
+ snap: ["start", "end", "center", "align-none"]
19493
+ }],
19494
+ /**
19495
+ * Scroll Snap Stop
19496
+ * @see https://tailwindcss.com/docs/scroll-snap-stop
19497
+ */
19498
+ "snap-stop": [{
19499
+ snap: ["normal", "always"]
19500
+ }],
19501
+ /**
19502
+ * Scroll Snap Type
19503
+ * @see https://tailwindcss.com/docs/scroll-snap-type
19504
+ */
19505
+ "snap-type": [{
19506
+ snap: ["none", "x", "y", "both"]
19507
+ }],
19508
+ /**
19509
+ * Scroll Snap Type Strictness
19510
+ * @see https://tailwindcss.com/docs/scroll-snap-type
19511
+ */
19512
+ "snap-strictness": [{
19513
+ snap: ["mandatory", "proximity"]
19514
+ }],
19515
+ /**
19516
+ * Touch Action
19517
+ * @see https://tailwindcss.com/docs/touch-action
19518
+ */
19519
+ touch: [{
19520
+ touch: ["auto", "none", "pinch-zoom", "manipulation", {
19521
+ pan: ["x", "left", "right", "y", "up", "down"]
19522
+ }]
19523
+ }],
19524
+ /**
19525
+ * User Select
19526
+ * @see https://tailwindcss.com/docs/user-select
19527
+ */
19528
+ select: [{
19529
+ select: ["none", "text", "all", "auto"]
19530
+ }],
19531
+ /**
19532
+ * Will Change
19533
+ * @see https://tailwindcss.com/docs/will-change
19534
+ */
19535
+ "will-change": [{
19536
+ "will-change": ["auto", "scroll", "contents", "transform", isArbitraryValue]
19537
+ }],
19538
+ // SVG
19539
+ /**
19540
+ * Fill
19541
+ * @see https://tailwindcss.com/docs/fill
19542
+ */
19543
+ fill: [{
19544
+ fill: [colors, "none"]
19545
+ }],
19546
+ /**
19547
+ * Stroke Width
19548
+ * @see https://tailwindcss.com/docs/stroke-width
19549
+ */
19550
+ "stroke-w": [{
19551
+ stroke: [isLength, isArbitraryNumber]
19552
+ }],
19553
+ /**
19554
+ * Stroke
19555
+ * @see https://tailwindcss.com/docs/stroke
19556
+ */
19557
+ stroke: [{
19558
+ stroke: [colors, "none"]
19559
+ }],
19560
+ // Accessibility
19561
+ /**
19562
+ * Screen Readers
19563
+ * @see https://tailwindcss.com/docs/screen-readers
19564
+ */
19565
+ sr: ["sr-only", "not-sr-only"]
19566
+ },
19567
+ conflictingClassGroups: {
19568
+ overflow: ["overflow-x", "overflow-y"],
19569
+ overscroll: ["overscroll-x", "overscroll-y"],
19570
+ inset: ["inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left"],
19571
+ "inset-x": ["right", "left"],
19572
+ "inset-y": ["top", "bottom"],
19573
+ flex: ["basis", "grow", "shrink"],
19574
+ gap: ["gap-x", "gap-y"],
19575
+ p: ["px", "py", "ps", "pe", "pt", "pr", "pb", "pl"],
19576
+ px: ["pr", "pl"],
19577
+ py: ["pt", "pb"],
19578
+ m: ["mx", "my", "ms", "me", "mt", "mr", "mb", "ml"],
19579
+ mx: ["mr", "ml"],
19580
+ my: ["mt", "mb"],
19581
+ "font-size": ["leading"],
19582
+ "fvn-normal": ["fvn-ordinal", "fvn-slashed-zero", "fvn-figure", "fvn-spacing", "fvn-fraction"],
19583
+ "fvn-ordinal": ["fvn-normal"],
19584
+ "fvn-slashed-zero": ["fvn-normal"],
19585
+ "fvn-figure": ["fvn-normal"],
19586
+ "fvn-spacing": ["fvn-normal"],
19587
+ "fvn-fraction": ["fvn-normal"],
19588
+ rounded: ["rounded-s", "rounded-e", "rounded-t", "rounded-r", "rounded-b", "rounded-l", "rounded-ss", "rounded-se", "rounded-ee", "rounded-es", "rounded-tl", "rounded-tr", "rounded-br", "rounded-bl"],
19589
+ "rounded-s": ["rounded-ss", "rounded-es"],
19590
+ "rounded-e": ["rounded-se", "rounded-ee"],
19591
+ "rounded-t": ["rounded-tl", "rounded-tr"],
19592
+ "rounded-r": ["rounded-tr", "rounded-br"],
19593
+ "rounded-b": ["rounded-br", "rounded-bl"],
19594
+ "rounded-l": ["rounded-tl", "rounded-bl"],
19595
+ "border-spacing": ["border-spacing-x", "border-spacing-y"],
19596
+ "border-w": ["border-w-s", "border-w-e", "border-w-t", "border-w-r", "border-w-b", "border-w-l"],
19597
+ "border-w-x": ["border-w-r", "border-w-l"],
19598
+ "border-w-y": ["border-w-t", "border-w-b"],
19599
+ "border-color": ["border-color-t", "border-color-r", "border-color-b", "border-color-l"],
19600
+ "border-color-x": ["border-color-r", "border-color-l"],
19601
+ "border-color-y": ["border-color-t", "border-color-b"],
19602
+ "scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
19603
+ "scroll-mx": ["scroll-mr", "scroll-ml"],
19604
+ "scroll-my": ["scroll-mt", "scroll-mb"],
19605
+ "scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"],
19606
+ "scroll-px": ["scroll-pr", "scroll-pl"],
19607
+ "scroll-py": ["scroll-pt", "scroll-pb"]
19608
+ },
19609
+ conflictingClassGroupModifiers: {
19610
+ "font-size": ["leading"]
19611
+ }
19612
+ };
19613
+ }
19614
+
19615
+ // ../../node_modules/tailwind-merge/dist/lib/tw-merge.mjs
19616
+ var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
19617
+
19618
+ // src/Components/Generic/Map/MapControlToolbar.tsx
19619
+ var import_jsx_runtime80 = require("react/jsx-runtime");
19620
+ function cn2(...inputs) {
19621
+ return twMerge(clsx(inputs));
19622
+ }
19623
+ var POSITION_CLASSES3 = {
19624
+ topleft: "absolute top-4 left-4",
19625
+ topright: "absolute top-4 right-4",
19626
+ bottomleft: "absolute bottom-4 left-4",
19627
+ bottomright: "absolute bottom-4 right-4"
19628
+ };
19629
+ var getDefaultDirection = (position) => {
19630
+ switch (position) {
19631
+ case "topleft":
19632
+ case "bottomleft":
19633
+ return "right";
19634
+ case "topright":
19635
+ case "bottomright":
19636
+ return "left";
19637
+ default:
19638
+ return "right";
19639
+ }
19640
+ };
19641
+ var MapControlToolbar = ({
19642
+ controls,
19643
+ onToggleControl
19644
+ }) => {
19645
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_ui45.TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "pointer-events-none", children: Object.entries(controls.reduce((acc, control) => {
19646
+ var _a, _b;
19647
+ const position = (_a = control.position) != null ? _a : "topright";
19648
+ acc[position] = (_b = acc[position]) != null ? _b : [];
19649
+ acc[position].push(control);
19650
+ return acc;
19651
+ }, {})).map(([position, items]) => /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: cn2(POSITION_CLASSES3[position], "pointer-events-auto"), children: items.map((control) => {
19652
+ var _a;
19653
+ const Icon3 = control.icon;
19654
+ const popoverDirection = control.popoverDirection || getDefaultDirection((_a = control.position) != null ? _a : "topright");
19655
+ if (control.isDisplayOnly) {
19656
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
19657
+ "div",
19658
+ {
19659
+ className: "pointer-events-auto",
19660
+ children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Icon3, { className: "w-6 h-6" })
19661
+ },
19662
+ control.id
19663
+ );
19664
+ }
19665
+ if (control.onClick && !control.panel) {
19666
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
19667
+ "div",
19668
+ {
19669
+ className: "pointer-events-auto",
19670
+ children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_ui45.Tooltip, { delayDuration: 100, children: [
19671
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_ui45.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
19672
+ "button",
19673
+ {
19674
+ onClick: control.onClick,
19675
+ className: "p-[11px] w-12 h-12 flex justify-center items-center rounded-full shadow-xl transition-colors bg-white hover:bg-gray-50 text-gray-700",
19676
+ children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Icon3, { className: "w-6 h-6" })
19677
+ }
19678
+ ) }),
19679
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
19680
+ import_ui45.TooltipContent,
19681
+ {
19682
+ side: "right",
19683
+ className: "bg-secondary font-semibold text-foreground",
19684
+ children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("p", { children: control.title })
19685
+ }
19686
+ )
19687
+ ] })
19688
+ },
19689
+ control.id
19690
+ );
19691
+ }
19692
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
19693
+ "div",
19694
+ {
19695
+ className: "pointer-events-auto",
19696
+ children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(Popover7.Root, { open: control.isOpen, children: [
19697
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_ui45.Tooltip, { delayDuration: 100, children: [
19698
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Popover7.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_ui45.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
19699
+ "button",
19700
+ {
19701
+ onClick: () => onToggleControl(control.id),
19702
+ className: cn2(
19703
+ "p-[11px] w-12 h-12 flex justify-center items-center rounded-full shadow-xl transition-colors",
19704
+ control.isOpen ? "bg-primary text-white" : "bg-white hover:bg-gray-50 text-gray-700"
19705
+ ),
19706
+ children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Icon3, { className: "w-6 h-6" })
19707
+ }
19708
+ ) }) }),
19709
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
19710
+ import_ui45.TooltipContent,
19711
+ {
19712
+ side: "right",
19713
+ className: "bg-secondary font-semibold text-foreground",
19714
+ children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("p", { children: control.title })
19715
+ }
19716
+ )
19717
+ ] }),
19718
+ control.panel ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Popover7.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
19719
+ Popover7.Content,
19720
+ {
19721
+ className: "bg-white p-4 rounded-lg shadow-lg min-w-[250px] z-[10] max-w-[380px] hidden lg:block",
19722
+ side: popoverDirection,
19723
+ align: control.position === "bottomright" ? "end" : "start",
19724
+ sideOffset: 5,
19725
+ children: [
19726
+ control.panel,
19727
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Popover7.Arrow, { className: "fill-white" })
19728
+ ]
19729
+ }
19730
+ ) }) : null
19731
+ ] })
19732
+ },
19733
+ control.id
19734
+ );
19735
+ }) }, position)) }) });
19736
+ };
19737
+ MapControlToolbar.displayName = "MapControlToolbar";
19738
+
19739
+ // src/Components/Map/MapLibre.tsx
19740
+ var import_ui46 = require("@geowiki/ui");
19741
+ var import_jsx_runtime81 = require("react/jsx-runtime");
19742
+ var MapLibre = (0, import_react67.forwardRef)(({ baseLayers, customLayers, mapControls, sourceData }, ref) => {
19743
+ const mapContainer = ref;
19744
+ const mapRef = (0, import_react66.useRef)(null);
19745
+ const changeMapProjection = () => {
19746
+ var _a;
19747
+ if (!mapRef.current)
19748
+ return;
19749
+ const map = mapRef.current;
19750
+ const currentProjection = (_a = map.getProjection()) == null ? void 0 : _a.type;
19751
+ const newProjection = currentProjection === "mercator" ? "globe" : "mercator";
19752
+ map.setProjection({
19753
+ type: newProjection
19754
+ });
19755
+ };
19756
+ const zoomIn = () => {
19757
+ if (!mapRef.current)
19758
+ return;
19759
+ const map = mapRef.current;
19760
+ map.zoomIn();
19761
+ };
19762
+ const zoomOut = () => {
19763
+ if (!mapRef.current)
19764
+ return;
19765
+ const map = mapRef.current;
19766
+ map.zoomOut();
19767
+ };
19768
+ function getLayersByPattern(map, pattern) {
19769
+ return map.getStyle().layers.filter((layer) => pattern.test(layer.id)).map((layer) => layer.id);
19770
+ }
19771
+ const handleToggle = (layerId) => {
19772
+ if (!mapRef.current)
19773
+ return;
19774
+ const map = mapRef.current;
19775
+ const layers = getLayersByPattern(map, new RegExp(layerId));
19776
+ layers.forEach((id) => {
19777
+ const visibility = map.getLayoutProperty(id, "visibility");
19778
+ const newVisibility = visibility === "none" ? "visible" : "none";
19779
+ map.setLayoutProperty(id, "visibility", newVisibility);
19780
+ });
19781
+ };
19782
+ const buildControls = (controls) => {
19783
+ return controls.map((c) => {
19784
+ switch (c.type) {
19785
+ case "projection":
19786
+ return {
19787
+ id: "projection",
19788
+ title: "Change Projection",
19789
+ icon: import_ui46.GlobeIcon,
19790
+ onClick: changeMapProjection,
19791
+ position: "topright",
19792
+ isOpen: true,
19793
+ isDisplayOnly: false,
19794
+ popoverDirection: "right",
19795
+ isMobileFilter: true
19796
+ };
19797
+ case "zoom":
19798
+ return [
19799
+ {
19800
+ id: "zoomIn",
19801
+ icon: import_ui46.PlusIcon,
19802
+ onClick: zoomIn,
19803
+ position: "topright",
19804
+ isOpen: true,
19805
+ isDisplayOnly: false,
19806
+ popoverDirection: "right",
19807
+ isMobileFilter: true
19808
+ },
19809
+ {
19810
+ id: "zoomOut",
19811
+ icon: import_ui46.MinusIcon,
19812
+ onClick: zoomOut,
19813
+ position: "topright",
19814
+ isOpen: true,
19815
+ isDisplayOnly: false,
19816
+ popoverDirection: "right",
19817
+ isMobileFilter: true
19818
+ }
19819
+ ];
19820
+ case "toggle_layers":
19821
+ let custom_layers = customLayers == null ? void 0 : customLayers.map((l) => __spreadProps(__spreadValues({}, l), {
19822
+ ontoggle: () => handleToggle(l.id)
19823
+ }));
19824
+ return {
19825
+ id: "overlay",
19826
+ icon: import_ui46.LayerGroupIcon,
19827
+ panel: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
19828
+ LayerSwitcher2,
19829
+ {
19830
+ mapMenuItems: [
19831
+ {
19832
+ MapMenuItem: {},
19833
+ Layers: [],
19834
+ Title: ""
19835
+ }
19836
+ ],
19837
+ customLayers: custom_layers
19838
+ }
19839
+ ),
19840
+ position: "topleft",
19841
+ isOpen: false,
19842
+ isDisplayOnly: false,
19843
+ popoverDirection: "right",
19844
+ isMobileFilter: true
19845
+ };
19846
+ default:
19847
+ return null;
19848
+ }
19849
+ }).flat();
19850
+ };
19851
+ const [mapControl, setMapControl] = (0, import_react66.useState)(() => buildControls(mapControls));
19852
+ console.log(mapControl);
19853
+ const toggleControl = (id) => {
19854
+ setMapControl((prevControls) => prevControls.map((control) => {
19855
+ if (control.id === id) {
19856
+ return __spreadProps(__spreadValues({}, control), { isOpen: !control.isOpen });
19857
+ }
19858
+ return control;
19859
+ }));
19860
+ };
19861
+ (0, import_react66.useEffect)(() => {
19862
+ if (typeof mapContainer === "function")
19863
+ return;
19864
+ if (!(mapContainer == null ? void 0 : mapContainer.current))
19865
+ return;
19866
+ if (!sourceData)
19867
+ return;
19868
+ const map = new import_maplibre_gl.default.Map({
19869
+ container: mapContainer == null ? void 0 : mapContainer.current,
19870
+ style: {
19871
+ version: 8,
19872
+ sources: {
19873
+ osm: {
19874
+ type: "raster",
19875
+ tiles: ["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png"],
19876
+ tileSize: 256,
19877
+ attribution: "&copy; OpenStreetMap Contributors",
19878
+ maxzoom: 19
19879
+ }
19880
+ },
19881
+ layers: [
19882
+ {
19883
+ id: "osm",
19884
+ type: "raster",
19885
+ source: "osm"
19886
+ }
19887
+ ],
19888
+ sky: {}
19889
+ },
19890
+ center: [16.3713, 48.2081],
19891
+ zoom: 3,
19892
+ minZoom: 1.5,
19893
+ renderWorldCopies: false,
19894
+ canvasContextAttributes: { antialias: true }
19895
+ });
19896
+ mapRef.current = map;
19897
+ map.scrollZoom.disable();
19898
+ mapRef.current.getContainer().addEventListener("mouseenter", () => map.scrollZoom.enable());
19899
+ mapRef.current.getContainer().addEventListener("mouseleave", () => map.scrollZoom.disable());
19900
+ function loadSvgImage() {
19901
+ return __async(this, null, function* () {
19902
+ let svgText = (0, import_server8.renderToStaticMarkup)(
19903
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_MapPinIcon4.default, { className: "w-6 h-6" })
19904
+ );
19905
+ svgText = svgText.replace('fill="currentColor"', 'fill="#06b6d4"');
19906
+ const img = new Image();
19907
+ img.src = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(svgText);
19908
+ img.width = 35;
19909
+ img.height = 35;
19910
+ yield img.decode();
19911
+ return img;
19912
+ });
19913
+ }
19914
+ map.on("load", () => __async(void 0, null, function* () {
19915
+ changeMapProjection();
19916
+ baseLayers == null ? void 0 : baseLayers.forEach((layer) => {
19917
+ map.addSource(layer.name, {
19918
+ type: layer.type,
19919
+ url: layer.url,
19920
+ tileSize: layer.tileSize
19921
+ });
19922
+ if (layer.layer_type == "terrainSource")
19923
+ map.setTerrain({
19924
+ source: "terrainSource",
19925
+ exaggeration: 1
19926
+ });
19927
+ if (layer.layer_type == "hillshade")
19928
+ map.addLayer({
19929
+ id: layer.name,
19930
+ type: layer.layer_type,
19931
+ source: layer.name,
19932
+ paint: { "hillshade-shadow-color": "#473B24" },
19933
+ layout: { visibility: "visible" }
19934
+ });
19935
+ });
19936
+ sourceData == null ? void 0 : sourceData.forEach((source) => __async(void 0, null, function* () {
19937
+ if (source.is_cluster) {
19938
+ map.addSource(source.name, {
19939
+ type: source.type,
19940
+ data: source.data,
19941
+ cluster: true,
19942
+ clusterMaxZoom: 10,
19943
+ clusterRadius: 50
19944
+ });
19945
+ }
19946
+ if (source.show_cluster_count) {
19947
+ map.addLayer({
19948
+ id: `${source.name}-cluster-circles`,
19949
+ type: "circle",
19950
+ source: source.name,
19951
+ filter: ["has", "point_count"],
19952
+ paint: {
19953
+ "circle-color": source.style.cluster_color,
19954
+ "circle-opacity": 1,
19955
+ "circle-radius": 20,
19956
+ "circle-stroke-width": 4,
19957
+ "circle-stroke-color": source.style.cluster_stroke_color
19958
+ }
19959
+ });
19960
+ map.addLayer({
19961
+ id: `${source.name}-cluster-count`,
19962
+ type: "symbol",
19963
+ source: source.name,
19964
+ filter: ["has", "point_count"],
19965
+ layout: {
19966
+ "text-field": "{point_count_abbreviated}",
19967
+ "text-font": ["Open Sans Bold"],
19968
+ "text-size": 14
19969
+ },
19970
+ paint: {
19971
+ "text-color": "#f7f2f2"
19972
+ }
19973
+ });
19974
+ if (!map.hasImage("pin")) {
19975
+ const img = yield loadSvgImage();
19976
+ map.addImage("pin", img);
19977
+ }
19978
+ map.addLayer({
19979
+ id: source.name + "-count",
19980
+ type: "symbol",
19981
+ source: source.name,
19982
+ filter: ["!", ["has", "point_count"]],
19983
+ layout: {
19984
+ "icon-image": "pin",
19985
+ "icon-size": 1,
19986
+ "icon-allow-overlap": true,
19987
+ "icon-anchor": "bottom"
19988
+ }
19989
+ });
19990
+ }
19991
+ }));
19992
+ }));
19993
+ return () => {
19994
+ map.remove();
19995
+ };
19996
+ }, [sourceData, mapControls]);
19997
+ if (!sourceData)
19998
+ return;
19999
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "relative", style: { width: "100%", height: "100vh" }, children: [
20000
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { ref: mapContainer, className: "w-full h-full" }),
20001
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(MapControlToolbar, { controls: mapControl, onToggleControl: (id) => toggleControl(id) })
20002
+ ] });
16839
20003
  });
16840
20004
  // Annotate the CommonJS export names for ESM import in node:
16841
20005
  0 && (module.exports = {