@leaflink/stash 44.3.0 → 44.3.1

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.
package/dist/Select.js CHANGED
@@ -1,4 +1,4 @@
1
- import { computed as T, unref as F, ref as k, shallowRef as bt, watch as Q, getCurrentScope as xt, onScopeDispose as _t, shallowReadonly as oe, defineComponent as Et, useAttrs as St, useSlots as Ct, nextTick as Ne, onMounted as Rt, onUnmounted as Ot, openBlock as B, createBlock as Re, normalizeClass as ue, createSlots as kt, withCtx as fe, createElementVNode as z, createElementBlock as I, Fragment as Oe, renderList as ke, toDisplayString as le, withDirectives as de, withKeys as je, createCommentVNode as pe, renderSlot as Te, createTextVNode as me, withModifiers as he, createVNode as se, Teleport as Tt, Transition as Bt, normalizeStyle as At, vModelText as Lt, vShow as Ve, pushScopeId as Mt, popScopeId as Dt } from "vue";
1
+ import { computed as T, unref as F, ref as k, shallowRef as bt, watch as Q, getCurrentScope as xt, onScopeDispose as _t, shallowReadonly as oe, defineComponent as Et, useAttrs as St, useSlots as Ct, nextTick as Ne, onMounted as Rt, onUnmounted as Ot, openBlock as B, createBlock as Re, normalizeClass as ue, createSlots as kt, withCtx as fe, createElementVNode as z, createElementBlock as I, Fragment as Oe, renderList as ke, toDisplayString as le, withDirectives as de, withKeys as je, createCommentVNode as me, renderSlot as Te, createTextVNode as pe, withModifiers as he, createVNode as se, Teleport as Tt, Transition as Bt, normalizeStyle as At, vModelText as Lt, vShow as Ve, pushScopeId as Mt, popScopeId as Dt } from "vue";
2
2
  import Ft from "@leaflink/snitch";
3
3
  import Pt from "lodash-es/debounce";
4
4
  import It from "lodash-es/isEmpty";
@@ -122,18 +122,18 @@ function Ye(e, n, t) {
122
122
  reference: o,
123
123
  floating: l
124
124
  } = e;
125
- const s = Fe(n), i = nt(n), c = tt(i), r = Z(n), u = s === "y", p = o.x + o.width / 2 - l.width / 2, h = o.y + o.height / 2 - l.height / 2, g = o[c] / 2 - l[c] / 2;
125
+ const s = Fe(n), i = nt(n), c = tt(i), r = Z(n), u = s === "y", m = o.x + o.width / 2 - l.width / 2, h = o.y + o.height / 2 - l.height / 2, g = o[c] / 2 - l[c] / 2;
126
126
  let d;
127
127
  switch (r) {
128
128
  case "top":
129
129
  d = {
130
- x: p,
130
+ x: m,
131
131
  y: o.y - l.height
132
132
  };
133
133
  break;
134
134
  case "bottom":
135
135
  d = {
136
- x: p,
136
+ x: m,
137
137
  y: o.y + o.height
138
138
  };
139
139
  break;
@@ -177,7 +177,7 @@ const tn = async (e, n, t) => {
177
177
  floating: n,
178
178
  strategy: l
179
179
  }), {
180
- x: p,
180
+ x: m,
181
181
  y: h
182
182
  } = Ye(u, o, r), g = o, d = {}, f = 0;
