@indico-data/design-system 1.0.56 → 1.0.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -129,7 +129,7 @@ const round10 = (value, exp) => {
129
129
  return decimalAdjust('round', value, exp);
130
130
  };
131
131
 
132
- const clamp = (value, min, max) => {
132
+ const clamp$1 = (value, min, max) => {
133
133
  value = value < min ? min : value;
134
134
  value = value > max ? max : value;
135
135
  return value;
@@ -142,7 +142,7 @@ const numberWithCommas$1 = (x) => {
142
142
  const MATH = {
143
143
  decimalAdjust,
144
144
  round10,
145
- clamp,
145
+ clamp: clamp$1,
146
146
  numberWithCommas: numberWithCommas$1,
147
147
  };
148
148
 
@@ -1774,7 +1774,7 @@ var classnames = {exports: {}};
1774
1774
  } (classnames));
1775
1775
 
1776
1776
  var classnamesExports = classnames.exports;
1777
- var classNames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
1777
+ var y = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
1778
1778
 
1779
1779
  const StyledSection = styled__default.default.article `
1780
1780
  position: relative;
@@ -1785,7 +1785,7 @@ const StyledSection = styled__default.default.article `
1785
1785
 
1786
1786
  const Section = (props) => {
1787
1787
  const { className, style = {}, children, id } = props, restOfProps = __rest$1(props, ["className", "style", "children", "id"]);
1788
- return (jsxRuntime$1.jsx(StyledSection, Object.assign({ className: classNames('Section', className), "data-cy": props['data-cy'], id: id, style: style }, restOfProps, { children: children })));
1788
+ return (jsxRuntime$1.jsx(StyledSection, Object.assign({ className: y('Section', className), "data-cy": props['data-cy'], id: id, style: style }, restOfProps, { children: children })));
1789
1789
  };
1790
1790
 
1791
1791
  const StyledSectionBlock = styled__default.default.div `
@@ -1802,7 +1802,7 @@ const StyledSectionBlock = styled__default.default.div `
1802
1802
 
1803
1803
  const SectionBlock = (props) => {
1804
1804
  const { title, className, children, id, style = {} } = props, restOfProps = __rest$1(props, ["title", "className", "children", "id", "style"]);
1805
- return (jsxRuntime$1.jsxs(StyledSectionBlock, Object.assign({ className: classNames('SectionBlock', className), "data-cy": props['data-cy'], id: id, style: style }, restOfProps, { children: [title ? (jsxRuntime$1.jsx("header", { children: jsxRuntime$1.jsx("h3", { children: title }) })) : null, children, jsxRuntime$1.jsx("hr", { className: "section-bottom-border" })] })));
1805
+ return (jsxRuntime$1.jsxs(StyledSectionBlock, Object.assign({ className: y('SectionBlock', className), "data-cy": props['data-cy'], id: id, style: style }, restOfProps, { children: [title ? (jsxRuntime$1.jsx("header", { children: jsxRuntime$1.jsx("h3", { children: title }) })) : null, children, jsxRuntime$1.jsx("hr", { className: "section-bottom-border" })] })));
1806
1806
  };
1807
1807
 
1808
1808
  const sectionSidePadding = '19px';
@@ -1821,7 +1821,7 @@ const StyledSectionBody = styled__default.default.div `
1821
1821
 
1822
1822
  const SectionBody = (props) => {
1823
1823
  const { className, style = {}, children, id } = props, restOfProps = __rest$1(props, ["className", "style", "children", "id"]);
1824
- return (jsxRuntime$1.jsx(StyledSectionBody, Object.assign({ className: classNames('SectionBody', className), "data-cy": props['data-cy'], id: id, style: style }, restOfProps, { children: children })));
1824
+ return (jsxRuntime$1.jsx(StyledSectionBody, Object.assign({ className: y('SectionBody', className), "data-cy": props['data-cy'], id: id, style: style }, restOfProps, { children: children })));
1825
1825
  };
1826
1826
 
1827
1827
  const StyledSectionHeader = styled__default.default.header `
@@ -1830,7 +1830,7 @@ const StyledSectionHeader = styled__default.default.header `
1830
1830
 
1831
1831
  const SectionHeader = (props) => {
1832
1832
  const { className, style, children, id } = props, restOfProps = __rest$1(props, ["className", "style", "children", "id"]);
1833
- return (jsxRuntime$1.jsx(StyledSectionHeader, Object.assign({ className: classNames('SectionHeader', className), "data-cy": props['data-cy'], id: id, style: style }, restOfProps, { children: children })));
1833
+ return (jsxRuntime$1.jsx(StyledSectionHeader, Object.assign({ className: y('SectionHeader', className), "data-cy": props['data-cy'], id: id, style: style }, restOfProps, { children: children })));
1834
1834
  };
1835
1835
  SectionHeader.defaultProps = {
1836
1836
  className: '',
@@ -1974,7 +1974,7 @@ const StyledValidationError = styled__default.default.div `
1974
1974
  const BorderSelect = (props) => {
1975
1975
  const { className = '', disabled, horizontal, id, initialText, label, onChange, options, style = {}, value, validationErrors, } = props;
1976
1976
  const selectId = v4();
1977
- return (jsxRuntime$1.jsxs(StyledSelect$1, { className: classNames('Select', { horizontal }, className), "data-cy": props['data-cy'], id: id, style: style, children: [label && jsxRuntime$1.jsx("label", { htmlFor: selectId, children: label }), jsxRuntime$1.jsxs("div", { className: "select-container", children: [jsxRuntime$1.jsxs("select", { onChange: onChange, value: value, disabled: disabled, id: selectId, children: [initialText && (jsxRuntime$1.jsx("option", { disabled: true, value: "", children: initialText })), options.map((o) => {
1977
+ return (jsxRuntime$1.jsxs(StyledSelect$1, { className: y('Select', { horizontal }, className), "data-cy": props['data-cy'], id: id, style: style, children: [label && jsxRuntime$1.jsx("label", { htmlFor: selectId, children: label }), jsxRuntime$1.jsxs("div", { className: "select-container", children: [jsxRuntime$1.jsxs("select", { onChange: onChange, value: value, disabled: disabled, id: selectId, children: [initialText && (jsxRuntime$1.jsx("option", { disabled: true, value: "", children: initialText })), options.map((o) => {
1978
1978
  const key = v4();
1979
1979
  return (jsxRuntime$1.jsx("option", { value: o.value, children: o.name }, key));
1980
1980
  })] }), jsxRuntime$1.jsx(Icon, { name: "fa-caret-down", className: "selectCaret" })] }), validationErrors ? (jsxRuntime$1.jsx(StyledValidationError, { children: validationErrors.map((err, i) => {
@@ -2055,7 +2055,7 @@ const StyledSelect = styled__default.default.div `
2055
2055
  const Select = (props) => {
2056
2056
  const { id, className, disabled, initialText, onChange, options, size = 'medium', style = {}, value, variant, onClick, } = props;
2057
2057
  const selectId = v4();
2058
- return (jsxRuntime$1.jsx(StyledSelect, { className: className, "data-cy": props['data-cy'], id: id, style: style, children: jsxRuntime$1.jsxs("div", { className: classNames('Select__container', size, variant), onClick: (e) => (onClick ? onClick(e) : null), children: [jsxRuntime$1.jsxs("select", { onChange: onChange, value: value, disabled: disabled, id: selectId, children: [initialText && (jsxRuntime$1.jsx("option", { disabled: true, value: "", children: initialText })), options.map((o) => {
2058
+ return (jsxRuntime$1.jsx(StyledSelect, { className: className, "data-cy": props['data-cy'], id: id, style: style, children: jsxRuntime$1.jsxs("div", { className: y('Select__container', size, variant), onClick: (e) => (onClick ? onClick(e) : null), children: [jsxRuntime$1.jsxs("select", { onChange: onChange, value: value, disabled: disabled, id: selectId, children: [initialText && (jsxRuntime$1.jsx("option", { disabled: true, value: "", children: initialText })), options.map((o) => {
2059
2059
  const key = v4();
2060
2060
  return (jsxRuntime$1.jsx("option", { value: o.value, children: o.name }, key));
2061
2061
  })] }), jsxRuntime$1.jsx(Icon, { className: "chevron", name: "chevron-down", size: size === 'small' ? [10] : [12] })] }) }));
@@ -2842,10 +2842,10 @@ const SectionTable = (props) => {
2842
2842
  }
2843
2843
  };
2844
2844
  const headers = Object.keys(props.tableObjects[0].content);
2845
- return (jsxRuntime$1.jsxs(StyledSectionTable, { className: classNames('SectionTable', props.className, { loading: props.loading }), "data-cy": props['data-cy'], id: props.id, children: [props.sortColumnHandler && props.sortedColumn && (jsxRuntime$1.jsx("div", { className: "mobile-sort", children: jsxRuntime$1.jsx(BorderSelect, { onChange: (e) => props.sortColumnHandler(e.target.value), value: props.sortedColumn, options: [].concat({ name: 'Choose Sorting Option', value: '' }, headers.map((item) => {
2845
+ return (jsxRuntime$1.jsxs(StyledSectionTable, { className: y('SectionTable', props.className, { loading: props.loading }), "data-cy": props['data-cy'], id: props.id, children: [props.sortColumnHandler && props.sortedColumn && (jsxRuntime$1.jsx("div", { className: "mobile-sort", children: jsxRuntime$1.jsx(BorderSelect, { onChange: (e) => props.sortColumnHandler(e.target.value), value: props.sortedColumn, options: [].concat({ name: 'Choose Sorting Option', value: '' }, headers.map((item) => {
2846
2846
  return { name: item, value: item };
2847
2847
  })) }) })), jsxRuntime$1.jsxs("table", Object.assign({}, props.tableProps, { children: [jsxRuntime$1.jsx("thead", { children: jsxRuntime$1.jsxs("tr", { children: [props.tableObjects[0].rowAccordionContent ? jsxRuntime$1.jsx("th", { className: "action-column" }) : null, headers.map((header, i) => {
2848
- return (jsxRuntime$1.jsxs("th", { className: classNames({
2848
+ return (jsxRuntime$1.jsxs("th", { className: y({
2849
2849
  'not-sortable': props.sortableHeaders && props.sortableHeaders.indexOf(header) === -1,
2850
2850
  }), onClick: () => {
2851
2851
  if (props.sortColumnHandler) {
@@ -2859,7 +2859,7 @@ const SectionTable = (props) => {
2859
2859
  }
2860
2860
  }
2861
2861
  }, children: [props.headersContent ? props.headersContent[header] : header, ' ', props.sortedColumn === header && (jsxRuntime$1.jsx(Icon, { name: `fa-caret-${props.sortDirection}` }))] }, i));
2862
- })] }) }), jsxRuntime$1.jsx("tbody", { className: classNames({ 'SectionTable--tbody-loading': props.loading }), children: props.loading
2862
+ })] }) }), jsxRuntime$1.jsx("tbody", { className: y({ 'SectionTable--tbody-loading': props.loading }), children: props.loading
2863
2863
  ? Array.from({ length: 5 }, (x, i) => (jsxRuntime$1.jsx("tr", { children: props.tableObjects[0].rowAccordionContent ? (jsxRuntime$1.jsx("td", { colSpan: headers.length + 1 })) : (jsxRuntime$1.jsx("td", { colSpan: headers.length })) }, i)))
2864
2864
  : props.tableObjects.map((obj, i) => {
2865
2865
  let rowStyle = obj.rowStyleCondition;
@@ -2867,7 +2867,7 @@ const SectionTable = (props) => {
2867
2867
  rowStyle = { [rowStyle.className]: rowStyle.condition };
2868
2868
  }
2869
2869
  if (obj.rowAccordionContent) {
2870
- return (jsxRuntime$1.jsx("tr", Object.assign({ className: classNames(rowStyle) }, props.rowProps, { children: jsxRuntime$1.jsx("td", { colSpan: headers.length + 1, style: { padding: '0' }, className: "outer-hover", children: jsxRuntime$1.jsxs("table", { children: [jsxRuntime$1.jsx("thead", { children: jsxRuntime$1.jsxs("tr", { children: [jsxRuntime$1.jsx("th", { className: "action-column", style: {
2870
+ return (jsxRuntime$1.jsx("tr", Object.assign({ className: y(rowStyle) }, props.rowProps, { children: jsxRuntime$1.jsx("td", { colSpan: headers.length + 1, style: { padding: '0' }, className: "outer-hover", children: jsxRuntime$1.jsxs("table", { children: [jsxRuntime$1.jsx("thead", { children: jsxRuntime$1.jsxs("tr", { children: [jsxRuntime$1.jsx("th", { className: "action-column", style: {
2871
2871
  padding: '0',
2872
2872
  height: '1px',
2873
2873
  border: 'none',
@@ -2886,18 +2886,18 @@ const SectionTable = (props) => {
2886
2886
  return (jsxRuntime$1.jsx("td", Object.assign({ style: {
2887
2887
  borderBottom: 'none',
2888
2888
  }, "data-heading": headers[i], title: createTitle(obj.content[key]) }, (_a = props === null || props === void 0 ? void 0 : props.headingProps) === null || _a === void 0 ? void 0 : _a[headers === null || headers === void 0 ? void 0 : headers[i]], { children: obj.content[key] }), i));
2889
- })] }), jsxRuntime$1.jsx("tr", { className: classNames('row-option', {
2889
+ })] }), jsxRuntime$1.jsx("tr", { className: y('row-option', {
2890
2890
  open: openRowOptions.indexOf(obj.id) !== -1,
2891
2891
  }), children: jsxRuntime$1.jsx("td", { className: "inner-table-cell", colSpan: headers.length + 1, children: obj.rowAccordionContent }) })] })] }) }) }), i));
2892
2892
  }
2893
2893
  else if (obj.lineItemLink) {
2894
- return (jsxRuntime$1.jsx("tr", Object.assign({ onClick: handleRowClick(obj.lineItemLink), className: classNames('hover', rowStyle) }, props.rowProps, { children: Object.keys(obj.content).map((key, i) => {
2894
+ return (jsxRuntime$1.jsx("tr", Object.assign({ onClick: handleRowClick(obj.lineItemLink), className: y('hover', rowStyle) }, props.rowProps, { children: Object.keys(obj.content).map((key, i) => {
2895
2895
  var _a;
2896
2896
  return (jsxRuntime$1.jsx("td", Object.assign({ "data-heading": headers[i], title: createTitle(obj.content[key]) }, (_a = props === null || props === void 0 ? void 0 : props.headingProps) === null || _a === void 0 ? void 0 : _a[headers === null || headers === void 0 ? void 0 : headers[i]], { children: obj.content[key] }), i));
2897
2897
  }) }), i));
2898
2898
  }
2899
2899
  else {
2900
- return (jsxRuntime$1.jsx("tr", Object.assign({ className: classNames(rowStyle) }, props.rowProps, { children: Object.keys(obj.content).map((key, i) => {
2900
+ return (jsxRuntime$1.jsx("tr", Object.assign({ className: y(rowStyle) }, props.rowProps, { children: Object.keys(obj.content).map((key, i) => {
2901
2901
  var _a;
2902
2902
  return (jsxRuntime$1.jsx("td", Object.assign({ "data-heading": headers[i], title: createTitle(obj.content[key]) }, (_a = props === null || props === void 0 ? void 0 : props.headingProps) === null || _a === void 0 ? void 0 : _a[headers === null || headers === void 0 ? void 0 : headers[i]], { children: obj.content[key] }), i));
2903
2903
  }) }), i));
@@ -3402,7 +3402,7 @@ const StyledButton = styled__default.default.button `
3402
3402
 
3403
3403
  function Button$1(props) {
3404
3404
  const { id, className, busy, children, disabled, onClick, onFocus, role, style, tabindex, type, variant = 'default' } = props, rest = __rest$1(props, ["id", "className", "busy", "children", "disabled", "onClick", "onFocus", "role", "style", "tabindex", "type", "variant"]);
3405
- return (jsxRuntime$1.jsxs(StyledButton, Object.assign({ "aria-disabled": busy, "aria-label": props['aria-label'], "aria-pressed": props['aria-pressed'], "aria-selected": props['aria-selected'], className: classNames(variant, className, {
3405
+ return (jsxRuntime$1.jsxs(StyledButton, Object.assign({ "aria-disabled": busy, "aria-label": props['aria-label'], "aria-pressed": props['aria-pressed'], "aria-selected": props['aria-selected'], className: y(variant, className, {
3406
3406
  blue: variant === 'primary' || variant === 'cta',
3407
3407
  busy,
3408
3408
  }), "data-cy": props['data-cy'], disabled: disabled, id: id, onClick: busy ? undefined : onClick, onFocus: onFocus, role: role, style: style, tabIndex: tabindex, type: type || 'button' }, rest, { children: [busy && jsxRuntime$1.jsx(CircleSpinner, { size: "0.9em", style: { marginRight: '0.5em' } }), children] })));
@@ -3663,7 +3663,7 @@ function $8ae05eaa5c114e9c$export$7f54fc3180508a52(fn) {
3663
3663
  // @ts-ignore
3664
3664
  return (React$1.useCallback)((...args)=>{
3665
3665
  const f = ref.current;
3666
- return f(...args);
3666
+ return f === null || f === void 0 ? void 0 : f(...args);
3667
3667
  }, []);
3668
3668
  }
3669
3669
 
@@ -3674,6 +3674,7 @@ function $1dbecbe27a04f9af$export$14d238f342723f25(defaultValue) {
3674
3674
  // Store the function in a ref so we can always access the current version
3675
3675
  // which has the proper `value` in scope.
3676
3676
  let nextRef = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(()=>{
3677
+ if (!effect.current) return;
3677
3678
  // Run the generator to the next yield.
3678
3679
  let newValue = effect.current.next();
3679
3680
  // If the generator is done, reset the effect.
@@ -3895,7 +3896,7 @@ function $7215afc6de606d6b$var$supportsPreventScroll() {
3895
3896
  if ($7215afc6de606d6b$var$supportsPreventScrollCached == null) {
3896
3897
  $7215afc6de606d6b$var$supportsPreventScrollCached = false;
3897
3898
  try {
3898
- var focusElem = document.createElement("div");
3899
+ let focusElem = document.createElement("div");
3899
3900
  focusElem.focus({
3900
3901
  get preventScroll () {
3901
3902
  $7215afc6de606d6b$var$supportsPreventScrollCached = true;
@@ -3909,9 +3910,9 @@ function $7215afc6de606d6b$var$supportsPreventScroll() {
3909
3910
  return $7215afc6de606d6b$var$supportsPreventScrollCached;
3910
3911
  }
3911
3912
  function $7215afc6de606d6b$var$getScrollableElements(element) {
3912
- var parent = element.parentNode;
3913
- var scrollableElements = [];
3914
- var rootScrollingElement = document.scrollingElement || document.documentElement;
3913
+ let parent = element.parentNode;
3914
+ let scrollableElements = [];
3915
+ let rootScrollingElement = document.scrollingElement || document.documentElement;
3915
3916
  while(parent instanceof HTMLElement && parent !== rootScrollingElement){
3916
3917
  if (parent.offsetHeight < parent.scrollHeight || parent.offsetWidth < parent.scrollWidth) scrollableElements.push({
3917
3918
  element: parent,
@@ -4046,7 +4047,11 @@ let $bbed8b41f857bcc0$var$transitionsByElement = new Map();
4046
4047
  let $bbed8b41f857bcc0$var$transitionCallbacks = new Set();
4047
4048
  function $bbed8b41f857bcc0$var$setupGlobalEvents() {
4048
4049
  if (typeof window === "undefined") return;
4050
+ function isTransitionEvent(event) {
4051
+ return "propertyName" in event;
4052
+ }
4049
4053
  let onTransitionStart = (e)=>{
4054
+ if (!isTransitionEvent(e) || !e.target) return;
4050
4055
  // Add the transitioning property to the list for this element.
4051
4056
  let transitions = $bbed8b41f857bcc0$var$transitionsByElement.get(e.target);
4052
4057
  if (!transitions) {
@@ -4055,11 +4060,14 @@ function $bbed8b41f857bcc0$var$setupGlobalEvents() {
4055
4060
  // The transitioncancel event must be registered on the element itself, rather than as a global
4056
4061
  // event. This enables us to handle when the node is deleted from the document while it is transitioning.
4057
4062
  // In that case, the cancel event would have nowhere to bubble to so we need to handle it directly.
4058
- e.target.addEventListener("transitioncancel", onTransitionEnd);
4063
+ e.target.addEventListener("transitioncancel", onTransitionEnd, {
4064
+ once: true
4065
+ });
4059
4066
  }
4060
4067
  transitions.add(e.propertyName);
4061
4068
  };
4062
4069
  let onTransitionEnd = (e)=>{
4070
+ if (!isTransitionEvent(e) || !e.target) return;
4063
4071
  // Remove property from list of transitioning properties.
4064
4072
  let properties = $bbed8b41f857bcc0$var$transitionsByElement.get(e.target);
4065
4073
  if (!properties) return;
@@ -4198,7 +4206,7 @@ function $e7801be82b4b2a53$export$4debdb1a3f0fa79e(context, ref) {
4198
4206
  if (context && context.ref && ref) {
4199
4207
  context.ref.current = ref.current;
4200
4208
  return ()=>{
4201
- context.ref.current = null;
4209
+ if (context.ref) context.ref.current = null;
4202
4210
  };
4203
4211
  }
4204
4212
  });
@@ -4352,6 +4360,7 @@ function _class_private_field_set(receiver, privateMap, value) {
4352
4360
 
4353
4361
 
4354
4362
 
4363
+
4355
4364
  /*
4356
4365
  * Copyright 2020 Adobe. All rights reserved.
4357
4366
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
@@ -4419,7 +4428,6 @@ function $14c0b72509d70225$export$b0d6fa1ab32e3295(target) {
4419
4428
  }
4420
4429
 
4421
4430
 
4422
-
4423
4431
  /*
4424
4432
  * Copyright 2020 Adobe. All rights reserved.
4425
4433
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
@@ -4570,8 +4578,13 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
4570
4578
  state.isPressed = true;
4571
4579
  shouldStopPropagation = triggerPressStart(e, "keyboard");
4572
4580
  // Focus may move before the key up event, so register the event on the document
4573
- // instead of the same element where the key down event occurred.
4574
- addGlobalListener(($431fbd86ca7dc216$export$b204af158042fbac)(e.currentTarget), "keyup", onKeyUp, false);
4581
+ // instead of the same element where the key down event occurred. Make it capturing so that it will trigger
4582
+ // before stopPropagation from useKeyboard on a child element may happen and thus we can still call triggerPress for the parent element.
4583
+ let originalTarget = e.currentTarget;
4584
+ let pressUp = (e)=>{
4585
+ if ($f6c31cce2adf654f$var$isValidKeyboardEvent(e, originalTarget) && !e.repeat && originalTarget.contains(e.target) && state.target) triggerPressUp($f6c31cce2adf654f$var$createEvent(state.target, e), "keyboard");
4586
+ };
4587
+ addGlobalListener(($431fbd86ca7dc216$export$b204af158042fbac)(e.currentTarget), "keyup", ($ff5963eb1fccf552$export$e08e3b67e392101e)(pressUp, onKeyUp), true);
4575
4588
  }
4576
4589
  if (shouldStopPropagation) e.stopPropagation();
4577
4590
  // Keep track of the keydown events that occur while the Meta (e.g. Command) key is held.
@@ -4584,9 +4597,6 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
4584
4597
  if (e.metaKey && ($c87311424ea30a05$export$9ac100e40613ea10)()) (_state_metaKeyEvents = state.metaKeyEvents) === null || _state_metaKeyEvents === void 0 ? void 0 : _state_metaKeyEvents.set(e.key, e.nativeEvent);
4585
4598
  } else if (e.key === "Meta") state.metaKeyEvents = new Map();
4586
4599
  },
4587
- onKeyUp (e) {
4588
- if ($f6c31cce2adf654f$var$isValidKeyboardEvent(e.nativeEvent, e.currentTarget) && !e.repeat && e.currentTarget.contains(e.target) && state.target) triggerPressUp($f6c31cce2adf654f$var$createEvent(state.target, e), "keyboard");
4589
- },
4590
4600
  onClick (e) {
4591
4601
  if (e && !e.currentTarget.contains(e.target)) return;
4592
4602
  if (e && e.button === 0 && !state.isTriggeringEvent && !($ea8dcbcb9ea1b556$export$95185d699e05d4d7).isOpening) {
@@ -4614,9 +4624,8 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
4614
4624
  var _state_metaKeyEvents1;
4615
4625
  if ($f6c31cce2adf654f$var$shouldPreventDefaultKeyboard(e.target, e.key)) e.preventDefault();
4616
4626
  let target = e.target;
4617
- let shouldStopPropagation = triggerPressEnd($f6c31cce2adf654f$var$createEvent(state.target, e), "keyboard", state.target.contains(target));
4627
+ triggerPressEnd($f6c31cce2adf654f$var$createEvent(state.target, e), "keyboard", state.target.contains(target));
4618
4628
  removeAllGlobalListeners();
4619
- if (shouldStopPropagation) e.stopPropagation();
4620
4629
  // If a link was triggered with a key other than Enter, open the URL ourselves.
4621
4630
  // This means the link has a role override, and the default browser behavior
4622
4631
  // only applies when using the Enter key.
@@ -5151,7 +5160,7 @@ function $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props) {
5151
5160
 
5152
5161
  let $507fabe10e71c6fb$var$currentModality = null;
5153
5162
  let $507fabe10e71c6fb$var$changeHandlers = new Set();
5154
- let $507fabe10e71c6fb$var$hasSetupGlobalListeners = false;
5163
+ let $507fabe10e71c6fb$export$d90243b58daecda7 = new Map(); // We use a map here to support setting event listeners across multiple document objects.
5155
5164
  let $507fabe10e71c6fb$var$hasEventBeforeFocus = false;
5156
5165
  let $507fabe10e71c6fb$var$hasBlurredWindowRecently = false;
5157
5166
  // Only Tab or Esc keys will make focus visible on text input elements
@@ -5210,39 +5219,82 @@ function $507fabe10e71c6fb$var$handleWindowBlur() {
5210
5219
  }
5211
5220
  /**
5212
5221
  * Setup global event listeners to control when keyboard focus style should be visible.
5213
- */ function $507fabe10e71c6fb$var$setupGlobalFocusEvents() {
5214
- if (typeof window === "undefined" || $507fabe10e71c6fb$var$hasSetupGlobalListeners) return;
5222
+ */ function $507fabe10e71c6fb$var$setupGlobalFocusEvents(element) {
5223
+ if (typeof window === "undefined" || $507fabe10e71c6fb$export$d90243b58daecda7.get(($431fbd86ca7dc216$export$f21a1ffae260145a)(element))) return;
5224
+ const windowObject = ($431fbd86ca7dc216$export$f21a1ffae260145a)(element);
5225
+ const documentObject = ($431fbd86ca7dc216$export$b204af158042fbac)(element);
5215
5226
  // Programmatic focus() calls shouldn't affect the current input modality.
5216
5227
  // However, we need to detect other cases when a focus event occurs without
5217
5228
  // a preceding user event (e.g. screen reader focus). Overriding the focus
5218
5229
  // method on HTMLElement.prototype is a bit hacky, but works.
5219
- let focus = HTMLElement.prototype.focus;
5220
- HTMLElement.prototype.focus = function() {
5230
+ let focus = windowObject.HTMLElement.prototype.focus;
5231
+ windowObject.HTMLElement.prototype.focus = function() {
5221
5232
  $507fabe10e71c6fb$var$hasEventBeforeFocus = true;
5222
5233
  focus.apply(this, arguments);
5223
5234
  };
5224
- document.addEventListener("keydown", $507fabe10e71c6fb$var$handleKeyboardEvent, true);
5225
- document.addEventListener("keyup", $507fabe10e71c6fb$var$handleKeyboardEvent, true);
5226
- document.addEventListener("click", $507fabe10e71c6fb$var$handleClickEvent, true);
5235
+ documentObject.addEventListener("keydown", $507fabe10e71c6fb$var$handleKeyboardEvent, true);
5236
+ documentObject.addEventListener("keyup", $507fabe10e71c6fb$var$handleKeyboardEvent, true);
5237
+ documentObject.addEventListener("click", $507fabe10e71c6fb$var$handleClickEvent, true);
5227
5238
  // Register focus events on the window so they are sure to happen
5228
5239
  // before React's event listeners (registered on the document).
5229
- window.addEventListener("focus", $507fabe10e71c6fb$var$handleFocusEvent, true);
5230
- window.addEventListener("blur", $507fabe10e71c6fb$var$handleWindowBlur, false);
5240
+ windowObject.addEventListener("focus", $507fabe10e71c6fb$var$handleFocusEvent, true);
5241
+ windowObject.addEventListener("blur", $507fabe10e71c6fb$var$handleWindowBlur, false);
5231
5242
  if (typeof PointerEvent !== "undefined") {
5232
- document.addEventListener("pointerdown", $507fabe10e71c6fb$var$handlePointerEvent, true);
5233
- document.addEventListener("pointermove", $507fabe10e71c6fb$var$handlePointerEvent, true);
5234
- document.addEventListener("pointerup", $507fabe10e71c6fb$var$handlePointerEvent, true);
5243
+ documentObject.addEventListener("pointerdown", $507fabe10e71c6fb$var$handlePointerEvent, true);
5244
+ documentObject.addEventListener("pointermove", $507fabe10e71c6fb$var$handlePointerEvent, true);
5245
+ documentObject.addEventListener("pointerup", $507fabe10e71c6fb$var$handlePointerEvent, true);
5235
5246
  } else {
5236
- document.addEventListener("mousedown", $507fabe10e71c6fb$var$handlePointerEvent, true);
5237
- document.addEventListener("mousemove", $507fabe10e71c6fb$var$handlePointerEvent, true);
5238
- document.addEventListener("mouseup", $507fabe10e71c6fb$var$handlePointerEvent, true);
5239
- }
5240
- $507fabe10e71c6fb$var$hasSetupGlobalListeners = true;
5247
+ documentObject.addEventListener("mousedown", $507fabe10e71c6fb$var$handlePointerEvent, true);
5248
+ documentObject.addEventListener("mousemove", $507fabe10e71c6fb$var$handlePointerEvent, true);
5249
+ documentObject.addEventListener("mouseup", $507fabe10e71c6fb$var$handlePointerEvent, true);
5250
+ }
5251
+ // Add unmount handler
5252
+ windowObject.addEventListener("beforeunload", ()=>{
5253
+ $507fabe10e71c6fb$var$tearDownWindowFocusTracking(element);
5254
+ }, {
5255
+ once: true
5256
+ });
5257
+ $507fabe10e71c6fb$export$d90243b58daecda7.set(windowObject, {
5258
+ focus: focus
5259
+ });
5241
5260
  }
5242
- if (typeof document !== "undefined") {
5243
- if (document.readyState !== "loading") $507fabe10e71c6fb$var$setupGlobalFocusEvents();
5244
- else document.addEventListener("DOMContentLoaded", $507fabe10e71c6fb$var$setupGlobalFocusEvents);
5261
+ const $507fabe10e71c6fb$var$tearDownWindowFocusTracking = (element, loadListener)=>{
5262
+ const windowObject = ($431fbd86ca7dc216$export$f21a1ffae260145a)(element);
5263
+ const documentObject = ($431fbd86ca7dc216$export$b204af158042fbac)(element);
5264
+ if (loadListener) documentObject.removeEventListener("DOMContentLoaded", loadListener);
5265
+ if (!$507fabe10e71c6fb$export$d90243b58daecda7.has(windowObject)) return;
5266
+ windowObject.HTMLElement.prototype.focus = $507fabe10e71c6fb$export$d90243b58daecda7.get(windowObject).focus;
5267
+ documentObject.removeEventListener("keydown", $507fabe10e71c6fb$var$handleKeyboardEvent, true);
5268
+ documentObject.removeEventListener("keyup", $507fabe10e71c6fb$var$handleKeyboardEvent, true);
5269
+ documentObject.removeEventListener("click", $507fabe10e71c6fb$var$handleClickEvent, true);
5270
+ windowObject.removeEventListener("focus", $507fabe10e71c6fb$var$handleFocusEvent, true);
5271
+ windowObject.removeEventListener("blur", $507fabe10e71c6fb$var$handleWindowBlur, false);
5272
+ if (typeof PointerEvent !== "undefined") {
5273
+ documentObject.removeEventListener("pointerdown", $507fabe10e71c6fb$var$handlePointerEvent, true);
5274
+ documentObject.removeEventListener("pointermove", $507fabe10e71c6fb$var$handlePointerEvent, true);
5275
+ documentObject.removeEventListener("pointerup", $507fabe10e71c6fb$var$handlePointerEvent, true);
5276
+ } else {
5277
+ documentObject.removeEventListener("mousedown", $507fabe10e71c6fb$var$handlePointerEvent, true);
5278
+ documentObject.removeEventListener("mousemove", $507fabe10e71c6fb$var$handlePointerEvent, true);
5279
+ documentObject.removeEventListener("mouseup", $507fabe10e71c6fb$var$handlePointerEvent, true);
5280
+ }
5281
+ $507fabe10e71c6fb$export$d90243b58daecda7.delete(windowObject);
5282
+ };
5283
+ function $507fabe10e71c6fb$export$2f1888112f558a7d(element) {
5284
+ const documentObject = ($431fbd86ca7dc216$export$b204af158042fbac)(element);
5285
+ let loadListener;
5286
+ if (documentObject.readyState !== "loading") $507fabe10e71c6fb$var$setupGlobalFocusEvents(element);
5287
+ else {
5288
+ loadListener = ()=>{
5289
+ $507fabe10e71c6fb$var$setupGlobalFocusEvents(element);
5290
+ };
5291
+ documentObject.addEventListener("DOMContentLoaded", loadListener);
5292
+ }
5293
+ return ()=>$507fabe10e71c6fb$var$tearDownWindowFocusTracking(element, loadListener);
5245
5294
  }
5295
+ // Server-side rendering does not have the document object defined
5296
+ // eslint-disable-next-line no-restricted-globals
5297
+ if (typeof document !== "undefined") $507fabe10e71c6fb$export$2f1888112f558a7d();
5246
5298
  function $507fabe10e71c6fb$export$b9b3dfddab17db27() {
5247
5299
  return $507fabe10e71c6fb$var$currentModality !== "pointer";
5248
5300
  }
@@ -5269,8 +5321,12 @@ const $507fabe10e71c6fb$var$nonTextInputTypes = new Set([
5269
5321
  * focus visible style can be properly set.
5270
5322
  */ function $507fabe10e71c6fb$var$isKeyboardFocusEvent(isTextInput, modality, e) {
5271
5323
  var _e_target;
5272
- isTextInput = isTextInput || (e === null || e === void 0 ? void 0 : e.target) instanceof HTMLInputElement && !$507fabe10e71c6fb$var$nonTextInputTypes.has(e === null || e === void 0 ? void 0 : (_e_target = e.target) === null || _e_target === void 0 ? void 0 : _e_target.type) || (e === null || e === void 0 ? void 0 : e.target) instanceof HTMLTextAreaElement || (e === null || e === void 0 ? void 0 : e.target) instanceof HTMLElement && (e === null || e === void 0 ? void 0 : e.target.isContentEditable);
5273
- return !(isTextInput && modality === "keyboard" && e instanceof KeyboardEvent && !$507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS[e.key]);
5324
+ const IHTMLInputElement = typeof window !== "undefined" ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(e === null || e === void 0 ? void 0 : e.target).HTMLInputElement : HTMLInputElement;
5325
+ const IHTMLTextAreaElement = typeof window !== "undefined" ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(e === null || e === void 0 ? void 0 : e.target).HTMLTextAreaElement : HTMLTextAreaElement;
5326
+ const IHTMLElement = typeof window !== "undefined" ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(e === null || e === void 0 ? void 0 : e.target).HTMLElement : HTMLElement;
5327
+ const IKeyboardEvent = typeof window !== "undefined" ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(e === null || e === void 0 ? void 0 : e.target).KeyboardEvent : KeyboardEvent;
5328
+ isTextInput = isTextInput || (e === null || e === void 0 ? void 0 : e.target) instanceof IHTMLInputElement && !$507fabe10e71c6fb$var$nonTextInputTypes.has(e === null || e === void 0 ? void 0 : (_e_target = e.target) === null || _e_target === void 0 ? void 0 : _e_target.type) || (e === null || e === void 0 ? void 0 : e.target) instanceof IHTMLTextAreaElement || (e === null || e === void 0 ? void 0 : e.target) instanceof IHTMLElement && (e === null || e === void 0 ? void 0 : e.target.isContentEditable);
5329
+ return !(isTextInput && modality === "keyboard" && e instanceof IKeyboardEvent && !$507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS[e.key]);
5274
5330
  }
5275
5331
  function $507fabe10e71c6fb$export$ec71b4b83ac08ec3(fn, deps, opts) {
5276
5332
  $507fabe10e71c6fb$var$setupGlobalFocusEvents();
@@ -5976,7 +6032,7 @@ function IconButton(props) {
5976
6032
  // @ts-ignore
5977
6033
  buttonEl);
5978
6034
  const { isFocusVisible, focusProps } = $f7dceffc5ad7768b$export$4e328f61c538687f();
5979
- const commonProps = Object.assign(Object.assign(Object.assign({ 'aria-disabled': busy, className: classNames(iconSide, size, variant, className, {
6035
+ const commonProps = Object.assign(Object.assign(Object.assign({ 'aria-disabled': busy, className: y(iconSide, size, variant, className, {
5980
6036
  'focus-visible': isFocusVisible,
5981
6037
  busy,
5982
6038
  disabled: isLink && isDisabled,
@@ -5985,7 +6041,7 @@ function IconButton(props) {
5985
6041
  marginTop: `${adjustAlignment}px`,
5986
6042
  marginBottom: `${Math.abs(adjustAlignment)}px`,
5987
6043
  marginRight: `${spacings.xs}`,
5988
- } })) : (jsxRuntime$1.jsx(Icon, { className: classNames({ 'right-margin': label }), name: iconName }));
6044
+ } })) : (jsxRuntime$1.jsx(Icon, { className: y({ 'right-margin': label }), name: iconName }));
5989
6045
  const labelElement = label ? (jsxRuntime$1.jsx("span", { style: { marginTop: `${adjustAlignment}px` }, children: label })) : null;
5990
6046
  if (isLink && !isDisabled) {
5991
6047
  return (
@@ -6068,7 +6124,7 @@ function EditableInput(props) {
6068
6124
  setInitialValue(editableEl.current.innerText);
6069
6125
  }
6070
6126
  }, []);
6071
- return (jsxRuntime$1.jsxs(StyledEditableInput, { className: classNames('EditableInput-container', id, className), "data-cy": props['data-cy'], id: props.id, children: [jsxRuntime$1.jsx("span", { role: "textbox", tabIndex: 0, contentEditable: true, suppressContentEditableWarning: true, ref: editableEl, onKeyDown: handleKeypress, onBlur: handleBlur, children: children }), jsxRuntime$1.jsx(Icon, { name: "fa-pencil-alt", className: "pencil-icon" })] }));
6127
+ return (jsxRuntime$1.jsxs(StyledEditableInput, { className: y('EditableInput-container', id, className), "data-cy": props['data-cy'], id: props.id, children: [jsxRuntime$1.jsx("span", { role: "textbox", tabIndex: 0, contentEditable: true, suppressContentEditableWarning: true, ref: editableEl, onKeyDown: handleKeypress, onBlur: handleBlur, children: children }), jsxRuntime$1.jsx(Icon, { name: "fa-pencil-alt", className: "pencil-icon" })] }));
6072
6128
  }
6073
6129
 
6074
6130
  const inputCommon = styled.css `
@@ -6250,7 +6306,7 @@ function NumberInput(props) {
6250
6306
  }, 1000);
6251
6307
  return () => clearTimeout(delayDebounceFn);
6252
6308
  }, [currentValue]);
6253
- return (jsxRuntime$1.jsxs(StyledNumberField, { className: classNames(className, {
6309
+ return (jsxRuntime$1.jsxs(StyledNumberField, { className: y(className, {
6254
6310
  hiddenLabel,
6255
6311
  }), "data-cy": props['data-cy'], id: id, children: [jsxRuntime$1.jsx("input", { tabIndex: tabIndex, autoFocus: autoFocus, id: fieldId, type: "number", value: currentValue, disabled: disabled, max: max, min: min, onChange: handleChange, placeholder: placeholder, required: required, step: step, "aria-label": hiddenLabel ? label : '', ref: inputEl }), !hiddenLabel && jsxRuntime$1.jsx("label", { htmlFor: fieldId, children: label }), jsxRuntime$1.jsxs("div", { className: "spin-buttons", children: [jsxRuntime$1.jsx(Button$1, { variant: "no-style", onClick: increment, tabindex: -1, children: jsxRuntime$1.jsx(Icon, { name: "fa-caret-up", ariaLabel: "increase" }) }), jsxRuntime$1.jsx(Button$1, { variant: "no-style", onClick: decrement, tabindex: -1, children: jsxRuntime$1.jsx(Icon, { name: "fa-caret-down", ariaLabel: "decrease" }) })] })] }));
6256
6312
  }
@@ -6304,7 +6360,7 @@ const StyledSearchField = styled__default.default.div `
6304
6360
  const SearchInput = (props) => {
6305
6361
  const { id, border, showSearchIcon, showClearInputIcon, className, inputProps, onChange, onClear, onKeyUp, placeholder, value, } = props;
6306
6362
  const getId = id ? id : v4();
6307
- return (jsxRuntime$1.jsxs(StyledSearchField, { className: classNames(className, {
6363
+ return (jsxRuntime$1.jsxs(StyledSearchField, { className: y(className, {
6308
6364
  border,
6309
6365
  showSearchIcon,
6310
6366
  showClearInputIcon,
@@ -6382,7 +6438,7 @@ function TextInput(props) {
6382
6438
  const inputId = v4();
6383
6439
  const { autoComplete, autoFocus, className, defaultValue, disabled, displayErrors, id, inputProps, label, maxLength, name, onBlur, onChange, onFocus, placeholder, promptProps, required, type = 'text', validationErrors, value, readOnly, } = props;
6384
6440
  const errorClass = displayErrors ? 'error' : 'prompt';
6385
- return (jsxRuntime$1.jsxs(StyledTextInput, { className: className, "data-cy": props['data-cy'], id: id, children: [jsxRuntime$1.jsx("input", Object.assign({ autoComplete: autoComplete, autoFocus: autoFocus, className: classNames('text-input__input-element', {
6441
+ return (jsxRuntime$1.jsxs(StyledTextInput, { className: className, "data-cy": props['data-cy'], id: id, children: [jsxRuntime$1.jsx("input", Object.assign({ autoComplete: autoComplete, autoFocus: autoFocus, className: y('text-input__input-element', {
6386
6442
  filled: (value && value.length > 0) || defaultValue,
6387
6443
  }), disabled: disabled, defaultValue: defaultValue, id: inputId, maxLength: maxLength, name: name, onBlur: onBlur, onChange: onChange, onFocus: onFocus, onKeyUp: (e) => {
6388
6444
  if (e.key === 'Enter') {
@@ -6390,7 +6446,7 @@ function TextInput(props) {
6390
6446
  }
6391
6447
  }, placeholder: placeholder, required: required, type: type, value: value, readOnly: readOnly }, inputProps)), label ? jsxRuntime$1.jsx("label", { htmlFor: inputId, children: label }) : null, (validationErrors || maxLength) && (jsxRuntime$1.jsxs(StyledInputInfo, { children: [validationErrors && (jsxRuntime$1.jsx("div", { children: validationErrors.map((err, i) => {
6392
6448
  return (jsxRuntime$1.jsx("p", Object.assign({ className: errorClass }, promptProps, { children: err }), i));
6393
- }) })), maxLength && (jsxRuntime$1.jsxs("div", { className: classNames('count', { isMax: (value === null || value === void 0 ? void 0 : value.length) === maxLength }), children: [(value === null || value === void 0 ? void 0 : value.length) || 0, " / ", maxLength] }))] }))] }));
6449
+ }) })), maxLength && (jsxRuntime$1.jsxs("div", { className: y('count', { isMax: (value === null || value === void 0 ? void 0 : value.length) === maxLength }), children: [(value === null || value === void 0 ? void 0 : value.length) || 0, " / ", maxLength] }))] }))] }));
6394
6450
  }
6395
6451
 
6396
6452
  /*
@@ -7291,7 +7347,7 @@ function RadioGroup$1(props) {
7291
7347
  };
7292
7348
  const state = $a54cdc5c1942b639$export$bca9d026f8e704eb(radioGroupState);
7293
7349
  const { radioGroupProps, labelProps } = $430f30ed08ec25fa$export$62b9571f283ff5c2(props, state);
7294
- return (jsxRuntime$1.jsxs(StyledRadioGroup$1, Object.assign({}, radioGroupProps, { className: classNames(className, { horizontal: orientation === 'horizontal' }), "data-cy": props['data-cy'], id: id, children: [label && (jsxRuntime$1.jsx("div", Object.assign({ className: "groupLabel" }, labelProps, { children: label }))), jsxRuntime$1.jsx(RadioContext.Provider, { value: state, children: children })] })));
7350
+ return (jsxRuntime$1.jsxs(StyledRadioGroup$1, Object.assign({}, radioGroupProps, { className: y(className, { horizontal: orientation === 'horizontal' }), "data-cy": props['data-cy'], id: id, children: [label && (jsxRuntime$1.jsx("div", Object.assign({ className: "groupLabel" }, labelProps, { children: label }))), jsxRuntime$1.jsx(RadioContext.Provider, { value: state, children: children })] })));
7295
7351
  }
7296
7352
  /**
7297
7353
  * A single radio button and its label; no styling is applied, and the native
@@ -7311,7 +7367,7 @@ function Radio$1(props) {
7311
7367
  else {
7312
7368
  isSelected = state.selectedValue === props.value;
7313
7369
  }
7314
- return (jsxRuntime$1.jsxs("label", { className: classNames(className, {
7370
+ return (jsxRuntime$1.jsxs("label", { className: y(className, {
7315
7371
  disabled: isDisabled || state.isDisabled,
7316
7372
  selected: isSelected,
7317
7373
  focused: isFocusVisible,
@@ -7979,7 +8035,7 @@ function addYears(date, amount) {
7979
8035
  * ])
7980
8036
  * //=> Sun Jul 02 1995 00:00:00
7981
8037
  */
7982
- function max$1(dates) {
8038
+ function max$2(dates) {
7983
8039
  let result;
7984
8040
  dates.forEach(function (dirtyDate) {
7985
8041
  const currentDate = toDate(dirtyDate);
@@ -8020,7 +8076,7 @@ function max$1(dates) {
8020
8076
  * ])
8021
8077
  * //=> Wed Feb 11 1987 00:00:00
8022
8078
  */
8023
- function min$1(dates) {
8079
+ function min$2(dates) {
8024
8080
  let result;
8025
8081
 
8026
8082
  dates.forEach((dirtyDate) => {
@@ -19385,10 +19441,10 @@ function getNextFocus(focusedDay, options) {
19385
19441
  };
19386
19442
  var newFocusedDay = moveFns[moveBy](focusedDay, direction === 'after' ? 1 : -1);
19387
19443
  if (direction === 'before' && fromDate) {
19388
- newFocusedDay = max$1([fromDate, newFocusedDay]);
19444
+ newFocusedDay = max$2([fromDate, newFocusedDay]);
19389
19445
  }
19390
19446
  else if (direction === 'after' && toDate) {
19391
- newFocusedDay = min$1([toDate, newFocusedDay]);
19447
+ newFocusedDay = min$2([toDate, newFocusedDay]);
19392
19448
  }
19393
19449
  var isFocusable = true;
19394
19450
  if (modifiers) {
@@ -20307,11 +20363,11 @@ var write = 'write';
20307
20363
  var afterWrite = 'afterWrite';
20308
20364
  var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];
20309
20365
 
20310
- function getNodeName(element) {
20366
+ function getNodeName$1(element) {
20311
20367
  return element ? (element.nodeName || '').toLowerCase() : null;
20312
20368
  }
20313
20369
 
20314
- function getWindow(node) {
20370
+ function getWindow$1(node) {
20315
20371
  if (node == null) {
20316
20372
  return window;
20317
20373
  }
@@ -20324,23 +20380,23 @@ function getWindow(node) {
20324
20380
  return node;
20325
20381
  }
20326
20382
 
20327
- function isElement(node) {
20328
- var OwnElement = getWindow(node).Element;
20383
+ function isElement$1(node) {
20384
+ var OwnElement = getWindow$1(node).Element;
20329
20385
  return node instanceof OwnElement || node instanceof Element;
20330
20386
  }
20331
20387
 
20332
- function isHTMLElement(node) {
20333
- var OwnElement = getWindow(node).HTMLElement;
20388
+ function isHTMLElement$1(node) {
20389
+ var OwnElement = getWindow$1(node).HTMLElement;
20334
20390
  return node instanceof OwnElement || node instanceof HTMLElement;
20335
20391
  }
20336
20392
 
20337
- function isShadowRoot(node) {
20393
+ function isShadowRoot$1(node) {
20338
20394
  // IE 11 has no ShadowRoot
20339
20395
  if (typeof ShadowRoot === 'undefined') {
20340
20396
  return false;
20341
20397
  }
20342
20398
 
20343
- var OwnElement = getWindow(node).ShadowRoot;
20399
+ var OwnElement = getWindow$1(node).ShadowRoot;
20344
20400
  return node instanceof OwnElement || node instanceof ShadowRoot;
20345
20401
  }
20346
20402
 
@@ -20353,7 +20409,7 @@ function applyStyles(_ref) {
20353
20409
  var attributes = state.attributes[name] || {};
20354
20410
  var element = state.elements[name]; // arrow is optional + virtual elements
20355
20411
 
20356
- if (!isHTMLElement(element) || !getNodeName(element)) {
20412
+ if (!isHTMLElement$1(element) || !getNodeName$1(element)) {
20357
20413
  return;
20358
20414
  } // Flow doesn't support to extend this property, but it's the most
20359
20415
  // effective way to apply styles to an HTMLElement
@@ -20405,7 +20461,7 @@ function effect$2(_ref2) {
20405
20461
  return style;
20406
20462
  }, {}); // arrow is optional + virtual elements
20407
20463
 
20408
- if (!isHTMLElement(element) || !getNodeName(element)) {
20464
+ if (!isHTMLElement$1(element) || !getNodeName$1(element)) {
20409
20465
  return;
20410
20466
  }
20411
20467
 
@@ -20431,9 +20487,9 @@ function getBasePlacement(placement) {
20431
20487
  return placement.split('-')[0];
20432
20488
  }
20433
20489
 
20434
- var max = Math.max;
20435
- var min = Math.min;
20436
- var round = Math.round;
20490
+ var max$1 = Math.max;
20491
+ var min$1 = Math.min;
20492
+ var round$1 = Math.round;
20437
20493
 
20438
20494
  function getUAString() {
20439
20495
  var uaData = navigator.userAgentData;
@@ -20451,7 +20507,7 @@ function isLayoutViewport() {
20451
20507
  return !/^((?!chrome|android).)*safari/i.test(getUAString());
20452
20508
  }
20453
20509
 
20454
- function getBoundingClientRect(element, includeScale, isFixedStrategy) {
20510
+ function getBoundingClientRect$1(element, includeScale, isFixedStrategy) {
20455
20511
  if (includeScale === void 0) {
20456
20512
  includeScale = false;
20457
20513
  }
@@ -20464,12 +20520,12 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy) {
20464
20520
  var scaleX = 1;
20465
20521
  var scaleY = 1;
20466
20522
 
20467
- if (includeScale && isHTMLElement(element)) {
20468
- scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
20469
- scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
20523
+ if (includeScale && isHTMLElement$1(element)) {
20524
+ scaleX = element.offsetWidth > 0 ? round$1(clientRect.width) / element.offsetWidth || 1 : 1;
20525
+ scaleY = element.offsetHeight > 0 ? round$1(clientRect.height) / element.offsetHeight || 1 : 1;
20470
20526
  }
20471
20527
 
20472
- var _ref = isElement(element) ? getWindow(element) : window,
20528
+ var _ref = isElement$1(element) ? getWindow$1(element) : window,
20473
20529
  visualViewport = _ref.visualViewport;
20474
20530
 
20475
20531
  var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
@@ -20492,7 +20548,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy) {
20492
20548
  // means it doesn't take into account transforms.
20493
20549
 
20494
20550
  function getLayoutRect(element) {
20495
- var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.
20551
+ var clientRect = getBoundingClientRect$1(element); // Use the clientRect sizes if it's not been transformed.
20496
20552
  // Fixes https://github.com/popperjs/popper-core/issues/1223
20497
20553
 
20498
20554
  var width = element.offsetWidth;
@@ -20520,7 +20576,7 @@ function contains(parent, child) {
20520
20576
  if (parent.contains(child)) {
20521
20577
  return true;
20522
20578
  } // then fallback to custom implementation with Shadow DOM support
20523
- else if (rootNode && isShadowRoot(rootNode)) {
20579
+ else if (rootNode && isShadowRoot$1(rootNode)) {
20524
20580
  var next = child;
20525
20581
 
20526
20582
  do {
@@ -20537,22 +20593,22 @@ function contains(parent, child) {
20537
20593
  return false;
20538
20594
  }
20539
20595
 
20540
- function getComputedStyle$1(element) {
20541
- return getWindow(element).getComputedStyle(element);
20596
+ function getComputedStyle$2(element) {
20597
+ return getWindow$1(element).getComputedStyle(element);
20542
20598
  }
20543
20599
 
20544
- function isTableElement(element) {
20545
- return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;
20600
+ function isTableElement$1(element) {
20601
+ return ['table', 'td', 'th'].indexOf(getNodeName$1(element)) >= 0;
20546
20602
  }
20547
20603
 
20548
- function getDocumentElement(element) {
20604
+ function getDocumentElement$1(element) {
20549
20605
  // $FlowFixMe[incompatible-return]: assume body is always available
20550
- return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]
20606
+ return ((isElement$1(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]
20551
20607
  element.document) || window.document).documentElement;
20552
20608
  }
20553
20609
 
20554
- function getParentNode(element) {
20555
- if (getNodeName(element) === 'html') {
20610
+ function getParentNode$1(element) {
20611
+ if (getNodeName$1(element) === 'html') {
20556
20612
  return element;
20557
20613
  }
20558
20614
 
@@ -20561,16 +20617,16 @@ function getParentNode(element) {
20561
20617
  // $FlowFixMe[prop-missing]
20562
20618
  element.assignedSlot || // step into the shadow DOM of the parent of a slotted node
20563
20619
  element.parentNode || ( // DOM Element detected
20564
- isShadowRoot(element) ? element.host : null) || // ShadowRoot detected
20620
+ isShadowRoot$1(element) ? element.host : null) || // ShadowRoot detected
20565
20621
  // $FlowFixMe[incompatible-call]: HTMLElement is a Node
20566
- getDocumentElement(element) // fallback
20622
+ getDocumentElement$1(element) // fallback
20567
20623
 
20568
20624
  );
20569
20625
  }
20570
20626
 
20571
- function getTrueOffsetParent(element) {
20572
- if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837
20573
- getComputedStyle$1(element).position === 'fixed') {
20627
+ function getTrueOffsetParent$1(element) {
20628
+ if (!isHTMLElement$1(element) || // https://github.com/popperjs/popper-core/issues/837
20629
+ getComputedStyle$2(element).position === 'fixed') {
20574
20630
  return null;
20575
20631
  }
20576
20632
 
@@ -20579,27 +20635,27 @@ function getTrueOffsetParent(element) {
20579
20635
  // return the containing block
20580
20636
 
20581
20637
 
20582
- function getContainingBlock(element) {
20638
+ function getContainingBlock$1(element) {
20583
20639
  var isFirefox = /firefox/i.test(getUAString());
20584
20640
  var isIE = /Trident/i.test(getUAString());
20585
20641
 
20586
- if (isIE && isHTMLElement(element)) {
20642
+ if (isIE && isHTMLElement$1(element)) {
20587
20643
  // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport
20588
- var elementCss = getComputedStyle$1(element);
20644
+ var elementCss = getComputedStyle$2(element);
20589
20645
 
20590
20646
  if (elementCss.position === 'fixed') {
20591
20647
  return null;
20592
20648
  }
20593
20649
  }
20594
20650
 
20595
- var currentNode = getParentNode(element);
20651
+ var currentNode = getParentNode$1(element);
20596
20652
 
20597
- if (isShadowRoot(currentNode)) {
20653
+ if (isShadowRoot$1(currentNode)) {
20598
20654
  currentNode = currentNode.host;
20599
20655
  }
20600
20656
 
20601
- while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {
20602
- var css = getComputedStyle$1(currentNode); // This is non-exhaustive but covers the most common CSS properties that
20657
+ while (isHTMLElement$1(currentNode) && ['html', 'body'].indexOf(getNodeName$1(currentNode)) < 0) {
20658
+ var css = getComputedStyle$2(currentNode); // This is non-exhaustive but covers the most common CSS properties that
20603
20659
  // create a containing block.
20604
20660
  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
20605
20661
 
@@ -20615,27 +20671,27 @@ function getContainingBlock(element) {
20615
20671
  // such as table ancestors and cross browser bugs.
20616
20672
 
20617
20673
 
20618
- function getOffsetParent(element) {
20619
- var window = getWindow(element);
20620
- var offsetParent = getTrueOffsetParent(element);
20674
+ function getOffsetParent$1(element) {
20675
+ var window = getWindow$1(element);
20676
+ var offsetParent = getTrueOffsetParent$1(element);
20621
20677
 
20622
- while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === 'static') {
20623
- offsetParent = getTrueOffsetParent(offsetParent);
20678
+ while (offsetParent && isTableElement$1(offsetParent) && getComputedStyle$2(offsetParent).position === 'static') {
20679
+ offsetParent = getTrueOffsetParent$1(offsetParent);
20624
20680
  }
20625
20681
 
20626
- if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle$1(offsetParent).position === 'static')) {
20682
+ if (offsetParent && (getNodeName$1(offsetParent) === 'html' || getNodeName$1(offsetParent) === 'body' && getComputedStyle$2(offsetParent).position === 'static')) {
20627
20683
  return window;
20628
20684
  }
20629
20685
 
20630
- return offsetParent || getContainingBlock(element) || window;
20686
+ return offsetParent || getContainingBlock$1(element) || window;
20631
20687
  }
20632
20688
 
20633
20689
  function getMainAxisFromPlacement(placement) {
20634
20690
  return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
20635
20691
  }
20636
20692
 
20637
- function within(min$1, value, max$1) {
20638
- return max(min$1, min(value, max$1));
20693
+ function within(min, value, max) {
20694
+ return max$1(min, min$1(value, max));
20639
20695
  }
20640
20696
  function withinMaxClamp(min, value, max) {
20641
20697
  var v = within(min, value, max);
@@ -20669,7 +20725,7 @@ var toPaddingObject = function toPaddingObject(padding, state) {
20669
20725
  return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
20670
20726
  };
20671
20727
 
20672
- function arrow(_ref) {
20728
+ function arrow$2(_ref) {
20673
20729
  var _state$modifiersData$;
20674
20730
 
20675
20731
  var state = _ref.state,
@@ -20692,7 +20748,7 @@ function arrow(_ref) {
20692
20748
  var maxProp = axis === 'y' ? bottom : right;
20693
20749
  var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];
20694
20750
  var startDiff = popperOffsets[axis] - state.rects.reference[axis];
20695
- var arrowOffsetParent = getOffsetParent(arrowElement);
20751
+ var arrowOffsetParent = getOffsetParent$1(arrowElement);
20696
20752
  var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;
20697
20753
  var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is
20698
20754
  // outside of the popper bounds
@@ -20733,11 +20789,11 @@ function effect$1(_ref2) {
20733
20789
  } // eslint-disable-next-line import/no-unused-modules
20734
20790
 
20735
20791
 
20736
- var arrow$1 = {
20792
+ var arrow$3 = {
20737
20793
  name: 'arrow',
20738
20794
  enabled: true,
20739
20795
  phase: 'main',
20740
- fn: arrow,
20796
+ fn: arrow$2,
20741
20797
  effect: effect$1,
20742
20798
  requires: ['popperOffsets'],
20743
20799
  requiresIfExists: ['preventOverflow']
@@ -20761,8 +20817,8 @@ function roundOffsetsByDPR(_ref, win) {
20761
20817
  y = _ref.y;
20762
20818
  var dpr = win.devicePixelRatio || 1;
20763
20819
  return {
20764
- x: round(x * dpr) / dpr || 0,
20765
- y: round(y * dpr) / dpr || 0
20820
+ x: round$1(x * dpr) / dpr || 0,
20821
+ y: round$1(y * dpr) / dpr || 0
20766
20822
  };
20767
20823
  }
20768
20824
 
@@ -20801,14 +20857,14 @@ function mapToStyles(_ref2) {
20801
20857
  var win = window;
20802
20858
 
20803
20859
  if (adaptive) {
20804
- var offsetParent = getOffsetParent(popper);
20860
+ var offsetParent = getOffsetParent$1(popper);
20805
20861
  var heightProp = 'clientHeight';
20806
20862
  var widthProp = 'clientWidth';
20807
20863
 
20808
- if (offsetParent === getWindow(popper)) {
20809
- offsetParent = getDocumentElement(popper);
20864
+ if (offsetParent === getWindow$1(popper)) {
20865
+ offsetParent = getDocumentElement$1(popper);
20810
20866
 
20811
- if (getComputedStyle$1(offsetParent).position !== 'static' && position === 'absolute') {
20867
+ if (getComputedStyle$2(offsetParent).position !== 'static' && position === 'absolute') {
20812
20868
  heightProp = 'scrollHeight';
20813
20869
  widthProp = 'scrollWidth';
20814
20870
  }
@@ -20841,7 +20897,7 @@ function mapToStyles(_ref2) {
20841
20897
  var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
20842
20898
  x: x,
20843
20899
  y: y
20844
- }, getWindow(popper)) : {
20900
+ }, getWindow$1(popper)) : {
20845
20901
  x: x,
20846
20902
  y: y
20847
20903
  };
@@ -20920,7 +20976,7 @@ function effect(_ref) {
20920
20976
  scroll = _options$scroll === void 0 ? true : _options$scroll,
20921
20977
  _options$resize = options.resize,
20922
20978
  resize = _options$resize === void 0 ? true : _options$resize;
20923
- var window = getWindow(state.elements.popper);
20979
+ var window = getWindow$1(state.elements.popper);
20924
20980
  var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);
20925
20981
 
20926
20982
  if (scroll) {
@@ -20962,7 +21018,7 @@ var hash$1 = {
20962
21018
  bottom: 'top',
20963
21019
  top: 'bottom'
20964
21020
  };
20965
- function getOppositePlacement(placement) {
21021
+ function getOppositePlacement$1(placement) {
20966
21022
  return placement.replace(/left|right|bottom|top/g, function (matched) {
20967
21023
  return hash$1[matched];
20968
21024
  });
@@ -20979,7 +21035,7 @@ function getOppositeVariationPlacement(placement) {
20979
21035
  }
20980
21036
 
20981
21037
  function getWindowScroll(node) {
20982
- var win = getWindow(node);
21038
+ var win = getWindow$1(node);
20983
21039
  var scrollLeft = win.pageXOffset;
20984
21040
  var scrollTop = win.pageYOffset;
20985
21041
  return {
@@ -20988,7 +21044,7 @@ function getWindowScroll(node) {
20988
21044
  };
20989
21045
  }
20990
21046
 
20991
- function getWindowScrollBarX(element) {
21047
+ function getWindowScrollBarX$1(element) {
20992
21048
  // If <html> has a CSS width greater than the viewport, then this will be
20993
21049
  // incorrect for RTL.
20994
21050
  // Popper 1 is broken in this case and never had a bug report so let's assume
@@ -20996,12 +21052,12 @@ function getWindowScrollBarX(element) {
20996
21052
  // anyway.
20997
21053
  // Browsers where the left scrollbar doesn't cause an issue report `0` for
20998
21054
  // this (e.g. Edge 2019, IE11, Safari)
20999
- return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;
21055
+ return getBoundingClientRect$1(getDocumentElement$1(element)).left + getWindowScroll(element).scrollLeft;
21000
21056
  }
21001
21057
 
21002
- function getViewportRect(element, strategy) {
21003
- var win = getWindow(element);
21004
- var html = getDocumentElement(element);
21058
+ function getViewportRect$1(element, strategy) {
21059
+ var win = getWindow$1(element);
21060
+ var html = getDocumentElement$1(element);
21005
21061
  var visualViewport = win.visualViewport;
21006
21062
  var width = html.clientWidth;
21007
21063
  var height = html.clientHeight;
@@ -21022,26 +21078,26 @@ function getViewportRect(element, strategy) {
21022
21078
  return {
21023
21079
  width: width,
21024
21080
  height: height,
21025
- x: x + getWindowScrollBarX(element),
21081
+ x: x + getWindowScrollBarX$1(element),
21026
21082
  y: y
21027
21083
  };
21028
21084
  }
21029
21085
 
21030
21086
  // of the `<html>` and `<body>` rect bounds if horizontally scrollable
21031
21087
 
21032
- function getDocumentRect(element) {
21088
+ function getDocumentRect$1(element) {
21033
21089
  var _element$ownerDocumen;
21034
21090
 
21035
- var html = getDocumentElement(element);
21091
+ var html = getDocumentElement$1(element);
21036
21092
  var winScroll = getWindowScroll(element);
21037
21093
  var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
21038
- var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
21039
- var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
21040
- var x = -winScroll.scrollLeft + getWindowScrollBarX(element);
21094
+ var width = max$1(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
21095
+ var height = max$1(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
21096
+ var x = -winScroll.scrollLeft + getWindowScrollBarX$1(element);
21041
21097
  var y = -winScroll.scrollTop;
21042
21098
 
21043
- if (getComputedStyle$1(body || html).direction === 'rtl') {
21044
- x += max(html.clientWidth, body ? body.clientWidth : 0) - width;
21099
+ if (getComputedStyle$2(body || html).direction === 'rtl') {
21100
+ x += max$1(html.clientWidth, body ? body.clientWidth : 0) - width;
21045
21101
  }
21046
21102
 
21047
21103
  return {
@@ -21054,7 +21110,7 @@ function getDocumentRect(element) {
21054
21110
 
21055
21111
  function isScrollParent(element) {
21056
21112
  // Firefox wants us to check `-x` and `-y` variations as well
21057
- var _getComputedStyle = getComputedStyle$1(element),
21113
+ var _getComputedStyle = getComputedStyle$2(element),
21058
21114
  overflow = _getComputedStyle.overflow,
21059
21115
  overflowX = _getComputedStyle.overflowX,
21060
21116
  overflowY = _getComputedStyle.overflowY;
@@ -21063,16 +21119,16 @@ function isScrollParent(element) {
21063
21119
  }
21064
21120
 
21065
21121
  function getScrollParent(node) {
21066
- if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {
21122
+ if (['html', 'body', '#document'].indexOf(getNodeName$1(node)) >= 0) {
21067
21123
  // $FlowFixMe[incompatible-return]: assume body is always available
21068
21124
  return node.ownerDocument.body;
21069
21125
  }
21070
21126
 
21071
- if (isHTMLElement(node) && isScrollParent(node)) {
21127
+ if (isHTMLElement$1(node) && isScrollParent(node)) {
21072
21128
  return node;
21073
21129
  }
21074
21130
 
21075
- return getScrollParent(getParentNode(node));
21131
+ return getScrollParent(getParentNode$1(node));
21076
21132
  }
21077
21133
 
21078
21134
  /*
@@ -21091,14 +21147,14 @@ function listScrollParents(element, list) {
21091
21147
 
21092
21148
  var scrollParent = getScrollParent(element);
21093
21149
  var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);
21094
- var win = getWindow(scrollParent);
21150
+ var win = getWindow$1(scrollParent);
21095
21151
  var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;
21096
21152
  var updatedList = list.concat(target);
21097
21153
  return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
21098
- updatedList.concat(listScrollParents(getParentNode(target)));
21154
+ updatedList.concat(listScrollParents(getParentNode$1(target)));
21099
21155
  }
21100
21156
 
21101
- function rectToClientRect(rect) {
21157
+ function rectToClientRect$1(rect) {
21102
21158
  return Object.assign({}, rect, {
21103
21159
  left: rect.x,
21104
21160
  top: rect.y,
@@ -21107,8 +21163,8 @@ function rectToClientRect(rect) {
21107
21163
  });
21108
21164
  }
21109
21165
 
21110
- function getInnerBoundingClientRect(element, strategy) {
21111
- var rect = getBoundingClientRect(element, false, strategy === 'fixed');
21166
+ function getInnerBoundingClientRect$1(element, strategy) {
21167
+ var rect = getBoundingClientRect$1(element, false, strategy === 'fixed');
21112
21168
  rect.top = rect.top + element.clientTop;
21113
21169
  rect.left = rect.left + element.clientLeft;
21114
21170
  rect.bottom = rect.top + element.clientHeight;
@@ -21121,39 +21177,39 @@ function getInnerBoundingClientRect(element, strategy) {
21121
21177
  }
21122
21178
 
21123
21179
  function getClientRectFromMixedType(element, clippingParent, strategy) {
21124
- return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
21180
+ return clippingParent === viewport ? rectToClientRect$1(getViewportRect$1(element, strategy)) : isElement$1(clippingParent) ? getInnerBoundingClientRect$1(clippingParent, strategy) : rectToClientRect$1(getDocumentRect$1(getDocumentElement$1(element)));
21125
21181
  } // A "clipping parent" is an overflowable container with the characteristic of
21126
21182
  // clipping (or hiding) overflowing elements with a position different from
21127
21183
  // `initial`
21128
21184
 
21129
21185
 
21130
21186
  function getClippingParents(element) {
21131
- var clippingParents = listScrollParents(getParentNode(element));
21132
- var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle$1(element).position) >= 0;
21133
- var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
21187
+ var clippingParents = listScrollParents(getParentNode$1(element));
21188
+ var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle$2(element).position) >= 0;
21189
+ var clipperElement = canEscapeClipping && isHTMLElement$1(element) ? getOffsetParent$1(element) : element;
21134
21190
 
21135
- if (!isElement(clipperElement)) {
21191
+ if (!isElement$1(clipperElement)) {
21136
21192
  return [];
21137
21193
  } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414
21138
21194
 
21139
21195
 
21140
21196
  return clippingParents.filter(function (clippingParent) {
21141
- return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';
21197
+ return isElement$1(clippingParent) && contains(clippingParent, clipperElement) && getNodeName$1(clippingParent) !== 'body';
21142
21198
  });
21143
21199
  } // Gets the maximum area that the element is visible in due to any number of
21144
21200
  // clipping parents
21145
21201
 
21146
21202
 
21147
- function getClippingRect(element, boundary, rootBoundary, strategy) {
21203
+ function getClippingRect$1(element, boundary, rootBoundary, strategy) {
21148
21204
  var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);
21149
21205
  var clippingParents = [].concat(mainClippingParents, [rootBoundary]);
21150
21206
  var firstClippingParent = clippingParents[0];
21151
21207
  var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {
21152
21208
  var rect = getClientRectFromMixedType(element, clippingParent, strategy);
21153
- accRect.top = max(rect.top, accRect.top);
21154
- accRect.right = min(rect.right, accRect.right);
21155
- accRect.bottom = min(rect.bottom, accRect.bottom);
21156
- accRect.left = max(rect.left, accRect.left);
21209
+ accRect.top = max$1(rect.top, accRect.top);
21210
+ accRect.right = min$1(rect.right, accRect.right);
21211
+ accRect.bottom = min$1(rect.bottom, accRect.bottom);
21212
+ accRect.left = max$1(rect.left, accRect.left);
21157
21213
  return accRect;
21158
21214
  }, getClientRectFromMixedType(element, firstClippingParent, strategy));
21159
21215
  clippingRect.width = clippingRect.right - clippingRect.left;
@@ -21228,7 +21284,7 @@ function computeOffsets(_ref) {
21228
21284
  return offsets;
21229
21285
  }
21230
21286
 
21231
- function detectOverflow(state, options) {
21287
+ function detectOverflow$1(state, options) {
21232
21288
  if (options === void 0) {
21233
21289
  options = {};
21234
21290
  }
@@ -21252,15 +21308,15 @@ function detectOverflow(state, options) {
21252
21308
  var altContext = elementContext === popper ? reference : popper;
21253
21309
  var popperRect = state.rects.popper;
21254
21310
  var element = state.elements[altBoundary ? altContext : elementContext];
21255
- var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);
21256
- var referenceClientRect = getBoundingClientRect(state.elements.reference);
21311
+ var clippingClientRect = getClippingRect$1(isElement$1(element) ? element : element.contextElement || getDocumentElement$1(state.elements.popper), boundary, rootBoundary, strategy);
21312
+ var referenceClientRect = getBoundingClientRect$1(state.elements.reference);
21257
21313
  var popperOffsets = computeOffsets({
21258
21314
  reference: referenceClientRect,
21259
21315
  element: popperRect,
21260
21316
  strategy: 'absolute',
21261
21317
  placement: placement
21262
21318
  });
21263
- var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));
21319
+ var popperClientRect = rectToClientRect$1(Object.assign({}, popperRect, popperOffsets));
21264
21320
  var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect
21265
21321
  // 0 or negative = within the clipping rect
21266
21322
 
@@ -21311,7 +21367,7 @@ function computeAutoPlacement(state, options) {
21311
21367
 
21312
21368
 
21313
21369
  var overflows = allowedPlacements.reduce(function (acc, placement) {
21314
- acc[placement] = detectOverflow(state, {
21370
+ acc[placement] = detectOverflow$1(state, {
21315
21371
  placement: placement,
21316
21372
  boundary: boundary,
21317
21373
  rootBoundary: rootBoundary,
@@ -21329,11 +21385,11 @@ function getExpandedFallbackPlacements(placement) {
21329
21385
  return [];
21330
21386
  }
21331
21387
 
21332
- var oppositePlacement = getOppositePlacement(placement);
21388
+ var oppositePlacement = getOppositePlacement$1(placement);
21333
21389
  return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];
21334
21390
  }
21335
21391
 
21336
- function flip(_ref) {
21392
+ function flip$2(_ref) {
21337
21393
  var state = _ref.state,
21338
21394
  options = _ref.options,
21339
21395
  name = _ref.name;
@@ -21357,7 +21413,7 @@ function flip(_ref) {
21357
21413
  var preferredPlacement = state.options.placement;
21358
21414
  var basePlacement = getBasePlacement(preferredPlacement);
21359
21415
  var isBasePlacement = basePlacement === preferredPlacement;
21360
- var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));
21416
+ var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement$1(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));
21361
21417
  var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {
21362
21418
  return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {
21363
21419
  placement: placement,
@@ -21382,7 +21438,7 @@ function flip(_ref) {
21382
21438
  var isStartVariation = getVariation(placement) === start;
21383
21439
  var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;
21384
21440
  var len = isVertical ? 'width' : 'height';
21385
- var overflow = detectOverflow(state, {
21441
+ var overflow = detectOverflow$1(state, {
21386
21442
  placement: placement,
21387
21443
  boundary: boundary,
21388
21444
  rootBoundary: rootBoundary,
@@ -21392,10 +21448,10 @@ function flip(_ref) {
21392
21448
  var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;
21393
21449
 
21394
21450
  if (referenceRect[len] > popperRect[len]) {
21395
- mainVariationSide = getOppositePlacement(mainVariationSide);
21451
+ mainVariationSide = getOppositePlacement$1(mainVariationSide);
21396
21452
  }
21397
21453
 
21398
- var altVariationSide = getOppositePlacement(mainVariationSide);
21454
+ var altVariationSide = getOppositePlacement$1(mainVariationSide);
21399
21455
  var checks = [];
21400
21456
 
21401
21457
  if (checkMainAxis) {
@@ -21453,11 +21509,11 @@ function flip(_ref) {
21453
21509
  } // eslint-disable-next-line import/no-unused-modules
21454
21510
 
21455
21511
 
21456
- var flip$1 = {
21512
+ var flip$3 = {
21457
21513
  name: 'flip',
21458
21514
  enabled: true,
21459
21515
  phase: 'main',
21460
- fn: flip,
21516
+ fn: flip$2,
21461
21517
  requiresIfExists: ['offset'],
21462
21518
  data: {
21463
21519
  _skip: false
@@ -21492,10 +21548,10 @@ function hide$1(_ref) {
21492
21548
  var referenceRect = state.rects.reference;
21493
21549
  var popperRect = state.rects.popper;
21494
21550
  var preventedOffsets = state.modifiersData.preventOverflow;
21495
- var referenceOverflow = detectOverflow(state, {
21551
+ var referenceOverflow = detectOverflow$1(state, {
21496
21552
  elementContext: 'reference'
21497
21553
  });
21498
- var popperAltOverflow = detectOverflow(state, {
21554
+ var popperAltOverflow = detectOverflow$1(state, {
21499
21555
  altBoundary: true
21500
21556
  });
21501
21557
  var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);
@@ -21544,7 +21600,7 @@ function distanceAndSkiddingToXY(placement, rects, offset) {
21544
21600
  };
21545
21601
  }
21546
21602
 
21547
- function offset(_ref2) {
21603
+ function offset$1(_ref2) {
21548
21604
  var state = _ref2.state,
21549
21605
  options = _ref2.options,
21550
21606
  name = _ref2.name;
@@ -21567,12 +21623,12 @@ function offset(_ref2) {
21567
21623
  } // eslint-disable-next-line import/no-unused-modules
21568
21624
 
21569
21625
 
21570
- var offset$1 = {
21626
+ var offset$2 = {
21571
21627
  name: 'offset',
21572
21628
  enabled: true,
21573
21629
  phase: 'main',
21574
21630
  requires: ['popperOffsets'],
21575
- fn: offset
21631
+ fn: offset$1
21576
21632
  };
21577
21633
 
21578
21634
  function popperOffsets(_ref) {
@@ -21619,7 +21675,7 @@ function preventOverflow(_ref) {
21619
21675
  tether = _options$tether === void 0 ? true : _options$tether,
21620
21676
  _options$tetherOffset = options.tetherOffset,
21621
21677
  tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;
21622
- var overflow = detectOverflow(state, {
21678
+ var overflow = detectOverflow$1(state, {
21623
21679
  boundary: boundary,
21624
21680
  rootBoundary: rootBoundary,
21625
21681
  padding: padding,
@@ -21660,8 +21716,8 @@ function preventOverflow(_ref) {
21660
21716
  var altSide = mainAxis === 'y' ? bottom : right;
21661
21717
  var len = mainAxis === 'y' ? 'height' : 'width';
21662
21718
  var offset = popperOffsets[mainAxis];
21663
- var min$1 = offset + overflow[mainSide];
21664
- var max$1 = offset - overflow[altSide];
21719
+ var min = offset + overflow[mainSide];
21720
+ var max = offset - overflow[altSide];
21665
21721
  var additive = tether ? -popperRect[len] / 2 : 0;
21666
21722
  var minLen = variation === start ? referenceRect[len] : popperRect[len];
21667
21723
  var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
@@ -21683,12 +21739,12 @@ function preventOverflow(_ref) {
21683
21739
  var arrowLen = within(0, referenceRect[len], arrowRect[len]);
21684
21740
  var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;
21685
21741
  var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;
21686
- var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
21742
+ var arrowOffsetParent = state.elements.arrow && getOffsetParent$1(state.elements.arrow);
21687
21743
  var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
21688
21744
  var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;
21689
21745
  var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;
21690
21746
  var tetherMax = offset + maxOffset - offsetModifierValue;
21691
- var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
21747
+ var preventedOffset = within(tether ? min$1(min, tetherMin) : min, offset, tether ? max$1(max, tetherMax) : max);
21692
21748
  popperOffsets[mainAxis] = preventedOffset;
21693
21749
  data[mainAxis] = preventedOffset - offset;
21694
21750
  }
@@ -21741,8 +21797,8 @@ function getHTMLElementScroll(element) {
21741
21797
  };
21742
21798
  }
21743
21799
 
21744
- function getNodeScroll(node) {
21745
- if (node === getWindow(node) || !isHTMLElement(node)) {
21800
+ function getNodeScroll$1(node) {
21801
+ if (node === getWindow$1(node) || !isHTMLElement$1(node)) {
21746
21802
  return getWindowScroll(node);
21747
21803
  } else {
21748
21804
  return getHTMLElementScroll(node);
@@ -21751,8 +21807,8 @@ function getNodeScroll(node) {
21751
21807
 
21752
21808
  function isElementScaled(element) {
21753
21809
  var rect = element.getBoundingClientRect();
21754
- var scaleX = round(rect.width) / element.offsetWidth || 1;
21755
- var scaleY = round(rect.height) / element.offsetHeight || 1;
21810
+ var scaleX = round$1(rect.width) / element.offsetWidth || 1;
21811
+ var scaleY = round$1(rect.height) / element.offsetHeight || 1;
21756
21812
  return scaleX !== 1 || scaleY !== 1;
21757
21813
  } // Returns the composite rect of an element relative to its offsetParent.
21758
21814
  // Composite means it takes into account transforms as well as layout.
@@ -21763,10 +21819,10 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
21763
21819
  isFixed = false;
21764
21820
  }
21765
21821
 
21766
- var isOffsetParentAnElement = isHTMLElement(offsetParent);
21767
- var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
21768
- var documentElement = getDocumentElement(offsetParent);
21769
- var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);
21822
+ var isOffsetParentAnElement = isHTMLElement$1(offsetParent);
21823
+ var offsetParentIsScaled = isHTMLElement$1(offsetParent) && isElementScaled(offsetParent);
21824
+ var documentElement = getDocumentElement$1(offsetParent);
21825
+ var rect = getBoundingClientRect$1(elementOrVirtualElement, offsetParentIsScaled, isFixed);
21770
21826
  var scroll = {
21771
21827
  scrollLeft: 0,
21772
21828
  scrollTop: 0
@@ -21777,17 +21833,17 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
21777
21833
  };
21778
21834
 
21779
21835
  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
21780
- if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078
21836
+ if (getNodeName$1(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078
21781
21837
  isScrollParent(documentElement)) {
21782
- scroll = getNodeScroll(offsetParent);
21838
+ scroll = getNodeScroll$1(offsetParent);
21783
21839
  }
21784
21840
 
21785
- if (isHTMLElement(offsetParent)) {
21786
- offsets = getBoundingClientRect(offsetParent, true);
21841
+ if (isHTMLElement$1(offsetParent)) {
21842
+ offsets = getBoundingClientRect$1(offsetParent, true);
21787
21843
  offsets.x += offsetParent.clientLeft;
21788
21844
  offsets.y += offsetParent.clientTop;
21789
21845
  } else if (documentElement) {
21790
- offsets.x = getWindowScrollBarX(documentElement);
21846
+ offsets.x = getWindowScrollBarX$1(documentElement);
21791
21847
  }
21792
21848
  }
21793
21849
 
@@ -21925,7 +21981,7 @@ function popperGenerator(generatorOptions) {
21925
21981
  cleanupModifierEffects();
21926
21982
  state.options = Object.assign({}, defaultOptions, state.options, options);
21927
21983
  state.scrollParents = {
21928
- reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],
21984
+ reference: isElement$1(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],
21929
21985
  popper: listScrollParents(popper)
21930
21986
  }; // Orders the modifiers based on their dependencies and `phase`
21931
21987
  // properties
@@ -21959,7 +22015,7 @@ function popperGenerator(generatorOptions) {
21959
22015
 
21960
22016
 
21961
22017
  state.rects = {
21962
- reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),
22018
+ reference: getCompositeRect(reference, getOffsetParent$1(popper), state.options.strategy === 'fixed'),
21963
22019
  popper: getLayoutRect(popper)
21964
22020
  }; // Modifiers have the ability to reset the current update cycle. The
21965
22021
  // most common use case for this is the `flip` modifier changing the
@@ -22061,7 +22117,7 @@ function popperGenerator(generatorOptions) {
22061
22117
  };
22062
22118
  }
22063
22119
 
22064
- var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$2];
22120
+ var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$2, flip$3, preventOverflow$1, arrow$3, hide$2];
22065
22121
  var createPopper = /*#__PURE__*/popperGenerator({
22066
22122
  defaultModifiers: defaultModifiers
22067
22123
  }); // eslint-disable-next-line import/no-unused-modules
@@ -25552,7 +25608,7 @@ const StyledLoadingAwareContainer = styled__default.default.div `
25552
25608
  */
25553
25609
  function LoadingAwareContainer(props) {
25554
25610
  const { children, className, isLoading, style } = props;
25555
- return (jsxRuntime$1.jsxs(StyledLoadingAwareContainer, { className: classNames({ loading: isLoading }, className), style: style, children: [jsxRuntime$1.jsx(StyledStatusContainer, { role: "status", children: isLoading && 'Loading' }), isLoading ? jsxRuntime$1.jsx(LoadingIndicator, {}) : jsxRuntime$1.jsx(jsxRuntime$1.Fragment, { children: children })] }));
25611
+ return (jsxRuntime$1.jsxs(StyledLoadingAwareContainer, { className: y({ loading: isLoading }, className), style: style, children: [jsxRuntime$1.jsx(StyledStatusContainer, { role: "status", children: isLoading && 'Loading' }), isLoading ? jsxRuntime$1.jsx(LoadingIndicator, {}) : jsxRuntime$1.jsx(jsxRuntime$1.Fragment, { children: children })] }));
25556
25612
  }
25557
25613
 
25558
25614
  const StyledWizard = styled__default.default.div `
@@ -25845,7 +25901,7 @@ function WizardWithSidebar(props) {
25845
25901
  return () => setCurrentStep(steps[0] || '');
25846
25902
  }, []);
25847
25903
  return (jsxRuntime$1.jsxs(StyledWizardWithSidebar, { className: className, "data-cy": props['data-cy'], id: id, backgroundcolor: backgroundColor, color: color, buttoncolor: buttonColor, children: [jsxRuntime$1.jsxs("div", { className: "wizard-sidebar", children: [jsxRuntime$1.jsxs("h2", { children: [" ", wizardTitle] }), steps.map((step, index) => {
25848
- return (jsxRuntime$1.jsxs("div", { className: classNames('sidebar-step', {
25904
+ return (jsxRuntime$1.jsxs("div", { className: y('sidebar-step', {
25849
25905
  ['current-step']: index === steps.indexOf(currentStep),
25850
25906
  ['prior-step']: index < steps.indexOf(currentStep),
25851
25907
  }), children: [(Object.keys(validationErrors ? validationErrors : []).some((error) => stepSchema[step].inputsRequiringValidation.includes(error)) ||
@@ -25989,15 +26045,15 @@ const StyledDrawerLinkList = styled__default.default.div `
25989
26045
 
25990
26046
  const DrawerLinkList = (props) => {
25991
26047
  const { className, style = {}, id, listItems, isOpen } = props, restOfProps = __rest$1(props, ["className", "style", "id", "listItems", "isOpen"]);
25992
- return (jsxRuntime$1.jsx(StyledDrawerLinkList, Object.assign({ id: id, "data-cy": props['data-cy'], "data-testid": props['data-testid'], style: style }, restOfProps, { className: classNames('drawer__content__list', className), children: listItems && (jsxRuntime$1.jsx("ul", { className: "drawer__list", children: listItems.map((item) => (jsxRuntime$1.jsx(reactRouterDom.NavLink, { to: item.path, className: ({ isActive, isPending }) => {
25993
- return classNames('drawer__list__item', { 'drawer__list__item--active': isActive }, { 'drawer__list__item--pending': isPending });
26048
+ return (jsxRuntime$1.jsx(StyledDrawerLinkList, Object.assign({ id: id, "data-cy": props['data-cy'], "data-testid": props['data-testid'], style: style }, restOfProps, { className: y('drawer__content__list', className), children: listItems && (jsxRuntime$1.jsx("ul", { className: "drawer__list", children: listItems.map((item) => (jsxRuntime$1.jsx(reactRouterDom.NavLink, { to: item.path, className: ({ isActive, isPending }) => {
26049
+ return y('drawer__list__item', { 'drawer__list__item--active': isActive }, { 'drawer__list__item--pending': isPending });
25994
26050
  }, role: "link", "aria-label": item.label, "data-testid": `link-list-item-${item.label}`, children: jsxRuntime$1.jsxs("li", { className: "drawer__list__item__link", children: [jsxRuntime$1.jsx("span", { className: `drawer__list__item__icon`, children: jsxRuntime$1.jsx(Icon, { size: [22], name: item.icon, ariaLabel: `${item.label} icon` }) }), jsxRuntime$1.jsx("span", { className: `drawer__list__item__label ${!isOpen ? 'drawer__list__item__label--hidden' : ''}`, "aria-hidden": !isOpen, "data-testid": "list-item-label", children: item.label })] }) }, item.id))) })) })));
25995
26051
  };
25996
26052
 
25997
26053
  const Drawer = (props) => {
25998
26054
  const { id, className, style = {}, logoText, logoIcon, navigationItems, footerItems, headerComponent, $expandedWidth, $collapsedWidth } = props, restOfProps = __rest$1(props, ["id", "className", "style", "logoText", "logoIcon", "navigationItems", "footerItems", "headerComponent", "$expandedWidth", "$collapsedWidth"]);
25999
26055
  const [isOpen, setIsOpen] = React__namespace.default.useState(false);
26000
- const drawerClasses = classNames('drawer', className, {
26056
+ const drawerClasses = y('drawer', className, {
26001
26057
  'drawer--open': isOpen,
26002
26058
  'drawer--closed': !isOpen,
26003
26059
  });
@@ -26012,8 +26068,8 @@ const Drawer = (props) => {
26012
26068
 
26013
26069
  const StyledTextTruncate = styled__default.default.span ``;
26014
26070
 
26015
- function TextTruncate({ string, maxChars, children }) {
26016
- return string.length > maxChars ? (jsxRuntime$1.jsxs(StyledTextTruncate, { title: string, children: [`${string.substring(0, maxChars)}...`, children] })) : (jsxRuntime$1.jsxs(StyledTextTruncate, { children: [string, children] }));
26071
+ function TextTruncate({ string, maxChars, children, noTitle }) {
26072
+ return string.length > maxChars ? (jsxRuntime$1.jsxs(StyledTextTruncate, { title: noTitle ? undefined : string, children: [`${string.substring(0, maxChars)}...`, children] })) : (jsxRuntime$1.jsxs(StyledTextTruncate, { children: [string, children] }));
26017
26073
  }
26018
26074
 
26019
26075
  const StyledToggle = styled__default.default.label `
@@ -26101,11 +26157,1571 @@ const StyledToggle = styled__default.default.label `
26101
26157
 
26102
26158
  const Toggle = (props) => {
26103
26159
  const { disabled, onChange, value, className, id, checkedIconName, notCheckedIconName, iconSize, } = props;
26104
- return (jsxRuntime$1.jsxs(StyledToggle, { className: classNames(className, {
26160
+ return (jsxRuntime$1.jsxs(StyledToggle, { className: y(className, {
26105
26161
  disabled,
26106
26162
  }), "data-cy": props['data-cy'], id: id, children: [jsxRuntime$1.jsx("input", { "aria-label": props['aria-label'], type: "checkbox", disabled: disabled, checked: value, onChange: onChange }), jsxRuntime$1.jsx("span", { className: "slider round" }), checkedIconName && (jsxRuntime$1.jsx(Icon, { name: checkedIconName, size: [iconSize || 5], className: "checked-icon" })), notCheckedIconName && (jsxRuntime$1.jsx(Icon, { name: notCheckedIconName, size: [iconSize || 5], className: "not-checked-icon" }))] }));
26107
26163
  };
26108
26164
 
26165
+ /**
26166
+ * Custom positioning reference element.
26167
+ * @see https://floating-ui.com/docs/virtual-elements
26168
+ */
26169
+
26170
+ const min = Math.min;
26171
+ const max = Math.max;
26172
+ const round = Math.round;
26173
+ const floor = Math.floor;
26174
+ const createCoords = v => ({
26175
+ x: v,
26176
+ y: v
26177
+ });
26178
+ const oppositeSideMap = {
26179
+ left: 'right',
26180
+ right: 'left',
26181
+ bottom: 'top',
26182
+ top: 'bottom'
26183
+ };
26184
+ const oppositeAlignmentMap = {
26185
+ start: 'end',
26186
+ end: 'start'
26187
+ };
26188
+ function clamp(start, value, end) {
26189
+ return max(start, min(value, end));
26190
+ }
26191
+ function evaluate(value, param) {
26192
+ return typeof value === 'function' ? value(param) : value;
26193
+ }
26194
+ function getSide(placement) {
26195
+ return placement.split('-')[0];
26196
+ }
26197
+ function getAlignment(placement) {
26198
+ return placement.split('-')[1];
26199
+ }
26200
+ function getOppositeAxis(axis) {
26201
+ return axis === 'x' ? 'y' : 'x';
26202
+ }
26203
+ function getAxisLength(axis) {
26204
+ return axis === 'y' ? 'height' : 'width';
26205
+ }
26206
+ function getSideAxis(placement) {
26207
+ return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';
26208
+ }
26209
+ function getAlignmentAxis(placement) {
26210
+ return getOppositeAxis(getSideAxis(placement));
26211
+ }
26212
+ function getAlignmentSides(placement, rects, rtl) {
26213
+ if (rtl === void 0) {
26214
+ rtl = false;
26215
+ }
26216
+ const alignment = getAlignment(placement);
26217
+ const alignmentAxis = getAlignmentAxis(placement);
26218
+ const length = getAxisLength(alignmentAxis);
26219
+ let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
26220
+ if (rects.reference[length] > rects.floating[length]) {
26221
+ mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
26222
+ }
26223
+ return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
26224
+ }
26225
+ function getExpandedPlacements(placement) {
26226
+ const oppositePlacement = getOppositePlacement(placement);
26227
+ return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
26228
+ }
26229
+ function getOppositeAlignmentPlacement(placement) {
26230
+ return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
26231
+ }
26232
+ function getSideList(side, isStart, rtl) {
26233
+ const lr = ['left', 'right'];
26234
+ const rl = ['right', 'left'];
26235
+ const tb = ['top', 'bottom'];
26236
+ const bt = ['bottom', 'top'];
26237
+ switch (side) {
26238
+ case 'top':
26239
+ case 'bottom':
26240
+ if (rtl) return isStart ? rl : lr;
26241
+ return isStart ? lr : rl;
26242
+ case 'left':
26243
+ case 'right':
26244
+ return isStart ? tb : bt;
26245
+ default:
26246
+ return [];
26247
+ }
26248
+ }
26249
+ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
26250
+ const alignment = getAlignment(placement);
26251
+ let list = getSideList(getSide(placement), direction === 'start', rtl);
26252
+ if (alignment) {
26253
+ list = list.map(side => side + "-" + alignment);
26254
+ if (flipAlignment) {
26255
+ list = list.concat(list.map(getOppositeAlignmentPlacement));
26256
+ }
26257
+ }
26258
+ return list;
26259
+ }
26260
+ function getOppositePlacement(placement) {
26261
+ return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
26262
+ }
26263
+ function expandPaddingObject(padding) {
26264
+ return {
26265
+ top: 0,
26266
+ right: 0,
26267
+ bottom: 0,
26268
+ left: 0,
26269
+ ...padding
26270
+ };
26271
+ }
26272
+ function getPaddingObject(padding) {
26273
+ return typeof padding !== 'number' ? expandPaddingObject(padding) : {
26274
+ top: padding,
26275
+ right: padding,
26276
+ bottom: padding,
26277
+ left: padding
26278
+ };
26279
+ }
26280
+ function rectToClientRect(rect) {
26281
+ return {
26282
+ ...rect,
26283
+ top: rect.y,
26284
+ left: rect.x,
26285
+ right: rect.x + rect.width,
26286
+ bottom: rect.y + rect.height
26287
+ };
26288
+ }
26289
+
26290
+ function computeCoordsFromPlacement(_ref, placement, rtl) {
26291
+ let {
26292
+ reference,
26293
+ floating
26294
+ } = _ref;
26295
+ const sideAxis = getSideAxis(placement);
26296
+ const alignmentAxis = getAlignmentAxis(placement);
26297
+ const alignLength = getAxisLength(alignmentAxis);
26298
+ const side = getSide(placement);
26299
+ const isVertical = sideAxis === 'y';
26300
+ const commonX = reference.x + reference.width / 2 - floating.width / 2;
26301
+ const commonY = reference.y + reference.height / 2 - floating.height / 2;
26302
+ const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
26303
+ let coords;
26304
+ switch (side) {
26305
+ case 'top':
26306
+ coords = {
26307
+ x: commonX,
26308
+ y: reference.y - floating.height
26309
+ };
26310
+ break;
26311
+ case 'bottom':
26312
+ coords = {
26313
+ x: commonX,
26314
+ y: reference.y + reference.height
26315
+ };
26316
+ break;
26317
+ case 'right':
26318
+ coords = {
26319
+ x: reference.x + reference.width,
26320
+ y: commonY
26321
+ };
26322
+ break;
26323
+ case 'left':
26324
+ coords = {
26325
+ x: reference.x - floating.width,
26326
+ y: commonY
26327
+ };
26328
+ break;
26329
+ default:
26330
+ coords = {
26331
+ x: reference.x,
26332
+ y: reference.y
26333
+ };
26334
+ }
26335
+ switch (getAlignment(placement)) {
26336
+ case 'start':
26337
+ coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
26338
+ break;
26339
+ case 'end':
26340
+ coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
26341
+ break;
26342
+ }
26343
+ return coords;
26344
+ }
26345
+
26346
+ /**
26347
+ * Computes the `x` and `y` coordinates that will place the floating element
26348
+ * next to a given reference element.
26349
+ *
26350
+ * This export does not have any `platform` interface logic. You will need to
26351
+ * write one for the platform you are using Floating UI with.
26352
+ */
26353
+ const computePosition$1 = async (reference, floating, config) => {
26354
+ const {
26355
+ placement = 'bottom',
26356
+ strategy = 'absolute',
26357
+ middleware = [],
26358
+ platform
26359
+ } = config;
26360
+ const validMiddleware = middleware.filter(Boolean);
26361
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
26362
+ let rects = await platform.getElementRects({
26363
+ reference,
26364
+ floating,
26365
+ strategy
26366
+ });
26367
+ let {
26368
+ x,
26369
+ y
26370
+ } = computeCoordsFromPlacement(rects, placement, rtl);
26371
+ let statefulPlacement = placement;
26372
+ let middlewareData = {};
26373
+ let resetCount = 0;
26374
+ for (let i = 0; i < validMiddleware.length; i++) {
26375
+ const {
26376
+ name,
26377
+ fn
26378
+ } = validMiddleware[i];
26379
+ const {
26380
+ x: nextX,
26381
+ y: nextY,
26382
+ data,
26383
+ reset
26384
+ } = await fn({
26385
+ x,
26386
+ y,
26387
+ initialPlacement: placement,
26388
+ placement: statefulPlacement,
26389
+ strategy,
26390
+ middlewareData,
26391
+ rects,
26392
+ platform,
26393
+ elements: {
26394
+ reference,
26395
+ floating
26396
+ }
26397
+ });
26398
+ x = nextX != null ? nextX : x;
26399
+ y = nextY != null ? nextY : y;
26400
+ middlewareData = {
26401
+ ...middlewareData,
26402
+ [name]: {
26403
+ ...middlewareData[name],
26404
+ ...data
26405
+ }
26406
+ };
26407
+ if (reset && resetCount <= 50) {
26408
+ resetCount++;
26409
+ if (typeof reset === 'object') {
26410
+ if (reset.placement) {
26411
+ statefulPlacement = reset.placement;
26412
+ }
26413
+ if (reset.rects) {
26414
+ rects = reset.rects === true ? await platform.getElementRects({
26415
+ reference,
26416
+ floating,
26417
+ strategy
26418
+ }) : reset.rects;
26419
+ }
26420
+ ({
26421
+ x,
26422
+ y
26423
+ } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
26424
+ }
26425
+ i = -1;
26426
+ }
26427
+ }
26428
+ return {
26429
+ x,
26430
+ y,
26431
+ placement: statefulPlacement,
26432
+ strategy,
26433
+ middlewareData
26434
+ };
26435
+ };
26436
+
26437
+ /**
26438
+ * Resolves with an object of overflow side offsets that determine how much the
26439
+ * element is overflowing a given clipping boundary on each side.
26440
+ * - positive = overflowing the boundary by that number of pixels
26441
+ * - negative = how many pixels left before it will overflow
26442
+ * - 0 = lies flush with the boundary
26443
+ * @see https://floating-ui.com/docs/detectOverflow
26444
+ */
26445
+ async function detectOverflow(state, options) {
26446
+ var _await$platform$isEle;
26447
+ if (options === void 0) {
26448
+ options = {};
26449
+ }
26450
+ const {
26451
+ x,
26452
+ y,
26453
+ platform,
26454
+ rects,
26455
+ elements,
26456
+ strategy
26457
+ } = state;
26458
+ const {
26459
+ boundary = 'clippingAncestors',
26460
+ rootBoundary = 'viewport',
26461
+ elementContext = 'floating',
26462
+ altBoundary = false,
26463
+ padding = 0
26464
+ } = evaluate(options, state);
26465
+ const paddingObject = getPaddingObject(padding);
26466
+ const altContext = elementContext === 'floating' ? 'reference' : 'floating';
26467
+ const element = elements[altBoundary ? altContext : elementContext];
26468
+ const clippingClientRect = rectToClientRect(await platform.getClippingRect({
26469
+ element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
26470
+ boundary,
26471
+ rootBoundary,
26472
+ strategy
26473
+ }));
26474
+ const rect = elementContext === 'floating' ? {
26475
+ ...rects.floating,
26476
+ x,
26477
+ y
26478
+ } : rects.reference;
26479
+ const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
26480
+ const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
26481
+ x: 1,
26482
+ y: 1
26483
+ } : {
26484
+ x: 1,
26485
+ y: 1
26486
+ };
26487
+ const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
26488
+ elements,
26489
+ rect,
26490
+ offsetParent,
26491
+ strategy
26492
+ }) : rect);
26493
+ return {
26494
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
26495
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
26496
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
26497
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
26498
+ };
26499
+ }
26500
+
26501
+ /**
26502
+ * Provides data to position an inner element of the floating element so that it
26503
+ * appears centered to the reference element.
26504
+ * @see https://floating-ui.com/docs/arrow
26505
+ */
26506
+ const arrow$1 = options => ({
26507
+ name: 'arrow',
26508
+ options,
26509
+ async fn(state) {
26510
+ const {
26511
+ x,
26512
+ y,
26513
+ placement,
26514
+ rects,
26515
+ platform,
26516
+ elements,
26517
+ middlewareData
26518
+ } = state;
26519
+ // Since `element` is required, we don't Partial<> the type.
26520
+ const {
26521
+ element,
26522
+ padding = 0
26523
+ } = evaluate(options, state) || {};
26524
+ if (element == null) {
26525
+ return {};
26526
+ }
26527
+ const paddingObject = getPaddingObject(padding);
26528
+ const coords = {
26529
+ x,
26530
+ y
26531
+ };
26532
+ const axis = getAlignmentAxis(placement);
26533
+ const length = getAxisLength(axis);
26534
+ const arrowDimensions = await platform.getDimensions(element);
26535
+ const isYAxis = axis === 'y';
26536
+ const minProp = isYAxis ? 'top' : 'left';
26537
+ const maxProp = isYAxis ? 'bottom' : 'right';
26538
+ const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';
26539
+ const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
26540
+ const startDiff = coords[axis] - rects.reference[axis];
26541
+ const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
26542
+ let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
26543
+
26544
+ // DOM platform can return `window` as the `offsetParent`.
26545
+ if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {
26546
+ clientSize = elements.floating[clientProp] || rects.floating[length];
26547
+ }
26548
+ const centerToReference = endDiff / 2 - startDiff / 2;
26549
+
26550
+ // If the padding is large enough that it causes the arrow to no longer be
26551
+ // centered, modify the padding so that it is centered.
26552
+ const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
26553
+ const minPadding = min(paddingObject[minProp], largestPossiblePadding);
26554
+ const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);
26555
+
26556
+ // Make sure the arrow doesn't overflow the floating element if the center
26557
+ // point is outside the floating element's bounds.
26558
+ const min$1 = minPadding;
26559
+ const max = clientSize - arrowDimensions[length] - maxPadding;
26560
+ const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
26561
+ const offset = clamp(min$1, center, max);
26562
+
26563
+ // If the reference is small enough that the arrow's padding causes it to
26564
+ // to point to nothing for an aligned placement, adjust the offset of the
26565
+ // floating element itself. To ensure `shift()` continues to take action,
26566
+ // a single reset is performed when this is true.
26567
+ const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
26568
+ const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;
26569
+ return {
26570
+ [axis]: coords[axis] + alignmentOffset,
26571
+ data: {
26572
+ [axis]: offset,
26573
+ centerOffset: center - offset - alignmentOffset,
26574
+ ...(shouldAddOffset && {
26575
+ alignmentOffset
26576
+ })
26577
+ },
26578
+ reset: shouldAddOffset
26579
+ };
26580
+ }
26581
+ });
26582
+
26583
+ /**
26584
+ * Optimizes the visibility of the floating element by flipping the `placement`
26585
+ * in order to keep it in view when the preferred placement(s) will overflow the
26586
+ * clipping boundary. Alternative to `autoPlacement`.
26587
+ * @see https://floating-ui.com/docs/flip
26588
+ */
26589
+ const flip$1 = function (options) {
26590
+ if (options === void 0) {
26591
+ options = {};
26592
+ }
26593
+ return {
26594
+ name: 'flip',
26595
+ options,
26596
+ async fn(state) {
26597
+ var _middlewareData$arrow, _middlewareData$flip;
26598
+ const {
26599
+ placement,
26600
+ middlewareData,
26601
+ rects,
26602
+ initialPlacement,
26603
+ platform,
26604
+ elements
26605
+ } = state;
26606
+ const {
26607
+ mainAxis: checkMainAxis = true,
26608
+ crossAxis: checkCrossAxis = true,
26609
+ fallbackPlacements: specifiedFallbackPlacements,
26610
+ fallbackStrategy = 'bestFit',
26611
+ fallbackAxisSideDirection = 'none',
26612
+ flipAlignment = true,
26613
+ ...detectOverflowOptions
26614
+ } = evaluate(options, state);
26615
+
26616
+ // If a reset by the arrow was caused due to an alignment offset being
26617
+ // added, we should skip any logic now since `flip()` has already done its
26618
+ // work.
26619
+ // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643
26620
+ if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
26621
+ return {};
26622
+ }
26623
+ const side = getSide(placement);
26624
+ const isBasePlacement = getSide(initialPlacement) === initialPlacement;
26625
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
26626
+ const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
26627
+ if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== 'none') {
26628
+ fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
26629
+ }
26630
+ const placements = [initialPlacement, ...fallbackPlacements];
26631
+ const overflow = await detectOverflow(state, detectOverflowOptions);
26632
+ const overflows = [];
26633
+ let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
26634
+ if (checkMainAxis) {
26635
+ overflows.push(overflow[side]);
26636
+ }
26637
+ if (checkCrossAxis) {
26638
+ const sides = getAlignmentSides(placement, rects, rtl);
26639
+ overflows.push(overflow[sides[0]], overflow[sides[1]]);
26640
+ }
26641
+ overflowsData = [...overflowsData, {
26642
+ placement,
26643
+ overflows
26644
+ }];
26645
+
26646
+ // One or more sides is overflowing.
26647
+ if (!overflows.every(side => side <= 0)) {
26648
+ var _middlewareData$flip2, _overflowsData$filter;
26649
+ const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
26650
+ const nextPlacement = placements[nextIndex];
26651
+ if (nextPlacement) {
26652
+ // Try next placement and re-run the lifecycle.
26653
+ return {
26654
+ data: {
26655
+ index: nextIndex,
26656
+ overflows: overflowsData
26657
+ },
26658
+ reset: {
26659
+ placement: nextPlacement
26660
+ }
26661
+ };
26662
+ }
26663
+
26664
+ // First, find the candidates that fit on the mainAxis side of overflow,
26665
+ // then find the placement that fits the best on the main crossAxis side.
26666
+ let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
26667
+
26668
+ // Otherwise fallback.
26669
+ if (!resetPlacement) {
26670
+ switch (fallbackStrategy) {
26671
+ case 'bestFit':
26672
+ {
26673
+ var _overflowsData$map$so;
26674
+ const placement = (_overflowsData$map$so = overflowsData.map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0];
26675
+ if (placement) {
26676
+ resetPlacement = placement;
26677
+ }
26678
+ break;
26679
+ }
26680
+ case 'initialPlacement':
26681
+ resetPlacement = initialPlacement;
26682
+ break;
26683
+ }
26684
+ }
26685
+ if (placement !== resetPlacement) {
26686
+ return {
26687
+ reset: {
26688
+ placement: resetPlacement
26689
+ }
26690
+ };
26691
+ }
26692
+ }
26693
+ return {};
26694
+ }
26695
+ };
26696
+ };
26697
+
26698
+ // For type backwards-compatibility, the `OffsetOptions` type was also
26699
+ // Derivable.
26700
+
26701
+ async function convertValueToCoords(state, options) {
26702
+ const {
26703
+ placement,
26704
+ platform,
26705
+ elements
26706
+ } = state;
26707
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
26708
+ const side = getSide(placement);
26709
+ const alignment = getAlignment(placement);
26710
+ const isVertical = getSideAxis(placement) === 'y';
26711
+ const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
26712
+ const crossAxisMulti = rtl && isVertical ? -1 : 1;
26713
+ const rawValue = evaluate(options, state);
26714
+ let {
26715
+ mainAxis,
26716
+ crossAxis,
26717
+ alignmentAxis
26718
+ } = typeof rawValue === 'number' ? {
26719
+ mainAxis: rawValue,
26720
+ crossAxis: 0,
26721
+ alignmentAxis: null
26722
+ } : {
26723
+ mainAxis: 0,
26724
+ crossAxis: 0,
26725
+ alignmentAxis: null,
26726
+ ...rawValue
26727
+ };
26728
+ if (alignment && typeof alignmentAxis === 'number') {
26729
+ crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
26730
+ }
26731
+ return isVertical ? {
26732
+ x: crossAxis * crossAxisMulti,
26733
+ y: mainAxis * mainAxisMulti
26734
+ } : {
26735
+ x: mainAxis * mainAxisMulti,
26736
+ y: crossAxis * crossAxisMulti
26737
+ };
26738
+ }
26739
+
26740
+ /**
26741
+ * Modifies the placement by translating the floating element along the
26742
+ * specified axes.
26743
+ * A number (shorthand for `mainAxis` or distance), or an axes configuration
26744
+ * object may be passed.
26745
+ * @see https://floating-ui.com/docs/offset
26746
+ */
26747
+ const offset = function (options) {
26748
+ if (options === void 0) {
26749
+ options = 0;
26750
+ }
26751
+ return {
26752
+ name: 'offset',
26753
+ options,
26754
+ async fn(state) {
26755
+ var _middlewareData$offse, _middlewareData$arrow;
26756
+ const {
26757
+ x,
26758
+ y,
26759
+ placement,
26760
+ middlewareData
26761
+ } = state;
26762
+ const diffCoords = await convertValueToCoords(state, options);
26763
+
26764
+ // If the placement is the same and the arrow caused an alignment offset
26765
+ // then we don't need to change the positioning coordinates.
26766
+ if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
26767
+ return {};
26768
+ }
26769
+ return {
26770
+ x: x + diffCoords.x,
26771
+ y: y + diffCoords.y,
26772
+ data: {
26773
+ ...diffCoords,
26774
+ placement
26775
+ }
26776
+ };
26777
+ }
26778
+ };
26779
+ };
26780
+
26781
+ /**
26782
+ * Optimizes the visibility of the floating element by shifting it in order to
26783
+ * keep it in view when it will overflow the clipping boundary.
26784
+ * @see https://floating-ui.com/docs/shift
26785
+ */
26786
+ const shift$1 = function (options) {
26787
+ if (options === void 0) {
26788
+ options = {};
26789
+ }
26790
+ return {
26791
+ name: 'shift',
26792
+ options,
26793
+ async fn(state) {
26794
+ const {
26795
+ x,
26796
+ y,
26797
+ placement
26798
+ } = state;
26799
+ const {
26800
+ mainAxis: checkMainAxis = true,
26801
+ crossAxis: checkCrossAxis = false,
26802
+ limiter = {
26803
+ fn: _ref => {
26804
+ let {
26805
+ x,
26806
+ y
26807
+ } = _ref;
26808
+ return {
26809
+ x,
26810
+ y
26811
+ };
26812
+ }
26813
+ },
26814
+ ...detectOverflowOptions
26815
+ } = evaluate(options, state);
26816
+ const coords = {
26817
+ x,
26818
+ y
26819
+ };
26820
+ const overflow = await detectOverflow(state, detectOverflowOptions);
26821
+ const crossAxis = getSideAxis(getSide(placement));
26822
+ const mainAxis = getOppositeAxis(crossAxis);
26823
+ let mainAxisCoord = coords[mainAxis];
26824
+ let crossAxisCoord = coords[crossAxis];
26825
+ if (checkMainAxis) {
26826
+ const minSide = mainAxis === 'y' ? 'top' : 'left';
26827
+ const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
26828
+ const min = mainAxisCoord + overflow[minSide];
26829
+ const max = mainAxisCoord - overflow[maxSide];
26830
+ mainAxisCoord = clamp(min, mainAxisCoord, max);
26831
+ }
26832
+ if (checkCrossAxis) {
26833
+ const minSide = crossAxis === 'y' ? 'top' : 'left';
26834
+ const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
26835
+ const min = crossAxisCoord + overflow[minSide];
26836
+ const max = crossAxisCoord - overflow[maxSide];
26837
+ crossAxisCoord = clamp(min, crossAxisCoord, max);
26838
+ }
26839
+ const limitedCoords = limiter.fn({
26840
+ ...state,
26841
+ [mainAxis]: mainAxisCoord,
26842
+ [crossAxis]: crossAxisCoord
26843
+ });
26844
+ return {
26845
+ ...limitedCoords,
26846
+ data: {
26847
+ x: limitedCoords.x - x,
26848
+ y: limitedCoords.y - y
26849
+ }
26850
+ };
26851
+ }
26852
+ };
26853
+ };
26854
+
26855
+ function getNodeName(node) {
26856
+ if (isNode(node)) {
26857
+ return (node.nodeName || '').toLowerCase();
26858
+ }
26859
+ // Mocked nodes in testing environments may not be instances of Node. By
26860
+ // returning `#document` an infinite loop won't occur.
26861
+ // https://github.com/floating-ui/floating-ui/issues/2317
26862
+ return '#document';
26863
+ }
26864
+ function getWindow(node) {
26865
+ var _node$ownerDocument;
26866
+ return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
26867
+ }
26868
+ function getDocumentElement(node) {
26869
+ var _ref;
26870
+ return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
26871
+ }
26872
+ function isNode(value) {
26873
+ return value instanceof Node || value instanceof getWindow(value).Node;
26874
+ }
26875
+ function isElement(value) {
26876
+ return value instanceof Element || value instanceof getWindow(value).Element;
26877
+ }
26878
+ function isHTMLElement(value) {
26879
+ return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
26880
+ }
26881
+ function isShadowRoot(value) {
26882
+ // Browsers without `ShadowRoot` support.
26883
+ if (typeof ShadowRoot === 'undefined') {
26884
+ return false;
26885
+ }
26886
+ return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
26887
+ }
26888
+ function isOverflowElement(element) {
26889
+ const {
26890
+ overflow,
26891
+ overflowX,
26892
+ overflowY,
26893
+ display
26894
+ } = getComputedStyle$1(element);
26895
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
26896
+ }
26897
+ function isTableElement(element) {
26898
+ return ['table', 'td', 'th'].includes(getNodeName(element));
26899
+ }
26900
+ function isContainingBlock(element) {
26901
+ const webkit = isWebKit();
26902
+ const css = getComputedStyle$1(element);
26903
+
26904
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
26905
+ return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
26906
+ }
26907
+ function getContainingBlock(element) {
26908
+ let currentNode = getParentNode(element);
26909
+ while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
26910
+ if (isContainingBlock(currentNode)) {
26911
+ return currentNode;
26912
+ } else {
26913
+ currentNode = getParentNode(currentNode);
26914
+ }
26915
+ }
26916
+ return null;
26917
+ }
26918
+ function isWebKit() {
26919
+ if (typeof CSS === 'undefined' || !CSS.supports) return false;
26920
+ return CSS.supports('-webkit-backdrop-filter', 'none');
26921
+ }
26922
+ function isLastTraversableNode(node) {
26923
+ return ['html', 'body', '#document'].includes(getNodeName(node));
26924
+ }
26925
+ function getComputedStyle$1(element) {
26926
+ return getWindow(element).getComputedStyle(element);
26927
+ }
26928
+ function getNodeScroll(element) {
26929
+ if (isElement(element)) {
26930
+ return {
26931
+ scrollLeft: element.scrollLeft,
26932
+ scrollTop: element.scrollTop
26933
+ };
26934
+ }
26935
+ return {
26936
+ scrollLeft: element.pageXOffset,
26937
+ scrollTop: element.pageYOffset
26938
+ };
26939
+ }
26940
+ function getParentNode(node) {
26941
+ if (getNodeName(node) === 'html') {
26942
+ return node;
26943
+ }
26944
+ const result =
26945
+ // Step into the shadow DOM of the parent of a slotted node.
26946
+ node.assignedSlot ||
26947
+ // DOM Element detected.
26948
+ node.parentNode ||
26949
+ // ShadowRoot detected.
26950
+ isShadowRoot(node) && node.host ||
26951
+ // Fallback.
26952
+ getDocumentElement(node);
26953
+ return isShadowRoot(result) ? result.host : result;
26954
+ }
26955
+ function getNearestOverflowAncestor(node) {
26956
+ const parentNode = getParentNode(node);
26957
+ if (isLastTraversableNode(parentNode)) {
26958
+ return node.ownerDocument ? node.ownerDocument.body : node.body;
26959
+ }
26960
+ if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
26961
+ return parentNode;
26962
+ }
26963
+ return getNearestOverflowAncestor(parentNode);
26964
+ }
26965
+ function getOverflowAncestors(node, list, traverseIframes) {
26966
+ var _node$ownerDocument2;
26967
+ if (list === void 0) {
26968
+ list = [];
26969
+ }
26970
+ if (traverseIframes === void 0) {
26971
+ traverseIframes = true;
26972
+ }
26973
+ const scrollableAncestor = getNearestOverflowAncestor(node);
26974
+ const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
26975
+ const win = getWindow(scrollableAncestor);
26976
+ if (isBody) {
26977
+ return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []);
26978
+ }
26979
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
26980
+ }
26981
+
26982
+ function getCssDimensions(element) {
26983
+ const css = getComputedStyle$1(element);
26984
+ // In testing environments, the `width` and `height` properties are empty
26985
+ // strings for SVG elements, returning NaN. Fallback to `0` in this case.
26986
+ let width = parseFloat(css.width) || 0;
26987
+ let height = parseFloat(css.height) || 0;
26988
+ const hasOffset = isHTMLElement(element);
26989
+ const offsetWidth = hasOffset ? element.offsetWidth : width;
26990
+ const offsetHeight = hasOffset ? element.offsetHeight : height;
26991
+ const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
26992
+ if (shouldFallback) {
26993
+ width = offsetWidth;
26994
+ height = offsetHeight;
26995
+ }
26996
+ return {
26997
+ width,
26998
+ height,
26999
+ $: shouldFallback
27000
+ };
27001
+ }
27002
+
27003
+ function unwrapElement(element) {
27004
+ return !isElement(element) ? element.contextElement : element;
27005
+ }
27006
+
27007
+ function getScale(element) {
27008
+ const domElement = unwrapElement(element);
27009
+ if (!isHTMLElement(domElement)) {
27010
+ return createCoords(1);
27011
+ }
27012
+ const rect = domElement.getBoundingClientRect();
27013
+ const {
27014
+ width,
27015
+ height,
27016
+ $
27017
+ } = getCssDimensions(domElement);
27018
+ let x = ($ ? round(rect.width) : rect.width) / width;
27019
+ let y = ($ ? round(rect.height) : rect.height) / height;
27020
+
27021
+ // 0, NaN, or Infinity should always fallback to 1.
27022
+
27023
+ if (!x || !Number.isFinite(x)) {
27024
+ x = 1;
27025
+ }
27026
+ if (!y || !Number.isFinite(y)) {
27027
+ y = 1;
27028
+ }
27029
+ return {
27030
+ x,
27031
+ y
27032
+ };
27033
+ }
27034
+
27035
+ const noOffsets = /*#__PURE__*/createCoords(0);
27036
+ function getVisualOffsets(element) {
27037
+ const win = getWindow(element);
27038
+ if (!isWebKit() || !win.visualViewport) {
27039
+ return noOffsets;
27040
+ }
27041
+ return {
27042
+ x: win.visualViewport.offsetLeft,
27043
+ y: win.visualViewport.offsetTop
27044
+ };
27045
+ }
27046
+ function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
27047
+ if (isFixed === void 0) {
27048
+ isFixed = false;
27049
+ }
27050
+ if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
27051
+ return false;
27052
+ }
27053
+ return isFixed;
27054
+ }
27055
+
27056
+ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
27057
+ if (includeScale === void 0) {
27058
+ includeScale = false;
27059
+ }
27060
+ if (isFixedStrategy === void 0) {
27061
+ isFixedStrategy = false;
27062
+ }
27063
+ const clientRect = element.getBoundingClientRect();
27064
+ const domElement = unwrapElement(element);
27065
+ let scale = createCoords(1);
27066
+ if (includeScale) {
27067
+ if (offsetParent) {
27068
+ if (isElement(offsetParent)) {
27069
+ scale = getScale(offsetParent);
27070
+ }
27071
+ } else {
27072
+ scale = getScale(element);
27073
+ }
27074
+ }
27075
+ const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
27076
+ let x = (clientRect.left + visualOffsets.x) / scale.x;
27077
+ let y = (clientRect.top + visualOffsets.y) / scale.y;
27078
+ let width = clientRect.width / scale.x;
27079
+ let height = clientRect.height / scale.y;
27080
+ if (domElement) {
27081
+ const win = getWindow(domElement);
27082
+ const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
27083
+ let currentWin = win;
27084
+ let currentIFrame = currentWin.frameElement;
27085
+ while (currentIFrame && offsetParent && offsetWin !== currentWin) {
27086
+ const iframeScale = getScale(currentIFrame);
27087
+ const iframeRect = currentIFrame.getBoundingClientRect();
27088
+ const css = getComputedStyle$1(currentIFrame);
27089
+ const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
27090
+ const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
27091
+ x *= iframeScale.x;
27092
+ y *= iframeScale.y;
27093
+ width *= iframeScale.x;
27094
+ height *= iframeScale.y;
27095
+ x += left;
27096
+ y += top;
27097
+ currentWin = getWindow(currentIFrame);
27098
+ currentIFrame = currentWin.frameElement;
27099
+ }
27100
+ }
27101
+ return rectToClientRect({
27102
+ width,
27103
+ height,
27104
+ x,
27105
+ y
27106
+ });
27107
+ }
27108
+
27109
+ const topLayerSelectors = [':popover-open', ':modal'];
27110
+ function isTopLayer(floating) {
27111
+ return topLayerSelectors.some(selector => {
27112
+ try {
27113
+ return floating.matches(selector);
27114
+ } catch (e) {
27115
+ return false;
27116
+ }
27117
+ });
27118
+ }
27119
+
27120
+ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
27121
+ let {
27122
+ elements,
27123
+ rect,
27124
+ offsetParent,
27125
+ strategy
27126
+ } = _ref;
27127
+ const isFixed = strategy === 'fixed';
27128
+ const documentElement = getDocumentElement(offsetParent);
27129
+ const topLayer = elements ? isTopLayer(elements.floating) : false;
27130
+ if (offsetParent === documentElement || topLayer && isFixed) {
27131
+ return rect;
27132
+ }
27133
+ let scroll = {
27134
+ scrollLeft: 0,
27135
+ scrollTop: 0
27136
+ };
27137
+ let scale = createCoords(1);
27138
+ const offsets = createCoords(0);
27139
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
27140
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
27141
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
27142
+ scroll = getNodeScroll(offsetParent);
27143
+ }
27144
+ if (isHTMLElement(offsetParent)) {
27145
+ const offsetRect = getBoundingClientRect(offsetParent);
27146
+ scale = getScale(offsetParent);
27147
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
27148
+ offsets.y = offsetRect.y + offsetParent.clientTop;
27149
+ }
27150
+ }
27151
+ return {
27152
+ width: rect.width * scale.x,
27153
+ height: rect.height * scale.y,
27154
+ x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,
27155
+ y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y
27156
+ };
27157
+ }
27158
+
27159
+ function getClientRects(element) {
27160
+ return Array.from(element.getClientRects());
27161
+ }
27162
+
27163
+ function getWindowScrollBarX(element) {
27164
+ // If <html> has a CSS width greater than the viewport, then this will be
27165
+ // incorrect for RTL.
27166
+ return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
27167
+ }
27168
+
27169
+ // Gets the entire size of the scrollable document area, even extending outside
27170
+ // of the `<html>` and `<body>` rect bounds if horizontally scrollable.
27171
+ function getDocumentRect(element) {
27172
+ const html = getDocumentElement(element);
27173
+ const scroll = getNodeScroll(element);
27174
+ const body = element.ownerDocument.body;
27175
+ const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
27176
+ const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
27177
+ let x = -scroll.scrollLeft + getWindowScrollBarX(element);
27178
+ const y = -scroll.scrollTop;
27179
+ if (getComputedStyle$1(body).direction === 'rtl') {
27180
+ x += max(html.clientWidth, body.clientWidth) - width;
27181
+ }
27182
+ return {
27183
+ width,
27184
+ height,
27185
+ x,
27186
+ y
27187
+ };
27188
+ }
27189
+
27190
+ function getViewportRect(element, strategy) {
27191
+ const win = getWindow(element);
27192
+ const html = getDocumentElement(element);
27193
+ const visualViewport = win.visualViewport;
27194
+ let width = html.clientWidth;
27195
+ let height = html.clientHeight;
27196
+ let x = 0;
27197
+ let y = 0;
27198
+ if (visualViewport) {
27199
+ width = visualViewport.width;
27200
+ height = visualViewport.height;
27201
+ const visualViewportBased = isWebKit();
27202
+ if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {
27203
+ x = visualViewport.offsetLeft;
27204
+ y = visualViewport.offsetTop;
27205
+ }
27206
+ }
27207
+ return {
27208
+ width,
27209
+ height,
27210
+ x,
27211
+ y
27212
+ };
27213
+ }
27214
+
27215
+ // Returns the inner client rect, subtracting scrollbars if present.
27216
+ function getInnerBoundingClientRect(element, strategy) {
27217
+ const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
27218
+ const top = clientRect.top + element.clientTop;
27219
+ const left = clientRect.left + element.clientLeft;
27220
+ const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
27221
+ const width = element.clientWidth * scale.x;
27222
+ const height = element.clientHeight * scale.y;
27223
+ const x = left * scale.x;
27224
+ const y = top * scale.y;
27225
+ return {
27226
+ width,
27227
+ height,
27228
+ x,
27229
+ y
27230
+ };
27231
+ }
27232
+ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
27233
+ let rect;
27234
+ if (clippingAncestor === 'viewport') {
27235
+ rect = getViewportRect(element, strategy);
27236
+ } else if (clippingAncestor === 'document') {
27237
+ rect = getDocumentRect(getDocumentElement(element));
27238
+ } else if (isElement(clippingAncestor)) {
27239
+ rect = getInnerBoundingClientRect(clippingAncestor, strategy);
27240
+ } else {
27241
+ const visualOffsets = getVisualOffsets(element);
27242
+ rect = {
27243
+ ...clippingAncestor,
27244
+ x: clippingAncestor.x - visualOffsets.x,
27245
+ y: clippingAncestor.y - visualOffsets.y
27246
+ };
27247
+ }
27248
+ return rectToClientRect(rect);
27249
+ }
27250
+ function hasFixedPositionAncestor(element, stopNode) {
27251
+ const parentNode = getParentNode(element);
27252
+ if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
27253
+ return false;
27254
+ }
27255
+ return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
27256
+ }
27257
+
27258
+ // A "clipping ancestor" is an `overflow` element with the characteristic of
27259
+ // clipping (or hiding) child elements. This returns all clipping ancestors
27260
+ // of the given element up the tree.
27261
+ function getClippingElementAncestors(element, cache) {
27262
+ const cachedResult = cache.get(element);
27263
+ if (cachedResult) {
27264
+ return cachedResult;
27265
+ }
27266
+ let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');
27267
+ let currentContainingBlockComputedStyle = null;
27268
+ const elementIsFixed = getComputedStyle$1(element).position === 'fixed';
27269
+ let currentNode = elementIsFixed ? getParentNode(element) : element;
27270
+
27271
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
27272
+ while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
27273
+ const computedStyle = getComputedStyle$1(currentNode);
27274
+ const currentNodeIsContaining = isContainingBlock(currentNode);
27275
+ if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
27276
+ currentContainingBlockComputedStyle = null;
27277
+ }
27278
+ const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
27279
+ if (shouldDropCurrentNode) {
27280
+ // Drop non-containing blocks.
27281
+ result = result.filter(ancestor => ancestor !== currentNode);
27282
+ } else {
27283
+ // Record last containing block for next iteration.
27284
+ currentContainingBlockComputedStyle = computedStyle;
27285
+ }
27286
+ currentNode = getParentNode(currentNode);
27287
+ }
27288
+ cache.set(element, result);
27289
+ return result;
27290
+ }
27291
+
27292
+ // Gets the maximum area that the element is visible in due to any number of
27293
+ // clipping ancestors.
27294
+ function getClippingRect(_ref) {
27295
+ let {
27296
+ element,
27297
+ boundary,
27298
+ rootBoundary,
27299
+ strategy
27300
+ } = _ref;
27301
+ const elementClippingAncestors = boundary === 'clippingAncestors' ? getClippingElementAncestors(element, this._c) : [].concat(boundary);
27302
+ const clippingAncestors = [...elementClippingAncestors, rootBoundary];
27303
+ const firstClippingAncestor = clippingAncestors[0];
27304
+ const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
27305
+ const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
27306
+ accRect.top = max(rect.top, accRect.top);
27307
+ accRect.right = min(rect.right, accRect.right);
27308
+ accRect.bottom = min(rect.bottom, accRect.bottom);
27309
+ accRect.left = max(rect.left, accRect.left);
27310
+ return accRect;
27311
+ }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
27312
+ return {
27313
+ width: clippingRect.right - clippingRect.left,
27314
+ height: clippingRect.bottom - clippingRect.top,
27315
+ x: clippingRect.left,
27316
+ y: clippingRect.top
27317
+ };
27318
+ }
27319
+
27320
+ function getDimensions(element) {
27321
+ const {
27322
+ width,
27323
+ height
27324
+ } = getCssDimensions(element);
27325
+ return {
27326
+ width,
27327
+ height
27328
+ };
27329
+ }
27330
+
27331
+ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
27332
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
27333
+ const documentElement = getDocumentElement(offsetParent);
27334
+ const isFixed = strategy === 'fixed';
27335
+ const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
27336
+ let scroll = {
27337
+ scrollLeft: 0,
27338
+ scrollTop: 0
27339
+ };
27340
+ const offsets = createCoords(0);
27341
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
27342
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
27343
+ scroll = getNodeScroll(offsetParent);
27344
+ }
27345
+ if (isOffsetParentAnElement) {
27346
+ const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
27347
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
27348
+ offsets.y = offsetRect.y + offsetParent.clientTop;
27349
+ } else if (documentElement) {
27350
+ offsets.x = getWindowScrollBarX(documentElement);
27351
+ }
27352
+ }
27353
+ const x = rect.left + scroll.scrollLeft - offsets.x;
27354
+ const y = rect.top + scroll.scrollTop - offsets.y;
27355
+ return {
27356
+ x,
27357
+ y,
27358
+ width: rect.width,
27359
+ height: rect.height
27360
+ };
27361
+ }
27362
+
27363
+ function getTrueOffsetParent(element, polyfill) {
27364
+ if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {
27365
+ return null;
27366
+ }
27367
+ if (polyfill) {
27368
+ return polyfill(element);
27369
+ }
27370
+ return element.offsetParent;
27371
+ }
27372
+
27373
+ // Gets the closest ancestor positioned element. Handles some edge cases,
27374
+ // such as table ancestors and cross browser bugs.
27375
+ function getOffsetParent(element, polyfill) {
27376
+ const window = getWindow(element);
27377
+ if (!isHTMLElement(element) || isTopLayer(element)) {
27378
+ return window;
27379
+ }
27380
+ let offsetParent = getTrueOffsetParent(element, polyfill);
27381
+ while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === 'static') {
27382
+ offsetParent = getTrueOffsetParent(offsetParent, polyfill);
27383
+ }
27384
+ if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle$1(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {
27385
+ return window;
27386
+ }
27387
+ return offsetParent || getContainingBlock(element) || window;
27388
+ }
27389
+
27390
+ const getElementRects = async function (data) {
27391
+ const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
27392
+ const getDimensionsFn = this.getDimensions;
27393
+ return {
27394
+ reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
27395
+ floating: {
27396
+ x: 0,
27397
+ y: 0,
27398
+ ...(await getDimensionsFn(data.floating))
27399
+ }
27400
+ };
27401
+ };
27402
+
27403
+ function isRTL(element) {
27404
+ return getComputedStyle$1(element).direction === 'rtl';
27405
+ }
27406
+
27407
+ const platform = {
27408
+ convertOffsetParentRelativeRectToViewportRelativeRect,
27409
+ getDocumentElement,
27410
+ getClippingRect,
27411
+ getOffsetParent,
27412
+ getElementRects,
27413
+ getClientRects,
27414
+ getDimensions,
27415
+ getScale,
27416
+ isElement,
27417
+ isRTL
27418
+ };
27419
+
27420
+ // https://samthor.au/2021/observing-dom/
27421
+ function observeMove(element, onMove) {
27422
+ let io = null;
27423
+ let timeoutId;
27424
+ const root = getDocumentElement(element);
27425
+ function cleanup() {
27426
+ var _io;
27427
+ clearTimeout(timeoutId);
27428
+ (_io = io) == null || _io.disconnect();
27429
+ io = null;
27430
+ }
27431
+ function refresh(skip, threshold) {
27432
+ if (skip === void 0) {
27433
+ skip = false;
27434
+ }
27435
+ if (threshold === void 0) {
27436
+ threshold = 1;
27437
+ }
27438
+ cleanup();
27439
+ const {
27440
+ left,
27441
+ top,
27442
+ width,
27443
+ height
27444
+ } = element.getBoundingClientRect();
27445
+ if (!skip) {
27446
+ onMove();
27447
+ }
27448
+ if (!width || !height) {
27449
+ return;
27450
+ }
27451
+ const insetTop = floor(top);
27452
+ const insetRight = floor(root.clientWidth - (left + width));
27453
+ const insetBottom = floor(root.clientHeight - (top + height));
27454
+ const insetLeft = floor(left);
27455
+ const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
27456
+ const options = {
27457
+ rootMargin,
27458
+ threshold: max(0, min(1, threshold)) || 1
27459
+ };
27460
+ let isFirstUpdate = true;
27461
+ function handleObserve(entries) {
27462
+ const ratio = entries[0].intersectionRatio;
27463
+ if (ratio !== threshold) {
27464
+ if (!isFirstUpdate) {
27465
+ return refresh();
27466
+ }
27467
+ if (!ratio) {
27468
+ timeoutId = setTimeout(() => {
27469
+ refresh(false, 1e-7);
27470
+ }, 100);
27471
+ } else {
27472
+ refresh(false, ratio);
27473
+ }
27474
+ }
27475
+ isFirstUpdate = false;
27476
+ }
27477
+
27478
+ // Older browsers don't support a `document` as the root and will throw an
27479
+ // error.
27480
+ try {
27481
+ io = new IntersectionObserver(handleObserve, {
27482
+ ...options,
27483
+ // Handle <iframe>s
27484
+ root: root.ownerDocument
27485
+ });
27486
+ } catch (e) {
27487
+ io = new IntersectionObserver(handleObserve, options);
27488
+ }
27489
+ io.observe(element);
27490
+ }
27491
+ refresh(true);
27492
+ return cleanup;
27493
+ }
27494
+
27495
+ /**
27496
+ * Automatically updates the position of the floating element when necessary.
27497
+ * Should only be called when the floating element is mounted on the DOM or
27498
+ * visible on the screen.
27499
+ * @returns cleanup function that should be invoked when the floating element is
27500
+ * removed from the DOM or hidden from the screen.
27501
+ * @see https://floating-ui.com/docs/autoUpdate
27502
+ */
27503
+ function autoUpdate(reference, floating, update, options) {
27504
+ if (options === void 0) {
27505
+ options = {};
27506
+ }
27507
+ const {
27508
+ ancestorScroll = true,
27509
+ ancestorResize = true,
27510
+ elementResize = typeof ResizeObserver === 'function',
27511
+ layoutShift = typeof IntersectionObserver === 'function',
27512
+ animationFrame = false
27513
+ } = options;
27514
+ const referenceEl = unwrapElement(reference);
27515
+ const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];
27516
+ ancestors.forEach(ancestor => {
27517
+ ancestorScroll && ancestor.addEventListener('scroll', update, {
27518
+ passive: true
27519
+ });
27520
+ ancestorResize && ancestor.addEventListener('resize', update);
27521
+ });
27522
+ const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
27523
+ let reobserveFrame = -1;
27524
+ let resizeObserver = null;
27525
+ if (elementResize) {
27526
+ resizeObserver = new ResizeObserver(_ref => {
27527
+ let [firstEntry] = _ref;
27528
+ if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
27529
+ // Prevent update loops when using the `size` middleware.
27530
+ // https://github.com/floating-ui/floating-ui/issues/1740
27531
+ resizeObserver.unobserve(floating);
27532
+ cancelAnimationFrame(reobserveFrame);
27533
+ reobserveFrame = requestAnimationFrame(() => {
27534
+ var _resizeObserver;
27535
+ (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
27536
+ });
27537
+ }
27538
+ update();
27539
+ });
27540
+ if (referenceEl && !animationFrame) {
27541
+ resizeObserver.observe(referenceEl);
27542
+ }
27543
+ resizeObserver.observe(floating);
27544
+ }
27545
+ let frameId;
27546
+ let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
27547
+ if (animationFrame) {
27548
+ frameLoop();
27549
+ }
27550
+ function frameLoop() {
27551
+ const nextRefRect = getBoundingClientRect(reference);
27552
+ if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
27553
+ update();
27554
+ }
27555
+ prevRefRect = nextRefRect;
27556
+ frameId = requestAnimationFrame(frameLoop);
27557
+ }
27558
+ update();
27559
+ return () => {
27560
+ var _resizeObserver2;
27561
+ ancestors.forEach(ancestor => {
27562
+ ancestorScroll && ancestor.removeEventListener('scroll', update);
27563
+ ancestorResize && ancestor.removeEventListener('resize', update);
27564
+ });
27565
+ cleanupIo == null || cleanupIo();
27566
+ (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
27567
+ resizeObserver = null;
27568
+ if (animationFrame) {
27569
+ cancelAnimationFrame(frameId);
27570
+ }
27571
+ };
27572
+ }
27573
+
27574
+ /**
27575
+ * Optimizes the visibility of the floating element by shifting it in order to
27576
+ * keep it in view when it will overflow the clipping boundary.
27577
+ * @see https://floating-ui.com/docs/shift
27578
+ */
27579
+ const shift = shift$1;
27580
+
27581
+ /**
27582
+ * Optimizes the visibility of the floating element by flipping the `placement`
27583
+ * in order to keep it in view when the preferred placement(s) will overflow the
27584
+ * clipping boundary. Alternative to `autoPlacement`.
27585
+ * @see https://floating-ui.com/docs/flip
27586
+ */
27587
+ const flip = flip$1;
27588
+
27589
+ /**
27590
+ * Provides data to position an inner element of the floating element so that it
27591
+ * appears centered to the reference element.
27592
+ * @see https://floating-ui.com/docs/arrow
27593
+ */
27594
+ const arrow = arrow$1;
27595
+
27596
+ /**
27597
+ * Computes the `x` and `y` coordinates that will place the floating element
27598
+ * next to a given reference element.
27599
+ */
27600
+ const computePosition = (reference, floating, options) => {
27601
+ // This caches the expensive `getClippingElementAncestors` function so that
27602
+ // multiple lifecycle resets re-use the same result. It only lives for a
27603
+ // single call. If other functions become expensive, we can add them as well.
27604
+ const cache = new Map();
27605
+ const mergedOptions = {
27606
+ platform,
27607
+ ...options
27608
+ };
27609
+ const platformWithCache = {
27610
+ ...mergedOptions.platform,
27611
+ _c: cache
27612
+ };
27613
+ return computePosition$1(reference, floating, {
27614
+ ...mergedOptions,
27615
+ platform: platformWithCache
27616
+ });
27617
+ };
27618
+
27619
+ /*
27620
+ * React Tooltip
27621
+ * {@link https://github.com/ReactTooltip/react-tooltip}
27622
+ * @copyright ReactTooltip Team
27623
+ * @license MIT
27624
+ */
27625
+ const h="react-tooltip-core-styles",w="react-tooltip-base-styles",b={core:!1,base:!1};function S({css:e,id:t=w,type:o="base",ref:r}){var l,n;if(!e||"undefined"==typeof document||b[o])return;if("core"===o&&"undefined"!=typeof process&&(null===(l=null===process||void 0===process?void 0:process.env)||void 0===l?void 0:l.REACT_TOOLTIP_DISABLE_CORE_STYLES))return;if("base"!==o&&"undefined"!=typeof process&&(null===(n=null===process||void 0===process?void 0:process.env)||void 0===n?void 0:n.REACT_TOOLTIP_DISABLE_BASE_STYLES))return;"core"===o&&(t=h),r||(r={});const{insertAt:c}=r;if(document.getElementById(t))return void console.warn(`[react-tooltip] Element with id '${t}' already exists. Call \`removeStyle()\` first`);const i=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.id=t,s.type="text/css","top"===c&&i.firstChild?i.insertBefore(s,i.firstChild):i.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e)),b[o]=!0;}const g=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:o=null,place:r="top",offset:l=10,strategy:n="absolute",middlewares:c=[offset(Number(l)),flip({fallbackAxisSideDirection:"start"}),shift({padding:5})],border:i})=>{if(!e)return {tooltipStyles:{},tooltipArrowStyles:{},place:r};if(null===t)return {tooltipStyles:{},tooltipArrowStyles:{},place:r};const s=c;return o?(s.push(arrow({element:o,padding:5})),computePosition(e,t,{placement:r,strategy:n,middleware:s}).then((({x:e,y:t,placement:o,middlewareData:r})=>{var l,n;const c={left:`${e}px`,top:`${t}px`,border:i},{x:s,y:a}=null!==(l=r.arrow)&&void 0!==l?l:{x:0,y:0},u=null!==(n={top:"bottom",right:"left",bottom:"top",left:"right"}[o.split("-")[0]])&&void 0!==n?n:"bottom",d=i&&{borderBottom:i,borderRight:i};let p=0;if(i){const e=`${i}`.match(/(\d+)px/);p=(null==e?void 0:e[1])?Number(e[1]):1;}return {tooltipStyles:c,tooltipArrowStyles:{left:null!=s?`${s}px`:"",top:null!=a?`${a}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:o}}))):computePosition(e,t,{placement:"bottom",strategy:n,middleware:s}).then((({x:e,y:t,placement:o})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:o})))},A=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),_=(e,t,o)=>{let r=null;const l=function(...l){const n=()=>{r=null,o||e.apply(this,l);};o&&!r&&(e.apply(this,l),r=setTimeout(n,t)),o||(r&&clearTimeout(r),r=setTimeout(n,t));};return l.cancel=()=>{r&&(clearTimeout(r),r=null);},l},O=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,T=(e,t)=>{if(e===t)return !0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,o)=>T(e,t[o])));if(Array.isArray(e)!==Array.isArray(t))return !1;if(!O(e)||!O(t))return e===t;const o=Object.keys(e),r=Object.keys(t);return o.length===r.length&&o.every((o=>T(e[o],t[o])))},k=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return !1;const t=getComputedStyle(e);return ["overflow","overflow-x","overflow-y"].some((e=>{const o=t.getPropertyValue(e);return "auto"===o||"scroll"===o}))},C=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(k(t))return t;t=t.parentElement;}return document.scrollingElement||document.documentElement},L="undefined"!=typeof window?React$1.useLayoutEffect:React$1.useEffect,R="DEFAULT_TOOLTIP_ID",x={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},N=React$1.createContext({getTooltipData:()=>x});function I(e=R){return React$1.useContext(N).getTooltipData(e)}var B={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},z={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const D=({forwardRef:t,id:r,className:c,classNameArrow:i,variant:u="dark",anchorId:d,anchorSelect:p,place:v="top",offset:m=10,events:h=["hover"],openOnClick:w=!1,positionStrategy:b="absolute",middlewares:S,wrapper:E,delayShow:A=0,delayHide:O=0,float:k=!1,hidden:R=!1,noArrow:x=!1,clickable:N=!1,closeOnEsc:$=!1,closeOnScroll:j=!1,closeOnResize:D=!1,openEvents:q,closeEvents:H,globalCloseEvents:M,imperativeModeOnly:W,style:P,position:V,afterShow:F,afterHide:K,content:U,contentWrapperRef:X,isOpen:Y,defaultIsOpen:G=!1,setIsOpen:Z,activeAnchor:J,setActiveAnchor:Q,border:ee,opacity:te,arrowColor:oe,role:re="tooltip"})=>{var le;const ne=React$1.useRef(null),ce=React$1.useRef(null),ie=React$1.useRef(null),se=React$1.useRef(null),ae=React$1.useRef(null),[ue,de]=React$1.useState({tooltipStyles:{},tooltipArrowStyles:{},place:v}),[pe,ve]=React$1.useState(!1),[me,fe]=React$1.useState(!1),[ye,he]=React$1.useState(null),we=React$1.useRef(!1),be=React$1.useRef(null),{anchorRefs:Se,setActiveAnchor:Ee}=I(r),ge=React$1.useRef(!1),[Ae,_e]=React$1.useState([]),Oe=React$1.useRef(!1),Te=w||h.includes("click"),ke=Te||(null==q?void 0:q.click)||(null==q?void 0:q.dblclick)||(null==q?void 0:q.mousedown),Ce=q?{...q}:{mouseenter:!0,focus:!0,click:!1,dblclick:!1,mousedown:!1};!q&&Te&&Object.assign(Ce,{mouseenter:!1,focus:!1,click:!0});const Le=H?{...H}:{mouseleave:!0,blur:!0,click:!1,dblclick:!1,mouseup:!1};!H&&Te&&Object.assign(Le,{mouseleave:!1,blur:!1});const Re=M?{...M}:{escape:$||!1,scroll:j||!1,resize:D||!1,clickOutsideAnchor:ke||!1};W&&(Object.assign(Ce,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Le,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Re,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),L((()=>(Oe.current=!0,()=>{Oe.current=!1;})),[]);const xe=e=>{Oe.current&&(e&&fe(!0),setTimeout((()=>{Oe.current&&(null==Z||Z(e),void 0===Y&&ve(e));}),10));};React$1.useEffect((()=>{if(void 0===Y)return ()=>null;Y&&fe(!0);const e=setTimeout((()=>{ve(Y);}),10);return ()=>{clearTimeout(e);}}),[Y]),React$1.useEffect((()=>{if(pe!==we.current)if(ae.current&&clearTimeout(ae.current),we.current=pe,pe)null==F||F();else {const e=(e=>{const t=e.match(/^([\d.]+)(ms|s)$/);if(!t)return 0;const[,o,r]=t;return Number(o)*("ms"===r?1:1e3)})(getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay"));ae.current=setTimeout((()=>{fe(!1),he(null),null==K||K();}),e+25);}}),[pe]);const Ne=e=>{de((t=>T(t,e)?t:e));},$e=(e=A)=>{ie.current&&clearTimeout(ie.current),me?xe(!0):ie.current=setTimeout((()=>{xe(!0);}),e);},Ie=(e=O)=>{se.current&&clearTimeout(se.current),se.current=setTimeout((()=>{ge.current||xe(!1);}),e);},je=e=>{var t;if(!e)return;const o=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==o?void 0:o.isConnected))return Q(null),void Ee({current:null});A?$e():xe(!0),Q(o),Ee({current:o}),se.current&&clearTimeout(se.current);},Be=()=>{N?Ie(O||100):O?Ie():xe(!1),ie.current&&clearTimeout(ie.current);},ze=({x:e,y:t})=>{var o;const r={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};g({place:null!==(o=null==ye?void 0:ye.place)&&void 0!==o?o:v,offset:m,elementReference:r,tooltipReference:ne.current,tooltipArrowReference:ce.current,strategy:b,middlewares:S,border:ee}).then((e=>{Ne(e);}));},De=e=>{if(!e)return;const t=e,o={x:t.clientX,y:t.clientY};ze(o),be.current=o;},qe=e=>{var t;if(!pe)return;const o=e.target;if(!o.isConnected)return;if(null===(t=ne.current)||void 0===t?void 0:t.contains(o))return;[document.querySelector(`[id='${d}']`),...Ae].some((e=>null==e?void 0:e.contains(o)))||(xe(!1),ie.current&&clearTimeout(ie.current));},He=_(je,50,!0),Me=_(Be,50,!0),We=e=>{Me.cancel(),He(e);},Pe=()=>{He.cancel(),Me();},Ve=React$1.useCallback((()=>{var e,t;const o=null!==(e=null==ye?void 0:ye.position)&&void 0!==e?e:V;o?ze(o):k?be.current&&ze(be.current):(null==J?void 0:J.isConnected)&&g({place:null!==(t=null==ye?void 0:ye.place)&&void 0!==t?t:v,offset:m,elementReference:J,tooltipReference:ne.current,tooltipArrowReference:ce.current,strategy:b,middlewares:S,border:ee}).then((e=>{Oe.current&&Ne(e);}));}),[pe,J,U,P,v,null==ye?void 0:ye.place,m,b,V,null==ye?void 0:ye.position,k]);React$1.useEffect((()=>{var e,t;const o=new Set(Se);Ae.forEach((e=>{o.add({current:e});}));const r=document.querySelector(`[id='${d}']`);r&&o.add({current:r});const l=()=>{xe(!1);},n=C(J),c=C(ne.current);Re.scroll&&(window.addEventListener("scroll",l),null==n||n.addEventListener("scroll",l),null==c||c.addEventListener("scroll",l));let i=null;Re.resize?window.addEventListener("resize",l):J&&ne.current&&(i=autoUpdate(J,ne.current,Ve,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const s=e=>{"Escape"===e.key&&xe(!1);};Re.escape&&window.addEventListener("keydown",s),Re.clickOutsideAnchor&&window.addEventListener("click",qe);const a=[],u=e=>{pe&&(null==e?void 0:e.target)===J||je(e);},p=e=>{pe&&(null==e?void 0:e.target)===J&&Be();},v=["mouseenter","mouseleave","focus","blur"],m=["click","dblclick","mousedown","mouseup"];Object.entries(Ce).forEach((([e,t])=>{t&&(v.includes(e)?a.push({event:e,listener:We}):m.includes(e)&&a.push({event:e,listener:u}));})),Object.entries(Le).forEach((([e,t])=>{t&&(v.includes(e)?a.push({event:e,listener:Pe}):m.includes(e)&&a.push({event:e,listener:p}));})),k&&a.push({event:"pointermove",listener:De});const y=()=>{ge.current=!0;},h=()=>{ge.current=!1,Be();};return N&&!ke&&(null===(e=ne.current)||void 0===e||e.addEventListener("mouseenter",y),null===(t=ne.current)||void 0===t||t.addEventListener("mouseleave",h)),a.forEach((({event:e,listener:t})=>{o.forEach((o=>{var r;null===(r=o.current)||void 0===r||r.addEventListener(e,t);}));})),()=>{var e,t;Re.scroll&&(window.removeEventListener("scroll",l),null==n||n.removeEventListener("scroll",l),null==c||c.removeEventListener("scroll",l)),Re.resize?window.removeEventListener("resize",l):null==i||i(),Re.clickOutsideAnchor&&window.removeEventListener("click",qe),Re.escape&&window.removeEventListener("keydown",s),N&&!ke&&(null===(e=ne.current)||void 0===e||e.removeEventListener("mouseenter",y),null===(t=ne.current)||void 0===t||t.removeEventListener("mouseleave",h)),a.forEach((({event:e,listener:t})=>{o.forEach((o=>{var r;null===(r=o.current)||void 0===r||r.removeEventListener(e,t);}));}));}}),[J,Ve,me,Se,Ae,q,H,M,Te,A,O]),React$1.useEffect((()=>{var e,t;let o=null!==(t=null!==(e=null==ye?void 0:ye.anchorSelect)&&void 0!==e?e:p)&&void 0!==t?t:"";!o&&r&&(o=`[data-tooltip-id='${r}']`);const l=new MutationObserver((e=>{const t=[],l=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName){e.target.getAttribute("data-tooltip-id")===r?t.push(e.target):e.oldValue===r&&l.push(e.target);}if("childList"===e.type){if(J){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{l.push(...t.filter((e=>e.matches(o)))),l.push(...t.flatMap((e=>[...e.querySelectorAll(o)])));}catch(e){}t.some((e=>{var t;return !!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,J))&&(fe(!1),xe(!1),Q(null),ie.current&&clearTimeout(ie.current),se.current&&clearTimeout(se.current),!0)}));}if(o)try{const r=[...e.addedNodes].filter((e=>1===e.nodeType));t.push(...r.filter((e=>e.matches(o)))),t.push(...r.flatMap((e=>[...e.querySelectorAll(o)])));}catch(e){}}})),(t.length||l.length)&&_e((e=>[...e.filter((e=>!l.includes(e))),...t]));}));return l.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{l.disconnect();}}),[r,p,null==ye?void 0:ye.anchorSelect,J]),React$1.useEffect((()=>{Ve();}),[Ve]),React$1.useEffect((()=>{if(!(null==X?void 0:X.current))return ()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>Ve()));}));return e.observe(X.current),()=>{e.disconnect();}}),[U,null==X?void 0:X.current]),React$1.useEffect((()=>{var e;const t=document.querySelector(`[id='${d}']`),o=[...Ae,t];J&&o.includes(J)||Q(null!==(e=Ae[0])&&void 0!==e?e:t);}),[d,Ae,J]),React$1.useEffect((()=>(G&&xe(!0),()=>{ie.current&&clearTimeout(ie.current),se.current&&clearTimeout(se.current);})),[]),React$1.useEffect((()=>{var e;let t=null!==(e=null==ye?void 0:ye.anchorSelect)&&void 0!==e?e:p;if(!t&&r&&(t=`[data-tooltip-id='${r}']`),t)try{const e=Array.from(document.querySelectorAll(t));_e(e);}catch(e){_e([]);}}),[r,p,null==ye?void 0:ye.anchorSelect]),React$1.useEffect((()=>{ie.current&&(clearTimeout(ie.current),$e(A));}),[A]);const Fe=null!==(le=null==ye?void 0:ye.content)&&void 0!==le?le:U,Ke=pe&&Object.keys(ue.tooltipStyles).length>0;return React$1.useImperativeHandle(t,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect);}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}he(null!=e?e:null),(null==e?void 0:e.delay)?$e(e.delay):xe(!0);},close:e=>{(null==e?void 0:e.delay)?Ie(e.delay):xe(!1);},activeAnchor:J,place:ue.place,isOpen:Boolean(me&&!R&&Fe&&Ke)}))),me&&!R&&Fe?React__namespace.default.createElement(E,{id:r,role:re,className:y("react-tooltip",B.tooltip,z.tooltip,z[u],c,`react-tooltip__place-${ue.place}`,B[Ke?"show":"closing"],Ke?"react-tooltip__show":"react-tooltip__closing","fixed"===b&&B.fixed,N&&B.clickable),onTransitionEnd:e=>{ae.current&&clearTimeout(ae.current),pe||"opacity"!==e.propertyName||(fe(!1),he(null),null==K||K());},style:{...P,...ue.tooltipStyles,opacity:void 0!==te&&Ke?te:void 0},ref:ne},Fe,React__namespace.default.createElement(E,{className:y("react-tooltip-arrow",B.arrow,z.arrow,i,x&&B.noArrow),style:{...ue.tooltipArrowStyles,background:oe?`linear-gradient(to right bottom, transparent 50%, ${oe} 50%)`:void 0},ref:ce})):null},q=({content:t})=>React__namespace.default.createElement("span",{dangerouslySetInnerHTML:{__html:t}}),H=React__namespace.default.forwardRef((({id:t,anchorId:r,anchorSelect:n,content:c,html:i,render:a,className:u,classNameArrow:d,variant:p="dark",place:v="top",offset:m=10,wrapper:f="div",children:h=null,events:w=["hover"],openOnClick:b=!1,positionStrategy:S="absolute",middlewares:E,delayShow:g=0,delayHide:_=0,float:O=!1,hidden:T=!1,noArrow:k=!1,clickable:C=!1,closeOnEsc:L=!1,closeOnScroll:R=!1,closeOnResize:x=!1,openEvents:N,closeEvents:$,globalCloseEvents:j,imperativeModeOnly:B=!1,style:z,position:H,isOpen:M,defaultIsOpen:W=!1,disableStyleInjection:P=!1,border:V,opacity:F,arrowColor:K,setIsOpen:U,afterShow:X,afterHide:Y,role:G="tooltip"},Z)=>{const[J,Q]=React$1.useState(c),[ee,te]=React$1.useState(i),[oe,re]=React$1.useState(v),[le,ne]=React$1.useState(p),[ce,ie]=React$1.useState(m),[se,ae]=React$1.useState(g),[ue,de]=React$1.useState(_),[pe,ve]=React$1.useState(O),[me,fe]=React$1.useState(T),[ye,he]=React$1.useState(f),[we,be]=React$1.useState(w),[Se,Ee]=React$1.useState(S),[ge,Ae]=React$1.useState(null),[_e,Oe]=React$1.useState(null),Te=React$1.useRef(P),{anchorRefs:ke,activeAnchor:Ce}=I(t),Le=e=>null==e?void 0:e.getAttributeNames().reduce(((t,o)=>{var r;if(o.startsWith("data-tooltip-")){t[o.replace(/^data-tooltip-/,"")]=null!==(r=null==e?void 0:e.getAttribute(o))&&void 0!==r?r:null;}return t}),{}),Re=e=>{const t={place:e=>{var t;re(null!==(t=e)&&void 0!==t?t:v);},content:e=>{Q(null!=e?e:c);},html:e=>{te(null!=e?e:i);},variant:e=>{var t;ne(null!==(t=e)&&void 0!==t?t:p);},offset:e=>{ie(null===e?m:Number(e));},wrapper:e=>{var t;he(null!==(t=e)&&void 0!==t?t:f);},events:e=>{const t=null==e?void 0:e.split(" ");be(null!=t?t:w);},"position-strategy":e=>{var t;Ee(null!==(t=e)&&void 0!==t?t:S);},"delay-show":e=>{ae(null===e?g:Number(e));},"delay-hide":e=>{de(null===e?_:Number(e));},float:e=>{ve(null===e?O:"true"===e);},hidden:e=>{fe(null===e?T:"true"===e);},"class-name":e=>{Ae(e);}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,o])=>{var r;null===(r=t[e])||void 0===r||r.call(t,o);}));};React$1.useEffect((()=>{Q(c);}),[c]),React$1.useEffect((()=>{te(i);}),[i]),React$1.useEffect((()=>{re(v);}),[v]),React$1.useEffect((()=>{ne(p);}),[p]),React$1.useEffect((()=>{ie(m);}),[m]),React$1.useEffect((()=>{ae(g);}),[g]),React$1.useEffect((()=>{de(_);}),[_]),React$1.useEffect((()=>{ve(O);}),[O]),React$1.useEffect((()=>{fe(T);}),[T]),React$1.useEffect((()=>{Ee(S);}),[S]),React$1.useEffect((()=>{Te.current!==P&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.");}),[P]),React$1.useEffect((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===P,disableBase:P}}));}),[]),React$1.useEffect((()=>{var e;const o=new Set(ke);let l=n;if(!l&&t&&(l=`[data-tooltip-id='${t}']`),l)try{document.querySelectorAll(l).forEach((e=>{o.add({current:e});}));}catch(e){console.warn(`[react-tooltip] "${l}" is not a valid CSS selector`);}const c=document.querySelector(`[id='${r}']`);if(c&&o.add({current:c}),!o.size)return ()=>null;const i=null!==(e=null!=_e?_e:c)&&void 0!==e?e:Ce.current,s=new MutationObserver((e=>{e.forEach((e=>{var t;if(!i||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const o=Le(i);Re(o);}));})),a={attributes:!0,childList:!1,subtree:!1};if(i){const e=Le(i);Re(e),s.observe(i,a);}return ()=>{s.disconnect();}}),[ke,Ce,_e,r,n]),React$1.useEffect((()=>{(null==z?void 0:z.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),V&&!A("border",`${V}`)&&console.warn(`[react-tooltip] "${V}" is not a valid \`border\`.`),(null==z?void 0:z.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),F&&!A("opacity",`${F}`)&&console.warn(`[react-tooltip] "${F}" is not a valid \`opacity\`.`);}),[]);let xe=h;const Ne=React$1.useRef(null);if(a){const t=a({content:(null==_e?void 0:_e.getAttribute("data-tooltip-content"))||J||null,activeAnchor:_e});xe=t?React__namespace.default.createElement("div",{ref:Ne,className:"react-tooltip-content-wrapper"},t):null;}else J&&(xe=J);ee&&(xe=React__namespace.default.createElement(q,{content:ee}));const $e={forwardRef:Z,id:t,anchorId:r,anchorSelect:n,className:y(u,ge),classNameArrow:d,content:xe,contentWrapperRef:Ne,place:oe,variant:le,offset:ce,wrapper:ye,events:we,openOnClick:b,positionStrategy:Se,middlewares:E,delayShow:se,delayHide:ue,float:pe,hidden:me,noArrow:k,clickable:C,closeOnEsc:L,closeOnScroll:R,closeOnResize:x,openEvents:N,closeEvents:$,globalCloseEvents:j,imperativeModeOnly:B,style:z,position:H,isOpen:M,defaultIsOpen:W,border:V,opacity:F,arrowColor:K,setIsOpen:U,afterShow:X,afterHide:Y,activeAnchor:_e,setActiveAnchor:e=>Oe(e),role:G};return React__namespace.default.createElement(D,{...$e})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||S({css:`:root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}`,type:"core"}),e.detail.disableBase||S({css:`
27626
+ .styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}`,type:"base"});}));
27627
+
27628
+ const StyledTooltip = styled__default.default.div `
27629
+ display: inline-block;
27630
+
27631
+ i:hover {
27632
+ cursor: pointer;
27633
+ }
27634
+
27635
+ p {
27636
+ line-height: 1.4;
27637
+ font-size: 13px;
27638
+ }
27639
+
27640
+ .tool {
27641
+ background: ${allColors.oxfordBlue} !important;
27642
+ border: 1px solid ${allColors.baliHai} !important;
27643
+ border-radius: 2px !important;
27644
+ padding: 8px 11px !important;
27645
+ opacity: 1 !important;
27646
+
27647
+ &.place-left:after {
27648
+ border-left-color: ${allColors.oxfordBlue} !important;
27649
+ border-top: 5px solid transparent !important;
27650
+ border-bottom: 5px solid transparent !important;
27651
+ right: -6px !important;
27652
+ top: 50% !important;
27653
+ margin-top: -9px !important;
27654
+ }
27655
+
27656
+ &.place-left:before {
27657
+ border-left-color: ${allColors.baliHai} !important;
27658
+ border-left-width: 8px !important;
27659
+ border-left-style: solid !important;
27660
+ margin-top: -10px !important;
27661
+ }
27662
+
27663
+ &.place-right:after {
27664
+ border-right-color: ${allColors.oxfordBlue} !important;
27665
+ border-top: 5px solid transparent !important;
27666
+ border-bottom: 5px solid transparent !important;
27667
+ left: -6px !important;
27668
+ top: 50% !important;
27669
+ margin-top: -9px !important;
27670
+ }
27671
+
27672
+ &.place-right:before {
27673
+ border-right-color: ${allColors.baliHai} !important;
27674
+ border-right-width: 8px !important;
27675
+ border-right-style: solid !important;
27676
+ margin-top: -10px !important;
27677
+ }
27678
+
27679
+ &.place-top:after {
27680
+ border-top-color: ${allColors.oxfordBlue} !important;
27681
+ }
27682
+
27683
+ &.place-top:before {
27684
+ border-top-color: ${allColors.baliHai} !important;
27685
+ border-top-width: 8px !important;
27686
+ border-top-style: solid !important;
27687
+ }
27688
+
27689
+ &.place-bottom:after {
27690
+ border-bottom-color: ${allColors.oxfordBlue} !important;
27691
+ }
27692
+
27693
+ &.place-bottom:before {
27694
+ border-bottom-color: ${allColors.baliHai} !important;
27695
+ border-bottom-width: 8px !important;
27696
+ border-bottom-style: solid !important;
27697
+ }
27698
+ }
27699
+ `;
27700
+
27701
+ var PlacesType;
27702
+ (function (PlacesType) {
27703
+ PlacesType["top"] = "top";
27704
+ PlacesType["top-start"] = "top-start";
27705
+ PlacesType["top-end"] = "top-end";
27706
+ PlacesType["right"] = "right";
27707
+ PlacesType["right-start"] = "right-start";
27708
+ PlacesType["right-end"] = "right-end";
27709
+ PlacesType["bottom"] = "bottom";
27710
+ PlacesType["bottom-start"] = "bottom-start";
27711
+ PlacesType["bottom-end"] = "bottom-end";
27712
+ PlacesType["left"] = "left";
27713
+ PlacesType["left-start"] = "left-start";
27714
+ PlacesType["left-end"] = "left-end";
27715
+ })(PlacesType || (PlacesType = {}));
27716
+ const Tooltip = (props) => {
27717
+ return (jsxRuntime$1.jsxs(StyledTooltip, { className: props.className, "data-cy": props['data-cy'], id: props.id,
27718
+ // this was done in a hurry, consider refactor on next pass.
27719
+ style: { display: props.block ? 'block' : 'inline-block' }, children: [props.questionMark && (jsxRuntime$1.jsx("i", { style: { color: allColors.curiousBlue }, className: props.questionMarkClassName, "data-tooltip-id": props.for, "data-tooltip-place": props.place || 'top', children: jsxRuntime$1.jsx(Icon, { name: "fa-question-circle" }) })), jsxRuntime$1.jsx(H, { className: "tool",
27720
+ // globalEventOff={props.clickToShow ? 'click' : ''}
27721
+ // place={(props.place as PlacesType) || 'top'}
27722
+ openOnClick: props.clickToShow, id: props.for, delayShow: props.delayShow, delayHide: props.delayHide, children: props.children })] }));
27723
+ };
27724
+
26109
27725
  exports.ANIMATION = animation;
26110
27726
  exports.AbstractRadio = Radio$1;
26111
27727
  exports.AbstractRadioGroup = RadioGroup$1;
@@ -26155,6 +27771,7 @@ exports.TYPOGRAPHY = typography;
26155
27771
  exports.TextInput = TextInput;
26156
27772
  exports.TextTruncate = TextTruncate;
26157
27773
  exports.Toggle = Toggle;
27774
+ exports.Tooltip = Tooltip;
26158
27775
  exports.Wizard = Wizard;
26159
27776
  exports.WizardCard = WizardCard;
26160
27777
  exports.WizardSection = WizardSection;