@servicetitan/anvil2 1.3.0 → 1.3.2

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 (259) hide show
  1. package/{Alert-49d915aa.js → Alert-012e475c.js} +22 -22
  2. package/Alert-012e475c.js.map +1 -0
  3. package/Alert-066f00f2.cjs +2 -0
  4. package/Alert-066f00f2.cjs.map +1 -0
  5. package/Alert.cjs +1 -1
  6. package/Alert.js +1 -1
  7. package/Announcement-cd9602ed.cjs +2 -0
  8. package/Announcement-cd9602ed.cjs.map +1 -0
  9. package/{Announcement-eb5fd003.js → Announcement-f9b09ba3.js} +5 -5
  10. package/Announcement-f9b09ba3.js.map +1 -0
  11. package/Announcement.cjs +1 -1
  12. package/Announcement.js +1 -1
  13. package/AnvilProvider.cjs +1 -1
  14. package/AnvilProvider.js +1 -1
  15. package/Avatar.cjs +1 -1
  16. package/Avatar.js +1 -1
  17. package/Button.cjs +1 -1
  18. package/Button.cjs.map +1 -1
  19. package/Button.js +19 -26
  20. package/Button.js.map +1 -1
  21. package/ButtonCompound.cjs +1 -1
  22. package/ButtonCompound.cjs.map +1 -1
  23. package/ButtonCompound.js +19 -26
  24. package/ButtonCompound.js.map +1 -1
  25. package/ButtonLink.cjs +1 -1
  26. package/ButtonLink.cjs.map +1 -1
  27. package/ButtonLink.js +19 -26
  28. package/ButtonLink.js.map +1 -1
  29. package/ButtonToggle.cjs +1 -1
  30. package/ButtonToggle.cjs.map +1 -1
  31. package/ButtonToggle.js +19 -26
  32. package/ButtonToggle.js.map +1 -1
  33. package/{Calendar-6af49637.js → Calendar-31bcb381.js} +2 -2
  34. package/{Calendar-6af49637.js.map → Calendar-31bcb381.js.map} +1 -1
  35. package/Calendar-d0baf4b1.cjs +2 -0
  36. package/{Calendar-21727a1d.cjs.map → Calendar-d0baf4b1.cjs.map} +1 -1
  37. package/Calendar.cjs +1 -1
  38. package/Calendar.js +1 -1
  39. package/Checkbox.cjs +1 -1
  40. package/Checkbox.cjs.map +1 -1
  41. package/Checkbox.js +49 -22
  42. package/Checkbox.js.map +1 -1
  43. package/{Chip-de78e3f6.cjs → Chip-5b63e48c.cjs} +2 -2
  44. package/{Chip-de78e3f6.cjs.map → Chip-5b63e48c.cjs.map} +1 -1
  45. package/{Chip-6dbdbc2e.js → Chip-6dde28bc.js} +3 -3
  46. package/{Chip-6dbdbc2e.js.map → Chip-6dde28bc.js.map} +1 -1
  47. package/Chip.cjs +1 -1
  48. package/Chip.js +1 -1
  49. package/Combobox.cjs +1 -1
  50. package/Combobox.cjs.map +1 -1
  51. package/Combobox.js +31 -38
  52. package/Combobox.js.map +1 -1
  53. package/Details.cjs +1 -1
  54. package/Details.cjs.map +1 -1
  55. package/Details.js +22 -29
  56. package/Details.js.map +1 -1
  57. package/Dialog.cjs +1 -1
  58. package/Dialog.cjs.map +1 -1
  59. package/Dialog.js +35 -42
  60. package/Dialog.js.map +1 -1
  61. package/Drawer.cjs +1 -1
  62. package/Drawer.cjs.map +1 -1
  63. package/Drawer.js +63 -36
  64. package/Drawer.js.map +1 -1
  65. package/Link.cjs +1 -1
  66. package/Link.cjs.map +1 -1
  67. package/Link.js +24 -31
  68. package/Link.js.map +1 -1
  69. package/ListView-3b1adecb.js +557 -0
  70. package/ListView-3b1adecb.js.map +1 -0
  71. package/ListView-88e49b19.cjs +2 -0
  72. package/ListView-88e49b19.cjs.map +1 -0
  73. package/ListView.cjs +1 -1
  74. package/ListView.css +1 -1
  75. package/ListView.js +1 -1
  76. package/{Listbox-030b2993.js → Listbox-60fbdaa1.js} +2 -2
  77. package/{Listbox-030b2993.js.map → Listbox-60fbdaa1.js.map} +1 -1
  78. package/Listbox.js +1 -1
  79. package/Menu.cjs +1 -1
  80. package/Menu.cjs.map +1 -1
  81. package/Menu.js +52 -25
  82. package/Menu.js.map +1 -1
  83. package/Overflow.cjs +1 -1
  84. package/Overflow.cjs.map +1 -1
  85. package/Overflow.js +26 -33
  86. package/Overflow.js.map +1 -1
  87. package/Page.cjs +1 -1
  88. package/Page.js +2 -2
  89. package/Popover.cjs +1 -1
  90. package/Popover.cjs.map +1 -1
  91. package/Popover.js +28 -35
  92. package/Popover.js.map +1 -1
  93. package/ProgressBar-c1b5c7c3.js +516 -0
  94. package/ProgressBar-c1b5c7c3.js.map +1 -0
  95. package/ProgressBar-fa511478.cjs +2 -0
  96. package/ProgressBar-fa511478.cjs.map +1 -0
  97. package/ProgressBar.cjs +1 -1
  98. package/ProgressBar.css +1 -1
  99. package/ProgressBar.js +1 -1
  100. package/Radio.cjs +1 -1
  101. package/Radio.cjs.map +1 -1
  102. package/Radio.js +50 -23
  103. package/Radio.js.map +1 -1
  104. package/SegmentedControl.cjs +1 -1
  105. package/SegmentedControl.cjs.map +1 -1
  106. package/SegmentedControl.d.ts +9 -5
  107. package/SegmentedControl.js +72 -12
  108. package/SegmentedControl.js.map +1 -1
  109. package/{SideNav-80e5ce2f.js → SideNav-33a404ec.js} +2 -2
  110. package/{SideNav-80e5ce2f.js.map → SideNav-33a404ec.js.map} +1 -1
  111. package/SideNav.js +1 -1
  112. package/{Stepper-85a93af9.js → Stepper-7e3a130c.js} +79 -79
  113. package/Stepper-7e3a130c.js.map +1 -0
  114. package/Stepper-8675700c.cjs +2 -0
  115. package/Stepper-8675700c.cjs.map +1 -0
  116. package/Stepper.cjs +1 -1
  117. package/Stepper.js +1 -1
  118. package/Switch.cjs +1 -1
  119. package/Switch.cjs.map +1 -1
  120. package/Switch.js +44 -17
  121. package/Switch.js.map +1 -1
  122. package/{Tab-68267c78.js → Tab-dd4ab045.js} +2 -2
  123. package/{Tab-68267c78.js.map → Tab-dd4ab045.js.map} +1 -1
  124. package/Tab.js +1 -1
  125. package/TextField.cjs +1 -1
  126. package/TextField.cjs.map +1 -1
  127. package/TextField.js +23 -30
  128. package/TextField.js.map +1 -1
  129. package/Textarea.cjs +1 -1
  130. package/Textarea.cjs.map +1 -1
  131. package/Textarea.js +23 -30
  132. package/Textarea.js.map +1 -1
  133. package/ThemeProvider.cjs +1 -1
  134. package/ThemeProvider.js +1 -1
  135. package/Toast-32a4ab22.cjs +9 -0
  136. package/Toast-32a4ab22.cjs.map +1 -0
  137. package/{Toast-330e28fb.js → Toast-6cd7d2e1.js} +58 -58
  138. package/Toast-6cd7d2e1.js.map +1 -0
  139. package/Toast.cjs +1 -1
  140. package/Toast.js +1 -1
  141. package/Tooltip.cjs +1 -1
  142. package/Tooltip.cjs.map +1 -1
  143. package/Tooltip.js +19 -26
  144. package/Tooltip.js.map +1 -1
  145. package/anvil2.cjs +1 -1
  146. package/anvil2.d.ts +5 -5
  147. package/anvil2.js +171 -178
  148. package/anvil2.js.map +1 -1
  149. package/{floating-ui.react-8d61182d.js → floating-ui.react-51a3fa68.js} +26 -26
  150. package/{floating-ui.react-8d61182d.js.map → floating-ui.react-51a3fa68.js.map} +1 -1
  151. package/{Button-855c7b85.js → index-3a4e28a9-3d7ba14f.js} +90 -90
  152. package/index-3a4e28a9-3d7ba14f.js.map +1 -0
  153. package/index-3a4e28a9-b649e635.cjs +2 -0
  154. package/index-3a4e28a9-b649e635.cjs.map +1 -0
  155. package/{index-439b5871.js → index-3f218083.js} +9 -9
  156. package/{index-439b5871.js.map → index-3f218083.js.map} +1 -1
  157. package/{index-f6c22572.cjs → index-63e13299.cjs} +2 -2
  158. package/{index-f6c22572.cjs.map → index-63e13299.cjs.map} +1 -1
  159. package/index-c41dc41a.js +4972 -0
  160. package/index-c41dc41a.js.map +1 -0
  161. package/index-ca7c66ae.cjs +23 -0
  162. package/index-ca7c66ae.cjs.map +1 -0
  163. package/index-d46fa8de-c02f7a12.cjs +2 -0
  164. package/index-d46fa8de-c02f7a12.cjs.map +1 -0
  165. package/index-d46fa8de-f8bf17b6.js +540 -0
  166. package/index-d46fa8de-f8bf17b6.js.map +1 -0
  167. package/{index-f7658447-d8b2b888.js → index-f7658447-1cfbda8f.js} +8 -9
  168. package/{index-f7658447-d8b2b888.js.map → index-f7658447-1cfbda8f.js.map} +1 -1
  169. package/index-f7658447-f447ade8.cjs +2 -0
  170. package/{index-f7658447-d9ca2747.cjs.map → index-f7658447-f447ade8.cjs.map} +1 -1
  171. package/index3.css +1 -1
  172. package/package.json +2 -2
  173. package/useAccessibleColor.cjs +1 -1
  174. package/useAccessibleColor.js +19 -26
  175. package/useAccessibleColor.js.map +1 -1
  176. package/useLinkStyles.cjs +1 -1
  177. package/useLinkStyles.js +18 -25
  178. package/useLinkStyles.js.map +1 -1
  179. package/useMergeRefs.cjs +1 -1
  180. package/useMergeRefs.js +19 -26
  181. package/useMergeRefs.js.map +1 -1
  182. package/usePrefersColorScheme.cjs +1 -1
  183. package/usePrefersColorScheme.js +19 -26
  184. package/usePrefersColorScheme.js.map +1 -1
  185. package/useSwipe.cjs +1 -1
  186. package/useSwipe.js +19 -26
  187. package/useSwipe.js.map +1 -1
  188. package/Alert-49d915aa.js.map +0 -1
  189. package/Alert-e48c196e.cjs +0 -2
  190. package/Alert-e48c196e.cjs.map +0 -1
  191. package/Announcement-d598ea11.cjs +0 -2
  192. package/Announcement-d598ea11.cjs.map +0 -1
  193. package/Announcement-eb5fd003.js.map +0 -1
  194. package/Button-855c7b85.js.map +0 -1
  195. package/Button-8fe1ed7f.cjs +0 -2
  196. package/Button-8fe1ed7f.cjs.map +0 -1
  197. package/Calendar-21727a1d.cjs +0 -2
  198. package/Checkbox-28412a96.cjs +0 -2
  199. package/Checkbox-28412a96.cjs.map +0 -1
  200. package/Checkbox-54ecbd70.js +0 -163
  201. package/Checkbox-54ecbd70.js.map +0 -1
  202. package/Checkbox.css +0 -1
  203. package/Drawer-45208baf.cjs +0 -2
  204. package/Drawer-45208baf.cjs.map +0 -1
  205. package/Drawer-f95784bb.js +0 -209
  206. package/Drawer-f95784bb.js.map +0 -1
  207. package/Drawer.css +0 -1
  208. package/ListView-ad64a337.js +0 -403
  209. package/ListView-ad64a337.js.map +0 -1
  210. package/ListView-fcd88dd1.cjs +0 -2
  211. package/ListView-fcd88dd1.cjs.map +0 -1
  212. package/ProgressBar-0c2b3852.cjs +0 -2
  213. package/ProgressBar-0c2b3852.cjs.map +0 -1
  214. package/ProgressBar-f54440d6.js +0 -301
  215. package/ProgressBar-f54440d6.js.map +0 -1
  216. package/Radio-845d1fe6.cjs +0 -2
  217. package/Radio-845d1fe6.cjs.map +0 -1
  218. package/Radio-8f8e771e.js +0 -124
  219. package/Radio-8f8e771e.js.map +0 -1
  220. package/Radio.css +0 -1
  221. package/SegmentedControl-d223643c.js +0 -108
  222. package/SegmentedControl-d223643c.js.map +0 -1
  223. package/SegmentedControl-e5e48c23.cjs +0 -2
  224. package/SegmentedControl-e5e48c23.cjs.map +0 -1
  225. package/SegmentedControl.css +0 -1
  226. package/Stepper-51ada533.cjs +0 -2
  227. package/Stepper-51ada533.cjs.map +0 -1
  228. package/Stepper-85a93af9.js.map +0 -1
  229. package/Switch-7bfb6be6.cjs +0 -2
  230. package/Switch-7bfb6be6.cjs.map +0 -1
  231. package/Switch-917c699a.js +0 -54
  232. package/Switch-917c699a.js.map +0 -1
  233. package/Switch.css +0 -1
  234. package/Toast-330e28fb.js.map +0 -1
  235. package/Toast-f154bebc.cjs +0 -9
  236. package/Toast-f154bebc.cjs.map +0 -1
  237. package/getKeyboardFocusableElements-ea0e208d-58a00025.js +0 -14
  238. package/getKeyboardFocusableElements-ea0e208d-58a00025.js.map +0 -1
  239. package/getKeyboardFocusableElements-ea0e208d-aba1bd01.cjs +0 -2
  240. package/getKeyboardFocusableElements-ea0e208d-aba1bd01.cjs.map +0 -1
  241. package/index-06c0bdf0.js +0 -480
  242. package/index-06c0bdf0.js.map +0 -1
  243. package/index-09cb022c-28ca3469.js +0 -520
  244. package/index-09cb022c-28ca3469.js.map +0 -1
  245. package/index-09cb022c-f4ddfd52.cjs +0 -2
  246. package/index-09cb022c-f4ddfd52.cjs.map +0 -1
  247. package/index-09cb022c.css +0 -1
  248. package/index-671f29a9.cjs +0 -23
  249. package/index-671f29a9.cjs.map +0 -1
  250. package/index-6ad2779a.js +0 -4227
  251. package/index-6ad2779a.js.map +0 -1
  252. package/index-a53df036.cjs +0 -2
  253. package/index-a53df036.cjs.map +0 -1
  254. package/index-d46fa8de-08092573.cjs +0 -2
  255. package/index-d46fa8de-08092573.cjs.map +0 -1
  256. package/index-d46fa8de-8695742b.js +0 -62
  257. package/index-d46fa8de-8695742b.js.map +0 -1
  258. package/index-f7658447-d9ca2747.cjs +0 -2
  259. /package/{Button.css → index-3a4e28a9.css} +0 -0
