@vitessce/statistical-plots 4.0.7 → 4.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/{deflate-C-0XOaix.js → deflate-BG2HUqgg.js} +1 -1
  2. package/dist/{index-CFje_HC1.js → index-DySLEwfl.js} +2327 -156
  3. package/dist/index.js +2 -1
  4. package/dist/{jpeg-HJZeqbJ9.js → jpeg-DhNGUcND.js} +1 -1
  5. package/dist/{lerc-BtoOWLPL.js → lerc-CeaVG0Hd.js} +1 -1
  6. package/dist/{lzw-BS2ckxRa.js → lzw-DkbMJx1b.js} +1 -1
  7. package/dist/{packbits-8sTofHBF.js → packbits-8pX5TxcK.js} +1 -1
  8. package/dist/{raw-DA0bjume.js → raw-Dg8kCOnj.js} +1 -1
  9. package/dist/{webimage-C3yiEsf-.js → webimage-DqIQm4cj.js} +1 -1
  10. package/dist-tsc/CellSetCompositionBarPlot.d.ts.map +1 -1
  11. package/dist-tsc/CellSetCompositionBarPlot.js +87 -53
  12. package/dist-tsc/CellSetCompositionBarPlot.js.map +1 -1
  13. package/dist-tsc/SingleCellSetSelector.d.ts +2 -0
  14. package/dist-tsc/SingleCellSetSelector.d.ts.map +1 -0
  15. package/dist-tsc/SingleCellSetSelector.js +27 -0
  16. package/dist-tsc/SingleCellSetSelector.js.map +1 -0
  17. package/dist-tsc/SingleCellSetSelectorSubscriber.d.ts +2 -0
  18. package/dist-tsc/SingleCellSetSelectorSubscriber.d.ts.map +1 -0
  19. package/dist-tsc/SingleCellSetSelectorSubscriber.js +40 -0
  20. package/dist-tsc/SingleCellSetSelectorSubscriber.js.map +1 -0
  21. package/dist-tsc/VolcanoPlot.d.ts.map +1 -1
  22. package/dist-tsc/VolcanoPlot.js +6 -2
  23. package/dist-tsc/VolcanoPlot.js.map +1 -1
  24. package/dist-tsc/VolcanoPlotOptions.js +2 -2
  25. package/dist-tsc/VolcanoPlotOptions.js.map +1 -1
  26. package/dist-tsc/VolcanoPlotSubscriber.d.ts.map +1 -1
  27. package/dist-tsc/VolcanoPlotSubscriber.js +3 -1
  28. package/dist-tsc/VolcanoPlotSubscriber.js.map +1 -1
  29. package/dist-tsc/index.d.ts +1 -0
  30. package/dist-tsc/index.js +1 -0
  31. package/dist-tsc/index.js.map +1 -1
  32. package/package.json +8 -8
  33. package/src/CellSetCompositionBarPlot.js +102 -57
  34. package/src/SingleCellSetSelector.js +54 -0
  35. package/src/SingleCellSetSelectorSubscriber.js +124 -0
  36. package/src/VolcanoPlot.js +8 -2
  37. package/src/VolcanoPlotOptions.js +2 -2
  38. package/src/VolcanoPlotSubscriber.js +33 -21
  39. package/src/index.js +1 -0
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import React__default, { useState, useContext, useRef, useEffect, forwardRef as forwardRef$1, useMemo, createContext, createElement, isValidElement, cloneElement, Children, PureComponent, Suspense, useCallback } from "react";
3
- import { usePlotOptionsStyles, OptionsContainer, OptionSelect, useLoaders, useCoordinationScopes, useCoordination, useGridItemSize, useFeatureSelection, useFeatureLabelsData, useExpandedFeatureLabelsMap, useObsFeatureMatrixIndices, useObsSetsData, useSampleSetsData, useSampleEdgesData, useReady, useUrls, TitleInfo, useObsFeatureMatrixData, useMatchingLoader, useColumnNameMapping, useFeatureStatsData, useObsSetStatsData, useAsyncFunction, useFeatureSetStatsData } from "@vitessce/vit-s";
3
+ import { usePlotOptionsStyles, OptionsContainer, OptionSelect, useLoaders, useCoordinationScopes, useCoordination, useGridItemSize, useFeatureSelection, useFeatureLabelsData, useExpandedFeatureLabelsMap, useObsFeatureMatrixIndices, useObsSetsData, useSampleSetsData, useSampleEdgesData, useReady, useUrls, TitleInfo, useObsFeatureMatrixData, useMatchingLoader, useColumnNameMapping, useFeatureStatsData, useObsSetStatsData, useAsyncFunction, useFeatureSetStatsData, useMultiCoordinationScopes } from "@vitessce/vit-s";
4
4
  import { jsx as jsx$1, jsxs, Fragment } from "react/jsx-runtime";
5
5
  import * as ReactDOM from "react-dom";
6
6
  import ReactDOM__default from "react-dom";
@@ -53,7 +53,9 @@ const ViewType$1 = {
53
53
  DUAL_SCATTERPLOT: "dualScatterplot",
54
54
  TREEMAP: "treemap",
55
55
  SAMPLE_SET_PAIR_MANAGER: "sampleSetPairManager",
56
- FEATURE_STATS_TABLE: "featureStatsTable"
56
+ FEATURE_STATS_TABLE: "featureStatsTable",
57
+ SINGLE_OBS_SET_SELECTOR: "singleObsSetSelector",
58
+ ANNOTATION_CONTROLLER: "annotationController"
57
59
  };
