@bcgov/design-system-react-components 0.5.2-pr586 → 0.5.2-pr595

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/README.md +31 -1
  2. package/dist/cjs/index.cjs +785 -706
  3. package/dist/cjs/index.cjs.map +1 -1
  4. package/dist/esm/index.js +786 -707
  5. package/dist/esm/index.js.map +1 -1
  6. package/dist/index.d.ts +1 -1
  7. package/package.json +52 -39
  8. package/dist/cjs/types/components/Accordion/Accordion.d.ts +0 -6
  9. package/dist/cjs/types/components/Accordion/index.d.ts +0 -2
  10. package/dist/cjs/types/components/AccordionGroup/AccordionGroup.d.ts +0 -7
  11. package/dist/cjs/types/components/AccordionGroup/index.d.ts +0 -2
  12. package/dist/cjs/types/components/AlertBanner/AlertBanner.d.ts +0 -10
  13. package/dist/cjs/types/components/AlertBanner/index.d.ts +0 -2
  14. package/dist/cjs/types/components/AlertDialog/AlertDialog.d.ts +0 -11
  15. package/dist/cjs/types/components/AlertDialog/AlertDialog.test.d.ts +0 -1
  16. package/dist/cjs/types/components/AlertDialog/index.d.ts +0 -2
  17. package/dist/cjs/types/components/Button/Button.d.ts +0 -21
  18. package/dist/cjs/types/components/Button/Button.test.d.ts +0 -1
  19. package/dist/cjs/types/components/Button/index.d.ts +0 -2
  20. package/dist/cjs/types/components/ButtonGroup/ButtonGroup.d.ts +0 -7
  21. package/dist/cjs/types/components/ButtonGroup/ButtonGroup.test.d.ts +0 -1
  22. package/dist/cjs/types/components/ButtonGroup/index.d.ts +0 -2
  23. package/dist/cjs/types/components/Callout/Callout.d.ts +0 -10
  24. package/dist/cjs/types/components/Callout/index.d.ts +0 -2
  25. package/dist/cjs/types/components/Checkbox/Checkbox.d.ts +0 -3
  26. package/dist/cjs/types/components/Checkbox/Checkbox.test.d.ts +0 -1
  27. package/dist/cjs/types/components/Checkbox/index.d.ts +0 -2
  28. package/dist/cjs/types/components/CheckboxGroup/CheckboxGroup.d.ts +0 -11
  29. package/dist/cjs/types/components/CheckboxGroup/CheckboxGroup.test.d.ts +0 -1
  30. package/dist/cjs/types/components/CheckboxGroup/index.d.ts +0 -2
  31. package/dist/cjs/types/components/Dialog/Dialog.d.ts +0 -11
  32. package/dist/cjs/types/components/Dialog/Dialog.test.d.ts +0 -1
  33. package/dist/cjs/types/components/Dialog/index.d.ts +0 -2
  34. package/dist/cjs/types/components/Footer/Footer.d.ts +0 -62
  35. package/dist/cjs/types/components/Footer/Footer.test.d.ts +0 -1
  36. package/dist/cjs/types/components/Footer/index.d.ts +0 -2
  37. package/dist/cjs/types/components/Form/Form.d.ts +0 -2
  38. package/dist/cjs/types/components/Form/Form.test.d.ts +0 -1
  39. package/dist/cjs/types/components/Form/index.d.ts +0 -2
  40. package/dist/cjs/types/components/Header/Header.d.ts +0 -29
  41. package/dist/cjs/types/components/Header/Header.test.d.ts +0 -1
  42. package/dist/cjs/types/components/Header/index.d.ts +0 -2
  43. package/dist/cjs/types/components/Heading/Heading.d.ts +0 -7
  44. package/dist/cjs/types/components/Heading/index.d.ts +0 -2
  45. package/dist/cjs/types/components/Icons/SvgBcLogo/SvgBcLogo.d.ts +0 -4
  46. package/dist/cjs/types/components/Icons/SvgBcLogo/index.d.ts +0 -1
  47. package/dist/cjs/types/components/Icons/SvgBcOutlineIcon/SvgBcOutlineIcon.d.ts +0 -3
  48. package/dist/cjs/types/components/Icons/SvgBcOutlineIcon/index.d.ts +0 -1
  49. package/dist/cjs/types/components/Icons/SvgBetaIcon/SvgBetaIcon.d.ts +0 -3
  50. package/dist/cjs/types/components/Icons/SvgBetaIcon/index.d.ts +0 -1
  51. package/dist/cjs/types/components/Icons/SvgCheckCircleIcon/SvgCheckCircleIcon.d.ts +0 -3
  52. package/dist/cjs/types/components/Icons/SvgCheckCircleIcon/index.d.ts +0 -1
  53. package/dist/cjs/types/components/Icons/SvgCheckIcon/SvgCheckIcon.d.ts +0 -3
  54. package/dist/cjs/types/components/Icons/SvgCheckIcon/index.d.ts +0 -1
  55. package/dist/cjs/types/components/Icons/SvgChevronDownIcon/SvgChevronDownIcon.d.ts +0 -3
  56. package/dist/cjs/types/components/Icons/SvgChevronDownIcon/index.d.ts +0 -1
  57. package/dist/cjs/types/components/Icons/SvgChevronUpIcon/SvgChevronUpIcon.d.ts +0 -3
  58. package/dist/cjs/types/components/Icons/SvgChevronUpIcon/index.d.ts +0 -1
  59. package/dist/cjs/types/components/Icons/SvgCloseIcon/SvgCloseIcon.d.ts +0 -3
  60. package/dist/cjs/types/components/Icons/SvgCloseIcon/index.d.ts +0 -1
  61. package/dist/cjs/types/components/Icons/SvgDashIcon/SvgDashIcon.d.ts +0 -3
  62. package/dist/cjs/types/components/Icons/SvgDashIcon/index.d.ts +0 -1
  63. package/dist/cjs/types/components/Icons/SvgExclamationCircleIcon/SvgExclamationCircleIcon.d.ts +0 -3
  64. package/dist/cjs/types/components/Icons/SvgExclamationCircleIcon/index.d.ts +0 -1
  65. package/dist/cjs/types/components/Icons/SvgExclamationIcon/SvgExclamationIcon.d.ts +0 -3
  66. package/dist/cjs/types/components/Icons/SvgExclamationIcon/index.d.ts +0 -1
  67. package/dist/cjs/types/components/Icons/SvgInfoIcon/SvgInfoIcon.d.ts +0 -3
  68. package/dist/cjs/types/components/Icons/SvgInfoIcon/index.d.ts +0 -1
  69. package/dist/cjs/types/components/Icons/SvgTooltipArrowUp/SvgTooltipArrowUp.d.ts +0 -3
  70. package/dist/cjs/types/components/Icons/SvgTooltipArrowUp/index.d.ts +0 -1
  71. package/dist/cjs/types/components/InlineAlert/InlineAlert.d.ts +0 -12
  72. package/dist/cjs/types/components/InlineAlert/InlineAlert.test.d.ts +0 -1
  73. package/dist/cjs/types/components/InlineAlert/index.d.ts +0 -2
  74. package/dist/cjs/types/components/Link/Link.d.ts +0 -15
  75. package/dist/cjs/types/components/Link/index.d.ts +0 -2
  76. package/dist/cjs/types/components/Modal/Modal.d.ts +0 -3
  77. package/dist/cjs/types/components/Modal/Modal.test.d.ts +0 -1
  78. package/dist/cjs/types/components/Modal/index.d.ts +0 -2
  79. package/dist/cjs/types/components/Radio/Radio.d.ts +0 -3
  80. package/dist/cjs/types/components/Radio/Radio.test.d.ts +0 -1
  81. package/dist/cjs/types/components/Radio/index.d.ts +0 -2
  82. package/dist/cjs/types/components/RadioGroup/RadioGroup.d.ts +0 -12
  83. package/dist/cjs/types/components/RadioGroup/RadioGroup.test.d.ts +0 -1
  84. package/dist/cjs/types/components/RadioGroup/index.d.ts +0 -2
  85. package/dist/cjs/types/components/Select/Select.d.ts +0 -39
  86. package/dist/cjs/types/components/Select/index.d.ts +0 -2
  87. package/dist/cjs/types/components/Switch/Switch.d.ts +0 -6
  88. package/dist/cjs/types/components/Switch/Switch.test.d.ts +0 -1
  89. package/dist/cjs/types/components/Switch/index.d.ts +0 -2
  90. package/dist/cjs/types/components/Tag/Tag.d.ts +0 -21
  91. package/dist/cjs/types/components/Tag/index.d.ts +0 -2
  92. package/dist/cjs/types/components/TagGroup/TagGroup.d.ts +0 -17
  93. package/dist/cjs/types/components/TagGroup/index.d.ts +0 -2
  94. package/dist/cjs/types/components/TagList/TagList.d.ts +0 -11
  95. package/dist/cjs/types/components/TagList/index.d.ts +0 -2
  96. package/dist/cjs/types/components/Text/Text.d.ts +0 -8
  97. package/dist/cjs/types/components/Text/index.d.ts +0 -2
  98. package/dist/cjs/types/components/TextArea/TextArea.d.ts +0 -8
  99. package/dist/cjs/types/components/TextArea/index.d.ts +0 -2
  100. package/dist/cjs/types/components/TextField/TextField.d.ts +0 -11
  101. package/dist/cjs/types/components/TextField/index.d.ts +0 -2
  102. package/dist/cjs/types/components/Tooltip/Tooltip.d.ts +0 -5
  103. package/dist/cjs/types/components/Tooltip/index.d.ts +0 -2
  104. package/dist/cjs/types/components/index.d.ts +0 -42
  105. package/dist/cjs/types/index.d.ts +0 -1
  106. package/dist/esm/types/components/Accordion/Accordion.d.ts +0 -6
  107. package/dist/esm/types/components/Accordion/index.d.ts +0 -2
  108. package/dist/esm/types/components/AccordionGroup/AccordionGroup.d.ts +0 -7
  109. package/dist/esm/types/components/AccordionGroup/index.d.ts +0 -2
  110. package/dist/esm/types/components/AlertBanner/AlertBanner.d.ts +0 -10
  111. package/dist/esm/types/components/AlertBanner/index.d.ts +0 -2
  112. package/dist/esm/types/components/AlertDialog/AlertDialog.d.ts +0 -11
  113. package/dist/esm/types/components/AlertDialog/AlertDialog.test.d.ts +0 -1
  114. package/dist/esm/types/components/AlertDialog/index.d.ts +0 -2
  115. package/dist/esm/types/components/Button/Button.d.ts +0 -21
  116. package/dist/esm/types/components/Button/Button.test.d.ts +0 -1
  117. package/dist/esm/types/components/Button/index.d.ts +0 -2
  118. package/dist/esm/types/components/ButtonGroup/ButtonGroup.d.ts +0 -7
  119. package/dist/esm/types/components/ButtonGroup/ButtonGroup.test.d.ts +0 -1
  120. package/dist/esm/types/components/ButtonGroup/index.d.ts +0 -2
  121. package/dist/esm/types/components/Callout/Callout.d.ts +0 -10
  122. package/dist/esm/types/components/Callout/index.d.ts +0 -2
  123. package/dist/esm/types/components/Checkbox/Checkbox.d.ts +0 -3
  124. package/dist/esm/types/components/Checkbox/Checkbox.test.d.ts +0 -1
  125. package/dist/esm/types/components/Checkbox/index.d.ts +0 -2
  126. package/dist/esm/types/components/CheckboxGroup/CheckboxGroup.d.ts +0 -11
  127. package/dist/esm/types/components/CheckboxGroup/CheckboxGroup.test.d.ts +0 -1
  128. package/dist/esm/types/components/CheckboxGroup/index.d.ts +0 -2
  129. package/dist/esm/types/components/Dialog/Dialog.d.ts +0 -11
  130. package/dist/esm/types/components/Dialog/Dialog.test.d.ts +0 -1
  131. package/dist/esm/types/components/Dialog/index.d.ts +0 -2
  132. package/dist/esm/types/components/Footer/Footer.d.ts +0 -62
  133. package/dist/esm/types/components/Footer/Footer.test.d.ts +0 -1
  134. package/dist/esm/types/components/Footer/index.d.ts +0 -2
  135. package/dist/esm/types/components/Form/Form.d.ts +0 -2
  136. package/dist/esm/types/components/Form/Form.test.d.ts +0 -1
  137. package/dist/esm/types/components/Form/index.d.ts +0 -2
  138. package/dist/esm/types/components/Header/Header.d.ts +0 -29
  139. package/dist/esm/types/components/Header/Header.test.d.ts +0 -1
  140. package/dist/esm/types/components/Header/index.d.ts +0 -2
  141. package/dist/esm/types/components/Heading/Heading.d.ts +0 -7
  142. package/dist/esm/types/components/Heading/index.d.ts +0 -2
  143. package/dist/esm/types/components/Icons/SvgBcLogo/SvgBcLogo.d.ts +0 -4
  144. package/dist/esm/types/components/Icons/SvgBcLogo/index.d.ts +0 -1
  145. package/dist/esm/types/components/Icons/SvgBcOutlineIcon/SvgBcOutlineIcon.d.ts +0 -3
  146. package/dist/esm/types/components/Icons/SvgBcOutlineIcon/index.d.ts +0 -1
  147. package/dist/esm/types/components/Icons/SvgBetaIcon/SvgBetaIcon.d.ts +0 -3
  148. package/dist/esm/types/components/Icons/SvgBetaIcon/index.d.ts +0 -1
  149. package/dist/esm/types/components/Icons/SvgCheckCircleIcon/SvgCheckCircleIcon.d.ts +0 -3
  150. package/dist/esm/types/components/Icons/SvgCheckCircleIcon/index.d.ts +0 -1
  151. package/dist/esm/types/components/Icons/SvgCheckIcon/SvgCheckIcon.d.ts +0 -3
  152. package/dist/esm/types/components/Icons/SvgCheckIcon/index.d.ts +0 -1
  153. package/dist/esm/types/components/Icons/SvgChevronDownIcon/SvgChevronDownIcon.d.ts +0 -3
  154. package/dist/esm/types/components/Icons/SvgChevronDownIcon/index.d.ts +0 -1
  155. package/dist/esm/types/components/Icons/SvgChevronUpIcon/SvgChevronUpIcon.d.ts +0 -3
  156. package/dist/esm/types/components/Icons/SvgChevronUpIcon/index.d.ts +0 -1
  157. package/dist/esm/types/components/Icons/SvgCloseIcon/SvgCloseIcon.d.ts +0 -3
  158. package/dist/esm/types/components/Icons/SvgCloseIcon/index.d.ts +0 -1
  159. package/dist/esm/types/components/Icons/SvgDashIcon/SvgDashIcon.d.ts +0 -3
  160. package/dist/esm/types/components/Icons/SvgDashIcon/index.d.ts +0 -1
  161. package/dist/esm/types/components/Icons/SvgExclamationCircleIcon/SvgExclamationCircleIcon.d.ts +0 -3
  162. package/dist/esm/types/components/Icons/SvgExclamationCircleIcon/index.d.ts +0 -1
  163. package/dist/esm/types/components/Icons/SvgExclamationIcon/SvgExclamationIcon.d.ts +0 -3
  164. package/dist/esm/types/components/Icons/SvgExclamationIcon/index.d.ts +0 -1
  165. package/dist/esm/types/components/Icons/SvgInfoIcon/SvgInfoIcon.d.ts +0 -3
  166. package/dist/esm/types/components/Icons/SvgInfoIcon/index.d.ts +0 -1
  167. package/dist/esm/types/components/Icons/SvgTooltipArrowUp/SvgTooltipArrowUp.d.ts +0 -3
  168. package/dist/esm/types/components/Icons/SvgTooltipArrowUp/index.d.ts +0 -1
  169. package/dist/esm/types/components/InlineAlert/InlineAlert.d.ts +0 -12
  170. package/dist/esm/types/components/InlineAlert/InlineAlert.test.d.ts +0 -1
  171. package/dist/esm/types/components/InlineAlert/index.d.ts +0 -2
  172. package/dist/esm/types/components/Link/Link.d.ts +0 -15
  173. package/dist/esm/types/components/Link/index.d.ts +0 -2
  174. package/dist/esm/types/components/Modal/Modal.d.ts +0 -3
  175. package/dist/esm/types/components/Modal/Modal.test.d.ts +0 -1
  176. package/dist/esm/types/components/Modal/index.d.ts +0 -2
  177. package/dist/esm/types/components/Radio/Radio.d.ts +0 -3
  178. package/dist/esm/types/components/Radio/Radio.test.d.ts +0 -1
  179. package/dist/esm/types/components/Radio/index.d.ts +0 -2
  180. package/dist/esm/types/components/RadioGroup/RadioGroup.d.ts +0 -12
  181. package/dist/esm/types/components/RadioGroup/RadioGroup.test.d.ts +0 -1
  182. package/dist/esm/types/components/RadioGroup/index.d.ts +0 -2
  183. package/dist/esm/types/components/Select/Select.d.ts +0 -39
  184. package/dist/esm/types/components/Select/index.d.ts +0 -2
  185. package/dist/esm/types/components/Switch/Switch.d.ts +0 -6
  186. package/dist/esm/types/components/Switch/Switch.test.d.ts +0 -1
  187. package/dist/esm/types/components/Switch/index.d.ts +0 -2
  188. package/dist/esm/types/components/Tag/Tag.d.ts +0 -21
  189. package/dist/esm/types/components/Tag/index.d.ts +0 -2
  190. package/dist/esm/types/components/TagGroup/TagGroup.d.ts +0 -17
  191. package/dist/esm/types/components/TagGroup/index.d.ts +0 -2
  192. package/dist/esm/types/components/TagList/TagList.d.ts +0 -11
  193. package/dist/esm/types/components/TagList/index.d.ts +0 -2
  194. package/dist/esm/types/components/Text/Text.d.ts +0 -8
  195. package/dist/esm/types/components/Text/index.d.ts +0 -2
  196. package/dist/esm/types/components/TextArea/TextArea.d.ts +0 -8
  197. package/dist/esm/types/components/TextArea/index.d.ts +0 -2
  198. package/dist/esm/types/components/TextField/TextField.d.ts +0 -11
  199. package/dist/esm/types/components/TextField/index.d.ts +0 -2
  200. package/dist/esm/types/components/Tooltip/Tooltip.d.ts +0 -5
  201. package/dist/esm/types/components/Tooltip/index.d.ts +0 -2
  202. package/dist/esm/types/components/index.d.ts +0 -42
  203. package/dist/esm/types/index.d.ts +0 -1
@@ -5,7 +5,7 @@ var $dbSRa$react = require('react');
5
5
  var $4AOtR$reactdom = require('react-dom');
6
6
 
7
7
  function styleInject(css, ref) {
8
- if ( ref === undefined ) ref = {};
8
+ if ( ref === void 0 ) ref = {};
9
9
  var insertAt = ref.insertAt;
10
10
 
11
11
  if (!css || typeof document === 'undefined') { return; }
@@ -67,36 +67,6 @@ const $4e85f108e88277b8$export$698f465ec27e93df = ($dbSRa$react.createContext)(n
67
67
  */
68
68
  const $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document !== 'undefined' ? ($dbSRa$react).useLayoutEffect : ()=>{};
69
69
 
70
- /*
71
- * Copyright 2023 Adobe. All rights reserved.
72
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
73
- * you may not use this file except in compliance with the License. You may obtain a copy
74
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
75
- *
76
- * Unless required by applicable law or agreed to in writing, software distributed under
77
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
78
- * OF ANY KIND, either express or implied. See the License for the specific language
79
- * governing permissions and limitations under the License.
80
- */
81
-
82
- var $8ae05eaa5c114e9c$var$_React_useInsertionEffect;
83
- // Use the earliest effect type possible. useInsertionEffect runs during the mutation phase,
84
- // before all layout effects, but is available only in React 18 and later.
85
- const $8ae05eaa5c114e9c$var$useEarlyEffect = ($8ae05eaa5c114e9c$var$_React_useInsertionEffect = ($dbSRa$react)['useInsertionEffect']) !== null && $8ae05eaa5c114e9c$var$_React_useInsertionEffect !== undefined ? $8ae05eaa5c114e9c$var$_React_useInsertionEffect : ($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c);
86
- function $8ae05eaa5c114e9c$export$7f54fc3180508a52(fn) {
87
- const ref = ($dbSRa$react.useRef)(null);
88
- $8ae05eaa5c114e9c$var$useEarlyEffect(()=>{
89
- ref.current = fn;
90
- }, [
91
- fn
92
- ]);
93
- // @ts-ignore
94
- return ($dbSRa$react.useCallback)((...args)=>{
95
- const f = ref.current;
96
- return f === null || f === undefined ? undefined : f(...args);
97
- }, []);
98
- }
99
-
100
70
  /*
101
71
  * Copyright 2020 Adobe. All rights reserved.
102
72
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
@@ -111,10 +81,13 @@ function $8ae05eaa5c114e9c$export$7f54fc3180508a52(fn) {
111
81
 
112
82
  function $1dbecbe27a04f9af$export$14d238f342723f25(defaultValue) {
113
83
  let [value, setValue] = ($dbSRa$react.useState)(defaultValue);
84
+ // Keep an up to date copy of value in a ref so we can access the current value in the generator.
85
+ // This allows us to maintain a stable queue function.
86
+ let currValue = ($dbSRa$react.useRef)(value);
114
87
  let effect = ($dbSRa$react.useRef)(null);
115
88
  // Store the function in a ref so we can always access the current version
116
89
  // which has the proper `value` in scope.
117
- let nextRef = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(()=>{
90
+ let nextRef = ($dbSRa$react.useRef)(()=>{
118
91
  if (!effect.current) return;
119
92
  // Run the generator to the next yield.
120
93
  let newValue = effect.current.next();
@@ -126,17 +99,20 @@ function $1dbecbe27a04f9af$export$14d238f342723f25(defaultValue) {
126
99
  // If the value is the same as the current value,
127
100
  // then continue to the next yield. Otherwise,
128
101
  // set the value in state and wait for the next layout effect.
129
- if (value === newValue.value) nextRef();
102
+ if (currValue.current === newValue.value) nextRef.current();
130
103
  else setValue(newValue.value);
131
104
  });
132
105
  ($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
106
+ currValue.current = value;
133
107
  // If there is an effect currently running, continue to the next yield.
134
- if (effect.current) nextRef();
135
- });
136
- let queue = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)((fn)=>{
137
- effect.current = fn(value);
138
- nextRef();
108
+ if (effect.current) nextRef.current();
139
109
  });
110
+ let queue = ($dbSRa$react.useCallback)((fn)=>{
111
+ effect.current = fn(currValue.current);
112
+ nextRef.current();
113
+ }, [
114
+ nextRef
115
+ ]);
140
116
  return [
141
117
  value,
142
118
  queue
@@ -186,7 +162,7 @@ function $b5e257d569688ac6$var$useCounter(isDisabled = false) {
186
162
  // a weak map associated with the Fiber. On the second render, we reset the global counter to this value.
187
163
  // Since React runs the second render immediately after the first, this is safe.
188
164
  // @ts-ignore
189
- let currentOwner = (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ($dbSRa$react).__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED === undefined ? undefined : (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner = _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner === undefined ? undefined : _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner.current;
165
+ let currentOwner = (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ($dbSRa$react).__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED === void 0 ? void 0 : (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner = _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner === void 0 ? void 0 : _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner.current;
190
166
  if (currentOwner) {
191
167
  let prevComponentValue = $b5e257d569688ac6$var$componentIds.get(currentOwner);
192
168
  if (prevComponentValue == null) // On the first render, and first call to useId, store the id and state in our weak map.
@@ -355,7 +331,7 @@ function $bdb11010cef70236$export$b4cc09c592e8fdb8(depArray = []) {
355
331
 
356
332
  const $431fbd86ca7dc216$export$b204af158042fbac = (el)=>{
357
333
  var _el_ownerDocument;
358
- return (_el_ownerDocument = el === null || el === undefined ? undefined : el.ownerDocument) !== null && _el_ownerDocument !== undefined ? _el_ownerDocument : document;
334
+ return (_el_ownerDocument = el === null || el === void 0 ? void 0 : el.ownerDocument) !== null && _el_ownerDocument !== void 0 ? _el_ownerDocument : document;
359
335
  };
360
336
  const $431fbd86ca7dc216$export$f21a1ffae260145a = (el)=>{
361
337
  if (el && 'window' in el && el.window === el) return el;
@@ -397,7 +373,7 @@ const $d4ee10de306f2510$export$cd4e5573fbe2b576 = (doc = document)=>{
397
373
  var _activeElement_shadowRoot;
398
374
  if (!($f4e2df6bd15f8569$export$98658e8c59125e6a)()) return doc.activeElement;
399
375
  let activeElement = doc.activeElement;
400
- while(activeElement && 'shadowRoot' in activeElement && ((_activeElement_shadowRoot = activeElement.shadowRoot) === null || _activeElement_shadowRoot === undefined ? undefined : _activeElement_shadowRoot.activeElement))activeElement = activeElement.shadowRoot.activeElement;
376
+ while(activeElement && 'shadowRoot' in activeElement && ((_activeElement_shadowRoot = activeElement.shadowRoot) === null || _activeElement_shadowRoot === void 0 ? void 0 : _activeElement_shadowRoot.activeElement))activeElement = activeElement.shadowRoot.activeElement;
401
377
  return activeElement;
402
378
  };
403
379
  function $d4ee10de306f2510$export$e58f029f0fbfdb29(event) {
@@ -465,7 +441,7 @@ class $dfc540311bf7f109$export$63eb3ababa9c55c4 {
465
441
  var _this_filter;
466
442
  let nodeResult;
467
443
  if (typeof this.filter === 'function') nodeResult = this.filter(nextNode);
468
- else if ((_this_filter = this.filter) === null || _this_filter === undefined ? undefined : _this_filter.acceptNode) nodeResult = this.filter.acceptNode(nextNode);
444
+ else if ((_this_filter = this.filter) === null || _this_filter === void 0 ? void 0 : _this_filter.acceptNode) nodeResult = this.filter.acceptNode(nextNode);
469
445
  if (nodeResult === NodeFilter.FILTER_ACCEPT) {
470
446
  this.currentNode = nextNode;
471
447
  return nextNode;
@@ -508,7 +484,7 @@ class $dfc540311bf7f109$export$63eb3ababa9c55c4 {
508
484
  var _this_filter;
509
485
  let nodeResult;
510
486
  if (typeof this.filter === 'function') nodeResult = this.filter(previousNode);
511
- else if ((_this_filter = this.filter) === null || _this_filter === undefined ? undefined : _this_filter.acceptNode) nodeResult = this.filter.acceptNode(previousNode);
487
+ else if ((_this_filter = this.filter) === null || _this_filter === void 0 ? void 0 : _this_filter.acceptNode) nodeResult = this.filter.acceptNode(previousNode);
512
488
  if (nodeResult === NodeFilter.FILTER_ACCEPT) {
513
489
  if (previousNode) this.currentNode = previousNode;
514
490
  return previousNode;
@@ -569,7 +545,7 @@ class $dfc540311bf7f109$export$63eb3ababa9c55c4 {
569
545
  } else {
570
546
  var _this_filter;
571
547
  if (typeof this.filter === 'function') return this.filter(node);
572
- else if ((_this_filter = this.filter) === null || _this_filter === undefined ? undefined : _this_filter.acceptNode) return this.filter.acceptNode(node);
548
+ else if ((_this_filter = this.filter) === null || _this_filter === void 0 ? void 0 : _this_filter.acceptNode) return this.filter.acceptNode(node);
573
549
  else if (this.filter === null) return NodeFilter.FILTER_ACCEPT;
574
550
  }
575
551
  }
@@ -577,8 +553,8 @@ class $dfc540311bf7f109$export$63eb3ababa9c55c4 {
577
553
  };
578
554
  this._doc = doc;
579
555
  this.root = root;
580
- this.filter = filter !== null && filter !== undefined ? filter : null;
581
- this.whatToShow = whatToShow !== null && whatToShow !== undefined ? whatToShow : NodeFilter.SHOW_ALL;
556
+ this.filter = filter !== null && filter !== void 0 ? filter : null;
557
+ this.whatToShow = whatToShow !== null && whatToShow !== void 0 ? whatToShow : NodeFilter.SHOW_ALL;
582
558
  this._currentNode = root;
583
559
  this._walkerStack.unshift(doc.createTreeWalker(root, whatToShow, this._acceptNode));
584
560
  const shadowRoot = root.shadowRoot;
@@ -740,7 +716,7 @@ const $65484d02dcb7eb3e$var$propRe = /^(data-.*)$/;
740
716
  function $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, opts = {}) {
741
717
  let { labelable: labelable, isLink: isLink, global: global, events: events = global, propNames: propNames } = opts;
742
718
  let filteredProps = {};
743
- for(const prop in props)if (Object.prototype.hasOwnProperty.call(props, prop) && ($65484d02dcb7eb3e$var$DOMPropNames.has(prop) || labelable && $65484d02dcb7eb3e$var$labelablePropNames.has(prop) || isLink && $65484d02dcb7eb3e$var$linkPropNames.has(prop) || global && $65484d02dcb7eb3e$var$globalAttrs.has(prop) || events && $65484d02dcb7eb3e$var$globalEvents.has(prop) || prop.endsWith('Capture') && $65484d02dcb7eb3e$var$globalEvents.has(prop.slice(0, -7)) || (propNames === null || propNames === undefined ? undefined : propNames.has(prop)) || $65484d02dcb7eb3e$var$propRe.test(prop))) filteredProps[prop] = props[prop];
719
+ for(const prop in props)if (Object.prototype.hasOwnProperty.call(props, prop) && ($65484d02dcb7eb3e$var$DOMPropNames.has(prop) || labelable && $65484d02dcb7eb3e$var$labelablePropNames.has(prop) || isLink && $65484d02dcb7eb3e$var$linkPropNames.has(prop) || global && $65484d02dcb7eb3e$var$globalAttrs.has(prop) || events && ($65484d02dcb7eb3e$var$globalEvents.has(prop) || prop.endsWith('Capture') && $65484d02dcb7eb3e$var$globalEvents.has(prop.slice(0, -7))) || (propNames === null || propNames === void 0 ? void 0 : propNames.has(prop)) || $65484d02dcb7eb3e$var$propRe.test(prop))) filteredProps[prop] = props[prop];
744
720
  return filteredProps;
745
721
  }
746
722
 
@@ -821,12 +797,12 @@ function $7215afc6de606d6b$var$restoreScrollPosition(scrollableElements) {
821
797
  */ function $c87311424ea30a05$var$testUserAgent(re) {
822
798
  var _window_navigator_userAgentData;
823
799
  if (typeof window === 'undefined' || window.navigator == null) return false;
824
- let brands = (_window_navigator_userAgentData = window.navigator['userAgentData']) === null || _window_navigator_userAgentData === undefined ? undefined : _window_navigator_userAgentData.brands;
800
+ let brands = (_window_navigator_userAgentData = window.navigator['userAgentData']) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.brands;
825
801
  return Array.isArray(brands) && brands.some((brand)=>re.test(brand.brand)) || re.test(window.navigator.userAgent);
826
802
  }
827
803
  function $c87311424ea30a05$var$testPlatform(re) {
828
804
  var _window_navigator_userAgentData;
829
- return typeof window !== 'undefined' && window.navigator != null ? re.test(((_window_navigator_userAgentData = window.navigator['userAgentData']) === null || _window_navigator_userAgentData === undefined ? undefined : _window_navigator_userAgentData.platform) || window.navigator.platform) : false;
805
+ return typeof window !== 'undefined' && window.navigator != null ? re.test(((_window_navigator_userAgentData = window.navigator['userAgentData']) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.platform) || window.navigator.platform) : false;
830
806
  }
831
807
  function $c87311424ea30a05$var$cached(fn) {
832
808
  if (process.env.NODE_ENV === 'test') return fn;
@@ -901,7 +877,7 @@ function $ea8dcbcb9ea1b556$export$95185d699e05d4d7(target, modifiers, setOpening
901
877
  // will prevent links with target="_blank" from opening. However, it does allow the event if the
902
878
  // Command/Control key is held, which opens the link in a background tab. This seems like the best we can do.
903
879
  // See https://bugzilla.mozilla.org/show_bug.cgi?id=257870 and https://bugzilla.mozilla.org/show_bug.cgi?id=746640.
904
- if (($c87311424ea30a05$export$b7d78993b74f766d)() && ((_window_event = window.event) === null || _window_event === undefined ? undefined : (_window_event_type = _window_event.type) === null || _window_event_type === undefined ? undefined : _window_event_type.startsWith('key')) && target.target === '_blank') {
880
+ if (($c87311424ea30a05$export$b7d78993b74f766d)() && ((_window_event = window.event) === null || _window_event === void 0 ? void 0 : (_window_event_type = _window_event.type) === null || _window_event_type === void 0 ? void 0 : _window_event_type.startsWith('key')) && target.target === '_blank') {
905
881
  if (($c87311424ea30a05$export$9ac100e40613ea10)()) metaKey = true;
906
882
  else ctrlKey = true;
907
883
  }
@@ -918,6 +894,7 @@ function $ea8dcbcb9ea1b556$export$95185d699e05d4d7(target, modifiers, setOpening
918
894
  ctrlKey: ctrlKey,
919
895
  altKey: altKey,
920
896
  shiftKey: shiftKey,
897
+ detail: 1,
921
898
  bubbles: true,
922
899
  cancelable: true
923
900
  });
@@ -949,7 +926,7 @@ function $ea8dcbcb9ea1b556$var$openSyntheticLink(target, modifiers) {
949
926
  function $ea8dcbcb9ea1b556$export$bdc77b0c0a3a85d6(props) {
950
927
  let router = $ea8dcbcb9ea1b556$export$9a302a45f65d0572();
951
928
  var _props_href;
952
- const href = router.useHref((_props_href = props.href) !== null && _props_href !== undefined ? _props_href : '');
929
+ const href = router.useHref((_props_href = props.href) !== null && _props_href !== void 0 ? _props_href : '');
953
930
  return {
954
931
  'data-href': props.href ? href : undefined,
955
932
  'data-target': props.target,
@@ -962,14 +939,14 @@ function $ea8dcbcb9ea1b556$export$bdc77b0c0a3a85d6(props) {
962
939
  function $ea8dcbcb9ea1b556$export$7e924b3091a3bd18(props) {
963
940
  let router = $ea8dcbcb9ea1b556$export$9a302a45f65d0572();
964
941
  var _props_href;
965
- const href = router.useHref((_props_href = props === null || props === undefined ? undefined : props.href) !== null && _props_href !== undefined ? _props_href : '');
942
+ const href = router.useHref((_props_href = props === null || props === void 0 ? void 0 : props.href) !== null && _props_href !== void 0 ? _props_href : '');
966
943
  return {
967
- href: (props === null || props === undefined ? undefined : props.href) ? href : undefined,
968
- target: props === null || props === undefined ? undefined : props.target,
969
- rel: props === null || props === undefined ? undefined : props.rel,
970
- download: props === null || props === undefined ? undefined : props.download,
971
- ping: props === null || props === undefined ? undefined : props.ping,
972
- referrerPolicy: props === null || props === undefined ? undefined : props.referrerPolicy
944
+ href: (props === null || props === void 0 ? void 0 : props.href) ? href : undefined,
945
+ target: props === null || props === void 0 ? void 0 : props.target,
946
+ rel: props === null || props === void 0 ? void 0 : props.rel,
947
+ download: props === null || props === void 0 ? void 0 : props.download,
948
+ ping: props === null || props === void 0 ? void 0 : props.ping,
949
+ referrerPolicy: props === null || props === void 0 ? void 0 : props.referrerPolicy
973
950
  };
974
951
  }
975
952
  function $ea8dcbcb9ea1b556$export$13aea1a3cb5e3f1f(e, router, href, routerOptions) {
@@ -1080,7 +1057,7 @@ function $03deb23ff14920c4$export$4eaf04e54aa8eed6() {
1080
1057
  let globalListeners = ($dbSRa$react.useRef)(new Map());
1081
1058
  let addGlobalListener = ($dbSRa$react.useCallback)((eventTarget, type, listener, options)=>{
1082
1059
  // Make sure we remove the listener after it is called with the `once` option.
1083
- let fn = (options === null || options === undefined ? undefined : options.once) ? (...args)=>{
1060
+ let fn = (options === null || options === void 0 ? void 0 : options.once) ? (...args)=>{
1084
1061
  globalListeners.current.delete(listener);
1085
1062
  listener(...args);
1086
1063
  } : listener;
@@ -1094,7 +1071,7 @@ function $03deb23ff14920c4$export$4eaf04e54aa8eed6() {
1094
1071
  }, []);
1095
1072
  let removeGlobalListener = ($dbSRa$react.useCallback)((eventTarget, type, listener, options)=>{
1096
1073
  var _globalListeners_current_get;
1097
- let fn = ((_globalListeners_current_get = globalListeners.current.get(listener)) === null || _globalListeners_current_get === undefined ? undefined : _globalListeners_current_get.fn) || listener;
1074
+ let fn = ((_globalListeners_current_get = globalListeners.current.get(listener)) === null || _globalListeners_current_get === void 0 ? void 0 : _globalListeners_current_get.fn) || listener;
1098
1075
  eventTarget.removeEventListener(type, fn, options);
1099
1076
  globalListeners.current.delete(listener);
1100
1077
  }, []);
@@ -1199,6 +1176,36 @@ function $df56164dff5785e2$export$4338b53315abf666(ref) {
1199
1176
  ]);
1200
1177
  }
1201
1178
 
1179
+ /*
1180
+ * Copyright 2023 Adobe. All rights reserved.
1181
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
1182
+ * you may not use this file except in compliance with the License. You may obtain a copy
1183
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
1184
+ *
1185
+ * Unless required by applicable law or agreed to in writing, software distributed under
1186
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
1187
+ * OF ANY KIND, either express or implied. See the License for the specific language
1188
+ * governing permissions and limitations under the License.
1189
+ */
1190
+
1191
+ var $8ae05eaa5c114e9c$var$_React_useInsertionEffect;
1192
+ // Use the earliest effect type possible. useInsertionEffect runs during the mutation phase,
1193
+ // before all layout effects, but is available only in React 18 and later.
1194
+ const $8ae05eaa5c114e9c$var$useEarlyEffect = ($8ae05eaa5c114e9c$var$_React_useInsertionEffect = ($dbSRa$react)['useInsertionEffect']) !== null && $8ae05eaa5c114e9c$var$_React_useInsertionEffect !== void 0 ? $8ae05eaa5c114e9c$var$_React_useInsertionEffect : ($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c);
1195
+ function $8ae05eaa5c114e9c$export$7f54fc3180508a52(fn) {
1196
+ const ref = ($dbSRa$react.useRef)(null);
1197
+ $8ae05eaa5c114e9c$var$useEarlyEffect(()=>{
1198
+ ref.current = fn;
1199
+ }, [
1200
+ fn
1201
+ ]);
1202
+ // @ts-ignore
1203
+ return ($dbSRa$react.useCallback)((...args)=>{
1204
+ const f = ref.current;
1205
+ return f === null || f === void 0 ? void 0 : f(...args);
1206
+ }, []);
1207
+ }
1208
+
1202
1209
  /*
1203
1210
  * Copyright 2020 Adobe. All rights reserved.
1204
1211
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
@@ -1210,9 +1217,11 @@ function $df56164dff5785e2$export$4338b53315abf666(ref) {
1210
1217
  * OF ANY KIND, either express or implied. See the License for the specific language
1211
1218
  * governing permissions and limitations under the License.
1212
1219
  */
1213
- function $4f58c5f72bcf79f7$export$496315a1608d9602(effect, dependencies) {
1220
+
1221
+ function $4f58c5f72bcf79f7$export$496315a1608d9602(cb, dependencies) {
1214
1222
  const isInitialMount = ($dbSRa$react.useRef)(true);
1215
1223
  const lastDeps = ($dbSRa$react.useRef)(null);
1224
+ let cbEvent = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(cb);
1216
1225
  ($dbSRa$react.useEffect)(()=>{
1217
1226
  isInitialMount.current = true;
1218
1227
  return ()=>{
@@ -1222,7 +1231,7 @@ function $4f58c5f72bcf79f7$export$496315a1608d9602(effect, dependencies) {
1222
1231
  ($dbSRa$react.useEffect)(()=>{
1223
1232
  let prevDeps = lastDeps.current;
1224
1233
  if (isInitialMount.current) isInitialMount.current = false;
1225
- else if (!prevDeps || dependencies.some((dep, i)=>!Object.is(dep, prevDeps[i]))) effect();
1234
+ else if (!prevDeps || dependencies.some((dep, i)=>!Object.is(dep, prevDeps[i]))) cbEvent();
1226
1235
  lastDeps.current = dependencies;
1227
1236
  // eslint-disable-next-line react-hooks/exhaustive-deps
1228
1237
  }, dependencies);
@@ -1261,19 +1270,22 @@ function $9daab02d461809db$var$hasResizeObserver() {
1261
1270
  return typeof window.ResizeObserver !== 'undefined';
1262
1271
  }
1263
1272
  function $9daab02d461809db$export$683480f191c0e3ea(options) {
1273
+ // Only call onResize from inside the effect, otherwise we'll void our assumption that
1274
+ // useEffectEvents are safe to pass in.
1264
1275
  const { ref: ref, box: box, onResize: onResize } = options;
1276
+ let onResizeEvent = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(onResize);
1265
1277
  ($dbSRa$react.useEffect)(()=>{
1266
- let element = ref === null || ref === undefined ? undefined : ref.current;
1278
+ let element = ref === null || ref === void 0 ? void 0 : ref.current;
1267
1279
  if (!element) return;
1268
1280
  if (!$9daab02d461809db$var$hasResizeObserver()) {
1269
- window.addEventListener('resize', onResize, false);
1281
+ window.addEventListener('resize', onResizeEvent, false);
1270
1282
  return ()=>{
1271
- window.removeEventListener('resize', onResize, false);
1283
+ window.removeEventListener('resize', onResizeEvent, false);
1272
1284
  };
1273
1285
  } else {
1274
1286
  const resizeObserverInstance = new window.ResizeObserver((entries)=>{
1275
1287
  if (!entries.length) return;
1276
- onResize();
1288
+ onResizeEvent();
1277
1289
  });
1278
1290
  resizeObserverInstance.observe(element, {
1279
1291
  box: box
@@ -1283,7 +1295,6 @@ function $9daab02d461809db$export$683480f191c0e3ea(options) {
1283
1295
  };
1284
1296
  }
1285
1297
  }, [
1286
- onResize,
1287
1298
  ref,
1288
1299
  box
1289
1300
  ]);
@@ -1540,8 +1551,7 @@ function $e9faafb641e167db$export$90fc3a17d93f704c(ref, event, handler, options)
1540
1551
  ref,
1541
1552
  event,
1542
1553
  options,
1543
- isDisabled,
1544
- handleEvent
1554
+ isDisabled
1545
1555
  ]);
1546
1556
  }
1547
1557
 
@@ -1556,7 +1566,6 @@ function $e9faafb641e167db$export$90fc3a17d93f704c(ref, event, handler, options)
1556
1566
  * OF ANY KIND, either express or implied. See the License for the specific language
1557
1567
  * governing permissions and limitations under the License.
1558
1568
  */
1559
-
1560
1569
  function $2f04cbc44ee30ce0$export$53a0910f038337bd(scrollView, element) {
1561
1570
  let offsetX = $2f04cbc44ee30ce0$var$relativeOffset(scrollView, element, 'left');
1562
1571
  let offsetY = $2f04cbc44ee30ce0$var$relativeOffset(scrollView, element, 'top');
@@ -1566,48 +1575,23 @@ function $2f04cbc44ee30ce0$export$53a0910f038337bd(scrollView, element) {
1566
1575
  let y = scrollView.scrollTop;
1567
1576
  // Account for top/left border offsetting the scroll top/Left + scroll padding
1568
1577
  let { borderTopWidth: borderTopWidth, borderLeftWidth: borderLeftWidth, scrollPaddingTop: scrollPaddingTop, scrollPaddingRight: scrollPaddingRight, scrollPaddingBottom: scrollPaddingBottom, scrollPaddingLeft: scrollPaddingLeft } = getComputedStyle(scrollView);
1569
- // Account for scroll margin of the element
1570
- let { scrollMarginTop: scrollMarginTop, scrollMarginRight: scrollMarginRight, scrollMarginBottom: scrollMarginBottom, scrollMarginLeft: scrollMarginLeft } = getComputedStyle(element);
1571
1578
  let borderAdjustedX = x + parseInt(borderLeftWidth, 10);
1572
1579
  let borderAdjustedY = y + parseInt(borderTopWidth, 10);
1573
1580
  // Ignore end/bottom border via clientHeight/Width instead of offsetHeight/Width
1574
1581
  let maxX = borderAdjustedX + scrollView.clientWidth;
1575
1582
  let maxY = borderAdjustedY + scrollView.clientHeight;
1576
- // Get scroll padding / margin values as pixels - defaults to 0 if no scroll padding / margin
1583
+ // Get scroll padding values as pixels - defaults to 0 if no scroll padding
1577
1584
  // is used.
1578
1585
  let scrollPaddingTopNumber = parseInt(scrollPaddingTop, 10) || 0;
1579
1586
  let scrollPaddingBottomNumber = parseInt(scrollPaddingBottom, 10) || 0;
1580
1587
  let scrollPaddingRightNumber = parseInt(scrollPaddingRight, 10) || 0;
1581
1588
  let scrollPaddingLeftNumber = parseInt(scrollPaddingLeft, 10) || 0;
1582
- let scrollMarginTopNumber = parseInt(scrollMarginTop, 10) || 0;
1583
- let scrollMarginBottomNumber = parseInt(scrollMarginBottom, 10) || 0;
1584
- let scrollMarginRightNumber = parseInt(scrollMarginRight, 10) || 0;
1585
- let scrollMarginLeftNumber = parseInt(scrollMarginLeft, 10) || 0;
1586
- let targetLeft = offsetX - scrollMarginLeftNumber;
1587
- let targetRight = offsetX + width + scrollMarginRightNumber;
1588
- let targetTop = offsetY - scrollMarginTopNumber;
1589
- let targetBottom = offsetY + height + scrollMarginBottomNumber;
1590
- let scrollPortLeft = x + parseInt(borderLeftWidth, 10) + scrollPaddingLeftNumber;
1591
- let scrollPortRight = maxX - scrollPaddingRightNumber;
1592
- let scrollPortTop = y + parseInt(borderTopWidth, 10) + scrollPaddingTopNumber;
1593
- let scrollPortBottom = maxY - scrollPaddingBottomNumber;
1594
- if (targetLeft > scrollPortLeft || targetRight < scrollPortRight) {
1595
- if (targetLeft <= x + scrollPaddingLeftNumber) x = targetLeft - parseInt(borderLeftWidth, 10) - scrollPaddingLeftNumber;
1596
- else if (targetRight > maxX - scrollPaddingRightNumber) x += targetRight - maxX + scrollPaddingRightNumber;
1597
- }
1598
- if (targetTop > scrollPortTop || targetBottom < scrollPortBottom) {
1599
- if (targetTop <= borderAdjustedY + scrollPaddingTopNumber) y = targetTop - parseInt(borderTopWidth, 10) - scrollPaddingTopNumber;
1600
- else if (targetBottom > maxY - scrollPaddingBottomNumber) y += targetBottom - maxY + scrollPaddingBottomNumber;
1601
- }
1602
- if (process.env.NODE_ENV === 'test') {
1603
- scrollView.scrollLeft = x;
1604
- scrollView.scrollTop = y;
1605
- return;
1606
- }
1607
- scrollView.scrollTo({
1608
- left: x,
1609
- top: y
1610
- });
1589
+ if (offsetX <= x + scrollPaddingLeftNumber) x = offsetX - parseInt(borderLeftWidth, 10) - scrollPaddingLeftNumber;
1590
+ else if (offsetX + width > maxX - scrollPaddingRightNumber) x += offsetX + width - maxX + scrollPaddingRightNumber;
1591
+ if (offsetY <= borderAdjustedY + scrollPaddingTopNumber) y = offsetY - parseInt(borderTopWidth, 10) - scrollPaddingTopNumber;
1592
+ else if (offsetY + height > maxY - scrollPaddingBottomNumber) y += offsetY + height - maxY + scrollPaddingBottomNumber;
1593
+ scrollView.scrollLeft = x;
1594
+ scrollView.scrollTop = y;
1611
1595
  }
1612
1596
  /**
1613
1597
  * Computes the offset left or top from child to ancestor by accumulating
@@ -1633,31 +1617,31 @@ function $2f04cbc44ee30ce0$export$c826860796309d1b(targetElement, opts) {
1633
1617
  if (targetElement && document.contains(targetElement)) {
1634
1618
  let root = document.scrollingElement || document.documentElement;
1635
1619
  let isScrollPrevented = window.getComputedStyle(root).overflow === 'hidden';
1636
- // If scrolling is not currently prevented then we aren't in a overlay nor is a overlay open, just use element.scrollIntoView to bring the element into view
1637
- // Also ignore in chrome because of this bug: https://issues.chromium.org/issues/40074749
1638
- if (!isScrollPrevented && !($c87311424ea30a05$export$6446a186d09e379e)()) {
1620
+ // If scrolling is not currently prevented then we aren’t in a overlay nor is a overlay open, just use element.scrollIntoView to bring the element into view
1621
+ if (!isScrollPrevented) {
1639
1622
  var // use scrollIntoView({block: 'nearest'}) instead of .focus to check if the element is fully in view or not since .focus()
1640
1623
  // won't cause a scroll if the element is already focused and doesn't behave consistently when an element is partially out of view horizontally vs vertically
1641
1624
  _targetElement_scrollIntoView;
1642
1625
  let { left: originalLeft, top: originalTop } = targetElement.getBoundingClientRect();
1643
- targetElement === null || targetElement === undefined ? undefined : (_targetElement_scrollIntoView = targetElement.scrollIntoView) === null || _targetElement_scrollIntoView === undefined ? undefined : _targetElement_scrollIntoView.call(targetElement, {
1626
+ targetElement === null || targetElement === void 0 ? void 0 : (_targetElement_scrollIntoView = targetElement.scrollIntoView) === null || _targetElement_scrollIntoView === void 0 ? void 0 : _targetElement_scrollIntoView.call(targetElement, {
1644
1627
  block: 'nearest'
1645
1628
  });
1646
1629
  let { left: newLeft, top: newTop } = targetElement.getBoundingClientRect();
1647
1630
  // Account for sub pixel differences from rounding
1648
1631
  if (Math.abs(originalLeft - newLeft) > 1 || Math.abs(originalTop - newTop) > 1) {
1649
1632
  var _opts_containingElement_scrollIntoView, _opts_containingElement, _targetElement_scrollIntoView1;
1650
- opts === null || opts === undefined ? undefined : (_opts_containingElement = opts.containingElement) === null || _opts_containingElement === undefined ? undefined : (_opts_containingElement_scrollIntoView = _opts_containingElement.scrollIntoView) === null || _opts_containingElement_scrollIntoView === undefined ? undefined : _opts_containingElement_scrollIntoView.call(_opts_containingElement, {
1633
+ opts === null || opts === void 0 ? void 0 : (_opts_containingElement = opts.containingElement) === null || _opts_containingElement === void 0 ? void 0 : (_opts_containingElement_scrollIntoView = _opts_containingElement.scrollIntoView) === null || _opts_containingElement_scrollIntoView === void 0 ? void 0 : _opts_containingElement_scrollIntoView.call(_opts_containingElement, {
1651
1634
  block: 'center',
1652
1635
  inline: 'center'
1653
1636
  });
1654
- (_targetElement_scrollIntoView1 = targetElement.scrollIntoView) === null || _targetElement_scrollIntoView1 === undefined ? undefined : _targetElement_scrollIntoView1.call(targetElement, {
1637
+ (_targetElement_scrollIntoView1 = targetElement.scrollIntoView) === null || _targetElement_scrollIntoView1 === void 0 ? void 0 : _targetElement_scrollIntoView1.call(targetElement, {
1655
1638
  block: 'nearest'
1656
1639
  });
1657
1640
  }
1658
1641
  } else {
1659
1642
  let scrollParents = ($a40c673dc9f6d9c7$export$94ed1c92c7beeb22)(targetElement);
1660
1643
  // If scrolling is prevented, we don't want to scroll the body since it might move the overlay partially offscreen and the user can't scroll it back into view.
1644
+ if (!isScrollPrevented) scrollParents.push(root);
1661
1645
  for (let scrollParent of scrollParents)$2f04cbc44ee30ce0$export$53a0910f038337bd(scrollParent, targetElement);
1662
1646
  }
1663
1647
  }
@@ -1711,14 +1695,13 @@ function $99facab73266f662$export$5add1d006293d136(ref, initialValue, onReset) {
1711
1695
  });
1712
1696
  ($dbSRa$react.useEffect)(()=>{
1713
1697
  var _ref_current;
1714
- let form = ref === null || ref === undefined ? undefined : (_ref_current = ref.current) === null || _ref_current === undefined ? undefined : _ref_current.form;
1715
- form === null || form === undefined ? undefined : form.addEventListener('reset', handleReset);
1698
+ let form = ref === null || ref === void 0 ? void 0 : (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.form;
1699
+ form === null || form === void 0 ? void 0 : form.addEventListener('reset', handleReset);
1716
1700
  return ()=>{
1717
- form === null || form === undefined ? undefined : form.removeEventListener('reset', handleReset);
1701
+ form === null || form === void 0 ? void 0 : form.removeEventListener('reset', handleReset);
1718
1702
  };
1719
1703
  }, [
1720
- ref,
1721
- handleReset
1704
+ ref
1722
1705
  ]);
1723
1706
  }
1724
1707
 
@@ -1752,7 +1735,7 @@ function $a5fa973c1850dd36$export$ccaea96c28e8b9e7(props, ref) {
1752
1735
  // Need to do this tear down and set up since using a large rootMargin will mean the observer's callback isn't called even when scrolling the item into view beause its visibility hasn't actually changed
1753
1736
  // https://codesandbox.io/p/sandbox/magical-swanson-dhgp89?file=%2Fsrc%2FApp.js%3A21%2C21
1754
1737
  sentinelObserver.current = new IntersectionObserver(triggerLoadMore, {
1755
- root: ($62d8ded9296f3872$export$cfa2225e87938781)(ref === null || ref === undefined ? undefined : ref.current),
1738
+ root: ($62d8ded9296f3872$export$cfa2225e87938781)(ref === null || ref === void 0 ? void 0 : ref.current),
1756
1739
  rootMargin: `0px ${100 * scrollOffset}% ${100 * scrollOffset}% ${100 * scrollOffset}%`
1757
1740
  });
1758
1741
  sentinelObserver.current.observe(ref.current);
@@ -1762,7 +1745,6 @@ function $a5fa973c1850dd36$export$ccaea96c28e8b9e7(props, ref) {
1762
1745
  };
1763
1746
  }, [
1764
1747
  collection,
1765
- triggerLoadMore,
1766
1748
  ref,
1767
1749
  scrollOffset
1768
1750
  ]);
@@ -1965,8 +1947,14 @@ function $b4b717babfbb907b$var$isInert(element) {
1965
1947
  * OF ANY KIND, either express or implied. See the License for the specific language
1966
1948
  * governing permissions and limitations under the License.
1967
1949
  */
1950
+ var $458b0a5536c1a7cf$var$_React_useInsertionEffect;
1951
+ // Use the earliest effect possible to reset the ref below.
1952
+ const $458b0a5536c1a7cf$var$useEarlyEffect = typeof document !== 'undefined' ? ($458b0a5536c1a7cf$var$_React_useInsertionEffect = ($dbSRa$react)['useInsertionEffect']) !== null && $458b0a5536c1a7cf$var$_React_useInsertionEffect !== void 0 ? $458b0a5536c1a7cf$var$_React_useInsertionEffect : ($dbSRa$react).useLayoutEffect : ()=>{};
1968
1953
  function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange) {
1954
+ // Store the value in both state and a ref. The state value will only be used when uncontrolled.
1955
+ // The ref is used to track the most current value, which is passed to the function setState callback.
1969
1956
  let [stateValue, setStateValue] = ($dbSRa$react.useState)(value || defaultValue);
1957
+ let valueRef = ($dbSRa$react.useRef)(stateValue);
1970
1958
  let isControlledRef = ($dbSRa$react.useRef)(value !== undefined);
1971
1959
  let isControlled = value !== undefined;
1972
1960
  ($dbSRa$react.useEffect)(()=>{
@@ -1976,40 +1964,28 @@ function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange
1976
1964
  }, [
1977
1965
  isControlled
1978
1966
  ]);
1967
+ // After each render, update the ref to the current value.
1968
+ // This ensures that the setState callback argument is reset.
1969
+ // Note: the effect should not have any dependencies so that controlled values always reset.
1979
1970
  let currentValue = isControlled ? value : stateValue;
1971
+ $458b0a5536c1a7cf$var$useEarlyEffect(()=>{
1972
+ valueRef.current = currentValue;
1973
+ });
1974
+ let [, forceUpdate] = ($dbSRa$react.useReducer)(()=>({}), {});
1980
1975
  let setValue = ($dbSRa$react.useCallback)((value, ...args)=>{
1981
- let onChangeCaller = (value, ...onChangeArgs)=>{
1982
- if (onChange) {
1983
- if (!Object.is(currentValue, value)) onChange(value, ...onChangeArgs);
1984
- }
1985
- if (!isControlled) // If uncontrolled, mutate the currentValue local variable so that
1986
- // calling setState multiple times with the same value only emits onChange once.
1987
- // We do not use a ref for this because we specifically _do_ want the value to
1988
- // reset every render, and assigning to a ref in render breaks aborted suspended renders.
1989
- // eslint-disable-next-line react-hooks/exhaustive-deps
1990
- currentValue = value;
1991
- };
1992
- if (typeof value === 'function') {
1993
- if (process.env.NODE_ENV !== 'production') console.warn('We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320');
1994
- // this supports functional updates https://reactjs.org/docs/hooks-reference.html#functional-updates
1995
- // when someone using useControlledState calls setControlledState(myFunc)
1996
- // this will call our useState setState with a function as well which invokes myFunc and calls onChange with the value from myFunc
1997
- // if we're in an uncontrolled state, then we also return the value of myFunc which to setState looks as though it was just called with myFunc from the beginning
1998
- // otherwise we just return the controlled value, which won't cause a rerender because React knows to bail out when the value is the same
1999
- let updateFunction = (oldValue, ...functionArgs)=>{
2000
- let interceptedValue = value(isControlled ? currentValue : oldValue, ...functionArgs);
2001
- onChangeCaller(interceptedValue, ...args);
2002
- if (!isControlled) return interceptedValue;
2003
- return oldValue;
2004
- };
2005
- setStateValue(updateFunction);
2006
- } else {
2007
- if (!isControlled) setStateValue(value);
2008
- onChangeCaller(value, ...args);
1976
+ // @ts-ignore - TS doesn't know that T cannot be a function.
1977
+ let newValue = typeof value === 'function' ? value(valueRef.current) : value;
1978
+ if (!Object.is(valueRef.current, newValue)) {
1979
+ // Update the ref so that the next setState callback has the most recent value.
1980
+ valueRef.current = newValue;
1981
+ setStateValue(newValue);
1982
+ // Always trigger a re-render, even when controlled, so that the layout effect above runs to reset the value.
1983
+ forceUpdate();
1984
+ // Trigger onChange. Note that if setState is called multiple times in a single event,
1985
+ // onChange will be called for each one instead of only once.
1986
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue, ...args);
2009
1987
  }
2010
1988
  }, [
2011
- isControlled,
2012
- currentValue,
2013
1989
  onChange
2014
1990
  ]);
2015
1991
  return [
@@ -2078,12 +2054,12 @@ function $64fa3d84918910a7$export$4d86445c2cf5e3(props) {
2078
2054
  else if (children == null) computedChildren = defaultChildren;
2079
2055
  else computedChildren = children;
2080
2056
  return {
2081
- className: computedClassName !== null && computedClassName !== undefined ? computedClassName : defaultClassName,
2057
+ className: computedClassName !== null && computedClassName !== void 0 ? computedClassName : defaultClassName,
2082
2058
  style: computedStyle || defaultStyle ? {
2083
2059
  ...defaultStyle,
2084
2060
  ...computedStyle
2085
2061
  } : undefined,
2086
- children: computedChildren !== null && computedChildren !== undefined ? computedChildren : defaultChildren,
2062
+ children: computedChildren !== null && computedChildren !== void 0 ? computedChildren : defaultChildren,
2087
2063
  'data-rac': ''
2088
2064
  };
2089
2065
  }, [
@@ -2114,7 +2090,6 @@ function $64fa3d84918910a7$export$fabf2dc03a41866e(context, slot) {
2114
2090
  }
2115
2091
  function $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, context) {
2116
2092
  let ctx = $64fa3d84918910a7$export$fabf2dc03a41866e(context, props.slot) || {};
2117
- // @ts-ignore - TS says "Type 'unique symbol' cannot be used as an index type." but not sure why.
2118
2093
  let { ref: contextRef, ...contextProps } = ctx;
2119
2094
  let mergedRef = ($df56164dff5785e2$export$4338b53315abf666)(($dbSRa$react.useMemo)(()=>($5dc95899b306f630$export$c9058316764c140e)(ref, contextRef), [
2120
2095
  ref,
@@ -2200,7 +2175,7 @@ function $319e236875307eab$export$a9b970dcc4ae71a9(message, assertiveness = 'ass
2200
2175
  // if we're in a test environment, announce without waiting
2201
2176
  // @ts-ignore
2202
2177
  if (!(typeof IS_REACT_ACT_ENVIRONMENT === 'boolean' ? IS_REACT_ACT_ENVIRONMENT : typeof jest !== 'undefined')) setTimeout(()=>{
2203
- if ($319e236875307eab$var$liveAnnouncer === null || $319e236875307eab$var$liveAnnouncer === undefined ? undefined : $319e236875307eab$var$liveAnnouncer.isAttached()) $319e236875307eab$var$liveAnnouncer === null || $319e236875307eab$var$liveAnnouncer === undefined ? undefined : $319e236875307eab$var$liveAnnouncer.announce(message, assertiveness, timeout);
2178
+ if ($319e236875307eab$var$liveAnnouncer === null || $319e236875307eab$var$liveAnnouncer === void 0 ? void 0 : $319e236875307eab$var$liveAnnouncer.isAttached()) $319e236875307eab$var$liveAnnouncer === null || $319e236875307eab$var$liveAnnouncer === void 0 ? void 0 : $319e236875307eab$var$liveAnnouncer.announce(message, assertiveness, timeout);
2204
2179
  }, 100);
2205
2180
  else $319e236875307eab$var$liveAnnouncer.announce(message, assertiveness, timeout);
2206
2181
  } else $319e236875307eab$var$liveAnnouncer.announce(message, assertiveness, timeout);
@@ -2214,7 +2189,7 @@ function $319e236875307eab$export$a9b970dcc4ae71a9(message, assertiveness = 'ass
2214
2189
  class $319e236875307eab$var$LiveAnnouncer {
2215
2190
  isAttached() {
2216
2191
  var _this_node;
2217
- return (_this_node = this.node) === null || _this_node === undefined ? undefined : _this_node.isConnected;
2192
+ return (_this_node = this.node) === null || _this_node === void 0 ? void 0 : _this_node.isConnected;
2218
2193
  }
2219
2194
  createLog(ariaLive) {
2220
2195
  let node = document.createElement('div');
@@ -2237,8 +2212,8 @@ class $319e236875307eab$var$LiveAnnouncer {
2237
2212
  node.setAttribute('role', 'img');
2238
2213
  node.setAttribute('aria-labelledby', message['aria-labelledby']);
2239
2214
  } else node.textContent = message;
2240
- if (assertiveness === 'assertive') (_this_assertiveLog = this.assertiveLog) === null || _this_assertiveLog === undefined ? undefined : _this_assertiveLog.appendChild(node);
2241
- else (_this_politeLog = this.politeLog) === null || _this_politeLog === undefined ? undefined : _this_politeLog.appendChild(node);
2215
+ if (assertiveness === 'assertive') (_this_assertiveLog = this.assertiveLog) === null || _this_assertiveLog === void 0 ? void 0 : _this_assertiveLog.appendChild(node);
2216
+ else (_this_politeLog = this.politeLog) === null || _this_politeLog === void 0 ? void 0 : _this_politeLog.appendChild(node);
2242
2217
  if (message !== '') setTimeout(()=>{
2243
2218
  node.remove();
2244
2219
  }, timeout);
@@ -2313,28 +2288,31 @@ const $edcf132a9284368a$var$TOTAL_SIZE = {
2313
2288
  height: 'totalHeight'
2314
2289
  };
2315
2290
  const $edcf132a9284368a$var$PARSED_PLACEMENT_CACHE = {};
2316
- let $edcf132a9284368a$var$visualViewport = typeof document !== 'undefined' ? window.visualViewport : null;
2317
- function $edcf132a9284368a$var$getContainerDimensions(containerNode) {
2291
+ let $edcf132a9284368a$var$getVisualViewport = ()=>typeof document !== 'undefined' ? window.visualViewport : null;
2292
+ function $edcf132a9284368a$var$getContainerDimensions(containerNode, visualViewport) {
2318
2293
  let width = 0, height = 0, totalWidth = 0, totalHeight = 0, top = 0, left = 0;
2319
2294
  let scroll = {};
2320
2295
  var _visualViewport_scale;
2321
- let isPinchZoomedIn = ((_visualViewport_scale = $edcf132a9284368a$var$visualViewport === null || $edcf132a9284368a$var$visualViewport === undefined ? undefined : $edcf132a9284368a$var$visualViewport.scale) !== null && _visualViewport_scale !== undefined ? _visualViewport_scale : 1) > 1;
2322
- if (containerNode.tagName === 'BODY') {
2296
+ let isPinchZoomedIn = ((_visualViewport_scale = visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.scale) !== null && _visualViewport_scale !== void 0 ? _visualViewport_scale : 1) > 1;
2297
+ // In the case where the container is `html` or `body` and the container doesn't have something like `position: relative`,
2298
+ // then position absolute will be positioned relative to the viewport, also known as the `initial containing block`.
2299
+ // That's why we use the visual viewport instead.
2300
+ if (containerNode.tagName === 'BODY' || containerNode.tagName === 'HTML') {
2323
2301
  let documentElement = document.documentElement;
2324
2302
  totalWidth = documentElement.clientWidth;
2325
2303
  totalHeight = documentElement.clientHeight;
2326
2304
  var _visualViewport_width;
2327
- width = (_visualViewport_width = $edcf132a9284368a$var$visualViewport === null || $edcf132a9284368a$var$visualViewport === undefined ? undefined : $edcf132a9284368a$var$visualViewport.width) !== null && _visualViewport_width !== undefined ? _visualViewport_width : totalWidth;
2305
+ width = (_visualViewport_width = visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.width) !== null && _visualViewport_width !== void 0 ? _visualViewport_width : totalWidth;
2328
2306
  var _visualViewport_height;
2329
- height = (_visualViewport_height = $edcf132a9284368a$var$visualViewport === null || $edcf132a9284368a$var$visualViewport === undefined ? undefined : $edcf132a9284368a$var$visualViewport.height) !== null && _visualViewport_height !== undefined ? _visualViewport_height : totalHeight;
2307
+ height = (_visualViewport_height = visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.height) !== null && _visualViewport_height !== void 0 ? _visualViewport_height : totalHeight;
2330
2308
  scroll.top = documentElement.scrollTop || containerNode.scrollTop;
2331
2309
  scroll.left = documentElement.scrollLeft || containerNode.scrollLeft;
2332
2310
  // The goal of the below is to get a top/left value that represents the top/left of the visual viewport with
2333
2311
  // respect to the layout viewport origin. This combined with the scrollTop/scrollLeft will allow us to calculate
2334
2312
  // coordinates/values with respect to the visual viewport or with respect to the layout viewport.
2335
- if ($edcf132a9284368a$var$visualViewport) {
2336
- top = $edcf132a9284368a$var$visualViewport.offsetTop;
2337
- left = $edcf132a9284368a$var$visualViewport.offsetLeft;
2313
+ if (visualViewport) {
2314
+ top = visualViewport.offsetTop;
2315
+ left = visualViewport.offsetLeft;
2338
2316
  }
2339
2317
  } else {
2340
2318
  ({ width: width, height: height, top: top, left: left } = $edcf132a9284368a$var$getOffset(containerNode, false));
@@ -2351,9 +2329,9 @@ function $edcf132a9284368a$var$getContainerDimensions(containerNode) {
2351
2329
  scroll.top = 0;
2352
2330
  scroll.left = 0;
2353
2331
  var _visualViewport_pageTop;
2354
- top = (_visualViewport_pageTop = $edcf132a9284368a$var$visualViewport === null || $edcf132a9284368a$var$visualViewport === undefined ? undefined : $edcf132a9284368a$var$visualViewport.pageTop) !== null && _visualViewport_pageTop !== undefined ? _visualViewport_pageTop : 0;
2332
+ top = (_visualViewport_pageTop = visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.pageTop) !== null && _visualViewport_pageTop !== void 0 ? _visualViewport_pageTop : 0;
2355
2333
  var _visualViewport_pageLeft;
2356
- left = (_visualViewport_pageLeft = $edcf132a9284368a$var$visualViewport === null || $edcf132a9284368a$var$visualViewport === undefined ? undefined : $edcf132a9284368a$var$visualViewport.pageLeft) !== null && _visualViewport_pageLeft !== undefined ? _visualViewport_pageLeft : 0;
2334
+ left = (_visualViewport_pageLeft = visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.pageLeft) !== null && _visualViewport_pageLeft !== void 0 ? _visualViewport_pageLeft : 0;
2357
2335
  }
2358
2336
  return {
2359
2337
  width: width,
@@ -2383,15 +2361,17 @@ boundaryDimensions, // The dimensions of the containing block element that the p
2383
2361
  // position: relative/absolute, it will be different.
2384
2362
  containerDimensions, padding, containerOffsetWithBoundary) {
2385
2363
  var _containerDimensions_scroll_axis;
2386
- let containerScroll = (_containerDimensions_scroll_axis = containerDimensions.scroll[axis]) !== null && _containerDimensions_scroll_axis !== undefined ? _containerDimensions_scroll_axis : 0;
2364
+ let containerScroll = (_containerDimensions_scroll_axis = containerDimensions.scroll[axis]) !== null && _containerDimensions_scroll_axis !== void 0 ? _containerDimensions_scroll_axis : 0;
2387
2365
  // The height/width of the boundary. Matches the axis along which we are adjusting the overlay position
2388
2366
  let boundarySize = boundaryDimensions[$edcf132a9284368a$var$AXIS_SIZE[axis]];
2389
2367
  // Calculate the edges of the boundary (accomodating for the boundary padding) and the edges of the overlay.
2390
2368
  // Note that these values are with respect to the visual viewport (aka 0,0 is the top left of the viewport)
2391
- let boundaryStartEdge = boundaryDimensions.scroll[$edcf132a9284368a$var$AXIS[axis]] + padding;
2392
- let boundaryEndEdge = boundarySize + boundaryDimensions.scroll[$edcf132a9284368a$var$AXIS[axis]] - padding;
2393
- let startEdgeOffset = offset - containerScroll + containerOffsetWithBoundary[axis] - boundaryDimensions[$edcf132a9284368a$var$AXIS[axis]];
2394
- let endEdgeOffset = offset - containerScroll + size + containerOffsetWithBoundary[axis] - boundaryDimensions[$edcf132a9284368a$var$AXIS[axis]];
2369
+ let boundaryStartEdge = containerOffsetWithBoundary[axis] + boundaryDimensions.scroll[$edcf132a9284368a$var$AXIS[axis]] + padding;
2370
+ let boundaryEndEdge = containerOffsetWithBoundary[axis] + boundaryDimensions.scroll[$edcf132a9284368a$var$AXIS[axis]] + boundarySize - padding;
2371
+ // transformed value of the left edge of the overlay
2372
+ let startEdgeOffset = offset - containerScroll + boundaryDimensions.scroll[$edcf132a9284368a$var$AXIS[axis]] + containerOffsetWithBoundary[axis] - boundaryDimensions[$edcf132a9284368a$var$AXIS[axis]];
2373
+ // transformed value of the right edge of the overlay
2374
+ let endEdgeOffset = offset - containerScroll + size + boundaryDimensions.scroll[$edcf132a9284368a$var$AXIS[axis]] + containerOffsetWithBoundary[axis] - boundaryDimensions[$edcf132a9284368a$var$AXIS[axis]];
2395
2375
  // If any of the overlay edges falls outside of the boundary, shift the overlay the required amount to align one of the overlay's
2396
2376
  // edges with the closest boundary edge.
2397
2377
  if (startEdgeOffset < boundaryStartEdge) return boundaryStartEdge - startEdgeOffset;
@@ -2425,26 +2405,26 @@ function $edcf132a9284368a$var$parsePlacement(input) {
2425
2405
  };
2426
2406
  return $edcf132a9284368a$var$PARSED_PLACEMENT_CACHE[input];
2427
2407
  }
2428
- function $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, offset, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset) {
2408
+ function $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, offset, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset, containerDimensions) {
2429
2409
  let { placement: placement, crossPlacement: crossPlacement, axis: axis, crossAxis: crossAxis, size: size, crossSize: crossSize } = placementInfo;
2430
2410
  let position = {};
2431
2411
  var _childOffset_crossAxis;
2432
2412
  // button position
2433
- position[crossAxis] = (_childOffset_crossAxis = childOffset[crossAxis]) !== null && _childOffset_crossAxis !== undefined ? _childOffset_crossAxis : 0;
2413
+ position[crossAxis] = (_childOffset_crossAxis = childOffset[crossAxis]) !== null && _childOffset_crossAxis !== void 0 ? _childOffset_crossAxis : 0;
2434
2414
  var _childOffset_crossSize, _overlaySize_crossSize, _childOffset_crossSize1, _overlaySize_crossSize1;
2435
2415
  if (crossPlacement === 'center') // + (button size / 2) - (overlay size / 2)
2436
2416
  // at this point the overlay center should match the button center
2437
- position[crossAxis] += (((_childOffset_crossSize = childOffset[crossSize]) !== null && _childOffset_crossSize !== undefined ? _childOffset_crossSize : 0) - ((_overlaySize_crossSize = overlaySize[crossSize]) !== null && _overlaySize_crossSize !== undefined ? _overlaySize_crossSize : 0)) / 2;
2417
+ position[crossAxis] += (((_childOffset_crossSize = childOffset[crossSize]) !== null && _childOffset_crossSize !== void 0 ? _childOffset_crossSize : 0) - ((_overlaySize_crossSize = overlaySize[crossSize]) !== null && _overlaySize_crossSize !== void 0 ? _overlaySize_crossSize : 0)) / 2;
2438
2418
  else if (crossPlacement !== crossAxis) // + (button size) - (overlay size)
2439
2419
  // at this point the overlay bottom should match the button bottom
2440
- position[crossAxis] += ((_childOffset_crossSize1 = childOffset[crossSize]) !== null && _childOffset_crossSize1 !== undefined ? _childOffset_crossSize1 : 0) - ((_overlaySize_crossSize1 = overlaySize[crossSize]) !== null && _overlaySize_crossSize1 !== undefined ? _overlaySize_crossSize1 : 0);
2420
+ position[crossAxis] += ((_childOffset_crossSize1 = childOffset[crossSize]) !== null && _childOffset_crossSize1 !== void 0 ? _childOffset_crossSize1 : 0) - ((_overlaySize_crossSize1 = overlaySize[crossSize]) !== null && _overlaySize_crossSize1 !== void 0 ? _overlaySize_crossSize1 : 0);
2441
2421
  /* else {
2442
2422
  the overlay top should match the button top
2443
2423
  } */
2444
2424
  position[crossAxis] += crossOffset;
2445
- // overlay top overlapping arrow with button bottom
2425
+ // overlay top or left overlapping arrow with button bottom or right
2446
2426
  const minPosition = childOffset[crossAxis] - overlaySize[crossSize] + arrowSize + arrowBoundaryOffset;
2447
- // overlay bottom overlapping arrow with button top
2427
+ // overlay bottom or right overlapping arrow with button top or left
2448
2428
  const maxPosition = childOffset[crossAxis] + childOffset[crossSize] - arrowSize - arrowBoundaryOffset;
2449
2429
  position[crossAxis] = ($9446cca9a3875146$export$7d15b64cf5a3a4c4)(position[crossAxis], minPosition, maxPosition);
2450
2430
  // Floor these so the position isn't placed on a partial pixel, only whole pixels. Shouldn't matter if it was floored or ceiled, so chose one.
@@ -2452,46 +2432,61 @@ function $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions,
2452
2432
  // If the container is positioned (non-static), then we use the container's actual
2453
2433
  // height, as `bottom` will be relative to this height. But if the container is static,
2454
2434
  // then it can only be the `document.body`, and `bottom` will be relative to _its_
2455
- // container, which should be as large as boundaryDimensions.
2456
- const containerHeight = isContainerPositioned ? containerOffsetWithBoundary[size] : boundaryDimensions[$edcf132a9284368a$var$TOTAL_SIZE[size]];
2435
+ // container.
2436
+ let containerHeight = isContainerPositioned ? containerDimensions[size] : containerDimensions[$edcf132a9284368a$var$TOTAL_SIZE[size]];
2457
2437
  position[$edcf132a9284368a$var$FLIPPED_DIRECTION[axis]] = Math.floor(containerHeight - childOffset[axis] + offset);
2458
2438
  } else position[axis] = Math.floor(childOffset[axis] + childOffset[size] + offset);
2459
2439
  return position;
2460
2440
  }
2461
- function $edcf132a9284368a$var$getMaxHeight(position, boundaryDimensions, containerOffsetWithBoundary, isContainerPositioned, margins, padding, overlayHeight, heightGrowthDirection) {
2462
- const containerHeight = isContainerPositioned ? containerOffsetWithBoundary.height : boundaryDimensions[$edcf132a9284368a$var$TOTAL_SIZE.height];
2463
- var _position_bottom;
2464
- // For cases where position is set via "bottom" instead of "top", we need to calculate the true overlay top with respect to the boundary. Reverse calculate this with the same method
2465
- // used in computePosition.
2466
- let overlayTop = position.top != null ? containerOffsetWithBoundary.top + position.top : containerOffsetWithBoundary.top + (containerHeight - ((_position_bottom = position.bottom) !== null && _position_bottom !== undefined ? _position_bottom : 0) - overlayHeight);
2467
- var _boundaryDimensions_scroll_top, _margins_top, _margins_bottom, _boundaryDimensions_scroll_top1, _margins_top1, _margins_bottom1;
2441
+ function $edcf132a9284368a$var$getMaxHeight(position, boundaryDimensions, containerOffsetWithBoundary, isContainerPositioned, margins, padding, overlayHeight, heightGrowthDirection, containerDimensions, isContainerDescendentOfBoundary, visualViewport) {
2442
+ var _position_bottom, _containerDimensions_scroll_top;
2443
+ // For cases where position is set via "bottom" instead of "top", we need to calculate the true overlay top
2444
+ // with respect to the container.
2445
+ let overlayTop = (position.top != null ? position.top : containerDimensions[$edcf132a9284368a$var$TOTAL_SIZE.height] - ((_position_bottom = position.bottom) !== null && _position_bottom !== void 0 ? _position_bottom : 0) - overlayHeight) - ((_containerDimensions_scroll_top = containerDimensions.scroll.top) !== null && _containerDimensions_scroll_top !== void 0 ? _containerDimensions_scroll_top : 0);
2446
+ // calculate the dimentions of the "boundingRect" which is most restrictive top/bottom of the boundaryRect and the visual view port
2447
+ let boundaryToContainerTransformOffset = isContainerDescendentOfBoundary ? containerOffsetWithBoundary.top : 0;
2448
+ var _visualViewport_offsetTop, _visualViewport_offsetTop1, _visualViewport_height;
2449
+ let boundingRect = {
2450
+ // This should be boundary top in container coord system vs viewport top in container coord system
2451
+ // For the viewport top, there are several cases
2452
+ // 1. pinchzoom case where we want the viewports offset top as top here
2453
+ // 2. case where container is offset from the boundary and is contained by the boundary. In this case the top we want here is NOT 0, we want to take boundary's top even though is is a negative number OR the visual viewport, whichever is more restrictive
2454
+ top: Math.max(boundaryDimensions.top + boundaryToContainerTransformOffset, ((_visualViewport_offsetTop = visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.offsetTop) !== null && _visualViewport_offsetTop !== void 0 ? _visualViewport_offsetTop : boundaryDimensions.top) + boundaryToContainerTransformOffset),
2455
+ bottom: Math.min(boundaryDimensions.top + boundaryDimensions.height + boundaryToContainerTransformOffset, ((_visualViewport_offsetTop1 = visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.offsetTop) !== null && _visualViewport_offsetTop1 !== void 0 ? _visualViewport_offsetTop1 : 0) + ((_visualViewport_height = visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.height) !== null && _visualViewport_height !== void 0 ? _visualViewport_height : 0))
2456
+ };
2457
+ var _margins_top, _margins_bottom, _margins_top1, _margins_bottom1;
2468
2458
  let maxHeight = heightGrowthDirection !== 'top' ? // We want the distance between the top of the overlay to the bottom of the boundary
2469
- Math.max(0, boundaryDimensions.height + boundaryDimensions.top + ((_boundaryDimensions_scroll_top = boundaryDimensions.scroll.top) !== null && _boundaryDimensions_scroll_top !== undefined ? _boundaryDimensions_scroll_top : 0) - overlayTop // this is the top of the overlay
2470
- - (((_margins_top = margins.top) !== null && _margins_top !== undefined ? _margins_top : 0) + ((_margins_bottom = margins.bottom) !== null && _margins_bottom !== undefined ? _margins_bottom : 0) + padding // save additional space for margin and padding
2459
+ Math.max(0, boundingRect.bottom // this is the bottom of the boundary
2460
+ - overlayTop // this is the top of the overlay
2461
+ - (((_margins_top = margins.top) !== null && _margins_top !== void 0 ? _margins_top : 0) + ((_margins_bottom = margins.bottom) !== null && _margins_bottom !== void 0 ? _margins_bottom : 0) + padding // save additional space for margin and padding
2471
2462
  )) : Math.max(0, overlayTop + overlayHeight // this is the bottom of the overlay
2472
- - (boundaryDimensions.top + ((_boundaryDimensions_scroll_top1 = boundaryDimensions.scroll.top) !== null && _boundaryDimensions_scroll_top1 !== undefined ? _boundaryDimensions_scroll_top1 : 0) // this is the top of the boundary
2473
- ) - (((_margins_top1 = margins.top) !== null && _margins_top1 !== undefined ? _margins_top1 : 0) + ((_margins_bottom1 = margins.bottom) !== null && _margins_bottom1 !== undefined ? _margins_bottom1 : 0) + padding // save additional space for margin and padding
2463
+ - boundingRect.top // this is the top of the boundary
2464
+ - (((_margins_top1 = margins.top) !== null && _margins_top1 !== void 0 ? _margins_top1 : 0) + ((_margins_bottom1 = margins.bottom) !== null && _margins_bottom1 !== void 0 ? _margins_bottom1 : 0) + padding // save additional space for margin and padding
2474
2465
  ));
2475
- return Math.min(boundaryDimensions.height - padding * 2, maxHeight);
2466
+ return maxHeight;
2476
2467
  }
2477
- function $edcf132a9284368a$var$getAvailableSpace(boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding, placementInfo) {
2468
+ function $edcf132a9284368a$var$getAvailableSpace(boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding, placementInfo, containerDimensions, isContainerDescendentOfBoundary) {
2478
2469
  let { placement: placement, axis: axis, size: size } = placementInfo;
2479
- var _boundaryDimensions_scroll_axis, _margins_axis;
2480
- if (placement === axis) return Math.max(0, childOffset[axis] - boundaryDimensions[axis] - ((_boundaryDimensions_scroll_axis = boundaryDimensions.scroll[axis]) !== null && _boundaryDimensions_scroll_axis !== undefined ? _boundaryDimensions_scroll_axis : 0) + containerOffsetWithBoundary[axis] - ((_margins_axis = margins[axis]) !== null && _margins_axis !== undefined ? _margins_axis : 0) - margins[$edcf132a9284368a$var$FLIPPED_DIRECTION[axis]] - padding);
2481
- var _margins_axis1;
2482
- return Math.max(0, boundaryDimensions[size] + boundaryDimensions[axis] + boundaryDimensions.scroll[axis] - containerOffsetWithBoundary[axis] - childOffset[axis] - childOffset[size] - ((_margins_axis1 = margins[axis]) !== null && _margins_axis1 !== undefined ? _margins_axis1 : 0) - margins[$edcf132a9284368a$var$FLIPPED_DIRECTION[axis]] - padding);
2483
- }
2484
- function $edcf132a9284368a$export$6839422d1f33cee9(placementInput, childOffset, overlaySize, scrollSize, margins, padding, flip, boundaryDimensions, containerDimensions, containerOffsetWithBoundary, offset, crossOffset, isContainerPositioned, userSetMaxHeight, arrowSize, arrowBoundaryOffset) {
2470
+ var _containerDimensions_scroll_axis, _margins_axis;
2471
+ if (placement === axis) return Math.max(0, childOffset[axis] // trigger start
2472
+ - ((_containerDimensions_scroll_axis = containerDimensions.scroll[axis]) !== null && _containerDimensions_scroll_axis !== void 0 ? _containerDimensions_scroll_axis : 0 // transform trigger position to be with respect to viewport 0,0
2473
+ ) - (boundaryDimensions[axis] + (isContainerDescendentOfBoundary ? containerOffsetWithBoundary[axis] : 0) // boundary start
2474
+ ) - ((_margins_axis = margins[axis]) !== null && _margins_axis !== void 0 ? _margins_axis : 0 // margins usually for arrows or other decorations
2475
+ ) - margins[$edcf132a9284368a$var$FLIPPED_DIRECTION[axis]] - padding); // padding between overlay and boundary
2476
+ var _containerDimensions_scroll_axis1, _margins_axis1;
2477
+ return Math.max(0, boundaryDimensions[size] + boundaryDimensions[axis] + (isContainerDescendentOfBoundary ? containerOffsetWithBoundary[axis] : 0) - childOffset[axis] - childOffset[size] + ((_containerDimensions_scroll_axis1 = containerDimensions.scroll[axis]) !== null && _containerDimensions_scroll_axis1 !== void 0 ? _containerDimensions_scroll_axis1 : 0) - ((_margins_axis1 = margins[axis]) !== null && _margins_axis1 !== void 0 ? _margins_axis1 : 0) - margins[$edcf132a9284368a$var$FLIPPED_DIRECTION[axis]] - padding);
2478
+ }
2479
+ function $edcf132a9284368a$export$6839422d1f33cee9(placementInput, childOffset, overlaySize, scrollSize, margins, padding, flip, boundaryDimensions, containerDimensions, containerOffsetWithBoundary, offset, crossOffset, isContainerPositioned, userSetMaxHeight, arrowSize, arrowBoundaryOffset, isContainerDescendentOfBoundary, visualViewport) {
2485
2480
  let placementInfo = $edcf132a9284368a$var$parsePlacement(placementInput);
2486
2481
  let { size: size, crossAxis: crossAxis, crossSize: crossSize, placement: placement, crossPlacement: crossPlacement } = placementInfo;
2487
- let position = $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, offset, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset);
2482
+ let position = $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, offset, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset, containerDimensions);
2488
2483
  let normalizedOffset = offset;
2489
- let space = $edcf132a9284368a$var$getAvailableSpace(boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding + offset, placementInfo);
2484
+ let space = $edcf132a9284368a$var$getAvailableSpace(boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding + offset, placementInfo, containerDimensions, isContainerDescendentOfBoundary);
2490
2485
  // Check if the scroll size of the overlay is greater than the available space to determine if we need to flip
2491
- if (flip && scrollSize[size] > space) {
2486
+ if (flip && overlaySize[size] > space) {
2492
2487
  let flippedPlacementInfo = $edcf132a9284368a$var$parsePlacement(`${$edcf132a9284368a$var$FLIPPED_DIRECTION[placement]} ${crossPlacement}`);
2493
- let flippedPosition = $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, flippedPlacementInfo, offset, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset);
2494
- let flippedSpace = $edcf132a9284368a$var$getAvailableSpace(boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding + offset, flippedPlacementInfo);
2488
+ let flippedPosition = $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, flippedPlacementInfo, offset, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset, containerDimensions);
2489
+ let flippedSpace = $edcf132a9284368a$var$getAvailableSpace(boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding + offset, flippedPlacementInfo, containerDimensions, isContainerDescendentOfBoundary);
2495
2490
  // If the available space for the flipped position is greater than the original available space, flip.
2496
2491
  if (flippedSpace > space) {
2497
2492
  placementInfo = flippedPlacementInfo;
@@ -2510,10 +2505,10 @@ function $edcf132a9284368a$export$6839422d1f33cee9(placementInput, childOffset,
2510
2505
  }
2511
2506
  let delta = $edcf132a9284368a$var$getDelta(crossAxis, position[crossAxis], overlaySize[crossSize], boundaryDimensions, containerDimensions, padding, containerOffsetWithBoundary);
2512
2507
  position[crossAxis] += delta;
2513
- let maxHeight = $edcf132a9284368a$var$getMaxHeight(position, boundaryDimensions, containerOffsetWithBoundary, isContainerPositioned, margins, padding, overlaySize.height, heightGrowthDirection);
2508
+ let maxHeight = $edcf132a9284368a$var$getMaxHeight(position, boundaryDimensions, containerOffsetWithBoundary, isContainerPositioned, margins, padding, overlaySize.height, heightGrowthDirection, containerDimensions, isContainerDescendentOfBoundary, visualViewport);
2514
2509
  if (userSetMaxHeight && userSetMaxHeight < maxHeight) maxHeight = userSetMaxHeight;
2515
2510
  overlaySize.height = Math.min(overlaySize.height, maxHeight);
2516
- position = $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, normalizedOffset, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset);
2511
+ position = $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, normalizedOffset, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset, containerDimensions);
2517
2512
  delta = $edcf132a9284368a$var$getDelta(crossAxis, position[crossAxis], overlaySize[crossSize], boundaryDimensions, containerDimensions, padding, containerOffsetWithBoundary);
2518
2513
  position[crossAxis] += delta;
2519
2514
  let arrowPosition = {};
@@ -2528,7 +2523,7 @@ function $edcf132a9284368a$export$6839422d1f33cee9(placementInput, childOffset,
2528
2523
  const arrowMinPosition = arrowSize / 2 + arrowBoundaryOffset;
2529
2524
  var _margins_left, _margins_right, _margins_top, _margins_bottom;
2530
2525
  // overlaySize[crossSize] - margins = true size of the overlay
2531
- const overlayMargin = $edcf132a9284368a$var$AXIS[crossAxis] === 'left' ? ((_margins_left = margins.left) !== null && _margins_left !== undefined ? _margins_left : 0) + ((_margins_right = margins.right) !== null && _margins_right !== undefined ? _margins_right : 0) : ((_margins_top = margins.top) !== null && _margins_top !== undefined ? _margins_top : 0) + ((_margins_bottom = margins.bottom) !== null && _margins_bottom !== undefined ? _margins_bottom : 0);
2526
+ const overlayMargin = $edcf132a9284368a$var$AXIS[crossAxis] === 'left' ? ((_margins_left = margins.left) !== null && _margins_left !== void 0 ? _margins_left : 0) + ((_margins_right = margins.right) !== null && _margins_right !== void 0 ? _margins_right : 0) : ((_margins_top = margins.top) !== null && _margins_top !== void 0 ? _margins_top : 0) + ((_margins_bottom = margins.bottom) !== null && _margins_bottom !== void 0 ? _margins_bottom : 0);
2532
2527
  const arrowMaxPosition = overlaySize[crossSize] - overlayMargin - arrowSize / 2 - arrowBoundaryOffset;
2533
2528
  // Min/Max position limits for the arrow with respect to the trigger/overlay anchor element
2534
2529
  // Same margin accomodation done here as well as for the preferredArrowPosition
@@ -2559,6 +2554,7 @@ function $edcf132a9284368a$export$6839422d1f33cee9(placementInput, childOffset,
2559
2554
  }
2560
2555
  function $edcf132a9284368a$export$b3ceb0cbf1056d98(opts) {
2561
2556
  let { placement: placement, targetNode: targetNode, overlayNode: overlayNode, scrollNode: scrollNode, padding: padding, shouldFlip: shouldFlip, boundaryElement: boundaryElement, offset: offset, crossOffset: crossOffset, maxHeight: maxHeight, arrowSize: arrowSize = 0, arrowBoundaryOffset: arrowBoundaryOffset = 0 } = opts;
2557
+ let visualViewport = $edcf132a9284368a$var$getVisualViewport();
2562
2558
  let container = overlayNode instanceof HTMLElement ? $edcf132a9284368a$var$getContainingBlock(overlayNode) : document.documentElement;
2563
2559
  let isViewportContainer = container === document.documentElement;
2564
2560
  const containerPositionStyle = window.getComputedStyle(container).position;
@@ -2572,25 +2568,26 @@ function $edcf132a9284368a$export$b3ceb0cbf1056d98(opts) {
2572
2568
  let overlaySize = $edcf132a9284368a$var$getOffset(overlayNode, true);
2573
2569
  let margins = $edcf132a9284368a$var$getMargins(overlayNode);
2574
2570
  var _margins_left, _margins_right;
2575
- overlaySize.width += ((_margins_left = margins.left) !== null && _margins_left !== undefined ? _margins_left : 0) + ((_margins_right = margins.right) !== null && _margins_right !== undefined ? _margins_right : 0);
2571
+ overlaySize.width += ((_margins_left = margins.left) !== null && _margins_left !== void 0 ? _margins_left : 0) + ((_margins_right = margins.right) !== null && _margins_right !== void 0 ? _margins_right : 0);
2576
2572
  var _margins_top, _margins_bottom;
2577
- overlaySize.height += ((_margins_top = margins.top) !== null && _margins_top !== undefined ? _margins_top : 0) + ((_margins_bottom = margins.bottom) !== null && _margins_bottom !== undefined ? _margins_bottom : 0);
2573
+ overlaySize.height += ((_margins_top = margins.top) !== null && _margins_top !== void 0 ? _margins_top : 0) + ((_margins_bottom = margins.bottom) !== null && _margins_bottom !== void 0 ? _margins_bottom : 0);
2578
2574
  let scrollSize = $edcf132a9284368a$var$getScroll(scrollNode);
2579
- let boundaryDimensions = $edcf132a9284368a$var$getContainerDimensions(boundaryElement);
2580
- let containerDimensions = $edcf132a9284368a$var$getContainerDimensions(container);
2575
+ // Note that due to logic inside getContainerDimensions, for cases where the boundary element is the body, we will return
2576
+ // a height/width that matches the visual viewport size rather than the body's height/width (aka for zoom it will be zoom adjusted size)
2577
+ // and a top/left that is adjusted as well (will return the top/left of the zoomed in viewport, or 0,0 for a non-zoomed body)
2578
+ // Otherwise this returns the height/width of a arbitrary boundary element, and its top/left with respect to the viewport (NOTE THIS MEANS IT DOESNT INCLUDE SCROLL)
2579
+ let boundaryDimensions = $edcf132a9284368a$var$getContainerDimensions(boundaryElement, visualViewport);
2580
+ let containerDimensions = $edcf132a9284368a$var$getContainerDimensions(container, visualViewport);
2581
2581
  // If the container is the HTML element wrapping the body element, the retrieved scrollTop/scrollLeft will be equal to the
2582
2582
  // body element's scroll. Set the container's scroll values to 0 since the overlay's edge position value in getDelta don't then need to be further offset
2583
2583
  // by the container scroll since they are essentially the same containing element and thus in the same coordinate system
2584
- let containerOffsetWithBoundary = boundaryElement.tagName === 'BODY' ? $edcf132a9284368a$var$getOffset(container, false) : $edcf132a9284368a$var$getPosition(container, boundaryElement, false);
2585
- if (container.tagName === 'HTML' && boundaryElement.tagName === 'BODY') {
2586
- containerDimensions.scroll.top = 0;
2587
- containerDimensions.scroll.left = 0;
2588
- }
2589
- return $edcf132a9284368a$export$6839422d1f33cee9(placement, childOffset, overlaySize, scrollSize, margins, padding, shouldFlip, boundaryDimensions, containerDimensions, containerOffsetWithBoundary, offset, crossOffset, isContainerPositioned, maxHeight, arrowSize, arrowBoundaryOffset);
2584
+ let containerOffsetWithBoundary = $edcf132a9284368a$var$getPosition(boundaryElement, container, false);
2585
+ let isContainerDescendentOfBoundary = boundaryElement.contains(container);
2586
+ return $edcf132a9284368a$export$6839422d1f33cee9(placement, childOffset, overlaySize, scrollSize, margins, padding, shouldFlip, boundaryDimensions, containerDimensions, containerOffsetWithBoundary, offset, crossOffset, isContainerPositioned, maxHeight, arrowSize, arrowBoundaryOffset, isContainerDescendentOfBoundary, visualViewport);
2590
2587
  }
2591
2588
  function $edcf132a9284368a$export$4b834cebd9e5cebe(node, ignoreScale) {
2592
2589
  let { top: top, left: left, width: width, height: height } = node.getBoundingClientRect();
2593
- // Use offsetWidth and offsetHeight if this is an HTML element, so that
2590
+ // Use offsetWidth and offsetHeight if this is an HTML element, so that
2594
2591
  // the size is not affected by scale transforms.
2595
2592
  if (ignoreScale && node instanceof node.ownerDocument.defaultView.HTMLElement) {
2596
2593
  width = node.offsetWidth;
@@ -2807,10 +2804,13 @@ function $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a() {
2807
2804
  }, []);
2808
2805
  // We cannot determine the browser's language on the server, so default to
2809
2806
  // en-US. This will be updated after hydration on the client to the correct value.
2810
- if (isSSR) return {
2811
- locale: 'en-US',
2812
- direction: 'ltr'
2813
- };
2807
+ if (isSSR) {
2808
+ let locale = typeof window !== 'undefined' && window[$1e5a04cdaf7d1af8$var$localeSymbol];
2809
+ return {
2810
+ locale: locale || 'en-US',
2811
+ direction: 'ltr'
2812
+ };
2813
+ }
2814
2814
  return defaultLocale;
2815
2815
  }
2816
2816
 
@@ -2873,7 +2873,7 @@ class $5b160d28a433310d$export$c17fa47878dc55b6 {
2873
2873
  [locale]: globalStrings[pkg]
2874
2874
  }, locale);
2875
2875
  }
2876
- let dictionary = $5b160d28a433310d$var$cachedGlobalStrings === null || $5b160d28a433310d$var$cachedGlobalStrings === undefined ? undefined : $5b160d28a433310d$var$cachedGlobalStrings[packageName];
2876
+ let dictionary = $5b160d28a433310d$var$cachedGlobalStrings === null || $5b160d28a433310d$var$cachedGlobalStrings === void 0 ? void 0 : $5b160d28a433310d$var$cachedGlobalStrings[packageName];
2877
2877
  if (!dictionary) throw new Error(`Strings for package "${packageName}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);
2878
2878
  return dictionary;
2879
2879
  }
@@ -3068,7 +3068,7 @@ function $2a41e45df1593e64$export$d39e1813b3bdd0e1(props) {
3068
3068
  placement,
3069
3069
  overlayRef.current,
3070
3070
  targetRef.current,
3071
- arrowRef === null || arrowRef === undefined ? undefined : arrowRef.current,
3071
+ arrowRef === null || arrowRef === void 0 ? void 0 : arrowRef.current,
3072
3072
  scrollRef.current,
3073
3073
  containerPadding,
3074
3074
  shouldFlip,
@@ -3084,15 +3084,15 @@ function $2a41e45df1593e64$export$d39e1813b3bdd0e1(props) {
3084
3084
  // Note, the position freezing breaks if body sizes itself dynamicly with the visual viewport but that might
3085
3085
  // just be a non-realistic use case
3086
3086
  // Upon opening a overlay, record the current visual viewport scale so we can freeze the overlay styles
3087
- let lastScale = ($dbSRa$react.useRef)($2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === undefined ? undefined : $2a41e45df1593e64$var$visualViewport.scale);
3087
+ let lastScale = ($dbSRa$react.useRef)($2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === void 0 ? void 0 : $2a41e45df1593e64$var$visualViewport.scale);
3088
3088
  ($dbSRa$react.useEffect)(()=>{
3089
- if (isOpen) lastScale.current = $2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === undefined ? undefined : $2a41e45df1593e64$var$visualViewport.scale;
3089
+ if (isOpen) lastScale.current = $2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === void 0 ? void 0 : $2a41e45df1593e64$var$visualViewport.scale;
3090
3090
  }, [
3091
3091
  isOpen
3092
3092
  ]);
3093
3093
  let updatePosition = ($dbSRa$react.useCallback)(()=>{
3094
3094
  if (shouldUpdatePosition === false || !isOpen || !overlayRef.current || !targetRef.current || !boundaryElement) return;
3095
- if (($2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === undefined ? undefined : $2a41e45df1593e64$var$visualViewport.scale) !== lastScale.current) return;
3095
+ if (($2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === void 0 ? void 0 : $2a41e45df1593e64$var$visualViewport.scale) !== lastScale.current) return;
3096
3096
  // Determine a scroll anchor based on the focused element.
3097
3097
  // This stores the offset of the anchor element from the scroll container
3098
3098
  // so it can be restored after repositioning. This way if the overlay height
@@ -3100,19 +3100,19 @@ function $2a41e45df1593e64$export$d39e1813b3bdd0e1(props) {
3100
3100
  let anchor = null;
3101
3101
  if (scrollRef.current && scrollRef.current.contains(document.activeElement)) {
3102
3102
  var _document_activeElement;
3103
- let anchorRect = (_document_activeElement = document.activeElement) === null || _document_activeElement === undefined ? undefined : _document_activeElement.getBoundingClientRect();
3103
+ let anchorRect = (_document_activeElement = document.activeElement) === null || _document_activeElement === void 0 ? void 0 : _document_activeElement.getBoundingClientRect();
3104
3104
  let scrollRect = scrollRef.current.getBoundingClientRect();
3105
3105
  var _anchorRect_top;
3106
3106
  // Anchor from the top if the offset is in the top half of the scrollable element,
3107
3107
  // otherwise anchor from the bottom.
3108
3108
  anchor = {
3109
3109
  type: 'top',
3110
- offset: ((_anchorRect_top = anchorRect === null || anchorRect === undefined ? undefined : anchorRect.top) !== null && _anchorRect_top !== undefined ? _anchorRect_top : 0) - scrollRect.top
3110
+ offset: ((_anchorRect_top = anchorRect === null || anchorRect === void 0 ? void 0 : anchorRect.top) !== null && _anchorRect_top !== void 0 ? _anchorRect_top : 0) - scrollRect.top
3111
3111
  };
3112
3112
  if (anchor.offset > scrollRect.height / 2) {
3113
3113
  anchor.type = 'bottom';
3114
3114
  var _anchorRect_bottom;
3115
- anchor.offset = ((_anchorRect_bottom = anchorRect === null || anchorRect === undefined ? undefined : anchorRect.bottom) !== null && _anchorRect_bottom !== undefined ? _anchorRect_bottom : 0) - scrollRect.bottom;
3115
+ anchor.offset = ((_anchorRect_bottom = anchorRect === null || anchorRect === void 0 ? void 0 : anchorRect.bottom) !== null && _anchorRect_bottom !== void 0 ? _anchorRect_bottom : 0) - scrollRect.bottom;
3116
3116
  }
3117
3117
  }
3118
3118
  // Always reset the overlay's previous max height if not defined by the user so that we can compensate for
@@ -3123,7 +3123,7 @@ function $2a41e45df1593e64$export$d39e1813b3bdd0e1(props) {
3123
3123
  overlay.style.top = '0px';
3124
3124
  overlay.style.bottom = '';
3125
3125
  var _window_visualViewport_height;
3126
- overlay.style.maxHeight = ((_window_visualViewport_height = (_window_visualViewport = window.visualViewport) === null || _window_visualViewport === undefined ? undefined : _window_visualViewport.height) !== null && _window_visualViewport_height !== undefined ? _window_visualViewport_height : window.innerHeight) + 'px';
3126
+ overlay.style.maxHeight = ((_window_visualViewport_height = (_window_visualViewport = window.visualViewport) === null || _window_visualViewport === void 0 ? void 0 : _window_visualViewport.height) !== null && _window_visualViewport_height !== void 0 ? _window_visualViewport_height : window.innerHeight) + 'px';
3127
3127
  }
3128
3128
  let position = ($edcf132a9284368a$export$b3ceb0cbf1056d98)({
3129
3129
  placement: $2a41e45df1593e64$var$translateRTL(placement, direction),
@@ -3136,7 +3136,7 @@ function $2a41e45df1593e64$export$d39e1813b3bdd0e1(props) {
3136
3136
  offset: offset,
3137
3137
  crossOffset: crossOffset,
3138
3138
  maxHeight: maxHeight,
3139
- arrowSize: arrowSize !== null && arrowSize !== undefined ? arrowSize : (arrowRef === null || arrowRef === undefined ? undefined : arrowRef.current) ? ($edcf132a9284368a$export$4b834cebd9e5cebe)(arrowRef.current, true).width : 0,
3139
+ arrowSize: arrowSize !== null && arrowSize !== void 0 ? arrowSize : (arrowRef === null || arrowRef === void 0 ? void 0 : arrowRef.current) ? ($edcf132a9284368a$export$4b834cebd9e5cebe)(arrowRef.current, true).width : 0,
3140
3140
  arrowBoundaryOffset: arrowBoundaryOffset
3141
3141
  });
3142
3142
  if (!position.position) return;
@@ -3192,17 +3192,17 @@ function $2a41e45df1593e64$export$d39e1813b3bdd0e1(props) {
3192
3192
  let onScroll = ()=>{
3193
3193
  if (isResizing.current) onResize();
3194
3194
  };
3195
- $2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === undefined ? undefined : $2a41e45df1593e64$var$visualViewport.addEventListener('resize', onResize);
3196
- $2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === undefined ? undefined : $2a41e45df1593e64$var$visualViewport.addEventListener('scroll', onScroll);
3195
+ $2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === void 0 ? void 0 : $2a41e45df1593e64$var$visualViewport.addEventListener('resize', onResize);
3196
+ $2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === void 0 ? void 0 : $2a41e45df1593e64$var$visualViewport.addEventListener('scroll', onScroll);
3197
3197
  return ()=>{
3198
- $2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === undefined ? undefined : $2a41e45df1593e64$var$visualViewport.removeEventListener('resize', onResize);
3199
- $2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === undefined ? undefined : $2a41e45df1593e64$var$visualViewport.removeEventListener('scroll', onScroll);
3198
+ $2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === void 0 ? void 0 : $2a41e45df1593e64$var$visualViewport.removeEventListener('resize', onResize);
3199
+ $2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === void 0 ? void 0 : $2a41e45df1593e64$var$visualViewport.removeEventListener('scroll', onScroll);
3200
3200
  };
3201
3201
  }, [
3202
3202
  updatePosition
3203
3203
  ]);
3204
3204
  let close = ($dbSRa$react.useCallback)(()=>{
3205
- if (!isResizing.current) onClose === null || onClose === undefined ? undefined : onClose();
3205
+ if (!isResizing.current) onClose === null || onClose === void 0 ? void 0 : onClose();
3206
3206
  }, [
3207
3207
  onClose,
3208
3208
  isResizing
@@ -3222,18 +3222,18 @@ function $2a41e45df1593e64$export$d39e1813b3bdd0e1(props) {
3222
3222
  top: !position ? 0 : undefined,
3223
3223
  left: !position ? 0 : undefined,
3224
3224
  zIndex: 100000,
3225
- ...position === null || position === undefined ? undefined : position.position,
3226
- maxHeight: (_position_maxHeight = position === null || position === undefined ? undefined : position.maxHeight) !== null && _position_maxHeight !== undefined ? _position_maxHeight : '100vh'
3225
+ ...position === null || position === void 0 ? void 0 : position.position,
3226
+ maxHeight: (_position_maxHeight = position === null || position === void 0 ? void 0 : position.maxHeight) !== null && _position_maxHeight !== void 0 ? _position_maxHeight : '100vh'
3227
3227
  }
3228
3228
  },
3229
- placement: (_position_placement = position === null || position === undefined ? undefined : position.placement) !== null && _position_placement !== undefined ? _position_placement : null,
3230
- triggerAnchorPoint: (_position_triggerAnchorPoint = position === null || position === undefined ? undefined : position.triggerAnchorPoint) !== null && _position_triggerAnchorPoint !== undefined ? _position_triggerAnchorPoint : null,
3229
+ placement: (_position_placement = position === null || position === void 0 ? void 0 : position.placement) !== null && _position_placement !== void 0 ? _position_placement : null,
3230
+ triggerAnchorPoint: (_position_triggerAnchorPoint = position === null || position === void 0 ? void 0 : position.triggerAnchorPoint) !== null && _position_triggerAnchorPoint !== void 0 ? _position_triggerAnchorPoint : null,
3231
3231
  arrowProps: {
3232
3232
  'aria-hidden': 'true',
3233
3233
  role: 'presentation',
3234
3234
  style: {
3235
- left: position === null || position === undefined ? undefined : position.arrowOffsetLeft,
3236
- top: position === null || position === undefined ? undefined : position.arrowOffsetTop
3235
+ left: position === null || position === void 0 ? void 0 : position.arrowOffsetLeft,
3236
+ top: position === null || position === void 0 ? void 0 : position.arrowOffsetTop
3237
3237
  }
3238
3238
  },
3239
3239
  updatePosition: updatePosition
@@ -3298,9 +3298,6 @@ function $8a9cb279dc87e130$export$715c682d09d639cc(onBlur) {
3298
3298
  }
3299
3299
  };
3300
3300
  }, []);
3301
- let dispatchBlur = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)((e)=>{
3302
- onBlur === null || onBlur === undefined ? undefined : onBlur(e);
3303
- });
3304
3301
  // This function is called during a React onFocus event.
3305
3302
  return ($dbSRa$react.useCallback)((e)=>{
3306
3303
  // React does not fire onBlur when an element is disabled. https://github.com/facebook/react/issues/9142
@@ -3315,7 +3312,7 @@ function $8a9cb279dc87e130$export$715c682d09d639cc(onBlur) {
3315
3312
  if (target.disabled) {
3316
3313
  // For backward compatibility, dispatch a (fake) React synthetic event.
3317
3314
  let event = $8a9cb279dc87e130$export$525bc4921d56d4a(e);
3318
- dispatchBlur(event);
3315
+ onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
3319
3316
  }
3320
3317
  // We no longer need the MutationObserver once the target is blurred.
3321
3318
  if (stateRef.current.observer) {
@@ -3329,7 +3326,7 @@ function $8a9cb279dc87e130$export$715c682d09d639cc(onBlur) {
3329
3326
  stateRef.current.observer = new MutationObserver(()=>{
3330
3327
  if (stateRef.current.isFocused && target.disabled) {
3331
3328
  var _stateRef_current_observer;
3332
- (_stateRef_current_observer = stateRef.current.observer) === null || _stateRef_current_observer === undefined ? undefined : _stateRef_current_observer.disconnect();
3329
+ (_stateRef_current_observer = stateRef.current.observer) === null || _stateRef_current_observer === void 0 ? void 0 : _stateRef_current_observer.disconnect();
3333
3330
  let relatedTargetEl = target === document.activeElement ? null : document.activeElement;
3334
3331
  target.dispatchEvent(new FocusEvent('blur', {
3335
3332
  relatedTarget: relatedTargetEl
@@ -3348,7 +3345,7 @@ function $8a9cb279dc87e130$export$715c682d09d639cc(onBlur) {
3348
3345
  });
3349
3346
  }
3350
3347
  }, [
3351
- dispatchBlur
3348
+ onBlur
3352
3349
  ]);
3353
3350
  }
3354
3351
  let $8a9cb279dc87e130$export$fda7da73ab5d4c48 = false;
@@ -3568,12 +3565,12 @@ class $f6c31cce2adf654f$var$PressEvent {
3568
3565
  constructor(type, pointerType, originalEvent, state){
3569
3566
  (_class_private_field_init)(this, $f6c31cce2adf654f$var$_shouldStopPropagation, {
3570
3567
  writable: true,
3571
- value: undefined
3568
+ value: void 0
3572
3569
  });
3573
3570
  (_class_private_field_set)(this, $f6c31cce2adf654f$var$_shouldStopPropagation, true);
3574
3571
  var _state_target;
3575
- let currentTarget = (_state_target = state === null || state === undefined ? undefined : state.target) !== null && _state_target !== undefined ? _state_target : originalEvent.currentTarget;
3576
- const rect = currentTarget === null || currentTarget === undefined ? undefined : currentTarget.getBoundingClientRect();
3572
+ let currentTarget = (_state_target = state === null || state === void 0 ? void 0 : state.target) !== null && _state_target !== void 0 ? _state_target : originalEvent.currentTarget;
3573
+ const rect = currentTarget === null || currentTarget === void 0 ? void 0 : currentTarget.getBoundingClientRect();
3577
3574
  let x, y = 0;
3578
3575
  let clientX, clientY = null;
3579
3576
  if (originalEvent.clientX != null && originalEvent.clientY != null) {
@@ -3617,8 +3614,8 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
3617
3614
  pointerType: null,
3618
3615
  disposables: []
3619
3616
  });
3620
- let { addGlobalListener: addGlobalListener, removeAllGlobalListeners: removeAllGlobalListeners } = ($03deb23ff14920c4$export$4eaf04e54aa8eed6)();
3621
- let triggerPressStart = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)((originalEvent, pointerType)=>{
3617
+ let { addGlobalListener: addGlobalListener, removeAllGlobalListeners: removeAllGlobalListeners, removeGlobalListener: removeGlobalListener } = ($03deb23ff14920c4$export$4eaf04e54aa8eed6)();
3618
+ let triggerPressStart = ($dbSRa$react.useCallback)((originalEvent, pointerType)=>{
3622
3619
  let state = ref.current;
3623
3620
  if (isDisabled || state.didFirePressStart) return false;
3624
3621
  let shouldStopPropagation = true;
@@ -3633,8 +3630,12 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
3633
3630
  state.didFirePressStart = true;
3634
3631
  setPressed(true);
3635
3632
  return shouldStopPropagation;
3636
- });
3637
- let triggerPressEnd = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)((originalEvent, pointerType, wasPressed = true)=>{
3633
+ }, [
3634
+ isDisabled,
3635
+ onPressStart,
3636
+ onPressChange
3637
+ ]);
3638
+ let triggerPressEnd = ($dbSRa$react.useCallback)((originalEvent, pointerType, wasPressed = true)=>{
3638
3639
  let state = ref.current;
3639
3640
  if (!state.didFirePressStart) return false;
3640
3641
  state.didFirePressStart = false;
@@ -3654,8 +3655,14 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
3654
3655
  }
3655
3656
  state.isTriggeringEvent = false;
3656
3657
  return shouldStopPropagation;
3657
- });
3658
- let triggerPressUp = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)((originalEvent, pointerType)=>{
3658
+ }, [
3659
+ isDisabled,
3660
+ onPressEnd,
3661
+ onPressChange,
3662
+ onPress
3663
+ ]);
3664
+ let triggerPressEndEvent = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(triggerPressEnd);
3665
+ let triggerPressUp = ($dbSRa$react.useCallback)((originalEvent, pointerType)=>{
3659
3666
  let state = ref.current;
3660
3667
  if (isDisabled) return false;
3661
3668
  if (onPressUp) {
@@ -3666,12 +3673,17 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
3666
3673
  return event.shouldStopPropagation;
3667
3674
  }
3668
3675
  return true;
3669
- });
3670
- let cancel = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)((e)=>{
3676
+ }, [
3677
+ isDisabled,
3678
+ onPressUp
3679
+ ]);
3680
+ let triggerPressUpEvent = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(triggerPressUp);
3681
+ let cancel = ($dbSRa$react.useCallback)((e)=>{
3671
3682
  let state = ref.current;
3672
3683
  if (state.isPressed && state.target) {
3673
3684
  if (state.didFirePressStart && state.pointerType != null) triggerPressEnd($f6c31cce2adf654f$var$createEvent(state.target, e), state.pointerType, false);
3674
3685
  state.isPressed = false;
3686
+ setIsPointerPressed(null);
3675
3687
  state.isOverTarget = false;
3676
3688
  state.activePointerId = null;
3677
3689
  state.pointerType = null;
@@ -3680,15 +3692,26 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
3680
3692
  for (let dispose of state.disposables)dispose();
3681
3693
  state.disposables = [];
3682
3694
  }
3683
- });
3684
- let cancelOnPointerExit = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)((e)=>{
3695
+ }, [
3696
+ allowTextSelectionOnPress,
3697
+ removeAllGlobalListeners,
3698
+ triggerPressEnd
3699
+ ]);
3700
+ let cancelEvent = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(cancel);
3701
+ let cancelOnPointerExit = ($dbSRa$react.useCallback)((e)=>{
3685
3702
  if (shouldCancelOnPointerExit) cancel(e);
3686
- });
3687
- let triggerClick = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)((e)=>{
3703
+ }, [
3704
+ shouldCancelOnPointerExit,
3705
+ cancel
3706
+ ]);
3707
+ let triggerClick = ($dbSRa$react.useCallback)((e)=>{
3688
3708
  if (isDisabled) return;
3689
- onClick === null || onClick === undefined ? undefined : onClick(e);
3690
- });
3691
- let triggerSyntheticClick = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)((e, target)=>{
3709
+ onClick === null || onClick === void 0 ? void 0 : onClick(e);
3710
+ }, [
3711
+ isDisabled,
3712
+ onClick
3713
+ ]);
3714
+ let triggerSyntheticClick = ($dbSRa$react.useCallback)((e, target)=>{
3692
3715
  if (isDisabled) return;
3693
3716
  // Some third-party libraries pass in onClick instead of onPress.
3694
3717
  // Create a fake mouse event and trigger onClick as well.
@@ -3700,7 +3723,147 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
3700
3723
  ($8a9cb279dc87e130$export$c2b7abe5d61ec696)(event, target);
3701
3724
  onClick(($8a9cb279dc87e130$export$525bc4921d56d4a)(event));
3702
3725
  }
3703
- });
3726
+ }, [
3727
+ isDisabled,
3728
+ onClick
3729
+ ]);
3730
+ let triggerSyntheticClickEvent = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(triggerSyntheticClick);
3731
+ let [isElemKeyPressed, setIsElemKeyPressed] = ($dbSRa$react.useState)(false);
3732
+ ($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
3733
+ let state = ref.current;
3734
+ if (isElemKeyPressed) {
3735
+ let onKeyUp = (e)=>{
3736
+ var _state_metaKeyEvents;
3737
+ if (state.isPressed && state.target && $f6c31cce2adf654f$var$isValidKeyboardEvent(e, state.target)) {
3738
+ var _state_metaKeyEvents1;
3739
+ if ($f6c31cce2adf654f$var$shouldPreventDefaultKeyboard(($d4ee10de306f2510$export$e58f029f0fbfdb29)(e), e.key)) e.preventDefault();
3740
+ let target = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
3741
+ let wasPressed = ($d4ee10de306f2510$export$4282f70798064fe0)(state.target, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e));
3742
+ triggerPressEndEvent($f6c31cce2adf654f$var$createEvent(state.target, e), 'keyboard', wasPressed);
3743
+ if (wasPressed) triggerSyntheticClickEvent(e, state.target);
3744
+ removeAllGlobalListeners();
3745
+ // If a link was triggered with a key other than Enter, open the URL ourselves.
3746
+ // This means the link has a role override, and the default browser behavior
3747
+ // only applies when using the Enter key.
3748
+ if (e.key !== 'Enter' && $f6c31cce2adf654f$var$isHTMLAnchorLink(state.target) && ($d4ee10de306f2510$export$4282f70798064fe0)(state.target, target) && !e[$f6c31cce2adf654f$var$LINK_CLICKED]) {
3749
+ // Store a hidden property on the event so we only trigger link click once,
3750
+ // even if there are multiple usePress instances attached to the element.
3751
+ e[$f6c31cce2adf654f$var$LINK_CLICKED] = true;
3752
+ ($ea8dcbcb9ea1b556$export$95185d699e05d4d7)(state.target, e, false);
3753
+ }
3754
+ state.isPressed = false;
3755
+ setIsElemKeyPressed(false);
3756
+ (_state_metaKeyEvents1 = state.metaKeyEvents) === null || _state_metaKeyEvents1 === void 0 ? void 0 : _state_metaKeyEvents1.delete(e.key);
3757
+ } else if (e.key === 'Meta' && ((_state_metaKeyEvents = state.metaKeyEvents) === null || _state_metaKeyEvents === void 0 ? void 0 : _state_metaKeyEvents.size)) {
3758
+ var _state_target;
3759
+ // If we recorded keydown events that occurred while the Meta key was pressed,
3760
+ // and those haven't received keyup events already, fire keyup events ourselves.
3761
+ // See comment above for more info about the macOS bug causing this.
3762
+ let events = state.metaKeyEvents;
3763
+ state.metaKeyEvents = undefined;
3764
+ for (let event of events.values())(_state_target = state.target) === null || _state_target === void 0 ? void 0 : _state_target.dispatchEvent(new KeyboardEvent('keyup', event));
3765
+ }
3766
+ };
3767
+ // Focus may move before the key up event, so register the event on the document
3768
+ // instead of the same element where the key down event occurred. Make it capturing so that it will trigger
3769
+ // before stopPropagation from useKeyboard on a child element may happen and thus we can still call triggerPress for the parent element.
3770
+ let originalTarget = state.target;
3771
+ let pressUp = (e)=>{
3772
+ if (originalTarget && $f6c31cce2adf654f$var$isValidKeyboardEvent(e, originalTarget) && !e.repeat && ($d4ee10de306f2510$export$4282f70798064fe0)(originalTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e)) && state.target) triggerPressUpEvent($f6c31cce2adf654f$var$createEvent(state.target, e), 'keyboard');
3773
+ };
3774
+ let listener = ($ff5963eb1fccf552$export$e08e3b67e392101e)(pressUp, onKeyUp);
3775
+ addGlobalListener(($431fbd86ca7dc216$export$b204af158042fbac)(state.target), 'keyup', listener, true);
3776
+ return ()=>{
3777
+ removeGlobalListener(($431fbd86ca7dc216$export$b204af158042fbac)(state.target), 'keyup', listener, true);
3778
+ };
3779
+ }
3780
+ }, [
3781
+ isElemKeyPressed,
3782
+ addGlobalListener,
3783
+ removeAllGlobalListeners,
3784
+ removeGlobalListener
3785
+ ]);
3786
+ let [isPointerPressed, setIsPointerPressed] = ($dbSRa$react.useState)(null);
3787
+ ($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
3788
+ let state = ref.current;
3789
+ if (isPointerPressed === 'pointer') {
3790
+ let onPointerUp = (e)=>{
3791
+ if (e.pointerId === state.activePointerId && state.isPressed && e.button === 0 && state.target) {
3792
+ if (($d4ee10de306f2510$export$4282f70798064fe0)(state.target, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e)) && state.pointerType != null) {
3793
+ // Wait for onClick to fire onPress. This avoids browser issues when the DOM
3794
+ // is mutated between onPointerUp and onClick, and is more compatible with third party libraries.
3795
+ // https://github.com/adobe/react-spectrum/issues/1513
3796
+ // https://issues.chromium.org/issues/40732224
3797
+ // However, iOS and Android do not focus or fire onClick after a long press.
3798
+ // We work around this by triggering a click ourselves after a timeout.
3799
+ // This timeout is canceled during the click event in case the real one fires first.
3800
+ // The timeout must be at least 32ms, because Safari on iOS delays the click event on
3801
+ // non-form elements without certain ARIA roles (for hover emulation).
3802
+ // https://github.com/WebKit/WebKit/blob/dccfae42bb29bd4bdef052e469f604a9387241c0/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm#L875-L892
3803
+ let clicked = false;
3804
+ let timeout = setTimeout(()=>{
3805
+ if (state.isPressed && state.target instanceof HTMLElement) {
3806
+ if (clicked) cancelEvent(e);
3807
+ else {
3808
+ ($7215afc6de606d6b$export$de79e2c695e052f3)(state.target);
3809
+ state.target.click();
3810
+ }
3811
+ }
3812
+ }, 80);
3813
+ // Use a capturing listener to track if a click occurred.
3814
+ // If stopPropagation is called it may never reach our handler.
3815
+ addGlobalListener(e.currentTarget, 'click', ()=>clicked = true, true);
3816
+ state.disposables.push(()=>clearTimeout(timeout));
3817
+ } else cancelEvent(e);
3818
+ // Ignore subsequent onPointerLeave event before onClick on touch devices.
3819
+ state.isOverTarget = false;
3820
+ }
3821
+ };
3822
+ let onPointerCancel = (e)=>{
3823
+ cancelEvent(e);
3824
+ };
3825
+ addGlobalListener(($431fbd86ca7dc216$export$b204af158042fbac)(state.target), 'pointerup', onPointerUp, false);
3826
+ addGlobalListener(($431fbd86ca7dc216$export$b204af158042fbac)(state.target), 'pointercancel', onPointerCancel, false);
3827
+ return ()=>{
3828
+ removeGlobalListener(($431fbd86ca7dc216$export$b204af158042fbac)(state.target), 'pointerup', onPointerUp, false);
3829
+ removeGlobalListener(($431fbd86ca7dc216$export$b204af158042fbac)(state.target), 'pointercancel', onPointerCancel, false);
3830
+ };
3831
+ } else if (isPointerPressed === 'mouse' && process.env.NODE_ENV === 'test') {
3832
+ let onMouseUp = (e)=>{
3833
+ // Only handle left clicks
3834
+ if (e.button !== 0) return;
3835
+ if (state.ignoreEmulatedMouseEvents) {
3836
+ state.ignoreEmulatedMouseEvents = false;
3837
+ return;
3838
+ }
3839
+ if (state.target && state.target.contains(e.target) && state.pointerType != null) ;
3840
+ else cancelEvent(e);
3841
+ state.isOverTarget = false;
3842
+ };
3843
+ addGlobalListener(($431fbd86ca7dc216$export$b204af158042fbac)(state.target), 'mouseup', onMouseUp, false);
3844
+ return ()=>{
3845
+ removeGlobalListener(($431fbd86ca7dc216$export$b204af158042fbac)(state.target), 'mouseup', onMouseUp, false);
3846
+ };
3847
+ } else if (isPointerPressed === 'touch' && process.env.NODE_ENV === 'test') {
3848
+ let onScroll = (e)=>{
3849
+ if (state.isPressed && ($d4ee10de306f2510$export$4282f70798064fe0)(($d4ee10de306f2510$export$e58f029f0fbfdb29)(e), state.target)) cancelEvent({
3850
+ currentTarget: state.target,
3851
+ shiftKey: false,
3852
+ ctrlKey: false,
3853
+ metaKey: false,
3854
+ altKey: false
3855
+ });
3856
+ };
3857
+ addGlobalListener(($431fbd86ca7dc216$export$f21a1ffae260145a)(state.target), 'scroll', onScroll, true);
3858
+ return ()=>{
3859
+ removeGlobalListener(($431fbd86ca7dc216$export$f21a1ffae260145a)(state.target), 'scroll', onScroll, true);
3860
+ };
3861
+ }
3862
+ }, [
3863
+ isPointerPressed,
3864
+ addGlobalListener,
3865
+ removeGlobalListener
3866
+ ]);
3704
3867
  let pressProps = ($dbSRa$react.useMemo)(()=>{
3705
3868
  let state = ref.current;
3706
3869
  let pressProps = {
@@ -3715,16 +3878,9 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
3715
3878
  if (!state.isPressed && !e.repeat) {
3716
3879
  state.target = e.currentTarget;
3717
3880
  state.isPressed = true;
3881
+ setIsElemKeyPressed(true);
3718
3882
  state.pointerType = 'keyboard';
3719
3883
  shouldStopPropagation = triggerPressStart(e, 'keyboard');
3720
- // Focus may move before the key up event, so register the event on the document
3721
- // instead of the same element where the key down event occurred. Make it capturing so that it will trigger
3722
- // before stopPropagation from useKeyboard on a child element may happen and thus we can still call triggerPress for the parent element.
3723
- let originalTarget = e.currentTarget;
3724
- let pressUp = (e)=>{
3725
- if ($f6c31cce2adf654f$var$isValidKeyboardEvent(e, originalTarget) && !e.repeat && ($d4ee10de306f2510$export$4282f70798064fe0)(originalTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e)) && state.target) triggerPressUp($f6c31cce2adf654f$var$createEvent(state.target, e), 'keyboard');
3726
- };
3727
- addGlobalListener(($431fbd86ca7dc216$export$b204af158042fbac)(e.currentTarget), 'keyup', ($ff5963eb1fccf552$export$e08e3b67e392101e)(pressUp, onKeyUp), true);
3728
3884
  }
3729
3885
  if (shouldStopPropagation) e.stopPropagation();
3730
3886
  // Keep track of the keydown events that occur while the Meta (e.g. Command) key is held.
@@ -3734,7 +3890,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
3734
3890
  // https://bugs.chromium.org/p/chromium/issues/detail?id=1393524
3735
3891
  // https://bugs.webkit.org/show_bug.cgi?id=55291
3736
3892
  // https://bugzilla.mozilla.org/show_bug.cgi?id=1299553
3737
- if (e.metaKey && ($c87311424ea30a05$export$9ac100e40613ea10)()) (_state_metaKeyEvents = state.metaKeyEvents) === null || _state_metaKeyEvents === undefined ? undefined : _state_metaKeyEvents.set(e.key, e.nativeEvent);
3893
+ if (e.metaKey && ($c87311424ea30a05$export$9ac100e40613ea10)()) (_state_metaKeyEvents = state.metaKeyEvents) === null || _state_metaKeyEvents === void 0 ? void 0 : _state_metaKeyEvents.set(e.key, e.nativeEvent);
3738
3894
  } else if (e.key === 'Meta') state.metaKeyEvents = new Map();
3739
3895
  },
3740
3896
  onClick (e) {
@@ -3764,37 +3920,6 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
3764
3920
  }
3765
3921
  }
3766
3922
  };
3767
- let onKeyUp = (e)=>{
3768
- var _state_metaKeyEvents;
3769
- if (state.isPressed && state.target && $f6c31cce2adf654f$var$isValidKeyboardEvent(e, state.target)) {
3770
- var _state_metaKeyEvents1;
3771
- if ($f6c31cce2adf654f$var$shouldPreventDefaultKeyboard(($d4ee10de306f2510$export$e58f029f0fbfdb29)(e), e.key)) e.preventDefault();
3772
- let target = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
3773
- let wasPressed = ($d4ee10de306f2510$export$4282f70798064fe0)(state.target, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e));
3774
- triggerPressEnd($f6c31cce2adf654f$var$createEvent(state.target, e), 'keyboard', wasPressed);
3775
- if (wasPressed) triggerSyntheticClick(e, state.target);
3776
- removeAllGlobalListeners();
3777
- // If a link was triggered with a key other than Enter, open the URL ourselves.
3778
- // This means the link has a role override, and the default browser behavior
3779
- // only applies when using the Enter key.
3780
- if (e.key !== 'Enter' && $f6c31cce2adf654f$var$isHTMLAnchorLink(state.target) && ($d4ee10de306f2510$export$4282f70798064fe0)(state.target, target) && !e[$f6c31cce2adf654f$var$LINK_CLICKED]) {
3781
- // Store a hidden property on the event so we only trigger link click once,
3782
- // even if there are multiple usePress instances attached to the element.
3783
- e[$f6c31cce2adf654f$var$LINK_CLICKED] = true;
3784
- ($ea8dcbcb9ea1b556$export$95185d699e05d4d7)(state.target, e, false);
3785
- }
3786
- state.isPressed = false;
3787
- (_state_metaKeyEvents1 = state.metaKeyEvents) === null || _state_metaKeyEvents1 === undefined ? undefined : _state_metaKeyEvents1.delete(e.key);
3788
- } else if (e.key === 'Meta' && ((_state_metaKeyEvents = state.metaKeyEvents) === null || _state_metaKeyEvents === undefined ? undefined : _state_metaKeyEvents.size)) {
3789
- var _state_target;
3790
- // If we recorded keydown events that occurred while the Meta key was pressed,
3791
- // and those haven't received keyup events already, fire keyup events ourselves.
3792
- // See comment above for more info about the macOS bug causing this.
3793
- let events = state.metaKeyEvents;
3794
- state.metaKeyEvents = undefined;
3795
- for (let event of events.values())(_state_target = state.target) === null || _state_target === undefined ? undefined : _state_target.dispatchEvent(new KeyboardEvent('keyup', event));
3796
- }
3797
- };
3798
3923
  if (typeof PointerEvent !== 'undefined') {
3799
3924
  pressProps.onPointerDown = (e)=>{
3800
3925
  // Only handle left clicks, and ignore events that bubbled through portals.
@@ -3811,6 +3936,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
3811
3936
  let shouldStopPropagation = true;
3812
3937
  if (!state.isPressed) {
3813
3938
  state.isPressed = true;
3939
+ setIsPointerPressed('pointer');
3814
3940
  state.isOverTarget = true;
3815
3941
  state.activePointerId = e.pointerId;
3816
3942
  state.target = e.currentTarget;
@@ -3820,8 +3946,6 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
3820
3946
  // This enables onPointerLeave and onPointerEnter to fire.
3821
3947
  let target = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e.nativeEvent);
3822
3948
  if ('releasePointerCapture' in target) target.releasePointerCapture(e.pointerId);
3823
- addGlobalListener(($431fbd86ca7dc216$export$b204af158042fbac)(e.currentTarget), 'pointerup', onPointerUp, false);
3824
- addGlobalListener(($431fbd86ca7dc216$export$b204af158042fbac)(e.currentTarget), 'pointercancel', onPointerCancel, false);
3825
3949
  }
3826
3950
  if (shouldStopPropagation) e.stopPropagation();
3827
3951
  };
@@ -3854,41 +3978,6 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
3854
3978
  cancelOnPointerExit(e);
3855
3979
  }
3856
3980
  };
3857
- let onPointerUp = (e)=>{
3858
- if (e.pointerId === state.activePointerId && state.isPressed && e.button === 0 && state.target) {
3859
- if (($d4ee10de306f2510$export$4282f70798064fe0)(state.target, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e)) && state.pointerType != null) {
3860
- // Wait for onClick to fire onPress. This avoids browser issues when the DOM
3861
- // is mutated between onPointerUp and onClick, and is more compatible with third party libraries.
3862
- // https://github.com/adobe/react-spectrum/issues/1513
3863
- // https://issues.chromium.org/issues/40732224
3864
- // However, iOS and Android do not focus or fire onClick after a long press.
3865
- // We work around this by triggering a click ourselves after a timeout.
3866
- // This timeout is canceled during the click event in case the real one fires first.
3867
- // The timeout must be at least 32ms, because Safari on iOS delays the click event on
3868
- // non-form elements without certain ARIA roles (for hover emulation).
3869
- // https://github.com/WebKit/WebKit/blob/dccfae42bb29bd4bdef052e469f604a9387241c0/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm#L875-L892
3870
- let clicked = false;
3871
- let timeout = setTimeout(()=>{
3872
- if (state.isPressed && state.target instanceof HTMLElement) {
3873
- if (clicked) cancel(e);
3874
- else {
3875
- ($7215afc6de606d6b$export$de79e2c695e052f3)(state.target);
3876
- state.target.click();
3877
- }
3878
- }
3879
- }, 80);
3880
- // Use a capturing listener to track if a click occurred.
3881
- // If stopPropagation is called it may never reach our handler.
3882
- addGlobalListener(e.currentTarget, 'click', ()=>clicked = true, true);
3883
- state.disposables.push(()=>clearTimeout(timeout));
3884
- } else cancel(e);
3885
- // Ignore subsequent onPointerLeave event before onClick on touch devices.
3886
- state.isOverTarget = false;
3887
- }
3888
- };
3889
- let onPointerCancel = (e)=>{
3890
- cancel(e);
3891
- };
3892
3981
  pressProps.onDragStart = (e)=>{
3893
3982
  if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e.nativeEvent))) return;
3894
3983
  // Safari does not call onPointerCancel when a drag starts, whereas Chrome and Firefox do.
@@ -3905,6 +3994,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
3905
3994
  return;
3906
3995
  }
3907
3996
  state.isPressed = true;
3997
+ setIsPointerPressed('mouse');
3908
3998
  state.isOverTarget = true;
3909
3999
  state.target = e.currentTarget;
3910
4000
  state.pointerType = ($6a7db85432448f7f$export$60278871457622de)(e.nativeEvent) ? 'virtual' : 'mouse';
@@ -3915,7 +4005,6 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
3915
4005
  let dispose = ($8a9cb279dc87e130$export$cabe61c495ee3649)(e.target);
3916
4006
  if (dispose) state.disposables.push(dispose);
3917
4007
  }
3918
- addGlobalListener(($431fbd86ca7dc216$export$b204af158042fbac)(e.currentTarget), 'mouseup', onMouseUp, false);
3919
4008
  };
3920
4009
  pressProps.onMouseEnter = (e)=>{
3921
4010
  if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e.nativeEvent))) return;
@@ -3940,17 +4029,6 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
3940
4029
  if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e.nativeEvent))) return;
3941
4030
  if (!state.ignoreEmulatedMouseEvents && e.button === 0 && !state.isPressed) triggerPressUp(e, state.pointerType || 'mouse');
3942
4031
  };
3943
- let onMouseUp = (e)=>{
3944
- // Only handle left clicks
3945
- if (e.button !== 0) return;
3946
- if (state.ignoreEmulatedMouseEvents) {
3947
- state.ignoreEmulatedMouseEvents = false;
3948
- return;
3949
- }
3950
- if (state.target && state.target.contains(e.target) && state.pointerType != null) ;
3951
- else cancel(e);
3952
- state.isOverTarget = false;
3953
- };
3954
4032
  pressProps.onTouchStart = (e)=>{
3955
4033
  if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e.nativeEvent))) return;
3956
4034
  let touch = $f6c31cce2adf654f$var$getTouchFromEvent(e.nativeEvent);
@@ -3959,12 +4037,12 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
3959
4037
  state.ignoreEmulatedMouseEvents = true;
3960
4038
  state.isOverTarget = true;
3961
4039
  state.isPressed = true;
4040
+ setIsPointerPressed('touch');
3962
4041
  state.target = e.currentTarget;
3963
4042
  state.pointerType = 'touch';
3964
4043
  if (!allowTextSelectionOnPress) ($14c0b72509d70225$export$16a4697467175487)(state.target);
3965
4044
  let shouldStopPropagation = triggerPressStart($f6c31cce2adf654f$var$createTouchEvent(state.target, e), state.pointerType);
3966
4045
  if (shouldStopPropagation) e.stopPropagation();
3967
- addGlobalListener(($431fbd86ca7dc216$export$f21a1ffae260145a)(e.currentTarget), 'scroll', onScroll, true);
3968
4046
  };
3969
4047
  pressProps.onTouchMove = (e)=>{
3970
4048
  if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e.nativeEvent))) return;
@@ -4001,6 +4079,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
4001
4079
  } else if (state.isOverTarget && state.pointerType != null) shouldStopPropagation = triggerPressEnd($f6c31cce2adf654f$var$createTouchEvent(state.target, e), state.pointerType, false);
4002
4080
  if (shouldStopPropagation) e.stopPropagation();
4003
4081
  state.isPressed = false;
4082
+ setIsPointerPressed(null);
4004
4083
  state.activePointerId = null;
4005
4084
  state.isOverTarget = false;
4006
4085
  state.ignoreEmulatedMouseEvents = true;
@@ -4012,15 +4091,6 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
4012
4091
  e.stopPropagation();
4013
4092
  if (state.isPressed) cancel($f6c31cce2adf654f$var$createTouchEvent(state.target, e));
4014
4093
  };
4015
- let onScroll = (e)=>{
4016
- if (state.isPressed && ($d4ee10de306f2510$export$4282f70798064fe0)(($d4ee10de306f2510$export$e58f029f0fbfdb29)(e), state.target)) cancel({
4017
- currentTarget: state.target,
4018
- shiftKey: false,
4019
- ctrlKey: false,
4020
- metaKey: false,
4021
- altKey: false
4022
- });
4023
- };
4024
4094
  pressProps.onDragStart = (e)=>{
4025
4095
  if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e.nativeEvent))) return;
4026
4096
  cancel(e);
@@ -4028,7 +4098,6 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
4028
4098
  }
4029
4099
  return pressProps;
4030
4100
  }, [
4031
- addGlobalListener,
4032
4101
  isDisabled,
4033
4102
  preventFocusOnPress,
4034
4103
  removeAllGlobalListeners,
@@ -4067,7 +4136,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
4067
4136
  let state = ref.current;
4068
4137
  return ()=>{
4069
4138
  var _state_target;
4070
- if (!allowTextSelectionOnPress) ($14c0b72509d70225$export$b0d6fa1ab32e3295)((_state_target = state.target) !== null && _state_target !== undefined ? _state_target : undefined);
4139
+ if (!allowTextSelectionOnPress) ($14c0b72509d70225$export$b0d6fa1ab32e3295)((_state_target = state.target) !== null && _state_target !== void 0 ? _state_target : undefined);
4071
4140
  for (let dispose of state.disposables)dispose();
4072
4141
  state.disposables = [];
4073
4142
  };
@@ -4227,20 +4296,21 @@ function $507fabe10e71c6fb$var$triggerChangeHandlers(modality, e) {
4227
4296
  }
4228
4297
  function $507fabe10e71c6fb$var$handleKeyboardEvent(e) {
4229
4298
  $507fabe10e71c6fb$var$hasEventBeforeFocus = true;
4230
- if ($507fabe10e71c6fb$var$isValidKey(e)) {
4299
+ if (!($ea8dcbcb9ea1b556$export$95185d699e05d4d7).isOpening && $507fabe10e71c6fb$var$isValidKey(e)) {
4231
4300
  $507fabe10e71c6fb$var$currentModality = 'keyboard';
4232
4301
  $507fabe10e71c6fb$var$triggerChangeHandlers('keyboard', e);
4233
4302
  }
4234
4303
  }
4235
4304
  function $507fabe10e71c6fb$var$handlePointerEvent(e) {
4236
4305
  $507fabe10e71c6fb$var$currentModality = 'pointer';
4306
+ 'pointerType' in e ? e.pointerType : 'mouse';
4237
4307
  if (e.type === 'mousedown' || e.type === 'pointerdown') {
4238
4308
  $507fabe10e71c6fb$var$hasEventBeforeFocus = true;
4239
4309
  $507fabe10e71c6fb$var$triggerChangeHandlers('pointer', e);
4240
4310
  }
4241
4311
  }
4242
4312
  function $507fabe10e71c6fb$var$handleClickEvent(e) {
4243
- if (($6a7db85432448f7f$export$60278871457622de)(e)) {
4313
+ if (!($ea8dcbcb9ea1b556$export$95185d699e05d4d7).isOpening && ($6a7db85432448f7f$export$60278871457622de)(e)) {
4244
4314
  $507fabe10e71c6fb$var$hasEventBeforeFocus = true;
4245
4315
  $507fabe10e71c6fb$var$currentModality = 'virtual';
4246
4316
  }
@@ -4383,11 +4453,11 @@ const $507fabe10e71c6fb$var$nonTextInputTypes = new Set([
4383
4453
  * If this is attached to text input component, return if the event is a focus event (Tab/Escape keys pressed) so that
4384
4454
  * focus visible style can be properly set.
4385
4455
  */ function $507fabe10e71c6fb$var$isKeyboardFocusEvent(isTextInput, modality, e) {
4386
- let document1 = ($431fbd86ca7dc216$export$b204af158042fbac)(e === null || e === undefined ? undefined : e.target);
4387
- const IHTMLInputElement = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(e === null || e === undefined ? undefined : e.target).HTMLInputElement : HTMLInputElement;
4388
- const IHTMLTextAreaElement = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(e === null || e === undefined ? undefined : e.target).HTMLTextAreaElement : HTMLTextAreaElement;
4389
- const IHTMLElement = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(e === null || e === undefined ? undefined : e.target).HTMLElement : HTMLElement;
4390
- const IKeyboardEvent = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(e === null || e === undefined ? undefined : e.target).KeyboardEvent : KeyboardEvent;
4456
+ let document1 = ($431fbd86ca7dc216$export$b204af158042fbac)(e === null || e === void 0 ? void 0 : e.target);
4457
+ const IHTMLInputElement = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(e === null || e === void 0 ? void 0 : e.target).HTMLInputElement : HTMLInputElement;
4458
+ const IHTMLTextAreaElement = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(e === null || e === void 0 ? void 0 : e.target).HTMLTextAreaElement : HTMLTextAreaElement;
4459
+ const IHTMLElement = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(e === null || e === void 0 ? void 0 : e.target).HTMLElement : HTMLElement;
4460
+ const IKeyboardEvent = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(e === null || e === void 0 ? void 0 : e.target).KeyboardEvent : KeyboardEvent;
4391
4461
  // For keyboard events that occur on a non-input element that will move focus into input element (aka ArrowLeft going from Datepicker button to the main input group)
4392
4462
  // we need to rely on the user passing isTextInput into here. This way we can skip toggling focus visiblity for said input element
4393
4463
  isTextInput = isTextInput || document1.activeElement instanceof IHTMLInputElement && !$507fabe10e71c6fb$var$nonTextInputTypes.has(document1.activeElement.type) || document1.activeElement instanceof IHTMLTextAreaElement || document1.activeElement instanceof IHTMLElement && document1.activeElement.isContentEditable;
@@ -4398,7 +4468,7 @@ function $507fabe10e71c6fb$export$ec71b4b83ac08ec3(fn, deps, opts) {
4398
4468
  ($dbSRa$react.useEffect)(()=>{
4399
4469
  let handler = (modality, e)=>{
4400
4470
  // We want to early return for any keyboard events that occur inside text inputs EXCEPT for Tab and Escape
4401
- if (!$507fabe10e71c6fb$var$isKeyboardFocusEvent(!!(opts === null || opts === undefined ? undefined : opts.isTextInput), modality, e)) return;
4471
+ if (!$507fabe10e71c6fb$var$isKeyboardFocusEvent(!!(opts === null || opts === void 0 ? void 0 : opts.isTextInput), modality, e)) return;
4402
4472
  fn($507fabe10e71c6fb$export$b9b3dfddab17db27());
4403
4473
  };
4404
4474
  $507fabe10e71c6fb$var$changeHandlers.add(handler);
@@ -4428,12 +4498,12 @@ function $3ad3f6e1647bc98d$export$80f3e147d781571c(element) {
4428
4498
  // causing the page to scroll when moving focus if the element is transitioning
4429
4499
  // from off the screen.
4430
4500
  const ownerDocument = ($431fbd86ca7dc216$export$b204af158042fbac)(element);
4431
- const activeElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)(ownerDocument);
4432
4501
  if (($507fabe10e71c6fb$export$630ff653c5ada6a9)() === 'virtual') {
4433
- let lastFocusedElement = activeElement;
4502
+ let lastFocusedElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)(ownerDocument);
4434
4503
  ($bbed8b41f857bcc0$export$24490316f764c430)(()=>{
4435
- // If focus did not move and the element is still in the document, focus it.
4436
- if (($d4ee10de306f2510$export$cd4e5573fbe2b576)(ownerDocument) === lastFocusedElement && element.isConnected) ($7215afc6de606d6b$export$de79e2c695e052f3)(element);
4504
+ const activeElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)(ownerDocument);
4505
+ // If focus did not move or focus was lost to the body, and the element is still in the document, focus it.
4506
+ if ((activeElement === lastFocusedElement || activeElement === ownerDocument.body) && element.isConnected) ($7215afc6de606d6b$export$de79e2c695e052f3)(element);
4437
4507
  });
4438
4508
  } else ($7215afc6de606d6b$export$de79e2c695e052f3)(element);
4439
4509
  }
@@ -4623,7 +4693,7 @@ function $f645667febf57a63$export$4c014de7c8940b4c(props, domRef) {
4623
4693
  const $f1ab8c75478c6f73$export$3351871ee4b288b8 = /*#__PURE__*/ ($dbSRa$react).forwardRef(({ children: children, ...props }, ref)=>{
4624
4694
  let isRegistered = ($dbSRa$react.useRef)(false);
4625
4695
  let prevContext = ($dbSRa$react.useContext)(($ae1eeba8b9eafd08$export$5165eccb35aaadb5));
4626
- ref = ($df56164dff5785e2$export$4338b53315abf666)(ref || (prevContext === null || prevContext === undefined ? undefined : prevContext.ref));
4696
+ ref = ($df56164dff5785e2$export$4338b53315abf666)(ref || (prevContext === null || prevContext === void 0 ? void 0 : prevContext.ref));
4627
4697
  let context = ($3ef42575df84b30b$export$9d1611c77c2fe928)(prevContext || {}, {
4628
4698
  ...props,
4629
4699
  ref: ref,
@@ -4968,9 +5038,7 @@ function $e0b6e0b68ec7f50f$export$872b660ac5a1ff98(props) {
4968
5038
  }
4969
5039
  }, [
4970
5040
  ref,
4971
- isDisabled,
4972
- onPointerDown,
4973
- triggerInteractOutside
5041
+ isDisabled
4974
5042
  ]);
4975
5043
  }
4976
5044
  function $e0b6e0b68ec7f50f$var$isValidEvent(event, ref) {
@@ -5118,7 +5186,7 @@ function $9bf71ea28793e738$export$20e40289641fbbb6(props) {
5118
5186
  ($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
5119
5187
  var _startRef_current;
5120
5188
  // Find all rendered nodes between the sentinels and add them to the scope.
5121
- let node = (_startRef_current = startRef.current) === null || _startRef_current === undefined ? undefined : _startRef_current.nextSibling;
5189
+ let node = (_startRef_current = startRef.current) === null || _startRef_current === void 0 ? void 0 : _startRef_current.nextSibling;
5122
5190
  let nodes = [];
5123
5191
  let stopPropagation = (e)=>e.stopPropagation();
5124
5192
  while(node && node !== endRef.current){
@@ -5159,7 +5227,7 @@ function $9bf71ea28793e738$export$20e40289641fbbb6(props) {
5159
5227
  var _focusScopeTree_getTreeNode_parent, _focusScopeTree_getTreeNode;
5160
5228
  var _focusScopeTree_getTreeNode_parent_scopeRef;
5161
5229
  // Scope may have been re-parented.
5162
- let parentScope = (_focusScopeTree_getTreeNode_parent_scopeRef = (_focusScopeTree_getTreeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef)) === null || _focusScopeTree_getTreeNode === undefined ? undefined : (_focusScopeTree_getTreeNode_parent = _focusScopeTree_getTreeNode.parent) === null || _focusScopeTree_getTreeNode_parent === undefined ? undefined : _focusScopeTree_getTreeNode_parent.scopeRef) !== null && _focusScopeTree_getTreeNode_parent_scopeRef !== undefined ? _focusScopeTree_getTreeNode_parent_scopeRef : null;
5230
+ let parentScope = (_focusScopeTree_getTreeNode_parent_scopeRef = (_focusScopeTree_getTreeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef)) === null || _focusScopeTree_getTreeNode === void 0 ? void 0 : (_focusScopeTree_getTreeNode_parent = _focusScopeTree_getTreeNode.parent) === null || _focusScopeTree_getTreeNode_parent === void 0 ? void 0 : _focusScopeTree_getTreeNode_parent.scopeRef) !== null && _focusScopeTree_getTreeNode_parent_scopeRef !== void 0 ? _focusScopeTree_getTreeNode_parent_scopeRef : null;
5163
5231
  if ((scopeRef === $9bf71ea28793e738$var$activeScope || $9bf71ea28793e738$var$isAncestorScope(scopeRef, $9bf71ea28793e738$var$activeScope)) && (!parentScope || $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(parentScope))) $9bf71ea28793e738$var$activeScope = parentScope;
5164
5232
  $9bf71ea28793e738$export$d06fae2ee68b101e.removeTreeNode(scopeRef);
5165
5233
  };
@@ -5192,7 +5260,7 @@ function $9bf71ea28793e738$var$createFocusManagerForScope(scopeRef) {
5192
5260
  let scope = scopeRef.current;
5193
5261
  let { from: from, tabbable: tabbable, wrap: wrap, accept: accept } = opts;
5194
5262
  var _scope_;
5195
- let node = from || ($d4ee10de306f2510$export$cd4e5573fbe2b576)(($431fbd86ca7dc216$export$b204af158042fbac)((_scope_ = scope[0]) !== null && _scope_ !== undefined ? _scope_ : undefined));
5263
+ let node = from || ($d4ee10de306f2510$export$cd4e5573fbe2b576)(($431fbd86ca7dc216$export$b204af158042fbac)((_scope_ = scope[0]) !== null && _scope_ !== void 0 ? _scope_ : undefined));
5196
5264
  let sentinel = scope[0].previousElementSibling;
5197
5265
  let scopeRoot = $9bf71ea28793e738$var$getScopeRoot(scope);
5198
5266
  let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(scopeRoot, {
@@ -5212,7 +5280,7 @@ function $9bf71ea28793e738$var$createFocusManagerForScope(scopeRef) {
5212
5280
  let scope = scopeRef.current;
5213
5281
  let { from: from, tabbable: tabbable, wrap: wrap, accept: accept } = opts;
5214
5282
  var _scope_;
5215
- let node = from || ($d4ee10de306f2510$export$cd4e5573fbe2b576)(($431fbd86ca7dc216$export$b204af158042fbac)((_scope_ = scope[0]) !== null && _scope_ !== undefined ? _scope_ : undefined));
5283
+ let node = from || ($d4ee10de306f2510$export$cd4e5573fbe2b576)(($431fbd86ca7dc216$export$b204af158042fbac)((_scope_ = scope[0]) !== null && _scope_ !== void 0 ? _scope_ : undefined));
5216
5284
  let sentinel = scope[scope.length - 1].nextElementSibling;
5217
5285
  let scopeRoot = $9bf71ea28793e738$var$getScopeRoot(scope);
5218
5286
  let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(scopeRoot, {
@@ -5275,9 +5343,9 @@ function $9bf71ea28793e738$var$isTabbableRadio(element) {
5275
5343
  ].filter((radio)=>!radio.form);
5276
5344
  else {
5277
5345
  var _element_form_elements, _element_form;
5278
- let radioList = (_element_form = element.form) === null || _element_form === undefined ? undefined : (_element_form_elements = _element_form.elements) === null || _element_form_elements === undefined ? undefined : _element_form_elements.namedItem(element.name);
5346
+ let radioList = (_element_form = element.form) === null || _element_form === void 0 ? void 0 : (_element_form_elements = _element_form.elements) === null || _element_form_elements === void 0 ? void 0 : _element_form_elements.namedItem(element.name);
5279
5347
  radios = [
5280
- ...radioList !== null && radioList !== undefined ? radioList : []
5348
+ ...radioList !== null && radioList !== void 0 ? radioList : []
5281
5349
  ];
5282
5350
  }
5283
5351
  if (!radios) return false;
@@ -5348,20 +5416,20 @@ function $9bf71ea28793e738$var$useFocusContainment(scopeRef, contain) {
5348
5416
  if (target && target.isConnected) {
5349
5417
  var _focusedNode_current;
5350
5418
  focusedNode.current = target;
5351
- (_focusedNode_current = focusedNode.current) === null || _focusedNode_current === undefined ? undefined : _focusedNode_current.focus();
5419
+ (_focusedNode_current = focusedNode.current) === null || _focusedNode_current === void 0 ? void 0 : _focusedNode_current.focus();
5352
5420
  } else if ($9bf71ea28793e738$var$activeScope.current) $9bf71ea28793e738$var$focusFirstInScope($9bf71ea28793e738$var$activeScope.current);
5353
5421
  }
5354
5422
  });
5355
5423
  };
5356
5424
  ownerDocument.addEventListener('keydown', onKeyDown, false);
5357
5425
  ownerDocument.addEventListener('focusin', onFocus, false);
5358
- scope === null || scope === undefined ? undefined : scope.forEach((element)=>element.addEventListener('focusin', onFocus, false));
5359
- scope === null || scope === undefined ? undefined : scope.forEach((element)=>element.addEventListener('focusout', onBlur, false));
5426
+ scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.addEventListener('focusin', onFocus, false));
5427
+ scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.addEventListener('focusout', onBlur, false));
5360
5428
  return ()=>{
5361
5429
  ownerDocument.removeEventListener('keydown', onKeyDown, false);
5362
5430
  ownerDocument.removeEventListener('focusin', onFocus, false);
5363
- scope === null || scope === undefined ? undefined : scope.forEach((element)=>element.removeEventListener('focusin', onFocus, false));
5364
- scope === null || scope === undefined ? undefined : scope.forEach((element)=>element.removeEventListener('focusout', onBlur, false));
5431
+ scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.removeEventListener('focusin', onFocus, false));
5432
+ scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.removeEventListener('focusout', onBlur, false));
5365
5433
  };
5366
5434
  }, [
5367
5435
  scopeRef,
@@ -5399,7 +5467,7 @@ function $9bf71ea28793e738$export$1258395f99bf9cbf(element) {
5399
5467
  }
5400
5468
  function $9bf71ea28793e738$var$isAncestorScope(ancestor, scope) {
5401
5469
  var _focusScopeTree_getTreeNode;
5402
- let parent = (_focusScopeTree_getTreeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scope)) === null || _focusScopeTree_getTreeNode === undefined ? undefined : _focusScopeTree_getTreeNode.parent;
5470
+ let parent = (_focusScopeTree_getTreeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scope)) === null || _focusScopeTree_getTreeNode === void 0 ? void 0 : _focusScopeTree_getTreeNode.parent;
5403
5471
  while(parent){
5404
5472
  if (parent.scopeRef === ancestor) return true;
5405
5473
  parent = parent.parent;
@@ -5466,10 +5534,10 @@ function $9bf71ea28793e738$var$useActiveScopeTracker(scopeRef, restore, contain)
5466
5534
  else if (!$9bf71ea28793e738$var$isElementInAnyScope(target)) $9bf71ea28793e738$var$activeScope = null;
5467
5535
  };
5468
5536
  ownerDocument.addEventListener('focusin', onFocus, false);
5469
- scope === null || scope === undefined ? undefined : scope.forEach((element)=>element.addEventListener('focusin', onFocus, false));
5537
+ scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.addEventListener('focusin', onFocus, false));
5470
5538
  return ()=>{
5471
5539
  ownerDocument.removeEventListener('focusin', onFocus, false);
5472
- scope === null || scope === undefined ? undefined : scope.forEach((element)=>element.removeEventListener('focusin', onFocus, false));
5540
+ scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.removeEventListener('focusin', onFocus, false));
5473
5541
  };
5474
5542
  }, [
5475
5543
  scopeRef,
@@ -5483,7 +5551,7 @@ function $9bf71ea28793e738$var$shouldRestoreFocus(scopeRef) {
5483
5551
  if (scope.nodeToRestore) return false;
5484
5552
  scope = scope.parent;
5485
5553
  }
5486
- return (scope === null || scope === undefined ? undefined : scope.scopeRef) === scopeRef;
5554
+ return (scope === null || scope === void 0 ? void 0 : scope.scopeRef) === scopeRef;
5487
5555
  }
5488
5556
  function $9bf71ea28793e738$var$useRestoreFocus(scopeRef, restoreFocus, contain) {
5489
5557
  // create a ref during render instead of useLayoutEffect so the active element is saved before a child with autoFocus=true mounts.
@@ -5501,10 +5569,10 @@ function $9bf71ea28793e738$var$useRestoreFocus(scopeRef, restoreFocus, contain)
5501
5569
  if ((!$9bf71ea28793e738$var$activeScope || $9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope, scopeRef)) && $9bf71ea28793e738$var$isElementInScope(($d4ee10de306f2510$export$cd4e5573fbe2b576)(ownerDocument), scopeRef.current)) $9bf71ea28793e738$var$activeScope = scopeRef;
5502
5570
  };
5503
5571
  ownerDocument.addEventListener('focusin', onFocus, false);
5504
- scope === null || scope === undefined ? undefined : scope.forEach((element)=>element.addEventListener('focusin', onFocus, false));
5572
+ scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.addEventListener('focusin', onFocus, false));
5505
5573
  return ()=>{
5506
5574
  ownerDocument.removeEventListener('focusin', onFocus, false);
5507
- scope === null || scope === undefined ? undefined : scope.forEach((element)=>element.removeEventListener('focusin', onFocus, false));
5575
+ scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.removeEventListener('focusin', onFocus, false));
5508
5576
  };
5509
5577
  // eslint-disable-next-line react-hooks/exhaustive-deps
5510
5578
  }, [
@@ -5569,7 +5637,7 @@ function $9bf71ea28793e738$var$useRestoreFocus(scopeRef, restoreFocus, contain)
5569
5637
  let treeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef);
5570
5638
  if (!treeNode) return;
5571
5639
  var _nodeToRestoreRef_current;
5572
- treeNode.nodeToRestore = (_nodeToRestoreRef_current = nodeToRestoreRef.current) !== null && _nodeToRestoreRef_current !== undefined ? _nodeToRestoreRef_current : undefined;
5640
+ treeNode.nodeToRestore = (_nodeToRestoreRef_current = nodeToRestoreRef.current) !== null && _nodeToRestoreRef_current !== void 0 ? _nodeToRestoreRef_current : undefined;
5573
5641
  return ()=>{
5574
5642
  let treeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef);
5575
5643
  if (!treeNode) return;
@@ -5621,9 +5689,9 @@ function $9bf71ea28793e738$var$restoreFocusToElement(node) {
5621
5689
  }))) $9bf71ea28793e738$var$focusElement(node);
5622
5690
  }
5623
5691
  function $9bf71ea28793e738$export$2d6ec8fc375ceafa(root, opts, scope) {
5624
- let filter = (opts === null || opts === undefined ? undefined : opts.tabbable) ? ($b4b717babfbb907b$export$bebd5a1431fec25d) : ($b4b717babfbb907b$export$4c063cf1350e6fed);
5692
+ let filter = (opts === null || opts === void 0 ? void 0 : opts.tabbable) ? ($b4b717babfbb907b$export$bebd5a1431fec25d) : ($b4b717babfbb907b$export$4c063cf1350e6fed);
5625
5693
  // Ensure that root is an Element or fall back appropriately
5626
- let rootElement = (root === null || root === undefined ? undefined : root.nodeType) === Node.ELEMENT_NODE ? root : null;
5694
+ let rootElement = (root === null || root === void 0 ? void 0 : root.nodeType) === Node.ELEMENT_NODE ? root : null;
5627
5695
  // Determine the document to use
5628
5696
  let doc = ($431fbd86ca7dc216$export$b204af158042fbac)(rootElement);
5629
5697
  // Create a TreeWalker, ensuring the root is an Element or Document
@@ -5631,18 +5699,18 @@ function $9bf71ea28793e738$export$2d6ec8fc375ceafa(root, opts, scope) {
5631
5699
  acceptNode (node) {
5632
5700
  var _opts_from;
5633
5701
  // Skip nodes inside the starting node.
5634
- if (opts === null || opts === undefined ? undefined : (_opts_from = opts.from) === null || _opts_from === undefined ? undefined : _opts_from.contains(node)) return NodeFilter.FILTER_REJECT;
5635
- if ((opts === null || opts === undefined ? undefined : opts.tabbable) && node.tagName === 'INPUT' && node.getAttribute('type') === 'radio') {
5702
+ if (opts === null || opts === void 0 ? void 0 : (_opts_from = opts.from) === null || _opts_from === void 0 ? void 0 : _opts_from.contains(node)) return NodeFilter.FILTER_REJECT;
5703
+ if ((opts === null || opts === void 0 ? void 0 : opts.tabbable) && node.tagName === 'INPUT' && node.getAttribute('type') === 'radio') {
5636
5704
  // If the radio is in a form, we can get all the other radios by name
5637
5705
  if (!$9bf71ea28793e738$var$isTabbableRadio(node)) return NodeFilter.FILTER_REJECT;
5638
5706
  // If the radio is in the same group as the current node and none are selected, we can skip it
5639
5707
  if (walker.currentNode.tagName === 'INPUT' && walker.currentNode.type === 'radio' && walker.currentNode.name === node.name) return NodeFilter.FILTER_REJECT;
5640
5708
  }
5641
- if (filter(node) && (!scope || $9bf71ea28793e738$var$isElementInScope(node, scope)) && (!(opts === null || opts === undefined ? undefined : opts.accept) || opts.accept(node))) return NodeFilter.FILTER_ACCEPT;
5709
+ if (filter(node) && (!scope || $9bf71ea28793e738$var$isElementInScope(node, scope)) && (!(opts === null || opts === void 0 ? void 0 : opts.accept) || opts.accept(node))) return NodeFilter.FILTER_ACCEPT;
5642
5710
  return NodeFilter.FILTER_SKIP;
5643
5711
  }
5644
5712
  });
5645
- if (opts === null || opts === undefined ? undefined : opts.from) walker.currentNode = opts.from;
5713
+ if (opts === null || opts === void 0 ? void 0 : opts.from) walker.currentNode = opts.from;
5646
5714
  return walker;
5647
5715
  }
5648
5716
  class $9bf71ea28793e738$var$Tree {
@@ -5653,7 +5721,7 @@ class $9bf71ea28793e738$var$Tree {
5653
5721
  return this.fastMap.get(data);
5654
5722
  }
5655
5723
  addTreeNode(scopeRef, parent, nodeToRestore) {
5656
- let parentNode = this.fastMap.get(parent !== null && parent !== undefined ? parent : null);
5724
+ let parentNode = this.fastMap.get(parent !== null && parent !== void 0 ? parent : null);
5657
5725
  if (!parentNode) return;
5658
5726
  let node = new $9bf71ea28793e738$var$TreeNode({
5659
5727
  scopeRef: scopeRef
@@ -5691,7 +5759,7 @@ class $9bf71ea28793e738$var$Tree {
5691
5759
  var _node_parent;
5692
5760
  let newTree = new $9bf71ea28793e738$var$Tree();
5693
5761
  var _node_parent_scopeRef;
5694
- for (let node of this.traverse())newTree.addTreeNode(node.scopeRef, (_node_parent_scopeRef = (_node_parent = node.parent) === null || _node_parent === undefined ? undefined : _node_parent.scopeRef) !== null && _node_parent_scopeRef !== undefined ? _node_parent_scopeRef : null, node.nodeToRestore);
5762
+ for (let node of this.traverse())newTree.addTreeNode(node.scopeRef, (_node_parent_scopeRef = (_node_parent = node.parent) === null || _node_parent === void 0 ? void 0 : _node_parent.scopeRef) !== null && _node_parent_scopeRef !== void 0 ? _node_parent_scopeRef : null, node.nodeToRestore);
5695
5763
  return newTree;
5696
5764
  }
5697
5765
  constructor(){
@@ -5770,10 +5838,10 @@ function $f7dceffc5ad7768b$export$4e328f61c538687f(props = {}) {
5770
5838
 
5771
5839
 
5772
5840
  function $83013635b024ae3d$export$eac1895992b9f3d6(ref, options) {
5773
- let isDisabled = options === null || options === undefined ? undefined : options.isDisabled;
5841
+ let isDisabled = options === null || options === void 0 ? void 0 : options.isDisabled;
5774
5842
  let [hasTabbableChild, setHasTabbableChild] = ($dbSRa$react.useState)(false);
5775
5843
  ($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
5776
- if ((ref === null || ref === undefined ? undefined : ref.current) && !isDisabled) {
5844
+ if ((ref === null || ref === void 0 ? void 0 : ref.current) && !isDisabled) {
5777
5845
  let update = ()=>{
5778
5846
  if (ref.current) {
5779
5847
  let walker = ($9bf71ea28793e738$export$2d6ec8fc375ceafa)(ref.current, {
@@ -5833,7 +5901,7 @@ function $55f9b1ae81f22853$export$2b35b76d2e30e129(to, from) {
5833
5901
  }
5834
5902
  function $55f9b1ae81f22853$export$759df0d867455a91(document) {
5835
5903
  let activeElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)(document);
5836
- let activeDescendant = activeElement === null || activeElement === undefined ? undefined : activeElement.getAttribute('aria-activedescendant');
5904
+ let activeDescendant = activeElement === null || activeElement === void 0 ? void 0 : activeElement.getAttribute('aria-activedescendant');
5837
5905
  if (activeDescendant) return document.getElementById(activeDescendant) || activeElement;
5838
5906
  return activeElement;
5839
5907
  }
@@ -5915,7 +5983,7 @@ function $a11501f3d1d39e6c$export$ea8f71083e90600f(props, ref) {
5915
5983
  // do not close the outer overlay. At this point, the active scope should
5916
5984
  // still be the outer overlay, since blur events run before focus.
5917
5985
  if (!e.relatedTarget || ($9bf71ea28793e738$export$1258395f99bf9cbf)(e.relatedTarget)) return;
5918
- if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.relatedTarget)) onClose === null || onClose === undefined ? undefined : onClose();
5986
+ if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.relatedTarget)) onClose === null || onClose === void 0 ? void 0 : onClose();
5919
5987
  }
5920
5988
  });
5921
5989
  let onPointerDownUnderlay = (e)=>{
@@ -6095,8 +6163,8 @@ function $49c51c25361d4cd2$var$preventScrollMobileSafari() {
6095
6163
  // the same input again, it is already focused, so no blur event will fire,
6096
6164
  // resulting in the flow above never running and Safari's native scrolling occurring.
6097
6165
  // Instead, move focus to the parent focusable element (e.g. the dialog).
6098
- let focusable = (_target_parentElement = target.parentElement) === null || _target_parentElement === undefined ? undefined : _target_parentElement.closest('[tabindex]');
6099
- focusable === null || focusable === undefined ? undefined : focusable.focus({
6166
+ let focusable = (_target_parentElement = target.parentElement) === null || _target_parentElement === void 0 ? void 0 : _target_parentElement.closest('[tabindex]');
6167
+ focusable === null || focusable === void 0 ? void 0 : focusable.focus({
6100
6168
  preventScroll: true
6101
6169
  });
6102
6170
  }
@@ -6192,7 +6260,7 @@ function $49c51c25361d4cd2$var$scrollIntoView(target) {
6192
6260
  const $96b38030c423d352$export$60d741e20e0aa309 = /*#__PURE__*/ ($dbSRa$react.createContext)({});
6193
6261
  function $96b38030c423d352$export$9fc1347d4195ccb3() {
6194
6262
  var _useContext;
6195
- return (_useContext = ($dbSRa$react.useContext)($96b38030c423d352$export$60d741e20e0aa309)) !== null && _useContext !== undefined ? _useContext : {};
6263
+ return (_useContext = ($dbSRa$react.useContext)($96b38030c423d352$export$60d741e20e0aa309)) !== null && _useContext !== void 0 ? _useContext : {};
6196
6264
  }
6197
6265
 
6198
6266
  /*
@@ -6260,7 +6328,7 @@ function $f57aed4a881a3485$export$b47c3594eab58386(props) {
6260
6328
  let { getContainer: getContainer } = ($96b38030c423d352$export$9fc1347d4195ccb3)();
6261
6329
  if (!props.portalContainer && getContainer) portalContainer = getContainer();
6262
6330
  ($dbSRa$react).useEffect(()=>{
6263
- if (portalContainer === null || portalContainer === undefined ? undefined : portalContainer.closest('[data-overlay-container]')) throw new Error('An OverlayContainer must not be inside another container. Please change the portalContainer prop.');
6331
+ if (portalContainer === null || portalContainer === void 0 ? void 0 : portalContainer.closest('[data-overlay-container]')) throw new Error('An OverlayContainer must not be inside another container. Please change the portalContainer prop.');
6264
6332
  }, [
6265
6333
  portalContainer
6266
6334
  ]);
@@ -6622,13 +6690,13 @@ const $5e3802645cc19319$var$supportsInert = typeof HTMLElement !== 'undefined' &
6622
6690
  let $5e3802645cc19319$var$refCountMap = new WeakMap();
6623
6691
  let $5e3802645cc19319$var$observerStack = [];
6624
6692
  function $5e3802645cc19319$export$1c3ebcada18427bf(targets, options) {
6625
- let windowObj = ($431fbd86ca7dc216$export$f21a1ffae260145a)(targets === null || targets === undefined ? undefined : targets[0]);
6693
+ let windowObj = ($431fbd86ca7dc216$export$f21a1ffae260145a)(targets === null || targets === void 0 ? void 0 : targets[0]);
6626
6694
  let opts = options instanceof windowObj.Element ? {
6627
6695
  root: options
6628
6696
  } : options;
6629
6697
  var _opts_root;
6630
- let root = (_opts_root = opts === null || opts === undefined ? undefined : opts.root) !== null && _opts_root !== undefined ? _opts_root : document.body;
6631
- let shouldUseInert = (opts === null || opts === undefined ? undefined : opts.shouldUseInert) && $5e3802645cc19319$var$supportsInert;
6698
+ let root = (_opts_root = opts === null || opts === void 0 ? void 0 : opts.root) !== null && _opts_root !== void 0 ? _opts_root : document.body;
6699
+ let shouldUseInert = (opts === null || opts === void 0 ? void 0 : opts.shouldUseInert) && $5e3802645cc19319$var$supportsInert;
6632
6700
  let visibleNodes = new Set(targets);
6633
6701
  let hiddenNodes = new Set();
6634
6702
  let getHidden = (element)=>{
@@ -6675,7 +6743,7 @@ function $5e3802645cc19319$export$1c3ebcada18427bf(targets, options) {
6675
6743
  };
6676
6744
  let hide = (node)=>{
6677
6745
  var _refCountMap_get;
6678
- let refCount = (_refCountMap_get = $5e3802645cc19319$var$refCountMap.get(node)) !== null && _refCountMap_get !== undefined ? _refCountMap_get : 0;
6746
+ let refCount = (_refCountMap_get = $5e3802645cc19319$var$refCountMap.get(node)) !== null && _refCountMap_get !== void 0 ? _refCountMap_get : 0;
6679
6747
  // If already aria-hidden, and the ref count is zero, then this element
6680
6748
  // was already hidden and there's nothing for us to do.
6681
6749
  if (getHidden(node) && refCount === 0) return;
@@ -6772,7 +6840,7 @@ function $f2f8a6077418541e$export$542a6fd13ac93354(props, state) {
6772
6840
  isDismissable: !isNonModal || isSubmenu,
6773
6841
  isKeyboardDismissDisabled: isKeyboardDismissDisabled,
6774
6842
  shouldCloseOnInteractOutside: shouldCloseOnInteractOutside
6775
- }, groupRef !== null && groupRef !== undefined ? groupRef : popoverRef);
6843
+ }, groupRef !== null && groupRef !== void 0 ? groupRef : popoverRef);
6776
6844
  let { overlayProps: positionProps, arrowProps: arrowProps, placement: placement, triggerAnchorPoint: origin } = ($2a41e45df1593e64$export$d39e1813b3bdd0e1)({
6777
6845
  ...otherProps,
6778
6846
  targetRef: triggerRef,
@@ -6786,9 +6854,9 @@ function $f2f8a6077418541e$export$542a6fd13ac93354(props, state) {
6786
6854
  ($dbSRa$react.useEffect)(()=>{
6787
6855
  if (state.isOpen && popoverRef.current) {
6788
6856
  var _groupRef_current, _groupRef_current1;
6789
- if (isNonModal) return ($5e3802645cc19319$export$1020fa7f77e17884)((_groupRef_current = groupRef === null || groupRef === undefined ? undefined : groupRef.current) !== null && _groupRef_current !== undefined ? _groupRef_current : popoverRef.current);
6857
+ if (isNonModal) return ($5e3802645cc19319$export$1020fa7f77e17884)((_groupRef_current = groupRef === null || groupRef === void 0 ? void 0 : groupRef.current) !== null && _groupRef_current !== void 0 ? _groupRef_current : popoverRef.current);
6790
6858
  else return ($5e3802645cc19319$export$1c3ebcada18427bf)([
6791
- (_groupRef_current1 = groupRef === null || groupRef === undefined ? undefined : groupRef.current) !== null && _groupRef_current1 !== undefined ? _groupRef_current1 : popoverRef.current
6859
+ (_groupRef_current1 = groupRef === null || groupRef === void 0 ? void 0 : groupRef.current) !== null && _groupRef_current1 !== void 0 ? _groupRef_current1 : popoverRef.current
6792
6860
  ], {
6793
6861
  shouldUseInert: true
6794
6862
  });
@@ -6852,9 +6920,9 @@ function $337b884510726a0d$export$c6fdb837b070b4ff(props) {
6852
6920
  }
6853
6921
  function $337b884510726a0d$export$14c98a7594375490() {
6854
6922
  let ctx = ($dbSRa$react.useContext)($337b884510726a0d$export$a2200b96afd16271);
6855
- let setContain = ctx === null || ctx === undefined ? undefined : ctx.setContain;
6923
+ let setContain = ctx === null || ctx === void 0 ? void 0 : ctx.setContain;
6856
6924
  ($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
6857
- setContain === null || setContain === undefined ? undefined : setContain(true);
6925
+ setContain === null || setContain === void 0 ? void 0 : setContain(true);
6858
6926
  }, [
6859
6927
  setContain
6860
6928
  ]);
@@ -7023,9 +7091,9 @@ function $feb5ffebff200149$export$d3e3bd3e26688c04(e) {
7023
7091
  function $feb5ffebff200149$export$c3d8340acf92597f(collectionRef, key) {
7024
7092
  var _collectionRef_current, _collectionRef_current1;
7025
7093
  let selector = `[data-key="${CSS.escape(String(key))}"]`;
7026
- let collection = (_collectionRef_current = collectionRef.current) === null || _collectionRef_current === undefined ? undefined : _collectionRef_current.dataset.collection;
7094
+ let collection = (_collectionRef_current = collectionRef.current) === null || _collectionRef_current === void 0 ? void 0 : _collectionRef_current.dataset.collection;
7027
7095
  if (collection) selector = `[data-collection="${CSS.escape(collection)}"]${selector}`;
7028
- return (_collectionRef_current1 = collectionRef.current) === null || _collectionRef_current1 === undefined ? undefined : _collectionRef_current1.querySelector(selector);
7096
+ return (_collectionRef_current1 = collectionRef.current) === null || _collectionRef_current1 === void 0 ? void 0 : _collectionRef_current1.querySelector(selector);
7029
7097
  }
7030
7098
  const $feb5ffebff200149$var$collectionMap = new WeakMap();
7031
7099
  function $feb5ffebff200149$export$881eb0d9f3605d9d(collection) {
@@ -7131,7 +7199,7 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
7131
7199
  if (e.altKey && e.key === 'Tab') e.preventDefault();
7132
7200
  // Keyboard events bubble through portals. Don't handle keyboard events
7133
7201
  // for elements outside the collection (e.g. menus).
7134
- if (!((_ref_current = ref.current) === null || _ref_current === undefined ? undefined : _ref_current.contains(e.target))) return;
7202
+ if (!((_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.contains(e.target))) return;
7135
7203
  const navigateToKey = (key, childFocus)=>{
7136
7204
  if (key != null) {
7137
7205
  if (manager.isLink(key) && linkBehavior === 'selection' && selectOnFocus && !($feb5ffebff200149$export$d3e3bd3e26688c04)(e)) {
@@ -7154,8 +7222,8 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
7154
7222
  case 'ArrowDown':
7155
7223
  if (delegate.getKeyBelow) {
7156
7224
  var _delegate_getKeyBelow, _delegate_getFirstKey, _delegate_getFirstKey1;
7157
- let nextKey = manager.focusedKey != null ? (_delegate_getKeyBelow = delegate.getKeyBelow) === null || _delegate_getKeyBelow === undefined ? undefined : _delegate_getKeyBelow.call(delegate, manager.focusedKey) : (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === undefined ? undefined : _delegate_getFirstKey.call(delegate);
7158
- if (nextKey == null && shouldFocusWrap) nextKey = (_delegate_getFirstKey1 = delegate.getFirstKey) === null || _delegate_getFirstKey1 === undefined ? undefined : _delegate_getFirstKey1.call(delegate, manager.focusedKey);
7225
+ let nextKey = manager.focusedKey != null ? (_delegate_getKeyBelow = delegate.getKeyBelow) === null || _delegate_getKeyBelow === void 0 ? void 0 : _delegate_getKeyBelow.call(delegate, manager.focusedKey) : (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === void 0 ? void 0 : _delegate_getFirstKey.call(delegate);
7226
+ if (nextKey == null && shouldFocusWrap) nextKey = (_delegate_getFirstKey1 = delegate.getFirstKey) === null || _delegate_getFirstKey1 === void 0 ? void 0 : _delegate_getFirstKey1.call(delegate, manager.focusedKey);
7159
7227
  if (nextKey != null) {
7160
7228
  e.preventDefault();
7161
7229
  navigateToKey(nextKey);
@@ -7165,8 +7233,8 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
7165
7233
  case 'ArrowUp':
7166
7234
  if (delegate.getKeyAbove) {
7167
7235
  var _delegate_getKeyAbove, _delegate_getLastKey, _delegate_getLastKey1;
7168
- let nextKey = manager.focusedKey != null ? (_delegate_getKeyAbove = delegate.getKeyAbove) === null || _delegate_getKeyAbove === undefined ? undefined : _delegate_getKeyAbove.call(delegate, manager.focusedKey) : (_delegate_getLastKey = delegate.getLastKey) === null || _delegate_getLastKey === undefined ? undefined : _delegate_getLastKey.call(delegate);
7169
- if (nextKey == null && shouldFocusWrap) nextKey = (_delegate_getLastKey1 = delegate.getLastKey) === null || _delegate_getLastKey1 === undefined ? undefined : _delegate_getLastKey1.call(delegate, manager.focusedKey);
7236
+ let nextKey = manager.focusedKey != null ? (_delegate_getKeyAbove = delegate.getKeyAbove) === null || _delegate_getKeyAbove === void 0 ? void 0 : _delegate_getKeyAbove.call(delegate, manager.focusedKey) : (_delegate_getLastKey = delegate.getLastKey) === null || _delegate_getLastKey === void 0 ? void 0 : _delegate_getLastKey.call(delegate);
7237
+ if (nextKey == null && shouldFocusWrap) nextKey = (_delegate_getLastKey1 = delegate.getLastKey) === null || _delegate_getLastKey1 === void 0 ? void 0 : _delegate_getLastKey1.call(delegate, manager.focusedKey);
7170
7238
  if (nextKey != null) {
7171
7239
  e.preventDefault();
7172
7240
  navigateToKey(nextKey);
@@ -7176,8 +7244,8 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
7176
7244
  case 'ArrowLeft':
7177
7245
  if (delegate.getKeyLeftOf) {
7178
7246
  var _delegate_getKeyLeftOf, _delegate_getFirstKey2, _delegate_getLastKey2;
7179
- let nextKey = manager.focusedKey != null ? (_delegate_getKeyLeftOf = delegate.getKeyLeftOf) === null || _delegate_getKeyLeftOf === undefined ? undefined : _delegate_getKeyLeftOf.call(delegate, manager.focusedKey) : null;
7180
- if (nextKey == null && shouldFocusWrap) nextKey = direction === 'rtl' ? (_delegate_getFirstKey2 = delegate.getFirstKey) === null || _delegate_getFirstKey2 === undefined ? undefined : _delegate_getFirstKey2.call(delegate, manager.focusedKey) : (_delegate_getLastKey2 = delegate.getLastKey) === null || _delegate_getLastKey2 === undefined ? undefined : _delegate_getLastKey2.call(delegate, manager.focusedKey);
7247
+ let nextKey = manager.focusedKey != null ? (_delegate_getKeyLeftOf = delegate.getKeyLeftOf) === null || _delegate_getKeyLeftOf === void 0 ? void 0 : _delegate_getKeyLeftOf.call(delegate, manager.focusedKey) : null;
7248
+ if (nextKey == null && shouldFocusWrap) nextKey = direction === 'rtl' ? (_delegate_getFirstKey2 = delegate.getFirstKey) === null || _delegate_getFirstKey2 === void 0 ? void 0 : _delegate_getFirstKey2.call(delegate, manager.focusedKey) : (_delegate_getLastKey2 = delegate.getLastKey) === null || _delegate_getLastKey2 === void 0 ? void 0 : _delegate_getLastKey2.call(delegate, manager.focusedKey);
7181
7249
  if (nextKey != null) {
7182
7250
  e.preventDefault();
7183
7251
  navigateToKey(nextKey, direction === 'rtl' ? 'first' : 'last');
@@ -7187,8 +7255,8 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
7187
7255
  case 'ArrowRight':
7188
7256
  if (delegate.getKeyRightOf) {
7189
7257
  var _delegate_getKeyRightOf, _delegate_getLastKey3, _delegate_getFirstKey3;
7190
- let nextKey = manager.focusedKey != null ? (_delegate_getKeyRightOf = delegate.getKeyRightOf) === null || _delegate_getKeyRightOf === undefined ? undefined : _delegate_getKeyRightOf.call(delegate, manager.focusedKey) : null;
7191
- if (nextKey == null && shouldFocusWrap) nextKey = direction === 'rtl' ? (_delegate_getLastKey3 = delegate.getLastKey) === null || _delegate_getLastKey3 === undefined ? undefined : _delegate_getLastKey3.call(delegate, manager.focusedKey) : (_delegate_getFirstKey3 = delegate.getFirstKey) === null || _delegate_getFirstKey3 === undefined ? undefined : _delegate_getFirstKey3.call(delegate, manager.focusedKey);
7258
+ let nextKey = manager.focusedKey != null ? (_delegate_getKeyRightOf = delegate.getKeyRightOf) === null || _delegate_getKeyRightOf === void 0 ? void 0 : _delegate_getKeyRightOf.call(delegate, manager.focusedKey) : null;
7259
+ if (nextKey == null && shouldFocusWrap) nextKey = direction === 'rtl' ? (_delegate_getLastKey3 = delegate.getLastKey) === null || _delegate_getLastKey3 === void 0 ? void 0 : _delegate_getLastKey3.call(delegate, manager.focusedKey) : (_delegate_getFirstKey3 = delegate.getFirstKey) === null || _delegate_getFirstKey3 === void 0 ? void 0 : _delegate_getFirstKey3.call(delegate, manager.focusedKey);
7192
7260
  if (nextKey != null) {
7193
7261
  e.preventDefault();
7194
7262
  navigateToKey(nextKey, direction === 'rtl' ? 'last' : 'first');
@@ -7269,7 +7337,10 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
7269
7337
  last = walker.lastChild();
7270
7338
  if (last) next = last;
7271
7339
  }while (last);
7272
- if (next && !next.contains(document.activeElement)) ($7215afc6de606d6b$export$de79e2c695e052f3)(next);
7340
+ // If the active element is NOT tabbable but is contained by an element that IS tabbable (aka the cell), the browser will actually move focus to
7341
+ // the containing element. We need to special case this so that tab will move focus out of the grid instead of looping between
7342
+ // focusing the containing cell and back to the non-tabbable child element
7343
+ if (next && (!next.contains(document.activeElement) || document.activeElement && !($b4b717babfbb907b$export$bebd5a1431fec25d)(document.activeElement))) ($7215afc6de606d6b$export$de79e2c695e052f3)(next);
7273
7344
  }
7274
7345
  break;
7275
7346
  }
@@ -7285,8 +7356,8 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
7285
7356
  var _scrollRef_current, _scrollRef_current1;
7286
7357
  var _scrollRef_current_scrollTop, _scrollRef_current_scrollLeft;
7287
7358
  scrollPos.current = {
7288
- top: (_scrollRef_current_scrollTop = (_scrollRef_current = scrollRef.current) === null || _scrollRef_current === undefined ? undefined : _scrollRef_current.scrollTop) !== null && _scrollRef_current_scrollTop !== undefined ? _scrollRef_current_scrollTop : 0,
7289
- left: (_scrollRef_current_scrollLeft = (_scrollRef_current1 = scrollRef.current) === null || _scrollRef_current1 === undefined ? undefined : _scrollRef_current1.scrollLeft) !== null && _scrollRef_current_scrollLeft !== undefined ? _scrollRef_current_scrollLeft : 0
7359
+ top: (_scrollRef_current_scrollTop = (_scrollRef_current = scrollRef.current) === null || _scrollRef_current === void 0 ? void 0 : _scrollRef_current.scrollTop) !== null && _scrollRef_current_scrollTop !== void 0 ? _scrollRef_current_scrollTop : 0,
7360
+ left: (_scrollRef_current_scrollLeft = (_scrollRef_current1 = scrollRef.current) === null || _scrollRef_current1 === void 0 ? void 0 : _scrollRef_current1.scrollLeft) !== null && _scrollRef_current_scrollLeft !== void 0 ? _scrollRef_current_scrollLeft : 0
7290
7361
  };
7291
7362
  });
7292
7363
  let onFocus = (e)=>{
@@ -7311,8 +7382,8 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
7311
7382
  // and either focus the first or last item accordingly.
7312
7383
  let relatedTarget = e.relatedTarget;
7313
7384
  var _manager_lastSelectedKey, _manager_firstSelectedKey;
7314
- if (relatedTarget && e.currentTarget.compareDocumentPosition(relatedTarget) & Node.DOCUMENT_POSITION_FOLLOWING) navigateToKey((_manager_lastSelectedKey = manager.lastSelectedKey) !== null && _manager_lastSelectedKey !== undefined ? _manager_lastSelectedKey : (_delegate_getLastKey = delegate.getLastKey) === null || _delegate_getLastKey === undefined ? undefined : _delegate_getLastKey.call(delegate));
7315
- else navigateToKey((_manager_firstSelectedKey = manager.firstSelectedKey) !== null && _manager_firstSelectedKey !== undefined ? _manager_firstSelectedKey : (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === undefined ? undefined : _delegate_getFirstKey.call(delegate));
7385
+ if (relatedTarget && e.currentTarget.compareDocumentPosition(relatedTarget) & Node.DOCUMENT_POSITION_FOLLOWING) navigateToKey((_manager_lastSelectedKey = manager.lastSelectedKey) !== null && _manager_lastSelectedKey !== void 0 ? _manager_lastSelectedKey : (_delegate_getLastKey = delegate.getLastKey) === null || _delegate_getLastKey === void 0 ? void 0 : _delegate_getLastKey.call(delegate));
7386
+ else navigateToKey((_manager_firstSelectedKey = manager.firstSelectedKey) !== null && _manager_firstSelectedKey !== void 0 ? _manager_firstSelectedKey : (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === void 0 ? void 0 : _delegate_getFirstKey.call(delegate));
7316
7387
  } else if (!isVirtualized && scrollRef.current) {
7317
7388
  // Restore the scroll position to what it was before.
7318
7389
  scrollRef.current.scrollTop = scrollPos.current.top;
@@ -7347,52 +7418,48 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
7347
7418
  e.stopPropagation();
7348
7419
  manager.setFocused(true);
7349
7420
  // If the user is typing forwards, autofocus the first option in the list.
7350
- if ((detail === null || detail === undefined ? undefined : detail.focusStrategy) === 'first') shouldVirtualFocusFirst.current = true;
7351
- });
7352
- let updateActiveDescendant = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(()=>{
7353
- var _delegate_getFirstKey;
7354
- var _delegate_getFirstKey1;
7355
- let keyToFocus = (_delegate_getFirstKey1 = (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === undefined ? undefined : _delegate_getFirstKey.call(delegate)) !== null && _delegate_getFirstKey1 !== undefined ? _delegate_getFirstKey1 : null;
7356
- // If no focusable items exist in the list, make sure to clear any activedescendant that may still exist and move focus back to
7357
- // the original active element (e.g. the autocomplete input)
7358
- if (keyToFocus == null) {
7359
- let previousActiveElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)();
7360
- ($55f9b1ae81f22853$export$76e4e37e5339496d)(ref.current);
7361
- ($55f9b1ae81f22853$export$2b35b76d2e30e129)(previousActiveElement, null);
7362
- // If there wasn't a focusable key but the collection had items, then that means we aren't in an intermediate load state and all keys are disabled.
7363
- // Reset shouldVirtualFocusFirst so that we don't erronously autofocus an item when the collection is filtered again.
7364
- if (manager.collection.size > 0) shouldVirtualFocusFirst.current = false;
7365
- } else {
7366
- manager.setFocusedKey(keyToFocus);
7367
- // Only set shouldVirtualFocusFirst to false if we've successfully set the first key as the focused key
7368
- // If there wasn't a key to focus, we might be in a temporary loading state so we'll want to still focus the first key
7369
- // after the collection updates after load
7370
- shouldVirtualFocusFirst.current = false;
7371
- }
7421
+ if ((detail === null || detail === void 0 ? void 0 : detail.focusStrategy) === 'first') shouldVirtualFocusFirst.current = true;
7372
7422
  });
7423
+ // update active descendant
7373
7424
  ($ca9b37712f007381$export$72ef708ab07251f1)(()=>{
7374
- if (shouldVirtualFocusFirst.current) updateActiveDescendant();
7425
+ if (shouldVirtualFocusFirst.current) {
7426
+ var _delegate_getFirstKey;
7427
+ var _delegate_getFirstKey1;
7428
+ let keyToFocus = (_delegate_getFirstKey1 = (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === void 0 ? void 0 : _delegate_getFirstKey.call(delegate)) !== null && _delegate_getFirstKey1 !== void 0 ? _delegate_getFirstKey1 : null;
7429
+ // If no focusable items exist in the list, make sure to clear any activedescendant that may still exist and move focus back to
7430
+ // the original active element (e.g. the autocomplete input)
7431
+ if (keyToFocus == null) {
7432
+ let previousActiveElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)();
7433
+ ($55f9b1ae81f22853$export$76e4e37e5339496d)(ref.current);
7434
+ ($55f9b1ae81f22853$export$2b35b76d2e30e129)(previousActiveElement, null);
7435
+ // If there wasn't a focusable key but the collection had items, then that means we aren't in an intermediate load state and all keys are disabled.
7436
+ // Reset shouldVirtualFocusFirst so that we don't erronously autofocus an item when the collection is filtered again.
7437
+ if (manager.collection.size > 0) shouldVirtualFocusFirst.current = false;
7438
+ } else {
7439
+ manager.setFocusedKey(keyToFocus);
7440
+ // Only set shouldVirtualFocusFirst to false if we've successfully set the first key as the focused key
7441
+ // If there wasn't a key to focus, we might be in a temporary loading state so we'll want to still focus the first key
7442
+ // after the collection updates after load
7443
+ shouldVirtualFocusFirst.current = false;
7444
+ }
7445
+ }
7375
7446
  }, [
7376
- manager.collection,
7377
- updateActiveDescendant
7447
+ manager.collection
7378
7448
  ]);
7379
- let resetFocusFirstFlag = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(()=>{
7449
+ // reset focus first flag
7450
+ ($ca9b37712f007381$export$72ef708ab07251f1)(()=>{
7380
7451
  // If user causes the focused key to change in any other way, clear shouldVirtualFocusFirst so we don't
7381
7452
  // accidentally move focus from under them. Skip this if the collection was empty because we might be in a load
7382
7453
  // state and will still want to focus the first item after load
7383
7454
  if (manager.collection.size > 0) shouldVirtualFocusFirst.current = false;
7384
- });
7385
- ($ca9b37712f007381$export$72ef708ab07251f1)(()=>{
7386
- resetFocusFirstFlag();
7387
7455
  }, [
7388
- manager.focusedKey,
7389
- resetFocusFirstFlag
7456
+ manager.focusedKey
7390
7457
  ]);
7391
7458
  ($e9faafb641e167db$export$90fc3a17d93f704c)(ref, ($5671b20cf9b562b2$export$447a38995de2c711), !shouldUseVirtualFocus ? undefined : (e)=>{
7392
7459
  var _e_detail;
7393
7460
  e.stopPropagation();
7394
7461
  manager.setFocused(false);
7395
- if ((_e_detail = e.detail) === null || _e_detail === undefined ? undefined : _e_detail.clearFocusKey) manager.setFocusedKey(null);
7462
+ if ((_e_detail = e.detail) === null || _e_detail === void 0 ? void 0 : _e_detail.clearFocusKey) manager.setFocusedKey(null);
7396
7463
  });
7397
7464
  const autoFocusRef = ($dbSRa$react.useRef)(autoFocus);
7398
7465
  const didAutoFocusRef = ($dbSRa$react.useRef)(false);
@@ -7402,9 +7469,9 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
7402
7469
  let focusedKey = null;
7403
7470
  var _delegate_getFirstKey1;
7404
7471
  // Check focus strategy to determine which item to focus
7405
- if (autoFocus === 'first') focusedKey = (_delegate_getFirstKey1 = (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === undefined ? undefined : _delegate_getFirstKey.call(delegate)) !== null && _delegate_getFirstKey1 !== undefined ? _delegate_getFirstKey1 : null;
7472
+ if (autoFocus === 'first') focusedKey = (_delegate_getFirstKey1 = (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === void 0 ? void 0 : _delegate_getFirstKey.call(delegate)) !== null && _delegate_getFirstKey1 !== void 0 ? _delegate_getFirstKey1 : null;
7406
7473
  var _delegate_getLastKey1;
7407
- if (autoFocus === 'last') focusedKey = (_delegate_getLastKey1 = (_delegate_getLastKey = delegate.getLastKey) === null || _delegate_getLastKey === undefined ? undefined : _delegate_getLastKey.call(delegate)) !== null && _delegate_getLastKey1 !== undefined ? _delegate_getLastKey1 : null;
7474
+ if (autoFocus === 'last') focusedKey = (_delegate_getLastKey1 = (_delegate_getLastKey = delegate.getLastKey) === null || _delegate_getLastKey === void 0 ? void 0 : _delegate_getLastKey.call(delegate)) !== null && _delegate_getLastKey1 !== void 0 ? _delegate_getLastKey1 : null;
7408
7475
  // If there are any selected keys, make the first one the new focus target
7409
7476
  let selectedKeys = manager.selectedKeys;
7410
7477
  if (selectedKeys.size) {
@@ -7588,7 +7655,7 @@ function $880e95eb8b93ba9a$export$ecf600387e221c37(options) {
7588
7655
  if (onAction) {
7589
7656
  var _ref_current;
7590
7657
  onAction();
7591
- (_ref_current = ref.current) === null || _ref_current === undefined ? undefined : _ref_current.dispatchEvent(new CustomEvent('react-aria-item-action', {
7658
+ (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.dispatchEvent(new CustomEvent('react-aria-item-action', {
7592
7659
  bubbles: true
7593
7660
  }));
7594
7661
  }
@@ -7727,11 +7794,11 @@ function $880e95eb8b93ba9a$export$ecf600387e221c37(options) {
7727
7794
  }
7728
7795
  function $880e95eb8b93ba9a$var$isActionKey() {
7729
7796
  let event = window.event;
7730
- return (event === null || event === undefined ? undefined : event.key) === 'Enter';
7797
+ return (event === null || event === void 0 ? void 0 : event.key) === 'Enter';
7731
7798
  }
7732
7799
  function $880e95eb8b93ba9a$var$isSelectionKey() {
7733
7800
  let event = window.event;
7734
- return (event === null || event === undefined ? undefined : event.key) === ' ' || (event === null || event === undefined ? undefined : event.code) === 'Space';
7801
+ return (event === null || event === void 0 ? void 0 : event.key) === ' ' || (event === null || event === void 0 ? void 0 : event.code) === 'Space';
7735
7802
  }
7736
7803
 
7737
7804
  /*
@@ -7764,18 +7831,18 @@ class $657e4dc4a6e88df0$export$8f5ed9ff9f511381 {
7764
7831
  let container = this.ref.current;
7765
7832
  var _container_scrollWidth, _container_scrollHeight;
7766
7833
  return {
7767
- width: (_container_scrollWidth = container === null || container === undefined ? undefined : container.scrollWidth) !== null && _container_scrollWidth !== undefined ? _container_scrollWidth : 0,
7768
- height: (_container_scrollHeight = container === null || container === undefined ? undefined : container.scrollHeight) !== null && _container_scrollHeight !== undefined ? _container_scrollHeight : 0
7834
+ width: (_container_scrollWidth = container === null || container === void 0 ? void 0 : container.scrollWidth) !== null && _container_scrollWidth !== void 0 ? _container_scrollWidth : 0,
7835
+ height: (_container_scrollHeight = container === null || container === void 0 ? void 0 : container.scrollHeight) !== null && _container_scrollHeight !== void 0 ? _container_scrollHeight : 0
7769
7836
  };
7770
7837
  }
7771
7838
  getVisibleRect() {
7772
7839
  let container = this.ref.current;
7773
7840
  var _container_scrollLeft, _container_scrollTop, _container_clientWidth, _container_clientHeight;
7774
7841
  return {
7775
- x: (_container_scrollLeft = container === null || container === undefined ? undefined : container.scrollLeft) !== null && _container_scrollLeft !== undefined ? _container_scrollLeft : 0,
7776
- y: (_container_scrollTop = container === null || container === undefined ? undefined : container.scrollTop) !== null && _container_scrollTop !== undefined ? _container_scrollTop : 0,
7777
- width: (_container_clientWidth = container === null || container === undefined ? undefined : container.clientWidth) !== null && _container_clientWidth !== undefined ? _container_clientWidth : 0,
7778
- height: (_container_clientHeight = container === null || container === undefined ? undefined : container.clientHeight) !== null && _container_clientHeight !== undefined ? _container_clientHeight : 0
7842
+ x: (_container_scrollLeft = container === null || container === void 0 ? void 0 : container.scrollLeft) !== null && _container_scrollLeft !== void 0 ? _container_scrollLeft : 0,
7843
+ y: (_container_scrollTop = container === null || container === void 0 ? void 0 : container.scrollTop) !== null && _container_scrollTop !== void 0 ? _container_scrollTop : 0,
7844
+ width: (_container_clientWidth = container === null || container === void 0 ? void 0 : container.clientWidth) !== null && _container_clientWidth !== void 0 ? _container_clientWidth : 0,
7845
+ height: (_container_clientHeight = container === null || container === void 0 ? void 0 : container.clientHeight) !== null && _container_clientHeight !== void 0 ? _container_clientHeight : 0
7779
7846
  };
7780
7847
  }
7781
7848
  constructor(ref){
@@ -7798,13 +7865,13 @@ class $657e4dc4a6e88df0$export$8f5ed9ff9f511381 {
7798
7865
  class $2a25aae57d74318e$export$a05409b8bb224a5a {
7799
7866
  isDisabled(item) {
7800
7867
  var _item_props;
7801
- return this.disabledBehavior === 'all' && (((_item_props = item.props) === null || _item_props === undefined ? undefined : _item_props.isDisabled) || this.disabledKeys.has(item.key));
7868
+ return this.disabledBehavior === 'all' && (((_item_props = item.props) === null || _item_props === void 0 ? void 0 : _item_props.isDisabled) || this.disabledKeys.has(item.key));
7802
7869
  }
7803
7870
  findNextNonDisabled(key, getNext) {
7804
7871
  let nextKey = key;
7805
7872
  while(nextKey != null){
7806
7873
  let item = this.collection.getItem(nextKey);
7807
- if ((item === null || item === undefined ? undefined : item.type) === 'item' && !this.isDisabled(item)) return nextKey;
7874
+ if ((item === null || item === void 0 ? void 0 : item.type) === 'item' && !this.isDisabled(item)) return nextKey;
7808
7875
  nextKey = getNext(nextKey);
7809
7876
  }
7810
7877
  return null;
@@ -7902,7 +7969,7 @@ class $2a25aae57d74318e$export$a05409b8bb224a5a {
7902
7969
  itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
7903
7970
  }
7904
7971
  }
7905
- return nextKey !== null && nextKey !== undefined ? nextKey : this.getFirstKey();
7972
+ return nextKey !== null && nextKey !== void 0 ? nextKey : this.getFirstKey();
7906
7973
  }
7907
7974
  getKeyPageBelow(key) {
7908
7975
  let menu = this.ref.current;
@@ -7923,7 +7990,7 @@ class $2a25aae57d74318e$export$a05409b8bb224a5a {
7923
7990
  itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
7924
7991
  }
7925
7992
  }
7926
- return nextKey !== null && nextKey !== undefined ? nextKey : this.getLastKey();
7993
+ return nextKey !== null && nextKey !== void 0 ? nextKey : this.getLastKey();
7927
7994
  }
7928
7995
  getKeyForSearch(search, fromKey) {
7929
7996
  if (!this.collator) return null;
@@ -8147,7 +8214,7 @@ class $eb2240fc39a57fa5$export$bf788dd355e3a401 {
8147
8214
  let v = partialNode.value;
8148
8215
  if (v != null) {
8149
8216
  var _v_key;
8150
- let key = (_v_key = v.key) !== null && _v_key !== undefined ? _v_key : v.id;
8217
+ let key = (_v_key = v.key) !== null && _v_key !== void 0 ? _v_key : v.id;
8151
8218
  if (key == null) throw new Error('No key found for item');
8152
8219
  return key;
8153
8220
  }
@@ -8165,7 +8232,7 @@ class $eb2240fc39a57fa5$export$bf788dd355e3a401 {
8165
8232
  children.push(child);
8166
8233
  });
8167
8234
  var _partialNode_index;
8168
- let index = (_partialNode_index = partialNode.index) !== null && _partialNode_index !== undefined ? _partialNode_index : 0;
8235
+ let index = (_partialNode_index = partialNode.index) !== null && _partialNode_index !== void 0 ? _partialNode_index : 0;
8169
8236
  for (const child of children)yield* this.getFullNode({
8170
8237
  element: child,
8171
8238
  index: index++
@@ -8195,13 +8262,13 @@ class $eb2240fc39a57fa5$export$bf788dd355e3a401 {
8195
8262
  }
8196
8263
  let childNodes = type.getCollectionNode(element.props, this.context);
8197
8264
  var _partialNode_index1;
8198
- let index = (_partialNode_index1 = partialNode.index) !== null && _partialNode_index1 !== undefined ? _partialNode_index1 : 0;
8265
+ let index = (_partialNode_index1 = partialNode.index) !== null && _partialNode_index1 !== void 0 ? _partialNode_index1 : 0;
8199
8266
  let result = childNodes.next();
8200
8267
  while(!result.done && result.value){
8201
8268
  let childNode = result.value;
8202
8269
  partialNode.index = index;
8203
8270
  var _childNode_key;
8204
- let nodeKey = (_childNode_key = childNode.key) !== null && _childNode_key !== undefined ? _childNode_key : null;
8271
+ let nodeKey = (_childNode_key = childNode.key) !== null && _childNode_key !== void 0 ? _childNode_key : null;
8205
8272
  if (nodeKey == null) nodeKey = childNode.element ? null : this.getKey(element, partialNode, state, parentKey);
8206
8273
  let nodes = this.getFullNode({
8207
8274
  ...childNode,
@@ -8215,12 +8282,12 @@ class $eb2240fc39a57fa5$export$bf788dd355e3a401 {
8215
8282
  for (let node of children){
8216
8283
  var _childNode_value, _ref;
8217
8284
  // Cache the node based on its value
8218
- node.value = (_ref = (_childNode_value = childNode.value) !== null && _childNode_value !== undefined ? _childNode_value : partialNode.value) !== null && _ref !== undefined ? _ref : null;
8285
+ node.value = (_ref = (_childNode_value = childNode.value) !== null && _childNode_value !== void 0 ? _childNode_value : partialNode.value) !== null && _ref !== void 0 ? _ref : null;
8219
8286
  if (node.value) this.cache.set(node.value, node);
8220
8287
  var _parentNode_type;
8221
8288
  // The partial node may have specified a type for the child in order to specify a constraint.
8222
8289
  // Verify that the full node that was built recursively matches this type.
8223
- if (partialNode.type && node.type !== partialNode.type) throw new Error(`Unsupported type <${$eb2240fc39a57fa5$var$capitalize(node.type)}> in <${$eb2240fc39a57fa5$var$capitalize((_parentNode_type = parentNode === null || parentNode === undefined ? undefined : parentNode.type) !== null && _parentNode_type !== undefined ? _parentNode_type : 'unknown parent type')}>. Only <${$eb2240fc39a57fa5$var$capitalize(partialNode.type)}> is supported.`);
8290
+ if (partialNode.type && node.type !== partialNode.type) throw new Error(`Unsupported type <${$eb2240fc39a57fa5$var$capitalize(node.type)}> in <${$eb2240fc39a57fa5$var$capitalize((_parentNode_type = parentNode === null || parentNode === void 0 ? void 0 : parentNode.type) !== null && _parentNode_type !== void 0 ? _parentNode_type : 'unknown parent type')}>. Only <${$eb2240fc39a57fa5$var$capitalize(partialNode.type)}> is supported.`);
8224
8291
  index++;
8225
8292
  yield node;
8226
8293
  }
@@ -8238,11 +8305,11 @@ class $eb2240fc39a57fa5$export$bf788dd355e3a401 {
8238
8305
  props: partialNode.props,
8239
8306
  key: partialNode.key,
8240
8307
  parentKey: parentNode ? parentNode.key : null,
8241
- value: (_partialNode_value = partialNode.value) !== null && _partialNode_value !== undefined ? _partialNode_value : null,
8308
+ value: (_partialNode_value = partialNode.value) !== null && _partialNode_value !== void 0 ? _partialNode_value : null,
8242
8309
  level: parentNode ? parentNode.level + 1 : 0,
8243
8310
  index: partialNode.index,
8244
8311
  rendered: partialNode.rendered,
8245
- textValue: (_partialNode_textValue = partialNode.textValue) !== null && _partialNode_textValue !== undefined ? _partialNode_textValue : '',
8312
+ textValue: (_partialNode_textValue = partialNode.textValue) !== null && _partialNode_textValue !== void 0 ? _partialNode_textValue : '',
8246
8313
  'aria-label': partialNode['aria-label'],
8247
8314
  wrapper: partialNode.wrapper,
8248
8315
  shouldInvalidate: partialNode.shouldInvalidate,
@@ -8385,7 +8452,7 @@ function $c5a24bc478652b5f$export$8c434b3a7a4dad6(collection, a, b) {
8385
8452
  function $c5a24bc478652b5f$var$getAncestors(collection, node) {
8386
8453
  let parents = [];
8387
8454
  let currNode = node;
8388
- while((currNode === null || currNode === undefined ? undefined : currNode.parentKey) != null){
8455
+ while((currNode === null || currNode === void 0 ? void 0 : currNode.parentKey) != null){
8389
8456
  currNode = collection.getItem(currNode.parentKey);
8390
8457
  if (currNode) parents.unshift(currNode);
8391
8458
  }
@@ -8440,17 +8507,17 @@ function $293f70390ea03370$export$497855f14858aa34(props, state, ref) {
8440
8507
  let { key: key } = props;
8441
8508
  let data = ($b1f0cad8af73213b$export$3585ede4d035bf14).get(state);
8442
8509
  var _props_isDisabled;
8443
- let isDisabled = (_props_isDisabled = props.isDisabled) !== null && _props_isDisabled !== undefined ? _props_isDisabled : state.selectionManager.isDisabled(key);
8510
+ let isDisabled = (_props_isDisabled = props.isDisabled) !== null && _props_isDisabled !== void 0 ? _props_isDisabled : state.selectionManager.isDisabled(key);
8444
8511
  var _props_isSelected;
8445
- let isSelected = (_props_isSelected = props.isSelected) !== null && _props_isSelected !== undefined ? _props_isSelected : state.selectionManager.isSelected(key);
8512
+ let isSelected = (_props_isSelected = props.isSelected) !== null && _props_isSelected !== void 0 ? _props_isSelected : state.selectionManager.isSelected(key);
8446
8513
  var _props_shouldSelectOnPressUp;
8447
- let shouldSelectOnPressUp = (_props_shouldSelectOnPressUp = props.shouldSelectOnPressUp) !== null && _props_shouldSelectOnPressUp !== undefined ? _props_shouldSelectOnPressUp : data === null || data === undefined ? undefined : data.shouldSelectOnPressUp;
8514
+ let shouldSelectOnPressUp = (_props_shouldSelectOnPressUp = props.shouldSelectOnPressUp) !== null && _props_shouldSelectOnPressUp !== void 0 ? _props_shouldSelectOnPressUp : data === null || data === void 0 ? void 0 : data.shouldSelectOnPressUp;
8448
8515
  var _props_shouldFocusOnHover;
8449
- let shouldFocusOnHover = (_props_shouldFocusOnHover = props.shouldFocusOnHover) !== null && _props_shouldFocusOnHover !== undefined ? _props_shouldFocusOnHover : data === null || data === undefined ? undefined : data.shouldFocusOnHover;
8516
+ let shouldFocusOnHover = (_props_shouldFocusOnHover = props.shouldFocusOnHover) !== null && _props_shouldFocusOnHover !== void 0 ? _props_shouldFocusOnHover : data === null || data === void 0 ? void 0 : data.shouldFocusOnHover;
8450
8517
  var _props_shouldUseVirtualFocus;
8451
- let shouldUseVirtualFocus = (_props_shouldUseVirtualFocus = props.shouldUseVirtualFocus) !== null && _props_shouldUseVirtualFocus !== undefined ? _props_shouldUseVirtualFocus : data === null || data === undefined ? undefined : data.shouldUseVirtualFocus;
8518
+ let shouldUseVirtualFocus = (_props_shouldUseVirtualFocus = props.shouldUseVirtualFocus) !== null && _props_shouldUseVirtualFocus !== void 0 ? _props_shouldUseVirtualFocus : data === null || data === void 0 ? void 0 : data.shouldUseVirtualFocus;
8452
8519
  var _props_isVirtualized;
8453
- let isVirtualized = (_props_isVirtualized = props.isVirtualized) !== null && _props_isVirtualized !== undefined ? _props_isVirtualized : data === null || data === undefined ? undefined : data.isVirtualized;
8520
+ let isVirtualized = (_props_isVirtualized = props.isVirtualized) !== null && _props_isVirtualized !== void 0 ? _props_isVirtualized : data === null || data === void 0 ? void 0 : data.isVirtualized;
8454
8521
  let labelId = ($bdb11010cef70236$export$b4cc09c592e8fdb8)();
8455
8522
  let descriptionId = ($bdb11010cef70236$export$b4cc09c592e8fdb8)();
8456
8523
  let optionProps = {
@@ -8468,13 +8535,13 @@ function $293f70390ea03370$export$497855f14858aa34(props, state, ref) {
8468
8535
  }
8469
8536
  let item = state.collection.getItem(key);
8470
8537
  if (isVirtualized) {
8471
- let index = Number(item === null || item === undefined ? undefined : item.index);
8538
+ let index = Number(item === null || item === void 0 ? void 0 : item.index);
8472
8539
  optionProps['aria-posinset'] = Number.isNaN(index) ? undefined : index + 1;
8473
8540
  optionProps['aria-setsize'] = ($453cc9f0df89c0a5$export$77d5aafae4e095b2)(state.collection);
8474
8541
  }
8475
- let onAction = (data === null || data === undefined ? undefined : data.onAction) ? ()=>{
8542
+ let onAction = (data === null || data === void 0 ? void 0 : data.onAction) ? ()=>{
8476
8543
  var _data_onAction;
8477
- return data === null || data === undefined ? undefined : (_data_onAction = data.onAction) === null || _data_onAction === undefined ? undefined : _data_onAction.call(data, key);
8544
+ return data === null || data === void 0 ? void 0 : (_data_onAction = data.onAction) === null || _data_onAction === void 0 ? void 0 : _data_onAction.call(data, key);
8478
8545
  } : undefined;
8479
8546
  let id = ($b1f0cad8af73213b$export$9145995848b05025)(state, key);
8480
8547
  let { itemProps: itemProps, isPressed: isPressed, isFocused: isFocused, hasAction: hasAction, allowsSelection: allowsSelection } = ($880e95eb8b93ba9a$export$ecf600387e221c37)({
@@ -8486,10 +8553,10 @@ function $293f70390ea03370$export$497855f14858aa34(props, state, ref) {
8486
8553
  isVirtualized: isVirtualized,
8487
8554
  shouldUseVirtualFocus: shouldUseVirtualFocus,
8488
8555
  isDisabled: isDisabled,
8489
- onAction: onAction || (item === null || item === undefined ? undefined : (_item_props = item.props) === null || _item_props === undefined ? undefined : _item_props.onAction) ? ($ff5963eb1fccf552$export$e08e3b67e392101e)(item === null || item === undefined ? undefined : (_item_props1 = item.props) === null || _item_props1 === undefined ? undefined : _item_props1.onAction, onAction) : undefined,
8490
- linkBehavior: data === null || data === undefined ? undefined : data.linkBehavior,
8556
+ onAction: onAction || (item === null || item === void 0 ? void 0 : (_item_props = item.props) === null || _item_props === void 0 ? void 0 : _item_props.onAction) ? ($ff5963eb1fccf552$export$e08e3b67e392101e)(item === null || item === void 0 ? void 0 : (_item_props1 = item.props) === null || _item_props1 === void 0 ? void 0 : _item_props1.onAction, onAction) : undefined,
8557
+ linkBehavior: data === null || data === void 0 ? void 0 : data.linkBehavior,
8491
8558
  // @ts-ignore
8492
- UNSTABLE_itemBehavior: data === null || data === undefined ? undefined : data['UNSTABLE_itemBehavior'],
8559
+ UNSTABLE_itemBehavior: data === null || data === void 0 ? void 0 : data['UNSTABLE_itemBehavior'],
8493
8560
  id: id
8494
8561
  });
8495
8562
  let { hoverProps: hoverProps } = ($6179b936705e76d3$export$ae780daf29e6d456)({
@@ -8501,9 +8568,9 @@ function $293f70390ea03370$export$497855f14858aa34(props, state, ref) {
8501
8568
  }
8502
8569
  }
8503
8570
  });
8504
- let domProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(item === null || item === undefined ? undefined : item.props);
8571
+ let domProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(item === null || item === void 0 ? void 0 : item.props);
8505
8572
  delete domProps.id;
8506
- let linkProps = ($ea8dcbcb9ea1b556$export$7e924b3091a3bd18)(item === null || item === undefined ? undefined : item.props);
8573
+ let linkProps = ($ea8dcbcb9ea1b556$export$7e924b3091a3bd18)(item === null || item === void 0 ? void 0 : item.props);
8507
8574
  return {
8508
8575
  optionProps: {
8509
8576
  ...optionProps,
@@ -8629,7 +8696,7 @@ function $e5be200c675c3b3a$var$useFormValidationStateImpl(props) {
8629
8696
  validate,
8630
8697
  value
8631
8698
  ]);
8632
- if (builtinValidation === null || builtinValidation === undefined ? undefined : builtinValidation.validationDetails.valid) builtinValidation = undefined;
8699
+ if (builtinValidation === null || builtinValidation === void 0 ? void 0 : builtinValidation.validationDetails.valid) builtinValidation = undefined;
8633
8700
  // Get relevant server errors from the form.
8634
8701
  let serverErrors = ($dbSRa$react.useContext)($e5be200c675c3b3a$export$571b5131b7e65c11);
8635
8702
  let serverErrorMessages = ($dbSRa$react.useMemo)(()=>{
@@ -8818,7 +8885,7 @@ $a89a74a39eba465a$exports = {
8818
8885
 
8819
8886
  var $edc7c66594a0ae8a$exports = {};
8820
8887
  $edc7c66594a0ae8a$exports = {
8821
- "longPressMessage": `Premere a lungo o premere Alt + Freccia gi\xf9 per aprire il menu`
8888
+ "longPressMessage": `Premi a lungo o premi Alt + Freccia gi\xf9 per aprire il menu`
8822
8889
  };
8823
8890
 
8824
8891
  var $f1ab51510712db52$exports = {};
@@ -9107,7 +9174,7 @@ function $e93e671b31057976$export$b8473d3665f3a75a(props, state, ref) {
9107
9174
  let { validationBehavior: validationBehavior, focus: focus } = props;
9108
9175
  // This is a useLayoutEffect so that it runs before the useEffect in useFormValidationState, which commits the validation change.
9109
9176
  ($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
9110
- if (validationBehavior === 'native' && (ref === null || ref === undefined ? undefined : ref.current) && !ref.current.disabled) {
9177
+ if (validationBehavior === 'native' && (ref === null || ref === void 0 ? void 0 : ref.current) && !ref.current.disabled) {
9111
9178
  let errorMessage = state.realtimeValidation.isInvalid ? state.realtimeValidation.validationErrors.join(' ') || 'Invalid value.' : '';
9112
9179
  ref.current.setCustomValidity(errorMessage);
9113
9180
  // Prevent default tooltip for validation message.
@@ -9126,11 +9193,11 @@ function $e93e671b31057976$export$b8473d3665f3a75a(props, state, ref) {
9126
9193
  // This avoids clearing server errors that the user didn't actually fix.
9127
9194
  if (!state.displayValidation.isInvalid) state.commitValidation();
9128
9195
  // Auto focus the first invalid input in a form, unless the error already had its default prevented.
9129
- let form = ref === null || ref === undefined ? undefined : (_ref_current = ref.current) === null || _ref_current === undefined ? undefined : _ref_current.form;
9196
+ let form = ref === null || ref === void 0 ? void 0 : (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.form;
9130
9197
  if (!e.defaultPrevented && ref && form && $e93e671b31057976$var$getFirstInvalidInput(form) === ref.current) {
9131
9198
  var _ref_current1;
9132
9199
  if (focus) focus();
9133
- else (_ref_current1 = ref.current) === null || _ref_current1 === undefined ? undefined : _ref_current1.focus();
9200
+ else (_ref_current1 = ref.current) === null || _ref_current1 === void 0 ? void 0 : _ref_current1.focus();
9134
9201
  // Always show focus ring.
9135
9202
  ($507fabe10e71c6fb$export$8397ddfc504fdb9a)('keyboard');
9136
9203
  }
@@ -9141,10 +9208,10 @@ function $e93e671b31057976$export$b8473d3665f3a75a(props, state, ref) {
9141
9208
  state.commitValidation();
9142
9209
  });
9143
9210
  ($dbSRa$react.useEffect)(()=>{
9144
- let input = ref === null || ref === undefined ? undefined : ref.current;
9211
+ let input = ref === null || ref === void 0 ? void 0 : ref.current;
9145
9212
  if (!input) return;
9146
9213
  let form = input.form;
9147
- let reset = form === null || form === undefined ? undefined : form.reset;
9214
+ let reset = form === null || form === void 0 ? void 0 : form.reset;
9148
9215
  if (form) // Try to detect React's automatic form reset behavior so we don't clear
9149
9216
  // validation errors that are returned by server actions.
9150
9217
  // To do this, we ignore programmatic form resets that occur outside a user event.
@@ -9152,24 +9219,21 @@ function $e93e671b31057976$export$b8473d3665f3a75a(props, state, ref) {
9152
9219
  form.reset = ()=>{
9153
9220
  // React uses MessageChannel for scheduling, so ignore 'message' events.
9154
9221
  isIgnoredReset.current = !window.event || window.event.type === 'message' && window.event.target instanceof MessagePort;
9155
- reset === null || reset === undefined ? undefined : reset.call(form);
9222
+ reset === null || reset === void 0 ? void 0 : reset.call(form);
9156
9223
  isIgnoredReset.current = false;
9157
9224
  };
9158
9225
  input.addEventListener('invalid', onInvalid);
9159
9226
  input.addEventListener('change', onChange);
9160
- form === null || form === undefined ? undefined : form.addEventListener('reset', onReset);
9227
+ form === null || form === void 0 ? void 0 : form.addEventListener('reset', onReset);
9161
9228
  return ()=>{
9162
9229
  input.removeEventListener('invalid', onInvalid);
9163
9230
  input.removeEventListener('change', onChange);
9164
- form === null || form === undefined ? undefined : form.removeEventListener('reset', onReset);
9231
+ form === null || form === void 0 ? void 0 : form.removeEventListener('reset', onReset);
9165
9232
  if (form) // @ts-ignore
9166
9233
  form.reset = reset;
9167
9234
  };
9168
9235
  }, [
9169
9236
  ref,
9170
- onInvalid,
9171
- onChange,
9172
- onReset,
9173
9237
  validationBehavior
9174
9238
  ]);
9175
9239
  }
@@ -9248,27 +9312,8 @@ function $2d73ec29415bd339$export$712718f7aec83d5(props, ref) {
9248
9312
  };
9249
9313
  let [initialValue] = ($dbSRa$react.useState)(value);
9250
9314
  var _props_defaultValue;
9251
- ($99facab73266f662$export$5add1d006293d136)(ref, (_props_defaultValue = props.defaultValue) !== null && _props_defaultValue !== undefined ? _props_defaultValue : initialValue, setValue);
9315
+ ($99facab73266f662$export$5add1d006293d136)(ref, (_props_defaultValue = props.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : initialValue, setValue);
9252
9316
  ($e93e671b31057976$export$b8473d3665f3a75a)(props, validationState, ref);
9253
- ($dbSRa$react.useEffect)(()=>{
9254
- // This works around a React/Chrome bug that prevents textarea elements from validating when controlled.
9255
- // We prevent React from updating defaultValue (i.e. children) of textarea when `value` changes,
9256
- // which causes Chrome to skip validation. Only updating `value` is ok in our case since our
9257
- // textareas are always controlled. React is planning on removing this synchronization in a
9258
- // future major version.
9259
- // https://github.com/facebook/react/issues/19474
9260
- // https://github.com/facebook/react/issues/11896
9261
- if (ref.current instanceof ($431fbd86ca7dc216$export$f21a1ffae260145a)(ref.current).HTMLTextAreaElement) {
9262
- let input = ref.current;
9263
- Object.defineProperty(input, 'defaultValue', {
9264
- get: ()=>input.value,
9265
- set: ()=>{},
9266
- configurable: true
9267
- });
9268
- }
9269
- }, [
9270
- ref
9271
- ]);
9272
9317
  return {
9273
9318
  labelProps: labelProps,
9274
9319
  inputProps: ($3ef42575df84b30b$export$9d1611c77c2fe928)(domProps, inputElementType === 'input' ? inputOnlyProps : undefined, {
@@ -9437,7 +9482,7 @@ class $23b9f4fcf0fe224b$export$408d25a4e12db025 {
9437
9482
  return {
9438
9483
  *[Symbol.iterator] () {
9439
9484
  let parent = keyMap.get(key);
9440
- let node = (parent === null || parent === undefined ? undefined : parent.firstChildKey) != null ? keyMap.get(parent.firstChildKey) : null;
9485
+ let node = (parent === null || parent === void 0 ? void 0 : parent.firstChildKey) != null ? keyMap.get(parent.firstChildKey) : null;
9441
9486
  while(node){
9442
9487
  yield node;
9443
9488
  node = node.nextKey != null ? keyMap.get(node.nextKey) : undefined;
@@ -9452,7 +9497,7 @@ class $23b9f4fcf0fe224b$export$408d25a4e12db025 {
9452
9497
  node = this.keyMap.get(node.prevKey);
9453
9498
  while(node && node.type !== 'item' && node.lastChildKey != null)node = this.keyMap.get(node.lastChildKey);
9454
9499
  var _node_key;
9455
- return (_node_key = node === null || node === undefined ? undefined : node.key) !== null && _node_key !== undefined ? _node_key : null;
9500
+ return (_node_key = node === null || node === void 0 ? void 0 : node.key) !== null && _node_key !== void 0 ? _node_key : null;
9456
9501
  }
9457
9502
  return node.parentKey;
9458
9503
  }
@@ -9472,13 +9517,13 @@ class $23b9f4fcf0fe224b$export$408d25a4e12db025 {
9472
9517
  }
9473
9518
  getLastKey() {
9474
9519
  let node = this.lastKey != null ? this.keyMap.get(this.lastKey) : null;
9475
- while((node === null || node === undefined ? undefined : node.lastChildKey) != null)node = this.keyMap.get(node.lastChildKey);
9520
+ while((node === null || node === void 0 ? void 0 : node.lastChildKey) != null)node = this.keyMap.get(node.lastChildKey);
9476
9521
  var _node_key;
9477
- return (_node_key = node === null || node === undefined ? undefined : node.key) !== null && _node_key !== undefined ? _node_key : null;
9522
+ return (_node_key = node === null || node === void 0 ? void 0 : node.key) !== null && _node_key !== void 0 ? _node_key : null;
9478
9523
  }
9479
9524
  getItem(key) {
9480
9525
  var _this_keyMap_get;
9481
- return (_this_keyMap_get = this.keyMap.get(key)) !== null && _this_keyMap_get !== undefined ? _this_keyMap_get : null;
9526
+ return (_this_keyMap_get = this.keyMap.get(key)) !== null && _this_keyMap_get !== void 0 ? _this_keyMap_get : null;
9482
9527
  }
9483
9528
  at() {
9484
9529
  throw new Error('Not implemented');
@@ -9521,7 +9566,7 @@ class $23b9f4fcf0fe224b$export$408d25a4e12db025 {
9521
9566
  filter(filterFn) {
9522
9567
  let newCollection = new this.constructor();
9523
9568
  let [firstKey, lastKey] = $23b9f4fcf0fe224b$var$filterChildren(this, newCollection, this.firstKey, filterFn);
9524
- newCollection === null || newCollection === undefined ? undefined : newCollection.commit(firstKey, lastKey);
9569
+ newCollection === null || newCollection === void 0 ? void 0 : newCollection.commit(firstKey, lastKey);
9525
9570
  return newCollection;
9526
9571
  }
9527
9572
  constructor(){
@@ -9571,8 +9616,8 @@ function $23b9f4fcf0fe224b$var$filterChildren(collection, newCollection, firstCh
9571
9616
  }
9572
9617
  var _firstNode_key, _lastNode_key;
9573
9618
  return [
9574
- (_firstNode_key = firstNode === null || firstNode === undefined ? undefined : firstNode.key) !== null && _firstNode_key !== undefined ? _firstNode_key : null,
9575
- (_lastNode_key = lastNode === null || lastNode === undefined ? undefined : lastNode.key) !== null && _lastNode_key !== undefined ? _lastNode_key : null
9619
+ (_firstNode_key = firstNode === null || firstNode === void 0 ? void 0 : firstNode.key) !== null && _firstNode_key !== void 0 ? _firstNode_key : null,
9620
+ (_lastNode_key = lastNode === null || lastNode === void 0 ? void 0 : lastNode.key) !== null && _lastNode_key !== void 0 ? _lastNode_key : null
9576
9621
  ];
9577
9622
  }
9578
9623
 
@@ -9631,7 +9676,7 @@ function $23b9f4fcf0fe224b$var$filterChildren(collection, newCollection, firstCh
9631
9676
  }
9632
9677
  get isConnected() {
9633
9678
  var _this_parentNode;
9634
- return ((_this_parentNode = this.parentNode) === null || _this_parentNode === undefined ? undefined : _this_parentNode.isConnected) || false;
9679
+ return ((_this_parentNode = this.parentNode) === null || _this_parentNode === void 0 ? void 0 : _this_parentNode.isConnected) || false;
9635
9680
  }
9636
9681
  invalidateChildIndices(child) {
9637
9682
  if (this._minInvalidChildIndex == null || !this._minInvalidChildIndex.isConnected || child.index < this._minInvalidChildIndex.index) {
@@ -9740,7 +9785,7 @@ class $681cc3c98f569e39$export$dc064fe9e59310fd extends $681cc3c98f569e39$export
9740
9785
  }
9741
9786
  get level() {
9742
9787
  var _this_node;
9743
- if (this.parentNode instanceof $681cc3c98f569e39$export$dc064fe9e59310fd) return this.parentNode.level + (((_this_node = this.node) === null || _this_node === undefined ? undefined : _this_node.type) === 'item' ? 1 : 0);
9788
+ if (this.parentNode instanceof $681cc3c98f569e39$export$dc064fe9e59310fd) return this.parentNode.level + (((_this_node = this.node) === null || _this_node === void 0 ? void 0 : _this_node.type) === 'item' ? 1 : 0);
9744
9789
  return 0;
9745
9790
  }
9746
9791
  /**
@@ -9763,21 +9808,21 @@ class $681cc3c98f569e39$export$dc064fe9e59310fd extends $681cc3c98f569e39$export
9763
9808
  node.index = this.index;
9764
9809
  node.level = this.level;
9765
9810
  var _this_parentNode_node_key;
9766
- node.parentKey = this.parentNode instanceof $681cc3c98f569e39$export$dc064fe9e59310fd ? (_this_parentNode_node_key = (_this_parentNode_node = this.parentNode.node) === null || _this_parentNode_node === undefined ? undefined : _this_parentNode_node.key) !== null && _this_parentNode_node_key !== undefined ? _this_parentNode_node_key : null : null;
9811
+ node.parentKey = this.parentNode instanceof $681cc3c98f569e39$export$dc064fe9e59310fd ? (_this_parentNode_node_key = (_this_parentNode_node = this.parentNode.node) === null || _this_parentNode_node === void 0 ? void 0 : _this_parentNode_node.key) !== null && _this_parentNode_node_key !== void 0 ? _this_parentNode_node_key : null : null;
9767
9812
  var _this_previousVisibleSibling_node_key;
9768
- node.prevKey = (_this_previousVisibleSibling_node_key = (_this_previousVisibleSibling = this.previousVisibleSibling) === null || _this_previousVisibleSibling === undefined ? undefined : (_this_previousVisibleSibling_node = _this_previousVisibleSibling.node) === null || _this_previousVisibleSibling_node === undefined ? undefined : _this_previousVisibleSibling_node.key) !== null && _this_previousVisibleSibling_node_key !== undefined ? _this_previousVisibleSibling_node_key : null;
9813
+ node.prevKey = (_this_previousVisibleSibling_node_key = (_this_previousVisibleSibling = this.previousVisibleSibling) === null || _this_previousVisibleSibling === void 0 ? void 0 : (_this_previousVisibleSibling_node = _this_previousVisibleSibling.node) === null || _this_previousVisibleSibling_node === void 0 ? void 0 : _this_previousVisibleSibling_node.key) !== null && _this_previousVisibleSibling_node_key !== void 0 ? _this_previousVisibleSibling_node_key : null;
9769
9814
  var _nextSibling_node_key;
9770
- node.nextKey = (_nextSibling_node_key = nextSibling === null || nextSibling === undefined ? undefined : (_nextSibling_node = nextSibling.node) === null || _nextSibling_node === undefined ? undefined : _nextSibling_node.key) !== null && _nextSibling_node_key !== undefined ? _nextSibling_node_key : null;
9815
+ node.nextKey = (_nextSibling_node_key = nextSibling === null || nextSibling === void 0 ? void 0 : (_nextSibling_node = nextSibling.node) === null || _nextSibling_node === void 0 ? void 0 : _nextSibling_node.key) !== null && _nextSibling_node_key !== void 0 ? _nextSibling_node_key : null;
9771
9816
  node.hasChildNodes = !!this.firstChild;
9772
9817
  var _this_firstVisibleChild_node_key;
9773
- node.firstChildKey = (_this_firstVisibleChild_node_key = (_this_firstVisibleChild = this.firstVisibleChild) === null || _this_firstVisibleChild === undefined ? undefined : (_this_firstVisibleChild_node = _this_firstVisibleChild.node) === null || _this_firstVisibleChild_node === undefined ? undefined : _this_firstVisibleChild_node.key) !== null && _this_firstVisibleChild_node_key !== undefined ? _this_firstVisibleChild_node_key : null;
9818
+ node.firstChildKey = (_this_firstVisibleChild_node_key = (_this_firstVisibleChild = this.firstVisibleChild) === null || _this_firstVisibleChild === void 0 ? void 0 : (_this_firstVisibleChild_node = _this_firstVisibleChild.node) === null || _this_firstVisibleChild_node === void 0 ? void 0 : _this_firstVisibleChild_node.key) !== null && _this_firstVisibleChild_node_key !== void 0 ? _this_firstVisibleChild_node_key : null;
9774
9819
  var _this_lastVisibleChild_node_key;
9775
- node.lastChildKey = (_this_lastVisibleChild_node_key = (_this_lastVisibleChild = this.lastVisibleChild) === null || _this_lastVisibleChild === undefined ? undefined : (_this_lastVisibleChild_node = _this_lastVisibleChild.node) === null || _this_lastVisibleChild_node === undefined ? undefined : _this_lastVisibleChild_node.key) !== null && _this_lastVisibleChild_node_key !== undefined ? _this_lastVisibleChild_node_key : null;
9820
+ node.lastChildKey = (_this_lastVisibleChild_node_key = (_this_lastVisibleChild = this.lastVisibleChild) === null || _this_lastVisibleChild === void 0 ? void 0 : (_this_lastVisibleChild_node = _this_lastVisibleChild.node) === null || _this_lastVisibleChild_node === void 0 ? void 0 : _this_lastVisibleChild_node.key) !== null && _this_lastVisibleChild_node_key !== void 0 ? _this_lastVisibleChild_node_key : null;
9776
9821
  // Update the colIndex of sibling nodes if this node has a colSpan.
9777
9822
  if ((node.colSpan != null || node.colIndex != null) && nextSibling) {
9778
9823
  var _node_colIndex, _node_colSpan;
9779
9824
  // This queues the next sibling for update, which means this happens recursively.
9780
- let nextColIndex = ((_node_colIndex = node.colIndex) !== null && _node_colIndex !== undefined ? _node_colIndex : node.index) + ((_node_colSpan = node.colSpan) !== null && _node_colSpan !== undefined ? _node_colSpan : 1);
9825
+ let nextColIndex = ((_node_colIndex = node.colIndex) !== null && _node_colIndex !== void 0 ? _node_colIndex : node.index) + ((_node_colSpan = node.colSpan) !== null && _node_colSpan !== void 0 ? _node_colSpan : 1);
9781
9826
  if (nextSibling.node != null && nextColIndex !== nextSibling.node.colIndex) {
9782
9827
  let siblingNode = nextSibling.getMutableNode();
9783
9828
  siblingNode.colIndex = nextColIndex;
@@ -9788,7 +9833,7 @@ class $681cc3c98f569e39$export$dc064fe9e59310fd extends $681cc3c98f569e39$export
9788
9833
  let node;
9789
9834
  let { value: value1, textValue: textValue, id: id, ...props } = obj;
9790
9835
  if (this.node == null) {
9791
- node = new CollectionNodeClass(id !== null && id !== undefined ? id : `react-aria-${++this.ownerDocument.nodeId}`);
9836
+ node = new CollectionNodeClass(id !== null && id !== void 0 ? id : `react-aria-${++this.ownerDocument.nodeId}`);
9792
9837
  this.node = node;
9793
9838
  } else node = this.getMutableNode();
9794
9839
  props.ref = ref;
@@ -9796,6 +9841,7 @@ class $681cc3c98f569e39$export$dc064fe9e59310fd extends $681cc3c98f569e39$export
9796
9841
  node.rendered = rendered;
9797
9842
  node.render = render;
9798
9843
  node.value = value1;
9844
+ if (obj['aria-label']) node['aria-label'] = obj['aria-label'];
9799
9845
  node.textValue = textValue || (typeof props.children === 'string' ? props.children : '') || obj['aria-label'] || '';
9800
9846
  if (id != null && id !== node.key) throw new Error('Cannot change the id of an item');
9801
9847
  if (props.colSpan != null) node.colSpan = props.colSpan;
@@ -9816,7 +9862,7 @@ class $681cc3c98f569e39$export$dc064fe9e59310fd extends $681cc3c98f569e39$export
9816
9862
  if (element.isHidden !== isHidden) {
9817
9863
  var _element_parentNode, _element_parentNode1;
9818
9864
  // Mark parent node dirty if this element is currently the first or last visible child.
9819
- if (((_element_parentNode = element.parentNode) === null || _element_parentNode === undefined ? undefined : _element_parentNode.firstVisibleChild) === element || ((_element_parentNode1 = element.parentNode) === null || _element_parentNode1 === undefined ? undefined : _element_parentNode1.lastVisibleChild) === element) element.ownerDocument.markDirty(element.parentNode);
9865
+ if (((_element_parentNode = element.parentNode) === null || _element_parentNode === void 0 ? void 0 : _element_parentNode.firstVisibleChild) === element || ((_element_parentNode1 = element.parentNode) === null || _element_parentNode1 === void 0 ? void 0 : _element_parentNode1.lastVisibleChild) === element) element.ownerDocument.markDirty(element.parentNode);
9820
9866
  // Mark sibling visible elements dirty.
9821
9867
  let prev = element.previousVisibleSibling;
9822
9868
  let next = element.nextVisibleSibling;
@@ -9894,7 +9940,7 @@ class $681cc3c98f569e39$export$b34a105447964f9f extends $681cc3c98f569e39$export
9894
9940
  if (this.nextCollection) {
9895
9941
  var _this_firstVisibleChild_node, _this_firstVisibleChild, _this_lastVisibleChild_node, _this_lastVisibleChild;
9896
9942
  var _this_firstVisibleChild_node_key, _this_lastVisibleChild_node_key;
9897
- this.nextCollection.commit((_this_firstVisibleChild_node_key = (_this_firstVisibleChild = this.firstVisibleChild) === null || _this_firstVisibleChild === undefined ? undefined : (_this_firstVisibleChild_node = _this_firstVisibleChild.node) === null || _this_firstVisibleChild_node === undefined ? undefined : _this_firstVisibleChild_node.key) !== null && _this_firstVisibleChild_node_key !== undefined ? _this_firstVisibleChild_node_key : null, (_this_lastVisibleChild_node_key = (_this_lastVisibleChild = this.lastVisibleChild) === null || _this_lastVisibleChild === undefined ? undefined : (_this_lastVisibleChild_node = _this_lastVisibleChild.node) === null || _this_lastVisibleChild_node === undefined ? undefined : _this_lastVisibleChild_node.key) !== null && _this_lastVisibleChild_node_key !== undefined ? _this_lastVisibleChild_node_key : null, this.isSSR);
9943
+ this.nextCollection.commit((_this_firstVisibleChild_node_key = (_this_firstVisibleChild = this.firstVisibleChild) === null || _this_firstVisibleChild === void 0 ? void 0 : (_this_firstVisibleChild_node = _this_firstVisibleChild.node) === null || _this_firstVisibleChild_node === void 0 ? void 0 : _this_firstVisibleChild_node.key) !== null && _this_firstVisibleChild_node_key !== void 0 ? _this_firstVisibleChild_node_key : null, (_this_lastVisibleChild_node_key = (_this_lastVisibleChild = this.lastVisibleChild) === null || _this_lastVisibleChild === void 0 ? void 0 : (_this_lastVisibleChild_node = _this_lastVisibleChild.node) === null || _this_lastVisibleChild_node === void 0 ? void 0 : _this_lastVisibleChild_node.key) !== null && _this_lastVisibleChild_node_key !== void 0 ? _this_lastVisibleChild_node_key : null, this.isSSR);
9898
9944
  if (!this.isSSR) {
9899
9945
  this.collection = this.nextCollection;
9900
9946
  this.nextCollection = null;
@@ -9959,9 +10005,9 @@ function $e948873055cbafe4$export$727c8fc270210f13(props) {
9959
10005
  rendered = children(item);
9960
10006
  var _rendered_props_id, _ref;
9961
10007
  // @ts-ignore
9962
- let key = (_ref = (_rendered_props_id = rendered.props.id) !== null && _rendered_props_id !== undefined ? _rendered_props_id : item.key) !== null && _ref !== undefined ? _ref : item.id;
10008
+ let key = (_ref = (_rendered_props_id = rendered.props.id) !== null && _rendered_props_id !== void 0 ? _rendered_props_id : item.key) !== null && _ref !== void 0 ? _ref : item.id;
9963
10009
  if (key == null) throw new Error('Could not determine key for item');
9964
- if (idScope) key = idScope + ':' + key;
10010
+ if (idScope != null) key = idScope + ':' + key;
9965
10011
  // Note: only works if wrapped Item passes through id...
9966
10012
  rendered = ($dbSRa$react.cloneElement)(rendered, addIdAndValue ? {
9967
10013
  key: key,
@@ -10114,7 +10160,7 @@ function requireUseSyncExternalStoreShim_production () {
10114
10160
  ? useSyncExternalStore$1
10115
10161
  : useSyncExternalStore$2;
10116
10162
  useSyncExternalStoreShim_production.useSyncExternalStore =
10117
- undefined !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
10163
+ void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
10118
10164
  return useSyncExternalStoreShim_production;
10119
10165
  }
10120
10166
 
@@ -10142,7 +10188,7 @@ function requireUseSyncExternalStoreShim_development () {
10142
10188
  }
10143
10189
  function useSyncExternalStore$2(subscribe, getSnapshot) {
10144
10190
  didWarnOld18Alpha ||
10145
- undefined === React.startTransition ||
10191
+ void 0 === React.startTransition ||
10146
10192
  ((didWarnOld18Alpha = true),
10147
10193
  console.error(
10148
10194
  "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
@@ -10213,7 +10259,7 @@ function requireUseSyncExternalStoreShim_development () {
10213
10259
  ? useSyncExternalStore$1
10214
10260
  : useSyncExternalStore$2;
10215
10261
  useSyncExternalStoreShim_development.useSyncExternalStore =
10216
- undefined !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
10262
+ void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
10217
10263
  "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
10218
10264
  "function" ===
10219
10265
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -10222,13 +10268,21 @@ function requireUseSyncExternalStoreShim_development () {
10222
10268
  return useSyncExternalStoreShim_development;
10223
10269
  }
10224
10270
 
10225
- if (process.env.NODE_ENV === 'production') {
10226
- shim.exports = requireUseSyncExternalStoreShim_production();
10227
- } else {
10228
- shim.exports = requireUseSyncExternalStoreShim_development();
10271
+ var hasRequiredShim;
10272
+
10273
+ function requireShim () {
10274
+ if (hasRequiredShim) return shim.exports;
10275
+ hasRequiredShim = 1;
10276
+
10277
+ if (process.env.NODE_ENV === 'production') {
10278
+ shim.exports = requireUseSyncExternalStoreShim_production();
10279
+ } else {
10280
+ shim.exports = requireUseSyncExternalStoreShim_development();
10281
+ }
10282
+ return shim.exports;
10229
10283
  }
10230
10284
 
10231
- var shimExports = shim.exports;
10285
+ var shimExports = requireShim();
10232
10286
 
10233
10287
  /*
10234
10288
  * Copyright 2024 Adobe. All rights reserved.
@@ -10297,7 +10351,7 @@ const $e1995378a142960e$var$useSyncExternalStore = typeof ($dbSRa$react)['useSyn
10297
10351
  function $e1995378a142960e$var$useCollectionDocument(createCollection) {
10298
10352
  // The document instance is mutable, and should never change between renders.
10299
10353
  // useSyncExternalStore is used to subscribe to updates, which vends immutable Collection objects.
10300
- let [document] = ($dbSRa$react.useState)(()=>new ($681cc3c98f569e39$export$b34a105447964f9f)((createCollection === null || createCollection === undefined ? undefined : createCollection()) || new ($23b9f4fcf0fe224b$export$408d25a4e12db025)()));
10354
+ let [document] = ($dbSRa$react.useState)(()=>new ($681cc3c98f569e39$export$b34a105447964f9f)((createCollection === null || createCollection === void 0 ? void 0 : createCollection()) || new ($23b9f4fcf0fe224b$export$408d25a4e12db025)()));
10301
10355
  let subscribe = ($dbSRa$react.useCallback)((fn)=>document.subscribe(fn), [
10302
10356
  document
10303
10357
  ]);
@@ -10339,7 +10393,7 @@ function $e1995378a142960e$var$useSSRCollectionNode(CollectionNodeClass, props,
10339
10393
  // collection by the time we need to use the collection to render to the real DOM.
10340
10394
  // After hydration, we switch to client rendering using the portal.
10341
10395
  let itemRef = ($dbSRa$react.useCallback)((element)=>{
10342
- element === null || element === undefined ? undefined : element.setProps(props, ref, CollectionNodeClass, rendered, render);
10396
+ element === null || element === void 0 ? void 0 : element.setProps(props, ref, CollectionNodeClass, rendered, render);
10343
10397
  }, [
10344
10398
  props,
10345
10399
  ref,
@@ -10394,7 +10448,7 @@ function $e1995378a142960e$export$e953bb1cd0f19726(CollectionNodeClass, render,
10394
10448
  var _useSSRCollectionNode;
10395
10449
  return (_useSSRCollectionNode = $e1995378a142960e$var$useSSRCollectionNode(CollectionNodeClass, props, ref, null, children, (node)=>/*#__PURE__*/ ($dbSRa$react).createElement(Component, {
10396
10450
  node: node
10397
- }))) !== null && _useSSRCollectionNode !== undefined ? _useSSRCollectionNode : /*#__PURE__*/ ($dbSRa$react).createElement(($dbSRa$react).Fragment, null);
10451
+ }))) !== null && _useSSRCollectionNode !== void 0 ? _useSSRCollectionNode : /*#__PURE__*/ ($dbSRa$react).createElement(($dbSRa$react).Fragment, null);
10398
10452
  });
10399
10453
  // @ts-ignore
10400
10454
  Result.displayName = render.name;
@@ -10409,8 +10463,9 @@ function $e1995378a142960e$var$useCollectionChildren(options) {
10409
10463
  const $e1995378a142960e$var$CollectionContext = /*#__PURE__*/ ($dbSRa$react.createContext)(null);
10410
10464
  function $e1995378a142960e$export$fb8073518f34e6ec(props) {
10411
10465
  let ctx = ($dbSRa$react.useContext)($e1995378a142960e$var$CollectionContext);
10412
- let dependencies = ((ctx === null || ctx === undefined ? undefined : ctx.dependencies) || []).concat(props.dependencies);
10413
- let idScope = props.idScope || (ctx === null || ctx === undefined ? undefined : ctx.idScope);
10466
+ let dependencies = ((ctx === null || ctx === void 0 ? void 0 : ctx.dependencies) || []).concat(props.dependencies);
10467
+ var _props_idScope;
10468
+ let idScope = (_props_idScope = props.idScope) !== null && _props_idScope !== void 0 ? _props_idScope : ctx === null || ctx === void 0 ? void 0 : ctx.idScope;
10414
10469
  let children = $e1995378a142960e$var$useCollectionChildren({
10415
10470
  ...props,
10416
10471
  idScope: idScope,
@@ -10500,7 +10555,7 @@ function $7135fc7d473fd974$export$2dbbd341daed716d(collection, node, renderDropI
10500
10555
  let afterIndicators = [];
10501
10556
  if (nextItemInSameLevel == null) {
10502
10557
  let current = node;
10503
- while(current && (!nextItemInFlattenedCollection || current.parentKey !== nextItemInFlattenedCollection.parentKey && nextItemInFlattenedCollection.level < current.level)){
10558
+ while((current === null || current === void 0 ? void 0 : current.type) === 'item' && (!nextItemInFlattenedCollection || current.parentKey !== nextItemInFlattenedCollection.parentKey && nextItemInFlattenedCollection.level < current.level)){
10504
10559
  let indicator = renderDropIndicator({
10505
10560
  type: 'item',
10506
10561
  key: current.key,
@@ -10566,7 +10621,7 @@ function $298d61e98472621b$export$dcf14c9974fe2767(props, ref) {
10566
10621
  'aria-current': props['aria-current'],
10567
10622
  onClick: (e)=>{
10568
10623
  var _pressProps_onClick;
10569
- (_pressProps_onClick = pressProps.onClick) === null || _pressProps_onClick === undefined ? undefined : _pressProps_onClick.call(pressProps, e);
10624
+ (_pressProps_onClick = pressProps.onClick) === null || _pressProps_onClick === void 0 ? void 0 : _pressProps_onClick.call(pressProps, e);
10570
10625
  ($ea8dcbcb9ea1b556$export$13aea1a3cb5e3f1f)(e, router, props.href, props.routerOptions);
10571
10626
  }
10572
10627
  })
@@ -10681,9 +10736,9 @@ function $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref) {
10681
10736
  onClick: onClick,
10682
10737
  onPress (e) {
10683
10738
  var _ref_current;
10684
- onPress === null || onPress === undefined ? undefined : onPress(e);
10739
+ onPress === null || onPress === void 0 ? void 0 : onPress(e);
10685
10740
  state.toggle();
10686
- (_ref_current = ref.current) === null || _ref_current === undefined ? undefined : _ref_current.focus();
10741
+ (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();
10687
10742
  },
10688
10743
  isDisabled: isDisabled || isReadOnly
10689
10744
  });
@@ -10881,7 +10936,7 @@ function $3017fa7ffdddec74$export$8042c6c013fd5226(props = {}) {
10881
10936
  var _props_defaultSelected;
10882
10937
  return {
10883
10938
  isSelected: isSelected,
10884
- defaultSelected: (_props_defaultSelected = props.defaultSelected) !== null && _props_defaultSelected !== undefined ? _props_defaultSelected : initialValue,
10939
+ defaultSelected: (_props_defaultSelected = props.defaultSelected) !== null && _props_defaultSelected !== void 0 ? _props_defaultSelected : initialValue,
10885
10940
  setSelected: updateSelected,
10886
10941
  toggle: toggleState
10887
10942
  };
@@ -10915,7 +10970,7 @@ function $fba3e38d5ca8983f$export$353b32fc6898d37d(props, state, inputRef) {
10915
10970
  });
10916
10971
  let { name: name, form: form, descriptionId: descriptionId, errorMessageId: errorMessageId, validationBehavior: validationBehavior } = ($1ae600c947479353$export$ec98120685d4f57d).get(state);
10917
10972
  var _props_validationBehavior;
10918
- validationBehavior = (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== undefined ? _props_validationBehavior : validationBehavior;
10973
+ validationBehavior = (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== void 0 ? _props_validationBehavior : validationBehavior;
10919
10974
  // Local validation for this checkbox.
10920
10975
  let { realtimeValidation: realtimeValidation } = ($e5be200c675c3b3a$export$fc1a364ae1f3ff10)({
10921
10976
  ...props,
@@ -10940,7 +10995,7 @@ function $fba3e38d5ca8983f$export$353b32fc6898d37d(props, state, inputRef) {
10940
10995
  isDisabled: props.isDisabled || state.isDisabled,
10941
10996
  name: props.name || name,
10942
10997
  form: props.form || form,
10943
- isRequired: (_props_isRequired = props.isRequired) !== null && _props_isRequired !== undefined ? _props_isRequired : state.isRequired,
10998
+ isRequired: (_props_isRequired = props.isRequired) !== null && _props_isRequired !== void 0 ? _props_isRequired : state.isRequired,
10944
10999
  validationBehavior: validationBehavior,
10945
11000
  [($e5be200c675c3b3a$export$a763b9476acd3eb)]: {
10946
11001
  realtimeValidation: combinedRealtimeValidation,
@@ -11076,7 +11131,7 @@ function $5e910fae8e128ead$export$6e3e27031a30522f(props, state, ref) {
11076
11131
  ($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
11077
11132
  // Cancel any pending RAF to prevent stale updates
11078
11133
  if (raf.current) cancelAnimationFrame(raf.current);
11079
- if (ref.current && !isDisabled && !isSSR) {
11134
+ if (ref.current && !isSSR) {
11080
11135
  let panel = ref.current;
11081
11136
  if (isExpandedRef.current == null || typeof panel.getAnimations !== 'function') {
11082
11137
  // On initial render (and in tests), set attributes without animation.
@@ -11144,7 +11199,7 @@ function $5e910fae8e128ead$export$6e3e27031a30522f(props, state, ref) {
11144
11199
  role: 'group',
11145
11200
  'aria-labelledby': triggerId,
11146
11201
  'aria-hidden': !state.isExpanded,
11147
- hidden: isSSR || isDisabled ? isDisabled || !state.isExpanded : undefined
11202
+ hidden: isSSR ? !state.isExpanded : undefined
11148
11203
  }
11149
11204
  };
11150
11205
  }
@@ -11162,7 +11217,7 @@ function $5e910fae8e128ead$export$6e3e27031a30522f(props, state, ref) {
11162
11217
  */ const $ce9b18daab526bbd$export$5b9bb410392e3991 = new WeakMap();
11163
11218
  function $ce9b18daab526bbd$export$f45c25170b9a99c2(state, key) {
11164
11219
  var _listMap_get;
11165
- let { id: id } = (_listMap_get = $ce9b18daab526bbd$export$5b9bb410392e3991.get(state)) !== null && _listMap_get !== undefined ? _listMap_get : {};
11220
+ let { id: id } = (_listMap_get = $ce9b18daab526bbd$export$5b9bb410392e3991.get(state)) !== null && _listMap_get !== void 0 ? _listMap_get : {};
11166
11221
  if (!id) throw new Error('Unknown list');
11167
11222
  return `${id}-${$ce9b18daab526bbd$export$e0c709538cb8ae18(key)}`;
11168
11223
  }
@@ -11741,14 +11796,14 @@ function $92599c3fd427b763$export$137e594ef3218a10(props, state) {
11741
11796
  let { getRowText: getRowText = (key)=>{
11742
11797
  var _state_collection_getTextValue, _state_collection, _state_collection_getItem;
11743
11798
  var _state_collection_getTextValue1;
11744
- return (_state_collection_getTextValue1 = (_state_collection_getTextValue = (_state_collection = state.collection).getTextValue) === null || _state_collection_getTextValue === undefined ? undefined : _state_collection_getTextValue.call(_state_collection, key)) !== null && _state_collection_getTextValue1 !== undefined ? _state_collection_getTextValue1 : (_state_collection_getItem = state.collection.getItem(key)) === null || _state_collection_getItem === undefined ? undefined : _state_collection_getItem.textValue;
11799
+ return (_state_collection_getTextValue1 = (_state_collection_getTextValue = (_state_collection = state.collection).getTextValue) === null || _state_collection_getTextValue === void 0 ? void 0 : _state_collection_getTextValue.call(_state_collection, key)) !== null && _state_collection_getTextValue1 !== void 0 ? _state_collection_getTextValue1 : (_state_collection_getItem = state.collection.getItem(key)) === null || _state_collection_getItem === void 0 ? void 0 : _state_collection_getItem.textValue;
11745
11800
  } } = props;
11746
11801
  let stringFormatter = ($fca6afa0e843324b$export$f12b703ca79dfbb1)((($parcel$interopDefault$3($835c96616a7cb4f9$exports))), '@react-aria/grid');
11747
11802
  // Many screen readers do not announce when items in a grid are selected/deselected.
11748
11803
  // We do this using an ARIA live region.
11749
11804
  let selection = state.selectionManager.rawSelection;
11750
11805
  let lastSelection = ($dbSRa$react.useRef)(selection);
11751
- let announceSelectionChange = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(()=>{
11806
+ let announceSelectionChange = ($dbSRa$react.useCallback)(()=>{
11752
11807
  var _lastSelection_current;
11753
11808
  if (!state.selectionManager.isFocused || selection === lastSelection.current) {
11754
11809
  lastSelection.current = selection;
@@ -11786,13 +11841,23 @@ function $92599c3fd427b763$export$137e594ef3218a10(props, state) {
11786
11841
  }
11787
11842
  // Announce how many items are selected, except when selecting the first item.
11788
11843
  if (state.selectionManager.selectionMode === 'multiple') {
11789
- if (messages.length === 0 || selection === 'all' || selection.size > 1 || lastSelection.current === 'all' || ((_lastSelection_current = lastSelection.current) === null || _lastSelection_current === undefined ? undefined : _lastSelection_current.size) > 1) messages.push(selection === 'all' ? stringFormatter.format('selectedAll') : stringFormatter.format('selectedCount', {
11844
+ if (messages.length === 0 || selection === 'all' || selection.size > 1 || lastSelection.current === 'all' || ((_lastSelection_current = lastSelection.current) === null || _lastSelection_current === void 0 ? void 0 : _lastSelection_current.size) > 1) messages.push(selection === 'all' ? stringFormatter.format('selectedAll') : stringFormatter.format('selectedCount', {
11790
11845
  count: selection.size
11791
11846
  }));
11792
11847
  }
11793
11848
  if (messages.length > 0) ($319e236875307eab$export$a9b970dcc4ae71a9)(messages.join(' '));
11794
11849
  lastSelection.current = selection;
11795
- });
11850
+ }, [
11851
+ selection,
11852
+ state.selectionManager.selectedKeys,
11853
+ state.selectionManager.isFocused,
11854
+ state.selectionManager.selectionBehavior,
11855
+ state.selectionManager.selectionMode,
11856
+ state.collection,
11857
+ getRowText,
11858
+ stringFormatter
11859
+ ]);
11860
+ // useUpdateEffect will handle using useEffectEvent, no need to stabilize anything on this end
11796
11861
  ($4f58c5f72bcf79f7$export$496315a1608d9602)(()=>{
11797
11862
  if (state.selectionManager.isFocused) announceSelectionChange();
11798
11863
  else {
@@ -11963,7 +12028,7 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
11963
12028
  var _ref_current;
11964
12029
  // Don't shift focus to the row if the active element is a element within the row already
11965
12030
  // (e.g. clicking on a row button)
11966
- if (ref.current !== null && (keyWhenFocused.current != null && node.key !== keyWhenFocused.current || !((_ref_current = ref.current) === null || _ref_current === undefined ? undefined : _ref_current.contains(document.activeElement)))) ($3ad3f6e1647bc98d$export$80f3e147d781571c)(ref.current);
12031
+ if (ref.current !== null && (keyWhenFocused.current != null && node.key !== keyWhenFocused.current || !((_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.contains(document.activeElement)))) ($3ad3f6e1647bc98d$export$80f3e147d781571c)(ref.current);
11967
12032
  };
11968
12033
  let treeGridRowProps = {};
11969
12034
  let hasChildRows = props.hasChildItems;
@@ -11972,19 +12037,19 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
11972
12037
  var _state_collection_getChildren, _state_collection;
11973
12038
  // TODO: ideally node.hasChildNodes would be a way to tell if a row has child nodes, but the row's contents make it so that value is always
11974
12039
  // true...
11975
- let children = (_state_collection_getChildren = (_state_collection = state.collection).getChildren) === null || _state_collection_getChildren === undefined ? undefined : _state_collection_getChildren.call(_state_collection, node.key);
12040
+ let children = (_state_collection_getChildren = (_state_collection = state.collection).getChildren) === null || _state_collection_getChildren === void 0 ? void 0 : _state_collection_getChildren.call(_state_collection, node.key);
11976
12041
  hasChildRows = hasChildRows || [
11977
- ...children !== null && children !== undefined ? children : []
12042
+ ...children !== null && children !== void 0 ? children : []
11978
12043
  ].length > 1;
11979
12044
  if (onAction == null && !hasLink && state.selectionManager.selectionMode === 'none' && hasChildRows) onAction = ()=>state.toggleKey(node.key);
11980
12045
  let isExpanded = hasChildRows ? state.expandedKeys.has(node.key) : undefined;
11981
12046
  let setSize = 1;
11982
- if (node.level > 0 && (node === null || node === undefined ? undefined : node.parentKey) != null) {
12047
+ if (node.level > 0 && (node === null || node === void 0 ? void 0 : node.parentKey) != null) {
11983
12048
  let parent = state.collection.getItem(node.parentKey);
11984
12049
  if (parent) {
11985
12050
  var _state_collection_getChildren1, _state_collection1;
11986
12051
  // siblings must exist because our original node exists
11987
- let siblings = (_state_collection_getChildren1 = (_state_collection1 = state.collection).getChildren) === null || _state_collection_getChildren1 === undefined ? undefined : _state_collection_getChildren1.call(_state_collection1, parent.key);
12052
+ let siblings = (_state_collection_getChildren1 = (_state_collection1 = state.collection).getChildren) === null || _state_collection_getChildren1 === void 0 ? void 0 : _state_collection_getChildren1.call(_state_collection1, parent.key);
11988
12053
  setSize = [
11989
12054
  ...siblings
11990
12055
  ].filter((row)=>row.type === 'item').length;
@@ -11995,7 +12060,7 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
11995
12060
  treeGridRowProps = {
11996
12061
  'aria-expanded': isExpanded,
11997
12062
  'aria-level': node.level + 1,
11998
- 'aria-posinset': (node === null || node === undefined ? undefined : node.index) + 1,
12063
+ 'aria-posinset': (node === null || node === void 0 ? void 0 : node.index) + 1,
11999
12064
  'aria-setsize': setSize
12000
12065
  };
12001
12066
  }
@@ -12005,7 +12070,7 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
12005
12070
  ref: ref,
12006
12071
  isVirtualized: isVirtualized,
12007
12072
  shouldSelectOnPressUp: props.shouldSelectOnPressUp || shouldSelectOnPressUp,
12008
- onAction: onAction || ((_node_props = node.props) === null || _node_props === undefined ? undefined : _node_props.onAction) ? ($ff5963eb1fccf552$export$e08e3b67e392101e)((_node_props1 = node.props) === null || _node_props1 === undefined ? undefined : _node_props1.onAction, onAction ? ()=>onAction(node.key) : undefined) : undefined,
12073
+ onAction: onAction || ((_node_props = node.props) === null || _node_props === void 0 ? void 0 : _node_props.onAction) ? ($ff5963eb1fccf552$export$e08e3b67e392101e)((_node_props1 = node.props) === null || _node_props1 === void 0 ? void 0 : _node_props1.onAction, onAction ? ()=>onAction(node.key) : undefined) : undefined,
12009
12074
  focus: focus,
12010
12075
  linkBehavior: linkBehavior
12011
12076
  });
@@ -12098,7 +12163,7 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
12098
12163
  var _ref_current_parentElement;
12099
12164
  e.stopPropagation();
12100
12165
  e.preventDefault();
12101
- (_ref_current_parentElement = ref.current.parentElement) === null || _ref_current_parentElement === undefined ? undefined : _ref_current_parentElement.dispatchEvent(new KeyboardEvent(e.nativeEvent.type, e.nativeEvent));
12166
+ (_ref_current_parentElement = ref.current.parentElement) === null || _ref_current_parentElement === void 0 ? void 0 : _ref_current_parentElement.dispatchEvent(new KeyboardEvent(e.nativeEvent.type, e.nativeEvent));
12102
12167
  }
12103
12168
  break;
12104
12169
  }
@@ -12149,10 +12214,10 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
12149
12214
  onKeyDown: onKeyDown,
12150
12215
  onFocus: onFocus,
12151
12216
  // 'aria-label': [(node.textValue || undefined), rowAnnouncement].filter(Boolean).join(', '),
12152
- 'aria-label': node.textValue || undefined,
12217
+ 'aria-label': node['aria-label'] || node.textValue || undefined,
12153
12218
  'aria-selected': state.selectionManager.canSelectItem(node.key) ? state.selectionManager.isSelected(node.key) : undefined,
12154
12219
  'aria-disabled': state.selectionManager.isDisabled(node.key) || undefined,
12155
- 'aria-labelledby': descriptionId && node.textValue ? `${($ce9b18daab526bbd$export$f45c25170b9a99c2)(state, node.key)} ${descriptionId}` : undefined,
12220
+ 'aria-labelledby': descriptionId && (node['aria-label'] || node.textValue) ? `${($ce9b18daab526bbd$export$f45c25170b9a99c2)(state, node.key)} ${descriptionId}` : undefined,
12156
12221
  id: ($ce9b18daab526bbd$export$f45c25170b9a99c2)(state, node.key)
12157
12222
  });
12158
12223
  if (isVirtualized) {
@@ -12165,7 +12230,7 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
12165
12230
  ...collection.getKeys()
12166
12231
  ].filter((key)=>{
12167
12232
  var _collection_getItem;
12168
- return ((_collection_getItem = collection.getItem(key)) === null || _collection_getItem === undefined ? undefined : _collection_getItem.type) !== 'section';
12233
+ return ((_collection_getItem = collection.getItem(key)) === null || _collection_getItem === void 0 ? void 0 : _collection_getItem.type) !== 'section';
12169
12234
  }).findIndex((key)=>key === node.key) + 1 : node.index + 1;
12170
12235
  }
12171
12236
  let gridCellProps = {
@@ -12252,9 +12317,9 @@ function $0d5c49892c1215da$export$37b0961d2f4751e2(props, state, ref) {
12252
12317
  isDisabled: isDisabled,
12253
12318
  onPress (e) {
12254
12319
  var _ref_current;
12255
- onPress === null || onPress === undefined ? undefined : onPress(e);
12320
+ onPress === null || onPress === void 0 ? void 0 : onPress(e);
12256
12321
  state.setSelectedValue(value);
12257
- (_ref_current = ref.current) === null || _ref_current === undefined ? undefined : _ref_current.focus();
12322
+ (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();
12258
12323
  }
12259
12324
  });
12260
12325
  let { focusableProps: focusableProps } = ($f645667febf57a63$export$4c014de7c8940b4c)(($3ef42575df84b30b$export$9d1611c77c2fe928)(props, {
@@ -12341,7 +12406,7 @@ function $430f30ed08ec25fa$export$62b9571f283ff5c2(props, state) {
12341
12406
  let { focusWithinProps: focusWithinProps } = ($9ab94262bd0047c7$export$420e68273165f4ec)({
12342
12407
  onBlurWithin (e) {
12343
12408
  var _props_onBlur;
12344
- (_props_onBlur = props.onBlur) === null || _props_onBlur === undefined ? undefined : _props_onBlur.call(props, e);
12409
+ (_props_onBlur = props.onBlur) === null || _props_onBlur === void 0 ? void 0 : _props_onBlur.call(props, e);
12345
12410
  if (!state.selectedValue) state.setLastFocusedValue(null);
12346
12411
  },
12347
12412
  onFocusWithin: props.onFocus,
@@ -12468,7 +12533,7 @@ function $58aed456727eb0f3$export$e64b2f635402ca43(props, state, ref) {
12468
12533
  var _delegate_getKeyAbove, _delegate_getFirstKey;
12469
12534
  // prevent scrolling containers
12470
12535
  e.preventDefault();
12471
- let key = state.selectedKey != null ? (_delegate_getKeyAbove = delegate.getKeyAbove) === null || _delegate_getKeyAbove === undefined ? undefined : _delegate_getKeyAbove.call(delegate, state.selectedKey) : (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === undefined ? undefined : _delegate_getFirstKey.call(delegate);
12536
+ let key = state.selectedKey != null ? (_delegate_getKeyAbove = delegate.getKeyAbove) === null || _delegate_getKeyAbove === void 0 ? void 0 : _delegate_getKeyAbove.call(delegate, state.selectedKey) : (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === void 0 ? void 0 : _delegate_getFirstKey.call(delegate);
12472
12537
  if (key) state.setSelectedKey(key);
12473
12538
  break;
12474
12539
  }
@@ -12477,7 +12542,7 @@ function $58aed456727eb0f3$export$e64b2f635402ca43(props, state, ref) {
12477
12542
  var _delegate_getKeyBelow, _delegate_getFirstKey1;
12478
12543
  // prevent scrolling containers
12479
12544
  e.preventDefault();
12480
- let key = state.selectedKey != null ? (_delegate_getKeyBelow = delegate.getKeyBelow) === null || _delegate_getKeyBelow === undefined ? undefined : _delegate_getKeyBelow.call(delegate, state.selectedKey) : (_delegate_getFirstKey1 = delegate.getFirstKey) === null || _delegate_getFirstKey1 === undefined ? undefined : _delegate_getFirstKey1.call(delegate);
12545
+ let key = state.selectedKey != null ? (_delegate_getKeyBelow = delegate.getKeyBelow) === null || _delegate_getKeyBelow === void 0 ? void 0 : _delegate_getKeyBelow.call(delegate, state.selectedKey) : (_delegate_getFirstKey1 = delegate.getFirstKey) === null || _delegate_getFirstKey1 === void 0 ? void 0 : _delegate_getFirstKey1.call(delegate);
12481
12546
  if (key) state.setSelectedKey(key);
12482
12547
  break;
12483
12548
  }
@@ -12518,7 +12583,7 @@ function $58aed456727eb0f3$export$e64b2f635402ca43(props, state, ref) {
12518
12583
  onClick: ()=>{
12519
12584
  if (!props.isDisabled) {
12520
12585
  var _ref_current;
12521
- (_ref_current = ref.current) === null || _ref_current === undefined ? undefined : _ref_current.focus();
12586
+ (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();
12522
12587
  // Show the focus ring so the user knows where focus went
12523
12588
  ($507fabe10e71c6fb$export$8397ddfc504fdb9a)('keyboard');
12524
12589
  }
@@ -12616,7 +12681,7 @@ function $bdd25dc72710631f$export$f809e80f58e251d1(props, state, triggerRef) {
12616
12681
  validationBehavior: validationBehavior,
12617
12682
  focus: ()=>{
12618
12683
  var _triggerRef_current;
12619
- return (_triggerRef_current = triggerRef.current) === null || _triggerRef_current === undefined ? undefined : _triggerRef_current.focus();
12684
+ return (_triggerRef_current = triggerRef.current) === null || _triggerRef_current === void 0 ? void 0 : _triggerRef_current.focus();
12620
12685
  }
12621
12686
  }, state, props.selectRef);
12622
12687
  let setValue = state.setValue;
@@ -12655,7 +12720,7 @@ function $bdd25dc72710631f$export$f809e80f58e251d1(props, state, triggerRef) {
12655
12720
  required: validationBehavior === 'native' && isRequired,
12656
12721
  name: name,
12657
12722
  form: form,
12658
- value: (_state_value = state.value) !== null && _state_value !== undefined ? _state_value : '',
12723
+ value: (_state_value = state.value) !== null && _state_value !== void 0 ? _state_value : '',
12659
12724
  onChange: onChange,
12660
12725
  onInput: onChange
12661
12726
  }
@@ -12704,7 +12769,7 @@ function $bdd25dc72710631f$export$cbd84cdb2e668835(props) {
12704
12769
  name: name,
12705
12770
  form: form,
12706
12771
  disabled: isDisabled,
12707
- value: value !== null && value !== undefined ? value : ''
12772
+ value: value !== null && value !== void 0 ? value : ''
12708
12773
  };
12709
12774
  if (validationBehavior === 'native') // Use a hidden <input type="text"> rather than <input type="hidden">
12710
12775
  // so that an empty value blocks HTML form submission when the field is required.
@@ -13140,8 +13205,8 @@ function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state, ref) {
13140
13205
  if (e.key === 'Delete' || e.key === 'Backspace') {
13141
13206
  if (isDisabled) return;
13142
13207
  e.preventDefault();
13143
- if (state.selectionManager.isSelected(item.key)) onRemove === null || onRemove === undefined ? undefined : onRemove(new Set(state.selectionManager.selectedKeys));
13144
- else onRemove === null || onRemove === undefined ? undefined : onRemove(new Set([
13208
+ if (state.selectionManager.isSelected(item.key)) onRemove === null || onRemove === void 0 ? void 0 : onRemove(new Set(state.selectionManager.selectedKeys));
13209
+ else onRemove === null || onRemove === void 0 ? void 0 : onRemove(new Set([
13145
13210
  item.key
13146
13211
  ]));
13147
13212
  }
@@ -13200,8 +13265,8 @@ function $326e436e94273fe1$export$1c4b08e0eca38426(props, state) {
13200
13265
  labelable: true
13201
13266
  });
13202
13267
  let { hoverProps: hoverProps } = ($6179b936705e76d3$export$ae780daf29e6d456)({
13203
- onHoverStart: ()=>state === null || state === undefined ? undefined : state.open(true),
13204
- onHoverEnd: ()=>state === null || state === undefined ? undefined : state.close()
13268
+ onHoverStart: ()=>state === null || state === void 0 ? void 0 : state.open(true),
13269
+ onHoverEnd: ()=>state === null || state === void 0 ? void 0 : state.close()
13205
13270
  });
13206
13271
  return {
13207
13272
  tooltipProps: ($3ef42575df84b30b$export$9d1611c77c2fe928)(domProps, hoverProps, {
@@ -13224,7 +13289,7 @@ function $326e436e94273fe1$export$1c4b08e0eca38426(props, state) {
13224
13289
 
13225
13290
 
13226
13291
  function $4e1b34546679e357$export$a6da6c504e4bba8b(props, state, ref) {
13227
- let { isDisabled: isDisabled, trigger: trigger } = props;
13292
+ let { isDisabled: isDisabled, trigger: trigger, shouldCloseOnPress: shouldCloseOnPress = true } = props;
13228
13293
  let tooltipId = ($bdb11010cef70236$export$f680877a34711e37)();
13229
13294
  let isHovered = ($dbSRa$react.useRef)(false);
13230
13295
  let isFocused = ($dbSRa$react.useRef)(false);
@@ -13273,6 +13338,8 @@ function $4e1b34546679e357$export$a6da6c504e4bba8b(props, state, ref) {
13273
13338
  handleHide();
13274
13339
  };
13275
13340
  let onPressStart = ()=>{
13341
+ // if shouldCloseOnPress is false, we should not close the tooltip
13342
+ if (!shouldCloseOnPress) return;
13276
13343
  // no matter how the trigger is pressed, we should close the tooltip
13277
13344
  isFocused.current = false;
13278
13345
  isHovered.current = false;
@@ -13446,7 +13513,7 @@ const $d2b4bc8c273e7be6$export$353f5b6fc5456de1 = /*#__PURE__*/ ($f39a9eba43920a
13446
13513
  isFocused: isFocused,
13447
13514
  isFocusVisible: isFocusVisible,
13448
13515
  isDisabled: props.isDisabled || false,
13449
- isPending: isPending !== null && isPending !== undefined ? isPending : false
13516
+ isPending: isPending !== null && isPending !== void 0 ? isPending : false
13450
13517
  };
13451
13518
  let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
13452
13519
  ...props,
@@ -13563,7 +13630,7 @@ function $587d3ad58be6d31f$export$daff6da51032a415(props = {}) {
13563
13630
  const state = {
13564
13631
  ...validation,
13565
13632
  value: selectedValues,
13566
- defaultValue: (_props_defaultValue = props.defaultValue) !== null && _props_defaultValue !== undefined ? _props_defaultValue : initialValues,
13633
+ defaultValue: (_props_defaultValue = props.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : initialValues,
13567
13634
  setValue (value) {
13568
13635
  if (props.isReadOnly || props.isDisabled) return;
13569
13636
  setValue(value);
@@ -13575,10 +13642,10 @@ function $587d3ad58be6d31f$export$daff6da51032a415(props = {}) {
13575
13642
  },
13576
13643
  addValue (value) {
13577
13644
  if (props.isReadOnly || props.isDisabled) return;
13578
- if (!selectedValues.includes(value)) {
13579
- selectedValues = selectedValues.concat(value);
13580
- setValue(selectedValues);
13581
- }
13645
+ setValue((selectedValues)=>{
13646
+ if (!selectedValues.includes(value)) return selectedValues.concat(value);
13647
+ return selectedValues;
13648
+ });
13582
13649
  },
13583
13650
  removeValue (value) {
13584
13651
  if (props.isReadOnly || props.isDisabled) return;
@@ -13596,7 +13663,7 @@ function $587d3ad58be6d31f$export$daff6da51032a415(props = {}) {
13596
13663
  invalidValues.current = s;
13597
13664
  validation.updateValidation(($e5be200c675c3b3a$export$75ee7c75d68f5b0e)(...s.values()));
13598
13665
  },
13599
- validationState: (_props_validationState = props.validationState) !== null && _props_validationState !== undefined ? _props_validationState : isInvalid ? 'invalid' : null,
13666
+ validationState: (_props_validationState = props.validationState) !== null && _props_validationState !== void 0 ? _props_validationState : isInvalid ? 'invalid' : null,
13600
13667
  isInvalid: isInvalid,
13601
13668
  isRequired: isRequired
13602
13669
  };
@@ -13626,12 +13693,12 @@ function $587d3ad58be6d31f$export$daff6da51032a415(props = {}) {
13626
13693
  getKeyBefore(key) {
13627
13694
  let node = this.keyMap.get(key);
13628
13695
  var _node_prevKey;
13629
- return node ? (_node_prevKey = node.prevKey) !== null && _node_prevKey !== undefined ? _node_prevKey : null : null;
13696
+ return node ? (_node_prevKey = node.prevKey) !== null && _node_prevKey !== void 0 ? _node_prevKey : null : null;
13630
13697
  }
13631
13698
  getKeyAfter(key) {
13632
13699
  let node = this.keyMap.get(key);
13633
13700
  var _node_nextKey;
13634
- return node ? (_node_nextKey = node.nextKey) !== null && _node_nextKey !== undefined ? _node_nextKey : null : null;
13701
+ return node ? (_node_nextKey = node.nextKey) !== null && _node_nextKey !== void 0 ? _node_nextKey : null : null;
13635
13702
  }
13636
13703
  getFirstKey() {
13637
13704
  return this.firstKey;
@@ -13641,7 +13708,7 @@ function $587d3ad58be6d31f$export$daff6da51032a415(props = {}) {
13641
13708
  }
13642
13709
  getItem(key) {
13643
13710
  var _this_keyMap_get;
13644
- return (_this_keyMap_get = this.keyMap.get(key)) !== null && _this_keyMap_get !== undefined ? _this_keyMap_get : null;
13711
+ return (_this_keyMap_get = this.keyMap.get(key)) !== null && _this_keyMap_get !== void 0 ? _this_keyMap_get : null;
13645
13712
  }
13646
13713
  at(idx) {
13647
13714
  const keys = [
@@ -13651,7 +13718,7 @@ function $587d3ad58be6d31f$export$daff6da51032a415(props = {}) {
13651
13718
  }
13652
13719
  getChildren(key) {
13653
13720
  let node = this.keyMap.get(key);
13654
- return (node === null || node === undefined ? undefined : node.childNodes) || [];
13721
+ return (node === null || node === void 0 ? void 0 : node.childNodes) || [];
13655
13722
  }
13656
13723
  constructor(nodes){
13657
13724
  this.keyMap = new Map();
@@ -13685,7 +13752,7 @@ function $587d3ad58be6d31f$export$daff6da51032a415(props = {}) {
13685
13752
  }
13686
13753
  this._size = size;
13687
13754
  var _last_key;
13688
- this.lastKey = (_last_key = last === null || last === undefined ? undefined : last.key) !== null && _last_key !== undefined ? _last_key : null;
13755
+ this.lastKey = (_last_key = last === null || last === void 0 ? void 0 : last.key) !== null && _last_key !== void 0 ? _last_key : null;
13689
13756
  }
13690
13757
  }
13691
13758
 
@@ -13703,11 +13770,11 @@ function $587d3ad58be6d31f$export$daff6da51032a415(props = {}) {
13703
13770
  constructor(keys, anchorKey, currentKey){
13704
13771
  super(keys);
13705
13772
  if (keys instanceof $e40ea825a81a3709$export$52baac22726c72bf) {
13706
- this.anchorKey = anchorKey !== null && anchorKey !== undefined ? anchorKey : keys.anchorKey;
13707
- this.currentKey = currentKey !== null && currentKey !== undefined ? currentKey : keys.currentKey;
13773
+ this.anchorKey = anchorKey !== null && anchorKey !== void 0 ? anchorKey : keys.anchorKey;
13774
+ this.currentKey = currentKey !== null && currentKey !== void 0 ? currentKey : keys.currentKey;
13708
13775
  } else {
13709
- this.anchorKey = anchorKey !== null && anchorKey !== undefined ? anchorKey : null;
13710
- this.currentKey = currentKey !== null && currentKey !== undefined ? currentKey : null;
13776
+ this.anchorKey = anchorKey !== null && anchorKey !== void 0 ? anchorKey : null;
13777
+ this.currentKey = currentKey !== null && currentKey !== void 0 ? currentKey : null;
13711
13778
  }
13712
13779
  }
13713
13780
  }
@@ -13899,7 +13966,7 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
13899
13966
  if (!first || item && ($c5a24bc478652b5f$export$8c434b3a7a4dad6)(this.collection, item, first) < 0) first = item;
13900
13967
  }
13901
13968
  var _first_key;
13902
- return (_first_key = first === null || first === undefined ? undefined : first.key) !== null && _first_key !== undefined ? _first_key : null;
13969
+ return (_first_key = first === null || first === void 0 ? void 0 : first.key) !== null && _first_key !== void 0 ? _first_key : null;
13903
13970
  }
13904
13971
  get lastSelectedKey() {
13905
13972
  let last = null;
@@ -13908,7 +13975,7 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
13908
13975
  if (!last || item && ($c5a24bc478652b5f$export$8c434b3a7a4dad6)(this.collection, item, last) > 0) last = item;
13909
13976
  }
13910
13977
  var _last_key;
13911
- return (_last_key = last === null || last === undefined ? undefined : last.key) !== null && _last_key !== undefined ? _last_key : null;
13978
+ return (_last_key = last === null || last === void 0 ? void 0 : last.key) !== null && _last_key !== void 0 ? _last_key : null;
13912
13979
  }
13913
13980
  get disabledKeys() {
13914
13981
  return this.state.disabledKeys;
@@ -13934,10 +14001,10 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
13934
14001
  else {
13935
14002
  let selectedKeys = this.state.selectedKeys;
13936
14003
  var _selectedKeys_anchorKey;
13937
- let anchorKey = (_selectedKeys_anchorKey = selectedKeys.anchorKey) !== null && _selectedKeys_anchorKey !== undefined ? _selectedKeys_anchorKey : mappedToKey;
14004
+ let anchorKey = (_selectedKeys_anchorKey = selectedKeys.anchorKey) !== null && _selectedKeys_anchorKey !== void 0 ? _selectedKeys_anchorKey : mappedToKey;
13938
14005
  selection = new ($e40ea825a81a3709$export$52baac22726c72bf)(selectedKeys, anchorKey, mappedToKey);
13939
14006
  var _selectedKeys_currentKey;
13940
- for (let key of this.getKeyRange(anchorKey, (_selectedKeys_currentKey = selectedKeys.currentKey) !== null && _selectedKeys_currentKey !== undefined ? _selectedKeys_currentKey : mappedToKey))selection.delete(key);
14007
+ for (let key of this.getKeyRange(anchorKey, (_selectedKeys_currentKey = selectedKeys.currentKey) !== null && _selectedKeys_currentKey !== void 0 ? _selectedKeys_currentKey : mappedToKey))selection.delete(key);
13941
14008
  for (let key of this.getKeyRange(mappedToKey, anchorKey))if (this.canSelectItem(key)) selection.add(key);
13942
14009
  }
13943
14010
  this.state.setSelectedKeys(selection);
@@ -13953,7 +14020,7 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
13953
14020
  }
13954
14021
  getKeyRangeInternal(from, to) {
13955
14022
  var _this_layoutDelegate;
13956
- if ((_this_layoutDelegate = this.layoutDelegate) === null || _this_layoutDelegate === undefined ? undefined : _this_layoutDelegate.getKeyRange) return this.layoutDelegate.getKeyRange(from, to);
14023
+ if ((_this_layoutDelegate = this.layoutDelegate) === null || _this_layoutDelegate === void 0 ? void 0 : _this_layoutDelegate.getKeyRange) return this.layoutDelegate.getKeyRange(from, to);
13957
14024
  let keys = [];
13958
14025
  let key = from;
13959
14026
  while(key != null){
@@ -14027,10 +14094,10 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
14027
14094
  if (this.canSelectItem(key)) {
14028
14095
  var _getFirstItem;
14029
14096
  let item = this.collection.getItem(key);
14030
- if ((item === null || item === undefined ? undefined : item.type) === 'item') keys.push(key);
14097
+ if ((item === null || item === void 0 ? void 0 : item.type) === 'item') keys.push(key);
14031
14098
  var _getFirstItem_key;
14032
14099
  // Add child keys. If cell selection is allowed, then include item children too.
14033
- if ((item === null || item === undefined ? undefined : item.hasChildNodes) && (this.allowsCellSelection || item.type !== 'item')) addKeys((_getFirstItem_key = (_getFirstItem = ($c5a24bc478652b5f$export$fbdeaa6a76694f71)(($c5a24bc478652b5f$export$1005530eda016c13)(item, this.collection))) === null || _getFirstItem === undefined ? undefined : _getFirstItem.key) !== null && _getFirstItem_key !== undefined ? _getFirstItem_key : null);
14100
+ if ((item === null || item === void 0 ? void 0 : item.hasChildNodes) && (this.allowsCellSelection || item.type !== 'item')) addKeys((_getFirstItem_key = (_getFirstItem = ($c5a24bc478652b5f$export$fbdeaa6a76694f71)(($c5a24bc478652b5f$export$1005530eda016c13)(item, this.collection))) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key) !== null && _getFirstItem_key !== void 0 ? _getFirstItem_key : null);
14034
14101
  }
14035
14102
  key = this.collection.getKeyAfter(key);
14036
14103
  }
@@ -14082,20 +14149,20 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
14082
14149
  var _item_props;
14083
14150
  if (this.state.selectionMode === 'none' || this.state.disabledKeys.has(key)) return false;
14084
14151
  let item = this.collection.getItem(key);
14085
- if (!item || (item === null || item === undefined ? undefined : (_item_props = item.props) === null || _item_props === undefined ? undefined : _item_props.isDisabled) || item.type === 'cell' && !this.allowsCellSelection) return false;
14152
+ if (!item || (item === null || item === void 0 ? void 0 : (_item_props = item.props) === null || _item_props === void 0 ? void 0 : _item_props.isDisabled) || item.type === 'cell' && !this.allowsCellSelection) return false;
14086
14153
  return true;
14087
14154
  }
14088
14155
  isDisabled(key) {
14089
14156
  var _this_collection_getItem_props, _this_collection_getItem;
14090
- return this.state.disabledBehavior === 'all' && (this.state.disabledKeys.has(key) || !!((_this_collection_getItem = this.collection.getItem(key)) === null || _this_collection_getItem === undefined ? undefined : (_this_collection_getItem_props = _this_collection_getItem.props) === null || _this_collection_getItem_props === undefined ? undefined : _this_collection_getItem_props.isDisabled));
14157
+ return this.state.disabledBehavior === 'all' && (this.state.disabledKeys.has(key) || !!((_this_collection_getItem = this.collection.getItem(key)) === null || _this_collection_getItem === void 0 ? void 0 : (_this_collection_getItem_props = _this_collection_getItem.props) === null || _this_collection_getItem_props === void 0 ? void 0 : _this_collection_getItem_props.isDisabled));
14091
14158
  }
14092
14159
  isLink(key) {
14093
14160
  var _this_collection_getItem_props, _this_collection_getItem;
14094
- return !!((_this_collection_getItem = this.collection.getItem(key)) === null || _this_collection_getItem === undefined ? undefined : (_this_collection_getItem_props = _this_collection_getItem.props) === null || _this_collection_getItem_props === undefined ? undefined : _this_collection_getItem_props.href);
14161
+ return !!((_this_collection_getItem = this.collection.getItem(key)) === null || _this_collection_getItem === void 0 ? void 0 : (_this_collection_getItem_props = _this_collection_getItem.props) === null || _this_collection_getItem_props === void 0 ? void 0 : _this_collection_getItem_props.href);
14095
14162
  }
14096
14163
  getItemProps(key) {
14097
14164
  var _this_collection_getItem;
14098
- return (_this_collection_getItem = this.collection.getItem(key)) === null || _this_collection_getItem === undefined ? undefined : _this_collection_getItem.props;
14165
+ return (_this_collection_getItem = this.collection.getItem(key)) === null || _this_collection_getItem === void 0 ? void 0 : _this_collection_getItem.props;
14099
14166
  }
14100
14167
  withCollection(collection) {
14101
14168
  return new $d496c0a20b6e58ec$export$6c8a5aaad13c9852(collection, this.state, {
@@ -14107,9 +14174,9 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
14107
14174
  this.collection = collection;
14108
14175
  this.state = state;
14109
14176
  var _options_allowsCellSelection;
14110
- this.allowsCellSelection = (_options_allowsCellSelection = options === null || options === undefined ? undefined : options.allowsCellSelection) !== null && _options_allowsCellSelection !== undefined ? _options_allowsCellSelection : false;
14177
+ this.allowsCellSelection = (_options_allowsCellSelection = options === null || options === void 0 ? void 0 : options.allowsCellSelection) !== null && _options_allowsCellSelection !== void 0 ? _options_allowsCellSelection : false;
14111
14178
  this._isSelectAll = null;
14112
- this.layoutDelegate = (options === null || options === undefined ? undefined : options.layoutDelegate) || null;
14179
+ this.layoutDelegate = (options === null || options === void 0 ? void 0 : options.layoutDelegate) || null;
14113
14180
  }
14114
14181
  }
14115
14182
 
@@ -14179,18 +14246,18 @@ function $e72dd72e1c76a225$var$useFocusedKeyReset(collection, selectionManager)
14179
14246
  ...cachedCollection.current.getKeys()
14180
14247
  ].map((key)=>{
14181
14248
  const itemNode = cachedCollection.current.getItem(key);
14182
- return (itemNode === null || itemNode === undefined ? undefined : itemNode.type) === 'item' ? itemNode : null;
14249
+ return (itemNode === null || itemNode === void 0 ? void 0 : itemNode.type) === 'item' ? itemNode : null;
14183
14250
  }).filter((node)=>node !== null);
14184
14251
  const itemNodes = [
14185
14252
  ...collection.getKeys()
14186
14253
  ].map((key)=>{
14187
14254
  const itemNode = collection.getItem(key);
14188
- return (itemNode === null || itemNode === undefined ? undefined : itemNode.type) === 'item' ? itemNode : null;
14255
+ return (itemNode === null || itemNode === void 0 ? void 0 : itemNode.type) === 'item' ? itemNode : null;
14189
14256
  }).filter((node)=>node !== null);
14190
14257
  var _cachedItemNodes_length, _itemNodes_length;
14191
- const diff = ((_cachedItemNodes_length = cachedItemNodes === null || cachedItemNodes === undefined ? undefined : cachedItemNodes.length) !== null && _cachedItemNodes_length !== undefined ? _cachedItemNodes_length : 0) - ((_itemNodes_length = itemNodes === null || itemNodes === undefined ? undefined : itemNodes.length) !== null && _itemNodes_length !== undefined ? _itemNodes_length : 0);
14258
+ const diff = ((_cachedItemNodes_length = cachedItemNodes === null || cachedItemNodes === void 0 ? void 0 : cachedItemNodes.length) !== null && _cachedItemNodes_length !== void 0 ? _cachedItemNodes_length : 0) - ((_itemNodes_length = itemNodes === null || itemNodes === void 0 ? void 0 : itemNodes.length) !== null && _itemNodes_length !== void 0 ? _itemNodes_length : 0);
14192
14259
  var _startItem_index, _startItem_index1, _itemNodes_length1;
14193
- let index = Math.min(diff > 1 ? Math.max(((_startItem_index = startItem === null || startItem === undefined ? undefined : startItem.index) !== null && _startItem_index !== undefined ? _startItem_index : 0) - diff + 1, 0) : (_startItem_index1 = startItem === null || startItem === undefined ? undefined : startItem.index) !== null && _startItem_index1 !== undefined ? _startItem_index1 : 0, ((_itemNodes_length1 = itemNodes === null || itemNodes === undefined ? undefined : itemNodes.length) !== null && _itemNodes_length1 !== undefined ? _itemNodes_length1 : 0) - 1);
14260
+ let index = Math.min(diff > 1 ? Math.max(((_startItem_index = startItem === null || startItem === void 0 ? void 0 : startItem.index) !== null && _startItem_index !== void 0 ? _startItem_index : 0) - diff + 1, 0) : (_startItem_index1 = startItem === null || startItem === void 0 ? void 0 : startItem.index) !== null && _startItem_index1 !== void 0 ? _startItem_index1 : 0, ((_itemNodes_length1 = itemNodes === null || itemNodes === void 0 ? void 0 : itemNodes.length) !== null && _itemNodes_length1 !== void 0 ? _itemNodes_length1 : 0) - 1);
14194
14261
  let newNode = null;
14195
14262
  let isReverseSearching = false;
14196
14263
  while(index >= 0){
@@ -14203,7 +14270,7 @@ function $e72dd72e1c76a225$var$useFocusedKeyReset(collection, selectionManager)
14203
14270
  else {
14204
14271
  isReverseSearching = true;
14205
14272
  var _startItem_index2, _startItem_index3;
14206
- if (index > ((_startItem_index2 = startItem === null || startItem === undefined ? undefined : startItem.index) !== null && _startItem_index2 !== undefined ? _startItem_index2 : 0)) index = (_startItem_index3 = startItem === null || startItem === undefined ? undefined : startItem.index) !== null && _startItem_index3 !== undefined ? _startItem_index3 : 0;
14273
+ if (index > ((_startItem_index2 = startItem === null || startItem === void 0 ? void 0 : startItem.index) !== null && _startItem_index2 !== void 0 ? _startItem_index2 : 0)) index = (_startItem_index3 = startItem === null || startItem === void 0 ? void 0 : startItem.index) !== null && _startItem_index3 !== void 0 ? _startItem_index3 : 0;
14207
14274
  index--;
14208
14275
  }
14209
14276
  }
@@ -14418,7 +14485,7 @@ function $a54cdc5c1942b639$export$bca9d026f8e704eb(props) {
14418
14485
  props.name
14419
14486
  ]);
14420
14487
  var _props_defaultValue;
14421
- let [selectedValue, setSelected] = ($458b0a5536c1a7cf$export$40bfa8c7b0832715)(props.value, (_props_defaultValue = props.defaultValue) !== null && _props_defaultValue !== undefined ? _props_defaultValue : null, props.onChange);
14488
+ let [selectedValue, setSelected] = ($458b0a5536c1a7cf$export$40bfa8c7b0832715)(props.value, (_props_defaultValue = props.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : null, props.onChange);
14422
14489
  let [initialValue] = ($dbSRa$react.useState)(selectedValue);
14423
14490
  let [lastFocusedValue, setLastFocusedValue] = ($dbSRa$react.useState)(null);
14424
14491
  let validation = ($e5be200c675c3b3a$export$fc1a364ae1f3ff10)({
@@ -14437,7 +14504,7 @@ function $a54cdc5c1942b639$export$bca9d026f8e704eb(props) {
14437
14504
  ...validation,
14438
14505
  name: name,
14439
14506
  selectedValue: selectedValue,
14440
- defaultSelectedValue: props.value !== undefined ? initialValue : (_props_defaultValue1 = props.defaultValue) !== null && _props_defaultValue1 !== undefined ? _props_defaultValue1 : null,
14507
+ defaultSelectedValue: props.value !== undefined ? initialValue : (_props_defaultValue1 = props.defaultValue) !== null && _props_defaultValue1 !== void 0 ? _props_defaultValue1 : null,
14441
14508
  setSelectedValue: setSelectedValue,
14442
14509
  lastFocusedValue: lastFocusedValue,
14443
14510
  setLastFocusedValue: setLastFocusedValue,
@@ -14470,7 +14537,7 @@ function $2bc3a590c5373a4e$export$5159ec8b34d4ec12(props) {
14470
14537
  let [focusStrategy, setFocusStrategy] = ($dbSRa$react.useState)(null);
14471
14538
  let defaultValue = ($dbSRa$react.useMemo)(()=>{
14472
14539
  var _props_defaultSelectedKey;
14473
- return props.defaultValue !== undefined ? props.defaultValue : selectionMode === 'single' ? (_props_defaultSelectedKey = props.defaultSelectedKey) !== null && _props_defaultSelectedKey !== undefined ? _props_defaultSelectedKey : null : [];
14540
+ return props.defaultValue !== undefined ? props.defaultValue : selectionMode === 'single' ? (_props_defaultSelectedKey = props.defaultSelectedKey) !== null && _props_defaultSelectedKey !== void 0 ? _props_defaultSelectedKey : null : [];
14474
14541
  }, [
14475
14542
  props.defaultValue,
14476
14543
  props.defaultSelectedKey,
@@ -14490,9 +14557,9 @@ function $2bc3a590c5373a4e$export$5159ec8b34d4ec12(props) {
14490
14557
  if (selectionMode === 'single') {
14491
14558
  var _props_onSelectionChange;
14492
14559
  var _value_;
14493
- let key = Array.isArray(value) ? (_value_ = value[0]) !== null && _value_ !== undefined ? _value_ : null : value;
14560
+ let key = Array.isArray(value) ? (_value_ = value[0]) !== null && _value_ !== void 0 ? _value_ : null : value;
14494
14561
  setControlledValue(key);
14495
- if (key !== displayValue) (_props_onSelectionChange = props.onSelectionChange) === null || _props_onSelectionChange === undefined ? undefined : _props_onSelectionChange.call(props, key);
14562
+ if (key !== displayValue) (_props_onSelectionChange = props.onSelectionChange) === null || _props_onSelectionChange === void 0 ? void 0 : _props_onSelectionChange.call(props, key);
14496
14563
  } else {
14497
14564
  let keys = [];
14498
14565
  if (Array.isArray(value)) keys = value;
@@ -14515,7 +14582,7 @@ function $2bc3a590c5373a4e$export$5159ec8b34d4ec12(props) {
14515
14582
  if (keys === 'all') return;
14516
14583
  if (selectionMode === 'single') {
14517
14584
  var _keys_values_next_value;
14518
- let key = (_keys_values_next_value = keys.values().next().value) !== null && _keys_values_next_value !== undefined ? _keys_values_next_value : null;
14585
+ let key = (_keys_values_next_value = keys.values().next().value) !== null && _keys_values_next_value !== void 0 ? _keys_values_next_value : null;
14519
14586
  setValue(key);
14520
14587
  triggerState.close();
14521
14588
  } else setValue([
@@ -14545,23 +14612,23 @@ function $2bc3a590c5373a4e$export$5159ec8b34d4ec12(props) {
14545
14612
  ...listState,
14546
14613
  ...triggerState,
14547
14614
  value: displayValue,
14548
- defaultValue: defaultValue !== null && defaultValue !== undefined ? defaultValue : initialValue,
14615
+ defaultValue: defaultValue !== null && defaultValue !== void 0 ? defaultValue : initialValue,
14549
14616
  setValue: setValue,
14550
14617
  selectedKey: selectedKey,
14551
14618
  setSelectedKey: setValue,
14552
- selectedItem: (_selectedItems_ = selectedItems[0]) !== null && _selectedItems_ !== undefined ? _selectedItems_ : null,
14619
+ selectedItem: (_selectedItems_ = selectedItems[0]) !== null && _selectedItems_ !== void 0 ? _selectedItems_ : null,
14553
14620
  selectedItems: selectedItems,
14554
- defaultSelectedKey: (_props_defaultSelectedKey = props.defaultSelectedKey) !== null && _props_defaultSelectedKey !== undefined ? _props_defaultSelectedKey : props.selectionMode === 'single' ? initialValue : null,
14621
+ defaultSelectedKey: (_props_defaultSelectedKey = props.defaultSelectedKey) !== null && _props_defaultSelectedKey !== void 0 ? _props_defaultSelectedKey : props.selectionMode === 'single' ? initialValue : null,
14555
14622
  focusStrategy: focusStrategy,
14556
14623
  open (focusStrategy = null) {
14557
14624
  // Don't open if the collection is empty.
14558
- if (listState.collection.size !== 0) {
14625
+ if (listState.collection.size !== 0 || props.allowsEmptyCollection) {
14559
14626
  setFocusStrategy(focusStrategy);
14560
14627
  triggerState.open();
14561
14628
  }
14562
14629
  },
14563
14630
  toggle (focusStrategy = null) {
14564
- if (listState.collection.size !== 0) {
14631
+ if (listState.collection.size !== 0 || props.allowsEmptyCollection) {
14565
14632
  setFocusStrategy(focusStrategy);
14566
14633
  triggerState.toggle();
14567
14634
  }
@@ -14701,7 +14768,7 @@ function $8796f90736e175cb$export$4d40659c25ecb50b(props = {}) {
14701
14768
  const $ee014567cb39d3f0$export$ff05c3ac10437e03 = /*#__PURE__*/ ($dbSRa$react.createContext)(null);
14702
14769
  const $ee014567cb39d3f0$export$f551688fc98f2e09 = /*#__PURE__*/ ($dbSRa$react.forwardRef)(function FieldError(props, ref) {
14703
14770
  let validation = ($dbSRa$react.useContext)($ee014567cb39d3f0$export$ff05c3ac10437e03);
14704
- if (!(validation === null || validation === undefined ? undefined : validation.isInvalid)) return null;
14771
+ if (!(validation === null || validation === void 0 ? void 0 : validation.isInvalid)) return null;
14705
14772
  return /*#__PURE__*/ ($dbSRa$react).createElement($ee014567cb39d3f0$var$FieldErrorInner, {
14706
14773
  ...props,
14707
14774
  ref: ref
@@ -14755,7 +14822,7 @@ const $d3e0e05bdfcf66bd$export$a7fed597f4b8afd8 = /*#__PURE__*/ ($dbSRa$react.fo
14755
14822
  validationBehavior: validationBehavior
14756
14823
  }
14757
14824
  }, /*#__PURE__*/ ($dbSRa$react).createElement(($e5be200c675c3b3a$export$571b5131b7e65c11).Provider, {
14758
- value: validationErrors !== null && validationErrors !== undefined ? validationErrors : {}
14825
+ value: validationErrors !== null && validationErrors !== void 0 ? validationErrors : {}
14759
14826
  }, children)));
14760
14827
  });
14761
14828
 
@@ -14785,7 +14852,7 @@ const $bc237834342dbd75$export$4aa08d5625cb8ead = /*#__PURE__*/ ($dbSRa$react.fo
14785
14852
  [props, ref] = ($64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $bc237834342dbd75$export$baf37c4be89255b8);
14786
14853
  let { validationBehavior: formValidationBehavior } = ($64fa3d84918910a7$export$fabf2dc03a41866e)(($d3e0e05bdfcf66bd$export$c24727297075ec6a)) || {};
14787
14854
  var _props_validationBehavior, _ref;
14788
- let validationBehavior = (_ref = (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== undefined ? _props_validationBehavior : formValidationBehavior) !== null && _ref !== undefined ? _ref : 'native';
14855
+ let validationBehavior = (_ref = (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== void 0 ? _props_validationBehavior : formValidationBehavior) !== null && _ref !== void 0 ? _ref : 'native';
14789
14856
  let state = ($587d3ad58be6d31f$export$daff6da51032a415)({
14790
14857
  ...props,
14791
14858
  validationBehavior: validationBehavior
@@ -14853,7 +14920,7 @@ const $bc237834342dbd75$export$48513f6b9f8ce62d = /*#__PURE__*/ ($dbSRa$react.fo
14853
14920
  [props, ref] = ($64fa3d84918910a7$export$29f1550f4b0d4415)(otherProps, ref, ($4e85f108e88277b8$export$b085522c77523c51));
14854
14921
  let { validationBehavior: formValidationBehavior } = ($64fa3d84918910a7$export$fabf2dc03a41866e)(($d3e0e05bdfcf66bd$export$c24727297075ec6a)) || {};
14855
14922
  var _props_validationBehavior, _ref;
14856
- let validationBehavior = (_ref = (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== undefined ? _props_validationBehavior : formValidationBehavior) !== null && _ref !== undefined ? _ref : 'native';
14923
+ let validationBehavior = (_ref = (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== void 0 ? _props_validationBehavior : formValidationBehavior) !== null && _ref !== void 0 ? _ref : 'native';
14857
14924
  let groupState = ($dbSRa$react.useContext)($bc237834342dbd75$export$139c5b8563afc1fc);
14858
14925
  let inputRef = ($df56164dff5785e2$export$4338b53315abf666)(($dbSRa$react.useMemo)(()=>($5dc95899b306f630$export$c9058316764c140e)(userProvidedInputRef, props.inputRef !== undefined ? props.inputRef : null), [
14859
14926
  userProvidedInputRef,
@@ -14958,7 +15025,10 @@ let $3985021b0ad6602f$var$filterHoverProps = (props)=>{
14958
15025
  };
14959
15026
  const $3985021b0ad6602f$export$f5b8910cec6cf069 = /*#__PURE__*/ ($f39a9eba43920ace$export$86427a43e3e48ebb)(function Input(props, ref) {
14960
15027
  [props, ref] = ($64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $3985021b0ad6602f$export$37fb8590cf2c088c);
14961
- let { hoverProps: hoverProps, isHovered: isHovered } = ($6179b936705e76d3$export$ae780daf29e6d456)(props);
15028
+ let { hoverProps: hoverProps, isHovered: isHovered } = ($6179b936705e76d3$export$ae780daf29e6d456)({
15029
+ ...props,
15030
+ isDisabled: props.disabled
15031
+ });
14962
15032
  let { isFocused: isFocused, isFocusVisible: isFocusVisible, focusProps: focusProps } = ($f7dceffc5ad7768b$export$4e328f61c538687f)({
14963
15033
  isTextInput: true,
14964
15034
  autoFocus: props.autoFocus
@@ -15350,28 +15420,28 @@ const $612b8eb6cb90e02d$export$62ed72bc21f6b8a6 = /*#__PURE__*/ ($dbSRa$react.fo
15350
15420
  });
15351
15421
  function $612b8eb6cb90e02d$export$971707d8a129a1f7(dragAndDropHooks, dropState) {
15352
15422
  var _dragAndDropHooks_isVirtualDragging;
15353
- let renderDropIndicator = dragAndDropHooks === null || dragAndDropHooks === undefined ? undefined : dragAndDropHooks.renderDropIndicator;
15354
- let isVirtualDragging = dragAndDropHooks === null || dragAndDropHooks === undefined ? undefined : (_dragAndDropHooks_isVirtualDragging = dragAndDropHooks.isVirtualDragging) === null || _dragAndDropHooks_isVirtualDragging === undefined ? undefined : _dragAndDropHooks_isVirtualDragging.call(dragAndDropHooks);
15423
+ let renderDropIndicator = dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.renderDropIndicator;
15424
+ let isVirtualDragging = dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : (_dragAndDropHooks_isVirtualDragging = dragAndDropHooks.isVirtualDragging) === null || _dragAndDropHooks_isVirtualDragging === void 0 ? void 0 : _dragAndDropHooks_isVirtualDragging.call(dragAndDropHooks);
15355
15425
  let fn = ($dbSRa$react.useCallback)((target)=>{
15356
15426
  // Only show drop indicators when virtual dragging or this is the current drop target.
15357
- if (isVirtualDragging || (dropState === null || dropState === undefined ? undefined : dropState.isDropTarget(target))) return renderDropIndicator ? renderDropIndicator(target) : /*#__PURE__*/ ($dbSRa$react).createElement($612b8eb6cb90e02d$export$62ed72bc21f6b8a6, {
15427
+ if (isVirtualDragging || (dropState === null || dropState === void 0 ? void 0 : dropState.isDropTarget(target))) return renderDropIndicator ? renderDropIndicator(target) : /*#__PURE__*/ ($dbSRa$react).createElement($612b8eb6cb90e02d$export$62ed72bc21f6b8a6, {
15358
15428
  target: target
15359
15429
  });
15360
15430
  // We invalidate whenever the target changes.
15361
15431
  // eslint-disable-next-line react-hooks/exhaustive-deps
15362
15432
  }, [
15363
- dropState === null || dropState === undefined ? undefined : dropState.target,
15433
+ dropState === null || dropState === void 0 ? void 0 : dropState.target,
15364
15434
  isVirtualDragging,
15365
15435
  renderDropIndicator
15366
15436
  ]);
15367
- return (dragAndDropHooks === null || dragAndDropHooks === undefined ? undefined : dragAndDropHooks.useDropIndicator) ? fn : undefined;
15437
+ return (dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDropIndicator) ? fn : undefined;
15368
15438
  }
15369
15439
  function $612b8eb6cb90e02d$export$d1e8e3fbb7461f6(selectionManager, dragAndDropHooks, dropState) {
15370
15440
  var _dragAndDropHooks_isVirtualDragging, _dropState_target;
15371
15441
  // Persist the focused key and the drop target key.
15372
15442
  let focusedKey = selectionManager.focusedKey;
15373
15443
  let dropTargetKey = null;
15374
- if ((dragAndDropHooks === null || dragAndDropHooks === undefined ? undefined : (_dragAndDropHooks_isVirtualDragging = dragAndDropHooks.isVirtualDragging) === null || _dragAndDropHooks_isVirtualDragging === undefined ? undefined : _dragAndDropHooks_isVirtualDragging.call(dragAndDropHooks)) && (dropState === null || dropState === undefined ? undefined : (_dropState_target = dropState.target) === null || _dropState_target === undefined ? undefined : _dropState_target.type) === 'item') {
15444
+ if ((dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : (_dragAndDropHooks_isVirtualDragging = dragAndDropHooks.isVirtualDragging) === null || _dragAndDropHooks_isVirtualDragging === void 0 ? void 0 : _dragAndDropHooks_isVirtualDragging.call(dragAndDropHooks)) && (dropState === null || dropState === void 0 ? void 0 : (_dropState_target = dropState.target) === null || _dropState_target === void 0 ? void 0 : _dropState_target.type) === 'item') {
15375
15445
  dropTargetKey = dropState.target.key;
15376
15446
  if (dropState.target.dropPosition === 'after') {
15377
15447
  // Normalize to the "before" drop position since we only render those to the DOM.
@@ -15380,7 +15450,7 @@ function $612b8eb6cb90e02d$export$d1e8e3fbb7461f6(selectionManager, dragAndDropH
15380
15450
  if (nextKey != null) {
15381
15451
  var _dropState_collection_getItem;
15382
15452
  var _dropState_collection_getItem_level;
15383
- let targetLevel = (_dropState_collection_getItem_level = (_dropState_collection_getItem = dropState.collection.getItem(dropTargetKey)) === null || _dropState_collection_getItem === undefined ? undefined : _dropState_collection_getItem.level) !== null && _dropState_collection_getItem_level !== undefined ? _dropState_collection_getItem_level : 0;
15453
+ let targetLevel = (_dropState_collection_getItem_level = (_dropState_collection_getItem = dropState.collection.getItem(dropTargetKey)) === null || _dropState_collection_getItem === void 0 ? void 0 : _dropState_collection_getItem.level) !== null && _dropState_collection_getItem_level !== void 0 ? _dropState_collection_getItem_level : 0;
15384
15454
  // Skip over any rows that are descendants of the target ("after" position should be after all children)
15385
15455
  while(nextKey){
15386
15456
  let node = dropState.collection.getItem(nextKey);
@@ -15395,14 +15465,14 @@ function $612b8eb6cb90e02d$export$d1e8e3fbb7461f6(selectionManager, dragAndDropH
15395
15465
  var _node_level;
15396
15466
  // Stop once we find an item at the same level or higher
15397
15467
  // eslint-disable-next-line max-depth
15398
- if (((_node_level = node.level) !== null && _node_level !== undefined ? _node_level : 0) <= targetLevel) break;
15468
+ if (((_node_level = node.level) !== null && _node_level !== void 0 ? _node_level : 0) <= targetLevel) break;
15399
15469
  lastDescendantKey = nextKey;
15400
15470
  nextKey = dropState.collection.getKeyAfter(nextKey);
15401
15471
  }
15402
15472
  }
15403
15473
  var _ref;
15404
15474
  // If nextKey is null (end of collection), use the last descendant
15405
- dropTargetKey = (_ref = nextKey !== null && nextKey !== undefined ? nextKey : lastDescendantKey) !== null && _ref !== undefined ? _ref : dropTargetKey;
15475
+ dropTargetKey = (_ref = nextKey !== null && nextKey !== void 0 ? nextKey : lastDescendantKey) !== null && _ref !== void 0 ? _ref : dropTargetKey;
15406
15476
  }
15407
15477
  }
15408
15478
  return ($dbSRa$react.useMemo)(()=>{
@@ -15578,8 +15648,8 @@ function $eed445e0843c11d0$var$ListBoxInner({ state: inputState, props: props, l
15578
15648
  let { dragAndDropHooks: dragAndDropHooks, layout: layout = 'stack', orientation: orientation = 'vertical', filter: filter } = props;
15579
15649
  let state = ($e72dd72e1c76a225$export$ba9d38c0f1bf2b36)(inputState, filter);
15580
15650
  let { collection: collection, selectionManager: selectionManager } = state;
15581
- let isListDraggable = !!(dragAndDropHooks === null || dragAndDropHooks === undefined ? undefined : dragAndDropHooks.useDraggableCollectionState);
15582
- let isListDroppable = !!(dragAndDropHooks === null || dragAndDropHooks === undefined ? undefined : dragAndDropHooks.useDroppableCollectionState);
15651
+ let isListDraggable = !!(dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDraggableCollectionState);
15652
+ let isListDroppable = !!(dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDroppableCollectionState);
15583
15653
  let { direction: direction } = ($18f2051aff69b9bf$export$43bb16f9c6d9e3f7)();
15584
15654
  let { disabledBehavior: disabledBehavior, disabledKeys: disabledKeys } = selectionManager;
15585
15655
  let collator = ($325a3faab7a68acd$export$a16aca283550c30d)({
@@ -15689,7 +15759,7 @@ function $eed445e0843c11d0$var$ListBoxInner({ state: inputState, props: props, l
15689
15759
  global: true
15690
15760
  });
15691
15761
  return /*#__PURE__*/ ($dbSRa$react).createElement(($9bf71ea28793e738$export$20e40289641fbbb6), null, /*#__PURE__*/ ($dbSRa$react).createElement("div", {
15692
- ...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, listBoxProps, focusProps, droppableCollection === null || droppableCollection === undefined ? undefined : droppableCollection.collectionProps),
15762
+ ...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, listBoxProps, focusProps, droppableCollection === null || droppableCollection === void 0 ? void 0 : droppableCollection.collectionProps),
15693
15763
  ref: listBoxRef,
15694
15764
  slot: props.slot || undefined,
15695
15765
  onScroll: props.onScroll,
@@ -15752,7 +15822,7 @@ function $eed445e0843c11d0$var$ListBoxSectionInner(props, ref, section, classNam
15752
15822
  var _props_arialabel;
15753
15823
  let { headingProps: headingProps, groupProps: groupProps } = ($af383d3bef1cfdc9$export$c3f9f39876e4bc7)({
15754
15824
  heading: heading,
15755
- 'aria-label': (_props_arialabel = props['aria-label']) !== null && _props_arialabel !== undefined ? _props_arialabel : undefined
15825
+ 'aria-label': (_props_arialabel = props['aria-label']) !== null && _props_arialabel !== void 0 ? _props_arialabel : undefined
15756
15826
  });
15757
15827
  let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
15758
15828
  defaultClassName: className,
@@ -15785,7 +15855,7 @@ const $eed445e0843c11d0$export$a11e76429ed99b4 = /*#__PURE__*/ ($e1995378a142960
15785
15855
  let { dragAndDropHooks: dragAndDropHooks, dragState: dragState, dropState: dropState } = ($dbSRa$react.useContext)(($612b8eb6cb90e02d$export$d188a835a7bc5783));
15786
15856
  let { optionProps: optionProps, labelProps: labelProps, descriptionProps: descriptionProps, ...states } = ($293f70390ea03370$export$497855f14858aa34)({
15787
15857
  key: item.key,
15788
- 'aria-label': props === null || props === undefined ? undefined : props['aria-label']
15858
+ 'aria-label': props === null || props === void 0 ? void 0 : props['aria-label']
15789
15859
  }, state, ref);
15790
15860
  let { hoverProps: hoverProps, isHovered: isHovered } = ($6179b936705e76d3$export$ae780daf29e6d456)({
15791
15861
  isDisabled: !states.allowsSelection && !states.hasAction,
@@ -15793,9 +15863,11 @@ const $eed445e0843c11d0$export$a11e76429ed99b4 = /*#__PURE__*/ ($e1995378a142960
15793
15863
  onHoverChange: item.props.onHoverChange,
15794
15864
  onHoverEnd: item.props.onHoverEnd
15795
15865
  });
15866
+ let { focusProps: focusProps } = ($a1ea59d68270f0dd$export$f8168d8dd8fd66e6)(props);
15796
15867
  let draggableItem = null;
15797
15868
  if (dragState && dragAndDropHooks) draggableItem = dragAndDropHooks.useDraggableItem({
15798
- key: item.key
15869
+ key: item.key,
15870
+ hasAction: states.hasAction
15799
15871
  }, dragState);
15800
15872
  let droppableItem = null;
15801
15873
  if (dropState && dragAndDropHooks) droppableItem = dragAndDropHooks.useDroppableItem({
@@ -15818,7 +15890,7 @@ const $eed445e0843c11d0$export$a11e76429ed99b4 = /*#__PURE__*/ ($e1995378a142960
15818
15890
  selectionBehavior: state.selectionManager.selectionBehavior,
15819
15891
  allowsDragging: !!dragState,
15820
15892
  isDragging: isDragging,
15821
- isDropTarget: droppableItem === null || droppableItem === undefined ? undefined : droppableItem.isDropTarget
15893
+ isDropTarget: droppableItem === null || droppableItem === void 0 ? void 0 : droppableItem.isDropTarget
15822
15894
  }
15823
15895
  });
15824
15896
  ($dbSRa$react.useEffect)(()=>{
@@ -15832,8 +15904,9 @@ const $eed445e0843c11d0$export$a11e76429ed99b4 = /*#__PURE__*/ ($e1995378a142960
15832
15904
  });
15833
15905
  delete DOMProps.id;
15834
15906
  delete DOMProps.onClick;
15907
+ if (ElementType === 'a' && optionProps.tabIndex == null) optionProps.tabIndex = -1;
15835
15908
  return /*#__PURE__*/ ($dbSRa$react).createElement(ElementType, {
15836
- ...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, optionProps, hoverProps, draggableItem === null || draggableItem === undefined ? undefined : draggableItem.dragProps, droppableItem === null || droppableItem === undefined ? undefined : droppableItem.dropProps),
15909
+ ...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, optionProps, hoverProps, focusProps, draggableItem === null || draggableItem === void 0 ? void 0 : draggableItem.dragProps, droppableItem === null || droppableItem === void 0 ? void 0 : droppableItem.dropProps),
15837
15910
  ref: ref,
15838
15911
  "data-allows-dragging": !!dragState || undefined,
15839
15912
  "data-selected": states.isSelected || undefined,
@@ -15843,7 +15916,7 @@ const $eed445e0843c11d0$export$a11e76429ed99b4 = /*#__PURE__*/ ($e1995378a142960
15843
15916
  "data-focus-visible": states.isFocusVisible || undefined,
15844
15917
  "data-pressed": states.isPressed || undefined,
15845
15918
  "data-dragging": isDragging || undefined,
15846
- "data-drop-target": (droppableItem === null || droppableItem === undefined ? undefined : droppableItem.isDropTarget) || undefined,
15919
+ "data-drop-target": (droppableItem === null || droppableItem === void 0 ? void 0 : droppableItem.isDropTarget) || undefined,
15847
15920
  "data-selection-mode": state.selectionManager.selectionMode === 'none' ? undefined : state.selectionManager.selectionMode
15848
15921
  }, /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$2881499e37b75b9a), {
15849
15922
  values: [
@@ -15903,13 +15976,13 @@ const $eed445e0843c11d0$var$ListBoxDropIndicatorForwardRef = /*#__PURE__*/ ($dbS
15903
15976
  let sentinelRef = ($dbSRa$react.useRef)(null);
15904
15977
  let memoedLoadMoreProps = ($dbSRa$react.useMemo)(()=>({
15905
15978
  onLoadMore: onLoadMore,
15906
- collection: state === null || state === undefined ? undefined : state.collection,
15979
+ collection: state === null || state === void 0 ? void 0 : state.collection,
15907
15980
  sentinelRef: sentinelRef,
15908
15981
  scrollOffset: scrollOffset
15909
15982
  }), [
15910
15983
  onLoadMore,
15911
15984
  scrollOffset,
15912
- state === null || state === undefined ? undefined : state.collection
15985
+ state === null || state === void 0 ? void 0 : state.collection
15913
15986
  ]);
15914
15987
  ($a5fa973c1850dd36$export$ccaea96c28e8b9e7)(memoedLoadMoreProps, sentinelRef);
15915
15988
  let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
@@ -16059,7 +16132,7 @@ function $07b14b47974efb58$var$PopoverInner({ state: state, isExiting: isExiting
16059
16132
  var _props_offset;
16060
16133
  let { popoverProps: popoverProps, underlayProps: underlayProps, arrowProps: arrowProps, placement: placement, triggerAnchorPoint: triggerAnchorPoint } = ($f2f8a6077418541e$export$542a6fd13ac93354)({
16061
16134
  ...props,
16062
- offset: (_props_offset = props.offset) !== null && _props_offset !== undefined ? _props_offset : 8,
16135
+ offset: (_props_offset = props.offset) !== null && _props_offset !== void 0 ? _props_offset : 8,
16063
16136
  arrowRef: arrowRef,
16064
16137
  // If this is a submenu/subdialog, use the root popover's container
16065
16138
  // to detect outside interaction and add aria-hidden.
@@ -16166,7 +16239,7 @@ function $07b14b47974efb58$var$PopoverInner({ state: state, isExiting: isExiting
16166
16239
  ...props,
16167
16240
  shouldContainFocus: isDialog,
16168
16241
  isExiting: isExiting,
16169
- portalContainer: (_ref = UNSTABLE_portalContainer !== null && UNSTABLE_portalContainer !== undefined ? UNSTABLE_portalContainer : groupCtx === null || groupCtx === undefined ? undefined : groupCtx.current) !== null && _ref !== undefined ? _ref : undefined
16242
+ portalContainer: (_ref = UNSTABLE_portalContainer !== null && UNSTABLE_portalContainer !== void 0 ? UNSTABLE_portalContainer : groupCtx === null || groupCtx === void 0 ? void 0 : groupCtx.current) !== null && _ref !== void 0 ? _ref : undefined
16170
16243
  }, overlay);
16171
16244
  }
16172
16245
 
@@ -16285,7 +16358,7 @@ const $de32f1b87079253c$export$3ddf2d174ce01153 = /*#__PURE__*/ ($dbSRa$react.fo
16285
16358
  style: props.style,
16286
16359
  children: props.children,
16287
16360
  values: {
16288
- close: (state === null || state === undefined ? undefined : state.close) || (()=>{})
16361
+ close: (state === null || state === void 0 ? void 0 : state.close) || (()=>{})
16289
16362
  }
16290
16363
  });
16291
16364
  let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
@@ -16315,7 +16388,7 @@ const $de32f1b87079253c$export$3ddf2d174ce01153 = /*#__PURE__*/ ($dbSRa$react.fo
16315
16388
  slots: {
16316
16389
  [($64fa3d84918910a7$export$c62b8e45d58ddad9)]: {},
16317
16390
  close: {
16318
- onPress: ()=>state === null || state === undefined ? undefined : state.close()
16391
+ onPress: ()=>state === null || state === void 0 ? void 0 : state.close()
16319
16392
  }
16320
16393
  }
16321
16394
  }
@@ -16381,11 +16454,11 @@ const $28f4fd908f0de97f$export$74a362b31437ec83 = /*#__PURE__*/ ($dbSRa$react.fo
16381
16454
  onExpandedChange (isExpanded) {
16382
16455
  var _props_onExpandedChange;
16383
16456
  if (groupState) groupState.toggleKey(id);
16384
- (_props_onExpandedChange = props.onExpandedChange) === null || _props_onExpandedChange === undefined ? undefined : _props_onExpandedChange.call(props, isExpanded);
16457
+ (_props_onExpandedChange = props.onExpandedChange) === null || _props_onExpandedChange === void 0 ? void 0 : _props_onExpandedChange.call(props, isExpanded);
16385
16458
  }
16386
16459
  });
16387
16460
  let panelRef = ($dbSRa$react).useRef(null);
16388
- let isDisabled = props.isDisabled || (groupState === null || groupState === undefined ? undefined : groupState.isDisabled) || false;
16461
+ let isDisabled = props.isDisabled || (groupState === null || groupState === void 0 ? void 0 : groupState.isDisabled) || false;
16389
16462
  let { buttonProps: buttonProps, panelProps: panelProps } = ($5e910fae8e128ead$export$6e3e27031a30522f)({
16390
16463
  ...props,
16391
16464
  isExpanded: isExpanded,
@@ -16453,7 +16526,8 @@ const $28f4fd908f0de97f$export$feabaa331e1d464c = /*#__PURE__*/ ($dbSRa$react.fo
16453
16526
  }
16454
16527
  });
16455
16528
  let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
16456
- global: true
16529
+ global: true,
16530
+ labelable: true
16457
16531
  });
16458
16532
  return /*#__PURE__*/ ($dbSRa$react).createElement("div", {
16459
16533
  ...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, panelProps, focusWithinProps),
@@ -16490,7 +16564,7 @@ const $5cb03073d3f54797$export$a8a3e93435678ff9 = /*#__PURE__*/ ($dbSRa$react.fo
16490
16564
  return /*#__PURE__*/ ($dbSRa$react).createElement(Element, {
16491
16565
  ...domProps,
16492
16566
  ref: ref,
16493
- className: className !== null && className !== undefined ? className : 'react-aria-Heading'
16567
+ className: className !== null && className !== void 0 ? className : 'react-aria-Heading'
16494
16568
  }, children);
16495
16569
  });
16496
16570
 
@@ -16692,7 +16766,7 @@ const $b6c3ddc6086f204d$export$a98f0dcb43a68a25 = /*#__PURE__*/ ($dbSRa$react.fo
16692
16766
  [props, ref] = ($64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $b6c3ddc6086f204d$export$a79eda4ff50e30b6);
16693
16767
  let { validationBehavior: formValidationBehavior } = ($64fa3d84918910a7$export$fabf2dc03a41866e)(($d3e0e05bdfcf66bd$export$c24727297075ec6a)) || {};
16694
16768
  var _props_validationBehavior, _ref;
16695
- let validationBehavior = (_ref = (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== undefined ? _props_validationBehavior : formValidationBehavior) !== null && _ref !== undefined ? _ref : 'native';
16769
+ let validationBehavior = (_ref = (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== void 0 ? _props_validationBehavior : formValidationBehavior) !== null && _ref !== void 0 ? _ref : 'native';
16696
16770
  let state = ($a54cdc5c1942b639$export$bca9d026f8e704eb)({
16697
16771
  ...props,
16698
16772
  validationBehavior: validationBehavior
@@ -16884,7 +16958,7 @@ const $82d7e5349645de74$var$CLEAR_CONTEXTS = [
16884
16958
  function $82d7e5349645de74$var$SelectInner({ props: props, selectRef: ref, collection: collection }) {
16885
16959
  let { validationBehavior: formValidationBehavior } = ($64fa3d84918910a7$export$fabf2dc03a41866e)(($d3e0e05bdfcf66bd$export$c24727297075ec6a)) || {};
16886
16960
  var _props_validationBehavior, _ref;
16887
- let validationBehavior = (_ref = (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== undefined ? _props_validationBehavior : formValidationBehavior) !== null && _ref !== undefined ? _ref : 'native';
16961
+ let validationBehavior = (_ref = (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== void 0 ? _props_validationBehavior : formValidationBehavior) !== null && _ref !== void 0 ? _ref : 'native';
16888
16962
  let state = ($2bc3a590c5373a4e$export$5159ec8b34d4ec12)({
16889
16963
  ...props,
16890
16964
  collection: collection,
@@ -17036,7 +17110,7 @@ const $82d7e5349645de74$export$e288731fd71264f0 = /*#__PURE__*/ ($f39a9eba43920a
17036
17110
  let { placeholder: placeholder } = ($64fa3d84918910a7$export$fabf2dc03a41866e)($82d7e5349645de74$export$7540cee5be7dc19b);
17037
17111
  let rendered = state.selectedItems.map((item)=>{
17038
17112
  var _item_props;
17039
- let rendered = (_item_props = item.props) === null || _item_props === undefined ? undefined : _item_props.children;
17113
+ let rendered = (_item_props = item.props) === null || _item_props === void 0 ? void 0 : _item_props.children;
17040
17114
  // If the selected item has a function as a child, we need to call it to render to React.JSX.
17041
17115
  if (typeof rendered === 'function') {
17042
17116
  let fn = rendered;
@@ -17054,13 +17128,13 @@ const $82d7e5349645de74$export$e288731fd71264f0 = /*#__PURE__*/ ($f39a9eba43920a
17054
17128
  return rendered;
17055
17129
  });
17056
17130
  let formatter = ($33bf17300c498528$export$a2f47a3d2973640)();
17057
- let textValue = ($dbSRa$react.useMemo)(()=>state.selectedItems.map((item)=>item === null || item === undefined ? undefined : item.textValue), [
17131
+ let textValue = ($dbSRa$react.useMemo)(()=>state.selectedItems.map((item)=>item === null || item === void 0 ? void 0 : item.textValue), [
17058
17132
  state.selectedItems
17059
17133
  ]);
17060
17134
  let selectionMode = state.selectionManager.selectionMode;
17061
17135
  let selectedText = ($dbSRa$react.useMemo)(()=>{
17062
17136
  var _textValue_;
17063
- return selectionMode === 'single' ? (_textValue_ = textValue[0]) !== null && _textValue_ !== undefined ? _textValue_ : '' : formatter.format(textValue);
17137
+ return selectionMode === 'single' ? (_textValue_ = textValue[0]) !== null && _textValue_ !== void 0 ? _textValue_ : '' : formatter.format(textValue);
17064
17138
  }, [
17065
17139
  selectionMode,
17066
17140
  formatter,
@@ -17087,13 +17161,13 @@ const $82d7e5349645de74$export$e288731fd71264f0 = /*#__PURE__*/ ($f39a9eba43920a
17087
17161
  var _ref, _state_selectedItems__value;
17088
17162
  let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
17089
17163
  ...props,
17090
- defaultChildren: (_ref = defaultChildren !== null && defaultChildren !== undefined ? defaultChildren : placeholder) !== null && _ref !== undefined ? _ref : stringFormatter.format('selectPlaceholder'),
17164
+ defaultChildren: (_ref = defaultChildren !== null && defaultChildren !== void 0 ? defaultChildren : placeholder) !== null && _ref !== void 0 ? _ref : stringFormatter.format('selectPlaceholder'),
17091
17165
  defaultClassName: 'react-aria-SelectValue',
17092
17166
  values: {
17093
- selectedItem: (_state_selectedItems__value = (_state_selectedItems_ = state.selectedItems[0]) === null || _state_selectedItems_ === undefined ? undefined : _state_selectedItems_.value) !== null && _state_selectedItems__value !== undefined ? _state_selectedItems__value : null,
17167
+ selectedItem: (_state_selectedItems__value = (_state_selectedItems_ = state.selectedItems[0]) === null || _state_selectedItems_ === void 0 ? void 0 : _state_selectedItems_.value) !== null && _state_selectedItems__value !== void 0 ? _state_selectedItems__value : null,
17094
17168
  selectedItems: ($dbSRa$react.useMemo)(()=>state.selectedItems.map((item)=>{
17095
17169
  var _item_value;
17096
- return (_item_value = item.value) !== null && _item_value !== undefined ? _item_value : null;
17170
+ return (_item_value = item.value) !== null && _item_value !== void 0 ? _item_value : null;
17097
17171
  }), [
17098
17172
  state.selectedItems
17099
17173
  ]),
@@ -17256,7 +17330,7 @@ function $eaf9e70818b436db$var$TagGroupInner({ props: props, forwardedRef: ref,
17256
17330
  id: id,
17257
17331
  ref: ref,
17258
17332
  slot: props.slot || undefined,
17259
- className: (_props_className = props.className) !== null && _props_className !== undefined ? _props_className : 'react-aria-TagGroup',
17333
+ className: (_props_className = props.className) !== null && _props_className !== void 0 ? _props_className : 'react-aria-TagGroup',
17260
17334
  style: props.style
17261
17335
  }, /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$2881499e37b75b9a), {
17262
17336
  values: [
@@ -17473,7 +17547,7 @@ const $bcdf0525bf22703d$export$2c73285ae9390cec = /*#__PURE__*/ ($f39a9eba43920a
17473
17547
  [props, ref] = ($64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $bcdf0525bf22703d$export$2129e27b3ef0d483);
17474
17548
  let { validationBehavior: formValidationBehavior } = ($64fa3d84918910a7$export$fabf2dc03a41866e)(($d3e0e05bdfcf66bd$export$c24727297075ec6a)) || {};
17475
17549
  var _props_validationBehavior, _ref;
17476
- let validationBehavior = (_ref = (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== undefined ? _props_validationBehavior : formValidationBehavior) !== null && _ref !== undefined ? _ref : 'native';
17550
+ let validationBehavior = (_ref = (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== void 0 ? _props_validationBehavior : formValidationBehavior) !== null && _ref !== void 0 ? _ref : 'native';
17477
17551
  let inputRef = ($dbSRa$react.useRef)(null);
17478
17552
  [props, inputRef] = ($64fa3d84918910a7$export$29f1550f4b0d4415)(props, inputRef, ($4e85f108e88277b8$export$698f465ec27e93df));
17479
17553
  let [labelRef, label] = ($64fa3d84918910a7$export$9d4c57ee4c6ffdd8)(!props['aria-label'] && !props['aria-labelledby']);
@@ -17660,7 +17734,7 @@ function $4e3b923658d69c60$var$TooltipInner(props) {
17660
17734
  '--trigger-anchor-point': triggerAnchorPoint ? `${triggerAnchorPoint.x}px ${triggerAnchorPoint.y}px` : undefined,
17661
17735
  ...renderProps.style
17662
17736
  },
17663
- "data-placement": placement !== null && placement !== undefined ? placement : undefined,
17737
+ "data-placement": placement !== null && placement !== void 0 ? placement : undefined,
17664
17738
  "data-entering": isEntering || undefined,
17665
17739
  "data-exiting": props.isExiting || undefined
17666
17740
  }, /*#__PURE__*/ ($dbSRa$react).createElement(($44f671af83e7d9e0$export$2de4954e8ae13b9f).Provider, {
@@ -17907,7 +17981,12 @@ function Header({ children, logoLinkElement, logoImage = jsxRuntime.jsx(SvgBcLog
17907
17981
  function getLogo() {
17908
17982
  if (!logoLinkElement)
17909
17983
  return (jsxRuntime.jsx("a", { href: "/", title: "Government of British Columbia", children: logoImage }));
17910
- return $dbSRa$react.cloneElement(logoLinkElement, { children: logoImage });
17984
+ // The `<any>` type below is necessary to allow users to specify their own
17985
+ // link elements from any router library.
17986
+ // eslint-disable-next-line
17987
+ return $dbSRa$react.cloneElement(logoLinkElement, {
17988
+ children: logoImage,
17989
+ });
17911
17990
  }
17912
17991
  function getTitle() {
17913
17992
  switch (titleElement) {