@vue-interface/btn-dropdown 2.0.0-beta.2 → 2.0.0-beta.5

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 { openBlock as W, createBlock as ee, resolveDynamicComponent as He, mergeProps as ge, withCtx as B, renderSlot as P, createTextVNode as be, toDisplayString as ye, createElementBlock as Ue, normalizeClass as F, h as Tt, Fragment as Nt, resolveComponent as te, createVNode as we, normalizeProps as ie, createCommentVNode as de, guardReactiveProps as Re, normalizeStyle as It, createSlots as Mt } from "vue";
2
- var R = "top", N = "bottom", I = "right", j = "left", ze = "auto", $e = [R, N, I, j], ae = "start", Oe = "end", Lt = "clippingParents", bt = "viewport", ve = "popper", Vt = "reference", st = /* @__PURE__ */ $e.reduce(function(e, t) {
3
- return e.concat([t + "-" + ae, t + "-" + Oe]);
4
- }, []), yt = /* @__PURE__ */ [].concat($e, [ze]).reduce(function(e, t) {
5
- return e.concat([t, t + "-" + ae, t + "-" + Oe]);
6
- }, []), qt = "beforeRead", Ft = "read", Wt = "afterRead", Ht = "beforeMain", Ut = "main", Xt = "afterMain", Yt = "beforeWrite", Gt = "write", Jt = "afterWrite", qe = [qt, Ft, Wt, Ht, Ut, Xt, Yt, Gt, Jt];
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];
7
7
  function H(e) {
8
8
  return e ? (e.nodeName || "").toLowerCase() : null;
9
9
  }