58
60
  const DataType$2 = {
59
61
  OBS_LABELS: "obsLabels",
@@ -74,7 +76,8 @@ const DataType$2 = {
74
76
  COMPARISON_METADATA: "comparisonMetadata",
75
77
  FEATURE_STATS: "featureStats",
76
78
  FEATURE_SET_STATS: "featureSetStats",
77
- OBS_SET_STATS: "obsSetStats"
79
+ OBS_SET_STATS: "obsSetStats",
80
+ ANNOTATION_STORY: "annotationStory"
78
81
  };
79
82
  const AsyncFunctionType = {
80
83
  TRANSFORM_FEATURE: "transformFeature"
@@ -99,6 +102,7 @@ const FileType$1 = {
99
102
  OBS_SETS_CSV: "obsSets.csv",
100
103
  OBS_SETS_JSON: "obsSets.json",
101
104
  SAMPLE_SETS_CSV: "sampleSets.csv",
105
+ ANNOTATION_STORY_JSON: "annotationStory.json",
102
106
  // OME-Zarr
103
107
  IMAGE_OME_ZARR: "image.ome-zarr",
104
108
  OBS_SEGMENTATIONS_OME_ZARR: "obsSegmentations.ome-zarr",
@@ -383,7 +387,15 @@ const CoordinationType$1 = {
383
387
  FEATURE_POINT_FOLD_CHANGE_THRESHOLD: "featurePointFoldChangeThreshold",
384
388
  FEATURE_LABEL_FOLD_CHANGE_THRESHOLD: "featureLabelFoldChangeThreshold",
385
389
  // Treemap
386
- HIERARCHY_LEVELS: "hierarchyLevels"
390
+ HIERARCHY_LEVELS: "hierarchyLevels",
391
+ // Annotation frames
392
+ ANNOTATION_STORY: "annotationStory",
393
+ ANNOTATION_FRAME_INDEX: "annotationFrameIndex",
394
+ ANNOTATION_SHAPES: "annotationShapes",
395
+ ANNOTATION_OVERLAY_VISIBLE: "annotationOverlayVisible",
396
+ ANNOTATION_TRANSITION_DURATION: "annotationTransitionDuration",
397
+ ANNOTATION_SEMANTIC_ZOOM: "annotationSemanticZoom",
398
+ ANNOTATION_EDITABLE: "annotationEditable"
387
399
  };
388
400
  const ViewHelpMapping = {
389
401
  OBS_SET_SIZES: "The observation set sizes view displays a bar plot with the currently-selected observation sets (e.g., cell types) on the x-axis and bars representing their size (e.g., number of cells) on the y-axis.",
@@ -411,6 +423,7 @@ const ViewHelpMapping = {
411
423
  [FileType$1.OBS_SEGMENTATIONS_JSON]: DataType$2.OBS_SEGMENTATIONS,
412
424
  [FileType$1.OBS_SETS_CSV]: DataType$2.OBS_SETS,
413
425
  [FileType$1.OBS_SETS_JSON]: DataType$2.OBS_SETS,
426
+ [FileType$1.ANNOTATION_STORY_JSON]: DataType$2.ANNOTATION_STORY,
414
427
  [FileType$1.IMAGE_OME_ZARR]: DataType$2.IMAGE,
415
428
  [FileType$1.OBS_SEGMENTATIONS_OME_ZARR]: DataType$2.OBS_SEGMENTATIONS,
416
429
  [FileType$1.OBS_FEATURE_MATRIX_ANNDATA_ZARR]: DataType$2.OBS_FEATURE_MATRIX,
@@ -533,7 +546,8 @@ const ViewHelpMapping = {
533
546
  [DataType$2.OBS_SET_STATS]: [
534
547
  CoordinationType$1.OBS_TYPE
535
548
  // TODO: should sampleType, obsSetSelection, and/or sampleSetSelection be used here?
536
- ]
549
+ ],
550
+ [DataType$2.ANNOTATION_STORY]: []
537
551
  });
538
552
  ({
539
553
  // For AnnData:
@@ -666,7 +680,9 @@ const ViewHelpMapping = {
666
680
  CoordinationType$1.SPATIAL_TARGET_Z,
667
681
  CoordinationType$1.SPATIAL_AXIS_FIXED,
668
682
  CoordinationType$1.SPATIAL_ORBIT_AXIS,
669
- CoordinationType$1.FEATURE_AGGREGATION_STRATEGY
683
+ CoordinationType$1.FEATURE_AGGREGATION_STRATEGY,
684
+ // Annotation shapes are specific to a view's coordinate system.
685
+ CoordinationType$1.ANNOTATION_SHAPES
670
686
  ];
671
687
  const COMPONENT_COORDINATION_TYPES = {
672
688
  [ViewType$1.NEUROGLANCER]: [
@@ -758,7 +774,14 @@ const COMPONENT_COORDINATION_TYPES = {
758
774
  CoordinationType$1.EMBEDDING_CONTOURS_FILLED,
759
775
  CoordinationType$1.EMBEDDING_CONTOUR_PERCENTILES,
760
776
  CoordinationType$1.CONTOUR_COLOR_ENCODING,
761
- CoordinationType$1.CONTOUR_COLOR
777
+ CoordinationType$1.CONTOUR_COLOR,
778
+ CoordinationType$1.ANNOTATION_STORY,
779
+ CoordinationType$1.ANNOTATION_SHAPES,
780
+ CoordinationType$1.ANNOTATION_FRAME_INDEX,
781
+ CoordinationType$1.ANNOTATION_OVERLAY_VISIBLE,
782
+ CoordinationType$1.ANNOTATION_TRANSITION_DURATION,
783
+ CoordinationType$1.ANNOTATION_EDITABLE,
784
+ CoordinationType$1.ANNOTATION_SEMANTIC_ZOOM
762
785
  ],
763
786
  [ViewType$1.DUAL_SCATTERPLOT]: [
764
787
  CoordinationType$1.DATASET,
@@ -874,7 +897,14 @@ const COMPONENT_COORDINATION_TYPES = {
874
897
  CoordinationType$1.ADDITIONAL_OBS_SETS,
875
898
  CoordinationType$1.MOLECULE_HIGHLIGHT,
876
899
  CoordinationType$1.TOOLTIPS_VISIBLE,
877
- CoordinationType$1.PHOTOMETRIC_INTERPRETATION
900
+ CoordinationType$1.PHOTOMETRIC_INTERPRETATION,
901
+ CoordinationType$1.ANNOTATION_STORY,
902
+ CoordinationType$1.ANNOTATION_SHAPES,
903
+ CoordinationType$1.ANNOTATION_FRAME_INDEX,
904
+ CoordinationType$1.ANNOTATION_OVERLAY_VISIBLE,
905
+ CoordinationType$1.ANNOTATION_TRANSITION_DURATION,
906
+ CoordinationType$1.ANNOTATION_EDITABLE,
907
+ CoordinationType$1.ANNOTATION_SEMANTIC_ZOOM
878
908
  ],
879
909
  [ViewType$1.SPATIAL_BETA]: [
880
910
  CoordinationType$1.META_COORDINATION_SCOPES,
@@ -952,7 +982,27 @@ const COMPONENT_COORDINATION_TYPES = {
952
982
  CoordinationType$1.SPATIAL_CHANNEL_LABELS_ORIENTATION,
953
983
  CoordinationType$1.SPATIAL_CHANNEL_LABEL_SIZE,
954
984
  CoordinationType$1.SPATIAL_CHANNELS_SORT_ORDER,
955
- CoordinationType$1.PHOTOMETRIC_INTERPRETATION
985
+ CoordinationType$1.PHOTOMETRIC_INTERPRETATION,
986
+ CoordinationType$1.ANNOTATION_STORY,
987
+ CoordinationType$1.ANNOTATION_SHAPES,
988
+ CoordinationType$1.ANNOTATION_FRAME_INDEX,
989
+ CoordinationType$1.ANNOTATION_OVERLAY_VISIBLE,
990
+ CoordinationType$1.ANNOTATION_TRANSITION_DURATION,
991
+ CoordinationType$1.ANNOTATION_EDITABLE,
992
+ CoordinationType$1.ANNOTATION_SEMANTIC_ZOOM
993
+ ],
994
+ [ViewType$1.ANNOTATION_CONTROLLER]: [
995
+ CoordinationType$1.DATASET,
996
+ CoordinationType$1.ANNOTATION_STORY,
997
+ CoordinationType$1.ANNOTATION_FRAME_INDEX,
998
+ CoordinationType$1.ANNOTATION_OVERLAY_VISIBLE,
999
+ CoordinationType$1.ANNOTATION_TRANSITION_DURATION,
1000
+ CoordinationType$1.ANNOTATION_EDITABLE,
1001
+ CoordinationType$1.ANNOTATION_SEMANTIC_ZOOM
1002
+ // Note: the annotation controller also needs to read the coordination state
1003
+ // of all other views/coordination types via the full config.
1004
+ // Note: we get/set the CoordinationType.ANNOTATION_SHAPES from the full config,
1005
+ // as this info is view-specific rather than global to the story.
956
1006
  ],
957
1007
  [ViewType$1.HEATMAP]: [
958
1008
  CoordinationType$1.DATASET,
@@ -1262,6 +1312,11 @@ const COMPONENT_COORDINATION_TYPES = {
1262
1312
  CoordinationType$1.FEATURE_POINT_FOLD_CHANGE_THRESHOLD,
1263
1313
  CoordinationType$1.FEATURE_LABEL_FOLD_CHANGE_THRESHOLD
1264
1314
  ],
1315
+ [ViewType$1.SINGLE_OBS_SET_SELECTOR]: [
1316
+ CoordinationType$1.OBS_TYPE,
1317
+ CoordinationType$1.OBS_SET_COLOR,
1318
+ CoordinationType$1.OBS_SET_SELECTION
1319
+ ],
1265
1320
  [ViewType$1.OBS_SET_COMPOSITION_BAR_PLOT]: [
1266
1321
  CoordinationType$1.DATASET,
1267
1322
  CoordinationType$1.OBS_TYPE,
@@ -8673,7 +8728,7 @@ const latestFileDefSchema = z.object({
8673
8728
  options: fileOptionsSchema.optional(),
8674
8729
  requestInit: requestInit.optional(),
8675
8730
  // New: file def can have coordinationValues.
8676
- coordinationValues: z.record(z.string()).optional()
8731
+ coordinationValues: z.record(z.any()).optional()
8677
8732
  });
8678
8733
  const datasetsSchema1_0_13 = z.array(z.object({
8679
8734
  uid: z.string(),
@@ -8704,7 +8759,8 @@ const configSchema1_0_16 = configSchema1_0_13.extend({
8704
8759
  h: z.number().int().optional(),
8705
8760
  // Updates coordinationScopes and coordinationScopesBy
8706
8761
  coordinationScopes: componentCoordinationScopes.optional(),
8707
- coordinationScopesBy: componentCoordinationScopesBy.optional()
8762
+ coordinationScopesBy: componentCoordinationScopesBy.optional(),
8763
+ coordinationValues: z.record(z.any()).optional()
8708
8764
  }))
8709
8765
  });
8710
8766
  const configSchema1_0_17 = configSchema1_0_16.extend({
@@ -11789,6 +11845,124 @@ z.object({
11789
11845
  radius: z.number(),
11790
11846
  opacity: z.number()
11791
11847
  });
11848
+ const shapeBaseObj = z.object({
11849
+ uid: z.string(),
11850
+ text: z.string().optional(),
11851
+ strokeColor: z.array(z.number()).length(3).optional(),
11852
+ strokeWidth: z.number().optional(),
11853
+ // SVG-style dash pattern, e.g. "10 5" or "10 20 30 10". "none" or omitted = solid.
11854
+ strokeDashArray: z.string().optional(),
11855
+ visible: z.boolean().optional()
11856
+ // TODO: define unit modes for x and y axes
11857
+ // ("pixels" vs "normalized" vs "physical" etc.)
11858
+ // TODO: a coordinate system identifier (e.g., "DeckGL" for now,
11859
+ // but a coordinate system from OME-NGFF/SpatialData eventually?)
11860
+ });
11861
+ const rectangleShapeObj = shapeBaseObj.extend({
11862
+ type: z.literal("rectangle"),
11863
+ // OME-XML field names verbatim (upper-left origin)
11864
+ x: z.number(),
11865
+ y: z.number(),
11866
+ width: z.number(),
11867
+ height: z.number(),
11868
+ fillColor: z.array(z.number()).length(3).optional(),
11869
+ fillOpacity: z.number().optional()
11870
+ });
11871
+ const lineShapeObj = shapeBaseObj.extend({
11872
+ type: z.literal("line"),
11873
+ // OME-XML field names verbatim
11874
+ x1: z.number(),
11875
+ y1: z.number(),
11876
+ x2: z.number(),
11877
+ y2: z.number(),
11878
+ markerStart: z.enum(["Arrow", "Tick"]).nullable().optional(),
11879
+ markerEnd: z.enum(["Arrow", "Tick"]).nullable().optional(),
11880
+ textPosition: z.enum(["start", "middle", "end"]).optional(),
11881
+ textBufferPx: z.number().optional()
11882
+ });
11883
+ const ellipseShapeObj = shapeBaseObj.extend({
11884
+ type: z.literal("ellipse"),
11885
+ // OME-XML field names verbatim (centre point + radii)
11886
+ x1: z.number(),
11887
+ y1: z.number(),
11888
+ radiusX: z.number(),
11889
+ radiusY: z.number(),
11890
+ fillColor: z.array(z.number()).length(3).optional(),
11891
+ fillOpacity: z.number().optional()
11892
+ });
11893
+ const polygonShapeObj = shapeBaseObj.extend({
11894
+ type: z.literal("polygon"),
11895
+ // OME-XML: array of [x, y] coordinate pairs, closed automatically
11896
+ points: z.array(z.tuple([z.number(), z.number()])),
11897
+ fillColor: z.array(z.number()).length(3).optional(),
11898
+ fillOpacity: z.number().optional()
11899
+ });
11900
+ const polylineShapeObj = shapeBaseObj.extend({
11901
+ type: z.literal("polyline"),
11902
+ // OME-XML: array of [x, y] coordinate pairs, open (not closed)
11903
+ points: z.array(z.tuple([z.number(), z.number()])),
11904
+ markerStart: z.enum(["Arrow", "Tick"]).nullable().optional(),
11905
+ markerEnd: z.enum(["Arrow", "Tick"]).nullable().optional()
11906
+ });
11907
+ const annotationShapeObj = z.discriminatedUnion("type", [
11908
+ rectangleShapeObj,
11909
+ lineShapeObj,
11910
+ ellipseShapeObj,
11911
+ polygonShapeObj,
11912
+ polylineShapeObj
11913
+ ]);
11914
+ z.array(annotationShapeObj);
11915
+ const annotationFrameObj = z.object({
11916
+ uid: z.string(),
11917
+ title: z.string().optional(),
11918
+ description: z.string().optional(),
11919
+ descriptionType: z.enum(["text", "markdown"]).optional(),
11920
+ // A frame can define per-view: coordinationValues
11921
+ // (if the view's state should not be coordinated with other views)
11922
+ // or per-view coordinationScopes/coordinationScopesBy
11923
+ // (if at this frame, the view should be coordinated with other views).
11924
+ // We can also define a frame-level coordination space,
11925
+ // which will be merged with the global coordination space.
11926
+ // TODO: datasets
11927
+ // TODO: coordinationSpace
11928
+ layout: z.array(
11929
+ // Note: for now, we will infer view objects which have a uid
11930
+ // that is present in the global layout, and do NOT have x/y/w/h defined,
11931
+ // to mean that in this frame, the layout and set of views is unchanged
11932
+ // from the global layout.
11933
+ // This will allow each frame to omit the full list of views from the layout,
11934
+ // and only specify the views whose coordination state is changing in this frame.
11935
+ // If a frame includes a view with a uid that is not present
11936
+ // in the global layout, then that view will be added to the layout at this frame.
11937
+ // This frame should also define x/y/w/h for all views,
11938
+ // since it will otherwise be ambiguous how to layout the updated set of views
11939
+ // for this frame.
11940
+ z.object({
11941
+ // The view UID. If this view uid is not present in the global layout,
11942
+ // it will be added to the layout at this frame,
11943
+ // and will need to have its coordination values initialized to their defaults
11944
+ // for any that were not fully specified.
11945
+ uid: z.string(),
11946
+ coordinationValues: z.record(
11947
+ z.string(),
11948
+ // The coordination type name, e.g. "embeddingType"
11949
+ z.any()
11950
+ ).optional()
11951
+ // TODO: support coordinationScopes/coordinationScopesBy for per-view coordination
11952
+ // at this frame.
11953
+ // TODO: view x/y/w/h once we support view layout changes per-frame.
11954
+ })
11955
+ ).optional()
11956
+ });
11957
+ z.object({
11958
+ // TODO: schema version for the story schema?
11959
+ // Same as current Vitessce schema version?
11960
+ uid: z.string(),
11961
+ title: z.string().optional(),
11962
+ description: z.string().optional(),
11963
+ descriptionType: z.enum(["text", "markdown"]).optional(),
11964
+ frames: z.array(annotationFrameObj)
11965
+ });
11792
11966
  const SETS_DATATYPE_OBS = "obs";
11793
11967
  const HIERARCHICAL_SCHEMAS = {
11794
11968
  latestVersion: "0.1.3"
@@ -18378,7 +18552,7 @@ function useThemeProps$1({
18378
18552
  themeId
18379
18553
  }) {
18380
18554
  let theme = useTheme$1(defaultTheme2);
18381
- {
18555
+ if (themeId) {
18382
18556
  theme = theme[themeId] || theme;
18383
18557
  }
18384
18558
  return getThemeProps$1({
@@ -18972,6 +19146,400 @@ function isMuiElement(element2, muiNames) {
18972
19146
  element2.type.muiName ?? element2.type?._payload?.value?.muiName
18973
19147
  ) !== -1;
18974
19148
  }
19149
+ const filterBreakpointKeys = (breakpointsKeys, responsiveKeys) => breakpointsKeys.filter((key2) => responsiveKeys.includes(key2));
19150
+ const traverseBreakpoints = (breakpoints2, responsive, iterator) => {
19151
+ const smallestBreakpoint = breakpoints2.keys[0];
19152
+ if (Array.isArray(responsive)) {
19153
+ responsive.forEach((breakpointValue, index2) => {
19154
+ iterator((responsiveStyles, style2) => {
19155
+ if (index2 <= breakpoints2.keys.length - 1) {
19156
+ if (index2 === 0) {
19157
+ Object.assign(responsiveStyles, style2);
19158
+ } else {
19159
+ responsiveStyles[breakpoints2.up(breakpoints2.keys[index2])] = style2;
19160
+ }
19161
+ }
19162
+ }, breakpointValue);
19163
+ });
19164
+ } else if (responsive && typeof responsive === "object") {
19165
+ const keys2 = Object.keys(responsive).length > breakpoints2.keys.length ? breakpoints2.keys : filterBreakpointKeys(breakpoints2.keys, Object.keys(responsive));
19166
+ keys2.forEach((key2) => {
19167
+ if (breakpoints2.keys.includes(key2)) {
19168
+ const breakpointValue = responsive[key2];
19169
+ if (breakpointValue !== void 0) {
19170
+ iterator((responsiveStyles, style2) => {
19171
+ if (smallestBreakpoint === key2) {
19172
+ Object.assign(responsiveStyles, style2);
19173
+ } else {
19174
+ responsiveStyles[breakpoints2.up(key2)] = style2;
19175
+ }
19176
+ }, breakpointValue);
19177
+ }
19178
+ }
19179
+ });
19180
+ } else if (typeof responsive === "number" || typeof responsive === "string") {
19181
+ iterator((responsiveStyles, style2) => {
19182
+ Object.assign(responsiveStyles, style2);
19183
+ }, responsive);
19184
+ }
19185
+ };
19186
+ function getSelfSpacingVar(axis2) {
19187
+ return `--Grid-${axis2}Spacing`;
19188
+ }
19189
+ function getParentSpacingVar(axis2) {
19190
+ return `--Grid-parent-${axis2}Spacing`;
19191
+ }
19192
+ const selfColumnsVar = "--Grid-columns";
19193
+ const parentColumnsVar = "--Grid-parent-columns";
19194
+ const generateGridSizeStyles = ({
19195
+ theme,
19196
+ ownerState
19197
+ }) => {
19198
+ const styles2 = {};
19199
+ traverseBreakpoints(theme.breakpoints, ownerState.size, (appendStyle, value2) => {
19200
+ let style2 = {};
19201
+ if (value2 === "grow") {
19202
+ style2 = {
19203
+ flexBasis: 0,
19204
+ flexGrow: 1,
19205
+ maxWidth: "100%"
19206
+ };
19207
+ }
19208
+ if (value2 === "auto") {
19209
+ style2 = {
19210
+ flexBasis: "auto",
19211
+ flexGrow: 0,
19212
+ flexShrink: 0,
19213
+ maxWidth: "none",
19214
+ width: "auto"
19215
+ };
19216
+ }
19217
+ if (typeof value2 === "number") {
19218
+ style2 = {
19219
+ flexGrow: 0,
19220
+ flexBasis: "auto",
19221
+ width: `calc(100% * ${value2} / var(${parentColumnsVar}) - (var(${parentColumnsVar}) - ${value2}) * (var(${getParentSpacingVar("column")}) / var(${parentColumnsVar})))`
19222
+ };
19223
+ }
19224
+ appendStyle(styles2, style2);
19225
+ });
19226
+ return styles2;
19227
+ };
19228
+ const generateGridOffsetStyles = ({
19229
+ theme,
19230
+ ownerState
19231
+ }) => {
19232
+ const styles2 = {};
19233
+ traverseBreakpoints(theme.breakpoints, ownerState.offset, (appendStyle, value2) => {
19234
+ let style2 = {};
19235
+ if (value2 === "auto") {
19236
+ style2 = {
19237
+ marginLeft: "auto"
19238
+ };
19239
+ }
19240
+ if (typeof value2 === "number") {
19241
+ style2 = {
19242
+ marginLeft: value2 === 0 ? "0px" : `calc(100% * ${value2} / var(${parentColumnsVar}) + var(${getParentSpacingVar("column")}) * ${value2} / var(${parentColumnsVar}))`
19243
+ };
19244
+ }
19245
+ appendStyle(styles2, style2);
19246
+ });
19247
+ return styles2;
19248
+ };
19249
+ const generateGridColumnsStyles = ({
19250
+ theme,
19251
+ ownerState
19252
+ }) => {
19253
+ if (!ownerState.container) {
19254
+ return {};
19255
+ }
19256
+ const styles2 = {
19257
+ [selfColumnsVar]: 12
19258
+ };
19259
+ traverseBreakpoints(theme.breakpoints, ownerState.columns, (appendStyle, value2) => {
19260
+ const columns = value2 ?? 12;
19261
+ appendStyle(styles2, {
19262
+ [selfColumnsVar]: columns,
19263
+ "> *": {
19264
+ [parentColumnsVar]: columns
19265
+ }
19266
+ });
19267
+ });
19268
+ return styles2;
19269
+ };
19270
+ const generateGridRowSpacingStyles = ({
19271
+ theme,
19272
+ ownerState
19273
+ }) => {
19274
+ if (!ownerState.container) {
19275
+ return {};
19276
+ }
19277
+ const styles2 = {};
19278
+ traverseBreakpoints(theme.breakpoints, ownerState.rowSpacing, (appendStyle, value2) => {
19279
+ const spacing2 = typeof value2 === "string" ? value2 : theme.spacing?.(value2);
19280
+ appendStyle(styles2, {
19281
+ [getSelfSpacingVar("row")]: spacing2,
19282
+ "> *": {
19283
+ [getParentSpacingVar("row")]: spacing2
19284
+ }
19285
+ });
19286
+ });
19287
+ return styles2;
19288
+ };
19289
+ const generateGridColumnSpacingStyles = ({
19290
+ theme,
19291
+ ownerState
19292
+ }) => {
19293
+ if (!ownerState.container) {
19294
+ return {};
19295
+ }
19296
+ const styles2 = {};
19297
+ traverseBreakpoints(theme.breakpoints, ownerState.columnSpacing, (appendStyle, value2) => {
19298
+ const spacing2 = typeof value2 === "string" ? value2 : theme.spacing?.(value2);
19299
+ appendStyle(styles2, {
19300
+ [getSelfSpacingVar("column")]: spacing2,
19301
+ "> *": {
19302
+ [getParentSpacingVar("column")]: spacing2
19303
+ }
19304
+ });
19305
+ });
19306
+ return styles2;
19307
+ };
19308
+ const generateGridDirectionStyles = ({
19309
+ theme,
19310
+ ownerState
19311
+ }) => {
19312
+ if (!ownerState.container) {
19313
+ return {};
19314
+ }
19315
+ const styles2 = {};
19316
+ traverseBreakpoints(theme.breakpoints, ownerState.direction, (appendStyle, value2) => {
19317
+ appendStyle(styles2, {
19318
+ flexDirection: value2
19319
+ });
19320
+ });
19321
+ return styles2;
19322
+ };
19323
+ const generateGridStyles = ({
19324
+ ownerState
19325
+ }) => {
19326
+ return {
19327
+ minWidth: 0,
19328
+ boxSizing: "border-box",
19329
+ ...ownerState.container && {
19330
+ display: "flex",
19331
+ flexWrap: "wrap",
19332
+ ...ownerState.wrap && ownerState.wrap !== "wrap" && {
19333
+ flexWrap: ownerState.wrap
19334
+ },
19335
+ gap: `var(${getSelfSpacingVar("row")}) var(${getSelfSpacingVar("column")})`
19336
+ }
19337
+ };
19338
+ };
19339
+ const generateSizeClassNames = (size2) => {
19340
+ const classNames = [];
19341
+ Object.entries(size2).forEach(([key2, value2]) => {
19342
+ if (value2 !== false && value2 !== void 0) {
19343
+ classNames.push(`grid-${key2}-${String(value2)}`);
19344
+ }
19345
+ });
19346
+ return classNames;
19347
+ };
19348
+ const generateSpacingClassNames = (spacing2, smallestBreakpoint = "xs") => {
19349
+ function isValidSpacing(val) {
19350
+ if (val === void 0) {
19351
+ return false;
19352
+ }
19353
+ return typeof val === "string" && !Number.isNaN(Number(val)) || typeof val === "number" && val > 0;
19354
+ }
19355
+ if (isValidSpacing(spacing2)) {
19356
+ return [`spacing-${smallestBreakpoint}-${String(spacing2)}`];
19357
+ }
19358
+ if (typeof spacing2 === "object" && !Array.isArray(spacing2)) {
19359
+ const classNames = [];
19360
+ Object.entries(spacing2).forEach(([key2, value2]) => {
19361
+ if (isValidSpacing(value2)) {
19362
+ classNames.push(`spacing-${key2}-${String(value2)}`);
19363
+ }
19364
+ });
19365
+ return classNames;
19366
+ }
19367
+ return [];
19368
+ };
19369
+ const generateDirectionClasses = (direction) => {
19370
+ if (direction === void 0) {
19371
+ return [];
19372
+ }
19373
+ if (typeof direction === "object") {
19374
+ return Object.entries(direction).map(([key2, value2]) => `direction-${key2}-${value2}`);
19375
+ }
19376
+ return [`direction-xs-${String(direction)}`];
19377
+ };
19378
+ const getLegacyGridWarning = (propName) => {
19379
+ if (["item", "zeroMinWidth"].includes(propName)) {
19380
+ return `The \`${propName}\` prop has been removed and is no longer necessary. You can safely remove it.`;
19381
+ }
19382
+ return `The \`${propName}\` prop has been removed. See https://mui.com/material-ui/migration/upgrade-to-grid-v2/ for migration instructions.`;
19383
+ };
19384
+ const warnedAboutProps = [];
19385
+ function deleteLegacyGridProps(props, breakpoints2) {
19386
+ const propsToWarn = [];
19387
+ if (props.item !== void 0) {
19388
+ delete props.item;
19389
+ propsToWarn.push("item");
19390
+ }
19391
+ if (props.zeroMinWidth !== void 0) {
19392
+ delete props.zeroMinWidth;
19393
+ propsToWarn.push("zeroMinWidth");
19394
+ }
19395
+ breakpoints2.keys.forEach((breakpoint) => {
19396
+ if (props[breakpoint] !== void 0) {
19397
+ propsToWarn.push(breakpoint);
19398
+ delete props[breakpoint];
19399
+ }
19400
+ });
19401
+ {
19402
+ propsToWarn.forEach((prop) => {
19403
+ if (!warnedAboutProps.includes(prop)) {
19404
+ warnedAboutProps.push(prop);
19405
+ console.warn(`MUI Grid: ${getLegacyGridWarning(prop)}
19406
+ `);
19407
+ }
19408
+ });
19409
+ }
19410
+ }
19411
+ const defaultTheme$1 = createTheme$1();
19412
+ const defaultCreateStyledComponent = styled$1("div", {
19413
+ name: "MuiGrid",
19414
+ slot: "Root"
19415
+ });
19416
+ function useThemePropsDefault(props) {
19417
+ return useThemeProps$1({
19418
+ props,
19419
+ name: "MuiGrid",
19420
+ defaultTheme: defaultTheme$1
19421
+ });
19422
+ }
19423
+ function createGrid(options = {}) {
19424
+ const {
19425
+ // This will allow adding custom styled fn (for example for custom sx style function)
19426
+ createStyledComponent = defaultCreateStyledComponent,
19427
+ useThemeProps: useThemeProps2 = useThemePropsDefault,
19428
+ useTheme: useTheme2 = useTheme$1,
19429
+ componentName = "MuiGrid"
19430
+ } = options;
19431
+ const useUtilityClasses2 = (ownerState, theme) => {
19432
+ const {
19433
+ container,
19434
+ direction,
19435
+ spacing: spacing2,
19436
+ wrap: wrap2,
19437
+ size: size2
19438
+ } = ownerState;
19439
+ const slots = {
19440
+ root: ["root", container && "container", wrap2 !== "wrap" && `wrap-xs-${String(wrap2)}`, ...generateDirectionClasses(direction), ...generateSizeClassNames(size2), ...container ? generateSpacingClassNames(spacing2, theme.breakpoints.keys[0]) : []]
19441
+ };
19442
+ return composeClasses(slots, (slot) => generateUtilityClass(componentName, slot), {});
19443
+ };
19444
+ function parseResponsiveProp(propValue, breakpoints2, shouldUseValue = () => true) {
19445
+ const parsedProp = {};
19446
+ if (propValue === null) {
19447
+ return parsedProp;
19448
+ }
19449
+ if (Array.isArray(propValue)) {
19450
+ propValue.forEach((value2, index2) => {
19451
+ if (value2 !== null && shouldUseValue(value2) && breakpoints2.keys[index2]) {
19452
+ parsedProp[breakpoints2.keys[index2]] = value2;
19453
+ }
19454
+ });
19455
+ } else if (typeof propValue === "object") {
19456
+ Object.keys(propValue).forEach((key2) => {
19457
+ const value2 = propValue[key2];
19458
+ if (value2 !== null && value2 !== void 0 && shouldUseValue(value2)) {
19459
+ parsedProp[key2] = value2;
19460
+ }
19461
+ });
19462
+ } else {
19463
+ parsedProp[breakpoints2.keys[0]] = propValue;
19464
+ }
19465
+ return parsedProp;
19466
+ }
19467
+ const GridRoot3 = createStyledComponent(generateGridColumnsStyles, generateGridColumnSpacingStyles, generateGridRowSpacingStyles, generateGridSizeStyles, generateGridDirectionStyles, generateGridStyles, generateGridOffsetStyles);
19468
+ const Grid2 = /* @__PURE__ */ React.forwardRef(function Grid22(inProps, ref2) {
19469
+ const theme = useTheme2();
19470
+ const themeProps = useThemeProps2(inProps);
19471
+ const props = extendSxProp$1(themeProps);
19472
+ deleteLegacyGridProps(props, theme.breakpoints);
19473
+ const {
19474
+ className,
19475
+ children: children2,
19476
+ columns: columnsProp = 12,
19477
+ container = false,
19478
+ component = "div",
19479
+ direction = "row",
19480
+ wrap: wrap2 = "wrap",
19481
+ size: sizeProp = {},
19482
+ offset: offsetProp = {},
19483
+ spacing: spacingProp = 0,
19484
+ rowSpacing: rowSpacingProp = spacingProp,
19485
+ columnSpacing: columnSpacingProp = spacingProp,
19486
+ unstable_level: level = 0,
19487
+ ...other
19488
+ } = props;
19489
+ const size2 = parseResponsiveProp(sizeProp, theme.breakpoints, (val) => val !== false);
19490
+ const offset2 = parseResponsiveProp(offsetProp, theme.breakpoints);
19491
+ const columns = inProps.columns ?? (level ? void 0 : columnsProp);
19492
+ const spacing2 = inProps.spacing ?? (level ? void 0 : spacingProp);
19493
+ const rowSpacing = inProps.rowSpacing ?? inProps.spacing ?? (level ? void 0 : rowSpacingProp);
19494
+ const columnSpacing = inProps.columnSpacing ?? inProps.spacing ?? (level ? void 0 : columnSpacingProp);
19495
+ const ownerState = {
19496
+ ...props,
19497
+ level,
19498
+ columns,
19499
+ container,
19500
+ direction,
19501
+ wrap: wrap2,
19502
+ spacing: spacing2,
19503
+ rowSpacing,
19504
+ columnSpacing,
19505
+ size: size2,
19506
+ offset: offset2
19507
+ };
19508
+ const classes2 = useUtilityClasses2(ownerState, theme);
19509
+ return /* @__PURE__ */ jsx$1(GridRoot3, {
19510
+ ref: ref2,
19511
+ as: component,
19512
+ ownerState,
19513
+ className: clsx(classes2.root, className),
19514
+ ...other,
19515
+ children: React.Children.map(children2, (child) => {
19516
+ if (/* @__PURE__ */ React.isValidElement(child) && isMuiElement(child, ["Grid"]) && container && child.props.container) {
19517
+ return /* @__PURE__ */ React.cloneElement(child, {
19518
+ unstable_level: child.props?.unstable_level ?? level + 1
19519
+ });
19520
+ }
19521
+ return child;
19522
+ })
19523
+ });
19524
+ });
19525
+ Grid2.propTypes = {
19526
+ children: _pt.node,
19527
+ className: _pt.string,
19528
+ columns: _pt.oneOfType([_pt.arrayOf(_pt.number), _pt.number, _pt.object]),
19529
+ columnSpacing: _pt.oneOfType([_pt.arrayOf(_pt.oneOfType([_pt.number, _pt.string])), _pt.number, _pt.object, _pt.string]),
19530
+ component: _pt.elementType,
19531
+ container: _pt.bool,
19532
+ direction: _pt.oneOfType([_pt.oneOf(["column-reverse", "column", "row-reverse", "row"]), _pt.arrayOf(_pt.oneOf(["column-reverse", "column", "row-reverse", "row"])), _pt.object]),
19533
+ offset: _pt.oneOfType([_pt.string, _pt.number, _pt.arrayOf(_pt.oneOfType([_pt.string, _pt.number])), _pt.object]),
19534
+ rowSpacing: _pt.oneOfType([_pt.arrayOf(_pt.oneOfType([_pt.number, _pt.string])), _pt.number, _pt.object, _pt.string]),
19535
+ size: _pt.oneOfType([_pt.string, _pt.bool, _pt.number, _pt.arrayOf(_pt.oneOfType([_pt.string, _pt.bool, _pt.number])), _pt.object]),
19536
+ spacing: _pt.oneOfType([_pt.arrayOf(_pt.oneOfType([_pt.number, _pt.string])), _pt.number, _pt.object, _pt.string]),
19537
+ sx: _pt.oneOfType([_pt.arrayOf(_pt.oneOfType([_pt.func, _pt.object, _pt.bool])), _pt.func, _pt.object]),
19538
+ wrap: _pt.oneOf(["nowrap", "wrap-reverse", "wrap"])
19539
+ };
19540
+ Grid2.muiName = "Grid";
19541
+ return Grid2;
19542
+ }
18975
19543
  const common$2 = {
18976
19544
  black: "#000",
18977
19545
  white: "#fff"
@@ -20302,7 +20870,7 @@ function getSvgIconUtilityClass(slot) {
20302
20870
  return generateUtilityClass("MuiSvgIcon", slot);
20303
20871
  }
20304
20872
  generateUtilityClasses("MuiSvgIcon", ["root", "colorPrimary", "colorSecondary", "colorAction", "colorError", "colorDisabled", "fontSizeInherit", "fontSizeSmall", "fontSizeMedium", "fontSizeLarge"]);
20305
- const useUtilityClasses$1m = (ownerState) => {
20873
+ const useUtilityClasses$1n = (ownerState) => {
20306
20874
  const {
20307
20875
  color: color2,
20308
20876
  fontSize: fontSize2,
@@ -20441,7 +21009,7 @@ const SvgIcon = /* @__PURE__ */ React.forwardRef(function SvgIcon2(inProps, ref2
20441
21009
  if (!inheritViewBox) {
20442
21010
  more.viewBox = viewBox;
20443
21011
  }
20444
- const classes2 = useUtilityClasses$1m(ownerState);
21012
+ const classes2 = useUtilityClasses$1n(ownerState);
20445
21013
  return /* @__PURE__ */ jsxs(SvgIconRoot, {
20446
21014
  as: component,
20447
21015
  className: clsx(classes2.root, className),
@@ -20568,6 +21136,26 @@ function ownerWindow(node2) {
20568
21136
  const doc = ownerDocument(node2);
20569
21137
  return doc.defaultView || window;
20570
21138
  }
21139
+ function requirePropFactory(componentNameInError, Component2) {
21140
+ const prevPropTypes = Component2 ? {
21141
+ ...Component2.propTypes
21142
+ } : null;
21143
+ const requireProp = (requiredProp) => (props, propName, componentName, location, propFullName, ...args) => {
21144
+ const propFullNameSafe = propFullName || propName;
21145
+ const defaultTypeChecker = prevPropTypes?.[propFullNameSafe];
21146
+ if (defaultTypeChecker) {
21147
+ const typeCheckerResult = defaultTypeChecker(props, propName, componentName, location, propFullName, ...args);
21148
+ if (typeCheckerResult) {
21149
+ return typeCheckerResult;
21150
+ }
21151
+ }
21152
+ if (typeof props[propName] !== "undefined" && !props[requiredProp]) {
21153
+ return new Error(`The prop \`${propFullNameSafe}\` of \`${componentNameInError}\` can only be used together with the \`${requiredProp}\` prop.`);
21154
+ }
21155
+ return null;
21156
+ };
21157
+ return requireProp;
21158
+ }
20571
21159
  function setRef$1(ref2, value2) {
20572
21160
  if (typeof ref2 === "function") {
20573
21161
  ref2(value2);
@@ -21325,7 +21913,7 @@ var values$5 = Object.values || function(obj) {
21325
21913
  return obj[k];
21326
21914
  });
21327
21915
  };
21328
- var defaultProps$P = {
21916
+ var defaultProps$Q = {
21329
21917
  component: "div",
21330
21918
  childFactory: function childFactory(child) {
21331
21919
  return child;
@@ -21452,7 +22040,7 @@ TransitionGroup.propTypes = {
21452
22040
  */
21453
22041
  childFactory: _pt.func
21454
22042
  };
21455
- TransitionGroup.defaultProps = defaultProps$P;
22043
+ TransitionGroup.defaultProps = defaultProps$Q;
21456
22044
  const UNINITIALIZED = {};
21457
22045
  function useLazyRef(init2, initArg) {
21458
22046
  const ref2 = React.useRef(UNINITIALIZED);
@@ -21582,7 +22170,7 @@ function getPaperUtilityClass(slot) {
21582
22170
  return generateUtilityClass("MuiPaper", slot);
21583
22171
  }
21584
22172
  generateUtilityClasses("MuiPaper", ["root", "rounded", "outlined", "elevation", "elevation0", "elevation1", "elevation2", "elevation3", "elevation4", "elevation5", "elevation6", "elevation7", "elevation8", "elevation9", "elevation10", "elevation11", "elevation12", "elevation13", "elevation14", "elevation15", "elevation16", "elevation17", "elevation18", "elevation19", "elevation20", "elevation21", "elevation22", "elevation23", "elevation24"]);
21585
- const useUtilityClasses$1l = (ownerState) => {
22173
+ const useUtilityClasses$1m = (ownerState) => {
21586
22174
  const {
21587
22175
  square: square2,
21588
22176
  elevation,
@@ -21654,7 +22242,7 @@ const Paper = /* @__PURE__ */ React.forwardRef(function Paper2(inProps, ref2) {
21654
22242
  square: square2,
21655
22243
  variant
21656
22244
  };
21657
- const classes2 = useUtilityClasses$1l(ownerState);
22245
+ const classes2 = useUtilityClasses$1m(ownerState);
21658
22246
  {
21659
22247
  if (theme.shadows[elevation] === void 0) {
21660
22248
  console.error([`MUI: The elevation provided <Paper elevation={${elevation}}> is not available in the theme.`, `Please make sure that \`theme.shadows[${elevation}]\` is defined.`].join("\n"));
@@ -22331,7 +22919,7 @@ function getButtonBaseUtilityClass(slot) {
22331
22919
  return generateUtilityClass("MuiButtonBase", slot);
22332
22920
  }
22333
22921
  const buttonBaseClasses = generateUtilityClasses("MuiButtonBase", ["root", "disabled", "focusVisible"]);
22334
- const useUtilityClasses$1k = (ownerState) => {
22922
+ const useUtilityClasses$1l = (ownerState) => {
22335
22923
  const {
22336
22924
  disabled,
22337
22925
  focusVisible,
@@ -22547,7 +23135,7 @@ const ButtonBase = /* @__PURE__ */ React.forwardRef(function ButtonBase2(inProps
22547
23135
  tabIndex,
22548
23136
  focusVisible
22549
23137
  };
22550
- const classes2 = useUtilityClasses$1k(ownerState);
23138
+ const classes2 = useUtilityClasses$1l(ownerState);
22551
23139
  return /* @__PURE__ */ jsxs(ButtonBaseRoot, {
22552
23140
  as: ComponentProp,
22553
23141
  className: clsx(classes2.root, className),
@@ -22799,7 +23387,7 @@ const rotateAnimation = typeof circularRotateKeyframe !== "string" ? css`
22799
23387
  const dashAnimation = typeof circularDashKeyframe !== "string" ? css`
22800
23388
  animation: ${circularDashKeyframe} 1.4s ease-in-out infinite;
22801
23389
  ` : null;
22802
- const useUtilityClasses$1j = (ownerState) => {
23390
+ const useUtilityClasses$1k = (ownerState) => {
22803
23391
  const {
22804
23392
  classes: classes2,
22805
23393
  variant,
@@ -22921,7 +23509,7 @@ const CircularProgress = /* @__PURE__ */ React.forwardRef(function CircularProgr
22921
23509
  value: value2,
22922
23510
  variant
22923
23511
  };
22924
- const classes2 = useUtilityClasses$1j(ownerState);
23512
+ const classes2 = useUtilityClasses$1k(ownerState);
22925
23513
  const circleStyle = {};
22926
23514
  const rootStyle = {};
22927
23515
  const rootProps = {};
@@ -23030,7 +23618,7 @@ function getIconButtonUtilityClass(slot) {
23030
23618
  return generateUtilityClass("MuiIconButton", slot);
23031
23619
  }
23032
23620
  const iconButtonClasses = generateUtilityClasses("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorError", "colorInfo", "colorSuccess", "colorWarning", "edgeStart", "edgeEnd", "sizeSmall", "sizeMedium", "sizeLarge", "loading", "loadingIndicator", "loadingWrapper"]);
23033
- const useUtilityClasses$1i = (ownerState) => {
23621
+ const useUtilityClasses$1j = (ownerState) => {
23034
23622
  const {
23035
23623
  classes: classes2,
23036
23624
  disabled,
@@ -23215,7 +23803,7 @@ const IconButton = /* @__PURE__ */ React.forwardRef(function IconButton2(inProps
23215
23803
  loadingIndicator,
23216
23804
  size: size2
23217
23805
  };
23218
- const classes2 = useUtilityClasses$1i(ownerState);
23806
+ const classes2 = useUtilityClasses$1j(ownerState);
23219
23807
  return /* @__PURE__ */ jsxs(IconButtonRoot, {
23220
23808
  id: loading ? loadingId : idProp,
23221
23809
  className: clsx(classes2.root, className),
@@ -25748,7 +26336,7 @@ function isHTMLElement(element2) {
25748
26336
  function isVirtualElement(element2) {
25749
26337
  return !isHTMLElement(element2);
25750
26338
  }
25751
- const useUtilityClasses$1h = (ownerState) => {
26339
+ const useUtilityClasses$1i = (ownerState) => {
25752
26340
  const {
25753
26341
  classes: classes2
25754
26342
  } = ownerState;
@@ -25857,7 +26445,7 @@ const PopperTooltip = /* @__PURE__ */ React.forwardRef(function PopperTooltip2(p
25857
26445
  if (TransitionProps !== null) {
25858
26446
  childProps.TransitionProps = TransitionProps;
25859
26447
  }
25860
- const classes2 = useUtilityClasses$1h(props);
26448
+ const classes2 = useUtilityClasses$1i(props);
25861
26449
  const Root = slots.root ?? "div";
25862
26450
  const rootProps = useSlotProps({
25863
26451
  elementType: Root,
@@ -26256,7 +26844,7 @@ function getListSubheaderUtilityClass(slot) {
26256
26844
  return generateUtilityClass("MuiListSubheader", slot);
26257
26845
  }
26258
26846
  generateUtilityClasses("MuiListSubheader", ["root", "colorPrimary", "colorInherit", "gutters", "inset", "sticky"]);
26259
- const useUtilityClasses$1g = (ownerState) => {
26847
+ const useUtilityClasses$1h = (ownerState) => {
26260
26848
  const {
26261
26849
  classes: classes2,
26262
26850
  color: color2,
@@ -26351,7 +26939,7 @@ const ListSubheader = /* @__PURE__ */ React.forwardRef(function ListSubheader2(i
26351
26939
  disableSticky,
26352
26940
  inset
26353
26941
  };
26354
- const classes2 = useUtilityClasses$1g(ownerState);
26942
+ const classes2 = useUtilityClasses$1h(ownerState);
26355
26943
  return /* @__PURE__ */ jsx$1(ListSubheaderRoot, {
26356
26944
  as: component,
26357
26945
  className: clsx(classes2.root, className),
@@ -26417,7 +27005,7 @@ function getChipUtilityClass(slot) {
26417
27005
  return generateUtilityClass("MuiChip", slot);
26418
27006
  }
26419
27007
  const chipClasses = generateUtilityClasses("MuiChip", ["root", "sizeSmall", "sizeMedium", "colorDefault", "colorError", "colorInfo", "colorPrimary", "colorSecondary", "colorSuccess", "colorWarning", "disabled", "clickable", "clickableColorPrimary", "clickableColorSecondary", "deletable", "deletableColorPrimary", "deletableColorSecondary", "outlined", "filled", "outlinedPrimary", "outlinedSecondary", "filledPrimary", "filledSecondary", "avatar", "avatarSmall", "avatarMedium", "avatarColorPrimary", "avatarColorSecondary", "icon", "iconSmall", "iconMedium", "iconColorPrimary", "iconColorSecondary", "label", "labelSmall", "labelMedium", "deleteIcon", "deleteIconSmall", "deleteIconMedium", "deleteIconColorPrimary", "deleteIconColorSecondary", "deleteIconOutlinedColorPrimary", "deleteIconOutlinedColorSecondary", "deleteIconFilledColorPrimary", "deleteIconFilledColorSecondary", "focusVisible"]);
26420
- const useUtilityClasses$1f = (ownerState) => {
27008
+ const useUtilityClasses$1g = (ownerState) => {
26421
27009
  const {
26422
27010
  classes: classes2,
26423
27011
  disabled,
@@ -26808,7 +27396,7 @@ const Chip = /* @__PURE__ */ React.forwardRef(function Chip2(inProps, ref2) {
26808
27396
  clickable,
26809
27397
  variant
26810
27398
  };
26811
- const classes2 = useUtilityClasses$1f(ownerState);
27399
+ const classes2 = useUtilityClasses$1g(ownerState);
26812
27400
  const moreProps = component === ButtonBase ? {
26813
27401
  component: ComponentProp || "div",
26814
27402
  focusVisibleClassName: classes2.focusVisible,
@@ -27228,7 +27816,7 @@ const inputOverridesResolver = (props, styles2) => {
27228
27816
  } = props;
27229
27817
  return [styles2.input, ownerState.size === "small" && styles2.inputSizeSmall, ownerState.multiline && styles2.inputMultiline, ownerState.type === "search" && styles2.inputTypeSearch, ownerState.startAdornment && styles2.inputAdornedStart, ownerState.endAdornment && styles2.inputAdornedEnd, ownerState.hiddenLabel && styles2.inputHiddenLabel];
27230
27818
  };
27231
- const useUtilityClasses$1e = (ownerState) => {
27819
+ const useUtilityClasses$1f = (ownerState) => {
27232
27820
  const {
27233
27821
  classes: classes2,
27234
27822
  color: color2,
@@ -27632,7 +28220,7 @@ const InputBase = /* @__PURE__ */ React.forwardRef(function InputBase2(inProps,
27632
28220
  startAdornment,
27633
28221
  type: type2
27634
28222
  };
27635
- const classes2 = useUtilityClasses$1e(ownerState);
28223
+ const classes2 = useUtilityClasses$1f(ownerState);
27636
28224
  const Root = slots.root || components.Root || InputBaseRoot;
27637
28225
  const rootProps = slotProps.root || componentsProps.root || {};
27638
28226
  const Input3 = slots.input || components.Input || InputBaseInput;
@@ -27953,7 +28541,7 @@ function getAutocompleteUtilityClass(slot) {
27953
28541
  }
27954
28542
  const autocompleteClasses = generateUtilityClasses("MuiAutocomplete", ["root", "expanded", "fullWidth", "focused", "focusVisible", "tag", "tagSizeSmall", "tagSizeMedium", "hasPopupIcon", "hasClearIcon", "inputRoot", "input", "inputFocused", "endAdornment", "clearIndicator", "popupIndicator", "popupIndicatorOpen", "popper", "popperDisablePortal", "paper", "listbox", "loading", "noOptions", "option", "groupLabel", "groupUl"]);
27955
28543
  var _ClearIcon, _ArrowDropDownIcon;
27956
- const useUtilityClasses$1d = (ownerState) => {
28544
+ const useUtilityClasses$1e = (ownerState) => {
27957
28545
  const {
27958
28546
  classes: classes2,
27959
28547
  disablePortal,
@@ -28442,7 +29030,7 @@ const Autocomplete = /* @__PURE__ */ React.forwardRef(function Autocomplete2(inP
28442
29030
  popupOpen,
28443
29031
  size: size2
28444
29032
  };
28445
- const classes2 = useUtilityClasses$1d(ownerState);
29033
+ const classes2 = useUtilityClasses$1e(ownerState);
28446
29034
  const externalForwardedProps = {
28447
29035
  slots: {
28448
29036
  paper: PaperComponentProp,
@@ -29116,7 +29704,7 @@ const ButtonGroupButtonContext = /* @__PURE__ */ React.createContext(void 0);
29116
29704
  {
29117
29705
  ButtonGroupButtonContext.displayName = "ButtonGroupButtonContext";
29118
29706
  }
29119
- const useUtilityClasses$1c = (ownerState) => {
29707
+ const useUtilityClasses$1d = (ownerState) => {
29120
29708
  const {
29121
29709
  color: color2,
29122
29710
  disableElevation,
@@ -29616,7 +30204,7 @@ const Button = /* @__PURE__ */ React.forwardRef(function Button2(inProps, ref2)
29616
30204
  type: type2,
29617
30205
  variant
29618
30206
  };
29619
- const classes2 = useUtilityClasses$1c(ownerState);
30207
+ const classes2 = useUtilityClasses$1d(ownerState);
29620
30208
  const startIcon = (startIconProp || loading && loadingPosition === "start") && /* @__PURE__ */ jsx$1(ButtonStartIcon, {
29621
30209
  className: classes2.startIcon,
29622
30210
  ownerState,
@@ -29783,7 +30371,7 @@ function getSwitchBaseUtilityClass(slot) {
29783
30371
  return generateUtilityClass("PrivateSwitchBase", slot);
29784
30372
  }
29785
30373
  generateUtilityClasses("PrivateSwitchBase", ["root", "checked", "disabled", "input", "edgeStart", "edgeEnd"]);
29786
- const useUtilityClasses$1b = (ownerState) => {
30374
+ const useUtilityClasses$1c = (ownerState) => {
29787
30375
  const {
29788
30376
  classes: classes2,
29789
30377
  checked,
@@ -29920,7 +30508,7 @@ const SwitchBase = /* @__PURE__ */ React.forwardRef(function SwitchBase2(props,
29920
30508
  disableFocusRipple,
29921
30509
  edge
29922
30510
  };
29923
- const classes2 = useUtilityClasses$1b(ownerState);
30511
+ const classes2 = useUtilityClasses$1c(ownerState);
29924
30512
  const externalForwardedProps = {
29925
30513
  slots,
29926
30514
  slotProps: {
@@ -30126,7 +30714,7 @@ function getCheckboxUtilityClass(slot) {
30126
30714
  return generateUtilityClass("MuiCheckbox", slot);
30127
30715
  }
30128
30716
  const checkboxClasses = generateUtilityClasses("MuiCheckbox", ["root", "checked", "disabled", "indeterminate", "colorPrimary", "colorSecondary", "sizeSmall", "sizeMedium"]);
30129
- const useUtilityClasses$1a = (ownerState) => {
30717
+ const useUtilityClasses$1b = (ownerState) => {
30130
30718
  const {
30131
30719
  classes: classes2,
30132
30720
  indeterminate,
@@ -30235,7 +30823,7 @@ const Checkbox$1 = /* @__PURE__ */ React.forwardRef(function Checkbox2(inProps,
30235
30823
  indeterminate,
30236
30824
  size: size2
30237
30825
  };
30238
- const classes2 = useUtilityClasses$1a(ownerState);
30826
+ const classes2 = useUtilityClasses$1b(ownerState);
30239
30827
  const externalInputProps = slotProps.input ?? inputProps;
30240
30828
  const [RootSlot, rootSlotProps] = useSlot("root", {
30241
30829
  ref: ref2,
@@ -31188,7 +31776,7 @@ function getBackdropUtilityClass(slot) {
31188
31776
  return generateUtilityClass("MuiBackdrop", slot);
31189
31777
  }
31190
31778
  generateUtilityClasses("MuiBackdrop", ["root", "invisible"]);
31191
- const useUtilityClasses$19 = (ownerState) => {
31779
+ const useUtilityClasses$1a = (ownerState) => {
31192
31780
  const {
31193
31781
  classes: classes2,
31194
31782
  invisible
@@ -31251,7 +31839,7 @@ const Backdrop = /* @__PURE__ */ React.forwardRef(function Backdrop2(inProps, re
31251
31839
  component,
31252
31840
  invisible
31253
31841
  };
31254
- const classes2 = useUtilityClasses$19(ownerState);
31842
+ const classes2 = useUtilityClasses$1a(ownerState);
31255
31843
  const backwardCompatibleSlots = {
31256
31844
  transition: TransitionComponentProp,
31257
31845
  root: components.Root,
@@ -31548,7 +32136,7 @@ function getModalUtilityClass(slot) {
31548
32136
  return generateUtilityClass("MuiModal", slot);
31549
32137
  }
31550
32138
  generateUtilityClasses("MuiModal", ["root", "hidden", "backdrop"]);
31551
- const useUtilityClasses$18 = (ownerState) => {
32139
+ const useUtilityClasses$19 = (ownerState) => {
31552
32140
  const {
31553
32141
  open,
31554
32142
  exited,
@@ -31655,7 +32243,7 @@ const Modal = /* @__PURE__ */ React.forwardRef(function Modal2(inProps, ref2) {
31655
32243
  ...propsWithDefaults,
31656
32244
  exited
31657
32245
  };
31658
- const classes2 = useUtilityClasses$18(ownerState);
32246
+ const classes2 = useUtilityClasses$19(ownerState);
31659
32247
  const childProps = {};
31660
32248
  if (children2.props.tabIndex === void 0) {
31661
32249
  childProps.tabIndex = "-1";
@@ -31919,7 +32507,7 @@ const v6Colors = {
31919
32507
  textDisabled: true
31920
32508
  };
31921
32509
  const extendSxProp = internal_createExtendSxProp();
31922
- const useUtilityClasses$17 = (ownerState) => {
32510
+ const useUtilityClasses$18 = (ownerState) => {
31923
32511
  const {
31924
32512
  align: align2,
31925
32513
  gutterBottom,
@@ -32059,7 +32647,7 @@ const Typography = /* @__PURE__ */ React.forwardRef(function Typography2(inProps
32059
32647
  variantMapping
32060
32648
  };
32061
32649
  const Component2 = component || (paragraph ? "p" : variantMapping[variant] || defaultVariantMapping[variant]) || "span";
32062
- const classes2 = useUtilityClasses$17(ownerState);
32650
+ const classes2 = useUtilityClasses$18(ownerState);
32063
32651
  return /* @__PURE__ */ jsx$1(TypographyRoot, {
32064
32652
  as: Component2,
32065
32653
  ref: ref2,
@@ -32164,7 +32752,7 @@ function getFormControlUtilityClasses(slot) {
32164
32752
  return generateUtilityClass("MuiFormControl", slot);
32165
32753
  }
32166
32754
  generateUtilityClasses("MuiFormControl", ["root", "marginNone", "marginNormal", "marginDense", "fullWidth", "disabled"]);
32167
- const useUtilityClasses$16 = (ownerState) => {
32755
+ const useUtilityClasses$17 = (ownerState) => {
32168
32756
  const {
32169
32757
  classes: classes2,
32170
32758
  margin: margin2,
@@ -32254,7 +32842,7 @@ const FormControl = /* @__PURE__ */ React.forwardRef(function FormControl2(inPro
32254
32842
  size: size2,
32255
32843
  variant
32256
32844
  };
32257
- const classes2 = useUtilityClasses$16(ownerState);
32845
+ const classes2 = useUtilityClasses$17(ownerState);
32258
32846
  const [adornedStart, setAdornedStart] = React.useState(() => {
32259
32847
  let initialAdornedStart = false;
32260
32848
  if (children2) {
@@ -32429,7 +33017,7 @@ function getFormControlLabelUtilityClasses(slot) {
32429
33017
  return generateUtilityClass("MuiFormControlLabel", slot);
32430
33018
  }
32431
33019
  const formControlLabelClasses = generateUtilityClasses("MuiFormControlLabel", ["root", "labelPlacementStart", "labelPlacementTop", "labelPlacementBottom", "disabled", "label", "error", "required", "asterisk"]);
32432
- const useUtilityClasses$15 = (ownerState) => {
33020
+ const useUtilityClasses$16 = (ownerState) => {
32433
33021
  const {
32434
33022
  classes: classes2,
32435
33023
  disabled,
@@ -32564,7 +33152,7 @@ const FormControlLabel$1 = /* @__PURE__ */ React.forwardRef(function FormControl
32564
33152
  required: required2,
32565
33153
  error: fcs.error
32566
33154
  };
32567
- const classes2 = useUtilityClasses$15(ownerState);
33155
+ const classes2 = useUtilityClasses$16(ownerState);
32568
33156
  const externalForwardedProps = {
32569
33157
  slots,
32570
33158
  slotProps: {
@@ -32694,7 +33282,7 @@ function getFormHelperTextUtilityClasses(slot) {
32694
33282
  }
32695
33283
  const formHelperTextClasses = generateUtilityClasses("MuiFormHelperText", ["root", "error", "disabled", "sizeSmall", "sizeMedium", "contained", "focused", "filled", "required"]);
32696
33284
  var _span$3;
32697
- const useUtilityClasses$14 = (ownerState) => {
33285
+ const useUtilityClasses$15 = (ownerState) => {
32698
33286
  const {
32699
33287
  classes: classes2,
32700
33288
  contained,
@@ -32789,7 +33377,7 @@ const FormHelperText = /* @__PURE__ */ React.forwardRef(function FormHelperText2
32789
33377
  required: fcs.required
32790
33378
  };
32791
33379
  delete ownerState.ownerState;
32792
- const classes2 = useUtilityClasses$14(ownerState);
33380
+ const classes2 = useUtilityClasses$15(ownerState);
32793
33381
  return /* @__PURE__ */ jsx$1(FormHelperTextRoot, {
32794
33382
  as: component,
32795
33383
  className: clsx(classes2.root, className),
@@ -32868,7 +33456,7 @@ function getFormLabelUtilityClasses(slot) {
32868
33456
  return generateUtilityClass("MuiFormLabel", slot);
32869
33457
  }
32870
33458
  const formLabelClasses = generateUtilityClasses("MuiFormLabel", ["root", "colorSecondary", "focused", "disabled", "error", "filled", "required", "asterisk"]);
32871
- const useUtilityClasses$13 = (ownerState) => {
33459
+ const useUtilityClasses$14 = (ownerState) => {
32872
33460
  const {
32873
33461
  classes: classes2,
32874
33462
  color: color2,
@@ -32965,7 +33553,7 @@ const FormLabel = /* @__PURE__ */ React.forwardRef(function FormLabel2(inProps,
32965
33553
  focused: fcs.focused,
32966
33554
  required: fcs.required
32967
33555
  };
32968
- const classes2 = useUtilityClasses$13(ownerState);
33556
+ const classes2 = useUtilityClasses$14(ownerState);
32969
33557
  return /* @__PURE__ */ jsxs(FormLabelRoot, {
32970
33558
  as: component,
32971
33559
  ownerState,
@@ -33033,11 +33621,129 @@ FormLabel.propTypes = {
33033
33621
  */
33034
33622
  sx: _pt.oneOfType([_pt.arrayOf(_pt.oneOfType([_pt.func, _pt.object, _pt.bool])), _pt.func, _pt.object])
33035
33623
  };
33624
+ const Grid = createGrid({
33625
+ createStyledComponent: styled("div", {
33626
+ name: "MuiGrid",
33627
+ slot: "Root",
33628
+ overridesResolver: (props, styles2) => {
33629
+ const {
33630
+ ownerState
33631
+ } = props;
33632
+ return [styles2.root, ownerState.container && styles2.container];
33633
+ }
33634
+ }),
33635
+ componentName: "MuiGrid",
33636
+ useThemeProps: (inProps) => useDefaultProps({
33637
+ props: inProps,
33638
+ name: "MuiGrid"
33639
+ }),
33640
+ useTheme
33641
+ });
33642
+ Grid.propTypes = {
33643
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
33644
+ // │ These PropTypes are generated from the TypeScript type definitions. │
33645
+ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
33646
+ // └─────────────────────────────────────────────────────────────────────┘
33647
+ /**
33648
+ * The content of the component.
33649
+ */
33650
+ children: _pt.node,
33651
+ /**
33652
+ * The number of columns.
33653
+ * @default 12
33654
+ */
33655
+ columns: _pt.oneOfType([_pt.arrayOf(_pt.number), _pt.number, _pt.object]),
33656
+ /**
33657
+ * Defines the horizontal space between the type `item` components.
33658
+ * It overrides the value of the `spacing` prop.
33659
+ */
33660
+ columnSpacing: _pt.oneOfType([_pt.arrayOf(_pt.oneOfType([_pt.number, _pt.string])), _pt.number, _pt.object, _pt.string]),
33661
+ /**
33662
+ * If `true`, the component will have the flex *container* behavior.
33663
+ * You should be wrapping *items* with a *container*.
33664
+ * @default false
33665
+ */
33666
+ container: _pt.bool,
33667
+ /**
33668
+ * Defines the `flex-direction` style property.
33669
+ * It is applied for all screen sizes.
33670
+ * @default 'row'
33671
+ */
33672
+ direction: _pt.oneOfType([_pt.oneOf(["column-reverse", "column", "row-reverse", "row"]), _pt.arrayOf(_pt.oneOf(["column-reverse", "column", "row-reverse", "row"])), _pt.object]),
33673
+ /**
33674
+ * Defines the offset value for the type `item` components.
33675
+ */
33676
+ offset: _pt.oneOfType([_pt.string, _pt.number, _pt.arrayOf(_pt.oneOfType([_pt.string, _pt.number])), _pt.object]),
33677
+ /**
33678
+ * Defines the vertical space between the type `item` components.
33679
+ * It overrides the value of the `spacing` prop.
33680
+ */
33681
+ rowSpacing: _pt.oneOfType([_pt.arrayOf(_pt.oneOfType([_pt.number, _pt.string])), _pt.number, _pt.object, _pt.string]),
33682
+ /**
33683
+ * Defines the size of the the type `item` components.
33684
+ */
33685
+ size: _pt.oneOfType([_pt.string, _pt.bool, _pt.number, _pt.arrayOf(_pt.oneOfType([_pt.string, _pt.bool, _pt.number])), _pt.object]),
33686
+ /**
33687
+ * Defines the space between the type `item` components.
33688
+ * It can only be used on a type `container` component.
33689
+ * @default 0
33690
+ */
33691
+ spacing: _pt.oneOfType([_pt.arrayOf(_pt.oneOfType([_pt.number, _pt.string])), _pt.number, _pt.object, _pt.string]),
33692
+ /**
33693
+ * @ignore
33694
+ */
33695
+ sx: _pt.oneOfType([_pt.arrayOf(_pt.oneOfType([_pt.func, _pt.object, _pt.bool])), _pt.func, _pt.object]),
33696
+ /**
33697
+ * @internal
33698
+ * The level of the grid starts from `0` and increases when the grid nests
33699
+ * inside another grid. Nesting is defined as a container Grid being a direct
33700
+ * child of a container Grid.
33701
+ *
33702
+ * ```js
33703
+ * <Grid container> // level 0
33704
+ * <Grid container> // level 1
33705
+ * <Grid container> // level 2
33706
+ * ```
33707
+ *
33708
+ * Only consecutive grid is considered nesting. A grid container will start at
33709
+ * `0` if there are non-Grid container element above it.
33710
+ *
33711
+ * ```js
33712
+ * <Grid container> // level 0
33713
+ * <div>
33714
+ * <Grid container> // level 0
33715
+ * ```
33716
+ *
33717
+ * ```js
33718
+ * <Grid container> // level 0
33719
+ * <Grid>
33720
+ * <Grid container> // level 0
33721
+ * ```
33722
+ */
33723
+ unstable_level: _pt.number,
33724
+ /**
33725
+ * Defines the `flex-wrap` style property.
33726
+ * It's applied for all screen sizes.
33727
+ * @default 'wrap'
33728
+ */
33729
+ wrap: _pt.oneOf(["nowrap", "wrap-reverse", "wrap"])
33730
+ };
33731
+ {
33732
+ const Component2 = Grid;
33733
+ const requireProp = requirePropFactory("Grid", Component2);
33734
+ Component2["propTypes"] = {
33735
+ // eslint-disable-next-line react/forbid-foreign-prop-types
33736
+ ...Component2.propTypes,
33737
+ direction: requireProp("container"),
33738
+ spacing: requireProp("container"),
33739
+ wrap: requireProp("container")
33740
+ };
33741
+ }
33036
33742
  function getInputLabelUtilityClasses(slot) {
33037
33743
  return generateUtilityClass("MuiInputLabel", slot);
33038
33744
  }
33039
33745
  generateUtilityClasses("MuiInputLabel", ["root", "focused", "disabled", "error", "required", "asterisk", "formControl", "sizeSmall", "shrink", "animated", "standard", "filled", "outlined"]);
33040
- const useUtilityClasses$12 = (ownerState) => {
33746
+ const useUtilityClasses$13 = (ownerState) => {
33041
33747
  const {
33042
33748
  classes: classes2,
33043
33749
  formControl,
@@ -33226,7 +33932,7 @@ const InputLabel = /* @__PURE__ */ React.forwardRef(function InputLabel2(inProps
33226
33932
  required: fcs.required,
33227
33933
  focused: fcs.focused
33228
33934
  };
33229
- const classes2 = useUtilityClasses$12(ownerState);
33935
+ const classes2 = useUtilityClasses$13(ownerState);
33230
33936
  return /* @__PURE__ */ jsx$1(InputLabelRoot, {
33231
33937
  "data-shrink": shrink,
33232
33938
  ref: ref2,
@@ -33365,7 +34071,7 @@ const bufferKeyframe = keyframes`
33365
34071
  const bufferAnimation = typeof bufferKeyframe !== "string" ? css`
33366
34072
  animation: ${bufferKeyframe} 3s infinite linear;
33367
34073
  ` : null;
33368
- const useUtilityClasses$11 = (ownerState) => {
34074
+ const useUtilityClasses$12 = (ownerState) => {
33369
34075
  const {
33370
34076
  classes: classes2,
33371
34077
  variant,
@@ -33640,7 +34346,7 @@ const LinearProgress = /* @__PURE__ */ React.forwardRef(function LinearProgress2
33640
34346
  color: color2,
33641
34347
  variant
33642
34348
  };
33643
- const classes2 = useUtilityClasses$11(ownerState);
34349
+ const classes2 = useUtilityClasses$12(ownerState);
33644
34350
  const isRtl = useRtl();
33645
34351
  const rootProps = {};
33646
34352
  const inlineStyles = {
@@ -33742,7 +34448,7 @@ function getListUtilityClass(slot) {
33742
34448
  return generateUtilityClass("MuiList", slot);
33743
34449
  }
33744
34450
  generateUtilityClasses("MuiList", ["root", "padding", "dense", "subheader"]);
33745
- const useUtilityClasses$10 = (ownerState) => {
34451
+ const useUtilityClasses$11 = (ownerState) => {
33746
34452
  const {
33747
34453
  classes: classes2,
33748
34454
  disablePadding,
@@ -33808,7 +34514,7 @@ const List = /* @__PURE__ */ React.forwardRef(function List2(inProps, ref2) {
33808
34514
  dense,
33809
34515
  disablePadding
33810
34516
  };
33811
- const classes2 = useUtilityClasses$10(ownerState);
34517
+ const classes2 = useUtilityClasses$11(ownerState);
33812
34518
  return /* @__PURE__ */ jsx$1(ListContext.Provider, {
33813
34519
  value: context2,
33814
34520
  children: /* @__PURE__ */ jsxs(ListRoot, {
@@ -33868,7 +34574,7 @@ function getListItemTextUtilityClass(slot) {
33868
34574
  return generateUtilityClass("MuiListItemText", slot);
33869
34575
  }
33870
34576
  const listItemTextClasses = generateUtilityClasses("MuiListItemText", ["root", "multiline", "dense", "inset", "primary", "secondary"]);
33871
- const useUtilityClasses$$ = (ownerState) => {
34577
+ const useUtilityClasses$10 = (ownerState) => {
33872
34578
  const {
33873
34579
  classes: classes2,
33874
34580
  inset,
@@ -33955,7 +34661,7 @@ const ListItemText = /* @__PURE__ */ React.forwardRef(function ListItemText2(inP
33955
34661
  secondary: !!secondary,
33956
34662
  dense
33957
34663
  };
33958
- const classes2 = useUtilityClasses$$(ownerState);
34664
+ const classes2 = useUtilityClasses$10(ownerState);
33959
34665
  const externalForwardedProps = {
33960
34666
  slots,
33961
34667
  slotProps: {
@@ -34085,7 +34791,7 @@ function getListItemIconUtilityClass(slot) {
34085
34791
  return generateUtilityClass("MuiListItemIcon", slot);
34086
34792
  }
34087
34793
  const listItemIconClasses = generateUtilityClasses("MuiListItemIcon", ["root", "alignItemsFlexStart"]);
34088
- const useUtilityClasses$_ = (ownerState) => {
34794
+ const useUtilityClasses$$ = (ownerState) => {
34089
34795
  const {
34090
34796
  alignItems,
34091
34797
  classes: classes2
@@ -34134,7 +34840,7 @@ const ListItemIcon = /* @__PURE__ */ React.forwardRef(function ListItemIcon2(inP
34134
34840
  ...props,
34135
34841
  alignItems: context2.alignItems
34136
34842
  };
34137
- const classes2 = useUtilityClasses$_(ownerState);
34843
+ const classes2 = useUtilityClasses$$(ownerState);
34138
34844
  return /* @__PURE__ */ jsx$1(ListItemIconRoot, {
34139
34845
  className: clsx(classes2.root, className),
34140
34846
  ownerState,
@@ -34412,7 +35118,7 @@ function getDividerUtilityClass(slot) {
34412
35118
  return generateUtilityClass("MuiDivider", slot);
34413
35119
  }
34414
35120
  const dividerClasses = generateUtilityClasses("MuiDivider", ["root", "absolute", "fullWidth", "inset", "middle", "flexItem", "light", "vertical", "withChildren", "withChildrenVertical", "textAlignRight", "textAlignLeft", "wrapper", "wrapperVertical"]);
34415
- const useUtilityClasses$Z = (ownerState) => {
35121
+ const useUtilityClasses$_ = (ownerState) => {
34416
35122
  const {
34417
35123
  absolute,
34418
35124
  children: children2,
@@ -34626,7 +35332,7 @@ const Divider$1 = /* @__PURE__ */ React.forwardRef(function Divider2(inProps, re
34626
35332
  textAlign: textAlign2,
34627
35333
  variant
34628
35334
  };
34629
- const classes2 = useUtilityClasses$Z(ownerState);
35335
+ const classes2 = useUtilityClasses$_(ownerState);
34630
35336
  return /* @__PURE__ */ jsx$1(DividerRoot, {
34631
35337
  as: component,
34632
35338
  className: clsx(classes2.root, className),
@@ -34718,7 +35424,7 @@ const overridesResolver$1 = (props, styles2) => {
34718
35424
  } = props;
34719
35425
  return [styles2.root, ownerState.dense && styles2.dense, ownerState.divider && styles2.divider, !ownerState.disableGutters && styles2.gutters];
34720
35426
  };
34721
- const useUtilityClasses$Y = (ownerState) => {
35427
+ const useUtilityClasses$Z = (ownerState) => {
34722
35428
  const {
34723
35429
  disabled,
34724
35430
  dense,
@@ -34878,7 +35584,7 @@ const MenuItem = /* @__PURE__ */ React.forwardRef(function MenuItem2(inProps, re
34878
35584
  divider,
34879
35585
  disableGutters
34880
35586
  };
34881
- const classes2 = useUtilityClasses$Y(props);
35587
+ const classes2 = useUtilityClasses$Z(props);
34882
35588
  const handleRef = useForkRef$1(menuItemRef, ref2);
34883
35589
  let tabIndex;
34884
35590
  if (!props.disabled) {
@@ -34978,7 +35684,7 @@ function getNativeSelectUtilityClasses(slot) {
34978
35684
  return generateUtilityClass("MuiNativeSelect", slot);
34979
35685
  }
34980
35686
  const nativeSelectClasses = generateUtilityClasses("MuiNativeSelect", ["root", "select", "multiple", "filled", "outlined", "standard", "disabled", "icon", "iconOpen", "iconFilled", "iconOutlined", "iconStandard", "nativeInput", "error"]);
34981
- const useUtilityClasses$X = (ownerState) => {
35687
+ const useUtilityClasses$Y = (ownerState) => {
34982
35688
  const {
34983
35689
  classes: classes2,
34984
35690
  variant,
@@ -35133,7 +35839,7 @@ const NativeSelectInput = /* @__PURE__ */ React.forwardRef(function NativeSelect
35133
35839
  variant,
35134
35840
  error: error2
35135
35841
  };
35136
- const classes2 = useUtilityClasses$X(ownerState);
35842
+ const classes2 = useUtilityClasses$Y(ownerState);
35137
35843
  return /* @__PURE__ */ jsxs(React.Fragment, {
35138
35844
  children: [/* @__PURE__ */ jsx$1(NativeSelectSelect, {
35139
35845
  ownerState,
@@ -35203,7 +35909,7 @@ NativeSelectInput.propTypes = {
35203
35909
  */
35204
35910
  variant: _pt.oneOf(["standard", "outlined", "filled"])
35205
35911
  };
35206
- const useUtilityClasses$W = (ownerState) => {
35912
+ const useUtilityClasses$X = (ownerState) => {
35207
35913
  const {
35208
35914
  classes: classes2,
35209
35915
  disableUnderline
@@ -35336,7 +36042,7 @@ const Input$1 = /* @__PURE__ */ React.forwardRef(function Input2(inProps, ref2)
35336
36042
  type: type2 = "text",
35337
36043
  ...other
35338
36044
  } = props;
35339
- const classes2 = useUtilityClasses$W(props);
36045
+ const classes2 = useUtilityClasses$X(props);
35340
36046
  const ownerState = {
35341
36047
  disableUnderline
35342
36048
  };
@@ -35549,6 +36255,121 @@ Input$1.propTypes = {
35549
36255
  value: _pt.any
35550
36256
  };
35551
36257
  Input$1.muiName = "Input";
36258
+ const useUtilityClasses$W = (ownerState) => {
36259
+ const {
36260
+ classes: classes2
36261
+ } = ownerState;
36262
+ const slots = {
36263
+ root: ["root"]
36264
+ };
36265
+ return composeClasses(slots, getNativeSelectUtilityClasses, classes2);
36266
+ };
36267
+ const defaultInput = /* @__PURE__ */ jsx$1(Input$1, {});
36268
+ const NativeSelect = /* @__PURE__ */ React.forwardRef(function NativeSelect2(inProps, ref2) {
36269
+ const props = useDefaultProps({
36270
+ name: "MuiNativeSelect",
36271
+ props: inProps
36272
+ });
36273
+ const {
36274
+ className,
36275
+ children: children2,
36276
+ classes: classesProp = {},
36277
+ IconComponent = ArrowDropDownIcon,
36278
+ input = defaultInput,
36279
+ inputProps,
36280
+ variant,
36281
+ ...other
36282
+ } = props;
36283
+ const muiFormControl = useFormControl();
36284
+ const fcs = formControlState({
36285
+ props,
36286
+ muiFormControl,
36287
+ states: ["variant"]
36288
+ });
36289
+ const ownerState = {
36290
+ ...props,
36291
+ classes: classesProp
36292
+ };
36293
+ const classes2 = useUtilityClasses$W(ownerState);
36294
+ const {
36295
+ root: root2,
36296
+ ...otherClasses
36297
+ } = classesProp;
36298
+ return /* @__PURE__ */ jsx$1(React.Fragment, {
36299
+ children: /* @__PURE__ */ React.cloneElement(input, {
36300
+ // Most of the logic is implemented in `NativeSelectInput`.
36301
+ // The `Select` component is a simple API wrapper to expose something better to play with.
36302
+ inputComponent: NativeSelectInput,
36303
+ inputProps: {
36304
+ children: children2,
36305
+ classes: otherClasses,
36306
+ IconComponent,
36307
+ variant: fcs.variant,
36308
+ type: void 0,
36309
+ // We render a select. We can ignore the type provided by the `Input`.
36310
+ ...inputProps,
36311
+ ...input ? input.props.inputProps : {}
36312
+ },
36313
+ ref: ref2,
36314
+ ...other,
36315
+ className: clsx(classes2.root, input.props.className, className)
36316
+ })
36317
+ });
36318
+ });
36319
+ NativeSelect.propTypes = {
36320
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
36321
+ // │ These PropTypes are generated from the TypeScript type definitions. │
36322
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
36323
+ // └─────────────────────────────────────────────────────────────────────┘
36324
+ /**
36325
+ * The option elements to populate the select with.
36326
+ * Can be some `<option>` elements.
36327
+ */
36328
+ children: _pt.node,
36329
+ /**
36330
+ * Override or extend the styles applied to the component.
36331
+ * @default {}
36332
+ */
36333
+ classes: _pt.object,
36334
+ /**
36335
+ * @ignore
36336
+ */
36337
+ className: _pt.string,
36338
+ /**
36339
+ * The icon that displays the arrow.
36340
+ * @default ArrowDropDownIcon
36341
+ */
36342
+ IconComponent: _pt.elementType,
36343
+ /**
36344
+ * An `Input` element; does not have to be a material-ui specific `Input`.
36345
+ * @default <Input />
36346
+ */
36347
+ input: _pt.element,
36348
+ /**
36349
+ * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/select#attributes) applied to the `select` element.
36350
+ */
36351
+ inputProps: _pt.object,
36352
+ /**
36353
+ * Callback fired when a menu item is selected.
36354
+ *
36355
+ * @param {React.ChangeEvent<HTMLSelectElement>} event The event source of the callback.
36356
+ * You can pull out the new value by accessing `event.target.value` (string).
36357
+ */
36358
+ onChange: _pt.func,
36359
+ /**
36360
+ * The system prop that allows defining system overrides as well as additional CSS styles.
36361
+ */
36362
+ sx: _pt.oneOfType([_pt.arrayOf(_pt.oneOfType([_pt.func, _pt.object, _pt.bool])), _pt.func, _pt.object]),
36363
+ /**
36364
+ * The `input` value. The DOM API casts this to a string.
36365
+ */
36366
+ value: _pt.any,
36367
+ /**
36368
+ * The variant to use.
36369
+ */
36370
+ variant: _pt.oneOf(["filled", "outlined", "standard"])
36371
+ };
36372
+ NativeSelect.muiName = "Select";
35552
36373
  function getScale$2(value2) {
35553
36374
  return `scale(${value2}, ${value2 ** 2})`;
35554
36375
  }
@@ -81441,6 +82262,12 @@ function multiply$3(out, a2, b2) {
81441
82262
  out[2] = a2[2] * b2[2];
81442
82263
  return out;
81443
82264
  }
82265
+ function distance$3(a2, b2) {
82266
+ var x2 = b2[0] - a2[0];
82267
+ var y2 = b2[1] - a2[1];
82268
+ var z2 = b2[2] - a2[2];
82269
+ return Math.hypot(x2, y2, z2);
82270
+ }
81444
82271
  function squaredLength$2(a2) {
81445
82272
  var x2 = a2[0];
81446
82273
  var y2 = a2[1];
@@ -81564,6 +82391,7 @@ function angle$3(a2, b2) {
81564
82391
  }
81565
82392
  var sub = subtract;
81566
82393
  var mul = multiply$3;
82394
+ var dist$1 = distance$3;
81567
82395
  var len = length$5;
81568
82396
  var sqrLen = squaredLength$2;
81569
82397
  (function() {
@@ -96034,7 +96862,7 @@ function noop$7() {
96034
96862
  const getCursor = ({
96035
96863
  isDragging
96036
96864
  }) => isDragging ? "grabbing" : "grab";
96037
- const defaultProps$O = {
96865
+ const defaultProps$P = {
96038
96866
  id: "",
96039
96867
  width: "100%",
96040
96868
  height: "100%",
@@ -96165,7 +96993,7 @@ class Deck {
96165
96993
  this._lastPointerDownInfo = pickedInfo.result[0] || pickedInfo.emptyInfo;
96166
96994
  });
96167
96995
  this.props = {
96168
- ...defaultProps$O,
96996
+ ...defaultProps$P,
96169
96997
  ...props
96170
96998
  };
96171
96999
  props = this.props;
@@ -96667,7 +97495,7 @@ class Deck {
96667
97495
  metrics.gpuMemory = memoryStats.get("GPU Memory").count;
96668
97496
  }
96669
97497
  }
96670
- _defineProperty$3(Deck, "defaultProps", defaultProps$O);
97498
+ _defineProperty$3(Deck, "defaultProps", defaultProps$P);
96671
97499
  _defineProperty$3(Deck, "VERSION", deckGlobal.VERSION);
96672
97500
  class ShaderAttribute {
96673
97501
  constructor(dataColumn, opts2) {
@@ -99422,7 +100250,7 @@ const areViewportsEqual = memoize$2(({
99422
100250
  return oldViewport.equals(viewport2);
99423
100251
  });
99424
100252
  let pickingColorCache = new Uint8ClampedArray(0);
99425
- const defaultProps$N = {
100253
+ const defaultProps$O = {
99426
100254
  data: {
99427
100255
  type: "data",
99428
100256
  value: EMPTY_ARRAY$1,
@@ -100297,7 +101125,7 @@ class Layer extends Component {
100297
101125
  this.setNeedsUpdate();
100298
101126
  }
100299
101127
  }
100300
- _defineProperty$3(Layer, "defaultProps", defaultProps$N);
101128
+ _defineProperty$3(Layer, "defaultProps", defaultProps$O);
100301
101129
  _defineProperty$3(Layer, "layerName", "Layer");
100302
101130
  const TRACE_RENDER_LAYERS = "compositeLayer.renderLayers";
100303
101131
  class CompositeLayer extends Layer {
@@ -101333,6 +102161,124 @@ const esm$5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
101333
102161
  project32,
101334
102162
  shadow
101335
102163
  }, Symbol.toStringTag, { value: "Module" }));
102164
+ const dashShaders = {
102165
+ inject: {
102166
+ "vs:#decl": "\nattribute vec2 instanceDashArrays;\nattribute float instanceDashOffsets;\nvarying vec2 vDashArray;\nvarying float vDashOffset;\n",
102167
+ "vs:#main-end": "\nvDashArray = instanceDashArrays;\nvDashOffset = instanceDashOffsets / width.x;\n",
102168
+ "fs:#decl": "\nuniform float dashAlignMode;\nuniform float capType;\nuniform bool dashGapPickable;\nvarying vec2 vDashArray;\nvarying float vDashOffset;\n\nfloat round(float x) {\n return floor(x + 0.5);\n}\n",
102169
+ "fs:#main-start": "\n float solidLength = vDashArray.x;\n float gapLength = vDashArray.y;\n float unitLength = solidLength + gapLength;\n\n float offset;\n\n if (unitLength > 0.0) {\n if (dashAlignMode == 0.0) {\n offset = vDashOffset;\n } else {\n unitLength = vPathLength / round(vPathLength / unitLength);\n offset = solidLength / 2.0;\n }\n\n float unitOffset = mod(clamp(vPathPosition.y, 0.0, vPathLength) + offset, unitLength);\n\n if (gapLength > 0.0 && unitOffset > solidLength) {\n if (capType <= 0.5) {\n if (!(dashGapPickable && picking_uActive)) {\n discard;\n }\n } else {\n // caps are rounded, test the distance to solid ends\n float distToEnd = length(vec2(\n min(unitOffset - solidLength, unitLength - unitOffset),\n vPathPosition.x\n ));\n if (distToEnd > 1.0) {\n if (!(dashGapPickable && picking_uActive)) {\n discard;\n }\n }\n }\n }\n }\n"
102170
+ }
102171
+ };
102172
+ const offsetShaders = {
102173
+ inject: {
102174
+ "vs:#decl": "\nattribute float instanceOffsets;\n",
102175
+ "vs:DECKGL_FILTER_SIZE": "\n float offsetWidth = abs(instanceOffsets * 2.0) + 1.0;\n size *= offsetWidth;\n",
102176
+ "vCornerOffset = offsetVec;": "\n float offsetWidth = abs(instanceOffsets * 2.0) + 1.0;\n vec2 offsetCenter = -instanceOffsets * (isCap ? perp : miterVec * miterSize) * 2.0;\n vCornerOffset = vCornerOffset * offsetWidth - offsetCenter;\n",
102177
+ "fs:#main-start": "\n float isInside;\n isInside = step(-1.0, vPathPosition.x) * step(vPathPosition.x, 1.0);\n if (isInside == 0.0) {\n discard;\n }\n"
102178
+ }
102179
+ };
102180
+ const defaultProps$N = {
102181
+ getDashArray: {
102182
+ type: "accessor",
102183
+ value: [0, 0]
102184
+ },
102185
+ getOffset: {
102186
+ type: "accessor",
102187
+ value: 0
102188
+ },
102189
+ dashJustified: false,
102190
+ dashGapPickable: false
102191
+ };
102192
+ class PathStyleExtension extends LayerExtension {
102193
+ constructor({
102194
+ dash = false,
102195
+ offset: offset2 = false,
102196
+ highPrecisionDash = false
102197
+ } = {}) {
102198
+ super({
102199
+ dash: dash || highPrecisionDash,
102200
+ offset: offset2,
102201
+ highPrecisionDash
102202
+ });
102203
+ }
102204
+ isEnabled(layer) {
102205
+ return "pathTesselator" in layer.state;
102206
+ }
102207
+ getShaders(extension2) {
102208
+ if (!extension2.isEnabled(this)) {
102209
+ return null;
102210
+ }
102211
+ let result = {};
102212
+ if (extension2.opts.dash) {
102213
+ result = mergeShaders(result, dashShaders);
102214
+ }
102215
+ if (extension2.opts.offset) {
102216
+ result = mergeShaders(result, offsetShaders);
102217
+ }
102218
+ return result;
102219
+ }
102220
+ initializeState(context2, extension2) {
102221
+ const attributeManager = this.getAttributeManager();
102222
+ if (!attributeManager || !extension2.isEnabled(this)) {
102223
+ return;
102224
+ }
102225
+ if (extension2.opts.dash) {
102226
+ attributeManager.addInstanced({
102227
+ instanceDashArrays: {
102228
+ size: 2,
102229
+ accessor: "getDashArray"
102230
+ }
102231
+ });
102232
+ }
102233
+ if (extension2.opts.highPrecisionDash) {
102234
+ attributeManager.addInstanced({
102235
+ instanceDashOffsets: {
102236
+ size: 1,
102237
+ accessor: "getPath",
102238
+ transform: extension2.getDashOffsets.bind(this)
102239
+ }
102240
+ });
102241
+ }
102242
+ if (extension2.opts.offset) {
102243
+ attributeManager.addInstanced({
102244
+ instanceOffsets: {
102245
+ size: 1,
102246
+ accessor: "getOffset"
102247
+ }
102248
+ });
102249
+ }
102250
+ }
102251
+ updateState(params2, extension2) {
102252
+ if (!extension2.isEnabled(this)) {
102253
+ return;
102254
+ }
102255
+ const uniforms = {};
102256
+ if (extension2.opts.dash) {
102257
+ uniforms.dashAlignMode = this.props.dashJustified ? 1 : 0;
102258
+ uniforms.dashGapPickable = Boolean(this.props.dashGapPickable);
102259
+ }
102260
+ this.state.model.setUniforms(uniforms);
102261
+ }
102262
+ getDashOffsets(path2) {
102263
+ const result = [0];
102264
+ const positionSize = this.props.positionFormat === "XY" ? 2 : 3;
102265
+ const isNested2 = Array.isArray(path2[0]);
102266
+ const geometrySize = isNested2 ? path2.length : path2.length / positionSize;
102267
+ let p;
102268
+ let prevP;
102269
+ for (let i2 = 0; i2 < geometrySize - 1; i2++) {
102270
+ p = isNested2 ? path2[i2] : path2.slice(i2 * positionSize, i2 * positionSize + positionSize);
102271
+ p = this.projectPosition(p);
102272
+ if (i2 > 0) {
102273
+ result[i2] = result[i2 - 1] + dist$1(prevP, p);
102274
+ }
102275
+ prevP = p;
102276
+ }
102277
+ return result;
102278
+ }
102279
+ }
102280
+ _defineProperty$3(PathStyleExtension, "defaultProps", defaultProps$N);
102281
+ _defineProperty$3(PathStyleExtension, "extensionName", "PathStyleExtension");
101336
102282
  const defaultProps$M = {
101337
102283
  clipBounds: [0, 0, 1, 1]
101338
102284
  };
@@ -173688,22 +174634,22 @@ function addDecoder(cases2, importFn) {
173688
174634
  }
173689
174635
  cases2.forEach((c2) => registry$1.set(c2, importFn));
173690
174636
  }
173691
- addDecoder([void 0, 1], () => import("./raw-DA0bjume.js").then((m2) => m2.default));
173692
- addDecoder(5, () => import("./lzw-BS2ckxRa.js").then((m2) => m2.default));
174637
+ addDecoder([void 0, 1], () => import("./raw-Dg8kCOnj.js").then((m2) => m2.default));
174638
+ addDecoder(5, () => import("./lzw-DkbMJx1b.js").then((m2) => m2.default));
173693
174639
  addDecoder(6, () => {
173694
174640
  throw new Error("old style JPEG compression is not supported.");
173695
174641
  });
173696
- addDecoder(7, () => import("./jpeg-HJZeqbJ9.js").then((m2) => m2.default));
173697
- addDecoder([8, 32946], () => import("./deflate-C-0XOaix.js").then((m2) => m2.default));
173698
- addDecoder(32773, () => import("./packbits-8sTofHBF.js").then((m2) => m2.default));
174642
+ addDecoder(7, () => import("./jpeg-DhNGUcND.js").then((m2) => m2.default));
174643
+ addDecoder([8, 32946], () => import("./deflate-BG2HUqgg.js").then((m2) => m2.default));
174644
+ addDecoder(32773, () => import("./packbits-8pX5TxcK.js").then((m2) => m2.default));
173699
174645
  addDecoder(
173700
174646
  34887,
173701
- () => import("./lerc-BtoOWLPL.js").then(async (m2) => {
174647
+ () => import("./lerc-CeaVG0Hd.js").then(async (m2) => {
173702
174648
  await m2.zstd.init();
173703
174649
  return m2;
173704
174650
  }).then((m2) => m2.default)
173705
174651
  );
173706
- addDecoder(50001, () => import("./webimage-C3yiEsf-.js").then((m2) => m2.default));
174652
+ addDecoder(50001, () => import("./webimage-DqIQm4cj.js").then((m2) => m2.default));
173707
174653
  function decodeRowAcc(row, stride) {
173708
174654
  let length2 = row.length - stride;
173709
174655
  let offset2 = 0;
@@ -180906,7 +181852,7 @@ function padColors({ colors: colors2, channelsVisible }) {
180906
181852
  ).reduce((acc, val) => acc.concat(val), []);
180907
181853
  return paddedColors;
180908
181854
  }
180909
- const defaultProps$3$1 = {
181855
+ const defaultProps$3$2 = {
180910
181856
  colors: { type: "array", value: null, compare: true },
180911
181857
  opacity: { type: "number", value: 1, compare: true },
180912
181858
  transparentColor: { type: "array", value: null, compare: true },
@@ -180923,9 +181869,9 @@ const ColorPaletteExtension = class extends LayerExtension {
180923
181869
  const {
180924
181870
  colors: colors2,
180925
181871
  channelsVisible,
180926
- opacity: opacity2 = defaultProps$3$1.opacity.value,
180927
- transparentColor = defaultProps$3$1.transparentColor.value,
180928
- useTransparentColor = defaultProps$3$1.useTransparentColor.value
181872
+ opacity: opacity2 = defaultProps$3$2.opacity.value,
181873
+ transparentColor = defaultProps$3$2.transparentColor.value,
181874
+ useTransparentColor = defaultProps$3$2.useTransparentColor.value
180929
181875
  } = this.props;
180930
181876
  const paddedColors = padColors({
180931
181877
  channelsVisible: channelsVisible || this.selections.map(() => true),
@@ -180941,7 +181887,7 @@ const ColorPaletteExtension = class extends LayerExtension {
180941
181887
  }
180942
181888
  };
180943
181889
  ColorPaletteExtension.extensionName = "ColorPaletteExtension";
180944
- ColorPaletteExtension.defaultProps = defaultProps$3$1;
181890
+ ColorPaletteExtension.defaultProps = defaultProps$3$2;
180945
181891
  const fs$4 = `// lens bounds for ellipse
180946
181892
  uniform float majorLensAxis;
180947
181893
  uniform float minorLensAxis;
@@ -182236,7 +183182,7 @@ const MultiscaleImageLayer = class extends CompositeLayer {
182236
183182
  };
182237
183183
  MultiscaleImageLayer.layerName = "MultiscaleImageLayer";
182238
183184
  MultiscaleImageLayer.defaultProps = defaultProps$4;
182239
- const defaultProps$3 = {
183185
+ const defaultProps$3$1 = {
182240
183186
  pickable: { type: "boolean", value: true, compare: true },
182241
183187
  loader: {
182242
183188
  type: "object",
@@ -182323,7 +183269,7 @@ const OverviewLayer = class extends CompositeLayer {
182323
183269
  }
182324
183270
  };
182325
183271
  OverviewLayer.layerName = "OverviewLayer";
182326
- OverviewLayer.defaultProps = defaultProps$3;
183272
+ OverviewLayer.defaultProps = defaultProps$3$1;
182327
183273
  function getPosition(boundingBox, position2, length2) {
182328
183274
  const viewWidth2 = boundingBox[2][0] - boundingBox[0][0];
182329
183275
  const viewHeight2 = boundingBox[2][1] - boundingBox[0][1];
@@ -183311,7 +184257,7 @@ function padWithDefault$1(arr, defaultValue2, padWidth) {
183311
184257
  }
183312
184258
  return newArr;
183313
184259
  }
183314
- const defaultProps$2 = {
184260
+ const defaultProps$3 = {
183315
184261
  hoveredCell: { type: "number", value: null, compare: true },
183316
184262
  // We do not want to deep-compare cellColorData,
183317
184263
  // as it is potentially a TypedArray with millions of elements.
@@ -183428,7 +184374,7 @@ let BitmaskLayer$1 = class BitmaskLayer extends XRLayer {
183428
184374
  }
183429
184375
  };
183430
184376
  BitmaskLayer$1.layerName = "BitmaskLayer";
183431
- BitmaskLayer$1.defaultProps = defaultProps$2;
184377
+ BitmaskLayer$1.defaultProps = defaultProps$3;
183432
184378
  const vs = `
183433
184379
  #define SHADER_NAME bitmask-layer-vertex-shader
183434
184380
 
@@ -183770,7 +184716,7 @@ function isEqualShallow(prevArr, nextArr) {
183770
184716
  }
183771
184717
  return prevArr === nextArr;
183772
184718
  }
183773
- const defaultProps$1 = {
184719
+ const defaultProps$2 = {
183774
184720
  channelStrokeWidths: { type: "array", value: null, compare: true },
183775
184721
  channelsFilled: { type: "array", value: null, compare: true },
183776
184722
  channelOpacities: { type: "array", value: null, compare: true },
@@ -184034,7 +184980,7 @@ class BitmaskLayer2 extends XRLayer {
184034
184980
  }
184035
184981
  }
184036
184982
  BitmaskLayer2.layerName = "BitmaskLayer";
184037
- BitmaskLayer2.defaultProps = defaultProps$1;
184983
+ BitmaskLayer2.defaultProps = defaultProps$2;
184038
184984
  var isNumeric$1 = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, mathceil = Math.ceil, mathfloor = Math.floor, bignumberError = "[BigNumber Error] ", tooManyDigits = bignumberError + "Number primitive has more than 15 significant digits: ", BASE = 1e14, LOG_BASE = 14, MAX_SAFE_INTEGER$2 = 9007199254740991, POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], SQRT_BASE = 1e7, MAX$1 = 1e9;
184039
184985
  function clone$1(configObject) {
184040
184986
  var div, convertBase, parseNumeric, P = BigNumber2.prototype = { constructor: BigNumber2, toString: null, valueOf: null }, ONE = new BigNumber2(1), DECIMAL_PLACES = 20, ROUNDING_MODE = 4, TO_EXP_NEG = -7, TO_EXP_POS = 21, MIN_EXP = -1e7, MAX_EXP = 1e7, CRYPTO = false, MODULO_MODE = 1, POW_PRECISION = 0, FORMAT = {
@@ -186977,7 +187923,7 @@ function ringArea(coords) {
186977
187923
  return total * FACTOR;
186978
187924
  }
186979
187925
  const DEFAULT_THRESHOLD = 1;
186980
- const defaultProps = {
187926
+ const defaultProps$1 = {
186981
187927
  // for text
186982
187928
  obsSetPath: { type: "object" },
186983
187929
  sampleSetPath: { type: "object" },
@@ -187151,7 +188097,1077 @@ class ContourLayerWithText extends ContourLayer {
187151
188097
  }
187152
188098
  }
187153
188099
  ContourLayerWithText.layerName = "ContourLayerWithText";
187154
- ContourLayerWithText.defaultProps = defaultProps;
188100
+ ContourLayerWithText.defaultProps = defaultProps$1;
188101
+ const ARROW_SCREEN_PX = 14;
188102
+ const LABEL_FONT_FAMILY = '"Roboto", "Helvetica", "Arial", sans-serif';
188103
+ const LABEL_FONT_WEIGHT = "bold";
188104
+ const LABEL_FONT_SIZE = 14;
188105
+ const RATIO_CLUSTER = 0.1;
188106
+ const RATIO_DOT = 0.3;
188107
+ const RATIO_GEO_FADE = 0.55;
188108
+ const RATIO_TIPS = 0.7;
188109
+ const RATIO_LABEL = 0.55;
188110
+ const RATIO_LABEL_FULL = 0.75;
188111
+ function textBgColor(strokeColor) {
188112
+ const [r3, g2, b2] = strokeColor;
188113
+ const lum = (0.299 * r3 + 0.587 * g2 + 0.114 * b2) / 255;
188114
+ return lum > 0.45 ? [20, 20, 20, 210] : [245, 245, 245, 210];
188115
+ }
188116
+ function parseDashArray(strokeDashArray) {
188117
+ if (!strokeDashArray || strokeDashArray === "none")
188118
+ return null;
188119
+ const nums = strokeDashArray.trim().split(/\s+/).map(Number).filter((n2) => !Number.isNaN(n2) && n2 >= 0);
188120
+ return nums.length >= 2 ? [nums[0], nums[1]] : null;
188121
+ }
188122
+ function computeEllipsePolygon(cx, cy, rx, ry, numSegments = 64) {
188123
+ const pts = [];
188124
+ for (let i2 = 0; i2 < numSegments; i2++) {
188125
+ const angle2 = 2 * Math.PI * i2 / numSegments;
188126
+ pts.push([cx + rx * Math.cos(angle2), cy + ry * Math.sin(angle2)]);
188127
+ }
188128
+ return pts;
188129
+ }
188130
+ function createPreviewLayer(inProgress, hoverCoord, strokeColor = [255, 255, 0]) {
188131
+ if (!inProgress || inProgress.vertices.length === 0)
188132
+ return null;
188133
+ const { type: type2, vertices } = inProgress;
188134
+ const base2 = { coordinateSystem: COORDINATE_SYSTEM.CARTESIAN };
188135
+ const previewColor = [...strokeColor, 160];
188136
+ const cursor2 = hoverCoord ?? vertices[vertices.length - 1];
188137
+ if (type2 === "rectangle" && vertices.length === 1) {
188138
+ const [ax, ay] = vertices[0];
188139
+ const [bx, by] = cursor2;
188140
+ const path2 = [[ax, ay], [bx, ay], [bx, by], [ax, by], [ax, ay]];
188141
+ return new PathLayer({
188142
+ ...base2,
188143
+ id: "annotation-preview-rectangle",
188144
+ data: [{ path: path2 }],
188145
+ getPath: (d) => d.path,
188146
+ getColor: previewColor,
188147
+ getWidth: 1,
188148
+ widthUnits: "pixels",
188149
+ extensions: [new PathStyleExtension({ dash: true })],
188150
+ getDashArray: [8, 4]
188151
+ });
188152
+ }
188153
+ if (type2 === "line" && vertices.length === 1) {
188154
+ const path2 = [vertices[0], cursor2];
188155
+ return new PathLayer({
188156
+ ...base2,
188157
+ id: "annotation-preview-line",
188158
+ data: [{ path: path2 }],
188159
+ getPath: (d) => d.path,
188160
+ getColor: previewColor,
188161
+ getWidth: 1,
188162
+ widthUnits: "pixels",
188163
+ extensions: [new PathStyleExtension({ dash: true })],
188164
+ getDashArray: [8, 4]
188165
+ });
188166
+ }
188167
+ if (type2 === "ellipse" && vertices.length === 1) {
188168
+ const [cx, cy] = vertices[0];
188169
+ const [ex, ey] = cursor2;
188170
+ const rx = Math.abs(ex - cx);
188171
+ const ry = Math.abs(ey - cy);
188172
+ if (rx < 1 && ry < 1)
188173
+ return null;
188174
+ const pts = computeEllipsePolygon(cx, cy, Math.max(rx, 1), Math.max(ry, 1));
188175
+ const path2 = [...pts, pts[0]];
188176
+ return new PathLayer({
188177
+ ...base2,
188178
+ id: "annotation-preview-ellipse",
188179
+ data: [{ path: path2 }],
188180
+ getPath: (d) => d.path,
188181
+ getColor: previewColor,
188182
+ getWidth: 1,
188183
+ widthUnits: "pixels",
188184
+ extensions: [new PathStyleExtension({ dash: true })],
188185
+ getDashArray: [8, 4]
188186
+ });
188187
+ }
188188
+ if ((type2 === "polygon" || type2 === "polyline") && vertices.length >= 1) {
188189
+ const path2 = [...vertices, cursor2];
188190
+ if (type2 === "polygon" && vertices.length >= 2)
188191
+ path2.push(vertices[0]);
188192
+ return new PathLayer({
188193
+ ...base2,
188194
+ id: `annotation-preview-${type2}`,
188195
+ data: [{ path: path2 }],
188196
+ getPath: (d) => d.path,
188197
+ getColor: previewColor,
188198
+ getWidth: 1,
188199
+ widthUnits: "pixels",
188200
+ jointRounded: true,
188201
+ capRounded: true,
188202
+ extensions: [new PathStyleExtension({ dash: true })],
188203
+ getDashArray: [8, 4]
188204
+ });
188205
+ }
188206
+ return null;
188207
+ }
188208
+ function computeTickCap(tipX, tipY, dirX, dirY, dataSize) {
188209
+ const len2 = Math.sqrt(dirX * dirX + dirY * dirY);
188210
+ if (len2 === 0)
188211
+ return null;
188212
+ const ux = dirX / len2;
188213
+ const uy = dirY / len2;
188214
+ const px2 = -uy;
188215
+ const py2 = ux;
188216
+ const half = dataSize * 0.55;
188217
+ return [
188218
+ [tipX + px2 * half, tipY + py2 * half],
188219
+ [tipX - px2 * half, tipY - py2 * half]
188220
+ ];
188221
+ }
188222
+ function computeArrowhead(tipX, tipY, dirX, dirY, dataSize) {
188223
+ const len2 = Math.sqrt(dirX * dirX + dirY * dirY);
188224
+ if (len2 === 0)
188225
+ return null;
188226
+ const ux = dirX / len2;
188227
+ const uy = dirY / len2;
188228
+ const px2 = -uy;
188229
+ const py2 = ux;
188230
+ const halfBase = dataSize * 0.4;
188231
+ const bx = tipX - ux * dataSize;
188232
+ const by = tipY - uy * dataSize;
188233
+ return [
188234
+ [tipX, tipY],
188235
+ [bx + px2 * halfBase, by + py2 * halfBase],
188236
+ [bx - px2 * halfBase, by - py2 * halfBase]
188237
+ ];
188238
+ }
188239
+ function fmtCommas(n2) {
188240
+ return Math.round(n2).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
188241
+ }
188242
+ function getMeasurementLabel(shape2, physicalPixelSize, viewType = ViewType$1.SPATIAL) {
188243
+ const pps = physicalPixelSize;
188244
+ const px2 = pps?.x ?? 1;
188245
+ const py2 = pps?.y ?? 1;
188246
+ const unit2 = pps ? pps.unit ?? "" : null;
188247
+ const hasPhys = !!pps;
188248
+ const isEmbedding = viewType === ViewType$1.SCATTERPLOT;
188249
+ const fmtDist = (d) => {
188250
+ if (hasPhys)
188251
+ return `${d.toFixed(2)} ${unit2}`;
188252
+ if (isEmbedding)
188253
+ return d.toFixed(2);
188254
+ return `${fmtCommas(d)} px`;
188255
+ };
188256
+ const fmtArea = (a2) => {
188257
+ if (hasPhys)
188258
+ return `${a2.toFixed(2)} ${unit2}²`;
188259
+ if (isEmbedding)
188260
+ return a2.toFixed(2);
188261
+ return `${fmtCommas(a2)} px²`;
188262
+ };
188263
+ if (shape2.type === "line") {
188264
+ const dx = (shape2.x2 ?? 0) - (shape2.x1 ?? 0);
188265
+ const dy = (shape2.y2 ?? 0) - (shape2.y1 ?? 0);
188266
+ const dist2 = hasPhys ? Math.sqrt((dx * px2) ** 2 + (dy * py2) ** 2) : Math.sqrt(dx * dx + dy * dy);
188267
+ return fmtDist(dist2);
188268
+ }
188269
+ if (shape2.type === "rectangle") {
188270
+ return fmtArea(hasPhys ? Math.abs(shape2.width ?? 0) * px2 * Math.abs(shape2.height ?? 0) * py2 : Math.abs((shape2.width ?? 0) * (shape2.height ?? 0)));
188271
+ }
188272
+ if (shape2.type === "ellipse") {
188273
+ const rx = Math.abs(shape2.radiusX ?? 0);
188274
+ const ry = Math.abs(shape2.radiusY ?? 0);
188275
+ return fmtArea(hasPhys ? Math.PI * rx * px2 * ry * py2 : Math.PI * rx * ry);
188276
+ }
188277
+ if (shape2.type === "polygon" && shape2.points?.length >= 3) {
188278
+ const pts = shape2.points;
188279
+ let shoelace = 0;
188280
+ for (let i2 = 0; i2 < pts.length; i2++) {
188281
+ const [ax, ay] = pts[i2];
188282
+ const [bx, by] = pts[(i2 + 1) % pts.length];
188283
+ shoelace += (hasPhys ? ax * px2 : ax) * (hasPhys ? by * py2 : by) - (hasPhys ? bx * px2 : bx) * (hasPhys ? ay * py2 : ay);
188284
+ }
188285
+ return fmtArea(Math.abs(shoelace / 2));
188286
+ }
188287
+ if (shape2.type === "polyline" && shape2.points?.length >= 2) {
188288
+ let total = 0;
188289
+ for (let i2 = 0; i2 < shape2.points.length - 1; i2++) {
188290
+ const [ax, ay] = shape2.points[i2];
188291
+ const [bx, by] = shape2.points[i2 + 1];
188292
+ total += hasPhys ? Math.sqrt(((bx - ax) * px2) ** 2 + ((by - ay) * py2) ** 2) : Math.sqrt((bx - ax) ** 2 + (by - ay) ** 2);
188293
+ }
188294
+ return fmtDist(total);
188295
+ }
188296
+ return null;
188297
+ }
188298
+ function pickBelowPerp(ux, uy) {
188299
+ const rp = [uy, -ux];
188300
+ const lp = [-uy, ux];
188301
+ return rp[1] > lp[1] || rp[1] === lp[1] && rp[0] > lp[0] ? rp : lp;
188302
+ }
188303
+ function readableAngle(deg) {
188304
+ let a2 = deg;
188305
+ if (a2 > 90)
188306
+ a2 -= 180;
188307
+ if (a2 < -90)
188308
+ a2 += 180;
188309
+ return a2;
188310
+ }
188311
+ function getShapeCentroid(shape2) {
188312
+ if (shape2.type === "rectangle") {
188313
+ return [(shape2.x ?? 0) + (shape2.width ?? 0) / 2, (shape2.y ?? 0) + (shape2.height ?? 0) / 2];
188314
+ }
188315
+ if (shape2.type === "line") {
188316
+ return [((shape2.x1 ?? 0) + (shape2.x2 ?? 0)) / 2, ((shape2.y1 ?? 0) + (shape2.y2 ?? 0)) / 2];
188317
+ }
188318
+ if (shape2.type === "ellipse") {
188319
+ return [shape2.x1 ?? 0, shape2.y1 ?? 0];
188320
+ }
188321
+ if ((shape2.type === "polygon" || shape2.type === "polyline") && shape2.points?.length >= 1) {
188322
+ const mx = shape2.points.reduce((s2, p) => s2 + p[0], 0) / shape2.points.length;
188323
+ const my = shape2.points.reduce((s2, p) => s2 + p[1], 0) / shape2.points.length;
188324
+ return [mx, my];
188325
+ }
188326
+ return [0, 0];
188327
+ }
188328
+ function computeClusters(shapeList, zoom2, cellPx = 50) {
188329
+ const cellSize = cellPx / 2 ** Math.floor(zoom2);
188330
+ const cells = /* @__PURE__ */ new Map();
188331
+ shapeList.forEach(({ shape: shape2 }) => {
188332
+ const [cx, cy] = getShapeCentroid(shape2);
188333
+ const key2 = `${Math.floor(cx / cellSize)},${Math.floor(cy / cellSize)}`;
188334
+ if (!cells.has(key2)) {
188335
+ cells.set(key2, { sumX: 0, sumY: 0, count: 0, color: shape2.strokeColor ?? [255, 255, 255] });
188336
+ }
188337
+ const c2 = cells.get(key2);
188338
+ c2.sumX += cx;
188339
+ c2.sumY += cy;
188340
+ c2.count++;
188341
+ });
188342
+ return Array.from(cells.values()).map((c2) => ({
188343
+ position: [c2.sumX / c2.count, c2.sumY / c2.count, 0],
188344
+ count: c2.count,
188345
+ color: c2.color
188346
+ }));
188347
+ }
188348
+ function createAnnotationLayers(shapes = [], zoom2 = 0, selectedShapeUid = null, physicalPixelSize = null, authoredZoom = null, semanticZoom = true, viewType = ViewType$1.SPATIAL) {
188349
+ const selectionLayers = [];
188350
+ if (selectedShapeUid) {
188351
+ const sel = shapes.find((s2) => s2.uid === selectedShapeUid);
188352
+ if (sel) {
188353
+ const { uid: sUid, type: sType, strokeWidth: sStrokeWidth = 3 } = sel;
188354
+ const haloColor = [255, 220, 50, 70];
188355
+ const haloWidth = Math.max(sStrokeWidth + 8, 10);
188356
+ const base2 = { coordinateSystem: COORDINATE_SYSTEM.CARTESIAN };
188357
+ if (sType === "rectangle") {
188358
+ const { x: x2, y: y2, width: width2, height: height2 } = sel;
188359
+ selectionLayers.push(new PathLayer({
188360
+ ...base2,
188361
+ id: `annotation-select-${sUid}`,
188362
+ data: [{
188363
+ path: [
188364
+ [x2, y2],
188365
+ [x2 + width2, y2],
188366
+ [x2 + width2, y2 + height2],
188367
+ [x2, y2 + height2],
188368
+ [x2, y2]
188369
+ ]
188370
+ }],
188371
+ getPath: (d) => d.path,
188372
+ getColor: haloColor,
188373
+ getWidth: haloWidth,
188374
+ widthUnits: "pixels",
188375
+ jointRounded: true,
188376
+ capRounded: true
188377
+ }));
188378
+ }
188379
+ if (sType === "line") {
188380
+ const { x1: x12, y1: y12, x2, y2 } = sel;
188381
+ selectionLayers.push(new PathLayer({
188382
+ ...base2,
188383
+ id: `annotation-select-${sUid}`,
188384
+ data: [{ path: [[x12, y12], [x2, y2]] }],
188385
+ getPath: (d) => d.path,
188386
+ getColor: haloColor,
188387
+ getWidth: haloWidth,
188388
+ widthUnits: "pixels",
188389
+ capRounded: true
188390
+ }));
188391
+ }
188392
+ if (sType === "ellipse") {
188393
+ const polygon2 = computeEllipsePolygon(sel.x1, sel.y1, sel.radiusX, sel.radiusY);
188394
+ selectionLayers.push(new PathLayer({
188395
+ ...base2,
188396
+ id: `annotation-select-${sUid}`,
188397
+ data: [{ path: [...polygon2, polygon2[0]] }],
188398
+ getPath: (d) => d.path,
188399
+ getColor: haloColor,
188400
+ getWidth: haloWidth,
188401
+ widthUnits: "pixels",
188402
+ jointRounded: true
188403
+ }));
188404
+ }
188405
+ if (sType === "polygon" && sel.points?.length >= 3) {
188406
+ selectionLayers.push(new PathLayer({
188407
+ ...base2,
188408
+ id: `annotation-select-${sUid}`,
188409
+ data: [{ path: [...sel.points, sel.points[0]] }],
188410
+ getPath: (d) => d.path,
188411
+ getColor: haloColor,
188412
+ getWidth: haloWidth,
188413
+ widthUnits: "pixels",
188414
+ jointRounded: true
188415
+ }));
188416
+ }
188417
+ if (sType === "polyline" && sel.points?.length >= 2) {
188418
+ selectionLayers.push(new PathLayer({
188419
+ ...base2,
188420
+ id: `annotation-select-${sUid}`,
188421
+ data: [{ path: sel.points }],
188422
+ getPath: (d) => d.path,
188423
+ getColor: haloColor,
188424
+ getWidth: haloWidth,
188425
+ widthUnits: "pixels",
188426
+ jointRounded: true,
188427
+ capRounded: true
188428
+ }));
188429
+ }
188430
+ }
188431
+ }
188432
+ const layers = [];
188433
+ const dotShapes = [];
188434
+ const clusterDotShapes = [];
188435
+ shapes.forEach((shape2, i2) => {
188436
+ const { uid: uid2, type: type2, strokeColor = [255, 255, 255], strokeWidth = 3, strokeDashArray } = shape2;
188437
+ const isSelected = uid2 === selectedShapeUid;
188438
+ let shapeOpacity = 1;
188439
+ let tipsOpacity = 1;
188440
+ let labelOpacity = 0;
188441
+ if (isSelected || !semanticZoom || authoredZoom === null) {
188442
+ tipsOpacity = 1;
188443
+ labelOpacity = 1;
188444
+ } else {
188445
+ const zoomRatio = 2 ** (zoom2 - authoredZoom);
188446
+ if (zoomRatio < RATIO_CLUSTER) {
188447
+ clusterDotShapes.push({ shape: shape2 });
188448
+ return;
188449
+ }
188450
+ if (zoomRatio < RATIO_DOT) {
188451
+ dotShapes.push({ shape: shape2, alpha: 200 });
188452
+ return;
188453
+ }
188454
+ if (zoomRatio < RATIO_GEO_FADE) {
188455
+ const t4 = (zoomRatio - RATIO_DOT) / (RATIO_GEO_FADE - RATIO_DOT);
188456
+ shapeOpacity = t4;
188457
+ dotShapes.push({ shape: shape2, alpha: Math.round((1 - t4) * 200) });
188458
+ }
188459
+ tipsOpacity = zoomRatio >= RATIO_TIPS ? shapeOpacity : Math.max(0, (zoomRatio - RATIO_GEO_FADE) / (RATIO_TIPS - RATIO_GEO_FADE) * shapeOpacity);
188460
+ if (zoomRatio >= RATIO_LABEL_FULL) {
188461
+ labelOpacity = shapeOpacity;
188462
+ } else if (zoomRatio >= RATIO_LABEL) {
188463
+ labelOpacity = (zoomRatio - RATIO_LABEL) / (RATIO_LABEL_FULL - RATIO_LABEL) * shapeOpacity;
188464
+ }
188465
+ }
188466
+ const arrowDataSize = Math.max(ARROW_SCREEN_PX, strokeWidth * 4) / 2 ** zoom2;
188467
+ const base2 = { coordinateSystem: COORDINATE_SYSTEM.CARTESIAN, opacity: shapeOpacity };
188468
+ const tipsBase = { coordinateSystem: COORDINATE_SYSTEM.CARTESIAN, opacity: tipsOpacity };
188469
+ const labelBase = { coordinateSystem: COORDINATE_SYSTEM.CARTESIAN, opacity: labelOpacity };
188470
+ const labelBgProps = shape2.labelBackground ? {
188471
+ background: true,
188472
+ getBackgroundColor: textBgColor(strokeColor),
188473
+ backgroundPadding: [3, 1, 3, 2]
188474
+ } : {};
188475
+ const labelProps = { ...labelBgProps };
188476
+ const dashArray = parseDashArray(strokeDashArray);
188477
+ const dashExt = [new PathStyleExtension({ dash: true })];
188478
+ const getDash = dashArray ?? [0, 0];
188479
+ if (type2 === "rectangle") {
188480
+ const { x: x2, y: y2, width: width2, height: height2, fillColor = strokeColor, fillOpacity = 0 } = shape2;
188481
+ const filled = fillOpacity > 0;
188482
+ const rectPolygon = [[x2, y2], [x2 + width2, y2], [x2 + width2, y2 + height2], [x2, y2 + height2]];
188483
+ layers.push(new PolygonLayer({
188484
+ ...base2,
188485
+ id: `annotation-rect-${uid2}-${i2}`,
188486
+ data: [{ polygon: rectPolygon }],
188487
+ getPolygon: (d) => d.polygon,
188488
+ filled,
188489
+ stroked: true,
188490
+ getFillColor: filled ? [...fillColor, Math.round(fillOpacity * 255)] : [0, 0, 0, 0],
188491
+ getLineColor: strokeColor,
188492
+ getLineWidth: strokeWidth,
188493
+ lineWidthUnits: "pixels",
188494
+ ...dashArray ? {
188495
+ extensions: [new PathStyleExtension({ dash: true })],
188496
+ getDashArray: dashArray
188497
+ } : {}
188498
+ }));
188499
+ if (shape2.text && labelOpacity > 0) {
188500
+ layers.push(new TextLayer({
188501
+ ...labelBase,
188502
+ ...labelProps,
188503
+ id: `annotation-rect-text-${uid2}-${i2}`,
188504
+ data: [{ position: [x2, y2], text: shape2.text }],
188505
+ getPosition: (d) => d.position,
188506
+ getText: (d) => d.text,
188507
+ getColor: strokeColor,
188508
+ getSize: LABEL_FONT_SIZE,
188509
+ sizeUnits: "pixels",
188510
+ fontFamily: LABEL_FONT_FAMILY,
188511
+ fontWeight: LABEL_FONT_WEIGHT,
188512
+ getPixelOffset: [3, -7],
188513
+ getTextAnchor: "start",
188514
+ getAlignmentBaseline: "bottom"
188515
+ }));
188516
+ }
188517
+ }
188518
+ if (type2 === "line") {
188519
+ const { x1: x12, y1: y12, x2, y2, markerStart, markerEnd } = shape2;
188520
+ const dx = x2 - x12;
188521
+ const dy = y2 - y12;
188522
+ const len2 = Math.sqrt(dx * dx + dy * dy);
188523
+ const ux = len2 > 0 ? dx / len2 : 0;
188524
+ const uy = len2 > 0 ? dy / len2 : 0;
188525
+ const srcX = markerStart === "Arrow" ? x12 + ux * arrowDataSize : x12;
188526
+ const srcY = markerStart === "Arrow" ? y12 + uy * arrowDataSize : y12;
188527
+ const tgtX = markerEnd === "Arrow" ? x2 - ux * arrowDataSize : x2;
188528
+ const tgtY = markerEnd === "Arrow" ? y2 - uy * arrowDataSize : y2;
188529
+ layers.push(new PathLayer({
188530
+ ...base2,
188531
+ id: `annotation-line-${uid2}-${i2}`,
188532
+ extensions: [new PathStyleExtension({ dash: true })],
188533
+ getDashArray: dashArray ?? [0, 0],
188534
+ data: [{ path: [[srcX, srcY], [tgtX, tgtY]] }],
188535
+ getPath: (d) => d.path,
188536
+ getColor: strokeColor,
188537
+ getWidth: strokeWidth,
188538
+ widthUnits: "pixels",
188539
+ capRounded: true
188540
+ }));
188541
+ if (markerEnd === "Arrow" && tipsOpacity > 0) {
188542
+ const head = computeArrowhead(x2, y2, x2 - x12, y2 - y12, arrowDataSize);
188543
+ if (head) {
188544
+ layers.push(new PolygonLayer({
188545
+ ...tipsBase,
188546
+ id: `annotation-end-arrow-${uid2}-${i2}`,
188547
+ data: [{ polygon: head }],
188548
+ getPolygon: (d) => d.polygon,
188549
+ filled: true,
188550
+ stroked: false,
188551
+ getFillColor: strokeColor
188552
+ }));
188553
+ }
188554
+ }
188555
+ if (markerStart === "Arrow" && tipsOpacity > 0) {
188556
+ const head = computeArrowhead(x12, y12, x12 - x2, y12 - y2, arrowDataSize);
188557
+ if (head) {
188558
+ layers.push(new PolygonLayer({
188559
+ ...tipsBase,
188560
+ id: `annotation-start-arrow-${uid2}-${i2}`,
188561
+ data: [{ polygon: head }],
188562
+ getPolygon: (d) => d.polygon,
188563
+ filled: true,
188564
+ stroked: false,
188565
+ getFillColor: strokeColor
188566
+ }));
188567
+ }
188568
+ }
188569
+ if (markerEnd === "Tick" && tipsOpacity > 0) {
188570
+ const tick2 = computeTickCap(x2, y2, x2 - x12, y2 - y12, arrowDataSize);
188571
+ if (tick2) {
188572
+ layers.push(new PathLayer({
188573
+ ...tipsBase,
188574
+ id: `annotation-end-tick-${uid2}-${i2}`,
188575
+ data: [{ path: tick2 }],
188576
+ getPath: (d) => d.path,
188577
+ getColor: strokeColor,
188578
+ getWidth: strokeWidth,
188579
+ widthUnits: "pixels",
188580
+ capRounded: true
188581
+ }));
188582
+ }
188583
+ }
188584
+ if (markerStart === "Tick" && tipsOpacity > 0) {
188585
+ const tick2 = computeTickCap(x12, y12, x12 - x2, y12 - y2, arrowDataSize);
188586
+ if (tick2) {
188587
+ layers.push(new PathLayer({
188588
+ ...tipsBase,
188589
+ id: `annotation-start-tick-${uid2}-${i2}`,
188590
+ data: [{ path: tick2 }],
188591
+ getPath: (d) => d.path,
188592
+ getColor: strokeColor,
188593
+ getWidth: strokeWidth,
188594
+ widthUnits: "pixels",
188595
+ capRounded: true
188596
+ }));
188597
+ }
188598
+ }
188599
+ if (shape2.text) {
188600
+ const pos = shape2.textPosition ?? "start";
188601
+ let textX;
188602
+ let textY;
188603
+ if (pos === "start") {
188604
+ textX = x12;
188605
+ textY = y12;
188606
+ } else if (pos === "end") {
188607
+ textX = x2;
188608
+ textY = y2;
188609
+ } else {
188610
+ textX = (x12 + x2) / 2;
188611
+ textY = (y12 + y2) / 2;
188612
+ }
188613
+ let pixelOffset = [0, 0];
188614
+ let textAnchor = "middle";
188615
+ let alignmentBaseline = "center";
188616
+ if (pos !== "middle") {
188617
+ const dxT = x2 - x12;
188618
+ const dyT = y2 - y12;
188619
+ const lenT = Math.sqrt(dxT * dxT + dyT * dyT);
188620
+ if (lenT > 0) {
188621
+ const uxT = dxT / lenT;
188622
+ const uyT = dyT / lenT;
188623
+ const sign2 = pos === "start" ? -1 : 1;
188624
+ const bufferPx = shape2.textBufferPx ?? 8;
188625
+ const offsetX = sign2 * uxT * bufferPx;
188626
+ const offsetY = sign2 * uyT * bufferPx;
188627
+ pixelOffset = [offsetX, offsetY];
188628
+ const absX = Math.abs(offsetX);
188629
+ const absY = Math.abs(offsetY);
188630
+ if (absX >= absY) {
188631
+ textAnchor = offsetX > 0 ? "start" : "end";
188632
+ }
188633
+ if (absY >= absX) {
188634
+ alignmentBaseline = offsetY > 0 ? "top" : "bottom";
188635
+ }
188636
+ }
188637
+ } else if (len2 > 0) {
188638
+ const belowPerp = pickBelowPerp(ux, uy);
188639
+ const bufferPx = shape2.textBufferPx ?? 14;
188640
+ pixelOffset = [-belowPerp[0] * bufferPx, -belowPerp[1] * bufferPx];
188641
+ textAnchor = "middle";
188642
+ alignmentBaseline = "center";
188643
+ }
188644
+ const middleAngle = pos === "middle" && len2 > 0 ? -readableAngle(Math.atan2(dy, dx) * 180 / Math.PI) : null;
188645
+ if (labelOpacity <= 0)
188646
+ return;
188647
+ layers.push(new TextLayer({
188648
+ ...labelBase,
188649
+ ...labelProps,
188650
+ id: `annotation-line-text-${uid2}-${i2}`,
188651
+ data: [{ position: [textX, textY], text: shape2.text }],
188652
+ getPosition: (d) => d.position,
188653
+ getText: (d) => d.text,
188654
+ getColor: strokeColor,
188655
+ getSize: LABEL_FONT_SIZE,
188656
+ sizeUnits: "pixels",
188657
+ fontFamily: LABEL_FONT_FAMILY,
188658
+ fontWeight: LABEL_FONT_WEIGHT,
188659
+ getPixelOffset: pixelOffset,
188660
+ getTextAnchor: textAnchor,
188661
+ getAlignmentBaseline: alignmentBaseline,
188662
+ ...middleAngle !== null && { getAngle: middleAngle }
188663
+ }));
188664
+ }
188665
+ }
188666
+ if (type2 === "ellipse") {
188667
+ const { x1: x12, y1: y12, radiusX, radiusY, fillColor = strokeColor, fillOpacity = 0 } = shape2;
188668
+ const polygon2 = computeEllipsePolygon(x12, y12, radiusX, radiusY);
188669
+ const filled = fillOpacity > 0;
188670
+ layers.push(new PolygonLayer({
188671
+ ...base2,
188672
+ id: `annotation-ellipse-${uid2}-${i2}`,
188673
+ data: [{ polygon: polygon2 }],
188674
+ getPolygon: (d) => d.polygon,
188675
+ filled,
188676
+ stroked: true,
188677
+ getFillColor: filled ? [...fillColor, Math.round(fillOpacity * 255)] : [0, 0, 0, 0],
188678
+ getLineColor: strokeColor,
188679
+ getLineWidth: strokeWidth,
188680
+ lineWidthUnits: "pixels",
188681
+ ...dashArray ? {
188682
+ extensions: [new PathStyleExtension({ dash: true })],
188683
+ getDashArray: dashArray
188684
+ } : {}
188685
+ }));
188686
+ if (shape2.text && labelOpacity > 0) {
188687
+ layers.push(new TextLayer({
188688
+ ...labelBase,
188689
+ ...labelProps,
188690
+ id: `annotation-ellipse-text-${uid2}-${i2}`,
188691
+ data: [{ position: [x12, y12 - radiusY], text: shape2.text }],
188692
+ getPosition: (d) => d.position,
188693
+ getText: (d) => d.text,
188694
+ getColor: strokeColor,
188695
+ getSize: LABEL_FONT_SIZE,
188696
+ sizeUnits: "pixels",
188697
+ fontFamily: LABEL_FONT_FAMILY,
188698
+ fontWeight: LABEL_FONT_WEIGHT,
188699
+ getPixelOffset: [0, -4],
188700
+ getTextAnchor: "middle",
188701
+ getAlignmentBaseline: "bottom"
188702
+ }));
188703
+ }
188704
+ }
188705
+ if (type2 === "polygon") {
188706
+ const { points: points2, fillColor = strokeColor, fillOpacity = 0 } = shape2;
188707
+ if (!points2 || points2.length < 3)
188708
+ return;
188709
+ const closedPath = [...points2, points2[0]];
188710
+ if (fillOpacity > 0) {
188711
+ layers.push(new PolygonLayer({
188712
+ ...base2,
188713
+ id: `annotation-polygon-fill-${uid2}-${i2}`,
188714
+ data: [{ polygon: points2 }],
188715
+ getPolygon: (d) => d.polygon,
188716
+ stroked: false,
188717
+ filled: true,
188718
+ getFillColor: [...fillColor, Math.round(fillOpacity * 255)]
188719
+ }));
188720
+ }
188721
+ layers.push(new PathLayer({
188722
+ ...base2,
188723
+ id: `annotation-polygon-${uid2}-${i2}`,
188724
+ extensions: dashExt,
188725
+ getDashArray: getDash,
188726
+ data: [{ path: closedPath }],
188727
+ getPath: (d) => d.path,
188728
+ getColor: strokeColor,
188729
+ getWidth: strokeWidth,
188730
+ widthUnits: "pixels",
188731
+ jointRounded: true
188732
+ }));
188733
+ if (shape2.text && labelOpacity > 0) {
188734
+ const minX = Math.min(...points2.map((p) => p[0]));
188735
+ const maxX = Math.max(...points2.map((p) => p[0]));
188736
+ const minY = Math.min(...points2.map((p) => p[1]));
188737
+ const topCenterX = (minX + maxX) / 2;
188738
+ layers.push(new TextLayer({
188739
+ ...labelBase,
188740
+ ...labelProps,
188741
+ id: `annotation-polygon-text-${uid2}-${i2}`,
188742
+ data: [{ position: [topCenterX, minY], text: shape2.text }],
188743
+ getPosition: (d) => d.position,
188744
+ getText: (d) => d.text,
188745
+ getColor: strokeColor,
188746
+ getSize: LABEL_FONT_SIZE,
188747
+ sizeUnits: "pixels",
188748
+ fontFamily: LABEL_FONT_FAMILY,
188749
+ fontWeight: LABEL_FONT_WEIGHT,
188750
+ getPixelOffset: [0, -4],
188751
+ getTextAnchor: "middle",
188752
+ getAlignmentBaseline: "bottom"
188753
+ }));
188754
+ }
188755
+ }
188756
+ if (type2 === "polyline") {
188757
+ const { points: points2, markerStart, markerEnd } = shape2;
188758
+ if (!points2 || points2.length < 2)
188759
+ return;
188760
+ let pathPoints = points2;
188761
+ if (markerStart === "Arrow") {
188762
+ const [x02, y02] = points2[0];
188763
+ const [x12, y12] = points2[1];
188764
+ const dx = x02 - x12;
188765
+ const dy = y02 - y12;
188766
+ const len2 = Math.sqrt(dx * dx + dy * dy);
188767
+ if (len2 > 0) {
188768
+ const ux = dx / len2;
188769
+ const uy = dy / len2;
188770
+ pathPoints = [[x02 - ux * arrowDataSize, y02 - uy * arrowDataSize], ...pathPoints.slice(1)];
188771
+ }
188772
+ }
188773
+ if (markerEnd === "Arrow") {
188774
+ const last = pathPoints[pathPoints.length - 1];
188775
+ const prev2 = pathPoints[pathPoints.length - 2];
188776
+ const dx = last[0] - prev2[0];
188777
+ const dy = last[1] - prev2[1];
188778
+ const len2 = Math.sqrt(dx * dx + dy * dy);
188779
+ if (len2 > 0) {
188780
+ const ux = dx / len2;
188781
+ const uy = dy / len2;
188782
+ const shortened = [last[0] - ux * arrowDataSize, last[1] - uy * arrowDataSize];
188783
+ pathPoints = [...pathPoints.slice(0, -1), shortened];
188784
+ }
188785
+ }
188786
+ layers.push(new PathLayer({
188787
+ ...base2,
188788
+ id: `annotation-polyline-${uid2}-${i2}`,
188789
+ extensions: dashExt,
188790
+ getDashArray: getDash,
188791
+ data: [{ path: pathPoints }],
188792
+ getPath: (d) => d.path,
188793
+ getColor: strokeColor,
188794
+ getWidth: strokeWidth,
188795
+ widthUnits: "pixels",
188796
+ jointRounded: true,
188797
+ capRounded: true
188798
+ }));
188799
+ if (markerStart === "Arrow" && tipsOpacity > 0) {
188800
+ const [x02, y02] = points2[0];
188801
+ const [x12, y12] = points2[1];
188802
+ const head = computeArrowhead(x02, y02, x02 - x12, y02 - y12, arrowDataSize);
188803
+ if (head) {
188804
+ layers.push(new PolygonLayer({
188805
+ ...tipsBase,
188806
+ id: `annotation-polyline-start-arrow-${uid2}-${i2}`,
188807
+ data: [{ polygon: head }],
188808
+ getPolygon: (d) => d.polygon,
188809
+ filled: true,
188810
+ stroked: false,
188811
+ getFillColor: strokeColor
188812
+ }));
188813
+ }
188814
+ }
188815
+ if (markerEnd === "Arrow" && tipsOpacity > 0) {
188816
+ const last = points2[points2.length - 1];
188817
+ const prev2 = points2[points2.length - 2];
188818
+ const dxArrow = last[0] - prev2[0];
188819
+ const dyArrow = last[1] - prev2[1];
188820
+ const head = computeArrowhead(last[0], last[1], dxArrow, dyArrow, arrowDataSize);
188821
+ if (head) {
188822
+ layers.push(new PolygonLayer({
188823
+ ...tipsBase,
188824
+ id: `annotation-polyline-end-arrow-${uid2}-${i2}`,
188825
+ data: [{ polygon: head }],
188826
+ getPolygon: (d) => d.polygon,
188827
+ filled: true,
188828
+ stroked: false,
188829
+ getFillColor: strokeColor
188830
+ }));
188831
+ }
188832
+ }
188833
+ if (markerStart === "Tick" && tipsOpacity > 0) {
188834
+ const [x02, y02] = points2[0];
188835
+ const [x12, y12] = points2[1];
188836
+ const tick2 = computeTickCap(x02, y02, x02 - x12, y02 - y12, arrowDataSize);
188837
+ if (tick2) {
188838
+ layers.push(new PathLayer({
188839
+ ...tipsBase,
188840
+ id: `annotation-polyline-start-tick-${uid2}-${i2}`,
188841
+ data: [{ path: tick2 }],
188842
+ getPath: (d) => d.path,
188843
+ getColor: strokeColor,
188844
+ getWidth: strokeWidth,
188845
+ widthUnits: "pixels",
188846
+ capRounded: true
188847
+ }));
188848
+ }
188849
+ }
188850
+ if (markerEnd === "Tick" && tipsOpacity > 0) {
188851
+ const last = points2[points2.length - 1];
188852
+ const prev2 = points2[points2.length - 2];
188853
+ const dxTick = last[0] - prev2[0];
188854
+ const dyTick = last[1] - prev2[1];
188855
+ const tick2 = computeTickCap(last[0], last[1], dxTick, dyTick, arrowDataSize);
188856
+ if (tick2) {
188857
+ layers.push(new PathLayer({
188858
+ ...tipsBase,
188859
+ id: `annotation-polyline-end-tick-${uid2}-${i2}`,
188860
+ data: [{ path: tick2 }],
188861
+ getPath: (d) => d.path,
188862
+ getColor: strokeColor,
188863
+ getWidth: strokeWidth,
188864
+ widthUnits: "pixels",
188865
+ capRounded: true
188866
+ }));
188867
+ }
188868
+ }
188869
+ if (shape2.text) {
188870
+ const pos = shape2.textPosition ?? "start";
188871
+ const bufferPx = shape2.textBufferPx ?? 8;
188872
+ let textPt;
188873
+ let dirX;
188874
+ let dirY;
188875
+ if (pos === "end") {
188876
+ const last = points2[points2.length - 1];
188877
+ const prev2 = points2[points2.length - 2];
188878
+ textPt = last;
188879
+ dirX = last[0] - prev2[0];
188880
+ dirY = last[1] - prev2[1];
188881
+ } else if (pos === "middle") {
188882
+ const mx = points2.reduce((s2, p) => s2 + p[0], 0) / points2.length;
188883
+ const my = points2.reduce((s2, p) => s2 + p[1], 0) / points2.length;
188884
+ textPt = [mx, my];
188885
+ dirX = 0;
188886
+ dirY = 0;
188887
+ } else {
188888
+ [textPt] = points2;
188889
+ dirX = points2[0][0] - points2[1][0];
188890
+ dirY = points2[0][1] - points2[1][1];
188891
+ }
188892
+ const [textX, textY] = textPt;
188893
+ const lenT = Math.sqrt(dirX * dirX + dirY * dirY);
188894
+ let polylinePixelOffset = [0, 0];
188895
+ let polylineTextAnchor = "middle";
188896
+ let polylineAlignmentBaseline = pos === "middle" ? "center" : "bottom";
188897
+ if (lenT > 0) {
188898
+ const uxT = dirX / lenT;
188899
+ const uyT = dirY / lenT;
188900
+ const offX = uxT * bufferPx;
188901
+ const offY = uyT * bufferPx;
188902
+ polylinePixelOffset = [offX, offY];
188903
+ if (Math.abs(offX) >= Math.abs(offY)) {
188904
+ polylineTextAnchor = offX > 0 ? "start" : "end";
188905
+ }
188906
+ if (Math.abs(offY) >= Math.abs(offX)) {
188907
+ polylineAlignmentBaseline = offY > 0 ? "top" : "bottom";
188908
+ }
188909
+ }
188910
+ if (labelOpacity <= 0)
188911
+ return;
188912
+ layers.push(new TextLayer({
188913
+ ...labelBase,
188914
+ ...labelProps,
188915
+ id: `annotation-polyline-text-${uid2}-${i2}`,
188916
+ data: [{ position: [textX, textY], text: shape2.text }],
188917
+ getPosition: (d) => d.position,
188918
+ getText: (d) => d.text,
188919
+ getColor: strokeColor,
188920
+ getSize: LABEL_FONT_SIZE,
188921
+ sizeUnits: "pixels",
188922
+ fontFamily: LABEL_FONT_FAMILY,
188923
+ fontWeight: LABEL_FONT_WEIGHT,
188924
+ getPixelOffset: polylinePixelOffset,
188925
+ getTextAnchor: polylineTextAnchor,
188926
+ getAlignmentBaseline: polylineAlignmentBaseline
188927
+ }));
188928
+ }
188929
+ }
188930
+ });
188931
+ if (dotShapes.length > 0) {
188932
+ layers.push(new ScatterplotLayer({
188933
+ coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
188934
+ id: "annotation-dots",
188935
+ data: dotShapes.map(({ shape: s2, alpha: alpha2 }) => ({
188936
+ position: getShapeCentroid(s2),
188937
+ color: [...s2.strokeColor ?? [255, 255, 255], alpha2]
188938
+ })),
188939
+ getPosition: (d) => d.position,
188940
+ getFillColor: (d) => d.color,
188941
+ getRadius: 4,
188942
+ radiusUnits: "pixels",
188943
+ filled: true,
188944
+ stroked: false
188945
+ }));
188946
+ }
188947
+ if (clusterDotShapes.length > 0) {
188948
+ const clusters = computeClusters(clusterDotShapes, zoom2);
188949
+ layers.push(new ScatterplotLayer({
188950
+ coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
188951
+ id: "annotation-clusters",
188952
+ data: clusters,
188953
+ getPosition: (d) => d.position,
188954
+ getFillColor: (d) => [...d.color, 180],
188955
+ getRadius: (d) => Math.max(6, 4 + Math.sqrt(d.count) * 2),
188956
+ radiusUnits: "pixels",
188957
+ filled: true,
188958
+ stroked: true,
188959
+ getLineColor: (d) => [...d.color, 220],
188960
+ lineWidthMinPixels: 1.5
188961
+ }));
188962
+ const multiClusters = clusters.filter((c2) => c2.count > 1);
188963
+ if (multiClusters.length > 0) {
188964
+ layers.push(new TextLayer({
188965
+ coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
188966
+ id: "annotation-cluster-counts",
188967
+ data: multiClusters,
188968
+ getPosition: (d) => d.position,
188969
+ getText: (d) => String(d.count),
188970
+ getColor: [255, 255, 255],
188971
+ getSize: 10,
188972
+ sizeUnits: "pixels",
188973
+ fontWeight: "bold",
188974
+ getTextAnchor: "middle",
188975
+ getAlignmentBaseline: "center"
188976
+ }));
188977
+ }
188978
+ }
188979
+ const measureLayers = [];
188980
+ shapes.forEach((shape2) => {
188981
+ if (!shape2.showMeasure)
188982
+ return;
188983
+ const mIsSelected = shape2.uid === selectedShapeUid;
188984
+ const label2 = getMeasurementLabel(shape2, physicalPixelSize, viewType);
188985
+ if (!label2)
188986
+ return;
188987
+ const color2 = shape2.strokeColor ?? [255, 255, 255];
188988
+ let mShapeOpacity = 1;
188989
+ let mLabelFactor = 0;
188990
+ if (mIsSelected || !semanticZoom || authoredZoom === null) {
188991
+ mLabelFactor = 1;
188992
+ } else {
188993
+ const mZoomRatio = 2 ** (zoom2 - authoredZoom);
188994
+ if (mZoomRatio < RATIO_DOT)
188995
+ return;
188996
+ if (mZoomRatio < RATIO_GEO_FADE) {
188997
+ mShapeOpacity = (mZoomRatio - RATIO_DOT) / (RATIO_GEO_FADE - RATIO_DOT);
188998
+ }
188999
+ if (mZoomRatio >= RATIO_LABEL_FULL) {
189000
+ mLabelFactor = 1;
189001
+ } else if (mZoomRatio >= RATIO_LABEL) {
189002
+ mLabelFactor = (mZoomRatio - RATIO_LABEL) / (RATIO_LABEL_FULL - RATIO_LABEL);
189003
+ }
189004
+ }
189005
+ const measureOpacity = mShapeOpacity * mLabelFactor;
189006
+ if (measureOpacity <= 0)
189007
+ return;
189008
+ const base2 = {
189009
+ coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
189010
+ opacity: measureOpacity,
189011
+ getText: (d) => d.text,
189012
+ getPosition: (d) => d.position,
189013
+ getColor: color2,
189014
+ getSize: 13,
189015
+ sizeUnits: "pixels",
189016
+ fontFamily: LABEL_FONT_FAMILY,
189017
+ fontWeight: "bold",
189018
+ // 'auto' builds the font atlas from the actual rendered characters (e.g. µ, ²)
189019
+ // instead of deck.gl's default ASCII-only atlas.
189020
+ characterSet: "auto",
189021
+ ...shape2.measureBackground ? {
189022
+ background: true,
189023
+ getBackgroundColor: textBgColor(color2),
189024
+ backgroundPadding: [3, 1, 3, 2]
189025
+ } : {}
189026
+ };
189027
+ if (shape2.type === "line") {
189028
+ const mx = ((shape2.x1 ?? 0) + (shape2.x2 ?? 0)) / 2;
189029
+ const my = ((shape2.y1 ?? 0) + (shape2.y2 ?? 0)) / 2;
189030
+ const dx = (shape2.x2 ?? 0) - (shape2.x1 ?? 0);
189031
+ const dy = (shape2.y2 ?? 0) - (shape2.y1 ?? 0);
189032
+ const len2 = Math.sqrt(dx * dx + dy * dy);
189033
+ if (len2 === 0)
189034
+ return;
189035
+ const perp = pickBelowPerp(dx / len2, dy / len2);
189036
+ const angle2 = readableAngle(Math.atan2(dy, dx) * 180 / Math.PI);
189037
+ measureLayers.push(new TextLayer({
189038
+ ...base2,
189039
+ id: `annotation-measure-${shape2.uid}`,
189040
+ data: [{ position: [mx, my], text: label2 }],
189041
+ getAngle: -angle2,
189042
+ getTextAnchor: "middle",
189043
+ getAlignmentBaseline: "center",
189044
+ getPixelOffset: [perp[0] * 16, perp[1] * 16]
189045
+ }));
189046
+ } else if (shape2.type === "polyline" && shape2.points?.length >= 2) {
189047
+ const pts = shape2.points;
189048
+ const mi = Math.floor((pts.length - 1) / 2);
189049
+ const [ax, ay] = pts[mi];
189050
+ const [bx, by] = pts[mi + 1];
189051
+ const dx = bx - ax;
189052
+ const dy = by - ay;
189053
+ const len2 = Math.sqrt(dx * dx + dy * dy);
189054
+ if (len2 === 0)
189055
+ return;
189056
+ const perp = pickBelowPerp(dx / len2, dy / len2);
189057
+ const angle2 = readableAngle(Math.atan2(dy, dx) * 180 / Math.PI);
189058
+ measureLayers.push(new TextLayer({
189059
+ ...base2,
189060
+ id: `annotation-measure-${shape2.uid}`,
189061
+ data: [{ position: [(ax + bx) / 2, (ay + by) / 2], text: label2 }],
189062
+ getAngle: -angle2,
189063
+ getTextAnchor: "middle",
189064
+ getAlignmentBaseline: "center",
189065
+ getPixelOffset: [perp[0] * 16, perp[1] * 16]
189066
+ }));
189067
+ } else if (shape2.type === "rectangle") {
189068
+ const x02 = shape2.x ?? 0;
189069
+ const y02 = shape2.y ?? 0;
189070
+ const w2 = shape2.width ?? 0;
189071
+ const h2 = shape2.height ?? 0;
189072
+ const rx = x02 + (w2 >= 0 ? w2 : 0);
189073
+ const ry = y02 + (h2 >= 0 ? h2 : 0);
189074
+ measureLayers.push(new TextLayer({
189075
+ ...base2,
189076
+ id: `annotation-measure-${shape2.uid}`,
189077
+ data: [{ position: [rx, ry], text: label2 }],
189078
+ getTextAnchor: "end",
189079
+ getAlignmentBaseline: "bottom",
189080
+ getPixelOffset: [-6, -6]
189081
+ }));
189082
+ } else if (shape2.type === "ellipse") {
189083
+ const cx = shape2.x1 ?? 0;
189084
+ const cy = shape2.y1 ?? 0;
189085
+ const ry = Math.abs(shape2.radiusY ?? 0);
189086
+ measureLayers.push(new TextLayer({
189087
+ ...base2,
189088
+ id: `annotation-measure-${shape2.uid}`,
189089
+ data: [{ position: [cx, cy + ry], text: label2 }],
189090
+ getTextAnchor: "middle",
189091
+ getAlignmentBaseline: "top",
189092
+ getPixelOffset: [0, 8]
189093
+ }));
189094
+ } else if (shape2.type === "polygon" && shape2.points?.length >= 3) {
189095
+ const xs = shape2.points.map((p) => p[0]);
189096
+ const ys = shape2.points.map((p) => p[1]);
189097
+ const cx = (Math.min(...xs) + Math.max(...xs)) / 2;
189098
+ const maxY2 = Math.max(...ys);
189099
+ measureLayers.push(new TextLayer({
189100
+ ...base2,
189101
+ id: `annotation-measure-${shape2.uid}`,
189102
+ data: [{ position: [cx, maxY2], text: label2 }],
189103
+ getTextAnchor: "middle",
189104
+ getAlignmentBaseline: "top",
189105
+ getPixelOffset: [0, 8]
189106
+ }));
189107
+ }
189108
+ });
189109
+ return [...selectionLayers, ...layers, ...measureLayers];
189110
+ }
189111
+ const defaultProps = {
189112
+ // Array of annotation shape objects (see annotationShapeObj in @vitessce/schemas).
189113
+ data: { type: "object", value: [], compare: true },
189114
+ // UID of the shape to highlight with a selection halo.
189115
+ selectedShapeUid: { type: "string", value: null },
189116
+ // { x, y, unit } used to format measurement labels in physical units.
189117
+ physicalPixelSize: { type: "object", value: null, compare: true },
189118
+ // The zoom level at which the shapes were authored (reference for semantic zoom).
189119
+ authoredZoom: { type: "number", value: null },
189120
+ // Whether to apply semantic zoom (level-of-detail) based on authoredZoom.
189121
+ semanticZoom: { type: "boolean", value: true },
189122
+ // The view type in which the layer is rendered (affects measurement label formatting).
189123
+ viewType: { type: "string", value: ViewType$1.SPATIAL },
189124
+ // In-progress shape being drawn, as { type, vertices }.
189125
+ inProgressShape: { type: "object", value: null, compare: true },
189126
+ // Current mouse position (in data coordinates) while drawing.
189127
+ hoverCoord: { type: "array", value: null, compare: true },
189128
+ // Stroke color [r, g, b] of the in-progress shape preview.
189129
+ previewStrokeColor: { type: "color", value: [255, 255, 0] }
189130
+ };
189131
+ class AnnotationLayer extends CompositeLayer {
189132
+ // The semantic zoom and arrowhead sizes depend on the current zoom level,
189133
+ // so the sublayers must also be re-rendered when the viewport changes.
189134
+ // eslint-disable-next-line class-methods-use-this
189135
+ shouldUpdateState({ changeFlags }) {
189136
+ return changeFlags.propsOrDataChanged || changeFlags.viewportChanged;
189137
+ }
189138
+ /**
189139
+ * Prefix the sublayer ID with this layer's ID (so that multiple
189140
+ * AnnotationLayers can co-exist), and combine this layer's
189141
+ * opacity with the per-shape opacity of the sublayer.
189142
+ * Note: we avoid getSubLayerProps here, since it would
189143
+ * overwrite the sublayer extensions (e.g., PathStyleExtension)
189144
+ * and opacity values.
189145
+ * @param {object} layer A DeckGL layer instance.
189146
+ * @returns {object} The cloned layer instance.
189147
+ */
189148
+ wrapSubLayer(layer) {
189149
+ const { id: id2, opacity: opacity2, pickable, visible } = this.props;
189150
+ return layer.clone({
189151
+ id: `${id2}-${layer.id}`,
189152
+ opacity: layer.props.opacity * opacity2,
189153
+ pickable,
189154
+ visible
189155
+ });
189156
+ }
189157
+ renderLayers() {
189158
+ const { data: data2, selectedShapeUid, physicalPixelSize, authoredZoom, semanticZoom, viewType, inProgressShape, hoverCoord, previewStrokeColor } = this.props;
189159
+ const zoom2 = this.context.viewport?.zoom ?? 0;
189160
+ const visibleShapes = (data2 ?? []).filter((shape2) => shape2.visible !== false);
189161
+ const annotationLayers = createAnnotationLayers(visibleShapes, zoom2, selectedShapeUid, physicalPixelSize, authoredZoom, semanticZoom, viewType);
189162
+ const previewLayer = createPreviewLayer(inProgressShape, hoverCoord, previewStrokeColor.slice(0, 3));
189163
+ return [
189164
+ ...annotationLayers,
189165
+ ...previewLayer ? [previewLayer] : []
189166
+ ].map((layer) => this.wrapSubLayer(layer));
189167
+ }
189168
+ }
189169
+ AnnotationLayer.layerName = "AnnotationLayer";
189170
+ AnnotationLayer.defaultProps = defaultProps;
187155
189171
  const FEATURE_AGGREGATION_STRATEGIES = ["first", "last", "sum", "mean"];
187156
189172
  function CellSetExpressionPlotOptions(props) {
187157
189173
  const {
@@ -245829,7 +247845,7 @@ function VolcanoPlot(props) {
245829
247845
  return [null, null];
245830
247846
  }
245831
247847
  let xExtentResult = extent$2(
245832
- computedData.flatMap((d) => extent$2(d.df.logFoldChange))
247848
+ computedData.flatMap((d) => extent$2(d.df.logFoldChange.filter((v) => Number.isFinite(v))))
245833
247849
  );
245834
247850
  const xAbsMax = Math.max(Math.abs(xExtentResult[0]), Math.abs(xExtentResult[1]));
245835
247851
  xExtentResult = [-xAbsMax, xAbsMax];
@@ -245874,7 +247890,8 @@ function VolcanoPlot(props) {
245874
247890
  const g2 = svg.append("g");
245875
247891
  filteredData.forEach((comparisonObject) => {
245876
247892
  const obsSetG = g2.append("g");
245877
- const { df: filteredDf, metadata: metadata2 } = comparisonObject;
247893
+ const { df: rawFilteredDf, metadata: metadata2 } = comparisonObject;
247894
+ const filteredDf = rawFilteredDf.filter((d) => !Number.isNaN(d.minusLog10p) && !Number.isNaN(d.logFoldChange));
245878
247895
  const coordinationValues = metadata2.coordination_values;
245879
247896
  const rawObsSetPath = coordinationValues.obsSetFilter ? coordinationValues.obsSetFilter[0] : coordinationValues.obsSetSelection[0];
245880
247897
  const obsSetPath = [...rawObsSetPath];
@@ -245977,7 +247994,7 @@ function VolcanoPlotOptions(props) {
245977
247994
  valueLabelDisplay: "auto",
245978
247995
  step: 1,
245979
247996
  min: 0,
245980
- max: 100
247997
+ max: 50
245981
247998
  }
245982
247999
  ))), /* @__PURE__ */ React__default.createElement(TableRow, null, /* @__PURE__ */ React__default.createElement(TableCell, { className: classes2.labelCell, variant: "head", scope: "row" }, /* @__PURE__ */ React__default.createElement(
245983
248000
  "label",
@@ -245999,7 +248016,7 @@ function VolcanoPlotOptions(props) {
245999
248016
  valueLabelDisplay: "auto",
246000
248017
  step: 0.5,
246001
248018
  min: 0,
246002
- max: 50
248019
+ max: 10
246003
248020
  }
246004
248021
  ))), /* @__PURE__ */ React__default.createElement(TableRow, null, /* @__PURE__ */ React__default.createElement(TableCell, { className: classes2.labelCell, variant: "head", scope: "row" }, /* @__PURE__ */ React__default.createElement(
246005
248022
  "label",
@@ -246144,6 +248161,9 @@ function VolcanoPlotSubscriber(props) {
246144
248161
  const onFeatureClick = useCallback((featureId2) => {
246145
248162
  setFeatureSelection([featureId2]);
246146
248163
  }, [setFeatureSelection]);
248164
+ const anyNonEmpty = useMemo(() => featureStats?.some(
248165
+ (d) => !d.metadata?.analysis_params?.is_empty
248166
+ ), [featureStats]);
246147
248167
  return /* @__PURE__ */ React__default.createElement(
246148
248168
  TitleInfo,
246149
248169
  {
@@ -246169,7 +248189,7 @@ function VolcanoPlotSubscriber(props) {
246169
248189
  }
246170
248190
  )
246171
248191
  },
246172
- /* @__PURE__ */ React__default.createElement("div", { ref: containerRef, className: classes2.vegaContainer }, featureStats ? /* @__PURE__ */ React__default.createElement(
248192
+ /* @__PURE__ */ React__default.createElement("div", { ref: containerRef, className: classes2.vegaContainer }, featureStats ? anyNonEmpty ? /* @__PURE__ */ React__default.createElement(
246173
248193
  VolcanoPlot,
246174
248194
  {
246175
248195
  theme,
@@ -246192,7 +248212,7 @@ function VolcanoPlotSubscriber(props) {
246192
248212
  featureLabelSignificanceThreshold,
246193
248213
  featureLabelFoldChangeThreshold
246194
248214
  }
246195
- ) : /* @__PURE__ */ React__default.createElement("span", null, "Select at least one ", obsType, " set."))
248215
+ ) : /* @__PURE__ */ React__default.createElement("span", null, "Differential expression tests were not performed for the currently selected groups due to insufficient data.") : /* @__PURE__ */ React__default.createElement("span", null, "Select at least one ", obsType, " set."))
246196
248216
  );
246197
248217
  }
246198
248218
  const MAX_BAR_SIZE = 40;
@@ -246257,6 +248277,7 @@ function CellSetCompositionBarPlot(props) {
246257
248277
  interceptExpectedSample: df.interceptExpectedSample[i2],
246258
248278
  effectExpectedSample: df.effectExpectedSample[i2],
246259
248279
  isCredibleEffect: df.isCredibleEffect[i2],
248280
+ significanceText: df.isCredibleEffect[i2] ? " " : "NS",
246260
248281
  // Boolean flag for wasReferenceObsSet (check metadata)
246261
248282
  isReferenceSet: obsSetId === referenceCellType
246262
248283
  };
@@ -246301,68 +248322,103 @@ function CellSetCompositionBarPlot(props) {
246301
248322
  }
246302
248323
  return void 0;
246303
248324
  }, [computedData]);
248325
+ const nsTextAlign = useMemo(() => {
248326
+ if (computedData) {
248327
+ const firstNotSig = computedData.find((d) => !d.isCredibleEffect);
248328
+ return firstNotSig?.logFoldChange < 0 ? "right" : "left";
248329
+ }
248330
+ return "center";
248331
+ }, [computedData]);
248332
+ const areAnySignificant = useMemo(() => computedData?.some(
248333
+ (d) => d.isCredibleEffect
248334
+ ), [computedData]);
246304
248335
  const xScale = {
246305
248336
  domain: xExtent
246306
248337
  };
246307
248338
  const spec = {
246308
- mark: { type: "bar", stroke: "black", cursor: "pointer" },
246309
- params: [
248339
+ layer: [
246310
248340
  {
246311
- name: "bar_select",
246312
- select: {
246313
- type: "point",
246314
- on: "click[event.shiftKey === false]",
246315
- fields: ["obsSetPath"],
246316
- empty: "none"
248341
+ params: [
248342
+ {
248343
+ name: "bar_select",
248344
+ select: {
248345
+ type: "point",
248346
+ on: "click[event.shiftKey === false]",
248347
+ fields: ["obsSetPath"],
248348
+ empty: "none"
248349
+ }
248350
+ },
248351
+ {
248352
+ name: "shift_bar_select",
248353
+ select: {
248354
+ type: "point",
248355
+ on: "click[event.shiftKey]",
248356
+ fields: ["obsSetPath"],
248357
+ empty: "none"
248358
+ }
248359
+ }
248360
+ ],
248361
+ mark: { type: "bar", stroke: "black", cursor: "pointer" },
248362
+ encoding: {
248363
+ y: {
248364
+ field: "keyName",
248365
+ type: "nominal",
248366
+ axis: { labelExpr: `substring(datum.label, ${keyLength})` },
248367
+ title: `${captializedObsType} Set`,
248368
+ sort: keys2
248369
+ },
248370
+ x: {
248371
+ // TODO: support using intercept+effect here based on user-selected options?
248372
+ field: "logFoldChange",
248373
+ type: "quantitative",
248374
+ title: "Log fold-change",
248375
+ scale: xScale
248376
+ },
248377
+ color: {
248378
+ field: "key",
248379
+ type: "nominal",
248380
+ scale: colorScale2,
248381
+ legend: null
248382
+ },
248383
+ fillOpacity: {
248384
+ field: "isCredibleEffect",
248385
+ type: "nominal",
248386
+ scale: opacityScale
248387
+ },
248388
+ strokeWidth: {
248389
+ field: "isReferenceSet",
248390
+ type: "nominal",
248391
+ scale: strokeWidthScale,
248392
+ legend: null
248393
+ },
248394
+ tooltip: {
248395
+ field: "effectExpectedSample",
248396
+ type: "quantitative"
248397
+ }
246317
248398
  }
246318
248399
  },
246319
248400
  {
246320
- name: "shift_bar_select",
246321
- select: {
246322
- type: "point",
246323
- on: "click[event.shiftKey]",
246324
- fields: ["obsSetPath"],
246325
- empty: "none"
248401
+ mark: { type: "text", align: nsTextAlign, dx: nsTextAlign === "right" ? -5 : 5 },
248402
+ encoding: {
248403
+ y: {
248404
+ field: "keyName",
248405
+ type: "nominal",
248406
+ axis: { labelExpr: `substring(datum.label, ${keyLength})` },
248407
+ title: `${captializedObsType} Set`,
248408
+ sort: keys2
248409
+ },
248410
+ x: {
248411
+ field: "logFoldChange",
248412
+ type: "quantitative",
248413
+ title: "Log fold-change",
248414
+ scale: xScale
248415
+ },
248416
+ text: {
248417
+ field: "significanceText"
248418
+ }
246326
248419
  }
246327
248420
  }
246328
248421
  ],
246329
- encoding: {
246330
- y: {
246331
- field: "keyName",
246332
- type: "nominal",
246333
- axis: { labelExpr: `substring(datum.label, ${keyLength})` },
246334
- title: `${captializedObsType} Set`,
246335
- sort: keys2
246336
- },
246337
- x: {
246338
- // TODO: support using intercept+effect here based on user-selected options?
246339
- field: "logFoldChange",
246340
- type: "quantitative",
246341
- title: "Log fold-change",
246342
- scale: xScale
246343
- },
246344
- color: {
246345
- field: "key",
246346
- type: "nominal",
246347
- scale: colorScale2,
246348
- legend: null
246349
- },
246350
- fillOpacity: {
246351
- field: "isCredibleEffect",
246352
- type: "nominal",
246353
- scale: opacityScale
246354
- },
246355
- strokeWidth: {
246356
- field: "isReferenceSet",
246357
- type: "nominal",
246358
- scale: strokeWidthScale,
246359
- legend: null
246360
- },
246361
- tooltip: {
246362
- field: "effectExpectedSample",
246363
- type: "quantitative"
246364
- }
246365
- },
246366
248422
  // TODO: for width, also subtract length of longest y-axis set name label.
246367
248423
  width: clamp$6(width2 - marginRight, 10, Infinity),
246368
248424
  height: clamp$6(height2 - marginBottom, 10, Infinity),
@@ -246382,7 +248438,7 @@ function CellSetCompositionBarPlot(props) {
246382
248438
  interceptExpectedSample: item.datum.interceptExpectedSample,
246383
248439
  effectExpectedSample: item.datum.effectExpectedSample
246384
248440
  }), [captializedObsType]);
246385
- return /* @__PURE__ */ React__default.createElement(
248441
+ return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, areAnySignificant ? /* @__PURE__ */ React__default.createElement(
246386
248442
  VegaPlot,
246387
248443
  {
246388
248444
  data: computedData,
@@ -246390,7 +248446,7 @@ function CellSetCompositionBarPlot(props) {
246390
248446
  signalListeners,
246391
248447
  getTooltipText
246392
248448
  }
246393
- );
248449
+ ) : /* @__PURE__ */ React__default.createElement("p", null, "No results were significant for the selected conditions."));
246394
248450
  }
246395
248451
  function CellSetCompositionBarPlotSubscriber(props) {
246396
248452
  const {
@@ -247062,12 +249118,127 @@ function FeatureStatsTableSubscriber(props) {
247062
249118
  ) : /* @__PURE__ */ React__default.createElement("p", { style: { padding: "12px" } }, "Select at least one ", obsType, " set.")
247063
249119
  );
247064
249120
  }
249121
+ function pathToKey(pathArr) {
249122
+ return pathArr.join("___");
249123
+ }
249124
+ function keyToPath(keyStr) {
249125
+ return keyStr.split("___");
249126
+ }
249127
+ function SingleCellSetSelector(props) {
249128
+ const {
249129
+ multiObsSetSelection,
249130
+ singleObsSetSelection,
249131
+ setSingleObsSetSelection
249132
+ } = props;
249133
+ const handleChange = useCallback((event2) => {
249134
+ if (event2.target.value === "__none__") {
249135
+ setSingleObsSetSelection(null);
249136
+ } else {
249137
+ const nextPath = keyToPath(event2.target.value);
249138
+ setSingleObsSetSelection([
249139
+ nextPath
249140
+ ]);
249141
+ }
249142
+ }, []);
249143
+ const hasMultiOptions = Array.isArray(multiObsSetSelection) && multiObsSetSelection.length > 0;
249144
+ return /* @__PURE__ */ React__default.createElement(Grid, { container: true, size: 12 }, /* @__PURE__ */ React__default.createElement(
249145
+ NativeSelect,
249146
+ {
249147
+ onChange: handleChange,
249148
+ value: singleObsSetSelection ? pathToKey(singleObsSetSelection) : "__none__",
249149
+ variant: "standard",
249150
+ sx: { width: "100%" }
249151
+ },
249152
+ /* @__PURE__ */ React__default.createElement("option", { value: "__none__" }, "None"),
249153
+ hasMultiOptions ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, multiObsSetSelection.map((o2) => /* @__PURE__ */ React__default.createElement("option", { value: pathToKey(o2) }, o2.at(-1)))) : null
249154
+ ));
249155
+ }
249156
+ function SingleCellSetSelectorSubscriber(props) {
249157
+ const {
249158
+ title: title2 = "Cell Type of Interest",
249159
+ coordinationScopes: coordinationScopesRaw,
249160
+ removeGridComponent,
249161
+ theme,
249162
+ helpText = ViewHelpMapping.SINGLE_OBS_SET_SELECTOR
249163
+ } = props;
249164
+ useLoaders();
249165
+ const coordinationScopes = useCoordinationScopes(coordinationScopesRaw);
249166
+ const [{
249167
+ obsType,
249168
+ obsSetColor
249169
+ }, {
249170
+ setObsType,
249171
+ setObsSetColor
249172
+ }] = useCoordination(
249173
+ COMPONENT_COORDINATION_TYPES[ViewType$1.SINGLE_OBS_SET_SELECTOR],
249174
+ coordinationScopes
249175
+ );
249176
+ const obsSetSelectionScopes = useMultiCoordinationScopes(
249177
+ CoordinationType$1.OBS_SET_SELECTION,
249178
+ coordinationScopes
249179
+ );
249180
+ const [{
249181
+ obsSetSelection: multiObsSetSelection
249182
+ }, {
249183
+ setObsSetSelection: setMultiObsSetSelection
249184
+ }] = useCoordination(
249185
+ COMPONENT_COORDINATION_TYPES[ViewType$1.SINGLE_OBS_SET_SELECTOR],
249186
+ { obsSetSelection: obsSetSelectionScopes?.[0] }
249187
+ );
249188
+ const [{
249189
+ obsSetSelection: singleObsSetSelectionArr
249190
+ }, {
249191
+ setObsSetSelection: setSingleObsSetSelection
249192
+ }] = useCoordination(
249193
+ COMPONENT_COORDINATION_TYPES[ViewType$1.SINGLE_OBS_SET_SELECTOR],
249194
+ { obsSetSelection: obsSetSelectionScopes?.[1] }
249195
+ );
249196
+ const singleObsSetSelection = singleObsSetSelectionArr?.[0];
249197
+ useEffect(() => {
249198
+ if (!Array.isArray(multiObsSetSelection) || multiObsSetSelection.length === 0) {
249199
+ setSingleObsSetSelection(null);
249200
+ } else {
249201
+ const multiContainsSingle = multiObsSetSelection.some(
249202
+ (setPath) => isEqual$3(setPath, singleObsSetSelection)
249203
+ );
249204
+ if (!multiContainsSingle) {
249205
+ setSingleObsSetSelection([multiObsSetSelection?.[0]]);
249206
+ }
249207
+ }
249208
+ }, [multiObsSetSelection]);
249209
+ const errors = [];
249210
+ const isReady = useReady([]);
249211
+ return /* @__PURE__ */ React__default.createElement(
249212
+ TitleInfo,
249213
+ {
249214
+ title: title2,
249215
+ removeGridComponent,
249216
+ theme,
249217
+ isReady,
249218
+ helpText,
249219
+ errors,
249220
+ withPadding: false
249221
+ },
249222
+ Array.isArray(multiObsSetSelection) && multiObsSetSelection.length > 0 ? /* @__PURE__ */ React__default.createElement(
249223
+ SingleCellSetSelector,
249224
+ {
249225
+ theme,
249226
+ obsType,
249227
+ obsSetColor,
249228
+ multiObsSetSelection,
249229
+ singleObsSetSelection,
249230
+ setSingleObsSetSelection
249231
+ }
249232
+ ) : /* @__PURE__ */ React__default.createElement("p", { style: { padding: "12px" } }, "Select at least one ", obsType, " set.")
249233
+ );
249234
+ }
247065
249235
  export {
247066
249236
  BaseDecoder as B,
247067
249237
  CellSetExpressionPlotSubscriber as C,
247068
249238
  DotPlotSubscriber as D,
247069
249239
  ExpressionHistogramSubscriber as E,
247070
249240
  FeatureBarPlotSubscriber as F,
249241
+ SingleCellSetSelectorSubscriber as S,
247071
249242
  TreemapSubscriber as T,
247072
249243
  VolcanoPlotSubscriber as V,
247073
249244
  CellSetSizesPlotSubscriber as a,