@dolusoft/vue3-datatable 1.8.32 → 1.8.37

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,4 +1,4 @@
1
- import { isRef, onMounted, nextTick, getCurrentScope, onScopeDispose, unref, getCurrentInstance, computed, ref, watch, useSlots, onBeforeUnmount, provide, openBlock, createBlock, resolveDynamicComponent, inject, createElementBlock, normalizeStyle, renderSlot, h, defineComponent, toRef, Fragment, withModifiers, createVNode, createElementVNode, normalizeClass, toDisplayString, createCommentVNode, withDirectives, renderList, vModelSelect, resolveComponent, createTextVNode, vModelText, vShow, withCtx, onUnmounted, createSlots, normalizeProps, guardReactiveProps, vModelCheckbox } from "vue";
1
+ import { isRef, onMounted, nextTick, getCurrentScope, onScopeDispose, unref, getCurrentInstance, computed, ref, watch, useSlots, onBeforeUnmount, provide, openBlock, createBlock, resolveDynamicComponent, inject, createElementBlock, normalizeStyle, renderSlot, h as h$2, defineComponent, toRef, Fragment, withModifiers, createVNode, pushScopeId, popScopeId, normalizeClass, normalizeProps, guardReactiveProps, withScopeId, resolveComponent, withKeys, createElementVNode, createCommentVNode, mergeProps, withCtx, toDisplayString, withDirectives, renderList, vModelSelect, createTextVNode, vModelText, vShow, onUnmounted, createSlots, vModelCheckbox } from "vue";
2
2
  function tryOnScopeDispose(fn) {
3
3
  if (getCurrentScope()) {
4
4
  onScopeDispose(fn);
@@ -6,8 +6,8 @@ function tryOnScopeDispose(fn) {
6
6
  }
7
7
  return false;
8
8
  }
9
- function toValue(r) {
10
- return typeof r === "function" ? r() : unref(r);
9
+ function toValue(r2) {
10
+ return typeof r2 === "function" ? r2() : unref(r2);
11
11
  }
12
12
  const isClient = typeof window !== "undefined" && typeof document !== "undefined";
13
13
  typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
@@ -359,7 +359,7 @@ function useElementSize(target, initialSize = { width: 0, height: 0 }, options =
359
359
  stop
360
360
  };
361
361
  }
362
- const Pe = {
362
+ const Pe$1 = {
363
363
  __name: "splitpanes",
364
364
  props: {
365
365
  horizontal: { type: Boolean, default: false },
@@ -381,199 +381,199 @@ const Pe = {
381
381
  "splitter-click",
382
382
  "splitter-dblclick"
383
383
  ],
384
- setup(D, { emit: h$1 }) {
385
- const y = h$1, u = D, E = useSlots(), l = ref([]), M = computed(() => l.value.reduce((e, n) => (e[~~n.id] = n) && e, {})), m = computed(() => l.value.length), x = ref(null), S = ref(false), c = ref({
384
+ setup(D2, { emit: h2 }) {
385
+ const y2 = h2, u2 = D2, E2 = useSlots(), l2 = ref([]), M = computed(() => l2.value.reduce((e, n2) => (e[~~n2.id] = n2) && e, {})), m2 = computed(() => l2.value.length), x2 = ref(null), S2 = ref(false), c2 = ref({
386
386
  mouseDown: false,
387
387
  dragging: false,
388
388
  activeSplitter: null,
389
389
  cursorOffset: 0
390
390
  // Cursor offset within the splitter.
391
- }), f = ref({
391
+ }), f2 = ref({
392
392
  // Used to detect double click on touch devices.
393
393
  splitter: null,
394
394
  timeoutId: null
395
- }), _ = computed(() => ({
396
- [`splitpanes splitpanes--${u.horizontal ? "horizontal" : "vertical"}`]: true,
397
- "splitpanes--dragging": c.value.dragging
398
- })), R = () => {
399
- document.addEventListener("mousemove", r, { passive: false }), document.addEventListener("mouseup", P), "ontouchstart" in window && (document.addEventListener("touchmove", r, { passive: false }), document.addEventListener("touchend", P));
400
- }, O = () => {
401
- document.removeEventListener("mousemove", r, { passive: false }), document.removeEventListener("mouseup", P), "ontouchstart" in window && (document.removeEventListener("touchmove", r, { passive: false }), document.removeEventListener("touchend", P));
402
- }, b = (e, n) => {
395
+ }), _2 = computed(() => ({
396
+ [`splitpanes splitpanes--${u2.horizontal ? "horizontal" : "vertical"}`]: true,
397
+ "splitpanes--dragging": c2.value.dragging
398
+ })), R2 = () => {
399
+ document.addEventListener("mousemove", r2, { passive: false }), document.addEventListener("mouseup", P2), "ontouchstart" in window && (document.addEventListener("touchmove", r2, { passive: false }), document.addEventListener("touchend", P2));
400
+ }, O2 = () => {
401
+ document.removeEventListener("mousemove", r2, { passive: false }), document.removeEventListener("mouseup", P2), "ontouchstart" in window && (document.removeEventListener("touchmove", r2, { passive: false }), document.removeEventListener("touchend", P2));
402
+ }, b2 = (e, n2) => {
403
403
  const t = e.target.closest(".splitpanes__splitter");
404
404
  if (t) {
405
- const { left: i, top: a } = t.getBoundingClientRect(), { clientX: s, clientY: o } = "ontouchstart" in window && e.touches ? e.touches[0] : e;
406
- c.value.cursorOffset = u.horizontal ? o - a : s - i;
405
+ const { left: i2, top: a2 } = t.getBoundingClientRect(), { clientX: s2, clientY: o2 } = "ontouchstart" in window && e.touches ? e.touches[0] : e;
406
+ c2.value.cursorOffset = u2.horizontal ? o2 - a2 : s2 - i2;
407
407
  }
408
- R(), c.value.mouseDown = true, c.value.activeSplitter = n;
409
- }, r = (e) => {
410
- c.value.mouseDown && (e.preventDefault(), c.value.dragging = true, requestAnimationFrame(() => {
411
- K(I(e)), d("resize", { event: e }, true);
408
+ R2(), c2.value.mouseDown = true, c2.value.activeSplitter = n2;
409
+ }, r2 = (e) => {
410
+ c2.value.mouseDown && (e.preventDefault(), c2.value.dragging = true, requestAnimationFrame(() => {
411
+ K2(I(e)), d2("resize", { event: e }, true);
412
412
  }));
413
- }, P = (e) => {
414
- c.value.dragging && d("resized", { event: e }, true), c.value.mouseDown = false, c.value.activeSplitter = null, setTimeout(() => {
415
- c.value.dragging = false, O();
413
+ }, P2 = (e) => {
414
+ c2.value.dragging && d2("resized", { event: e }, true), c2.value.mouseDown = false, c2.value.activeSplitter = null, setTimeout(() => {
415
+ c2.value.dragging = false, O2();
416
416
  }, 100);
417
- }, A = (e, n) => {
418
- "ontouchstart" in window && (e.preventDefault(), f.value.splitter === n ? (clearTimeout(f.value.timeoutId), f.value.timeoutId = null, U(e, n), f.value.splitter = null) : (f.value.splitter = n, f.value.timeoutId = setTimeout(() => f.value.splitter = null, 500))), c.value.dragging || d("splitter-click", { event: e, index: n }, true);
419
- }, U = (e, n) => {
420
- if (d("splitter-dblclick", { event: e, index: n }, true), u.maximizePanes) {
417
+ }, A2 = (e, n2) => {
418
+ "ontouchstart" in window && (e.preventDefault(), f2.value.splitter === n2 ? (clearTimeout(f2.value.timeoutId), f2.value.timeoutId = null, U(e, n2), f2.value.splitter = null) : (f2.value.splitter = n2, f2.value.timeoutId = setTimeout(() => f2.value.splitter = null, 500))), c2.value.dragging || d2("splitter-click", { event: e, index: n2 }, true);
419
+ }, U = (e, n2) => {
420
+ if (d2("splitter-dblclick", { event: e, index: n2 }, true), u2.maximizePanes) {
421
421
  let t = 0;
422
- l.value = l.value.map((i, a) => (i.size = a === n ? i.max : i.min, a !== n && (t += i.min), i)), l.value[n].size -= t, d("pane-maximize", { event: e, index: n, pane: l.value[n] }), d("resized", { event: e, index: n }, true);
422
+ l2.value = l2.value.map((i2, a2) => (i2.size = a2 === n2 ? i2.max : i2.min, a2 !== n2 && (t += i2.min), i2)), l2.value[n2].size -= t, d2("pane-maximize", { event: e, index: n2, pane: l2.value[n2] }), d2("resized", { event: e, index: n2 }, true);
423
423
  }
424
- }, W = (e, n) => {
425
- d("pane-click", {
424
+ }, W2 = (e, n2) => {
425
+ d2("pane-click", {
426
426
  event: e,
427
- index: M.value[n].index,
428
- pane: M.value[n]
427
+ index: M.value[n2].index,
428
+ pane: M.value[n2]
429
429
  });
430
430
  }, I = (e) => {
431
- const n = x.value.getBoundingClientRect(), { clientX: t, clientY: i } = "ontouchstart" in window && e.touches ? e.touches[0] : e;
431
+ const n2 = x2.value.getBoundingClientRect(), { clientX: t, clientY: i2 } = "ontouchstart" in window && e.touches ? e.touches[0] : e;
432
432
  return {
433
- x: t - (u.horizontal ? 0 : c.value.cursorOffset) - n.left,
434
- y: i - (u.horizontal ? c.value.cursorOffset : 0) - n.top
433
+ x: t - (u2.horizontal ? 0 : c2.value.cursorOffset) - n2.left,
434
+ y: i2 - (u2.horizontal ? c2.value.cursorOffset : 0) - n2.top
435
435
  };
436
436
  }, J = (e) => {
437
- e = e[u.horizontal ? "y" : "x"];
438
- const n = x.value[u.horizontal ? "clientHeight" : "clientWidth"];
439
- return u.rtl && !u.horizontal && (e = n - e), e * 100 / n;
440
- }, K = (e) => {
441
- const n = c.value.activeSplitter;
437
+ e = e[u2.horizontal ? "y" : "x"];
438
+ const n2 = x2.value[u2.horizontal ? "clientHeight" : "clientWidth"];
439
+ return u2.rtl && !u2.horizontal && (e = n2 - e), e * 100 / n2;
440
+ }, K2 = (e) => {
441
+ const n2 = c2.value.activeSplitter;
442
442
  let t = {
443
- prevPanesSize: $(n),
444
- nextPanesSize: N(n),
443
+ prevPanesSize: $2(n2),
444
+ nextPanesSize: N(n2),
445
445
  prevReachedMinPanes: 0,
446
446
  nextReachedMinPanes: 0
447
447
  };
448
- const i = 0 + (u.pushOtherPanes ? 0 : t.prevPanesSize), a = 100 - (u.pushOtherPanes ? 0 : t.nextPanesSize), s = Math.max(Math.min(J(e), a), i);
449
- let o = [n, n + 1], v = l.value[o[0]] || null, p = l.value[o[1]] || null;
450
- const H = v.max < 100 && s >= v.max + t.prevPanesSize, ue = p.max < 100 && s <= 100 - (p.max + N(n + 1));
451
- if (H || ue) {
452
- H ? (v.size = v.max, p.size = Math.max(100 - v.max - t.prevPanesSize - t.nextPanesSize, 0)) : (v.size = Math.max(100 - p.max - t.prevPanesSize - N(n + 1), 0), p.size = p.max);
448
+ const i2 = 0 + (u2.pushOtherPanes ? 0 : t.prevPanesSize), a2 = 100 - (u2.pushOtherPanes ? 0 : t.nextPanesSize), s2 = Math.max(Math.min(J(e), a2), i2);
449
+ let o2 = [n2, n2 + 1], v2 = l2.value[o2[0]] || null, p2 = l2.value[o2[1]] || null;
450
+ const H2 = v2.max < 100 && s2 >= v2.max + t.prevPanesSize, ue2 = p2.max < 100 && s2 <= 100 - (p2.max + N(n2 + 1));
451
+ if (H2 || ue2) {
452
+ H2 ? (v2.size = v2.max, p2.size = Math.max(100 - v2.max - t.prevPanesSize - t.nextPanesSize, 0)) : (v2.size = Math.max(100 - p2.max - t.prevPanesSize - N(n2 + 1), 0), p2.size = p2.max);
453
453
  return;
454
454
  }
455
- if (u.pushOtherPanes) {
456
- const j = Q(t, s);
455
+ if (u2.pushOtherPanes) {
456
+ const j = Q2(t, s2);
457
457
  if (!j) return;
458
- ({ sums: t, panesToResize: o } = j), v = l.value[o[0]] || null, p = l.value[o[1]] || null;
458
+ ({ sums: t, panesToResize: o2 } = j), v2 = l2.value[o2[0]] || null, p2 = l2.value[o2[1]] || null;
459
459
  }
460
- v !== null && (v.size = Math.min(Math.max(s - t.prevPanesSize - t.prevReachedMinPanes, v.min), v.max)), p !== null && (p.size = Math.min(Math.max(100 - s - t.nextPanesSize - t.nextReachedMinPanes, p.min), p.max));
461
- }, Q = (e, n) => {
462
- const t = c.value.activeSplitter, i = [t, t + 1];
463
- return n < e.prevPanesSize + l.value[i[0]].min && (i[0] = V(t).index, e.prevReachedMinPanes = 0, i[0] < t && l.value.forEach((a, s) => {
464
- s > i[0] && s <= t && (a.size = a.min, e.prevReachedMinPanes += a.min);
465
- }), e.prevPanesSize = $(i[0]), i[0] === void 0) ? (e.prevReachedMinPanes = 0, l.value[0].size = l.value[0].min, l.value.forEach((a, s) => {
466
- s > 0 && s <= t && (a.size = a.min, e.prevReachedMinPanes += a.min);
467
- }), l.value[i[1]].size = 100 - e.prevReachedMinPanes - l.value[0].min - e.prevPanesSize - e.nextPanesSize, null) : n > 100 - e.nextPanesSize - l.value[i[1]].min && (i[1] = Z(t).index, e.nextReachedMinPanes = 0, i[1] > t + 1 && l.value.forEach((a, s) => {
468
- s > t && s < i[1] && (a.size = a.min, e.nextReachedMinPanes += a.min);
469
- }), e.nextPanesSize = N(i[1] - 1), i[1] === void 0) ? (e.nextReachedMinPanes = 0, l.value.forEach((a, s) => {
470
- s < m.value - 1 && s >= t + 1 && (a.size = a.min, e.nextReachedMinPanes += a.min);
471
- }), l.value[i[0]].size = 100 - e.prevPanesSize - N(i[0] - 1), null) : { sums: e, panesToResize: i };
472
- }, $ = (e) => l.value.reduce((n, t, i) => n + (i < e ? t.size : 0), 0), N = (e) => l.value.reduce((n, t, i) => n + (i > e + 1 ? t.size : 0), 0), V = (e) => [...l.value].reverse().find((t) => t.index < e && t.size > t.min) || {}, Z = (e) => l.value.find((t) => t.index > e + 1 && t.size > t.min) || {}, ee = () => {
473
- var n;
474
- const e = Array.from(((n = x.value) == null ? void 0 : n.children) || []);
460
+ v2 !== null && (v2.size = Math.min(Math.max(s2 - t.prevPanesSize - t.prevReachedMinPanes, v2.min), v2.max)), p2 !== null && (p2.size = Math.min(Math.max(100 - s2 - t.nextPanesSize - t.nextReachedMinPanes, p2.min), p2.max));
461
+ }, Q2 = (e, n2) => {
462
+ const t = c2.value.activeSplitter, i2 = [t, t + 1];
463
+ return n2 < e.prevPanesSize + l2.value[i2[0]].min && (i2[0] = V(t).index, e.prevReachedMinPanes = 0, i2[0] < t && l2.value.forEach((a2, s2) => {
464
+ s2 > i2[0] && s2 <= t && (a2.size = a2.min, e.prevReachedMinPanes += a2.min);
465
+ }), e.prevPanesSize = $2(i2[0]), i2[0] === void 0) ? (e.prevReachedMinPanes = 0, l2.value[0].size = l2.value[0].min, l2.value.forEach((a2, s2) => {
466
+ s2 > 0 && s2 <= t && (a2.size = a2.min, e.prevReachedMinPanes += a2.min);
467
+ }), l2.value[i2[1]].size = 100 - e.prevReachedMinPanes - l2.value[0].min - e.prevPanesSize - e.nextPanesSize, null) : n2 > 100 - e.nextPanesSize - l2.value[i2[1]].min && (i2[1] = Z2(t).index, e.nextReachedMinPanes = 0, i2[1] > t + 1 && l2.value.forEach((a2, s2) => {
468
+ s2 > t && s2 < i2[1] && (a2.size = a2.min, e.nextReachedMinPanes += a2.min);
469
+ }), e.nextPanesSize = N(i2[1] - 1), i2[1] === void 0) ? (e.nextReachedMinPanes = 0, l2.value.forEach((a2, s2) => {
470
+ s2 < m2.value - 1 && s2 >= t + 1 && (a2.size = a2.min, e.nextReachedMinPanes += a2.min);
471
+ }), l2.value[i2[0]].size = 100 - e.prevPanesSize - N(i2[0] - 1), null) : { sums: e, panesToResize: i2 };
472
+ }, $2 = (e) => l2.value.reduce((n2, t, i2) => n2 + (i2 < e ? t.size : 0), 0), N = (e) => l2.value.reduce((n2, t, i2) => n2 + (i2 > e + 1 ? t.size : 0), 0), V = (e) => [...l2.value].reverse().find((t) => t.index < e && t.size > t.min) || {}, Z2 = (e) => l2.value.find((t) => t.index > e + 1 && t.size > t.min) || {}, ee2 = () => {
473
+ var n2;
474
+ const e = Array.from(((n2 = x2.value) == null ? void 0 : n2.children) || []);
475
475
  for (const t of e) {
476
- const i = t.classList.contains("splitpanes__pane"), a = t.classList.contains("splitpanes__splitter");
477
- !i && !a && (t.remove(), console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."));
476
+ const i2 = t.classList.contains("splitpanes__pane"), a2 = t.classList.contains("splitpanes__splitter");
477
+ !i2 && !a2 && (t.remove(), console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."));
478
478
  }
479
- }, F = (e, n, t = false) => {
480
- const i = e - 1, a = document.createElement("div");
481
- a.classList.add("splitpanes__splitter"), t || (a.onmousedown = (s) => b(s, i), typeof window < "u" && "ontouchstart" in window && (a.ontouchstart = (s) => b(s, i)), a.onclick = (s) => A(s, i + 1)), a.ondblclick = (s) => U(s, i + 1), n.parentNode.insertBefore(a, n);
479
+ }, F2 = (e, n2, t = false) => {
480
+ const i2 = e - 1, a2 = document.createElement("div");
481
+ a2.classList.add("splitpanes__splitter"), t || (a2.onmousedown = (s2) => b2(s2, i2), typeof window < "u" && "ontouchstart" in window && (a2.ontouchstart = (s2) => b2(s2, i2)), a2.onclick = (s2) => A2(s2, i2 + 1)), a2.ondblclick = (s2) => U(s2, i2 + 1), n2.parentNode.insertBefore(a2, n2);
482
482
  }, ne = (e) => {
483
483
  e.onmousedown = void 0, e.onclick = void 0, e.ondblclick = void 0, e.remove();
484
- }, C = () => {
484
+ }, C2 = () => {
485
485
  var t;
486
- const e = Array.from(((t = x.value) == null ? void 0 : t.children) || []);
487
- for (const i of e)
488
- i.className.includes("splitpanes__splitter") && ne(i);
489
- let n = 0;
490
- for (const i of e)
491
- i.className.includes("splitpanes__pane") && (!n && u.firstSplitter ? F(n, i, true) : n && F(n, i), n++);
492
- }, ie = ({ uid: e, ...n }) => {
486
+ const e = Array.from(((t = x2.value) == null ? void 0 : t.children) || []);
487
+ for (const i2 of e)
488
+ i2.className.includes("splitpanes__splitter") && ne(i2);
489
+ let n2 = 0;
490
+ for (const i2 of e)
491
+ i2.className.includes("splitpanes__pane") && (!n2 && u2.firstSplitter ? F2(n2, i2, true) : n2 && F2(n2, i2), n2++);
492
+ }, ie = ({ uid: e, ...n2 }) => {
493
493
  const t = M.value[e];
494
- for (const [i, a] of Object.entries(n)) t[i] = a;
495
- }, te = (e) => {
494
+ for (const [i2, a2] of Object.entries(n2)) t[i2] = a2;
495
+ }, te2 = (e) => {
496
496
  var t;
497
- let n = -1;
498
- Array.from(((t = x.value) == null ? void 0 : t.children) || []).some((i) => (i.className.includes("splitpanes__pane") && n++, i.isSameNode(e.el))), l.value.splice(n, 0, { ...e, index: n }), l.value.forEach((i, a) => i.index = a), S.value && nextTick(() => {
499
- C(), L({ addedPane: l.value[n] }), d("pane-add", { pane: l.value[n] });
497
+ let n2 = -1;
498
+ Array.from(((t = x2.value) == null ? void 0 : t.children) || []).some((i2) => (i2.className.includes("splitpanes__pane") && n2++, i2.isSameNode(e.el))), l2.value.splice(n2, 0, { ...e, index: n2 }), l2.value.forEach((i2, a2) => i2.index = a2), S2.value && nextTick(() => {
499
+ C2(), L2({ addedPane: l2.value[n2] }), d2("pane-add", { pane: l2.value[n2] });
500
500
  });
501
- }, ae = (e) => {
502
- const n = l.value.findIndex((i) => i.id === e);
503
- l.value[n].el = null;
504
- const t = l.value.splice(n, 1)[0];
505
- l.value.forEach((i, a) => i.index = a), nextTick(() => {
506
- C(), d("pane-remove", { pane: t }), L({ removedPane: { ...t } });
501
+ }, ae2 = (e) => {
502
+ const n2 = l2.value.findIndex((i2) => i2.id === e);
503
+ l2.value[n2].el = null;
504
+ const t = l2.value.splice(n2, 1)[0];
505
+ l2.value.forEach((i2, a2) => i2.index = a2), nextTick(() => {
506
+ C2(), d2("pane-remove", { pane: t }), L2({ removedPane: { ...t } });
507
507
  });
508
- }, L = (e = {}) => {
509
- !e.addedPane && !e.removedPane ? le() : l.value.some((n) => n.givenSize !== null || n.min || n.max < 100) ? oe(e) : se(), S.value && d("resized");
508
+ }, L2 = (e = {}) => {
509
+ !e.addedPane && !e.removedPane ? le2() : l2.value.some((n2) => n2.givenSize !== null || n2.min || n2.max < 100) ? oe(e) : se(), S2.value && d2("resized");
510
510
  }, se = () => {
511
- const e = 100 / m.value;
512
- let n = 0;
513
- const t = [], i = [];
514
- for (const a of l.value)
515
- a.size = Math.max(Math.min(e, a.max), a.min), n -= a.size, a.size >= a.max && t.push(a.id), a.size <= a.min && i.push(a.id);
516
- n > 0.1 && q(n, t, i);
517
- }, le = () => {
511
+ const e = 100 / m2.value;
512
+ let n2 = 0;
513
+ const t = [], i2 = [];
514
+ for (const a2 of l2.value)
515
+ a2.size = Math.max(Math.min(e, a2.max), a2.min), n2 -= a2.size, a2.size >= a2.max && t.push(a2.id), a2.size <= a2.min && i2.push(a2.id);
516
+ n2 > 0.1 && q2(n2, t, i2);
517
+ }, le2 = () => {
518
518
  let e = 100;
519
- const n = [], t = [];
520
- let i = 0;
521
- for (const s of l.value)
522
- e -= s.size, s.givenSize !== null && i++, s.size >= s.max && n.push(s.id), s.size <= s.min && t.push(s.id);
523
- let a = 100;
519
+ const n2 = [], t = [];
520
+ let i2 = 0;
521
+ for (const s2 of l2.value)
522
+ e -= s2.size, s2.givenSize !== null && i2++, s2.size >= s2.max && n2.push(s2.id), s2.size <= s2.min && t.push(s2.id);
523
+ let a2 = 100;
524
524
  if (e > 0.1) {
525
- for (const s of l.value)
526
- s.givenSize === null && (s.size = Math.max(Math.min(e / (m.value - i), s.max), s.min)), a -= s.size;
527
- a > 0.1 && q(a, n, t);
525
+ for (const s2 of l2.value)
526
+ s2.givenSize === null && (s2.size = Math.max(Math.min(e / (m2.value - i2), s2.max), s2.min)), a2 -= s2.size;
527
+ a2 > 0.1 && q2(a2, n2, t);
528
528
  }
529
- }, oe = ({ addedPane: e, removedPane: n } = {}) => {
530
- let t = 100 / m.value, i = 0;
531
- const a = [], s = [];
532
- ((e == null ? void 0 : e.givenSize) ?? null) !== null && (t = (100 - e.givenSize) / (m.value - 1));
533
- for (const o of l.value)
534
- i -= o.size, o.size >= o.max && a.push(o.id), o.size <= o.min && s.push(o.id);
535
- if (!(Math.abs(i) < 0.1)) {
536
- for (const o of l.value)
537
- (e == null ? void 0 : e.givenSize) !== null && (e == null ? void 0 : e.id) === o.id || (o.size = Math.max(Math.min(t, o.max), o.min)), i -= o.size, o.size >= o.max && a.push(o.id), o.size <= o.min && s.push(o.id);
538
- i > 0.1 && q(i, a, s);
529
+ }, oe = ({ addedPane: e, removedPane: n2 } = {}) => {
530
+ let t = 100 / m2.value, i2 = 0;
531
+ const a2 = [], s2 = [];
532
+ ((e == null ? void 0 : e.givenSize) ?? null) !== null && (t = (100 - e.givenSize) / (m2.value - 1));
533
+ for (const o2 of l2.value)
534
+ i2 -= o2.size, o2.size >= o2.max && a2.push(o2.id), o2.size <= o2.min && s2.push(o2.id);
535
+ if (!(Math.abs(i2) < 0.1)) {
536
+ for (const o2 of l2.value)
537
+ (e == null ? void 0 : e.givenSize) !== null && (e == null ? void 0 : e.id) === o2.id || (o2.size = Math.max(Math.min(t, o2.max), o2.min)), i2 -= o2.size, o2.size >= o2.max && a2.push(o2.id), o2.size <= o2.min && s2.push(o2.id);
538
+ i2 > 0.1 && q2(i2, a2, s2);
539
539
  }
540
- }, q = (e, n, t) => {
541
- let i;
542
- e > 0 ? i = e / (m.value - n.length) : i = e / (m.value - t.length), l.value.forEach((a, s) => {
543
- if (e > 0 && !n.includes(a.id)) {
544
- const o = Math.max(Math.min(a.size + i, a.max), a.min), v = o - a.size;
545
- e -= v, a.size = o;
546
- } else if (!t.includes(a.id)) {
547
- const o = Math.max(Math.min(a.size + i, a.max), a.min), v = o - a.size;
548
- e -= v, a.size = o;
540
+ }, q2 = (e, n2, t) => {
541
+ let i2;
542
+ e > 0 ? i2 = e / (m2.value - n2.length) : i2 = e / (m2.value - t.length), l2.value.forEach((a2, s2) => {
543
+ if (e > 0 && !n2.includes(a2.id)) {
544
+ const o2 = Math.max(Math.min(a2.size + i2, a2.max), a2.min), v2 = o2 - a2.size;
545
+ e -= v2, a2.size = o2;
546
+ } else if (!t.includes(a2.id)) {
547
+ const o2 = Math.max(Math.min(a2.size + i2, a2.max), a2.min), v2 = o2 - a2.size;
548
+ e -= v2, a2.size = o2;
549
549
  }
550
550
  }), Math.abs(e) > 0.1 && nextTick(() => {
551
- S.value && console.warn("Splitpanes: Could not resize panes correctly due to their constraints.");
551
+ S2.value && console.warn("Splitpanes: Could not resize panes correctly due to their constraints.");
552
552
  });
553
- }, d = (e, n = void 0, t = false) => {
554
- const i = (n == null ? void 0 : n.index) ?? c.value.activeSplitter ?? null;
555
- y(e, {
556
- ...n,
557
- ...i !== null && { index: i },
558
- ...t && i !== null && {
559
- prevPane: l.value[i - (u.firstSplitter ? 1 : 0)],
560
- nextPane: l.value[i + (u.firstSplitter ? 0 : 1)]
553
+ }, d2 = (e, n2 = void 0, t = false) => {
554
+ const i2 = (n2 == null ? void 0 : n2.index) ?? c2.value.activeSplitter ?? null;
555
+ y2(e, {
556
+ ...n2,
557
+ ...i2 !== null && { index: i2 },
558
+ ...t && i2 !== null && {
559
+ prevPane: l2.value[i2 - (u2.firstSplitter ? 1 : 0)],
560
+ nextPane: l2.value[i2 + (u2.firstSplitter ? 0 : 1)]
561
561
  },
562
- panes: l.value.map((a) => ({ min: a.min, max: a.max, size: a.size }))
562
+ panes: l2.value.map((a2) => ({ min: a2.min, max: a2.max, size: a2.size }))
563
563
  });
564
564
  };
565
- watch(() => u.firstSplitter, () => C()), onMounted(() => {
566
- ee(), C(), L(), d("ready"), S.value = true;
567
- }), onBeforeUnmount(() => S.value = false);
568
- const re = () => {
565
+ watch(() => u2.firstSplitter, () => C2()), onMounted(() => {
566
+ ee2(), C2(), L2(), d2("ready"), S2.value = true;
567
+ }), onBeforeUnmount(() => S2.value = false);
568
+ const re2 = () => {
569
569
  var e;
570
- return h(
570
+ return h$2(
571
571
  "div",
572
- { ref: x, class: _.value },
573
- (e = E.default) == null ? void 0 : e.call(E)
572
+ { ref: x2, class: _2.value },
573
+ (e = E2.default) == null ? void 0 : e.call(E2)
574
574
  );
575
575
  };
576
- return provide("panes", l), provide("indexedPanes", M), provide("horizontal", computed(() => u.horizontal)), provide("requestUpdate", ie), provide("onPaneAdd", te), provide("onPaneRemove", ae), provide("onPaneClick", W), (e, n) => (openBlock(), createBlock(resolveDynamicComponent(re)));
576
+ return provide("panes", l2), provide("indexedPanes", M), provide("horizontal", computed(() => u2.horizontal)), provide("requestUpdate", ie), provide("onPaneAdd", te2), provide("onPaneRemove", ae2), provide("onPaneClick", W2), (e, n2) => (openBlock(), createBlock(resolveDynamicComponent(re2)));
577
577
  }
578
578
  }, ge = {
579
579
  __name: "pane",
@@ -582,40 +582,40 @@ const Pe = {
582
582
  minSize: { type: [Number, String], default: 0 },
583
583
  maxSize: { type: [Number, String], default: 100 }
584
584
  },
585
- setup(D) {
586
- var b;
587
- const h2 = D, y = inject("requestUpdate"), u = inject("onPaneAdd"), E = inject("horizontal"), l = inject("onPaneRemove"), M = inject("onPaneClick"), m = (b = getCurrentInstance()) == null ? void 0 : b.uid, x = inject("indexedPanes"), S = computed(() => x.value[m]), c = ref(null), f = computed(() => {
588
- const r = isNaN(h2.size) || h2.size === void 0 ? 0 : parseFloat(h2.size);
589
- return Math.max(Math.min(r, R.value), _.value);
590
- }), _ = computed(() => {
591
- const r = parseFloat(h2.minSize);
592
- return isNaN(r) ? 0 : r;
593
- }), R = computed(() => {
594
- const r = parseFloat(h2.maxSize);
595
- return isNaN(r) ? 100 : r;
596
- }), O = computed(() => {
597
- var r;
598
- return `${E.value ? "height" : "width"}: ${(r = S.value) == null ? void 0 : r.size}%`;
585
+ setup(D2) {
586
+ var b2;
587
+ const h2 = D2, y2 = inject("requestUpdate"), u2 = inject("onPaneAdd"), E2 = inject("horizontal"), l2 = inject("onPaneRemove"), M = inject("onPaneClick"), m2 = (b2 = getCurrentInstance()) == null ? void 0 : b2.uid, x2 = inject("indexedPanes"), S2 = computed(() => x2.value[m2]), c2 = ref(null), f2 = computed(() => {
588
+ const r2 = isNaN(h2.size) || h2.size === void 0 ? 0 : parseFloat(h2.size);
589
+ return Math.max(Math.min(r2, R2.value), _2.value);
590
+ }), _2 = computed(() => {
591
+ const r2 = parseFloat(h2.minSize);
592
+ return isNaN(r2) ? 0 : r2;
593
+ }), R2 = computed(() => {
594
+ const r2 = parseFloat(h2.maxSize);
595
+ return isNaN(r2) ? 100 : r2;
596
+ }), O2 = computed(() => {
597
+ var r2;
598
+ return `${E2.value ? "height" : "width"}: ${(r2 = S2.value) == null ? void 0 : r2.size}%`;
599
599
  });
600
- return watch(() => f.value, (r) => y({ uid: m, size: r })), watch(() => _.value, (r) => y({ uid: m, min: r })), watch(() => R.value, (r) => y({ uid: m, max: r })), onMounted(() => {
601
- u({
602
- id: m,
603
- el: c.value,
604
- min: _.value,
605
- max: R.value,
600
+ return watch(() => f2.value, (r2) => y2({ uid: m2, size: r2 })), watch(() => _2.value, (r2) => y2({ uid: m2, min: r2 })), watch(() => R2.value, (r2) => y2({ uid: m2, max: r2 })), onMounted(() => {
601
+ u2({
602
+ id: m2,
603
+ el: c2.value,
604
+ min: _2.value,
605
+ max: R2.value,
606
606
  // The given size (useful to know the user intention).
607
- givenSize: h2.size === void 0 ? null : f.value,
608
- size: f.value
607
+ givenSize: h2.size === void 0 ? null : f2.value,
608
+ size: f2.value
609
609
  // The computed current size at any time.
610
610
  });
611
- }), onBeforeUnmount(() => l(m)), (r, P) => (openBlock(), createElementBlock("div", {
611
+ }), onBeforeUnmount(() => l2(m2)), (r2, P2) => (openBlock(), createElementBlock("div", {
612
612
  ref_key: "paneEl",
613
- ref: c,
613
+ ref: c2,
614
614
  class: "splitpanes__pane",
615
- onClick: P[0] || (P[0] = (A) => unref(M)(A, r._.uid)),
616
- style: normalizeStyle(O.value)
615
+ onClick: P2[0] || (P2[0] = (A2) => unref(M)(A2, r2._.uid)),
616
+ style: normalizeStyle(O2.value)
617
617
  }, [
618
- renderSlot(r.$slots, "default")
618
+ renderSlot(r2.$slots, "default")
619
619
  ], 4));
620
620
  }
621
621
  };
@@ -923,20 +923,20 @@ const defaultIconCustomisations = Object.freeze({
923
923
  });
924
924
  const unitsSplit = /(-?[0-9.]*[0-9]+[0-9.]*)/g;
925
925
  const unitsTest = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
926
- function calculateSize(size, ratio, precision) {
926
+ function calculateSize(size2, ratio, precision) {
927
927
  if (ratio === 1) {
928
- return size;
928
+ return size2;
929
929
  }
930
930
  precision = precision || 100;
931
- if (typeof size === "number") {
932
- return Math.ceil(size * ratio * precision) / precision;
931
+ if (typeof size2 === "number") {
932
+ return Math.ceil(size2 * ratio * precision) / precision;
933
933
  }
934
- if (typeof size !== "string") {
935
- return size;
934
+ if (typeof size2 !== "string") {
935
+ return size2;
936
936
  }
937
- const oldParts = size.split(unitsSplit);
937
+ const oldParts = size2.split(unitsSplit);
938
938
  if (oldParts === null || !oldParts.length) {
939
- return size;
939
+ return size2;
940
940
  }
941
941
  const newParts = [];
942
942
  let code = oldParts.shift();
@@ -1329,14 +1329,14 @@ function sortIcons(icons) {
1329
1329
  pending: []
1330
1330
  };
1331
1331
  const storage2 = /* @__PURE__ */ Object.create(null);
1332
- icons.sort((a, b) => {
1333
- if (a.provider !== b.provider) {
1334
- return a.provider.localeCompare(b.provider);
1332
+ icons.sort((a2, b2) => {
1333
+ if (a2.provider !== b2.provider) {
1334
+ return a2.provider.localeCompare(b2.provider);
1335
1335
  }
1336
- if (a.prefix !== b.prefix) {
1337
- return a.prefix.localeCompare(b.prefix);
1336
+ if (a2.prefix !== b2.prefix) {
1337
+ return a2.prefix.localeCompare(b2.prefix);
1338
1338
  }
1339
- return a.name.localeCompare(b.name);
1339
+ return a2.name.localeCompare(b2.name);
1340
1340
  });
1341
1341
  let lastIcon = {
1342
1342
  provider: "",
@@ -1775,8 +1775,8 @@ function iterateBrowserStorage(key, callback) {
1775
1775
  if (version !== browserCacheVersion) {
1776
1776
  if (version) {
1777
1777
  const total2 = getBrowserStorageItemsCount(func);
1778
- for (let i = 0; i < total2; i++) {
1779
- removeStoredItem(func, browserCachePrefix + i.toString());
1778
+ for (let i2 = 0; i2 < total2; i2++) {
1779
+ removeStoredItem(func, browserCachePrefix + i2.toString());
1780
1780
  }
1781
1781
  }
1782
1782
  setStoredItem(func, browserCacheVersionKey, browserCacheVersion);
@@ -1801,13 +1801,13 @@ function iterateBrowserStorage(key, callback) {
1801
1801
  removeStoredItem(func, name);
1802
1802
  };
1803
1803
  let total = getBrowserStorageItemsCount(func);
1804
- for (let i = total - 1; i >= 0; i--) {
1805
- if (!parseItem(i)) {
1806
- if (i === total - 1) {
1804
+ for (let i2 = total - 1; i2 >= 0; i2--) {
1805
+ if (!parseItem(i2)) {
1806
+ if (i2 === total - 1) {
1807
1807
  total--;
1808
1808
  setBrowserStorageItemsCount(func, total);
1809
1809
  } else {
1810
- browserStorageEmptyItems[key].add(i);
1810
+ browserStorageEmptyItems[key].add(i2);
1811
1811
  }
1812
1812
  }
1813
1813
  }
@@ -2031,8 +2031,8 @@ function mergeCustomisations(defaults, item) {
2031
2031
  return result;
2032
2032
  }
2033
2033
  const separator = /[\s,]+/;
2034
- function flipFromString(custom, flip) {
2035
- flip.split(separator).forEach((str) => {
2034
+ function flipFromString(custom, flip2) {
2035
+ flip2.split(separator).forEach((str) => {
2036
2036
  const value = str.trim();
2037
2037
  switch (value) {
2038
2038
  case "horizontal":
@@ -2209,7 +2209,7 @@ const render = (icon, props) => {
2209
2209
  id = id.replace(/-/g, "_");
2210
2210
  }
2211
2211
  componentProps["innerHTML"] = replaceIDs(item.body, id ? () => id + "ID" + localCounter++ : "iconifyVue");
2212
- return h("svg", componentProps);
2212
+ return h$2("svg", componentProps);
2213
2213
  }
2214
2214
  const { body, width, height } = icon;
2215
2215
  const useMask = mode === "mask" || (mode === "bg" ? false : body.indexOf("currentColor") !== -1);
@@ -2227,7 +2227,7 @@ const render = (icon, props) => {
2227
2227
  ...useMask ? monotoneProps : coloredProps,
2228
2228
  ...customStyle
2229
2229
  };
2230
- return h("span", componentProps);
2230
+ return h$2("span", componentProps);
2231
2231
  };
2232
2232
  allowSimpleNames(true);
2233
2233
  setAPIModule("", fetchAPIModule);
@@ -2495,6 +2495,2374 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2495
2495
  }
2496
2496
  });
2497
2497
  const ButtonRightPanel = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-b373d5f7"]]);
2498
+ const sides = ["top", "right", "bottom", "left"];
2499
+ const alignments = ["start", "end"];
2500
+ const placements = /* @__PURE__ */ sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
2501
+ const min = Math.min;
2502
+ const max = Math.max;
2503
+ const oppositeSideMap = {
2504
+ left: "right",
2505
+ right: "left",
2506
+ bottom: "top",
2507
+ top: "bottom"
2508
+ };
2509
+ const oppositeAlignmentMap = {
2510
+ start: "end",
2511
+ end: "start"
2512
+ };
2513
+ function clamp(start, value, end) {
2514
+ return max(start, min(value, end));
2515
+ }
2516
+ function evaluate(value, param) {
2517
+ return typeof value === "function" ? value(param) : value;
2518
+ }
2519
+ function getSide(placement) {
2520
+ return placement.split("-")[0];
2521
+ }
2522
+ function getAlignment(placement) {
2523
+ return placement.split("-")[1];
2524
+ }
2525
+ function getOppositeAxis(axis) {
2526
+ return axis === "x" ? "y" : "x";
2527
+ }
2528
+ function getAxisLength(axis) {
2529
+ return axis === "y" ? "height" : "width";
2530
+ }
2531
+ const yAxisSides = /* @__PURE__ */ new Set(["top", "bottom"]);
2532
+ function getSideAxis(placement) {
2533
+ return yAxisSides.has(getSide(placement)) ? "y" : "x";
2534
+ }
2535
+ function getAlignmentAxis(placement) {
2536
+ return getOppositeAxis(getSideAxis(placement));
2537
+ }
2538
+ function getAlignmentSides(placement, rects, rtl) {
2539
+ if (rtl === void 0) {
2540
+ rtl = false;
2541
+ }
2542
+ const alignment = getAlignment(placement);
2543
+ const alignmentAxis = getAlignmentAxis(placement);
2544
+ const length = getAxisLength(alignmentAxis);
2545
+ let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
2546
+ if (rects.reference[length] > rects.floating[length]) {
2547
+ mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
2548
+ }
2549
+ return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
2550
+ }
2551
+ function getExpandedPlacements(placement) {
2552
+ const oppositePlacement = getOppositePlacement(placement);
2553
+ return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
2554
+ }
2555
+ function getOppositeAlignmentPlacement(placement) {
2556
+ return placement.replace(/start|end/g, (alignment) => oppositeAlignmentMap[alignment]);
2557
+ }
2558
+ const lrPlacement = ["left", "right"];
2559
+ const rlPlacement = ["right", "left"];
2560
+ const tbPlacement = ["top", "bottom"];
2561
+ const btPlacement = ["bottom", "top"];
2562
+ function getSideList(side, isStart, rtl) {
2563
+ switch (side) {
2564
+ case "top":
2565
+ case "bottom":
2566
+ if (rtl) return isStart ? rlPlacement : lrPlacement;
2567
+ return isStart ? lrPlacement : rlPlacement;
2568
+ case "left":
2569
+ case "right":
2570
+ return isStart ? tbPlacement : btPlacement;
2571
+ default:
2572
+ return [];
2573
+ }
2574
+ }
2575
+ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
2576
+ const alignment = getAlignment(placement);
2577
+ let list = getSideList(getSide(placement), direction === "start", rtl);
2578
+ if (alignment) {
2579
+ list = list.map((side) => side + "-" + alignment);
2580
+ if (flipAlignment) {
2581
+ list = list.concat(list.map(getOppositeAlignmentPlacement));
2582
+ }
2583
+ }
2584
+ return list;
2585
+ }
2586
+ function getOppositePlacement(placement) {
2587
+ return placement.replace(/left|right|bottom|top/g, (side) => oppositeSideMap[side]);
2588
+ }
2589
+ function expandPaddingObject(padding) {
2590
+ return {
2591
+ top: 0,
2592
+ right: 0,
2593
+ bottom: 0,
2594
+ left: 0,
2595
+ ...padding
2596
+ };
2597
+ }
2598
+ function getPaddingObject(padding) {
2599
+ return typeof padding !== "number" ? expandPaddingObject(padding) : {
2600
+ top: padding,
2601
+ right: padding,
2602
+ bottom: padding,
2603
+ left: padding
2604
+ };
2605
+ }
2606
+ function rectToClientRect(rect) {
2607
+ const {
2608
+ x: x2,
2609
+ y: y2,
2610
+ width,
2611
+ height
2612
+ } = rect;
2613
+ return {
2614
+ width,
2615
+ height,
2616
+ top: y2,
2617
+ left: x2,
2618
+ right: x2 + width,
2619
+ bottom: y2 + height,
2620
+ x: x2,
2621
+ y: y2
2622
+ };
2623
+ }
2624
+ function computeCoordsFromPlacement(_ref, placement, rtl) {
2625
+ let {
2626
+ reference,
2627
+ floating
2628
+ } = _ref;
2629
+ const sideAxis = getSideAxis(placement);
2630
+ const alignmentAxis = getAlignmentAxis(placement);
2631
+ const alignLength = getAxisLength(alignmentAxis);
2632
+ const side = getSide(placement);
2633
+ const isVertical = sideAxis === "y";
2634
+ const commonX = reference.x + reference.width / 2 - floating.width / 2;
2635
+ const commonY = reference.y + reference.height / 2 - floating.height / 2;
2636
+ const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
2637
+ let coords;
2638
+ switch (side) {
2639
+ case "top":
2640
+ coords = {
2641
+ x: commonX,
2642
+ y: reference.y - floating.height
2643
+ };
2644
+ break;
2645
+ case "bottom":
2646
+ coords = {
2647
+ x: commonX,
2648
+ y: reference.y + reference.height
2649
+ };
2650
+ break;
2651
+ case "right":
2652
+ coords = {
2653
+ x: reference.x + reference.width,
2654
+ y: commonY
2655
+ };
2656
+ break;
2657
+ case "left":
2658
+ coords = {
2659
+ x: reference.x - floating.width,
2660
+ y: commonY
2661
+ };
2662
+ break;
2663
+ default:
2664
+ coords = {
2665
+ x: reference.x,
2666
+ y: reference.y
2667
+ };
2668
+ }
2669
+ switch (getAlignment(placement)) {
2670
+ case "start":
2671
+ coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
2672
+ break;
2673
+ case "end":
2674
+ coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
2675
+ break;
2676
+ }
2677
+ return coords;
2678
+ }
2679
+ const computePosition = async (reference, floating, config) => {
2680
+ const {
2681
+ placement = "bottom",
2682
+ strategy = "absolute",
2683
+ middleware = [],
2684
+ platform
2685
+ } = config;
2686
+ const validMiddleware = middleware.filter(Boolean);
2687
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
2688
+ let rects = await platform.getElementRects({
2689
+ reference,
2690
+ floating,
2691
+ strategy
2692
+ });
2693
+ let {
2694
+ x: x2,
2695
+ y: y2
2696
+ } = computeCoordsFromPlacement(rects, placement, rtl);
2697
+ let statefulPlacement = placement;
2698
+ let middlewareData = {};
2699
+ let resetCount = 0;
2700
+ for (let i2 = 0; i2 < validMiddleware.length; i2++) {
2701
+ const {
2702
+ name,
2703
+ fn
2704
+ } = validMiddleware[i2];
2705
+ const {
2706
+ x: nextX,
2707
+ y: nextY,
2708
+ data,
2709
+ reset
2710
+ } = await fn({
2711
+ x: x2,
2712
+ y: y2,
2713
+ initialPlacement: placement,
2714
+ placement: statefulPlacement,
2715
+ strategy,
2716
+ middlewareData,
2717
+ rects,
2718
+ platform,
2719
+ elements: {
2720
+ reference,
2721
+ floating
2722
+ }
2723
+ });
2724
+ x2 = nextX != null ? nextX : x2;
2725
+ y2 = nextY != null ? nextY : y2;
2726
+ middlewareData = {
2727
+ ...middlewareData,
2728
+ [name]: {
2729
+ ...middlewareData[name],
2730
+ ...data
2731
+ }
2732
+ };
2733
+ if (reset && resetCount <= 50) {
2734
+ resetCount++;
2735
+ if (typeof reset === "object") {
2736
+ if (reset.placement) {
2737
+ statefulPlacement = reset.placement;
2738
+ }
2739
+ if (reset.rects) {
2740
+ rects = reset.rects === true ? await platform.getElementRects({
2741
+ reference,
2742
+ floating,
2743
+ strategy
2744
+ }) : reset.rects;
2745
+ }
2746
+ ({
2747
+ x: x2,
2748
+ y: y2
2749
+ } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
2750
+ }
2751
+ i2 = -1;
2752
+ }
2753
+ }
2754
+ return {
2755
+ x: x2,
2756
+ y: y2,
2757
+ placement: statefulPlacement,
2758
+ strategy,
2759
+ middlewareData
2760
+ };
2761
+ };
2762
+ async function detectOverflow(state, options) {
2763
+ var _await$platform$isEle;
2764
+ if (options === void 0) {
2765
+ options = {};
2766
+ }
2767
+ const {
2768
+ x: x2,
2769
+ y: y2,
2770
+ platform,
2771
+ rects,
2772
+ elements,
2773
+ strategy
2774
+ } = state;
2775
+ const {
2776
+ boundary = "clippingAncestors",
2777
+ rootBoundary = "viewport",
2778
+ elementContext = "floating",
2779
+ altBoundary = false,
2780
+ padding = 0
2781
+ } = evaluate(options, state);
2782
+ const paddingObject = getPaddingObject(padding);
2783
+ const altContext = elementContext === "floating" ? "reference" : "floating";
2784
+ const element = elements[altBoundary ? altContext : elementContext];
2785
+ const clippingClientRect = rectToClientRect(await platform.getClippingRect({
2786
+ element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating)),
2787
+ boundary,
2788
+ rootBoundary,
2789
+ strategy
2790
+ }));
2791
+ const rect = elementContext === "floating" ? {
2792
+ x: x2,
2793
+ y: y2,
2794
+ width: rects.floating.width,
2795
+ height: rects.floating.height
2796
+ } : rects.reference;
2797
+ const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
2798
+ const offsetScale = await (platform.isElement == null ? void 0 : platform.isElement(offsetParent)) ? await (platform.getScale == null ? void 0 : platform.getScale(offsetParent)) || {
2799
+ x: 1,
2800
+ y: 1
2801
+ } : {
2802
+ x: 1,
2803
+ y: 1
2804
+ };
2805
+ const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
2806
+ elements,
2807
+ rect,
2808
+ offsetParent,
2809
+ strategy
2810
+ }) : rect);
2811
+ return {
2812
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
2813
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
2814
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
2815
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
2816
+ };
2817
+ }
2818
+ const arrow = (options) => ({
2819
+ name: "arrow",
2820
+ options,
2821
+ async fn(state) {
2822
+ const {
2823
+ x: x2,
2824
+ y: y2,
2825
+ placement,
2826
+ rects,
2827
+ platform,
2828
+ elements,
2829
+ middlewareData
2830
+ } = state;
2831
+ const {
2832
+ element,
2833
+ padding = 0
2834
+ } = evaluate(options, state) || {};
2835
+ if (element == null) {
2836
+ return {};
2837
+ }
2838
+ const paddingObject = getPaddingObject(padding);
2839
+ const coords = {
2840
+ x: x2,
2841
+ y: y2
2842
+ };
2843
+ const axis = getAlignmentAxis(placement);
2844
+ const length = getAxisLength(axis);
2845
+ const arrowDimensions = await platform.getDimensions(element);
2846
+ const isYAxis = axis === "y";
2847
+ const minProp = isYAxis ? "top" : "left";
2848
+ const maxProp = isYAxis ? "bottom" : "right";
2849
+ const clientProp = isYAxis ? "clientHeight" : "clientWidth";
2850
+ const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
2851
+ const startDiff = coords[axis] - rects.reference[axis];
2852
+ const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
2853
+ let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
2854
+ if (!clientSize || !await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent))) {
2855
+ clientSize = elements.floating[clientProp] || rects.floating[length];
2856
+ }
2857
+ const centerToReference = endDiff / 2 - startDiff / 2;
2858
+ const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
2859
+ const minPadding = min(paddingObject[minProp], largestPossiblePadding);
2860
+ const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);
2861
+ const min$1 = minPadding;
2862
+ const max2 = clientSize - arrowDimensions[length] - maxPadding;
2863
+ const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
2864
+ const offset2 = clamp(min$1, center, max2);
2865
+ const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset2 && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
2866
+ const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max2 : 0;
2867
+ return {
2868
+ [axis]: coords[axis] + alignmentOffset,
2869
+ data: {
2870
+ [axis]: offset2,
2871
+ centerOffset: center - offset2 - alignmentOffset,
2872
+ ...shouldAddOffset && {
2873
+ alignmentOffset
2874
+ }
2875
+ },
2876
+ reset: shouldAddOffset
2877
+ };
2878
+ }
2879
+ });
2880
+ function getPlacementList(alignment, autoAlignment, allowedPlacements) {
2881
+ const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter((placement) => getAlignment(placement) === alignment), ...allowedPlacements.filter((placement) => getAlignment(placement) !== alignment)] : allowedPlacements.filter((placement) => getSide(placement) === placement);
2882
+ return allowedPlacementsSortedByAlignment.filter((placement) => {
2883
+ if (alignment) {
2884
+ return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);
2885
+ }
2886
+ return true;
2887
+ });
2888
+ }
2889
+ const autoPlacement = function(options) {
2890
+ if (options === void 0) {
2891
+ options = {};
2892
+ }
2893
+ return {
2894
+ name: "autoPlacement",
2895
+ options,
2896
+ async fn(state) {
2897
+ var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;
2898
+ const {
2899
+ rects,
2900
+ middlewareData,
2901
+ placement,
2902
+ platform,
2903
+ elements
2904
+ } = state;
2905
+ const {
2906
+ crossAxis = false,
2907
+ alignment,
2908
+ allowedPlacements = placements,
2909
+ autoAlignment = true,
2910
+ ...detectOverflowOptions
2911
+ } = evaluate(options, state);
2912
+ const placements$1 = alignment !== void 0 || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
2913
+ const overflow = await detectOverflow(state, detectOverflowOptions);
2914
+ const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
2915
+ const currentPlacement = placements$1[currentIndex];
2916
+ if (currentPlacement == null) {
2917
+ return {};
2918
+ }
2919
+ const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
2920
+ if (placement !== currentPlacement) {
2921
+ return {
2922
+ reset: {
2923
+ placement: placements$1[0]
2924
+ }
2925
+ };
2926
+ }
2927
+ const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];
2928
+ const allOverflows = [...((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || [], {
2929
+ placement: currentPlacement,
2930
+ overflows: currentOverflows
2931
+ }];
2932
+ const nextPlacement = placements$1[currentIndex + 1];
2933
+ if (nextPlacement) {
2934
+ return {
2935
+ data: {
2936
+ index: currentIndex + 1,
2937
+ overflows: allOverflows
2938
+ },
2939
+ reset: {
2940
+ placement: nextPlacement
2941
+ }
2942
+ };
2943
+ }
2944
+ const placementsSortedByMostSpace = allOverflows.map((d2) => {
2945
+ const alignment2 = getAlignment(d2.placement);
2946
+ return [d2.placement, alignment2 && crossAxis ? (
2947
+ // Check along the mainAxis and main crossAxis side.
2948
+ d2.overflows.slice(0, 2).reduce((acc, v2) => acc + v2, 0)
2949
+ ) : (
2950
+ // Check only the mainAxis.
2951
+ d2.overflows[0]
2952
+ ), d2.overflows];
2953
+ }).sort((a2, b2) => a2[1] - b2[1]);
2954
+ const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter((d2) => d2[2].slice(
2955
+ 0,
2956
+ // Aligned placements should not check their opposite crossAxis
2957
+ // side.
2958
+ getAlignment(d2[0]) ? 2 : 3
2959
+ ).every((v2) => v2 <= 0));
2960
+ const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];
2961
+ if (resetPlacement !== placement) {
2962
+ return {
2963
+ data: {
2964
+ index: currentIndex + 1,
2965
+ overflows: allOverflows
2966
+ },
2967
+ reset: {
2968
+ placement: resetPlacement
2969
+ }
2970
+ };
2971
+ }
2972
+ return {};
2973
+ }
2974
+ };
2975
+ };
2976
+ const flip = function(options) {
2977
+ if (options === void 0) {
2978
+ options = {};
2979
+ }
2980
+ return {
2981
+ name: "flip",
2982
+ options,
2983
+ async fn(state) {
2984
+ var _middlewareData$arrow, _middlewareData$flip;
2985
+ const {
2986
+ placement,
2987
+ middlewareData,
2988
+ rects,
2989
+ initialPlacement,
2990
+ platform,
2991
+ elements
2992
+ } = state;
2993
+ const {
2994
+ mainAxis: checkMainAxis = true,
2995
+ crossAxis: checkCrossAxis = true,
2996
+ fallbackPlacements: specifiedFallbackPlacements,
2997
+ fallbackStrategy = "bestFit",
2998
+ fallbackAxisSideDirection = "none",
2999
+ flipAlignment = true,
3000
+ ...detectOverflowOptions
3001
+ } = evaluate(options, state);
3002
+ if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
3003
+ return {};
3004
+ }
3005
+ const side = getSide(placement);
3006
+ const initialSideAxis = getSideAxis(initialPlacement);
3007
+ const isBasePlacement = getSide(initialPlacement) === initialPlacement;
3008
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
3009
+ const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
3010
+ const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
3011
+ if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
3012
+ fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
3013
+ }
3014
+ const placements2 = [initialPlacement, ...fallbackPlacements];
3015
+ const overflow = await detectOverflow(state, detectOverflowOptions);
3016
+ const overflows = [];
3017
+ let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
3018
+ if (checkMainAxis) {
3019
+ overflows.push(overflow[side]);
3020
+ }
3021
+ if (checkCrossAxis) {
3022
+ const sides2 = getAlignmentSides(placement, rects, rtl);
3023
+ overflows.push(overflow[sides2[0]], overflow[sides2[1]]);
3024
+ }
3025
+ overflowsData = [...overflowsData, {
3026
+ placement,
3027
+ overflows
3028
+ }];
3029
+ if (!overflows.every((side2) => side2 <= 0)) {
3030
+ var _middlewareData$flip2, _overflowsData$filter;
3031
+ const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
3032
+ const nextPlacement = placements2[nextIndex];
3033
+ if (nextPlacement) {
3034
+ const ignoreCrossAxisOverflow = checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false;
3035
+ if (!ignoreCrossAxisOverflow || // We leave the current main axis only if every placement on that axis
3036
+ // overflows the main axis.
3037
+ overflowsData.every((d2) => getSideAxis(d2.placement) === initialSideAxis ? d2.overflows[0] > 0 : true)) {
3038
+ return {
3039
+ data: {
3040
+ index: nextIndex,
3041
+ overflows: overflowsData
3042
+ },
3043
+ reset: {
3044
+ placement: nextPlacement
3045
+ }
3046
+ };
3047
+ }
3048
+ }
3049
+ let resetPlacement = (_overflowsData$filter = overflowsData.filter((d2) => d2.overflows[0] <= 0).sort((a2, b2) => a2.overflows[1] - b2.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
3050
+ if (!resetPlacement) {
3051
+ switch (fallbackStrategy) {
3052
+ case "bestFit": {
3053
+ var _overflowsData$filter2;
3054
+ const placement2 = (_overflowsData$filter2 = overflowsData.filter((d2) => {
3055
+ if (hasFallbackAxisSideDirection) {
3056
+ const currentSideAxis = getSideAxis(d2.placement);
3057
+ return currentSideAxis === initialSideAxis || // Create a bias to the `y` side axis due to horizontal
3058
+ // reading directions favoring greater width.
3059
+ currentSideAxis === "y";
3060
+ }
3061
+ return true;
3062
+ }).map((d2) => [d2.placement, d2.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a2, b2) => a2[1] - b2[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
3063
+ if (placement2) {
3064
+ resetPlacement = placement2;
3065
+ }
3066
+ break;
3067
+ }
3068
+ case "initialPlacement":
3069
+ resetPlacement = initialPlacement;
3070
+ break;
3071
+ }
3072
+ }
3073
+ if (placement !== resetPlacement) {
3074
+ return {
3075
+ reset: {
3076
+ placement: resetPlacement
3077
+ }
3078
+ };
3079
+ }
3080
+ }
3081
+ return {};
3082
+ }
3083
+ };
3084
+ };
3085
+ const originSides = /* @__PURE__ */ new Set(["left", "top"]);
3086
+ async function convertValueToCoords(state, options) {
3087
+ const {
3088
+ placement,
3089
+ platform,
3090
+ elements
3091
+ } = state;
3092
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
3093
+ const side = getSide(placement);
3094
+ const alignment = getAlignment(placement);
3095
+ const isVertical = getSideAxis(placement) === "y";
3096
+ const mainAxisMulti = originSides.has(side) ? -1 : 1;
3097
+ const crossAxisMulti = rtl && isVertical ? -1 : 1;
3098
+ const rawValue = evaluate(options, state);
3099
+ let {
3100
+ mainAxis,
3101
+ crossAxis,
3102
+ alignmentAxis
3103
+ } = typeof rawValue === "number" ? {
3104
+ mainAxis: rawValue,
3105
+ crossAxis: 0,
3106
+ alignmentAxis: null
3107
+ } : {
3108
+ mainAxis: rawValue.mainAxis || 0,
3109
+ crossAxis: rawValue.crossAxis || 0,
3110
+ alignmentAxis: rawValue.alignmentAxis
3111
+ };
3112
+ if (alignment && typeof alignmentAxis === "number") {
3113
+ crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
3114
+ }
3115
+ return isVertical ? {
3116
+ x: crossAxis * crossAxisMulti,
3117
+ y: mainAxis * mainAxisMulti
3118
+ } : {
3119
+ x: mainAxis * mainAxisMulti,
3120
+ y: crossAxis * crossAxisMulti
3121
+ };
3122
+ }
3123
+ const offset = function(options) {
3124
+ if (options === void 0) {
3125
+ options = 0;
3126
+ }
3127
+ return {
3128
+ name: "offset",
3129
+ options,
3130
+ async fn(state) {
3131
+ var _middlewareData$offse, _middlewareData$arrow;
3132
+ const {
3133
+ x: x2,
3134
+ y: y2,
3135
+ placement,
3136
+ middlewareData
3137
+ } = state;
3138
+ const diffCoords = await convertValueToCoords(state, options);
3139
+ if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
3140
+ return {};
3141
+ }
3142
+ return {
3143
+ x: x2 + diffCoords.x,
3144
+ y: y2 + diffCoords.y,
3145
+ data: {
3146
+ ...diffCoords,
3147
+ placement
3148
+ }
3149
+ };
3150
+ }
3151
+ };
3152
+ };
3153
+ const shift = function(options) {
3154
+ if (options === void 0) {
3155
+ options = {};
3156
+ }
3157
+ return {
3158
+ name: "shift",
3159
+ options,
3160
+ async fn(state) {
3161
+ const {
3162
+ x: x2,
3163
+ y: y2,
3164
+ placement
3165
+ } = state;
3166
+ const {
3167
+ mainAxis: checkMainAxis = true,
3168
+ crossAxis: checkCrossAxis = false,
3169
+ limiter = {
3170
+ fn: (_ref) => {
3171
+ let {
3172
+ x: x3,
3173
+ y: y3
3174
+ } = _ref;
3175
+ return {
3176
+ x: x3,
3177
+ y: y3
3178
+ };
3179
+ }
3180
+ },
3181
+ ...detectOverflowOptions
3182
+ } = evaluate(options, state);
3183
+ const coords = {
3184
+ x: x2,
3185
+ y: y2
3186
+ };
3187
+ const overflow = await detectOverflow(state, detectOverflowOptions);
3188
+ const crossAxis = getSideAxis(getSide(placement));
3189
+ const mainAxis = getOppositeAxis(crossAxis);
3190
+ let mainAxisCoord = coords[mainAxis];
3191
+ let crossAxisCoord = coords[crossAxis];
3192
+ if (checkMainAxis) {
3193
+ const minSide = mainAxis === "y" ? "top" : "left";
3194
+ const maxSide = mainAxis === "y" ? "bottom" : "right";
3195
+ const min2 = mainAxisCoord + overflow[minSide];
3196
+ const max2 = mainAxisCoord - overflow[maxSide];
3197
+ mainAxisCoord = clamp(min2, mainAxisCoord, max2);
3198
+ }
3199
+ if (checkCrossAxis) {
3200
+ const minSide = crossAxis === "y" ? "top" : "left";
3201
+ const maxSide = crossAxis === "y" ? "bottom" : "right";
3202
+ const min2 = crossAxisCoord + overflow[minSide];
3203
+ const max2 = crossAxisCoord - overflow[maxSide];
3204
+ crossAxisCoord = clamp(min2, crossAxisCoord, max2);
3205
+ }
3206
+ const limitedCoords = limiter.fn({
3207
+ ...state,
3208
+ [mainAxis]: mainAxisCoord,
3209
+ [crossAxis]: crossAxisCoord
3210
+ });
3211
+ return {
3212
+ ...limitedCoords,
3213
+ data: {
3214
+ x: limitedCoords.x - x2,
3215
+ y: limitedCoords.y - y2,
3216
+ enabled: {
3217
+ [mainAxis]: checkMainAxis,
3218
+ [crossAxis]: checkCrossAxis
3219
+ }
3220
+ }
3221
+ };
3222
+ }
3223
+ };
3224
+ };
3225
+ const size = function(options) {
3226
+ if (options === void 0) {
3227
+ options = {};
3228
+ }
3229
+ return {
3230
+ name: "size",
3231
+ options,
3232
+ async fn(state) {
3233
+ var _state$middlewareData, _state$middlewareData2;
3234
+ const {
3235
+ placement,
3236
+ rects,
3237
+ platform,
3238
+ elements
3239
+ } = state;
3240
+ const {
3241
+ apply = () => {
3242
+ },
3243
+ ...detectOverflowOptions
3244
+ } = evaluate(options, state);
3245
+ const overflow = await detectOverflow(state, detectOverflowOptions);
3246
+ const side = getSide(placement);
3247
+ const alignment = getAlignment(placement);
3248
+ const isYAxis = getSideAxis(placement) === "y";
3249
+ const {
3250
+ width,
3251
+ height
3252
+ } = rects.floating;
3253
+ let heightSide;
3254
+ let widthSide;
3255
+ if (side === "top" || side === "bottom") {
3256
+ heightSide = side;
3257
+ widthSide = alignment === (await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)) ? "start" : "end") ? "left" : "right";
3258
+ } else {
3259
+ widthSide = side;
3260
+ heightSide = alignment === "end" ? "top" : "bottom";
3261
+ }
3262
+ const maximumClippingHeight = height - overflow.top - overflow.bottom;
3263
+ const maximumClippingWidth = width - overflow.left - overflow.right;
3264
+ const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
3265
+ const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
3266
+ const noShift = !state.middlewareData.shift;
3267
+ let availableHeight = overflowAvailableHeight;
3268
+ let availableWidth = overflowAvailableWidth;
3269
+ if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {
3270
+ availableWidth = maximumClippingWidth;
3271
+ }
3272
+ if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {
3273
+ availableHeight = maximumClippingHeight;
3274
+ }
3275
+ if (noShift && !alignment) {
3276
+ const xMin = max(overflow.left, 0);
3277
+ const xMax = max(overflow.right, 0);
3278
+ const yMin = max(overflow.top, 0);
3279
+ const yMax = max(overflow.bottom, 0);
3280
+ if (isYAxis) {
3281
+ availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));
3282
+ } else {
3283
+ availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));
3284
+ }
3285
+ }
3286
+ await apply({
3287
+ ...state,
3288
+ availableWidth,
3289
+ availableHeight
3290
+ });
3291
+ const nextDimensions = await platform.getDimensions(elements.floating);
3292
+ if (width !== nextDimensions.width || height !== nextDimensions.height) {
3293
+ return {
3294
+ reset: {
3295
+ rects: true
3296
+ }
3297
+ };
3298
+ }
3299
+ return {};
3300
+ }
3301
+ };
3302
+ };
3303
+ function n$1(t) {
3304
+ var e;
3305
+ return (null == (e = t.ownerDocument) ? void 0 : e.defaultView) || window;
3306
+ }
3307
+ function o(t) {
3308
+ return n$1(t).getComputedStyle(t);
3309
+ }
3310
+ const i = Math.min, r = Math.max, l = Math.round;
3311
+ function c$1(t) {
3312
+ const e = o(t);
3313
+ let n2 = parseFloat(e.width), i2 = parseFloat(e.height);
3314
+ const r2 = t.offsetWidth, c2 = t.offsetHeight, s2 = l(n2) !== r2 || l(i2) !== c2;
3315
+ return s2 && (n2 = r2, i2 = c2), { width: n2, height: i2, fallback: s2 };
3316
+ }
3317
+ function s(t) {
3318
+ return h$1(t) ? (t.nodeName || "").toLowerCase() : "";
3319
+ }
3320
+ let f;
3321
+ function u() {
3322
+ if (f) return f;
3323
+ const t = navigator.userAgentData;
3324
+ return t && Array.isArray(t.brands) ? (f = t.brands.map((t2) => t2.brand + "/" + t2.version).join(" "), f) : navigator.userAgent;
3325
+ }
3326
+ function a(t) {
3327
+ return t instanceof n$1(t).HTMLElement;
3328
+ }
3329
+ function d$1(t) {
3330
+ return t instanceof n$1(t).Element;
3331
+ }
3332
+ function h$1(t) {
3333
+ return t instanceof n$1(t).Node;
3334
+ }
3335
+ function p(t) {
3336
+ if ("undefined" == typeof ShadowRoot) return false;
3337
+ return t instanceof n$1(t).ShadowRoot || t instanceof ShadowRoot;
3338
+ }
3339
+ function g$1(t) {
3340
+ const { overflow: e, overflowX: n2, overflowY: i2, display: r2 } = o(t);
3341
+ return /auto|scroll|overlay|hidden|clip/.test(e + i2 + n2) && !["inline", "contents"].includes(r2);
3342
+ }
3343
+ function m$1(t) {
3344
+ return ["table", "td", "th"].includes(s(t));
3345
+ }
3346
+ function y$1(t) {
3347
+ const e = /firefox/i.test(u()), n2 = o(t), i2 = n2.backdropFilter || n2.WebkitBackdropFilter;
3348
+ return "none" !== n2.transform || "none" !== n2.perspective || !!i2 && "none" !== i2 || e && "filter" === n2.willChange || e && !!n2.filter && "none" !== n2.filter || ["transform", "perspective"].some((t2) => n2.willChange.includes(t2)) || ["paint", "layout", "strict", "content"].some((t2) => {
3349
+ const e2 = n2.contain;
3350
+ return null != e2 && e2.includes(t2);
3351
+ });
3352
+ }
3353
+ function x() {
3354
+ return !/^((?!chrome|android).)*safari/i.test(u());
3355
+ }
3356
+ function w(t) {
3357
+ return ["html", "body", "#document"].includes(s(t));
3358
+ }
3359
+ function v(t) {
3360
+ return d$1(t) ? t : t.contextElement;
3361
+ }
3362
+ const b = { x: 1, y: 1 };
3363
+ function L(t) {
3364
+ const e = v(t);
3365
+ if (!a(e)) return b;
3366
+ const n2 = e.getBoundingClientRect(), { width: o2, height: i2, fallback: r2 } = c$1(e);
3367
+ let s2 = (r2 ? l(n2.width) : n2.width) / o2, f2 = (r2 ? l(n2.height) : n2.height) / i2;
3368
+ return s2 && Number.isFinite(s2) || (s2 = 1), f2 && Number.isFinite(f2) || (f2 = 1), { x: s2, y: f2 };
3369
+ }
3370
+ function E$1(t, e, o2, i2) {
3371
+ var r2, l2;
3372
+ void 0 === e && (e = false), void 0 === o2 && (o2 = false);
3373
+ const c2 = t.getBoundingClientRect(), s2 = v(t);
3374
+ let f2 = b;
3375
+ e && (i2 ? d$1(i2) && (f2 = L(i2)) : f2 = L(t));
3376
+ const u2 = s2 ? n$1(s2) : window, a2 = !x() && o2;
3377
+ let h2 = (c2.left + (a2 && (null == (r2 = u2.visualViewport) ? void 0 : r2.offsetLeft) || 0)) / f2.x, p2 = (c2.top + (a2 && (null == (l2 = u2.visualViewport) ? void 0 : l2.offsetTop) || 0)) / f2.y, g2 = c2.width / f2.x, m2 = c2.height / f2.y;
3378
+ if (s2) {
3379
+ const t2 = n$1(s2), e2 = i2 && d$1(i2) ? n$1(i2) : i2;
3380
+ let o3 = t2.frameElement;
3381
+ for (; o3 && i2 && e2 !== t2; ) {
3382
+ const t3 = L(o3), e3 = o3.getBoundingClientRect(), i3 = getComputedStyle(o3);
3383
+ e3.x += (o3.clientLeft + parseFloat(i3.paddingLeft)) * t3.x, e3.y += (o3.clientTop + parseFloat(i3.paddingTop)) * t3.y, h2 *= t3.x, p2 *= t3.y, g2 *= t3.x, m2 *= t3.y, h2 += e3.x, p2 += e3.y, o3 = n$1(o3).frameElement;
3384
+ }
3385
+ }
3386
+ return { width: g2, height: m2, top: p2, right: h2 + g2, bottom: p2 + m2, left: h2, x: h2, y: p2 };
3387
+ }
3388
+ function R(t) {
3389
+ return ((h$1(t) ? t.ownerDocument : t.document) || window.document).documentElement;
3390
+ }
3391
+ function T(t) {
3392
+ return d$1(t) ? { scrollLeft: t.scrollLeft, scrollTop: t.scrollTop } : { scrollLeft: t.pageXOffset, scrollTop: t.pageYOffset };
3393
+ }
3394
+ function C$1(t) {
3395
+ return E$1(R(t)).left + T(t).scrollLeft;
3396
+ }
3397
+ function F(t) {
3398
+ if ("html" === s(t)) return t;
3399
+ const e = t.assignedSlot || t.parentNode || p(t) && t.host || R(t);
3400
+ return p(e) ? e.host : e;
3401
+ }
3402
+ function W(t) {
3403
+ const e = F(t);
3404
+ return w(e) ? e.ownerDocument.body : a(e) && g$1(e) ? e : W(e);
3405
+ }
3406
+ function D(t, e) {
3407
+ var o2;
3408
+ void 0 === e && (e = []);
3409
+ const i2 = W(t), r2 = i2 === (null == (o2 = t.ownerDocument) ? void 0 : o2.body), l2 = n$1(i2);
3410
+ return r2 ? e.concat(l2, l2.visualViewport || [], g$1(i2) ? i2 : []) : e.concat(i2, D(i2));
3411
+ }
3412
+ function S$1(e, i2, l2) {
3413
+ return "viewport" === i2 ? rectToClientRect(function(t, e2) {
3414
+ const o2 = n$1(t), i3 = R(t), r2 = o2.visualViewport;
3415
+ let l3 = i3.clientWidth, c2 = i3.clientHeight, s2 = 0, f2 = 0;
3416
+ if (r2) {
3417
+ l3 = r2.width, c2 = r2.height;
3418
+ const t2 = x();
3419
+ (t2 || !t2 && "fixed" === e2) && (s2 = r2.offsetLeft, f2 = r2.offsetTop);
3420
+ }
3421
+ return { width: l3, height: c2, x: s2, y: f2 };
3422
+ }(e, l2)) : d$1(i2) ? rectToClientRect(function(t, e2) {
3423
+ const n2 = E$1(t, true, "fixed" === e2), o2 = n2.top + t.clientTop, i3 = n2.left + t.clientLeft, r2 = a(t) ? L(t) : { x: 1, y: 1 };
3424
+ return { width: t.clientWidth * r2.x, height: t.clientHeight * r2.y, x: i3 * r2.x, y: o2 * r2.y };
3425
+ }(i2, l2)) : rectToClientRect(function(t) {
3426
+ const e2 = R(t), n2 = T(t), i3 = t.ownerDocument.body, l3 = r(e2.scrollWidth, e2.clientWidth, i3.scrollWidth, i3.clientWidth), c2 = r(e2.scrollHeight, e2.clientHeight, i3.scrollHeight, i3.clientHeight);
3427
+ let s2 = -n2.scrollLeft + C$1(t);
3428
+ const f2 = -n2.scrollTop;
3429
+ return "rtl" === o(i3).direction && (s2 += r(e2.clientWidth, i3.clientWidth) - l3), { width: l3, height: c2, x: s2, y: f2 };
3430
+ }(R(e)));
3431
+ }
3432
+ function A(t) {
3433
+ return a(t) && "fixed" !== o(t).position ? t.offsetParent : null;
3434
+ }
3435
+ function H(t) {
3436
+ const e = n$1(t);
3437
+ let i2 = A(t);
3438
+ for (; i2 && m$1(i2) && "static" === o(i2).position; ) i2 = A(i2);
3439
+ return i2 && ("html" === s(i2) || "body" === s(i2) && "static" === o(i2).position && !y$1(i2)) ? e : i2 || function(t2) {
3440
+ let e2 = F(t2);
3441
+ for (; a(e2) && !w(e2); ) {
3442
+ if (y$1(e2)) return e2;
3443
+ e2 = F(e2);
3444
+ }
3445
+ return null;
3446
+ }(t) || e;
3447
+ }
3448
+ function O(t, e, n2) {
3449
+ const o2 = a(e), i2 = R(e), r2 = E$1(t, true, "fixed" === n2, e);
3450
+ let l2 = { scrollLeft: 0, scrollTop: 0 };
3451
+ const c2 = { x: 0, y: 0 };
3452
+ if (o2 || !o2 && "fixed" !== n2) if (("body" !== s(e) || g$1(i2)) && (l2 = T(e)), a(e)) {
3453
+ const t2 = E$1(e, true);
3454
+ c2.x = t2.x + e.clientLeft, c2.y = t2.y + e.clientTop;
3455
+ } else i2 && (c2.x = C$1(i2));
3456
+ return { x: r2.left + l2.scrollLeft - c2.x, y: r2.top + l2.scrollTop - c2.y, width: r2.width, height: r2.height };
3457
+ }
3458
+ const P = { getClippingRect: function(t) {
3459
+ let { element: e, boundary: n2, rootBoundary: l2, strategy: c2 } = t;
3460
+ const f2 = "clippingAncestors" === n2 ? function(t2, e2) {
3461
+ const n3 = e2.get(t2);
3462
+ if (n3) return n3;
3463
+ let i2 = D(t2).filter((t3) => d$1(t3) && "body" !== s(t3)), r2 = null;
3464
+ const l3 = "fixed" === o(t2).position;
3465
+ let c3 = l3 ? F(t2) : t2;
3466
+ for (; d$1(c3) && !w(c3); ) {
3467
+ const t3 = o(c3), e3 = y$1(c3);
3468
+ (l3 ? e3 || r2 : e3 || "static" !== t3.position || !r2 || !["absolute", "fixed"].includes(r2.position)) ? r2 = t3 : i2 = i2.filter((t4) => t4 !== c3), c3 = F(c3);
3469
+ }
3470
+ return e2.set(t2, i2), i2;
3471
+ }(e, this._c) : [].concat(n2), u2 = [...f2, l2], a2 = u2[0], h2 = u2.reduce((t2, n3) => {
3472
+ const o2 = S$1(e, n3, c2);
3473
+ return t2.top = r(o2.top, t2.top), t2.right = i(o2.right, t2.right), t2.bottom = i(o2.bottom, t2.bottom), t2.left = r(o2.left, t2.left), t2;
3474
+ }, S$1(e, a2, c2));
3475
+ return { width: h2.right - h2.left, height: h2.bottom - h2.top, x: h2.left, y: h2.top };
3476
+ }, convertOffsetParentRelativeRectToViewportRelativeRect: function(t) {
3477
+ let { rect: e, offsetParent: n2, strategy: o2 } = t;
3478
+ const i2 = a(n2), r2 = R(n2);
3479
+ if (n2 === r2) return e;
3480
+ let l2 = { scrollLeft: 0, scrollTop: 0 }, c2 = { x: 1, y: 1 };
3481
+ const f2 = { x: 0, y: 0 };
3482
+ if ((i2 || !i2 && "fixed" !== o2) && (("body" !== s(n2) || g$1(r2)) && (l2 = T(n2)), a(n2))) {
3483
+ const t2 = E$1(n2);
3484
+ c2 = L(n2), f2.x = t2.x + n2.clientLeft, f2.y = t2.y + n2.clientTop;
3485
+ }
3486
+ return { width: e.width * c2.x, height: e.height * c2.y, x: e.x * c2.x - l2.scrollLeft * c2.x + f2.x, y: e.y * c2.y - l2.scrollTop * c2.y + f2.y };
3487
+ }, isElement: d$1, getDimensions: function(t) {
3488
+ return a(t) ? c$1(t) : t.getBoundingClientRect();
3489
+ }, getOffsetParent: H, getDocumentElement: R, getScale: L, async getElementRects(t) {
3490
+ let { reference: e, floating: n2, strategy: o2 } = t;
3491
+ const i2 = this.getOffsetParent || H, r2 = this.getDimensions;
3492
+ return { reference: O(e, await i2(n2), o2), floating: { x: 0, y: 0, ...await r2(n2) } };
3493
+ }, getClientRects: (t) => Array.from(t.getClientRects()), isRTL: (t) => "rtl" === o(t).direction };
3494
+ const B$1 = (t, n2, o2) => {
3495
+ const i2 = /* @__PURE__ */ new Map(), r2 = { platform: P, ...o2 }, l2 = { ...r2.platform, _c: i2 };
3496
+ return computePosition(t, n2, { ...r2, platform: l2 });
3497
+ };
3498
+ const h = {
3499
+ // Disable popper components
3500
+ disabled: false,
3501
+ // Default position offset along main axis (px)
3502
+ distance: 5,
3503
+ // Default position offset along cross axis (px)
3504
+ skidding: 0,
3505
+ // Default container where the tooltip will be appended
3506
+ container: "body",
3507
+ // Element used to compute position and size boundaries
3508
+ boundary: void 0,
3509
+ // Skip delay & CSS transitions when another popper is shown, so that the popper appear to instanly move to the new position.
3510
+ instantMove: false,
3511
+ // Auto destroy tooltip DOM nodes (ms)
3512
+ disposeTimeout: 150,
3513
+ // Triggers on the popper itself
3514
+ popperTriggers: [],
3515
+ // Positioning strategy
3516
+ strategy: "absolute",
3517
+ // Prevent overflow
3518
+ preventOverflow: true,
3519
+ // Flip to the opposite placement if needed
3520
+ flip: true,
3521
+ // Shift on the cross axis to prevent the popper from overflowing
3522
+ shift: true,
3523
+ // Overflow padding (px)
3524
+ overflowPadding: 0,
3525
+ // Arrow padding (px)
3526
+ arrowPadding: 0,
3527
+ // Compute arrow overflow (useful to hide it)
3528
+ arrowOverflow: true,
3529
+ /**
3530
+ * By default, compute autohide on 'click'.
3531
+ */
3532
+ autoHideOnMousedown: false,
3533
+ // Themes
3534
+ themes: {
3535
+ tooltip: {
3536
+ // Default tooltip placement relative to target element
3537
+ placement: "top",
3538
+ // Default events that trigger the tooltip
3539
+ triggers: ["hover", "focus", "touch"],
3540
+ // Close tooltip on click on tooltip target
3541
+ hideTriggers: (e) => [...e, "click"],
3542
+ // Delay (ms)
3543
+ delay: {
3544
+ show: 200,
3545
+ hide: 0
3546
+ },
3547
+ // Update popper on content resize
3548
+ handleResize: false,
3549
+ // Enable HTML content in directive
3550
+ html: false,
3551
+ // Displayed when tooltip content is loading
3552
+ loadingContent: "..."
3553
+ },
3554
+ dropdown: {
3555
+ // Default dropdown placement relative to target element
3556
+ placement: "bottom",
3557
+ // Default events that trigger the dropdown
3558
+ triggers: ["click"],
3559
+ // Delay (ms)
3560
+ delay: 0,
3561
+ // Update popper on content resize
3562
+ handleResize: true,
3563
+ // Hide on clock outside
3564
+ autoHide: true
3565
+ },
3566
+ menu: {
3567
+ $extend: "dropdown",
3568
+ triggers: ["hover", "focus"],
3569
+ popperTriggers: ["hover"],
3570
+ delay: {
3571
+ show: 0,
3572
+ hide: 400
3573
+ }
3574
+ }
3575
+ }
3576
+ };
3577
+ function S(e, t) {
3578
+ let o2 = h.themes[e] || {}, i2;
3579
+ do
3580
+ i2 = o2[t], typeof i2 > "u" ? o2.$extend ? o2 = h.themes[o2.$extend] || {} : (o2 = null, i2 = h[t]) : o2 = null;
3581
+ while (o2);
3582
+ return i2;
3583
+ }
3584
+ function Ze(e) {
3585
+ const t = [e];
3586
+ let o2 = h.themes[e] || {};
3587
+ do
3588
+ o2.$extend && !o2.$resetCss ? (t.push(o2.$extend), o2 = h.themes[o2.$extend] || {}) : o2 = null;
3589
+ while (o2);
3590
+ return t.map((i2) => `v-popper--theme-${i2}`);
3591
+ }
3592
+ function re(e) {
3593
+ const t = [e];
3594
+ let o2 = h.themes[e] || {};
3595
+ do
3596
+ o2.$extend ? (t.push(o2.$extend), o2 = h.themes[o2.$extend] || {}) : o2 = null;
3597
+ while (o2);
3598
+ return t;
3599
+ }
3600
+ let $ = false;
3601
+ if (typeof window < "u") {
3602
+ $ = false;
3603
+ try {
3604
+ const e = Object.defineProperty({}, "passive", {
3605
+ get() {
3606
+ $ = true;
3607
+ }
3608
+ });
3609
+ window.addEventListener("test", null, e);
3610
+ } catch {
3611
+ }
3612
+ }
3613
+ let _e = false;
3614
+ typeof window < "u" && typeof navigator < "u" && (_e = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream);
3615
+ const Te = ["auto", "top", "bottom", "left", "right"].reduce((e, t) => e.concat([
3616
+ t,
3617
+ `${t}-start`,
3618
+ `${t}-end`
3619
+ ]), []), pe = {
3620
+ hover: "mouseenter",
3621
+ focus: "focus",
3622
+ click: "click",
3623
+ touch: "touchstart",
3624
+ pointer: "pointerdown"
3625
+ }, ae = {
3626
+ hover: "mouseleave",
3627
+ focus: "blur",
3628
+ click: "click",
3629
+ touch: "touchend",
3630
+ pointer: "pointerup"
3631
+ };
3632
+ function de(e, t) {
3633
+ const o2 = e.indexOf(t);
3634
+ o2 !== -1 && e.splice(o2, 1);
3635
+ }
3636
+ function G() {
3637
+ return new Promise((e) => requestAnimationFrame(() => {
3638
+ requestAnimationFrame(e);
3639
+ }));
3640
+ }
3641
+ const d = [];
3642
+ let g = null;
3643
+ const le = {};
3644
+ function he(e) {
3645
+ let t = le[e];
3646
+ return t || (t = le[e] = []), t;
3647
+ }
3648
+ let Y = function() {
3649
+ };
3650
+ typeof window < "u" && (Y = window.Element);
3651
+ function n(e) {
3652
+ return function(t) {
3653
+ return S(t.theme, e);
3654
+ };
3655
+ }
3656
+ const q = "__floating-vue__popper", Q = () => defineComponent({
3657
+ name: "VPopper",
3658
+ provide() {
3659
+ return {
3660
+ [q]: {
3661
+ parentPopper: this
3662
+ }
3663
+ };
3664
+ },
3665
+ inject: {
3666
+ [q]: { default: null }
3667
+ },
3668
+ props: {
3669
+ theme: {
3670
+ type: String,
3671
+ required: true
3672
+ },
3673
+ targetNodes: {
3674
+ type: Function,
3675
+ required: true
3676
+ },
3677
+ referenceNode: {
3678
+ type: Function,
3679
+ default: null
3680
+ },
3681
+ popperNode: {
3682
+ type: Function,
3683
+ required: true
3684
+ },
3685
+ shown: {
3686
+ type: Boolean,
3687
+ default: false
3688
+ },
3689
+ showGroup: {
3690
+ type: String,
3691
+ default: null
3692
+ },
3693
+ // eslint-disable-next-line vue/require-prop-types
3694
+ ariaId: {
3695
+ default: null
3696
+ },
3697
+ disabled: {
3698
+ type: Boolean,
3699
+ default: n("disabled")
3700
+ },
3701
+ positioningDisabled: {
3702
+ type: Boolean,
3703
+ default: n("positioningDisabled")
3704
+ },
3705
+ placement: {
3706
+ type: String,
3707
+ default: n("placement"),
3708
+ validator: (e) => Te.includes(e)
3709
+ },
3710
+ delay: {
3711
+ type: [String, Number, Object],
3712
+ default: n("delay")
3713
+ },
3714
+ distance: {
3715
+ type: [Number, String],
3716
+ default: n("distance")
3717
+ },
3718
+ skidding: {
3719
+ type: [Number, String],
3720
+ default: n("skidding")
3721
+ },
3722
+ triggers: {
3723
+ type: Array,
3724
+ default: n("triggers")
3725
+ },
3726
+ showTriggers: {
3727
+ type: [Array, Function],
3728
+ default: n("showTriggers")
3729
+ },
3730
+ hideTriggers: {
3731
+ type: [Array, Function],
3732
+ default: n("hideTriggers")
3733
+ },
3734
+ popperTriggers: {
3735
+ type: Array,
3736
+ default: n("popperTriggers")
3737
+ },
3738
+ popperShowTriggers: {
3739
+ type: [Array, Function],
3740
+ default: n("popperShowTriggers")
3741
+ },
3742
+ popperHideTriggers: {
3743
+ type: [Array, Function],
3744
+ default: n("popperHideTriggers")
3745
+ },
3746
+ container: {
3747
+ type: [String, Object, Y, Boolean],
3748
+ default: n("container")
3749
+ },
3750
+ boundary: {
3751
+ type: [String, Y],
3752
+ default: n("boundary")
3753
+ },
3754
+ strategy: {
3755
+ type: String,
3756
+ validator: (e) => ["absolute", "fixed"].includes(e),
3757
+ default: n("strategy")
3758
+ },
3759
+ autoHide: {
3760
+ type: [Boolean, Function],
3761
+ default: n("autoHide")
3762
+ },
3763
+ handleResize: {
3764
+ type: Boolean,
3765
+ default: n("handleResize")
3766
+ },
3767
+ instantMove: {
3768
+ type: Boolean,
3769
+ default: n("instantMove")
3770
+ },
3771
+ eagerMount: {
3772
+ type: Boolean,
3773
+ default: n("eagerMount")
3774
+ },
3775
+ popperClass: {
3776
+ type: [String, Array, Object],
3777
+ default: n("popperClass")
3778
+ },
3779
+ computeTransformOrigin: {
3780
+ type: Boolean,
3781
+ default: n("computeTransformOrigin")
3782
+ },
3783
+ /**
3784
+ * @deprecated
3785
+ */
3786
+ autoMinSize: {
3787
+ type: Boolean,
3788
+ default: n("autoMinSize")
3789
+ },
3790
+ autoSize: {
3791
+ type: [Boolean, String],
3792
+ default: n("autoSize")
3793
+ },
3794
+ /**
3795
+ * @deprecated
3796
+ */
3797
+ autoMaxSize: {
3798
+ type: Boolean,
3799
+ default: n("autoMaxSize")
3800
+ },
3801
+ autoBoundaryMaxSize: {
3802
+ type: Boolean,
3803
+ default: n("autoBoundaryMaxSize")
3804
+ },
3805
+ preventOverflow: {
3806
+ type: Boolean,
3807
+ default: n("preventOverflow")
3808
+ },
3809
+ overflowPadding: {
3810
+ type: [Number, String],
3811
+ default: n("overflowPadding")
3812
+ },
3813
+ arrowPadding: {
3814
+ type: [Number, String],
3815
+ default: n("arrowPadding")
3816
+ },
3817
+ arrowOverflow: {
3818
+ type: Boolean,
3819
+ default: n("arrowOverflow")
3820
+ },
3821
+ flip: {
3822
+ type: Boolean,
3823
+ default: n("flip")
3824
+ },
3825
+ shift: {
3826
+ type: Boolean,
3827
+ default: n("shift")
3828
+ },
3829
+ shiftCrossAxis: {
3830
+ type: Boolean,
3831
+ default: n("shiftCrossAxis")
3832
+ },
3833
+ noAutoFocus: {
3834
+ type: Boolean,
3835
+ default: n("noAutoFocus")
3836
+ },
3837
+ disposeTimeout: {
3838
+ type: Number,
3839
+ default: n("disposeTimeout")
3840
+ }
3841
+ },
3842
+ emits: {
3843
+ show: () => true,
3844
+ hide: () => true,
3845
+ "update:shown": (e) => true,
3846
+ "apply-show": () => true,
3847
+ "apply-hide": () => true,
3848
+ "close-group": () => true,
3849
+ "close-directive": () => true,
3850
+ "auto-hide": () => true,
3851
+ resize: () => true
3852
+ },
3853
+ data() {
3854
+ return {
3855
+ isShown: false,
3856
+ isMounted: false,
3857
+ skipTransition: false,
3858
+ classes: {
3859
+ showFrom: false,
3860
+ showTo: false,
3861
+ hideFrom: false,
3862
+ hideTo: true
3863
+ },
3864
+ result: {
3865
+ x: 0,
3866
+ y: 0,
3867
+ placement: "",
3868
+ strategy: this.strategy,
3869
+ arrow: {
3870
+ x: 0,
3871
+ y: 0,
3872
+ centerOffset: 0
3873
+ },
3874
+ transformOrigin: null
3875
+ },
3876
+ randomId: `popper_${[Math.random(), Date.now()].map((e) => e.toString(36).substring(2, 10)).join("_")}`,
3877
+ shownChildren: /* @__PURE__ */ new Set(),
3878
+ lastAutoHide: true,
3879
+ pendingHide: false,
3880
+ containsGlobalTarget: false,
3881
+ isDisposed: true,
3882
+ mouseDownContains: false
3883
+ };
3884
+ },
3885
+ computed: {
3886
+ popperId() {
3887
+ return this.ariaId != null ? this.ariaId : this.randomId;
3888
+ },
3889
+ shouldMountContent() {
3890
+ return this.eagerMount || this.isMounted;
3891
+ },
3892
+ slotData() {
3893
+ return {
3894
+ popperId: this.popperId,
3895
+ isShown: this.isShown,
3896
+ shouldMountContent: this.shouldMountContent,
3897
+ skipTransition: this.skipTransition,
3898
+ autoHide: typeof this.autoHide == "function" ? this.lastAutoHide : this.autoHide,
3899
+ show: this.show,
3900
+ hide: this.hide,
3901
+ handleResize: this.handleResize,
3902
+ onResize: this.onResize,
3903
+ classes: {
3904
+ ...this.classes,
3905
+ popperClass: this.popperClass
3906
+ },
3907
+ result: this.positioningDisabled ? null : this.result,
3908
+ attrs: this.$attrs
3909
+ };
3910
+ },
3911
+ parentPopper() {
3912
+ var e;
3913
+ return (e = this[q]) == null ? void 0 : e.parentPopper;
3914
+ },
3915
+ hasPopperShowTriggerHover() {
3916
+ var e, t;
3917
+ return ((e = this.popperTriggers) == null ? void 0 : e.includes("hover")) || ((t = this.popperShowTriggers) == null ? void 0 : t.includes("hover"));
3918
+ }
3919
+ },
3920
+ watch: {
3921
+ shown: "$_autoShowHide",
3922
+ disabled(e) {
3923
+ e ? this.dispose() : this.init();
3924
+ },
3925
+ async container() {
3926
+ this.isShown && (this.$_ensureTeleport(), await this.$_computePosition());
3927
+ },
3928
+ triggers: {
3929
+ handler: "$_refreshListeners",
3930
+ deep: true
3931
+ },
3932
+ positioningDisabled: "$_refreshListeners",
3933
+ ...[
3934
+ "placement",
3935
+ "distance",
3936
+ "skidding",
3937
+ "boundary",
3938
+ "strategy",
3939
+ "overflowPadding",
3940
+ "arrowPadding",
3941
+ "preventOverflow",
3942
+ "shift",
3943
+ "shiftCrossAxis",
3944
+ "flip"
3945
+ ].reduce((e, t) => (e[t] = "$_computePosition", e), {})
3946
+ },
3947
+ created() {
3948
+ this.autoMinSize && console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.'), this.autoMaxSize && console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead.");
3949
+ },
3950
+ mounted() {
3951
+ this.init(), this.$_detachPopperNode();
3952
+ },
3953
+ activated() {
3954
+ this.$_autoShowHide();
3955
+ },
3956
+ deactivated() {
3957
+ this.hide();
3958
+ },
3959
+ beforeUnmount() {
3960
+ this.dispose();
3961
+ },
3962
+ methods: {
3963
+ show({ event: e = null, skipDelay: t = false, force: o2 = false } = {}) {
3964
+ var i2, s2;
3965
+ (i2 = this.parentPopper) != null && i2.lockedChild && this.parentPopper.lockedChild !== this || (this.pendingHide = false, (o2 || !this.disabled) && (((s2 = this.parentPopper) == null ? void 0 : s2.lockedChild) === this && (this.parentPopper.lockedChild = null), this.$_scheduleShow(e, t), this.$emit("show"), this.$_showFrameLocked = true, requestAnimationFrame(() => {
3966
+ this.$_showFrameLocked = false;
3967
+ })), this.$emit("update:shown", true));
3968
+ },
3969
+ hide({ event: e = null, skipDelay: t = false } = {}) {
3970
+ var o2;
3971
+ if (!this.$_hideInProgress) {
3972
+ if (this.shownChildren.size > 0) {
3973
+ this.pendingHide = true;
3974
+ return;
3975
+ }
3976
+ if (this.hasPopperShowTriggerHover && this.$_isAimingPopper()) {
3977
+ this.parentPopper && (this.parentPopper.lockedChild = this, clearTimeout(this.parentPopper.lockedChildTimer), this.parentPopper.lockedChildTimer = setTimeout(() => {
3978
+ this.parentPopper.lockedChild === this && (this.parentPopper.lockedChild.hide({ skipDelay: t }), this.parentPopper.lockedChild = null);
3979
+ }, 1e3));
3980
+ return;
3981
+ }
3982
+ ((o2 = this.parentPopper) == null ? void 0 : o2.lockedChild) === this && (this.parentPopper.lockedChild = null), this.pendingHide = false, this.$_scheduleHide(e, t), this.$emit("hide"), this.$emit("update:shown", false);
3983
+ }
3984
+ },
3985
+ init() {
3986
+ var e;
3987
+ this.isDisposed && (this.isDisposed = false, this.isMounted = false, this.$_events = [], this.$_preventShow = false, this.$_referenceNode = ((e = this.referenceNode) == null ? void 0 : e.call(this)) ?? this.$el, this.$_targetNodes = this.targetNodes().filter((t) => t.nodeType === t.ELEMENT_NODE), this.$_popperNode = this.popperNode(), this.$_innerNode = this.$_popperNode.querySelector(".v-popper__inner"), this.$_arrowNode = this.$_popperNode.querySelector(".v-popper__arrow-container"), this.$_swapTargetAttrs("title", "data-original-title"), this.$_detachPopperNode(), this.triggers.length && this.$_addEventListeners(), this.shown && this.show());
3988
+ },
3989
+ dispose() {
3990
+ this.isDisposed || (this.isDisposed = true, this.$_removeEventListeners(), this.hide({ skipDelay: true }), this.$_detachPopperNode(), this.isMounted = false, this.isShown = false, this.$_updateParentShownChildren(false), this.$_swapTargetAttrs("data-original-title", "title"));
3991
+ },
3992
+ async onResize() {
3993
+ this.isShown && (await this.$_computePosition(), this.$emit("resize"));
3994
+ },
3995
+ async $_computePosition() {
3996
+ if (this.isDisposed || this.positioningDisabled)
3997
+ return;
3998
+ const e = {
3999
+ strategy: this.strategy,
4000
+ middleware: []
4001
+ };
4002
+ (this.distance || this.skidding) && e.middleware.push(offset({
4003
+ mainAxis: this.distance,
4004
+ crossAxis: this.skidding
4005
+ }));
4006
+ const t = this.placement.startsWith("auto");
4007
+ if (t ? e.middleware.push(autoPlacement({
4008
+ alignment: this.placement.split("-")[1] ?? ""
4009
+ })) : e.placement = this.placement, this.preventOverflow && (this.shift && e.middleware.push(shift({
4010
+ padding: this.overflowPadding,
4011
+ boundary: this.boundary,
4012
+ crossAxis: this.shiftCrossAxis
4013
+ })), !t && this.flip && e.middleware.push(flip({
4014
+ padding: this.overflowPadding,
4015
+ boundary: this.boundary
4016
+ }))), e.middleware.push(arrow({
4017
+ element: this.$_arrowNode,
4018
+ padding: this.arrowPadding
4019
+ })), this.arrowOverflow && e.middleware.push({
4020
+ name: "arrowOverflow",
4021
+ fn: ({ placement: i2, rects: s2, middlewareData: r2 }) => {
4022
+ let p2;
4023
+ const { centerOffset: a2 } = r2.arrow;
4024
+ return i2.startsWith("top") || i2.startsWith("bottom") ? p2 = Math.abs(a2) > s2.reference.width / 2 : p2 = Math.abs(a2) > s2.reference.height / 2, {
4025
+ data: {
4026
+ overflow: p2
4027
+ }
4028
+ };
4029
+ }
4030
+ }), this.autoMinSize || this.autoSize) {
4031
+ const i2 = this.autoSize ? this.autoSize : this.autoMinSize ? "min" : null;
4032
+ e.middleware.push({
4033
+ name: "autoSize",
4034
+ fn: ({ rects: s2, placement: r2, middlewareData: p2 }) => {
4035
+ var u2;
4036
+ if ((u2 = p2.autoSize) != null && u2.skip)
4037
+ return {};
4038
+ let a2, l2;
4039
+ return r2.startsWith("top") || r2.startsWith("bottom") ? a2 = s2.reference.width : l2 = s2.reference.height, this.$_innerNode.style[i2 === "min" ? "minWidth" : i2 === "max" ? "maxWidth" : "width"] = a2 != null ? `${a2}px` : null, this.$_innerNode.style[i2 === "min" ? "minHeight" : i2 === "max" ? "maxHeight" : "height"] = l2 != null ? `${l2}px` : null, {
4040
+ data: {
4041
+ skip: true
4042
+ },
4043
+ reset: {
4044
+ rects: true
4045
+ }
4046
+ };
4047
+ }
4048
+ });
4049
+ }
4050
+ (this.autoMaxSize || this.autoBoundaryMaxSize) && (this.$_innerNode.style.maxWidth = null, this.$_innerNode.style.maxHeight = null, e.middleware.push(size({
4051
+ boundary: this.boundary,
4052
+ padding: this.overflowPadding,
4053
+ apply: ({ availableWidth: i2, availableHeight: s2 }) => {
4054
+ this.$_innerNode.style.maxWidth = i2 != null ? `${i2}px` : null, this.$_innerNode.style.maxHeight = s2 != null ? `${s2}px` : null;
4055
+ }
4056
+ })));
4057
+ const o2 = await B$1(this.$_referenceNode, this.$_popperNode, e);
4058
+ Object.assign(this.result, {
4059
+ x: o2.x,
4060
+ y: o2.y,
4061
+ placement: o2.placement,
4062
+ strategy: o2.strategy,
4063
+ arrow: {
4064
+ ...o2.middlewareData.arrow,
4065
+ ...o2.middlewareData.arrowOverflow
4066
+ }
4067
+ });
4068
+ },
4069
+ $_scheduleShow(e, t = false) {
4070
+ if (this.$_updateParentShownChildren(true), this.$_hideInProgress = false, clearTimeout(this.$_scheduleTimer), g && this.instantMove && g.instantMove && g !== this.parentPopper) {
4071
+ g.$_applyHide(true), this.$_applyShow(true);
4072
+ return;
4073
+ }
4074
+ t ? this.$_applyShow() : this.$_scheduleTimer = setTimeout(this.$_applyShow.bind(this), this.$_computeDelay("show"));
4075
+ },
4076
+ $_scheduleHide(e, t = false) {
4077
+ if (this.shownChildren.size > 0) {
4078
+ this.pendingHide = true;
4079
+ return;
4080
+ }
4081
+ this.$_updateParentShownChildren(false), this.$_hideInProgress = true, clearTimeout(this.$_scheduleTimer), this.isShown && (g = this), t ? this.$_applyHide() : this.$_scheduleTimer = setTimeout(this.$_applyHide.bind(this), this.$_computeDelay("hide"));
4082
+ },
4083
+ $_computeDelay(e) {
4084
+ const t = this.delay;
4085
+ return parseInt(t && t[e] || t || 0);
4086
+ },
4087
+ async $_applyShow(e = false) {
4088
+ clearTimeout(this.$_disposeTimer), clearTimeout(this.$_scheduleTimer), this.skipTransition = e, !this.isShown && (this.$_ensureTeleport(), await G(), await this.$_computePosition(), await this.$_applyShowEffect(), this.positioningDisabled || this.$_registerEventListeners([
4089
+ ...D(this.$_referenceNode),
4090
+ ...D(this.$_popperNode)
4091
+ ], "scroll", () => {
4092
+ this.$_computePosition();
4093
+ }));
4094
+ },
4095
+ async $_applyShowEffect() {
4096
+ if (this.$_hideInProgress)
4097
+ return;
4098
+ if (this.computeTransformOrigin) {
4099
+ const t = this.$_referenceNode.getBoundingClientRect(), o2 = this.$_popperNode.querySelector(".v-popper__wrapper"), i2 = o2.parentNode.getBoundingClientRect(), s2 = t.x + t.width / 2 - (i2.left + o2.offsetLeft), r2 = t.y + t.height / 2 - (i2.top + o2.offsetTop);
4100
+ this.result.transformOrigin = `${s2}px ${r2}px`;
4101
+ }
4102
+ this.isShown = true, this.$_applyAttrsToTarget({
4103
+ "aria-describedby": this.popperId,
4104
+ "data-popper-shown": ""
4105
+ });
4106
+ const e = this.showGroup;
4107
+ if (e) {
4108
+ let t;
4109
+ for (let o2 = 0; o2 < d.length; o2++)
4110
+ t = d[o2], t.showGroup !== e && (t.hide(), t.$emit("close-group"));
4111
+ }
4112
+ d.push(this), document.body.classList.add("v-popper--some-open");
4113
+ for (const t of re(this.theme))
4114
+ he(t).push(this), document.body.classList.add(`v-popper--some-open--${t}`);
4115
+ this.$emit("apply-show"), this.classes.showFrom = true, this.classes.showTo = false, this.classes.hideFrom = false, this.classes.hideTo = false, await G(), this.classes.showFrom = false, this.classes.showTo = true, this.noAutoFocus || this.$_popperNode.focus();
4116
+ },
4117
+ async $_applyHide(e = false) {
4118
+ if (this.shownChildren.size > 0) {
4119
+ this.pendingHide = true, this.$_hideInProgress = false;
4120
+ return;
4121
+ }
4122
+ if (clearTimeout(this.$_scheduleTimer), !this.isShown)
4123
+ return;
4124
+ this.skipTransition = e, de(d, this), d.length === 0 && document.body.classList.remove("v-popper--some-open");
4125
+ for (const o2 of re(this.theme)) {
4126
+ const i2 = he(o2);
4127
+ de(i2, this), i2.length === 0 && document.body.classList.remove(`v-popper--some-open--${o2}`);
4128
+ }
4129
+ g === this && (g = null), this.isShown = false, this.$_applyAttrsToTarget({
4130
+ "aria-describedby": void 0,
4131
+ "data-popper-shown": void 0
4132
+ }), clearTimeout(this.$_disposeTimer);
4133
+ const t = this.disposeTimeout;
4134
+ t !== null && (this.$_disposeTimer = setTimeout(() => {
4135
+ this.$_popperNode && (this.$_detachPopperNode(), this.isMounted = false);
4136
+ }, t)), this.$_removeEventListeners("scroll"), this.$emit("apply-hide"), this.classes.showFrom = false, this.classes.showTo = false, this.classes.hideFrom = true, this.classes.hideTo = false, await G(), this.classes.hideFrom = false, this.classes.hideTo = true;
4137
+ },
4138
+ $_autoShowHide() {
4139
+ this.shown ? this.show() : this.hide();
4140
+ },
4141
+ $_ensureTeleport() {
4142
+ if (this.isDisposed)
4143
+ return;
4144
+ let e = this.container;
4145
+ if (typeof e == "string" ? e = window.document.querySelector(e) : e === false && (e = this.$_targetNodes[0].parentNode), !e)
4146
+ throw new Error("No container for popover: " + this.container);
4147
+ e.appendChild(this.$_popperNode), this.isMounted = true;
4148
+ },
4149
+ $_addEventListeners() {
4150
+ const e = (o2) => {
4151
+ this.isShown && !this.$_hideInProgress || (o2.usedByTooltip = true, !this.$_preventShow && this.show({ event: o2 }));
4152
+ };
4153
+ this.$_registerTriggerListeners(this.$_targetNodes, pe, this.triggers, this.showTriggers, e), this.$_registerTriggerListeners([this.$_popperNode], pe, this.popperTriggers, this.popperShowTriggers, e);
4154
+ const t = (o2) => {
4155
+ o2.usedByTooltip || this.hide({ event: o2 });
4156
+ };
4157
+ this.$_registerTriggerListeners(this.$_targetNodes, ae, this.triggers, this.hideTriggers, t), this.$_registerTriggerListeners([this.$_popperNode], ae, this.popperTriggers, this.popperHideTriggers, t);
4158
+ },
4159
+ $_registerEventListeners(e, t, o2) {
4160
+ this.$_events.push({ targetNodes: e, eventType: t, handler: o2 }), e.forEach((i2) => i2.addEventListener(t, o2, $ ? {
4161
+ passive: true
4162
+ } : void 0));
4163
+ },
4164
+ $_registerTriggerListeners(e, t, o2, i2, s2) {
4165
+ let r2 = o2;
4166
+ i2 != null && (r2 = typeof i2 == "function" ? i2(r2) : i2), r2.forEach((p2) => {
4167
+ const a2 = t[p2];
4168
+ a2 && this.$_registerEventListeners(e, a2, s2);
4169
+ });
4170
+ },
4171
+ $_removeEventListeners(e) {
4172
+ const t = [];
4173
+ this.$_events.forEach((o2) => {
4174
+ const { targetNodes: i2, eventType: s2, handler: r2 } = o2;
4175
+ !e || e === s2 ? i2.forEach((p2) => p2.removeEventListener(s2, r2)) : t.push(o2);
4176
+ }), this.$_events = t;
4177
+ },
4178
+ $_refreshListeners() {
4179
+ this.isDisposed || (this.$_removeEventListeners(), this.$_addEventListeners());
4180
+ },
4181
+ $_handleGlobalClose(e, t = false) {
4182
+ this.$_showFrameLocked || (this.hide({ event: e }), e.closePopover ? this.$emit("close-directive") : this.$emit("auto-hide"), t && (this.$_preventShow = true, setTimeout(() => {
4183
+ this.$_preventShow = false;
4184
+ }, 300)));
4185
+ },
4186
+ $_detachPopperNode() {
4187
+ this.$_popperNode.parentNode && this.$_popperNode.parentNode.removeChild(this.$_popperNode);
4188
+ },
4189
+ $_swapTargetAttrs(e, t) {
4190
+ for (const o2 of this.$_targetNodes) {
4191
+ const i2 = o2.getAttribute(e);
4192
+ i2 && (o2.removeAttribute(e), o2.setAttribute(t, i2));
4193
+ }
4194
+ },
4195
+ $_applyAttrsToTarget(e) {
4196
+ for (const t of this.$_targetNodes)
4197
+ for (const o2 in e) {
4198
+ const i2 = e[o2];
4199
+ i2 == null ? t.removeAttribute(o2) : t.setAttribute(o2, i2);
4200
+ }
4201
+ },
4202
+ $_updateParentShownChildren(e) {
4203
+ let t = this.parentPopper;
4204
+ for (; t; )
4205
+ e ? t.shownChildren.add(this.randomId) : (t.shownChildren.delete(this.randomId), t.pendingHide && t.hide()), t = t.parentPopper;
4206
+ },
4207
+ $_isAimingPopper() {
4208
+ const e = this.$_referenceNode.getBoundingClientRect();
4209
+ if (y >= e.left && y <= e.right && _ >= e.top && _ <= e.bottom) {
4210
+ const t = this.$_popperNode.getBoundingClientRect(), o2 = y - c, i2 = _ - m, r2 = t.left + t.width / 2 - c + (t.top + t.height / 2) - m + t.width + t.height, p2 = c + o2 * r2, a2 = m + i2 * r2;
4211
+ return C(c, m, p2, a2, t.left, t.top, t.left, t.bottom) || // Left edge
4212
+ C(c, m, p2, a2, t.left, t.top, t.right, t.top) || // Top edge
4213
+ C(c, m, p2, a2, t.right, t.top, t.right, t.bottom) || // Right edge
4214
+ C(c, m, p2, a2, t.left, t.bottom, t.right, t.bottom);
4215
+ }
4216
+ return false;
4217
+ }
4218
+ },
4219
+ render() {
4220
+ return this.$slots.default(this.slotData);
4221
+ }
4222
+ });
4223
+ if (typeof document < "u" && typeof window < "u") {
4224
+ if (_e) {
4225
+ const e = $ ? {
4226
+ passive: true,
4227
+ capture: true
4228
+ } : true;
4229
+ document.addEventListener("touchstart", (t) => ue(t), e), document.addEventListener("touchend", (t) => fe(t, true), e);
4230
+ } else
4231
+ window.addEventListener("mousedown", (e) => ue(e), true), window.addEventListener("click", (e) => fe(e, false), true);
4232
+ window.addEventListener("resize", tt);
4233
+ }
4234
+ function ue(e, t) {
4235
+ for (let o2 = 0; o2 < d.length; o2++) {
4236
+ const i2 = d[o2];
4237
+ try {
4238
+ i2.mouseDownContains = i2.popperNode().contains(e.target);
4239
+ } catch {
4240
+ }
4241
+ }
4242
+ }
4243
+ function fe(e, t) {
4244
+ Pe(e, t);
4245
+ }
4246
+ function Pe(e, t) {
4247
+ const o2 = {};
4248
+ for (let i2 = d.length - 1; i2 >= 0; i2--) {
4249
+ const s2 = d[i2];
4250
+ try {
4251
+ const r2 = s2.containsGlobalTarget = s2.mouseDownContains || s2.popperNode().contains(e.target);
4252
+ s2.pendingHide = false, requestAnimationFrame(() => {
4253
+ if (s2.pendingHide = false, !o2[s2.randomId] && ce(s2, r2, e)) {
4254
+ if (s2.$_handleGlobalClose(e, t), !e.closeAllPopover && e.closePopover && r2) {
4255
+ let a2 = s2.parentPopper;
4256
+ for (; a2; )
4257
+ o2[a2.randomId] = true, a2 = a2.parentPopper;
4258
+ return;
4259
+ }
4260
+ let p2 = s2.parentPopper;
4261
+ for (; p2 && ce(p2, p2.containsGlobalTarget, e); ) {
4262
+ p2.$_handleGlobalClose(e, t);
4263
+ p2 = p2.parentPopper;
4264
+ }
4265
+ }
4266
+ });
4267
+ } catch {
4268
+ }
4269
+ }
4270
+ }
4271
+ function ce(e, t, o2) {
4272
+ return o2.closeAllPopover || o2.closePopover && t || et(e, o2) && !t;
4273
+ }
4274
+ function et(e, t) {
4275
+ if (typeof e.autoHide == "function") {
4276
+ const o2 = e.autoHide(t);
4277
+ return e.lastAutoHide = o2, o2;
4278
+ }
4279
+ return e.autoHide;
4280
+ }
4281
+ function tt() {
4282
+ for (let e = 0; e < d.length; e++)
4283
+ d[e].$_computePosition();
4284
+ }
4285
+ let c = 0, m = 0, y = 0, _ = 0;
4286
+ typeof window < "u" && window.addEventListener("mousemove", (e) => {
4287
+ c = y, m = _, y = e.clientX, _ = e.clientY;
4288
+ }, $ ? {
4289
+ passive: true
4290
+ } : void 0);
4291
+ function C(e, t, o2, i2, s2, r2, p2, a2) {
4292
+ const l2 = ((p2 - s2) * (t - r2) - (a2 - r2) * (e - s2)) / ((a2 - r2) * (o2 - e) - (p2 - s2) * (i2 - t)), u2 = ((o2 - e) * (t - r2) - (i2 - t) * (e - s2)) / ((a2 - r2) * (o2 - e) - (p2 - s2) * (i2 - t));
4293
+ return l2 >= 0 && l2 <= 1 && u2 >= 0 && u2 <= 1;
4294
+ }
4295
+ const ot = {
4296
+ extends: Q()
4297
+ }, B = (e, t) => {
4298
+ const o2 = e.__vccOpts || e;
4299
+ for (const [i2, s2] of t)
4300
+ o2[i2] = s2;
4301
+ return o2;
4302
+ };
4303
+ function it(e, t, o2, i2, s2, r2) {
4304
+ return openBlock(), createElementBlock("div", {
4305
+ ref: "reference",
4306
+ class: normalizeClass(["v-popper", {
4307
+ "v-popper--shown": e.slotData.isShown
4308
+ }])
4309
+ }, [
4310
+ renderSlot(e.$slots, "default", normalizeProps(guardReactiveProps(e.slotData)))
4311
+ ], 2);
4312
+ }
4313
+ const st = /* @__PURE__ */ B(ot, [["render", it]]);
4314
+ function nt() {
4315
+ var e = window.navigator.userAgent, t = e.indexOf("MSIE ");
4316
+ if (t > 0)
4317
+ return parseInt(e.substring(t + 5, e.indexOf(".", t)), 10);
4318
+ var o2 = e.indexOf("Trident/");
4319
+ if (o2 > 0) {
4320
+ var i2 = e.indexOf("rv:");
4321
+ return parseInt(e.substring(i2 + 3, e.indexOf(".", i2)), 10);
4322
+ }
4323
+ var s2 = e.indexOf("Edge/");
4324
+ return s2 > 0 ? parseInt(e.substring(s2 + 5, e.indexOf(".", s2)), 10) : -1;
4325
+ }
4326
+ let z;
4327
+ function X() {
4328
+ X.init || (X.init = true, z = nt() !== -1);
4329
+ }
4330
+ var E = {
4331
+ name: "ResizeObserver",
4332
+ props: {
4333
+ emitOnMount: {
4334
+ type: Boolean,
4335
+ default: false
4336
+ },
4337
+ ignoreWidth: {
4338
+ type: Boolean,
4339
+ default: false
4340
+ },
4341
+ ignoreHeight: {
4342
+ type: Boolean,
4343
+ default: false
4344
+ }
4345
+ },
4346
+ emits: [
4347
+ "notify"
4348
+ ],
4349
+ mounted() {
4350
+ X(), nextTick(() => {
4351
+ this._w = this.$el.offsetWidth, this._h = this.$el.offsetHeight, this.emitOnMount && this.emitSize();
4352
+ });
4353
+ const e = document.createElement("object");
4354
+ this._resizeObject = e, e.setAttribute("aria-hidden", "true"), e.setAttribute("tabindex", -1), e.onload = this.addResizeHandlers, e.type = "text/html", z && this.$el.appendChild(e), e.data = "about:blank", z || this.$el.appendChild(e);
4355
+ },
4356
+ beforeUnmount() {
4357
+ this.removeResizeHandlers();
4358
+ },
4359
+ methods: {
4360
+ compareAndNotify() {
4361
+ (!this.ignoreWidth && this._w !== this.$el.offsetWidth || !this.ignoreHeight && this._h !== this.$el.offsetHeight) && (this._w = this.$el.offsetWidth, this._h = this.$el.offsetHeight, this.emitSize());
4362
+ },
4363
+ emitSize() {
4364
+ this.$emit("notify", {
4365
+ width: this._w,
4366
+ height: this._h
4367
+ });
4368
+ },
4369
+ addResizeHandlers() {
4370
+ this._resizeObject.contentDocument.defaultView.addEventListener("resize", this.compareAndNotify), this.compareAndNotify();
4371
+ },
4372
+ removeResizeHandlers() {
4373
+ this._resizeObject && this._resizeObject.onload && (!z && this._resizeObject.contentDocument && this._resizeObject.contentDocument.defaultView.removeEventListener("resize", this.compareAndNotify), this.$el.removeChild(this._resizeObject), this._resizeObject.onload = null, this._resizeObject = null);
4374
+ }
4375
+ }
4376
+ };
4377
+ const rt = /* @__PURE__ */ withScopeId("data-v-b329ee4c");
4378
+ pushScopeId("data-v-b329ee4c");
4379
+ const pt = {
4380
+ class: "resize-observer",
4381
+ tabindex: "-1"
4382
+ };
4383
+ popScopeId();
4384
+ const at = /* @__PURE__ */ rt((e, t, o2, i2, s2, r2) => (openBlock(), createBlock("div", pt)));
4385
+ E.render = at;
4386
+ E.__scopeId = "data-v-b329ee4c";
4387
+ E.__file = "src/components/ResizeObserver.vue";
4388
+ const Z = (e = "theme") => ({
4389
+ computed: {
4390
+ themeClass() {
4391
+ return Ze(this[e]);
4392
+ }
4393
+ }
4394
+ }), dt = defineComponent({
4395
+ name: "VPopperContent",
4396
+ components: {
4397
+ ResizeObserver: E
4398
+ },
4399
+ mixins: [
4400
+ Z()
4401
+ ],
4402
+ props: {
4403
+ popperId: String,
4404
+ theme: String,
4405
+ shown: Boolean,
4406
+ mounted: Boolean,
4407
+ skipTransition: Boolean,
4408
+ autoHide: Boolean,
4409
+ handleResize: Boolean,
4410
+ classes: Object,
4411
+ result: Object
4412
+ },
4413
+ emits: [
4414
+ "hide",
4415
+ "resize"
4416
+ ],
4417
+ methods: {
4418
+ toPx(e) {
4419
+ return e != null && !isNaN(e) ? `${e}px` : null;
4420
+ }
4421
+ }
4422
+ }), lt = ["id", "aria-hidden", "tabindex", "data-popper-placement"], ht = {
4423
+ ref: "inner",
4424
+ class: "v-popper__inner"
4425
+ }, ut = /* @__PURE__ */ createElementVNode("div", { class: "v-popper__arrow-outer" }, null, -1), ft = /* @__PURE__ */ createElementVNode("div", { class: "v-popper__arrow-inner" }, null, -1), ct = [
4426
+ ut,
4427
+ ft
4428
+ ];
4429
+ function mt(e, t, o2, i2, s2, r2) {
4430
+ const p2 = resolveComponent("ResizeObserver");
4431
+ return openBlock(), createElementBlock("div", {
4432
+ id: e.popperId,
4433
+ ref: "popover",
4434
+ class: normalizeClass(["v-popper__popper", [
4435
+ e.themeClass,
4436
+ e.classes.popperClass,
4437
+ {
4438
+ "v-popper__popper--shown": e.shown,
4439
+ "v-popper__popper--hidden": !e.shown,
4440
+ "v-popper__popper--show-from": e.classes.showFrom,
4441
+ "v-popper__popper--show-to": e.classes.showTo,
4442
+ "v-popper__popper--hide-from": e.classes.hideFrom,
4443
+ "v-popper__popper--hide-to": e.classes.hideTo,
4444
+ "v-popper__popper--skip-transition": e.skipTransition,
4445
+ "v-popper__popper--arrow-overflow": e.result && e.result.arrow.overflow,
4446
+ "v-popper__popper--no-positioning": !e.result
4447
+ }
4448
+ ]]),
4449
+ style: normalizeStyle(e.result ? {
4450
+ position: e.result.strategy,
4451
+ transform: `translate3d(${Math.round(e.result.x)}px,${Math.round(e.result.y)}px,0)`
4452
+ } : void 0),
4453
+ "aria-hidden": e.shown ? "false" : "true",
4454
+ tabindex: e.autoHide ? 0 : void 0,
4455
+ "data-popper-placement": e.result ? e.result.placement : void 0,
4456
+ onKeyup: t[2] || (t[2] = withKeys((a2) => e.autoHide && e.$emit("hide"), ["esc"]))
4457
+ }, [
4458
+ createElementVNode("div", {
4459
+ class: "v-popper__backdrop",
4460
+ onClick: t[0] || (t[0] = (a2) => e.autoHide && e.$emit("hide"))
4461
+ }),
4462
+ createElementVNode("div", {
4463
+ class: "v-popper__wrapper",
4464
+ style: normalizeStyle(e.result ? {
4465
+ transformOrigin: e.result.transformOrigin
4466
+ } : void 0)
4467
+ }, [
4468
+ createElementVNode("div", ht, [
4469
+ e.mounted ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
4470
+ createElementVNode("div", null, [
4471
+ renderSlot(e.$slots, "default")
4472
+ ]),
4473
+ e.handleResize ? (openBlock(), createBlock(p2, {
4474
+ key: 0,
4475
+ onNotify: t[1] || (t[1] = (a2) => e.$emit("resize", a2))
4476
+ })) : createCommentVNode("", true)
4477
+ ], 64)) : createCommentVNode("", true)
4478
+ ], 512),
4479
+ createElementVNode("div", {
4480
+ ref: "arrow",
4481
+ class: "v-popper__arrow-container",
4482
+ style: normalizeStyle(e.result ? {
4483
+ left: e.toPx(e.result.arrow.x),
4484
+ top: e.toPx(e.result.arrow.y)
4485
+ } : void 0)
4486
+ }, ct, 4)
4487
+ ], 4)
4488
+ ], 46, lt);
4489
+ }
4490
+ const ee = /* @__PURE__ */ B(dt, [["render", mt]]), te = {
4491
+ methods: {
4492
+ show(...e) {
4493
+ return this.$refs.popper.show(...e);
4494
+ },
4495
+ hide(...e) {
4496
+ return this.$refs.popper.hide(...e);
4497
+ },
4498
+ dispose(...e) {
4499
+ return this.$refs.popper.dispose(...e);
4500
+ },
4501
+ onResize(...e) {
4502
+ return this.$refs.popper.onResize(...e);
4503
+ }
4504
+ }
4505
+ };
4506
+ let K = function() {
4507
+ };
4508
+ typeof window < "u" && (K = window.Element);
4509
+ const gt = defineComponent({
4510
+ name: "VPopperWrapper",
4511
+ components: {
4512
+ Popper: st,
4513
+ PopperContent: ee
4514
+ },
4515
+ mixins: [
4516
+ te,
4517
+ Z("finalTheme")
4518
+ ],
4519
+ props: {
4520
+ theme: {
4521
+ type: String,
4522
+ default: null
4523
+ },
4524
+ referenceNode: {
4525
+ type: Function,
4526
+ default: null
4527
+ },
4528
+ shown: {
4529
+ type: Boolean,
4530
+ default: false
4531
+ },
4532
+ showGroup: {
4533
+ type: String,
4534
+ default: null
4535
+ },
4536
+ // eslint-disable-next-line vue/require-prop-types
4537
+ ariaId: {
4538
+ default: null
4539
+ },
4540
+ disabled: {
4541
+ type: Boolean,
4542
+ default: void 0
4543
+ },
4544
+ positioningDisabled: {
4545
+ type: Boolean,
4546
+ default: void 0
4547
+ },
4548
+ placement: {
4549
+ type: String,
4550
+ default: void 0
4551
+ },
4552
+ delay: {
4553
+ type: [String, Number, Object],
4554
+ default: void 0
4555
+ },
4556
+ distance: {
4557
+ type: [Number, String],
4558
+ default: void 0
4559
+ },
4560
+ skidding: {
4561
+ type: [Number, String],
4562
+ default: void 0
4563
+ },
4564
+ triggers: {
4565
+ type: Array,
4566
+ default: void 0
4567
+ },
4568
+ showTriggers: {
4569
+ type: [Array, Function],
4570
+ default: void 0
4571
+ },
4572
+ hideTriggers: {
4573
+ type: [Array, Function],
4574
+ default: void 0
4575
+ },
4576
+ popperTriggers: {
4577
+ type: Array,
4578
+ default: void 0
4579
+ },
4580
+ popperShowTriggers: {
4581
+ type: [Array, Function],
4582
+ default: void 0
4583
+ },
4584
+ popperHideTriggers: {
4585
+ type: [Array, Function],
4586
+ default: void 0
4587
+ },
4588
+ container: {
4589
+ type: [String, Object, K, Boolean],
4590
+ default: void 0
4591
+ },
4592
+ boundary: {
4593
+ type: [String, K],
4594
+ default: void 0
4595
+ },
4596
+ strategy: {
4597
+ type: String,
4598
+ default: void 0
4599
+ },
4600
+ autoHide: {
4601
+ type: [Boolean, Function],
4602
+ default: void 0
4603
+ },
4604
+ handleResize: {
4605
+ type: Boolean,
4606
+ default: void 0
4607
+ },
4608
+ instantMove: {
4609
+ type: Boolean,
4610
+ default: void 0
4611
+ },
4612
+ eagerMount: {
4613
+ type: Boolean,
4614
+ default: void 0
4615
+ },
4616
+ popperClass: {
4617
+ type: [String, Array, Object],
4618
+ default: void 0
4619
+ },
4620
+ computeTransformOrigin: {
4621
+ type: Boolean,
4622
+ default: void 0
4623
+ },
4624
+ /**
4625
+ * @deprecated
4626
+ */
4627
+ autoMinSize: {
4628
+ type: Boolean,
4629
+ default: void 0
4630
+ },
4631
+ autoSize: {
4632
+ type: [Boolean, String],
4633
+ default: void 0
4634
+ },
4635
+ /**
4636
+ * @deprecated
4637
+ */
4638
+ autoMaxSize: {
4639
+ type: Boolean,
4640
+ default: void 0
4641
+ },
4642
+ autoBoundaryMaxSize: {
4643
+ type: Boolean,
4644
+ default: void 0
4645
+ },
4646
+ preventOverflow: {
4647
+ type: Boolean,
4648
+ default: void 0
4649
+ },
4650
+ overflowPadding: {
4651
+ type: [Number, String],
4652
+ default: void 0
4653
+ },
4654
+ arrowPadding: {
4655
+ type: [Number, String],
4656
+ default: void 0
4657
+ },
4658
+ arrowOverflow: {
4659
+ type: Boolean,
4660
+ default: void 0
4661
+ },
4662
+ flip: {
4663
+ type: Boolean,
4664
+ default: void 0
4665
+ },
4666
+ shift: {
4667
+ type: Boolean,
4668
+ default: void 0
4669
+ },
4670
+ shiftCrossAxis: {
4671
+ type: Boolean,
4672
+ default: void 0
4673
+ },
4674
+ noAutoFocus: {
4675
+ type: Boolean,
4676
+ default: void 0
4677
+ },
4678
+ disposeTimeout: {
4679
+ type: Number,
4680
+ default: void 0
4681
+ }
4682
+ },
4683
+ emits: {
4684
+ show: () => true,
4685
+ hide: () => true,
4686
+ "update:shown": (e) => true,
4687
+ "apply-show": () => true,
4688
+ "apply-hide": () => true,
4689
+ "close-group": () => true,
4690
+ "close-directive": () => true,
4691
+ "auto-hide": () => true,
4692
+ resize: () => true
4693
+ },
4694
+ computed: {
4695
+ finalTheme() {
4696
+ return this.theme ?? this.$options.vPopperTheme;
4697
+ }
4698
+ },
4699
+ methods: {
4700
+ getTargetNodes() {
4701
+ return Array.from(this.$el.children).filter((e) => e !== this.$refs.popperContent.$el);
4702
+ }
4703
+ }
4704
+ });
4705
+ function wt(e, t, o2, i2, s2, r2) {
4706
+ const p2 = resolveComponent("PopperContent"), a2 = resolveComponent("Popper");
4707
+ return openBlock(), createBlock(a2, mergeProps({ ref: "popper" }, e.$props, {
4708
+ theme: e.finalTheme,
4709
+ "target-nodes": e.getTargetNodes,
4710
+ "popper-node": () => e.$refs.popperContent.$el,
4711
+ class: [
4712
+ e.themeClass
4713
+ ],
4714
+ onShow: t[0] || (t[0] = () => e.$emit("show")),
4715
+ onHide: t[1] || (t[1] = () => e.$emit("hide")),
4716
+ "onUpdate:shown": t[2] || (t[2] = (l2) => e.$emit("update:shown", l2)),
4717
+ onApplyShow: t[3] || (t[3] = () => e.$emit("apply-show")),
4718
+ onApplyHide: t[4] || (t[4] = () => e.$emit("apply-hide")),
4719
+ onCloseGroup: t[5] || (t[5] = () => e.$emit("close-group")),
4720
+ onCloseDirective: t[6] || (t[6] = () => e.$emit("close-directive")),
4721
+ onAutoHide: t[7] || (t[7] = () => e.$emit("auto-hide")),
4722
+ onResize: t[8] || (t[8] = () => e.$emit("resize"))
4723
+ }), {
4724
+ default: withCtx(({
4725
+ popperId: l2,
4726
+ isShown: u2,
4727
+ shouldMountContent: L2,
4728
+ skipTransition: D2,
4729
+ autoHide: I,
4730
+ show: F2,
4731
+ hide: v2,
4732
+ handleResize: R2,
4733
+ onResize: j,
4734
+ classes: V,
4735
+ result: Ee
4736
+ }) => [
4737
+ renderSlot(e.$slots, "default", {
4738
+ shown: u2,
4739
+ show: F2,
4740
+ hide: v2
4741
+ }),
4742
+ createVNode(p2, {
4743
+ ref: "popperContent",
4744
+ "popper-id": l2,
4745
+ theme: e.finalTheme,
4746
+ shown: u2,
4747
+ mounted: L2,
4748
+ "skip-transition": D2,
4749
+ "auto-hide": I,
4750
+ "handle-resize": R2,
4751
+ classes: V,
4752
+ result: Ee,
4753
+ onHide: v2,
4754
+ onResize: j
4755
+ }, {
4756
+ default: withCtx(() => [
4757
+ renderSlot(e.$slots, "popper", {
4758
+ shown: u2,
4759
+ hide: v2
4760
+ })
4761
+ ]),
4762
+ _: 2
4763
+ }, 1032, ["popper-id", "theme", "shown", "mounted", "skip-transition", "auto-hide", "handle-resize", "classes", "result", "onHide", "onResize"])
4764
+ ]),
4765
+ _: 3
4766
+ }, 16, ["theme", "target-nodes", "popper-node", "class"]);
4767
+ }
4768
+ const k = /* @__PURE__ */ B(gt, [["render", wt]]);
4769
+ ({
4770
+ ...k,
4771
+ name: "VDropdown",
4772
+ vPopperTheme: "dropdown"
4773
+ });
4774
+ ({
4775
+ ...k,
4776
+ name: "VMenu",
4777
+ vPopperTheme: "menu"
4778
+ });
4779
+ const Ce = {
4780
+ ...k,
4781
+ name: "VTooltip",
4782
+ vPopperTheme: "tooltip"
4783
+ };
4784
+ defineComponent({
4785
+ name: "VTooltipDirective",
4786
+ components: {
4787
+ Popper: Q(),
4788
+ PopperContent: ee
4789
+ },
4790
+ mixins: [
4791
+ te
4792
+ ],
4793
+ inheritAttrs: false,
4794
+ props: {
4795
+ theme: {
4796
+ type: String,
4797
+ default: "tooltip"
4798
+ },
4799
+ html: {
4800
+ type: Boolean,
4801
+ default: (e) => S(e.theme, "html")
4802
+ },
4803
+ content: {
4804
+ type: [String, Number, Function],
4805
+ default: null
4806
+ },
4807
+ loadingContent: {
4808
+ type: String,
4809
+ default: (e) => S(e.theme, "loadingContent")
4810
+ },
4811
+ targetNodes: {
4812
+ type: Function,
4813
+ required: true
4814
+ }
4815
+ },
4816
+ data() {
4817
+ return {
4818
+ asyncContent: null
4819
+ };
4820
+ },
4821
+ computed: {
4822
+ isContentAsync() {
4823
+ return typeof this.content == "function";
4824
+ },
4825
+ loading() {
4826
+ return this.isContentAsync && this.asyncContent == null;
4827
+ },
4828
+ finalContent() {
4829
+ return this.isContentAsync ? this.loading ? this.loadingContent : this.asyncContent : this.content;
4830
+ }
4831
+ },
4832
+ watch: {
4833
+ content: {
4834
+ handler() {
4835
+ this.fetchContent(true);
4836
+ },
4837
+ immediate: true
4838
+ },
4839
+ async finalContent() {
4840
+ await this.$nextTick(), this.$refs.popper.onResize();
4841
+ }
4842
+ },
4843
+ created() {
4844
+ this.$_fetchId = 0;
4845
+ },
4846
+ methods: {
4847
+ fetchContent(e) {
4848
+ if (typeof this.content == "function" && this.$_isShown && (e || !this.$_loading && this.asyncContent == null)) {
4849
+ this.asyncContent = null, this.$_loading = true;
4850
+ const t = ++this.$_fetchId, o2 = this.content(this);
4851
+ o2.then ? o2.then((i2) => this.onResult(t, i2)) : this.onResult(t, o2);
4852
+ }
4853
+ },
4854
+ onResult(e, t) {
4855
+ e === this.$_fetchId && (this.$_loading = false, this.asyncContent = t);
4856
+ },
4857
+ onShow() {
4858
+ this.$_isShown = true, this.fetchContent();
4859
+ },
4860
+ onHide() {
4861
+ this.$_isShown = false;
4862
+ }
4863
+ }
4864
+ });
4865
+ const Vt = Ce;
2498
4866
  const _hoisted_1$6 = { class: "bh-text-[13px] bh-font-normal bh-rounded bh-overflow-hidden" };
2499
4867
  const __default__$3 = {
2500
4868
  name: "columnFilter"
@@ -3238,7 +5606,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3238
5606
  if (!condition || condition === "") return "";
3239
5607
  const type = ((_a = col.type) == null ? void 0 : _a.toLowerCase()) || "string";
3240
5608
  const conditions = FILTER_CONDITIONS[type] || FILTER_CONDITIONS.string;
3241
- const found = conditions.find((c) => c.value === condition);
5609
+ const found = conditions.find((c2) => c2.value === condition);
3242
5610
  if (found) {
3243
5611
  if (props.columnFilterLang && props.columnFilterLang[condition]) {
3244
5612
  return props.columnFilterLang[condition];
@@ -3296,16 +5664,23 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3296
5664
  ])
3297
5665
  ]),
3298
5666
  props.all.columnFilter && !props.isFooter && clearButtonLocation.value === "checkbox" ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
3299
- props.showClearAllButton ? (openBlock(), createElementBlock("button", {
3300
- key: 0,
3301
- type: "button",
3302
- class: normalizeClass(["bh-clear-all-button", {
3303
- "bh-clear-all-button--active": hasAnyActiveFilterLocal.value
3304
- }]),
3305
- disabled: !hasAnyActiveFilterLocal.value,
3306
- onClick: withModifiers(handleClearAllFilters, ["stop"]),
3307
- title: "Clear all filters"
3308
- }, _hoisted_6$1, 10, _hoisted_4$1)) : createCommentVNode("", true)
5667
+ createVNode(unref(Vt), null, {
5668
+ popper: withCtx(() => [
5669
+ createTextVNode("Clear all filters")
5670
+ ]),
5671
+ default: withCtx(() => [
5672
+ props.showClearAllButton ? (openBlock(), createElementBlock("button", {
5673
+ key: 0,
5674
+ type: "button",
5675
+ class: normalizeClass(["bh-clear-all-button", {
5676
+ "bh-clear-all-button--active": hasAnyActiveFilterLocal.value
5677
+ }]),
5678
+ disabled: !hasAnyActiveFilterLocal.value,
5679
+ onClick: withModifiers(handleClearAllFilters, ["stop"])
5680
+ }, _hoisted_6$1, 10, _hoisted_4$1)) : createCommentVNode("", true)
5681
+ ]),
5682
+ _: 1
5683
+ })
3309
5684
  ])) : createCommentVNode("", true)
3310
5685
  ], 6)) : createCommentVNode("", true),
3311
5686
  props.all.hasRightPanel ? (openBlock(), createElementBlock("th", {
@@ -3321,16 +5696,23 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3321
5696
  })
3322
5697
  }, [
3323
5698
  props.all.columnFilter && !props.isFooter && clearButtonLocation.value === "rightpanel" ? (openBlock(), createElementBlock("div", _hoisted_7$1, [
3324
- props.showClearAllButton ? (openBlock(), createElementBlock("button", {
3325
- key: 0,
3326
- type: "button",
3327
- class: normalizeClass(["bh-clear-all-button", {
3328
- "bh-clear-all-button--active": hasAnyActiveFilterLocal.value
3329
- }]),
3330
- disabled: !hasAnyActiveFilterLocal.value,
3331
- onClick: withModifiers(handleClearAllFilters, ["stop"]),
3332
- title: "Clear all filters"
3333
- }, _hoisted_10$1, 10, _hoisted_8$1)) : createCommentVNode("", true)
5699
+ createVNode(unref(Vt), null, {
5700
+ popper: withCtx(() => [
5701
+ createTextVNode("Clear all filters")
5702
+ ]),
5703
+ default: withCtx(() => [
5704
+ props.showClearAllButton ? (openBlock(), createElementBlock("button", {
5705
+ key: 0,
5706
+ type: "button",
5707
+ class: normalizeClass(["bh-clear-all-button", {
5708
+ "bh-clear-all-button--active": hasAnyActiveFilterLocal.value
5709
+ }]),
5710
+ disabled: !hasAnyActiveFilterLocal.value,
5711
+ onClick: withModifiers(handleClearAllFilters, ["stop"])
5712
+ }, _hoisted_10$1, 10, _hoisted_8$1)) : createCommentVNode("", true)
5713
+ ]),
5714
+ _: 1
5715
+ })
3334
5716
  ])) : createCommentVNode("", true)
3335
5717
  ], 6)) : createCommentVNode("", true),
3336
5718
  props.all.hasSubtable ? (openBlock(), createElementBlock("th", {
@@ -3346,16 +5728,23 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3346
5728
  expandall: props.all.expandall
3347
5729
  }, null, 8, ["expandedrows", "expandall"])) : createCommentVNode("", true),
3348
5730
  props.all.columnFilter && !props.isFooter && clearButtonLocation.value === "subtable" ? (openBlock(), createElementBlock("div", _hoisted_11$1, [
3349
- props.showClearAllButton ? (openBlock(), createElementBlock("button", {
3350
- key: 0,
3351
- type: "button",
3352
- class: normalizeClass(["bh-clear-all-button", {
3353
- "bh-clear-all-button--active": hasAnyActiveFilterLocal.value
3354
- }]),
3355
- disabled: !hasAnyActiveFilterLocal.value,
3356
- onClick: withModifiers(handleClearAllFilters, ["stop"]),
3357
- title: "Clear all filters"
3358
- }, _hoisted_14$1, 10, _hoisted_12$1)) : createCommentVNode("", true)
5731
+ createVNode(unref(Vt), null, {
5732
+ popper: withCtx(() => [
5733
+ createTextVNode("Clear all filters")
5734
+ ]),
5735
+ default: withCtx(() => [
5736
+ props.showClearAllButton ? (openBlock(), createElementBlock("button", {
5737
+ key: 0,
5738
+ type: "button",
5739
+ class: normalizeClass(["bh-clear-all-button", {
5740
+ "bh-clear-all-button--active": hasAnyActiveFilterLocal.value
5741
+ }]),
5742
+ disabled: !hasAnyActiveFilterLocal.value,
5743
+ onClick: withModifiers(handleClearAllFilters, ["stop"])
5744
+ }, _hoisted_14$1, 10, _hoisted_12$1)) : createCommentVNode("", true)
5745
+ ]),
5746
+ _: 1
5747
+ })
3359
5748
  ])) : createCommentVNode("", true)
3360
5749
  ], 4)) : createCommentVNode("", true),
3361
5750
  (openBlock(true), createElementBlock(Fragment, null, renderList(props.all.columns, (col, j) => {
@@ -3869,7 +6258,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3869
6258
  { deep: false }
3870
6259
  );
3871
6260
  const uniqueKey = computed(() => {
3872
- const col = props.columns.find((d) => d.isUnique);
6261
+ const col = props.columns.find((d2) => d2.isUnique);
3873
6262
  return (col == null ? void 0 : col.field) || null;
3874
6263
  });
3875
6264
  const hasAnyActiveFilter = ref(false);
@@ -3917,119 +6306,119 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3917
6306
  var _a2, _b2, _c;
3918
6307
  let rows = props.rows || [];
3919
6308
  if (!props.isServerMode) {
3920
- (_a2 = props.columns) == null ? void 0 : _a2.forEach((d) => {
3921
- if (d.filter && (d.value !== void 0 && d.value !== null && d.value !== "" || d.condition === "IsNull" || d.condition == "IsNotNull")) {
3922
- if (d.type === "string") {
3923
- if (d.value && !d.condition) {
3924
- d.condition = "Contains";
6309
+ (_a2 = props.columns) == null ? void 0 : _a2.forEach((d2) => {
6310
+ if (d2.filter && (d2.value !== void 0 && d2.value !== null && d2.value !== "" || d2.condition === "IsNull" || d2.condition == "IsNotNull")) {
6311
+ if (d2.type === "string") {
6312
+ if (d2.value && !d2.condition) {
6313
+ d2.condition = "Contains";
3925
6314
  }
3926
- if (d.condition === "Contains") {
6315
+ if (d2.condition === "Contains") {
3927
6316
  rows = rows.filter((item) => {
3928
6317
  var _a3;
3929
- return (_a3 = cellValue(item, d.field)) == null ? void 0 : _a3.toString().toLowerCase().includes(d.value.toLowerCase());
6318
+ return (_a3 = cellValue(item, d2.field)) == null ? void 0 : _a3.toString().toLowerCase().includes(d2.value.toLowerCase());
3930
6319
  });
3931
- } else if (d.condition === "NotContains") {
6320
+ } else if (d2.condition === "NotContains") {
3932
6321
  rows = rows.filter((item) => {
3933
6322
  var _a3;
3934
- return !((_a3 = cellValue(item, d.field)) == null ? void 0 : _a3.toString().toLowerCase().includes(d.value.toLowerCase()));
6323
+ return !((_a3 = cellValue(item, d2.field)) == null ? void 0 : _a3.toString().toLowerCase().includes(d2.value.toLowerCase()));
3935
6324
  });
3936
- } else if (d.condition === "Equal") {
6325
+ } else if (d2.condition === "Equal") {
3937
6326
  rows = rows.filter((item) => {
3938
6327
  var _a3;
3939
- return ((_a3 = cellValue(item, d.field)) == null ? void 0 : _a3.toString().toLowerCase()) === d.value.toLowerCase();
6328
+ return ((_a3 = cellValue(item, d2.field)) == null ? void 0 : _a3.toString().toLowerCase()) === d2.value.toLowerCase();
3940
6329
  });
3941
- } else if (d.condition === "NotEqual") {
6330
+ } else if (d2.condition === "NotEqual") {
3942
6331
  rows = rows.filter((item) => {
3943
6332
  var _a3;
3944
- return ((_a3 = cellValue(item, d.field)) == null ? void 0 : _a3.toString().toLowerCase()) !== d.value.toLowerCase();
6333
+ return ((_a3 = cellValue(item, d2.field)) == null ? void 0 : _a3.toString().toLowerCase()) !== d2.value.toLowerCase();
3945
6334
  });
3946
- } else if (d.condition == "StartsWith") {
6335
+ } else if (d2.condition == "StartsWith") {
3947
6336
  rows = rows.filter((item) => {
3948
6337
  var _a3;
3949
- return ((_a3 = cellValue(item, d.field)) == null ? void 0 : _a3.toString().toLowerCase().indexOf(d.value.toLowerCase())) === 0;
6338
+ return ((_a3 = cellValue(item, d2.field)) == null ? void 0 : _a3.toString().toLowerCase().indexOf(d2.value.toLowerCase())) === 0;
3950
6339
  });
3951
- } else if (d.condition == "EndsWith") {
6340
+ } else if (d2.condition == "EndsWith") {
3952
6341
  rows = rows.filter((item) => {
3953
6342
  var _a3;
3954
- return ((_a3 = cellValue(item, d.field)) == null ? void 0 : _a3.toString().toLowerCase().substr(d.value.length * -1)) === d.value.toLowerCase();
6343
+ return ((_a3 = cellValue(item, d2.field)) == null ? void 0 : _a3.toString().toLowerCase().substr(d2.value.length * -1)) === d2.value.toLowerCase();
3955
6344
  });
3956
6345
  }
3957
- } else if (d.type === "number") {
3958
- if (d.value && !d.condition) {
3959
- d.condition = "Equal";
6346
+ } else if (d2.type === "number") {
6347
+ if (d2.value && !d2.condition) {
6348
+ d2.condition = "Equal";
3960
6349
  }
3961
- if (d.condition === "Equal") {
6350
+ if (d2.condition === "Equal") {
3962
6351
  rows = rows.filter((item) => {
3963
- return cellValue(item, d.field) && parseFloat(cellValue(item, d.field)) === parseFloat(d.value);
6352
+ return cellValue(item, d2.field) && parseFloat(cellValue(item, d2.field)) === parseFloat(d2.value);
3964
6353
  });
3965
- } else if (d.condition === "NotEqual") {
6354
+ } else if (d2.condition === "NotEqual") {
3966
6355
  rows = rows.filter((item) => {
3967
- return cellValue(item, d.field) && parseFloat(cellValue(item, d.field)) !== parseFloat(d.value);
6356
+ return cellValue(item, d2.field) && parseFloat(cellValue(item, d2.field)) !== parseFloat(d2.value);
3968
6357
  });
3969
- } else if (d.condition === "GreaterThan") {
6358
+ } else if (d2.condition === "GreaterThan") {
3970
6359
  rows = rows.filter((item) => {
3971
- return cellValue(item, d.field) && parseFloat(cellValue(item, d.field)) > parseFloat(d.value);
6360
+ return cellValue(item, d2.field) && parseFloat(cellValue(item, d2.field)) > parseFloat(d2.value);
3972
6361
  });
3973
- } else if (d.condition === "GreaterThanOrEqual") {
6362
+ } else if (d2.condition === "GreaterThanOrEqual") {
3974
6363
  rows = rows.filter((item) => {
3975
- return cellValue(item, d.field) && parseFloat(cellValue(item, d.field)) >= parseFloat(d.value);
6364
+ return cellValue(item, d2.field) && parseFloat(cellValue(item, d2.field)) >= parseFloat(d2.value);
3976
6365
  });
3977
- } else if (d.condition === "LessThan") {
6366
+ } else if (d2.condition === "LessThan") {
3978
6367
  rows = rows.filter((item) => {
3979
- return cellValue(item, d.field) && parseFloat(cellValue(item, d.field)) < parseFloat(d.value);
6368
+ return cellValue(item, d2.field) && parseFloat(cellValue(item, d2.field)) < parseFloat(d2.value);
3980
6369
  });
3981
- } else if (d.condition === "LessThanOrEqual") {
6370
+ } else if (d2.condition === "LessThanOrEqual") {
3982
6371
  rows = rows.filter((item) => {
3983
- return cellValue(item, d.field) && parseFloat(cellValue(item, d.field)) <= parseFloat(d.value);
6372
+ return cellValue(item, d2.field) && parseFloat(cellValue(item, d2.field)) <= parseFloat(d2.value);
3984
6373
  });
3985
6374
  }
3986
- } else if (d.type === "date") {
3987
- if (d.value && !d.condition) {
3988
- d.condition = "Equal";
6375
+ } else if (d2.type === "date") {
6376
+ if (d2.value && !d2.condition) {
6377
+ d2.condition = "Equal";
3989
6378
  }
3990
- if (d.condition === "Equal") {
6379
+ if (d2.condition === "Equal") {
3991
6380
  rows = rows.filter((item) => {
3992
- return cellValue(item, d.field) && dateFormat(cellValue(item, d.field)) === d.value;
6381
+ return cellValue(item, d2.field) && dateFormat(cellValue(item, d2.field)) === d2.value;
3993
6382
  });
3994
- } else if (d.condition === "NotEqual") {
6383
+ } else if (d2.condition === "NotEqual") {
3995
6384
  rows = rows.filter((item) => {
3996
- return cellValue(item, d.field) && dateFormat(cellValue(item, d.field)) !== d.value;
6385
+ return cellValue(item, d2.field) && dateFormat(cellValue(item, d2.field)) !== d2.value;
3997
6386
  });
3998
- } else if (d.condition === "GreaterThan") {
6387
+ } else if (d2.condition === "GreaterThan") {
3999
6388
  rows = rows.filter((item) => {
4000
- return cellValue(item, d.field) && dateFormat(cellValue(item, d.field)) > d.value;
6389
+ return cellValue(item, d2.field) && dateFormat(cellValue(item, d2.field)) > d2.value;
4001
6390
  });
4002
- } else if (d.condition === "LessThan") {
6391
+ } else if (d2.condition === "LessThan") {
4003
6392
  rows = rows.filter((item) => {
4004
- return cellValue(item, d.field) && dateFormat(cellValue(item, d.field)) < d.value;
6393
+ return cellValue(item, d2.field) && dateFormat(cellValue(item, d2.field)) < d2.value;
4005
6394
  });
4006
6395
  }
4007
- } else if (d.type === "bool") {
6396
+ } else if (d2.type === "bool") {
4008
6397
  rows = rows.filter((item) => {
4009
- return cellValue(item, d.field) === d.value;
6398
+ return cellValue(item, d2.field) === d2.value;
4010
6399
  });
4011
6400
  }
4012
- if (d.condition === "IsNull") {
6401
+ if (d2.condition === "IsNull") {
4013
6402
  rows = rows.filter((item) => {
4014
- return cellValue(item, d.field) == null || cellValue(item, d.field) == "";
6403
+ return cellValue(item, d2.field) == null || cellValue(item, d2.field) == "";
4015
6404
  });
4016
- d.value = "";
4017
- } else if (d.condition === "IsNotNull") {
4018
- d.value = "";
6405
+ d2.value = "";
6406
+ } else if (d2.condition === "IsNotNull") {
6407
+ d2.value = "";
4019
6408
  rows = rows.filter((item) => {
4020
- return cellValue(item, d.field);
6409
+ return cellValue(item, d2.field);
4021
6410
  });
4022
6411
  }
4023
6412
  }
4024
6413
  });
4025
6414
  if (currentSearch.value && (rows == null ? void 0 : rows.length)) {
4026
6415
  let final = [];
4027
- const keys = (props.columns || []).filter((d) => d.search && !d.hide).map((d) => {
4028
- return d.field;
6416
+ const keys = (props.columns || []).filter((d2) => d2.search && !d2.hide).map((d2) => {
6417
+ return d2.field;
4029
6418
  });
4030
6419
  for (var j = 0; j < (rows == null ? void 0 : rows.length); j++) {
4031
- for (var i = 0; i < keys.length; i++) {
4032
- if ((_b2 = cellValue(rows[j], keys[i])) == null ? void 0 : _b2.toString().toLowerCase().includes(currentSearch.value.toLowerCase())) {
6420
+ for (var i2 = 0; i2 < keys.length; i2++) {
6421
+ if ((_b2 = cellValue(rows[j], keys[i2])) == null ? void 0 : _b2.toString().toLowerCase().includes(currentSearch.value.toLowerCase())) {
4033
6422
  final.push(rows[j]);
4034
6423
  break;
4035
6424
  }
@@ -4040,10 +6429,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4040
6429
  const isNumeric = ((_c = props.columns.find((col) => col.field == currentSortColumn.value)) == null ? void 0 : _c.type) === "number";
4041
6430
  const collator = getCollator(isNumeric || false);
4042
6431
  const sortOrder = currentSortDirection.value === "desc" ? -1 : 1;
4043
- rows.sort((a, b) => {
6432
+ rows.sort((a2, b2) => {
4044
6433
  var _a3, _b3;
4045
- const valA = (_a3 = currentSortColumn.value) == null ? void 0 : _a3.split(".").reduce((obj, key) => obj == null ? void 0 : obj[key], a);
4046
- const valB = (_b3 = currentSortColumn.value) == null ? void 0 : _b3.split(".").reduce((obj, key) => obj == null ? void 0 : obj[key], b);
6434
+ const valA = (_a3 = currentSortColumn.value) == null ? void 0 : _a3.split(".").reduce((obj, key) => obj == null ? void 0 : obj[key], a2);
6435
+ const valB = (_b3 = currentSortColumn.value) == null ? void 0 : _b3.split(".").reduce((obj, key) => obj == null ? void 0 : obj[key], b2);
4047
6436
  return collator.compare(valA, valB) * sortOrder;
4048
6437
  });
4049
6438
  }
@@ -4058,7 +6447,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4058
6447
  result = rows;
4059
6448
  } else {
4060
6449
  filterRowCount.value = (rows == null ? void 0 : rows.length) || 0;
4061
- result = rows.slice(offset.value - 1, limit.value);
6450
+ result = rows.slice(offset2.value - 1, limit.value);
4062
6451
  }
4063
6452
  if (props.hasSubtable) {
4064
6453
  result.forEach(function(value, index) {
@@ -4198,7 +6587,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4198
6587
  const totalPages = currentPageSize.value < 1 ? 1 : Math.ceil(filterRowCount.value / currentPageSize.value);
4199
6588
  return Math.max(totalPages || 0, 1);
4200
6589
  });
4201
- const offset = computed(() => {
6590
+ const offset2 = computed(() => {
4202
6591
  return (currentPage.value - 1) * currentPageSize.value + 1;
4203
6592
  });
4204
6593
  const limit = computed(() => {
@@ -4223,7 +6612,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4223
6612
  endPage = maxPage.value;
4224
6613
  }
4225
6614
  const pages = Array.from(Array(endPage + 1 - startPage).keys()).map(
4226
- (i) => startPage + i
6615
+ (i2) => startPage + i2
4227
6616
  );
4228
6617
  return pages;
4229
6618
  });
@@ -4305,7 +6694,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4305
6694
  }
4306
6695
  }
4307
6696
  }
4308
- let offset2 = (currentPage.value - 1) * currentPageSize.value;
6697
+ let offset22 = (currentPage.value - 1) * currentPageSize.value;
4309
6698
  let limit2 = currentPageSize.value;
4310
6699
  currentSortColumn.value = field;
4311
6700
  currentSortDirection.value = direction;
@@ -4314,14 +6703,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4314
6703
  if (props.isServerMode) {
4315
6704
  changeForServer("sort");
4316
6705
  } else {
4317
- emit("sortChange", { offset: offset2, limit: limit2, field, direction });
6706
+ emit("sortChange", { offset: offset22, limit: limit2, field, direction });
4318
6707
  }
4319
6708
  };
4320
6709
  const checkboxChange = (value) => {
4321
6710
  selectedAll.value = value.length && filterItems.value.length && value.length === filterItems.value.length;
4322
- const rows = filterItems.value.filter((d, i) => {
6711
+ const rows = filterItems.value.filter((d2, i2) => {
4323
6712
  var _a2;
4324
- const key = uniqueKey.value ? ((_a2 = rowKeys.value) == null ? void 0 : _a2.get(i)) ?? i : i;
6713
+ const key = uniqueKey.value ? ((_a2 = rowKeys.value) == null ? void 0 : _a2.get(i2)) ?? i2 : i2;
4325
6714
  return selected.value.includes(key);
4326
6715
  });
4327
6716
  emit("rowSelect", rows);
@@ -4330,9 +6719,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4330
6719
  const selectAll = (checked) => {
4331
6720
  if (checked) {
4332
6721
  selected.value = filterItems.value.map(
4333
- (d, i) => {
6722
+ (d2, i2) => {
4334
6723
  var _a2;
4335
- return uniqueKey.value ? ((_a2 = rowKeys.value) == null ? void 0 : _a2.get(i)) ?? i : i;
6724
+ return uniqueKey.value ? ((_a2 = rowKeys.value) == null ? void 0 : _a2.get(i2)) ?? i2 : i2;
4336
6725
  }
4337
6726
  );
4338
6727
  } else {
@@ -4383,10 +6772,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4383
6772
  if (!date) {
4384
6773
  return "";
4385
6774
  }
4386
- const dt = new Date(date);
4387
- const day = dt.getDate();
4388
- const month = dt.getMonth() + 1;
4389
- const year = dt.getFullYear();
6775
+ const dt2 = new Date(date);
6776
+ const day = dt2.getDate();
6777
+ const month = dt2.getMonth() + 1;
6778
+ const year = dt2.getFullYear();
4390
6779
  return year + "-" + (month > 9 ? month : "0" + month) + "-" + (day > 9 ? day : "0" + day);
4391
6780
  } catch {
4392
6781
  }
@@ -4416,7 +6805,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4416
6805
  const changeForServer = (changeType, isResetPage = false) => {
4417
6806
  if (props.isServerMode) {
4418
6807
  setDefaultCondition();
4419
- props.columns.filter((c) => c.value || c.condition);
6808
+ props.columns.filter((c2) => c2.value || c2.condition);
4420
6809
  const res = {
4421
6810
  current_page: isResetPage ? 1 : currentPage.value,
4422
6811
  pagesize: currentPageSize.value,
@@ -4431,25 +6820,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4431
6820
  }
4432
6821
  };
4433
6822
  const setDefaultCondition = () => {
4434
- for (let i = 0; i < props.columns.length; i++) {
4435
- let d = props.columns[i];
4436
- if (d.filter && (d.value !== void 0 && d.value !== null && d.value !== "" || d.condition === "IsNull" || d.condition === "IsNotNull")) {
4437
- if (d.type === "string" && d.value && !d.condition) {
4438
- d.condition = "Contains";
6823
+ for (let i2 = 0; i2 < props.columns.length; i2++) {
6824
+ let d2 = props.columns[i2];
6825
+ if (d2.filter && (d2.value !== void 0 && d2.value !== null && d2.value !== "" || d2.condition === "IsNull" || d2.condition === "IsNotNull")) {
6826
+ if (d2.type === "string" && d2.value && !d2.condition) {
6827
+ d2.condition = "Contains";
4439
6828
  }
4440
- if (d.type === "number" && d.value && !d.condition) {
4441
- d.condition = "Equal";
6829
+ if (d2.type === "number" && d2.value && !d2.condition) {
6830
+ d2.condition = "Equal";
4442
6831
  }
4443
- if (d.type === "date" && d.value && !d.condition) {
4444
- d.condition = "Equal";
6832
+ if (d2.type === "date" && d2.value && !d2.condition) {
6833
+ d2.condition = "Equal";
4445
6834
  }
4446
6835
  }
4447
6836
  }
4448
6837
  };
4449
6838
  const reset = () => {
4450
6839
  selectAll(false);
4451
- for (let i = 0; i < props.columns.length; i++) {
4452
- props.columns[i].value = "";
6840
+ for (let i2 = 0; i2 < props.columns.length; i2++) {
6841
+ props.columns[i2].value = "";
4453
6842
  }
4454
6843
  currentSearch.value = "";
4455
6844
  currentPageSize.value = oldPageSize;
@@ -4467,9 +6856,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4467
6856
  }
4468
6857
  };
4469
6858
  const getSelectedRows = () => {
4470
- const rows = filterItems.value.filter((d, i) => {
6859
+ const rows = filterItems.value.filter((d2, i2) => {
4471
6860
  var _a2;
4472
- const key = uniqueKey.value ? ((_a2 = rowKeys.value) == null ? void 0 : _a2.get(i)) ?? i : i;
6861
+ const key = uniqueKey.value ? ((_a2 = rowKeys.value) == null ? void 0 : _a2.get(i2)) ?? i2 : i2;
4473
6862
  return selected.value.includes(key);
4474
6863
  });
4475
6864
  return rows;
@@ -4491,7 +6880,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4491
6880
  var _a2;
4492
6881
  if (isRowSelected(index)) {
4493
6882
  const key = uniqueKey.value ? ((_a2 = rowKeys.value) == null ? void 0 : _a2.get(index)) ?? index : index;
4494
- selected.value = selected.value.filter((d) => d !== key);
6883
+ selected.value = selected.value.filter((d2) => d2 !== key);
4495
6884
  }
4496
6885
  };
4497
6886
  const isRowSelected = (index) => {
@@ -4568,7 +6957,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4568
6957
  });
4569
6958
  return (_ctx, _cache) => {
4570
6959
  return openBlock(), createElementBlock("div", _hoisted_1, [
4571
- createVNode(unref(Pe), {
6960
+ createVNode(unref(Pe$1), {
4572
6961
  class: "default-theme",
4573
6962
  style: normalizeStyle({ height: props.height })
4574
6963
  }, {
@@ -4611,7 +7000,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4611
7000
  ])) : createCommentVNode("", true)
4612
7001
  ], 4)) : createCommentVNode("", true),
4613
7002
  createElementVNode("div", _hoisted_7, [
4614
- _ctx.enabletopmenu ? (openBlock(), createBlock(unref(Pe), {
7003
+ _ctx.enabletopmenu ? (openBlock(), createBlock(unref(Pe$1), {
4615
7004
  key: 0,
4616
7005
  class: "default-theme",
4617
7006
  horizontal: "horizontal",
@@ -4697,9 +7086,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4697
7086
  ]), 1032, ["expandedrows", "currentSortColumn", "currentSortDirection", "isOpenFilter", "checkAll", "columnFilterLang", "hasFilterDatetimeSlot", "showClearAllButton", "hasAnyActiveFilter", "filterUpdateTrigger"])
4698
7087
  ], 2),
4699
7088
  createElementVNode("tbody", null, [
4700
- (openBlock(true), createElementBlock(Fragment, null, renderList(filterItems.value, (item, i) => {
7089
+ (openBlock(true), createElementBlock(Fragment, null, renderList(filterItems.value, (item, i2) => {
4701
7090
  return openBlock(), createElementBlock(Fragment, {
4702
- key: getRowKey(i)
7091
+ key: getRowKey(i2)
4703
7092
  }, [
4704
7093
  filterRowCount.value ? (openBlock(), createElementBlock("tr", {
4705
7094
  key: 0,
@@ -4707,7 +7096,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4707
7096
  isRowClassFunction.value ? _ctx.rowClass(item) : props.rowClass,
4708
7097
  props.selectRowOnClick ? "bh-cursor-pointer" : ""
4709
7098
  ]),
4710
- onClick: withModifiers(($event) => rowClick(item, i), ["prevent"])
7099
+ onClick: withModifiers(($event) => rowClick(item, i2), ["prevent"])
4711
7100
  }, [
4712
7101
  props.hasCheckbox ? (openBlock(), createElementBlock("td", {
4713
7102
  key: 0,
@@ -4723,7 +7112,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4723
7112
  withDirectives(createElementVNode("input", {
4724
7113
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selected.value = $event),
4725
7114
  type: "checkbox",
4726
- value: getRowKey(i),
7115
+ value: getRowKey(i2),
4727
7116
  onClick: _cache[1] || (_cache[1] = withModifiers(() => {
4728
7117
  }, ["stop"]))
4729
7118
  }, null, 8, _hoisted_13), [
@@ -4761,7 +7150,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4761
7150
  })
4762
7151
  }, [
4763
7152
  createVNode(ButtonExpand, {
4764
- item: { ...item, _rowIndex: i },
7153
+ item: { ...item, _rowIndex: i2 },
4765
7154
  expandedrows: expandedrows.value
4766
7155
  }, null, 8, ["item", "expandedrows"])
4767
7156
  ], 6)) : createCommentVNode("", true),
@@ -4775,7 +7164,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4775
7164
  props.hasCheckbox && j === 0 && props.stickyFirstColumn ? "bh-left-[52px]" : "",
4776
7165
  col.cellClass ? col.cellClass : ""
4777
7166
  ]),
4778
- onContextmenu: ($event) => handleCellContextMenu($event, item, col, cellValue(item, col.field), i, j)
7167
+ onContextmenu: ($event) => handleCellContextMenu($event, item, col, cellValue(item, col.field), i2, j)
4779
7168
  }, [
4780
7169
  unref(slots)[col.field] ? renderSlot(_ctx.$slots, col.field, {
4781
7170
  key: 0,
@@ -4790,29 +7179,29 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4790
7179
  ], 64);
4791
7180
  }), 256))
4792
7181
  ], 10, _hoisted_11)) : createCommentVNode("", true),
4793
- isRowExpanded(item, i) && props.hasSubtable ? (openBlock(), createElementBlock("tr", {
7182
+ isRowExpanded(item, i2) && props.hasSubtable ? (openBlock(), createElementBlock("tr", {
4794
7183
  key: 1,
4795
7184
  class: normalizeClass([
4796
7185
  isRowClassFunction.value ? _ctx.rowClass(item) : props.rowClass,
4797
7186
  props.selectRowOnClick ? "bh-cursor-pointer" : ""
4798
7187
  ]),
4799
- onClick: withModifiers(($event) => rowClick(item, i), ["prevent"])
7188
+ onClick: withModifiers(($event) => rowClick(item, i2), ["prevent"])
4800
7189
  }, [
4801
7190
  createElementVNode("td", {
4802
7191
  colspan: props.columns.length + unref(extracolumnlength)
4803
7192
  }, [
4804
7193
  renderSlot(_ctx.$slots, "tsub", {
4805
7194
  rowData: item,
4806
- rowIndex: i,
7195
+ rowIndex: i2,
4807
7196
  filterItems: filterItems.value
4808
7197
  })
4809
7198
  ], 8, _hoisted_17)
4810
7199
  ], 10, _hoisted_16)) : createCommentVNode("", true)
4811
7200
  ], 64);
4812
7201
  }), 128)),
4813
- !filterRowCount.value && currentLoader.value && _ctx.skeletonloader ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(props.pageSize, (i) => {
7202
+ !filterRowCount.value && currentLoader.value && _ctx.skeletonloader ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(props.pageSize, (i2) => {
4814
7203
  return openBlock(), createElementBlock("tr", {
4815
- key: i,
7204
+ key: i2,
4816
7205
  class: "!bh-bg-white bh-h-11 !bh-border-transparent"
4817
7206
  }, [
4818
7207
  createElementVNode("td", {
@@ -4821,9 +7210,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4821
7210
  }, _hoisted_20, 8, _hoisted_18)
4822
7211
  ]);
4823
7212
  }), 128)) : createCommentVNode("", true),
4824
- filterRowCount.value ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(props.footerRows, (item, i) => {
7213
+ filterRowCount.value ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(props.footerRows, (item, i2) => {
4825
7214
  return openBlock(), createElementBlock("tr", {
4826
- key: item[uniqueKey.value] ? item[uniqueKey.value] : i,
7215
+ key: item[uniqueKey.value] ? item[uniqueKey.value] : i2,
4827
7216
  class: "sticky-table-footer"
4828
7217
  }, [
4829
7218
  unref(extracolumnlength) > 0 ? (openBlock(), createElementBlock("td", {
@@ -4841,8 +7230,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4841
7230
  col.cellClass ? col.cellClass : ""
4842
7231
  ])
4843
7232
  }, [
4844
- item.cells.find((x) => x.field == col.field) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
4845
- createTextVNode(toDisplayString(item.cells.find((x) => x.field == col.field).text), 1)
7233
+ item.cells.find((x2) => x2.field == col.field) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
7234
+ createTextVNode(toDisplayString(item.cells.find((x2) => x2.field == col.field).text), 1)
4846
7235
  ], 64)) : createCommentVNode("", true)
4847
7236
  ], 2)) : createCommentVNode("", true)
4848
7237
  ], 64);
@@ -4971,9 +7360,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4971
7360
  ]), 1032, ["expandedrows", "currentSortColumn", "currentSortDirection", "isOpenFilter", "checkAll", "columnFilterLang", "hasFilterDatetimeSlot", "showClearAllButton", "hasAnyActiveFilter", "filterUpdateTrigger"])
4972
7361
  ], 2),
4973
7362
  createElementVNode("tbody", null, [
4974
- (openBlock(true), createElementBlock(Fragment, null, renderList(filterItems.value, (item, i) => {
7363
+ (openBlock(true), createElementBlock(Fragment, null, renderList(filterItems.value, (item, i2) => {
4975
7364
  return openBlock(), createElementBlock(Fragment, {
4976
- key: getRowKey(i)
7365
+ key: getRowKey(i2)
4977
7366
  }, [
4978
7367
  filterRowCount.value ? (openBlock(), createElementBlock("tr", {
4979
7368
  key: 0,
@@ -4981,7 +7370,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4981
7370
  isRowClassFunction.value ? _ctx.rowClass(item) : props.rowClass,
4982
7371
  props.selectRowOnClick ? "bh-cursor-pointer" : ""
4983
7372
  ]),
4984
- onClick: withModifiers(($event) => rowClick(item, i), ["prevent"])
7373
+ onClick: withModifiers(($event) => rowClick(item, i2), ["prevent"])
4985
7374
  }, [
4986
7375
  props.hasCheckbox ? (openBlock(), createElementBlock("td", {
4987
7376
  key: 0,
@@ -4997,7 +7386,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4997
7386
  withDirectives(createElementVNode("input", {
4998
7387
  "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => selected.value = $event),
4999
7388
  type: "checkbox",
5000
- value: getRowKey(i),
7389
+ value: getRowKey(i2),
5001
7390
  onClick: _cache[4] || (_cache[4] = withModifiers(() => {
5002
7391
  }, ["stop"]))
5003
7392
  }, null, 8, _hoisted_25), [
@@ -5035,7 +7424,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
5035
7424
  })
5036
7425
  }, [
5037
7426
  createVNode(ButtonExpand, {
5038
- item: { ...item, _rowIndex: i },
7427
+ item: { ...item, _rowIndex: i2 },
5039
7428
  expandedrows: expandedrows.value
5040
7429
  }, null, 8, ["item", "expandedrows"])
5041
7430
  ], 6)) : createCommentVNode("", true),
@@ -5049,7 +7438,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
5049
7438
  props.hasCheckbox && j === 0 && props.stickyFirstColumn ? "bh-left-[52px]" : "",
5050
7439
  col.cellClass ? col.cellClass : ""
5051
7440
  ]),
5052
- onContextmenu: ($event) => handleCellContextMenu($event, item, col, cellValue(item, col.field), i, j)
7441
+ onContextmenu: ($event) => handleCellContextMenu($event, item, col, cellValue(item, col.field), i2, j)
5053
7442
  }, [
5054
7443
  unref(slots)[col.field] ? renderSlot(_ctx.$slots, col.field, {
5055
7444
  key: 0,
@@ -5064,13 +7453,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
5064
7453
  ], 64);
5065
7454
  }), 256))
5066
7455
  ], 10, _hoisted_23)) : createCommentVNode("", true),
5067
- isRowExpanded(item, i) && props.hasSubtable ? (openBlock(), createElementBlock("tr", {
7456
+ isRowExpanded(item, i2) && props.hasSubtable ? (openBlock(), createElementBlock("tr", {
5068
7457
  key: 1,
5069
7458
  class: normalizeClass([
5070
7459
  isRowClassFunction.value ? _ctx.rowClass(item) : props.rowClass,
5071
7460
  props.selectRowOnClick ? "bh-cursor-pointer" : ""
5072
7461
  ]),
5073
- onClick: withModifiers(($event) => rowClick(item, i), ["prevent"])
7462
+ onClick: withModifiers(($event) => rowClick(item, i2), ["prevent"])
5074
7463
  }, [
5075
7464
  createElementVNode("td", {
5076
7465
  colspan: props.columns.length + unref(extracolumnlength)
@@ -5087,7 +7476,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
5087
7476
  }, [
5088
7477
  renderSlot(_ctx.$slots, "tsub", {
5089
7478
  rowData: item,
5090
- rowIndex: i,
7479
+ rowIndex: i2,
5091
7480
  filterItems: filterItems.value
5092
7481
  })
5093
7482
  ], 4)
@@ -5095,9 +7484,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
5095
7484
  ], 10, _hoisted_28)) : createCommentVNode("", true)
5096
7485
  ], 64);
5097
7486
  }), 128)),
5098
- !filterRowCount.value && currentLoader.value && _ctx.skeletonloader ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(props.pageSize, (i) => {
7487
+ !filterRowCount.value && currentLoader.value && _ctx.skeletonloader ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(props.pageSize, (i2) => {
5099
7488
  return openBlock(), createElementBlock("tr", {
5100
- key: i,
7489
+ key: i2,
5101
7490
  class: "!bh-bg-white bh-h-11 !bh-border-transparent"
5102
7491
  }, [
5103
7492
  createElementVNode("td", {
@@ -5106,9 +7495,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
5106
7495
  }, _hoisted_32, 8, _hoisted_30)
5107
7496
  ]);
5108
7497
  }), 128)) : createCommentVNode("", true),
5109
- filterRowCount.value ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(props.footerRows, (item, i) => {
7498
+ filterRowCount.value ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(props.footerRows, (item, i2) => {
5110
7499
  return openBlock(), createElementBlock("tr", {
5111
- key: item[uniqueKey.value] ? item[uniqueKey.value] : i,
7500
+ key: item[uniqueKey.value] ? item[uniqueKey.value] : i2,
5112
7501
  class: "sticky-table-footer"
5113
7502
  }, [
5114
7503
  unref(extracolumnlength) > 0 ? (openBlock(), createElementBlock("td", {
@@ -5126,8 +7515,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
5126
7515
  col.cellClass ? col.cellClass : ""
5127
7516
  ])
5128
7517
  }, [
5129
- item.cells.find((x) => x.field == col.field) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
5130
- createTextVNode(toDisplayString(item.cells.find((x) => x.field == col.field).text), 1)
7518
+ item.cells.find((x2) => x2.field == col.field) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
7519
+ createTextVNode(toDisplayString(item.cells.find((x2) => x2.field == col.field).text), 1)
5131
7520
  ], 64)) : createCommentVNode("", true)
5132
7521
  ], 2)) : createCommentVNode("", true)
5133
7522
  ], 64);
@@ -5207,7 +7596,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
5207
7596
  key: 0,
5208
7597
  paginationInfo: _ctx.paginationInfo,
5209
7598
  filterRowCount: filterRowCount.value,
5210
- offset: offset.value,
7599
+ offset: offset2.value,
5211
7600
  limit: limit.value,
5212
7601
  showPageSize: _ctx.showPageSize,
5213
7602
  pageSizeOptions: _ctx.pageSizeOptions,
@@ -5218,7 +7607,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
5218
7607
  createElementVNode("div", _hoisted_35, [
5219
7608
  createElementVNode("span", _hoisted_36, toDisplayString(stringFormat(
5220
7609
  props.paginationInfo,
5221
- filterRowCount.value ? offset.value : 0,
7610
+ filterRowCount.value ? offset2.value : 0,
5222
7611
  limit.value,
5223
7612
  filterRowCount.value
5224
7613
  )), 1),