@jobber/components 7.8.0 → 7.9.0

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 (64) hide show
  1. package/dist/Autocomplete/index.mjs +1 -1
  2. package/dist/Button/buttonRenderAdapter.d.ts +304 -0
  3. package/dist/Card/index.cjs +7 -4
  4. package/dist/Card/index.mjs +7 -4
  5. package/dist/Countdown/index.cjs +1 -1
  6. package/dist/Countdown/index.mjs +1 -1
  7. package/dist/Countdown-cjs.js +1 -1
  8. package/dist/Countdown-es.js +1 -1
  9. package/dist/DataDump/index.cjs +7 -4
  10. package/dist/DataDump/index.mjs +7 -4
  11. package/dist/DrawerRoot-cjs.js +2634 -2142
  12. package/dist/DrawerRoot-es.js +2523 -2065
  13. package/dist/InputAvatar/index.cjs +1 -1
  14. package/dist/InputAvatar/index.mjs +1 -1
  15. package/dist/InputFile/index.cjs +1 -1
  16. package/dist/InputFile/index.mjs +1 -1
  17. package/dist/InputFile-cjs.js +1 -1
  18. package/dist/InputFile-es.js +1 -1
  19. package/dist/InputNumber/index.cjs +2441 -186
  20. package/dist/InputNumber/index.mjs +2361 -106
  21. package/dist/Menu/Menu.Legacy.d.ts +3 -0
  22. package/dist/Menu/Menu.d.ts +66 -24
  23. package/dist/Menu/Menu.types.d.ts +8 -108
  24. package/dist/Menu/MenuBottomSheet.d.ts +29 -0
  25. package/dist/Menu/MenuDropdown.d.ts +29 -0
  26. package/dist/Menu/index.cjs +7 -4
  27. package/dist/Menu/index.mjs +7 -4
  28. package/dist/Menu/menuComposableShared.d.ts +27 -0
  29. package/dist/Menu/menuComposableTypes.d.ts +99 -0
  30. package/dist/Menu-cjs.js +828 -8419
  31. package/dist/Menu-es.js +823 -8414
  32. package/dist/MenuSubmenuTrigger-cjs.js +5283 -0
  33. package/dist/MenuSubmenuTrigger-es.js +5224 -0
  34. package/dist/Modal/index.mjs +1 -1
  35. package/dist/Page/index.cjs +6 -3
  36. package/dist/Page/index.mjs +6 -3
  37. package/dist/Page-cjs.js +1 -1
  38. package/dist/Page-es.js +1 -1
  39. package/dist/RecurringSelect/index.cjs +0 -1
  40. package/dist/RecurringSelect/index.mjs +0 -1
  41. package/dist/docs/Menu/Menu.md +7 -62
  42. package/dist/floating-ui.react-dom-es.js +1 -1
  43. package/dist/floating-ui.react-es.js +2 -2
  44. package/dist/index-cjs.js +1161 -166
  45. package/dist/index-es.js +1160 -166
  46. package/dist/index.cjs +7 -3
  47. package/dist/index.esm-es.js +1 -1
  48. package/dist/index.mjs +7 -3
  49. package/dist/primitives/BottomSheet/index.cjs +0 -1
  50. package/dist/primitives/BottomSheet/index.mjs +0 -1
  51. package/dist/primitives/index.cjs +0 -1
  52. package/dist/primitives/index.mjs +0 -1
  53. package/dist/styles.css +540 -31
  54. package/dist/unstyledPrimitives/index.cjs +6662 -8039
  55. package/dist/unstyledPrimitives/index.d.ts +2 -1
  56. package/dist/unstyledPrimitives/index.mjs +6733 -8111
  57. package/dist/useRenderElement-cjs.js +212 -212
  58. package/dist/useRenderElement-es.js +213 -213
  59. package/dist/utils/meta/meta.json +9 -0
  60. package/package.json +2 -2
  61. package/dist/Text-cjs2.js +0 -2484
  62. package/dist/Text-es2.js +0 -2417
  63. package/dist/index-cjs2.js +0 -1189
  64. package/dist/index-es2.js +0 -1186
@@ -1,6 +1,6 @@
1
- import React__default, { useEffect, useMemo, useCallback, useRef, useState, createContext, useContext, forwardRef, createRef, useImperativeHandle } from 'react';
1
+ import React__default, { useRef, useCallback, useState, useContext, useEffect, useMemo, createContext, forwardRef, createRef, useImperativeHandle } from 'react';
2
2
  import { _ as __rest } from '../tslib.es6-es.js';
3
- import { $ as $8ae05eaa5c114e9c$export$7f54fc3180508a52, a as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7, b as $e9faafb641e167db$export$90fc3a17d93f704c, c as $507fabe10e71c6fb$export$b9b3dfddab17db27, d as $507fabe10e71c6fb$export$ec71b4b83ac08ec3, e as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6, f as $9ab94262bd0047c7$export$420e68273165f4ec, g as $bdb11010cef70236$export$f680877a34711e37, h as $313b98861ee5dd6c$export$d6875122194c7b44, i as $bdb11010cef70236$export$b4cc09c592e8fdb8, j as $3ef42575df84b30b$export$9d1611c77c2fe928, k as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, l as $507fabe10e71c6fb$export$8397ddfc504fdb9a, m as $458b0a5536c1a7cf$export$40bfa8c7b0832715, n as $f645667febf57a63$export$4c014de7c8940b4c, o as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, p as $431fbd86ca7dc216$export$f21a1ffae260145a, q as $9446cca9a3875146$export$cb6e0bb50bc19463, r as $9446cca9a3875146$export$7d15b64cf5a3a4c4, s as $fca6afa0e843324b$export$f12b703ca79dfbb1, t as $03deb23ff14920c4$export$4eaf04e54aa8eed6, u as $c87311424ea30a05$export$186c6964ca17d99, v as $c87311424ea30a05$export$a11b0059900ceec8, w as $ff5963eb1fccf552$export$e08e3b67e392101e, x as $c87311424ea30a05$export$fedb369cb70207f1, y as $f39a9eba43920ace$export$86427a43e3e48ebb, z as $64fa3d84918910a7$export$29f1550f4b0d4415, A as $64fa3d84918910a7$export$4d86445c2cf5e3, B as $514c0188e459b4c0$export$5f1af8db9871e1d6, C as $6179b936705e76d3$export$ae780daf29e6d456, D as $64fa3d84918910a7$export$fabf2dc03a41866e, E as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, F as $64fa3d84918910a7$export$ef03459518577ad4, G as $64fa3d84918910a7$export$2881499e37b75b9a, H as $514c0188e459b4c0$export$9afb8bc826b033ea } from '../Text-es2.js';
3
+ import { c as clsx } from '../clsx-es.js';
4
4
  import classnames from 'classnames';
5
5
  import { I as Icon } from '../Icon-es.js';
6
6
  import { T as Text } from '../Text-es.js';
@@ -11,7 +11,6 @@ import '@jobber/hooks';
11
11
  import 'framer-motion';
12
12
  import '@jobber/design';
13
13
  import '../Button-es.js';
14
- import '../clsx-es.js';
15
14
  import '../Typography-es.js';
16
15
  import '../mergeRefs-es.js';
17
16
  import '../useFormFieldFocus-es.js';
@@ -19,6 +18,919 @@ import '../InputValidation-es.js';
19
18
  import '../Spinner-es.js';
20
19
  import 'react-router-dom';
21
20
 