@@ -0,0 +1,4972 @@
1
+ import "./index3.css";
2
+ import "./Alert-012e475c.js";
3
+ import "./Announcement-f9b09ba3.js";
4
+ import "./index-f7658447-1cfbda8f.js";
5
+ import "./Badge-df96f15a.js";
6
+ import { S as Ge, C as mo } from "./index-3a4e28a9-3d7ba14f.js";
7
+ import "./Calendar-31bcb381.js";
8
+ import "./Card-bb358803.js";
9
+ import { t as xt, r as go } from "./ListView-3b1adecb.js";
10
+ import { A as fn } from "./Chip-6dde28bc.js";
11
+ import { H as jn, j as Ot, b as vo } from "./ProgressBar-c1b5c7c3.js";
12
+ import "./Divider-b3bff73a.js";
13
+ import { j as _o } from "./Flex-d338e855.js";
14
+ import "./Grid-5bad450f.js";
15
+ import { C as we } from "./Icon-b94f924c.js";
16
+ import { i as Vn } from "./Listbox-60fbdaa1.js";
17
+ import "./Stepper-7e3a130c.js";
18
+ import { P as y, _ as K, b as xe, a as Io } from "./SideNav-33a404ec.js";
19
+ import { p as $n } from "./SrOnly-864bd4cb.js";
20
+ import { f as m } from "./jsx-runtime-944c88e2-e73fa629.js";
21
+ import { c as te } from "./index-e0f6271a.js";
22
+ import "./Tab-dd4ab045.js";
23
+ import { $ as Kn } from "./Text-465104f6.js";
24
+ import "./Toast-6cd7d2e1.js";
25
+ import { U as Fn, T as Ln } from "./index-d46fa8de-f8bf17b6.js";
26
+ import { J as De } from "./useLayoutPropsUtil-e307abc7-cbe2fb6d.js";
27
+ import "./usePrefersColorScheme-129544ad-cab6fc3f.js";
28
+ import * as ue from "react";
29
+ import pt, { useRef as G, useCallback as oe, useEffect as de, useMemo as $e, cloneElement as yo, Component as xo, useLayoutEffect as Nt, useReducer as bo, createContext as Qe, forwardRef as ce, useContext as ve, useState as Y, useId as be, isValidElement as wo } from "react";
30
+ import "./index-3f218083.js";
31
+ import "./LocalizationProvider.js";
32
+ import { u as Re, F as Bn, q as zn, b as Eo, d as qn, e as Un, o as Wn, r as Yn, f as Gn, s as Xn, l as Jn, g as Co, t as Qn, h as Zn, i as er, k as tr, m as nr, n as rr, v as or, w as ir, x as So, y as sr, z as Oo, A as No, B as Do, C as ko, D as Po } from "./floating-ui.react-51a3fa68.js";
33
+ import { g as Ro } from "./_commonjsHelpers-c5d32002.js";
34
+ import { PortalProviderContext as ar } from "./PortalProvider.js";
35
+ import { a as lr } from "./close-064c8acc-7e0b4df7.js";
36
+ import { a as ur } from "./check-5f087ea0-b5474547.js";
37
+ import { v as Dt } from "./Helper-74a1f07f-092263c4.js";
38
+ /* empty css */import { u as Mo } from "./use-reduced-motion-b359504d.js";
39
+ import { m as Ao } from "./motion-a0a946d6.js";
40
+ import "./useSwipe-82769b09-835234e6.js";
41
+ function hn(e) {
42
+ if (e === void 0)
43
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
44
+ return e;
45
+ }
46
+ var bt = { exports: {} }, Z = {};
47
+ /**
48
+ * @license React
49
+ * react-is.production.min.js
50
+ *
51
+ * Copyright (c) Facebook, Inc. and its affiliates.
52
+ *
53
+ * This source code is licensed under the MIT license found in the
54
+ * LICENSE file in the root directory of this source tree.
55
+ */
56
+ var mn;
57
+ function To() {
58
+ if (mn)
59
+ return Z;
60
+ mn = 1;
61
+ var e = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), t = Symbol.for("react.provider"), s = Symbol.for("react.context"), l = Symbol.for("react.server_context"), d = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), a = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), b = Symbol.for("react.lazy"), _ = Symbol.for("react.offscreen"), v;
62
+ v = Symbol.for("react.module.reference");
63
+ function O(h) {
64
+ if (typeof h == "object" && h !== null) {
65
+ var M = h.$$typeof;
66
+ switch (M) {
67
+ case e:
68
+ switch (h = h.type, h) {
69
+ case r:
70
+ case i:
71
+ case o:
72
+ case u:
73
+ case a:
74
+ return h;
75
+ default:
76
+ switch (h = h && h.$$typeof, h) {
77
+ case l:
78
+ case s:
79
+ case d:
80
+ case b:
81
+ case g:
82
+ case t:
83
+ return h;
84
+ default:
85
+ return M;
86
+ }
87
+ }
88
+ case n:
89
+ return M;
90
+ }
91
+ }
92
+ }
93
+ return Z.ContextConsumer = s, Z.ContextProvider = t, Z.Element = e, Z.ForwardRef = d, Z.Fragment = r, Z.Lazy = b, Z.Memo = g, Z.Portal = n, Z.Profiler = i, Z.StrictMode = o, Z.Suspense = u, Z.SuspenseList = a, Z.isAsyncMode = function() {
94
+ return !1;
95
+ }, Z.isConcurrentMode = function() {
96
+ return !1;
97
+ }, Z.isContextConsumer = function(h) {
98
+ return O(h) === s;
99
+ }, Z.isContextProvider = function(h) {
100
+ return O(h) === t;
101
+ }, Z.isElement = function(h) {
102
+ return typeof h == "object" && h !== null && h.$$typeof === e;
103
+ }, Z.isForwardRef = function(h) {
104
+ return O(h) === d;
105
+ }, Z.isFragment = function(h) {
106
+ return O(h) === r;
107
+ }, Z.isLazy = function(h) {
108
+ return O(h) === b;
109
+ }, Z.isMemo = function(h) {
110
+ return O(h) === g;
111
+ }, Z.isPortal = function(h) {
112
+ return O(h) === n;
113
+ }, Z.isProfiler = function(h) {
114
+ return O(h) === i;
115
+ }, Z.isStrictMode = function(h) {
116
+ return O(h) === o;
117
+ }, Z.isSuspense = function(h) {
118
+ return O(h) === u;
119
+ }, Z.isSuspenseList = function(h) {
120
+ return O(h) === a;
121
+ }, Z.isValidElementType = function(h) {
122
+ return typeof h == "string" || typeof h == "function" || h === r || h === i || h === o || h === u || h === a || h === _ || typeof h == "object" && h !== null && (h.$$typeof === b || h.$$typeof === g || h.$$typeof === t || h.$$typeof === s || h.$$typeof === d || h.$$typeof === v || h.getModuleId !== void 0);
123
+ }, Z.typeOf = O, Z;
124
+ }
125
+ var ee = {};
126
+ /**
127
+ * @license React
128
+ * react-is.development.js
129
+ *
130
+ * Copyright (c) Facebook, Inc. and its affiliates.
131
+ *
132
+ * This source code is licensed under the MIT license found in the
133
+ * LICENSE file in the root directory of this source tree.
134
+ */
135
+ var gn;
136
+ function Ho() {
137
+ return gn || (gn = 1, process.env.NODE_ENV !== "production" && function() {
138
+ var e = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), t = Symbol.for("react.provider"), s = Symbol.for("react.context"), l = Symbol.for("react.server_context"), d = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), a = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), b = Symbol.for("react.lazy"), _ = Symbol.for("react.offscreen"), v = !1, O = !1, h = !1, M = !1, c = !1, f;
139
+ f = Symbol.for("react.module.reference");
140
+ function p(S) {
141
+ return !!(typeof S == "string" || typeof S == "function" || S === r || S === i || c || S === o || S === u || S === a || M || S === _ || v || O || h || typeof S == "object" && S !== null && (S.$$typeof === b || S.$$typeof === g || S.$$typeof === t || S.$$typeof === s || S.$$typeof === d || // This needs to include all possible module reference object
142
+ // types supported by any Flight configuration anywhere since
143
+ // we don't know which Flight build this will end up being used
144
+ // with.
145
+ S.$$typeof === f || S.getModuleId !== void 0));
146
+ }
147
+ function x(S) {
148
+ if (typeof S == "object" && S !== null) {
149
+ var he = S.$$typeof;
150
+ switch (he) {
151
+ case e:
152
+ var re = S.type;
153
+ switch (re) {
154
+ case r:
155
+ case i:
156
+ case o:
157
+ case u:
158
+ case a:
159
+ return re;
160
+ default:
161
+ var Me = re && re.$$typeof;
162
+ switch (Me) {
163
+ case l:
164
+ case s:
165
+ case d:
166
+ case b:
167
+ case g:
168
+ case t:
169
+ return Me;
170
+ default:
171
+ return he;
172
+ }
173
+ }
174
+ case n:
175
+ return he;
176
+ }
177
+ }
178
+ }
179
+ var I = s, H = t, N = e, j = d, A = r, w = b, T = g, E = n, R = i, F = o, q = u, k = a, X = !1, Q = !1;
180
+ function U(S) {
181
+ return X || (X = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")), !1;
182
+ }
183
+ function $(S) {
184
+ return Q || (Q = !0, console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")), !1;
185
+ }
186
+ function W(S) {
187
+ return x(S) === s;
188
+ }
189
+ function J(S) {
190
+ return x(S) === t;
191
+ }
192
+ function D(S) {
193
+ return typeof S == "object" && S !== null && S.$$typeof === e;
194
+ }
195
+ function P(S) {
196
+ return x(S) === d;
197
+ }
198
+ function V(S) {
199
+ return x(S) === r;
200
+ }
201
+ function C(S) {
202
+ return x(S) === b;
203
+ }
204
+ function z(S) {
205
+ return x(S) === g;
206
+ }
207
+ function B(S) {
208
+ return x(S) === n;
209
+ }
210
+ function L(S) {
211
+ return x(S) === i;
212
+ }
213
+ function ne(S) {
214
+ return x(S) === o;
215
+ }
216
+ function ie(S) {
217
+ return x(S) === u;
218
+ }
219
+ function pe(S) {
220
+ return x(S) === a;
221
+ }
222
+ ee.ContextConsumer = I, ee.ContextProvider = H, ee.Element = N, ee.ForwardRef = j, ee.Fragment = A, ee.Lazy = w, ee.Memo = T, ee.Portal = E, ee.Profiler = R, ee.StrictMode = F, ee.Suspense = q, ee.SuspenseList = k, ee.isAsyncMode = U, ee.isConcurrentMode = $, ee.isContextConsumer = W, ee.isContextProvider = J, ee.isElement = D, ee.isForwardRef = P, ee.isFragment = V, ee.isLazy = C, ee.isMemo = z, ee.isPortal = B, ee.isProfiler = L, ee.isStrictMode = ne, ee.isSuspense = ie, ee.isSuspenseList = pe, ee.isValidElementType = p, ee.typeOf = x;
223
+ }()), ee;
224
+ }
225
+ process.env.NODE_ENV === "production" ? bt.exports = To() : bt.exports = Ho();
226
+ var vn = bt.exports;
227
+ const _n = (e) => typeof e == "object" && e != null && e.nodeType === 1, In = (e, n) => (!n || e !== "hidden") && e !== "visible" && e !== "clip", It = (e, n) => {
228
+ if (e.clientHeight < e.scrollHeight || e.clientWidth < e.scrollWidth) {
229
+ const r = getComputedStyle(e, null);
230
+ return In(r.overflowY, n) || In(r.overflowX, n) || ((o) => {
231
+ const i = ((t) => {
232
+ if (!t.ownerDocument || !t.ownerDocument.defaultView)
233
+ return null;
234
+ try {
235
+ return t.ownerDocument.defaultView.frameElement;
236
+ } catch {
237
+ return null;
238
+ }
239
+ })(o);
240
+ return !!i && (i.clientHeight < o.scrollHeight || i.clientWidth < o.scrollWidth);
241
+ })(e);
242
+ }
243
+ return !1;
244
+ }, at = (e, n, r, o, i, t, s, l) => t < e && s > n || t > e && s < n ? 0 : t <= e && l <= r || s >= n && l >= r ? t - e - o : s > n && l < r || t < e && l > r ? s - n + i : 0, jo = (e) => {
245
+ const n = e.parentElement;
246
+ return n ?? (e.getRootNode().host || null);
247
+ }, Vo = (e, n) => {
248
+ var r, o, i, t;
249
+ if (typeof document > "u")
250
+ return [];
251
+ const { scrollMode: s, block: l, inline: d, boundary: u, skipOverflowHiddenElements: a } = n, g = typeof u == "function" ? u : (q) => q !== u;
252
+ if (!_n(e))
253
+ throw new TypeError("Invalid target");
254
+ const b = document.scrollingElement || document.documentElement, _ = [];
255
+ let v = e;
256
+ for (; _n(v) && g(v); ) {
257
+ if (v = jo(v), v === b) {
258
+ _.push(v);
259
+ break;
260
+ }
261
+ v != null && v === document.body && It(v) && !It(document.documentElement) || v != null && It(v, a) && _.push(v);
262
+ }
263
+ const O = (o = (r = window.visualViewport) == null ? void 0 : r.width) != null ? o : innerWidth, h = (t = (i = window.visualViewport) == null ? void 0 : i.height) != null ? t : innerHeight, { scrollX: M, scrollY: c } = window, { height: f, width: p, top: x, right: I, bottom: H, left: N } = e.getBoundingClientRect(), { top: j, right: A, bottom: w, left: T } = ((q) => {
264
+ const k = window.getComputedStyle(q);
265
+ return { top: parseFloat(k.scrollMarginTop) || 0, right: parseFloat(k.scrollMarginRight) || 0, bottom: parseFloat(k.scrollMarginBottom) || 0, left: parseFloat(k.scrollMarginLeft) || 0 };
266
+ })(e);
267
+ let E = l === "start" || l === "nearest" ? x - j : l === "end" ? H + w : x + f / 2 - j + w, R = d === "center" ? N + p / 2 - T + A : d === "end" ? I + A : N - T;
268
+ const F = [];
269
+ for (let q = 0; q < _.length; q++) {
270
+ const k = _[q], { height: X, width: Q, top: U, right: $, bottom: W, left: J } = k.getBoundingClientRect();
271
+ if (s === "if-needed" && x >= 0 && N >= 0 && H <= h && I <= O && x >= U && H <= W && N >= J && I <= $)
272
+ return F;
273
+ const D = getComputedStyle(k), P = parseInt(D.borderLeftWidth, 10), V = parseInt(D.borderTopWidth, 10), C = parseInt(D.borderRightWidth, 10), z = parseInt(D.borderBottomWidth, 10);
274
+ let B = 0, L = 0;
275
+ const ne = "offsetWidth" in k ? k.offsetWidth - k.clientWidth - P - C : 0, ie = "offsetHeight" in k ? k.offsetHeight - k.clientHeight - V - z : 0, pe = "offsetWidth" in k ? k.offsetWidth === 0 ? 0 : Q / k.offsetWidth : 0, S = "offsetHeight" in k ? k.offsetHeight === 0 ? 0 : X / k.offsetHeight : 0;
276
+ if (b === k)
277
+ B = l === "start" ? E : l === "end" ? E - h : l === "nearest" ? at(c, c + h, h, V, z, c + E, c + E + f, f) : E - h / 2, L = d === "start" ? R : d === "center" ? R - O / 2 : d === "end" ? R - O : at(M, M + O, O, P, C, M + R, M + R + p, p), B = Math.max(0, B + c), L = Math.max(0, L + M);
278
+ else {
279
+ B = l === "start" ? E - U - V : l === "end" ? E - W + z + ie : l === "nearest" ? at(U, W, X, V, z + ie, E, E + f, f) : E - (U + X / 2) + ie / 2, L = d === "start" ? R - J - P : d === "center" ? R - (J + Q / 2) + ne / 2 : d === "end" ? R - $ + C + ne : at(J, $, Q, P, C + ne, R, R + p, p);
280
+ const { scrollLeft: he, scrollTop: re } = k;
281
+ B = S === 0 ? 0 : Math.max(0, Math.min(re + B / S, k.scrollHeight - X / S + ie)), L = pe === 0 ? 0 : Math.max(0, Math.min(he + L / pe, k.scrollWidth - Q / pe + ne)), E += re - B, R += he - L;
282
+ }
283
+ F.push({ el: k, top: B, left: L });
284
+ }
285
+ return F;
286
+ };
287
+ var Xe = function() {
288
+ return Xe = Object.assign || function(n) {
289
+ for (var r, o = 1, i = arguments.length; o < i; o++) {
290
+ r = arguments[o];
291
+ for (var t in r)
292
+ Object.prototype.hasOwnProperty.call(r, t) && (n[t] = r[t]);
293
+ }
294
+ return n;
295
+ }, Xe.apply(this, arguments);
296
+ };
297
+ var $o = 0;
298
+ function yn(e) {
299
+ return typeof e == "function" ? e : ye;
300
+ }
301
+ function ye() {
302
+ }
303
+ function dr(e, n) {
304
+ if (e) {
305
+ var r = Vo(e, {
306
+ boundary: n,
307
+ block: "nearest",
308
+ scrollMode: "if-needed"
309
+ });
310
+ r.forEach(function(o) {
311
+ var i = o.el, t = o.top, s = o.left;
312
+ i.scrollTop = t, i.scrollLeft = s;
313
+ });
314
+ }
315
+ }
316
+ function xn(e, n, r) {
317
+ var o = e === n || n instanceof r.Node && e.contains && e.contains(n);
318
+ return o;
319
+ }
320
+ function kt(e, n) {
321
+ var r;
322
+ function o() {
323
+ r && clearTimeout(r);
324
+ }
325
+ function i() {
326
+ for (var t = arguments.length, s = new Array(t), l = 0; l < t; l++)
327
+ s[l] = arguments[l];
328
+ o(), r = setTimeout(function() {
329
+ r = null, e.apply(void 0, s);
330
+ }, n);
331
+ }
332
+ return i.cancel = o, i;
333
+ }
334
+ function le() {
335
+ for (var e = arguments.length, n = new Array(e), r = 0; r < e; r++)
336
+ n[r] = arguments[r];
337
+ return function(o) {
338
+ for (var i = arguments.length, t = new Array(i > 1 ? i - 1 : 0), s = 1; s < i; s++)
339
+ t[s - 1] = arguments[s];
340
+ return n.some(function(l) {
341
+ return l && l.apply(void 0, [o].concat(t)), o.preventDownshiftDefault || o.hasOwnProperty("nativeEvent") && o.nativeEvent.preventDownshiftDefault;
342
+ });
343
+ };
344
+ }
345
+ function Ve() {
346
+ for (var e = arguments.length, n = new Array(e), r = 0; r < e; r++)
347
+ n[r] = arguments[r];
348
+ return function(o) {
349
+ n.forEach(function(i) {
350
+ typeof i == "function" ? i(o) : i && (i.current = o);
351
+ });
352
+ };
353
+ }
354
+ function cr() {
355
+ return String($o++);
356
+ }
357
+ function pr(e) {
358
+ var n = e.isOpen, r = e.resultCount, o = e.previousResultCount;
359
+ return n ? r ? r !== o ? r + " result" + (r === 1 ? " is" : "s are") + " available, use up and down arrow keys to navigate. Press Enter key to select." : "" : "No results are available." : "";
360
+ }
361
+ function bn(e, n) {
362
+ return e = Array.isArray(e) ? (
363
+ /* istanbul ignore next (preact) */
364
+ e[0]
365
+ ) : e, !e && n ? n : e;
366
+ }
367
+ function fr(e) {
368
+ return typeof e.type == "string";
369
+ }
370
+ function hr(e) {
371
+ return e.props;
372
+ }
373
+ function Ko(e, n) {
374
+ console.error('The property "' + n + '" is required in "' + e + '"');
375
+ }
376
+ var Fo = ["highlightedIndex", "inputValue", "isOpen", "selectedItem", "type"];
377
+ function lt(e) {
378
+ e === void 0 && (e = {});
379
+ var n = {};
380
+ return Fo.forEach(function(r) {
381
+ e.hasOwnProperty(r) && (n[r] = e[r]);
382
+ }), n;
383
+ }
384
+ function tt(e, n) {
385
+ return !e || !n ? e : Object.keys(e).reduce(function(r, o) {
386
+ return r[o] = ft(n, o) ? n[o] : e[o], r;
387
+ }, {});
388
+ }
389
+ function ft(e, n) {
390
+ return e[n] !== void 0;
391
+ }
392
+ function nt(e) {
393
+ var n = e.key, r = e.keyCode;
394
+ return r >= 37 && r <= 40 && n.indexOf("Arrow") !== 0 ? "Arrow" + n : n;
395
+ }
396
+ function Lo(e) {
397
+ return Object.prototype.toString.call(e) === "[object Object]";
398
+ }
399
+ function Le(e, n, r, o, i) {
400
+ i === void 0 && (i = !1);
401
+ var t = r.length;
402
+ if (t === 0)
403
+ return -1;
404
+ var s = t - 1;
405
+ (typeof e != "number" || e < 0 || e > s) && (e = n > 0 ? -1 : s + 1);
406
+ var l = e + n;
407
+ l < 0 ? l = i ? s : 0 : l > s && (l = i ? 0 : s);
408
+ var d = Je(l, n < 0, r, o, i);
409
+ return d === -1 ? e >= t ? -1 : e : d;
410
+ }
411
+ function Je(e, n, r, o, i) {
412
+ i === void 0 && (i = !1);
413
+ var t = r.length;
414
+ if (n) {
415
+ for (var s = e; s >= 0; s--)
416
+ if (!o(r[s], s))
417
+ return s;
418
+ } else
419
+ for (var l = e; l < t; l++)
420
+ if (!o(r[l], l))
421
+ return l;
422
+ return i ? Je(n ? t - 1 : 0, n, r, o) : -1;
423
+ }
424
+ function ht(e, n, r, o) {
425
+ return o === void 0 && (o = !0), r && n.some(function(i) {
426
+ return i && (xn(i, e, r) || o && xn(i, r.document.activeElement, r));
427
+ });
428
+ }
429
+ var Pt = ye;
430
+ process.env.NODE_ENV !== "production" && (Pt = function(n, r, o) {
431
+ var i = "This prop should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled Downshift element for the lifetime of the component. More info: https://github.com/downshift-js/downshift#control-props";
432
+ Object.keys(n).forEach(function(t) {
433
+ r[t] !== void 0 && o[t] === void 0 ? console.error('downshift: A component has changed the controlled prop "' + t + '" to be uncontrolled. ' + i) : r[t] === void 0 && o[t] !== void 0 && console.error('downshift: A component has changed the uncontrolled prop "' + t + '" to be controlled. ' + i);
434
+ });
435
+ });
436
+ var Bo = kt(function(e) {
437
+ mr(e).textContent = "";
438
+ }, 500);
439
+ function mr(e) {
440
+ var n = e.getElementById("a11y-status-message");
441
+ return n || (n = e.createElement("div"), n.setAttribute("id", "a11y-status-message"), n.setAttribute("role", "status"), n.setAttribute("aria-live", "polite"), n.setAttribute("aria-relevant", "additions text"), Object.assign(n.style, {
442
+ border: "0",
443
+ clip: "rect(0 0 0 0)",
444
+ height: "1px",
445
+ margin: "-1px",
446
+ overflow: "hidden",
447
+ padding: "0",
448
+ position: "absolute",
449
+ width: "1px"
450
+ }), e.body.appendChild(n), n);
451
+ }
452
+ function Rt(e, n) {
453
+ if (!(!e || !n)) {
454
+ var r = mr(n);
455
+ r.textContent = e, Bo(n);
456
+ }
457
+ }
458
+ var gr = process.env.NODE_ENV !== "production" ? "__autocomplete_unknown__" : 0, vr = process.env.NODE_ENV !== "production" ? "__autocomplete_mouseup__" : 1, _r = process.env.NODE_ENV !== "production" ? "__autocomplete_item_mouseenter__" : 2, dt = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_arrow_up__" : 3, ct = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_arrow_down__" : 4, Ir = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_escape__" : 5, yr = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_enter__" : 6, xr = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_home__" : 7, br = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_end__" : 8, wr = process.env.NODE_ENV !== "production" ? "__autocomplete_click_item__" : 9, Er = process.env.NODE_ENV !== "production" ? "__autocomplete_blur_input__" : 10, Cr = process.env.NODE_ENV !== "production" ? "__autocomplete_change_input__" : 11, Sr = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_space_button__" : 12, wt = process.env.NODE_ENV !== "production" ? "__autocomplete_click_button__" : 13, Or = process.env.NODE_ENV !== "production" ? "__autocomplete_blur_button__" : 14, Nr = process.env.NODE_ENV !== "production" ? "__autocomplete_controlled_prop_updated_selected_item__" : 15, Dr = process.env.NODE_ENV !== "production" ? "__autocomplete_touchend__" : 16, zo = /* @__PURE__ */ Object.freeze({
459
+ __proto__: null,
460
+ unknown: gr,
461
+ mouseUp: vr,
462
+ itemMouseEnter: _r,
463
+ keyDownArrowUp: dt,
464
+ keyDownArrowDown: ct,
465
+ keyDownEscape: Ir,
466
+ keyDownEnter: yr,
467
+ keyDownHome: xr,
468
+ keyDownEnd: br,
469
+ clickItem: wr,
470
+ blurInput: Er,
471
+ changeInput: Cr,
472
+ keyDownSpaceButton: Sr,
473
+ clickButton: wt,
474
+ blurButton: Or,
475
+ controlledPropUpdatedSelectedItem: Nr,
476
+ touchEnd: Dr
477
+ }), qo = ["refKey", "ref"], Uo = ["onClick", "onPress", "onKeyDown", "onKeyUp", "onBlur"], Wo = ["onKeyDown", "onBlur", "onChange", "onInput", "onChangeText"], Yo = ["refKey", "ref"], Go = ["onMouseMove", "onMouseDown", "onClick", "onPress", "index", "item"], Xo = /* @__PURE__ */ function() {
478
+ var e = /* @__PURE__ */ function(n) {
479
+ Io(r, n);
480
+ function r(i) {
481
+ var t;
482
+ t = n.call(this, i) || this, t.id = t.props.id || "downshift-" + cr(), t.menuId = t.props.menuId || t.id + "-menu", t.labelId = t.props.labelId || t.id + "-label", t.inputId = t.props.inputId || t.id + "-input", t.getItemId = t.props.getItemId || function(c) {
483
+ return t.id + "-item-" + c;
484
+ }, t.items = [], t.itemCount = null, t.previousResultCount = 0, t.timeoutIds = [], t.internalSetTimeout = function(c, f) {
485
+ var p = setTimeout(function() {
486
+ t.timeoutIds = t.timeoutIds.filter(function(x) {
487
+ return x !== p;
488
+ }), c();
489
+ }, f);
490
+ t.timeoutIds.push(p);
491
+ }, t.setItemCount = function(c) {
492
+ t.itemCount = c;
493
+ }, t.unsetItemCount = function() {
494
+ t.itemCount = null;
495
+ }, t.isItemDisabled = function(c, f) {
496
+ var p = t.getItemNodeFromIndex(f);
497
+ return p && p.hasAttribute("disabled");
498
+ }, t.setHighlightedIndex = function(c, f) {
499
+ c === void 0 && (c = t.props.defaultHighlightedIndex), f === void 0 && (f = {}), f = lt(f), t.internalSetState(K({
500
+ highlightedIndex: c
501
+ }, f));
502
+ }, t.clearSelection = function(c) {
503
+ t.internalSetState({
504
+ selectedItem: null,
505
+ inputValue: "",
506
+ highlightedIndex: t.props.defaultHighlightedIndex,
507
+ isOpen: t.props.defaultIsOpen
508
+ }, c);
509
+ }, t.selectItem = function(c, f, p) {
510
+ f = lt(f), t.internalSetState(K({
511
+ isOpen: t.props.defaultIsOpen,
512
+ highlightedIndex: t.props.defaultHighlightedIndex,
513
+ selectedItem: c,
514
+ inputValue: t.props.itemToString(c)
515
+ }, f), p);
516
+ }, t.selectItemAtIndex = function(c, f, p) {
517
+ var x = t.items[c];
518
+ x != null && t.selectItem(x, f, p);
519
+ }, t.selectHighlightedItem = function(c, f) {
520
+ return t.selectItemAtIndex(t.getState().highlightedIndex, c, f);
521
+ }, t.internalSetState = function(c, f) {
522
+ var p, x, I = {}, H = typeof c == "function";
523
+ return !H && c.hasOwnProperty("inputValue") && t.props.onInputValueChange(c.inputValue, K({}, t.getStateAndHelpers(), c)), t.setState(function(N) {
524
+ var j;
525
+ N = t.getState(N);
526
+ var A = H ? c(N) : c;
527
+ A = t.props.stateReducer(N, A), p = A.hasOwnProperty("selectedItem");
528
+ var w = {};
529
+ return p && A.selectedItem !== N.selectedItem && (x = A.selectedItem), (j = A).type || (j.type = gr), Object.keys(A).forEach(function(T) {
530
+ N[T] !== A[T] && (I[T] = A[T]), T !== "type" && (A[T], ft(t.props, T) || (w[T] = A[T]));
531
+ }), H && A.hasOwnProperty("inputValue") && t.props.onInputValueChange(A.inputValue, K({}, t.getStateAndHelpers(), A)), w;
532
+ }, function() {
533
+ yn(f)();
534
+ var N = Object.keys(I).length > 1;
535
+ N && t.props.onStateChange(I, t.getStateAndHelpers()), p && t.props.onSelect(c.selectedItem, t.getStateAndHelpers()), x !== void 0 && t.props.onChange(x, t.getStateAndHelpers()), t.props.onUserAction(I, t.getStateAndHelpers());
536
+ });
537
+ }, t.rootRef = function(c) {
538
+ return t._rootNode = c;
539
+ }, t.getRootProps = function(c, f) {
540
+ var p, x = c === void 0 ? {} : c, I = x.refKey, H = I === void 0 ? "ref" : I, N = x.ref, j = xe(x, qo), A = f === void 0 ? {} : f, w = A.suppressRefError, T = w === void 0 ? !1 : w;
541
+ t.getRootProps.called = !0, t.getRootProps.refKey = H, t.getRootProps.suppressRefError = T;
542
+ var E = t.getState(), R = E.isOpen;
543
+ return K((p = {}, p[H] = Ve(N, t.rootRef), p.role = "combobox", p["aria-expanded"] = R, p["aria-haspopup"] = "listbox", p["aria-owns"] = R ? t.menuId : void 0, p["aria-labelledby"] = t.labelId, p), j);
544
+ }, t.keyDownHandlers = {
545
+ ArrowDown: function(f) {
546
+ var p = this;
547
+ if (f.preventDefault(), this.getState().isOpen) {
548
+ var x = f.shiftKey ? 5 : 1;
549
+ this.moveHighlightedIndex(x, {
550
+ type: ct
551
+ });
552
+ } else
553
+ this.internalSetState({
554
+ isOpen: !0,
555
+ type: ct
556
+ }, function() {
557
+ var I = p.getItemCount();
558
+ if (I > 0) {
559
+ var H = p.getState(), N = H.highlightedIndex, j = Le(N, 1, {
560
+ length: I
561
+ }, p.isItemDisabled, !0);
562
+ p.setHighlightedIndex(j, {
563
+ type: ct
564
+ });
565
+ }
566
+ });
567
+ },
568
+ ArrowUp: function(f) {
569
+ var p = this;
570
+ if (f.preventDefault(), this.getState().isOpen) {
571
+ var x = f.shiftKey ? -5 : -1;
572
+ this.moveHighlightedIndex(x, {
573
+ type: dt
574
+ });
575
+ } else
576
+ this.internalSetState({
577
+ isOpen: !0,
578
+ type: dt
579
+ }, function() {
580
+ var I = p.getItemCount();
581
+ if (I > 0) {
582
+ var H = p.getState(), N = H.highlightedIndex, j = Le(N, -1, {
583
+ length: I
584
+ }, p.isItemDisabled, !0);
585
+ p.setHighlightedIndex(j, {
586
+ type: dt
587
+ });
588
+ }
589
+ });
590
+ },
591
+ Enter: function(f) {
592
+ if (f.which !== 229) {
593
+ var p = this.getState(), x = p.isOpen, I = p.highlightedIndex;
594
+ if (x && I != null) {
595
+ f.preventDefault();
596
+ var H = this.items[I], N = this.getItemNodeFromIndex(I);
597
+ if (H == null || N && N.hasAttribute("disabled"))
598
+ return;
599
+ this.selectHighlightedItem({
600
+ type: yr
601
+ });
602
+ }
603
+ }
604
+ },
605
+ Escape: function(f) {
606
+ f.preventDefault(), this.reset(K({
607
+ type: Ir
608
+ }, !this.state.isOpen && {
609
+ selectedItem: null,
610
+ inputValue: ""
611
+ }));
612
+ }
613
+ }, t.buttonKeyDownHandlers = K({}, t.keyDownHandlers, {
614
+ " ": function(f) {
615
+ f.preventDefault(), this.toggleMenu({
616
+ type: Sr
617
+ });
618
+ }
619
+ }), t.inputKeyDownHandlers = K({}, t.keyDownHandlers, {
620
+ Home: function(f) {
621
+ var p = this.getState(), x = p.isOpen;
622
+ if (x) {
623
+ f.preventDefault();
624
+ var I = this.getItemCount();
625
+ if (!(I <= 0 || !x)) {
626
+ var H = Je(0, !1, {
627
+ length: I
628
+ }, this.isItemDisabled);
629
+ this.setHighlightedIndex(H, {
630
+ type: xr
631
+ });
632
+ }
633
+ }
634
+ },
635
+ End: function(f) {
636
+ var p = this.getState(), x = p.isOpen;
637
+ if (x) {
638
+ f.preventDefault();
639
+ var I = this.getItemCount();
640
+ if (!(I <= 0 || !x)) {
641
+ var H = Je(I - 1, !0, {
642
+ length: I
643
+ }, this.isItemDisabled);
644
+ this.setHighlightedIndex(H, {
645
+ type: br
646
+ });
647
+ }
648
+ }
649
+ }
650
+ }), t.getToggleButtonProps = function(c) {
651
+ var f = c === void 0 ? {} : c, p = f.onClick;
652
+ f.onPress;
653
+ var x = f.onKeyDown, I = f.onKeyUp, H = f.onBlur, N = xe(f, Uo), j = t.getState(), A = j.isOpen, w = {
654
+ onClick: le(p, t.buttonHandleClick),
655
+ onKeyDown: le(x, t.buttonHandleKeyDown),
656
+ onKeyUp: le(I, t.buttonHandleKeyUp),
657
+ onBlur: le(H, t.buttonHandleBlur)
658
+ }, T = N.disabled ? {} : w;
659
+ return K({
660
+ type: "button",
661
+ role: "button",
662
+ "aria-label": A ? "close menu" : "open menu",
663
+ "aria-haspopup": !0,
664
+ "data-toggle": !0
665
+ }, T, N);
666
+ }, t.buttonHandleKeyUp = function(c) {
667
+ c.preventDefault();
668
+ }, t.buttonHandleKeyDown = function(c) {
669
+ var f = nt(c);
670
+ t.buttonKeyDownHandlers[f] && t.buttonKeyDownHandlers[f].call(hn(t), c);
671
+ }, t.buttonHandleClick = function(c) {
672
+ if (c.preventDefault(), t.props.environment) {
673
+ var f = t.props.environment.document, p = f.body, x = f.activeElement;
674
+ p && p === x && c.target.focus();
675
+ }
676
+ process.env.NODE_ENV === "test" ? t.toggleMenu({
677
+ type: wt
678
+ }) : t.internalSetTimeout(function() {
679
+ return t.toggleMenu({
680
+ type: wt
681
+ });
682
+ });
683
+ }, t.buttonHandleBlur = function(c) {
684
+ var f = c.target;
685
+ t.internalSetTimeout(function() {
686
+ if (!(t.isMouseDown || !t.props.environment)) {
687
+ var p = t.props.environment.document.activeElement;
688
+ (p == null || p.id !== t.inputId) && p !== f && t.reset({
689
+ type: Or
690
+ });
691
+ }
692
+ });
693
+ }, t.getLabelProps = function(c) {
694
+ return K({
695
+ htmlFor: t.inputId,
696
+ id: t.labelId
697
+ }, c);
698
+ }, t.getInputProps = function(c) {
699
+ var f = c === void 0 ? {} : c, p = f.onKeyDown, x = f.onBlur, I = f.onChange, H = f.onInput;
700
+ f.onChangeText;
701
+ var N = xe(f, Wo), j, A = {};
702
+ j = "onChange";
703
+ var w = t.getState(), T = w.inputValue, E = w.isOpen, R = w.highlightedIndex;
704
+ if (!N.disabled) {
705
+ var F;
706
+ A = (F = {}, F[j] = le(I, H, t.inputHandleChange), F.onKeyDown = le(p, t.inputHandleKeyDown), F.onBlur = le(x, t.inputHandleBlur), F);
707
+ }
708
+ return K({
709
+ "aria-autocomplete": "list",
710
+ "aria-activedescendant": E && typeof R == "number" && R >= 0 ? t.getItemId(R) : void 0,
711
+ "aria-controls": E ? t.menuId : void 0,
712
+ "aria-labelledby": N && N["aria-label"] ? void 0 : t.labelId,
713
+ // https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion
714
+ // revert back since autocomplete="nope" is ignored on latest Chrome and Opera
715
+ autoComplete: "off",
716
+ value: T,
717
+ id: t.inputId
718
+ }, A, N);
719
+ }, t.inputHandleKeyDown = function(c) {
720
+ var f = nt(c);
721
+ f && t.inputKeyDownHandlers[f] && t.inputKeyDownHandlers[f].call(hn(t), c);
722
+ }, t.inputHandleChange = function(c) {
723
+ t.internalSetState({
724
+ type: Cr,
725
+ isOpen: !0,
726
+ inputValue: c.target.value,
727
+ highlightedIndex: t.props.defaultHighlightedIndex
728
+ });
729
+ }, t.inputHandleBlur = function() {
730
+ t.internalSetTimeout(function() {
731
+ var c;
732
+ if (!(t.isMouseDown || !t.props.environment)) {
733
+ var f = t.props.environment.document.activeElement, p = (f == null || (c = f.dataset) == null ? void 0 : c.toggle) && t._rootNode && t._rootNode.contains(f);
734
+ p || t.reset({
735
+ type: Er
736
+ });
737
+ }
738
+ });
739
+ }, t.menuRef = function(c) {
740
+ t._menuNode = c;
741
+ }, t.getMenuProps = function(c, f) {
742
+ var p, x = c === void 0 ? {} : c, I = x.refKey, H = I === void 0 ? "ref" : I, N = x.ref, j = xe(x, Yo), A = f === void 0 ? {} : f, w = A.suppressRefError, T = w === void 0 ? !1 : w;
743
+ return t.getMenuProps.called = !0, t.getMenuProps.refKey = H, t.getMenuProps.suppressRefError = T, K((p = {}, p[H] = Ve(N, t.menuRef), p.role = "listbox", p["aria-labelledby"] = j && j["aria-label"] ? void 0 : t.labelId, p.id = t.menuId, p), j);
744
+ }, t.getItemProps = function(c) {
745
+ var f, p = c === void 0 ? {} : c, x = p.onMouseMove, I = p.onMouseDown, H = p.onClick;
746
+ p.onPress;
747
+ var N = p.index, j = p.item, A = j === void 0 ? process.env.NODE_ENV === "production" ? (
748
+ /* istanbul ignore next */
749
+ void 0
750
+ ) : Ko("getItemProps", "item") : j, w = xe(p, Go);
751
+ N === void 0 ? (t.items.push(A), N = t.items.indexOf(A)) : t.items[N] = A;
752
+ var T = "onClick", E = H, R = (f = {
753
+ // onMouseMove is used over onMouseEnter here. onMouseMove
754
+ // is only triggered on actual mouse movement while onMouseEnter
755
+ // can fire on DOM changes, interrupting keyboard navigation
756
+ onMouseMove: le(x, function() {
757
+ N !== t.getState().highlightedIndex && (t.setHighlightedIndex(N, {
758
+ type: _r
759
+ }), t.avoidScrolling = !0, t.internalSetTimeout(function() {
760
+ return t.avoidScrolling = !1;
761
+ }, 250));
762
+ }),
763
+ onMouseDown: le(I, function(q) {
764
+ q.preventDefault();
765
+ })
766
+ }, f[T] = le(E, function() {
767
+ t.selectItemAtIndex(N, {
768
+ type: wr
769
+ });
770
+ }), f), F = w.disabled ? {
771
+ onMouseDown: R.onMouseDown
772
+ } : R;
773
+ return K({
774
+ id: t.getItemId(N),
775
+ role: "option",
776
+ "aria-selected": t.getState().highlightedIndex === N
777
+ }, F, w);
778
+ }, t.clearItems = function() {
779
+ t.items = [];
780
+ }, t.reset = function(c, f) {
781
+ c === void 0 && (c = {}), c = lt(c), t.internalSetState(function(p) {
782
+ var x = p.selectedItem;
783
+ return K({
784
+ isOpen: t.props.defaultIsOpen,
785
+ highlightedIndex: t.props.defaultHighlightedIndex,
786
+ inputValue: t.props.itemToString(x)
787
+ }, c);
788
+ }, f);
789
+ }, t.toggleMenu = function(c, f) {
790
+ c === void 0 && (c = {}), c = lt(c), t.internalSetState(function(p) {
791
+ var x = p.isOpen;
792
+ return K({
793
+ isOpen: !x
794
+ }, x && {
795
+ highlightedIndex: t.props.defaultHighlightedIndex
796
+ }, c);
797
+ }, function() {
798
+ var p = t.getState(), x = p.isOpen, I = p.highlightedIndex;
799
+ x && t.getItemCount() > 0 && typeof I == "number" && t.setHighlightedIndex(I, c), yn(f)();
800
+ });
801
+ }, t.openMenu = function(c) {
802
+ t.internalSetState({
803
+ isOpen: !0
804
+ }, c);
805
+ }, t.closeMenu = function(c) {
806
+ t.internalSetState({
807
+ isOpen: !1
808
+ }, c);
809
+ }, t.updateStatus = kt(function() {
810
+ var c;
811
+ if ((c = t.props) != null && (c = c.environment) != null && c.document) {
812
+ var f = t.getState(), p = t.items[f.highlightedIndex], x = t.getItemCount(), I = t.props.getA11yStatusMessage(K({
813
+ itemToString: t.props.itemToString,
814
+ previousResultCount: t.previousResultCount,
815
+ resultCount: x,
816
+ highlightedItem: p
817
+ }, f));
818
+ t.previousResultCount = x, Rt(I, t.props.environment.document);
819
+ }
820
+ }, 200);
821
+ var s = t.props, l = s.defaultHighlightedIndex, d = s.initialHighlightedIndex, u = d === void 0 ? l : d, a = s.defaultIsOpen, g = s.initialIsOpen, b = g === void 0 ? a : g, _ = s.initialInputValue, v = _ === void 0 ? "" : _, O = s.initialSelectedItem, h = O === void 0 ? null : O, M = t.getState({
822
+ highlightedIndex: u,
823
+ isOpen: b,
824
+ inputValue: v,
825
+ selectedItem: h
826
+ });
827
+ return M.selectedItem != null && t.props.initialInputValue === void 0 && (M.inputValue = t.props.itemToString(M.selectedItem)), t.state = M, t;
828
+ }
829
+ var o = r.prototype;
830
+ return o.internalClearTimeouts = function() {
831
+ this.timeoutIds.forEach(function(t) {
832
+ clearTimeout(t);
833
+ }), this.timeoutIds = [];
834
+ }, o.getState = function(t) {
835
+ return t === void 0 && (t = this.state), tt(t, this.props);
836
+ }, o.getItemCount = function() {
837
+ var t = this.items.length;
838
+ return this.itemCount != null ? t = this.itemCount : this.props.itemCount !== void 0 && (t = this.props.itemCount), t;
839
+ }, o.getItemNodeFromIndex = function(t) {
840
+ return this.props.environment ? this.props.environment.document.getElementById(this.getItemId(t)) : null;
841
+ }, o.scrollHighlightedItemIntoView = function() {
842
+ {
843
+ var t = this.getItemNodeFromIndex(this.getState().highlightedIndex);
844
+ this.props.scrollIntoView(t, this._menuNode);
845
+ }
846
+ }, o.moveHighlightedIndex = function(t, s) {
847
+ var l = this.getItemCount(), d = this.getState(), u = d.highlightedIndex;
848
+ if (l > 0) {
849
+ var a = Le(u, t, {
850
+ length: l
851
+ }, this.isItemDisabled, !0);
852
+ this.setHighlightedIndex(a, s);
853
+ }
854
+ }, o.getStateAndHelpers = function() {
855
+ var t = this.getState(), s = t.highlightedIndex, l = t.inputValue, d = t.selectedItem, u = t.isOpen, a = this.props.itemToString, g = this.id, b = this.getRootProps, _ = this.getToggleButtonProps, v = this.getLabelProps, O = this.getMenuProps, h = this.getInputProps, M = this.getItemProps, c = this.openMenu, f = this.closeMenu, p = this.toggleMenu, x = this.selectItem, I = this.selectItemAtIndex, H = this.selectHighlightedItem, N = this.setHighlightedIndex, j = this.clearSelection, A = this.clearItems, w = this.reset, T = this.setItemCount, E = this.unsetItemCount, R = this.internalSetState;
856
+ return {
857
+ // prop getters
858
+ getRootProps: b,
859
+ getToggleButtonProps: _,
860
+ getLabelProps: v,
861
+ getMenuProps: O,
862
+ getInputProps: h,
863
+ getItemProps: M,
864
+ // actions
865
+ reset: w,
866
+ openMenu: c,
867
+ closeMenu: f,
868
+ toggleMenu: p,
869
+ selectItem: x,
870
+ selectItemAtIndex: I,
871
+ selectHighlightedItem: H,
872
+ setHighlightedIndex: N,
873
+ clearSelection: j,
874
+ clearItems: A,
875
+ setItemCount: T,
876
+ unsetItemCount: E,
877
+ setState: R,
878
+ // props
879
+ itemToString: a,
880
+ // derived
881
+ id: g,
882
+ // state
883
+ highlightedIndex: s,
884
+ inputValue: l,
885
+ isOpen: u,
886
+ selectedItem: d
887
+ };
888
+ }, o.componentDidMount = function() {
889
+ var t = this;
890
+ if (process.env.NODE_ENV !== "production" && this.getMenuProps.called && !this.getMenuProps.suppressRefError && wn(this._menuNode, this.getMenuProps), !this.props.environment)
891
+ this.cleanup = function() {
892
+ t.internalClearTimeouts();
893
+ };
894
+ else {
895
+ var s = function() {
896
+ t.isMouseDown = !0;
897
+ }, l = function(_) {
898
+ t.isMouseDown = !1;
899
+ var v = ht(_.target, [t._rootNode, t._menuNode], t.props.environment);
900
+ !v && t.getState().isOpen && t.reset({
901
+ type: vr
902
+ }, function() {
903
+ return t.props.onOuterClick(t.getStateAndHelpers());
904
+ });
905
+ }, d = function() {
906
+ t.isTouchMove = !1;
907
+ }, u = function() {
908
+ t.isTouchMove = !0;
909
+ }, a = function(_) {
910
+ var v = ht(_.target, [t._rootNode, t._menuNode], t.props.environment, !1);
911
+ !t.isTouchMove && !v && t.getState().isOpen && t.reset({
912
+ type: Dr
913
+ }, function() {
914
+ return t.props.onOuterClick(t.getStateAndHelpers());
915
+ });
916
+ }, g = this.props.environment;
917
+ g.addEventListener("mousedown", s), g.addEventListener("mouseup", l), g.addEventListener("touchstart", d), g.addEventListener("touchmove", u), g.addEventListener("touchend", a), this.cleanup = function() {
918
+ t.internalClearTimeouts(), t.updateStatus.cancel(), g.removeEventListener("mousedown", s), g.removeEventListener("mouseup", l), g.removeEventListener("touchstart", d), g.removeEventListener("touchmove", u), g.removeEventListener("touchend", a);
919
+ };
920
+ }
921
+ }, o.shouldScroll = function(t, s) {
922
+ var l = this.props.highlightedIndex === void 0 ? this.getState() : this.props, d = l.highlightedIndex, u = s.highlightedIndex === void 0 ? t : s, a = u.highlightedIndex, g = d && this.getState().isOpen && !t.isOpen, b = d !== a;
923
+ return g || b;
924
+ }, o.componentDidUpdate = function(t, s) {
925
+ process.env.NODE_ENV !== "production" && (Pt(this.state, t, this.props), this.getMenuProps.called && !this.getMenuProps.suppressRefError && wn(this._menuNode, this.getMenuProps)), ft(this.props, "selectedItem") && this.props.selectedItemChanged(t.selectedItem, this.props.selectedItem) && this.internalSetState({
926
+ type: Nr,
927
+ inputValue: this.props.itemToString(this.props.selectedItem)
928
+ }), !this.avoidScrolling && this.shouldScroll(s, t) && this.scrollHighlightedItemIntoView(), this.updateStatus();
929
+ }, o.componentWillUnmount = function() {
930
+ this.cleanup();
931
+ }, o.render = function() {
932
+ var t = bn(this.props.children, ye);
933
+ this.clearItems(), this.getRootProps.called = !1, this.getRootProps.refKey = void 0, this.getRootProps.suppressRefError = void 0, this.getMenuProps.called = !1, this.getMenuProps.refKey = void 0, this.getMenuProps.suppressRefError = void 0, this.getLabelProps.called = !1, this.getInputProps.called = !1;
934
+ var s = bn(t(this.getStateAndHelpers()));
935
+ if (!s)
936
+ return null;
937
+ if (this.getRootProps.called || this.props.suppressRefError)
938
+ return process.env.NODE_ENV !== "production" && !this.getRootProps.suppressRefError && !this.props.suppressRefError && Jo(s, this.getRootProps), s;
939
+ if (fr(s))
940
+ return /* @__PURE__ */ yo(s, this.getRootProps(hr(s)));
941
+ if (process.env.NODE_ENV !== "production")
942
+ throw new Error("downshift: If you return a non-DOM element, you must apply the getRootProps function");
943
+ }, r;
944
+ }(xo);
945
+ return e.defaultProps = {
946
+ defaultHighlightedIndex: null,
947
+ defaultIsOpen: !1,
948
+ getA11yStatusMessage: pr,
949
+ itemToString: function(r) {
950
+ return r == null ? "" : (process.env.NODE_ENV !== "production" && Lo(r) && !r.hasOwnProperty("toString") && console.warn("downshift: An object was passed to the default implementation of `itemToString`. You should probably provide your own `itemToString` implementation. Please refer to the `itemToString` API documentation.", "The object that was passed:", r), String(r));
951
+ },
952
+ onStateChange: ye,
953
+ onInputValueChange: ye,
954
+ onUserAction: ye,
955
+ onChange: ye,
956
+ onSelect: ye,
957
+ onOuterClick: ye,
958
+ selectedItemChanged: function(r, o) {
959
+ return r !== o;
960
+ },
961
+ environment: (
962
+ /* istanbul ignore next (ssr) */
963
+ typeof window > "u" ? void 0 : window
964
+ ),
965
+ stateReducer: function(r, o) {
966
+ return o;
967
+ },
968
+ suppressRefError: !1,
969
+ scrollIntoView: dr
970
+ }, e.stateChangeTypes = zo, e;
971
+ }();
972
+ process.env.NODE_ENV !== "production" && (Xo.propTypes = {
973
+ children: y.func,
974
+ defaultHighlightedIndex: y.number,
975
+ defaultIsOpen: y.bool,
976
+ initialHighlightedIndex: y.number,
977
+ initialSelectedItem: y.any,
978
+ initialInputValue: y.string,
979
+ initialIsOpen: y.bool,
980
+ getA11yStatusMessage: y.func,
981
+ itemToString: y.func,
982
+ onChange: y.func,
983
+ onSelect: y.func,
984
+ onStateChange: y.func,
985
+ onInputValueChange: y.func,
986
+ onUserAction: y.func,
987
+ onOuterClick: y.func,
988
+ selectedItemChanged: y.func,
989
+ stateReducer: y.func,
990
+ itemCount: y.number,
991
+ id: y.string,
992
+ environment: y.shape({
993
+ addEventListener: y.func.isRequired,
994
+ removeEventListener: y.func.isRequired,
995
+ document: y.shape({
996
+ createElement: y.func.isRequired,
997
+ getElementById: y.func.isRequired,
998
+ activeElement: y.any.isRequired,
999
+ body: y.any.isRequired
1000
+ }).isRequired,
1001
+ Node: y.func.isRequired
1002
+ }),
1003
+ suppressRefError: y.bool,
1004
+ scrollIntoView: y.func,
1005
+ // things we keep in state for uncontrolled components
1006
+ // but can accept as props for controlled components
1007
+ /* eslint-disable react/no-unused-prop-types */
1008
+ selectedItem: y.any,
1009
+ isOpen: y.bool,
1010
+ inputValue: y.string,
1011
+ highlightedIndex: y.number,
1012
+ labelId: y.string,
1013
+ inputId: y.string,
1014
+ menuId: y.string,
1015
+ getItemId: y.func
1016
+ /* eslint-enable react/no-unused-prop-types */
1017
+ });
1018
+ function wn(e, n) {
1019
+ var r = n.refKey;
1020
+ e || console.error('downshift: The ref prop "' + r + '" from getMenuProps was not applied correctly on your menu element.');
1021
+ }
1022
+ function Jo(e, n) {
1023
+ var r = n.refKey, o = r !== "ref", i = !fr(e);
1024
+ i && !o && !vn.isForwardRef(e) ? console.error("downshift: You returned a non-DOM element. You must specify a refKey in getRootProps") : !i && o && console.error('downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified "' + r + '"'), !vn.isForwardRef(e) && !hr(e)[r] && console.error('downshift: You must apply the ref prop "' + r + '" from getRootProps onto your root element.');
1025
+ }
1026
+ var Qo = ["highlightedIndex", "items", "environment"], kr = {
1027
+ highlightedIndex: -1,
1028
+ isOpen: !1,
1029
+ selectedItem: null,
1030
+ inputValue: ""
1031
+ };
1032
+ function Zo(e, n, r) {
1033
+ var o = e.props, i = e.type, t = {};
1034
+ Object.keys(n).forEach(function(s) {
1035
+ ei(s, e, n, r), r[s] !== n[s] && (t[s] = r[s]);
1036
+ }), o.onStateChange && Object.keys(t).length && o.onStateChange(K({
1037
+ type: i
1038
+ }, t));
1039
+ }
1040
+ function ei(e, n, r, o) {
1041
+ var i = n.props, t = n.type, s = "on" + Mt(e) + "Change";
1042
+ i[s] && o[e] !== void 0 && o[e] !== r[e] && i[s](K({
1043
+ type: t
1044
+ }, o));
1045
+ }
1046
+ function ti(e, n) {
1047
+ return n.changes;
1048
+ }
1049
+ function ni(e) {
1050
+ var n = e.selectedItem, r = e.itemToString;
1051
+ return n ? r(n) + " has been selected." : "";
1052
+ }
1053
+ var ri = kt(function(e, n) {
1054
+ Rt(e(), n);
1055
+ }, 200), oi = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u" ? Nt : de, ii = "useId" in pt ? function(n) {
1056
+ var r = n.id, o = n.labelId, i = n.menuId, t = n.getItemId, s = n.toggleButtonId, l = n.inputId, d = "downshift-" + pt.useId();
1057
+ r || (r = d);
1058
+ var u = G({
1059
+ labelId: o || r + "-label",
1060
+ menuId: i || r + "-menu",
1061
+ getItemId: t || function(a) {
1062
+ return r + "-item-" + a;
1063
+ },
1064
+ toggleButtonId: s || r + "-toggle-button",
1065
+ inputId: l || r + "-input"
1066
+ });
1067
+ return u.current;
1068
+ } : function(n) {
1069
+ var r = n.id, o = r === void 0 ? "downshift-" + cr() : r, i = n.labelId, t = n.menuId, s = n.getItemId, l = n.toggleButtonId, d = n.inputId, u = G({
1070
+ labelId: i || o + "-label",
1071
+ menuId: t || o + "-menu",
1072
+ getItemId: s || function(a) {
1073
+ return o + "-item-" + a;
1074
+ },
1075
+ toggleButtonId: l || o + "-toggle-button",
1076
+ inputId: d || o + "-input"
1077
+ });
1078
+ return u.current;
1079
+ };
1080
+ function Pr(e, n, r, o) {
1081
+ var i, t;
1082
+ if (e === void 0) {
1083
+ if (n === void 0)
1084
+ throw new Error(o);
1085
+ i = r[n], t = n;
1086
+ } else
1087
+ t = n === void 0 ? r.indexOf(e) : n, i = e;
1088
+ return [i, t];
1089
+ }
1090
+ function Mt(e) {
1091
+ return "" + e.slice(0, 1).toUpperCase() + e.slice(1);
1092
+ }
1093
+ function At(e) {
1094
+ var n = G(e);
1095
+ return n.current = e, n;
1096
+ }
1097
+ function Rr(e, n, r, o) {
1098
+ var i = G(), t = G(), s = oe(function(_, v) {
1099
+ t.current = v, _ = tt(_, v.props);
1100
+ var O = e(_, v), h = v.props.stateReducer(_, K({}, v, {
1101
+ changes: O
1102
+ }));
1103
+ return h;
1104
+ }, [e]), l = bo(s, n, r), d = l[0], u = l[1], a = At(n), g = oe(function(_) {
1105
+ return u(K({
1106
+ props: a.current
1107
+ }, _));
1108
+ }, [a]), b = t.current;
1109
+ return de(function() {
1110
+ var _ = tt(i.current, b == null ? void 0 : b.props), v = b && i.current && !o(_, d);
1111
+ v && Zo(b, _, d), i.current = d;
1112
+ }, [d, b, o]), [d, g];
1113
+ }
1114
+ function si(e, n, r, o) {
1115
+ var i = Rr(e, n, r, o), t = i[0], s = i[1];
1116
+ return [tt(t, n), s];
1117
+ }
1118
+ var qe = {
1119
+ itemToString: function(n) {
1120
+ return n ? String(n) : "";
1121
+ },
1122
+ itemToKey: function(n) {
1123
+ return n;
1124
+ },
1125
+ stateReducer: ti,
1126
+ getA11ySelectionMessage: ni,
1127
+ scrollIntoView: dr,
1128
+ environment: (
1129
+ /* istanbul ignore next (ssr) */
1130
+ typeof window > "u" ? void 0 : window
1131
+ )
1132
+ };
1133
+ function Se(e, n, r) {
1134
+ r === void 0 && (r = kr);
1135
+ var o = e["default" + Mt(n)];
1136
+ return o !== void 0 ? o : r[n];
1137
+ }
1138
+ function Ue(e, n, r) {
1139
+ r === void 0 && (r = kr);
1140
+ var o = e[n];
1141
+ if (o !== void 0)
1142
+ return o;
1143
+ var i = e["initial" + Mt(n)];
1144
+ return i !== void 0 ? i : Se(e, n, r);
1145
+ }
1146
+ function ai(e) {
1147
+ var n = Ue(e, "selectedItem"), r = Ue(e, "isOpen"), o = Ue(e, "highlightedIndex"), i = Ue(e, "inputValue");
1148
+ return {
1149
+ highlightedIndex: o < 0 && n && r ? e.items.findIndex(function(t) {
1150
+ return e.itemToKey(t) === e.itemToKey(n);
1151
+ }) : o,
1152
+ isOpen: r,
1153
+ selectedItem: n,
1154
+ inputValue: i
1155
+ };
1156
+ }
1157
+ function et(e, n, r) {
1158
+ var o = e.items, i = e.initialHighlightedIndex, t = e.defaultHighlightedIndex, s = e.itemToKey, l = n.selectedItem, d = n.highlightedIndex;
1159
+ return o.length === 0 ? -1 : i !== void 0 && d === i ? i : t !== void 0 ? t : l ? o.findIndex(function(u) {
1160
+ return s(l) === s(u);
1161
+ }) : r === 0 ? -1 : r < 0 ? o.length - 1 : 0;
1162
+ }
1163
+ function li(e, n, r) {
1164
+ var o = G({
1165
+ isMouseDown: !1,
1166
+ isTouchMove: !1,
1167
+ isTouchEnd: !1
1168
+ });
1169
+ return de(function() {
1170
+ if (!e)
1171
+ return ye;
1172
+ var i = n.map(function(a) {
1173
+ return a.current;
1174
+ });
1175
+ function t() {
1176
+ o.current.isTouchEnd = !1, o.current.isMouseDown = !0;
1177
+ }
1178
+ function s(a) {
1179
+ o.current.isMouseDown = !1, ht(a.target, i, e) || r();
1180
+ }
1181
+ function l() {
1182
+ o.current.isTouchEnd = !1, o.current.isTouchMove = !1;
1183
+ }
1184
+ function d() {
1185
+ o.current.isTouchMove = !0;
1186
+ }
1187
+ function u(a) {
1188
+ o.current.isTouchEnd = !0, !o.current.isTouchMove && !ht(a.target, i, e, !1) && r();
1189
+ }
1190
+ return e.addEventListener("mousedown", t), e.addEventListener("mouseup", s), e.addEventListener("touchstart", l), e.addEventListener("touchmove", d), e.addEventListener("touchend", u), function() {
1191
+ e.removeEventListener("mousedown", t), e.removeEventListener("mouseup", s), e.removeEventListener("touchstart", l), e.removeEventListener("touchmove", d), e.removeEventListener("touchend", u);
1192
+ };
1193
+ }, [e, r]), o.current;
1194
+ }
1195
+ var Tt = function() {
1196
+ return ye;
1197
+ };
1198
+ process.env.NODE_ENV !== "production" && (Tt = function() {
1199
+ for (var n = G(!0), r = arguments.length, o = new Array(r), i = 0; i < r; i++)
1200
+ o[i] = arguments[i];
1201
+ var t = G(o.reduce(function(l, d) {
1202
+ return l[d] = {}, l;
1203
+ }, {}));
1204
+ de(function() {
1205
+ Object.keys(t.current).forEach(function(l) {
1206
+ var d = t.current[l];
1207
+ if (n.current && !Object.keys(d).length) {
1208
+ console.error("downshift: You forgot to call the " + l + " getter function on your component / element.");
1209
+ return;
1210
+ }
1211
+ var u = d.suppressRefError, a = d.refKey, g = d.elementRef;
1212
+ (!g || !g.current) && !u && console.error('downshift: The ref prop "' + a + '" from ' + l + " was not applied correctly on your element.");
1213
+ }), n.current = !1;
1214
+ });
1215
+ var s = oe(function(l, d, u, a) {
1216
+ t.current[l] = {
1217
+ suppressRefError: d,
1218
+ refKey: u,
1219
+ elementRef: a
1220
+ };
1221
+ }, []);
1222
+ return s;
1223
+ });
1224
+ function En(e, n, r) {
1225
+ var o = r.highlightedIndex, i = r.items, t = r.environment, s = xe(r, Qo), l = rt();
1226
+ de(function() {
1227
+ l || !(t != null && t.document) || ri(function() {
1228
+ return e(K({
1229
+ highlightedIndex: o,
1230
+ highlightedItem: i[o],
1231
+ resultCount: i.length
1232
+ }, s));
1233
+ }, t.document);
1234
+ }, n);
1235
+ }
1236
+ function ui(e) {
1237
+ var n = e.highlightedIndex, r = e.isOpen, o = e.itemRefs, i = e.getItemNodeFromIndex, t = e.menuElement, s = e.scrollIntoView, l = G(!0);
1238
+ return oi(function() {
1239
+ n < 0 || !r || !Object.keys(o.current).length || (l.current === !1 ? l.current = !0 : s(i(n), t));
1240
+ }, [n]), l;
1241
+ }
1242
+ var Ht = ye;
1243
+ process.env.NODE_ENV !== "production" && (Ht = function(n) {
1244
+ var r = n.props, o = n.state, i = G(r), t = rt();
1245
+ de(function() {
1246
+ t || (Pt(o, i.current, r), i.current = r);
1247
+ }, [o, r, t]);
1248
+ });
1249
+ function Cn(e, n, r) {
1250
+ var o;
1251
+ r === void 0 && (r = !0);
1252
+ var i = ((o = e.items) == null ? void 0 : o.length) && n >= 0;
1253
+ return K({
1254
+ isOpen: !1,
1255
+ highlightedIndex: -1
1256
+ }, i && K({
1257
+ selectedItem: e.items[n],
1258
+ isOpen: Se(e, "isOpen"),
1259
+ highlightedIndex: Se(e, "highlightedIndex")
1260
+ }, r && {
1261
+ inputValue: e.itemToString(e.items[n])
1262
+ }));
1263
+ }
1264
+ function di(e, n) {
1265
+ return e.isOpen === n.isOpen && e.inputValue === n.inputValue && e.highlightedIndex === n.highlightedIndex && e.selectedItem === n.selectedItem;
1266
+ }
1267
+ function rt() {
1268
+ var e = pt.useRef(!0);
1269
+ return pt.useEffect(function() {
1270
+ return e.current = !1, function() {
1271
+ e.current = !0;
1272
+ };
1273
+ }, []), e.current;
1274
+ }
1275
+ var Mr = {
1276
+ environment: y.shape({
1277
+ addEventListener: y.func.isRequired,
1278
+ removeEventListener: y.func.isRequired,
1279
+ document: y.shape({
1280
+ createElement: y.func.isRequired,
1281
+ getElementById: y.func.isRequired,
1282
+ activeElement: y.any.isRequired,
1283
+ body: y.any.isRequired
1284
+ }).isRequired,
1285
+ Node: y.func.isRequired
1286
+ }),
1287
+ itemToString: y.func,
1288
+ itemToKey: y.func,
1289
+ stateReducer: y.func
1290
+ }, Ar = K({}, Mr, {
1291
+ getA11yStatusMessage: y.func,
1292
+ highlightedIndex: y.number,
1293
+ defaultHighlightedIndex: y.number,
1294
+ initialHighlightedIndex: y.number,
1295
+ isOpen: y.bool,
1296
+ defaultIsOpen: y.bool,
1297
+ initialIsOpen: y.bool,
1298
+ selectedItem: y.any,
1299
+ initialSelectedItem: y.any,
1300
+ defaultSelectedItem: y.any,
1301
+ id: y.string,
1302
+ labelId: y.string,
1303
+ menuId: y.string,
1304
+ getItemId: y.func,
1305
+ toggleButtonId: y.string,
1306
+ onSelectedItemChange: y.func,
1307
+ onHighlightedIndexChange: y.func,
1308
+ onStateChange: y.func,
1309
+ onIsOpenChange: y.func,
1310
+ scrollIntoView: y.func
1311
+ });
1312
+ function ci(e, n, r) {
1313
+ var o = n.type, i = n.props, t;
1314
+ switch (o) {
1315
+ case r.ItemMouseMove:
1316
+ t = {
1317
+ highlightedIndex: n.disabled ? -1 : n.index
1318
+ };
1319
+ break;
1320
+ case r.MenuMouseLeave:
1321
+ t = {
1322
+ highlightedIndex: -1
1323
+ };
1324
+ break;
1325
+ case r.ToggleButtonClick:
1326
+ case r.FunctionToggleMenu:
1327
+ t = {
1328
+ isOpen: !e.isOpen,
1329
+ highlightedIndex: e.isOpen ? -1 : et(i, e, 0)
1330
+ };
1331
+ break;
1332
+ case r.FunctionOpenMenu:
1333
+ t = {
1334
+ isOpen: !0,
1335
+ highlightedIndex: et(i, e, 0)
1336
+ };
1337
+ break;
1338
+ case r.FunctionCloseMenu:
1339
+ t = {
1340
+ isOpen: !1
1341
+ };
1342
+ break;
1343
+ case r.FunctionSetHighlightedIndex:
1344
+ t = {
1345
+ highlightedIndex: n.highlightedIndex
1346
+ };
1347
+ break;
1348
+ case r.FunctionSetInputValue:
1349
+ t = {
1350
+ inputValue: n.inputValue
1351
+ };
1352
+ break;
1353
+ case r.FunctionReset:
1354
+ t = {
1355
+ highlightedIndex: Se(i, "highlightedIndex"),
1356
+ isOpen: Se(i, "isOpen"),
1357
+ selectedItem: Se(i, "selectedItem"),
1358
+ inputValue: Se(i, "inputValue")
1359
+ };
1360
+ break;
1361
+ default:
1362
+ throw new Error("Reducer called without proper action type.");
1363
+ }
1364
+ return K({}, e, t);
1365
+ }
1366
+ Xe(Xe({}, Ar), { items: y.array.isRequired, isItemDisabled: y.func, getA11ySelectionMessage: y.func });
1367
+ function pi(e) {
1368
+ var n = e.isOpen, r = e.resultCount, o = e.previousResultCount;
1369
+ return n ? r ? r !== o ? "".concat(r, " result").concat(r === 1 ? " is" : "s are", " available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select.") : "" : "No results are available." : "";
1370
+ }
1371
+ Xe(Xe({}, qe), { getA11yStatusMessage: pi, isItemDisabled: function() {
1372
+ return !1;
1373
+ } });
1374
+ process.env.NODE_ENV;
1375
+ process.env.NODE_ENV;
1376
+ process.env.NODE_ENV;
1377
+ process.env.NODE_ENV;
1378
+ process.env.NODE_ENV;
1379
+ process.env.NODE_ENV;
1380
+ process.env.NODE_ENV;
1381
+ process.env.NODE_ENV;
1382
+ process.env.NODE_ENV;
1383
+ process.env.NODE_ENV;
1384
+ process.env.NODE_ENV;
1385
+ process.env.NODE_ENV;
1386
+ process.env.NODE_ENV;
1387
+ process.env.NODE_ENV;
1388
+ process.env.NODE_ENV;
1389
+ process.env.NODE_ENV;
1390
+ process.env.NODE_ENV;
1391
+ process.env.NODE_ENV;
1392
+ process.env.NODE_ENV;
1393
+ process.env.NODE_ENV;
1394
+ process.env.NODE_ENV;
1395
+ process.env.NODE_ENV;
1396
+ process.env.NODE_ENV;
1397
+ var jt = process.env.NODE_ENV !== "production" ? "__input_keydown_arrow_down__" : 0, Vt = process.env.NODE_ENV !== "production" ? "__input_keydown_arrow_up__" : 1, $t = process.env.NODE_ENV !== "production" ? "__input_keydown_escape__" : 2, Kt = process.env.NODE_ENV !== "production" ? "__input_keydown_home__" : 3, Ft = process.env.NODE_ENV !== "production" ? "__input_keydown_end__" : 4, Lt = process.env.NODE_ENV !== "production" ? "__input_keydown_page_up__" : 5, Bt = process.env.NODE_ENV !== "production" ? "__input_keydown_page_down__" : 6, zt = process.env.NODE_ENV !== "production" ? "__input_keydown_enter__" : 7, qt = process.env.NODE_ENV !== "production" ? "__input_change__" : 8, mt = process.env.NODE_ENV !== "production" ? "__input_blur__" : 9, Ut = process.env.NODE_ENV !== "production" ? "__input_click__" : 10, Tr = process.env.NODE_ENV !== "production" ? "__menu_mouse_leave__" : 11, Hr = process.env.NODE_ENV !== "production" ? "__item_mouse_move__" : 12, Wt = process.env.NODE_ENV !== "production" ? "__item_click__" : 13, jr = process.env.NODE_ENV !== "production" ? "__togglebutton_click__" : 14, Vr = process.env.NODE_ENV !== "production" ? "__function_toggle_menu__" : 15, $r = process.env.NODE_ENV !== "production" ? "__function_open_menu__" : 16, Kr = process.env.NODE_ENV !== "production" ? "__function_close_menu__" : 17, Fr = process.env.NODE_ENV !== "production" ? "__function_set_highlighted_index__" : 18, Yt = process.env.NODE_ENV !== "production" ? "__function_select_item__" : 19, Lr = process.env.NODE_ENV !== "production" ? "__function_set_input_value__" : 20, Br = process.env.NODE_ENV !== "production" ? "__function_reset__" : 21, Gt = process.env.NODE_ENV !== "production" ? "__controlled_prop_updated_selected_item__" : 22, zr = /* @__PURE__ */ Object.freeze({
1398
+ __proto__: null,
1399
+ InputKeyDownArrowDown: jt,
1400
+ InputKeyDownArrowUp: Vt,
1401
+ InputKeyDownEscape: $t,
1402
+ InputKeyDownHome: Kt,
1403
+ InputKeyDownEnd: Ft,
1404
+ InputKeyDownPageUp: Lt,
1405
+ InputKeyDownPageDown: Bt,
1406
+ InputKeyDownEnter: zt,
1407
+ InputChange: qt,
1408
+ InputBlur: mt,
1409
+ InputClick: Ut,
1410
+ MenuMouseLeave: Tr,
1411
+ ItemMouseMove: Hr,
1412
+ ItemClick: Wt,
1413
+ ToggleButtonClick: jr,
1414
+ FunctionToggleMenu: Vr,
1415
+ FunctionOpenMenu: $r,
1416
+ FunctionCloseMenu: Kr,
1417
+ FunctionSetHighlightedIndex: Fr,
1418
+ FunctionSelectItem: Yt,
1419
+ FunctionSetInputValue: Lr,
1420
+ FunctionReset: Br,
1421
+ ControlledPropUpdatedSelectedItem: Gt
1422
+ });
1423
+ function fi(e) {
1424
+ var n = ai(e), r = n.selectedItem, o = n.inputValue;
1425
+ return o === "" && r && e.defaultInputValue === void 0 && e.initialInputValue === void 0 && e.inputValue === void 0 && (o = e.itemToString(r)), K({}, n, {
1426
+ inputValue: o
1427
+ });
1428
+ }
1429
+ var hi = K({}, Ar, {
1430
+ items: y.array.isRequired,
1431
+ isItemDisabled: y.func,
1432
+ selectedItemChanged: y.func,
1433
+ getA11ySelectionMessage: y.func,
1434
+ inputValue: y.string,
1435
+ defaultInputValue: y.string,
1436
+ initialInputValue: y.string,
1437
+ inputId: y.string,
1438
+ onInputValueChange: y.func
1439
+ });
1440
+ function mi(e, n, r, o) {
1441
+ var i = G(), t = Rr(e, n, r, o), s = t[0], l = t[1], d = rt();
1442
+ return de(function() {
1443
+ if (ft(n, "selectedItem")) {
1444
+ if (!d) {
1445
+ var u;
1446
+ n.selectedItemChanged === void 0 ? u = n.itemToKey(n.selectedItem) !== n.itemToKey(i.current) : (console.warn('The "selectedItemChanged" is deprecated. Please use "itemToKey instead". https://github.com/downshift-js/downshift/blob/master/src/hooks/useCombobox/README.md#selecteditemchanged'), u = n.selectedItemChanged(i.current, n.selectedItem)), u && l({
1447
+ type: Gt,
1448
+ inputValue: n.itemToString(n.selectedItem)
1449
+ });
1450
+ }
1451
+ i.current = s.selectedItem === i.current ? n.selectedItem : s.selectedItem;
1452
+ }
1453
+ }, [s.selectedItem, n.selectedItem]), [tt(s, n), l];
1454
+ }
1455
+ var qr = ye;
1456
+ process.env.NODE_ENV !== "production" && (qr = function(n, r) {
1457
+ y.checkPropTypes(hi, n, "prop", r.name);
1458
+ });
1459
+ var gi = K({}, qe, {
1460
+ getA11yStatusMessage: pr,
1461
+ isItemDisabled: function() {
1462
+ return !1;
1463
+ }
1464
+ });
1465
+ function vi(e, n) {
1466
+ var r, o = n.type, i = n.props, t = n.altKey, s;
1467
+ switch (o) {
1468
+ case Wt:
1469
+ s = {
1470
+ isOpen: Se(i, "isOpen"),
1471
+ highlightedIndex: Se(i, "highlightedIndex"),
1472
+ selectedItem: i.items[n.index],
1473
+ inputValue: i.itemToString(i.items[n.index])
1474
+ };
1475
+ break;
1476
+ case jt:
1477
+ e.isOpen ? s = {
1478
+ highlightedIndex: Le(e.highlightedIndex, 1, i.items, i.isItemDisabled, !0)
1479
+ } : s = {
1480
+ highlightedIndex: t && e.selectedItem == null ? -1 : et(i, e, 1),
1481
+ isOpen: i.items.length >= 0
1482
+ };
1483
+ break;
1484
+ case Vt:
1485
+ e.isOpen ? t ? s = Cn(i, e.highlightedIndex) : s = {
1486
+ highlightedIndex: Le(e.highlightedIndex, -1, i.items, i.isItemDisabled, !0)
1487
+ } : s = {
1488
+ highlightedIndex: et(i, e, -1),
1489
+ isOpen: i.items.length >= 0
1490
+ };
1491
+ break;
1492
+ case zt:
1493
+ s = Cn(i, e.highlightedIndex);
1494
+ break;
1495
+ case $t:
1496
+ s = K({
1497
+ isOpen: !1,
1498
+ highlightedIndex: -1
1499
+ }, !e.isOpen && {
1500
+ selectedItem: null,
1501
+ inputValue: ""
1502
+ });
1503
+ break;
1504
+ case Lt:
1505
+ s = {
1506
+ highlightedIndex: Le(e.highlightedIndex, -10, i.items, i.isItemDisabled, !0)
1507
+ };
1508
+ break;
1509
+ case Bt:
1510
+ s = {
1511
+ highlightedIndex: Le(e.highlightedIndex, 10, i.items, i.isItemDisabled, !0)
1512
+ };
1513
+ break;
1514
+ case Kt:
1515
+ s = {
1516
+ highlightedIndex: Je(0, !1, i.items, i.isItemDisabled)
1517
+ };
1518
+ break;
1519
+ case Ft:
1520
+ s = {
1521
+ highlightedIndex: Je(i.items.length - 1, !0, i.items, i.isItemDisabled)
1522
+ };
1523
+ break;
1524
+ case mt:
1525
+ s = K({
1526
+ isOpen: !1,
1527
+ highlightedIndex: -1
1528
+ }, e.highlightedIndex >= 0 && ((r = i.items) == null ? void 0 : r.length) && n.selectItem && {
1529
+ selectedItem: i.items[e.highlightedIndex],
1530
+ inputValue: i.itemToString(i.items[e.highlightedIndex])
1531
+ });
1532
+ break;
1533
+ case qt:
1534
+ s = {
1535
+ isOpen: !0,
1536
+ highlightedIndex: Se(i, "highlightedIndex"),
1537
+ inputValue: n.inputValue
1538
+ };
1539
+ break;
1540
+ case Ut:
1541
+ s = {
1542
+ isOpen: !e.isOpen,
1543
+ highlightedIndex: e.isOpen ? -1 : et(i, e, 0)
1544
+ };
1545
+ break;
1546
+ case Yt:
1547
+ s = {
1548
+ selectedItem: n.selectedItem,
1549
+ inputValue: i.itemToString(n.selectedItem)
1550
+ };
1551
+ break;
1552
+ case Gt:
1553
+ s = {
1554
+ inputValue: n.inputValue
1555
+ };
1556
+ break;
1557
+ default:
1558
+ return ci(e, n, zr);
1559
+ }
1560
+ return K({}, e, s);
1561
+ }
1562
+ var _i = ["onMouseLeave", "refKey", "ref"], Ii = ["item", "index", "refKey", "ref", "onMouseMove", "onMouseDown", "onClick", "onPress", "disabled"], yi = ["onClick", "onPress", "refKey", "ref"], xi = ["onKeyDown", "onChange", "onInput", "onBlur", "onChangeText", "onClick", "refKey", "ref"];
1563
+ Ie.stateChangeTypes = zr;
1564
+ function Ie(e) {
1565
+ e === void 0 && (e = {}), qr(e, Ie);
1566
+ var n = K({}, gi, e), r = n.items, o = n.scrollIntoView, i = n.environment, t = n.getA11yStatusMessage, s = n.getA11ySelectionMessage, l = n.itemToString, d = mi(vi, n, fi, di), u = d[0], a = d[1], g = u.isOpen, b = u.highlightedIndex, _ = u.selectedItem, v = u.inputValue, O = G(null), h = G({}), M = G(null), c = G(null), f = rt(), p = ii(n), x = G(), I = At({
1567
+ state: u,
1568
+ props: n
1569
+ }), H = oe(function(D) {
1570
+ return h.current[p.getItemId(D)];
1571
+ }, [p]);
1572
+ En(t, [g, b, v, r], K({
1573
+ previousResultCount: x.current,
1574
+ items: r,
1575
+ environment: i,
1576
+ itemToString: l
1577
+ }, u)), En(s, [_], K({
1578
+ previousResultCount: x.current,
1579
+ items: r,
1580
+ environment: i,
1581
+ itemToString: l
1582
+ }, u));
1583
+ var N = ui({
1584
+ menuElement: O.current,
1585
+ highlightedIndex: b,
1586
+ isOpen: g,
1587
+ itemRefs: h,
1588
+ scrollIntoView: o,
1589
+ getItemNodeFromIndex: H
1590
+ });
1591
+ Ht({
1592
+ props: n,
1593
+ state: u
1594
+ }), de(function() {
1595
+ var D = Ue(n, "isOpen");
1596
+ D && M.current && M.current.focus();
1597
+ }, []), de(function() {
1598
+ f || (x.current = r.length);
1599
+ });
1600
+ var j = li(i, [c, O, M], oe(function() {
1601
+ I.current.state.isOpen && a({
1602
+ type: mt,
1603
+ selectItem: !1
1604
+ });
1605
+ }, [a, I])), A = Tt("getInputProps", "getMenuProps");
1606
+ de(function() {
1607
+ g || (h.current = {});
1608
+ }, [g]), de(function() {
1609
+ var D;
1610
+ !g || !(i != null && i.document) || !(M != null && (D = M.current) != null && D.focus) || i.document.activeElement !== M.current && M.current.focus();
1611
+ }, [g, i]);
1612
+ var w = $e(function() {
1613
+ return {
1614
+ ArrowDown: function(P) {
1615
+ P.preventDefault(), a({
1616
+ type: jt,
1617
+ altKey: P.altKey
1618
+ });
1619
+ },
1620
+ ArrowUp: function(P) {
1621
+ P.preventDefault(), a({
1622
+ type: Vt,
1623
+ altKey: P.altKey
1624
+ });
1625
+ },
1626
+ Home: function(P) {
1627
+ I.current.state.isOpen && (P.preventDefault(), a({
1628
+ type: Kt
1629
+ }));
1630
+ },
1631
+ End: function(P) {
1632
+ I.current.state.isOpen && (P.preventDefault(), a({
1633
+ type: Ft
1634
+ }));
1635
+ },
1636
+ Escape: function(P) {
1637
+ var V = I.current.state;
1638
+ (V.isOpen || V.inputValue || V.selectedItem || V.highlightedIndex > -1) && (P.preventDefault(), a({
1639
+ type: $t
1640
+ }));
1641
+ },
1642
+ Enter: function(P) {
1643
+ var V = I.current.state;
1644
+ !V.isOpen || P.which === 229 || (P.preventDefault(), a({
1645
+ type: zt
1646
+ }));
1647
+ },
1648
+ PageUp: function(P) {
1649
+ I.current.state.isOpen && (P.preventDefault(), a({
1650
+ type: Lt
1651
+ }));
1652
+ },
1653
+ PageDown: function(P) {
1654
+ I.current.state.isOpen && (P.preventDefault(), a({
1655
+ type: Bt
1656
+ }));
1657
+ }
1658
+ };
1659
+ }, [a, I]), T = oe(function(D) {
1660
+ return K({
1661
+ id: p.labelId,
1662
+ htmlFor: p.inputId
1663
+ }, D);
1664
+ }, [p]), E = oe(function(D, P) {
1665
+ var V, C = D === void 0 ? {} : D, z = C.onMouseLeave, B = C.refKey, L = B === void 0 ? "ref" : B, ne = C.ref, ie = xe(C, _i), pe = P === void 0 ? {} : P, S = pe.suppressRefError, he = S === void 0 ? !1 : S;
1666
+ return A("getMenuProps", he, L, O), K((V = {}, V[L] = Ve(ne, function(re) {
1667
+ O.current = re;
1668
+ }), V.id = p.menuId, V.role = "listbox", V["aria-labelledby"] = ie && ie["aria-label"] ? void 0 : "" + p.labelId, V.onMouseLeave = le(z, function() {
1669
+ a({
1670
+ type: Tr
1671
+ });
1672
+ }), V), ie);
1673
+ }, [a, A, p]), R = oe(function(D) {
1674
+ var P, V, C = D === void 0 ? {} : D, z = C.item, B = C.index, L = C.refKey, ne = L === void 0 ? "ref" : L, ie = C.ref, pe = C.onMouseMove, S = C.onMouseDown, he = C.onClick;
1675
+ C.onPress;
1676
+ var re = C.disabled, Me = xe(C, Ii);
1677
+ re !== void 0 && console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useCombobox.');
1678
+ var Ae = I.current, Ke = Ae.props, Ee = Ae.state, se = Pr(z, B, Ke.items, "Pass either item or index to getItemProps!"), fe = se[0], _e = se[1], Ze = Ke.isItemDisabled(fe, _e), _t = "onClick", st = he, Te = function() {
1679
+ j.isTouchEnd || _e === Ee.highlightedIndex || (N.current = !1, a({
1680
+ type: Hr,
1681
+ index: _e,
1682
+ disabled: Ze
1683
+ }));
1684
+ }, Fe = function() {
1685
+ a({
1686
+ type: Wt,
1687
+ index: _e
1688
+ });
1689
+ }, He = function(ho) {
1690
+ return ho.preventDefault();
1691
+ };
1692
+ return K((P = {}, P[ne] = Ve(ie, function(Ce) {
1693
+ Ce && (h.current[p.getItemId(_e)] = Ce);
1694
+ }), P["aria-disabled"] = Ze, P["aria-selected"] = "" + (_e === Ee.highlightedIndex), P.id = p.getItemId(_e), P.role = "option", P), !Ze && (V = {}, V[_t] = le(st, Fe), V), {
1695
+ onMouseMove: le(pe, Te),
1696
+ onMouseDown: le(S, He)
1697
+ }, Me);
1698
+ }, [a, p, I, j, N]), F = oe(function(D) {
1699
+ var P, V = D === void 0 ? {} : D, C = V.onClick;
1700
+ V.onPress;
1701
+ var z = V.refKey, B = z === void 0 ? "ref" : z, L = V.ref, ne = xe(V, yi), ie = I.current.state, pe = function() {
1702
+ a({
1703
+ type: jr
1704
+ });
1705
+ };
1706
+ return K((P = {}, P[B] = Ve(L, function(S) {
1707
+ c.current = S;
1708
+ }), P["aria-controls"] = p.menuId, P["aria-expanded"] = ie.isOpen, P.id = p.toggleButtonId, P.tabIndex = -1, P), !ne.disabled && K({}, {
1709
+ onClick: le(C, pe)
1710
+ }), ne);
1711
+ }, [a, I, p]), q = oe(function(D, P) {
1712
+ var V, C = D === void 0 ? {} : D, z = C.onKeyDown, B = C.onChange, L = C.onInput, ne = C.onBlur;
1713
+ C.onChangeText;
1714
+ var ie = C.onClick, pe = C.refKey, S = pe === void 0 ? "ref" : pe, he = C.ref, re = xe(C, xi), Me = P === void 0 ? {} : P, Ae = Me.suppressRefError, Ke = Ae === void 0 ? !1 : Ae;
1715
+ A("getInputProps", Ke, S, M);
1716
+ var Ee = I.current.state, se = function(He) {
1717
+ var Ce = nt(He);
1718
+ Ce && w[Ce] && w[Ce](He);
1719
+ }, fe = function(He) {
1720
+ a({
1721
+ type: qt,
1722
+ inputValue: He.target.value
1723
+ });
1724
+ }, _e = function(He) {
1725
+ if (i != null && i.document && Ee.isOpen && !j.isMouseDown) {
1726
+ var Ce = He.relatedTarget === null && i.document.activeElement !== i.document.body;
1727
+ a({
1728
+ type: mt,
1729
+ selectItem: !Ce
1730
+ });
1731
+ }
1732
+ }, Ze = function() {
1733
+ a({
1734
+ type: Ut
1735
+ });
1736
+ }, _t = "onChange", st = {};
1737
+ if (!re.disabled) {
1738
+ var Te;
1739
+ st = (Te = {}, Te[_t] = le(B, L, fe), Te.onKeyDown = le(z, se), Te.onBlur = le(ne, _e), Te.onClick = le(ie, Ze), Te);
1740
+ }
1741
+ return K((V = {}, V[S] = Ve(he, function(Fe) {
1742
+ M.current = Fe;
1743
+ }), V["aria-activedescendant"] = Ee.isOpen && Ee.highlightedIndex > -1 ? p.getItemId(Ee.highlightedIndex) : "", V["aria-autocomplete"] = "list", V["aria-controls"] = p.menuId, V["aria-expanded"] = Ee.isOpen, V["aria-labelledby"] = re && re["aria-label"] ? void 0 : p.labelId, V.autoComplete = "off", V.id = p.inputId, V.role = "combobox", V.value = Ee.inputValue, V), st, re);
1744
+ }, [a, p, i, w, I, j, A]), k = oe(function() {
1745
+ a({
1746
+ type: Vr
1747
+ });
1748
+ }, [a]), X = oe(function() {
1749
+ a({
1750
+ type: Kr
1751
+ });
1752
+ }, [a]), Q = oe(function() {
1753
+ a({
1754
+ type: $r
1755
+ });
1756
+ }, [a]), U = oe(function(D) {
1757
+ a({
1758
+ type: Fr,
1759
+ highlightedIndex: D
1760
+ });
1761
+ }, [a]), $ = oe(function(D) {
1762
+ a({
1763
+ type: Yt,
1764
+ selectedItem: D
1765
+ });
1766
+ }, [a]), W = oe(function(D) {
1767
+ a({
1768
+ type: Lr,
1769
+ inputValue: D
1770
+ });
1771
+ }, [a]), J = oe(function() {
1772
+ a({
1773
+ type: Br
1774
+ });
1775
+ }, [a]);
1776
+ return {
1777
+ // prop getters.
1778
+ getItemProps: R,
1779
+ getLabelProps: T,
1780
+ getMenuProps: E,
1781
+ getInputProps: q,
1782
+ getToggleButtonProps: F,
1783
+ // actions.
1784
+ toggleMenu: k,
1785
+ openMenu: Q,
1786
+ closeMenu: X,
1787
+ setHighlightedIndex: U,
1788
+ setInputValue: W,
1789
+ selectItem: $,
1790
+ reset: J,
1791
+ // state.
1792
+ highlightedIndex: b,
1793
+ isOpen: g,
1794
+ selectedItem: _,
1795
+ inputValue: v
1796
+ };
1797
+ }
1798
+ var Ur = {
1799
+ activeIndex: -1,
1800
+ selectedItems: []
1801
+ };
1802
+ function Sn(e, n) {
1803
+ return Ue(e, n, Ur);
1804
+ }
1805
+ function On(e, n) {
1806
+ return Se(e, n, Ur);
1807
+ }
1808
+ function bi(e) {
1809
+ var n = Sn(e, "activeIndex"), r = Sn(e, "selectedItems");
1810
+ return {
1811
+ activeIndex: n,
1812
+ selectedItems: r
1813
+ };
1814
+ }
1815
+ function Nn(e) {
1816
+ if (e.shiftKey || e.metaKey || e.ctrlKey || e.altKey)
1817
+ return !1;
1818
+ var n = e.target;
1819
+ return !(n instanceof HTMLInputElement && // if element is a text input
1820
+ n.value !== "" && // and we have text in it
1821
+ // and cursor is either not at the start or is currently highlighting text.
1822
+ (n.selectionStart !== 0 || n.selectionEnd !== 0));
1823
+ }
1824
+ function wi(e) {
1825
+ var n = e.removedSelectedItem, r = e.itemToString;
1826
+ return r(n) + " has been removed.";
1827
+ }
1828
+ function Ei(e, n) {
1829
+ return e.selectedItems === n.selectedItems && e.activeIndex === n.activeIndex;
1830
+ }
1831
+ var Ci = K({}, Mr, {
1832
+ selectedItems: y.array,
1833
+ initialSelectedItems: y.array,
1834
+ defaultSelectedItems: y.array,
1835
+ getA11yRemovalMessage: y.func,
1836
+ activeIndex: y.number,
1837
+ initialActiveIndex: y.number,
1838
+ defaultActiveIndex: y.number,
1839
+ onActiveIndexChange: y.func,
1840
+ onSelectedItemsChange: y.func,
1841
+ keyNavigationNext: y.string,
1842
+ keyNavigationPrevious: y.string
1843
+ }), Si = {
1844
+ itemToString: qe.itemToString,
1845
+ itemToKey: qe.itemToKey,
1846
+ stateReducer: qe.stateReducer,
1847
+ environment: qe.environment,
1848
+ getA11yRemovalMessage: wi,
1849
+ keyNavigationNext: "ArrowRight",
1850
+ keyNavigationPrevious: "ArrowLeft"
1851
+ }, Wr = ye;
1852
+ process.env.NODE_ENV !== "production" && (Wr = function(n, r) {
1853
+ y.checkPropTypes(Ci, n, "prop", r.name);
1854
+ });
1855
+ var Xt = process.env.NODE_ENV !== "production" ? "__selected_item_click__" : 0, Jt = process.env.NODE_ENV !== "production" ? "__selected_item_keydown_delete__" : 1, Qt = process.env.NODE_ENV !== "production" ? "__selected_item_keydown_backspace__" : 2, Zt = process.env.NODE_ENV !== "production" ? "__selected_item_keydown_navigation_next__" : 3, en = process.env.NODE_ENV !== "production" ? "__selected_item_keydown_navigation_previous__" : 4, tn = process.env.NODE_ENV !== "production" ? "__dropdown_keydown_navigation_previous__" : 5, nn = process.env.NODE_ENV !== "production" ? "__dropdown_keydown_backspace__" : 6, rn = process.env.NODE_ENV !== "production" ? "__dropdown_click__" : 7, on = process.env.NODE_ENV !== "production" ? "__function_add_selected_item__" : 8, sn = process.env.NODE_ENV !== "production" ? "__function_remove_selected_item__" : 9, an = process.env.NODE_ENV !== "production" ? "__function_set_selected_items__" : 10, ln = process.env.NODE_ENV !== "production" ? "__function_set_active_index__" : 11, un = process.env.NODE_ENV !== "production" ? "__function_reset__" : 12, Oi = /* @__PURE__ */ Object.freeze({
1856
+ __proto__: null,
1857
+ SelectedItemClick: Xt,
1858
+ SelectedItemKeyDownDelete: Jt,
1859
+ SelectedItemKeyDownBackspace: Qt,
1860
+ SelectedItemKeyDownNavigationNext: Zt,
1861
+ SelectedItemKeyDownNavigationPrevious: en,
1862
+ DropdownKeyDownNavigationPrevious: tn,
1863
+ DropdownKeyDownBackspace: nn,
1864
+ DropdownClick: rn,
1865
+ FunctionAddSelectedItem: on,
1866
+ FunctionRemoveSelectedItem: sn,
1867
+ FunctionSetSelectedItems: an,
1868
+ FunctionSetActiveIndex: ln,
1869
+ FunctionReset: un
1870
+ });
1871
+ function Ni(e, n) {
1872
+ var r = n.type, o = n.index, i = n.props, t = n.selectedItem, s = e.activeIndex, l = e.selectedItems, d;
1873
+ switch (r) {
1874
+ case Xt:
1875
+ d = {
1876
+ activeIndex: o
1877
+ };
1878
+ break;
1879
+ case en:
1880
+ d = {
1881
+ activeIndex: s - 1 < 0 ? 0 : s - 1
1882
+ };
1883
+ break;
1884
+ case Zt:
1885
+ d = {
1886
+ activeIndex: s + 1 >= l.length ? -1 : s + 1
1887
+ };
1888
+ break;
1889
+ case Qt:
1890
+ case Jt: {
1891
+ if (s < 0)
1892
+ break;
1893
+ var u = s;
1894
+ l.length === 1 ? u = -1 : s === l.length - 1 && (u = l.length - 2), d = K({
1895
+ selectedItems: [].concat(l.slice(0, s), l.slice(s + 1))
1896
+ }, {
1897
+ activeIndex: u
1898
+ });
1899
+ break;
1900
+ }
1901
+ case tn:
1902
+ d = {
1903
+ activeIndex: l.length - 1
1904
+ };
1905
+ break;
1906
+ case nn:
1907
+ d = {
1908
+ selectedItems: l.slice(0, l.length - 1)
1909
+ };
1910
+ break;
1911
+ case on:
1912
+ d = {
1913
+ selectedItems: [].concat(l, [t])
1914
+ };
1915
+ break;
1916
+ case rn:
1917
+ d = {
1918
+ activeIndex: -1
1919
+ };
1920
+ break;
1921
+ case sn: {
1922
+ var a = s, g = l.findIndex(function(v) {
1923
+ return i.itemToKey(v) === i.itemToKey(t);
1924
+ });
1925
+ if (g < 0)
1926
+ break;
1927
+ l.length === 1 ? a = -1 : g === l.length - 1 && (a = l.length - 2), d = {
1928
+ selectedItems: [].concat(l.slice(0, g), l.slice(g + 1)),
1929
+ activeIndex: a
1930
+ };
1931
+ break;
1932
+ }
1933
+ case an: {
1934
+ var b = n.selectedItems;
1935
+ d = {
1936
+ selectedItems: b
1937
+ };
1938
+ break;
1939
+ }
1940
+ case ln: {
1941
+ var _ = n.activeIndex;
1942
+ d = {
1943
+ activeIndex: _
1944
+ };
1945
+ break;
1946
+ }
1947
+ case un:
1948
+ d = {
1949
+ activeIndex: On(i, "activeIndex"),
1950
+ selectedItems: On(i, "selectedItems")
1951
+ };
1952
+ break;
1953
+ default:
1954
+ throw new Error("Reducer called without proper action type.");
1955
+ }
1956
+ return K({}, e, d);
1957
+ }
1958
+ var Di = ["refKey", "ref", "onClick", "onKeyDown", "selectedItem", "index"], ki = ["refKey", "ref", "onKeyDown", "onClick", "preventKeyAction"];
1959
+ je.stateChangeTypes = Oi;
1960
+ function je(e) {
1961
+ e === void 0 && (e = {}), Wr(e, je);
1962
+ var n = K({}, Si, e), r = n.getA11yRemovalMessage, o = n.itemToString, i = n.environment, t = n.keyNavigationNext, s = n.keyNavigationPrevious, l = si(Ni, n, bi, Ei), d = l[0], u = l[1], a = d.activeIndex, g = d.selectedItems, b = rt(), _ = G(null), v = G(g), O = G();
1963
+ O.current = [];
1964
+ var h = At({
1965
+ state: d,
1966
+ props: n
1967
+ });
1968
+ de(function() {
1969
+ if (!(b || !(i != null && i.document))) {
1970
+ if (g.length < v.current.length) {
1971
+ var w = v.current.find(function(T) {
1972
+ return g.findIndex(function(E) {
1973
+ return n.itemToKey(E) === n.itemToKey(T);
1974
+ }) < 0;
1975
+ });
1976
+ Rt(r({
1977
+ itemToString: o,
1978
+ resultCount: g.length,
1979
+ removedSelectedItem: w,
1980
+ activeIndex: a,
1981
+ activeSelectedItem: g[a]
1982
+ }), i.document);
1983
+ }
1984
+ v.current = g;
1985
+ }
1986
+ }, [g.length]), de(function() {
1987
+ b || (a === -1 && _.current ? _.current.focus() : O.current[a] && O.current[a].focus());
1988
+ }, [a]), Ht({
1989
+ props: n,
1990
+ state: d
1991
+ });
1992
+ var M = Tt("getDropdownProps"), c = $e(function() {
1993
+ var w;
1994
+ return w = {}, w[s] = function() {
1995
+ u({
1996
+ type: en
1997
+ });
1998
+ }, w[t] = function() {
1999
+ u({
2000
+ type: Zt
2001
+ });
2002
+ }, w.Delete = function() {
2003
+ u({
2004
+ type: Jt
2005
+ });
2006
+ }, w.Backspace = function() {
2007
+ u({
2008
+ type: Qt
2009
+ });
2010
+ }, w;
2011
+ }, [u, t, s]), f = $e(function() {
2012
+ var w;
2013
+ return w = {}, w[s] = function(T) {
2014
+ Nn(T) && u({
2015
+ type: tn
2016
+ });
2017
+ }, w.Backspace = function(E) {
2018
+ Nn(E) && u({
2019
+ type: nn
2020
+ });
2021
+ }, w;
2022
+ }, [u, s]), p = oe(function(w) {
2023
+ var T, E = w === void 0 ? {} : w, R = E.refKey, F = R === void 0 ? "ref" : R, q = E.ref, k = E.onClick, X = E.onKeyDown, Q = E.selectedItem, U = E.index, $ = xe(E, Di), W = h.current.state, J = Pr(Q, U, W.selectedItems, "Pass either item or index to getSelectedItemProps!"), D = J[1], P = D > -1 && D === W.activeIndex, V = function() {
2024
+ u({
2025
+ type: Xt,
2026
+ index: D
2027
+ });
2028
+ }, C = function(B) {
2029
+ var L = nt(B);
2030
+ L && c[L] && c[L](B);
2031
+ };
2032
+ return K((T = {}, T[F] = Ve(q, function(z) {
2033
+ z && O.current.push(z);
2034
+ }), T.tabIndex = P ? 0 : -1, T.onClick = le(k, V), T.onKeyDown = le(X, C), T), $);
2035
+ }, [u, h, c]), x = oe(function(w, T) {
2036
+ var E, R = w === void 0 ? {} : w, F = R.refKey, q = F === void 0 ? "ref" : F, k = R.ref, X = R.onKeyDown, Q = R.onClick, U = R.preventKeyAction, $ = U === void 0 ? !1 : U, W = xe(R, ki), J = T === void 0 ? {} : T, D = J.suppressRefError, P = D === void 0 ? !1 : D;
2037
+ M("getDropdownProps", P, q, _);
2038
+ var V = function(B) {
2039
+ var L = nt(B);
2040
+ L && f[L] && f[L](B);
2041
+ }, C = function() {
2042
+ u({
2043
+ type: rn
2044
+ });
2045
+ };
2046
+ return K((E = {}, E[q] = Ve(k, function(z) {
2047
+ z && (_.current = z);
2048
+ }), E), !$ && {
2049
+ onKeyDown: le(X, V),
2050
+ onClick: le(Q, C)
2051
+ }, W);
2052
+ }, [u, f, M]), I = oe(function(w) {
2053
+ u({
2054
+ type: on,
2055
+ selectedItem: w
2056
+ });
2057
+ }, [u]), H = oe(function(w) {
2058
+ u({
2059
+ type: sn,
2060
+ selectedItem: w
2061
+ });
2062
+ }, [u]), N = oe(function(w) {
2063
+ u({
2064
+ type: an,
2065
+ selectedItems: w
2066
+ });
2067
+ }, [u]), j = oe(function(w) {
2068
+ u({
2069
+ type: ln,
2070
+ activeIndex: w
2071
+ });
2072
+ }, [u]), A = oe(function() {
2073
+ u({
2074
+ type: un
2075
+ });
2076
+ }, [u]);
2077
+ return {
2078
+ getSelectedItemProps: p,
2079
+ getDropdownProps: x,
2080
+ addSelectedItem: I,
2081
+ removeSelectedItem: H,
2082
+ setSelectedItems: N,
2083
+ setActiveIndex: j,
2084
+ reset: A,
2085
+ selectedItems: g,
2086
+ activeIndex: a
2087
+ };
2088
+ }
2089
+ var gt = { exports: {} }, Yr = {
2090
+ À: "A",
2091
+ Á: "A",
2092
+ Â: "A",
2093
+ Ã: "A",
2094
+ Ä: "A",
2095
+ Å: "A",
2096
+ Ấ: "A",
2097
+ Ắ: "A",
2098
+ Ẳ: "A",
2099
+ Ẵ: "A",
2100
+ Ặ: "A",
2101
+ Æ: "AE",
2102
+ Ầ: "A",
2103
+ Ằ: "A",
2104
+ Ȃ: "A",
2105
+ Ả: "A",
2106
+ Ạ: "A",
2107
+ Ẩ: "A",
2108
+ Ẫ: "A",
2109
+ Ậ: "A",
2110
+ Ç: "C",
2111
+ Ḉ: "C",
2112
+ È: "E",
2113
+ É: "E",
2114
+ Ê: "E",
2115
+ Ë: "E",
2116
+ Ế: "E",
2117
+ Ḗ: "E",
2118
+ Ề: "E",
2119
+ Ḕ: "E",
2120
+ Ḝ: "E",
2121
+ Ȇ: "E",
2122
+ Ẻ: "E",
2123
+ Ẽ: "E",
2124
+ Ẹ: "E",
2125
+ Ể: "E",
2126
+ Ễ: "E",
2127
+ Ệ: "E",
2128
+ Ì: "I",
2129
+ Í: "I",
2130
+ Î: "I",
2131
+ Ï: "I",
2132
+ Ḯ: "I",
2133
+ Ȋ: "I",
2134
+ Ỉ: "I",
2135
+ Ị: "I",
2136
+ Ð: "D",
2137
+ Ñ: "N",
2138
+ Ò: "O",
2139
+ Ó: "O",
2140
+ Ô: "O",
2141
+ Õ: "O",
2142
+ Ö: "O",
2143
+ Ø: "O",
2144
+ Ố: "O",
2145
+ Ṍ: "O",
2146
+ Ṓ: "O",
2147
+ Ȏ: "O",
2148
+ Ỏ: "O",
2149
+ Ọ: "O",
2150
+ Ổ: "O",
2151
+ Ỗ: "O",
2152
+ Ộ: "O",
2153
+ Ờ: "O",
2154
+ Ở: "O",
2155
+ Ỡ: "O",
2156
+ Ớ: "O",
2157
+ Ợ: "O",
2158
+ Ù: "U",
2159
+ Ú: "U",
2160
+ Û: "U",
2161
+ Ü: "U",
2162
+ Ủ: "U",
2163
+ Ụ: "U",
2164
+ Ử: "U",
2165
+ Ữ: "U",
2166
+ Ự: "U",
2167
+ Ý: "Y",
2168
+ à: "a",
2169
+ á: "a",
2170
+ â: "a",
2171
+ ã: "a",
2172
+ ä: "a",
2173
+ å: "a",
2174
+ ấ: "a",
2175
+ ắ: "a",
2176
+ ẳ: "a",
2177
+ ẵ: "a",
2178
+ ặ: "a",
2179
+ æ: "ae",
2180
+ ầ: "a",
2181
+ ằ: "a",
2182
+ ȃ: "a",
2183
+ ả: "a",
2184
+ ạ: "a",
2185
+ ẩ: "a",
2186
+ ẫ: "a",
2187
+ ậ: "a",
2188
+ ç: "c",
2189
+ ḉ: "c",
2190
+ è: "e",
2191
+ é: "e",
2192
+ ê: "e",
2193
+ ë: "e",
2194
+ ế: "e",
2195
+ ḗ: "e",
2196
+ ề: "e",
2197
+ ḕ: "e",
2198
+ ḝ: "e",
2199
+ ȇ: "e",
2200
+ ẻ: "e",
2201
+ ẽ: "e",
2202
+ ẹ: "e",
2203
+ ể: "e",
2204
+ ễ: "e",
2205
+ ệ: "e",
2206
+ ì: "i",
2207
+ í: "i",
2208
+ î: "i",
2209
+ ï: "i",
2210
+ ḯ: "i",
2211
+ ȋ: "i",
2212
+ ỉ: "i",
2213
+ ị: "i",
2214
+ ð: "d",
2215
+ ñ: "n",
2216
+ ò: "o",
2217
+ ó: "o",
2218
+ ô: "o",
2219
+ õ: "o",
2220
+ ö: "o",
2221
+ ø: "o",
2222
+ ố: "o",
2223
+ ṍ: "o",
2224
+ ṓ: "o",
2225
+ ȏ: "o",
2226
+ ỏ: "o",
2227
+ ọ: "o",
2228
+ ổ: "o",
2229
+ ỗ: "o",
2230
+ ộ: "o",
2231
+ ờ: "o",
2232
+ ở: "o",
2233
+ ỡ: "o",
2234
+ ớ: "o",
2235
+ ợ: "o",
2236
+ ù: "u",
2237
+ ú: "u",
2238
+ û: "u",
2239
+ ü: "u",
2240
+ ủ: "u",
2241
+ ụ: "u",
2242
+ ử: "u",
2243
+ ữ: "u",
2244
+ ự: "u",
2245
+ ý: "y",
2246
+ ÿ: "y",
2247
+ Ā: "A",
2248
+ ā: "a",
2249
+ Ă: "A",
2250
+ ă: "a",
2251
+ Ą: "A",
2252
+ ą: "a",
2253
+ Ć: "C",
2254
+ ć: "c",
2255
+ Ĉ: "C",
2256
+ ĉ: "c",
2257
+ Ċ: "C",
2258
+ ċ: "c",
2259
+ Č: "C",
2260
+ č: "c",
2261
+ C̆: "C",
2262
+ c̆: "c",
2263
+ Ď: "D",
2264
+ ď: "d",
2265
+ Đ: "D",
2266
+ đ: "d",
2267
+ Ē: "E",
2268
+ ē: "e",
2269
+ Ĕ: "E",
2270
+ ĕ: "e",
2271
+ Ė: "E",
2272
+ ė: "e",
2273
+ Ę: "E",
2274
+ ę: "e",
2275
+ Ě: "E",
2276
+ ě: "e",
2277
+ Ĝ: "G",
2278
+ Ǵ: "G",
2279
+ ĝ: "g",
2280
+ ǵ: "g",
2281
+ Ğ: "G",
2282
+ ğ: "g",
2283
+ Ġ: "G",
2284
+ ġ: "g",
2285
+ Ģ: "G",
2286
+ ģ: "g",
2287
+ Ĥ: "H",
2288
+ ĥ: "h",
2289
+ Ħ: "H",
2290
+ ħ: "h",
2291
+ Ḫ: "H",
2292
+ ḫ: "h",
2293
+ Ĩ: "I",
2294
+ ĩ: "i",
2295
+ Ī: "I",
2296
+ ī: "i",
2297
+ Ĭ: "I",
2298
+ ĭ: "i",
2299
+ Į: "I",
2300
+ į: "i",
2301
+ İ: "I",
2302
+ ı: "i",
2303
+ IJ: "IJ",
2304
+ ij: "ij",
2305
+ Ĵ: "J",
2306
+ ĵ: "j",
2307
+ Ķ: "K",
2308
+ ķ: "k",
2309
+ Ḱ: "K",
2310
+ ḱ: "k",
2311
+ K̆: "K",
2312
+ k̆: "k",
2313
+ Ĺ: "L",
2314
+ ĺ: "l",
2315
+ Ļ: "L",
2316
+ ļ: "l",
2317
+ Ľ: "L",
2318
+ ľ: "l",
2319
+ Ŀ: "L",
2320
+ ŀ: "l",
2321
+ Ł: "l",
2322
+ ł: "l",
2323
+ Ḿ: "M",
2324
+ ḿ: "m",
2325
+ M̆: "M",
2326
+ m̆: "m",
2327
+ Ń: "N",
2328
+ ń: "n",
2329
+ Ņ: "N",
2330
+ ņ: "n",
2331
+ Ň: "N",
2332
+ ň: "n",
2333
+ ʼn: "n",
2334
+ N̆: "N",
2335
+ n̆: "n",
2336
+ Ō: "O",
2337
+ ō: "o",
2338
+ Ŏ: "O",
2339
+ ŏ: "o",
2340
+ Ő: "O",
2341
+ ő: "o",
2342
+ Œ: "OE",
2343
+ œ: "oe",
2344
+ P̆: "P",
2345
+ p̆: "p",
2346
+ Ŕ: "R",
2347
+ ŕ: "r",
2348
+ Ŗ: "R",
2349
+ ŗ: "r",
2350
+ Ř: "R",
2351
+ ř: "r",
2352
+ R̆: "R",
2353
+ r̆: "r",
2354
+ Ȓ: "R",
2355
+ ȓ: "r",
2356
+ Ś: "S",
2357
+ ś: "s",
2358
+ Ŝ: "S",
2359
+ ŝ: "s",
2360
+ Ş: "S",
2361
+ Ș: "S",
2362
+ ș: "s",
2363
+ ş: "s",
2364
+ Š: "S",
2365
+ š: "s",
2366
+ Ţ: "T",
2367
+ ţ: "t",
2368
+ ț: "t",
2369
+ Ț: "T",
2370
+ Ť: "T",
2371
+ ť: "t",
2372
+ Ŧ: "T",
2373
+ ŧ: "t",
2374
+ T̆: "T",
2375
+ t̆: "t",
2376
+ Ũ: "U",
2377
+ ũ: "u",
2378
+ Ū: "U",
2379
+ ū: "u",
2380
+ Ŭ: "U",
2381
+ ŭ: "u",
2382
+ Ů: "U",
2383
+ ů: "u",
2384
+ Ű: "U",
2385
+ ű: "u",
2386
+ Ų: "U",
2387
+ ų: "u",
2388
+ Ȗ: "U",
2389
+ ȗ: "u",
2390
+ V̆: "V",
2391
+ v̆: "v",
2392
+ Ŵ: "W",
2393
+ ŵ: "w",
2394
+ Ẃ: "W",
2395
+ ẃ: "w",
2396
+ X̆: "X",
2397
+ x̆: "x",
2398
+ Ŷ: "Y",
2399
+ ŷ: "y",
2400
+ Ÿ: "Y",
2401
+ Y̆: "Y",
2402
+ y̆: "y",
2403
+ Ź: "Z",
2404
+ ź: "z",
2405
+ Ż: "Z",
2406
+ ż: "z",
2407
+ Ž: "Z",
2408
+ ž: "z",
2409
+ ſ: "s",
2410
+ ƒ: "f",
2411
+ Ơ: "O",
2412
+ ơ: "o",
2413
+ Ư: "U",
2414
+ ư: "u",
2415
+ Ǎ: "A",
2416
+ ǎ: "a",
2417
+ Ǐ: "I",
2418
+ ǐ: "i",
2419
+ Ǒ: "O",
2420
+ ǒ: "o",
2421
+ Ǔ: "U",
2422
+ ǔ: "u",
2423
+ Ǖ: "U",
2424
+ ǖ: "u",
2425
+ Ǘ: "U",
2426
+ ǘ: "u",
2427
+ Ǚ: "U",
2428
+ ǚ: "u",
2429
+ Ǜ: "U",
2430
+ ǜ: "u",
2431
+ Ứ: "U",
2432
+ ứ: "u",
2433
+ Ṹ: "U",
2434
+ ṹ: "u",
2435
+ Ǻ: "A",
2436
+ ǻ: "a",
2437
+ Ǽ: "AE",
2438
+ ǽ: "ae",
2439
+ Ǿ: "O",
2440
+ ǿ: "o",
2441
+ Þ: "TH",
2442
+ þ: "th",
2443
+ Ṕ: "P",
2444
+ ṕ: "p",
2445
+ Ṥ: "S",
2446
+ ṥ: "s",
2447
+ X́: "X",
2448
+ x́: "x",
2449
+ Ѓ: "Г",
2450
+ ѓ: "г",
2451
+ Ќ: "К",
2452
+ ќ: "к",
2453
+ A̋: "A",
2454
+ a̋: "a",
2455
+ E̋: "E",
2456
+ e̋: "e",
2457
+ I̋: "I",
2458
+ i̋: "i",
2459
+ Ǹ: "N",
2460
+ ǹ: "n",
2461
+ Ồ: "O",
2462
+ ồ: "o",
2463
+ Ṑ: "O",
2464
+ ṑ: "o",
2465
+ Ừ: "U",
2466
+ ừ: "u",
2467
+ Ẁ: "W",
2468
+ ẁ: "w",
2469
+ Ỳ: "Y",
2470
+ ỳ: "y",
2471
+ Ȁ: "A",
2472
+ ȁ: "a",
2473
+ Ȅ: "E",
2474
+ ȅ: "e",
2475
+ Ȉ: "I",
2476
+ ȉ: "i",
2477
+ Ȍ: "O",
2478
+ ȍ: "o",
2479
+ Ȑ: "R",
2480
+ ȑ: "r",
2481
+ Ȕ: "U",
2482
+ ȕ: "u",
2483
+ B̌: "B",
2484
+ b̌: "b",
2485
+ Č̣: "C",
2486
+ č̣: "c",
2487
+ Ê̌: "E",
2488
+ ê̌: "e",
2489
+ F̌: "F",
2490
+ f̌: "f",
2491
+ Ǧ: "G",
2492
+ ǧ: "g",
2493
+ Ȟ: "H",
2494
+ ȟ: "h",
2495
+ J̌: "J",
2496
+ ǰ: "j",
2497
+ Ǩ: "K",
2498
+ ǩ: "k",
2499
+ M̌: "M",
2500
+ m̌: "m",
2501
+ P̌: "P",
2502
+ p̌: "p",
2503
+ Q̌: "Q",
2504
+ q̌: "q",
2505
+ Ř̩: "R",
2506
+ ř̩: "r",
2507
+ Ṧ: "S",
2508
+ ṧ: "s",
2509
+ V̌: "V",
2510
+ v̌: "v",
2511
+ W̌: "W",
2512
+ w̌: "w",
2513
+ X̌: "X",
2514
+ x̌: "x",
2515
+ Y̌: "Y",
2516
+ y̌: "y",
2517
+ A̧: "A",
2518
+ a̧: "a",
2519
+ B̧: "B",
2520
+ b̧: "b",
2521
+ Ḑ: "D",
2522
+ ḑ: "d",
2523
+ Ȩ: "E",
2524
+ ȩ: "e",
2525
+ Ɛ̧: "E",
2526
+ ɛ̧: "e",
2527
+ Ḩ: "H",
2528
+ ḩ: "h",
2529
+ I̧: "I",
2530
+ i̧: "i",
2531
+ Ɨ̧: "I",
2532
+ ɨ̧: "i",
2533
+ M̧: "M",
2534
+ m̧: "m",
2535
+ O̧: "O",
2536
+ o̧: "o",
2537
+ Q̧: "Q",
2538
+ q̧: "q",
2539
+ U̧: "U",
2540
+ u̧: "u",
2541
+ X̧: "X",
2542
+ x̧: "x",
2543
+ Z̧: "Z",
2544
+ z̧: "z",
2545
+ й: "и",
2546
+ Й: "И",
2547
+ ё: "е",
2548
+ Ё: "Е"
2549
+ }, Gr = Object.keys(Yr).join("|"), Pi = new RegExp(Gr, "g"), Ri = new RegExp(Gr, "");
2550
+ function Mi(e) {
2551
+ return Yr[e];
2552
+ }
2553
+ var Xr = function(e) {
2554
+ return e.replace(Pi, Mi);
2555
+ }, Ai = function(e) {
2556
+ return !!e.match(Ri);
2557
+ };
2558
+ gt.exports = Xr;
2559
+ gt.exports.has = Ai;
2560
+ gt.exports.remove = Xr;
2561
+ var Ti = gt.exports;
2562
+ const Hi = /* @__PURE__ */ Ro(Ti);
2563
+ /**
2564
+ * @name match-sorter
2565
+ * @license MIT license.
2566
+ * @copyright (c) 2020 Kent C. Dodds
2567
+ * @author Kent C. Dodds <me@kentcdodds.com> (https://kentcdodds.com)
2568
+ */
2569
+ const ge = {
2570
+ CASE_SENSITIVE_EQUAL: 7,
2571
+ EQUAL: 6,
2572
+ STARTS_WITH: 5,
2573
+ WORD_STARTS_WITH: 4,
2574
+ CONTAINS: 3,
2575
+ ACRONYM: 2,
2576
+ MATCHES: 1,
2577
+ NO_MATCH: 0
2578
+ }, ji = (e, n) => String(e.rankedValue).localeCompare(String(n.rankedValue));
2579
+ function dn(e, n, r) {
2580
+ r === void 0 && (r = {});
2581
+ const {
2582
+ keys: o,
2583
+ threshold: i = ge.MATCHES,
2584
+ baseSort: t = ji,
2585
+ sorter: s = (u) => u.sort((a, g) => Fi(a, g, t))
2586
+ } = r, l = e.reduce(d, []);
2587
+ return s(l).map((u) => {
2588
+ let {
2589
+ item: a
2590
+ } = u;
2591
+ return a;
2592
+ });
2593
+ function d(u, a, g) {
2594
+ const b = Vi(a, o, n, r), {
2595
+ rank: _,
2596
+ keyThreshold: v = i
2597
+ } = b;
2598
+ return _ >= v && u.push({
2599
+ ...b,
2600
+ item: a,
2601
+ index: g
2602
+ }), u;
2603
+ }
2604
+ }
2605
+ dn.rankings = ge;
2606
+ function Vi(e, n, r, o) {
2607
+ if (!n) {
2608
+ const t = e;
2609
+ return {
2610
+ // ends up being duplicate of 'item' in matches but consistent
2611
+ rankedValue: t,
2612
+ rank: Dn(t, r, o),
2613
+ keyIndex: -1,
2614
+ keyThreshold: o.threshold
2615
+ };
2616
+ }
2617
+ return zi(e, n).reduce((t, s, l) => {
2618
+ let {
2619
+ rank: d,
2620
+ rankedValue: u,
2621
+ keyIndex: a,
2622
+ keyThreshold: g
2623
+ } = t, {
2624
+ itemValue: b,
2625
+ attributes: _
2626
+ } = s, v = Dn(b, r, o), O = u;
2627
+ const {
2628
+ minRanking: h,
2629
+ maxRanking: M,
2630
+ threshold: c
2631
+ } = _;
2632
+ return v < h && v >= ge.MATCHES ? v = h : v > M && (v = M), v > d && (d = v, a = l, g = c, O = b), {
2633
+ rankedValue: O,
2634
+ rank: d,
2635
+ keyIndex: a,
2636
+ keyThreshold: g
2637
+ };
2638
+ }, {
2639
+ rankedValue: e,
2640
+ rank: ge.NO_MATCH,
2641
+ keyIndex: -1,
2642
+ keyThreshold: o.threshold
2643
+ });
2644
+ }
2645
+ function Dn(e, n, r) {
2646
+ return e = kn(e, r), n = kn(n, r), n.length > e.length ? ge.NO_MATCH : e === n ? ge.CASE_SENSITIVE_EQUAL : (e = e.toLowerCase(), n = n.toLowerCase(), e === n ? ge.EQUAL : e.startsWith(n) ? ge.STARTS_WITH : e.includes(` ${n}`) ? ge.WORD_STARTS_WITH : e.includes(n) ? ge.CONTAINS : n.length === 1 ? ge.NO_MATCH : $i(e).includes(n) ? ge.ACRONYM : Ki(e, n));
2647
+ }
2648
+ function $i(e) {
2649
+ let n = "";
2650
+ return e.split(" ").forEach((o) => {
2651
+ o.split("-").forEach((t) => {
2652
+ n += t.substr(0, 1);
2653
+ });
2654
+ }), n;
2655
+ }
2656
+ function Ki(e, n) {
2657
+ let r = 0, o = 0;
2658
+ function i(d, u, a) {
2659
+ for (let g = a, b = u.length; g < b; g++)
2660
+ if (u[g] === d)
2661
+ return r += 1, g + 1;
2662
+ return -1;
2663
+ }
2664
+ function t(d) {
2665
+ const u = 1 / d, a = r / n.length;
2666
+ return ge.MATCHES + a * u;
2667
+ }
2668
+ const s = i(n[0], e, 0);
2669
+ if (s < 0)
2670
+ return ge.NO_MATCH;
2671
+ o = s;
2672
+ for (let d = 1, u = n.length; d < u; d++) {
2673
+ const a = n[d];
2674
+ if (o = i(a, e, o), !(o > -1))
2675
+ return ge.NO_MATCH;
2676
+ }
2677
+ const l = o - s;
2678
+ return t(l);
2679
+ }
2680
+ function Fi(e, n, r) {
2681
+ const {
2682
+ rank: t,
2683
+ keyIndex: s
2684
+ } = e, {
2685
+ rank: l,
2686
+ keyIndex: d
2687
+ } = n;
2688
+ return t === l ? s === d ? r(e, n) : s < d ? -1 : 1 : t > l ? -1 : 1;
2689
+ }
2690
+ function kn(e, n) {
2691
+ let {
2692
+ keepDiacritics: r
2693
+ } = n;
2694
+ return e = `${e}`, r || (e = Hi(e)), e;
2695
+ }
2696
+ function Li(e, n) {
2697
+ typeof n == "object" && (n = n.key);
2698
+ let r;
2699
+ if (typeof n == "function")
2700
+ r = n(e);
2701
+ else if (e == null)
2702
+ r = null;
2703
+ else if (Object.hasOwnProperty.call(e, n))
2704
+ r = e[n];
2705
+ else {
2706
+ if (n.includes("."))
2707
+ return Bi(n, e);
2708
+ r = null;
2709
+ }
2710
+ return r == null ? [] : Array.isArray(r) ? r : [String(r)];
2711
+ }
2712
+ function Bi(e, n) {
2713
+ const r = e.split(".");
2714
+ let o = [n];
2715
+ for (let i = 0, t = r.length; i < t; i++) {
2716
+ const s = r[i];
2717
+ let l = [];
2718
+ for (let d = 0, u = o.length; d < u; d++) {
2719
+ const a = o[d];
2720
+ if (a != null)
2721
+ if (Object.hasOwnProperty.call(a, s)) {
2722
+ const g = a[s];
2723
+ g != null && l.push(g);
2724
+ } else
2725
+ s === "*" && (l = l.concat(a));
2726
+ }
2727
+ o = l;
2728
+ }
2729
+ return Array.isArray(o[0]) ? [].concat(...o) : o;
2730
+ }
2731
+ function zi(e, n) {
2732
+ const r = [];
2733
+ for (let o = 0, i = n.length; o < i; o++) {
2734
+ const t = n[o], s = qi(t), l = Li(e, t);
2735
+ for (let d = 0, u = l.length; d < u; d++)
2736
+ r.push({
2737
+ itemValue: l[d],
2738
+ attributes: s
2739
+ });
2740
+ }
2741
+ return r;
2742
+ }
2743
+ const Pn = {
2744
+ maxRanking: 1 / 0,
2745
+ minRanking: -1 / 0
2746
+ };
2747
+ function qi(e) {
2748
+ return typeof e == "string" ? Pn : {
2749
+ ...Pn,
2750
+ ...e
2751
+ };
2752
+ }
2753
+ function Ui({
2754
+ defaultOpen: e,
2755
+ placement: n = "bottom",
2756
+ modal: r,
2757
+ open: o,
2758
+ onOpenChange: i,
2759
+ onClose: t,
2760
+ disableCloseOnClickOutside: s,
2761
+ disableCloseOnEscape: l,
2762
+ openOnHover: d,
2763
+ fillAvailableHeight: u,
2764
+ matchReferenceWidth: a,
2765
+ fixedWidth: g,
2766
+ disableCaret: b,
2767
+ noPadding: _,
2768
+ disableShift: v,
2769
+ disableFlip: O,
2770
+ disableFlipFallback: h,
2771
+ disableAutoUpdate: M,
2772
+ disableFocusLock: c,
2773
+ root: f
2774
+ } = {}) {
2775
+ const [p, x] = Y(e), [I, H] = Y(), [N, j] = Y(), A = o ?? p, w = i ?? x, T = G(null), E = qn({
2776
+ placement: n,
2777
+ open: A,
2778
+ onOpenChange: w,
2779
+ whileElementsMounted: M ? void 0 : Un,
2780
+ middleware: [
2781
+ Wn(8),
2782
+ Yn({
2783
+ padding: 5,
2784
+ apply({ rects: U, availableHeight: $, elements: W }) {
2785
+ Object.assign(W.floating.style, {
2786
+ ...a ? { width: `${U.reference.width}px` } : g ? { width: "40dvw" } : {},
2787
+ ...u ? (
2788
+ // { maxHeight: "60dvh" }
2789
+ // Minimum height is 236px before flip
2790
+ { maxHeight: `${Math.max(236, $ - 20)}px` }
2791
+ ) : {},
2792
+ zIndex: 1
2793
+ });
2794
+ }
2795
+ }),
2796
+ Gn({
2797
+ mainAxis: !O,
2798
+ crossAxis: !1,
2799
+ fallbackAxisSideDirection: h ? "none" : "end",
2800
+ padding: 5
2801
+ }),
2802
+ Xn({
2803
+ padding: 5,
2804
+ mainAxis: !v,
2805
+ crossAxis: !1,
2806
+ limiter: Jn({
2807
+ mainAxis: !v
2808
+ })
2809
+ }),
2810
+ Co({ element: b ? null : T, padding: 5 })
2811
+ ]
2812
+ }), R = E.context, F = Qn(R, {
2813
+ enabled: o == null && !d
2814
+ }), q = Zn(R, {
2815
+ enabled: o == null && !!d,
2816
+ handleClose: er()
2817
+ }), k = tr(R, {
2818
+ escapeKey: !l,
2819
+ outsidePress: () => s ? !1 : (t == null || t(), !0)
2820
+ }), X = nr(R), Q = rr([F, q, k, X]);
2821
+ return $e(
2822
+ () => ({
2823
+ open: A,
2824
+ setOpen: w,
2825
+ onClose: t,
2826
+ ...Q,
2827
+ ...E,
2828
+ modal: r,
2829
+ labelId: I,
2830
+ descriptionId: N,
2831
+ setLabelId: H,
2832
+ setDescriptionId: j,
2833
+ arrowRef: T,
2834
+ disableCaret: b,
2835
+ noPadding: _,
2836
+ fillAvailableHeight: u,
2837
+ matchReferenceWidth: a,
2838
+ fixedWidth: g,
2839
+ disableFlipFallback: h,
2840
+ disableAutoUpdate: M,
2841
+ disableFocusLock: c,
2842
+ root: f
2843
+ }),
2844
+ [
2845
+ A,
2846
+ w,
2847
+ t,
2848
+ Q,
2849
+ E,
2850
+ r,
2851
+ I,
2852
+ N,
2853
+ b,
2854
+ _,
2855
+ u,
2856
+ a,
2857
+ g,
2858
+ h,
2859
+ M,
2860
+ c,
2861
+ f
2862
+ ]
2863
+ );
2864
+ }
2865
+ const Jr = Qe(null), ot = () => {
2866
+ const e = ve(Jr);
2867
+ if (e == null)
2868
+ throw new Error("Popover components must be wrapped in <Popover />");
2869
+ return e;
2870
+ }, Wi = function(e) {
2871
+ const { children: n } = e, r = ot(), o = G(null), i = Re([r.refs.setReference, o]);
2872
+ return n({
2873
+ "data-state": r.open ? "open" : "closed",
2874
+ "data-anv": "popover-trigger",
2875
+ ...r.getReferenceProps({ ref: i })
2876
+ });
2877
+ }, Yi = "_content_x4y1q_4", Gi = "_arrow_x4y1q_26", yt = {
2878
+ content: Yi,
2879
+ arrow: Gi,
2880
+ "no-padding": "_no-padding_x4y1q_37"
2881
+ }, Xi = ce(
2882
+ function({ className: e, style: n, ...r }, o) {
2883
+ var i, t;
2884
+ const {
2885
+ context: s,
2886
+ theme: l,
2887
+ mode: d,
2888
+ disableCaret: u,
2889
+ noPadding: a,
2890
+ onClose: g,
2891
+ disableFocusLock: b,
2892
+ root: _,
2893
+ ...v
2894
+ } = ot(), O = ve(jn), { root: h } = ve(ar), M = Re([v.refs.setFloating, o]);
2895
+ if (!s.open || O && !((i = O == null ? void 0 : O.ref) != null && i.current))
2896
+ return null;
2897
+ const c = te(e, yt.content, {
2898
+ [yt["no-padding"]]: a
2899
+ }), f = (p) => {
2900
+ p.code === "Escape" && (g == null || g());
2901
+ };
2902
+ return /* @__PURE__ */ m.jsx(Bn, { root: _ ?? ((t = O == null ? void 0 : O.ref) == null ? void 0 : t.current) ?? h, children: /* @__PURE__ */ m.jsx(
2903
+ zn,
2904
+ {
2905
+ context: s,
2906
+ modal: v.modal,
2907
+ order: ["reference", "content"],
2908
+ disabled: b,
2909
+ children: /* @__PURE__ */ m.jsx(Fn, { theme: l, mode: d, children: /* @__PURE__ */ m.jsxs(
2910
+ "div",
2911
+ {
2912
+ ref: M,
2913
+ "data-anv": "popover-content",
2914
+ style: { ...v.floatingStyles, ...n },
2915
+ "aria-labelledby": v.labelId,
2916
+ "aria-describedby": v.descriptionId,
2917
+ className: c,
2918
+ ...v.getFloatingProps(r),
2919
+ onKeyDown: f,
2920
+ role: "presentation",
2921
+ children: [
2922
+ !u && /* @__PURE__ */ m.jsx(
2923
+ Eo,
2924
+ {
2925
+ ref: v.arrowRef,
2926
+ context: s,
2927
+ className: yt.arrow
2928
+ }
2929
+ ),
2930
+ r.children
2931
+ ]
2932
+ }
2933
+ ) })
2934
+ }
2935
+ ) });
2936
+ }
2937
+ ), Ji = ce(
2938
+ function(e, n) {
2939
+ const { setOpen: r, onClose: o } = ot();
2940
+ return /* @__PURE__ */ m.jsx(
2941
+ Ge,
2942
+ {
2943
+ ref: n,
2944
+ "data-anv": "popover-close",
2945
+ ...e,
2946
+ onClick: (i) => {
2947
+ var t;
2948
+ (t = e.onClick) == null || t.call(e, i), o == null || o(), r(!1);
2949
+ }
2950
+ }
2951
+ );
2952
+ }
2953
+ ), Qi = ce(
2954
+ function(e, n) {
2955
+ const { children: r, size: o, ...i } = e, t = ot(), s = r.ref, l = Re([
2956
+ t.refs.setReference,
2957
+ n,
2958
+ s
2959
+ ]);
2960
+ return /* @__PURE__ */ m.jsx(
2961
+ Ge,
2962
+ {
2963
+ ref: l,
2964
+ size: o,
2965
+ "data-state": t.open ? "open" : "closed",
2966
+ "data-anv": "popover-button",
2967
+ ...t.getReferenceProps(i),
2968
+ children: r
2969
+ }
2970
+ );
2971
+ }
2972
+ );
2973
+ function Zi({
2974
+ children: e,
2975
+ modal: n,
2976
+ ...r
2977
+ }) {
2978
+ const o = Ui({ modal: n, ...r }), { theme: i, mode: t = "light" } = ve(Ln), s = $e(
2979
+ () => ({ ...o, theme: i, mode: t }),
2980
+ [t, o, i]
2981
+ );
2982
+ return /* @__PURE__ */ m.jsx(Jr.Provider, { value: s, children: e });
2983
+ }
2984
+ const cn = Object.assign(Zi, {
2985
+ Trigger: Wi,
2986
+ Close: Ji,
2987
+ Content: Xi,
2988
+ Button: Qi
2989
+ }), Qr = (e) => /* @__PURE__ */ ue.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e }, /* @__PURE__ */ ue.createElement("path", { d: "M9.29 6.71a.996.996 0 0 0 0 1.41L13.17 12l-3.88 3.88a.996.996 0 1 0 1.41 1.41l4.59-4.59a.996.996 0 0 0 0-1.41L10.7 6.7c-.38-.38-1.02-.38-1.41.01z" })), es = "_combobox_1jt3w_2", ts = "_input_1jt3w_30", ns = "_error_1jt3w_61", rs = "_small_1jt3w_86", os = "_large_1jt3w_89", is = "_disabled_1jt3w_113", ss = "_chip_1jt3w_162", as = "_prefix_1jt3w_217", ls = "_suffix_1jt3w_218", us = "_empty_1jt3w_260", ae = {
2990
+ combobox: es,
2991
+ "search-field": "_search-field_1jt3w_6",
2992
+ "popover-content": "_popover-content_1jt3w_21",
2993
+ "input-wrapper": "_input-wrapper_1jt3w_30",
2994
+ input: ts,
2995
+ error: ns,
2996
+ "buttons-wrapper": "_buttons-wrapper_1jt3w_69",
2997
+ small: rs,
2998
+ large: os,
2999
+ "close-button-wrapper": "_close-button-wrapper_1jt3w_93",
3000
+ "close-button": "_close-button_1jt3w_93",
3001
+ "loading-infinite": "_loading-infinite_1jt3w_113",
3002
+ "loading-progress": "_loading-progress_1jt3w_113",
3003
+ disabled: is,
3004
+ "toggle-button-wrapper": "_toggle-button-wrapper_1jt3w_117",
3005
+ "toggle-button": "_toggle-button_1jt3w_117",
3006
+ "rows-wrapper": "_rows-wrapper_1jt3w_151",
3007
+ "chip-wrapper": "_chip-wrapper_1jt3w_162",
3008
+ chip: ss,
3009
+ prefix: as,
3010
+ suffix: ls,
3011
+ "listview-option": "_listview-option_1jt3w_255",
3012
+ empty: us
3013
+ }, pn = Qe(null), it = function() {
3014
+ const e = ve(
3015
+ pn
3016
+ );
3017
+ if (e == null)
3018
+ throw new Error("useCombobox must be wrapped in <Combobox />");
3019
+ return e;
3020
+ }, ds = function(e) {
3021
+ const { multiple: n = !1, ...r } = e;
3022
+ return n ? /* @__PURE__ */ m.jsx(ps, { ...r }) : /* @__PURE__ */ m.jsx(cs, { ...r });
3023
+ }, cs = function(e) {
3024
+ const { layoutStyles: n, componentProps: r } = De(e), {
3025
+ className: o,
3026
+ style: i,
3027
+ children: t,
3028
+ open: s,
3029
+ items: l,
3030
+ itemToString: d,
3031
+ onChange: u,
3032
+ onSelectedItemChange: a,
3033
+ disableCloseOnClickOutside: g = !1,
3034
+ filterOptions: b,
3035
+ root: _,
3036
+ ...v
3037
+ } = r, [O, h] = Y(l), [M, c] = Y(!1), [f, p] = Y(!1), [x, I] = Y(!1), [H, N] = Y([]);
3038
+ function j($) {
3039
+ return d && $ ? d($) : $ ? String($) : "";
3040
+ }
3041
+ const {
3042
+ isOpen: A,
3043
+ getLabelProps: w,
3044
+ getInputProps: T,
3045
+ getToggleButtonProps: E,
3046
+ getMenuProps: R,
3047
+ getItemProps: F,
3048
+ highlightedIndex: q,
3049
+ selectedItem: k,
3050
+ selectItem: X,
3051
+ setInputValue: Q,
3052
+ inputValue: U
3053
+ } = Ie({
3054
+ ...v,
3055
+ items: O,
3056
+ itemToString($) {
3057
+ return j($);
3058
+ },
3059
+ onInputValueChange({ inputValue: $, type: W }) {
3060
+ W === Ie.stateChangeTypes.InputKeyDownEnter || W === Ie.stateChangeTypes.ItemClick ? h(l) : $ != null && $ !== "" ? h(dn(l, $, b)) : h(l);
3061
+ },
3062
+ onSelectedItemChange({ selectedItem: $, ...W }) {
3063
+ u != null && u($ || null), a != null && a({ selectedItem: $, ...W });
3064
+ },
3065
+ onIsOpenChange({ isOpen: $, inputValue: W, selectedItem: J }) {
3066
+ $ === !1 && W === "" ? X(null) : $ === !1 && Q(J != null ? j(J) : "");
3067
+ },
3068
+ stateReducer($, { type: W, changes: J }) {
3069
+ switch (W) {
3070
+ case Ie.stateChangeTypes.InputBlur:
3071
+ return g ? {
3072
+ ...J,
3073
+ isOpen: $.isOpen,
3074
+ highlightedIndex: $.highlightedIndex
3075
+ } : J;
3076
+ default:
3077
+ return J;
3078
+ }
3079
+ },
3080
+ isItemDisabled($) {
3081
+ return M || !!($ && $ instanceof Object && "disabled" in $ && $.disabled || $ && $ instanceof Object && "readOnly" in $ && $.readOnly || H.includes($));
3082
+ }
3083
+ });
3084
+ return /* @__PURE__ */ m.jsx(
3085
+ pn.Provider,
3086
+ {
3087
+ value: {
3088
+ multiple: !1,
3089
+ items: O,
3090
+ itemToString: j,
3091
+ isOpen: A,
3092
+ getLabelProps: w,
3093
+ getInputProps: T,
3094
+ getToggleButtonProps: E,
3095
+ getMenuProps: R,
3096
+ getItemProps: F,
3097
+ highlightedIndex: q,
3098
+ selectedItem: k,
3099
+ selectedItems: [],
3100
+ disabledItems: H,
3101
+ setDisabledItems: N,
3102
+ getSelectedItemProps: void 0,
3103
+ getDropdownProps: void 0,
3104
+ reset: void 0,
3105
+ removeSelectedItem: void 0,
3106
+ selectItem: X,
3107
+ inputValue: U,
3108
+ isDisabledOrReadOnly: M,
3109
+ setIsDisabledOrReadOnly: c,
3110
+ hasDisabledPopover: f,
3111
+ setHasDisabledPopover: p,
3112
+ hasEmpty: x,
3113
+ setHasEmpty: I
3114
+ },
3115
+ children: /* @__PURE__ */ m.jsx(
3116
+ "div",
3117
+ {
3118
+ className: o,
3119
+ "data-anv": "combobox",
3120
+ style: { ...i, ...n },
3121
+ children: /* @__PURE__ */ m.jsx(
3122
+ cn,
3123
+ {
3124
+ root: _,
3125
+ open: s === !0 ? s : A,
3126
+ noPadding: !0,
3127
+ disableCaret: !0,
3128
+ fillAvailableHeight: !0,
3129
+ disableFlipFallback: !0,
3130
+ matchReferenceWidth: !0,
3131
+ children: t
3132
+ }
3133
+ )
3134
+ }
3135
+ )
3136
+ }
3137
+ );
3138
+ }, ps = function(e) {
3139
+ const { layoutStyles: n, componentProps: r } = De(e), {
3140
+ className: o,
3141
+ style: i,
3142
+ children: t,
3143
+ open: s,
3144
+ items: l,
3145
+ itemToString: d,
3146
+ onChange: u,
3147
+ onSelectedItemChange: a,
3148
+ disableCloseOnClickOutside: g = !1,
3149
+ filterOptions: b,
3150
+ root: _,
3151
+ ...v
3152
+ } = r, [O, h] = Y(l), [M, c] = Y(!1), [f, p] = Y(!1), [x, I] = Y(!1), [H, N] = Y(""), [j, A] = Y([]), [w, T] = Y([]), { getSelectedItemProps: E, getDropdownProps: R, reset: F, removeSelectedItem: q } = je({
3153
+ selectedItems: j,
3154
+ onStateChange({ selectedItems: C, type: z }) {
3155
+ switch (z) {
3156
+ case je.stateChangeTypes.SelectedItemKeyDownBackspace:
3157
+ case je.stateChangeTypes.SelectedItemKeyDownDelete:
3158
+ case je.stateChangeTypes.DropdownKeyDownBackspace:
3159
+ case je.stateChangeTypes.FunctionRemoveSelectedItem:
3160
+ u != null && u(C ?? []), A(C ?? []);
3161
+ break;
3162
+ case je.stateChangeTypes.FunctionReset:
3163
+ u != null && u([]), A([]), N("");
3164
+ break;
3165
+ }
3166
+ }
3167
+ });
3168
+ function k(C) {
3169
+ return d && C ? d(C) : C ? String(C) : "";
3170
+ }
3171
+ const {
3172
+ isOpen: X,
3173
+ getLabelProps: Q,
3174
+ getInputProps: U,
3175
+ getToggleButtonProps: $,
3176
+ getMenuProps: W,
3177
+ getItemProps: J,
3178
+ highlightedIndex: D,
3179
+ selectedItem: P,
3180
+ selectItem: V
3181
+ } = Ie({
3182
+ ...v,
3183
+ items: O,
3184
+ itemToString(C) {
3185
+ return k(C);
3186
+ },
3187
+ selectedItem: null,
3188
+ inputValue: H,
3189
+ onInputValueChange({ inputValue: C, type: z }) {
3190
+ z === Ie.stateChangeTypes.InputKeyDownEnter || z === Ie.stateChangeTypes.ItemClick ? h(l) : C != null && C !== "" ? h(dn(l, C, b)) : h(l);
3191
+ },
3192
+ onIsOpenChange({ isOpen: C }) {
3193
+ C === !1 && N("");
3194
+ },
3195
+ stateReducer(C, { type: z, changes: B }) {
3196
+ switch (z) {
3197
+ case Ie.stateChangeTypes.InputBlur:
3198
+ return g ? {
3199
+ ...B,
3200
+ isOpen: C.isOpen,
3201
+ highlightedIndex: C.highlightedIndex
3202
+ } : B;
3203
+ default:
3204
+ return B;
3205
+ }
3206
+ },
3207
+ isItemDisabled(C) {
3208
+ return M || !!(C && C instanceof Object && "disabled" in C && C.disabled || C && C instanceof Object && "readOnly" in C && C.readOnly || w.includes(C));
3209
+ },
3210
+ onStateChange({
3211
+ inputValue: C = "",
3212
+ type: z,
3213
+ selectedItem: B
3214
+ }) {
3215
+ switch (z) {
3216
+ case Ie.stateChangeTypes.InputKeyDownEnter:
3217
+ case Ie.stateChangeTypes.ItemClick:
3218
+ case Ie.stateChangeTypes.InputBlur:
3219
+ if (B) {
3220
+ const L = j.includes(B) ? j.filter((ne) => ne !== B) : [...j, B];
3221
+ u != null && u(L), A(L), N("");
3222
+ }
3223
+ break;
3224
+ case Ie.stateChangeTypes.InputChange:
3225
+ N(C);
3226
+ break;
3227
+ }
3228
+ }
3229
+ });
3230
+ return /* @__PURE__ */ m.jsx(
3231
+ pn.Provider,
3232
+ {
3233
+ value: {
3234
+ multiple: !0,
3235
+ items: O,
3236
+ itemToString: k,
3237
+ isOpen: X,
3238
+ getLabelProps: Q,
3239
+ getInputProps: U,
3240
+ getToggleButtonProps: $,
3241
+ getMenuProps: W,
3242
+ getItemProps: J,
3243
+ highlightedIndex: D,
3244
+ selectedItem: P,
3245
+ selectedItems: j,
3246
+ disabledItems: w,
3247
+ setDisabledItems: T,
3248
+ getSelectedItemProps: E,
3249
+ getDropdownProps: R,
3250
+ reset: F,
3251
+ removeSelectedItem: q,
3252
+ selectItem: V,
3253
+ inputValue: H,
3254
+ isDisabledOrReadOnly: M,
3255
+ setIsDisabledOrReadOnly: c,
3256
+ hasDisabledPopover: f,
3257
+ setHasDisabledPopover: p,
3258
+ hasEmpty: x,
3259
+ setHasEmpty: I
3260
+ },
3261
+ children: /* @__PURE__ */ m.jsx("div", { className: o, style: { ...i, ...n }, children: /* @__PURE__ */ m.jsx(
3262
+ cn,
3263
+ {
3264
+ root: _,
3265
+ open: s === !0 ? s : X,
3266
+ noPadding: !0,
3267
+ disableCaret: !0,
3268
+ fillAvailableHeight: !0,
3269
+ disableFlipFallback: !0,
3270
+ matchReferenceWidth: !0,
3271
+ children: t
3272
+ }
3273
+ ) })
3274
+ }
3275
+ );
3276
+ }, fs = ({
3277
+ className: e,
3278
+ label: n,
3279
+ size: r,
3280
+ error: o,
3281
+ hint: i,
3282
+ description: t,
3283
+ required: s,
3284
+ moreInfo: l,
3285
+ openMoreInfo: d,
3286
+ disabled: u,
3287
+ readOnly: a,
3288
+ prefix: g,
3289
+ suffix: b,
3290
+ maxRows: _,
3291
+ ...v
3292
+ }) => {
3293
+ const {
3294
+ isOpen: O,
3295
+ itemToString: h,
3296
+ getLabelProps: M,
3297
+ getInputProps: c,
3298
+ getToggleButtonProps: f,
3299
+ selectedItems: p,
3300
+ getSelectedItemProps: x,
3301
+ getDropdownProps: I,
3302
+ reset: H,
3303
+ removeSelectedItem: N,
3304
+ selectItem: j,
3305
+ inputValue: A,
3306
+ setIsDisabledOrReadOnly: w,
3307
+ hasDisabledPopover: T
3308
+ } = it(), E = ot(), R = te(ae["input-wrapper"], {
3309
+ [ae.small]: r === "small",
3310
+ [ae.large]: r === "large"
3311
+ }), F = be(), q = be(), k = te(ae.input, e, {
3312
+ [ae.error]: o
3313
+ });
3314
+ de(() => (w(!!(u || a)), () => {
3315
+ w(!1);
3316
+ }), [u, a, w]);
3317
+ let X = `label${F} `;
3318
+ X += ` helper${q}`;
3319
+ const Q = typeof o != "boolean" ? o : void 0, U = G(null), [$, W] = Y(!1), [J, D] = Y(!1), [P, V] = Y(
3320
+ null
3321
+ ), [C, z] = Y(0);
3322
+ Nt(() => {
3323
+ var L, ne;
3324
+ if (_ !== void 0) {
3325
+ if ($ === !1)
3326
+ W(!0), D(!1), V(null), z((ie) => ie + 1);
3327
+ else if ((L = U == null ? void 0 : U.current) != null && L.children) {
3328
+ const ie = (ne = U == null ? void 0 : U.current) == null ? void 0 : ne.children, pe = Array.from(ie).reduce(
3329
+ (S, he) => {
3330
+ const re = he.getBoundingClientRect().top;
3331
+ return S.length ? S[S.length - 1].top === re ? [
3332
+ ...S.slice(0, -1),
3333
+ { count: S[S.length - 1].count + 1, top: re }
3334
+ ] : S[S.length - 1].top !== re ? [...S, { count: 1, top: re }] : S : [{ count: 1, top: re }];
3335
+ },
3336
+ []
3337
+ );
3338
+ if (!pe[1] || P === 0)
3339
+ W(!1);
3340
+ else {
3341
+ if (D(!0), P == null) {
3342
+ const S = Math.max(
3343
+ pe[0].count + pe[1].count - 2,
3344
+ 0
3345
+ );
3346
+ V(S);
3347
+ } else
3348
+ V(P - 1);
3349
+ z((S) => S + 1);
3350
+ }
3351
+ }
3352
+ }
3353
+ }, [p.length, _, C]);
3354
+ const B = J && _ != null && P !== null ? P : p.length;
3355
+ return /* @__PURE__ */ m.jsxs("div", { className: ae["search-field"], "data-anv": "combobox-searchfield", children: [
3356
+ /* @__PURE__ */ m.jsxs("div", { children: [
3357
+ /* @__PURE__ */ m.jsx(
3358
+ Ot,
3359
+ {
3360
+ ...M({
3361
+ id: F,
3362
+ required: s,
3363
+ moreInfo: l,
3364
+ openMoreInfo: d
3365
+ }),
3366
+ children: n
3367
+ }
3368
+ ),
3369
+ /* @__PURE__ */ m.jsxs(
3370
+ "div",
3371
+ {
3372
+ className: R,
3373
+ ref: E.refs.setReference,
3374
+ children: [
3375
+ /* @__PURE__ */ m.jsxs("div", { className: ae["buttons-wrapper"], children: [
3376
+ A || p.length ? /* @__PURE__ */ m.jsx("div", { className: ae["close-button-wrapper"], children: /* @__PURE__ */ m.jsx(
3377
+ Ge,
3378
+ {
3379
+ "aria-label": "clear selection",
3380
+ appearance: "ghost",
3381
+ size: "small",
3382
+ icon: lr,
3383
+ className: ae["close-button"],
3384
+ onClick: () => {
3385
+ H != null ? H() : j(null);
3386
+ },
3387
+ tabIndex: -1,
3388
+ disabled: u || a
3389
+ }
3390
+ ) }) : null,
3391
+ T ? null : /* @__PURE__ */ m.jsx("div", { className: ae["toggle-button-wrapper"], children: /* @__PURE__ */ m.jsx(
3392
+ Ge,
3393
+ {
3394
+ "aria-label": "toggle menu",
3395
+ ...f({
3396
+ icon: Qr,
3397
+ className: ae["toggle-button"],
3398
+ disabled: u || a
3399
+ }),
3400
+ appearance: "ghost",
3401
+ size: "small"
3402
+ }
3403
+ ) })
3404
+ ] }),
3405
+ /* @__PURE__ */ m.jsxs("div", { className: ae["rows-wrapper"], ref: U, children: [
3406
+ p.length && N != null && x != null ? p.slice(0, B).map((L, ne) => {
3407
+ const { onClick: ie, ...pe } = x({
3408
+ selectedItem: L,
3409
+ index: ne
3410
+ });
3411
+ return /* @__PURE__ */ m.jsx(
3412
+ "div",
3413
+ {
3414
+ className: ae["chip-wrapper"],
3415
+ children: /* @__PURE__ */ m.jsx(
3416
+ fn,
3417
+ {
3418
+ ...pe,
3419
+ label: h(L),
3420
+ onClose: () => N(L),
3421
+ className: ae.chip,
3422
+ title: h(L)
3423
+ }
3424
+ )
3425
+ },
3426
+ `selected-item-${ne}`
3427
+ );
3428
+ }) : null,
3429
+ J && _ != null ? /* @__PURE__ */ m.jsx("div", { className: ae["chip-wrapper"], children: /* @__PURE__ */ m.jsx(
3430
+ fn,
3431
+ {
3432
+ label: `+${p.length - B}`,
3433
+ className: ae.chip,
3434
+ title: p.slice(B).map((L) => h(L)).join(", ")
3435
+ }
3436
+ ) }) : null,
3437
+ /* @__PURE__ */ m.jsxs(
3438
+ _o,
3439
+ {
3440
+ flex: "1 1 100px",
3441
+ alignItems: "center",
3442
+ style: { width: "100px" },
3443
+ children: [
3444
+ g ? /* @__PURE__ */ m.jsx("div", { className: ae.prefix, children: g }) : null,
3445
+ /* @__PURE__ */ m.jsx(
3446
+ "input",
3447
+ {
3448
+ ...I != null ? c(
3449
+ I({
3450
+ ...v,
3451
+ className: k,
3452
+ disabled: u,
3453
+ readOnly: a,
3454
+ required: s,
3455
+ autoComplete: "off",
3456
+ "aria-labelledby": X,
3457
+ preventKeyAction: O
3458
+ })
3459
+ ) : c({
3460
+ ...v,
3461
+ className: k,
3462
+ disabled: u,
3463
+ readOnly: a,
3464
+ required: s,
3465
+ autoComplete: "off",
3466
+ "aria-labelledby": X
3467
+ })
3468
+ }
3469
+ ),
3470
+ b ? /* @__PURE__ */ m.jsx("div", { className: ae.suffix, children: b }) : null
3471
+ ]
3472
+ }
3473
+ )
3474
+ ] })
3475
+ ]
3476
+ }
3477
+ )
3478
+ ] }),
3479
+ i || Q || t ? /* @__PURE__ */ m.jsx(
3480
+ Dt,
3481
+ {
3482
+ id: q,
3483
+ errorMessage: Q,
3484
+ hint: i,
3485
+ description: t
3486
+ }
3487
+ ) : null
3488
+ ] });
3489
+ }, hs = function({
3490
+ children: e,
3491
+ className: n,
3492
+ disablePopover: r = !1,
3493
+ ...o
3494
+ }) {
3495
+ const {
3496
+ items: i,
3497
+ highlightedIndex: t,
3498
+ selectedItem: s,
3499
+ selectedItems: l,
3500
+ setHasDisabledPopover: d,
3501
+ getMenuProps: u,
3502
+ getItemProps: a,
3503
+ isDisabledOrReadOnly: g
3504
+ } = it(), b = te(
3505
+ ae["popover-content"],
3506
+ n
3507
+ );
3508
+ return de(() => (d(r), () => {
3509
+ d(!1);
3510
+ }), [r, d]), r ? /* @__PURE__ */ m.jsx("div", { ...o, className: b, children: e ? e({
3511
+ items: i,
3512
+ highlightedIndex: t,
3513
+ selectedItem: s,
3514
+ getMenuProps: u,
3515
+ getItemProps: a,
3516
+ listProps: {
3517
+ ...u({}, { suppressRefError: !0 }),
3518
+ style: {
3519
+ display: i.length ? "" : "none",
3520
+ overflow: "auto"
3521
+ }
3522
+ },
3523
+ options: i.map((_, v) => ({
3524
+ optionProps: {
3525
+ ...a({
3526
+ item: _,
3527
+ index: v
3528
+ }),
3529
+ selected: s === _ || l.includes(_),
3530
+ disabled: g
3531
+ // also see "isItemDisabled" function
3532
+ },
3533
+ item: _,
3534
+ index: v
3535
+ }))
3536
+ }) : null }) : /* @__PURE__ */ m.jsx(
3537
+ cn.Content,
3538
+ {
3539
+ "data-anv": "combobox-content",
3540
+ ...o,
3541
+ className: b,
3542
+ children: e ? e({
3543
+ items: i,
3544
+ highlightedIndex: t,
3545
+ selectedItem: s,
3546
+ getMenuProps: u,
3547
+ getItemProps: a,
3548
+ listProps: {
3549
+ ...u({}, { suppressRefError: !0 }),
3550
+ style: {
3551
+ display: i.length ? void 0 : "none",
3552
+ overflow: "auto"
3553
+ }
3554
+ },
3555
+ options: i.map((_, v) => ({
3556
+ optionProps: {
3557
+ ...a({
3558
+ item: _,
3559
+ index: v
3560
+ }),
3561
+ selected: s === _ || l.includes(_),
3562
+ disabled: g
3563
+ // also see "isItemDisabled" function
3564
+ },
3565
+ item: _,
3566
+ index: v
3567
+ }))
3568
+ }) : null
3569
+ }
3570
+ );
3571
+ }, ms = function({
3572
+ children: e,
3573
+ ...n
3574
+ }) {
3575
+ const { getMenuProps: r, multiple: o, items: i, hasEmpty: t } = it();
3576
+ return o ? /* @__PURE__ */ m.jsx(
3577
+ "div",
3578
+ {
3579
+ ...r(n),
3580
+ "data-anv": "combobox-list",
3581
+ className: xt.listview,
3582
+ style: {
3583
+ display: i.length ? void 0 : "none",
3584
+ overflow: "scroll"
3585
+ },
3586
+ children: e
3587
+ }
3588
+ ) : /* @__PURE__ */ m.jsxs(m.Fragment, { children: [
3589
+ /* @__PURE__ */ m.jsx(
3590
+ "ul",
3591
+ {
3592
+ ...r(n),
3593
+ className: Vn.listbox,
3594
+ style: {
3595
+ display: i.length ? void 0 : "none",
3596
+ overflow: "scroll"
3597
+ },
3598
+ children: e
3599
+ }
3600
+ ),
3601
+ !i.length && !t ? /* @__PURE__ */ m.jsx("div", { className: ae.empty, children: /* @__PURE__ */ m.jsx(Kn, { subdued: !0, size: "small", children: "No results found" }) }) : null
3602
+ ] });
3603
+ }, gs = function({
3604
+ children: e,
3605
+ disabled: n,
3606
+ item: r,
3607
+ index: o,
3608
+ ...i
3609
+ }) {
3610
+ const {
3611
+ getItemProps: t,
3612
+ multiple: s,
3613
+ selectedItem: l,
3614
+ selectedItems: d,
3615
+ disabledItems: u,
3616
+ setDisabledItems: a
3617
+ } = it(), g = n || r && r instanceof Object && "disabled" in r && r.disabled;
3618
+ return de(() => (n && !u.includes(r) ? a([...u, r]) : u.includes(r) && a(u.filter((b) => b === r)), () => {
3619
+ u.includes(r) && a(u.filter((b) => b === r));
3620
+ }), [r, n, a]), s ? /* @__PURE__ */ m.jsx(
3621
+ "div",
3622
+ {
3623
+ "data-anv": "combobox-item",
3624
+ ...t({
3625
+ item: r,
3626
+ index: o,
3627
+ ...i
3628
+ }),
3629
+ className: te(
3630
+ ae["listview-option"],
3631
+ xt["listview-option"]
3632
+ ),
3633
+ children: /* @__PURE__ */ m.jsxs("div", { className: te(ae.cell, xt.cell), children: [
3634
+ /* @__PURE__ */ m.jsx(
3635
+ go,
3636
+ {
3637
+ checked: d.includes(r),
3638
+ "aria-label": "Select",
3639
+ ...g ? { disabled: !0 } : {}
3640
+ }
3641
+ ),
3642
+ e
3643
+ ] })
3644
+ }
3645
+ ) : /* @__PURE__ */ m.jsxs(
3646
+ "li",
3647
+ {
3648
+ ...t({
3649
+ item: r,
3650
+ index: o,
3651
+ ...i
3652
+ }),
3653
+ className: Vn.option,
3654
+ ...g ? { "aria-disabled": !0 } : {},
3655
+ children: [
3656
+ /* @__PURE__ */ m.jsx("span", { children: e }),
3657
+ /* @__PURE__ */ m.jsx(
3658
+ we,
3659
+ {
3660
+ "aria-hidden": !0,
3661
+ svg: ur,
3662
+ inherit: !0,
3663
+ className: ae.Icon,
3664
+ style: { opacity: l === r ? 1 : 0 }
3665
+ }
3666
+ )
3667
+ ]
3668
+ }
3669
+ );
3670
+ }, vs = function({
3671
+ children: e
3672
+ }) {
3673
+ const { items: n, setHasEmpty: r } = it();
3674
+ return de(() => (r(!0), () => {
3675
+ r(!1);
3676
+ })), n.length ? null : e;
3677
+ }, Sl = Object.assign(ds, {
3678
+ SearchField: fs,
3679
+ Content: hs,
3680
+ List: ms,
3681
+ Item: gs,
3682
+ Empty: vs
3683
+ });
3684
+ const _s = "_details_1sjr5_4", Is = "_summary_1sjr5_17", ys = "_arrow_1sjr5_66", xs = "_content_1sjr5_30", bs = "_expanded_1sjr5_111", Be = {
3685
+ details: _s,
3686
+ summary: Is,
3687
+ "content-wrapper": "_content-wrapper_1sjr5_30",
3688
+ arrow: ys,
3689
+ content: xs,
3690
+ "is-expanded": "_is-expanded_1sjr5_108",
3691
+ expanded: bs
3692
+ }, vt = Qe({
3693
+ id: "",
3694
+ isExpanded: !1,
3695
+ expanded: () => {
3696
+ },
3697
+ close: () => {
3698
+ },
3699
+ toggle: () => {
3700
+ }
3701
+ }), ws = ce(
3702
+ function(e, n) {
3703
+ const { layoutStyles: r, componentProps: o } = De(e), {
3704
+ children: i,
3705
+ id: t,
3706
+ expanded: s,
3707
+ defaultExpanded: l = !1,
3708
+ style: d,
3709
+ className: u,
3710
+ ...a
3711
+ } = o, g = be(), [b, _] = Y(l);
3712
+ function v() {
3713
+ _(!0);
3714
+ }
3715
+ function O() {
3716
+ _(!1);
3717
+ }
3718
+ function h() {
3719
+ _((f) => !f);
3720
+ }
3721
+ const M = {
3722
+ ...d,
3723
+ ...r
3724
+ }, c = $e(
3725
+ () => ({
3726
+ id: t ?? g,
3727
+ isExpanded: s ?? b,
3728
+ expanded: v,
3729
+ close: O,
3730
+ toggle: h
3731
+ }),
3732
+ [g, t, b, s]
3733
+ );
3734
+ return /* @__PURE__ */ m.jsx(vt.Provider, { value: c, children: /* @__PURE__ */ m.jsx(
3735
+ "div",
3736
+ {
3737
+ "data-anv": "details",
3738
+ ref: n,
3739
+ className: te(Be.details, u),
3740
+ style: M,
3741
+ ...a,
3742
+ children: i
3743
+ }
3744
+ ) });
3745
+ }
3746
+ ), Es = ce(function({ children: e, onClick: n, className: r, ...o }, i) {
3747
+ const { id: t, isExpanded: s, toggle: l } = ve(vt), d = (...a) => {
3748
+ n == null || n(...a), l();
3749
+ }, u = te(Be.summary, r);
3750
+ return /* @__PURE__ */ m.jsxs(
3751
+ "button",
3752
+ {
3753
+ "data-anv": "details-summary",
3754
+ "aria-controls": t,
3755
+ "aria-expanded": s,
3756
+ className: u,
3757
+ onClick: d,
3758
+ ref: i,
3759
+ ...o,
3760
+ children: [
3761
+ /* @__PURE__ */ m.jsx(Cs, {}),
3762
+ " ",
3763
+ /* @__PURE__ */ m.jsx("span", { children: e })
3764
+ ]
3765
+ }
3766
+ );
3767
+ }), Cs = ce(
3768
+ function({ className: e, ...n }, r) {
3769
+ const { isExpanded: o } = ve(vt), i = te(
3770
+ Be.arrow,
3771
+ { [Be["is-expanded"]]: o },
3772
+ e
3773
+ );
3774
+ return /* @__PURE__ */ m.jsx("span", { className: i, ref: r, ...n, children: /* @__PURE__ */ m.jsx(we, { size: "large", svg: Qr }) });
3775
+ }
3776
+ ), Ss = ce(
3777
+ function({
3778
+ className: e,
3779
+ children: n,
3780
+ height: r,
3781
+ maxHeight: o,
3782
+ style: i,
3783
+ ...t
3784
+ }, s) {
3785
+ const { id: l, isExpanded: d } = ve(vt), u = {
3786
+ height: r,
3787
+ maxHeight: o,
3788
+ ...r || o ? { overflow: "auto" } : {},
3789
+ ...i
3790
+ };
3791
+ return /* @__PURE__ */ m.jsx(
3792
+ "div",
3793
+ {
3794
+ "data-anv": "details-content",
3795
+ id: l,
3796
+ className: te(Be["content-wrapper"], {
3797
+ [Be.expanded]: d
3798
+ }),
3799
+ ref: s,
3800
+ children: /* @__PURE__ */ m.jsx("div", { className: Be.content, children: /* @__PURE__ */ m.jsx("div", { className: e, style: u, ...t, children: n }) })
3801
+ }
3802
+ );
3803
+ }
3804
+ ), Ol = Object.assign(ws, {
3805
+ Summary: Es,
3806
+ Content: Ss
3807
+ });
3808
+ const Os = "_drawer_1pnmb_4", Ns = "_container_1pnmb_28", Ds = "_content_1pnmb_41", ks = "_header_1pnmb_46", Ps = "_footer_1pnmb_68", Rs = "_remove_1pnmb_86", Ms = "_large_1pnmb_95", As = "_sticky_1pnmb_98", Ne = {
3809
+ drawer: Os,
3810
+ "close-drawer": "_close-drawer_1pnmb_1",
3811
+ "open-drawer": "_open-drawer_1pnmb_1",
3812
+ "open-backdrop": "_open-backdrop_1pnmb_1",
3813
+ container: Ns,
3814
+ content: Ds,
3815
+ header: ks,
3816
+ "close-container": "_close-container_1pnmb_61",
3817
+ footer: Ps,
3818
+ remove: Rs,
3819
+ "close-backdrop": "_close-backdrop_1pnmb_1",
3820
+ large: Ms,
3821
+ sticky: As,
3822
+ "close-button": "_close-button_1pnmb_104"
3823
+ }, Zr = ce((e, n) => {
3824
+ const { onClick: r, ...o } = e, { close: i } = Ts(), t = (s) => {
3825
+ i(), r == null || r(s);
3826
+ };
3827
+ return /* @__PURE__ */ m.jsx(
3828
+ Ge,
3829
+ {
3830
+ "aria-label": "Close drawer",
3831
+ "data-anv": "drawer-cancel-button",
3832
+ onClick: t,
3833
+ ref: n,
3834
+ ...o
3835
+ }
3836
+ );
3837
+ });
3838
+ Zr.displayName = "DrawerCancelButton";
3839
+ const eo = ce(
3840
+ (e, n) => {
3841
+ const { children: r } = e;
3842
+ return /* @__PURE__ */ m.jsxs("header", { className: Ne.header, "data-anv": "drawer-header", ref: n, children: [
3843
+ /* @__PURE__ */ m.jsx(Kn, { variant: "headline", el: "h1", children: r }),
3844
+ /* @__PURE__ */ m.jsx("span", { className: Ne["close-container"], children: /* @__PURE__ */ m.jsx(
3845
+ Zr,
3846
+ {
3847
+ className: Ne["close-button"],
3848
+ size: "small",
3849
+ appearance: "ghost",
3850
+ "aria-label": "Close dialog",
3851
+ icon: lr
3852
+ }
3853
+ ) })
3854
+ ] });
3855
+ }
3856
+ );
3857
+ eo.displayName = "DrawerHeader";
3858
+ const to = ce(
3859
+ (e, n) => {
3860
+ const { children: r, sticky: o = !1, ...i } = e, t = te(Ne.footer, {
3861
+ [Ne.sticky]: o
3862
+ });
3863
+ return /* @__PURE__ */ m.jsx(
3864
+ "footer",
3865
+ {
3866
+ className: t,
3867
+ "data-anv": "drawer-footer",
3868
+ ref: n,
3869
+ ...i,
3870
+ children: r
3871
+ }
3872
+ );
3873
+ }
3874
+ );
3875
+ to.displayName = "DrawerFooter";
3876
+ const no = ce(
3877
+ (e, n) => {
3878
+ const { children: r, ...o } = e, i = te(Ne.content, {});
3879
+ return /* @__PURE__ */ m.jsx(
3880
+ "div",
3881
+ {
3882
+ className: i,
3883
+ "data-anv": "drawer-content",
3884
+ ref: n,
3885
+ ...o,
3886
+ children: r
3887
+ }
3888
+ );
3889
+ }
3890
+ );
3891
+ no.displayName = "DrawerContent";
3892
+ const ro = Qe(null), oo = ce(
3893
+ (e, n) => {
3894
+ const {
3895
+ className: r,
3896
+ open: o = !1,
3897
+ children: i,
3898
+ onOpen: t,
3899
+ onClose: s,
3900
+ onCancel: l,
3901
+ onClick: d,
3902
+ onKeyDown: u,
3903
+ disableCloseOnEscape: a = !1,
3904
+ disableCloseOnClickOutside: g = !1,
3905
+ size: b = "medium",
3906
+ ..._
3907
+ } = e, v = G(null), O = G(null), h = G(null), [M, c] = Y(!1), f = be(), p = te([Ne.drawer], r, {
3908
+ [Ne.remove]: M,
3909
+ [Ne.large]: b === "large"
3910
+ }), x = vo(v.current), I = x[0], H = x[x.length - 1], N = () => {
3911
+ var E;
3912
+ if (h.current) {
3913
+ const R = (h.current.dataset.drawersOpen ? h.current.dataset.drawersOpen.split(" ") : []).filter((F) => F !== f);
3914
+ R.length === 0 ? (h.current.removeAttribute("data-drawers-open"), (E = h.current) == null || E.classList.remove("drawer-open")) : h.current.dataset.drawersOpen = R.join(" ");
3915
+ }
3916
+ };
3917
+ de(() => {
3918
+ var E, R, F, q;
3919
+ if (o) {
3920
+ if (t == null || t(), (E = v.current) == null || E.showModal(), !h.current) {
3921
+ const k = (R = v.current) == null ? void 0 : R.closest("body");
3922
+ k && (h.current = k);
3923
+ }
3924
+ if (!((F = v.current) != null && F.querySelector(":focus")) && (I == null || I.focus()), (q = h.current) == null || q.classList.add("drawer-open"), h.current) {
3925
+ const k = h.current.dataset.drawersOpen ? h.current.dataset.drawersOpen.split(" ") : [];
3926
+ if (k.includes(f))
3927
+ return;
3928
+ k.push(f), h.current.dataset.drawersOpen = k.join(" ");
3929
+ }
3930
+ return;
3931
+ }
3932
+ c(!0), setTimeout(() => {
3933
+ var k;
3934
+ (k = v.current) == null || k.close(), N(), c(!1);
3935
+ }, 200);
3936
+ }, [I, t, o]), de(() => () => N(), []);
3937
+ const j = (E) => {
3938
+ E.preventDefault(), !a && (s == null || s());
3939
+ }, A = (E) => {
3940
+ var R;
3941
+ d == null || d(E);
3942
+ const F = E.target;
3943
+ if (!((R = O.current) != null && R.contains(F))) {
3944
+ if (E.preventDefault(), g)
3945
+ return;
3946
+ s == null || s();
3947
+ }
3948
+ }, w = (E) => {
3949
+ if (u == null || u(E), E.code === "Tab") {
3950
+ if (E.shiftKey && E.target === I) {
3951
+ E.preventDefault(), H == null || H.focus();
3952
+ return;
3953
+ }
3954
+ if (E.target === H && !E.shiftKey) {
3955
+ E.preventDefault(), I == null || I.focus();
3956
+ return;
3957
+ }
3958
+ }
3959
+ }, T = $e(() => ({ close: () => {
3960
+ c(!0), setTimeout(() => {
3961
+ var E;
3962
+ N(), (E = v.current) == null || E.close(), s == null || s();
3963
+ }, 200);
3964
+ } }), [s]);
3965
+ return (
3966
+ // dialog element does seem to be interactive on MDN guideline
3967
+ // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
3968
+ /* @__PURE__ */ m.jsx(
3969
+ "dialog",
3970
+ {
3971
+ className: p,
3972
+ "data-anv": "drawer",
3973
+ ref: Re([n, v]),
3974
+ onCancel: j,
3975
+ onClick: A,
3976
+ onKeyDown: w,
3977
+ ..._,
3978
+ children: /* @__PURE__ */ m.jsx(ro.Provider, { value: T, children: /* @__PURE__ */ m.jsx("section", { ref: O, className: Ne.container, children: i }) })
3979
+ }
3980
+ )
3981
+ );
3982
+ }
3983
+ );
3984
+ function Ts() {
3985
+ const e = ve(ro);
3986
+ if (!e)
3987
+ throw new Error(
3988
+ "useDrawerContext must be used within a DrawerContextProvider"
3989
+ );
3990
+ return e;
3991
+ }
3992
+ oo.displayName = "Drawer";
3993
+ const Nl = Object.assign(oo, {
3994
+ Header: eo,
3995
+ Footer: to,
3996
+ Content: no
3997
+ });
3998
+ const Hs = "_link_1ur2o_4", js = "_secondary_1ur2o_36", Vs = "_quiet_1ur2o_45", We = {
3999
+ link: Hs,
4000
+ secondary: js,
4001
+ quiet: Vs
4002
+ }, $s = (e) => /* @__PURE__ */ ue.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e }, /* @__PURE__ */ ue.createElement("path", { d: "M18 19H6c-.55 0-1-.45-1-1V6c0-.55.45-1 1-1h5c.55 0 1-.45 1-1s-.45-1-1-1H5a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-6c0-.55-.45-1-1-1s-1 .45-1 1v5c0 .55-.45 1-1 1zM14 4c0 .55.45 1 1 1h2.59l-9.13 9.13a.996.996 0 1 0 1.41 1.41L19 6.41V9c0 .55.45 1 1 1s1-.45 1-1V4c0-.55-.45-1-1-1h-5c-.55 0-1 .45-1 1z" })), Ks = ce((e, n) => {
4003
+ const { layoutStyles: r, componentProps: o } = De(e), {
4004
+ children: i,
4005
+ className: t,
4006
+ appearance: s = "primary",
4007
+ quiet: l,
4008
+ style: d,
4009
+ ...u
4010
+ } = o, a = te([We.link], t, {
4011
+ [We.quiet]: l,
4012
+ [We.secondary]: s === "secondary"
4013
+ }), g = {
4014
+ ...d,
4015
+ ...r
4016
+ };
4017
+ return /* @__PURE__ */ m.jsxs(
4018
+ "a",
4019
+ {
4020
+ className: a,
4021
+ rel: "noopener noreferrer",
4022
+ "data-anv": "link",
4023
+ ref: n,
4024
+ style: g,
4025
+ ...u,
4026
+ children: [
4027
+ i,
4028
+ u.target === "_blank" && /* @__PURE__ */ m.jsx(we, { inherit: !0, svg: $s })
4029
+ ]
4030
+ }
4031
+ );
4032
+ });
4033
+ Ks.displayName = "Link";
4034
+ const Dl = (e) => {
4035
+ const { layoutStyles: n, componentProps: r } = De(e), { className: o, appearance: i = "primary", quiet: t, style: s } = r, l = te([We.link], o, {
4036
+ [We.quiet]: t,
4037
+ [We.secondary]: i === "secondary"
4038
+ }), d = Object.assign({}, s, n);
4039
+ return { linkClassNames: l, styleCombined: d };
4040
+ };
4041
+ function Et(e) {
4042
+ var n;
4043
+ if (typeof e == "string" || typeof e == "number" || typeof e == "boolean")
4044
+ return e.toString();
4045
+ if (!e)
4046
+ return "";
4047
+ if (Array.isArray(e))
4048
+ return e.length ? e.map((r) => Et(r)).join("") : "";
4049
+ if (wo(e)) {
4050
+ const r = (n = e.props) == null ? void 0 : n.children;
4051
+ return r ? Et(r) : "";
4052
+ }
4053
+ return "";
4054
+ }
4055
+ const Fs = "_item_3gqn6_5", Ls = "_menu_3gqn6_49", Bs = "_scroll_3gqn6_60", zs = "_disabled_3gqn6_108", Pe = {
4056
+ "nested-menu": "_nested-menu_3gqn6_4",
4057
+ item: Fs,
4058
+ menu: Ls,
4059
+ scroll: Bs,
4060
+ "arrow-down": "_arrow-down_3gqn6_70",
4061
+ "arrow-up": "_arrow-up_3gqn6_71",
4062
+ "arrow-icon": "_arrow-icon_3gqn6_83",
4063
+ disabled: zs
4064
+ }, io = ce(({ label: e, disabled: n, icon: r, ...o }, i) => {
4065
+ const t = ve(Ct), s = or({
4066
+ label: n ? null : Et(e)
4067
+ }), l = ir(), d = s.index === t.activeIndex;
4068
+ return /* @__PURE__ */ m.jsxs(
4069
+ "button",
4070
+ {
4071
+ ...o,
4072
+ ref: Re([s.ref, i]),
4073
+ type: "button",
4074
+ role: "menuitem",
4075
+ "data-anv": "menu-item",
4076
+ className: Pe.item,
4077
+ tabIndex: d ? 0 : -1,
4078
+ disabled: n,
4079
+ ...t.getItemProps({
4080
+ onClick(u) {
4081
+ var a;
4082
+ (a = o.onClick) == null || a.call(o, u), l == null || l.events.emit("click");
4083
+ },
4084
+ onFocus(u) {
4085
+ var a;
4086
+ (a = o.onFocus) == null || a.call(o, u), t.setHasFocusInside(!0);
4087
+ }
4088
+ }),
4089
+ children: [
4090
+ r ? /* @__PURE__ */ m.jsx(we, { inherit: !0, "aria-hidden": !0, svg: r }) : null,
4091
+ e
4092
+ ]
4093
+ }
4094
+ );
4095
+ });
4096
+ io.displayName = "MenuItem";
4097
+ const qs = (e) => /* @__PURE__ */ ue.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e }, /* @__PURE__ */ ue.createElement("path", { d: "M9.31 6.71a.996.996 0 0 0 0 1.41L13.19 12l-3.88 3.88a.996.996 0 1 0 1.41 1.41l4.59-4.59a.996.996 0 0 0 0-1.41L10.72 6.7c-.38-.38-1.02-.38-1.41.01z" })), Us = (e) => /* @__PURE__ */ ue.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e }, /* @__PURE__ */ ue.createElement("path", { d: "M8.71 12.29 11.3 9.7a.996.996 0 0 1 1.41 0l2.59 2.59c.63.63.18 1.71-.71 1.71H9.41c-.89 0-1.33-1.08-.7-1.71z" })), Ws = (e) => /* @__PURE__ */ ue.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e }, /* @__PURE__ */ ue.createElement("path", { d: "m8.71 11.71 2.59 2.59c.39.39 1.02.39 1.41 0l2.59-2.59c.63-.63.18-1.71-.71-1.71H9.41c-.89 0-1.33 1.08-.7 1.71z" })), Ct = Qe({
4098
+ getItemProps: () => ({}),
4099
+ activeIndex: null,
4100
+ setActiveIndex: () => {
4101
+ },
4102
+ setHasFocusInside: () => {
4103
+ },
4104
+ isOpen: !1
4105
+ }), St = ce(
4106
+ ({ children: e, disableAutoHeight: n, open: r, icon: o, root: i, ...t }, s) => {
4107
+ var l, d, u;
4108
+ const [a, g] = Y(!!r || !1), [b, _] = Y(!1), [v, O] = Y(null), h = G(null), [M, c] = Y(0), [f, p] = Y(null), [x, I] = Y(!1), [H, N] = Y(!1), j = G([]), A = G([]), w = ve(Ct), { root: T } = ve(ar), E = ir(), R = So(), F = sr(), q = or(), k = F != null, { theme: X, mode: Q = "light" } = ve(Ln), U = ve(jn), $ = () => k ? w.disableAutoHeight ? ["right-start"] : ["right-start", "right-end", "left-start", "left-end"] : n ? ["bottom-start"] : ["bottom-start", "top-start"], W = (se) => {
4109
+ if (typeof r == "boolean") {
4110
+ g(r);
4111
+ return;
4112
+ }
4113
+ g(se);
4114
+ }, { floatingStyles: J, refs: D, context: P } = qn({
4115
+ nodeId: R,
4116
+ open: a,
4117
+ onOpenChange: W,
4118
+ placement: k ? "right-start" : "bottom-start",
4119
+ middleware: [
4120
+ Wn({
4121
+ mainAxis: k ? 0 : 4,
4122
+ alignmentAxis: k ? -4 : 0
4123
+ }),
4124
+ Gn({
4125
+ fallbackStrategy: "bestFit",
4126
+ fallbackPlacements: $()
4127
+ }),
4128
+ Xn({
4129
+ mainAxis: !w.disableAutoHeight,
4130
+ crossAxis: !1,
4131
+ limiter: Jn({
4132
+ mainAxis: !w.disableAutoHeight
4133
+ })
4134
+ }),
4135
+ Yn({
4136
+ padding: 8,
4137
+ apply({ availableWidth: se, availableHeight: fe, elements: _e }) {
4138
+ (n ?? w.disableAutoHeight) || (p(fe), Object.assign(_e.floating.style, {
4139
+ maxWidth: `${se}px`,
4140
+ maxHeight: `${fe}px`
4141
+ }));
4142
+ }
4143
+ })
4144
+ ],
4145
+ whileElementsMounted: Un
4146
+ }), [V, C] = Y(!1), z = Zn(P, {
4147
+ enabled: V,
4148
+ delay: { open: 75 },
4149
+ handleClose: er({ blockPointerEvents: !0 })
4150
+ }), B = Qn(P, {
4151
+ event: "mousedown",
4152
+ toggle: !k,
4153
+ ignoreMouse: k
4154
+ }), L = nr(P, { role: "menu" }), ne = tr(P, { bubbles: !0 }), ie = Oo(P, {
4155
+ listRef: j,
4156
+ activeIndex: v,
4157
+ nested: k,
4158
+ onNavigate: O
4159
+ }), pe = No(P, {
4160
+ listRef: A,
4161
+ onMatch: a ? O : void 0,
4162
+ activeIndex: v
4163
+ }), { getReferenceProps: S, getFloatingProps: he, getItemProps: re } = rr([z, B, L, ne, ie, pe]);
4164
+ de(() => {
4165
+ if (!E)
4166
+ return;
4167
+ function se() {
4168
+ g(!!r || !1);
4169
+ }
4170
+ function fe(_e) {
4171
+ _e.nodeId !== R && _e.parentId === F && g(!!r || !1);
4172
+ }
4173
+ return E.events.on("click", se), E.events.on("menuopen", fe), () => {
4174
+ E.events.off("click", se), E.events.off("menuopen", fe);
4175
+ };
4176
+ }, [E, R, F]), de(() => {
4177
+ (n ?? w.disableAutoHeight) || (a ? setTimeout(() => {
4178
+ if (h.current && D.floating.current && (p(D.floating.current.clientHeight), h.current.scrollHeight > D.floating.current.clientHeight)) {
4179
+ const se = h.current.scrollTop > 0, fe = h.current.scrollHeight - D.floating.current.clientHeight - M - 16 > 0;
4180
+ I(se), N(fe);
4181
+ }
4182
+ }, 0) : p(null));
4183
+ }, [
4184
+ n,
4185
+ a,
4186
+ w.disableAutoHeight,
4187
+ D.floating,
4188
+ M
4189
+ ]), de(() => {
4190
+ a && E && E.events.emit("menuopen", { parentId: F, nodeId: R });
4191
+ }, [E, a, R, F]);
4192
+ const Me = te({
4193
+ [Pe["nested-menu"]]: k,
4194
+ [Pe.item]: !k
4195
+ }), Ae = Re([D.setReference, q.ref, s]), Ke = {
4196
+ "data-open": a,
4197
+ "data-focus-inside": b,
4198
+ ref: Ae,
4199
+ ...S(
4200
+ w.getItemProps({
4201
+ ...t,
4202
+ // This is to allow any type of element to be used as a custom trigger element
4203
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
4204
+ onFocus(se) {
4205
+ var fe;
4206
+ (fe = t.onFocus) == null || fe.call(t, se), _(!1), w.setHasFocusInside(!0);
4207
+ }
4208
+ // This is to allow any type of element to be used as a custom trigger element
4209
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
4210
+ })
4211
+ )
4212
+ }, Ee = $e(
4213
+ () => ({
4214
+ activeIndex: v,
4215
+ setActiveIndex: O,
4216
+ getItemProps: re,
4217
+ setHasFocusInside: _,
4218
+ isOpen: a,
4219
+ disableAutoHeight: n ?? w.disableAutoHeight
4220
+ }),
4221
+ [
4222
+ v,
4223
+ n,
4224
+ re,
4225
+ a,
4226
+ w.disableAutoHeight
4227
+ ]
4228
+ );
4229
+ return /* @__PURE__ */ m.jsxs(Do, { id: R, children: [
4230
+ k ? /* @__PURE__ */ m.jsxs(
4231
+ "button",
4232
+ {
4233
+ ref: Ae,
4234
+ tabIndex: w.activeIndex === q.index ? 0 : -1,
4235
+ role: "menuitem",
4236
+ "data-anv": "menu-item",
4237
+ "data-open": a ? "" : void 0,
4238
+ "data-nested": "",
4239
+ "data-focus-inside": b ? "" : void 0,
4240
+ className: Me,
4241
+ ...S(
4242
+ w.getItemProps({
4243
+ ...t,
4244
+ onFocus(se) {
4245
+ var fe;
4246
+ (fe = t.onFocus) == null || fe.call(t, se), _(!1), w.setHasFocusInside(!0);
4247
+ },
4248
+ onMouseEnter: () => C(!0)
4249
+ })
4250
+ ),
4251
+ children: [
4252
+ o ? /* @__PURE__ */ m.jsx(we, { inherit: !0, "aria-hidden": !0, svg: o }) : null,
4253
+ "label" in t && t.label,
4254
+ /* @__PURE__ */ m.jsx("div", { style: { flexGrow: 1 } }),
4255
+ /* @__PURE__ */ m.jsx(we, { "aria-hidden": !0, svg: qs })
4256
+ ]
4257
+ }
4258
+ ) : "trigger" in t ? (l = t.trigger) == null ? void 0 : l.call(t, Ke) : /* @__PURE__ */ m.jsx(
4259
+ Ge,
4260
+ {
4261
+ ...t,
4262
+ ...Ke,
4263
+ "data-anv": "menu",
4264
+ children: "label" in t && t.label
4265
+ }
4266
+ ),
4267
+ /* @__PURE__ */ m.jsx(Ct.Provider, { value: Ee, children: /* @__PURE__ */ m.jsx(ko, { elementsRef: j, labelsRef: A, children: a && (U == null || ((d = U == null ? void 0 : U.ref) == null ? void 0 : d.current) != null) && /* @__PURE__ */ m.jsx(
4268
+ Bn,
4269
+ {
4270
+ root: i ?? ((u = U == null ? void 0 : U.ref) == null ? void 0 : u.current) ?? T,
4271
+ children: /* @__PURE__ */ m.jsx(
4272
+ zn,
4273
+ {
4274
+ context: P,
4275
+ modal: !1,
4276
+ initialFocus: k ? -1 : 0,
4277
+ returnFocus: !k,
4278
+ children: /* @__PURE__ */ m.jsx(Fn, { theme: X, mode: Q, children: /* @__PURE__ */ m.jsxs(
4279
+ "div",
4280
+ {
4281
+ ref: D.setFloating,
4282
+ className: Pe.menu,
4283
+ style: J,
4284
+ ...he({
4285
+ onMouseEnter: () => {
4286
+ C(!1);
4287
+ },
4288
+ onKeyDown: (se) => {
4289
+ (se.code === "ArrowLeft" || se.code === "ArrowRight") && se.stopPropagation();
4290
+ }
4291
+ }),
4292
+ children: [
4293
+ x && /* @__PURE__ */ m.jsx("div", { className: Pe["arrow-up"], "aria-hidden": !0, children: /* @__PURE__ */ m.jsx(
4294
+ we,
4295
+ {
4296
+ svg: Us,
4297
+ size: "xlarge",
4298
+ className: Pe["arrow-icon"]
4299
+ }
4300
+ ) }),
4301
+ /* @__PURE__ */ m.jsx(
4302
+ "div",
4303
+ {
4304
+ ref: h,
4305
+ className: Pe.scroll,
4306
+ style: {
4307
+ position: "relative",
4308
+ maxHeight: f ?? "inherit"
4309
+ },
4310
+ onScroll: (se) => c(se.currentTarget.scrollTop),
4311
+ children: e
4312
+ }
4313
+ ),
4314
+ H && /* @__PURE__ */ m.jsx("div", { className: Pe["arrow-down"], "aria-hidden": !0, children: /* @__PURE__ */ m.jsx(
4315
+ we,
4316
+ {
4317
+ svg: Ws,
4318
+ size: "xlarge",
4319
+ className: Pe["arrow-icon"]
4320
+ }
4321
+ ) })
4322
+ ]
4323
+ }
4324
+ ) })
4325
+ }
4326
+ )
4327
+ }
4328
+ ) }) })
4329
+ ] });
4330
+ }
4331
+ );
4332
+ St.displayName = "MenuComponent";
4333
+ const so = ce((e, n) => sr() === null ? /* @__PURE__ */ m.jsx(Po, { children: /* @__PURE__ */ m.jsx(St, { ...e, ref: n }) }) : /* @__PURE__ */ m.jsx(St, { ...e, ref: n }));
4334
+ so.displayName = "Menu";
4335
+ const kl = Object.assign(so, {
4336
+ Item: io
4337
+ });
4338
+ const Ys = (e) => /* @__PURE__ */ ue.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e }, /* @__PURE__ */ ue.createElement("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z" })), Gs = (e) => /* @__PURE__ */ ue.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e }, /* @__PURE__ */ ue.createElement("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z" }), /* @__PURE__ */ ue.createElement("circle", { cx: 12, cy: 12, r: 5 })), Xs = "_radio_qnrm6_4", Js = "_legend_qnrm6_77", Qs = "_children_qnrm6_89", Zs = "_label_qnrm6_95", ea = "_error_qnrm6_121", Oe = {
4339
+ radio: Xs,
4340
+ "radio-group": "_radio-group_qnrm6_17",
4341
+ "icon-wrapper": "_icon-wrapper_qnrm6_41",
4342
+ legend: Js,
4343
+ children: Qs,
4344
+ label: Zs,
4345
+ "required-asterisk": "_required-asterisk_qnrm6_98",
4346
+ "icon-unchecked": "_icon-unchecked_qnrm6_112",
4347
+ "icon-checked": "_icon-checked_qnrm6_113",
4348
+ error: ea
4349
+ }, ao = ce(
4350
+ (e, n) => {
4351
+ const { layoutStyles: r, componentProps: o } = De(e), { className: i, children: t, legend: s, required: l, style: d, ...u } = o, a = te(Oe["radio-group"], i), g = {
4352
+ ...d,
4353
+ ...r
4354
+ };
4355
+ return /* @__PURE__ */ m.jsxs(
4356
+ "fieldset",
4357
+ {
4358
+ role: "radiogroup",
4359
+ "data-anv": "radio-group",
4360
+ className: a,
4361
+ "aria-required": l,
4362
+ style: g,
4363
+ ref: n,
4364
+ ...u,
4365
+ children: [
4366
+ /* @__PURE__ */ m.jsx("legend", { className: Oe.legend, children: s }),
4367
+ /* @__PURE__ */ m.jsxs("label", { className: Oe.label, "aria-hidden": !0, children: [
4368
+ s,
4369
+ l && /* @__PURE__ */ m.jsx("span", { className: Oe["required-asterisk"], children: "*" })
4370
+ ] }),
4371
+ /* @__PURE__ */ m.jsx(
4372
+ "div",
4373
+ {
4374
+ className: Oe.children,
4375
+ style: {
4376
+ flexDirection: r == null ? void 0 : r.flexDirection,
4377
+ gap: r == null ? void 0 : r.gap
4378
+ },
4379
+ children: t
4380
+ }
4381
+ )
4382
+ ]
4383
+ }
4384
+ );
4385
+ }
4386
+ );
4387
+ ao.displayName = "RadioGroup";
4388
+ const lo = ce((e, n) => {
4389
+ const { layoutStyles: r, componentProps: o } = De(e), {
4390
+ className: i,
4391
+ checked: t,
4392
+ defaultChecked: s,
4393
+ value: l,
4394
+ icons: d,
4395
+ error: u,
4396
+ label: a,
4397
+ onChange: g,
4398
+ style: b,
4399
+ ..._
4400
+ } = o, {
4401
+ checked: v = Gs,
4402
+ unchecked: O = Ys
4403
+ } = { ...d }, h = (f) => {
4404
+ g == null || g(f, { value: l, checked: f.target.checked });
4405
+ }, M = te([Oe.radio], i, {
4406
+ [Oe.error]: u
4407
+ }), c = {
4408
+ ...b,
4409
+ ...r
4410
+ };
4411
+ return /* @__PURE__ */ m.jsxs("label", { className: M, style: c, children: [
4412
+ /* @__PURE__ */ m.jsx(
4413
+ "input",
4414
+ {
4415
+ type: "radio",
4416
+ "data-anv": "radio",
4417
+ "aria-checked": t ?? s,
4418
+ checked: t,
4419
+ defaultChecked: s,
4420
+ value: l,
4421
+ onChange: h,
4422
+ ref: n,
4423
+ ..._
4424
+ }
4425
+ ),
4426
+ /* @__PURE__ */ m.jsxs("span", { className: Oe["icon-wrapper"], children: [
4427
+ /* @__PURE__ */ m.jsx(
4428
+ we,
4429
+ {
4430
+ size: "large",
4431
+ svg: O,
4432
+ className: te([Oe["icon-unchecked"]])
4433
+ }
4434
+ ),
4435
+ /* @__PURE__ */ m.jsx(
4436
+ we,
4437
+ {
4438
+ size: "large",
4439
+ svg: v,
4440
+ className: te([Oe["icon-checked"]])
4441
+ }
4442
+ )
4443
+ ] }),
4444
+ a
4445
+ ] });
4446
+ }), Pl = Object.assign(lo, {
4447
+ Group: ao
4448
+ });
4449
+ lo.displayName = "RadioElement";
4450
+ const ta = "_legend_1w0sh_5", na = "_children_1w0sh_6", ra = "_segment_1w0sh_4", oa = "_fill_1w0sh_82", ia = "_small_1w0sh_85", sa = "_medium_1w0sh_94", Ye = {
4451
+ "segmented-control": "_segmented-control_1w0sh_4",
4452
+ legend: ta,
4453
+ children: na,
4454
+ "select-indicator": "_select-indicator_1w0sh_7",
4455
+ segment: ra,
4456
+ fill: oa,
4457
+ small: ia,
4458
+ "icon-only": "_icon-only_1w0sh_91",
4459
+ medium: sa
4460
+ }, uo = ce((e, n) => {
4461
+ const { icon: r, value: o, children: i, className: t, ...s } = e, l = Mo(), { current: d, setCurrent: u, name: a, onChange: g } = ve(
4462
+ co
4463
+ ), b = G(null), _ = () => {
4464
+ u == null || u(o), g == null || g(o);
4465
+ }, v = te(Ye.segment, t, {
4466
+ [Ye["icon-only"]]: r && !i
4467
+ });
4468
+ return /* @__PURE__ */ m.jsx(m.Fragment, { children: /* @__PURE__ */ m.jsxs(
4469
+ "label",
4470
+ {
4471
+ className: v,
4472
+ ref: Re([b, n]),
4473
+ "data-anv": "segmented-control-segment",
4474
+ ...s,
4475
+ children: [
4476
+ /* @__PURE__ */ m.jsx(
4477
+ "input",
4478
+ {
4479
+ type: "radio",
4480
+ name: a,
4481
+ value: o,
4482
+ onChange: _,
4483
+ checked: d === o,
4484
+ "aria-checked": d === o
4485
+ }
4486
+ ),
4487
+ r ? /* @__PURE__ */ m.jsx(we, { svg: r, "aria-hidden": !0 }) : null,
4488
+ i,
4489
+ d === o && /* @__PURE__ */ m.jsx(
4490
+ Ao.span,
4491
+ {
4492
+ layoutId: a,
4493
+ transition: {
4494
+ duration: l ? 0 : 0.2
4495
+ },
4496
+ className: Ye["select-indicator"]
4497
+ }
4498
+ )
4499
+ ]
4500
+ }
4501
+ ) });
4502
+ });
4503
+ uo.displayName = "Segmented Control Segment";
4504
+ const co = Qe({}), po = ce((e, n) => {
4505
+ const {
4506
+ className: r,
4507
+ onClick: o,
4508
+ onChange: i,
4509
+ children: t,
4510
+ size: s = "medium",
4511
+ defaultSelected: l,
4512
+ name: d,
4513
+ fill: u,
4514
+ ...a
4515
+ } = e, [g, b] = Y(l), _ = te(
4516
+ Ye["segmented-control"],
4517
+ Ye[s],
4518
+ r,
4519
+ {
4520
+ [Ye.fill]: u
4521
+ }
4522
+ ), v = be();
4523
+ return /* @__PURE__ */ m.jsx(
4524
+ "div",
4525
+ {
4526
+ role: "radiogroup",
4527
+ className: _,
4528
+ "data-anv": "segmented-control",
4529
+ ref: n,
4530
+ ...a,
4531
+ children: /* @__PURE__ */ m.jsx(
4532
+ co.Provider,
4533
+ {
4534
+ value: { current: g, setCurrent: b, name: d ?? v, onChange: i },
4535
+ children: t
4536
+ }
4537
+ )
4538
+ }
4539
+ );
4540
+ });
4541
+ po.displayName = "Segmented Control";
4542
+ const Rl = Object.assign(po, {
4543
+ Segment: uo
4544
+ });
4545
+ const aa = "_toggle_5roin_25", la = "_indicator_5roin_39", ua = "_check_5roin_53", ut = {
4546
+ switch: "_switch_5roin_4",
4547
+ toggle: aa,
4548
+ indicator: la,
4549
+ check: ua
4550
+ }, da = ce(
4551
+ (e, n) => {
4552
+ const { layoutStyles: r, componentProps: o } = De(e), {
4553
+ className: i,
4554
+ onChange: t,
4555
+ checked: s,
4556
+ defaultChecked: l,
4557
+ value: d,
4558
+ style: u,
4559
+ ...a
4560
+ } = o, g = (v) => {
4561
+ t == null || t(v, { value: d, checked: v.target.checked });
4562
+ }, b = te(ut.switch, i), _ = {
4563
+ ...u,
4564
+ ...r
4565
+ };
4566
+ return /* @__PURE__ */ m.jsxs("label", { className: b, style: _, children: [
4567
+ /* @__PURE__ */ m.jsx(
4568
+ "input",
4569
+ {
4570
+ "data-anv": "switch",
4571
+ ref: n,
4572
+ type: "checkbox",
4573
+ role: "switch",
4574
+ value: d,
4575
+ "aria-checked": s ?? l,
4576
+ checked: s,
4577
+ defaultChecked: l,
4578
+ onChange: g,
4579
+ ...a
4580
+ }
4581
+ ),
4582
+ /* @__PURE__ */ m.jsx("span", { "aria-hidden": !0, className: ut.toggle, children: /* @__PURE__ */ m.jsx("span", { className: ut.indicator, children: /* @__PURE__ */ m.jsx(we, { svg: ur, className: ut.check }) }) }),
4583
+ "label" in e && e.label
4584
+ ] });
4585
+ }
4586
+ );
4587
+ da.displayName = "Switch";
4588
+ var ca = Nt, pa = function(n) {
4589
+ var r = ue.useRef(n);
4590
+ return ca(function() {
4591
+ r.current = n;
4592
+ }), r;
4593
+ }, Rn = function(n, r) {
4594
+ if (typeof n == "function") {
4595
+ n(r);
4596
+ return;
4597
+ }
4598
+ n.current = r;
4599
+ }, fa = function(n, r) {
4600
+ var o = G();
4601
+ return oe(function(i) {
4602
+ n.current = i, o.current && Rn(o.current, null), o.current = r, r && Rn(r, i);
4603
+ }, [r]);
4604
+ }, Mn = {
4605
+ "min-height": "0",
4606
+ "max-height": "none",
4607
+ height: "0",
4608
+ visibility: "hidden",
4609
+ overflow: "hidden",
4610
+ position: "absolute",
4611
+ "z-index": "-1000",
4612
+ top: "0",
4613
+ right: "0"
4614
+ }, ha = function(n) {
4615
+ Object.keys(Mn).forEach(function(r) {
4616
+ n.style.setProperty(r, Mn[r], "important");
4617
+ });
4618
+ }, An = ha, me = null, Tn = function(n, r) {
4619
+ var o = n.scrollHeight;
4620
+ return r.sizingStyle.boxSizing === "border-box" ? o + r.borderSize : o - r.paddingSize;
4621
+ };
4622
+ function ma(e, n, r, o) {
4623
+ r === void 0 && (r = 1), o === void 0 && (o = 1 / 0), me || (me = document.createElement("textarea"), me.setAttribute("tabindex", "-1"), me.setAttribute("aria-hidden", "true"), An(me)), me.parentNode === null && document.body.appendChild(me);
4624
+ var i = e.paddingSize, t = e.borderSize, s = e.sizingStyle, l = s.boxSizing;
4625
+ Object.keys(s).forEach(function(b) {
4626
+ var _ = b;
4627
+ me.style[_] = s[_];
4628
+ }), An(me), me.value = n;
4629
+ var d = Tn(me, e);
4630
+ me.value = n, d = Tn(me, e), me.value = "x";
4631
+ var u = me.scrollHeight - i, a = u * r;
4632
+ l === "border-box" && (a = a + i + t), d = Math.max(a, d);
4633
+ var g = u * o;
4634
+ return l === "border-box" && (g = g + i + t), d = Math.min(g, d), [d, u];
4635
+ }
4636
+ var Hn = function() {
4637
+ }, ga = function(n, r) {
4638
+ return n.reduce(function(o, i) {
4639
+ return o[i] = r[i], o;
4640
+ }, {});
4641
+ }, va = [
4642
+ "borderBottomWidth",
4643
+ "borderLeftWidth",
4644
+ "borderRightWidth",
4645
+ "borderTopWidth",
4646
+ "boxSizing",
4647
+ "fontFamily",
4648
+ "fontSize",
4649
+ "fontStyle",
4650
+ "fontWeight",
4651
+ "letterSpacing",
4652
+ "lineHeight",
4653
+ "paddingBottom",
4654
+ "paddingLeft",
4655
+ "paddingRight",
4656
+ "paddingTop",
4657
+ // non-standard
4658
+ "tabSize",
4659
+ "textIndent",
4660
+ // non-standard
4661
+ "textRendering",
4662
+ "textTransform",
4663
+ "width",
4664
+ "wordBreak"
4665
+ ], _a = !!document.documentElement.currentStyle, Ia = function(n) {
4666
+ var r = window.getComputedStyle(n);
4667
+ if (r === null)
4668
+ return null;
4669
+ var o = ga(va, r), i = o.boxSizing;
4670
+ if (i === "")
4671
+ return null;
4672
+ _a && i === "border-box" && (o.width = parseFloat(o.width) + parseFloat(o.borderRightWidth) + parseFloat(o.borderLeftWidth) + parseFloat(o.paddingRight) + parseFloat(o.paddingLeft) + "px");
4673
+ var t = parseFloat(o.paddingBottom) + parseFloat(o.paddingTop), s = parseFloat(o.borderBottomWidth) + parseFloat(o.borderTopWidth);
4674
+ return {
4675
+ sizingStyle: o,
4676
+ paddingSize: t,
4677
+ borderSize: s
4678
+ };
4679
+ }, ya = Ia;
4680
+ function fo(e, n, r) {
4681
+ var o = pa(r);
4682
+ ue.useLayoutEffect(function() {
4683
+ var i = function(s) {
4684
+ return o.current(s);
4685
+ };
4686
+ if (e)
4687
+ return e.addEventListener(n, i), function() {
4688
+ return e.removeEventListener(n, i);
4689
+ };
4690
+ }, []);
4691
+ }
4692
+ var xa = function(n) {
4693
+ fo(window, "resize", n);
4694
+ }, ba = function(n) {
4695
+ fo(document.fonts, "loadingdone", n);
4696
+ }, wa = ["cacheMeasurements", "maxRows", "minRows", "onChange", "onHeightChange"], Ea = function(n, r) {
4697
+ var o = n.cacheMeasurements, i = n.maxRows, t = n.minRows, s = n.onChange, l = s === void 0 ? Hn : s, d = n.onHeightChange, u = d === void 0 ? Hn : d, a = xe(n, wa), g = a.value !== void 0, b = ue.useRef(null), _ = fa(b, r), v = ue.useRef(0), O = ue.useRef(), h = function() {
4698
+ var f = b.current, p = o && O.current ? O.current : ya(f);
4699
+ if (p) {
4700
+ O.current = p;
4701
+ var x = ma(p, f.value || f.placeholder || "x", t, i), I = x[0], H = x[1];
4702
+ v.current !== I && (v.current = I, f.style.setProperty("height", I + "px", "important"), u(I, {
4703
+ rowHeight: H
4704
+ }));
4705
+ }
4706
+ }, M = function(f) {
4707
+ g || h(), l(f);
4708
+ };
4709
+ return ue.useLayoutEffect(h), xa(h), ba(h), /* @__PURE__ */ ue.createElement("textarea", K({}, a, {
4710
+ onChange: M,
4711
+ ref: _
4712
+ }));
4713
+ }, Ca = /* @__PURE__ */ ue.forwardRef(Ea);
4714
+ const Sa = "_textarea_vmtv0_4", Oa = "_counter_vmtv0_49", Na = "_error_vmtv0_61", Da = "_disabled_vmtv0_68", ka = "_readonly_vmtv0_78", ze = {
4715
+ textarea: Sa,
4716
+ "has-cols": "_has-cols_vmtv0_23",
4717
+ counter: Oa,
4718
+ error: Na,
4719
+ disabled: Da,
4720
+ "disable-resize": "_disable-resize_vmtv0_75",
4721
+ readonly: ka
4722
+ }, Pa = ce(
4723
+ (e, n) => {
4724
+ const { layoutStyles: r, componentProps: o } = De(e), {
4725
+ className: i,
4726
+ disableResize: t,
4727
+ error: s,
4728
+ // errorAriaLive: errorAriaLiveProp = "assertive",
4729
+ hint: l,
4730
+ description: d,
4731
+ label: u,
4732
+ moreInfo: a,
4733
+ onChange: g,
4734
+ required: b,
4735
+ showCounter: _,
4736
+ onFocus: v,
4737
+ onBlur: O,
4738
+ id: h,
4739
+ maxLength: M,
4740
+ autoHeight: c,
4741
+ labelProps: f,
4742
+ placeholder: p,
4743
+ style: x,
4744
+ ...I
4745
+ } = o, H = G(null), [N, j] = Y(0), [A, w] = Y(!1), [T, E] = Y(!1), [R, F] = Y("off");
4746
+ de(() => {
4747
+ var C;
4748
+ j(((C = H.current) == null ? void 0 : C.defaultValue.length) ?? 0);
4749
+ }, []);
4750
+ const q = (C) => {
4751
+ g == null || g(C, { value: C.target.value }), N !== C.target.value.length && w(!0), j(C.target.value.length);
4752
+ }, k = (C) => {
4753
+ v == null || v(C), E(!0);
4754
+ }, X = (C) => {
4755
+ O == null || O(C), E(!1), F("off"), w(!1);
4756
+ }, Q = be(), U = h ?? Q, $ = be(), W = be(), J = typeof s != "boolean" ? s : void 0, D = te([ze.textarea], i, {
4757
+ [ze.error]: s,
4758
+ [ze["disable-resize"]]: t,
4759
+ [ze.disabled]: I.disabled,
4760
+ [ze.readonly]: I.readOnly,
4761
+ [ze["has-cols"]]: I.cols != null
4762
+ }), P = { ...x, ...r }, V = c ? Ca : "textarea";
4763
+ return /* @__PURE__ */ m.jsxs(
4764
+ "div",
4765
+ {
4766
+ className: D,
4767
+ "data-anv": "textarea",
4768
+ style: P,
4769
+ children: [
4770
+ u ? /* @__PURE__ */ m.jsx(
4771
+ Ot,
4772
+ {
4773
+ htmlFor: U,
4774
+ moreInfo: a,
4775
+ openMoreInfo: T,
4776
+ required: b,
4777
+ ...f,
4778
+ children: u
4779
+ }
4780
+ ) : null,
4781
+ /* @__PURE__ */ m.jsx(
4782
+ V,
4783
+ {
4784
+ rows: 3,
4785
+ onChange: q,
4786
+ onFocus: k,
4787
+ onBlur: X,
4788
+ ref: Re([n, H]),
4789
+ required: b,
4790
+ maxLength: M,
4791
+ id: U,
4792
+ placeholder: p,
4793
+ ...I,
4794
+ "aria-describedby": [W, $].join(" "),
4795
+ "aria-invalid": s ? !!s : void 0
4796
+ }
4797
+ ),
4798
+ l || _ || J || d ? /* @__PURE__ */ m.jsx(
4799
+ Dt,
4800
+ {
4801
+ id: $,
4802
+ hint: l,
4803
+ maxLength: M,
4804
+ inputLength: N,
4805
+ isTyping: A,
4806
+ showCounter: _,
4807
+ errorMessage: J,
4808
+ errorAriaLive: R,
4809
+ description: d
4810
+ }
4811
+ ) : null,
4812
+ /* @__PURE__ */ m.jsx($n, { "aria-hidden": !0, id: W, children: p })
4813
+ ]
4814
+ }
4815
+ );
4816
+ }
4817
+ );
4818
+ Pa.displayName = "Textarea";
4819
+ const Ra = "_textfield_1acx5_4", Ma = "_input_1acx5_17", Aa = "_prefix_1acx5_43", Ta = "_suffix_1acx5_44", Ha = "_small_1acx5_101", ja = "_large_1acx5_104", Va = "_error_1acx5_113", ke = {
4820
+ textfield: Ra,
4821
+ input: Ma,
4822
+ "input-wrapper": "_input-wrapper_1acx5_30",
4823
+ prefix: Aa,
4824
+ suffix: Ta,
4825
+ "loading-spinner": "_loading-spinner_1acx5_63",
4826
+ small: Ha,
4827
+ large: ja,
4828
+ error: Va
4829
+ }, $a = ce(
4830
+ function(e, n) {
4831
+ const { layoutStyles: r, componentProps: o } = De(e), {
4832
+ className: i,
4833
+ error: t,
4834
+ errorAriaLive: s = "assertive",
4835
+ label: l,
4836
+ moreInfo: d,
4837
+ prefix: u,
4838
+ suffix: a,
4839
+ size: g,
4840
+ type: b = "text",
4841
+ required: _,
4842
+ onFocus: v,
4843
+ onBlur: O,
4844
+ id: h,
4845
+ description: M,
4846
+ hint: c,
4847
+ loading: f,
4848
+ disabled: p,
4849
+ labelProps: x,
4850
+ style: I,
4851
+ placeholder: H,
4852
+ ...N
4853
+ } = o, [j, A] = Y(!1), [w, T] = Y("off"), E = (D) => {
4854
+ v == null || v(D), A(!0), T(s);
4855
+ }, R = (D) => {
4856
+ O == null || O(D), A(!1), T("off");
4857
+ }, F = be(), q = h ?? F, k = be(), X = be(), Q = be(), U = be(), $ = G(null), W = typeof t != "boolean" ? t : void 0, J = { ...I, ...r };
4858
+ return /* @__PURE__ */ m.jsxs(
4859
+ "div",
4860
+ {
4861
+ className: te(ke.textfield, i),
4862
+ "data-anv": "textfield",
4863
+ style: J,
4864
+ children: [
4865
+ l ? /* @__PURE__ */ m.jsx(
4866
+ Ot,
4867
+ {
4868
+ moreInfo: d,
4869
+ openMoreInfo: j,
4870
+ required: _,
4871
+ htmlFor: q,
4872
+ ...x,
4873
+ children: l
4874
+ }
4875
+ ) : null,
4876
+ /* @__PURE__ */ m.jsxs(
4877
+ "div",
4878
+ {
4879
+ className: te(ke["input-wrapper"], {
4880
+ [ke.small]: g === "small",
4881
+ [ke.large]: g === "large"
4882
+ }),
4883
+ role: "presentation",
4884
+ onClick: () => {
4885
+ var D;
4886
+ return (D = $.current) == null ? void 0 : D.focus();
4887
+ },
4888
+ children: [
4889
+ u ? /* @__PURE__ */ m.jsx(
4890
+ "div",
4891
+ {
4892
+ "aria-hidden": !0,
4893
+ className: ke.prefix,
4894
+ id: `prefix${k}`,
4895
+ children: u
4896
+ }
4897
+ ) : null,
4898
+ /* @__PURE__ */ m.jsx(
4899
+ "input",
4900
+ {
4901
+ id: q,
4902
+ className: te(ke.input, {
4903
+ [ke.error]: t
4904
+ }),
4905
+ onFocus: E,
4906
+ onBlur: R,
4907
+ ref: Re([n, $]),
4908
+ required: _,
4909
+ placeholder: H,
4910
+ type: b,
4911
+ disabled: p,
4912
+ ...N,
4913
+ "aria-describedby": [U, Q].join(" "),
4914
+ "aria-invalid": t ? !!t : void 0
4915
+ }
4916
+ ),
4917
+ f ? /* @__PURE__ */ m.jsx(mo, { className: ke["loading-spinner"] }) : null,
4918
+ a ? /* @__PURE__ */ m.jsx(
4919
+ "div",
4920
+ {
4921
+ className: ke.suffix,
4922
+ "aria-hidden": !0,
4923
+ id: `suffix${X}`,
4924
+ children: a
4925
+ }
4926
+ ) : null
4927
+ ]
4928
+ }
4929
+ ),
4930
+ c || W || M ? /* @__PURE__ */ m.jsx(
4931
+ Dt,
4932
+ {
4933
+ id: Q,
4934
+ hint: c,
4935
+ errorMessage: W,
4936
+ errorAriaLive: w,
4937
+ description: M
4938
+ }
4939
+ ) : null,
4940
+ /* @__PURE__ */ m.jsx($n, { "aria-hidden": !0, id: U, children: H })
4941
+ ]
4942
+ }
4943
+ );
4944
+ }
4945
+ ), Ml = Object.assign($a, {});
4946
+ export {
4947
+ to as B,
4948
+ Et as C,
4949
+ eo as E,
4950
+ kl as F,
4951
+ Ol as H,
4952
+ no as K,
4953
+ Rl as L,
4954
+ cn as N,
4955
+ Dl as V,
4956
+ Qi as _,
4957
+ Sl as a,
4958
+ Zr as b,
4959
+ Ji as c,
4960
+ Pl as d,
4961
+ io as e,
4962
+ ao as f,
4963
+ Nl as g,
4964
+ Wi as h,
4965
+ uo as i,
4966
+ Xi as j,
4967
+ da as k,
4968
+ Ml as l,
4969
+ Pa as m,
4970
+ Ks as q
4971
+ };
4972
+ //# sourceMappingURL=index-c41dc41a.js.map