@servicetitan/anvil2 1.3.3 → 1.3.5

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 (459) hide show
  1. package/Alert-673d75aa.cjs +2 -0
  2. package/Alert-673d75aa.cjs.map +1 -0
  3. package/{Alert-012e475c.js → Alert-85a791c2.js} +29 -27
  4. package/Alert-85a791c2.js.map +1 -0
  5. package/Alert.cjs +1 -1
  6. package/Alert.js +1 -1
  7. package/Announcement.cjs +1 -1
  8. package/Announcement.cjs.map +1 -1
  9. package/Announcement.js +99 -15
  10. package/Announcement.js.map +1 -1
  11. package/AnvilProvider.cjs +1 -1
  12. package/AnvilProvider.js +1 -1
  13. package/Avatar.cjs +1 -1
  14. package/Avatar.cjs.map +1 -1
  15. package/Avatar.js +127 -12
  16. package/Avatar.js.map +1 -1
  17. package/Badge.cjs +1 -1
  18. package/Badge.cjs.map +1 -1
  19. package/Badge.js +47 -7
  20. package/Badge.js.map +1 -1
  21. package/Button.cjs +1 -1
  22. package/Button.cjs.map +1 -1
  23. package/Button.js +14 -40
  24. package/Button.js.map +1 -1
  25. package/ButtonCompound.cjs +1 -1
  26. package/ButtonCompound.cjs.map +1 -1
  27. package/ButtonCompound.js +13 -39
  28. package/ButtonCompound.js.map +1 -1
  29. package/ButtonLink.cjs +1 -1
  30. package/ButtonLink.cjs.map +1 -1
  31. package/ButtonLink.js +14 -40
  32. package/ButtonLink.js.map +1 -1
  33. package/ButtonToggle.cjs +1 -1
  34. package/ButtonToggle.cjs.map +1 -1
  35. package/ButtonToggle.js +14 -40
  36. package/ButtonToggle.js.map +1 -1
  37. package/Calendar.cjs +1 -1
  38. package/Calendar.cjs.map +1 -1
  39. package/Calendar.js +5812 -24
  40. package/Calendar.js.map +1 -1
  41. package/Card.cjs +1 -1
  42. package/Card.cjs.map +1 -1
  43. package/Card.js +52 -6
  44. package/Card.js.map +1 -1
  45. package/Checkbox-634c4d3d.js +164 -0
  46. package/Checkbox-634c4d3d.js.map +1 -0
  47. package/Checkbox-d1db5a71.cjs +2 -0
  48. package/Checkbox-d1db5a71.cjs.map +1 -0
  49. package/Checkbox.cjs +1 -1
  50. package/Checkbox.cjs.map +1 -1
  51. package/Checkbox.css +1 -0
  52. package/Checkbox.js +23 -49
  53. package/Checkbox.js.map +1 -1
  54. package/{Chip-6dde28bc.js → Chip-73b032eb.js} +36 -34
  55. package/Chip-73b032eb.js.map +1 -0
  56. package/Chip-88873569.cjs +2 -0
  57. package/Chip-88873569.cjs.map +1 -0
  58. package/Chip.cjs +1 -1
  59. package/Chip.js +1 -1
  60. package/Combobox.cjs +41 -1
  61. package/Combobox.cjs.map +1 -1
  62. package/Combobox.js +4177 -76
  63. package/Combobox.js.map +1 -1
  64. package/Details.cjs +1 -1
  65. package/Details.cjs.map +1 -1
  66. package/Details.js +153 -50
  67. package/Details.js.map +1 -1
  68. package/Dialog-1984afe2.js +214 -0
  69. package/Dialog-1984afe2.js.map +1 -0
  70. package/Dialog-de6969a2.cjs +2 -0
  71. package/Dialog-de6969a2.cjs.map +1 -0
  72. package/Dialog.cjs +1 -1
  73. package/Dialog.cjs.map +1 -1
  74. package/Dialog.css +1 -0
  75. package/Dialog.js +38 -64
  76. package/Dialog.js.map +1 -1
  77. package/Divider.cjs +1 -1
  78. package/Divider.cjs.map +1 -1
  79. package/Divider.js +76 -7
  80. package/Divider.js.map +1 -1
  81. package/Drawer.cjs +1 -1
  82. package/Drawer.cjs.map +1 -1
  83. package/Drawer.js +242 -70
  84. package/Drawer.js.map +1 -1
  85. package/{Flex-d338e855.js → Flex-d06c75c0.js} +18 -17
  86. package/Flex-d06c75c0.js.map +1 -0
  87. package/Flex-da1ad9db.cjs +2 -0
  88. package/Flex-da1ad9db.cjs.map +1 -0
  89. package/Flex.cjs +1 -1
  90. package/Flex.js +1 -1
  91. package/Grid.cjs +1 -1
  92. package/Grid.cjs.map +1 -1
  93. package/Grid.js +90 -6
  94. package/Grid.js.map +1 -1
  95. package/{Helper-74a1f07f-61317df2.cjs → Helper-74a1f07f-8fcd0721.cjs} +2 -2
  96. package/{Helper-74a1f07f-61317df2.cjs.map → Helper-74a1f07f-8fcd0721.cjs.map} +1 -1
  97. package/{Helper-74a1f07f-092263c4.js → Helper-74a1f07f-d017affe.js} +3 -3
  98. package/{Helper-74a1f07f-092263c4.js.map → Helper-74a1f07f-d017affe.js.map} +1 -1
  99. package/Icon-847b3515.cjs +2 -0
  100. package/Icon-847b3515.cjs.map +1 -0
  101. package/{Icon-b94f924c.js → Icon-be690f0b.js} +13 -12
  102. package/Icon-be690f0b.js.map +1 -0
  103. package/Icon.cjs +1 -1
  104. package/Icon.js +1 -1
  105. package/Label-854a39e4.js +47 -0
  106. package/Label-854a39e4.js.map +1 -0
  107. package/Label-e2593298.cjs +2 -0
  108. package/Label-e2593298.cjs.map +1 -0
  109. package/Label.css +1 -0
  110. package/Layout.cjs +1 -1
  111. package/Layout.cjs.map +1 -1
  112. package/Layout.js +21 -21
  113. package/Layout.js.map +1 -1
  114. package/Link.cjs +1 -1
  115. package/Link.cjs.map +1 -1
  116. package/Link.js +17 -43
  117. package/Link.js.map +1 -1
  118. package/ListView.cjs +1 -1
  119. package/ListView.cjs.map +1 -1
  120. package/ListView.css +1 -1
  121. package/ListView.js +412 -24
  122. package/ListView.js.map +1 -1
  123. package/ListView.module-854f2491-1f87d388.cjs +2 -0
  124. package/ListView.module-854f2491-1f87d388.cjs.map +1 -0
  125. package/ListView.module-854f2491-c5eba193.js +11 -0
  126. package/ListView.module-854f2491-c5eba193.js.map +1 -0
  127. package/Listbox.cjs +1 -1
  128. package/Listbox.cjs.map +1 -1
  129. package/Listbox.js +403 -25
  130. package/Listbox.js.map +1 -1
  131. package/Listbox.module-2120a0a7-794d64a0.cjs +2 -0
  132. package/Listbox.module-2120a0a7-794d64a0.cjs.map +1 -0
  133. package/Listbox.module-2120a0a7-aa22f0ed.js +13 -0
  134. package/Listbox.module-2120a0a7-aa22f0ed.js.map +1 -0
  135. package/LocalizationProvider.cjs +1 -1
  136. package/LocalizationProvider.cjs.map +1 -1
  137. package/LocalizationProvider.js +11 -10
  138. package/LocalizationProvider.js.map +1 -1
  139. package/Menu.cjs +1 -1
  140. package/Menu.cjs.map +1 -1
  141. package/Menu.js +320 -51
  142. package/Menu.js.map +1 -1
  143. package/Overflow-057bbf4e.cjs +2 -0
  144. package/Overflow-057bbf4e.cjs.map +1 -0
  145. package/Overflow-a026904d.js +249 -0
  146. package/Overflow-a026904d.js.map +1 -0
  147. package/Overflow.cjs +1 -1
  148. package/Overflow.cjs.map +1 -1
  149. package/Overflow.css +1 -0
  150. package/Overflow.js +23 -49
  151. package/Overflow.js.map +1 -1
  152. package/Page.cjs +1 -1
  153. package/Page.cjs.map +1 -1
  154. package/Page.js +12 -11
  155. package/Page.js.map +1 -1
  156. package/Popover-aaeea980.js +272 -0
  157. package/Popover-aaeea980.js.map +1 -0
  158. package/Popover-e336dabc.cjs +2 -0
  159. package/Popover-e336dabc.cjs.map +1 -0
  160. package/Popover.cjs +1 -1
  161. package/Popover.cjs.map +1 -1
  162. package/Popover.css +1 -0
  163. package/Popover.js +34 -60
  164. package/Popover.js.map +1 -1
  165. package/ProgressBar.cjs +1 -1
  166. package/ProgressBar.cjs.map +1 -1
  167. package/ProgressBar.js +121 -7
  168. package/ProgressBar.js.map +1 -1
  169. package/Radio.cjs +1 -1
  170. package/Radio.cjs.map +1 -1
  171. package/Radio.js +142 -50
  172. package/Radio.js.map +1 -1
  173. package/SegmentedControl.cjs +1 -1
  174. package/SegmentedControl.cjs.map +1 -1
  175. package/SegmentedControl.js +133 -58
  176. package/SegmentedControl.js.map +1 -1
  177. package/SideNav.cjs +1 -29
  178. package/SideNav.cjs.map +1 -1
  179. package/SideNav.js +258 -1139
  180. package/SideNav.js.map +1 -1
  181. package/SrOnly-0c7fd87a.js +13 -0
  182. package/{SrOnly-864bd4cb.js.map → SrOnly-0c7fd87a.js.map} +1 -1
  183. package/SrOnly-91a467dc.cjs +2 -0
  184. package/{SrOnly-88e8fca6.cjs.map → SrOnly-91a467dc.cjs.map} +1 -1
  185. package/SrOnly.cjs +1 -1
  186. package/SrOnly.js +1 -1
  187. package/Stepper.cjs +1 -1
  188. package/Stepper.cjs.map +1 -1
  189. package/Stepper.js +430 -47
  190. package/Stepper.js.map +1 -1
  191. package/Switch.cjs +1 -1
  192. package/Switch.cjs.map +1 -1
  193. package/Switch.js +67 -44
  194. package/Switch.js.map +1 -1
  195. package/Tab.cjs +9 -1
  196. package/Tab.cjs.map +1 -1
  197. package/Tab.js +436 -24
  198. package/Tab.js.map +1 -1
  199. package/{Text-465104f6.js → Text-08c90c22.js} +30 -29
  200. package/Text-08c90c22.js.map +1 -0
  201. package/Text-8ed03ac7.cjs +2 -0
  202. package/Text-8ed03ac7.cjs.map +1 -0
  203. package/Text.cjs +1 -1
  204. package/Text.js +1 -1
  205. package/TextField.cjs +1 -1
  206. package/TextField.cjs.map +1 -1
  207. package/TextField.js +156 -47
  208. package/TextField.js.map +1 -1
  209. package/Textarea.cjs +1 -1
  210. package/Textarea.cjs.map +1 -1
  211. package/Textarea.js +260 -45
  212. package/Textarea.js.map +1 -1
  213. package/ThemeProvider.cjs +1 -1
  214. package/ThemeProvider.js +1 -1
  215. package/Toast.cjs +8 -1
  216. package/Toast.cjs.map +1 -1
  217. package/Toast.js +568 -9
  218. package/Toast.js.map +1 -1
  219. package/Tooltip-2ecbf35e.cjs +2 -0
  220. package/Tooltip-2ecbf35e.cjs.map +1 -0
  221. package/Tooltip-dcc5d45c.js +157 -0
  222. package/Tooltip-dcc5d45c.js.map +1 -0
  223. package/Tooltip.cjs +1 -1
  224. package/Tooltip.cjs.map +1 -1
  225. package/Tooltip.css +1 -0
  226. package/Tooltip.js +18 -44
  227. package/Tooltip.js.map +1 -1
  228. package/anvil2.cjs +1 -1
  229. package/anvil2.d.ts +18 -6
  230. package/anvil2.js +161 -183
  231. package/anvil2.js.map +1 -1
  232. package/check_circle-48e002d3-0d49b2da.cjs +2 -0
  233. package/check_circle-48e002d3-0d49b2da.cjs.map +1 -0
  234. package/check_circle-48e002d3-5838521c.js +7 -0
  235. package/check_circle-48e002d3-5838521c.js.map +1 -0
  236. package/chevron_right-5b0931b5-96f8a9c6.cjs +2 -0
  237. package/chevron_right-5b0931b5-96f8a9c6.cjs.map +1 -0
  238. package/chevron_right-5b0931b5-ac35ad56.js +6 -0
  239. package/chevron_right-5b0931b5-ac35ad56.js.map +1 -0
  240. package/childrenToString-0cd30a27.cjs +2 -0
  241. package/childrenToString-0cd30a27.cjs.map +1 -0
  242. package/childrenToString-416df522.js +19 -0
  243. package/childrenToString-416df522.js.map +1 -0
  244. package/extends-31d75778.js +27 -0
  245. package/extends-31d75778.js.map +1 -0
  246. package/extends-60b54772.cjs +2 -0
  247. package/extends-60b54772.cjs.map +1 -0
  248. package/getKeyboardFocusableElements-58a00025.js +14 -0
  249. package/getKeyboardFocusableElements-58a00025.js.map +1 -0
  250. package/getKeyboardFocusableElements-aba1bd01.cjs +2 -0
  251. package/getKeyboardFocusableElements-aba1bd01.cjs.map +1 -0
  252. package/index-04060912.js +3677 -0
  253. package/index-04060912.js.map +1 -0
  254. package/index-06c0bdf0.js +480 -0
  255. package/index-06c0bdf0.js.map +1 -0
  256. package/index-11b6ca91-14b4e485.js +63 -0
  257. package/index-11b6ca91-14b4e485.js.map +1 -0
  258. package/index-11b6ca91-d30fd1d3.cjs +2 -0
  259. package/index-11b6ca91-d30fd1d3.cjs.map +1 -0
  260. package/{index-acdc415f.cjs → index-1f4f169d.cjs} +2 -2
  261. package/{index-acdc415f.cjs.map → index-1f4f169d.cjs.map} +1 -1
  262. package/index-40821bc4.cjs +2 -0
  263. package/index-40821bc4.cjs.map +1 -0
  264. package/{index-ab05dabf.js → index-47e4931c.js} +3 -3
  265. package/{index-ab05dabf.js.map → index-47e4931c.js.map} +1 -1
  266. package/index-49242812.js +59 -0
  267. package/index-49242812.js.map +1 -0
  268. package/index-69174413.cjs +5 -0
  269. package/index-69174413.cjs.map +1 -0
  270. package/index-902bf2b0.js +56 -0
  271. package/index-902bf2b0.js.map +1 -0
  272. package/index-a53df036.cjs +2 -0
  273. package/index-a53df036.cjs.map +1 -0
  274. package/{index-e0f6271a.js → index-c6e22bb9.js} +6 -6
  275. package/{index-e0f6271a.js.map → index-c6e22bb9.js.map} +1 -1
  276. package/index-dcf78e3f.cjs +2 -0
  277. package/index-dcf78e3f.cjs.map +1 -0
  278. package/{index-3a4e28a9-3d7ba14f.js → index-eb2e706f-03380994.js} +19 -18
  279. package/index-eb2e706f-03380994.js.map +1 -0
  280. package/index-eb2e706f-ff6c4157.cjs +2 -0
  281. package/index-eb2e706f-ff6c4157.cjs.map +1 -0
  282. package/{index-67d20edb.cjs → index-ef2e9d11.cjs} +2 -2
  283. package/{index-67d20edb.cjs.map → index-ef2e9d11.cjs.map} +1 -1
  284. package/index.css +1 -1
  285. package/index11.css +1 -0
  286. package/index12.css +1 -0
  287. package/index13.css +1 -0
  288. package/index14.css +1 -0
  289. package/index15.css +1 -0
  290. package/index16.css +1 -0
  291. package/index18.css +1 -0
  292. package/index19.css +1 -0
  293. package/index2.css +1 -1
  294. package/index21.css +1 -0
  295. package/index22.css +1 -0
  296. package/index24.css +1 -0
  297. package/index3.css +1 -1
  298. package/index6.css +1 -0
  299. package/index7.css +1 -0
  300. package/index9.css +1 -0
  301. package/info-af4c0112-9f16129f.cjs +2 -0
  302. package/info-af4c0112-9f16129f.cjs.map +1 -0
  303. package/info-af4c0112-f73c8f68.js +6 -0
  304. package/info-af4c0112-f73c8f68.js.map +1 -0
  305. package/package.json +2 -2
  306. package/tinycolor-3b50a250.cjs +2 -0
  307. package/tinycolor-3b50a250.cjs.map +1 -0
  308. package/tinycolor-d415b1fd.js +712 -0
  309. package/tinycolor-d415b1fd.js.map +1 -0
  310. package/token.cjs +1 -1
  311. package/token.js +1 -1
  312. package/useAccessibleColor.cjs +1 -1
  313. package/useAccessibleColor.cjs.map +1 -1
  314. package/useAccessibleColor.d.ts +1 -1
  315. package/useAccessibleColor.js +36 -32
  316. package/useAccessibleColor.js.map +1 -1
  317. package/useLayoutPropsUtil-cd33328b.cjs +2 -0
  318. package/useLayoutPropsUtil-cd33328b.cjs.map +1 -0
  319. package/useLayoutPropsUtil-f34e9597.js +160 -0
  320. package/useLayoutPropsUtil-f34e9597.js.map +1 -0
  321. package/useLinkStyles.cjs +1 -1
  322. package/useLinkStyles.d.ts +2 -2
  323. package/useLinkStyles.js +3 -31
  324. package/useLinkStyles.js.map +1 -1
  325. package/useMergeRefs.cjs +1 -1
  326. package/useMergeRefs.d.ts +1 -1
  327. package/useMergeRefs.js +3 -32
  328. package/useMergeRefs.js.map +1 -1
  329. package/usePrefersColorScheme.cjs +1 -1
  330. package/usePrefersColorScheme.cjs.map +1 -1
  331. package/usePrefersColorScheme.d.ts +1 -1
  332. package/usePrefersColorScheme.js +19 -32
  333. package/usePrefersColorScheme.js.map +1 -1
  334. package/useSwipe.cjs +1 -1
  335. package/useSwipe.cjs.map +1 -1
  336. package/useSwipe.d.ts +1 -1
  337. package/useSwipe.js +15 -32
  338. package/useSwipe.js.map +1 -1
  339. package/Alert-012e475c.js.map +0 -1
  340. package/Alert-066f00f2.cjs +0 -2
  341. package/Alert-066f00f2.cjs.map +0 -1
  342. package/Announcement-cd9602ed.cjs +0 -2
  343. package/Announcement-cd9602ed.cjs.map +0 -1
  344. package/Announcement-f9b09ba3.js +0 -88
  345. package/Announcement-f9b09ba3.js.map +0 -1
  346. package/Announcement.css +0 -1
  347. package/Badge-b8764640.cjs +0 -2
  348. package/Badge-b8764640.cjs.map +0 -1
  349. package/Badge-df96f15a.js +0 -45
  350. package/Badge-df96f15a.js.map +0 -1
  351. package/Badge.css +0 -1
  352. package/Calendar-31bcb381.js +0 -5797
  353. package/Calendar-31bcb381.js.map +0 -1
  354. package/Calendar-d0baf4b1.cjs +0 -2
  355. package/Calendar-d0baf4b1.cjs.map +0 -1
  356. package/Card-20628287.cjs +0 -2
  357. package/Card-20628287.cjs.map +0 -1
  358. package/Card-bb358803.js +0 -51
  359. package/Card-bb358803.js.map +0 -1
  360. package/Chip-5b63e48c.cjs +0 -2
  361. package/Chip-5b63e48c.cjs.map +0 -1
  362. package/Chip-6dde28bc.js.map +0 -1
  363. package/Divider-6646eeb8.cjs +0 -2
  364. package/Divider-6646eeb8.cjs.map +0 -1
  365. package/Divider-b3bff73a.js +0 -74
  366. package/Divider-b3bff73a.js.map +0 -1
  367. package/Flex-971b5295.cjs +0 -2
  368. package/Flex-971b5295.cjs.map +0 -1
  369. package/Flex-d338e855.js.map +0 -1
  370. package/Grid-37ded954.cjs +0 -2
  371. package/Grid-37ded954.cjs.map +0 -1
  372. package/Grid-5bad450f.js +0 -89
  373. package/Grid-5bad450f.js.map +0 -1
  374. package/Icon-57c31c9b.cjs +0 -2
  375. package/Icon-57c31c9b.cjs.map +0 -1
  376. package/Icon-b94f924c.js.map +0 -1
  377. package/ListView-3b1adecb.js +0 -557
  378. package/ListView-3b1adecb.js.map +0 -1
  379. package/ListView-88e49b19.cjs +0 -2
  380. package/ListView-88e49b19.cjs.map +0 -1
  381. package/Listbox-60fbdaa1.js +0 -394
  382. package/Listbox-60fbdaa1.js.map +0 -1
  383. package/Listbox-cd5c4185.cjs +0 -2
  384. package/Listbox-cd5c4185.cjs.map +0 -1
  385. package/ProgressBar-c1b5c7c3.js +0 -516
  386. package/ProgressBar-c1b5c7c3.js.map +0 -1
  387. package/ProgressBar-fa511478.cjs +0 -2
  388. package/ProgressBar-fa511478.cjs.map +0 -1
  389. package/ProgressBar.css +0 -1
  390. package/SideNav-33a404ec.js +0 -935
  391. package/SideNav-33a404ec.js.map +0 -1
  392. package/SideNav-47435e45.cjs +0 -21
  393. package/SideNav-47435e45.cjs.map +0 -1
  394. package/SrOnly-864bd4cb.js +0 -13
  395. package/SrOnly-88e8fca6.cjs +0 -2
  396. package/Stepper-7e3a130c.js +0 -633
  397. package/Stepper-7e3a130c.js.map +0 -1
  398. package/Stepper-8675700c.cjs +0 -2
  399. package/Stepper-8675700c.cjs.map +0 -1
  400. package/Stepper.css +0 -1
  401. package/Tab-1fce1d41.js +0 -422
  402. package/Tab-1fce1d41.js.map +0 -1
  403. package/Tab-f843e740.cjs +0 -10
  404. package/Tab-f843e740.cjs.map +0 -1
  405. package/Text-465104f6.js.map +0 -1
  406. package/Text-631c229a.cjs +0 -2
  407. package/Text-631c229a.cjs.map +0 -1
  408. package/Toast-32a4ab22.cjs +0 -9
  409. package/Toast-32a4ab22.cjs.map +0 -1
  410. package/Toast-6cd7d2e1.js +0 -566
  411. package/Toast-6cd7d2e1.js.map +0 -1
  412. package/check_circle-48e002d3-0554de7d.js +0 -8
  413. package/check_circle-48e002d3-0554de7d.js.map +0 -1
  414. package/check_circle-48e002d3-57364fcd.cjs +0 -2
  415. package/check_circle-48e002d3-57364fcd.cjs.map +0 -1
  416. package/floating-ui.react-51a3fa68.js +0 -23242
  417. package/floating-ui.react-51a3fa68.js.map +0 -1
  418. package/floating-ui.react-5347095a.cjs +0 -178
  419. package/floating-ui.react-5347095a.cjs.map +0 -1
  420. package/index-3a4e28a9-3d7ba14f.js.map +0 -1
  421. package/index-3a4e28a9-b649e635.cjs +0 -2
  422. package/index-3a4e28a9-b649e635.cjs.map +0 -1
  423. package/index-3f218083.js +0 -58
  424. package/index-3f218083.js.map +0 -1
  425. package/index-63e13299.cjs +0 -2
  426. package/index-63e13299.cjs.map +0 -1
  427. package/index-9948e3af.cjs +0 -23
  428. package/index-9948e3af.cjs.map +0 -1
  429. package/index-d46fa8de-c02f7a12.cjs +0 -2
  430. package/index-d46fa8de-c02f7a12.cjs.map +0 -1
  431. package/index-d46fa8de-f8bf17b6.js +0 -540
  432. package/index-d46fa8de-f8bf17b6.js.map +0 -1
  433. package/index-f7658447-1cfbda8f.js +0 -120
  434. package/index-f7658447-1cfbda8f.js.map +0 -1
  435. package/index-f7658447-f447ade8.cjs +0 -2
  436. package/index-f7658447-f447ade8.cjs.map +0 -1
  437. package/index-f7658447.css +0 -1
  438. package/index-ff5fea63.js +0 -5015
  439. package/index-ff5fea63.js.map +0 -1
  440. package/useLayoutPropsUtil-e307abc7-3826ee09.cjs +0 -2
  441. package/useLayoutPropsUtil-e307abc7-3826ee09.cjs.map +0 -1
  442. package/useLayoutPropsUtil-e307abc7-cbe2fb6d.js +0 -869
  443. package/useLayoutPropsUtil-e307abc7-cbe2fb6d.js.map +0 -1
  444. package/usePrefersColorScheme-129544ad-59e2e284.cjs +0 -2
  445. package/usePrefersColorScheme-129544ad-59e2e284.cjs.map +0 -1
  446. package/usePrefersColorScheme-129544ad-cab6fc3f.js +0 -55
  447. package/usePrefersColorScheme-129544ad-cab6fc3f.js.map +0 -1
  448. package/useSwipe-82769b09-835234e6.js +0 -17
  449. package/useSwipe-82769b09-835234e6.js.map +0 -1
  450. package/useSwipe-82769b09-dba26ed2.cjs +0 -2
  451. package/useSwipe-82769b09-dba26ed2.cjs.map +0 -1
  452. /package/{index-3a4e28a9.css → index-eb2e706f.css} +0 -0
  453. /package/{Grid.css → index10.css} +0 -0
  454. /package/{SideNav.css → index17.css} +0 -0
  455. /package/{Tab.css → index20.css} +0 -0
  456. /package/{Toast.css → index23.css} +0 -0
  457. /package/{Calendar.css → index4.css} +0 -0
  458. /package/{Card.css → index5.css} +0 -0
  459. /package/{Divider.css → index8.css} +0 -0
