@ddict/popup 1.6.4 → 1.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/popup.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { createElementBlock as g, openBlock as h, createElementVNode as f, Fragment as z, renderList as Y, normalizeClass as P, createTextVNode as Ee, normalizeStyle as Zn, toDisplayString as G, createStaticVNode as Be, createCommentVNode as R, createBlock as W, computed as L, unref as M, shallowRef as Un, watch as F, triggerRef as Dt, onScopeDispose as Tt, ref as O, onUnmounted as Fe, inject as le, watchEffect as fe, onMounted as se, cloneVNode as sn, h as Ve, defineComponent as pe, provide as ce, nextTick as X, toRaw as ne, reactive as an, hasInjectionContext as Wn, getCurrentInstance as rn, markRaw as be, effectScope as un, isRef as $e, isReactive as St, toRef as it, getCurrentScope as cn, toRefs as Rt, mergeModels as qn, useModel as Gn, withCtx as ze, createVNode as B, withModifiers as ft, withDirectives as tt, vModelText as nt, pushScopeId as Et, popScopeId as $t, withKeys as Jn } from "vue";
1
+ import { createElementBlock as C, openBlock as h, createElementVNode as f, Fragment as z, renderList as Q, normalizeClass as P, createTextVNode as Ee, normalizeStyle as Zn, toDisplayString as G, createStaticVNode as Ne, createCommentVNode as R, createBlock as Z, computed as O, unref as k, shallowRef as Un, watch as F, triggerRef as Dt, onScopeDispose as Tt, ref as $, onUnmounted as Fe, inject as le, watchEffect as fe, onMounted as se, cloneVNode as sn, h as Ve, defineComponent as pe, provide as ce, nextTick as Y, toRaw as ne, reactive as an, hasInjectionContext as Wn, getCurrentInstance as rn, markRaw as be, effectScope as un, isRef as $e, isReactive as St, toRef as it, getCurrentScope as cn, toRefs as Rt, mergeModels as qn, useModel as Gn, withCtx as ze, createVNode as N, withModifiers as ft, withDirectives as tt, vModelText as nt, pushScopeId as Et, popScopeId as $t, withKeys as Jn } from "vue";
2
2
  const vt = navigator.userAgent.match(
3
3
  /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i
4
4
  ), Ze = {
@@ -56,10 +56,10 @@ const Kn = { class: "dropdown dropdown-end z-50" }, eo = /* @__PURE__ */ f("div"
56
56
  ], l = (s) => {
57
57
  t("themeChange", s);
58
58
  };
59
- return (s, r) => (h(), g("div", Kn, [
59
+ return (s, r) => (h(), C("div", Kn, [
60
60
  eo,
61
61
  f("ul", to, [
62
- (h(), g(z, null, Y(o, (a) => f("li", {
62
+ (h(), C(z, null, Q(o, (a) => f("li", {
63
63
  key: a.value
64
64
  }, [
65
65
  f("input", {
@@ -86,7 +86,7 @@ const Kn = { class: "dropdown dropdown-end z-50" }, eo = /* @__PURE__ */ f("div"
86
86
  ])
87
87
  ]));
88
88
  }
89
- }, ao = { class: "flex justify-between" }, ro = { class: "flex flex-row items-center" }, io = /* @__PURE__ */ Be('<svg class="w-24 text-primary" viewBox="0 0 96 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M40.151 8.94498H35.7256V23.055H40.151C44.7473 23.055 47.826 20.0825 47.826 15.9795C47.8267 11.8093 44.7678 8.94498 40.151 8.94498ZM40.1312 21.025H37.993V10.9974H40.1312C43.4217 10.9974 45.4972 12.9846 45.4972 15.9795C45.4965 18.9296 43.4012 21.025 40.1312 21.025Z" fill="currentColor"></path><path d="M54.5158 8.94498H50.0903V23.055H54.5158C59.1121 23.055 62.1908 20.0825 62.1908 15.9795C62.1914 11.8093 59.1351 8.94498 54.5158 8.94498ZM54.496 21.025H52.3578V10.9974H54.496C57.789 10.9974 59.8619 12.9846 59.8619 15.9795C59.8613 18.9296 57.766 21.025 54.496 21.025Z" fill="currentColor"></path><path d="M66.7237 8.94498H64.4575V23.055H66.7237V8.94498Z" fill="currentColor"></path><path d="M76.4301 10.7837C78.29 10.7837 79.7436 11.6603 80.7487 13.2207L82.4589 11.9591C81.2401 9.97057 78.9957 8.70953 76.409 8.70953C72.3898 8.64555 68.9048 11.9591 68.9906 16C68.9048 20.0403 72.3898 23.3544 76.409 23.2905C79.0385 23.2905 81.2618 22.0294 82.4589 20.0409L80.7487 18.7793C79.7436 20.3397 78.29 21.2163 76.4301 21.2163C73.544 21.2163 71.3418 18.993 71.3418 16C71.3418 13.007 73.5433 10.7837 76.4301 10.7837Z" fill="currentColor"></path><path d="M83.3135 8.94498V10.9757H88.0595V23.055H90.3256V10.9757H95.0934V8.94498H83.3135Z" fill="currentColor"></path><path d="M8.66351 4.7121H4.604V15.4427L6.87208 13.3839V6.79143H8.64559C11.4639 6.79143 13.2835 8.47857 13.2835 11.0877C13.2835 13.6916 11.421 15.4427 8.64559 15.4427H4.604V17.5016H8.66351C12.7531 17.5016 15.6098 14.8644 15.6098 11.0877C15.6104 7.27575 12.8196 4.7121 8.66351 4.7121Z" fill="currentColor"></path><path d="M26.2425 9.25528H21.5502L20.7537 14.293L21.4523 14.3308L21.4069 14.7294C21.3916 14.8656 21.3289 15.0448 21.112 15.1734C21.1017 15.9399 21.0845 17.0493 20.9706 18.1766H26.5937V19.8586H21.4677C22.4133 22.9424 24.1254 24.9648 26.5611 25.8669L27.1536 26.0864L26.6795 26.5048C26.4875 26.6737 26.2182 27.0141 26.0896 27.2489L25.9258 27.5438L25.6155 27.4152C23.167 26.4095 21.4223 24.4926 20.2905 21.563C19.3602 24.3365 17.5797 26.2553 14.8592 27.428L14.5438 27.5617L14.3775 27.2642C14.2764 27.08 14.0294 26.7876 13.8151 26.5989L13.3564 26.1951L13.9239 25.9655C16.4555 24.9392 18.064 23.1414 18.8228 20.4837C19.6647 19.8381 20.2099 18.8221 20.2169 17.6801V4.53231C20.2169 2.58349 18.6334 1 16.6846 1H3.53487C1.58349 1 0 2.58349 0 4.53231V17.6795C0 19.6283 1.58349 21.2143 3.53487 21.2143H8.25528V27.2431C8.25528 29.3135 9.93986 31 12.0096 31H26.2431C28.3161 31 29.9974 29.3129 29.9974 27.2431V13.0096C29.9974 10.9392 28.3154 9.25528 26.2425 9.25528ZM3.53487 19.4517C2.55662 19.4517 1.762 18.6603 1.762 17.6788V4.53231C1.762 3.55662 2.55598 2.762 3.53487 2.762H16.6839C17.6571 2.762 18.4517 3.55598 18.4517 4.53231V17.6795C18.4517 17.778 18.444 17.8733 18.4267 17.9667C18.3941 18.1811 18.3231 18.38 18.215 18.5592C17.9149 19.0934 17.3372 19.4517 16.6846 19.4517H3.53487Z" fill="currentColor"></path></svg>', 1), uo = {
89
+ }, ao = { class: "flex justify-between" }, ro = { class: "flex flex-row items-center" }, io = /* @__PURE__ */ Ne('<svg class="w-24 text-primary" viewBox="0 0 96 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M40.151 8.94498H35.7256V23.055H40.151C44.7473 23.055 47.826 20.0825 47.826 15.9795C47.8267 11.8093 44.7678 8.94498 40.151 8.94498ZM40.1312 21.025H37.993V10.9974H40.1312C43.4217 10.9974 45.4972 12.9846 45.4972 15.9795C45.4965 18.9296 43.4012 21.025 40.1312 21.025Z" fill="currentColor"></path><path d="M54.5158 8.94498H50.0903V23.055H54.5158C59.1121 23.055 62.1908 20.0825 62.1908 15.9795C62.1914 11.8093 59.1351 8.94498 54.5158 8.94498ZM54.496 21.025H52.3578V10.9974H54.496C57.789 10.9974 59.8619 12.9846 59.8619 15.9795C59.8613 18.9296 57.766 21.025 54.496 21.025Z" fill="currentColor"></path><path d="M66.7237 8.94498H64.4575V23.055H66.7237V8.94498Z" fill="currentColor"></path><path d="M76.4301 10.7837C78.29 10.7837 79.7436 11.6603 80.7487 13.2207L82.4589 11.9591C81.2401 9.97057 78.9957 8.70953 76.409 8.70953C72.3898 8.64555 68.9048 11.9591 68.9906 16C68.9048 20.0403 72.3898 23.3544 76.409 23.2905C79.0385 23.2905 81.2618 22.0294 82.4589 20.0409L80.7487 18.7793C79.7436 20.3397 78.29 21.2163 76.4301 21.2163C73.544 21.2163 71.3418 18.993 71.3418 16C71.3418 13.007 73.5433 10.7837 76.4301 10.7837Z" fill="currentColor"></path><path d="M83.3135 8.94498V10.9757H88.0595V23.055H90.3256V10.9757H95.0934V8.94498H83.3135Z" fill="currentColor"></path><path d="M8.66351 4.7121H4.604V15.4427L6.87208 13.3839V6.79143H8.64559C11.4639 6.79143 13.2835 8.47857 13.2835 11.0877C13.2835 13.6916 11.421 15.4427 8.64559 15.4427H4.604V17.5016H8.66351C12.7531 17.5016 15.6098 14.8644 15.6098 11.0877C15.6104 7.27575 12.8196 4.7121 8.66351 4.7121Z" fill="currentColor"></path><path d="M26.2425 9.25528H21.5502L20.7537 14.293L21.4523 14.3308L21.4069 14.7294C21.3916 14.8656 21.3289 15.0448 21.112 15.1734C21.1017 15.9399 21.0845 17.0493 20.9706 18.1766H26.5937V19.8586H21.4677C22.4133 22.9424 24.1254 24.9648 26.5611 25.8669L27.1536 26.0864L26.6795 26.5048C26.4875 26.6737 26.2182 27.0141 26.0896 27.2489L25.9258 27.5438L25.6155 27.4152C23.167 26.4095 21.4223 24.4926 20.2905 21.563C19.3602 24.3365 17.5797 26.2553 14.8592 27.428L14.5438 27.5617L14.3775 27.2642C14.2764 27.08 14.0294 26.7876 13.8151 26.5989L13.3564 26.1951L13.9239 25.9655C16.4555 24.9392 18.064 23.1414 18.8228 20.4837C19.6647 19.8381 20.2099 18.8221 20.2169 17.6801V4.53231C20.2169 2.58349 18.6334 1 16.6846 1H3.53487C1.58349 1 0 2.58349 0 4.53231V17.6795C0 19.6283 1.58349 21.2143 3.53487 21.2143H8.25528V27.2431C8.25528 29.3135 9.93986 31 12.0096 31H26.2431C28.3161 31 29.9974 29.3129 29.9974 27.2431V13.0096C29.9974 10.9392 28.3154 9.25528 26.2425 9.25528ZM3.53487 19.4517C2.55662 19.4517 1.762 18.6603 1.762 17.6788V4.53231C1.762 3.55662 2.55598 2.762 3.53487 2.762H16.6839C17.6571 2.762 18.4517 3.55598 18.4517 4.53231V17.6795C18.4517 17.778 18.444 17.8733 18.4267 17.9667C18.3941 18.1811 18.3231 18.38 18.215 18.5592C17.9149 19.0934 17.3372 19.4517 16.6846 19.4517H3.53487Z" fill="currentColor"></path></svg>', 1), uo = {
90
90
  key: 0,
91
91
  class: "ml-2 px-1.5 py-0.5 text-[10px] font-medium bg-primary/10 text-primary border border-primary/20 rounded-full"
92
92
  }, co = { class: "flex" }, fo = /* @__PURE__ */ f("svg", {
@@ -176,7 +176,7 @@ const Kn = { class: "dropdown dropdown-end z-50" }, eo = /* @__PURE__ */ f("div"
176
176
  })
177
177
  ], -1), Co = [
178
178
  bo
179
- ], xo = /* @__PURE__ */ Be('<svg class="w-6 h-6 text-primary" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.467 2.47236C2.75841 2.17799 3.23328 2.17559 3.52764 2.467L8.52765 7.41675C8.82201 7.70816 8.82441 8.18303 8.533 8.4774C8.24159 8.77176 7.76672 8.77416 7.47235 8.48275L2.47236 3.533C2.17799 3.24159 2.17559 2.76672 2.467 2.47236Z" fill="currentColor"></path><path d="M8.533 15.4724C8.82441 15.7667 8.82201 16.2416 8.52765 16.533L3.52765 21.4828C3.23328 21.7742 2.75841 21.7718 2.467 21.4774C2.17559 21.183 2.17799 20.7082 2.47236 20.4167L7.47235 15.467C7.76672 15.1756 8.24159 15.178 8.533 15.4724Z" fill="currentColor"></path><path d="M15.52 15.4697C15.8129 15.1768 16.2877 15.1768 16.5806 15.4697L21.5304 20.4194C21.8233 20.7123 21.8233 21.1872 21.5304 21.4801C21.2375 21.773 20.7626 21.773 20.4697 21.4801L15.52 16.5303C15.2271 16.2374 15.2271 15.7626 15.52 15.4697Z" fill="currentColor"></path><path d="M21.4801 2.46967C21.773 2.76256 21.773 3.23744 21.4801 3.53033L16.5303 8.48008C16.2374 8.77297 15.7626 8.77297 15.4697 8.48008C15.1768 8.18719 15.1768 7.71231 15.4697 7.41942L20.4194 2.46967C20.7123 2.17678 21.1872 2.17678 21.4801 2.46967Z" fill="currentColor"></path><path d="M15.75 3C15.75 2.58579 16.0858 2.25 16.5 2.25H21C21.4142 2.25 21.75 2.58579 21.75 3V7.5C21.75 7.91421 21.4142 8.25 21 8.25C20.5858 8.25 20.25 7.91421 20.25 7.5V3.75H16.5C16.0858 3.75 15.75 3.41421 15.75 3Z" fill="currentColor"></path><path d="M21 15.75C21.4142 15.75 21.75 16.0858 21.75 16.5V21C21.75 21.4142 21.4142 21.75 21 21.75H16.5C16.0858 21.75 15.75 21.4142 15.75 21C15.75 20.5858 16.0858 20.25 16.5 20.25H20.25V16.5C20.25 16.0858 20.5858 15.75 21 15.75Z" fill="currentColor"></path><path d="M3 15.75C3.41421 15.75 3.75 16.0858 3.75 16.5V20.25H7.5C7.91421 20.25 8.25 20.5858 8.25 21C8.25 21.4142 7.91421 21.75 7.5 21.75H3C2.58579 21.75 2.25 21.4142 2.25 21V16.5C2.25 16.0858 2.58579 15.75 3 15.75Z" fill="currentColor"></path><path d="M2.25 3C2.25 2.58579 2.58579 2.25 3 2.25H7.5C7.91421 2.25 8.25 2.58579 8.25 3C8.25 3.41421 7.91421 3.75 7.5 3.75H3.75V7.5C3.75 7.91421 3.41421 8.25 3 8.25C2.58579 8.25 2.25 7.91421 2.25 7.5V3Z" fill="currentColor"></path></svg>', 1), yo = [
179
+ ], xo = /* @__PURE__ */ Ne('<svg class="w-6 h-6 text-primary" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.467 2.47236C2.75841 2.17799 3.23328 2.17559 3.52764 2.467L8.52765 7.41675C8.82201 7.70816 8.82441 8.18303 8.533 8.4774C8.24159 8.77176 7.76672 8.77416 7.47235 8.48275L2.47236 3.533C2.17799 3.24159 2.17559 2.76672 2.467 2.47236Z" fill="currentColor"></path><path d="M8.533 15.4724C8.82441 15.7667 8.82201 16.2416 8.52765 16.533L3.52765 21.4828C3.23328 21.7742 2.75841 21.7718 2.467 21.4774C2.17559 21.183 2.17799 20.7082 2.47236 20.4167L7.47235 15.467C7.76672 15.1756 8.24159 15.178 8.533 15.4724Z" fill="currentColor"></path><path d="M15.52 15.4697C15.8129 15.1768 16.2877 15.1768 16.5806 15.4697L21.5304 20.4194C21.8233 20.7123 21.8233 21.1872 21.5304 21.4801C21.2375 21.773 20.7626 21.773 20.4697 21.4801L15.52 16.5303C15.2271 16.2374 15.2271 15.7626 15.52 15.4697Z" fill="currentColor"></path><path d="M21.4801 2.46967C21.773 2.76256 21.773 3.23744 21.4801 3.53033L16.5303 8.48008C16.2374 8.77297 15.7626 8.77297 15.4697 8.48008C15.1768 8.18719 15.1768 7.71231 15.4697 7.41942L20.4194 2.46967C20.7123 2.17678 21.1872 2.17678 21.4801 2.46967Z" fill="currentColor"></path><path d="M15.75 3C15.75 2.58579 16.0858 2.25 16.5 2.25H21C21.4142 2.25 21.75 2.58579 21.75 3V7.5C21.75 7.91421 21.4142 8.25 21 8.25C20.5858 8.25 20.25 7.91421 20.25 7.5V3.75H16.5C16.0858 3.75 15.75 3.41421 15.75 3Z" fill="currentColor"></path><path d="M21 15.75C21.4142 15.75 21.75 16.0858 21.75 16.5V21C21.75 21.4142 21.4142 21.75 21 21.75H16.5C16.0858 21.75 15.75 21.4142 15.75 21C15.75 20.5858 16.0858 20.25 16.5 20.25H20.25V16.5C20.25 16.0858 20.5858 15.75 21 15.75Z" fill="currentColor"></path><path d="M3 15.75C3.41421 15.75 3.75 16.0858 3.75 16.5V20.25H7.5C7.91421 20.25 8.25 20.5858 8.25 21C8.25 21.4142 7.91421 21.75 7.5 21.75H3C2.58579 21.75 2.25 21.4142 2.25 21V16.5C2.25 16.0858 2.58579 15.75 3 15.75Z" fill="currentColor"></path><path d="M2.25 3C2.25 2.58579 2.58579 2.25 3 2.25H7.5C7.91421 2.25 8.25 2.58579 8.25 3C8.25 3.41421 7.91421 3.75 7.5 3.75H3.75V7.5C3.75 7.91421 3.41421 8.25 3 8.25C2.58579 8.25 2.25 7.91421 2.25 7.5V3Z" fill="currentColor"></path></svg>', 1), yo = [
180
180
  xo
181
181
  ], wo = {
182
182
  __name: "Header",
@@ -207,18 +207,18 @@ const Kn = { class: "dropdown dropdown-end z-50" }, eo = /* @__PURE__ */ f("div"
207
207
  const t = n, o = (l) => {
208
208
  t("themeChange", l);
209
209
  };
210
- return (l, s) => (h(), g("div", ao, [
210
+ return (l, s) => (h(), C("div", ao, [
211
211
  f("div", ro, [
212
212
  io,
213
- e.isPremium ? (h(), g("span", uo, "Premium")) : R("", !0)
213
+ e.isPremium ? (h(), C("span", uo, "Premium")) : R("", !0)
214
214
  ]),
215
215
  f("div", co, [
216
- e.headerSettings.showThemeSelector ? (h(), W(so, {
216
+ e.headerSettings.showThemeSelector ? (h(), Z(so, {
217
217
  key: 0,
218
218
  "current-theme": e.currentTheme,
219
219
  onThemeChange: o
220
220
  }, null, 8, ["current-theme"])) : R("", !0),
221
- e.headerSettings.showReader ? (h(), g("button", {
221
+ e.headerSettings.showReader ? (h(), C("button", {
222
222
  key: 1,
223
223
  class: "btn btn-ghost btn-circle btn-sm",
224
224
  onClick: s[0] || (s[0] = (r) => t("reader"))
@@ -228,19 +228,19 @@ const Kn = { class: "dropdown dropdown-end z-50" }, eo = /* @__PURE__ */ f("div"
228
228
  onClick: s[1] || (s[1] = (r) => t("learn"))
229
229
  }, [
230
230
  po,
231
- e.headerSettings.showLearn > 0 ? (h(), g("span", ho, G(e.headerSettings.showLearn > 999 ? "999+" : e.headerSettings.showLearn), 1)) : R("", !0)
231
+ e.headerSettings.showLearn > 0 ? (h(), C("span", ho, G(e.headerSettings.showLearn > 999 ? "999+" : e.headerSettings.showLearn), 1)) : R("", !0)
232
232
  ]),
233
- e.headerSettings.showAccount ? (h(), g("button", {
233
+ e.headerSettings.showAccount ? (h(), C("button", {
234
234
  key: 2,
235
235
  class: "btn btn-ghost btn-circle btn-sm",
236
236
  onClick: s[2] || (s[2] = (r) => t("account"))
237
237
  }, go)) : R("", !0),
238
- e.headerSettings.showSettings ? (h(), g("button", {
238
+ e.headerSettings.showSettings ? (h(), C("button", {
239
239
  key: 3,
240
240
  class: "btn btn-ghost btn-circle btn-sm",
241
241
  onClick: s[3] || (s[3] = (r) => t("settings"))
242
242
  }, Co)) : R("", !0),
243
- e.headerSettings.showFullscreen ? (h(), g("button", {
243
+ e.headerSettings.showFullscreen ? (h(), C("button", {
244
244
  key: 4,
245
245
  class: "btn btn-ghost btn-circle btn-sm",
246
246
  onClick: s[4] || (s[4] = (r) => t("fullScreen"))
@@ -249,25 +249,25 @@ const Kn = { class: "dropdown dropdown-end z-50" }, eo = /* @__PURE__ */ f("div"
249
249
  ]));
250
250
  }
251
251
  };
252
- function Le(e, n, t) {
252
+ function Ie(e, n, t) {
253
253
  let o = t.initialDeps ?? [], l;
254
254
  return () => {
255
255
  var s, r, a, i;
256
256
  let u;
257
257
  t.key && ((s = t.debug) != null && s.call(t)) && (u = Date.now());
258
258
  const c = e();
259
- if (!(c.length !== o.length || c.some((m, C) => o[C] !== m)))
259
+ if (!(c.length !== o.length || c.some((g, x) => o[x] !== g)))
260
260
  return l;
261
261
  o = c;
262
- let x;
263
- if (t.key && ((r = t.debug) != null && r.call(t)) && (x = Date.now()), l = n(...c), t.key && ((a = t.debug) != null && a.call(t))) {
264
- const m = Math.round((Date.now() - u) * 100) / 100, C = Math.round((Date.now() - x) * 100) / 100, b = C / 16, I = ($, w) => {
265
- for ($ = String($); $.length < w; )
266
- $ = " " + $;
267
- return $;
262
+ let T;
263
+ if (t.key && ((r = t.debug) != null && r.call(t)) && (T = Date.now()), l = n(...c), t.key && ((a = t.debug) != null && a.call(t))) {
264
+ const g = Math.round((Date.now() - u) * 100) / 100, x = Math.round((Date.now() - T) * 100) / 100, b = x / 16, A = (V, I) => {
265
+ for (V = String(V); V.length < I; )
266
+ V = " " + V;
267
+ return V;
268
268
  };
269
269
  console.info(
270
- `%c⏱ ${I(C, 5)} /${I(m, 5)} ms`,
270
+ `%c⏱ ${A(x, 5)} /${A(g, 5)} ms`,
271
271
  `
272
272
  font-size: .6rem;
273
273
  font-weight: bold;
@@ -326,7 +326,7 @@ const _o = (e, n) => Math.abs(e - n) < 1, To = (e, n, t) => {
326
326
  };
327
327
  }, Pt = {
328
328
  passive: !0
329
- }, Oo = typeof window > "u" ? !0 : "onscrollend" in window, Io = (e, n) => {
329
+ }, Oo = typeof window > "u" ? !0 : "onscrollend" in window, Lo = (e, n) => {
330
330
  const t = e.scrollElement;
331
331
  if (!t)
332
332
  return;
@@ -347,7 +347,7 @@ const _o = (e, n) => Math.abs(e - n) < 1, To = (e, n, t) => {
347
347
  return i(), t.addEventListener("scroll", a, Pt), t.addEventListener("scrollend", i, Pt), () => {
348
348
  t.removeEventListener("scroll", a), t.removeEventListener("scrollend", i);
349
349
  };
350
- }, Lo = (e, n, t) => {
350
+ }, Io = (e, n, t) => {
351
351
  if (n != null && n.borderBoxSize) {
352
352
  const o = n.borderBoxSize[0];
353
353
  if (o)
@@ -408,7 +408,7 @@ class Mo {
408
408
  rangeExtractor: Eo,
409
409
  onChange: () => {
410
410
  },
411
- measureElement: Lo,
411
+ measureElement: Io,
412
412
  initialRect: { width: 0, height: 0 },
413
413
  scrollMargin: 0,
414
414
  gap: 0,
@@ -466,7 +466,7 @@ class Mo {
466
466
  break;
467
467
  }
468
468
  return s.size === this.options.lanes ? Array.from(s.values()).sort((r, a) => r.end === a.end ? r.index - a.index : r.end - a.end)[0] : void 0;
469
- }, this.getMeasurementOptions = Le(
469
+ }, this.getMeasurementOptions = Ie(
470
470
  () => [
471
471
  this.options.count,
472
472
  this.options.paddingStart,
@@ -484,7 +484,7 @@ class Mo {
484
484
  {
485
485
  key: !1
486
486
  }
487
- ), this.getMeasurements = Le(
487
+ ), this.getMeasurements = Ie(
488
488
  () => [this.getMeasurementOptions(), this.itemSizeCache],
489
489
  ({ count: t, paddingStart: o, scrollMargin: l, getItemKey: s, enabled: r }, a) => {
490
490
  var i;
@@ -497,27 +497,27 @@ class Mo {
497
497
  this.pendingMeasuredCacheIndexes = [];
498
498
  const c = this.measurementsCache.slice(0, u);
499
499
  for (let d = u; d < t; d++) {
500
- let x = (i = this.measurementsCache[d]) == null ? void 0 : i.measureElement;
501
- x || (x = (_) => {
502
- const T = s(d), V = this.elementsCache.get(T);
503
- if (!_) {
504
- V && (this.observer.unobserve(V), this.elementsCache.delete(T));
500
+ let T = (i = this.measurementsCache[d]) == null ? void 0 : i.measureElement;
501
+ T || (T = (E) => {
502
+ const y = s(d), w = this.elementsCache.get(y);
503
+ if (!E) {
504
+ w && (this.observer.unobserve(w), this.elementsCache.delete(y));
505
505
  return;
506
506
  }
507
- V !== _ && (V && this.observer.unobserve(V), this.observer.observe(_), this.elementsCache.set(T, _)), _.isConnected && this.resizeItem(
507
+ w !== E && (w && this.observer.unobserve(w), this.observer.observe(E), this.elementsCache.set(y, E)), E.isConnected && this.resizeItem(
508
508
  d,
509
- this.options.measureElement(_, void 0, this)
509
+ this.options.measureElement(E, void 0, this)
510
510
  );
511
511
  });
512
- const m = s(d), C = this.options.lanes === 1 ? c[d - 1] : this.getFurthestMeasurement(c, d), b = C ? C.end + this.options.gap : o + l, I = a.get(m), $ = typeof I == "number" ? I : this.options.estimateSize(d), w = b + $, y = C ? C.lane : d % this.options.lanes;
512
+ const g = s(d), x = this.options.lanes === 1 ? c[d - 1] : this.getFurthestMeasurement(c, d), b = x ? x.end + this.options.gap : o + l, A = a.get(g), V = typeof A == "number" ? A : this.options.estimateSize(d), I = b + V, _ = x ? x.lane : d % this.options.lanes;
513
513
  c[d] = {
514
514
  index: d,
515
515
  start: b,
516
- size: $,
517
- end: w,
518
- key: m,
519
- lane: y,
520
- measureElement: x
516
+ size: V,
517
+ end: I,
518
+ key: g,
519
+ lane: _,
520
+ measureElement: T
521
521
  };
522
522
  }
523
523
  return this.measurementsCache = c, c;
@@ -526,7 +526,7 @@ class Mo {
526
526
  key: process.env.NODE_ENV !== "production" && "getMeasurements",
527
527
  debug: () => this.options.debug
528
528
  }
529
- ), this.calculateRange = Le(
529
+ ), this.calculateRange = Ie(
530
530
  () => [this.getMeasurements(), this.getSize(), this.getScrollOffset()],
531
531
  (t, o, l) => this.range = t.length > 0 && o > 0 ? Ao({
532
532
  measurements: t,
@@ -537,7 +537,7 @@ class Mo {
537
537
  key: process.env.NODE_ENV !== "production" && "calculateRange",
538
538
  debug: () => this.options.debug
539
539
  }
540
- ), this.getIndexes = Le(
540
+ ), this.getIndexes = Ie(
541
541
  () => [
542
542
  this.options.rangeExtractor,
543
543
  this.calculateRange(),
@@ -580,7 +580,7 @@ class Mo {
580
580
  })), this.pendingMeasuredCacheIndexes.push(l.index), this.itemSizeCache = new Map(this.itemSizeCache.set(l.key, o)), this.notify(!0, !1));
581
581
  }, this.measureElement = (t) => {
582
582
  t && this._measureElement(t, void 0);
583
- }, this.getVirtualItems = Le(
583
+ }, this.getVirtualItems = Ie(
584
584
  () => [this.getIndexes(), this.getMeasurements()],
585
585
  (t, o) => {
586
586
  const l = [];
@@ -701,9 +701,9 @@ function Ao({
701
701
  return { startIndex: s, endIndex: r };
702
702
  }
703
703
  function Vo(e) {
704
- const n = new Mo(M(e)), t = Un(n), o = n._didMount();
704
+ const n = new Mo(k(e)), t = Un(n), o = n._didMount();
705
705
  return F(
706
- () => M(e).getScrollElement(),
706
+ () => k(e).getScrollElement(),
707
707
  (l) => {
708
708
  l && n._willUpdate();
709
709
  },
@@ -711,7 +711,7 @@ function Vo(e) {
711
711
  immediate: !0
712
712
  }
713
713
  ), F(
714
- () => M(e),
714
+ () => k(e),
715
715
  (l) => {
716
716
  n.setOptions({
717
717
  ...l,
@@ -728,17 +728,17 @@ function Vo(e) {
728
728
  }
729
729
  function Do(e) {
730
730
  return Vo(
731
- L(() => ({
731
+ O(() => ({
732
732
  observeElementRect: $o,
733
- observeElementOffset: Io,
733
+ observeElementOffset: Lo,
734
734
  scrollToFn: ko,
735
- ...M(e)
735
+ ...k(e)
736
736
  }))
737
737
  );
738
738
  }
739
739
  function Ro(e, n, t) {
740
- let o = O(t == null ? void 0 : t.value), l = L(() => e.value !== void 0);
741
- return [L(() => l.value ? e.value : o.value), function(s) {
740
+ let o = $(t == null ? void 0 : t.value), l = O(() => e.value !== void 0);
741
+ return [O(() => l.value ? e.value : o.value), function(s) {
742
742
  return l.value || (o.value = s), n == null ? void 0 : n(s);
743
743
  }];
744
744
  }
@@ -785,12 +785,12 @@ function Qe() {
785
785
  } };
786
786
  return n;
787
787
  }
788
- function No() {
788
+ function Bo() {
789
789
  let e = Qe();
790
790
  return Fe(() => e.dispose()), e;
791
791
  }
792
- function Bo() {
793
- let e = No();
792
+ function No() {
793
+ let e = Bo();
794
794
  return (n) => {
795
795
  e.dispose(), e.nextFrame(n);
796
796
  };
@@ -799,7 +799,7 @@ let Fo = Symbol("headlessui.useid"), jo = 0;
799
799
  function je() {
800
800
  return le(Fo, () => `${++jo}`)();
801
801
  }
802
- function N(e) {
802
+ function B(e) {
803
803
  var n;
804
804
  if (e == null || e.value == null) return null;
805
805
  let t = (n = e.value.$el) != null ? n : e.value;
@@ -813,10 +813,10 @@ function ue(e, n, ...t) {
813
813
  let o = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(n).map((l) => `"${l}"`).join(", ")}.`);
814
814
  throw Error.captureStackTrace && Error.captureStackTrace(o, ue), o;
815
815
  }
816
- var Ho = Object.defineProperty, zo = (e, n, t) => n in e ? Ho(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t, Nt = (e, n, t) => (zo(e, typeof n != "symbol" ? n + "" : n, t), t);
816
+ var Ho = Object.defineProperty, zo = (e, n, t) => n in e ? Ho(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t, Bt = (e, n, t) => (zo(e, typeof n != "symbol" ? n + "" : n, t), t);
817
817
  let Zo = class {
818
818
  constructor() {
819
- Nt(this, "current", this.detect()), Nt(this, "currentId", 0);
819
+ Bt(this, "current", this.detect()), Bt(this, "currentId", 0);
820
820
  }
821
821
  set(n) {
822
822
  this.current !== n && (this.currentId = 0, this.current = n);
@@ -837,25 +837,25 @@ let Zo = class {
837
837
  return typeof window > "u" || typeof document > "u" ? "server" : "client";
838
838
  }
839
839
  }, Ot = new Zo();
840
- function It(e) {
840
+ function Lt(e) {
841
841
  if (Ot.isServer) return null;
842
842
  if (e instanceof Node) return e.ownerDocument;
843
843
  if (e != null && e.hasOwnProperty("value")) {
844
- let n = N(e);
844
+ let n = B(e);
845
845
  if (n) return n.ownerDocument;
846
846
  }
847
847
  return document;
848
848
  }
849
- let Bt = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
849
+ let Nt = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
850
850
  var Uo = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e))(Uo || {}), Wo = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(Wo || {}), qo = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(qo || {}), fn = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(fn || {});
851
851
  function Go(e, n = 0) {
852
852
  var t;
853
- return e === ((t = It(e)) == null ? void 0 : t.body) ? !1 : ue(n, { 0() {
854
- return e.matches(Bt);
853
+ return e === ((t = Lt(e)) == null ? void 0 : t.body) ? !1 : ue(n, { 0() {
854
+ return e.matches(Nt);
855
855
  }, 1() {
856
856
  let o = e;
857
857
  for (; o !== null; ) {
858
- if (o.matches(Bt)) return !0;
858
+ if (o.matches(Nt)) return !0;
859
859
  o = o.parentElement;
860
860
  }
861
861
  return !1;
@@ -894,7 +894,7 @@ function Ko(e, n, t) {
894
894
  window.addEventListener(e, n, t), o(() => window.removeEventListener(e, n, t));
895
895
  });
896
896
  }
897
- function el(e, n, t = L(() => !0)) {
897
+ function el(e, n, t = O(() => !0)) {
898
898
  function o(s, r) {
899
899
  if (!t.value || s.defaultPrevented) return;
900
900
  let a = r(s);
@@ -904,12 +904,12 @@ function el(e, n, t = L(() => !0)) {
904
904
  }(e);
905
905
  for (let u of i) {
906
906
  if (u === null) continue;
907
- let c = u instanceof HTMLElement ? u : N(u);
907
+ let c = u instanceof HTMLElement ? u : B(u);
908
908
  if (c != null && c.contains(a) || s.composed && s.composedPath().includes(c)) return;
909
909
  }
910
910
  return !Go(a, fn.Loose) && a.tabIndex !== -1 && s.preventDefault(), n(s, a);
911
911
  }
912
- let l = O(null);
912
+ let l = $(null);
913
913
  Ue("pointerdown", (s) => {
914
914
  var r, a;
915
915
  t.value && (l.value = ((a = (r = s.composedPath) == null ? void 0 : r.call(s)) == null ? void 0 : a[0]) || s.target);
@@ -926,19 +926,19 @@ function Ft(e, n) {
926
926
  if (typeof t == "string" && t.toLowerCase() === "button") return "button";
927
927
  }
928
928
  function tl(e, n) {
929
- let t = O(Ft(e.value.type, e.value.as));
929
+ let t = $(Ft(e.value.type, e.value.as));
930
930
  return se(() => {
931
931
  t.value = Ft(e.value.type, e.value.as);
932
932
  }), fe(() => {
933
933
  var o;
934
- t.value || N(n) && N(n) instanceof HTMLButtonElement && !((o = N(n)) != null && o.hasAttribute("type")) && (t.value = "button");
934
+ t.value || B(n) && B(n) instanceof HTMLButtonElement && !((o = B(n)) != null && o.hasAttribute("type")) && (t.value = "button");
935
935
  }), t;
936
936
  }
937
937
  function jt(e) {
938
938
  return [e.screenX, e.screenY];
939
939
  }
940
940
  function nl() {
941
- let e = O([-1, -1]);
941
+ let e = $([-1, -1]);
942
942
  return { wasMoved(n) {
943
943
  let t = jt(n);
944
944
  return e.value[0] === t[0] && e.value[1] === t[1] ? !1 : (e.value = t, !0);
@@ -950,7 +950,7 @@ function ol({ container: e, accept: n, walk: t, enabled: o }) {
950
950
  fe(() => {
951
951
  let l = e.value;
952
952
  if (!l || o !== void 0 && !o.value) return;
953
- let s = It(e);
953
+ let s = Lt(e);
954
954
  if (!s) return;
955
955
  let r = Object.assign((i) => n(i), { acceptNode: n }), a = s.createTreeWalker(l, NodeFilter.SHOW_ELEMENT, r, !1);
956
956
  for (; a.nextNode(); ) t(a.currentNode);
@@ -975,20 +975,20 @@ function ct({ props: e, attrs: n, slots: t, slot: o, name: l }) {
975
975
  var s, r;
976
976
  let { as: a, ...i } = ot(e, ["unmount", "static"]), u = (s = t.default) == null ? void 0 : s.call(t, o), c = {};
977
977
  if (o) {
978
- let d = !1, x = [];
979
- for (let [m, C] of Object.entries(o)) typeof C == "boolean" && (d = !0), C === !0 && x.push(m);
980
- d && (c["data-headlessui-state"] = x.join(" "));
978
+ let d = !1, T = [];
979
+ for (let [g, x] of Object.entries(o)) typeof x == "boolean" && (d = !0), x === !0 && T.push(g);
980
+ d && (c["data-headlessui-state"] = T.join(" "));
981
981
  }
982
982
  if (a === "template") {
983
983
  if (u = pn(u ?? []), Object.keys(i).length > 0 || Object.keys(n).length > 0) {
984
- let [d, ...x] = u ?? [];
985
- if (!al(d) || x.length > 0) throw new Error(['Passing props on "template"!', "", `The current component <${l} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(i).concat(Object.keys(n)).map((b) => b.trim()).filter((b, I, $) => $.indexOf(b) === I).sort((b, I) => b.localeCompare(I)).map((b) => ` - ${b}`).join(`
984
+ let [d, ...T] = u ?? [];
985
+ if (!al(d) || T.length > 0) throw new Error(['Passing props on "template"!', "", `The current component <${l} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(i).concat(Object.keys(n)).map((b) => b.trim()).filter((b, A, V) => V.indexOf(b) === A).sort((b, A) => b.localeCompare(A)).map((b) => ` - ${b}`).join(`
986
986
  `), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map((b) => ` - ${b}`).join(`
987
987
  `)].join(`
988
988
  `));
989
- let m = hn((r = d.props) != null ? r : {}, i, c), C = sn(d, m, !0);
990
- for (let b in m) b.startsWith("on") && (C.props || (C.props = {}), C.props[b] = m[b]);
991
- return C;
989
+ let g = hn((r = d.props) != null ? r : {}, i, c), x = sn(d, g, !0);
990
+ for (let b in g) b.startsWith("on") && (x.props || (x.props = {}), x.props[b] = g[b]);
991
+ return x;
992
992
  }
993
993
  return Array.isArray(u) && u.length === 1 ? u[0] : u;
994
994
  }
@@ -1040,7 +1040,7 @@ function il() {
1040
1040
  function ul(e) {
1041
1041
  ce(gn, e);
1042
1042
  }
1043
- var Q = ((e) => (e.Space = " ", e.Enter = "Enter", e.Escape = "Escape", e.Backspace = "Backspace", e.Delete = "Delete", e.ArrowLeft = "ArrowLeft", e.ArrowUp = "ArrowUp", e.ArrowRight = "ArrowRight", e.ArrowDown = "ArrowDown", e.Home = "Home", e.End = "End", e.PageUp = "PageUp", e.PageDown = "PageDown", e.Tab = "Tab", e))(Q || {}), bn = ((e) => (e[e.Left = 0] = "Left", e[e.Right = 2] = "Right", e))(bn || {});
1043
+ var X = ((e) => (e.Space = " ", e.Enter = "Enter", e.Escape = "Escape", e.Backspace = "Backspace", e.Delete = "Delete", e.ArrowLeft = "ArrowLeft", e.ArrowUp = "ArrowUp", e.ArrowRight = "ArrowRight", e.ArrowDown = "ArrowDown", e.Home = "Home", e.End = "End", e.PageUp = "PageUp", e.PageDown = "PageDown", e.Tab = "Tab", e))(X || {}), bn = ((e) => (e[e.Left = 0] = "Left", e[e.Right = 2] = "Right", e))(bn || {});
1044
1044
  function cl(e) {
1045
1045
  function n() {
1046
1046
  document.readyState !== "loading" && (e(), document.removeEventListener("DOMContentLoaded", n));
@@ -1115,19 +1115,19 @@ function we(e) {
1115
1115
  return n;
1116
1116
  }
1117
1117
  let _n = Symbol("VirtualContext"), ml = pe({ name: "VirtualProvider", setup(e, { slots: n }) {
1118
- let t = we("VirtualProvider"), o = L(() => {
1119
- let a = N(t.optionsRef);
1118
+ let t = we("VirtualProvider"), o = O(() => {
1119
+ let a = B(t.optionsRef);
1120
1120
  if (!a) return { start: 0, end: 0 };
1121
1121
  let i = window.getComputedStyle(a);
1122
1122
  return { start: parseFloat(i.paddingBlockStart || i.paddingTop), end: parseFloat(i.paddingBlockEnd || i.paddingBottom) };
1123
- }), l = Do(L(() => ({ scrollPaddingStart: o.value.start, scrollPaddingEnd: o.value.end, count: t.virtual.value.options.length, estimateSize() {
1123
+ }), l = Do(O(() => ({ scrollPaddingStart: o.value.start, scrollPaddingEnd: o.value.end, count: t.virtual.value.options.length, estimateSize() {
1124
1124
  return 40;
1125
1125
  }, getScrollElement() {
1126
- return N(t.optionsRef);
1127
- }, overscan: 12 }))), s = L(() => {
1126
+ return B(t.optionsRef);
1127
+ }, overscan: 12 }))), s = O(() => {
1128
1128
  var a;
1129
1129
  return (a = t.virtual.value) == null ? void 0 : a.options;
1130
- }), r = O(0);
1130
+ }), r = $(0);
1131
1131
  return F([s], () => {
1132
1132
  r.value += 1;
1133
1133
  }), ce(_n, t.virtual.value ? l : null), () => [Ve("div", { style: { position: "relative", width: "100%", height: `${l.value.getTotalSize()}px` }, ref: (a) => {
@@ -1137,44 +1137,44 @@ let _n = Symbol("VirtualContext"), ml = pe({ name: "VirtualProvider", setup(e, {
1137
1137
  }
1138
1138
  } }, l.value.getVirtualItems().map((a) => sn(n.default({ option: t.virtual.value.options[a.index], open: t.comboboxState.value === 0 })[0], { key: `${r.value}-${a.index}`, "data-index": a.index, "aria-setsize": t.virtual.value.options.length, "aria-posinset": a.index + 1, style: { position: "absolute", top: 0, left: 0, transform: `translateY(${a.start}px)`, overflowAnchor: "none" } })))];
1139
1139
  } }), gl = pe({ name: "Combobox", emits: { "update:modelValue": (e) => !0 }, props: { as: { type: [Object, String], default: "template" }, disabled: { type: [Boolean], default: !1 }, by: { type: [String, Function], nullable: !0, default: null }, modelValue: { type: [Object, String, Number, Boolean], default: void 0 }, defaultValue: { type: [Object, String, Number, Boolean], default: void 0 }, form: { type: String, optional: !0 }, name: { type: String, optional: !0 }, nullable: { type: Boolean, default: !1 }, multiple: { type: [Boolean], default: !1 }, immediate: { type: [Boolean], default: !1 }, virtual: { type: Object, default: null } }, inheritAttrs: !1, setup(e, { slots: n, attrs: t, emit: o }) {
1140
- let l = O(1), s = O(null), r = O(null), a = O(null), i = O(null), u = O({ static: !1, hold: !1 }), c = O([]), d = O(null), x = O(2), m = O(!1);
1141
- function C(v = (p) => p) {
1142
- let p = d.value !== null ? c.value[d.value] : null, k = v(c.value.slice()), A = k.length > 0 && k[0].dataRef.order.value !== null ? k.sort((H, K) => H.dataRef.order.value - K.dataRef.order.value) : Yo(k, (H) => N(H.dataRef.domRef)), j = p ? A.indexOf(p) : null;
1143
- return j === -1 && (j = null), { options: A, activeOptionIndex: j };
1140
+ let l = $(1), s = $(null), r = $(null), a = $(null), i = $(null), u = $({ static: !1, hold: !1 }), c = $([]), d = $(null), T = $(2), g = $(!1);
1141
+ function x(v = (p) => p) {
1142
+ let p = d.value !== null ? c.value[d.value] : null, L = v(c.value.slice()), M = L.length > 0 && L[0].dataRef.order.value !== null ? L.sort((H, K) => H.dataRef.order.value - K.dataRef.order.value) : Yo(L, (H) => B(H.dataRef.domRef)), j = p ? M.indexOf(p) : null;
1143
+ return j === -1 && (j = null), { options: M, activeOptionIndex: j };
1144
1144
  }
1145
- let b = L(() => e.multiple ? 1 : 0), I = L(() => e.nullable), [$, w] = Ro(L(() => e.modelValue), (v) => o("update:modelValue", v), L(() => e.defaultValue)), y = L(() => $.value === void 0 ? ue(b.value, { 1: [], 0: void 0 }) : $.value), _ = null, T = null;
1146
- function V(v) {
1145
+ let b = O(() => e.multiple ? 1 : 0), A = O(() => e.nullable), [V, I] = Ro(O(() => e.modelValue), (v) => o("update:modelValue", v), O(() => e.defaultValue)), _ = O(() => V.value === void 0 ? ue(b.value, { 1: [], 0: void 0 }) : V.value), E = null, y = null;
1146
+ function w(v) {
1147
1147
  return ue(b.value, { 0() {
1148
- return w == null ? void 0 : w(v);
1148
+ return I == null ? void 0 : I(v);
1149
1149
  }, 1: () => {
1150
- let p = ne(E.value.value).slice(), k = ne(v), A = p.findIndex((j) => E.compare(k, ne(j)));
1151
- return A === -1 ? p.push(k) : p.splice(A, 1), w == null ? void 0 : w(p);
1150
+ let p = ne(S.value.value).slice(), L = ne(v), M = p.findIndex((j) => S.compare(L, ne(j)));
1151
+ return M === -1 ? p.push(L) : p.splice(M, 1), I == null ? void 0 : I(p);
1152
1152
  } });
1153
1153
  }
1154
- let S = L(() => {
1154
+ let m = O(() => {
1155
1155
  });
1156
- F([S], ([v], [p]) => {
1157
- if (E.virtual.value && v && p && d.value !== null) {
1158
- let k = v.indexOf(p[d.value]);
1159
- k !== -1 ? d.value = k : d.value = null;
1156
+ F([m], ([v], [p]) => {
1157
+ if (S.virtual.value && v && p && d.value !== null) {
1158
+ let L = v.indexOf(p[d.value]);
1159
+ L !== -1 ? d.value = L : d.value = null;
1160
1160
  }
1161
1161
  });
1162
- let E = { comboboxState: l, value: y, mode: b, compare(v, p) {
1162
+ let S = { comboboxState: l, value: _, mode: b, compare(v, p) {
1163
1163
  if (typeof e.by == "string") {
1164
- let k = e.by;
1165
- return (v == null ? void 0 : v[k]) === (p == null ? void 0 : p[k]);
1164
+ let L = e.by;
1165
+ return (v == null ? void 0 : v[L]) === (p == null ? void 0 : p[L]);
1166
1166
  }
1167
1167
  return e.by === null ? fl(v, p) : e.by(v, p);
1168
1168
  }, calculateIndex(v) {
1169
- return E.virtual.value ? e.by === null ? E.virtual.value.options.indexOf(v) : E.virtual.value.options.findIndex((p) => E.compare(p, v)) : c.value.findIndex((p) => E.compare(p.dataRef.value, v));
1170
- }, defaultValue: L(() => e.defaultValue), nullable: I, immediate: L(() => !1), virtual: L(() => null), inputRef: r, labelRef: s, buttonRef: a, optionsRef: i, disabled: L(() => e.disabled), options: c, change(v) {
1171
- w(v);
1172
- }, activeOptionIndex: L(() => {
1173
- if (m.value && d.value === null && (E.virtual.value ? E.virtual.value.options.length > 0 : c.value.length > 0)) {
1174
- if (E.virtual.value) {
1175
- let p = E.virtual.value.options.findIndex((k) => {
1176
- var A;
1177
- return !((A = E.virtual.value) != null && A.disabled(k));
1169
+ return S.virtual.value ? e.by === null ? S.virtual.value.options.indexOf(v) : S.virtual.value.options.findIndex((p) => S.compare(p, v)) : c.value.findIndex((p) => S.compare(p.dataRef.value, v));
1170
+ }, defaultValue: O(() => e.defaultValue), nullable: A, immediate: O(() => !1), virtual: O(() => null), inputRef: r, labelRef: s, buttonRef: a, optionsRef: i, disabled: O(() => e.disabled), options: c, change(v) {
1171
+ I(v);
1172
+ }, activeOptionIndex: O(() => {
1173
+ if (g.value && d.value === null && (S.virtual.value ? S.virtual.value.options.length > 0 : c.value.length > 0)) {
1174
+ if (S.virtual.value) {
1175
+ let p = S.virtual.value.options.findIndex((L) => {
1176
+ var M;
1177
+ return !((M = S.virtual.value) != null && M.disabled(L));
1178
1178
  });
1179
1179
  if (p !== -1) return p;
1180
1180
  }
@@ -1182,92 +1182,92 @@ let _n = Symbol("VirtualContext"), ml = pe({ name: "VirtualProvider", setup(e, {
1182
1182
  if (v !== -1) return v;
1183
1183
  }
1184
1184
  return d.value;
1185
- }), activationTrigger: x, optionsPropsRef: u, closeCombobox() {
1186
- m.value = !1, !e.disabled && l.value !== 1 && (l.value = 1, d.value = null);
1185
+ }), activationTrigger: T, optionsPropsRef: u, closeCombobox() {
1186
+ g.value = !1, !e.disabled && l.value !== 1 && (l.value = 1, d.value = null);
1187
1187
  }, openCombobox() {
1188
- if (m.value = !0, !e.disabled && l.value !== 0) {
1189
- if (E.value.value) {
1190
- let v = E.calculateIndex(E.value.value);
1188
+ if (g.value = !0, !e.disabled && l.value !== 0) {
1189
+ if (S.value.value) {
1190
+ let v = S.calculateIndex(S.value.value);
1191
1191
  v !== -1 && (d.value = v);
1192
1192
  }
1193
1193
  l.value = 0;
1194
1194
  }
1195
1195
  }, setActivationTrigger(v) {
1196
- x.value = v;
1197
- }, goToOption(v, p, k) {
1198
- m.value = !1, _ !== null && cancelAnimationFrame(_), _ = requestAnimationFrame(() => {
1196
+ T.value = v;
1197
+ }, goToOption(v, p, L) {
1198
+ g.value = !1, E !== null && cancelAnimationFrame(E), E = requestAnimationFrame(() => {
1199
1199
  if (e.disabled || i.value && !u.value.static && l.value === 1) return;
1200
- if (E.virtual.value) {
1201
- d.value = v === q.Specific ? p : Ht({ focus: v }, { resolveItems: () => E.virtual.value.options, resolveActiveIndex: () => {
1200
+ if (S.virtual.value) {
1201
+ d.value = v === q.Specific ? p : Ht({ focus: v }, { resolveItems: () => S.virtual.value.options, resolveActiveIndex: () => {
1202
1202
  var H, K;
1203
- return (K = (H = E.activeOptionIndex.value) != null ? H : E.virtual.value.options.findIndex((ee) => {
1204
- var Z;
1205
- return !((Z = E.virtual.value) != null && Z.disabled(ee));
1203
+ return (K = (H = S.activeOptionIndex.value) != null ? H : S.virtual.value.options.findIndex((ee) => {
1204
+ var U;
1205
+ return !((U = S.virtual.value) != null && U.disabled(ee));
1206
1206
  })) != null ? K : null;
1207
- }, resolveDisabled: (H) => E.virtual.value.disabled(H), resolveId() {
1207
+ }, resolveDisabled: (H) => S.virtual.value.disabled(H), resolveId() {
1208
1208
  throw new Error("Function not implemented.");
1209
- } }), x.value = k ?? 2;
1209
+ } }), T.value = L ?? 2;
1210
1210
  return;
1211
1211
  }
1212
- let A = C();
1213
- if (A.activeOptionIndex === null) {
1214
- let H = A.options.findIndex((K) => !K.dataRef.disabled);
1215
- H !== -1 && (A.activeOptionIndex = H);
1212
+ let M = x();
1213
+ if (M.activeOptionIndex === null) {
1214
+ let H = M.options.findIndex((K) => !K.dataRef.disabled);
1215
+ H !== -1 && (M.activeOptionIndex = H);
1216
1216
  }
1217
- let j = v === q.Specific ? p : Ht({ focus: v }, { resolveItems: () => A.options, resolveActiveIndex: () => A.activeOptionIndex, resolveId: (H) => H.id, resolveDisabled: (H) => H.dataRef.disabled });
1218
- d.value = j, x.value = k ?? 2, c.value = A.options;
1217
+ let j = v === q.Specific ? p : Ht({ focus: v }, { resolveItems: () => M.options, resolveActiveIndex: () => M.activeOptionIndex, resolveId: (H) => H.id, resolveDisabled: (H) => H.dataRef.disabled });
1218
+ d.value = j, T.value = L ?? 2, c.value = M.options;
1219
1219
  });
1220
1220
  }, selectOption(v) {
1221
- let p = c.value.find((A) => A.id === v);
1221
+ let p = c.value.find((M) => M.id === v);
1222
1222
  if (!p) return;
1223
- let { dataRef: k } = p;
1224
- V(k.value);
1223
+ let { dataRef: L } = p;
1224
+ w(L.value);
1225
1225
  }, selectActiveOption() {
1226
- if (E.activeOptionIndex.value !== null) {
1227
- if (E.virtual.value) V(E.virtual.value.options[E.activeOptionIndex.value]);
1226
+ if (S.activeOptionIndex.value !== null) {
1227
+ if (S.virtual.value) w(S.virtual.value.options[S.activeOptionIndex.value]);
1228
1228
  else {
1229
- let { dataRef: v } = c.value[E.activeOptionIndex.value];
1230
- V(v.value);
1229
+ let { dataRef: v } = c.value[S.activeOptionIndex.value];
1230
+ w(v.value);
1231
1231
  }
1232
- E.goToOption(q.Specific, E.activeOptionIndex.value);
1232
+ S.goToOption(q.Specific, S.activeOptionIndex.value);
1233
1233
  }
1234
1234
  }, registerOption(v, p) {
1235
- let k = an({ id: v, dataRef: p });
1236
- if (E.virtual.value) {
1237
- c.value.push(k);
1235
+ let L = an({ id: v, dataRef: p });
1236
+ if (S.virtual.value) {
1237
+ c.value.push(L);
1238
1238
  return;
1239
1239
  }
1240
- T && cancelAnimationFrame(T);
1241
- let A = C((j) => (j.push(k), j));
1242
- d.value === null && E.isSelected(p.value.value) && (A.activeOptionIndex = A.options.indexOf(k)), c.value = A.options, d.value = A.activeOptionIndex, x.value = 2, A.options.some((j) => !N(j.dataRef.domRef)) && (T = requestAnimationFrame(() => {
1243
- let j = C();
1240
+ y && cancelAnimationFrame(y);
1241
+ let M = x((j) => (j.push(L), j));
1242
+ d.value === null && S.isSelected(p.value.value) && (M.activeOptionIndex = M.options.indexOf(L)), c.value = M.options, d.value = M.activeOptionIndex, T.value = 2, M.options.some((j) => !B(j.dataRef.domRef)) && (y = requestAnimationFrame(() => {
1243
+ let j = x();
1244
1244
  c.value = j.options, d.value = j.activeOptionIndex;
1245
1245
  }));
1246
1246
  }, unregisterOption(v, p) {
1247
- if (_ !== null && cancelAnimationFrame(_), p && (m.value = !0), E.virtual.value) {
1248
- c.value = c.value.filter((A) => A.id !== v);
1247
+ if (E !== null && cancelAnimationFrame(E), p && (g.value = !0), S.virtual.value) {
1248
+ c.value = c.value.filter((M) => M.id !== v);
1249
1249
  return;
1250
1250
  }
1251
- let k = C((A) => {
1252
- let j = A.findIndex((H) => H.id === v);
1253
- return j !== -1 && A.splice(j, 1), A;
1251
+ let L = x((M) => {
1252
+ let j = M.findIndex((H) => H.id === v);
1253
+ return j !== -1 && M.splice(j, 1), M;
1254
1254
  });
1255
- c.value = k.options, d.value = k.activeOptionIndex, x.value = 2;
1255
+ c.value = L.options, d.value = L.activeOptionIndex, T.value = 2;
1256
1256
  }, isSelected(v) {
1257
- return ue(b.value, { 0: () => E.compare(ne(E.value.value), ne(v)), 1: () => ne(E.value.value).some((p) => E.compare(ne(p), ne(v))) });
1257
+ return ue(b.value, { 0: () => S.compare(ne(S.value.value), ne(v)), 1: () => ne(S.value.value).some((p) => S.compare(ne(p), ne(v))) });
1258
1258
  }, isActive(v) {
1259
- return d.value === E.calculateIndex(v);
1259
+ return d.value === S.calculateIndex(v);
1260
1260
  } };
1261
- el([r, a, i], () => E.closeCombobox(), L(() => l.value === 0)), ce(wn, E), ul(L(() => ue(l.value, { 0: Re.Open, 1: Re.Closed })));
1262
- let D = L(() => {
1261
+ el([r, a, i], () => S.closeCombobox(), O(() => l.value === 0)), ce(wn, S), ul(O(() => ue(l.value, { 0: Re.Open, 1: Re.Closed })));
1262
+ let D = O(() => {
1263
1263
  var v;
1264
- return (v = N(r)) == null ? void 0 : v.closest("form");
1264
+ return (v = B(r)) == null ? void 0 : v.closest("form");
1265
1265
  });
1266
1266
  return se(() => {
1267
1267
  F([D], () => {
1268
1268
  if (!D.value || e.defaultValue === void 0) return;
1269
1269
  function v() {
1270
- E.change(e.defaultValue);
1270
+ S.change(e.defaultValue);
1271
1271
  }
1272
1272
  return D.value.addEventListener("reset", v), () => {
1273
1273
  var p;
@@ -1275,9 +1275,9 @@ let _n = Symbol("VirtualContext"), ml = pe({ name: "VirtualProvider", setup(e, {
1275
1275
  };
1276
1276
  }, { immediate: !0 });
1277
1277
  }), () => {
1278
- var v, p, k;
1279
- let { name: A, disabled: j, form: H, ...K } = e, ee = { open: l.value === 0, disabled: j, activeIndex: E.activeOptionIndex.value, activeOption: E.activeOptionIndex.value === null ? null : E.virtual.value ? E.virtual.value.options[(v = E.activeOptionIndex.value) != null ? v : 0] : (k = (p = E.options.value[E.activeOptionIndex.value]) == null ? void 0 : p.dataRef.value) != null ? k : null, value: y.value };
1280
- return Ve(z, [...A != null && y.value != null ? Cn({ [A]: y.value }).map(([Z, zn]) => Ve(rl, sl({ features: mn.Hidden, key: Z, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: H, disabled: j, name: Z, value: zn }))) : [], ye({ theirProps: { ...t, ...ot(K, ["by", "defaultValue", "immediate", "modelValue", "multiple", "nullable", "onUpdate:modelValue", "virtual"]) }, ourProps: {}, slot: ee, slots: n, attrs: t, name: "Combobox" })]);
1278
+ var v, p, L;
1279
+ let { name: M, disabled: j, form: H, ...K } = e, ee = { open: l.value === 0, disabled: j, activeIndex: S.activeOptionIndex.value, activeOption: S.activeOptionIndex.value === null ? null : S.virtual.value ? S.virtual.value.options[(v = S.activeOptionIndex.value) != null ? v : 0] : (L = (p = S.options.value[S.activeOptionIndex.value]) == null ? void 0 : p.dataRef.value) != null ? L : null, value: _.value };
1280
+ return Ve(z, [...M != null && _.value != null ? Cn({ [M]: _.value }).map(([U, zn]) => Ve(rl, sl({ features: mn.Hidden, key: U, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: H, disabled: j, name: U, value: zn }))) : [], ye({ theirProps: { ...t, ...ot(K, ["by", "defaultValue", "immediate", "modelValue", "multiple", "nullable", "onUpdate:modelValue", "virtual"]) }, ourProps: {}, slot: ee, slots: n, attrs: t, name: "Combobox" })]);
1281
1281
  };
1282
1282
  } });
1283
1283
  pe({ name: "ComboboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: null } }, setup(e, { attrs: n, slots: t }) {
@@ -1285,7 +1285,7 @@ pe({ name: "ComboboxLabel", props: { as: { type: [Object, String], default: "lab
1285
1285
  let l = (o = e.id) != null ? o : `headlessui-combobox-label-${je()}`, s = we("ComboboxLabel");
1286
1286
  function r() {
1287
1287
  var a;
1288
- (a = N(s.inputRef)) == null || a.focus({ preventScroll: !0 });
1288
+ (a = B(s.inputRef)) == null || a.focus({ preventScroll: !0 });
1289
1289
  }
1290
1290
  return () => {
1291
1291
  let a = { open: s.comboboxState.value === 0, disabled: s.disabled.value }, { ...i } = e, u = { id: l, ref: s.labelRef, onClick: r };
@@ -1297,149 +1297,149 @@ let bl = pe({ name: "ComboboxButton", props: { as: { type: [Object, String], def
1297
1297
  let s = (l = e.id) != null ? l : `headlessui-combobox-button-${je()}`, r = we("ComboboxButton");
1298
1298
  o({ el: r.buttonRef, $el: r.buttonRef });
1299
1299
  function a(c) {
1300
- r.disabled.value || (r.comboboxState.value === 0 ? r.closeCombobox() : (c.preventDefault(), r.openCombobox()), X(() => {
1300
+ r.disabled.value || (r.comboboxState.value === 0 ? r.closeCombobox() : (c.preventDefault(), r.openCombobox()), Y(() => {
1301
1301
  var d;
1302
- return (d = N(r.inputRef)) == null ? void 0 : d.focus({ preventScroll: !0 });
1302
+ return (d = B(r.inputRef)) == null ? void 0 : d.focus({ preventScroll: !0 });
1303
1303
  }));
1304
1304
  }
1305
1305
  function i(c) {
1306
1306
  switch (c.key) {
1307
- case Q.ArrowDown:
1308
- c.preventDefault(), c.stopPropagation(), r.comboboxState.value === 1 && r.openCombobox(), X(() => {
1307
+ case X.ArrowDown:
1308
+ c.preventDefault(), c.stopPropagation(), r.comboboxState.value === 1 && r.openCombobox(), Y(() => {
1309
1309
  var d;
1310
1310
  return (d = r.inputRef.value) == null ? void 0 : d.focus({ preventScroll: !0 });
1311
1311
  });
1312
1312
  return;
1313
- case Q.ArrowUp:
1314
- c.preventDefault(), c.stopPropagation(), r.comboboxState.value === 1 && (r.openCombobox(), X(() => {
1313
+ case X.ArrowUp:
1314
+ c.preventDefault(), c.stopPropagation(), r.comboboxState.value === 1 && (r.openCombobox(), Y(() => {
1315
1315
  r.value.value || r.goToOption(q.Last);
1316
- })), X(() => {
1316
+ })), Y(() => {
1317
1317
  var d;
1318
1318
  return (d = r.inputRef.value) == null ? void 0 : d.focus({ preventScroll: !0 });
1319
1319
  });
1320
1320
  return;
1321
- case Q.Escape:
1321
+ case X.Escape:
1322
1322
  if (r.comboboxState.value !== 0) return;
1323
- c.preventDefault(), r.optionsRef.value && !r.optionsPropsRef.value.static && c.stopPropagation(), r.closeCombobox(), X(() => {
1323
+ c.preventDefault(), r.optionsRef.value && !r.optionsPropsRef.value.static && c.stopPropagation(), r.closeCombobox(), Y(() => {
1324
1324
  var d;
1325
1325
  return (d = r.inputRef.value) == null ? void 0 : d.focus({ preventScroll: !0 });
1326
1326
  });
1327
1327
  return;
1328
1328
  }
1329
1329
  }
1330
- let u = tl(L(() => ({ as: e.as, type: n.type })), r.buttonRef);
1330
+ let u = tl(O(() => ({ as: e.as, type: n.type })), r.buttonRef);
1331
1331
  return () => {
1332
1332
  var c, d;
1333
- let x = { open: r.comboboxState.value === 0, disabled: r.disabled.value, value: r.value.value }, { ...m } = e, C = { ref: r.buttonRef, id: s, type: u.value, tabindex: "-1", "aria-haspopup": "listbox", "aria-controls": (c = N(r.optionsRef)) == null ? void 0 : c.id, "aria-expanded": r.comboboxState.value === 0, "aria-labelledby": r.labelRef.value ? [(d = N(r.labelRef)) == null ? void 0 : d.id, s].join(" ") : void 0, disabled: r.disabled.value === !0 ? !0 : void 0, onKeydown: i, onClick: a };
1334
- return ye({ ourProps: C, theirProps: m, slot: x, attrs: n, slots: t, name: "ComboboxButton" });
1333
+ let T = { open: r.comboboxState.value === 0, disabled: r.disabled.value, value: r.value.value }, { ...g } = e, x = { ref: r.buttonRef, id: s, type: u.value, tabindex: "-1", "aria-haspopup": "listbox", "aria-controls": (c = B(r.optionsRef)) == null ? void 0 : c.id, "aria-expanded": r.comboboxState.value === 0, "aria-labelledby": r.labelRef.value ? [(d = B(r.labelRef)) == null ? void 0 : d.id, s].join(" ") : void 0, disabled: r.disabled.value === !0 ? !0 : void 0, onKeydown: i, onClick: a };
1334
+ return ye({ ourProps: x, theirProps: g, slot: T, attrs: n, slots: t, name: "ComboboxButton" });
1335
1335
  };
1336
1336
  } }), Cl = pe({ name: "ComboboxInput", props: { as: { type: [Object, String], default: "input" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, displayValue: { type: Function }, defaultValue: { type: String, default: void 0 }, id: { type: String, default: null } }, emits: { change: (e) => !0 }, setup(e, { emit: n, attrs: t, slots: o, expose: l }) {
1337
1337
  var s;
1338
- let r = (s = e.id) != null ? s : `headlessui-combobox-input-${je()}`, a = we("ComboboxInput"), i = L(() => It(N(a.inputRef))), u = { value: !1 };
1338
+ let r = (s = e.id) != null ? s : `headlessui-combobox-input-${je()}`, a = we("ComboboxInput"), i = O(() => Lt(B(a.inputRef))), u = { value: !1 };
1339
1339
  l({ el: a.inputRef, $el: a.inputRef });
1340
1340
  function c() {
1341
1341
  a.change(null);
1342
- let T = N(a.optionsRef);
1343
- T && (T.scrollTop = 0), a.goToOption(q.Nothing);
1342
+ let y = B(a.optionsRef);
1343
+ y && (y.scrollTop = 0), a.goToOption(q.Nothing);
1344
1344
  }
1345
- let d = L(() => {
1346
- var T;
1347
- let V = a.value.value;
1348
- return N(a.inputRef) ? typeof e.displayValue < "u" && V !== void 0 ? (T = e.displayValue(V)) != null ? T : "" : typeof V == "string" ? V : "" : "";
1345
+ let d = O(() => {
1346
+ var y;
1347
+ let w = a.value.value;
1348
+ return B(a.inputRef) ? typeof e.displayValue < "u" && w !== void 0 ? (y = e.displayValue(w)) != null ? y : "" : typeof w == "string" ? w : "" : "";
1349
1349
  });
1350
1350
  se(() => {
1351
- F([d, a.comboboxState, i], ([T, V], [S, E]) => {
1351
+ F([d, a.comboboxState, i], ([y, w], [m, S]) => {
1352
1352
  if (u.value) return;
1353
- let D = N(a.inputRef);
1354
- D && ((E === 0 && V === 1 || T !== S) && (D.value = T), requestAnimationFrame(() => {
1353
+ let D = B(a.inputRef);
1354
+ D && ((S === 0 && w === 1 || y !== m) && (D.value = y), requestAnimationFrame(() => {
1355
1355
  var v;
1356
1356
  if (u.value || !D || ((v = i.value) == null ? void 0 : v.activeElement) !== D) return;
1357
- let { selectionStart: p, selectionEnd: k } = D;
1358
- Math.abs((k ?? 0) - (p ?? 0)) === 0 && p === 0 && D.setSelectionRange(D.value.length, D.value.length);
1357
+ let { selectionStart: p, selectionEnd: L } = D;
1358
+ Math.abs((L ?? 0) - (p ?? 0)) === 0 && p === 0 && D.setSelectionRange(D.value.length, D.value.length);
1359
1359
  }));
1360
- }, { immediate: !0 }), F([a.comboboxState], ([T], [V]) => {
1361
- if (T === 0 && V === 1) {
1360
+ }, { immediate: !0 }), F([a.comboboxState], ([y], [w]) => {
1361
+ if (y === 0 && w === 1) {
1362
1362
  if (u.value) return;
1363
- let S = N(a.inputRef);
1364
- if (!S) return;
1365
- let E = S.value, { selectionStart: D, selectionEnd: v, selectionDirection: p } = S;
1366
- S.value = "", S.value = E, p !== null ? S.setSelectionRange(D, v, p) : S.setSelectionRange(D, v);
1363
+ let m = B(a.inputRef);
1364
+ if (!m) return;
1365
+ let S = m.value, { selectionStart: D, selectionEnd: v, selectionDirection: p } = m;
1366
+ m.value = "", m.value = S, p !== null ? m.setSelectionRange(D, v, p) : m.setSelectionRange(D, v);
1367
1367
  }
1368
1368
  });
1369
1369
  });
1370
- let x = O(!1);
1371
- function m() {
1372
- x.value = !0;
1370
+ let T = $(!1);
1371
+ function g() {
1372
+ T.value = !0;
1373
1373
  }
1374
- function C() {
1374
+ function x() {
1375
1375
  Qe().nextFrame(() => {
1376
- x.value = !1;
1376
+ T.value = !1;
1377
1377
  });
1378
1378
  }
1379
- let b = Bo();
1380
- function I(T) {
1379
+ let b = No();
1380
+ function A(y) {
1381
1381
  switch (u.value = !0, b(() => {
1382
1382
  u.value = !1;
1383
- }), T.key) {
1384
- case Q.Enter:
1385
- if (u.value = !1, a.comboboxState.value !== 0 || x.value) return;
1386
- if (T.preventDefault(), T.stopPropagation(), a.activeOptionIndex.value === null) {
1383
+ }), y.key) {
1384
+ case X.Enter:
1385
+ if (u.value = !1, a.comboboxState.value !== 0 || T.value) return;
1386
+ if (y.preventDefault(), y.stopPropagation(), a.activeOptionIndex.value === null) {
1387
1387
  a.closeCombobox();
1388
1388
  return;
1389
1389
  }
1390
1390
  a.selectActiveOption(), a.mode.value === 0 && a.closeCombobox();
1391
1391
  break;
1392
- case Q.ArrowDown:
1393
- return u.value = !1, T.preventDefault(), T.stopPropagation(), ue(a.comboboxState.value, { 0: () => a.goToOption(q.Next), 1: () => a.openCombobox() });
1394
- case Q.ArrowUp:
1395
- return u.value = !1, T.preventDefault(), T.stopPropagation(), ue(a.comboboxState.value, { 0: () => a.goToOption(q.Previous), 1: () => {
1396
- a.openCombobox(), X(() => {
1392
+ case X.ArrowDown:
1393
+ return u.value = !1, y.preventDefault(), y.stopPropagation(), ue(a.comboboxState.value, { 0: () => a.goToOption(q.Next), 1: () => a.openCombobox() });
1394
+ case X.ArrowUp:
1395
+ return u.value = !1, y.preventDefault(), y.stopPropagation(), ue(a.comboboxState.value, { 0: () => a.goToOption(q.Previous), 1: () => {
1396
+ a.openCombobox(), Y(() => {
1397
1397
  a.value.value || a.goToOption(q.Last);
1398
1398
  });
1399
1399
  } });
1400
- case Q.Home:
1401
- if (T.shiftKey) break;
1402
- return u.value = !1, T.preventDefault(), T.stopPropagation(), a.goToOption(q.First);
1403
- case Q.PageUp:
1404
- return u.value = !1, T.preventDefault(), T.stopPropagation(), a.goToOption(q.First);
1405
- case Q.End:
1406
- if (T.shiftKey) break;
1407
- return u.value = !1, T.preventDefault(), T.stopPropagation(), a.goToOption(q.Last);
1408
- case Q.PageDown:
1409
- return u.value = !1, T.preventDefault(), T.stopPropagation(), a.goToOption(q.Last);
1410
- case Q.Escape:
1400
+ case X.Home:
1401
+ if (y.shiftKey) break;
1402
+ return u.value = !1, y.preventDefault(), y.stopPropagation(), a.goToOption(q.First);
1403
+ case X.PageUp:
1404
+ return u.value = !1, y.preventDefault(), y.stopPropagation(), a.goToOption(q.First);
1405
+ case X.End:
1406
+ if (y.shiftKey) break;
1407
+ return u.value = !1, y.preventDefault(), y.stopPropagation(), a.goToOption(q.Last);
1408
+ case X.PageDown:
1409
+ return u.value = !1, y.preventDefault(), y.stopPropagation(), a.goToOption(q.Last);
1410
+ case X.Escape:
1411
1411
  if (u.value = !1, a.comboboxState.value !== 0) return;
1412
- T.preventDefault(), a.optionsRef.value && !a.optionsPropsRef.value.static && T.stopPropagation(), a.nullable.value && a.mode.value === 0 && a.value.value === null && c(), a.closeCombobox();
1412
+ y.preventDefault(), a.optionsRef.value && !a.optionsPropsRef.value.static && y.stopPropagation(), a.nullable.value && a.mode.value === 0 && a.value.value === null && c(), a.closeCombobox();
1413
1413
  break;
1414
- case Q.Tab:
1414
+ case X.Tab:
1415
1415
  if (u.value = !1, a.comboboxState.value !== 0) return;
1416
1416
  a.mode.value === 0 && a.activationTrigger.value !== 1 && a.selectActiveOption(), a.closeCombobox();
1417
1417
  break;
1418
1418
  }
1419
1419
  }
1420
- function $(T) {
1421
- n("change", T), a.nullable.value && a.mode.value === 0 && T.target.value === "" && c(), a.openCombobox();
1420
+ function V(y) {
1421
+ n("change", y), a.nullable.value && a.mode.value === 0 && y.target.value === "" && c(), a.openCombobox();
1422
1422
  }
1423
- function w(T) {
1424
- var V, S, E;
1425
- let D = (V = T.relatedTarget) != null ? V : ge.find((v) => v !== T.currentTarget);
1426
- if (u.value = !1, !((S = N(a.optionsRef)) != null && S.contains(D)) && !((E = N(a.buttonRef)) != null && E.contains(D)) && a.comboboxState.value === 0) return T.preventDefault(), a.mode.value === 0 && (a.nullable.value && a.value.value === null ? c() : a.activationTrigger.value !== 1 && a.selectActiveOption()), a.closeCombobox();
1423
+ function I(y) {
1424
+ var w, m, S;
1425
+ let D = (w = y.relatedTarget) != null ? w : ge.find((v) => v !== y.currentTarget);
1426
+ if (u.value = !1, !((m = B(a.optionsRef)) != null && m.contains(D)) && !((S = B(a.buttonRef)) != null && S.contains(D)) && a.comboboxState.value === 0) return y.preventDefault(), a.mode.value === 0 && (a.nullable.value && a.value.value === null ? c() : a.activationTrigger.value !== 1 && a.selectActiveOption()), a.closeCombobox();
1427
1427
  }
1428
- function y(T) {
1429
- var V, S, E;
1430
- let D = (V = T.relatedTarget) != null ? V : ge.find((v) => v !== T.currentTarget);
1431
- (S = N(a.buttonRef)) != null && S.contains(D) || (E = N(a.optionsRef)) != null && E.contains(D) || a.disabled.value || a.immediate.value && a.comboboxState.value !== 0 && (a.openCombobox(), Qe().nextFrame(() => {
1428
+ function _(y) {
1429
+ var w, m, S;
1430
+ let D = (w = y.relatedTarget) != null ? w : ge.find((v) => v !== y.currentTarget);
1431
+ (m = B(a.buttonRef)) != null && m.contains(D) || (S = B(a.optionsRef)) != null && S.contains(D) || a.disabled.value || a.immediate.value && a.comboboxState.value !== 0 && (a.openCombobox(), Qe().nextFrame(() => {
1432
1432
  a.setActivationTrigger(1);
1433
1433
  }));
1434
1434
  }
1435
- let _ = L(() => {
1436
- var T, V, S, E;
1437
- return (E = (S = (V = e.defaultValue) != null ? V : a.defaultValue.value !== void 0 ? (T = e.displayValue) == null ? void 0 : T.call(e, a.defaultValue.value) : null) != null ? S : a.defaultValue.value) != null ? E : "";
1435
+ let E = O(() => {
1436
+ var y, w, m, S;
1437
+ return (S = (m = (w = e.defaultValue) != null ? w : a.defaultValue.value !== void 0 ? (y = e.displayValue) == null ? void 0 : y.call(e, a.defaultValue.value) : null) != null ? m : a.defaultValue.value) != null ? S : "";
1438
1438
  });
1439
1439
  return () => {
1440
- var T, V, S, E, D, v, p;
1441
- let k = { open: a.comboboxState.value === 0 }, { displayValue: A, onChange: j, ...H } = e, K = { "aria-controls": (T = a.optionsRef.value) == null ? void 0 : T.id, "aria-expanded": a.comboboxState.value === 0, "aria-activedescendant": a.activeOptionIndex.value === null ? void 0 : a.virtual.value ? (V = a.options.value.find((ee) => !a.virtual.value.disabled(ee.dataRef.value) && a.compare(ee.dataRef.value, a.virtual.value.options[a.activeOptionIndex.value]))) == null ? void 0 : V.id : (S = a.options.value[a.activeOptionIndex.value]) == null ? void 0 : S.id, "aria-labelledby": (v = (E = N(a.labelRef)) == null ? void 0 : E.id) != null ? v : (D = N(a.buttonRef)) == null ? void 0 : D.id, "aria-autocomplete": "list", id: r, onCompositionstart: m, onCompositionend: C, onKeydown: I, onInput: $, onFocus: y, onBlur: w, role: "combobox", type: (p = t.type) != null ? p : "text", tabIndex: 0, ref: a.inputRef, defaultValue: _.value, disabled: a.disabled.value === !0 ? !0 : void 0 };
1442
- return ye({ ourProps: K, theirProps: H, slot: k, attrs: t, slots: o, features: De.RenderStrategy | De.Static, name: "ComboboxInput" });
1440
+ var y, w, m, S, D, v, p;
1441
+ let L = { open: a.comboboxState.value === 0 }, { displayValue: M, onChange: j, ...H } = e, K = { "aria-controls": (y = a.optionsRef.value) == null ? void 0 : y.id, "aria-expanded": a.comboboxState.value === 0, "aria-activedescendant": a.activeOptionIndex.value === null ? void 0 : a.virtual.value ? (w = a.options.value.find((ee) => !a.virtual.value.disabled(ee.dataRef.value) && a.compare(ee.dataRef.value, a.virtual.value.options[a.activeOptionIndex.value]))) == null ? void 0 : w.id : (m = a.options.value[a.activeOptionIndex.value]) == null ? void 0 : m.id, "aria-labelledby": (v = (S = B(a.labelRef)) == null ? void 0 : S.id) != null ? v : (D = B(a.buttonRef)) == null ? void 0 : D.id, "aria-autocomplete": "list", id: r, onCompositionstart: g, onCompositionend: x, onKeydown: A, onInput: V, onFocus: _, onBlur: I, role: "combobox", type: (p = t.type) != null ? p : "text", tabIndex: 0, ref: a.inputRef, defaultValue: E.value, disabled: a.disabled.value === !0 ? !0 : void 0 };
1442
+ return ye({ ourProps: K, theirProps: H, slot: L, attrs: t, slots: o, features: De.RenderStrategy | De.Static, name: "ComboboxInput" });
1443
1443
  };
1444
1444
  } }), xl = pe({ name: "ComboboxOptions", props: { as: { type: [Object, String], default: "ul" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, hold: { type: [Boolean], default: !1 } }, setup(e, { attrs: n, slots: t, expose: o }) {
1445
1445
  let l = we("ComboboxOptions"), s = `headlessui-combobox-options-${je()}`;
@@ -1448,8 +1448,8 @@ let bl = pe({ name: "ComboboxButton", props: { as: { type: [Object, String], def
1448
1448
  }), fe(() => {
1449
1449
  l.optionsPropsRef.value.hold = e.hold;
1450
1450
  });
1451
- let r = il(), a = L(() => r !== null ? (r.value & Re.Open) === Re.Open : l.comboboxState.value === 0);
1452
- ol({ container: L(() => N(l.optionsRef)), enabled: L(() => l.comboboxState.value === 0), accept(u) {
1451
+ let r = il(), a = O(() => r !== null ? (r.value & Re.Open) === Re.Open : l.comboboxState.value === 0);
1452
+ ol({ container: O(() => B(l.optionsRef)), enabled: O(() => l.comboboxState.value === 0), accept(u) {
1453
1453
  return u.getAttribute("role") === "option" ? NodeFilter.FILTER_REJECT : u.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
1454
1454
  }, walk(u) {
1455
1455
  u.setAttribute("role", "none");
@@ -1459,58 +1459,58 @@ let bl = pe({ name: "ComboboxButton", props: { as: { type: [Object, String], def
1459
1459
  }
1460
1460
  return () => {
1461
1461
  var u, c, d;
1462
- let x = { open: l.comboboxState.value === 0 }, m = { "aria-labelledby": (d = (u = N(l.labelRef)) == null ? void 0 : u.id) != null ? d : (c = N(l.buttonRef)) == null ? void 0 : c.id, id: s, ref: l.optionsRef, role: "listbox", "aria-multiselectable": l.mode.value === 1 ? !0 : void 0, onMousedown: i }, C = ot(e, ["hold"]);
1463
- return ye({ ourProps: m, theirProps: C, slot: x, attrs: n, slots: l.virtual.value && l.comboboxState.value === 0 ? { ...t, default: () => [Ve(ml, {}, t.default)] } : t, features: De.RenderStrategy | De.Static, visible: a.value, name: "ComboboxOptions" });
1462
+ let T = { open: l.comboboxState.value === 0 }, g = { "aria-labelledby": (d = (u = B(l.labelRef)) == null ? void 0 : u.id) != null ? d : (c = B(l.buttonRef)) == null ? void 0 : c.id, id: s, ref: l.optionsRef, role: "listbox", "aria-multiselectable": l.mode.value === 1 ? !0 : void 0, onMousedown: i }, x = ot(e, ["hold"]);
1463
+ return ye({ ourProps: g, theirProps: x, slot: T, attrs: n, slots: l.virtual.value && l.comboboxState.value === 0 ? { ...t, default: () => [Ve(ml, {}, t.default)] } : t, features: De.RenderStrategy | De.Static, visible: a.value, name: "ComboboxOptions" });
1464
1464
  };
1465
1465
  } }), yl = pe({ name: "ComboboxOption", props: { as: { type: [Object, String], default: "li" }, value: { type: [Object, String, Number, Boolean] }, disabled: { type: Boolean, default: !1 }, order: { type: [Number], default: null } }, setup(e, { slots: n, attrs: t, expose: o }) {
1466
- let l = we("ComboboxOption"), s = `headlessui-combobox-option-${je()}`, r = O(null), a = L(() => e.disabled);
1466
+ let l = we("ComboboxOption"), s = `headlessui-combobox-option-${je()}`, r = $(null), a = O(() => e.disabled);
1467
1467
  o({ el: r, $el: r });
1468
- let i = L(() => {
1469
- var w;
1470
- return l.virtual.value ? l.activeOptionIndex.value === l.calculateIndex(e.value) : l.activeOptionIndex.value === null ? !1 : ((w = l.options.value[l.activeOptionIndex.value]) == null ? void 0 : w.id) === s;
1471
- }), u = L(() => l.isSelected(e.value)), c = le(_n, null), d = L(() => ({ disabled: e.disabled, value: e.value, domRef: r, order: L(() => e.order) }));
1468
+ let i = O(() => {
1469
+ var I;
1470
+ return l.virtual.value ? l.activeOptionIndex.value === l.calculateIndex(e.value) : l.activeOptionIndex.value === null ? !1 : ((I = l.options.value[l.activeOptionIndex.value]) == null ? void 0 : I.id) === s;
1471
+ }), u = O(() => l.isSelected(e.value)), c = le(_n, null), d = O(() => ({ disabled: e.disabled, value: e.value, domRef: r, order: O(() => e.order) }));
1472
1472
  se(() => l.registerOption(s, d)), Fe(() => l.unregisterOption(s, i.value)), fe(() => {
1473
- let w = N(r);
1474
- w && (c == null || c.value.measureElement(w));
1473
+ let I = B(r);
1474
+ I && (c == null || c.value.measureElement(I));
1475
1475
  }), fe(() => {
1476
- l.comboboxState.value === 0 && i.value && (l.virtual.value || l.activationTrigger.value !== 0 && X(() => {
1477
- var w, y;
1478
- return (y = (w = N(r)) == null ? void 0 : w.scrollIntoView) == null ? void 0 : y.call(w, { block: "nearest" });
1476
+ l.comboboxState.value === 0 && i.value && (l.virtual.value || l.activationTrigger.value !== 0 && Y(() => {
1477
+ var I, _;
1478
+ return (_ = (I = B(r)) == null ? void 0 : I.scrollIntoView) == null ? void 0 : _.call(I, { block: "nearest" });
1479
1479
  }));
1480
1480
  });
1481
- function x(w) {
1482
- w.preventDefault(), w.button === bn.Left && (a.value || (l.selectOption(s), vn() || requestAnimationFrame(() => {
1483
- var y;
1484
- return (y = N(l.inputRef)) == null ? void 0 : y.focus({ preventScroll: !0 });
1481
+ function T(I) {
1482
+ I.preventDefault(), I.button === bn.Left && (a.value || (l.selectOption(s), vn() || requestAnimationFrame(() => {
1483
+ var _;
1484
+ return (_ = B(l.inputRef)) == null ? void 0 : _.focus({ preventScroll: !0 });
1485
1485
  }), l.mode.value === 0 && l.closeCombobox()));
1486
1486
  }
1487
- function m() {
1488
- var w;
1489
- if (e.disabled || (w = l.virtual.value) != null && w.disabled(e.value)) return l.goToOption(q.Nothing);
1490
- let y = l.calculateIndex(e.value);
1491
- l.goToOption(q.Specific, y);
1487
+ function g() {
1488
+ var I;
1489
+ if (e.disabled || (I = l.virtual.value) != null && I.disabled(e.value)) return l.goToOption(q.Nothing);
1490
+ let _ = l.calculateIndex(e.value);
1491
+ l.goToOption(q.Specific, _);
1492
1492
  }
1493
- let C = nl();
1494
- function b(w) {
1495
- C.update(w);
1493
+ let x = nl();
1494
+ function b(I) {
1495
+ x.update(I);
1496
1496
  }
1497
- function I(w) {
1498
- var y;
1499
- if (!C.wasMoved(w) || e.disabled || (y = l.virtual.value) != null && y.disabled(e.value) || i.value) return;
1500
- let _ = l.calculateIndex(e.value);
1501
- l.goToOption(q.Specific, _, 0);
1497
+ function A(I) {
1498
+ var _;
1499
+ if (!x.wasMoved(I) || e.disabled || (_ = l.virtual.value) != null && _.disabled(e.value) || i.value) return;
1500
+ let E = l.calculateIndex(e.value);
1501
+ l.goToOption(q.Specific, E, 0);
1502
1502
  }
1503
- function $(w) {
1504
- var y;
1505
- C.wasMoved(w) && (e.disabled || (y = l.virtual.value) != null && y.disabled(e.value) || i.value && (l.optionsPropsRef.value.hold || l.goToOption(q.Nothing)));
1503
+ function V(I) {
1504
+ var _;
1505
+ x.wasMoved(I) && (e.disabled || (_ = l.virtual.value) != null && _.disabled(e.value) || i.value && (l.optionsPropsRef.value.hold || l.goToOption(q.Nothing)));
1506
1506
  }
1507
1507
  return () => {
1508
- let { disabled: w } = e, y = { active: i.value, selected: u.value, disabled: w }, _ = { id: s, ref: r, role: "option", tabIndex: w === !0 ? void 0 : -1, "aria-disabled": w === !0 ? !0 : void 0, "aria-selected": u.value, disabled: void 0, onMousedown: x, onFocus: m, onPointerenter: b, onMouseenter: b, onPointermove: I, onMousemove: I, onPointerleave: $, onMouseleave: $ }, T = ot(e, ["order", "value"]);
1509
- return ye({ ourProps: _, theirProps: T, slot: y, attrs: t, slots: n, name: "ComboboxOption" });
1508
+ let { disabled: I } = e, _ = { active: i.value, selected: u.value, disabled: I }, E = { id: s, ref: r, role: "option", tabIndex: I === !0 ? void 0 : -1, "aria-disabled": I === !0 ? !0 : void 0, "aria-selected": u.value, disabled: void 0, onMousedown: T, onFocus: g, onPointerenter: b, onMouseenter: b, onPointermove: A, onMousemove: A, onPointerleave: V, onMouseleave: V }, y = ot(e, ["order", "value"]);
1509
+ return ye({ ourProps: E, theirProps: y, slot: _, attrs: t, slots: n, name: "ComboboxOption" });
1510
1510
  };
1511
1511
  } });
1512
1512
  function wl(e, n) {
1513
- return h(), g("svg", {
1513
+ return h(), C("svg", {
1514
1514
  xmlns: "http://www.w3.org/2000/svg",
1515
1515
  viewBox: "0 0 20 20",
1516
1516
  fill: "currentColor",
@@ -1525,7 +1525,7 @@ function wl(e, n) {
1525
1525
  ]);
1526
1526
  }
1527
1527
  function _l(e, n) {
1528
- return h(), g("svg", {
1528
+ return h(), C("svg", {
1529
1529
  xmlns: "http://www.w3.org/2000/svg",
1530
1530
  viewBox: "0 0 20 20",
1531
1531
  fill: "currentColor",
@@ -1540,7 +1540,7 @@ function _l(e, n) {
1540
1540
  ]);
1541
1541
  }
1542
1542
  function Tl(e, n) {
1543
- return h(), g("svg", {
1543
+ return h(), C("svg", {
1544
1544
  xmlns: "http://www.w3.org/2000/svg",
1545
1545
  viewBox: "0 0 20 20",
1546
1546
  fill: "currentColor",
@@ -1572,12 +1572,12 @@ function Tn() {
1572
1572
  }
1573
1573
  const El = typeof Proxy == "function", $l = "devtools-plugin:setup", Ol = "plugin:settings:set";
1574
1574
  let _e, pt;
1575
- function Il() {
1575
+ function Ll() {
1576
1576
  var e;
1577
1577
  return _e !== void 0 || (typeof window < "u" && window.performance ? (_e = !0, pt = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (_e = !0, pt = globalThis.perf_hooks.performance) : _e = !1), _e;
1578
1578
  }
1579
- function Ll() {
1580
- return Il() ? pt.now() : Date.now();
1579
+ function Il() {
1580
+ return Ll() ? pt.now() : Date.now();
1581
1581
  }
1582
1582
  class kl {
1583
1583
  constructor(n, t) {
@@ -1607,7 +1607,7 @@ class kl {
1607
1607
  s = r;
1608
1608
  },
1609
1609
  now() {
1610
- return Ll();
1610
+ return Il();
1611
1611
  }
1612
1612
  }, t && t.on(Ol, (r, a) => {
1613
1613
  r === this.plugin.id && this.fallbacks.setSettings(a);
@@ -1675,10 +1675,10 @@ const lt = typeof window < "u", Ae = (process.env.NODE_ENV !== "production" || !
1675
1675
  function Ml(e, { autoBom: n = !1 } = {}) {
1676
1676
  return n && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type) ? new Blob(["\uFEFF", e], { type: e.type }) : e;
1677
1677
  }
1678
- function Lt(e, n, t) {
1678
+ function It(e, n, t) {
1679
1679
  const o = new XMLHttpRequest();
1680
1680
  o.open("GET", e), o.responseType = "blob", o.onload = function() {
1681
- In(o.response, n, t);
1681
+ Ln(o.response, n, t);
1682
1682
  }, o.onerror = function() {
1683
1683
  console.error("could not download file");
1684
1684
  }, o.send();
@@ -1700,7 +1700,7 @@ function Ge(e) {
1700
1700
  t.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(t);
1701
1701
  }
1702
1702
  }
1703
- const Je = typeof navigator == "object" ? navigator : { userAgent: "" }, On = /Macintosh/.test(Je.userAgent) && /AppleWebKit/.test(Je.userAgent) && !/Safari/.test(Je.userAgent), In = lt ? (
1703
+ const Je = typeof navigator == "object" ? navigator : { userAgent: "" }, On = /Macintosh/.test(Je.userAgent) && /AppleWebKit/.test(Je.userAgent) && !/Safari/.test(Je.userAgent), Ln = lt ? (
1704
1704
  // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
1705
1705
  typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !On ? Al : (
1706
1706
  // Use msSaveOrOpenBlob as a second approach
@@ -1713,7 +1713,7 @@ const Je = typeof navigator == "object" ? navigator : { userAgent: "" }, On = /M
1713
1713
  };
1714
1714
  function Al(e, n = "download", t) {
1715
1715
  const o = document.createElement("a");
1716
- o.download = n, o.rel = "noopener", typeof e == "string" ? (o.href = e, o.origin !== location.origin ? $n(o.href) ? Lt(e, n, t) : (o.target = "_blank", Ge(o)) : Ge(o)) : (o.href = URL.createObjectURL(e), setTimeout(function() {
1716
+ o.download = n, o.rel = "noopener", typeof e == "string" ? (o.href = e, o.origin !== location.origin ? $n(o.href) ? It(e, n, t) : (o.target = "_blank", Ge(o)) : Ge(o)) : (o.href = URL.createObjectURL(e), setTimeout(function() {
1717
1717
  URL.revokeObjectURL(o.href);
1718
1718
  }, 4e4), setTimeout(function() {
1719
1719
  Ge(o);
@@ -1722,7 +1722,7 @@ function Al(e, n = "download", t) {
1722
1722
  function Vl(e, n = "download", t) {
1723
1723
  if (typeof e == "string")
1724
1724
  if ($n(e))
1725
- Lt(e, n, t);
1725
+ It(e, n, t);
1726
1726
  else {
1727
1727
  const o = document.createElement("a");
1728
1728
  o.href = e, o.target = "_blank", setTimeout(function() {
@@ -1734,7 +1734,7 @@ function Vl(e, n = "download", t) {
1734
1734
  }
1735
1735
  function Dl(e, n, t, o) {
1736
1736
  if (o = o || open("", "_blank"), o && (o.document.title = o.document.body.innerText = "downloading..."), typeof e == "string")
1737
- return Lt(e, n, t);
1737
+ return It(e, n, t);
1738
1738
  const l = e.type === "application/octet-stream", s = /constructor/i.test(String(zt.HTMLElement)) || "safari" in zt, r = /CriOS\/[\d]+/.test(navigator.userAgent);
1739
1739
  if ((r || l && s || On) && typeof FileReader < "u") {
1740
1740
  const a = new FileReader();
@@ -1751,51 +1751,51 @@ function Dl(e, n, t, o) {
1751
1751
  }, 4e4);
1752
1752
  }
1753
1753
  }
1754
- function U(e, n) {
1754
+ function W(e, n) {
1755
1755
  const t = "🍍 " + e;
1756
1756
  typeof __VUE_DEVTOOLS_TOAST__ == "function" ? __VUE_DEVTOOLS_TOAST__(t, n) : n === "error" ? console.error(t) : n === "warn" ? console.warn(t) : console.log(t);
1757
1757
  }
1758
1758
  function kt(e) {
1759
1759
  return "_a" in e && "install" in e;
1760
1760
  }
1761
- function Ln() {
1761
+ function In() {
1762
1762
  if (!("clipboard" in navigator))
1763
- return U("Your browser doesn't support the Clipboard API", "error"), !0;
1763
+ return W("Your browser doesn't support the Clipboard API", "error"), !0;
1764
1764
  }
1765
1765
  function kn(e) {
1766
- return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (U('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"), !0) : !1;
1766
+ return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (W('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"), !0) : !1;
1767
1767
  }
1768
1768
  async function Rl(e) {
1769
- if (!Ln())
1769
+ if (!In())
1770
1770
  try {
1771
- await navigator.clipboard.writeText(JSON.stringify(e.state.value)), U("Global state copied to clipboard.");
1771
+ await navigator.clipboard.writeText(JSON.stringify(e.state.value)), W("Global state copied to clipboard.");
1772
1772
  } catch (n) {
1773
1773
  if (kn(n))
1774
1774
  return;
1775
- U("Failed to serialize the state. Check the console for more details.", "error"), console.error(n);
1775
+ W("Failed to serialize the state. Check the console for more details.", "error"), console.error(n);
1776
1776
  }
1777
1777
  }
1778
1778
  async function Pl(e) {
1779
- if (!Ln())
1779
+ if (!In())
1780
1780
  try {
1781
- Mn(e, JSON.parse(await navigator.clipboard.readText())), U("Global state pasted from clipboard.");
1781
+ Mn(e, JSON.parse(await navigator.clipboard.readText())), W("Global state pasted from clipboard.");
1782
1782
  } catch (n) {
1783
1783
  if (kn(n))
1784
1784
  return;
1785
- U("Failed to deserialize the state from clipboard. Check the console for more details.", "error"), console.error(n);
1785
+ W("Failed to deserialize the state from clipboard. Check the console for more details.", "error"), console.error(n);
1786
1786
  }
1787
1787
  }
1788
- async function Nl(e) {
1788
+ async function Bl(e) {
1789
1789
  try {
1790
- In(new Blob([JSON.stringify(e.state.value)], {
1790
+ Ln(new Blob([JSON.stringify(e.state.value)], {
1791
1791
  type: "text/plain;charset=utf-8"
1792
1792
  }), "pinia-state.json");
1793
1793
  } catch (n) {
1794
- U("Failed to export the state as JSON. Check the console for more details.", "error"), console.error(n);
1794
+ W("Failed to export the state as JSON. Check the console for more details.", "error"), console.error(n);
1795
1795
  }
1796
1796
  }
1797
1797
  let ie;
1798
- function Bl() {
1798
+ function Nl() {
1799
1799
  ie || (ie = document.createElement("input"), ie.type = "file", ie.accept = ".json");
1800
1800
  function e() {
1801
1801
  return new Promise((n, t) => {
@@ -1812,13 +1812,13 @@ function Bl() {
1812
1812
  }
1813
1813
  async function Fl(e) {
1814
1814
  try {
1815
- const t = await Bl()();
1815
+ const t = await Nl()();
1816
1816
  if (!t)
1817
1817
  return;
1818
1818
  const { text: o, file: l } = t;
1819
- Mn(e, JSON.parse(o)), U(`Global state imported from "${l.name}".`);
1819
+ Mn(e, JSON.parse(o)), W(`Global state imported from "${l.name}".`);
1820
1820
  } catch (n) {
1821
- U("Failed to import the state from JSON. Check the console for more details.", "error"), console.error(n);
1821
+ W("Failed to import the state from JSON. Check the console for more details.", "error"), console.error(n);
1822
1822
  }
1823
1823
  }
1824
1824
  function Mn(e, n) {
@@ -1917,7 +1917,7 @@ function Wl(e, n) {
1917
1917
  componentStateTypes: Ye,
1918
1918
  app: e
1919
1919
  }, (t) => {
1920
- typeof t.now != "function" && U("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."), t.addTimelineLayer({
1920
+ typeof t.now != "function" && W("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."), t.addTimelineLayer({
1921
1921
  id: me,
1922
1922
  label: "Pinia 🍍",
1923
1923
  color: 15064968
@@ -1944,7 +1944,7 @@ function Wl(e, n) {
1944
1944
  {
1945
1945
  icon: "save",
1946
1946
  action: () => {
1947
- Nl(n);
1947
+ Bl(n);
1948
1948
  },
1949
1949
  tooltip: "Save the state as a JSON file"
1950
1950
  },
@@ -1962,7 +1962,7 @@ function Wl(e, n) {
1962
1962
  tooltip: 'Reset the state (with "$reset")',
1963
1963
  action: (o) => {
1964
1964
  const l = n._s.get(o);
1965
- l ? typeof l.$reset != "function" ? U(`Cannot reset "${o}" store because it doesn't have a "$reset" method implemented.`, "warn") : (l.$reset(), U(`Store "${o}" reset.`)) : U(`Cannot reset "${o}" store because it wasn't found.`, "warn");
1965
+ l ? typeof l.$reset != "function" ? W(`Cannot reset "${o}" store because it doesn't have a "$reset" method implemented.`, "warn") : (l.$reset(), W(`Store "${o}" reset.`)) : W(`Cannot reset "${o}" store because it wasn't found.`, "warn");
1966
1966
  }
1967
1967
  }
1968
1968
  ]
@@ -2021,7 +2021,7 @@ function Wl(e, n) {
2021
2021
  if (o.app === e && o.inspectorId === J) {
2022
2022
  const s = o.nodeId === ht ? n : n._s.get(o.nodeId);
2023
2023
  if (!s)
2024
- return U(`store "${o.nodeId}" not found`, "error");
2024
+ return W(`store "${o.nodeId}" not found`, "error");
2025
2025
  const { path: r } = o;
2026
2026
  kt(s) ? r.unshift("state") : (r.length !== 1 || !s._customProperties.has(r[0]) || r[0] in s.$state) && r.unshift("$state"), Se = !1, o.set(s, r, o.state.value), Se = !0;
2027
2027
  }
@@ -2029,10 +2029,10 @@ function Wl(e, n) {
2029
2029
  if (o.type.startsWith("🍍")) {
2030
2030
  const l = o.type.replace(/^🍍\s*/, ""), s = n._s.get(l);
2031
2031
  if (!s)
2032
- return U(`store "${l}" not found`, "error");
2032
+ return W(`store "${l}" not found`, "error");
2033
2033
  const { path: r } = o;
2034
2034
  if (r[0] !== "state")
2035
- return U(`Invalid path for store "${l}":
2035
+ return W(`Invalid path for store "${l}":
2036
2036
  ${r}
2037
2037
  Only state can be modified.`);
2038
2038
  r[0] = "$state", Se = !1, o.set(s, r, o.state.value), Se = !0;
@@ -2113,7 +2113,7 @@ function ql(e, n) {
2113
2113
  });
2114
2114
  });
2115
2115
  }, !0), n._customProperties.forEach((r) => {
2116
- F(() => M(n[r]), (a, i) => {
2116
+ F(() => k(n[r]), (a, i) => {
2117
2117
  t.notifyComponentUpdate(), t.sendInspectorState(J), Se && t.addTimelineEvent({
2118
2118
  layerId: me,
2119
2119
  event: {
@@ -2166,8 +2166,8 @@ function ql(e, n) {
2166
2166
  });
2167
2167
  const { $dispose: s } = n;
2168
2168
  n.$dispose = () => {
2169
- s(), t.notifyComponentUpdate(), t.sendInspectorTree(J), t.sendInspectorState(J), t.getSettings().logStoreChanges && U(`Disposed "${n.$id}" store 🗑`);
2170
- }, t.notifyComponentUpdate(), t.sendInspectorTree(J), t.sendInspectorState(J), t.getSettings().logStoreChanges && U(`"${n.$id}" store installed 🆕`);
2169
+ s(), t.notifyComponentUpdate(), t.sendInspectorTree(J), t.sendInspectorState(J), t.getSettings().logStoreChanges && W(`Disposed "${n.$id}" store 🗑`);
2170
+ }, t.notifyComponentUpdate(), t.sendInspectorTree(J), t.sendInspectorState(J), t.getSettings().logStoreChanges && W(`"${n.$id}" store installed 🆕`);
2171
2171
  });
2172
2172
  }
2173
2173
  let Vn = 0, de;
@@ -2202,7 +2202,7 @@ function Gl({ app: e, store: n, options: t }) {
2202
2202
  );
2203
2203
  }
2204
2204
  function Jl() {
2205
- const e = un(!0), n = e.run(() => O({}));
2205
+ const e = un(!0), n = e.run(() => $({}));
2206
2206
  let t = [], o = [];
2207
2207
  const l = be({
2208
2208
  install(s) {
@@ -2275,12 +2275,12 @@ function qt(e, n, t, o) {
2275
2275
  !a && (process.env.NODE_ENV === "production" || !o) && (t.state.value[e] = l ? l() : {});
2276
2276
  const c = process.env.NODE_ENV !== "production" && o ? (
2277
2277
  // use ref() to unwrap refs inside state TODO: check if this is still necessary
2278
- Rt(O(l ? l() : {}).value)
2278
+ Rt($(l ? l() : {}).value)
2279
2279
  ) : Rt(t.state.value[e]);
2280
- return te(c, s, Object.keys(r || {}).reduce((d, x) => (process.env.NODE_ENV !== "production" && x in c && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${x}" in store "${e}".`), d[x] = be(L(() => {
2280
+ return te(c, s, Object.keys(r || {}).reduce((d, T) => (process.env.NODE_ENV !== "production" && T in c && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${T}" in store "${e}".`), d[T] = be(O(() => {
2281
2281
  Pe(t);
2282
- const m = t._s.get(e);
2283
- return r[x].call(m, m);
2282
+ const g = t._s.get(e);
2283
+ return r[T].call(g, g);
2284
2284
  })), d), {}));
2285
2285
  }
2286
2286
  return i = gt(e, u, n, t, o, !0), i;
@@ -2295,34 +2295,34 @@ function gt(e, n, t = {}, o, l, s) {
2295
2295
  // flush: 'post',
2296
2296
  };
2297
2297
  process.env.NODE_ENV !== "production" && (i.onTrigger = (v) => {
2298
- u ? m = v : u == !1 && !S._hotUpdating && (Array.isArray(m) ? m.push(v) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
2298
+ u ? g = v : u == !1 && !m._hotUpdating && (Array.isArray(g) ? g.push(v) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
2299
2299
  });
2300
- let u, c, d = [], x = [], m;
2301
- const C = o.state.value[e];
2302
- !s && !C && (process.env.NODE_ENV === "production" || !l) && (o.state.value[e] = {});
2303
- const b = O({});
2304
- let I;
2305
- function $(v) {
2300
+ let u, c, d = [], T = [], g;
2301
+ const x = o.state.value[e];
2302
+ !s && !x && (process.env.NODE_ENV === "production" || !l) && (o.state.value[e] = {});
2303
+ const b = $({});
2304
+ let A;
2305
+ function V(v) {
2306
2306
  let p;
2307
- u = c = !1, process.env.NODE_ENV !== "production" && (m = []), typeof v == "function" ? (v(o.state.value[e]), p = {
2307
+ u = c = !1, process.env.NODE_ENV !== "production" && (g = []), typeof v == "function" ? (v(o.state.value[e]), p = {
2308
2308
  type: ae.patchFunction,
2309
2309
  storeId: e,
2310
- events: m
2310
+ events: g
2311
2311
  }) : (mt(o.state.value[e], v), p = {
2312
2312
  type: ae.patchObject,
2313
2313
  payload: v,
2314
2314
  storeId: e,
2315
- events: m
2315
+ events: g
2316
2316
  });
2317
- const k = I = Symbol();
2318
- X().then(() => {
2319
- I === k && (u = !0);
2317
+ const L = A = Symbol();
2318
+ Y().then(() => {
2319
+ A === L && (u = !0);
2320
2320
  }), c = !0, Te(d, p, o.state.value[e]);
2321
2321
  }
2322
- const w = s ? function() {
2323
- const { state: p } = t, k = p ? p() : {};
2324
- this.$patch((A) => {
2325
- te(A, k);
2322
+ const I = s ? function() {
2323
+ const { state: p } = t, L = p ? p() : {};
2324
+ this.$patch((M) => {
2325
+ te(M, L);
2326
2326
  });
2327
2327
  } : (
2328
2328
  /* istanbul ignore next */
@@ -2330,120 +2330,120 @@ function gt(e, n, t = {}, o, l, s) {
2330
2330
  throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`);
2331
2331
  } : Rn
2332
2332
  );
2333
- function y() {
2334
- r.stop(), d = [], x = [], o._s.delete(e);
2333
+ function _() {
2334
+ r.stop(), d = [], T = [], o._s.delete(e);
2335
2335
  }
2336
- function _(v, p) {
2336
+ function E(v, p) {
2337
2337
  return function() {
2338
2338
  Pe(o);
2339
- const k = Array.from(arguments), A = [], j = [];
2340
- function H(Z) {
2341
- A.push(Z);
2339
+ const L = Array.from(arguments), M = [], j = [];
2340
+ function H(U) {
2341
+ M.push(U);
2342
2342
  }
2343
- function K(Z) {
2344
- j.push(Z);
2343
+ function K(U) {
2344
+ j.push(U);
2345
2345
  }
2346
- Te(x, {
2347
- args: k,
2346
+ Te(T, {
2347
+ args: L,
2348
2348
  name: v,
2349
- store: S,
2349
+ store: m,
2350
2350
  after: H,
2351
2351
  onError: K
2352
2352
  });
2353
2353
  let ee;
2354
2354
  try {
2355
- ee = p.apply(this && this.$id === e ? this : S, k);
2356
- } catch (Z) {
2357
- throw Te(j, Z), Z;
2355
+ ee = p.apply(this && this.$id === e ? this : m, L);
2356
+ } catch (U) {
2357
+ throw Te(j, U), U;
2358
2358
  }
2359
- return ee instanceof Promise ? ee.then((Z) => (Te(A, Z), Z)).catch((Z) => (Te(j, Z), Promise.reject(Z))) : (Te(A, ee), ee);
2359
+ return ee instanceof Promise ? ee.then((U) => (Te(M, U), U)).catch((U) => (Te(j, U), Promise.reject(U))) : (Te(M, ee), ee);
2360
2360
  };
2361
2361
  }
2362
- const T = /* @__PURE__ */ be({
2362
+ const y = /* @__PURE__ */ be({
2363
2363
  actions: {},
2364
2364
  getters: {},
2365
2365
  state: [],
2366
2366
  hotState: b
2367
- }), V = {
2367
+ }), w = {
2368
2368
  _p: o,
2369
2369
  // _s: scope,
2370
2370
  $id: e,
2371
- $onAction: Ut.bind(null, x),
2372
- $patch: $,
2373
- $reset: w,
2371
+ $onAction: Ut.bind(null, T),
2372
+ $patch: V,
2373
+ $reset: I,
2374
2374
  $subscribe(v, p = {}) {
2375
- const k = Ut(d, v, p.detached, () => A()), A = r.run(() => F(() => o.state.value[e], (j) => {
2375
+ const L = Ut(d, v, p.detached, () => M()), M = r.run(() => F(() => o.state.value[e], (j) => {
2376
2376
  (p.flush === "sync" ? c : u) && v({
2377
2377
  storeId: e,
2378
2378
  type: ae.direct,
2379
- events: m
2379
+ events: g
2380
2380
  }, j);
2381
2381
  }, te({}, i, p)));
2382
- return k;
2382
+ return L;
2383
2383
  },
2384
- $dispose: y
2385
- }, S = an(process.env.NODE_ENV !== "production" || Ae ? te(
2384
+ $dispose: _
2385
+ }, m = an(process.env.NODE_ENV !== "production" || Ae ? te(
2386
2386
  {
2387
- _hmrPayload: T,
2387
+ _hmrPayload: y,
2388
2388
  _customProperties: be(/* @__PURE__ */ new Set())
2389
2389
  // devtools custom properties
2390
2390
  },
2391
- V
2391
+ w
2392
2392
  // must be added later
2393
2393
  // setupStore
2394
- ) : V);
2395
- o._s.set(e, S);
2394
+ ) : w);
2395
+ o._s.set(e, m);
2396
2396
  const D = (o._a && o._a.runWithContext || Yl)(() => o._e.run(() => (r = un()).run(n)));
2397
2397
  for (const v in D) {
2398
2398
  const p = D[v];
2399
2399
  if ($e(p) && !Wt(p) || St(p))
2400
- process.env.NODE_ENV !== "production" && l ? We(b.value, v, it(D, v)) : s || (C && Xl(p) && ($e(p) ? p.value = C[v] : mt(p, C[v])), o.state.value[e][v] = p), process.env.NODE_ENV !== "production" && T.state.push(v);
2400
+ process.env.NODE_ENV !== "production" && l ? We(b.value, v, it(D, v)) : s || (x && Xl(p) && ($e(p) ? p.value = x[v] : mt(p, x[v])), o.state.value[e][v] = p), process.env.NODE_ENV !== "production" && y.state.push(v);
2401
2401
  else if (typeof p == "function") {
2402
- const k = process.env.NODE_ENV !== "production" && l ? p : _(v, p);
2403
- D[v] = k, process.env.NODE_ENV !== "production" && (T.actions[v] = p), a.actions[v] = p;
2404
- } else process.env.NODE_ENV !== "production" && Wt(p) && (T.getters[v] = s ? (
2402
+ const L = process.env.NODE_ENV !== "production" && l ? p : E(v, p);
2403
+ D[v] = L, process.env.NODE_ENV !== "production" && (y.actions[v] = p), a.actions[v] = p;
2404
+ } else process.env.NODE_ENV !== "production" && Wt(p) && (y.getters[v] = s ? (
2405
2405
  // @ts-expect-error
2406
2406
  t.getters[v]
2407
2407
  ) : p, lt && (D._getters || // @ts-expect-error: same
2408
2408
  (D._getters = be([]))).push(v));
2409
2409
  }
2410
- if (te(S, D), te(ne(S), D), Object.defineProperty(S, "$state", {
2410
+ if (te(m, D), te(ne(m), D), Object.defineProperty(m, "$state", {
2411
2411
  get: () => process.env.NODE_ENV !== "production" && l ? b.value : o.state.value[e],
2412
2412
  set: (v) => {
2413
2413
  if (process.env.NODE_ENV !== "production" && l)
2414
2414
  throw new Error("cannot set hotState");
2415
- $((p) => {
2415
+ V((p) => {
2416
2416
  te(p, v);
2417
2417
  });
2418
2418
  }
2419
- }), process.env.NODE_ENV !== "production" && (S._hotUpdate = be((v) => {
2420
- S._hotUpdating = !0, v._hmrPayload.state.forEach((p) => {
2421
- if (p in S.$state) {
2422
- const k = v.$state[p], A = S.$state[p];
2423
- typeof k == "object" && Ce(k) && Ce(A) ? Dn(k, A) : v.$state[p] = A;
2419
+ }), process.env.NODE_ENV !== "production" && (m._hotUpdate = be((v) => {
2420
+ m._hotUpdating = !0, v._hmrPayload.state.forEach((p) => {
2421
+ if (p in m.$state) {
2422
+ const L = v.$state[p], M = m.$state[p];
2423
+ typeof L == "object" && Ce(L) && Ce(M) ? Dn(L, M) : v.$state[p] = M;
2424
2424
  }
2425
- We(S, p, it(v.$state, p));
2426
- }), Object.keys(S.$state).forEach((p) => {
2427
- p in v.$state || dt(S, p);
2428
- }), u = !1, c = !1, o.state.value[e] = it(v._hmrPayload, "hotState"), c = !0, X().then(() => {
2425
+ We(m, p, it(v.$state, p));
2426
+ }), Object.keys(m.$state).forEach((p) => {
2427
+ p in v.$state || dt(m, p);
2428
+ }), u = !1, c = !1, o.state.value[e] = it(v._hmrPayload, "hotState"), c = !0, Y().then(() => {
2429
2429
  u = !0;
2430
2430
  });
2431
2431
  for (const p in v._hmrPayload.actions) {
2432
- const k = v[p];
2433
- We(S, p, _(p, k));
2432
+ const L = v[p];
2433
+ We(m, p, E(p, L));
2434
2434
  }
2435
2435
  for (const p in v._hmrPayload.getters) {
2436
- const k = v._hmrPayload.getters[p], A = s ? (
2436
+ const L = v._hmrPayload.getters[p], M = s ? (
2437
2437
  // special handling of options api
2438
- L(() => (Pe(o), k.call(S, S)))
2439
- ) : k;
2440
- We(S, p, A);
2438
+ O(() => (Pe(o), L.call(m, m)))
2439
+ ) : L;
2440
+ We(m, p, M);
2441
2441
  }
2442
- Object.keys(S._hmrPayload.getters).forEach((p) => {
2443
- p in v._hmrPayload.getters || dt(S, p);
2444
- }), Object.keys(S._hmrPayload.actions).forEach((p) => {
2445
- p in v._hmrPayload.actions || dt(S, p);
2446
- }), S._hmrPayload = v._hmrPayload, S._getters = v._getters, S._hotUpdating = !1;
2442
+ Object.keys(m._hmrPayload.getters).forEach((p) => {
2443
+ p in v._hmrPayload.getters || dt(m, p);
2444
+ }), Object.keys(m._hmrPayload.actions).forEach((p) => {
2445
+ p in v._hmrPayload.actions || dt(m, p);
2446
+ }), m._hmrPayload = v._hmrPayload, m._getters = v._getters, m._hotUpdating = !1;
2447
2447
  })), Ae) {
2448
2448
  const v = {
2449
2449
  writable: !0,
@@ -2452,28 +2452,28 @@ function gt(e, n, t = {}, o, l, s) {
2452
2452
  enumerable: !1
2453
2453
  };
2454
2454
  ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((p) => {
2455
- Object.defineProperty(S, p, te({ value: S[p] }, v));
2455
+ Object.defineProperty(m, p, te({ value: m[p] }, v));
2456
2456
  });
2457
2457
  }
2458
2458
  return o._p.forEach((v) => {
2459
2459
  if (Ae) {
2460
2460
  const p = r.run(() => v({
2461
- store: S,
2461
+ store: m,
2462
2462
  app: o._a,
2463
2463
  pinia: o,
2464
2464
  options: a
2465
2465
  }));
2466
- Object.keys(p || {}).forEach((k) => S._customProperties.add(k)), te(S, p);
2466
+ Object.keys(p || {}).forEach((L) => m._customProperties.add(L)), te(m, p);
2467
2467
  } else
2468
- te(S, r.run(() => v({
2469
- store: S,
2468
+ te(m, r.run(() => v({
2469
+ store: m,
2470
2470
  app: o._a,
2471
2471
  pinia: o,
2472
2472
  options: a
2473
2473
  })));
2474
- }), process.env.NODE_ENV !== "production" && S.$state && typeof S.$state == "object" && typeof S.$state.constructor == "function" && !S.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
2474
+ }), process.env.NODE_ENV !== "production" && m.$state && typeof m.$state == "object" && typeof m.$state.constructor == "function" && !m.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
2475
2475
  state: () => new MyClass()
2476
- Found in store "${S.$id}".`), C && s && t.hydrate && t.hydrate(S.$state, C), u = !0, c = !0, S;
2476
+ Found in store "${m.$id}".`), x && s && t.hydrate && t.hydrate(m.$state, x), u = !0, c = !0, m;
2477
2477
  }
2478
2478
  function He(e, n, t) {
2479
2479
  let o, l;
@@ -2493,15 +2493,15 @@ This will fail in production.`);
2493
2493
  a = Me, a._s.has(o) || (s ? gt(o, n, l, a) : qt(o, l, a), process.env.NODE_ENV !== "production" && (r._pinia = a));
2494
2494
  const c = a._s.get(o);
2495
2495
  if (process.env.NODE_ENV !== "production" && i) {
2496
- const d = "__hot:" + o, x = s ? gt(d, n, l, a, !0) : qt(d, te({}, l), a, !0);
2497
- i._hotUpdate(x), delete a.state.value[d], a._s.delete(d);
2496
+ const d = "__hot:" + o, T = s ? gt(d, n, l, a, !0) : qt(d, te({}, l), a, !0);
2497
+ i._hotUpdate(T), delete a.state.value[d], a._s.delete(d);
2498
2498
  }
2499
2499
  if (process.env.NODE_ENV !== "production" && lt) {
2500
2500
  const d = rn();
2501
2501
  if (d && d.proxy && // avoid adding stores that are just built for hot module replacement
2502
2502
  !i) {
2503
- const x = d.proxy, m = "_pStores" in x ? x._pStores : x._pStores = {};
2504
- m[o] = c;
2503
+ const T = d.proxy, g = "_pStores" in T ? T._pStores : T._pStores = {};
2504
+ g[o] = c;
2505
2505
  }
2506
2506
  }
2507
2507
  return c;
@@ -2509,7 +2509,7 @@ This will fail in production.`);
2509
2509
  return r.$id = o, r;
2510
2510
  }
2511
2511
  const xe = He("loader", () => {
2512
- const e = O({
2512
+ const e = $({
2513
2513
  translation: !1,
2514
2514
  aiExplanation: !1,
2515
2515
  writing: !1
@@ -2530,32 +2530,32 @@ const xe = He("loader", () => {
2530
2530
  }),
2531
2531
  emits: ["update:modelValue"],
2532
2532
  setup(e) {
2533
- const n = xe(), t = e, o = Gn(e, "modelValue"), l = O(""), s = O(null), r = L(() => Object.entries(t.languages).filter(
2533
+ const n = xe(), t = e, o = Gn(e, "modelValue"), l = $(""), s = $(null), r = O(() => Object.entries(t.languages).filter(
2534
2534
  ([, i]) => i.toLowerCase().includes(l.value.toLowerCase())
2535
2535
  )), a = (i) => {
2536
2536
  i.target.value = "", l.value = "", s.value && s.value.$el.click();
2537
2537
  };
2538
- return (i, u) => (h(), W(M(gl), {
2538
+ return (i, u) => (h(), Z(k(gl), {
2539
2539
  modelValue: o.value,
2540
2540
  "onUpdate:modelValue": u[3] || (u[3] = (c) => o.value = c),
2541
- disabled: M(n).loading,
2541
+ disabled: k(n).loading,
2542
2542
  as: "div",
2543
2543
  class: "relative mt-1"
2544
2544
  }, {
2545
2545
  default: ze(() => [
2546
- B(M(Cl), {
2546
+ N(k(Cl), {
2547
2547
  class: "w-full bg-base-100 border border-base-300 rounded py-2.5 pl-3 pr-10 text-sm text-base-content font-medium focus:outline-none focus:ring-0.5 focus:ring-primary focus:border-primary",
2548
2548
  onChange: u[0] || (u[0] = (c) => l.value = c.target.value),
2549
2549
  displayValue: (c) => e.languages[c],
2550
2550
  onFocus: u[1] || (u[1] = (c) => a(c))
2551
2551
  }, null, 8, ["displayValue"]),
2552
- B(M(bl), {
2552
+ N(k(bl), {
2553
2553
  ref_key: "btnSelect",
2554
2554
  ref: s,
2555
2555
  class: "absolute inset-y-0 right-0 flex items-center pr-2"
2556
2556
  }, {
2557
2557
  default: ze(() => [
2558
- B(M(_l), {
2558
+ N(k(_l), {
2559
2559
  class: "h-5 w-5 text-base-content/50",
2560
2560
  "aria-hidden": "true",
2561
2561
  onClick: u[2] || (u[2] = (c) => a(c))
@@ -2563,21 +2563,21 @@ const xe = He("loader", () => {
2563
2563
  ]),
2564
2564
  _: 1
2565
2565
  }, 512),
2566
- B(M(xl), { class: "absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-base-100 py-1 text-base shadow-lg ring-1 ring-base-300 focus:outline-none sm:text-sm z-50" }, {
2566
+ N(k(xl), { class: "absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-base-100 py-1 text-base shadow-lg ring-1 ring-base-300 focus:outline-none sm:text-sm z-50" }, {
2567
2567
  default: ze(() => [
2568
- (h(!0), g(z, null, Y(r.value, ([c, d]) => (h(), W(M(yl), {
2568
+ (h(!0), C(z, null, Q(r.value, ([c, d]) => (h(), Z(k(yl), {
2569
2569
  key: c,
2570
2570
  value: c
2571
2571
  }, {
2572
- default: ze(({ active: x, selected: m }) => [
2572
+ default: ze(({ active: T, selected: g }) => [
2573
2573
  f("li", {
2574
2574
  class: P([
2575
2575
  "relative cursor-default select-none py-2 pl-3 pr-9",
2576
- x ? "bg-primary text-primary-content" : "text-base-content"
2576
+ T ? "bg-primary text-primary-content" : "text-base-content"
2577
2577
  ])
2578
2578
  }, [
2579
2579
  f("span", {
2580
- class: P(["block truncate", m && "font-semibold"])
2580
+ class: P(["block truncate", g && "font-semibold"])
2581
2581
  }, G(d), 3)
2582
2582
  ], 2)
2583
2583
  ]),
@@ -2590,9 +2590,9 @@ const xe = He("loader", () => {
2590
2590
  _: 1
2591
2591
  }, 8, ["modelValue", "disabled"]));
2592
2592
  }
2593
- }, Kl = ["disabled"], es = /* @__PURE__ */ Be('<svg class="w-4 h-4 text-primary" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.68688 2.3131C3.88214 2.50837 3.88214 2.82495 3.68688 3.02021L2.04043 4.66666L3.68688 6.3131C3.88214 6.50837 3.88214 6.82495 3.68688 7.02021C3.49162 7.21547 3.17504 7.21547 2.97977 7.02021L0.979775 5.02021C0.784513 4.82495 0.784513 4.50837 0.979775 4.3131L2.97977 2.3131C3.17504 2.11784 3.49162 2.11784 3.68688 2.3131Z" fill="currentColor"></path><path d="M12.3131 8.97977C12.5084 8.78451 12.825 8.78451 13.0202 8.97977L15.0202 10.9798C15.2155 11.175 15.2155 11.4916 15.0202 11.6869L13.0202 13.6869C12.825 13.8821 12.5084 13.8821 12.3131 13.6869C12.1178 13.4916 12.1178 13.175 12.3131 12.9798L13.9596 11.3333L12.3131 9.68688C12.1178 9.49161 12.1178 9.17503 12.3131 8.97977Z" fill="currentColor"></path><path d="M0.833328 4.66666C0.833328 4.39051 1.05719 4.16666 1.33333 4.16666H14.6667C14.9428 4.16666 15.1667 4.39051 15.1667 4.66666C15.1667 4.9428 14.9428 5.16666 14.6667 5.16666H1.33333C1.05719 5.16666 0.833328 4.9428 0.833328 4.66666Z" fill="currentColor"></path><path d="M0.833328 11.3333C0.833328 11.0572 1.05719 10.8333 1.33333 10.8333H14.6667C14.9428 10.8333 15.1667 11.0572 15.1667 11.3333C15.1667 11.6095 14.9428 11.8333 14.6667 11.8333H1.33333C1.05719 11.8333 0.833328 11.6095 0.833328 11.3333Z" fill="currentColor"></path></svg>', 1), ts = [
2593
+ }, Kl = ["disabled"], es = /* @__PURE__ */ Ne('<svg class="w-4 h-4 text-primary" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.68688 2.3131C3.88214 2.50837 3.88214 2.82495 3.68688 3.02021L2.04043 4.66666L3.68688 6.3131C3.88214 6.50837 3.88214 6.82495 3.68688 7.02021C3.49162 7.21547 3.17504 7.21547 2.97977 7.02021L0.979775 5.02021C0.784513 4.82495 0.784513 4.50837 0.979775 4.3131L2.97977 2.3131C3.17504 2.11784 3.49162 2.11784 3.68688 2.3131Z" fill="currentColor"></path><path d="M12.3131 8.97977C12.5084 8.78451 12.825 8.78451 13.0202 8.97977L15.0202 10.9798C15.2155 11.175 15.2155 11.4916 15.0202 11.6869L13.0202 13.6869C12.825 13.8821 12.5084 13.8821 12.3131 13.6869C12.1178 13.4916 12.1178 13.175 12.3131 12.9798L13.9596 11.3333L12.3131 9.68688C12.1178 9.49161 12.1178 9.17503 12.3131 8.97977Z" fill="currentColor"></path><path d="M0.833328 4.66666C0.833328 4.39051 1.05719 4.16666 1.33333 4.16666H14.6667C14.9428 4.16666 15.1667 4.39051 15.1667 4.66666C15.1667 4.9428 14.9428 5.16666 14.6667 5.16666H1.33333C1.05719 5.16666 0.833328 4.9428 0.833328 4.66666Z" fill="currentColor"></path><path d="M0.833328 11.3333C0.833328 11.0572 1.05719 10.8333 1.33333 10.8333H14.6667C14.9428 10.8333 15.1667 11.0572 15.1667 11.3333C15.1667 11.6095 14.9428 11.8333 14.6667 11.8333H1.33333C1.05719 11.8333 0.833328 11.6095 0.833328 11.3333Z" fill="currentColor"></path></svg>', 1), ts = [
2594
2594
  es
2595
- ], ns = ["disabled"], os = /* @__PURE__ */ Be('<svg class="w-4 h-4 text-primary" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.68688 2.3131C3.88214 2.50837 3.88214 2.82495 3.68688 3.02021L2.04043 4.66666L3.68688 6.3131C3.88214 6.50837 3.88214 6.82495 3.68688 7.02021C3.49162 7.21547 3.17504 7.21547 2.97977 7.02021L0.979775 5.02021C0.784513 4.82495 0.784513 4.50837 0.979775 4.3131L2.97977 2.3131C3.17504 2.11784 3.49162 2.11784 3.68688 2.3131Z" fill="currentColor"></path><path d="M12.3131 8.97977C12.5084 8.78451 12.825 8.78451 13.0202 8.97977L15.0202 10.9798C15.2155 11.175 15.2155 11.4916 15.0202 11.6869L13.0202 13.6869C12.825 13.8821 12.5084 13.8821 12.3131 13.6869C12.1178 13.4916 12.1178 13.175 12.3131 12.9798L13.9596 11.3333L12.3131 9.68688C12.1178 9.49161 12.1178 9.17503 12.3131 8.97977Z" fill="currentColor"></path><path d="M0.833328 4.66666C0.833328 4.39051 1.05719 4.16666 1.33333 4.16666H14.6667C14.9428 4.16666 15.1667 4.39051 15.1667 4.66666C15.1667 4.9428 14.9428 5.16666 14.6667 5.16666H1.33333C1.05719 5.16666 0.833328 4.9428 0.833328 4.66666Z" fill="currentColor"></path><path d="M0.833328 11.3333C0.833328 11.0572 1.05719 10.8333 1.33333 10.8333H14.6667C14.9428 10.8333 15.1667 11.0572 15.1667 11.3333C15.1667 11.6095 14.9428 11.8333 14.6667 11.8333H1.33333C1.05719 11.8333 0.833328 11.6095 0.833328 11.3333Z" fill="currentColor"></path></svg>', 1), ls = [
2595
+ ], ns = ["disabled"], os = /* @__PURE__ */ Ne('<svg class="w-4 h-4 text-primary" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.68688 2.3131C3.88214 2.50837 3.88214 2.82495 3.68688 3.02021L2.04043 4.66666L3.68688 6.3131C3.88214 6.50837 3.88214 6.82495 3.68688 7.02021C3.49162 7.21547 3.17504 7.21547 2.97977 7.02021L0.979775 5.02021C0.784513 4.82495 0.784513 4.50837 0.979775 4.3131L2.97977 2.3131C3.17504 2.11784 3.49162 2.11784 3.68688 2.3131Z" fill="currentColor"></path><path d="M12.3131 8.97977C12.5084 8.78451 12.825 8.78451 13.0202 8.97977L15.0202 10.9798C15.2155 11.175 15.2155 11.4916 15.0202 11.6869L13.0202 13.6869C12.825 13.8821 12.5084 13.8821 12.3131 13.6869C12.1178 13.4916 12.1178 13.175 12.3131 12.9798L13.9596 11.3333L12.3131 9.68688C12.1178 9.49161 12.1178 9.17503 12.3131 8.97977Z" fill="currentColor"></path><path d="M0.833328 4.66666C0.833328 4.39051 1.05719 4.16666 1.33333 4.16666H14.6667C14.9428 4.16666 15.1667 4.39051 15.1667 4.66666C15.1667 4.9428 14.9428 5.16666 14.6667 5.16666H1.33333C1.05719 5.16666 0.833328 4.9428 0.833328 4.66666Z" fill="currentColor"></path><path d="M0.833328 11.3333C0.833328 11.0572 1.05719 10.8333 1.33333 10.8333H14.6667C14.9428 10.8333 15.1667 11.0572 15.1667 11.3333C15.1667 11.6095 14.9428 11.8333 14.6667 11.8333H1.33333C1.05719 11.8333 0.833328 11.6095 0.833328 11.3333Z" fill="currentColor"></path></svg>', 1), ls = [
2596
2596
  os
2597
2597
  ], ss = {
2598
2598
  __name: "SwapBtn",
@@ -2604,21 +2604,21 @@ const xe = He("loader", () => {
2604
2604
  },
2605
2605
  emits: ["swap"],
2606
2606
  setup(e, { emit: n }) {
2607
- const t = xe(), o = L(() => t.isLoading("translation")), l = n;
2608
- return (s, r) => e.isBidirect ? (h(), g("button", {
2607
+ const t = xe(), o = O(() => t.isLoading("translation")), l = n;
2608
+ return (s, r) => e.isBidirect ? (h(), C("button", {
2609
2609
  key: 1,
2610
2610
  onClick: r[0] || (r[0] = (a) => l("swap")),
2611
2611
  disabled: o.value
2612
- }, ls, 8, ns)) : (h(), g("button", {
2612
+ }, ls, 8, ns)) : (h(), C("button", {
2613
2613
  key: 0,
2614
2614
  disabled: o.value
2615
2615
  }, ts, 8, Kl));
2616
2616
  }
2617
2617
  }, Oe = He("language", () => {
2618
- const e = O("auto"), n = O("vi"), t = O({
2618
+ const e = $("auto"), n = $("vi"), t = $({
2619
2619
  src: [],
2620
2620
  target: []
2621
- }), o = L(() => t.value.src[e.value]), l = L(() => t.value.target[n.value]);
2621
+ }), o = O(() => t.value.src[e.value]), l = O(() => t.value.target[n.value]);
2622
2622
  function s(i, u) {
2623
2623
  e.value = i == null ? void 0 : i.src, n.value = i == null ? void 0 : i.target, t.value = u;
2624
2624
  }
@@ -2643,7 +2643,7 @@ const xe = He("loader", () => {
2643
2643
  }, vs = ["onClick"], ps = { class: "flex" }, hs = { class: "grow flex flex-col" }, ms = { class: "grow flex flex-col" }, Jt = 3, gs = {
2644
2644
  __name: "Selects",
2645
2645
  setup(e) {
2646
- const n = Oe(), t = O([]), o = O([]);
2646
+ const n = Oe(), t = $([]), o = $([]);
2647
2647
  function l() {
2648
2648
  n.swap();
2649
2649
  }
@@ -2660,53 +2660,53 @@ const xe = He("loader", () => {
2660
2660
  (s) => {
2661
2661
  s && (o.value.includes(s) || (o.value.unshift(s), o.value = o.value.slice(0, Jt), Ze.setLocalStorage("recentTarget", o.value)));
2662
2662
  }
2663
- ), (s, r) => M(n).languages ? (h(), g("div", as, [
2663
+ ), (s, r) => k(n).languages ? (h(), C("div", as, [
2664
2664
  f("div", rs, [
2665
2665
  f("div", is, [
2666
- t.value.length > 0 ? (h(), g("div", us, [
2667
- (h(!0), g(z, null, Y(t.value, (a) => (h(), g("button", {
2666
+ t.value.length > 0 ? (h(), C("div", us, [
2667
+ (h(!0), C(z, null, Q(t.value, (a) => (h(), C("button", {
2668
2668
  key: a,
2669
2669
  class: "px-1 bg-base-100 border border-primary text-primary text-xs rounded hover:bg-primary hover:text-primary-content",
2670
- onClick: (i) => M(n).src = a
2671
- }, G(M(n).languages.src[a]), 9, cs))), 128))
2670
+ onClick: (i) => k(n).src = a
2671
+ }, G(k(n).languages.src[a]), 9, cs))), 128))
2672
2672
  ])) : R("", !0)
2673
2673
  ]),
2674
2674
  f("div", ds, [
2675
- o.value.length > 0 ? (h(), g("div", fs, [
2676
- (h(!0), g(z, null, Y(o.value, (a) => (h(), g("button", {
2675
+ o.value.length > 0 ? (h(), C("div", fs, [
2676
+ (h(!0), C(z, null, Q(o.value, (a) => (h(), C("button", {
2677
2677
  key: a,
2678
2678
  class: "px-1 bg-base-100 border border-primary text-primary text-xs rounded hover:bg-primary hover:text-primary-content",
2679
- onClick: (i) => M(n).target = a
2680
- }, G(M(n).languages.target[a]), 9, vs))), 128))
2679
+ onClick: (i) => k(n).target = a
2680
+ }, G(k(n).languages.target[a]), 9, vs))), 128))
2681
2681
  ])) : R("", !0)
2682
2682
  ])
2683
2683
  ]),
2684
2684
  f("div", ps, [
2685
2685
  f("div", hs, [
2686
- B(Gt, {
2687
- modelValue: M(n).src,
2688
- "onUpdate:modelValue": r[0] || (r[0] = (a) => M(n).src = a),
2689
- languages: M(n).languages.src,
2686
+ N(Gt, {
2687
+ modelValue: k(n).src,
2688
+ "onUpdate:modelValue": r[0] || (r[0] = (a) => k(n).src = a),
2689
+ languages: k(n).languages.src,
2690
2690
  class: "grow"
2691
2691
  }, null, 8, ["modelValue", "languages"])
2692
2692
  ]),
2693
- B(ss, {
2694
- isBidirect: M(n).src !== "auto",
2693
+ N(ss, {
2694
+ isBidirect: k(n).src !== "auto",
2695
2695
  class: "grow-0 mx-3 mt-4 self-start",
2696
2696
  onSwap: l
2697
2697
  }, null, 8, ["isBidirect"]),
2698
2698
  f("div", ms, [
2699
- B(Gt, {
2700
- modelValue: M(n).target,
2701
- "onUpdate:modelValue": r[1] || (r[1] = (a) => M(n).target = a),
2702
- languages: M(n).languages.target,
2699
+ N(Gt, {
2700
+ modelValue: k(n).target,
2701
+ "onUpdate:modelValue": r[1] || (r[1] = (a) => k(n).target = a),
2702
+ languages: k(n).languages.target,
2703
2703
  class: "grow"
2704
2704
  }, null, 8, ["modelValue", "languages"])
2705
2705
  ])
2706
2706
  ])
2707
2707
  ])) : R("", !0);
2708
2708
  }
2709
- }, Ie = {
2709
+ }, Le = {
2710
2710
  INPUT_MAX_LENGTH: 5e3,
2711
2711
  INPUT_DEBOUNCE: 1e3,
2712
2712
  IMPROVE_INPUT_MIN_LENGTH: 4,
@@ -2718,10 +2718,10 @@ const xe = He("loader", () => {
2718
2718
  return t;
2719
2719
  }, bs = {}, Cs = { class: "mr-2 loading loading-dots loading-xs" };
2720
2720
  function xs(e, n) {
2721
- return h(), g("span", Cs);
2721
+ return h(), C("span", Cs);
2722
2722
  }
2723
2723
  const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
2724
- const e = O({
2724
+ const e = $({
2725
2725
  src: null,
2726
2726
  target: null
2727
2727
  });
@@ -2774,7 +2774,7 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
2774
2774
  },
2775
2775
  emits: ["loadTTS"],
2776
2776
  setup(e, { emit: n }) {
2777
- const t = bt(), o = e, l = n, s = L(() => t.tts[o.type]), r = O(!1), a = new Audio(), i = O(!1);
2777
+ const t = bt(), o = e, l = n, s = O(() => t.tts[o.type]), r = $(!1), a = new Audio(), i = $(!1);
2778
2778
  F(
2779
2779
  s,
2780
2780
  () => {
@@ -2805,11 +2805,11 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
2805
2805
  }
2806
2806
  return a.onended = () => {
2807
2807
  r.value = !1;
2808
- }, (x, m) => r.value ? (h(), g("button", {
2808
+ }, (T, g) => r.value ? (h(), C("button", {
2809
2809
  key: 1,
2810
2810
  class: "btn btn-xs btn-circle",
2811
2811
  onClick: ft(d, ["prevent"])
2812
- }, Ss)) : (h(), g("button", {
2812
+ }, Ss)) : (h(), C("button", {
2813
2813
  key: 0,
2814
2814
  class: P(["btn btn-xs btn-circle", [
2815
2815
  { "btn-ghost": !e.disabled },
@@ -2818,7 +2818,7 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
2818
2818
  disabled: e.disabled,
2819
2819
  onClick: ft(u, ["prevent"])
2820
2820
  }, [
2821
- (h(), g("svg", {
2821
+ (h(), C("svg", {
2822
2822
  class: P(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]]),
2823
2823
  viewBox: "0 0 16 16",
2824
2824
  fill: "none",
@@ -2829,26 +2829,26 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
2829
2829
  }, $s = {
2830
2830
  class: "tooltip tooltip-bottom tooltip-small before:!bg-baseColor before:!border before:!border-solid before:!border-gray-200 before:![box-shadow:0px_1px_8px_0px_#3D44514D] before:!rounded-md before:!text-textSecondary before:!top-[90%] before:!text-xs before:!py-1 before:!px-2",
2831
2831
  "data-tip": "Clear"
2832
- }, Os = ["disabled"], Is = /* @__PURE__ */ f("path", {
2832
+ }, Os = ["disabled"], Ls = /* @__PURE__ */ f("path", {
2833
2833
  "fill-rule": "evenodd",
2834
2834
  "clip-rule": "evenodd",
2835
2835
  d: "M3.19102 3.19102C3.44571 2.93633 3.85864 2.93633 4.11333 3.19102L12.809 11.8867C13.0637 12.1414 13.0637 12.5543 12.809 12.809C12.5543 13.0637 12.1414 13.0637 11.8867 12.809L3.19102 4.11333C2.93633 3.85864 2.93633 3.44571 3.19102 3.19102Z",
2836
2836
  fill: "currentColor"
2837
- }, null, -1), Ls = /* @__PURE__ */ f("path", {
2837
+ }, null, -1), Is = /* @__PURE__ */ f("path", {
2838
2838
  "fill-rule": "evenodd",
2839
2839
  "clip-rule": "evenodd",
2840
2840
  d: "M12.809 3.19102C13.0637 3.44571 13.0637 3.85864 12.809 4.11333L4.11333 12.809C3.85864 13.0637 3.44571 13.0637 3.19102 12.809C2.93633 12.5543 2.93633 12.1414 3.19102 11.8867L11.8867 3.19102C12.1414 2.93633 12.5543 2.93633 12.809 3.19102Z",
2841
2841
  fill: "currentColor"
2842
2842
  }, null, -1), ks = [
2843
- Is,
2844
- Ls
2843
+ Ls,
2844
+ Is
2845
2845
  ], Pn = {
2846
2846
  __name: "ClearBtn",
2847
2847
  props: {
2848
2848
  disabled: Boolean
2849
2849
  },
2850
2850
  setup(e) {
2851
- return (n, t) => (h(), g("div", $s, [
2851
+ return (n, t) => (h(), C("div", $s, [
2852
2852
  f("button", {
2853
2853
  class: P(["btn btn-xs btn-circle", [
2854
2854
  { "btn-ghost": !e.disabled },
@@ -2856,7 +2856,7 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
2856
2856
  ]]),
2857
2857
  disabled: e.disabled
2858
2858
  }, [
2859
- (h(), g("svg", {
2859
+ (h(), C("svg", {
2860
2860
  class: P(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]]),
2861
2861
  viewBox: "0 0 16 16",
2862
2862
  fill: "none",
@@ -2878,14 +2878,14 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
2878
2878
  fill: "currentColor"
2879
2879
  }, null, -1), Ps = [
2880
2880
  Rs
2881
- ], Ns = {
2881
+ ], Bs = {
2882
2882
  __name: "FavoriteBtn",
2883
2883
  props: {
2884
2884
  disabled: Boolean,
2885
2885
  isFilled: Boolean
2886
2886
  },
2887
2887
  setup(e) {
2888
- return (n, t) => (h(), g("div", Ms, [
2888
+ return (n, t) => (h(), C("div", Ms, [
2889
2889
  f("button", {
2890
2890
  class: P(["btn btn-xs btn-circle", [
2891
2891
  { "btn-ghost": !e.disabled },
@@ -2893,13 +2893,13 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
2893
2893
  ]]),
2894
2894
  disabled: e.disabled
2895
2895
  }, [
2896
- e.isFilled ? (h(), g("svg", {
2896
+ e.isFilled ? (h(), C("svg", {
2897
2897
  key: 1,
2898
2898
  class: P(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]]),
2899
2899
  viewBox: "0 0 16 16",
2900
2900
  fill: "none",
2901
2901
  xmlns: "http://www.w3.org/2000/svg"
2902
- }, Ps, 2)) : (h(), g("svg", {
2902
+ }, Ps, 2)) : (h(), C("svg", {
2903
2903
  key: 0,
2904
2904
  class: P(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]]),
2905
2905
  viewBox: "0 0 16 16",
@@ -2909,7 +2909,7 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
2909
2909
  ], 10, As)
2910
2910
  ]));
2911
2911
  }
2912
- }, Bs = {
2912
+ }, Ns = {
2913
2913
  class: "tooltip tooltip-top tooltip-small before:!bg-baseColor before:!border before:!border-solid before:!border-gray-200 before:![box-shadow:0px_1px_8px_0px_#3D44514D] before:!rounded-md before:!text-textSecondary before:!text-xs before:!py-1 before:!px-2",
2914
2914
  "data-tip": "AI Translate"
2915
2915
  }, Fs = ["disabled"], js = /* @__PURE__ */ f("path", {
@@ -2925,7 +2925,7 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
2925
2925
  js,
2926
2926
  Hs,
2927
2927
  zs
2928
- ], Us = /* @__PURE__ */ Be('<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><path d="M3.5 1L4.79904 2.5H2.20096L3.5 1Z" fill="currentColor"></path><path d="M6 3.5L4.5 4.79904L4.5 2.20096L6 3.5Z" fill="currentColor"></path><path d="M10.3697 6.67832L8.22108 7.01422L9.5776 4.65296L10.3697 6.67832Z" fill="currentColor"></path><path d="M8.27756 5.34149L10.768 6.00067L9.11199 7.77878L8.27756 5.34149Z" fill="currentColor"></path><path d="M1 3.5L2.5 2.20096L2.5 4.79904L1 3.5Z" fill="currentColor"></path><path d="M3.5 6L2.20096 4.5L4.79904 4.5L3.5 6Z" fill="currentColor"></path><circle cx="9" cy="6" r="1" fill="currentColor"></circle><path d="M5.49718 9.92495L4.03391 10.4693L3.96891 9.60573L5.49718 9.92495Z" fill="currentColor"></path><path d="M3.54089 9.71696L5.10212 9.72621L4.857 10.5568L3.54089 9.71696Z" fill="currentColor"></path><path d="M3.50071 9.96247L5.0159 9.58606L4.9834 10.4515L3.50071 9.96247Z" fill="currentColor"></path>', 15), Ws = [
2928
+ ], Us = /* @__PURE__ */ Ne('<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><path d="M3.5 1L4.79904 2.5H2.20096L3.5 1Z" fill="currentColor"></path><path d="M6 3.5L4.5 4.79904L4.5 2.20096L6 3.5Z" fill="currentColor"></path><path d="M10.3697 6.67832L8.22108 7.01422L9.5776 4.65296L10.3697 6.67832Z" fill="currentColor"></path><path d="M8.27756 5.34149L10.768 6.00067L9.11199 7.77878L8.27756 5.34149Z" fill="currentColor"></path><path d="M1 3.5L2.5 2.20096L2.5 4.79904L1 3.5Z" fill="currentColor"></path><path d="M3.5 6L2.20096 4.5L4.79904 4.5L3.5 6Z" fill="currentColor"></path><circle cx="9" cy="6" r="1" fill="currentColor"></circle><path d="M5.49718 9.92495L4.03391 10.4693L3.96891 9.60573L5.49718 9.92495Z" fill="currentColor"></path><path d="M3.54089 9.71696L5.10212 9.72621L4.857 10.5568L3.54089 9.71696Z" fill="currentColor"></path><path d="M3.50071 9.96247L5.0159 9.58606L4.9834 10.4515L3.50071 9.96247Z" fill="currentColor"></path>', 15), Ws = [
2929
2929
  Us
2930
2930
  ], qs = {
2931
2931
  __name: "AIBtn",
@@ -2934,7 +2934,7 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
2934
2934
  isFilled: Boolean
2935
2935
  },
2936
2936
  setup(e) {
2937
- return (n, t) => (h(), g("div", Bs, [
2937
+ return (n, t) => (h(), C("div", Ns, [
2938
2938
  f("button", {
2939
2939
  class: P(["btn btn-xs btn-circle", [
2940
2940
  { "btn-ghost": !e.disabled },
@@ -2942,13 +2942,13 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
2942
2942
  ]]),
2943
2943
  disabled: e.disabled
2944
2944
  }, [
2945
- e.isFilled ? (h(), g("svg", {
2945
+ e.isFilled ? (h(), C("svg", {
2946
2946
  key: 1,
2947
2947
  class: P(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]]),
2948
2948
  viewBox: "0 0 12 12",
2949
2949
  fill: "none",
2950
2950
  xmlns: "http://www.w3.org/2000/svg"
2951
- }, Ws, 2)) : (h(), g("svg", {
2951
+ }, Ws, 2)) : (h(), C("svg", {
2952
2952
  key: 0,
2953
2953
  class: P(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]]),
2954
2954
  viewBox: "0 0 12 12",
@@ -2963,18 +2963,18 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
2963
2963
  fill: "currentColor"
2964
2964
  }, null, -1), Qs = [
2965
2965
  Ys
2966
- ], Nn = {
2966
+ ], Bn = {
2967
2967
  __name: "CopyBtn",
2968
2968
  props: {
2969
2969
  disabled: Boolean
2970
2970
  },
2971
2971
  setup(e) {
2972
- const n = O("Copy"), t = () => {
2972
+ const n = $("Copy"), t = () => {
2973
2973
  n.value = "Copied", setTimeout(() => {
2974
2974
  n.value = "Copy";
2975
2975
  }, 1e3);
2976
2976
  };
2977
- return (o, l) => (h(), g("div", {
2977
+ return (o, l) => (h(), C("div", {
2978
2978
  class: "tooltip tooltip-bottom tooltip-small before:!bg-baseColor before:!border before:!border-solid before:!border-gray-200 before:![box-shadow:0px_1px_8px_0px_#3D44514D] before:!rounded-md before:!text-textSecondary before:!top-[90%] before:!text-xs before:!py-1 before:!px-2",
2979
2979
  "data-tip": n.value
2980
2980
  }, [
@@ -2986,7 +2986,7 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
2986
2986
  disabled: e.disabled,
2987
2987
  onClick: t
2988
2988
  }, [
2989
- (h(), g("svg", {
2989
+ (h(), C("svg", {
2990
2990
  class: P(["w-3 h-3 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]]),
2991
2991
  viewBox: "0 0 14 16",
2992
2992
  fill: "none",
@@ -3058,39 +3058,39 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
3058
3058
  emits: ["clear", "favorite", "loadTTS", "aiTranslate", "copy"],
3059
3059
  setup(e, { emit: n }) {
3060
3060
  const t = n;
3061
- return (o, l) => (h(), g("div", Xs, [
3062
- e.src && e.isTTS ? (h(), W(Es, {
3061
+ return (o, l) => (h(), C("div", Xs, [
3062
+ e.src && e.isTTS ? (h(), Z(Es, {
3063
3063
  key: 0,
3064
3064
  type: e.type,
3065
3065
  onLoadTTS: l[0] || (l[0] = (s) => t("loadTTS"))
3066
3066
  }, null, 8, ["type"])) : R("", !0),
3067
3067
  f("div", Ks, [
3068
3068
  Ee(G(e.srcLabel) + " ", 1),
3069
- e.phonetic ? (h(), g("span", ea, "- " + G(e.phonetic), 1)) : R("", !0)
3069
+ e.phonetic ? (h(), C("span", ea, "- " + G(e.phonetic), 1)) : R("", !0)
3070
3070
  ]),
3071
- e.loading ? (h(), W(Mt, {
3071
+ e.loading ? (h(), Z(Mt, {
3072
3072
  key: 1,
3073
3073
  class: "absolute right-6 top-2"
3074
3074
  })) : R("", !0),
3075
3075
  f("div", ta, [
3076
- e.hasClearBtn ? (h(), W(Pn, {
3076
+ e.hasClearBtn ? (h(), Z(Pn, {
3077
3077
  key: 0,
3078
3078
  onClick: l[1] || (l[1] = (s) => t("clear")),
3079
3079
  disabled: e.loading
3080
3080
  }, null, 8, ["disabled"])) : R("", !0),
3081
- e.src && e.hasAIBtn ? (h(), W(qs, {
3081
+ e.src && e.hasAIBtn ? (h(), Z(qs, {
3082
3082
  key: 1,
3083
3083
  isFilled: e.isAITranslate,
3084
3084
  onClick: l[2] || (l[2] = (s) => t("aiTranslate")),
3085
3085
  disabled: e.loading
3086
3086
  }, null, 8, ["isFilled", "disabled"])) : R("", !0),
3087
- e.src && e.hasFavoriteBtn ? (h(), W(Ns, {
3087
+ e.src && e.hasFavoriteBtn ? (h(), Z(Bs, {
3088
3088
  key: 2,
3089
3089
  isFilled: e.isFavorite,
3090
3090
  onClick: l[3] || (l[3] = (s) => t("favorite")),
3091
3091
  disabled: e.loading
3092
3092
  }, null, 8, ["isFilled", "disabled"])) : R("", !0),
3093
- e.src && e.hasCopyBtn ? (h(), W(Nn, {
3093
+ e.src && e.hasCopyBtn ? (h(), Z(Bn, {
3094
3094
  key: 3,
3095
3095
  onClick: l[4] || (l[4] = (s) => t("copy")),
3096
3096
  disabled: e.loading
@@ -3098,18 +3098,18 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
3098
3098
  ])
3099
3099
  ]));
3100
3100
  }
3101
- }, Bn = /* @__PURE__ */ he(na, [["__scopeId", "data-v-faca0157"]]), ve = He("translation", () => {
3102
- const e = O(null), n = O(null), t = O(null), o = O({
3101
+ }, Nn = /* @__PURE__ */ he(na, [["__scopeId", "data-v-faca0157"]]), ve = He("translation", () => {
3102
+ const e = $(null), n = $(null), t = $(null), o = $({
3103
3103
  src: null,
3104
3104
  target: null
3105
- }), l = O(null), s = O([]), r = O([]), a = O([]), i = O([]), u = O({
3105
+ }), l = $(null), s = $([]), r = $([]), a = $([]), i = $([]), u = $({
3106
3106
  src: null,
3107
3107
  target: null
3108
- }), c = Oe(), d = L(() => c.getLabel(e.value)), x = L(() => c.getLabel(n.value));
3109
- function m(b) {
3108
+ }), c = Oe(), d = O(() => c.getLabel(e.value)), T = O(() => c.getLabel(n.value));
3109
+ function g(b) {
3110
3110
  e.value = b.src, n.value = b.target, t.value = b.text, o.value = b.phonetic, l.value = b.result, s.value = b.dictionary, r.value = b.definitions, a.value = b.synonyms, i.value = b.examples, u.value = b.tts;
3111
3111
  }
3112
- function C() {
3112
+ function x() {
3113
3113
  e.value = null, n.value = null, t.value = null, o.value = {
3114
3114
  src: null,
3115
3115
  target: null
@@ -3122,7 +3122,7 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
3122
3122
  src: e,
3123
3123
  srcLabel: d,
3124
3124
  target: n,
3125
- targetLabel: x,
3125
+ targetLabel: T,
3126
3126
  phonetic: o,
3127
3127
  text: t,
3128
3128
  result: l,
@@ -3131,15 +3131,15 @@ const Mt = /* @__PURE__ */ he(bs, [["render", xs]]), bt = He("tts", () => {
3131
3131
  synonyms: a,
3132
3132
  examples: i,
3133
3133
  tts: u,
3134
- init: m,
3135
- reset: C
3134
+ init: g,
3135
+ reset: x
3136
3136
  };
3137
3137
  });
3138
3138
  function oa(e) {
3139
3139
  return cn() ? (Tt(e), !0) : !1;
3140
3140
  }
3141
3141
  function Ke(e) {
3142
- return typeof e == "function" ? e() : M(e);
3142
+ return typeof e == "function" ? e() : k(e);
3143
3143
  }
3144
3144
  const la = typeof window < "u" && typeof document < "u";
3145
3145
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
@@ -3182,27 +3182,27 @@ function Qt(e) {
3182
3182
  }
3183
3183
  const ia = la ? window : void 0;
3184
3184
  function ua() {
3185
- const e = O(!1), n = rn();
3185
+ const e = $(!1), n = rn();
3186
3186
  return n && se(() => {
3187
3187
  e.value = !0;
3188
3188
  }, n), e;
3189
3189
  }
3190
3190
  function ca(e) {
3191
3191
  const n = ua();
3192
- return L(() => (n.value, !!e()));
3192
+ return O(() => (n.value, !!e()));
3193
3193
  }
3194
3194
  function da(e, n, t = {}) {
3195
3195
  const { window: o = ia, ...l } = t;
3196
3196
  let s;
3197
3197
  const r = ca(() => o && "ResizeObserver" in o), a = () => {
3198
3198
  s && (s.disconnect(), s = void 0);
3199
- }, i = L(() => Array.isArray(e) ? e.map((d) => Qt(d)) : [Qt(e)]), u = F(
3199
+ }, i = O(() => Array.isArray(e) ? e.map((d) => Qt(d)) : [Qt(e)]), u = F(
3200
3200
  i,
3201
3201
  (d) => {
3202
3202
  if (a(), r.value && o) {
3203
3203
  s = new ResizeObserver(n);
3204
- for (const x of d)
3205
- x && s.observe(x, l);
3204
+ for (const T of d)
3205
+ T && s.observe(T, l);
3206
3206
  }
3207
3207
  },
3208
3208
  { immediate: !0, flush: "post" }
@@ -3216,7 +3216,7 @@ function da(e, n, t = {}) {
3216
3216
  }
3217
3217
  function st(e) {
3218
3218
  var n;
3219
- const t = O(e == null ? void 0 : e.element), o = O(e == null ? void 0 : e.input), l = (n = e == null ? void 0 : e.styleProp) != null ? n : "height", s = O(1);
3219
+ const t = $(e == null ? void 0 : e.element), o = $(e == null ? void 0 : e.input), l = (n = e == null ? void 0 : e.styleProp) != null ? n : "height", s = $(1);
3220
3220
  function r() {
3221
3221
  var a;
3222
3222
  if (!t.value)
@@ -3224,7 +3224,7 @@ function st(e) {
3224
3224
  let i = "";
3225
3225
  t.value.style[l] = "1px", s.value = (a = t.value) == null ? void 0 : a.scrollHeight, e != null && e.styleTarget ? Ke(e.styleTarget).style[l] = `${s.value}px` : i = `${s.value}px`, t.value.style[l] = i;
3226
3226
  }
3227
- return F([o, t], () => X(r), { immediate: !0 }), F(s, () => {
3227
+ return F([o, t], () => Y(r), { immediate: !0 }), F(s, () => {
3228
3228
  var a;
3229
3229
  return (a = e == null ? void 0 : e.onResize) == null ? void 0 : a.call(e);
3230
3230
  }), da(t, () => r()), e != null && e.watch && F(e.watch, r, { immediate: !0, deep: !0 }), {
@@ -3247,53 +3247,53 @@ const fa = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
3247
3247
  },
3248
3248
  emits: ["change", "clear", "loadTTS"],
3249
3249
  setup(e, { emit: n }) {
3250
- const t = ve(), o = e, l = O(o.text), s = L(() => t.src), r = L(() => t.srcLabel), a = L(() => {
3251
- var C;
3252
- return (C = t.phonetic) == null ? void 0 : C.src;
3250
+ const t = ve(), o = e, l = $(o.text), s = O(() => t.src), r = O(() => t.srcLabel), a = O(() => {
3251
+ var x;
3252
+ return (x = t.phonetic) == null ? void 0 : x.src;
3253
3253
  }), { textarea: i } = st({ input: l, styleProp: "minHeight" }), u = n, c = ra(() => {
3254
3254
  u("change", l.value);
3255
- }, Ie.INPUT_DEBOUNCE);
3255
+ }, Le.INPUT_DEBOUNCE);
3256
3256
  se(() => {
3257
- m();
3257
+ g();
3258
3258
  });
3259
3259
  function d() {
3260
3260
  if (!l.value) {
3261
- x();
3261
+ T();
3262
3262
  return;
3263
3263
  }
3264
3264
  c();
3265
3265
  }
3266
- function x() {
3266
+ function T() {
3267
3267
  u("clear"), l.value = "", i.value.focus();
3268
3268
  }
3269
- async function m() {
3270
- await X(), i.value.select();
3269
+ async function g() {
3270
+ await Y(), i.value.select();
3271
3271
  }
3272
3272
  return F(
3273
3273
  () => o.text,
3274
- (C) => {
3275
- l.value !== C && m(), l.value = C;
3274
+ (x) => {
3275
+ l.value !== x && g(), l.value = x;
3276
3276
  }
3277
- ), (C, b) => (h(), g("div", fa, [
3278
- B(Bn, {
3277
+ ), (x, b) => (h(), C("div", fa, [
3278
+ N(Nn, {
3279
3279
  src: s.value,
3280
3280
  srcLabel: r.value,
3281
3281
  isTTS: e.isTTS,
3282
3282
  type: "src",
3283
3283
  phonetic: a.value,
3284
3284
  hasClearBtn: l.value.length > 0,
3285
- onClear: x,
3286
- onLoadTTS: b[0] || (b[0] = (I) => u("loadTTS"))
3285
+ onClear: T,
3286
+ onLoadTTS: b[0] || (b[0] = (A) => u("loadTTS"))
3287
3287
  }, null, 8, ["src", "srcLabel", "isTTS", "phonetic", "hasClearBtn"]),
3288
3288
  tt(f("textarea", {
3289
3289
  ref_key: "textarea",
3290
3290
  ref: i,
3291
- "onUpdate:modelValue": b[1] || (b[1] = (I) => l.value = I),
3291
+ "onUpdate:modelValue": b[1] || (b[1] = (A) => l.value = A),
3292
3292
  class: "w-full outline-none px-2 pr-8 bg-transparent text-base-content resize-none pb-3 overflow-x-hidden overflow-y-hidden",
3293
3293
  autofocus: "",
3294
3294
  rows: "2",
3295
3295
  onInput: d,
3296
- onFocus: m
3296
+ onFocus: g
3297
3297
  }, null, 544), [
3298
3298
  [
3299
3299
  nt,
@@ -3318,11 +3318,11 @@ const fa = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
3318
3318
  },
3319
3319
  emits: ["loadTTS", "favorite", "aiTranslate", "copy"],
3320
3320
  setup(e, { emit: n }) {
3321
- const t = ve(), o = L(() => t.result), l = L(() => t.target), s = L(() => t.targetLabel), r = L(() => {
3322
- var x;
3323
- return (x = t.phonetic) == null ? void 0 : x.target;
3324
- }), a = xe(), i = L(() => a.isLoading("translation")), { textarea: u, input: c } = st({ input: o, styleProp: "minHeight" }), d = n;
3325
- return (x, m) => (h(), g("div", {
3321
+ const t = ve(), o = O(() => t.result), l = O(() => t.target), s = O(() => t.targetLabel), r = O(() => {
3322
+ var T;
3323
+ return (T = t.phonetic) == null ? void 0 : T.target;
3324
+ }), a = xe(), i = O(() => a.isLoading("translation")), { textarea: u, input: c } = st({ input: o, styleProp: "minHeight" }), d = n;
3325
+ return (T, g) => (h(), C("div", {
3326
3326
  class: P([
3327
3327
  "relative p-0.5 bg-[length:300%_300%] bg-[position:0%_50%] border border-base-300 rounded",
3328
3328
  {
@@ -3331,7 +3331,7 @@ const fa = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
3331
3331
  ])
3332
3332
  }, [
3333
3333
  f("div", ha, [
3334
- B(Bn, {
3334
+ N(Nn, {
3335
3335
  loading: i.value,
3336
3336
  src: l.value,
3337
3337
  srcLabel: s.value,
@@ -3343,22 +3343,22 @@ const fa = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
3343
3343
  isFavorite: e.isFavorite,
3344
3344
  isAITranslate: e.isAITranslate,
3345
3345
  phonetic: r.value,
3346
- onFavorite: m[0] || (m[0] = (C) => d("favorite")),
3347
- onLoadTTS: m[1] || (m[1] = (C) => d("loadTTS")),
3348
- onAiTranslate: m[2] || (m[2] = (C) => d("aiTranslate")),
3349
- onCopy: m[3] || (m[3] = (C) => d("copy"))
3346
+ onFavorite: g[0] || (g[0] = (x) => d("favorite")),
3347
+ onLoadTTS: g[1] || (g[1] = (x) => d("loadTTS")),
3348
+ onAiTranslate: g[2] || (g[2] = (x) => d("aiTranslate")),
3349
+ onCopy: g[3] || (g[3] = (x) => d("copy"))
3350
3350
  }, null, 8, ["loading", "src", "srcLabel", "isTTS", "hasFavoriteBtn", "hasAIBtn", "isFavorite", "isAITranslate", "phonetic"]),
3351
3351
  f("div", ma, [
3352
3352
  tt(f("textarea", {
3353
3353
  ref_key: "textarea",
3354
3354
  ref: u,
3355
- "onUpdate:modelValue": m[4] || (m[4] = (C) => $e(c) ? c.value = C : null),
3355
+ "onUpdate:modelValue": g[4] || (g[4] = (x) => $e(c) ? c.value = x : null),
3356
3356
  class: "w-full outline-none px-2 pr-8 bg-transparent text-base-content resize-none pb-3 overflow-x-hidden overflow-y-hidden",
3357
3357
  readonly: "",
3358
3358
  rows: "2",
3359
3359
  spellcheck: "false"
3360
3360
  }, null, 512), [
3361
- [nt, M(c)]
3361
+ [nt, k(c)]
3362
3362
  ])
3363
3363
  ])
3364
3364
  ])
@@ -3371,11 +3371,11 @@ const fa = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
3371
3371
  },
3372
3372
  setup(e) {
3373
3373
  const n = e;
3374
- return (t, o) => (h(), g("button", Ca, [
3375
- n.isExpanded ? (h(), W(M(Tl), {
3374
+ return (t, o) => (h(), C("button", Ca, [
3375
+ n.isExpanded ? (h(), Z(k(Tl), {
3376
3376
  key: 0,
3377
3377
  class: "w-7 text-base-content/50"
3378
- })) : (h(), W(M(wl), {
3378
+ })) : (h(), Z(k(wl), {
3379
3379
  key: 1,
3380
3380
  class: "w-7 text-base-content/50"
3381
3381
  }))
@@ -3385,37 +3385,37 @@ const fa = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
3385
3385
  __name: "Dictionary",
3386
3386
  emits: ["translate"],
3387
3387
  setup(e, { emit: n }) {
3388
- const t = O(!0), o = ve(), l = Oe(), s = L(() => o.dictionary), r = n, a = () => {
3388
+ const t = $(!0), o = ve(), l = Oe(), s = O(() => o.dictionary), r = n, a = () => {
3389
3389
  t.value = !t.value;
3390
3390
  }, i = (u) => {
3391
3391
  r("translate", u, o.target, o.src), l.src = o.target, l.target = o.src, window.scrollTo(0, 0);
3392
3392
  };
3393
- return (u, c) => (h(), g(z, null, [
3393
+ return (u, c) => (h(), C(z, null, [
3394
3394
  f("div", {
3395
3395
  class: "flex justify-between items-center",
3396
3396
  onClick: a
3397
3397
  }, [
3398
3398
  xa,
3399
- B(at, { isExpanded: t.value }, null, 8, ["isExpanded"])
3399
+ N(at, { isExpanded: t.value }, null, 8, ["isExpanded"])
3400
3400
  ]),
3401
3401
  f("div", {
3402
3402
  class: P(["overflow-hidden", t.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
3403
3403
  }, [
3404
3404
  f("ul", null, [
3405
- (h(!0), g(z, null, Y(s.value, (d, x) => (h(), g("li", {
3406
- key: `${d.pos}-${x}`,
3405
+ (h(!0), C(z, null, Q(s.value, (d, T) => (h(), C("li", {
3406
+ key: `${d.pos}-${T}`,
3407
3407
  class: "mb-2"
3408
3408
  }, [
3409
3409
  f("h5", ya, G(d.pos), 1),
3410
3410
  f("ul", wa, [
3411
- (h(!0), g(z, null, Y(d.items, (m, C) => (h(), g("li", {
3412
- key: `${m.word}-${C}`
3411
+ (h(!0), C(z, null, Q(d.items, (g, x) => (h(), C("li", {
3412
+ key: `${g.word}-${x}`
3413
3413
  }, [
3414
3414
  f("span", {
3415
3415
  class: "m-0.5 font-normal badge badge-ghost bg-primary text-primary-content cursor-pointer border-0 rounded",
3416
- onClick: (b) => i(m.word)
3417
- }, G(m.word), 9, _a),
3418
- f("small", Ta, " - " + G(m.reverse_translation.join(", ")), 1)
3416
+ onClick: (b) => i(g.word)
3417
+ }, G(g.word), 9, _a),
3418
+ f("small", Ta, " - " + G(g.reverse_translation.join(", ")), 1)
3419
3419
  ]))), 128))
3420
3420
  ])
3421
3421
  ]))), 128))
@@ -3423,40 +3423,40 @@ const fa = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
3423
3423
  ], 2)
3424
3424
  ], 64));
3425
3425
  }
3426
- }, Ea = /* @__PURE__ */ f("h2", { class: "card-title text-base font-bold text-base-content" }, "Definitions", -1), $a = { class: "capitalize text-xs font-normal text-base-content/70 mb-1" }, Oa = { class: "text-sm text-base-content list-disc list-outside ml-5" }, Ia = /* @__PURE__ */ f("br", null, null, -1), La = {
3426
+ }, Ea = /* @__PURE__ */ f("h2", { class: "card-title text-base font-bold text-base-content" }, "Definitions", -1), $a = { class: "capitalize text-xs font-normal text-base-content/70 mb-1" }, Oa = { class: "text-sm text-base-content list-disc list-outside ml-5" }, La = /* @__PURE__ */ f("br", null, null, -1), Ia = {
3427
3427
  key: 0,
3428
3428
  class: "italic text-base-content/70"
3429
3429
  }, ka = {
3430
3430
  __name: "Definition",
3431
3431
  setup(e) {
3432
- const n = O(!0), t = ve(), o = L(() => t.definitions), l = () => {
3432
+ const n = $(!0), t = ve(), o = O(() => t.definitions), l = () => {
3433
3433
  n.value = !n.value;
3434
3434
  };
3435
- return (s, r) => (h(), g(z, null, [
3435
+ return (s, r) => (h(), C(z, null, [
3436
3436
  f("div", {
3437
3437
  class: "flex justify-between items-center",
3438
3438
  onClick: l
3439
3439
  }, [
3440
3440
  Ea,
3441
- B(at, { isExpanded: n.value }, null, 8, ["isExpanded"])
3441
+ N(at, { isExpanded: n.value }, null, 8, ["isExpanded"])
3442
3442
  ]),
3443
3443
  f("div", {
3444
3444
  class: P(["overflow-hidden", n.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
3445
3445
  }, [
3446
3446
  f("ul", null, [
3447
- (h(!0), g(z, null, Y(o.value, (a, i) => (h(), g("li", {
3447
+ (h(!0), C(z, null, Q(o.value, (a, i) => (h(), C("li", {
3448
3448
  key: `${a.pos}-${i}`,
3449
3449
  class: "mb-2"
3450
3450
  }, [
3451
3451
  f("h5", $a, G(a.pos), 1),
3452
3452
  f("ul", Oa, [
3453
- (h(!0), g(z, null, Y(a.items, (u, c) => (h(), g("li", {
3453
+ (h(!0), C(z, null, Q(a.items, (u, c) => (h(), C("li", {
3454
3454
  key: `${u.gloss}-${c}`,
3455
3455
  class: "mb-1"
3456
3456
  }, [
3457
3457
  f("span", null, G(u.gloss), 1),
3458
- Ia,
3459
- u.example ? (h(), g("small", La, '"' + G(u.example) + '"', 1)) : R("", !0)
3458
+ La,
3459
+ u.example ? (h(), C("small", Ia, '"' + G(u.example) + '"', 1)) : R("", !0)
3460
3460
  ]))), 128))
3461
3461
  ])
3462
3462
  ]))), 128))
@@ -3467,22 +3467,22 @@ const fa = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
3467
3467
  }, Ma = /* @__PURE__ */ f("h2", { class: "card-title text-base font-bold text-base-content" }, "Examples", -1), Aa = { class: "text-base-content text-sm list-disc list-outside ml-5 my-2" }, Va = ["innerHTML"], Da = {
3468
3468
  __name: "Example",
3469
3469
  setup(e) {
3470
- const n = O(!0), t = ve(), o = L(() => t.examples), l = () => {
3470
+ const n = $(!0), t = ve(), o = O(() => t.examples), l = () => {
3471
3471
  n.value = !n.value;
3472
3472
  };
3473
- return (s, r) => (h(), g(z, null, [
3473
+ return (s, r) => (h(), C(z, null, [
3474
3474
  f("div", {
3475
3475
  class: "flex justify-between items-center",
3476
3476
  onClick: l
3477
3477
  }, [
3478
3478
  Ma,
3479
- B(at, { isExpanded: n.value }, null, 8, ["isExpanded"])
3479
+ N(at, { isExpanded: n.value }, null, 8, ["isExpanded"])
3480
3480
  ]),
3481
3481
  f("div", {
3482
3482
  class: P(["overflow-hidden", n.value ? "max-h-[1000px] opacity-100" : "max-h-0 opacity-0"])
3483
3483
  }, [
3484
3484
  f("ul", Aa, [
3485
- (h(!0), g(z, null, Y(o.value, (a, i) => (h(), g("li", {
3485
+ (h(!0), C(z, null, Q(o.value, (a, i) => (h(), C("li", {
3486
3486
  key: `${a.definition_id}-${i}`,
3487
3487
  innerHTML: a
3488
3488
  }, null, 8, Va))), 128))
@@ -3490,43 +3490,43 @@ const fa = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
3490
3490
  ], 2)
3491
3491
  ], 64));
3492
3492
  }
3493
- }, Ra = /* @__PURE__ */ f("h2", { class: "card-title text-base font-bold text-base-content" }, "Synonyms", -1), Pa = { class: "capitalize text-xs font-normal text-base-content/70 mb-1" }, Na = { class: "list-none list-inside" }, Ba = { class: "flex flex-wrap" }, Fa = ["onClick"], ja = {
3493
+ }, Ra = /* @__PURE__ */ f("h2", { class: "card-title text-base font-bold text-base-content" }, "Synonyms", -1), Pa = { class: "capitalize text-xs font-normal text-base-content/70 mb-1" }, Ba = { class: "list-none list-inside" }, Na = { class: "flex flex-wrap" }, Fa = ["onClick"], ja = {
3494
3494
  __name: "Synonyms",
3495
3495
  emits: ["translate"],
3496
3496
  setup(e, { emit: n }) {
3497
- const t = O(!0), o = ve(), l = L(() => o.synonyms), s = n, r = () => {
3497
+ const t = $(!0), o = ve(), l = O(() => o.synonyms), s = n, r = () => {
3498
3498
  t.value = !t.value;
3499
3499
  }, a = (i) => {
3500
3500
  s("translate", i), window.scrollTo(0, 0);
3501
3501
  };
3502
- return (i, u) => (h(), g(z, null, [
3502
+ return (i, u) => (h(), C(z, null, [
3503
3503
  f("div", {
3504
3504
  class: "flex justify-between items-center",
3505
3505
  onClick: r
3506
3506
  }, [
3507
3507
  Ra,
3508
- B(at, { isExpanded: t.value }, null, 8, ["isExpanded"])
3508
+ N(at, { isExpanded: t.value }, null, 8, ["isExpanded"])
3509
3509
  ]),
3510
3510
  f("div", {
3511
3511
  class: P(["overflow-hidden", t.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
3512
3512
  }, [
3513
3513
  f("ul", null, [
3514
- (h(!0), g(z, null, Y(l.value, (c, d) => (h(), g("li", {
3514
+ (h(!0), C(z, null, Q(l.value, (c, d) => (h(), C("li", {
3515
3515
  key: `${c.pos}-${d}`,
3516
3516
  class: "mb-2"
3517
3517
  }, [
3518
3518
  f("h5", Pa, G(c.pos), 1),
3519
- f("ul", Na, [
3520
- (h(!0), g(z, null, Y(c.items, (x, m) => (h(), g("li", {
3521
- key: `${x.word}-${m}`,
3519
+ f("ul", Ba, [
3520
+ (h(!0), C(z, null, Q(c.items, (T, g) => (h(), C("li", {
3521
+ key: `${T.word}-${g}`,
3522
3522
  class: "mb-2"
3523
3523
  }, [
3524
- f("div", Ba, [
3525
- (h(!0), g(z, null, Y(x.synonym, (C, b) => (h(), g("span", {
3526
- key: `${C}-${b}`,
3524
+ f("div", Na, [
3525
+ (h(!0), C(z, null, Q(T.synonym, (x, b) => (h(), C("span", {
3526
+ key: `${x}-${b}`,
3527
3527
  class: "m-0.5 ml-0 font-normal badge badge-ghost bg-primary text-primary-content cursor-pointer border-0 rounded",
3528
- onClick: (I) => a(C)
3529
- }, G(C), 9, Fa))), 128))
3528
+ onClick: (A) => a(x)
3529
+ }, G(x), 9, Fa))), 128))
3530
3530
  ])
3531
3531
  ]))), 128))
3532
3532
  ])
@@ -3562,20 +3562,20 @@ const fa = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
3562
3562
  isExpanded: Boolean
3563
3563
  },
3564
3564
  setup(e) {
3565
- return (n, t) => (h(), g("button", {
3565
+ return (n, t) => (h(), C("button", {
3566
3566
  class: P(["btn btn-xs btn-circle", [
3567
3567
  { "btn-ghost": !e.disabled },
3568
3568
  { "!bg-transparent !border-none !shadow-none !ring-0": e.disabled }
3569
3569
  ]]),
3570
3570
  disabled: e.disabled
3571
3571
  }, [
3572
- e.isExpanded ? (h(), g("svg", {
3572
+ e.isExpanded ? (h(), C("svg", {
3573
3573
  key: 1,
3574
3574
  class: P(["w-6 h-6 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]]),
3575
3575
  viewBox: "0 0 24 24",
3576
3576
  xmlns: "http://www.w3.org/2000/svg",
3577
3577
  fill: "none"
3578
- }, qa, 2)) : (h(), g("svg", {
3578
+ }, qa, 2)) : (h(), C("svg", {
3579
3579
  key: 0,
3580
3580
  class: P(["w-6 h-6 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]]),
3581
3581
  viewBox: "0 0 24 24",
@@ -3605,19 +3605,19 @@ const fa = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
3605
3605
  },
3606
3606
  emits: ["aiExplain"],
3607
3607
  setup(e, { emit: n }) {
3608
- const t = xe(), o = L(() => t.isLoading("aiExplanation")), l = n;
3608
+ const t = xe(), o = O(() => t.isLoading("aiExplanation")), l = n;
3609
3609
  function s() {
3610
3610
  l("aiExplain");
3611
3611
  }
3612
3612
  return (r, a) => {
3613
3613
  var i, u;
3614
- return h(), g("div", Ja, [
3614
+ return h(), C("div", Ja, [
3615
3615
  f("div", Ya, [
3616
3616
  Qa,
3617
3617
  f("div", Xa, [
3618
- o.value ? (h(), W(Mt, { key: 0 })) : R("", !0),
3618
+ o.value ? (h(), Z(Mt, { key: 0 })) : R("", !0),
3619
3619
  f("div", Ka, [
3620
- B(Ga, {
3620
+ N(Ga, {
3621
3621
  isExpanded: e.isAIExplain,
3622
3622
  disabled: o.value,
3623
3623
  onClick: s
@@ -3628,9 +3628,9 @@ const fa = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
3628
3628
  f("div", {
3629
3629
  class: P(["overflow-hidden", e.isAIExplain ? "max-h-[1000px] opacity-100" : "max-h-0 opacity-0"])
3630
3630
  }, [
3631
- (i = e.explanation) != null && i.result ? (h(), g("ul", er, [
3632
- (h(!0), g(z, null, Y(((u = e.explanation) == null ? void 0 : u.result.split(`
3633
- `)) || [], (c, d) => (h(), g("li", {
3631
+ (i = e.explanation) != null && i.result ? (h(), C("ul", er, [
3632
+ (h(!0), C(z, null, Q(((u = e.explanation) == null ? void 0 : u.result.split(`
3633
+ `)) || [], (c, d) => (h(), C("li", {
3634
3634
  key: `${c}-${d}`,
3635
3635
  innerHTML: c
3636
3636
  }, null, 8, tr))), 128))
@@ -3649,7 +3649,7 @@ function lr() {
3649
3649
  const Xt = {
3650
3650
  supportRTL: or,
3651
3651
  removeRTL: lr
3652
- }, sr = ["ar", "fa", "iw", "yi", "ur", "pa"], ar = (e) => (Et("data-v-08f9cb53"), e = e(), $t(), e), rr = { class: "pb-6" }, ir = { class: "flex flex-col lg:flex-row lg:gap-2" }, ur = {
3652
+ }, sr = ["ar", "fa", "iw", "yi", "ur", "pa"], ar = (e) => (Et("data-v-6989ae32"), e = e(), $t(), e), rr = { class: "pb-6" }, ir = { class: "flex flex-col lg:flex-row lg:gap-2" }, ur = {
3653
3653
  id: "input",
3654
3654
  class: "w-full lg:w-[calc(50%-1rem)] flex mt-1"
3655
3655
  }, cr = /* @__PURE__ */ ar(() => /* @__PURE__ */ f("div", { class: "w-6 h-4 mx-auto hidden lg:block" }, null, -1)), dr = { class: "w-full lg:w-[calc(50%-1rem)] flex mt-1" }, fr = {
@@ -3687,7 +3687,11 @@ const Xt = {
3687
3687
  isFavorite: Boolean,
3688
3688
  isAITranslate: Boolean,
3689
3689
  isAIExplain: Boolean,
3690
- aiExplainMinLength: Number
3690
+ aiExplainMinLength: Number,
3691
+ seedText: {
3692
+ type: String,
3693
+ default: ""
3694
+ }
3691
3695
  },
3692
3696
  emits: [
3693
3697
  "opt",
@@ -3696,144 +3700,158 @@ const Xt = {
3696
3700
  "favorite",
3697
3701
  "aiTranslate",
3698
3702
  "aiExplain",
3699
- "copy"
3703
+ "copy",
3704
+ "seeded"
3700
3705
  ],
3701
3706
  setup(e, { emit: n }) {
3702
- const t = O(""), o = e, l = le("translationStore"), s = le("ttsStore"), r = le("languageStore"), a = le("loaderStore"), i = n, u = () => {
3703
- const $ = o.opt.target;
3704
- sr.includes($) ? Xt.supportRTL() : Xt.removeRTL();
3707
+ const t = $(""), o = $(!1), l = $(!1), s = e, r = le("translationStore"), a = le("ttsStore"), i = le("languageStore"), u = le("loaderStore"), c = n, d = () => {
3708
+ const _ = s.opt.target;
3709
+ sr.includes(_) ? Xt.supportRTL() : Xt.removeRTL();
3705
3710
  };
3706
3711
  F(
3707
- () => o.translation,
3708
- ($) => {
3709
- a.setLoading("translation", !1), $ && (t.value = $.text, l.init($), s.reset());
3712
+ () => s.translation,
3713
+ (_) => {
3714
+ var m;
3715
+ const E = (m = s.seedText) == null ? void 0 : m.trim();
3716
+ if (E && !l.value) {
3717
+ l.value = !0, o.value = !0, t.value = E, u.setLoading("translation", !0), r.reset();
3718
+ return;
3719
+ }
3720
+ if (!_) {
3721
+ l.value || u.setLoading("translation", !1);
3722
+ return;
3723
+ }
3724
+ const y = _.text || "", w = t.value || "";
3725
+ o.value && y !== w || (u.setLoading("translation", !1), t.value = y, r.init(_), a.reset());
3710
3726
  },
3711
3727
  { immediate: !0 }
3712
3728
  ), F(
3713
- [() => o.explanation, () => o.isAIExplain],
3714
- ([$]) => {
3715
- $ != null && $.result && a.setLoading("aiExplanation", !1);
3729
+ [() => s.explanation, () => s.isAIExplain],
3730
+ ([_]) => {
3731
+ _ != null && _.result && u.setLoading("aiExplanation", !1);
3716
3732
  },
3717
3733
  { immediate: !0, deep: !0 }
3718
3734
  ), F(
3719
- () => o.tts,
3720
- ($) => {
3721
- if (!$) {
3722
- s.reset();
3735
+ () => s.tts,
3736
+ (_) => {
3737
+ if (!_) {
3738
+ a.reset();
3723
3739
  return;
3724
3740
  }
3725
- s.set($);
3741
+ a.set(_);
3726
3742
  },
3727
3743
  { immediate: !0 }
3728
- ), F([() => o.opt, () => o.languages], ([$, w]) => {
3729
- r.init($, w), u();
3730
- }), F([() => r.src, () => r.target], ([$, w]) => {
3731
- i("opt", { src: $, target: w }), m(t.value);
3744
+ ), F([() => s.opt, () => s.languages], ([_, E]) => {
3745
+ i.init(_, E), d();
3746
+ }), F([() => i.src, () => i.target], ([_, E]) => {
3747
+ c("opt", { src: _, target: E }), !l.value && b(t.value);
3732
3748
  }), se(() => {
3733
- r.init(o.opt, o.languages), u();
3749
+ i.init(s.opt, s.languages), d(), l.value && (b(t.value), c("seeded"), Y(() => {
3750
+ l.value = !1;
3751
+ }));
3734
3752
  });
3735
- function c() {
3736
- t.value = "", o.isAITranslate && C(), l.reset();
3753
+ function T() {
3754
+ o.value = !0, t.value = "", u.setLoading("translation", !1), s.isAITranslate && A(), r.reset();
3737
3755
  }
3738
- function d($) {
3739
- t.value = $, m($);
3756
+ function g(_) {
3757
+ o.value = !0, t.value = _, b(_);
3740
3758
  }
3741
- function x($) {
3742
- const w = $ === "src" ? l.text : l.result;
3743
- i("loadTTS", { type: $, data: w });
3759
+ function x(_) {
3760
+ const E = _ === "src" ? r.text : r.result;
3761
+ c("loadTTS", { type: _, data: E });
3744
3762
  }
3745
- function m($, w = r.src, y = r.target) {
3746
- $ && (I(), t.value = $, a.setLoading("translation", !0), i("translate", {
3747
- src: w,
3763
+ function b(_, E = i.src, y = i.target) {
3764
+ _ && (I(), t.value = _, u.setLoading("translation", !0), c("translate", {
3765
+ src: E,
3748
3766
  target: y,
3749
- text: $
3767
+ text: _
3750
3768
  }));
3751
3769
  }
3752
- function C() {
3753
- o.isAITranslate || a.setLoading("translation", !0), i("aiTranslate", {
3754
- src: r.src,
3755
- target: r.target,
3770
+ function A() {
3771
+ s.isAITranslate || u.setLoading("translation", !0), c("aiTranslate", {
3772
+ src: i.src,
3773
+ target: i.target,
3756
3774
  text: t.value
3757
3775
  });
3758
3776
  }
3759
- function b() {
3760
- o.isAIExplain || a.setLoading("aiExplanation", !0), i("aiExplain", {
3761
- src: r.src,
3762
- target: r.target,
3777
+ function V() {
3778
+ s.isAIExplain || u.setLoading("aiExplanation", !0), c("aiExplain", {
3779
+ src: i.src,
3780
+ target: i.target,
3763
3781
  text: t.value
3764
3782
  });
3765
3783
  }
3766
3784
  function I() {
3767
- const $ = document.getElementById("input");
3768
- $ && $.getBoundingClientRect().top < 0 && $.scrollIntoView({ behavior: "smooth" });
3785
+ const _ = document.getElementById("input");
3786
+ _ && _.getBoundingClientRect().top < 0 && _.scrollIntoView({ behavior: "smooth" });
3769
3787
  }
3770
- return ($, w) => {
3771
- var y, _, T, V, S;
3772
- return h(), g("div", rr, [
3773
- B(gs),
3788
+ return (_, E) => {
3789
+ var y, w, m, S, D;
3790
+ return h(), C("div", rr, [
3791
+ N(gs),
3774
3792
  f("div", ir, [
3775
3793
  f("div", ur, [
3776
- B(pa, {
3794
+ N(pa, {
3777
3795
  text: t.value,
3778
3796
  isTTS: e.isTTS,
3779
- onChange: d,
3780
- onClear: c,
3781
- onLoadTTS: w[0] || (w[0] = (E) => x("src")),
3797
+ onChange: g,
3798
+ onClear: T,
3799
+ onLoadTTS: E[0] || (E[0] = (v) => x("src")),
3782
3800
  class: "flex-grow flex flex-col"
3783
3801
  }, null, 8, ["text", "isTTS"])
3784
3802
  ]),
3785
3803
  cr,
3786
3804
  f("div", dr, [
3787
- B(ba, {
3805
+ N(ba, {
3788
3806
  isFavoriteFeatureEnabled: e.isFavoriteFeatureEnabled,
3789
3807
  isAITranslateFeatureEnabled: e.isAITranslateFeatureEnabled,
3790
3808
  isAITranslate: e.isAITranslate,
3791
3809
  isFavorite: e.isFavorite,
3792
3810
  isTTS: e.isTTS,
3793
- onCopy: w[1] || (w[1] = (E) => {
3794
- var D;
3795
- return $.$emit("copy", (D = M(l)) == null ? void 0 : D.result);
3811
+ onCopy: E[1] || (E[1] = (v) => {
3812
+ var p;
3813
+ return _.$emit("copy", (p = k(r)) == null ? void 0 : p.result);
3796
3814
  }),
3797
- onAiTranslate: C,
3798
- onFavorite: w[2] || (w[2] = (E) => $.$emit("favorite")),
3799
- onLoadTTS: w[3] || (w[3] = (E) => x("target")),
3815
+ onAiTranslate: A,
3816
+ onFavorite: E[2] || (E[2] = (v) => _.$emit("favorite")),
3817
+ onLoadTTS: E[3] || (E[3] = (v) => x("target")),
3800
3818
  class: "flex-grow flex flex-col"
3801
3819
  }, null, 8, ["isFavoriteFeatureEnabled", "isAITranslateFeatureEnabled", "isAITranslate", "isFavorite", "isTTS"])
3802
3820
  ])
3803
3821
  ]),
3804
- e.translation ? (h(), g("div", fr, [
3805
- ((y = M(l).result) == null ? void 0 : y.length) > e.aiExplainMinLength ? (h(), g("div", vr, [
3806
- B(nr, {
3822
+ e.translation ? (h(), C("div", fr, [
3823
+ ((y = k(r).result) == null ? void 0 : y.length) > e.aiExplainMinLength ? (h(), C("div", vr, [
3824
+ N(nr, {
3807
3825
  isAIExplain: e.isAIExplain,
3808
3826
  explanation: e.explanation,
3809
- onAiExplain: b
3827
+ onAiExplain: V
3810
3828
  }, null, 8, ["isAIExplain", "explanation"])
3811
3829
  ])) : R("", !0),
3812
- (_ = M(l).dictionary) != null && _.length ? (h(), g("div", pr, [
3830
+ (w = k(r).dictionary) != null && w.length ? (h(), C("div", pr, [
3813
3831
  f("div", hr, [
3814
- B(Sa, { onTranslate: m })
3832
+ N(Sa, { onTranslate: b })
3815
3833
  ])
3816
3834
  ])) : R("", !0),
3817
- (T = M(l).definitions) != null && T.length ? (h(), g("div", mr, [
3835
+ (m = k(r).definitions) != null && m.length ? (h(), C("div", mr, [
3818
3836
  f("div", gr, [
3819
- B(ka)
3837
+ N(ka)
3820
3838
  ])
3821
3839
  ])) : R("", !0),
3822
- (V = M(l).synonyms) != null && V.length ? (h(), g("div", br, [
3840
+ (S = k(r).synonyms) != null && S.length ? (h(), C("div", br, [
3823
3841
  f("div", Cr, [
3824
- B(ja, { onTranslate: m })
3842
+ N(ja, { onTranslate: b })
3825
3843
  ])
3826
3844
  ])) : R("", !0),
3827
- (S = M(l).examples) != null && S.length ? (h(), g("div", xr, [
3845
+ (D = k(r).examples) != null && D.length ? (h(), C("div", xr, [
3828
3846
  f("div", yr, [
3829
- B(Da)
3847
+ N(Da)
3830
3848
  ])
3831
3849
  ])) : R("", !0)
3832
- ])) : (h(), g("span", wr, "Service unavailable"))
3850
+ ])) : (h(), C("span", wr, "Service unavailable"))
3833
3851
  ]);
3834
3852
  };
3835
3853
  }
3836
- }, Tr = /* @__PURE__ */ he(_r, [["__scopeId", "data-v-08f9cb53"]]), Sr = ["disabled"], Er = /* @__PURE__ */ f("path", {
3854
+ }, Tr = /* @__PURE__ */ he(_r, [["__scopeId", "data-v-6989ae32"]]), Sr = ["disabled"], Er = /* @__PURE__ */ f("path", {
3837
3855
  "stroke-linecap": "round",
3838
3856
  "stroke-linejoin": "round",
3839
3857
  "stroke-width": "2",
@@ -3847,13 +3865,13 @@ const Xt = {
3847
3865
  },
3848
3866
  emits: ["click"],
3849
3867
  setup(e) {
3850
- return (n, t) => (h(), g("button", {
3868
+ return (n, t) => (h(), C("button", {
3851
3869
  class: "bg-base-100 rounded-full hover:bg-base-200 focus:outline-none active:scale-95",
3852
3870
  onClick: t[0] || (t[0] = (o) => n.$emit("click")),
3853
3871
  disabled: e.disabled,
3854
3872
  "aria-label": "Retry"
3855
3873
  }, [
3856
- (h(), g("svg", {
3874
+ (h(), C("svg", {
3857
3875
  class: P(["h-5 w-5 text-primary", { "opacity-50": e.disabled }]),
3858
3876
  xmlns: "http://www.w3.org/2000/svg",
3859
3877
  fill: "none",
@@ -3862,7 +3880,7 @@ const Xt = {
3862
3880
  }, $r, 2))
3863
3881
  ], 8, Sr));
3864
3882
  }
3865
- }, Ir = ["data-tip"], Lr = ["disabled"], kr = /* @__PURE__ */ f("path", { d: "M2.293,21.707a1,1,0,0,0,1.414,0l3.2-3.2A9.581,9.581,0,0,0,12,20c4.325,0,8.227-3,9.938-7.654a.993.993,0,0,0,0-.692A12.6,12.6,0,0,0,18.7,6.719l3.012-3.012a1,1,0,1,0-1.414-1.414l-3.2,3.2A9.581,9.581,0,0,0,12,4C7.675,4,3.773,7,2.062,11.654a.993.993,0,0,0,0,.692,12.6,12.6,0,0,0,3.243,4.935L2.293,20.293A1,1,0,0,0,2.293,21.707ZM17.266,8.148A10.454,10.454,0,0,1,19.929,12c-1.478,3.657-4.556,6-7.929,6a7.52,7.52,0,0,1-3.632-.954l1.613-1.613A3.947,3.947,0,0,0,12,16a4,4,0,0,0,4-4,3.947,3.947,0,0,0-.567-2.019Zm-7.191,4.363A1.96,1.96,0,0,1,10,12a2,2,0,0,1,2-2,1.96,1.96,0,0,1,.511.075Zm3.85-1.022A1.96,1.96,0,0,1,14,12a2,2,0,0,1-2,2,1.96,1.96,0,0,1-.511-.075ZM4.071,12C5.549,8.343,8.627,6,12,6a7.52,7.52,0,0,1,3.632.954L14.019,8.567A3.947,3.947,0,0,0,12,8a4,4,0,0,0-4,4,3.947,3.947,0,0,0,.567,2.019L6.734,15.852A10.454,10.454,0,0,1,4.071,12Z" }, null, -1), Mr = [
3883
+ }, Lr = ["data-tip"], Ir = ["disabled"], kr = /* @__PURE__ */ f("path", { d: "M2.293,21.707a1,1,0,0,0,1.414,0l3.2-3.2A9.581,9.581,0,0,0,12,20c4.325,0,8.227-3,9.938-7.654a.993.993,0,0,0,0-.692A12.6,12.6,0,0,0,18.7,6.719l3.012-3.012a1,1,0,1,0-1.414-1.414l-3.2,3.2A9.581,9.581,0,0,0,12,4C7.675,4,3.773,7,2.062,11.654a.993.993,0,0,0,0,.692,12.6,12.6,0,0,0,3.243,4.935L2.293,20.293A1,1,0,0,0,2.293,21.707ZM17.266,8.148A10.454,10.454,0,0,1,19.929,12c-1.478,3.657-4.556,6-7.929,6a7.52,7.52,0,0,1-3.632-.954l1.613-1.613A3.947,3.947,0,0,0,12,16a4,4,0,0,0,4-4,3.947,3.947,0,0,0-.567-2.019Zm-7.191,4.363A1.96,1.96,0,0,1,10,12a2,2,0,0,1,2-2,1.96,1.96,0,0,1,.511.075Zm3.85-1.022A1.96,1.96,0,0,1,14,12a2,2,0,0,1-2,2,1.96,1.96,0,0,1-.511-.075ZM4.071,12C5.549,8.343,8.627,6,12,6a7.52,7.52,0,0,1,3.632.954L14.019,8.567A3.947,3.947,0,0,0,12,8a4,4,0,0,0-4,4,3.947,3.947,0,0,0,.567,2.019L6.734,15.852A10.454,10.454,0,0,1,4.071,12Z" }, null, -1), Mr = [
3866
3884
  kr
3867
3885
  ], Ar = /* @__PURE__ */ f("path", { d: "M12,7a4,4,0,1,0,4,4A4,4,0,0,0,12,7Zm0,6a2,2,0,1,1,2-2A2,2,0,0,1,12,13Zm6.5,2v1.5H20a1,1,0,0,1,0,2H18.5V20a1,1,0,0,1-2,0V18.5H15a1,1,0,0,1,0-2h1.5V15a1,1,0,0,1,2,0Zm3.438-4.345a.987.987,0,0,1,0,.69,13.339,13.339,0,0,1-1.08,2.264,1,1,0,1,1-1.715-1.028A11.3,11.3,0,0,0,19.928,11C18.451,7.343,15.373,5,12,5S5.549,7.343,4.072,11a9.315,9.315,0,0,0,6.167,5.787,1,1,0,1,1-.478,1.942,11.393,11.393,0,0,1-7.7-7.383.99.99,0,0,1,0-.691C3.773,6,7.674,3,12,3S20.227,6,21.938,10.655Z" }, null, -1), Vr = [
3868
3886
  Ar
@@ -3874,7 +3892,7 @@ const Xt = {
3874
3892
  },
3875
3893
  emits: ["toggle"],
3876
3894
  setup(e) {
3877
- return (n, t) => (h(), g("div", {
3895
+ return (n, t) => (h(), C("div", {
3878
3896
  class: "tooltip tooltip-bottom tooltip-small before:!bg-baseColor before:!border before:!border-solid before:!border-gray-200 before:![box-shadow:0px_1px_8px_0px_#3D44514D] before:!rounded-md before:!text-textSecondary before:!top-[90%] before:!text-xs before:!py-1 before:!px-2",
3879
3897
  "data-tip": e.isDiffMode ? "Hide Differences" : "Show Differences"
3880
3898
  }, [
@@ -3886,23 +3904,58 @@ const Xt = {
3886
3904
  disabled: e.disabled,
3887
3905
  onClick: t[0] || (t[0] = (o) => n.$emit("toggle"))
3888
3906
  }, [
3889
- e.isDiffMode ? (h(), g("svg", {
3907
+ e.isDiffMode ? (h(), C("svg", {
3890
3908
  key: 1,
3891
3909
  class: P(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]]),
3892
3910
  fill: "currentColor",
3893
3911
  viewBox: "0 0 24 24",
3894
3912
  xmlns: "http://www.w3.org/2000/svg"
3895
- }, Vr, 2)) : (h(), g("svg", {
3913
+ }, Vr, 2)) : (h(), C("svg", {
3896
3914
  key: 0,
3897
3915
  class: P(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]]),
3898
3916
  fill: "currentColor",
3899
3917
  viewBox: "0 0 24 24",
3900
3918
  xmlns: "http://www.w3.org/2000/svg"
3901
3919
  }, Mr, 2))
3902
- ], 10, Lr)
3903
- ], 8, Ir));
3920
+ ], 10, Ir)
3921
+ ], 8, Lr));
3904
3922
  }
3905
- }, Rr = { class: "flex flex-row px-2 pr-10 items-center bg-transparent relative" }, Pr = { class: "absolute right-1 top-1 flex flex-col items-center gap-0" }, Fn = {
3923
+ }, Rr = {
3924
+ class: "tooltip tooltip-bottom tooltip-small before:!bg-baseColor before:!border before:!border-solid before:!border-gray-200 before:![box-shadow:0px_1px_8px_0px_#3D44514D] before:!rounded-md before:!text-textSecondary before:!top-[90%] before:!text-xs before:!py-1 before:!px-2",
3925
+ "data-tip": "Translate"
3926
+ }, Pr = ["disabled"], Br = /* @__PURE__ */ f("path", {
3927
+ d: "m10.5 21 5.25-11.25L21 21m-9-3h7.5M3 5.621a48.474 48.474 0 0 1 6-.371m0 0c1.12 0 2.233.038 3.334.114M9 5.25V3m3.334 2.364C11.176 10.658 7.69 15.08 3 17.502m9.334-12.138c.896.061 1.785.147 2.666.257m-4.589 8.495a18.023 18.023 0 0 1-3.827-5.802",
3928
+ stroke: "currentColor",
3929
+ "stroke-width": "1.5",
3930
+ "stroke-linecap": "round",
3931
+ "stroke-linejoin": "round"
3932
+ }, null, -1), Nr = [
3933
+ Br
3934
+ ], Fr = {
3935
+ __name: "TranslateBtn",
3936
+ props: {
3937
+ disabled: Boolean
3938
+ },
3939
+ setup(e) {
3940
+ return (n, t) => (h(), C("div", Rr, [
3941
+ f("button", {
3942
+ class: P(["btn btn-xs btn-circle", [
3943
+ { "btn-ghost": !e.disabled },
3944
+ { "!bg-transparent !border-none !shadow-none !ring-0": e.disabled }
3945
+ ]]),
3946
+ disabled: e.disabled,
3947
+ "aria-label": "Translate"
3948
+ }, [
3949
+ (h(), C("svg", {
3950
+ class: P(["w-4 h-4 text-primary", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]]),
3951
+ viewBox: "0 0 24 24",
3952
+ fill: "none",
3953
+ xmlns: "http://www.w3.org/2000/svg"
3954
+ }, Nr, 2))
3955
+ ], 10, Pr)
3956
+ ]));
3957
+ }
3958
+ }, jr = { class: "flex flex-row px-2 pr-10 items-center bg-transparent relative" }, Hr = { class: "absolute right-1 top-1 flex flex-col items-center gap-0" }, Fn = {
3906
3959
  __name: "InputBtnGroup",
3907
3960
  props: {
3908
3961
  loading: {
@@ -3917,6 +3970,10 @@ const Xt = {
3917
3970
  type: Boolean,
3918
3971
  default: !1
3919
3972
  },
3973
+ hasTranslateBtn: {
3974
+ type: Boolean,
3975
+ default: !1
3976
+ },
3920
3977
  hasClearBtn: {
3921
3978
  type: Boolean,
3922
3979
  default: !1
@@ -3934,33 +3991,38 @@ const Xt = {
3934
3991
  default: !1
3935
3992
  }
3936
3993
  },
3937
- emits: ["copy", "clear", "toggleDiff", "info"],
3994
+ emits: ["copy", "clear", "toggleDiff", "info", "translate"],
3938
3995
  setup(e) {
3939
- return (n, t) => (h(), g("div", Rr, [
3940
- e.loading ? (h(), W(Mt, {
3996
+ return (n, t) => (h(), C("div", jr, [
3997
+ e.loading ? (h(), Z(Mt, {
3941
3998
  key: 0,
3942
3999
  class: "absolute right-6 top-2"
3943
4000
  })) : R("", !0),
3944
- f("div", Pr, [
3945
- e.showDiffToggle ? (h(), W(Dr, {
4001
+ f("div", Hr, [
4002
+ e.showDiffToggle ? (h(), Z(Dr, {
3946
4003
  key: 0,
3947
4004
  disabled: e.loading,
3948
4005
  isDiffMode: e.isDiffMode,
3949
4006
  onToggle: t[0] || (t[0] = (o) => n.$emit("toggleDiff"))
3950
4007
  }, null, 8, ["disabled", "isDiffMode"])) : R("", !0),
3951
- e.hasClearBtn && e.src ? (h(), W(Pn, {
4008
+ e.hasTranslateBtn && e.src.trim() ? (h(), Z(Fr, {
3952
4009
  key: 1,
3953
- onClick: t[1] || (t[1] = (o) => n.$emit("clear")),
3954
- disabled: e.loading
4010
+ disabled: e.loading,
4011
+ onClick: t[1] || (t[1] = (o) => n.$emit("translate"))
3955
4012
  }, null, 8, ["disabled"])) : R("", !0),
3956
- e.hasCopyBtn && e.src ? (h(), W(Nn, {
4013
+ e.hasClearBtn && e.src ? (h(), Z(Pn, {
3957
4014
  key: 2,
3958
- onClick: t[2] || (t[2] = (o) => n.$emit("copy"))
4015
+ onClick: t[2] || (t[2] = (o) => n.$emit("clear")),
4016
+ disabled: e.loading
4017
+ }, null, 8, ["disabled"])) : R("", !0),
4018
+ e.hasCopyBtn && e.src ? (h(), Z(Bn, {
4019
+ key: 3,
4020
+ onClick: t[3] || (t[3] = (o) => n.$emit("copy"))
3959
4021
  })) : R("", !0)
3960
4022
  ])
3961
4023
  ]));
3962
4024
  }
3963
- }, Nr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }, Br = ["onKeydown", "placeholder"], Fr = {
4025
+ }, zr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }, Zr = ["onKeydown", "placeholder"], Ur = {
3964
4026
  __name: "Input",
3965
4027
  props: {
3966
4028
  text: {
@@ -3970,7 +4032,7 @@ const Xt = {
3970
4032
  },
3971
4033
  emits: ["change", "clear", "improve"],
3972
4034
  setup(e, { emit: n }) {
3973
- const t = e, o = O(t.text), { textarea: l } = st({ input: o, styleProp: "minHeight" }), s = n;
4035
+ const t = e, o = $(t.text), { textarea: l } = st({ input: o, styleProp: "minHeight" }), s = n;
3974
4036
  function r() {
3975
4037
  if (!o.value) {
3976
4038
  a();
@@ -3990,14 +4052,14 @@ const Xt = {
3990
4052
  return F(
3991
4053
  () => t.text,
3992
4054
  (c) => {
3993
- o.value !== c && (o.value = c, X(i));
4055
+ o.value !== c && (o.value = c, Y(i));
3994
4056
  }
3995
4057
  ), se(() => {
3996
- o.value = t.text, X(() => {
4058
+ o.value = t.text, Y(() => {
3997
4059
  l.value.focus(), i();
3998
4060
  });
3999
- }), (c, d) => (h(), g("div", Nr, [
4000
- B(Fn, {
4061
+ }), (c, d) => (h(), C("div", zr, [
4062
+ N(Fn, {
4001
4063
  src: e.text,
4002
4064
  hasClearBtn: !0,
4003
4065
  hasInfoBtn: !0,
@@ -4007,15 +4069,15 @@ const Xt = {
4007
4069
  tt(f("textarea", {
4008
4070
  ref_key: "textarea",
4009
4071
  ref: l,
4010
- "onUpdate:modelValue": d[0] || (d[0] = (x) => o.value = x),
4072
+ "onUpdate:modelValue": d[0] || (d[0] = (T) => o.value = T),
4011
4073
  class: "w-full outline-none px-2 pr-8 bg-transparent text-base-content resize-none pb-3 overflow-x-hidden overflow-y-hidden h-full",
4012
4074
  autofocus: "",
4013
4075
  rows: "2",
4014
4076
  onInput: r,
4015
4077
  onFocus: i,
4016
4078
  onKeydown: Jn(ft(u, ["ctrl", "prevent"]), ["enter"]),
4017
- placeholder: `Min ${M(Ie).IMPROVE_INPUT_MIN_LENGTH} characters. ${M(vt) ? "" : "Ctrl+Enter to improve"}`
4018
- }, null, 40, Br), [
4079
+ placeholder: `Min ${k(Le).IMPROVE_INPUT_MIN_LENGTH} characters. ${k(vt) ? "" : "Ctrl+Enter to improve"}`
4080
+ }, null, 40, Zr), [
4019
4081
  [
4020
4082
  nt,
4021
4083
  o.value,
@@ -4025,7 +4087,7 @@ const Xt = {
4025
4087
  ])
4026
4088
  ]));
4027
4089
  }
4028
- }, jr = /* @__PURE__ */ he(Fr, [["__scopeId", "data-v-66614870"]]);
4090
+ }, Wr = /* @__PURE__ */ he(Ur, [["__scopeId", "data-v-66614870"]]);
4029
4091
  function re() {
4030
4092
  }
4031
4093
  re.prototype = {
@@ -4033,54 +4095,54 @@ re.prototype = {
4033
4095
  var o, l = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, s = l.callback;
4034
4096
  typeof l == "function" && (s = l, l = {});
4035
4097
  var r = this;
4036
- function a(_) {
4037
- return _ = r.postProcess(_, l), s ? (setTimeout(function() {
4038
- s(_);
4039
- }, 0), !0) : _;
4098
+ function a(E) {
4099
+ return E = r.postProcess(E, l), s ? (setTimeout(function() {
4100
+ s(E);
4101
+ }, 0), !0) : E;
4040
4102
  }
4041
4103
  n = this.castInput(n, l), t = this.castInput(t, l), n = this.removeEmpty(this.tokenize(n, l)), t = this.removeEmpty(this.tokenize(t, l));
4042
4104
  var i = t.length, u = n.length, c = 1, d = i + u;
4043
4105
  l.maxEditLength != null && (d = Math.min(d, l.maxEditLength));
4044
- var x = (o = l.timeout) !== null && o !== void 0 ? o : 1 / 0, m = Date.now() + x, C = [{
4106
+ var T = (o = l.timeout) !== null && o !== void 0 ? o : 1 / 0, g = Date.now() + T, x = [{
4045
4107
  oldPos: -1,
4046
4108
  lastComponent: void 0
4047
- }], b = this.extractCommon(C[0], t, n, 0, l);
4048
- if (C[0].oldPos + 1 >= u && b + 1 >= i)
4049
- return a(Kt(r, C[0].lastComponent, t, n, r.useLongestToken));
4050
- var I = -1 / 0, $ = 1 / 0;
4051
- function w() {
4052
- for (var _ = Math.max(I, -c); _ <= Math.min($, c); _ += 2) {
4053
- var T = void 0, V = C[_ - 1], S = C[_ + 1];
4054
- V && (C[_ - 1] = void 0);
4055
- var E = !1;
4056
- if (S) {
4057
- var D = S.oldPos - _;
4058
- E = S && 0 <= D && D < i;
4109
+ }], b = this.extractCommon(x[0], t, n, 0, l);
4110
+ if (x[0].oldPos + 1 >= u && b + 1 >= i)
4111
+ return a(Kt(r, x[0].lastComponent, t, n, r.useLongestToken));
4112
+ var A = -1 / 0, V = 1 / 0;
4113
+ function I() {
4114
+ for (var E = Math.max(A, -c); E <= Math.min(V, c); E += 2) {
4115
+ var y = void 0, w = x[E - 1], m = x[E + 1];
4116
+ w && (x[E - 1] = void 0);
4117
+ var S = !1;
4118
+ if (m) {
4119
+ var D = m.oldPos - E;
4120
+ S = m && 0 <= D && D < i;
4059
4121
  }
4060
- var v = V && V.oldPos + 1 < u;
4061
- if (!E && !v) {
4062
- C[_] = void 0;
4122
+ var v = w && w.oldPos + 1 < u;
4123
+ if (!S && !v) {
4124
+ x[E] = void 0;
4063
4125
  continue;
4064
4126
  }
4065
- if (!v || E && V.oldPos < S.oldPos ? T = r.addToPath(S, !0, !1, 0, l) : T = r.addToPath(V, !1, !0, 1, l), b = r.extractCommon(T, t, n, _, l), T.oldPos + 1 >= u && b + 1 >= i)
4066
- return a(Kt(r, T.lastComponent, t, n, r.useLongestToken));
4067
- C[_] = T, T.oldPos + 1 >= u && ($ = Math.min($, _ - 1)), b + 1 >= i && (I = Math.max(I, _ + 1));
4127
+ if (!v || S && w.oldPos < m.oldPos ? y = r.addToPath(m, !0, !1, 0, l) : y = r.addToPath(w, !1, !0, 1, l), b = r.extractCommon(y, t, n, E, l), y.oldPos + 1 >= u && b + 1 >= i)
4128
+ return a(Kt(r, y.lastComponent, t, n, r.useLongestToken));
4129
+ x[E] = y, y.oldPos + 1 >= u && (V = Math.min(V, E - 1)), b + 1 >= i && (A = Math.max(A, E + 1));
4068
4130
  }
4069
4131
  c++;
4070
4132
  }
4071
4133
  if (s)
4072
- (function _() {
4134
+ (function E() {
4073
4135
  setTimeout(function() {
4074
- if (c > d || Date.now() > m)
4136
+ if (c > d || Date.now() > g)
4075
4137
  return s();
4076
- w() || _();
4138
+ I() || E();
4077
4139
  }, 0);
4078
4140
  })();
4079
4141
  else
4080
- for (; c <= d && Date.now() <= m; ) {
4081
- var y = w();
4082
- if (y)
4083
- return y;
4142
+ for (; c <= d && Date.now() <= g; ) {
4143
+ var _ = I();
4144
+ if (_)
4145
+ return _;
4084
4146
  }
4085
4147
  },
4086
4148
  addToPath: function(n, t, o, l, s) {
@@ -4149,11 +4211,11 @@ function Kt(e, n, t, o, l) {
4149
4211
  d.value = e.join(o.slice(c, c + d.count)), c += d.count;
4150
4212
  else {
4151
4213
  if (!d.added && l) {
4152
- var x = t.slice(u, u + d.count);
4153
- x = x.map(function(m, C) {
4154
- var b = o[c + C];
4155
- return b.length > m.length ? b : m;
4156
- }), d.value = e.join(x);
4214
+ var T = t.slice(u, u + d.count);
4215
+ T = T.map(function(g, x) {
4216
+ var b = o[c + x];
4217
+ return b.length > g.length ? b : g;
4218
+ }), d.value = e.join(T);
4157
4219
  } else
4158
4220
  d.value = e.join(t.slice(u, u + d.count));
4159
4221
  u += d.count, d.added || (c += d.count);
@@ -4196,9 +4258,9 @@ function qe(e, n) {
4196
4258
  return xt(e, n, "");
4197
4259
  }
4198
4260
  function nn(e, n) {
4199
- return n.slice(0, Hr(e, n));
4261
+ return n.slice(0, qr(e, n));
4200
4262
  }
4201
- function Hr(e, n) {
4263
+ function qr(e, n) {
4202
4264
  var t = 0;
4203
4265
  e.length > n.length && (t = e.length - n.length);
4204
4266
  var o = n.length;
@@ -4218,7 +4280,7 @@ function Hr(e, n) {
4218
4280
  }
4219
4281
  return s;
4220
4282
  }
4221
- var et = "a-zA-Z0-9_\\u{C0}-\\u{FF}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}", zr = new RegExp("[".concat(et, "]+|\\s+|[^").concat(et, "]"), "ug"), rt = new re();
4283
+ var et = "a-zA-Z0-9_\\u{C0}-\\u{FF}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}", Gr = new RegExp("[".concat(et, "]+|\\s+|[^").concat(et, "]"), "ug"), rt = new re();
4222
4284
  rt.equals = function(e, n, t) {
4223
4285
  return t.ignoreCase && (e = e.toLowerCase(), n = n.toLowerCase()), e.trim() === n.trim();
4224
4286
  };
@@ -4231,7 +4293,7 @@ rt.tokenize = function(e) {
4231
4293
  return s.segment;
4232
4294
  });
4233
4295
  } else
4234
- t = e.match(zr) || [];
4296
+ t = e.match(Gr) || [];
4235
4297
  var o = [], l = null;
4236
4298
  return t.forEach(function(s) {
4237
4299
  /\s/.test(s) ? l == null ? o.push(s) : o.push(o.pop() + s) : /\s/.test(l) ? o[o.length - 1] == l ? o.push(o.pop() + s) : o.push(l + s) : o.push(s), l = s;
@@ -4264,16 +4326,16 @@ function on(e, n, t, o) {
4264
4326
  } else if (t)
4265
4327
  e && (t.value = t.value.replace(/^\s*/, "")), o && (o.value = o.value.replace(/^\s*/, ""));
4266
4328
  else if (e && o) {
4267
- var c = o.value.match(/^\s*/)[0], d = n.value.match(/^\s*/)[0], x = n.value.match(/\s*$/)[0], m = en(c, d);
4268
- n.value = ke(n.value, m);
4269
- var C = tn(ke(c, m), x);
4270
- n.value = qe(n.value, C), o.value = Ct(o.value, c, C), e.value = xt(e.value, c, c.slice(0, c.length - C.length));
4329
+ var c = o.value.match(/^\s*/)[0], d = n.value.match(/^\s*/)[0], T = n.value.match(/\s*$/)[0], g = en(c, d);
4330
+ n.value = ke(n.value, g);
4331
+ var x = tn(ke(c, g), T);
4332
+ n.value = qe(n.value, x), o.value = Ct(o.value, c, x), e.value = xt(e.value, c, c.slice(0, c.length - x.length));
4271
4333
  } else if (o) {
4272
- var b = o.value.match(/^\s*/)[0], I = n.value.match(/\s*$/)[0], $ = nn(I, b);
4273
- n.value = qe(n.value, $);
4334
+ var b = o.value.match(/^\s*/)[0], A = n.value.match(/\s*$/)[0], V = nn(A, b);
4335
+ n.value = qe(n.value, V);
4274
4336
  } else if (e) {
4275
- var w = e.value.match(/\s*$/)[0], y = n.value.match(/^\s*/)[0], _ = nn(w, y);
4276
- n.value = ke(n.value, _);
4337
+ var I = e.value.match(/\s*$/)[0], _ = n.value.match(/^\s*/)[0], E = nn(I, _);
4338
+ n.value = ke(n.value, E);
4277
4339
  }
4278
4340
  }
4279
4341
  var jn = new re();
@@ -4281,7 +4343,7 @@ jn.tokenize = function(e) {
4281
4343
  var n = new RegExp("(\\r?\\n)|[".concat(et, "]+|[^\\S\\n\\r]+|[^").concat(et, "]"), "ug");
4282
4344
  return e.match(n) || [];
4283
4345
  };
4284
- function Zr(e, n, t) {
4346
+ function Jr(e, n, t) {
4285
4347
  return jn.diff(e, n, t);
4286
4348
  }
4287
4349
  var At = new re();
@@ -4303,12 +4365,12 @@ At.equals = function(e, n, t) {
4303
4365
  `) && (e = e.slice(0, -1)), n.endsWith(`
4304
4366
  `) && (n = n.slice(0, -1))), re.prototype.equals.call(this, e, n, t);
4305
4367
  };
4306
- var Ur = new re();
4307
- Ur.tokenize = function(e) {
4368
+ var Yr = new re();
4369
+ Yr.tokenize = function(e) {
4308
4370
  return e.split(/(\S.+?[.!?])(?=\s+|$)/);
4309
4371
  };
4310
- var Wr = new re();
4311
- Wr.tokenize = function(e) {
4372
+ var Qr = new re();
4373
+ Qr.tokenize = function(e) {
4312
4374
  return e.split(/([{}:;,]|\s+)/);
4313
4375
  };
4314
4376
  function yt(e) {
@@ -4319,17 +4381,17 @@ function yt(e) {
4319
4381
  return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
4320
4382
  }, yt(e);
4321
4383
  }
4322
- var Ne = new re();
4323
- Ne.useLongestToken = !0;
4324
- Ne.tokenize = At.tokenize;
4325
- Ne.castInput = function(e, n) {
4384
+ var Be = new re();
4385
+ Be.useLongestToken = !0;
4386
+ Be.tokenize = At.tokenize;
4387
+ Be.castInput = function(e, n) {
4326
4388
  var t = n.undefinedReplacement, o = n.stringifyReplacer, l = o === void 0 ? function(s, r) {
4327
4389
  return typeof r > "u" ? t : r;
4328
4390
  } : o;
4329
4391
  return typeof e == "string" ? e : JSON.stringify(wt(e, null, null, l), l, " ");
4330
4392
  };
4331
- Ne.equals = function(e, n, t) {
4332
- return re.prototype.equals.call(Ne, e.replace(/,([\r\n])/g, "$1"), n.replace(/,([\r\n])/g, "$1"), t);
4393
+ Be.equals = function(e, n, t) {
4394
+ return re.prototype.equals.call(Be, e.replace(/,([\r\n])/g, "$1"), n.replace(/,([\r\n])/g, "$1"), t);
4333
4395
  };
4334
4396
  function wt(e, n, t, o, l) {
4335
4397
  n = n || [], t = t || [], o && (e = o(l, e));
@@ -4362,7 +4424,7 @@ _t.tokenize = function(e) {
4362
4424
  _t.join = _t.removeEmpty = function(e) {
4363
4425
  return e;
4364
4426
  };
4365
- const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }, Gr = { class: "flex justify-end items-center mb-1" }, Jr = { class: "bg-transparent" }, Yr = ["innerHTML"], Qr = {
4427
+ const Xr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }, Kr = { class: "flex justify-end items-center mb-1" }, ei = { class: "bg-transparent" }, ti = ["innerHTML"], ni = {
4366
4428
  __name: "Result",
4367
4429
  props: {
4368
4430
  text: {
@@ -4378,74 +4440,81 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
4378
4440
  default: "improve"
4379
4441
  }
4380
4442
  },
4381
- emits: ["copy", "change", "clear"],
4443
+ emits: ["copy", "change", "clear", "translate"],
4382
4444
  setup(e, { emit: n }) {
4383
- const t = e, o = xe(), l = L(() => o.isLoading("writing")), s = L(() => l.value ? "" : t.text), r = O(""), a = O(Ie.DEFAULT_DIFF_MODE), { textarea: i } = st({ input: s, styleProp: "minHeight" }), u = n;
4445
+ const t = e, o = xe(), l = O(() => o.isLoading("writing")), s = O(() => l.value ? "" : t.text), r = $(""), a = $(Le.DEFAULT_DIFF_MODE), { textarea: i } = st({ input: s, styleProp: "minHeight" }), u = n;
4384
4446
  function c() {
4385
4447
  !l.value && s.value && u("copy", s.value);
4386
4448
  }
4387
- function d(m, C) {
4388
- return Zr(m, C).map((I) => I.added ? `<span class="bg-addedBg inline leading-snug animate-addedText">${I.value}</span>` : I.removed ? `<span class="bg-removedBg inline leading-snug animate-removedText">${I.value}</span>` : I.value).join("");
4449
+ function d() {
4450
+ var b;
4451
+ const x = (b = s.value) == null ? void 0 : b.trim();
4452
+ !l.value && x && u("translate", x);
4453
+ }
4454
+ function T(x, b) {
4455
+ return Jr(x, b).map((V) => V.added ? `<span class="bg-addedBg inline leading-snug animate-addedText">${V.value}</span>` : V.removed ? `<span class="bg-removedBg inline leading-snug animate-removedText">${V.value}</span>` : V.value).join("");
4389
4456
  }
4390
- function x() {
4391
- a.value = !a.value, Ie.DEFAULT_DIFF_MODE = a.value;
4457
+ function g() {
4458
+ a.value = !a.value, Le.DEFAULT_DIFF_MODE = a.value;
4392
4459
  }
4393
4460
  return F(
4394
4461
  () => t.text,
4395
- (m) => {
4396
- t.type === "check" && (r.value = d(t.originalText, m));
4462
+ (x) => {
4463
+ t.type === "check" && (r.value = T(t.originalText, x));
4397
4464
  },
4398
4465
  { immediate: !0 }
4399
- ), F(s, (m) => {
4400
- u("change", m);
4401
- }), (m, C) => (h(), g("div", qr, [
4402
- f("div", Gr, [
4403
- B(Fn, {
4466
+ ), F(s, (x) => {
4467
+ u("change", x);
4468
+ }), (x, b) => (h(), C("div", Xr, [
4469
+ f("div", Kr, [
4470
+ N(Fn, {
4404
4471
  loading: l.value,
4405
4472
  src: s.value,
4406
4473
  hasCopyBtn: !l.value && !!s.value,
4474
+ hasTranslateBtn: !l.value && !!s.value,
4407
4475
  showDiffToggle: e.type === "check",
4408
4476
  isDiffMode: a.value,
4409
4477
  onCopy: c,
4410
- onToggleDiff: x
4411
- }, null, 8, ["loading", "src", "hasCopyBtn", "showDiffToggle", "isDiffMode"])
4478
+ onTranslate: d,
4479
+ onToggleDiff: g
4480
+ }, null, 8, ["loading", "src", "hasCopyBtn", "hasTranslateBtn", "showDiffToggle", "isDiffMode"])
4412
4481
  ]),
4413
- f("div", Jr, [
4414
- e.type !== "check" || !a.value ? tt((h(), g("textarea", {
4482
+ f("div", ei, [
4483
+ e.type !== "check" || !a.value ? tt((h(), C("textarea", {
4415
4484
  key: 0,
4416
4485
  ref_key: "textarea",
4417
4486
  ref: i,
4418
- "onUpdate:modelValue": C[0] || (C[0] = (b) => s.value = b),
4487
+ "onUpdate:modelValue": b[0] || (b[0] = (A) => s.value = A),
4419
4488
  class: "w-full outline-none px-1 pr-8 bg-transparent text-base-content resize-none pb-3 overflow-x-hidden overflow-y-hidden font-sans text-base leading-normal",
4420
4489
  readonly: "",
4421
4490
  spellcheck: "false"
4422
4491
  }, null, 512)), [
4423
4492
  [nt, s.value]
4424
- ]) : (h(), g("pre", {
4493
+ ]) : (h(), C("pre", {
4425
4494
  key: 1,
4426
4495
  class: "w-full min-h-[80px] outline-none px-1 pr-8 bg-transparent text-base-content resize-none pb-3 overflow-x-hidden overflow-y-hidden whitespace-pre-wrap break-words font-sans text-base leading-normal",
4427
4496
  innerHTML: l.value ? "" : r.value
4428
- }, null, 8, Yr))
4497
+ }, null, 8, ti))
4429
4498
  ])
4430
4499
  ]));
4431
4500
  }
4432
- }, Xr = "data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%3e%3cpath%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'%20d='M21%2012h1m-3.5-6.5%201-1M12%203V2M5.5%205.5l-1-1M3%2012H2m8%2010h4m3-10a5%205%200%201%200-7%204.584V19h4v-2.416A5.001%205.001%200%200%200%2017%2012z'/%3e%3c/svg%3e", Kr = "data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.8544%203.20309C5.39975%202.89815%204.26277%201.76117%203.95787%200.30649C3.92042%200.12792%203.76292%200%203.58041%200C3.3979%200%203.2404%200.12792%203.20297%200.30652C2.89805%201.76117%201.76107%202.89812%200.306418%203.20302C0.127818%203.24045%20-0.00012207%203.39798%20-0.00012207%203.58046C-0.00012207%203.76295%200.127798%203.92047%200.306418%203.9579C1.76105%204.26285%202.89798%205.3998%203.2029%206.85448C3.24033%207.03307%203.39783%207.16102%203.58034%207.16102C3.76282%207.16102%203.92035%207.0331%203.95778%206.85448C4.26272%205.39983%205.39973%204.26287%206.85438%203.95799C7.03297%203.92056%207.16092%203.76306%207.16092%203.58056C7.1609%203.39805%207.03297%203.24052%206.8544%203.20309ZM3.58036%205.60938C3.14292%204.73132%202.42956%204.01792%201.55151%203.58049C2.42958%203.14305%203.14297%202.42968%203.58041%201.55161C4.01785%202.4297%204.73122%203.14307%205.60926%203.58053C4.73119%204.01797%204.0178%204.73132%203.58036%205.60938Z'%20fill='currentColor'/%3e%3cpath%20d='M6.21683%209.574C5.53147%209.4303%204.99578%208.8947%204.85209%208.2093C4.81466%208.0307%204.65716%207.90271%204.47465%207.90271C4.29217%207.90271%204.13464%208.0306%204.09721%208.2092C3.95352%208.8946%203.4178%209.4303%202.73244%209.574C2.55385%209.6114%202.4259%209.7689%202.4259%209.9514C2.4259%2010.1339%202.55383%2010.2914%202.73244%2010.3288C3.41778%2010.4725%203.95349%2011.0082%204.09716%2011.6936C4.13459%2011.8722%204.2921%2012.0002%204.4746%2012.0002C4.65709%2012.0002%204.81461%2011.8723%204.85204%2011.6936C4.99574%2011.0082%205.53145%2010.4725%206.21683%2010.3289C6.39543%2010.2914%206.52337%2010.1339%206.52337%209.9514C6.52337%209.7689%206.39545%209.6114%206.21683%209.574ZM4.47463%2010.6408C4.29163%2010.3688%204.05725%2010.1345%203.78526%209.9515C4.0573%209.7684%204.29163%209.5341%204.47463%209.2621C4.65765%209.5341%204.892%209.7685%205.164%209.9515C4.892%2010.1345%204.65763%2010.3688%204.47463%2010.6408Z'%20fill='currentColor'/%3e%3cpath%20d='M11.4271%206.00324C10.5007%205.80904%209.7766%205.08496%209.5825%204.15859C9.545%203.98%209.3875%203.85205%209.205%203.85205C9.0225%203.85205%208.865%203.97995%208.8276%204.15857C8.6334%205.08496%207.90932%205.80902%206.98293%206.0032C6.80434%206.04063%206.67639%206.19815%206.67639%206.38064C6.67639%206.56312%206.80431%206.72062%206.98293%206.75807C7.9093%206.95228%208.6334%207.67633%208.8275%208.6027C8.865%208.7813%209.0225%208.9093%209.205%208.9093C9.3875%208.9093%209.545%208.7814%209.5824%208.6027C9.7766%207.67633%2010.5007%206.95228%2011.4271%206.75812C11.6057%206.72067%2011.7336%206.56317%2011.7336%206.38068C11.7336%206.1982%2011.6057%206.04067%2011.4271%206.00324ZM9.205%207.47681C8.9365%207.02634%208.5593%206.64914%208.1089%206.38066C8.5593%206.11218%208.9365%205.73502%209.205%205.28453C9.4735%205.73502%209.8507%206.11221%2010.3012%206.38068C9.8507%206.64916%209.4735%207.02636%209.205%207.47681Z'%20fill='currentColor'/%3e%3c/svg%3e", ei = "data:image/svg+xml,%3csvg%20class='w-5%20h-5'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2020%2020'%20fill='currentColor'%20aria-hidden='true'%20%3e%3cpath%20fill-rule='evenodd'%20d='M5.293%207.293a1%201%200%20011.414%200L10%2010.586l3.293-3.293a1%201%200%20111.414%201.414l-4%204a1%201%200%2001-1.414%200l-4-4a1%201%200%20010-1.414z'%20clip-rule='evenodd'%20/%3e%3c/svg%3e", ti = "data:image/svg+xml,%3csvg%20class='w-5%20h-5'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2020%2020'%20fill='currentColor'%20aria-hidden='true'%20%3e%3cpath%20fill-rule='evenodd'%20d='M5.293%207.293a1%201%200%20011.414%200L10%2010.586l3.293-3.293a1%201%200%20111.414%201.414l-4%204a1%201%200%2001-1.414%200l-4-4a1%201%200%20010-1.414z'%20clip-rule='evenodd'%20/%3e%3c/svg%3e", Vt = (e) => (Et("data-v-345bc0b4"), e = e(), $t(), e), ni = { class: "flex rounded-md w-full" }, oi = ["disabled"], li = { class: "flex items-center text-xs" }, si = ["src"], ai = /* @__PURE__ */ Vt(() => /* @__PURE__ */ f("div", { class: "w-px bg-base-300" }, null, -1)), ri = { class: "relative block" }, ii = ["aria-expanded", "disabled"], ui = /* @__PURE__ */ Vt(() => /* @__PURE__ */ f("span", { class: "sr-only" }, "Open options", -1)), ci = /* @__PURE__ */ Vt(() => /* @__PURE__ */ f("img", {
4433
- src: ti,
4501
+ }, oi = "data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%3e%3cpath%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'%20d='M21%2012h1m-3.5-6.5%201-1M12%203V2M5.5%205.5l-1-1M3%2012H2m8%2010h4m3-10a5%205%200%201%200-7%204.584V19h4v-2.416A5.001%205.001%200%200%200%2017%2012z'/%3e%3c/svg%3e", li = "data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.8544%203.20309C5.39975%202.89815%204.26277%201.76117%203.95787%200.30649C3.92042%200.12792%203.76292%200%203.58041%200C3.3979%200%203.2404%200.12792%203.20297%200.30652C2.89805%201.76117%201.76107%202.89812%200.306418%203.20302C0.127818%203.24045%20-0.00012207%203.39798%20-0.00012207%203.58046C-0.00012207%203.76295%200.127798%203.92047%200.306418%203.9579C1.76105%204.26285%202.89798%205.3998%203.2029%206.85448C3.24033%207.03307%203.39783%207.16102%203.58034%207.16102C3.76282%207.16102%203.92035%207.0331%203.95778%206.85448C4.26272%205.39983%205.39973%204.26287%206.85438%203.95799C7.03297%203.92056%207.16092%203.76306%207.16092%203.58056C7.1609%203.39805%207.03297%203.24052%206.8544%203.20309ZM3.58036%205.60938C3.14292%204.73132%202.42956%204.01792%201.55151%203.58049C2.42958%203.14305%203.14297%202.42968%203.58041%201.55161C4.01785%202.4297%204.73122%203.14307%205.60926%203.58053C4.73119%204.01797%204.0178%204.73132%203.58036%205.60938Z'%20fill='currentColor'/%3e%3cpath%20d='M6.21683%209.574C5.53147%209.4303%204.99578%208.8947%204.85209%208.2093C4.81466%208.0307%204.65716%207.90271%204.47465%207.90271C4.29217%207.90271%204.13464%208.0306%204.09721%208.2092C3.95352%208.8946%203.4178%209.4303%202.73244%209.574C2.55385%209.6114%202.4259%209.7689%202.4259%209.9514C2.4259%2010.1339%202.55383%2010.2914%202.73244%2010.3288C3.41778%2010.4725%203.95349%2011.0082%204.09716%2011.6936C4.13459%2011.8722%204.2921%2012.0002%204.4746%2012.0002C4.65709%2012.0002%204.81461%2011.8723%204.85204%2011.6936C4.99574%2011.0082%205.53145%2010.4725%206.21683%2010.3289C6.39543%2010.2914%206.52337%2010.1339%206.52337%209.9514C6.52337%209.7689%206.39545%209.6114%206.21683%209.574ZM4.47463%2010.6408C4.29163%2010.3688%204.05725%2010.1345%203.78526%209.9515C4.0573%209.7684%204.29163%209.5341%204.47463%209.2621C4.65765%209.5341%204.892%209.7685%205.164%209.9515C4.892%2010.1345%204.65763%2010.3688%204.47463%2010.6408Z'%20fill='currentColor'/%3e%3cpath%20d='M11.4271%206.00324C10.5007%205.80904%209.7766%205.08496%209.5825%204.15859C9.545%203.98%209.3875%203.85205%209.205%203.85205C9.0225%203.85205%208.865%203.97995%208.8276%204.15857C8.6334%205.08496%207.90932%205.80902%206.98293%206.0032C6.80434%206.04063%206.67639%206.19815%206.67639%206.38064C6.67639%206.56312%206.80431%206.72062%206.98293%206.75807C7.9093%206.95228%208.6334%207.67633%208.8275%208.6027C8.865%208.7813%209.0225%208.9093%209.205%208.9093C9.3875%208.9093%209.545%208.7814%209.5824%208.6027C9.7766%207.67633%2010.5007%206.95228%2011.4271%206.75812C11.6057%206.72067%2011.7336%206.56317%2011.7336%206.38068C11.7336%206.1982%2011.6057%206.04067%2011.4271%206.00324ZM9.205%207.47681C8.9365%207.02634%208.5593%206.64914%208.1089%206.38066C8.5593%206.11218%208.9365%205.73502%209.205%205.28453C9.4735%205.73502%209.8507%206.11221%2010.3012%206.38068C9.8507%206.64916%209.4735%207.02636%209.205%207.47681Z'%20fill='currentColor'/%3e%3c/svg%3e", si = "data:image/svg+xml,%3csvg%20class='w-5%20h-5'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2020%2020'%20fill='currentColor'%20aria-hidden='true'%20%3e%3cpath%20fill-rule='evenodd'%20d='M5.293%207.293a1%201%200%20011.414%200L10%2010.586l3.293-3.293a1%201%200%20111.414%201.414l-4%204a1%201%200%2001-1.414%200l-4-4a1%201%200%20010-1.414z'%20clip-rule='evenodd'%20/%3e%3c/svg%3e", ai = "data:image/svg+xml,%3csvg%20class='w-5%20h-5'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2020%2020'%20fill='currentColor'%20aria-hidden='true'%20%3e%3cpath%20fill-rule='evenodd'%20d='M5.293%207.293a1%201%200%20011.414%200L10%2010.586l3.293-3.293a1%201%200%20111.414%201.414l-4%204a1%201%200%2001-1.414%200l-4-4a1%201%200%20010-1.414z'%20clip-rule='evenodd'%20/%3e%3c/svg%3e", Vt = (e) => (Et("data-v-345bc0b4"), e = e(), $t(), e), ri = { class: "flex rounded-md w-full" }, ii = ["disabled"], ui = { class: "flex items-center text-xs" }, ci = ["src"], di = /* @__PURE__ */ Vt(() => /* @__PURE__ */ f("div", { class: "w-px bg-base-300" }, null, -1)), fi = { class: "relative block" }, vi = ["aria-expanded", "disabled"], pi = /* @__PURE__ */ Vt(() => /* @__PURE__ */ f("span", { class: "sr-only" }, "Open options", -1)), hi = /* @__PURE__ */ Vt(() => /* @__PURE__ */ f("img", {
4502
+ src: ai,
4434
4503
  alt: "Chevron down",
4435
4504
  class: "w-4 h-4 fill-current"
4436
- }, null, -1)), di = [
4437
- ui,
4438
- ci
4439
- ], fi = {
4505
+ }, null, -1)), mi = [
4506
+ pi,
4507
+ hi
4508
+ ], gi = {
4440
4509
  key: 0,
4441
4510
  class: "origin-top-right absolute left-0 mt-1 w-full rounded-md shadow-lg bg-base-100 ring-1 ring-base-300 focus:outline-none z-50",
4442
4511
  role: "menu",
4443
4512
  "aria-orientation": "vertical",
4444
4513
  "aria-labelledby": "options-menu"
4445
- }, vi = {
4514
+ }, bi = {
4446
4515
  class: "py-1",
4447
4516
  role: "none"
4448
- }, pi = ["onClick"], hi = { class: "flex items-center" }, mi = ["src"], gi = {
4517
+ }, Ci = ["onClick"], xi = { class: "flex items-center" }, yi = ["src"], wi = {
4449
4518
  __name: "ButtonSelect",
4450
4519
  props: {
4451
4520
  modelValue: {
@@ -4471,37 +4540,37 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
4471
4540
  },
4472
4541
  emits: ["update:modelValue", "action"],
4473
4542
  setup(e, { emit: n }) {
4474
- const t = e, o = n, l = O(!1), s = O(t.modelValue), r = O(null), a = L(() => t.options.find((m) => m.value === s.value) || t.options[0]);
4543
+ const t = e, o = n, l = $(!1), s = $(t.modelValue), r = $(null), a = O(() => t.options.find((g) => g.value === s.value) || t.options[0]);
4475
4544
  function i() {
4476
4545
  o("action");
4477
4546
  }
4478
4547
  function u() {
4479
4548
  t.loading || (l.value = !l.value);
4480
4549
  }
4481
- function c(m) {
4482
- m.value !== s.value && (s.value = m.value, o("update:modelValue", m.value)), l.value = !1;
4550
+ function c(g) {
4551
+ g.value !== s.value && (s.value = g.value, o("update:modelValue", g.value)), l.value = !1;
4483
4552
  }
4484
- function d(m) {
4485
- return new URL((/* @__PURE__ */ Object.assign({ "../../assets/icons/ai-explain.svg": Xr, "../../assets/icons/ai-translate.svg": Kr, "../../assets/icons/chevron-down.svg": ei }))[`../../assets/icons/${m}.svg`], import.meta.url).href;
4553
+ function d(g) {
4554
+ return new URL((/* @__PURE__ */ Object.assign({ "../../assets/icons/ai-explain.svg": oi, "../../assets/icons/ai-translate.svg": li, "../../assets/icons/chevron-down.svg": si }))[`../../assets/icons/${g}.svg`], import.meta.url).href;
4486
4555
  }
4487
- function x(m) {
4488
- r.value && !r.value.contains(m.target) && (l.value = !1);
4556
+ function T(g) {
4557
+ r.value && !r.value.contains(g.target) && (l.value = !1);
4489
4558
  }
4490
4559
  return F(
4491
4560
  () => t.modelValue,
4492
- (m) => {
4493
- m !== s.value && (s.value = m);
4561
+ (g) => {
4562
+ g !== s.value && (s.value = g);
4494
4563
  }
4495
4564
  ), F(
4496
4565
  () => t.isTextEmpty,
4497
- (m) => {
4498
- m && (l.value = !1);
4566
+ (g) => {
4567
+ g && (l.value = !1);
4499
4568
  }
4500
4569
  ), se(() => {
4501
- document.addEventListener("click", x);
4570
+ document.addEventListener("click", T);
4502
4571
  }), Fe(() => {
4503
- document.removeEventListener("click", x);
4504
- }), (m, C) => (h(), g("div", {
4572
+ document.removeEventListener("click", T);
4573
+ }), (g, x) => (h(), C("div", {
4505
4574
  class: "relative inline-block text-left flex-1",
4506
4575
  ref_key: "dropdownRef",
4507
4576
  ref: r
@@ -4512,7 +4581,7 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
4512
4581
  e.isTextEmpty || t.loading ? "border-base-300" : "border-primary"
4513
4582
  ])
4514
4583
  }, [
4515
- f("div", ni, [
4584
+ f("div", ri, [
4516
4585
  f("button", {
4517
4586
  onClick: i,
4518
4587
  class: P(["px-2 py-1 text-sm font-medium rounded-s focus:z-10 focus:outline-none flex-grow text-left relative", [
@@ -4520,17 +4589,17 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
4520
4589
  ]]),
4521
4590
  disabled: e.isTextEmpty || t.loading
4522
4591
  }, [
4523
- f("div", li, [
4592
+ f("div", ui, [
4524
4593
  f("img", {
4525
4594
  src: d(a.value.icon),
4526
4595
  alt: "",
4527
4596
  class: "w-4 h-4 mr-2"
4528
- }, null, 8, si),
4597
+ }, null, 8, ci),
4529
4598
  Ee(" " + G(a.value.label), 1)
4530
4599
  ])
4531
- ], 10, oi),
4532
- ai,
4533
- f("div", ri, [
4600
+ ], 10, ii),
4601
+ di,
4602
+ f("div", fi, [
4534
4603
  f("button", {
4535
4604
  onClick: u,
4536
4605
  type: "button",
@@ -4540,36 +4609,36 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
4540
4609
  "aria-haspopup": "true",
4541
4610
  "aria-expanded": l.value,
4542
4611
  disabled: e.isTextEmpty || t.loading
4543
- }, di, 10, ii)
4612
+ }, mi, 10, vi)
4544
4613
  ])
4545
4614
  ])
4546
4615
  ], 2),
4547
- l.value ? (h(), g("div", fi, [
4548
- f("div", vi, [
4549
- (h(!0), g(z, null, Y(e.options, (b) => (h(), g("a", {
4616
+ l.value ? (h(), C("div", gi, [
4617
+ f("div", bi, [
4618
+ (h(!0), C(z, null, Q(e.options, (b) => (h(), C("a", {
4550
4619
  key: b.value,
4551
- onClick: (I) => c(b),
4620
+ onClick: (A) => c(b),
4552
4621
  href: "#",
4553
4622
  class: "block px-1 py-1 text-sm text-base-content hover:bg-base-200 hover:text-primary",
4554
4623
  role: "menuitem"
4555
4624
  }, [
4556
- f("div", hi, [
4625
+ f("div", xi, [
4557
4626
  f("img", {
4558
4627
  src: d(b.icon),
4559
4628
  alt: "",
4560
4629
  class: "w-4 h-4 mr-2"
4561
- }, null, 8, mi),
4630
+ }, null, 8, yi),
4562
4631
  Ee(" " + G(b.label), 1)
4563
4632
  ])
4564
- ], 8, pi))), 128))
4633
+ ], 8, Ci))), 128))
4565
4634
  ])
4566
4635
  ])) : R("", !0)
4567
4636
  ], 512));
4568
4637
  }
4569
- }, bi = /* @__PURE__ */ he(gi, [["__scopeId", "data-v-345bc0b4"]]), Ci = { class: "w-full mt-1" }, xi = { class: "flex flex-col lg:flex-row lg:items-stretch lg:space-x-4 lg:min-h-[50vh]" }, yi = { class: "lg:flex-grow lg:w-0 flex flex-col" }, wi = { class: "flex flex-row lg:flex-col items-center justify-center place-content-center min-h-full" }, _i = {
4638
+ }, _i = /* @__PURE__ */ he(wi, [["__scopeId", "data-v-345bc0b4"]]), Ti = { class: "w-full mt-1" }, Si = { class: "flex flex-col lg:flex-row lg:items-stretch lg:space-x-4 lg:min-h-[50vh]" }, Ei = { class: "lg:flex-grow lg:w-0 flex flex-col" }, $i = { class: "flex flex-row lg:flex-col items-center justify-center place-content-center min-h-full" }, Oi = {
4570
4639
  class: "flex items-center",
4571
4640
  style: { "max-width": "300px" }
4572
- }, Ti = { class: "lg:flex-grow lg:w-0 flex flex-col" }, Si = {
4641
+ }, Li = { class: "lg:flex-grow lg:w-0 flex flex-col" }, Ii = {
4573
4642
  __name: "WriteTab",
4574
4643
  props: {
4575
4644
  opt: {
@@ -4585,7 +4654,7 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
4585
4654
  default: null
4586
4655
  }
4587
4656
  },
4588
- emits: ["opt", "write", "copy"],
4657
+ emits: ["opt", "write", "copy", "translate"],
4589
4658
  setup(e, { emit: n }) {
4590
4659
  const t = le("writingStore"), o = le("loaderStore"), l = e, s = n, r = [
4591
4660
  { value: "check", label: "Check", icon: "ai-translate" },
@@ -4621,66 +4690,67 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
4621
4690
  t.init({ ...t.$state, result: "", suggestions: [] });
4622
4691
  }
4623
4692
  function d(b = null) {
4624
- t.text.length < Ie.IMPROVE_INPUT_MIN_LENGTH || (o.setLoading("writing", !0), m(t.text, l.opt.type, b));
4693
+ t.text.length < Le.IMPROVE_INPUT_MIN_LENGTH || (o.setLoading("writing", !0), g(t.text, l.opt.type, b));
4625
4694
  }
4626
- function x() {
4695
+ function T() {
4627
4696
  d("retry");
4628
4697
  }
4629
- function m(b, I = l.opt.type, $) {
4698
+ function g(b, A = l.opt.type, V) {
4630
4699
  b && (o.setLoading("writing", !0), s("write", {
4631
4700
  src: l.opt.src,
4632
4701
  text: b,
4633
- action: I,
4634
- flag: $
4702
+ action: A,
4703
+ flag: V
4635
4704
  }));
4636
4705
  }
4637
- function C(b) {
4706
+ function x(b) {
4638
4707
  o.setLoading("writing", !0), s("opt", { ...l.opt, type: b, text: t.text });
4639
4708
  }
4640
- return (b, I) => {
4641
- var $, w;
4642
- return h(), g("div", Ci, [
4643
- f("div", xi, [
4644
- f("div", yi, [
4645
- B(jr, {
4709
+ return (b, A) => {
4710
+ var V, I;
4711
+ return h(), C("div", Ti, [
4712
+ f("div", Si, [
4713
+ f("div", Ei, [
4714
+ N(Wr, {
4646
4715
  class: "my-2 lg:my-0 w-full flex-grow lg:min-h-[50vh]",
4647
- text: M(t).text,
4716
+ text: k(t).text,
4648
4717
  onChange: a,
4649
4718
  onClear: i,
4650
4719
  onImprove: d
4651
4720
  }, null, 8, ["text"])
4652
4721
  ]),
4653
- f("div", wi, [
4654
- f("div", _i, [
4655
- B(bi, {
4722
+ f("div", $i, [
4723
+ f("div", Oi, [
4724
+ N(_i, {
4656
4725
  class: "w-full",
4657
4726
  modelValue: l.opt.type,
4658
4727
  options: r,
4659
- loading: M(o).isLoading("writing"),
4660
- isTextEmpty: M(t).text && (($ = M(t).text) == null ? void 0 : $.length) < M(Ie).IMPROVE_INPUT_MIN_LENGTH,
4661
- hasResult: !!M(t).result,
4662
- "onUpdate:modelValue": C,
4728
+ loading: k(o).isLoading("writing"),
4729
+ isTextEmpty: k(t).text && ((V = k(t).text) == null ? void 0 : V.length) < k(Le).IMPROVE_INPUT_MIN_LENGTH,
4730
+ hasResult: !!k(t).result,
4731
+ "onUpdate:modelValue": x,
4663
4732
  onAction: d
4664
4733
  }, null, 8, ["modelValue", "loading", "isTextEmpty", "hasResult"])
4665
4734
  ]),
4666
- B(Or, {
4735
+ N(Or, {
4667
4736
  class: "ml-2 lg:m-2",
4668
- disabled: ((w = M(t).text) == null ? void 0 : w.length) < 5 || !M(t).result,
4669
- onClick: x
4737
+ disabled: ((I = k(t).text) == null ? void 0 : I.length) < 5 || !k(t).result,
4738
+ onClick: T
4670
4739
  }, null, 8, ["disabled"])
4671
4740
  ]),
4672
- f("div", Ti, [
4673
- B(Qr, {
4741
+ f("div", Li, [
4742
+ N(ni, {
4674
4743
  class: "my-2 lg:my-0 w-full flex-grow lg:min-h-[50vh]",
4675
- text: M(t).result,
4676
- originalText: M(t).text,
4744
+ text: k(t).result,
4745
+ originalText: k(t).text,
4677
4746
  type: l.opt.type,
4678
4747
  onChange: u,
4679
4748
  onClear: c,
4680
- onCopy: I[0] || (I[0] = (y) => {
4681
- var _;
4682
- return s("copy", (_ = M(t)) == null ? void 0 : _.result);
4683
- })
4749
+ onCopy: A[0] || (A[0] = (_) => {
4750
+ var E;
4751
+ return s("copy", (E = k(t)) == null ? void 0 : E.result);
4752
+ }),
4753
+ onTranslate: A[1] || (A[1] = (_) => s("translate", _))
4684
4754
  }, null, 8, ["text", "originalText", "type"])
4685
4755
  ])
4686
4756
  ])
@@ -4688,7 +4758,7 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
4688
4758
  };
4689
4759
  }
4690
4760
  }, ln = He("writing", () => {
4691
- const e = O(null), n = O(""), t = O(""), o = O([]), l = O(null), s = Oe(), r = L(() => s.getLabel(e.value));
4761
+ const e = $(null), n = $(""), t = $(""), o = $([]), l = $(null), s = Oe(), r = O(() => s.getLabel(e.value));
4692
4762
  function a(u) {
4693
4763
  e.value = u.src, n.value = u.text, t.value = u.result, o.value = u.suggestions, l.value = u.action;
4694
4764
  }
@@ -4705,17 +4775,17 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
4705
4775
  init: a,
4706
4776
  reset: i
4707
4777
  };
4708
- }), Hn = (e) => (Et("data-v-8885ead1"), e = e(), $t(), e), Ei = ["data-theme"], $i = { class: "flex-none py-2 pl-3 pr-2 shadow border border-base-300" }, Oi = { class: "flex-none" }, Ii = { class: "flex w-full border-b border-base-300 items-center" }, Li = {
4778
+ }), Hn = (e) => (Et("data-v-848b8f0b"), e = e(), $t(), e), ki = ["data-theme"], Mi = { class: "flex-none py-2 pl-3 pr-2 shadow border border-base-300" }, Ai = { class: "flex-none" }, Vi = { class: "flex w-full border-b border-base-300 items-center" }, Di = {
4709
4779
  key: 0,
4710
4780
  class: "text-xs text-base-content/40 ml-1 italic"
4711
- }, ki = /* @__PURE__ */ Hn(() => /* @__PURE__ */ f("small", null, "(Tab)", -1)), Mi = [
4712
- ki
4713
- ], Ai = {
4781
+ }, Ri = /* @__PURE__ */ Hn(() => /* @__PURE__ */ f("small", null, "(Tab)", -1)), Pi = [
4782
+ Ri
4783
+ ], Bi = {
4714
4784
  key: 0,
4715
4785
  class: "text-xs text-base-content/40 ml-1 italic"
4716
- }, Vi = /* @__PURE__ */ Hn(() => /* @__PURE__ */ f("small", null, "(Tab)", -1)), Di = [
4717
- Vi
4718
- ], Ri = { class: "flex-1 min-h-0" }, Pi = { class: "h-full overflow-y-auto overflow-x-hidden custom-scrollbar" }, Ni = {
4786
+ }, Ni = /* @__PURE__ */ Hn(() => /* @__PURE__ */ f("small", null, "(Tab)", -1)), Fi = [
4787
+ Ni
4788
+ ], ji = { class: "flex-1 min-h-0" }, Hi = { class: "h-full overflow-y-auto overflow-x-hidden custom-scrollbar" }, zi = {
4719
4789
  __name: "Popup",
4720
4790
  props: {
4721
4791
  options: {
@@ -4765,17 +4835,25 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
4765
4835
  ve(t), bt(t), Oe(t), xe(t), ln(t);
4766
4836
  const o = ve(), l = bt(), s = Oe(), r = xe(), a = ln();
4767
4837
  ce("translationStore", o), ce("ttsStore", l), ce("languageStore", s), ce("loaderStore", r), ce("writingStore", a);
4768
- const i = n, u = (w, y) => {
4769
- i("nav", { action: w, payload: y });
4770
- }, c = (w) => {
4771
- i("nav", { action: "themeChange", payload: w });
4772
- }, d = (w, y = {}) => {
4773
- i("translate", { action: w, payload: y });
4774
- }, x = (w, y = {}) => {
4775
- i("write", { action: w, payload: y });
4776
- }, m = (w, y = {}) => {
4777
- i("common", { action: w, payload: y });
4778
- }, C = e, b = {
4838
+ const i = n, u = (y, w) => {
4839
+ i("nav", { action: y, payload: w });
4840
+ }, c = (y) => {
4841
+ i("nav", { action: "themeChange", payload: y });
4842
+ }, d = (y, w = {}) => {
4843
+ i("translate", { action: y, payload: w });
4844
+ }, T = (y, w = {}) => {
4845
+ i("write", { action: y, payload: w });
4846
+ }, g = (y, w = {}) => {
4847
+ i("common", { action: y, payload: w });
4848
+ }, x = $("");
4849
+ function b(y) {
4850
+ const w = y == null ? void 0 : y.trim();
4851
+ w && (x.value = w, u("activeTab", "translate"));
4852
+ }
4853
+ function A() {
4854
+ x.value = "";
4855
+ }
4856
+ const V = e, I = {
4779
4857
  activeTab: "translate",
4780
4858
  translateOpts: { src: "auto", target: "en" },
4781
4859
  writeOpts: { type: "check" },
@@ -4791,96 +4869,99 @@ const qr = { class: "bg-base-100 relative z-10 border border-base-300 rounded" }
4791
4869
  isAIExplain: !1,
4792
4870
  aiExplainMinLength: 5,
4793
4871
  isTTS: !0
4794
- }, I = L(() => Object.assign({}, b, C.options)), $ = (w) => {
4795
- if (w.key === "Tab") {
4796
- w.preventDefault();
4797
- const _ = I.value.activeTab === "translate" ? "write" : "translate";
4798
- u("activeTab", _);
4872
+ }, _ = O(() => Object.assign({}, I, V.options)), E = (y) => {
4873
+ if (y.key === "Tab") {
4874
+ y.preventDefault();
4875
+ const m = _.value.activeTab === "translate" ? "write" : "translate";
4876
+ u("activeTab", m);
4799
4877
  }
4800
4878
  };
4801
4879
  return se(() => {
4802
- window.addEventListener("keydown", $);
4880
+ window.addEventListener("keydown", E);
4803
4881
  }), Fe(() => {
4804
- window.removeEventListener("keydown", $);
4805
- }), (w, y) => (h(), g("div", {
4882
+ window.removeEventListener("keydown", E);
4883
+ }), (y, w) => (h(), C("div", {
4806
4884
  "data-theme": e.theme,
4807
4885
  class: "h-screen flex flex-col bg-base-100"
4808
4886
  }, [
4809
- f("div", $i, [
4810
- B(wo, {
4887
+ f("div", Mi, [
4888
+ N(wo, {
4811
4889
  "header-settings": e.headerSettings,
4812
4890
  "current-theme": e.theme,
4813
4891
  "is-premium": e.isPremium,
4814
- onReader: y[0] || (y[0] = (_) => u("reader")),
4815
- onLearn: y[1] || (y[1] = (_) => u("learn")),
4816
- onSettings: y[2] || (y[2] = (_) => u("settings")),
4817
- onFullScreen: y[3] || (y[3] = (_) => u("fullscreen")),
4818
- onAccount: y[4] || (y[4] = (_) => u("account")),
4892
+ onReader: w[0] || (w[0] = (m) => u("reader")),
4893
+ onLearn: w[1] || (w[1] = (m) => u("learn")),
4894
+ onSettings: w[2] || (w[2] = (m) => u("settings")),
4895
+ onFullScreen: w[3] || (w[3] = (m) => u("fullscreen")),
4896
+ onAccount: w[4] || (w[4] = (m) => u("account")),
4819
4897
  onThemeChange: c
4820
4898
  }, null, 8, ["header-settings", "current-theme", "is-premium"])
4821
4899
  ]),
4822
- f("div", Oi, [
4823
- f("div", Ii, [
4900
+ f("div", Ai, [
4901
+ f("div", Vi, [
4824
4902
  f("button", {
4825
4903
  class: P([
4826
4904
  "w-1/2 px-4 py-2 text-sm font-medium",
4827
- I.value.activeTab === "translate" ? "text-primary border-b-2 border-primary" : "text-base-content/60 hover:text-primary"
4905
+ _.value.activeTab === "translate" ? "text-primary border-b-2 border-primary" : "text-base-content/60 hover:text-primary"
4828
4906
  ]),
4829
- onClick: y[5] || (y[5] = (_) => u("activeTab", "translate"))
4907
+ onClick: w[5] || (w[5] = (m) => u("activeTab", "translate"))
4830
4908
  }, [
4831
4909
  Ee(" Translate "),
4832
- !M(vt) && I.value.activeTab !== "translate" ? (h(), g("span", Li, Mi)) : R("", !0)
4910
+ !k(vt) && _.value.activeTab !== "translate" ? (h(), C("span", Di, Pi)) : R("", !0)
4833
4911
  ], 2),
4834
4912
  f("button", {
4835
4913
  class: P([
4836
4914
  "w-1/2 px-4 py-2 text-sm font-medium",
4837
- I.value.activeTab === "write" ? "text-primary border-b-2 border-primary" : "text-base-content/60 hover:text-primary"
4915
+ _.value.activeTab === "write" ? "text-primary border-b-2 border-primary" : "text-base-content/60 hover:text-primary"
4838
4916
  ]),
4839
- onClick: y[6] || (y[6] = (_) => u("activeTab", "write"))
4917
+ onClick: w[6] || (w[6] = (m) => u("activeTab", "write"))
4840
4918
  }, [
4841
4919
  Ee(" Write "),
4842
- !M(vt) && I.value.activeTab !== "write" ? (h(), g("span", Ai, Di)) : R("", !0)
4920
+ !k(vt) && _.value.activeTab !== "write" ? (h(), C("span", Bi, Fi)) : R("", !0)
4843
4921
  ], 2)
4844
4922
  ])
4845
4923
  ]),
4846
- f("div", Ri, [
4847
- f("div", Pi, [
4848
- I.value.activeTab === "translate" ? (h(), W(Tr, {
4924
+ f("div", ji, [
4925
+ f("div", Hi, [
4926
+ _.value.activeTab === "translate" ? (h(), Z(Tr, {
4849
4927
  key: 0,
4850
- opt: I.value.translateOpts,
4851
- languages: I.value.languages,
4928
+ opt: _.value.translateOpts,
4929
+ languages: _.value.languages,
4852
4930
  translation: e.data.translation,
4853
4931
  explanation: e.data.explanation,
4854
4932
  tts: e.data.tts,
4855
- isTTS: I.value.isTTS,
4856
- isFavoriteFeatureEnabled: I.value.isFavoriteFeatureEnabled,
4857
- isAITranslateFeatureEnabled: I.value.isAITranslateFeatureEnabled,
4858
- isFavorite: I.value.isFavorite,
4859
- isAITranslate: I.value.isAITranslate,
4860
- isAIExplain: I.value.isAIExplain,
4861
- aiExplainMinLength: I.value.aiExplainMinLength,
4862
- onOpt: y[7] || (y[7] = (_) => d("updateOpts", _)),
4863
- onTranslate: y[8] || (y[8] = (_) => d("translate", _)),
4864
- onLoadTTS: y[9] || (y[9] = (_) => d("loadTTS", _)),
4865
- onFavorite: y[10] || (y[10] = (_) => d("favorite")),
4866
- onAiTranslate: y[11] || (y[11] = (_) => d("aiTranslate", _)),
4867
- onAiExplain: y[12] || (y[12] = (_) => d("aiExplain", _)),
4868
- onCopy: y[13] || (y[13] = (_) => m("copy", _))
4869
- }, null, 8, ["opt", "languages", "translation", "explanation", "tts", "isTTS", "isFavoriteFeatureEnabled", "isAITranslateFeatureEnabled", "isFavorite", "isAITranslate", "isAIExplain", "aiExplainMinLength"])) : R("", !0),
4870
- I.value.activeTab === "write" ? (h(), W(Si, {
4933
+ isTTS: _.value.isTTS,
4934
+ isFavoriteFeatureEnabled: _.value.isFavoriteFeatureEnabled,
4935
+ isAITranslateFeatureEnabled: _.value.isAITranslateFeatureEnabled,
4936
+ isFavorite: _.value.isFavorite,
4937
+ isAITranslate: _.value.isAITranslate,
4938
+ isAIExplain: _.value.isAIExplain,
4939
+ aiExplainMinLength: _.value.aiExplainMinLength,
4940
+ seedText: x.value,
4941
+ onOpt: w[7] || (w[7] = (m) => d("updateOpts", m)),
4942
+ onTranslate: w[8] || (w[8] = (m) => d("translate", m)),
4943
+ onLoadTTS: w[9] || (w[9] = (m) => d("loadTTS", m)),
4944
+ onFavorite: w[10] || (w[10] = (m) => d("favorite")),
4945
+ onAiTranslate: w[11] || (w[11] = (m) => d("aiTranslate", m)),
4946
+ onAiExplain: w[12] || (w[12] = (m) => d("aiExplain", m)),
4947
+ onCopy: w[13] || (w[13] = (m) => g("copy", m)),
4948
+ onSeeded: A
4949
+ }, null, 8, ["opt", "languages", "translation", "explanation", "tts", "isTTS", "isFavoriteFeatureEnabled", "isAITranslateFeatureEnabled", "isFavorite", "isAITranslate", "isAIExplain", "aiExplainMinLength", "seedText"])) : R("", !0),
4950
+ _.value.activeTab === "write" ? (h(), Z(Ii, {
4871
4951
  key: 1,
4872
- opt: I.value.writeOpts,
4873
- languages: I.value.languages,
4952
+ opt: _.value.writeOpts,
4953
+ languages: _.value.languages,
4874
4954
  writing: e.data.writing,
4875
- onOpt: y[14] || (y[14] = (_) => x("updateOpts", _)),
4876
- onWrite: y[15] || (y[15] = (_) => x("write", _)),
4877
- onCopy: y[16] || (y[16] = (_) => m("copy", _))
4955
+ onOpt: w[14] || (w[14] = (m) => T("updateOpts", m)),
4956
+ onWrite: w[15] || (w[15] = (m) => T("write", m)),
4957
+ onCopy: w[16] || (w[16] = (m) => g("copy", m)),
4958
+ onTranslate: b
4878
4959
  }, null, 8, ["opt", "languages", "writing"])) : R("", !0)
4879
4960
  ])
4880
4961
  ])
4881
- ], 8, Ei));
4962
+ ], 8, ki));
4882
4963
  }
4883
- }, ji = /* @__PURE__ */ he(Ni, [["__scopeId", "data-v-8885ead1"]]);
4964
+ }, Wi = /* @__PURE__ */ he(zi, [["__scopeId", "data-v-848b8f0b"]]);
4884
4965
  export {
4885
- ji as default
4966
+ Wi as default
4886
4967
  };