@vonage/vivid 5.3.0 → 5.5.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 (263) hide show
  1. package/accordion-item/definition.js +1 -1
  2. package/alert/definition.cjs +1 -1
  3. package/alert/definition.js +2 -2
  4. package/badge/definition.js +1 -1
  5. package/banner/definition.js +1 -1
  6. package/bundled/base-color-picker.cjs +18 -13
  7. package/bundled/base-color-picker.js +98 -81
  8. package/bundled/calendar-picker.template.cjs +7 -7
  9. package/bundled/calendar-picker.template.js +102 -102
  10. package/bundled/char-count.cjs +1 -1
  11. package/bundled/char-count.js +1 -1
  12. package/bundled/definition10.cjs +1 -1
  13. package/bundled/definition10.js +2 -2
  14. package/bundled/definition11.cjs +12 -19
  15. package/bundled/definition11.js +87 -66
  16. package/bundled/definition12.cjs +19 -10
  17. package/bundled/definition12.js +217 -36
  18. package/bundled/definition13.cjs +10 -1
  19. package/bundled/definition13.js +38 -14
  20. package/bundled/definition14.cjs +1 -5
  21. package/bundled/definition14.js +15 -24
  22. package/bundled/definition15.cjs +5 -30
  23. package/bundled/definition15.js +22 -73
  24. package/bundled/definition16.cjs +30 -19
  25. package/bundled/definition16.js +74 -97
  26. package/bundled/definition17.cjs +19 -13
  27. package/bundled/definition17.js +83 -117
  28. package/bundled/definition18.cjs +13 -12
  29. package/bundled/definition18.js +114 -71
  30. package/bundled/definition19.cjs +26 -27
  31. package/bundled/definition19.js +171 -180
  32. package/bundled/definition2.cjs +9 -9
  33. package/bundled/definition2.js +84 -129
  34. package/bundled/definition3.cjs +1 -1
  35. package/bundled/definition3.js +1 -1
  36. package/bundled/definition6.cjs +3 -3
  37. package/bundled/definition6.js +19 -19
  38. package/bundled/definition9.cjs +5 -5
  39. package/bundled/definition9.js +394 -392
  40. package/bundled/listbox.cjs +1 -1
  41. package/bundled/listbox.js +82 -102
  42. package/bundled/localized.cjs +1 -1
  43. package/bundled/localized.js +48 -31
  44. package/bundled/mixins.cjs +1 -1
  45. package/bundled/mixins.js +1 -1
  46. package/bundled/picker-field.template.cjs +14 -14
  47. package/bundled/picker-field.template.js +35 -56
  48. package/bundled/time-selection-picker.template.cjs +12 -12
  49. package/bundled/time-selection-picker.template.js +13 -12
  50. package/bundled/trapped-focus.cjs +1 -0
  51. package/bundled/trapped-focus.js +26 -0
  52. package/bundled/vivid-element.cjs +5 -1
  53. package/bundled/vivid-element.js +401 -358
  54. package/calendar/index.cjs +13 -13
  55. package/calendar/index.js +171 -143
  56. package/card/definition.cjs +1 -1
  57. package/card/definition.js +1 -1
  58. package/color-picker/definition.cjs +209 -113
  59. package/color-picker/definition.js +209 -113
  60. package/color-picker/index.cjs +104 -75
  61. package/color-picker/index.js +412 -326
  62. package/combobox/definition.cjs +7 -27
  63. package/combobox/definition.js +8 -28
  64. package/combobox/index.cjs +6 -6
  65. package/combobox/index.js +57 -71
  66. package/contextual-help/index.cjs +1 -1
  67. package/contextual-help/index.js +1 -1
  68. package/custom-elements.json +354 -2
  69. package/data-grid/index.cjs +1 -1
  70. package/data-grid/index.js +1 -1
  71. package/date-picker/definition.cjs +1 -1
  72. package/date-picker/definition.js +1 -1
  73. package/date-picker/index.cjs +1 -1
  74. package/date-picker/index.js +2 -2
  75. package/date-range-picker/definition.cjs +1 -1
  76. package/date-range-picker/definition.js +1 -1
  77. package/date-range-picker/index.cjs +1 -1
  78. package/date-range-picker/index.js +2 -2
  79. package/date-time-picker/definition.cjs +1 -1
  80. package/date-time-picker/definition.js +1 -1
  81. package/date-time-picker/index.cjs +1 -1
  82. package/date-time-picker/index.js +2 -2
  83. package/dial-pad/definition.cjs +139 -0
  84. package/dial-pad/definition.js +139 -0
  85. package/dial-pad/index.cjs +27 -20
  86. package/dial-pad/index.js +177 -100
  87. package/dialog/definition.cjs +2 -2
  88. package/dialog/definition.js +2 -2
  89. package/dialog/index.cjs +7 -7
  90. package/dialog/index.js +6 -6
  91. package/divider/index.cjs +1 -1
  92. package/divider/index.js +1 -1
  93. package/elevation/definition.cjs +1 -1
  94. package/elevation/definition.js +1 -1
  95. package/fab/definition.js +1 -1
  96. package/header/definition.cjs +1 -1
  97. package/header/definition.js +1 -1
  98. package/icon/definition.cjs +56 -22
  99. package/icon/definition.js +56 -22
  100. package/index.cjs +3 -4
  101. package/index.js +2 -3
  102. package/lib/accordion/accordion.d.ts +1 -1
  103. package/lib/accordion/definition.d.ts +1 -1
  104. package/lib/audio-player/audio-player.d.ts +1 -1
  105. package/lib/color-picker/color-picker.d.ts +390 -12
  106. package/lib/color-picker/locale.d.ts +4 -0
  107. package/lib/combobox/combobox.d.ts +1 -0
  108. package/lib/combobox/combobox.options.d.ts +1 -1
  109. package/lib/date-picker/date-picker.d.ts +38 -38
  110. package/lib/date-range-picker/date-range-picker.d.ts +20 -20
  111. package/lib/date-time-picker/date-time-picker.d.ts +40 -40
  112. package/lib/dial-pad/dial-pad.d.ts +1 -0
  113. package/lib/divider/divider.d.ts +1 -1
  114. package/lib/icon/icon.d.ts +1 -0
  115. package/lib/menu-item/menu-item-role.d.ts +1 -1
  116. package/lib/popup/popup.d.ts +1 -1
  117. package/lib/searchable-select/locale.d.ts +4 -0
  118. package/lib/searchable-select/searchable-select.d.ts +3 -0
  119. package/lib/select/select.d.ts +3 -1
  120. package/lib/simple-color-picker/simple-color-picker.d.ts +2 -1
  121. package/lib/slider/slider.d.ts +1 -1
  122. package/lib/tabs/tabs.d.ts +2 -2
  123. package/lib/text-area/text-area.d.ts +1 -1
  124. package/lib/text-field/text-field.d.ts +1 -1
  125. package/lib/time-picker/time-picker.d.ts +20 -20
  126. package/locales/de-DE.cjs +20 -3
  127. package/locales/de-DE.js +20 -3
  128. package/locales/en-GB.cjs +21 -4
  129. package/locales/en-GB.js +21 -4
  130. package/locales/en-US.cjs +21 -4
  131. package/locales/en-US.js +21 -4
  132. package/locales/ja-JP.cjs +20 -3
  133. package/locales/ja-JP.js +20 -3
  134. package/locales/zh-CN.cjs +19 -2
  135. package/locales/zh-CN.js +19 -2
  136. package/menu/definition.cjs +4 -4
  137. package/menu/definition.js +4 -4
  138. package/nav-disclosure/definition.js +1 -1
  139. package/nav-item/definition.js +1 -1
  140. package/note/definition.js +1 -1
  141. package/number-field/definition.js +1 -1
  142. package/number-field/index.cjs +1 -1
  143. package/number-field/index.js +3 -3
  144. package/option/definition.cjs +6 -77
  145. package/option/definition.js +3 -78
  146. package/option/index.cjs +1 -1
  147. package/option/index.js +1 -1
  148. package/package.json +31 -5
  149. package/popup/definition.cjs +2 -2
  150. package/popup/definition.js +2 -2
  151. package/progress-ring/index.cjs +1 -1
  152. package/progress-ring/index.js +1 -1
  153. package/radio/index.cjs +1 -1
  154. package/radio/index.js +1 -1
  155. package/radio-group/index.cjs +1 -1
  156. package/radio-group/index.js +1 -1
  157. package/range-slider/definition.cjs +1 -1
  158. package/range-slider/definition.js +1 -1
  159. package/rich-text-editor/definition.cjs +2 -3
  160. package/rich-text-editor/definition.js +1 -2
  161. package/rich-text-editor/index.cjs +27 -27
  162. package/rich-text-editor/index.js +1209 -1199
  163. package/searchable-select/definition.cjs +103 -11
  164. package/searchable-select/definition.js +103 -11
  165. package/searchable-select/index.cjs +81 -69
  166. package/searchable-select/index.js +359 -273
  167. package/select/definition.cjs +30 -44
  168. package/select/definition.js +30 -44
  169. package/selectable-box/definition.cjs +1 -1
  170. package/selectable-box/definition.js +1 -1
  171. package/selectable-box/index.cjs +1 -1
  172. package/selectable-box/index.js +2 -2
  173. package/shared/aria/aria-mixin.d.ts +1 -1
  174. package/shared/color-picker/base-color-picker.d.ts +2 -1
  175. package/shared/foundation/listbox/listbox.d.ts +4 -0
  176. package/shared/picker-field/mixins/calendar-picker.d.ts +10 -10
  177. package/shared/picker-field/mixins/calendar-picker.template.d.ts +10 -10
  178. package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +20 -20
  179. package/shared/picker-field/mixins/single-date-picker.d.ts +28 -28
  180. package/shared/picker-field/mixins/single-value-picker.d.ts +8 -8
  181. package/shared/picker-field/mixins/time-selection-picker.d.ts +20 -20
  182. package/shared/picker-field/mixins/time-selection-picker.template.d.ts +20 -20
  183. package/simple-color-picker/definition.cjs +9 -7
  184. package/simple-color-picker/definition.js +9 -7
  185. package/simple-color-picker/index.cjs +6 -6
  186. package/simple-color-picker/index.js +41 -39
  187. package/slider/definition.cjs +1 -1
  188. package/slider/definition.js +1 -1
  189. package/split-button/definition.js +1 -1
  190. package/styles/core/all.css +1 -1
  191. package/styles/core/theme.css +1 -1
  192. package/styles/core/typography.css +1 -1
  193. package/styles/tokens/theme-dark.css +4 -4
  194. package/styles/tokens/theme-light.css +4 -4
  195. package/styles/tokens/vivid-2-compat.css +1 -1
  196. package/tab/definition.js +1 -1
  197. package/tag/definition.cjs +34 -14
  198. package/tag/definition.js +35 -15
  199. package/tag/index.cjs +25 -12
  200. package/tag/index.js +64 -47
  201. package/tag-group/definition.cjs +1 -2
  202. package/tag-group/definition.js +1 -2
  203. package/tag-group/index.cjs +1 -1
  204. package/tag-group/index.js +11 -12
  205. package/text-area/index.cjs +1 -1
  206. package/text-area/index.js +2 -2
  207. package/text-field/definition.js +1 -1
  208. package/time-picker/definition.cjs +1 -1
  209. package/time-picker/definition.js +1 -1
  210. package/time-picker/index.cjs +1 -1
  211. package/time-picker/index.js +1 -1
  212. package/toggletip/definition.cjs +1 -1
  213. package/toggletip/definition.js +1 -1
  214. package/toggletip/index.cjs +1 -1
  215. package/toggletip/index.js +1 -1
  216. package/tooltip/definition.cjs +3 -3
  217. package/tooltip/definition.js +3 -3
  218. package/tooltip/index.cjs +1 -1
  219. package/tooltip/index.js +1 -1
  220. package/tree-item/definition.cjs +1 -1
  221. package/tree-item/definition.js +1 -1
  222. package/tree-view/definition.cjs +1 -1
  223. package/tree-view/definition.js +1 -1
  224. package/unbundled/affix.js +1 -1
  225. package/unbundled/base-color-picker.cjs +36 -18
  226. package/unbundled/base-color-picker.js +36 -18
  227. package/unbundled/calendar-picker.template.cjs +2 -2
  228. package/unbundled/calendar-picker.template.js +2 -2
  229. package/unbundled/definition.js +1 -1
  230. package/unbundled/definition2.js +1 -1
  231. package/unbundled/definition3.cjs +222 -141
  232. package/unbundled/definition3.js +220 -139
  233. package/unbundled/definition4.cjs +145 -235
  234. package/unbundled/definition4.js +143 -233
  235. package/unbundled/definition5.cjs +269 -27
  236. package/unbundled/definition5.js +267 -26
  237. package/unbundled/definition6.cjs +56 -0
  238. package/unbundled/definition6.js +52 -0
  239. package/unbundled/listbox.cjs +41 -63
  240. package/unbundled/listbox.js +39 -61
  241. package/unbundled/picker-field.template.cjs +3 -36
  242. package/unbundled/picker-field.template.js +3 -35
  243. package/unbundled/slider.template.cjs +1 -1
  244. package/unbundled/slider.template.js +1 -1
  245. package/unbundled/time-selection-picker.template.cjs +2 -1
  246. package/unbundled/time-selection-picker.template.js +2 -1
  247. package/unbundled/trapped-focus.cjs +37 -0
  248. package/unbundled/trapped-focus.js +34 -0
  249. package/unbundled/vivid-element.cjs +1 -1
  250. package/unbundled/vivid-element.js +1 -1
  251. package/video-player/definition.cjs +56 -16
  252. package/video-player/definition.js +56 -16
  253. package/video-player/index.cjs +36 -36
  254. package/video-player/index.js +2461 -2445
  255. package/visually-hidden/index.cjs +1 -1
  256. package/visually-hidden/index.js +1 -1
  257. package/vivid.api.json +285 -38
  258. package/bundled/_has.cjs +0 -1
  259. package/bundled/_has.js +0 -34
  260. package/bundled/option.cjs +0 -1
  261. package/bundled/option.js +0 -158
  262. package/unbundled/option.cjs +0 -217
  263. package/unbundled/option.js +0 -214
