@overmap-ai/core 1.0.57-export-overmap-reducer.2 → 1.0.57-export-overmap-reducer.4

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.
@@ -6,9 +6,9 @@ var __publicField = (obj, key, value) => {
6
6
  };
7
7
  var _a;
8
8
  import * as React from "react";
9
- import React__default, { useState, useEffect, useRef, useMemo, memo, useCallback, createContext, createElement, useContext, forwardRef, Children, isValidElement, cloneElement, Fragment as Fragment$1, useLayoutEffect, useReducer, lazy, Suspense } from "react";
10
- import { jsx, jsxs, Fragment } from "react/jsx-runtime";
11
- import { unsafeShowToast, AlertDialogProvider, ToastProvider, DefaultTheme, Flex as Flex$1, IconButton, RiIcon, Text as Text$1, useSeverityColor, TextArea, Select, useToast, Badge, MultiSelect, Overlay, Button, Spinner, useViewportSize, ButtonGroup, IconColorUtility, Tooltip, Popover, useSize, ToggleButton, Separator, OvermapItem, ButtonList, divButtonProps, OvermapDropdownMenu, Checkbox as Checkbox$1, Input, useAlertDialog } from "@overmap-ai/blocks";
9
+ import React__default, { useState, useEffect, useRef, useMemo, useCallback, createContext, createElement, useContext, forwardRef, Children, isValidElement, cloneElement, Fragment, useLayoutEffect, useReducer, memo, lazy, Suspense } from "react";
10
+ import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
11
+ import { unsafeShowToast, AlertDialogProvider, ToastProvider, DefaultTheme, IconButton, RiIcon, useSeverityColor, TextArea, Select, useToast, Badge, MultiSelect, Overlay, Button, Spinner, useViewportSize, ButtonGroup, IconColorUtility, Tooltip, Popover, useSize, ToggleButton, OvermapItem, ButtonList, divButtonProps, OvermapDropdownMenu, Input, useAlertDialog } from "@overmap-ai/blocks";
12
12
  import { DepGraph } from "dependency-graph";
13
13
  import saveAs$1, { saveAs } from "file-saver";
14
14
  import { offline as offline$1 } from "@redux-offline/redux-offline";