10
- function M(e) {
10
+ function I(e) {
11
11
  if (e == null)
12
12
  return window;
13
13
  if (e.toString() !== "[object Window]") {
@@ -17,30 +17,30 @@ function M(e) {
17
17
  return e;
18
18
  }
19
19
  function ne(e) {
20
- var t = M(e).Element;
20
+ var t = I(e).Element;
21
21
  return e instanceof t || e instanceof Element;
22
22
  }
23
- function T(e) {
24
- var t = M(e).HTMLElement;
23
+ function z(e) {
24
+ var t = I(e).HTMLElement;
25
25
  return e instanceof t || e instanceof HTMLElement;
26
26
  }
27
27
  function Xe(e) {
28
28
  if (typeof ShadowRoot > "u")
29
29
  return !1;
30
- var t = M(e).ShadowRoot;
30
+ var t = I(e).ShadowRoot;
31
31
  return e instanceof t || e instanceof ShadowRoot;
32
32
  }
33
- function Kt(e) {
33
+ function _t(e) {
34
34
  var t = e.state;
35
35
  Object.keys(t.elements).forEach(function(r) {
36
36
  var n = t.styles[r] || {}, o = t.attributes[r] || {}, i = t.elements[r];
37
- !T(i) || !H(i) || (Object.assign(i.style, n), Object.keys(o).forEach(function(a) {
37
+ !z(i) || !H(i) || (Object.assign(i.style, n), Object.keys(o).forEach(function(a) {
38
38
  var l = o[a];
39
39
  l === !1 ? i.removeAttribute(a) : i.setAttribute(a, l === !0 ? "" : l);
40
40
  }));
41
41
  });
42
42
  }
43
- function Qt(e) {
43
+ function er(e) {
44
44
  var t = e.state, r = {
45
45
  popper: {
46
46
  position: t.options.strategy,
@@ -58,18 +58,18 @@ function Qt(e) {
58
58
  var o = t.elements[n], i = t.attributes[n] || {}, a = Object.keys(t.styles.hasOwnProperty(n) ? t.styles[n] : r[n]), l = a.reduce(function(s, f) {
59
59
  return s[f] = "", s;
60
60
  }, {});
61
- !T(o) || !H(o) || (Object.assign(o.style, l), Object.keys(i).forEach(function(s) {
61
+ !z(o) || !H(o) || (Object.assign(o.style, l), Object.keys(i).forEach(function(s) {
62
62
  o.removeAttribute(s);
63
63
  }));
64
64
  });
65
65
  };
66
66
  }
67
- const Zt = {
67
+ const tr = {
68
68
  name: "applyStyles",
69
69
  enabled: !0,
70
70
  phase: "write",
71
- fn: Kt,
72
- effect: Qt,
71
+ fn: _t,
72
+ effect: er,
73
73
  requires: ["computeStyles"]
74
74
  };
75
75
  function V(e) {
@@ -82,14 +82,14 @@ function Fe() {
82
82
  return t.brand + "/" + t.version;
83
83
  }).join(" ") : navigator.userAgent;
84
84
  }
85
- function wt() {
85
+ function xt() {
86
86
  return !/^((?!chrome|android).)*safari/i.test(Fe());
87
87
  }
88
88
  function le(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 && T(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) ? M(e) : window, l = a.visualViewport, s = !wt() && 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 && 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;
93
93
  return {
94
94
  width: h,
95
95
  height: y,
@@ -110,7 +110,7 @@ function Ye(e) {
110
110
  height: n
111
111
  };
112
112
  }
113
- function Ot(e, t) {
113
+ function $t(e, t) {
114
114
  var r = t.getRootNode && t.getRootNode();
115
115
  if (e.contains(t))
116
116
  return !0;
@@ -125,29 +125,42 @@ function Ot(e, t) {
125
125
  return !1;
126
126
  }
127
127
  function q(e) {
128
- return M(e).getComputedStyle(e);
128
+ return I(e).getComputedStyle(e);
129
129
  }
130
- function _t(e) {
130
+ function rr(e) {
131
131
  return ["table", "td", "th"].indexOf(H(e)) >= 0;
132
132
  }
133
133
  function Y(e) {
134
- return ((ne(e) ? e.ownerDocument : e.document) || window.document).documentElement;
135
- }
136
- function Te(e) {
137
- return H(e) === "html" ? e : e.assignedSlot || e.parentNode || (Xe(e) ? e.host : null) || Y(e);
134
+ return ((ne(e) ? e.ownerDocument : (
135
+ // $FlowFixMe[prop-missing]
136
+ e.document
137
+ )) || window.document).documentElement;
138
+ }
139
+ function ze(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
+ (Xe(e) ? e.host : null) || // ShadowRoot detected
147
+ // $FlowFixMe[incompatible-call]: HTMLElement is a Node
148
+ Y(e)
149
+ );
138
150
  }
139
151
  function lt(e) {
140
- return !T(e) || q(e).position === "fixed" ? null : e.offsetParent;
152
+ return !z(e) || // https://github.com/popperjs/popper-core/issues/837
153
+ q(e).position === "fixed" ? null : e.offsetParent;
141
154
  }
142
- function er(e) {
155
+ function nr(e) {
143
156
  var t = /firefox/i.test(Fe()), r = /Trident/i.test(Fe());
144
- if (r && T(e)) {
157
+ if (r && z(e)) {
145
158
  var n = q(e);
146
159
  if (n.position === "fixed")
147
160
  return null;
148
161
  }
149
- var o = Te(e);
150
- for (Xe(o) && (o = o.host); T(o) && ["html", "body"].indexOf(H(o)) < 0; ) {
162
+ var o = ze(e);
163
+ for (Xe(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 er(e) {
155
168
  }
156
169
  return null;
157
170
  }
158
- function Ce(e) {
159
- for (var t = M(e), r = lt(e); r && _t(r) && q(r).position === "static"; )
171
+ function $e(e) {
172
+ for (var t = I(e), r = lt(e); r && rr(r) && q(r).position === "static"; )
160
173
  r = lt(r);
161
- return r && (H(r) === "html" || H(r) === "body" && q(r).position === "static") ? t : r || er(e) || t;
174
+ return r && (H(r) === "html" || H(r) === "body" && q(r).position === "static") ? t : r || nr(e) || t;
162
175
  }
163
- function Ge(e) {
176
+ function Ke(e) {
164
177
  return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
165
178
  }
166
- function he(e, t, r) {
179
+ function ve(e, t, r) {
167
180
  return re(e, je(t, r));
168
181
  }
169
- function tr(e, t, r) {
170
- var n = he(e, t, r);
182
+ function or(e, t, r) {
183
+ var n = ve(e, t, r);
171
184
  return n > r ? r : n;
172
185
  }
173
- function xt() {
186
+ function Ct() {
174
187
  return {
175
188
  top: 0,
176
189
  right: 0,
@@ -178,55 +191,55 @@ function xt() {
178
191
  left: 0
179
192
  };
180
193
  }
181
- function $t(e) {
182
- return Object.assign({}, xt(), e);
194
+ function Pt(e) {
195
+ return Object.assign({}, Ct(), e);
183
196
  }
184
- function Ct(e, t) {
197
+ function Et(e, t) {
185
198
  return t.reduce(function(r, n) {
186
199
  return r[n] = e, r;
187
200
  }, {});
188
201
  }
189
- var rr = function(t, r) {
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, $t(typeof t != "number" ? t : Ct(t, $e));
205
+ })) : t, Pt(typeof t != "number" ? t : Et(t, xe));
193
206
  };
194
- function nr(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 = Ge(l), f = [j, I].indexOf(l) >= 0, p = f ? "height" : "width";
207
+ function ar(e) {
208
+ 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";
196
209
  if (!(!i || !a)) {
197
- var h = rr(o.padding, r), y = Ye(i), u = s === "y" ? R : j, O = s === "y" ? N : I, m = 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, $ = m / 2 - v / 2, c = h[u], g = C - y[p] - h[O], d = C / 2 - y[p] / 2 + $, x = he(c, d, g), E = s;
198
- r.modifiersData[n] = (t = {}, t[E] = x, t.centerOffset = x - d, t);
210
+ 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;
211
+ r.modifiersData[n] = (t = {}, t[E] = x, t.centerOffset = x - c, t);
199
212
  }
200
213
  }
201
- function or(e) {
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" && (T(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(" "))), !Ot(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(" "))), !$t(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
  }
208
221
  t.elements.arrow = o;
209
222
  }
210
223
  }
211
- const ir = {
224
+ const lr = {
212
225
  name: "arrow",
213
226
  enabled: !0,
214
227
  phase: "main",
215
- fn: nr,
216
- effect: or,
228
+ fn: ar,
229
+ effect: sr,
217
230
  requires: ["popperOffsets"],
218
231
  requiresIfExists: ["preventOverflow"]
219
232
  };
220
233
  function pe(e) {
221
234
  return e.split("-")[1];
222
235
  }
223
- var ar = {
236
+ var pr = {
224
237
  top: "auto",
225
238
  right: "auto",
226
239
  bottom: "auto",
227
240
  left: "auto"
228
241
  };
229
- function sr(e) {
242
+ function fr(e) {
230
243
  var t = e.x, r = e.y, n = window, o = n.devicePixelRatio || 1;
231
244
  return {
232
245
  x: se(t * o) / o || 0,
@@ -242,23 +255,29 @@ function pt(e) {
242
255
  y: m
243
256
  };
244
257
  u = v.x, m = v.y;
245
- var w = a.hasOwnProperty("x"), C = a.hasOwnProperty("y"), $ = j, c = R, g = window;
258
+ var w = a.hasOwnProperty("x"), C = a.hasOwnProperty("y"), $ = j, d = R, g = window;
246
259
  if (f) {
247
- var d = Ce(r), x = "clientHeight", E = "clientWidth";
248
- if (d === M(r) && (d = Y(r), q(d).position !== "static" && l === "absolute" && (x = "scrollHeight", E = "scrollWidth")), d = d, o === R || (o === j || o === I) && i === Oe) {
249
- c = N;
250
- var S = h && d === g && g.visualViewport ? g.visualViewport.height : d[x];
260
+ var c = $e(r), x = "clientHeight", E = "clientWidth";
261
+ 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) {
262
+ d = N;
263
+ var S = h && c === g && g.visualViewport ? g.visualViewport.height : (
264
+ // $FlowFixMe[prop-missing]
265
+ c[x]
266
+ );
251
267
  m -= S - n.height, m *= s ? 1 : -1;
252
268
  }
253
- if (o === j || (o === R || o === N) && i === Oe) {
254
- $ = I;
255
- var k = h && d === g && g.visualViewport ? g.visualViewport.width : d[E];
269
+ if (o === j || (o === R || o === N) && i === we) {
270
+ $ = M;
271
+ var k = h && c === g && g.visualViewport ? g.visualViewport.width : (
272
+ // $FlowFixMe[prop-missing]
273
+ c[E]
274
+ );
256
275
  u -= k - n.width, u *= s ? 1 : -1;
257
276
  }
258
277
  }
259
278
  var b = Object.assign({
260
279
  position: l
261
- }, f && ar), D = p === !0 ? sr({
280
+ }, f && pr), D = p === !0 ? fr({
262
281
  x: u,
263
282
  y: m
264
283
  }) : {
@@ -267,11 +286,11 @@ function pt(e) {
267
286
  };
268
287
  if (u = D.x, m = D.y, s) {
269
288
  var A;
270
- return Object.assign({}, b, (A = {}, A[c] = 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[$] = w ? "0" : "", A.transform = (g.devicePixelRatio || 1) <= 1 ? "translate(" + u + "px, " + m + "px)" : "translate3d(" + u + "px, " + m + "px, 0)", A));
271
290
  }
272
- return Object.assign({}, b, (t = {}, t[c] = C ? m + "px" : "", t[$] = w ? u + "px" : "", t.transform = "", t));
291
+ return Object.assign({}, b, (t = {}, t[d] = C ? m + "px" : "", t[$] = w ? u + "px" : "", t.transform = "", t));
273
292
  }
274
- function lr(e) {
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;
276
295
  if (process.env.NODE_ENV !== "production") {
277
296
  var f = q(t.elements.popper).transitionProperty || "";
@@ -305,18 +324,18 @@ function lr(e) {
305
324
  "data-popper-placement": t.placement
306
325
  });
307
326
  }
308
- const pr = {
327
+ const dr = {
309
328
  name: "computeStyles",
310
329
  enabled: !0,
311
330
  phase: "beforeWrite",
312
- fn: lr,
331
+ fn: ur,
313
332
  data: {}
314
333
  };
315
334
  var De = {
316
335
  passive: !0
317
336
  };
318
- function fr(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 = M(t.elements.popper), f = [].concat(t.scrollParents.reference, t.scrollParents.popper);
337
+ function cr(e) {
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 = I(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() {
@@ -325,16 +344,16 @@ function fr(e) {
325
344
  }), l && s.removeEventListener("resize", r.update, De);
326
345
  };
327
346
  }
328
- const ur = {
347
+ const vr = {
329
348
  name: "eventListeners",
330
349
  enabled: !0,
331
350
  phase: "write",
332
351
  fn: function() {
333
352
  },
334
- effect: fr,
353
+ effect: cr,
335
354
  data: {}
336
355
  };
337
- var cr = {
356
+ var hr = {
338
357
  left: "right",
339
358
  right: "left",
340
359
  bottom: "top",
@@ -342,44 +361,44 @@ var cr = {
342
361
  };
343
362
  function Ae(e) {
344
363
  return e.replace(/left|right|bottom|top/g, function(t) {
345
- return cr[t];
364
+ return hr[t];
346
365
  });
347
366
  }
348
- var dr = {
367
+ var mr = {
349
368
  start: "end",
350
369
  end: "start"
351
370
  };
352
371
  function ft(e) {
353
372
  return e.replace(/start|end/g, function(t) {
354
- return dr[t];
373
+ return mr[t];
355
374
  });
356
375
  }
357
- function Je(e) {
358
- var t = M(e), r = t.pageXOffset, n = t.pageYOffset;
376
+ function Ge(e) {
377
+ var t = I(e), r = t.pageXOffset, n = t.pageYOffset;
359
378
  return {
360
379
  scrollLeft: r,
361
380
  scrollTop: n
362
381
  };
363
382
  }
364
- function Ke(e) {
365
- return le(Y(e)).left + Je(e).scrollLeft;
383
+ function Je(e) {
384
+ return le(Y(e)).left + Ge(e).scrollLeft;
366
385
  }
367
- function vr(e, t) {
368
- var r = M(e), n = Y(e), o = r.visualViewport, i = n.clientWidth, a = n.clientHeight, l = 0, s = 0;
386
+ function gr(e, t) {
387
+ var r = I(e), n = Y(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
- var f = wt();
390
+ var f = xt();
372
391
  (f || !f && t === "fixed") && (l = o.offsetLeft, s = o.offsetTop);
373
392
  }
374
393
  return {
375
394
  width: i,
376
395
  height: a,
377
- x: l + Ke(e),
396
+ x: l + Je(e),
378
397
  y: s
379
398
  };
380
399
  }
381
- function hr(e) {
382
- var t, r = Y(e), n = Je(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 + Ke(e), s = -n.scrollTop;
400
+ function br(e) {
401
+ 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
402
  return q(o || r).direction === "rtl" && (l += re(r.clientWidth, o ? o.clientWidth : 0) - i), {
384
403
  width: i,
385
404
  height: a,
@@ -391,14 +410,17 @@ function Qe(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 Pt(e) {
395
- return ["html", "body", "#document"].indexOf(H(e)) >= 0 ? e.ownerDocument.body : T(e) && Qe(e) ? e : Pt(Te(e));
413
+ function St(e) {
414
+ return ["html", "body", "#document"].indexOf(H(e)) >= 0 ? e.ownerDocument.body : z(e) && Qe(e) ? e : St(ze(e));
396
415
  }
397
- function me(e, t) {
416
+ function he(e, t) {
398
417
  var r;
399
418
  t === void 0 && (t = []);
400
- var n = Pt(e), o = n === ((r = e.ownerDocument) == null ? void 0 : r.body), i = M(n), a = o ? [i].concat(i.visualViewport || [], Qe(n) ? n : []) : n, l = t.concat(a);
401
- return o ? l : l.concat(me(Te(a)));
419
+ 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);
420
+ return o ? l : (
421
+ // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
422
+ l.concat(he(ze(a)))
423
+ );
402
424
  }
403
425
  function We(e) {
404
426
  return Object.assign({}, e, {
@@ -408,27 +430,27 @@ function We(e) {
408
430
  bottom: e.y + e.height
409
431
  });
410
432
  }
411
- function mr(e, t) {
433
+ function yr(e, t) {
412
434
  var r = le(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
437
  function ut(e, t, r) {
416
- return t === bt ? We(vr(e, r)) : ne(t) ? mr(t, r) : We(hr(Y(e)));
438
+ return t === wt ? We(gr(e, r)) : ne(t) ? yr(t, r) : We(br(Y(e)));
417
439
  }
418
- function gr(e) {
419
- var t = me(Te(e)), r = ["absolute", "fixed"].indexOf(q(e).position) >= 0, n = r && T(e) ? Ce(e) : e;
440
+ function wr(e) {
441
+ var t = he(ze(e)), r = ["absolute", "fixed"].indexOf(q(e).position) >= 0, n = r && z(e) ? $e(e) : e;
420
442
  return ne(n) ? t.filter(function(o) {
421
- return ne(o) && Ot(o, n) && H(o) !== "body";
443
+ return ne(o) && $t(o, n) && H(o) !== "body";
422
444
  }) : [];
423
445
  }
424
- function br(e, t, r, n) {
425
- var o = t === "clippingParents" ? gr(e) : [].concat(t), i = [].concat(o, [r]), a = i[0], l = i.reduce(function(s, f) {
446
+ function Or(e, t, r, n) {
447
+ var o = t === "clippingParents" ? wr(e) : [].concat(t), i = [].concat(o, [r]), a = i[0], l = i.reduce(function(s, f) {
426
448
  var p = ut(e, f, n);
427
449
  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
450
  }, ut(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 Et(e) {
453
+ function kt(e) {
432
454
  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;
433
455
  switch (o) {
434
456
  case R:
@@ -443,7 +465,7 @@ function Et(e) {
443
465
  y: t.y + t.height
444
466
  };
445
467
  break;
446
- case I:
468
+ case M:
447
469
  s = {
448
470
  x: t.x + t.width,
449
471
  y: l
@@ -461,52 +483,52 @@ function Et(e) {
461
483
  y: t.y
462
484
  };
463
485
  }
464
- var f = o ? Ge(o) : null;
486
+ var f = o ? Ke(o) : null;
465
487
  if (f != null) {
466
488
  var p = f === "y" ? "height" : "width";
467
489
  switch (i) {
468
490
  case ae:
469
491
  s[f] = s[f] - (t[p] / 2 - r[p] / 2);
470
492
  break;
471
- case Oe:
493
+ case we:
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 xe(e, t) {
500
+ function Oe(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 ? Lt : l, f = r.rootBoundary, p = f === void 0 ? bt : f, h = r.elementContext, y = h === void 0 ? ve : h, u = r.altBoundary, O = u === void 0 ? !1 : u, m = r.padding, v = m === void 0 ? 0 : m, w = $t(typeof v != "number" ? v : Ct(v, $e)), C = y === ve ? Vt : ve, $ = e.rects.popper, c = e.elements[O ? C : y], g = br(ne(c) ? c : c.contextElement || Y(e.elements.popper), s, p, a), d = le(e.elements.reference), x = Et({
481
- reference: d,
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 ? 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({
503
+ reference: c,
482
504
  element: $,
483
505
  strategy: "absolute",
484
506
  placement: o
485
- }), E = We(Object.assign({}, $, x)), S = y === ve ? E : d, k = {
507
+ }), E = We(Object.assign({}, $, x)), S = y === ce ? E : c, k = {
486
508
  top: g.top - S.top + w.top,
487
509
  bottom: S.bottom - g.bottom + w.bottom,
488
510
  left: g.left - S.left + w.left,
489
511
  right: S.right - g.right + w.right
490
512
  }, b = e.modifiersData.offset;
491
- if (y === ve && b) {
513
+ if (y === ce && b) {
492
514
  var D = b[o];
493
515
  Object.keys(k).forEach(function(A) {
494
- var G = [I, N].indexOf(A) >= 0 ? 1 : -1, J = [R, N].indexOf(A) >= 0 ? "y" : "x";
495
- k[A] += D[J] * G;
516
+ var K = [M, N].indexOf(A) >= 0 ? 1 : -1, G = [R, N].indexOf(A) >= 0 ? "y" : "x";
517
+ k[A] += D[G] * K;
496
518
  });
497
519
  }
498
520
  return k;
499
521
  }
500
- function yr(e, t) {
522
+ function xr(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 ? yt : s, p = pe(n), h = p ? l ? st : st.filter(function(O) {
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 ? Ot : s, p = pe(n), h = p ? l ? st : st.filter(function(O) {
503
525
  return pe(O) === p;
504
- }) : $e, y = h.filter(function(O) {
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
530
  var u = y.reduce(function(O, m) {
509
- return O[m] = xe(e, {
531
+ return O[m] = Oe(e, {
510
532
  placement: m,
511
533
  boundary: o,
512
534
  rootBoundary: i,
@@ -517,17 +539,17 @@ function yr(e, t) {
517
539
  return u[O] - u[m];
518
540
  });
519
541
  }
520
- function wr(e) {
521
- if (V(e) === ze)
542
+ function $r(e) {
543
+ if (V(e) === Te)
522
544
  return [];
523
545
  var t = Ae(e);
524
546
  return [ft(e), t, ft(t)];
525
547
  }
526
- function Or(e) {
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)] : wr(v)), c = [v].concat($).reduce(function(oe, U) {
530
- return oe.concat(V(U) === ze ? yr(t, {
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, 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) {
552
+ return oe.concat(V(U) === Te ? xr(t, {
531
553
  placement: U,
532
554
  boundary: p,
533
555
  rootBoundary: h,
@@ -535,54 +557,54 @@ function Or(e) {
535
557
  flipVariations: O,
536
558
  allowedAutoPlacements: m
537
559
  }) : U);
538
- }, []), g = t.rects.reference, d = t.rects.popper, x = /* @__PURE__ */ new Map(), E = !0, S = c[0], k = 0; k < c.length; k++) {
539
- var b = c[k], D = V(b), A = pe(b) === ae, G = [R, N].indexOf(D) >= 0, J = G ? "width" : "height", z = xe(t, {
560
+ }, []), g = t.rects.reference, c = t.rects.popper, x = /* @__PURE__ */ new Map(), E = !0, S = d[0], k = 0; k < d.length; k++) {
561
+ var b = d[k], D = V(b), A = pe(b) === ae, K = [R, N].indexOf(D) >= 0, G = K ? "width" : "height", T = Oe(t, {
540
562
  placement: b,
541
563
  boundary: p,
542
564
  rootBoundary: h,
543
565
  altBoundary: y,
544
566
  padding: f
545
- }), L = G ? A ? I : j : A ? N : R;
546
- g[J] > d[J] && (L = Ae(L));
547
- var Pe = Ae(L), K = [];
548
- if (i && K.push(z[D] <= 0), l && K.push(z[L] <= 0, z[Pe] <= 0), K.every(function(oe) {
567
+ }), L = K ? A ? M : j : A ? N : R;
568
+ g[G] > c[G] && (L = Ae(L));
569
+ var Pe = Ae(L), J = [];
570
+ if (i && J.push(T[D] <= 0), l && J.push(T[L] <= 0, T[Pe] <= 0), J.every(function(oe) {
549
571
  return oe;
550
572
  })) {
551
573
  S = b, E = !1;
552
574
  break;
553
575
  }
554
- x.set(b, K);
576
+ x.set(b, J);
555
577
  }
556
578
  if (E)
557
579
  for (var Ee = O ? 3 : 1, Ne = function(U) {
558
- var ce = c.find(function(ke) {
580
+ var ue = d.find(function(ke) {
559
581
  var Q = x.get(ke);
560
582
  if (Q)
561
- return Q.slice(0, U).every(function(Ie) {
562
- return Ie;
583
+ return Q.slice(0, U).every(function(Me) {
584
+ return Me;
563
585
  });
564
586
  });
565
- if (ce)
566
- return S = ce, "break";
567
- }, ue = Ee; ue > 0; ue--) {
568
- var Se = Ne(ue);
587
+ if (ue)
588
+ return S = ue, "break";
589
+ }, fe = Ee; fe > 0; fe--) {
590
+ var Se = Ne(fe);
569
591
  if (Se === "break")
570
592
  break;
571
593
  }
572
594
  t.placement !== S && (t.modifiersData[n]._skip = !0, t.placement = S, t.reset = !0);
573
595
  }
574
596
  }
575
- const xr = {
597
+ const Pr = {
576
598
  name: "flip",
577
599
  enabled: !0,
578
600
  phase: "main",
579
- fn: Or,
601
+ fn: Cr,
580
602
  requiresIfExists: ["offset"],
581
603
  data: {
582
604
  _skip: !1
583
605
  }
584
606
  };
585
- function ct(e, t, r) {
607
+ function dt(e, t, r) {
586
608
  return r === void 0 && (r = {
587
609
  x: 0,
588
610
  y: 0
@@ -593,17 +615,17 @@ function ct(e, t, r) {
593
615
  left: e.left - t.width - r.x
594
616
  };
595
617
  }
596
- function dt(e) {
597
- return [R, I, N, j].some(function(t) {
618
+ function ct(e) {
619
+ return [R, M, N, j].some(function(t) {
598
620
  return e[t] >= 0;
599
621
  });
600
622
  }
601
- function $r(e) {
602
- var t = e.state, r = e.name, n = t.rects.reference, o = t.rects.popper, i = t.modifiersData.preventOverflow, a = xe(t, {
623
+ function Er(e) {
624
+ var t = e.state, r = e.name, n = t.rects.reference, o = t.rects.popper, i = t.modifiersData.preventOverflow, a = Oe(t, {
603
625
  elementContext: "reference"
604
- }), l = xe(t, {
626
+ }), l = Oe(t, {
605
627
  altBoundary: !0
606
- }), s = ct(a, n), f = ct(l, o, i), p = dt(s), h = dt(f);
628
+ }), s = dt(a, n), f = dt(l, o, i), p = ct(s), h = ct(f);
607
629
  t.modifiersData[r] = {
608
630
  referenceClippingOffsets: s,
609
631
  popperEscapeOffsets: f,
@@ -614,18 +636,18 @@ function $r(e) {
614
636
  "data-popper-escaped": h
615
637
  });
616
638
  }
617
- const Cr = {
639
+ const Sr = {
618
640
  name: "hide",
619
641
  enabled: !0,
620
642
  phase: "main",
621
643
  requiresIfExists: ["preventOverflow"],
622
- fn: $r
644
+ fn: Er
623
645
  };
624
- function Pr(e, t, r) {
646
+ function kr(e, t, r) {
625
647
  var n = V(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
- return a = a || 0, l = (l || 0) * o, [j, I].indexOf(n) >= 0 ? {
650
+ return a = a || 0, l = (l || 0) * o, [j, M].indexOf(n) >= 0 ? {
629
651
  x: l,
630
652
  y: a
631
653
  } : {
@@ -633,45 +655,45 @@ function Pr(e, t, r) {
633
655
  y: l
634
656
  };
635
657
  }
636
- function Er(e) {
637
- var t = e.state, r = e.options, n = e.name, o = r.offset, i = o === void 0 ? [0, 0] : o, a = yt.reduce(function(p, h) {
638
- return p[h] = Pr(h, t.rects, i), p;
658
+ function Br(e) {
659
+ 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) {
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;
641
663
  }
642
- const Sr = {
664
+ const Dr = {
643
665
  name: "offset",
644
666
  enabled: !0,
645
667
  phase: "main",
646
668
  requires: ["popperOffsets"],
647
- fn: Er
669
+ fn: Br
648
670
  };
649
- function kr(e) {
671
+ function Ar(e) {
650
672
  var t = e.state, r = e.name;
651
- t.modifiersData[r] = Et({
673
+ t.modifiersData[r] = kt({
652
674
  reference: t.rects.reference,
653
675
  element: t.rects.popper,
654
676
  strategy: "absolute",
655
677
  placement: t.placement
656
678
  });
657
679
  }
658
- const Br = {
680
+ const Rr = {
659
681
  name: "popperOffsets",
660
682
  enabled: !0,
661
683
  phase: "read",
662
- fn: kr,
684
+ fn: Ar,
663
685
  data: {}
664
686
  };
665
- function Dr(e) {
687
+ function jr(e) {
666
688
  return e === "x" ? "y" : "x";
667
689
  }
668
- function Ar(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 = xe(t, {
690
+ function Tr(e) {
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, m = O === void 0 ? 0 : O, v = Oe(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, c = Ge(w), g = Dr(c), d = t.modifiersData.popperOffsets, x = t.rects.reference, E = t.rects.popper, S = typeof m == "function" ? m(Object.assign({}, t.rects, {
696
+ }), 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, {
675
697
  placement: t.placement
676
698
  })) : m, k = typeof S == "number" ? {
677
699
  mainAxis: S,
@@ -683,58 +705,59 @@ function Ar(e) {
683
705
  x: 0,
684
706
  y: 0
685
707
  };
686
- if (!!d) {
708
+ if (c) {
687
709
  if (i) {
688
- var A, G = c === "y" ? R : j, J = c === "y" ? N : I, z = c === "y" ? "height" : "width", L = d[c], Pe = L + v[G], K = L - v[J], Ee = u ? -E[z] / 2 : 0, Ne = C === ae ? x[z] : E[z], ue = C === ae ? -E[z] : -x[z], Se = t.elements.arrow, oe = u && Se ? Ye(Se) : {
710
+ 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) : {
689
711
  width: 0,
690
712
  height: 0
691
- }, U = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : xt(), ce = U[G], ke = U[J], Q = he(0, x[z], oe[z]), Ie = $ ? x[z] / 2 - Ee - Q - ce - k.mainAxis : Ne - Q - ce - k.mainAxis, Bt = $ ? -x[z] / 2 + Ee + Q + ke + k.mainAxis : ue + Q + ke + k.mainAxis, Me = t.elements.arrow && Ce(t.elements.arrow), Dt = Me ? c === "y" ? Me.clientTop || 0 : Me.clientLeft || 0 : 0, Ze = (A = b == null ? void 0 : b[c]) != null ? A : 0, At = L + Ie - Ze - Dt, Rt = L + Bt - Ze, _e = he(u ? je(Pe, At) : Pe, L, u ? re(K, Rt) : K);
692
- d[c] = _e, D[c] = _e - L;
713
+ }, 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);
714
+ c[d] = _e, D[d] = _e - L;
693
715
  }
694
716
  if (l) {
695
- var et, jt = c === "x" ? R : j, zt = c === "x" ? N : I, Z = d[g], Be = g === "y" ? "height" : "width", tt = Z + v[jt], rt = Z - v[zt], 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 ? tr(ot, Z, it) : he(u ? ot : tt, Z, u ? it : rt);
696
- d[g] = at, D[g] = at - Z;
717
+ 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);
718
+ c[g] = at, D[g] = at - Z;
697
719
  }
698
720
  t.modifiersData[n] = D;
699
721
  }
700
722
  }
701
- const Rr = {
723
+ const zr = {
702
724
  name: "preventOverflow",
703
725
  enabled: !0,
704
726
  phase: "main",
705
- fn: Ar,
727
+ fn: Tr,
706
728
  requiresIfExists: ["offset"]
707
729
  };
708
- function jr(e) {
730
+ function Nr(e) {
709
731
  return {
710
732
  scrollLeft: e.scrollLeft,
711
733
  scrollTop: e.scrollTop
712
734
  };
713
735
  }
714
- function zr(e) {
715
- return e === M(e) || !T(e) ? Je(e) : jr(e);
736
+ function Mr(e) {
737
+ return e === I(e) || !z(e) ? Ge(e) : Nr(e);
716
738
  }
717
- function Tr(e) {
739
+ function Ir(e) {
718
740
  var t = e.getBoundingClientRect(), r = se(t.width) / e.offsetWidth || 1, n = se(t.height) / e.offsetHeight || 1;
719
741
  return r !== 1 || n !== 1;
720
742
  }
721
- function Nr(e, t, r) {
743
+ function Lr(e, t, r) {
722
744
  r === void 0 && (r = !1);
723
- var n = T(t), o = T(t) && Tr(t), i = Y(t), a = le(e, o, r), l = {
745
+ var n = z(t), o = z(t) && Ir(t), i = Y(t), a = le(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 = zr(t)), T(t) ? (s = le(t, !0), s.x += t.clientLeft, s.y += t.clientTop) : i && (s.x = Ke(i))), {
752
+ return (n || !n && !r) && ((H(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
753
+ Qe(i)) && (l = Mr(t)), z(t) ? (s = le(t, !0), s.x += t.clientLeft, s.y += t.clientTop) : i && (s.x = Je(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 Ir(e) {
760
+ function Vr(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);
@@ -753,15 +776,15 @@ function Ir(e) {
753
776
  r.has(i.name) || o(i);
754
777
  }), n;
755
778
  }
756
- function Mr(e) {
757
- var t = Ir(e);
779
+ function qr(e) {
780
+ var t = Vr(e);
758
781
  return qe.reduce(function(r, n) {
759
782
  return r.concat(t.filter(function(o) {
760
783
  return o.phase === n;
761
784
  }));
762
785
  }, []);
763
786
  }
764
- function Lr(e) {
787
+ function Fr(e) {
765
788
  var t;
766
789
  return function() {
767
790
  return t || (t = new Promise(function(r) {
@@ -778,8 +801,8 @@ function X(e) {
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', Vr = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available', vt = ["name", "enabled", "phase", "fn", "effect", "requires", "options"];
782
- function qr(e) {
804
+ 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"];
805
+ function Hr(e) {
783
806
  e.forEach(function(t) {
784
807
  [].concat(Object.keys(t), vt).filter(function(r, n, o) {
785
808
  return o.indexOf(r) === n;
@@ -817,12 +840,12 @@ function qr(e) {
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(Vr, String(t.name), n, n));
843
+ }) == null && console.error(X(Wr, String(t.name), n, n));
821
844
  });
822
845
  });
823
846
  });
824
847
  }
825
- function Fr(e, t) {
848
+ function Ur(e, t) {
826
849
  var r = /* @__PURE__ */ new Set();
827
850
  return e.filter(function(n) {
828
851
  var o = t(n);
@@ -830,7 +853,7 @@ function Fr(e, t) {
830
853
  return r.add(o), !0;
831
854
  });
832
855
  }
833
- function Wr(e) {
856
+ function Xr(e) {
834
857
  var t = e.reduce(function(r, n) {
835
858
  var o = r[n.name];
836
859
  return r[n.name] = o ? Object.assign({}, o, n, {
@@ -842,7 +865,7 @@ function Wr(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.", Hr = "Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.", mt = {
868
+ 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 = {
846
869
  placement: "bottom",
847
870
  modifiers: [],
848
871
  strategy: "absolute"
@@ -854,7 +877,7 @@ function gt() {
854
877
  return !(n && typeof n.getBoundingClientRect == "function");
855
878
  });
856
879
  }
857
- function Ur(e) {
880
+ function Kr(e) {
858
881
  e === void 0 && (e = {});
859
882
  var t = e, r = t.defaultModifiers, n = r === void 0 ? [] : r, o = t.defaultOptions, i = o === void 0 ? mt : o;
860
883
  return function(l, s, f) {
@@ -875,31 +898,36 @@ function Ur(e) {
875
898
  setOptions: function(w) {
876
899
  var C = typeof w == "function" ? w(p.options) : w;
877
900
  m(), p.options = Object.assign({}, i, p.options, C), p.scrollParents = {
878
- reference: ne(l) ? me(l) : l.contextElement ? me(l.contextElement) : [],
879
- popper: me(s)
901
+ reference: ne(l) ? he(l) : l.contextElement ? he(l.contextElement) : [],
902
+ popper: he(s)
880
903
  };
881
- var $ = Mr(Wr([].concat(n, p.options.modifiers)));
904
+ var $ = qr(Xr([].concat(n, p.options.modifiers)));
882
905
  if (p.orderedModifiers = $.filter(function(b) {
883
906
  return b.enabled;
884
907
  }), process.env.NODE_ENV !== "production") {
885
- var c = Fr([].concat($, p.options.modifiers), function(b) {
908
+ var d = Ur([].concat($, p.options.modifiers), function(b) {
886
909
  var D = b.name;
887
910
  return D;
888
911
  });
889
- if (qr(c), V(p.options.placement) === ze) {
912
+ if (Hr(d), V(p.options.placement) === Te) {
890
913
  var g = p.orderedModifiers.find(function(b) {
891
914
  var D = b.name;
892
915
  return D === "flip";
893
916
  });
894
917
  g || console.error(['Popper: "auto" placements require the "flip" modifier be', "present and enabled to work."].join(" "));
895
918
  }
896
- var d = q(s), x = d.marginTop, E = d.marginRight, S = d.marginBottom, k = d.marginLeft;
919
+ var c = q(s), x = c.marginTop, E = c.marginRight, S = c.marginBottom, k = c.marginLeft;
897
920
  [x, 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
933
  var w = p.elements, C = w.reference, $ = w.popper;
@@ -908,21 +936,21 @@ function Ur(e) {
908
936
  return;
909
937
  }
910
938
  p.rects = {
911
- reference: Nr(C, Ce($), p.options.strategy === "fixed"),
939
+ reference: Lr(C, $e($), p.options.strategy === "fixed"),
912
940
  popper: Ye($)
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 c = 0, g = 0; g < p.orderedModifiers.length; g++) {
917
- if (process.env.NODE_ENV !== "production" && (c += 1, c > 100)) {
918
- console.error(Hr);
944
+ for (var d = 0, g = 0; g < p.orderedModifiers.length; g++) {
945
+ if (process.env.NODE_ENV !== "production" && (d += 1, d > 100)) {
946
+ console.error(Yr);
919
947
  break;
920
948
  }
921
949
  if (p.reset === !0) {
922
950
  p.reset = !1, g = -1;
923
951
  continue;
924
952
  }
925
- var d = p.orderedModifiers[g], x = d.fn, E = d.options, S = E === void 0 ? {} : E, k = d.name;
953
+ var c = p.orderedModifiers[g], x = c.fn, E = c.options, S = E === void 0 ? {} : E, k = c.name;
926
954
  typeof x == "function" && (p = x({
927
955
  state: p,
928
956
  options: S,
@@ -932,7 +960,9 @@ function Ur(e) {
932
960
  }
933
961
  }
934
962
  },
935
- update: Lr(function() {
963
+ // Async and optimistically optimized update it will not be executed if
964
+ // not necessary (debounced to run at most once-per-tick)
965
+ update: Fr(function() {
936
966
  return new Promise(function(v) {
937
967
  u.forceUpdate(), v(p);
938
968
  });
@@ -948,16 +978,16 @@ function Ur(e) {
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, c = v.effect;
952
- if (typeof c == "function") {
953
- var g = c({
981
+ var w = v.name, C = v.options, $ = C === void 0 ? {} : C, d = v.effect;
982
+ if (typeof d == "function") {
983
+ var g = d({
954
984
  state: p,
955
985
  name: w,
956
986
  instance: u,
957
987
  options: $
958
- }), d = function() {
988
+ }), c = function() {
959
989
  };
960
- h.push(g || d);
990
+ h.push(g || c);
961
991
  }
962
992
  });
963
993
  }
@@ -969,10 +999,10 @@ function Ur(e) {
969
999
  return u;
970
1000
  };
971
1001
  }
972
- var Xr = [ur, Br, pr, Zt, Sr, xr, Rr, ir, Cr], Yr = /* @__PURE__ */ Ur({
973
- defaultModifiers: Xr
1002
+ var Gr = [vr, Rr, dr, tr, Dr, Pr, zr, lr, Sr], Jr = /* @__PURE__ */ Kr({
1003
+ defaultModifiers: Gr
974
1004
  });
975
- const Gr = {
1005
+ const Qr = {
976
1006
  props: {
977
1007
  componentPrefix: String,
978
1008
  size: String,
@@ -983,15 +1013,13 @@ const Gr = {
983
1013
  return this.sizePrefix || this.componentPrefix;
984
1014
  },
985
1015
  hasSizeablePrefix() {
986
- return this.size && !!this.size.match(
987
- new RegExp(`^${this.sizeableClassPrefix}`)
988
- );
1016
+ return this.size === void 0 ? !1 : !!this.size.match(new RegExp(`^${this.sizeableClassPrefix}`));
989
1017
  },
990
1018
  sizeableClass() {
991
1019
  return this.size ? !this.sizeableClassPrefix || this.hasSizeablePrefix ? this.size : `${this.sizeableClassPrefix}-${this.size}` : "";
992
1020
  }
993
1021
  }
994
- }, Jr = {
1022
+ }, Zr = {
995
1023
  props: {
996
1024
  componentPrefix: String,
997
1025
  variant: String,
@@ -1002,20 +1030,14 @@ const Gr = {
1002
1030
  return this.variantPrefix || this.componentPrefix;
1003
1031
  },
1004
1032
  hasVariantPrefix() {
1005
- return this.variant && !!this.variant.match(
1006
- new RegExp(`^${this.variantClassPrefix}`)
1007
- );
1033
+ return this.variant === void 0 ? !1 : !!this.variant.match(new RegExp(`^${this.variantClassPrefix}`));
1008
1034
  },
1009
1035
  variantClass() {
1010
1036
  return this.variant ? !this.variantClassPrefix || this.hasVariantPrefix ? this.variant : `${this.variantClassPrefix}-${this.variant}` : "";
1011
1037
  }
1012
1038
  }
1013
- }, Kr = {
1014
- name: "Btn",
1015
- mixins: [
1016
- Gr,
1017
- Jr
1018
- ],
1039
+ }, _r = Mt({
1040
+ mixins: [Qr, Zr],
1019
1041
  props: {
1020
1042
  active: Boolean,
1021
1043
  block: Boolean,
@@ -1034,14 +1056,7 @@ const Gr = {
1034
1056
  },
1035
1057
  computed: {
1036
1058
  classes() {
1037
- return [
1038
- "btn",
1039
- this.variantClass,
1040
- this.sizeableClass,
1041
- this.active && "active",
1042
- this.block && "btn-block",
1043
- this.disabled && "disabled"
1044
- ];
1059
+ return ["btn", this.variantClass, this.sizeableClass, this.active && "active", this.block && "btn-block", this.disabled && "disabled"];
1045
1060
  },
1046
1061
  component() {
1047
1062
  return this.tag ? this.tag : this.$attrs.href ? "a" : "button";
@@ -1050,27 +1065,23 @@ const Gr = {
1050
1065
  return (this.variantPrefix || this.componentPrefix) + (this.outline ? "-outline" : "");
1051
1066
  }
1052
1067
  }
1053
- }, fe = (e, t) => {
1068
+ }), en = (e, t) => {
1054
1069
  const r = e.__vccOpts || e;
1055
1070
  for (const [n, o] of t)
1056
1071
  r[n] = o;
1057
1072
  return r;
1058
1073
  };
1059
- function Qr(e, t, r, n, o, i) {
1060
- return W(), ee(He(i.component), ge(e.$attrs, {
1061
- disabled: r.disabled,
1062
- class: i.classes,
1074
+ function tn(e, t, r, n, o, i) {
1075
+ return W(), ee(He(e.component), me(e.$attrs, {
1076
+ disabled: e.disabled,
1077
+ class: e.classes,
1063
1078
  role: "button"
1064
1079
  }), {
1065
- default: B(() => [
1066
- P(e.$slots, "default", {}, () => [
1067
- be(ye(r.label), 1)
1068
- ])
1069
- ]),
1080
+ default: B(() => [P(e.$slots, "default", {}, () => [ge(be(e.label), 1)])]),
1070
1081
  _: 3
1071
1082
  }, 16, ["disabled", "class"]);
1072
1083
  }
1073
- const Zr = /* @__PURE__ */ fe(Kr, [["render", Qr]]), _r = {
1084
+ const rn = /* @__PURE__ */ en(_r, [["render", tn]]), nn = {
1074
1085
  props: {
1075
1086
  componentPrefix: String,
1076
1087
  size: String,
@@ -1087,14 +1098,14 @@ const Zr = /* @__PURE__ */ fe(Kr, [["render", Qr]]), _r = {
1087
1098
  return this.size ? !this.sizeableClassPrefix || this.hasSizeablePrefix ? this.size : `${this.sizeableClassPrefix}-${this.size}` : "";
1088
1099
  }
1089
1100
  }
1090
- }, en = (e, t) => {
1101
+ }, on = (e, t) => {
1091
1102
  const r = e.__vccOpts || e;
1092
1103
  for (const [n, o] of t)
1093
1104
  r[n] = o;
1094
1105
  return r;
1095
- }, tn = {
1106
+ }, an = {
1096
1107
  name: "BtnGroup",
1097
- mixins: [_r],
1108
+ mixins: [nn],
1098
1109
  props: {
1099
1110
  sizePrefix: {
1100
1111
  type: String,
@@ -1115,32 +1126,42 @@ const Zr = /* @__PURE__ */ fe(Kr, [["render", Qr]]), _r = {
1115
1126
  };
1116
1127
  }
1117
1128
  }
1118
- }, rn = ["data-toggle"];
1119
- function nn(e, t, r, n, o, i) {
1129
+ }, sn = ["data-toggle"];
1130
+ function ln(e, t, r, n, o, i) {
1120
1131
  return W(), Ue("div", {
1121
1132
  class: F(i.classes),
1122
1133
  "data-toggle": r.toggle ? "buttons" : !1,
1123
1134
  role: "group"
1124
- }, [P(e.$slots, "default")], 10, rn);
1135
+ }, [P(e.$slots, "default")], 10, sn);
1125
1136
  }
1126
- const on = /* @__PURE__ */ en(tn, [["render", nn]]);
1137
+ const pn = /* @__PURE__ */ on(an, [["render", ln]]);
1127
1138
  function Ve(e, t) {
1128
1139
  e.props.class = `${e.props.class || ""} ${t}`.trim();
1129
1140
  }
1130
- function St(e) {
1141
+ function Bt(e) {
1131
1142
  for (const t of e) {
1132
- t.type === Nt && St(t.children), t.props = Object.assign({ class: void 0 }, t.props), t.attrs = Object.assign({}, t.attrs), t.attrs.on || (t.attrs.on = {});
1143
+ 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 = {});
1133
1144
  const r = t.props.class && t.props.class.match(/dropdown-item/), n = t.props.class && t.props.class.match(/dropdown-divider/);
1134
1145
  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");
1135
1146
  }
1136
1147
  return e;
1137
1148
  }
1138
- const an = (e, t) => Tt("div", {}, St(t.slots.default())), sn = an, ln = {
1149
+ const fn = (e, t) => It("div", {}, Bt(t.slots.default())), un = fn, Ce = (e, t) => {
1150
+ const r = e.__vccOpts || e;
1151
+ for (const [n, o] of t)
1152
+ r[n] = o;
1153
+ return r;
1154
+ }, dn = {
1139
1155
  name: "DropdownMenu",
1140
1156
  components: {
1141
- DropdownMenuItems: sn
1157
+ DropdownMenuItems: un
1142
1158
  },
1143
1159
  props: {
1160
+ /**
1161
+ * Display the dropdown menu aligned left or right
1162
+ *
1163
+ * @property String
1164
+ */
1144
1165
  align: {
1145
1166
  type: String,
1146
1167
  default: "left",
@@ -1148,10 +1169,15 @@ const an = (e, t) => Tt("div", {}, St(t.slots.default())), sn = an, ln = {
1148
1169
  return ["left", "right"].indexOf(e.toLowerCase()) !== -1;
1149
1170
  }
1150
1171
  },
1172
+ /**
1173
+ * The default visibility of the dropdown menu.
1174
+ *
1175
+ * @property Object
1176
+ */
1151
1177
  show: Boolean
1152
1178
  }
1153
- }, pn = ["aria-labelledby"];
1154
- function fn(e, t, r, n, o, i) {
1179
+ }, cn = ["aria-labelledby"];
1180
+ function vn(e, t, r, n, o, i) {
1155
1181
  const a = te("dropdown-menu-items");
1156
1182
  return W(), Ue("div", {
1157
1183
  class: F(["dropdown-menu", {
@@ -1161,7 +1187,7 @@ function fn(e, t, r, n, o, i) {
1161
1187
  }]),
1162
1188
  "aria-labelledby": e.$attrs.id
1163
1189
  }, [
1164
- we(a, null, {
1190
+ ye(a, null, {
1165
1191
  default: B(() => [
1166
1192
  P(e.$slots, "default", {
1167
1193
  onClick: t[0] || (t[0] = (...l) => e.onItemClick && e.onItemClick(...l))
@@ -1169,9 +1195,9 @@ function fn(e, t, r, n, o, i) {
1169
1195
  ]),
1170
1196
  _: 3
1171
1197
  })
1172
- ], 10, pn);
1198
+ ], 10, cn);
1173
1199
  }
1174
- const un = /* @__PURE__ */ fe(ln, [["render", fn]]), cn = {
1200
+ const hn = /* @__PURE__ */ Ce(dn, [["render", vn]]), mn = {
1175
1201
  props: {
1176
1202
  expanded: {
1177
1203
  type: Boolean,
@@ -1187,8 +1213,8 @@ const un = /* @__PURE__ */ fe(ln, [["render", fn]]), cn = {
1187
1213
  }
1188
1214
  }
1189
1215
  };
1190
- function dn(e, t, r, n, o, i) {
1191
- return W(), ee(He(i.is), ge({ id: r.id }, r.to ? { to: r.to } : { href: r.href }, {
1216
+ function gn(e, t, r, n, o, i) {
1217
+ return W(), ee(He(i.is), me({ id: r.id }, r.to ? { to: r.to } : { href: r.href }, {
1192
1218
  "aria-haspopup": "true",
1193
1219
  "aria-expanded": r.expanded,
1194
1220
  type: i.is === "button" ? "button" : void 0
@@ -1199,15 +1225,20 @@ function dn(e, t, r, n, o, i) {
1199
1225
  _: 3
1200
1226
  }, 16, ["id", "aria-expanded", "type"]);
1201
1227
  }
1202
- const vn = /* @__PURE__ */ fe(cn, [["render", dn]]), kt = {
1228
+ const bn = /* @__PURE__ */ Ce(mn, [["render", gn]]), Dt = {
1203
1229
  components: {
1204
- BtnDropdownAction: vn,
1205
- BtnGroup: on,
1206
- DropdownMenu: un
1230
+ BtnDropdownAction: bn,
1231
+ BtnGroup: pn,
1232
+ DropdownMenu: hn
1207
1233
  },
1208
- extends: Zr,
1234
+ extends: rn,
1209
1235
  emits: ["click-toggle", "show", "hide", "toggle"],
1210
1236
  props: {
1237
+ /**
1238
+ * Display the dropdown menu aligned left or right
1239
+ *
1240
+ * @property String
1241
+ */
1211
1242
  align: {
1212
1243
  type: String,
1213
1244
  default: "left",
@@ -1215,48 +1246,133 @@ const vn = /* @__PURE__ */ fe(cn, [["render", dn]]), kt = {
1215
1246
  return ["left", "right"].indexOf(e.toLowerCase()) !== -1;
1216
1247
  }
1217
1248
  },
1249
+ /**
1250
+ * Should animate the dropdown opening.
1251
+ *
1252
+ * @property {Boolean}
1253
+ */
1218
1254
  animated: {
1219
1255
  type: Boolean,
1220
1256
  default: !0
1221
1257
  },
1258
+ /**
1259
+ * Additional button classes.
1260
+ *
1261
+ * @property {Object|String}
1262
+ */
1222
1263
  buttonClass: [Object, String],
1264
+ /**
1265
+ * Show the caret.
1266
+ *
1267
+ * @property {Boolean}
1268
+ */
1223
1269
  caret: {
1224
1270
  type: Boolean,
1225
1271
  default: !0
1226
1272
  },
1273
+ /**
1274
+ * Should display the toggle button as a circle.
1275
+ *
1276
+ * @property Boolean
1277
+ */
1278
+ // circle: {
1279
+ // type: Boolean,
1280
+ // default: false
1281
+ // },
1282
+ /**
1283
+ * Display as a dropup instead of a dropdown.
1284
+ *
1285
+ * @property Boolean
1286
+ */
1227
1287
  dropup: {
1228
1288
  type: Boolean,
1229
1289
  default: !1
1230
1290
  },
1291
+ /**
1292
+ * Display as a dropright instead of a dropdown.
1293
+ *
1294
+ * @property Boolean
1295
+ */
1231
1296
  dropright: {
1232
1297
  type: Boolean,
1233
1298
  default: !1
1234
1299
  },
1300
+ /**
1301
+ * Display as a dropleft instead of a dropdown.
1302
+ *
1303
+ * @property Boolean
1304
+ */
1235
1305
  dropleft: {
1236
1306
  type: Boolean,
1237
1307
  default: !1
1238
1308
  },
1309
+ /**
1310
+ * The action height.
1311
+ *
1312
+ * @property {String}
1313
+ */
1239
1314
  height: String,
1315
+ /**
1316
+ * The href action.
1317
+ *
1318
+ * @property {String}
1319
+ */
1240
1320
  href: String,
1321
+ /**
1322
+ * Is the dropdown a nav item?
1323
+ *
1324
+ * @property {Boolean}
1325
+ */
1241
1326
  nav: Boolean,
1327
+ /**
1328
+ * The toggle button's label. If not defined as an attribute,
1329
+ * you can override with the component's slot (inner html).
1330
+ *
1331
+ * @property {String}
1332
+ */
1242
1333
  label: String,
1243
1334
  offset: {
1244
1335
  type: Number,
1245
1336
  default: 5
1246
1337
  },
1338
+ /**
1339
+ * Should rotate the toggle button when opened.
1340
+ *
1341
+ * @property {Boolean}
1342
+ */
1247
1343
  rotate: {
1248
1344
  type: Boolean,
1249
1345
  default: !1
1250
1346
  },
1347
+ /**
1348
+ * Display the dropdown button with a split toggle button.
1349
+ *
1350
+ * @property {Boolean}
1351
+ */
1251
1352
  split: {
1252
1353
  type: Boolean,
1253
1354
  default: !1
1254
1355
  },
1356
+ /**
1357
+ * The "to" path, used for vue-router.
1358
+ *
1359
+ * @property {String|Object}
1360
+ */
1255
1361
  to: [String, Object],
1362
+ /**
1363
+ * The button type attribute.
1364
+ *
1365
+ * @property {String}
1366
+ */
1256
1367
  type: {
1257
1368
  type: String,
1258
1369
  default: "button"
1259
1370
  },
1371
+ /**
1372
+ * The action width.
1373
+ *
1374
+ * @property {String}
1375
+ */
1260
1376
  width: String
1261
1377
  },
1262
1378
  data() {
@@ -1269,6 +1385,7 @@ const vn = /* @__PURE__ */ fe(cn, [["render", dn]]), kt = {
1269
1385
  computed: {
1270
1386
  scope() {
1271
1387
  return {
1388
+ // Pass the computed props.
1272
1389
  placement: this.placement,
1273
1390
  variantClassPrefix: this.variantClassPrefix,
1274
1391
  sizeableClassPrefix: this.sizeableClassPrefix,
@@ -1276,6 +1393,7 @@ const vn = /* @__PURE__ */ fe(cn, [["render", dn]]), kt = {
1276
1393
  actionClasses: this.actionClasses,
1277
1394
  toggleStyle: this.toggleStyle,
1278
1395
  toggleClasses: this.toggleClasses,
1396
+ // Pass the methods
1279
1397
  focus: this.focus,
1280
1398
  queryFocusable: this.queryFocusable,
1281
1399
  isFocusable: this.isFocusable,
@@ -1344,12 +1462,27 @@ const vn = /* @__PURE__ */ fe(cn, [["render", dn]]), kt = {
1344
1462
  this.popper && this.popper.destroy();
1345
1463
  },
1346
1464
  methods: {
1465
+ /**
1466
+ * Focus on the the dropdown toggle button
1467
+ *
1468
+ * @return void
1469
+ */
1347
1470
  focus() {
1348
1471
  this.$el.querySelector(".dropdown-toggle").focus();
1349
1472
  },
1473
+ /**
1474
+ * Focus on the the dropdown toggle button
1475
+ *
1476
+ * @return void
1477
+ */
1350
1478
  queryFocusable() {
1351
1479
  return this.$el.querySelector(".dropdown-menu").querySelectorAll('label, input, select, textarea, [tabindex]:not([tabindex="-1"])');
1352
1480
  },
1481
+ /**
1482
+ * Method to check if the given element is focusable.
1483
+ *
1484
+ * @return void
1485
+ */
1353
1486
  isFocusable(e) {
1354
1487
  const t = this.queryFocusable();
1355
1488
  for (let r in t)
@@ -1357,13 +1490,23 @@ const vn = /* @__PURE__ */ fe(cn, [["render", dn]]), kt = {
1357
1490
  return !0;
1358
1491
  return !1;
1359
1492
  },
1493
+ /**
1494
+ * Toggle the dropdown menu
1495
+ *
1496
+ * @return void
1497
+ */
1360
1498
  toggle(e) {
1361
1499
  this.expanded ? this.hide() : this.show();
1362
1500
  },
1501
+ /**
1502
+ * Show the dropdown menu
1503
+ *
1504
+ * @return void
1505
+ */
1363
1506
  show() {
1364
1507
  this.expanded = !0;
1365
1508
  const e = this.$refs.split && this.$refs.split.$el || this.$el;
1366
- !this.nav && !this.popper ? this.popper = Yr(e, this.$refs.menu.$el, {
1509
+ !this.nav && !this.popper ? this.popper = Jr(e, this.$refs.menu.$el, {
1367
1510
  placement: `${this.placement}-${this.align === "left" ? "start" : "end"}`,
1368
1511
  onFirstUpdate: () => {
1369
1512
  this.triggerAnimation = this.animated;
@@ -1372,45 +1515,74 @@ const vn = /* @__PURE__ */ fe(cn, [["render", dn]]), kt = {
1372
1515
  name: "offset",
1373
1516
  options: {
1374
1517
  offset: [0, this.nav ? 1 : this.offset]
1518
+ // offset: ['.125rem', !this.nav ? 4 : 1],
1375
1519
  }
1376
1520
  }]
1377
1521
  }) : this.popper && this.popper.update();
1378
1522
  },
1523
+ /**
1524
+ * Hide the dropdown menu
1525
+ *
1526
+ * @return void
1527
+ */
1379
1528
  hide() {
1380
1529
  this.expanded = !1;
1381
1530
  },
1531
+ /**
1532
+ * A callback function for the `blur-item` event.
1533
+ *
1534
+ * @return void
1535
+ */
1382
1536
  onBlur(e) {
1383
- this.$el.contains(e.relatedTarget) || this.hide();
1537
+ (this.$refs.menu && !this.$refs.menu.$el.contains(e.relatedTarget) || !this.$el.contains(e.relatedTarget)) && this.hide();
1538
+ },
1539
+ onClickDocument(e) {
1540
+ this.$el.contains(e.target) || this.hide();
1384
1541
  },
1542
+ /**
1543
+ * A callback function for the `click-item` event.
1544
+ *
1545
+ * @return void
1546
+ */
1385
1547
  onClickItem(e) {
1386
1548
  this.isFocusable(e.target) || this.hide();
1387
1549
  },
1550
+ /**
1551
+ * A callback function for the `click-toggle` event.
1552
+ *
1553
+ * @return void
1554
+ */
1388
1555
  onClickToggle(e) {
1389
- this.$emit("click-toggle", e), e.defaultPrevented || this.toggle();
1556
+ e.target.dispatchEvent(new Event("focus", e)), this.$emit("click-toggle", e), e.defaultPrevented || this.toggle();
1557
+ },
1558
+ onKeydown(e) {
1559
+ e.target.parentElement.lastElementChild === e.target && this.hide();
1390
1560
  }
1391
1561
  },
1392
1562
  watch: {
1393
1563
  expanded(e) {
1394
1564
  this.$nextTick(() => {
1395
1565
  this.$emit(e ? "show" : "hide"), this.$emit("toggle", e);
1566
+ }), setTimeout(() => {
1567
+ e ? document.addEventListener("click", this.onClickDocument) : document.removeEventListener("click", this.onClickDocument);
1396
1568
  });
1397
1569
  }
1398
1570
  }
1399
- }, hn = {
1571
+ }, yn = {
1400
1572
  mixins: [
1401
- kt
1573
+ Dt
1402
1574
  ],
1403
1575
  emits: [
1404
1576
  "click"
1405
1577
  ]
1406
- }, mn = ["id", "aria-expanded"];
1407
- function gn(e, t, r, n, o, i) {
1578
+ }, wn = ["id", "aria-expanded"];
1579
+ function On(e, t, r, n, o, i) {
1408
1580
  const a = te("btn-dropdown-action"), l = te("dropdown-menu"), s = te("btn-group");
1409
1581
  return W(), ee(s, {
1410
1582
  class: F([e.classes, "btn-dropdown-split"])
1411
1583
  }, {
1412
1584
  default: B(() => [
1413
- e.dropleft ? de("", !0) : P(e.$slots, "button", ie(ge({ key: 0 }, e.scope)), () => [
1585
+ e.dropleft ? de("", !0) : P(e.$slots, "button", ie(me({ key: 0 }, e.scope)), () => [
1414
1586
  e.dropleft ? de("", !0) : (W(), ee(a, {
1415
1587
  key: 0,
1416
1588
  id: e.$attrs.id,
@@ -1424,13 +1596,13 @@ function gn(e, t, r, n, o, i) {
1424
1596
  default: B(() => [
1425
1597
  P(e.$slots, "icon"),
1426
1598
  P(e.$slots, "label", {}, () => [
1427
- be(ye(e.label), 1)
1599
+ ge(be(e.label), 1)
1428
1600
  ])
1429
1601
  ]),
1430
1602
  _: 3
1431
1603
  }, 8, ["id", "expanded", "href", "to", "class"]))
1432
1604
  ]),
1433
- we(s, { ref: "split" }, {
1605
+ ye(s, { ref: "split" }, {
1434
1606
  default: B(() => [
1435
1607
  P(e.$slots, "split", ie(Re(e.scope)), () => [
1436
1608
  e.split ? (W(), Ue("button", {
@@ -1442,26 +1614,29 @@ function gn(e, t, r, n, o, i) {
1442
1614
  class: F(e.toggleClasses),
1443
1615
  onBlur: t[1] || (t[1] = (...f) => e.onBlur && e.onBlur(...f)),
1444
1616
  onClick: t[2] || (t[2] = (...f) => e.onClickToggle && e.onClickToggle(...f))
1445
- }, null, 42, mn)) : de("", !0)
1617
+ }, null, 42, wn)) : de("", !0)
1446
1618
  ]),
1447
- we(l, {
1619
+ ye(l, {
1448
1620
  id: e.$attrs.id,
1449
1621
  ref: "menu",
1450
1622
  align: e.align,
1451
1623
  show: e.expanded,
1452
1624
  class: F({ animated: e.triggerAnimation }),
1625
+ onBlur: e.onBlur,
1453
1626
  onClick: e.onClickItem,
1454
- onBlur: e.onBlur
1627
+ onKeydown: bt(e.onKeydown, ["tab"]),
1628
+ onMousedown: t[3] || (t[3] = yt(() => {
1629
+ }, ["prevent"]))
1455
1630
  }, {
1456
1631
  default: B(() => [
1457
1632
  P(e.$slots, "default")
1458
1633
  ]),
1459
1634
  _: 3
1460
- }, 8, ["id", "align", "show", "class", "onClick", "onBlur"])
1635
+ }, 8, ["id", "align", "show", "class", "onBlur", "onClick", "onKeydown"])
1461
1636
  ]),
1462
1637
  _: 3
1463
1638
  }, 512),
1464
- e.dropleft ? P(e.$slots, "button", ie(ge({ key: 1 }, e.scope)), () => [
1639
+ e.dropleft ? P(e.$slots, "button", ie(me({ key: 1 }, e.scope)), () => [
1465
1640
  e.dropleft ? (W(), ee(a, {
1466
1641
  key: 0,
1467
1642
  id: e.$attrs.id,
@@ -1470,12 +1645,12 @@ function gn(e, t, r, n, o, i) {
1470
1645
  href: e.href,
1471
1646
  to: e.to,
1472
1647
  class: F(e.actionClasses),
1473
- onClick: t[3] || (t[3] = (f) => e.$emit("click", f))
1648
+ onClick: t[4] || (t[4] = (f) => e.$emit("click", f))
1474
1649
  }, {
1475
1650
  default: B(() => [
1476
1651
  P(e.$slots, "icon"),
1477
1652
  P(e.$slots, "label", {}, () => [
1478
- be(ye(e.label), 1)
1653
+ ge(be(e.label), 1)
1479
1654
  ])
1480
1655
  ]),
1481
1656
  _: 3
@@ -1485,25 +1660,25 @@ function gn(e, t, r, n, o, i) {
1485
1660
  _: 3
1486
1661
  }, 8, ["class"]);
1487
1662
  }
1488
- const bn = /* @__PURE__ */ fe(hn, [["render", gn]]), yn = {
1663
+ const xn = /* @__PURE__ */ Ce(yn, [["render", On]]), $n = {
1489
1664
  mixins: [
1490
- kt
1665
+ Dt
1491
1666
  ]
1492
1667
  };
1493
- function wn(e, t, r, n, o, i) {
1668
+ function Cn(e, t, r, n, o, i) {
1494
1669
  const a = te("btn-dropdown-action"), l = te("dropdown-menu"), s = te("btn-group");
1495
1670
  return W(), ee(s, {
1496
1671
  class: F(e.classes)
1497
1672
  }, {
1498
1673
  default: B(() => [
1499
1674
  P(e.$slots, "button", ie(Re(e.scope)), () => [
1500
- we(a, {
1675
+ ye(a, {
1501
1676
  id: e.$attrs.id,
1502
1677
  ref: "button",
1503
1678
  expanded: e.expanded,
1504
1679
  href: e.href,
1505
1680
  to: e.to,
1506
- style: It(e.toggleStyle),
1681
+ style: Vt(e.toggleStyle),
1507
1682
  class: F(e.toggleClasses),
1508
1683
  onBlur: e.onBlur,
1509
1684
  onClick: e.onClickToggle
@@ -1511,36 +1686,39 @@ function wn(e, t, r, n, o, i) {
1511
1686
  default: B(() => [
1512
1687
  P(e.$slots, "icon"),
1513
1688
  P(e.$slots, "label", {}, () => [
1514
- be(ye(e.label), 1)
1689
+ ge(be(e.label), 1)
1515
1690
  ])
1516
1691
  ]),
1517
1692
  _: 3
1518
1693
  }, 8, ["id", "expanded", "href", "to", "style", "class", "onBlur", "onClick"])
1519
1694
  ]),
1520
- we(l, {
1695
+ ye(l, {
1521
1696
  id: e.$attrs.id,
1522
1697
  ref: "menu",
1523
1698
  align: e.align,
1524
1699
  show: e.expanded,
1525
1700
  class: F({ animated: e.triggerAnimation }),
1526
1701
  onBlur: e.onBlur,
1527
- onClick: e.onClickItem
1702
+ onClick: e.onClickItem,
1703
+ onKeydown: bt(e.onKeydown, ["tab"]),
1704
+ onMousedown: t[0] || (t[0] = yt(() => {
1705
+ }, ["prevent"]))
1528
1706
  }, {
1529
1707
  default: B(() => [
1530
1708
  P(e.$slots, "default")
1531
1709
  ]),
1532
1710
  _: 3
1533
- }, 8, ["id", "align", "show", "class", "onBlur", "onClick"])
1711
+ }, 8, ["id", "align", "show", "class", "onBlur", "onClick", "onKeydown"])
1534
1712
  ]),
1535
1713
  _: 3
1536
1714
  }, 8, ["class"]);
1537
1715
  }
1538
- const On = /* @__PURE__ */ fe(yn, [["render", wn]]);
1539
- const xn = {
1716
+ const Pn = /* @__PURE__ */ Ce($n, [["render", Cn]]);
1717
+ const En = {
1540
1718
  name: "BtnDropdown",
1541
1719
  components: {
1542
- BtnDropdownSplit: bn,
1543
- BtnDropdownSingle: On
1720
+ BtnDropdownSplit: xn,
1721
+ BtnDropdownSingle: Pn
1544
1722
  },
1545
1723
  inheritAttrs: !1,
1546
1724
  emits: [
@@ -1552,15 +1730,15 @@ const xn = {
1552
1730
  "toggle"
1553
1731
  ]
1554
1732
  };
1555
- function $n(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"), ge({ class: "btn-dropdown" }, e.$attrs, {
1733
+ function Sn(e, t, r, n, o, i) {
1734
+ return W(), ee(He(e.$attrs.split === void 0 || e.$attrs.nav ? "btn-dropdown-single" : "btn-dropdown-split"), me({ class: "btn-dropdown" }, e.$attrs, {
1557
1735
  onClick: t[0] || (t[0] = (...a) => e.$emit("click", ...a)),
1558
1736
  onClickToggle: t[1] || (t[1] = (...a) => e.$emit("click-toggle", ...a)),
1559
1737
  onDropdown: t[2] || (t[2] = (...a) => e.$emit("dropdown", ...a)),
1560
1738
  onShow: t[3] || (t[3] = (...a) => e.$emit("show", ...a)),
1561
1739
  onHide: t[4] || (t[4] = (...a) => e.$emit("hide", ...a)),
1562
1740
  onToggle: t[5] || (t[5] = (...a) => e.$emit("toggle", ...a))
1563
- }), Mt({
1741
+ }), qt({
1564
1742
  icon: B(() => [
1565
1743
  P(e.$slots, "icon")
1566
1744
  ]),
@@ -1579,14 +1757,14 @@ function $n(e, t, r, n, o, i) {
1579
1757
  name: "label",
1580
1758
  fn: B(() => [
1581
1759
  P(e.$slots, "label", {}, () => [
1582
- be(ye(e.$attrs.label), 1)
1760
+ ge(be(e.$attrs.label), 1)
1583
1761
  ])
1584
1762
  ]),
1585
1763
  key: "0"
1586
1764
  } : void 0
1587
1765
  ]), 1040);
1588
1766
  }
1589
- const Pn = /* @__PURE__ */ fe(xn, [["render", $n]]);
1767
+ const Bn = /* @__PURE__ */ Ce(En, [["render", Sn]]);
1590
1768
  export {
1591
- Pn as BtnDropdown
1769
+ Bn as BtnDropdown
1592
1770
  };