@npm-questionpro/wick-ui-lib 1.48.0 → 1.48.1

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 (315) hide show
  1. package/dist/ac_divergent.svg +50 -0
  2. package/dist/ac_qualitative.svg +50 -0
  3. package/dist/ac_sequential.svg +50 -0
  4. package/dist/bp_divergent.svg +130 -0
  5. package/dist/bp_qualitative.svg +53 -0
  6. package/dist/bp_sentiment.svg +76 -0
  7. package/dist/bp_sentiment_analysis.svg +112 -0
  8. package/dist/bp_sequential.svg +99 -0
  9. package/dist/favicon.ico +0 -0
  10. package/dist/index.d.ts +2 -0
  11. package/dist/order_divergent.svg +61 -0
  12. package/dist/order_qualitative.svg +57 -0
  13. package/dist/order_sequential_blue.svg +52 -0
  14. package/dist/order_sequential_green.svg +52 -0
  15. package/dist/order_sequential_orange.svg +52 -0
  16. package/dist/order_sequential_red.svg +52 -0
  17. package/dist/src/base/ui/accordion.d.ts +7 -0
  18. package/dist/src/base/ui/avatar.d.ts +6 -0
  19. package/dist/src/base/ui/button.d.ts +12 -0
  20. package/dist/src/base/ui/checkbox.d.ts +6 -0
  21. package/dist/src/base/ui/command.d.ts +74 -0
  22. package/dist/src/base/ui/dialog.d.ts +23 -0
  23. package/dist/src/base/ui/dropdownMenu.d.ts +28 -0
  24. package/dist/src/base/ui/input.d.ts +3 -0
  25. package/dist/src/base/ui/label.d.ts +5 -0
  26. package/dist/src/base/ui/popover.d.ts +6 -0
  27. package/dist/src/base/ui/radioGroup.d.ts +5 -0
  28. package/dist/src/base/ui/scrollArea.d.ts +11 -0
  29. package/dist/src/base/ui/separator.d.ts +4 -0
  30. package/dist/src/base/ui/sheet.d.ts +29 -0
  31. package/dist/src/base/ui/skeleton.d.ts +2 -0
  32. package/dist/src/base/ui/switch.d.ts +4 -0
  33. package/dist/src/base/ui/table.d.ts +10 -0
  34. package/dist/src/base/ui/textarea.d.ts +3 -0
  35. package/dist/src/base/ui/toast.d.ts +18 -0
  36. package/dist/src/base/ui/toaster.d.ts +1 -0
  37. package/dist/src/base/ui/toggle.d.ts +12 -0
  38. package/dist/src/base/ui/toggleGroup.d.ts +12 -0
  39. package/dist/src/base/ui/tooltip.d.ts +7 -0
  40. package/dist/src/base/ui/useToast.d.ts +40 -0
  41. package/dist/src/components/accordion/WuAccordion.d.ts +26 -0
  42. package/dist/src/components/accordion/WuAccordion.test.d.ts +1 -0
  43. package/dist/src/components/accordion/index.d.ts +2 -0
  44. package/dist/src/components/activityLog/WuActivityLog.d.ts +18 -0
  45. package/dist/src/components/activityLog/WuActivityLog.test.d.ts +1 -0
  46. package/dist/src/components/activityLog/index.d.ts +2 -0
  47. package/dist/src/components/appHeader/WuAppHeader.d.ts +19 -0
  48. package/dist/src/components/appHeader/WuAppHeader.test.d.ts +1 -0
  49. package/dist/src/components/appHeader/components/WuAppHeaderBar.d.ts +6 -0
  50. package/dist/src/components/appHeader/components/WuAppHeaderDropdownWrapper.d.ts +11 -0
  51. package/dist/src/components/appHeader/components/WuAppHeaderSearch.d.ts +7 -0
  52. package/dist/src/components/appHeader/components/WuAppHeaderSearch.test.d.ts +1 -0
  53. package/dist/src/components/appHeader/components/WuTruncatedLabel.d.ts +4 -0
  54. package/dist/src/components/appHeader/components/account/WuAppHeaderAccount.d.ts +10 -0
  55. package/dist/src/components/appHeader/components/account/WuAppHeaderAccount.test.d.ts +1 -0
  56. package/dist/src/components/appHeader/components/account/ui/_logoutMenuItem.d.ts +4 -0
  57. package/dist/src/components/appHeader/components/account/ui/_otherMenuItem.d.ts +5 -0
  58. package/dist/src/components/appHeader/components/account/ui/_settingsMenuItem.d.ts +5 -0
  59. package/dist/src/components/appHeader/components/account/ui/_userMenuItem.d.ts +5 -0
  60. package/dist/src/components/appHeader/components/help/WuAppHeaderHelp.d.ts +7 -0
  61. package/dist/src/components/appHeader/components/help/WuAppHeaderHelp.test.d.ts +1 -0
  62. package/dist/src/components/appHeader/components/productSwitcher/WuAppHeaderMenu.d.ts +15 -0
  63. package/dist/src/components/appHeader/components/productSwitcher/WuAppHeaderMenu.test.d.ts +1 -0
  64. package/dist/src/components/appHeader/components/productSwitcher/ui/_categoryDetails.d.ts +8 -0
  65. package/dist/src/components/appHeader/components/productSwitcher/ui/_menuTrigger.d.ts +12 -0
  66. package/dist/src/components/appHeader/components/productSwitcher/ui/_productDropdown.d.ts +17 -0
  67. package/dist/src/components/appHeader/components/productSwitcher/ui/_productItem.d.ts +9 -0
  68. package/dist/src/components/appHeader/components/productSwitcher/ui/_productList.d.ts +13 -0
  69. package/dist/src/components/appHeader/components/productSwitcher/ui/_smallScreenMenuTrigger.d.ts +16 -0
  70. package/dist/src/components/appHeader/components/productSwitcher/ui/_smallScreenToggleMenu.d.ts +10 -0
  71. package/dist/src/components/appHeader/hooks/useOnClickOutsideHook.d.ts +2 -0
  72. package/dist/src/components/appHeader/hooks/useWindowSize.d.ts +2 -0
  73. package/dist/src/components/appHeader/index.d.ts +11 -0
  74. package/dist/src/components/appHeader/types/WuAppHeaderAccount.d.ts +47 -0
  75. package/dist/src/components/appHeader/types/WuAppHeaderHelpMenu.d.ts +7 -0
  76. package/dist/src/components/appHeader/types/WuAppHeaderMenuItem.d.ts +16 -0
  77. package/dist/src/components/appHeader/utils/dataFromApi.d.ts +3 -0
  78. package/dist/src/components/appHeader/utils/headerMenuKeyboardHandlers.d.ts +6 -0
  79. package/dist/src/components/appHeader/utils/iconMap.d.ts +4 -0
  80. package/dist/src/components/button/WuButton.d.ts +13 -0
  81. package/dist/src/components/button/WuButton.test.d.ts +1 -0
  82. package/dist/src/components/button/index.d.ts +2 -0
  83. package/dist/src/components/calendar/WuCalender.d.ts +3 -0
  84. package/dist/src/components/calendar/components/datePicker/WuDatePicker.d.ts +24 -0
  85. package/dist/src/components/calendar/components/datePicker/WuDatePicker.test.d.ts +1 -0
  86. package/dist/src/components/calendar/components/dateRangePicker/WuDateRangePicker.d.ts +31 -0
  87. package/dist/src/components/calendar/components/dateRangePicker/WuDateRangePicker.test.d.ts +1 -0
  88. package/dist/src/components/calendar/index.d.ts +5 -0
  89. package/dist/src/components/calendar/shadcn/calendar.d.ts +7 -0
  90. package/dist/src/components/calendar/ui/_footer.d.ts +8 -0
  91. package/dist/src/components/calendar/ui/_nativeSidebar.d.ts +17 -0
  92. package/dist/src/components/calendar/ui/_sidebar.d.ts +12 -0
  93. package/dist/src/components/calendar/ui/_trigger.d.ts +9 -0
  94. package/dist/src/components/calendar/utils/index.d.ts +7 -0
  95. package/dist/src/components/card/WuCard.d.ts +7 -0
  96. package/dist/src/components/card/WuCard.test.d.ts +1 -0
  97. package/dist/src/components/card/index.d.ts +2 -0
  98. package/dist/src/components/checkbox/WuCheckbox.d.ts +17 -0
  99. package/dist/src/components/checkbox/WuCheckbox.test.d.ts +1 -0
  100. package/dist/src/components/checkbox/index.d.ts +2 -0
  101. package/dist/src/components/chip/WuChip.d.ts +10 -0
  102. package/dist/src/components/chip/WuChip.test.d.ts +1 -0
  103. package/dist/src/components/chip/index.d.ts +2 -0
  104. package/dist/src/components/combobox/WuCombobox.d.ts +38 -0
  105. package/dist/src/components/combobox/WuCombobox.test.d.ts +1 -0
  106. package/dist/src/components/combobox/index.d.ts +3 -0
  107. package/dist/src/components/combobox/types/IWuComboboxOptions.d.ts +16 -0
  108. package/dist/src/components/combobox/ui/_item.d.ts +14 -0
  109. package/dist/src/components/combobox/ui/_tags.d.ts +5 -0
  110. package/dist/src/components/combobox/ui/_trigger.d.ts +22 -0
  111. package/dist/src/components/combobox/utils/index.d.ts +2 -0
  112. package/dist/src/components/combobox/utils/renderItems.d.ts +13 -0
  113. package/dist/src/components/combobox/utils/separateOptions.d.ts +7 -0
  114. package/dist/src/components/combobox/utils/useResizeContent.d.ts +2 -0
  115. package/dist/src/components/copyToClipboard/WuCopyToClipboard.d.ts +8 -0
  116. package/dist/src/components/copyToClipboard/WuCopyToClipboard.test.d.ts +1 -0
  117. package/dist/src/components/copyToClipboard/index.d.ts +2 -0
  118. package/dist/src/components/drawer/WuDrawer.d.ts +17 -0
  119. package/dist/src/components/drawer/WuDrawer.test.d.ts +1 -0
  120. package/dist/src/components/drawer/index.d.ts +2 -0
  121. package/dist/src/components/drilldown/WuDrilldown.d.ts +24 -0
  122. package/dist/src/components/drilldown/WuDrilldown.test.d.ts +1 -0
  123. package/dist/src/components/drilldown/WuDrilldownTitleMenu.d.ts +9 -0
  124. package/dist/src/components/drilldown/WuDrilldownTitles.d.ts +12 -0
  125. package/dist/src/components/drilldown/index.d.ts +3 -0
  126. package/dist/src/components/footer/WuFooter.d.ts +8 -0
  127. package/dist/src/components/footer/WuFooter.test.d.ts +1 -0
  128. package/dist/src/components/footer/index.d.ts +2 -0
  129. package/dist/src/components/formGroup/WuFormGroup.d.ts +10 -0
  130. package/dist/src/components/formGroup/WuFormGroup.test.d.ts +1 -0
  131. package/dist/src/components/formGroup/components/WuInputError.d.ts +6 -0
  132. package/dist/src/components/formGroup/components/WuInputHint.d.ts +7 -0
  133. package/dist/src/components/formGroup/components/WuLabel.d.ts +3 -0
  134. package/dist/src/components/formGroup/index.d.ts +5 -0
  135. package/dist/src/components/helpButton/WuHelpButton.d.ts +7 -0
  136. package/dist/src/components/helpButton/WuHelpButton.test.d.ts +1 -0
  137. package/dist/src/components/helpButton/index.d.ts +2 -0
  138. package/dist/src/components/input/WuInput.d.ts +13 -0
  139. package/dist/src/components/input/WuInput.test.d.ts +0 -0
  140. package/dist/src/components/input/index.d.ts +2 -0
  141. package/dist/src/components/listbox/WuListbox.d.ts +44 -0
  142. package/dist/src/components/listbox/WuListbox.test.d.ts +1 -0
  143. package/dist/src/components/listbox/index.d.ts +3 -0
  144. package/dist/src/components/listbox/subComponents/WuListboxTrigger.d.ts +4 -0
  145. package/dist/src/components/listbox/ui/_item.d.ts +14 -0
  146. package/dist/src/components/listbox/ui/_search.d.ts +3 -0
  147. package/dist/src/components/listbox/ui/_selectAll.d.ts +7 -0
  148. package/dist/src/components/listbox/ui/_trigger.d.ts +20 -0
  149. package/dist/src/components/listbox/utils/search.d.ts +2 -0
  150. package/dist/src/components/listbox/utils/useGenClass.d.ts +1 -0
  151. package/dist/src/components/loader/WuLoader.d.ts +8 -0
  152. package/dist/src/components/loader/WuLoader.test.d.ts +1 -0
  153. package/dist/src/components/loader/index.d.ts +2 -0
  154. package/dist/src/components/menu/WuMenu.d.ts +24 -0
  155. package/dist/src/components/menu/WuMenu.test.d.ts +1 -0
  156. package/dist/src/components/menu/index.d.ts +10 -0
  157. package/dist/src/components/menu/ui/WuMenuCheckboxItem.d.ts +8 -0
  158. package/dist/src/components/menu/ui/WuMenuItem.d.ts +8 -0
  159. package/dist/src/components/menu/ui/WuMenuItemGroup.d.ts +8 -0
  160. package/dist/src/components/menu/ui/WuMenuRadioItem.d.ts +15 -0
  161. package/dist/src/components/menu/ui/WuMenuSeparatorItem.d.ts +2 -0
  162. package/dist/src/components/menu/ui/WuSubMenu.d.ts +13 -0
  163. package/dist/src/components/menuIcon/WuMenuIcon.d.ts +9 -0
  164. package/dist/src/components/menuIcon/WuMenuIcon.test.d.ts +1 -0
  165. package/dist/src/components/menuIcon/index.d.ts +2 -0
  166. package/dist/src/components/modal/WuModal.d.ts +32 -0
  167. package/dist/src/components/modal/WuModal.test.d.ts +1 -0
  168. package/dist/src/components/modal/index.d.ts +2 -0
  169. package/dist/src/components/monthPicker/WuMonthPicker.d.ts +16 -0
  170. package/dist/src/components/monthPicker/WuMonthPicker.test.d.ts +1 -0
  171. package/dist/src/components/monthPicker/index.d.ts +2 -0
  172. package/dist/src/components/navbar/index.d.ts +4 -0
  173. package/dist/src/components/navbar/primaryNavbar/WuPrimaryNavbar.d.ts +12 -0
  174. package/dist/src/components/navbar/primaryNavbar/WuPrimaryNavbar.test.d.ts +1 -0
  175. package/dist/src/components/navbar/secondaryNavbar/WuSecondaryNavbar.d.ts +18 -0
  176. package/dist/src/components/navbar/secondaryNavbar/WuSecondaryNavbar.test.d.ts +1 -0
  177. package/dist/src/components/pagination/WuPagination.d.ts +10 -0
  178. package/dist/src/components/pagination/WuPagination.test.d.ts +1 -0
  179. package/dist/src/components/pagination/index.d.ts +2 -0
  180. package/dist/src/components/popover/WuPopover.d.ts +14 -0
  181. package/dist/src/components/popover/WuPopover.test.d.ts +1 -0
  182. package/dist/src/components/popover/index.d.ts +2 -0
  183. package/dist/src/components/radio/WuRadioGroup.d.ts +12 -0
  184. package/dist/src/components/radio/WuRadioGroup.test.d.ts +1 -0
  185. package/dist/src/components/radio/index.d.ts +3 -0
  186. package/dist/src/components/radio/types/IWuRadioOption.d.ts +6 -0
  187. package/dist/src/components/scrollArea/WuScrollArea.d.ts +4 -0
  188. package/dist/src/components/scrollArea/WuScrollArea.test.d.ts +1 -0
  189. package/dist/src/components/scrollArea/index.d.ts +1 -0
  190. package/dist/src/components/select/WuSelect.d.ts +33 -0
  191. package/dist/src/components/select/WuSelect.test.d.ts +1 -0
  192. package/dist/src/components/select/index.d.ts +3 -0
  193. package/dist/src/components/select/types/IWuSelectOptions.d.ts +16 -0
  194. package/dist/src/components/select/ui/_item.d.ts +15 -0
  195. package/dist/src/components/select/ui/_trigger.d.ts +20 -0
  196. package/dist/src/components/select/utils/renderItems.d.ts +10 -0
  197. package/dist/src/components/select/utils/useOptionDestructure.d.ts +8 -0
  198. package/dist/src/components/select/utils/useResizeContent.d.ts +2 -0
  199. package/dist/src/components/select/utils/useSortedSelectOptions.d.ts +4 -0
  200. package/dist/src/components/sidebar/WuSidebar.d.ts +33 -0
  201. package/dist/src/components/sidebar/WuSidebar.test.d.ts +1 -0
  202. package/dist/src/components/sidebar/index.d.ts +2 -0
  203. package/dist/src/components/sidebar/shadcn/sidebar.d.ts +44 -0
  204. package/dist/src/components/spotlight/WuSpotlight.d.ts +16 -0
  205. package/dist/src/components/spotlight/WuSpotlight.test.d.ts +1 -0
  206. package/dist/src/components/spotlight/index.d.ts +2 -0
  207. package/dist/src/components/stackedCard/WuStackedCard.d.ts +29 -0
  208. package/dist/src/components/stackedCard/WuStackedCard.test.d.ts +1 -0
  209. package/dist/src/components/stackedCard/index.d.ts +3 -0
  210. package/dist/src/components/stackedCard/utils/constant.d.ts +1 -0
  211. package/dist/src/components/stackedCard/utils/helper.d.ts +16 -0
  212. package/dist/src/components/stepper/WuStepper.d.ts +15 -0
  213. package/dist/src/components/stepper/WuStepper.test.d.ts +1 -0
  214. package/dist/src/components/stepper/index.d.ts +2 -0
  215. package/dist/src/components/surveySelect/WuSurveySelect.d.ts +5 -0
  216. package/dist/src/components/surveySelect/WuSurveySelect.test.d.ts +1 -0
  217. package/dist/src/components/surveySelect/index.d.ts +6 -0
  218. package/dist/src/components/surveySelect/subComponents/WuSharedSurvey.d.ts +3 -0
  219. package/dist/src/components/surveySelect/subComponents/WuSurveyItem.d.ts +3 -0
  220. package/dist/src/components/surveySelect/subComponents/WuSurveyList.d.ts +3 -0
  221. package/dist/src/components/surveySelect/subComponents/WuSurveySource.d.ts +8 -0
  222. package/dist/src/components/surveySelect/types/index.d.ts +15 -0
  223. package/dist/src/components/switcher/WuSwitcher.d.ts +25 -0
  224. package/dist/src/components/switcher/WuSwitcher.test.d.ts +1 -0
  225. package/dist/src/components/switcher/index.d.ts +4 -0
  226. package/dist/src/components/switcher/types/IWuSwitcherOption.d.ts +4 -0
  227. package/dist/src/components/switcher/types/IWuSwitcherOptions.d.ts +2 -0
  228. package/dist/src/components/switcher/ui/_iconTab.d.ts +11 -0
  229. package/dist/src/components/switcher/ui/_tab.d.ts +12 -0
  230. package/dist/src/components/switcher/ui/_toggle.d.ts +11 -0
  231. package/dist/src/components/tab/WuTab.d.ts +15 -0
  232. package/dist/src/components/tab/WuTab.test.d.ts +1 -0
  233. package/dist/src/components/tab/components/BaseTabContent.d.ts +8 -0
  234. package/dist/src/components/tab/hooks/useHorizontalTabScroll.d.ts +8 -0
  235. package/dist/src/components/tab/hooks/useTabIndicator.d.ts +9 -0
  236. package/dist/src/components/tab/hooks/useVerticalTabScroll.d.ts +8 -0
  237. package/dist/src/components/tab/index.d.ts +3 -0
  238. package/dist/src/components/tab/shadcn/tabs.d.ts +7 -0
  239. package/dist/src/components/tab/types/IWuItems.d.ts +5 -0
  240. package/dist/src/components/tab/ui/_horizontalTab.d.ts +3 -0
  241. package/dist/src/components/tab/ui/_verticalTab.d.ts +3 -0
  242. package/dist/src/components/table/components/dataTable/WuDataTable.d.ts +31 -0
  243. package/dist/src/components/table/components/dataTable/WuDataTable.test.d.ts +1 -0
  244. package/dist/src/components/table/components/table/WuTable.d.ts +35 -0
  245. package/dist/src/components/table/components/table/WuTable.test.d.ts +1 -0
  246. package/dist/src/components/table/hooks/useRowSelection.d.ts +11 -0
  247. package/dist/src/components/table/hooks/useTableCore.d.ts +19 -0
  248. package/dist/src/components/table/hooks/useTableScroll.d.ts +6 -0
  249. package/dist/src/components/table/index.d.ts +8 -0
  250. package/dist/src/components/table/types/IColumnDefaultSorting.d.ts +4 -0
  251. package/dist/src/components/table/types/IWuRowSelection.d.ts +10 -0
  252. package/dist/src/components/table/types/IWuTableColumnDef.d.ts +11 -0
  253. package/dist/src/components/table/ui/_body.d.ts +15 -0
  254. package/dist/src/components/table/ui/_header.d.ts +17 -0
  255. package/dist/src/components/table/ui/_virtualBody.d.ts +20 -0
  256. package/dist/src/components/table/utils/data.d.ts +65 -0
  257. package/dist/src/components/table/utils/tableHelpers.d.ts +16 -0
  258. package/dist/src/components/table/utils/tableStyles.d.ts +7 -0
  259. package/dist/src/components/table/utils/variantClass.d.ts +3 -0
  260. package/dist/src/components/textarea/WuTextarea.d.ts +8 -0
  261. package/dist/src/components/textarea/WuTextarea.test.d.ts +1 -0
  262. package/dist/src/components/textarea/index.d.ts +2 -0
  263. package/dist/src/components/timePicker/WuTimePicker.d.ts +9 -0
  264. package/dist/src/components/timePicker/WuTimePicker.test.d.ts +1 -0
  265. package/dist/src/components/timePicker/components/timeColumn.d.ts +11 -0
  266. package/dist/src/components/timePicker/hooks/useRotatedArrays.d.ts +5 -0
  267. package/dist/src/components/timePicker/hooks/useTimePickerScroll.d.ts +1 -0
  268. package/dist/src/components/timePicker/index.d.ts +2 -0
  269. package/dist/src/components/timePicker/utils/timePickerUtils.d.ts +12 -0
  270. package/dist/src/components/toast/WuToast.d.ts +1 -0
  271. package/dist/src/components/toast/WuToast.test.d.ts +1 -0
  272. package/dist/src/components/toast/hooks/useWuShowToast.d.ts +11 -0
  273. package/dist/src/components/toast/index.d.ts +3 -0
  274. package/dist/src/components/toast/types/IWuToastOptions.d.ts +5 -0
  275. package/dist/src/components/toggle/WuToggle.d.ts +8 -0
  276. package/dist/src/components/toggle/WuToggle.test.d.ts +1 -0
  277. package/dist/src/components/toggle/index.d.ts +2 -0
  278. package/dist/src/components/tooltip/WuTooltip.d.ts +15 -0
  279. package/dist/src/components/tooltip/WuTooltip.test.d.ts +1 -0
  280. package/dist/src/components/tooltip/index.d.ts +2 -0
  281. package/dist/src/components/typography/WuTypography.d.ts +21 -0
  282. package/dist/src/components/typography/WuTypography.test.d.ts +1 -0
  283. package/dist/src/components/typography/iconClasses.d.ts +1 -0
  284. package/dist/src/components/typography/index.d.ts +1 -0
  285. package/dist/src/components/useTranslation/WuTranslation.test.d.ts +1 -0
  286. package/dist/src/components/useTranslation/WuTranslationContext.d.ts +2 -0
  287. package/dist/src/components/useTranslation/WuTranslationProvider.d.ts +6 -0
  288. package/dist/src/components/useTranslation/index.d.ts +4 -0
  289. package/dist/src/components/useTranslation/types/index.d.ts +8 -0
  290. package/dist/src/components/useTranslation/useTranslationContext.d.ts +3 -0
  291. package/dist/src/components/virtualScroll/WuVirtualScroll.d.ts +11 -0
  292. package/dist/src/components/virtualScroll/WuVirtualScroll.test.d.ts +1 -0
  293. package/dist/src/components/virtualScroll/index.d.ts +2 -0
  294. package/dist/src/docs/Icons.d.ts +2 -0
  295. package/dist/src/docs/Theme.d.ts +3 -0
  296. package/dist/src/docs/Typography.d.ts +4 -0
  297. package/dist/src/docs/ui/chartColor.d.ts +4 -0
  298. package/dist/src/docs/ui/colorSystem.d.ts +10 -0
  299. package/dist/src/hooks/index.d.ts +1 -0
  300. package/dist/src/hooks/useAnimation.d.ts +9 -0
  301. package/dist/src/hooks/useAnimation.test.d.ts +1 -0
  302. package/dist/src/hooks/useMobile.d.ts +1 -0
  303. package/dist/src/hooks/useResizeList.d.ts +10 -0
  304. package/dist/src/index.d.ts +53 -0
  305. package/dist/src/lib/testUtils.d.ts +2 -0
  306. package/dist/src/lib/utils.d.ts +15 -0
  307. package/dist/src/translate/WuTranslate.d.ts +5 -0
  308. package/dist/src/translate/WuTranslateContext.d.ts +17 -0
  309. package/dist/src/translate/WuTranslateContext.test.d.ts +1 -0
  310. package/dist/src/translate/index.d.ts +3 -0
  311. package/dist/src/translate/wt.d.ts +13 -0
  312. package/dist/style.css +1 -0
  313. package/dist/wick-ui-lib/es/index.js +15745 -0
  314. package/dist/wick-ui-lib/umd/index.js +20 -0
  315. package/package.json +2 -2
@@ -0,0 +1,20 @@
1
+ (function(k,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("react/jsx-runtime"),require("@radix-ui/react-avatar"),require("react"),require("clsx"),require("tailwind-merge"),require("@radix-ui/react-accordion"),require("react-day-picker"),require("@radix-ui/react-slot"),require("class-variance-authority"),require("@radix-ui/react-checkbox"),require("@radix-ui/react-label"),require("cmdk"),require("@radix-ui/react-popover"),require("@radix-ui/react-tooltip"),require("react-virtuoso"),require("@radix-ui/react-dropdown-menu"),require("@tanstack/react-table"),require("date-fns"),require("@radix-ui/react-dialog"),require("@radix-ui/react-scroll-area"),require("@radix-ui/react-radio-group"),require("@radix-ui/react-separator"),require("react-dom"),require("@radix-ui/react-toggle-group"),require("@radix-ui/react-toggle"),require("@radix-ui/react-tabs"),require("@radix-ui/react-toast"),require("@radix-ui/react-switch")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@radix-ui/react-avatar","react","clsx","tailwind-merge","@radix-ui/react-accordion","react-day-picker","@radix-ui/react-slot","class-variance-authority","@radix-ui/react-checkbox","@radix-ui/react-label","cmdk","@radix-ui/react-popover","@radix-ui/react-tooltip","react-virtuoso","@radix-ui/react-dropdown-menu","@tanstack/react-table","date-fns","@radix-ui/react-dialog","@radix-ui/react-scroll-area","@radix-ui/react-radio-group","@radix-ui/react-separator","react-dom","@radix-ui/react-toggle-group","@radix-ui/react-toggle","@radix-ui/react-tabs","@radix-ui/react-toast","@radix-ui/react-switch"],a):(k=typeof globalThis<"u"?globalThis:k||self,a(k["wick-ui-lib"]={},k["react/jsx-runtime"],k.RadixUIAvatar,k.React,k.clsx,k.tailwindMerge,k.RadixUIAccordion,k.ReactDayPicker,k.RadixUISlot,k.ClassVarianceAuthority,k.RadixUICheckbox,k.RadixUILabel,k.cmdk,k.RadixUIPopover,k.RadixUITooltip,k.ReactVirtuoso,k.RadixUIDropdownMenu,k.TanstackReactTable,k.dateFns,k.RadixUIDialog,k.RadixUIScrollArea,k.RadixUIRadioGroup,k.RadixUISeparator,k.ReactDOM,k.RadixUIToggleGroup,k.RadixUIToggle,k.RadixUITabs,k.RadixUIToast,k.RadixUISwitch))})(this,(function(k,a,St,f,Ld,Fd,Wd,Ra,Ct,Be,Bd,$d,Ne,jt,Lr,eo,qd,Ve,z,to,Hd,zd,Ud,jd,Gd,Kd,Yd,Xd,Zd){"use strict";var Xv=Object.defineProperty;var Zv=(k,a,St)=>a in k?Xv(k,a,{enumerable:!0,configurable:!0,writable:!0,value:St}):k[a]=St;var Te=(k,a,St)=>Zv(k,typeof a!="symbol"?a+"":a,St);var Od;function me(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Tt=me(St),E=me(f),it=me(Wd),Fr=me(Bd),no=me($d),Gt=me(jt),Kt=me(Lr),se=me(qd),re=me(to),ut=me(Hd),Yt=me(zd),ro=me(Ud),Jd=me(jd),kn=me(Gd),so=me(Kd),lt=me(Yd),Ee=me(Xd),Wr=me(Zd),Qd=Fd.extendTailwindMerge({prefix:"wu-"});function h(...e){return Qd(Ld.clsx(e))}const Br=e=>{window==null||window.open(e,"_blank","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=800,height=600")};function $r(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}function Dn(e){switch(e){case"top":return"wu-flex-col-reverse";case"left":return"wu-flex-row-reverse wu-gap-2";case"right":return"wu-flex-row wu-gap-2";default:return""}}const Rd=e=>e?/\S+@questionpro\.com/.test(e):!1,ao=it.Root,qr=E.forwardRef(({className:e,...t},n)=>a.jsx(it.Item,{ref:n,className:h("wu-border-b",e),...t}));qr.displayName="AccordionItem";const Hr=E.forwardRef(({className:e,children:t,...n},r)=>a.jsx(it.Header,{className:"wu-flex",children:a.jsxs(it.Trigger,{ref:r,className:h("wu-flex wu-flex-1 wu-text-xs wu-items-center wu-justify-between wu-p-2 wu-transition-all","[&[data-state=open]>.wu-arrow-icon]:wu-rotate-180",e),...n,children:[t,a.jsx("span",{className:"wu-arrow-icon wm-keyboard-arrow-down wu-transition-transform wu-duration-200"})]})}));Hr.displayName=it.Trigger.displayName;const zr=E.forwardRef(({className:e,children:t,...n},r)=>a.jsx(it.Content,{ref:r,className:"wu-overflow-hidden wu-text-xs wu-px-2 wu-font-light wu-transition-all data-[state=closed]:wu-animate-accordion-up data-[state=open]:wu-animate-accordion-down",...n,children:a.jsx("div",{className:h("wu-pb-4 wu-pt-0",e),children:t})}));zr.displayName=it.Content.displayName;const ew=e=>{const{items:t,className:n,dir:r="ltr"}=e;if(e.type==="multiple"){const{defaultValue:s=[],value:o,onValueChange:i}=e;return a.jsx(ao,{type:"multiple",className:"wu-w-full wu-accordion-container",defaultValue:s,value:o,onValueChange:i,dir:r,children:t.map(({value:u,Summary:l,Details:d,className:c})=>a.jsxs(qr,{value:u,dir:r,className:h(n,c),children:[a.jsx(Hr,{dir:r,className:"wu-accordion-summary",children:l}),a.jsx(zr,{dir:r,className:"wu-accordion-details",children:d})]},u))})}else{const{defaultValue:s,value:o,onValueChange:i}=e;return a.jsx(ao,{type:"single",className:"wu-w-full wu-accordion-container",defaultValue:s,value:o,onValueChange:i,dir:r,collapsible:!0,children:t.map(({value:u,Summary:l,Details:d,className:c})=>a.jsxs(qr,{value:u,dir:r,className:h(n,c),children:[a.jsx(Hr,{dir:r,className:"wu-accordion-summary",children:l}),a.jsx(zr,{dir:r,className:"wu-accordion-details",children:d})]},u))})}},Ur=E.forwardRef(({className:e,...t},n)=>a.jsx(Tt.Root,{ref:n,className:h("wu-relative wu-flex wu-h-10 wu-w-10 wu-shrink-0 wu-overflow-hidden wu-rounded-full",e),...t}));Ur.displayName=Tt.Root.displayName;const jr=E.forwardRef(({className:e,...t},n)=>a.jsx(Tt.Image,{ref:n,className:h("wu-aspect-square wu-h-full wu-w-full",e),...t}));jr.displayName=Tt.Image.displayName;const Gr=E.forwardRef(({className:e,...t},n)=>a.jsx(Tt.Fallback,{ref:n,className:h("wu-flex wu-h-full wu-w-full wu-items-center wu-justify-center wu-rounded-full wu-bg-muted",e),...t}));Gr.displayName=Tt.Fallback.displayName;const we={timelineContainer:"_timelineContainer_1rtax_1",mainVerticalLine:"_mainVerticalLine_1rtax_5",dateGroup:"_dateGroup_1rtax_9",dateHeader:"_dateHeader_1rtax_13",dateDot:"_dateDot_1rtax_17",dateText:"_dateText_1rtax_21",logList:"_logList_1rtax_25",logItem:"_logItem_1rtax_29",timelineDotSmall:"_timelineDotSmall_1rtax_33",content:"_content_1rtax_37",time:"_time_1rtax_1",tags:"_tags_1rtax_45",tag:"_tag_1rtax_45",tagPrimary:"_tagPrimary_1rtax_53",tagSecondary:"_tagSecondary_1rtax_57",userActionRow:"_userActionRow_1rtax_61",avatar:"_avatar_1rtax_65",actionText:"_actionText_1rtax_69",userName:"_userName_1rtax_73"},Je=(e,t)=>t.includes(".")?t.split(".").reduce((n,r)=>n==null?void 0:n[r],e):e==null?void 0:e[t],tw=({log:e,accessorKey:t})=>{const n=Je(e,t.time),r=Je(e,t.userName),s=Je(e,t.userInitials),o=Je(e,t.userImage??""),i=Je(e,t.tags??""),u=Je(e,t.description);return a.jsxs("div",{className:we.logItem,"data-slot":"log-item",children:[a.jsx("div",{className:we.timelineDotSmall,"data-slot":"timeline-dot-small"}),a.jsxs("div",{className:we.content,"data-slot":"content",children:[a.jsx("div",{className:we.time,"data-slot":"time",children:n}),(i==null?void 0:i.length)>0&&a.jsx("div",{className:we.tags,"data-slot":"tags",children:i.map((l,d)=>a.jsx("span",{className:h(we.tag,d===0?we.tagPrimary:we.tagSecondary),"data-slot":"tag",children:l},l))}),a.jsxs("div",{className:we.userActionRow,"data-slot":"user-action-row",children:[a.jsxs(Ur,{className:we.avatar,"data-slot":"avatar",children:[a.jsx(jr,{src:o,alt:r,"data-slot":"log-user-avatar-image"}),a.jsx(Gr,{className:"wu-text-[10px] wu-bg-slate-400 wu-text-white","data-slot":"log-user-avatar-fallback",children:s})]}),a.jsxs("p",{className:we.actionText,"data-slot":"action-text",children:[a.jsx("span",{className:we.userName,"data-slot":"log-username",children:r})," ",u]})]})]})]})},nw=f.memo(tw),rw=({logs:e,accessorKey:t,className:n,...r})=>{const s=f.useMemo(()=>e.reduce((o,i)=>{const u=Je(i,t.date);return u&&(o[u]=o[u]||[],o[u].push(i)),o},{}),[e,t.date]);return a.jsxs("div",{className:h(we.timelineContainer,n),"data-slot":"timeline-container",...r,children:[a.jsx("div",{className:we.mainVerticalLine,"data-slot":"main-vertical-line"}),Object.entries(s).map(([o,i])=>a.jsxs("div",{className:we.dateGroup,"data-slot":"date-group",children:[a.jsxs("div",{className:we.dateHeader,"data-slot":"date-header",children:[a.jsx("div",{className:we.dateDot,"data-slot":"date-dot"}),a.jsx("span",{className:we.dateText,"data-slot":"date-text",children:o})]}),a.jsx("div",{className:we.logList,"data-slot":"log-list",children:i.map(u=>{const l=Je(u,t.id);return a.jsx(nw,{log:u,accessorKey:t},l)})})]},o))]})};function Kr(e,t){f.useEffect(()=>{const n=r=>{Array.isArray(e)&&e.some(s=>!s.current||s.current.contains(r.target))||!Array.isArray(e)&&(!e.current||e.current.contains(r.target))||t(r)};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}},[e,t])}const Yr={dropdownContainer:"_dropdownContainer_vvlo9_1",open:"_open_vvlo9_1",dropdownMenu:"_dropdownMenu_vvlo9_1"},oo=({dir:e,Trigger:t,triggerClassName:n,DropdownContent:r,isAllowActiveStyle:s})=>{const[o,i]=f.useState(!1),u=f.useRef(null),l=f.useRef(null);Kr([u,l],()=>i(!1));const d=()=>{i(!o)};return a.jsx(a.Fragment,{children:a.jsx("div",{className:Yr.dropdownContainer,children:a.jsx("ul",{children:a.jsxs("li",{className:h("wu-flex wu-relative",o&&Yr.open),children:[a.jsx("button",{className:h("wu-w-8 wu-h-8 wu-rounded-full focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft focus-visible:wu-ring-offset-2 focus-visible:wu-ring-offset-gray-switcher",n,s&&o&&"wu-bg-white wu-text-blue-switcher"),onClick:c=>{c.preventDefault(),d()},ref:l,"aria-label":"dropdown-trigger",children:t}),a.jsx("div",{className:h(Yr.dropdownMenu,{open:o},e==="rtl"?"wu-left-[-10px] wu-top-[38px]":"wu-right-[-7px] wu-top-[38px]"),dir:e,ref:u,"aria-label":"user-menu",children:r})]})})})})},ct=f.forwardRef((e,t)=>sw(e,t)),sw=(e,t)=>{const{size:n="md",color:r="#1B87E6",variant:s="dots",...o}=e,i=h("wu-w-[4em] wu-h-[1em] wu-inline-block wu-text-xs wu-relative wu-loader-dot-container");let u="7px";n==="sm"?u="7px":n==="md"?u="12px":n==="lg"?u="18px":typeof n=="string"&&(u=n);const l={backgroundColor:r,width:u,height:u},d=a.jsxs("div",{...o,ref:t,className:h("wu-flex wu-items-center wu-justify-center wu-gap-2 wu-w-fit",e.className),role:"status","aria-busy":"true",children:[a.jsx("div",{className:"wu-w-12 wu-h-12 wu-border-2 wu-rounded-full wu-animate-spin",style:{width:u,height:u,borderTopColor:r}}),e.message&&a.jsx("p",{className:"wu-inline-block wu-loader-message",children:e.message})]}),c=a.jsxs("div",{...o,ref:t,className:h("wu-flex wu-items-center wu-justify-center wu-gap-2 wu-w-fit",e.className),role:"alert","aria-busy":"true",children:[a.jsxs("ul",{className:i,style:{fontSize:u},role:"loader",children:[a.jsx("li",{className:"wu-dot wu-loader-dot",style:l}),a.jsx("li",{className:"wu-dot wu-loader-dot",style:l}),a.jsx("li",{className:"wu-dot wu-loader-dot",style:l}),a.jsx("li",{className:"wu-dot wu-loader-dot",style:l})]}),e.message&&a.jsx("p",{className:"wu-inline-block wu-loader-message",children:e.message})]});return a.jsx(a.Fragment,{children:s==="spinner"?d:c})};ct.displayName="WuLoader";const aw={wuButton:"_wuButton_1ftm8_1"},Ie=f.forwardRef(({disabled:e,loading:t,variant:n="primary",size:r="md",Icon:s,iconPosition:o="left",children:i,floating:u,className:l,color:d="primary",selected:c,...w},m)=>a.jsxs("button",{ref:m,disabled:e||t,"data-variant":n,"data-size":r,"data-color":d,"data-loading":t||void 0,"data-selected":c||void 0,"data-floating":u||void 0,"data-icon-position":o,className:h(aw.wuButton,l),...w,children:[!t&&s&&a.jsx(a.Fragment,{children:s}),t&&a.jsx(ct,{color:d==="neutral"?"#000":"#fff",size:n==="iconOnly"?"lg":"sm",variant:n==="iconOnly"?"spinner":"dots"}),!t&&i]}));Ie.displayName="WuButton";const ow=({onLogout:e,DataCenter:t})=>a.jsxs("section",{className:"wu-flex wu-justify-between wu-px-4 wu-py-4 wu-text-white wu-bg-gray-lead",children:[a.jsx("div",{className:"wu-flex-1 wu-flex wu-items-start",children:t}),a.jsx(Ie,{variant:"outline",size:"sm",Icon:a.jsx("span",{className:"wm-logout"}),className:"wu-text-white wu-bg-transparent wu-ring-white hover:wu-bg-gray-10 hover:wu-text-gray-lead hover:wu-ring-gray-lead",onClick:e,"aria-label":"logout",children:"LOGOUT"})]}),iw=({user:e,dir:t})=>{const n=[e!=null&&e.usage&&Object.keys(e.usage).length>0?{title:e.usage.title,url:e.usage.url,icon:"wm-bar-chart wu-text-base",node:a.jsxs("div",{className:"wu-flex wu-flex-col wu-items-center wu-w-20",children:[a.jsx("code",{className:"wu-font-medium",children:e.usage.collectedResponseCount||"0"}),a.jsx("span",{className:"wu-text-xs wu-font-normal",children:"Responses"})]})}:null,e!=null&&e.invoice&&Object.keys(e.invoice).length>0?{title:e.invoice.title,url:e.invoice.url,icon:"wm-attach-money wu-text-base wu-font-semibold",node:a.jsx("div",{className:"wu-flex wu-justify-center wu-items-center wu-w-20",children:a.jsx("code",{children:e.invoice.size})})}:null].filter(Boolean);return a.jsxs(a.Fragment,{children:[a.jsx("ul",{children:n.map(({title:r,url:s,icon:o,node:i},u)=>a.jsx("li",{className:u<n.length-1?"wu-border-b wu-border-gray-subtle":"",children:a.jsxs("a",{href:s,className:h("wu-flex items-center wu-justify-between wu-py-2 hover:wu-bg-gray-20 focus-within:wu-bg-gray-20 focus:wu-outline-none",t==="rtl"?"wu-pl-4":"wu-pr-4"),children:[a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2",children:[a.jsx("span",{className:h(o,"wu-w-12 wu-text-center")}),a.jsx("span",{children:r})]}),i]})},u))}),a.jsx("hr",{className:"wu-border-gray-subtle"})]})},uw=({settings:e,dir:t})=>a.jsxs(a.Fragment,{children:[a.jsx("hr",{className:"wu-border-gray-subtle"}),a.jsxs("section",{className:"wu-relative wu-flex wu-items-center wu-justify-start wu-gap-2",children:[a.jsx("span",{className:h("wu-absolute wm-settings wu-text-base",t==="rtl"?"wu-right-4":"wu-left-4")}),a.jsx("ul",{className:"wu-w-full",dir:t,children:e==null?void 0:e.map(n=>a.jsx("li",{tabIndex:-1,dir:t,children:a.jsx("a",{href:n.url,className:h("wu-inline-block wu-w-full wu-py-2 hover:wu-bg-gray-20 focus-within:wu-bg-gray-20 focus:wu-outline-none",t==="rtl"?"wu-pr-14 wu-text-right":"wu-pl-14"),children:n.title})},n.title))})]}),a.jsx("hr",{className:"wu-border-gray-subtle"})]}),lw=({user:e,dir:t})=>{var n,r,s,o,i,u,l,d,c;return a.jsxs("section",{className:h("wu-flex wu-gap-2 wu-p-4 wu-w-full",t==="rtl"?"wu-pr-0":"wu-pl-0"),children:[a.jsx("div",{className:"wu-flex wu-items-center wu-justify-center wu-w-12",children:a.jsx("span",{className:"wu-text-base wm-person"})}),a.jsxs("div",{className:h("wu-flex wu-flex-col wu-gap-1",t==="rtl"&&"wu-text-right"),children:[a.jsx("p",{children:(n=e==null?void 0:e.profile)==null?void 0:n.title}),a.jsxs("a",{href:(r=e==null?void 0:e.license)==null?void 0:r.url,className:"hover:wu-text-blue-p wu-group/license focus:wu-outline-none focus:wu-text-blue-p",dir:t,children:[a.jsx("p",{children:(s=e==null?void 0:e.profile)==null?void 0:s.subtitle}),a.jsx("p",{className:"wu-font-light",children:(o=e==null?void 0:e.profile)==null?void 0:o.companyName})]}),(e==null?void 0:e.license)&&Object.keys(e.license).length>0&&a.jsxs("div",{className:"wu-flex wu-items-center wu-justify-between wu-gap-6 wu-mt-3",dir:t,children:[a.jsx("a",{href:(i=e==null?void 0:e.license)==null?void 0:i.url,className:"hover:wu-text-blue-p wu-group/license focus:wu-outline-none focus:wu-text-blue-p",children:a.jsxs("div",{className:"wu-flex wu-flex-col wu-items-start wu-gap-1",children:[a.jsx("p",{className:"wu-font-normal",children:(u=e==null?void 0:e.license)==null?void 0:u.subtitle}),a.jsx("button",{tabIndex:-1,className:"wu-px-3 wu-py-1 wu-border wu-rounded-sm wu-border-gray-subtle group-hover/license:wu-border-blue-p",children:(l=e==null?void 0:e.license)==null?void 0:l.title})]})}),a.jsxs("div",{className:"wu-flex wu-flex-col wu-items-start wu-gap-1",dir:t,children:[a.jsx("p",{className:"wu-font-normal",children:(d=e==null?void 0:e.license)==null?void 0:d.expiryDatePostFixString}),a.jsx("p",{children:(c=e==null?void 0:e.license)==null?void 0:c.expiryDate})]})]})]})]})},io=({user:e,onLogout:t,dir:n,DataCenter:r})=>{var s,o;return e?a.jsx(oo,{Trigger:a.jsxs(Ur,{className:h("wu-group wu-border wu-border-white wu-text-sm wu-font-medium wu-bg-transparent wu-w-8 wu-h-8 wu-ring-white wu-leading-[33px] wu-text-white wu-transition-colors hover:wu-bg-white hover:wu-text-gray-switcher wu-header-user-avatar"),children:[a.jsx(jr,{className:"hover:wu-opacity-80",src:(s=e==null?void 0:e.profile)==null?void 0:s.profilePicture,alt:"User"}),a.jsx(Gr,{children:(o=e==null?void 0:e.profile)==null?void 0:o.initials})]}),dir:n,triggerClassName:"wu-rounded-full focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft focus-visible:wu-ring-offset-2 focus-visible:wu-ring-offset-gray-switcher wu-w-8 wu-h-8 wu-app-user-button",DropdownContent:a.jsxs("div",{className:h("wu-p-0 wu-text-xs wu-font-medium wu-border wu-rounded-none wu-min-w-72 wu-w-max wu-max-w-96 wu-border-gray-subtle wu-text-gray-lead wu-overflow-hidden wu-bg-white"),dir:n,children:[a.jsx(lw,{user:e,dir:n}),(e==null?void 0:e.settings)&&e.settings.length>0&&a.jsx(uw,{settings:e.settings,dir:n}),a.jsx(iw,{user:e,dir:n}),a.jsx(ow,{onLogout:t,DataCenter:r})]})}):null},uo=({menuList:e,dir:t})=>{const n=[{icon:"wm-help",title:"Help center",subTitle:"Knowledge Base",link:"https://www.questionpro.com/help/"},{icon:"wm-live-tv",title:"Free training",subTitle:"Webinar",link:"https://www.questionpro.com/training"},{icon:"wm-local-fire-department",title:"Updates",subTitle:"What's new!",link:"https://www.questionpro.com/updates/"},{icon:"wm-support-agent",title:"Live support",subTitle:"Support",link:"https://www.questionpro.com/a/liveperson.do?mode=launch&pageMode=quickChat",target:"window"},{icon:"wm-book-2",title:"Org wiki",subTitle:"wiki",link:"https://www.questionpro.com/a/liveperson.do?mode=launch&pageMode=quickChat",target:"window"}];return a.jsx(oo,{dir:t,Trigger:a.jsx("span",{className:"wm-question-mark wu-text-xl"}),triggerClassName:"wu-w-8 wu-h-8 wu-flex wu-items-center wu-justify-center wu-rounded-full wu-border wu-border-white focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft focus-visible:wu-ring-offset-2 focus-visible:wu-ring-offset-gray-switcher wu-text-white wu-transition-colors hover:wu-bg-white hover:wu-text-blue-switcher wu-app-header-help",isAllowActiveStyle:!0,DropdownContent:a.jsx("ul",{children:(e||n).map((r,s)=>a.jsx("li",{className:"wu-p-0 wu-w-[136px]",dir:t,children:r.target==="window"?a.jsx("a",{tabIndex:0,rel:"noopener noreferrer",onClick:()=>Br(r.link),onKeyDown:o=>{o.key==="Enter"&&Br(r.link)},className:`wu-block wu-w-full wu-h-full wu-px-3 wu-py-2 hover:wu-bg-black hover:wu-bg-opacity-[.04] focus-visible:wu-border-none focus-visible:wu-bg-black
2
+ focus-visible:wu-bg-opacity-[.04] focus-visible:wu-ring-0 focus-visible:wu-outline-none focus-visible:wu-ring-offset-0 wu-cursor-pointer`,children:a.jsx(lo,{item:r,dir:t})}):a.jsx("a",{href:r.link,target:"_blank",className:`wu-block wu-w-full wu-h-full wu-px-3 wu-py-2 hover:wu-bg-black hover:wu-bg-opacity-[0.04] focus-visible:wu-border-none
3
+ focus-visible:wu-bg-black
4
+ focus-visible:wu-bg-opacity-[.04] focus-visible:wu-ring-0 focus-visible:wu-outline-none focus-visible:wu-ring-offset-0`,rel:"noreferrer",children:a.jsx(lo,{item:r,dir:t})})},s))})})},lo=({item:e,dir:t})=>a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-[5px]",dir:t,children:[a.jsx("div",{className:"wu-flex wu-items-center wu-justify-center wu-w-6 wu-h-6",children:a.jsx("span",{className:h("wu-text-xl wu-text-gray-lead",e.icon)})}),a.jsx("p",{className:"wu-text-sm wu-text-gray-lead",children:e.title})]}),cw=e=>{const[t,n]=f.useState(()=>window.innerWidth<=e);return f.useEffect(()=>{const r=()=>{n(window.innerWidth<=e)};return window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}},[e]),t};function dw({productCategories:e,openCategory:t,setOpenCategory:n}){const r=(u,l)=>{const d=l[u];if(d){d.focus();const c=e[u]||null;n(c)}},s=(u,l,d,c)=>{u.preventDefault();const w=d==="down"?l+1:l-1;r(w,c)},o=(u,l,d,c)=>{t!=null&&t.products&&t.products[t.products.length-1].name===c&&(u.preventDefault(),r(l+1,d))},i=(u,l)=>{u.preventDefault();const d=e[l]===t?null:e[l];n(d)};return function(l,d,c){const w=document.querySelectorAll("[data-product-category]"),{key:m}=l;switch(m){case"ArrowDown":s(l,d,"down",w);break;case"ArrowUp":s(l,d,"up",w);break;case"Tab":o(l,d,w,c);break;case"Enter":case" ":i(l,d);break}}}const ww=e=>{const{size:t="lg",className:n,children:r,...s}=e,o={sm:"wu-text-body-3",md:"wu-text-body-2",lg:"wu-text-body-1"},i=e.as||"div";return a.jsx(i,{...s,className:h(o[t],n),children:r})},fw=e=>{const{size:t="xl",className:n,children:r,...s}=e,o={sm:"h4",md:"h3",lg:"h2",xl:"h1"},i={sm:"wu-text-heading-4",md:"wu-text-heading-3",lg:"wu-text-heading-2",xl:"wu-text-heading-1"},u=o[t];return a.jsx(u,{...s,className:h(i[t],n),children:r})},pw=e=>{const{size:t="lg",className:n,children:r,...s}=e,o={sm:"wu-text-sub-3",md:"wu-text-sub-2",lg:"wu-text-sub-1"},i=e.as||"div";return a.jsx(i,{...s,className:h(o[t],n),children:r})},hw=e=>{const{size:t="lg",className:n,children:r,...s}=e,o={md:"wu-text-display-2",lg:"wu-text-display-1"},i=e.as||"h1";return a.jsx(i,{...s,className:h(o[t],n),children:r})},Oe=e=>{const{icon:t,className:n,...r}=e;return a.jsx("span",{...r,className:h(t,n),role:"presentation","aria-label":t})},mw=({buttonRef:e,handleDropdownToggle:t,handleKeyDown:n,isDropdownOpen:r,activeProductName:s,dir:o="ltr",homeLink:i="/"})=>a.jsxs("button",{ref:e,type:"button",className:h("wu-text-base wu-font-normal wu-flex wu-items-center wu-justify-between wu-w-full focus:wu-outline-none focus-visible:wu-bg-white/10 wu-switcher-trigger","rtl:wu-pr-2 wu-pl-2 rtl:wu-pl-1 wu-pr-1"),onClick:t,onKeyDown:u=>{r&&u.key==="ArrowDown"&&n(u,-1)},"aria-label":"product-switcher",children:[a.jsx("a",{className:"wu-aspect-auto focus:wu-outline-none focus-visible:wu-bg-white/10 wu-switcher-logo",tabIndex:-1,href:i,children:a.jsx(Oe,{icon:"wc-logo",className:"wu-text-[23px] wu-leading-4 wu-relative wu-top-1 wu-right-[2px]"})}),a.jsx("span",{className:"wu-relative wu-bottom-[1.5px]",children:s}),a.jsx("span",{className:h("wm-arrow-drop-down wu-text-2xl wu-transition-transform wu-duration-300 wu-relative wu-bottom-[1.5px]",r&&"wu-rotate-180",o==="rtl"?"wu-mr-auto wu-left-[2px]":"wu-ml-auto wu-right-[2px]")})]}),oe={productDropdownMenu:"_productDropdownMenu_amyba_1",productDropdownMenuOpen:"_productDropdownMenuOpen_amyba_38",rtlDropdownMenu:"_rtlDropdownMenu_amyba_51",productCategory:"_productCategory_amyba_55",open:"_open_amyba_61",productCategoryBorderTop:"_productCategoryBorderTop_amyba_66",productList:"_productList_amyba_93",rtlProductList:"_rtlProductList_amyba_114",productListItem:"_productListItem_amyba_137",productLink:"_productLink_amyba_162",activeProduct:"_activeProduct_amyba_164",topBorder:"_topBorder_amyba_169",topBorderRtl:"_topBorderRtl_amyba_190"},gw=({category:e,dir:t="ltr",openCategory:n})=>{const r=e.active?"#c5cce0":"#f0c36a",s=(n==null?void 0:n.name)===e.name,o=h("wm-arrow-forward-ios wu-text-xs wu-tracking-widest wu-text-muted-foreground wu-mr-2.5 group-hover:wu-hidden wu-text-blue-q",t==="rtl"&&"wu-rotate-180 wu-ml-2.5 wu-text-blue-q group-hover:wu-hidden",s&&"wu-hidden","wu-relative wu-top-[5px]"),i=h("wm-lock wu-text-orange-soft wu-text-base wu-mr-2.5 group-hover:wu-hidden",t==="rtl"&&"wu-ml-2.5 group-hover:wu-hidden",s&&"wu-hidden","wu-relative wu-top-1");return a.jsxs("div",{className:h("group focus:wu-outline-none focus-visible:wu-outline-none wu-flex wu-items-center wu-w-full wu-bg-white wu-relative wu-justify-between"),dir:t,children:[a.jsx("div",{className:oe.productCategoryBorderTop,style:{backgroundColor:r}}),a.jsxs("div",{className:"wu-flex wu-items-center wu-px-1 wu-relative wu-top-1",children:[a.jsx("div",{className:"wu-w-[56px] wu-h-[56px] wu-flex wu-items-center wu-justify-center",children:a.jsx("img",{src:e.logo,alt:e.name,width:"32px",height:"32px"})}),a.jsx("span",{className:"wu-text-sm wu-leading-5 wu-text-blue-q wu-relative wu-top-[1px]",children:e.name})]}),e.active?a.jsx("span",{className:o}):a.jsx("span",{className:i})]})},bw={e309:"wp-audience",e381:"wp-bi",e329:"wp-closed-loop",e314:"wp-communities",e313:"wp-cx",e352:"wp-digsite",e324:"wp-empower",e317:"wp-insightshub",e380:"wp-instant-answers",e378:"wp-intercept",e311:"wp-livepolls",e316:"wp-reputation",e379:"wp-suite-cx",e382:"wp-suite-cx",e308:"wp-surveys",e315:"wp-workforce"},yw=({product:e,currentProduct:t,activeProductName:n,dir:r,focusItem:s,setFocusItem:o})=>{const[i,u]=f.useState(e.name===t),l=e.name===n,d=e.name===t,c=!e.active,w="#1b3380",m="#c5cce0",p="#ffcf70",b=h("wu-font-normal wu-text-xs wu-text-gray-lead wu-text-center",d&&"wu-text-blue-q wu-font-normal",!e.active&&"wu-text-gray-subtle",i&&"wu-font-normal",e.active&&i&&"wu-text-blue-q"),g=h("wu-text-blue-p wu-text-base",d&&"wu-text-blue-q",!e.active&&"wu-text-gray-subtle",e.active&&i&&"wu-text-blue-q"),y=i||s===e.name||l?w:m;return a.jsxs("li",{className:h(oe.productListItem,"focus-visible:wu-outline-none focus:wu-outline-none wu-sub-product-list-item",(l||i)&&oe.activeProduct,e.name.length>15&&window.innerWidth>768&&"wu-w-[130px] wu-min-w-[130px]",s===e.name&&oe.activeProduct,"wu-product-item"),onMouseOver:()=>u(!0),onMouseOut:()=>u(!1),"aria-label":e.name,"aria-disabled":c,dir:r,onKeyDown:x=>{if(x.key==="Enter"){x.preventDefault();const v=x.currentTarget.querySelector("a");v&&v.click()}},onFocus:()=>{o(e.name)},onBlur:()=>o(""),children:[a.jsx("div",{className:h(oe.topBorder,r==="rtl"&&oe.topBorderRtl),style:{backgroundColor:c?p:y}}),a.jsxs("a",{className:h(oe.productLink,"focus:wu-outline-none focus-visible:wu-outline-none"),href:e.link||"#",tabIndex:0,children:[a.jsx("span",{className:h(g,bw[e.icon||""]),"aria-hidden":!0}),a.jsx("span",{className:h(b),children:e.name})]})]},e.name)},vw=({category:e,currentProduct:t,activeProductName:n,dir:r="ltr",focusItem:s,setFocusItem:o,borderColorLocked:i="#f5a300"})=>{const{products:u=[],active:l}=e,d=f.useMemo(()=>u.filter(b=>b.active).sort((b,g)=>(b.order||100)-(g.order||100)),[u]),c=f.useMemo(()=>u.filter(b=>!b.active),[u]),[w,m]=f.useState(i),p=b=>b.map((g,y)=>a.jsx(yw,{product:g,currentProduct:t,activeProductName:n,dir:r,focusItem:s,setFocusItem:o},y));return l?a.jsxs(a.Fragment,{children:[p(d),c.length>0&&a.jsxs("li",{className:h(oe.productListItem,"focus:wu-outline-none focus-visible:wu-outline-none !wu-bg-[#f5f5f5] hover:!wu-bg-[#eeeeee] wu-group"),onMouseOver:()=>m("#f5a300"),onMouseOut:()=>m(i),"aria-label":"Upgrade to unlock",children:[a.jsx("div",{className:h(oe.topBorder,r==="rtl"&&oe.topBorderRtl),style:{backgroundColor:w},"aria-label":"top-border"}),a.jsxs("a",{href:"https://www.questionpro.com/a/showUpgradeUser.do",className:h(oe.productLink,"wu-flex wu-flex-col wu-items-center wu-justify-center wu-py-2 wu-min-w-[88px]"),children:[a.jsx("span",{className:"wu-text-base wu-transition-colors wm-lock !wu-text-orange-soft group-hover:wu-text-orange-deep"}),a.jsxs("span",{className:"wu-text-[10px] wu-leading-[10px] wu-text-center wu-pt-1 !wu-text-orange-deep",children:["Upgrade to ",a.jsx("br",{})," unlock"]})]})]}),p(c)]}):a.jsxs("li",{className:h(oe.productListItem,oe.learnMore,"focus:wu-outline-none focus-visible:wu-outline-none wu-product-item-inactive !wu-bg-[#f5f5f5] hover:!wu-bg-[#eeeeee]",s==="learn"&&"activeProduct"),tabIndex:0,onFocus:()=>o("learn"),onBlur:()=>o(""),"aria-label":"Learn More",children:[a.jsx("div",{className:h(oe.topBorder,r==="rtl"&&oe.topBorderRtl),style:{backgroundColor:i}}),a.jsx("a",{className:oe.productLink,href:"https://www.questionpro.com/a/showUpgradeUser.do",tabIndex:-1,children:a.jsx("span",{className:"wu-text-[#f99e03]",children:"Learn More"})})]})},co=({dropdownRef:e,dir:t,isDropdownOpen:n,productCategories:r,openCategory:s,setOpenCategory:o,handleKeyDown:i,expandAll:u,activeProductName:l,focusItem:d,setFocusItem:c})=>{const w="#ffcf70",[p,b]=f.useState(window.innerWidth>768);return f.useEffect(()=>{const g=()=>{b(window.innerWidth>768)};return window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[]),a.jsx("ul",{className:h(oe.productDropdownMenu,n&&oe.productDropdownMenuOpen,t==="rtl"&&oe.rtlDropdownMenu,"wu-switcher-container"),ref:e,dir:t,"aria-label":"product-dropdown-menu","data-state":n?"open":"closed",children:r.map((g,y)=>a.jsxs("li",{className:h(oe.productCategory,"focus:wu-outline-none focus-visible:wu-outline-none wu-h-16 wu-category-item",s===g&&oe.open,u&&oe.open),onMouseEnter:()=>p&&o(g),onMouseLeave:()=>p&&o(null),onClick:()=>{p||o(x=>x===g?null:g)},"aria-label":g.name,dir:t,onKeyDown:x=>i(x,y),tabIndex:0,"data-product-category":!0,children:[a.jsx(gw,{category:g,dir:t,openCategory:s}),a.jsx("ul",{className:h(oe.productList,t==="rtl"&&oe.rtlProductList),dir:t,children:a.jsx(vw,{category:g,dir:t,activeProductName:l,currentProduct:g.name,focusItem:d,setFocusItem:c,borderColorLocked:w})})]},g.name))})},xw=({isProductButtonShow:e,isDropdownOpen:t,activeProductColor:n,activeProductBgColor:r,activeProductName:s,dir:o,smallScreenButtonRef:i,handleDropdownToggle:u,handleKeyDown:l})=>a.jsx("div",{className:h("wu-absolute wu-top-11 wu-transition-all wu-duration-300 wu-ease-in-out wu-transform wu-opacity-100 wu-w-[256px] wu-z-10",e?o==="rtl"?"wu-right-0 wu-overflow-hidden":"wu-translate-x-0 wu-left-0":o==="rtl"?"wu-right-0 wu-w-0":"wu--translate-x-full"),style:{backgroundColor:t?n.hover:r},children:a.jsxs("button",{ref:i,type:"button",className:h("wu-text-base wu-leading-[48px] wu-flex wu-items-center wu-justify-center wu-px-2 wu-gap-2 wu-w-full focus:wu-outline-none focus-visible:wu-bg-white/10 wu-switcher-trigger",e?"wu-flex":o==="rtl"?"wu-hidden":"wu-flex"),onClick:u,onKeyDown:d=>{t&&d.key==="ArrowDown"&&l(d,-1)},"aria-label":"small-screen-product-btn",children:[s,a.jsx("span",{className:h("wm-arrow-drop-down wu-text-2xl wu-transition-transform wu-duration-300",t&&"wu-rotate-180")})]})}),Nw=({dir:e,isProductButtonShow:t,smallScreenToggleButtonRef:n,setIsProductButtonShow:r,setDropdownOpen:s})=>{const o=()=>{r(i=>!i),t&&s(!1)};return a.jsxs("button",{className:h("wu-relative wu-w-10 wu-h-10 wu-flex wu-flex-col wu-justify-center wu-items-center",e==="rtl"?"wu-mr-4":"wu-ml-4"),onClick:o,ref:n,"aria-label":"menu-toggle-btn",children:[a.jsx("span",{className:`wu-absolute wu-w-6 wu-h-[3px] wu-bg-white wu-transition-transform wu-duration-300 ${t?"wu-rotate-45 wu-translate-y-0":"-wu-translate-y-2.5"}`}),a.jsx("span",{className:`wu-absolute wu-w-6 wu-h-[3px] wu-bg-white wu-transition-opacity wu-duration-300 ${t?"wu-opacity-0":"wu-opacity-100"}`}),a.jsx("span",{className:`wu-absolute wu-w-6 wu-h-[3px] wu-bg-white wu-transition-transform wu-duration-300 ${t?"-wu-rotate-45 wu-translate-y-0":"wu-translate-y-2.5"}`})]})},wo=({productCategories:e,activeProductName:t,activeProductColor:n={base:"#1b87e6",hover:"#54A5EC"},dir:r,homeLink:s,expandAll:o})=>{const i=f.useRef(null),u=f.useRef(null),l=f.useRef(null),d=f.useRef(null),[c,w]=f.useState(!1),[m,p]=f.useState(null),[b,g]=f.useState(n.base),[y,x]=f.useState(""),[v,C]=f.useState(!1),N=cw(768);Kr([u,i],()=>{w(!1),p(null)}),Kr([l,d,u],()=>{C(!1),w(!1),p(null)}),f.useEffect(()=>{const T=I=>{I.key==="Escape"&&w(!1)};return document.addEventListener("keydown",T),()=>{document.removeEventListener("keydown",T)}},[c]),f.useEffect(()=>g(n.base),[n.base]);const S=T=>{T.preventDefault(),T.stopPropagation(),w(I=>{const D=!I;return D||p(null),D})},M=(T,I)=>{dw({productCategories:e,openCategory:m,setOpenCategory:p})(T,I,y)};return a.jsx("div",{className:h("wu-inline-flex wu-items-center wu-justify-between wu-relative wu-z-auto wu-h-12 wu-text-white"),children:N?a.jsxs("div",{className:"wu-relative wu-flex",children:[a.jsx(Nw,{dir:r,isProductButtonShow:v,smallScreenToggleButtonRef:d,setDropdownOpen:w,setIsProductButtonShow:C}),a.jsx(xw,{isProductButtonShow:v,isDropdownOpen:c,activeProductColor:n,activeProductBgColor:b,activeProductName:t,handleDropdownToggle:S,smallScreenButtonRef:l,handleKeyDown:M,dir:r}),a.jsx("div",{className:h("wu-absolute wu-top-[92px] wu-left-0 wu-text-[18px]",r==="rtl"&&"wu-right-[256px] wu-left-auto"),children:a.jsx(co,{activeProductName:t,focusItem:y,setFocusItem:x,handleKeyDown:M,isDropdownOpen:c,openCategory:m,productCategories:e,setOpenCategory:p,dropdownRef:u,expandAll:o,dir:r})})]}):a.jsxs("div",{className:"wu-relative wu-flex wu-items-center wu-justify-start wu-h-full wu-w-[256px]",dir:r,style:{backgroundColor:c?n.hover:b},onMouseOver:()=>g(n.hover),onMouseOut:()=>g(n.base),children:[a.jsx(mw,{activeProductName:t,dir:r,homeLink:s,buttonRef:i,handleDropdownToggle:S,handleKeyDown:M,isDropdownOpen:c}),a.jsx(co,{activeProductName:t,focusItem:y,setFocusItem:x,handleKeyDown:M,isDropdownOpen:c,openCategory:m,productCategories:e,setOpenCategory:p,dropdownRef:u,expandAll:o,dir:r})]})})},fo=({children:e,dir:t,className:n})=>a.jsx("section",{className:h("wu-flex wu-items-center wu-flex-1 wu-min-w-0 wu-h-12 wu-gap-2 wu-px-2",t==="rtl"&&"wu-flex-row-reverse",n),children:a.jsx("div",{className:"wu-grow",children:e})}),Sw=({className:e,placeholder:t="Search surveys, folders or tools",defaultCollapsed:n=!0,onSearch:r,...s})=>{const[o,i]=f.useState(n);return f.useEffect(()=>{i(n)},[n]),a.jsxs("div",{className:"wu-relative",children:[a.jsx(Oe,{"data-testid":"search-icon",icon:"wm-search",className:h("wu-absolute wu-top-1 wu-left-0.5","wu-text-gray-lead wu-cursor-pointer wu-text-[19px]",o&&"wu-text-white"),onClick:()=>i(u=>!u)}),a.jsx("input",{placeholder:t,onChange:u=>r(u.target.value),className:h("wu-rounded-full focus-visible:wu-outline-2 focus-visible:wu-outline-blue-focus -wu-outline-offset-2 wu-bg-white","wu-transition-all wu-duration-300 wu-ease-in-out","wu-h-8 wu-pl-8 wu-pr-4 wu-text-xs wu-text-gray-lead",o?"wu-w-8 wu-px-2 wu-text-lg wu-rounded-full wu-h-8 wu-border wu-border-white wu-bg-transparent":"wu-w-40 sm:wu-w-60",e),type:"search",...s})]})},po=Kt.Provider,ho=Kt.Root,mo=Kt.Trigger,Xr=E.forwardRef(({className:e,sideOffset:t=4,...n},r)=>a.jsx(Kt.Content,{ref:r,sideOffset:t,className:h("wu-z-50 wu-overflow-hidden wu-bg-gray-notification wu-text-white wu-px-3 wu-py-1.5 wu-text-sm wu-shadow-md",e),...n}));Xr.displayName=Kt.Content.displayName;const An=f.forwardRef(({content:e,position:t,positionOffset:n,duration:r,children:s,className:o,showArrow:i=!1,open:u,onOpenChange:l,style:d,...c},w)=>a.jsx(po,{delayDuration:r||200,children:a.jsxs(ho,{open:u,onOpenChange:l,children:[a.jsx(mo,{asChild:!0,children:a.jsx("span",{ref:w,...c,children:s})}),a.jsx(Lr.Portal,{children:e&&a.jsxs(Xr,{side:t||"top",sideOffset:n||0,className:h("wu-max-w-sm wu-max-h-96 wu-overflow-y-auto",o),style:d,children:[e,i&&a.jsx(Lr.Arrow,{className:"wu-fill-gray-notification wu-tooltip-arrow"})]})})]})}));An.displayName="WuTooltip";const Cw=({label:e,className:t})=>{const n=f.useRef(null),[r,s]=f.useState(!1);return f.useEffect(()=>{const o=n.current;if(o){const i=o.clientWidth,u=o.scrollWidth,l=u/e.length,d=e.length*l;s(d>i||u>i)}},[e]),a.jsx("p",{ref:n,className:h("wu-w-full wu-truncate",t),children:r?a.jsx(An,{content:e,positionOffset:8,children:e}):e})},Tw=e=>{var w;const{productName:t,categories:n=[],user:r,children:s,onLogout:o,homeLink:i=window.location.origin,brandColor:u,dir:l="ltr",expandAll:d,DataCenter:c}=e;return a.jsx("div",{className:"wu-sticky wu-top-0 wu-z-50 wu-w-full",children:a.jsxs("header",{className:h("wu-h-12 wu-flex wu-items-center wu-justify-between wu-relative wu-bg-blue-switcher wu-text-white",l==="rtl"&&"wu-flex-row-reverse",e.className),style:e.style,children:[Rd((w=r==null?void 0:r.profile)==null?void 0:w.subtitle)&&window.wickUiVersion&&a.jsxs("p",{className:"wu-text-[10px] wu-text-gray-subtle wu-font-normal wu-absolute wu-top-11 wu-right-1 wu-z-[-1] wu-invisible","aria-label":"wickUiVersion",children:["Wick UI: v",window.wickUiVersion]}),a.jsx("section",{className:"wu-flex wu-items-center wu-gap-2 wu-shrink-0",children:a.jsx(wo,{productCategories:n,activeProductName:t,activeProductColor:u,dir:l,homeLink:i,expandAll:d})}),a.jsx(fo,{dir:l,children:s}),a.jsxs("section",{className:h("wu-flex wu-items-center wu-justify-end wu-shrink-0 wu-gap-2",l==="rtl"?"wu-flex-row-reverse wu-pl-4":"wu-flex-row wu-pr-4"),children:[a.jsx(uo,{dir:l}),(r==null?void 0:r.profile)&&Object.keys(r.profile).length>0&&a.jsx(io,{user:r,onLogout:o,dir:l,DataCenter:c})]})]})})},je=Gt.Root,dt=Gt.Trigger,$e=E.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},s)=>a.jsx(Gt.Portal,{children:a.jsx(Gt.Content,{ref:s,align:t,sideOffset:n,className:h("wu-z-50 wu-w-72 wu-border wu-bg-popover wu-p-4 wu-text-popover-foreground wu-shadow-md wu-outline-none data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[side=bottom]:wu-slide-in-from-top-2 data-[side=left]:wu-slide-in-from-right-2 data-[side=right]:wu-slide-in-from-left-2 data-[side=top]:wu-slide-in-from-bottom-2",e),...r})}));$e.displayName=Gt.Content.displayName;const Zr=Be.cva(["wu-inline-flex wu-items-center wu-justify-center wu-rounded","wu-whitespace-nowrap wu-text-sm wu-leading-normal wu-font-normal","wu-transition-colors wu-duration-300","focus:wu-outline-none focus-visible:wu-outline-2 focus-visible:wu-outline-offset-2","disabled:wu-cursor-not-allowed disabled:wu-bg-black/10 disabled:wu-text-gray-subtle disabled:wu-outline-gray-subtle"],{variants:{size:{md:["wu-p-2 wu-h-8 wu-min-w-[104px]","wu-text-sm wu-leading-normal"],sm:["wu-p-1 wu-h-6 wu-min-w-[90px]","wu-text-xs"],mobile:["wu-p-4 wu-h-10 wu-min-w-[104px] wu-rounded-lg","wu-text-base"]},color:{primary:["wu-bg-blue-p hover:wu-bg-blue-pHoverDeep","wu-text-blue-p hover:wu-text-blue-q","wu-border wu-border-blue-p hover:wu-border-blue-pHoverDeep","focus-visible:wu-outline-blue-p/50"],upgrade:["wu-bg-orange-soft hover:wu-bg-orange-deep","wu-text-orange-deep hover:wu-text-orange-deep","wu-border-1 wu-border-orange-soft hover:wu-border-orange-deep","focus-visible:wu-outline-orange-deep/50"],error:["wu-bg-red-deep hover:wu-bg-red-soft","wu-text-red-deep hover:wu-text-red-deep","wu-border-1 wu-border-red-deep hover:wu-border-red-soft","focus-visible:wu-outline-red-deep/50"]},variant:{primary:["wu-text-white hover:wu-text-white","wu-border-0"],secondary:["wu-bg-transparent hover:wu-bg-black hover:wu-bg-opacity-[0.04]","wu-border-0"],outline:["wu-bg-white hover:wu-text-white","disabled:wu-bg-transparent disabled:wu-border-gray-subtle"],rounded:["wu-text-white hover:wu-text-white","wu-border-0 wu-rounded-full"],link:["wu-bg-transparent hover:wu-bg-transparent","disabled:wu-bg-transparent","hover:wu-underline wu-underline-offset-2","wu-min-w-[auto] wu-px-2","wu-border-0","focus-visible:wu-outline-offset-0"],iconOnly:["wu-aspect-square","wu-p-2 wu-h-8 wu-w-8 wu-min-w-[auto]","wu-text-xl wu-leading-5","wu-bg-transparent wu-text-gray-lead","hover:wu-bg-black hover:wu-bg-opacity-[0.04]","focus-visible:wu-bg-black focus-visible:wu-bg-opacity-[0.04]","wu-border-0","disabled:wu-grayscale disabled:wu-opacity-80"]}},defaultVariants:{variant:"primary",size:"md",color:"primary"},compoundVariants:[]}),Xt=E.forwardRef(({className:e,variant:t,size:n,color:r,asChild:s=!1,...o},i)=>{const u=s?Ct.Slot:"button";return a.jsx(u,{className:h(Zr({size:n,color:r,variant:t,className:e})),ref:i,...o})});Xt.displayName="Button";function go({className:e,classNames:t,dir:n="ltr",...r}){const s=Ra.getDefaultClassNames();return a.jsx(Ra.DayPicker,{showOutsideDays:r.showOutsideDays||!1,className:h("wu-p-3",e),classNames:{root:h(s.root,"wu-relative wu-rounded-none wu-bg-white dark:wu-bg-gray-switcher"),caption_label:h("wu-text-xs",r.captionLayout==="dropdown"?"wu-hidden":""),month_caption:h(s.month_caption,"wu-mb-5"),months:h(s.months,"wu-flex wu-flex-col sm:wu-flex-row wu-gap-4"),dropdowns:h(s.dropdowns,"wu-flex wu-items-center wu-justify-start wu-gap-2",(r.mode==="range","")),dropdown:h(s.dropdown,"wu-px-2 wu-py-1 wu-text-sm wu-text-gray-lead wu-font-medium focus:wu-outline-none wu-bg-white wu-border-b wu-border-gray-subtle focus-visible:wu-border-blue-p"),weekday:h(s.weekday,"wu-text-gray-lead wu-rounded-none wu-w-9 wu-font-normal wu-text-xs wu-bg-gray-10 wu-py-2"),day_button:h(s.day_button,"wu-w-full wu-h-full focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-pHover focus-visible:wu-ring-offset-2"),day:h(s.day,"wu-text-gray-lead wu-transition-colors wu-duration-300 [&:not([aria-selected])]:hover:wu-bg-gray-25 wu-text-sm wu-w-9 wu-h-9 wu-min-w-0 wu-text-center wu-p-0 wu-rounded-none data-[today=true]:[&:not([aria-selected])]:wu-border data-[today=true]:[&:not([aria-selected])]:wu-border-blue-p data-[today=true]:[&:not([aria-selected])]:wu-text-gray-lead"),selected:h(s.selected,"wu-bg-blue-p [&:not(.rm)]:wu-text-white hover:wu-bg-blue-pHover"),range_middle:h("rm",s.range_middle,"wu-bg-blue-p/10 wu-rounded-none hover:wu-bg-blue-p/20 wu-text-gray-lead hover:wu-text-white data-[today=true]:wu-bg-blue-p/20 hover:data-[today=true]:wu-bg-blue-pHover"),range_end:h(s.range_end,"wu-rounded-none"),range_start:h(s.range_start,"wu-rounded-none wu-bg-blue-p hover:wu-bg-blue-pHover"),month_grid:h(s.month_grid,"[&>thead>tr>th]:wu-pb-2 wu-border-collapse wu-space-y-1"),button_next:h(s.button_next,Zr({variant:"iconOnly"}),"wu-h-6 wu-w-6 wu-text-gray-lead"),button_previous:h(s.button_previous,Zr({variant:"iconOnly"}),"wu-h-6 wu-w-6 wu-rotate-180 wu-text-gray-lead"),nav:h(s.nav,"wu-absolute wu-top-4 wu-right-3 wu-flex",n==="rtl"&&"wu-right-auto wu-left-3 wu-flex-row-reverse"),chevron:h(s.chevron,"!wu-text-red-500"),outside:h(s.outside,"wu-invisible"),disabled:h(s.disabled,"hover:wu-bg-white wu-text-gray-subtle"),...t},components:{Chevron:()=>a.jsx("span",{className:"wm-chevron-right wu-text-lg wu-leading-5"})},...r})}go.displayName="Calendar";const Jr=e=>a.jsx(go,{...e}),bo=e=>{const{handleDateChange:t,disabled:n,onReset:r,showResetButton:s}=e;return a.jsxs("div",{className:"wu-flex wu-items-center wu-justify-end wu-gap-2 wu-mt-2 wu-date-picker-footer",children:[s&&a.jsx(Ie,{variant:"secondary",onClick:r,Icon:a.jsx("span",{className:"wu-text-[20px] wu-leading-5 -wu-mt-[1px] wm-refresh"}),className:"wu-date-picker-footer-reset",children:"Reset"}),a.jsx(jt.PopoverClose,{asChild:!0,children:a.jsx(Ie,{onClick:t,disabled:n,className:"wu-date-picker-apply",children:"Apply"})})]})},Qr=({formattedString:e,dir:t,placeholder:n="Select Date",className:r,variant:s="primary",color:o,CustomTrigger:i,...u})=>a.jsx(jt.PopoverTrigger,{asChild:!i,dir:t,children:i?a.jsx(a.Fragment,{children:i(e)}):a.jsx(Ie,{...u,className:h("wu-justify-between wu-w-full wu-gap-2 wu-text-xs wu-border-b wu-rounded-none wu-rounded-t-sm wu-min-w-48 wu-border-gray-subtle wu-text-gray-lead wu-placeholder:wu-text-gray-subtle wu-placeholder:wu-font-light wu-bg-gray-10 hover disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-subtle hover:wu-text-gray-lead hover:wu-bg-gray-10 hover:wu-border-gray-40 wu-datepicker-trigger",s==="outlined"&&"wu-border wu-border-subtle wu-bg-transparent",r),Icon:a.jsx("span",{className:"wm-calendar-month wu-text-sm"}),iconPosition:"right",children:e||n})}),yo=(e,t,n,r)=>{const s=z.startOfDay(e).getTime();return!!(t||n&&s<z.startOfDay(n).getTime()||r&&s>z.startOfDay(r).getTime())},_n=e=>e?typeof e=="string"?new Date(e):e:new Date,Rr="(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])-\\d{4}",Ew=[{label:"Last week",value:7},{label:"Last month",value:30},{label:"Last quarter",value:90},{label:"Last year",value:365}],Iw=e=>{const{message:t,className:n,...r}=e;return a.jsx("p",{...r,className:h("wu-text-sub-3 wu-break-words wu-font-light",n),style:{color:"rgb(var(--wu-red-deep))",...r.style},children:t})},Mw=e=>{var u,l;const{inputRef:t,maxLength:n=50,className:r,...s}=e,[o,i]=f.useState(!1);return f.useEffect(()=>{var d;(((d=t==null?void 0:t.current)==null?void 0:d.value.length)||0)>.75*n?i(!0):i(!1)},[(u=t==null?void 0:t.current)==null?void 0:u.value,n]),a.jsx("p",{...s,className:h("wu-text-sub-3 wu-font-light",r),style:{color:"rgb(var(--wu-gray-subtle))",...s.style},children:o&&`${(l=t==null?void 0:t.current)==null?void 0:l.value.length}/${n}`})},kw=Be.cva("wu-text-xs wu-font-normal wu-leading-none peer-disabled:wu-cursor-not-allowed peer-disabled:wu-text-gray-subtle peer-readonly:wu-text-gray-subtle peer-required:after:wu-content-['*'] peer-required:after:wu-ml-[2px] peer-required:after:wu-text-red-deep peer-aria-[required]:after:wu-content-['*'] peer-aria-[required]:after:wu-ml-[2px] peer-aria-[required]:after:wu-text-red-deep"),Pn=E.forwardRef(({className:e,...t},n)=>a.jsx(no.Root,{ref:n,className:h(kw(),e),...t}));Pn.displayName=no.Root.displayName;const Me=e=>a.jsx(Pn,{...e,className:h("wu-text-gray-lead wu-leading-6",e.className)}),Dw=({Label:e,Error:t,Hint:n,Input:r,labelPosition:s="top",dir:o="ltr",className:i,...u})=>{const d=h("wu-flex",s==="top"?"wu-flex-col wu-gap-1":"wu-flex-row wu-items-center wu-gap-2",i),c=h("wu-flex wu-flex-col wu-gap-1 wu-relative wu-flex-1 wu-form-group-wrapper"),w=h("wu-absolute -wu-bottom-5",o==="ltr"?"wu-right-0":"wu-left-0","wu-form-group-hint"),m=h("wu-absolute -wu-bottom-5",o==="ltr"?"wu-left-0":"wu-right-0","wu-form-group-error");return a.jsxs("div",{className:d,dir:o,...u,children:[e,a.jsxs("div",{className:c,children:[r,n&&a.jsx("div",{className:w,children:n}),t&&a.jsx("div",{className:m,children:t})]})]})},Aw=({formatString:e="MMM dd, yyyy",value:t,onChange:n,disabled:r,minDate:s=z.sub(new Date,{years:5}),maxDate:o=z.add(new Date,{years:1}),dir:i="ltr",Label:u,labelPosition:l="top",onReset:d,showResetButton:c=!1,placeholder:w="Select Date",CustomTrigger:m,align:p="start",sideOffset:b=-.5,side:g,alignOffset:y,...x})=>{const[v,C]=f.useState(),[N,S]=f.useState(""),M=f.useCallback(()=>{const I=_n(v);S(z.format(I,e)),n&&n(v)},[v,e,n]),T=f.useCallback(()=>{d?d():(C(void 0),S(""),n&&n(void 0))},[n,d]);return f.useEffect(()=>{const I=_n(t);C(I),S(z.format(I,e))},[t,e]),a.jsxs(Me,{className:h("wu-flex wu-gap-1",l==="left"?"wu-items-center":"wu-flex-col wu-items-start","wu-date-picker-label"),dir:i,children:[u,a.jsxs(je,{children:[a.jsx(Qr,{formattedString:N,dir:i,placeholder:w,CustomTrigger:m,...x}),a.jsx($e,{className:"wu-p-0 wu-w-fit wu-date-picker-content",align:p,sideOffset:b,side:g,alignOffset:y,dir:i,children:a.jsx(Jr,{dir:i,mode:"single",captionLayout:"dropdown",selected:v,onSelect:C,disabled:I=>yo(I,r,s,o),startMonth:s,endMonth:o,required:!0,autoFocus:!0,defaultMonth:v,className:h("wu-border wu-border-blue-p wu-date-picker"),footer:a.jsx(bo,{handleDateChange:M,disabled:r,onReset:T,showResetButton:c})})})]})]})},Ye={...E},vo={};function Qe(e,t){const n=E.useRef(vo);return n.current===vo&&(n.current=e(t)),n}const es=Ye.useInsertionEffect,_w=es&&es!==Ye.useLayoutEffect?es:e=>e();function fe(e){const t=Qe(Pw).current;return t.next=e,_w(t.effect),t.trampoline}function Pw(){const e={next:void 0,callback:Vw,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function Vw(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}function Ow(e,t){return function(r,...s){const o=new URL(e);return o.searchParams.set("code",r.toString()),s.forEach(i=>o.searchParams.append("args[]",i)),`${t} error #${r}; visit ${o} for the full message.`}}const Zt=Ow("https://base-ui.com/production-error","Base UI");function ke(){}const Xe=Object.freeze({});let xo=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const Lw={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Jt={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},Fw={disabled:!1,...Jt},ts={valid(e){return e===null?null:e?{[xo.valid]:""}:{[xo.invalid]:""}}},Ww={invalid:void 0,name:void 0,validityData:{state:Lw,errors:[],error:"",value:"",initialValue:null},setValidityData:ke,disabled:void 0,touched:Jt.touched,setTouched:ke,dirty:Jt.dirty,setDirty:ke,filled:Jt.filled,setFilled:ke,focused:Jt.focused,setFocused:ke,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:Fw,markedDirtyRef:{current:!1},registerFieldControl:ke,validation:{getValidationProps:(e=Xe)=>e,getInputValidationProps:(e=Xe)=>e,inputRef:{current:null},commit:async()=>{}}},No=E.createContext(Ww);process.env.NODE_ENV!=="production"&&(No.displayName="FieldRootContext");function Vn(e=!0){const t=E.useContext(No);if(t.setValidityData===ke&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":Zt(28));return t}const So=E.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:ke,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(So.displayName="FormContext");function Bw(){return E.useContext(So)}function ns(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const rs={};function ss(e,t,n,r,s){if(!n&&!r&&!e)return On(t);let o=On(e);return t&&(o=Ln(o,t)),n&&(o=Ln(o,n)),r&&(o=Ln(o,r)),o}function $w(e){if(e.length===0)return rs;if(e.length===1)return On(e[0]);let t=On(e[0]);for(let n=1;n<e.length;n+=1)t=Ln(t,e[n]);return t}function On(e){return as(e)?{...To(e,rs)}:qw(e)}function Ln(e,t){return as(t)?To(t,e):Hw(e,t)}function qw(e){const t={...e};for(const n in t){const r=t[n];Co(n,r)&&(t[n]=Eo(r))}return t}function Hw(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=ns(e.style,r);break}case"className":{e[n]=Io(e.className,r);break}default:Co(n,r)?e[n]=zw(e[n],r):e[n]=r}}return e}function Co(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),s=e.charCodeAt(2);return n===111&&r===110&&s>=65&&s<=90&&(typeof t=="function"||typeof t>"u")}function as(e){return typeof e=="function"}function To(e,t){return as(e)?e(t):e??rs}function zw(e,t){return t?e?(...n)=>{const r=n[0];if(Mo(r)){const o=r;Fn(o);const i=t(...n);return o.baseUIHandlerPrevented||e==null||e(...n),i}const s=t(...n);return e==null||e(...n),s}:Eo(t):e}function Eo(e){return e&&((...t)=>{const n=t[0];return Mo(n)&&Fn(n),e(...t)})}function Fn(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Io(e,t){return t?e?t+" "+e:t:e}function Mo(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}let ko=0;function Uw(e,t="mui"){const[n,r]=E.useState(e),s=e||n;return E.useEffect(()=>{n==null&&(ko+=1,r(`${t}-${ko}`))},[n,t]),s}const Do=Ye.useId;function jw(e,t){if(Do!==void 0){const n=Do();return e??(t?`${t}-${n}`:n)}return Uw(e,t)}function Ao(e){return jw(e,"base-ui")}const _o=E.createContext({controlId:void 0,registerControlId:ke,labelId:void 0,setLabelId:ke,messageIds:[],setMessageIds:ke,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(_o.displayName="LabelableContext");function os(){return E.useContext(_o)}const pe=typeof document<"u"?E.useLayoutEffect:()=>{};function Po(){return typeof window<"u"}function Wn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Gw(e){return Po()?e instanceof Element||e instanceof Wn(e).Element:!1}function Kw(e){return Po()?e instanceof HTMLElement||e instanceof Wn(e).HTMLElement:!1}function Vo(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:s,registerControlId:o}=os(),i=Ao(t),u=n?s:void 0,l=Qe(()=>Symbol("labelable-control")),d=E.useRef(!1),c=E.useRef(t!=null),w=fe(()=>{!d.current||o===ke||(d.current=!1,o(l.current,void 0))});return pe(()=>{if(o===ke)return;let m;if(n){const p=r==null?void 0:r.current;Gw(p)&&p.closest("label")!=null?m=t??null:m=u??i}else if(t!=null)c.current=!0,m=t;else if(c.current)m=i;else{w();return}if(m===void 0){w();return}d.current=!0,o(l.current,m)},[t,r,u,o,n,i,l,w]),E.useEffect(()=>w,[w]),s??i}function Oo(e){return(e==null?void 0:e.ownerDocument)||document}const Bn=typeof navigator<"u",is=Jw(),Yw=Rw(),Xw=Qw();typeof CSS>"u"||!CSS.supports||CSS.supports("-webkit-backdrop-filter:none");const Zw=is.platform==="MacIntel"&&is.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(is.platform);Bn&&Yw.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints,Xw.includes("jsdom/");function Jw(){if(!Bn)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e!=null&&e.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function Qw(){if(!Bn)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function Rw(){if(!Bn)return"";const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform??""}function Lo(e){var n;let t=e.activeElement;for(;((n=t==null?void 0:t.shadowRoot)==null?void 0:n.activeElement)!=null;)t=t.shadowRoot.activeElement;return t}function ef(e){e.preventDefault(),e.stopPropagation()}function $n(e,t,n,r){const s=Qe(Fo).current;return nf(s,e,t,n,r)&&Wo(s,[e,t,n,r]),s.callback}function tf(e){const t=Qe(Fo).current;return rf(t,e)&&Wo(t,e),t.callback}function Fo(){return{callback:null,cleanup:null,refs:[]}}function nf(e,t,n,r,s){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==s}function rf(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function Wo(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let s=0;s<t.length;s+=1){const o=t[s];if(o!=null)switch(typeof o){case"function":{const i=o(n);typeof i=="function"&&(r[s]=i);break}case"object":{o.current=n;break}}}e.cleanup=()=>{for(let s=0;s<t.length;s+=1){const o=t[s];if(o!=null)switch(typeof o){case"function":{const i=r[s];typeof i=="function"?i():o(null);break}case"object":{o.current=null;break}}}}}}}const sf=parseInt(E.version,10);function af(e){return sf>=e}function Bo(e){if(!E.isValidElement(e))return null;const t=e,n=t.props;return(af(19)?n==null?void 0:n.ref:t.ref)??null}let us;process.env.NODE_ENV!=="production"&&(us=new Set);function ls(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");us.has(t)||(us.add(t),console.warn(`Base UI: ${t}`))}}function of(e,t){const n={};for(const r in e){const s=e[r];if(t!=null&&t.hasOwnProperty(r)){const o=t[r](s);o!=null&&Object.assign(n,o);continue}s===!0?n[`data-${r.toLowerCase()}`]="":s&&(n[`data-${r.toLowerCase()}`]=s.toString())}return n}function uf(e,t){return typeof e=="function"?e(t):e}function $o(e,t){return typeof e=="function"?e(t):e}function Ze(e,t,n={}){const r=t.render,s=lf(t,n);if(n.enabled===!1)return null;const o=n.state??Xe;return pf(e,r,s,o)}function lf(e,t={}){const{className:n,style:r,render:s}=e,{state:o=Xe,ref:i,props:u,stateAttributesMapping:l,enabled:d=!0}=t,c=d?uf(n,o):void 0,w=d?$o(r,o):void 0,m=d?of(o,l):Xe,p=d&&u?cf(u):void 0,b=d?ns(m,p)??{}:Xe;return typeof document<"u"&&(d?Array.isArray(i)?b.ref=tf([b.ref,Bo(s),...i]):b.ref=$n(b.ref,Bo(s),i):$n(null,null)),d?(c!==void 0&&(b.className=Io(b.className,c)),w!==void 0&&(b.style=ns(b.style,w)),b):Xe}function cf(e){return Array.isArray(e)?$w(e):ss(void 0,e)}const df=Symbol.for("react.lazy"),wf=/^[A-Z][A-Za-z0-9$]*$/,ff=/[a-z]/;function pf(e,t,n,r){if(t){if(typeof t=="function")return process.env.NODE_ENV!=="production"&&hf(t),t(n,r);const s=ss(n,t.props);s.ref=n.ref;let o=t;if((o==null?void 0:o.$$typeof)===df&&(o=E.Children.toArray(t)[0]),process.env.NODE_ENV!=="production"&&!E.isValidElement(o))throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.","A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.","https://base-ui.com/r/invalid-render-prop"].join(`
5
+ `));return E.cloneElement(o,s)}if(e&&typeof e=="string")return mf(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":Zt(8))}function hf(e){const t=e.name;t.length!==0&&wf.test(t)&&ff.test(t)&&ls(`The \`render\` prop received a function named \`${t}\` that starts with an uppercase letter.`,"This usually means a React component was passed directly as `render={Component}`.","Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.","If this is an intentional render callback, rename it to start with a lowercase letter.","Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.","https://base-ui.com/r/invalid-render-prop")}function mf(e,t){return e==="button"?f.createElement("button",{type:"button",...t,key:t.key}):e==="img"?f.createElement("img",{alt:"",...t,key:t.key}):E.createElement(e,t)}const gf=[];function cs(e){E.useEffect(e,gf)}const Qt=0;class qn{constructor(){Te(this,"currentId",Qt);Te(this,"clear",()=>{this.currentId!==Qt&&(clearTimeout(this.currentId),this.currentId=Qt)});Te(this,"disposeEffect",()=>this.clear)}static create(){return new qn}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Qt,n()},t)}isStarted(){return this.currentId!==Qt}}function qo(){const e=Qe(qn.create).current;return cs(e.disposeEffect),e}let ds;process.env.NODE_ENV!=="production"&&(ds=new Set);function Hn(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");ds.has(t)||(ds.add(t),console.error(`Base UI: ${t}`))}}const zn=null;let Ho=globalThis.requestAnimationFrame;class bf{constructor(){Te(this,"callbacks",[]);Te(this,"callbacksCount",0);Te(this,"nextId",1);Te(this,"startId",1);Te(this,"isScheduled",!1);Te(this,"tick",t=>{var s;this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)(s=n[o])==null||s.call(n,t)})}request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const r=process.env.NODE_ENV!=="production"&&Ho!==requestAnimationFrame&&(Ho=requestAnimationFrame,!0);return(!this.isScheduled||r)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const Un=new bf;class De{constructor(){Te(this,"currentId",zn);Te(this,"cancel",()=>{this.currentId!==zn&&(Un.cancel(this.currentId),this.currentId=zn)});Te(this,"disposeEffect",()=>this.cancel)}static create(){return new De}static request(t){return Un.request(t)}static cancel(t){return Un.cancel(t)}request(t){this.cancel(),this.currentId=Un.request(()=>{this.currentId=zn,t()})}}function yf(){const e=Qe(De.create).current;return cs(e.disposeEffect),e}function vf(e){return e==null?e:"current"in e?e.current:e}let Rt=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const xf={[Rt.startingStyle]:""},Nf={[Rt.endingStyle]:""},zo={transitionStatus(e){return e==="starting"?xf:e==="ending"?Nf:null}};function Uo(e,t=!1,n=!0){const r=yf();return fe((s,o=null)=>{r.cancel();const i=vf(e);if(i==null)return;const u=i,l=()=>{Jd.flushSync(s)};if(typeof u.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){s();return}function d(){Promise.all(u.getAnimations().map(c=>c.finished)).then(()=>{o!=null&&o.aborted||l()}).catch(()=>{if(n){o!=null&&o.aborted||l();return}const c=u.getAnimations();!(o!=null&&o.aborted)&&c.length>0&&c.some(w=>w.pending||w.playState!=="finished")&&d()})}if(t){const c=Rt.startingStyle;if(!u.hasAttribute(c)){r.request(d);return}const w=new MutationObserver(()=>{u.hasAttribute(c)||(w.disconnect(),d())});w.observe(u,{attributes:!0,attributeFilter:[c]}),o==null||o.addEventListener("abort",()=>w.disconnect(),{once:!0});return}r.request(d)})}function Sf(e){const{enabled:t=!0,open:n,ref:r,onComplete:s}=e,o=fe(s),i=Uo(r,n,!1);E.useEffect(()=>{if(!t)return;const u=new AbortController;return i(o,u.signal),()=>{u.abort()}},[t,n,o,i])}function Cf(e,t=!1,n=!1){const[r,s]=E.useState(e&&t?"idle":void 0),[o,i]=E.useState(e);return e&&!o&&(i(!0),s("starting")),!e&&o&&r!=="ending"&&!n&&s("ending"),!e&&!o&&r==="ending"&&s(void 0),pe(()=>{if(!e&&o&&r!=="ending"&&n){const u=De.request(()=>{s("ending")});return()=>{De.cancel(u)}}},[e,o,r,n]),pe(()=>{if(!e||t)return;const u=De.request(()=>{s(void 0)});return()=>{De.cancel(u)}},[t,e]),pe(()=>{if(!e||!t)return;e&&o&&r!=="idle"&&s("starting");const u=De.request(()=>{s("idle")});return()=>{De.cancel(u)}},[t,e,o,r]),{mounted:o,setMounted:i,transitionStatus:r}}function ws({controlled:e,default:t,name:n,state:r="value"}){const{current:s}=E.useRef(e!==void 0),[o,i]=E.useState(t),u=s?e:o;if(process.env.NODE_ENV!=="production"){E.useEffect(()=>{s!==(e!==void 0)&&Hn([`A component is changing the ${s?"":"un"}controlled ${r} state of ${n} to be ${s?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
6
+ `))},[r,n,e]);const{current:d}=E.useRef(t);E.useEffect(()=>{!s&&jo(d)!==jo(t)&&Hn([`A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
7
+ `))},[t])}const l=E.useCallback(d=>{s||i(d)},[]);return[u,l]}function jo(e){let t=0;const n=new WeakMap;try{return JSON.stringify(e,function(o,i){if(!(o==="_owner"&&this!=null&&typeof this=="object"&&"$$typeof"in this)){if(typeof i=="bigint")return`__bigint__:${i}`;if(i!==null&&typeof i=="object"){const u=n.get(i);if(u!==void 0)return`__object__:${u}`;n.set(i,t),t+=1}return i}})??`__top__:${typeof e}`}catch{return"__unserializable__"}}function Go(e,t,n,r,s=!0){const{registerFieldControl:o}=Vn(),i=E.useRef(null);i.current||(i.current=Symbol()),pe(()=>{const u=i.current;return!u||!s?void 0:(o(u,{controlRef:e,getValue:r,id:t,value:n}),()=>{o(u,void 0)})},[e,s,r,t,o,n])}const en="none",Tf="trigger-press",Ef="increment-press",If="decrement-press",fs="input-change",tn="input-clear",jn="input-blur",ps="input-paste",nn="keyboard";function Ae(e,t,n,r){let s=!1,o=!1;const i=r??Xe;return{reason:e,event:t??new Event("base-ui"),cancel(){s=!0},allowPropagation(){o=!0},get isCanceled(){return s},get isPropagationAllowed(){return o},trigger:n,...i}}function rn(e,t,n){const r=Xe;return{reason:e,event:t??new Event("base-ui"),...r}}const Ko=E.forwardRef(function(t,n){const{render:r,className:s,id:o,name:i,value:u,disabled:l=!1,onValueChange:d,defaultValue:c,autoFocus:w=!1,style:m,...p}=t,{state:b,name:g,disabled:y,setTouched:x,setDirty:v,validityData:C,setFocused:N,setFilled:S,validationMode:M,validation:T}=Vn(),I=y||l,D=g??i,A={...b,disabled:I},{labelId:_}=os(),P=Vo({id:o});pe(()=>{var q;const V=u!=null;(q=T.inputRef.current)!=null&&q.value||V&&u!==""?S(!0):V&&u===""&&S(!1)},[T.inputRef,S,u]);const W=E.useRef(null);pe(()=>{w&&W.current===Lo(Oo(W.current))&&N(!0)},[w,N]);const[F]=ws({controlled:u,default:c,name:"FieldControl",state:"value"}),B=u!==void 0,$=B?F:void 0,ie=fe(()=>{var V;return(V=T.inputRef.current)==null?void 0:V.value});return Go(T.inputRef,P,$,ie),Ze("input",t,{ref:[n,W],state:A,props:[{id:P,disabled:I,name:D,ref:T.inputRef,"aria-labelledby":_,autoFocus:w,...B?{value:$}:{defaultValue:c},onChange(V){const q=V.currentTarget.value;d==null||d(q,Ae(en,V.nativeEvent)),v(q!==C.initialValue),S(q!=="")},onFocus(){N(!0)},onBlur(V){x(!0),N(!1),M==="onBlur"&&T.commit(V.currentTarget.value)},onKeyDown(V){V.currentTarget.tagName==="INPUT"&&V.key==="Enter"&&(x(!0),T.commit(V.currentTarget.value))}},T.getInputValidationProps(),p],stateAttributesMapping:ts})});process.env.NODE_ENV!=="production"&&(Ko.displayName="FieldControl");const Yo=E.forwardRef(function(t,n){return a.jsx(Ko,{ref:n,...t})});process.env.NODE_ENV!=="production"&&(Yo.displayName="Input");const Gn={wuInputGroup:"_wuInputGroup_1t4ep_1",wuInputIcon:"_wuInputIcon_1t4ep_20",wuInput:"_wuInput_1t4ep_1",passwordToggle:"_passwordToggle_1t4ep_89"},Xo=f.memo(({showPassword:e,onToggle:t,disabled:n,readOnly:r})=>{const s=f.useCallback(i=>{if(n||r){i.preventDefault(),i.stopPropagation();return}t()},[n,r,t]),o=n||r;return a.jsx("button",{type:"button","data-slot":"wu-input-password-toggle",className:Gn.passwordToggle,onClick:s,disabled:o,"aria-disabled":o||void 0,"aria-label":e?"Hide password":"Show password",children:a.jsx(Oe,{icon:e?"wm-visibility":"wm-visibility-off"})})});Xo.displayName="PasswordToggle";const Re=f.memo(f.forwardRef(({className:e,Label:t,labelPosition:n="top",Icon:r,iconPosition:s="left",variant:o="flat",type:i,readonly:u,invalid:l,id:d,...c},w)=>{const m=f.useId(),p=d||m;if(i==="submit")return a.jsx(Ie,{className:e,id:p,"aria-label":c["aria-label"],type:"submit","data-slot":"wu-input-submit",disabled:c.disabled,children:t||"Submit"});const[b,g]=f.useState(!1),y=f.useCallback(()=>{g(S=>!S)},[]),{finalIcon:x,finalIconPosition:v}=f.useMemo(()=>i==="password"?{finalIcon:a.jsx(Xo,{showPassword:b,onToggle:y,readOnly:u,disabled:c.disabled}),finalIconPosition:"right"}:{finalIcon:r,finalIconPosition:s},[i,r,s,b,y]),C=f.useMemo(()=>i==="password"&&b?"text":i,[i,b]),N=f.useMemo(()=>h(Gn.wuInput,"wu-peer",e),[e]);return a.jsxs("div",{"data-slot":"wu-input-group",role:"group",className:Gn.wuInputGroup,"data-label-position":n,"data-icon-position":x&&v,children:[x&&a.jsx("span",{className:Gn.wuInputIcon,children:x}),a.jsx(Yo,{ref:w,className:N,"data-variant":o,type:C,readOnly:u,"aria-invalid":l,id:p,...c}),t&&a.jsx(Me,{htmlFor:p,children:t})]})}));Re.displayName="WuInput";const Et="MM-dd-yyyy",Mf=[{label:"Day",value:1},{label:"Week",value:7},{label:"Month",value:30},{label:"Quarter",value:90},{label:"Year",value:365}],kf=({current:e,onSelect:t,presetRanges:n=Ew})=>{const[r,s]=f.useState(),[o,i]=f.useState(!1),[u,l]=f.useState(""),[d,c]=f.useState(""),[w,m]=f.useState(!1),p=f.useMemo(()=>n.map(v=>v.value),[n]),b=h("wu-flex wu-w-full wu-gap-2 wu-px-4 wu-py-2 wu-text-sm wu-text-gray-lead wu-transition-colors","wu-rounded-none hover:wu-bg-gray-10 focus:wu-outline-none focus-visible:wu-ring-2","focus-visible:wu-ring-blue-pHover focus-visible:wu-ring-offset-1 wu-text-start"),g=f.useCallback(v=>{if(v===void 0){s(void 0),i(!0);return}const C=Number(v)-1;s(C),i(!1),t({from:z.sub(new Date,{days:C}),to:new Date})},[t]),y=f.useCallback((v,C)=>{if(!v||!(e!=null&&e.to)||!(e!=null&&e.from)||!new RegExp(Rr).test(v))return!1;const S=C==="start"?z.parse(v,Et,new Date):new Date(e.from),M=C==="end"?z.parse(v,Et,new Date):new Date(e.to);return z.isBefore(M,S)?(m(!0),!1):(m(!1),!(z.isSameDay(S,e.from)&&z.isSameDay(M,e.to)))},[e]),x=f.useCallback((v,C)=>{if((C==="start"?l:c)(v),y(v,C)){const S={from:e==null?void 0:e.from,to:e==null?void 0:e.to};C==="start"&&(S.from=z.parse(v,Et,new Date)),C==="end"&&(S.to=z.parse(v,Et,new Date)),t(S)}},[e,t,y]);return f.useEffect(()=>{if(e!=null&&e.to&&(e!=null&&e.from)&&z.isValid(e.to)&&z.isValid(e.from)){l(z.format(e.from,Et)),c(z.format(e.to,Et));const v=z.differenceInCalendarDays(e.to,e.from);z.isToday(e.to)&&p.includes(v+1)?(s(v),i(!1)):(s(void 0),i(!0))}},[e,p]),a.jsxs("div",{className:"wu-flex wu-flex-col wu-gap-1 wu-p-2 wu-bg-white wu-w-60 wu-date-picker-sidebar",children:[a.jsx("ul",{className:"wu-flex wu-gap-1 wu-py-2 wu-date-picker-batch-list wu-hidden",children:Mf.map(({label:v,value:C})=>a.jsx(Xt,{variant:"secondary",className:"wu-px-1 wu-py-1 wu-text-xs wu-h-fit wu-min-w-fit disabled:wu-bg-white",disabled:C!==1,children:v},C))}),a.jsxs("ul",{className:"wu-flex wu-flex-col wu-gap-1 wu-date-picker-ranges",children:[n.map(({label:v,value:C})=>a.jsx("li",{children:a.jsx("button",{className:h(b,r===C-1&&"wu-bg-blue-p/10"),onClick:()=>g(C),children:v})},C)),a.jsx("li",{children:a.jsx("button",{className:h(b,o&&"wu-bg-blue-p/10"),onClick:()=>g(),children:"Custom Range"})})]}),a.jsxs("div",{className:"wu-relative wu-flex wu-gap-3 wu-pt-2 wu-date-picker-range-footer",children:[a.jsx(Re,{placeholder:"Start Date",pattern:Rr,value:u,onChange:v=>x(v.target.value,"start"),"aria-label":"Start Date"}),a.jsx(Re,{placeholder:"End Date",pattern:Rr,value:d,onChange:v=>x(v.target.value,"end"),"aria-label":"End Date"}),w?a.jsx("small",{className:"wu-absolute wu-text-[10px] wu-leading-[14px] wu-text-red-deep wu-left-0 -wu-bottom-5 wu-text-start",children:"End date must be after start date"}):a.jsx("small",{className:"wu-absolute wu-right-0 wu-leading-[14px] -wu-bottom-4 wu-text-gray-subtle wu-text-end",children:"mm-dd-yyyy"})]})]})},Df=({Trigger:e,children:t,className:n,dir:r,open:s,onOpenChange:o,modal:i,...u})=>a.jsxs(je,{open:s,onOpenChange:o,modal:i,children:[a.jsx(dt,{asChild:!0,dir:r,children:e}),a.jsx($e,{className:h("wu-w-80 wu-p-0 wu-border-blue-p wu-bg-white wu-dark:border-gray-switcher",n),dir:r,...u,children:t})]}),hs=e=>a.jsx(jt.PopoverClose,{asChild:!0,children:a.jsx(Ie,{...e})}),It={wuDateRangeNativeSidebar:"_wuDateRangeNativeSidebar_1oiuh_1",customInputs:"_customInputs_1oiuh_26",inputsRow:"_inputsRow_1oiuh_42",errorWrapper:"_errorWrapper_1oiuh_63",errorText:"_errorText_1oiuh_67"},Af=[{label:"Last week",value:7},{label:"Last month",value:30},{label:"Last quarter",value:90},{label:"Last year",value:365}],Se=e=>{if(!e)return"";try{const t=new Date(e);if(!z.isValid(t))return"";const n=t.getFullYear(),r=String(t.getMonth()+1).padStart(2,"0"),s=String(t.getDate()).padStart(2,"0");return`${n}-${r}-${s}`}catch{return""}},Zo=e=>{if(!e)return null;try{const t=z.parseISO(e);return z.isValid(t)?z.startOfDay(t):null}catch{return null}},_f=(e,t,n)=>!(t&&e<z.startOfDay(t)||n&&e>z.startOfDay(n)),Jo=e=>z.sub(new Date,{days:e}),Qo=e=>e?z.sub(new Date,{days:1}):new Date;function Pf({ranges:e=Af,excludeToday:t=!0,current:n,onSelect:r,onReset:s,onApply:o,showResetButton:i=!0,maxDate:u,minDate:l,...d}){const[c,w]=f.useState(Se(n==null?void 0:n.from)||Se(l)),[m,p]=f.useState(Se(n==null?void 0:n.to)||Se(u)),[b,g]=f.useState(!1),[y,x]=f.useState(""),[v,C]=f.useState("");f.useEffect(()=>{w(Se(n==null?void 0:n.from)||Se(l)),p(Se(n==null?void 0:n.to)||Se(u)),x(""),C("")},[n==null?void 0:n.from,n==null?void 0:n.to,l,u]);const N=f.useMemo(()=>{if(!(n!=null&&n.from)||!(n!=null&&n.to))return null;const D=z.differenceInCalendarDays(n.to,n.from)+1;return e.find(A=>A.value===D)??null},[n==null?void 0:n.from,n==null?void 0:n.to,e]),S=f.useCallback(D=>{const A=Jo(D),_=Qo(t);w(Se(A)),p(Se(_)),x(""),C(""),g(!1),r==null||r({from:A,to:_})},[t,r]),M=f.useCallback((D,A)=>{const _=Zo(D);if(A==="start"?(w(D),x("")):(p(D),C("")),!_){if(D){const F="Please enter a valid date";A==="start"?x(F):C(F)}return}if(!_f(_,l,u)){const F=l&&_<z.startOfDay(l)?`Date must be on or after ${z.format(l,"MMM d, yyyy")}`:`Date must be on or before ${z.format(u,"MMM d, yyyy")}`;A==="start"?x(F):C(F);return}const W=Zo(A==="start"?m:c);A==="start"&&W?_<=W?r==null||r({from:_,to:W}):x("Start date must be before or equal to end date"):A==="end"&&W&&(_>=W?r==null||r({from:W,to:_}):C("End date must be after or equal to start date"))},[c,m,r,l,u]),T=f.useMemo(()=>e.map(D=>{const A=Jo(D.value),_=Qo(t);return{...D,displayStartDate:z.format(A,"MMM d, yyyy"),displayEndDate:z.format(_,"MMM d, yyyy")}}),[e,t]),I=b||(n==null?void 0:n.from)&&(n==null?void 0:n.to)&&!N;return a.jsxs("div",{className:It.wuDateRangeNativeSidebar,...d,children:[a.jsxs("ul",{children:[a.jsx("li",{children:a.jsx("button",{onClick:()=>g(!0),"data-selected":I,"aria-pressed":I,"aria-label":"Select custom date range",children:"Custom Range"})}),a.jsxs("li",{className:It.customInputs,"data-expanded":I,children:[a.jsxs("div",{className:It.inputsRow,children:[a.jsx(Re,{type:"date",value:c,onChange:D=>M(D.target.value,"start"),Label:"Start",min:Se(l),max:Se(u),"aria-describedby":y?"start-date-error":void 0}),a.jsx(Re,{type:"date",value:m,onChange:D=>M(D.target.value,"end"),Label:"End",min:c||Se(l),max:Se(u),"aria-describedby":v?"end-date-error":void 0})]}),(y||v)&&a.jsxs("div",{className:It.errorWrapper,role:"alert","aria-live":"polite",children:[y&&a.jsx("p",{id:"start-date-error",className:It.errorText,children:y}),v&&a.jsx("p",{id:"end-date-error",className:It.errorText,children:v})]})]}),T.map(D=>a.jsx("li",{children:a.jsxs("button",{onClick:()=>S(D.value),"data-selected":!I&&(N==null?void 0:N.value)===D.value,"aria-pressed":!I&&(N==null?void 0:N.value)===D.value,"aria-label":`Select ${D.label}`,children:[D.label," ",a.jsxs("small",{children:["(",D.displayStartDate," - ",D.displayEndDate,")"]})]})},D.value))]}),a.jsxs("footer",{children:[i&&a.jsx(hs,{variant:"secondary",Icon:a.jsx(Oe,{icon:"wm-refresh"}),onClick:s,children:"Reset"}),a.jsx(hs,{onClick:o,disabled:!!(y||v),children:"Apply"})]})]})}const Vf=({formatString:e="MMM dd, yyyy",value:t,onChange:n,disabled:r,minDate:s=z.sub(new Date,{years:5}),maxDate:o=z.add(new Date,{years:1}),dir:i="ltr",minDateToSelect:u,maxDateToSelect:l,presetRanges:d,Label:c,labelPosition:w="top",onReset:m,showResetButton:p=!0,placeholder:b="Select Date Range",CustomTrigger:g,native:y,align:x="start",alignOffset:v,side:C,sideOffset:N=-.5,...S})=>{const[M,T]=f.useState(t),[I,D]=f.useState(t),[A,_]=f.useState(""),P=f.useCallback(()=>{if(I){const B=I.from,$=I.to;T({from:B,to:$}),_(`${z.format(B,e)} - ${z.format($,e)}`),n&&n({from:B,to:$})}},[I,e,n]),W=f.useCallback(()=>{D(M)},[M]),F=f.useCallback(()=>{m?m():(T(void 0),D(void 0),_(""),n&&n(void 0))},[m,n]);return f.useEffect(()=>{if(t!=null&&t.from&&(t!=null&&t.to)){const B=_n(t.from),$=_n(t.to);T(t),D(t),_(`${z.format(B,e)} - ${z.format($,e)}`)}else T(void 0),D({to:new Date,from:new Date})},[t,e]),a.jsxs(Me,{className:h("wu-flex wu-gap-1",w==="left"?"wu-items-center":"wu-flex-col wu-items-start","wu-date-picker-label"),dir:i,children:[c,a.jsxs(je,{onOpenChange:B=>!B&&W(),children:[a.jsx(Qr,{formattedString:A,dir:i,placeholder:b,CustomTrigger:g,...S}),a.jsx($e,{className:"wu-flex wu-p-0 wu-border wu-w-fit wu-border-blue-p wu-bg-white",align:x,sideOffset:N,side:C,alignOffset:v,dir:i,children:y?a.jsx(Pf,{current:I,onSelect:B=>{D(B)},ranges:d,onApply:P,onReset:F,showResetButton:p,minDate:s,maxDate:o}):a.jsxs(a.Fragment,{children:[a.jsx(kf,{current:I,onSelect:D,presetRanges:d}),a.jsx(Jr,{dir:i,numberOfMonths:2,mode:"range",captionLayout:"dropdown",selected:I,onSelect:D,disabled:B=>yo(B,r,s,o),startMonth:s,endMonth:o,required:!0,autoFocus:!0,defaultMonth:M==null?void 0:M.from,className:h("wu-shadow-none wu-date-range-picker"),min:u,max:l,footer:a.jsx(bo,{handleDateChange:P,disabled:r,onReset:F,showResetButton:p})})]})})]})]})},Ro=f.forwardRef((e,t)=>{const{className:n,rounded:r,...s}=e;return a.jsx("div",{className:h("wu-card wu-p-2 wu-pt-1 hover:wu-shadow-card wu-border wu-border-black/20 hover:wu-border-black/30 wu-transition-colors wu-duration-300",r?"wu-rounded-lg":"wu-rounded-sm",n),ref:t,...s})});Ro.displayName="WuCard";const ei=f.forwardRef((e,t)=>{const{className:n,...r}=e;return a.jsx("div",{ref:t,...r,className:h("wu-p-2 wu-mb-2 wu-border-b wu-border-gray-40 min-h-12 wu-card-header",n)})});ei.displayName="WuCardHeader";const ti=f.forwardRef((e,t)=>{const{className:n,...r}=e;return a.jsx("div",{ref:t,...r,className:h("wu-p-2 wu-mt-2 wu-border-t wu-border-gray-40 min-h-12 wu-card-footer",n)})});ti.displayName="WuCardHeader";const ni=E.forwardRef(({className:e,partial:t,...n},r)=>a.jsx(Fr.Root,{ref:r,className:h("wu-h-4 wu-w-4 wu-shrink-0 wu-rounded-[2px] wu-bg-white wu-border wu-border-gray-subtle wu-ring-offset-background focus-visible:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-ring focus-visible:wu-ring-offset-[1px] data-[state=checked]:wu-bg-blue-p data-[state=checked]:wu-text-white data-[state=checked]:wu-border-none data-[state=checked]:hover:wu-bg-blue-q hover:wu-bg-gray-20 hover:wu-border-blue-p wu-transition-all data-[state=checked]:disabled:wu-bg-gray-20","disabled:wu-cursor-not-allowed disabled:wu-opacity-50 disabled:data-[state=unchecked]:wu-bg-gray-20 disabled:hover:wu-border-gray-subtle disabled:wu-border-gray-subtle",e),...n,children:a.jsxs(Fr.Indicator,{className:h("wu-flex wu-items-center wu-justify-center wu-text-current"),children:[!t&&a.jsx("span",{className:"wm-check wu-text-base wu-leading-4"}),t&&a.jsx("span",{className:"wm-check-indeterminate-small wu-text-base wu-leading-4"})]})}));ni.displayName=Fr.Root.displayName;const qe=f.forwardRef((e,t)=>{const{disabled:n,checked:r,Label:s,labelPosition:o="right",className:i,id:u=$r(),partial:l,onChange:d,required:c,readonly:w,...m}=e;return f.useEffect(()=>{m.defaultChecked!==void 0&&r!==void 0&&console.error("WuCheckbox: Both `checked` and `defaultChecked` cannot be used together. Use only one of them.")},[m.defaultChecked,r]),a.jsxs("div",{className:Of({labelPosition:o,className:"wu-checkbox-container"}),dir:m.dir,children:[a.jsx(ni,{id:u,...m,partial:l,checked:r,disabled:n||w,onCheckedChange:d,className:h("wu-peer wu-checkbox",i),required:c,ref:t}),s&&a.jsx(Me,{htmlFor:u,className:"wu-w-full wu-checkbox-label",children:s})]})}),Of=Be.cva("wu-flex wu-items-center wu-gap-2 wu-w-fit",{variants:{labelPosition:{left:"wu-flex-row-reverse wu-text-right",right:"wu-flex-row"}}});qe.displayName="WuCheckbox";const ms={WuChip:"_WuChip_l50hr_1",WuLabel:"_WuLabel_l50hr_70",WuCloseBtn:"_WuCloseBtn_l50hr_74"},ri=f.forwardRef(({variant:e="primary",size:t="md",shape:n="default",color:r,disabled:s=!1,selected:o=!1,onClose:i,className:u,children:l,onClick:d,onKeyDown:c,...w},m)=>{const p=!!d,b=!!i,g=p?"button":"span",y=v=>{v.stopPropagation(),!s&&(i==null||i())},x=v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),y(v))};return a.jsxs(g,{ref:m,type:p?"button":void 0,disabled:p?s:void 0,"aria-disabled":s||void 0,"data-variant":e,"data-size":t,"data-shape":n,"data-color":r,"data-selected":o?"true":"false","data-disabled":s||void 0,"data-closable":b||void 0,className:h(ms.WuChip,u),onClick:s?void 0:d,onKeyDown:c,...w,children:[a.jsx("span",{className:ms.WuLabel,children:l}),b&&a.jsx("span",{role:"button",tabIndex:s?-1:0,"aria-label":"Remove",className:ms.WuCloseBtn,onClick:y,onKeyDown:x,children:a.jsx("span",{className:"wm-close"})})]})});ri.displayName="WuChip";const gs=E.forwardRef(({className:e,...t},n)=>a.jsx(Ne.Command,{ref:n,className:h("wu-flex wu-h-full wu-w-full wu-flex-col wu-overflow-hidden wu-rounded-md",e),...t}));gs.displayName=Ne.Command.displayName;const si=E.forwardRef(({className:e,...t},n)=>a.jsx("div",{className:"wu-flex wu-items-center wu-border-b wu-px-3",children:a.jsx(Ne.Command.Input,{ref:n,className:h("wu-flex wu-h-11 wu-w-full wu-rounded-md wu-bg-transparent wu-py-3 wu-text-sm wu-outline-none wu-placeholder:wu-text-muted-foreground disabled:wu-cursor-not-allowed disabled:wu-opacity-50",e),...t})}));si.displayName=Ne.Command.Input.displayName;const bs=E.forwardRef(({className:e,...t},n)=>a.jsx(Ne.Command.List,{ref:n,className:h("",e),...t}));bs.displayName=Ne.Command.List.displayName;const ys=E.forwardRef((e,t)=>a.jsx(Ne.Command.Empty,{ref:t,className:"wu-text-center wu-p-2 wu-pb-2.5 wu-text-xs",...e}));ys.displayName=Ne.Command.Empty.displayName;const sn=E.forwardRef(({className:e,...t},n)=>a.jsx(Ne.Command.Group,{ref:n,className:h("",e),...t}));sn.displayName=Ne.Command.Group.displayName;const vs=E.forwardRef(({className:e,...t},n)=>a.jsx(Ne.Command.Separator,{ref:n,className:h("wu-mx-2 wu-my-1 wu-h-px wu-bg-gray-40",e),...t}));vs.displayName=Ne.Command.Separator.displayName;const an=E.forwardRef(({className:e,...t},n)=>a.jsx(Ne.Command.Item,{ref:n,className:h("wu-relative wu-flex wu-cursor-default wu-gap-2 wu-select-none wu-items-center wu-rounded-sm wu-px-2 wu-py-3 wu-text-sm wu-outline-none data-[disabled=true]:wu-pointer-events-none data-[disabled=true]:wu-opacity-50 [&_svg]:wu-pointer-events-none [&_svg]:wu-size-4 [&_svg]:wu-shrink-0",e),...t}));an.displayName=Ne.Command.Item.displayName;const ai=(e,t,n,r)=>f.useMemo(()=>{if(!e||!n||t.length===0)return t;const s=Array.isArray(n)?n:[n];if(s.length===0)return t;const o=new Set(s.map(d=>String(d[r.value]))),i=[],u=[],l=[];return t.forEach(d=>{const c=d[r.value];c===void 0?i.push(d):o.has(String(c))?u.push(d):l.push(d)}),[...i,...u,...l]},[t,n,r.value,e]),Mt=f.forwardRef(({containerHeight:e=400,list:t,callback:n,dir:r,className:s,style:o},i)=>a.jsx(eo.Virtuoso,{ref:i,dir:r,className:s,style:{height:e,scrollbarWidth:"thin",scrollbarColor:"#d4d4d4 #f1f1f1",overflowX:"hidden",...o},data:t,itemContent:(u,l)=>n(u,l)}));Mt.displayName="WuVirtualScroll";const Lf=({tags:e,triggerRef:t})=>{const[n,r]=f.useState([]),[s,o]=f.useState([]),i=f.useMemo(()=>a.jsx("ul",{className:"wu-flex wu-flex-col wu-items-start wu-justify-center wu-list-none",children:s.map(l=>a.jsx("li",{className:"wu-py-1 wu-text-xs wu-text-left",children:l},l))}),[s]),u=l=>{const d=document.createElement("div");Object.assign(d.style,{display:"inline-block",visibility:"hidden",position:"absolute",whiteSpace:"nowrap"}),d.textContent=l,document.body.appendChild(d);const c=d.offsetWidth;return document.body.removeChild(d),c+8};return f.useEffect(()=>{const l=()=>{if(t.current){const m=t.current.offsetWidth-20-36;let p=0;const b=[],g=[];e.forEach(y=>{const x=u(y);p+x+8<m?(b.push(y),p+=x+8):g.push(y)}),r(b),o(g)}};return l(),window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l)}},[e,t]),a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2 wu-text-xs",children:[n.map(l=>a.jsx("span",{className:"wu-px-1 wu-py-0.5 wu-text-xs wu-rounded-sm wu-bg-gray-10 wu-combobox-tag",children:l},l)),s.length>0&&a.jsx(An,{content:i,className:"wu-z-[51] wu-text-left",children:a.jsxs("span",{className:"wu-px-1 wu-py-0.5 wu-text-xs wu-rounded-sm wu-bg-gray-10 wu-combobox-tag",children:["+",s.length]})})]})},Ff=({placeholder:e="Select...",isEllipse:t=!1,selectedOptions:n,variant:r="flat",dir:s="ltr",accessorKey:o,multiple:i,id:u,disabled:l,selectAll:d,isCheckedAll:c,className:w,...m})=>{const[p,b]=f.useState([]),g=f.useRef(null);f.useEffect(()=>{if(!n||Array.isArray(n)&&n.length===0){b([]);return}if(i){const x=n;b(x==null?void 0:x.map(v=>v[o.label]));return}else b([n[o.label]])},[n]);const y=()=>{var x;return p.length?c&&(d!=null&&d.enable)&&(d!=null&&d.triggerText)?a.jsx("span",{className:"wu-overflow-hidden wu-text-xs wu-text-start wu-text-ellipsis wu-whitespace-nowrap",children:d.triggerText}):t?a.jsx("span",{className:"wu-overflow-hidden wu-text-xs wu-text-start wu-text-ellipsis wu-whitespace-nowrap",style:{width:`${(((x=g.current)==null?void 0:x.offsetWidth)||0)-32}px`},children:p.join(", ")}):a.jsx(Lf,{tags:p,triggerRef:g}):a.jsx("p",{className:"wu-text-xs wu-opacity-70",children:e})};return a.jsx(dt,{dir:s,asChild:!0,id:u,disabled:l,children:a.jsxs("button",{...m,ref:g,disabled:l,className:h("focus-visible:wu-ring-2 focus-visible:wu-ring-blue-pHover wu-bg-white focus-visible:wu-ring-offset-2 wu-flex wu-w-full wu-items-center wu-justify-between wu-border-b wu-border-gray-subtle wu-py-1.5 wu-px-2 placeholder:wu-text-gray-40 focus:wu-outline-none disabled:wu-cursor-not-allowed disabled:wu-opacity-50 hover:wu-bg-gray-10 hover:wu-border-blue-p wu-transition-colors focus-visible:wu-bg-gray-20 focus-visible:wu-border-blue-p wu-cursor-pointer wu-text-xs wu-rounded-t-sm wu-gap-2 wu-h-8 wu-group/wuCombobox wu-combobox-trigger",r==="outlined"&&"wu-border wu-border-gray-subtle","disabled:wu-cursor-not-allowed disabled:hover:wu-border-gray-subtle disabled:wu-bg-gray-10",w),children:[y(),a.jsx("span",{className:"wm-arrow-drop-down group-data-[state=open]/wuCombobox:wu-rotate-180 wu-transition-transform wu-duration-300 wu-text-base"})]})})},oi=se.Root,ii=se.Trigger,ui=se.Group,Wf=se.Portal,Bf=se.Sub,$f=se.RadioGroup,li=E.forwardRef(({className:e,inset:t,children:n,position:r,...s},o)=>a.jsxs(se.SubTrigger,{ref:o,className:h("wu-flex wu-cursor-default wu-select-none wu-text-xs wu-items-center wu-p-2 wu-outline-none focus:wu-bg-gray-20 data-[state=open]:wu-bg-gray-20",t&&"wu-pl-8",e),...s,children:[r==="left"&&a.jsx("span",{className:h("wm-chevron-right",s.dir==="rtl"&&"ml-2")}),n,r!=="left"&&a.jsx("span",{className:h("wu-text-base wu-leading-4",s.dir==="rtl"&&"wu-mr-auto wm-chevron-left",s.dir!=="rtl"&&"wu-ml-auto wm-chevron-right")})]}));li.displayName=se.SubTrigger.displayName;const ci=E.forwardRef(({className:e,...t},n)=>a.jsx(se.SubContent,{ref:n,className:h("wu-z-50 wu-min-w-[8rem] wu-overflow-hidden wu-border wu-text-xs wu-bg-white wu-text-gray-lead wu-shadow-lg data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[side=bottom]:wu-slide-in-from-top-2 data-[side=left]:wu-slide-in-from-right-2 data-[side=right]:wu-slide-in-from-left-2 data-[side=top]:wu-slide-in-from-bottom-2",e),...t}));ci.displayName=se.SubContent.displayName;const xs=E.forwardRef(({className:e,sideOffset:t=4,...n},r)=>a.jsx(se.Portal,{children:a.jsx(se.Content,{ref:r,sideOffset:t,className:h("wu-z-50 wu-min-w-[8rem] wu-overflow-hidden wu-border wu-text-xs wu-bg-white wu-text-gray-lead wu-shadow-md data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[side=bottom]:wu-slide-in-from-top-2 data-[side=left]:wu-slide-in-from-right-2 data-[side=right]:wu-slide-in-from-left-2 data-[side=top]:wu-slide-in-from-bottom-2",e),...n})}));xs.displayName=se.Content.displayName;const Kn=E.forwardRef(({className:e,inset:t,...n},r)=>a.jsx(se.Item,{ref:r,className:h("wu-relative wu-flex wu-cursor-default wu-select-none wu-items-center wu-text-xs wu-p-2 wu-outline-none wu-transition-colors focus:wu-bg-gray-20 data-[disabled]:wu-cursor-not-allowed data-[disabled]:wu-opacity-50",t&&"wu-pl-8",e),...n}));Kn.displayName=se.Item.displayName;const di=E.forwardRef(({className:e,children:t,checked:n,dir:r,...s},o)=>a.jsxs(se.CheckboxItem,{ref:o,className:h("wu-group wu-relative wu-flex wu-cursor-default wu-select-none wu-items-center wu-text-xs wu-py-3 wu-outline-none wu-transition-colors focus:wu-bg-gray-20 data-[disabled]:wu-cursor-not-allowed data-[disabled]:wu-opacity-50",r==="rtl"&&"wu-pr-8 wu-pl-2",r!=="rtl"&&"wu-pl-8 wu-pr-2",e),checked:n,...s,children:[a.jsx("span",{className:h("wu-absolute wu-flex wu-items-center wu-justify-center wu-w-4 wu-h-4 wu-rounded-sm wu-ring-1 wu-ring-gray-subtle group-disabled:wu-bg-gray-20 group-data-[state=checked]:wu-bg-blue-p group-hover:wu-bg-gray-20 group-hover:wu-ring-blue-p wu-transition-all group-data-[state=checked]:wu-ring-blue-p",r==="rtl"&&"wu-right-2",r!=="rtl"&&"wu-left-2"),children:a.jsx(se.ItemIndicator,{children:a.jsx("span",{className:"wm-check wu-text-base wu-text-white"})})}),t]}));di.displayName=se.CheckboxItem.displayName;const wi=E.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(se.RadioItem,{ref:r,className:h("wu-group wu-relative wu-flex wu-cursor-default wu-select-none wu-items-center wu-text-xs wu-py-3 wu-pl-8 wu-pr-2 wu-outline-none wu-transition-colors focus:wu-bg-gray-20 focus:wu-text-accent-foreground data-[disabled]:wu-cursor-not-allowed data-[disabled]:wu-opacity-50",e),...n,children:[a.jsx("span",{className:"wu-absolute wu-rounded-full wu-left-2 wu-flex wu-h-4 wu-w-4 wu-items-center wu-justify-center wu-ring-1 wu-ring-gray-subtle group-disabled:wu-bg-gray-20 group-data-[state=checked]:wu-bg-white group-hover:wu-bg-gray-20 group-hover:wu-ring-blue-p wu-transition-all group-data-[state=checked]:wu-ring-blue-p group-hover:group-data-[state=checked]:wu-ring-blue-q",children:a.jsx(se.ItemIndicator,{className:"wu-w-4 wu-h-4 wu-flex wu-items-center wu-justify-center",children:a.jsx("span",{className:"wm-circle wu-text-blue-p group-hover:group-data-[state=checked]:wu-text-blue-q wu-text-xs"})})}),t]}));wi.displayName=se.RadioItem.displayName;const on=E.forwardRef(({className:e,inset:t,...n},r)=>a.jsx(se.Label,{ref:r,className:h("wu-p-2 wu-font-medium wu-text-xs",t&&"wu-pl-8",e),...n}));on.displayName=se.Label.displayName;const Yn=E.forwardRef(({className:e,...t},n)=>a.jsx(se.Separator,{ref:n,className:h("-wu-mx-1 wu-my-1 wu-h-px wu-bg-gray-20",e),...t}));Yn.displayName=se.Separator.displayName;const fi=({option:e,value:t,multiple:n=!1,onSelect:r,accessorKey:s,dir:o})=>{const[i,u]=f.useState(n?[]:"");f.useEffect(()=>{t&&u(n?t.map(w=>JSON.stringify(w[s.value])):JSON.stringify(t[s.value]))},[t,s.value,n]);const l=n?i.includes(JSON.stringify(e[s.value])):i===JSON.stringify(e[s.value]),d=()=>{e.disabled||r(e)};return a.jsxs(an,{onSelect:d,disabled:e.disabled,className:h("wu-cursor-pointer wu-text-xs wu-items-start wu-leading-4 wu-py-2 wu-combobox-item hover:wu-bg-gray-100",l&&"wu-bg-gray-10"),dir:o,children:[n&&a.jsx(qe,{checked:l}),a.jsx(qf,{option:e,accessorKey:s})]})},qf=({option:e,accessorKey:t})=>{const n=e[t.label];return a.jsxs("div",{className:"wu-flex wu-items-center wu-w-full wu-gap-1",children:[e.icon&&e.icon,n,e.isAdmin&&a.jsx("span",{className:"wu-ml-auto wu-text-sm wm-lock wu-text-orange-deep"})]})},pi=e=>{const{option:t,selectAll:n,handleSelectAll:r,isCheckedAll:s,isPartialSelected:o,...i}=e;switch("type"in t?t.type:"option"){case"all":return a.jsxs(an,{onSelect:r,className:h("wu-cursor-pointer wu-text-xs wu-leading-4 wu-py-2 wu-combobox-item"),dir:i.dir,children:[a.jsx(qe,{checked:s||o,partial:o,"data-partial":o,"aria-label":(n==null?void 0:n.label)||"Select All"}),a.jsx("span",{"aria-hidden":!0,children:(n==null?void 0:n.label)||"Select All"})]});case"group":return a.jsxs(sn,{children:[a.jsx(on,{children:t.label}),t.options.map((l,d)=>{const c=l[i.accessorKey.value],w=c!=null?String(c):`group-item-${d}`;return f.createElement(fi,{...i,option:l,key:w})})]});case"divider":return a.jsx(vs,{className:"wu-mx-4"});default:return a.jsx(fi,{...i,option:t})}},Hf=e=>{const t=[],n=[],r=[],s=[];return e.forEach(o=>{o.type==="group"?(t.push(o),r.push(...o.options),s.push(...o.options.filter(i=>!i.disabled))):o.type==="divider"?n.push(o):r.push(o),o!=null&&o.disabled||s.push(o)}),{groups:t,dividers:n,allOptions:r,enabledOptions:s}},zf=f.memo(Re),Uf=({data:e,accessorKey:t,value:n,defaultValue:r,Header:s,virtualizedThreshold:o=100,isEllipse:i,placeholder:u,variant:l,dir:d,onSelect:c,Label:w,maxHeight:m=420,multiple:p=!1,hasGroup:b=!1,selectAll:g,id:y,disabled:x,labelPosition:v="top",className:C,onScroll:N,maxContentWidth:S,enableSearch:M=!0,noDataContent:T,selectedToTop:I=!1,...D})=>{const[A,_]=f.useState(""),[P,W]=f.useState(),[F,B]=f.useState(!1),[$,ie]=f.useState(!1),[U,V]=f.useState(!1),q=f.useRef(null),{allOptions:H,enabledOptions:Q}=f.useMemo(()=>b||g&&!g.includeDisabled?Hf(e):{allOptions:e,groups:[],dividers:[],enabledOptions:[]},[e,b]),ee=f.useMemo(()=>{if(!A)return e;const G=A.toLowerCase();return H.filter(X=>X[t.label].toLowerCase().includes(G))},[A,H,e,t.label]),J=f.useMemo(()=>p&&g!=null&&g.enable&&!A&&ee.length>0?[{type:"all"},...ee]:ee,[ee,A,p]),ge=ai(I,J,P,t),K=f.useCallback(G=>{const X=G[t.value];p?W(he=>{const le=he||[],xe=le.some(Pe=>Pe[t.value]===X)?le.filter(Pe=>Pe[t.value]!==X):[...le,G];return c==null||c(xe),xe}):(B(!1),W(G),c==null||c(G))},[p,t.value,c]),O=f.useCallback(G=>_(G.target.value),[]),j=f.useCallback(()=>_(""),[]);f.useEffect(()=>{if(n!==void 0&&r!==void 0){console.error("defaultValue and value cannot be used simultaneously");return}else n!==void 0?W(n):r!==void 0&&W(r)},[n,r]),f.useEffect(()=>{if(!p)return;const G=g!=null&&g.includeDisabled?(P==null?void 0:P.length)===H.length:(P==null?void 0:P.length)===Q.length;ie(G);const X=(P==null?void 0:P.length)>0&&!G;V(X)},[P,g]);const Y=f.useCallback(()=>{const G=$?[]:g!=null&&g.includeDisabled?H:Q;W(G),c==null||c(G)},[$,p,H,Q,c,g]),Z=Dn(v);return a.jsxs("div",{className:h(Z,"wu-flex wu-combobox-container"),ref:q,children:[a.jsxs(je,{onOpenChange:G=>{G&&j(),B(G)},open:F,modal:!0,children:[a.jsx(Ff,{selectedOptions:P,accessorKey:t,isEllipse:i,placeholder:u,variant:l,dir:d,multiple:p,disabled:x,selectAll:g,isCheckedAll:$,className:C,id:y,...D}),a.jsx($e,{className:"wu-min-w-[--radix-popover-trigger-width] wu-max-w-[calc(100vw-32px)] wu-p-0 wu-bg-white wu-border wu-border-blue-p wu-combobox-content",align:"start",sideOffset:-1,style:{maxWidth:S},children:a.jsxs(gs,{id:y,children:[M&&a.jsx("div",{className:"wu-m-2",children:a.jsx(zf,{placeholder:"Search...",Icon:a.jsx("span",{className:"wm-search"}),className:"wu-text-xs wu-combobox-search",onChange:O,name:"Search","aria-label":"Search",dir:d,iconPosition:d==="rtl"?"right":"left"})}),s,a.jsxs(bs,{children:[a.jsx(ys,{children:T||"No results found."}),ge.length>=o?a.jsx(Mt,{className:"wu-combobox-list",containerHeight:m,list:ge,callback:(G,X)=>{const he=X,le=he[t.value],ne=le!=null?String(le):`__${"type"in he?he.type:"item"}__${G}`;return a.jsx(pi,{option:X,value:P,onSelect:K,multiple:p,accessorKey:t,dir:d,selectAll:g,handleSelectAll:Y,isCheckedAll:$,isPartialSelected:U},ne)},dir:d}):a.jsx("div",{style:{height:"fit-content",maxHeight:m,overflow:"auto"},className:"wu-combobox-list",onScroll:N,children:ge.map((G,X)=>{const he=G,le=he[t.value],ne=le!=null?String(le):`__${"type"in he?he.type:"item"}__${X}`;return a.jsx(pi,{option:he,value:P,onSelect:K,multiple:p,accessorKey:t,dir:d,selectAll:g,handleSelectAll:Y,isCheckedAll:$,isPartialSelected:U},ne)})})]})]})})]}),w&&a.jsx(Me,{htmlFor:y,className:"wu-combobox-label",children:w})]})},jf=e=>{const{textToCopy:t,notificationText:n,...r}=e,[s,o]=f.useState(!1),i=async()=>{if(t)try{await navigator.clipboard.writeText(t),o(!0),setTimeout(()=>o(!1),2e3)}catch(u){console.error("Failed to copy:",u)}};return a.jsxs(Ie,{...r,onClick:i,variant:"iconOnly",className:h("wu-relative",e.className),"aria-label":"Copy to clipboard",children:[n&&a.jsx("span",{className:h("wu-absolute wu-text-[6px] wu-leading-3 -wu-top-4 wu-right-0 wu-bg-gray-notification wu-text-white wu-rounded-sm wu-shadow-md wu-px-1 wu-animate-ping-once",s?"wu-block":"wu-hidden"),children:n}),a.jsx(Oe,{icon:"wm-content-copy",className:"wu-text-lg"})]})},hi=re.Root,Gf=re.Trigger,Kf=re.Close,Yf=re.Portal,mi=E.forwardRef(({className:e,...t},n)=>a.jsx(re.Overlay,{className:h("wu-fixed wu-inset-0 wu-z-50 wu-bg-black/30 data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0","wu-drawer-overlay",e),...t,ref:n}));mi.displayName=re.Overlay.displayName;const Xf=Be.cva("wu-fixed wu-z-50 wu-gap-4 wu-p-6 wu-shadow-lg wu-transition wu-ease-in-out data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-duration-500 data-[state=open]:wu-duration-500",{variants:{side:{top:"wu-inset-x-0 wu-top-0 wu-border-b data-[state=closed]:wu-slide-out-to-top data-[state=open]:wu-slide-in-from-top",bottom:"wu-inset-x-0 wu-bottom-0 wu-border-t data-[state=closed]:wu-slide-out-to-bottom data-[state=open]:wu-slide-in-from-bottom",left:"wu-inset-y-0 wu-left-0 wu-h-full wu-w-3/4 wu-border-r data-[state=closed]:wu-slide-out-to-left data-[state=open]:wu-slide-in-from-left sm:wu-max-w-sm",right:"wu-inset-y-0 wu-right-0 wu-h-full wu-w-3/4 wu-border-l data-[state=closed]:wu-slide-out-to-right data-[state=open]:wu-slide-in-from-right sm:wu-max-w-sm"}},defaultVariants:{side:"right"}}),Ns=E.forwardRef(({side:e="right",className:t,children:n,hideCloseButton:r,overlayClassName:s,closeButtonClassName:o,...i},u)=>a.jsxs(Yf,{children:[a.jsx(mi,{className:s}),a.jsxs(re.Content,{ref:u,className:h(Xf({side:e}),t),...i,children:[n,!r&&a.jsx(re.Close,{"aria-label":"close",asChild:!0,children:a.jsxs(Xt,{variant:"iconOnly",className:h("wu-absolute wu-right-4 wu-top-4",o),children:[a.jsx("span",{className:"wm-close"}),a.jsx("span",{className:"wu-sr-only",children:"Close"})]})})]})]}));Ns.displayName=re.Content.displayName;const gi=E.forwardRef(({className:e,...t},n)=>a.jsx(re.Title,{ref:n,className:h("wu-text-lg wu-font-semibold",e),...t}));gi.displayName=re.Title.displayName;const Zf=E.forwardRef(({className:e,...t},n)=>a.jsx(re.Description,{ref:n,className:h("wu-text-sm",e),...t}));Zf.displayName=re.Description.displayName;const Jf=e=>t=>{e&&t.preventDefault()},Qf=e=>{const{Trigger:t,children:n,hideCloseButton:r,className:s,side:o="left",open:i,onOpenChange:u,preventClickOutside:l,overlayClassName:d,closeButtonClassName:c,...w}=e;return a.jsxs(hi,{open:i,onOpenChange:u,children:[a.jsx(Gf,{asChild:!0,children:t}),a.jsxs(Ns,{onInteractOutside:Jf(l),side:o,className:h("wu-bg-white wu-text-gray-lead wu-px-0",s),hideCloseButton:r,overlayClassName:d,closeButtonClassName:c,...w,children:[a.jsx("div",{className:"wu-hidden",children:a.jsx(gi,{})}),n]})]})},Rf=({children:e,...t})=>a.jsx(Kf,{...t,children:e}),bi=f.createContext({});function Ss(e){const t=f.useRef(null);return t.current===null&&(t.current=e()),t.current}const yi=typeof window<"u"?f.useLayoutEffect:f.useEffect,Xn=f.createContext(null);function ep(e,t){e.indexOf(t)===-1&&e.push(t)}function tp(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const et=(e,t,n)=>n>t?t:n<e?e:n;function Cs(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let un=()=>{},wt=()=>{};typeof process<"u"&&((Od=process.env)==null?void 0:Od.NODE_ENV)!=="production"&&(un=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Cs(t,n))},wt=(e,t,n)=>{if(!e)throw new Error(Cs(t,n))});const tt={},vi=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),np=e=>typeof e=="object"&&e!==null,xi=e=>/^0[^.\s]+$/u.test(e);function Ni(e){let t;return()=>(t===void 0&&(t=e()),t)}const kt=e=>e,Zn=(...e)=>e.reduce((t,n)=>r=>n(t(r))),Si=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1};class Ci{constructor(){this.subscriptions=[]}add(t){return ep(this.subscriptions,t),()=>tp(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let o=0;o<s;o++){const i=this.subscriptions[o];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Le=e=>e*1e3,He=e=>e/1e3,Ti=(e,t)=>t?e*(1e3/t):0,Ei=new Set;function Ii(e,t,n){e||Ei.has(t)||(console.warn(Cs(t,n)),Ei.add(t))}const Mi=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,rp=1e-7,sp=12;function ap(e,t,n,r,s){let o,i,u=0;do i=t+(n-t)/2,o=Mi(i,r,s)-e,o>0?n=i:t=i;while(Math.abs(o)>rp&&++u<sp);return i}function ln(e,t,n,r){if(e===t&&n===r)return kt;const s=o=>ap(o,0,1,e,n);return o=>o===0||o===1?o:Mi(s(o),t,r)}const ki=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Di=e=>t=>1-e(1-t),Ai=ln(.33,1.53,.69,.99),Ts=Di(Ai),_i=ki(Ts),Pi=e=>e>=1?1:(e*=2)<1?.5*Ts(e):.5*(2-Math.pow(2,-10*(e-1))),Es=e=>1-Math.sin(Math.acos(e)),op=Di(Es),Vi=ki(Es),ip=ln(.42,0,1,1),up=ln(0,0,.58,1),Oi=ln(.42,0,.58,1),lp=e=>Array.isArray(e)&&typeof e[0]!="number",Li=e=>Array.isArray(e)&&typeof e[0]=="number",Fi={linear:kt,easeIn:ip,easeInOut:Oi,easeOut:up,circIn:Es,circInOut:Vi,circOut:op,backIn:Ts,backInOut:_i,backOut:Ai,anticipate:Pi},cp=e=>typeof e=="string",Wi=e=>{if(Li(e)){wt(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,s]=e;return ln(t,n,r,s)}else if(cp(e))return wt(Fi[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Fi[e];return e},Jn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function dp(e,t){let n=new Set,r=new Set,s=!1,o=!1;const i=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function l(c){i.has(c)&&(d.schedule(c),e()),c(u)}const d={schedule:(c,w=!1,m=!1)=>{const b=m&&s?n:r;return w&&i.add(c),b.add(c),c},cancel:c=>{r.delete(c),i.delete(c)},process:c=>{if(u=c,s){o=!0;return}s=!0;const w=n;n=r,r=w,n.forEach(l),n.clear(),s=!1,o&&(o=!1,d.process(c))}};return d}const wp=40;function Bi(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=Jn.reduce((C,N)=>(C[N]=dp(o),C),{}),{setup:u,read:l,resolveKeyframes:d,preUpdate:c,update:w,preRender:m,render:p,postRender:b}=i,g=()=>{const C=tt.useManualTiming,N=C?s.timestamp:performance.now();n=!1,C||(s.delta=r?1e3/60:Math.max(Math.min(N-s.timestamp,wp),1)),s.timestamp=N,s.isProcessing=!0,u.process(s),l.process(s),d.process(s),c.process(s),w.process(s),m.process(s),p.process(s),b.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(g))},y=()=>{n=!0,r=!0,s.isProcessing||e(g)};return{schedule:Jn.reduce((C,N)=>{const S=i[N];return C[N]=(M,T=!1,I=!1)=>(n||y(),S.schedule(M,T,I)),C},{}),cancel:C=>{for(let N=0;N<Jn.length;N++)i[Jn[N]].cancel(C)},state:s,steps:i}}const{schedule:Fe,cancel:Is,state:Qn}=Bi(typeof requestAnimationFrame<"u"?requestAnimationFrame:kt,!0);let Rn;function fp(){Rn=void 0}const _e={now:()=>(Rn===void 0&&_e.set(Qn.isProcessing||tt.useManualTiming?Qn.timestamp:performance.now()),Rn),set:e=>{Rn=e,queueMicrotask(fp)}},$i=e=>t=>typeof t=="string"&&t.startsWith(e),qi=$i("--"),pp=$i("var(--"),Ms=e=>pp(e)?hp.test(e.split("/*")[0].trim()):!1,hp=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Hi(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Dt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},cn={...Dt,transform:e=>et(0,1,e)},er={...Dt,default:1},dn=e=>Math.round(e*1e5)/1e5,ks=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function mp(e){return e==null}const gp=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ds=(e,t)=>n=>!!(typeof n=="string"&&gp.test(n)&&n.startsWith(e)||t&&!mp(n)&&Object.prototype.hasOwnProperty.call(n,t)),zi=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,o,i,u]=r.match(ks);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(i),alpha:u!==void 0?parseFloat(u):1}},bp=e=>et(0,255,e),As={...Dt,transform:e=>Math.round(bp(e))},ft={test:Ds("rgb","red"),parse:zi("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+As.transform(e)+", "+As.transform(t)+", "+As.transform(n)+", "+dn(cn.transform(r))+")"};function yp(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const _s={test:Ds("#"),parse:yp,transform:ft.transform},wn=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),nt=wn("deg"),At=wn("%"),L=wn("px"),vp=wn("vh"),xp=wn("vw"),Ui={...At,parse:e=>At.parse(e)/100,transform:e=>At.transform(e*100)},_t={test:Ds("hsl","hue"),parse:zi("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+At.transform(dn(t))+", "+At.transform(dn(n))+", "+dn(cn.transform(r))+")"},de={test:e=>ft.test(e)||_s.test(e)||_t.test(e),parse:e=>ft.test(e)?ft.parse(e):_t.test(e)?_t.parse(e):_s.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ft.transform(e):_t.transform(e),getAnimatableNone:e=>{const t=de.parse(e);return t.alpha=0,de.transform(t)}},Np=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Sp(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(ks))==null?void 0:t.length)||0)+(((n=e.match(Np))==null?void 0:n.length)||0)>0}const ji="number",Gi="color",Cp="var",Tp="var(",Ki="${}",Ep=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Pt(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let o=0;const u=t.replace(Ep,l=>(de.test(l)?(r.color.push(o),s.push(Gi),n.push(de.parse(l))):l.startsWith(Tp)?(r.var.push(o),s.push(Cp),n.push(l)):(r.number.push(o),s.push(ji),n.push(parseFloat(l))),++o,Ki)).split(Ki);return{values:n,split:u,indexes:r,types:s}}function Ip(e){return Pt(e).values}function Yi({split:e,types:t}){const n=e.length;return r=>{let s="";for(let o=0;o<n;o++)if(s+=e[o],r[o]!==void 0){const i=t[o];i===ji?s+=dn(r[o]):i===Gi?s+=de.transform(r[o]):s+=r[o]}return s}}function Mp(e){return Yi(Pt(e))}const kp=e=>typeof e=="number"?0:de.test(e)?de.getAnimatableNone(e):e,Dp=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:kp(e);function Ap(e){const t=Pt(e);return Yi(t)(t.values.map((r,s)=>Dp(r,t.split[s])))}const ze={test:Sp,parse:Ip,createTransformer:Mp,getAnimatableNone:Ap};function Ps(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function _p({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,o=0,i=0;if(!t)s=o=i=n;else{const u=n<.5?n*(1+t):n+t-n*t,l=2*n-u;s=Ps(l,u,e+1/3),o=Ps(l,u,e),i=Ps(l,u,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(i*255),alpha:r}}function tr(e,t){return n=>n>0?t:e}const fn=(e,t,n)=>e+(t-e)*n,Vs=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},Pp=[_s,ft,_t],Vp=e=>Pp.find(t=>t.test(e));function Xi(e){const t=Vp(e);if(un(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===_t&&(n=_p(n)),n}const Zi=(e,t)=>{const n=Xi(e),r=Xi(t);if(!n||!r)return tr(e,t);const s={...n};return o=>(s.red=Vs(n.red,r.red,o),s.green=Vs(n.green,r.green,o),s.blue=Vs(n.blue,r.blue,o),s.alpha=fn(n.alpha,r.alpha,o),ft.transform(s))},Os=new Set(["none","hidden"]);function Op(e,t){return Os.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Lp(e,t){return n=>fn(e,t,n)}function Ls(e){return typeof e=="number"?Lp:typeof e=="string"?Ms(e)?tr:de.test(e)?Zi:Bp:Array.isArray(e)?Ji:typeof e=="object"?de.test(e)?Zi:Fp:tr}function Ji(e,t){const n=[...e],r=n.length,s=e.map((o,i)=>Ls(o)(o,t[i]));return o=>{for(let i=0;i<r;i++)n[i]=s[i](o);return n}}function Fp(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=Ls(e[s])(e[s],t[s]));return s=>{for(const o in r)n[o]=r[o](s);return n}}function Wp(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],i=e.indexes[o][r[o]],u=e.values[i]??0;n[s]=u,r[o]++}return n}const Bp=(e,t)=>{const n=ze.createTransformer(t),r=Pt(e),s=Pt(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?Os.has(e)&&!s.values.length||Os.has(t)&&!r.values.length?Op(e,t):Zn(Ji(Wp(r,s),s.values),n):(un(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),tr(e,t))};function Qi(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?fn(e,t,n):Ls(e)(e,t)}const $p=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Fe.update(t,n),stop:()=>Is(t),now:()=>Qn.isProcessing?Qn.timestamp:_e.now()}},Ri=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)r+=Math.round(e(o/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},nr=2e4;function Fs(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<nr;)t+=n,r=e.next(t);return t>=nr?1/0:t}function qp(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(Fs(r),nr);return{type:"keyframes",ease:o=>r.next(s*o).value/t,duration:He(s)}}const ue={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Ws(e,t){return e*Math.sqrt(1-t*t)}const Hp=12;function zp(e,t,n){let r=n;for(let s=1;s<Hp;s++)r=r-e(r)/t(r);return r}const Bs=.001;function Up({duration:e=ue.duration,bounce:t=ue.bounce,velocity:n=ue.velocity,mass:r=ue.mass}){let s,o;un(e<=Le(ue.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=et(ue.minDamping,ue.maxDamping,i),e=et(ue.minDuration,ue.maxDuration,He(e)),i<1?(s=d=>{const c=d*i,w=c*e,m=c-n,p=Ws(d,i),b=Math.exp(-w);return Bs-m/p*b},o=d=>{const w=d*i*e,m=w*n+n,p=Math.pow(i,2)*Math.pow(d,2)*e,b=Math.exp(-w),g=Ws(Math.pow(d,2),i);return(-s(d)+Bs>0?-1:1)*((m-p)*b)/g}):(s=d=>{const c=Math.exp(-d*e),w=(d-n)*e+1;return-Bs+c*w},o=d=>{const c=Math.exp(-d*e),w=(n-d)*(e*e);return c*w});const u=5/e,l=zp(s,o,u);if(e=Le(e),isNaN(l))return{stiffness:ue.stiffness,damping:ue.damping,duration:e};{const d=Math.pow(l,2)*r;return{stiffness:d,damping:i*2*Math.sqrt(r*d),duration:e}}}const jp=["duration","bounce"],Gp=["stiffness","damping","mass"];function eu(e,t){return t.some(n=>e[n]!==void 0)}function Kp(e){let t={velocity:ue.velocity,stiffness:ue.stiffness,damping:ue.damping,mass:ue.mass,isResolvedFromDuration:!1,...e};if(!eu(e,Gp)&&eu(e,jp))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,o=2*et(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:ue.mass,stiffness:s,damping:o}}else{const n=Up({...e,velocity:0});t={...t,...n,mass:ue.mass},t.isResolvedFromDuration=!0}return t}function rr(e=ue.visualDuration,t=ue.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const o=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],u={done:!1,value:o},{stiffness:l,damping:d,mass:c,duration:w,velocity:m,isResolvedFromDuration:p}=Kp({...n,velocity:-He(n.velocity||0)}),b=m||0,g=d/(2*Math.sqrt(l*c)),y=i-o,x=He(Math.sqrt(l/c)),v=Math.abs(y)<5;r||(r=v?ue.restSpeed.granular:ue.restSpeed.default),s||(s=v?ue.restDelta.granular:ue.restDelta.default);let C,N,S,M,T,I;if(g<1)S=Ws(x,g),M=(b+g*x*y)/S,C=A=>{const _=Math.exp(-g*x*A);return i-_*(M*Math.sin(S*A)+y*Math.cos(S*A))},T=g*x*M+y*S,I=g*x*y-M*S,N=A=>Math.exp(-g*x*A)*(T*Math.sin(S*A)+I*Math.cos(S*A));else if(g===1){C=_=>i-Math.exp(-x*_)*(y+(b+x*y)*_);const A=b+x*y;N=_=>Math.exp(-x*_)*(x*A*_-b)}else{const A=x*Math.sqrt(g*g-1);C=F=>{const B=Math.exp(-g*x*F),$=Math.min(A*F,300);return i-B*((b+g*x*y)*Math.sinh($)+A*y*Math.cosh($))/A};const _=(b+g*x*y)/A,P=g*x*_-y*A,W=g*x*y-_*A;N=F=>{const B=Math.exp(-g*x*F),$=Math.min(A*F,300);return B*(P*Math.sinh($)+W*Math.cosh($))}}const D={calculatedDuration:p&&w||null,velocity:A=>Le(N(A)),next:A=>{if(!p&&g<1){const P=Math.exp(-g*x*A),W=Math.sin(S*A),F=Math.cos(S*A),B=i-P*(M*W+y*F),$=Le(P*(T*W+I*F));return u.done=Math.abs($)<=r&&Math.abs(i-B)<=s,u.value=u.done?i:B,u}const _=C(A);if(p)u.done=A>=w;else{const P=Le(N(A));u.done=Math.abs(P)<=r&&Math.abs(i-_)<=s}return u.value=u.done?i:_,u},toString:()=>{const A=Math.min(Fs(D),nr),_=Ri(P=>D.next(A*P).value,A,30);return A+"ms "+_},toTransition:()=>{}};return D}rr.applyToOptions=e=>{const t=qp(e,100,rr);return e.ease=t.ease,e.duration=Le(t.duration),e.type="keyframes",e};const Yp=5;function tu(e,t,n){const r=Math.max(t-Yp,0);return Ti(n-e(r),t-r)}function $s({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:i,min:u,max:l,restDelta:d=.5,restSpeed:c}){const w=e[0],m={done:!1,value:w},p=I=>u!==void 0&&I<u||l!==void 0&&I>l,b=I=>u===void 0?l:l===void 0||Math.abs(u-I)<Math.abs(l-I)?u:l;let g=n*t;const y=w+g,x=i===void 0?y:i(y);x!==y&&(g=x-w);const v=I=>-g*Math.exp(-I/r),C=I=>x+v(I),N=I=>{const D=v(I),A=C(I);m.done=Math.abs(D)<=d,m.value=m.done?x:A};let S,M;const T=I=>{p(m.value)&&(S=I,M=rr({keyframes:[m.value,b(m.value)],velocity:tu(C,I,m.value),damping:s,stiffness:o,restDelta:d,restSpeed:c}))};return T(0),{calculatedDuration:null,next:I=>{let D=!1;return!M&&S===void 0&&(D=!0,N(I),T(I)),S!==void 0&&I>=S?M.next(I-S):(!D&&N(I),m)}}}function Xp(e,t,n){const r=[],s=n||tt.mix||Qi,o=e.length-1;for(let i=0;i<o;i++){let u=s(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||kt:t;u=Zn(l,u)}r.push(u)}return r}function Zp(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const o=e.length;if(wt(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const u=Xp(t,r,s),l=u.length,d=c=>{if(i&&c<e[0])return t[0];let w=0;if(l>1)for(;w<e.length-2&&!(c<e[w+1]);w++);const m=Si(e[w],e[w+1],c);return u[w](m)};return n?c=>d(et(e[0],e[o-1],c)):d}function Jp(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=Si(0,t,r);e.push(fn(n,1,s))}}function Qp(e){const t=[0];return Jp(t,e.length-1),t}function Rp(e,t){return e.map(n=>n*t)}function eh(e,t){return e.map(()=>t||Oi).splice(0,e.length-1)}function Vt({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=lp(r)?r.map(Wi):Wi(r),o={done:!1,value:t[0]},i=Rp(n&&n.length===t.length?n:Qp(t),e),u=Zp(i,t,{ease:Array.isArray(s)?s:eh(t,s)});return{calculatedDuration:e,next:l=>(o.value=u(l),o.done=l>=e,o)}}const th=e=>e!==null;function sr(e,{repeat:t,repeatType:n="loop"},r,s=1){const o=e.filter(th),u=s<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!u||r===void 0?o[u]:r}const nh={decay:$s,inertia:$s,tween:Vt,keyframes:Vt,spring:rr};function nu(e){typeof e.type=="string"&&(e.type=nh[e.type])}class qs{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const rh=e=>e/100;class ar extends qs{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==_e.now()&&this.tick(_e.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;nu(t);const{type:n=Vt,repeat:r=0,repeatDelay:s=0,repeatType:o,velocity:i=0}=t;let{keyframes:u}=t;const l=n||Vt;process.env.NODE_ENV!=="production"&&l!==Vt&&wt(u.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${u}`,"spring-two-frames"),l!==Vt&&typeof u[0]!="number"&&(this.mixKeyframes=Zn(rh,Qi(u[0],u[1])),u=[0,100]);const d=l({...t,keyframes:u});o==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...u].reverse(),velocity:-i})),d.calculatedDuration===null&&(d.calculatedDuration=Fs(d));const{calculatedDuration:c}=d;this.calculatedDuration=c,this.resolvedDuration=c+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=d}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:s,mixKeyframes:o,mirroredGenerator:i,resolvedDuration:u,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:d=0,keyframes:c,repeat:w,repeatType:m,repeatDelay:p,type:b,onUpdate:g,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const x=this.currentTime-d*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?x<0:x>s;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let C=this.currentTime,N=r;if(w){const I=Math.min(this.currentTime,s)/u;let D=Math.floor(I),A=I%1;!A&&I>=1&&(A=1),A===1&&D--,D=Math.min(D,w+1),!!(D%2)&&(m==="reverse"?(A=1-A,p&&(A-=p/u)):m==="mirror"&&(N=i)),C=et(0,1,A)*u}let S;v?(this.delayState.value=c[0],S=this.delayState):S=N.next(C),o&&!v&&(S.value=o(S.value));let{done:M}=S;!v&&l!==null&&(M=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const T=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return T&&b!==$s&&(S.value=sr(c,this.options,y,this.speed)),g&&g(S.value),T&&this.finish(),S}then(t,n){return this.finished.then(t,n)}get duration(){return He(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+He(t)}get time(){return He(this.currentTime)}set time(t){t=Le(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return tu(r=>this.generator.next(r).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(_e.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=He(this.currentTime))}play(){var s,o;if(this.isStopped)return;const{driver:t=$p,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),(o=(s=this.options).onPlay)==null||o.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(_e.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function sh(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const pt=e=>e*180/Math.PI,Hs=e=>{const t=pt(Math.atan2(e[1],e[0]));return zs(t)},ah={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Hs,rotateZ:Hs,skewX:e=>pt(Math.atan(e[1])),skewY:e=>pt(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},zs=e=>(e=e%360,e<0&&(e+=360),e),ru=Hs,su=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),au=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),oh={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:su,scaleY:au,scale:e=>(su(e)+au(e))/2,rotateX:e=>zs(pt(Math.atan2(e[6],e[5]))),rotateY:e=>zs(pt(Math.atan2(-e[2],e[0]))),rotateZ:ru,rotate:ru,skewX:e=>pt(Math.atan(e[4])),skewY:e=>pt(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Us(e){return e.includes("scale")?1:0}function js(e,t){if(!e||e==="none")return Us(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=oh,s=n;else{const u=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=ah,s=u}if(!s)return Us(t);const o=r[t],i=s[1].split(",").map(uh);return typeof o=="function"?o(i):i[o]}const ih=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return js(n,t)};function uh(e){return parseFloat(e.trim())}const Ot=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Lt=new Set(Ot),ou=e=>e===Dt||e===L,lh=new Set(["x","y","z"]),ch=Ot.filter(e=>!lh.has(e));function dh(e){const t=[];return ch.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const rt={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>js(t,"x"),y:(e,{transform:t})=>js(t,"y")};rt.translateX=rt.x,rt.translateY=rt.y;const ht=new Set;let Gs=!1,Ks=!1,Ys=!1;function iu(){if(Ks){const e=Array.from(ht).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=dh(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([o,i])=>{var u;(u=r.getValue(o))==null||u.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Ks=!1,Gs=!1,ht.forEach(e=>e.complete(Ys)),ht.clear()}function uu(){ht.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ks=!0)})}function wh(){Ys=!0,uu(),iu(),Ys=!1}class Xs{constructor(t,n,r,s,o,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=o,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(ht.add(this),Gs||(Gs=!0,Fe.read(uu),Fe.resolveKeyframes(iu))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const o=s==null?void 0:s.get(),i=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const u=r.readValue(n,i);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=i),s&&o===void 0&&s.set(t[0])}sh(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ht.delete(this)}cancel(){this.state==="scheduled"&&(ht.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const fh=e=>e.startsWith("--");function lu(e,t,n){fh(t)?e.style.setProperty(t,n):e.style[t]=n}const ph={};function cu(e,t){const n=Ni(e);return()=>ph[t]??n()}const hh=cu(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),du=cu(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),pn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,wu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:pn([0,.65,.55,1]),circOut:pn([.55,0,1,.45]),backIn:pn([.31,.01,.66,-.59]),backOut:pn([.33,1.53,.69,.99])};function fu(e,t){if(e)return typeof e=="function"?du()?Ri(e,t):"ease-out":Li(e)?pn(e):Array.isArray(e)?e.map(n=>fu(n,t)||wu.easeOut):wu[e]}function mh(e,t,n,{delay:r=0,duration:s=300,repeat:o=0,repeatType:i="loop",ease:u="easeOut",times:l}={},d=void 0){const c={[t]:n};l&&(c.offset=l);const w=fu(u,s);Array.isArray(w)&&(c.easing=w);const m={delay:r,duration:s,easing:Array.isArray(w)?"linear":w,fill:"both",iterations:o+1,direction:i==="reverse"?"alternate":"normal"};return d&&(m.pseudoElement=d),e.animate(c,m)}function pu(e){return typeof e=="function"&&"applyToOptions"in e}function gh({type:e,...t}){return pu(e)&&du()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class hu extends qs{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:o,allowFlatten:i=!1,finalKeyframe:u,onComplete:l}=t;this.isPseudoElement=!!o,this.allowFlatten=i,this.options=t,wt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const d=gh(t);this.animation=mh(n,r,s,d,o),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=sr(s,this.options,u,this.speed);this.updateMotionValue&&this.updateMotionValue(c),lu(n,r,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,s;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((s=(r=this.animation).commitStyles)==null||s.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return He(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+He(t)}get time(){return He(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Le(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:r,observe:s}){var o;return this.allowFlatten&&((o=this.animation.effect)==null||o.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&hh()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),kt):s(this)}}const mu={anticipate:Pi,backInOut:_i,circInOut:Vi};function bh(e){return e in mu}function yh(e){typeof e.ease=="string"&&bh(e.ease)&&(e.ease=mu[e.ease])}const Zs=10;class vh extends hu{constructor(t){yh(t),nu(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:o,...i}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const u=new ar({...i,autoplay:!1}),l=Math.max(Zs,_e.now()-this.startTime),d=et(0,Zs,l-Zs),c=u.sample(l).value,{name:w}=this.options;o&&w&&lu(o,w,c),n.setWithVelocity(u.sample(Math.max(0,l-d)).value,c,d),u.stop()}}const gu=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ze.test(e)||e==="0")&&!e.startsWith("url("));function xh(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Nh(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],i=gu(s,t),u=gu(o,t);return un(i===u,`You are trying to animate ${t} from "${s}" to "${o}". "${i?o:s}" is not an animatable value.`,"value-not-animatable"),!i||!u?!1:xh(e)||(n==="spring"||pu(n))&&r}function Js(e){e.duration=0,e.type="keyframes"}const bu=new Set(["opacity","clipPath","filter","transform"]),Sh=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Ch(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&Sh.test(e[t]))return!0;return!1}const Th=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Eh=Ni(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Ih(e){var w;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:o,type:i,keyframes:u}=e;if(!(((w=t==null?void 0:t.owner)==null?void 0:w.current)instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:c}=t.owner.getProps();return Eh()&&n&&(bu.has(n)||Th.has(n)&&Ch(u))&&(n!=="transform"||!c)&&!d&&!r&&s!=="mirror"&&o!==0&&i!=="inertia"}const Mh=40;class kh extends qs{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:i="loop",keyframes:u,name:l,motionValue:d,element:c,...w}){var b;super(),this.stop=()=>{var g,y;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=_e.now();const m={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:o,repeatType:i,name:l,motionValue:d,element:c,...w},p=(c==null?void 0:c.KeyframeResolver)||Xs;this.keyframeResolver=new p(u,(g,y,x)=>this.onKeyframesResolved(g,y,m,!x),l,d,c),(b=this.keyframeResolver)==null||b.scheduleResolve()}onKeyframesResolved(t,n,r,s){var x,v;this.keyframeResolver=void 0;const{name:o,type:i,velocity:u,delay:l,isHandoff:d,onUpdate:c}=r;this.resolvedAt=_e.now();let w=!0;Nh(t,o,i,u)||(w=!1,(tt.instantAnimations||!l)&&(c==null||c(sr(t,r,n))),t[0]=t[t.length-1],Js(r),r.repeat=0);const p={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Mh?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},b=w&&!d&&Ih(p),g=(v=(x=p.motionValue)==null?void 0:x.owner)==null?void 0:v.current;let y;if(b)try{y=new vh({...p,element:g})}catch{y=new ar(p)}else y=new ar(p);y.finished.then(()=>{this.notifyFinished()}).catch(kt),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),wh()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function yu(e,t,n,r=0,s=1){const o=Array.from(e).sort((d,c)=>d.sortNodePosition(c)).indexOf(t),i=e.size,u=(i-1)*r;return typeof n=="function"?n(o,i):s===1?o*r:u-o*r}const Dh=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ah(e){const t=Dh.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const _h=4;function vu(e,t,n=1){wt(n<=_h,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,s]=Ah(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const i=o.trim();return vi(i)?parseFloat(i):i}return Ms(s)?vu(s,t,n+1):s}const Ph={type:"spring",stiffness:500,damping:25,restSpeed:10},Vh=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Oh={type:"keyframes",duration:.8},Lh={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Fh=(e,{keyframes:t})=>t.length>2?Oh:Lt.has(e)?e.startsWith("scale")?Vh(t[1]):Ph:Lh;function xu(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Nu(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?xu(n,e):n}const Wh=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Bh(e){for(const t in e)if(!Wh.has(t))return!0;return!1}const $h=(e,t,n,r={},s,o)=>i=>{const u=Nu(r,e)||{},l=u.delay||r.delay||0;let{elapsed:d=0}=r;d=d-Le(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...u,delay:-d,onUpdate:m=>{t.set(m),u.onUpdate&&u.onUpdate(m)},onComplete:()=>{i(),u.onComplete&&u.onComplete()},name:e,motionValue:t,element:o?void 0:s};Bh(u)||Object.assign(c,Fh(e,c)),c.duration&&(c.duration=Le(c.duration)),c.repeatDelay&&(c.repeatDelay=Le(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let w=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Js(c),c.delay===0&&(w=!0)),(tt.instantAnimations||tt.skipAnimations||s!=null&&s.shouldSkipAnimations||u.skipAnimations)&&(w=!0,Js(c),c.delay=0),c.allowFlatten=!u.type&&!u.ease,w&&!o&&t.get()!==void 0){const m=sr(c.keyframes,u);if(m!==void 0){Fe.update(()=>{c.onUpdate(m),c.onComplete()});return}}return u.isSync?new ar(c):new kh(c)};function Su(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Qs(e,t,n,r){if(typeof t=="function"){const[s,o]=Su(r);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=Su(r);t=t(n!==void 0?n:e.custom,s,o)}return t}function mt(e,t,n){const r=e.getProps();return Qs(r,t,n!==void 0?n:r.custom,e)}const Cu=new Set(["width","height","top","left","right","bottom",...Ot]),Tu=30,qh=e=>!isNaN(parseFloat(e));class Hh{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var o;const s=_e.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=_e.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=qh(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Ii(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Ci);const r=this.events[t].add(n);return t==="change"?()=>{r(),Fe.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=_e.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Tu)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Tu);return Ti(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function or(e,t){return new Hh(e,t)}const Rs=e=>Array.isArray(e);function zh(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,or(n))}function Uh(e){return Rs(e)?e[e.length-1]||0:e}function jh(e,t){const n=mt(e,t);let{transitionEnd:r={},transition:s={},...o}=n||{};o={...o,...r};for(const i in o){const u=Uh(o[i]);zh(e,i,u)}}const be=e=>!!(e&&e.getVelocity);function Gh(e){return!!(be(e)&&e.add)}function Kh(e,t){const n=e.getValue("willChange");if(Gh(n))return n.add(t);if(!n&&tt.WillChange){const r=new tt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function ea(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Eu="data-"+ea("framerAppearId");function Yh(e){return e.props[Eu]}function Xh({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Iu(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:o,transitionEnd:i,...u}=t;const l=e.getDefaultTransition();o=o?xu(o,l):l;const d=o==null?void 0:o.reduceMotion,c=o==null?void 0:o.skipAnimations;r&&(o=r);const w=[],m=s&&e.animationState&&e.animationState.getState()[s];for(const p in u){const b=e.getValue(p,e.latestValues[p]??null),g=u[p];if(g===void 0||m&&Xh(m,p))continue;const y={delay:n,...Nu(o||{},p)};c&&(y.skipAnimations=!0);const x=b.get();if(x!==void 0&&!b.isAnimating()&&!Array.isArray(g)&&g===x&&!y.velocity){Fe.update(()=>b.set(g));continue}let v=!1;if(window.MotionHandoffAnimation){const S=Yh(e);if(S){const M=window.MotionHandoffAnimation(S,p,Fe);M!==null&&(y.startTime=M,v=!0)}}Kh(e,p);const C=d??e.shouldReduceMotion;b.start($h(p,b,g,C&&Cu.has(p)?{type:!1}:y,e,v));const N=b.animation;N&&w.push(N)}if(i){const p=()=>Fe.update(()=>{i&&jh(e,i)});w.length?Promise.all(w).then(p):p()}return w}function ta(e,t,n={}){var l;const r=mt(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const o=r?()=>Promise.all(Iu(e,r,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:c=0,staggerChildren:w,staggerDirection:m}=s;return Zh(e,t,d,c,w,m,n)}:()=>Promise.resolve(),{when:u}=s;if(u){const[d,c]=u==="beforeChildren"?[o,i]:[i,o];return d().then(()=>c())}else return Promise.all([o(),i(n.delay)])}function Zh(e,t,n=0,r=0,s=0,o=1,i){const u=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),u.push(ta(l,t,{...i,delay:n+(typeof r=="function"?0:r)+yu(e.variantChildren,l,r,s,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(u)}function Jh(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(o=>ta(e,o,n));r=Promise.all(s)}else if(typeof t=="string")r=ta(e,t,n);else{const s=typeof t=="function"?mt(e,t,n.custom):t;r=Promise.all(Iu(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const Qh={test:e=>e==="auto",parse:e=>e},Mu=e=>t=>t.test(e),ku=[Dt,L,At,nt,xp,vp,Qh],Du=e=>ku.find(Mu(e));function Rh(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||xi(e):!0}const em=new Set(["brightness","contrast","saturate","opacity"]);function tm(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(ks)||[];if(!r)return e;const s=n.replace(r,"");let o=em.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+s+")"}const nm=/\b([a-z-]*)\(.*?\)/gu,na={...ze,getAnimatableNone:e=>{const t=e.match(nm);return t?t.map(tm).join(" "):e}},ra={...ze,getAnimatableNone:e=>{const t=ze.parse(e);return ze.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},Au={...Dt,transform:Math.round},sa={borderWidth:L,borderTopWidth:L,borderRightWidth:L,borderBottomWidth:L,borderLeftWidth:L,borderRadius:L,borderTopLeftRadius:L,borderTopRightRadius:L,borderBottomRightRadius:L,borderBottomLeftRadius:L,width:L,maxWidth:L,height:L,maxHeight:L,top:L,right:L,bottom:L,left:L,inset:L,insetBlock:L,insetBlockStart:L,insetBlockEnd:L,insetInline:L,insetInlineStart:L,insetInlineEnd:L,padding:L,paddingTop:L,paddingRight:L,paddingBottom:L,paddingLeft:L,paddingBlock:L,paddingBlockStart:L,paddingBlockEnd:L,paddingInline:L,paddingInlineStart:L,paddingInlineEnd:L,margin:L,marginTop:L,marginRight:L,marginBottom:L,marginLeft:L,marginBlock:L,marginBlockStart:L,marginBlockEnd:L,marginInline:L,marginInlineStart:L,marginInlineEnd:L,fontSize:L,backgroundPositionX:L,backgroundPositionY:L,...{rotate:nt,rotateX:nt,rotateY:nt,rotateZ:nt,scale:er,scaleX:er,scaleY:er,scaleZ:er,skew:nt,skewX:nt,skewY:nt,distance:L,translateX:L,translateY:L,translateZ:L,x:L,y:L,z:L,perspective:L,transformPerspective:L,opacity:cn,originX:Ui,originY:Ui,originZ:L},zIndex:Au,fillOpacity:cn,strokeOpacity:cn,numOctaves:Au},rm={...sa,color:de,backgroundColor:de,outlineColor:de,fill:de,stroke:de,borderColor:de,borderTopColor:de,borderRightColor:de,borderBottomColor:de,borderLeftColor:de,filter:na,WebkitFilter:na,mask:ra,WebkitMask:ra},_u=e=>rm[e],sm=new Set([na,ra]);function Pu(e,t){let n=_u(e);return sm.has(n)||(n=ze),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const am=new Set(["auto","none","0"]);function om(e,t,n){let r=0,s;for(;r<e.length&&!s;){const o=e[r];typeof o=="string"&&!am.has(o)&&Pt(o).values.length&&(s=e[r]),r++}if(s&&n)for(const o of t)e[o]=Pu(n,s)}class im extends Xs{constructor(t,n,r,s,o){super(t,n,r,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let w=t[c];if(typeof w=="string"&&(w=w.trim(),Ms(w))){const m=vu(w,n.current);m!==void 0&&(t[c]=m),c===t.length-1&&(this.finalKeyframe=w)}}if(this.resolveNoneKeyframes(),!Cu.has(r)||t.length!==2)return;const[s,o]=t,i=Du(s),u=Du(o),l=Hi(s),d=Hi(o);if(l!==d&&rt[r]){this.needsMeasurement=!0;return}if(i!==u)if(ou(i)&&ou(u))for(let c=0;c<t.length;c++){const w=t[c];typeof w=="string"&&(t[c]=parseFloat(w))}else rt[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||Rh(t[s]))&&r.push(s);r.length&&om(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=rt[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var u;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=r.length-1,i=r[o];r[o]=rt[n](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),(u=this.removedTransforms)!=null&&u.length&&this.removedTransforms.forEach(([l,d])=>{t.getValue(l).set(d)}),this.resolveNoneKeyframes()}}function um(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const s=(n==null?void 0:n[e])??r.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(r=>r!=null)}const Vu=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function ir(e){return np(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:lm}=Bi(queueMicrotask,!1),cm={y:!1};function dm(){return cm.y}function Ou(e,t){const n=um(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function wm(e){return!(e.pointerType==="touch"||dm())}function fm(e,t,n={}){const[r,s,o]=Ou(e,n);return r.forEach(i=>{let u=!1,l=!1,d;const c=()=>{i.removeEventListener("pointerleave",b)},w=y=>{d&&(d(y),d=void 0),c()},m=y=>{u=!1,window.removeEventListener("pointerup",m),window.removeEventListener("pointercancel",m),l&&(l=!1,w(y))},p=()=>{u=!0,window.addEventListener("pointerup",m,s),window.addEventListener("pointercancel",m,s)},b=y=>{if(y.pointerType!=="touch"){if(u){l=!0;return}w(y)}},g=y=>{if(!wm(y))return;l=!1;const x=t(i,y);typeof x=="function"&&(d=x,i.addEventListener("pointerleave",b,s))};i.addEventListener("pointerenter",g,s),i.addEventListener("pointerdown",p,s)}),o}const Lu=(e,t)=>t?e===t?!0:Lu(e,t.parentElement):!1,pm=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,hm=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function mm(e){return hm.has(e.tagName)||e.isContentEditable===!0}const ur=new WeakSet;function Fu(e){return t=>{t.key==="Enter"&&e(t)}}function aa(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const gm=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Fu(()=>{if(ur.has(n))return;aa(n,"down");const s=Fu(()=>{aa(n,"up")}),o=()=>aa(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Wu(e){return pm(e)&&!0}const Bu=new WeakSet;function bm(e,t,n={}){const[r,s,o]=Ou(e,n),i=u=>{const l=u.currentTarget;if(!Wu(u)||Bu.has(u))return;ur.add(l),n.stopPropagation&&Bu.add(u);const d=t(l,u),c=(p,b)=>{window.removeEventListener("pointerup",w),window.removeEventListener("pointercancel",m),ur.has(l)&&ur.delete(l),Wu(p)&&typeof d=="function"&&d(p,{success:b})},w=p=>{c(p,l===window||l===document||n.useGlobalTarget||Lu(l,p.target))},m=p=>{c(p,!1)};window.addEventListener("pointerup",w,s),window.addEventListener("pointercancel",m,s)};return r.forEach(u=>{(n.useGlobalTarget?window:u).addEventListener("pointerdown",i,s),ir(u)&&(u.addEventListener("focus",d=>gm(d,s)),!mm(u)&&!u.hasAttribute("tabindex")&&(u.tabIndex=0))}),o}const ym=[...ku,de,ze],vm=e=>ym.find(Mu(e)),$u=()=>({min:0,max:0}),qu=()=>({x:$u(),y:$u()}),xm=new WeakMap;function lr(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function hn(e){return typeof e=="string"||Array.isArray(e)}const oa=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ia=["initial",...oa];function cr(e){return lr(e.animate)||ia.some(t=>hn(e[t]))}function Hu(e){return!!(cr(e)||e.variants)}function Nm(e,t,n){for(const r in t){const s=t[r],o=n[r];if(be(s))e.addValue(r,s);else if(be(o))e.addValue(r,or(s,{owner:e}));else if(o!==s)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(s):i.hasAnimated||i.set(s)}else{const i=e.getStaticValue(r);e.addValue(r,or(i!==void 0?i:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const ua={current:null},zu={current:!1},Sm=typeof window<"u";function Cm(){if(zu.current=!0,!!Sm)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ua.current=e.matches;e.addEventListener("change",t),t()}else ua.current=!1}const Uu=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let dr={};function ju(e){dr=e}function Tm(){return dr}class Em{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:o,blockInitialAnimation:i,visualState:u},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Xs,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=_e.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,Fe.render(this.render,!1,!0))};const{latestValues:d,renderState:c}=u;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=o,this.options=l,this.blockInitialAnimation=!!i,this.isControllingVariants=cr(n),this.isVariantNode=Hu(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:w,...m}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in m){const b=m[p];d[p]!==void 0&&be(b)&&b.set(d[p])}}mount(t){var n,r;if(this.hasBeenMounted)for(const s in this.initialValues)(n=this.values.get(s))==null||n.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=t,xm.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,o)=>this.bindToMotionValue(o,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(zu.current||Cm(),this.shouldReduceMotion=ua.current),process.env.NODE_ENV!=="production"&&Ii(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),Is(this.notifyUpdate),Is(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&bu.has(t)&&this.current instanceof HTMLElement){const{factory:i,keyframes:u,times:l,ease:d,duration:c}=n.accelerate,w=new hu({element:this.current,name:t,keyframes:u,times:l,ease:d,duration:Le(c)}),m=i(w);this.valueSubscriptions.set(t,()=>{m(),w.cancel()});return}const r=Lt.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&Fe.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o&&o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in dr){const n=dr[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):qu()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Uu.length;r++){const s=Uu[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,i=t[o];i&&(this.propEventSubscriptions[s]=this.on(s,i))}this.prevMotionValues=Nm(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=or(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(vi(r)||xi(r))?r=parseFloat(r):!vm(r)&&ze.test(n)&&(r=Pu(t,n)),this.setBaseTarget(t,be(r)?r.get():r)),be(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=Qs(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!be(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Ci),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){lm.render(this.render)}}class Gu extends Em{constructor(){super(...arguments),this.KeyframeResolver=im}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;be(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Ft{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Im({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Mm(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function km(e,t){return Im(Mm(e.getBoundingClientRect(),t))}const Dm={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Am=Ot.length;function _m(e,t,n){let r="",s=!0;for(let o=0;o<Am;o++){const i=Ot[o],u=e[i];if(u===void 0)continue;let l=!0;if(typeof u=="number")l=u===(i.startsWith("scale")?1:0);else{const d=parseFloat(u);l=i.startsWith("scale")?d===1:d===0}if(!l||n){const d=Vu(u,sa[i]);if(!l){s=!1;const c=Dm[i]||i;r+=`${c}(${d}) `}n&&(t[i]=d)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function la(e,t,n){const{style:r,vars:s,transformOrigin:o}=e;let i=!1,u=!1;for(const l in t){const d=t[l];if(Lt.has(l)){i=!0;continue}else if(qi(l)){s[l]=d;continue}else{const c=Vu(d,sa[l]);l.startsWith("origin")?(u=!0,o[l]=c):r[l]=c}}if(t.transform||(i||n?r.transform=_m(t,e.transform,n):r.transform&&(r.transform="none")),u){const{originX:l="50%",originY:d="50%",originZ:c=0}=o;r.transformOrigin=`${l} ${d} ${c}`}}function Ku(e,{style:t,vars:n},r,s){const o=e.style;let i;for(i in t)o[i]=t[i];s==null||s.applyProjectionStyles(o,r);for(i in n)o.setProperty(i,n[i])}function Yu(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const mn={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(L.test(e))e=parseFloat(e);else return e;const n=Yu(e,t.target.x),r=Yu(e,t.target.y);return`${n}% ${r}%`}},Pm={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=ze.parse(e);if(s.length>5)return r;const o=ze.createTransformer(e),i=typeof s[0]!="number"?1:0,u=n.x.scale*t.x,l=n.y.scale*t.y;s[0+i]/=u,s[1+i]/=l;const d=fn(u,l,.5);return typeof s[2+i]=="number"&&(s[2+i]/=d),typeof s[3+i]=="number"&&(s[3+i]/=d),o(s)}},Vm={borderRadius:{...mn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:mn,borderTopRightRadius:mn,borderBottomLeftRadius:mn,borderBottomRightRadius:mn,boxShadow:Pm};function Xu(e,{layout:t,layoutId:n}){return Lt.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Vm[e]||e==="opacity")}function ca(e,t,n){var i;const r=e.style,s=t==null?void 0:t.style,o={};if(!r)return o;for(const u in r)(be(r[u])||s&&be(s[u])||Xu(u,e)||((i=n==null?void 0:n.getValue(u))==null?void 0:i.liveStyle)!==void 0)&&(o[u]=r[u]);return o}function Om(e){return window.getComputedStyle(e)}class Lm extends Gu{constructor(){super(...arguments),this.type="html",this.renderInstance=Ku}readValueFromInstance(t,n){var r;if(Lt.has(n))return(r=this.projection)!=null&&r.isProjecting?Us(n):ih(t,n);{const s=Om(t),o=(qi(n)?s.getPropertyValue(n):s[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return km(t,n)}build(t,n,r){la(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return ca(t,n,r)}}const Fm={offset:"stroke-dashoffset",array:"stroke-dasharray"},Wm={offset:"strokeDashoffset",array:"strokeDasharray"};function Bm(e,t,n=1,r=0,s=!0){e.pathLength=1;const o=s?Fm:Wm;e[o.offset]=`${-r}`,e[o.array]=`${t} ${n}`}const $m=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Zu(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:o=1,pathOffset:i=0,...u},l,d,c){if(la(e,u,d),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:w,style:m}=e;w.transform&&(m.transform=w.transform,delete w.transform),(m.transform||w.transformOrigin)&&(m.transformOrigin=w.transformOrigin??"50% 50%",delete w.transformOrigin),m.transform&&(m.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete w.transformBox);for(const p of $m)w[p]!==void 0&&(m[p]=w[p],delete w[p]);t!==void 0&&(w.x=t),n!==void 0&&(w.y=n),r!==void 0&&(w.scale=r),s!==void 0&&Bm(w,s,o,i,!1)}const Ju=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Qu=e=>typeof e=="string"&&e.toLowerCase()==="svg";function qm(e,t,n,r){Ku(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(Ju.has(s)?s:ea(s),t.attrs[s])}function Ru(e,t,n){const r=ca(e,t,n);for(const s in e)if(be(e[s])||be(t[s])){const o=Ot.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[o]=e[s]}return r}class Hm extends Gu{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=qu}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Lt.has(n)){const r=_u(n);return r&&r.default||0}return n=Ju.has(n)?n:ea(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Ru(t,n,r)}build(t,n,r){Zu(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){qm(t,n,r,s)}mount(t){this.isSVGTag=Qu(t.tagName),super.mount(t)}}const zm=ia.length;function el(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?el(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<zm;n++){const r=ia[n],s=e.props[r];(hn(s)||s===!1)&&(t[r]=s)}return t}function tl(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const Um=[...oa].reverse(),jm=oa.length;function Gm(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Jh(e,n,r)))}function Km(e){let t=Gm(e),n=nl(),r=!0,s=!1;const o=d=>(c,w)=>{var p;const m=mt(e,w,d==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);if(m){const{transition:b,transitionEnd:g,...y}=m;c={...c,...y,...g}}return c};function i(d){t=d(e)}function u(d){const{props:c}=e,w=el(e.parent)||{},m=[],p=new Set;let b={},g=1/0;for(let x=0;x<jm;x++){const v=Um[x],C=n[v],N=c[v]!==void 0?c[v]:w[v],S=hn(N),M=v===d?C.isActive:null;M===!1&&(g=x);let T=N===w[v]&&N!==c[v]&&S;if(T&&(r||s)&&e.manuallyAnimateOnMount&&(T=!1),C.protectedKeys={...b},!C.isActive&&M===null||!N&&!C.prevProp||lr(N)||typeof N=="boolean")continue;if(v==="exit"&&C.isActive&&M!==!0){C.prevResolvedValues&&(b={...b,...C.prevResolvedValues});continue}const I=Ym(C.prevProp,N);let D=I||v===d&&C.isActive&&!T&&S||x>g&&S,A=!1;const _=Array.isArray(N)?N:[N];let P=_.reduce(o(v),{});M===!1&&(P={});const{prevResolvedValues:W={}}=C,F={...W,...P},B=U=>{D=!0,p.has(U)&&(A=!0,p.delete(U)),C.needsAnimating[U]=!0;const V=e.getValue(U);V&&(V.liveStyle=!1)};for(const U in F){const V=P[U],q=W[U];if(b.hasOwnProperty(U))continue;let H=!1;Rs(V)&&Rs(q)?H=!tl(V,q)||I:H=V!==q,H?V!=null?B(U):p.add(U):V!==void 0&&p.has(U)?B(U):C.protectedKeys[U]=!0}C.prevProp=N,C.prevResolvedValues=P,C.isActive&&(b={...b,...P}),(r||s)&&e.blockInitialAnimation&&(D=!1);const $=T&&I;D&&(!$||A)&&m.push(..._.map(U=>{const V={type:v};if(typeof U=="string"&&(r||s)&&!$&&e.manuallyAnimateOnMount&&e.parent){const{parent:q}=e,H=mt(q,U);if(q.enteringChildren&&H){const{delayChildren:Q}=H.transition||{};V.delay=yu(q.enteringChildren,e,Q)}}return{animation:U,options:V}}))}if(p.size){const x={};if(typeof c.initial!="boolean"){const v=mt(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(x.transition=v.transition)}p.forEach(v=>{const C=e.getBaseTarget(v),N=e.getValue(v);N&&(N.liveStyle=!0),x[v]=C??null}),m.push({animation:x})}let y=!!m.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,s=!1,y?t(m):Promise.resolve()}function l(d,c){var m;if(n[d].isActive===c)return Promise.resolve();(m=e.variantChildren)==null||m.forEach(p=>{var b;return(b=p.animationState)==null?void 0:b.setActive(d,c)}),n[d].isActive=c;const w=u(d);for(const p in n)n[p].protectedKeys={};return w}return{animateChanges:u,setActive:l,setAnimateFunction:i,getState:()=>n,reset:()=>{n=nl(),s=!0}}}function Ym(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!tl(t,e):!1}function gt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function nl(){return{animate:gt(!0),whileInView:gt(),whileHover:gt(),whileTap:gt(),whileDrag:gt(),whileFocus:gt(),exit:gt()}}function rl(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Xm(e){return be(e)?e.get():e}const da=f.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function sl(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Zm(...e){return t=>{let n=!1;const r=e.map(s=>{const o=sl(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<r.length;s++){const o=r[s];typeof o=="function"?o():sl(e[s],null)}}}}function Jm(...e){return E.useCallback(Zm(...e),e)}class Qm extends E.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(ir(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,s=ir(r)&&r.offsetWidth||0,o=ir(r)&&r.offsetHeight||0,i=getComputedStyle(n),u=this.props.sizeRef.current;u.height=parseFloat(i.height),u.width=parseFloat(i.width),u.top=n.offsetTop,u.left=n.offsetLeft,u.right=s-u.width-u.left,u.bottom=o-u.height-u.top,u.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function Rm({children:e,isPresent:t,anchorX:n,anchorY:r,root:s,pop:o}){var m;const i=f.useId(),u=f.useRef(null),l=f.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:d}=f.useContext(da),c=((m=e.props)==null?void 0:m.ref)??(e==null?void 0:e.ref),w=Jm(u,c);return f.useInsertionEffect(()=>{const{width:p,height:b,top:g,left:y,right:x,bottom:v,direction:C}=l.current;if(t||o===!1||!u.current||!p||!b)return;const N=C==="rtl",S=n==="left"?N?`right: ${x}`:`left: ${y}`:N?`left: ${y}`:`right: ${x}`,M=r==="bottom"?`bottom: ${v}`:`top: ${g}`;u.current.dataset.motionPopId=i;const T=document.createElement("style");d&&(T.nonce=d);const I=s??document.head;return I.appendChild(T),T.sheet&&T.sheet.insertRule(`
8
+ [data-motion-pop-id="${i}"] {
9
+ position: absolute !important;
10
+ width: ${p}px !important;
11
+ height: ${b}px !important;
12
+ ${S}px !important;
13
+ ${M}px !important;
14
+ }
15
+ `),()=>{var D;(D=u.current)==null||D.removeAttribute("data-motion-pop-id"),I.contains(T)&&I.removeChild(T)}},[t]),a.jsx(Qm,{isPresent:t,childRef:u,sizeRef:l,pop:o,children:o===!1?e:E.cloneElement(e,{ref:w})})}const eg=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:o,mode:i,anchorX:u,anchorY:l,root:d})=>{const c=Ss(tg),w=f.useId();let m=!0,p=f.useMemo(()=>(m=!1,{id:w,initial:t,isPresent:n,custom:s,onExitComplete:b=>{c.set(b,!0);for(const g of c.values())if(!g)return;r&&r()},register:b=>(c.set(b,!1),()=>c.delete(b))}),[n,c,r]);return o&&m&&(p={...p}),f.useMemo(()=>{c.forEach((b,g)=>c.set(g,!1))},[n]),E.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),e=a.jsx(Rm,{pop:i==="popLayout",isPresent:n,anchorX:u,anchorY:l,root:d,children:e}),a.jsx(Xn.Provider,{value:p,children:e})};function tg(){return new Map}function ng(e=!0){const t=f.useContext(Xn);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,o=f.useId();f.useEffect(()=>{if(e)return s(o)},[e]);const i=f.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,i]:[!0]}const wr=e=>e.key||"";function al(e){const t=[];return f.Children.forEach(e,n=>{f.isValidElement(n)&&t.push(n)}),t}const ol=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:o="sync",propagate:i=!1,anchorX:u="left",anchorY:l="top",root:d})=>{const[c,w]=ng(i),m=f.useMemo(()=>al(e),[e]),p=i&&!c?[]:m.map(wr),b=f.useRef(!0),g=f.useRef(m),y=Ss(()=>new Map),x=f.useRef(new Set),[v,C]=f.useState(m),[N,S]=f.useState(m);yi(()=>{b.current=!1,g.current=m;for(let I=0;I<N.length;I++){const D=wr(N[I]);p.includes(D)?(y.delete(D),x.current.delete(D)):y.get(D)!==!0&&y.set(D,!1)}},[N,p.length,p.join("-")]);const M=[];if(m!==v){let I=[...m];for(let D=0;D<N.length;D++){const A=N[D],_=wr(A);p.includes(_)||(I.splice(D,0,A),M.push(A))}return o==="wait"&&M.length&&(I=M),S(al(I)),C(m),null}process.env.NODE_ENV!=="production"&&o==="wait"&&N.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:T}=f.useContext(bi);return a.jsx(a.Fragment,{children:N.map(I=>{const D=wr(I),A=i&&!c?!1:m===N||p.includes(D),_=()=>{if(x.current.has(D))return;if(y.has(D))x.current.add(D),y.set(D,!0);else return;let P=!0;y.forEach(W=>{W||(P=!1)}),P&&(T==null||T(),S(g.current),i&&(w==null||w()),r&&r())};return a.jsx(eg,{isPresent:A,initial:!b.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:o,root:d,onExitComplete:A?void 0:_,anchorX:u,anchorY:l,children:I},D)})})},wa=f.createContext({strict:!1}),il={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let ul=!1;function rg(){if(ul)return;const e={};for(const t in il)e[t]={isEnabled:n=>il[t].some(r=>!!n[r])};ju(e),ul=!0}function ll(){return rg(),Tm()}function cl(e){const t=ll();for(const n in e)t[n]={...t[n],...e[n]};ju(t)}function dl({children:e,features:t,strict:n=!1}){const[,r]=f.useState(!fa(t)),s=f.useRef(void 0);if(!fa(t)){const{renderer:o,...i}=t;s.current=o,cl(i)}return f.useEffect(()=>{fa(t)&&t().then(({renderer:o,...i})=>{cl(i),s.current=o,r(!0)})},[]),a.jsx(wa.Provider,{value:{renderer:s.current,strict:n},children:e})}function fa(e){return typeof e=="function"}const sg=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function fr(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||sg.has(e)}let wl=e=>!fr(e);function ag(e){typeof e=="function"&&(wl=t=>t.startsWith("on")?!fr(t):e(t))}try{ag(require("@emotion/is-prop-valid").default)}catch{}function og(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||be(e[s])||(wl(s)||n===!0&&fr(s)||!t&&!fr(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const pr=f.createContext({});function ig(e,t){if(cr(e)){const{initial:n,animate:r}=e;return{initial:n===!1||hn(n)?n:void 0,animate:hn(r)?r:void 0}}return e.inherit!==!1?t:{}}function ug(e){const{initial:t,animate:n}=ig(e,f.useContext(pr));return f.useMemo(()=>({initial:t,animate:n}),[fl(t),fl(n)])}function fl(e){return Array.isArray(e)?e.join(" "):e}const pa=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function pl(e,t,n){for(const r in t)!be(t[r])&&!Xu(r,n)&&(e[r]=t[r])}function lg({transformTemplate:e},t){return f.useMemo(()=>{const n=pa();return la(n,t,e),Object.assign({},n.vars,n.style)},[t])}function cg(e,t){const n=e.style||{},r={};return pl(r,n,e),Object.assign(r,lg(e,t)),r}function dg(e,t){const n={},r=cg(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const hl=()=>({...pa(),attrs:{}});function wg(e,t,n,r){const s=f.useMemo(()=>{const o=hl();return Zu(o,t,Qu(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};pl(o,e.style,e),s.style={...o,...s.style}}return s}const fg=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ha(e){return typeof e!="string"||e.includes("-")?!1:!!(fg.indexOf(e)>-1||/[A-Z]/u.test(e))}function pg(e,t,n,{latestValues:r},s,o=!1,i){const l=(i??ha(e)?wg:dg)(t,r,s,e),d=og(t,typeof e=="string",o),c=e!==f.Fragment?{...d,...l,ref:n}:{},{children:w}=t,m=f.useMemo(()=>be(w)?w.get():w,[w]);return f.createElement(e,{...c,children:m})}function hg({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:mg(n,r,s,e),renderState:t()}}function mg(e,t,n,r){const s={},o=r(e,{});for(const m in o)s[m]=Xm(o[m]);let{initial:i,animate:u}=e;const l=cr(e),d=Hu(e);t&&d&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),u===void 0&&(u=t.animate));let c=n?n.initial===!1:!1;c=c||i===!1;const w=c?u:i;if(w&&typeof w!="boolean"&&!lr(w)){const m=Array.isArray(w)?w:[w];for(let p=0;p<m.length;p++){const b=Qs(e,m[p]);if(b){const{transitionEnd:g,transition:y,...x}=b;for(const v in x){let C=x[v];if(Array.isArray(C)){const N=c?C.length-1:0;C=C[N]}C!==null&&(s[v]=C)}for(const v in g)s[v]=g[v]}}}return s}const ml=e=>(t,n)=>{const r=f.useContext(pr),s=f.useContext(Xn),o=()=>hg(e,t,r,s);return n?o():Ss(o)},gg=ml({scrapeMotionValuesFromProps:ca,createRenderState:pa}),bg=ml({scrapeMotionValuesFromProps:Ru,createRenderState:hl}),yg=Symbol.for("motionComponentSymbol");function vg(e,t,n){const r=f.useRef(n);f.useInsertionEffect(()=>{r.current=n});const s=f.useRef(null);return f.useCallback(o=>{var u;o&&((u=e.onMount)==null||u.call(e,o)),t&&(o?t.mount(o):t.unmount());const i=r.current;if(typeof i=="function")if(o){const l=i(o);typeof l=="function"&&(s.current=l)}else s.current?(s.current(),s.current=null):i(o);else i&&(i.current=o)},[t])}const xg=f.createContext({});function Ng(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Sg(e,t,n,r,s,o){var C,N;const{visualElement:i}=f.useContext(pr),u=f.useContext(wa),l=f.useContext(Xn),d=f.useContext(da),c=d.reducedMotion,w=d.skipAnimations,m=f.useRef(null),p=f.useRef(!1);r=r||u.renderer,!m.current&&r&&(m.current=r(e,{visualState:t,parent:i,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,skipAnimations:w,isSVG:o}),p.current&&m.current&&(m.current.manuallyAnimateOnMount=!0));const b=m.current,g=f.useContext(xg);b&&!b.projection&&s&&(b.type==="html"||b.type==="svg")&&Cg(m.current,n,s,g);const y=f.useRef(!1);f.useInsertionEffect(()=>{b&&y.current&&b.update(n,l)});const x=n[Eu],v=f.useRef(!!x&&typeof window<"u"&&!((C=window.MotionHandoffIsComplete)!=null&&C.call(window,x))&&((N=window.MotionHasOptimisedAnimation)==null?void 0:N.call(window,x)));return yi(()=>{p.current=!0,b&&(y.current=!0,window.MotionIsMounted=!0,b.updateFeatures(),b.scheduleRenderMicrotask(),v.current&&b.animationState&&b.animationState.animateChanges())}),f.useEffect(()=>{b&&(!v.current&&b.animationState&&b.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var S;(S=window.MotionHandoffMarkAsComplete)==null||S.call(window,x)}),v.current=!1),b.enteringChildren=void 0)}),b}function Cg(e,t,n,r){const{layoutId:s,layout:o,drag:i,dragConstraints:u,layoutScroll:l,layoutRoot:d,layoutAnchor:c,layoutCrossfade:w}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:gl(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!i||u&&Ng(u),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:w,layoutScroll:l,layoutRoot:d,layoutAnchor:c})}function gl(e){if(e)return e.options.allowProjection!==!1?e.projection:gl(e.parent)}function Tg(e,{forwardMotionProps:t=!1,type:n}={},r,s){const o=n?n==="svg":ha(e),i=o?bg:gg;function u(d,c){let w;const m={...f.useContext(da),...d,layoutId:Eg(d)},{isStatic:p}=m,b=ug(d),g=i(d,p);if(!p&&typeof window<"u"){Ig(m,r);const y=Mg(m);w=y.MeasureLayout,b.visualElement=Sg(e,g,m,s,y.ProjectionNode,o)}return a.jsxs(pr.Provider,{value:b,children:[w&&b.visualElement?a.jsx(w,{visualElement:b.visualElement,...m}):null,pg(e,d,vg(g,b.visualElement,c),g,p,t,o)]})}u.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=f.forwardRef(u);return l[yg]=e,l}function Eg({layoutId:e}){const t=f.useContext(bi).id;return t&&e!==void 0?t+"-"+e:e}function Ig(e,t){f.useContext(wa).strict,process.env.NODE_ENV}function Mg(e){const t=ll(),{drag:n,layout:r}=t;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}const kg=(e,t)=>t.isSVG??ha(e)?new Hm(t):new Lm(t,{allowProjection:e!==f.Fragment});class Dg extends Ft{constructor(t){super(t),t.animationState||(t.animationState=Km(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();lr(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let Ag=0;class _g extends Ft{constructor(){super(...arguments),this.id=Ag++,this.isExitComplete=!1}update(){var o;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;if(t&&r===!1){if(this.isExitComplete){const{initial:i,custom:u}=this.node.getProps();if(typeof i=="string"||typeof i=="object"&&i!==null&&!Array.isArray(i)){const l=mt(this.node,i,u);if(l){const{transition:d,transitionEnd:c,...w}=l;for(const m in w)(o=this.node.getValue(m))==null||o.jump(w[m])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Pg={animation:{Feature:Dg},exit:{Feature:_g}};function bl(e){return{point:{x:e.pageX,y:e.pageY}}}function yl(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=r[s];o&&Fe.postRender(()=>o(t,bl(t)))}class Vg extends Ft{mount(){const{current:t}=this.node;t&&(this.unmount=fm(t,(n,r)=>(yl(this.node,r,"Start"),s=>yl(this.node,s,"End"))))}unmount(){}}class Og extends Ft{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Zn(rl(this.node.current,"focus",()=>this.onFocus()),rl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function vl(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=r[s];o&&Fe.postRender(()=>o(t,bl(t)))}class Lg extends Ft{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=bm(t,(s,o)=>(vl(this.node,o,"Start"),(i,{success:u})=>vl(this.node,i,u?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const ma=new WeakMap,ga=new WeakMap,Fg=e=>{const t=ma.get(e.target);t&&t(e)},Wg=e=>{e.forEach(Fg)};function Bg({root:e,...t}){const n=e||document;ga.has(n)||ga.set(n,{});const r=ga.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(Wg,{root:e,...t})),r[s]}function $g(e,t,n){const r=Bg(t);return ma.set(e,n),r.observe(e),()=>{ma.delete(e),r.unobserve(e)}}const qg={some:0,all:1};class Hg extends Ft{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var l;(l=this.stopObserver)==null||l.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:o}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:qg[s]},u=d=>{const{isIntersecting:c}=d;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:w,onViewportLeave:m}=this.node.getProps(),p=c?w:m;p&&p(d)};this.stopObserver=$g(this.node.current,i,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(zg(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function zg({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const xl={renderer:kg,...Pg,...{inView:{Feature:Hg},tap:{Feature:Lg},focus:{Feature:Og},hover:{Feature:Vg}}};function Ug(e,t){return Tg(e,t)}const Nl=Ug("div"),jg=e=>{const{checked:t,onSelect:n,children:r,disabled:s,preventCloseOnSelect:o}=e;return a.jsx(di,{disabled:s,checked:t,onCheckedChange:n,onSelect:i=>o&&i.preventDefault(),children:r})},hr=e=>{const{children:t,className:n,Icon:r,iconPosition:s="left",disabled:o,onSelect:i,preventCloseOnSelect:u}=e,l=h("wu-flex wu-items-center wu-gap-2",r&&(s==="left"?"":"wu-justify-between wu-flex-row-reverse"),n),d=c=>{i&&i(c),u&&c.preventDefault()};return a.jsxs(Kn,{onSelect:d,disabled:o,className:l,children:[r&&a.jsx("div",{className:"wu-text-base",children:r}),t]})},Gg=e=>{const{children:t,Label:n,...r}=e;return a.jsxs(ui,{...r,children:[a.jsx(on,{children:n||e.label}),t]})},Kg=e=>{const{options:t,value:n,onSelect:r}=e;return a.jsx($f,{value:n,onValueChange:r,children:t.map(s=>a.jsx(wi,{value:s.value,disabled:s.disabled,children:s.Label||s.label},s.value))})},Yg=e=>{const{className:t,...n}=e,r=h("wu-w-11/12 wu-mx-auto wu-border-gray-40",t);return a.jsx(Yn,{...n,className:r})},Wt=E.forwardRef(({className:e,children:t,thumbColor:n,railColor:r,...s},o)=>a.jsxs(ut.Root,{ref:o,className:h("wu-relative wu-overflow-hidden",e),children:[a.jsx(ut.Viewport,{className:"wu-h-full wu-w-full wu-rounded-[inherit]",...s,children:t}),a.jsx(ba,{thumbColor:n,railColor:r}),a.jsx(ut.Corner,{})]}));Wt.displayName=ut.Root.displayName;const ba=E.forwardRef(({className:e,orientation:t="vertical",thumbColor:n="#d4d4d4",railColor:r="#eeeeee",...s},o)=>a.jsx(ut.ScrollAreaScrollbar,{ref:o,orientation:t,className:h("wu-flex wu-touch-none wu-select-none wu-transition-colors",t==="vertical"&&"wu-h-full wu-w-2 wu-border-l wu-border-l-transparent wu-p-[1px]",t==="horizontal"&&"wu-h-2 wu-flex-col wu-border-t wu-border-t-transparent wu-p-[1px]",e),style:{background:r},...s,children:a.jsx(ut.ScrollAreaThumb,{className:"wu-relative wu-flex-1 wu-rounded-full",style:{background:n}})}));ba.displayName=ut.ScrollAreaScrollbar.displayName;const Xg=e=>{const{children:t,label:n,Label:r,open:s,onOpenChange:o,height:i,dir:u,...l}=e;return a.jsxs(Bf,{...l,open:s,onOpenChange:o,children:[a.jsx(li,{dir:u,children:r||n}),a.jsx(Wf,{children:a.jsx(ci,{onInteractOutside:d=>d.preventDefault(),children:a.jsx(Wt,{className:"wu-h-fit",style:{height:i},dir:u,children:t})})})]})},Zg="wu-p-1.5 wu-cursor-pointer hover:wu-bg-gray-20 wu-border-gray-40 wu-transition wu-duration-300 focus:wu-outline-2 focus:wu-outline-offset focus:wu-outline-blue-p/80 focus:wu-bg-gray-20 hover:wu-bg-gray-20 wu-rounded-t-sm",ya=e=>{const{children:t,menuTitle:n,MenuTitle:r,variant:s="flat",name:o,open:i,onOpenChange:u,height:l,preventCloseOnClickOutside:d,dir:c,Trigger:w,align:m="start",sideOffset:p=0,side:b="bottom",alignOffset:g,className:y,disabled:x,...v}=e;return a.jsxs(oi,{...v,open:i,onOpenChange:u,dir:c,children:[a.jsx(ii,{asChild:!0,dir:c,disabled:x,className:h("disabled:wu-text-zinc-300 disabled:wu-bg-white disabled:wu-cursor-not-allowed disabled:hover:wu-bg-transparent"),children:w??Jg(s,o,x)}),a.jsx(xs,{className:h("wu-w-56 wu-border wu-border-blue-p disabled:wu-border-gray-40",y,"wu-menu-content"),align:m,sideOffset:p,side:b,alignOffset:g,onInteractOutside:C=>d&&C.preventDefault(),children:a.jsxs(Wt,{className:"h-fit",style:{height:l},dir:c,children:[(n||r)&&a.jsxs(a.Fragment,{children:[a.jsx(on,{dir:c,className:"wu-menu-title",children:r||n}),a.jsx(Yn,{className:"wu-mt-0 wu-menu-separator",dir:c})]}),t??a.jsx("p",{children:"Menu Is Empty"})]})})]})},Jg=(e,t,n)=>{const r=h(Zg,"wu-flex wu-items-center wu-justify-between wu-gap-2 wu-h-8 wu-text-xs wu-group/wuMenu",e==="outlined"?"wu-border":"wu-border-b","wu-trigger-btn");return a.jsxs("button",{className:r,"aria-label":"menu-trigger",children:[a.jsx("span",{children:t??"Menu"}),a.jsx("span",{className:h("wm-arrow-drop-down wu-text-gray-lead wu-text-base wu-rotate-180 group-data-[state=closed]/wuMenu:wu-rotate-0 wu-transition-transform wu-duration-300 group-hover:wu-text-blue-q",n&&"wu-text-zinc-300 group-hover:wu-text-zinc-300")})]})},Qg=({titles:e,dir:t="ltr",handleTitleClick:n})=>{const[r,s]=f.useState(!1);return a.jsx(ya,{className:"wu-rounded-sm",open:r,onOpenChange:s,dir:t,sideOffset:4,Trigger:a.jsx(Ie,{variant:"iconOnly",className:h("wu-w-6 wu-h-6 wu-shrink-0 wu-rounded-sm"),Icon:a.jsx("span",{className:h("wm-keyboard-arrow-down wu-text-[16px] wu-origin-center wu-transition-transform wu-duration-300",r&&(t==="rtl"?"-wu-rotate-180":"wu-rotate-180"))})}),children:e.map(o=>a.jsx(hr,{onSelect:i=>n(i,o.id),children:o.title},o.id))})},Rg=({titles:e,currentLevel:t,initial:n,handleTitleClick:r,headerClasses:s,offsetHeight:o,dir:i="ltr"})=>{const u=f.useMemo(()=>i==="rtl"?{initial:{x:8,opacity:0,zIndex:0},animate:{x:0,opacity:1,zIndex:50},exit:{x:-8,opacity:0,zIndex:0}}:{initial:{x:-8,opacity:0,zIndex:0},animate:{x:0,opacity:1,zIndex:50},exit:{x:8,opacity:0,zIndex:0}},[i]);return a.jsxs("div",{className:h("wu-absolute wu-top-0 wu-left-0 wu-flex wu-gap-x-2 wu-px-4 wu-items-center wu-origin-left wu-w-full wu-transition wu-duration-200",t!==n?"wu-translate-x-0 wu-opacity-100 wu-z-50 wu-delay-200":i==="rtl"?"wu-translate-x-1 wu-opacity-0 wu-z-0 wu-delay-0":"-wu-translate-x-1 wu-opacity-0 wu-z-0 wu-delay-0",s),style:{height:t!==n?`${o}px`:"-40px"},dir:i,children:[a.jsx(Qg,{titles:e,handleTitleClick:r,dir:i}),a.jsx("div",{className:"wu-w-full wu-relative wu-h-full wu-flex wu-items-center wu-flex-nowrap wu-whitespace-nowrap wu-text-nowrap wu-gap-2 wu-overflow-x-auto wu-no-scrollbar wu-snap-x wu-snap-mandatory wu-scroll-smooth",children:a.jsx(dl,{features:xl,children:a.jsxs(ol,{initial:!1,mode:"popLayout",children:[eb(e).map((l,d)=>a.jsx(Nl,{initial:u.initial,animate:u.animate,exit:u.exit,transition:{duration:.4,ease:"easeInOut"},children:a.jsxs("h6",{"data-id":l.id,onClick:r,className:h("wu-flex wu-text-sm wu-leading-4 wu-font-normal wu-items-center wu-gap-2",d===2||d===1||l.id==="LEVEL_DOTS"?"wu-cursor-default wu-text-gray-600":"wu-cursor-pointer wu-text-[#1B87E6] wu-hover:text-[#145DBF]/70"),children:[d!==0&&a.jsx("span",{className:h("wm-keyboard-arrow-right wu-text-[16px] wu-font-light wu-max-w-4 wu-flex wu-justify-center",i==="rtl"&&"wu-rotate-180")}),l.id==="LEVEL_DOTS"?a.jsx("span",{className:"wu-flex wu-justify-center wu-w-[11px]",children:l.title}):l.title]})},l.id)),"``"]})})})]})},eb=e=>{const t=e.length;if(t>2){const n=e[0],r=e[t-1];return[n,{id:"LEVEL_DOTS",title:"..."},r]}return e},tb=({items:e,initial:t,baseTitle:n,mode:r="popLayout",headerClasses:s="",offsetHeight:o=40,variant:i="default",dir:u="ltr"})=>{const[l,d]=f.useState(n?[n]:[]),[[c,w],m]=f.useState([t,1]),p=(x,v)=>{v&&d([...l,v]),m([x,1])},b=x=>{const v=l.findIndex(C=>C.id===x);if(v!==-1){const C=l.slice(0,v+1);d(C)}m([x,-1])},g=(x,v)=>{const C=v||x.currentTarget.getAttribute("data-id")||"";if(C&&C!==c){const N=l.findIndex(S=>S.id===C);N!==-1&&(d(l.slice(0,N+1)),b(C))}},y=()=>{const x=e[c]?e[c]:null;if(!x)return a.jsx("div",{className:"wu-absolute wu-inset-0 wu-w-full wu-h-full wu-flex wu-items-center wu-justify-center",children:a.jsx("p",{className:"wu-text-gray-500",children:"No content available."})});const v=typeof x.component=="function"?x.component({goNext:p,goBack:b}):x.component;return a.jsx(Nl,{dir:u,custom:w,variants:nb(i),initial:"enter",animate:"center",exit:"exit",transition:{opacity:{duration:.325,ease:"easeInOut"},scale:{duration:.275,ease:"easeInOut"}},className:"wu-w-full wu-h-full",style:{paddingTop:c!==t?`${o}px`:"0px"},children:v},c)};return a.jsxs("div",{dir:u,className:"wu-w-full wu-h-full wu-relative wu-overflow-hidden wu-flex wu-flex-col",children:[a.jsx(Rg,{titles:l,currentLevel:c,initial:t,handleTitleClick:g,headerClasses:s,offsetHeight:o,dir:u}),a.jsx(dl,{features:xl,children:a.jsx(ol,{initial:!1,custom:w,mode:r,children:y()})})]})},nb=e=>{switch(e){case"slideRight":return sb;case"slideLeft":return ab;case"fadeZoom":return ob;case"default":default:return rb}},rb={enter:e=>({scale:e>0?.825:1.1,opacity:0,zIndex:0}),center:{scale:1,opacity:1,zIndex:1},exit:e=>({scale:e>0?1.1:.825,opacity:0,zIndex:0})},sb={enter:e=>({x:e>0?-15:15,opacity:0,zIndex:0}),center:{x:0,opacity:1,zIndex:1},exit:e=>({x:e>0?15:-15,opacity:0,zIndex:0})},ab={enter:e=>({x:e>0?15:-15,opacity:0,zIndex:0}),center:{x:0,opacity:1,zIndex:1},exit:e=>({x:e>0?-15:15,opacity:0,zIndex:0})},ob={enter:e=>({opacity:0,zIndex:0,scale:e>0?.925:1.1}),center:{opacity:1,zIndex:1,scale:1},exit:{opacity:0,zIndex:0,scale:1}},Sl=({className:e,isLoading:t,loadingText:n,children:r,...s})=>a.jsxs("footer",{className:h("wu-flex wu-items-center wu-justify-between wu-gap-2 wu-border-t wu-border-gray-10 wu-py-3 wu-px-4 wu-bg-white/80 wu-backdrop-blur-sm wu-text-xs wu-font-normal wu-text-gray-footer wu-sticky wu-bottom-0",e),...s,children:[a.jsx("div",{className:"wu-flex-1",children:r}),t&&a.jsx(ct,{size:"16px",variant:"spinner",color:"#a3a3a3",message:n})]});Sl.displayName="WuFooter";const Cl=f.forwardRef((e,t)=>{const{size:n="sm",idOrSlugOrUrl:r,variant:s="primary",...o}=e,i=n==="sm"?16:18,u=r.includes("http")?r:`/help/${r}.html`,l=s==="primary"?"wu-text-blue-p":"wu-text-gray-lead";return a.jsx("button",{...o,ref:t,onClick:()=>Br(u),children:a.jsx("span",{className:h("wm-help wu-text-gray-subtle",`wu-text-[${i}px]`,l,o.disabled&&"wu-text-neutral-300","wu-help-button-icon")})})});Cl.displayName="WuHelpButton";const st=(e,t)=>`wu-listbox-${e}`;function ib(e){const{option:t,accessorKey:n,onSelect:r,multiple:s,dir:o,GroupLabel:i,Item:u,isSelected:l,...d}=e,c=n.group&&Array.isArray(t[n.group]),w=({item:m,className:p})=>f.createElement(an,{...d,key:JSON.stringify(m),onSelect:()=>r==null?void 0:r(m),value:t[n.value],className:h("data-[selected='true']:wu-bg-gray-100 wu-cursor-pointer wu-text-xs wu-min-h-8 wu-py-0 hover:wu-bg-gray-10",!!(l!=null&&l(m))&&!s&&"wu-bg-blue-p/10",o==="rtl"&&"wu-justify-end",p,st("item")),disabled:m.disabled},s&&a.jsx(qe,{checked:l==null?void 0:l(m)}),u?u({value:m,isSelected:l==null?void 0:l(m)}):a.jsx(a.Fragment,{children:m[n.label]}));if(c){const m=t[n.group],p=typeof i=="string"?t[i]:i==null?void 0:i(t);return a.jsx(sn,{heading:p,children:m==null?void 0:m.map(b=>a.jsx(w,{item:b,className:"wu-pl-6"},JSON.stringify(b)))})}return a.jsx(w,{item:t})}const ub=f.memo(ib),lb=e=>{const{className:t,...n}=e;return a.jsxs("div",{className:"wu-relative",children:[a.jsx(Oe,{icon:"wm-search",className:"wu-absolute wu-top-[14px] wu-left-5"}),a.jsx(si,{...n,"aria-label":"Search",className:h("wu-bg-gray-10 wu-border-b wu-border-gray-subtle wu-rounded-none wu-rounded-t-sm wu-h-8 wu-my-2 wu-pl-8","focus:wu-border-blue-p focus-visible:wu-outline-none;",st("input"),t)})]})},cb=e=>{const{label:t,onSelectAll:n,data:r,value:s}=e,[o,i]=f.useState(!1),[u,l]=f.useState(!1);return f.useEffect(()=>{!s||!r||(i(s.length>0),l(s.length>0&&s.length<r.length))},[r,s]),a.jsxs(an,{className:"data-[selected='true']:wu-bg-gray-100 wu-cursor-pointer wu-text-xs wu-min-h-8 wu-py-0 hover:wu-bg-gray-100",onSelect:()=>n==null?void 0:n(!o),children:[a.jsx(qe,{checked:o,partial:u}),t||"Select All"]})},db=e=>{const{CustomTrigger:t,disabled:n,value:r,placeholder:s,accessorKey:o,Chip:i,handleUnselect:u,variant:l,dir:d,className:c,...w}=e,[m,p]=f.useState(),b=f.useRef(null);return f.useEffect(()=>{if(!r){p(null);return}p(Array.isArray(r)?i?r.map((y,x)=>i({value:y,unselect:u,key:x})):r.map(y=>y[o.label]).join(", "):i?i({value:r,unselect:u}):r[o.label])},[r,i,o.label,p]),a.jsx(dt,{asChild:!0,id:e.id,disabled:n,ref:b,children:(t==null?void 0:t(r))||a.jsxs("button",{...w,className:h("wu-group/wuListbox wu-relative wu-min-h-8 wu-text-xs wu-border-gray-subtle wu-bg-gray-10 wu-p-1 wu-pl-2 rtl:wu-pr-2 wu-border-b wu-w-full wu-text-left wu-pr-5 rtl:wu-pl-5","hover:wu-border-blue-p","disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle","rtl:wu-text-right",l==="outlined"&&"wu-border wu-border-gray-subtle wu-bg-white",c,st("trigger")),children:[a.jsx("div",{className:h("wu-truncate",i&&"wu-flex wu-items-center wu-gap-1 wu-flex-wrap",!m&&"wu-font-light"),children:m||s}),a.jsx(Oe,{icon:"wm-arrow-drop-down",className:h("wu-absolute wu-top-1 wm-arrow-drop-down group-data-[state=open]/wuListbox:wu-rotate-180 wu-transition-transform wu-duration-300 wu-text-base",d==="rtl"?"wu-left-1":"wu-right-1",st("drop-icon"))})]})})},Tl=(e,t,n)=>{const r=String(e[n.label]??"").toLowerCase(),s=String(e[n.value]??"").toLowerCase();return r.includes(t)||s.includes(t)},wb=(e,t,n)=>{const r=t.trim();if(r==="")return e;const s=r.toLowerCase(),o=[];for(const i of e){const u=n.group,l=u?i[u]:void 0;if(Array.isArray(l)){const d=l.filter(c=>Tl(c,s,n));d.length>0&&o.push({...i,[u]:d})}else Tl(i,s,n)&&o.push(i)}return o},El=e=>{const{data:t,accessorKey:n,value:r,Item:s,Label:o,GroupLabel:i,CustomHeader:u,CustomTrigger:l,NoDataContent:d,Chip:c,onSelect:w,onScroll:m,disabled:p,multiple:b,searchable:g,selectAll:y,virtualizedThreshold:x=100,showGroupSeparator:v,id:C,dir:N,className:S,listClass:M,placeholder:T="Select items...",variant:I,labelPosition:D="top",maxContentWidth:A,maxContentHeight:_,modal:P,...W}=e,[F,B]=f.useState(!1),[$,ie]=f.useState(""),[U,V]=f.useState(r),q=f.useMemo(()=>n,[n]),H=f.useMemo(()=>{if(!g||!$)return t;const K=$.toLowerCase().trim();return wb(t,K,n)},[t,$,n.label,g]),Q=K=>{b?V(O=>{const j=K[n.value],Y=Array.isArray(O)?O:[],G=Y.some(X=>X[n.value]===j)?Y.filter(X=>X[n.value]!==j):[...Y,K];return w&&w(G),G}):(V(K),w&&w(K),B(!1))},ee=f.useCallback(K=>{const O=K?t:[];V(O),y!=null&&y.onSelectAll&&y.onSelectAll(K),w&&w(O)},[t,y,w]),J=K=>Array.isArray(U)?U.some(O=>O[n.value]===K[n.value]):(U==null?void 0:U[n.value])===K[n.value];f.useEffect(()=>{V(r)},[r]);const ge=K=>{const O=(j,Y)=>{const Z=n.group&&Array.isArray(j[n.group]),G=v&&Z&&Y>0&&K.length>1;return a.jsxs(f.Fragment,{children:[G&&a.jsx(vs,{}),a.jsx(ub,{option:j,accessorKey:q,multiple:b,onSelect:X=>Q(X),dir:N,GroupLabel:i,Item:s,isSelected:X=>J(X)})]},JSON.stringify(j))};return K.length>x?a.jsx(Mt,{list:K,callback:(j,Y)=>O(Y,j),dir:N}):K.map((j,Y)=>O(j,Y))};return a.jsxs("div",{className:h("wu-flex wu-text-sm wu-gap-2",D==="top"&&"wu-flex-col wu-gap-1",D==="left"&&"wu-flex-row",D==="right"&&"wu-flex-row-reverse",st("container")),dir:N,children:[o&&a.jsx(Me,{htmlFor:C,className:st("label"),children:o}),a.jsxs(je,{open:F,onOpenChange:K=>{B(K),K||setTimeout(()=>{ie("")},100)},modal:P,children:[a.jsx(db,{CustomTrigger:l,disabled:p,value:U,accessorKey:n,placeholder:T,Chip:c,className:S,handleUnselect:Q,variant:I,id:C,dir:N,...W}),a.jsx($e,{className:h("wu-min-w-[--radix-popover-trigger-width] wu-max-w-[calc(100vw-32px)] wu-w-auto wu-p-0 wu-bg-white wu-border wu-border-blue-p",st("content")),align:"start",sideOffset:-1,style:{maxWidth:A},children:a.jsxs(gs,{id:e.id,shouldFilter:!1,children:[g&&a.jsx(lb,{value:$,onValueChange:ie}),u,a.jsxs(bs,{className:h("wu-overflow-y-auto",st("list"),M),onScroll:m,style:{maxHeight:_||"420px"},children:[a.jsx(ys,{children:d||"No results found."}),a.jsx(sn,{children:b&&(y==null?void 0:y.enabled)&&!$&&a.jsx(cb,{data:t,value:U,onSelectAll:ee,label:y.label})}),a.jsx(sn,{children:ge(H)})]})]})})]})]})},va=f.forwardRef(({showMenu:e=!1,className:t,color:n="#1B3380",...r},s)=>{const o=h("wu-w-full wu-border wu-transition-all wu-duration-300");return a.jsxs("div",{...r,className:h("wu-flex wu-flex-col wu-w-[18px] wu-justify-between wu-aspect-[3/2] wu-transition-all wu-duration-300",t),ref:s,"aria-label":"menu-icon",children:[a.jsx("div",{className:`${o} wu-origin-center ${e?"wu-rotate-45 wu-translate-y-[5px]":""}`,style:{borderColor:n}}),a.jsx("div",{className:`${o} ${e?"wu-opacity-0":""}`,style:{borderColor:n}}),a.jsx("div",{className:`${o} wu-origin-center ${e?"-wu-rotate-45 -wu-translate-y-[5px]":""}`,style:{borderColor:n}})]})});va.displayName="WuMenuIcon";const Il={overlay:"data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0",content:"data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[state=closed]:wu-slide-out-to-left-1/2 data-[state=closed]:wu-slide-out-to-top-[48%] data-[state=open]:wu-slide-in-from-left-1/2 data-[state=open]:wu-slide-in-from-top-[48%]"},Ml=re.Root,kl=re.Trigger,fb=re.Portal,pb=re.Close,Dl=f.forwardRef(({className:e,...t},n)=>a.jsx(re.Overlay,{ref:n,className:h("wu-fixed wu-inset-0 wu-z-50 wu-bg-black/30",Il.overlay,e),...t}));Dl.displayName=re.Overlay.displayName;const xa=f.forwardRef(({className:e,children:t,hideCloseButton:n,isStackedCard:r,...s},o)=>a.jsxs(fb,{children:[a.jsx(Dl,{className:r?"wu-bg-transparent":"","data-wu-overlay":!0}),a.jsxs(re.Content,{ref:o,className:h("wu-fixed wu-left-[50%] wu-z-50 wu-top-[50%] wu-flex wu-flex-col wu-w-full wu-max-w-lg wu-translate-x-[-50%] wu-translate-y-[-50%] wu-bg-white wu-shadow-lg wu-duration-200",Il.content,e),...s,children:[t,!n&&a.jsx(re.Close,{"aria-label":"close",asChild:!0,children:a.jsxs(Xt,{variant:"iconOnly",className:h("wu-absolute wu-right-2 wu-top-1 hover:wu-bg-black/[0.08] wu-w-8 wu-h-8 wu-p-0","wu-top-3 wu-right-4","group-data-[variant=action]:wu-text-blue-q","group-data-[variant=upgrade]:wu-text-yellow-deep","group-data-[variant=critical]:wu-text-red-deep"),children:[a.jsx("span",{className:"wm-close wu-leading-5"}),a.jsx("span",{className:"wu-sr-only",children:"Close"})]})})]})]}));xa.displayName=re.Content.displayName;const Na=({className:e,...t})=>a.jsx("div",{className:h("wu-text-center wu-bg-gray-20 wu-w-full",e),...t});Na.displayName="DialogHeader";const Al=({className:e,...t})=>a.jsx("div",{className:h("wu-flex wu-flex-col-reverse sm:wu-flex-row sm:wu-justify-end sm:wu-space-x-2 wu-p-4",e),...t});Al.displayName="DialogFooter";const Sa=f.forwardRef(({className:e,...t},n)=>a.jsx(re.Title,{ref:n,className:h("wu-text-lg wu-font-medium wu-flex wu-items-center wu-justify-center wu-gap-1 wu-h-10 wu-leading-none wu-tracking-tight",e),...t}));Sa.displayName=re.Title.displayName;const hb=f.forwardRef(({className:e,...t},n)=>a.jsx(re.Description,{ref:n,className:h("wu-text-sm wu-text-muted-foreground",e),...t}));hb.displayName=re.Description.displayName;const mb={gradientBackground:"_gradientBackground_1uc4j_1"},_l=e=>{const{colors:t,size:n=.55,children:r,className:s,strokeWidth:o,centerOffset:i={x:0,y:0},...u}=e,l=f.useRef(null);return f.useEffect(()=>{const d=l.current;if(d){d.style.setProperty("--width",`${d.offsetWidth*n}px`),d.style.setProperty("--height",`${d.offsetHeight*n}px`),d.style.setProperty("--colors",t.join(",")),d.style.setProperty("--stroke-width",`-${o||2}px`),d.style.setProperty("--spotlight-background","radial-gradient(100% var(--height) ellipse at 25% 70%, var(--colors))");let w;const m=p=>{w&&cancelAnimationFrame(w),w=requestAnimationFrame(()=>{const b=d.getBoundingClientRect();let g=p.clientX-b.left,y=p.clientY-b.top;g=Math.max(0,Math.min(g+i.x,b.width)),y=Math.max(0,Math.min(y+i.y,b.height));const x=`radial-gradient(
16
+ var(--width) var(--height) ellipse at ${g}px ${y}px,
17
+ var(--colors)
18
+ )`;d.style.setProperty("--spotlight-background",x)})};return window.addEventListener("mousemove",m),()=>{window.removeEventListener("mousemove",m),w&&cancelAnimationFrame(w)}}},[t,n,o,i]),a.jsx("div",{ref:l,className:h(mb.gradientBackground,"wu-transform-gpu",s),...u,children:r})},mr={wuModalBodyWrapper:"_wuModalBodyWrapper_uaelx_1","wu-modal-footer":"_wu-modal-footer_uaelx_5","wu-modal-content":"_wu-modal-content_uaelx_5","wu-modal-header":"_wu-modal-header_uaelx_9"},Pl="calc(100vh - 64px)",gb={sm:"400px",md:"600px",lg:"1200px"},bb=({Trigger:e,children:t,size:n="md",hideCloseButton:r,preventClickOutside:s,onOpenChange:o,open:i,dir:u,maxWidth:l,maxHeight:d,className:c,style:w,variant:m="action",allowExternalPortals:p,onOpenAutoFocus:b,onCloseAutoFocus:g,...y})=>{const x={action:["#EEF3FBcc 32%","#1D50F4cc"],upgrade:["#FDEDCCcc 32%","#FF9F00cc"],critical:["#FFB6B6cc 32%","#CC0000cc"]},v=f.useRef(null),C=f.useRef(null);return f.useEffect(()=>()=>{v.current&&(document.removeEventListener("focusin",v.current.focusin,!0),document.removeEventListener("focusout",v.current.focusout,!0),document.body.style.pointerEvents="",v.current=null)},[]),a.jsxs(Ml,{modal:!0,onOpenChange:o,open:i,children:[e&&a.jsx(kl,{asChild:!0,children:e}),a.jsx(xa,{ref:C,style:{width:"calc(100% - 64px)",maxWidth:l||gb[n],maxHeight:d||Pl,...w},hideCloseButton:r,onInteractOutside:N=>{var S,M;if(s){N.preventDefault();return}if(p){const T=(M=(S=N.detail)==null?void 0:S.originalEvent)==null?void 0:M.target;T!=null&&T.closest("[data-wu-overlay]")||N.preventDefault()}},onFocusOutside:N=>p&&N.preventDefault(),onOpenAutoFocus:N=>{if(p){document.body.style.pointerEvents="all";const S=I=>!!C.current&&!C.current.contains(I),M=I=>{S(I.target)&&I.stopImmediatePropagation()},T=I=>{S(I.relatedTarget)&&I.stopImmediatePropagation()};v.current={focusin:M,focusout:T},document.addEventListener("focusin",M,!0),document.addEventListener("focusout",T,!0)}b==null||b(N)},onCloseAutoFocus:N=>{p&&(document.body.style.pointerEvents="",v.current&&(document.removeEventListener("focusin",v.current.focusin,!0),document.removeEventListener("focusout",v.current.focusout,!0),v.current=null)),g==null||g(N)},dir:u,"aria-describedby":void 0,"data-variant":m,className:h("wu-group wu-rounded-[.88rem]",mr.wuModalBodyWrapper,c),...y,children:a.jsx(_l,{colors:x[m],strokeWidth:4,className:h("wu-rounded-[1.1rem] wu-transform-gpu wu-flex wu-flex-col",c),style:{maxHeight:d||Pl},children:t})})]})},yb=({children:e,className:t,...n})=>a.jsx("div",{className:h("wu-flex wu-flex-col wu-gap-4 wu-p-4 rtl:wu-text-right wu-overflow-auto wu-bg-white","wu-p-8 wu-text-gray-lead",mr["wu-modal-content"],t),...n,children:e}),vb=({children:e,className:t,...n})=>a.jsx(Na,{...n,"data-variant":"action",className:h("wu-text-lg wu-text-gray-lead wu-font-medium","wu-rounded-t-[.88rem] wu-px-4","group-data-[variant=action]:wu-bg-blue-sidebar group-data-[variant=action]:wu-text-blue-q","group-data-[variant=critical]:wu-bg-[#F9E0E0] group-data-[variant=critical]:wu-text-red-deep","group-data-[variant=upgrade]:wu-bg-[#FEF1D9] group-data-[variant=upgrade]:wu-text-yellow-deep",mr["wu-modal-header"],t),children:a.jsx(Sa,{className:"wu-font-normal wu-justify-start wu-text-2xl wu-h-14",children:e})}),xb=({children:e,className:t,...n})=>a.jsx(Al,{...n,className:h("wu-border-t wu-border-gray-40 wu-bg-white wu-min-h-16 wu-mx-4 wu-px-0","wu-mx-0 wu-rounded-b-[.88rem] wu-min-h-16 wu-p-4","group-data-[variant=upgrade]:wu-border-[#EED6A8]","group-data-[variant=action]:wu-border-[#BAC9F8]","group-data-[variant=critical]:wu-border-[#F0B3B3]",mr["wu-modal-footer"],t),children:e}),Nb=({children:e,className:t,...n})=>{const r=f.useRef(null);return a.jsx(pb,{asChild:!0,children:a.jsx(Ie,{className:t,ref:r,...n,children:e})})},Sb=({placeholder:e="Select...",value:t,multiple:n=!1,accessorKey:r,variant:s="flat",dir:o="ltr",customTriggerChildren:i,id:u,disabled:l,selectAll:d,isCheckedAll:c,width:w,...m})=>{const[p,b]=f.useState(""),[g,y]=f.useState(e);f.useEffect(()=>{if(!t||Array.isArray(t)&&t.length===0){y(e),b("");return}const v=r.label;if(n&&Array.isArray(t)){const C=t.map(N=>N[v]).join(", ");b(C)}else!n&&!Array.isArray(t)&&b(t[v])},[t,r.label,n,e]);const x=()=>e&&!p?a.jsx("p",{className:"wu-text-xs wu-opacity-70",children:g}):a.jsx("span",{className:h("wu-overflow-hidden wu-text-xs wu-text-start wu-text-ellipsis wu-whitespace-nowrap"),style:{width:`${(w||0)-32}px`},children:c?(d==null?void 0:d.triggerText)??p:p});return a.jsx(ii,{asChild:!0,dir:o,id:u,disabled:l,children:a.jsxs("button",{...m,disabled:l,className:h("wu-flex wu-gap-2 wu-w-full wu-items-center wu-justify-between wu-py-1.5 wu-px-2 wu-text-xs wu-transition-colors wu-cursor-pointer wu-border-b wu-bg-white wu-border-gray-subtle wu-h-8","focus:wu-outline-none focus-visible:wu-border-blue-p/80 wu-rounded-t-sm","disabled:wu-cursor-not-allowed disabled:hover:wu-border-gray-subtle disabled:wu-bg-gray-10 disabled:wu-opacity-50","hover:wu-bg-gray-10 hover:wu-border-blue-p",s==="outlined"&&"wu-border wu-border-gray-subtle","wu-group/wuSelect wu-select-trigger",m.className),children:[i??x(),a.jsx("span",{className:"wm-arrow-drop-down group-data-[state=open]/wuSelect:wu-rotate-180 wu-transition-transform wu-duration-300 wu-text-base"})]})})},Vl=({option:e,value:t,multiple:n=!1,onSelect:r,accessorKey:s,dir:o="ltr"})=>{const[i,u]=f.useState(n?[]:"");f.useEffect(()=>{t&&u(n?t.map(w=>JSON.stringify(w[s.value])):JSON.stringify(t[s.value]))},[t,s.value,n]);const l=n?i.includes(JSON.stringify(e[s.value])):i===JSON.stringify(e[s.value]),d=c=>{e.disabled||(r(e),n&&c.preventDefault())};return a.jsxs(Kn,{onClick:d,disabled:e.disabled,className:h("wu-cursor-pointer wu-text-xs wu-py-2 wu-leading-4 wu-select-item wu-items-start",l&&"wu-bg-gray-10"),dir:o,children:[n&&a.jsx(qe,{checked:l}),a.jsx(Ol,{option:e,accessorKey:s})]})},Ol=({option:e,accessorKey:t})=>{const n=String(e[t.label]);return a.jsxs("div",{className:"wu-flex wu-items-center wu-w-full wu-gap-1 wu-text-xs wu-pl-2",children:[e.icon,n,e.isAdmin&&a.jsx("span",{className:"wu-ml-auto wm-lock wu-text-sm wu-text-orange-deep"})]})},Ll=e=>{const{option:t,handleSelectAll:n,isCheckedAll:r,isPartialSelected:s,...o}=e;switch("type"in t?t.type:"option"){case"all":return a.jsxs(Kn,{onSelect:u=>{u.stopPropagation(),u.preventDefault(),n==null||n()},className:h("wu-cursor-pointer wu-text-xs wu-py-2 wu-leading-4 wu-select-item"),dir:o.dir,children:[a.jsx(qe,{"data-partial":s,checked:r||s,partial:s}),a.jsx(Ol,{option:t,accessorKey:o.accessorKey})]});case"group":return a.jsxs(ui,{dir:o.dir,children:[a.jsx(on,{className:"wu-text-xs",children:t.label}),t.options.map((u,l)=>{const d=u[o.accessorKey.value],c=d!=null?String(d):`group-item-${l}`;return f.createElement(Vl,{...o,option:u,key:c})})]});case"divider":return a.jsx(Yn,{className:"wu-mx-4"});default:return a.jsx(Vl,{...o,option:t})}},Cb=e=>{let t=0,n=0;const r=[],s=[],o=i=>{i.type==="divider"?t++:i.type==="group"?(n++,i.options.forEach(u=>{o(u)})):(r.push(i),i.disabled||s.push(i))};return e.forEach(i=>{o(i)}),{separators:t,groups:n,enabledOptions:s,totalData:r.length,cleanData:r}},Tb=100,Eb=400,Fl=({data:e,onSelect:t,multiple:n=!1,defaultValue:r,value:s,accessorKey:o,variant:i="flat",dir:u="ltr",placeholder:l,Label:d,virtualizedThreshold:c=Tb,maxHeight:w=Eb,hasGroup:m=!1,Header:p,CustomTrigger:b,selectAll:g,disabled:y,labelPosition:x="top",onScroll:v,maxContentWidth:C,selectedToTop:N=!1,...S})=>{const[M,T]=f.useState(),I=f.useRef(null),[D,A]=f.useState(!1),[_,P]=f.useState(!1),{cleanData:W,enabledOptions:F}=Cb(e),B=f.useMemo(()=>n&&g!=null&&g.enable&&e.length>0?[{type:"all",[o.label]:g.label||"Select All"},...e]:e,[e,g,n]),$=f.useCallback(H=>{const Q=H[o.value];if(n)T((ee=[])=>{const J=ee,K=J.some(O=>O[o.value]===Q)?J.filter(O=>O[o.value]!==Q):[...J,H];return t==null||t(K),K});else{const ee=H;T(ee),t==null||t(ee)}},[n,o.value,t]);f.useEffect(()=>{if(r&&s){console.error("defaultValue and value cannot be used simultaneously");return}!r&&!s&&T(void 0),r!==void 0&&T(r),s!==void 0&&T(s)},[r,s]);const ie=ai(N,B,M,o),U=ie.length>c;f.useEffect(()=>{if(!n)return;const H=g!=null&&g.includeDisabled?(M==null?void 0:M.length)===e.length:(M==null?void 0:M.length)===F.length;A(H);const Q=(M==null?void 0:M.length)>0&&!H;P(Q)},[M,g]);const V=f.useCallback(()=>{const H=D?[]:g!=null&&g.includeDisabled?m?W:e:F;T(H),t==null||t(H)},[D,n,e,F,t,g]),q=Dn(x);return a.jsxs("div",{className:h(q,"wu-flex wu-select-container"),ref:I,dir:u,children:[a.jsxs(oi,{children:[a.jsx(Sb,{...S,value:M,multiple:n,variant:i,dir:u,placeholder:l,accessorKey:o,customTriggerChildren:b,id:S.id,disabled:y,selectAll:g,isCheckedAll:D}),a.jsxs(xs,{className:"wu-min-w-[--radix-dropdown-menu-trigger-width] wu-max-w-[calc(100vw-32px)] wu-border-blue-p wu-select-content",role:"listbox",sideOffset:-1,align:"start",id:S.id,style:{maxWidth:C},children:[p,U?a.jsx(Mt,{list:ie,containerHeight:w,callback:(H,Q)=>a.jsx(Ll,{option:Q,accessorKey:o,multiple:n,onSelect:$,value:M,dir:u,handleSelectAll:V,isCheckedAll:D,isPartialSelected:_}),dir:u}):a.jsx("div",{onScroll:v,style:{maxHeight:w,height:"fit-content",overflow:"auto"},className:"wu-select-list",children:ie.map((H,Q)=>{const ee=H,J=ee[o.value],ge=J!=null?String(J):`__${"type"in ee?ee.type:"item"}__${Q}`;return a.jsx(Ll,{option:ee,accessorKey:o,multiple:n,onSelect:$,value:M,handleSelectAll:V,isCheckedAll:D,dir:u,isPartialSelected:_},ge)})})]})]}),d&&a.jsx(Me,{htmlFor:S.id,className:"wu-select-label",children:d})]})},gr=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Ib=({value:e,onChange:t,min:n=z.sub(new Date,{years:5}),max:r=z.add(new Date,{years:1}),placeholder:s="Select a month",Label:o,labelPosition:i="top",disabled:u,id:l,readonly:d,disabledMonths:c=[],...w})=>{const[m,p]=f.useState(null),[b,g]=f.useState(""),[y,x]=f.useState({value:Math.min(new Date().getFullYear(),new Date(r).getFullYear()),label:Math.min(new Date().getFullYear(),new Date(r).getFullYear())}),v=f.useMemo(()=>{const N=new Date(n).getFullYear(),S=new Date(r).getFullYear();return Array.from({length:S-N+1},(M,T)=>({value:S-T,label:S-T}))},[n,r]);f.useEffect(()=>{if(e){const N=new Date(e),S=N.getFullYear(),M=N.getMonth();p({year:S,month:M}),g(`${gr[M]} ${S}`),x({value:S,label:S})}},[e]);const C=()=>{m&&t&&(t(new Date(m.year,m.month,15)),g(`${gr[m.month]} ${m.year}`))};return a.jsxs("div",{className:h("wu-flex wu-flex-col wu-items-center",Dn(i),i==="top"&&"wu-items-start"),children:[a.jsxs(je,{children:[a.jsx(Qr,{...w,disabled:u||d,id:l,dir:"ltr",placeholder:s,formattedString:b}),a.jsxs($e,{className:"wu-flex wu-flex-col wu-gap-4 wu-p-4 wu-bg-white wu-border-blue-p wu-month-picker-content",align:"start",sideOffset:-1,children:[a.jsx("div",{className:"wu-px-1 wu-mx-auto wu-w-full",children:a.jsx(Fl,{data:v,accessorKey:{value:"value",label:"label"},value:y,onSelect:N=>x(N),multiple:!1,maxHeight:224})}),a.jsx(Mb,{year:y==null?void 0:y.value,selectedMonth:m==null?void 0:m.month,selectedYear:m==null?void 0:m.year,onClick:(N,S)=>p({year:S,month:N}),disabledMonths:c}),a.jsx("div",{className:"wu-flex wu-justify-end wu-px-0.5",children:a.jsx(jt.PopoverClose,{asChild:!0,children:a.jsx(Ie,{onClick:C,children:"Apply"})})})]})]}),o&&a.jsx(Me,{className:"wu-truncate wu-max-w-[120px] wu-min-w-fit wu-select-label",children:o})]})},Mb=({year:e,selectedMonth:t,selectedYear:n,onClick:r,disabledMonths:s=[]})=>{const o=new Date,i=o.getFullYear(),u=o.getMonth(),l=f.useMemo(()=>{const d=new Set;return s.forEach(c=>{const w=typeof c=="string"?new Date(c):c;d.add(`${w.getFullYear()}-${w.getMonth()}`)}),d},[s]);return a.jsx("div",{className:"wu-grid wu-grid-cols-3 wu-grid-rows-4 wu-w-fit wu-gap-[1px] wu-bg-[#d9d9d9] wu-border wu-border-[#d9d9d9] wu-month-picker-grid",children:gr.map((d,c)=>{const w=e===i&&c===u,m=t===c&&n===e;return a.jsx("button",{disabled:l.has(`${e}-${c}`),onClick:()=>r(c,e),className:h("wu-bg-white wu-flex wu-items-center wu-justify-center wu-w-[83px] wu-h-[53px] wu-text-xs wu-transition-colors","hover:wu-bg-gray-25 hover:wu-text-blue-q hover:wu-font-medium","focus:wu-outline-none focus-visible:wu-border focus-visible:wu-border-blue-p/50",w&&"wu-border wu-border-blue-p",m&&"wu-bg-blue-p wu-text-white hover:wu-bg-blue-p/80 hover:wu-text-white wu-font-medium","disabled:wu-bg-gray-20 disabled:wu-text-gray-subtle disabled:hover:wu-bg-gray-20 disabled:hover:wu-text-gray-subtle disabled:hover:wu-font-normal","wu-month-picker-month"),"data-value":`${gr[c]} ${e}`,"data-month":c,"data-year":e,children:d},d)})})},Wl=(e,t,n,r=96)=>{if(e.length===0||r<=0)return[[],[]];const[o,i]=f.useState([]),[u,l]=f.useState([]);return f.useEffect(()=>{const d=()=>{var b,g;const c=((b=t.current)==null?void 0:b.clientWidth)||0,w=((g=n.current)==null?void 0:g.clientWidth)||0,m=c-w,p=Math.floor(m/r);i(e.slice(0,p)),l(e.slice(p))};return d(),window.addEventListener("resize",d),()=>{window.removeEventListener("resize",d)}},[e,r]),[o,u]},Bl={wuPrimaryLink:"_wuPrimaryLink_1sy3v_1",wuPrimaryPopoverContent:"_wuPrimaryPopoverContent_1sy3v_8"},kb=e=>{const{Links:t,children:n,className:r,...s}=e,o=f.useMemo(()=>t.map((c,w)=>f.cloneElement(c,{className:h(Bl.wuPrimaryLink,c.props.className,"wu-primary-nav-link"),key:w})),[t]),i=f.useRef(null),u=f.useRef(null),[l,d]=Wl(o,i,u);return a.jsx(a.Fragment,{children:a.jsxs("header",{className:h("wu-flex wu-items-center wu-justify-between wu-gap-4 wu-px-2 wu-py-1 wu-bg-white wu-border-b",r),...s,ref:i,children:[a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2",children:[a.jsx("nav",{className:"wu-flex wu-items-center wu-justify-start wu-gap-4 wu-primary-nav-left",children:l}),d.length>0&&a.jsxs(je,{children:[a.jsx(dt,{className:"wu-p-1 wu-pb-0 wu-rounded-sm focus:wu-outline-none focus:wu-bg-gray-25","aria-label":"more",children:a.jsx("span",{className:"wm-more-vert"})}),a.jsx($e,{className:h(Bl.wuPrimaryPopoverContent,"wu-primary-nav-popover-left"),align:"start",sideOffset:12,children:d})]})]}),n&&a.jsxs(a.Fragment,{children:[a.jsx("section",{className:"wu-items-center wu-justify-end wu-hidden wu-gap-4 sm:wu-flex wu-primary-nav-right",ref:u,children:n}),a.jsxs(je,{children:[a.jsx(dt,{className:"sm:wu-hidden",children:a.jsx("span",{className:"wu-text-lg wm-menu"})}),a.jsx($e,{className:"wu-bg-white wu-border wu-border-blue-p wu-w-fit wu-primary-nav-popover-right",align:"end",sideOffset:4,children:n})]})]})]})})},Ca={wuSecondaryLink:"_wuSecondaryLink_1edl1_1",wuSecondaryNav:"_wuSecondaryNav_1edl1_6"},Db=e=>{const{Links:t,children:n,className:r,...s}=e,o=f.useMemo(()=>t.map((w,m)=>f.cloneElement(w.link,{key:m,className:h(Ca.wuSecondaryLink,w.link.props.className,"wu-secondary-nav-link-container"),children:a.jsxs(a.Fragment,{children:[f.cloneElement(w.imgOrIcon,{className:h("wu-w-5 wu-h-5 wu-flex wu-items-center wu-justify-center wu-text-lg wu-leading-5",w.imgOrIcon.props.className)}),a.jsx("div",{className:"wu-secondary-nav-link",children:w.link.props.children})]})})),[t]),i=f.useRef(null),u=f.useRef(null),l=f.useRef(null),[d,c]=Wl(o,i,l);return a.jsx(a.Fragment,{children:a.jsxs("header",{className:h("wu-flex wu-items-center wu-justify-between wu-gap-4 wu-border-y wu-border-gray-25 wu-h-[50px]",r),...s,ref:i,children:[a.jsxs("div",{className:"wu-flex wu-items-center wu-justify-start wu-gap-2",children:[a.jsx("nav",{className:h(Ca.wuSecondaryNav,"wu-flex wu-items-center wu-justify-start wu-w-full wu-h-full wu-secondary-nav-left"),ref:u,children:d}),c.length>0&&a.jsxs(je,{children:[a.jsx(dt,{className:"wu-p-1 wu-pb-0 wu-rounded-sm focus:wu-outline-none focus:wu-bg-gray-25","aria-label":"more",children:a.jsx("span",{className:"wm-more-vert"})}),a.jsx($e,{className:h(Ca.wuSecondaryNavPopover,"wu-secondary-nav-popover-left"),align:"start",sideOffset:12,children:c})]})]}),n&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"wu-items-center wu-justify-end wu-hidden sm:wu-flex",ref:l,children:n}),a.jsxs(je,{children:[a.jsx(dt,{className:"sm:wu-hidden",children:a.jsx("span",{className:"wu-text-lg wm-menu"})}),a.jsx($e,{className:"wu-bg-white wu-border wu-border-blue-p wu-w-fit wu-secondary-nav-popover-right",align:"end",sideOffset:12,children:n})]})]})]})})},$l=f.forwardRef(({totalRows:e,initialPage:t=0,initialPageSize:n=100,onPageChange:r,className:s,disabled:o=!1,...i},u)=>{const[l,d]=f.useState(t),[c,w]=f.useState(n);f.useEffect(()=>{d(t),w(n)},[t,n]);const m=Math.ceil(e/c),p=l*c+1,b=Math.min((l+1)*c,e),g=Array.from({length:m},(v,C)=>C),y=f.useCallback(v=>{v>=0&&v<m&&(d(v),r==null||r(v))},[m,r]),x=224;return a.jsxs("div",{className:h("wu-flex wu-items-center wu-gap-[2px]",s,"wu-pagination"),...i,role:"navigation",children:[a.jsx(ql,{label:"Previous page",onClick:()=>y(l-1),disabled:l===0||o,icon:"wm-arrow-back-ios-new",className:"hover:wu-bg-gray-20 rtl:wu-rotate-180 wu-prev-btn"}),a.jsx(ya,{name:`${p} - ${b}`,className:"wu-w-[96px] wu-min-w-[96px] wu-pagination-menu",align:"end",disabled:o,children:a.jsx(Wt,{style:{maxHeight:x+"px"},dir:i.dir,children:g.length>100?a.jsx(Mt,{className:"wu-pagination-list",containerHeight:x,list:g,callback:(v,C)=>a.jsxs(hr,{onSelect:()=>y(C),className:h("wu-py-2",C===l&&"wu-bg-gray-20","wu-pagination-item"),children:[C*c+1," -"," ",Math.min((C+1)*c,e)]},v)}):g.map(v=>a.jsxs(hr,{onSelect:()=>y(v),className:h(v===l&&"wu-bg-gray-20","wu-py-2 hover:wu-bg-gray-20","wu-pagination-item"),children:[v*c+1," -"," ",Math.min((v+1)*c,e)]},v))})}),a.jsx(ql,{label:"Next page",onClick:()=>y(l+1),disabled:l===m-1||o,icon:"wm-arrow-forward-ios",className:"hover:wu-bg-gray-20 rtl:wu-rotate-180 wu-next-btn"})]})});$l.displayName="WuPagination";const ql=({label:e,onClick:t,disabled:n,icon:r,className:s})=>a.jsx(Ie,{variant:"iconOnly",onClick:t,disabled:n,className:h("wu-w-8 wu-h-8 wu-rounded-xs wu-group disabled:wu-text-zinc-300 disabled:wu-bg-white wu-text-gray-lead focus:wu-bg-color-none",s),"aria-label":e,children:a.jsx("span",{className:h("wu-text-sm",r)})}),Hl=E.forwardRef(({className:e,...t},n)=>a.jsx(Yt.Root,{className:h("wu-grid wu-gap-2",e),...t,ref:n}));Hl.displayName=Yt.Root.displayName;const zl=E.forwardRef(({className:e,...t},n)=>a.jsx(Yt.Item,{ref:n,className:h("wu-group wu-aspect-square wu-h-4 wu-w-4 wu-rounded-full wu-border wu-border-gray-subtle wu-text-blue-p wu-ring-offset-white disabled:wu-cursor-not-allowed disabled:wu-opacity-50 hover:wu-border-blue-p hover:wu-bg-gray-20 data-[state=checked]:wu-border-blue-p hover:data-[state=checked]:wu-border-blue-q hover:data-[state=checked]:wu-bg-inherit focus:wu-outline-2 focus:wu-outline-offset-4 focus:wu-outline-blue-soft disabled:hover:wu-border-gray-subtle disabled:wu-hover:bg-gray-20 disabled:wu-bg-gray-20",e),...t,children:a.jsx(Yt.Indicator,{className:"wu-flex wu-items-center wu-justify-center",children:a.jsx("div",{className:"wu-w-2 wu-h-2 wu-rounded-full wu-bg-blue-p group-hover:group-data-[state=checked]:wu-bg-blue-q"})})}));zl.displayName=Yt.Item.displayName;const Ul=f.forwardRef((e,t)=>{const{options:n,defaultValue:r,onChange:s,label:o,dir:i,...u}=e;return a.jsxs(Hl,{defaultValue:r,required:u.required,disabled:u.disabled,onValueChange:s,id:u.id,dir:i,name:u.name,className:h("w-fit",u.className),ref:t,style:u.style,children:[a.jsx(Pn,{htmlFor:u.id,className:"wu-text-sm wu-font-normal wu-text-gray-lead wu-leading-6 wu-radio-group-label",children:o}),n.map(l=>a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2 wu-radio-item-container",children:[a.jsx(zl,{value:l.value,id:l.value,disabled:l.disabled,required:l.required,"aria-label":l.value,className:"wu-peer wu-radio-item"}),a.jsx(Pn,{htmlFor:l.value,className:h(l.required&&"after:wu-content-['*'] after:wu-mx-[2px] after:wu-text-rose-500","wu-radio-item-label"),children:l.label})]},l.value))]})});Ul.displayName="WuRadioGroup";const Ab=e=>{const{children:t,...n}=e;return a.jsxs(Wt,{...n,role:"complementary","aria-label":"ScrollArea",children:[t,a.jsx(ba,{orientation:"horizontal"})]})},jl=E.forwardRef(({className:e,type:t,...n},r)=>a.jsx("input",{type:t,className:h("wu-flex wu-h-8 wu-w-full wu-border-b wu-border-gray-subtle wu-bg-gray-10 wu-p-2 wu-text-sm wu-font-normal wu-text-gray-lead","file:wu-border-0 file:wu-bg-gray-40 file:wu-text-gray-notification file:wu-text-sm file:wu-font-normal file:wu-relative file:wu-bottom-[3px]","wu-placeholder:wu-text-gray-subtle wu-placeholder:wu-font-light","disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle","read-only:wu-cursor-not-allowed read-only:wu-bg-gray-20 read-only:wu-border-gray-40 read-only:wu-text-gray-subtle","focus:wu-border-blue-p focus-visible:wu-outline-none wu-transition-colors hover:wu-border-gray-40",e),ref:r,...n}));jl.displayName="Input";const Gl=E.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},s)=>a.jsx(ro.Root,{ref:s,decorative:n,orientation:t,className:h("wu-shrink-0 wu-bg-gray-40",t==="horizontal"?"wu-h-[1px] wu-w-full":"wu-h-full wu-w-[1px]",e),...r}));Gl.displayName=ro.Root.displayName;function Kl({className:e,...t}){return a.jsx("div",{className:h("animate-pulse rounded-md bg-muted",e),...t})}const Ta=768;function Ea(){const[e,t]=E.useState(void 0);return E.useEffect(()=>{const n=window.matchMedia(`(max-width: ${Ta-1}px)`),r=()=>{t(window.innerWidth<Ta)};return n.addEventListener("change",r),t(window.innerWidth<Ta),()=>n.removeEventListener("change",r)},[]),!!e}const _b="sidebar_state",Pb=3600*24*7,Vb="256px",Ob="256px",Lb="3rem",Fb="b",Yl=E.createContext(null);function at(){const e=E.useContext(Yl);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const Xl=E.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:s,children:o,...i},u)=>{const l=Ea(),[d,c]=E.useState(!1),[w,m]=E.useState(l?!0:e),p=t??w,b=E.useCallback(v=>{const C=typeof v=="function"?v(p):v;n?n(C):m(C),document.cookie=`${_b}=${C}; path=/; max-age=${Pb}`},[n,p]),g=E.useCallback(()=>l?c(v=>!v):b(v=>!v),[l,b,c]);E.useEffect(()=>{const v=C=>{C.key===Fb&&(C.metaKey||C.ctrlKey)&&(C.preventDefault(),g())};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[g]);const y=p?"expanded":"collapsed",x=E.useMemo(()=>({state:y,open:p,setOpen:b,isMobile:l,openMobile:d,setOpenMobile:c,toggleSidebar:g}),[y,p,b,l,d,c,g]);return a.jsx(Yl.Provider,{value:x,children:a.jsx(po,{delayDuration:0,children:a.jsx("div",{style:{"--sidebar-width":Vb,"--sidebar-width-icon":Lb,...s},className:h("wu-group/sidebar-wrapper wu-flex wu-min-h-[calc(100svh-48px)] wu-w-full",r),ref:u,...i,children:o})})})});Xl.displayName="SidebarProvider";const Zl=E.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:s,...o},i)=>{const{isMobile:u,state:l,openMobile:d,setOpenMobile:c}=at();return n==="none"?a.jsx("div",{className:h("wu-flex wu-h-full wu-w-[--sidebar-width] wu-flex-col",r),ref:i,...o,children:s}):u?a.jsx(hi,{open:d,onOpenChange:c,...o,children:a.jsx(Ns,{"data-sidebar":"sidebar","data-mobile":"true",className:"wu-w-[--sidebar-width] wu-bg-blue-sidebar wu-p-0 [&>button]:wu-hidden",style:{"--sidebar-width":Ob},side:e,children:a.jsx("div",{className:"wu-flex wu-flex-col wu-w-full wu-h-full",children:s})})}):a.jsxs("div",{ref:i,className:"wu-hidden wu-group wu-peer md:wu-block","data-state":l,"data-collapsible":l==="collapsed"?n:"","data-variant":t,"data-side":e,children:[a.jsx("div",{className:h("wu-relative wu-w-[--sidebar-width] wu-bg-transparent wu-transition-[width] wu-duration-150 wu-ease-linear","group-data-[collapsible=offcanvas]:wu-w-0","group-data-[side=right]:wu-rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:wu-w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:wu-w-[--sidebar-width-icon]")}),a.jsx("div",{className:h("wu-fixed wu-inset-y-0 wu-z-20 wu-hidden wu-h-svh wu-w-[--sidebar-width] wu-transition-[left,right,width] wu-duration-150 wu-ease-linear md:wu-flex",e==="left"?"wu-left-0 group-data-[collapsible=offcanvas]:wu-left-[calc(var(--sidebar-width)*-1)]":"wu-right-0 group-data-[collapsible=offcanvas]:wu-right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"wu-p-2 group-data-[collapsible=icon]:wu-w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:wu-w-[--sidebar-width-icon] group-data-[side=left]:wu-border-r group-data-[side=right]:wu-border-l",r),...o,children:a.jsx("div",{"data-sidebar":"sidebar",className:"wu-flex wu-h-full wu-w-full wu-flex-col wu-bg-[#eef3fb] group-data-[variant=floating]:wu-rounded-lg group-data-[variant=floating]:wu-border group-data-[variant=floating]:wu-border-sidebar-border group-data-[variant=floating]:wu-shadow",children:s})})]})});Zl.displayName="Sidebar";const Jl=E.forwardRef(({className:e,onClick:t,children:n,...r},s)=>{const{toggleSidebar:o}=at();return a.jsxs(Xt,{ref:s,"data-sidebar":"trigger",variant:"secondary",className:h("wu-h-8 wu-w-8 wu-min-w-0 wu-p-0 wu-text-2xl wu-font-light hover:wu-bg-blue-sidebarHover wu-text-blue-q",e),onClick:i=>{t==null||t(i),o()},...r,children:[n,a.jsx("span",{className:"wu-sr-only",children:"Toggle Sidebar"})]})});Jl.displayName="SidebarTrigger";const Wb=E.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:r}=at();return a.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:h("wu-absolute wu-inset-y-0 wu-z-20 wu-hidden wu-w-4 wu-translate-x-1/2 wu-transition-all wu-ease-linear after:wu-absolute after:wu-inset-y-0 after:wu-left-1/2 after:wu-w-[2px] group-data-[side=left]:wu-right-4 group-data-[side=right]:wu-left-0 sm:wu-flex","[[data-side=left]_&]:wu-cursor-w-resize [[data-side=right]_&]:wu-cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:wu-cursor-e-resize [[data-side=right][data-state=collapsed]_&]:wu-cursor-w-resize","group-data-[collapsible=offcanvas]:wu-translate-x-0 group-data-[collapsible=offcanvas]:after:wu-left-full","[[data-side=left][data-collapsible=offcanvas]_&]:wu-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:wu-left-2",e),...t})});Wb.displayName="SidebarRail";const Ql=E.forwardRef(({className:e,...t},n)=>a.jsx("main",{ref:n,className:h("wu-relative wu-flex wu-w-full wu-flex-1 wu-flex-col","md:peer-data-[variant=inset]:wu-m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:wu-ml-2 md:peer-data-[variant=inset]:wu-ml-0 md:peer-data-[variant=inset]:wu-rounded-xl md:peer-data-[variant=inset]:wu-shadow",e),...t}));Ql.displayName="SidebarInset";const Bb=E.forwardRef(({className:e,...t},n)=>a.jsx(jl,{ref:n,"data-sidebar":"input",className:h("wu-h-8 wu-w-full wu-shadow-none focus-visible:wu-ring-2",e),...t}));Bb.displayName="SidebarInput";const Rl=E.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"header",className:h("wu-flex wu-flex-col wu-gap-2 wu-p-2",e),...t}));Rl.displayName="SidebarHeader";const ec=E.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"footer",className:h("wu-flex wu-flex-col wu-gap-2 wu-pb-2",e),...t}));ec.displayName="SidebarFooter";const $b=E.forwardRef(({className:e,...t},n)=>a.jsx(Gl,{ref:n,"data-sidebar":"separator",className:h("wu-mx-2 wu-w-auto",e),...t}));$b.displayName="SidebarSeparator";const tc=E.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"content",className:h("wu-flex wu-min-h-0 wu-flex-1 wu-flex-col wu-gap-2 wu-overflow-auto group-data-[collapsible=icon]:wu-overflow-hidden",e),...t}));tc.displayName="SidebarContent";const nc=E.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"group",className:h("wu-relative wu-flex wu-w-full wu-min-w-0 wu-flex-col wu-p-2",e),...t}));nc.displayName="SidebarGroup";const rc=E.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const s=t?Ct.Slot:"div";return a.jsx(s,{ref:r,"data-sidebar":"group-label",className:h("wu-flex wu-h-8 wu-shrink-0 wu-items-center wu-rounded-md wu-px-2 wu-text-xs wu-font-medium wu-outline-none wu-transition-[margin,opacity] wu-duration-150 wu-ease-linear focus-visible:wu-ring-2 [&>svg]:wu-size-4 [&>svg]:wu-shrink-0","group-data-[collapsible=icon]:wu-opacity-0",e),...n})});rc.displayName="SidebarGroupLabel";const qb=E.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const s=t?Ct.Slot:"button";return a.jsx(s,{ref:r,"data-sidebar":"group-action",className:h("wu-absolute wu-right-3 wu-top-3.5 wu-flex wu-aspect-square wu-w-5 wu-items-center wu-justify-center wu-rounded-md wu-p-0 wu-outline-none wu-transition-transform focus-visible:wu-ring-2 [&>svg]:wu-size-4 [&>svg]:wu-shrink-0","after:wu-absolute after:wu-inset-2 after:md:wu-hidden","group-data-[collapsible=icon]:wu-hidden",e),...n})});qb.displayName="SidebarGroupAction";const sc=E.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"group-content",className:h("wu-w-full wu-text-sm",e),...t}));sc.displayName="SidebarGroupContent";const Ia=E.forwardRef(({className:e,...t},n)=>a.jsx("ul",{ref:n,"data-sidebar":"menu",className:h("wu-flex wu-w-full wu-min-w-0 wu-flex-col wu-gap-1",e),...t}));Ia.displayName="SidebarMenu";const ac=E.forwardRef(({className:e,...t},n)=>a.jsx("li",{ref:n,"data-sidebar":"menu-item",className:h("wu-group/menu-item wu-relative",e),...t}));ac.displayName="SidebarMenuItem";const Hb=Be.cva("wu-peer/menu-button wu-flex wu-w-full wu-items-center wu-gap-2 wu-overflow-hidden wu-rounded-md wu-p-2 wu-text-left wu-text-sm wu-outline-none wu-transition-[width,height,padding] focus-visible:wu-ring-2 disabled:wu-pointer-events-none disabled:wu-opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:wu-pr-8 aria-disabled:wu-pointer-events-none aria-disabled:wu-opacity-50 data-[active=true]:wu-font-medium group-data-[collapsible=icon]:!wu-size-8 group-data-[collapsible=icon]:!wu-p-2 [&>span:last-child]:wu-truncate [&>svg]:wu-size-4 [&>svg]:wu-shrink-0",{variants:{variant:{default:"",outline:""},size:{default:"wu-h-8 wu-text-sm",sm:"wu-h-7 wu-text-xs",lg:"wu-h-12 wu-text-sm group-data-[collapsible=icon]:!wu-p-0"}},defaultVariants:{variant:"default",size:"default"}}),oc=E.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:s,className:o,...i},u)=>{const l=e?Ct.Slot:"button",{isMobile:d,state:c}=at(),w=a.jsx(l,{ref:u,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:h(Hb({variant:n,size:r}),o),...i});return s?(typeof s=="string"&&(s={children:s}),a.jsxs(ho,{children:[a.jsx(mo,{asChild:!0,children:w}),a.jsx(Xr,{side:"right",align:"center",hidden:c!=="collapsed"||d,...s})]})):w});oc.displayName="SidebarMenuButton";const zb=E.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...r},s)=>{const o=t?Ct.Slot:"button";return a.jsx(o,{ref:s,"data-sidebar":"menu-action",className:h("wu-absolute wu-right-1 wu-top-1.5 wu-flex wu-aspect-square wu-w-5 wu-items-center wu-justify-center wu-rounded-md wu-p-0 wu-outline-none wu-transition-transform focus-visible:wu-ring-2 [&>svg]:wu-size-4 [&>svg]:wu-shrink-0","after:wu-absolute after:wu-inset-2 after:md:wu-hidden","peer-data-[size=sm]/menu-button:wu-top-1","peer-data-[size=default]/menu-button:wu-top-1.5","peer-data-[size=lg]/menu-button:wu-top-2.5","group-data-[collapsible=icon]:wu-hidden",n&&"group-focus-within/menu-item:wu-opacity-100 group-hover/menu-item:wu-opacity-100 data-[state=open]:wu-opacity-100 md:wu-opacity-0",e),...r})});zb.displayName="SidebarMenuAction";const Ub=E.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:h("wu-pointer-events-none wu-absolute wu-right-1 wu-flex wu-h-5 wu-min-w-5 wu-select-none wu-items-center wu-justify-center wu-rounded-md wu-px-1 wu-text-xs wu-font-medium wu-tabular-nums","","peer-data-[size=sm]/menu-button:wu-top-1","peer-data-[size=default]/menu-button:wu-top-1.5","peer-data-[size=lg]/menu-button:wu-top-2.5","group-data-[collapsible=icon]:wu-hidden",e),...t}));Ub.displayName="SidebarMenuBadge";const jb=E.forwardRef(({className:e,showIcon:t=!1,...n},r)=>{const s=E.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return a.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:h("wu-flex wu-h-8 wu-items-center wu-gap-2 wu-rounded-md wu-px-2",e),...n,children:[t&&a.jsx(Kl,{className:"wu-rounded-md wu-size-4","data-sidebar":"menu-skeleton-icon"}),a.jsx(Kl,{className:"wu-h-4 wu-max-w-[--skeleton-width] wu-flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":s}})]})});jb.displayName="SidebarMenuSkeleton";const Gb=E.forwardRef(({className:e,...t},n)=>a.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:h("wu-mx-3.5 wu-flex wu-min-w-0 wu-translate-x-px wu-flex-col wu-gap-1 wu-border-l wu-px-2.5 wu-py-0.5","group-data-[collapsible=icon]:wu-hidden",e),...t}));Gb.displayName="SidebarMenuSub";const Kb=E.forwardRef(({...e},t)=>a.jsx("li",{ref:t,...e}));Kb.displayName="SidebarMenuSubItem";const Yb=E.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:r,...s},o)=>{const i=e?Ct.Slot:"a";return a.jsx(i,{ref:o,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:h("wu-flex wu-h-7 wu-min-w-0 wu-translate-x-px wu-items-center wu-gap-2 wu-overflow-hidden wu-rounded-md wu-px-2 wu-outline-none focus-visible:wu-ring-2 disabled:wu-pointer-events-none disabled:wu-opacity-50 aria-disabled:wu-pointer-events-none aria-disabled:wu-opacity-50 [&>span:last-child]:wu-truncate [&>svg]:wu-size-4 [&>svg]:wu-shrink-0","data-[active=true]:wu-bg-sidebar-accent data-[active=true]:wu-text-sidebar-accent-foreground",t==="sm"&&"wu-text-xs",t==="md"&&"wu-text-sm","group-data-[collapsible=icon]:wu-hidden",r),...s})});Yb.displayName="SidebarMenuSubButton";function Xb(e){const{open:t,defaultOpen:n,onOpenChange:r,disabled:s}=e,[o,i]=ws({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:u,setMounted:l,transitionStatus:d}=Cf(o,!0,!0),c=Ao(),[w,m]=E.useState(),p=w??c,b=fe(g=>{const y=!o,x=Ae(Tf,g.nativeEvent);r(y,x),!x.isCanceled&&i(y)});return E.useMemo(()=>({disabled:s,handleTrigger:b,mounted:u,open:o,panelId:p,setMounted:l,setOpen:i,setPanelIdState:m,transitionStatus:d}),[s,b,u,o,p,l,i,m,d])}const Ma=E.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ma.displayName="CollapsibleRootContext");function ic(){const e=E.useContext(Ma);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CollapsibleRootContext is missing. Collapsible parts must be placed within <Collapsible.Root>.":Zt(15));return e}let ka=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Rt.startingStyle]="startingStyle",e[e.endingStyle=Rt.endingStyle]="endingStyle",e})({}),Zb=(function(e){return e.panelOpen="data-panel-open",e})({});const Jb={[ka.open]:""},Qb={[ka.closed]:""},Rb={open(e){return e?{[Zb.panelOpen]:""}:null}},uc={...{open(e){return e?Jb:Qb}},...zo},lc=E.forwardRef(function(t,n){const{render:r,className:s,defaultOpen:o=!1,disabled:i=!1,onOpenChange:u,open:l,style:d,...c}=t,w=fe(u),m=Xb({open:l,defaultOpen:o,onOpenChange:w,disabled:i}),p=E.useMemo(()=>({open:m.open,disabled:m.disabled,transitionStatus:m.transitionStatus}),[m.open,m.disabled,m.transitionStatus]),b=E.useMemo(()=>({...m,onOpenChange:w,state:p}),[m,w,p]),g=Ze("div",t,{state:p,ref:n,props:c,stateAttributesMapping:uc});return a.jsx(Ma.Provider,{value:b,children:g})});process.env.NODE_ENV!=="production"&&(lc.displayName="CollapsibleRoot");const cc=E.createContext(void 0);process.env.NODE_ENV!=="production"&&(cc.displayName="CompositeRootContext");function ey(e=!1){const t=E.useContext(cc);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":Zt(16));return t}function ty(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:s=0,isNativeButton:o}=e,i=r&&t!==!1,u=r&&t===!1;return{props:E.useMemo(()=>{const d={onKeyDown(c){n&&t&&c.key!=="Tab"&&c.preventDefault()}};return r||(d.tabIndex=s,!o&&n&&(d.tabIndex=t?s:-1)),(o&&(t||i)||!o&&n)&&(d["aria-disabled"]=n),o&&(!t||u)&&(d.disabled=n),d},[r,n,t,i,u,o,s])}}function Da(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:s=!0,composite:o}=e,i=E.useRef(null),u=ey(!0),l=o??u!==void 0,{props:d}=ty({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:r,isNativeButton:s});process.env.NODE_ENV!=="production"&&E.useEffect(()=>{var b,g;if(!i.current)return;const p=br(i.current);if(s){if(!p){const y=((b=Ye.captureOwnerStack)==null?void 0:b.call(Ye))||"";Hn(`A component that acts as a button expected a native <button> because the \`nativeButton\` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the \`render\` prop, or set \`nativeButton\` to \`false\`.${y}`)}}else if(p){const y=((g=Ye.captureOwnerStack)==null?void 0:g.call(Ye))||"";Hn(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${y}`)}},[s]);const c=E.useCallback(()=>{const p=i.current;br(p)&&l&&t&&d.disabled===void 0&&p.disabled&&(p.disabled=!1)},[t,d.disabled,l]);pe(c,[c]);const w=E.useCallback((p={})=>{const{onClick:b,onMouseDown:g,onKeyUp:y,onKeyDown:x,onPointerDown:v,...C}=p;return ss({onClick(N){if(t){N.preventDefault();return}b==null||b(N)},onMouseDown(N){t||g==null||g(N)},onKeyDown(N){if(t||(Fn(N),x==null||x(N),N.baseUIHandlerPrevented))return;const S=N.target===N.currentTarget,M=N.currentTarget,T=br(M),I=!s&&ny(M),D=S&&(s?T:!I),A=N.key==="Enter",_=N.key===" ",P=M.getAttribute("role"),W=(P==null?void 0:P.startsWith("menuitem"))||P==="option"||P==="gridcell";if(S&&l&&_){if(N.defaultPrevented&&W)return;N.preventDefault(),I||s&&T?(M.click(),N.preventBaseUIHandler()):D&&(b==null||b(N),N.preventBaseUIHandler());return}D&&(!s&&(_||A)&&N.preventDefault(),!s&&A&&(b==null||b(N)))},onKeyUp(N){if(!t){if(Fn(N),y==null||y(N),N.target===N.currentTarget&&s&&l&&br(N.currentTarget)&&N.key===" "){N.preventDefault();return}N.baseUIHandlerPrevented||N.target===N.currentTarget&&!s&&!l&&N.key===" "&&(b==null||b(N))}},onPointerDown(N){if(t){N.preventDefault();return}v==null||v(N)}},s?{type:"button"}:{role:"button"},d,C)},[t,d,l,s]),m=fe(p=>{i.current=p,c()});return{getButtonProps:w,buttonRef:m}}function br(e){return Kw(e)&&e.tagName==="BUTTON"}function ny(e){return!!((e==null?void 0:e.tagName)==="A"&&(e!=null&&e.href))}const ry={...Rb,...zo},dc=E.forwardRef(function(t,n){const{panelId:r,open:s,handleTrigger:o,state:i,disabled:u}=ic(),{className:l,disabled:d=u,id:c,render:w,nativeButton:m=!0,style:p,...b}=t,{getButtonProps:g,buttonRef:y}=Da({disabled:d,focusableWhenDisabled:!0,native:m});return Ze("button",t,{state:i,ref:[n,y],props:[{"aria-controls":s?r:void 0,"aria-expanded":s,onClick:o},b,g],stateAttributesMapping:ry})});process.env.NODE_ENV!=="production"&&(dc.displayName="CollapsibleTrigger");function yr(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Aa(e){const t=Qe(sy,e).current;return t.next=e,pe(t.effect),t}function sy(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const gn={height:void 0,width:void 0};function ay(e){const{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:s,mounted:o,onOpenChange:i,open:u,setMounted:l,setOpen:d,transitionStatus:c}=e,w=E.useRef(null),m=E.useRef(null),[p,b]=E.useState(gn),g=E.useRef(gn),y=E.useRef(!1),x=E.useRef(u),v=E.useRef(!1),[C,N]=E.useState(!1),S=E.useRef(null),M=$n(t,w),T=Aa({mounted:o,open:u}),I=Uo(w,!1,!1),D=!u&&!o,A=C?"idle":c,_=u&&(x.current||v.current),P=!u&&o&&m.current==="css-animation"&&p.height===void 0&&p.width===void 0?g.current:p,W=n&&D&&m.current!=="css-animation",F=fe((V,q=!0)=>{q&&(g.current=V),b(V)}),B=fe(()=>{var V;(V=S.current)==null||V.call(S),S.current=null}),$=fe(V=>{B(),S.current=()=>{S.current=null,V()}}),ie=fe(()=>{u&&o&&m.current==="css-animation"&&(v.current=!0)});pe(()=>{!C||c==="starting"||N(!1)},[C,c]),E.useEffect(()=>()=>{ie(),B()},[ie,B]),pe(()=>{const V=w.current;if(!V)return;!u&&S.current&&B();const q=oy(V,_);if(m.current=q,u&&c==="idle"&&x.current&&q==="css-animation"){g.current=Bt(V);return}if(u&&c==="starting"){const ee=y.current;if(y.current=!1,q==="none"){F(Bt(V)),N(!0);return}if(q==="css-transition"){const J=iy(V);if(F(Bt(V)),!ee)return J;const ge=bn(V,"transition-duration","0s");return $(ge),N(!0),J}if(q==="css-animation"){if(F(Bt(V)),!ee){bn(V,"animation-name","none")();return}const J=bn(V,"animation-name","none"),ge=bn(V,"animation-duration","0s");J(),$(ge),N(!0);return}}if(!u&&o&&(c==="idle"||c==="starting")){if(q==="none"){F(gn,!1),l(!1);return}q==="css-animation"&&(x.current=!1,v.current=!1),F(Bt(V));return}if(c!=="ending")return;if(q==="none"){l(!1);return}const H=Bt(V);if(!((H.height??0)>0||(H.width??0)>0)){l(!1);return}F(H),q==="css-animation"&&bn(V,"animation-name","none")()},[o,u,B,F,l,$,_,c]),Sf({enabled:u&&o&&A==="idle",open:!0,ref:w,onComplete(){u&&F(gn,!1)}}),E.useEffect(()=>{if(u||!o||A!=="ending"||!w.current)return;const q=new AbortController;let H=-1;function Q(){T.current.open||(l(!1),F(gn,!1))}return H=De.request(()=>{q.signal.aborted||I(Q,q.signal)}),()=>{De.cancel(H),q.abort()}},[T,o,u,A,I,F,l]),pe(()=>{const V=w.current;!V||!n||!D||V.setAttribute("hidden","until-found")},[D,n]),E.useEffect(function(){const q=w.current;if(!q)return;function H(Q){y.current=!0,d(!0),i(!0,Ae(en,Q))}return yr(q,"beforematch",H)},[i,d]);const U=s||n||o||u;return{height:P.height,props:{...W?{[ka.startingStyle]:""}:void 0,hidden:D,id:r},ref:M,shouldPreventOpenAnimation:_,shouldRender:U,transitionStatus:A,width:P.width}}function Bt(e){return{height:e.scrollHeight,width:e.scrollWidth}}function oy(e,t=!1){const n=Wn(e).getComputedStyle(e),r=(n.animationName.split(",").map(o=>o.trim()).some(o=>o!==""&&o!=="none")||t)&&wc(n.animationDuration),s=wc(n.transitionDuration);return r&&s?(process.env.NODE_ENV!=="production"&&ls("CSS transitions and CSS animations both detected on Collapsible or Accordion panel.","Only one of either animation type should be used."),"css-transition"):s?"css-transition":r?"css-animation":"none"}function wc(e){return e.split(",").map(t=>t.trim()).some(t=>t!==""&&Number.parseFloat(t)>0)}function bn(e,t,n){const r=e.style.getPropertyValue(t),s=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{if(r===""){e.style.removeProperty(t);return}e.style.setProperty(t,r,s)}}function iy(e){const t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(s=>{e.style.setProperty(s,"initial","important")});function n(){Object.entries(t).forEach(([s,o])=>{if(o===""){e.style.removeProperty(s);return}e.style.setProperty(s,o)})}const r=De.request(n);return()=>{De.cancel(r),n()}}let fc=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});const pc=E.forwardRef(function(t,n){const{className:r,hiddenUntilFound:s,keepMounted:o,render:i,id:u,style:l,...d}=t;process.env.NODE_ENV!=="production"&&pe(()=>{s&&o===!1&&ls("The `keepMounted={false}` prop on `Collapsible.Panel` is ignored when `hiddenUntilFound` is enabled, since the panel must remain mounted while closed.")},[s,o]);const{mounted:c,onOpenChange:w,open:m,panelId:p,setMounted:b,setPanelIdState:g,setOpen:y,state:x,transitionStatus:v}=ic(),C=s??!1,N=o??!1;pe(()=>{if(u)return g(u),()=>{g(void 0)}},[u,g]);const{height:S,props:M,ref:T,shouldPreventOpenAnimation:I,shouldRender:D,transitionStatus:A,width:_}=ay({externalRef:n,hiddenUntilFound:C,id:p,keepMounted:N,mounted:c,onOpenChange:w,open:m,setMounted:b,setOpen:y,transitionStatus:v}),P={...x,transitionStatus:A},W=$o(l,P),F=Ze("div",{...t,style:void 0},{state:P,ref:T,props:[M,{style:{[fc.collapsiblePanelHeight]:S===void 0?"auto":`${S}px`,[fc.collapsiblePanelWidth]:_===void 0?"auto":`${_}px`}},d,W?{style:W}:void 0,I?{style:{animationName:"none"}}:void 0],stateAttributesMapping:uc});return D?F:null});process.env.NODE_ENV!=="production"&&(pc.displayName="CollapsiblePanel");const uy=({children:e,Sidebar:t,className:n,defaultOpen:r=!0,open:s,onOpenChange:o,style:i})=>a.jsxs(Xl,{defaultOpen:r,open:s,onOpenChange:o,children:[a.jsxs(Zl,{variant:"sidebar",collapsible:"icon",className:h("wu-top-12 wu-h-[calc(100%-48px)] wu-shadow-sidebar wu-border-none",n),style:i,role:"complementary",children:[a.jsx(Rl,{className:"wu-py-2",children:a.jsx(hc,{})}),t]}),a.jsx(Ql,{className:"wu-contain-inline-size",children:e})]}),hc=e=>{const{state:t,isMobile:n,openMobile:r}=at();return a.jsx(Jl,{...e,children:a.jsx(va,{showMenu:n?r:t==="expanded"})})},ly=({className:e,children:t,...n})=>{const r=f.useRef(null),s=f.useRef(null),o=({currentTarget:u})=>{const{scrollTop:l,clientHeight:d,scrollHeight:c}=u;r.current&&r.current.classList.toggle("wu-border-[#1b338014]",l!==0),s.current&&s.current.classList.toggle("wu-border-[#1b338014]",l+d!==c)},i="wu-w-[calc(100%-16px)] wu-mx-auto wu-border-transparent";return a.jsxs(tc,{...n,className:h("wu-overflow-hidden wu-gap-0",e),children:[a.jsx("hr",{className:i,ref:r}),a.jsx(Wt,{onScroll:o,className:"wu-gap-2",thumbColor:"#b9c3dc",railColor:"#00000000","data-testid":"scroll-area",children:t}),a.jsx("hr",{className:i,ref:s})]})},cy=e=>a.jsx(ec,{...e,children:e.children}),dy=({label:e,children:t,...n})=>a.jsxs(nc,{...n,className:"wu-p-0",children:[a.jsx("div",{className:"wu-h-8",children:a.jsx(rc,{className:"wu-items-end wu-px-4 wu-text-xs wu-font-normal wu-leading-4 wu-text-blue-q",children:e})}),a.jsx(sc,{children:a.jsx(Ia,{children:t})})]}),wy=e=>a.jsx(Ia,{...e}),mc=({Icon:e,children:t,className:n,isActive:r,...s})=>{var w;const{state:o}=at(),[i,u]=f.useState(),l=Ea(),d=f.isValidElement(t)?f.cloneElement(t,{children:a.jsxs("div",{className:"wu-flex wu-items-center wu-overflow-hidden wu-text-base wu-truncate wu-text-ellipsis",children:[a.jsx("div",{className:"wu-relative wu-right-1",children:e}),a.jsx("span",{className:h("wu-text-sm wu-leading-4 wu-transition-opacity wu-duration-150",o==="collapsed"&&!l&&"wu-opacity-0"),children:(w=t.props)==null?void 0:w.children})]})}):t&&a.jsxs("div",{className:"wu-flex wu-items-center wu-overflow-hidden wu-text-base wu-truncate wu-text-ellipsis",children:[a.jsx("div",{className:"wu-relative wu-right-1",children:e}),a.jsx("span",{className:h("wu-text-sm wu-leading-4 wu-transition-opacity wu-duration-150",o==="collapsed"&&!l&&"wu-opacity-0"),children:t})]}),c=f.useRef(null);return f.useEffect(()=>{var m;u(((m=c.current)==null?void 0:m.textContent)||"")},[]),a.jsx(ac,{...s,className:"wu-flex wu-items-center wu-gap-2 wu-px-2",children:a.jsx(oc,{className:h("wu-flex wu-items-center wu-text-blue-q hover:wu-bg-blue-sidebarHover wu-cursor-pointer wu-h-8 wu-rounded-sm",n,r&&"wu-bg-white wu-shadow-[4px_4px_16px_0_#1B338014] wu-font-medium wu-text-blue-p hover:wu-bg-white wu-cursor-default"),isActive:r,tooltip:i,asChild:f.isValidElement(t),ref:c,children:d})})},fy=({Title:e,Icon:t,children:n,className:r,...s})=>{const{state:o}=at(),i=Ea();return a.jsxs(lc,{children:[a.jsx(dc,{render:u=>{const l="data-panel-open"in u;return a.jsxs(mc,{Icon:t,...u,children:[e,(o==="expanded"||i)&&a.jsx(Oe,{icon:"wm-arrow-forward-ios",className:h("wu-absolute wu-right-4 wu-transition-transform wu-duration-300",l&&"wu-rotate-90","wu-scale-75")})]})}}),a.jsx(pc,{className:h(o==="collapsed"?"":"wu-pl-2","wu-h-[var(--collapsible-panel-height)] wu-overflow-hidden","wu-transition-all wu-duration-300 wu-ease-in-out","data-[starting-style]:wu-h-0 data-[ending-style]:wu-h-0",'[&[hidden]:not([hidden="until-found"])]:wu-hidden',r),...s,children:n})]})},py=new Map([[-3,{top:-20,left:-4,zIndex:-1,opacity:0,transition:"all 0.3s ease-in-out, z-index 0s",position:"absolute"}],[-2,{top:0,left:0,zIndex:1,opacity:1,transition:"all 0.3s ease-in-out, z-index 0s",position:"absolute"}],[-1,{top:20,left:4,zIndex:2,opacity:1,transition:"all 0.3s ease-in-out, z-index 0s",position:"absolute"}],[0,{top:40,left:8,zIndex:3,opacity:1,transition:"all 0.3s ease-in-out, z-index 0.10s",position:"absolute"}],[1,{left:12,zIndex:4,opacity:1,transition:"all 0.3s ease-in-out, z-index 0.3s 0.10s",position:"absolute"}],[2,{left:16,zIndex:5,opacity:1,transition:"all 0.3s ease-in-out, z-index 0.3s 0.10s",position:"absolute"}],[3,{left:20,zIndex:-1,opacity:0,transition:"all 0.3s ease-in-out, z-index 0.3s 0.10s",position:"absolute"}]]),_a=(e,t,n=1)=>{const r=e.match(/hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*(?:,\s*([\d.]+)\s*)?\)/);if(!r)throw new Error("Invalid HSL color format");const s=parseFloat(r[1]),o=parseFloat(r[2]),i=Math.max(0,parseFloat(r[3])+t);return`hsl(${s} ${o}% ${i}% / ${n})`},hy=({index:e,viewIndex:t,length:n,itemHeight:r})=>{const s=(e-t+n)%n;let o;s===0?o=0:s===n-1&&n>=2?o=-1:s===n-2&&n>=3?o=-2:s===1?o=1:s===2?o=2:s===n-3&&n>=4?o=-3:o=3;const i=py.get(o)||{},u=o>0?r+28+(o-1)*20:i.top;return{position:o,styles:{...i,...o>0&&{top:`${u}px`},height:o>0?"32px":r}}},yn={LIGHTNESS_STEP:8,BORDER_LIGHTNESS:10,CONTENT_HEIGHT:"calc(100% - 2rem)",FONT_SIZE_ACTIVE:"14px",FONT_SIZE_INACTIVE:"12px"},my=({children:e,className:t,header:n,baseColor:r,position:s=0,style:o,...i})=>{const u=s<=0,l=s===0,d={border:l?`4px solid ${_a(r,yn.BORDER_LIGHTNESS)}`:"",...o},c={backgroundColor:_a(r,s*yn.LIGHTNESS_STEP),fontSize:l?yn.FONT_SIZE_ACTIVE:yn.FONT_SIZE_INACTIVE,transition:"all 0.3s ease",position:"relative",bottom:s<0?"4px":"0px",height:"32px",padding:"4px 8px"},w={backgroundColor:_a(r,45+s*6),height:yn.CONTENT_HEIGHT,position:"relative",bottom:s<0?"4px":"0px"};return a.jsxs("div",{className:h("wu-font-normal wu-transition-all wu-rounded-lg wu-overflow-hidden wu-w-full wu-cursor-pointer hover:-wu-translate-y-2",t),style:d,...i,children:[a.jsx("div",{style:c,className:"wu-text-white",children:n}),u&&a.jsx("div",{className:"wu-p-2 wu-overflow-y-auto wu-text-sm",style:w,children:e})]})},gy=({children:e,Trigger:t,Header:n,styles:r={},classNames:s={},open:o,onOpenChange:i,itemHeight:u})=>{const l={height:u,...r.Trigger};return a.jsxs(Ml,{open:o,onOpenChange:i,children:[a.jsx(kl,{className:h("wu-bg-gray-25 wu-z-0 wu-w-full wu-rounded-lg wu-rounded-tl-none wu-relative",s.Trigger),style:l,children:a.jsx("span",{className:"wu-absolute wu-text-xs wu-font-medium wu-bg-gray-25 -wu-top-6 wu-left-0 wu-p-1 wu-rounded-t-lg",children:t})}),a.jsxs(xa,{className:h("wu-top-[50%] wu-left-[50%] wu-bg-black/75 wu-backdrop-blur-[4px] wu-min-h-full wu-overflow-auto wu-shadow-none wu-max-w-none wu-border-none wu-text-white",s.Content),hideCloseButton:!0,isStackedCard:!0,style:r.Content,children:[a.jsx(Sa,{}),a.jsx(to.DialogClose,{className:h("wu-absolute wu-right-2 wu-top-2 wu-w-8 wu-h-8 wu-flex wu-items-center wu-justify-center wu-z-10",s.CloseButton),style:r.CloseButton,"aria-label":"Close dialog",children:a.jsx(Oe,{icon:"wm-close",className:"wu-text-lg wu-m-4 wu-cursor-pointer"})}),n&&a.jsx(Na,{className:h("wu-h-12 wu-p-2 wu-pl-4 wu-bg-white/25 wu-backdrop-blur-[24px]",s.Header),style:r.Header,children:n}),e]})]})};function by(){const[,e]=E.useState({});return E.useCallback(()=>{e({})},[])}const gc={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},yy={...gc,position:"fixed",top:0,left:0},vy={...gc,position:"absolute"},Pa=E.createContext(void 0);process.env.NODE_ENV!=="production"&&(Pa.displayName="NumberFieldRootContext");function vr(){const e=E.useContext(Pa);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: NumberFieldRootContext is missing. NumberField parts must be placed within <NumberField.Root>.":Zt(43));return e}const vn={inputValue:()=>null,value:()=>null,...ts},bc=new Map;function xn(e,t){const n=JSON.stringify({locale:e,options:t}),r=bc.get(n);if(r)return r;const s=new Intl.NumberFormat(e,t);return bc.set(n,s),s}function $t(e,t,n){return e==null?"":xn(t,n).format(e)}function yc(e,t,n){return $t(e,t,{...n,maximumFractionDigits:20})}const xy=["零","〇","一","二","三","四","五","六","七","八","九"],Ny={零:"0","〇":"0",一:"1",二:"2",三:"3",四:"4",五:"5",六:"6",七:"7",八:"8",九:"9"},vc=["٠","١","٢","٣","٤","٥","٦","٧","٨","٩"],xc=["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"],Va=["0","1","2","3","4","5","6","7","8","9"],Nc=["%","٪","%","﹪"],Sc=["‰","؉"],Cc=["−","-","‒","–","—","﹣"],Tc=["+","﹢"],Sy=".",Cy=",",Ty=new RegExp(`[${vc.join("")}]`,"g"),Ey=new RegExp(`[${xc.join("")}]`,"g"),Iy=new RegExp(`[${Va.join("")}]`,"g"),My=new RegExp(`[${xy.join("")}]`,"g"),ky=new RegExp(`[${Nc.join("")}]`),Dy=new RegExp(`[${Sc.join("")}]`),Oa=/[٠١٢٣٤٥٦٧٨٩]/,La=/[۰۱۲۳۴۵۶۷۸۹]/,Fa=/[零〇一二三四五六七八九]/,Ec=new RegExp(`[${Va.join("")}]`),Ay=[".",",",Sy,Cy,"٫","٬"],Ic=new RegExp("\\p{Zs}","u"),_y=["+",...Tc],Py=["-",...Cc],xr=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Vy=e=>e.replace(/[-\\\]^]/g,t=>`\\${t}`),Mc=e=>`[${e.map(Vy).join("")}]`,kc=Mc(["-"].concat(Cc)),Dc=Mc(["+"].concat(Tc)),Ac=new RegExp(kc,"gu"),_c=new RegExp(Dc,"gu"),Nn=new RegExp(kc),Nr=new RegExp(Dc);function Wa(e,t){const n=xn(e,t).formatToParts(11111.1),r={};return n.forEach(s=>{r[s.type]=s.value}),xn(e).formatToParts(.1).forEach(s=>{s.type==="decimal"&&(r[s.type]=s.value)}),r}function Sn(e,t,n){if(e==null)return null;let r=String(e).replace(new RegExp("\\p{Cf}","gu"),"").trim();r=r.replace(Ac,"-").replace(_c,"+");let s=!1;const o=r.match(/([+-])\s*$/);o&&(o[1]==="-"&&(s=!0),r=r.replace(/([+-])\s*$/,""));const i=r.match(/^\s*([+-])/);i&&(i[1]==="-"&&(s=!0),r=r.replace(/^\s*[+-]/,""));let u=t;u===void 0&&(Oa.test(r)||La.test(r)?u="ar":Fa.test(r)&&(u="zh"));const{group:l,decimal:d,currency:c}=Wa(u,n),w=xn(u,n).formatToParts(1).filter(T=>T.type==="unit").map(T=>xr(T.value)),m=w.length?new RegExp(w.join("|"),"g"):null;let p=null;l&&(new RegExp("\\p{Zs}","u").test(l)?p=new RegExp("\\p{Zs}","gu"):l==="'"||l==="’"?p=/['’]/g:p=new RegExp(xr(l),"g"));let g=[{regex:l?p:null,replacement:""},{regex:d?new RegExp(xr(d),"g"):null,replacement:"."},{regex:/./g,replacement:"."},{regex:/,/g,replacement:""},{regex:/٫/g,replacement:"."},{regex:/٬/g,replacement:""},{regex:c?new RegExp(xr(c),"g"):null,replacement:""},{regex:m,replacement:""},{regex:Ty,replacement:T=>String(vc.indexOf(T))},{regex:Ey,replacement:T=>String(xc.indexOf(T))},{regex:Iy,replacement:T=>String(Va.indexOf(T))},{regex:My,replacement:T=>Ny[T]}].reduce((T,{regex:I,replacement:D})=>I?T.replace(I,D):T,r);const y=g.lastIndexOf(".");if(y!==-1&&(g=`${g.slice(0,y).replace(/\./g,"")}.${g.slice(y+1).replace(/\./g,"")}`),/^[-+]?Infinity$/i.test(r)||/[∞]/.test(r))return null;const x=(s?"-":"")+g;let v=parseFloat(x);const C=n==null?void 0:n.style,N=C==="unit"&&(n==null?void 0:n.unit)==="percent",S=ky.test(e)||C==="percent";return Dy.test(e)?v/=1e3:!N&&S&&(v/=100),Number.isNaN(v)?null:v}const Oy=60,Ly=400,Fy=8,Sr=1;function Wy(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const By=1e-10;function $y(e){const t=xn("en-US").resolvedOptions(),n=(e==null?void 0:e.minimumFractionDigits)??t.minimumFractionDigits??0;return{maximumFractionDigits:Math.max((e==null?void 0:e.maximumFractionDigits)??t.maximumFractionDigits??20,n),minimumFractionDigits:n}}function qy(e,t){if(!Number.isFinite(e))return e;const n=Math.min(Math.max(t,0),20);return Number(e.toFixed(n))}function Ba(e,t){const{maximumFractionDigits:n}=$y(t);return qy(e,n)}function Hy(e,t,n,r="directional"){if(n===0)return e;const s=Math.abs(n),o=Math.sign(n),i=s*By*o,u=r==="nearest"?n:s,l=(e-t+i)/u;let d;return r==="nearest"?d=Math.round(l):o>0?d=Math.floor(l):d=Math.ceil(l),t+d*(r==="nearest"?n:s)}function zy(e,{step:t,minWithDefault:n,maxWithDefault:r,minWithZeroDefault:s,format:o,snapOnStep:i,small:u,clamp:l}){if(e===null)return e;const d=l?Wy(e,n,r):e;if(t!=null&&i){if(t===0)return Ba(d,o);let c=s;!u&&n!==Number.MIN_SAFE_INTEGER&&(c=n);const w=Hy(d,c,t,u?"nearest":"directional");return Ba(w,o)}return Ba(d,o)}const Pc=E.forwardRef(function(t,n){const{id:r,min:s,max:o,smallStep:i=.1,step:u=1,largeStep:l=10,required:d=!1,disabled:c=!1,readOnly:w=!1,form:m,name:p,defaultValue:b,value:g,onValueChange:y,onValueCommitted:x,allowWheelScrub:v=!1,snapOnStep:C=!1,allowOutOfRange:N=!1,format:S,locale:M,render:T,className:I,inputRef:D,style:A,..._}=t,{setDirty:P,validityData:W,disabled:F,setFilled:B,invalid:$,name:ie,state:U,validation:V,shouldValidateOnChange:q}=Vn(),H=F||c,Q=ie??p,ee=u==="any"?1:u,[J,ge]=E.useState(!1),K=s??Number.MIN_SAFE_INTEGER,O=o??Number.MAX_SAFE_INTEGER,j=s??0,Y=S==null?void 0:S.style,Z=E.useRef(null),G=$n(D,V.inputRef),X=Vo({id:r}),[he,le]=ws({controlled:g,default:b,name:"NumberField",state:"value"}),ne=he??null,xe=Aa(ne);pe(()=>{B(ne!==null)},[B,ne]);const Pe=by(),Ge=Aa(S),qt=E.useRef(!1),Pr=fe((te,R)=>{qt.current=!1,x==null||x(te,R)}),vt=E.useRef(!0),Vr=E.useRef(null),[xt,Nt]=E.useState(()=>g!==void 0?Vc(ne,M,S):$t(ne,M,S)),[Mn,Ht]=E.useState("numeric"),ce=fe(()=>{const{decimal:te,group:R,currency:ye,literal:ve}=Wa(M,S),ae=new Set;Ay.forEach(Ce=>ae.add(Ce)),te&&ae.add(te),R&&(ae.add(R),Ic.test(R)&&ae.add(" "));const Ut=Y==="percent"||Y==="unit"&&(S==null?void 0:S.unit)==="percent",Ke=Y==="percent"||Y==="unit"&&(S==null?void 0:S.unit)==="permille";return Ut&&Nc.forEach(Ce=>ae.add(Ce)),Ke&&Sc.forEach(Ce=>ae.add(Ce)),Y==="currency"&&ye&&ae.add(ye),ve&&(Array.from(ve).forEach(Ce=>ae.add(Ce)),Ic.test(ve)&&ae.add(" ")),_y.forEach(Ce=>ae.add(Ce)),K<0&&Py.forEach(Ce=>ae.add(Ce)),ae}),Ue=fe(te=>te!=null&&te.altKey?i:te!=null&&te.shiftKey?l:ee),zt=fe((te,R)=>{const ye=R.event,ve=R.direction,ae=R.reason,Ut=!N||!(ae===fs||ae===jn||ae===ps||ae===tn||ae===en),Ke=zy(te,{step:ve?Ue(ye)*ve:void 0,format:Ge.current,minWithDefault:K,maxWithDefault:O,minWithZeroDefault:j,snapOnStep:C,small:(ye==null?void 0:ye.altKey)??!1,clamp:Ut}),Ce=R.reason===fs||R.reason===tn||R.reason===jn||R.reason===ps||R.reason===en,Qa=Ke!==ne||Ce&&(te!==ne||vt.current===!1);if(Qa){if(Vr.current=Ke,y==null||y(Ke,R),R.isCanceled)return Qa;le(Ke),P(Ke!==W.initialValue),qt.current=!0}return vt.current&&Nt($t(Ke,M,S)),Pe(),Qa}),Or=fe((te,{direction:R,currentValue:ye,event:ve,reason:ae})=>{const Ut=ye??xe.current,Ke=typeof Ut=="number"?Ut+te*R:Math.max(0,s??0);return zt(Ke,Ae(ae,ve,void 0,{direction:R}))});pe(function(){if(!vt.current)return;const R=g!==void 0?Vc(ne,M,S):$t(ne,M,S);R!==xt&&Nt(R)}),pe(function(){if(!Zw)return;let R="text";K>=0&&(R="decimal"),Ht(R)},[K,Y]),E.useEffect(function(){const R=Z.current;if(H||w||!v||!R)return;function ye(ve){if(ve.ctrlKey||Lo(Oo(Z.current))!==Z.current)return;ve.preventDefault(),vt.current=!0;const ae=Ue(ve)??Sr;Or(ae,{direction:ve.deltaY>0?-1:1,event:ve,reason:"wheel"})}return yr(R,"wheel",ye)},[v,Or,H,w,Ue]);const Ja=E.useMemo(()=>({...U,disabled:H,readOnly:w,required:d,value:ne,inputValue:xt,scrubbing:J}),[U,H,w,d,ne,xt,J]),Kv=E.useMemo(()=>({inputRef:Z,inputValue:xt,value:ne,minWithDefault:K,maxWithDefault:O,disabled:H,readOnly:w,id:X,setValue:zt,incrementValue:Or,getStepAmount:Ue,allowInputSyncRef:vt,formatOptionsRef:Ge,valueRef:xe,lastChangedValueRef:Vr,hasPendingCommitRef:qt,name:Q,required:d,invalid:$,inputMode:Mn,getAllowedNonNumericKeys:ce,min:s,max:o,setInputValue:Nt,locale:M,isScrubbing:J,setIsScrubbing:ge,state:Ja,onValueCommitted:Pr}),[Z,xt,ne,K,O,H,w,X,zt,Or,Ue,Ge,xe,Q,d,$,Mn,ce,s,o,Nt,M,J,Ja,Pr]),Yv=Ze("div",t,{ref:n,state:Ja,props:_,stateAttributesMapping:vn});return a.jsxs(Pa.Provider,{value:Kv,children:[Yv,a.jsx("input",{...V.getInputValidationProps({onFocus(){var te;(te=Z.current)==null||te.focus()},onChange(te){var ae;if(te.nativeEvent.defaultPrevented||H||w){(ae=te.preventBaseUIHandler)==null||ae.call(te);return}const R=te.currentTarget.valueAsNumber,ye=Number.isNaN(R)?null:R,ve=Ae(en,te.nativeEvent);P(ye!==W.initialValue),zt(ye,ve),q()&&V.commit(ye)}}),ref:G,type:"number",form:m,name:Q,value:ne??"",min:s,max:o,step:u,disabled:H,required:d,"aria-hidden":!0,tabIndex:-1,style:Q?vy:yy,suppressHydrationWarning:!0})]})});process.env.NODE_ENV!=="production"&&(Pc.displayName="NumberFieldRoot");function Vc(e,t,n){return(n==null?void 0:n.maximumFractionDigits)!=null||(n==null?void 0:n.minimumFractionDigits)!=null?$t(e,t,n):yc(e,t,n)}const Oc=E.forwardRef(function(t,n){const{render:r,className:s,style:o,...i}=t,{state:u}=vr();return Ze("div",t,{ref:n,state:u,props:[{role:"group"},i],stateAttributesMapping:vn})});process.env.NODE_ENV!=="production"&&(Oc.displayName="NumberFieldGroup");const Lc=0;class $a extends qn{constructor(){super(...arguments);Te(this,"clear",()=>{this.currentId!==Lc&&(clearInterval(this.currentId),this.currentId=Lc)})}static create(){return new $a}start(n,r){this.clear(),this.currentId=setInterval(()=>{r()},n)}}function Uy(){const e=Qe($a.create).current;return cs(e.disposeEffect),e}const jy=60,Gy=400,Ky=8,Yy=50,Xy=3;function Cn(e){return e==="touch"||e==="pen"}function Zy(e){const{disabled:t,readOnly:n=!1,tick:r,onStop:s,tickDelay:o=jy,startDelay:i=Gy,scrollDistance:u=Ky,elementRef:l}=e,d=qo(),c=Uy(),w=qo(),m=E.useRef(!1),p=E.useRef(0),b=E.useRef({x:0,y:0}),g=E.useRef(!1),y=E.useRef(!1),x=E.useRef(""),v=E.useRef(()=>{}),C=fe(()=>{w.clear(),d.clear(),c.clear(),v.current(),p.current=0});function N(T){C();const I=l.current;if(!I)return;const D=Wn(I);function A(_){_.preventDefault()}if(v.current=yr(D,"contextmenu",A),yr(D,"pointerup",_=>{m.current=!1,C(),s==null||s(_)},{once:!0}),!r(T)){C();return}d.start(i,()=>{c.start(o,()=>{r(T)||C()})})}E.useEffect(()=>()=>C(),[C]);const S={onTouchStart(){g.current=!0},onTouchEnd(){g.current=!1},onPointerDown(T){const I=!T.button||T.button===0;if(T.defaultPrevented||!I||t||n)return;x.current=T.pointerType,y.current=!1,m.current=!0,b.current={x:T.clientX,y:T.clientY},Cn(T.pointerType)?w.start(Yy,()=>{const A=p.current;p.current=0,m.current&&A<Xy?(N(T.nativeEvent),y.current=!0):(y.current=!1,C())}):(T.preventDefault(),N(T.nativeEvent))},onPointerUp(T){Cn(T.pointerType)&&(m.current=!1)},onPointerMove(T){if(t||n||!Cn(T.pointerType)||!m.current)return;p.current!=null&&(p.current+=1);const{x:I,y:D}=b.current,A=I-T.clientX,_=D-T.clientY;A**2+_**2>u**2&&C()},onMouseEnter(T){T.defaultPrevented||t||n||!m.current||g.current||Cn(x.current)||N(T.nativeEvent)},onMouseLeave(){g.current||C()},onMouseUp(){g.current||C()}},M=fe(T=>T.defaultPrevented?!0:Cn(x.current)?y.current:T.detail!==0);return{pointerHandlers:S,shouldSkipClick:M}}function Jy(e){return e==="touch"||e==="pen"}function Fc(e){const{allowInputSyncRef:t,disabled:n,formatOptionsRef:r,getStepAmount:s,id:o,incrementValue:i,inputRef:u,inputValue:l,isIncrement:d,locale:c,readOnly:w,setValue:m,valueRef:p,lastChangedValueRef:b,onValueCommitted:g}=e,y=d?Ef:If;function x(S){t.current=!0;const M=Sn(l,c,r.current);M!==null&&(p.current=M,m(M,Ae(y,S,void 0,{direction:d?1:-1})))}const{pointerHandlers:v,shouldSkipClick:C}=Zy({disabled:n||w,elementRef:u,tickDelay:Oy,startDelay:Ly,scrollDistance:Fy,tick(S){const M=s(S)??Sr;return i(M,{direction:d?1:-1,event:S,reason:y})},onStop(S){const M=b.current??p.current;g(M,rn(y,S))}});return{disabled:n,"aria-readonly":w||void 0,"aria-label":d?"Increase":"Decrease","aria-controls":o,tabIndex:-1,style:{WebkitUserSelect:"none",userSelect:"none"},...v,onClick(S){const M=n||w;if(S.defaultPrevented||M||C(S))return;x(S.nativeEvent);const T=s(S)??Sr,I=p.current;i(T,{direction:d?1:-1,event:S.nativeEvent,reason:y});const D=b.current??p.current;D!==I&&g(D,rn(y,S.nativeEvent))},onPointerDown(S){var T;const M=!S.button||S.button===0;S.defaultPrevented||w||!M||n||(x(S.nativeEvent),Jy(S.pointerType)||(T=u.current)==null||T.focus(),v.onPointerDown(S))}}}const Wc=E.forwardRef(function(t,n){const{render:r,className:s,disabled:o=!1,nativeButton:i=!0,style:u,...l}=t,{allowInputSyncRef:d,disabled:c,formatOptionsRef:w,getStepAmount:m,id:p,incrementValue:b,inputRef:g,inputValue:y,locale:x,maxWithDefault:v,readOnly:C,setValue:N,state:S,value:M,valueRef:T,lastChangedValueRef:I,onValueCommitted:D}=vr(),A=M!=null&&M>=v,_=o||c||A,P=Fc({isIncrement:!0,inputRef:g,inputValue:y,disabled:_,readOnly:C,id:p,setValue:N,getStepAmount:m,incrementValue:b,allowInputSyncRef:d,formatOptionsRef:w,valueRef:T,locale:x,lastChangedValueRef:I,onValueCommitted:D}),{getButtonProps:W,buttonRef:F}=Da({disabled:_,native:i,focusableWhenDisabled:!0}),B=E.useMemo(()=>({...S,disabled:_}),[S,_]);return Ze("button",t,{ref:[n,F],state:B,props:[P,l,W],stateAttributesMapping:vn})});process.env.NODE_ENV!=="production"&&(Wc.displayName="NumberFieldIncrement");const Bc=E.forwardRef(function(t,n){const{render:r,className:s,disabled:o=!1,nativeButton:i=!0,style:u,...l}=t,{allowInputSyncRef:d,disabled:c,formatOptionsRef:w,getStepAmount:m,id:p,incrementValue:b,inputRef:g,inputValue:y,minWithDefault:x,readOnly:v,setValue:C,state:N,value:S,valueRef:M,locale:T,lastChangedValueRef:I,onValueCommitted:D}=vr(),A=S!=null&&S<=x,_=o||c||A,P=Fc({isIncrement:!1,inputRef:g,inputValue:y,disabled:_,readOnly:v,id:p,setValue:C,getStepAmount:m,incrementValue:b,allowInputSyncRef:d,formatOptionsRef:w,valueRef:M,locale:T,lastChangedValueRef:I,onValueCommitted:D}),{getButtonProps:W,buttonRef:F}=Da({disabled:_,native:i,focusableWhenDisabled:!0}),B=E.useMemo(()=>({...N,disabled:_}),[N,_]);return Ze("button",t,{ref:[n,F],state:B,props:[P,l,W],stateAttributesMapping:vn})});process.env.NODE_ENV!=="production"&&(Bc.displayName="NumberFieldDecrement");function Qy(e,t){const n=E.useRef(e),r=fe(t);pe(()=>{n.current!==e&&r(n.current)},[e,r]),pe(()=>{n.current=e},[e])}const Ry={...ts,...vn},ev=new Set(["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Enter","Escape"]),$c=E.forwardRef(function(t,n){const{render:r,className:s,style:o,...i}=t,{allowInputSyncRef:u,disabled:l,formatOptionsRef:d,getAllowedNonNumericKeys:c,getStepAmount:w,id:m,incrementValue:p,inputMode:b,inputValue:g,max:y,min:x,name:v,readOnly:C,required:N,setValue:S,state:M,setInputValue:T,locale:I,inputRef:D,value:A,onValueCommitted:_,lastChangedValueRef:P,hasPendingCommitRef:W,valueRef:F}=vr(),{clearErrors:B}=Bw(),{validationMode:$,setTouched:ie,setFocused:U,invalid:V,shouldValidateOnChange:q,validation:H}=Vn(),{labelId:Q}=os(),ee=E.useRef(!1),J=E.useRef(!1);return Go(D,m,A),Qy(A,O=>{const j=q();if(B(v),j&&H.commit(A),!(O===A||j)){if(J.current){J.current=!1;return}H.commit(A,!0)}}),Ze("input",t,{ref:[n,D],state:M,props:[{id:m,required:N,disabled:l,readOnly:C,inputMode:b,value:g,type:"text",autoComplete:"off",autoCorrect:"off",spellCheck:"false","aria-roledescription":"Number field","aria-invalid":V||void 0,"aria-labelledby":Q,suppressHydrationWarning:!0,onFocus(O){if(O.defaultPrevented||C||l||(U(!0),ee.current))return;ee.current=!0;const j=O.currentTarget,Y=j.value.length;j.setSelectionRange(Y,Y)},onBlur(O){if(O.defaultPrevented||C||l)return;ie(!0),U(!1);const j=!u.current,Y=W.current;if(u.current=!0,g.trim()===""){S(null,Ae(tn,O.nativeEvent)),$==="onBlur"&&H.commit(null),_(null,rn(tn,O.nativeEvent));return}const Z=d.current,G=Sn(g,I,Z);if(G===null)return;const X=(Z==null?void 0:Z.maximumFractionDigits)!=null||(Z==null?void 0:Z.minimumFractionDigits)!=null,he=Z==null?void 0:Z.maximumFractionDigits,le=X&&typeof he=="number"?Number(G.toFixed(he)):G,ne=rn(jn,O.nativeEvent),xe=A!==le,Pe=j||xe||Y;$==="onBlur"&&H.commit(le),xe&&(J.current=!0,S(le,Ae(jn,O.nativeEvent))),Pe&&_(le,ne);const Ge=$t(le,I,Z);!(!X&&G===A&&g===yc(G,I,Z))&&g!==Ge&&T(Ge)},onChange(O){if(O.nativeEvent.defaultPrevented)return;u.current=!1;const j=O.currentTarget.value;if(j.trim()===""){T(j),S(null,Ae(tn,O.nativeEvent));return}const Y=c();if(!Array.from(j).every(X=>{const he=X>="0"&&X<="9",le=Oa.test(X),ne=Fa.test(X),xe=La.test(X),Pe=Ec.test(X),Ge=Nn.test(X);return he||le||ne||xe||Pe||Ge||Y.has(X)}))return;const G=Sn(j,I,d.current);T(j),G!==null&&S(G,Ae(fs,O.nativeEvent))},onKeyDown(O){if(O.defaultPrevented||C||l)return;const j=O.nativeEvent;u.current=!0;const Y=c();let Z=Y.has(O.key);const{decimal:G,currency:X,percentSign:he}=Wa(I,d.current),le=O.currentTarget.selectionStart,ne=O.currentTarget.selectionEnd,xe=le===0&&ne===g.length,Pe=ce=>le!=null&&ne!=null&&ce>=le&&ce<ne;if(Nn.test(O.key)&&Array.from(Y).some(ce=>Nn.test(ce||""))){const ce=g.search(Ac),Ue=ce!=null&&ce!==-1&&Pe(ce);Z=!(Nn.test(g)||Nr.test(g))||xe||Ue}if(Nr.test(O.key)&&Array.from(Y).some(ce=>Nr.test(ce||""))){const ce=g.search(_c),Ue=ce!=null&&ce!==-1&&Pe(ce);Z=!(Nn.test(g)||Nr.test(g))||xe||Ue}[G,X,he].forEach(ce=>{if(O.key===ce){const Ue=g.indexOf(ce),zt=Pe(Ue);Z=!g.includes(ce)||xe||zt}});const Ge=O.key>="0"&&O.key<="9",qt=Oa.test(O.key),Pr=Fa.test(O.key),vt=La.test(O.key),Vr=Ec.test(O.key),xt=ev.has(O.key);if(O.which===229||O.altKey||O.ctrlKey||O.metaKey||Z||Ge||qt||Vr||Pr||vt||xt)return;const Nt=Sn(g,I,d.current),Mn=w(O)??Sr;ef(O);const Ht=rn(nn,j);O.key==="ArrowUp"?(p(Mn,{direction:1,currentValue:Nt,event:j,reason:nn}),_(P.current??F.current,Ht)):O.key==="ArrowDown"?(p(Mn,{direction:-1,currentValue:Nt,event:j,reason:nn}),_(P.current??F.current,Ht)):O.key==="Home"&&x!=null?(S(x,Ae(nn,j)),_(P.current??F.current,Ht)):O.key==="End"&&y!=null&&(S(y,Ae(nn,j)),_(P.current??F.current,Ht))},onPaste(O){if(O.defaultPrevented||C||l)return;O.preventDefault();const Y=(O.clipboardData||window.Clipboard).getData("text/plain"),Z=Sn(Y,I,d.current);Z!==null&&(u.current=!1,S(Z,Ae(ps,O.nativeEvent)),T(Y))}},H.getValidationProps(),i],stateAttributesMapping:Ry})});process.env.NODE_ENV!=="production"&&($c.displayName="NumberFieldInput");const tv={wuStepper:"_wuStepper_apbnq_1"},nv=({onChange:e,Label:t,defaultValue:n=0,readonly:r,dir:s,step:o=1,min:i,max:u,value:l,className:d,labelPosition:c="left",disabled:w,resetInvalidValueOnBlur:m=!0,...p})=>{const b=E.useId(),[g,y]=E.useState(l!==void 0?Number(l):n||0);E.useEffect(()=>{l!==void 0&&y(Number(l))},[l]);const x=T=>{y(T),e==null||e(T)},v=T=>{const I=Number(T.target.value);Number.isNaN(I)||y(I)},C=()=>{m&&(i!==void 0&&g<i?(y(i),e==null||e(i)):u!==void 0&&g>u&&(y(u),e==null||e(u)))};E.useEffect(()=>{l&&n&&console.warn("As both value and defaultValue are passed, value will be used")},[l,n]);const N={inc:r||u!==void 0&&g>=u||w,dec:r||i!==void 0&&g<=i||w},S=i!==void 0&&g<i||u!==void 0&&g>u,M=h("wu-flex wu-items-center wu-justify-center wu-rounded-none wu-bg-gray-10 wu-w-8 wu-h-8 wu-text-blue-q wu-p-2 wu-absolute wu-top-0 hover:wu-bg-gray-20","disabled:wu-cursor-not-allowed disabled:wu-bg-black/10 disabled:wu-text-gray-subtle disabled:wu-outline-gray-subtle");return a.jsxs(Pc,{id:b,value:g,step:o,readOnly:r,onValueChange:T=>typeof T=="number"&&x(T),dir:s,className:h("wu-flex wu-stepper",s==="rtl"&&c!=="top"&&"wu-gap-2",tv.wuStepper,rv({labelPosition:c}),d),children:[t&&a.jsx(Me,{htmlFor:b,className:"wu-input-label",children:t}),a.jsxs(Oc,{className:"wu-flex wu-max-w-[97px] wu-relative",children:[a.jsx(Bc,{"aria-label":"decrement",className:h(M,s==="rtl"?"wu-right-0":"wu-left-0","wu-stepper-button"),disabled:N.dec,children:a.jsx("span",{className:"wu-text-base wm-minimize"})}),a.jsx($c,{"aria-label":"stepper",role:"spinbutton",type:"text","aria-invalid":S||void 0,dir:s,className:h("wu-flex wu-w-[97px] wu-h-8 wu-border-b wu-border-gray-subtle wu-bg-gray-10 wu-p-2 wu-text-sm wu-font-normal wu-text-gray-lead","wu-h-[33px] wu-text-center wu-text-blue-q wu-text-xs wu-rounded-t-sm ","focus:wu-border-blue-p focus-visible:wu-outline-none wu-transition-colors hover:wu-border-gray-40","disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle","read-only:wu-cursor-not-allowed read-only:wu-bg-gray-20 read-only:wu-border-gray-40 read-only:wu-text-gray-subtle",S&&"wu-border-red-deep focus:wu-border-red-deep","wu-stepper-input"),readOnly:r,onChange:v,onBlur:C,disabled:w,min:i,max:u,step:o,value:g,...p}),a.jsx(Wc,{"aria-label":"increment",className:h(M,s==="rtl"?"wu-left-0":"wu-right-0","wu-stepper-button"),disabled:N.inc,children:a.jsx("span",{className:"wu-text-base wm-add"})})]})]})},rv=Be.cva("wu-flex wu-w-fit",{variants:{labelPosition:{left:"wu-flex-row wu-text-right wu-gap-2 wu-items-center",top:"wu-flex-col"}}}),We={container:"_container_1cpdq_1",sidebar:"_sidebar_1cpdq_5",content:"_content_1cpdq_13",sourceWrapper:"_sourceWrapper_1cpdq_17",list:"_list_1cpdq_25",listItem:"_listItem_1cpdq_29",listItemActive:"_listItemActive_1cpdq_42",label:"_label_1cpdq_46",icon:"_icon_1cpdq_50",sharedWrapper:"_sharedWrapper_1cpdq_54"},qc=f.memo(({className:e,label:t="Shared surveys",...n})=>a.jsxs("button",{className:h(We.sharedWrapper,e),"data-slot":"survey-select-shared","aria-label":t,...n,children:[a.jsx("span",{className:"wm-share","aria-hidden":"true"}),a.jsx("span",{children:t})]}));qc.displayName="WuSharedSurvey";const sv=(e,t=!1)=>{if(e)return a.jsx("span",{className:We.icon,"aria-hidden":"true",children:e});const n=t?"wm-folder-supervised":"wm-folder";return a.jsx("span",{className:h(We.icon,n),"aria-hidden":"true"})},Hc=f.memo(({children:e,icon:t,isActive:n,isShared:r,className:s,...o})=>a.jsxs("button",{className:h(We.listItem,n&&We.listItemActive,s),"aria-selected":n,"data-slot":"survey-select-item",type:"button",...o,children:[sv(t,r),a.jsx("span",{className:We.label,children:e})]}));Hc.displayName="WuSurveyItem";const zc=f.memo(({children:e,className:t,...n})=>a.jsx("div",{className:h(We.list,t),...n,children:e}));zc.displayName="WuSurveyList";const Uc=e=>{const{className:t,variant:n="outlined",...r}=e;return a.jsx("div",{className:We.sourceWrapper,"data-slot":"survey-select-source",children:a.jsx(El,{variant:n,showGroupSeparator:!0,className:h(We.source,t),...r})})};Uc.displayName="WuSurveySource";const av=f.memo(Uc),jc=f.memo(({Sidebar:e,children:t,className:n,...r})=>a.jsxs("div",{className:h(We.container,n),role:"region","aria-label":"Survey selection interface","data-slot":"survey-select",...r,children:[e&&a.jsx("div",{className:We.sidebar,role:"complementary","aria-label":"Survey sidebar","data-slot":"survey-select-sidebar",children:e}),a.jsx("div",{className:We.content,"aria-label":"Survey content","data-slot":"survey-select-content",children:t})]}));jc.displayName="WuSurveySelect";const Gc=Be.cva("wu-inline-flex wu-items-center wu-justify-center wu-text-sm wu-font-medium wu-ring-offset-background wu-transition-colors hover:wu-bg-muted hover:wu-text-muted-foreground focus-visible:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-ring focus-visible:wu-ring-offset-2 disabled:wu-cursor-not-allowed disabled:wu-opacity-80",{variants:{variant:{default:"wu-bg-transparent",outline:"wu-border wu-border-input wu-bg-transparent hover:wu-bg-accent hover:wu-text-accent-foreground"},size:{default:"wu-h-10 wu-px-3",sm:"wu-h-9 wu-px-2.5",lg:"wu-h-11 wu-px-5"}},defaultVariants:{variant:"default",size:"default"}}),ov=E.forwardRef(({className:e,variant:t,size:n,...r},s)=>a.jsx(so.Root,{ref:s,className:h(Gc({variant:t,size:n,className:e})),...r}));ov.displayName=so.Root.displayName;const Kc=E.createContext({size:"default",variant:"default"}),Cr=E.forwardRef(({className:e,variant:t,size:n,children:r,...s},o)=>a.jsx(kn.Root,{ref:o,className:h("wu-flex wu-items-center wu-justify-center wu-gap-1",e),...s,children:a.jsx(Kc.Provider,{value:{variant:t,size:n},children:r})}));Cr.displayName=kn.Root.displayName;const bt=E.forwardRef(({className:e,children:t,variant:n,size:r,...s},o)=>{const i=E.useContext(Kc);return a.jsx(kn.Item,{ref:o,className:h(Gc({variant:i.variant||n,size:i.size||r}),e),...s,children:t})});bt.displayName=kn.Item.displayName;const Yc=f.forwardRef((e,t)=>{const{options:n,value:r,disabled:s,dir:o,onChange:i}=e,u=l=>h("wu-w-8 wu-h-8 wu-text-xl wu-leading-5 wu-rounded-full wu-text-gray-lead wu-relative wu-z-10 wu-p-0 wu-flex wu-items-center wu-justify-center",s&&"wu-cursor-not-allowed data-[state=on]:wu-text-gray-lead",l===r&&"wu-text-white",s&&r===l&&"wu-text-gray-lead","wu-switcher-icon-tab-item");return a.jsx(a.Fragment,{children:a.jsxs(Cr,{ref:t,type:"single",value:r,onValueChange:i,disabled:s,dir:o,className:h("wu-relative wu-group wu-flex wu-flex-row wu-items-start wu-justify-start wu-gap-0 wu-w-16 wu-bg-gray-25 wu-rounded-full",s&&"wu-cursor-not-allowed","wu-switcher-icon-tab-group"),children:[a.jsx("div",{role:"slider",className:h("wu-absolute wu-z-0 wu-w-8 wu-h-8 wu-bg-blue-p wu-rounded-full wu-transition-transform wu-duration-300 wu-ease-in-out",r==="opt1"&&"",r==="opt2"&&o!=="rtl"&&"wu-translate-x-full",r==="opt2"&&o==="rtl"&&"-wu-translate-x-full",s&&"wu-bg-gray-40","wu-switcher-icon-tab-slider")}),a.jsx(bt,{value:"opt1",className:u("opt1"),children:n[0].label}),a.jsx(bt,{value:"opt2",className:u("opt2"),children:n[1].label})]})})});Yc.displayName="_IconTab";const Xc=f.forwardRef((e,t)=>{const{options:n,value:r,disabled:s,dir:o,size:i="md",onChange:u}=e,l=d=>h("wu-w-1/2 wu-text-xs wu-rounded-full wu-text-gray-lead wu-relative wu-z-10 wu-font-normal",s&&"wu-cursor-not-allowed data-[state=on]:wu-text-gray-lead",i==="sm"&&"wu-h-6 wu-min-w-20",i==="md"&&"wu-h-8 wu-min-w-28",i==="lg"&&"wu-h-10 wu-min-w-36",d===r&&"wu-text-white wu-font-medium",s&&r===d&&"wu-text-gray-lead","wu-switcher-tab-item");return a.jsx(a.Fragment,{children:a.jsxs(Cr,{ref:t,type:"single",value:r,onValueChange:u,disabled:s,dir:o,className:h("wu-relative group wu-flex wu-flex-row wu-items-start wu-justify-start wu-gap-0 wu-w-fit wu-bg-gray-25 wu-rounded-full",s&&"wu-cursor-not-allowed","wu-switcher-tab-group"),children:[a.jsx("div",{role:"slider",className:h("wu-absolute wu-z-0 wu-w-1/2 wu-bg-blue-p wu-rounded-full wu-transition-transform wu-duration-300 wu-ease-in-out ",i==="sm"&&"wu-h-6 wu-min-w-20",i==="md"&&"wu-h-8 wu-min-w-28",i==="lg"&&"wu-h-10 wu-min-w-36",r==="opt1"&&"",r==="opt2"&&o!=="rtl"&&"wu-translate-x-full",r==="opt2"&&o==="rtl"&&"-wu-translate-x-full",s&&"wu-bg-gray-40","wu-switcher-tab-slider")}),a.jsx(bt,{value:"opt1",className:l("opt1"),children:a.jsx("div",{className:"wu-min-w-16 wu-max-w-[136px] wu-overflow-hidden wu-text-ellipsis wu-text-nowrap",children:n[0].label})}),a.jsx(bt,{value:"opt2",className:l("opt2"),children:a.jsx("div",{className:"wu-min-w-16 wu-max-w-[136px] wu-overflow-hidden wu-text-ellipsis wu-text-nowrap",children:n[1].label})})]})})});Xc.displayName="_Tab";const Zc=f.forwardRef((e,t)=>{const{options:n,value:r,disabled:s,dir:o,onChange:i}=e,u=w=>h("wu-p-0 wu-w-fit wu-text-xs wu-text-gray-lead wu-h-fit wu-font-normal",s&&"wu-cursor-not-allowed data-[state=on]:wu-text-gray-subtle wu-text-gray-subtle",w===r&&"wu-text-primary wu-font-medium",s&&r===w&&"wu-text-gray-lead","wu-switcher-toggle-item"),l=h("wu-w-fit wu-gap-2",s&&"wu-cursor-not-allowed","wu-switcher-toggle-group"),d=h("wu-flex wu-items-center wu-justify-center wu-w-8 wu-h-3 wu-p-0 wu-border wu-rounded-full wu-cursor-pointer wu-border-blue-p focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft focus-visible:wu-ring-offset-2",s&&"wu-border-gray-subtle wu-cursor-not-allowed","wu-switcher-toggle-button"),c=h("wu-w-2 wu-h-2 wu-bg-blue-p wu-rounded-full wu-transition-transform wu-duration-300 wu-ease-in-out",r==="opt1"&&o!=="rtl"&&"-wu-translate-x-[10px]",r==="opt1"&&o==="rtl"&&"wu-translate-x-[10px]",r==="opt2"&&o!=="rtl"&&"wu-translate-x-[10px]",r==="opt2"&&o==="rtl"&&"-wu-translate-x-[10px]",s&&"wu-hidden","wu-switcher-toggle-knob");return a.jsx(a.Fragment,{children:a.jsxs(Cr,{ref:t,type:"single",value:r,disabled:s,dir:o,className:l,onValueChange:i,children:[a.jsx(bt,{value:"opt1",className:u("opt1"),children:a.jsx("div",{className:"wu-max-w-[136px] wu-overflow-hidden wu-text-ellipsis wu-text-nowrap wu-text-right wu-switcher-toggle-item-label",children:n[0].label})}),a.jsx("button",{onClick:()=>i(r==="opt1"?"opt2":"opt1"),className:d,disabled:s,"aria-label":"knob",dir:o,children:a.jsx("div",{className:c,role:"knob",dir:o})}),a.jsx(bt,{value:"opt2",className:u("opt2"),children:a.jsx("div",{className:"wu-max-w-[136px] wu-overflow-hidden wu-text-ellipsis wu-text-nowrap wu-switcher-toggle-item-label",children:n[1].label})})]})})});Zc.displayName="_Toggle";const Jc=f.forwardRef((e,t)=>{const{type:n,options:r,value:s,disabled:o,dir:i,size:u,onChange:l,toggle:d=!0,...c}=e,[w,m]=f.useState(),p=b=>{let g=w;b!==""?g=b:d&&(g=w==="opt1"?"opt2":"opt1");const y=g==="opt1"?r[0].value:r[1].value;l&&l(y),m(g)};if(f.useEffect(()=>{if(!Array.isArray(r)||r.length<2)throw new Error("Options are not sufficient");m(s===r[0].value?"opt1":"opt2")},[r,s]),!Array.isArray(r)||r.length<2)return a.jsx(a.Fragment,{});switch(n){case"toggle":return a.jsx(Zc,{...c,ref:t,options:r,value:w||"opt1",onChange:p,disabled:o,dir:i});case"iconTab":return a.jsx(Yc,{ref:t,options:r,value:w||"opt1",onChange:p,disabled:o,dir:i});default:return a.jsx(Xc,{ref:t,options:r,value:w||"opt1",onChange:p,disabled:o,dir:i,size:u})}});Jc.displayName="WuSwitcher";const Qc=lt.Root,qa=E.forwardRef(({className:e,children:t,...n},r)=>a.jsx(lt.List,{className:h("wu-relative wu-flex",e),...n,ref:r,children:t}));qa.displayName=lt.List.displayName;const Ha=E.forwardRef(({className:e,...t},n)=>a.jsx(lt.Trigger,{ref:n,className:h("wu-relative wu-inline-flex wu-items-center wu-whitespace-nowrap wu-text-xs wu-px-4 wu-py-2 wu-text-gray-600 wu-transition-colors wu-duration-200 data-[state=active]:wu-text-blue-p","data-[orientation=horizontal]:wu-justify-center",e),...t}));Ha.displayName=lt.Trigger.displayName;const Rc=E.forwardRef(({className:e,...t},n)=>a.jsx(lt.Content,{ref:n,className:e,...t}));Rc.displayName=lt.Content.displayName;const ed=({items:e,enableAnimation:t})=>{const n="wu-duration-700 wu-ease-in-out wu-transition-all data-[state=inactive]:wu-absolute data-[state=inactive]:wu-inset-0 data-[state=inactive]:wu-opacity-0 data-[state=inactive]:wu-z-0 data-[state=active]:wu-relative data-[state=active]:wu-opacity-100 data-[state=active]:wu-z-10";return a.jsx("div",{className:h("wu-w-full wu-h-full wu-flex-1 wu-overflow-auto",t&&"wu-relative wu-overflow-hidden","wu-tab-content-container"),children:e.map(r=>a.jsx(Rc,{value:r.value,forceMount:t||void 0,className:h("wu-w-full wu-h-full wu-overflow-y-auto",t&&n,"wu-tab-content"),children:r.Content},r.value))})},iv=e=>{const[t,n]=f.useState(!1),[r,s]=f.useState(!1),o=()=>{const u=e.current;u&&(n(u.scrollLeft>0),s(u.scrollLeft+u.clientWidth<u.scrollWidth))};return f.useEffect(()=>{const u=e.current;return o(),u&&u.addEventListener("scroll",o),window.addEventListener("resize",o),()=>{u&&u.removeEventListener("scroll",o),window.removeEventListener("resize",o)}},[e]),{showLeftArrow:t,showRightArrow:r,scrollByTab:u=>{const l=e.current;if(l){const d=(u==="right"?l.clientWidth:-l.clientWidth)*.8;l.scrollBy({left:d,behavior:"smooth"})}}}},td=(e,t)=>{const[n,r]=f.useState({width:0,left:0,height:0,top:0}),s=t==="vertical";return f.useEffect(()=>{const o=e.current;if(o){const i=()=>{const l=o.querySelector('[data-state="active"]');if(l){const d={width:s?2:l.offsetWidth,left:s?0:l.offsetLeft,height:s?l.offsetHeight:1,top:s?l.offsetTop:0};r(d)}},u=new MutationObserver(i);return u.observe(o,{attributes:!0,subtree:!0}),i(),()=>{u.disconnect()}}},[e,s]),n},uv=({items:e,value:t,defaultValue:n,onValueChange:r,enableAnimation:s=!1,className:o,dir:i="ltr",position:u="top"})=>{var C;const l=f.useRef(null),d=td(l,"horizontal"),{showLeftArrow:c,showRightArrow:w,scrollByTab:m}=iv(l),[p,b]=f.useState(!1),g=()=>m("left"),y=()=>m("right"),x=N=>a.jsx("div",{"data-testid":`gradient-overlay-${N}`,className:h("wu-absolute wu-top-0 wu-h-full wu-w-20 wu-z-10 wu-pointer-events-none",N==="left"?"wu-left-0 wu-bg-gradient-to-r wu-from-white wu-to-transparent":"wu-right-0 wu-bg-gradient-to-l wu-from-white wu-to-transparent")}),v=(N,S,M)=>{const T=S==="left";return a.jsx("button",{onClick:N,className:h("wu-absolute wu-z-20 wu-flex wu-items-center wu-justify-center wu-px-1 wu-py-1 wu-transition-all wu-duration-300 wu-h-8",T?"wu-left-0":"wu-right-0",M&&"wu-translate-x-0 wu-opacity-100",!M&&[T?"-wu-translate-x-full":"wu-translate-x-full","wu-opacity-0"]),"aria-label":T?"scroll-left":"scroll-right",children:a.jsx("span",{className:h("wu-text-blue-p wu-text-lg",T?"wm-keyboard-arrow-left":"wm-keyboard-arrow-right")})})};return a.jsxs(Qc,{defaultValue:n||((C=e[0])==null?void 0:C.value),value:t,onValueChange:r,orientation:"horizontal",dir:i,className:h("wu-relative wu-flex wu-flex-col wu-w-full wu-h-full",u==="bottom"?"wu-flex-col-reverse":"wu-flex-col",o),role:"tabs",children:[a.jsxs("div",{className:"wu-relative wu-flex wu-overflow-hidden wu-shrink-0 wu-border-b wu-border-gray-200",onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),"aria-label":"tablistWrapper",children:[c&&p&&x("left"),v(g,"left",c&&p),a.jsxs(qa,{ref:l,className:h("wu-relative wu-flex wu-w-full wu-overflow-x-auto wu-flex-row","[&::-webkit-scrollbar]:wu-hidden [-ms-overflow-style:none] [scrollbar-width:none]","wu-tablist"),children:[e.map(N=>a.jsx(Ha,{value:N.value,children:N.Trigger},N.value)),a.jsx("span",{className:"wu-absolute wu-bg-blue-p wu-transition-all wu-duration-300 wu-indicator wu-bottom-0",style:{width:d.width,left:d.left,height:1.25,bottom:u==="bottom"?void 0:0,top:u==="bottom"?0:void 0}})]}),w&&p&&x("right"),v(y,"right",w&&p)]}),a.jsx(ed,{items:e,enableAnimation:s})]})},lv=e=>{const[t,n]=f.useState(!1),[r,s]=f.useState(!1),o=()=>{const u=e.current;u&&(n(u.scrollTop>0),s(u.scrollTop+u.clientHeight<u.scrollHeight))};return f.useEffect(()=>{const u=e.current;if(u)return o(),u.addEventListener("scroll",o),window.addEventListener("resize",o),()=>{u.removeEventListener("scroll",o),window.removeEventListener("resize",o)}},[e]),{showTopArrow:t,showBottomArrow:r,scrollByTab:u=>{const l=e.current;if(l){const d=(u==="down"?l.clientHeight:-l.clientHeight)*.8;l.scrollBy({top:d,behavior:"smooth"})}}}},cv=({items:e,value:t,defaultValue:n,onValueChange:r,enableAnimation:s=!1,className:o,dir:i="ltr",position:u="left"})=>{var C;const l=f.useRef(null),d=td(l,"vertical"),{showTopArrow:c,showBottomArrow:w,scrollByTab:m}=lv(l),[p,b]=f.useState(!1),g=()=>m("up"),y=()=>m("down"),x=N=>a.jsx("div",{className:h("wu-absolute wu-left-0 wu-w-full wu-h-12 wu-z-10 wu-pointer-events-none",N==="top"?"wu-top-0 wu-bg-gradient-to-b wu-from-white wu-to-transparent":"wu-bottom-0 wu-bg-gradient-to-t wu-from-white wu-to-transparent")}),v=(N,S,M)=>{const T=S==="up";return a.jsx("button",{onClick:N,className:h("wu-absolute wu-z-20 wu-flex wu-items-center wu-justify-center wu-px-1 wu-py-1 wu-transition-all wu-duration-300 wu-w-full",T?"-wu-top-1":"-wu-bottom-1",M&&"wu-translate-y-0 wu-opacity-100",!M&&[T?"-wu-translate-y-full":"wu-translate-y-full","wu-opacity-0"]),"aria-label":T?"scroll-up":"scroll-down",children:a.jsx("span",{className:h("wu-text-blue-p wu-text-lg",T?"wm-keyboard-arrow-up":"wm-keyboard-arrow-down")})})};return a.jsxs(Qc,{defaultValue:n||((C=e[0])==null?void 0:C.value),value:t,onValueChange:r,orientation:"vertical",dir:i,className:h("wu-relative wu-h-full wu-w-full wu-flex",u==="left"?"wu-flex-row":"wu-flex-row-reverse",o),role:"tabs",children:[a.jsxs("div",{className:"wu-relative wu-flex wu-overflow-hidden wu-shrink-0",onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),"aria-label":"tablistWrapper",children:[c&&p&&x("top"),v(g,"up",c&&p),a.jsxs(qa,{ref:l,className:h("wu-relative wu-flex wu-h-full wu-overflow-y-auto wu-flex-col","[&::-webkit-scrollbar]:wu-hidden [-ms-overflow-style:none] [scrollbar-width:none]","wu-tablist"),children:[e.map(N=>a.jsx(Ha,{value:N.value,children:N.Trigger},N.value)),a.jsx("span",{className:"wu-absolute wu-bg-blue-p wu-transition-all wu-duration-300 wu-indicator",style:{width:2,left:u==="left"?0:void 0,right:u==="right"?0:void 0,height:d.height,top:d.top}})]}),w&&p&&x("bottom"),v(y,"down",w&&p)]}),a.jsx(ed,{items:e,enableAnimation:s})]})},dv=({...e})=>e.orientation==="vertical"?a.jsx(cv,{...e}):a.jsx(uv,{...e}),za=E.forwardRef(({className:e,...t},n)=>a.jsx("table",{ref:n,className:h("wu-w-full wu-caption-bottom wu-text-sm",e),...t}));za.displayName="Table";const Ua=E.forwardRef(({className:e,...t},n)=>a.jsx("thead",{ref:n,className:h("[&_tr]:wu-border-b",e),...t}));Ua.displayName="TableHeader";const Tn=E.forwardRef(({className:e,...t},n)=>a.jsx("tbody",{ref:n,className:h("",e),...t}));Tn.displayName="TableBody";const wv=E.forwardRef(({className:e,...t},n)=>a.jsx("tfoot",{ref:n,className:h("wu-border-t wu-bg-muted/50 wu-font-medium [&>tr]:last:wu-border-b-0",e),...t}));wv.displayName="TableFooter";const ot=E.forwardRef(({className:e,...t},n)=>a.jsx("tr",{ref:n,className:h("wu-border-b wu-transition-colors wu-hover:wu-bg-muted/50 data-[state=selected]:wu-bg-muted",e),...t}));ot.displayName="TableRow";const Tr=E.forwardRef(({className:e,...t},n)=>a.jsx("th",{ref:n,className:h("wu-px-4 wu-text-left wu-align-middle wu-font-medium wu-text-muted-foreground [&:has([role=checkbox])]:wu-pr-0",e),...t}));Tr.displayName="TableHead";const yt=E.forwardRef(({className:e,...t},n)=>a.jsx("td",{ref:n,className:h("wu-p-4 wu-align-middle [&:has([role=checkbox])]:wu-pr-0",e),...t}));yt.displayName="TableCell";const En=E.forwardRef(({className:e,...t},n)=>a.jsx("caption",{ref:n,className:h("wu-mt-4 wu-text-sm wu-text-gray-subtle wu-font-normal",e),...t}));En.displayName="TableCaption";function nd(){const e=f.useRef(null),[t,n]=f.useState(!1),[r,s]=f.useState(!1),o=f.useCallback(()=>{const i=e.current;i&&(n(i.scrollLeft>12),s(i.scrollLeft<i.scrollWidth-i.clientWidth-1))},[]);return f.useEffect(()=>{o()},[o]),{scrollContainerRef:e,isScrolledLeft:t,isScrolledRight:r,handleScroll:o}}const rd=48,sd="expander";function fv(e,t){return e?[{id:sd,accessorKey:sd,header:"",cell:({row:n})=>{const r=n.getIsExpanded();return a.jsx("button",{type:"button",className:"wu-inline-flex wu-h-full wu-w-full wu-items-center wu-justify-center wu-text-[10px]",onClick:()=>n.toggleExpanded(),"aria-label":r?"Collapse row":"Expand row",children:a.jsx("span",{className:h("wm-arrow-forward-ios wu-transition-all",r?"wu-rotate-90":"")})})},enableSorting:!1,enableColumnFilter:!1,enableGlobalFilter:!1,enableHiding:!1,size:rd},...t]:t}function ad(e,t){const n=t.map(r=>{var s;return(s=r.columnDef)==null?void 0:s.expandableRowContent}).find(r=>r);return n==null?void 0:n.call(null,e)}function ja(e){const t=new Map;let n=0;for(let s=0;s<e.length;s++){const o=e[s];if(o.columnDef.sticky!=="left")continue;const i=e[s+1];t.set(o.id,{sticky:"left",offset:n,isStickyEdge:!i||i.columnDef.sticky!=="left"}),n+=o.getSize()}let r=0;for(let s=e.length-1;s>=0;s--){const o=e[s];if(o.columnDef.sticky!=="right")continue;const i=e[s-1];t.set(o.id,{sticky:"right",offset:r,isStickyEdge:!i||i.columnDef.sticky!=="right"}),r+=o.getSize()}return t}function Er(e,t,n,r){return t?e==="left"&&n?a.jsx("div",{style:{position:"absolute",top:0,right:-12,bottom:0,width:12,background:"linear-gradient(to right, rgba(115,115,115,0.12), transparent)",pointerEvents:"none"}}):e==="right"&&r?a.jsx("div",{style:{position:"absolute",top:0,left:-12,bottom:0,width:12,background:"linear-gradient(to left, rgba(115,115,115,0.12), transparent)",pointerEvents:"none"}}):null:null}function od(e,t,n){return e===!0&&(!t||n>t)}function id(e,t){const n=Ve.flexRender(t.cell,e.getContext());return e.column.id!=="actions"?n:a.jsx("div",{className:"wu-opacity-0 wu-transition-opacity wu-duration-150 wu-ease-in-out group-hover:wu-opacity-100",children:n})}const pv=({columns:e,rowSelection:t})=>{const n=(t==null?void 0:t.isEnabled)??!1,r=(t==null?void 0:t.size)??48,{onRowSelect:s,rowUniqueKey:o,isRowDisabled:i,hideSelectAll:u}=t||{},l=f.useCallback(c=>w=>{s==null||s(w?c:[])},[s]);return{finalColumns:f.useMemo(()=>n?[{id:"select",header:({table:c})=>{const w=c.getRowModel().rows.map(p=>p.original).filter(p=>!(i!=null&&i(p))),m=l(w);return u?a.jsx("div",{}):a.jsx(qe,{checked:c.getIsSomeRowsSelected()||c.getIsAllRowsSelected(),partial:c.getIsSomeRowsSelected()&&!c.getIsAllRowsSelected(),onChange:p=>{c.toggleAllRowsSelected(!!p),m(!!p)},"aria-label":"Select all","data-testid":c.getIsSomeRowsSelected()&&!c.getIsAllRowsSelected()?"select-partial":"select-all"})},cell:({row:c})=>{const w=(i==null?void 0:i(c.original))??!1;return a.jsx(qe,{checked:c.getIsSelected(),disabled:w,onChange:m=>{w||c.toggleSelected(!!m)},"aria-label":String(c.original[o])})},filterable:!1,accessorKey:"select",size:r},...e]:e,[e,n,l,i,u])}};function ud({data:e,columns:t,rowSelection:n,isRowExpandable:r}){var m;const[s,o]=f.useState({}),{finalColumns:i}=pv({columns:t,rowSelection:n}),u=f.useMemo(()=>{if(!(n!=null&&n.isEnabled))return{};const p={};for(const b of n.selectedRows){const g=e.findIndex(y=>y[n.rowUniqueKey]===b[n.rowUniqueKey]);g!==-1&&(p[g]=!0)}return p},[e,n]),l=f.useMemo(()=>i.filter(p=>p.enableSorting).map(p=>p.accessorKey),[i]),d=((m=n==null?void 0:n.selectedRows)==null?void 0:m.length)??0,c=f.useMemo(()=>fv(r,i),[i,r]);return{finalColumns:i,rowSelectionState:u,sortableColumns:l,selectedRowCount:d,columnsWithExpand:c,expanded:s,setExpanded:o,handleRowSelectionChange:p=>{const b=typeof p=="function"?p(u):p,g=[],y=n==null?void 0:n.isRowDisabled;for(const x in b){if(!b[x])continue;const v=e[Number(x)];v&&(y!=null&&y(v)||g.push(v))}n==null||n.onRowSelect(g)}}}const ld=e=>h("wu-group wu-border-b wu-border-black/[12%] [--wu-row-overlay:transparent]","data-[state=selected]:[--wu-row-overlay:rgb(var(--wu-blue-p)/0.08)]",!e&&["hover:[--wu-row-overlay:rgba(0,0,0,0.02)]","data-[state=selected]:hover:[--wu-row-overlay:rgb(var(--wu-blue-p)/0.16)]"]),cd=(e="default",t)=>h("wu-py-0 wu-font-light wu-text-xs wu-bg-white","[background-image:linear-gradient(var(--wu-row-overlay),var(--wu-row-overlay))]",e==="compact"?"wu-h-8":"wu-h-10",t==="right"&&"wu-text-right",t==="center"&&"wu-text-center",t==="left"&&"wu-text-left"),hv=(e="default")=>e==="compact"?"wu-h-8":"wu-h-10",mv=e=>h({"wu-text-right":e==="right","wu-text-center":e==="center","wu-text-left":e==="left"}),gv=e=>h({"wu-justify-end":e==="right","wu-justify-center":e==="center"}),bv=(e,t)=>h("wu-absolute -wu-bottom-[13px] wu-left-0 wm-arrow-drop-up wu-text-xl",e&&"wu-hidden",!t&&"-wu-bottom-[10px]"),yv=(e,t)=>h("wu-absolute -wu-top-[15px] wu-left-0 wm-arrow-drop-down wu-text-xl",e&&"wu-hidden",!t&&"-wu-top-[11px]"),dd=({table:e,size:t,NoDataContent:n,isLoading:r,CustomLoader:s,isRowDisabled:o,isRowExpandable:i,isScrolledLeft:u,isScrolledRight:l})=>{const d=e.getVisibleLeafColumns(),c=d.length,w=e.getRowModel().rows,m=ja(d);return r?a.jsx(Tn,{children:a.jsx(ot,{children:a.jsx(yt,{colSpan:c,className:"wu-text-center wu-h-[35vh] wu-loader-container",children:s??a.jsx(ct,{className:"wu-w-full"})})})}):w.length?a.jsx(Tn,{children:w.flatMap((p,b)=>{const g=(o==null?void 0:o(p.original))??!1,y=p.getIsSelected(),x=p.getIsExpanded(),v=a.jsx(ot,{"data-disabled":g,"data-state":y&&"selected",className:ld(g),"data-expanded":x,children:p.getVisibleCells().map((N,S)=>{const M=N.column.columnDef,T=m.get(N.column.id);return a.jsxs(yt,{className:h(cd(t,M.cellAlign),T&&"wu-sticky wu-z-[1]"),style:{width:`${N.column.getSize()}px`,...T&&{[T.sticky]:T.offset}},children:[id(N,M),Er(T==null?void 0:T.sticky,(T==null?void 0:T.isStickyEdge)??!1,u,l)]},`${N.id}-${S}`)})},`${p.id}-${b}`),C=i&&x?ad(p,e.getVisibleLeafColumns()):null;return C?[v,a.jsx(ot,{"data-expanded":"true","data-state":y&&"selected",children:a.jsx(yt,{colSpan:c,children:C})},`${p.id}-expanded-${b}`)]:[v]})}):a.jsx(Tn,{children:a.jsx(ot,{children:a.jsx(yt,{colSpan:c,children:n})})})},Ga=({table:e,sortableColumns:t,manual:n=!1,onSort:r,size:s,isRowSelected:o,HeaderAction:i,isStickyHeader:u,asVirtualContent:l=!1,isRowExpandable:d,isScrolledLeft:c,isScrolledRight:w})=>{var N;const m=s==="compact"?"wu-h-8":"wu-h-10",p=e.getVisibleLeafColumns(),b=ja(p),g=S=>{const{id:M,columnDef:T,getIsSorted:I,toggleSorting:D}=S.column,A=T.headerAlign,_=Ve.flexRender(T.header,S.getContext());if(!t.includes(M))return _;const P=I(),W=P==="asc",F=P==="desc",B=()=>{n?r==null||r({id:M,desc:S.column.getIsSorted()==="asc"}):D(S.column.getIsSorted()==="asc")};return a.jsxs("button",{onClick:B,"aria-label":`Sort by ${typeof T.header=="string"?T.header:M}`,className:h("wu-flex wu-items-center wu-gap-1 wu-w-full",gv(A)),children:[_,a.jsxs("div",{className:"wu-relative wu-flex-shrink-0 wu-w-4",children:[a.jsx("span",{className:yv(W,!!P)}),a.jsx("span",{className:bv(F,!!P)})]})]})},y=S=>{const M=S.column.id==="actions",T=b.get(S.column.id),I=T?{[T.sticky]:T.offset}:{};return M?a.jsx(Tr,{colSpan:S.colSpan,className:h("wu-text-xs wu-font-medium",T&&"wu-sticky wu-z-[2] wu-bg-[#EEEEEE]"),style:{width:`${S.getSize()}px`,...I},children:Er(T==null?void 0:T.sticky,(T==null?void 0:T.isStickyEdge)??!1,c,w)},S.id):a.jsxs(Tr,{colSpan:S.colSpan,className:h("wu-text-xs wu-font-medium wu-bg-[#EEEEEE]",T?"wu-sticky wu-z-[2]":"wu-relative wu-z-0",mv(S.column.columnDef.headerAlign)),style:{width:`${S.getSize()}px`,...I},children:[g(S),Er(T==null?void 0:T.sticky,(T==null?void 0:T.isStickyEdge)??!1,c,w)]},S.id)},x=()=>e.getHeaderGroups().map(S=>a.jsx(ot,{className:"wu-relative",children:S.headers.map(y)},S.id)),v=()=>{var S;return a.jsxs("div",{className:h("wu-flex wu-items-center wu-border-b wu-border-t wu-bg-gray-20",m),children:[a.jsx("div",{className:h("wu-flex wu-items-center wu-px-4"),style:{width:(S=p[0])==null?void 0:S.getSize(),marginLeft:d?rd:void 0},children:a.jsx(qe,{checked:e.getIsSomeRowsSelected()||e.getIsAllRowsSelected(),partial:e.getIsSomeRowsSelected()&&!e.getIsAllRowsSelected(),onChange:M=>e.toggleAllRowsSelected(!!M),"aria-label":"Select all","data-testid":"select-all-header-checkbox"})}),a.jsx("div",{className:"wu-flex-1 wu-flex wu-pr-4",children:i})]})},C=o&&i;if(l){const S=((N=e.getHeaderGroups()[0])==null?void 0:N.headers)??[];return a.jsxs(ot,{className:"wu-relative",children:[S.map(y),C&&a.jsx(Tr,{colSpan:p.length,className:"wu-p-0 wu-absolute wu-top-0 wu-left-0 wu-right-0 wu-z-10",children:v()})]})}return a.jsxs(Ua,{className:h("wu-border-t wu-border-black/[12%] wu-bg-gray-20 wu-relative",u&&"wu-sticky wu-top-[-.5px] wu-z-10",m),children:[x(),C&&a.jsx("div",{className:h("wu-absolute wu-top-[-1px] wu-left-0 wu-right-0 wu-flex wu-items-center wu-border-b wu-border-t wu-bg-gray-20 wu-z-10",m),children:v()})]})},wd=f.forwardRef((e,t)=>a.jsx(Tn,{...e,ref:t}));wd.displayName="TableBodyComponent";const fd=({table:e,size:t,isRowDisabled:n,containerHeight:r=600,sortableColumns:s,HeaderAction:o,isRowSelected:i,manual:u=!1,onSort:l,tableLayout:d="auto",isScrolledLeft:c,isScrolledRight:w,isRowExpandable:m,hideHeader:p=!1})=>{const b=e.getRowModel().rows,g=e.getVisibleLeafColumns(),y=ja(g),x=[];for(const v of b)x.push({type:"row",row:v}),m&&v.getIsExpanded()&&x.push({type:"expanded",row:v});return a.jsx("div",{className:"wu-w-full",children:a.jsx(eo.TableVirtuoso,{style:{height:r},totalCount:x.length,fixedHeaderContent:p?void 0:()=>a.jsx(Ga,{table:e,sortableColumns:s,manual:u,onSort:l,size:t,isRowSelected:i,HeaderAction:o,asVirtualContent:!0,isScrolledLeft:c,isScrolledRight:w}),itemContent:v=>{const C=x[v];if(!C)return null;if(C.type==="expanded"){const S=ad(C.row,e.getVisibleLeafColumns());return a.jsx(yt,{colSpan:g.length,children:S})}const N=C.row;return a.jsx(a.Fragment,{children:N.getVisibleCells().map((S,M)=>{const T=S.column.columnDef,I=y.get(S.column.id);return a.jsxs(yt,{className:h(cd(t,T.cellAlign),I&&"wu-sticky wu-z-[1]"),style:I?{[I.sticky]:I.offset}:void 0,children:[id(S,T),Er(I==null?void 0:I.sticky,(I==null?void 0:I.isStickyEdge)??!1,c,w)]},`${S.id}-${M}`)})})},components:{Table:({style:v,...C})=>a.jsxs("table",{...C,style:{...v,width:"100%",borderCollapse:"collapse",tableLayout:d},children:[a.jsx("colgroup",{children:g.map(N=>a.jsx("col",{style:{width:`${N.getSize()}px`}},N.id))}),C.children]}),TableBody:wd,TableHead:v=>a.jsx(Ua,{...v,className:h("wu-border-t wu-border-black/[12%] wu-bg-gray-20",hv(t),v.className)}),TableRow:({...v})=>{const C=v["data-index"],N=x[C],S=N==null?void 0:N.row,M=S?(n==null?void 0:n(S.original))??!1:!1,T=(S==null?void 0:S.getIsSelected())??!1;return a.jsx(ot,{...v,"data-disabled":M,"data-state":T&&"selected","data-expanded":(N==null?void 0:N.type)==="expanded"?"true":void 0,className:ld(M)})}}})})},Ir=Be.cva("",{variants:{variant:{striped:'[&_tr:nth-child(even):not([data-expanded])_td]:wu-bg-zinc-50 [&_tr:nth-child(odd)[data-expanded]:not([data-state="selected"])_td]:wu-bg-zinc-50',unstyled:"",bordered:"wu-border-collapse wu-border wu-border-black/[12%] [&_th]:wu-border [&_td]:wu-border"}}}),vv=({data:e,columns:t,isLoading:n=!1,variant:r="unstyled",sort:s,size:o,rowSelection:i,HeaderAction:u,NoDataContent:l,stickyHeader:d=!1,CustomLoader:c,caption:w,virtualization:m,isRowExpandable:p,hideHeader:b=!1,tableLayout:g="fixed",style:y,className:x,...v})=>{var V;const[C,N]=f.useState(()=>(s==null?void 0:s.defaultSort)??null),{scrollContainerRef:S,isScrolledLeft:M,isScrolledRight:T,handleScroll:I}=nd(),{rowSelectionState:D,sortableColumns:A,selectedRowCount:_,columnsWithExpand:P,expanded:W,setExpanded:F,handleRowSelectionChange:B}=ud({data:e,columns:t,rowSelection:i,isRowExpandable:p}),$=Ve.useReactTable({data:e,columns:P,getCoreRowModel:Ve.getCoreRowModel(),getPaginationRowModel:Ve.getPaginationRowModel(),getExpandedRowModel:p?Ve.getExpandedRowModel():void 0,manualPagination:!0,manualSorting:!0,manualFiltering:!0,enableRowSelection:i!=null&&i.isRowDisabled?q=>!i.isRowDisabled(q.original):!0,enableExpanding:!!p,state:{sorting:C?[{id:C.id,desc:C.desc}]:[],...i!=null&&i.isEnabled?{rowSelection:D}:{},...p?{expanded:W}:{}},onRowSelectionChange:B,...p?{onExpandedChange:F}:{}}),ie=od(m==null?void 0:m.enabled,m==null?void 0:m.threshold,e.length),U=(m==null?void 0:m.maxHeight)??600;return a.jsx("div",{className:h("wu-text-gray-lead wu-table-container wu-relative",!ie&&d&&"wu-h-full"),children:ie?a.jsxs("div",{ref:S,onScroll:I,className:h("wu-overflow-x-auto wu-w-full",Ir({variant:r})),children:[w&&a.jsx(En,{className:"wu-font-light",children:w}),n?a.jsx("div",{className:"wu-text-center wu-h-[35vh] wu-flex wu-items-center wu-justify-center",children:c??a.jsx(ct,{className:"wu-w-full"})}):(V=$.getRowModel().rows)!=null&&V.length?a.jsx(fd,{table:$,size:o,isRowDisabled:i==null?void 0:i.isRowDisabled,containerHeight:U,sortableColumns:A,HeaderAction:u,isRowSelected:_>0,manual:!0,onSort:q=>{N(q),s==null||s.onSort(q)},tableLayout:g,isScrolledLeft:M,isScrolledRight:T,hideHeader:b}):a.jsx("div",{className:"wu-p-4 wu-text-center",children:l})]}):a.jsx("div",{ref:S,onScroll:I,className:h("wu-overflow-x-auto wu-w-full",d&&"wu-overflow-y-auto wu-h-full"),children:a.jsxs(za,{...v,className:h("wu-w-full",Ir({variant:r}),x),style:{tableLayout:g,...y},children:[w&&a.jsx(En,{className:"wu-font-light",children:w}),!b&&a.jsx(Ga,{table:$,sortableColumns:A,manual:!0,onSort:q=>{N(q),s==null||s.onSort(q)},size:o,HeaderAction:u,isRowSelected:_>0,isStickyHeader:d,isRowExpandable:p,isScrolledLeft:M,isScrolledRight:T}),a.jsx(dd,{table:$,size:o,NoDataContent:l,CustomLoader:c,isLoading:n,isRowDisabled:i==null?void 0:i.isRowDisabled,isRowExpandable:p,isScrolledLeft:M,isScrolledRight:T})]})})})},xv=({data:e,columns:t,variant:n="unstyled",size:r="default",sort:s,filterText:o,pagination:i,stickyHeader:u,HeaderAction:l,CustomLoader:d,NoDataContent:c,isLoading:w,caption:m,rowSelection:p,isRowExpandable:b,hideHeader:g=!1,virtualization:y,tableLayout:x="fixed",style:v,className:C,...N})=>{var O;const[S,M]=f.useState(()=>s!=null&&s.defaultSort?[{id:s.defaultSort.id,desc:s.defaultSort.desc}]:[]),[T,I]=f.useState([]),[D,A]=f.useState((i==null?void 0:i.pageIndex)??0),{scrollContainerRef:_,isScrolledLeft:P,isScrolledRight:W,handleScroll:F}=nd(),{finalColumns:B,rowSelectionState:$,sortableColumns:ie,selectedRowCount:U,columnsWithExpand:V,expanded:q,setExpanded:H,handleRowSelectionChange:Q}=ud({data:e,columns:t,rowSelection:p,isRowExpandable:b}),ee=f.useMemo(()=>B.filter(j=>j.filterable).map(j=>j.accessorKey),[B]),J=Ve.useReactTable({data:e,columns:V,getCoreRowModel:Ve.getCoreRowModel(),getFilteredRowModel:Ve.getFilteredRowModel(),getSortedRowModel:Ve.getSortedRowModel(),getPaginationRowModel:i?Ve.getPaginationRowModel():void 0,getExpandedRowModel:b?Ve.getExpandedRowModel():void 0,enableRowSelection:p!=null&&p.isRowDisabled?j=>!p.isRowDisabled(j.original):!0,enableExpanding:!!b,state:{sorting:S,columnFilters:T,...i?{pagination:i}:{},...p!=null&&p.isEnabled?{rowSelection:$}:{},...b?{expanded:q}:{}},onSortingChange:M,onColumnFiltersChange:I,onRowSelectionChange:Q,...b?{onExpandedChange:H}:{}});f.useEffect(()=>{ee.forEach(j=>{var Y;(Y=J.getColumn(j))==null||Y.setFilterValue(o)})},[o,ee,J]),f.useEffect(()=>{i&&(i==null?void 0:i.pageIndex)!==D&&(p==null||p.onRowSelect([]),J.resetRowSelection(),A(i.pageIndex))},[i==null?void 0:i.pageIndex]);const ge=od(y==null?void 0:y.enabled,y==null?void 0:y.threshold,e.length),K=(y==null?void 0:y.maxHeight)??600;return a.jsx("div",{className:h("wu-text-gray-lead wu-table-container wu-relative",!ge&&u&&"wu-h-full"),children:ge?a.jsxs("div",{ref:_,onScroll:F,className:h("wu-overflow-x-auto wu-w-full",Ir({variant:n})),children:[m&&a.jsx(En,{children:m}),w?a.jsx("div",{className:"wu-text-center wu-h-[35vh] wu-flex wu-items-center wu-justify-center",children:d??a.jsx(ct,{className:"wu-w-full"})}):(O=J.getRowModel().rows)!=null&&O.length?a.jsx(fd,{table:J,size:r,isRowDisabled:p==null?void 0:p.isRowDisabled,containerHeight:K,sortableColumns:ie,HeaderAction:l,isRowSelected:U>0,tableLayout:x,isScrolledLeft:P,isScrolledRight:W,isRowExpandable:b,hideHeader:g}):a.jsx("div",{className:"wu-p-4 wu-text-center",children:c})]}):a.jsx("div",{ref:_,onScroll:F,className:h("wu-overflow-x-auto wu-w-full",u&&"wu-overflow-y-auto wu-h-full"),children:a.jsxs(za,{...N,className:h(`wu-table-${x}`,"wu-w-full",Ir({variant:n}),C),style:{tableLayout:x,...v},children:[m&&a.jsx(En,{children:m}),!g&&a.jsx(Ga,{table:J,sortableColumns:ie,size:r,HeaderAction:l,isRowSelected:U>0,isStickyHeader:u,isRowExpandable:b,isScrolledLeft:P,isScrolledRight:W}),a.jsx(dd,{table:J,size:r,NoDataContent:c,CustomLoader:d,isLoading:w,isRowDisabled:p==null?void 0:p.isRowDisabled,isRowExpandable:b,isScrolledLeft:P,isScrolledRight:W})]})})})},pd=E.forwardRef(({className:e,...t},n)=>a.jsx("textarea",{className:h("wu-flex wu-w-full wu-border-b wu-border-gray-subtle wu-bg-gray-10 wu-text-gray-lead wu-p-2 wu-text-sm wu-font-normal wu-placeholder:wu-text-gray-subtle wu-placeholder:wu-font-light focus-visible:wu-outline-none disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle read-only:wu-cursor-not-allowed read-only:wu-bg-gray-20 read-only:wu-border-gray-40 read-only:wu-text-gray-subtle focus:wu-border-blue-p wu-transition-colors hover:wu-border-gray-40 ",e),ref:n,...t}));pd.displayName="Textarea";const hd=f.forwardRef((e,t)=>{const{Label:n,id:r=$r(),variant:s="flat",readonly:o,maxLength:i,labelPosition:u="top",...l}=e,d=w=>{l.onChange&&l.onChange(w)},c=Dn(u);return a.jsxs("div",{className:h(c,"wu-flex wu-textarea-container"),dir:l.dir,children:[a.jsx(pd,{...l,ref:t,id:r,className:h("wu-peer wu-rounded-t-sm",s==="outlined"?"wu-border wu-border-gray-subtle":"",l.className),onChange:d,readOnly:o,maxLength:i}),n&&a.jsx(Me,{htmlFor:r,className:"wu-textarea-label",children:n})]})});hd.displayName="WuTextarea";function Nv(e){if(typeof e=="string"&&e.includes("T")){const t=z.parseISO(e);return z.format(t,"HH:mm")}if(typeof e=="string"&&/^\d{2}:\d{2}:\d{2}$/.test(e)){const t=z.parse(e,"HH:mm:ss",new Date);return z.format(t,"HH:mm")}return typeof e=="string"&&/^\d{2}:\d{2}$/.test(e)?e:"00:00"}const md=["12",...Array.from({length:11},(e,t)=>String(t+1).padStart(2,"0"))],gd=Array.from({length:60},(e,t)=>String(t).padStart(2,"0")),bd=["am","pm"],Mr=50;function Sv(e){return Array(Mr).fill(e).flat()}function Ka(e,t){const n=e.indexOf(t);return[...e.slice(n),...e.slice(0,n)]}function Cv(e,t){let n=Number(e);return t==="pm"&&n<12&&(n+=12),t==="am"&&n===12&&(n=0),String(n).padStart(2,"0")}function yd(e){const t=Number(e),n=t>=12?"pm":"am",r=t%12===0?12:t%12;return{hour:String(r),meridiem:n}}const Tv=({value:e,isSelected:t,onClick:n})=>a.jsx("div",{onClick:n,className:h("wu-w-8 wu-h-8 wu-flex wu-items-center wu-justify-center wu-text-center wu-snap-start wu-rounded-[2px] wu-cursor-pointer hover:wu-bg-blue-p hover:wu-text-white",t&&"wu-bg-blue-p/15 wu-text-blue-p"),children:e}),Ya=({values:e,selectedValue:t,scrollRef:n,onSelect:r,repeatItems:s=!0,className:o})=>a.jsx("div",{ref:n,className:h("wu-overflow-y-scroll wu-w-8 wu-snap-y wu-snap-mandatory [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",o),role:"presentation",children:(s?Sv(e):e).map((i,u)=>a.jsx(Tv,{value:i,isSelected:i===t,onClick:()=>r(i)},`${i}-${u}`))});function Ev(e,t,n,r){const s=f.useMemo(()=>e?Ka(md,t.padStart(2,"0")):md,[e]),o=f.useMemo(()=>e?Ka(gd,n.padStart(2,"0")):gd,[e]),i=f.useMemo(()=>e?Ka(bd,r):bd,[e]);return{rotatedHours:s,rotatedMinutes:o,rotatedMeridiem:i}}function Iv(e,t,n){f.useEffect(()=>{function r(i){if(i){const u=i.scrollHeight/Mr,l=Math.floor(Mr/2);i.scrollTop=l*u;const d=()=>{const{scrollTop:c}=i,w=Math.round(c/u);(w<=1||w>=Mr-2)&&(i.scrollTop=l*u)};return i.addEventListener("scroll",d),()=>{i.removeEventListener("scroll",d)}}}if(!e)return;const s=r(t.current),o=r(n.current);return()=>{s==null||s(),o==null||o()}},[e,t,n])}const vd=({className:e,time:t,Label:n,labelPosition:r,dir:s,...o})=>{const[i,u]=f.useState(!1),[l,d]=f.useState(""),c=f.useRef(null),w=f.useRef(null),m=f.useRef(null),p=f.useRef(null),[b,g]=f.useState("12"),[y,x]=f.useState("00"),[v,C]=f.useState("am");f.useEffect(()=>{if(!t){d(""),g("12"),x("00"),C("am"),c.current&&(c.current.value="");return}const I=Nv(t);d(I);const[D,A]=I.split(":"),{hour:_,meridiem:P}=yd(D);g(_),x(A),C(P),c.current&&(c.current.value=I)},[t]),f.useEffect(()=>{const I=D=>{w.current&&!w.current.contains(D.target)&&u(!1)};return document.addEventListener("mousedown",I),()=>{document.removeEventListener("mousedown",I)}},[]),Iv(i,m,p);const{rotatedHours:N,rotatedMinutes:S,rotatedMeridiem:M}=Ev(i,b,y,v),T=f.useCallback((I,D,A)=>{const _=I??b,P=D??y,W=A??v;g(_),x(P),C(W);const F=`${Cv(_,W)}:${P}`;d(F)},[b,y,v]);return a.jsxs("div",{className:h("wu-flex wu-gap-1 wu-relative wu-w-fit wu-flex-col",(r==="right"||r==="left")&&"wu-items-center",r==="left"&&"wu-flex-row",r==="right"&&"wu-flex-row-reverse","wu-input-wrapper"),dir:s,children:[n&&a.jsx(Me,{htmlFor:"time-picker",className:"wu-timepicker-label",children:n}),a.jsxs("div",{className:h("relative inline-block"),ref:w,dir:s,children:[a.jsx(Re,{ref:c,type:"time",value:l,variant:"flat",role:"textbox",onChange:I=>{d(I.target.value);const[D,A]=I.target.value.split(":"),{hour:_,meridiem:P}=yd(D);g(_),x(A),C(P)},className:"wu-w-[136px] wu-h-8 wu-pr-6 wu-border wu-border-lead/40 wu-text-gray-lead wu-timepicker-input",style:{WebkitAppearance:"none",MozAppearance:"textfield"},Icon:a.jsx(Oe,{icon:"wm-schedule",className:h("wu-text-base",o.disabled&&"wu-text-lead/50 wu-pointer-events-none wu-opacity-50"),onClick:()=>u(I=>!I),"data-testid":"wu-timepicker-icon"}),iconPosition:"right",dir:s,...o}),a.jsx("style",{children:`
19
+ input[type="time"]::-webkit-calendar-picker-indicator { display: none; }
20
+ `}),i&&a.jsxs("div",{className:h("wu-absolute wu-w-[136px] wu-h-[228px] wu-flex wu-bg-white wu-border wu-shadow wu-z-50 wu-text-xs wu-gap-1 wu-p-1 wu-border-blue-p wu-text-lead",e),children:[a.jsx(Ya,{values:N,selectedValue:b.padStart(2,"0"),scrollRef:m,onSelect:I=>T(I,y),className:"wu-time-hour-picker"}),a.jsx(Ya,{values:S,selectedValue:y.padStart(2,"0"),scrollRef:p,onSelect:I=>T(b,I),className:"wu-time-minute-picker"}),a.jsx(Ya,{values:M,selectedValue:v,onSelect:I=>T(void 0,void 0,I),className:"wu-time-meridiem-picker",repeatItems:!1})]})]})]})};vd.displayName="WuTimePicker";const Mv=1,kv=1e6;let Xa=0;function Dv(){return Xa=(Xa+1)%Number.MAX_SAFE_INTEGER,Xa.toString()}const Za=new Map,xd=e=>{if(Za.has(e))return;const t=setTimeout(()=>{Za.delete(e),In({type:"REMOVE_TOAST",toastId:e})},kv);Za.set(e,t)},Av=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Mv)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?xd(n):e.toasts.forEach(r=>{xd(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},kr=[];let Dr={toasts:[]};function In(e){Dr=Av(Dr,e),kr.forEach(t=>{t(Dr)})}function Nd({...e}){const t=Dv(),n=s=>In({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>In({type:"DISMISS_TOAST",toastId:t});return In({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function _v(){const[e,t]=f.useState(Dr);return f.useEffect(()=>(kr.push(t),()=>{const n=kr.indexOf(t);n>-1&&kr.splice(n,1)}),[e]),{...e,toast:Nd,dismiss:n=>In({type:"DISMISS_TOAST",toastId:n})}}const Pv=()=>({showToast:({message:t,variant:n,duration:r,position:s})=>Nd({description:t,variant:n,duration:r,position:s})}),Vv=Ee.Provider,Ov=Be.cva("wu-fixed wu-z-[100] wu-flex wu-max-h-screen wu-w-full wu-flex-col-reverse wu-px-4 wu-py-2 sm:wu-flex-col md:wu-max-w-[720px] wu-w-fit wu-toast-container",{variants:{position:{topRight:"wu-right-0 wu-top-0",top:"wu-top-0 wu-left-1/2 wu--translate-x-1/2",topLeft:"wu-left-0 wu-top-0",bottom:"wu-bottom-0 wu-left-1/2 wu--translate-x-1/2",bottomRight:"wu-right-0 wu-bottom-0",bottomLeft:"wu-left-0 wu-bottom-0"}},defaultVariants:{position:"top"}}),Sd=E.forwardRef(({className:e,position:t,...n},r)=>a.jsx(Ee.Viewport,{ref:r,className:h(Ov({position:t}),e),...n}));Sd.displayName=Ee.Viewport.displayName;const Lv=Be.cva("group wu-pointer-events-auto wu-text-xs wu-font-normal wu-relative wu-flex wu-w-full wu-min-h-12 wu-items-center wu-justify-between wu-overflow-hidden wu-px-4 wu-pr-0 wu-py-2 wu-shadow-sm wu-transition-all data-[swipe=cancel]:wu-translate-y-0 data-[swipe=end]:wu-translate-y-[var(--radix-toast-swipe-end-y)] data-[swipe=move]:wu-translate-y-[var(--radix-toast-swipe-move-y)] data-[swipe=move]:wu-transition-none data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[swipe=end]:wu-animate-out data-[state=closed]:wu-fade-out-80",{variants:{variant:{default:"wu-border wu-bg-white wu-text-text",success:"wu-text-green-deep wu-bg-green-soft",error:"wu-text-red-deep wu-bg-red-soft",warning:"wu-text-yellow-deep wu-bg-yellow-soft",info:"wu-text-blue-deep wu-bg-blue-soft"},position:{topRight:"data-[state=closed]:wu-slide-out-to-top-full data-[state=open]:wu-slide-in-from-top-full",top:"data-[state=closed]:wu-slide-out-to-top-full data-[state=open]:wu-slide-in-from-top-full",topLeft:"data-[state=closed]:wu-slide-out-to-top-full data-[state=open]:wu-slide-in-from-top-full",bottom:"data-[state=closed]:wu-slide-out-to-bottom-full data-[state=open]:wu-slide-in-from-bottom-full",bottomRight:"data-[state=closed]:wu-slide-out-to-bottom-full data-[state=open]:wu-slide-in-from-bottom-full",bottomLeft:"data-[state=closed]:wu-slide-out-to-bottom-full data-[state=open]:wu-slide-in-from-bottom-full"}},defaultVariants:{variant:"success",position:"top"}}),Cd=E.forwardRef(({className:e,variant:t,position:n,...r},s)=>a.jsx(Ee.Root,{ref:s,className:h(Lv({variant:t,position:n}),e),...r}));Cd.displayName=Ee.Root.displayName;const Fv=E.forwardRef(({className:e,...t},n)=>a.jsx(Ee.Action,{ref:n,className:h("wu-inline-flex wu-h-8 wu-shrink-0 wu-items-center wu-justify-center wu-border wu-bg-transparent wu-px-3 wu-text-sm wu-font-medium wu-ring-offset-background wu-transition-colors hover:wu-bg-secondary focus:wu-outline-none focus:wu-ring-2 focus:wu-ring-ring focus:wu-ring-offset-2 disabled:wu-cursor-not-allowed disabled:wu-opacity-50 group-[.destructive]:wu-border-muted/40 group-[.destructive]:hover:wu-border-destructive/30 group-[.destructive]:hover:wu-bg-destructive group-[.destructive]:hover:wu-text-destructive-foreground group-[.destructive]:focus:wu-ring-destructive",e),...t}));Fv.displayName=Ee.Action.displayName;const Td=E.forwardRef(({className:e,...t},n)=>a.jsx(Ee.Close,{ref:n,className:h("wu-relative wu-right-4 wu-bottom-2 wu-rounded-sm wu-w-4 wu-h-4 wu-p-1 wu-text-foreground/50 wu-opacity-100 wu-transition-opacity hover:wu-text-foreground focus:wu-opacity-100 focus:wu-outline-none group-hover:wu-opacity-100 group-[.destructive]:wu-text-red-300 group-[.destructive]:hover:wu-text-red-50 group-[.destructive]:focus:wu-ring-red-400 group-[.destructive]:focus:wu-ring-offset-red-600",e),"toast-close":"","aria-label":"Close toast",...t,children:a.jsx("span",{className:"wm-close wu-text-base"})}));Td.displayName=Ee.Close.displayName;const Ed=E.forwardRef(({className:e,...t},n)=>a.jsx(Ee.Title,{ref:n,className:h("wu-text-sm wu-font-semibold",e),...t}));Ed.displayName=Ee.Title.displayName;const Id=E.forwardRef(({className:e,...t},n)=>a.jsx(Ee.Description,{ref:n,className:h("wu-text-sm wu-opacity-90",e),...t}));Id.displayName=Ee.Description.displayName;function Wv(){const{toasts:e}=_v(),t=e.reduce((n,r)=>{const s=r.position||"top";return n[s]||(n[s]=[]),n[s].push(r),n},{});return a.jsx(Vv,{children:Object.entries(t).map(([n,r])=>a.jsx(Sd,{position:n,children:r.map(function({id:s,title:o,description:i,action:u,variant:l,position:d,...c}){const w={success:"wm-check-circle",info:"wm-info",warning:"wm-error",error:"wm-cancel"};return a.jsxs(Cd,{variant:l||"success",position:d,...c,children:[a.jsxs("div",{className:"wu-grid wu-gap-1",children:[o&&a.jsx(Ed,{children:o}),i&&a.jsxs(Id,{className:"wu-flex wu-items-center wu-gap-3 wu-pr-6",children:[a.jsx(Oe,{icon:w[l||"success"],className:"wu-text-xl"}),i]})]}),u,a.jsx(Td,{})]},s)})},n))})}const Bv=()=>a.jsx(Wv,{}),Md=E.forwardRef(({className:e,dir:t,...n},r)=>a.jsx(Wr.Root,{className:h("wu-bg-gray-40 wu-inline-flex wu-h-2 wu-w-8 wu-shrink-0 wu-cursor-pointer wu-items-center wu-rounded-full wu-transition-colors focus-visible:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-ring focus-visible:wu-ring-offset-[5px] focus-visible:wu-ring-offset-background disabled:wu-cursor-not-allowed disabled:wu-opacity-50 data-[state=unchecked]:wu-bg-gray-25 wu-group","hover:wu-bg-gray-subtle hover:data-[state=unchecked]:wu-bg-gray-subtle",e),...n,ref:r,children:a.jsx(Wr.Thumb,{className:h("wu-block wu-h-4 wu-w-4 wu-rounded-full wu-bg-gray-subtle wu-shadow-lg wu-ring-0 wu-transition-all data-[state=checked]:wu-bg-blue-p","group-hover:data-[state=unchecked]:wu-bg-gray-lead",t==="rtl"&&"-wu-translate-x-4 data-[state=unchecked]:wu-translate-x-0",t!=="rtl"&&"wu-translate-x-4 data-[state=unchecked]:wu-translate-x-0","wu-toggle-thumb")})}));Md.displayName=Wr.Root.displayName;const kd=f.forwardRef((e,t)=>{const{Label:n,labelPosition:r="right",onChange:s,className:o,dir:i,disabled:u,id:l=$r(),...d}=e;return f.useEffect(()=>{const{checked:c,defaultChecked:w}=d;c!==void 0&&w!==void 0&&console.error("WuToggle: Both `checked` and `defaultChecked` props are set. Use only one of them.")},[d.checked,d.defaultChecked]),a.jsxs("div",{className:h($v({labelPosition:r}),"wu-toggle-container"),dir:i,children:[a.jsx(Md,{...d,id:l,disabled:u,ref:t,onCheckedChange:s,className:h("wu-peer",o),dir:i}),a.jsx(Me,{htmlFor:l,className:"wu-toggle-label",children:n})]})});kd.displayName="WuToggle";const $v=Be.cva("wu-flex wu-items-center wu-gap-3 wu-w-fit",{variants:{labelPosition:{right:"wu-flex-row",left:"wu-flex-row-reverse",top:"wu-flex-col-reverse wu-items-baseline"}}}),Ar=f.createContext(null),qv=()=>{const e=f.useContext(Ar);if(!e)throw new Error("useTranslation must be used within a WuTranslationProvider");return e.useTranslation()},Hv=()=>{const e=f.useContext(Ar);if(!e)throw new Error("useLoadTranslationsFunction must be used within a WuTranslationProvider");return e},zv=({children:e})=>{const[t,n]=f.useState({}),[r,s]=f.useState({}),o=f.useCallback(async(d,c)=>{try{const m=await(await fetch(d)).json();n(m)}catch(w){console.error("Failed to load translations:",w),c&&n(c)}c&&s(c)},[]),i=f.useCallback(d=>{s(d)},[]),u=f.useCallback(()=>({t:(c,w)=>t[c]?t[c]:r[c]?r[c]:w||c}),[t,r]),l={loadTranslations:o,setFallbackTranslations:i,useTranslation:u};return a.jsx(Ar.Provider,{value:l,children:e})},Uv={qualitative:{"--wu-qualitative-1":"#4C5B94","--wu-qualitative-2":"#5B7AAE","--wu-qualitative-3":"#409EB5","--wu-qualitative-4":"#40B59E","--wu-qualitative-5":"#60C790","--wu-qualitative-6":"#9AD69A","--wu-qualitative-7":"#B3BD56","--wu-qualitative-8":"#DD8F40","--wu-qualitative-9":"#CE6550","--wu-qualitative-10":"#AE4C3D","--wu-qualitative-11":"#8F3328","--wu-qualitative-12":"#985D75","--wu-qualitative-13":"#B181A8","--wu-qualitative-14":"#C5A0C2","--wu-qualitative-15":"#DAC2E0","--wu-qualitative-16":"#E3D9E8"},blueSequential:{"--wu-blue-sequential-1":"#EBF8FF","--wu-blue-sequential-2":"#D7EFFF","--wu-blue-sequential-3":"#C2DEFF","--wu-blue-sequential-4":"#AAD0FF","--wu-blue-sequential-5":"#94C1F3","--wu-blue-sequential-6":"#7DB2E7","--wu-blue-sequential-7":"#67A3DB","--wu-blue-sequential-8":"#5194CF","--wu-blue-sequential-9":"#3B85C3","--wu-blue-sequential-10":"#2576B7","--wu-blue-sequential-11":"#256CAC","--wu-blue-sequential-12":"#1A60A6","--wu-blue-sequential-13":"#184994","--wu-blue-sequential-14":"#1C337F","--wu-blue-sequential-15":"#0D2163","--wu-blue-sequential-16":"#00083D"},greenSequential:{"--wu-green-sequential-1":"#E0F9ED","--wu-green-sequential-2":"#C4F3DC","--wu-green-sequential-3":"#A8ECCC","--wu-green-sequential-4":"#8DE5BD","--wu-green-sequential-5":"#78DDB1","--wu-green-sequential-6":"#62D3A3","--wu-green-sequential-7":"#4CC996","--wu-green-sequential-8":"#3ABF8A","--wu-green-sequential-9":"#35AF7F","--wu-green-sequential-10":"#329D75","--wu-green-sequential-11":"#308A6A","--wu-green-sequential-12":"#2D7A60","--wu-green-sequential-13":"#286A55","--wu-green-sequential-14":"#255C4B","--wu-green-sequential-15":"#1F4B3E","--wu-green-sequential-16":"#1B3D34"},redSequential:{"--wu-red-sequential-1":"#FEE9EC","--wu-red-sequential-2":"#FFD2D8","--wu-red-sequential-3":"#FFBBC4","--wu-red-sequential-4":"#FFA6B3","--wu-red-sequential-5":"#FB97A5","--wu-red-sequential-6":"#F78998","--wu-red-sequential-7":"#F37C8C","--wu-red-sequential-8":"#EE6F80","--wu-red-sequential-9":"#E76172","--wu-red-sequential-10":"#E15466","--wu-red-sequential-11":"#DA465B","--wu-red-sequential-12":"#D33B50","--wu-red-sequential-13":"#BC3548","--wu-red-sequential-14":"#A73343","--wu-red-sequential-15":"#91313E","--wu-red-sequential-16":"#7D2D38"},orangeSequential:{"--wu-orange-sequential-1":"#FDEDE5","--wu-orange-sequential-2":"#FCDFCF","--wu-orange-sequential-3":"#FBCFBA","--wu-orange-sequential-4":"#FAC5AB","--wu-orange-sequential-5":"#F7B694","--wu-orange-sequential-6":"#F6AB85","--wu-orange-sequential-7":"#F79D70","--wu-orange-sequential-8":"#F6915F","--wu-orange-sequential-9":"#EF8450","--wu-orange-sequential-10":"#E37944","--wu-orange-sequential-11":"#DB713C","--wu-orange-sequential-12":"#D06530","--wu-orange-sequential-13":"#C95E29","--wu-orange-sequential-14":"#BD521C","--wu-orange-sequential-15":"#B24610","--wu-orange-sequential-16":"#AA3F08"},divergent:{"--wu-red-divergent-1":"#661200","--wu-red-divergent-2":"#A11C00","--wu-red-divergent-3":"#D2300E","--wu-red-divergent-4":"#DF4828","--wu-red-divergent-5":"#EB6A4A","--wu-red-divergent-6":"#F4896C","--wu-red-divergent-7":"#FFC4B3","--wu-red-divergent-8":"#FFE2D9","--wu-divergent-neutral":"#F5F5F5","--wu-blue-divergent-1":"#DBD9E9","--wu-blue-divergent-2":"#B7B5D4","--wu-blue-divergent-3":"#9392BF","--wu-blue-divergent-4":"#7070AA","--wu-blue-divergent-5":"#4A5195","--wu-blue-divergent-6":"#1B3380","--wu-blue-divergent-7":"#182D72","--wu-blue-divergent-8":"#122254"},nps:{"--wu-nps-detractor":"#F85271","--wu-nps-passive":"#F1DA7E","--wu-nps-promoter":"#42BD84"},sentiment:{"--wu-sentiment-negative":"#F85271","--wu-sentiment-slightly-negative":"#F69A79","--wu-sentiment-neutral":"#F1DA7E","--wu-sentiment-slightly-positive":"#94D08B","--wu-sentiment-positive":"#42BD84","--wu-sentiment-no-sentiment":"#E0E0E0"}};let Dd={};const _r=e=>{Dd=e},jv=e=>Dd[e]??e,Ad=f.createContext(null),_d=()=>{const e=f.useContext(Ad);if(!e)throw new Error("[WuTranslateProvider] Must be used within a provider.");return e},Pd=e=>e.name==="AbortError",Gv=({children:e,defaultLocale:t="en",baseApi:n="https://admin2.questionpro.com/cs/api/gad/translate",keys:r="/wick-ui-i18n.json"})=>{const[s,o]=f.useState(t),[i,u]=f.useState({}),[l,d]=f.useState(!0),c=f.useRef(!1),w=f.useCallback(p=>{c.current=!0,o(p)},[]);f.useEffect(()=>{c.current||o(t)},[t]),f.useEffect(()=>{const p=new AbortController;return(async()=>{d(!0);try{const g=await fetch(r,{signal:p.signal});if(!g.ok)throw new Error("Failed to fetch translation keys");const y=await g.json();if(s==="en"){_r(y),u(y);return}try{const x=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({keys:y,code:s}),signal:p.signal});if(!x.ok)throw new Error("Failed to fetch translations");const{data:v}=await x.json();_r(v),u(v)}catch(x){if(Pd(x))return;console.error("[WuTranslateProvider] Translation fetch failed:",x),_r(y),u(y)}}catch(g){if(Pd(g))return;console.error("[WuTranslateProvider] Keys fetch failed:",g),_r({}),u({})}finally{p.signal.aborted||d(!1)}})(),()=>{p.abort()}},[s,n,r]);const m=f.useMemo(()=>({dictionary:i,locale:s,setLocale:w,isLoading:l}),[i,s,l,w]);return a.jsx(Ad.Provider,{value:m,children:e})},Vd=f.memo(({__i18nKey:e})=>{const{dictionary:t}=_d();return a.jsx(a.Fragment,{children:t[e]??e})});Vd.displayName="WuTranslate",typeof window<"u"&&(window.wickUiVersion="1.48.0",window.wickUiIcon="9.1.0",window.wickUiEditor="0.14.1"),Object.defineProperty(k,"useContext",{enumerable:!0,get:()=>f.useContext}),k.CHART_COLOR_SYSTEM=Uv,k.WuAccordion=ew,k.WuActivityLog=rw,k.WuAppHeader=Tw,k.WuAppHeaderAccount=io,k.WuAppHeaderBar=fo,k.WuAppHeaderHelp=uo,k.WuAppHeaderMenu=wo,k.WuAppHeaderSearch=Sw,k.WuButton=Ie,k.WuCalender=Jr,k.WuCard=Ro,k.WuCardFooter=ti,k.WuCardHeader=ei,k.WuCheckbox=qe,k.WuChip=ri,k.WuCombobox=Uf,k.WuCopyToClipboard=jf,k.WuDataTable=vv,k.WuDatePicker=Aw,k.WuDateRangePicker=Vf,k.WuDisplay=hw,k.WuDrawer=Qf,k.WuDrawerClose=Rf,k.WuDrilldown=tb,k.WuFooter=Sl,k.WuFormGroup=Dw,k.WuHeading=fw,k.WuHelpButton=Cl,k.WuIcon=Oe,k.WuInput=Re,k.WuInputError=Iw,k.WuInputHint=Mw,k.WuLabel=Me,k.WuListbox=El,k.WuLoader=ct,k.WuMenu=ya,k.WuMenuCheckboxItem=jg,k.WuMenuIcon=va,k.WuMenuItem=hr,k.WuMenuItemGroup=Gg,k.WuMenuRadioItem=Kg,k.WuMenuSeparatorItem=Yg,k.WuModal=bb,k.WuModalClose=Nb,k.WuModalContent=yb,k.WuModalFooter=xb,k.WuModalHeader=vb,k.WuMonthPicker=Ib,k.WuPagination=$l,k.WuPopover=Df,k.WuPopoverClose=hs,k.WuPrimaryNavbar=kb,k.WuRadioGroup=Ul,k.WuScrollArea=Ab,k.WuSecondaryNavbar=Db,k.WuSelect=Fl,k.WuSharedSurvey=qc,k.WuSidebar=uy,k.WuSidebarCollapsibleMenu=fy,k.WuSidebarContent=ly,k.WuSidebarFooter=cy,k.WuSidebarGroup=dy,k.WuSidebarItem=mc,k.WuSidebarMenu=wy,k.WuSidebarTrigger=hc,k.WuSpotlight=_l,k.WuStackedCard=my,k.WuStackedCardOverlay=gy,k.WuStepper=nv,k.WuSubMenu=Xg,k.WuSubtext=pw,k.WuSurveyItem=Hc,k.WuSurveyList=zc,k.WuSurveySelect=jc,k.WuSurveySource=av,k.WuSwitcher=Jc,k.WuTab=dv,k.WuTable=xv,k.WuText=ww,k.WuTextarea=hd,k.WuTimePicker=vd,k.WuToast=Bv,k.WuToggle=kd,k.WuTooltip=An,k.WuTranslate=Vd,k.WuTranslateProvider=Gv,k.WuTranslationContext=Ar,k.WuTranslationProvider=zv,k.WuTruncatedLabel=Cw,k.WuVirtualScroll=Mt,k.calculatePosition=hy,k.useTranslation=qv,k.useTranslationsContext=Hv,k.useWickuiTranslate=_d,k.useWuShowToast=Pv,k.useWuSidebar=at,k.wt=jv,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})}));