@@ -2849,6 +2849,12 @@ const selectActiveProject = (state) => {
2849
2849
  const selectRecentProjects = (state) => {
2850
2850
  return state.projectReducer.recentProjectIds;
2851
2851
  };
2852
+ const selectProject = restructureCreateSelectorWithArgs(
2853
+ createSelector(
2854
+ [selectProjects, (_state, projectId) => projectId],
2855
+ (projects, projectId) => projects[projectId]
2856
+ )
2857
+ );
2852
2858
  const selectSortedProjects = createSelector(
2853
2859
  [selectActiveProject, selectProjects],
2854
2860
  (activeProject, projects) => {
@@ -3220,15 +3226,17 @@ const rehydratedSlice = createSlice({
3220
3226
  }
3221
3227
  }
3222
3228
  });
3229
+ const { setRehydrated } = rehydratedSlice.actions;
3223
3230
  const selectRehydrated = (state) => state.rehydratedReducer.isRehydrated;
3224
3231
  const rehydratedReducer = rehydratedSlice.reducer;
3225
3232
  const initialState$8 = {
3226
3233
  useIssueTemplate: false,
3234
+ // TODO: marked for deletion
3227
3235
  placementMode: false,
3228
3236
  enableClustering: false,
3229
3237
  svgLayout: false,
3230
- // TODO: this is no longer used
3231
3238
  expandedSections: {
3239
+ // TODO: marked for deletion
3232
3240
  Issues: true,
3233
3241
  "Map Layers": false,
3234
3242
  Components: false,
@@ -3274,6 +3282,8 @@ const settingSlice = createSlice({
3274
3282
  const {
3275
3283
  setEnableDuplicateIssues,
3276
3284
  setEnablePlacementMode,
3285
+ setEnableSvgLayout,
3286
+ // TODO: needs to actually be used in /web
3277
3287
  setSectionExpanded,
3278
3288
  setEnableClustering,
3279
3289
  setAppearance,
@@ -8390,7 +8400,7 @@ const tabTrigger = "_tabTrigger_1w0fq_69";
8390
8400
  const patchfieldBorder = "_patchfieldBorder_1w0fq_73";
8391
8401
  const title = "_title_1w0fq_73";
8392
8402
  const error = "_error_1w0fq_89";
8393
- const styles$d = {
8403
+ const styles$c = {
8394
8404
  description: description$2,
8395
8405
  floatingButtonContainer: floatingButtonContainer$2,
8396
8406
  FullScreenImageContainer: FullScreenImageContainer$2,
@@ -8503,179 +8513,6 @@ class BaseField extends BaseFormElement {
8503
8513
  }
8504
8514
  __publicField(BaseField, "fieldTypeName");
8505
8515
  __publicField(BaseField, "fieldTypeDescription");
8506
- const description$1 = "_description_10o76_1";
8507
- const floatingButtonContainer$1 = "_floatingButtonContainer_10o76_5";
8508
- const FullScreenImageContainer$1 = "_FullScreenImageContainer_10o76_12";
8509
- const TopBarContainer$1 = "_TopBarContainer_10o76_22";
8510
- const fileName$1 = "_fileName_10o76_31";
8511
- const longIconButton$1 = "_longIconButton_10o76_36";
8512
- const previewImage$1 = "_previewImage_10o76_42";
8513
- const FullScreenImage$1 = "_FullScreenImage_10o76_12";
8514
- const styles$c = {
8515
- description: description$1,
8516
- floatingButtonContainer: floatingButtonContainer$1,
8517
- FullScreenImageContainer: FullScreenImageContainer$1,
8518
- TopBarContainer: TopBarContainer$1,
8519
- fileName: fileName$1,
8520
- longIconButton: longIconButton$1,
8521
- previewImage: previewImage$1,
8522
- FullScreenImage: FullScreenImage$1
8523
- };
8524
- const FullScreenImagePreview = memo((props) => {
8525
- const { file, url, name, setShowPreview } = props;
8526
- const handleDownload = useCallback(
8527
- (event) => {
8528
- event.stopPropagation();
8529
- const blob = new Blob([file]);
8530
- saveAs$1(blob, name);
8531
- },
8532
- [name, file]
8533
- );
8534
- return /* @__PURE__ */ jsxs(Fragment, { children: [
8535
- /* @__PURE__ */ jsx(
8536
- "button",
8537
- {
8538
- className: styles$c.FullScreenImageContainer,
8539
- type: "button",
8540
- onClick: () => {
8541
- setShowPreview(false);
8542
- },
8543
- children: /* @__PURE__ */ jsx(
8544
- "img",
8545
- {
8546
- className: styles$c.FullScreenImage,
8547
- src: url,
8548
- alt: name,
8549
- onClick: (e) => {
8550
- e.stopPropagation();
8551
- }
8552
- }
8553
- )
8554
- }
8555
- ),
8556
- /* @__PURE__ */ jsxs(Flex$1, { className: styles$c.TopBarContainer, align: "center", children: [
8557
- /* @__PURE__ */ jsx(
8558
- IconButton,
8559
- {
8560
- className: styles$c.longIconButton,
8561
- variant: "soft",
8562
- "aria-label": "Exit preview",
8563
- onClick: () => {
8564
- setShowPreview(false);
8565
- },
8566
- children: /* @__PURE__ */ jsx(RiIcon, { icon: "RiArrowLeftLine" })
8567
- }
8568
- ),
8569
- /* @__PURE__ */ jsx(Text$1, { className: styles$c.fileName, children: name }),
8570
- /* @__PURE__ */ jsx(
8571
- IconButton,
8572
- {
8573
- className: styles$c.longIconButton,
8574
- variant: "soft",
8575
- "aria-label": `Download ${name}`,
8576
- onClick: handleDownload,
8577
- children: /* @__PURE__ */ jsx(RiIcon, { icon: "RiDownload2Line" })
8578
- }
8579
- )
8580
- ] })
8581
- ] });
8582
- });
8583
- FullScreenImagePreview.displayName = "FullScreenImagePreview";
8584
- const InputWithLabel = (props) => {
8585
- const { label, children, size, severity, inputId, labelId, image, flexProps } = props;
8586
- const [resolvedImage, setResolvedImage] = useState(void 0);
8587
- const [showImagePreview, setShowImagePreview] = useState(false);
8588
- useEffect(() => {
8589
- if (image instanceof Promise) {
8590
- image.then(setResolvedImage).catch(console.error);
8591
- } else {
8592
- setResolvedImage(image);
8593
- }
8594
- }, [image]);
8595
- const resolvedImageURL = resolvedImage ? URL.createObjectURL(resolvedImage) : void 0;
8596
- return /* @__PURE__ */ jsxs(Flex$1, { direction: "column", gap: "2", children: [
8597
- resolvedImage && /* @__PURE__ */ jsxs(Fragment, { children: [
8598
- /* @__PURE__ */ jsx(
8599
- "img",
8600
- {
8601
- className: styles$c.previewImage,
8602
- src: resolvedImageURL,
8603
- alt: resolvedImage.name,
8604
- onClick: () => {
8605
- setShowImagePreview(true);
8606
- }
8607
- }
8608
- ),
8609
- showImagePreview && /* @__PURE__ */ jsx(
8610
- FullScreenImagePreview,
8611
- {
8612
- file: resolvedImage,
8613
- url: resolvedImageURL,
8614
- name: resolvedImage.name,
8615
- setShowPreview: setShowImagePreview
8616
- }
8617
- )
8618
- ] }),
8619
- /* @__PURE__ */ jsx(Flex$1, { direction: "column", gap: "1", asChild: true, ...flexProps, children: /* @__PURE__ */ jsxs("label", { htmlFor: inputId, children: [
8620
- /* @__PURE__ */ jsx(Text$1, { size, severity, id: labelId, children: label }),
8621
- children
8622
- ] }) })
8623
- ] });
8624
- };
8625
- const InputWithHelpText = (props) => {
8626
- const { helpText, children, severity } = props;
8627
- return /* @__PURE__ */ jsxs(Flex$1, { direction: "column", gap: "1", children: [
8628
- children,
8629
- /* @__PURE__ */ jsx(Flex$1, { direction: "column", children: /* @__PURE__ */ jsx(Text$1, { size: "1", severity, className: styles$c.description, children: helpText }) })
8630
- ] });
8631
- };
8632
- const InputWithLabelAndHelpText = (props) => {
8633
- const { children, ...restProps } = props;
8634
- return /* @__PURE__ */ jsx(InputWithHelpText, { ...restProps, children });
8635
- };
8636
- const useFormikInput = (props) => {
8637
- const { id, field, formId: formId2, size, showInputOnly, ...rest } = props;
8638
- const [fieldProps, meta, helpers] = useField(field.getId());
8639
- const { touched } = meta;
8640
- const helpText = meta.error ?? field.description;
8641
- const severity = meta.error ? "danger" : void 0;
8642
- const inputId = id ?? `${formId2}-${field.getId()}-input`;
8643
- const labelId = `${inputId}-label`;
8644
- const label = field.required ? `${field.label} *` : field.label;
8645
- const fieldPropsWithValidation = useMemo(() => {
8646
- const handleChange = (e) => {
8647
- const value = field.getValueFromChangeEvent(e);
8648
- void helpers.setValue(value, false).then();
8649
- if (touched || !field.onlyValidateAfterTouched) {
8650
- helpers.setError(field.getError(value));
8651
- }
8652
- };
8653
- const handleBlur = (e) => {
8654
- void helpers.setTouched(true, false).then();
8655
- helpers.setError(field.getError(field.getValueFromChangeEvent(e)));
8656
- };
8657
- return {
8658
- ...fieldProps,
8659
- onChange: handleChange,
8660
- onBlur: handleBlur
8661
- };
8662
- }, [field, fieldProps, helpers, touched]);
8663
- return [
8664
- {
8665
- helpText,
8666
- size,
8667
- severity,
8668
- inputId,
8669
- labelId,
8670
- label,
8671
- showInputOnly,
8672
- fieldProps: fieldPropsWithValidation,
8673
- helpers,
8674
- field
8675
- },
8676
- { ...rest, "aria-labelledby": labelId }
8677
- ];
8678
- };
8679
8516
  function getDefaultExportFromCjs(x) {
8680
8517
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
8681
8518
  }
@@ -8891,7 +8728,7 @@ const $5e63c961fc1ce211$var$SlotClone = /* @__PURE__ */ forwardRef((props, forwa
8891
8728
  });
8892
8729
  $5e63c961fc1ce211$var$SlotClone.displayName = "SlotClone";
8893
8730
  const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = ({ children }) => {
8894
- return /* @__PURE__ */ createElement(Fragment$1, null, children);
8731
+ return /* @__PURE__ */ createElement(Fragment, null, children);
8895
8732
  };
8896
8733
  function $5e63c961fc1ce211$var$isSlottable(child) {
8897
8734
  return /* @__PURE__ */ isValidElement(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45;
@@ -9543,10 +9380,10 @@ const Text = React.forwardRef((props, forwardedRef) => {
9543
9380
  });
9544
9381
  Text.displayName = "Text";
9545
9382
  const sizes$7 = ["1", "2", "3", "4", "5", "6", "7", "8", "9"];
9546
- const variants$5 = ["solid", "soft", "outline", "ghost"];
9383
+ const variants$4 = ["solid", "soft", "outline", "ghost"];
9547
9384
  const codePropDefs = {
9548
9385
  size: { type: "enum", values: sizes$7, default: void 0, responsive: true },
9549
- variant: { type: "enum", values: variants$5, default: "soft" },
9386
+ variant: { type: "enum", values: variants$4, default: "soft" },
9550
9387
  weight: weightProp,
9551
9388
  color: colorProp,
9552
9389
  highContrast: highContrastProp
@@ -9713,10 +9550,10 @@ function $e698a72e93240346$var$getState(checked) {
9713
9550
  const $e698a72e93240346$export$be92b6f5f03c0fe9 = $e698a72e93240346$export$48513f6b9f8ce62d;
9714
9551
  const $e698a72e93240346$export$adb584737d712b70 = $e698a72e93240346$export$59aad738f51d1c05;
9715
9552
  const sizes$6 = ["1", "2", "3"];
9716
- const variants$4 = ["classic", "surface", "soft"];
9553
+ const variants$3 = ["classic", "surface", "soft"];
9717
9554
  const checkboxPropDefs = {
9718
9555
  size: { type: "enum", values: sizes$6, default: "2", responsive: true },
9719
- variant: { type: "enum", values: variants$4, default: "surface" },
9556
+ variant: { type: "enum", values: variants$3, default: "surface" },
9720
9557
  color: colorProp,
9721
9558
  highContrast: highContrastProp
9722
9559
  };
@@ -10148,7 +9985,7 @@ const $57acba87d6e25586$export$a21cbf9f11fca853 = /* @__PURE__ */ forwardRef((pr
10148
9985
  const context = $57acba87d6e25586$var$useScrollAreaContext($57acba87d6e25586$var$VIEWPORT_NAME, __scopeScrollArea);
10149
9986
  const ref = useRef(null);
10150
9987
  const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref, context.onViewportChange);
10151
- return /* @__PURE__ */ createElement(Fragment$1, null, /* @__PURE__ */ createElement("style", {
9988
+ return /* @__PURE__ */ createElement(Fragment, null, /* @__PURE__ */ createElement("style", {
10152
9989
  dangerouslySetInnerHTML: {
10153
9990
  __html: `[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`
10154
9991
  }
@@ -11393,10 +11230,10 @@ const $faa2e61a3361514f$export$13921ac0cc260818 = $faa2e61a3361514f$export$10559
11393
11230
  const $faa2e61a3361514f$export$9a58ef0d7ad3278c = $faa2e61a3361514f$export$a5cf38a7a000fe77;
11394
11231
  const $faa2e61a3361514f$export$6521433ed15a34db = $faa2e61a3361514f$export$2c1b491743890dec;
11395
11232
  const sizes$5 = ["1", "2", "3"];
11396
- const variants$3 = ["classic", "surface", "soft"];
11233
+ const variants$2 = ["classic", "surface", "soft"];
11397
11234
  const sliderPropDefs = {
11398
11235
  size: { type: "enum", values: sizes$5, default: "2", responsive: true },
11399
- variant: { type: "enum", values: variants$3, default: "surface" },
11236
+ variant: { type: "enum", values: variants$2, default: "surface" },
11400
11237
  color: colorProp,
11401
11238
  highContrast: highContrastProp,
11402
11239
  radius: radiusProp
@@ -11418,10 +11255,10 @@ const Slider = React.forwardRef((props, forwardedRef) => {
11418
11255
  });
11419
11256
  Slider.displayName = "Slider";
11420
11257
  const sizes$4 = ["1", "2", "3"];
11421
- const variants$2 = ["classic", "surface", "soft"];
11258
+ const variants$1 = ["classic", "surface", "soft"];
11422
11259
  const textFieldPropDefs = {
11423
11260
  size: { type: "enum", values: sizes$4, default: "2", responsive: true },
11424
- variant: { type: "enum", values: variants$2, default: "surface" },
11261
+ variant: { type: "enum", values: variants$1, default: "surface" },
11425
11262
  color: colorProp,
11426
11263
  radius: radiusProp
11427
11264
  };
@@ -11510,125 +11347,10 @@ const ScrollArea = React.forwardRef((props, forwardedRef) => {
11510
11347
  );
11511
11348
  });
11512
11349
  ScrollArea.displayName = "ScrollArea";
11513
- const $cddcb0b647441e34$var$AVATAR_NAME = "Avatar";
11514
- const [$cddcb0b647441e34$var$createAvatarContext, $cddcb0b647441e34$export$90370d16b488820f] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($cddcb0b647441e34$var$AVATAR_NAME);
11515
- const [$cddcb0b647441e34$var$AvatarProvider, $cddcb0b647441e34$var$useAvatarContext] = $cddcb0b647441e34$var$createAvatarContext($cddcb0b647441e34$var$AVATAR_NAME);
11516
- const $cddcb0b647441e34$export$e2255cf6045e8d47 = /* @__PURE__ */ forwardRef((props, forwardedRef) => {
11517
- const { __scopeAvatar, ...avatarProps } = props;
11518
- const [imageLoadingStatus, setImageLoadingStatus] = useState("idle");
11519
- return /* @__PURE__ */ createElement($cddcb0b647441e34$var$AvatarProvider, {
11520
- scope: __scopeAvatar,
11521
- imageLoadingStatus,
11522
- onImageLoadingStatusChange: setImageLoadingStatus
11523
- }, /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$1({}, avatarProps, {
11524
- ref: forwardedRef
11525
- })));
11526
- });
11527
- const $cddcb0b647441e34$var$IMAGE_NAME = "AvatarImage";
11528
- const $cddcb0b647441e34$export$2cd8ae1985206fe8 = /* @__PURE__ */ forwardRef((props, forwardedRef) => {
11529
- const { __scopeAvatar, src, onLoadingStatusChange = () => {
11530
- }, ...imageProps } = props;
11531
- const context = $cddcb0b647441e34$var$useAvatarContext($cddcb0b647441e34$var$IMAGE_NAME, __scopeAvatar);
11532
- const imageLoadingStatus = $cddcb0b647441e34$var$useImageLoadingStatus(src);
11533
- const handleLoadingStatusChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a((status) => {
11534
- onLoadingStatusChange(status);
11535
- context.onImageLoadingStatusChange(status);
11536
- });
11537
- $9f79659886946c16$export$e5c5a5f917a5871c(() => {
11538
- if (imageLoadingStatus !== "idle")
11539
- handleLoadingStatusChange(imageLoadingStatus);
11540
- }, [
11541
- imageLoadingStatus,
11542
- handleLoadingStatusChange
11543
- ]);
11544
- return imageLoadingStatus === "loaded" ? /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.img, _extends$1({}, imageProps, {
11545
- ref: forwardedRef,
11546
- src
11547
- })) : null;
11548
- });
11549
- const $cddcb0b647441e34$var$FALLBACK_NAME = "AvatarFallback";
11550
- const $cddcb0b647441e34$export$69fffb6a9571fbfe = /* @__PURE__ */ forwardRef((props, forwardedRef) => {
11551
- const { __scopeAvatar, delayMs, ...fallbackProps } = props;
11552
- const context = $cddcb0b647441e34$var$useAvatarContext($cddcb0b647441e34$var$FALLBACK_NAME, __scopeAvatar);
11553
- const [canRender, setCanRender] = useState(delayMs === void 0);
11554
- useEffect(() => {
11555
- if (delayMs !== void 0) {
11556
- const timerId = window.setTimeout(
11557
- () => setCanRender(true),
11558
- delayMs
11559
- );
11560
- return () => window.clearTimeout(timerId);
11561
- }
11562
- }, [
11563
- delayMs
11564
- ]);
11565
- return canRender && context.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$1({}, fallbackProps, {
11566
- ref: forwardedRef
11567
- })) : null;
11568
- });
11569
- function $cddcb0b647441e34$var$useImageLoadingStatus(src) {
11570
- const [loadingStatus, setLoadingStatus] = useState("idle");
11571
- $9f79659886946c16$export$e5c5a5f917a5871c(() => {
11572
- if (!src) {
11573
- setLoadingStatus("error");
11574
- return;
11575
- }
11576
- let isMounted = true;
11577
- const image = new window.Image();
11578
- const updateStatus = (status) => () => {
11579
- if (!isMounted)
11580
- return;
11581
- setLoadingStatus(status);
11582
- };
11583
- setLoadingStatus("loading");
11584
- image.onload = updateStatus("loaded");
11585
- image.onerror = updateStatus("error");
11586
- image.src = src;
11587
- return () => {
11588
- isMounted = false;
11589
- };
11590
- }, [
11591
- src
11592
- ]);
11593
- return loadingStatus;
11594
- }
11595
- const $cddcb0b647441e34$export$be92b6f5f03c0fe9 = $cddcb0b647441e34$export$e2255cf6045e8d47;
11596
- const $cddcb0b647441e34$export$3e431a229df88919 = $cddcb0b647441e34$export$2cd8ae1985206fe8;
11597
- const $cddcb0b647441e34$export$fb8d7f40caaeea67 = $cddcb0b647441e34$export$69fffb6a9571fbfe;
11598
- const sizes$2 = ["1", "2", "3", "4", "5", "6", "7", "8", "9"];
11599
- const variants$1 = ["solid", "soft"];
11600
- const avatarPropDefs = {
11601
- size: { type: "enum", values: sizes$2, default: "3", responsive: true },
11602
- variant: { type: "enum", values: variants$1, default: "soft" },
11603
- color: { ...colorProp, default: void 0 },
11604
- highContrast: highContrastProp,
11605
- radius: radiusProp,
11606
- fallback: { type: "ReactNode", default: void 0, required: true }
11607
- };
11608
- const Avatar = React.forwardRef((props, forwardedRef) => {
11609
- const { rest: marginRest, ...marginProps } = extractMarginProps(props);
11610
- const { className, style, size = avatarPropDefs.size.default, variant = avatarPropDefs.variant.default, color = avatarPropDefs.color.default, highContrast = avatarPropDefs.highContrast.default, radius = avatarPropDefs.radius.default, fallback, ...imageProps } = marginRest;
11611
- const [status, setStatus] = React.useState("idle");
11612
- return React.createElement(
11613
- $cddcb0b647441e34$export$be92b6f5f03c0fe9,
11614
- { "data-accent-color": color, "data-radius": radius, className: classNames("rt-AvatarRoot", className, withBreakpoints(size, "rt-r-size"), `rt-variant-${variant}`, { "rt-high-contrast": highContrast }, withMarginProps(marginProps)), style },
11615
- status === "idle" || status === "loading" ? React.createElement("span", { className: "rt-AvatarFallback" }) : null,
11616
- status === "error" ? React.createElement($cddcb0b647441e34$export$fb8d7f40caaeea67, { className: classNames("rt-AvatarFallback", {
11617
- "rt-one-letter": typeof fallback === "string" && fallback.length === 1,
11618
- "rt-two-letters": typeof fallback === "string" && fallback.length === 2
11619
- }), delayMs: 0 }, fallback) : null,
11620
- React.createElement($cddcb0b647441e34$export$3e431a229df88919, { ref: forwardedRef, className: "rt-AvatarImage", ...imageProps, onLoadingStatusChange: (status2) => {
11621
- var _a2;
11622
- (_a2 = imageProps.onLoadingStatusChange) === null || _a2 === void 0 ? void 0 : _a2.call(imageProps, status2);
11623
- setStatus(status2);
11624
- } })
11625
- );
11626
- });
11627
- Avatar.displayName = "Avatar";
11628
- const sizes$1 = ["1", "2", "3", "4", "5"];
11350
+ const sizes$2 = ["1", "2", "3", "4", "5"];
11629
11351
  const variants = ["surface", "classic", "ghost"];
11630
11352
  const cardPropDefs = {
11631
- size: { type: "enum", values: sizes$1, default: "1", responsive: true },
11353
+ size: { type: "enum", values: sizes$2, default: "1", responsive: true },
11632
11354
  variant: { type: "enum", values: variants, default: "surface" }
11633
11355
  };
11634
11356
  const Card = React.forwardRef((props, forwardedRef) => {
@@ -11644,6 +11366,58 @@ const Card = React.forwardRef((props, forwardedRef) => {
11644
11366
  return React.createElement(Comp, { ref: forwardedRef, ...cardProps, className: classNames("rt-reset", "rt-Card", className, withBreakpoints(size, "rt-r-size"), `rt-variant-${variant}`, withMarginProps(marginProps)) }, asChild ? getChild() : React.createElement("div", { className: "rt-CardInner" }, children));
11645
11367
  });
11646
11368
  Card.displayName = "Card";
11369
+ const $89eedd556c436f6a$var$DEFAULT_ORIENTATION = "horizontal";
11370
+ const $89eedd556c436f6a$var$ORIENTATIONS = [
11371
+ "horizontal",
11372
+ "vertical"
11373
+ ];
11374
+ const $89eedd556c436f6a$export$1ff3c3f08ae963c0 = /* @__PURE__ */ forwardRef((props, forwardedRef) => {
11375
+ const { decorative, orientation: orientationProp = $89eedd556c436f6a$var$DEFAULT_ORIENTATION, ...domProps } = props;
11376
+ const orientation = $89eedd556c436f6a$var$isValidOrientation(orientationProp) ? orientationProp : $89eedd556c436f6a$var$DEFAULT_ORIENTATION;
11377
+ const ariaOrientation = orientation === "vertical" ? orientation : void 0;
11378
+ const semanticProps = decorative ? {
11379
+ role: "none"
11380
+ } : {
11381
+ "aria-orientation": ariaOrientation,
11382
+ role: "separator"
11383
+ };
11384
+ return /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$1({
11385
+ "data-orientation": orientation
11386
+ }, semanticProps, domProps, {
11387
+ ref: forwardedRef
11388
+ }));
11389
+ });
11390
+ $89eedd556c436f6a$export$1ff3c3f08ae963c0.propTypes = {
11391
+ orientation(props, propName, componentName) {
11392
+ const propValue = props[propName];
11393
+ const strVal = String(propValue);
11394
+ if (propValue && !$89eedd556c436f6a$var$isValidOrientation(propValue))
11395
+ return new Error($89eedd556c436f6a$var$getInvalidOrientationError(strVal, componentName));
11396
+ return null;
11397
+ }
11398
+ };
11399
+ function $89eedd556c436f6a$var$getInvalidOrientationError(value, componentName) {
11400
+ return `Invalid prop \`orientation\` of value \`${value}\` supplied to \`${componentName}\`, expected one of:
11401
+ - horizontal
11402
+ - vertical
11403
+
11404
+ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
11405
+ }
11406
+ function $89eedd556c436f6a$var$isValidOrientation(orientation) {
11407
+ return $89eedd556c436f6a$var$ORIENTATIONS.includes(orientation);
11408
+ }
11409
+ const $89eedd556c436f6a$export$be92b6f5f03c0fe9 = $89eedd556c436f6a$export$1ff3c3f08ae963c0;
11410
+ const sizes$1 = ["1", "2", "3", "4"];
11411
+ const separatorPropDefs = {
11412
+ size: { type: "enum", values: sizes$1, default: "1", responsive: true },
11413
+ color: { ...colorProp, default: "gray" }
11414
+ };
11415
+ const Separator = React.forwardRef((props, forwardedRef) => {
11416
+ const { rest: marginRest, ...marginProps } = extractMarginProps(props);
11417
+ const { className, size = separatorPropDefs.size.default, color = separatorPropDefs.color.default, ...separatorProps } = marginRest;
11418
+ return React.createElement($89eedd556c436f6a$export$be92b6f5f03c0fe9, { "data-accent-color": color, ...separatorProps, ref: forwardedRef, className: classNames("rt-Separator", className, withBreakpoints(size, "rt-r-size"), withMarginProps(marginProps)) });
11419
+ });
11420
+ Separator.displayName = "Separator";
11647
11421
  const $69cb30bb0017df05$var$TABS_NAME = "Tabs";
11648
11422
  const [$69cb30bb0017df05$var$createTabsContext, $69cb30bb0017df05$export$355f5bd209d7b13a] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($69cb30bb0017df05$var$TABS_NAME, [
11649
11423
  $d7bdfb9eb0fdf311$export$c7109489551a4f4
@@ -11814,6 +11588,181 @@ const Tabs = Object.assign({}, {
11814
11588
  Trigger: TabsTrigger,
11815
11589
  Content: TabsContent
11816
11590
  });
11591
+ const description$1 = "_description_10o76_1";
11592
+ const floatingButtonContainer$1 = "_floatingButtonContainer_10o76_5";
11593
+ const FullScreenImageContainer$1 = "_FullScreenImageContainer_10o76_12";
11594
+ const TopBarContainer$1 = "_TopBarContainer_10o76_22";
11595
+ const fileName$1 = "_fileName_10o76_31";
11596
+ const longIconButton$1 = "_longIconButton_10o76_36";
11597
+ const previewImage$1 = "_previewImage_10o76_42";
11598
+ const FullScreenImage$1 = "_FullScreenImage_10o76_12";
11599
+ const styles$b = {
11600
+ description: description$1,
11601
+ floatingButtonContainer: floatingButtonContainer$1,
11602
+ FullScreenImageContainer: FullScreenImageContainer$1,
11603
+ TopBarContainer: TopBarContainer$1,
11604
+ fileName: fileName$1,
11605
+ longIconButton: longIconButton$1,
11606
+ previewImage: previewImage$1,
11607
+ FullScreenImage: FullScreenImage$1
11608
+ };
11609
+ const FullScreenImagePreview = memo((props) => {
11610
+ const { file, url, name, setShowPreview } = props;
11611
+ const handleDownload = useCallback(
11612
+ (event) => {
11613
+ event.stopPropagation();
11614
+ const blob = new Blob([file]);
11615
+ saveAs$1(blob, name);
11616
+ },
11617
+ [name, file]
11618
+ );
11619
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
11620
+ /* @__PURE__ */ jsx(
11621
+ "button",
11622
+ {
11623
+ className: styles$b.FullScreenImageContainer,
11624
+ type: "button",
11625
+ onClick: () => {
11626
+ setShowPreview(false);
11627
+ },
11628
+ children: /* @__PURE__ */ jsx(
11629
+ "img",
11630
+ {
11631
+ className: styles$b.FullScreenImage,
11632
+ src: url,
11633
+ alt: name,
11634
+ onClick: (e) => {
11635
+ e.stopPropagation();
11636
+ }
11637
+ }
11638
+ )
11639
+ }
11640
+ ),
11641
+ /* @__PURE__ */ jsxs(Flex, { className: styles$b.TopBarContainer, align: "center", children: [
11642
+ /* @__PURE__ */ jsx(
11643
+ IconButton,
11644
+ {
11645
+ className: styles$b.longIconButton,
11646
+ variant: "soft",
11647
+ "aria-label": "Exit preview",
11648
+ onClick: () => {
11649
+ setShowPreview(false);
11650
+ },
11651
+ children: /* @__PURE__ */ jsx(RiIcon, { icon: "RiArrowLeftLine" })
11652
+ }
11653
+ ),
11654
+ /* @__PURE__ */ jsx(Text, { className: styles$b.fileName, children: name }),
11655
+ /* @__PURE__ */ jsx(
11656
+ IconButton,
11657
+ {
11658
+ className: styles$b.longIconButton,
11659
+ variant: "soft",
11660
+ "aria-label": `Download ${name}`,
11661
+ onClick: handleDownload,
11662
+ children: /* @__PURE__ */ jsx(RiIcon, { icon: "RiDownload2Line" })
11663
+ }
11664
+ )
11665
+ ] })
11666
+ ] });
11667
+ });
11668
+ FullScreenImagePreview.displayName = "FullScreenImagePreview";
11669
+ const InputWithLabel = (props) => {
11670
+ const { label, children, size, severity, inputId, labelId, image, flexProps } = props;
11671
+ const [resolvedImage, setResolvedImage] = useState(void 0);
11672
+ const [showImagePreview, setShowImagePreview] = useState(false);
11673
+ const color = useSeverityColor(severity);
11674
+ useEffect(() => {
11675
+ if (image instanceof Promise) {
11676
+ image.then(setResolvedImage).catch(console.error);
11677
+ } else {
11678
+ setResolvedImage(image);
11679
+ }
11680
+ }, [image]);
11681
+ const resolvedImageURL = resolvedImage ? URL.createObjectURL(resolvedImage) : void 0;
11682
+ return /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "2", children: [
11683
+ resolvedImage && /* @__PURE__ */ jsxs(Fragment$1, { children: [
11684
+ /* @__PURE__ */ jsx(
11685
+ "img",
11686
+ {
11687
+ className: styles$b.previewImage,
11688
+ src: resolvedImageURL,
11689
+ alt: resolvedImage.name,
11690
+ onClick: () => {
11691
+ setShowImagePreview(true);
11692
+ }
11693
+ }
11694
+ ),
11695
+ showImagePreview && /* @__PURE__ */ jsx(
11696
+ FullScreenImagePreview,
11697
+ {
11698
+ file: resolvedImage,
11699
+ url: resolvedImageURL,
11700
+ name: resolvedImage.name,
11701
+ setShowPreview: setShowImagePreview
11702
+ }
11703
+ )
11704
+ ] }),
11705
+ /* @__PURE__ */ jsx(Flex, { direction: "column", gap: "1", asChild: true, ...flexProps, children: /* @__PURE__ */ jsxs("label", { htmlFor: inputId, children: [
11706
+ /* @__PURE__ */ jsx(Text, { size, color, id: labelId, children: label }),
11707
+ children
11708
+ ] }) })
11709
+ ] });
11710
+ };
11711
+ const InputWithHelpText = (props) => {
11712
+ const { helpText, children, severity } = props;
11713
+ const color = useSeverityColor(severity);
11714
+ return /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "1", children: [
11715
+ children,
11716
+ /* @__PURE__ */ jsx(Flex, { direction: "column", children: /* @__PURE__ */ jsx(Text, { size: "1", color, className: styles$b.description, children: helpText }) })
11717
+ ] });
11718
+ };
11719
+ const InputWithLabelAndHelpText = (props) => {
11720
+ const { children, ...restProps } = props;
11721
+ return /* @__PURE__ */ jsx(InputWithHelpText, { ...restProps, children });
11722
+ };
11723
+ const useFormikInput = (props) => {
11724
+ const { id, field, formId: formId2, size, showInputOnly, ...rest } = props;
11725
+ const [fieldProps, meta, helpers] = useField(field.getId());
11726
+ const { touched } = meta;
11727
+ const helpText = meta.error ?? field.description;
11728
+ const severity = meta.error ? "danger" : void 0;
11729
+ const inputId = id ?? `${formId2}-${field.getId()}-input`;
11730
+ const labelId = `${inputId}-label`;
11731
+ const label = field.required ? `${field.label} *` : field.label;
11732
+ const fieldPropsWithValidation = useMemo(() => {
11733
+ const handleChange = (e) => {
11734
+ const value = field.getValueFromChangeEvent(e);
11735
+ void helpers.setValue(value, false).then();
11736
+ if (touched || !field.onlyValidateAfterTouched) {
11737
+ helpers.setError(field.getError(value));
11738
+ }
11739
+ };
11740
+ const handleBlur = (e) => {
11741
+ void helpers.setTouched(true, false).then();
11742
+ helpers.setError(field.getError(field.getValueFromChangeEvent(e)));
11743
+ };
11744
+ return {
11745
+ ...fieldProps,
11746
+ onChange: handleChange,
11747
+ onBlur: handleBlur
11748
+ };
11749
+ }, [field, fieldProps, helpers, touched]);
11750
+ return [
11751
+ {
11752
+ helpText,
11753
+ size,
11754
+ severity,
11755
+ inputId,
11756
+ labelId,
11757
+ label,
11758
+ showInputOnly,
11759
+ fieldProps: fieldPropsWithValidation,
11760
+ helpers,
11761
+ field
11762
+ },
11763
+ { ...rest, "aria-labelledby": labelId }
11764
+ ];
11765
+ };
11817
11766
  const truthyValues = [true, "true"];
11818
11767
  const BooleanInput = memo((props) => {
11819
11768
  const [{ inputId, labelId, size, severity, showInputOnly, field, fieldProps }, rest] = useFormikInput(props);
@@ -12397,7 +12346,7 @@ __publicField(StringOrTextField, "_validateMax", (path) => (value, allValues) =>
12397
12346
  });
12398
12347
  const clickableLinkContainer = "_clickableLinkContainer_1ace7_1";
12399
12348
  const TextFieldInputCopy = "_TextFieldInputCopy_1ace7_5";
12400
- const styles$b = {
12349
+ const styles$a = {
12401
12350
  clickableLinkContainer,
12402
12351
  TextFieldInputCopy
12403
12352
  };
@@ -12426,13 +12375,13 @@ const StringInput = memo((props) => {
12426
12375
  placeholder: field.placeholder,
12427
12376
  color
12428
12377
  }
12429
- ) : /* @__PURE__ */ jsxs(TextField$1.Root, { className: styles$b.clickableLinkContainer, children: [
12378
+ ) : /* @__PURE__ */ jsxs(TextField$1.Root, { className: styles$a.clickableLinkContainer, children: [
12430
12379
  /* @__PURE__ */ jsx(
12431
12380
  "div",
12432
12381
  {
12433
12382
  className: classNames$1(
12434
12383
  "rt-TextFieldInput rt-r-size-2 rt-variant-surface",
12435
- styles$b.TextFieldInputCopy
12384
+ styles$a.TextFieldInputCopy
12436
12385
  ),
12437
12386
  children: /* @__PURE__ */ jsx(
12438
12387
  Linkify,
@@ -12820,7 +12769,7 @@ const MultiStringInput = memo((props) => {
12820
12769
  },
12821
12770
  [setValueAndTouched, value]
12822
12771
  );
12823
- return /* @__PURE__ */ jsx(DragDropContext, { onDragEnd: handleDragEnd, children: /* @__PURE__ */ jsxs(Flex$1, { direction: "column", gap: "2", children: [
12772
+ return /* @__PURE__ */ jsx(DragDropContext, { onDragEnd: handleDragEnd, children: /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "2", children: [
12824
12773
  /* @__PURE__ */ jsx(InputWithLabelAndHelpText, { helpText: updatedHelpText, severity, children: /* @__PURE__ */ jsx(
12825
12774
  InputWithLabel,
12826
12775
  {
@@ -12830,7 +12779,7 @@ const MultiStringInput = memo((props) => {
12830
12779
  labelId,
12831
12780
  label,
12832
12781
  image: showInputOnly ? void 0 : field.image,
12833
- children: (!disabled || value.length === 0) && /* @__PURE__ */ jsxs(Flex$1, { gap: "2", children: [
12782
+ children: (!disabled || value.length === 0) && /* @__PURE__ */ jsxs(Flex, { gap: "2", children: [
12834
12783
  /* @__PURE__ */ jsx(Box, { grow: "1", children: /* @__PURE__ */ jsx(
12835
12784
  TextField$1.Input,
12836
12785
  {
@@ -12858,7 +12807,7 @@ const MultiStringInput = memo((props) => {
12858
12807
  ] })
12859
12808
  }
12860
12809
  ) }),
12861
- /* @__PURE__ */ jsx(Droppable, { droppableId, children: (droppableProvided) => /* @__PURE__ */ jsxs(Flex$1, { ...droppableProvided.droppableProps, ref: droppableProvided.innerRef, direction: "column", children: [
12810
+ /* @__PURE__ */ jsx(Droppable, { droppableId, children: (droppableProvided) => /* @__PURE__ */ jsxs(Flex, { ...droppableProvided.droppableProps, ref: droppableProvided.innerRef, direction: "column", children: [
12862
12811
  value.map((option, index2) => /* @__PURE__ */ jsx(
12863
12812
  Draggable,
12864
12813
  {
@@ -12866,7 +12815,7 @@ const MultiStringInput = memo((props) => {
12866
12815
  index: index2,
12867
12816
  isDragDisabled: disabled,
12868
12817
  children: ({ draggableProps, dragHandleProps, innerRef }) => /* @__PURE__ */ jsx(
12869
- Flex$1,
12818
+ Flex,
12870
12819
  {
12871
12820
  ...dragHandleProps,
12872
12821
  ...draggableProps,
@@ -13124,7 +13073,7 @@ __publicField(_MultiSelectField, "fieldTypeDescription", "Allows the user to sel
13124
13073
  __publicField(_MultiSelectField, "Icon", RiCheckboxLine);
13125
13074
  let MultiSelectField = _MultiSelectField;
13126
13075
  const QrScannerWrapper = "_QrScannerWrapper_1puz3_1";
13127
- const styles$a = {
13076
+ const styles$9 = {
13128
13077
  QrScannerWrapper
13129
13078
  };
13130
13079
  const QrInput = memo((props) => {
@@ -13220,7 +13169,7 @@ const QrScanner = memo((props) => {
13220
13169
  return /* @__PURE__ */ jsxs(
13221
13170
  Flex,
13222
13171
  {
13223
- className: styles$a.QrScannerWrapper,
13172
+ className: styles$9.QrScannerWrapper,
13224
13173
  width: "100%",
13225
13174
  height: "100%",
13226
13175
  direction: "column",
@@ -13335,7 +13284,7 @@ const PDFContainer = "_PDFContainer_103p8_9";
13335
13284
  const Relative = "_Relative_103p8_15";
13336
13285
  const PDFScrollArea = "_PDFScrollArea_103p8_19";
13337
13286
  const ErrorContainer = "_ErrorContainer_103p8_24";
13338
- const styles$9 = {
13287
+ const styles$8 = {
13339
13288
  PDFViewerTopbar,
13340
13289
  PDFViewerOverlay,
13341
13290
  PDFContainer,
@@ -13392,10 +13341,10 @@ const PDFViewer = memo((props) => {
13392
13341
  {
13393
13342
  open: true,
13394
13343
  overlay: true,
13395
- overlayClass: styles$9.PDFViewerOverlay,
13344
+ overlayClass: styles$8.PDFViewerOverlay,
13396
13345
  onOpenChange: onClose,
13397
13346
  content: () => /* @__PURE__ */ jsxs(Flex, { width: "100%", height: "100%", align: "center", direction: "column", children: [
13398
- /* @__PURE__ */ jsx(Flex, { className: styles$9.PDFViewerTopbar, height: "8", width: "100%", align: "center", px: "2", shrink: "0", children: /* @__PURE__ */ jsx(ButtonGroup, { width: "100%", variant: "soft", severity: "info", highContrast: true, children: /* @__PURE__ */ jsxs(Grid, { columns: "3", width: "100%", children: [
13347
+ /* @__PURE__ */ jsx(Flex, { className: styles$8.PDFViewerTopbar, height: "8", width: "100%", align: "center", px: "2", shrink: "0", children: /* @__PURE__ */ jsx(ButtonGroup, { width: "100%", variant: "soft", severity: "info", highContrast: true, children: /* @__PURE__ */ jsxs(Grid, { columns: "3", width: "100%", children: [
13399
13348
  /* @__PURE__ */ jsxs(Flex, { gap: "2", width: "100%", children: [
13400
13349
  /* @__PURE__ */ jsx(IconButton, { onClick: onClose, "aria-label": "close", children: /* @__PURE__ */ jsx(RiIcon, { icon: "RiCloseLine" }) }),
13401
13350
  /* @__PURE__ */ jsx(IconButton, { onClick: handleDownload, "aria-label": "download", children: /* @__PURE__ */ jsx(RiIcon, { icon: "RiDownload2Line" }) })
@@ -13426,16 +13375,16 @@ const PDFViewer = memo((props) => {
13426
13375
  /* @__PURE__ */ jsx(
13427
13376
  Flex,
13428
13377
  {
13429
- className: styles$9.PDFContainer,
13378
+ className: styles$8.PDFContainer,
13430
13379
  width: "max-content",
13431
13380
  height: "max-content",
13432
13381
  direction: "column",
13433
13382
  align: "center",
13434
13383
  justify: "center",
13435
- children: /* @__PURE__ */ jsx(ScrollArea, { className: styles$9.PDFScrollArea, scrollbars: "both", children: /* @__PURE__ */ jsxs(
13384
+ children: /* @__PURE__ */ jsx(ScrollArea, { className: styles$8.PDFScrollArea, scrollbars: "both", children: /* @__PURE__ */ jsxs(
13436
13385
  Document,
13437
13386
  {
13438
- className: styles$9.Relative,
13387
+ className: styles$8.Relative,
13439
13388
  file,
13440
13389
  onLoadSuccess: handleLoadSuccess,
13441
13390
  onLoadError: handleLoadError,
@@ -13484,7 +13433,7 @@ const SpinnerComponent = memo(() => {
13484
13433
  });
13485
13434
  SpinnerComponent.displayName = "SpinnerComponent";
13486
13435
  const ErrorComponent = memo(() => {
13487
- return /* @__PURE__ */ jsxs(Flex, { className: styles$9.ErrorContainer, align: "center", justify: "center", direction: "column", children: [
13436
+ return /* @__PURE__ */ jsxs(Flex, { className: styles$8.ErrorContainer, align: "center", justify: "center", direction: "column", children: [
13488
13437
  /* @__PURE__ */ jsx(IconColorUtility, { severity: "info", children: /* @__PURE__ */ jsx(RiIcon, { icon: "RiFileWarningLine", size: 40 }) }),
13489
13438
  /* @__PURE__ */ jsx(Text, { size: "2", color: "gray", weight: "light", children: "Failed to load" })
13490
13439
  ] });
@@ -13493,7 +13442,7 @@ ErrorComponent.displayName = "ErrorComponent";
13493
13442
  const SUPPORTED_PDF_FILE_TYPES = ["application/pdf"];
13494
13443
  const ImageViewerTopbar = "_ImageViewerTopbar_1n2bl_1";
13495
13444
  const ImageViewerOverlay = "_ImageViewerOverlay_1n2bl_5";
13496
- const styles$8 = {
13445
+ const styles$7 = {
13497
13446
  ImageViewerTopbar,
13498
13447
  ImageViewerOverlay
13499
13448
  };
@@ -13556,9 +13505,9 @@ const ImageViewer = memo((props) => {
13556
13505
  open: true,
13557
13506
  onOpenChange: onClose,
13558
13507
  overlay: true,
13559
- overlayClass: styles$8.ImageViewerOverlay,
13508
+ overlayClass: styles$7.ImageViewerOverlay,
13560
13509
  content: () => /* @__PURE__ */ jsxs(Flex, { width: "100%", height: "100%", direction: "column", children: [
13561
- /* @__PURE__ */ jsx(Flex, { className: styles$8.ImageViewerTopbar, height: "8", width: "100%", align: "center", px: "2", children: /* @__PURE__ */ jsx(ButtonGroup, { width: "100%", severity: "info", variant: "soft", highContrast: true, children: /* @__PURE__ */ jsxs(Grid, { columns: "3", width: "100%", children: [
13510
+ /* @__PURE__ */ jsx(Flex, { className: styles$7.ImageViewerTopbar, height: "8", width: "100%", align: "center", px: "2", children: /* @__PURE__ */ jsx(ButtonGroup, { width: "100%", severity: "info", variant: "soft", highContrast: true, children: /* @__PURE__ */ jsxs(Grid, { columns: "3", width: "100%", children: [
13562
13511
  /* @__PURE__ */ jsxs(Flex, { justify: "start", gap: "2", children: [
13563
13512
  /* @__PURE__ */ jsx(IconButton, { onClick: onClose, "aria-label": "close", children: /* @__PURE__ */ jsx(RiIcon, { icon: "RiCloseLine" }) }),
13564
13513
  /* @__PURE__ */ jsx(IconButton, { onClick: handleDownload, "aria-label": "close", children: /* @__PURE__ */ jsx(RiIcon, { icon: "RiDownload2Line" }) })
@@ -13626,7 +13575,7 @@ const SpreadsheetViewerTopbar = "_SpreadsheetViewerTopbar_qnmq7_9";
13626
13575
  const Spreadsheet = "_Spreadsheet_qnmq7_1";
13627
13576
  const SpreadsheetViewerContent = "_SpreadsheetViewerContent_qnmq7_17";
13628
13577
  const SpreadsheetOverlay = "_SpreadsheetOverlay_qnmq7_24";
13629
- const styles$7 = {
13578
+ const styles$6 = {
13630
13579
  SpreadsheetViewer: SpreadsheetViewer$1,
13631
13580
  SpreadsheetViewerTopbar,
13632
13581
  Spreadsheet,
@@ -13703,10 +13652,10 @@ const SpreadsheetViewer = memo((props) => {
13703
13652
  {
13704
13653
  open: true,
13705
13654
  overlay: true,
13706
- overlayClass: styles$7.SpreadsheetOverlay,
13655
+ overlayClass: styles$6.SpreadsheetOverlay,
13707
13656
  onOpenChange: onClose,
13708
13657
  content: () => /* @__PURE__ */ jsxs(Flex, { direction: "column", width: "100%", height: "100%", style: { overflow: "none" }, children: [
13709
- /* @__PURE__ */ jsx(Flex, { className: styles$7.SpreadsheetViewerTopbar, height: "8", width: "100%", px: "2", shrink: "0", children: /* @__PURE__ */ jsx(
13658
+ /* @__PURE__ */ jsx(Flex, { className: styles$6.SpreadsheetViewerTopbar, height: "8", width: "100%", px: "2", shrink: "0", children: /* @__PURE__ */ jsx(
13710
13659
  ButtonGroup,
13711
13660
  {
13712
13661
  align: "center",
@@ -13744,7 +13693,7 @@ const SpreadsheetViewer = memo((props) => {
13744
13693
  p: "2",
13745
13694
  style: { overflow: "hidden" },
13746
13695
  children: /* @__PURE__ */ jsxs(Suspense, { fallback: /* @__PURE__ */ jsx(Spinner, {}), children: [
13747
- /* @__PURE__ */ jsx(Flex, { className: styles$7.SpreadsheetViewerContent, children: /* @__PURE__ */ jsx(
13696
+ /* @__PURE__ */ jsx(Flex, { className: styles$6.SpreadsheetViewerContent, children: /* @__PURE__ */ jsx(
13748
13697
  ScrollArea,
13749
13698
  {
13750
13699
  scrollbars: "both",
@@ -13757,7 +13706,7 @@ const SpreadsheetViewer = memo((props) => {
13757
13706
  children: /* @__PURE__ */ jsx(
13758
13707
  Spreadsheet2,
13759
13708
  {
13760
- className: styles$7.Spreadsheet,
13709
+ className: styles$6.Spreadsheet,
13761
13710
  data: data.data,
13762
13711
  rowLabels: data.rowLabels,
13763
13712
  columnLabels: data.columnLabels
@@ -13818,7 +13767,7 @@ const ImageMarkupTopbar = "_ImageMarkupTopbar_8zvut_10";
13818
13767
  const Prompt = "_Prompt_8zvut_14";
13819
13768
  const centered = "_centered_8zvut_25";
13820
13769
  const MarkupImage = "_MarkupImage_8zvut_25";
13821
- const styles$6 = {
13770
+ const styles$5 = {
13822
13771
  ImageMarkupContent,
13823
13772
  ImageMarkupOverlay,
13824
13773
  ImageMarkupTopbar,
@@ -13942,9 +13891,9 @@ const ImageMarkup = memo((props) => {
13942
13891
  {
13943
13892
  open: true,
13944
13893
  overlay: true,
13945
- overlayClass: styles$6.ImageMarkupOverlay,
13894
+ overlayClass: styles$5.ImageMarkupOverlay,
13946
13895
  onOpenChange: onClose,
13947
- content: () => /* @__PURE__ */ jsxs(Fragment, { children: [
13896
+ content: () => /* @__PURE__ */ jsxs(Fragment$1, { children: [
13948
13897
  originalImageSize && /* @__PURE__ */ jsx(
13949
13898
  "canvas",
13950
13899
  {
@@ -13956,7 +13905,7 @@ const ImageMarkup = memo((props) => {
13956
13905
  }
13957
13906
  ),
13958
13907
  /* @__PURE__ */ jsxs(Flex, { height: "100%", width: "100%", position: "relative", direction: "column", children: [
13959
- /* @__PURE__ */ jsx(Flex, { className: styles$6.ImageMarkupTopbar, height: "8", width: "100%", align: "center", px: "2", children: /* @__PURE__ */ jsx(ButtonGroup, { severity: "info", size: "medium", variant: "soft", width: "100%", children: /* @__PURE__ */ jsxs(Grid, { columns: "3", width: "100%", children: [
13908
+ /* @__PURE__ */ jsx(Flex, { className: styles$5.ImageMarkupTopbar, height: "8", width: "100%", align: "center", px: "2", children: /* @__PURE__ */ jsx(ButtonGroup, { severity: "info", size: "medium", variant: "soft", width: "100%", children: /* @__PURE__ */ jsxs(Grid, { columns: "3", width: "100%", children: [
13960
13909
  /* @__PURE__ */ jsxs(Flex, { gap: "2", children: [
13961
13910
  /* @__PURE__ */ jsx(IconButton, { "aria-label": "close", onClick: handleCancel, children: /* @__PURE__ */ jsx(RiIcon, { icon: "RiCloseLine" }) }),
13962
13911
  /* @__PURE__ */ jsx(IconButton, { "aria-label": `Download ${file.name}`, onClick: handleDownload, children: /* @__PURE__ */ jsx(RiIcon, { icon: "RiDownload2Line" }) })
@@ -13971,7 +13920,7 @@ const ImageMarkup = memo((props) => {
13971
13920
  trigger: /* @__PURE__ */ jsx(
13972
13921
  IconButton,
13973
13922
  {
13974
- className: styles$6.MarkupEditButton,
13923
+ className: styles$5.MarkupEditButton,
13975
13924
  "aria-label": "Markup color picker",
13976
13925
  type: "button",
13977
13926
  variant: "solid",
@@ -14046,7 +13995,7 @@ const ImageMarkup = memo((props) => {
14046
13995
  alt: "Photo attachment",
14047
13996
  ref: watchResizeTarget,
14048
13997
  src: file.objectURL,
14049
- className: styles$6.MarkupImage
13998
+ className: styles$5.MarkupImage
14050
13999
  }
14051
14000
  ),
14052
14001
  loading ? /* @__PURE__ */ jsx(Spinner, {}) : /* @__PURE__ */ jsx(
@@ -14117,7 +14066,7 @@ const FileViewerProvider = memo((props) => {
14117
14066
  const value = useMemo(() => openFileViewer, [openFileViewer]);
14118
14067
  return /* @__PURE__ */ jsxs(FileViewerContext.Provider, { value, children: [
14119
14068
  children,
14120
- config && /* @__PURE__ */ jsxs(Fragment, { children: [
14069
+ config && /* @__PURE__ */ jsxs(Fragment$1, { children: [
14121
14070
  fileType === "spreadsheet" && /* @__PURE__ */ jsx(SpreadsheetViewer, { file: config.file, onDelete: config.onDelete, onClose: handleClose }),
14122
14071
  fileType === "pdf" && /* @__PURE__ */ jsx(PDFViewer, { file: config.file, onDelete: config.onDelete, onClose: handleClose }),
14123
14072
  fileType === "image" && /* @__PURE__ */ jsx(ImageViewer, { file: config.file, onDelete: config.onDelete, onClose: handleClose })
@@ -14127,7 +14076,7 @@ const FileViewerProvider = memo((props) => {
14127
14076
  FileViewerProvider.displayName = "FileViewerProvider";
14128
14077
  const FileCard$1 = "_FileCard_ledcm_1";
14129
14078
  const Errored = "_Errored_ledcm_7";
14130
- const styles$5 = {
14079
+ const styles$4 = {
14131
14080
  FileCard: FileCard$1,
14132
14081
  Errored
14133
14082
  };
@@ -14143,9 +14092,9 @@ const FileCard = memo(
14143
14092
  OvermapItem,
14144
14093
  {
14145
14094
  className: classNames$1(
14146
- styles$5.FileCard,
14095
+ styles$4.FileCard,
14147
14096
  {
14148
- [styles$5.Errored]: error2
14097
+ [styles$4.Errored]: error2
14149
14098
  },
14150
14099
  className
14151
14100
  ),
@@ -14164,7 +14113,7 @@ const ImageInset = "_ImageInset_kbztw_7";
14164
14113
  const Image$1 = "_Image_kbztw_1";
14165
14114
  const Footer = "_Footer_kbztw_19";
14166
14115
  const Loading = "_Loading_kbztw_22";
14167
- const styles$4 = {
14116
+ const styles$3 = {
14168
14117
  ImageCard: ImageCard$1,
14169
14118
  ImageInset,
14170
14119
  Image: Image$1,
@@ -14190,7 +14139,7 @@ const ImageCard = memo(
14190
14139
  return /* @__PURE__ */ jsxs(
14191
14140
  Flex,
14192
14141
  {
14193
- className: classNames$1(className, styles$4.ImageCard),
14142
+ className: classNames$1(className, styles$3.ImageCard),
14194
14143
  width: "100%",
14195
14144
  direction: "column",
14196
14145
  position: "relative",
@@ -14200,12 +14149,12 @@ const ImageCard = memo(
14200
14149
  ...rest,
14201
14150
  children: [
14202
14151
  !file && !error2 && /* @__PURE__ */ jsx(Flex, { width: "100%", height: "100%", align: "center", justify: "center", position: "absolute", children: /* @__PURE__ */ jsx(Spinner, {}) }),
14203
- /* @__PURE__ */ jsx(Inset, { className: styles$4.ImageInset, ref: imageInsetRef, clip: "padding-box", side: "y", pb: "0", children: file && !error2 && /* @__PURE__ */ jsx("img", { className: styles$4.Image, src: URL.createObjectURL(file), alt: alt ?? file.name }) }),
14152
+ /* @__PURE__ */ jsx(Inset, { className: styles$3.ImageInset, ref: imageInsetRef, clip: "padding-box", side: "y", pb: "0", children: file && !error2 && /* @__PURE__ */ jsx("img", { className: styles$3.Image, src: URL.createObjectURL(file), alt: alt ?? file.name }) }),
14204
14153
  /* @__PURE__ */ jsx(
14205
14154
  OvermapItem,
14206
14155
  {
14207
- className: classNames$1(styles$4.Footer, {
14208
- [styles$4.Loading]: !file
14156
+ className: classNames$1(styles$3.Footer, {
14157
+ [styles$3.Loading]: !file
14209
14158
  }),
14210
14159
  size,
14211
14160
  ref: fileCardRef,
@@ -14254,7 +14203,7 @@ const UploadInput = memo((props) => {
14254
14203
  const multipleButtonText = value ? "Select new files" : "Select files";
14255
14204
  const singleButtonText = value ? "Select new file" : "Select a file";
14256
14205
  const buttonText = field.maxFiles > 1 ? multipleButtonText : singleButtonText;
14257
- return /* @__PURE__ */ jsxs(Flex$1, { direction: "column", gap: "2", children: [
14206
+ return /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "2", children: [
14258
14207
  /* @__PURE__ */ jsx(InputWithLabelAndHelpText, { helpText: updatedHelpText, severity, children: /* @__PURE__ */ jsxs(
14259
14208
  InputWithLabel,
14260
14209
  {
@@ -14265,7 +14214,7 @@ const UploadInput = memo((props) => {
14265
14214
  label,
14266
14215
  image: showInputOnly ? void 0 : field.image,
14267
14216
  children: [
14268
- /* @__PURE__ */ jsx(Flex$1, { direction: "row", gap: "2", children: /* @__PURE__ */ jsx(Box, { width: "max-content", asChild: true, children: /* @__PURE__ */ jsxs(Button, { ...rest, variant: "soft", onClick: handleClick, id: "upload-input-upload-button", children: [
14217
+ /* @__PURE__ */ jsx(Flex, { direction: "row", gap: "2", children: /* @__PURE__ */ jsx(Box, { width: "max-content", asChild: true, children: /* @__PURE__ */ jsxs(Button, { ...rest, variant: "soft", onClick: handleClick, id: "upload-input-upload-button", children: [
14269
14218
  /* @__PURE__ */ jsx(RiIcon, { icon: "RiUpload2Line" }),
14270
14219
  " ",
14271
14220
  buttonText
@@ -14288,7 +14237,7 @@ const UploadInput = memo((props) => {
14288
14237
  ]
14289
14238
  }
14290
14239
  ) }),
14291
- Array.isArray(value) && value.length > 0 && /* @__PURE__ */ jsx(Flex$1, { direction: "column", gap: "2", height: "max-content", children: value.map((file, index2) => /* @__PURE__ */ jsx(
14240
+ Array.isArray(value) && value.length > 0 && /* @__PURE__ */ jsx(Flex, { direction: "column", gap: "2", height: "max-content", children: value.map((file, index2) => /* @__PURE__ */ jsx(
14292
14241
  DisplayFile,
14293
14242
  {
14294
14243
  field,
@@ -14604,7 +14553,7 @@ const useFieldInputs = (fields, props) => {
14604
14553
  return /* @__PURE__ */ jsx("div", { children: field.getInput(props) }, field.getId());
14605
14554
  });
14606
14555
  }, [fields, props]);
14607
- return /* @__PURE__ */ jsx(Flex$1, { direction: "column", gap: "2", children: inputs });
14556
+ return /* @__PURE__ */ jsx(Flex, { direction: "column", gap: "2", children: inputs });
14608
14557
  };
14609
14558
  const FieldSectionLayout = memo((props) => {
14610
14559
  const { field: section, ...rest } = props;
@@ -14629,10 +14578,10 @@ const FieldSectionLayout = memo((props) => {
14629
14578
  if (!label) {
14630
14579
  return inputs;
14631
14580
  }
14632
- return /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(Flex$1, { direction: "column", gap: "3", children: [
14633
- /* @__PURE__ */ jsxs(Flex$1, { direction: "column", children: [
14581
+ return /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "3", children: [
14582
+ /* @__PURE__ */ jsxs(Flex, { direction: "column", children: [
14634
14583
  /* @__PURE__ */ jsx(Heading, { as: "h3", size: "3", children: label }),
14635
- /* @__PURE__ */ jsx(Text$1, { className: styles$c.description, children: description2 })
14584
+ /* @__PURE__ */ jsx(Text, { className: styles$b.description, children: description2 })
14636
14585
  ] }),
14637
14586
  inputs
14638
14587
  ] }) });
@@ -14875,7 +14824,7 @@ const FormRenderer = memo(
14875
14824
  [schema.title]
14876
14825
  );
14877
14826
  const Description = useMemo(
14878
- () => typeof schema.description === "string" ? /* @__PURE__ */ jsx(Text$1, { className: styles$c.description, children: schema.description }) : schema.description,
14827
+ () => typeof schema.description === "string" ? /* @__PURE__ */ jsx(Text, { className: styles$b.description, children: schema.description }) : schema.description,
14879
14828
  [schema.description]
14880
14829
  );
14881
14830
  const inputs = useFieldInputs(schema.fields, { formId: formId2, disabled: readonly });
@@ -14885,13 +14834,13 @@ const FormRenderer = memo(
14885
14834
  if (onDirtyChange)
14886
14835
  onDirtyChange(dirty);
14887
14836
  }, [dirty, onDirty, onDirtyChange]);
14888
- return /* @__PURE__ */ jsx(FormikProvider, { value: formik, children: /* @__PURE__ */ jsx(Flex$1, { ref, direction: "column", gap: "2", className, asChild: true, children: /* @__PURE__ */ jsxs("form", { id: formId2, onSubmit: formik.handleSubmit, children: [
14889
- !hideTitle && /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(Flex$1, { direction: "column", gap: "1", children: [
14837
+ return /* @__PURE__ */ jsx(FormikProvider, { value: formik, children: /* @__PURE__ */ jsx(Flex, { ref, direction: "column", gap: "2", className, asChild: true, children: /* @__PURE__ */ jsxs("form", { id: formId2, onSubmit: formik.handleSubmit, children: [
14838
+ !hideTitle && /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "1", children: [
14890
14839
  Title,
14891
14840
  !hideDescription && Description
14892
14841
  ] }) }),
14893
14842
  inputs,
14894
- !readonly && /* @__PURE__ */ jsxs(Flex$1, { className: styles$c.floatingButtonContainer, align: "center", justify: "end", gap: "2", children: [
14843
+ !readonly && /* @__PURE__ */ jsxs(Flex, { className: styles$b.floatingButtonContainer, align: "center", justify: "end", gap: "2", children: [
14895
14844
  cancelText && /* @__PURE__ */ jsx(Button, { severity: "info", ...buttonProps, type: "button", onClick: onCancel, children: cancelText }),
14896
14845
  /* @__PURE__ */ jsx(Button, { ...buttonProps, type: "submit", disabled: !formik.isValid, children: submitText })
14897
14846
  ] })
@@ -14943,7 +14892,7 @@ const FormSubmissionViewer = memo(
14943
14892
  );
14944
14893
  const favoriteIcon = "_favoriteIcon_1bixi_1";
14945
14894
  const regularIcon = "_regularIcon_1bixi_9";
14946
- const styles$3 = {
14895
+ const styles$2 = {
14947
14896
  favoriteIcon,
14948
14897
  regularIcon
14949
14898
  };
@@ -15003,8 +14952,8 @@ const FormBrowser = memo(
15003
14952
  const numberOfForms = useSelector(selectGeneralFormCount) || 0;
15004
14953
  const numberOfHiddenForms = numberOfForms - attachableUserForms.length;
15005
14954
  const overflowMessage = attachableUserForms.length == maxResults && numberOfHiddenForms > 0 ? `Only the first ${maxResults} results are shown (${numberOfHiddenForms} hidden)` : numberOfHiddenForms > 0 && `${numberOfHiddenForms} hidden forms`;
15006
- return /* @__PURE__ */ jsxs(Flex$1, { ref, direction: "column", gap: "2", children: [
15007
- /* @__PURE__ */ jsxs(Flex$1, { gap: "2", grow: "1", children: [
14955
+ return /* @__PURE__ */ jsxs(Flex, { ref, direction: "column", gap: "2", children: [
14956
+ /* @__PURE__ */ jsxs(Flex, { gap: "2", grow: "1", children: [
15008
14957
  /* @__PURE__ */ jsx(Box, { grow: "1", asChild: true, children: /* @__PURE__ */ jsx(TextField$1.Root, { size: "3", children: /* @__PURE__ */ jsx(TextField$1.Input, { placeholder: "Filter", value: filter, onChange: handleChange }) }) }),
15009
14958
  /* @__PURE__ */ jsx(
15010
14959
  Select,
@@ -15028,7 +14977,7 @@ const FormBrowser = memo(
15028
14977
  },
15029
14978
  form.offline_id
15030
14979
  )) }),
15031
- /* @__PURE__ */ jsx(Box, { px: "3", children: /* @__PURE__ */ jsx(Text$1, { size: "2", severity: "info", children: overflowMessage }) })
14980
+ /* @__PURE__ */ jsx(Box, { px: "3", children: /* @__PURE__ */ jsx(Text, { size: "2", color: "gray", children: overflowMessage }) })
15032
14981
  ] });
15033
14982
  })
15034
14983
  );
@@ -15054,12 +15003,12 @@ const FormBrowserEntry = (props) => {
15054
15003
  onSelectForm(form);
15055
15004
  },
15056
15005
  asChild: true,
15057
- children: /* @__PURE__ */ jsxs(Flex$1, { justify: "between", gap: "2", py: "2", px: "3", ...divButtonProps, children: [
15058
- /* @__PURE__ */ jsxs(Flex$1, { grow: "1", align: "center", gap: "2", children: [
15006
+ children: /* @__PURE__ */ jsxs(Flex, { justify: "between", gap: "2", py: "2", px: "3", ...divButtonProps, children: [
15007
+ /* @__PURE__ */ jsxs(Flex, { grow: "1", align: "center", gap: "2", children: [
15059
15008
  /* @__PURE__ */ jsx(
15060
15009
  IconButton,
15061
15010
  {
15062
- className: classNames$1(form.favorite ? styles$3.favoriteIcon : styles$3.regularIcon),
15011
+ className: classNames$1(form.favorite ? styles$2.favoriteIcon : styles$2.regularIcon),
15063
15012
  variant: "ghost",
15064
15013
  onClick: handleFavoriteClick,
15065
15014
  "aria-label": form.favorite ? "Favorite form" : "Standard form",
@@ -15067,10 +15016,10 @@ const FormBrowserEntry = (props) => {
15067
15016
  children: form.favorite ? /* @__PURE__ */ jsx(RiIcon, { icon: "RiStarFill" }) : /* @__PURE__ */ jsx(RiIcon, { icon: "RiStarLine" })
15068
15017
  }
15069
15018
  ),
15070
- /* @__PURE__ */ jsx(Text$1, { noWrap: true, children: form.latestRevision.title }),
15019
+ /* @__PURE__ */ jsx(Text, { children: form.latestRevision.title }),
15071
15020
  form.latestRevision.description && /* @__PURE__ */ jsx(RiIcon, { icon: "RiQuestionLine" })
15072
15021
  ] }),
15073
- owner && /* @__PURE__ */ jsxs(Flex$1, { align: "center", gap: "2", children: [
15022
+ owner && /* @__PURE__ */ jsxs(Flex, { align: "center", gap: "2", children: [
15074
15023
  /* @__PURE__ */ jsx(RiIcon, { icon: "RiUserLine" }),
15075
15024
  " ",
15076
15025
  owner
@@ -15083,101 +15032,6 @@ const FormBrowserEntry = (props) => {
15083
15032
  }
15084
15033
  return ret;
15085
15034
  };
15086
- const submissionsContainer = "_submissionsContainer_9iirt_1";
15087
- const stopHorizontalOverflow = "_stopHorizontalOverflow_9iirt_6";
15088
- const styles$2 = {
15089
- submissionsContainer,
15090
- stopHorizontalOverflow
15091
- };
15092
- const FormSubmissionBrowserEntry = memo((props) => {
15093
- var _a2;
15094
- const { submission, onSubmissionClick, compact, labelType, rowDecorator } = props;
15095
- const currentUser = useSelector(selectCurrentUser);
15096
- const createdBy = useSelector(selectUser("created_by" in submission ? submission.created_by : currentUser.id));
15097
- const dateToUse = submission.submitted_at;
15098
- const formattedDateTime = getLocalDateString(dateToUse);
15099
- const revision = useSelector(selectFormRevision(submission.form_revision));
15100
- if (!revision) {
15101
- throw new Error(`Could not find revision ${submission.form_revision} for submission ${submission.offline_id}.`);
15102
- }
15103
- const latestRevisionNumber = (_a2 = useSelector(selectLatestFormRevisionOfForm(revision.form))) == null ? void 0 : _a2.revision;
15104
- const creatorProfileSrc = useFileSrc({
15105
- file: (createdBy == null ? void 0 : createdBy.profile.file) ?? null,
15106
- fileSha1: (createdBy == null ? void 0 : createdBy.profile.file_sha1) ?? null
15107
- });
15108
- const creatorProfileFallback = (createdBy == null ? void 0 : createdBy.username.charAt(0).toUpperCase()) ?? "?";
15109
- const isLatestRevision = revision.revision === latestRevisionNumber;
15110
- const handleClick = useCallback(() => {
15111
- if (onSubmissionClick) {
15112
- onSubmissionClick({ submission });
15113
- }
15114
- }, [submission, onSubmissionClick]);
15115
- const row = /* @__PURE__ */ jsx(ButtonList.Item, { onClick: handleClick, asChild: true, children: /* @__PURE__ */ jsxs(Flex$1, { grow: "1", width: "100%", p: "2", gap: "2", justify: "between", children: [
15116
- /* @__PURE__ */ jsxs(Flex$1, { gap: "2", align: "center", className: styles$2.stopHorizontalOverflow, children: [
15117
- /* @__PURE__ */ jsx(Avatar, { src: creatorProfileSrc, size: "1", fallback: creatorProfileFallback }),
15118
- /* @__PURE__ */ jsx(Text$1, { size: "2", noWrap: true, children: labelType === "creator" ? (createdBy || currentUser).username : revision.title })
15119
- ] }),
15120
- /* @__PURE__ */ jsxs(Flex$1, { gap: "2", align: "center", children: [
15121
- !compact && (revision.revision ? /* @__PURE__ */ jsxs(Badge, { variant: "soft", severity: isLatestRevision ? "primary" : "info", children: [
15122
- "Revision #$",
15123
- revision.revision
15124
- ] }) : !!latestRevisionNumber && /* @__PURE__ */ jsx(Badge, { children: "Original" })),
15125
- /* @__PURE__ */ jsx(Text$1, { size: "2", noWrap: true, children: formattedDateTime })
15126
- ] })
15127
- ] }) });
15128
- if (rowDecorator) {
15129
- return rowDecorator(submission, row);
15130
- }
15131
- return row;
15132
- });
15133
- FormSubmissionBrowserEntry.displayName = "FormSubmissionBrowserEntry";
15134
- const FormSubmissionBrowser = memo((props) => {
15135
- const {
15136
- formId: formId2,
15137
- submissions: propSubmissions,
15138
- compact = false,
15139
- className,
15140
- after,
15141
- variant = "outline",
15142
- ...submissionEntryProps
15143
- } = props;
15144
- if (!!formId2 === !!propSubmissions) {
15145
- throw new Error("Either formId or submissions must be provided, but not both.");
15146
- }
15147
- const submissions = useSelector(propSubmissions ? () => propSubmissions : selectFormSubmissionsOfForm(formId2));
15148
- const sortedSubmissions = useMemo(
15149
- () => submissions == null ? void 0 : submissions.sort((a, b) => {
15150
- return a.submitted_at.localeCompare(b.submitted_at);
15151
- }),
15152
- [submissions]
15153
- );
15154
- return /* @__PURE__ */ jsx(
15155
- ButtonList.Root,
15156
- {
15157
- className: classNames$1(styles$2.submissionsContainer, className),
15158
- size: "small",
15159
- variant,
15160
- before: !compact && /* @__PURE__ */ jsxs(Text$1, { severity: "info", children: [
15161
- "There are ",
15162
- ((submissions == null ? void 0 : submissions.length) || 0).toString(),
15163
- " submissions of this form."
15164
- ] }),
15165
- after,
15166
- children: sortedSubmissions == null ? void 0 : sortedSubmissions.map((submission, index2) => {
15167
- return /* @__PURE__ */ jsx(
15168
- FormSubmissionBrowserEntry,
15169
- {
15170
- submission,
15171
- compact,
15172
- ...submissionEntryProps
15173
- },
15174
- index2
15175
- );
15176
- })
15177
- }
15178
- );
15179
- });
15180
- FormSubmissionBrowser.displayName = "FormSubmissionBrowser";
15181
15035
  const PatchField = memo((props) => {
15182
15036
  const { name, render } = props;
15183
15037
  const { submitForm } = useFormikContext();
@@ -15195,7 +15049,7 @@ const PatchField = memo((props) => {
15195
15049
  }
15196
15050
  });
15197
15051
  }, [render, fieldProps.value, _meta, submitForm, helpers]);
15198
- return /* @__PURE__ */ jsx(Fragment, { children: ret });
15052
+ return /* @__PURE__ */ jsx(Fragment$1, { children: ret });
15199
15053
  });
15200
15054
  PatchField.displayName = "PatchField";
15201
15055
  const PatchFormProvider = memo(
@@ -15336,8 +15190,8 @@ const FieldActions = memo((props) => {
15336
15190
  }
15337
15191
  return actions2;
15338
15192
  }, [duplicate, index2, move, remove2, sectionIndex, type, values.fields]);
15339
- return /* @__PURE__ */ jsxs(Fragment, { children: [
15340
- /* @__PURE__ */ jsx(Flex$1, { display: forMobile(false, "flex"), direction: "column", gap: "5", mx: "2", children: actions.map((Action) => /* @__PURE__ */ jsx(
15193
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
15194
+ /* @__PURE__ */ jsx(Flex, { display: forMobile(false, "flex"), direction: "column", gap: "5", mx: "2", children: actions.map((Action) => /* @__PURE__ */ jsx(
15341
15195
  IconButton,
15342
15196
  {
15343
15197
  type: "button",
@@ -15446,12 +15300,12 @@ const FieldSettingsPopover = memo((props) => {
15446
15300
  hoverEffects: ["spin90Clockwise"],
15447
15301
  children: [
15448
15302
  /* @__PURE__ */ jsx(RiIcon, { icon: "RiSettings2Line" }),
15449
- /* @__PURE__ */ jsx(Text$1, { children: "Settings" })
15303
+ /* @__PURE__ */ jsx(Text, { children: "Settings" })
15450
15304
  ]
15451
15305
  },
15452
15306
  "settings"
15453
15307
  ),
15454
- children: () => /* @__PURE__ */ jsx(Flex$1, { className: styles.popoverInputsContainer, direction: "column", children: popoverInputs })
15308
+ children: () => /* @__PURE__ */ jsx(Flex, { className: styles.popoverInputsContainer, direction: "column", children: popoverInputs })
15455
15309
  }
15456
15310
  );
15457
15311
  });
@@ -15587,15 +15441,16 @@ const FieldBuilder = memo((props) => {
15587
15441
  const error2 = get(errors, fieldCls === FieldSection ? `${parentPath}.${index2}.condition` : field.getId());
15588
15442
  return error2 && (typeof error2 !== "object" || hasKeys(error2));
15589
15443
  });
15444
+ const color = useSeverityColor(popoverHasErrors ? "danger" : "primary");
15590
15445
  const deserializedField = useMemo(() => deserialize(initial), [initial]);
15591
15446
  const previewInput2 = useFieldInput(deserializedField, { formId, disabled: true, showInputOnly: true });
15592
- return /* @__PURE__ */ jsxs(Flex$1, { ref: containerRef, align: "center", grow: "1", children: [
15593
- /* @__PURE__ */ jsxs(Flex$1, { direction: "column", width: "100%", children: [
15594
- fieldCls === FieldSection && /* @__PURE__ */ jsxs(Flex$1, { direction: "column", gap: "1", children: [
15447
+ return /* @__PURE__ */ jsxs(Flex, { ref: containerRef, align: "center", grow: "1", children: [
15448
+ /* @__PURE__ */ jsxs(Flex, { direction: "column", width: "100%", children: [
15449
+ fieldCls === FieldSection && /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "1", children: [
15595
15450
  directlyShownFields.length > 0 && directlyShownInputs,
15596
- /* @__PURE__ */ jsxs(Flex$1, { align: "center", gap: "2", children: [
15451
+ /* @__PURE__ */ jsxs(Flex, { align: "center", gap: "2", children: [
15597
15452
  showPopoverInputs && /* @__PURE__ */ jsx(FieldSettingsPopover, { popoverInputs, hasError: popoverHasErrors }),
15598
- isSection(initial) && initial.conditional && /* @__PURE__ */ jsx(Text$1, { size: "1", severity: popoverHasErrors ? "danger" : "primary", children: /* @__PURE__ */ jsxs(Em, { children: [
15453
+ isSection(initial) && initial.conditional && /* @__PURE__ */ jsx(Text, { size: "1", color, children: /* @__PURE__ */ jsxs(Em, { children: [
15599
15454
  "Display only if ",
15600
15455
  /* @__PURE__ */ jsx(Strong, { children: conditionLabel }),
15601
15456
  " ",
@@ -15605,26 +15460,22 @@ const FieldBuilder = memo((props) => {
15605
15460
  ] }) })
15606
15461
  ] })
15607
15462
  ] }),
15608
- fieldCls !== FieldSection && /* @__PURE__ */ jsxs(Flex$1, { direction: "column", gap: "2", children: [
15463
+ fieldCls !== FieldSection && /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "2", children: [
15609
15464
  /* @__PURE__ */ jsx(
15610
15465
  PatchField,
15611
15466
  {
15612
15467
  name: `${parentPath}.${index2}.required`,
15613
- render: ({ setValue, value }) => /* @__PURE__ */ jsx(
15614
- Checkbox$1,
15615
- {
15616
- checked: value,
15617
- onCheckedChange: setValue,
15618
- label: /* @__PURE__ */ jsx(Text$1, { size: "2", children: "Required field" })
15619
- }
15620
- )
15468
+ render: ({ setValue, value }) => /* @__PURE__ */ jsxs(Flex, { children: [
15469
+ /* @__PURE__ */ jsx(Checkbox, { checked: value, onCheckedChange: setValue }),
15470
+ /* @__PURE__ */ jsx(Text, { size: "2", children: "Required field" })
15471
+ ] })
15621
15472
  }
15622
15473
  ),
15623
- /* @__PURE__ */ jsxs(Flex$1, { align: "center", gap: "3", children: [
15474
+ /* @__PURE__ */ jsxs(Flex, { align: "center", gap: "3", children: [
15624
15475
  /* @__PURE__ */ jsx(Badge, { className: styles.typeBadge, children: (_f = fieldTypeItems.flat().find((item) => item.value === type)) == null ? void 0 : _f.children }),
15625
15476
  showPopoverInputs && /* @__PURE__ */ jsx(FieldSettingsPopover, { popoverInputs, hasError: popoverHasErrors })
15626
15477
  ] }),
15627
- resolvedImage && /* @__PURE__ */ jsxs(Fragment, { children: [
15478
+ resolvedImage && /* @__PURE__ */ jsxs(Fragment$1, { children: [
15628
15479
  /* @__PURE__ */ jsxs("div", { className: styles.imageContainer, children: [
15629
15480
  /* @__PURE__ */ jsx(
15630
15481
  "img",
@@ -15792,7 +15643,7 @@ const FieldWithActions = memo((props) => {
15792
15643
  borderColor: "var(--accent-3)"
15793
15644
  },
15794
15645
  mb: "4",
15795
- children: /* @__PURE__ */ jsxs(Flex$1, { gap: "4", justify: "between", align: "center", children: [
15646
+ children: /* @__PURE__ */ jsxs(Flex, { gap: "4", justify: "between", align: "center", children: [
15796
15647
  /* @__PURE__ */ jsx(FieldBuilder, { ...editFieldProps }),
15797
15648
  /* @__PURE__ */ jsx(
15798
15649
  FieldActions,
@@ -15951,8 +15802,8 @@ const FieldSectionWithActions = memo((props) => {
15951
15802
  ...draggableProvided.draggableProps,
15952
15803
  ...draggableProvided.dragHandleProps,
15953
15804
  mb: "4",
15954
- children: /* @__PURE__ */ jsxs(Flex$1, { gap: "3", justify: "between", align: "center", children: [
15955
- /* @__PURE__ */ jsxs(Flex$1, { direction: "column", gap: "2", grow: "1", children: [
15805
+ children: /* @__PURE__ */ jsxs(Flex, { gap: "3", justify: "between", align: "center", children: [
15806
+ /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "2", grow: "1", children: [
15956
15807
  !fieldsOnly && /* @__PURE__ */ jsx(FieldBuilder, { ...editSectionProps }),
15957
15808
  /* @__PURE__ */ jsx(
15958
15809
  Droppable,
@@ -15961,7 +15812,7 @@ const FieldSectionWithActions = memo((props) => {
15961
15812
  type: "SECTION",
15962
15813
  isDropDisabled,
15963
15814
  children: (droppableProvided) => /* @__PURE__ */ jsxs(
15964
- Flex$1,
15815
+ Flex,
15965
15816
  {
15966
15817
  ref: droppableProvided.innerRef,
15967
15818
  ...droppableProvided.droppableProps,
@@ -16120,14 +15971,14 @@ const FieldsEditor = memo((props) => {
16120
15971
  [values, setFieldValue]
16121
15972
  );
16122
15973
  return /* @__PURE__ */ jsx(DragDropContext, { onDragStart: handleDragStart, onDragEnd: handleDragEnd, children: /* @__PURE__ */ jsx(Droppable, { droppableId: "droppable", type: "ROOT", children: (droppableProvided) => /* @__PURE__ */ jsxs(
16123
- Flex$1,
15974
+ Flex,
16124
15975
  {
16125
15976
  ref: droppableProvided.innerRef,
16126
15977
  ...droppableProvided.droppableProps,
16127
15978
  direction: "column",
16128
15979
  gap: "0",
16129
15980
  children: [
16130
- values.fields.map((field, index2) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
15981
+ values.fields.map((field, index2) => /* @__PURE__ */ jsxs(Fragment, { children: [
16131
15982
  /* @__PURE__ */ jsx(
16132
15983
  FieldSectionWithActions,
16133
15984
  {
@@ -16238,19 +16089,20 @@ const FormBuilder = memo(
16238
16089
  validateOnBlur: false
16239
16090
  });
16240
16091
  const previewSchema = useMemo(() => formRevisionToSchema(formik.values), [formik.values]);
16241
- return /* @__PURE__ */ jsx(Tabs.Root, { ref, defaultValue: "edit", children: /* @__PURE__ */ jsxs(Flex$1, { direction: "column", gap: "2", children: [
16242
- showTabs && /* @__PURE__ */ jsxs(Tabs.List, { className: classNames$1(styles$d.tabsList, tabsListClassName), children: [
16243
- /* @__PURE__ */ jsx(Tabs.Trigger, { className: styles$d.tabTrigger, value: "edit", children: /* @__PURE__ */ jsxs(Flex$1, { align: "center", gap: "2", children: [
16092
+ const dangerColor = useSeverityColor("danger");
16093
+ return /* @__PURE__ */ jsx(Tabs.Root, { ref, defaultValue: "edit", children: /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "2", children: [
16094
+ showTabs && /* @__PURE__ */ jsxs(Tabs.List, { className: classNames$1(styles$c.tabsList, tabsListClassName), children: [
16095
+ /* @__PURE__ */ jsx(Tabs.Trigger, { className: styles$c.tabTrigger, value: "edit", children: /* @__PURE__ */ jsxs(Flex, { align: "center", gap: "2", children: [
16244
16096
  /* @__PURE__ */ jsx(RiIcon, { icon: "RiPencilLine" }),
16245
16097
  "Edit"
16246
16098
  ] }) }),
16247
- /* @__PURE__ */ jsx(Tabs.Trigger, { className: styles$d.tabTrigger, value: "preview", children: /* @__PURE__ */ jsxs(Flex$1, { align: "center", gap: "2", children: [
16099
+ /* @__PURE__ */ jsx(Tabs.Trigger, { className: styles$c.tabTrigger, value: "preview", children: /* @__PURE__ */ jsxs(Flex, { align: "center", gap: "2", children: [
16248
16100
  /* @__PURE__ */ jsx(RiIcon, { icon: "RiEyeLine" }),
16249
16101
  "Preview"
16250
16102
  ] }) })
16251
16103
  ] }),
16252
16104
  /* @__PURE__ */ jsxs(Tabs.Content, { value: "edit", children: [
16253
- showExplainerText && /* @__PURE__ */ jsxs(Text$1, { children: [
16105
+ showExplainerText && /* @__PURE__ */ jsxs(Text, { children: [
16254
16106
  "Create your form using various field types. Sections can be",
16255
16107
  " ",
16256
16108
  /* @__PURE__ */ jsx("strong", { children: "conditionally rendered" }),
@@ -16258,9 +16110,9 @@ const FormBuilder = memo(
16258
16110
  " ",
16259
16111
  /* @__PURE__ */ jsx("strong", { children: "answers to fields in preceding sections. " })
16260
16112
  ] }),
16261
- /* @__PURE__ */ jsx(Flex$1, { asChild: true, direction: "column", gap: "2", mt: "3", children: /* @__PURE__ */ jsxs("form", { id: formId, onSubmit: formik.handleSubmit, children: [
16113
+ /* @__PURE__ */ jsx(Flex, { asChild: true, direction: "column", gap: "2", mt: "3", children: /* @__PURE__ */ jsxs("form", { id: formId, onSubmit: formik.handleSubmit, children: [
16262
16114
  /* @__PURE__ */ jsxs(FormikProvider, { value: formik, children: [
16263
- showFormTitle && /* @__PURE__ */ jsxs(Fragment, { children: [
16115
+ showFormTitle && /* @__PURE__ */ jsxs(Fragment$1, { children: [
16264
16116
  /* @__PURE__ */ jsx(
16265
16117
  PatchField,
16266
16118
  {
@@ -16268,8 +16120,8 @@ const FormBuilder = memo(
16268
16120
  render: ({ setValue, value, meta }) => /* @__PURE__ */ jsx(InputWithHelpText, { severity: "danger", helpText: meta.error ?? null, children: /* @__PURE__ */ jsx(
16269
16121
  Input,
16270
16122
  {
16271
- className: classNames$1(styles$d.title, {
16272
- [styles$d.error]: meta.error
16123
+ className: classNames$1(styles$c.title, {
16124
+ [styles$c.error]: meta.error
16273
16125
  }),
16274
16126
  placeholder: "Form title",
16275
16127
  value,
@@ -16291,7 +16143,7 @@ const FormBuilder = memo(
16291
16143
  render: ({ setValue, value }) => /* @__PURE__ */ jsx(
16292
16144
  TextArea,
16293
16145
  {
16294
- className: styles$d.description,
16146
+ className: styles$c.description,
16295
16147
  placeholder: "Explain the purpose of this form",
16296
16148
  value,
16297
16149
  onChange: (event) => {
@@ -16307,9 +16159,9 @@ const FormBuilder = memo(
16307
16159
  )
16308
16160
  ] }),
16309
16161
  /* @__PURE__ */ jsx(FieldsEditor, { fieldsOnly }),
16310
- /* @__PURE__ */ jsx(Text$1, { severity: "danger", size: "1", children: typeof formik.errors.fields === "string" && formik.errors.fields })
16162
+ /* @__PURE__ */ jsx(Text, { color: dangerColor, size: "1", children: typeof formik.errors.fields === "string" && formik.errors.fields })
16311
16163
  ] }),
16312
- /* @__PURE__ */ jsxs(Flex$1, { className: styles$d.floatingButtonContainer, align: "center", justify: "end", gap: "2", children: [
16164
+ /* @__PURE__ */ jsxs(Flex, { className: styles$c.floatingButtonContainer, align: "center", justify: "end", gap: "2", children: [
16313
16165
  onCancel && /* @__PURE__ */ jsx(Button, { type: "button", variant: "solid", severity: "info", onClick: onCancel, children: "Cancel" }),
16314
16166
  /* @__PURE__ */ jsx(Button, { type: "submit", children: "Save form" })
16315
16167
  ] })
@@ -16331,7 +16183,6 @@ const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
16331
16183
  FormBrowser,
16332
16184
  FormBuilder,
16333
16185
  FormRenderer,
16334
- FormSubmissionBrowser,
16335
16186
  FormSubmissionViewer,
16336
16187
  InputWithHelpText,
16337
16188
  InputWithLabel,
@@ -16411,7 +16262,6 @@ export {
16411
16262
  FormBrowser,
16412
16263
  FormBuilder,
16413
16264
  FormRenderer,
16414
- FormSubmissionBrowser,
16415
16265
  FormSubmissionViewer,
16416
16266
  GREEN,
16417
16267
  HttpMethod,
@@ -16660,7 +16510,6 @@ export {
16660
16510
  outboxReducer,
16661
16511
  outboxSlice,
16662
16512
  overmapEnhancer,
16663
- overmapReducer,
16664
16513
  overmapReducers,
16665
16514
  overmapRootReducer,
16666
16515
  patchCategory,
@@ -16861,6 +16710,7 @@ export {
16861
16710
  selectOrganizationsWithAccess,
16862
16711
  selectPermittedWorkspaceIds,
16863
16712
  selectPhotoAttachmentsOfIssue,
16713
+ selectProject,
16864
16714
  selectProjectAccess,
16865
16715
  selectProjectAccessForUser,
16866
16716
  selectProjectAccessUserMapping,
@@ -16932,6 +16782,7 @@ export {
16932
16782
  setEnableClustering,
16933
16783
  setEnableDuplicateIssues,
16934
16784
  setEnablePlacementMode,
16785
+ setEnableSvgLayout,
16935
16786
  setFormRevision,
16936
16787
  setFormRevisionAttachments,
16937
16788
  setFormRevisions,
@@ -16961,6 +16812,7 @@ export {
16961
16812
  setProjectAttachments,
16962
16813
  setProjectFileVisible,
16963
16814
  setProjects,
16815
+ setRehydrated,
16964
16816
  setSectionExpanded,
16965
16817
  setShowTooltips,
16966
16818
  setStageCompletions,