@devalok/shilp-sutra 0.17.2 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (318) hide show
  1. package/dist/_chunks/avatar.js +21 -19
  2. package/dist/_chunks/button-group.js +27 -0
  3. package/dist/_chunks/button.js +53 -35
  4. package/dist/_chunks/card.js +50 -0
  5. package/dist/_chunks/checkbox.js +11 -9
  6. package/dist/_chunks/date-utils.js +13 -0
  7. package/dist/_chunks/form.js +20 -20
  8. package/dist/_chunks/link-context.js +19 -0
  9. package/dist/_chunks/motion.js +1376 -0
  10. package/dist/_chunks/motion2.js +35 -0
  11. package/dist/_chunks/primitives.js +3499 -3920
  12. package/dist/_chunks/sidebar.js +225 -211
  13. package/dist/_chunks/spinner.js +58 -28
  14. package/dist/_chunks/tiptap.js +1 -1
  15. package/dist/_chunks/tooltip.js +27 -10
  16. package/dist/_chunks/tree-view.js +180 -178
  17. package/dist/_chunks/use-calendar.js +531 -515
  18. package/dist/_chunks/utils.js +3 -3
  19. package/dist/_chunks/vendor-client.js +1792 -1049
  20. package/dist/_chunks/vendor-utils.js +5123 -1169
  21. package/dist/composed/activity-feed.d.ts.map +1 -1
  22. package/dist/composed/activity-feed.js +71 -74
  23. package/dist/composed/avatar-group.js +36 -36
  24. package/dist/composed/command-palette.d.ts +1 -1
  25. package/dist/composed/command-palette.d.ts.map +1 -1
  26. package/dist/composed/command-palette.js +207 -158
  27. package/dist/composed/confirm-dialog.d.ts +3 -5
  28. package/dist/composed/confirm-dialog.d.ts.map +1 -1
  29. package/dist/composed/confirm-dialog.js +46 -41
  30. package/dist/composed/content-card.d.ts +1 -1
  31. package/dist/composed/content-card.js +29 -29
  32. package/dist/composed/date-picker/calendar-grid.d.ts +1 -1
  33. package/dist/composed/date-picker/calendar-grid.d.ts.map +1 -1
  34. package/dist/composed/date-picker/date-picker.d.ts +1 -1
  35. package/dist/composed/date-picker/date-picker.d.ts.map +1 -1
  36. package/dist/composed/date-picker/date-range-picker.d.ts +1 -1
  37. package/dist/composed/date-picker/date-range-picker.d.ts.map +1 -1
  38. package/dist/composed/date-picker/date-time-picker.d.ts +1 -1
  39. package/dist/composed/date-picker/date-time-picker.d.ts.map +1 -1
  40. package/dist/composed/date-picker/month-picker.d.ts +1 -1
  41. package/dist/composed/date-picker/month-picker.d.ts.map +1 -1
  42. package/dist/composed/date-picker/presets.d.ts +1 -1
  43. package/dist/composed/date-picker/presets.d.ts.map +1 -1
  44. package/dist/composed/date-picker/time-picker.d.ts +1 -1
  45. package/dist/composed/date-picker/time-picker.d.ts.map +1 -1
  46. package/dist/composed/date-picker/year-picker.d.ts +1 -1
  47. package/dist/composed/date-picker/year-picker.d.ts.map +1 -1
  48. package/dist/composed/empty-state.d.ts +1 -0
  49. package/dist/composed/empty-state.d.ts.map +1 -1
  50. package/dist/composed/empty-state.js +51 -47
  51. package/dist/composed/error-boundary.d.ts +1 -1
  52. package/dist/composed/error-boundary.d.ts.map +1 -1
  53. package/dist/composed/error-boundary.js +48 -48
  54. package/dist/composed/extensions/mention-suggestion.d.ts +1 -1
  55. package/dist/composed/extensions/mention-suggestion.d.ts.map +1 -1
  56. package/dist/composed/global-loading.d.ts +1 -1
  57. package/dist/composed/global-loading.d.ts.map +1 -1
  58. package/dist/composed/global-loading.js +23 -20
  59. package/dist/composed/index.d.ts +2 -4
  60. package/dist/composed/index.d.ts.map +1 -1
  61. package/dist/composed/index.js +26 -29
  62. package/dist/composed/loading-skeleton.d.ts +1 -1
  63. package/dist/composed/loading-skeleton.d.ts.map +1 -1
  64. package/dist/composed/loading-skeleton.js +92 -87
  65. package/dist/composed/member-picker.d.ts +1 -1
  66. package/dist/composed/member-picker.d.ts.map +1 -1
  67. package/dist/composed/member-picker.js +47 -43
  68. package/dist/composed/page-header.js +36 -36
  69. package/dist/composed/page-skeletons.d.ts +9 -3
  70. package/dist/composed/page-skeletons.d.ts.map +1 -1
  71. package/dist/composed/page-skeletons.js +58 -58
  72. package/dist/composed/priority-indicator.js +19 -19
  73. package/dist/composed/rich-text-editor.d.ts +3 -3
  74. package/dist/composed/rich-text-editor.d.ts.map +1 -1
  75. package/dist/composed/rich-text-editor.js +316 -309
  76. package/dist/composed/schedule-view.js +88 -88
  77. package/dist/composed/simple-tooltip.d.ts +2 -5
  78. package/dist/composed/simple-tooltip.d.ts.map +1 -1
  79. package/dist/composed/simple-tooltip.js +19 -14
  80. package/dist/composed/status-badge.d.ts +2 -1
  81. package/dist/composed/status-badge.d.ts.map +1 -1
  82. package/dist/composed/status-badge.js +76 -63
  83. package/dist/hooks/index.d.ts +2 -1
  84. package/dist/hooks/index.d.ts.map +1 -1
  85. package/dist/hooks/index.js +3 -4
  86. package/dist/hooks/use-toast.d.ts +15 -45
  87. package/dist/hooks/use-toast.d.ts.map +1 -1
  88. package/dist/hooks/use-toast.js +2 -95
  89. package/dist/motion/index.d.ts +4 -0
  90. package/dist/motion/index.d.ts.map +1 -0
  91. package/dist/motion/index.js +10 -0
  92. package/dist/motion/motion-provider.d.ts +18 -0
  93. package/dist/motion/motion-provider.d.ts.map +1 -0
  94. package/dist/motion/motion-provider.js +24 -0
  95. package/dist/motion/primitives-index.d.ts +3 -0
  96. package/dist/motion/primitives-index.d.ts.map +1 -0
  97. package/dist/motion/primitives-index.js +11 -0
  98. package/dist/motion/primitives.d.ts +38 -0
  99. package/dist/motion/primitives.d.ts.map +1 -0
  100. package/dist/motion/primitives.js +187 -0
  101. package/dist/shell/app-command-palette.d.ts +14 -5
  102. package/dist/shell/app-command-palette.d.ts.map +1 -1
  103. package/dist/shell/app-command-palette.js +152 -130
  104. package/dist/shell/bottom-navbar.d.ts.map +1 -1
  105. package/dist/shell/bottom-navbar.js +90 -92
  106. package/dist/shell/command-registry.d.ts +23 -0
  107. package/dist/shell/command-registry.d.ts.map +1 -0
  108. package/dist/shell/command-registry.js +18 -0
  109. package/dist/shell/index.d.ts +2 -1
  110. package/dist/shell/index.d.ts.map +1 -1
  111. package/dist/shell/index.js +14 -11
  112. package/dist/shell/link-context.d.ts +6 -10
  113. package/dist/shell/link-context.d.ts.map +1 -1
  114. package/dist/shell/link-context.js +3 -16
  115. package/dist/shell/notification-center.d.ts.map +1 -1
  116. package/dist/shell/notification-center.js +137 -132
  117. package/dist/shell/notification-preferences.d.ts +10 -5
  118. package/dist/shell/notification-preferences.d.ts.map +1 -1
  119. package/dist/shell/notification-preferences.js +168 -165
  120. package/dist/shell/sidebar.js +119 -119
  121. package/dist/shell/top-bar.js +65 -65
  122. package/dist/tailwind/index.cjs +118 -297
  123. package/dist/tailwind/preset.d.ts.map +1 -1
  124. package/dist/tailwind/preset.js +118 -297
  125. package/dist/tokens/generate-scale.d.ts +86 -0
  126. package/dist/tokens/generate-scale.d.ts.map +1 -0
  127. package/dist/tokens/primitives.css +415 -187
  128. package/dist/tokens/semantic.css +244 -270
  129. package/dist/tokens/typography.css +6 -6
  130. package/dist/ui/accordion.d.ts.map +1 -1
  131. package/dist/ui/accordion.js +32 -22
  132. package/dist/ui/alert-dialog.d.ts +4 -1
  133. package/dist/ui/alert-dialog.d.ts.map +1 -1
  134. package/dist/ui/alert-dialog.js +114 -73
  135. package/dist/ui/alert.d.ts +6 -1
  136. package/dist/ui/alert.d.ts.map +1 -1
  137. package/dist/ui/alert.js +64 -49
  138. package/dist/ui/aspect-ratio.d.ts +2 -1
  139. package/dist/ui/aspect-ratio.d.ts.map +1 -1
  140. package/dist/ui/aspect-ratio.js +14 -4
  141. package/dist/ui/autocomplete.d.ts +11 -2
  142. package/dist/ui/autocomplete.d.ts.map +1 -1
  143. package/dist/ui/autocomplete.js +82 -57
  144. package/dist/ui/avatar.d.ts.map +1 -1
  145. package/dist/ui/avatar.js +45 -34
  146. package/dist/ui/badge.d.ts +1 -1
  147. package/dist/ui/badge.d.ts.map +1 -1
  148. package/dist/ui/badge.js +70 -65
  149. package/dist/ui/banner.d.ts.map +1 -1
  150. package/dist/ui/banner.js +53 -39
  151. package/dist/ui/breadcrumb.d.ts +2 -0
  152. package/dist/ui/breadcrumb.d.ts.map +1 -1
  153. package/dist/ui/breadcrumb.js +21 -21
  154. package/dist/ui/button.d.ts +10 -1
  155. package/dist/ui/button.d.ts.map +1 -1
  156. package/dist/ui/button.js +103 -67
  157. package/dist/ui/card.d.ts +2 -2
  158. package/dist/ui/card.d.ts.map +1 -1
  159. package/dist/ui/card.js +61 -53
  160. package/dist/ui/charts/_internal/animation.d.ts +1 -1
  161. package/dist/ui/charts/_internal/animation.d.ts.map +1 -1
  162. package/dist/ui/charts/area-chart.d.ts +3 -5
  163. package/dist/ui/charts/area-chart.d.ts.map +1 -1
  164. package/dist/ui/charts/bar-chart.d.ts +3 -5
  165. package/dist/ui/charts/bar-chart.d.ts.map +1 -1
  166. package/dist/ui/charts/chart-container.d.ts +2 -5
  167. package/dist/ui/charts/chart-container.d.ts.map +1 -1
  168. package/dist/ui/charts/gauge-chart.d.ts +3 -5
  169. package/dist/ui/charts/gauge-chart.d.ts.map +1 -1
  170. package/dist/ui/charts/index.js +1204 -1095
  171. package/dist/ui/charts/line-chart.d.ts +3 -5
  172. package/dist/ui/charts/line-chart.d.ts.map +1 -1
  173. package/dist/ui/charts/pie-chart.d.ts +2 -5
  174. package/dist/ui/charts/pie-chart.d.ts.map +1 -1
  175. package/dist/ui/charts/radar-chart.d.ts +3 -5
  176. package/dist/ui/charts/radar-chart.d.ts.map +1 -1
  177. package/dist/ui/charts/sparkline.d.ts +5 -5
  178. package/dist/ui/charts/sparkline.d.ts.map +1 -1
  179. package/dist/ui/checkbox.d.ts.map +1 -1
  180. package/dist/ui/checkbox.js +31 -19
  181. package/dist/ui/chip.d.ts +3 -2
  182. package/dist/ui/chip.d.ts.map +1 -1
  183. package/dist/ui/chip.js +62 -54
  184. package/dist/ui/code.js +16 -16
  185. package/dist/ui/collapsible.d.ts.map +1 -1
  186. package/dist/ui/collapsible.js +23 -15
  187. package/dist/ui/color-input.d.ts +1 -1
  188. package/dist/ui/color-input.d.ts.map +1 -1
  189. package/dist/ui/color-input.js +27 -27
  190. package/dist/ui/combobox.d.ts +2 -0
  191. package/dist/ui/combobox.d.ts.map +1 -1
  192. package/dist/ui/combobox.js +177 -166
  193. package/dist/ui/context-menu.d.ts +4 -2
  194. package/dist/ui/context-menu.d.ts.map +1 -1
  195. package/dist/ui/context-menu.js +146 -86
  196. package/dist/ui/data-table-toolbar.d.ts +3 -2
  197. package/dist/ui/data-table-toolbar.d.ts.map +1 -1
  198. package/dist/ui/data-table-toolbar.js +61 -59
  199. package/dist/ui/data-table.d.ts.map +1 -1
  200. package/dist/ui/data-table.js +289 -254
  201. package/dist/ui/dialog.d.ts +3 -1
  202. package/dist/ui/dialog.d.ts.map +1 -1
  203. package/dist/ui/dialog.js +114 -74
  204. package/dist/ui/dropdown-menu.d.ts +5 -3
  205. package/dist/ui/dropdown-menu.d.ts.map +1 -1
  206. package/dist/ui/dropdown-menu.js +150 -89
  207. package/dist/ui/file-upload.d.ts.map +1 -1
  208. package/dist/ui/file-upload.js +169 -127
  209. package/dist/ui/form.d.ts.map +1 -1
  210. package/dist/ui/form.js +29 -26
  211. package/dist/ui/hover-card.d.ts +1 -1
  212. package/dist/ui/hover-card.d.ts.map +1 -1
  213. package/dist/ui/hover-card.js +53 -21
  214. package/dist/ui/index.d.ts +18 -18
  215. package/dist/ui/index.d.ts.map +1 -1
  216. package/dist/ui/index.js +432 -449
  217. package/dist/ui/input-otp.d.ts +2 -0
  218. package/dist/ui/input-otp.d.ts.map +1 -1
  219. package/dist/ui/input-otp.js +7 -7
  220. package/dist/ui/input.d.ts.map +1 -1
  221. package/dist/ui/input.js +36 -34
  222. package/dist/ui/label.js +12 -12
  223. package/dist/ui/lib/date-utils.d.ts +6 -0
  224. package/dist/ui/lib/date-utils.d.ts.map +1 -0
  225. package/dist/ui/lib/index.d.ts +7 -0
  226. package/dist/ui/lib/index.d.ts.map +1 -0
  227. package/dist/ui/lib/link-context.d.ts +13 -0
  228. package/dist/ui/lib/link-context.d.ts.map +1 -0
  229. package/dist/ui/lib/motion.d.ts +44 -9
  230. package/dist/ui/lib/motion.d.ts.map +1 -1
  231. package/dist/ui/lib/use-ripple.d.ts.map +1 -1
  232. package/dist/ui/lib/utils.js +1 -1
  233. package/dist/ui/link.js +11 -11
  234. package/dist/ui/menubar.d.ts +4 -2
  235. package/dist/ui/menubar.d.ts.map +1 -1
  236. package/dist/ui/menubar.js +141 -97
  237. package/dist/ui/navigation-menu.d.ts +2 -0
  238. package/dist/ui/navigation-menu.d.ts.map +1 -1
  239. package/dist/ui/navigation-menu.js +176 -73
  240. package/dist/ui/number-input.d.ts.map +1 -1
  241. package/dist/ui/number-input.js +56 -49
  242. package/dist/ui/pagination.js +22 -22
  243. package/dist/ui/popover.d.ts +2 -1
  244. package/dist/ui/popover.d.ts.map +1 -1
  245. package/dist/ui/popover.js +54 -22
  246. package/dist/ui/progress.d.ts.map +1 -1
  247. package/dist/ui/progress.js +58 -42
  248. package/dist/ui/radio.js +19 -19
  249. package/dist/ui/search-input.d.ts.map +1 -1
  250. package/dist/ui/search-input.js +28 -33
  251. package/dist/ui/segmented-control.d.ts +2 -2
  252. package/dist/ui/segmented-control.d.ts.map +1 -1
  253. package/dist/ui/segmented-control.js +143 -124
  254. package/dist/ui/select.d.ts.map +1 -1
  255. package/dist/ui/select.js +72 -61
  256. package/dist/ui/separator.js +11 -11
  257. package/dist/ui/sheet.d.ts +1 -1
  258. package/dist/ui/sheet.d.ts.map +1 -1
  259. package/dist/ui/sheet.js +111 -75
  260. package/dist/ui/sidebar.d.ts +6 -1
  261. package/dist/ui/sidebar.d.ts.map +1 -1
  262. package/dist/ui/sidebar.js +27 -25
  263. package/dist/ui/skeleton.js +1 -1
  264. package/dist/ui/slider.d.ts +9 -0
  265. package/dist/ui/slider.d.ts.map +1 -1
  266. package/dist/ui/slider.js +33 -27
  267. package/dist/ui/spinner.d.ts +32 -25
  268. package/dist/ui/spinner.d.ts.map +1 -1
  269. package/dist/ui/spinner.js +199 -40
  270. package/dist/ui/stat-card.d.ts.map +1 -1
  271. package/dist/ui/stat-card.js +183 -116
  272. package/dist/ui/stepper.d.ts +22 -1
  273. package/dist/ui/stepper.d.ts.map +1 -1
  274. package/dist/ui/stepper.js +121 -43
  275. package/dist/ui/switch.d.ts.map +1 -1
  276. package/dist/ui/switch.js +39 -26
  277. package/dist/ui/table.d.ts +3 -0
  278. package/dist/ui/table.d.ts.map +1 -1
  279. package/dist/ui/table.js +47 -47
  280. package/dist/ui/tabs.d.ts +4 -1
  281. package/dist/ui/tabs.d.ts.map +1 -1
  282. package/dist/ui/tabs.js +94 -44
  283. package/dist/ui/text.d.ts +3 -3
  284. package/dist/ui/text.js +1 -1
  285. package/dist/ui/textarea.d.ts.map +1 -1
  286. package/dist/ui/textarea.js +29 -27
  287. package/dist/ui/toast-types.d.ts +43 -0
  288. package/dist/ui/toast-types.d.ts.map +1 -0
  289. package/dist/ui/toast-types.js +2 -0
  290. package/dist/ui/toast.d.ts +60 -26
  291. package/dist/ui/toast.d.ts.map +1 -1
  292. package/dist/ui/toast.js +535 -89
  293. package/dist/ui/toaster.d.ts +19 -23
  294. package/dist/ui/toaster.d.ts.map +1 -1
  295. package/dist/ui/toaster.js +31 -21
  296. package/dist/ui/toggle-group.d.ts +2 -2
  297. package/dist/ui/toggle-group.d.ts.map +1 -1
  298. package/dist/ui/toggle-group.js +29 -26
  299. package/dist/ui/toggle.d.ts +2 -2
  300. package/dist/ui/toggle.d.ts.map +1 -1
  301. package/dist/ui/toggle.js +21 -17
  302. package/dist/ui/tooltip.d.ts +2 -1
  303. package/dist/ui/tooltip.d.ts.map +1 -1
  304. package/dist/ui/tooltip.js +58 -21
  305. package/dist/ui/tree-view/tree-view.d.ts +1 -1
  306. package/dist/ui/tree-view/tree-view.d.ts.map +1 -1
  307. package/llms-full.txt +221 -102
  308. package/llms.txt +65 -12
  309. package/package.json +26 -8
  310. package/dist/_chunks/switch.js +0 -10
  311. package/dist/composed/upload-progress.d.ts +0 -33
  312. package/dist/composed/upload-progress.d.ts.map +0 -1
  313. package/dist/composed/upload-progress.js +0 -386
  314. package/dist/ui/lib/use-reduced-motion.d.ts +0 -4
  315. package/dist/ui/lib/use-reduced-motion.d.ts.map +0 -1
  316. package/dist/ui/transitions.d.ts +0 -17
  317. package/dist/ui/transitions.d.ts.map +0 -1
  318. package/dist/ui/transitions.js +0 -111
@@ -1,14 +1,15 @@
1
1
  "use client";