package/index-ff5fea63.js DELETED
@@ -1,5015 +0,0 @@
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 hn } from "./Chip-6dde28bc.js";
11
- import { H as Vn, j as Nt, 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 Ee } from "./Icon-b94f924c.js";
16
- import { i as $n } from "./Listbox-60fbdaa1.js";
17
- import "./Stepper-7e3a130c.js";
18
- import { P as x, _ as F, b as be, a as Io } from "./SideNav-33a404ec.js";
19
- import { p as Kn } from "./SrOnly-864bd4cb.js";
20
- import { f as m } from "./jsx-runtime-944c88e2-e73fa629.js";
21
- import { c as ie } from "./index-e0f6271a.js";
22
- import "./Tab-1fce1d41.js";
23
- import { $ as bt } 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 ke } from "./useLayoutPropsUtil-e307abc7-cbe2fb6d.js";
27
- import "./usePrefersColorScheme-129544ad-cab6fc3f.js";
28
- import * as de from "react";
29
- import ft, { useRef as J, useCallback as ae, useEffect as ce, useMemo as $e, cloneElement as yo, Component as xo, useLayoutEffect as Dt, useReducer as bo, createContext as Qe, forwardRef as pe, useContext as ve, useState as Y, useId as we, isValidElement as wo } from "react";
30
- import "./index-3f218083.js";
31
- import "./LocalizationProvider.js";
32
- import { u as Me, F as Bn, q as zn, b as Eo, d as Un, e as qn, o as Wn, r as Yn, f as Gn, s as Jn, l as Xn, 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 Ro } from "./floating-ui.react-51a3fa68.js";
33
- import { g as Po } 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 kt } from "./Helper-74a1f07f-092263c4.js";
38
- /* empty css */import { u as Mo } from "./use-reduced-motion-b359504d.js";
39
- import { m as To } from "./motion-a0a946d6.js";
40
- import "./useSwipe-82769b09-835234e6.js";
41
- function mn(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 wt = { exports: {} }, ne = {};
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 gn;
57
- function Ao() {
58
- if (gn)
59
- return ne;
60
- gn = 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"), a = Symbol.for("react.server_context"), u = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), l = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), b = Symbol.for("react.lazy"), _ = Symbol.for("react.offscreen"), v;
62
- v = Symbol.for("react.module.reference");
63
- function C(g) {
64
- if (typeof g == "object" && g !== null) {
65
- var P = g.$$typeof;
66
- switch (P) {
67
- case e:
68
- switch (g = g.type, g) {
69
- case r:
70
- case i:
71
- case o:
72
- case d:
73
- case l:
74
- return g;
75
- default:
76
- switch (g = g && g.$$typeof, g) {
77
- case a:
78
- case s:
79
- case u:
80
- case b:
81
- case p:
82
- case t:
83
- return g;
84
- default:
85
- return P;
86
- }
87
- }
88
- case n:
89
- return P;
90
- }
91
- }
92
- }
93
- return ne.ContextConsumer = s, ne.ContextProvider = t, ne.Element = e, ne.ForwardRef = u, ne.Fragment = r, ne.Lazy = b, ne.Memo = p, ne.Portal = n, ne.Profiler = i, ne.StrictMode = o, ne.Suspense = d, ne.SuspenseList = l, ne.isAsyncMode = function() {
94
- return !1;
95
- }, ne.isConcurrentMode = function() {
96
- return !1;
97
- }, ne.isContextConsumer = function(g) {
98
- return C(g) === s;
99
- }, ne.isContextProvider = function(g) {
100
- return C(g) === t;
101
- }, ne.isElement = function(g) {
102
- return typeof g == "object" && g !== null && g.$$typeof === e;
103
- }, ne.isForwardRef = function(g) {
104
- return C(g) === u;
105
- }, ne.isFragment = function(g) {
106
- return C(g) === r;
107
- }, ne.isLazy = function(g) {
108
- return C(g) === b;
109
- }, ne.isMemo = function(g) {
110
- return C(g) === p;
111
- }, ne.isPortal = function(g) {
112
- return C(g) === n;
113
- }, ne.isProfiler = function(g) {
114
- return C(g) === i;
115
- }, ne.isStrictMode = function(g) {
116
- return C(g) === o;
117
- }, ne.isSuspense = function(g) {
118
- return C(g) === d;
119
- }, ne.isSuspenseList = function(g) {
120
- return C(g) === l;
121
- }, ne.isValidElementType = function(g) {
122
- return typeof g == "string" || typeof g == "function" || g === r || g === i || g === o || g === d || g === l || g === _ || typeof g == "object" && g !== null && (g.$$typeof === b || g.$$typeof === p || g.$$typeof === t || g.$$typeof === s || g.$$typeof === u || g.$$typeof === v || g.getModuleId !== void 0);
123
- }, ne.typeOf = C, ne;
124
- }
125
- var re = {};
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 vn;
136
- function Ho() {
137
- return vn || (vn = 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"), a = Symbol.for("react.server_context"), u = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), l = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), b = Symbol.for("react.lazy"), _ = Symbol.for("react.offscreen"), v = !1, C = !1, g = !1, P = !1, c = !1, h;
139
- h = Symbol.for("react.module.reference");
140
- function f(N) {
141
- return !!(typeof N == "string" || typeof N == "function" || N === r || N === i || c || N === o || N === d || N === l || P || N === _ || v || C || g || typeof N == "object" && N !== null && (N.$$typeof === b || N.$$typeof === p || N.$$typeof === t || N.$$typeof === s || N.$$typeof === u || // 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
- N.$$typeof === h || N.getModuleId !== void 0));
146
- }
147
- function I(N) {
148
- if (typeof N == "object" && N !== null) {
149
- var W = N.$$typeof;
150
- switch (W) {
151
- case e:
152
- var fe = N.type;
153
- switch (fe) {
154
- case r:
155
- case i:
156
- case o:
157
- case d:
158
- case l:
159
- return fe;
160
- default:
161
- var _e = fe && fe.$$typeof;
162
- switch (_e) {
163
- case a:
164
- case s:
165
- case u:
166
- case b:
167
- case p:
168
- case t:
169
- return _e;
170
- default:
171
- return W;
172
- }
173
- }
174
- case n:
175
- return W;
176
- }
177
- }
178
- }
179
- var y = s, j = t, D = e, K = u, M = r, w = b, T = p, E = n, R = i, L = o, B = d, k = l, X = !1, Q = !1;
180
- function z(N) {
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 G(N) {
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 oe(N) {
187
- return I(N) === s;
188
- }
189
- function V(N) {
190
- return I(N) === t;
191
- }
192
- function S(N) {
193
- return typeof N == "object" && N !== null && N.$$typeof === e;
194
- }
195
- function O(N) {
196
- return I(N) === u;
197
- }
198
- function H(N) {
199
- return I(N) === r;
200
- }
201
- function $(N) {
202
- return I(N) === b;
203
- }
204
- function te(N) {
205
- return I(N) === p;
206
- }
207
- function Z(N) {
208
- return I(N) === n;
209
- }
210
- function U(N) {
211
- return I(N) === i;
212
- }
213
- function A(N) {
214
- return I(N) === o;
215
- }
216
- function q(N) {
217
- return I(N) === d;
218
- }
219
- function ee(N) {
220
- return I(N) === l;
221
- }
222
- re.ContextConsumer = y, re.ContextProvider = j, re.Element = D, re.ForwardRef = K, re.Fragment = M, re.Lazy = w, re.Memo = T, re.Portal = E, re.Profiler = R, re.StrictMode = L, re.Suspense = B, re.SuspenseList = k, re.isAsyncMode = z, re.isConcurrentMode = G, re.isContextConsumer = oe, re.isContextProvider = V, re.isElement = S, re.isForwardRef = O, re.isFragment = H, re.isLazy = $, re.isMemo = te, re.isPortal = Z, re.isProfiler = U, re.isStrictMode = A, re.isSuspense = q, re.isSuspenseList = ee, re.isValidElementType = f, re.typeOf = I;
223
- }()), re;
224
- }
225
- process.env.NODE_ENV === "production" ? wt.exports = Ao() : wt.exports = Ho();
226
- var _n = wt.exports;
227
- const In = (e) => typeof e == "object" && e != null && e.nodeType === 1, yn = (e, n) => (!n || e !== "hidden") && e !== "visible" && e !== "clip", yt = (e, n) => {
228
- if (e.clientHeight < e.scrollHeight || e.clientWidth < e.scrollWidth) {
229
- const r = getComputedStyle(e, null);
230
- return yn(r.overflowY, n) || yn(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, a) => t < e && s > n || t > e && s < n ? 0 : t <= e && a <= r || s >= n && a >= r ? t - e - o : s > n && a < r || t < e && a > 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: a, inline: u, boundary: d, skipOverflowHiddenElements: l } = n, p = typeof d == "function" ? d : (B) => B !== d;
252
- if (!In(e))
253
- throw new TypeError("Invalid target");
254
- const b = document.scrollingElement || document.documentElement, _ = [];
255
- let v = e;
256
- for (; In(v) && p(v); ) {
257
- if (v = jo(v), v === b) {
258
- _.push(v);
259
- break;
260
- }
261
- v != null && v === document.body && yt(v) && !yt(document.documentElement) || v != null && yt(v, l) && _.push(v);
262
- }
263
- const C = (o = (r = window.visualViewport) == null ? void 0 : r.width) != null ? o : innerWidth, g = (t = (i = window.visualViewport) == null ? void 0 : i.height) != null ? t : innerHeight, { scrollX: P, scrollY: c } = window, { height: h, width: f, top: I, right: y, bottom: j, left: D } = e.getBoundingClientRect(), { top: K, right: M, bottom: w, left: T } = ((B) => {
264
- const k = window.getComputedStyle(B);
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 = a === "start" || a === "nearest" ? I - K : a === "end" ? j + w : I + h / 2 - K + w, R = u === "center" ? D + f / 2 - T + M : u === "end" ? y + M : D - T;
268
- const L = [];
269
- for (let B = 0; B < _.length; B++) {
270
- const k = _[B], { height: X, width: Q, top: z, right: G, bottom: oe, left: V } = k.getBoundingClientRect();
271
- if (s === "if-needed" && I >= 0 && D >= 0 && j <= g && y <= C && I >= z && j <= oe && D >= V && y <= G)
272
- return L;
273
- const S = getComputedStyle(k), O = parseInt(S.borderLeftWidth, 10), H = parseInt(S.borderTopWidth, 10), $ = parseInt(S.borderRightWidth, 10), te = parseInt(S.borderBottomWidth, 10);
274
- let Z = 0, U = 0;
275
- const A = "offsetWidth" in k ? k.offsetWidth - k.clientWidth - O - $ : 0, q = "offsetHeight" in k ? k.offsetHeight - k.clientHeight - H - te : 0, ee = "offsetWidth" in k ? k.offsetWidth === 0 ? 0 : Q / k.offsetWidth : 0, N = "offsetHeight" in k ? k.offsetHeight === 0 ? 0 : X / k.offsetHeight : 0;
276
- if (b === k)
277
- Z = a === "start" ? E : a === "end" ? E - g : a === "nearest" ? at(c, c + g, g, H, te, c + E, c + E + h, h) : E - g / 2, U = u === "start" ? R : u === "center" ? R - C / 2 : u === "end" ? R - C : at(P, P + C, C, O, $, P + R, P + R + f, f), Z = Math.max(0, Z + c), U = Math.max(0, U + P);
278
- else {
279
- Z = a === "start" ? E - z - H : a === "end" ? E - oe + te + q : a === "nearest" ? at(z, oe, X, H, te + q, E, E + h, h) : E - (z + X / 2) + q / 2, U = u === "start" ? R - V - O : u === "center" ? R - (V + Q / 2) + A / 2 : u === "end" ? R - G + $ + A : at(V, G, Q, O, $ + A, R, R + f, f);
280
- const { scrollLeft: W, scrollTop: fe } = k;
281
- Z = N === 0 ? 0 : Math.max(0, Math.min(fe + Z / N, k.scrollHeight - X / N + q)), U = ee === 0 ? 0 : Math.max(0, Math.min(W + U / ee, k.scrollWidth - Q / ee + A)), E += fe - Z, R += W - U;
282
- }
283
- L.push({ el: k, top: Z, left: U });
284
- }
285
- return L;
286
- };
287
- var Je = function() {
288
- return Je = 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
- }, Je.apply(this, arguments);
296
- };
297
- var $o = 0;
298
- function xn(e) {
299
- return typeof e == "function" ? e : xe;
300
- }
301
- function xe() {
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 bn(e, n, r) {
317
- var o = e === n || n instanceof r.Node && e.contains && e.contains(n);
318
- return o;
319
- }
320
- function Rt(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), a = 0; a < t; a++)
327
- s[a] = arguments[a];
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 ue() {
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(a) {
341
- return a && a.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 wn(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] = ht(n, o) ? n[o] : e[o], r;
387
- }, {});
388
- }
389
- function ht(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 a = e + n;
407
- a < 0 ? a = i ? s : 0 : a > s && (a = i ? 0 : s);
408
- var u = Xe(a, n < 0, r, o, i);
409
- return u === -1 ? e >= t ? -1 : e : u;
410
- }
411
- function Xe(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 a = e; a < t; a++)
420
- if (!o(r[a], a))
421
- return a;
422
- return i ? Xe(n ? t - 1 : 0, n, r, o) : -1;
423
- }
424
- function mt(e, n, r, o) {
425
- return o === void 0 && (o = !0), r && n.some(function(i) {
426
- return i && (bn(i, e, r) || o && bn(i, r.document.activeElement, r));
427
- });
428
- }
429
- var Pt = xe;
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 = Rt(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 Mt(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, ct = process.env.NODE_ENV !== "production" ? "__autocomplete_keydown_arrow_up__" : 3, pt = 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, Et = 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: ct,
464
- keyDownArrowDown: pt,
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: Et,
474
- blurButton: Or,
475
- controlledPropUpdatedSelectedItem: Nr,
476
- touchEnd: Dr
477
- }), Uo = ["refKey", "ref"], qo = ["onClick", "onPress", "onKeyDown", "onKeyUp", "onBlur"], Wo = ["onKeyDown", "onBlur", "onChange", "onInput", "onChangeText"], Yo = ["refKey", "ref"], Go = ["onMouseMove", "onMouseDown", "onClick", "onPress", "index", "item"], Jo = /* @__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, h) {
485
- var f = setTimeout(function() {
486
- t.timeoutIds = t.timeoutIds.filter(function(I) {
487
- return I !== f;
488
- }), c();
489
- }, h);
490
- t.timeoutIds.push(f);
491
- }, t.setItemCount = function(c) {
492
- t.itemCount = c;
493
- }, t.unsetItemCount = function() {
494
- t.itemCount = null;
495
- }, t.isItemDisabled = function(c, h) {
496
- var f = t.getItemNodeFromIndex(h);
497
- return f && f.hasAttribute("disabled");
498
- }, t.setHighlightedIndex = function(c, h) {
499
- c === void 0 && (c = t.props.defaultHighlightedIndex), h === void 0 && (h = {}), h = lt(h), t.internalSetState(F({
500
- highlightedIndex: c
501
- }, h));
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, h, f) {
510
- h = lt(h), t.internalSetState(F({
511
- isOpen: t.props.defaultIsOpen,
512
- highlightedIndex: t.props.defaultHighlightedIndex,
513
- selectedItem: c,
514
- inputValue: t.props.itemToString(c)
515
- }, h), f);
516
- }, t.selectItemAtIndex = function(c, h, f) {
517
- var I = t.items[c];
518
- I != null && t.selectItem(I, h, f);
519
- }, t.selectHighlightedItem = function(c, h) {
520
- return t.selectItemAtIndex(t.getState().highlightedIndex, c, h);
521
- }, t.internalSetState = function(c, h) {
522
- var f, I, y = {}, j = typeof c == "function";
523
- return !j && c.hasOwnProperty("inputValue") && t.props.onInputValueChange(c.inputValue, F({}, t.getStateAndHelpers(), c)), t.setState(function(D) {
524
- var K;
525
- D = t.getState(D);
526
- var M = j ? c(D) : c;
527
- M = t.props.stateReducer(D, M), f = M.hasOwnProperty("selectedItem");
528
- var w = {};
529
- return f && M.selectedItem !== D.selectedItem && (I = M.selectedItem), (K = M).type || (K.type = gr), Object.keys(M).forEach(function(T) {
530
- D[T] !== M[T] && (y[T] = M[T]), T !== "type" && (M[T], ht(t.props, T) || (w[T] = M[T]));
531
- }), j && M.hasOwnProperty("inputValue") && t.props.onInputValueChange(M.inputValue, F({}, t.getStateAndHelpers(), M)), w;
532
- }, function() {
533
- xn(h)();
534
- var D = Object.keys(y).length > 1;
535
- D && t.props.onStateChange(y, t.getStateAndHelpers()), f && t.props.onSelect(c.selectedItem, t.getStateAndHelpers()), I !== void 0 && t.props.onChange(I, t.getStateAndHelpers()), t.props.onUserAction(y, t.getStateAndHelpers());
536
- });
537
- }, t.rootRef = function(c) {
538
- return t._rootNode = c;
539
- }, t.getRootProps = function(c, h) {
540
- var f, I = c === void 0 ? {} : c, y = I.refKey, j = y === void 0 ? "ref" : y, D = I.ref, K = be(I, Uo), M = h === void 0 ? {} : h, w = M.suppressRefError, T = w === void 0 ? !1 : w;
541
- t.getRootProps.called = !0, t.getRootProps.refKey = j, t.getRootProps.suppressRefError = T;
542
- var E = t.getState(), R = E.isOpen;
543
- return F((f = {}, f[j] = Ve(D, t.rootRef), f.role = "combobox", f["aria-expanded"] = R, f["aria-haspopup"] = "listbox", f["aria-owns"] = R ? t.menuId : void 0, f["aria-labelledby"] = t.labelId, f), K);
544
- }, t.keyDownHandlers = {
545
- ArrowDown: function(h) {
546
- var f = this;
547
- if (h.preventDefault(), this.getState().isOpen) {
548
- var I = h.shiftKey ? 5 : 1;
549
- this.moveHighlightedIndex(I, {
550
- type: pt
551
- });
552
- } else
553
- this.internalSetState({
554
- isOpen: !0,
555
- type: pt
556
- }, function() {
557
- var y = f.getItemCount();
558
- if (y > 0) {
559
- var j = f.getState(), D = j.highlightedIndex, K = Le(D, 1, {
560
- length: y
561
- }, f.isItemDisabled, !0);
562
- f.setHighlightedIndex(K, {
563
- type: pt
564
- });
565
- }
566
- });
567
- },
568
- ArrowUp: function(h) {
569
- var f = this;
570
- if (h.preventDefault(), this.getState().isOpen) {
571
- var I = h.shiftKey ? -5 : -1;
572
- this.moveHighlightedIndex(I, {
573
- type: ct
574
- });
575
- } else
576
- this.internalSetState({
577
- isOpen: !0,
578
- type: ct
579
- }, function() {
580
- var y = f.getItemCount();
581
- if (y > 0) {
582
- var j = f.getState(), D = j.highlightedIndex, K = Le(D, -1, {
583
- length: y
584
- }, f.isItemDisabled, !0);
585
- f.setHighlightedIndex(K, {
586
- type: ct
587
- });
588
- }
589
- });
590
- },
591
- Enter: function(h) {
592
- if (h.which !== 229) {
593
- var f = this.getState(), I = f.isOpen, y = f.highlightedIndex;
594
- if (I && y != null) {
595
- h.preventDefault();
596
- var j = this.items[y], D = this.getItemNodeFromIndex(y);
597
- if (j == null || D && D.hasAttribute("disabled"))
598
- return;
599
- this.selectHighlightedItem({
600
- type: yr
601
- });
602
- }
603
- }
604
- },
605
- Escape: function(h) {
606
- h.preventDefault(), this.reset(F({
607
- type: Ir
608
- }, !this.state.isOpen && {
609
- selectedItem: null,
610
- inputValue: ""
611
- }));
612
- }
613
- }, t.buttonKeyDownHandlers = F({}, t.keyDownHandlers, {
614
- " ": function(h) {
615
- h.preventDefault(), this.toggleMenu({
616
- type: Sr
617
- });
618
- }
619
- }), t.inputKeyDownHandlers = F({}, t.keyDownHandlers, {
620
- Home: function(h) {
621
- var f = this.getState(), I = f.isOpen;
622
- if (I) {
623
- h.preventDefault();
624
- var y = this.getItemCount();
625
- if (!(y <= 0 || !I)) {
626
- var j = Xe(0, !1, {
627
- length: y
628
- }, this.isItemDisabled);
629
- this.setHighlightedIndex(j, {
630
- type: xr
631
- });
632
- }
633
- }
634
- },
635
- End: function(h) {
636
- var f = this.getState(), I = f.isOpen;
637
- if (I) {
638
- h.preventDefault();
639
- var y = this.getItemCount();
640
- if (!(y <= 0 || !I)) {
641
- var j = Xe(y - 1, !0, {
642
- length: y
643
- }, this.isItemDisabled);
644
- this.setHighlightedIndex(j, {
645
- type: br
646
- });
647
- }
648
- }
649
- }
650
- }), t.getToggleButtonProps = function(c) {
651
- var h = c === void 0 ? {} : c, f = h.onClick;
652
- h.onPress;
653
- var I = h.onKeyDown, y = h.onKeyUp, j = h.onBlur, D = be(h, qo), K = t.getState(), M = K.isOpen, w = {
654
- onClick: ue(f, t.buttonHandleClick),
655
- onKeyDown: ue(I, t.buttonHandleKeyDown),
656
- onKeyUp: ue(y, t.buttonHandleKeyUp),
657
- onBlur: ue(j, t.buttonHandleBlur)
658
- }, T = D.disabled ? {} : w;
659
- return F({
660
- type: "button",
661
- role: "button",
662
- "aria-label": M ? "close menu" : "open menu",
663
- "aria-haspopup": !0,
664
- "data-toggle": !0
665
- }, T, D);
666
- }, t.buttonHandleKeyUp = function(c) {
667
- c.preventDefault();
668
- }, t.buttonHandleKeyDown = function(c) {
669
- var h = nt(c);
670
- t.buttonKeyDownHandlers[h] && t.buttonKeyDownHandlers[h].call(mn(t), c);
671
- }, t.buttonHandleClick = function(c) {
672
- if (c.preventDefault(), t.props.environment) {
673
- var h = t.props.environment.document, f = h.body, I = h.activeElement;
674
- f && f === I && c.target.focus();
675
- }
676
- process.env.NODE_ENV === "test" ? t.toggleMenu({
677
- type: Et
678
- }) : t.internalSetTimeout(function() {
679
- return t.toggleMenu({
680
- type: Et
681
- });
682
- });
683
- }, t.buttonHandleBlur = function(c) {
684
- var h = c.target;
685
- t.internalSetTimeout(function() {
686
- if (!(t.isMouseDown || !t.props.environment)) {
687
- var f = t.props.environment.document.activeElement;
688
- (f == null || f.id !== t.inputId) && f !== h && t.reset({
689
- type: Or
690
- });
691
- }
692
- });
693
- }, t.getLabelProps = function(c) {
694
- return F({
695
- htmlFor: t.inputId,
696
- id: t.labelId
697
- }, c);
698
- }, t.getInputProps = function(c) {
699
- var h = c === void 0 ? {} : c, f = h.onKeyDown, I = h.onBlur, y = h.onChange, j = h.onInput;
700
- h.onChangeText;
701
- var D = be(h, Wo), K, M = {};
702
- K = "onChange";
703
- var w = t.getState(), T = w.inputValue, E = w.isOpen, R = w.highlightedIndex;
704
- if (!D.disabled) {
705
- var L;
706
- M = (L = {}, L[K] = ue(y, j, t.inputHandleChange), L.onKeyDown = ue(f, t.inputHandleKeyDown), L.onBlur = ue(I, t.inputHandleBlur), L);
707
- }
708
- return F({
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": D && D["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
- }, M, D);
719
- }, t.inputHandleKeyDown = function(c) {
720
- var h = nt(c);
721
- h && t.inputKeyDownHandlers[h] && t.inputKeyDownHandlers[h].call(mn(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 h = t.props.environment.document.activeElement, f = (h == null || (c = h.dataset) == null ? void 0 : c.toggle) && t._rootNode && t._rootNode.contains(h);
734
- f || t.reset({
735
- type: Er
736
- });
737
- }
738
- });
739
- }, t.menuRef = function(c) {
740
- t._menuNode = c;
741
- }, t.getMenuProps = function(c, h) {
742
- var f, I = c === void 0 ? {} : c, y = I.refKey, j = y === void 0 ? "ref" : y, D = I.ref, K = be(I, Yo), M = h === void 0 ? {} : h, w = M.suppressRefError, T = w === void 0 ? !1 : w;
743
- return t.getMenuProps.called = !0, t.getMenuProps.refKey = j, t.getMenuProps.suppressRefError = T, F((f = {}, f[j] = Ve(D, t.menuRef), f.role = "listbox", f["aria-labelledby"] = K && K["aria-label"] ? void 0 : t.labelId, f.id = t.menuId, f), K);
744
- }, t.getItemProps = function(c) {
745
- var h, f = c === void 0 ? {} : c, I = f.onMouseMove, y = f.onMouseDown, j = f.onClick;
746
- f.onPress;
747
- var D = f.index, K = f.item, M = K === void 0 ? process.env.NODE_ENV === "production" ? (
748
- /* istanbul ignore next */
749
- void 0
750
- ) : Ko("getItemProps", "item") : K, w = be(f, Go);
751
- D === void 0 ? (t.items.push(M), D = t.items.indexOf(M)) : t.items[D] = M;
752
- var T = "onClick", E = j, R = (h = {
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: ue(I, function() {
757
- D !== t.getState().highlightedIndex && (t.setHighlightedIndex(D, {
758
- type: _r
759
- }), t.avoidScrolling = !0, t.internalSetTimeout(function() {
760
- return t.avoidScrolling = !1;
761
- }, 250));
762
- }),
763
- onMouseDown: ue(y, function(B) {
764
- B.preventDefault();
765
- })
766
- }, h[T] = ue(E, function() {
767
- t.selectItemAtIndex(D, {
768
- type: wr
769
- });
770
- }), h), L = w.disabled ? {
771
- onMouseDown: R.onMouseDown
772
- } : R;
773
- return F({
774
- id: t.getItemId(D),
775
- role: "option",
776
- "aria-selected": t.getState().highlightedIndex === D
777
- }, L, w);
778
- }, t.clearItems = function() {
779
- t.items = [];
780
- }, t.reset = function(c, h) {
781
- c === void 0 && (c = {}), c = lt(c), t.internalSetState(function(f) {
782
- var I = f.selectedItem;
783
- return F({
784
- isOpen: t.props.defaultIsOpen,
785
- highlightedIndex: t.props.defaultHighlightedIndex,
786
- inputValue: t.props.itemToString(I)
787
- }, c);
788
- }, h);
789
- }, t.toggleMenu = function(c, h) {
790
- c === void 0 && (c = {}), c = lt(c), t.internalSetState(function(f) {
791
- var I = f.isOpen;
792
- return F({
793
- isOpen: !I
794
- }, I && {
795
- highlightedIndex: t.props.defaultHighlightedIndex
796
- }, c);
797
- }, function() {
798
- var f = t.getState(), I = f.isOpen, y = f.highlightedIndex;
799
- I && t.getItemCount() > 0 && typeof y == "number" && t.setHighlightedIndex(y, c), xn(h)();
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 = Rt(function() {
810
- var c;
811
- if ((c = t.props) != null && (c = c.environment) != null && c.document) {
812
- var h = t.getState(), f = t.items[h.highlightedIndex], I = t.getItemCount(), y = t.props.getA11yStatusMessage(F({
813
- itemToString: t.props.itemToString,
814
- previousResultCount: t.previousResultCount,
815
- resultCount: I,
816
- highlightedItem: f
817
- }, h));
818
- t.previousResultCount = I, Mt(y, t.props.environment.document);
819
- }
820
- }, 200);
821
- var s = t.props, a = s.defaultHighlightedIndex, u = s.initialHighlightedIndex, d = u === void 0 ? a : u, l = s.defaultIsOpen, p = s.initialIsOpen, b = p === void 0 ? l : p, _ = s.initialInputValue, v = _ === void 0 ? "" : _, C = s.initialSelectedItem, g = C === void 0 ? null : C, P = t.getState({
822
- highlightedIndex: d,
823
- isOpen: b,
824
- inputValue: v,
825
- selectedItem: g
826
- });
827
- return P.selectedItem != null && t.props.initialInputValue === void 0 && (P.inputValue = t.props.itemToString(P.selectedItem)), t.state = P, 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 a = this.getItemCount(), u = this.getState(), d = u.highlightedIndex;
848
- if (a > 0) {
849
- var l = Le(d, t, {
850
- length: a
851
- }, this.isItemDisabled, !0);
852
- this.setHighlightedIndex(l, s);
853
- }
854
- }, o.getStateAndHelpers = function() {
855
- var t = this.getState(), s = t.highlightedIndex, a = t.inputValue, u = t.selectedItem, d = t.isOpen, l = this.props.itemToString, p = this.id, b = this.getRootProps, _ = this.getToggleButtonProps, v = this.getLabelProps, C = this.getMenuProps, g = this.getInputProps, P = this.getItemProps, c = this.openMenu, h = this.closeMenu, f = this.toggleMenu, I = this.selectItem, y = this.selectItemAtIndex, j = this.selectHighlightedItem, D = this.setHighlightedIndex, K = this.clearSelection, M = 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: C,
862
- getInputProps: g,
863
- getItemProps: P,
864
- // actions
865
- reset: w,
866
- openMenu: c,
867
- closeMenu: h,
868
- toggleMenu: f,
869
- selectItem: I,
870
- selectItemAtIndex: y,
871
- selectHighlightedItem: j,
872
- setHighlightedIndex: D,
873
- clearSelection: K,
874
- clearItems: M,
875
- setItemCount: T,
876
- unsetItemCount: E,
877
- setState: R,
878
- // props
879
- itemToString: l,
880
- // derived
881
- id: p,
882
- // state
883
- highlightedIndex: s,
884
- inputValue: a,
885
- isOpen: d,
886
- selectedItem: u
887
- };
888
- }, o.componentDidMount = function() {
889
- var t = this;
890
- if (process.env.NODE_ENV !== "production" && this.getMenuProps.called && !this.getMenuProps.suppressRefError && En(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
- }, a = function(_) {
898
- t.isMouseDown = !1;
899
- var v = mt(_.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
- }, u = function() {
906
- t.isTouchMove = !1;
907
- }, d = function() {
908
- t.isTouchMove = !0;
909
- }, l = function(_) {
910
- var v = mt(_.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
- }, p = this.props.environment;
917
- p.addEventListener("mousedown", s), p.addEventListener("mouseup", a), p.addEventListener("touchstart", u), p.addEventListener("touchmove", d), p.addEventListener("touchend", l), this.cleanup = function() {
918
- t.internalClearTimeouts(), t.updateStatus.cancel(), p.removeEventListener("mousedown", s), p.removeEventListener("mouseup", a), p.removeEventListener("touchstart", u), p.removeEventListener("touchmove", d), p.removeEventListener("touchend", l);
919
- };
920
- }
921
- }, o.shouldScroll = function(t, s) {
922
- var a = this.props.highlightedIndex === void 0 ? this.getState() : this.props, u = a.highlightedIndex, d = s.highlightedIndex === void 0 ? t : s, l = d.highlightedIndex, p = u && this.getState().isOpen && !t.isOpen, b = u !== l;
923
- return p || 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 && En(this._menuNode, this.getMenuProps)), ht(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 = wn(this.props.children, xe);
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 = wn(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 && Xo(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: xe,
953
- onInputValueChange: xe,
954
- onUserAction: xe,
955
- onChange: xe,
956
- onSelect: xe,
957
- onOuterClick: xe,
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" && (Jo.propTypes = {
973
- children: x.func,
974
- defaultHighlightedIndex: x.number,
975
- defaultIsOpen: x.bool,
976
- initialHighlightedIndex: x.number,
977
- initialSelectedItem: x.any,
978
- initialInputValue: x.string,
979
- initialIsOpen: x.bool,
980
- getA11yStatusMessage: x.func,
981
- itemToString: x.func,
982
- onChange: x.func,
983
- onSelect: x.func,
984
- onStateChange: x.func,
985
- onInputValueChange: x.func,
986
- onUserAction: x.func,
987
- onOuterClick: x.func,
988
- selectedItemChanged: x.func,
989
- stateReducer: x.func,
990
- itemCount: x.number,
991
- id: x.string,
992
- environment: x.shape({
993
- addEventListener: x.func.isRequired,
994
- removeEventListener: x.func.isRequired,
995
- document: x.shape({
996
- createElement: x.func.isRequired,
997
- getElementById: x.func.isRequired,
998
- activeElement: x.any.isRequired,
999
- body: x.any.isRequired
1000
- }).isRequired,
1001
- Node: x.func.isRequired
1002
- }),
1003
- suppressRefError: x.bool,
1004
- scrollIntoView: x.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: x.any,
1009
- isOpen: x.bool,
1010
- inputValue: x.string,
1011
- highlightedIndex: x.number,
1012
- labelId: x.string,
1013
- inputId: x.string,
1014
- menuId: x.string,
1015
- getItemId: x.func
1016
- /* eslint-enable react/no-unused-prop-types */
1017
- });
1018
- function En(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 Xo(e, n) {
1023
- var r = n.refKey, o = r !== "ref", i = !fr(e);
1024
- i && !o && !_n.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 + '"'), !_n.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(F({
1037
- type: i
1038
- }, t));
1039
- }
1040
- function ei(e, n, r, o) {
1041
- var i = n.props, t = n.type, s = "on" + Tt(e) + "Change";
1042
- i[s] && o[e] !== void 0 && o[e] !== r[e] && i[s](F({
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 = Rt(function(e, n) {
1054
- Mt(e(), n);
1055
- }, 200), oi = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u" ? Dt : ce, ii = "useId" in ft ? function(n) {
1056
- var r = n.id, o = n.labelId, i = n.menuId, t = n.getItemId, s = n.toggleButtonId, a = n.inputId, u = "downshift-" + ft.useId();
1057
- r || (r = u);
1058
- var d = J({
1059
- labelId: o || r + "-label",
1060
- menuId: i || r + "-menu",
1061
- getItemId: t || function(l) {
1062
- return r + "-item-" + l;
1063
- },
1064
- toggleButtonId: s || r + "-toggle-button",
1065
- inputId: a || r + "-input"
1066
- });
1067
- return d.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, a = n.toggleButtonId, u = n.inputId, d = J({
1070
- labelId: i || o + "-label",
1071
- menuId: t || o + "-menu",
1072
- getItemId: s || function(l) {
1073
- return o + "-item-" + l;
1074
- },
1075
- toggleButtonId: a || o + "-toggle-button",
1076
- inputId: u || o + "-input"
1077
- });
1078
- return d.current;
1079
- };
1080
- function Rr(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 Tt(e) {
1091
- return "" + e.slice(0, 1).toUpperCase() + e.slice(1);
1092
- }
1093
- function At(e) {
1094
- var n = J(e);
1095
- return n.current = e, n;
1096
- }
1097
- function Pr(e, n, r, o) {
1098
- var i = J(), t = J(), s = ae(function(_, v) {
1099
- t.current = v, _ = tt(_, v.props);
1100
- var C = e(_, v), g = v.props.stateReducer(_, F({}, v, {
1101
- changes: C
1102
- }));
1103
- return g;
1104
- }, [e]), a = bo(s, n, r), u = a[0], d = a[1], l = At(n), p = ae(function(_) {
1105
- return d(F({
1106
- props: l.current
1107
- }, _));
1108
- }, [l]), b = t.current;
1109
- return ce(function() {
1110
- var _ = tt(i.current, b == null ? void 0 : b.props), v = b && i.current && !o(_, u);
1111
- v && Zo(b, _, u), i.current = u;
1112
- }, [u, b, o]), [u, p];
1113
- }
1114
- function si(e, n, r, o) {
1115
- var i = Pr(e, n, r, o), t = i[0], s = i[1];
1116
- return [tt(t, n), s];
1117
- }
1118
- var Ue = {
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 Oe(e, n, r) {
1134
- r === void 0 && (r = kr);
1135
- var o = e["default" + Tt(n)];
1136
- return o !== void 0 ? o : r[n];
1137
- }
1138
- function qe(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" + Tt(n)];
1144
- return i !== void 0 ? i : Oe(e, n, r);
1145
- }
1146
- function ai(e) {
1147
- var n = qe(e, "selectedItem"), r = qe(e, "isOpen"), o = qe(e, "highlightedIndex"), i = qe(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, a = n.selectedItem, u = n.highlightedIndex;
1159
- return o.length === 0 ? -1 : i !== void 0 && u === i ? i : t !== void 0 ? t : a ? o.findIndex(function(d) {
1160
- return s(a) === s(d);
1161
- }) : r === 0 ? -1 : r < 0 ? o.length - 1 : 0;
1162
- }
1163
- function li(e, n, r) {
1164
- var o = J({
1165
- isMouseDown: !1,
1166
- isTouchMove: !1,
1167
- isTouchEnd: !1
1168
- });
1169
- return ce(function() {
1170
- if (!e)
1171
- return xe;
1172
- var i = n.map(function(l) {
1173
- return l.current;
1174
- });
1175
- function t() {
1176
- o.current.isTouchEnd = !1, o.current.isMouseDown = !0;
1177
- }
1178
- function s(l) {
1179
- o.current.isMouseDown = !1, mt(l.target, i, e) || r();
1180
- }
1181
- function a() {
1182
- o.current.isTouchEnd = !1, o.current.isTouchMove = !1;
1183
- }
1184
- function u() {
1185
- o.current.isTouchMove = !0;
1186
- }
1187
- function d(l) {
1188
- o.current.isTouchEnd = !0, !o.current.isTouchMove && !mt(l.target, i, e, !1) && r();
1189
- }
1190
- return e.addEventListener("mousedown", t), e.addEventListener("mouseup", s), e.addEventListener("touchstart", a), e.addEventListener("touchmove", u), e.addEventListener("touchend", d), function() {
1191
- e.removeEventListener("mousedown", t), e.removeEventListener("mouseup", s), e.removeEventListener("touchstart", a), e.removeEventListener("touchmove", u), e.removeEventListener("touchend", d);
1192
- };
1193
- }, [e, r]), o.current;
1194
- }
1195
- var Ht = function() {
1196
- return xe;
1197
- };
1198
- process.env.NODE_ENV !== "production" && (Ht = function() {
1199
- for (var n = J(!0), r = arguments.length, o = new Array(r), i = 0; i < r; i++)
1200
- o[i] = arguments[i];
1201
- var t = J(o.reduce(function(a, u) {
1202
- return a[u] = {}, a;
1203
- }, {}));
1204
- ce(function() {
1205
- Object.keys(t.current).forEach(function(a) {
1206
- var u = t.current[a];
1207
- if (n.current && !Object.keys(u).length) {
1208
- console.error("downshift: You forgot to call the " + a + " getter function on your component / element.");
1209
- return;
1210
- }
1211
- var d = u.suppressRefError, l = u.refKey, p = u.elementRef;
1212
- (!p || !p.current) && !d && console.error('downshift: The ref prop "' + l + '" from ' + a + " was not applied correctly on your element.");
1213
- }), n.current = !1;
1214
- });
1215
- var s = ae(function(a, u, d, l) {
1216
- t.current[a] = {
1217
- suppressRefError: u,
1218
- refKey: d,
1219
- elementRef: l
1220
- };
1221
- }, []);
1222
- return s;
1223
- });
1224
- function Cn(e, n, r) {
1225
- var o = r.highlightedIndex, i = r.items, t = r.environment, s = be(r, Qo), a = rt();
1226
- ce(function() {
1227
- a || !(t != null && t.document) || ri(function() {
1228
- return e(F({
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, a = J(!0);
1238
- return oi(function() {
1239
- n < 0 || !r || !Object.keys(o.current).length || (a.current === !1 ? a.current = !0 : s(i(n), t));
1240
- }, [n]), a;
1241
- }
1242
- var jt = xe;
1243
- process.env.NODE_ENV !== "production" && (jt = function(n) {
1244
- var r = n.props, o = n.state, i = J(r), t = rt();
1245
- ce(function() {
1246
- t || (Pt(o, i.current, r), i.current = r);
1247
- }, [o, r, t]);
1248
- });
1249
- function Sn(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 F({
1254
- isOpen: !1,
1255
- highlightedIndex: -1
1256
- }, i && F({
1257
- selectedItem: e.items[n],
1258
- isOpen: Oe(e, "isOpen"),
1259
- highlightedIndex: Oe(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 = ft.useRef(!0);
1269
- return ft.useEffect(function() {
1270
- return e.current = !1, function() {
1271
- e.current = !0;
1272
- };
1273
- }, []), e.current;
1274
- }
1275
- var Mr = {
1276
- environment: x.shape({
1277
- addEventListener: x.func.isRequired,
1278
- removeEventListener: x.func.isRequired,
1279
- document: x.shape({
1280
- createElement: x.func.isRequired,
1281
- getElementById: x.func.isRequired,
1282
- activeElement: x.any.isRequired,
1283
- body: x.any.isRequired
1284
- }).isRequired,
1285
- Node: x.func.isRequired
1286
- }),
1287
- itemToString: x.func,
1288
- itemToKey: x.func,
1289
- stateReducer: x.func
1290
- }, Tr = F({}, Mr, {
1291
- getA11yStatusMessage: x.func,
1292
- highlightedIndex: x.number,
1293
- defaultHighlightedIndex: x.number,
1294
- initialHighlightedIndex: x.number,
1295
- isOpen: x.bool,
1296
- defaultIsOpen: x.bool,
1297
- initialIsOpen: x.bool,
1298
- selectedItem: x.any,
1299
- initialSelectedItem: x.any,
1300
- defaultSelectedItem: x.any,
1301
- id: x.string,
1302
- labelId: x.string,
1303
- menuId: x.string,
1304
- getItemId: x.func,
1305
- toggleButtonId: x.string,
1306
- onSelectedItemChange: x.func,
1307
- onHighlightedIndexChange: x.func,
1308
- onStateChange: x.func,
1309
- onIsOpenChange: x.func,
1310
- scrollIntoView: x.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: Oe(i, "highlightedIndex"),
1356
- isOpen: Oe(i, "isOpen"),
1357
- selectedItem: Oe(i, "selectedItem"),
1358
- inputValue: Oe(i, "inputValue")
1359
- };
1360
- break;
1361
- default:
1362
- throw new Error("Reducer called without proper action type.");
1363
- }
1364
- return F({}, e, t);
1365
- }
1366
- Je(Je({}, Tr), { items: x.array.isRequired, isItemDisabled: x.func, getA11ySelectionMessage: x.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
- Je(Je({}, Ue), { 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 Vt = process.env.NODE_ENV !== "production" ? "__input_keydown_arrow_down__" : 0, $t = process.env.NODE_ENV !== "production" ? "__input_keydown_arrow_up__" : 1, Kt = process.env.NODE_ENV !== "production" ? "__input_keydown_escape__" : 2, Ft = process.env.NODE_ENV !== "production" ? "__input_keydown_home__" : 3, Lt = process.env.NODE_ENV !== "production" ? "__input_keydown_end__" : 4, Bt = process.env.NODE_ENV !== "production" ? "__input_keydown_page_up__" : 5, zt = process.env.NODE_ENV !== "production" ? "__input_keydown_page_down__" : 6, Ut = process.env.NODE_ENV !== "production" ? "__input_keydown_enter__" : 7, qt = process.env.NODE_ENV !== "production" ? "__input_change__" : 8, gt = process.env.NODE_ENV !== "production" ? "__input_blur__" : 9, Wt = process.env.NODE_ENV !== "production" ? "__input_click__" : 10, Ar = process.env.NODE_ENV !== "production" ? "__menu_mouse_leave__" : 11, Hr = process.env.NODE_ENV !== "production" ? "__item_mouse_move__" : 12, Yt = 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, Gt = 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, Jt = process.env.NODE_ENV !== "production" ? "__controlled_prop_updated_selected_item__" : 22, zr = /* @__PURE__ */ Object.freeze({
1398
- __proto__: null,
1399
- InputKeyDownArrowDown: Vt,
1400
- InputKeyDownArrowUp: $t,
1401
- InputKeyDownEscape: Kt,
1402
- InputKeyDownHome: Ft,
1403
- InputKeyDownEnd: Lt,
1404
- InputKeyDownPageUp: Bt,
1405
- InputKeyDownPageDown: zt,
1406
- InputKeyDownEnter: Ut,
1407
- InputChange: qt,
1408
- InputBlur: gt,
1409
- InputClick: Wt,
1410
- MenuMouseLeave: Ar,
1411
- ItemMouseMove: Hr,
1412
- ItemClick: Yt,
1413
- ToggleButtonClick: jr,
1414
- FunctionToggleMenu: Vr,
1415
- FunctionOpenMenu: $r,
1416
- FunctionCloseMenu: Kr,
1417
- FunctionSetHighlightedIndex: Fr,
1418
- FunctionSelectItem: Gt,
1419
- FunctionSetInputValue: Lr,
1420
- FunctionReset: Br,
1421
- ControlledPropUpdatedSelectedItem: Jt
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)), F({}, n, {
1426
- inputValue: o
1427
- });
1428
- }
1429
- var hi = F({}, Tr, {
1430
- items: x.array.isRequired,
1431
- isItemDisabled: x.func,
1432
- selectedItemChanged: x.func,
1433
- getA11ySelectionMessage: x.func,
1434
- inputValue: x.string,
1435
- defaultInputValue: x.string,
1436
- initialInputValue: x.string,
1437
- inputId: x.string,
1438
- onInputValueChange: x.func
1439
- });
1440
- function mi(e, n, r, o) {
1441
- var i = J(), t = Pr(e, n, r, o), s = t[0], a = t[1], u = rt();
1442
- return ce(function() {
1443
- if (ht(n, "selectedItem")) {
1444
- if (!u) {
1445
- var d;
1446
- n.selectedItemChanged === void 0 ? d = 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'), d = n.selectedItemChanged(i.current, n.selectedItem)), d && a({
1447
- type: Jt,
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), a];
1454
- }
1455
- var Ur = xe;
1456
- process.env.NODE_ENV !== "production" && (Ur = function(n, r) {
1457
- x.checkPropTypes(hi, n, "prop", r.name);
1458
- });
1459
- var gi = F({}, Ue, {
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 Yt:
1469
- s = {
1470
- isOpen: Oe(i, "isOpen"),
1471
- highlightedIndex: Oe(i, "highlightedIndex"),
1472
- selectedItem: i.items[n.index],
1473
- inputValue: i.itemToString(i.items[n.index])
1474
- };
1475
- break;
1476
- case Vt:
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 $t:
1485
- e.isOpen ? t ? s = Sn(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 Ut:
1493
- s = Sn(i, e.highlightedIndex);
1494
- break;
1495
- case Kt:
1496
- s = F({
1497
- isOpen: !1,
1498
- highlightedIndex: -1
1499
- }, !e.isOpen && {
1500
- selectedItem: null,
1501
- inputValue: ""
1502
- });
1503
- break;
1504
- case Bt:
1505
- s = {
1506
- highlightedIndex: Le(e.highlightedIndex, -10, i.items, i.isItemDisabled, !0)
1507
- };
1508
- break;
1509
- case zt:
1510
- s = {
1511
- highlightedIndex: Le(e.highlightedIndex, 10, i.items, i.isItemDisabled, !0)
1512
- };
1513
- break;
1514
- case Ft:
1515
- s = {
1516
- highlightedIndex: Xe(0, !1, i.items, i.isItemDisabled)
1517
- };
1518
- break;
1519
- case Lt:
1520
- s = {
1521
- highlightedIndex: Xe(i.items.length - 1, !0, i.items, i.isItemDisabled)
1522
- };
1523
- break;
1524
- case gt:
1525
- s = F({
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: Oe(i, "highlightedIndex"),
1537
- inputValue: n.inputValue
1538
- };
1539
- break;
1540
- case Wt:
1541
- s = {
1542
- isOpen: !e.isOpen,
1543
- highlightedIndex: e.isOpen ? -1 : et(i, e, 0)
1544
- };
1545
- break;
1546
- case Gt:
1547
- s = {
1548
- selectedItem: n.selectedItem,
1549
- inputValue: i.itemToString(n.selectedItem)
1550
- };
1551
- break;
1552
- case Jt:
1553
- s = {
1554
- inputValue: n.inputValue
1555
- };
1556
- break;
1557
- default:
1558
- return ci(e, n, zr);
1559
- }
1560
- return F({}, 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
- ye.stateChangeTypes = zr;
1564
- function ye(e) {
1565
- e === void 0 && (e = {}), Ur(e, ye);
1566
- var n = F({}, gi, e), r = n.items, o = n.scrollIntoView, i = n.environment, t = n.getA11yStatusMessage, s = n.getA11ySelectionMessage, a = n.itemToString, u = mi(vi, n, fi, di), d = u[0], l = u[1], p = d.isOpen, b = d.highlightedIndex, _ = d.selectedItem, v = d.inputValue, C = J(null), g = J({}), P = J(null), c = J(null), h = rt(), f = ii(n), I = J(), y = At({
1567
- state: d,
1568
- props: n
1569
- }), j = ae(function(S) {
1570
- return g.current[f.getItemId(S)];
1571
- }, [f]);
1572
- Cn(t, [p, b, v, r], F({
1573
- previousResultCount: I.current,
1574
- items: r,
1575
- environment: i,
1576
- itemToString: a
1577
- }, d)), Cn(s, [_], F({
1578
- previousResultCount: I.current,
1579
- items: r,
1580
- environment: i,
1581
- itemToString: a
1582
- }, d));
1583
- var D = ui({
1584
- menuElement: C.current,
1585
- highlightedIndex: b,
1586
- isOpen: p,
1587
- itemRefs: g,
1588
- scrollIntoView: o,
1589
- getItemNodeFromIndex: j
1590
- });
1591
- jt({
1592
- props: n,
1593
- state: d
1594
- }), ce(function() {
1595
- var S = qe(n, "isOpen");
1596
- S && P.current && P.current.focus();
1597
- }, []), ce(function() {
1598
- h || (I.current = r.length);
1599
- });
1600
- var K = li(i, [c, C, P], ae(function() {
1601
- y.current.state.isOpen && l({
1602
- type: gt,
1603
- selectItem: !1
1604
- });
1605
- }, [l, y])), M = Ht("getInputProps", "getMenuProps");
1606
- ce(function() {
1607
- p || (g.current = {});
1608
- }, [p]), ce(function() {
1609
- var S;
1610
- !p || !(i != null && i.document) || !(P != null && (S = P.current) != null && S.focus) || i.document.activeElement !== P.current && P.current.focus();
1611
- }, [p, i]);
1612
- var w = $e(function() {
1613
- return {
1614
- ArrowDown: function(O) {
1615
- O.preventDefault(), l({
1616
- type: Vt,
1617
- altKey: O.altKey
1618
- });
1619
- },
1620
- ArrowUp: function(O) {
1621
- O.preventDefault(), l({
1622
- type: $t,
1623
- altKey: O.altKey
1624
- });
1625
- },
1626
- Home: function(O) {
1627
- y.current.state.isOpen && (O.preventDefault(), l({
1628
- type: Ft
1629
- }));
1630
- },
1631
- End: function(O) {
1632
- y.current.state.isOpen && (O.preventDefault(), l({
1633
- type: Lt
1634
- }));
1635
- },
1636
- Escape: function(O) {
1637
- var H = y.current.state;
1638
- (H.isOpen || H.inputValue || H.selectedItem || H.highlightedIndex > -1) && (O.preventDefault(), l({
1639
- type: Kt
1640
- }));
1641
- },
1642
- Enter: function(O) {
1643
- var H = y.current.state;
1644
- !H.isOpen || O.which === 229 || (O.preventDefault(), l({
1645
- type: Ut
1646
- }));
1647
- },
1648
- PageUp: function(O) {
1649
- y.current.state.isOpen && (O.preventDefault(), l({
1650
- type: Bt
1651
- }));
1652
- },
1653
- PageDown: function(O) {
1654
- y.current.state.isOpen && (O.preventDefault(), l({
1655
- type: zt
1656
- }));
1657
- }
1658
- };
1659
- }, [l, y]), T = ae(function(S) {
1660
- return F({
1661
- id: f.labelId,
1662
- htmlFor: f.inputId
1663
- }, S);
1664
- }, [f]), E = ae(function(S, O) {
1665
- var H, $ = S === void 0 ? {} : S, te = $.onMouseLeave, Z = $.refKey, U = Z === void 0 ? "ref" : Z, A = $.ref, q = be($, _i), ee = O === void 0 ? {} : O, N = ee.suppressRefError, W = N === void 0 ? !1 : N;
1666
- return M("getMenuProps", W, U, C), F((H = {}, H[U] = Ve(A, function(fe) {
1667
- C.current = fe;
1668
- }), H.id = f.menuId, H.role = "listbox", H["aria-labelledby"] = q && q["aria-label"] ? void 0 : "" + f.labelId, H.onMouseLeave = ue(te, function() {
1669
- l({
1670
- type: Ar
1671
- });
1672
- }), H), q);
1673
- }, [l, M, f]), R = ae(function(S) {
1674
- var O, H, $ = S === void 0 ? {} : S, te = $.item, Z = $.index, U = $.refKey, A = U === void 0 ? "ref" : U, q = $.ref, ee = $.onMouseMove, N = $.onMouseDown, W = $.onClick;
1675
- $.onPress;
1676
- var fe = $.disabled, _e = be($, Ii);
1677
- fe !== void 0 && console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useCombobox.');
1678
- var Te = y.current, Ke = Te.props, Ce = Te.state, le = Rr(te, Z, Ke.items, "Pass either item or index to getItemProps!"), he = le[0], Ie = le[1], Ze = Ke.isItemDisabled(he, Ie), It = "onClick", st = W, Ae = function() {
1679
- K.isTouchEnd || Ie === Ce.highlightedIndex || (D.current = !1, l({
1680
- type: Hr,
1681
- index: Ie,
1682
- disabled: Ze
1683
- }));
1684
- }, Fe = function() {
1685
- l({
1686
- type: Yt,
1687
- index: Ie
1688
- });
1689
- }, He = function(ho) {
1690
- return ho.preventDefault();
1691
- };
1692
- return F((O = {}, O[A] = Ve(q, function(Se) {
1693
- Se && (g.current[f.getItemId(Ie)] = Se);
1694
- }), O["aria-disabled"] = Ze, O["aria-selected"] = "" + (Ie === Ce.highlightedIndex), O.id = f.getItemId(Ie), O.role = "option", O), !Ze && (H = {}, H[It] = ue(st, Fe), H), {
1695
- onMouseMove: ue(ee, Ae),
1696
- onMouseDown: ue(N, He)
1697
- }, _e);
1698
- }, [l, f, y, K, D]), L = ae(function(S) {
1699
- var O, H = S === void 0 ? {} : S, $ = H.onClick;
1700
- H.onPress;
1701
- var te = H.refKey, Z = te === void 0 ? "ref" : te, U = H.ref, A = be(H, yi), q = y.current.state, ee = function() {
1702
- l({
1703
- type: jr
1704
- });
1705
- };
1706
- return F((O = {}, O[Z] = Ve(U, function(N) {
1707
- c.current = N;
1708
- }), O["aria-controls"] = f.menuId, O["aria-expanded"] = q.isOpen, O.id = f.toggleButtonId, O.tabIndex = -1, O), !A.disabled && F({}, {
1709
- onClick: ue($, ee)
1710
- }), A);
1711
- }, [l, y, f]), B = ae(function(S, O) {
1712
- var H, $ = S === void 0 ? {} : S, te = $.onKeyDown, Z = $.onChange, U = $.onInput, A = $.onBlur;
1713
- $.onChangeText;
1714
- var q = $.onClick, ee = $.refKey, N = ee === void 0 ? "ref" : ee, W = $.ref, fe = be($, xi), _e = O === void 0 ? {} : O, Te = _e.suppressRefError, Ke = Te === void 0 ? !1 : Te;
1715
- M("getInputProps", Ke, N, P);
1716
- var Ce = y.current.state, le = function(He) {
1717
- var Se = nt(He);
1718
- Se && w[Se] && w[Se](He);
1719
- }, he = function(He) {
1720
- l({
1721
- type: qt,
1722
- inputValue: He.target.value
1723
- });
1724
- }, Ie = function(He) {
1725
- if (i != null && i.document && Ce.isOpen && !K.isMouseDown) {
1726
- var Se = He.relatedTarget === null && i.document.activeElement !== i.document.body;
1727
- l({
1728
- type: gt,
1729
- selectItem: !Se
1730
- });
1731
- }
1732
- }, Ze = function() {
1733
- l({
1734
- type: Wt
1735
- });
1736
- }, It = "onChange", st = {};
1737
- if (!fe.disabled) {
1738
- var Ae;
1739
- st = (Ae = {}, Ae[It] = ue(Z, U, he), Ae.onKeyDown = ue(te, le), Ae.onBlur = ue(A, Ie), Ae.onClick = ue(q, Ze), Ae);
1740
- }
1741
- return F((H = {}, H[N] = Ve(W, function(Fe) {
1742
- P.current = Fe;
1743
- }), H["aria-activedescendant"] = Ce.isOpen && Ce.highlightedIndex > -1 ? f.getItemId(Ce.highlightedIndex) : "", H["aria-autocomplete"] = "list", H["aria-controls"] = f.menuId, H["aria-expanded"] = Ce.isOpen, H["aria-labelledby"] = fe && fe["aria-label"] ? void 0 : f.labelId, H.autoComplete = "off", H.id = f.inputId, H.role = "combobox", H.value = Ce.inputValue, H), st, fe);
1744
- }, [l, f, i, w, y, K, M]), k = ae(function() {
1745
- l({
1746
- type: Vr
1747
- });
1748
- }, [l]), X = ae(function() {
1749
- l({
1750
- type: Kr
1751
- });
1752
- }, [l]), Q = ae(function() {
1753
- l({
1754
- type: $r
1755
- });
1756
- }, [l]), z = ae(function(S) {
1757
- l({
1758
- type: Fr,
1759
- highlightedIndex: S
1760
- });
1761
- }, [l]), G = ae(function(S) {
1762
- l({
1763
- type: Gt,
1764
- selectedItem: S
1765
- });
1766
- }, [l]), oe = ae(function(S) {
1767
- l({
1768
- type: Lr,
1769
- inputValue: S
1770
- });
1771
- }, [l]), V = ae(function() {
1772
- l({
1773
- type: Br
1774
- });
1775
- }, [l]);
1776
- return {
1777
- // prop getters.
1778
- getItemProps: R,
1779
- getLabelProps: T,
1780
- getMenuProps: E,
1781
- getInputProps: B,
1782
- getToggleButtonProps: L,
1783
- // actions.
1784
- toggleMenu: k,
1785
- openMenu: Q,
1786
- closeMenu: X,
1787
- setHighlightedIndex: z,
1788
- setInputValue: oe,
1789
- selectItem: G,
1790
- reset: V,
1791
- // state.
1792
- highlightedIndex: b,
1793
- isOpen: p,
1794
- selectedItem: _,
1795
- inputValue: v
1796
- };
1797
- }
1798
- var qr = {
1799
- activeIndex: -1,
1800
- selectedItems: []
1801
- };
1802
- function On(e, n) {
1803
- return qe(e, n, qr);
1804
- }
1805
- function Nn(e, n) {
1806
- return Oe(e, n, qr);
1807
- }
1808
- function bi(e) {
1809
- var n = On(e, "activeIndex"), r = On(e, "selectedItems");
1810
- return {
1811
- activeIndex: n,
1812
- selectedItems: r
1813
- };
1814
- }
1815
- function Dn(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 = F({}, Mr, {
1832
- selectedItems: x.array,
1833
- initialSelectedItems: x.array,
1834
- defaultSelectedItems: x.array,
1835
- getA11yRemovalMessage: x.func,
1836
- activeIndex: x.number,
1837
- initialActiveIndex: x.number,
1838
- defaultActiveIndex: x.number,
1839
- onActiveIndexChange: x.func,
1840
- onSelectedItemsChange: x.func,
1841
- keyNavigationNext: x.string,
1842
- keyNavigationPrevious: x.string
1843
- }), Si = {
1844
- itemToString: Ue.itemToString,
1845
- itemToKey: Ue.itemToKey,
1846
- stateReducer: Ue.stateReducer,
1847
- environment: Ue.environment,
1848
- getA11yRemovalMessage: wi,
1849
- keyNavigationNext: "ArrowRight",
1850
- keyNavigationPrevious: "ArrowLeft"
1851
- }, Wr = xe;
1852
- process.env.NODE_ENV !== "production" && (Wr = function(n, r) {
1853
- x.checkPropTypes(Ci, n, "prop", r.name);
1854
- });
1855
- var Xt = process.env.NODE_ENV !== "production" ? "__selected_item_click__" : 0, Qt = process.env.NODE_ENV !== "production" ? "__selected_item_keydown_delete__" : 1, Zt = process.env.NODE_ENV !== "production" ? "__selected_item_keydown_backspace__" : 2, en = process.env.NODE_ENV !== "production" ? "__selected_item_keydown_navigation_next__" : 3, tn = process.env.NODE_ENV !== "production" ? "__selected_item_keydown_navigation_previous__" : 4, nn = process.env.NODE_ENV !== "production" ? "__dropdown_keydown_navigation_previous__" : 5, rn = process.env.NODE_ENV !== "production" ? "__dropdown_keydown_backspace__" : 6, on = process.env.NODE_ENV !== "production" ? "__dropdown_click__" : 7, sn = process.env.NODE_ENV !== "production" ? "__function_add_selected_item__" : 8, an = process.env.NODE_ENV !== "production" ? "__function_remove_selected_item__" : 9, ln = process.env.NODE_ENV !== "production" ? "__function_set_selected_items__" : 10, un = process.env.NODE_ENV !== "production" ? "__function_set_active_index__" : 11, dn = process.env.NODE_ENV !== "production" ? "__function_reset__" : 12, Oi = /* @__PURE__ */ Object.freeze({
1856
- __proto__: null,
1857
- SelectedItemClick: Xt,
1858
- SelectedItemKeyDownDelete: Qt,
1859
- SelectedItemKeyDownBackspace: Zt,
1860
- SelectedItemKeyDownNavigationNext: en,
1861
- SelectedItemKeyDownNavigationPrevious: tn,
1862
- DropdownKeyDownNavigationPrevious: nn,
1863
- DropdownKeyDownBackspace: rn,
1864
- DropdownClick: on,
1865
- FunctionAddSelectedItem: sn,
1866
- FunctionRemoveSelectedItem: an,
1867
- FunctionSetSelectedItems: ln,
1868
- FunctionSetActiveIndex: un,
1869
- FunctionReset: dn
1870
- });
1871
- function Ni(e, n) {
1872
- var r = n.type, o = n.index, i = n.props, t = n.selectedItem, s = e.activeIndex, a = e.selectedItems, u;
1873
- switch (r) {
1874
- case Xt:
1875
- u = {
1876
- activeIndex: o
1877
- };
1878
- break;
1879
- case tn:
1880
- u = {
1881
- activeIndex: s - 1 < 0 ? 0 : s - 1
1882
- };
1883
- break;
1884
- case en:
1885
- u = {
1886
- activeIndex: s + 1 >= a.length ? -1 : s + 1
1887
- };
1888
- break;
1889
- case Zt:
1890
- case Qt: {
1891
- if (s < 0)
1892
- break;
1893
- var d = s;
1894
- a.length === 1 ? d = -1 : s === a.length - 1 && (d = a.length - 2), u = F({
1895
- selectedItems: [].concat(a.slice(0, s), a.slice(s + 1))
1896
- }, {
1897
- activeIndex: d
1898
- });
1899
- break;
1900
- }
1901
- case nn:
1902
- u = {
1903
- activeIndex: a.length - 1
1904
- };
1905
- break;
1906
- case rn:
1907
- u = {
1908
- selectedItems: a.slice(0, a.length - 1)
1909
- };
1910
- break;
1911
- case sn:
1912
- u = {
1913
- selectedItems: [].concat(a, [t])
1914
- };
1915
- break;
1916
- case on:
1917
- u = {
1918
- activeIndex: -1
1919
- };
1920
- break;
1921
- case an: {
1922
- var l = s, p = a.findIndex(function(v) {
1923
- return i.itemToKey(v) === i.itemToKey(t);
1924
- });
1925
- if (p < 0)
1926
- break;
1927
- a.length === 1 ? l = -1 : p === a.length - 1 && (l = a.length - 2), u = {
1928
- selectedItems: [].concat(a.slice(0, p), a.slice(p + 1)),
1929
- activeIndex: l
1930
- };
1931
- break;
1932
- }
1933
- case ln: {
1934
- var b = n.selectedItems;
1935
- u = {
1936
- selectedItems: b
1937
- };
1938
- break;
1939
- }
1940
- case un: {
1941
- var _ = n.activeIndex;
1942
- u = {
1943
- activeIndex: _
1944
- };
1945
- break;
1946
- }
1947
- case dn:
1948
- u = {
1949
- activeIndex: Nn(i, "activeIndex"),
1950
- selectedItems: Nn(i, "selectedItems")
1951
- };
1952
- break;
1953
- default:
1954
- throw new Error("Reducer called without proper action type.");
1955
- }
1956
- return F({}, e, u);
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 = F({}, Si, e), r = n.getA11yRemovalMessage, o = n.itemToString, i = n.environment, t = n.keyNavigationNext, s = n.keyNavigationPrevious, a = si(Ni, n, bi, Ei), u = a[0], d = a[1], l = u.activeIndex, p = u.selectedItems, b = rt(), _ = J(null), v = J(p), C = J();
1963
- C.current = [];
1964
- var g = At({
1965
- state: u,
1966
- props: n
1967
- });
1968
- ce(function() {
1969
- if (!(b || !(i != null && i.document))) {
1970
- if (p.length < v.current.length) {
1971
- var w = v.current.find(function(T) {
1972
- return p.findIndex(function(E) {
1973
- return n.itemToKey(E) === n.itemToKey(T);
1974
- }) < 0;
1975
- });
1976
- Mt(r({
1977
- itemToString: o,
1978
- resultCount: p.length,
1979
- removedSelectedItem: w,
1980
- activeIndex: l,
1981
- activeSelectedItem: p[l]
1982
- }), i.document);
1983
- }
1984
- v.current = p;
1985
- }
1986
- }, [p.length]), ce(function() {
1987
- b || (l === -1 && _.current ? _.current.focus() : C.current[l] && C.current[l].focus());
1988
- }, [l]), jt({
1989
- props: n,
1990
- state: u
1991
- });
1992
- var P = Ht("getDropdownProps"), c = $e(function() {
1993
- var w;
1994
- return w = {}, w[s] = function() {
1995
- d({
1996
- type: tn
1997
- });
1998
- }, w[t] = function() {
1999
- d({
2000
- type: en
2001
- });
2002
- }, w.Delete = function() {
2003
- d({
2004
- type: Qt
2005
- });
2006
- }, w.Backspace = function() {
2007
- d({
2008
- type: Zt
2009
- });
2010
- }, w;
2011
- }, [d, t, s]), h = $e(function() {
2012
- var w;
2013
- return w = {}, w[s] = function(T) {
2014
- Dn(T) && d({
2015
- type: nn
2016
- });
2017
- }, w.Backspace = function(E) {
2018
- Dn(E) && d({
2019
- type: rn
2020
- });
2021
- }, w;
2022
- }, [d, s]), f = ae(function(w) {
2023
- var T, E = w === void 0 ? {} : w, R = E.refKey, L = R === void 0 ? "ref" : R, B = E.ref, k = E.onClick, X = E.onKeyDown, Q = E.selectedItem, z = E.index, G = be(E, Di), oe = g.current.state, V = Rr(Q, z, oe.selectedItems, "Pass either item or index to getSelectedItemProps!"), S = V[1], O = S > -1 && S === oe.activeIndex, H = function() {
2024
- d({
2025
- type: Xt,
2026
- index: S
2027
- });
2028
- }, $ = function(Z) {
2029
- var U = nt(Z);
2030
- U && c[U] && c[U](Z);
2031
- };
2032
- return F((T = {}, T[L] = Ve(B, function(te) {
2033
- te && C.current.push(te);
2034
- }), T.tabIndex = O ? 0 : -1, T.onClick = ue(k, H), T.onKeyDown = ue(X, $), T), G);
2035
- }, [d, g, c]), I = ae(function(w, T) {
2036
- var E, R = w === void 0 ? {} : w, L = R.refKey, B = L === void 0 ? "ref" : L, k = R.ref, X = R.onKeyDown, Q = R.onClick, z = R.preventKeyAction, G = z === void 0 ? !1 : z, oe = be(R, ki), V = T === void 0 ? {} : T, S = V.suppressRefError, O = S === void 0 ? !1 : S;
2037
- P("getDropdownProps", O, B, _);
2038
- var H = function(Z) {
2039
- var U = nt(Z);
2040
- U && h[U] && h[U](Z);
2041
- }, $ = function() {
2042
- d({
2043
- type: on
2044
- });
2045
- };
2046
- return F((E = {}, E[B] = Ve(k, function(te) {
2047
- te && (_.current = te);
2048
- }), E), !G && {
2049
- onKeyDown: ue(X, H),
2050
- onClick: ue(Q, $)
2051
- }, oe);
2052
- }, [d, h, P]), y = ae(function(w) {
2053
- d({
2054
- type: sn,
2055
- selectedItem: w
2056
- });
2057
- }, [d]), j = ae(function(w) {
2058
- d({
2059
- type: an,
2060
- selectedItem: w
2061
- });
2062
- }, [d]), D = ae(function(w) {
2063
- d({
2064
- type: ln,
2065
- selectedItems: w
2066
- });
2067
- }, [d]), K = ae(function(w) {
2068
- d({
2069
- type: un,
2070
- activeIndex: w
2071
- });
2072
- }, [d]), M = ae(function() {
2073
- d({
2074
- type: dn
2075
- });
2076
- }, [d]);
2077
- return {
2078
- getSelectedItemProps: f,
2079
- getDropdownProps: I,
2080
- addSelectedItem: y,
2081
- removeSelectedItem: j,
2082
- setSelectedItems: D,
2083
- setActiveIndex: K,
2084
- reset: M,
2085
- selectedItems: p,
2086
- activeIndex: l
2087
- };
2088
- }
2089
- var vt = { 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("|"), Ri = new RegExp(Gr, "g"), Pi = new RegExp(Gr, "");
2550
- function Mi(e) {
2551
- return Yr[e];
2552
- }
2553
- var Jr = function(e) {
2554
- return e.replace(Ri, Mi);
2555
- }, Ti = function(e) {
2556
- return !!e.match(Pi);
2557
- };
2558
- vt.exports = Jr;
2559
- vt.exports.has = Ti;
2560
- vt.exports.remove = Jr;
2561
- var Ai = vt.exports;
2562
- const Hi = /* @__PURE__ */ Po(Ai);
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 cn(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 = (d) => d.sort((l, p) => Fi(l, p, t))
2586
- } = r, a = e.reduce(u, []);
2587
- return s(a).map((d) => {
2588
- let {
2589
- item: l
2590
- } = d;
2591
- return l;
2592
- });
2593
- function u(d, l, p) {
2594
- const b = Vi(l, o, n, r), {
2595
- rank: _,
2596
- keyThreshold: v = i
2597
- } = b;
2598
- return _ >= v && d.push({
2599
- ...b,
2600
- item: l,
2601
- index: p
2602
- }), d;
2603
- }
2604
- }
2605
- cn.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: kn(t, r, o),
2613
- keyIndex: -1,
2614
- keyThreshold: o.threshold
2615
- };
2616
- }
2617
- return zi(e, n).reduce((t, s, a) => {
2618
- let {
2619
- rank: u,
2620
- rankedValue: d,
2621
- keyIndex: l,
2622
- keyThreshold: p
2623
- } = t, {
2624
- itemValue: b,
2625
- attributes: _
2626
- } = s, v = kn(b, r, o), C = d;
2627
- const {
2628
- minRanking: g,
2629
- maxRanking: P,
2630
- threshold: c
2631
- } = _;
2632
- return v < g && v >= ge.MATCHES ? v = g : v > P && (v = P), v > u && (u = v, l = a, p = c, C = b), {
2633
- rankedValue: C,
2634
- rank: u,
2635
- keyIndex: l,
2636
- keyThreshold: p
2637
- };
2638
- }, {
2639
- rankedValue: e,
2640
- rank: ge.NO_MATCH,
2641
- keyIndex: -1,
2642
- keyThreshold: o.threshold
2643
- });
2644
- }
2645
- function kn(e, n, r) {
2646
- return e = Rn(e, r), n = Rn(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(u, d, l) {
2659
- for (let p = l, b = d.length; p < b; p++)
2660
- if (d[p] === u)
2661
- return r += 1, p + 1;
2662
- return -1;
2663
- }
2664
- function t(u) {
2665
- const d = 1 / u, l = r / n.length;
2666
- return ge.MATCHES + l * d;
2667
- }
2668
- const s = i(n[0], e, 0);
2669
- if (s < 0)
2670
- return ge.NO_MATCH;
2671
- o = s;
2672
- for (let u = 1, d = n.length; u < d; u++) {
2673
- const l = n[u];
2674
- if (o = i(l, e, o), !(o > -1))
2675
- return ge.NO_MATCH;
2676
- }
2677
- const a = o - s;
2678
- return t(a);
2679
- }
2680
- function Fi(e, n, r) {
2681
- const {
2682
- rank: t,
2683
- keyIndex: s
2684
- } = e, {
2685
- rank: a,
2686
- keyIndex: u
2687
- } = n;
2688
- return t === a ? s === u ? r(e, n) : s < u ? -1 : 1 : t > a ? -1 : 1;
2689
- }
2690
- function Rn(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 a = [];
2718
- for (let u = 0, d = o.length; u < d; u++) {
2719
- const l = o[u];
2720
- if (l != null)
2721
- if (Object.hasOwnProperty.call(l, s)) {
2722
- const p = l[s];
2723
- p != null && a.push(p);
2724
- } else
2725
- s === "*" && (a = a.concat(l));
2726
- }
2727
- o = a;
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 = Ui(t), a = Li(e, t);
2735
- for (let u = 0, d = a.length; u < d; u++)
2736
- r.push({
2737
- itemValue: a[u],
2738
- attributes: s
2739
- });
2740
- }
2741
- return r;
2742
- }
2743
- const Pn = {
2744
- maxRanking: 1 / 0,
2745
- minRanking: -1 / 0
2746
- };
2747
- function Ui(e) {
2748
- return typeof e == "string" ? Pn : {
2749
- ...Pn,
2750
- ...e
2751
- };
2752
- }
2753
- function qi({
2754
- defaultOpen: e,
2755
- placement: n = "bottom",
2756
- modal: r,
2757
- open: o,
2758
- onOpenChange: i,
2759
- onClose: t,
2760
- disableCloseOnClickOutside: s,
2761
- disableCloseOnEscape: a,
2762
- openOnHover: u,
2763
- fillAvailableHeight: d,
2764
- fitScreen: l,
2765
- maxHeight: p,
2766
- minHeight: b = "2.875rem",
2767
- matchReferenceWidth: _,
2768
- fixedWidth: v,
2769
- disableCaret: C,
2770
- noPadding: g,
2771
- disableShift: P,
2772
- disableFlip: c,
2773
- disableFlipFallback: h,
2774
- disableAutoUpdate: f,
2775
- disableFocusLock: I,
2776
- root: y
2777
- } = {}) {
2778
- const [j, D] = Y(e), [K, M] = Y(), [w, T] = Y(), E = o ?? j, R = i ?? D, L = J(null), B = typeof b == "string" ? b : `${b}px`, k = Un({
2779
- placement: n,
2780
- open: E,
2781
- onOpenChange: R,
2782
- whileElementsMounted: f ? void 0 : qn,
2783
- middleware: [
2784
- Wn(8),
2785
- Yn({
2786
- padding: 5,
2787
- apply({ rects: S, availableHeight: O, elements: H }) {
2788
- Object.assign(H.floating.style, {
2789
- ..._ ? { width: `${S.reference.width}px` } : v ? { width: "40dvw" } : {},
2790
- ...d ? {
2791
- height: `${O - 20}px`,
2792
- minHeight: B
2793
- } : {},
2794
- ...p ? {
2795
- minHeight: B,
2796
- height: l ? typeof p == "string" ? p : `${p}px` : void 0,
2797
- maxHeight: l ? `${O - 20}px` : typeof p == "string" ? p : `${p}px`
2798
- } : {},
2799
- ...l && !p ? {
2800
- minHeight: B,
2801
- maxHeight: `${O - 20}px`
2802
- } : {},
2803
- zIndex: 1
2804
- });
2805
- }
2806
- }),
2807
- Gn({
2808
- mainAxis: !c,
2809
- crossAxis: !1,
2810
- fallbackAxisSideDirection: h ? "none" : "end",
2811
- padding: 5
2812
- }),
2813
- Jn({
2814
- padding: 5,
2815
- mainAxis: !P,
2816
- crossAxis: !1,
2817
- limiter: Xn({
2818
- mainAxis: !P
2819
- })
2820
- }),
2821
- Co({ element: C ? null : L, padding: 5 })
2822
- ]
2823
- }), X = k.context, Q = Qn(X, {
2824
- enabled: o == null && !u
2825
- }), z = Zn(X, {
2826
- enabled: o == null && !!u,
2827
- handleClose: er()
2828
- }), G = tr(X, {
2829
- escapeKey: !a,
2830
- outsidePress: () => s ? !1 : (t == null || t(), !0)
2831
- }), oe = nr(X), V = rr([Q, z, G, oe]);
2832
- return $e(
2833
- () => ({
2834
- open: E,
2835
- setOpen: R,
2836
- onClose: t,
2837
- ...V,
2838
- ...k,
2839
- modal: r,
2840
- labelId: K,
2841
- descriptionId: w,
2842
- setLabelId: M,
2843
- setDescriptionId: T,
2844
- arrowRef: L,
2845
- disableCaret: C,
2846
- noPadding: g,
2847
- fillAvailableHeight: d,
2848
- maxHeight: p,
2849
- matchReferenceWidth: _,
2850
- fixedWidth: v,
2851
- disableFlipFallback: h,
2852
- disableAutoUpdate: f,
2853
- disableFocusLock: I,
2854
- root: y
2855
- }),
2856
- [
2857
- E,
2858
- R,
2859
- t,
2860
- V,
2861
- k,
2862
- r,
2863
- K,
2864
- w,
2865
- C,
2866
- g,
2867
- d,
2868
- p,
2869
- _,
2870
- v,
2871
- h,
2872
- f,
2873
- I,
2874
- y
2875
- ]
2876
- );
2877
- }
2878
- const Xr = Qe(null), ot = () => {
2879
- const e = ve(Xr);
2880
- if (e == null)
2881
- throw new Error("Popover components must be wrapped in <Popover />");
2882
- return e;
2883
- }, Wi = function(e) {
2884
- const { children: n } = e, r = ot(), o = J(null), i = Me([r.refs.setReference, o]);
2885
- return n({
2886
- "data-state": r.open ? "open" : "closed",
2887
- "data-anv": "popover-trigger",
2888
- ...r.getReferenceProps({ ref: i })
2889
- });
2890
- }, Yi = "_content_hkkee_4", Gi = "_scroller_hkkee_27", Ji = "_arrow_hkkee_34", ut = {
2891
- content: Yi,
2892
- scroller: Gi,
2893
- arrow: Ji,
2894
- "no-padding": "_no-padding_hkkee_45"
2895
- }, Xi = pe(
2896
- function({ className: e, style: n, ...r }, o) {
2897
- var i, t;
2898
- const {
2899
- context: s,
2900
- theme: a,
2901
- mode: u,
2902
- disableCaret: d,
2903
- noPadding: l,
2904
- onClose: p,
2905
- disableFocusLock: b,
2906
- root: _,
2907
- ...v
2908
- } = ot(), C = ve(Vn), { root: g } = ve(ar), P = Me([v.refs.setFloating, o]);
2909
- if (!s.open || C && !((i = C == null ? void 0 : C.ref) != null && i.current))
2910
- return null;
2911
- const c = ie(e, ut.content, {
2912
- [ut["no-padding"]]: l
2913
- }), h = (f) => {
2914
- f.code === "Escape" && (p == null || p());
2915
- };
2916
- return /* @__PURE__ */ m.jsx(Bn, { root: _ ?? ((t = C == null ? void 0 : C.ref) == null ? void 0 : t.current) ?? g, children: /* @__PURE__ */ m.jsx(
2917
- zn,
2918
- {
2919
- context: s,
2920
- modal: v.modal,
2921
- order: ["reference", "content"],
2922
- disabled: b,
2923
- children: /* @__PURE__ */ m.jsx(Fn, { theme: a, mode: u, children: /* @__PURE__ */ m.jsxs(
2924
- "div",
2925
- {
2926
- ref: P,
2927
- "data-anv": "popover-content",
2928
- style: { ...v.floatingStyles, ...n },
2929
- "aria-labelledby": v.labelId,
2930
- "aria-describedby": v.descriptionId,
2931
- className: c,
2932
- ...v.getFloatingProps(r),
2933
- onKeyDown: h,
2934
- role: "presentation",
2935
- children: [
2936
- /* @__PURE__ */ m.jsx("div", { className: ut.scroller, children: r.children }),
2937
- !d && /* @__PURE__ */ m.jsx(
2938
- Eo,
2939
- {
2940
- ref: v.arrowRef,
2941
- context: s,
2942
- className: ut.arrow
2943
- }
2944
- )
2945
- ]
2946
- }
2947
- ) })
2948
- }
2949
- ) });
2950
- }
2951
- ), Qi = pe(
2952
- function(e, n) {
2953
- const { setOpen: r, onClose: o } = ot();
2954
- return /* @__PURE__ */ m.jsx(
2955
- Ge,
2956
- {
2957
- ref: n,
2958
- "data-anv": "popover-close",
2959
- ...e,
2960
- onClick: (i) => {
2961
- var t;
2962
- (t = e.onClick) == null || t.call(e, i), o == null || o(), r(!1);
2963
- }
2964
- }
2965
- );
2966
- }
2967
- ), Zi = pe(
2968
- function(e, n) {
2969
- const { children: r, size: o, ...i } = e, t = ot(), s = r.ref, a = Me([
2970
- t.refs.setReference,
2971
- n,
2972
- s
2973
- ]);
2974
- return /* @__PURE__ */ m.jsx(
2975
- Ge,
2976
- {
2977
- ref: a,
2978
- size: o,
2979
- "data-state": t.open ? "open" : "closed",
2980
- "data-anv": "popover-button",
2981
- ...t.getReferenceProps(i),
2982
- children: r
2983
- }
2984
- );
2985
- }
2986
- );
2987
- function es({
2988
- children: e,
2989
- modal: n,
2990
- ...r
2991
- }) {
2992
- const o = qi({ modal: n, ...r }), { theme: i, mode: t = "light" } = ve(Ln), s = $e(
2993
- () => ({ ...o, theme: i, mode: t }),
2994
- [t, o, i]
2995
- );
2996
- return /* @__PURE__ */ m.jsx(Xr.Provider, { value: s, children: e });
2997
- }
2998
- const pn = Object.assign(es, {
2999
- Trigger: Wi,
3000
- Close: Qi,
3001
- Content: Xi,
3002
- Button: Zi
3003
- }), Qr = (e) => /* @__PURE__ */ de.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e }, /* @__PURE__ */ de.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" })), ts = "_combobox_1wjs7_2", ns = "_input_1wjs7_30", rs = "_error_1wjs7_60", os = "_small_1wjs7_85", is = "_large_1wjs7_88", ss = "_disabled_1wjs7_112", as = "_chip_1wjs7_161", ls = "_prefix_1wjs7_216", us = "_suffix_1wjs7_217", ds = "_listview_1wjs7_252", cs = "_empty_1wjs7_262", se = {
3004
- combobox: ts,
3005
- "search-field": "_search-field_1wjs7_6",
3006
- "popover-content": "_popover-content_1wjs7_21",
3007
- "input-wrapper": "_input-wrapper_1wjs7_30",
3008
- input: ns,
3009
- error: rs,
3010
- "buttons-wrapper": "_buttons-wrapper_1wjs7_68",
3011
- small: os,
3012
- large: is,
3013
- "close-button-wrapper": "_close-button-wrapper_1wjs7_92",
3014
- "close-button": "_close-button_1wjs7_92",
3015
- "loading-infinite": "_loading-infinite_1wjs7_112",
3016
- "loading-progress": "_loading-progress_1wjs7_112",
3017
- disabled: ss,
3018
- "toggle-button-wrapper": "_toggle-button-wrapper_1wjs7_116",
3019
- "toggle-button": "_toggle-button_1wjs7_116",
3020
- "rows-wrapper": "_rows-wrapper_1wjs7_150",
3021
- "chip-wrapper": "_chip-wrapper_1wjs7_161",
3022
- chip: as,
3023
- prefix: ls,
3024
- suffix: us,
3025
- listview: ds,
3026
- "listview-option": "_listview-option_1wjs7_257",
3027
- empty: cs
3028
- }, fn = Qe(null), it = function() {
3029
- const e = ve(
3030
- fn
3031
- );
3032
- if (e == null)
3033
- throw new Error("useCombobox must be wrapped in <Combobox />");
3034
- return e;
3035
- }, ps = function(e) {
3036
- const { multiple: n = !1, ...r } = e;
3037
- return n ? /* @__PURE__ */ m.jsx(hs, { ...r }) : /* @__PURE__ */ m.jsx(fs, { ...r });
3038
- }, fs = function(e) {
3039
- const { layoutStyles: n, componentProps: r } = ke(e), {
3040
- className: o,
3041
- style: i,
3042
- children: t,
3043
- open: s,
3044
- items: a,
3045
- itemToString: u,
3046
- itemToKey: d,
3047
- onChange: l,
3048
- onSelectedItemChange: p,
3049
- disableCloseOnClickOutside: b = !1,
3050
- filterOptions: _,
3051
- root: v,
3052
- ...C
3053
- } = r, [g, P] = Y(a), [c, h] = Y(!1), [f, I] = Y(!1), [y, j] = Y(!1), [D, K] = Y([]);
3054
- function M(V) {
3055
- return u && V ? u(V) : V ? String(V) : "";
3056
- }
3057
- const w = d || ((V) => V), {
3058
- isOpen: T,
3059
- getLabelProps: E,
3060
- getInputProps: R,
3061
- getToggleButtonProps: L,
3062
- getMenuProps: B,
3063
- getItemProps: k,
3064
- highlightedIndex: X,
3065
- selectedItem: Q,
3066
- selectItem: z,
3067
- setInputValue: G,
3068
- inputValue: oe
3069
- } = ye({
3070
- ...C,
3071
- items: g,
3072
- itemToString(V) {
3073
- return M(V);
3074
- },
3075
- onInputValueChange({ inputValue: V, type: S, selectedItem: O }) {
3076
- S === ye.stateChangeTypes.InputKeyDownEnter || S === ye.stateChangeTypes.ItemClick || O != null && V === M(O) ? P(a) : V != null && V !== "" ? P(cn(a, V, _)) : P(a);
3077
- },
3078
- onSelectedItemChange(V) {
3079
- const { selectedItem: S } = V;
3080
- l != null && l(S || null), p != null && p(V);
3081
- },
3082
- onIsOpenChange({ isOpen: V, inputValue: S, selectedItem: O }) {
3083
- V === !1 && S === "" ? (z(null), P(a)) : V === !1 && (G(O != null ? M(O) : ""), P(a));
3084
- },
3085
- stateReducer(V, { type: S, changes: O }) {
3086
- switch (S) {
3087
- case ye.stateChangeTypes.InputBlur:
3088
- return b ? {
3089
- ...O,
3090
- isOpen: V.isOpen,
3091
- highlightedIndex: V.highlightedIndex
3092
- } : O;
3093
- default:
3094
- return O;
3095
- }
3096
- },
3097
- isItemDisabled(V) {
3098
- return c || !!(V && V instanceof Object && "disabled" in V && V.disabled || V && V instanceof Object && "readOnly" in V && V.readOnly || D.includes(V));
3099
- }
3100
- });
3101
- return /* @__PURE__ */ m.jsx(
3102
- fn.Provider,
3103
- {
3104
- value: {
3105
- multiple: !1,
3106
- items: g,
3107
- itemToString: M,
3108
- itemToKey: w,
3109
- isOpen: T,
3110
- getLabelProps: E,
3111
- getInputProps: R,
3112
- getToggleButtonProps: L,
3113
- getMenuProps: B,
3114
- getItemProps: k,
3115
- highlightedIndex: X,
3116
- selectedItem: Q,
3117
- selectedItems: [],
3118
- disabledItems: D,
3119
- setDisabledItems: K,
3120
- getSelectedItemProps: void 0,
3121
- getDropdownProps: void 0,
3122
- selectItem: z,
3123
- inputValue: oe,
3124
- isDisabledOrReadOnly: c,
3125
- setIsDisabledOrReadOnly: h,
3126
- hasDisabledPopover: f,
3127
- setHasDisabledPopover: I,
3128
- hasEmpty: y,
3129
- setHasEmpty: j
3130
- },
3131
- children: /* @__PURE__ */ m.jsx(
3132
- "div",
3133
- {
3134
- className: o,
3135
- "data-anv": "combobox",
3136
- style: { ...i, ...n },
3137
- children: /* @__PURE__ */ m.jsx(
3138
- pn,
3139
- {
3140
- root: v,
3141
- open: s === !0 ? s : T,
3142
- noPadding: !0,
3143
- disableCaret: !0,
3144
- fitScreen: !0,
3145
- disableFlipFallback: !0,
3146
- matchReferenceWidth: !0,
3147
- children: t
3148
- }
3149
- )
3150
- }
3151
- )
3152
- }
3153
- );
3154
- }, hs = function(e) {
3155
- const { layoutStyles: n, componentProps: r } = ke(e), {
3156
- className: o,
3157
- style: i,
3158
- children: t,
3159
- open: s,
3160
- items: a,
3161
- itemToString: u,
3162
- itemToKey: d,
3163
- onChange: l,
3164
- onSelectedItemsChange: p,
3165
- disableCloseOnClickOutside: b = !1,
3166
- filterOptions: _,
3167
- root: v,
3168
- stateReducer: C,
3169
- ...g
3170
- } = r, [P, c] = Y(a), [h, f] = Y(!1), [I, y] = Y(!1), [j, D] = Y(!1), [K, M] = Y(""), [w, T] = Y([]), {
3171
- getSelectedItemProps: E,
3172
- getDropdownProps: R,
3173
- reset: L,
3174
- selectedItems: B,
3175
- addSelectedItem: k,
3176
- removeSelectedItem: X,
3177
- setSelectedItems: Q
3178
- } = je({
3179
- ...g,
3180
- onSelectedItemsChange(A) {
3181
- const { selectedItems: q } = A;
3182
- l != null && l(q), p != null && p(A);
3183
- },
3184
- onStateChange({ selectedItems: A, type: q }) {
3185
- switch (q) {
3186
- case je.stateChangeTypes.SelectedItemKeyDownBackspace:
3187
- case je.stateChangeTypes.SelectedItemKeyDownDelete:
3188
- case je.stateChangeTypes.DropdownKeyDownBackspace:
3189
- case je.stateChangeTypes.FunctionRemoveSelectedItem:
3190
- Q(A ?? []);
3191
- break;
3192
- case je.stateChangeTypes.FunctionReset:
3193
- Q([]), M("");
3194
- break;
3195
- }
3196
- }
3197
- });
3198
- function z(A) {
3199
- return u && A ? u(A) : A ? String(A) : "";
3200
- }
3201
- const G = d || ((A) => A), {
3202
- isOpen: oe,
3203
- getLabelProps: V,
3204
- getInputProps: S,
3205
- getToggleButtonProps: O,
3206
- getMenuProps: H,
3207
- getItemProps: $,
3208
- highlightedIndex: te,
3209
- selectedItem: Z,
3210
- selectItem: U
3211
- } = ye({
3212
- ...g,
3213
- items: P,
3214
- itemToString(A) {
3215
- return z(A);
3216
- },
3217
- selectedItem: null,
3218
- inputValue: K,
3219
- onInputValueChange({ inputValue: A, type: q, selectedItem: ee }) {
3220
- q === ye.stateChangeTypes.InputKeyDownEnter || q === ye.stateChangeTypes.ItemClick || ee != null && A === z(ee) ? c(a) : A != null && A !== "" ? c(cn(a, A, _)) : c(a);
3221
- },
3222
- onIsOpenChange({ isOpen: A }) {
3223
- A === !1 && (M(""), c(a));
3224
- },
3225
- stateReducer(A, { type: q, changes: ee }) {
3226
- switch (q) {
3227
- case ye.stateChangeTypes.InputBlur:
3228
- return b ? {
3229
- ...ee,
3230
- isOpen: A.isOpen,
3231
- highlightedIndex: A.highlightedIndex
3232
- } : ee;
3233
- default:
3234
- return ee;
3235
- }
3236
- },
3237
- isItemDisabled(A) {
3238
- return h || !!(A && A instanceof Object && "disabled" in A && A.disabled || A && A instanceof Object && "readOnly" in A && A.readOnly || w.includes(A));
3239
- },
3240
- onStateChange({
3241
- inputValue: A = "",
3242
- type: q,
3243
- selectedItem: ee
3244
- }) {
3245
- switch (q) {
3246
- case ye.stateChangeTypes.InputKeyDownEnter:
3247
- case ye.stateChangeTypes.ItemClick:
3248
- case ye.stateChangeTypes.InputBlur:
3249
- if (ee) {
3250
- const N = B.find(
3251
- (W) => G(W) === G(ee)
3252
- );
3253
- N ? X(N) : k(ee), M("");
3254
- }
3255
- break;
3256
- case ye.stateChangeTypes.InputChange:
3257
- M(A);
3258
- break;
3259
- }
3260
- }
3261
- });
3262
- return /* @__PURE__ */ m.jsx(
3263
- fn.Provider,
3264
- {
3265
- value: {
3266
- multiple: !0,
3267
- items: P,
3268
- itemToString: z,
3269
- itemToKey: G,
3270
- isOpen: oe,
3271
- getLabelProps: V,
3272
- getInputProps: S,
3273
- getToggleButtonProps: O,
3274
- getMenuProps: H,
3275
- getItemProps: $,
3276
- highlightedIndex: te,
3277
- selectedItem: Z,
3278
- selectedItems: B,
3279
- disabledItems: w,
3280
- setDisabledItems: T,
3281
- getSelectedItemProps: E,
3282
- getDropdownProps: R,
3283
- reset: L,
3284
- addSelectedItem: k,
3285
- removeSelectedItem: X,
3286
- setSelectedItems: Q,
3287
- selectItem: U,
3288
- inputValue: K,
3289
- isDisabledOrReadOnly: h,
3290
- setIsDisabledOrReadOnly: f,
3291
- hasDisabledPopover: I,
3292
- setHasDisabledPopover: y,
3293
- hasEmpty: j,
3294
- setHasEmpty: D
3295
- },
3296
- children: /* @__PURE__ */ m.jsx("div", { className: o, style: { ...i, ...n }, children: /* @__PURE__ */ m.jsx(
3297
- pn,
3298
- {
3299
- root: v,
3300
- open: s === !0 ? s : oe,
3301
- noPadding: !0,
3302
- disableCaret: !0,
3303
- fitScreen: !0,
3304
- disableFlipFallback: !0,
3305
- matchReferenceWidth: !0,
3306
- children: t
3307
- }
3308
- ) })
3309
- }
3310
- );
3311
- }, ms = ({
3312
- className: e,
3313
- label: n,
3314
- size: r,
3315
- error: o,
3316
- hint: i,
3317
- description: t,
3318
- required: s,
3319
- moreInfo: a,
3320
- openMoreInfo: u,
3321
- disabled: d,
3322
- readOnly: l,
3323
- prefix: p,
3324
- suffix: b,
3325
- maxRows: _,
3326
- ...v
3327
- }) => {
3328
- const {
3329
- isOpen: C,
3330
- itemToString: g,
3331
- getLabelProps: P,
3332
- getInputProps: c,
3333
- getToggleButtonProps: h,
3334
- selectedItems: f,
3335
- getSelectedItemProps: I,
3336
- getDropdownProps: y,
3337
- reset: j,
3338
- removeSelectedItem: D,
3339
- selectItem: K,
3340
- inputValue: M,
3341
- setIsDisabledOrReadOnly: w,
3342
- hasDisabledPopover: T
3343
- } = it(), E = ot(), R = J(null), L = ie(se["input-wrapper"], {
3344
- [se.small]: r === "small",
3345
- [se.large]: r === "large"
3346
- }), B = we(), k = we(), X = ie(se.input, e, {
3347
- [se.error]: o
3348
- });
3349
- ce(() => (w(!!(d || l)), () => {
3350
- w(!1);
3351
- }), [d, l, w]);
3352
- let Q = `label${B} `;
3353
- Q += ` helper${k}`;
3354
- const z = typeof o != "boolean" ? o : void 0, G = J(null), [oe, V] = Y(!1), [S, O] = Y(!1), [H, $] = Y(
3355
- null
3356
- ), [te, Z] = Y(0);
3357
- Dt(() => {
3358
- var A, q;
3359
- if (_ !== void 0) {
3360
- if (oe === !1)
3361
- V(!0), O(!1), $(null), Z((ee) => ee + 1);
3362
- else if ((A = G == null ? void 0 : G.current) != null && A.children) {
3363
- const ee = (q = G == null ? void 0 : G.current) == null ? void 0 : q.children, N = Array.from(ee).reduce(
3364
- (W, fe) => {
3365
- const _e = fe.getBoundingClientRect().top;
3366
- return W.length ? W[W.length - 1].top === _e ? [
3367
- ...W.slice(0, -1),
3368
- { count: W[W.length - 1].count + 1, top: _e }
3369
- ] : W[W.length - 1].top !== _e ? [...W, { count: 1, top: _e }] : W : [{ count: 1, top: _e }];
3370
- },
3371
- []
3372
- );
3373
- if (!N[1] || H === 0)
3374
- V(!1);
3375
- else {
3376
- if (O(!0), H == null) {
3377
- const W = Math.max(
3378
- N[0].count + N[1].count - 2,
3379
- 0
3380
- );
3381
- $(W);
3382
- } else
3383
- $(H - 1);
3384
- Z((W) => W + 1);
3385
- }
3386
- }
3387
- }
3388
- }, [f.length, _, te]);
3389
- const U = S && _ != null && H !== null ? H : f.length;
3390
- return /* @__PURE__ */ m.jsxs("div", { className: se["search-field"], "data-anv": "combobox-searchfield", children: [
3391
- n ? /* @__PURE__ */ m.jsx(
3392
- Nt,
3393
- {
3394
- ...P({
3395
- className: se.label,
3396
- id: B,
3397
- required: s,
3398
- moreInfo: a,
3399
- openMoreInfo: u
3400
- }),
3401
- children: n
3402
- }
3403
- ) : null,
3404
- /* @__PURE__ */ m.jsxs(
3405
- "div",
3406
- {
3407
- className: L,
3408
- ref: E.refs.setReference,
3409
- children: [
3410
- /* @__PURE__ */ m.jsxs("div", { className: se["buttons-wrapper"], children: [
3411
- M || f.length ? /* @__PURE__ */ m.jsx("div", { className: se["close-button-wrapper"], children: /* @__PURE__ */ m.jsx(
3412
- Ge,
3413
- {
3414
- "aria-label": "clear selection",
3415
- appearance: "ghost",
3416
- size: "small",
3417
- icon: lr,
3418
- className: se["close-button"],
3419
- onClick: () => {
3420
- j != null ? j() : K(null);
3421
- },
3422
- tabIndex: -1,
3423
- disabled: d || l
3424
- }
3425
- ) }) : null,
3426
- T ? null : /* @__PURE__ */ m.jsx("div", { className: se["toggle-button-wrapper"], children: /* @__PURE__ */ m.jsx(
3427
- Ge,
3428
- {
3429
- "aria-label": "toggle menu",
3430
- ...h({
3431
- icon: Qr,
3432
- className: se["toggle-button"],
3433
- disabled: d || l
3434
- }),
3435
- appearance: "ghost",
3436
- size: "small"
3437
- }
3438
- ) })
3439
- ] }),
3440
- /* @__PURE__ */ m.jsxs("div", { className: se["rows-wrapper"], ref: G, children: [
3441
- f.length && D != null && I != null ? f.slice(0, U).map((A, q) => {
3442
- const { onClick: ee, ...N } = I({
3443
- selectedItem: A,
3444
- index: q
3445
- });
3446
- return /* @__PURE__ */ m.jsx(
3447
- "div",
3448
- {
3449
- className: se["chip-wrapper"],
3450
- children: /* @__PURE__ */ m.jsx(
3451
- hn,
3452
- {
3453
- ...N,
3454
- label: g(A),
3455
- onClose: (W) => {
3456
- "code" in W && W.code !== "Delete" && W.code !== "Backspace" && D(A);
3457
- },
3458
- className: se.chip,
3459
- title: g(A)
3460
- }
3461
- )
3462
- },
3463
- `selected-item-${q}`
3464
- );
3465
- }) : null,
3466
- S && _ != null ? /* @__PURE__ */ m.jsx("div", { className: se["chip-wrapper"], children: /* @__PURE__ */ m.jsx(
3467
- hn,
3468
- {
3469
- label: `+${f.length - U}`,
3470
- className: se.chip,
3471
- title: f.slice(U).map((A) => g(A)).join(", ")
3472
- }
3473
- ) }) : null,
3474
- /* @__PURE__ */ m.jsxs(_o, { flex: "1 1 100px", alignItems: "center", style: { width: "100px" }, children: [
3475
- p ? /* @__PURE__ */ m.jsx("div", { className: se.prefix, children: p }) : null,
3476
- /* @__PURE__ */ m.jsx(
3477
- "input",
3478
- {
3479
- ...y != null ? c(
3480
- y({
3481
- ...v,
3482
- className: X,
3483
- disabled: d,
3484
- readOnly: l,
3485
- required: s,
3486
- autoComplete: "off",
3487
- "aria-labelledby": Q,
3488
- preventKeyAction: C,
3489
- ref: R
3490
- })
3491
- ) : c({
3492
- ...v,
3493
- className: X,
3494
- disabled: d,
3495
- readOnly: l,
3496
- required: s,
3497
- autoComplete: "off",
3498
- "aria-labelledby": Q,
3499
- ref: R
3500
- })
3501
- }
3502
- ),
3503
- b ? /* @__PURE__ */ m.jsx("div", { className: se.suffix, children: b }) : null
3504
- ] })
3505
- ] })
3506
- ]
3507
- }
3508
- ),
3509
- i || z || t ? /* @__PURE__ */ m.jsx(
3510
- kt,
3511
- {
3512
- id: k,
3513
- errorMessage: z,
3514
- hint: i,
3515
- description: t
3516
- }
3517
- ) : null
3518
- ] });
3519
- }, gs = function({
3520
- children: e,
3521
- className: n,
3522
- disablePopover: r = !1,
3523
- ...o
3524
- }) {
3525
- const {
3526
- items: i,
3527
- itemToKey: t,
3528
- highlightedIndex: s,
3529
- selectedItem: a,
3530
- selectedItems: u,
3531
- setHasDisabledPopover: d,
3532
- getMenuProps: l,
3533
- getItemProps: p,
3534
- isDisabledOrReadOnly: b
3535
- } = it(), _ = ie(
3536
- se["popover-content"],
3537
- n
3538
- );
3539
- return ce(() => (d(r), () => {
3540
- d(!1);
3541
- }), [r, d]), r ? /* @__PURE__ */ m.jsx("div", { ...o, className: _, children: e ? e({
3542
- items: i,
3543
- highlightedIndex: s,
3544
- selectedItem: a,
3545
- getMenuProps: l,
3546
- getItemProps: p,
3547
- listProps: {
3548
- ...l({}, { suppressRefError: !0 }),
3549
- style: {
3550
- display: i.length ? "" : "none",
3551
- overflow: "auto"
3552
- }
3553
- },
3554
- options: i.map((v, C) => ({
3555
- optionProps: {
3556
- ...p({
3557
- item: v,
3558
- index: C
3559
- }),
3560
- selected: t(a) === t(v) || u.some(
3561
- (g) => t(g) === t(v)
3562
- ),
3563
- disabled: b
3564
- // also see "isItemDisabled" function
3565
- },
3566
- item: v,
3567
- index: C
3568
- }))
3569
- }) : null }) : /* @__PURE__ */ m.jsx(
3570
- pn.Content,
3571
- {
3572
- "data-anv": "combobox-content",
3573
- ...o,
3574
- className: _,
3575
- children: e ? e({
3576
- items: i,
3577
- highlightedIndex: s,
3578
- selectedItem: a,
3579
- getMenuProps: l,
3580
- getItemProps: p,
3581
- listProps: {
3582
- ...l({}, { suppressRefError: !0 }),
3583
- style: {
3584
- display: i.length ? void 0 : "none",
3585
- overflow: "auto"
3586
- }
3587
- },
3588
- options: i.map((v, C) => ({
3589
- optionProps: {
3590
- ...p({
3591
- item: v,
3592
- index: C
3593
- }),
3594
- selected: t(a) === t(v) || u.some(
3595
- (g) => t(g) === t(v)
3596
- ),
3597
- disabled: b
3598
- // also see "isItemDisabled" function
3599
- },
3600
- item: v,
3601
- index: C
3602
- }))
3603
- }) : null
3604
- }
3605
- );
3606
- }, vs = function({
3607
- children: e,
3608
- ...n
3609
- }) {
3610
- const { getMenuProps: r, multiple: o, items: i, hasEmpty: t } = it();
3611
- return o ? /* @__PURE__ */ m.jsxs(m.Fragment, { children: [
3612
- /* @__PURE__ */ m.jsx(
3613
- "div",
3614
- {
3615
- ...r(n),
3616
- "data-anv": "combobox-list",
3617
- className: ie(se.listview, xt.listview),
3618
- style: {
3619
- display: i.length ? void 0 : "none",
3620
- overflow: "auto"
3621
- },
3622
- children: e
3623
- }
3624
- ),
3625
- !i.length && !t ? /* @__PURE__ */ m.jsx("div", { className: se.empty, children: /* @__PURE__ */ m.jsx(bt, { subdued: !0, size: "small", children: "No results found" }) }) : null
3626
- ] }) : /* @__PURE__ */ m.jsxs(m.Fragment, { children: [
3627
- /* @__PURE__ */ m.jsx(
3628
- "ul",
3629
- {
3630
- ...r(n),
3631
- className: $n.listbox,
3632
- style: {
3633
- display: i.length ? void 0 : "none",
3634
- overflow: "auto"
3635
- },
3636
- children: e
3637
- }
3638
- ),
3639
- !i.length && !t ? /* @__PURE__ */ m.jsx("div", { className: se.empty, children: /* @__PURE__ */ m.jsx(bt, { subdued: !0, size: "small", children: "No results found" }) }) : null
3640
- ] });
3641
- }, _s = function({
3642
- children: e,
3643
- disabled: n,
3644
- item: r,
3645
- index: o,
3646
- ...i
3647
- }) {
3648
- const {
3649
- itemToKey: t,
3650
- getItemProps: s,
3651
- multiple: a,
3652
- selectedItem: u,
3653
- selectedItems: d,
3654
- disabledItems: l,
3655
- setDisabledItems: p
3656
- } = it(), b = n || r && r instanceof Object && "disabled" in r && r.disabled;
3657
- return ce(() => (n && !l.includes(r) ? p([...l, r]) : l.includes(r) && p(l.filter((_) => _ === r)), () => {
3658
- l.includes(r) && p(l.filter((_) => _ === r));
3659
- }), [r, n, p]), a ? /* @__PURE__ */ m.jsxs(
3660
- "div",
3661
- {
3662
- "data-anv": "combobox-item",
3663
- ...s({
3664
- item: r,
3665
- index: o,
3666
- ...i
3667
- }),
3668
- className: ie(
3669
- se["listview-option"],
3670
- xt["listview-option"]
3671
- ),
3672
- children: [
3673
- /* @__PURE__ */ m.jsx("div", { className: ie(se.cell, xt.cell), children: /* @__PURE__ */ m.jsx(
3674
- go,
3675
- {
3676
- checked: d.some(
3677
- (_) => t(_) === t(r)
3678
- ),
3679
- "aria-label": "Select",
3680
- ...b ? { disabled: !0 } : {}
3681
- }
3682
- ) }),
3683
- e
3684
- ]
3685
- }
3686
- ) : /* @__PURE__ */ m.jsxs(
3687
- "li",
3688
- {
3689
- ...s({
3690
- item: r,
3691
- index: o,
3692
- ...i
3693
- }),
3694
- className: $n.option,
3695
- ...b ? { "aria-disabled": !0 } : {},
3696
- children: [
3697
- /* @__PURE__ */ m.jsx("span", { children: e }),
3698
- /* @__PURE__ */ m.jsx(
3699
- Ee,
3700
- {
3701
- "aria-hidden": !0,
3702
- svg: ur,
3703
- inherit: !0,
3704
- className: se.Icon,
3705
- style: {
3706
- opacity: t(u) === t(r) ? 1 : 0
3707
- }
3708
- }
3709
- )
3710
- ]
3711
- }
3712
- );
3713
- }, Is = function({
3714
- children: e
3715
- }) {
3716
- const { items: n, setHasEmpty: r } = it();
3717
- return ce(() => (r(!0), () => {
3718
- r(!1);
3719
- })), n.length ? null : e;
3720
- }, Nl = Object.assign(ps, {
3721
- SearchField: ms,
3722
- Content: gs,
3723
- List: vs,
3724
- Item: _s,
3725
- Empty: Is
3726
- });
3727
- const ys = "_details_1sjr5_4", xs = "_summary_1sjr5_17", bs = "_arrow_1sjr5_66", ws = "_content_1sjr5_30", Es = "_expanded_1sjr5_111", Be = {
3728
- details: ys,
3729
- summary: xs,
3730
- "content-wrapper": "_content-wrapper_1sjr5_30",
3731
- arrow: bs,
3732
- content: ws,
3733
- "is-expanded": "_is-expanded_1sjr5_108",
3734
- expanded: Es
3735
- }, _t = Qe({
3736
- id: "",
3737
- isExpanded: !1,
3738
- expanded: () => {
3739
- },
3740
- close: () => {
3741
- },
3742
- toggle: () => {
3743
- }
3744
- }), Cs = pe(
3745
- function(e, n) {
3746
- const { layoutStyles: r, componentProps: o } = ke(e), {
3747
- children: i,
3748
- id: t,
3749
- expanded: s,
3750
- defaultExpanded: a = !1,
3751
- style: u,
3752
- className: d,
3753
- ...l
3754
- } = o, p = we(), [b, _] = Y(a);
3755
- function v() {
3756
- _(!0);
3757
- }
3758
- function C() {
3759
- _(!1);
3760
- }
3761
- function g() {
3762
- _((h) => !h);
3763
- }
3764
- const P = {
3765
- ...u,
3766
- ...r
3767
- }, c = $e(
3768
- () => ({
3769
- id: t ?? p,
3770
- isExpanded: s ?? b,
3771
- expanded: v,
3772
- close: C,
3773
- toggle: g
3774
- }),
3775
- [p, t, b, s]
3776
- );
3777
- return /* @__PURE__ */ m.jsx(_t.Provider, { value: c, children: /* @__PURE__ */ m.jsx(
3778
- "div",
3779
- {
3780
- "data-anv": "details",
3781
- ref: n,
3782
- className: ie(Be.details, d),
3783
- style: P,
3784
- ...l,
3785
- children: i
3786
- }
3787
- ) });
3788
- }
3789
- ), Ss = pe(function({ children: e, onClick: n, className: r, ...o }, i) {
3790
- const { id: t, isExpanded: s, toggle: a } = ve(_t), u = (...l) => {
3791
- n == null || n(...l), a();
3792
- }, d = ie(Be.summary, r);
3793
- return /* @__PURE__ */ m.jsxs(
3794
- "button",
3795
- {
3796
- "data-anv": "details-summary",
3797
- "aria-controls": t,
3798
- "aria-expanded": s,
3799
- className: d,
3800
- onClick: u,
3801
- ref: i,
3802
- ...o,
3803
- children: [
3804
- /* @__PURE__ */ m.jsx(Os, {}),
3805
- " ",
3806
- /* @__PURE__ */ m.jsx("span", { children: e })
3807
- ]
3808
- }
3809
- );
3810
- }), Os = pe(
3811
- function({ className: e, ...n }, r) {
3812
- const { isExpanded: o } = ve(_t), i = ie(
3813
- Be.arrow,
3814
- { [Be["is-expanded"]]: o },
3815
- e
3816
- );
3817
- return /* @__PURE__ */ m.jsx("span", { className: i, ref: r, ...n, children: /* @__PURE__ */ m.jsx(Ee, { size: "large", svg: Qr }) });
3818
- }
3819
- ), Ns = pe(
3820
- function({
3821
- className: e,
3822
- children: n,
3823
- height: r,
3824
- maxHeight: o,
3825
- style: i,
3826
- ...t
3827
- }, s) {
3828
- const { id: a, isExpanded: u } = ve(_t), d = {
3829
- height: r,
3830
- maxHeight: o,
3831
- ...r || o ? { overflow: "auto" } : {},
3832
- ...i
3833
- };
3834
- return /* @__PURE__ */ m.jsx(
3835
- "div",
3836
- {
3837
- "data-anv": "details-content",
3838
- id: a,
3839
- className: ie(Be["content-wrapper"], {
3840
- [Be.expanded]: u
3841
- }),
3842
- ref: s,
3843
- children: /* @__PURE__ */ m.jsx("div", { className: Be.content, children: /* @__PURE__ */ m.jsx("div", { className: e, style: d, ...t, children: n }) })
3844
- }
3845
- );
3846
- }
3847
- ), Dl = Object.assign(Cs, {
3848
- Summary: Ss,
3849
- Content: Ns
3850
- });
3851
- const Ds = "_drawer_1pnmb_4", ks = "_container_1pnmb_28", Rs = "_content_1pnmb_41", Ps = "_header_1pnmb_46", Ms = "_footer_1pnmb_68", Ts = "_remove_1pnmb_86", As = "_large_1pnmb_95", Hs = "_sticky_1pnmb_98", De = {
3852
- drawer: Ds,
3853
- "close-drawer": "_close-drawer_1pnmb_1",
3854
- "open-drawer": "_open-drawer_1pnmb_1",
3855
- "open-backdrop": "_open-backdrop_1pnmb_1",
3856
- container: ks,
3857
- content: Rs,
3858
- header: Ps,
3859
- "close-container": "_close-container_1pnmb_61",
3860
- footer: Ms,
3861
- remove: Ts,
3862
- "close-backdrop": "_close-backdrop_1pnmb_1",
3863
- large: As,
3864
- sticky: Hs,
3865
- "close-button": "_close-button_1pnmb_104"
3866
- }, Zr = pe((e, n) => {
3867
- const { onClick: r, ...o } = e, { close: i } = js(), t = (s) => {
3868
- i(), r == null || r(s);
3869
- };
3870
- return /* @__PURE__ */ m.jsx(
3871
- Ge,
3872
- {
3873
- "aria-label": "Close drawer",
3874
- "data-anv": "drawer-cancel-button",
3875
- onClick: t,
3876
- ref: n,
3877
- ...o
3878
- }
3879
- );
3880
- });
3881
- Zr.displayName = "DrawerCancelButton";
3882
- const eo = pe(
3883
- (e, n) => {
3884
- const { children: r } = e;
3885
- return /* @__PURE__ */ m.jsxs("header", { className: De.header, "data-anv": "drawer-header", ref: n, children: [
3886
- /* @__PURE__ */ m.jsx(bt, { variant: "headline", el: "h1", children: r }),
3887
- /* @__PURE__ */ m.jsx("span", { className: De["close-container"], children: /* @__PURE__ */ m.jsx(
3888
- Zr,
3889
- {
3890
- className: De["close-button"],
3891
- size: "small",
3892
- appearance: "ghost",
3893
- "aria-label": "Close dialog",
3894
- icon: lr
3895
- }
3896
- ) })
3897
- ] });
3898
- }
3899
- );
3900
- eo.displayName = "DrawerHeader";
3901
- const to = pe(
3902
- (e, n) => {
3903
- const { children: r, sticky: o = !1, ...i } = e, t = ie(De.footer, {
3904
- [De.sticky]: o
3905
- });
3906
- return /* @__PURE__ */ m.jsx(
3907
- "footer",
3908
- {
3909
- className: t,
3910
- "data-anv": "drawer-footer",
3911
- ref: n,
3912
- ...i,
3913
- children: r
3914
- }
3915
- );
3916
- }
3917
- );
3918
- to.displayName = "DrawerFooter";
3919
- const no = pe(
3920
- (e, n) => {
3921
- const { children: r, ...o } = e, i = ie(De.content, {});
3922
- return /* @__PURE__ */ m.jsx(
3923
- "div",
3924
- {
3925
- className: i,
3926
- "data-anv": "drawer-content",
3927
- ref: n,
3928
- ...o,
3929
- children: r
3930
- }
3931
- );
3932
- }
3933
- );
3934
- no.displayName = "DrawerContent";
3935
- const ro = Qe(null), oo = pe(
3936
- (e, n) => {
3937
- const {
3938
- className: r,
3939
- open: o = !1,
3940
- children: i,
3941
- onOpen: t,
3942
- onClose: s,
3943
- onCancel: a,
3944
- onClick: u,
3945
- onKeyDown: d,
3946
- disableCloseOnEscape: l = !1,
3947
- disableCloseOnClickOutside: p = !1,
3948
- size: b = "medium",
3949
- ..._
3950
- } = e, v = J(null), C = J(null), g = J(null), [P, c] = Y(!1), h = we(), f = ie([De.drawer], r, {
3951
- [De.remove]: P,
3952
- [De.large]: b === "large"
3953
- }), I = vo(v.current), y = I[0], j = I[I.length - 1], D = () => {
3954
- var E;
3955
- if (g.current) {
3956
- const R = (g.current.dataset.drawersOpen ? g.current.dataset.drawersOpen.split(" ") : []).filter((L) => L !== h);
3957
- R.length === 0 ? (g.current.removeAttribute("data-drawers-open"), (E = g.current) == null || E.classList.remove("drawer-open")) : g.current.dataset.drawersOpen = R.join(" ");
3958
- }
3959
- };
3960
- ce(() => {
3961
- var E, R, L, B;
3962
- if (o) {
3963
- if (t == null || t(), (E = v.current) == null || E.showModal(), !g.current) {
3964
- const k = (R = v.current) == null ? void 0 : R.closest("body");
3965
- k && (g.current = k);
3966
- }
3967
- if (!((L = v.current) != null && L.querySelector(":focus")) && (y == null || y.focus()), (B = g.current) == null || B.classList.add("drawer-open"), g.current) {
3968
- const k = g.current.dataset.drawersOpen ? g.current.dataset.drawersOpen.split(" ") : [];
3969
- if (k.includes(h))
3970
- return;
3971
- k.push(h), g.current.dataset.drawersOpen = k.join(" ");
3972
- }
3973
- return;
3974
- }
3975
- c(!0), setTimeout(() => {
3976
- var k;
3977
- (k = v.current) == null || k.close(), D(), c(!1);
3978
- }, 200);
3979
- }, [y, t, o]), ce(() => () => D(), []);
3980
- const K = (E) => {
3981
- E.preventDefault(), !l && (s == null || s());
3982
- }, M = (E) => {
3983
- var R;
3984
- u == null || u(E);
3985
- const L = E.target;
3986
- if (!((R = C.current) != null && R.contains(L))) {
3987
- if (E.preventDefault(), p)
3988
- return;
3989
- s == null || s();
3990
- }
3991
- }, w = (E) => {
3992
- if (d == null || d(E), E.code === "Tab") {
3993
- if (E.shiftKey && E.target === y) {
3994
- E.preventDefault(), j == null || j.focus();
3995
- return;
3996
- }
3997
- if (E.target === j && !E.shiftKey) {
3998
- E.preventDefault(), y == null || y.focus();
3999
- return;
4000
- }
4001
- }
4002
- }, T = $e(() => ({ close: () => {
4003
- c(!0), setTimeout(() => {
4004
- var E;
4005
- D(), (E = v.current) == null || E.close(), s == null || s();
4006
- }, 200);
4007
- } }), [s]);
4008
- return (
4009
- // dialog element does seem to be interactive on MDN guideline
4010
- // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
4011
- /* @__PURE__ */ m.jsx(
4012
- "dialog",
4013
- {
4014
- className: f,
4015
- "data-anv": "drawer",
4016
- ref: Me([n, v]),
4017
- onCancel: K,
4018
- onClick: M,
4019
- onKeyDown: w,
4020
- ..._,
4021
- children: /* @__PURE__ */ m.jsx(ro.Provider, { value: T, children: /* @__PURE__ */ m.jsx("section", { ref: C, className: De.container, children: i }) })
4022
- }
4023
- )
4024
- );
4025
- }
4026
- );
4027
- function js() {
4028
- const e = ve(ro);
4029
- if (!e)
4030
- throw new Error(
4031
- "useDrawerContext must be used within a DrawerContextProvider"
4032
- );
4033
- return e;
4034
- }
4035
- oo.displayName = "Drawer";
4036
- const kl = Object.assign(oo, {
4037
- Header: eo,
4038
- Footer: to,
4039
- Content: no
4040
- });
4041
- const Vs = "_link_1ur2o_4", $s = "_secondary_1ur2o_36", Ks = "_quiet_1ur2o_45", We = {
4042
- link: Vs,
4043
- secondary: $s,
4044
- quiet: Ks
4045
- }, Fs = (e) => /* @__PURE__ */ de.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e }, /* @__PURE__ */ de.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" })), Ls = pe((e, n) => {
4046
- const { layoutStyles: r, componentProps: o } = ke(e), {
4047
- children: i,
4048
- className: t,
4049
- appearance: s = "primary",
4050
- quiet: a,
4051
- style: u,
4052
- ...d
4053
- } = o, l = ie([We.link], t, {
4054
- [We.quiet]: a,
4055
- [We.secondary]: s === "secondary"
4056
- }), p = {
4057
- ...u,
4058
- ...r
4059
- };
4060
- return /* @__PURE__ */ m.jsxs(
4061
- "a",
4062
- {
4063
- className: l,
4064
- rel: "noopener noreferrer",
4065
- "data-anv": "link",
4066
- ref: n,
4067
- style: p,
4068
- ...d,
4069
- children: [
4070
- i,
4071
- d.target === "_blank" && /* @__PURE__ */ m.jsx(Ee, { inherit: !0, svg: Fs })
4072
- ]
4073
- }
4074
- );
4075
- });
4076
- Ls.displayName = "Link";
4077
- const Rl = (e) => {
4078
- const { layoutStyles: n, componentProps: r } = ke(e), { className: o, appearance: i = "primary", quiet: t, style: s } = r, a = ie([We.link], o, {
4079
- [We.quiet]: t,
4080
- [We.secondary]: i === "secondary"
4081
- }), u = Object.assign({}, s, n);
4082
- return { linkClassNames: a, styleCombined: u };
4083
- };
4084
- function Ct(e) {
4085
- var n;
4086
- if (typeof e == "string" || typeof e == "number" || typeof e == "boolean")
4087
- return e.toString();
4088
- if (!e)
4089
- return "";
4090
- if (Array.isArray(e))
4091
- return e.length ? e.map((r) => Ct(r)).join("") : "";
4092
- if (wo(e)) {
4093
- const r = (n = e.props) == null ? void 0 : n.children;
4094
- return r ? Ct(r) : "";
4095
- }
4096
- return "";
4097
- }
4098
- const Bs = "_item_3gqn6_5", zs = "_menu_3gqn6_49", Us = "_scroll_3gqn6_60", qs = "_disabled_3gqn6_108", Pe = {
4099
- "nested-menu": "_nested-menu_3gqn6_4",
4100
- item: Bs,
4101
- menu: zs,
4102
- scroll: Us,
4103
- "arrow-down": "_arrow-down_3gqn6_70",
4104
- "arrow-up": "_arrow-up_3gqn6_71",
4105
- "arrow-icon": "_arrow-icon_3gqn6_83",
4106
- disabled: qs
4107
- }, io = pe(({ label: e, disabled: n, icon: r, ...o }, i) => {
4108
- const t = ve(St), s = or({
4109
- label: n ? null : Ct(e)
4110
- }), a = ir(), u = s.index === t.activeIndex;
4111
- return /* @__PURE__ */ m.jsxs(
4112
- "button",
4113
- {
4114
- ...o,
4115
- ref: Me([s.ref, i]),
4116
- type: "button",
4117
- role: "menuitem",
4118
- "data-anv": "menu-item",
4119
- className: Pe.item,
4120
- tabIndex: u ? 0 : -1,
4121
- disabled: n,
4122
- ...t.getItemProps({
4123
- onClick(d) {
4124
- var l;
4125
- (l = o.onClick) == null || l.call(o, d), a == null || a.events.emit("click");
4126
- },
4127
- onFocus(d) {
4128
- var l;
4129
- (l = o.onFocus) == null || l.call(o, d), t.setHasFocusInside(!0);
4130
- }
4131
- }),
4132
- children: [
4133
- r ? /* @__PURE__ */ m.jsx(Ee, { inherit: !0, "aria-hidden": !0, svg: r }) : null,
4134
- e
4135
- ]
4136
- }
4137
- );
4138
- });
4139
- io.displayName = "MenuItem";
4140
- const Ws = (e) => /* @__PURE__ */ de.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e }, /* @__PURE__ */ de.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" })), Ys = (e) => /* @__PURE__ */ de.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e }, /* @__PURE__ */ de.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" })), Gs = (e) => /* @__PURE__ */ de.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e }, /* @__PURE__ */ de.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" })), St = Qe({
4141
- getItemProps: () => ({}),
4142
- activeIndex: null,
4143
- setActiveIndex: () => {
4144
- },
4145
- setHasFocusInside: () => {
4146
- },
4147
- isOpen: !1
4148
- }), Ot = pe(
4149
- ({ children: e, disableAutoHeight: n, open: r, icon: o, root: i, ...t }, s) => {
4150
- var a, u, d;
4151
- const [l, p] = Y(!!r || !1), [b, _] = Y(!1), [v, C] = Y(null), g = J(null), [P, c] = Y(0), [h, f] = Y(null), [I, y] = Y(!1), [j, D] = Y(!1), K = J([]), M = J([]), w = ve(St), { root: T } = ve(ar), E = ir(), R = So(), L = sr(), B = or(), k = L != null, { theme: X, mode: Q = "light" } = ve(Ln), z = ve(Vn), G = () => k ? w.disableAutoHeight ? ["right-start"] : ["right-start", "right-end", "left-start", "left-end"] : n ? ["bottom-start"] : ["bottom-start", "top-start"], oe = (le) => {
4152
- if (typeof r == "boolean") {
4153
- p(r);
4154
- return;
4155
- }
4156
- p(le);
4157
- }, { floatingStyles: V, refs: S, context: O } = Un({
4158
- nodeId: R,
4159
- open: l,
4160
- onOpenChange: oe,
4161
- placement: k ? "right-start" : "bottom-start",
4162
- middleware: [
4163
- Wn({
4164
- mainAxis: k ? 0 : 4,
4165
- alignmentAxis: k ? -4 : 0
4166
- }),
4167
- Gn({
4168
- fallbackStrategy: "bestFit",
4169
- fallbackPlacements: G()
4170
- }),
4171
- Jn({
4172
- mainAxis: !w.disableAutoHeight,
4173
- crossAxis: !1,
4174
- limiter: Xn({
4175
- mainAxis: !w.disableAutoHeight
4176
- })
4177
- }),
4178
- Yn({
4179
- padding: 8,
4180
- apply({ availableWidth: le, availableHeight: he, elements: Ie }) {
4181
- (n ?? w.disableAutoHeight) || (f(he), Object.assign(Ie.floating.style, {
4182
- maxWidth: `${le}px`,
4183
- maxHeight: `${he}px`
4184
- }));
4185
- }
4186
- })
4187
- ],
4188
- whileElementsMounted: qn
4189
- }), [H, $] = Y(!1), te = Zn(O, {
4190
- enabled: H,
4191
- delay: { open: 75 },
4192
- handleClose: er({ blockPointerEvents: !0 })
4193
- }), Z = Qn(O, {
4194
- event: "mousedown",
4195
- toggle: !k,
4196
- ignoreMouse: k
4197
- }), U = nr(O, { role: "menu" }), A = tr(O, { bubbles: !0 }), q = Oo(O, {
4198
- listRef: K,
4199
- activeIndex: v,
4200
- nested: k,
4201
- onNavigate: C
4202
- }), ee = No(O, {
4203
- listRef: M,
4204
- onMatch: l ? C : void 0,
4205
- activeIndex: v
4206
- }), { getReferenceProps: N, getFloatingProps: W, getItemProps: fe } = rr([te, Z, U, A, q, ee]);
4207
- ce(() => {
4208
- if (!E)
4209
- return;
4210
- function le() {
4211
- p(!!r || !1);
4212
- }
4213
- function he(Ie) {
4214
- Ie.nodeId !== R && Ie.parentId === L && p(!!r || !1);
4215
- }
4216
- return E.events.on("click", le), E.events.on("menuopen", he), () => {
4217
- E.events.off("click", le), E.events.off("menuopen", he);
4218
- };
4219
- }, [E, R, L]), ce(() => {
4220
- (n ?? w.disableAutoHeight) || (l ? setTimeout(() => {
4221
- if (g.current && S.floating.current && (f(S.floating.current.clientHeight), g.current.scrollHeight > S.floating.current.clientHeight)) {
4222
- const le = g.current.scrollTop > 0, he = g.current.scrollHeight - S.floating.current.clientHeight - P - 16 > 0;
4223
- y(le), D(he);
4224
- }
4225
- }, 0) : f(null));
4226
- }, [
4227
- n,
4228
- l,
4229
- w.disableAutoHeight,
4230
- S.floating,
4231
- P
4232
- ]), ce(() => {
4233
- l && E && E.events.emit("menuopen", { parentId: L, nodeId: R });
4234
- }, [E, l, R, L]);
4235
- const _e = ie({
4236
- [Pe["nested-menu"]]: k,
4237
- [Pe.item]: !k
4238
- }), Te = Me([S.setReference, B.ref, s]), Ke = {
4239
- "data-open": l,
4240
- "data-focus-inside": b,
4241
- ref: Te,
4242
- ...N(
4243
- w.getItemProps({
4244
- ...t,
4245
- // This is to allow any type of element to be used as a custom trigger element
4246
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
4247
- onFocus(le) {
4248
- var he;
4249
- (he = t.onFocus) == null || he.call(t, le), _(!1), w.setHasFocusInside(!0);
4250
- }
4251
- // This is to allow any type of element to be used as a custom trigger element
4252
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
4253
- })
4254
- )
4255
- }, Ce = $e(
4256
- () => ({
4257
- activeIndex: v,
4258
- setActiveIndex: C,
4259
- getItemProps: fe,
4260
- setHasFocusInside: _,
4261
- isOpen: l,
4262
- disableAutoHeight: n ?? w.disableAutoHeight
4263
- }),
4264
- [
4265
- v,
4266
- n,
4267
- fe,
4268
- l,
4269
- w.disableAutoHeight
4270
- ]
4271
- );
4272
- return /* @__PURE__ */ m.jsxs(Do, { id: R, children: [
4273
- k ? /* @__PURE__ */ m.jsxs(
4274
- "button",
4275
- {
4276
- ref: Te,
4277
- tabIndex: w.activeIndex === B.index ? 0 : -1,
4278
- role: "menuitem",
4279
- "data-anv": "menu-item",
4280
- "data-open": l ? "" : void 0,
4281
- "data-nested": "",
4282
- "data-focus-inside": b ? "" : void 0,
4283
- className: _e,
4284
- ...N(
4285
- w.getItemProps({
4286
- ...t,
4287
- onFocus(le) {
4288
- var he;
4289
- (he = t.onFocus) == null || he.call(t, le), _(!1), w.setHasFocusInside(!0);
4290
- },
4291
- onMouseEnter: () => $(!0)
4292
- })
4293
- ),
4294
- children: [
4295
- o ? /* @__PURE__ */ m.jsx(Ee, { inherit: !0, "aria-hidden": !0, svg: o }) : null,
4296
- "label" in t && t.label,
4297
- /* @__PURE__ */ m.jsx("div", { style: { flexGrow: 1 } }),
4298
- /* @__PURE__ */ m.jsx(Ee, { "aria-hidden": !0, svg: Ws })
4299
- ]
4300
- }
4301
- ) : "trigger" in t ? (a = t.trigger) == null ? void 0 : a.call(t, Ke) : /* @__PURE__ */ m.jsx(
4302
- Ge,
4303
- {
4304
- ...t,
4305
- ...Ke,
4306
- "data-anv": "menu",
4307
- children: "label" in t && t.label
4308
- }
4309
- ),
4310
- /* @__PURE__ */ m.jsx(St.Provider, { value: Ce, children: /* @__PURE__ */ m.jsx(ko, { elementsRef: K, labelsRef: M, children: l && (z == null || ((u = z == null ? void 0 : z.ref) == null ? void 0 : u.current) != null) && /* @__PURE__ */ m.jsx(
4311
- Bn,
4312
- {
4313
- root: i ?? ((d = z == null ? void 0 : z.ref) == null ? void 0 : d.current) ?? T,
4314
- children: /* @__PURE__ */ m.jsx(
4315
- zn,
4316
- {
4317
- context: O,
4318
- modal: !1,
4319
- initialFocus: k ? -1 : 0,
4320
- returnFocus: !k,
4321
- children: /* @__PURE__ */ m.jsx(Fn, { theme: X, mode: Q, children: /* @__PURE__ */ m.jsxs(
4322
- "div",
4323
- {
4324
- ref: S.setFloating,
4325
- className: Pe.menu,
4326
- style: V,
4327
- ...W({
4328
- onMouseEnter: () => {
4329
- $(!1);
4330
- },
4331
- onKeyDown: (le) => {
4332
- (le.code === "ArrowLeft" || le.code === "ArrowRight") && le.stopPropagation();
4333
- }
4334
- }),
4335
- children: [
4336
- I && /* @__PURE__ */ m.jsx("div", { className: Pe["arrow-up"], "aria-hidden": !0, children: /* @__PURE__ */ m.jsx(
4337
- Ee,
4338
- {
4339
- svg: Ys,
4340
- size: "xlarge",
4341
- className: Pe["arrow-icon"]
4342
- }
4343
- ) }),
4344
- /* @__PURE__ */ m.jsx(
4345
- "div",
4346
- {
4347
- ref: g,
4348
- className: Pe.scroll,
4349
- style: {
4350
- position: "relative",
4351
- maxHeight: h ?? "inherit"
4352
- },
4353
- onScroll: (le) => c(le.currentTarget.scrollTop),
4354
- children: e
4355
- }
4356
- ),
4357
- j && /* @__PURE__ */ m.jsx("div", { className: Pe["arrow-down"], "aria-hidden": !0, children: /* @__PURE__ */ m.jsx(
4358
- Ee,
4359
- {
4360
- svg: Gs,
4361
- size: "xlarge",
4362
- className: Pe["arrow-icon"]
4363
- }
4364
- ) })
4365
- ]
4366
- }
4367
- ) })
4368
- }
4369
- )
4370
- }
4371
- ) }) })
4372
- ] });
4373
- }
4374
- );
4375
- Ot.displayName = "MenuComponent";
4376
- const so = pe((e, n) => sr() === null ? /* @__PURE__ */ m.jsx(Ro, { children: /* @__PURE__ */ m.jsx(Ot, { ...e, ref: n }) }) : /* @__PURE__ */ m.jsx(Ot, { ...e, ref: n }));
4377
- so.displayName = "Menu";
4378
- const Pl = Object.assign(so, {
4379
- Item: io
4380
- });
4381
- const Js = (e) => /* @__PURE__ */ de.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e }, /* @__PURE__ */ de.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" })), Xs = (e) => /* @__PURE__ */ de.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e }, /* @__PURE__ */ de.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__ */ de.createElement("circle", { cx: 12, cy: 12, r: 5 })), Qs = "_radio_qnrm6_4", Zs = "_legend_qnrm6_77", ea = "_children_qnrm6_89", ta = "_label_qnrm6_95", na = "_error_qnrm6_121", Ne = {
4382
- radio: Qs,
4383
- "radio-group": "_radio-group_qnrm6_17",
4384
- "icon-wrapper": "_icon-wrapper_qnrm6_41",
4385
- legend: Zs,
4386
- children: ea,
4387
- label: ta,
4388
- "required-asterisk": "_required-asterisk_qnrm6_98",
4389
- "icon-unchecked": "_icon-unchecked_qnrm6_112",
4390
- "icon-checked": "_icon-checked_qnrm6_113",
4391
- error: na
4392
- }, ao = pe(
4393
- (e, n) => {
4394
- const { layoutStyles: r, componentProps: o } = ke(e), { className: i, children: t, legend: s, required: a, style: u, ...d } = o, l = ie(Ne["radio-group"], i), p = {
4395
- ...u,
4396
- ...r
4397
- };
4398
- return /* @__PURE__ */ m.jsxs(
4399
- "fieldset",
4400
- {
4401
- role: "radiogroup",
4402
- "data-anv": "radio-group",
4403
- className: l,
4404
- "aria-required": a,
4405
- style: p,
4406
- ref: n,
4407
- ...d,
4408
- children: [
4409
- /* @__PURE__ */ m.jsx("legend", { className: Ne.legend, children: s }),
4410
- /* @__PURE__ */ m.jsxs("label", { className: Ne.label, "aria-hidden": !0, children: [
4411
- s,
4412
- a && /* @__PURE__ */ m.jsx("span", { className: Ne["required-asterisk"], children: "*" })
4413
- ] }),
4414
- /* @__PURE__ */ m.jsx(
4415
- "div",
4416
- {
4417
- className: Ne.children,
4418
- style: {
4419
- flexDirection: r == null ? void 0 : r.flexDirection,
4420
- gap: r == null ? void 0 : r.gap
4421
- },
4422
- children: t
4423
- }
4424
- )
4425
- ]
4426
- }
4427
- );
4428
- }
4429
- );
4430
- ao.displayName = "RadioGroup";
4431
- const lo = pe((e, n) => {
4432
- const { layoutStyles: r, componentProps: o } = ke(e), {
4433
- className: i,
4434
- checked: t,
4435
- defaultChecked: s,
4436
- value: a,
4437
- icons: u,
4438
- error: d,
4439
- label: l,
4440
- onChange: p,
4441
- style: b,
4442
- ..._
4443
- } = o, {
4444
- checked: v = Xs,
4445
- unchecked: C = Js
4446
- } = { ...u }, g = (h) => {
4447
- p == null || p(h, { value: a, checked: h.target.checked });
4448
- }, P = ie([Ne.radio], i, {
4449
- [Ne.error]: d
4450
- }), c = {
4451
- ...b,
4452
- ...r
4453
- };
4454
- return /* @__PURE__ */ m.jsxs("label", { className: P, style: c, children: [
4455
- /* @__PURE__ */ m.jsx(
4456
- "input",
4457
- {
4458
- type: "radio",
4459
- "data-anv": "radio",
4460
- "aria-checked": t ?? s,
4461
- checked: t,
4462
- defaultChecked: s,
4463
- value: a,
4464
- onChange: g,
4465
- ref: n,
4466
- ..._
4467
- }
4468
- ),
4469
- /* @__PURE__ */ m.jsxs("span", { className: Ne["icon-wrapper"], children: [
4470
- /* @__PURE__ */ m.jsx(
4471
- Ee,
4472
- {
4473
- size: "large",
4474
- svg: C,
4475
- className: ie([Ne["icon-unchecked"]])
4476
- }
4477
- ),
4478
- /* @__PURE__ */ m.jsx(
4479
- Ee,
4480
- {
4481
- size: "large",
4482
- svg: v,
4483
- className: ie([Ne["icon-checked"]])
4484
- }
4485
- )
4486
- ] }),
4487
- l
4488
- ] });
4489
- }), Ml = Object.assign(lo, {
4490
- Group: ao
4491
- });
4492
- lo.displayName = "RadioElement";
4493
- const ra = "_legend_1w0sh_5", oa = "_children_1w0sh_6", ia = "_segment_1w0sh_4", sa = "_fill_1w0sh_82", aa = "_small_1w0sh_85", la = "_medium_1w0sh_94", Ye = {
4494
- "segmented-control": "_segmented-control_1w0sh_4",
4495
- legend: ra,
4496
- children: oa,
4497
- "select-indicator": "_select-indicator_1w0sh_7",
4498
- segment: ia,
4499
- fill: sa,
4500
- small: aa,
4501
- "icon-only": "_icon-only_1w0sh_91",
4502
- medium: la
4503
- }, uo = pe((e, n) => {
4504
- const { icon: r, value: o, children: i, className: t, ...s } = e, a = Mo(), { current: u, setCurrent: d, name: l, onChange: p } = ve(
4505
- co
4506
- ), b = J(null), _ = () => {
4507
- d == null || d(o), p == null || p(o);
4508
- }, v = ie(Ye.segment, t, {
4509
- [Ye["icon-only"]]: r && !i
4510
- });
4511
- return /* @__PURE__ */ m.jsx(m.Fragment, { children: /* @__PURE__ */ m.jsxs(
4512
- "label",
4513
- {
4514
- className: v,
4515
- ref: Me([b, n]),
4516
- "data-anv": "segmented-control-segment",
4517
- ...s,
4518
- children: [
4519
- /* @__PURE__ */ m.jsx(
4520
- "input",
4521
- {
4522
- type: "radio",
4523
- name: l,
4524
- value: o,
4525
- onChange: _,
4526
- checked: u === o,
4527
- "aria-checked": u === o
4528
- }
4529
- ),
4530
- r ? /* @__PURE__ */ m.jsx(Ee, { svg: r, "aria-hidden": !0 }) : null,
4531
- i,
4532
- u === o && /* @__PURE__ */ m.jsx(
4533
- To.span,
4534
- {
4535
- layoutId: l,
4536
- transition: {
4537
- duration: a ? 0 : 0.2
4538
- },
4539
- className: Ye["select-indicator"]
4540
- }
4541
- )
4542
- ]
4543
- }
4544
- ) });
4545
- });
4546
- uo.displayName = "Segmented Control Segment";
4547
- const co = Qe({}), po = pe((e, n) => {
4548
- const {
4549
- className: r,
4550
- onClick: o,
4551
- onChange: i,
4552
- children: t,
4553
- size: s = "medium",
4554
- defaultSelected: a,
4555
- name: u,
4556
- fill: d,
4557
- ...l
4558
- } = e, [p, b] = Y(a), _ = ie(
4559
- Ye["segmented-control"],
4560
- Ye[s],
4561
- r,
4562
- {
4563
- [Ye.fill]: d
4564
- }
4565
- ), v = we();
4566
- return /* @__PURE__ */ m.jsx(
4567
- "div",
4568
- {
4569
- role: "radiogroup",
4570
- className: _,
4571
- "data-anv": "segmented-control",
4572
- ref: n,
4573
- ...l,
4574
- children: /* @__PURE__ */ m.jsx(
4575
- co.Provider,
4576
- {
4577
- value: { current: p, setCurrent: b, name: u ?? v, onChange: i },
4578
- children: t
4579
- }
4580
- )
4581
- }
4582
- );
4583
- });
4584
- po.displayName = "Segmented Control";
4585
- const Tl = Object.assign(po, {
4586
- Segment: uo
4587
- });
4588
- const ua = "_toggle_5roin_25", da = "_indicator_5roin_39", ca = "_check_5roin_53", dt = {
4589
- switch: "_switch_5roin_4",
4590
- toggle: ua,
4591
- indicator: da,
4592
- check: ca
4593
- }, pa = pe(
4594
- (e, n) => {
4595
- const { layoutStyles: r, componentProps: o } = ke(e), {
4596
- className: i,
4597
- onChange: t,
4598
- checked: s,
4599
- defaultChecked: a,
4600
- value: u,
4601
- style: d,
4602
- ...l
4603
- } = o, p = (v) => {
4604
- t == null || t(v, { value: u, checked: v.target.checked });
4605
- }, b = ie(dt.switch, i), _ = {
4606
- ...d,
4607
- ...r
4608
- };
4609
- return /* @__PURE__ */ m.jsxs("label", { className: b, style: _, children: [
4610
- /* @__PURE__ */ m.jsx(
4611
- "input",
4612
- {
4613
- "data-anv": "switch",
4614
- ref: n,
4615
- type: "checkbox",
4616
- role: "switch",
4617
- value: u,
4618
- "aria-checked": s ?? a,
4619
- checked: s,
4620
- defaultChecked: a,
4621
- onChange: p,
4622
- ...l
4623
- }
4624
- ),
4625
- /* @__PURE__ */ m.jsx("span", { "aria-hidden": !0, className: dt.toggle, children: /* @__PURE__ */ m.jsx("span", { className: dt.indicator, children: /* @__PURE__ */ m.jsx(Ee, { svg: ur, className: dt.check }) }) }),
4626
- "label" in e && e.label
4627
- ] });
4628
- }
4629
- );
4630
- pa.displayName = "Switch";
4631
- var fa = Dt, ha = function(n) {
4632
- var r = de.useRef(n);
4633
- return fa(function() {
4634
- r.current = n;
4635
- }), r;
4636
- }, Mn = function(n, r) {
4637
- if (typeof n == "function") {
4638
- n(r);
4639
- return;
4640
- }
4641
- n.current = r;
4642
- }, ma = function(n, r) {
4643
- var o = J();
4644
- return ae(function(i) {
4645
- n.current = i, o.current && Mn(o.current, null), o.current = r, r && Mn(r, i);
4646
- }, [r]);
4647
- }, Tn = {
4648
- "min-height": "0",
4649
- "max-height": "none",
4650
- height: "0",
4651
- visibility: "hidden",
4652
- overflow: "hidden",
4653
- position: "absolute",
4654
- "z-index": "-1000",
4655
- top: "0",
4656
- right: "0"
4657
- }, ga = function(n) {
4658
- Object.keys(Tn).forEach(function(r) {
4659
- n.style.setProperty(r, Tn[r], "important");
4660
- });
4661
- }, An = ga, me = null, Hn = function(n, r) {
4662
- var o = n.scrollHeight;
4663
- return r.sizingStyle.boxSizing === "border-box" ? o + r.borderSize : o - r.paddingSize;
4664
- };
4665
- function va(e, n, r, o) {
4666
- 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);
4667
- var i = e.paddingSize, t = e.borderSize, s = e.sizingStyle, a = s.boxSizing;
4668
- Object.keys(s).forEach(function(b) {
4669
- var _ = b;
4670
- me.style[_] = s[_];
4671
- }), An(me), me.value = n;
4672
- var u = Hn(me, e);
4673
- me.value = n, u = Hn(me, e), me.value = "x";
4674
- var d = me.scrollHeight - i, l = d * r;
4675
- a === "border-box" && (l = l + i + t), u = Math.max(l, u);
4676
- var p = d * o;
4677
- return a === "border-box" && (p = p + i + t), u = Math.min(p, u), [u, d];
4678
- }
4679
- var jn = function() {
4680
- }, _a = function(n, r) {
4681
- return n.reduce(function(o, i) {
4682
- return o[i] = r[i], o;
4683
- }, {});
4684
- }, Ia = [
4685
- "borderBottomWidth",
4686
- "borderLeftWidth",
4687
- "borderRightWidth",
4688
- "borderTopWidth",
4689
- "boxSizing",
4690
- "fontFamily",
4691
- "fontSize",
4692
- "fontStyle",
4693
- "fontWeight",
4694
- "letterSpacing",
4695
- "lineHeight",
4696
- "paddingBottom",
4697
- "paddingLeft",
4698
- "paddingRight",
4699
- "paddingTop",
4700
- // non-standard
4701
- "tabSize",
4702
- "textIndent",
4703
- // non-standard
4704
- "textRendering",
4705
- "textTransform",
4706
- "width",
4707
- "wordBreak"
4708
- ], ya = !!document.documentElement.currentStyle, xa = function(n) {
4709
- var r = window.getComputedStyle(n);
4710
- if (r === null)
4711
- return null;
4712
- var o = _a(Ia, r), i = o.boxSizing;
4713
- if (i === "")
4714
- return null;
4715
- ya && i === "border-box" && (o.width = parseFloat(o.width) + parseFloat(o.borderRightWidth) + parseFloat(o.borderLeftWidth) + parseFloat(o.paddingRight) + parseFloat(o.paddingLeft) + "px");
4716
- var t = parseFloat(o.paddingBottom) + parseFloat(o.paddingTop), s = parseFloat(o.borderBottomWidth) + parseFloat(o.borderTopWidth);
4717
- return {
4718
- sizingStyle: o,
4719
- paddingSize: t,
4720
- borderSize: s
4721
- };
4722
- }, ba = xa;
4723
- function fo(e, n, r) {
4724
- var o = ha(r);
4725
- de.useLayoutEffect(function() {
4726
- var i = function(s) {
4727
- return o.current(s);
4728
- };
4729
- if (e)
4730
- return e.addEventListener(n, i), function() {
4731
- return e.removeEventListener(n, i);
4732
- };
4733
- }, []);
4734
- }
4735
- var wa = function(n) {
4736
- fo(window, "resize", n);
4737
- }, Ea = function(n) {
4738
- fo(document.fonts, "loadingdone", n);
4739
- }, Ca = ["cacheMeasurements", "maxRows", "minRows", "onChange", "onHeightChange"], Sa = function(n, r) {
4740
- var o = n.cacheMeasurements, i = n.maxRows, t = n.minRows, s = n.onChange, a = s === void 0 ? jn : s, u = n.onHeightChange, d = u === void 0 ? jn : u, l = be(n, Ca), p = l.value !== void 0, b = de.useRef(null), _ = ma(b, r), v = de.useRef(0), C = de.useRef(), g = function() {
4741
- var h = b.current, f = o && C.current ? C.current : ba(h);
4742
- if (f) {
4743
- C.current = f;
4744
- var I = va(f, h.value || h.placeholder || "x", t, i), y = I[0], j = I[1];
4745
- v.current !== y && (v.current = y, h.style.setProperty("height", y + "px", "important"), d(y, {
4746
- rowHeight: j
4747
- }));
4748
- }
4749
- }, P = function(h) {
4750
- p || g(), a(h);
4751
- };
4752
- return de.useLayoutEffect(g), wa(g), Ea(g), /* @__PURE__ */ de.createElement("textarea", F({}, l, {
4753
- onChange: P,
4754
- ref: _
4755
- }));
4756
- }, Oa = /* @__PURE__ */ de.forwardRef(Sa);
4757
- const Na = "_textarea_vmtv0_4", Da = "_counter_vmtv0_49", ka = "_error_vmtv0_61", Ra = "_disabled_vmtv0_68", Pa = "_readonly_vmtv0_78", ze = {
4758
- textarea: Na,
4759
- "has-cols": "_has-cols_vmtv0_23",
4760
- counter: Da,
4761
- error: ka,
4762
- disabled: Ra,
4763
- "disable-resize": "_disable-resize_vmtv0_75",
4764
- readonly: Pa
4765
- }, Ma = pe(
4766
- (e, n) => {
4767
- const { layoutStyles: r, componentProps: o } = ke(e), {
4768
- className: i,
4769
- disableResize: t,
4770
- error: s,
4771
- // errorAriaLive: errorAriaLiveProp = "assertive",
4772
- hint: a,
4773
- description: u,
4774
- label: d,
4775
- moreInfo: l,
4776
- onChange: p,
4777
- required: b,
4778
- showCounter: _,
4779
- onFocus: v,
4780
- onBlur: C,
4781
- id: g,
4782
- maxLength: P,
4783
- autoHeight: c,
4784
- labelProps: h,
4785
- placeholder: f,
4786
- style: I,
4787
- ...y
4788
- } = o, j = J(null), [D, K] = Y(0), [M, w] = Y(!1), [T, E] = Y(!1), [R, L] = Y("off");
4789
- ce(() => {
4790
- var $;
4791
- K((($ = j.current) == null ? void 0 : $.defaultValue.length) ?? 0);
4792
- }, []);
4793
- const B = ($) => {
4794
- p == null || p($, { value: $.target.value }), D !== $.target.value.length && w(!0), K($.target.value.length);
4795
- }, k = ($) => {
4796
- v == null || v($), E(!0);
4797
- }, X = ($) => {
4798
- C == null || C($), E(!1), L("off"), w(!1);
4799
- }, Q = we(), z = g ?? Q, G = we(), oe = we(), V = typeof s != "boolean" ? s : void 0, S = ie([ze.textarea], i, {
4800
- [ze.error]: s,
4801
- [ze["disable-resize"]]: t,
4802
- [ze.disabled]: y.disabled,
4803
- [ze.readonly]: y.readOnly,
4804
- [ze["has-cols"]]: y.cols != null
4805
- }), O = { ...I, ...r }, H = c ? Oa : "textarea";
4806
- return /* @__PURE__ */ m.jsxs(
4807
- "div",
4808
- {
4809
- className: S,
4810
- "data-anv": "textarea",
4811
- style: O,
4812
- children: [
4813
- d ? /* @__PURE__ */ m.jsx(
4814
- Nt,
4815
- {
4816
- htmlFor: z,
4817
- moreInfo: l,
4818
- openMoreInfo: T,
4819
- required: b,
4820
- ...h,
4821
- children: d
4822
- }
4823
- ) : null,
4824
- /* @__PURE__ */ m.jsx(
4825
- H,
4826
- {
4827
- rows: 3,
4828
- onChange: B,
4829
- onFocus: k,
4830
- onBlur: X,
4831
- ref: Me([n, j]),
4832
- required: b,
4833
- maxLength: P,
4834
- id: z,
4835
- placeholder: f,
4836
- ...y,
4837
- "aria-describedby": [oe, G].join(" "),
4838
- "aria-invalid": s ? !!s : void 0
4839
- }
4840
- ),
4841
- a || _ || V || u ? /* @__PURE__ */ m.jsx(
4842
- kt,
4843
- {
4844
- id: G,
4845
- hint: a,
4846
- maxLength: P,
4847
- inputLength: D,
4848
- isTyping: M,
4849
- showCounter: _,
4850
- errorMessage: V,
4851
- errorAriaLive: R,
4852
- description: u
4853
- }
4854
- ) : null,
4855
- /* @__PURE__ */ m.jsx(Kn, { "aria-hidden": !0, id: oe, children: f })
4856
- ]
4857
- }
4858
- );
4859
- }
4860
- );
4861
- Ma.displayName = "Textarea";
4862
- const Ta = "_textfield_1acx5_4", Aa = "_input_1acx5_17", Ha = "_prefix_1acx5_43", ja = "_suffix_1acx5_44", Va = "_small_1acx5_101", $a = "_large_1acx5_104", Ka = "_error_1acx5_113", Re = {
4863
- textfield: Ta,
4864
- input: Aa,
4865
- "input-wrapper": "_input-wrapper_1acx5_30",
4866
- prefix: Ha,
4867
- suffix: ja,
4868
- "loading-spinner": "_loading-spinner_1acx5_63",
4869
- small: Va,
4870
- large: $a,
4871
- error: Ka
4872
- }, Fa = pe(
4873
- function(e, n) {
4874
- const { layoutStyles: r, componentProps: o } = ke(e), {
4875
- className: i,
4876
- error: t,
4877
- errorAriaLive: s = "assertive",
4878
- label: a,
4879
- moreInfo: u,
4880
- prefix: d,
4881
- suffix: l,
4882
- size: p,
4883
- type: b = "text",
4884
- required: _,
4885
- onFocus: v,
4886
- onBlur: C,
4887
- id: g,
4888
- description: P,
4889
- hint: c,
4890
- loading: h,
4891
- disabled: f,
4892
- labelProps: I,
4893
- style: y,
4894
- placeholder: j,
4895
- ...D
4896
- } = o, [K, M] = Y(!1), [w, T] = Y("off"), E = (S) => {
4897
- v == null || v(S), M(!0), T(s);
4898
- }, R = (S) => {
4899
- C == null || C(S), M(!1), T("off");
4900
- }, L = we(), B = g ?? L, k = we(), X = we(), Q = we(), z = we(), G = J(null), oe = typeof t != "boolean" ? t : void 0, V = { ...y, ...r };
4901
- return /* @__PURE__ */ m.jsxs(
4902
- "div",
4903
- {
4904
- className: ie(Re.textfield, i),
4905
- "data-anv": "textfield",
4906
- style: V,
4907
- children: [
4908
- a ? /* @__PURE__ */ m.jsx(
4909
- Nt,
4910
- {
4911
- moreInfo: u,
4912
- openMoreInfo: K,
4913
- required: _,
4914
- htmlFor: B,
4915
- ...I,
4916
- children: a
4917
- }
4918
- ) : null,
4919
- /* @__PURE__ */ m.jsxs(
4920
- "div",
4921
- {
4922
- className: ie(Re["input-wrapper"], {
4923
- [Re.small]: p === "small",
4924
- [Re.large]: p === "large"
4925
- }),
4926
- role: "presentation",
4927
- onClick: () => {
4928
- var S;
4929
- return (S = G.current) == null ? void 0 : S.focus();
4930
- },
4931
- children: [
4932
- d ? /* @__PURE__ */ m.jsx(
4933
- "div",
4934
- {
4935
- "aria-hidden": !0,
4936
- className: Re.prefix,
4937
- id: `prefix${k}`,
4938
- children: d
4939
- }
4940
- ) : null,
4941
- /* @__PURE__ */ m.jsx(
4942
- "input",
4943
- {
4944
- id: B,
4945
- className: ie(Re.input, {
4946
- [Re.error]: t
4947
- }),
4948
- onFocus: E,
4949
- onBlur: R,
4950
- ref: Me([n, G]),
4951
- required: _,
4952
- placeholder: j,
4953
- type: b,
4954
- disabled: f,
4955
- ...D,
4956
- "aria-describedby": [z, Q].join(" "),
4957
- "aria-invalid": t ? !!t : void 0
4958
- }
4959
- ),
4960
- h ? /* @__PURE__ */ m.jsx(mo, { className: Re["loading-spinner"] }) : null,
4961
- l ? /* @__PURE__ */ m.jsx(
4962
- "div",
4963
- {
4964
- className: Re.suffix,
4965
- "aria-hidden": !0,
4966
- id: `suffix${X}`,
4967
- children: l
4968
- }
4969
- ) : null
4970
- ]
4971
- }
4972
- ),
4973
- c || oe || P ? /* @__PURE__ */ m.jsx(
4974
- kt,
4975
- {
4976
- id: Q,
4977
- hint: c,
4978
- errorMessage: oe,
4979
- errorAriaLive: w,
4980
- description: P
4981
- }
4982
- ) : null,
4983
- /* @__PURE__ */ m.jsx(Kn, { "aria-hidden": !0, id: z, children: j })
4984
- ]
4985
- }
4986
- );
4987
- }
4988
- ), Al = Object.assign(Fa, {});
4989
- export {
4990
- Xi as $,
4991
- to as B,
4992
- Ct as C,
4993
- Qi as D,
4994
- eo as E,
4995
- Pl as F,
4996
- Dl as H,
4997
- pn as J,
4998
- no as K,
4999
- Tl as L,
5000
- Zi as T,
5001
- Rl as V,
5002
- Wi as _,
5003
- Zr as a,
5004
- Ml as b,
5005
- ao as c,
5006
- uo as d,
5007
- io as e,
5008
- pa as f,
5009
- kl as g,
5010
- Al as h,
5011
- Ma as i,
5012
- Ls as q,
5013
- Nl as y
5014
- };
5015
- //# sourceMappingURL=index-ff5fea63.js.map