@eclass/ui-kit 1.50.1 → 1.51.1

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.
@@ -1,5 +1,6 @@
1
1
  import * as React from "react";
2
2
  import React__default, { forwardRef as forwardRef$1, useContext, createContext as createContext$1, createElement, useRef, useLayoutEffect, useState, useMemo, Fragment as Fragment$1, useEffect, useCallback, cloneElement, Children, isValidElement, PureComponent } from "react";
3
+ var isDevelopment$1 = false;
3
4
  function sheetForTag(tag2) {
4
5
  if (tag2.sheet) {
5
6
  return tag2.sheet;
@@ -9,6 +10,7 @@ function sheetForTag(tag2) {
9
10
  return document.styleSheets[i2];
10
11
  }
11
12
  }
13
+ return void 0;
12
14
  }
13
15
  function createStyleElement(options) {
14
16
  var tag2 = document.createElement("style");
@@ -39,7 +41,7 @@ var StyleSheet = /* @__PURE__ */ function() {
39
41
  _this.container.insertBefore(tag2, before);
40
42
  _this.tags.push(tag2);
41
43
  };
42
- this.isSpeedy = options.speedy === void 0 ? true : options.speedy;
44
+ this.isSpeedy = options.speedy === void 0 ? !isDevelopment$1 : options.speedy;
43
45
  this.tags = [];
44
46
  this.ctr = 0;
45
47
  this.nonce = options.nonce;
@@ -71,7 +73,8 @@ var StyleSheet = /* @__PURE__ */ function() {
71
73
  };
72
74
  _proto.flush = function flush() {
73
75
  this.tags.forEach(function(tag2) {
74
- return tag2.parentNode && tag2.parentNode.removeChild(tag2);
76
+ var _tag$parentNode;
77
+ return (_tag$parentNode = tag2.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag2);
75
78
  });
76
79
  this.tags = [];
77
80
  this.ctr = 0;
@@ -477,7 +480,8 @@ var compat = function compat2(element) {
477
480
  if (element.type !== "rule" || !element.parent || element.length < 1) {
478
481
  return;
479
482
  }
480
- var value = element.value, parent = element.parent;
483
+ var value = element.value;
484
+ var parent = element.parent;
481
485
  var isImplicitRule = element.column === parent.column && element.line === parent.line;
482
486
  while (parent.type !== "rule") {
483
487
  parent = parent.parent;
@@ -726,18 +730,14 @@ var createCache = function createCache2(options) {
726
730
  return cache;
727
731
  };
728
732
  function _extends$h() {
729
- _extends$h = Object.assign ? Object.assign.bind() : function(target) {
730
- for (var i2 = 1; i2 < arguments.length; i2++) {
731
- var source = arguments[i2];
732
- for (var key in source) {
733
- if (Object.prototype.hasOwnProperty.call(source, key)) {
734
- target[key] = source[key];
735
- }
736
- }
733
+ return _extends$h = Object.assign ? Object.assign.bind() : function(n2) {
734
+ for (var e2 = 1; e2 < arguments.length; e2++) {
735
+ var t2 = arguments[e2];
736
+ for (var r2 in t2)
737
+ ({}).hasOwnProperty.call(t2, r2) && (n2[r2] = t2[r2]);
737
738
  }
738
- return target;
739
- };
740
- return _extends$h.apply(this, arguments);
739
+ return n2;
740
+ }, _extends$h.apply(null, arguments);
741
741
  }
742
742
  var weakMemoize = function weakMemoize2(func) {
743
743
  var cache = /* @__PURE__ */ new WeakMap();
@@ -877,7 +877,7 @@ function getRegisteredStyles(registered, registeredStyles, classNames2) {
877
877
  classNames2.split(" ").forEach(function(className) {
878
878
  if (registered[className] !== void 0) {
879
879
  registeredStyles.push(registered[className] + ";");
880
- } else {
880
+ } else if (className) {
881
881
  rawClassName += className + " ";
882
882
  }
883
883
  });
@@ -956,6 +956,7 @@ var unitlessKeys = {
956
956
  opacity: 1,
957
957
  order: 1,
958
958
  orphans: 1,
959
+ scale: 1,
959
960
  tabSize: 1,
960
961
  widows: 1,
961
962
  zIndex: 1,
@@ -970,6 +971,7 @@ var unitlessKeys = {
970
971
  strokeOpacity: 1,
971
972
  strokeWidth: 1
972
973
  };
974
+ var isDevelopment = false;
973
975
  var hyphenateRegex = /[A-Z]|^ms/g;
974
976
  var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
975
977
  var isCustomProperty = function isCustomProperty2(property) {
@@ -1007,24 +1009,27 @@ function handleInterpolation(mergedProps, registered, interpolation) {
1007
1009
  if (interpolation == null) {
1008
1010
  return "";
1009
1011
  }
1010
- if (interpolation.__emotion_styles !== void 0) {
1011
- return interpolation;
1012
+ var componentSelector = interpolation;
1013
+ if (componentSelector.__emotion_styles !== void 0) {
1014
+ return componentSelector;
1012
1015
  }
1013
1016
  switch (typeof interpolation) {
1014
1017
  case "boolean": {
1015
1018
  return "";
1016
1019
  }
1017
1020
  case "object": {
1018
- if (interpolation.anim === 1) {
1021
+ var keyframes3 = interpolation;
1022
+ if (keyframes3.anim === 1) {
1019
1023
  cursor = {
1020
- name: interpolation.name,
1021
- styles: interpolation.styles,
1024
+ name: keyframes3.name,
1025
+ styles: keyframes3.styles,
1022
1026
  next: cursor
1023
1027
  };
1024
- return interpolation.name;
1028
+ return keyframes3.name;
1025
1029
  }
1026
- if (interpolation.styles !== void 0) {
1027
- var next2 = interpolation.next;
1030
+ var serializedStyles = interpolation;
1031
+ if (serializedStyles.styles !== void 0) {
1032
+ var next2 = serializedStyles.next;
1028
1033
  if (next2 !== void 0) {
1029
1034
  while (next2 !== void 0) {
1030
1035
  cursor = {
@@ -1035,7 +1040,7 @@ function handleInterpolation(mergedProps, registered, interpolation) {
1035
1040
  next2 = next2.next;
1036
1041
  }
1037
1042
  }
1038
- var styles2 = interpolation.styles + ";";
1043
+ var styles2 = serializedStyles.styles + ";";
1039
1044
  return styles2;
1040
1045
  }
1041
1046
  return createStringFromObject(mergedProps, registered, interpolation);
@@ -1050,11 +1055,12 @@ function handleInterpolation(mergedProps, registered, interpolation) {
1050
1055
  break;
1051
1056
  }
1052
1057
  }
1058
+ var asString = interpolation;
1053
1059
  if (registered == null) {
1054
- return interpolation;
1060
+ return asString;
1055
1061
  }
1056
- var cached = registered[interpolation];
1057
- return cached !== void 0 ? cached : interpolation;
1062
+ var cached = registered[asString];
1063
+ return cached !== void 0 ? cached : asString;
1058
1064
  }
1059
1065
  function createStringFromObject(mergedProps, registered, obj) {
1060
1066
  var string = "";
@@ -1063,34 +1069,35 @@ function createStringFromObject(mergedProps, registered, obj) {
1063
1069
  string += handleInterpolation(mergedProps, registered, obj[i2]) + ";";
1064
1070
  }
1065
1071
  } else {
1066
- for (var _key in obj) {
1067
- var value = obj[_key];
1072
+ for (var key in obj) {
1073
+ var value = obj[key];
1068
1074
  if (typeof value !== "object") {
1069
- if (registered != null && registered[value] !== void 0) {
1070
- string += _key + "{" + registered[value] + "}";
1071
- } else if (isProcessableValue(value)) {
1072
- string += processStyleName(_key) + ":" + processStyleValue(_key, value) + ";";
1075
+ var asString = value;
1076
+ if (registered != null && registered[asString] !== void 0) {
1077
+ string += key + "{" + registered[asString] + "}";
1078
+ } else if (isProcessableValue(asString)) {
1079
+ string += processStyleName(key) + ":" + processStyleValue(key, asString) + ";";
1073
1080
  }
1074
1081
  } else {
1075
- if (_key === "NO_COMPONENT_SELECTOR" && false) {
1082
+ if (key === "NO_COMPONENT_SELECTOR" && isDevelopment) {
1076
1083
  throw new Error(noComponentSelectorMessage);
1077
1084
  }
1078
1085
  if (Array.isArray(value) && typeof value[0] === "string" && (registered == null || registered[value[0]] === void 0)) {
1079
1086
  for (var _i = 0; _i < value.length; _i++) {
1080
1087
  if (isProcessableValue(value[_i])) {
1081
- string += processStyleName(_key) + ":" + processStyleValue(_key, value[_i]) + ";";
1088
+ string += processStyleName(key) + ":" + processStyleValue(key, value[_i]) + ";";
1082
1089
  }
1083
1090
  }
1084
1091
  } else {
1085
1092
  var interpolated = handleInterpolation(mergedProps, registered, value);
1086
- switch (_key) {
1093
+ switch (key) {
1087
1094
  case "animation":
1088
1095
  case "animationName": {
1089
- string += processStyleName(_key) + ":" + interpolated + ";";
1096
+ string += processStyleName(key) + ":" + interpolated + ";";
1090
1097
  break;
1091
1098
  }
1092
1099
  default: {
1093
- string += _key + "{" + interpolated + "}";
1100
+ string += key + "{" + interpolated + "}";
1094
1101
  }
1095
1102
  }
1096
1103
  }
@@ -1099,9 +1106,9 @@ function createStringFromObject(mergedProps, registered, obj) {
1099
1106
  }
1100
1107
  return string;
1101
1108
  }
1102
- var labelPattern = /label:\s*([^\s;\n{]+)\s*(;|$)/g;
1109
+ var labelPattern = /label:\s*([^\s;{]+)\s*(;|$)/g;
1103
1110
  var cursor;
1104
- var serializeStyles = function serializeStyles2(args, registered, mergedProps) {
1111
+ function serializeStyles(args, registered, mergedProps) {
1105
1112
  if (args.length === 1 && typeof args[0] === "object" && args[0] !== null && args[0].styles !== void 0) {
1106
1113
  return args[0];
1107
1114
  }
@@ -1113,12 +1120,14 @@ var serializeStyles = function serializeStyles2(args, registered, mergedProps) {
1113
1120
  stringMode = false;
1114
1121
  styles2 += handleInterpolation(mergedProps, registered, strings);
1115
1122
  } else {
1116
- styles2 += strings[0];
1123
+ var asTemplateStringsArr = strings;
1124
+ styles2 += asTemplateStringsArr[0];
1117
1125
  }
1118
1126
  for (var i2 = 1; i2 < args.length; i2++) {
1119
1127
  styles2 += handleInterpolation(mergedProps, registered, args[i2]);
1120
1128
  if (stringMode) {
1121
- styles2 += strings[i2];
1129
+ var templateStringsArr = strings;
1130
+ styles2 += templateStringsArr[i2];
1122
1131
  }
1123
1132
  }
1124
1133
  labelPattern.lastIndex = 0;
@@ -1133,7 +1142,7 @@ var serializeStyles = function serializeStyles2(args, registered, mergedProps) {
1133
1142
  styles: styles2,
1134
1143
  next: cursor
1135
1144
  };
1136
- };
1145
+ }
1137
1146
  var EmotionCacheContext = /* @__PURE__ */ createContext$1(
1138
1147
  typeof HTMLElement !== "undefined" ? /* @__PURE__ */ createCache({
1139
1148
  key: "css"
@@ -11557,7 +11566,7 @@ var reactFastCompare = function isEqual(a2, b2) {
11557
11566
  throw error;
11558
11567
  }
11559
11568
  };
11560
- var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;
11569
+ var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;
11561
11570
  var isPropValid = /* @__PURE__ */ memoize$1(
11562
11571
  function(prop2) {
11563
11572
  return reactPropsRegex.test(prop2) || prop2.charCodeAt(0) === 111 && prop2.charCodeAt(1) === 110 && prop2.charCodeAt(2) < 91;
@@ -16808,7 +16817,7 @@ function useVisualElementContext() {
16808
16817
  }
16809
16818
  var PresenceContext = createContext$1(null);
16810
16819
  var isBrowser = typeof window !== "undefined";
16811
- var useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect;
16820
+ var useIsomorphicLayoutEffect$1 = isBrowser ? useLayoutEffect : useEffect;
16812
16821
  var prefersReducedMotion = { current: null };
16813
16822
  var hasDetected = false;
16814
16823
  function initPrefersReducedMotion() {
@@ -16861,14 +16870,14 @@ function useVisualElement(Component, visualState, props, createVisualElement) {
16861
16870
  });
16862
16871
  }
16863
16872
  var visualElement2 = visualElementRef.current;
16864
- useIsomorphicLayoutEffect(function() {
16873
+ useIsomorphicLayoutEffect$1(function() {
16865
16874
  visualElement2 === null || visualElement2 === void 0 ? void 0 : visualElement2.syncRender();
16866
16875
  });
16867
16876
  useEffect(function() {
16868
16877
  var _a;
16869
16878
  (_a = visualElement2 === null || visualElement2 === void 0 ? void 0 : visualElement2.animationState) === null || _a === void 0 ? void 0 : _a.animateChanges();
16870
16879
  });
16871
- useIsomorphicLayoutEffect(function() {
16880
+ useIsomorphicLayoutEffect$1(function() {
16872
16881
  return function() {
16873
16882
  return visualElement2 === null || visualElement2 === void 0 ? void 0 : visualElement2.notifyUnmount();
16874
16883
  };
@@ -22720,7 +22729,7 @@ var motion = /* @__PURE__ */ createMotionProxy(function(Component, config2) {
22720
22729
  });
22721
22730
  function useIsMounted() {
22722
22731
  var isMounted = useRef(false);
22723
- useIsomorphicLayoutEffect(function() {
22732
+ useIsomorphicLayoutEffect$1(function() {
22724
22733
  isMounted.current = true;
22725
22734
  return function() {
22726
22735
  isMounted.current = false;
@@ -22825,7 +22834,7 @@ var AnimatePresence = function(_a) {
22825
22834
  var presentChildren = useRef(childrenToRender);
22826
22835
  var allChildren = useRef(/* @__PURE__ */ new Map()).current;
22827
22836
  var isInitialRender = useRef(true);
22828
- useIsomorphicLayoutEffect(function() {
22837
+ useIsomorphicLayoutEffect$1(function() {
22829
22838
  isInitialRender.current = false;
22830
22839
  updateChildLookup(filteredChildren, allChildren);
22831
22840
  presentChildren.current = childrenToRender;
@@ -25732,19 +25741,17 @@ function getArrowStyle2(props) {
25732
25741
  }
25733
25742
  return computedStyle;
25734
25743
  }
25735
- function _objectWithoutPropertiesLoose$3(source, excluded) {
25736
- if (source == null)
25744
+ function _objectWithoutPropertiesLoose$3(r2, e2) {
25745
+ if (null == r2)
25737
25746
  return {};
25738
- var target = {};
25739
- var sourceKeys = Object.keys(source);
25740
- var key, i2;
25741
- for (i2 = 0; i2 < sourceKeys.length; i2++) {
25742
- key = sourceKeys[i2];
25743
- if (excluded.indexOf(key) >= 0)
25744
- continue;
25745
- target[key] = source[key];
25746
- }
25747
- return target;
25747
+ var t2 = {};
25748
+ for (var n2 in r2)
25749
+ if ({}.hasOwnProperty.call(r2, n2)) {
25750
+ if (-1 !== e2.indexOf(n2))
25751
+ continue;
25752
+ t2[n2] = r2[n2];
25753
+ }
25754
+ return t2;
25748
25755
  }
25749
25756
  var propTypes = { exports: {} };
25750
25757
  var ReactPropTypesSecret$1 = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
@@ -25834,6 +25841,7 @@ function useCallbackRef(initialValue, callback) {
25834
25841
  ref.callback = callback;
25835
25842
  return ref.facade;
25836
25843
  }
25844
+ var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React.useLayoutEffect : React.useEffect;
25837
25845
  var currentValues = /* @__PURE__ */ new WeakMap();
25838
25846
  function useMergeRefs(refs, defaultValue) {
25839
25847
  var callbackRef = useCallbackRef(defaultValue || null, function(newValue) {
@@ -25841,7 +25849,7 @@ function useMergeRefs(refs, defaultValue) {
25841
25849
  return assignRef(ref, newValue);
25842
25850
  });
25843
25851
  });
25844
- React.useLayoutEffect(function() {
25852
+ useIsomorphicLayoutEffect(function() {
25845
25853
  var oldValue = currentValues.get(callbackRef);
25846
25854
  if (oldValue) {
25847
25855
  var prevRefs_1 = new Set(oldValue);
@@ -26101,17 +26109,13 @@ FocusLock$2.defaultProps = {
26101
26109
  onDeactivation: void 0
26102
26110
  };
26103
26111
  var FocusLockUI2 = FocusLock$2;
26104
- function _setPrototypeOf(o2, p2) {
26105
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o3, p3) {
26106
- o3.__proto__ = p3;
26107
- return o3;
26108
- };
26109
- return _setPrototypeOf(o2, p2);
26112
+ function _setPrototypeOf(t2, e2) {
26113
+ return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t3, e3) {
26114
+ return t3.__proto__ = e3, t3;
26115
+ }, _setPrototypeOf(t2, e2);
26110
26116
  }
26111
- function _inheritsLoose(subClass, superClass) {
26112
- subClass.prototype = Object.create(superClass.prototype);
26113
- subClass.prototype.constructor = subClass;
26114
- _setPrototypeOf(subClass, superClass);
26117
+ function _inheritsLoose(t2, o2) {
26118
+ t2.prototype = Object.create(o2.prototype), t2.prototype.constructor = t2, _setPrototypeOf(t2, o2);
26115
26119
  }
26116
26120
  function _typeof(o2) {
26117
26121
  "@babel/helpers - typeof";
@@ -26135,21 +26139,15 @@ function toPrimitive(t2, r2) {
26135
26139
  }
26136
26140
  function toPropertyKey(t2) {
26137
26141
  var i2 = toPrimitive(t2, "string");
26138
- return "symbol" == _typeof(i2) ? i2 : String(i2);
26139
- }
26140
- function _defineProperty(obj, key, value) {
26141
- key = toPropertyKey(key);
26142
- if (key in obj) {
26143
- Object.defineProperty(obj, key, {
26144
- value,
26145
- enumerable: true,
26146
- configurable: true,
26147
- writable: true
26148
- });
26149
- } else {
26150
- obj[key] = value;
26151
- }
26152
- return obj;
26142
+ return "symbol" == _typeof(i2) ? i2 : i2 + "";
26143
+ }
26144
+ function _defineProperty(e2, r2, t2) {
26145
+ return (r2 = toPropertyKey(r2)) in e2 ? Object.defineProperty(e2, r2, {
26146
+ value: t2,
26147
+ enumerable: true,
26148
+ configurable: true,
26149
+ writable: true
26150
+ }) : e2[r2] = t2, e2;
26153
26151
  }
26154
26152
  function withSideEffect(reducePropsToState2, handleStateChangeOnClient2) {
26155
26153
  function getDisplayName(WrappedComponent) {
@@ -27011,19 +27009,38 @@ var getGapWidth = function(gapMode) {
27011
27009
  };
27012
27010
  };
27013
27011
  var Style = styleSingleton();
27012
+ var lockAttribute = "data-scroll-locked";
27014
27013
  var getStyles = function(_a, allowRelative, gapMode, important) {
27015
27014
  var left2 = _a.left, top2 = _a.top, right2 = _a.right, gap = _a.gap;
27016
27015
  if (gapMode === void 0) {
27017
27016
  gapMode = "margin";
27018
27017
  }
27019
- return "\n .".concat(noScrollbarsClassName, " {\n overflow: hidden ").concat(important, ";\n padding-right: ").concat(gap, "px ").concat(important, ";\n }\n body {\n overflow: hidden ").concat(important, ";\n overscroll-behavior: contain;\n ").concat([
27018
+ return "\n .".concat(noScrollbarsClassName, " {\n overflow: hidden ").concat(important, ";\n padding-right: ").concat(gap, "px ").concat(important, ";\n }\n body[").concat(lockAttribute, "] {\n overflow: hidden ").concat(important, ";\n overscroll-behavior: contain;\n ").concat([
27020
27019
  allowRelative && "position: relative ".concat(important, ";"),
27021
27020
  gapMode === "margin" && "\n padding-left: ".concat(left2, "px;\n padding-top: ").concat(top2, "px;\n padding-right: ").concat(right2, "px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(gap, "px ").concat(important, ";\n "),
27022
27021
  gapMode === "padding" && "padding-right: ".concat(gap, "px ").concat(important, ";")
27023
- ].filter(Boolean).join(""), "\n }\n \n .").concat(zeroRightClassName, " {\n right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " {\n margin-right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(zeroRightClassName, " .").concat(zeroRightClassName, " {\n right: 0 ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " .").concat(fullWidthClassName, " {\n margin-right: 0 ").concat(important, ";\n }\n \n body {\n ").concat(removedBarSizeVariable, ": ").concat(gap, "px;\n }\n");
27022
+ ].filter(Boolean).join(""), "\n }\n \n .").concat(zeroRightClassName, " {\n right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " {\n margin-right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(zeroRightClassName, " .").concat(zeroRightClassName, " {\n right: 0 ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " .").concat(fullWidthClassName, " {\n margin-right: 0 ").concat(important, ";\n }\n \n body[").concat(lockAttribute, "] {\n ").concat(removedBarSizeVariable, ": ").concat(gap, "px;\n }\n");
27023
+ };
27024
+ var getCurrentUseCounter = function() {
27025
+ var counter2 = parseInt(document.body.getAttribute(lockAttribute) || "0", 10);
27026
+ return isFinite(counter2) ? counter2 : 0;
27024
27027
  };
27025
- var RemoveScrollBar = function(props) {
27026
- var noRelative = props.noRelative, noImportant = props.noImportant, _a = props.gapMode, gapMode = _a === void 0 ? "margin" : _a;
27028
+ var useLockAttribute = function() {
27029
+ React.useEffect(function() {
27030
+ document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
27031
+ return function() {
27032
+ var newCounter = getCurrentUseCounter() - 1;
27033
+ if (newCounter <= 0) {
27034
+ document.body.removeAttribute(lockAttribute);
27035
+ } else {
27036
+ document.body.setAttribute(lockAttribute, newCounter.toString());
27037
+ }
27038
+ };
27039
+ }, []);
27040
+ };
27041
+ var RemoveScrollBar = function(_a) {
27042
+ var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? "margin" : _b;
27043
+ useLockAttribute();
27027
27044
  var gap = React.useMemo(function() {
27028
27045
  return getGapWidth(gapMode);
27029
27046
  }, [gapMode]);
@@ -27316,21 +27333,25 @@ var applyAttributeToOthers = function(originalTarget, parentNode, markerName, co
27316
27333
  if (elementsToKeep.has(node2)) {
27317
27334
  deep(node2);
27318
27335
  } else {
27319
- var attr = node2.getAttribute(controlAttribute);
27320
- var alreadyHidden = attr !== null && attr !== "false";
27321
- var counterValue = (counterMap.get(node2) || 0) + 1;
27322
- var markerValue = (markerCounter.get(node2) || 0) + 1;
27323
- counterMap.set(node2, counterValue);
27324
- markerCounter.set(node2, markerValue);
27325
- hiddenNodes.push(node2);
27326
- if (counterValue === 1 && alreadyHidden) {
27327
- uncontrolledNodes.set(node2, true);
27328
- }
27329
- if (markerValue === 1) {
27330
- node2.setAttribute(markerName, "true");
27331
- }
27332
- if (!alreadyHidden) {
27333
- node2.setAttribute(controlAttribute, "true");
27336
+ try {
27337
+ var attr = node2.getAttribute(controlAttribute);
27338
+ var alreadyHidden = attr !== null && attr !== "false";
27339
+ var counterValue = (counterMap.get(node2) || 0) + 1;
27340
+ var markerValue = (markerCounter.get(node2) || 0) + 1;
27341
+ counterMap.set(node2, counterValue);
27342
+ markerCounter.set(node2, markerValue);
27343
+ hiddenNodes.push(node2);
27344
+ if (counterValue === 1 && alreadyHidden) {
27345
+ uncontrolledNodes.set(node2, true);
27346
+ }
27347
+ if (markerValue === 1) {
27348
+ node2.setAttribute(markerName, "true");
27349
+ }
27350
+ if (!alreadyHidden) {
27351
+ node2.setAttribute(controlAttribute, "true");
27352
+ }
27353
+ } catch (e2) {
27354
+ console.error("aria-hidden: cannot operate on ", node2, e2);
27334
27355
  }
27335
27356
  }
27336
27357
  });
@@ -31646,7 +31667,7 @@ let e = { data: "" }, t = (t2) => "object" == typeof window ? ((t2 ? t2.querySel
31646
31667
  let r2 = "", l2 = "", a2 = "";
31647
31668
  for (let n2 in e2) {
31648
31669
  let c2 = e2[n2];
31649
- "@" == n2[0] ? "i" == n2[1] ? r2 = n2 + " " + c2 + ";" : l2 += "f" == n2[1] ? o(c2, n2) : n2 + "{" + o(c2, "k" == n2[1] ? "" : t2) + "}" : "object" == typeof c2 ? l2 += o(c2, t2 ? t2.replace(/([^,])+/g, (e3) => n2.replace(/(^:.*)|([^,])+/g, (t3) => /&/.test(t3) ? t3.replace(/&/g, e3) : e3 ? e3 + " " + t3 : t3)) : n2) : null != c2 && (n2 = /^--/.test(n2) ? n2 : n2.replace(/[A-Z]/g, "-$&").toLowerCase(), a2 += o.p ? o.p(n2, c2) : n2 + ":" + c2 + ";");
31670
+ "@" == n2[0] ? "i" == n2[1] ? r2 = n2 + " " + c2 + ";" : l2 += "f" == n2[1] ? o(c2, n2) : n2 + "{" + o(c2, "k" == n2[1] ? "" : t2) + "}" : "object" == typeof c2 ? l2 += o(c2, t2 ? t2.replace(/([^,])+/g, (e3) => n2.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g, (t3) => /&/.test(t3) ? t3.replace(/&/g, e3) : e3 ? e3 + " " + t3 : t3)) : n2) : null != c2 && (n2 = /^--/.test(n2) ? n2 : n2.replace(/[A-Z]/g, "-$&").toLowerCase(), a2 += o.p ? o.p(n2, c2) : n2 + ":" + c2 + ";");
31650
31671
  }
31651
31672
  return r2 + (t2 && a2 ? t2 + "{" + a2 + "}" : a2) + l2;
31652
31673
  }, c = {}, s = (e2) => {