@vue-interface/btn-dropdown 2.0.0-beta.4 → 2.0.0-beta.6

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.
@@ -1,13 +1,13 @@
1
- import { defineComponent as Mt, openBlock as W, createBlock as ee, resolveDynamicComponent as He, mergeProps as me, withCtx as B, renderSlot as P, createTextVNode as ge, toDisplayString as be, createElementBlock as Ue, normalizeClass as F, h as It, Fragment as Lt, resolveComponent as te, createVNode as ye, normalizeProps as ie, createCommentVNode as de, guardReactiveProps as Re, withKeys as bt, withModifiers as yt, normalizeStyle as Vt, createSlots as qt } from "vue";
2
- var R = "top", N = "bottom", M = "right", j = "left", Te = "auto", xe = [R, N, M, j], ae = "start", we = "end", Ft = "clippingParents", wt = "viewport", ce = "popper", Wt = "reference", st = /* @__PURE__ */ xe.reduce(function(e, t) {
3
- return e.concat([t + "-" + ae, t + "-" + we]);
4
- }, []), Ot = /* @__PURE__ */ [].concat(xe, [Te]).reduce(function(e, t) {
5
- return e.concat([t, t + "-" + ae, t + "-" + we]);
6
- }, []), Ht = "beforeRead", Ut = "read", Xt = "afterRead", Yt = "beforeMain", Kt = "main", Gt = "afterMain", Jt = "beforeWrite", Qt = "write", Zt = "afterWrite", qe = [Ht, Ut, Xt, Yt, Kt, Gt, Jt, Qt, Zt];
1
+ import { defineComponent as U, openBlock as W, createBlock as te, resolveDynamicComponent as Ue, mergeProps as me, withCtx as B, renderSlot as P, createTextVNode as be, toDisplayString as ye, createElementBlock as Xe, normalizeClass as F, h as Lt, Fragment as Vt, resolveComponent as re, createVNode as we, normalizeProps as ae, guardReactiveProps as Re, normalizeStyle as It, withKeys as yt, withModifiers as wt, createCommentVNode as ce, createSlots as qt } from "vue";
2
+ var R = "top", N = "bottom", M = "right", j = "left", Te = "auto", xe = [R, N, M, j], se = "start", Oe = "end", Ft = "clippingParents", Ot = "viewport", ve = "popper", Wt = "reference", lt = /* @__PURE__ */ xe.reduce(function(e, t) {
3
+ return e.concat([t + "-" + se, t + "-" + Oe]);
4
+ }, []), $t = /* @__PURE__ */ [].concat(xe, [Te]).reduce(function(e, t) {
5
+ return e.concat([t, t + "-" + se, t + "-" + Oe]);
6
+ }, []), Ht = "beforeRead", Ut = "read", Xt = "afterRead", Yt = "beforeMain", Kt = "main", Gt = "afterMain", Jt = "beforeWrite", Qt = "write", Zt = "afterWrite", Fe = [Ht, Ut, Xt, Yt, Kt, Gt, Jt, Qt, Zt];
7
7
  function H(e) {
8
8
  return e ? (e.nodeName || "").toLowerCase() : null;
9
9
  }