2
- import * as w from "react";
3
- import { useState as Se, useLayoutEffect as Ce } from "react";
4
- import { _ as Z, a as re, b as Re } from "./vendor-utils.js";
5
- import * as Ae from "react-dom";
6
- var ht = "right-scroll-bar-position", mt = "width-before-scroll-bar", Ee = "with-scroll-bars-hidden", Oe = "--removed-body-scroll-bar-size";
7
- function At(t, e) {
2
+ import * as S from "react";
3
+ import v, { useState as Dn, useLayoutEffect as Nn } from "react";
4
+ import { a5 as mt, a6 as Je, a7 as Pn } from "./vendor-utils.js";
5
+ import * as Ln from "react-dom";
6
+ import Bn from "react-dom";
7
+ var qt = "right-scroll-bar-position", Kt = "width-before-scroll-bar", _n = "with-scroll-bars-hidden", In = "--removed-body-scroll-bar-size";
8
+ function ce(t, e) {
8
9
  return typeof t == "function" ? t(e) : t && (t.current = e), t;
9
10
  }
10
- function Me(t, e) {
11
- var n = Se(function() {
11
+ function Hn(t, e) {
12
+ var n = Dn(function() {
12
13
  return {
13
14
  // value
14
15
  value: t,
@@ -19,62 +20,62 @@ function Me(t, e) {
19
20
  get current() {
20
21
  return n.value;
21
22
  },
22
- set current(r) {
23
- var o = n.value;
24
- o !== r && (n.value = r, n.callback(r, o));
23
+ set current(o) {
24
+ var a = n.value;
25
+ a !== o && (n.value = o, n.callback(o, a));
25
26
  }
26
27
  }
27
28
  };
28
29
  })[0];
29
30
  return n.callback = e, n.facade;
30
31
  }
31
- var Pe = typeof window < "u" ? w.useLayoutEffect : w.useEffect, It = /* @__PURE__ */ new WeakMap();
32
- function ke(t, e) {
33
- var n = Me(null, function(r) {
34
- return t.forEach(function(o) {
35
- return At(o, r);
32
+ var Fn = typeof window < "u" ? S.useLayoutEffect : S.useEffect, Be = /* @__PURE__ */ new WeakMap();
33
+ function Wn(t, e) {
34
+ var n = Hn(null, function(o) {
35
+ return t.forEach(function(a) {
36
+ return ce(a, o);
36
37
  });
37
38
  });
38
- return Pe(function() {
39
- var r = It.get(n);
40
- if (r) {
41
- var o = new Set(r), i = new Set(t), c = n.current;
42
- o.forEach(function(s) {
43
- i.has(s) || At(s, null);
44
- }), i.forEach(function(s) {
45
- o.has(s) || At(s, c);
39
+ return Fn(function() {
40
+ var o = Be.get(n);
41
+ if (o) {
42
+ var a = new Set(o), i = new Set(t), s = n.current;
43
+ a.forEach(function(l) {
44
+ i.has(l) || ce(l, null);
45
+ }), i.forEach(function(l) {
46
+ a.has(l) || ce(l, s);
46
47
  });
47
48
  }
48
- It.set(n, t);
49
+ Be.set(n, t);
49
50
  }, [t]), n;
50
51
  }
51
- function Le(t) {
52
+ function $n(t) {
52
53
  return t;
53
54
  }
54
- function Te(t, e) {
55
- e === void 0 && (e = Le);
56
- var n = [], r = !1, o = {
55
+ function zn(t, e) {
56
+ e === void 0 && (e = $n);
57
+ var n = [], o = !1, a = {
57
58
  read: function() {
58
- if (r)
59
+ if (o)
59
60
  throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
60
61
  return n.length ? n[n.length - 1] : t;
61
62
  },
62
63
  useMedium: function(i) {
63
- var c = e(i, r);
64
- return n.push(c), function() {
65
- n = n.filter(function(s) {
66
- return s !== c;
64
+ var s = e(i, o);
65
+ return n.push(s), function() {
66
+ n = n.filter(function(l) {
67
+ return l !== s;
67
68
  });
68
69
  };
69
70
  },
70
71
  assignSyncMedium: function(i) {
71
- for (r = !0; n.length; ) {
72
- var c = n;
73
- n = [], c.forEach(i);
72
+ for (o = !0; n.length; ) {
73
+ var s = n;
74
+ n = [], s.forEach(i);
74
75
  }
75
76
  n = {
76
- push: function(s) {
77
- return i(s);
77
+ push: function(l) {
78
+ return i(l);
78
79
  },
79
80
  filter: function() {
80
81
  return n;
@@ -82,501 +83,501 @@ function Te(t, e) {
82
83
  };
83
84
  },
84
85
  assignMedium: function(i) {
85
- r = !0;
86
- var c = [];
86
+ o = !0;
87
+ var s = [];
87
88
  if (n.length) {
88
- var s = n;
89
- n = [], s.forEach(i), c = n;
89
+ var l = n;
90
+ n = [], l.forEach(i), s = n;
90
91
  }
91
- var u = function() {
92
- var l = c;
93
- c = [], l.forEach(i);
94
- }, f = function() {
95
- return Promise.resolve().then(u);
92
+ var d = function() {
93
+ var u = s;
94
+ s = [], u.forEach(i);
95
+ }, c = function() {
96
+ return Promise.resolve().then(d);
96
97
  };
97
- f(), n = {
98
- push: function(l) {
99
- c.push(l), f();
98
+ c(), n = {
99
+ push: function(u) {
100
+ s.push(u), c();
100
101
  },
101
- filter: function(l) {
102
- return c = c.filter(l), n;
102
+ filter: function(u) {
103
+ return s = s.filter(u), n;
103
104
  }
104
105
  };
105
106
  }
106
107
  };
107
- return o;
108
+ return a;
108
109
  }
109
- function De(t) {
110
+ function Vn(t) {
110
111
  t === void 0 && (t = {});
111
- var e = Te(null);
112
- return e.options = Z({ async: !0, ssr: !1 }, t), e;
112
+ var e = zn(null);
113
+ return e.options = mt({ async: !0, ssr: !1 }, t), e;
113
114
  }
114
- var oe = function(t) {
115
- var e = t.sideCar, n = re(t, ["sideCar"]);
115
+ var tn = function(t) {
116
+ var e = t.sideCar, n = Je(t, ["sideCar"]);
116
117
  if (!e)
117
118
  throw new Error("Sidecar: please provide `sideCar` property to import the right car");
118
- var r = e.read();
119
- if (!r)
119
+ var o = e.read();
120
+ if (!o)
120
121
  throw new Error("Sidecar medium not found");
121
- return w.createElement(r, Z({}, n));
122
+ return S.createElement(o, mt({}, n));
122
123
  };
123
- oe.isSideCarExport = !0;
124
- function We(t, e) {
125
- return t.useMedium(e), oe;
126
- }
127
- var ie = De(), Et = function() {
128
- }, xt = w.forwardRef(function(t, e) {
129
- var n = w.useRef(null), r = w.useState({
130
- onScrollCapture: Et,
131
- onWheelCapture: Et,
132
- onTouchMoveCapture: Et
133
- }), o = r[0], i = r[1], c = t.forwardProps, s = t.children, u = t.className, f = t.removeScrollBar, l = t.enabled, a = t.shards, m = t.sideCar, h = t.noRelative, v = t.noIsolation, d = t.inert, g = t.allowPinchZoom, p = t.as, y = p === void 0 ? "div" : p, x = t.gapMode, b = re(t, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = m, C = ke([n, e]), R = Z(Z({}, b), o);
134
- return w.createElement(
135
- w.Fragment,
124
+ tn.isSideCarExport = !0;
125
+ function Yn(t, e) {
126
+ return t.useMedium(e), tn;
127
+ }
128
+ var en = Vn(), ue = function() {
129
+ }, ee = S.forwardRef(function(t, e) {
130
+ var n = S.useRef(null), o = S.useState({
131
+ onScrollCapture: ue,
132
+ onWheelCapture: ue,
133
+ onTouchMoveCapture: ue
134
+ }), a = o[0], i = o[1], s = t.forwardProps, l = t.children, d = t.className, c = t.removeScrollBar, u = t.enabled, r = t.shards, f = t.sideCar, m = t.noRelative, p = t.noIsolation, h = t.inert, y = t.allowPinchZoom, g = t.as, b = g === void 0 ? "div" : g, w = t.gapMode, x = Je(t, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), E = f, R = Wn([n, e]), A = mt(mt({}, x), a);
135
+ return S.createElement(
136
+ S.Fragment,
136
137
  null,
137
- l && w.createElement(S, { sideCar: ie, removeScrollBar: f, shards: a, noRelative: h, noIsolation: v, inert: d, setCallbacks: i, allowPinchZoom: !!g, lockRef: n, gapMode: x }),
138
- c ? w.cloneElement(w.Children.only(s), Z(Z({}, R), { ref: C })) : w.createElement(y, Z({}, R, { className: u, ref: C }), s)
138
+ u && S.createElement(E, { sideCar: en, removeScrollBar: c, shards: r, noRelative: m, noIsolation: p, inert: h, setCallbacks: i, allowPinchZoom: !!y, lockRef: n, gapMode: w }),
139
+ s ? S.cloneElement(S.Children.only(l), mt(mt({}, A), { ref: R })) : S.createElement(b, mt({}, A, { className: d, ref: R }), l)
139
140
  );
140
141
  });
141
- xt.defaultProps = {
142
+ ee.defaultProps = {
142
143
  enabled: !0,
143
144
  removeScrollBar: !0,
144
145
  inert: !1
145
146
  };
146
- xt.classNames = {
147
- fullWidth: mt,
148
- zeroRight: ht
147
+ ee.classNames = {
148
+ fullWidth: Kt,
149
+ zeroRight: qt
149
150
  };
150
- var Ne = function() {
151
+ var jn = function() {
151
152
  if (typeof __webpack_nonce__ < "u")
152
153
  return __webpack_nonce__;
153
154
  };
154
- function Be() {
155
+ function Xn() {
155
156
  if (!document)
156
157
  return null;
157
158
  var t = document.createElement("style");
158
159
  t.type = "text/css";
159
- var e = Ne();
160
+ var e = jn();
160
161
  return e && t.setAttribute("nonce", e), t;
161
162
  }
162
- function Fe(t, e) {
163
+ function Un(t, e) {
163
164
  t.styleSheet ? t.styleSheet.cssText = e : t.appendChild(document.createTextNode(e));
164
165
  }
165
- function Ve(t) {
166
+ function qn(t) {
166
167
  var e = document.head || document.getElementsByTagName("head")[0];
167
168
  e.appendChild(t);
168
169
  }
169
- var He = function() {
170
+ var Kn = function() {
170
171
  var t = 0, e = null;
171
172
  return {
172
173
  add: function(n) {
173
- t == 0 && (e = Be()) && (Fe(e, n), Ve(e)), t++;
174
+ t == 0 && (e = Xn()) && (Un(e, n), qn(e)), t++;
174
175
  },
175
176
  remove: function() {
176
177
  t--, !t && e && (e.parentNode && e.parentNode.removeChild(e), e = null);
177
178
  }
178
179
  };
179
- }, $e = function() {
180
- var t = He();
180
+ }, Zn = function() {
181
+ var t = Kn();
181
182
  return function(e, n) {
182
- w.useEffect(function() {
183
+ S.useEffect(function() {
183
184
  return t.add(e), function() {
184
185
  t.remove();
185
186
  };
186
187
  }, [e && n]);
187
188
  };
188
- }, ce = function() {
189
- var t = $e(), e = function(n) {
190
- var r = n.styles, o = n.dynamic;
191
- return t(r, o), null;
189
+ }, nn = function() {
190
+ var t = Zn(), e = function(n) {
191
+ var o = n.styles, a = n.dynamic;
192
+ return t(o, a), null;
192
193
  };
193
194
  return e;
194
- }, Ie = {
195
+ }, Gn = {
195
196
  left: 0,
196
197
  top: 0,
197
198
  right: 0,
198
199
  gap: 0
199
- }, Ot = function(t) {
200
+ }, de = function(t) {
200
201
  return parseInt(t || "", 10) || 0;
201
- }, ze = function(t) {
202
- var e = window.getComputedStyle(document.body), n = e[t === "padding" ? "paddingLeft" : "marginLeft"], r = e[t === "padding" ? "paddingTop" : "marginTop"], o = e[t === "padding" ? "paddingRight" : "marginRight"];
203
- return [Ot(n), Ot(r), Ot(o)];
204
- }, _e = function(t) {
202
+ }, Qn = function(t) {
203
+ var e = window.getComputedStyle(document.body), n = e[t === "padding" ? "paddingLeft" : "marginLeft"], o = e[t === "padding" ? "paddingTop" : "marginTop"], a = e[t === "padding" ? "paddingRight" : "marginRight"];
204
+ return [de(n), de(o), de(a)];
205
+ }, Jn = function(t) {
205
206
  if (t === void 0 && (t = "margin"), typeof window > "u")
206
- return Ie;
207
- var e = ze(t), n = document.documentElement.clientWidth, r = window.innerWidth;
207
+ return Gn;
208
+ var e = Qn(t), n = document.documentElement.clientWidth, o = window.innerWidth;
208
209
  return {
209
210
  left: e[0],
210
211
  top: e[1],
211
212
  right: e[2],
212
- gap: Math.max(0, r - n + e[2] - e[0])
213
+ gap: Math.max(0, o - n + e[2] - e[0])
213
214
  };
214
- }, Xe = ce(), et = "data-scroll-locked", Ye = function(t, e, n, r) {
215
- var o = t.left, i = t.top, c = t.right, s = t.gap;
215
+ }, to = nn(), kt = "data-scroll-locked", eo = function(t, e, n, o) {
216
+ var a = t.left, i = t.top, s = t.right, l = t.gap;
216
217
  return n === void 0 && (n = "margin"), `
217
- .`.concat(Ee, ` {
218
- overflow: hidden `).concat(r, `;
219
- padding-right: `).concat(s, "px ").concat(r, `;
218
+ .`.concat(_n, ` {
219
+ overflow: hidden `).concat(o, `;
220
+ padding-right: `).concat(l, "px ").concat(o, `;
220
221
  }
221
- body[`).concat(et, `] {
222
- overflow: hidden `).concat(r, `;
222
+ body[`).concat(kt, `] {
223
+ overflow: hidden `).concat(o, `;
223
224
  overscroll-behavior: contain;
224
225
  `).concat([
225
- e && "position: relative ".concat(r, ";"),
226
+ e && "position: relative ".concat(o, ";"),
226
227
  n === "margin" && `
227
- padding-left: `.concat(o, `px;
228
+ padding-left: `.concat(a, `px;
228
229
  padding-top: `).concat(i, `px;
229
- padding-right: `).concat(c, `px;
230
+ padding-right: `).concat(s, `px;
230
231
  margin-left:0;
231
232
  margin-top:0;
232
- margin-right: `).concat(s, "px ").concat(r, `;
233
+ margin-right: `).concat(l, "px ").concat(o, `;
233
234
  `),
234
- n === "padding" && "padding-right: ".concat(s, "px ").concat(r, ";")
235
+ n === "padding" && "padding-right: ".concat(l, "px ").concat(o, ";")
235
236
  ].filter(Boolean).join(""), `
236
237
  }
237
238
 
238
- .`).concat(ht, ` {
239
- right: `).concat(s, "px ").concat(r, `;
239
+ .`).concat(qt, ` {
240
+ right: `).concat(l, "px ").concat(o, `;
240
241
  }
241
242
 
242
- .`).concat(mt, ` {
243
- margin-right: `).concat(s, "px ").concat(r, `;
243
+ .`).concat(Kt, ` {
244
+ margin-right: `).concat(l, "px ").concat(o, `;
244
245
  }
245
246
 
246
- .`).concat(ht, " .").concat(ht, ` {
247
- right: 0 `).concat(r, `;
247
+ .`).concat(qt, " .").concat(qt, ` {
248
+ right: 0 `).concat(o, `;
248
249
  }
249
250
 
250
- .`).concat(mt, " .").concat(mt, ` {
251
- margin-right: 0 `).concat(r, `;
251
+ .`).concat(Kt, " .").concat(Kt, ` {
252
+ margin-right: 0 `).concat(o, `;
252
253
  }
253
254
 
254
- body[`).concat(et, `] {
255
- `).concat(Oe, ": ").concat(s, `px;
255
+ body[`).concat(kt, `] {
256
+ `).concat(In, ": ").concat(l, `px;
256
257
  }
257
258
  `);
258
- }, zt = function() {
259
- var t = parseInt(document.body.getAttribute(et) || "0", 10);
259
+ }, _e = function() {
260
+ var t = parseInt(document.body.getAttribute(kt) || "0", 10);
260
261
  return isFinite(t) ? t : 0;
261
- }, je = function() {
262
- w.useEffect(function() {
263
- return document.body.setAttribute(et, (zt() + 1).toString()), function() {
264
- var t = zt() - 1;
265
- t <= 0 ? document.body.removeAttribute(et) : document.body.setAttribute(et, t.toString());
262
+ }, no = function() {
263
+ S.useEffect(function() {
264
+ return document.body.setAttribute(kt, (_e() + 1).toString()), function() {
265
+ var t = _e() - 1;
266
+ t <= 0 ? document.body.removeAttribute(kt) : document.body.setAttribute(kt, t.toString());
266
267
  };
267
268
  }, []);
268
- }, qe = function(t) {
269
- var e = t.noRelative, n = t.noImportant, r = t.gapMode, o = r === void 0 ? "margin" : r;
270
- je();
271
- var i = w.useMemo(function() {
272
- return _e(o);
273
- }, [o]);
274
- return w.createElement(Xe, { styles: Ye(i, !e, o, n ? "" : "!important") });
275
- }, Lt = !1;
269
+ }, oo = function(t) {
270
+ var e = t.noRelative, n = t.noImportant, o = t.gapMode, a = o === void 0 ? "margin" : o;
271
+ no();
272
+ var i = S.useMemo(function() {
273
+ return Jn(a);
274
+ }, [a]);
275
+ return S.createElement(to, { styles: eo(i, !e, a, n ? "" : "!important") });
276
+ }, ge = !1;
276
277
  if (typeof window < "u")
277
278
  try {
278
- var at = Object.defineProperty({}, "passive", {
279
+ var zt = Object.defineProperty({}, "passive", {
279
280
  get: function() {
280
- return Lt = !0, !0;
281
+ return ge = !0, !0;
281
282
  }
282
283
  });
283
- window.addEventListener("test", at, at), window.removeEventListener("test", at, at);
284
+ window.addEventListener("test", zt, zt), window.removeEventListener("test", zt, zt);
284
285
  } catch {
285
- Lt = !1;
286
+ ge = !1;
286
287
  }
287
- var Q = Lt ? { passive: !1 } : !1, Ze = function(t) {
288
+ var Ct = ge ? { passive: !1 } : !1, ro = function(t) {
288
289
  return t.tagName === "TEXTAREA";
289
- }, se = function(t, e) {
290
+ }, on = function(t, e) {
290
291
  if (!(t instanceof Element))
291
292
  return !1;
292
293
  var n = window.getComputedStyle(t);
293
294
  return (
294
295
  // not-not-scrollable
295
296
  n[e] !== "hidden" && // contains scroll inside self
296
- !(n.overflowY === n.overflowX && !Ze(t) && n[e] === "visible")
297
+ !(n.overflowY === n.overflowX && !ro(t) && n[e] === "visible")
297
298
  );
298
- }, Ue = function(t) {
299
- return se(t, "overflowY");
300
- }, Ge = function(t) {
301
- return se(t, "overflowX");
302
- }, _t = function(t, e) {
303
- var n = e.ownerDocument, r = e;
299
+ }, ao = function(t) {
300
+ return on(t, "overflowY");
301
+ }, io = function(t) {
302
+ return on(t, "overflowX");
303
+ }, Ie = function(t, e) {
304
+ var n = e.ownerDocument, o = e;
304
305
  do {
305
- typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
306
- var o = ae(t, r);
307
- if (o) {
308
- var i = le(t, r), c = i[1], s = i[2];
309
- if (c > s)
306
+ typeof ShadowRoot < "u" && o instanceof ShadowRoot && (o = o.host);
307
+ var a = rn(t, o);
308
+ if (a) {
309
+ var i = an(t, o), s = i[1], l = i[2];
310
+ if (s > l)
310
311
  return !0;
311
312
  }
312
- r = r.parentNode;
313
- } while (r && r !== n.body);
313
+ o = o.parentNode;
314
+ } while (o && o !== n.body);
314
315
  return !1;
315
- }, Ke = function(t) {
316
- var e = t.scrollTop, n = t.scrollHeight, r = t.clientHeight;
316
+ }, so = function(t) {
317
+ var e = t.scrollTop, n = t.scrollHeight, o = t.clientHeight;
317
318
  return [
318
319
  e,
319
320
  n,
320
- r
321
+ o
321
322
  ];
322
- }, Qe = function(t) {
323
- var e = t.scrollLeft, n = t.scrollWidth, r = t.clientWidth;
323
+ }, lo = function(t) {
324
+ var e = t.scrollLeft, n = t.scrollWidth, o = t.clientWidth;
324
325
  return [
325
326
  e,
326
327
  n,
327
- r
328
+ o
328
329
  ];
329
- }, ae = function(t, e) {
330
- return t === "v" ? Ue(e) : Ge(e);
331
- }, le = function(t, e) {
332
- return t === "v" ? Ke(e) : Qe(e);
333
- }, Je = function(t, e) {
330
+ }, rn = function(t, e) {
331
+ return t === "v" ? ao(e) : io(e);
332
+ }, an = function(t, e) {
333
+ return t === "v" ? so(e) : lo(e);
334
+ }, co = function(t, e) {
334
335
  return t === "h" && e === "rtl" ? -1 : 1;
335
- }, tn = function(t, e, n, r, o) {
336
- var i = Je(t, window.getComputedStyle(e).direction), c = i * r, s = n.target, u = e.contains(s), f = !1, l = c > 0, a = 0, m = 0;
336
+ }, uo = function(t, e, n, o, a) {
337
+ var i = co(t, window.getComputedStyle(e).direction), s = i * o, l = n.target, d = e.contains(l), c = !1, u = s > 0, r = 0, f = 0;
337
338
  do {
338
- if (!s)
339
+ if (!l)
339
340
  break;
340
- var h = le(t, s), v = h[0], d = h[1], g = h[2], p = d - g - i * v;
341
- (v || p) && ae(t, s) && (a += p, m += v);
342
- var y = s.parentNode;
343
- s = y && y.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? y.host : y;
341
+ var m = an(t, l), p = m[0], h = m[1], y = m[2], g = h - y - i * p;
342
+ (p || g) && rn(t, l) && (r += g, f += p);
343
+ var b = l.parentNode;
344
+ l = b && b.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? b.host : b;
344
345
  } while (
345
346
  // portaled content
346
- !u && s !== document.body || // self content
347
- u && (e.contains(s) || e === s)
347
+ !d && l !== document.body || // self content
348
+ d && (e.contains(l) || e === l)
348
349
  );
349
- return (l && Math.abs(a) < 1 || !l && Math.abs(m) < 1) && (f = !0), f;
350
- }, lt = function(t) {
350
+ return (u && Math.abs(r) < 1 || !u && Math.abs(f) < 1) && (c = !0), c;
351
+ }, Vt = function(t) {
351
352
  return "changedTouches" in t ? [t.changedTouches[0].clientX, t.changedTouches[0].clientY] : [0, 0];
352
- }, Xt = function(t) {
353
+ }, He = function(t) {
353
354
  return [t.deltaX, t.deltaY];
354
- }, Yt = function(t) {
355
+ }, Fe = function(t) {
355
356
  return t && "current" in t ? t.current : t;
356
- }, en = function(t, e) {
357
+ }, fo = function(t, e) {
357
358
  return t[0] === e[0] && t[1] === e[1];
358
- }, nn = function(t) {
359
+ }, mo = function(t) {
359
360
  return `
360
361
  .block-interactivity-`.concat(t, ` {pointer-events: none;}
361
362
  .allow-interactivity-`).concat(t, ` {pointer-events: all;}
362
363
  `);
363
- }, rn = 0, J = [];
364
- function on(t) {
365
- var e = w.useRef([]), n = w.useRef([0, 0]), r = w.useRef(), o = w.useState(rn++)[0], i = w.useState(ce)[0], c = w.useRef(t);
366
- w.useEffect(function() {
367
- c.current = t;
368
- }, [t]), w.useEffect(function() {
364
+ }, ho = 0, Tt = [];
365
+ function go(t) {
366
+ var e = S.useRef([]), n = S.useRef([0, 0]), o = S.useRef(), a = S.useState(ho++)[0], i = S.useState(nn)[0], s = S.useRef(t);
367
+ S.useEffect(function() {
368
+ s.current = t;
369
+ }, [t]), S.useEffect(function() {
369
370
  if (t.inert) {
370
- document.body.classList.add("block-interactivity-".concat(o));
371
- var d = Re([t.lockRef.current], (t.shards || []).map(Yt), !0).filter(Boolean);
372
- return d.forEach(function(g) {
373
- return g.classList.add("allow-interactivity-".concat(o));
371
+ document.body.classList.add("block-interactivity-".concat(a));
372
+ var h = Pn([t.lockRef.current], (t.shards || []).map(Fe), !0).filter(Boolean);
373
+ return h.forEach(function(y) {
374
+ return y.classList.add("allow-interactivity-".concat(a));
374
375
  }), function() {
375
- document.body.classList.remove("block-interactivity-".concat(o)), d.forEach(function(g) {
376
- return g.classList.remove("allow-interactivity-".concat(o));
376
+ document.body.classList.remove("block-interactivity-".concat(a)), h.forEach(function(y) {
377
+ return y.classList.remove("allow-interactivity-".concat(a));
377
378
  });
378
379
  };
379
380
  }
380
381
  }, [t.inert, t.lockRef.current, t.shards]);
381
- var s = w.useCallback(function(d, g) {
382
- if ("touches" in d && d.touches.length === 2 || d.type === "wheel" && d.ctrlKey)
383
- return !c.current.allowPinchZoom;
384
- var p = lt(d), y = n.current, x = "deltaX" in d ? d.deltaX : y[0] - p[0], b = "deltaY" in d ? d.deltaY : y[1] - p[1], S, C = d.target, R = Math.abs(x) > Math.abs(b) ? "h" : "v";
385
- if ("touches" in d && R === "h" && C.type === "range")
382
+ var l = S.useCallback(function(h, y) {
383
+ if ("touches" in h && h.touches.length === 2 || h.type === "wheel" && h.ctrlKey)
384
+ return !s.current.allowPinchZoom;
385
+ var g = Vt(h), b = n.current, w = "deltaX" in h ? h.deltaX : b[0] - g[0], x = "deltaY" in h ? h.deltaY : b[1] - g[1], E, R = h.target, A = Math.abs(w) > Math.abs(x) ? "h" : "v";
386
+ if ("touches" in h && A === "h" && R.type === "range")
386
387
  return !1;
387
- var M = window.getSelection(), L = M && M.anchorNode, O = L ? L === C || L.contains(C) : !1;
388
- if (O)
388
+ var D = window.getSelection(), $ = D && D.anchorNode, B = $ ? $ === R || $.contains(R) : !1;
389
+ if (B)
389
390
  return !1;
390
- var P = _t(R, C);
391
- if (!P)
391
+ var H = Ie(A, R);
392
+ if (!H)
392
393
  return !0;
393
- if (P ? S = R : (S = R === "v" ? "h" : "v", P = _t(R, C)), !P)
394
+ if (H ? E = A : (E = A === "v" ? "h" : "v", H = Ie(A, R)), !H)
394
395
  return !1;
395
- if (!r.current && "changedTouches" in d && (x || b) && (r.current = S), !S)
396
+ if (!o.current && "changedTouches" in h && (w || x) && (o.current = E), !E)
396
397
  return !0;
397
- var T = r.current || S;
398
- return tn(T, g, d, T === "h" ? x : b);
399
- }, []), u = w.useCallback(function(d) {
400
- var g = d;
401
- if (!(!J.length || J[J.length - 1] !== i)) {
402
- var p = "deltaY" in g ? Xt(g) : lt(g), y = e.current.filter(function(S) {
403
- return S.name === g.type && (S.target === g.target || g.target === S.shadowParent) && en(S.delta, p);
398
+ var _ = o.current || E;
399
+ return uo(_, y, h, _ === "h" ? w : x);
400
+ }, []), d = S.useCallback(function(h) {
401
+ var y = h;
402
+ if (!(!Tt.length || Tt[Tt.length - 1] !== i)) {
403
+ var g = "deltaY" in y ? He(y) : Vt(y), b = e.current.filter(function(E) {
404
+ return E.name === y.type && (E.target === y.target || y.target === E.shadowParent) && fo(E.delta, g);
404
405
  })[0];
405
- if (y && y.should) {
406
- g.cancelable && g.preventDefault();
406
+ if (b && b.should) {
407
+ y.cancelable && y.preventDefault();
407
408
  return;
408
409
  }
409
- if (!y) {
410
- var x = (c.current.shards || []).map(Yt).filter(Boolean).filter(function(S) {
411
- return S.contains(g.target);
412
- }), b = x.length > 0 ? s(g, x[0]) : !c.current.noIsolation;
413
- b && g.cancelable && g.preventDefault();
410
+ if (!b) {
411
+ var w = (s.current.shards || []).map(Fe).filter(Boolean).filter(function(E) {
412
+ return E.contains(y.target);
413
+ }), x = w.length > 0 ? l(y, w[0]) : !s.current.noIsolation;
414
+ x && y.cancelable && y.preventDefault();
414
415
  }
415
416
  }
416
- }, []), f = w.useCallback(function(d, g, p, y) {
417
- var x = { name: d, delta: g, target: p, should: y, shadowParent: cn(p) };
418
- e.current.push(x), setTimeout(function() {
419
- e.current = e.current.filter(function(b) {
420
- return b !== x;
417
+ }, []), c = S.useCallback(function(h, y, g, b) {
418
+ var w = { name: h, delta: y, target: g, should: b, shadowParent: po(g) };
419
+ e.current.push(w), setTimeout(function() {
420
+ e.current = e.current.filter(function(x) {
421
+ return x !== w;
421
422
  });
422
423
  }, 1);
423
- }, []), l = w.useCallback(function(d) {
424
- n.current = lt(d), r.current = void 0;
425
- }, []), a = w.useCallback(function(d) {
426
- f(d.type, Xt(d), d.target, s(d, t.lockRef.current));
427
- }, []), m = w.useCallback(function(d) {
428
- f(d.type, lt(d), d.target, s(d, t.lockRef.current));
424
+ }, []), u = S.useCallback(function(h) {
425
+ n.current = Vt(h), o.current = void 0;
426
+ }, []), r = S.useCallback(function(h) {
427
+ c(h.type, He(h), h.target, l(h, t.lockRef.current));
428
+ }, []), f = S.useCallback(function(h) {
429
+ c(h.type, Vt(h), h.target, l(h, t.lockRef.current));
429
430
  }, []);
430
- w.useEffect(function() {
431
- return J.push(i), t.setCallbacks({
432
- onScrollCapture: a,
433
- onWheelCapture: a,
434
- onTouchMoveCapture: m
435
- }), document.addEventListener("wheel", u, Q), document.addEventListener("touchmove", u, Q), document.addEventListener("touchstart", l, Q), function() {
436
- J = J.filter(function(d) {
437
- return d !== i;
438
- }), document.removeEventListener("wheel", u, Q), document.removeEventListener("touchmove", u, Q), document.removeEventListener("touchstart", l, Q);
431
+ S.useEffect(function() {
432
+ return Tt.push(i), t.setCallbacks({
433
+ onScrollCapture: r,
434
+ onWheelCapture: r,
435
+ onTouchMoveCapture: f
436
+ }), document.addEventListener("wheel", d, Ct), document.addEventListener("touchmove", d, Ct), document.addEventListener("touchstart", u, Ct), function() {
437
+ Tt = Tt.filter(function(h) {
438
+ return h !== i;
439
+ }), document.removeEventListener("wheel", d, Ct), document.removeEventListener("touchmove", d, Ct), document.removeEventListener("touchstart", u, Ct);
439
440
  };
440
441
  }, []);
441
- var h = t.removeScrollBar, v = t.inert;
442
- return w.createElement(
443
- w.Fragment,
442
+ var m = t.removeScrollBar, p = t.inert;
443
+ return S.createElement(
444
+ S.Fragment,
444
445
  null,
445
- v ? w.createElement(i, { styles: nn(o) }) : null,
446
- h ? w.createElement(qe, { noRelative: t.noRelative, gapMode: t.gapMode }) : null
446
+ p ? S.createElement(i, { styles: mo(a) }) : null,
447
+ m ? S.createElement(oo, { noRelative: t.noRelative, gapMode: t.gapMode }) : null
447
448
  );
448
449
  }
449
- function cn(t) {
450
+ function po(t) {
450
451
  for (var e = null; t !== null; )
451
452
  t instanceof ShadowRoot && (e = t.host, t = t.host), t = t.parentNode;
452
453
  return e;
453
454
  }
454
- const sn = We(ie, on);
455
- var an = w.forwardRef(function(t, e) {
456
- return w.createElement(xt, Z({}, t, { ref: e, sideCar: sn }));
455
+ const vo = Yn(en, go);
456
+ var yo = S.forwardRef(function(t, e) {
457
+ return S.createElement(ee, mt({}, t, { ref: e, sideCar: vo }));
457
458
  });
458
- an.classNames = xt.classNames;
459
- var ln = function(t) {
459
+ yo.classNames = ee.classNames;
460
+ var bo = function(t) {
460
461
  if (typeof document > "u")
461
462
  return null;
462
463
  var e = Array.isArray(t) ? t[0] : t;
463
464
  return e.ownerDocument.body;
464
- }, tt = /* @__PURE__ */ new WeakMap(), ft = /* @__PURE__ */ new WeakMap(), ut = {}, Mt = 0, fe = function(t) {
465
- return t && (t.host || fe(t.parentNode));
466
- }, fn = function(t, e) {
465
+ }, At = /* @__PURE__ */ new WeakMap(), Yt = /* @__PURE__ */ new WeakMap(), jt = {}, fe = 0, sn = function(t) {
466
+ return t && (t.host || sn(t.parentNode));
467
+ }, wo = function(t, e) {
467
468
  return e.map(function(n) {
468
469
  if (t.contains(n))
469
470
  return n;
470
- var r = fe(n);
471
- return r && t.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", t, ". Doing nothing"), null);
471
+ var o = sn(n);
472
+ return o && t.contains(o) ? o : (console.error("aria-hidden", n, "in not contained inside", t, ". Doing nothing"), null);
472
473
  }).filter(function(n) {
473
474
  return !!n;
474
475
  });
475
- }, un = function(t, e, n, r) {
476
- var o = fn(e, Array.isArray(t) ? t : [t]);
477
- ut[n] || (ut[n] = /* @__PURE__ */ new WeakMap());
478
- var i = ut[n], c = [], s = /* @__PURE__ */ new Set(), u = new Set(o), f = function(a) {
479
- !a || s.has(a) || (s.add(a), f(a.parentNode));
476
+ }, xo = function(t, e, n, o) {
477
+ var a = wo(e, Array.isArray(t) ? t : [t]);
478
+ jt[n] || (jt[n] = /* @__PURE__ */ new WeakMap());
479
+ var i = jt[n], s = [], l = /* @__PURE__ */ new Set(), d = new Set(a), c = function(r) {
480
+ !r || l.has(r) || (l.add(r), c(r.parentNode));
480
481
  };
481
- o.forEach(f);
482
- var l = function(a) {
483
- !a || u.has(a) || Array.prototype.forEach.call(a.children, function(m) {
484
- if (s.has(m))
485
- l(m);
482
+ a.forEach(c);
483
+ var u = function(r) {
484
+ !r || d.has(r) || Array.prototype.forEach.call(r.children, function(f) {
485
+ if (l.has(f))
486
+ u(f);
486
487
  else
487
488
  try {
488
- var h = m.getAttribute(r), v = h !== null && h !== "false", d = (tt.get(m) || 0) + 1, g = (i.get(m) || 0) + 1;
489
- tt.set(m, d), i.set(m, g), c.push(m), d === 1 && v && ft.set(m, !0), g === 1 && m.setAttribute(n, "true"), v || m.setAttribute(r, "true");
490
- } catch (p) {
491
- console.error("aria-hidden: cannot operate on ", m, p);
489
+ var m = f.getAttribute(o), p = m !== null && m !== "false", h = (At.get(f) || 0) + 1, y = (i.get(f) || 0) + 1;
490
+ At.set(f, h), i.set(f, y), s.push(f), h === 1 && p && Yt.set(f, !0), y === 1 && f.setAttribute(n, "true"), p || f.setAttribute(o, "true");
491
+ } catch (g) {
492
+ console.error("aria-hidden: cannot operate on ", f, g);
492
493
  }
493
494
  });
494
495
  };
495
- return l(e), s.clear(), Mt++, function() {
496
- c.forEach(function(a) {
497
- var m = tt.get(a) - 1, h = i.get(a) - 1;
498
- tt.set(a, m), i.set(a, h), m || (ft.has(a) || a.removeAttribute(r), ft.delete(a)), h || a.removeAttribute(n);
499
- }), Mt--, Mt || (tt = /* @__PURE__ */ new WeakMap(), tt = /* @__PURE__ */ new WeakMap(), ft = /* @__PURE__ */ new WeakMap(), ut = {});
496
+ return u(e), l.clear(), fe++, function() {
497
+ s.forEach(function(r) {
498
+ var f = At.get(r) - 1, m = i.get(r) - 1;
499
+ At.set(r, f), i.set(r, m), f || (Yt.has(r) || r.removeAttribute(o), Yt.delete(r)), m || r.removeAttribute(n);
500
+ }), fe--, fe || (At = /* @__PURE__ */ new WeakMap(), At = /* @__PURE__ */ new WeakMap(), Yt = /* @__PURE__ */ new WeakMap(), jt = {});
500
501
  };
501
- }, vr = function(t, e, n) {
502
+ }, ta = function(t, e, n) {
502
503
  n === void 0 && (n = "data-aria-hidden");
503
- var r = Array.from(Array.isArray(t) ? t : [t]), o = ln(t);
504
- return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), un(r, o, n, "aria-hidden")) : function() {
504
+ var o = Array.from(Array.isArray(t) ? t : [t]), a = bo(t);
505
+ return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live], script"))), xo(o, a, n, "aria-hidden")) : function() {
505
506
  return null;
506
507
  };
507
508
  };
508
- const dn = ["top", "right", "bottom", "left"], U = Math.min, B = Math.max, vt = Math.round, dt = Math.floor, z = (t) => ({
509
+ const So = ["top", "right", "bottom", "left"], ht = Math.min, Z = Math.max, Gt = Math.round, Xt = Math.floor, it = (t) => ({
509
510
  x: t,
510
511
  y: t
511
- }), hn = {
512
+ }), Eo = {
512
513
  left: "right",
513
514
  right: "left",
514
515
  bottom: "top",
515
516
  top: "bottom"
516
- }, mn = {
517
+ }, Ro = {
517
518
  start: "end",
518
519
  end: "start"
519
520
  };
520
- function Tt(t, e, n) {
521
- return B(t, U(e, n));
521
+ function pe(t, e, n) {
522
+ return Z(t, ht(e, n));
522
523
  }
523
- function Y(t, e) {
524
+ function ut(t, e) {
524
525
  return typeof t == "function" ? t(e) : t;
525
526
  }
526
- function j(t) {
527
+ function dt(t) {
527
528
  return t.split("-")[0];
528
529
  }
529
- function ot(t) {
530
+ function Dt(t) {
530
531
  return t.split("-")[1];
531
532
  }
532
- function Nt(t) {
533
+ function we(t) {
533
534
  return t === "x" ? "y" : "x";
534
535
  }
535
- function Bt(t) {
536
+ function xe(t) {
536
537
  return t === "y" ? "height" : "width";
537
538
  }
538
- const gn = /* @__PURE__ */ new Set(["top", "bottom"]);
539
- function I(t) {
540
- return gn.has(j(t)) ? "y" : "x";
539
+ const Co = /* @__PURE__ */ new Set(["top", "bottom"]);
540
+ function at(t) {
541
+ return Co.has(dt(t)) ? "y" : "x";
541
542
  }
542
- function Ft(t) {
543
- return Nt(I(t));
543
+ function Se(t) {
544
+ return we(at(t));
544
545
  }
545
- function vn(t, e, n) {
546
+ function To(t, e, n) {
546
547
  n === void 0 && (n = !1);
547
- const r = ot(t), o = Ft(t), i = Bt(o);
548
- let c = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
549
- return e.reference[i] > e.floating[i] && (c = pt(c)), [c, pt(c)];
548
+ const o = Dt(t), a = Se(t), i = xe(a);
549
+ let s = a === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
550
+ return e.reference[i] > e.floating[i] && (s = Qt(s)), [s, Qt(s)];
550
551
  }
551
- function pn(t) {
552
- const e = pt(t);
553
- return [Dt(t), e, Dt(e)];
552
+ function Ao(t) {
553
+ const e = Qt(t);
554
+ return [ve(t), e, ve(e)];
554
555
  }
555
- function Dt(t) {
556
- return t.replace(/start|end/g, (e) => mn[e]);
556
+ function ve(t) {
557
+ return t.replace(/start|end/g, (e) => Ro[e]);
557
558
  }
558
- const jt = ["left", "right"], qt = ["right", "left"], wn = ["top", "bottom"], yn = ["bottom", "top"];
559
- function xn(t, e, n) {
559
+ const We = ["left", "right"], $e = ["right", "left"], ko = ["top", "bottom"], Mo = ["bottom", "top"];
560
+ function Oo(t, e, n) {
560
561
  switch (t) {
561
562
  case "top":
562
563
  case "bottom":
563
- return n ? e ? qt : jt : e ? jt : qt;
564
+ return n ? e ? $e : We : e ? We : $e;
564
565
  case "left":
565
566
  case "right":
566
- return e ? wn : yn;
567
+ return e ? ko : Mo;
567
568
  default:
568
569
  return [];
569
570
  }
570
571
  }
571
- function bn(t, e, n, r) {
572
- const o = ot(t);
573
- let i = xn(j(t), n === "start", r);
574
- return o && (i = i.map((c) => c + "-" + o), e && (i = i.concat(i.map(Dt)))), i;
572
+ function Do(t, e, n, o) {
573
+ const a = Dt(t);
574
+ let i = Oo(dt(t), n === "start", o);
575
+ return a && (i = i.map((s) => s + "-" + a), e && (i = i.concat(i.map(ve)))), i;
575
576
  }
576
- function pt(t) {
577
- return t.replace(/left|right|bottom|top/g, (e) => hn[e]);
577
+ function Qt(t) {
578
+ return t.replace(/left|right|bottom|top/g, (e) => Eo[e]);
578
579
  }
579
- function Sn(t) {
580
+ function No(t) {
580
581
  return {
581
582
  top: 0,
582
583
  right: 0,
@@ -585,301 +586,301 @@ function Sn(t) {
585
586
  ...t
586
587
  };
587
588
  }
588
- function ue(t) {
589
- return typeof t != "number" ? Sn(t) : {
589
+ function ln(t) {
590
+ return typeof t != "number" ? No(t) : {
590
591
  top: t,
591
592
  right: t,
592
593
  bottom: t,
593
594
  left: t
594
595
  };
595
596
  }
596
- function wt(t) {
597
+ function Jt(t) {
597
598
  const {
598
599
  x: e,
599
600
  y: n,
600
- width: r,
601
- height: o
601
+ width: o,
602
+ height: a
602
603
  } = t;
603
604
  return {
604
- width: r,
605
- height: o,
605
+ width: o,
606
+ height: a,
606
607
  top: n,
607
608
  left: e,
608
- right: e + r,
609
- bottom: n + o,
609
+ right: e + o,
610
+ bottom: n + a,
610
611
  x: e,
611
612
  y: n
612
613
  };
613
614
  }
614
- function Zt(t, e, n) {
615
+ function ze(t, e, n) {
615
616
  let {
616
- reference: r,
617
- floating: o
617
+ reference: o,
618
+ floating: a
618
619
  } = t;
619
- const i = I(e), c = Ft(e), s = Bt(c), u = j(e), f = i === "y", l = r.x + r.width / 2 - o.width / 2, a = r.y + r.height / 2 - o.height / 2, m = r[s] / 2 - o[s] / 2;
620
- let h;
621
- switch (u) {
620
+ const i = at(e), s = Se(e), l = xe(s), d = dt(e), c = i === "y", u = o.x + o.width / 2 - a.width / 2, r = o.y + o.height / 2 - a.height / 2, f = o[l] / 2 - a[l] / 2;
621
+ let m;
622
+ switch (d) {
622
623
  case "top":
623
- h = {
624
- x: l,
625
- y: r.y - o.height
624
+ m = {
625
+ x: u,
626
+ y: o.y - a.height
626
627
  };
627
628
  break;
628
629
  case "bottom":
629
- h = {
630
- x: l,
631
- y: r.y + r.height
630
+ m = {
631
+ x: u,
632
+ y: o.y + o.height
632
633
  };
633
634
  break;
634
635
  case "right":
635
- h = {
636
- x: r.x + r.width,
637
- y: a
636
+ m = {
637
+ x: o.x + o.width,
638
+ y: r
638
639
  };
639
640
  break;
640
641
  case "left":
641
- h = {
642
- x: r.x - o.width,
643
- y: a
642
+ m = {
643
+ x: o.x - a.width,
644
+ y: r
644
645
  };
645
646
  break;
646
647
  default:
647
- h = {
648
- x: r.x,
649
- y: r.y
648
+ m = {
649
+ x: o.x,
650
+ y: o.y
650
651
  };
651
652
  }
652
- switch (ot(e)) {
653
+ switch (Dt(e)) {
653
654
  case "start":
654
- h[c] -= m * (n && f ? -1 : 1);
655
+ m[s] -= f * (n && c ? -1 : 1);
655
656
  break;
656
657
  case "end":
657
- h[c] += m * (n && f ? -1 : 1);
658
+ m[s] += f * (n && c ? -1 : 1);
658
659
  break;
659
660
  }
660
- return h;
661
+ return m;
661
662
  }
662
- async function Cn(t, e) {
663
+ async function Po(t, e) {
663
664
  var n;
664
665
  e === void 0 && (e = {});
665
666
  const {
666
- x: r,
667
- y: o,
667
+ x: o,
668
+ y: a,
668
669
  platform: i,
669
- rects: c,
670
- elements: s,
671
- strategy: u
670
+ rects: s,
671
+ elements: l,
672
+ strategy: d
672
673
  } = t, {
673
- boundary: f = "clippingAncestors",
674
- rootBoundary: l = "viewport",
675
- elementContext: a = "floating",
676
- altBoundary: m = !1,
677
- padding: h = 0
678
- } = Y(e, t), v = ue(h), g = s[m ? a === "floating" ? "reference" : "floating" : a], p = wt(await i.getClippingRect({
679
- element: (n = await (i.isElement == null ? void 0 : i.isElement(g))) == null || n ? g : g.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(s.floating)),
680
- boundary: f,
681
- rootBoundary: l,
682
- strategy: u
683
- })), y = a === "floating" ? {
684
- x: r,
685
- y: o,
686
- width: c.floating.width,
687
- height: c.floating.height
688
- } : c.reference, x = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(s.floating)), b = await (i.isElement == null ? void 0 : i.isElement(x)) ? await (i.getScale == null ? void 0 : i.getScale(x)) || {
674
+ boundary: c = "clippingAncestors",
675
+ rootBoundary: u = "viewport",
676
+ elementContext: r = "floating",
677
+ altBoundary: f = !1,
678
+ padding: m = 0
679
+ } = ut(e, t), p = ln(m), y = l[f ? r === "floating" ? "reference" : "floating" : r], g = Jt(await i.getClippingRect({
680
+ element: (n = await (i.isElement == null ? void 0 : i.isElement(y))) == null || n ? y : y.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(l.floating)),
681
+ boundary: c,
682
+ rootBoundary: u,
683
+ strategy: d
684
+ })), b = r === "floating" ? {
685
+ x: o,
686
+ y: a,
687
+ width: s.floating.width,
688
+ height: s.floating.height
689
+ } : s.reference, w = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l.floating)), x = await (i.isElement == null ? void 0 : i.isElement(w)) ? await (i.getScale == null ? void 0 : i.getScale(w)) || {
689
690
  x: 1,
690
691
  y: 1
691
692
  } : {
692
693
  x: 1,
693
694
  y: 1
694
- }, S = wt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
695
- elements: s,
696
- rect: y,
697
- offsetParent: x,
698
- strategy: u
699
- }) : y);
695
+ }, E = Jt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
696
+ elements: l,
697
+ rect: b,
698
+ offsetParent: w,
699
+ strategy: d
700
+ }) : b);
700
701
  return {
701
- top: (p.top - S.top + v.top) / b.y,
702
- bottom: (S.bottom - p.bottom + v.bottom) / b.y,
703
- left: (p.left - S.left + v.left) / b.x,
704
- right: (S.right - p.right + v.right) / b.x
702
+ top: (g.top - E.top + p.top) / x.y,
703
+ bottom: (E.bottom - g.bottom + p.bottom) / x.y,
704
+ left: (g.left - E.left + p.left) / x.x,
705
+ right: (E.right - g.right + p.right) / x.x
705
706
  };
706
707
  }
707
- const Rn = async (t, e, n) => {
708
+ const Lo = async (t, e, n) => {
708
709
  const {
709
- placement: r = "bottom",
710
- strategy: o = "absolute",
710
+ placement: o = "bottom",
711
+ strategy: a = "absolute",
711
712
  middleware: i = [],
712
- platform: c
713
- } = n, s = i.filter(Boolean), u = await (c.isRTL == null ? void 0 : c.isRTL(e));
714
- let f = await c.getElementRects({
713
+ platform: s
714
+ } = n, l = i.filter(Boolean), d = await (s.isRTL == null ? void 0 : s.isRTL(e));
715
+ let c = await s.getElementRects({
715
716
  reference: t,
716
717
  floating: e,
717
- strategy: o
718
+ strategy: a
718
719
  }), {
719
- x: l,
720
- y: a
721
- } = Zt(f, r, u), m = r, h = {}, v = 0;
722
- for (let g = 0; g < s.length; g++) {
723
- var d;
720
+ x: u,
721
+ y: r
722
+ } = ze(c, o, d), f = o, m = {}, p = 0;
723
+ for (let y = 0; y < l.length; y++) {
724
+ var h;
724
725
  const {
725
- name: p,
726
- fn: y
727
- } = s[g], {
728
- x,
729
- y: b,
730
- data: S,
731
- reset: C
732
- } = await y({
733
- x: l,
734
- y: a,
735
- initialPlacement: r,
736
- placement: m,
737
- strategy: o,
738
- middlewareData: h,
739
- rects: f,
726
+ name: g,
727
+ fn: b
728
+ } = l[y], {
729
+ x: w,
730
+ y: x,
731
+ data: E,
732
+ reset: R
733
+ } = await b({
734
+ x: u,
735
+ y: r,
736
+ initialPlacement: o,
737
+ placement: f,
738
+ strategy: a,
739
+ middlewareData: m,
740
+ rects: c,
740
741
  platform: {
741
- ...c,
742
- detectOverflow: (d = c.detectOverflow) != null ? d : Cn
742
+ ...s,
743
+ detectOverflow: (h = s.detectOverflow) != null ? h : Po
743
744
  },
744
745
  elements: {
745
746
  reference: t,
746
747
  floating: e
747
748
  }
748
749
  });
749
- l = x ?? l, a = b ?? a, h = {
750
- ...h,
751
- [p]: {
752
- ...h[p],
753
- ...S
750
+ u = w ?? u, r = x ?? r, m = {
751
+ ...m,
752
+ [g]: {
753
+ ...m[g],
754
+ ...E
754
755
  }
755
- }, C && v <= 50 && (v++, typeof C == "object" && (C.placement && (m = C.placement), C.rects && (f = C.rects === !0 ? await c.getElementRects({
756
+ }, R && p <= 50 && (p++, typeof R == "object" && (R.placement && (f = R.placement), R.rects && (c = R.rects === !0 ? await s.getElementRects({
756
757
  reference: t,
757
758
  floating: e,
758
- strategy: o
759
- }) : C.rects), {
760
- x: l,
761
- y: a
762
- } = Zt(f, m, u)), g = -1);
759
+ strategy: a
760
+ }) : R.rects), {
761
+ x: u,
762
+ y: r
763
+ } = ze(c, f, d)), y = -1);
763
764
  }
764
765
  return {
765
- x: l,
766
- y: a,
767
- placement: m,
768
- strategy: o,
769
- middlewareData: h
766
+ x: u,
767
+ y: r,
768
+ placement: f,
769
+ strategy: a,
770
+ middlewareData: m
770
771
  };
771
- }, An = (t) => ({
772
+ }, Bo = (t) => ({
772
773
  name: "arrow",
773
774
  options: t,
774
775
  async fn(e) {
775
776
  const {
776
777
  x: n,
777
- y: r,
778
- placement: o,
778
+ y: o,
779
+ placement: a,
779
780
  rects: i,
780
- platform: c,
781
- elements: s,
782
- middlewareData: u
781
+ platform: s,
782
+ elements: l,
783
+ middlewareData: d
783
784
  } = e, {
784
- element: f,
785
- padding: l = 0
786
- } = Y(t, e) || {};
787
- if (f == null)
785
+ element: c,
786
+ padding: u = 0
787
+ } = ut(t, e) || {};
788
+ if (c == null)
788
789
  return {};
789
- const a = ue(l), m = {
790
+ const r = ln(u), f = {
790
791
  x: n,
791
- y: r
792
- }, h = Ft(o), v = Bt(h), d = await c.getDimensions(f), g = h === "y", p = g ? "top" : "left", y = g ? "bottom" : "right", x = g ? "clientHeight" : "clientWidth", b = i.reference[v] + i.reference[h] - m[h] - i.floating[v], S = m[h] - i.reference[h], C = await (c.getOffsetParent == null ? void 0 : c.getOffsetParent(f));
793
- let R = C ? C[x] : 0;
794
- (!R || !await (c.isElement == null ? void 0 : c.isElement(C))) && (R = s.floating[x] || i.floating[v]);
795
- const M = b / 2 - S / 2, L = R / 2 - d[v] / 2 - 1, O = U(a[p], L), P = U(a[y], L), T = O, D = R - d[v] - P, E = R / 2 - d[v] / 2 + M, $ = Tt(T, E, D), k = !u.arrow && ot(o) != null && E !== $ && i.reference[v] / 2 - (E < T ? O : P) - d[v] / 2 < 0, W = k ? E < T ? E - T : E - D : 0;
792
+ y: o
793
+ }, m = Se(a), p = xe(m), h = await s.getDimensions(c), y = m === "y", g = y ? "top" : "left", b = y ? "bottom" : "right", w = y ? "clientHeight" : "clientWidth", x = i.reference[p] + i.reference[m] - f[m] - i.floating[p], E = f[m] - i.reference[m], R = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c));
794
+ let A = R ? R[w] : 0;
795
+ (!A || !await (s.isElement == null ? void 0 : s.isElement(R))) && (A = l.floating[w] || i.floating[p]);
796
+ const D = x / 2 - E / 2, $ = A / 2 - h[p] / 2 - 1, B = ht(r[g], $), H = ht(r[b], $), _ = B, N = A - h[p] - H, P = A / 2 - h[p] / 2 + D, j = pe(_, P, N), C = !d.arrow && Dt(a) != null && P !== j && i.reference[p] / 2 - (P < _ ? B : H) - h[p] / 2 < 0, O = C ? P < _ ? P - _ : P - N : 0;
796
797
  return {
797
- [h]: m[h] + W,
798
+ [m]: f[m] + O,
798
799
  data: {
799
- [h]: $,
800
- centerOffset: E - $ - W,
801
- ...k && {
802
- alignmentOffset: W
800
+ [m]: j,
801
+ centerOffset: P - j - O,
802
+ ...C && {
803
+ alignmentOffset: O
803
804
  }
804
805
  },
805
- reset: k
806
+ reset: C
806
807
  };
807
808
  }
808
- }), En = function(t) {
809
+ }), _o = function(t) {
809
810
  return t === void 0 && (t = {}), {
810
811
  name: "flip",
811
812
  options: t,
812
813
  async fn(e) {
813
- var n, r;
814
+ var n, o;
814
815
  const {
815
- placement: o,
816
+ placement: a,
816
817
  middlewareData: i,
817
- rects: c,
818
- initialPlacement: s,
819
- platform: u,
820
- elements: f
818
+ rects: s,
819
+ initialPlacement: l,
820
+ platform: d,
821
+ elements: c
821
822
  } = e, {
822
- mainAxis: l = !0,
823
- crossAxis: a = !0,
824
- fallbackPlacements: m,
825
- fallbackStrategy: h = "bestFit",
826
- fallbackAxisSideDirection: v = "none",
827
- flipAlignment: d = !0,
828
- ...g
829
- } = Y(t, e);
823
+ mainAxis: u = !0,
824
+ crossAxis: r = !0,
825
+ fallbackPlacements: f,
826
+ fallbackStrategy: m = "bestFit",
827
+ fallbackAxisSideDirection: p = "none",
828
+ flipAlignment: h = !0,
829
+ ...y
830
+ } = ut(t, e);
830
831
  if ((n = i.arrow) != null && n.alignmentOffset)
831
832
  return {};
832
- const p = j(o), y = I(s), x = j(s) === s, b = await (u.isRTL == null ? void 0 : u.isRTL(f.floating)), S = m || (x || !d ? [pt(s)] : pn(s)), C = v !== "none";
833
- !m && C && S.push(...bn(s, d, v, b));
834
- const R = [s, ...S], M = await u.detectOverflow(e, g), L = [];
835
- let O = ((r = i.flip) == null ? void 0 : r.overflows) || [];
836
- if (l && L.push(M[p]), a) {
837
- const E = vn(o, c, b);
838
- L.push(M[E[0]], M[E[1]]);
833
+ const g = dt(a), b = at(l), w = dt(l) === l, x = await (d.isRTL == null ? void 0 : d.isRTL(c.floating)), E = f || (w || !h ? [Qt(l)] : Ao(l)), R = p !== "none";
834
+ !f && R && E.push(...Do(l, h, p, x));
835
+ const A = [l, ...E], D = await d.detectOverflow(e, y), $ = [];
836
+ let B = ((o = i.flip) == null ? void 0 : o.overflows) || [];
837
+ if (u && $.push(D[g]), r) {
838
+ const P = To(a, s, x);
839
+ $.push(D[P[0]], D[P[1]]);
839
840
  }
840
- if (O = [...O, {
841
- placement: o,
842
- overflows: L
843
- }], !L.every((E) => E <= 0)) {
844
- var P, T;
845
- const E = (((P = i.flip) == null ? void 0 : P.index) || 0) + 1, $ = R[E];
846
- if ($ && (!(a === "alignment" ? y !== I($) : !1) || // We leave the current main axis only if every placement on that axis
841
+ if (B = [...B, {
842
+ placement: a,
843
+ overflows: $
844
+ }], !$.every((P) => P <= 0)) {
845
+ var H, _;
846
+ const P = (((H = i.flip) == null ? void 0 : H.index) || 0) + 1, j = A[P];
847
+ if (j && (!(r === "alignment" ? b !== at(j) : !1) || // We leave the current main axis only if every placement on that axis
847
848
  // overflows the main axis.
848
- O.every((A) => I(A.placement) === y ? A.overflows[0] > 0 : !0)))
849
+ B.every((k) => at(k.placement) === b ? k.overflows[0] > 0 : !0)))
849
850
  return {
850
851
  data: {
851
- index: E,
852
- overflows: O
852
+ index: P,
853
+ overflows: B
853
854
  },
854
855
  reset: {
855
- placement: $
856
+ placement: j
856
857
  }
857
858
  };
858
- let k = (T = O.filter((W) => W.overflows[0] <= 0).sort((W, A) => W.overflows[1] - A.overflows[1])[0]) == null ? void 0 : T.placement;
859
- if (!k)
860
- switch (h) {
859
+ let C = (_ = B.filter((O) => O.overflows[0] <= 0).sort((O, k) => O.overflows[1] - k.overflows[1])[0]) == null ? void 0 : _.placement;
860
+ if (!C)
861
+ switch (m) {
861
862
  case "bestFit": {
862
- var D;
863
- const W = (D = O.filter((A) => {
864
- if (C) {
865
- const N = I(A.placement);
866
- return N === y || // Create a bias to the `y` side axis due to horizontal
863
+ var N;
864
+ const O = (N = B.filter((k) => {
865
+ if (R) {
866
+ const F = at(k.placement);
867
+ return F === b || // Create a bias to the `y` side axis due to horizontal
867
868
  // reading directions favoring greater width.
868
- N === "y";
869
+ F === "y";
869
870
  }
870
871
  return !0;
871
- }).map((A) => [A.placement, A.overflows.filter((N) => N > 0).reduce((N, q) => N + q, 0)]).sort((A, N) => A[1] - N[1])[0]) == null ? void 0 : D[0];
872
- W && (k = W);
872
+ }).map((k) => [k.placement, k.overflows.filter((F) => F > 0).reduce((F, z) => F + z, 0)]).sort((k, F) => k[1] - F[1])[0]) == null ? void 0 : N[0];
873
+ O && (C = O);
873
874
  break;
874
875
  }
875
876
  case "initialPlacement":
876
- k = s;
877
+ C = l;
877
878
  break;
878
879
  }
879
- if (o !== k)
880
+ if (a !== C)
880
881
  return {
881
882
  reset: {
882
- placement: k
883
+ placement: C
883
884
  }
884
885
  };
885
886
  }
@@ -887,7 +888,7 @@ const Rn = async (t, e, n) => {
887
888
  }
888
889
  };
889
890
  };
890
- function Ut(t, e) {
891
+ function Ve(t, e) {
891
892
  return {
892
893
  top: t.top - e.height,
893
894
  right: t.right - e.width,
@@ -895,43 +896,43 @@ function Ut(t, e) {
895
896
  left: t.left - e.width
896
897
  };
897
898
  }
898
- function Gt(t) {
899
- return dn.some((e) => t[e] >= 0);
899
+ function Ye(t) {
900
+ return So.some((e) => t[e] >= 0);
900
901
  }
901
- const On = function(t) {
902
+ const Io = function(t) {
902
903
  return t === void 0 && (t = {}), {
903
904
  name: "hide",
904
905
  options: t,
905
906
  async fn(e) {
906
907
  const {
907
908
  rects: n,
908
- platform: r
909
+ platform: o
909
910
  } = e, {
910
- strategy: o = "referenceHidden",
911
+ strategy: a = "referenceHidden",
911
912
  ...i
912
- } = Y(t, e);
913
- switch (o) {
913
+ } = ut(t, e);
914
+ switch (a) {
914
915
  case "referenceHidden": {
915
- const c = await r.detectOverflow(e, {
916
+ const s = await o.detectOverflow(e, {
916
917
  ...i,
917
918
  elementContext: "reference"
918
- }), s = Ut(c, n.reference);
919
+ }), l = Ve(s, n.reference);
919
920
  return {
920
921
  data: {
921
- referenceHiddenOffsets: s,
922
- referenceHidden: Gt(s)
922
+ referenceHiddenOffsets: l,
923
+ referenceHidden: Ye(l)
923
924
  }
924
925
  };
925
926
  }
926
927
  case "escaped": {
927
- const c = await r.detectOverflow(e, {
928
+ const s = await o.detectOverflow(e, {
928
929
  ...i,
929
930
  altBoundary: !0
930
- }), s = Ut(c, n.floating);
931
+ }), l = Ve(s, n.floating);
931
932
  return {
932
933
  data: {
933
- escapedOffsets: s,
934
- escaped: Gt(s)
934
+ escapedOffsets: l,
935
+ escaped: Ye(l)
935
936
  }
936
937
  };
937
938
  }
@@ -940,189 +941,189 @@ const On = function(t) {
940
941
  }
941
942
  }
942
943
  };
943
- }, de = /* @__PURE__ */ new Set(["left", "top"]);
944
- async function Mn(t, e) {
944
+ }, cn = /* @__PURE__ */ new Set(["left", "top"]);
945
+ async function Ho(t, e) {
945
946
  const {
946
947
  placement: n,
947
- platform: r,
948
- elements: o
949
- } = t, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), c = j(n), s = ot(n), u = I(n) === "y", f = de.has(c) ? -1 : 1, l = i && u ? -1 : 1, a = Y(e, t);
948
+ platform: o,
949
+ elements: a
950
+ } = t, i = await (o.isRTL == null ? void 0 : o.isRTL(a.floating)), s = dt(n), l = Dt(n), d = at(n) === "y", c = cn.has(s) ? -1 : 1, u = i && d ? -1 : 1, r = ut(e, t);
950
951
  let {
951
- mainAxis: m,
952
- crossAxis: h,
953
- alignmentAxis: v
954
- } = typeof a == "number" ? {
955
- mainAxis: a,
952
+ mainAxis: f,
953
+ crossAxis: m,
954
+ alignmentAxis: p
955
+ } = typeof r == "number" ? {
956
+ mainAxis: r,
956
957
  crossAxis: 0,
957
958
  alignmentAxis: null
958
959
  } : {
959
- mainAxis: a.mainAxis || 0,
960
- crossAxis: a.crossAxis || 0,
961
- alignmentAxis: a.alignmentAxis
960
+ mainAxis: r.mainAxis || 0,
961
+ crossAxis: r.crossAxis || 0,
962
+ alignmentAxis: r.alignmentAxis
962
963
  };
963
- return s && typeof v == "number" && (h = s === "end" ? v * -1 : v), u ? {
964
- x: h * l,
965
- y: m * f
964
+ return l && typeof p == "number" && (m = l === "end" ? p * -1 : p), d ? {
965
+ x: m * u,
966
+ y: f * c
966
967
  } : {
967
- x: m * f,
968
- y: h * l
968
+ x: f * c,
969
+ y: m * u
969
970
  };
970
971
  }
971
- const Pn = function(t) {
972
+ const Fo = function(t) {
972
973
  return t === void 0 && (t = 0), {
973
974
  name: "offset",
974
975
  options: t,
975
976
  async fn(e) {
976
- var n, r;
977
+ var n, o;
977
978
  const {
978
- x: o,
979
+ x: a,
979
980
  y: i,
980
- placement: c,
981
- middlewareData: s
982
- } = e, u = await Mn(e, t);
983
- return c === ((n = s.offset) == null ? void 0 : n.placement) && (r = s.arrow) != null && r.alignmentOffset ? {} : {
984
- x: o + u.x,
985
- y: i + u.y,
981
+ placement: s,
982
+ middlewareData: l
983
+ } = e, d = await Ho(e, t);
984
+ return s === ((n = l.offset) == null ? void 0 : n.placement) && (o = l.arrow) != null && o.alignmentOffset ? {} : {
985
+ x: a + d.x,
986
+ y: i + d.y,
986
987
  data: {
987
- ...u,
988
- placement: c
988
+ ...d,
989
+ placement: s
989
990
  }
990
991
  };
991
992
  }
992
993
  };
993
- }, kn = function(t) {
994
+ }, Wo = function(t) {
994
995
  return t === void 0 && (t = {}), {
995
996
  name: "shift",
996
997
  options: t,
997
998
  async fn(e) {
998
999
  const {
999
1000
  x: n,
1000
- y: r,
1001
- placement: o,
1001
+ y: o,
1002
+ placement: a,
1002
1003
  platform: i
1003
1004
  } = e, {
1004
- mainAxis: c = !0,
1005
- crossAxis: s = !1,
1006
- limiter: u = {
1007
- fn: (p) => {
1005
+ mainAxis: s = !0,
1006
+ crossAxis: l = !1,
1007
+ limiter: d = {
1008
+ fn: (g) => {
1008
1009
  let {
1009
- x: y,
1010
- y: x
1011
- } = p;
1010
+ x: b,
1011
+ y: w
1012
+ } = g;
1012
1013
  return {
1013
- x: y,
1014
- y: x
1014
+ x: b,
1015
+ y: w
1015
1016
  };
1016
1017
  }
1017
1018
  },
1018
- ...f
1019
- } = Y(t, e), l = {
1019
+ ...c
1020
+ } = ut(t, e), u = {
1020
1021
  x: n,
1021
- y: r
1022
- }, a = await i.detectOverflow(e, f), m = I(j(o)), h = Nt(m);
1023
- let v = l[h], d = l[m];
1024
- if (c) {
1025
- const p = h === "y" ? "top" : "left", y = h === "y" ? "bottom" : "right", x = v + a[p], b = v - a[y];
1026
- v = Tt(x, v, b);
1027
- }
1022
+ y: o
1023
+ }, r = await i.detectOverflow(e, c), f = at(dt(a)), m = we(f);
1024
+ let p = u[m], h = u[f];
1028
1025
  if (s) {
1029
- const p = m === "y" ? "top" : "left", y = m === "y" ? "bottom" : "right", x = d + a[p], b = d - a[y];
1030
- d = Tt(x, d, b);
1026
+ const g = m === "y" ? "top" : "left", b = m === "y" ? "bottom" : "right", w = p + r[g], x = p - r[b];
1027
+ p = pe(w, p, x);
1028
+ }
1029
+ if (l) {
1030
+ const g = f === "y" ? "top" : "left", b = f === "y" ? "bottom" : "right", w = h + r[g], x = h - r[b];
1031
+ h = pe(w, h, x);
1031
1032
  }
1032
- const g = u.fn({
1033
+ const y = d.fn({
1033
1034
  ...e,
1034
- [h]: v,
1035
- [m]: d
1035
+ [m]: p,
1036
+ [f]: h
1036
1037
  });
1037
1038
  return {
1038
- ...g,
1039
+ ...y,
1039
1040
  data: {
1040
- x: g.x - n,
1041
- y: g.y - r,
1041
+ x: y.x - n,
1042
+ y: y.y - o,
1042
1043
  enabled: {
1043
- [h]: c,
1044
- [m]: s
1044
+ [m]: s,
1045
+ [f]: l
1045
1046
  }
1046
1047
  }
1047
1048
  };
1048
1049
  }
1049
1050
  };
1050
- }, Ln = function(t) {
1051
+ }, $o = function(t) {
1051
1052
  return t === void 0 && (t = {}), {
1052
1053
  options: t,
1053
1054
  fn(e) {
1054
1055
  const {
1055
1056
  x: n,
1056
- y: r,
1057
- placement: o,
1057
+ y: o,
1058
+ placement: a,
1058
1059
  rects: i,
1059
- middlewareData: c
1060
+ middlewareData: s
1060
1061
  } = e, {
1061
- offset: s = 0,
1062
- mainAxis: u = !0,
1063
- crossAxis: f = !0
1064
- } = Y(t, e), l = {
1062
+ offset: l = 0,
1063
+ mainAxis: d = !0,
1064
+ crossAxis: c = !0
1065
+ } = ut(t, e), u = {
1065
1066
  x: n,
1066
- y: r
1067
- }, a = I(o), m = Nt(a);
1068
- let h = l[m], v = l[a];
1069
- const d = Y(s, e), g = typeof d == "number" ? {
1070
- mainAxis: d,
1067
+ y: o
1068
+ }, r = at(a), f = we(r);
1069
+ let m = u[f], p = u[r];
1070
+ const h = ut(l, e), y = typeof h == "number" ? {
1071
+ mainAxis: h,
1071
1072
  crossAxis: 0
1072
1073
  } : {
1073
1074
  mainAxis: 0,
1074
1075
  crossAxis: 0,
1075
- ...d
1076
+ ...h
1076
1077
  };
1077
- if (u) {
1078
- const x = m === "y" ? "height" : "width", b = i.reference[m] - i.floating[x] + g.mainAxis, S = i.reference[m] + i.reference[x] - g.mainAxis;
1079
- h < b ? h = b : h > S && (h = S);
1078
+ if (d) {
1079
+ const w = f === "y" ? "height" : "width", x = i.reference[f] - i.floating[w] + y.mainAxis, E = i.reference[f] + i.reference[w] - y.mainAxis;
1080
+ m < x ? m = x : m > E && (m = E);
1080
1081
  }
1081
- if (f) {
1082
- var p, y;
1083
- const x = m === "y" ? "width" : "height", b = de.has(j(o)), S = i.reference[a] - i.floating[x] + (b && ((p = c.offset) == null ? void 0 : p[a]) || 0) + (b ? 0 : g.crossAxis), C = i.reference[a] + i.reference[x] + (b ? 0 : ((y = c.offset) == null ? void 0 : y[a]) || 0) - (b ? g.crossAxis : 0);
1084
- v < S ? v = S : v > C && (v = C);
1082
+ if (c) {
1083
+ var g, b;
1084
+ const w = f === "y" ? "width" : "height", x = cn.has(dt(a)), E = i.reference[r] - i.floating[w] + (x && ((g = s.offset) == null ? void 0 : g[r]) || 0) + (x ? 0 : y.crossAxis), R = i.reference[r] + i.reference[w] + (x ? 0 : ((b = s.offset) == null ? void 0 : b[r]) || 0) - (x ? y.crossAxis : 0);
1085
+ p < E ? p = E : p > R && (p = R);
1085
1086
  }
1086
1087
  return {
1087
- [m]: h,
1088
- [a]: v
1088
+ [f]: m,
1089
+ [r]: p
1089
1090
  };
1090
1091
  }
1091
1092
  };
1092
- }, Tn = function(t) {
1093
+ }, zo = function(t) {
1093
1094
  return t === void 0 && (t = {}), {
1094
1095
  name: "size",
1095
1096
  options: t,
1096
1097
  async fn(e) {
1097
- var n, r;
1098
+ var n, o;
1098
1099
  const {
1099
- placement: o,
1100
+ placement: a,
1100
1101
  rects: i,
1101
- platform: c,
1102
- elements: s
1102
+ platform: s,
1103
+ elements: l
1103
1104
  } = e, {
1104
- apply: u = () => {
1105
+ apply: d = () => {
1105
1106
  },
1106
- ...f
1107
- } = Y(t, e), l = await c.detectOverflow(e, f), a = j(o), m = ot(o), h = I(o) === "y", {
1108
- width: v,
1109
- height: d
1107
+ ...c
1108
+ } = ut(t, e), u = await s.detectOverflow(e, c), r = dt(a), f = Dt(a), m = at(a) === "y", {
1109
+ width: p,
1110
+ height: h
1110
1111
  } = i.floating;
1111
- let g, p;
1112
- a === "top" || a === "bottom" ? (g = a, p = m === (await (c.isRTL == null ? void 0 : c.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (p = a, g = m === "end" ? "top" : "bottom");
1113
- const y = d - l.top - l.bottom, x = v - l.left - l.right, b = U(d - l[g], y), S = U(v - l[p], x), C = !e.middlewareData.shift;
1114
- let R = b, M = S;
1115
- if ((n = e.middlewareData.shift) != null && n.enabled.x && (M = x), (r = e.middlewareData.shift) != null && r.enabled.y && (R = y), C && !m) {
1116
- const O = B(l.left, 0), P = B(l.right, 0), T = B(l.top, 0), D = B(l.bottom, 0);
1117
- h ? M = v - 2 * (O !== 0 || P !== 0 ? O + P : B(l.left, l.right)) : R = d - 2 * (T !== 0 || D !== 0 ? T + D : B(l.top, l.bottom));
1112
+ let y, g;
1113
+ r === "top" || r === "bottom" ? (y = r, g = f === (await (s.isRTL == null ? void 0 : s.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (g = r, y = f === "end" ? "top" : "bottom");
1114
+ const b = h - u.top - u.bottom, w = p - u.left - u.right, x = ht(h - u[y], b), E = ht(p - u[g], w), R = !e.middlewareData.shift;
1115
+ let A = x, D = E;
1116
+ if ((n = e.middlewareData.shift) != null && n.enabled.x && (D = w), (o = e.middlewareData.shift) != null && o.enabled.y && (A = b), R && !f) {
1117
+ const B = Z(u.left, 0), H = Z(u.right, 0), _ = Z(u.top, 0), N = Z(u.bottom, 0);
1118
+ m ? D = p - 2 * (B !== 0 || H !== 0 ? B + H : Z(u.left, u.right)) : A = h - 2 * (_ !== 0 || N !== 0 ? _ + N : Z(u.top, u.bottom));
1118
1119
  }
1119
- await u({
1120
+ await d({
1120
1121
  ...e,
1121
- availableWidth: M,
1122
- availableHeight: R
1122
+ availableWidth: D,
1123
+ availableHeight: A
1123
1124
  });
1124
- const L = await c.getDimensions(s.floating);
1125
- return v !== L.width || d !== L.height ? {
1125
+ const $ = await s.getDimensions(l.floating);
1126
+ return p !== $.width || h !== $.height ? {
1126
1127
  reset: {
1127
1128
  rects: !0
1128
1129
  }
@@ -1130,49 +1131,49 @@ const Pn = function(t) {
1130
1131
  }
1131
1132
  };
1132
1133
  };
1133
- function bt() {
1134
+ function ne() {
1134
1135
  return typeof window < "u";
1135
1136
  }
1136
- function it(t) {
1137
- return he(t) ? (t.nodeName || "").toLowerCase() : "#document";
1137
+ function Nt(t) {
1138
+ return un(t) ? (t.nodeName || "").toLowerCase() : "#document";
1138
1139
  }
1139
- function F(t) {
1140
+ function G(t) {
1140
1141
  var e;
1141
1142
  return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
1142
1143
  }
1143
- function X(t) {
1144
+ function lt(t) {
1144
1145
  var e;
1145
- return (e = (he(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
1146
+ return (e = (un(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
1146
1147
  }
1147
- function he(t) {
1148
- return bt() ? t instanceof Node || t instanceof F(t).Node : !1;
1148
+ function un(t) {
1149
+ return ne() ? t instanceof Node || t instanceof G(t).Node : !1;
1149
1150
  }
1150
- function V(t) {
1151
- return bt() ? t instanceof Element || t instanceof F(t).Element : !1;
1151
+ function nt(t) {
1152
+ return ne() ? t instanceof Element || t instanceof G(t).Element : !1;
1152
1153
  }
1153
- function _(t) {
1154
- return bt() ? t instanceof HTMLElement || t instanceof F(t).HTMLElement : !1;
1154
+ function st(t) {
1155
+ return ne() ? t instanceof HTMLElement || t instanceof G(t).HTMLElement : !1;
1155
1156
  }
1156
- function Kt(t) {
1157
- return !bt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof F(t).ShadowRoot;
1157
+ function je(t) {
1158
+ return !ne() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof G(t).ShadowRoot;
1158
1159
  }
1159
- const Dn = /* @__PURE__ */ new Set(["inline", "contents"]);
1160
- function st(t) {
1160
+ const Vo = /* @__PURE__ */ new Set(["inline", "contents"]);
1161
+ function Bt(t) {
1161
1162
  const {
1162
1163
  overflow: e,
1163
1164
  overflowX: n,
1164
- overflowY: r,
1165
- display: o
1166
- } = H(t);
1167
- return /auto|scroll|overlay|hidden|clip/.test(e + r + n) && !Dn.has(o);
1168
- }
1169
- const Wn = /* @__PURE__ */ new Set(["table", "td", "th"]);
1170
- function Nn(t) {
1171
- return Wn.has(it(t));
1172
- }
1173
- const Bn = [":popover-open", ":modal"];
1174
- function St(t) {
1175
- return Bn.some((e) => {
1165
+ overflowY: o,
1166
+ display: a
1167
+ } = ot(t);
1168
+ return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !Vo.has(a);
1169
+ }
1170
+ const Yo = /* @__PURE__ */ new Set(["table", "td", "th"]);
1171
+ function jo(t) {
1172
+ return Yo.has(Nt(t));
1173
+ }
1174
+ const Xo = [":popover-open", ":modal"];
1175
+ function oe(t) {
1176
+ return Xo.some((e) => {
1176
1177
  try {
1177
1178
  return t.matches(e);
1178
1179
  } catch {
@@ -1180,34 +1181,34 @@ function St(t) {
1180
1181
  }
1181
1182
  });
1182
1183
  }
1183
- const Fn = ["transform", "translate", "scale", "rotate", "perspective"], Vn = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Hn = ["paint", "layout", "strict", "content"];
1184
- function Vt(t) {
1185
- const e = Ht(), n = V(t) ? H(t) : t;
1186
- return Fn.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || Vn.some((r) => (n.willChange || "").includes(r)) || Hn.some((r) => (n.contain || "").includes(r));
1184
+ const Uo = ["transform", "translate", "scale", "rotate", "perspective"], qo = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Ko = ["paint", "layout", "strict", "content"];
1185
+ function Ee(t) {
1186
+ const e = Re(), n = nt(t) ? ot(t) : t;
1187
+ return Uo.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || qo.some((o) => (n.willChange || "").includes(o)) || Ko.some((o) => (n.contain || "").includes(o));
1187
1188
  }
1188
- function $n(t) {
1189
- let e = G(t);
1190
- for (; _(e) && !rt(e); ) {
1191
- if (Vt(e))
1189
+ function Zo(t) {
1190
+ let e = gt(t);
1191
+ for (; st(e) && !Ot(e); ) {
1192
+ if (Ee(e))
1192
1193
  return e;
1193
- if (St(e))
1194
+ if (oe(e))
1194
1195
  return null;
1195
- e = G(e);
1196
+ e = gt(e);
1196
1197
  }
1197
1198
  return null;
1198
1199
  }
1199
- function Ht() {
1200
+ function Re() {
1200
1201
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
1201
1202
  }
1202
- const In = /* @__PURE__ */ new Set(["html", "body", "#document"]);
1203
- function rt(t) {
1204
- return In.has(it(t));
1203
+ const Go = /* @__PURE__ */ new Set(["html", "body", "#document"]);
1204
+ function Ot(t) {
1205
+ return Go.has(Nt(t));
1205
1206
  }
1206
- function H(t) {
1207
- return F(t).getComputedStyle(t);
1207
+ function ot(t) {
1208
+ return G(t).getComputedStyle(t);
1208
1209
  }
1209
- function Ct(t) {
1210
- return V(t) ? {
1210
+ function re(t) {
1211
+ return nt(t) ? {
1211
1212
  scrollLeft: t.scrollLeft,
1212
1213
  scrollTop: t.scrollTop
1213
1214
  } : {
@@ -1215,569 +1216,569 @@ function Ct(t) {
1215
1216
  scrollTop: t.scrollY
1216
1217
  };
1217
1218
  }
1218
- function G(t) {
1219
- if (it(t) === "html")
1219
+ function gt(t) {
1220
+ if (Nt(t) === "html")
1220
1221
  return t;
1221
1222
  const e = (
1222
1223
  // Step into the shadow DOM of the parent of a slotted node.
1223
1224
  t.assignedSlot || // DOM Element detected.
1224
1225
  t.parentNode || // ShadowRoot detected.
1225
- Kt(t) && t.host || // Fallback.
1226
- X(t)
1226
+ je(t) && t.host || // Fallback.
1227
+ lt(t)
1227
1228
  );
1228
- return Kt(e) ? e.host : e;
1229
+ return je(e) ? e.host : e;
1229
1230
  }
1230
- function me(t) {
1231
- const e = G(t);
1232
- return rt(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : _(e) && st(e) ? e : me(e);
1231
+ function dn(t) {
1232
+ const e = gt(t);
1233
+ return Ot(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : st(e) && Bt(e) ? e : dn(e);
1233
1234
  }
1234
- function ct(t, e, n) {
1235
- var r;
1235
+ function Lt(t, e, n) {
1236
+ var o;
1236
1237
  e === void 0 && (e = []), n === void 0 && (n = !0);
1237
- const o = me(t), i = o === ((r = t.ownerDocument) == null ? void 0 : r.body), c = F(o);
1238
+ const a = dn(t), i = a === ((o = t.ownerDocument) == null ? void 0 : o.body), s = G(a);
1238
1239
  if (i) {
1239
- const s = Wt(c);
1240
- return e.concat(c, c.visualViewport || [], st(o) ? o : [], s && n ? ct(s) : []);
1240
+ const l = ye(s);
1241
+ return e.concat(s, s.visualViewport || [], Bt(a) ? a : [], l && n ? Lt(l) : []);
1241
1242
  }
1242
- return e.concat(o, ct(o, [], n));
1243
+ return e.concat(a, Lt(a, [], n));
1243
1244
  }
1244
- function Wt(t) {
1245
+ function ye(t) {
1245
1246
  return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
1246
1247
  }
1247
- function ge(t) {
1248
- const e = H(t);
1249
- let n = parseFloat(e.width) || 0, r = parseFloat(e.height) || 0;
1250
- const o = _(t), i = o ? t.offsetWidth : n, c = o ? t.offsetHeight : r, s = vt(n) !== i || vt(r) !== c;
1251
- return s && (n = i, r = c), {
1248
+ function fn(t) {
1249
+ const e = ot(t);
1250
+ let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
1251
+ const a = st(t), i = a ? t.offsetWidth : n, s = a ? t.offsetHeight : o, l = Gt(n) !== i || Gt(o) !== s;
1252
+ return l && (n = i, o = s), {
1252
1253
  width: n,
1253
- height: r,
1254
- $: s
1254
+ height: o,
1255
+ $: l
1255
1256
  };
1256
1257
  }
1257
- function $t(t) {
1258
- return V(t) ? t : t.contextElement;
1258
+ function Ce(t) {
1259
+ return nt(t) ? t : t.contextElement;
1259
1260
  }
1260
- function nt(t) {
1261
- const e = $t(t);
1262
- if (!_(e))
1263
- return z(1);
1261
+ function Mt(t) {
1262
+ const e = Ce(t);
1263
+ if (!st(e))
1264
+ return it(1);
1264
1265
  const n = e.getBoundingClientRect(), {
1265
- width: r,
1266
- height: o,
1266
+ width: o,
1267
+ height: a,
1267
1268
  $: i
1268
- } = ge(e);
1269
- let c = (i ? vt(n.width) : n.width) / r, s = (i ? vt(n.height) : n.height) / o;
1270
- return (!c || !Number.isFinite(c)) && (c = 1), (!s || !Number.isFinite(s)) && (s = 1), {
1271
- x: c,
1272
- y: s
1269
+ } = fn(e);
1270
+ let s = (i ? Gt(n.width) : n.width) / o, l = (i ? Gt(n.height) : n.height) / a;
1271
+ return (!s || !Number.isFinite(s)) && (s = 1), (!l || !Number.isFinite(l)) && (l = 1), {
1272
+ x: s,
1273
+ y: l
1273
1274
  };
1274
1275
  }
1275
- const zn = /* @__PURE__ */ z(0);
1276
- function ve(t) {
1277
- const e = F(t);
1278
- return !Ht() || !e.visualViewport ? zn : {
1276
+ const Qo = /* @__PURE__ */ it(0);
1277
+ function mn(t) {
1278
+ const e = G(t);
1279
+ return !Re() || !e.visualViewport ? Qo : {
1279
1280
  x: e.visualViewport.offsetLeft,
1280
1281
  y: e.visualViewport.offsetTop
1281
1282
  };
1282
1283
  }
1283
- function _n(t, e, n) {
1284
- return e === void 0 && (e = !1), !n || e && n !== F(t) ? !1 : e;
1284
+ function Jo(t, e, n) {
1285
+ return e === void 0 && (e = !1), !n || e && n !== G(t) ? !1 : e;
1285
1286
  }
1286
- function K(t, e, n, r) {
1287
+ function yt(t, e, n, o) {
1287
1288
  e === void 0 && (e = !1), n === void 0 && (n = !1);
1288
- const o = t.getBoundingClientRect(), i = $t(t);
1289
- let c = z(1);
1290
- e && (r ? V(r) && (c = nt(r)) : c = nt(t));
1291
- const s = _n(i, n, r) ? ve(i) : z(0);
1292
- let u = (o.left + s.x) / c.x, f = (o.top + s.y) / c.y, l = o.width / c.x, a = o.height / c.y;
1289
+ const a = t.getBoundingClientRect(), i = Ce(t);
1290
+ let s = it(1);
1291
+ e && (o ? nt(o) && (s = Mt(o)) : s = Mt(t));
1292
+ const l = Jo(i, n, o) ? mn(i) : it(0);
1293
+ let d = (a.left + l.x) / s.x, c = (a.top + l.y) / s.y, u = a.width / s.x, r = a.height / s.y;
1293
1294
  if (i) {
1294
- const m = F(i), h = r && V(r) ? F(r) : r;
1295
- let v = m, d = Wt(v);
1296
- for (; d && r && h !== v; ) {
1297
- const g = nt(d), p = d.getBoundingClientRect(), y = H(d), x = p.left + (d.clientLeft + parseFloat(y.paddingLeft)) * g.x, b = p.top + (d.clientTop + parseFloat(y.paddingTop)) * g.y;
1298
- u *= g.x, f *= g.y, l *= g.x, a *= g.y, u += x, f += b, v = F(d), d = Wt(v);
1295
+ const f = G(i), m = o && nt(o) ? G(o) : o;
1296
+ let p = f, h = ye(p);
1297
+ for (; h && o && m !== p; ) {
1298
+ const y = Mt(h), g = h.getBoundingClientRect(), b = ot(h), w = g.left + (h.clientLeft + parseFloat(b.paddingLeft)) * y.x, x = g.top + (h.clientTop + parseFloat(b.paddingTop)) * y.y;
1299
+ d *= y.x, c *= y.y, u *= y.x, r *= y.y, d += w, c += x, p = G(h), h = ye(p);
1299
1300
  }
1300
1301
  }
1301
- return wt({
1302
- width: l,
1303
- height: a,
1304
- x: u,
1305
- y: f
1302
+ return Jt({
1303
+ width: u,
1304
+ height: r,
1305
+ x: d,
1306
+ y: c
1306
1307
  });
1307
1308
  }
1308
- function Rt(t, e) {
1309
- const n = Ct(t).scrollLeft;
1310
- return e ? e.left + n : K(X(t)).left + n;
1309
+ function ae(t, e) {
1310
+ const n = re(t).scrollLeft;
1311
+ return e ? e.left + n : yt(lt(t)).left + n;
1311
1312
  }
1312
- function pe(t, e) {
1313
- const n = t.getBoundingClientRect(), r = n.left + e.scrollLeft - Rt(t, n), o = n.top + e.scrollTop;
1313
+ function hn(t, e) {
1314
+ const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - ae(t, n), a = n.top + e.scrollTop;
1314
1315
  return {
1315
- x: r,
1316
- y: o
1316
+ x: o,
1317
+ y: a
1317
1318
  };
1318
1319
  }
1319
- function Xn(t) {
1320
+ function tr(t) {
1320
1321
  let {
1321
1322
  elements: e,
1322
1323
  rect: n,
1323
- offsetParent: r,
1324
- strategy: o
1324
+ offsetParent: o,
1325
+ strategy: a
1325
1326
  } = t;
1326
- const i = o === "fixed", c = X(r), s = e ? St(e.floating) : !1;
1327
- if (r === c || s && i)
1327
+ const i = a === "fixed", s = lt(o), l = e ? oe(e.floating) : !1;
1328
+ if (o === s || l && i)
1328
1329
  return n;
1329
- let u = {
1330
+ let d = {
1330
1331
  scrollLeft: 0,
1331
1332
  scrollTop: 0
1332
- }, f = z(1);
1333
- const l = z(0), a = _(r);
1334
- if ((a || !a && !i) && ((it(r) !== "body" || st(c)) && (u = Ct(r)), _(r))) {
1335
- const h = K(r);
1336
- f = nt(r), l.x = h.x + r.clientLeft, l.y = h.y + r.clientTop;
1333
+ }, c = it(1);
1334
+ const u = it(0), r = st(o);
1335
+ if ((r || !r && !i) && ((Nt(o) !== "body" || Bt(s)) && (d = re(o)), st(o))) {
1336
+ const m = yt(o);
1337
+ c = Mt(o), u.x = m.x + o.clientLeft, u.y = m.y + o.clientTop;
1337
1338
  }
1338
- const m = c && !a && !i ? pe(c, u) : z(0);
1339
+ const f = s && !r && !i ? hn(s, d) : it(0);
1339
1340
  return {
1340
- width: n.width * f.x,
1341
- height: n.height * f.y,
1342
- x: n.x * f.x - u.scrollLeft * f.x + l.x + m.x,
1343
- y: n.y * f.y - u.scrollTop * f.y + l.y + m.y
1341
+ width: n.width * c.x,
1342
+ height: n.height * c.y,
1343
+ x: n.x * c.x - d.scrollLeft * c.x + u.x + f.x,
1344
+ y: n.y * c.y - d.scrollTop * c.y + u.y + f.y
1344
1345
  };
1345
1346
  }
1346
- function Yn(t) {
1347
+ function er(t) {
1347
1348
  return Array.from(t.getClientRects());
1348
1349
  }
1349
- function jn(t) {
1350
- const e = X(t), n = Ct(t), r = t.ownerDocument.body, o = B(e.scrollWidth, e.clientWidth, r.scrollWidth, r.clientWidth), i = B(e.scrollHeight, e.clientHeight, r.scrollHeight, r.clientHeight);
1351
- let c = -n.scrollLeft + Rt(t);
1352
- const s = -n.scrollTop;
1353
- return H(r).direction === "rtl" && (c += B(e.clientWidth, r.clientWidth) - o), {
1354
- width: o,
1350
+ function nr(t) {
1351
+ const e = lt(t), n = re(t), o = t.ownerDocument.body, a = Z(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), i = Z(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
1352
+ let s = -n.scrollLeft + ae(t);
1353
+ const l = -n.scrollTop;
1354
+ return ot(o).direction === "rtl" && (s += Z(e.clientWidth, o.clientWidth) - a), {
1355
+ width: a,
1355
1356
  height: i,
1356
- x: c,
1357
- y: s
1357
+ x: s,
1358
+ y: l
1358
1359
  };
1359
1360
  }
1360
- const Qt = 25;
1361
- function qn(t, e) {
1362
- const n = F(t), r = X(t), o = n.visualViewport;
1363
- let i = r.clientWidth, c = r.clientHeight, s = 0, u = 0;
1364
- if (o) {
1365
- i = o.width, c = o.height;
1366
- const l = Ht();
1367
- (!l || l && e === "fixed") && (s = o.offsetLeft, u = o.offsetTop);
1361
+ const Xe = 25;
1362
+ function or(t, e) {
1363
+ const n = G(t), o = lt(t), a = n.visualViewport;
1364
+ let i = o.clientWidth, s = o.clientHeight, l = 0, d = 0;
1365
+ if (a) {
1366
+ i = a.width, s = a.height;
1367
+ const u = Re();
1368
+ (!u || u && e === "fixed") && (l = a.offsetLeft, d = a.offsetTop);
1368
1369
  }
1369
- const f = Rt(r);
1370
- if (f <= 0) {
1371
- const l = r.ownerDocument, a = l.body, m = getComputedStyle(a), h = l.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, v = Math.abs(r.clientWidth - a.clientWidth - h);
1372
- v <= Qt && (i -= v);
1373
- } else f <= Qt && (i += f);
1370
+ const c = ae(o);
1371
+ if (c <= 0) {
1372
+ const u = o.ownerDocument, r = u.body, f = getComputedStyle(r), m = u.compatMode === "CSS1Compat" && parseFloat(f.marginLeft) + parseFloat(f.marginRight) || 0, p = Math.abs(o.clientWidth - r.clientWidth - m);
1373
+ p <= Xe && (i -= p);
1374
+ } else c <= Xe && (i += c);
1374
1375
  return {
1375
1376
  width: i,
1376
- height: c,
1377
- x: s,
1378
- y: u
1377
+ height: s,
1378
+ x: l,
1379
+ y: d
1379
1380
  };
1380
1381
  }
1381
- const Zn = /* @__PURE__ */ new Set(["absolute", "fixed"]);
1382
- function Un(t, e) {
1383
- const n = K(t, !0, e === "fixed"), r = n.top + t.clientTop, o = n.left + t.clientLeft, i = _(t) ? nt(t) : z(1), c = t.clientWidth * i.x, s = t.clientHeight * i.y, u = o * i.x, f = r * i.y;
1382
+ const rr = /* @__PURE__ */ new Set(["absolute", "fixed"]);
1383
+ function ar(t, e) {
1384
+ const n = yt(t, !0, e === "fixed"), o = n.top + t.clientTop, a = n.left + t.clientLeft, i = st(t) ? Mt(t) : it(1), s = t.clientWidth * i.x, l = t.clientHeight * i.y, d = a * i.x, c = o * i.y;
1384
1385
  return {
1385
- width: c,
1386
- height: s,
1387
- x: u,
1388
- y: f
1386
+ width: s,
1387
+ height: l,
1388
+ x: d,
1389
+ y: c
1389
1390
  };
1390
1391
  }
1391
- function Jt(t, e, n) {
1392
- let r;
1392
+ function Ue(t, e, n) {
1393
+ let o;
1393
1394
  if (e === "viewport")
1394
- r = qn(t, n);
1395
+ o = or(t, n);
1395
1396
  else if (e === "document")
1396
- r = jn(X(t));
1397
- else if (V(e))
1398
- r = Un(e, n);
1397
+ o = nr(lt(t));
1398
+ else if (nt(e))
1399
+ o = ar(e, n);
1399
1400
  else {
1400
- const o = ve(t);
1401
- r = {
1402
- x: e.x - o.x,
1403
- y: e.y - o.y,
1401
+ const a = mn(t);
1402
+ o = {
1403
+ x: e.x - a.x,
1404
+ y: e.y - a.y,
1404
1405
  width: e.width,
1405
1406
  height: e.height
1406
1407
  };
1407
1408
  }
1408
- return wt(r);
1409
+ return Jt(o);
1409
1410
  }
1410
- function we(t, e) {
1411
- const n = G(t);
1412
- return n === e || !V(n) || rt(n) ? !1 : H(n).position === "fixed" || we(n, e);
1411
+ function gn(t, e) {
1412
+ const n = gt(t);
1413
+ return n === e || !nt(n) || Ot(n) ? !1 : ot(n).position === "fixed" || gn(n, e);
1413
1414
  }
1414
- function Gn(t, e) {
1415
+ function ir(t, e) {
1415
1416
  const n = e.get(t);
1416
1417
  if (n)
1417
1418
  return n;
1418
- let r = ct(t, [], !1).filter((s) => V(s) && it(s) !== "body"), o = null;
1419
- const i = H(t).position === "fixed";
1420
- let c = i ? G(t) : t;
1421
- for (; V(c) && !rt(c); ) {
1422
- const s = H(c), u = Vt(c);
1423
- !u && s.position === "fixed" && (o = null), (i ? !u && !o : !u && s.position === "static" && !!o && Zn.has(o.position) || st(c) && !u && we(t, c)) ? r = r.filter((l) => l !== c) : o = s, c = G(c);
1419
+ let o = Lt(t, [], !1).filter((l) => nt(l) && Nt(l) !== "body"), a = null;
1420
+ const i = ot(t).position === "fixed";
1421
+ let s = i ? gt(t) : t;
1422
+ for (; nt(s) && !Ot(s); ) {
1423
+ const l = ot(s), d = Ee(s);
1424
+ !d && l.position === "fixed" && (a = null), (i ? !d && !a : !d && l.position === "static" && !!a && rr.has(a.position) || Bt(s) && !d && gn(t, s)) ? o = o.filter((u) => u !== s) : a = l, s = gt(s);
1424
1425
  }
1425
- return e.set(t, r), r;
1426
+ return e.set(t, o), o;
1426
1427
  }
1427
- function Kn(t) {
1428
+ function sr(t) {
1428
1429
  let {
1429
1430
  element: e,
1430
1431
  boundary: n,
1431
- rootBoundary: r,
1432
- strategy: o
1432
+ rootBoundary: o,
1433
+ strategy: a
1433
1434
  } = t;
1434
- const c = [...n === "clippingAncestors" ? St(e) ? [] : Gn(e, this._c) : [].concat(n), r], s = c[0], u = c.reduce((f, l) => {
1435
- const a = Jt(e, l, o);
1436
- return f.top = B(a.top, f.top), f.right = U(a.right, f.right), f.bottom = U(a.bottom, f.bottom), f.left = B(a.left, f.left), f;
1437
- }, Jt(e, s, o));
1435
+ const s = [...n === "clippingAncestors" ? oe(e) ? [] : ir(e, this._c) : [].concat(n), o], l = s[0], d = s.reduce((c, u) => {
1436
+ const r = Ue(e, u, a);
1437
+ return c.top = Z(r.top, c.top), c.right = ht(r.right, c.right), c.bottom = ht(r.bottom, c.bottom), c.left = Z(r.left, c.left), c;
1438
+ }, Ue(e, l, a));
1438
1439
  return {
1439
- width: u.right - u.left,
1440
- height: u.bottom - u.top,
1441
- x: u.left,
1442
- y: u.top
1440
+ width: d.right - d.left,
1441
+ height: d.bottom - d.top,
1442
+ x: d.left,
1443
+ y: d.top
1443
1444
  };
1444
1445
  }
1445
- function Qn(t) {
1446
+ function lr(t) {
1446
1447
  const {
1447
1448
  width: e,
1448
1449
  height: n
1449
- } = ge(t);
1450
+ } = fn(t);
1450
1451
  return {
1451
1452
  width: e,
1452
1453
  height: n
1453
1454
  };
1454
1455
  }
1455
- function Jn(t, e, n) {
1456
- const r = _(e), o = X(e), i = n === "fixed", c = K(t, !0, i, e);
1457
- let s = {
1456
+ function cr(t, e, n) {
1457
+ const o = st(e), a = lt(e), i = n === "fixed", s = yt(t, !0, i, e);
1458
+ let l = {
1458
1459
  scrollLeft: 0,
1459
1460
  scrollTop: 0
1460
1461
  };
1461
- const u = z(0);
1462
- function f() {
1463
- u.x = Rt(o);
1462
+ const d = it(0);
1463
+ function c() {
1464
+ d.x = ae(a);
1464
1465
  }
1465
- if (r || !r && !i)
1466
- if ((it(e) !== "body" || st(o)) && (s = Ct(e)), r) {
1467
- const h = K(e, !0, i, e);
1468
- u.x = h.x + e.clientLeft, u.y = h.y + e.clientTop;
1469
- } else o && f();
1470
- i && !r && o && f();
1471
- const l = o && !r && !i ? pe(o, s) : z(0), a = c.left + s.scrollLeft - u.x - l.x, m = c.top + s.scrollTop - u.y - l.y;
1466
+ if (o || !o && !i)
1467
+ if ((Nt(e) !== "body" || Bt(a)) && (l = re(e)), o) {
1468
+ const m = yt(e, !0, i, e);
1469
+ d.x = m.x + e.clientLeft, d.y = m.y + e.clientTop;
1470
+ } else a && c();
1471
+ i && !o && a && c();
1472
+ const u = a && !o && !i ? hn(a, l) : it(0), r = s.left + l.scrollLeft - d.x - u.x, f = s.top + l.scrollTop - d.y - u.y;
1472
1473
  return {
1473
- x: a,
1474
- y: m,
1475
- width: c.width,
1476
- height: c.height
1474
+ x: r,
1475
+ y: f,
1476
+ width: s.width,
1477
+ height: s.height
1477
1478
  };
1478
1479
  }
1479
- function Pt(t) {
1480
- return H(t).position === "static";
1480
+ function me(t) {
1481
+ return ot(t).position === "static";
1481
1482
  }
1482
- function te(t, e) {
1483
- if (!_(t) || H(t).position === "fixed")
1483
+ function qe(t, e) {
1484
+ if (!st(t) || ot(t).position === "fixed")
1484
1485
  return null;
1485
1486
  if (e)
1486
1487
  return e(t);
1487
1488
  let n = t.offsetParent;
1488
- return X(t) === n && (n = n.ownerDocument.body), n;
1489
+ return lt(t) === n && (n = n.ownerDocument.body), n;
1489
1490
  }
1490
- function ye(t, e) {
1491
- const n = F(t);
1492
- if (St(t))
1491
+ function pn(t, e) {
1492
+ const n = G(t);
1493
+ if (oe(t))
1493
1494
  return n;
1494
- if (!_(t)) {
1495
- let o = G(t);
1496
- for (; o && !rt(o); ) {
1497
- if (V(o) && !Pt(o))
1498
- return o;
1499
- o = G(o);
1495
+ if (!st(t)) {
1496
+ let a = gt(t);
1497
+ for (; a && !Ot(a); ) {
1498
+ if (nt(a) && !me(a))
1499
+ return a;
1500
+ a = gt(a);
1500
1501
  }
1501
1502
  return n;
1502
1503
  }
1503
- let r = te(t, e);
1504
- for (; r && Nn(r) && Pt(r); )
1505
- r = te(r, e);
1506
- return r && rt(r) && Pt(r) && !Vt(r) ? n : r || $n(t) || n;
1504
+ let o = qe(t, e);
1505
+ for (; o && jo(o) && me(o); )
1506
+ o = qe(o, e);
1507
+ return o && Ot(o) && me(o) && !Ee(o) ? n : o || Zo(t) || n;
1507
1508
  }
1508
- const tr = async function(t) {
1509
- const e = this.getOffsetParent || ye, n = this.getDimensions, r = await n(t.floating);
1509
+ const ur = async function(t) {
1510
+ const e = this.getOffsetParent || pn, n = this.getDimensions, o = await n(t.floating);
1510
1511
  return {
1511
- reference: Jn(t.reference, await e(t.floating), t.strategy),
1512
+ reference: cr(t.reference, await e(t.floating), t.strategy),
1512
1513
  floating: {
1513
1514
  x: 0,
1514
1515
  y: 0,
1515
- width: r.width,
1516
- height: r.height
1516
+ width: o.width,
1517
+ height: o.height
1517
1518
  }
1518
1519
  };
1519
1520
  };
1520
- function er(t) {
1521
- return H(t).direction === "rtl";
1522
- }
1523
- const nr = {
1524
- convertOffsetParentRelativeRectToViewportRelativeRect: Xn,
1525
- getDocumentElement: X,
1526
- getClippingRect: Kn,
1527
- getOffsetParent: ye,
1528
- getElementRects: tr,
1529
- getClientRects: Yn,
1530
- getDimensions: Qn,
1531
- getScale: nt,
1532
- isElement: V,
1533
- isRTL: er
1521
+ function dr(t) {
1522
+ return ot(t).direction === "rtl";
1523
+ }
1524
+ const fr = {
1525
+ convertOffsetParentRelativeRectToViewportRelativeRect: tr,
1526
+ getDocumentElement: lt,
1527
+ getClippingRect: sr,
1528
+ getOffsetParent: pn,
1529
+ getElementRects: ur,
1530
+ getClientRects: er,
1531
+ getDimensions: lr,
1532
+ getScale: Mt,
1533
+ isElement: nt,
1534
+ isRTL: dr
1534
1535
  };
1535
- function xe(t, e) {
1536
+ function vn(t, e) {
1536
1537
  return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
1537
1538
  }
1538
- function rr(t, e) {
1539
- let n = null, r;
1540
- const o = X(t);
1539
+ function mr(t, e) {
1540
+ let n = null, o;
1541
+ const a = lt(t);
1541
1542
  function i() {
1542
- var s;
1543
- clearTimeout(r), (s = n) == null || s.disconnect(), n = null;
1543
+ var l;
1544
+ clearTimeout(o), (l = n) == null || l.disconnect(), n = null;
1544
1545
  }
1545
- function c(s, u) {
1546
- s === void 0 && (s = !1), u === void 0 && (u = 1), i();
1547
- const f = t.getBoundingClientRect(), {
1548
- left: l,
1549
- top: a,
1550
- width: m,
1551
- height: h
1552
- } = f;
1553
- if (s || e(), !m || !h)
1546
+ function s(l, d) {
1547
+ l === void 0 && (l = !1), d === void 0 && (d = 1), i();
1548
+ const c = t.getBoundingClientRect(), {
1549
+ left: u,
1550
+ top: r,
1551
+ width: f,
1552
+ height: m
1553
+ } = c;
1554
+ if (l || e(), !f || !m)
1554
1555
  return;
1555
- const v = dt(a), d = dt(o.clientWidth - (l + m)), g = dt(o.clientHeight - (a + h)), p = dt(l), x = {
1556
- rootMargin: -v + "px " + -d + "px " + -g + "px " + -p + "px",
1557
- threshold: B(0, U(1, u)) || 1
1556
+ const p = Xt(r), h = Xt(a.clientWidth - (u + f)), y = Xt(a.clientHeight - (r + m)), g = Xt(u), w = {
1557
+ rootMargin: -p + "px " + -h + "px " + -y + "px " + -g + "px",
1558
+ threshold: Z(0, ht(1, d)) || 1
1558
1559
  };
1559
- let b = !0;
1560
- function S(C) {
1561
- const R = C[0].intersectionRatio;
1562
- if (R !== u) {
1563
- if (!b)
1564
- return c();
1565
- R ? c(!1, R) : r = setTimeout(() => {
1566
- c(!1, 1e-7);
1560
+ let x = !0;
1561
+ function E(R) {
1562
+ const A = R[0].intersectionRatio;
1563
+ if (A !== d) {
1564
+ if (!x)
1565
+ return s();
1566
+ A ? s(!1, A) : o = setTimeout(() => {
1567
+ s(!1, 1e-7);
1567
1568
  }, 1e3);
1568
1569
  }
1569
- R === 1 && !xe(f, t.getBoundingClientRect()) && c(), b = !1;
1570
+ A === 1 && !vn(c, t.getBoundingClientRect()) && s(), x = !1;
1570
1571
  }
1571
1572
  try {
1572
- n = new IntersectionObserver(S, {
1573
- ...x,
1573
+ n = new IntersectionObserver(E, {
1574
+ ...w,
1574
1575
  // Handle <iframe>s
1575
- root: o.ownerDocument
1576
+ root: a.ownerDocument
1576
1577
  });
1577
1578
  } catch {
1578
- n = new IntersectionObserver(S, x);
1579
+ n = new IntersectionObserver(E, w);
1579
1580
  }
1580
1581
  n.observe(t);
1581
1582
  }
1582
- return c(!0), i;
1583
+ return s(!0), i;
1583
1584
  }
1584
- function pr(t, e, n, r) {
1585
- r === void 0 && (r = {});
1585
+ function ea(t, e, n, o) {
1586
+ o === void 0 && (o = {});
1586
1587
  const {
1587
- ancestorScroll: o = !0,
1588
+ ancestorScroll: a = !0,
1588
1589
  ancestorResize: i = !0,
1589
- elementResize: c = typeof ResizeObserver == "function",
1590
- layoutShift: s = typeof IntersectionObserver == "function",
1591
- animationFrame: u = !1
1592
- } = r, f = $t(t), l = o || i ? [...f ? ct(f) : [], ...ct(e)] : [];
1593
- l.forEach((p) => {
1594
- o && p.addEventListener("scroll", n, {
1590
+ elementResize: s = typeof ResizeObserver == "function",
1591
+ layoutShift: l = typeof IntersectionObserver == "function",
1592
+ animationFrame: d = !1
1593
+ } = o, c = Ce(t), u = a || i ? [...c ? Lt(c) : [], ...Lt(e)] : [];
1594
+ u.forEach((g) => {
1595
+ a && g.addEventListener("scroll", n, {
1595
1596
  passive: !0
1596
- }), i && p.addEventListener("resize", n);
1597
+ }), i && g.addEventListener("resize", n);
1597
1598
  });
1598
- const a = f && s ? rr(f, n) : null;
1599
- let m = -1, h = null;
1600
- c && (h = new ResizeObserver((p) => {
1601
- let [y] = p;
1602
- y && y.target === f && h && (h.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
1603
- var x;
1604
- (x = h) == null || x.observe(e);
1599
+ const r = c && l ? mr(c, n) : null;
1600
+ let f = -1, m = null;
1601
+ s && (m = new ResizeObserver((g) => {
1602
+ let [b] = g;
1603
+ b && b.target === c && m && (m.unobserve(e), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
1604
+ var w;
1605
+ (w = m) == null || w.observe(e);
1605
1606
  })), n();
1606
- }), f && !u && h.observe(f), h.observe(e));
1607
- let v, d = u ? K(t) : null;
1608
- u && g();
1609
- function g() {
1610
- const p = K(t);
1611
- d && !xe(d, p) && n(), d = p, v = requestAnimationFrame(g);
1607
+ }), c && !d && m.observe(c), m.observe(e));
1608
+ let p, h = d ? yt(t) : null;
1609
+ d && y();
1610
+ function y() {
1611
+ const g = yt(t);
1612
+ h && !vn(h, g) && n(), h = g, p = requestAnimationFrame(y);
1612
1613
  }
1613
1614
  return n(), () => {
1614
- var p;
1615
- l.forEach((y) => {
1616
- o && y.removeEventListener("scroll", n), i && y.removeEventListener("resize", n);
1617
- }), a == null || a(), (p = h) == null || p.disconnect(), h = null, u && cancelAnimationFrame(v);
1615
+ var g;
1616
+ u.forEach((b) => {
1617
+ a && b.removeEventListener("scroll", n), i && b.removeEventListener("resize", n);
1618
+ }), r == null || r(), (g = m) == null || g.disconnect(), m = null, d && cancelAnimationFrame(p);
1618
1619
  };
1619
1620
  }
1620
- const or = Pn, ir = kn, cr = En, sr = Tn, ar = On, ee = An, lr = Ln, fr = (t, e, n) => {
1621
- const r = /* @__PURE__ */ new Map(), o = {
1622
- platform: nr,
1621
+ const hr = Fo, gr = Wo, pr = _o, vr = zo, yr = Io, Ke = Bo, br = $o, wr = (t, e, n) => {
1622
+ const o = /* @__PURE__ */ new Map(), a = {
1623
+ platform: fr,
1623
1624
  ...n
1624
1625
  }, i = {
1625
- ...o.platform,
1626
- _c: r
1626
+ ...a.platform,
1627
+ _c: o
1627
1628
  };
1628
- return Rn(t, e, {
1629
- ...o,
1629
+ return Lo(t, e, {
1630
+ ...a,
1630
1631
  platform: i
1631
1632
  });
1632
1633
  };
1633
- var ur = typeof document < "u", dr = function() {
1634
- }, gt = ur ? Ce : dr;
1635
- function yt(t, e) {
1634
+ var xr = typeof document < "u", Sr = function() {
1635
+ }, Zt = xr ? Nn : Sr;
1636
+ function te(t, e) {
1636
1637
  if (t === e)
1637
1638
  return !0;
1638
1639
  if (typeof t != typeof e)
1639
1640
  return !1;
1640
1641
  if (typeof t == "function" && t.toString() === e.toString())
1641
1642
  return !0;
1642
- let n, r, o;
1643
+ let n, o, a;
1643
1644
  if (t && e && typeof t == "object") {
1644
1645
  if (Array.isArray(t)) {
1645
1646
  if (n = t.length, n !== e.length) return !1;
1646
- for (r = n; r-- !== 0; )
1647
- if (!yt(t[r], e[r]))
1647
+ for (o = n; o-- !== 0; )
1648
+ if (!te(t[o], e[o]))
1648
1649
  return !1;
1649
1650
  return !0;
1650
1651
  }
1651
- if (o = Object.keys(t), n = o.length, n !== Object.keys(e).length)
1652
+ if (a = Object.keys(t), n = a.length, n !== Object.keys(e).length)
1652
1653
  return !1;
1653
- for (r = n; r-- !== 0; )
1654
- if (!{}.hasOwnProperty.call(e, o[r]))
1654
+ for (o = n; o-- !== 0; )
1655
+ if (!{}.hasOwnProperty.call(e, a[o]))
1655
1656
  return !1;
1656
- for (r = n; r-- !== 0; ) {
1657
- const i = o[r];
1658
- if (!(i === "_owner" && t.$$typeof) && !yt(t[i], e[i]))
1657
+ for (o = n; o-- !== 0; ) {
1658
+ const i = a[o];
1659
+ if (!(i === "_owner" && t.$$typeof) && !te(t[i], e[i]))
1659
1660
  return !1;
1660
1661
  }
1661
1662
  return !0;
1662
1663
  }
1663
1664
  return t !== t && e !== e;
1664
1665
  }
1665
- function be(t) {
1666
+ function yn(t) {
1666
1667
  return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
1667
1668
  }
1668
- function ne(t, e) {
1669
- const n = be(t);
1669
+ function Ze(t, e) {
1670
+ const n = yn(t);
1670
1671
  return Math.round(e * n) / n;
1671
1672
  }
1672
- function kt(t) {
1673
- const e = w.useRef(t);
1674
- return gt(() => {
1673
+ function he(t) {
1674
+ const e = S.useRef(t);
1675
+ return Zt(() => {
1675
1676
  e.current = t;
1676
1677
  }), e;
1677
1678
  }
1678
- function wr(t) {
1679
+ function na(t) {
1679
1680
  t === void 0 && (t = {});
1680
1681
  const {
1681
1682
  placement: e = "bottom",
1682
1683
  strategy: n = "absolute",
1683
- middleware: r = [],
1684
- platform: o,
1684
+ middleware: o = [],
1685
+ platform: a,
1685
1686
  elements: {
1686
1687
  reference: i,
1687
- floating: c
1688
+ floating: s
1688
1689
  } = {},
1689
- transform: s = !0,
1690
- whileElementsMounted: u,
1691
- open: f
1692
- } = t, [l, a] = w.useState({
1690
+ transform: l = !0,
1691
+ whileElementsMounted: d,
1692
+ open: c
1693
+ } = t, [u, r] = S.useState({
1693
1694
  x: 0,
1694
1695
  y: 0,
1695
1696
  strategy: n,
1696
1697
  placement: e,
1697
1698
  middlewareData: {},
1698
1699
  isPositioned: !1
1699
- }), [m, h] = w.useState(r);
1700
- yt(m, r) || h(r);
1701
- const [v, d] = w.useState(null), [g, p] = w.useState(null), y = w.useCallback((A) => {
1702
- A !== C.current && (C.current = A, d(A));
1703
- }, []), x = w.useCallback((A) => {
1704
- A !== R.current && (R.current = A, p(A));
1705
- }, []), b = i || v, S = c || g, C = w.useRef(null), R = w.useRef(null), M = w.useRef(l), L = u != null, O = kt(u), P = kt(o), T = kt(f), D = w.useCallback(() => {
1706
- if (!C.current || !R.current)
1700
+ }), [f, m] = S.useState(o);
1701
+ te(f, o) || m(o);
1702
+ const [p, h] = S.useState(null), [y, g] = S.useState(null), b = S.useCallback((k) => {
1703
+ k !== R.current && (R.current = k, h(k));
1704
+ }, []), w = S.useCallback((k) => {
1705
+ k !== A.current && (A.current = k, g(k));
1706
+ }, []), x = i || p, E = s || y, R = S.useRef(null), A = S.useRef(null), D = S.useRef(u), $ = d != null, B = he(d), H = he(a), _ = he(c), N = S.useCallback(() => {
1707
+ if (!R.current || !A.current)
1707
1708
  return;
1708
- const A = {
1709
+ const k = {
1709
1710
  placement: e,
1710
1711
  strategy: n,
1711
- middleware: m
1712
+ middleware: f
1712
1713
  };
1713
- P.current && (A.platform = P.current), fr(C.current, R.current, A).then((N) => {
1714
- const q = {
1715
- ...N,
1714
+ H.current && (k.platform = H.current), wr(R.current, A.current, k).then((F) => {
1715
+ const z = {
1716
+ ...F,
1716
1717
  // The floating element's position may be recomputed while it's closed
1717
1718
  // but still mounted (such as when transitioning out). To ensure
1718
1719
  // `isPositioned` will be `false` initially on the next open, avoid
1719
1720
  // setting it to `true` when `open === false` (must be specified).
1720
- isPositioned: T.current !== !1
1721
+ isPositioned: _.current !== !1
1721
1722
  };
1722
- E.current && !yt(M.current, q) && (M.current = q, Ae.flushSync(() => {
1723
- a(q);
1723
+ P.current && !te(D.current, z) && (D.current = z, Ln.flushSync(() => {
1724
+ r(z);
1724
1725
  }));
1725
1726
  });
1726
- }, [m, e, n, P, T]);
1727
- gt(() => {
1728
- f === !1 && M.current.isPositioned && (M.current.isPositioned = !1, a((A) => ({
1729
- ...A,
1727
+ }, [f, e, n, H, _]);
1728
+ Zt(() => {
1729
+ c === !1 && D.current.isPositioned && (D.current.isPositioned = !1, r((k) => ({
1730
+ ...k,
1730
1731
  isPositioned: !1
1731
1732
  })));
1732
- }, [f]);
1733
- const E = w.useRef(!1);
1734
- gt(() => (E.current = !0, () => {
1735
- E.current = !1;
1736
- }), []), gt(() => {
1737
- if (b && (C.current = b), S && (R.current = S), b && S) {
1738
- if (O.current)
1739
- return O.current(b, S, D);
1740
- D();
1733
+ }, [c]);
1734
+ const P = S.useRef(!1);
1735
+ Zt(() => (P.current = !0, () => {
1736
+ P.current = !1;
1737
+ }), []), Zt(() => {
1738
+ if (x && (R.current = x), E && (A.current = E), x && E) {
1739
+ if (B.current)
1740
+ return B.current(x, E, N);
1741
+ N();
1741
1742
  }
1742
- }, [b, S, D, O, L]);
1743
- const $ = w.useMemo(() => ({
1744
- reference: C,
1745
- floating: R,
1746
- setReference: y,
1747
- setFloating: x
1748
- }), [y, x]), k = w.useMemo(() => ({
1749
- reference: b,
1750
- floating: S
1751
- }), [b, S]), W = w.useMemo(() => {
1752
- const A = {
1743
+ }, [x, E, N, B, $]);
1744
+ const j = S.useMemo(() => ({
1745
+ reference: R,
1746
+ floating: A,
1747
+ setReference: b,
1748
+ setFloating: w
1749
+ }), [b, w]), C = S.useMemo(() => ({
1750
+ reference: x,
1751
+ floating: E
1752
+ }), [x, E]), O = S.useMemo(() => {
1753
+ const k = {
1753
1754
  position: n,
1754
1755
  left: 0,
1755
1756
  top: 0
1756
1757
  };
1757
- if (!k.floating)
1758
- return A;
1759
- const N = ne(k.floating, l.x), q = ne(k.floating, l.y);
1760
- return s ? {
1761
- ...A,
1762
- transform: "translate(" + N + "px, " + q + "px)",
1763
- ...be(k.floating) >= 1.5 && {
1758
+ if (!C.floating)
1759
+ return k;
1760
+ const F = Ze(C.floating, u.x), z = Ze(C.floating, u.y);
1761
+ return l ? {
1762
+ ...k,
1763
+ transform: "translate(" + F + "px, " + z + "px)",
1764
+ ...yn(C.floating) >= 1.5 && {
1764
1765
  willChange: "transform"
1765
1766
  }
1766
1767
  } : {
1767
1768
  position: n,
1768
- left: N,
1769
- top: q
1769
+ left: F,
1770
+ top: z
1770
1771
  };
1771
- }, [n, s, k.floating, l.x, l.y]);
1772
- return w.useMemo(() => ({
1773
- ...l,
1774
- update: D,
1775
- refs: $,
1776
- elements: k,
1777
- floatingStyles: W
1778
- }), [l, D, $, k, W]);
1779
- }
1780
- const hr = (t) => {
1772
+ }, [n, l, C.floating, u.x, u.y]);
1773
+ return S.useMemo(() => ({
1774
+ ...u,
1775
+ update: N,
1776
+ refs: j,
1777
+ elements: C,
1778
+ floatingStyles: O
1779
+ }), [u, N, j, C, O]);
1780
+ }
1781
+ const Er = (t) => {
1781
1782
  function e(n) {
1782
1783
  return {}.hasOwnProperty.call(n, "current");
1783
1784
  }
@@ -1786,50 +1787,792 @@ const hr = (t) => {
1786
1787
  options: t,
1787
1788
  fn(n) {
1788
1789
  const {
1789
- element: r,
1790
- padding: o
1790
+ element: o,
1791
+ padding: a
1791
1792
  } = typeof t == "function" ? t(n) : t;
1792
- return r && e(r) ? r.current != null ? ee({
1793
- element: r.current,
1794
- padding: o
1795
- }).fn(n) : {} : r ? ee({
1796
- element: r,
1797
- padding: o
1793
+ return o && e(o) ? o.current != null ? Ke({
1794
+ element: o.current,
1795
+ padding: a
1796
+ }).fn(n) : {} : o ? Ke({
1797
+ element: o,
1798
+ padding: a
1798
1799
  }).fn(n) : {};
1799
1800
  }
1800
1801
  };
1801
- }, yr = (t, e) => ({
1802
- ...or(t),
1802
+ }, oa = (t, e) => ({
1803
+ ...hr(t),
1803
1804
  options: [t, e]
1804
- }), xr = (t, e) => ({
1805
- ...ir(t),
1805
+ }), ra = (t, e) => ({
1806
+ ...gr(t),
1806
1807
  options: [t, e]
1807
- }), br = (t, e) => ({
1808
- ...lr(t),
1808
+ }), aa = (t, e) => ({
1809
+ ...br(t),
1809
1810
  options: [t, e]
1810
- }), Sr = (t, e) => ({
1811
- ...cr(t),
1811
+ }), ia = (t, e) => ({
1812
+ ...pr(t),
1812
1813
  options: [t, e]
1813
- }), Cr = (t, e) => ({
1814
- ...sr(t),
1814
+ }), sa = (t, e) => ({
1815
+ ...vr(t),
1815
1816
  options: [t, e]
1816
- }), Rr = (t, e) => ({
1817
- ...ar(t),
1817
+ }), la = (t, e) => ({
1818
+ ...yr(t),
1818
1819
  options: [t, e]
1819
- }), Ar = (t, e) => ({
1820
- ...hr(t),
1820
+ }), ca = (t, e) => ({
1821
+ ...Er(t),
1821
1822
  options: [t, e]
1822
1823
  });
1824
+ function Rr(t) {
1825
+ if (typeof document > "u") return;
1826
+ let e = document.head || document.getElementsByTagName("head")[0], n = document.createElement("style");
1827
+ n.type = "text/css", e.appendChild(n), n.styleSheet ? n.styleSheet.cssText = t : n.appendChild(document.createTextNode(t));
1828
+ }
1829
+ const Cr = (t) => {
1830
+ switch (t) {
1831
+ case "success":
1832
+ return kr;
1833
+ case "info":
1834
+ return Or;
1835
+ case "warning":
1836
+ return Mr;
1837
+ case "error":
1838
+ return Dr;
1839
+ default:
1840
+ return null;
1841
+ }
1842
+ }, Tr = Array(12).fill(0), Ar = ({ visible: t, className: e }) => /* @__PURE__ */ v.createElement("div", {
1843
+ className: [
1844
+ "sonner-loading-wrapper",
1845
+ e
1846
+ ].filter(Boolean).join(" "),
1847
+ "data-visible": t
1848
+ }, /* @__PURE__ */ v.createElement("div", {
1849
+ className: "sonner-spinner"
1850
+ }, Tr.map((n, o) => /* @__PURE__ */ v.createElement("div", {
1851
+ className: "sonner-loading-bar",
1852
+ key: `spinner-bar-${o}`
1853
+ })))), kr = /* @__PURE__ */ v.createElement("svg", {
1854
+ xmlns: "http://www.w3.org/2000/svg",
1855
+ viewBox: "0 0 20 20",
1856
+ fill: "currentColor",
1857
+ height: "20",
1858
+ width: "20"
1859
+ }, /* @__PURE__ */ v.createElement("path", {
1860
+ fillRule: "evenodd",
1861
+ d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",
1862
+ clipRule: "evenodd"
1863
+ })), Mr = /* @__PURE__ */ v.createElement("svg", {
1864
+ xmlns: "http://www.w3.org/2000/svg",
1865
+ viewBox: "0 0 24 24",
1866
+ fill: "currentColor",
1867
+ height: "20",
1868
+ width: "20"
1869
+ }, /* @__PURE__ */ v.createElement("path", {
1870
+ fillRule: "evenodd",
1871
+ d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",
1872
+ clipRule: "evenodd"
1873
+ })), Or = /* @__PURE__ */ v.createElement("svg", {
1874
+ xmlns: "http://www.w3.org/2000/svg",
1875
+ viewBox: "0 0 20 20",
1876
+ fill: "currentColor",
1877
+ height: "20",
1878
+ width: "20"
1879
+ }, /* @__PURE__ */ v.createElement("path", {
1880
+ fillRule: "evenodd",
1881
+ d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",
1882
+ clipRule: "evenodd"
1883
+ })), Dr = /* @__PURE__ */ v.createElement("svg", {
1884
+ xmlns: "http://www.w3.org/2000/svg",
1885
+ viewBox: "0 0 20 20",
1886
+ fill: "currentColor",
1887
+ height: "20",
1888
+ width: "20"
1889
+ }, /* @__PURE__ */ v.createElement("path", {
1890
+ fillRule: "evenodd",
1891
+ d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",
1892
+ clipRule: "evenodd"
1893
+ })), Nr = /* @__PURE__ */ v.createElement("svg", {
1894
+ xmlns: "http://www.w3.org/2000/svg",
1895
+ width: "12",
1896
+ height: "12",
1897
+ viewBox: "0 0 24 24",
1898
+ fill: "none",
1899
+ stroke: "currentColor",
1900
+ strokeWidth: "1.5",
1901
+ strokeLinecap: "round",
1902
+ strokeLinejoin: "round"
1903
+ }, /* @__PURE__ */ v.createElement("line", {
1904
+ x1: "18",
1905
+ y1: "6",
1906
+ x2: "6",
1907
+ y2: "18"
1908
+ }), /* @__PURE__ */ v.createElement("line", {
1909
+ x1: "6",
1910
+ y1: "6",
1911
+ x2: "18",
1912
+ y2: "18"
1913
+ })), Pr = () => {
1914
+ const [t, e] = v.useState(document.hidden);
1915
+ return v.useEffect(() => {
1916
+ const n = () => {
1917
+ e(document.hidden);
1918
+ };
1919
+ return document.addEventListener("visibilitychange", n), () => window.removeEventListener("visibilitychange", n);
1920
+ }, []), t;
1921
+ };
1922
+ let be = 1;
1923
+ class Lr {
1924
+ constructor() {
1925
+ this.subscribe = (e) => (this.subscribers.push(e), () => {
1926
+ const n = this.subscribers.indexOf(e);
1927
+ this.subscribers.splice(n, 1);
1928
+ }), this.publish = (e) => {
1929
+ this.subscribers.forEach((n) => n(e));
1930
+ }, this.addToast = (e) => {
1931
+ this.publish(e), this.toasts = [
1932
+ ...this.toasts,
1933
+ e
1934
+ ];
1935
+ }, this.create = (e) => {
1936
+ var n;
1937
+ const { message: o, ...a } = e, i = typeof (e == null ? void 0 : e.id) == "number" || ((n = e.id) == null ? void 0 : n.length) > 0 ? e.id : be++, s = this.toasts.find((d) => d.id === i), l = e.dismissible === void 0 ? !0 : e.dismissible;
1938
+ return this.dismissedToasts.has(i) && this.dismissedToasts.delete(i), s ? this.toasts = this.toasts.map((d) => d.id === i ? (this.publish({
1939
+ ...d,
1940
+ ...e,
1941
+ id: i,
1942
+ title: o
1943
+ }), {
1944
+ ...d,
1945
+ ...e,
1946
+ id: i,
1947
+ dismissible: l,
1948
+ title: o
1949
+ }) : d) : this.addToast({
1950
+ title: o,
1951
+ ...a,
1952
+ dismissible: l,
1953
+ id: i
1954
+ }), i;
1955
+ }, this.dismiss = (e) => (e ? (this.dismissedToasts.add(e), requestAnimationFrame(() => this.subscribers.forEach((n) => n({
1956
+ id: e,
1957
+ dismiss: !0
1958
+ })))) : this.toasts.forEach((n) => {
1959
+ this.subscribers.forEach((o) => o({
1960
+ id: n.id,
1961
+ dismiss: !0
1962
+ }));
1963
+ }), e), this.message = (e, n) => this.create({
1964
+ ...n,
1965
+ message: e
1966
+ }), this.error = (e, n) => this.create({
1967
+ ...n,
1968
+ message: e,
1969
+ type: "error"
1970
+ }), this.success = (e, n) => this.create({
1971
+ ...n,
1972
+ type: "success",
1973
+ message: e
1974
+ }), this.info = (e, n) => this.create({
1975
+ ...n,
1976
+ type: "info",
1977
+ message: e
1978
+ }), this.warning = (e, n) => this.create({
1979
+ ...n,
1980
+ type: "warning",
1981
+ message: e
1982
+ }), this.loading = (e, n) => this.create({
1983
+ ...n,
1984
+ type: "loading",
1985
+ message: e
1986
+ }), this.promise = (e, n) => {
1987
+ if (!n)
1988
+ return;
1989
+ let o;
1990
+ n.loading !== void 0 && (o = this.create({
1991
+ ...n,
1992
+ promise: e,
1993
+ type: "loading",
1994
+ message: n.loading,
1995
+ description: typeof n.description != "function" ? n.description : void 0
1996
+ }));
1997
+ const a = Promise.resolve(e instanceof Function ? e() : e);
1998
+ let i = o !== void 0, s;
1999
+ const l = a.then(async (c) => {
2000
+ if (s = [
2001
+ "resolve",
2002
+ c
2003
+ ], v.isValidElement(c))
2004
+ i = !1, this.create({
2005
+ id: o,
2006
+ type: "default",
2007
+ message: c
2008
+ });
2009
+ else if (_r(c) && !c.ok) {
2010
+ i = !1;
2011
+ const r = typeof n.error == "function" ? await n.error(`HTTP error! status: ${c.status}`) : n.error, f = typeof n.description == "function" ? await n.description(`HTTP error! status: ${c.status}`) : n.description, p = typeof r == "object" && !v.isValidElement(r) ? r : {
2012
+ message: r
2013
+ };
2014
+ this.create({
2015
+ id: o,
2016
+ type: "error",
2017
+ description: f,
2018
+ ...p
2019
+ });
2020
+ } else if (c instanceof Error) {
2021
+ i = !1;
2022
+ const r = typeof n.error == "function" ? await n.error(c) : n.error, f = typeof n.description == "function" ? await n.description(c) : n.description, p = typeof r == "object" && !v.isValidElement(r) ? r : {
2023
+ message: r
2024
+ };
2025
+ this.create({
2026
+ id: o,
2027
+ type: "error",
2028
+ description: f,
2029
+ ...p
2030
+ });
2031
+ } else if (n.success !== void 0) {
2032
+ i = !1;
2033
+ const r = typeof n.success == "function" ? await n.success(c) : n.success, f = typeof n.description == "function" ? await n.description(c) : n.description, p = typeof r == "object" && !v.isValidElement(r) ? r : {
2034
+ message: r
2035
+ };
2036
+ this.create({
2037
+ id: o,
2038
+ type: "success",
2039
+ description: f,
2040
+ ...p
2041
+ });
2042
+ }
2043
+ }).catch(async (c) => {
2044
+ if (s = [
2045
+ "reject",
2046
+ c
2047
+ ], n.error !== void 0) {
2048
+ i = !1;
2049
+ const u = typeof n.error == "function" ? await n.error(c) : n.error, r = typeof n.description == "function" ? await n.description(c) : n.description, m = typeof u == "object" && !v.isValidElement(u) ? u : {
2050
+ message: u
2051
+ };
2052
+ this.create({
2053
+ id: o,
2054
+ type: "error",
2055
+ description: r,
2056
+ ...m
2057
+ });
2058
+ }
2059
+ }).finally(() => {
2060
+ i && (this.dismiss(o), o = void 0), n.finally == null || n.finally.call(n);
2061
+ }), d = () => new Promise((c, u) => l.then(() => s[0] === "reject" ? u(s[1]) : c(s[1])).catch(u));
2062
+ return typeof o != "string" && typeof o != "number" ? {
2063
+ unwrap: d
2064
+ } : Object.assign(o, {
2065
+ unwrap: d
2066
+ });
2067
+ }, this.custom = (e, n) => {
2068
+ const o = (n == null ? void 0 : n.id) || be++;
2069
+ return this.create({
2070
+ jsx: e(o),
2071
+ id: o,
2072
+ ...n
2073
+ }), o;
2074
+ }, this.getActiveToasts = () => this.toasts.filter((e) => !this.dismissedToasts.has(e.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set();
2075
+ }
2076
+ }
2077
+ const U = new Lr(), Br = (t, e) => {
2078
+ const n = (e == null ? void 0 : e.id) || be++;
2079
+ return U.addToast({
2080
+ title: t,
2081
+ ...e,
2082
+ id: n
2083
+ }), n;
2084
+ }, _r = (t) => t && typeof t == "object" && "ok" in t && typeof t.ok == "boolean" && "status" in t && typeof t.status == "number", Ir = Br, Hr = () => U.toasts, Fr = () => U.getActiveToasts(), ua = Object.assign(Ir, {
2085
+ success: U.success,
2086
+ info: U.info,
2087
+ warning: U.warning,
2088
+ error: U.error,
2089
+ custom: U.custom,
2090
+ message: U.message,
2091
+ promise: U.promise,
2092
+ dismiss: U.dismiss,
2093
+ loading: U.loading
2094
+ }, {
2095
+ getHistory: Hr,
2096
+ getToasts: Fr
2097
+ });
2098
+ Rr("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
2099
+ function Ut(t) {
2100
+ return t.label !== void 0;
2101
+ }
2102
+ const Wr = 3, $r = "24px", zr = "16px", Ge = 4e3, Vr = 356, Yr = 14, jr = 45, Xr = 200;
2103
+ function rt(...t) {
2104
+ return t.filter(Boolean).join(" ");
2105
+ }
2106
+ function Ur(t) {
2107
+ const [e, n] = t.split("-"), o = [];
2108
+ return e && o.push(e), n && o.push(n), o;
2109
+ }
2110
+ const qr = (t) => {
2111
+ var e, n, o, a, i, s, l, d, c;
2112
+ const { invert: u, toast: r, unstyled: f, interacting: m, setHeights: p, visibleToasts: h, heights: y, index: g, toasts: b, expanded: w, removeToast: x, defaultRichColors: E, closeButton: R, style: A, cancelButtonStyle: D, actionButtonStyle: $, className: B = "", descriptionClassName: H = "", duration: _, position: N, gap: P, expandByDefault: j, classNames: C, icons: O, closeButtonAriaLabel: k = "Close toast" } = t, [F, z] = v.useState(null), [pt, _t] = v.useState(null), [M, W] = v.useState(!1), [I, Q] = v.useState(!1), [bt, L] = v.useState(!1), [wt, It] = v.useState(!1), [Ht, xt] = v.useState(!1), [bn, ie] = v.useState(0), [wn, Te] = v.useState(0), Pt = v.useRef(r.duration || _ || Ge), Ae = v.useRef(null), ct = v.useRef(null), xn = g === 0, Sn = g + 1 <= h, q = r.type, St = r.dismissible !== !1, En = r.className || "", Rn = r.descriptionClassName || "", Ft = v.useMemo(() => y.findIndex((T) => T.toastId === r.id) || 0, [
2113
+ y,
2114
+ r.id
2115
+ ]), Cn = v.useMemo(() => {
2116
+ var T;
2117
+ return (T = r.closeButton) != null ? T : R;
2118
+ }, [
2119
+ r.closeButton,
2120
+ R
2121
+ ]), ke = v.useMemo(() => r.duration || _ || Ge, [
2122
+ r.duration,
2123
+ _
2124
+ ]), se = v.useRef(0), Et = v.useRef(0), Me = v.useRef(0), Rt = v.useRef(null), [Tn, An] = N.split("-"), Oe = v.useMemo(() => y.reduce((T, V, X) => X >= Ft ? T : T + V.height, 0), [
2125
+ y,
2126
+ Ft
2127
+ ]), De = Pr(), kn = r.invert || u, le = q === "loading";
2128
+ Et.current = v.useMemo(() => Ft * P + Oe, [
2129
+ Ft,
2130
+ Oe
2131
+ ]), v.useEffect(() => {
2132
+ Pt.current = ke;
2133
+ }, [
2134
+ ke
2135
+ ]), v.useEffect(() => {
2136
+ W(!0);
2137
+ }, []), v.useEffect(() => {
2138
+ const T = ct.current;
2139
+ if (T) {
2140
+ const V = T.getBoundingClientRect().height;
2141
+ return Te(V), p((X) => [
2142
+ {
2143
+ toastId: r.id,
2144
+ height: V,
2145
+ position: r.position
2146
+ },
2147
+ ...X
2148
+ ]), () => p((X) => X.filter((K) => K.toastId !== r.id));
2149
+ }
2150
+ }, [
2151
+ p,
2152
+ r.id
2153
+ ]), v.useLayoutEffect(() => {
2154
+ if (!M) return;
2155
+ const T = ct.current, V = T.style.height;
2156
+ T.style.height = "auto";
2157
+ const X = T.getBoundingClientRect().height;
2158
+ T.style.height = V, Te(X), p((K) => K.find((Y) => Y.toastId === r.id) ? K.map((Y) => Y.toastId === r.id ? {
2159
+ ...Y,
2160
+ height: X
2161
+ } : Y) : [
2162
+ {
2163
+ toastId: r.id,
2164
+ height: X,
2165
+ position: r.position
2166
+ },
2167
+ ...K
2168
+ ]);
2169
+ }, [
2170
+ M,
2171
+ r.title,
2172
+ r.description,
2173
+ p,
2174
+ r.id,
2175
+ r.jsx,
2176
+ r.action,
2177
+ r.cancel
2178
+ ]);
2179
+ const ft = v.useCallback(() => {
2180
+ Q(!0), ie(Et.current), p((T) => T.filter((V) => V.toastId !== r.id)), setTimeout(() => {
2181
+ x(r);
2182
+ }, Xr);
2183
+ }, [
2184
+ r,
2185
+ x,
2186
+ p,
2187
+ Et
2188
+ ]);
2189
+ v.useEffect(() => {
2190
+ if (r.promise && q === "loading" || r.duration === 1 / 0 || r.type === "loading") return;
2191
+ let T;
2192
+ return w || m || De ? (() => {
2193
+ if (Me.current < se.current) {
2194
+ const K = (/* @__PURE__ */ new Date()).getTime() - se.current;
2195
+ Pt.current = Pt.current - K;
2196
+ }
2197
+ Me.current = (/* @__PURE__ */ new Date()).getTime();
2198
+ })() : (() => {
2199
+ Pt.current !== 1 / 0 && (se.current = (/* @__PURE__ */ new Date()).getTime(), T = setTimeout(() => {
2200
+ r.onAutoClose == null || r.onAutoClose.call(r, r), ft();
2201
+ }, Pt.current));
2202
+ })(), () => clearTimeout(T);
2203
+ }, [
2204
+ w,
2205
+ m,
2206
+ r,
2207
+ q,
2208
+ De,
2209
+ ft
2210
+ ]), v.useEffect(() => {
2211
+ r.delete && (ft(), r.onDismiss == null || r.onDismiss.call(r, r));
2212
+ }, [
2213
+ ft,
2214
+ r.delete
2215
+ ]);
2216
+ function Mn() {
2217
+ var T;
2218
+ if (O != null && O.loading) {
2219
+ var V;
2220
+ return /* @__PURE__ */ v.createElement("div", {
2221
+ className: rt(C == null ? void 0 : C.loader, r == null || (V = r.classNames) == null ? void 0 : V.loader, "sonner-loader"),
2222
+ "data-visible": q === "loading"
2223
+ }, O.loading);
2224
+ }
2225
+ return /* @__PURE__ */ v.createElement(Ar, {
2226
+ className: rt(C == null ? void 0 : C.loader, r == null || (T = r.classNames) == null ? void 0 : T.loader),
2227
+ visible: q === "loading"
2228
+ });
2229
+ }
2230
+ const On = r.icon || (O == null ? void 0 : O[q]) || Cr(q);
2231
+ var Ne, Pe;
2232
+ return /* @__PURE__ */ v.createElement("li", {
2233
+ tabIndex: 0,
2234
+ ref: ct,
2235
+ className: rt(B, En, C == null ? void 0 : C.toast, r == null || (e = r.classNames) == null ? void 0 : e.toast, C == null ? void 0 : C.default, C == null ? void 0 : C[q], r == null || (n = r.classNames) == null ? void 0 : n[q]),
2236
+ "data-sonner-toast": "",
2237
+ "data-rich-colors": (Ne = r.richColors) != null ? Ne : E,
2238
+ "data-styled": !(r.jsx || r.unstyled || f),
2239
+ "data-mounted": M,
2240
+ "data-promise": !!r.promise,
2241
+ "data-swiped": Ht,
2242
+ "data-removed": I,
2243
+ "data-visible": Sn,
2244
+ "data-y-position": Tn,
2245
+ "data-x-position": An,
2246
+ "data-index": g,
2247
+ "data-front": xn,
2248
+ "data-swiping": bt,
2249
+ "data-dismissible": St,
2250
+ "data-type": q,
2251
+ "data-invert": kn,
2252
+ "data-swipe-out": wt,
2253
+ "data-swipe-direction": pt,
2254
+ "data-expanded": !!(w || j && M),
2255
+ "data-testid": r.testId,
2256
+ style: {
2257
+ "--index": g,
2258
+ "--toasts-before": g,
2259
+ "--z-index": b.length - g,
2260
+ "--offset": `${I ? bn : Et.current}px`,
2261
+ "--initial-height": j ? "auto" : `${wn}px`,
2262
+ ...A,
2263
+ ...r.style
2264
+ },
2265
+ onDragEnd: () => {
2266
+ L(!1), z(null), Rt.current = null;
2267
+ },
2268
+ onPointerDown: (T) => {
2269
+ T.button !== 2 && (le || !St || (Ae.current = /* @__PURE__ */ new Date(), ie(Et.current), T.target.setPointerCapture(T.pointerId), T.target.tagName !== "BUTTON" && (L(!0), Rt.current = {
2270
+ x: T.clientX,
2271
+ y: T.clientY
2272
+ })));
2273
+ },
2274
+ onPointerUp: () => {
2275
+ var T, V, X;
2276
+ if (wt || !St) return;
2277
+ Rt.current = null;
2278
+ const K = Number(((T = ct.current) == null ? void 0 : T.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), Wt = Number(((V = ct.current) == null ? void 0 : V.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), Y = (/* @__PURE__ */ new Date()).getTime() - ((X = Ae.current) == null ? void 0 : X.getTime()), J = F === "x" ? K : Wt, $t = Math.abs(J) / Y;
2279
+ if (Math.abs(J) >= jr || $t > 0.11) {
2280
+ ie(Et.current), r.onDismiss == null || r.onDismiss.call(r, r), _t(F === "x" ? K > 0 ? "right" : "left" : Wt > 0 ? "down" : "up"), ft(), It(!0);
2281
+ return;
2282
+ } else {
2283
+ var tt, et;
2284
+ (tt = ct.current) == null || tt.style.setProperty("--swipe-amount-x", "0px"), (et = ct.current) == null || et.style.setProperty("--swipe-amount-y", "0px");
2285
+ }
2286
+ xt(!1), L(!1), z(null);
2287
+ },
2288
+ onPointerMove: (T) => {
2289
+ var V, X, K;
2290
+ if (!Rt.current || !St || ((V = window.getSelection()) == null ? void 0 : V.toString().length) > 0) return;
2291
+ const Y = T.clientY - Rt.current.y, J = T.clientX - Rt.current.x;
2292
+ var $t;
2293
+ const tt = ($t = t.swipeDirections) != null ? $t : Ur(N);
2294
+ !F && (Math.abs(J) > 1 || Math.abs(Y) > 1) && z(Math.abs(J) > Math.abs(Y) ? "x" : "y");
2295
+ let et = {
2296
+ x: 0,
2297
+ y: 0
2298
+ };
2299
+ const Le = (vt) => 1 / (1.5 + Math.abs(vt) / 20);
2300
+ if (F === "y") {
2301
+ if (tt.includes("top") || tt.includes("bottom"))
2302
+ if (tt.includes("top") && Y < 0 || tt.includes("bottom") && Y > 0)
2303
+ et.y = Y;
2304
+ else {
2305
+ const vt = Y * Le(Y);
2306
+ et.y = Math.abs(vt) < Math.abs(Y) ? vt : Y;
2307
+ }
2308
+ } else if (F === "x" && (tt.includes("left") || tt.includes("right")))
2309
+ if (tt.includes("left") && J < 0 || tt.includes("right") && J > 0)
2310
+ et.x = J;
2311
+ else {
2312
+ const vt = J * Le(J);
2313
+ et.x = Math.abs(vt) < Math.abs(J) ? vt : J;
2314
+ }
2315
+ (Math.abs(et.x) > 0 || Math.abs(et.y) > 0) && xt(!0), (X = ct.current) == null || X.style.setProperty("--swipe-amount-x", `${et.x}px`), (K = ct.current) == null || K.style.setProperty("--swipe-amount-y", `${et.y}px`);
2316
+ }
2317
+ }, Cn && !r.jsx && q !== "loading" ? /* @__PURE__ */ v.createElement("button", {
2318
+ "aria-label": k,
2319
+ "data-disabled": le,
2320
+ "data-close-button": !0,
2321
+ onClick: le || !St ? () => {
2322
+ } : () => {
2323
+ ft(), r.onDismiss == null || r.onDismiss.call(r, r);
2324
+ },
2325
+ className: rt(C == null ? void 0 : C.closeButton, r == null || (o = r.classNames) == null ? void 0 : o.closeButton)
2326
+ }, (Pe = O == null ? void 0 : O.close) != null ? Pe : Nr) : null, (q || r.icon || r.promise) && r.icon !== null && ((O == null ? void 0 : O[q]) !== null || r.icon) ? /* @__PURE__ */ v.createElement("div", {
2327
+ "data-icon": "",
2328
+ className: rt(C == null ? void 0 : C.icon, r == null || (a = r.classNames) == null ? void 0 : a.icon)
2329
+ }, r.promise || r.type === "loading" && !r.icon ? r.icon || Mn() : null, r.type !== "loading" ? On : null) : null, /* @__PURE__ */ v.createElement("div", {
2330
+ "data-content": "",
2331
+ className: rt(C == null ? void 0 : C.content, r == null || (i = r.classNames) == null ? void 0 : i.content)
2332
+ }, /* @__PURE__ */ v.createElement("div", {
2333
+ "data-title": "",
2334
+ className: rt(C == null ? void 0 : C.title, r == null || (s = r.classNames) == null ? void 0 : s.title)
2335
+ }, r.jsx ? r.jsx : typeof r.title == "function" ? r.title() : r.title), r.description ? /* @__PURE__ */ v.createElement("div", {
2336
+ "data-description": "",
2337
+ className: rt(H, Rn, C == null ? void 0 : C.description, r == null || (l = r.classNames) == null ? void 0 : l.description)
2338
+ }, typeof r.description == "function" ? r.description() : r.description) : null), /* @__PURE__ */ v.isValidElement(r.cancel) ? r.cancel : r.cancel && Ut(r.cancel) ? /* @__PURE__ */ v.createElement("button", {
2339
+ "data-button": !0,
2340
+ "data-cancel": !0,
2341
+ style: r.cancelButtonStyle || D,
2342
+ onClick: (T) => {
2343
+ Ut(r.cancel) && St && (r.cancel.onClick == null || r.cancel.onClick.call(r.cancel, T), ft());
2344
+ },
2345
+ className: rt(C == null ? void 0 : C.cancelButton, r == null || (d = r.classNames) == null ? void 0 : d.cancelButton)
2346
+ }, r.cancel.label) : null, /* @__PURE__ */ v.isValidElement(r.action) ? r.action : r.action && Ut(r.action) ? /* @__PURE__ */ v.createElement("button", {
2347
+ "data-button": !0,
2348
+ "data-action": !0,
2349
+ style: r.actionButtonStyle || $,
2350
+ onClick: (T) => {
2351
+ Ut(r.action) && (r.action.onClick == null || r.action.onClick.call(r.action, T), !T.defaultPrevented && ft());
2352
+ },
2353
+ className: rt(C == null ? void 0 : C.actionButton, r == null || (c = r.classNames) == null ? void 0 : c.actionButton)
2354
+ }, r.action.label) : null);
2355
+ };
2356
+ function Qe() {
2357
+ if (typeof window > "u" || typeof document > "u") return "ltr";
2358
+ const t = document.documentElement.getAttribute("dir");
2359
+ return t === "auto" || !t ? window.getComputedStyle(document.documentElement).direction : t;
2360
+ }
2361
+ function Kr(t, e) {
2362
+ const n = {};
2363
+ return [
2364
+ t,
2365
+ e
2366
+ ].forEach((o, a) => {
2367
+ const i = a === 1, s = i ? "--mobile-offset" : "--offset", l = i ? zr : $r;
2368
+ function d(c) {
2369
+ [
2370
+ "top",
2371
+ "right",
2372
+ "bottom",
2373
+ "left"
2374
+ ].forEach((u) => {
2375
+ n[`${s}-${u}`] = typeof c == "number" ? `${c}px` : c;
2376
+ });
2377
+ }
2378
+ typeof o == "number" || typeof o == "string" ? d(o) : typeof o == "object" ? [
2379
+ "top",
2380
+ "right",
2381
+ "bottom",
2382
+ "left"
2383
+ ].forEach((c) => {
2384
+ o[c] === void 0 ? n[`${s}-${c}`] = l : n[`${s}-${c}`] = typeof o[c] == "number" ? `${o[c]}px` : o[c];
2385
+ }) : d(l);
2386
+ }), n;
2387
+ }
2388
+ const da = /* @__PURE__ */ v.forwardRef(function(e, n) {
2389
+ const { id: o, invert: a, position: i = "bottom-right", hotkey: s = [
2390
+ "altKey",
2391
+ "KeyT"
2392
+ ], expand: l, closeButton: d, className: c, offset: u, mobileOffset: r, theme: f = "light", richColors: m, duration: p, style: h, visibleToasts: y = Wr, toastOptions: g, dir: b = Qe(), gap: w = Yr, icons: x, containerAriaLabel: E = "Notifications" } = e, [R, A] = v.useState([]), D = v.useMemo(() => o ? R.filter((M) => M.toasterId === o) : R.filter((M) => !M.toasterId), [
2393
+ R,
2394
+ o
2395
+ ]), $ = v.useMemo(() => Array.from(new Set([
2396
+ i
2397
+ ].concat(D.filter((M) => M.position).map((M) => M.position)))), [
2398
+ D,
2399
+ i
2400
+ ]), [B, H] = v.useState([]), [_, N] = v.useState(!1), [P, j] = v.useState(!1), [C, O] = v.useState(f !== "system" ? f : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), k = v.useRef(null), F = s.join("+").replace(/Key/g, "").replace(/Digit/g, ""), z = v.useRef(null), pt = v.useRef(!1), _t = v.useCallback((M) => {
2401
+ A((W) => {
2402
+ var I;
2403
+ return (I = W.find((Q) => Q.id === M.id)) != null && I.delete || U.dismiss(M.id), W.filter(({ id: Q }) => Q !== M.id);
2404
+ });
2405
+ }, []);
2406
+ return v.useEffect(() => U.subscribe((M) => {
2407
+ if (M.dismiss) {
2408
+ requestAnimationFrame(() => {
2409
+ A((W) => W.map((I) => I.id === M.id ? {
2410
+ ...I,
2411
+ delete: !0
2412
+ } : I));
2413
+ });
2414
+ return;
2415
+ }
2416
+ setTimeout(() => {
2417
+ Bn.flushSync(() => {
2418
+ A((W) => {
2419
+ const I = W.findIndex((Q) => Q.id === M.id);
2420
+ return I !== -1 ? [
2421
+ ...W.slice(0, I),
2422
+ {
2423
+ ...W[I],
2424
+ ...M
2425
+ },
2426
+ ...W.slice(I + 1)
2427
+ ] : [
2428
+ M,
2429
+ ...W
2430
+ ];
2431
+ });
2432
+ });
2433
+ });
2434
+ }), [
2435
+ R
2436
+ ]), v.useEffect(() => {
2437
+ if (f !== "system") {
2438
+ O(f);
2439
+ return;
2440
+ }
2441
+ if (f === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? O("dark") : O("light")), typeof window > "u") return;
2442
+ const M = window.matchMedia("(prefers-color-scheme: dark)");
2443
+ try {
2444
+ M.addEventListener("change", ({ matches: W }) => {
2445
+ O(W ? "dark" : "light");
2446
+ });
2447
+ } catch {
2448
+ M.addListener(({ matches: I }) => {
2449
+ try {
2450
+ O(I ? "dark" : "light");
2451
+ } catch (Q) {
2452
+ console.error(Q);
2453
+ }
2454
+ });
2455
+ }
2456
+ }, [
2457
+ f
2458
+ ]), v.useEffect(() => {
2459
+ R.length <= 1 && N(!1);
2460
+ }, [
2461
+ R
2462
+ ]), v.useEffect(() => {
2463
+ const M = (W) => {
2464
+ var I;
2465
+ if (s.every((L) => W[L] || W.code === L)) {
2466
+ var bt;
2467
+ N(!0), (bt = k.current) == null || bt.focus();
2468
+ }
2469
+ W.code === "Escape" && (document.activeElement === k.current || (I = k.current) != null && I.contains(document.activeElement)) && N(!1);
2470
+ };
2471
+ return document.addEventListener("keydown", M), () => document.removeEventListener("keydown", M);
2472
+ }, [
2473
+ s
2474
+ ]), v.useEffect(() => {
2475
+ if (k.current)
2476
+ return () => {
2477
+ z.current && (z.current.focus({
2478
+ preventScroll: !0
2479
+ }), z.current = null, pt.current = !1);
2480
+ };
2481
+ }, [
2482
+ k.current
2483
+ ]), // Remove item from normal navigation flow, only available via hotkey
2484
+ /* @__PURE__ */ v.createElement("section", {
2485
+ ref: n,
2486
+ "aria-label": `${E} ${F}`,
2487
+ tabIndex: -1,
2488
+ "aria-live": "polite",
2489
+ "aria-relevant": "additions text",
2490
+ "aria-atomic": "false",
2491
+ suppressHydrationWarning: !0
2492
+ }, $.map((M, W) => {
2493
+ var I;
2494
+ const [Q, bt] = M.split("-");
2495
+ return D.length ? /* @__PURE__ */ v.createElement("ol", {
2496
+ key: M,
2497
+ dir: b === "auto" ? Qe() : b,
2498
+ tabIndex: -1,
2499
+ ref: k,
2500
+ className: c,
2501
+ "data-sonner-toaster": !0,
2502
+ "data-sonner-theme": C,
2503
+ "data-y-position": Q,
2504
+ "data-x-position": bt,
2505
+ style: {
2506
+ "--front-toast-height": `${((I = B[0]) == null ? void 0 : I.height) || 0}px`,
2507
+ "--width": `${Vr}px`,
2508
+ "--gap": `${w}px`,
2509
+ ...h,
2510
+ ...Kr(u, r)
2511
+ },
2512
+ onBlur: (L) => {
2513
+ pt.current && !L.currentTarget.contains(L.relatedTarget) && (pt.current = !1, z.current && (z.current.focus({
2514
+ preventScroll: !0
2515
+ }), z.current = null));
2516
+ },
2517
+ onFocus: (L) => {
2518
+ L.target instanceof HTMLElement && L.target.dataset.dismissible === "false" || pt.current || (pt.current = !0, z.current = L.relatedTarget);
2519
+ },
2520
+ onMouseEnter: () => N(!0),
2521
+ onMouseMove: () => N(!0),
2522
+ onMouseLeave: () => {
2523
+ P || N(!1);
2524
+ },
2525
+ onDragEnd: () => N(!1),
2526
+ onPointerDown: (L) => {
2527
+ L.target instanceof HTMLElement && L.target.dataset.dismissible === "false" || j(!0);
2528
+ },
2529
+ onPointerUp: () => j(!1)
2530
+ }, D.filter((L) => !L.position && W === 0 || L.position === M).map((L, wt) => {
2531
+ var It, Ht;
2532
+ return /* @__PURE__ */ v.createElement(qr, {
2533
+ key: L.id,
2534
+ icons: x,
2535
+ index: wt,
2536
+ toast: L,
2537
+ defaultRichColors: m,
2538
+ duration: (It = g == null ? void 0 : g.duration) != null ? It : p,
2539
+ className: g == null ? void 0 : g.className,
2540
+ descriptionClassName: g == null ? void 0 : g.descriptionClassName,
2541
+ invert: a,
2542
+ visibleToasts: y,
2543
+ closeButton: (Ht = g == null ? void 0 : g.closeButton) != null ? Ht : d,
2544
+ interacting: P,
2545
+ position: M,
2546
+ style: g == null ? void 0 : g.style,
2547
+ unstyled: g == null ? void 0 : g.unstyled,
2548
+ classNames: g == null ? void 0 : g.classNames,
2549
+ cancelButtonStyle: g == null ? void 0 : g.cancelButtonStyle,
2550
+ actionButtonStyle: g == null ? void 0 : g.actionButtonStyle,
2551
+ closeButtonAriaLabel: g == null ? void 0 : g.closeButtonAriaLabel,
2552
+ removeToast: _t,
2553
+ toasts: D.filter((xt) => xt.position == L.position),
2554
+ heights: B.filter((xt) => xt.position == L.position),
2555
+ setHeights: H,
2556
+ expandByDefault: l,
2557
+ gap: w,
2558
+ expanded: _,
2559
+ swipeDirections: e.swipeDirections
2560
+ });
2561
+ })) : null;
2562
+ }));
2563
+ });
1823
2564
  export {
1824
- an as R,
1825
- Cr as a,
1826
- Ar as b,
1827
- Rr as c,
1828
- pr as d,
1829
- Sr as f,
1830
- vr as h,
1831
- br as l,
1832
- yr as o,
1833
- xr as s,
1834
- wr as u
2565
+ yo as R,
2566
+ da as T,
2567
+ sa as a,
2568
+ ca as b,
2569
+ la as c,
2570
+ ea as d,
2571
+ ia as f,
2572
+ ta as h,
2573
+ aa as l,
2574
+ oa as o,
2575
+ ra as s,
2576
+ ua as t,
2577
+ na as u
1835
2578
  };