@@ -1,81 +1,81 @@
1
- import { B as Kt, b as Gt } from "./definition3.js";
2
- import { E as Jt, e as Qt } from "./definition4.js";
3
- import { V as Zt, a as G, n as te, o as ee, h as mt, c as ne, d as oe } from "./vivid-element.js";
4
- import { r as ht } from "./ref.js";
5
- import { w as At } from "./when.js";
6
- import { c as ie } from "./class-names.js";
7
- const Ht = ["top", "right", "bottom", "left"], Et = ["start", "end"], Ct = /* @__PURE__ */ Ht.reduce((t, e) => t.concat(e, e + "-" + Et[0], e + "-" + Et[1]), []), M = Math.min, C = Math.max, ct = Math.round, st = Math.floor, z = (t) => ({
1
+ import { B as Gt, b as Jt } from "./definition3.js";
2
+ import { E as Qt, e as Zt } from "./definition4.js";
3
+ import { V as te, a as G, n as ee, o as ne, h as ht, c as oe, d as ie } from "./vivid-element.js";
4
+ import { r as gt } from "./ref.js";
5
+ import { w as Pt } from "./when.js";
6
+ import { c as re } from "./class-names.js";
7
+ const Wt = ["top", "right", "bottom", "left"], Ct = ["start", "end"], Et = /* @__PURE__ */ Wt.reduce((t, e) => t.concat(e, e + "-" + Ct[0], e + "-" + Ct[1]), []), W = Math.min, E = Math.max, ct = Math.round, st = Math.floor, z = (t) => ({
8
8
  x: t,
9
9
  y: t
10
- }), re = {
10
+ }), se = {
11
11
  left: "right",
12
12
  right: "left",
13
13
  bottom: "top",
14
14
  top: "bottom"
15
- }, se = {
15
+ }, le = {
16
16
  start: "end",
17
17
  end: "start"
18
18
  };
19
- function le(t, e, n) {
20
- return C(t, M(e, n));
19
+ function ce(t, e, n) {
20
+ return E(t, W(e, n));
21
21
  }
22
22
  function J(t, e) {
23
23
  return typeof t == "function" ? t(e) : t;
24
24
  }
25
- function _(t) {
25
+ function H(t) {
26
26
  return t.split("-")[0];
27
27
  }
28
- function H(t) {
28
+ function V(t) {
29
29
  return t.split("-")[1];
30
30
  }
31
- function ce(t) {
31
+ function ae(t) {
32
32
  return t === "x" ? "y" : "x";
33
33
  }
34
- function vt(t) {
34
+ function yt(t) {
35
35
  return t === "y" ? "height" : "width";
36
36
  }
37
- const ae = /* @__PURE__ */ new Set(["top", "bottom"]);
38
- function X(t) {
39
- return ae.has(_(t)) ? "y" : "x";
37
+ const fe = /* @__PURE__ */ new Set(["top", "bottom"]);
38
+ function Y(t) {
39
+ return fe.has(H(t)) ? "y" : "x";
40
40
  }
41
- function xt(t) {
42
- return ce(X(t));
41
+ function vt(t) {
42
+ return ae(Y(t));
43
43
  }
44
- function Mt(t, e, n) {
44
+ function Ht(t, e, n) {
45
45
  n === void 0 && (n = !1);
46
- const o = H(t), i = xt(t), r = vt(i);
46
+ const o = V(t), i = vt(t), r = yt(i);
47
47
  let s = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
48
48
  return e.reference[r] > e.floating[r] && (s = ft(s)), [s, ft(s)];
49
49
  }
50
- function fe(t) {
50
+ function ue(t) {
51
51
  const e = ft(t);
52
52
  return [at(t), e, at(e)];
53
53
  }
54
54
  function at(t) {
55
- return t.replace(/start|end/g, (e) => se[e]);
55
+ return t.replace(/start|end/g, (e) => le[e]);
56
56
  }
57
- const St = ["left", "right"], Tt = ["right", "left"], ue = ["top", "bottom"], pe = ["bottom", "top"];
58
- function de(t, e, n) {
57
+ const St = ["left", "right"], Lt = ["right", "left"], pe = ["top", "bottom"], de = ["bottom", "top"];
58
+ function me(t, e, n) {
59
59
  switch (t) {
60
60
  case "top":
61
61
  case "bottom":
62
- return n ? e ? Tt : St : e ? St : Tt;
62
+ return n ? e ? Lt : St : e ? St : Lt;
63
63
  case "left":
64
64
  case "right":
65
- return e ? ue : pe;
65
+ return e ? pe : de;
66
66
  default:
67
67
  return [];
68
68
  }
69
69
  }
70
- function me(t, e, n, o) {
71
- const i = H(t);
72
- let r = de(_(t), n === "start", o);
70
+ function he(t, e, n, o) {
71
+ const i = V(t);
72
+ let r = me(H(t), n === "start", o);
73
73
  return i && (r = r.map((s) => s + "-" + i), e && (r = r.concat(r.map(at)))), r;
74
74
  }
75
75
  function ft(t) {
76
- return t.replace(/left|right|bottom|top/g, (e) => re[e]);
76
+ return t.replace(/left|right|bottom|top/g, (e) => se[e]);
77
77
  }
78
- function he(t) {
78
+ function ge(t) {
79
79
  return {
80
80
  top: 0,
81
81
  right: 0,
@@ -84,8 +84,8 @@ function he(t) {
84
84
  ...t
85
85
  };
86
86
  }
87
- function yt(t) {
88
- return typeof t != "number" ? he(t) : {
87
+ function xt(t) {
88
+ return typeof t != "number" ? ge(t) : {
89
89
  top: t,
90
90
  right: t,
91
91
  bottom: t,
@@ -110,55 +110,55 @@ function tt(t) {
110
110
  y: n
111
111
  };
112
112
  }
113
- function Lt(t, e, n) {
113
+ function Tt(t, e, n) {
114
114
  let {
115
115
  reference: o,
116
116
  floating: i
117
117
  } = t;
118
- const r = X(e), s = xt(e), l = vt(s), c = _(e), a = r === "y", p = o.x + o.width / 2 - i.width / 2, f = o.y + o.height / 2 - i.height / 2, d = o[l] / 2 - i[l] / 2;
119
- let u;
118
+ const r = Y(e), s = vt(e), l = yt(s), c = H(e), a = r === "y", u = o.x + o.width / 2 - i.width / 2, f = o.y + o.height / 2 - i.height / 2, d = o[l] / 2 - i[l] / 2;
119
+ let p;
120
120
  switch (c) {
121
121
  case "top":
122
- u = {
123
- x: p,
122
+ p = {
123
+ x: u,
124
124
  y: o.y - i.height
125
125
  };
126
126
  break;
127
127
  case "bottom":
128
- u = {
129
- x: p,
128
+ p = {
129
+ x: u,
130
130
  y: o.y + o.height
131
131
  };
132
132
  break;
133
133
  case "right":
134
- u = {
134
+ p = {
135
135
  x: o.x + o.width,
136
136
  y: f
137
137
  };
138
138
  break;
139
139
  case "left":
140
- u = {
140
+ p = {
141
141
  x: o.x - i.width,
142
142
  y: f
143
143
  };
144
144
  break;
145
145
  default:
146
- u = {
146
+ p = {
147
147
  x: o.x,
148
148
  y: o.y
149
149
  };
150
150
  }
151
- switch (H(e)) {
151
+ switch (V(e)) {
152
152
  case "start":
153
- u[s] -= d * (n && a ? -1 : 1);
153
+ p[s] -= d * (n && a ? -1 : 1);
154
154
  break;
155
155
  case "end":
156
- u[s] += d * (n && a ? -1 : 1);
156
+ p[s] += d * (n && a ? -1 : 1);
157
157
  break;
158
158
  }
159
- return u;
159
+ return p;
160
160
  }
161
- const ge = async (t, e, n) => {
161
+ const we = async (t, e, n) => {
162
162
  const {
163
163
  placement: o = "bottom",
164
164
  strategy: i = "absolute",
@@ -170,25 +170,25 @@ const ge = async (t, e, n) => {
170
170
  floating: e,
171
171
  strategy: i
172
172
  }), {
173
- x: p,
173
+ x: u,
174
174
  y: f
175
- } = Lt(a, o, c), d = o, u = {}, h = 0;
176
- for (let m = 0; m < l.length; m++) {
175
+ } = Tt(a, o, c), d = o, p = {}, m = 0;
176
+ for (let h = 0; h < l.length; h++) {
177
177
  const {
178
178
  name: g,
179
179
  fn: w
180
- } = l[m], {
181
- x,
182
- y,
180
+ } = l[h], {
181
+ x: y,
182
+ y: v,
183
183
  data: R,
184
- reset: b
184
+ reset: x
185
185
  } = await w({
186
- x: p,
186
+ x: u,
187
187
  y: f,
188
188
  initialPlacement: o,
189
189
  placement: d,
190
190
  strategy: i,
191
- middlewareData: u,
191
+ middlewareData: p,
192
192
  rects: a,
193
193
  platform: s,
194
194
  elements: {
@@ -196,27 +196,27 @@ const ge = async (t, e, n) => {
196
196
  floating: e
197
197
  }
198
198
  });
199
- p = x ?? p, f = y ?? f, u = {
200
- ...u,
199
+ u = y ?? u, f = v ?? f, p = {
200
+ ...p,
201
201
  [g]: {
202
- ...u[g],
202
+ ...p[g],
203
203
  ...R
204
204
  }
205
- }, b && h <= 50 && (h++, typeof b == "object" && (b.placement && (d = b.placement), b.rects && (a = b.rects === !0 ? await s.getElementRects({
205
+ }, x && m <= 50 && (m++, typeof x == "object" && (x.placement && (d = x.placement), x.rects && (a = x.rects === !0 ? await s.getElementRects({
206
206
  reference: t,
207
207
  floating: e,
208
208
  strategy: i
209
- }) : b.rects), {
210
- x: p,
209
+ }) : x.rects), {
210
+ x: u,
211
211
  y: f
212
- } = Lt(a, d, c)), m = -1);
212
+ } = Tt(a, d, c)), h = -1);
213
213
  }
214
214
  return {
215
- x: p,
215
+ x: u,
216
216
  y: f,
217
217
  placement: d,
218
218
  strategy: i,
219
- middlewareData: u
219
+ middlewareData: p
220
220
  };
221
221
  };
222
222
  async function ot(t, e) {
@@ -231,40 +231,40 @@ async function ot(t, e) {
231
231
  strategy: c
232
232
  } = t, {
233
233
  boundary: a = "clippingAncestors",
234
- rootBoundary: p = "viewport",
234
+ rootBoundary: u = "viewport",
235
235
  elementContext: f = "floating",
236
236
  altBoundary: d = !1,
237
- padding: u = 0
238
- } = J(e, t), h = yt(u), g = l[d ? f === "floating" ? "reference" : "floating" : f], w = tt(await r.getClippingRect({
237
+ padding: p = 0
238
+ } = J(e, t), m = xt(p), g = l[d ? f === "floating" ? "reference" : "floating" : f], w = tt(await r.getClippingRect({
239
239
  element: (n = await (r.isElement == null ? void 0 : r.isElement(g))) == null || n ? g : g.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(l.floating)),
240
240
  boundary: a,
241
- rootBoundary: p,
241
+ rootBoundary: u,
242
242
  strategy: c
243
- })), x = f === "floating" ? {
243
+ })), y = f === "floating" ? {
244
244
  x: o,
245
245
  y: i,
246
246
  width: s.floating.width,
247
247
  height: s.floating.height
248
- } : s.reference, y = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(l.floating)), R = await (r.isElement == null ? void 0 : r.isElement(y)) ? await (r.getScale == null ? void 0 : r.getScale(y)) || {
248
+ } : s.reference, v = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(l.floating)), R = await (r.isElement == null ? void 0 : r.isElement(v)) ? await (r.getScale == null ? void 0 : r.getScale(v)) || {
249
249
  x: 1,
250
250
  y: 1
251
251
  } : {
252
252
  x: 1,
253
253
  y: 1
254
- }, b = tt(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
254
+ }, x = tt(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
255
255
  elements: l,
256
- rect: x,
257
- offsetParent: y,
256
+ rect: y,
257
+ offsetParent: v,
258
258
  strategy: c
259
- }) : x);
259
+ }) : y);
260
260
  return {
261
- top: (w.top - b.top + h.top) / R.y,
262
- bottom: (b.bottom - w.bottom + h.bottom) / R.y,
263
- left: (w.left - b.left + h.left) / R.x,
264
- right: (b.right - w.right + h.right) / R.x
261
+ top: (w.top - x.top + m.top) / R.y,
262
+ bottom: (x.bottom - w.bottom + m.bottom) / R.y,
263
+ left: (w.left - x.left + m.left) / R.x,
264
+ right: (x.right - w.right + m.right) / R.x
265
265
  };
266
266
  }
267
- const we = (t) => ({
267
+ const be = (t) => ({
268
268
  name: "arrow",
269
269
  options: t,
270
270
  async fn(e) {
@@ -278,22 +278,22 @@ const we = (t) => ({
278
278
  middlewareData: c
279
279
  } = e, {
280
280
  element: a,
281
- padding: p = 0
281
+ padding: u = 0
282
282
  } = J(t, e) || {};
283
283
  if (a == null)
284
284
  return {};
285
- const f = yt(p), d = {
285
+ const f = xt(u), d = {
286
286
  x: n,
287
287
  y: o
288
- }, u = xt(i), h = vt(u), m = await s.getDimensions(a), g = u === "y", w = g ? "top" : "left", x = g ? "bottom" : "right", y = g ? "clientHeight" : "clientWidth", R = r.reference[h] + r.reference[u] - d[u] - r.floating[h], b = d[u] - r.reference[u], P = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(a));
289
- let O = P ? P[y] : 0;
290
- (!O || !await (s.isElement == null ? void 0 : s.isElement(P))) && (O = l.floating[y] || r.floating[h]);
291
- const F = R / 2 - b / 2, S = O / 2 - m[h] / 2 - 1, v = M(f[w], S), A = M(f[x], S), T = v, L = O - m[h] - A, E = O / 2 - m[h] / 2 + F, V = le(T, E, L), B = !c.arrow && H(i) != null && E !== V && r.reference[h] / 2 - (E < T ? v : A) - m[h] / 2 < 0, D = B ? E < T ? E - T : E - L : 0;
288
+ }, p = vt(i), m = yt(p), h = await s.getDimensions(a), g = p === "y", w = g ? "top" : "left", y = g ? "bottom" : "right", v = g ? "clientHeight" : "clientWidth", R = r.reference[m] + r.reference[p] - d[p] - r.floating[m], x = d[p] - r.reference[p], A = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(a));
289
+ let O = A ? A[v] : 0;
290
+ (!O || !await (s.isElement == null ? void 0 : s.isElement(A))) && (O = l.floating[v] || r.floating[m]);
291
+ const $ = R / 2 - x / 2, S = O / 2 - h[m] / 2 - 1, b = W(f[w], S), P = W(f[y], S), L = b, T = O - h[m] - P, C = O / 2 - h[m] / 2 + $, M = ce(L, C, T), B = !c.arrow && V(i) != null && C !== M && r.reference[m] / 2 - (C < L ? b : P) - h[m] / 2 < 0, D = B ? C < L ? C - L : C - T : 0;
292
292
  return {
293
- [u]: d[u] + D,
293
+ [p]: d[p] + D,
294
294
  data: {
295
- [u]: V,
296
- centerOffset: E - V - D,
295
+ [p]: M,
296
+ centerOffset: C - M - D,
297
297
  ...B && {
298
298
  alignmentOffset: D
299
299
  }
@@ -302,10 +302,10 @@ const we = (t) => ({
302
302
  };
303
303
  }
304
304
  });
305
- function ve(t, e, n) {
306
- return (t ? [...n.filter((i) => H(i) === t), ...n.filter((i) => H(i) !== t)] : n.filter((i) => _(i) === i)).filter((i) => t ? H(i) === t || (e ? at(i) !== i : !1) : !0);
305
+ function ye(t, e, n) {
306
+ return (t ? [...n.filter((i) => V(i) === t), ...n.filter((i) => V(i) !== t)] : n.filter((i) => H(i) === i)).filter((i) => t ? V(i) === t || (e ? at(i) !== i : !1) : !0);
307
307
  }
308
- const xe = function(t) {
308
+ const ve = function(t) {
309
309
  return t === void 0 && (t = {}), {
310
310
  name: "autoPlacement",
311
311
  options: t,
@@ -318,54 +318,54 @@ const xe = function(t) {
318
318
  platform: c,
319
319
  elements: a
320
320
  } = e, {
321
- crossAxis: p = !1,
321
+ crossAxis: u = !1,
322
322
  alignment: f,
323
- allowedPlacements: d = Ct,
324
- autoAlignment: u = !0,
325
- ...h
326
- } = J(t, e), m = f !== void 0 || d === Ct ? ve(f || null, u, d) : d, g = await ot(e, h), w = ((n = s.autoPlacement) == null ? void 0 : n.index) || 0, x = m[w];
327
- if (x == null)
323
+ allowedPlacements: d = Et,
324
+ autoAlignment: p = !0,
325
+ ...m
326
+ } = J(t, e), h = f !== void 0 || d === Et ? ye(f || null, p, d) : d, g = await ot(e, m), w = ((n = s.autoPlacement) == null ? void 0 : n.index) || 0, y = h[w];
327
+ if (y == null)
328
328
  return {};
329
- const y = Mt(x, r, await (c.isRTL == null ? void 0 : c.isRTL(a.floating)));
330
- if (l !== x)
329
+ const v = Ht(y, r, await (c.isRTL == null ? void 0 : c.isRTL(a.floating)));
330
+ if (l !== y)
331
331
  return {
332
332
  reset: {
333
- placement: m[0]
333
+ placement: h[0]
334
334
  }
335
335
  };
336
- const R = [g[_(x)], g[y[0]], g[y[1]]], b = [...((o = s.autoPlacement) == null ? void 0 : o.overflows) || [], {
337
- placement: x,
336
+ const R = [g[H(y)], g[v[0]], g[v[1]]], x = [...((o = s.autoPlacement) == null ? void 0 : o.overflows) || [], {
337
+ placement: y,
338
338
  overflows: R
339
- }], P = m[w + 1];
340
- if (P)
339
+ }], A = h[w + 1];
340
+ if (A)
341
341
  return {
342
342
  data: {
343
343
  index: w + 1,
344
- overflows: b
344
+ overflows: x
345
345
  },
346
346
  reset: {
347
- placement: P
347
+ placement: A
348
348
  }
349
349
  };
350
- const O = b.map((v) => {
351
- const A = H(v.placement);
352
- return [v.placement, A && p ? (
350
+ const O = x.map((b) => {
351
+ const P = V(b.placement);
352
+ return [b.placement, P && u ? (
353
353
  // Check along the mainAxis and main crossAxis side.
354
- v.overflows.slice(0, 2).reduce((T, L) => T + L, 0)
354
+ b.overflows.slice(0, 2).reduce((L, T) => L + T, 0)
355
355
  ) : (
356
356
  // Check only the mainAxis.
357
- v.overflows[0]
358
- ), v.overflows];
359
- }).sort((v, A) => v[1] - A[1]), S = ((i = O.filter((v) => v[2].slice(
357
+ b.overflows[0]
358
+ ), b.overflows];
359
+ }).sort((b, P) => b[1] - P[1]), S = ((i = O.filter((b) => b[2].slice(
360
360
  0,
361
361
  // Aligned placements should not check their opposite crossAxis
362
362
  // side.
363
- H(v[0]) ? 2 : 3
364
- ).every((A) => A <= 0))[0]) == null ? void 0 : i[0]) || O[0][0];
363
+ V(b[0]) ? 2 : 3
364
+ ).every((P) => P <= 0))[0]) == null ? void 0 : i[0]) || O[0][0];
365
365
  return S !== l ? {
366
366
  data: {
367
367
  index: w + 1,
368
- overflows: b
368
+ overflows: x
369
369
  },
370
370
  reset: {
371
371
  placement: S
@@ -373,7 +373,7 @@ const xe = function(t) {
373
373
  } : {};
374
374
  }
375
375
  };
376
- }, ye = function(t) {
376
+ }, xe = function(t) {
377
377
  return t === void 0 && (t = {}), {
378
378
  name: "flip",
379
379
  options: t,
@@ -387,56 +387,56 @@ const xe = function(t) {
387
387
  platform: c,
388
388
  elements: a
389
389
  } = e, {
390
- mainAxis: p = !0,
390
+ mainAxis: u = !0,
391
391
  crossAxis: f = !0,
392
392
  fallbackPlacements: d,
393
- fallbackStrategy: u = "bestFit",
394
- fallbackAxisSideDirection: h = "none",
395
- flipAlignment: m = !0,
393
+ fallbackStrategy: p = "bestFit",
394
+ fallbackAxisSideDirection: m = "none",
395
+ flipAlignment: h = !0,
396
396
  ...g
397
397
  } = J(t, e);
398
398
  if ((n = r.arrow) != null && n.alignmentOffset)
399
399
  return {};
400
- const w = _(i), x = X(l), y = _(l) === l, R = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), b = d || (y || !m ? [ft(l)] : fe(l)), P = h !== "none";
401
- !d && P && b.push(...me(l, m, h, R));
402
- const O = [l, ...b], F = await ot(e, g), S = [];
403
- let v = ((o = r.flip) == null ? void 0 : o.overflows) || [];
404
- if (p && S.push(F[w]), f) {
405
- const E = Mt(i, s, R);
406
- S.push(F[E[0]], F[E[1]]);
400
+ const w = H(i), y = Y(l), v = H(l) === l, R = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), x = d || (v || !h ? [ft(l)] : ue(l)), A = m !== "none";
401
+ !d && A && x.push(...he(l, h, m, R));
402
+ const O = [l, ...x], $ = await ot(e, g), S = [];
403
+ let b = ((o = r.flip) == null ? void 0 : o.overflows) || [];
404
+ if (u && S.push($[w]), f) {
405
+ const C = Ht(i, s, R);
406
+ S.push($[C[0]], $[C[1]]);
407
407
  }
408
- if (v = [...v, {
408
+ if (b = [...b, {
409
409
  placement: i,
410
410
  overflows: S
411
- }], !S.every((E) => E <= 0)) {
412
- var A, T;
413
- const E = (((A = r.flip) == null ? void 0 : A.index) || 0) + 1, V = O[E];
414
- if (V && (!(f === "alignment" ? x !== X(V) : !1) || // We leave the current main axis only if every placement on that axis
411
+ }], !S.every((C) => C <= 0)) {
412
+ var P, L;
413
+ const C = (((P = r.flip) == null ? void 0 : P.index) || 0) + 1, M = O[C];
414
+ if (M && (!(f === "alignment" ? y !== Y(M) : !1) || // We leave the current main axis only if every placement on that axis
415
415
  // overflows the main axis.
416
- v.every((k) => X(k.placement) === x ? k.overflows[0] > 0 : !0)))
416
+ b.every((k) => Y(k.placement) === y ? k.overflows[0] > 0 : !0)))
417
417
  return {
418
418
  data: {
419
- index: E,
420
- overflows: v
419
+ index: C,
420
+ overflows: b
421
421
  },
422
422
  reset: {
423
- placement: V
423
+ placement: M
424
424
  }
425
425
  };
426
- let B = (T = v.filter((D) => D.overflows[0] <= 0).sort((D, k) => D.overflows[1] - k.overflows[1])[0]) == null ? void 0 : T.placement;
426
+ let B = (L = b.filter((D) => D.overflows[0] <= 0).sort((D, k) => D.overflows[1] - k.overflows[1])[0]) == null ? void 0 : L.placement;
427
427
  if (!B)
428
- switch (u) {
428
+ switch (p) {
429
429
  case "bestFit": {
430
- var L;
431
- const D = (L = v.filter((k) => {
432
- if (P) {
433
- const q = X(k.placement);
434
- return q === x || // Create a bias to the `y` side axis due to horizontal
430
+ var T;
431
+ const D = (T = b.filter((k) => {
432
+ if (A) {
433
+ const q = Y(k.placement);
434
+ return q === y || // Create a bias to the `y` side axis due to horizontal
435
435
  // reading directions favoring greater width.
436
436
  q === "y";
437
437
  }
438
438
  return !0;
439
- }).map((k) => [k.placement, k.overflows.filter((q) => q > 0).reduce((q, qt) => q + qt, 0)]).sort((k, q) => k[1] - q[1])[0]) == null ? void 0 : L[0];
439
+ }).map((k) => [k.placement, k.overflows.filter((q) => q > 0).reduce((q, Kt) => q + Kt, 0)]).sort((k, q) => k[1] - q[1])[0]) == null ? void 0 : T[0];
440
440
  D && (B = D);
441
441
  break;
442
442
  }
@@ -464,9 +464,9 @@ function Dt(t, e) {
464
464
  };
465
465
  }
466
466
  function kt(t) {
467
- return Ht.some((e) => t[e] >= 0);
467
+ return Wt.some((e) => t[e] >= 0);
468
468
  }
469
- const be = function(t) {
469
+ const Re = function(t) {
470
470
  return t === void 0 && (t = {}), {
471
471
  name: "hide",
472
472
  options: t,
@@ -509,7 +509,7 @@ const be = function(t) {
509
509
  };
510
510
  };
511
511
  function _t(t) {
512
- const e = M(...t.map((r) => r.left)), n = M(...t.map((r) => r.top)), o = C(...t.map((r) => r.right)), i = C(...t.map((r) => r.bottom));
512
+ const e = W(...t.map((r) => r.left)), n = W(...t.map((r) => r.top)), o = E(...t.map((r) => r.right)), i = E(...t.map((r) => r.bottom));
513
513
  return {
514
514
  x: e,
515
515
  y: n,
@@ -517,7 +517,7 @@ function _t(t) {
517
517
  height: i - n
518
518
  };
519
519
  }
520
- function Re(t) {
520
+ function Oe(t) {
521
521
  const e = t.slice().sort((i, r) => i.y - r.y), n = [];
522
522
  let o = null;
523
523
  for (let i = 0; i < e.length; i++) {
@@ -526,7 +526,7 @@ function Re(t) {
526
526
  }
527
527
  return n.map((i) => tt(_t(i)));
528
528
  }
529
- const Oe = function(t) {
529
+ const Ae = function(t) {
530
530
  return t === void 0 && (t = {}), {
531
531
  name: "inline",
532
532
  options: t,
@@ -541,63 +541,63 @@ const Oe = function(t) {
541
541
  padding: l = 2,
542
542
  x: c,
543
543
  y: a
544
- } = J(t, e), p = Array.from(await (r.getClientRects == null ? void 0 : r.getClientRects(o.reference)) || []), f = Re(p), d = tt(_t(p)), u = yt(l);
545
- function h() {
544
+ } = J(t, e), u = Array.from(await (r.getClientRects == null ? void 0 : r.getClientRects(o.reference)) || []), f = Oe(u), d = tt(_t(u)), p = xt(l);
545
+ function m() {
546
546
  if (f.length === 2 && f[0].left > f[1].right && c != null && a != null)
547
- return f.find((g) => c > g.left - u.left && c < g.right + u.right && a > g.top - u.top && a < g.bottom + u.bottom) || d;
547
+ return f.find((g) => c > g.left - p.left && c < g.right + p.right && a > g.top - p.top && a < g.bottom + p.bottom) || d;
548
548
  if (f.length >= 2) {
549
- if (X(n) === "y") {
550
- const v = f[0], A = f[f.length - 1], T = _(n) === "top", L = v.top, E = A.bottom, V = T ? v.left : A.left, B = T ? v.right : A.right, D = B - V, k = E - L;
549
+ if (Y(n) === "y") {
550
+ const b = f[0], P = f[f.length - 1], L = H(n) === "top", T = b.top, C = P.bottom, M = L ? b.left : P.left, B = L ? b.right : P.right, D = B - M, k = C - T;
551
551
  return {
552
- top: L,
553
- bottom: E,
554
- left: V,
552
+ top: T,
553
+ bottom: C,
554
+ left: M,
555
555
  right: B,
556
556
  width: D,
557
557
  height: k,
558
- x: V,
559
- y: L
558
+ x: M,
559
+ y: T
560
560
  };
561
561
  }
562
- const g = _(n) === "left", w = C(...f.map((v) => v.right)), x = M(...f.map((v) => v.left)), y = f.filter((v) => g ? v.left === x : v.right === w), R = y[0].top, b = y[y.length - 1].bottom, P = x, O = w, F = O - P, S = b - R;
562
+ const g = H(n) === "left", w = E(...f.map((b) => b.right)), y = W(...f.map((b) => b.left)), v = f.filter((b) => g ? b.left === y : b.right === w), R = v[0].top, x = v[v.length - 1].bottom, A = y, O = w, $ = O - A, S = x - R;
563
563
  return {
564
564
  top: R,
565
- bottom: b,
566
- left: P,
565
+ bottom: x,
566
+ left: A,
567
567
  right: O,
568
- width: F,
568
+ width: $,
569
569
  height: S,
570
- x: P,
570
+ x: A,
571
571
  y: R
572
572
  };
573
573
  }
574
574
  return d;
575
575
  }
576
- const m = await r.getElementRects({
576
+ const h = await r.getElementRects({
577
577
  reference: {
578
- getBoundingClientRect: h
578
+ getBoundingClientRect: m
579
579
  },
580
580
  floating: o.floating,
581
581
  strategy: s
582
582
  });
583
- return i.reference.x !== m.reference.x || i.reference.y !== m.reference.y || i.reference.width !== m.reference.width || i.reference.height !== m.reference.height ? {
583
+ return i.reference.x !== h.reference.x || i.reference.y !== h.reference.y || i.reference.width !== h.reference.width || i.reference.height !== h.reference.height ? {
584
584
  reset: {
585
- rects: m
585
+ rects: h
586
586
  }
587
587
  } : {};
588
588
  }
589
589
  };
590
590
  }, Pe = /* @__PURE__ */ new Set(["left", "top"]);
591
- async function Ae(t, e) {
591
+ async function Ce(t, e) {
592
592
  const {
593
593
  placement: n,
594
594
  platform: o,
595
595
  elements: i
596
- } = t, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s = _(n), l = H(n), c = X(n) === "y", a = Pe.has(s) ? -1 : 1, p = r && c ? -1 : 1, f = J(e, t);
596
+ } = t, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s = H(n), l = V(n), c = Y(n) === "y", a = Pe.has(s) ? -1 : 1, u = r && c ? -1 : 1, f = J(e, t);
597
597
  let {
598
598
  mainAxis: d,
599
- crossAxis: u,
600
- alignmentAxis: h
599
+ crossAxis: p,
600
+ alignmentAxis: m
601
601
  } = typeof f == "number" ? {
602
602
  mainAxis: f,
603
603
  crossAxis: 0,
@@ -607,12 +607,12 @@ async function Ae(t, e) {
607
607
  crossAxis: f.crossAxis || 0,
608
608
  alignmentAxis: f.alignmentAxis
609
609
  };
610
- return l && typeof h == "number" && (u = l === "end" ? h * -1 : h), c ? {
611
- x: u * p,
610
+ return l && typeof m == "number" && (p = l === "end" ? m * -1 : m), c ? {
611
+ x: p * u,
612
612
  y: d * a
613
613
  } : {
614
614
  x: d * a,
615
- y: u * p
615
+ y: p * u
616
616
  };
617
617
  }
618
618
  const Ee = function(t) {
@@ -626,7 +626,7 @@ const Ee = function(t) {
626
626
  y: r,
627
627
  placement: s,
628
628
  middlewareData: l
629
- } = e, c = await Ae(e, t);
629
+ } = e, c = await Ce(e, t);
630
630
  return s === ((n = l.offset) == null ? void 0 : n.placement) && (o = l.arrow) != null && o.alignmentOffset ? {} : {
631
631
  x: i + c.x,
632
632
  y: r + c.y,
@@ -637,7 +637,7 @@ const Ee = function(t) {
637
637
  };
638
638
  }
639
639
  };
640
- }, Ce = function(t) {
640
+ }, Se = function(t) {
641
641
  return t === void 0 && (t = {}), {
642
642
  name: "size",
643
643
  options: t,
@@ -652,25 +652,25 @@ const Ee = function(t) {
652
652
  apply: c = () => {
653
653
  },
654
654
  ...a
655
- } = J(t, e), p = await ot(e, a), f = _(i), d = H(i), u = X(i) === "y", {
656
- width: h,
657
- height: m
655
+ } = J(t, e), u = await ot(e, a), f = H(i), d = V(i), p = Y(i) === "y", {
656
+ width: m,
657
+ height: h
658
658
  } = r.floating;
659
659
  let g, w;
660
660
  f === "top" || f === "bottom" ? (g = f, w = d === (await (s.isRTL == null ? void 0 : s.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (w = f, g = d === "end" ? "top" : "bottom");
661
- const x = m - p.top - p.bottom, y = h - p.left - p.right, R = M(m - p[g], x), b = M(h - p[w], y), P = !e.middlewareData.shift;
662
- let O = R, F = b;
663
- if ((n = e.middlewareData.shift) != null && n.enabled.x && (F = y), (o = e.middlewareData.shift) != null && o.enabled.y && (O = x), P && !d) {
664
- const v = C(p.left, 0), A = C(p.right, 0), T = C(p.top, 0), L = C(p.bottom, 0);
665
- u ? F = h - 2 * (v !== 0 || A !== 0 ? v + A : C(p.left, p.right)) : O = m - 2 * (T !== 0 || L !== 0 ? T + L : C(p.top, p.bottom));
661
+ const y = h - u.top - u.bottom, v = m - u.left - u.right, R = W(h - u[g], y), x = W(m - u[w], v), A = !e.middlewareData.shift;
662
+ let O = R, $ = x;
663
+ if ((n = e.middlewareData.shift) != null && n.enabled.x && ($ = v), (o = e.middlewareData.shift) != null && o.enabled.y && (O = y), A && !d) {
664
+ const b = E(u.left, 0), P = E(u.right, 0), L = E(u.top, 0), T = E(u.bottom, 0);
665
+ p ? $ = m - 2 * (b !== 0 || P !== 0 ? b + P : E(u.left, u.right)) : O = h - 2 * (L !== 0 || T !== 0 ? L + T : E(u.top, u.bottom));
666
666
  }
667
667
  await c({
668
668
  ...e,
669
- availableWidth: F,
669
+ availableWidth: $,
670
670
  availableHeight: O
671
671
  });
672
672
  const S = await s.getDimensions(l.floating);
673
- return h !== S.width || m !== S.height ? {
673
+ return m !== S.width || h !== S.height ? {
674
674
  reset: {
675
675
  rects: !0
676
676
  }
@@ -684,43 +684,43 @@ function ut() {
684
684
  function nt(t) {
685
685
  return Nt(t) ? (t.nodeName || "").toLowerCase() : "#document";
686
686
  }
687
- function $(t) {
687
+ function F(t) {
688
688
  var e;
689
689
  return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
690
690
  }
691
- function Y(t) {
691
+ function X(t) {
692
692
  var e;
693
693
  return (e = (Nt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
694
694
  }
695
695
  function Nt(t) {
696
- return ut() ? t instanceof Node || t instanceof $(t).Node : !1;
696
+ return ut() ? t instanceof Node || t instanceof F(t).Node : !1;
697
697
  }
698
- function N(t) {
699
- return ut() ? t instanceof Element || t instanceof $(t).Element : !1;
698
+ function _(t) {
699
+ return ut() ? t instanceof Element || t instanceof F(t).Element : !1;
700
700
  }
701
701
  function j(t) {
702
- return ut() ? t instanceof HTMLElement || t instanceof $(t).HTMLElement : !1;
702
+ return ut() ? t instanceof HTMLElement || t instanceof F(t).HTMLElement : !1;
703
703
  }
704
- function $t(t) {
705
- return !ut() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof $(t).ShadowRoot;
704
+ function Ft(t) {
705
+ return !ut() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof F(t).ShadowRoot;
706
706
  }
707
- const Se = /* @__PURE__ */ new Set(["inline", "contents"]);
707
+ const Le = /* @__PURE__ */ new Set(["inline", "contents"]);
708
708
  function rt(t) {
709
709
  const {
710
710
  overflow: e,
711
711
  overflowX: n,
712
712
  overflowY: o,
713
713
  display: i
714
- } = W(t);
715
- return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !Se.has(i);
714
+ } = N(t);
715
+ return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !Le.has(i);
716
716
  }
717
717
  const Te = /* @__PURE__ */ new Set(["table", "td", "th"]);
718
- function Le(t) {
718
+ function De(t) {
719
719
  return Te.has(nt(t));
720
720
  }
721
- const De = [":popover-open", ":modal"];
721
+ const ke = [":popover-open", ":modal"];
722
722
  function pt(t) {
723
- return De.some((e) => {
723
+ return ke.some((e) => {
724
724
  try {
725
725
  return t.matches(e);
726
726
  } catch {
@@ -728,15 +728,15 @@ function pt(t) {
728
728
  }
729
729
  });
730
730
  }
731
- const ke = ["transform", "translate", "scale", "rotate", "perspective"], $e = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Fe = ["paint", "layout", "strict", "content"];
732
- function bt(t) {
733
- const e = Rt(), n = N(t) ? W(t) : t;
734
- return ke.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) || $e.some((o) => (n.willChange || "").includes(o)) || Fe.some((o) => (n.contain || "").includes(o));
731
+ const Fe = ["transform", "translate", "scale", "rotate", "perspective"], $e = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Be = ["paint", "layout", "strict", "content"];
732
+ function Rt(t) {
733
+ const e = Ot(), n = _(t) ? N(t) : t;
734
+ return Fe.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) || $e.some((o) => (n.willChange || "").includes(o)) || Be.some((o) => (n.contain || "").includes(o));
735
735
  }
736
- function Be(t) {
736
+ function Me(t) {
737
737
  let e = K(t);
738
738
  for (; j(e) && !et(e); ) {
739
- if (bt(e))
739
+ if (Rt(e))
740
740
  return e;
741
741
  if (pt(e))
742
742
  return null;
@@ -744,18 +744,18 @@ function Be(t) {
744
744
  }
745
745
  return null;
746
746
  }
747
- function Rt() {
747
+ function Ot() {
748
748
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
749
749
  }
750
750
  const Ve = /* @__PURE__ */ new Set(["html", "body", "#document"]);
751
751
  function et(t) {
752
752
  return Ve.has(nt(t));
753
753
  }
754
- function W(t) {
755
- return $(t).getComputedStyle(t);
754
+ function N(t) {
755
+ return F(t).getComputedStyle(t);
756
756
  }
757
757
  function dt(t) {
758
- return N(t) ? {
758
+ return _(t) ? {
759
759
  scrollLeft: t.scrollLeft,
760
760
  scrollTop: t.scrollTop
761
761
  } : {
@@ -770,30 +770,30 @@ function K(t) {
770
770
  // Step into the shadow DOM of the parent of a slotted node.
771
771
  t.assignedSlot || // DOM Element detected.
772
772
  t.parentNode || // ShadowRoot detected.
773
- $t(t) && t.host || // Fallback.
774
- Y(t)
773
+ Ft(t) && t.host || // Fallback.
774
+ X(t)
775
775
  );
776
- return $t(e) ? e.host : e;
776
+ return Ft(e) ? e.host : e;
777
777
  }
778
- function Wt(t) {
778
+ function zt(t) {
779
779
  const e = K(t);
780
- return et(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : j(e) && rt(e) ? e : Wt(e);
780
+ return et(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : j(e) && rt(e) ? e : zt(e);
781
781
  }
782
782
  function it(t, e, n) {
783
783
  var o;
784
784
  e === void 0 && (e = []), n === void 0 && (n = !0);
785
- const i = Wt(t), r = i === ((o = t.ownerDocument) == null ? void 0 : o.body), s = $(i);
785
+ const i = zt(t), r = i === ((o = t.ownerDocument) == null ? void 0 : o.body), s = F(i);
786
786
  if (r) {
787
- const l = wt(s);
787
+ const l = bt(s);
788
788
  return e.concat(s, s.visualViewport || [], rt(i) ? i : [], l && n ? it(l) : []);
789
789
  }
790
790
  return e.concat(i, it(i, [], n));
791
791
  }
792
- function wt(t) {
792
+ function bt(t) {
793
793
  return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
794
794
  }
795
- function zt(t) {
796
- const e = W(t);
795
+ function jt(t) {
796
+ const e = N(t);
797
797
  let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
798
798
  const i = j(t), r = i ? t.offsetWidth : n, s = i ? t.offsetHeight : o, l = ct(n) !== r || ct(o) !== s;
799
799
  return l && (n = r, o = s), {
@@ -802,70 +802,66 @@ function zt(t) {
802
802
  $: l
803
803
  };
804
804
  }
805
- function Ot(t) {
806
- return N(t) ? t : t.contextElement;
805
+ function At(t) {
806
+ return _(t) ? t : t.contextElement;
807
807
  }
808
808
  function Z(t) {
809
- const e = Ot(t);
809
+ const e = At(t);
810
810
  if (!j(e))
811
811
  return z(1);
812
812
  const n = e.getBoundingClientRect(), {
813
813
  width: o,
814
814
  height: i,
815
815
  $: r
816
- } = zt(e);
816
+ } = jt(e);
817
817
  let s = (r ? ct(n.width) : n.width) / o, l = (r ? ct(n.height) : n.height) / i;
818
818
  return (!s || !Number.isFinite(s)) && (s = 1), (!l || !Number.isFinite(l)) && (l = 1), {
819
819
  x: s,
820
820
  y: l
821
821
  };
822
822
  }
823
- const He = /* @__PURE__ */ z(0);
824
- function jt(t) {
825
- const e = $(t);
826
- return !Rt() || !e.visualViewport ? He : {
823
+ const We = /* @__PURE__ */ z(0);
824
+ function Xt(t) {
825
+ const e = F(t);
826
+ return !Ot() || !e.visualViewport ? We : {
827
827
  x: e.visualViewport.offsetLeft,
828
828
  y: e.visualViewport.offsetTop
829
829
  };
830
830
  }
831
- function Me(t, e, n) {
832
- return e === void 0 && (e = !1), !n || e && n !== $(t) ? !1 : e;
831
+ function He(t, e, n) {
832
+ return e === void 0 && (e = !1), !n || e && n !== F(t) ? !1 : e;
833
833
  }
834
834
  function Q(t, e, n, o) {
835
835
  e === void 0 && (e = !1), n === void 0 && (n = !1);
836
- const i = t.getBoundingClientRect(), r = Ot(t);
836
+ const i = t.getBoundingClientRect(), r = At(t);
837
837
  let s = z(1);
838
- e && (o ? N(o) && (s = Z(o)) : s = Z(t));
839
- const l = Me(r, n, o) ? jt(r) : z(0);
840
- let c = (i.left + l.x) / s.x, a = (i.top + l.y) / s.y, p = i.width / s.x, f = i.height / s.y;
838
+ e && (o ? _(o) && (s = Z(o)) : s = Z(t));
839
+ const l = He(r, n, o) ? Xt(r) : z(0);
840
+ let c = (i.left + l.x) / s.x, a = (i.top + l.y) / s.y, u = i.width / s.x, f = i.height / s.y;
841
841
  if (r) {
842
- const d = $(r), u = o && N(o) ? $(o) : o;
843
- let h = d, m = wt(h);
844
- for (; m && o && u !== h; ) {
845
- const g = Z(m), w = m.getBoundingClientRect(), x = W(m), y = w.left + (m.clientLeft + parseFloat(x.paddingLeft)) * g.x, R = w.top + (m.clientTop + parseFloat(x.paddingTop)) * g.y;
846
- c *= g.x, a *= g.y, p *= g.x, f *= g.y, c += y, a += R, h = $(m), m = wt(h);
842
+ const d = F(r), p = o && _(o) ? F(o) : o;
843
+ let m = d, h = bt(m);
844
+ for (; h && o && p !== m; ) {
845
+ const g = Z(h), w = h.getBoundingClientRect(), y = N(h), v = w.left + (h.clientLeft + parseFloat(y.paddingLeft)) * g.x, R = w.top + (h.clientTop + parseFloat(y.paddingTop)) * g.y;
846
+ c *= g.x, a *= g.y, u *= g.x, f *= g.y, c += v, a += R, m = F(h), h = bt(m);
847
847
  }
848
848
  }
849
849
  return tt({
850
- width: p,
850
+ width: u,
851
851
  height: f,
852
852
  x: c,
853
853
  y: a
854
854
  });
855
855
  }
856
- function Pt(t, e) {
856
+ function mt(t, e) {
857
857
  const n = dt(t).scrollLeft;
858
- return e ? e.left + n : Q(Y(t)).left + n;
858
+ return e ? e.left + n : Q(X(t)).left + n;
859
859
  }
860
- function Yt(t, e, n) {
861
- n === void 0 && (n = !1);
862
- const o = t.getBoundingClientRect(), i = o.left + e.scrollLeft - (n ? 0 : (
863
- // RTL <body> scrollbar.
864
- Pt(t, o)
865
- )), r = o.top + e.scrollTop;
860
+ function It(t, e) {
861
+ const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - mt(t, n), i = n.top + e.scrollTop;
866
862
  return {
867
- x: i,
868
- y: r
863
+ x: o,
864
+ y: i
869
865
  };
870
866
  }
871
867
  function _e(t) {
@@ -875,48 +871,54 @@ function _e(t) {
875
871
  offsetParent: o,
876
872
  strategy: i
877
873
  } = t;
878
- const r = i === "fixed", s = Y(o), l = e ? pt(e.floating) : !1;
874
+ const r = i === "fixed", s = X(o), l = e ? pt(e.floating) : !1;
879
875
  if (o === s || l && r)
880
876
  return n;
881
877
  let c = {
882
878
  scrollLeft: 0,
883
879
  scrollTop: 0
884
880
  }, a = z(1);
885
- const p = z(0), f = j(o);
881
+ const u = z(0), f = j(o);
886
882
  if ((f || !f && !r) && ((nt(o) !== "body" || rt(s)) && (c = dt(o)), j(o))) {
887
- const u = Q(o);
888
- a = Z(o), p.x = u.x + o.clientLeft, p.y = u.y + o.clientTop;
883
+ const p = Q(o);
884
+ a = Z(o), u.x = p.x + o.clientLeft, u.y = p.y + o.clientTop;
889
885
  }
890
- const d = s && !f && !r ? Yt(s, c, !0) : z(0);
886
+ const d = s && !f && !r ? It(s, c) : z(0);
891
887
  return {
892
888
  width: n.width * a.x,
893
889
  height: n.height * a.y,
894
- x: n.x * a.x - c.scrollLeft * a.x + p.x + d.x,
895
- y: n.y * a.y - c.scrollTop * a.y + p.y + d.y
890
+ x: n.x * a.x - c.scrollLeft * a.x + u.x + d.x,
891
+ y: n.y * a.y - c.scrollTop * a.y + u.y + d.y
896
892
  };
897
893
  }
898
894
  function Ne(t) {
899
895
  return Array.from(t.getClientRects());
900
896
  }
901
- function We(t) {
902
- const e = Y(t), n = dt(t), o = t.ownerDocument.body, i = C(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), r = C(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
903
- let s = -n.scrollLeft + Pt(t);
897
+ function ze(t) {
898
+ const e = X(t), n = dt(t), o = t.ownerDocument.body, i = E(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), r = E(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
899
+ let s = -n.scrollLeft + mt(t);
904
900
  const l = -n.scrollTop;
905
- return W(o).direction === "rtl" && (s += C(e.clientWidth, o.clientWidth) - i), {
901
+ return N(o).direction === "rtl" && (s += E(e.clientWidth, o.clientWidth) - i), {
906
902
  width: i,
907
903
  height: r,
908
904
  x: s,
909
905
  y: l
910
906
  };
911
907
  }
912
- function ze(t, e) {
913
- const n = $(t), o = Y(t), i = n.visualViewport;
908
+ const $t = 25;
909
+ function je(t, e) {
910
+ const n = F(t), o = X(t), i = n.visualViewport;
914
911
  let r = o.clientWidth, s = o.clientHeight, l = 0, c = 0;
915
912
  if (i) {
916
913
  r = i.width, s = i.height;
917
- const a = Rt();
918
- (!a || a && e === "fixed") && (l = i.offsetLeft, c = i.offsetTop);
914
+ const u = Ot();
915
+ (!u || u && e === "fixed") && (l = i.offsetLeft, c = i.offsetTop);
919
916
  }
917
+ const a = mt(o);
918
+ if (a <= 0) {
919
+ const u = o.ownerDocument, f = u.body, d = getComputedStyle(f), p = u.compatMode === "CSS1Compat" && parseFloat(d.marginLeft) + parseFloat(d.marginRight) || 0, m = Math.abs(o.clientWidth - f.clientWidth - p);
920
+ m <= $t && (r -= m);
921
+ } else a <= $t && (r += a);
920
922
  return {
921
923
  width: r,
922
924
  height: s,
@@ -924,8 +926,8 @@ function ze(t, e) {
924
926
  y: c
925
927
  };
926
928
  }
927
- const je = /* @__PURE__ */ new Set(["absolute", "fixed"]);
928
- function Ye(t, e) {
929
+ const Xe = /* @__PURE__ */ new Set(["absolute", "fixed"]);
930
+ function Ie(t, e) {
929
931
  const n = Q(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, r = j(t) ? Z(t) : z(1), s = t.clientWidth * r.x, l = t.clientHeight * r.y, c = i * r.x, a = o * r.y;
930
932
  return {
931
933
  width: s,
@@ -934,16 +936,16 @@ function Ye(t, e) {
934
936
  y: a
935
937
  };
936
938
  }
937
- function Ft(t, e, n) {
939
+ function Bt(t, e, n) {
938
940
  let o;
939
941
  if (e === "viewport")
940
- o = ze(t, n);
942
+ o = je(t, n);
941
943
  else if (e === "document")
942
- o = We(Y(t));
943
- else if (N(e))
944
- o = Ye(e, n);
944
+ o = ze(X(t));
945
+ else if (_(e))
946
+ o = Ie(e, n);
945
947
  else {
946
- const i = jt(t);
948
+ const i = Xt(t);
947
949
  o = {
948
950
  x: e.x - i.x,
949
951
  y: e.y - i.y,
@@ -953,34 +955,34 @@ function Ft(t, e, n) {
953
955
  }
954
956
  return tt(o);
955
957
  }
956
- function It(t, e) {
958
+ function Yt(t, e) {
957
959
  const n = K(t);
958
- return n === e || !N(n) || et(n) ? !1 : W(n).position === "fixed" || It(n, e);
960
+ return n === e || !_(n) || et(n) ? !1 : N(n).position === "fixed" || Yt(n, e);
959
961
  }
960
- function Ie(t, e) {
962
+ function Ye(t, e) {
961
963
  const n = e.get(t);
962
964
  if (n)
963
965
  return n;
964
- let o = it(t, [], !1).filter((l) => N(l) && nt(l) !== "body"), i = null;
965
- const r = W(t).position === "fixed";
966
+ let o = it(t, [], !1).filter((l) => _(l) && nt(l) !== "body"), i = null;
967
+ const r = N(t).position === "fixed";
966
968
  let s = r ? K(t) : t;
967
- for (; N(s) && !et(s); ) {
968
- const l = W(s), c = bt(s);
969
- !c && l.position === "fixed" && (i = null), (r ? !c && !i : !c && l.position === "static" && !!i && je.has(i.position) || rt(s) && !c && It(t, s)) ? o = o.filter((p) => p !== s) : i = l, s = K(s);
969
+ for (; _(s) && !et(s); ) {
970
+ const l = N(s), c = Rt(s);
971
+ !c && l.position === "fixed" && (i = null), (r ? !c && !i : !c && l.position === "static" && !!i && Xe.has(i.position) || rt(s) && !c && Yt(t, s)) ? o = o.filter((u) => u !== s) : i = l, s = K(s);
970
972
  }
971
973
  return e.set(t, o), o;
972
974
  }
973
- function Xe(t) {
975
+ function Ue(t) {
974
976
  let {
975
977
  element: e,
976
978
  boundary: n,
977
979
  rootBoundary: o,
978
980
  strategy: i
979
981
  } = t;
980
- const s = [...n === "clippingAncestors" ? pt(e) ? [] : Ie(e, this._c) : [].concat(n), o], l = s[0], c = s.reduce((a, p) => {
981
- const f = Ft(e, p, i);
982
- return a.top = C(f.top, a.top), a.right = M(f.right, a.right), a.bottom = M(f.bottom, a.bottom), a.left = C(f.left, a.left), a;
983
- }, Ft(e, l, i));
982
+ const s = [...n === "clippingAncestors" ? pt(e) ? [] : Ye(e, this._c) : [].concat(n), o], l = s[0], c = s.reduce((a, u) => {
983
+ const f = Bt(e, u, i);
984
+ return a.top = E(f.top, a.top), a.right = W(f.right, a.right), a.bottom = W(f.bottom, a.bottom), a.left = E(f.left, a.left), a;
985
+ }, Bt(e, l, i));
984
986
  return {
985
987
  width: c.right - c.left,
986
988
  height: c.bottom - c.top,
@@ -988,33 +990,33 @@ function Xe(t) {
988
990
  y: c.top
989
991
  };
990
992
  }
991
- function Ue(t) {
993
+ function qe(t) {
992
994
  const {
993
995
  width: e,
994
996
  height: n
995
- } = zt(t);
997
+ } = jt(t);
996
998
  return {
997
999
  width: e,
998
1000
  height: n
999
1001
  };
1000
1002
  }
1001
- function qe(t, e, n) {
1002
- const o = j(e), i = Y(e), r = n === "fixed", s = Q(t, !0, r, e);
1003
+ function Ke(t, e, n) {
1004
+ const o = j(e), i = X(e), r = n === "fixed", s = Q(t, !0, r, e);
1003
1005
  let l = {
1004
1006
  scrollLeft: 0,
1005
1007
  scrollTop: 0
1006
1008
  };
1007
1009
  const c = z(0);
1008
1010
  function a() {
1009
- c.x = Pt(i);
1011
+ c.x = mt(i);
1010
1012
  }
1011
1013
  if (o || !o && !r)
1012
1014
  if ((nt(e) !== "body" || rt(i)) && (l = dt(e)), o) {
1013
- const u = Q(e, !0, r, e);
1014
- c.x = u.x + e.clientLeft, c.y = u.y + e.clientTop;
1015
+ const p = Q(e, !0, r, e);
1016
+ c.x = p.x + e.clientLeft, c.y = p.y + e.clientTop;
1015
1017
  } else i && a();
1016
1018
  r && !o && i && a();
1017
- const p = i && !o && !r ? Yt(i, l) : z(0), f = s.left + l.scrollLeft - c.x - p.x, d = s.top + l.scrollTop - c.y - p.y;
1019
+ const u = i && !o && !r ? It(i, l) : z(0), f = s.left + l.scrollLeft - c.x - u.x, d = s.top + l.scrollTop - c.y - u.y;
1018
1020
  return {
1019
1021
  x: f,
1020
1022
  y: d,
@@ -1022,39 +1024,39 @@ function qe(t, e, n) {
1022
1024
  height: s.height
1023
1025
  };
1024
1026
  }
1025
- function gt(t) {
1026
- return W(t).position === "static";
1027
+ function wt(t) {
1028
+ return N(t).position === "static";
1027
1029
  }
1028
- function Bt(t, e) {
1029
- if (!j(t) || W(t).position === "fixed")
1030
+ function Mt(t, e) {
1031
+ if (!j(t) || N(t).position === "fixed")
1030
1032
  return null;
1031
1033
  if (e)
1032
1034
  return e(t);
1033
1035
  let n = t.offsetParent;
1034
- return Y(t) === n && (n = n.ownerDocument.body), n;
1036
+ return X(t) === n && (n = n.ownerDocument.body), n;
1035
1037
  }
1036
- function Xt(t, e) {
1037
- const n = $(t);
1038
+ function Ut(t, e) {
1039
+ const n = F(t);
1038
1040
  if (pt(t))
1039
1041
  return n;
1040
1042
  if (!j(t)) {
1041
1043
  let i = K(t);
1042
1044
  for (; i && !et(i); ) {
1043
- if (N(i) && !gt(i))
1045
+ if (_(i) && !wt(i))
1044
1046
  return i;
1045
1047
  i = K(i);
1046
1048
  }
1047
1049
  return n;
1048
1050
  }
1049
- let o = Bt(t, e);
1050
- for (; o && Le(o) && gt(o); )
1051
- o = Bt(o, e);
1052
- return o && et(o) && gt(o) && !bt(o) ? n : o || Be(t) || n;
1051
+ let o = Mt(t, e);
1052
+ for (; o && De(o) && wt(o); )
1053
+ o = Mt(o, e);
1054
+ return o && et(o) && wt(o) && !Rt(o) ? n : o || Me(t) || n;
1053
1055
  }
1054
- const Ke = async function(t) {
1055
- const e = this.getOffsetParent || Xt, n = this.getDimensions, o = await n(t.floating);
1056
+ const Ge = async function(t) {
1057
+ const e = this.getOffsetParent || Ut, n = this.getDimensions, o = await n(t.floating);
1056
1058
  return {
1057
- reference: qe(t.reference, await e(t.floating), t.strategy),
1059
+ reference: Ke(t.reference, await e(t.floating), t.strategy),
1058
1060
  floating: {
1059
1061
  x: 0,
1060
1062
  y: 0,
@@ -1063,27 +1065,27 @@ const Ke = async function(t) {
1063
1065
  }
1064
1066
  };
1065
1067
  };
1066
- function Ge(t) {
1067
- return W(t).direction === "rtl";
1068
+ function Je(t) {
1069
+ return N(t).direction === "rtl";
1068
1070
  }
1069
- const Je = {
1071
+ const Qe = {
1070
1072
  convertOffsetParentRelativeRectToViewportRelativeRect: _e,
1071
- getDocumentElement: Y,
1072
- getClippingRect: Xe,
1073
- getOffsetParent: Xt,
1074
- getElementRects: Ke,
1073
+ getDocumentElement: X,
1074
+ getClippingRect: Ue,
1075
+ getOffsetParent: Ut,
1076
+ getElementRects: Ge,
1075
1077
  getClientRects: Ne,
1076
- getDimensions: Ue,
1078
+ getDimensions: qe,
1077
1079
  getScale: Z,
1078
- isElement: N,
1079
- isRTL: Ge
1080
+ isElement: _,
1081
+ isRTL: Je
1080
1082
  };
1081
- function Ut(t, e) {
1083
+ function qt(t, e) {
1082
1084
  return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
1083
1085
  }
1084
- function Qe(t, e) {
1086
+ function Ze(t, e) {
1085
1087
  let n = null, o;
1086
- const i = Y(t);
1088
+ const i = X(t);
1087
1089
  function r() {
1088
1090
  var l;
1089
1091
  clearTimeout(o), (l = n) == null || l.disconnect(), n = null;
@@ -1091,20 +1093,20 @@ function Qe(t, e) {
1091
1093
  function s(l, c) {
1092
1094
  l === void 0 && (l = !1), c === void 0 && (c = 1), r();
1093
1095
  const a = t.getBoundingClientRect(), {
1094
- left: p,
1096
+ left: u,
1095
1097
  top: f,
1096
1098
  width: d,
1097
- height: u
1099
+ height: p
1098
1100
  } = a;
1099
- if (l || e(), !d || !u)
1101
+ if (l || e(), !d || !p)
1100
1102
  return;
1101
- const h = st(f), m = st(i.clientWidth - (p + d)), g = st(i.clientHeight - (f + u)), w = st(p), y = {
1102
- rootMargin: -h + "px " + -m + "px " + -g + "px " + -w + "px",
1103
- threshold: C(0, M(1, c)) || 1
1103
+ const m = st(f), h = st(i.clientWidth - (u + d)), g = st(i.clientHeight - (f + p)), w = st(u), v = {
1104
+ rootMargin: -m + "px " + -h + "px " + -g + "px " + -w + "px",
1105
+ threshold: E(0, W(1, c)) || 1
1104
1106
  };
1105
1107
  let R = !0;
1106
- function b(P) {
1107
- const O = P[0].intersectionRatio;
1108
+ function x(A) {
1109
+ const O = A[0].intersectionRatio;
1108
1110
  if (O !== c) {
1109
1111
  if (!R)
1110
1112
  return s();
@@ -1112,22 +1114,22 @@ function Qe(t, e) {
1112
1114
  s(!1, 1e-7);
1113
1115
  }, 1e3);
1114
1116
  }
1115
- O === 1 && !Ut(a, t.getBoundingClientRect()) && s(), R = !1;
1117
+ O === 1 && !qt(a, t.getBoundingClientRect()) && s(), R = !1;
1116
1118
  }
1117
1119
  try {
1118
- n = new IntersectionObserver(b, {
1119
- ...y,
1120
+ n = new IntersectionObserver(x, {
1121
+ ...v,
1120
1122
  // Handle <iframe>s
1121
1123
  root: i.ownerDocument
1122
1124
  });
1123
1125
  } catch {
1124
- n = new IntersectionObserver(b, y);
1126
+ n = new IntersectionObserver(x, v);
1125
1127
  }
1126
1128
  n.observe(t);
1127
1129
  }
1128
1130
  return s(!0), r;
1129
1131
  }
1130
- function Ze(t, e, n, o) {
1132
+ function tn(t, e, n, o) {
1131
1133
  o === void 0 && (o = {});
1132
1134
  const {
1133
1135
  ancestorScroll: i = !0,
@@ -1135,58 +1137,58 @@ function Ze(t, e, n, o) {
1135
1137
  elementResize: s = typeof ResizeObserver == "function",
1136
1138
  layoutShift: l = typeof IntersectionObserver == "function",
1137
1139
  animationFrame: c = !1
1138
- } = o, a = Ot(t), p = i || r ? [...a ? it(a) : [], ...it(e)] : [];
1139
- p.forEach((w) => {
1140
+ } = o, a = At(t), u = i || r ? [...a ? it(a) : [], ...it(e)] : [];
1141
+ u.forEach((w) => {
1140
1142
  i && w.addEventListener("scroll", n, {
1141
1143
  passive: !0
1142
1144
  }), r && w.addEventListener("resize", n);
1143
1145
  });
1144
- const f = a && l ? Qe(a, n) : null;
1145
- let d = -1, u = null;
1146
- s && (u = new ResizeObserver((w) => {
1147
- let [x] = w;
1148
- x && x.target === a && u && (u.unobserve(e), cancelAnimationFrame(d), d = requestAnimationFrame(() => {
1149
- var y;
1150
- (y = u) == null || y.observe(e);
1146
+ const f = a && l ? Ze(a, n) : null;
1147
+ let d = -1, p = null;
1148
+ s && (p = new ResizeObserver((w) => {
1149
+ let [y] = w;
1150
+ y && y.target === a && p && (p.unobserve(e), cancelAnimationFrame(d), d = requestAnimationFrame(() => {
1151
+ var v;
1152
+ (v = p) == null || v.observe(e);
1151
1153
  })), n();
1152
- }), a && !c && u.observe(a), u.observe(e));
1153
- let h, m = c ? Q(t) : null;
1154
+ }), a && !c && p.observe(a), p.observe(e));
1155
+ let m, h = c ? Q(t) : null;
1154
1156
  c && g();
1155
1157
  function g() {
1156
1158
  const w = Q(t);
1157
- m && !Ut(m, w) && n(), m = w, h = requestAnimationFrame(g);
1159
+ h && !qt(h, w) && n(), h = w, m = requestAnimationFrame(g);
1158
1160
  }
1159
1161
  return n(), () => {
1160
1162
  var w;
1161
- p.forEach((x) => {
1162
- i && x.removeEventListener("scroll", n), r && x.removeEventListener("resize", n);
1163
- }), f?.(), (w = u) == null || w.disconnect(), u = null, c && cancelAnimationFrame(h);
1163
+ u.forEach((y) => {
1164
+ i && y.removeEventListener("scroll", n), r && y.removeEventListener("resize", n);
1165
+ }), f?.(), (w = p) == null || w.disconnect(), p = null, c && cancelAnimationFrame(m);
1164
1166
  };
1165
1167
  }
1166
- const tn = Ee, Vt = xe, en = ye, nn = Ce, on = be, rn = we, sn = Oe, ln = (t, e, n) => {
1168
+ const en = Ee, Vt = ve, nn = xe, on = Se, rn = Re, sn = be, ln = Ae, cn = (t, e, n) => {
1167
1169
  const o = /* @__PURE__ */ new Map(), i = {
1168
- platform: Je,
1170
+ platform: Qe,
1169
1171
  ...n
1170
1172
  }, r = {
1171
1173
  ...i.platform,
1172
1174
  _c: o
1173
1175
  };
1174
- return ge(t, e, {
1176
+ return we(t, e, {
1175
1177
  ...i,
1176
1178
  platform: r
1177
1179
  });
1178
1180
  };
1179
- var cn = Object.defineProperty, U = (t, e, n, o) => {
1181
+ var an = Object.defineProperty, U = (t, e, n, o) => {
1180
1182
  for (var i = void 0, r = t.length - 1, s; r >= 0; r--)
1181
1183
  (s = t[r]) && (i = s(e, n, i) || i);
1182
- return i && cn(e, n, i), i;
1184
+ return i && an(e, n, i), i;
1183
1185
  };
1184
1186
  const lt = {
1185
1187
  Flip: "flip",
1186
1188
  AutoPlacementHorizontal: "auto-placement-horizontal",
1187
1189
  AutoPlacementVertical: "auto-placement-vertical"
1188
- }, an = {
1189
- [lt.Flip]: en(),
1190
+ }, fn = {
1191
+ [lt.Flip]: nn(),
1190
1192
  [lt.AutoPlacementHorizontal]: Vt({
1191
1193
  allowedPlacements: [
1192
1194
  "bottom",
@@ -1208,16 +1210,16 @@ const lt = {
1208
1210
  ]
1209
1211
  })
1210
1212
  };
1211
- class I extends Zt {
1213
+ class I extends te {
1212
1214
  constructor() {
1213
1215
  super(...arguments), this.open = !1, this.dismissible = !1, this.arrow = !1, this.alternate = !1, this.placementStrategy = lt.Flip, this.animationFrame = !1, this.strategy = "fixed", this.offset = null, this.#i = () => (this.#n = this.updatePosition(), this.#n);
1214
1216
  }
1215
1217
  get #r() {
1216
1218
  let e = [
1217
- sn(),
1218
- an[this.placementStrategy],
1219
- on(),
1220
- nn({
1219
+ ln(),
1220
+ fn[this.placementStrategy],
1221
+ rn(),
1222
+ on({
1221
1223
  apply({ availableWidth: o, availableHeight: i, elements: r }) {
1222
1224
  Object.assign(r.floating.style, {
1223
1225
  maxWidth: `${o}px`,
@@ -1228,8 +1230,8 @@ class I extends Zt {
1228
1230
  ], n = this.offset ?? 0;
1229
1231
  return this.arrow && (n += 12, e = [
1230
1232
  ...e,
1231
- rn({ element: this.arrowEl, padding: 10 })
1232
- ]), n > 0 && e.unshift(tn(n)), e;
1233
+ sn({ element: this.arrowEl, padding: 10 })
1234
+ ]), n > 0 && e.unshift(en(n)), e;
1233
1235
  }
1234
1236
  #o;
1235
1237
  openChanged(e, n) {
@@ -1260,7 +1262,7 @@ class I extends Zt {
1260
1262
  super.disconnectedCallback(), this.#t();
1261
1263
  }
1262
1264
  #t() {
1263
- this.#o?.(), this.open && this.controlEl && this.controlEl.classList.add("open"), this.anchorEl && this.open && this.popupEl && (this.#o = Ze(
1265
+ this.#o?.(), this.open && this.controlEl && this.controlEl.classList.add("open"), this.anchorEl && this.open && this.popupEl && (this.#o = tn(
1264
1266
  this.anchorEl,
1265
1267
  this.popupEl,
1266
1268
  this.#i,
@@ -1282,7 +1284,7 @@ class I extends Zt {
1282
1284
  async updatePosition() {
1283
1285
  if (!this.open || !this.anchorEl)
1284
1286
  return;
1285
- const e = await ln(this.anchorEl, this.popupEl, {
1287
+ const e = await cn(this.anchorEl, this.popupEl, {
1286
1288
  placement: this.placement,
1287
1289
  strategy: this.strategy,
1288
1290
  middleware: this.#r
@@ -1353,54 +1355,54 @@ U([
1353
1355
  G({ mode: "fromView" })
1354
1356
  ], I.prototype, "strategy");
1355
1357
  U([
1356
- G({ attribute: "offset", converter: te })
1358
+ G({ attribute: "offset", converter: ee })
1357
1359
  ], I.prototype, "offset");
1358
1360
  U([
1359
- ee
1361
+ ne
1360
1362
  ], I.prototype, "anchor");
1361
- const fn = ":host{display:var(--_popup-display, inline)}.control{border-radius:inherit;background:var(--vvd-color-surface-4dp);contain:layout}.control:not(.open){display:none}.popup-wrapper{white-space:initial;--scrollbar-track-color: transparent;--scrollbar-thumb-color: color-mix(in srgb, var(--vvd-color-neutral-950), transparent 70%)}.popup-wrapper{scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);scrollbar-width:thin}.popup-wrapper ::-webkit-scrollbar{width:4px}.popup-wrapper ::-webkit-scrollbar-track{background:var(--scrollbar-track-color)}.popup-wrapper ::-webkit-scrollbar-thumb{border:0;border-radius:4px;background-color:var(--scrollbar-fallback-track-color, var(--scrollbar-thumb-color))}.popup-wrapper{z-index:var(--_popup-z-index, 10);overflow:visible;padding:0;border:none;border-radius:8px;margin:0;inline-size:max-content}.popup-wrapper:not(.absolute){position:fixed}.popup-wrapper.absolute{position:absolute;top:0;left:0}.popup-content{display:grid;color:var(--vvd-color-canvas-text)}.dismissible .popup-content{align-content:start;grid-template-columns:1fr auto}.arrow{position:absolute;z-index:-1;width:8px;height:8px;background:var(--vvd-color-surface-4dp);transform:rotate(45deg)}.dismissible-button{align-self:flex-start;margin-block-start:4px;margin-inline-end:4px}", un = ({ open: t, dismissible: e, alternate: n }) => ie(
1363
+ const un = ":host{display:var(--_popup-display, inline)}.control{border-radius:inherit;background:var(--vvd-color-surface-4dp);contain:layout}.control:not(.open){display:none}.popup-wrapper{white-space:initial;--scrollbar-track-color: transparent;--scrollbar-thumb-color: color-mix(in srgb, var(--vvd-color-neutral-950), transparent 70%)}.popup-wrapper{scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);scrollbar-width:thin}.popup-wrapper ::-webkit-scrollbar{width:4px}.popup-wrapper ::-webkit-scrollbar-track{background:var(--scrollbar-track-color)}.popup-wrapper ::-webkit-scrollbar-thumb{border:0;border-radius:4px;background-color:var(--scrollbar-fallback-track-color, var(--scrollbar-thumb-color))}.popup-wrapper{z-index:var(--_popup-z-index, 10);overflow:visible;padding:0;border:none;border-radius:8px;margin:0;inline-size:max-content}.popup-wrapper:not(.absolute){position:fixed}.popup-wrapper.absolute{position:absolute;top:0;left:0}.popup-content{display:grid;color:var(--vvd-color-canvas-text)}.dismissible .popup-content{align-content:start;grid-template-columns:1fr auto}.arrow{position:absolute;z-index:-1;width:8px;height:8px;background:var(--vvd-color-surface-4dp);transform:rotate(45deg)}.dismissible-button{align-self:flex-start;margin-block-start:4px;margin-inline-end:4px}", pn = ({ open: t, dismissible: e, alternate: n }) => re(
1362
1364
  "control",
1363
1365
  ["open", !!t],
1364
1366
  ["dismissible", !!e],
1365
1367
  ["alternate", !!n]
1366
1368
  );
1367
- function pn(t) {
1369
+ function dn(t) {
1368
1370
  return t.strategy && t.strategy === "fixed" ? "manual" : null;
1369
1371
  }
1370
- const dn = (t) => {
1371
- const e = t.tagFor(Jt), n = t.tagFor(Kt);
1372
- return mt`
1372
+ const mn = (t) => {
1373
+ const e = t.tagFor(Qt), n = t.tagFor(Gt);
1374
+ return ht`
1373
1375
  <${e}>
1374
- <div popover="${pn}" class="popup-wrapper ${(o) => o.strategy}" ${ht("popupEl")} part="popup-base">
1375
- <div ${ht("controlEl")} class="${un}" aria-hidden="${(o) => o.open ? "false" : "true"}"
1376
+ <div popover="${dn}" class="popup-wrapper ${(o) => o.strategy}" ${gt("popupEl")} part="popup-base">
1377
+ <div ${gt("controlEl")} class="${pn}" aria-hidden="${(o) => o.open ? "false" : "true"}"
1376
1378
  part="${(o) => o.alternate ? "vvd-theme-alternate" : ""}">
1377
1379
  <div class="popup-content">
1378
1380
  <slot></slot>
1379
- ${At(
1381
+ ${Pt(
1380
1382
  (o) => o.dismissible,
1381
- mt`<${n} size="condensed" @click="${(o) => o.open = !1}"
1383
+ ht`<${n} size="condensed" @click="${(o) => o.open = !1}"
1382
1384
  class="dismissible-button" icon="close-small-solid" shape="pill"></${n}>`
1383
1385
  )}
1384
1386
  </div>
1385
- ${At(
1387
+ ${Pt(
1386
1388
  (o) => o.arrow,
1387
- mt`<div class="arrow" ${ht("arrowEl")}></div>`
1389
+ ht`<div class="arrow" ${gt("arrowEl")}></div>`
1388
1390
  )}
1389
1391
  </div>
1390
1392
  </div>
1391
1393
  </${e}>`;
1392
- }, mn = oe(
1394
+ }, hn = ie(
1393
1395
  "popup",
1394
1396
  I,
1395
- dn,
1396
- [Qt, Gt],
1397
+ mn,
1398
+ [Zt, Jt],
1397
1399
  {
1398
- styles: fn
1400
+ styles: un
1399
1401
  }
1400
- ), bn = ne(mn);
1402
+ ), Rn = oe(hn);
1401
1403
  export {
1402
1404
  I as P,
1403
1405
  lt as a,
1404
- mn as p,
1405
- bn as r
1406
+ hn as p,
1407
+ Rn as r
1406
1408
  };