183
183
  for (let b = 0; b < c.length; b++) {
@@ -190,7 +190,7 @@ const tn = async (e, n, t) => {
190
190
  data: R,
191
191
  reset: C
192
192
  } = await v({
193
- x: p,
193
+ x: m,
194
194
  y: h,
195
195
  initialPlacement: o,
196
196
  placement: g,
@@ -203,7 +203,7 @@ const tn = async (e, n, t) => {
203
203
  floating: n
204
204
  }
205
205
  });
206
- if (p = y ?? p, h = E ?? h, d = {
206
+ if (m = y ?? m, h = E ?? h, d = {
207
207
  ...d,
208
208
  [_]: {
209
209
  ...d[_],
@@ -215,14 +215,14 @@ const tn = async (e, n, t) => {
215
215
  floating: n,
216
216
  strategy: l
217
217
  }) : C.rects), {
218
- x: p,
218
+ x: m,
219
219
  y: h
220
220
  } = Ye(u, g, r)), b = -1;
221
221
  continue;
222
222
  }
223
223
  }
224
224
  return {
225
- x: p,
225
+ x: m,
226
226
  y: h,
227
227
  placement: g,
228
228
  strategy: l,
@@ -241,14 +241,14 @@ async function ot(e, n) {
241
241
  strategy: r
242
242
  } = e, {
243
243
  boundary: u = "clippingAncestors",
244
- rootBoundary: p = "viewport",
244
+ rootBoundary: m = "viewport",
245
245
  elementContext: h = "floating",
246
246
  altBoundary: g = !1,
247
247
  padding: d = 0
248
248
  } = De(n, e), f = en(d), _ = c[g ? h === "floating" ? "reference" : "floating" : h], v = Me(await s.getClippingRect({
249
249
  element: (t = await (s.isElement == null ? void 0 : s.isElement(_))) == null || t ? _ : _.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(c.floating)),
250
250
  boundary: u,
251
- rootBoundary: p,
251
+ rootBoundary: m,
252
252
  strategy: r
253
253
  })), y = h === "floating" ? {
254
254
  ...i.floating,
@@ -286,7 +286,7 @@ const nn = function(e) {
286
286
  platform: r,
287
287
  elements: u
288
288
  } = n, {
289
- mainAxis: p = !0,
289
+ mainAxis: m = !0,
290
290
  crossAxis: h = !0,
291
291
  fallbackPlacements: g,
292
292
  fallbackStrategy: d = "bestFit",
@@ -300,7 +300,7 @@ const nn = function(e) {
300
300
  !g && f !== "none" && R.push(...Qt(c, b, f, E));
301
301
  const C = [c, ...R], O = await ot(n, _), x = [];
302
302
  let M = ((o = s.flip) == null ? void 0 : o.overflows) || [];
303
- if (p && x.push(O[v]), h) {
303
+ if (m && x.push(O[v]), h) {
304
304
  const K = Yt(l, i, E);
305
305
  x.push(O[K[0]], O[K[1]]);
306
306
  }
@@ -349,7 +349,7 @@ async function on(e, n) {
349
349
  placement: t,
350
350
  platform: o,
351
351
  elements: l
352
- } = e, s = await (o.isRTL == null ? void 0 : o.isRTL(l.floating)), i = Z(t), c = we(t), r = Fe(t) === "y", u = ["left", "top"].includes(i) ? -1 : 1, p = s && r ? -1 : 1, h = De(n, e);
352
+ } = e, s = await (o.isRTL == null ? void 0 : o.isRTL(l.floating)), i = Z(t), c = we(t), r = Fe(t) === "y", u = ["left", "top"].includes(i) ? -1 : 1, m = s && r ? -1 : 1, h = De(n, e);
353
353
  let {
354
354
  mainAxis: g,
355
355
  crossAxis: d,
@@ -365,11 +365,11 @@ async function on(e, n) {
365
365
  ...h
366
366
  };
367
367
  return c && typeof f == "number" && (d = c === "end" ? f * -1 : f), r ? {
368
- x: d * p,
368
+ x: d * m,
369
369
  y: g * u
370
370
  } : {
371
371
  x: g * u,
372
- y: d * p
372
+ y: d * m
373
373
  };
374
374
  }
375
375
  const ln = function(e) {
@@ -408,22 +408,22 @@ const ln = function(e) {
408
408
  apply: i = () => {
409
409
  },
410
410
  ...c
411
- } = De(e, n), r = await ot(n, c), u = Z(t), p = we(t), h = Fe(t) === "y", {
411
+ } = De(e, n), r = await ot(n, c), u = Z(t), m = we(t), h = Fe(t) === "y", {
412
412
  width: g,
413
413
  height: d
414
414
  } = o.floating;
415
415
  let f, b;
416
- u === "top" || u === "bottom" ? (f = u, b = p === (await (l.isRTL == null ? void 0 : l.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (b = u, f = p === "end" ? "top" : "bottom");
416
+ u === "top" || u === "bottom" ? (f = u, b = m === (await (l.isRTL == null ? void 0 : l.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (b = u, f = m === "end" ? "top" : "bottom");
417
417
  const _ = d - r[f], v = g - r[b], y = !n.middlewareData.shift;
418
418
  let E = _, R = v;
419
419
  if (h) {
420
420
  const O = g - r.left - r.right;
421
- R = p || y ? ge(v, O) : O;
421
+ R = m || y ? ge(v, O) : O;
422
422
  } else {
423
423
  const O = d - r.top - r.bottom;
424
- E = p || y ? ge(_, O) : O;
424
+ E = m || y ? ge(_, O) : O;
425
425
  }
426
- if (y && !p) {
426
+ if (y && !m) {
427
427
  const O = N(r.left, 0), x = N(r.right, 0), M = N(r.top, 0), D = N(r.bottom, 0);
428
428
  h ? R = g - 2 * (O !== 0 || x !== 0 ? O + x : N(r.left, r.right)) : E = d - 2 * (M !== 0 || D !== 0 ? M + D : N(r.top, r.bottom));
429
429
  }
@@ -574,17 +574,17 @@ function ee(e, n, t, o) {
574
574
  let i = X(1);
575
575
  n && (o ? U(o) && (i = re(o)) : i = re(e));
576
576
  const c = un(s, t, o) ? rt(s) : X(0);
577
- let r = (l.left + c.x) / i.x, u = (l.top + c.y) / i.y, p = l.width / i.x, h = l.height / i.y;
577
+ let r = (l.left + c.x) / i.x, u = (l.top + c.y) / i.y, m = l.width / i.x, h = l.height / i.y;
578
578
  if (s) {
579
579
  const g = P(s), d = o && U(o) ? P(o) : o;
580
580
  let f = g.frameElement;
581
581
  for (; f && o && d !== g; ) {
582
582
  const b = re(f), _ = f.getBoundingClientRect(), v = V(f), y = _.left + (f.clientLeft + parseFloat(v.paddingLeft)) * b.x, E = _.top + (f.clientTop + parseFloat(v.paddingTop)) * b.y;
583
- r *= b.x, u *= b.y, p *= b.x, h *= b.y, r += y, u += E, f = P(f).frameElement;
583
+ r *= b.x, u *= b.y, m *= b.x, h *= b.y, r += y, u += E, f = P(f).frameElement;
584
584
  }
585
585
  }
586
586
  return Me({
587
- width: p,
587
+ width: m,
588
588
  height: h,
589
589
  x: r,
590
590
  y: u
@@ -621,7 +621,7 @@ function dn(e) {
621
621
  function at(e) {
622
622
  return ee(j(e)).left + Ie(e).scrollLeft;
623
623
  }
624
- function pn(e) {
624
+ function mn(e) {
625
625
  const n = j(e), t = Ie(e), o = e.ownerDocument.body, l = N(n.scrollWidth, n.clientWidth, o.scrollWidth, o.clientWidth), s = N(n.scrollHeight, n.clientHeight, o.scrollHeight, o.clientHeight);
626
626
  let i = -t.scrollLeft + at(e);
627
627
  const c = -t.scrollTop;
@@ -632,7 +632,7 @@ function pn(e) {
632
632
  y: c
633
633
  };
634
634
  }
635
- function mn(e, n) {
635
+ function pn(e, n) {
636
636
  const t = P(e), o = j(e), l = t.visualViewport;
637
637
  let s = o.clientWidth, i = o.clientHeight, c = 0, r = 0;
638
638
  if (l) {
@@ -659,9 +659,9 @@ function hn(e, n) {
659
659
  function Je(e, n, t) {
660
660
  let o;
661
661
  if (n === "viewport")
662
- o = mn(e, t);
662
+ o = pn(e, t);
663
663
  else if (n === "document")
664
- o = pn(j(e));
664
+ o = mn(j(e));
665
665
  else if (U(n))
666
666
  o = hn(n, t);
667
667
  else {
@@ -687,7 +687,7 @@ function vn(e, n) {
687
687
  let i = s ? ae(e) : e;
688
688
  for (; U(i) && !Pe(i); ) {
689
689
  const c = V(i), r = He(i);
690
- !r && c.position === "fixed" && (l = null), (s ? !r && !l : !r && c.position === "static" && !!l && ["absolute", "fixed"].includes(l.position) || be(i) && !r && ct(e, i)) ? o = o.filter((p) => p !== i) : l = c, i = ae(i);
690
+ !r && c.position === "fixed" && (l = null), (s ? !r && !l : !r && c.position === "static" && !!l && ["absolute", "fixed"].includes(l.position) || be(i) && !r && ct(e, i)) ? o = o.filter((m) => m !== i) : l = c, i = ae(i);
691
691
  }
692
692
  return n.set(e, o), o;
693
693
  }
@@ -698,8 +698,8 @@ function gn(e) {
698
698
  rootBoundary: o,
699
699
  strategy: l
700
700
  } = e;
701
- const i = [...t === "clippingAncestors" ? vn(n, this._c) : [].concat(t), o], c = i[0], r = i.reduce((u, p) => {
702
- const h = Je(n, p, l);
701
+ const i = [...t === "clippingAncestors" ? vn(n, this._c) : [].concat(t), o], c = i[0], r = i.reduce((u, m) => {
702
+ const h = Je(n, m, l);
703
703
  return u.top = N(h.top, u.top), u.right = ge(h.right, u.right), u.bottom = ge(h.bottom, u.bottom), u.left = N(h.left, u.left), u;
704
704
  }, Je(n, c, l));
705
705
  return {
@@ -785,13 +785,13 @@ function En(e, n) {
785
785
  c === void 0 && (c = !1), r === void 0 && (r = 1), s();
786
786
  const {
787
787
  left: u,
788
- top: p,
788
+ top: m,
789
789
  width: h,
790
790
  height: g
791
791
  } = e.getBoundingClientRect();
792
792
  if (c || n(), !h || !g)
793
793
  return;
794
- const d = Be(p), f = Be(l.clientWidth - (u + h)), b = Be(l.clientHeight - (p + g)), _ = Be(u), y = {
794
+ const d = Be(m), f = Be(l.clientWidth - (u + h)), b = Be(l.clientHeight - (m + g)), _ = Be(u), y = {
795
795
  rootMargin: -d + "px " + -f + "px " + -b + "px " + -_ + "px",
796
796
  threshold: N(0, ge(1, r)) || 1
797
797
  };
@@ -828,8 +828,8 @@ function Sn(e, n, t, o) {
828
828
  elementResize: i = typeof ResizeObserver == "function",
829
829
  layoutShift: c = typeof IntersectionObserver == "function",
830
830
  animationFrame: r = !1
831
- } = o, u = We(e), p = l || s ? [...u ? ye(u) : [], ...ye(n)] : [];
832
- p.forEach((v) => {
831
+ } = o, u = We(e), m = l || s ? [...u ? ye(u) : [], ...ye(n)] : [];
832
+ m.forEach((v) => {
833
833
  l && v.addEventListener("scroll", t, {
834
834
  passive: !0
835
835
  }), s && v.addEventListener("resize", t);
@@ -849,7 +849,7 @@ function Sn(e, n, t, o) {
849
849
  b && (v.x !== b.x || v.y !== b.y || v.width !== b.width || v.height !== b.height) && t(), b = v, f = requestAnimationFrame(_);
850
850
  }
851
851
  return t(), () => {
852
- p.forEach((v) => {
852
+ m.forEach((v) => {
853
853
  l && v.removeEventListener("scroll", t), s && v.removeEventListener("resize", t);
854
854
  }), h && h(), d && d.disconnect(), d = null, r && cancelAnimationFrame(f);
855
855
  };
@@ -892,19 +892,19 @@ function Rn(e, n, t) {
892
892
  }), r = T(() => {
893
893
  var x;
894
894
  return (x = F(t.transform)) != null ? x : !0;
895
- }), u = T(() => Ze(e.value)), p = T(() => Ze(n.value)), h = k(0), g = k(0), d = k(c.value), f = k(i.value), b = bt({}), _ = k(!1), v = T(() => {
895
+ }), u = T(() => Ze(e.value)), m = T(() => Ze(n.value)), h = k(0), g = k(0), d = k(c.value), f = k(i.value), b = bt({}), _ = k(!1), v = T(() => {
896
896
  const x = {
897
897
  position: d.value,
898
898
  left: "0",
899
899
  top: "0"
900
900
  };
901
- if (!p.value)
901
+ if (!m.value)
902
902
  return x;
903
- const M = et(p.value, h.value), D = et(p.value, g.value);
903
+ const M = et(m.value, h.value), D = et(m.value, g.value);
904
904
  return r.value ? {
905
905
  ...x,
906
906
  transform: "translate(" + M + "px, " + D + "px)",
907
- ...ft(p.value) >= 1.5 && {
907
+ ...ft(m.value) >= 1.5 && {
908
908
  willChange: "transform"
909
909
  }
910
910
  } : {
@@ -915,7 +915,7 @@ function Rn(e, n, t) {
915
915
  });
916
916
  let y;
917
917
  function E() {
918
- u.value == null || p.value == null || Cn(u.value, p.value, {
918
+ u.value == null || m.value == null || Cn(u.value, m.value, {
919
919
  middleware: s.value,
920
920
  placement: i.value,
921
921
  strategy: c.value
@@ -931,8 +931,8 @@ function Rn(e, n, t) {
931
931
  E();
932
932
  return;
933
933
  }
934
- if (u.value != null && p.value != null) {
935
- y = o(u.value, p.value, E);
934
+ if (u.value != null && m.value != null) {
935
+ y = o(u.value, m.value, E);
936
936
  return;
937
937
  }
938
938
  }
@@ -941,7 +941,7 @@ function Rn(e, n, t) {
941
941
  }
942
942
  return Q([s, i, c], E, {
943
943
  flush: "sync"
944
- }), Q([u, p], C, {
944
+ }), Q([u, m], C, {
945
945
  flush: "sync"
946
946
  }), Q(l, O, {
947
947
  flush: "sync"
@@ -956,7 +956,7 @@ function Rn(e, n, t) {
956
956
  update: E
957
957
  };
958
958
  }
959
- const On = (e) => (Mt("data-v-487a637d"), e = e(), Dt(), e), kn = ["id", "aria-errormessage", "aria-invalid", "disabled", "multiple", "name"], Tn = ["selected", "value"], Bn = /* @__PURE__ */ On(() => /* @__PURE__ */ z("option", { value: "" }, null, -1)), An = ["aria-controls", "aria-expanded", "aria-label", "aria-disabled", "onKeyup"], Ln = ["id"], Mn = ["onKeypress", "onMousedown"], Dn = {
959
+ const On = (e) => (Mt("data-v-47027100"), e = e(), Dt(), e), kn = ["id", "aria-errormessage", "aria-invalid", "disabled", "multiple", "name"], Tn = ["selected", "value"], Bn = /* @__PURE__ */ On(() => /* @__PURE__ */ z("option", { value: "" }, null, -1)), An = ["aria-controls", "aria-expanded", "aria-label", "aria-disabled", "onKeyup"], Ln = ["id"], Mn = ["onKeypress", "onMousedown"], Dn = {
960
960
  key: 0,
961
961
  class: "stash-select__total"
962
962
  }, Fn = {
@@ -1009,15 +1009,15 @@ const On = (e) => (Mt("data-v-487a637d"), e = e(), Dt(), e), kn = ["id", "aria-e
1009
1009
  },
1010
1010
  emits: ["update:model-value", "clear", "add", "remove", "opened", "closed"],
1011
1011
  setup(e, { emit: n }) {
1012
- const t = e, o = 6, l = 300, s = St(), i = Ct(), c = k(null), r = k(null), u = k(null), p = k(null), h = k(null), g = k(0), d = k(0), f = k([]), b = k(() => []), _ = k(""), v = k(-1), y = k(!1), E = k({}), R = k(!1), { floatingStyles: C } = Rn(c, u, {
1012
+ const t = e, o = 6, l = 300, s = St(), i = Ct(), c = k(null), r = k(null), u = k(null), m = k(null), h = k(null), g = k(0), d = k(0), f = k([]), b = k(() => []), _ = k(""), v = k(-1), y = k(!1), E = k({}), R = k(!1), { floatingStyles: C } = Rn(c, u, {
1013
1013
  whileElementsMounted: Sn,
1014
1014
  placement: t.menuPlacement,
1015
1015
  middleware: [
1016
1016
  nn(),
1017
1017
  ln(({ rects: a }) => t.menuPlacement.includes("bottom") && g.value > d.value ? g.value - a.reference.height + o : o),
1018
1018
  sn({
1019
- apply({ availableHeight: a, elements: m, rects: S }) {
1020
- t.enableTeleport && Object.assign(m.floating.style, {
1019
+ apply({ availableHeight: a, elements: p, rects: S }) {
1020
+ t.enableTeleport && Object.assign(p.floating.style, {
1021
1021
  maxWidth: `${S.reference.width}px`,
1022
1022
  maxHeight: `${Math.min(a, l)}px`
1023
1023
  });
@@ -1026,16 +1026,16 @@ const On = (e) => (Mt("data-v-487a637d"), e = e(), Dt(), e), kn = ["id", "aria-e
1026
1026
  ]
1027
1027
  }), O = T(() => !t.hideSearch && t.searchable !== "false" && t.searchable !== !1), x = T(() => {
1028
1028
  let a = (R.value && t.lazy ? t.lazy() : t.options).filter(Boolean);
1029
- return Nt(a[0]) || (a = a.map((m, S) => ({ name: m, id: S }))), a;
1029
+ return Nt(a[0]) || (a = a.map((p, S) => ({ name: p, id: S }))), a;
1030
1030
  }), M = T(() => t.searchLoading || Object.keys(E.value).length > 0), D = T(() => t.disableFiltering || !(_.value || "").trim() ? x.value : b.value(_.value)), xe = T(() => g.value <= d.value), _e = T(
1031
1031
  () => !y.value && !t.single && !xe.value && f.value.length
1032
1032
  ), K = T(() => [f.value.length, t.selectItemType, "selected"].filter(Boolean).join(" ")), Ee = T(() => t.preventEmpty || t.allowEmpty === "false" || t.allowEmpty === !1);
1033
- Q(_, (a, m) => m !== a && Ce(-1)), Q(f, () => ce(), { deep: !0 }), Q(
1033
+ Q(_, (a, p) => p !== a && Ce(-1)), Q(f, () => ce(), { deep: !0 }), Q(
1034
1034
  () => t.modelValue,
1035
1035
  (a) => {
1036
1036
  if (Array.isArray(a)) {
1037
- const m = a.filter(Boolean);
1038
- qe(m, f.value) || (f.value = m);
1037
+ const p = a.filter(Boolean);
1038
+ qe(p, f.value) || (f.value = p);
1039
1039
  return;
1040
1040
  }
1041
1041
  if (!It(a)) {
@@ -1053,7 +1053,7 @@ const On = (e) => (Mt("data-v-487a637d"), e = e(), Dt(), e), kn = ["id", "aria-e
1053
1053
  fieldNames: t.searchBy.length ? t.searchBy : [t.displayBy],
1054
1054
  trackBy: t.trackBy
1055
1055
  });
1056
- b.value = (m) => a(m, { fuzzy: t.useFuzzySearch });
1056
+ b.value = (p) => a(p, { fuzzy: t.useFuzzySearch });
1057
1057
  },
1058
1058
  { immediate: !0 }
1059
1059
  );
@@ -1070,13 +1070,13 @@ const On = (e) => (Mt("data-v-487a637d"), e = e(), Dt(), e), kn = ["id", "aria-e
1070
1070
  $(S);
1071
1071
  return;
1072
1072
  }
1073
- const m = [...a.target.selectedOptions];
1073
+ const p = [...a.target.selectedOptions];
1074
1074
  for (const S of [...f.value])
1075
- m.find((L) => {
1075
+ p.find((L) => {
1076
1076
  var w;
1077
1077
  return L.value === ((w = S[t.trackBy]) == null ? void 0 : w.toString());
1078
1078
  }) || H(S);
1079
- for (const S of m) {
1079
+ for (const S of p) {
1080
1080
  const A = x.value.find(
1081
1081
  (L) => {
1082
1082
  var w;
@@ -1088,12 +1088,12 @@ const On = (e) => (Mt("data-v-487a637d"), e = e(), Dt(), e), kn = ["id", "aria-e
1088
1088
  }, H = (a) => {
1089
1089
  if (t.disabled || Ee.value && f.value.length === 1)
1090
1090
  return;
1091
- const m = f.value.findIndex((S) => S[t.trackBy] === a[t.trackBy]);
1092
- if (m === -1) {
1091
+ const p = f.value.findIndex((S) => S[t.trackBy] === a[t.trackBy]);
1092
+ if (p === -1) {
1093
1093
  Ft.warn("ll-select: could not find option to remove", a);
1094
1094
  return;
1095
1095
  }
1096
- f.value.splice(m, 1), n("update:model-value", t.single ? f.value[0] : f.value), n("remove", a, m);
1096
+ f.value.splice(p, 1), n("update:model-value", t.single ? f.value[0] : f.value), n("remove", a, p);
1097
1097
  }, Se = () => {
1098
1098
  y.value || (ce(), y.value = !0, n("opened"), O.value && Ne(() => {
1099
1099
  var a;
@@ -1113,7 +1113,7 @@ const On = (e) => (Mt("data-v-487a637d"), e = e(), Dt(), e), kn = ["id", "aria-e
1113
1113
  }
1114
1114
  }, Ce = (a) => {
1115
1115
  v.value = a;
1116
- }, pt = (a) => {
1116
+ }, mt = (a) => {
1117
1117
  if (a.keyCode === ie.ESCAPE)
1118
1118
  te();
1119
1119
  else if (a.keyCode === ie.DOWN && v.value < D.value.length - 1)
@@ -1126,8 +1126,8 @@ const On = (e) => (Mt("data-v-487a637d"), e = e(), Dt(), e), kn = ["id", "aria-e
1126
1126
  return;
1127
1127
  a.preventDefault(), dt(a);
1128
1128
  }, Ke = Pt(function() {
1129
- mt();
1130
- }, Ht.FAST), mt = async function() {
1129
+ pt();
1130
+ }, Ht.FAST), pt = async function() {
1131
1131
  if (!t.onSearch)
1132
1132
  return;
1133
1133
  const a = Vt("search-request-");
@@ -1136,38 +1136,38 @@ const On = (e) => (Mt("data-v-487a637d"), e = e(), Dt(), e), kn = ["id", "aria-e
1136
1136
  } finally {
1137
1137
  delete E.value[a];
1138
1138
  }
1139
- }, ht = (a, m) => [
1139
+ }, ht = (a, p) => [
1140
1140
  {
1141
1141
  "stash-select__option": !0,
1142
1142
  "stash-select__option--disabled": a && typeof a == "object" && "disabled" in a && (a == null ? void 0 : a.disabled),
1143
- "stash-select__option--highlighted": v.value === m,
1143
+ "stash-select__option--highlighted": v.value === p,
1144
1144
  "stash-select__option--selected": ne(a)
1145
1145
  },
1146
1146
  // @deprecated
1147
1147
  {
1148
- "tw-bg-ice-200": v.value === m,
1148
+ "tw-bg-ice-200": v.value === p,
1149
1149
  "tw-bg-blue-100 tw-text-ice-700": ne(a)
1150
1150
  }
1151
- ], ne = (a) => a == null ? !1 : f.value.some((m) => (m == null ? void 0 : m[t.trackBy]) === a[t.trackBy]);
1151
+ ], ne = (a) => a == null ? !1 : f.value.some((p) => (p == null ? void 0 : p[t.trackBy]) === a[t.trackBy]);
1152
1152
  function Ue(a) {
1153
1153
  var A, L;
1154
1154
  if (!a)
1155
1155
  return !1;
1156
- const m = (A = r.value) == null ? void 0 : A.contains(a), S = (L = u.value) == null ? void 0 : L.contains(a);
1157
- return m || S;
1156
+ const p = (A = r.value) == null ? void 0 : A.contains(a), S = (L = u.value) == null ? void 0 : L.contains(a);
1157
+ return p || S;
1158
1158
  }
1159
1159
  function vt(a) {
1160
- const m = a.relatedTarget;
1161
- !Ue(m) && m && te();
1160
+ const p = a.relatedTarget;
1161
+ !Ue(p) && p && te();
1162
1162
  }
1163
1163
  function gt(a) {
1164
- const m = a.target;
1165
- Ue(m) || te();
1164
+ const p = a.target;
1165
+ Ue(p) || te();
1166
1166
  }
1167
1167
  const yt = () => {
1168
1168
  Ce(-1);
1169
1169
  }, ce = async () => {
1170
- await Ne(), p.value && r.value && (d.value = d.value === 0 ? r.value.clientHeight : d.value, g.value = p.value.clientHeight);
1170
+ await Ne(), m.value && r.value && (d.value = d.value === 0 ? r.value.clientHeight : d.value, g.value = m.value.clientHeight);
1171
1171
  };
1172
1172
  return Rt(() => {
1173
1173
  if (s.onInput)
@@ -1175,7 +1175,7 @@ const On = (e) => (Mt("data-v-487a637d"), e = e(), Dt(), e), kn = ["id", "aria-e
1175
1175
  window.addEventListener("resize", ce), ce();
1176
1176
  }), Ot(() => {
1177
1177
  window.removeEventListener("resize", ce);
1178
- }), (a, m) => (B(), Re(Kt, {
1178
+ }), (a, p) => (B(), Re(Kt, {
1179
1179
  id: t.id,
1180
1180
  class: ue(["input ll-select stash-select", F(s).class]),
1181
1181
  "data-test": "stash-select",
@@ -1226,7 +1226,7 @@ const On = (e) => (Mt("data-v-487a637d"), e = e(), Dt(), e), kn = ["id", "aria-e
1226
1226
  "aria-expanded": y.value,
1227
1227
  "aria-label": t.placeholder,
1228
1228
  "aria-disabled": t.disabled || void 0,
1229
- onKeydown: pt,
1229
+ onKeydown: mt,
1230
1230
  onKeyup: je(te, ["esc"])
1231
1231
  }, [
1232
1232
  z("div", {
@@ -1236,17 +1236,17 @@ const On = (e) => (Mt("data-v-487a637d"), e = e(), Dt(), e), kn = ["id", "aria-e
1236
1236
  class: "input-field stash-select__content",
1237
1237
  tabindex: "0",
1238
1238
  onFocusin: Se,
1239
- onFocusinOnce: m[4] || (m[4] = (w) => R.value = !0),
1239
+ onFocusinOnce: p[4] || (p[4] = (w) => R.value = !0),
1240
1240
  onFocusout: vt,
1241
1241
  onKeydown: Se,
1242
1242
  onMouseleave: yt
1243
1243
  }, [
1244
1244
  z("ul", {
1245
1245
  ref_key: "chipsRef",
1246
- ref: p,
1247
- class: "stash-select__chips tw-pr-9"
1246
+ ref: m,
1247
+ class: "stash-select__chips"
1248
1248
  }, [
1249
- f.value.length ? pe("", !0) : (B(), I("li", {
1249
+ f.value.length ? me("", !0) : (B(), I("li", {
1250
1250
  key: 0,
1251
1251
  class: ue(["stash-select__placeholder tw-mr-0 tw-pl-1.5", { "tw-truncate": !t.noTruncate }])
1252
1252
  }, le(t.placeholder), 3)),
@@ -1255,7 +1255,7 @@ const On = (e) => (Mt("data-v-487a637d"), e = e(), Dt(), e), kn = ["id", "aria-e
1255
1255
  class: ue(["stash-select__selected tw-mr-0 tw-pl-1.5", { "tw-truncate": !t.noTruncate }])
1256
1256
  }, [
1257
1257
  Te(a.$slots, "selected", { option: w }, () => [
1258
- me(le(w[t.displayBy] || w) + " ", 1),
1258
+ pe(le(w[t.displayBy] || w) + " ", 1),
1259
1259
  z("button", {
1260
1260
  tabindex: "-1",
1261
1261
  class: "stash-select__remove",
@@ -1281,7 +1281,7 @@ const On = (e) => (Mt("data-v-487a637d"), e = e(), Dt(), e), kn = ["id", "aria-e
1281
1281
  onRemove: (J) => H(w)
1282
1282
  }, {
1283
1283
  default: fe(() => [
1284
- me(le(w[t.displayBy] || w), 1)
1284
+ pe(le(w[t.displayBy] || w), 1)
1285
1285
  ]),
1286
1286
  _: 2
1287
1287
  }, 1032, ["onRemove"])
@@ -1296,18 +1296,18 @@ const On = (e) => (Mt("data-v-487a637d"), e = e(), Dt(), e), kn = ["id", "aria-e
1296
1296
  onRemove: G
1297
1297
  }, {
1298
1298
  default: fe(() => [
1299
- me(le(K.value), 1)
1299
+ pe(le(K.value), 1)
1300
1300
  ]),
1301
1301
  _: 1
1302
1302
  })
1303
- ])) : pe("", !0),
1303
+ ])) : me("", !0),
1304
1304
  t.icon ? (B(), Re(ve, {
1305
1305
  key: 1,
1306
1306
  class: "stash-select__icon",
1307
1307
  "data-test": "stash-select|toggle-icon",
1308
1308
  name: t.icon,
1309
- onMousedown: m[0] || (m[0] = he((w) => y.value && te(), ["prevent"]))
1310
- }, null, 8, ["name"])) : pe("", !0),
1309
+ onMousedown: p[0] || (p[0] = he((w) => y.value && te(), ["prevent"]))
1310
+ }, null, 8, ["name"])) : me("", !0),
1311
1311
  (B(), Re(Tt, {
1312
1312
  to: t.teleportTo,
1313
1313
  disabled: !t.enableTeleport
@@ -1319,21 +1319,21 @@ const On = (e) => (Mt("data-v-487a637d"), e = e(), Dt(), e), kn = ["id", "aria-e
1319
1319
  ref: u,
1320
1320
  class: "stash-select__border-selector tw-w-full tw-shadow",
1321
1321
  style: At(F(C)),
1322
- onClick: m[3] || (m[3] = he(() => {
1322
+ onClick: p[3] || (p[3] = he(() => {
1323
1323
  }, ["stop"]))
1324
1324
  }, [
1325
1325
  O.value ? (B(), I("div", Fn, [
1326
1326
  de(z("input", {
1327
1327
  ref_key: "searchRef",
1328
1328
  ref: h,
1329
- "onUpdate:modelValue": m[1] || (m[1] = (w) => _.value = w),
1329
+ "onUpdate:modelValue": p[1] || (p[1] = (w) => _.value = w),
1330
1330
  type: "text",
1331
1331
  autocomplete: "off",
1332
1332
  class: "stash-select__search",
1333
1333
  "data-test": F(s)["data-test"] ? F(s)["data-test"] + "-search" : "stash-select|search",
1334
1334
  placeholder: t.searchPlaceholder,
1335
1335
  spellcheck: !1,
1336
- onInput: m[2] || (m[2] = //@ts-ignore
1336
+ onInput: p[2] || (p[2] = //@ts-ignore
1337
1337
  (...w) => F(Ke) && F(Ke)(...w))
1338
1338
  }, null, 40, Pn), [
1339
1339
  [Lt, _.value]
@@ -1342,7 +1342,7 @@ const On = (e) => (Mt("data-v-487a637d"), e = e(), Dt(), e), kn = ["id", "aria-e
1342
1342
  name: "search",
1343
1343
  class: "tw-text-ice-500"
1344
1344
  })
1345
- ])) : pe("", !0),
1345
+ ])) : me("", !0),
1346
1346
  z("ul", In, [
1347
1347
  (B(!0), I(Oe, null, ke(D.value, (w, J) => (B(), I("li", {
1348
1348
  key: `option-${w[t.trackBy]}`,
@@ -1352,13 +1352,13 @@ const On = (e) => (Mt("data-v-487a637d"), e = e(), Dt(), e), kn = ["id", "aria-e
1352
1352
  onMouseenter: he((wt) => Ce(J), ["self"])
1353
1353
  }, [
1354
1354
  Te(a.$slots, "option", { option: w }, () => [
1355
- me(le(w[t.displayBy] || w), 1)
1355
+ pe(le(w[t.displayBy] || w), 1)
1356
1356
  ], !0),
1357
1357
  ne(w) && !t.hideCheck ? (B(), Re(ve, {
1358
1358
  key: 0,
1359
1359
  class: "tw-ml-auto tw-text-blue-500",
1360
1360
  name: "check"
1361
- })) : pe("", !0)
1361
+ })) : me("", !0)
1362
1362
  ], 42, Nn))), 128)),
1363
1363
  de(z("li", Vn, [
1364
1364
  se(ve, {
@@ -1371,7 +1371,7 @@ const On = (e) => (Mt("data-v-487a637d"), e = e(), Dt(), e), kn = ["id", "aria-e
1371
1371
  ]),
1372
1372
  de(z("li", $n, [
1373
1373
  Te(a.$slots, "no-options", {}, () => [
1374
- me(" No options ")
1374
+ pe(" No options ")
1375
1375
  ], !0)
1376
1376
  ], 512), [
1377
1377
  [Ve, !t.loading && !M.value && !D.value.length]
@@ -1401,7 +1401,7 @@ const On = (e) => (Mt("data-v-487a637d"), e = e(), Dt(), e), kn = ["id", "aria-e
1401
1401
  ]), 1032, ["id", "add-bottom-space", "class", "error-text", "hint-text", "label", "show-optional-in-label"]));
1402
1402
  }
1403
1403
  });
1404
- const ho = /* @__PURE__ */ Ut(Hn, [["__scopeId", "data-v-487a637d"]]);
1404
+ const ho = /* @__PURE__ */ Ut(Hn, [["__scopeId", "data-v-47027100"]]);
1405
1405
  export {
1406
1406
  ho as default
1407
1407
  };