@ddict/bubble 1.3.0 → 1.3.2

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/bubble.es.js CHANGED
@@ -1,5 +1,5 @@
1
- import { computed as _, ref as R, shallowRef as ct, watch as se, getCurrentScope as ut, onScopeDispose as dt, shallowReadonly as oe, unref as ve, createElementBlock as b, openBlock as g, createStaticVNode as ke, createElementVNode as y, createVNode as K, toDisplayString as de, Fragment as me, renderList as ye, createCommentVNode as N, onUnmounted as Re, normalizeClass as k, createBlock as V, createTextVNode as ft, normalizeStyle as Ye, onMounted as Ge, nextTick as De } from "vue";
2
- const j = Math.min, F = Math.max, be = Math.round, pe = Math.floor, X = (e) => ({
1
+ import { computed as _, ref as R, shallowRef as ct, watch as se, getCurrentScope as ut, onScopeDispose as dt, shallowReadonly as oe, unref as ve, createElementBlock as b, openBlock as g, createStaticVNode as Re, createElementVNode as y, createVNode as K, toDisplayString as de, Fragment as me, renderList as ye, createCommentVNode as N, onUnmounted as Me, normalizeClass as k, createBlock as V, createTextVNode as ft, normalizeStyle as $e, onMounted as Ge, nextTick as _e } from "vue";
2
+ const j = Math.min, O = Math.max, be = Math.round, pe = Math.floor, X = (e) => ({
3
3
  x: e,
4
4
  y: e
5
5
  }), mt = {
@@ -11,8 +11,8 @@ const j = Math.min, F = Math.max, be = Math.round, pe = Math.floor, X = (e) => (
11
11
  start: "end",
12
12
  end: "start"
13
13
  };
14
- function _e(e, t, n) {
15
- return F(e, j(t, n));
14
+ function Ve(e, t, n) {
15
+ return O(e, j(t, n));
16
16
  }
17
17
  function he(e, t) {
18
18
  return typeof e == "function" ? e(t) : e;
@@ -43,9 +43,9 @@ function gt(e, t, n) {
43
43
  }
44
44
  function Ct(e) {
45
45
  const t = we(e);
46
- return [$e(e), t, $e(t)];
46
+ return [ke(e), t, ke(t)];
47
47
  }
48
- function $e(e) {
48
+ function ke(e) {
49
49
  return e.replace(/start|end/g, (t) => ht[t]);
50
50
  }
51
51
  function pt(e, t, n) {
@@ -64,7 +64,7 @@ function pt(e, t, n) {
64
64
  function vt(e, t, n, o) {
65
65
  const i = ge(e);
66
66
  let s = pt(Y(e), n === "start", o);
67
- return i && (s = s.map((l) => l + "-" + i), t && (s = s.concat(s.map($e)))), s;
67
+ return i && (s = s.map((l) => l + "-" + i), t && (s = s.concat(s.map(ke)))), s;
68
68
  }
69
69
  function we(e) {
70
70
  return e.replace(/left|right|bottom|top/g, (t) => mt[t]);
@@ -104,7 +104,7 @@ function xe(e) {
104
104
  y: n
105
105
  };
106
106
  }
107
- function Ve(e, t, n) {
107
+ function Ne(e, t, n) {
108
108
  let {
109
109
  reference: o,
110
110
  floating: i
@@ -166,16 +166,16 @@ const xt = async (e, t, n) => {
166
166
  }), {
167
167
  x: u,
168
168
  y: d
169
- } = Ve(c, o, a), h = o, f = {}, m = 0;
170
- for (let p = 0; p < r.length; p++) {
169
+ } = Ne(c, o, a), h = o, f = {}, m = 0;
170
+ for (let v = 0; v < r.length; v++) {
171
171
  const {
172
172
  name: x,
173
173
  fn: w
174
- } = r[p], {
174
+ } = r[v], {
175
175
  x: L,
176
176
  y: T,
177
177
  data: $,
178
- reset: A
178
+ reset: E
179
179
  } = await w({
180
180
  x: u,
181
181
  y: d,
@@ -196,14 +196,14 @@ const xt = async (e, t, n) => {
196
196
  ...f[x],
197
197
  ...$
198
198
  }
199
- }, A && m <= 50 && (m++, typeof A == "object" && (A.placement && (h = A.placement), A.rects && (c = A.rects === !0 ? await l.getElementRects({
199
+ }, E && m <= 50 && (m++, typeof E == "object" && (E.placement && (h = E.placement), E.rects && (c = E.rects === !0 ? await l.getElementRects({
200
200
  reference: e,
201
201
  floating: t,
202
202
  strategy: i
203
- }) : A.rects), {
203
+ }) : E.rects), {
204
204
  x: u,
205
205
  y: d
206
- } = Ve(c, h, a)), p = -1);
206
+ } = Ne(c, h, a)), v = -1);
207
207
  }
208
208
  return {
209
209
  x: u,
@@ -213,7 +213,7 @@ const xt = async (e, t, n) => {
213
213
  middlewareData: f
214
214
  };
215
215
  };
216
- async function Me(e, t) {
216
+ async function Be(e, t) {
217
217
  var n;
218
218
  t === void 0 && (t = {});
219
219
  const {
@@ -245,17 +245,17 @@ async function Me(e, t) {
245
245
  } : {
246
246
  x: 1,
247
247
  y: 1
248
- }, A = xe(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
248
+ }, E = xe(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
249
249
  elements: r,
250
250
  rect: L,
251
251
  offsetParent: T,
252
252
  strategy: a
253
253
  }) : L);
254
254
  return {
255
- top: (w.top - A.top + m.top) / $.y,
256
- bottom: (A.bottom - w.bottom + m.bottom) / $.y,
257
- left: (w.left - A.left + m.left) / $.x,
258
- right: (A.right - w.right + m.right) / $.x
255
+ top: (w.top - E.top + m.top) / $.y,
256
+ bottom: (E.bottom - w.bottom + m.bottom) / $.y,
257
+ left: (w.left - E.left + m.left) / $.x,
258
+ right: (E.right - w.right + m.right) / $.x
259
259
  };
260
260
  }
261
261
  const yt = function(e) {
@@ -277,29 +277,29 @@ const yt = function(e) {
277
277
  fallbackPlacements: h,
278
278
  fallbackStrategy: f = "bestFit",
279
279
  fallbackAxisSideDirection: m = "none",
280
- flipAlignment: p = !0,
280
+ flipAlignment: v = !0,
281
281
  ...x
282
282
  } = he(e, t);
283
283
  if ((n = s.arrow) != null && n.alignmentOffset)
284
284
  return {};
285
- const w = Y(i), L = J(r), T = Y(r) === r, $ = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), A = h || (T || !p ? [we(r)] : Ct(r)), M = m !== "none";
286
- !h && M && A.push(...vt(r, p, m, $));
287
- const S = [r, ...A], I = await Me(t, x), B = [];
285
+ const w = Y(i), L = J(r), T = Y(r) === r, $ = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), E = h || (T || !v ? [we(r)] : Ct(r)), M = m !== "none";
286
+ !h && M && E.push(...vt(r, v, m, $));
287
+ const S = [r, ...E], I = await Be(t, x), B = [];
288
288
  let D = ((o = s.flip) == null ? void 0 : o.overflows) || [];
289
289
  if (u && B.push(I[w]), d) {
290
- const E = gt(i, l, $);
291
- B.push(I[E[0]], I[E[1]]);
290
+ const A = gt(i, l, $);
291
+ B.push(I[A[0]], I[A[1]]);
292
292
  }
293
293
  if (D = [...D, {
294
294
  placement: i,
295
295
  overflows: B
296
- }], !B.every((E) => E <= 0)) {
296
+ }], !B.every((A) => A <= 0)) {
297
297
  var q, C;
298
- const E = (((q = s.flip) == null ? void 0 : q.index) || 0) + 1, Se = S[E];
298
+ const A = (((q = s.flip) == null ? void 0 : q.index) || 0) + 1, Se = S[A];
299
299
  if (Se)
300
300
  return {
301
301
  data: {
302
- index: E,
302
+ index: A,
303
303
  overflows: D
304
304
  },
305
305
  reset: {
@@ -310,8 +310,8 @@ const yt = function(e) {
310
310
  if (!re)
311
311
  switch (f) {
312
312
  case "bestFit": {
313
- var v;
314
- const ne = (v = D.filter((Z) => {
313
+ var p;
314
+ const ne = (p = D.filter((Z) => {
315
315
  if (M) {
316
316
  const U = J(Z.placement);
317
317
  return U === L || // Create a bias to the `y` side axis due to horizontal
@@ -319,7 +319,7 @@ const yt = function(e) {
319
319
  U === "y";
320
320
  }
321
321
  return !0;
322
- }).map((Z) => [Z.placement, Z.overflows.filter((U) => U > 0).reduce((U, rt) => U + rt, 0)]).sort((Z, U) => Z[1] - U[1])[0]) == null ? void 0 : v[0];
322
+ }).map((Z) => [Z.placement, Z.overflows.filter((U) => U > 0).reduce((U, rt) => U + rt, 0)]).sort((Z, U) => Z[1] - U[1])[0]) == null ? void 0 : p[0];
323
323
  ne && (re = ne);
324
324
  break;
325
325
  }
@@ -416,26 +416,26 @@ const Tt = function(e) {
416
416
  } = he(e, t), c = {
417
417
  x: n,
418
418
  y: o
419
- }, u = await Me(t, a), d = J(Y(i)), h = qe(d);
419
+ }, u = await Be(t, a), d = J(Y(i)), h = qe(d);
420
420
  let f = c[h], m = c[d];
421
421
  if (s) {
422
422
  const x = h === "y" ? "top" : "left", w = h === "y" ? "bottom" : "right", L = f + u[x], T = f - u[w];
423
- f = _e(L, f, T);
423
+ f = Ve(L, f, T);
424
424
  }
425
425
  if (l) {
426
426
  const x = d === "y" ? "top" : "left", w = d === "y" ? "bottom" : "right", L = m + u[x], T = m - u[w];
427
- m = _e(L, m, T);
427
+ m = Ve(L, m, T);
428
428
  }
429
- const p = r.fn({
429
+ const v = r.fn({
430
430
  ...t,
431
431
  [h]: f,
432
432
  [d]: m
433
433
  });
434
434
  return {
435
- ...p,
435
+ ...v,
436
436
  data: {
437
- x: p.x - n,
438
- y: p.y - o
437
+ x: v.x - n,
438
+ y: v.y - o
439
439
  }
440
440
  };
441
441
  }
@@ -454,22 +454,22 @@ const Tt = function(e) {
454
454
  apply: l = () => {
455
455
  },
456
456
  ...r
457
- } = he(e, t), a = await Me(t, r), c = Y(n), u = ge(n), d = J(n) === "y", {
457
+ } = he(e, t), a = await Be(t, r), c = Y(n), u = ge(n), d = J(n) === "y", {
458
458
  width: h,
459
459
  height: f
460
460
  } = o.floating;
461
- let m, p;
462
- c === "top" || c === "bottom" ? (m = c, p = u === (await (i.isRTL == null ? void 0 : i.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (p = c, m = u === "end" ? "top" : "bottom");
463
- const x = f - a.top - a.bottom, w = h - a.left - a.right, L = j(f - a[m], x), T = j(h - a[p], w), $ = !t.middlewareData.shift;
464
- let A = L, M = T;
465
- if (d ? M = u || $ ? j(T, w) : w : A = u || $ ? j(L, x) : x, $ && !u) {
466
- const I = F(a.left, 0), B = F(a.right, 0), D = F(a.top, 0), q = F(a.bottom, 0);
467
- d ? M = h - 2 * (I !== 0 || B !== 0 ? I + B : F(a.left, a.right)) : A = f - 2 * (D !== 0 || q !== 0 ? D + q : F(a.top, a.bottom));
461
+ let m, v;
462
+ c === "top" || c === "bottom" ? (m = c, v = u === (await (i.isRTL == null ? void 0 : i.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (v = c, m = u === "end" ? "top" : "bottom");
463
+ const x = f - a.top - a.bottom, w = h - a.left - a.right, L = j(f - a[m], x), T = j(h - a[v], w), $ = !t.middlewareData.shift;
464
+ let E = L, M = T;
465
+ if (d ? M = u || $ ? j(T, w) : w : E = u || $ ? j(L, x) : x, $ && !u) {
466
+ const I = O(a.left, 0), B = O(a.right, 0), D = O(a.top, 0), q = O(a.bottom, 0);
467
+ d ? M = h - 2 * (I !== 0 || B !== 0 ? I + B : O(a.left, a.right)) : E = f - 2 * (D !== 0 || q !== 0 ? D + q : O(a.top, a.bottom));
468
468
  }
469
469
  await l({
470
470
  ...t,
471
471
  availableWidth: M,
472
- availableHeight: A
472
+ availableHeight: E
473
473
  });
474
474
  const S = await i.getDimensions(s.floating);
475
475
  return h !== S.width || f !== S.height ? {
@@ -481,27 +481,27 @@ const Tt = function(e) {
481
481
  };
482
482
  };
483
483
  function ee(e) {
484
- return Be(e) ? (e.nodeName || "").toLowerCase() : "#document";
484
+ return Ie(e) ? (e.nodeName || "").toLowerCase() : "#document";
485
485
  }
486
- function O(e) {
486
+ function F(e) {
487
487
  var t;
488
488
  return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
489
489
  }
490
490
  function z(e) {
491
491
  var t;
492
- return (t = (Be(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
492
+ return (t = (Ie(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
493
493
  }
494
- function Be(e) {
495
- return e instanceof Node || e instanceof O(e).Node;
494
+ function Ie(e) {
495
+ return e instanceof Node || e instanceof F(e).Node;
496
496
  }
497
497
  function H(e) {
498
- return e instanceof Element || e instanceof O(e).Element;
498
+ return e instanceof Element || e instanceof F(e).Element;
499
499
  }
500
500
  function W(e) {
501
- return e instanceof HTMLElement || e instanceof O(e).HTMLElement;
501
+ return e instanceof HTMLElement || e instanceof F(e).HTMLElement;
502
502
  }
503
- function Ne(e) {
504
- return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof O(e).ShadowRoot;
503
+ function Pe(e) {
504
+ return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof F(e).ShadowRoot;
505
505
  }
506
506
  function Ce(e) {
507
507
  const {
@@ -524,7 +524,7 @@ function Le(e) {
524
524
  }
525
525
  });
526
526
  }
527
- function Ie(e) {
527
+ function Oe(e) {
528
528
  const t = Fe(), n = P(e);
529
529
  return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((o) => (n.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (n.contain || "").includes(o));
530
530
  }
@@ -533,7 +533,7 @@ function $t(e) {
533
533
  for (; W(t) && !ae(t); ) {
534
534
  if (Le(t))
535
535
  return null;
536
- if (Ie(t))
536
+ if (Oe(t))
537
537
  return t;
538
538
  t = G(t);
539
539
  }
@@ -546,7 +546,7 @@ function ae(e) {
546
546
  return ["html", "body", "#document"].includes(ee(e));
547
547
  }
548
548
  function P(e) {
549
- return O(e).getComputedStyle(e);
549
+ return F(e).getComputedStyle(e);
550
550
  }
551
551
  function Te(e) {
552
552
  return H(e) ? {
@@ -564,10 +564,10 @@ function G(e) {
564
564
  // Step into the shadow DOM of the parent of a slotted node.
565
565
  e.assignedSlot || // DOM Element detected.
566
566
  e.parentNode || // ShadowRoot detected.
567
- Ne(e) && e.host || // Fallback.
567
+ Pe(e) && e.host || // Fallback.
568
568
  z(e)
569
569
  );
570
- return Ne(t) ? t.host : t;
570
+ return Pe(t) ? t.host : t;
571
571
  }
572
572
  function et(e) {
573
573
  const t = G(e);
@@ -576,7 +576,7 @@ function et(e) {
576
576
  function fe(e, t, n) {
577
577
  var o;
578
578
  t === void 0 && (t = []), n === void 0 && (n = !0);
579
- const i = et(e), s = i === ((o = e.ownerDocument) == null ? void 0 : o.body), l = O(i);
579
+ const i = et(e), s = i === ((o = e.ownerDocument) == null ? void 0 : o.body), l = F(i);
580
580
  return s ? t.concat(l, l.visualViewport || [], Ce(i) ? i : [], l.frameElement && n ? fe(l.frameElement) : []) : t.concat(i, fe(i, [], n));
581
581
  }
582
582
  function tt(e) {
@@ -589,11 +589,11 @@ function tt(e) {
589
589
  $: r
590
590
  };
591
591
  }
592
- function Oe(e) {
592
+ function De(e) {
593
593
  return H(e) ? e : e.contextElement;
594
594
  }
595
595
  function le(e) {
596
- const t = Oe(e);
596
+ const t = De(e);
597
597
  if (!W(t))
598
598
  return X(1);
599
599
  const n = t.getBoundingClientRect(), {
@@ -609,28 +609,28 @@ function le(e) {
609
609
  }
610
610
  const kt = /* @__PURE__ */ X(0);
611
611
  function nt(e) {
612
- const t = O(e);
612
+ const t = F(e);
613
613
  return !Fe() || !t.visualViewport ? kt : {
614
614
  x: t.visualViewport.offsetLeft,
615
615
  y: t.visualViewport.offsetTop
616
616
  };
617
617
  }
618
618
  function Rt(e, t, n) {
619
- return t === void 0 && (t = !1), !n || t && n !== O(e) ? !1 : t;
619
+ return t === void 0 && (t = !1), !n || t && n !== F(e) ? !1 : t;
620
620
  }
621
621
  function Q(e, t, n, o) {
622
622
  t === void 0 && (t = !1), n === void 0 && (n = !1);
623
- const i = e.getBoundingClientRect(), s = Oe(e);
623
+ const i = e.getBoundingClientRect(), s = De(e);
624
624
  let l = X(1);
625
625
  t && (o ? H(o) && (l = le(o)) : l = le(e));
626
626
  const r = Rt(s, n, o) ? nt(s) : X(0);
627
627
  let a = (i.left + r.x) / l.x, c = (i.top + r.y) / l.y, u = i.width / l.x, d = i.height / l.y;
628
628
  if (s) {
629
- const h = O(s), f = o && H(o) ? O(o) : o;
630
- let m = h, p = m.frameElement;
631
- for (; p && o && f !== m; ) {
632
- const x = le(p), w = p.getBoundingClientRect(), L = P(p), T = w.left + (p.clientLeft + parseFloat(L.paddingLeft)) * x.x, $ = w.top + (p.clientTop + parseFloat(L.paddingTop)) * x.y;
633
- a *= x.x, c *= x.y, u *= x.x, d *= x.y, a += T, c += $, m = O(p), p = m.frameElement;
629
+ const h = F(s), f = o && H(o) ? F(o) : o;
630
+ let m = h, v = m.frameElement;
631
+ for (; v && o && f !== m; ) {
632
+ const x = le(v), w = v.getBoundingClientRect(), L = P(v), T = w.left + (v.clientLeft + parseFloat(L.paddingLeft)) * x.x, $ = w.top + (v.clientTop + parseFloat(L.paddingTop)) * x.y;
633
+ a *= x.x, c *= x.y, u *= x.x, d *= x.y, a += T, c += $, m = F(v), v = m.frameElement;
634
634
  }
635
635
  }
636
636
  return xe({
@@ -673,18 +673,18 @@ function ot(e) {
673
673
  return Q(z(e)).left + Te(e).scrollLeft;
674
674
  }
675
675
  function It(e) {
676
- const t = z(e), n = Te(e), o = e.ownerDocument.body, i = F(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), s = F(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
676
+ const t = z(e), n = Te(e), o = e.ownerDocument.body, i = O(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), s = O(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
677
677
  let l = -n.scrollLeft + ot(e);
678
678
  const r = -n.scrollTop;
679
- return P(o).direction === "rtl" && (l += F(t.clientWidth, o.clientWidth) - i), {
679
+ return P(o).direction === "rtl" && (l += O(t.clientWidth, o.clientWidth) - i), {
680
680
  width: i,
681
681
  height: s,
682
682
  x: l,
683
683
  y: r
684
684
  };
685
685
  }
686
- function Ft(e, t) {
687
- const n = O(e), o = z(e), i = n.visualViewport;
686
+ function Ot(e, t) {
687
+ const n = F(e), o = z(e), i = n.visualViewport;
688
688
  let s = o.clientWidth, l = o.clientHeight, r = 0, a = 0;
689
689
  if (i) {
690
690
  s = i.width, l = i.height;
@@ -698,7 +698,7 @@ function Ft(e, t) {
698
698
  y: a
699
699
  };
700
700
  }
701
- function Ot(e, t) {
701
+ function Ft(e, t) {
702
702
  const n = Q(e, !0, t === "fixed"), o = n.top + e.clientTop, i = n.left + e.clientLeft, s = W(e) ? le(e) : X(1), l = e.clientWidth * s.x, r = e.clientHeight * s.y, a = i * s.x, c = o * s.y;
703
703
  return {
704
704
  width: l,
@@ -707,14 +707,14 @@ function Ot(e, t) {
707
707
  y: c
708
708
  };
709
709
  }
710
- function Pe(e, t, n) {
710
+ function He(e, t, n) {
711
711
  let o;
712
712
  if (t === "viewport")
713
- o = Ft(e, n);
713
+ o = Ot(e, n);
714
714
  else if (t === "document")
715
715
  o = It(z(e));
716
716
  else if (H(t))
717
- o = Ot(t, n);
717
+ o = Ft(t, n);
718
718
  else {
719
719
  const i = nt(e);
720
720
  o = {
@@ -737,7 +737,7 @@ function Dt(e, t) {
737
737
  const s = P(e).position === "fixed";
738
738
  let l = s ? G(e) : e;
739
739
  for (; H(l) && !ae(l); ) {
740
- const r = P(l), a = Ie(l);
740
+ const r = P(l), a = Oe(l);
741
741
  !a && r.position === "fixed" && (i = null), (s ? !a && !i : !a && r.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || Ce(l) && !a && it(e, l)) ? o = o.filter((u) => u !== l) : i = r, l = G(l);
742
742
  }
743
743
  return t.set(e, o), o;
@@ -750,9 +750,9 @@ function _t(e) {
750
750
  strategy: i
751
751
  } = e;
752
752
  const l = [...n === "clippingAncestors" ? Le(t) ? [] : Dt(t, this._c) : [].concat(n), o], r = l[0], a = l.reduce((c, u) => {
753
- const d = Pe(t, u, i);
754
- return c.top = F(d.top, c.top), c.right = j(d.right, c.right), c.bottom = j(d.bottom, c.bottom), c.left = F(d.left, c.left), c;
755
- }, Pe(t, r, i));
753
+ const d = He(t, u, i);
754
+ return c.top = O(d.top, c.top), c.right = j(d.right, c.right), c.bottom = j(d.bottom, c.bottom), c.left = O(d.left, c.left), c;
755
+ }, He(t, r, i));
756
756
  return {
757
757
  width: a.right - a.left,
758
758
  height: a.bottom - a.top,
@@ -793,11 +793,11 @@ function Nt(e, t, n) {
793
793
  function Ee(e) {
794
794
  return P(e).position === "static";
795
795
  }
796
- function He(e, t) {
796
+ function We(e, t) {
797
797
  return !W(e) || P(e).position === "fixed" ? null : t ? t(e) : e.offsetParent;
798
798
  }
799
799
  function st(e, t) {
800
- const n = O(e);
800
+ const n = F(e);
801
801
  if (Le(e))
802
802
  return n;
803
803
  if (!W(e)) {
@@ -809,10 +809,10 @@ function st(e, t) {
809
809
  }
810
810
  return n;
811
811
  }
812
- let o = He(e, t);
812
+ let o = We(e, t);
813
813
  for (; o && At(o) && Ee(o); )
814
- o = He(o, t);
815
- return o && ae(o) && Ee(o) && !Ie(o) ? n : o || $t(e) || n;
814
+ o = We(o, t);
815
+ return o && ae(o) && Ee(o) && !Oe(o) ? n : o || $t(e) || n;
816
816
  }
817
817
  const Pt = async function(e) {
818
818
  const t = this.getOffsetParent || st, n = this.getDimensions, o = await n(e.floating);
@@ -858,13 +858,13 @@ function zt(e, t) {
858
858
  } = e.getBoundingClientRect();
859
859
  if (r || t(), !d || !h)
860
860
  return;
861
- const f = pe(u), m = pe(i.clientWidth - (c + d)), p = pe(i.clientHeight - (u + h)), x = pe(c), L = {
862
- rootMargin: -f + "px " + -m + "px " + -p + "px " + -x + "px",
863
- threshold: F(0, j(1, a)) || 1
861
+ const f = pe(u), m = pe(i.clientWidth - (c + d)), v = pe(i.clientHeight - (u + h)), x = pe(c), L = {
862
+ rootMargin: -f + "px " + -m + "px " + -v + "px " + -x + "px",
863
+ threshold: O(0, j(1, a)) || 1
864
864
  };
865
865
  let T = !0;
866
- function $(A) {
867
- const M = A[0].intersectionRatio;
866
+ function $(E) {
867
+ const M = E[0].intersectionRatio;
868
868
  if (M !== a) {
869
869
  if (!T)
870
870
  return l();
@@ -895,7 +895,7 @@ function Zt(e, t, n, o) {
895
895
  elementResize: l = typeof ResizeObserver == "function",
896
896
  layoutShift: r = typeof IntersectionObserver == "function",
897
897
  animationFrame: a = !1
898
- } = o, c = Oe(e), u = i || s ? [...c ? fe(c) : [], ...fe(t)] : [];
898
+ } = o, c = De(e), u = i || s ? [...c ? fe(c) : [], ...fe(t)] : [];
899
899
  u.forEach((w) => {
900
900
  i && w.addEventListener("scroll", n, {
901
901
  passive: !0
@@ -910,11 +910,11 @@ function Zt(e, t, n, o) {
910
910
  (T = f) == null || T.observe(t);
911
911
  })), n();
912
912
  }), c && !a && f.observe(c), f.observe(t));
913
- let m, p = a ? Q(e) : null;
913
+ let m, v = a ? Q(e) : null;
914
914
  a && x();
915
915
  function x() {
916
916
  const w = Q(e);
917
- p && (w.x !== p.x || w.y !== p.y || w.width !== p.width || w.height !== p.height) && n(), p = w, m = requestAnimationFrame(x);
917
+ v && (w.x !== v.x || w.y !== v.y || w.width !== v.width || w.height !== v.height) && n(), v = w, m = requestAnimationFrame(x);
918
918
  }
919
919
  return n(), () => {
920
920
  var w;
@@ -939,10 +939,10 @@ const Ut = Tt, jt = St, Kt = yt, Xt = Et, Yt = (e, t, n) => {
939
939
  function Gt(e) {
940
940
  return e != null && typeof e == "object" && "$el" in e;
941
941
  }
942
- function We(e) {
942
+ function ze(e) {
943
943
  if (Gt(e)) {
944
944
  const t = e.$el;
945
- return Be(t) && ee(t) === "#comment" ? null : t;
945
+ return Ie(t) && ee(t) === "#comment" ? null : t;
946
946
  }
947
947
  return e;
948
948
  }
@@ -952,7 +952,7 @@ function ce(e) {
952
952
  function lt(e) {
953
953
  return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
954
954
  }
955
- function ze(e, t) {
955
+ function Ze(e, t) {
956
956
  const n = lt(e);
957
957
  return Math.round(t * n) / n;
958
958
  }
@@ -970,7 +970,7 @@ function qt(e, t, n) {
970
970
  }), a = _(() => {
971
971
  var S;
972
972
  return (S = ce(n.transform)) != null ? S : !0;
973
- }), c = _(() => We(e.value)), u = _(() => We(t.value)), d = R(0), h = R(0), f = R(r.value), m = R(l.value), p = ct({}), x = R(!1), w = _(() => {
973
+ }), c = _(() => ze(e.value)), u = _(() => ze(t.value)), d = R(0), h = R(0), f = R(r.value), m = R(l.value), v = ct({}), x = R(!1), w = _(() => {
974
974
  const S = {
975
975
  position: f.value,
976
976
  left: "0",
@@ -978,7 +978,7 @@ function qt(e, t, n) {
978
978
  };
979
979
  if (!u.value)
980
980
  return S;
981
- const I = ze(u.value, d.value), B = ze(u.value, h.value);
981
+ const I = Ze(u.value, d.value), B = Ze(u.value, h.value);
982
982
  return a.value ? {
983
983
  ...S,
984
984
  transform: "translate(" + I + "px, " + B + "px)",
@@ -998,13 +998,13 @@ function qt(e, t, n) {
998
998
  placement: l.value,
999
999
  strategy: r.value
1000
1000
  }).then((S) => {
1001
- d.value = S.x, h.value = S.y, f.value = S.strategy, m.value = S.placement, p.value = S.middlewareData, x.value = !0;
1001
+ d.value = S.x, h.value = S.y, f.value = S.strategy, m.value = S.placement, v.value = S.middlewareData, x.value = !0;
1002
1002
  });
1003
1003
  }
1004
1004
  function $() {
1005
1005
  typeof L == "function" && (L(), L = void 0);
1006
1006
  }
1007
- function A() {
1007
+ function E() {
1008
1008
  if ($(), o === void 0) {
1009
1009
  T();
1010
1010
  return;
@@ -1019,7 +1019,7 @@ function qt(e, t, n) {
1019
1019
  }
1020
1020
  return se([s, l, r], T, {
1021
1021
  flush: "sync"
1022
- }), se([c, u], A, {
1022
+ }), se([c, u], E, {
1023
1023
  flush: "sync"
1024
1024
  }), se(i, M, {
1025
1025
  flush: "sync"
@@ -1028,7 +1028,7 @@ function qt(e, t, n) {
1028
1028
  y: oe(h),
1029
1029
  strategy: oe(f),
1030
1030
  placement: oe(m),
1031
- middlewareData: oe(p),
1031
+ middlewareData: oe(v),
1032
1032
  isPositioned: oe(x),
1033
1033
  floatingStyles: w,
1034
1034
  update: T
@@ -1053,7 +1053,7 @@ const nn = /* @__PURE__ */ te(Qt, [["render", tn]]), on = {}, sn = {
1053
1053
  class: "w-12 h-12 text-primary",
1054
1054
  xmlns: "http://www.w3.org/2000/svg",
1055
1055
  viewBox: "0 0 24 24"
1056
- }, ln = /* @__PURE__ */ ke('<circle cx="18" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin=".67" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle><circle cx="12" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin=".33" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle><circle cx="6" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin="0" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle>', 3), an = [
1056
+ }, ln = /* @__PURE__ */ Re('<circle cx="18" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin=".67" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle><circle cx="12" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin=".33" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle><circle cx="6" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin="0" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle>', 3), an = [
1057
1057
  ln
1058
1058
  ];
1059
1059
  function rn(e, t) {
@@ -1147,7 +1147,7 @@ const pn = /* @__PURE__ */ te(mn, [["render", Cn]]), vn = { class: "flex flex-co
1147
1147
  fill: "currentColor"
1148
1148
  }, null, -1), In = [
1149
1149
  Bn
1150
- ], Fn = {
1150
+ ], On = {
1151
1151
  __name: "Player",
1152
1152
  props: {
1153
1153
  tts: {
@@ -1173,7 +1173,7 @@ const pn = /* @__PURE__ */ te(mn, [["render", Cn]]), vn = { class: "flex flex-co
1173
1173
  u();
1174
1174
  },
1175
1175
  { immediate: !0 }
1176
- ), Re(() => {
1176
+ ), Me(() => {
1177
1177
  h(), l.src = "", r.close();
1178
1178
  });
1179
1179
  function c() {
@@ -1197,8 +1197,8 @@ const pn = /* @__PURE__ */ te(mn, [["render", Cn]]), vn = { class: "flex flex-co
1197
1197
  }
1198
1198
  async function d() {
1199
1199
  try {
1200
- const m = await (await fetch(i.value)).arrayBuffer(), p = await r.decodeAudioData(m);
1201
- a = r.createBufferSource(), a.buffer = p, a.playbackRate.value = 0.7, a.connect(r.destination), a.start(), a.onended = () => {
1200
+ const m = await (await fetch(i.value)).arrayBuffer(), v = await r.decodeAudioData(m);
1201
+ a = r.createBufferSource(), a.buffer = v, a.playbackRate.value = 0.7, a.connect(r.destination), a.start(), a.onended = () => {
1202
1202
  s.value = !1, a = null;
1203
1203
  };
1204
1204
  } catch {
@@ -1240,7 +1240,7 @@ const pn = /* @__PURE__ */ te(mn, [["render", Cn]]), vn = { class: "flex flex-co
1240
1240
  }, Rn, 2))
1241
1241
  ], 10, $n));
1242
1242
  }
1243
- }, On = {
1243
+ }, Fn = {
1244
1244
  class: "bg-base-100 tooltip tooltip-top before:!bottom-[100%] before:!bg-base-100 before:!border before:!border-solid before:!border-base-300 before:!shadow-lg before:!rounded-md before:!text-base-content after:!border-transparent",
1245
1245
  "data-tip": "Favorite"
1246
1246
  }, Dn = ["disabled"], _n = /* @__PURE__ */ y("path", {
@@ -1260,7 +1260,7 @@ const pn = /* @__PURE__ */ te(mn, [["render", Cn]]), vn = { class: "flex flex-co
1260
1260
  disabled: Boolean
1261
1261
  },
1262
1262
  setup(e) {
1263
- return (t, n) => (g(), b("div", On, [
1263
+ return (t, n) => (g(), b("div", Fn, [
1264
1264
  y("button", {
1265
1265
  class: k(["btn btn-xs btn-circle", [
1266
1266
  { "btn-ghost": !e.disabled },
@@ -1288,7 +1288,7 @@ const pn = /* @__PURE__ */ te(mn, [["render", Cn]]), vn = { class: "flex flex-co
1288
1288
  class: "w-6 h-6 text-primary",
1289
1289
  xmlns: "http://www.w3.org/2000/svg",
1290
1290
  viewBox: "0 0 24 24"
1291
- }, Zn = /* @__PURE__ */ ke('<circle cx="18" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin=".67" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle><circle cx="12" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin=".33" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle><circle cx="6" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin="0" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle>', 3), Un = [
1291
+ }, Zn = /* @__PURE__ */ Re('<circle cx="18" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin=".67" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle><circle cx="12" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin=".33" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle><circle cx="6" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin="0" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle>', 3), Un = [
1292
1292
  Zn
1293
1293
  ];
1294
1294
  function jn(e, t) {
@@ -1310,7 +1310,7 @@ const at = /* @__PURE__ */ te(Wn, [["render", jn]]), Kn = {
1310
1310
  Yn,
1311
1311
  Gn,
1312
1312
  qn
1313
- ], Qn = /* @__PURE__ */ ke('<path d="M6.8544 3.20309C5.39975 2.89815 4.26277 1.76117 3.95787 0.30649C3.92042 0.12792 3.76292 0 3.58041 0C3.3979 0 3.2404 0.12792 3.20297 0.30652C2.89805 1.76117 1.76107 2.89812 0.306418 3.20302C0.127818 3.24045 -0.00012207 3.39798 -0.00012207 3.58046C-0.00012207 3.76295 0.127798 3.92047 0.306418 3.9579C1.76105 4.26285 2.89798 5.3998 3.2029 6.85448C3.24033 7.03307 3.39783 7.16102 3.58034 7.16102C3.76282 7.16102 3.92035 7.0331 3.95778 6.85448C4.26272 5.39983 5.39973 4.26287 6.85438 3.95799C7.03297 3.92056 7.16092 3.76306 7.16092 3.58056C7.1609 3.39805 7.03297 3.24052 6.8544 3.20309ZM3.58036 5.60938C3.14292 4.73132 2.42956 4.01792 1.55151 3.58049C2.42958 3.14305 3.14297 2.42968 3.58041 1.55161C4.01785 2.4297 4.73122 3.14307 5.60926 3.58053C4.73119 4.01797 4.0178 4.73132 3.58036 5.60938Z" fill="currentColor"></path><path d="M6.21683 9.574C5.53147 9.4303 4.99578 8.8947 4.85209 8.2093C4.81466 8.0307 4.65716 7.90271 4.47465 7.90271C4.29217 7.90271 4.13464 8.0306 4.09721 8.2092C3.95352 8.8946 3.4178 9.4303 2.73244 9.574C2.55385 9.6114 2.4259 9.7689 2.4259 9.9514C2.4259 10.1339 2.55383 10.2914 2.73244 10.3288C3.41778 10.4725 3.95349 11.0082 4.09716 11.6936C4.13459 11.8722 4.2921 12.0002 4.4746 12.0002C4.65709 12.0002 4.81461 11.8723 4.85204 11.6936C4.99574 11.0082 5.53145 10.4725 6.21683 10.3289C6.39543 10.2914 6.52337 10.1339 6.52337 9.9514C6.52337 9.7689 6.39545 9.6114 6.21683 9.574ZM4.47463 10.6408C4.29163 10.3688 4.05725 10.1345 3.78526 9.9515C4.0573 9.7684 4.29163 9.5341 4.47463 9.2621C4.65765 9.5341 4.892 9.7685 5.164 9.9515C4.892 10.1345 4.65763 10.3688 4.47463 10.6408Z" fill="currentColor"></path><path d="M11.4271 6.00324C10.5007 5.80904 9.7766 5.08496 9.5825 4.15859C9.545 3.98 9.3875 3.85205 9.205 3.85205C9.0225 3.85205 8.865 3.97995 8.8276 4.15857C8.6334 5.08496 7.90932 5.80902 6.98293 6.0032C6.80434 6.04063 6.67639 6.19815 6.67639 6.38064C6.67639 6.56312 6.80431 6.72062 6.98293 6.75807C7.9093 6.95228 8.6334 7.67633 8.8275 8.6027C8.865 8.7813 9.0225 8.9093 9.205 8.9093C9.3875 8.9093 9.545 8.7814 9.5824 8.6027C9.7766 7.67633 10.5007 6.95228 11.4271 6.75812C11.6057 6.72067 11.7336 6.56317 11.7336 6.38068C11.7336 6.1982 11.6057 6.04067 11.4271 6.00324ZM9.205 7.47681C8.9365 7.02634 8.5593 6.64914 8.1089 6.38066C8.5593 6.11218 8.9365 5.73502 9.205 5.28453C9.4735 5.73502 9.8507 6.11221 10.3012 6.38068C9.8507 6.64916 9.4735 7.02636 9.205 7.47681Z" fill="currentColor"></path><circle cx="3.5" cy="3.5" r="1.5" fill="currentColor"></circle><ellipse cx="4.5" cy="10" rx="0.5" ry="1" fill="currentColor"></ellipse><circle cx="9" cy="6" r="1" fill="currentColor"></circle>', 6), eo = [
1313
+ ], Qn = /* @__PURE__ */ Re('<path d="M6.8544 3.20309C5.39975 2.89815 4.26277 1.76117 3.95787 0.30649C3.92042 0.12792 3.76292 0 3.58041 0C3.3979 0 3.2404 0.12792 3.20297 0.30652C2.89805 1.76117 1.76107 2.89812 0.306418 3.20302C0.127818 3.24045 -0.00012207 3.39798 -0.00012207 3.58046C-0.00012207 3.76295 0.127798 3.92047 0.306418 3.9579C1.76105 4.26285 2.89798 5.3998 3.2029 6.85448C3.24033 7.03307 3.39783 7.16102 3.58034 7.16102C3.76282 7.16102 3.92035 7.0331 3.95778 6.85448C4.26272 5.39983 5.39973 4.26287 6.85438 3.95799C7.03297 3.92056 7.16092 3.76306 7.16092 3.58056C7.1609 3.39805 7.03297 3.24052 6.8544 3.20309ZM3.58036 5.60938C3.14292 4.73132 2.42956 4.01792 1.55151 3.58049C2.42958 3.14305 3.14297 2.42968 3.58041 1.55161C4.01785 2.4297 4.73122 3.14307 5.60926 3.58053C4.73119 4.01797 4.0178 4.73132 3.58036 5.60938Z" fill="currentColor"></path><path d="M6.21683 9.574C5.53147 9.4303 4.99578 8.8947 4.85209 8.2093C4.81466 8.0307 4.65716 7.90271 4.47465 7.90271C4.29217 7.90271 4.13464 8.0306 4.09721 8.2092C3.95352 8.8946 3.4178 9.4303 2.73244 9.574C2.55385 9.6114 2.4259 9.7689 2.4259 9.9514C2.4259 10.1339 2.55383 10.2914 2.73244 10.3288C3.41778 10.4725 3.95349 11.0082 4.09716 11.6936C4.13459 11.8722 4.2921 12.0002 4.4746 12.0002C4.65709 12.0002 4.81461 11.8723 4.85204 11.6936C4.99574 11.0082 5.53145 10.4725 6.21683 10.3289C6.39543 10.2914 6.52337 10.1339 6.52337 9.9514C6.52337 9.7689 6.39545 9.6114 6.21683 9.574ZM4.47463 10.6408C4.29163 10.3688 4.05725 10.1345 3.78526 9.9515C4.0573 9.7684 4.29163 9.5341 4.47463 9.2621C4.65765 9.5341 4.892 9.7685 5.164 9.9515C4.892 10.1345 4.65763 10.3688 4.47463 10.6408Z" fill="currentColor"></path><path d="M11.4271 6.00324C10.5007 5.80904 9.7766 5.08496 9.5825 4.15859C9.545 3.98 9.3875 3.85205 9.205 3.85205C9.0225 3.85205 8.865 3.97995 8.8276 4.15857C8.6334 5.08496 7.90932 5.80902 6.98293 6.0032C6.80434 6.04063 6.67639 6.19815 6.67639 6.38064C6.67639 6.56312 6.80431 6.72062 6.98293 6.75807C7.9093 6.95228 8.6334 7.67633 8.8275 8.6027C8.865 8.7813 9.0225 8.9093 9.205 8.9093C9.3875 8.9093 9.545 8.7814 9.5824 8.6027C9.7766 7.67633 10.5007 6.95228 11.4271 6.75812C11.6057 6.72067 11.7336 6.56317 11.7336 6.38068C11.7336 6.1982 11.6057 6.04067 11.4271 6.00324ZM9.205 7.47681C8.9365 7.02634 8.5593 6.64914 8.1089 6.38066C8.5593 6.11218 8.9365 5.73502 9.205 5.28453C9.4735 5.73502 9.8507 6.11221 10.3012 6.38068C9.8507 6.64916 9.4735 7.02636 9.205 7.47681Z" fill="currentColor"></path><circle cx="3.5" cy="3.5" r="1.5" fill="currentColor"></circle><ellipse cx="4.5" cy="10" rx="0.5" ry="1" fill="currentColor"></ellipse><circle cx="9" cy="6" r="1" fill="currentColor"></circle>', 6), eo = [
1314
1314
  Qn
1315
1315
  ], to = {
1316
1316
  __name: "AITranslateBtn",
@@ -1524,7 +1524,7 @@ function Ro(e, t, n, o, i, s) {
1524
1524
  y("span", ko, [
1525
1525
  y("span", {
1526
1526
  class: "w-3 h-3 rounded-full",
1527
- style: Ye({ backgroundColor: l.color })
1527
+ style: $e({ backgroundColor: l.color })
1528
1528
  }, null, 4),
1529
1529
  ft(" " + de(l.name), 1)
1530
1530
  ])
@@ -1533,7 +1533,7 @@ function Ro(e, t, n, o, i, s) {
1533
1533
  ])
1534
1534
  ]);
1535
1535
  }
1536
- const Mo = /* @__PURE__ */ te(Lo, [["render", Ro]]), Bo = { class: "flex flex-col" }, Io = { class: "flex p-2 pt-2 pb-1 flex-row justify-between" }, Fo = { class: "flex justify-start items-center" }, Oo = { class: "flex items-center gap-1" }, Do = /* @__PURE__ */ y("div", { class: "w-5" }, null, -1), _o = { class: "flex justify-end items-center" }, Ze = {
1536
+ const Mo = /* @__PURE__ */ te(Lo, [["render", Ro]]), Bo = { class: "flex flex-col" }, Io = { class: "flex p-2 pt-2 pb-1 flex-row justify-between" }, Oo = { class: "flex justify-start items-center" }, Fo = { class: "flex items-center gap-1" }, Do = /* @__PURE__ */ y("div", { class: "w-5" }, null, -1), _o = { class: "flex justify-end items-center" }, Ue = {
1537
1537
  __name: "Header",
1538
1538
  props: {
1539
1539
  tts: String,
@@ -1568,15 +1568,15 @@ const Mo = /* @__PURE__ */ te(Lo, [["render", Ro]]), Bo = { class: "flex flex-co
1568
1568
  const n = e, o = t;
1569
1569
  return (i, s) => (g(), b("div", Bo, [
1570
1570
  y("div", Io, [
1571
- y("div", Fo, [
1572
- e.isServiceUnavailable ? N("", !0) : (g(), V(Fn, {
1571
+ y("div", Oo, [
1572
+ e.isServiceUnavailable ? N("", !0) : (g(), V(On, {
1573
1573
  key: 0,
1574
1574
  disabled: e.isAITranslationLoading || e.isAIExplainLoading,
1575
1575
  tts: n.tts,
1576
1576
  onLoadTTS: s[0] || (s[0] = (l) => i.$emit("loadTTS"))
1577
1577
  }, null, 8, ["disabled", "tts"]))
1578
1578
  ]),
1579
- y("div", Oo, [
1579
+ y("div", Fo, [
1580
1580
  Do,
1581
1581
  !e.isServiceUnavailable && e.isAITranslateVisible ? (g(), V(to, {
1582
1582
  key: 0,
@@ -1619,7 +1619,7 @@ const Mo = /* @__PURE__ */ te(Lo, [["render", Ro]]), Bo = { class: "flex flex-co
1619
1619
  DATA: "DATA",
1620
1620
  ERROR: "ERROR",
1621
1621
  HIDDEN: "HIDDEN"
1622
- }, Ue = 500, Vo = ["ar", "fa", "iw", "yi", "ur", "pa"], No = {
1622
+ }, je = 500, Vo = ["ar", "fa", "iw", "yi", "ur", "pa"], No = {
1623
1623
  key: 0,
1624
1624
  class: "flex justify-center"
1625
1625
  }, Po = {
@@ -1714,7 +1714,7 @@ const Mo = /* @__PURE__ */ te(Lo, [["render", Ro]]), Bo = { class: "flex flex-co
1714
1714
  ])
1715
1715
  }, [
1716
1716
  y("div", Ho, [
1717
- t.isServiceUnavailable ? (g(), V(Ze, {
1717
+ t.isServiceUnavailable ? (g(), V(Ue, {
1718
1718
  key: 0,
1719
1719
  isServiceUnavailable: t.isServiceUnavailable,
1720
1720
  isLongSentence: !1,
@@ -1725,7 +1725,7 @@ const Mo = /* @__PURE__ */ te(Lo, [["render", Ro]]), Bo = { class: "flex flex-co
1725
1725
  onClose: n[3] || (n[3] = (m) => t.$emit("close")),
1726
1726
  onLoadTTS: n[4] || (n[4] = (m) => t.$emit("loadTTS")),
1727
1727
  onThemeChange: n[5] || (n[5] = (m) => t.$emit("themeChange", m))
1728
- }, null, 8, ["isServiceUnavailable", "theme", "showThemeSelector"])) : (g(), V(Ze, {
1728
+ }, null, 8, ["isServiceUnavailable", "theme", "showThemeSelector"])) : (g(), V(Ue, {
1729
1729
  key: 1,
1730
1730
  tts: e.tts,
1731
1731
  isFavorite: e.isFavorite,
@@ -1774,9 +1774,9 @@ const Mo = /* @__PURE__ */ te(Lo, [["render", Ro]]), Bo = { class: "flex flex-co
1774
1774
  function Uo(e) {
1775
1775
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1776
1776
  }
1777
- var Ae = { exports: {} }, je;
1777
+ var Ae = { exports: {} }, Ke;
1778
1778
  function jo() {
1779
- return je || (je = 1, function(e) {
1779
+ return Ke || (Ke = 1, function(e) {
1780
1780
  (function() {
1781
1781
  var t = [
1782
1782
  "direction",
@@ -1832,19 +1832,19 @@ function jo() {
1832
1832
  }), o ? s.scrollHeight > parseInt(h.height) && (d.overflowY = "scroll") : d.overflow = "hidden", u.textContent = s.value.substring(0, l), f && (u.textContent = u.textContent.replace(/\s/g, " "));
1833
1833
  var m = document.createElement("span");
1834
1834
  m.textContent = s.value.substring(l) || ".", u.appendChild(m);
1835
- var p = {
1835
+ var v = {
1836
1836
  top: m.offsetTop + parseInt(h.borderTopWidth),
1837
1837
  left: m.offsetLeft + parseInt(h.borderLeftWidth),
1838
1838
  height: parseInt(h.lineHeight)
1839
1839
  };
1840
- return a ? m.style.backgroundColor = "#aaa" : document.body.removeChild(u), p;
1840
+ return a ? m.style.backgroundColor = "#aaa" : document.body.removeChild(u), v;
1841
1841
  }
1842
1842
  e.exports = i;
1843
1843
  })();
1844
1844
  }(Ae)), Ae.exports;
1845
1845
  }
1846
1846
  var Ko = jo();
1847
- const Ke = /* @__PURE__ */ Uo(Ko);
1847
+ const Xe = /* @__PURE__ */ Uo(Ko);
1848
1848
  function ie(e) {
1849
1849
  const t = window.getSelection();
1850
1850
  let n = t + "";
@@ -1854,7 +1854,7 @@ function ie(e) {
1854
1854
  if (!l && !r) {
1855
1855
  if (!e.selectionEnd)
1856
1856
  return !1;
1857
- let u = Ke(e, e.selectionStart), d = Ke(e, e.selectionEnd);
1857
+ let u = Xe(e, e.selectionStart), d = Xe(e, e.selectionEnd);
1858
1858
  i = e.getBoundingClientRect(), r = i.left + u.left, a = d.left - u.left, u.top != d.top && (r = i.left, a = i.width), s = i.top + u.top, l = i.top + d.top + 20;
1859
1859
  }
1860
1860
  return c === 0 && (c = l - s), {
@@ -1885,7 +1885,7 @@ function Yo() {
1885
1885
  n && (t.parentNode.insertBefore(n, t), t.remove());
1886
1886
  }
1887
1887
  }
1888
- const Xe = {
1888
+ const Ye = {
1889
1889
  supportRTL: Xo,
1890
1890
  removeRTL: Yo
1891
1891
  }, Go = {
@@ -1921,7 +1921,7 @@ const Xe = {
1921
1921
  };
1922
1922
  return Ge(() => {
1923
1923
  window.addEventListener("dblclick", i), window.addEventListener("keydown", s), window.addEventListener("keyup", l);
1924
- }), Re(() => {
1924
+ }), Me(() => {
1925
1925
  window.removeEventListener("dblclick", i), window.removeEventListener("keydown", s), window.removeEventListener("keyup", l);
1926
1926
  }), (a, c) => (g(), b("div"));
1927
1927
  }
@@ -1968,24 +1968,24 @@ const Xe = {
1968
1968
  const n = e, o = t, i = R(null), s = R(null), l = R(!1), r = R(""), a = R(n.theme), c = R(!1), u = R({ x: 0, y: 0 }), d = R(null), h = R(!1), f = _(() => typeof window > "u" || !s.value || !r.value ? null : {
1969
1969
  getBoundingClientRect: () => ie(s.value),
1970
1970
  getClientRects: () => ie(s.value)
1971
- }), { floatingStyles: m, update: p } = qt(f, i, {
1971
+ }), { floatingStyles: m, update: v } = qt(f, i, {
1972
1972
  placement: "bottom",
1973
1973
  middleware: [
1974
1974
  Ut(4),
1975
1975
  Kt(),
1976
1976
  jt(),
1977
1977
  Xt({
1978
- apply({ rects: C, elements: v }) {
1979
- let E = C.reference.width > 250 ? C.reference.width / n.scale : 250;
1980
- E > Ue && (E = Ue), Object.assign(v.floating.style, {
1981
- maxWidth: E + "px",
1978
+ apply({ rects: C, elements: p }) {
1979
+ let A = C.reference.width > 250 ? C.reference.width / n.scale : 250;
1980
+ A > je && (A = je), Object.assign(p.floating.style, {
1981
+ maxWidth: A + "px",
1982
1982
  zIndex: 9999
1983
1983
  });
1984
1984
  }
1985
1985
  })
1986
1986
  ],
1987
- whileElementsMounted(C, v, E) {
1988
- return Zt(C, v, E, {
1987
+ whileElementsMounted(C, p, A) {
1988
+ return Zt(C, p, A, {
1989
1989
  ancestorScroll: !0
1990
1990
  });
1991
1991
  }
@@ -2000,21 +2000,16 @@ const Xe = {
2000
2000
  transform: "none"
2001
2001
  };
2002
2002
  else if (h.value && s.value && r.value) {
2003
- const E = ie(s.value);
2004
- E && (C = {
2003
+ const p = ie(s.value);
2004
+ p && (C = {
2005
2005
  ...C,
2006
2006
  position: "fixed",
2007
- left: `${E.x}px`,
2008
- top: `${E.y + E.height + 4}px`,
2007
+ left: `${p.x}px`,
2008
+ top: `${p.y + p.height + 4}px`,
2009
2009
  transform: "none"
2010
2010
  });
2011
2011
  }
2012
- if (n.scale === 1) return C;
2013
- const v = C.transform || "";
2014
- return {
2015
- ...C,
2016
- transform: `${v} scale(${n.scale})`
2017
- };
2012
+ return C;
2018
2013
  });
2019
2014
  Ge(() => {
2020
2015
  document.addEventListener("keyup", (C) => {
@@ -2023,46 +2018,46 @@ const Xe = {
2023
2018
  return;
2024
2019
  }
2025
2020
  }), document.documentElement.onclick = (C) => {
2026
- const v = ie(C.target);
2027
- if (!v) {
2021
+ const p = ie(C.target);
2022
+ if (!p) {
2028
2023
  r.value = "", T();
2029
2024
  return;
2030
2025
  }
2031
- w(v, C);
2026
+ w(p, C);
2032
2027
  }, document.documentElement.ontouchend = (C) => {
2033
- const v = ie(C.target);
2034
- if (!v) {
2028
+ const p = ie(C.target);
2029
+ if (!p) {
2035
2030
  r.value = "", T();
2036
2031
  return;
2037
2032
  }
2038
- w(v, C);
2033
+ w(p, C);
2039
2034
  };
2040
- }), Re(() => {
2035
+ }), Me(() => {
2041
2036
  document.documentElement.onclick = null, document.documentElement.ontouchend = null, document.removeEventListener("mousemove", S), document.removeEventListener("mouseup", B), document.removeEventListener("touchmove", I), document.removeEventListener("touchend", D);
2042
2037
  });
2043
- const w = (C, v) => {
2044
- n.status !== ue.LOGO && o("close"), l.value && !h.value && (h.value = !0), s.value = v.target, r.value = C.text, l.value = !0, De(p);
2038
+ const w = (C, p) => {
2039
+ n.status !== ue.LOGO && o("close"), l.value && !h.value && (h.value = !0), s.value = p.target, r.value = C.text, l.value = !0, _e(v);
2045
2040
  }, L = (C) => {
2046
2041
  C.stopPropagation();
2047
2042
  }, T = async () => {
2048
2043
  l.value = !1, d.value = null, h.value = !1, o("close");
2049
2044
  }, $ = (C) => {
2050
2045
  a.value = C, o("themeChange", C);
2051
- }, A = (C) => {
2046
+ }, E = (C) => {
2052
2047
  if (C.target.closest('button, input, select, textarea, [role="button"]')) return;
2053
2048
  c.value = !0;
2054
- const v = i.value.getBoundingClientRect();
2049
+ const p = i.value.getBoundingClientRect();
2055
2050
  u.value = {
2056
- x: C.clientX - v.left,
2057
- y: C.clientY - v.top
2051
+ x: C.clientX - p.left,
2052
+ y: C.clientY - p.top
2058
2053
  }, document.addEventListener("mousemove", S), document.addEventListener("mouseup", B), C.preventDefault();
2059
2054
  }, M = (C) => {
2060
2055
  if (C.target.closest('button, input, select, textarea, [role="button"]')) return;
2061
2056
  c.value = !0;
2062
- const v = C.touches[0], E = i.value.getBoundingClientRect();
2057
+ const p = C.touches[0], A = i.value.getBoundingClientRect();
2063
2058
  u.value = {
2064
- x: v.clientX - E.left,
2065
- y: v.clientY - E.top
2059
+ x: p.clientX - A.left,
2060
+ y: p.clientY - A.top
2066
2061
  }, document.addEventListener("touchmove", I), document.addEventListener("touchend", D), C.preventDefault();
2067
2062
  }, S = (C) => {
2068
2063
  c.value && (d.value = {
@@ -2071,67 +2066,75 @@ const Xe = {
2071
2066
  });
2072
2067
  }, I = (C) => {
2073
2068
  if (!c.value) return;
2074
- const v = C.touches[0];
2069
+ const p = C.touches[0];
2075
2070
  d.value = {
2076
- x: v.clientX - u.value.x,
2077
- y: v.clientY - u.value.y
2071
+ x: p.clientX - u.value.x,
2072
+ y: p.clientY - u.value.y
2078
2073
  };
2079
2074
  }, B = () => {
2080
2075
  c.value = !1, document.removeEventListener("mousemove", S), document.removeEventListener("mouseup", B);
2081
2076
  }, D = () => {
2082
2077
  c.value = !1, document.removeEventListener("touchmove", I), document.removeEventListener("touchend", D);
2083
2078
  }, q = () => {
2084
- var v;
2085
- const C = (v = n == null ? void 0 : n.translation) == null ? void 0 : v.target;
2086
- Vo.includes(C) ? Xe.supportRTL() : Xe.removeRTL();
2079
+ var p;
2080
+ const C = (p = n == null ? void 0 : n.translation) == null ? void 0 : p.target;
2081
+ Vo.includes(C) ? Ye.supportRTL() : Ye.removeRTL();
2087
2082
  };
2088
2083
  return se(
2089
2084
  () => n.status,
2090
2085
  () => {
2091
- l.value && De(p), q();
2086
+ l.value && _e(v), q();
2092
2087
  }
2093
2088
  ), se(
2094
2089
  () => n.theme,
2095
2090
  (C) => {
2096
2091
  a.value = C;
2097
2092
  }
2098
- ), (C, v) => (g(), b(me, null, [
2093
+ ), (C, p) => (g(), b(me, null, [
2099
2094
  l.value ? (g(), b("div", {
2100
2095
  key: 0,
2101
2096
  ref_key: "floatingEl",
2102
2097
  ref: i,
2103
- class: "rounded-lg",
2104
- style: Ye({ ...x.value, cursor: c.value ? "grabbing" : "grab" }),
2105
- "data-theme": a.value,
2098
+ style: $e(x.value),
2106
2099
  onClick: L,
2107
- onMousedown: A,
2100
+ onMousedown: E,
2108
2101
  onTouchstart: M
2109
2102
  }, [
2110
- K(Zo, {
2111
- translation: n.translation,
2112
- explanation: n.explanation,
2113
- tts: n.tts,
2114
- status: n.status,
2115
- isFavorite: n.isFavorite,
2116
- isFavoriteFeatureEnabled: n.isFavoriteFeatureEnabled,
2117
- isAITranslate: n.isAITranslate,
2118
- isAIExplain: n.isAIExplain,
2119
- aiExplainMinLength: n.aiExplainMinLength,
2120
- theme: a.value,
2121
- showThemeSelector: n.showThemeSelector,
2122
- onLogo: v[0] || (v[0] = (E) => o("logo")),
2123
- onFavorite: v[1] || (v[1] = (E) => o("favorite")),
2124
- onSettings: v[2] || (v[2] = (E) => o("settings")),
2125
- onClose: T,
2126
- onLoadTTS: v[3] || (v[3] = (E) => o("loadTTS")),
2127
- onAiTranslate: v[4] || (v[4] = (E) => o("aiTranslate")),
2128
- onAiExplain: v[5] || (v[5] = (E) => o("aiExplain")),
2129
- onThemeChange: $
2130
- }, null, 8, ["translation", "explanation", "tts", "status", "isFavorite", "isFavoriteFeatureEnabled", "isAITranslate", "isAIExplain", "aiExplainMinLength", "theme", "showThemeSelector"])
2131
- ], 44, qo)) : N("", !0),
2103
+ y("div", {
2104
+ class: "rounded-lg",
2105
+ style: $e({
2106
+ transform: n.scale !== 1 ? `scale(${n.scale})` : "none",
2107
+ transformOrigin: "top left",
2108
+ cursor: c.value ? "grabbing" : "grab"
2109
+ }),
2110
+ "data-theme": a.value
2111
+ }, [
2112
+ K(Zo, {
2113
+ translation: n.translation,
2114
+ explanation: n.explanation,
2115
+ tts: n.tts,
2116
+ status: n.status,
2117
+ isFavorite: n.isFavorite,
2118
+ isFavoriteFeatureEnabled: n.isFavoriteFeatureEnabled,
2119
+ isAITranslate: n.isAITranslate,
2120
+ isAIExplain: n.isAIExplain,
2121
+ aiExplainMinLength: n.aiExplainMinLength,
2122
+ theme: a.value,
2123
+ showThemeSelector: n.showThemeSelector,
2124
+ onLogo: p[0] || (p[0] = (A) => o("logo")),
2125
+ onFavorite: p[1] || (p[1] = (A) => o("favorite")),
2126
+ onSettings: p[2] || (p[2] = (A) => o("settings")),
2127
+ onClose: T,
2128
+ onLoadTTS: p[3] || (p[3] = (A) => o("loadTTS")),
2129
+ onAiTranslate: p[4] || (p[4] = (A) => o("aiTranslate")),
2130
+ onAiExplain: p[5] || (p[5] = (A) => o("aiExplain")),
2131
+ onThemeChange: $
2132
+ }, null, 8, ["translation", "explanation", "tts", "status", "isFavorite", "isFavoriteFeatureEnabled", "isAITranslate", "isAIExplain", "aiExplainMinLength", "theme", "showThemeSelector"])
2133
+ ], 12, qo)
2134
+ ], 36)) : N("", !0),
2132
2135
  K(Go, {
2133
2136
  textSelected: r.value,
2134
- onToggleKey: v[6] || (v[6] = (E) => o("toggleKey", E)),
2137
+ onToggleKey: p[6] || (p[6] = (A) => o("toggleKey", A)),
2135
2138
  onClose: T
2136
2139
  }, null, 8, ["textSelected"])
2137
2140
  ], 64));