21
+ /*
22
+ * Copyright 2020 Adobe. All rights reserved.
23
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
24
+ * you may not use this file except in compliance with the License. You may obtain a copy
25
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
26
+ *
27
+ * Unless required by applicable law or agreed to in writing, software distributed under
28
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
29
+ * OF ANY KIND, either express or implied. See the License for the specific language
30
+ * governing permissions and limitations under the License.
31
+ */
32
+ const $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document !== 'undefined' ? (React__default).useLayoutEffect : ()=>{};
33
+
34
+ /*
35
+ * Copyright 2023 Adobe. All rights reserved.
36
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
37
+ * you may not use this file except in compliance with the License. You may obtain a copy
38
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
39
+ *
40
+ * Unless required by applicable law or agreed to in writing, software distributed under
41
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
42
+ * OF ANY KIND, either express or implied. See the License for the specific language
43
+ * governing permissions and limitations under the License.
44
+ */
45
+
46
+ var $8ae05eaa5c114e9c$var$_React_useInsertionEffect;
47
+ // Use the earliest effect type possible. useInsertionEffect runs during the mutation phase,
48
+ // before all layout effects, but is available only in React 18 and later.
49
+ const $8ae05eaa5c114e9c$var$useEarlyEffect = ($8ae05eaa5c114e9c$var$_React_useInsertionEffect = (React__default)['useInsertionEffect']) !== null && $8ae05eaa5c114e9c$var$_React_useInsertionEffect !== void 0 ? $8ae05eaa5c114e9c$var$_React_useInsertionEffect : ($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c);
50
+ function $8ae05eaa5c114e9c$export$7f54fc3180508a52(fn) {
51
+ const ref = (useRef)(null);
52
+ $8ae05eaa5c114e9c$var$useEarlyEffect(()=>{
53
+ ref.current = fn;
54
+ }, [
55
+ fn
56
+ ]);
57
+ // @ts-ignore
58
+ return (useCallback)((...args)=>{
59
+ const f = ref.current;
60
+ return f === null || f === void 0 ? void 0 : f(...args);
61
+ }, []);
62
+ }
63
+
64
+ /*
65
+ * Copyright 2020 Adobe. All rights reserved.
66
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
67
+ * you may not use this file except in compliance with the License. You may obtain a copy
68
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
69
+ *
70
+ * Unless required by applicable law or agreed to in writing, software distributed under
71
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
72
+ * OF ANY KIND, either express or implied. See the License for the specific language
73
+ * governing permissions and limitations under the License.
74
+ */
75
+
76
+ function $1dbecbe27a04f9af$export$14d238f342723f25(defaultValue) {
77
+ let [value, setValue] = (useState)(defaultValue);
78
+ let effect = (useRef)(null);
79
+ // Store the function in a ref so we can always access the current version
80
+ // which has the proper `value` in scope.
81
+ let nextRef = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(()=>{
82
+ if (!effect.current) return;
83
+ // Run the generator to the next yield.
84
+ let newValue = effect.current.next();
85
+ // If the generator is done, reset the effect.
86
+ if (newValue.done) {
87
+ effect.current = null;
88
+ return;
89
+ }
90
+ // If the value is the same as the current value,
91
+ // then continue to the next yield. Otherwise,
92
+ // set the value in state and wait for the next layout effect.
93
+ if (value === newValue.value) nextRef();
94
+ else setValue(newValue.value);
95
+ });
96
+ ($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
97
+ // If there is an effect currently running, continue to the next yield.
98
+ if (effect.current) nextRef();
99
+ });
100
+ let queue = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)((fn)=>{
101
+ effect.current = fn(value);
102
+ nextRef();
103
+ });
104
+ return [
105
+ value,
106
+ queue
107
+ ];
108
+ }
109
+
110
+ /*
111
+ * Copyright 2020 Adobe. All rights reserved.
112
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
113
+ * you may not use this file except in compliance with the License. You may obtain a copy
114
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
115
+ *
116
+ * Unless required by applicable law or agreed to in writing, software distributed under
117
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
118
+ * OF ANY KIND, either express or implied. See the License for the specific language
119
+ * governing permissions and limitations under the License.
120
+ */ // We must avoid a circular dependency with @react-aria/utils, and this useLayoutEffect is
121
+ // guarded by a check that it only runs on the client side.
122
+ // eslint-disable-next-line rulesdir/useLayoutEffectRule
123
+
124
+ // Default context value to use in case there is no SSRProvider. This is fine for
125
+ // client-only apps. In order to support multiple copies of React Aria potentially
126
+ // being on the page at once, the prefix is set to a random number. SSRProvider
127
+ // will reset this to zero for consistency between server and client, so in the
128
+ // SSR case multiple copies of React Aria is not supported.
129
+ const $b5e257d569688ac6$var$defaultContext = {
130
+ prefix: String(Math.round(Math.random() * 10000000000)),
131
+ current: 0
132
+ };
133
+ const $b5e257d569688ac6$var$SSRContext = /*#__PURE__*/ (React__default).createContext($b5e257d569688ac6$var$defaultContext);
134
+ const $b5e257d569688ac6$var$IsSSRContext = /*#__PURE__*/ (React__default).createContext(false);
135
+ let $b5e257d569688ac6$var$canUseDOM = Boolean(typeof window !== 'undefined' && window.document && window.document.createElement);
136
+ let $b5e257d569688ac6$var$componentIds = new WeakMap();
137
+ function $b5e257d569688ac6$var$useCounter(isDisabled = false) {
138
+ let ctx = (useContext)($b5e257d569688ac6$var$SSRContext);
139
+ let ref = (useRef)(null);
140
+ // eslint-disable-next-line rulesdir/pure-render
141
+ if (ref.current === null && !isDisabled) {
142
+ var _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner, _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
143
+ // In strict mode, React renders components twice, and the ref will be reset to null on the second render.
144
+ // This means our id counter will be incremented twice instead of once. This is a problem because on the
145
+ // server, components are only rendered once and so ids generated on the server won't match the client.
146
+ // In React 18, useId was introduced to solve this, but it is not available in older versions. So to solve this
147
+ // we need to use some React internals to access the underlying Fiber instance, which is stable between renders.
148
+ // This is exposed as ReactCurrentOwner in development, which is all we need since StrictMode only runs in development.
149
+ // To ensure that we only increment the global counter once, we store the starting id for this component in
150
+ // a weak map associated with the Fiber. On the second render, we reset the global counter to this value.
151
+ // Since React runs the second render immediately after the first, this is safe.
152
+ // @ts-ignore
153
+ let currentOwner = (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = (React__default).__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;
154
+ if (currentOwner) {
155
+ let prevComponentValue = $b5e257d569688ac6$var$componentIds.get(currentOwner);
156
+ if (prevComponentValue == null) // On the first render, and first call to useId, store the id and state in our weak map.
157
+ $b5e257d569688ac6$var$componentIds.set(currentOwner, {
158
+ id: ctx.current,
159
+ state: currentOwner.memoizedState
160
+ });
161
+ else if (currentOwner.memoizedState !== prevComponentValue.state) {
162
+ // On the second render, the memoizedState gets reset by React.
163
+ // Reset the counter, and remove from the weak map so we don't
164
+ // do this for subsequent useId calls.
165
+ ctx.current = prevComponentValue.id;
166
+ $b5e257d569688ac6$var$componentIds.delete(currentOwner);
167
+ }
168
+ }
169
+ // eslint-disable-next-line rulesdir/pure-render
170
+ ref.current = ++ctx.current;
171
+ }
172
+ // eslint-disable-next-line rulesdir/pure-render
173
+ return ref.current;
174
+ }
175
+ function $b5e257d569688ac6$var$useLegacySSRSafeId(defaultId) {
176
+ let ctx = (useContext)($b5e257d569688ac6$var$SSRContext);
177
+ // If we are rendering in a non-DOM environment, and there's no SSRProvider,
178
+ // provide a warning to hint to the developer to add one.
179
+ if (ctx === $b5e257d569688ac6$var$defaultContext && !$b5e257d569688ac6$var$canUseDOM && process.env.NODE_ENV !== 'production') console.warn('When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.');
180
+ let counter = $b5e257d569688ac6$var$useCounter(!!defaultId);
181
+ let prefix = ctx === $b5e257d569688ac6$var$defaultContext && process.env.NODE_ENV === 'test' ? 'react-aria' : `react-aria${ctx.prefix}`;
182
+ return defaultId || `${prefix}-${counter}`;
183
+ }
184
+ function $b5e257d569688ac6$var$useModernSSRSafeId(defaultId) {
185
+ let id = (React__default).useId();
186
+ let [didSSR] = (useState)($b5e257d569688ac6$export$535bd6ca7f90a273());
187
+ let prefix = didSSR || process.env.NODE_ENV === 'test' ? 'react-aria' : `react-aria${$b5e257d569688ac6$var$defaultContext.prefix}`;
188
+ return defaultId || `${prefix}-${id}`;
189
+ }
190
+ const $b5e257d569688ac6$export$619500959fc48b26 = typeof (React__default)['useId'] === 'function' ? $b5e257d569688ac6$var$useModernSSRSafeId : $b5e257d569688ac6$var$useLegacySSRSafeId;
191
+ function $b5e257d569688ac6$var$getSnapshot() {
192
+ return false;
193
+ }
194
+ function $b5e257d569688ac6$var$getServerSnapshot() {
195
+ return true;
196
+ }
197
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
198
+ function $b5e257d569688ac6$var$subscribe(onStoreChange) {
199
+ // noop
200
+ return ()=>{};
201
+ }
202
+ function $b5e257d569688ac6$export$535bd6ca7f90a273() {
203
+ // In React 18, we can use useSyncExternalStore to detect if we're server rendering or hydrating.
204
+ if (typeof (React__default)['useSyncExternalStore'] === 'function') return (React__default)['useSyncExternalStore']($b5e257d569688ac6$var$subscribe, $b5e257d569688ac6$var$getSnapshot, $b5e257d569688ac6$var$getServerSnapshot);
205
+ // eslint-disable-next-line react-hooks/rules-of-hooks
206
+ return (useContext)($b5e257d569688ac6$var$IsSSRContext);
207
+ }
208
+
209
+ /*
210
+ * Copyright 2020 Adobe. All rights reserved.
211
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
212
+ * you may not use this file except in compliance with the License. You may obtain a copy
213
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
214
+ *
215
+ * Unless required by applicable law or agreed to in writing, software distributed under
216
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
217
+ * OF ANY KIND, either express or implied. See the License for the specific language
218
+ * governing permissions and limitations under the License.
219
+ */
220
+
221
+
222
+
223
+ // copied from SSRProvider.tsx to reduce exports, if needed again, consider sharing
224
+ let $bdb11010cef70236$var$canUseDOM = Boolean(typeof window !== 'undefined' && window.document && window.document.createElement);
225
+ let $bdb11010cef70236$export$d41a04c74483c6ef = new Map();
226
+ // This allows us to clean up the idsUpdaterMap when the id is no longer used.
227
+ // Map is a strong reference, so unused ids wouldn't be cleaned up otherwise.
228
+ // This can happen in suspended components where mount/unmount is not called.
229
+ let $bdb11010cef70236$var$registry;
230
+ if (typeof FinalizationRegistry !== 'undefined') $bdb11010cef70236$var$registry = new FinalizationRegistry((heldValue)=>{
231
+ $bdb11010cef70236$export$d41a04c74483c6ef.delete(heldValue);
232
+ });
233
+ function $bdb11010cef70236$export$f680877a34711e37(defaultId) {
234
+ let [value, setValue] = (useState)(defaultId);
235
+ let nextId = (useRef)(null);
236
+ let res = ($b5e257d569688ac6$export$619500959fc48b26)(value);
237
+ let cleanupRef = (useRef)(null);
238
+ if ($bdb11010cef70236$var$registry) $bdb11010cef70236$var$registry.register(cleanupRef, res);
239
+ if ($bdb11010cef70236$var$canUseDOM) {
240
+ const cacheIdRef = $bdb11010cef70236$export$d41a04c74483c6ef.get(res);
241
+ if (cacheIdRef && !cacheIdRef.includes(nextId)) cacheIdRef.push(nextId);
242
+ else $bdb11010cef70236$export$d41a04c74483c6ef.set(res, [
243
+ nextId
244
+ ]);
245
+ }
246
+ ($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
247
+ let r = res;
248
+ return ()=>{
249
+ // In Suspense, the cleanup function may be not called
250
+ // when it is though, also remove it from the finalization registry.
251
+ if ($bdb11010cef70236$var$registry) $bdb11010cef70236$var$registry.unregister(cleanupRef);
252
+ $bdb11010cef70236$export$d41a04c74483c6ef.delete(r);
253
+ };
254
+ }, [
255
+ res
256
+ ]);
257
+ // This cannot cause an infinite loop because the ref is always cleaned up.
258
+ // eslint-disable-next-line
259
+ (useEffect)(()=>{
260
+ let newId = nextId.current;
261
+ if (newId) setValue(newId);
262
+ return ()=>{
263
+ if (newId) nextId.current = null;
264
+ };
265
+ });
266
+ return res;
267
+ }
268
+ function $bdb11010cef70236$export$cd8c9cb68f842629(idA, idB) {
269
+ if (idA === idB) return idA;
270
+ let setIdsA = $bdb11010cef70236$export$d41a04c74483c6ef.get(idA);
271
+ if (setIdsA) {
272
+ setIdsA.forEach((ref)=>ref.current = idB);
273
+ return idB;
274
+ }
275
+ let setIdsB = $bdb11010cef70236$export$d41a04c74483c6ef.get(idB);
276
+ if (setIdsB) {
277
+ setIdsB.forEach((ref)=>ref.current = idA);
278
+ return idA;
279
+ }
280
+ return idB;
281
+ }
282
+ function $bdb11010cef70236$export$b4cc09c592e8fdb8(depArray = []) {
283
+ let id = $bdb11010cef70236$export$f680877a34711e37();
284
+ let [resolvedId, setResolvedId] = ($1dbecbe27a04f9af$export$14d238f342723f25)(id);
285
+ let updateId = (useCallback)(()=>{
286
+ setResolvedId(function*() {
287
+ yield id;
288
+ yield document.getElementById(id) ? id : undefined;
289
+ });
290
+ }, [
291
+ id,
292
+ setResolvedId
293
+ ]);
294
+ ($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(updateId, [
295
+ id,
296
+ updateId,
297
+ ...depArray
298
+ ]);
299
+ return resolvedId;
300
+ }
301
+
302
+ /*
303
+ * Copyright 2020 Adobe. All rights reserved.
304
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
305
+ * you may not use this file except in compliance with the License. You may obtain a copy
306
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
307
+ *
308
+ * Unless required by applicable law or agreed to in writing, software distributed under
309
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
310
+ * OF ANY KIND, either express or implied. See the License for the specific language
311
+ * governing permissions and limitations under the License.
312
+ */ /**
313
+ * Calls all functions in the order they were chained with the same arguments.
314
+ */ function $ff5963eb1fccf552$export$e08e3b67e392101e(...callbacks) {
315
+ return (...args)=>{
316
+ for (let callback of callbacks)if (typeof callback === 'function') callback(...args);
317
+ };
318
+ }
319
+
320
+ const $431fbd86ca7dc216$export$b204af158042fbac = (el)=>{
321
+ var _el_ownerDocument;
322
+ return (_el_ownerDocument = el === null || el === void 0 ? void 0 : el.ownerDocument) !== null && _el_ownerDocument !== void 0 ? _el_ownerDocument : document;
323
+ };
324
+ const $431fbd86ca7dc216$export$f21a1ffae260145a = (el)=>{
325
+ if (el && 'window' in el && el.window === el) return el;
326
+ const doc = $431fbd86ca7dc216$export$b204af158042fbac(el);
327
+ return doc.defaultView || window;
328
+ };
329
+ /**
330
+ * Type guard that checks if a value is a Node. Verifies the presence and type of the nodeType property.
331
+ */ function $431fbd86ca7dc216$var$isNode(value) {
332
+ return value !== null && typeof value === 'object' && 'nodeType' in value && typeof value.nodeType === 'number';
333
+ }
334
+ function $431fbd86ca7dc216$export$af51f0f06c0f328a(node) {
335
+ return $431fbd86ca7dc216$var$isNode(node) && node.nodeType === Node.DOCUMENT_FRAGMENT_NODE && 'host' in node;
336
+ }
337
+
338
+ let $f4e2df6bd15f8569$var$_shadowDOM = false;
339
+ function $f4e2df6bd15f8569$export$98658e8c59125e6a() {
340
+ return $f4e2df6bd15f8569$var$_shadowDOM;
341
+ }
342
+
343
+ // Source: https://github.com/microsoft/tabster/blob/a89fc5d7e332d48f68d03b1ca6e344489d1c3898/src/Shadowdomize/DOMFunctions.ts#L16
344
+
345
+
346
+ function $d4ee10de306f2510$export$4282f70798064fe0(node, otherNode) {
347
+ if (!($f4e2df6bd15f8569$export$98658e8c59125e6a)()) return otherNode && node ? node.contains(otherNode) : false;
348
+ if (!node || !otherNode) return false;
349
+ let currentNode = otherNode;
350
+ while(currentNode !== null){
351
+ if (currentNode === node) return true;
352
+ if (currentNode.tagName === 'SLOT' && currentNode.assignedSlot) // Element is slotted
353
+ currentNode = currentNode.assignedSlot.parentNode;
354
+ else if (($431fbd86ca7dc216$export$af51f0f06c0f328a)(currentNode)) // Element is in shadow root
355
+ currentNode = currentNode.host;
356
+ else currentNode = currentNode.parentNode;
357
+ }
358
+ return false;
359
+ }
360
+ const $d4ee10de306f2510$export$cd4e5573fbe2b576 = (doc = document)=>{
361
+ var _activeElement_shadowRoot;
362
+ if (!($f4e2df6bd15f8569$export$98658e8c59125e6a)()) return doc.activeElement;
363
+ let activeElement = doc.activeElement;
364
+ while(activeElement && 'shadowRoot' in activeElement && ((_activeElement_shadowRoot = activeElement.shadowRoot) === null || _activeElement_shadowRoot === void 0 ? void 0 : _activeElement_shadowRoot.activeElement))activeElement = activeElement.shadowRoot.activeElement;
365
+ return activeElement;
366
+ };
367
+ function $d4ee10de306f2510$export$e58f029f0fbfdb29(event) {
368
+ if (($f4e2df6bd15f8569$export$98658e8c59125e6a)() && event.target.shadowRoot) {
369
+ if (event.composedPath) return event.composedPath()[0];
370
+ }
371
+ return event.target;
372
+ }
373
+
374
+ /*
375
+ * Copyright 2020 Adobe. All rights reserved.
376
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
377
+ * you may not use this file except in compliance with the License. You may obtain a copy
378
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
379
+ *
380
+ * Unless required by applicable law or agreed to in writing, software distributed under
381
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
382
+ * OF ANY KIND, either express or implied. See the License for the specific language
383
+ * governing permissions and limitations under the License.
384
+ */
385
+
386
+
387
+ function $3ef42575df84b30b$export$9d1611c77c2fe928(...args) {
388
+ // Start with a base clone of the first argument. This is a lot faster than starting
389
+ // with an empty object and adding properties as we go.
390
+ let result = {
391
+ ...args[0]
392
+ };
393
+ for(let i = 1; i < args.length; i++){
394
+ let props = args[i];
395
+ for(let key in props){
396
+ let a = result[key];
397
+ let b = props[key];
398
+ // Chain events
399
+ if (typeof a === 'function' && typeof b === 'function' && // This is a lot faster than a regex.
400
+ key[0] === 'o' && key[1] === 'n' && key.charCodeAt(2) >= /* 'A' */ 65 && key.charCodeAt(2) <= /* 'Z' */ 90) result[key] = ($ff5963eb1fccf552$export$e08e3b67e392101e)(a, b);
401
+ else if ((key === 'className' || key === 'UNSAFE_className') && typeof a === 'string' && typeof b === 'string') result[key] = (clsx)(a, b);
402
+ else if (key === 'id' && a && b) result.id = ($bdb11010cef70236$export$cd8c9cb68f842629)(a, b);
403
+ else result[key] = b !== undefined ? b : a;
404
+ }
405
+ }
406
+ return result;
407
+ }
408
+
409
+ /*
410
+ * Copyright 2020 Adobe. All rights reserved.
411
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
412
+ * you may not use this file except in compliance with the License. You may obtain a copy
413
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
414
+ *
415
+ * Unless required by applicable law or agreed to in writing, software distributed under
416
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
417
+ * OF ANY KIND, either express or implied. See the License for the specific language
418
+ * governing permissions and limitations under the License.
419
+ */ function $5dc95899b306f630$export$c9058316764c140e(...refs) {
420
+ if (refs.length === 1 && refs[0]) return refs[0];
421
+ return (value)=>{
422
+ let hasCleanup = false;
423
+ const cleanups = refs.map((ref)=>{
424
+ const cleanup = $5dc95899b306f630$var$setRef(ref, value);
425
+ hasCleanup || (hasCleanup = typeof cleanup == 'function');
426
+ return cleanup;
427
+ });
428
+ if (hasCleanup) return ()=>{
429
+ cleanups.forEach((cleanup, i)=>{
430
+ if (typeof cleanup === 'function') cleanup();
431
+ else $5dc95899b306f630$var$setRef(refs[i], null);
432
+ });
433
+ };
434
+ };
435
+ }
436
+ function $5dc95899b306f630$var$setRef(ref, value) {
437
+ if (typeof ref === 'function') return ref(value);
438
+ else if (ref != null) ref.current = value;
439
+ }
440
+
441
+ /*
442
+ * Copyright 2020 Adobe. All rights reserved.
443
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
444
+ * you may not use this file except in compliance with the License. You may obtain a copy
445
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
446
+ *
447
+ * Unless required by applicable law or agreed to in writing, software distributed under
448
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
449
+ * OF ANY KIND, either express or implied. See the License for the specific language
450
+ * governing permissions and limitations under the License.
451
+ */ const $65484d02dcb7eb3e$var$DOMPropNames = new Set([
452
+ 'id'
453
+ ]);
454
+ const $65484d02dcb7eb3e$var$labelablePropNames = new Set([
455
+ 'aria-label',
456
+ 'aria-labelledby',
457
+ 'aria-describedby',
458
+ 'aria-details'
459
+ ]);
460
+ // See LinkDOMProps in dom.d.ts.
461
+ const $65484d02dcb7eb3e$var$linkPropNames = new Set([
462
+ 'href',
463
+ 'hrefLang',
464
+ 'target',
465
+ 'rel',
466
+ 'download',
467
+ 'ping',
468
+ 'referrerPolicy'
469
+ ]);
470
+ const $65484d02dcb7eb3e$var$globalAttrs = new Set([
471
+ 'dir',
472
+ 'lang',
473
+ 'hidden',
474
+ 'inert',
475
+ 'translate'
476
+ ]);
477
+ const $65484d02dcb7eb3e$var$globalEvents = new Set([
478
+ 'onClick',
479
+ 'onAuxClick',
480
+ 'onContextMenu',
481
+ 'onDoubleClick',
482
+ 'onMouseDown',
483
+ 'onMouseEnter',
484
+ 'onMouseLeave',
485
+ 'onMouseMove',
486
+ 'onMouseOut',
487
+ 'onMouseOver',
488
+ 'onMouseUp',
489
+ 'onTouchCancel',
490
+ 'onTouchEnd',
491
+ 'onTouchMove',
492
+ 'onTouchStart',
493
+ 'onPointerDown',
494
+ 'onPointerMove',
495
+ 'onPointerUp',
496
+ 'onPointerCancel',
497
+ 'onPointerEnter',
498
+ 'onPointerLeave',
499
+ 'onPointerOver',
500
+ 'onPointerOut',
501
+ 'onGotPointerCapture',
502
+ 'onLostPointerCapture',
503
+ 'onScroll',
504
+ 'onWheel',
505
+ 'onAnimationStart',
506
+ 'onAnimationEnd',
507
+ 'onAnimationIteration',
508
+ 'onTransitionCancel',
509
+ 'onTransitionEnd',
510
+ 'onTransitionRun',
511
+ 'onTransitionStart'
512
+ ]);
513
+ const $65484d02dcb7eb3e$var$propRe = /^(data-.*)$/;
514
+ function $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, opts = {}) {
515
+ let { labelable: labelable, isLink: isLink, global: global, events: events = global, propNames: propNames } = opts;
516
+ let filteredProps = {};
517
+ 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];
518
+ return filteredProps;
519
+ }
520
+
521
+ /*
522
+ * Copyright 2020 Adobe. All rights reserved.
523
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
524
+ * you may not use this file except in compliance with the License. You may obtain a copy
525
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
526
+ *
527
+ * Unless required by applicable law or agreed to in writing, software distributed under
528
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
529
+ * OF ANY KIND, either express or implied. See the License for the specific language
530
+ * governing permissions and limitations under the License.
531
+ */ function $7215afc6de606d6b$export$de79e2c695e052f3(element) {
532
+ if ($7215afc6de606d6b$var$supportsPreventScroll()) element.focus({
533
+ preventScroll: true
534
+ });
535
+ else {
536
+ let scrollableElements = $7215afc6de606d6b$var$getScrollableElements(element);
537
+ element.focus();
538
+ $7215afc6de606d6b$var$restoreScrollPosition(scrollableElements);
539
+ }
540
+ }
541
+ let $7215afc6de606d6b$var$supportsPreventScrollCached = null;
542
+ function $7215afc6de606d6b$var$supportsPreventScroll() {
543
+ if ($7215afc6de606d6b$var$supportsPreventScrollCached == null) {
544
+ $7215afc6de606d6b$var$supportsPreventScrollCached = false;
545
+ try {
546
+ let focusElem = document.createElement('div');
547
+ focusElem.focus({
548
+ get preventScroll () {
549
+ $7215afc6de606d6b$var$supportsPreventScrollCached = true;
550
+ return true;
551
+ }
552
+ });
553
+ } catch {
554
+ // Ignore
555
+ }
556
+ }
557
+ return $7215afc6de606d6b$var$supportsPreventScrollCached;
558
+ }
559
+ function $7215afc6de606d6b$var$getScrollableElements(element) {
560
+ let parent = element.parentNode;
561
+ let scrollableElements = [];
562
+ let rootScrollingElement = document.scrollingElement || document.documentElement;
563
+ while(parent instanceof HTMLElement && parent !== rootScrollingElement){
564
+ if (parent.offsetHeight < parent.scrollHeight || parent.offsetWidth < parent.scrollWidth) scrollableElements.push({
565
+ element: parent,
566
+ scrollTop: parent.scrollTop,
567
+ scrollLeft: parent.scrollLeft
568
+ });
569
+ parent = parent.parentNode;
570
+ }
571
+ if (rootScrollingElement instanceof HTMLElement) scrollableElements.push({
572
+ element: rootScrollingElement,
573
+ scrollTop: rootScrollingElement.scrollTop,
574
+ scrollLeft: rootScrollingElement.scrollLeft
575
+ });
576
+ return scrollableElements;
577
+ }
578
+ function $7215afc6de606d6b$var$restoreScrollPosition(scrollableElements) {
579
+ for (let { element: element, scrollTop: scrollTop, scrollLeft: scrollLeft } of scrollableElements){
580
+ element.scrollTop = scrollTop;
581
+ element.scrollLeft = scrollLeft;
582
+ }
583
+ }
584
+
585
+ /*
586
+ * Copyright 2020 Adobe. All rights reserved.
587
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
588
+ * you may not use this file except in compliance with the License. You may obtain a copy
589
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
590
+ *
591
+ * Unless required by applicable law or agreed to in writing, software distributed under
592
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
593
+ * OF ANY KIND, either express or implied. See the License for the specific language
594
+ * governing permissions and limitations under the License.
595
+ */ function $c87311424ea30a05$var$testUserAgent(re) {
596
+ var _window_navigator_userAgentData;
597
+ if (typeof window === 'undefined' || window.navigator == null) return false;
598
+ let brands = (_window_navigator_userAgentData = window.navigator['userAgentData']) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.brands;
599
+ return Array.isArray(brands) && brands.some((brand)=>re.test(brand.brand)) || re.test(window.navigator.userAgent);
600
+ }
601
+ function $c87311424ea30a05$var$testPlatform(re) {
602
+ var _window_navigator_userAgentData;
603
+ 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;
604
+ }
605
+ function $c87311424ea30a05$var$cached(fn) {
606
+ if (process.env.NODE_ENV === 'test') return fn;
607
+ let res = null;
608
+ return ()=>{
609
+ if (res == null) res = fn();
610
+ return res;
611
+ };
612
+ }
613
+ const $c87311424ea30a05$export$9ac100e40613ea10 = $c87311424ea30a05$var$cached(function() {
614
+ return $c87311424ea30a05$var$testPlatform(/^Mac/i);
615
+ });
616
+ const $c87311424ea30a05$export$186c6964ca17d99 = $c87311424ea30a05$var$cached(function() {
617
+ return $c87311424ea30a05$var$testPlatform(/^iPhone/i);
618
+ });
619
+ const $c87311424ea30a05$export$7bef049ce92e4224 = $c87311424ea30a05$var$cached(function() {
620
+ return $c87311424ea30a05$var$testPlatform(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
621
+ $c87311424ea30a05$export$9ac100e40613ea10() && navigator.maxTouchPoints > 1;
622
+ });
623
+ const $c87311424ea30a05$export$fedb369cb70207f1 = $c87311424ea30a05$var$cached(function() {
624
+ return $c87311424ea30a05$export$186c6964ca17d99() || $c87311424ea30a05$export$7bef049ce92e4224();
625
+ });
626
+ $c87311424ea30a05$var$cached(function() {
627
+ return $c87311424ea30a05$export$9ac100e40613ea10() || $c87311424ea30a05$export$fedb369cb70207f1();
628
+ });
629
+ $c87311424ea30a05$var$cached(function() {
630
+ return $c87311424ea30a05$var$testUserAgent(/AppleWebKit/i) && !$c87311424ea30a05$export$6446a186d09e379e();
631
+ });
632
+ const $c87311424ea30a05$export$6446a186d09e379e = $c87311424ea30a05$var$cached(function() {
633
+ return $c87311424ea30a05$var$testUserAgent(/Chrome/i);
634
+ });
635
+ const $c87311424ea30a05$export$a11b0059900ceec8 = $c87311424ea30a05$var$cached(function() {
636
+ return $c87311424ea30a05$var$testUserAgent(/Android/i);
637
+ });
638
+ $c87311424ea30a05$var$cached(function() {
639
+ return $c87311424ea30a05$var$testUserAgent(/Firefox/i);
640
+ });
641
+
642
+ /*
643
+ * Copyright 2020 Adobe. All rights reserved.
644
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
645
+ * you may not use this file except in compliance with the License. You may obtain a copy
646
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
647
+ *
648
+ * Unless required by applicable law or agreed to in writing, software distributed under
649
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
650
+ * OF ANY KIND, either express or implied. See the License for the specific language
651
+ * governing permissions and limitations under the License.
652
+ */ // We store a global list of elements that are currently transitioning,
653
+ // mapped to a set of CSS properties that are transitioning for that element.
654
+ // This is necessary rather than a simple count of transitions because of browser
655
+ // bugs, e.g. Chrome sometimes fires both transitionend and transitioncancel rather
656
+ // than one or the other. So we need to track what's actually transitioning so that
657
+ // we can ignore these duplicate events.
658
+ let $bbed8b41f857bcc0$var$transitionsByElement = new Map();
659
+ // A list of callbacks to call once there are no transitioning elements.
660
+ let $bbed8b41f857bcc0$var$transitionCallbacks = new Set();
661
+ function $bbed8b41f857bcc0$var$setupGlobalEvents() {
662
+ if (typeof window === 'undefined') return;
663
+ function isTransitionEvent(event) {
664
+ return 'propertyName' in event;
665
+ }
666
+ let onTransitionStart = (e)=>{
667
+ if (!isTransitionEvent(e) || !e.target) return;
668
+ // Add the transitioning property to the list for this element.
669
+ let transitions = $bbed8b41f857bcc0$var$transitionsByElement.get(e.target);
670
+ if (!transitions) {
671
+ transitions = new Set();
672
+ $bbed8b41f857bcc0$var$transitionsByElement.set(e.target, transitions);
673
+ // The transitioncancel event must be registered on the element itself, rather than as a global
674
+ // event. This enables us to handle when the node is deleted from the document while it is transitioning.
675
+ // In that case, the cancel event would have nowhere to bubble to so we need to handle it directly.
676
+ e.target.addEventListener('transitioncancel', onTransitionEnd, {
677
+ once: true
678
+ });
679
+ }
680
+ transitions.add(e.propertyName);
681
+ };
682
+ let onTransitionEnd = (e)=>{
683
+ if (!isTransitionEvent(e) || !e.target) return;
684
+ // Remove property from list of transitioning properties.
685
+ let properties = $bbed8b41f857bcc0$var$transitionsByElement.get(e.target);
686
+ if (!properties) return;
687
+ properties.delete(e.propertyName);
688
+ // If empty, remove transitioncancel event, and remove the element from the list of transitioning elements.
689
+ if (properties.size === 0) {
690
+ e.target.removeEventListener('transitioncancel', onTransitionEnd);
691
+ $bbed8b41f857bcc0$var$transitionsByElement.delete(e.target);
692
+ }
693
+ // If no transitioning elements, call all of the queued callbacks.
694
+ if ($bbed8b41f857bcc0$var$transitionsByElement.size === 0) {
695
+ for (let cb of $bbed8b41f857bcc0$var$transitionCallbacks)cb();
696
+ $bbed8b41f857bcc0$var$transitionCallbacks.clear();
697
+ }
698
+ };
699
+ document.body.addEventListener('transitionrun', onTransitionStart);
700
+ document.body.addEventListener('transitionend', onTransitionEnd);
701
+ }
702
+ if (typeof document !== 'undefined') {
703
+ if (document.readyState !== 'loading') $bbed8b41f857bcc0$var$setupGlobalEvents();
704
+ else document.addEventListener('DOMContentLoaded', $bbed8b41f857bcc0$var$setupGlobalEvents);
705
+ }
706
+ /**
707
+ * Cleans up any elements that are no longer in the document.
708
+ * This is necessary because we can't rely on transitionend events to fire
709
+ * for elements that are removed from the document while transitioning.
710
+ */ function $bbed8b41f857bcc0$var$cleanupDetachedElements() {
711
+ for (const [eventTarget] of $bbed8b41f857bcc0$var$transitionsByElement)// Similar to `eventTarget instanceof Element && !eventTarget.isConnected`, but avoids
712
+ // the explicit instanceof check, since it may be different in different contexts.
713
+ if ('isConnected' in eventTarget && !eventTarget.isConnected) $bbed8b41f857bcc0$var$transitionsByElement.delete(eventTarget);
714
+ }
715
+ function $bbed8b41f857bcc0$export$24490316f764c430(fn) {
716
+ // Wait one frame to see if an animation starts, e.g. a transition on mount.
717
+ requestAnimationFrame(()=>{
718
+ $bbed8b41f857bcc0$var$cleanupDetachedElements();
719
+ // If no transitions are running, call the function immediately.
720
+ // Otherwise, add it to a list of callbacks to run at the end of the animation.
721
+ if ($bbed8b41f857bcc0$var$transitionsByElement.size === 0) fn();
722
+ else $bbed8b41f857bcc0$var$transitionCallbacks.add(fn);
723
+ });
724
+ }
725
+
726
+ /*
727
+ * Copyright 2020 Adobe. All rights reserved.
728
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
729
+ * you may not use this file except in compliance with the License. You may obtain a copy
730
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
731
+ *
732
+ * Unless required by applicable law or agreed to in writing, software distributed under
733
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
734
+ * OF ANY KIND, either express or implied. See the License for the specific language
735
+ * governing permissions and limitations under the License.
736
+ */
737
+ function $03deb23ff14920c4$export$4eaf04e54aa8eed6() {
738
+ let globalListeners = (useRef)(new Map());
739
+ let addGlobalListener = (useCallback)((eventTarget, type, listener, options)=>{
740
+ // Make sure we remove the listener after it is called with the `once` option.
741
+ let fn = (options === null || options === void 0 ? void 0 : options.once) ? (...args)=>{
742
+ globalListeners.current.delete(listener);
743
+ listener(...args);
744
+ } : listener;
745
+ globalListeners.current.set(listener, {
746
+ type: type,
747
+ eventTarget: eventTarget,
748
+ fn: fn,
749
+ options: options
750
+ });
751
+ eventTarget.addEventListener(type, fn, options);
752
+ }, []);
753
+ let removeGlobalListener = (useCallback)((eventTarget, type, listener, options)=>{
754
+ var _globalListeners_current_get;
755
+ let fn = ((_globalListeners_current_get = globalListeners.current.get(listener)) === null || _globalListeners_current_get === void 0 ? void 0 : _globalListeners_current_get.fn) || listener;
756
+ eventTarget.removeEventListener(type, fn, options);
757
+ globalListeners.current.delete(listener);
758
+ }, []);
759
+ let removeAllGlobalListeners = (useCallback)(()=>{
760
+ globalListeners.current.forEach((value, key)=>{
761
+ removeGlobalListener(value.eventTarget, value.type, key, value.options);
762
+ });
763
+ }, [
764
+ removeGlobalListener
765
+ ]);
766
+ (useEffect)(()=>{
767
+ return removeAllGlobalListeners;
768
+ }, [
769
+ removeAllGlobalListeners
770
+ ]);
771
+ return {
772
+ addGlobalListener: addGlobalListener,
773
+ removeGlobalListener: removeGlobalListener,
774
+ removeAllGlobalListeners: removeAllGlobalListeners
775
+ };
776
+ }
777
+
778
+ /*
779
+ * Copyright 2020 Adobe. All rights reserved.
780
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
781
+ * you may not use this file except in compliance with the License. You may obtain a copy
782
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
783
+ *
784
+ * Unless required by applicable law or agreed to in writing, software distributed under
785
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
786
+ * OF ANY KIND, either express or implied. See the License for the specific language
787
+ * governing permissions and limitations under the License.
788
+ */
789
+ function $313b98861ee5dd6c$export$d6875122194c7b44(props, defaultLabel) {
790
+ let { id: id, 'aria-label': label, 'aria-labelledby': labelledBy } = props;
791
+ // If there is both an aria-label and aria-labelledby,
792
+ // combine them by pointing to the element itself.
793
+ id = ($bdb11010cef70236$export$f680877a34711e37)(id);
794
+ if (labelledBy && label) {
795
+ let ids = new Set([
796
+ id,
797
+ ...labelledBy.trim().split(/\s+/)
798
+ ]);
799
+ labelledBy = [
800
+ ...ids
801
+ ].join(' ');
802
+ } else if (labelledBy) labelledBy = labelledBy.trim().split(/\s+/).join(' ');
803
+ // If no labels are provided, use the default
804
+ if (!label && !labelledBy && defaultLabel) label = defaultLabel;
805
+ return {
806
+ id: id,
807
+ 'aria-label': label,
808
+ 'aria-labelledby': labelledBy
809
+ };
810
+ }
811
+
812
+ /*
813
+ * Copyright 2021 Adobe. All rights reserved.
814
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
815
+ * you may not use this file except in compliance with the License. You may obtain a copy
816
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
817
+ *
818
+ * Unless required by applicable law or agreed to in writing, software distributed under
819
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
820
+ * OF ANY KIND, either express or implied. See the License for the specific language
821
+ * governing permissions and limitations under the License.
822
+ */
823
+ function $df56164dff5785e2$export$4338b53315abf666(ref) {
824
+ const objRef = (useRef)(null);
825
+ const cleanupRef = (useRef)(undefined);
826
+ const refEffect = (useCallback)((instance)=>{
827
+ if (typeof ref === 'function') {
828
+ const refCallback = ref;
829
+ const refCleanup = refCallback(instance);
830
+ return ()=>{
831
+ if (typeof refCleanup === 'function') refCleanup();
832
+ else refCallback(null);
833
+ };
834
+ } else if (ref) {
835
+ ref.current = instance;
836
+ return ()=>{
837
+ ref.current = null;
838
+ };
839
+ }
840
+ }, [
841
+ ref
842
+ ]);
843
+ return (useMemo)(()=>({
844
+ get current () {
845
+ return objRef.current;
846
+ },
847
+ set current (value){
848
+ objRef.current = value;
849
+ if (cleanupRef.current) {
850
+ cleanupRef.current();
851
+ cleanupRef.current = undefined;
852
+ }
853
+ if (value != null) cleanupRef.current = refEffect(value);
854
+ }
855
+ }), [
856
+ refEffect
857
+ ]);
858
+ }
859
+
860
+ /*
861
+ * Copyright 2020 Adobe. All rights reserved.
862
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
863
+ * you may not use this file except in compliance with the License. You may obtain a copy
864
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
865
+ *
866
+ * Unless required by applicable law or agreed to in writing, software distributed under
867
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
868
+ * OF ANY KIND, either express or implied. See the License for the specific language
869
+ * governing permissions and limitations under the License.
870
+ */
871
+ function $e7801be82b4b2a53$export$4debdb1a3f0fa79e(context, ref) {
872
+ ($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
873
+ if (context && context.ref && ref) {
874
+ context.ref.current = ref.current;
875
+ return ()=>{
876
+ if (context.ref) context.ref.current = null;
877
+ };
878
+ }
879
+ });
880
+ }
881
+
882
+ /*
883
+ * Copyright 2021 Adobe. All rights reserved.
884
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
885
+ * you may not use this file except in compliance with the License. You may obtain a copy
886
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
887
+ *
888
+ * Unless required by applicable law or agreed to in writing, software distributed under
889
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
890
+ * OF ANY KIND, either express or implied. See the License for the specific language
891
+ * governing permissions and limitations under the License.
892
+ */
893
+
894
+ function $e9faafb641e167db$export$90fc3a17d93f704c(ref, event, handler, options) {
895
+ let handleEvent = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(handler);
896
+ let isDisabled = handler == null;
897
+ (useEffect)(()=>{
898
+ if (isDisabled || !ref.current) return;
899
+ let element = ref.current;
900
+ element.addEventListener(event, handleEvent, options);
901
+ return ()=>{
902
+ element.removeEventListener(event, handleEvent, options);
903
+ };
904
+ }, [
905
+ ref,
906
+ event,
907
+ options,
908
+ isDisabled,
909
+ handleEvent
910
+ ]);
911
+ }
912
+
913
+ /*
914
+ * Copyright 2022 Adobe. All rights reserved.
915
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
916
+ * you may not use this file except in compliance with the License. You may obtain a copy
917
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
918
+ *
919
+ * Unless required by applicable law or agreed to in writing, software distributed under
920
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
921
+ * OF ANY KIND, either express or implied. See the License for the specific language
922
+ * governing permissions and limitations under the License.
923
+ */
924
+ function $6a7db85432448f7f$export$60278871457622de(event) {
925
+ // JAWS/NVDA with Firefox.
926
+ if (event.pointerType === '' && event.isTrusted) return true;
927
+ // Android TalkBack's detail value varies depending on the event listener providing the event so we have specific logic here instead
928
+ // If pointerType is defined, event is from a click listener. For events from mousedown listener, detail === 0 is a sufficient check
929
+ // to detect TalkBack virtual clicks.
930
+ if (($c87311424ea30a05$export$a11b0059900ceec8)() && event.pointerType) return event.type === 'click' && event.buttons === 1;
931
+ return event.detail === 0 && !event.pointerType;
932
+ }
933
+
22
934
  /*
23
935
  * Copyright 2023 Adobe. All rights reserved.
24
936
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
@@ -48,6 +960,259 @@ function $99facab73266f662$export$5add1d006293d136(ref, initialValue, onReset) {
48
960
  ]);
49
961
  }
50
962
 
963
+ /*
964
+ * Copyright 2020 Adobe. All rights reserved.
965
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
966
+ * you may not use this file except in compliance with the License. You may obtain a copy
967
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
968
+ *
969
+ * Unless required by applicable law or agreed to in writing, software distributed under
970
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
971
+ * OF ANY KIND, either express or implied. See the License for the specific language
972
+ * governing permissions and limitations under the License.
973
+ */
974
+ function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange) {
975
+ let [stateValue, setStateValue] = (useState)(value || defaultValue);
976
+ let isControlledRef = (useRef)(value !== undefined);
977
+ let isControlled = value !== undefined;
978
+ (useEffect)(()=>{
979
+ let wasControlled = isControlledRef.current;
980
+ if (wasControlled !== isControlled && process.env.NODE_ENV !== 'production') console.warn(`WARN: A component changed from ${wasControlled ? 'controlled' : 'uncontrolled'} to ${isControlled ? 'controlled' : 'uncontrolled'}.`);
981
+ isControlledRef.current = isControlled;
982
+ }, [
983
+ isControlled
984
+ ]);
985
+ let currentValue = isControlled ? value : stateValue;
986
+ let setValue = (useCallback)((value, ...args)=>{
987
+ let onChangeCaller = (value, ...onChangeArgs)=>{
988
+ if (onChange) {
989
+ if (!Object.is(currentValue, value)) onChange(value, ...onChangeArgs);
990
+ }
991
+ if (!isControlled) // If uncontrolled, mutate the currentValue local variable so that
992
+ // calling setState multiple times with the same value only emits onChange once.
993
+ // We do not use a ref for this because we specifically _do_ want the value to
994
+ // reset every render, and assigning to a ref in render breaks aborted suspended renders.
995
+ // eslint-disable-next-line react-hooks/exhaustive-deps
996
+ currentValue = value;
997
+ };
998
+ if (typeof value === 'function') {
999
+ 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');
1000
+ // this supports functional updates https://reactjs.org/docs/hooks-reference.html#functional-updates
1001
+ // when someone using useControlledState calls setControlledState(myFunc)
1002
+ // this will call our useState setState with a function as well which invokes myFunc and calls onChange with the value from myFunc
1003
+ // 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
1004
+ // 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
1005
+ let updateFunction = (oldValue, ...functionArgs)=>{
1006
+ let interceptedValue = value(isControlled ? currentValue : oldValue, ...functionArgs);
1007
+ onChangeCaller(interceptedValue, ...args);
1008
+ if (!isControlled) return interceptedValue;
1009
+ return oldValue;
1010
+ };
1011
+ setStateValue(updateFunction);
1012
+ } else {
1013
+ if (!isControlled) setStateValue(value);
1014
+ onChangeCaller(value, ...args);
1015
+ }
1016
+ }, [
1017
+ isControlled,
1018
+ currentValue,
1019
+ onChange
1020
+ ]);
1021
+ return [
1022
+ currentValue,
1023
+ setValue
1024
+ ];
1025
+ }
1026
+
1027
+ /*
1028
+ * Copyright 2020 Adobe. All rights reserved.
1029
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
1030
+ * you may not use this file except in compliance with the License. You may obtain a copy
1031
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
1032
+ *
1033
+ * Unless required by applicable law or agreed to in writing, software distributed under
1034
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
1035
+ * OF ANY KIND, either express or implied. See the License for the specific language
1036
+ * governing permissions and limitations under the License.
1037
+ */ /**
1038
+ * Takes a value and forces it to the closest min/max if it's outside. Also forces it to the closest valid step.
1039
+ */ function $9446cca9a3875146$export$7d15b64cf5a3a4c4(value, min = -Infinity, max = Infinity) {
1040
+ let newValue = Math.min(Math.max(value, min), max);
1041
+ return newValue;
1042
+ }
1043
+ function $9446cca9a3875146$export$e1a7b8e69ef6c52f(value, step) {
1044
+ let roundedValue = value;
1045
+ let precision = 0;
1046
+ let stepString = step.toString();
1047
+ // Handle negative exponents in exponential notation (e.g., "1e-7" → precision 8)
1048
+ let eIndex = stepString.toLowerCase().indexOf('e-');
1049
+ if (eIndex > 0) precision = Math.abs(Math.floor(Math.log10(Math.abs(step)))) + eIndex;
1050
+ else {
1051
+ let pointIndex = stepString.indexOf('.');
1052
+ if (pointIndex >= 0) precision = stepString.length - pointIndex;
1053
+ }
1054
+ if (precision > 0) {
1055
+ let pow = Math.pow(10, precision);
1056
+ roundedValue = Math.round(roundedValue * pow) / pow;
1057
+ }
1058
+ return roundedValue;
1059
+ }
1060
+ function $9446cca9a3875146$export$cb6e0bb50bc19463(value, min, max, step) {
1061
+ min = Number(min);
1062
+ max = Number(max);
1063
+ let remainder = (value - (isNaN(min) ? 0 : min)) % step;
1064
+ let snappedValue = $9446cca9a3875146$export$e1a7b8e69ef6c52f(Math.abs(remainder) * 2 >= step ? value + Math.sign(remainder) * (step - Math.abs(remainder)) : value - remainder, step);
1065
+ if (!isNaN(min)) {
1066
+ if (snappedValue < min) snappedValue = min;
1067
+ else if (!isNaN(max) && snappedValue > max) snappedValue = min + Math.floor($9446cca9a3875146$export$e1a7b8e69ef6c52f((max - min) / step, step)) * step;
1068
+ } else if (!isNaN(max) && snappedValue > max) snappedValue = Math.floor($9446cca9a3875146$export$e1a7b8e69ef6c52f(max / step, step)) * step;
1069
+ // correct floating point behavior by rounding to step precision
1070
+ snappedValue = $9446cca9a3875146$export$e1a7b8e69ef6c52f(snappedValue, step);
1071
+ return snappedValue;
1072
+ }
1073
+
1074
+ /*
1075
+ * Copyright 2022 Adobe. All rights reserved.
1076
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
1077
+ * you may not use this file except in compliance with the License. You may obtain a copy
1078
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
1079
+ *
1080
+ * Unless required by applicable law or agreed to in writing, software distributed under
1081
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
1082
+ * OF ANY KIND, either express or implied. See the License for the specific language
1083
+ * governing permissions and limitations under the License.
1084
+ */
1085
+
1086
+ const $64fa3d84918910a7$export$c62b8e45d58ddad9 = Symbol('default');
1087
+ function $64fa3d84918910a7$export$2881499e37b75b9a({ values: values, children: children }) {
1088
+ for (let [Context, value] of values)// @ts-ignore
1089
+ children = /*#__PURE__*/ (React__default).createElement(Context.Provider, {
1090
+ value: value
1091
+ }, children);
1092
+ return children;
1093
+ }
1094
+ function $64fa3d84918910a7$export$4d86445c2cf5e3(props) {
1095
+ let { className: className, style: style, children: children, defaultClassName: defaultClassName, defaultChildren: defaultChildren, defaultStyle: defaultStyle, values: values } = props;
1096
+ return (useMemo)(()=>{
1097
+ let computedClassName;
1098
+ let computedStyle;
1099
+ let computedChildren;
1100
+ if (typeof className === 'function') computedClassName = className({
1101
+ ...values,
1102
+ defaultClassName: defaultClassName
1103
+ });
1104
+ else computedClassName = className;
1105
+ if (typeof style === 'function') computedStyle = style({
1106
+ ...values,
1107
+ defaultStyle: defaultStyle || {}
1108
+ });
1109
+ else computedStyle = style;
1110
+ if (typeof children === 'function') computedChildren = children({
1111
+ ...values,
1112
+ defaultChildren: defaultChildren
1113
+ });
1114
+ else if (children == null) computedChildren = defaultChildren;
1115
+ else computedChildren = children;
1116
+ return {
1117
+ className: computedClassName !== null && computedClassName !== void 0 ? computedClassName : defaultClassName,
1118
+ style: computedStyle || defaultStyle ? {
1119
+ ...defaultStyle,
1120
+ ...computedStyle
1121
+ } : undefined,
1122
+ children: computedChildren !== null && computedChildren !== void 0 ? computedChildren : defaultChildren,
1123
+ 'data-rac': ''
1124
+ };
1125
+ }, [
1126
+ className,
1127
+ style,
1128
+ children,
1129
+ defaultClassName,
1130
+ defaultChildren,
1131
+ defaultStyle,
1132
+ values
1133
+ ]);
1134
+ }
1135
+ function $64fa3d84918910a7$export$fabf2dc03a41866e(context, slot) {
1136
+ let ctx = (useContext)(context);
1137
+ if (slot === null) // An explicit `null` slot means don't use context.
1138
+ return null;
1139
+ if (ctx && typeof ctx === 'object' && 'slots' in ctx && ctx.slots) {
1140
+ let slotKey = slot || $64fa3d84918910a7$export$c62b8e45d58ddad9;
1141
+ if (!ctx.slots[slotKey]) {
1142
+ let availableSlots = new Intl.ListFormat().format(Object.keys(ctx.slots).map((p)=>`"${p}"`));
1143
+ let errorMessage = slot ? `Invalid slot "${slot}".` : 'A slot prop is required.';
1144
+ throw new Error(`${errorMessage} Valid slot names are ${availableSlots}.`);
1145
+ }
1146
+ return ctx.slots[slotKey];
1147
+ }
1148
+ // @ts-ignore
1149
+ return ctx;
1150
+ }
1151
+ function $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, context) {
1152
+ let ctx = $64fa3d84918910a7$export$fabf2dc03a41866e(context, props.slot) || {};
1153
+ // @ts-ignore - TS says "Type 'unique symbol' cannot be used as an index type." but not sure why.
1154
+ let { ref: contextRef, ...contextProps } = ctx;
1155
+ let mergedRef = ($df56164dff5785e2$export$4338b53315abf666)((useMemo)(()=>($5dc95899b306f630$export$c9058316764c140e)(ref, contextRef), [
1156
+ ref,
1157
+ contextRef
1158
+ ]));
1159
+ let mergedProps = ($3ef42575df84b30b$export$9d1611c77c2fe928)(contextProps, props);
1160
+ // mergeProps does not merge `style`. Adding this there might be a breaking change.
1161
+ if ('style' in contextProps && contextProps.style && 'style' in props && props.style) {
1162
+ if (typeof contextProps.style === 'function' || typeof props.style === 'function') // @ts-ignore
1163
+ mergedProps.style = (renderProps)=>{
1164
+ let contextStyle = typeof contextProps.style === 'function' ? contextProps.style(renderProps) : contextProps.style;
1165
+ let defaultStyle = {
1166
+ ...renderProps.defaultStyle,
1167
+ ...contextStyle
1168
+ };
1169
+ let style = typeof props.style === 'function' ? props.style({
1170
+ ...renderProps,
1171
+ defaultStyle: defaultStyle
1172
+ }) : props.style;
1173
+ return {
1174
+ ...defaultStyle,
1175
+ ...style
1176
+ };
1177
+ };
1178
+ else // @ts-ignore
1179
+ mergedProps.style = {
1180
+ ...contextProps.style,
1181
+ ...props.style
1182
+ };
1183
+ }
1184
+ return [
1185
+ mergedProps,
1186
+ mergedRef
1187
+ ];
1188
+ }
1189
+ function $64fa3d84918910a7$export$9d4c57ee4c6ffdd8(initialState = true) {
1190
+ // Initial state is typically based on the parent having an aria-label or aria-labelledby.
1191
+ // If it does, this value should be false so that we don't update the state and cause a rerender when we go through the layoutEffect
1192
+ let [hasSlot, setHasSlot] = (useState)(initialState);
1193
+ let hasRun = (useRef)(false);
1194
+ // A callback ref which will run when the slotted element mounts.
1195
+ // This should happen before the useLayoutEffect below.
1196
+ let ref = (useCallback)((el)=>{
1197
+ hasRun.current = true;
1198
+ setHasSlot(!!el);
1199
+ }, []);
1200
+ // If the callback hasn't been called, then reset to false.
1201
+ ($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
1202
+ if (!hasRun.current) setHasSlot(false);
1203
+ }, []);
1204
+ return [
1205
+ ref,
1206
+ hasSlot
1207
+ ];
1208
+ }
1209
+ function $64fa3d84918910a7$export$ef03459518577ad4(props) {
1210
+ const prefix = /^(data-.*)$/;
1211
+ let filteredProps = {};
1212
+ for(const prop in props)if (!prefix.test(prop)) filteredProps[prop] = props[prop];
1213
+ return filteredProps;
1214
+ }
1215
+
51
1216
  /*
52
1217
  * Copyright 2020 Adobe. All rights reserved.
53
1218
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
@@ -151,6 +1316,300 @@ class $319e236875307eab$var$LiveAnnouncer {
151
1316
  }
152
1317
  }
153
1318
 
1319
+ /*
1320
+ * Copyright 2020 Adobe. All rights reserved.
1321
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
1322
+ * you may not use this file except in compliance with the License. You may obtain a copy
1323
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
1324
+ *
1325
+ * Unless required by applicable law or agreed to in writing, software distributed under
1326
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
1327
+ * OF ANY KIND, either express or implied. See the License for the specific language
1328
+ * governing permissions and limitations under the License.
1329
+ */ // https://en.wikipedia.org/wiki/Right-to-left
1330
+ const $148a7a147e38ea7f$var$RTL_SCRIPTS = new Set([
1331
+ 'Arab',
1332
+ 'Syrc',
1333
+ 'Samr',
1334
+ 'Mand',
1335
+ 'Thaa',
1336
+ 'Mend',
1337
+ 'Nkoo',
1338
+ 'Adlm',
1339
+ 'Rohg',
1340
+ 'Hebr'
1341
+ ]);
1342
+ const $148a7a147e38ea7f$var$RTL_LANGS = new Set([
1343
+ 'ae',
1344
+ 'ar',
1345
+ 'arc',
1346
+ 'bcc',
1347
+ 'bqi',
1348
+ 'ckb',
1349
+ 'dv',
1350
+ 'fa',
1351
+ 'glk',
1352
+ 'he',
1353
+ 'ku',
1354
+ 'mzn',
1355
+ 'nqo',
1356
+ 'pnb',
1357
+ 'ps',
1358
+ 'sd',
1359
+ 'ug',
1360
+ 'ur',
1361
+ 'yi'
1362
+ ]);
1363
+ function $148a7a147e38ea7f$export$702d680b21cbd764(localeString) {
1364
+ // If the Intl.Locale API is available, use it to get the locale's text direction.
1365
+ if (Intl.Locale) {
1366
+ let locale = new Intl.Locale(localeString).maximize();
1367
+ // Use the text info object to get the direction if possible.
1368
+ // @ts-ignore - this was implemented as a property by some browsers before it was standardized as a function.
1369
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTextInfo
1370
+ let textInfo = typeof locale.getTextInfo === 'function' ? locale.getTextInfo() : locale.textInfo;
1371
+ if (textInfo) return textInfo.direction === 'rtl';
1372
+ // Fallback: guess using the script.
1373
+ // This is more accurate than guessing by language, since languages can be written in multiple scripts.
1374
+ if (locale.script) return $148a7a147e38ea7f$var$RTL_SCRIPTS.has(locale.script);
1375
+ }
1376
+ // If not, just guess by the language (first part of the locale)
1377
+ let lang = localeString.split('-')[0];
1378
+ return $148a7a147e38ea7f$var$RTL_LANGS.has(lang);
1379
+ }
1380
+
1381
+ /*
1382
+ * Copyright 2020 Adobe. All rights reserved.
1383
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
1384
+ * you may not use this file except in compliance with the License. You may obtain a copy
1385
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
1386
+ *
1387
+ * Unless required by applicable law or agreed to in writing, software distributed under
1388
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
1389
+ * OF ANY KIND, either express or implied. See the License for the specific language
1390
+ * governing permissions and limitations under the License.
1391
+ */
1392
+
1393
+
1394
+ // Locale passed from server by PackageLocalizationProvider.
1395
+ const $1e5a04cdaf7d1af8$var$localeSymbol = Symbol.for('react-aria.i18n.locale');
1396
+ function $1e5a04cdaf7d1af8$export$f09106e7c6677ec5() {
1397
+ let locale = typeof window !== 'undefined' && window[$1e5a04cdaf7d1af8$var$localeSymbol] || typeof navigator !== 'undefined' && (navigator.language || navigator.userLanguage) || 'en-US';
1398
+ try {
1399
+ Intl.DateTimeFormat.supportedLocalesOf([
1400
+ locale
1401
+ ]);
1402
+ } catch {
1403
+ locale = 'en-US';
1404
+ }
1405
+ return {
1406
+ locale: locale,
1407
+ direction: ($148a7a147e38ea7f$export$702d680b21cbd764)(locale) ? 'rtl' : 'ltr'
1408
+ };
1409
+ }
1410
+ let $1e5a04cdaf7d1af8$var$currentLocale = $1e5a04cdaf7d1af8$export$f09106e7c6677ec5();
1411
+ let $1e5a04cdaf7d1af8$var$listeners = new Set();
1412
+ function $1e5a04cdaf7d1af8$var$updateLocale() {
1413
+ $1e5a04cdaf7d1af8$var$currentLocale = $1e5a04cdaf7d1af8$export$f09106e7c6677ec5();
1414
+ for (let listener of $1e5a04cdaf7d1af8$var$listeners)listener($1e5a04cdaf7d1af8$var$currentLocale);
1415
+ }
1416
+ function $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a() {
1417
+ let isSSR = ($b5e257d569688ac6$export$535bd6ca7f90a273)();
1418
+ let [defaultLocale, setDefaultLocale] = (useState)($1e5a04cdaf7d1af8$var$currentLocale);
1419
+ (useEffect)(()=>{
1420
+ if ($1e5a04cdaf7d1af8$var$listeners.size === 0) window.addEventListener('languagechange', $1e5a04cdaf7d1af8$var$updateLocale);
1421
+ $1e5a04cdaf7d1af8$var$listeners.add(setDefaultLocale);
1422
+ return ()=>{
1423
+ $1e5a04cdaf7d1af8$var$listeners.delete(setDefaultLocale);
1424
+ if ($1e5a04cdaf7d1af8$var$listeners.size === 0) window.removeEventListener('languagechange', $1e5a04cdaf7d1af8$var$updateLocale);
1425
+ };
1426
+ }, []);
1427
+ // We cannot determine the browser's language on the server, so default to
1428
+ // en-US. This will be updated after hydration on the client to the correct value.
1429
+ if (isSSR) return {
1430
+ locale: 'en-US',
1431
+ direction: 'ltr'
1432
+ };
1433
+ return defaultLocale;
1434
+ }
1435
+
1436
+ /*
1437
+ * Copyright 2020 Adobe. All rights reserved.
1438
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
1439
+ * you may not use this file except in compliance with the License. You may obtain a copy
1440
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
1441
+ *
1442
+ * Unless required by applicable law or agreed to in writing, software distributed under
1443
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
1444
+ * OF ANY KIND, either express or implied. See the License for the specific language
1445
+ * governing permissions and limitations under the License.
1446
+ */
1447
+
1448
+
1449
+ const $18f2051aff69b9bf$var$I18nContext = /*#__PURE__*/ (React__default).createContext(null);
1450
+ function $18f2051aff69b9bf$export$43bb16f9c6d9e3f7() {
1451
+ let defaultLocale = ($1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a)();
1452
+ let context = (useContext)($18f2051aff69b9bf$var$I18nContext);
1453
+ return context || defaultLocale;
1454
+ }
1455
+
1456
+ /*
1457
+ * Copyright 2022 Adobe. All rights reserved.
1458
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
1459
+ * you may not use this file except in compliance with the License. You may obtain a copy
1460
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
1461
+ *
1462
+ * Unless required by applicable law or agreed to in writing, software distributed under
1463
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
1464
+ * OF ANY KIND, either express or implied. See the License for the specific language
1465
+ * governing permissions and limitations under the License.
1466
+ */ const $5b160d28a433310d$var$localeSymbol = Symbol.for('react-aria.i18n.locale');
1467
+ const $5b160d28a433310d$var$stringsSymbol = Symbol.for('react-aria.i18n.strings');
1468
+ let $5b160d28a433310d$var$cachedGlobalStrings = undefined;
1469
+ class $5b160d28a433310d$export$c17fa47878dc55b6 {
1470
+ /** Returns a localized string for the given key and locale. */ getStringForLocale(key, locale) {
1471
+ let strings = this.getStringsForLocale(locale);
1472
+ let string = strings[key];
1473
+ if (!string) throw new Error(`Could not find intl message ${key} in ${locale} locale`);
1474
+ return string;
1475
+ }
1476
+ /** Returns all localized strings for the given locale. */ getStringsForLocale(locale) {
1477
+ let strings = this.strings[locale];
1478
+ if (!strings) {
1479
+ strings = $5b160d28a433310d$var$getStringsForLocale(locale, this.strings, this.defaultLocale);
1480
+ this.strings[locale] = strings;
1481
+ }
1482
+ return strings;
1483
+ }
1484
+ static getGlobalDictionaryForPackage(packageName) {
1485
+ if (typeof window === 'undefined') return null;
1486
+ let locale = window[$5b160d28a433310d$var$localeSymbol];
1487
+ if ($5b160d28a433310d$var$cachedGlobalStrings === undefined) {
1488
+ let globalStrings = window[$5b160d28a433310d$var$stringsSymbol];
1489
+ if (!globalStrings) return null;
1490
+ $5b160d28a433310d$var$cachedGlobalStrings = {};
1491
+ for(let pkg in globalStrings)$5b160d28a433310d$var$cachedGlobalStrings[pkg] = new $5b160d28a433310d$export$c17fa47878dc55b6({
1492
+ [locale]: globalStrings[pkg]
1493
+ }, locale);
1494
+ }
1495
+ let dictionary = $5b160d28a433310d$var$cachedGlobalStrings === null || $5b160d28a433310d$var$cachedGlobalStrings === void 0 ? void 0 : $5b160d28a433310d$var$cachedGlobalStrings[packageName];
1496
+ if (!dictionary) throw new Error(`Strings for package "${packageName}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);
1497
+ return dictionary;
1498
+ }
1499
+ constructor(messages, defaultLocale = 'en-US'){
1500
+ // Clone messages so we don't modify the original object.
1501
+ // Filter out entries with falsy values which may have been caused by applying optimize-locales-plugin.
1502
+ this.strings = Object.fromEntries(Object.entries(messages).filter(([, v])=>v));
1503
+ this.defaultLocale = defaultLocale;
1504
+ }
1505
+ }
1506
+ function $5b160d28a433310d$var$getStringsForLocale(locale, strings, defaultLocale = 'en-US') {
1507
+ // If there is an exact match, use it.
1508
+ if (strings[locale]) return strings[locale];
1509
+ // Attempt to find the closest match by language.
1510
+ // For example, if the locale is fr-CA (French Canadian), but there is only
1511
+ // an fr-FR (France) set of strings, use that.
1512
+ // This could be replaced with Intl.LocaleMatcher once it is supported.
1513
+ // https://github.com/tc39/proposal-intl-localematcher
1514
+ let language = $5b160d28a433310d$var$getLanguage(locale);
1515
+ if (strings[language]) return strings[language];
1516
+ for(let key in strings){
1517
+ if (key.startsWith(language + '-')) return strings[key];
1518
+ }
1519
+ // Nothing close, use english.
1520
+ return strings[defaultLocale];
1521
+ }
1522
+ function $5b160d28a433310d$var$getLanguage(locale) {
1523
+ // @ts-ignore
1524
+ if (Intl.Locale) // @ts-ignore
1525
+ return new Intl.Locale(locale).language;
1526
+ return locale.split('-')[0];
1527
+ }
1528
+
1529
+ /*
1530
+ * Copyright 2022 Adobe. All rights reserved.
1531
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
1532
+ * you may not use this file except in compliance with the License. You may obtain a copy
1533
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
1534
+ *
1535
+ * Unless required by applicable law or agreed to in writing, software distributed under
1536
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
1537
+ * OF ANY KIND, either express or implied. See the License for the specific language
1538
+ * governing permissions and limitations under the License.
1539
+ */ const $6db58dc88e78b024$var$pluralRulesCache = new Map();
1540
+ const $6db58dc88e78b024$var$numberFormatCache = new Map();
1541
+ class $6db58dc88e78b024$export$2f817fcdc4b89ae0 {
1542
+ /** Formats a localized string for the given key with the provided variables. */ format(key, variables) {
1543
+ let message = this.strings.getStringForLocale(key, this.locale);
1544
+ return typeof message === 'function' ? message(variables, this) : message;
1545
+ }
1546
+ plural(count, options, type = 'cardinal') {
1547
+ let opt = options['=' + count];
1548
+ if (opt) return typeof opt === 'function' ? opt() : opt;
1549
+ let key = this.locale + ':' + type;
1550
+ let pluralRules = $6db58dc88e78b024$var$pluralRulesCache.get(key);
1551
+ if (!pluralRules) {
1552
+ pluralRules = new Intl.PluralRules(this.locale, {
1553
+ type: type
1554
+ });
1555
+ $6db58dc88e78b024$var$pluralRulesCache.set(key, pluralRules);
1556
+ }
1557
+ let selected = pluralRules.select(count);
1558
+ opt = options[selected] || options.other;
1559
+ return typeof opt === 'function' ? opt() : opt;
1560
+ }
1561
+ number(value) {
1562
+ let numberFormat = $6db58dc88e78b024$var$numberFormatCache.get(this.locale);
1563
+ if (!numberFormat) {
1564
+ numberFormat = new Intl.NumberFormat(this.locale);
1565
+ $6db58dc88e78b024$var$numberFormatCache.set(this.locale, numberFormat);
1566
+ }
1567
+ return numberFormat.format(value);
1568
+ }
1569
+ select(options, value) {
1570
+ let opt = options[value] || options.other;
1571
+ return typeof opt === 'function' ? opt() : opt;
1572
+ }
1573
+ constructor(locale, strings){
1574
+ this.locale = locale;
1575
+ this.strings = strings;
1576
+ }
1577
+ }
1578
+
1579
+ /*
1580
+ * Copyright 2022 Adobe. All rights reserved.
1581
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
1582
+ * you may not use this file except in compliance with the License. You may obtain a copy
1583
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
1584
+ *
1585
+ * Unless required by applicable law or agreed to in writing, software distributed under
1586
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
1587
+ * OF ANY KIND, either express or implied. See the License for the specific language
1588
+ * governing permissions and limitations under the License.
1589
+ */
1590
+
1591
+
1592
+ const $fca6afa0e843324b$var$cache = new WeakMap();
1593
+ function $fca6afa0e843324b$var$getCachedDictionary(strings) {
1594
+ let dictionary = $fca6afa0e843324b$var$cache.get(strings);
1595
+ if (!dictionary) {
1596
+ dictionary = new ($5b160d28a433310d$export$c17fa47878dc55b6)(strings);
1597
+ $fca6afa0e843324b$var$cache.set(strings, dictionary);
1598
+ }
1599
+ return dictionary;
1600
+ }
1601
+ function $fca6afa0e843324b$export$87b761675e8eaa10(strings, packageName) {
1602
+ return packageName && ($5b160d28a433310d$export$c17fa47878dc55b6).getGlobalDictionaryForPackage(packageName) || $fca6afa0e843324b$var$getCachedDictionary(strings);
1603
+ }
1604
+ function $fca6afa0e843324b$export$f12b703ca79dfbb1(strings, packageName) {
1605
+ let { locale: locale } = ($18f2051aff69b9bf$export$43bb16f9c6d9e3f7)();
1606
+ let dictionary = $fca6afa0e843324b$export$87b761675e8eaa10(strings, packageName);
1607
+ return (useMemo)(()=>new ($6db58dc88e78b024$export$2f817fcdc4b89ae0)(locale, dictionary), [
1608
+ locale,
1609
+ dictionary
1610
+ ]);
1611
+ }
1612
+
154
1613
  /*
155
1614
  * Copyright 2020 Adobe. All rights reserved.
156
1615
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
@@ -464,108 +1923,574 @@ class $6c7bd7858deea686$var$NumberParserImpl {
464
1923
  else if (options.minimumFractionDigits == null) options.minimumFractionDigits = options.maximumFractionDigits;
465
1924
  // if both are specified, let the normal Range Error be thrown
466
1925
  }
467
- this.formatter = new Intl.NumberFormat(locale, options);
468
- this.options = this.formatter.resolvedOptions();
469
- this.symbols = $6c7bd7858deea686$var$getSymbols(locale, this.formatter, this.options, options);
470
- var _this_options_minimumFractionDigits, _this_options_maximumFractionDigits;
471
- if (this.options.style === 'percent' && (((_this_options_minimumFractionDigits = this.options.minimumFractionDigits) !== null && _this_options_minimumFractionDigits !== void 0 ? _this_options_minimumFractionDigits : 0) > 18 || ((_this_options_maximumFractionDigits = this.options.maximumFractionDigits) !== null && _this_options_maximumFractionDigits !== void 0 ? _this_options_maximumFractionDigits : 0) > 18)) console.warn('NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.');
472
- }
473
- }
474
- const $6c7bd7858deea686$var$nonLiteralParts = new Set([
475
- 'decimal',
476
- 'fraction',
477
- 'integer',
478
- 'minusSign',
479
- 'plusSign',
480
- 'group'
481
- ]);
482
- // This list is derived from https://www.unicode.org/cldr/charts/43/supplemental/language_plural_rules.html#comparison and includes
483
- // all unique numbers which we need to check in order to determine all the plural forms for a given locale.
484
- // See: https://github.com/adobe/react-spectrum/pull/5134/files#r1337037855 for used script
485
- const $6c7bd7858deea686$var$pluralNumbers = [
486
- 0,
487
- 4,
488
- 2,
489
- 1,
490
- 11,
491
- 20,
492
- 3,
493
- 7,
494
- 100,
495
- 21,
496
- 0.1,
497
- 1.1
498
- ];
499
- function $6c7bd7858deea686$var$getSymbols(locale, formatter, intlOptions, originalOptions) {
500
- var _allParts_find, _posAllParts_find, _decimalParts_find, _allParts_find1;
501
- // formatter needs access to all decimal places in order to generate the correct literal strings for the plural set
502
- let symbolFormatter = new Intl.NumberFormat(locale, {
503
- ...intlOptions,
504
- // Resets so we get the full range of symbols
505
- minimumSignificantDigits: 1,
506
- maximumSignificantDigits: 21,
507
- roundingIncrement: 1,
508
- roundingPriority: 'auto',
509
- roundingMode: 'halfExpand'
510
- });
511
- // Note: some locale's don't add a group symbol until there is a ten thousands place
512
- let allParts = symbolFormatter.formatToParts(-10000.111);
513
- let posAllParts = symbolFormatter.formatToParts(10000.111);
514
- let pluralParts = $6c7bd7858deea686$var$pluralNumbers.map((n)=>symbolFormatter.formatToParts(n));
515
- var _allParts_find_value;
516
- let minusSign = (_allParts_find_value = (_allParts_find = allParts.find((p)=>p.type === 'minusSign')) === null || _allParts_find === void 0 ? void 0 : _allParts_find.value) !== null && _allParts_find_value !== void 0 ? _allParts_find_value : '-';
517
- let plusSign = (_posAllParts_find = posAllParts.find((p)=>p.type === 'plusSign')) === null || _posAllParts_find === void 0 ? void 0 : _posAllParts_find.value;
518
- // Safari does not support the signDisplay option, but our number parser polyfills it.
519
- // If no plus sign was returned, but the original options contained signDisplay, default to the '+' character.
520
- if (!plusSign && ((originalOptions === null || originalOptions === void 0 ? void 0 : originalOptions.signDisplay) === 'exceptZero' || (originalOptions === null || originalOptions === void 0 ? void 0 : originalOptions.signDisplay) === 'always')) plusSign = '+';
521
- // If maximumSignificantDigits is 1 (the minimum) then we won't get decimal characters out of the above formatters
522
- // Percent also defaults to 0 fractionDigits, so we need to make a new one that isn't percent to get an accurate decimal
523
- let decimalParts = new Intl.NumberFormat(locale, {
524
- ...intlOptions,
525
- minimumFractionDigits: 2,
526
- maximumFractionDigits: 2
527
- }).formatToParts(0.001);
528
- let decimal = (_decimalParts_find = decimalParts.find((p)=>p.type === 'decimal')) === null || _decimalParts_find === void 0 ? void 0 : _decimalParts_find.value;
529
- let group = (_allParts_find1 = allParts.find((p)=>p.type === 'group')) === null || _allParts_find1 === void 0 ? void 0 : _allParts_find1.value;
530
- // this set is also for a regex, it's all literals that might be in the string we want to eventually parse that
531
- // don't contribute to the numerical value
532
- let allPartsLiterals = allParts.filter((p)=>!$6c7bd7858deea686$var$nonLiteralParts.has(p.type)).map((p)=>$6c7bd7858deea686$var$escapeRegex(p.value));
533
- let pluralPartsLiterals = pluralParts.flatMap((p)=>p.filter((p)=>!$6c7bd7858deea686$var$nonLiteralParts.has(p.type)).map((p)=>$6c7bd7858deea686$var$escapeRegex(p.value)));
534
- let sortedLiterals = [
535
- ...new Set([
536
- ...allPartsLiterals,
537
- ...pluralPartsLiterals
538
- ])
539
- ].sort((a, b)=>b.length - a.length);
540
- let literals = sortedLiterals.length === 0 ? new RegExp('[\\p{White_Space}]', 'gu') : new RegExp(`${sortedLiterals.join('|')}|[\\p{White_Space}]`, 'gu');
541
- // These are for replacing non-latn characters with the latn equivalent
542
- let numerals = [
543
- ...new Intl.NumberFormat(intlOptions.locale, {
544
- useGrouping: false
545
- }).format(9876543210)
546
- ].reverse();
547
- let indexes = new Map(numerals.map((d, i)=>[
548
- d,
549
- i
550
- ]));
551
- let numeral = new RegExp(`[${numerals.join('')}]`, 'g');
552
- let index = (d)=>String(indexes.get(d));
1926
+ this.formatter = new Intl.NumberFormat(locale, options);
1927
+ this.options = this.formatter.resolvedOptions();
1928
+ this.symbols = $6c7bd7858deea686$var$getSymbols(locale, this.formatter, this.options, options);
1929
+ var _this_options_minimumFractionDigits, _this_options_maximumFractionDigits;
1930
+ if (this.options.style === 'percent' && (((_this_options_minimumFractionDigits = this.options.minimumFractionDigits) !== null && _this_options_minimumFractionDigits !== void 0 ? _this_options_minimumFractionDigits : 0) > 18 || ((_this_options_maximumFractionDigits = this.options.maximumFractionDigits) !== null && _this_options_maximumFractionDigits !== void 0 ? _this_options_maximumFractionDigits : 0) > 18)) console.warn('NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.');
1931
+ }
1932
+ }
1933
+ const $6c7bd7858deea686$var$nonLiteralParts = new Set([
1934
+ 'decimal',
1935
+ 'fraction',
1936
+ 'integer',
1937
+ 'minusSign',
1938
+ 'plusSign',
1939
+ 'group'
1940
+ ]);
1941
+ // This list is derived from https://www.unicode.org/cldr/charts/43/supplemental/language_plural_rules.html#comparison and includes
1942
+ // all unique numbers which we need to check in order to determine all the plural forms for a given locale.
1943
+ // See: https://github.com/adobe/react-spectrum/pull/5134/files#r1337037855 for used script
1944
+ const $6c7bd7858deea686$var$pluralNumbers = [
1945
+ 0,
1946
+ 4,
1947
+ 2,
1948
+ 1,
1949
+ 11,
1950
+ 20,
1951
+ 3,
1952
+ 7,
1953
+ 100,
1954
+ 21,
1955
+ 0.1,
1956
+ 1.1
1957
+ ];
1958
+ function $6c7bd7858deea686$var$getSymbols(locale, formatter, intlOptions, originalOptions) {
1959
+ var _allParts_find, _posAllParts_find, _decimalParts_find, _allParts_find1;
1960
+ // formatter needs access to all decimal places in order to generate the correct literal strings for the plural set
1961
+ let symbolFormatter = new Intl.NumberFormat(locale, {
1962
+ ...intlOptions,
1963
+ // Resets so we get the full range of symbols
1964
+ minimumSignificantDigits: 1,
1965
+ maximumSignificantDigits: 21,
1966
+ roundingIncrement: 1,
1967
+ roundingPriority: 'auto',
1968
+ roundingMode: 'halfExpand'
1969
+ });
1970
+ // Note: some locale's don't add a group symbol until there is a ten thousands place
1971
+ let allParts = symbolFormatter.formatToParts(-10000.111);
1972
+ let posAllParts = symbolFormatter.formatToParts(10000.111);
1973
+ let pluralParts = $6c7bd7858deea686$var$pluralNumbers.map((n)=>symbolFormatter.formatToParts(n));
1974
+ var _allParts_find_value;
1975
+ let minusSign = (_allParts_find_value = (_allParts_find = allParts.find((p)=>p.type === 'minusSign')) === null || _allParts_find === void 0 ? void 0 : _allParts_find.value) !== null && _allParts_find_value !== void 0 ? _allParts_find_value : '-';
1976
+ let plusSign = (_posAllParts_find = posAllParts.find((p)=>p.type === 'plusSign')) === null || _posAllParts_find === void 0 ? void 0 : _posAllParts_find.value;
1977
+ // Safari does not support the signDisplay option, but our number parser polyfills it.
1978
+ // If no plus sign was returned, but the original options contained signDisplay, default to the '+' character.
1979
+ if (!plusSign && ((originalOptions === null || originalOptions === void 0 ? void 0 : originalOptions.signDisplay) === 'exceptZero' || (originalOptions === null || originalOptions === void 0 ? void 0 : originalOptions.signDisplay) === 'always')) plusSign = '+';
1980
+ // If maximumSignificantDigits is 1 (the minimum) then we won't get decimal characters out of the above formatters
1981
+ // Percent also defaults to 0 fractionDigits, so we need to make a new one that isn't percent to get an accurate decimal
1982
+ let decimalParts = new Intl.NumberFormat(locale, {
1983
+ ...intlOptions,
1984
+ minimumFractionDigits: 2,
1985
+ maximumFractionDigits: 2
1986
+ }).formatToParts(0.001);
1987
+ let decimal = (_decimalParts_find = decimalParts.find((p)=>p.type === 'decimal')) === null || _decimalParts_find === void 0 ? void 0 : _decimalParts_find.value;
1988
+ let group = (_allParts_find1 = allParts.find((p)=>p.type === 'group')) === null || _allParts_find1 === void 0 ? void 0 : _allParts_find1.value;
1989
+ // this set is also for a regex, it's all literals that might be in the string we want to eventually parse that
1990
+ // don't contribute to the numerical value
1991
+ let allPartsLiterals = allParts.filter((p)=>!$6c7bd7858deea686$var$nonLiteralParts.has(p.type)).map((p)=>$6c7bd7858deea686$var$escapeRegex(p.value));
1992
+ let pluralPartsLiterals = pluralParts.flatMap((p)=>p.filter((p)=>!$6c7bd7858deea686$var$nonLiteralParts.has(p.type)).map((p)=>$6c7bd7858deea686$var$escapeRegex(p.value)));
1993
+ let sortedLiterals = [
1994
+ ...new Set([
1995
+ ...allPartsLiterals,
1996
+ ...pluralPartsLiterals
1997
+ ])
1998
+ ].sort((a, b)=>b.length - a.length);
1999
+ let literals = sortedLiterals.length === 0 ? new RegExp('[\\p{White_Space}]', 'gu') : new RegExp(`${sortedLiterals.join('|')}|[\\p{White_Space}]`, 'gu');
2000
+ // These are for replacing non-latn characters with the latn equivalent
2001
+ let numerals = [
2002
+ ...new Intl.NumberFormat(intlOptions.locale, {
2003
+ useGrouping: false
2004
+ }).format(9876543210)
2005
+ ].reverse();
2006
+ let indexes = new Map(numerals.map((d, i)=>[
2007
+ d,
2008
+ i
2009
+ ]));
2010
+ let numeral = new RegExp(`[${numerals.join('')}]`, 'g');
2011
+ let index = (d)=>String(indexes.get(d));
2012
+ return {
2013
+ minusSign: minusSign,
2014
+ plusSign: plusSign,
2015
+ decimal: decimal,
2016
+ group: group,
2017
+ literals: literals,
2018
+ numeral: numeral,
2019
+ index: index
2020
+ };
2021
+ }
2022
+ function $6c7bd7858deea686$var$replaceAll(str, find, replace) {
2023
+ if (str.replaceAll) return str.replaceAll(find, replace);
2024
+ return str.split(find).join(replace);
2025
+ }
2026
+ function $6c7bd7858deea686$var$escapeRegex(string) {
2027
+ return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
2028
+ }
2029
+
2030
+ /*
2031
+ * Copyright 2020 Adobe. All rights reserved.
2032
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
2033
+ * you may not use this file except in compliance with the License. You may obtain a copy
2034
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
2035
+ *
2036
+ * Unless required by applicable law or agreed to in writing, software distributed under
2037
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
2038
+ * OF ANY KIND, either express or implied. See the License for the specific language
2039
+ * governing permissions and limitations under the License.
2040
+ */
2041
+
2042
+
2043
+ function $a916eb452884faea$export$b7a616150fdb9f44(options = {}) {
2044
+ let { locale: locale } = ($18f2051aff69b9bf$export$43bb16f9c6d9e3f7)();
2045
+ return (useMemo)(()=>new ($488c6ddbf4ef74c2$export$cc77c4ff7e8673c5)(locale, options), [
2046
+ locale,
2047
+ options
2048
+ ]);
2049
+ }
2050
+
2051
+ /*
2052
+ * Copyright 2020 Adobe. All rights reserved.
2053
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
2054
+ * you may not use this file except in compliance with the License. You may obtain a copy
2055
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
2056
+ *
2057
+ * Unless required by applicable law or agreed to in writing, software distributed under
2058
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
2059
+ * OF ANY KIND, either express or implied. See the License for the specific language
2060
+ * governing permissions and limitations under the License.
2061
+ */
2062
+
2063
+ function $8a9cb279dc87e130$export$525bc4921d56d4a(nativeEvent) {
2064
+ let event = nativeEvent;
2065
+ event.nativeEvent = nativeEvent;
2066
+ event.isDefaultPrevented = ()=>event.defaultPrevented;
2067
+ // cancelBubble is technically deprecated in the spec, but still supported in all browsers.
2068
+ event.isPropagationStopped = ()=>event.cancelBubble;
2069
+ event.persist = ()=>{};
2070
+ return event;
2071
+ }
2072
+ function $8a9cb279dc87e130$export$c2b7abe5d61ec696(event, target) {
2073
+ Object.defineProperty(event, 'target', {
2074
+ value: target
2075
+ });
2076
+ Object.defineProperty(event, 'currentTarget', {
2077
+ value: target
2078
+ });
2079
+ }
2080
+ function $8a9cb279dc87e130$export$715c682d09d639cc(onBlur) {
2081
+ let stateRef = (useRef)({
2082
+ isFocused: false,
2083
+ observer: null
2084
+ });
2085
+ // Clean up MutationObserver on unmount. See below.
2086
+ ($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
2087
+ const state = stateRef.current;
2088
+ return ()=>{
2089
+ if (state.observer) {
2090
+ state.observer.disconnect();
2091
+ state.observer = null;
2092
+ }
2093
+ };
2094
+ }, []);
2095
+ let dispatchBlur = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)((e)=>{
2096
+ onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
2097
+ });
2098
+ // This function is called during a React onFocus event.
2099
+ return (useCallback)((e)=>{
2100
+ // React does not fire onBlur when an element is disabled. https://github.com/facebook/react/issues/9142
2101
+ // Most browsers fire a native focusout event in this case, except for Firefox. In that case, we use a
2102
+ // MutationObserver to watch for the disabled attribute, and dispatch these events ourselves.
2103
+ // For browsers that do, focusout fires before the MutationObserver, so onBlur should not fire twice.
2104
+ if (e.target instanceof HTMLButtonElement || e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement || e.target instanceof HTMLSelectElement) {
2105
+ stateRef.current.isFocused = true;
2106
+ let target = e.target;
2107
+ let onBlurHandler = (e)=>{
2108
+ stateRef.current.isFocused = false;
2109
+ if (target.disabled) {
2110
+ // For backward compatibility, dispatch a (fake) React synthetic event.
2111
+ let event = $8a9cb279dc87e130$export$525bc4921d56d4a(e);
2112
+ dispatchBlur(event);
2113
+ }
2114
+ // We no longer need the MutationObserver once the target is blurred.
2115
+ if (stateRef.current.observer) {
2116
+ stateRef.current.observer.disconnect();
2117
+ stateRef.current.observer = null;
2118
+ }
2119
+ };
2120
+ target.addEventListener('focusout', onBlurHandler, {
2121
+ once: true
2122
+ });
2123
+ stateRef.current.observer = new MutationObserver(()=>{
2124
+ if (stateRef.current.isFocused && target.disabled) {
2125
+ var _stateRef_current_observer;
2126
+ (_stateRef_current_observer = stateRef.current.observer) === null || _stateRef_current_observer === void 0 ? void 0 : _stateRef_current_observer.disconnect();
2127
+ let relatedTargetEl = target === document.activeElement ? null : document.activeElement;
2128
+ target.dispatchEvent(new FocusEvent('blur', {
2129
+ relatedTarget: relatedTargetEl
2130
+ }));
2131
+ target.dispatchEvent(new FocusEvent('focusout', {
2132
+ bubbles: true,
2133
+ relatedTarget: relatedTargetEl
2134
+ }));
2135
+ }
2136
+ });
2137
+ stateRef.current.observer.observe(target, {
2138
+ attributes: true,
2139
+ attributeFilter: [
2140
+ 'disabled'
2141
+ ]
2142
+ });
2143
+ }
2144
+ }, [
2145
+ dispatchBlur
2146
+ ]);
2147
+ }
2148
+ let $8a9cb279dc87e130$export$fda7da73ab5d4c48 = false;
2149
+
2150
+ /*
2151
+ * Copyright 2020 Adobe. All rights reserved.
2152
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
2153
+ * you may not use this file except in compliance with the License. You may obtain a copy
2154
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
2155
+ *
2156
+ * Unless required by applicable law or agreed to in writing, software distributed under
2157
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
2158
+ * OF ANY KIND, either express or implied. See the License for the specific language
2159
+ * governing permissions and limitations under the License.
2160
+ */ // Portions of the code in this file are based on code from react.
2161
+ // Original licensing for the following can be found in the
2162
+ // NOTICE file in the root directory of this source tree.
2163
+ // See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions
2164
+
2165
+
2166
+
2167
+
2168
+ let $507fabe10e71c6fb$var$currentModality = null;
2169
+ let $507fabe10e71c6fb$var$changeHandlers = new Set();
2170
+ let $507fabe10e71c6fb$export$d90243b58daecda7 = new Map(); // We use a map here to support setting event listeners across multiple document objects.
2171
+ let $507fabe10e71c6fb$var$hasEventBeforeFocus = false;
2172
+ let $507fabe10e71c6fb$var$hasBlurredWindowRecently = false;
2173
+ // Only Tab or Esc keys will make focus visible on text input elements
2174
+ const $507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS = {
2175
+ Tab: true,
2176
+ Escape: true
2177
+ };
2178
+ function $507fabe10e71c6fb$var$triggerChangeHandlers(modality, e) {
2179
+ for (let handler of $507fabe10e71c6fb$var$changeHandlers)handler(modality, e);
2180
+ }
2181
+ /**
2182
+ * Helper function to determine if a KeyboardEvent is unmodified and could make keyboard focus styles visible.
2183
+ */ function $507fabe10e71c6fb$var$isValidKey(e) {
2184
+ // Control and Shift keys trigger when navigating back to the tab with keyboard.
2185
+ return !(e.metaKey || !($c87311424ea30a05$export$9ac100e40613ea10)() && e.altKey || e.ctrlKey || e.key === 'Control' || e.key === 'Shift' || e.key === 'Meta');
2186
+ }
2187
+ function $507fabe10e71c6fb$var$handleKeyboardEvent(e) {
2188
+ $507fabe10e71c6fb$var$hasEventBeforeFocus = true;
2189
+ if ($507fabe10e71c6fb$var$isValidKey(e)) {
2190
+ $507fabe10e71c6fb$var$currentModality = 'keyboard';
2191
+ $507fabe10e71c6fb$var$triggerChangeHandlers('keyboard', e);
2192
+ }
2193
+ }
2194
+ function $507fabe10e71c6fb$var$handlePointerEvent(e) {
2195
+ $507fabe10e71c6fb$var$currentModality = 'pointer';
2196
+ if (e.type === 'mousedown' || e.type === 'pointerdown') {
2197
+ $507fabe10e71c6fb$var$hasEventBeforeFocus = true;
2198
+ $507fabe10e71c6fb$var$triggerChangeHandlers('pointer', e);
2199
+ }
2200
+ }
2201
+ function $507fabe10e71c6fb$var$handleClickEvent(e) {
2202
+ if (($6a7db85432448f7f$export$60278871457622de)(e)) {
2203
+ $507fabe10e71c6fb$var$hasEventBeforeFocus = true;
2204
+ $507fabe10e71c6fb$var$currentModality = 'virtual';
2205
+ }
2206
+ }
2207
+ function $507fabe10e71c6fb$var$handleFocusEvent(e) {
2208
+ // Firefox fires two extra focus events when the user first clicks into an iframe:
2209
+ // first on the window, then on the document. We ignore these events so they don't
2210
+ // cause keyboard focus rings to appear.
2211
+ if (e.target === window || e.target === document || ($8a9cb279dc87e130$export$fda7da73ab5d4c48) || !e.isTrusted) return;
2212
+ // If a focus event occurs without a preceding keyboard or pointer event, switch to virtual modality.
2213
+ // This occurs, for example, when navigating a form with the next/previous buttons on iOS.
2214
+ if (!$507fabe10e71c6fb$var$hasEventBeforeFocus && !$507fabe10e71c6fb$var$hasBlurredWindowRecently) {
2215
+ $507fabe10e71c6fb$var$currentModality = 'virtual';
2216
+ $507fabe10e71c6fb$var$triggerChangeHandlers('virtual', e);
2217
+ }
2218
+ $507fabe10e71c6fb$var$hasEventBeforeFocus = false;
2219
+ $507fabe10e71c6fb$var$hasBlurredWindowRecently = false;
2220
+ }
2221
+ function $507fabe10e71c6fb$var$handleWindowBlur() {
2222
+ // When the window is blurred, reset state. This is necessary when tabbing out of the window,
2223
+ // for example, since a subsequent focus event won't be fired.
2224
+ $507fabe10e71c6fb$var$hasEventBeforeFocus = false;
2225
+ $507fabe10e71c6fb$var$hasBlurredWindowRecently = true;
2226
+ }
2227
+ /**
2228
+ * Setup global event listeners to control when keyboard focus style should be visible.
2229
+ */ function $507fabe10e71c6fb$var$setupGlobalFocusEvents(element) {
2230
+ if (typeof window === 'undefined' || typeof document === 'undefined' || $507fabe10e71c6fb$export$d90243b58daecda7.get(($431fbd86ca7dc216$export$f21a1ffae260145a)(element))) return;
2231
+ const windowObject = ($431fbd86ca7dc216$export$f21a1ffae260145a)(element);
2232
+ const documentObject = ($431fbd86ca7dc216$export$b204af158042fbac)(element);
2233
+ // Programmatic focus() calls shouldn't affect the current input modality.
2234
+ // However, we need to detect other cases when a focus event occurs without
2235
+ // a preceding user event (e.g. screen reader focus). Overriding the focus
2236
+ // method on HTMLElement.prototype is a bit hacky, but works.
2237
+ let focus = windowObject.HTMLElement.prototype.focus;
2238
+ windowObject.HTMLElement.prototype.focus = function() {
2239
+ $507fabe10e71c6fb$var$hasEventBeforeFocus = true;
2240
+ focus.apply(this, arguments);
2241
+ };
2242
+ documentObject.addEventListener('keydown', $507fabe10e71c6fb$var$handleKeyboardEvent, true);
2243
+ documentObject.addEventListener('keyup', $507fabe10e71c6fb$var$handleKeyboardEvent, true);
2244
+ documentObject.addEventListener('click', $507fabe10e71c6fb$var$handleClickEvent, true);
2245
+ // Register focus events on the window so they are sure to happen
2246
+ // before React's event listeners (registered on the document).
2247
+ windowObject.addEventListener('focus', $507fabe10e71c6fb$var$handleFocusEvent, true);
2248
+ windowObject.addEventListener('blur', $507fabe10e71c6fb$var$handleWindowBlur, false);
2249
+ if (typeof PointerEvent !== 'undefined') {
2250
+ documentObject.addEventListener('pointerdown', $507fabe10e71c6fb$var$handlePointerEvent, true);
2251
+ documentObject.addEventListener('pointermove', $507fabe10e71c6fb$var$handlePointerEvent, true);
2252
+ documentObject.addEventListener('pointerup', $507fabe10e71c6fb$var$handlePointerEvent, true);
2253
+ } else if (process.env.NODE_ENV === 'test') {
2254
+ documentObject.addEventListener('mousedown', $507fabe10e71c6fb$var$handlePointerEvent, true);
2255
+ documentObject.addEventListener('mousemove', $507fabe10e71c6fb$var$handlePointerEvent, true);
2256
+ documentObject.addEventListener('mouseup', $507fabe10e71c6fb$var$handlePointerEvent, true);
2257
+ }
2258
+ // Add unmount handler
2259
+ windowObject.addEventListener('beforeunload', ()=>{
2260
+ $507fabe10e71c6fb$var$tearDownWindowFocusTracking(element);
2261
+ }, {
2262
+ once: true
2263
+ });
2264
+ $507fabe10e71c6fb$export$d90243b58daecda7.set(windowObject, {
2265
+ focus: focus
2266
+ });
2267
+ }
2268
+ const $507fabe10e71c6fb$var$tearDownWindowFocusTracking = (element, loadListener)=>{
2269
+ const windowObject = ($431fbd86ca7dc216$export$f21a1ffae260145a)(element);
2270
+ const documentObject = ($431fbd86ca7dc216$export$b204af158042fbac)(element);
2271
+ if (loadListener) documentObject.removeEventListener('DOMContentLoaded', loadListener);
2272
+ if (!$507fabe10e71c6fb$export$d90243b58daecda7.has(windowObject)) return;
2273
+ windowObject.HTMLElement.prototype.focus = $507fabe10e71c6fb$export$d90243b58daecda7.get(windowObject).focus;
2274
+ documentObject.removeEventListener('keydown', $507fabe10e71c6fb$var$handleKeyboardEvent, true);
2275
+ documentObject.removeEventListener('keyup', $507fabe10e71c6fb$var$handleKeyboardEvent, true);
2276
+ documentObject.removeEventListener('click', $507fabe10e71c6fb$var$handleClickEvent, true);
2277
+ windowObject.removeEventListener('focus', $507fabe10e71c6fb$var$handleFocusEvent, true);
2278
+ windowObject.removeEventListener('blur', $507fabe10e71c6fb$var$handleWindowBlur, false);
2279
+ if (typeof PointerEvent !== 'undefined') {
2280
+ documentObject.removeEventListener('pointerdown', $507fabe10e71c6fb$var$handlePointerEvent, true);
2281
+ documentObject.removeEventListener('pointermove', $507fabe10e71c6fb$var$handlePointerEvent, true);
2282
+ documentObject.removeEventListener('pointerup', $507fabe10e71c6fb$var$handlePointerEvent, true);
2283
+ } else if (process.env.NODE_ENV === 'test') {
2284
+ documentObject.removeEventListener('mousedown', $507fabe10e71c6fb$var$handlePointerEvent, true);
2285
+ documentObject.removeEventListener('mousemove', $507fabe10e71c6fb$var$handlePointerEvent, true);
2286
+ documentObject.removeEventListener('mouseup', $507fabe10e71c6fb$var$handlePointerEvent, true);
2287
+ }
2288
+ $507fabe10e71c6fb$export$d90243b58daecda7.delete(windowObject);
2289
+ };
2290
+ function $507fabe10e71c6fb$export$2f1888112f558a7d(element) {
2291
+ const documentObject = ($431fbd86ca7dc216$export$b204af158042fbac)(element);
2292
+ let loadListener;
2293
+ if (documentObject.readyState !== 'loading') $507fabe10e71c6fb$var$setupGlobalFocusEvents(element);
2294
+ else {
2295
+ loadListener = ()=>{
2296
+ $507fabe10e71c6fb$var$setupGlobalFocusEvents(element);
2297
+ };
2298
+ documentObject.addEventListener('DOMContentLoaded', loadListener);
2299
+ }
2300
+ return ()=>$507fabe10e71c6fb$var$tearDownWindowFocusTracking(element, loadListener);
2301
+ }
2302
+ // Server-side rendering does not have the document object defined
2303
+ // eslint-disable-next-line no-restricted-globals
2304
+ if (typeof document !== 'undefined') $507fabe10e71c6fb$export$2f1888112f558a7d();
2305
+ function $507fabe10e71c6fb$export$b9b3dfddab17db27() {
2306
+ return $507fabe10e71c6fb$var$currentModality !== 'pointer';
2307
+ }
2308
+ function $507fabe10e71c6fb$export$630ff653c5ada6a9() {
2309
+ return $507fabe10e71c6fb$var$currentModality;
2310
+ }
2311
+ function $507fabe10e71c6fb$export$8397ddfc504fdb9a(modality) {
2312
+ $507fabe10e71c6fb$var$currentModality = modality;
2313
+ $507fabe10e71c6fb$var$triggerChangeHandlers(modality, null);
2314
+ }
2315
+ const $507fabe10e71c6fb$var$nonTextInputTypes = new Set([
2316
+ 'checkbox',
2317
+ 'radio',
2318
+ 'range',
2319
+ 'color',
2320
+ 'file',
2321
+ 'image',
2322
+ 'button',
2323
+ 'submit',
2324
+ 'reset'
2325
+ ]);
2326
+ /**
2327
+ * If this is attached to text input component, return if the event is a focus event (Tab/Escape keys pressed) so that
2328
+ * focus visible style can be properly set.
2329
+ */ function $507fabe10e71c6fb$var$isKeyboardFocusEvent(isTextInput, modality, e) {
2330
+ let document1 = ($431fbd86ca7dc216$export$b204af158042fbac)(e === null || e === void 0 ? void 0 : e.target);
2331
+ const IHTMLInputElement = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(e === null || e === void 0 ? void 0 : e.target).HTMLInputElement : HTMLInputElement;
2332
+ const IHTMLTextAreaElement = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(e === null || e === void 0 ? void 0 : e.target).HTMLTextAreaElement : HTMLTextAreaElement;
2333
+ const IHTMLElement = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(e === null || e === void 0 ? void 0 : e.target).HTMLElement : HTMLElement;
2334
+ const IKeyboardEvent = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(e === null || e === void 0 ? void 0 : e.target).KeyboardEvent : KeyboardEvent;
2335
+ // 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)
2336
+ // we need to rely on the user passing isTextInput into here. This way we can skip toggling focus visiblity for said input element
2337
+ isTextInput = isTextInput || document1.activeElement instanceof IHTMLInputElement && !$507fabe10e71c6fb$var$nonTextInputTypes.has(document1.activeElement.type) || document1.activeElement instanceof IHTMLTextAreaElement || document1.activeElement instanceof IHTMLElement && document1.activeElement.isContentEditable;
2338
+ return !(isTextInput && modality === 'keyboard' && e instanceof IKeyboardEvent && !$507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS[e.key]);
2339
+ }
2340
+ function $507fabe10e71c6fb$export$ec71b4b83ac08ec3(fn, deps, opts) {
2341
+ $507fabe10e71c6fb$var$setupGlobalFocusEvents();
2342
+ (useEffect)(()=>{
2343
+ let handler = (modality, e)=>{
2344
+ // We want to early return for any keyboard events that occur inside text inputs EXCEPT for Tab and Escape
2345
+ if (!$507fabe10e71c6fb$var$isKeyboardFocusEvent(!!(opts === null || opts === void 0 ? void 0 : opts.isTextInput), modality, e)) return;
2346
+ fn($507fabe10e71c6fb$export$b9b3dfddab17db27());
2347
+ };
2348
+ $507fabe10e71c6fb$var$changeHandlers.add(handler);
2349
+ return ()=>{
2350
+ $507fabe10e71c6fb$var$changeHandlers.delete(handler);
2351
+ };
2352
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2353
+ }, deps);
2354
+ }
2355
+
2356
+ /*
2357
+ * Copyright 2020 Adobe. All rights reserved.
2358
+ * This file is licensed to you under the Apache License, Version 2.0 (the 'License');
2359
+ * you may not use this file except in compliance with the License. You may obtain a copy
2360
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
2361
+ *
2362
+ * Unless required by applicable law or agreed to in writing, software distributed under
2363
+ * the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
2364
+ * OF ANY KIND, either express or implied. See the License for the specific language
2365
+ * governing permissions and limitations under the License.
2366
+ */
2367
+
2368
+ function $3ad3f6e1647bc98d$export$80f3e147d781571c(element) {
2369
+ // If the user is interacting with a virtual cursor, e.g. screen reader, then
2370
+ // wait until after any animated transitions that are currently occurring on
2371
+ // the page before shifting focus. This avoids issues with VoiceOver on iOS
2372
+ // causing the page to scroll when moving focus if the element is transitioning
2373
+ // from off the screen.
2374
+ const ownerDocument = ($431fbd86ca7dc216$export$b204af158042fbac)(element);
2375
+ const activeElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)(ownerDocument);
2376
+ if (($507fabe10e71c6fb$export$630ff653c5ada6a9)() === 'virtual') {
2377
+ let lastFocusedElement = activeElement;
2378
+ ($bbed8b41f857bcc0$export$24490316f764c430)(()=>{
2379
+ // If focus did not move and the element is still in the document, focus it.
2380
+ if (($d4ee10de306f2510$export$cd4e5573fbe2b576)(ownerDocument) === lastFocusedElement && element.isConnected) ($7215afc6de606d6b$export$de79e2c695e052f3)(element);
2381
+ });
2382
+ } else ($7215afc6de606d6b$export$de79e2c695e052f3)(element);
2383
+ }
2384
+
2385
+ /*
2386
+ * Copyright 2020 Adobe. All rights reserved.
2387
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
2388
+ * you may not use this file except in compliance with the License. You may obtain a copy
2389
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
2390
+ *
2391
+ * Unless required by applicable law or agreed to in writing, software distributed under
2392
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
2393
+ * OF ANY KIND, either express or implied. See the License for the specific language
2394
+ * governing permissions and limitations under the License.
2395
+ */ // Portions of the code in this file are based on code from react.
2396
+ // Original licensing for the following can be found in the
2397
+ // NOTICE file in the root directory of this source tree.
2398
+ // See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions
2399
+
2400
+
2401
+
2402
+ function $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props) {
2403
+ let { isDisabled: isDisabled, onFocus: onFocusProp, onBlur: onBlurProp, onFocusChange: onFocusChange } = props;
2404
+ const onBlur = (useCallback)((e)=>{
2405
+ if (e.target === e.currentTarget) {
2406
+ if (onBlurProp) onBlurProp(e);
2407
+ if (onFocusChange) onFocusChange(false);
2408
+ return true;
2409
+ }
2410
+ }, [
2411
+ onBlurProp,
2412
+ onFocusChange
2413
+ ]);
2414
+ const onSyntheticFocus = ($8a9cb279dc87e130$export$715c682d09d639cc)(onBlur);
2415
+ const onFocus = (useCallback)((e)=>{
2416
+ // Double check that document.activeElement actually matches e.target in case a previously chained
2417
+ // focus handler already moved focus somewhere else.
2418
+ const ownerDocument = ($431fbd86ca7dc216$export$b204af158042fbac)(e.target);
2419
+ const activeElement = ownerDocument ? ($d4ee10de306f2510$export$cd4e5573fbe2b576)(ownerDocument) : ($d4ee10de306f2510$export$cd4e5573fbe2b576)();
2420
+ if (e.target === e.currentTarget && activeElement === ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e.nativeEvent)) {
2421
+ if (onFocusProp) onFocusProp(e);
2422
+ if (onFocusChange) onFocusChange(true);
2423
+ onSyntheticFocus(e);
2424
+ }
2425
+ }, [
2426
+ onFocusChange,
2427
+ onFocusProp,
2428
+ onSyntheticFocus
2429
+ ]);
553
2430
  return {
554
- minusSign: minusSign,
555
- plusSign: plusSign,
556
- decimal: decimal,
557
- group: group,
558
- literals: literals,
559
- numeral: numeral,
560
- index: index
2431
+ focusProps: {
2432
+ onFocus: !isDisabled && (onFocusProp || onFocusChange || onBlurProp) ? onFocus : undefined,
2433
+ onBlur: !isDisabled && (onBlurProp || onFocusChange) ? onBlur : undefined
2434
+ }
561
2435
  };
562
2436
  }
563
- function $6c7bd7858deea686$var$replaceAll(str, find, replace) {
564
- if (str.replaceAll) return str.replaceAll(find, replace);
565
- return str.split(find).join(replace);
2437
+
2438
+ /*
2439
+ * Copyright 2020 Adobe. All rights reserved.
2440
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
2441
+ * you may not use this file except in compliance with the License. You may obtain a copy
2442
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
2443
+ *
2444
+ * Unless required by applicable law or agreed to in writing, software distributed under
2445
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
2446
+ * OF ANY KIND, either express or implied. See the License for the specific language
2447
+ * governing permissions and limitations under the License.
2448
+ */ function $93925083ecbb358c$export$48d1ea6320830260(handler) {
2449
+ if (!handler) return undefined;
2450
+ let shouldStopPropagation = true;
2451
+ return (e)=>{
2452
+ let event = {
2453
+ ...e,
2454
+ preventDefault () {
2455
+ e.preventDefault();
2456
+ },
2457
+ isDefaultPrevented () {
2458
+ return e.isDefaultPrevented();
2459
+ },
2460
+ stopPropagation () {
2461
+ if (shouldStopPropagation && process.env.NODE_ENV !== 'production') console.error('stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.');
2462
+ else shouldStopPropagation = true;
2463
+ },
2464
+ continuePropagation () {
2465
+ shouldStopPropagation = false;
2466
+ },
2467
+ isPropagationStopped () {
2468
+ return shouldStopPropagation;
2469
+ }
2470
+ };
2471
+ handler(event);
2472
+ if (shouldStopPropagation) e.stopPropagation();
2473
+ };
566
2474
  }
567
- function $6c7bd7858deea686$var$escapeRegex(string) {
568
- return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
2475
+
2476
+ /*
2477
+ * Copyright 2020 Adobe. All rights reserved.
2478
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
2479
+ * you may not use this file except in compliance with the License. You may obtain a copy
2480
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
2481
+ *
2482
+ * Unless required by applicable law or agreed to in writing, software distributed under
2483
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
2484
+ * OF ANY KIND, either express or implied. See the License for the specific language
2485
+ * governing permissions and limitations under the License.
2486
+ */
2487
+ function $46d819fcbaf35654$export$8f71654801c2f7cd(props) {
2488
+ return {
2489
+ keyboardProps: props.isDisabled ? {} : {
2490
+ onKeyDown: ($93925083ecbb358c$export$48d1ea6320830260)(props.onKeyDown),
2491
+ onKeyUp: ($93925083ecbb358c$export$48d1ea6320830260)(props.onKeyUp)
2492
+ }
2493
+ };
569
2494
  }
570
2495
 
571
2496
  /*
@@ -581,12 +2506,279 @@ function $6c7bd7858deea686$var$escapeRegex(string) {
581
2506
  */
582
2507
 
583
2508
 
584
- function $a916eb452884faea$export$b7a616150fdb9f44(options = {}) {
585
- let { locale: locale } = ($18f2051aff69b9bf$export$43bb16f9c6d9e3f7)();
586
- return (useMemo)(()=>new ($488c6ddbf4ef74c2$export$cc77c4ff7e8673c5)(locale, options), [
587
- locale,
588
- options
2509
+
2510
+
2511
+ let $f645667febf57a63$export$f9762fab77588ecb = /*#__PURE__*/ (React__default).createContext(null);
2512
+ function $f645667febf57a63$var$useFocusableContext(ref) {
2513
+ let context = (useContext)($f645667febf57a63$export$f9762fab77588ecb) || {};
2514
+ ($e7801be82b4b2a53$export$4debdb1a3f0fa79e)(context, ref);
2515
+ // eslint-disable-next-line
2516
+ let { ref: _, ...otherProps } = context;
2517
+ return otherProps;
2518
+ }
2519
+ function $f645667febf57a63$export$4c014de7c8940b4c(props, domRef) {
2520
+ let { focusProps: focusProps } = ($a1ea59d68270f0dd$export$f8168d8dd8fd66e6)(props);
2521
+ let { keyboardProps: keyboardProps } = ($46d819fcbaf35654$export$8f71654801c2f7cd)(props);
2522
+ let interactions = ($3ef42575df84b30b$export$9d1611c77c2fe928)(focusProps, keyboardProps);
2523
+ let domProps = $f645667febf57a63$var$useFocusableContext(domRef);
2524
+ let interactionProps = props.isDisabled ? {} : domProps;
2525
+ let autoFocusRef = (useRef)(props.autoFocus);
2526
+ (useEffect)(()=>{
2527
+ if (autoFocusRef.current && domRef.current) ($3ad3f6e1647bc98d$export$80f3e147d781571c)(domRef.current);
2528
+ autoFocusRef.current = false;
2529
+ }, [
2530
+ domRef
2531
+ ]);
2532
+ // Always set a tabIndex so that Safari allows focusing native buttons and inputs.
2533
+ let tabIndex = props.excludeFromTabOrder ? -1 : 0;
2534
+ if (props.isDisabled) tabIndex = undefined;
2535
+ return {
2536
+ focusableProps: ($3ef42575df84b30b$export$9d1611c77c2fe928)({
2537
+ ...interactions,
2538
+ tabIndex: tabIndex
2539
+ }, interactionProps)
2540
+ };
2541
+ }
2542
+
2543
+ /*
2544
+ * Copyright 2020 Adobe. All rights reserved.
2545
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
2546
+ * you may not use this file except in compliance with the License. You may obtain a copy
2547
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
2548
+ *
2549
+ * Unless required by applicable law or agreed to in writing, software distributed under
2550
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
2551
+ * OF ANY KIND, either express or implied. See the License for the specific language
2552
+ * governing permissions and limitations under the License.
2553
+ */ // Portions of the code in this file are based on code from react.
2554
+ // Original licensing for the following can be found in the
2555
+ // NOTICE file in the root directory of this source tree.
2556
+ // See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions
2557
+
2558
+
2559
+
2560
+ function $9ab94262bd0047c7$export$420e68273165f4ec(props) {
2561
+ let { isDisabled: isDisabled, onBlurWithin: onBlurWithin, onFocusWithin: onFocusWithin, onFocusWithinChange: onFocusWithinChange } = props;
2562
+ let state = (useRef)({
2563
+ isFocusWithin: false
2564
+ });
2565
+ let { addGlobalListener: addGlobalListener, removeAllGlobalListeners: removeAllGlobalListeners } = ($03deb23ff14920c4$export$4eaf04e54aa8eed6)();
2566
+ let onBlur = (useCallback)((e)=>{
2567
+ // Ignore events bubbling through portals.
2568
+ if (!e.currentTarget.contains(e.target)) return;
2569
+ // We don't want to trigger onBlurWithin and then immediately onFocusWithin again
2570
+ // when moving focus inside the element. Only trigger if the currentTarget doesn't
2571
+ // include the relatedTarget (where focus is moving).
2572
+ if (state.current.isFocusWithin && !e.currentTarget.contains(e.relatedTarget)) {
2573
+ state.current.isFocusWithin = false;
2574
+ removeAllGlobalListeners();
2575
+ if (onBlurWithin) onBlurWithin(e);
2576
+ if (onFocusWithinChange) onFocusWithinChange(false);
2577
+ }
2578
+ }, [
2579
+ onBlurWithin,
2580
+ onFocusWithinChange,
2581
+ state,
2582
+ removeAllGlobalListeners
2583
+ ]);
2584
+ let onSyntheticFocus = ($8a9cb279dc87e130$export$715c682d09d639cc)(onBlur);
2585
+ let onFocus = (useCallback)((e)=>{
2586
+ // Ignore events bubbling through portals.
2587
+ if (!e.currentTarget.contains(e.target)) return;
2588
+ // Double check that document.activeElement actually matches e.target in case a previously chained
2589
+ // focus handler already moved focus somewhere else.
2590
+ const ownerDocument = ($431fbd86ca7dc216$export$b204af158042fbac)(e.target);
2591
+ const activeElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)(ownerDocument);
2592
+ if (!state.current.isFocusWithin && activeElement === ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e.nativeEvent)) {
2593
+ if (onFocusWithin) onFocusWithin(e);
2594
+ if (onFocusWithinChange) onFocusWithinChange(true);
2595
+ state.current.isFocusWithin = true;
2596
+ onSyntheticFocus(e);
2597
+ // Browsers don't fire blur events when elements are removed from the DOM.
2598
+ // However, if a focus event occurs outside the element we're tracking, we
2599
+ // can manually fire onBlur.
2600
+ let currentTarget = e.currentTarget;
2601
+ addGlobalListener(ownerDocument, 'focus', (e)=>{
2602
+ if (state.current.isFocusWithin && !($d4ee10de306f2510$export$4282f70798064fe0)(currentTarget, e.target)) {
2603
+ let nativeEvent = new ownerDocument.defaultView.FocusEvent('blur', {
2604
+ relatedTarget: e.target
2605
+ });
2606
+ ($8a9cb279dc87e130$export$c2b7abe5d61ec696)(nativeEvent, currentTarget);
2607
+ let event = ($8a9cb279dc87e130$export$525bc4921d56d4a)(nativeEvent);
2608
+ onBlur(event);
2609
+ }
2610
+ }, {
2611
+ capture: true
2612
+ });
2613
+ }
2614
+ }, [
2615
+ onFocusWithin,
2616
+ onFocusWithinChange,
2617
+ onSyntheticFocus,
2618
+ addGlobalListener,
2619
+ onBlur
2620
+ ]);
2621
+ if (isDisabled) return {
2622
+ focusWithinProps: {
2623
+ // These cannot be null, that would conflict in mergeProps
2624
+ onFocus: undefined,
2625
+ onBlur: undefined
2626
+ }
2627
+ };
2628
+ return {
2629
+ focusWithinProps: {
2630
+ onFocus: onFocus,
2631
+ onBlur: onBlur
2632
+ }
2633
+ };
2634
+ }
2635
+
2636
+ /*
2637
+ * Copyright 2020 Adobe. All rights reserved.
2638
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
2639
+ * you may not use this file except in compliance with the License. You may obtain a copy
2640
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
2641
+ *
2642
+ * Unless required by applicable law or agreed to in writing, software distributed under
2643
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
2644
+ * OF ANY KIND, either express or implied. See the License for the specific language
2645
+ * governing permissions and limitations under the License.
2646
+ */ // Portions of the code in this file are based on code from react.
2647
+ // Original licensing for the following can be found in the
2648
+ // NOTICE file in the root directory of this source tree.
2649
+ // See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions
2650
+
2651
+
2652
+ // iOS fires onPointerEnter twice: once with pointerType="touch" and again with pointerType="mouse".
2653
+ // We want to ignore these emulated events so they do not trigger hover behavior.
2654
+ // See https://bugs.webkit.org/show_bug.cgi?id=214609.
2655
+ let $6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents = false;
2656
+ let $6179b936705e76d3$var$hoverCount = 0;
2657
+ function $6179b936705e76d3$var$setGlobalIgnoreEmulatedMouseEvents() {
2658
+ $6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents = true;
2659
+ // Clear globalIgnoreEmulatedMouseEvents after a short timeout. iOS fires onPointerEnter
2660
+ // with pointerType="mouse" immediately after onPointerUp and before onFocus. On other
2661
+ // devices that don't have this quirk, we don't want to ignore a mouse hover sometime in
2662
+ // the distant future because a user previously touched the element.
2663
+ setTimeout(()=>{
2664
+ $6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents = false;
2665
+ }, 50);
2666
+ }
2667
+ function $6179b936705e76d3$var$handleGlobalPointerEvent(e) {
2668
+ if (e.pointerType === 'touch') $6179b936705e76d3$var$setGlobalIgnoreEmulatedMouseEvents();
2669
+ }
2670
+ function $6179b936705e76d3$var$setupGlobalTouchEvents() {
2671
+ if (typeof document === 'undefined') return;
2672
+ if ($6179b936705e76d3$var$hoverCount === 0) {
2673
+ if (typeof PointerEvent !== 'undefined') document.addEventListener('pointerup', $6179b936705e76d3$var$handleGlobalPointerEvent);
2674
+ else if (process.env.NODE_ENV === 'test') document.addEventListener('touchend', $6179b936705e76d3$var$setGlobalIgnoreEmulatedMouseEvents);
2675
+ }
2676
+ $6179b936705e76d3$var$hoverCount++;
2677
+ return ()=>{
2678
+ $6179b936705e76d3$var$hoverCount--;
2679
+ if ($6179b936705e76d3$var$hoverCount > 0) return;
2680
+ if (typeof PointerEvent !== 'undefined') document.removeEventListener('pointerup', $6179b936705e76d3$var$handleGlobalPointerEvent);
2681
+ else if (process.env.NODE_ENV === 'test') document.removeEventListener('touchend', $6179b936705e76d3$var$setGlobalIgnoreEmulatedMouseEvents);
2682
+ };
2683
+ }
2684
+ function $6179b936705e76d3$export$ae780daf29e6d456(props) {
2685
+ let { onHoverStart: onHoverStart, onHoverChange: onHoverChange, onHoverEnd: onHoverEnd, isDisabled: isDisabled } = props;
2686
+ let [isHovered, setHovered] = (useState)(false);
2687
+ let state = (useRef)({
2688
+ isHovered: false,
2689
+ ignoreEmulatedMouseEvents: false,
2690
+ pointerType: '',
2691
+ target: null
2692
+ }).current;
2693
+ (useEffect)($6179b936705e76d3$var$setupGlobalTouchEvents, []);
2694
+ let { addGlobalListener: addGlobalListener, removeAllGlobalListeners: removeAllGlobalListeners } = ($03deb23ff14920c4$export$4eaf04e54aa8eed6)();
2695
+ let { hoverProps: hoverProps, triggerHoverEnd: triggerHoverEnd } = (useMemo)(()=>{
2696
+ let triggerHoverStart = (event, pointerType)=>{
2697
+ state.pointerType = pointerType;
2698
+ if (isDisabled || pointerType === 'touch' || state.isHovered || !event.currentTarget.contains(event.target)) return;
2699
+ state.isHovered = true;
2700
+ let target = event.currentTarget;
2701
+ state.target = target;
2702
+ // When an element that is hovered over is removed, no pointerleave event is fired by the browser,
2703
+ // even though the originally hovered target may have shrunk in size so it is no longer hovered.
2704
+ // However, a pointerover event will be fired on the new target the mouse is over.
2705
+ // In Chrome this happens immediately. In Safari and Firefox, it happens upon moving the mouse one pixel.
2706
+ addGlobalListener(($431fbd86ca7dc216$export$b204af158042fbac)(event.target), 'pointerover', (e)=>{
2707
+ if (state.isHovered && state.target && !($d4ee10de306f2510$export$4282f70798064fe0)(state.target, e.target)) triggerHoverEnd(e, e.pointerType);
2708
+ }, {
2709
+ capture: true
2710
+ });
2711
+ if (onHoverStart) onHoverStart({
2712
+ type: 'hoverstart',
2713
+ target: target,
2714
+ pointerType: pointerType
2715
+ });
2716
+ if (onHoverChange) onHoverChange(true);
2717
+ setHovered(true);
2718
+ };
2719
+ let triggerHoverEnd = (event, pointerType)=>{
2720
+ let target = state.target;
2721
+ state.pointerType = '';
2722
+ state.target = null;
2723
+ if (pointerType === 'touch' || !state.isHovered || !target) return;
2724
+ state.isHovered = false;
2725
+ removeAllGlobalListeners();
2726
+ if (onHoverEnd) onHoverEnd({
2727
+ type: 'hoverend',
2728
+ target: target,
2729
+ pointerType: pointerType
2730
+ });
2731
+ if (onHoverChange) onHoverChange(false);
2732
+ setHovered(false);
2733
+ };
2734
+ let hoverProps = {};
2735
+ if (typeof PointerEvent !== 'undefined') {
2736
+ hoverProps.onPointerEnter = (e)=>{
2737
+ if ($6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents && e.pointerType === 'mouse') return;
2738
+ triggerHoverStart(e, e.pointerType);
2739
+ };
2740
+ hoverProps.onPointerLeave = (e)=>{
2741
+ if (!isDisabled && e.currentTarget.contains(e.target)) triggerHoverEnd(e, e.pointerType);
2742
+ };
2743
+ } else if (process.env.NODE_ENV === 'test') {
2744
+ hoverProps.onTouchStart = ()=>{
2745
+ state.ignoreEmulatedMouseEvents = true;
2746
+ };
2747
+ hoverProps.onMouseEnter = (e)=>{
2748
+ if (!state.ignoreEmulatedMouseEvents && !$6179b936705e76d3$var$globalIgnoreEmulatedMouseEvents) triggerHoverStart(e, 'mouse');
2749
+ state.ignoreEmulatedMouseEvents = false;
2750
+ };
2751
+ hoverProps.onMouseLeave = (e)=>{
2752
+ if (!isDisabled && e.currentTarget.contains(e.target)) triggerHoverEnd(e, 'mouse');
2753
+ };
2754
+ }
2755
+ return {
2756
+ hoverProps: hoverProps,
2757
+ triggerHoverEnd: triggerHoverEnd
2758
+ };
2759
+ }, [
2760
+ onHoverStart,
2761
+ onHoverChange,
2762
+ onHoverEnd,
2763
+ isDisabled,
2764
+ state,
2765
+ addGlobalListener,
2766
+ removeAllGlobalListeners
589
2767
  ]);
2768
+ (useEffect)(()=>{
2769
+ // Call the triggerHoverEnd as soon as isDisabled changes to true
2770
+ // Safe to call triggerHoverEnd, it will early return if we aren't currently hovering
2771
+ if (isDisabled) triggerHoverEnd({
2772
+ currentTarget: state.target
2773
+ }, state.pointerType);
2774
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2775
+ }, [
2776
+ isDisabled
2777
+ ]);
2778
+ return {
2779
+ hoverProps: hoverProps,
2780
+ isHovered: isHovered
2781
+ };
590
2782
  }
591
2783
 
592
2784
  /*
@@ -1255,6 +3447,45 @@ function $d841c8010a73d545$export$4f384c9210e583c3(props, state, inputRef) {
1255
3447
  };
1256
3448
  }
1257
3449
 
3450
+ /*
3451
+ * Copyright 2024 Adobe. All rights reserved.
3452
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
3453
+ * you may not use this file except in compliance with the License. You may obtain a copy
3454
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
3455
+ *
3456
+ * Unless required by applicable law or agreed to in writing, software distributed under
3457
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
3458
+ * OF ANY KIND, either express or implied. See the License for the specific language
3459
+ * governing permissions and limitations under the License.
3460
+ */
3461
+ // React doesn't understand the <template> element, which doesn't have children like a normal element.
3462
+ // It will throw an error during hydration when it expects the firstChild to contain content rendered
3463
+ // on the server, when in reality, the browser will have placed this inside the `content` document fragment.
3464
+ // This monkey patches the firstChild property for our special hidden template elements to work around this error.
3465
+ // See https://github.com/facebook/react/issues/19932
3466
+ if (typeof HTMLTemplateElement !== 'undefined') {
3467
+ const getFirstChild = Object.getOwnPropertyDescriptor(Node.prototype, 'firstChild').get;
3468
+ Object.defineProperty(HTMLTemplateElement.prototype, 'firstChild', {
3469
+ configurable: true,
3470
+ enumerable: true,
3471
+ get: function() {
3472
+ if (this.dataset.reactAriaHidden) return this.content.firstChild;
3473
+ else return getFirstChild.call(this);
3474
+ }
3475
+ });
3476
+ }
3477
+ const $f39a9eba43920ace$export$94b6d0abf7d33e8c = /*#__PURE__*/ (createContext)(false);
3478
+ function $f39a9eba43920ace$export$86427a43e3e48ebb(fn) {
3479
+ let Wrapper = (props, ref)=>{
3480
+ let isHidden = (useContext)($f39a9eba43920ace$export$94b6d0abf7d33e8c);
3481
+ if (isHidden) return null;
3482
+ return fn(props, ref);
3483
+ };
3484
+ // @ts-ignore - for react dev tools
3485
+ Wrapper.displayName = fn.displayName || fn.name;
3486
+ return (forwardRef)(Wrapper);
3487
+ }
3488
+
1258
3489
  /*
1259
3490
  * Copyright 2020 Adobe. All rights reserved.
1260
3491
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
@@ -2431,6 +4662,30 @@ const $01b77f81d0f07f68$export$b04be29aa201d4f5 = /*#__PURE__*/ ($f39a9eba43920a
2431
4662
 
2432
4663
  const $d2b4bc8c273e7be6$export$24d547caef80ccd1 = /*#__PURE__*/ (createContext)({});
2433
4664
 
4665
+ /*
4666
+ * Copyright 2022 Adobe. All rights reserved.
4667
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4668
+ * you may not use this file except in compliance with the License. You may obtain a copy
4669
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
4670
+ *
4671
+ * Unless required by applicable law or agreed to in writing, software distributed under
4672
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
4673
+ * OF ANY KIND, either express or implied. See the License for the specific language
4674
+ * governing permissions and limitations under the License.
4675
+ */
4676
+
4677
+ const $514c0188e459b4c0$export$9afb8bc826b033ea = /*#__PURE__*/ (createContext)({});
4678
+ const $514c0188e459b4c0$export$5f1af8db9871e1d6 = /*#__PURE__*/ (forwardRef)(function Text(props, ref) {
4679
+ [props, ref] = ($64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $514c0188e459b4c0$export$9afb8bc826b033ea);
4680
+ let { elementType: ElementType = 'span', ...domProps } = props;
4681
+ // @ts-ignore
4682
+ return /*#__PURE__*/ (React__default).createElement(ElementType, {
4683
+ className: "react-aria-Text",
4684
+ ...domProps,
4685
+ ref: ref
4686
+ });
4687
+ });
4688
+
2434
4689
  /*
2435
4690
  * Copyright 2023 Adobe. All rights reserved.
2436
4691
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");