nve-designsystem 3.1.0 → 3.3.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 (197) hide show
  1. package/chunks/chunk.2PCBEMQZ.js +163 -226
  2. package/chunks/chunk.36O46B5H.js +15 -15
  3. package/chunks/chunk.4TUIT776.js +78 -96
  4. package/chunks/chunk.5JY5FUCG.js +965 -1245
  5. package/chunks/chunk.5P45LHIX.js +668 -96
  6. package/chunks/chunk.6CTB5ZDJ.js +107 -100
  7. package/chunks/chunk.B4BZKR24.js +29 -39
  8. package/chunks/chunk.D5YQDJ7X.js +122 -166
  9. package/chunks/chunk.EA437WHD.js +5 -5
  10. package/chunks/chunk.GI7VDIWX.js +14 -15
  11. package/chunks/chunk.GMYPQTFK.js +18 -20
  12. package/chunks/chunk.HVTXQL7M.js +191 -215
  13. package/chunks/chunk.IKV4VH3T.js +18 -16
  14. package/chunks/chunk.IVVHNXMC.js +26 -27
  15. package/chunks/chunk.JHOXTQXA.js +65 -74
  16. package/chunks/chunk.JXOKFADN.js +63 -90
  17. package/chunks/chunk.K7JGTRV7.js +24 -23
  18. package/chunks/chunk.KPLQLAWP.js +132 -147
  19. package/chunks/chunk.LD4M4QGE.js +61 -74
  20. package/chunks/chunk.MSKEYBDI.js +53 -71
  21. package/chunks/chunk.NYIIDP5N.js +39 -45
  22. package/chunks/chunk.RWUUFNUL.js +91 -114
  23. package/chunks/chunk.SAPQLUO4.js +249 -228
  24. package/chunks/chunk.SI4ACBFK.js +139 -5
  25. package/chunks/chunk.TP2GB2HO.js +361 -460
  26. package/chunks/chunk.UDWRA64J.js +185 -223
  27. package/chunks/chunk.URTPIBTY.js +119 -151
  28. package/chunks/chunk.VESXC477.js +63 -66
  29. package/chunks/chunk.XA43ZQPC.js +198 -313
  30. package/chunks/chunk.XQ2OKYYA.js +25 -26
  31. package/chunks/chunk.XZNBUGX7.js +6 -6
  32. package/chunks/chunk.YHLNUJ7P.js +93 -116
  33. package/chunks/chunk.ZH2AND3P.js +340 -399
  34. package/chunks/chunk.ZL53POKZ.js +61 -156
  35. package/chunks/chunk.js +20 -0
  36. package/chunks/class-map.js +49 -45
  37. package/chunks/decorate.js +105 -0
  38. package/chunks/directive-helpers.js +5 -7
  39. package/chunks/if-defined.js +5 -5
  40. package/chunks/lit.js +525 -0
  41. package/chunks/live.js +24 -24
  42. package/chunks/nve-alert.component.js +163 -0
  43. package/chunks/nve-carousel-item.component.js +36 -0
  44. package/chunks/nve-carousel.component.js +41 -0
  45. package/chunks/nve-checkbox-group.component.js +114 -0
  46. package/chunks/nve-checkbox.component.js +28 -0
  47. package/chunks/nve-dialog.component.js +39 -0
  48. package/chunks/nve-divider.component.js +23 -0
  49. package/chunks/nve-drawer.component.js +40 -0
  50. package/chunks/nve-dropdown.component.js +83 -0
  51. package/chunks/nve-input.component.js +80 -0
  52. package/chunks/nve-label.component.js +89 -0
  53. package/chunks/nve-menu-item.component.js +35 -0
  54. package/chunks/nve-menu.component.js +17 -0
  55. package/chunks/nve-option.component.js +27 -0
  56. package/chunks/nve-popup.component.js +15 -0
  57. package/chunks/nve-radio-button.component.js +20 -0
  58. package/chunks/nve-radio-group.component.js +78 -0
  59. package/chunks/nve-radio.component.js +18 -0
  60. package/chunks/nve-select.component.js +58 -0
  61. package/chunks/nve-skeleton.component.js +20 -0
  62. package/chunks/nve-spinner.component.js +23 -0
  63. package/chunks/nve-tooltip.component.js +20 -0
  64. package/chunks/nve-warning-level.component.js +57 -0
  65. package/chunks/ref.js +75 -84
  66. package/chunks/shoelace.js +10006 -0
  67. package/chunks/static-html.js +27 -0
  68. package/chunks/unsafe-html.js +24 -20
  69. package/chunks/updateInvalidProperty.js +7 -7
  70. package/chunks/watch.js +20 -20
  71. package/components/nve-accordion/nve-accordion.component.js +24 -30
  72. package/components/nve-accordion-item/nve-accordion-item.component.js +30 -64
  73. package/components/nve-accordion-item/nve-accordion-item.styles.js +5 -5
  74. package/components/nve-alert/nve-alert.component.js +2 -227
  75. package/components/nve-alert/nve-alert.styles.js +45 -27
  76. package/components/nve-badge/nve-badge.component.js +41 -45
  77. package/components/nve-badge/nve-badge.styles.js +33 -31
  78. package/components/nve-button/nve-button.component.d.ts +110 -10
  79. package/components/nve-button/nve-button.component.js +146 -39
  80. package/components/nve-button/nve-button.styles.js +214 -157
  81. package/components/nve-carousel/nve-carousel.component.js +2 -47
  82. package/components/nve-carousel/nve-carousel.styles.js +6 -6
  83. package/components/nve-carousel-item/nve-carousel-item.component.js +2 -40
  84. package/components/nve-carousel-item/nve-carousel-item.styles.js +5 -5
  85. package/components/nve-carousel-thumbnail/nve-carousel-thumbnail.component.js +44 -54
  86. package/components/nve-carousel-thumbnail/nve-carousel-thumbnail.styles.js +5 -5
  87. package/components/nve-checkbox/nve-checkbox.component.js +2 -34
  88. package/components/nve-checkbox/nve-checkbox.styles.js +7 -7
  89. package/components/nve-checkbox-group/nve-checkbox-group.component.js +2 -152
  90. package/components/nve-checkbox-group/nve-checkbox-group.styles.js +5 -5
  91. package/components/nve-combobox/nve-combobox.component.js +222 -440
  92. package/components/nve-combobox/nve-combobox.styles.js +6 -6
  93. package/components/nve-darkmode-switch/nve-darkmode-switch.component.js +32 -38
  94. package/components/nve-dialog/nve-dialog-styles.js +6 -6
  95. package/components/nve-dialog/nve-dialog.component.js +2 -54
  96. package/components/nve-divider/nve-divider.component.js +2 -30
  97. package/components/nve-drawer/nve-drawer.component.js +2 -44
  98. package/components/nve-drawer/nve-drawer.styles.js +6 -6
  99. package/components/nve-dropdown/nve-dropdown.component.js +2 -79
  100. package/components/nve-dropdown/nve-dropdown.styles.js +5 -5
  101. package/components/nve-heading/nve-heading.component.d.ts +29 -0
  102. package/components/nve-heading/nve-heading.component.js +45 -0
  103. package/components/nve-heading/nve-heading.styles.d.ts +2 -0
  104. package/components/nve-heading/nve-heading.styles.js +41 -0
  105. package/components/nve-icon/nve-icon.component.js +145 -164
  106. package/components/nve-icon/nve-icon.styles.js +11 -6
  107. package/components/nve-icon/offline-icons.js +16 -13
  108. package/components/nve-input/nve-input.component.js +2 -100
  109. package/components/nve-input/nve-input.styles.js +5 -5
  110. package/components/nve-label/nve-label.component.js +2 -115
  111. package/components/nve-label/nve-label.styles.js +5 -5
  112. package/components/nve-link-card/nve-link-card.component.d.ts +5 -2
  113. package/components/nve-link-card/nve-link-card.component.js +44 -80
  114. package/components/nve-link-card/nve-link-card.styles.js +71 -66
  115. package/components/nve-menu/nve-menu.component.js +2 -22
  116. package/components/nve-menu/nve-menu.styles.js +5 -5
  117. package/components/nve-menu-item/nve-menu-item.component.js +2 -43
  118. package/components/nve-menu-item/nve-menu-item.styles.js +7 -7
  119. package/components/nve-message-card/nve-message-card.component.js +61 -91
  120. package/components/nve-message-card/nve-message-card.styles.js +24 -27
  121. package/components/nve-navigation-card/nve-navigation-card.component.d.ts +52 -0
  122. package/components/nve-navigation-card/nve-navigation-card.component.js +60 -0
  123. package/components/nve-navigation-card/nve-navigation-card.styles.d.ts +2 -0
  124. package/components/nve-navigation-card/nve-navigation-card.styles.js +112 -0
  125. package/components/nve-option/nve-option.component.js +2 -41
  126. package/components/nve-option/nve-option.styles.js +5 -5
  127. package/components/nve-paragraph/nve-paragraph.component.d.ts +26 -0
  128. package/components/nve-paragraph/nve-paragraph.component.js +26 -0
  129. package/components/nve-paragraph/nve-paragraph.styles.d.ts +2 -0
  130. package/components/nve-paragraph/nve-paragraph.styles.js +105 -0
  131. package/components/nve-popup/nve-popup.component.js +2 -22
  132. package/components/nve-radio/nve-radio.component.js +2 -23
  133. package/components/nve-radio/nve-radio.styles.js +5 -5
  134. package/components/nve-radio-button/nve-radio-button.component.js +2 -25
  135. package/components/nve-radio-button/nve-radio-button.styles.js +5 -5
  136. package/components/nve-radio-group/nve-radio-group.component.js +2 -119
  137. package/components/nve-radio-group/nve-radio-group.styles.js +5 -5
  138. package/components/nve-relative-time/nve-relative-time.component.js +21 -56
  139. package/components/nve-relative-time/nve-relative-time.styles.js +5 -5
  140. package/components/nve-select/nve-select.component.js +2 -80
  141. package/components/nve-select/nve-select.styles.js +6 -6
  142. package/components/nve-skeleton/nve-skeleton.component.js +2 -27
  143. package/components/nve-skeleton/nve-skeleton.styles.js +5 -5
  144. package/components/nve-spinner/nve-spinner.component.js +2 -31
  145. package/components/nve-stepper/nve-step/nve-step.component.js +113 -173
  146. package/components/nve-stepper/nve-step/nve-step.styles.js +12 -12
  147. package/components/nve-stepper/nve-stepper-mobile.component.js +37 -49
  148. package/components/nve-stepper/nve-stepper-mobile.styles.js +7 -7
  149. package/components/nve-stepper/nve-stepper.component.js +94 -139
  150. package/components/nve-stepper/nve-stepper.styles.js +5 -5
  151. package/components/nve-switch/nve-switch.component.js +75 -107
  152. package/components/nve-switch/nve-switch.styles.js +7 -7
  153. package/components/nve-tab/nve-tab.component.js +30 -42
  154. package/components/nve-tab/nve-tab.styles.js +7 -7
  155. package/components/nve-tab-group/nve-tab-group.component.js +180 -260
  156. package/components/nve-tab-group/nve-tab-group.styles.js +5 -5
  157. package/components/nve-tab-panel/nve-tab-panel.component.js +21 -31
  158. package/components/nve-tab-panel/nve-tab-panel.styles.js +5 -5
  159. package/components/nve-tag/nve-tag.component.d.ts +3 -3
  160. package/components/nve-tag/nve-tag.component.js +71 -72
  161. package/components/nve-tag/nve-tag.styles.js +23 -22
  162. package/components/nve-textarea/nve-textarea.component.d.ts +3 -1
  163. package/components/nve-textarea/nve-textarea.component.js +112 -173
  164. package/components/nve-textarea/nve-textarea.styles.js +10 -5
  165. package/components/nve-tooltip/nve-tooltip.component.js +2 -30
  166. package/components/nve-tooltip/nve-tooltip.styles.js +5 -5
  167. package/components/nve-warning-level/nve-warning-level.component.js +2 -78
  168. package/components/nve-warning-level/nve-warning-level.styles.js +7 -7
  169. package/css/global.css +13 -55
  170. package/css/nve.css +1048 -393
  171. package/css/nve_dark.css +406 -305
  172. package/css/rme.css +1050 -395
  173. package/css/rme_dark.css +408 -307
  174. package/css/shoelace-styles.css +539 -0
  175. package/css/varsom.css +1046 -391
  176. package/css/varsom_dark.css +404 -303
  177. package/custom-elements.json +2905 -12389
  178. package/fonts/LICENSE.txt +37 -0
  179. package/fonts/SourceSans3-VariableFont_wght.woff2 +0 -0
  180. package/interfaces/NveComponent.interface.js +0 -1
  181. package/nve-designsystem.d.ts +5 -0
  182. package/nve-designsystem.js +46 -86
  183. package/package.json +26 -8
  184. package/registerIcons/systemLibraryCustomization.js +23 -91
  185. package/vite-env.d.js +0 -1
  186. package/chunks/chunk.3RPBFEDE.js +0 -162
  187. package/chunks/chunk.JCXLDPQF.js +0 -225
  188. package/chunks/chunk.JQBT7BOV.js +0 -8446
  189. package/chunks/chunk.MAQXLKQ7.js +0 -598
  190. package/chunks/lit-element.js +0 -508
  191. package/chunks/property.js +0 -37
  192. package/chunks/query.js +0 -13
  193. package/chunks/state.js +0 -7
  194. package/chunks/static.js +0 -26
  195. package/nve-designsystem.css +0 -1
  196. package/vscode.css-custom-data.json +0 -621
  197. package/vscode.html-custom-data.json +0 -2354