10
- function I(e) {
10
+ function L(e) {
11
11
  if (e == null)
12
12
  return window;
13
13
  if (e.toString() !== "[object Window]") {
@@ -16,18 +16,18 @@ function I(e) {
16
16
  }
17
17
  return e;
18
18
  }
19
- function ne(e) {
20
- var t = I(e).Element;
19
+ function oe(e) {
20
+ var t = L(e).Element;
21
21
  return e instanceof t || e instanceof Element;
22
22
  }
23
23
  function z(e) {
24
- var t = I(e).HTMLElement;
24
+ var t = L(e).HTMLElement;
25
25
  return e instanceof t || e instanceof HTMLElement;
26
26
  }
27
- function Xe(e) {
27
+ function Ye(e) {
28
28
  if (typeof ShadowRoot > "u")
29
29
  return !1;
30
- var t = I(e).ShadowRoot;
30
+ var t = L(e).ShadowRoot;
31
31
  return e instanceof t || e instanceof ShadowRoot;
32
32
  }
33
33
  function _t(e) {
@@ -72,24 +72,24 @@ const tr = {
72
72
  effect: er,
73
73
  requires: ["computeStyles"]
74
74
  };
75
- function V(e) {
75
+ function I(e) {
76
76
  return e.split("-")[0];
77
77
  }
78
- var re = Math.max, je = Math.min, se = Math.round;
79
- function Fe() {
78
+ var ne = Math.max, je = Math.min, le = Math.round;
79
+ function We() {
80
80
  var e = navigator.userAgentData;
81
81
  return e != null && e.brands ? e.brands.map(function(t) {
82
82
  return t.brand + "/" + t.version;
83
83
  }).join(" ") : navigator.userAgent;
84
84
  }
85
85
  function xt() {
86
- return !/^((?!chrome|android).)*safari/i.test(Fe());
86
+ return !/^((?!chrome|android).)*safari/i.test(We());
87
87
  }
88
- function le(e, t, r) {
88
+ function pe(e, t, r) {
89
89
  t === void 0 && (t = !1), r === void 0 && (r = !1);
90
90
  var n = e.getBoundingClientRect(), o = 1, i = 1;
91
- t && z(e) && (o = e.offsetWidth > 0 && se(n.width) / e.offsetWidth || 1, i = e.offsetHeight > 0 && se(n.height) / e.offsetHeight || 1);
92
- var a = ne(e) ? I(e) : window, l = a.visualViewport, s = !xt() && r, f = (n.left + (s && l ? l.offsetLeft : 0)) / o, p = (n.top + (s && l ? l.offsetTop : 0)) / i, h = n.width / o, y = n.height / i;
91
+ t && z(e) && (o = e.offsetWidth > 0 && le(n.width) / e.offsetWidth || 1, i = e.offsetHeight > 0 && le(n.height) / e.offsetHeight || 1);
92
+ var a = oe(e) ? L(e) : window, l = a.visualViewport, s = !xt() && r, f = (n.left + (s && l ? l.offsetLeft : 0)) / o, p = (n.top + (s && l ? l.offsetTop : 0)) / i, h = n.width / o, y = n.height / i;
93
93
  return {
94
94
  width: h,
95
95
  height: y,
@@ -101,8 +101,8 @@ function le(e, t, r) {
101
101
  y: p
102
102
  };
103
103
  }
104
- function Ye(e) {
105
- var t = le(e), r = e.offsetWidth, n = e.offsetHeight;
104
+ function Ke(e) {
105
+ var t = pe(e), r = e.offsetWidth, n = e.offsetHeight;
106
106
  return Math.abs(t.width - r) <= 1 && (r = t.width), Math.abs(t.height - n) <= 1 && (n = t.height), {
107
107
  x: e.offsetLeft,
108
108
  y: e.offsetTop,
@@ -110,11 +110,11 @@ function Ye(e) {
110
110
  height: n
111
111
  };
112
112
  }
113
- function $t(e, t) {
113
+ function Ct(e, t) {
114
114
  var r = t.getRootNode && t.getRootNode();
115
115
  if (e.contains(t))
116
116
  return !0;
117
- if (r && Xe(r)) {
117
+ if (r && Ye(r)) {
118
118
  var n = t;
119
119
  do {
120
120
  if (n && e.isSameNode(n))
@@ -125,29 +125,42 @@ function $t(e, t) {
125
125
  return !1;
126
126
  }
127
127
  function q(e) {
128
- return I(e).getComputedStyle(e);
128
+ return L(e).getComputedStyle(e);
129
129
  }
130
130
  function rr(e) {
131
131
  return ["table", "td", "th"].indexOf(H(e)) >= 0;
132
132
  }
133
- function Y(e) {
134
- return ((ne(e) ? e.ownerDocument : e.document) || window.document).documentElement;
133
+ function K(e) {
134
+ return ((oe(e) ? e.ownerDocument : (
135
+ // $FlowFixMe[prop-missing]
136
+ e.document
137
+ )) || window.document).documentElement;
135
138
  }
136
139
  function ze(e) {
137
- return H(e) === "html" ? e : e.assignedSlot || e.parentNode || (Xe(e) ? e.host : null) || Y(e);
140
+ return H(e) === "html" ? e : (
141
+ // this is a quicker (but less type safe) way to save quite some bytes from the bundle
142
+ // $FlowFixMe[incompatible-return]
143
+ // $FlowFixMe[prop-missing]
144
+ e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
145
+ e.parentNode || // DOM Element detected
146
+ (Ye(e) ? e.host : null) || // ShadowRoot detected
147
+ // $FlowFixMe[incompatible-call]: HTMLElement is a Node
148
+ K(e)
149
+ );
138
150
  }
139
- function lt(e) {
140
- return !z(e) || q(e).position === "fixed" ? null : e.offsetParent;
151
+ function pt(e) {
152
+ return !z(e) || // https://github.com/popperjs/popper-core/issues/837
153
+ q(e).position === "fixed" ? null : e.offsetParent;
141
154
  }
142
155
  function nr(e) {
143
- var t = /firefox/i.test(Fe()), r = /Trident/i.test(Fe());
156
+ var t = /firefox/i.test(We()), r = /Trident/i.test(We());
144
157
  if (r && z(e)) {
145
158
  var n = q(e);
146
159
  if (n.position === "fixed")
147
160
  return null;
148
161
  }
149
162
  var o = ze(e);
150
- for (Xe(o) && (o = o.host); z(o) && ["html", "body"].indexOf(H(o)) < 0; ) {
163
+ for (Ye(o) && (o = o.host); z(o) && ["html", "body"].indexOf(H(o)) < 0; ) {
151
164
  var i = q(o);
152
165
  if (i.transform !== "none" || i.perspective !== "none" || i.contain === "paint" || ["transform", "perspective"].indexOf(i.willChange) !== -1 || t && i.willChange === "filter" || t && i.filter && i.filter !== "none")
153
166
  return o;
@@ -155,22 +168,22 @@ function nr(e) {
155
168
  }
156
169
  return null;
157
170
  }
158
- function $e(e) {
159
- for (var t = I(e), r = lt(e); r && rr(r) && q(r).position === "static"; )
160
- r = lt(r);
171
+ function Ce(e) {
172
+ for (var t = L(e), r = pt(e); r && rr(r) && q(r).position === "static"; )
173
+ r = pt(r);
161
174
  return r && (H(r) === "html" || H(r) === "body" && q(r).position === "static") ? t : r || nr(e) || t;
162
175
  }
163
- function Ke(e) {
176
+ function Ge(e) {
164
177
  return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
165
178
  }
166
- function ve(e, t, r) {
167
- return re(e, je(t, r));
179
+ function he(e, t, r) {
180
+ return ne(e, je(t, r));
168
181
  }
169
182
  function or(e, t, r) {
170
- var n = ve(e, t, r);
183
+ var n = he(e, t, r);
171
184
  return n > r ? r : n;
172
185
  }
173
- function Ct() {
186
+ function Pt() {
174
187
  return {
175
188
  top: 0,
176
189
  right: 0,
@@ -178,10 +191,10 @@ function Ct() {
178
191
  left: 0
179
192
  };
180
193
  }
181
- function Pt(e) {
182
- return Object.assign({}, Ct(), e);
194
+ function Et(e) {
195
+ return Object.assign({}, Pt(), e);
183
196
  }
184
- function Et(e, t) {
197
+ function St(e, t) {
185
198
  return t.reduce(function(r, n) {
186
199
  return r[n] = e, r;
187
200
  }, {});
@@ -189,19 +202,19 @@ function Et(e, t) {
189
202
  var ir = function(t, r) {
190
203
  return t = typeof t == "function" ? t(Object.assign({}, r.rects, {
191
204
  placement: r.placement
192
- })) : t, Pt(typeof t != "number" ? t : Et(t, xe));
205
+ })) : t, Et(typeof t != "number" ? t : St(t, xe));
193
206
  };
194
207
  function ar(e) {
195
- var t, r = e.state, n = e.name, o = e.options, i = r.elements.arrow, a = r.modifiersData.popperOffsets, l = V(r.placement), s = Ke(l), f = [j, M].indexOf(l) >= 0, p = f ? "height" : "width";
208
+ var t, r = e.state, n = e.name, o = e.options, i = r.elements.arrow, a = r.modifiersData.popperOffsets, l = I(r.placement), s = Ge(l), f = [j, M].indexOf(l) >= 0, p = f ? "height" : "width";
196
209
  if (!(!i || !a)) {
197
- var h = ir(o.padding, r), y = Ye(i), u = s === "y" ? R : j, O = s === "y" ? N : M, m = r.rects.reference[p] + r.rects.reference[s] - a[s] - r.rects.popper[p], v = a[s] - r.rects.reference[s], w = $e(i), C = w ? s === "y" ? w.clientHeight || 0 : w.clientWidth || 0 : 0, $ = m / 2 - v / 2, d = h[u], g = C - y[p] - h[O], c = C / 2 - y[p] / 2 + $, x = ve(d, c, g), E = s;
198
- r.modifiersData[n] = (t = {}, t[E] = x, t.centerOffset = x - c, t);
210
+ var h = ir(o.padding, r), y = Ke(i), u = s === "y" ? R : j, O = s === "y" ? N : M, g = r.rects.reference[p] + r.rects.reference[s] - a[s] - r.rects.popper[p], v = a[s] - r.rects.reference[s], w = Ce(i), C = w ? s === "y" ? w.clientHeight || 0 : w.clientWidth || 0 : 0, x = g / 2 - v / 2, d = h[u], m = C - y[p] - h[O], c = C / 2 - y[p] / 2 + x, $ = he(d, c, m), E = s;
211
+ r.modifiersData[n] = (t = {}, t[E] = $, t.centerOffset = $ - c, t);
199
212
  }
200
213
  }
201
214
  function sr(e) {
202
215
  var t = e.state, r = e.options, n = r.element, o = n === void 0 ? "[data-popper-arrow]" : n;
203
216
  if (o != null && !(typeof o == "string" && (o = t.elements.popper.querySelector(o), !o))) {
204
- if (process.env.NODE_ENV !== "production" && (z(o) || console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).', "To use an SVG arrow, wrap it in an HTMLElement that will be used as", "the arrow."].join(" "))), !$t(t.elements.popper, o)) {
217
+ if (process.env.NODE_ENV !== "production" && (z(o) || console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).', "To use an SVG arrow, wrap it in an HTMLElement that will be used as", "the arrow."].join(" "))), !Ct(t.elements.popper, o)) {
205
218
  process.env.NODE_ENV !== "production" && console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper', "element."].join(" "));
206
219
  return;
207
220
  }
@@ -217,7 +230,7 @@ const lr = {
217
230
  requires: ["popperOffsets"],
218
231
  requiresIfExists: ["preventOverflow"]
219
232
  };
220
- function pe(e) {
233
+ function fe(e) {
221
234
  return e.split("-")[1];
222
235
  }
223
236
  var pr = {
@@ -229,30 +242,36 @@ var pr = {
229
242
  function fr(e) {
230
243
  var t = e.x, r = e.y, n = window, o = n.devicePixelRatio || 1;
231
244
  return {
232
- x: se(t * o) / o || 0,
233
- y: se(r * o) / o || 0
245
+ x: le(t * o) / o || 0,
246
+ y: le(r * o) / o || 0
234
247
  };
235
248
  }
236
- function pt(e) {
237
- var t, r = e.popper, n = e.popperRect, o = e.placement, i = e.variation, a = e.offsets, l = e.position, s = e.gpuAcceleration, f = e.adaptive, p = e.roundOffsets, h = e.isFixed, y = a.x, u = y === void 0 ? 0 : y, O = a.y, m = O === void 0 ? 0 : O, v = typeof p == "function" ? p({
249
+ function ft(e) {
250
+ var t, r = e.popper, n = e.popperRect, o = e.placement, i = e.variation, a = e.offsets, l = e.position, s = e.gpuAcceleration, f = e.adaptive, p = e.roundOffsets, h = e.isFixed, y = a.x, u = y === void 0 ? 0 : y, O = a.y, g = O === void 0 ? 0 : O, v = typeof p == "function" ? p({
238
251
  x: u,
239
- y: m
252
+ y: g
240
253
  }) : {
241
254
  x: u,
242
- y: m
255
+ y: g
243
256
  };
244
- u = v.x, m = v.y;
245
- var w = a.hasOwnProperty("x"), C = a.hasOwnProperty("y"), $ = j, d = R, g = window;
257
+ u = v.x, g = v.y;
258
+ var w = a.hasOwnProperty("x"), C = a.hasOwnProperty("y"), x = j, d = R, m = window;
246
259
  if (f) {
247
- var c = $e(r), x = "clientHeight", E = "clientWidth";
248
- if (c === I(r) && (c = Y(r), q(c).position !== "static" && l === "absolute" && (x = "scrollHeight", E = "scrollWidth")), c = c, o === R || (o === j || o === M) && i === we) {
260
+ var c = Ce(r), $ = "clientHeight", E = "clientWidth";
261
+ if (c === L(r) && (c = K(r), q(c).position !== "static" && l === "absolute" && ($ = "scrollHeight", E = "scrollWidth")), c = c, o === R || (o === j || o === M) && i === Oe) {
249
262
  d = N;
250
- var S = h && c === g && g.visualViewport ? g.visualViewport.height : c[x];
251
- m -= S - n.height, m *= s ? 1 : -1;
263
+ var S = h && c === m && m.visualViewport ? m.visualViewport.height : (
264
+ // $FlowFixMe[prop-missing]
265
+ c[$]
266
+ );
267
+ g -= S - n.height, g *= s ? 1 : -1;
252
268
  }
253
- if (o === j || (o === R || o === N) && i === we) {
254
- $ = M;
255
- var k = h && c === g && g.visualViewport ? g.visualViewport.width : c[E];
269
+ if (o === j || (o === R || o === N) && i === Oe) {
270
+ x = M;
271
+ var k = h && c === m && m.visualViewport ? m.visualViewport.width : (
272
+ // $FlowFixMe[prop-missing]
273
+ c[E]
274
+ );
256
275
  u -= k - n.width, u *= s ? 1 : -1;
257
276
  }
258
277
  }
@@ -260,16 +279,16 @@ function pt(e) {
260
279
  position: l
261
280
  }, f && pr), D = p === !0 ? fr({
262
281
  x: u,
263
- y: m
282
+ y: g
264
283
  }) : {
265
284
  x: u,
266
- y: m
285
+ y: g
267
286
  };
268
- if (u = D.x, m = D.y, s) {
287
+ if (u = D.x, g = D.y, s) {
269
288
  var A;
270
- return Object.assign({}, b, (A = {}, A[d] = C ? "0" : "", A[$] = w ? "0" : "", A.transform = (g.devicePixelRatio || 1) <= 1 ? "translate(" + u + "px, " + m + "px)" : "translate3d(" + u + "px, " + m + "px, 0)", A));
289
+ return Object.assign({}, b, (A = {}, A[d] = C ? "0" : "", A[x] = w ? "0" : "", A.transform = (m.devicePixelRatio || 1) <= 1 ? "translate(" + u + "px, " + g + "px)" : "translate3d(" + u + "px, " + g + "px, 0)", A));
271
290
  }
272
- return Object.assign({}, b, (t = {}, t[d] = C ? m + "px" : "", t[$] = w ? u + "px" : "", t.transform = "", t));
291
+ return Object.assign({}, b, (t = {}, t[d] = C ? g + "px" : "", t[x] = w ? u + "px" : "", t.transform = "", t));
273
292
  }
274
293
  function ur(e) {
275
294
  var t = e.state, r = e.options, n = r.gpuAcceleration, o = n === void 0 ? !0 : n, i = r.adaptive, a = i === void 0 ? !0 : i, l = r.roundOffsets, s = l === void 0 ? !0 : l;
@@ -284,19 +303,19 @@ function ur(e) {
284
303
  `, "We recommend using the popper element as a wrapper around an inner", "element that can have any CSS property transitioned for animations."].join(" "));
285
304
  }
286
305
  var p = {
287
- placement: V(t.placement),
288
- variation: pe(t.placement),
306
+ placement: I(t.placement),
307
+ variation: fe(t.placement),
289
308
  popper: t.elements.popper,
290
309
  popperRect: t.rects.popper,
291
310
  gpuAcceleration: o,
292
311
  isFixed: t.options.strategy === "fixed"
293
312
  };
294
- t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, pt(Object.assign({}, p, {
313
+ t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, ft(Object.assign({}, p, {
295
314
  offsets: t.modifiersData.popperOffsets,
296
315
  position: t.options.strategy,
297
316
  adaptive: a,
298
317
  roundOffsets: s
299
- })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, pt(Object.assign({}, p, {
318
+ })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, ft(Object.assign({}, p, {
300
319
  offsets: t.modifiersData.arrow,
301
320
  position: "absolute",
302
321
  adaptive: !1,
@@ -316,7 +335,7 @@ var De = {
316
335
  passive: !0
317
336
  };
318
337
  function cr(e) {
319
- var t = e.state, r = e.instance, n = e.options, o = n.scroll, i = o === void 0 ? !0 : o, a = n.resize, l = a === void 0 ? !0 : a, s = I(t.elements.popper), f = [].concat(t.scrollParents.reference, t.scrollParents.popper);
338
+ var t = e.state, r = e.instance, n = e.options, o = n.scroll, i = o === void 0 ? !0 : o, a = n.resize, l = a === void 0 ? !0 : a, s = L(t.elements.popper), f = [].concat(t.scrollParents.reference, t.scrollParents.popper);
320
339
  return i && f.forEach(function(p) {
321
340
  p.addEventListener("scroll", r.update, De);
322
341
  }), l && s.addEventListener("resize", r.update, De), function() {
@@ -345,27 +364,27 @@ function Ae(e) {
345
364
  return hr[t];
346
365
  });
347
366
  }
348
- var mr = {
367
+ var gr = {
349
368
  start: "end",
350
369
  end: "start"
351
370
  };
352
- function ft(e) {
371
+ function ut(e) {
353
372
  return e.replace(/start|end/g, function(t) {
354
- return mr[t];
373
+ return gr[t];
355
374
  });
356
375
  }
357
- function Ge(e) {
358
- var t = I(e), r = t.pageXOffset, n = t.pageYOffset;
376
+ function Je(e) {
377
+ var t = L(e), r = t.pageXOffset, n = t.pageYOffset;
359
378
  return {
360
379
  scrollLeft: r,
361
380
  scrollTop: n
362
381
  };
363
382
  }
364
- function Je(e) {
365
- return le(Y(e)).left + Ge(e).scrollLeft;
383
+ function Qe(e) {
384
+ return pe(K(e)).left + Je(e).scrollLeft;
366
385
  }
367
- function gr(e, t) {
368
- var r = I(e), n = Y(e), o = r.visualViewport, i = n.clientWidth, a = n.clientHeight, l = 0, s = 0;
386
+ function mr(e, t) {
387
+ var r = L(e), n = K(e), o = r.visualViewport, i = n.clientWidth, a = n.clientHeight, l = 0, s = 0;
369
388
  if (o) {
370
389
  i = o.width, a = o.height;
371
390
  var f = xt();
@@ -374,33 +393,36 @@ function gr(e, t) {
374
393
  return {
375
394
  width: i,
376
395
  height: a,
377
- x: l + Je(e),
396
+ x: l + Qe(e),
378
397
  y: s
379
398
  };
380
399
  }
381
400
  function br(e) {
382
- var t, r = Y(e), n = Ge(e), o = (t = e.ownerDocument) == null ? void 0 : t.body, i = re(r.scrollWidth, r.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), a = re(r.scrollHeight, r.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), l = -n.scrollLeft + Je(e), s = -n.scrollTop;
383
- return q(o || r).direction === "rtl" && (l += re(r.clientWidth, o ? o.clientWidth : 0) - i), {
401
+ var t, r = K(e), n = Je(e), o = (t = e.ownerDocument) == null ? void 0 : t.body, i = ne(r.scrollWidth, r.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), a = ne(r.scrollHeight, r.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), l = -n.scrollLeft + Qe(e), s = -n.scrollTop;
402
+ return q(o || r).direction === "rtl" && (l += ne(r.clientWidth, o ? o.clientWidth : 0) - i), {
384
403
  width: i,
385
404
  height: a,
386
405
  x: l,
387
406
  y: s
388
407
  };
389
408
  }
390
- function Qe(e) {
409
+ function Ze(e) {
391
410
  var t = q(e), r = t.overflow, n = t.overflowX, o = t.overflowY;
392
411
  return /auto|scroll|overlay|hidden/.test(r + o + n);
393
412
  }
394
- function St(e) {
395
- return ["html", "body", "#document"].indexOf(H(e)) >= 0 ? e.ownerDocument.body : z(e) && Qe(e) ? e : St(ze(e));
413
+ function kt(e) {
414
+ return ["html", "body", "#document"].indexOf(H(e)) >= 0 ? e.ownerDocument.body : z(e) && Ze(e) ? e : kt(ze(e));
396
415
  }
397
- function he(e, t) {
416
+ function ge(e, t) {
398
417
  var r;
399
418
  t === void 0 && (t = []);
400
- var n = St(e), o = n === ((r = e.ownerDocument) == null ? void 0 : r.body), i = I(n), a = o ? [i].concat(i.visualViewport || [], Qe(n) ? n : []) : n, l = t.concat(a);
401
- return o ? l : l.concat(he(ze(a)));
419
+ var n = kt(e), o = n === ((r = e.ownerDocument) == null ? void 0 : r.body), i = L(n), a = o ? [i].concat(i.visualViewport || [], Ze(n) ? n : []) : n, l = t.concat(a);
420
+ return o ? l : (
421
+ // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
422
+ l.concat(ge(ze(a)))
423
+ );
402
424
  }
403
- function We(e) {
425
+ function He(e) {
404
426
  return Object.assign({}, e, {
405
427
  left: e.x,
406
428
  top: e.y,
@@ -409,27 +431,27 @@ function We(e) {
409
431
  });
410
432
  }
411
433
  function yr(e, t) {
412
- var r = le(e, !1, t === "fixed");
434
+ var r = pe(e, !1, t === "fixed");
413
435
  return r.top = r.top + e.clientTop, r.left = r.left + e.clientLeft, r.bottom = r.top + e.clientHeight, r.right = r.left + e.clientWidth, r.width = e.clientWidth, r.height = e.clientHeight, r.x = r.left, r.y = r.top, r;
414
436
  }
415
- function ut(e, t, r) {
416
- return t === wt ? We(gr(e, r)) : ne(t) ? yr(t, r) : We(br(Y(e)));
437
+ function dt(e, t, r) {
438
+ return t === Ot ? He(mr(e, r)) : oe(t) ? yr(t, r) : He(br(K(e)));
417
439
  }
418
440
  function wr(e) {
419
- var t = he(ze(e)), r = ["absolute", "fixed"].indexOf(q(e).position) >= 0, n = r && z(e) ? $e(e) : e;
420
- return ne(n) ? t.filter(function(o) {
421
- return ne(o) && $t(o, n) && H(o) !== "body";
441
+ var t = ge(ze(e)), r = ["absolute", "fixed"].indexOf(q(e).position) >= 0, n = r && z(e) ? Ce(e) : e;
442
+ return oe(n) ? t.filter(function(o) {
443
+ return oe(o) && Ct(o, n) && H(o) !== "body";
422
444
  }) : [];
423
445
  }
424
446
  function Or(e, t, r, n) {
425
447
  var o = t === "clippingParents" ? wr(e) : [].concat(t), i = [].concat(o, [r]), a = i[0], l = i.reduce(function(s, f) {
426
- var p = ut(e, f, n);
427
- return s.top = re(p.top, s.top), s.right = je(p.right, s.right), s.bottom = je(p.bottom, s.bottom), s.left = re(p.left, s.left), s;
428
- }, ut(e, a, n));
448
+ var p = dt(e, f, n);
449
+ return s.top = ne(p.top, s.top), s.right = je(p.right, s.right), s.bottom = je(p.bottom, s.bottom), s.left = ne(p.left, s.left), s;
450
+ }, dt(e, a, n));
429
451
  return l.width = l.right - l.left, l.height = l.bottom - l.top, l.x = l.left, l.y = l.top, l;
430
452
  }
431
- function kt(e) {
432
- var t = e.reference, r = e.element, n = e.placement, o = n ? V(n) : null, i = n ? pe(n) : null, a = t.x + t.width / 2 - r.width / 2, l = t.y + t.height / 2 - r.height / 2, s;
453
+ function Bt(e) {
454
+ var t = e.reference, r = e.element, n = e.placement, o = n ? I(n) : null, i = n ? fe(n) : null, a = t.x + t.width / 2 - r.width / 2, l = t.y + t.height / 2 - r.height / 2, s;
433
455
  switch (o) {
434
456
  case R:
435
457
  s = {
@@ -461,111 +483,111 @@ function kt(e) {
461
483
  y: t.y
462
484
  };
463
485
  }
464
- var f = o ? Ke(o) : null;
486
+ var f = o ? Ge(o) : null;
465
487
  if (f != null) {
466
488
  var p = f === "y" ? "height" : "width";
467
489
  switch (i) {
468
- case ae:
490
+ case se:
469
491
  s[f] = s[f] - (t[p] / 2 - r[p] / 2);
470
492
  break;
471
- case we:
493
+ case Oe:
472
494
  s[f] = s[f] + (t[p] / 2 - r[p] / 2);
473
495
  break;
474
496
  }
475
497
  }
476
498
  return s;
477
499
  }
478
- function Oe(e, t) {
500
+ function $e(e, t) {
479
501
  t === void 0 && (t = {});
480
- var r = t, n = r.placement, o = n === void 0 ? e.placement : n, i = r.strategy, a = i === void 0 ? e.strategy : i, l = r.boundary, s = l === void 0 ? Ft : l, f = r.rootBoundary, p = f === void 0 ? wt : f, h = r.elementContext, y = h === void 0 ? ce : h, u = r.altBoundary, O = u === void 0 ? !1 : u, m = r.padding, v = m === void 0 ? 0 : m, w = Pt(typeof v != "number" ? v : Et(v, xe)), C = y === ce ? Wt : ce, $ = e.rects.popper, d = e.elements[O ? C : y], g = Or(ne(d) ? d : d.contextElement || Y(e.elements.popper), s, p, a), c = le(e.elements.reference), x = kt({
502
+ var r = t, n = r.placement, o = n === void 0 ? e.placement : n, i = r.strategy, a = i === void 0 ? e.strategy : i, l = r.boundary, s = l === void 0 ? Ft : l, f = r.rootBoundary, p = f === void 0 ? Ot : f, h = r.elementContext, y = h === void 0 ? ve : h, u = r.altBoundary, O = u === void 0 ? !1 : u, g = r.padding, v = g === void 0 ? 0 : g, w = Et(typeof v != "number" ? v : St(v, xe)), C = y === ve ? Wt : ve, x = e.rects.popper, d = e.elements[O ? C : y], m = Or(oe(d) ? d : d.contextElement || K(e.elements.popper), s, p, a), c = pe(e.elements.reference), $ = Bt({
481
503
  reference: c,
482
- element: $,
504
+ element: x,
483
505
  strategy: "absolute",
484
506
  placement: o
485
- }), E = We(Object.assign({}, $, x)), S = y === ce ? E : c, k = {
486
- top: g.top - S.top + w.top,
487
- bottom: S.bottom - g.bottom + w.bottom,
488
- left: g.left - S.left + w.left,
489
- right: S.right - g.right + w.right
507
+ }), E = He(Object.assign({}, x, $)), S = y === ve ? E : c, k = {
508
+ top: m.top - S.top + w.top,
509
+ bottom: S.bottom - m.bottom + w.bottom,
510
+ left: m.left - S.left + w.left,
511
+ right: S.right - m.right + w.right
490
512
  }, b = e.modifiersData.offset;
491
- if (y === ce && b) {
513
+ if (y === ve && b) {
492
514
  var D = b[o];
493
515
  Object.keys(k).forEach(function(A) {
494
- var K = [M, N].indexOf(A) >= 0 ? 1 : -1, G = [R, N].indexOf(A) >= 0 ? "y" : "x";
495
- k[A] += D[G] * K;
516
+ var G = [M, N].indexOf(A) >= 0 ? 1 : -1, J = [R, N].indexOf(A) >= 0 ? "y" : "x";
517
+ k[A] += D[J] * G;
496
518
  });
497
519
  }
498
520
  return k;
499
521
  }
500
- function xr(e, t) {
522
+ function $r(e, t) {
501
523
  t === void 0 && (t = {});
502
- var r = t, n = r.placement, o = r.boundary, i = r.rootBoundary, a = r.padding, l = r.flipVariations, s = r.allowedAutoPlacements, f = s === void 0 ? Ot : s, p = pe(n), h = p ? l ? st : st.filter(function(O) {
503
- return pe(O) === p;
524
+ var r = t, n = r.placement, o = r.boundary, i = r.rootBoundary, a = r.padding, l = r.flipVariations, s = r.allowedAutoPlacements, f = s === void 0 ? $t : s, p = fe(n), h = p ? l ? lt : lt.filter(function(O) {
525
+ return fe(O) === p;
504
526
  }) : xe, y = h.filter(function(O) {
505
527
  return f.indexOf(O) >= 0;
506
528
  });
507
529
  y.length === 0 && (y = h, process.env.NODE_ENV !== "production" && console.error(["Popper: The `allowedAutoPlacements` option did not allow any", "placements. Ensure the `placement` option matches the variation", "of the allowed placements.", 'For example, "auto" cannot be used to allow "bottom-start".', 'Use "auto-start" instead.'].join(" ")));
508
- var u = y.reduce(function(O, m) {
509
- return O[m] = Oe(e, {
510
- placement: m,
530
+ var u = y.reduce(function(O, g) {
531
+ return O[g] = $e(e, {
532
+ placement: g,
511
533
  boundary: o,
512
534
  rootBoundary: i,
513
535
  padding: a
514
- })[V(m)], O;
536
+ })[I(g)], O;
515
537
  }, {});
516
- return Object.keys(u).sort(function(O, m) {
517
- return u[O] - u[m];
538
+ return Object.keys(u).sort(function(O, g) {
539
+ return u[O] - u[g];
518
540
  });
519
541
  }
520
- function $r(e) {
521
- if (V(e) === Te)
542
+ function xr(e) {
543
+ if (I(e) === Te)
522
544
  return [];
523
545
  var t = Ae(e);
524
- return [ft(e), t, ft(t)];
546
+ return [ut(e), t, ut(t)];
525
547
  }
526
548
  function Cr(e) {
527
549
  var t = e.state, r = e.options, n = e.name;
528
550
  if (!t.modifiersData[n]._skip) {
529
- for (var o = r.mainAxis, i = o === void 0 ? !0 : o, a = r.altAxis, l = a === void 0 ? !0 : a, s = r.fallbackPlacements, f = r.padding, p = r.boundary, h = r.rootBoundary, y = r.altBoundary, u = r.flipVariations, O = u === void 0 ? !0 : u, m = r.allowedAutoPlacements, v = t.options.placement, w = V(v), C = w === v, $ = s || (C || !O ? [Ae(v)] : $r(v)), d = [v].concat($).reduce(function(oe, U) {
530
- return oe.concat(V(U) === Te ? xr(t, {
531
- placement: U,
551
+ for (var o = r.mainAxis, i = o === void 0 ? !0 : o, a = r.altAxis, l = a === void 0 ? !0 : a, s = r.fallbackPlacements, f = r.padding, p = r.boundary, h = r.rootBoundary, y = r.altBoundary, u = r.flipVariations, O = u === void 0 ? !0 : u, g = r.allowedAutoPlacements, v = t.options.placement, w = I(v), C = w === v, x = s || (C || !O ? [Ae(v)] : xr(v)), d = [v].concat(x).reduce(function(ie, X) {
552
+ return ie.concat(I(X) === Te ? $r(t, {
553
+ placement: X,
532
554
  boundary: p,
533
555
  rootBoundary: h,
534
556
  padding: f,
535
557
  flipVariations: O,
536
- allowedAutoPlacements: m
537
- }) : U);
538
- }, []), g = t.rects.reference, c = t.rects.popper, x = /* @__PURE__ */ new Map(), E = !0, S = d[0], k = 0; k < d.length; k++) {
539
- var b = d[k], D = V(b), A = pe(b) === ae, K = [R, N].indexOf(D) >= 0, G = K ? "width" : "height", T = Oe(t, {
558
+ allowedAutoPlacements: g
559
+ }) : X);
560
+ }, []), m = t.rects.reference, c = t.rects.popper, $ = /* @__PURE__ */ new Map(), E = !0, S = d[0], k = 0; k < d.length; k++) {
561
+ var b = d[k], D = I(b), A = fe(b) === se, G = [R, N].indexOf(D) >= 0, J = G ? "width" : "height", T = $e(t, {
540
562
  placement: b,
541
563
  boundary: p,
542
564
  rootBoundary: h,
543
565
  altBoundary: y,
544
566
  padding: f
545
- }), L = K ? A ? M : j : A ? N : R;
546
- g[G] > c[G] && (L = Ae(L));
547
- var Pe = Ae(L), J = [];
548
- if (i && J.push(T[D] <= 0), l && J.push(T[L] <= 0, T[Pe] <= 0), J.every(function(oe) {
549
- return oe;
567
+ }), V = G ? A ? M : j : A ? N : R;
568
+ m[J] > c[J] && (V = Ae(V));
569
+ var Pe = Ae(V), Q = [];
570
+ if (i && Q.push(T[D] <= 0), l && Q.push(T[V] <= 0, T[Pe] <= 0), Q.every(function(ie) {
571
+ return ie;
550
572
  })) {
551
573
  S = b, E = !1;
552
574
  break;
553
575
  }
554
- x.set(b, J);
576
+ $.set(b, Q);
555
577
  }
556
578
  if (E)
557
- for (var Ee = O ? 3 : 1, Ne = function(U) {
558
- var ue = d.find(function(ke) {
559
- var Q = x.get(ke);
560
- if (Q)
561
- return Q.slice(0, U).every(function(Me) {
562
- return Me;
579
+ for (var Ee = O ? 3 : 1, Me = function(X) {
580
+ var de = d.find(function(ke) {
581
+ var Z = $.get(ke);
582
+ if (Z)
583
+ return Z.slice(0, X).every(function(Le) {
584
+ return Le;
563
585
  });
564
586
  });
565
- if (ue)
566
- return S = ue, "break";
567
- }, fe = Ee; fe > 0; fe--) {
568
- var Se = Ne(fe);
587
+ if (de)
588
+ return S = de, "break";
589
+ }, ue = Ee; ue > 0; ue--) {
590
+ var Se = Me(ue);
569
591
  if (Se === "break")
570
592
  break;
571
593
  }
@@ -582,7 +604,7 @@ const Pr = {
582
604
  _skip: !1
583
605
  }
584
606
  };
585
- function dt(e, t, r) {
607
+ function ct(e, t, r) {
586
608
  return r === void 0 && (r = {
587
609
  x: 0,
588
610
  y: 0
@@ -593,17 +615,17 @@ function dt(e, t, r) {
593
615
  left: e.left - t.width - r.x
594
616
  };
595
617
  }
596
- function ct(e) {
618
+ function vt(e) {
597
619
  return [R, M, N, j].some(function(t) {
598
620
  return e[t] >= 0;
599
621
  });
600
622
  }
601
623
  function Er(e) {
602
- var t = e.state, r = e.name, n = t.rects.reference, o = t.rects.popper, i = t.modifiersData.preventOverflow, a = Oe(t, {
624
+ var t = e.state, r = e.name, n = t.rects.reference, o = t.rects.popper, i = t.modifiersData.preventOverflow, a = $e(t, {
603
625
  elementContext: "reference"
604
- }), l = Oe(t, {
626
+ }), l = $e(t, {
605
627
  altBoundary: !0
606
- }), s = dt(a, n), f = dt(l, o, i), p = ct(s), h = ct(f);
628
+ }), s = ct(a, n), f = ct(l, o, i), p = vt(s), h = vt(f);
607
629
  t.modifiersData[r] = {
608
630
  referenceClippingOffsets: s,
609
631
  popperEscapeOffsets: f,
@@ -622,7 +644,7 @@ const Sr = {
622
644
  fn: Er
623
645
  };
624
646
  function kr(e, t, r) {
625
- var n = V(e), o = [j, R].indexOf(n) >= 0 ? -1 : 1, i = typeof r == "function" ? r(Object.assign({}, t, {
647
+ var n = I(e), o = [j, R].indexOf(n) >= 0 ? -1 : 1, i = typeof r == "function" ? r(Object.assign({}, t, {
626
648
  placement: e
627
649
  })) : r, a = i[0], l = i[1];
628
650
  return a = a || 0, l = (l || 0) * o, [j, M].indexOf(n) >= 0 ? {
@@ -634,7 +656,7 @@ function kr(e, t, r) {
634
656
  };
635
657
  }
636
658
  function Br(e) {
637
- var t = e.state, r = e.options, n = e.name, o = r.offset, i = o === void 0 ? [0, 0] : o, a = Ot.reduce(function(p, h) {
659
+ var t = e.state, r = e.options, n = e.name, o = r.offset, i = o === void 0 ? [0, 0] : o, a = $t.reduce(function(p, h) {
638
660
  return p[h] = kr(h, t.rects, i), p;
639
661
  }, {}), l = a[t.placement], s = l.x, f = l.y;
640
662
  t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += s, t.modifiersData.popperOffsets.y += f), t.modifiersData[n] = a;
@@ -648,7 +670,7 @@ const Dr = {
648
670
  };
649
671
  function Ar(e) {
650
672
  var t = e.state, r = e.name;
651
- t.modifiersData[r] = kt({
673
+ t.modifiersData[r] = Bt({
652
674
  reference: t.rects.reference,
653
675
  element: t.rects.popper,
654
676
  strategy: "absolute",
@@ -666,14 +688,14 @@ function jr(e) {
666
688
  return e === "x" ? "y" : "x";
667
689
  }
668
690
  function Tr(e) {
669
- var t = e.state, r = e.options, n = e.name, o = r.mainAxis, i = o === void 0 ? !0 : o, a = r.altAxis, l = a === void 0 ? !1 : a, s = r.boundary, f = r.rootBoundary, p = r.altBoundary, h = r.padding, y = r.tether, u = y === void 0 ? !0 : y, O = r.tetherOffset, m = O === void 0 ? 0 : O, v = Oe(t, {
691
+ var t = e.state, r = e.options, n = e.name, o = r.mainAxis, i = o === void 0 ? !0 : o, a = r.altAxis, l = a === void 0 ? !1 : a, s = r.boundary, f = r.rootBoundary, p = r.altBoundary, h = r.padding, y = r.tether, u = y === void 0 ? !0 : y, O = r.tetherOffset, g = O === void 0 ? 0 : O, v = $e(t, {
670
692
  boundary: s,
671
693
  rootBoundary: f,
672
694
  padding: h,
673
695
  altBoundary: p
674
- }), w = V(t.placement), C = pe(t.placement), $ = !C, d = Ke(w), g = jr(d), c = t.modifiersData.popperOffsets, x = t.rects.reference, E = t.rects.popper, S = typeof m == "function" ? m(Object.assign({}, t.rects, {
696
+ }), w = I(t.placement), C = fe(t.placement), x = !C, d = Ge(w), m = jr(d), c = t.modifiersData.popperOffsets, $ = t.rects.reference, E = t.rects.popper, S = typeof g == "function" ? g(Object.assign({}, t.rects, {
675
697
  placement: t.placement
676
- })) : m, k = typeof S == "number" ? {
698
+ })) : g, k = typeof S == "number" ? {
677
699
  mainAxis: S,
678
700
  altAxis: S
679
701
  } : Object.assign({
@@ -683,17 +705,17 @@ function Tr(e) {
683
705
  x: 0,
684
706
  y: 0
685
707
  };
686
- if (!!c) {
708
+ if (c) {
687
709
  if (i) {
688
- var A, K = d === "y" ? R : j, G = d === "y" ? N : M, T = d === "y" ? "height" : "width", L = c[d], Pe = L + v[K], J = L - v[G], Ee = u ? -E[T] / 2 : 0, Ne = C === ae ? x[T] : E[T], fe = C === ae ? -E[T] : -x[T], Se = t.elements.arrow, oe = u && Se ? Ye(Se) : {
710
+ var A, G = d === "y" ? R : j, J = d === "y" ? N : M, T = d === "y" ? "height" : "width", V = c[d], Pe = V + v[G], Q = V - v[J], Ee = u ? -E[T] / 2 : 0, Me = C === se ? $[T] : E[T], ue = C === se ? -E[T] : -$[T], Se = t.elements.arrow, ie = u && Se ? Ke(Se) : {
689
711
  width: 0,
690
712
  height: 0
691
- }, U = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : Ct(), ue = U[K], ke = U[G], Q = ve(0, x[T], oe[T]), Me = $ ? x[T] / 2 - Ee - Q - ue - k.mainAxis : Ne - Q - ue - k.mainAxis, At = $ ? -x[T] / 2 + Ee + Q + ke + k.mainAxis : fe + Q + ke + k.mainAxis, Ie = t.elements.arrow && $e(t.elements.arrow), Rt = Ie ? d === "y" ? Ie.clientTop || 0 : Ie.clientLeft || 0 : 0, Ze = (A = b == null ? void 0 : b[d]) != null ? A : 0, jt = L + Me - Ze - Rt, Tt = L + At - Ze, _e = ve(u ? je(Pe, jt) : Pe, L, u ? re(J, Tt) : J);
692
- c[d] = _e, D[d] = _e - L;
713
+ }, X = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : Pt(), de = X[G], ke = X[J], Z = he(0, $[T], ie[T]), Le = x ? $[T] / 2 - Ee - Z - de - k.mainAxis : Me - Z - de - k.mainAxis, Rt = x ? -$[T] / 2 + Ee + Z + ke + k.mainAxis : ue + Z + ke + k.mainAxis, Ve = t.elements.arrow && Ce(t.elements.arrow), jt = Ve ? d === "y" ? Ve.clientTop || 0 : Ve.clientLeft || 0 : 0, _e = (A = b == null ? void 0 : b[d]) != null ? A : 0, Tt = V + Le - _e - jt, zt = V + Rt - _e, et = he(u ? je(Pe, Tt) : Pe, V, u ? ne(Q, zt) : Q);
714
+ c[d] = et, D[d] = et - V;
693
715
  }
694
716
  if (l) {
695
- var et, zt = d === "x" ? R : j, Nt = d === "x" ? N : M, Z = c[g], Be = g === "y" ? "height" : "width", tt = Z + v[zt], rt = Z - v[Nt], Le = [R, j].indexOf(w) !== -1, nt = (et = b == null ? void 0 : b[g]) != null ? et : 0, ot = Le ? tt : Z - x[Be] - E[Be] - nt + k.altAxis, it = Le ? Z + x[Be] + E[Be] - nt - k.altAxis : rt, at = u && Le ? or(ot, Z, it) : ve(u ? ot : tt, Z, u ? it : rt);
696
- c[g] = at, D[g] = at - Z;
717
+ var tt, Nt = d === "x" ? R : j, Mt = d === "x" ? N : M, _ = c[m], Be = m === "y" ? "height" : "width", rt = _ + v[Nt], nt = _ - v[Mt], Ie = [R, j].indexOf(w) !== -1, ot = (tt = b == null ? void 0 : b[m]) != null ? tt : 0, it = Ie ? rt : _ - $[Be] - E[Be] - ot + k.altAxis, at = Ie ? _ + $[Be] + E[Be] - ot - k.altAxis : nt, st = u && Ie ? or(it, _, at) : he(u ? it : rt, _, u ? at : nt);
718
+ c[m] = st, D[m] = st - _;
697
719
  }
698
720
  t.modifiersData[n] = D;
699
721
  }
@@ -712,29 +734,30 @@ function Nr(e) {
712
734
  };
713
735
  }
714
736
  function Mr(e) {
715
- return e === I(e) || !z(e) ? Ge(e) : Nr(e);
737
+ return e === L(e) || !z(e) ? Je(e) : Nr(e);
716
738
  }
717
- function Ir(e) {
718
- var t = e.getBoundingClientRect(), r = se(t.width) / e.offsetWidth || 1, n = se(t.height) / e.offsetHeight || 1;
739
+ function Lr(e) {
740
+ var t = e.getBoundingClientRect(), r = le(t.width) / e.offsetWidth || 1, n = le(t.height) / e.offsetHeight || 1;
719
741
  return r !== 1 || n !== 1;
720
742
  }
721
- function Lr(e, t, r) {
743
+ function Vr(e, t, r) {
722
744
  r === void 0 && (r = !1);
723
- var n = z(t), o = z(t) && Ir(t), i = Y(t), a = le(e, o, r), l = {
745
+ var n = z(t), o = z(t) && Lr(t), i = K(t), a = pe(e, o, r), l = {
724
746
  scrollLeft: 0,
725
747
  scrollTop: 0
726
748
  }, s = {
727
749
  x: 0,
728
750
  y: 0
729
751
  };
730
- return (n || !n && !r) && ((H(t) !== "body" || Qe(i)) && (l = Mr(t)), z(t) ? (s = le(t, !0), s.x += t.clientLeft, s.y += t.clientTop) : i && (s.x = Je(i))), {
752
+ return (n || !n && !r) && ((H(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
753
+ Ze(i)) && (l = Mr(t)), z(t) ? (s = pe(t, !0), s.x += t.clientLeft, s.y += t.clientTop) : i && (s.x = Qe(i))), {
731
754
  x: a.left + l.scrollLeft - s.x,
732
755
  y: a.top + l.scrollTop - s.y,
733
756
  width: a.width,
734
757
  height: a.height
735
758
  };
736
759
  }
737
- function Vr(e) {
760
+ function Ir(e) {
738
761
  var t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), n = [];
739
762
  e.forEach(function(i) {
740
763
  t.set(i.name, i);
@@ -754,8 +777,8 @@ function Vr(e) {
754
777
  }), n;
755
778
  }
756
779
  function qr(e) {
757
- var t = Vr(e);
758
- return qe.reduce(function(r, n) {
780
+ var t = Ir(e);
781
+ return Fe.reduce(function(r, n) {
759
782
  return r.concat(t.filter(function(o) {
760
783
  return o.phase === n;
761
784
  }));
@@ -771,53 +794,53 @@ function Fr(e) {
771
794
  })), t;
772
795
  };
773
796
  }
774
- function X(e) {
797
+ function Y(e) {
775
798
  for (var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++)
776
799
  r[n - 1] = arguments[n];
777
800
  return [].concat(r).reduce(function(o, i) {
778
801
  return o.replace(/%s/, i);
779
802
  }, e);
780
803
  }
781
- var _ = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s', Wr = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available', vt = ["name", "enabled", "phase", "fn", "effect", "requires", "options"];
804
+ var ee = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s', Wr = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available', ht = ["name", "enabled", "phase", "fn", "effect", "requires", "options"];
782
805
  function Hr(e) {
783
806
  e.forEach(function(t) {
784
- [].concat(Object.keys(t), vt).filter(function(r, n, o) {
807
+ [].concat(Object.keys(t), ht).filter(function(r, n, o) {
785
808
  return o.indexOf(r) === n;
786
809
  }).forEach(function(r) {
787
810
  switch (r) {
788
811
  case "name":
789
- typeof t.name != "string" && console.error(X(_, String(t.name), '"name"', '"string"', '"' + String(t.name) + '"'));
812
+ typeof t.name != "string" && console.error(Y(ee, String(t.name), '"name"', '"string"', '"' + String(t.name) + '"'));
790
813
  break;
791
814
  case "enabled":
792
- typeof t.enabled != "boolean" && console.error(X(_, t.name, '"enabled"', '"boolean"', '"' + String(t.enabled) + '"'));
815
+ typeof t.enabled != "boolean" && console.error(Y(ee, t.name, '"enabled"', '"boolean"', '"' + String(t.enabled) + '"'));
793
816
  break;
794
817
  case "phase":
795
- qe.indexOf(t.phase) < 0 && console.error(X(_, t.name, '"phase"', "either " + qe.join(", "), '"' + String(t.phase) + '"'));
818
+ Fe.indexOf(t.phase) < 0 && console.error(Y(ee, t.name, '"phase"', "either " + Fe.join(", "), '"' + String(t.phase) + '"'));
796
819
  break;
797
820
  case "fn":
798
- typeof t.fn != "function" && console.error(X(_, t.name, '"fn"', '"function"', '"' + String(t.fn) + '"'));
821
+ typeof t.fn != "function" && console.error(Y(ee, t.name, '"fn"', '"function"', '"' + String(t.fn) + '"'));
799
822
  break;
800
823
  case "effect":
801
- t.effect != null && typeof t.effect != "function" && console.error(X(_, t.name, '"effect"', '"function"', '"' + String(t.fn) + '"'));
824
+ t.effect != null && typeof t.effect != "function" && console.error(Y(ee, t.name, '"effect"', '"function"', '"' + String(t.fn) + '"'));
802
825
  break;
803
826
  case "requires":
804
- t.requires != null && !Array.isArray(t.requires) && console.error(X(_, t.name, '"requires"', '"array"', '"' + String(t.requires) + '"'));
827
+ t.requires != null && !Array.isArray(t.requires) && console.error(Y(ee, t.name, '"requires"', '"array"', '"' + String(t.requires) + '"'));
805
828
  break;
806
829
  case "requiresIfExists":
807
- Array.isArray(t.requiresIfExists) || console.error(X(_, t.name, '"requiresIfExists"', '"array"', '"' + String(t.requiresIfExists) + '"'));
830
+ Array.isArray(t.requiresIfExists) || console.error(Y(ee, t.name, '"requiresIfExists"', '"array"', '"' + String(t.requiresIfExists) + '"'));
808
831
  break;
809
832
  case "options":
810
833
  case "data":
811
834
  break;
812
835
  default:
813
- console.error('PopperJS: an invalid property has been provided to the "' + t.name + '" modifier, valid properties are ' + vt.map(function(n) {
836
+ console.error('PopperJS: an invalid property has been provided to the "' + t.name + '" modifier, valid properties are ' + ht.map(function(n) {
814
837
  return '"' + n + '"';
815
838
  }).join(", ") + '; but "' + r + '" was provided.');
816
839
  }
817
840
  t.requires && t.requires.forEach(function(n) {
818
841
  e.find(function(o) {
819
842
  return o.name === n;
820
- }) == null && console.error(X(Wr, String(t.name), n, n));
843
+ }) == null && console.error(Y(Wr, String(t.name), n, n));
821
844
  });
822
845
  });
823
846
  });
@@ -842,12 +865,12 @@ function Xr(e) {
842
865
  return t[r];
843
866
  });
844
867
  }
845
- var ht = "Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.", Yr = "Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.", mt = {
868
+ var gt = "Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.", Yr = "Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.", mt = {
846
869
  placement: "bottom",
847
870
  modifiers: [],
848
871
  strategy: "absolute"
849
872
  };
850
- function gt() {
873
+ function bt() {
851
874
  for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
852
875
  t[r] = arguments[r];
853
876
  return !t.some(function(n) {
@@ -874,56 +897,61 @@ function Kr(e) {
874
897
  state: p,
875
898
  setOptions: function(w) {
876
899
  var C = typeof w == "function" ? w(p.options) : w;
877
- m(), p.options = Object.assign({}, i, p.options, C), p.scrollParents = {
878
- reference: ne(l) ? he(l) : l.contextElement ? he(l.contextElement) : [],
879
- popper: he(s)
900
+ g(), p.options = Object.assign({}, i, p.options, C), p.scrollParents = {
901
+ reference: oe(l) ? ge(l) : l.contextElement ? ge(l.contextElement) : [],
902
+ popper: ge(s)
880
903
  };
881
- var $ = qr(Xr([].concat(n, p.options.modifiers)));
882
- if (p.orderedModifiers = $.filter(function(b) {
904
+ var x = qr(Xr([].concat(n, p.options.modifiers)));
905
+ if (p.orderedModifiers = x.filter(function(b) {
883
906
  return b.enabled;
884
907
  }), process.env.NODE_ENV !== "production") {
885
- var d = Ur([].concat($, p.options.modifiers), function(b) {
908
+ var d = Ur([].concat(x, p.options.modifiers), function(b) {
886
909
  var D = b.name;
887
910
  return D;
888
911
  });
889
- if (Hr(d), V(p.options.placement) === Te) {
890
- var g = p.orderedModifiers.find(function(b) {
912
+ if (Hr(d), I(p.options.placement) === Te) {
913
+ var m = p.orderedModifiers.find(function(b) {
891
914
  var D = b.name;
892
915
  return D === "flip";
893
916
  });
894
- g || console.error(['Popper: "auto" placements require the "flip" modifier be', "present and enabled to work."].join(" "));
917
+ m || console.error(['Popper: "auto" placements require the "flip" modifier be', "present and enabled to work."].join(" "));
895
918
  }
896
- var c = q(s), x = c.marginTop, E = c.marginRight, S = c.marginBottom, k = c.marginLeft;
897
- [x, E, S, k].some(function(b) {
919
+ var c = q(s), $ = c.marginTop, E = c.marginRight, S = c.marginBottom, k = c.marginLeft;
920
+ [$, E, S, k].some(function(b) {
898
921
  return parseFloat(b);
899
922
  }) && console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', "between the popper and its reference element or boundary.", "To replicate margin, use the `offset` modifier, as well as", "the `padding` option in the `preventOverflow` and `flip`", "modifiers."].join(" "));
900
923
  }
901
924
  return O(), u.update();
902
925
  },
926
+ // Sync update – it will always be executed, even if not necessary. This
927
+ // is useful for low frequency updates where sync behavior simplifies the
928
+ // logic.
929
+ // For high frequency updates (e.g. `resize` and `scroll` events), always
930
+ // prefer the async Popper#update method
903
931
  forceUpdate: function() {
904
932
  if (!y) {
905
- var w = p.elements, C = w.reference, $ = w.popper;
906
- if (!gt(C, $)) {
907
- process.env.NODE_ENV !== "production" && console.error(ht);
933
+ var w = p.elements, C = w.reference, x = w.popper;
934
+ if (!bt(C, x)) {
935
+ process.env.NODE_ENV !== "production" && console.error(gt);
908
936
  return;
909
937
  }
910
938
  p.rects = {
911
- reference: Lr(C, $e($), p.options.strategy === "fixed"),
912
- popper: Ye($)
939
+ reference: Vr(C, Ce(x), p.options.strategy === "fixed"),
940
+ popper: Ke(x)
913
941
  }, p.reset = !1, p.placement = p.options.placement, p.orderedModifiers.forEach(function(b) {
914
942
  return p.modifiersData[b.name] = Object.assign({}, b.data);
915
943
  });
916
- for (var d = 0, g = 0; g < p.orderedModifiers.length; g++) {
944
+ for (var d = 0, m = 0; m < p.orderedModifiers.length; m++) {
917
945
  if (process.env.NODE_ENV !== "production" && (d += 1, d > 100)) {
918
946
  console.error(Yr);
919
947
  break;
920
948
  }
921
949
  if (p.reset === !0) {
922
- p.reset = !1, g = -1;
950
+ p.reset = !1, m = -1;
923
951
  continue;
924
952
  }
925
- var c = p.orderedModifiers[g], x = c.fn, E = c.options, S = E === void 0 ? {} : E, k = c.name;
926
- typeof x == "function" && (p = x({
953
+ var c = p.orderedModifiers[m], $ = c.fn, E = c.options, S = E === void 0 ? {} : E, k = c.name;
954
+ typeof $ == "function" && (p = $({
927
955
  state: p,
928
956
  options: S,
929
957
  name: k,
@@ -932,36 +960,38 @@ function Kr(e) {
932
960
  }
933
961
  }
934
962
  },
963
+ // Async and optimistically optimized update – it will not be executed if
964
+ // not necessary (debounced to run at most once-per-tick)
935
965
  update: Fr(function() {
936
966
  return new Promise(function(v) {
937
967
  u.forceUpdate(), v(p);
938
968
  });
939
969
  }),
940
970
  destroy: function() {
941
- m(), y = !0;
971
+ g(), y = !0;
942
972
  }
943
973
  };
944
- if (!gt(l, s))
945
- return process.env.NODE_ENV !== "production" && console.error(ht), u;
974
+ if (!bt(l, s))
975
+ return process.env.NODE_ENV !== "production" && console.error(gt), u;
946
976
  u.setOptions(f).then(function(v) {
947
977
  !y && f.onFirstUpdate && f.onFirstUpdate(v);
948
978
  });
949
979
  function O() {
950
980
  p.orderedModifiers.forEach(function(v) {
951
- var w = v.name, C = v.options, $ = C === void 0 ? {} : C, d = v.effect;
981
+ var w = v.name, C = v.options, x = C === void 0 ? {} : C, d = v.effect;
952
982
  if (typeof d == "function") {
953
- var g = d({
983
+ var m = d({
954
984
  state: p,
955
985
  name: w,
956
986
  instance: u,
957
- options: $
987
+ options: x
958
988
  }), c = function() {
959
989
  };
960
- h.push(g || c);
990
+ h.push(m || c);
961
991
  }
962
992
  });
963
993
  }
964
- function m() {
994
+ function g() {
965
995
  h.forEach(function(v) {
966
996
  return v();
967
997
  }), h = [];
@@ -1006,7 +1036,7 @@ const Qr = {
1006
1036
  return this.variant ? !this.variantClassPrefix || this.hasVariantPrefix ? this.variant : `${this.variantClassPrefix}-${this.variant}` : "";
1007
1037
  }
1008
1038
  }
1009
- }, _r = Mt({
1039
+ }, _r = U({
1010
1040
  mixins: [Qr, Zr],
1011
1041
  props: {
1012
1042
  active: Boolean,
@@ -1042,16 +1072,16 @@ const Qr = {
1042
1072
  return r;
1043
1073
  };
1044
1074
  function tn(e, t, r, n, o, i) {
1045
- return W(), ee(He(e.component), me(e.$attrs, {
1075
+ return W(), te(Ue(e.component), me(e.$attrs, {
1046
1076
  disabled: e.disabled,
1047
1077
  class: e.classes,
1048
1078
  role: "button"
1049
1079
  }), {
1050
- default: B(() => [P(e.$slots, "default", {}, () => [ge(be(e.label), 1)])]),
1080
+ default: B(() => [P(e.$slots, "default", {}, () => [be(ye(e.label), 1)])]),
1051
1081
  _: 3
1052
1082
  }, 16, ["disabled", "class"]);
1053
1083
  }
1054
- const rn = /* @__PURE__ */ en(_r, [["render", tn]]), nn = {
1084
+ const rn = /* @__PURE__ */ en(_r, [["render", tn]]), nn = U({
1055
1085
  props: {
1056
1086
  componentPrefix: String,
1057
1087
  size: String,
@@ -1062,28 +1092,38 @@ const rn = /* @__PURE__ */ en(_r, [["render", tn]]), nn = {
1062
1092
  return this.sizePrefix || this.componentPrefix;
1063
1093
  },
1064
1094
  hasSizeablePrefix() {
1065
- return this.size && !!this.size.match(new RegExp(`^${this.sizeableClassPrefix}`));
1095
+ return this.size === void 0 ? !1 : !!this.size.match(new RegExp(`^${this.sizeableClassPrefix}`));
1066
1096
  },
1067
1097
  sizeableClass() {
1068
1098
  return this.size ? !this.sizeableClassPrefix || this.hasSizeablePrefix ? this.size : `${this.sizeableClassPrefix}-${this.size}` : "";
1069
1099
  }
1070
1100
  }
1071
- }, on = (e, t) => {
1072
- const r = e.__vccOpts || e;
1073
- for (const [n, o] of t)
1074
- r[n] = o;
1075
- return r;
1076
- }, an = {
1101
+ }), on = U({
1077
1102
  name: "BtnGroup",
1078
1103
  mixins: [nn],
1079
1104
  props: {
1105
+ /**
1106
+ * The size prefix.
1107
+ *
1108
+ * @param {String}
1109
+ */
1080
1110
  sizePrefix: {
1081
1111
  type: String,
1082
1112
  default() {
1083
1113
  return "btn-group";
1084
1114
  }
1085
1115
  },
1116
+ /**
1117
+ * Denote the button group as toggle buttons
1118
+ *
1119
+ * @type {Boolean}
1120
+ */
1086
1121
  toggle: Boolean,
1122
+ /**
1123
+ * Display the buttons vertically
1124
+ *
1125
+ * @type {Boolean}
1126
+ */
1087
1127
  vertical: Boolean
1088
1128
  },
1089
1129
  computed: {
@@ -1096,37 +1136,47 @@ const rn = /* @__PURE__ */ en(_r, [["render", tn]]), nn = {
1096
1136
  };
1097
1137
  }
1098
1138
  }
1139
+ }), an = (e, t) => {
1140
+ const r = e.__vccOpts || e;
1141
+ for (const [n, o] of t)
1142
+ r[n] = o;
1143
+ return r;
1099
1144
  }, sn = ["data-toggle"];
1100
1145
  function ln(e, t, r, n, o, i) {
1101
- return W(), Ue("div", {
1102
- class: F(i.classes),
1103
- "data-toggle": r.toggle ? "buttons" : !1,
1146
+ return W(), Xe("div", {
1147
+ class: F(e.classes),
1148
+ "data-toggle": e.toggle ? "buttons" : !1,
1104
1149
  role: "group"
1105
1150
  }, [P(e.$slots, "default")], 10, sn);
1106
1151
  }
1107
- const pn = /* @__PURE__ */ on(an, [["render", ln]]);
1108
- function Ve(e, t) {
1152
+ const pn = /* @__PURE__ */ an(on, [["render", ln]]);
1153
+ U({
1154
+ name: "BtnGroupToggle"
1155
+ });
1156
+ function qe(e, t) {
1109
1157
  e.props.class = `${e.props.class || ""} ${t}`.trim();
1110
1158
  }
1111
- function Bt(e) {
1159
+ function Dt(e) {
1112
1160
  for (const t of e) {
1113
- t.type === Lt && Bt(t.children), t.props = Object.assign({ class: void 0 }, t.props), t.attrs = Object.assign({}, t.attrs), t.attrs.on || (t.attrs.on = {});
1161
+ t.type === Vt && Dt(t.children), t.props = Object.assign({
1162
+ class: void 0
1163
+ }, t.props), t.attrs = Object.assign({}, t.attrs), t.attrs.on || (t.attrs.on = {});
1114
1164
  const r = t.props.class && t.props.class.match(/dropdown-item/), n = t.props.class && t.props.class.match(/dropdown-divider/);
1115
- typeof t.type == "string" && t.type.match(/^h\d$/) ? Ve(t, "dropdown-header") : t.type === "hr" && !n ? (t.type = "div", Ve(t, "dropdown-divider")) : !r && !n && Ve(t, "dropdown-item");
1165
+ typeof t.type == "string" && t.type.match(/^h\d$/) ? qe(t, "dropdown-header") : t.type === "hr" && !n ? (t.type = "div", qe(t, "dropdown-divider")) : !r && !n && qe(t, "dropdown-item");
1116
1166
  }
1117
1167
  return e;
1118
1168
  }
1119
- const fn = (e, t) => It("div", {}, Bt(t.slots.default())), un = fn, Ce = (e, t) => {
1120
- const r = e.__vccOpts || e;
1121
- for (const [n, o] of t)
1122
- r[n] = o;
1123
- return r;
1124
- }, dn = {
1169
+ const fn = (e, t) => Lt("div", {}, Dt(t.slots.default())), un = U({
1125
1170
  name: "DropdownMenu",
1126
1171
  components: {
1127
- DropdownMenuItems: un
1172
+ DropdownMenuItems: fn
1128
1173
  },
1129
1174
  props: {
1175
+ /**
1176
+ * Display the dropdown menu aligned left or right
1177
+ *
1178
+ * @property String
1179
+ */
1130
1180
  align: {
1131
1181
  type: String,
1132
1182
  default: "left",
@@ -1134,50 +1184,68 @@ const fn = (e, t) => It("div", {}, Bt(t.slots.default())), un = fn, Ce = (e, t)
1134
1184
  return ["left", "right"].indexOf(e.toLowerCase()) !== -1;
1135
1185
  }
1136
1186
  },
1187
+ /**
1188
+ * The default visibility of the dropdown menu.
1189
+ *
1190
+ * @property Object
1191
+ */
1137
1192
  show: Boolean
1138
1193
  }
1194
+ }), dn = (e, t) => {
1195
+ const r = e.__vccOpts || e;
1196
+ for (const [n, o] of t)
1197
+ r[n] = o;
1198
+ return r;
1139
1199
  }, cn = ["aria-labelledby"];
1140
1200
  function vn(e, t, r, n, o, i) {
1141
- const a = te("dropdown-menu-items");
1142
- return W(), Ue("div", {
1201
+ const a = re("dropdown-menu-items");
1202
+ return W(), Xe("div", {
1143
1203
  class: F(["dropdown-menu", {
1144
- "dropdown-menu-left": r.align === "left",
1145
- "dropdown-menu-right": r.align === "right",
1146
- show: r.show
1204
+ "dropdown-menu-left": e.align === "left",
1205
+ "dropdown-menu-right": e.align === "right",
1206
+ show: e.show
1147
1207
  }]),
1148
1208
  "aria-labelledby": e.$attrs.id
1149
- }, [
1150
- ye(a, null, {
1151
- default: B(() => [
1152
- P(e.$slots, "default", {
1153
- onClick: t[0] || (t[0] = (...l) => e.onItemClick && e.onItemClick(...l))
1154
- })
1155
- ]),
1156
- _: 3
1157
- })
1158
- ], 10, cn);
1209
+ }, [we(a, null, {
1210
+ default: B(() => [P(e.$slots, "default")]),
1211
+ _: 3
1212
+ })], 10, cn);
1159
1213
  }
1160
- const hn = /* @__PURE__ */ Ce(dn, [["render", vn]]), mn = {
1214
+ const hn = /* @__PURE__ */ dn(un, [["render", vn]]), gn = U({
1161
1215
  props: {
1162
1216
  expanded: {
1163
1217
  type: Boolean,
1164
1218
  default: !1
1165
1219
  },
1166
- id: String,
1167
- href: String,
1168
- to: [String, Object]
1220
+ id: {
1221
+ type: String,
1222
+ default: void 0
1223
+ },
1224
+ href: {
1225
+ type: String,
1226
+ default: void 0
1227
+ },
1228
+ to: {
1229
+ type: [String, Object],
1230
+ default: void 0
1231
+ }
1169
1232
  },
1170
1233
  computed: {
1171
1234
  is() {
1172
1235
  return this.to ? "router-link" : this.href ? "a" : "button";
1173
1236
  }
1174
1237
  }
1238
+ }), Ne = (e, t) => {
1239
+ const r = e.__vccOpts || e;
1240
+ for (const [n, o] of t)
1241
+ r[n] = o;
1242
+ return r;
1175
1243
  };
1176
- function gn(e, t, r, n, o, i) {
1177
- return W(), ee(He(i.is), me({ id: r.id }, r.to ? { to: r.to } : { href: r.href }, {
1244
+ function mn(e, t, r, n, o, i) {
1245
+ return W(), te(Ue(e.is), me({ id: e.id }, e.to ? { to: e.to } : { href: e.href }, {
1178
1246
  "aria-haspopup": "true",
1179
- "aria-expanded": r.expanded,
1180
- type: i.is === "button" ? "button" : void 0
1247
+ "aria-expanded": e.expanded,
1248
+ type: e.is === "button" ? "button" : void 0
1181
1249
  }), {
1182
1250
  default: B(() => [
1183
1251
  P(e.$slots, "default")
@@ -1185,15 +1253,25 @@ function gn(e, t, r, n, o, i) {
1185
1253
  _: 3
1186
1254
  }, 16, ["id", "aria-expanded", "type"]);
1187
1255
  }
1188
- const bn = /* @__PURE__ */ Ce(mn, [["render", gn]]), Dt = {
1256
+ const bn = /* @__PURE__ */ Ne(gn, [["render", mn]]), At = {
1189
1257
  components: {
1190
1258
  BtnDropdownAction: bn,
1191
1259
  BtnGroup: pn,
1192
1260
  DropdownMenu: hn
1193
1261
  },
1194
1262
  extends: rn,
1195
- emits: ["click-toggle", "show", "hide", "toggle"],
1263
+ emits: [
1264
+ "click-toggle",
1265
+ "show",
1266
+ "hide",
1267
+ "toggle"
1268
+ ],
1196
1269
  props: {
1270
+ /**
1271
+ * Display the dropdown menu aligned left or right
1272
+ *
1273
+ * @property String
1274
+ */
1197
1275
  align: {
1198
1276
  type: String,
1199
1277
  default: "left",
@@ -1201,48 +1279,133 @@ const bn = /* @__PURE__ */ Ce(mn, [["render", gn]]), Dt = {
1201
1279
  return ["left", "right"].indexOf(e.toLowerCase()) !== -1;
1202
1280
  }
1203
1281
  },
1282
+ /**
1283
+ * Should animate the dropdown opening.
1284
+ *
1285
+ * @property {Boolean}
1286
+ */
1204
1287
  animated: {
1205
1288
  type: Boolean,
1206
1289
  default: !0
1207
1290
  },
1291
+ /**
1292
+ * Additional button classes.
1293
+ *
1294
+ * @property {Object|String}
1295
+ */
1208
1296
  buttonClass: [Object, String],
1297
+ /**
1298
+ * Show the caret.
1299
+ *
1300
+ * @property {Boolean}
1301
+ */
1209
1302
  caret: {
1210
1303
  type: Boolean,
1211
1304
  default: !0
1212
1305
  },
1306
+ /**
1307
+ * Should display the toggle button as a circle.
1308
+ *
1309
+ * @property Boolean
1310
+ */
1311
+ // circle: {
1312
+ // type: Boolean,
1313
+ // default: false
1314
+ // },
1315
+ /**
1316
+ * Display as a dropup instead of a dropdown.
1317
+ *
1318
+ * @property Boolean
1319
+ */
1213
1320
  dropup: {
1214
1321
  type: Boolean,
1215
1322
  default: !1
1216
1323
  },
1324
+ /**
1325
+ * Display as a dropright instead of a dropdown.
1326
+ *
1327
+ * @property Boolean
1328
+ */
1217
1329
  dropright: {
1218
1330
  type: Boolean,
1219
1331
  default: !1
1220
1332
  },
1333
+ /**
1334
+ * Display as a dropleft instead of a dropdown.
1335
+ *
1336
+ * @property Boolean
1337
+ */
1221
1338
  dropleft: {
1222
1339
  type: Boolean,
1223
1340
  default: !1
1224
1341
  },
1342
+ /**
1343
+ * The action height.
1344
+ *
1345
+ * @property {String}
1346
+ */
1225
1347
  height: String,
1348
+ /**
1349
+ * The href action.
1350
+ *
1351
+ * @property {String}
1352
+ */
1226
1353
  href: String,
1354
+ /**
1355
+ * Is the dropdown a nav item?
1356
+ *
1357
+ * @property {Boolean}
1358
+ */
1227
1359
  nav: Boolean,
1360
+ /**
1361
+ * The toggle button's label. If not defined as an attribute,
1362
+ * you can override with the component's slot (inner html).
1363
+ *
1364
+ * @property {String}
1365
+ */
1228
1366
  label: String,
1229
1367
  offset: {
1230
1368
  type: Number,
1231
1369
  default: 5
1232
1370
  },
1371
+ /**
1372
+ * Should rotate the toggle button when opened.
1373
+ *
1374
+ * @property {Boolean}
1375
+ */
1233
1376
  rotate: {
1234
1377
  type: Boolean,
1235
1378
  default: !1
1236
1379
  },
1380
+ /**
1381
+ * Display the dropdown button with a split toggle button.
1382
+ *
1383
+ * @property {Boolean}
1384
+ */
1237
1385
  split: {
1238
1386
  type: Boolean,
1239
1387
  default: !1
1240
1388
  },
1389
+ /**
1390
+ * The "to" path, used for vue-router.
1391
+ *
1392
+ * @property {String|Object}
1393
+ */
1241
1394
  to: [String, Object],
1395
+ /**
1396
+ * The button type attribute.
1397
+ *
1398
+ * @property {String}
1399
+ */
1242
1400
  type: {
1243
1401
  type: String,
1244
1402
  default: "button"
1245
1403
  },
1404
+ /**
1405
+ * The action width.
1406
+ *
1407
+ * @property {String}
1408
+ */
1246
1409
  width: String
1247
1410
  },
1248
1411
  data() {
@@ -1255,6 +1418,7 @@ const bn = /* @__PURE__ */ Ce(mn, [["render", gn]]), Dt = {
1255
1418
  computed: {
1256
1419
  scope() {
1257
1420
  return {
1421
+ // Pass the computed props.
1258
1422
  placement: this.placement,
1259
1423
  variantClassPrefix: this.variantClassPrefix,
1260
1424
  sizeableClassPrefix: this.sizeableClassPrefix,
@@ -1262,6 +1426,7 @@ const bn = /* @__PURE__ */ Ce(mn, [["render", gn]]), Dt = {
1262
1426
  actionClasses: this.actionClasses,
1263
1427
  toggleStyle: this.toggleStyle,
1264
1428
  toggleClasses: this.toggleClasses,
1429
+ // Pass the methods
1265
1430
  focus: this.focus,
1266
1431
  queryFocusable: this.queryFocusable,
1267
1432
  isFocusable: this.isFocusable,
@@ -1330,22 +1495,47 @@ const bn = /* @__PURE__ */ Ce(mn, [["render", gn]]), Dt = {
1330
1495
  this.popper && this.popper.destroy();
1331
1496
  },
1332
1497
  methods: {
1498
+ /**
1499
+ * Focus on the the dropdown toggle button
1500
+ *
1501
+ * @return void
1502
+ */
1333
1503
  focus() {
1334
1504
  this.$el.querySelector(".dropdown-toggle").focus();
1335
1505
  },
1506
+ /**
1507
+ * Focus on the the dropdown toggle button
1508
+ *
1509
+ * @return void
1510
+ */
1336
1511
  queryFocusable() {
1337
1512
  return this.$el.querySelector(".dropdown-menu").querySelectorAll('label, input, select, textarea, [tabindex]:not([tabindex="-1"])');
1338
1513
  },
1514
+ /**
1515
+ * Method to check if the given element is focusable.
1516
+ *
1517
+ * @return void
1518
+ */
1339
1519
  isFocusable(e) {
1340
1520
  const t = this.queryFocusable();
1341
- for (let r in t)
1521
+ for (const r in t)
1342
1522
  if (e === t[r])
1343
1523
  return !0;
1344
1524
  return !1;
1345
1525
  },
1346
- toggle(e) {
1526
+ /**
1527
+ * Toggle the dropdown menu
1528
+ *
1529
+ * @return void
1530
+ */
1531
+ toggle() {
1347
1532
  this.expanded ? this.hide() : this.show();
1348
1533
  },
1534
+ /**
1535
+ * Show the dropdown menu
1536
+ *
1537
+ * @return void
1538
+ */
1349
1539
  show() {
1350
1540
  this.expanded = !0;
1351
1541
  const e = this.$refs.split && this.$refs.split.$el || this.$el;
@@ -1354,26 +1544,49 @@ const bn = /* @__PURE__ */ Ce(mn, [["render", gn]]), Dt = {
1354
1544
  onFirstUpdate: () => {
1355
1545
  this.triggerAnimation = this.animated;
1356
1546
  },
1357
- modifiers: [{
1358
- name: "offset",
1359
- options: {
1360
- offset: [0, this.nav ? 1 : this.offset]
1547
+ modifiers: [
1548
+ {
1549
+ name: "offset",
1550
+ options: {
1551
+ offset: [0, this.nav ? 1 : this.offset]
1552
+ // offset: ['.125rem', !this.nav ? 4 : 1],
1553
+ }
1361
1554
  }
1362
- }]
1555
+ ]
1363
1556
  }) : this.popper && this.popper.update();
1364
1557
  },
1558
+ /**
1559
+ * Hide the dropdown menu
1560
+ *
1561
+ * @return void
1562
+ */
1365
1563
  hide() {
1366
1564
  this.expanded = !1;
1367
1565
  },
1566
+ /**
1567
+ * A callback function for the `blur-item` event.
1568
+ *
1569
+ * @return void
1570
+ */
1368
1571
  onBlur(e) {
1369
1572
  (!this.$refs.menu.$el.contains(e.relatedTarget) || !this.$el.contains(e.relatedTarget)) && this.hide();
1370
1573
  },
1371
1574
  onClickDocument(e) {
1372
1575
  this.$el.contains(e.target) || this.hide();
1373
1576
  },
1577
+ /**
1578
+ * A callback function for the `click-item` event.
1579
+ *
1580
+ * @return void
1581
+ */
1374
1582
  onClickItem(e) {
1375
1583
  this.isFocusable(e.target) || this.hide();
1376
1584
  },
1585
+ /**
1586
+ * A callback function for the `click-toggle` event.
1587
+ *
1588
+ * @return void
1589
+ */
1377
1590
  onClickToggle(e) {
1378
1591
  e.target.dispatchEvent(new Event("focus", e)), this.$emit("click-toggle", e), e.defaultPrevented || this.toggle();
1379
1592
  },
@@ -1390,22 +1603,75 @@ const bn = /* @__PURE__ */ Ce(mn, [["render", gn]]), Dt = {
1390
1603
  });
1391
1604
  }
1392
1605
  }
1393
- }, yn = {
1606
+ }, yn = U({
1607
+ mixins: [
1608
+ At
1609
+ ]
1610
+ });
1611
+ function wn(e, t, r, n, o, i) {
1612
+ const a = re("btn-dropdown-action"), l = re("dropdown-menu"), s = re("btn-group");
1613
+ return W(), te(s, {
1614
+ class: F(e.classes)
1615
+ }, {
1616
+ default: B(() => [
1617
+ P(e.$slots, "button", ae(Re(e.scope)), () => [
1618
+ we(a, {
1619
+ id: e.$attrs.id,
1620
+ ref: "button",
1621
+ expanded: e.expanded,
1622
+ href: e.href,
1623
+ to: e.to,
1624
+ style: It(e.toggleStyle),
1625
+ class: F(e.toggleClasses),
1626
+ onBlur: e.onBlur,
1627
+ onClick: e.onClickToggle
1628
+ }, {
1629
+ default: B(() => [
1630
+ P(e.$slots, "icon"),
1631
+ P(e.$slots, "label", {}, () => [
1632
+ be(ye(e.label), 1)
1633
+ ])
1634
+ ]),
1635
+ _: 3
1636
+ }, 8, ["id", "expanded", "href", "to", "style", "class", "onBlur", "onClick"])
1637
+ ]),
1638
+ we(l, {
1639
+ id: e.$attrs.id,
1640
+ ref: "menu",
1641
+ align: e.align,
1642
+ show: e.expanded,
1643
+ class: F({ animated: e.triggerAnimation }),
1644
+ onBlur: e.onBlur,
1645
+ onClick: e.onClickItem,
1646
+ onKeydown: yt(e.onKeydown, ["tab"]),
1647
+ onMousedown: t[0] || (t[0] = wt(() => {
1648
+ }, ["prevent"]))
1649
+ }, {
1650
+ default: B(() => [
1651
+ P(e.$slots, "default")
1652
+ ]),
1653
+ _: 3
1654
+ }, 8, ["id", "align", "show", "class", "onBlur", "onClick", "onKeydown"])
1655
+ ]),
1656
+ _: 3
1657
+ }, 8, ["class"]);
1658
+ }
1659
+ const On = /* @__PURE__ */ Ne(yn, [["render", wn]]), $n = U({
1394
1660
  mixins: [
1395
- Dt
1661
+ At
1396
1662
  ],
1397
1663
  emits: [
1398
1664
  "click"
1399
1665
  ]
1400
- }, wn = ["id", "aria-expanded"];
1401
- function On(e, t, r, n, o, i) {
1402
- const a = te("btn-dropdown-action"), l = te("dropdown-menu"), s = te("btn-group");
1403
- return W(), ee(s, {
1666
+ }), xn = ["id", "aria-expanded"];
1667
+ function Cn(e, t, r, n, o, i) {
1668
+ const a = re("btn-dropdown-action"), l = re("dropdown-menu"), s = re("btn-group");
1669
+ return W(), te(s, {
1404
1670
  class: F([e.classes, "btn-dropdown-split"])
1405
1671
  }, {
1406
1672
  default: B(() => [
1407
- e.dropleft ? de("", !0) : P(e.$slots, "button", ie(me({ key: 0 }, e.scope)), () => [
1408
- e.dropleft ? de("", !0) : (W(), ee(a, {
1673
+ e.dropleft ? ce("", !0) : P(e.$slots, "button", ae(me({ key: 0 }, e.scope)), () => [
1674
+ e.dropleft ? ce("", !0) : (W(), te(a, {
1409
1675
  key: 0,
1410
1676
  id: e.$attrs.id,
1411
1677
  ref: "button",
@@ -1418,16 +1684,16 @@ function On(e, t, r, n, o, i) {
1418
1684
  default: B(() => [
1419
1685
  P(e.$slots, "icon"),
1420
1686
  P(e.$slots, "label", {}, () => [
1421
- ge(be(e.label), 1)
1687
+ be(ye(e.label), 1)
1422
1688
  ])
1423
1689
  ]),
1424
1690
  _: 3
1425
1691
  }, 8, ["id", "expanded", "href", "to", "class"]))
1426
1692
  ]),
1427
- ye(s, { ref: "split" }, {
1693
+ we(s, { ref: "split" }, {
1428
1694
  default: B(() => [
1429
- P(e.$slots, "split", ie(Re(e.scope)), () => [
1430
- e.split ? (W(), Ue("button", {
1695
+ P(e.$slots, "split", ae(Re(e.scope)), () => [
1696
+ e.split ? (W(), Xe("button", {
1431
1697
  key: 0,
1432
1698
  id: e.$attrs.id,
1433
1699
  type: "button",
@@ -1436,9 +1702,9 @@ function On(e, t, r, n, o, i) {
1436
1702
  class: F(e.toggleClasses),
1437
1703
  onBlur: t[1] || (t[1] = (...f) => e.onBlur && e.onBlur(...f)),
1438
1704
  onClick: t[2] || (t[2] = (...f) => e.onClickToggle && e.onClickToggle(...f))
1439
- }, null, 42, wn)) : de("", !0)
1705
+ }, null, 42, xn)) : ce("", !0)
1440
1706
  ]),
1441
- ye(l, {
1707
+ we(l, {
1442
1708
  id: e.$attrs.id,
1443
1709
  ref: "menu",
1444
1710
  align: e.align,
@@ -1446,8 +1712,8 @@ function On(e, t, r, n, o, i) {
1446
1712
  class: F({ animated: e.triggerAnimation }),
1447
1713
  onBlur: e.onBlur,
1448
1714
  onClick: e.onClickItem,
1449
- onKeydown: bt(e.onKeydown, ["tab"]),
1450
- onMousedown: t[3] || (t[3] = yt(() => {
1715
+ onKeydown: yt(e.onKeydown, ["tab"]),
1716
+ onMousedown: t[3] || (t[3] = wt(() => {
1451
1717
  }, ["prevent"]))
1452
1718
  }, {
1453
1719
  default: B(() => [
@@ -1458,8 +1724,8 @@ function On(e, t, r, n, o, i) {
1458
1724
  ]),
1459
1725
  _: 3
1460
1726
  }, 512),
1461
- e.dropleft ? P(e.$slots, "button", ie(me({ key: 1 }, e.scope)), () => [
1462
- e.dropleft ? (W(), ee(a, {
1727
+ e.dropleft ? P(e.$slots, "button", ae(me({ key: 1 }, e.scope)), () => [
1728
+ e.dropleft ? (W(), te(a, {
1463
1729
  key: 0,
1464
1730
  id: e.$attrs.id,
1465
1731
  ref: "button",
@@ -1472,75 +1738,21 @@ function On(e, t, r, n, o, i) {
1472
1738
  default: B(() => [
1473
1739
  P(e.$slots, "icon"),
1474
1740
  P(e.$slots, "label", {}, () => [
1475
- ge(be(e.label), 1)
1741
+ be(ye(e.label), 1)
1476
1742
  ])
1477
1743
  ]),
1478
1744
  _: 3
1479
- }, 8, ["id", "expanded", "href", "to", "class"])) : de("", !0)
1480
- ]) : de("", !0)
1745
+ }, 8, ["id", "expanded", "href", "to", "class"])) : ce("", !0)
1746
+ ]) : ce("", !0)
1481
1747
  ]),
1482
1748
  _: 3
1483
1749
  }, 8, ["class"]);
1484
1750
  }
1485
- const xn = /* @__PURE__ */ Ce(yn, [["render", On]]), $n = {
1486
- mixins: [
1487
- Dt
1488
- ]
1489
- };
1490
- function Cn(e, t, r, n, o, i) {
1491
- const a = te("btn-dropdown-action"), l = te("dropdown-menu"), s = te("btn-group");
1492
- return W(), ee(s, {
1493
- class: F(e.classes)
1494
- }, {
1495
- default: B(() => [
1496
- P(e.$slots, "button", ie(Re(e.scope)), () => [
1497
- ye(a, {
1498
- id: e.$attrs.id,
1499
- ref: "button",
1500
- expanded: e.expanded,
1501
- href: e.href,
1502
- to: e.to,
1503
- style: Vt(e.toggleStyle),
1504
- class: F(e.toggleClasses),
1505
- onBlur: e.onBlur,
1506
- onClick: e.onClickToggle
1507
- }, {
1508
- default: B(() => [
1509
- P(e.$slots, "icon"),
1510
- P(e.$slots, "label", {}, () => [
1511
- ge(be(e.label), 1)
1512
- ])
1513
- ]),
1514
- _: 3
1515
- }, 8, ["id", "expanded", "href", "to", "style", "class", "onBlur", "onClick"])
1516
- ]),
1517
- ye(l, {
1518
- id: e.$attrs.id,
1519
- ref: "menu",
1520
- align: e.align,
1521
- show: e.expanded,
1522
- class: F({ animated: e.triggerAnimation }),
1523
- onBlur: e.onBlur,
1524
- onClick: e.onClickItem,
1525
- onKeydown: bt(e.onKeydown, ["tab"]),
1526
- onMousedown: t[0] || (t[0] = yt(() => {
1527
- }, ["prevent"]))
1528
- }, {
1529
- default: B(() => [
1530
- P(e.$slots, "default")
1531
- ]),
1532
- _: 3
1533
- }, 8, ["id", "align", "show", "class", "onBlur", "onClick", "onKeydown"])
1534
- ]),
1535
- _: 3
1536
- }, 8, ["class"]);
1537
- }
1538
- const Pn = /* @__PURE__ */ Ce($n, [["render", Cn]]);
1539
- const En = {
1751
+ const Pn = /* @__PURE__ */ Ne($n, [["render", Cn]]), En = U({
1540
1752
  name: "BtnDropdown",
1541
1753
  components: {
1542
- BtnDropdownSplit: xn,
1543
- BtnDropdownSingle: Pn
1754
+ BtnDropdownSplit: Pn,
1755
+ BtnDropdownSingle: On
1544
1756
  },
1545
1757
  inheritAttrs: !1,
1546
1758
  emits: [
@@ -1551,9 +1763,9 @@ const En = {
1551
1763
  "hide",
1552
1764
  "toggle"
1553
1765
  ]
1554
- };
1766
+ });
1555
1767
  function Sn(e, t, r, n, o, i) {
1556
- return W(), ee(He(e.$attrs.split === void 0 || !!e.$attrs.nav ? "btn-dropdown-single" : "btn-dropdown-split"), me({ class: "btn-dropdown" }, e.$attrs, {
1768
+ return W(), te(Ue(e.$attrs.split === void 0 || e.$attrs.nav ? "btn-dropdown-single" : "btn-dropdown-split"), me({ class: "btn-dropdown" }, e.$attrs, {
1557
1769
  onClick: t[0] || (t[0] = (...a) => e.$emit("click", ...a)),
1558
1770
  onClickToggle: t[1] || (t[1] = (...a) => e.$emit("click-toggle", ...a)),
1559
1771
  onDropdown: t[2] || (t[2] = (...a) => e.$emit("dropdown", ...a)),
@@ -1565,10 +1777,10 @@ function Sn(e, t, r, n, o, i) {
1565
1777
  P(e.$slots, "icon")
1566
1778
  ]),
1567
1779
  button: B((a) => [
1568
- P(e.$slots, "button", ie(Re(a)))
1780
+ P(e.$slots, "button", ae(Re(a)))
1569
1781
  ]),
1570
1782
  split: B((a) => [
1571
- P(e.$slots, "split", ie(Re(a)))
1783
+ P(e.$slots, "split", ae(Re(a)))
1572
1784
  ]),
1573
1785
  default: B(() => [
1574
1786
  P(e.$slots, "default")
@@ -1579,14 +1791,14 @@ function Sn(e, t, r, n, o, i) {
1579
1791
  name: "label",
1580
1792
  fn: B(() => [
1581
1793
  P(e.$slots, "label", {}, () => [
1582
- ge(be(e.$attrs.label), 1)
1794
+ be(ye(e.$attrs.label), 1)
1583
1795
  ])
1584
1796
  ]),
1585
1797
  key: "0"
1586
1798
  } : void 0
1587
1799
  ]), 1040);
1588
1800
  }
1589
- const Bn = /* @__PURE__ */ Ce(En, [["render", Sn]]);
1801
+ const Bn = /* @__PURE__ */ Ne(En, [["render", Sn]]);
1590
1802
  export {
1591
1803
  Bn as BtnDropdown
1592
1804
  };