@@ -1,10 +1,10 @@
1
- import { i as jt, x as Rt } from "./lit-element.js";
2
- import { L as Yt } from "./chunk.6CTB5ZDJ.js";
3
- import { c as It, d as x, S as Xt, _ as qt, a as Ut } from "./chunk.4TUIT776.js";
4
- import { e as Et } from "./class-map.js";
5
- import { n as A } from "./property.js";
6
- import { e as Tt } from "./query.js";
7
- var Kt = jt`
1
+ import { a as e, u as t } from "./lit.js";
2
+ import { o as n, r } from "./decorate.js";
3
+ import { a as i, i as a, n as o, r as s, t as c } from "./chunk.4TUIT776.js";
4
+ import { t as l } from "./class-map.js";
5
+ import { t as u } from "./chunk.6CTB5ZDJ.js";
6
+ //#region .pnpm/@shoelace-style+shoelace@2.20.1_@floating-ui+utils@0.2.11_@types+react@19.2.15/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.3KSWVBQ5.js
7
+ var d = t`
8
8
  :host {
9
9
  --arrow-color: var(--sl-color-neutral-1000);
10
10
  --arrow-size: 6px;
@@ -62,1259 +62,979 @@ var Kt = jt`
62
62
  var(--hover-bridge-bottom-left-x, 0) var(--hover-bridge-bottom-left-y, 0)
63
63
  );
64
64
  }
65
- `;
66
- const X = Math.min, C = Math.max, st = Math.round, nt = Math.floor, N = (t) => ({
67
- x: t,
68
- y: t
69
- }), Gt = {
70
- left: "right",
71
- right: "left",
72
- bottom: "top",
73
- top: "bottom"
74
- }, Jt = {
75
- start: "end",
76
- end: "start"
65
+ `, f = Math.min, p = Math.max, m = Math.round, h = Math.floor, g = (e) => ({
66
+ x: e,
67
+ y: e
68
+ }), _ = {
69
+ left: "right",
70
+ right: "left",
71
+ bottom: "top",
72
+ top: "bottom"
77
73
  };
78
- function gt(t, e, o) {
79
- return C(t, X(e, o));
80
- }
81
- function Z(t, e) {
82
- return typeof t == "function" ? t(e) : t;
83
- }
84
- function q(t) {
85
- return t.split("-")[0];
86
- }
87
- function tt(t) {
88
- return t.split("-")[1];
89
- }
90
- function $t(t) {
91
- return t === "x" ? "y" : "x";
92
- }
93
- function wt(t) {
94
- return t === "y" ? "height" : "width";
95
- }
96
- function V(t) {
97
- return ["top", "bottom"].includes(q(t)) ? "y" : "x";
98
- }
99
- function bt(t) {
100
- return $t(V(t));
101
- }
102
- function Qt(t, e, o) {
103
- o === void 0 && (o = !1);
104
- const i = tt(t), n = bt(t), s = wt(n);
105
- let r = n === "x" ? i === (o ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
106
- return e.reference[s] > e.floating[s] && (r = lt(r)), [r, lt(r)];
107
- }
108
- function Zt(t) {
109
- const e = lt(t);
110
- return [mt(t), e, mt(e)];
111
- }
112
- function mt(t) {
113
- return t.replace(/start|end/g, (e) => Jt[e]);
114
- }
115
- function te(t, e, o) {
116
- const i = ["left", "right"], n = ["right", "left"], s = ["top", "bottom"], r = ["bottom", "top"];
117
- switch (t) {
118
- case "top":
119
- case "bottom":
120
- return o ? e ? n : i : e ? i : n;
121
- case "left":
122
- case "right":
123
- return e ? s : r;
124
- default:
125
- return [];
126
- }
127
- }
128
- function ee(t, e, o, i) {
129
- const n = tt(t);
130
- let s = te(q(t), o === "start", i);
131
- return n && (s = s.map((r) => r + "-" + n), e && (s = s.concat(s.map(mt)))), s;
132
- }
133
- function lt(t) {
134
- return t.replace(/left|right|bottom|top/g, (e) => Gt[e]);
135
- }
136
- function oe(t) {
137
- return {
138
- top: 0,
139
- right: 0,
140
- bottom: 0,
141
- left: 0,
142
- ...t
143
- };
144
- }
145
- function kt(t) {
146
- return typeof t != "number" ? oe(t) : {
147
- top: t,
148
- right: t,
149
- bottom: t,
150
- left: t
151
- };
152
- }
153
- function at(t) {
154
- const {
155
- x: e,
156
- y: o,
157
- width: i,
158
- height: n
159
- } = t;
160
- return {
161
- width: i,
162
- height: n,
163
- top: o,
164
- left: e,
165
- right: e + i,
166
- bottom: o + n,
167
- x: e,
168
- y: o
169
- };
170
- }
171
- function Ot(t, e, o) {
172
- let {
173
- reference: i,
174
- floating: n
175
- } = t;
176
- const s = V(e), r = bt(e), l = wt(r), a = q(e), c = s === "y", f = i.x + i.width / 2 - n.width / 2, u = i.y + i.height / 2 - n.height / 2, d = i[l] / 2 - n[l] / 2;
177
- let p;
178
- switch (a) {
179
- case "top":
180
- p = {
181
- x: f,
182
- y: i.y - n.height
183
- };
184
- break;
185
- case "bottom":
186
- p = {
187
- x: f,
188
- y: i.y + i.height
189
- };
190
- break;
191
- case "right":
192
- p = {
193
- x: i.x + i.width,
194
- y: u
195
- };
196
- break;
197
- case "left":
198
- p = {
199
- x: i.x - n.width,
200
- y: u
201
- };
202
- break;
203
- default:
204
- p = {
205
- x: i.x,
206
- y: i.y
207
- };
208
- }
209
- switch (tt(e)) {
210
- case "start":
211
- p[r] -= d * (o && c ? -1 : 1);
212
- break;
213
- case "end":
214
- p[r] += d * (o && c ? -1 : 1);
215
- break;
216
- }
217
- return p;
218
- }
219
- const ie = async (t, e, o) => {
220
- const {
221
- placement: i = "bottom",
222
- strategy: n = "absolute",
223
- middleware: s = [],
224
- platform: r
225
- } = o, l = s.filter(Boolean), a = await (r.isRTL == null ? void 0 : r.isRTL(e));
226
- let c = await r.getElementRects({
227
- reference: t,
228
- floating: e,
229
- strategy: n
230
- }), {
231
- x: f,
232
- y: u
233
- } = Ot(c, i, a), d = i, p = {}, h = 0;
234
- for (let g = 0; g < l.length; g++) {
235
- const {
236
- name: y,
237
- fn: m
238
- } = l[g], {
239
- x: w,
240
- y: b,
241
- data: R,
242
- reset: P
243
- } = await m({
244
- x: f,
245
- y: u,
246
- initialPlacement: i,
247
- placement: d,
248
- strategy: n,
249
- middlewareData: p,
250
- rects: c,
251
- platform: r,
252
- elements: {
253
- reference: t,
254
- floating: e
255
- }
256
- });
257
- f = w ?? f, u = b ?? u, p = {
258
- ...p,
259
- [y]: {
260
- ...p[y],
261
- ...R
262
- }
263
- }, P && h <= 50 && (h++, typeof P == "object" && (P.placement && (d = P.placement), P.rects && (c = P.rects === !0 ? await r.getElementRects({
264
- reference: t,
265
- floating: e,
266
- strategy: n
267
- }) : P.rects), {
268
- x: f,
269
- y: u
270
- } = Ot(c, d, a)), g = -1);
271
- }
272
- return {
273
- x: f,
274
- y: u,
275
- placement: d,
276
- strategy: n,
277
- middlewareData: p
278
- };
279
- };
280
- async function vt(t, e) {
281
- var o;
282
- e === void 0 && (e = {});
283
- const {
284
- x: i,
285
- y: n,
286
- platform: s,
287
- rects: r,
288
- elements: l,
289
- strategy: a
290
- } = t, {
291
- boundary: c = "clippingAncestors",
292
- rootBoundary: f = "viewport",
293
- elementContext: u = "floating",
294
- altBoundary: d = !1,
295
- padding: p = 0
296
- } = Z(e, t), h = kt(p), y = l[d ? u === "floating" ? "reference" : "floating" : u], m = at(await s.getClippingRect({
297
- element: (o = await (s.isElement == null ? void 0 : s.isElement(y))) == null || o ? y : y.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(l.floating)),
298
- boundary: c,
299
- rootBoundary: f,
300
- strategy: a
301
- })), w = u === "floating" ? {
302
- x: i,
303
- y: n,
304
- width: r.floating.width,
305
- height: r.floating.height
306
- } : r.reference, b = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l.floating)), R = await (s.isElement == null ? void 0 : s.isElement(b)) ? await (s.getScale == null ? void 0 : s.getScale(b)) || {
307
- x: 1,
308
- y: 1
309
- } : {
310
- x: 1,
311
- y: 1
312
- }, P = at(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
313
- elements: l,
314
- rect: w,
315
- offsetParent: b,
316
- strategy: a
317
- }) : w);
318
- return {
319
- top: (m.top - P.top + h.top) / R.y,
320
- bottom: (P.bottom - m.bottom + h.bottom) / R.y,
321
- left: (m.left - P.left + h.left) / R.x,
322
- right: (P.right - m.right + h.right) / R.x
323
- };
324
- }
325
- const ne = (t) => ({
326
- name: "arrow",
327
- options: t,
328
- async fn(e) {
329
- const {
330
- x: o,
331
- y: i,
332
- placement: n,
333
- rects: s,
334
- platform: r,
335
- elements: l,
336
- middlewareData: a
337
- } = e, {
338
- element: c,
339
- padding: f = 0
340
- } = Z(t, e) || {};
341
- if (c == null)
342
- return {};
343
- const u = kt(f), d = {
344
- x: o,
345
- y: i
346
- }, p = bt(n), h = wt(p), g = await r.getDimensions(c), y = p === "y", m = y ? "top" : "left", w = y ? "bottom" : "right", b = y ? "clientHeight" : "clientWidth", R = s.reference[h] + s.reference[p] - d[p] - s.floating[h], P = d[p] - s.reference[p], L = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c));
347
- let E = L ? L[b] : 0;
348
- (!E || !await (r.isElement == null ? void 0 : r.isElement(L))) && (E = l.floating[b] || s.floating[h]);
349
- const W = R / 2 - P / 2, D = E / 2 - g[h] / 2 - 1, z = X(u[m], D), j = X(u[w], D), F = z, Y = E - g[h] - j, O = E / 2 - g[h] / 2 + W, K = gt(F, O, Y), H = !a.arrow && tt(n) != null && O !== K && s.reference[h] / 2 - (O < F ? z : j) - g[h] / 2 < 0, T = H ? O < F ? O - F : O - Y : 0;
350
- return {
351
- [p]: d[p] + T,
352
- data: {
353
- [p]: K,
354
- centerOffset: O - K - T,
355
- ...H && {
356
- alignmentOffset: T
357
- }
358
- },
359
- reset: H
360
- };
361
- }
362
- }), re = function(t) {
363
- return t === void 0 && (t = {}), {
364
- name: "flip",
365
- options: t,
366
- async fn(e) {
367
- var o, i;
368
- const {
369
- placement: n,
370
- middlewareData: s,
371
- rects: r,
372
- initialPlacement: l,
373
- platform: a,
374
- elements: c
375
- } = e, {
376
- mainAxis: f = !0,
377
- crossAxis: u = !0,
378
- fallbackPlacements: d,
379
- fallbackStrategy: p = "bestFit",
380
- fallbackAxisSideDirection: h = "none",
381
- flipAlignment: g = !0,
382
- ...y
383
- } = Z(t, e);
384
- if ((o = s.arrow) != null && o.alignmentOffset)
385
- return {};
386
- const m = q(n), w = V(l), b = q(l) === l, R = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), P = d || (b || !g ? [lt(l)] : Zt(l)), L = h !== "none";
387
- !d && L && P.push(...ee(l, g, h, R));
388
- const E = [l, ...P], W = await vt(e, y), D = [];
389
- let z = ((i = s.flip) == null ? void 0 : i.overflows) || [];
390
- if (f && D.push(W[m]), u) {
391
- const O = Qt(n, r, R);
392
- D.push(W[O[0]], W[O[1]]);
393
- }
394
- if (z = [...z, {
395
- placement: n,
396
- overflows: D
397
- }], !D.every((O) => O <= 0)) {
398
- var j, F;
399
- const O = (((j = s.flip) == null ? void 0 : j.index) || 0) + 1, K = E[O];
400
- if (K && (!(u === "alignment" ? w !== V(K) : !1) || // We leave the current main axis only if every placement on that axis
401
- // overflows the main axis.
402
- z.every(($) => $.overflows[0] > 0 && V($.placement) === w)))
403
- return {
404
- data: {
405
- index: O,
406
- overflows: z
407
- },
408
- reset: {
409
- placement: K
410
- }
411
- };
412
- let H = (F = z.filter((T) => T.overflows[0] <= 0).sort((T, $) => T.overflows[1] - $.overflows[1])[0]) == null ? void 0 : F.placement;
413
- if (!H)
414
- switch (p) {
415
- case "bestFit": {
416
- var Y;
417
- const T = (Y = z.filter(($) => {
418
- if (L) {
419
- const I = V($.placement);
420
- return I === w || // Create a bias to the `y` side axis due to horizontal
421
- // reading directions favoring greater width.
422
- I === "y";
423
- }
424
- return !0;
425
- }).map(($) => [$.placement, $.overflows.filter((I) => I > 0).reduce((I, Vt) => I + Vt, 0)]).sort(($, I) => $[1] - I[1])[0]) == null ? void 0 : Y[0];
426
- T && (H = T);
427
- break;
428
- }
429
- case "initialPlacement":
430
- H = l;
431
- break;
432
- }
433
- if (n !== H)
434
- return {
435
- reset: {
436
- placement: H
437
- }
438
- };
439
- }
440
- return {};
441
- }
442
- };
443
- };
444
- async function se(t, e) {
445
- const {
446
- placement: o,
447
- platform: i,
448
- elements: n
449
- } = t, s = await (i.isRTL == null ? void 0 : i.isRTL(n.floating)), r = q(o), l = tt(o), a = V(o) === "y", c = ["left", "top"].includes(r) ? -1 : 1, f = s && a ? -1 : 1, u = Z(e, t);
450
- let {
451
- mainAxis: d,
452
- crossAxis: p,
453
- alignmentAxis: h
454
- } = typeof u == "number" ? {
455
- mainAxis: u,
456
- crossAxis: 0,
457
- alignmentAxis: null
458
- } : {
459
- mainAxis: u.mainAxis || 0,
460
- crossAxis: u.crossAxis || 0,
461
- alignmentAxis: u.alignmentAxis
462
- };
463
- return l && typeof h == "number" && (p = l === "end" ? h * -1 : h), a ? {
464
- x: p * f,
465
- y: d * c
466
- } : {
467
- x: d * c,
468
- y: p * f
469
- };
470
- }
471
- const le = function(t) {
472
- return t === void 0 && (t = 0), {
473
- name: "offset",
474
- options: t,
475
- async fn(e) {
476
- var o, i;
477
- const {
478
- x: n,
479
- y: s,
480
- placement: r,
481
- middlewareData: l
482
- } = e, a = await se(e, t);
483
- return r === ((o = l.offset) == null ? void 0 : o.placement) && (i = l.arrow) != null && i.alignmentOffset ? {} : {
484
- x: n + a.x,
485
- y: s + a.y,
486
- data: {
487
- ...a,
488
- placement: r
489
- }
490
- };
491
- }
492
- };
493
- }, ae = function(t) {
494
- return t === void 0 && (t = {}), {
495
- name: "shift",
496
- options: t,
497
- async fn(e) {
498
- const {
499
- x: o,
500
- y: i,
501
- placement: n
502
- } = e, {
503
- mainAxis: s = !0,
504
- crossAxis: r = !1,
505
- limiter: l = {
506
- fn: (y) => {
507
- let {
508
- x: m,
509
- y: w
510
- } = y;
511
- return {
512
- x: m,
513
- y: w
514
- };
515
- }
516
- },
517
- ...a
518
- } = Z(t, e), c = {
519
- x: o,
520
- y: i
521
- }, f = await vt(e, a), u = V(q(n)), d = $t(u);
522
- let p = c[d], h = c[u];
523
- if (s) {
524
- const y = d === "y" ? "top" : "left", m = d === "y" ? "bottom" : "right", w = p + f[y], b = p - f[m];
525
- p = gt(w, p, b);
526
- }
527
- if (r) {
528
- const y = u === "y" ? "top" : "left", m = u === "y" ? "bottom" : "right", w = h + f[y], b = h - f[m];
529
- h = gt(w, h, b);
530
- }
531
- const g = l.fn({
532
- ...e,
533
- [d]: p,
534
- [u]: h
535
- });
536
- return {
537
- ...g,
538
- data: {
539
- x: g.x - o,
540
- y: g.y - i,
541
- enabled: {
542
- [d]: s,
543
- [u]: r
544
- }
545
- }
546
- };
547
- }
548
- };
549
- }, ce = function(t) {
550
- return t === void 0 && (t = {}), {
551
- name: "size",
552
- options: t,
553
- async fn(e) {
554
- var o, i;
555
- const {
556
- placement: n,
557
- rects: s,
558
- platform: r,
559
- elements: l
560
- } = e, {
561
- apply: a = () => {
562
- },
563
- ...c
564
- } = Z(t, e), f = await vt(e, c), u = q(n), d = tt(n), p = V(n) === "y", {
565
- width: h,
566
- height: g
567
- } = s.floating;
568
- let y, m;
569
- u === "top" || u === "bottom" ? (y = u, m = d === (await (r.isRTL == null ? void 0 : r.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (m = u, y = d === "end" ? "top" : "bottom");
570
- const w = g - f.top - f.bottom, b = h - f.left - f.right, R = X(g - f[y], w), P = X(h - f[m], b), L = !e.middlewareData.shift;
571
- let E = R, W = P;
572
- if ((o = e.middlewareData.shift) != null && o.enabled.x && (W = b), (i = e.middlewareData.shift) != null && i.enabled.y && (E = w), L && !d) {
573
- const z = C(f.left, 0), j = C(f.right, 0), F = C(f.top, 0), Y = C(f.bottom, 0);
574
- p ? W = h - 2 * (z !== 0 || j !== 0 ? z + j : C(f.left, f.right)) : E = g - 2 * (F !== 0 || Y !== 0 ? F + Y : C(f.top, f.bottom));
575
- }
576
- await a({
577
- ...e,
578
- availableWidth: W,
579
- availableHeight: E
580
- });
581
- const D = await r.getDimensions(l.floating);
582
- return h !== D.width || g !== D.height ? {
583
- reset: {
584
- rects: !0
585
- }
586
- } : {};
587
- }
588
- };
74
+ function v(e, t, n) {
75
+ return p(e, f(t, n));
76
+ }
77
+ function y(e, t) {
78
+ return typeof e == "function" ? e(t) : e;
79
+ }
80
+ function b(e) {
81
+ return e.split("-")[0];
82
+ }
83
+ function x(e) {
84
+ return e.split("-")[1];
85
+ }
86
+ function S(e) {
87
+ return e === "x" ? "y" : "x";
88
+ }
89
+ function C(e) {
90
+ return e === "y" ? "height" : "width";
91
+ }
92
+ function w(e) {
93
+ let t = e[0];
94
+ return t === "t" || t === "b" ? "y" : "x";
95
+ }
96
+ function T(e) {
97
+ return S(w(e));
98
+ }
99
+ function ee(e, t, n) {
100
+ n === void 0 && (n = !1);
101
+ let r = x(e), i = T(e), a = C(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
102
+ return t.reference[a] > t.floating[a] && (o = j(o)), [o, j(o)];
103
+ }
104
+ function te(e) {
105
+ let t = j(e);
106
+ return [
107
+ E(e),
108
+ t,
109
+ E(t)
110
+ ];
111
+ }
112
+ function E(e) {
113
+ return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
114
+ }
115
+ var D = ["left", "right"], O = ["right", "left"], k = ["top", "bottom"], ne = ["bottom", "top"];
116
+ function re(e, t, n) {
117
+ switch (e) {
118
+ case "top":
119
+ case "bottom": return n ? t ? O : D : t ? D : O;
120
+ case "left":
121
+ case "right": return t ? k : ne;
122
+ default: return [];
123
+ }
124
+ }
125
+ function A(e, t, n, r) {
126
+ let i = x(e), a = re(b(e), n === "start", r);
127
+ return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(E)))), a;
128
+ }
129
+ function j(e) {
130
+ let t = b(e);
131
+ return _[t] + e.slice(t.length);
132
+ }
133
+ function M(e) {
134
+ return {
135
+ top: 0,
136
+ right: 0,
137
+ bottom: 0,
138
+ left: 0,
139
+ ...e
140
+ };
141
+ }
142
+ function ie(e) {
143
+ return typeof e == "number" ? {
144
+ top: e,
145
+ right: e,
146
+ bottom: e,
147
+ left: e
148
+ } : M(e);
149
+ }
150
+ function N(e) {
151
+ let { x: t, y: n, width: r, height: i } = e;
152
+ return {
153
+ width: r,
154
+ height: i,
155
+ top: n,
156
+ left: t,
157
+ right: t + r,
158
+ bottom: n + i,
159
+ x: t,
160
+ y: n
161
+ };
162
+ }
163
+ //#endregion
164
+ //#region .pnpm/@floating-ui+core@1.7.5/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
165
+ function P(e, t, n) {
166
+ let { reference: r, floating: i } = e, a = w(t), o = T(t), s = C(o), c = b(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
167
+ switch (c) {
168
+ case "top":
169
+ p = {
170
+ x: u,
171
+ y: r.y - i.height
172
+ };
173
+ break;
174
+ case "bottom":
175
+ p = {
176
+ x: u,
177
+ y: r.y + r.height
178
+ };
179
+ break;
180
+ case "right":
181
+ p = {
182
+ x: r.x + r.width,
183
+ y: d
184
+ };
185
+ break;
186
+ case "left":
187
+ p = {
188
+ x: r.x - i.width,
189
+ y: d
190
+ };
191
+ break;
192
+ default: p = {
193
+ x: r.x,
194
+ y: r.y
195
+ };
196
+ }
197
+ switch (x(t)) {
198
+ case "start":
199
+ p[o] -= f * (n && l ? -1 : 1);
200
+ break;
201
+ case "end":
202
+ p[o] += f * (n && l ? -1 : 1);
203
+ break;
204
+ }
205
+ return p;
206
+ }
207
+ async function F(e, t) {
208
+ t === void 0 && (t = {});
209
+ let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } = y(t, e), p = ie(f), m = o[d ? u === "floating" ? "reference" : "floating" : u], h = N(await i.getClippingRect({
210
+ element: await (i.isElement == null ? void 0 : i.isElement(m)) ?? !0 ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(o.floating)),
211
+ boundary: c,
212
+ rootBoundary: l,
213
+ strategy: s
214
+ })), g = u === "floating" ? {
215
+ x: n,
216
+ y: r,
217
+ width: a.floating.width,
218
+ height: a.floating.height
219
+ } : a.reference, _ = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(o.floating)), v = await (i.isElement == null ? void 0 : i.isElement(_)) && await (i.getScale == null ? void 0 : i.getScale(_)) || {
220
+ x: 1,
221
+ y: 1
222
+ }, b = N(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
223
+ elements: o,
224
+ rect: g,
225
+ offsetParent: _,
226
+ strategy: s
227
+ }) : g);
228
+ return {
229
+ top: (h.top - b.top + p.top) / v.y,
230
+ bottom: (b.bottom - h.bottom + p.bottom) / v.y,
231
+ left: (h.left - b.left + p.left) / v.x,
232
+ right: (b.right - h.right + p.right) / v.x
233
+ };
234
+ }
235
+ var ae = 50, oe = async (e, t, n) => {
236
+ let { placement: r = "bottom", strategy: i = "absolute", middleware: a = [], platform: o } = n, s = o.detectOverflow ? o : {
237
+ ...o,
238
+ detectOverflow: F
239
+ }, c = await (o.isRTL == null ? void 0 : o.isRTL(t)), l = await o.getElementRects({
240
+ reference: e,
241
+ floating: t,
242
+ strategy: i
243
+ }), { x: u, y: d } = P(l, r, c), f = r, p = 0, m = {};
244
+ for (let n = 0; n < a.length; n++) {
245
+ let h = a[n];
246
+ if (!h) continue;
247
+ let { name: g, fn: _ } = h, { x: v, y, data: b, reset: x } = await _({
248
+ x: u,
249
+ y: d,
250
+ initialPlacement: r,
251
+ placement: f,
252
+ strategy: i,
253
+ middlewareData: m,
254
+ rects: l,
255
+ platform: s,
256
+ elements: {
257
+ reference: e,
258
+ floating: t
259
+ }
260
+ });
261
+ u = v ?? u, d = y ?? d, m[g] = {
262
+ ...m[g],
263
+ ...b
264
+ }, x && p < ae && (p++, typeof x == "object" && (x.placement && (f = x.placement), x.rects && (l = x.rects === !0 ? await o.getElementRects({
265
+ reference: e,
266
+ floating: t,
267
+ strategy: i
268
+ }) : x.rects), {x: u, y: d} = P(l, f, c)), n = -1);
269
+ }
270
+ return {
271
+ x: u,
272
+ y: d,
273
+ placement: f,
274
+ strategy: i,
275
+ middlewareData: m
276
+ };
277
+ }, se = (e) => ({
278
+ name: "arrow",
279
+ options: e,
280
+ async fn(t) {
281
+ let { x: n, y: r, placement: i, rects: a, platform: o, elements: s, middlewareData: c } = t, { element: l, padding: u = 0 } = y(e, t) || {};
282
+ if (l == null) return {};
283
+ let d = ie(u), p = {
284
+ x: n,
285
+ y: r
286
+ }, m = T(i), h = C(m), g = await o.getDimensions(l), _ = m === "y", b = _ ? "top" : "left", S = _ ? "bottom" : "right", w = _ ? "clientHeight" : "clientWidth", ee = a.reference[h] + a.reference[m] - p[m] - a.floating[h], te = p[m] - a.reference[m], E = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(l)), D = E ? E[w] : 0;
287
+ (!D || !await (o.isElement == null ? void 0 : o.isElement(E))) && (D = s.floating[w] || a.floating[h]);
288
+ let O = ee / 2 - te / 2, k = D / 2 - g[h] / 2 - 1, ne = f(d[b], k), re = f(d[S], k), A = ne, j = D - g[h] - re, M = D / 2 - g[h] / 2 + O, N = v(A, M, j), P = !c.arrow && x(i) != null && M !== N && a.reference[h] / 2 - (M < A ? ne : re) - g[h] / 2 < 0, F = P ? M < A ? M - A : M - j : 0;
289
+ return {
290
+ [m]: p[m] + F,
291
+ data: {
292
+ [m]: N,
293
+ centerOffset: M - N - F,
294
+ ...P && { alignmentOffset: F }
295
+ },
296
+ reset: P
297
+ };
298
+ }
299
+ }), ce = function(e) {
300
+ return e === void 0 && (e = {}), {
301
+ name: "flip",
302
+ options: e,
303
+ async fn(t) {
304
+ var n;
305
+ let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ...h } = y(e, t);
306
+ if ((n = i.arrow) != null && n.alignmentOffset) return {};
307
+ let g = b(r), _ = w(o), v = b(o) === o, x = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), S = d || (v || !m ? [j(o)] : te(o)), C = p !== "none";
308
+ !d && C && S.push(...A(o, m, p, x));
309
+ let T = [o, ...S], E = await s.detectOverflow(t, h), D = [], O = i.flip?.overflows || [];
310
+ if (l && D.push(E[g]), u) {
311
+ let e = ee(r, a, x);
312
+ D.push(E[e[0]], E[e[1]]);
313
+ }
314
+ if (O = [...O, {
315
+ placement: r,
316
+ overflows: D
317
+ }], !D.every((e) => e <= 0)) {
318
+ let e = (i.flip?.index || 0) + 1, t = T[e];
319
+ if (t && (!(u === "alignment" && _ !== w(t)) || O.every((e) => w(e.placement) === _ ? e.overflows[0] > 0 : !0))) return {
320
+ data: {
321
+ index: e,
322
+ overflows: O
323
+ },
324
+ reset: { placement: t }
325
+ };
326
+ let n = O.filter((e) => e.overflows[0] <= 0).sort((e, t) => e.overflows[1] - t.overflows[1])[0]?.placement;
327
+ if (!n) switch (f) {
328
+ case "bestFit": {
329
+ let e = O.filter((e) => {
330
+ if (C) {
331
+ let t = w(e.placement);
332
+ return t === _ || t === "y";
333
+ }
334
+ return !0;
335
+ }).map((e) => [e.placement, e.overflows.filter((e) => e > 0).reduce((e, t) => e + t, 0)]).sort((e, t) => e[1] - t[1])[0]?.[0];
336
+ e && (n = e);
337
+ break;
338
+ }
339
+ case "initialPlacement":
340
+ n = o;
341
+ break;
342
+ }
343
+ if (r !== n) return { reset: { placement: n } };
344
+ }
345
+ return {};
346
+ }
347
+ };
348
+ }, le = /*#__PURE__*/ new Set(["left", "top"]);
349
+ async function ue(e, t) {
350
+ let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = b(n), s = x(n), c = w(n) === "y", l = le.has(o) ? -1 : 1, u = a && c ? -1 : 1, d = y(t, e), { mainAxis: f, crossAxis: p, alignmentAxis: m } = typeof d == "number" ? {
351
+ mainAxis: d,
352
+ crossAxis: 0,
353
+ alignmentAxis: null
354
+ } : {
355
+ mainAxis: d.mainAxis || 0,
356
+ crossAxis: d.crossAxis || 0,
357
+ alignmentAxis: d.alignmentAxis
358
+ };
359
+ return s && typeof m == "number" && (p = s === "end" ? m * -1 : m), c ? {
360
+ x: p * u,
361
+ y: f * l
362
+ } : {
363
+ x: f * l,
364
+ y: p * u
365
+ };
366
+ }
367
+ var de = function(e) {
368
+ return e === void 0 && (e = 0), {
369
+ name: "offset",
370
+ options: e,
371
+ async fn(t) {
372
+ var n;
373
+ let { x: r, y: i, placement: a, middlewareData: o } = t, s = await ue(t, e);
374
+ return a === o.offset?.placement && (n = o.arrow) != null && n.alignmentOffset ? {} : {
375
+ x: r + s.x,
376
+ y: i + s.y,
377
+ data: {
378
+ ...s,
379
+ placement: a
380
+ }
381
+ };
382
+ }
383
+ };
384
+ }, fe = function(e) {
385
+ return e === void 0 && (e = {}), {
386
+ name: "shift",
387
+ options: e,
388
+ async fn(t) {
389
+ let { x: n, y: r, placement: i, platform: a } = t, { mainAxis: o = !0, crossAxis: s = !1, limiter: c = { fn: (e) => {
390
+ let { x: t, y: n } = e;
391
+ return {
392
+ x: t,
393
+ y: n
394
+ };
395
+ } }, ...l } = y(e, t), u = {
396
+ x: n,
397
+ y: r
398
+ }, d = await a.detectOverflow(t, l), f = w(b(i)), p = S(f), m = u[p], h = u[f];
399
+ if (o) {
400
+ let e = p === "y" ? "top" : "left", t = p === "y" ? "bottom" : "right", n = m + d[e], r = m - d[t];
401
+ m = v(n, m, r);
402
+ }
403
+ if (s) {
404
+ let e = f === "y" ? "top" : "left", t = f === "y" ? "bottom" : "right", n = h + d[e], r = h - d[t];
405
+ h = v(n, h, r);
406
+ }
407
+ let g = c.fn({
408
+ ...t,
409
+ [p]: m,
410
+ [f]: h
411
+ });
412
+ return {
413
+ ...g,
414
+ data: {
415
+ x: g.x - n,
416
+ y: g.y - r,
417
+ enabled: {
418
+ [p]: o,
419
+ [f]: s
420
+ }
421
+ }
422
+ };
423
+ }
424
+ };
425
+ }, pe = function(e) {
426
+ return e === void 0 && (e = {}), {
427
+ name: "size",
428
+ options: e,
429
+ async fn(t) {
430
+ var n, r;
431
+ let { placement: i, rects: a, platform: o, elements: s } = t, { apply: c = () => {}, ...l } = y(e, t), u = await o.detectOverflow(t, l), d = b(i), m = x(i), h = w(i) === "y", { width: g, height: _ } = a.floating, v, S;
432
+ d === "top" || d === "bottom" ? (v = d, S = m === (await (o.isRTL == null ? void 0 : o.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (S = d, v = m === "end" ? "top" : "bottom");
433
+ let C = _ - u.top - u.bottom, T = g - u.left - u.right, ee = f(_ - u[v], C), te = f(g - u[S], T), E = !t.middlewareData.shift, D = ee, O = te;
434
+ if ((n = t.middlewareData.shift) != null && n.enabled.x && (O = T), (r = t.middlewareData.shift) != null && r.enabled.y && (D = C), E && !m) {
435
+ let e = p(u.left, 0), t = p(u.right, 0), n = p(u.top, 0), r = p(u.bottom, 0);
436
+ h ? O = g - 2 * (e !== 0 || t !== 0 ? e + t : p(u.left, u.right)) : D = _ - 2 * (n !== 0 || r !== 0 ? n + r : p(u.top, u.bottom));
437
+ }
438
+ await c({
439
+ ...t,
440
+ availableWidth: O,
441
+ availableHeight: D
442
+ });
443
+ let k = await o.getDimensions(s.floating);
444
+ return g !== k.width || _ !== k.height ? { reset: { rects: !0 } } : {};
445
+ }
446
+ };
589
447
  };
590
- function ct() {
591
- return typeof window < "u";
592
- }
593
- function et(t) {
594
- return Bt(t) ? (t.nodeName || "").toLowerCase() : "#document";
595
- }
596
- function S(t) {
597
- var e;
598
- return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
599
- }
600
- function M(t) {
601
- var e;
602
- return (e = (Bt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
603
- }
604
- function Bt(t) {
605
- return ct() ? t instanceof Node || t instanceof S(t).Node : !1;
606
- }
607
- function k(t) {
608
- return ct() ? t instanceof Element || t instanceof S(t).Element : !1;
609
- }
610
- function _(t) {
611
- return ct() ? t instanceof HTMLElement || t instanceof S(t).HTMLElement : !1;
612
- }
613
- function Ct(t) {
614
- return !ct() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof S(t).ShadowRoot;
615
- }
616
- function it(t) {
617
- const {
618
- overflow: e,
619
- overflowX: o,
620
- overflowY: i,
621
- display: n
622
- } = B(t);
623
- return /auto|scroll|overlay|hidden|clip/.test(e + i + o) && !["inline", "contents"].includes(n);
624
- }
625
- function fe(t) {
626
- return ["table", "td", "th"].includes(et(t));
627
- }
628
- function ft(t) {
629
- return [":popover-open", ":modal"].some((e) => {
630
- try {
631
- return t.matches(e);
632
- } catch {
633
- return !1;
634
- }
635
- });
636
- }
637
- function pt(t) {
638
- const e = xt(), o = k(t) ? B(t) : t;
639
- return ["transform", "translate", "scale", "rotate", "perspective"].some((i) => o[i] ? o[i] !== "none" : !1) || (o.containerType ? o.containerType !== "normal" : !1) || !e && (o.backdropFilter ? o.backdropFilter !== "none" : !1) || !e && (o.filter ? o.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((i) => (o.willChange || "").includes(i)) || ["paint", "layout", "strict", "content"].some((i) => (o.contain || "").includes(i));
640
- }
641
- function pe(t) {
642
- let e = U(t);
643
- for (; _(e) && !Q(e); ) {
644
- if (pt(e))
645
- return e;
646
- if (ft(e))
647
- return null;
648
- e = U(e);
649
- }
650
- return null;
651
- }
652
- function xt() {
653
- return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
654
- }
655
- function Q(t) {
656
- return ["html", "body", "#document"].includes(et(t));
657
- }
658
- function B(t) {
659
- return S(t).getComputedStyle(t);
660
- }
661
- function ut(t) {
662
- return k(t) ? {
663
- scrollLeft: t.scrollLeft,
664
- scrollTop: t.scrollTop
665
- } : {
666
- scrollLeft: t.scrollX,
667
- scrollTop: t.scrollY
668
- };
669
- }
670
- function U(t) {
671
- if (et(t) === "html")
672
- return t;
673
- const e = (
674
- // Step into the shadow DOM of the parent of a slotted node.
675
- t.assignedSlot || // DOM Element detected.
676
- t.parentNode || // ShadowRoot detected.
677
- Ct(t) && t.host || // Fallback.
678
- M(t)
679
- );
680
- return Ct(e) ? e.host : e;
681
- }
682
- function Dt(t) {
683
- const e = U(t);
684
- return Q(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : _(e) && it(e) ? e : Dt(e);
685
- }
686
- function ot(t, e, o) {
687
- var i;
688
- e === void 0 && (e = []), o === void 0 && (o = !0);
689
- const n = Dt(t), s = n === ((i = t.ownerDocument) == null ? void 0 : i.body), r = S(n);
690
- if (s) {
691
- const l = yt(r);
692
- return e.concat(r, r.visualViewport || [], it(n) ? n : [], l && o ? ot(l) : []);
693
- }
694
- return e.concat(n, ot(n, [], o));
695
- }
696
- function yt(t) {
697
- return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
698
- }
699
- function Ft(t) {
700
- const e = B(t);
701
- let o = parseFloat(e.width) || 0, i = parseFloat(e.height) || 0;
702
- const n = _(t), s = n ? t.offsetWidth : o, r = n ? t.offsetHeight : i, l = st(o) !== s || st(i) !== r;
703
- return l && (o = s, i = r), {
704
- width: o,
705
- height: i,
706
- $: l
707
- };
708
- }
709
- function Pt(t) {
710
- return k(t) ? t : t.contextElement;
711
- }
712
- function J(t) {
713
- const e = Pt(t);
714
- if (!_(e))
715
- return N(1);
716
- const o = e.getBoundingClientRect(), {
717
- width: i,
718
- height: n,
719
- $: s
720
- } = Ft(e);
721
- let r = (s ? st(o.width) : o.width) / i, l = (s ? st(o.height) : o.height) / n;
722
- return (!r || !Number.isFinite(r)) && (r = 1), (!l || !Number.isFinite(l)) && (l = 1), {
723
- x: r,
724
- y: l
725
- };
726
- }
727
- const ue = /* @__PURE__ */ N(0);
728
- function Nt(t) {
729
- const e = S(t);
730
- return !xt() || !e.visualViewport ? ue : {
731
- x: e.visualViewport.offsetLeft,
732
- y: e.visualViewport.offsetTop
733
- };
734
- }
735
- function he(t, e, o) {
736
- return e === void 0 && (e = !1), !o || e && o !== S(t) ? !1 : e;
737
- }
738
- function G(t, e, o, i) {
739
- e === void 0 && (e = !1), o === void 0 && (o = !1);
740
- const n = t.getBoundingClientRect(), s = Pt(t);
741
- let r = N(1);
742
- e && (i ? k(i) && (r = J(i)) : r = J(t));
743
- const l = he(s, o, i) ? Nt(s) : N(0);
744
- let a = (n.left + l.x) / r.x, c = (n.top + l.y) / r.y, f = n.width / r.x, u = n.height / r.y;
745
- if (s) {
746
- const d = S(s), p = i && k(i) ? S(i) : i;
747
- let h = d, g = yt(h);
748
- for (; g && i && p !== h; ) {
749
- const y = J(g), m = g.getBoundingClientRect(), w = B(g), b = m.left + (g.clientLeft + parseFloat(w.paddingLeft)) * y.x, R = m.top + (g.clientTop + parseFloat(w.paddingTop)) * y.y;
750
- a *= y.x, c *= y.y, f *= y.x, u *= y.y, a += b, c += R, h = S(g), g = yt(h);
751
- }
752
- }
753
- return at({
754
- width: f,
755
- height: u,
756
- x: a,
757
- y: c
758
- });
759
- }
760
- function At(t, e) {
761
- const o = ut(t).scrollLeft;
762
- return e ? e.left + o : G(M(t)).left + o;
763
- }
764
- function _t(t, e, o) {
765
- o === void 0 && (o = !1);
766
- const i = t.getBoundingClientRect(), n = i.left + e.scrollLeft - (o ? 0 : (
767
- // RTL <body> scrollbar.
768
- At(t, i)
769
- )), s = i.top + e.scrollTop;
770
- return {
771
- x: n,
772
- y: s
773
- };
774
- }
775
- function de(t) {
776
- let {
777
- elements: e,
778
- rect: o,
779
- offsetParent: i,
780
- strategy: n
781
- } = t;
782
- const s = n === "fixed", r = M(i), l = e ? ft(e.floating) : !1;
783
- if (i === r || l && s)
784
- return o;
785
- let a = {
786
- scrollLeft: 0,
787
- scrollTop: 0
788
- }, c = N(1);
789
- const f = N(0), u = _(i);
790
- if ((u || !u && !s) && ((et(i) !== "body" || it(r)) && (a = ut(i)), _(i))) {
791
- const p = G(i);
792
- c = J(i), f.x = p.x + i.clientLeft, f.y = p.y + i.clientTop;
793
- }
794
- const d = r && !u && !s ? _t(r, a, !0) : N(0);
795
- return {
796
- width: o.width * c.x,
797
- height: o.height * c.y,
798
- x: o.x * c.x - a.scrollLeft * c.x + f.x + d.x,
799
- y: o.y * c.y - a.scrollTop * c.y + f.y + d.y
800
- };
801
- }
802
- function ge(t) {
803
- return Array.from(t.getClientRects());
804
- }
805
- function me(t) {
806
- const e = M(t), o = ut(t), i = t.ownerDocument.body, n = C(e.scrollWidth, e.clientWidth, i.scrollWidth, i.clientWidth), s = C(e.scrollHeight, e.clientHeight, i.scrollHeight, i.clientHeight);
807
- let r = -o.scrollLeft + At(t);
808
- const l = -o.scrollTop;
809
- return B(i).direction === "rtl" && (r += C(e.clientWidth, i.clientWidth) - n), {
810
- width: n,
811
- height: s,
812
- x: r,
813
- y: l
814
- };
815
- }
816
- function ye(t, e) {
817
- const o = S(t), i = M(t), n = o.visualViewport;
818
- let s = i.clientWidth, r = i.clientHeight, l = 0, a = 0;
819
- if (n) {
820
- s = n.width, r = n.height;
821
- const c = xt();
822
- (!c || c && e === "fixed") && (l = n.offsetLeft, a = n.offsetTop);
823
- }
824
- return {
825
- width: s,
826
- height: r,
827
- x: l,
828
- y: a
829
- };
830
- }
831
- function we(t, e) {
832
- const o = G(t, !0, e === "fixed"), i = o.top + t.clientTop, n = o.left + t.clientLeft, s = _(t) ? J(t) : N(1), r = t.clientWidth * s.x, l = t.clientHeight * s.y, a = n * s.x, c = i * s.y;
833
- return {
834
- width: r,
835
- height: l,
836
- x: a,
837
- y: c
838
- };
839
- }
840
- function St(t, e, o) {
841
- let i;
842
- if (e === "viewport")
843
- i = ye(t, o);
844
- else if (e === "document")
845
- i = me(M(t));
846
- else if (k(e))
847
- i = we(e, o);
848
- else {
849
- const n = Nt(t);
850
- i = {
851
- x: e.x - n.x,
852
- y: e.y - n.y,
853
- width: e.width,
854
- height: e.height
855
- };
856
- }
857
- return at(i);
858
- }
859
- function Mt(t, e) {
860
- const o = U(t);
861
- return o === e || !k(o) || Q(o) ? !1 : B(o).position === "fixed" || Mt(o, e);
862
- }
863
- function be(t, e) {
864
- const o = e.get(t);
865
- if (o)
866
- return o;
867
- let i = ot(t, [], !1).filter((l) => k(l) && et(l) !== "body"), n = null;
868
- const s = B(t).position === "fixed";
869
- let r = s ? U(t) : t;
870
- for (; k(r) && !Q(r); ) {
871
- const l = B(r), a = pt(r);
872
- !a && l.position === "fixed" && (n = null), (s ? !a && !n : !a && l.position === "static" && !!n && ["absolute", "fixed"].includes(n.position) || it(r) && !a && Mt(t, r)) ? i = i.filter((f) => f !== r) : n = l, r = U(r);
873
- }
874
- return e.set(t, i), i;
875
- }
876
- function ve(t) {
877
- let {
878
- element: e,
879
- boundary: o,
880
- rootBoundary: i,
881
- strategy: n
882
- } = t;
883
- const r = [...o === "clippingAncestors" ? ft(e) ? [] : be(e, this._c) : [].concat(o), i], l = r[0], a = r.reduce((c, f) => {
884
- const u = St(e, f, n);
885
- return c.top = C(u.top, c.top), c.right = X(u.right, c.right), c.bottom = X(u.bottom, c.bottom), c.left = C(u.left, c.left), c;
886
- }, St(e, l, n));
887
- return {
888
- width: a.right - a.left,
889
- height: a.bottom - a.top,
890
- x: a.left,
891
- y: a.top
892
- };
893
- }
894
- function xe(t) {
895
- const {
896
- width: e,
897
- height: o
898
- } = Ft(t);
899
- return {
900
- width: e,
901
- height: o
902
- };
903
- }
904
- function Pe(t, e, o) {
905
- const i = _(e), n = M(e), s = o === "fixed", r = G(t, !0, s, e);
906
- let l = {
907
- scrollLeft: 0,
908
- scrollTop: 0
909
- };
910
- const a = N(0);
911
- function c() {
912
- a.x = At(n);
913
- }
914
- if (i || !i && !s)
915
- if ((et(e) !== "body" || it(n)) && (l = ut(e)), i) {
916
- const p = G(e, !0, s, e);
917
- a.x = p.x + e.clientLeft, a.y = p.y + e.clientTop;
918
- } else n && c();
919
- s && !i && n && c();
920
- const f = n && !i && !s ? _t(n, l) : N(0), u = r.left + l.scrollLeft - a.x - f.x, d = r.top + l.scrollTop - a.y - f.y;
921
- return {
922
- x: u,
923
- y: d,
924
- width: r.width,
925
- height: r.height
926
- };
927
- }
928
- function ht(t) {
929
- return B(t).position === "static";
930
- }
931
- function zt(t, e) {
932
- if (!_(t) || B(t).position === "fixed")
933
- return null;
934
- if (e)
935
- return e(t);
936
- let o = t.offsetParent;
937
- return M(t) === o && (o = o.ownerDocument.body), o;
938
- }
939
- function Wt(t, e) {
940
- const o = S(t);
941
- if (ft(t))
942
- return o;
943
- if (!_(t)) {
944
- let n = U(t);
945
- for (; n && !Q(n); ) {
946
- if (k(n) && !ht(n))
947
- return n;
948
- n = U(n);
949
- }
950
- return o;
951
- }
952
- let i = zt(t, e);
953
- for (; i && fe(i) && ht(i); )
954
- i = zt(i, e);
955
- return i && Q(i) && ht(i) && !pt(i) ? o : i || pe(t) || o;
956
- }
957
- const Ae = async function(t) {
958
- const e = this.getOffsetParent || Wt, o = this.getDimensions, i = await o(t.floating);
959
- return {
960
- reference: Pe(t.reference, await e(t.floating), t.strategy),
961
- floating: {
962
- x: 0,
963
- y: 0,
964
- width: i.width,
965
- height: i.height
966
- }
967
- };
448
+ //#endregion
449
+ //#region .pnpm/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
450
+ function I() {
451
+ return typeof window < "u";
452
+ }
453
+ function L(e) {
454
+ return me(e) ? (e.nodeName || "").toLowerCase() : "#document";
455
+ }
456
+ function R(e) {
457
+ var t;
458
+ return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
459
+ }
460
+ function z(e) {
461
+ return ((me(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
462
+ }
463
+ function me(e) {
464
+ return I() ? e instanceof Node || e instanceof R(e).Node : !1;
465
+ }
466
+ function B(e) {
467
+ return I() ? e instanceof Element || e instanceof R(e).Element : !1;
468
+ }
469
+ function V(e) {
470
+ return I() ? e instanceof HTMLElement || e instanceof R(e).HTMLElement : !1;
471
+ }
472
+ function he(e) {
473
+ return !I() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof R(e).ShadowRoot;
474
+ }
475
+ function H(e) {
476
+ let { overflow: t, overflowX: n, overflowY: r, display: i } = q(e);
477
+ return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && i !== "inline" && i !== "contents";
478
+ }
479
+ function ge(e) {
480
+ return /^(table|td|th)$/.test(L(e));
481
+ }
482
+ function U(e) {
483
+ try {
484
+ if (e.matches(":popover-open")) return !0;
485
+ } catch {}
486
+ try {
487
+ return e.matches(":modal");
488
+ } catch {
489
+ return !1;
490
+ }
491
+ }
492
+ var _e = /transform|translate|scale|rotate|perspective|filter/, ve = /paint|layout|strict|content/, W = (e) => !!e && e !== "none", ye;
493
+ function G(e) {
494
+ let t = B(e) ? q(e) : e;
495
+ return W(t.transform) || W(t.translate) || W(t.scale) || W(t.rotate) || W(t.perspective) || !xe() && (W(t.backdropFilter) || W(t.filter)) || _e.test(t.willChange || "") || ve.test(t.contain || "");
496
+ }
497
+ function be(e) {
498
+ let t = Y(e);
499
+ for (; V(t) && !K(t);) {
500
+ if (G(t)) return t;
501
+ if (U(t)) return null;
502
+ t = Y(t);
503
+ }
504
+ return null;
505
+ }
506
+ function xe() {
507
+ return ye ??= typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none"), ye;
508
+ }
509
+ function K(e) {
510
+ return /^(html|body|#document)$/.test(L(e));
511
+ }
512
+ function q(e) {
513
+ return R(e).getComputedStyle(e);
514
+ }
515
+ function J(e) {
516
+ return B(e) ? {
517
+ scrollLeft: e.scrollLeft,
518
+ scrollTop: e.scrollTop
519
+ } : {
520
+ scrollLeft: e.scrollX,
521
+ scrollTop: e.scrollY
522
+ };
523
+ }
524
+ function Y(e) {
525
+ if (L(e) === "html") return e;
526
+ let t = e.assignedSlot || e.parentNode || he(e) && e.host || z(e);
527
+ return he(t) ? t.host : t;
528
+ }
529
+ function Se(e) {
530
+ let t = Y(e);
531
+ return K(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : V(t) && H(t) ? t : Se(t);
532
+ }
533
+ function X(e, t, n) {
534
+ t === void 0 && (t = []), n === void 0 && (n = !0);
535
+ let r = Se(e), i = r === e.ownerDocument?.body, a = R(r);
536
+ if (i) {
537
+ let e = Ce(a);
538
+ return t.concat(a, a.visualViewport || [], H(r) ? r : [], e && n ? X(e) : []);
539
+ } else return t.concat(r, X(r, [], n));
540
+ }
541
+ function Ce(e) {
542
+ return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
543
+ }
544
+ //#endregion
545
+ //#region .pnpm/@floating-ui+dom@1.7.6/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
546
+ function we(e) {
547
+ let t = q(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = V(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = m(n) !== a || m(r) !== o;
548
+ return s && (n = a, r = o), {
549
+ width: n,
550
+ height: r,
551
+ $: s
552
+ };
553
+ }
554
+ function Te(e) {
555
+ return B(e) ? e : e.contextElement;
556
+ }
557
+ function Z(e) {
558
+ let t = Te(e);
559
+ if (!V(t)) return g(1);
560
+ let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = we(t), o = (a ? m(n.width) : n.width) / r, s = (a ? m(n.height) : n.height) / i;
561
+ return (!o || !Number.isFinite(o)) && (o = 1), (!s || !Number.isFinite(s)) && (s = 1), {
562
+ x: o,
563
+ y: s
564
+ };
565
+ }
566
+ var Ee = /*#__PURE__*/ g(0);
567
+ function De(e) {
568
+ let t = R(e);
569
+ return !xe() || !t.visualViewport ? Ee : {
570
+ x: t.visualViewport.offsetLeft,
571
+ y: t.visualViewport.offsetTop
572
+ };
573
+ }
574
+ function Oe(e, t, n) {
575
+ return t === void 0 && (t = !1), !n || t && n !== R(e) ? !1 : t;
576
+ }
577
+ function Q(e, t, n, r) {
578
+ t === void 0 && (t = !1), n === void 0 && (n = !1);
579
+ let i = e.getBoundingClientRect(), a = Te(e), o = g(1);
580
+ t && (r ? B(r) && (o = Z(r)) : o = Z(e));
581
+ let s = Oe(a, n, r) ? De(a) : g(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
582
+ if (a) {
583
+ let e = R(a), t = r && B(r) ? R(r) : r, n = e, i = Ce(n);
584
+ for (; i && r && t !== n;) {
585
+ let e = Z(i), t = i.getBoundingClientRect(), r = q(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
586
+ c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = R(i), i = Ce(n);
587
+ }
588
+ }
589
+ return N({
590
+ width: u,
591
+ height: d,
592
+ x: c,
593
+ y: l
594
+ });
595
+ }
596
+ function ke(e, t) {
597
+ let n = J(e).scrollLeft;
598
+ return t ? t.left + n : Q(z(e)).left + n;
599
+ }
600
+ function Ae(e, t) {
601
+ let n = e.getBoundingClientRect();
602
+ return {
603
+ x: n.left + t.scrollLeft - ke(e, n),
604
+ y: n.top + t.scrollTop
605
+ };
606
+ }
607
+ function je(e) {
608
+ let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = z(r), s = t ? U(t.floating) : !1;
609
+ if (r === o || s && a) return n;
610
+ let c = {
611
+ scrollLeft: 0,
612
+ scrollTop: 0
613
+ }, l = g(1), u = g(0), d = V(r);
614
+ if ((d || !d && !a) && ((L(r) !== "body" || H(o)) && (c = J(r)), d)) {
615
+ let e = Q(r);
616
+ l = Z(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
617
+ }
618
+ let f = o && !d && !a ? Ae(o, c) : g(0);
619
+ return {
620
+ width: n.width * l.x,
621
+ height: n.height * l.y,
622
+ x: n.x * l.x - c.scrollLeft * l.x + u.x + f.x,
623
+ y: n.y * l.y - c.scrollTop * l.y + u.y + f.y
624
+ };
625
+ }
626
+ function Me(e) {
627
+ return Array.from(e.getClientRects());
628
+ }
629
+ function Ne(e) {
630
+ let t = z(e), n = J(e), r = e.ownerDocument.body, i = p(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), a = p(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight), o = -n.scrollLeft + ke(e), s = -n.scrollTop;
631
+ return q(r).direction === "rtl" && (o += p(t.clientWidth, r.clientWidth) - i), {
632
+ width: i,
633
+ height: a,
634
+ x: o,
635
+ y: s
636
+ };
637
+ }
638
+ var Pe = 25;
639
+ function Fe(e, t) {
640
+ let n = R(e), r = z(e), i = n.visualViewport, a = r.clientWidth, o = r.clientHeight, s = 0, c = 0;
641
+ if (i) {
642
+ a = i.width, o = i.height;
643
+ let e = xe();
644
+ (!e || e && t === "fixed") && (s = i.offsetLeft, c = i.offsetTop);
645
+ }
646
+ let l = ke(r);
647
+ if (l <= 0) {
648
+ let e = r.ownerDocument, t = e.body, n = getComputedStyle(t), i = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, o = Math.abs(r.clientWidth - t.clientWidth - i);
649
+ o <= Pe && (a -= o);
650
+ } else l <= Pe && (a += l);
651
+ return {
652
+ width: a,
653
+ height: o,
654
+ x: s,
655
+ y: c
656
+ };
657
+ }
658
+ function Ie(e, t) {
659
+ let n = Q(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = V(e) ? Z(e) : g(1);
660
+ return {
661
+ width: e.clientWidth * a.x,
662
+ height: e.clientHeight * a.y,
663
+ x: i * a.x,
664
+ y: r * a.y
665
+ };
666
+ }
667
+ function Le(e, t, n) {
668
+ let r;
669
+ if (t === "viewport") r = Fe(e, n);
670
+ else if (t === "document") r = Ne(z(e));
671
+ else if (B(t)) r = Ie(t, n);
672
+ else {
673
+ let n = De(e);
674
+ r = {
675
+ x: t.x - n.x,
676
+ y: t.y - n.y,
677
+ width: t.width,
678
+ height: t.height
679
+ };
680
+ }
681
+ return N(r);
682
+ }
683
+ function Re(e, t) {
684
+ let n = Y(e);
685
+ return n === t || !B(n) || K(n) ? !1 : q(n).position === "fixed" || Re(n, t);
686
+ }
687
+ function ze(e, t) {
688
+ let n = t.get(e);
689
+ if (n) return n;
690
+ let r = X(e, [], !1).filter((e) => B(e) && L(e) !== "body"), i = null, a = q(e).position === "fixed", o = a ? Y(e) : e;
691
+ for (; B(o) && !K(o);) {
692
+ let t = q(o), n = G(o);
693
+ !n && t.position === "fixed" && (i = null), (a ? !n && !i : !n && t.position === "static" && i && (i.position === "absolute" || i.position === "fixed") || H(o) && !n && Re(e, o)) ? r = r.filter((e) => e !== o) : i = t, o = Y(o);
694
+ }
695
+ return t.set(e, r), r;
696
+ }
697
+ function Be(e) {
698
+ let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? U(t) ? [] : ze(t, this._c) : [].concat(n), r], o = Le(t, a[0], i), s = o.top, c = o.right, l = o.bottom, u = o.left;
699
+ for (let e = 1; e < a.length; e++) {
700
+ let n = Le(t, a[e], i);
701
+ s = p(n.top, s), c = f(n.right, c), l = f(n.bottom, l), u = p(n.left, u);
702
+ }
703
+ return {
704
+ width: c - u,
705
+ height: l - s,
706
+ x: u,
707
+ y: s
708
+ };
709
+ }
710
+ function Ve(e) {
711
+ let { width: t, height: n } = we(e);
712
+ return {
713
+ width: t,
714
+ height: n
715
+ };
716
+ }
717
+ function He(e, t, n) {
718
+ let r = V(t), i = z(t), a = n === "fixed", o = Q(e, !0, a, t), s = {
719
+ scrollLeft: 0,
720
+ scrollTop: 0
721
+ }, c = g(0);
722
+ function l() {
723
+ c.x = ke(i);
724
+ }
725
+ if (r || !r && !a) if ((L(t) !== "body" || H(i)) && (s = J(t)), r) {
726
+ let e = Q(t, !0, a, t);
727
+ c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
728
+ } else i && l();
729
+ a && !r && i && l();
730
+ let u = i && !r && !a ? Ae(i, s) : g(0);
731
+ return {
732
+ x: o.left + s.scrollLeft - c.x - u.x,
733
+ y: o.top + s.scrollTop - c.y - u.y,
734
+ width: o.width,
735
+ height: o.height
736
+ };
737
+ }
738
+ function Ue(e) {
739
+ return q(e).position === "static";
740
+ }
741
+ function We(e, t) {
742
+ if (!V(e) || q(e).position === "fixed") return null;
743
+ if (t) return t(e);
744
+ let n = e.offsetParent;
745
+ return z(e) === n && (n = n.ownerDocument.body), n;
746
+ }
747
+ function Ge(e, t) {
748
+ let n = R(e);
749
+ if (U(e)) return n;
750
+ if (!V(e)) {
751
+ let t = Y(e);
752
+ for (; t && !K(t);) {
753
+ if (B(t) && !Ue(t)) return t;
754
+ t = Y(t);
755
+ }
756
+ return n;
757
+ }
758
+ let r = We(e, t);
759
+ for (; r && ge(r) && Ue(r);) r = We(r, t);
760
+ return r && K(r) && Ue(r) && !G(r) ? n : r || be(e) || n;
761
+ }
762
+ var Ke = async function(e) {
763
+ let t = this.getOffsetParent || Ge, n = this.getDimensions, r = await n(e.floating);
764
+ return {
765
+ reference: He(e.reference, await t(e.floating), e.strategy),
766
+ floating: {
767
+ x: 0,
768
+ y: 0,
769
+ width: r.width,
770
+ height: r.height
771
+ }
772
+ };
968
773
  };
969
- function Re(t) {
970
- return B(t).direction === "rtl";
971
- }
972
- const rt = {
973
- convertOffsetParentRelativeRectToViewportRelativeRect: de,
974
- getDocumentElement: M,
975
- getClippingRect: ve,
976
- getOffsetParent: Wt,
977
- getElementRects: Ae,
978
- getClientRects: ge,
979
- getDimensions: xe,
980
- getScale: J,
981
- isElement: k,
982
- isRTL: Re
774
+ function qe(e) {
775
+ return q(e).direction === "rtl";
776
+ }
777
+ var Je = {
778
+ convertOffsetParentRelativeRectToViewportRelativeRect: je,
779
+ getDocumentElement: z,
780
+ getClippingRect: Be,
781
+ getOffsetParent: Ge,
782
+ getElementRects: Ke,
783
+ getClientRects: Me,
784
+ getDimensions: Ve,
785
+ getScale: Z,
786
+ isElement: B,
787
+ isRTL: qe
983
788
  };
984
- function Ht(t, e) {
985
- return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
986
- }
987
- function Ee(t, e) {
988
- let o = null, i;
989
- const n = M(t);
990
- function s() {
991
- var l;
992
- clearTimeout(i), (l = o) == null || l.disconnect(), o = null;
993
- }
994
- function r(l, a) {
995
- l === void 0 && (l = !1), a === void 0 && (a = 1), s();
996
- const c = t.getBoundingClientRect(), {
997
- left: f,
998
- top: u,
999
- width: d,
1000
- height: p
1001
- } = c;
1002
- if (l || e(), !d || !p)
1003
- return;
1004
- const h = nt(u), g = nt(n.clientWidth - (f + d)), y = nt(n.clientHeight - (u + p)), m = nt(f), b = {
1005
- rootMargin: -h + "px " + -g + "px " + -y + "px " + -m + "px",
1006
- threshold: C(0, X(1, a)) || 1
1007
- };
1008
- let R = !0;
1009
- function P(L) {
1010
- const E = L[0].intersectionRatio;
1011
- if (E !== a) {
1012
- if (!R)
1013
- return r();
1014
- E ? r(!1, E) : i = setTimeout(() => {
1015
- r(!1, 1e-7);
1016
- }, 1e3);
1017
- }
1018
- E === 1 && !Ht(c, t.getBoundingClientRect()) && r(), R = !1;
1019
- }
1020
- try {
1021
- o = new IntersectionObserver(P, {
1022
- ...b,
1023
- // Handle <iframe>s
1024
- root: n.ownerDocument
1025
- });
1026
- } catch {
1027
- o = new IntersectionObserver(P, b);
1028
- }
1029
- o.observe(t);
1030
- }
1031
- return r(!0), s;
1032
- }
1033
- function Oe(t, e, o, i) {
1034
- i === void 0 && (i = {});
1035
- const {
1036
- ancestorScroll: n = !0,
1037
- ancestorResize: s = !0,
1038
- elementResize: r = typeof ResizeObserver == "function",
1039
- layoutShift: l = typeof IntersectionObserver == "function",
1040
- animationFrame: a = !1
1041
- } = i, c = Pt(t), f = n || s ? [...c ? ot(c) : [], ...ot(e)] : [];
1042
- f.forEach((m) => {
1043
- n && m.addEventListener("scroll", o, {
1044
- passive: !0
1045
- }), s && m.addEventListener("resize", o);
1046
- });
1047
- const u = c && l ? Ee(c, o) : null;
1048
- let d = -1, p = null;
1049
- r && (p = new ResizeObserver((m) => {
1050
- let [w] = m;
1051
- w && w.target === c && p && (p.unobserve(e), cancelAnimationFrame(d), d = requestAnimationFrame(() => {
1052
- var b;
1053
- (b = p) == null || b.observe(e);
1054
- })), o();
1055
- }), c && !a && p.observe(c), p.observe(e));
1056
- let h, g = a ? G(t) : null;
1057
- a && y();
1058
- function y() {
1059
- const m = G(t);
1060
- g && !Ht(g, m) && o(), g = m, h = requestAnimationFrame(y);
1061
- }
1062
- return o(), () => {
1063
- var m;
1064
- f.forEach((w) => {
1065
- n && w.removeEventListener("scroll", o), s && w.removeEventListener("resize", o);
1066
- }), u?.(), (m = p) == null || m.disconnect(), p = null, a && cancelAnimationFrame(h);
1067
- };
1068
- }
1069
- const Ce = le, Se = ae, ze = re, Lt = ce, Le = ne, Te = (t, e, o) => {
1070
- const i = /* @__PURE__ */ new Map(), n = {
1071
- platform: rt,
1072
- ...o
1073
- }, s = {
1074
- ...n.platform,
1075
- _c: i
1076
- };
1077
- return ie(t, e, {
1078
- ...n,
1079
- platform: s
1080
- });
789
+ function Ye(e, t) {
790
+ return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
791
+ }
792
+ function Xe(e, t) {
793
+ let n = null, r, i = z(e);
794
+ function a() {
795
+ var e;
796
+ clearTimeout(r), (e = n) == null || e.disconnect(), n = null;
797
+ }
798
+ function o(s, c) {
799
+ s === void 0 && (s = !1), c === void 0 && (c = 1), a();
800
+ let l = e.getBoundingClientRect(), { left: u, top: d, width: m, height: g } = l;
801
+ if (s || t(), !m || !g) return;
802
+ let _ = h(d), v = h(i.clientWidth - (u + m)), y = h(i.clientHeight - (d + g)), b = h(u), x = {
803
+ rootMargin: -_ + "px " + -v + "px " + -y + "px " + -b + "px",
804
+ threshold: p(0, f(1, c)) || 1
805
+ }, S = !0;
806
+ function C(t) {
807
+ let n = t[0].intersectionRatio;
808
+ if (n !== c) {
809
+ if (!S) return o();
810
+ n ? o(!1, n) : r = setTimeout(() => {
811
+ o(!1, 1e-7);
812
+ }, 1e3);
813
+ }
814
+ n === 1 && !Ye(l, e.getBoundingClientRect()) && o(), S = !1;
815
+ }
816
+ try {
817
+ n = new IntersectionObserver(C, {
818
+ ...x,
819
+ root: i.ownerDocument
820
+ });
821
+ } catch {
822
+ n = new IntersectionObserver(C, x);
823
+ }
824
+ n.observe(e);
825
+ }
826
+ return o(!0), a;
827
+ }
828
+ function Ze(e, t, n, r) {
829
+ r === void 0 && (r = {});
830
+ let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = Te(e), u = i || a ? [...l ? X(l) : [], ...t ? X(t) : []] : [];
831
+ u.forEach((e) => {
832
+ i && e.addEventListener("scroll", n, { passive: !0 }), a && e.addEventListener("resize", n);
833
+ });
834
+ let d = l && s ? Xe(l, n) : null, f = -1, p = null;
835
+ o && (p = new ResizeObserver((e) => {
836
+ let [r] = e;
837
+ r && r.target === l && p && t && (p.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
838
+ var e;
839
+ (e = p) == null || e.observe(t);
840
+ })), n();
841
+ }), l && !c && p.observe(l), t && p.observe(t));
842
+ let m, h = c ? Q(e) : null;
843
+ c && g();
844
+ function g() {
845
+ let t = Q(e);
846
+ h && !Ye(h, t) && n(), h = t, m = requestAnimationFrame(g);
847
+ }
848
+ return n(), () => {
849
+ var e;
850
+ u.forEach((e) => {
851
+ i && e.removeEventListener("scroll", n), a && e.removeEventListener("resize", n);
852
+ }), d?.(), (e = p) == null || e.disconnect(), p = null, c && cancelAnimationFrame(m);
853
+ };
854
+ }
855
+ var Qe = de, $e = fe, et = ce, tt = pe, nt = se, rt = (e, t, n) => {
856
+ let r = /* @__PURE__ */ new Map(), i = {
857
+ platform: Je,
858
+ ...n
859
+ }, a = {
860
+ ...i.platform,
861
+ _c: r
862
+ };
863
+ return oe(e, t, {
864
+ ...i,
865
+ platform: a
866
+ });
1081
867
  };
1082
- function $e(t) {
1083
- return ke(t);
1084
- }
1085
- function dt(t) {
1086
- return t.assignedSlot ? t.assignedSlot : t.parentNode instanceof ShadowRoot ? t.parentNode.host : t.parentNode;
1087
- }
1088
- function ke(t) {
1089
- for (let e = t; e; e = dt(e)) if (e instanceof Element && getComputedStyle(e).display === "none") return null;
1090
- for (let e = dt(t); e; e = dt(e)) {
1091
- if (!(e instanceof Element)) continue;
1092
- const o = getComputedStyle(e);
1093
- if (o.display !== "contents" && (o.position !== "static" || pt(o) || e.tagName === "BODY"))
1094
- return e;
1095
- }
1096
- return null;
1097
- }
1098
- function Be(t) {
1099
- return t !== null && typeof t == "object" && "getBoundingClientRect" in t && ("contextElement" in t ? t.contextElement instanceof Element : !0);
1100
- }
1101
- var v = class extends Xt {
1102
- constructor() {
1103
- super(...arguments), this.localize = new Yt(this), this.active = !1, this.placement = "top", this.strategy = "absolute", this.distance = 0, this.skidding = 0, this.arrow = !1, this.arrowPlacement = "anchor", this.arrowPadding = 10, this.flip = !1, this.flipFallbackPlacements = "", this.flipFallbackStrategy = "best-fit", this.flipPadding = 0, this.shift = !1, this.shiftPadding = 0, this.autoSizePadding = 0, this.hoverBridge = !1, this.updateHoverBridge = () => {
1104
- if (this.hoverBridge && this.anchorEl) {
1105
- const t = this.anchorEl.getBoundingClientRect(), e = this.popup.getBoundingClientRect(), o = this.placement.includes("top") || this.placement.includes("bottom");
1106
- let i = 0, n = 0, s = 0, r = 0, l = 0, a = 0, c = 0, f = 0;
1107
- o ? t.top < e.top ? (i = t.left, n = t.bottom, s = t.right, r = t.bottom, l = e.left, a = e.top, c = e.right, f = e.top) : (i = e.left, n = e.bottom, s = e.right, r = e.bottom, l = t.left, a = t.top, c = t.right, f = t.top) : t.left < e.left ? (i = t.right, n = t.top, s = e.left, r = e.top, l = t.right, a = t.bottom, c = e.left, f = e.bottom) : (i = e.right, n = e.top, s = t.left, r = t.top, l = e.right, a = e.bottom, c = t.left, f = t.bottom), this.style.setProperty("--hover-bridge-top-left-x", `${i}px`), this.style.setProperty("--hover-bridge-top-left-y", `${n}px`), this.style.setProperty("--hover-bridge-top-right-x", `${s}px`), this.style.setProperty("--hover-bridge-top-right-y", `${r}px`), this.style.setProperty("--hover-bridge-bottom-left-x", `${l}px`), this.style.setProperty("--hover-bridge-bottom-left-y", `${a}px`), this.style.setProperty("--hover-bridge-bottom-right-x", `${c}px`), this.style.setProperty("--hover-bridge-bottom-right-y", `${f}px`);
1108
- }
1109
- };
1110
- }
1111
- async connectedCallback() {
1112
- super.connectedCallback(), await this.updateComplete, this.start();
1113
- }
1114
- disconnectedCallback() {
1115
- super.disconnectedCallback(), this.stop();
1116
- }
1117
- async updated(t) {
1118
- super.updated(t), t.has("active") && (this.active ? this.start() : this.stop()), t.has("anchor") && this.handleAnchorChange(), this.active && (await this.updateComplete, this.reposition());
1119
- }
1120
- async handleAnchorChange() {
1121
- if (await this.stop(), this.anchor && typeof this.anchor == "string") {
1122
- const t = this.getRootNode();
1123
- this.anchorEl = t.getElementById(this.anchor);
1124
- } else this.anchor instanceof Element || Be(this.anchor) ? this.anchorEl = this.anchor : this.anchorEl = this.querySelector('[slot="anchor"]');
1125
- this.anchorEl instanceof HTMLSlotElement && (this.anchorEl = this.anchorEl.assignedElements({ flatten: !0 })[0]), this.anchorEl && this.active && this.start();
1126
- }
1127
- start() {
1128
- !this.anchorEl || !this.active || (this.cleanup = Oe(this.anchorEl, this.popup, () => {
1129
- this.reposition();
1130
- }));
1131
- }
1132
- async stop() {
1133
- return new Promise((t) => {
1134
- this.cleanup ? (this.cleanup(), this.cleanup = void 0, this.removeAttribute("data-current-placement"), this.style.removeProperty("--auto-size-available-width"), this.style.removeProperty("--auto-size-available-height"), requestAnimationFrame(() => t())) : t();
1135
- });
1136
- }
1137
- /** Forces the popup to recalculate and reposition itself. */
1138
- reposition() {
1139
- if (!this.active || !this.anchorEl)
1140
- return;
1141
- const t = [
1142
- // The offset middleware goes first
1143
- Ce({ mainAxis: this.distance, crossAxis: this.skidding })
1144
- ];
1145
- this.sync ? t.push(
1146
- Lt({
1147
- apply: ({ rects: o }) => {
1148
- const i = this.sync === "width" || this.sync === "both", n = this.sync === "height" || this.sync === "both";
1149
- this.popup.style.width = i ? `${o.reference.width}px` : "", this.popup.style.height = n ? `${o.reference.height}px` : "";
1150
- }
1151
- })
1152
- ) : (this.popup.style.width = "", this.popup.style.height = ""), this.flip && t.push(
1153
- ze({
1154
- boundary: this.flipBoundary,
1155
- // @ts-expect-error - We're converting a string attribute to an array here
1156
- fallbackPlacements: this.flipFallbackPlacements,
1157
- fallbackStrategy: this.flipFallbackStrategy === "best-fit" ? "bestFit" : "initialPlacement",
1158
- padding: this.flipPadding
1159
- })
1160
- ), this.shift && t.push(
1161
- Se({
1162
- boundary: this.shiftBoundary,
1163
- padding: this.shiftPadding
1164
- })
1165
- ), this.autoSize ? t.push(
1166
- Lt({
1167
- boundary: this.autoSizeBoundary,
1168
- padding: this.autoSizePadding,
1169
- apply: ({ availableWidth: o, availableHeight: i }) => {
1170
- this.autoSize === "vertical" || this.autoSize === "both" ? this.style.setProperty("--auto-size-available-height", `${i}px`) : this.style.removeProperty("--auto-size-available-height"), this.autoSize === "horizontal" || this.autoSize === "both" ? this.style.setProperty("--auto-size-available-width", `${o}px`) : this.style.removeProperty("--auto-size-available-width");
1171
- }
1172
- })
1173
- ) : (this.style.removeProperty("--auto-size-available-width"), this.style.removeProperty("--auto-size-available-height")), this.arrow && t.push(
1174
- Le({
1175
- element: this.arrowEl,
1176
- padding: this.arrowPadding
1177
- })
1178
- );
1179
- const e = this.strategy === "absolute" ? (o) => rt.getOffsetParent(o, $e) : rt.getOffsetParent;
1180
- Te(this.anchorEl, this.popup, {
1181
- placement: this.placement,
1182
- middleware: t,
1183
- strategy: this.strategy,
1184
- platform: qt(Ut({}, rt), {
1185
- getOffsetParent: e
1186
- })
1187
- }).then(({ x: o, y: i, middlewareData: n, placement: s }) => {
1188
- const r = this.localize.dir() === "rtl", l = { top: "bottom", right: "left", bottom: "top", left: "right" }[s.split("-")[0]];
1189
- if (this.setAttribute("data-current-placement", s), Object.assign(this.popup.style, {
1190
- left: `${o}px`,
1191
- top: `${i}px`
1192
- }), this.arrow) {
1193
- const a = n.arrow.x, c = n.arrow.y;
1194
- let f = "", u = "", d = "", p = "";
1195
- if (this.arrowPlacement === "start") {
1196
- const h = typeof a == "number" ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : "";
1197
- f = typeof c == "number" ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : "", u = r ? h : "", p = r ? "" : h;
1198
- } else if (this.arrowPlacement === "end") {
1199
- const h = typeof a == "number" ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : "";
1200
- u = r ? "" : h, p = r ? h : "", d = typeof c == "number" ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : "";
1201
- } else this.arrowPlacement === "center" ? (p = typeof a == "number" ? "calc(50% - var(--arrow-size-diagonal))" : "", f = typeof c == "number" ? "calc(50% - var(--arrow-size-diagonal))" : "") : (p = typeof a == "number" ? `${a}px` : "", f = typeof c == "number" ? `${c}px` : "");
1202
- Object.assign(this.arrowEl.style, {
1203
- top: f,
1204
- right: u,
1205
- bottom: d,
1206
- left: p,
1207
- [l]: "calc(var(--arrow-size-diagonal) * -1)"
1208
- });
1209
- }
1210
- }), requestAnimationFrame(() => this.updateHoverBridge()), this.emit("sl-reposition");
1211
- }
1212
- render() {
1213
- return Rt`
868
+ //#endregion
869
+ //#region .pnpm/composed-offset-position@0.0.6_@floating-ui+utils@0.2.11/node_modules/composed-offset-position/dist/composed-offset-position.browser.min.mjs
870
+ function it(e) {
871
+ return ot(e);
872
+ }
873
+ function at(e) {
874
+ return e.assignedSlot ? e.assignedSlot : e.parentNode instanceof ShadowRoot ? e.parentNode.host : e.parentNode;
875
+ }
876
+ function ot(e) {
877
+ for (let t = e; t; t = at(t)) if (t instanceof Element && getComputedStyle(t).display === "none") return null;
878
+ for (let t = at(e); t; t = at(t)) {
879
+ if (!(t instanceof Element)) continue;
880
+ let e = getComputedStyle(t);
881
+ if (e.display !== "contents" && (e.position !== "static" || G(e) || t.tagName === "BODY")) return t;
882
+ }
883
+ return null;
884
+ }
885
+ //#endregion
886
+ //#region .pnpm/@shoelace-style+shoelace@2.20.1_@floating-ui+utils@0.2.11_@types+react@19.2.15/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.5JY5FUCG.js
887
+ function st(e) {
888
+ return typeof e == "object" && !!e && "getBoundingClientRect" in e && ("contextElement" in e ? e.contextElement instanceof Element : !0);
889
+ }
890
+ var $ = class extends c {
891
+ constructor() {
892
+ super(...arguments), this.localize = new u(this), this.active = !1, this.placement = "top", this.strategy = "absolute", this.distance = 0, this.skidding = 0, this.arrow = !1, this.arrowPlacement = "anchor", this.arrowPadding = 10, this.flip = !1, this.flipFallbackPlacements = "", this.flipFallbackStrategy = "best-fit", this.flipPadding = 0, this.shift = !1, this.shiftPadding = 0, this.autoSizePadding = 0, this.hoverBridge = !1, this.updateHoverBridge = () => {
893
+ if (this.hoverBridge && this.anchorEl) {
894
+ let e = this.anchorEl.getBoundingClientRect(), t = this.popup.getBoundingClientRect(), n = this.placement.includes("top") || this.placement.includes("bottom"), r = 0, i = 0, a = 0, o = 0, s = 0, c = 0, l = 0, u = 0;
895
+ n ? e.top < t.top ? (r = e.left, i = e.bottom, a = e.right, o = e.bottom, s = t.left, c = t.top, l = t.right, u = t.top) : (r = t.left, i = t.bottom, a = t.right, o = t.bottom, s = e.left, c = e.top, l = e.right, u = e.top) : e.left < t.left ? (r = e.right, i = e.top, a = t.left, o = t.top, s = e.right, c = e.bottom, l = t.left, u = t.bottom) : (r = t.right, i = t.top, a = e.left, o = e.top, s = t.right, c = t.bottom, l = e.left, u = e.bottom), this.style.setProperty("--hover-bridge-top-left-x", `${r}px`), this.style.setProperty("--hover-bridge-top-left-y", `${i}px`), this.style.setProperty("--hover-bridge-top-right-x", `${a}px`), this.style.setProperty("--hover-bridge-top-right-y", `${o}px`), this.style.setProperty("--hover-bridge-bottom-left-x", `${s}px`), this.style.setProperty("--hover-bridge-bottom-left-y", `${c}px`), this.style.setProperty("--hover-bridge-bottom-right-x", `${l}px`), this.style.setProperty("--hover-bridge-bottom-right-y", `${u}px`);
896
+ }
897
+ };
898
+ }
899
+ async connectedCallback() {
900
+ super.connectedCallback(), await this.updateComplete, this.start();
901
+ }
902
+ disconnectedCallback() {
903
+ super.disconnectedCallback(), this.stop();
904
+ }
905
+ async updated(e) {
906
+ super.updated(e), e.has("active") && (this.active ? this.start() : this.stop()), e.has("anchor") && this.handleAnchorChange(), this.active && (await this.updateComplete, this.reposition());
907
+ }
908
+ async handleAnchorChange() {
909
+ if (await this.stop(), this.anchor && typeof this.anchor == "string") {
910
+ let e = this.getRootNode();
911
+ this.anchorEl = e.getElementById(this.anchor);
912
+ } else this.anchor instanceof Element || st(this.anchor) ? this.anchorEl = this.anchor : this.anchorEl = this.querySelector("[slot=\"anchor\"]");
913
+ this.anchorEl instanceof HTMLSlotElement && (this.anchorEl = this.anchorEl.assignedElements({ flatten: !0 })[0]), this.anchorEl && this.active && this.start();
914
+ }
915
+ start() {
916
+ !this.anchorEl || !this.active || (this.cleanup = Ze(this.anchorEl, this.popup, () => {
917
+ this.reposition();
918
+ }));
919
+ }
920
+ async stop() {
921
+ return new Promise((e) => {
922
+ this.cleanup ? (this.cleanup(), this.cleanup = void 0, this.removeAttribute("data-current-placement"), this.style.removeProperty("--auto-size-available-width"), this.style.removeProperty("--auto-size-available-height"), requestAnimationFrame(() => e())) : e();
923
+ });
924
+ }
925
+ reposition() {
926
+ if (!this.active || !this.anchorEl) return;
927
+ let e = [Qe({
928
+ mainAxis: this.distance,
929
+ crossAxis: this.skidding
930
+ })];
931
+ this.sync ? e.push(tt({ apply: ({ rects: e }) => {
932
+ let t = this.sync === "width" || this.sync === "both", n = this.sync === "height" || this.sync === "both";
933
+ this.popup.style.width = t ? `${e.reference.width}px` : "", this.popup.style.height = n ? `${e.reference.height}px` : "";
934
+ } })) : (this.popup.style.width = "", this.popup.style.height = ""), this.flip && e.push(et({
935
+ boundary: this.flipBoundary,
936
+ fallbackPlacements: this.flipFallbackPlacements,
937
+ fallbackStrategy: this.flipFallbackStrategy === "best-fit" ? "bestFit" : "initialPlacement",
938
+ padding: this.flipPadding
939
+ })), this.shift && e.push($e({
940
+ boundary: this.shiftBoundary,
941
+ padding: this.shiftPadding
942
+ })), this.autoSize ? e.push(tt({
943
+ boundary: this.autoSizeBoundary,
944
+ padding: this.autoSizePadding,
945
+ apply: ({ availableWidth: e, availableHeight: t }) => {
946
+ this.autoSize === "vertical" || this.autoSize === "both" ? this.style.setProperty("--auto-size-available-height", `${t}px`) : this.style.removeProperty("--auto-size-available-height"), this.autoSize === "horizontal" || this.autoSize === "both" ? this.style.setProperty("--auto-size-available-width", `${e}px`) : this.style.removeProperty("--auto-size-available-width");
947
+ }
948
+ })) : (this.style.removeProperty("--auto-size-available-width"), this.style.removeProperty("--auto-size-available-height")), this.arrow && e.push(nt({
949
+ element: this.arrowEl,
950
+ padding: this.arrowPadding
951
+ }));
952
+ let t = this.strategy === "absolute" ? (e) => Je.getOffsetParent(e, it) : Je.getOffsetParent;
953
+ rt(this.anchorEl, this.popup, {
954
+ placement: this.placement,
955
+ middleware: e,
956
+ strategy: this.strategy,
957
+ platform: a(i({}, Je), { getOffsetParent: t })
958
+ }).then(({ x: e, y: t, middlewareData: n, placement: r }) => {
959
+ let i = this.localize.dir() === "rtl", a = {
960
+ top: "bottom",
961
+ right: "left",
962
+ bottom: "top",
963
+ left: "right"
964
+ }[r.split("-")[0]];
965
+ if (this.setAttribute("data-current-placement", r), Object.assign(this.popup.style, {
966
+ left: `${e}px`,
967
+ top: `${t}px`
968
+ }), this.arrow) {
969
+ let e = n.arrow.x, t = n.arrow.y, r = "", o = "", s = "", c = "";
970
+ if (this.arrowPlacement === "start") {
971
+ let n = typeof e == "number" ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : "";
972
+ r = typeof t == "number" ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : "", o = i ? n : "", c = i ? "" : n;
973
+ } else if (this.arrowPlacement === "end") {
974
+ let n = typeof e == "number" ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : "";
975
+ o = i ? "" : n, c = i ? n : "", s = typeof t == "number" ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : "";
976
+ } else this.arrowPlacement === "center" ? (c = typeof e == "number" ? "calc(50% - var(--arrow-size-diagonal))" : "", r = typeof t == "number" ? "calc(50% - var(--arrow-size-diagonal))" : "") : (c = typeof e == "number" ? `${e}px` : "", r = typeof t == "number" ? `${t}px` : "");
977
+ Object.assign(this.arrowEl.style, {
978
+ top: r,
979
+ right: o,
980
+ bottom: s,
981
+ left: c,
982
+ [a]: "calc(var(--arrow-size-diagonal) * -1)"
983
+ });
984
+ }
985
+ }), requestAnimationFrame(() => this.updateHoverBridge()), this.emit("sl-reposition");
986
+ }
987
+ render() {
988
+ return e`
1214
989
  <slot name="anchor" @slotchange=${this.handleAnchorChange}></slot>
1215
990
 
1216
991
  <span
1217
992
  part="hover-bridge"
1218
- class=${Et({
1219
- "popup-hover-bridge": !0,
1220
- "popup-hover-bridge--visible": this.hoverBridge && this.active
1221
- })}
993
+ class=${l({
994
+ "popup-hover-bridge": !0,
995
+ "popup-hover-bridge--visible": this.hoverBridge && this.active
996
+ })}
1222
997
  ></span>
1223
998
 
1224
999
  <div
1225
1000
  part="popup"
1226
- class=${Et({
1227
- popup: !0,
1228
- "popup--active": this.active,
1229
- "popup--fixed": this.strategy === "fixed",
1230
- "popup--has-arrow": this.arrow
1231
- })}
1001
+ class=${l({
1002
+ popup: !0,
1003
+ "popup--active": this.active,
1004
+ "popup--fixed": this.strategy === "fixed",
1005
+ "popup--has-arrow": this.arrow
1006
+ })}
1232
1007
  >
1233
1008
  <slot></slot>
1234
- ${this.arrow ? Rt`<div part="arrow" class="popup__arrow" role="presentation"></div>` : ""}
1009
+ ${this.arrow ? e`<div part="arrow" class="popup__arrow" role="presentation"></div>` : ""}
1235
1010
  </div>
1236
1011
  `;
1237
- }
1238
- };
1239
- v.styles = [It, Kt];
1240
- x([
1241
- Tt(".popup")
1242
- ], v.prototype, "popup", 2);
1243
- x([
1244
- Tt(".popup__arrow")
1245
- ], v.prototype, "arrowEl", 2);
1246
- x([
1247
- A()
1248
- ], v.prototype, "anchor", 2);
1249
- x([
1250
- A({ type: Boolean, reflect: !0 })
1251
- ], v.prototype, "active", 2);
1252
- x([
1253
- A({ reflect: !0 })
1254
- ], v.prototype, "placement", 2);
1255
- x([
1256
- A({ reflect: !0 })
1257
- ], v.prototype, "strategy", 2);
1258
- x([
1259
- A({ type: Number })
1260
- ], v.prototype, "distance", 2);
1261
- x([
1262
- A({ type: Number })
1263
- ], v.prototype, "skidding", 2);
1264
- x([
1265
- A({ type: Boolean })
1266
- ], v.prototype, "arrow", 2);
1267
- x([
1268
- A({ attribute: "arrow-placement" })
1269
- ], v.prototype, "arrowPlacement", 2);
1270
- x([
1271
- A({ attribute: "arrow-padding", type: Number })
1272
- ], v.prototype, "arrowPadding", 2);
1273
- x([
1274
- A({ type: Boolean })
1275
- ], v.prototype, "flip", 2);
1276
- x([
1277
- A({
1278
- attribute: "flip-fallback-placements",
1279
- converter: {
1280
- fromAttribute: (t) => t.split(" ").map((e) => e.trim()).filter((e) => e !== ""),
1281
- toAttribute: (t) => t.join(" ")
1282
- }
1283
- })
1284
- ], v.prototype, "flipFallbackPlacements", 2);
1285
- x([
1286
- A({ attribute: "flip-fallback-strategy" })
1287
- ], v.prototype, "flipFallbackStrategy", 2);
1288
- x([
1289
- A({ type: Object })
1290
- ], v.prototype, "flipBoundary", 2);
1291
- x([
1292
- A({ attribute: "flip-padding", type: Number })
1293
- ], v.prototype, "flipPadding", 2);
1294
- x([
1295
- A({ type: Boolean })
1296
- ], v.prototype, "shift", 2);
1297
- x([
1298
- A({ type: Object })
1299
- ], v.prototype, "shiftBoundary", 2);
1300
- x([
1301
- A({ attribute: "shift-padding", type: Number })
1302
- ], v.prototype, "shiftPadding", 2);
1303
- x([
1304
- A({ attribute: "auto-size" })
1305
- ], v.prototype, "autoSize", 2);
1306
- x([
1307
- A()
1308
- ], v.prototype, "sync", 2);
1309
- x([
1310
- A({ type: Object })
1311
- ], v.prototype, "autoSizeBoundary", 2);
1312
- x([
1313
- A({ attribute: "auto-size-padding", type: Number })
1314
- ], v.prototype, "autoSizePadding", 2);
1315
- x([
1316
- A({ attribute: "hover-bridge", type: Boolean })
1317
- ], v.prototype, "hoverBridge", 2);
1318
- export {
1319
- v as S
1012
+ }
1320
1013
  };
1014
+ $.styles = [o, d], s([r(".popup")], $.prototype, "popup", 2), s([r(".popup__arrow")], $.prototype, "arrowEl", 2), s([n()], $.prototype, "anchor", 2), s([n({
1015
+ type: Boolean,
1016
+ reflect: !0
1017
+ })], $.prototype, "active", 2), s([n({ reflect: !0 })], $.prototype, "placement", 2), s([n({ reflect: !0 })], $.prototype, "strategy", 2), s([n({ type: Number })], $.prototype, "distance", 2), s([n({ type: Number })], $.prototype, "skidding", 2), s([n({ type: Boolean })], $.prototype, "arrow", 2), s([n({ attribute: "arrow-placement" })], $.prototype, "arrowPlacement", 2), s([n({
1018
+ attribute: "arrow-padding",
1019
+ type: Number
1020
+ })], $.prototype, "arrowPadding", 2), s([n({ type: Boolean })], $.prototype, "flip", 2), s([n({
1021
+ attribute: "flip-fallback-placements",
1022
+ converter: {
1023
+ fromAttribute: (e) => e.split(" ").map((e) => e.trim()).filter((e) => e !== ""),
1024
+ toAttribute: (e) => e.join(" ")
1025
+ }
1026
+ })], $.prototype, "flipFallbackPlacements", 2), s([n({ attribute: "flip-fallback-strategy" })], $.prototype, "flipFallbackStrategy", 2), s([n({ type: Object })], $.prototype, "flipBoundary", 2), s([n({
1027
+ attribute: "flip-padding",
1028
+ type: Number
1029
+ })], $.prototype, "flipPadding", 2), s([n({ type: Boolean })], $.prototype, "shift", 2), s([n({ type: Object })], $.prototype, "shiftBoundary", 2), s([n({
1030
+ attribute: "shift-padding",
1031
+ type: Number
1032
+ })], $.prototype, "shiftPadding", 2), s([n({ attribute: "auto-size" })], $.prototype, "autoSize", 2), s([n()], $.prototype, "sync", 2), s([n({ type: Object })], $.prototype, "autoSizeBoundary", 2), s([n({
1033
+ attribute: "auto-size-padding",
1034
+ type: Number
1035
+ })], $.prototype, "autoSizePadding", 2), s([n({
1036
+ attribute: "hover-bridge",
1037
+ type: Boolean
1038
+ })], $.prototype, "hoverBridge", 2);
1039
+ //#endregion
1040
+ export { $ as t };