@pubinfo-pr/core 0.222.2 → 0.222.4

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.
Files changed (59) hide show
  1. package/dist/{AppSetting-Adv5Y3SE.js → AppSetting-BWVulLPM.js} +38 -38
  2. package/dist/{HCheckList-WAAl9RiK.js → HCheckList-Bb4GvZ2_.js} +1 -1
  3. package/dist/HSlideover-DoCRa4dK.js +152 -0
  4. package/dist/{HToggle-YLmL7R0b.js → HToggle-Bnr5k93p.js} +1 -1
  5. package/dist/{HeaderFullMenu-ByedDsvz.js → HeaderFullMenu--AOcAS-6.js} +72 -72
  6. package/dist/{HeaderThinMenu-2q2iBtTH.js → HeaderThinMenu-CRPVfGgM.js} +132 -132
  7. package/dist/PreferencesContent-DW9HAzpr.js +486 -0
  8. package/dist/{SettingBreadcrumb-C1VwfnxX.js → SettingBreadcrumb-DKCK6V-n.js} +6 -7
  9. package/dist/{SettingCopyright-C--oGV21.js → SettingCopyright-C5Pc0I1w.js} +4 -4
  10. package/dist/{SettingEnableTransition-DW2gfisN.js → SettingEnableTransition-D2FDj0oR.js} +5 -5
  11. package/dist/{SettingHome-VUAS3uEg.js → SettingHome-1Y1rYeQb.js} +6 -6
  12. package/dist/{SettingMenu-BH7XU7eF.js → SettingMenu-DWtNX8Ti.js} +8 -9
  13. package/dist/{SettingMode-BIyHzTKH.js → SettingMode-CZV84QeW.js} +4 -4
  14. package/dist/{SettingNavSearch-PfSA-_ro.js → SettingNavSearch-CrMpbXFg.js} +5 -5
  15. package/dist/{SettingOther-DdqNapQX.js → SettingOther-D6gGuQJw.js} +6 -6
  16. package/dist/{SettingPage-DS-G9-X5.js → SettingPage-DuN13bXO.js} +3 -3
  17. package/dist/{SettingTabbar-2yfw2vsm.js → SettingTabbar-BhJxcU35.js} +10 -11
  18. package/dist/{SettingThemes-Bkcywy7v.js → SettingThemes-BjkWfY1C.js} +9 -10
  19. package/dist/{SettingToolbar-DP7-_nPK.js → SettingToolbar-BYOxXAXL.js} +5 -5
  20. package/dist/{SettingTopbar-C0Ia4-If.js → SettingTopbar-CxKsnIRK.js} +8 -9
  21. package/dist/{SettingWidthMode-DgSWsHFq.js → SettingWidthMode-dM88qSol.js} +5 -5
  22. package/dist/auth-DILNNEQ8.js +1230 -0
  23. package/dist/{change-organization-BfnI2yEl.js → change-organization-BXl4ZC7j.js} +24 -24
  24. package/dist/{change-password-Bj_GWzmn.js → change-password-P4SGdvdU.js} +64 -73
  25. package/dist/components-C9kcavB4.js +2768 -0
  26. package/dist/core-CKIhF3Vi.js +270 -0
  27. package/dist/{core-4H5JBsa5.js → core-D2ocBD0r.js} +57 -51
  28. package/dist/index.js +2249 -7757
  29. package/dist/{not-found-DbHOY5cU.js → not-found-C-1699o2.js} +4 -5
  30. package/dist/{not-permission-DwERxb_u.js → not-permission-CZGJzlSF.js} +4 -5
  31. package/dist/profile-B3Q7hRgl.js +123 -0
  32. package/dist/{question-line-D7ecIumZ.js → question-line-B4oDBb2H.js} +2 -2
  33. package/dist/{right-DYiPS7dU.js → right-BTHgfOSp.js} +4 -4
  34. package/dist/style.css +1 -1
  35. package/package.json +7 -7
  36. package/dist/HSlideover-CXBJxuQo.js +0 -1695
  37. package/dist/PreferencesContent-CiPweszy.js +0 -701
  38. package/dist/auth-B65CJEOe.js +0 -4242
  39. package/dist/chunk-CD4vhpVs.js +0 -18
  40. package/dist/components-BfkDsfck.js +0 -5238
  41. package/dist/dist-7OjQvlya.js +0 -468
  42. package/dist/form-C3VHofnN.js +0 -2768
  43. package/dist/modal-Bl5xHbxa.js +0 -43824
  44. package/dist/overlayscrollbars-vue-mGyICRMi.js +0 -1460
  45. package/dist/profile-Dq66-Gsl.js +0 -19269
  46. package/dist/tree-select-B8cTcGLa.js +0 -12497
  47. package/dist/watchDiff-CPZFtaOC.js +0 -655
  48. /package/dist/{HButton-Dt6qGhhR.js → HButton-BPbXqVbA.js} +0 -0
  49. /package/dist/{HDivider-Ds5MMqtm.js → HDivider-BSENlYnI.js} +0 -0
  50. /package/dist/{HInput-BrsX9848.js → HInput-DbvnkEO7.js} +0 -0
  51. /package/dist/{HTooltip-DjAU-Evn.js → HTooltip-tCnNrJUE.js} +0 -0
  52. /package/dist/{_plugin-vue_export-helper-sUTDUeGO.js → _plugin-vue_export-helper-BBf_fmJ_.js} +0 -0
  53. /package/dist/{engine-oniguruma-uxNZ2DGJ.js → engine-oniguruma-Bl7ZtyDI.js} +0 -0
  54. /package/dist/{json-CC4oV-bd.js → json-BuUwnwNo.js} +0 -0
  55. /package/dist/{reload-CbuQgTlC.js → reload-DWTXo9r2.js} +0 -0
  56. /package/dist/{useContext-DLtu9F7E.js → useContext-mDF2-tXy.js} +0 -0
  57. /package/dist/{vitesse-dark-CxkWMfh6.js → vitesse-dark-j0hKJETh.js} +0 -0
  58. /package/dist/{vitesse-light-DY25e6F3.js → vitesse-light-BfgKNo3X.js} +0 -0
  59. /package/dist/{wasm-DAU6f5s5.js → wasm-tXaxAgz9.js} +0 -0
@@ -1,468 +0,0 @@
1
- import { Fragment, TransitionGroup, computed, customRef, defineComponent, getCurrentInstance, getCurrentScope, h, hasInjectionContext, inject, isRef, markRaw, nextTick, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onMounted, onScopeDispose, onUnmounted, onUpdated, provide, reactive, readonly, ref, shallowReadonly, shallowRef, toRaw, toRef, toRefs, toValue, unref, watch, watchEffect } from "vue";
2
- function tryOnScopeDispose(e, t) {
3
- return getCurrentScope() ? (onScopeDispose(e, t), !0) : !1;
4
- }
5
- var localProvidedStateMap = /* @__PURE__ */ new WeakMap(), injectLocal = (...e) => {
6
- let t = e[0], n = getCurrentInstance()?.proxy ?? getCurrentScope();
7
- if (n == null && !hasInjectionContext()) throw Error("injectLocal must be called in setup");
8
- return n && localProvidedStateMap.has(n) && t in localProvidedStateMap.get(n) ? localProvidedStateMap.get(n)[t] : inject(...e);
9
- }, isClient = typeof window < "u" && typeof document < "u";
10
- typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
11
- var notNullish = (e) => e != null, toString = Object.prototype.toString, isObject = (e) => toString.call(e) === "[object Object]", noop = () => {};
12
- function toRef$1(...e) {
13
- if (e.length !== 1) return toRef(...e);
14
- let t = e[0];
15
- return typeof t == "function" ? readonly(customRef(() => ({
16
- get: t,
17
- set: noop
18
- }))) : ref(t);
19
- }
20
- function createSingletonPromise(e) {
21
- let t;
22
- function n() {
23
- return t ||= e(), t;
24
- }
25
- return n.reset = async () => {
26
- let e = t;
27
- t = void 0, e && await e;
28
- }, n;
29
- }
30
- function pxValue(e) {
31
- return e.endsWith("rem") ? Number.parseFloat(e) * 16 : Number.parseFloat(e);
32
- }
33
- function toArray(e) {
34
- return Array.isArray(e) ? e : [e];
35
- }
36
- function getLifeCycleTarget(e) {
37
- return e || getCurrentInstance();
38
- }
39
- function tryOnMounted(e, t = !0, n) {
40
- getLifeCycleTarget(n) ? onMounted(e, n) : t ? e() : nextTick(e);
41
- }
42
- function useTimeoutFn(e, t, n = {}) {
43
- let { immediate: r = !0, immediateCallback: i = !1 } = n, a = shallowRef(!1), o;
44
- function s() {
45
- o &&= (clearTimeout(o), void 0);
46
- }
47
- function c() {
48
- a.value = !1, s();
49
- }
50
- function l(...n) {
51
- i && e(), s(), a.value = !0, o = setTimeout(() => {
52
- a.value = !1, o = void 0, e(...n);
53
- }, toValue(t));
54
- }
55
- return r && (a.value = !0, isClient && l()), tryOnScopeDispose(c), {
56
- isPending: shallowReadonly(a),
57
- start: l,
58
- stop: c
59
- };
60
- }
61
- function useToggle(e = !1, t = {}) {
62
- let { truthyValue: n = !0, falsyValue: r = !1 } = t, i = isRef(e), a = shallowRef(e);
63
- function o(e) {
64
- if (arguments.length) return a.value = e, a.value;
65
- {
66
- let e = toValue(n);
67
- return a.value = a.value === e ? toValue(r) : e, a.value;
68
- }
69
- }
70
- return i ? o : [a, o];
71
- }
72
- function watchImmediate(e, t, n) {
73
- return watch(e, t, {
74
- ...n,
75
- immediate: !0
76
- });
77
- }
78
- function computedAsync(e, t, r) {
79
- let i;
80
- i = isRef(r) ? { evaluating: r } : r || {};
81
- let { lazy: a = !1, flush: o = "sync", evaluating: s = void 0, shallow: c = !0, onError: l = globalThis.reportError ?? noop } = i, d = shallowRef(!a), f = c ? shallowRef(t) : ref(t), p = 0;
82
- return watchEffect(async (t) => {
83
- if (!d.value) return;
84
- p++;
85
- let n = p, r = !1;
86
- s && Promise.resolve().then(() => {
87
- s.value = !0;
88
- });
89
- try {
90
- let i = await e((e) => {
91
- t(() => {
92
- s && (s.value = !1), r || e();
93
- });
94
- });
95
- n === p && (f.value = i);
96
- } catch (e) {
97
- l(e);
98
- } finally {
99
- s && n === p && (s.value = !1), r = !0;
100
- }
101
- }, { flush: o }), a ? computed(() => (d.value = !0, f.value)) : f;
102
- }
103
- var defaultWindow = isClient ? window : void 0, defaultDocument = isClient ? window.document : void 0, defaultNavigator = isClient ? window.navigator : void 0;
104
- isClient && window.location;
105
- function unrefElement(e) {
106
- let t = toValue(e);
107
- return t?.$el ?? t;
108
- }
109
- function useEventListener(...e) {
110
- let t = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), r = computed(() => {
111
- let t = toArray(toValue(e[0])).filter((e) => e != null);
112
- return t.every((e) => typeof e != "string") ? t : void 0;
113
- });
114
- return watchImmediate(() => [
115
- r.value?.map((e) => unrefElement(e)) ?? [defaultWindow].filter((e) => e != null),
116
- toArray(toValue(r.value ? e[1] : e[0])),
117
- toArray(unref(r.value ? e[2] : e[1])),
118
- toValue(r.value ? e[3] : e[2])
119
- ], ([e, n, r, i], a, o) => {
120
- if (!e?.length || !n?.length || !r?.length) return;
121
- let s = isObject(i) ? { ...i } : i, c = e.flatMap((e) => n.flatMap((n) => r.map((r) => t(e, n, r, s))));
122
- o(() => {
123
- c.forEach((e) => e());
124
- });
125
- }, { flush: "post" });
126
- }
127
- function useMounted() {
128
- let e = shallowRef(!1), t = getCurrentInstance();
129
- return t && onMounted(() => {
130
- e.value = !0;
131
- }, t), e;
132
- }
133
- /* @__NO_SIDE_EFFECTS__ */
134
- function useSupported(e) {
135
- let t = useMounted();
136
- return computed(() => (t.value, !!e()));
137
- }
138
- function useMutationObserver(e, t, r = {}) {
139
- let { window: i = defaultWindow, ...a } = r, o, s = /* @__PURE__ */ useSupported(() => i && "MutationObserver" in i), c = () => {
140
- o &&= (o.disconnect(), void 0);
141
- }, l = watch(computed(() => {
142
- let t = toArray(toValue(e)).map(unrefElement).filter(notNullish);
143
- return new Set(t);
144
- }), (e) => {
145
- c(), s.value && e.size && (o = new MutationObserver(t), e.forEach((e) => o.observe(e, a)));
146
- }, {
147
- immediate: !0,
148
- flush: "post"
149
- }), u = () => o?.takeRecords(), d = () => {
150
- l(), c();
151
- };
152
- return tryOnScopeDispose(d), {
153
- isSupported: s,
154
- stop: d,
155
- takeRecords: u
156
- };
157
- }
158
- var ssrWidthSymbol = Symbol("vueuse-ssr-width");
159
- /* @__NO_SIDE_EFFECTS__ */
160
- function useSSRWidth() {
161
- let e = hasInjectionContext() ? injectLocal(ssrWidthSymbol, null) : null;
162
- return typeof e == "number" ? e : void 0;
163
- }
164
- function useMediaQuery(e, t = {}) {
165
- let { window: r = defaultWindow, ssrWidth: i = /* @__PURE__ */ useSSRWidth() } = t, a = /* @__PURE__ */ useSupported(() => r && "matchMedia" in r && typeof r.matchMedia == "function"), o = shallowRef(typeof i == "number"), s = shallowRef(), c = shallowRef(!1);
166
- return watchEffect(() => {
167
- if (o.value) {
168
- o.value = !a.value, c.value = toValue(e).split(",").some((e) => {
169
- let t = e.includes("not all"), n = e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), r = e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), a = !!(n || r);
170
- return n && a && (a = i >= pxValue(n[1])), r && a && (a = i <= pxValue(r[1])), t ? !a : a;
171
- });
172
- return;
173
- }
174
- a.value && (s.value = r.matchMedia(toValue(e)), c.value = s.value.matches);
175
- }), useEventListener(s, "change", (e) => {
176
- c.value = e.matches;
177
- }, { passive: !0 }), computed(() => c.value);
178
- }
179
- function usePermission(e, t = {}) {
180
- let { controls: n = !1, navigator: r = defaultNavigator } = t, i = /* @__PURE__ */ useSupported(() => r && "permissions" in r), a = shallowRef(), o = typeof e == "string" ? { name: e } : e, s = shallowRef(), c = () => {
181
- s.value = a.value?.state ?? "prompt";
182
- };
183
- useEventListener(a, "change", c, { passive: !0 });
184
- let l = createSingletonPromise(async () => {
185
- if (i.value) {
186
- if (!a.value) try {
187
- a.value = await r.permissions.query(o);
188
- } catch {
189
- a.value = void 0;
190
- } finally {
191
- c();
192
- }
193
- if (n) return toRaw(a.value);
194
- }
195
- });
196
- return l(), n ? {
197
- state: s,
198
- isSupported: i,
199
- query: l
200
- } : s;
201
- }
202
- function useClipboard(e = {}) {
203
- let { navigator: t = defaultNavigator, read: r = !1, source: i, copiedDuring: a = 1500, legacy: o = !1 } = e, s = /* @__PURE__ */ useSupported(() => t && "clipboard" in t), c = usePermission("clipboard-read"), l = usePermission("clipboard-write"), u = computed(() => s.value || o), d = shallowRef(""), f = shallowRef(!1), p = useTimeoutFn(() => f.value = !1, a, { immediate: !1 });
204
- async function m() {
205
- let e = !(s.value && y(c.value));
206
- if (!e) try {
207
- d.value = await t.clipboard.readText();
208
- } catch {
209
- e = !0;
210
- }
211
- e && (d.value = v());
212
- }
213
- u.value && r && useEventListener(["copy", "cut"], m, { passive: !0 });
214
- async function g(e = toValue(i)) {
215
- if (u.value && e != null) {
216
- let n = !(s.value && y(l.value));
217
- if (!n) try {
218
- await t.clipboard.writeText(e);
219
- } catch {
220
- n = !0;
221
- }
222
- n && _(e), d.value = e, f.value = !0, p.start();
223
- }
224
- }
225
- function _(e) {
226
- let t = document.createElement("textarea");
227
- t.value = e, t.style.position = "absolute", t.style.opacity = "0", t.setAttribute("readonly", ""), document.body.appendChild(t), t.select(), document.execCommand("copy"), t.remove();
228
- }
229
- function v() {
230
- var e, t;
231
- return ((e = document) == null || (t = e.getSelection) == null || (t = t.call(e)) == null ? void 0 : t.toString()) ?? "";
232
- }
233
- function y(e) {
234
- return e === "granted" || e === "prompt";
235
- }
236
- return {
237
- isSupported: u,
238
- text: readonly(d),
239
- copied: readonly(f),
240
- copy: g
241
- };
242
- }
243
- function usePreferredDark(e) {
244
- return useMediaQuery("(prefers-color-scheme: dark)", e);
245
- }
246
- function useCssVar(e, t, r = {}) {
247
- let { window: i = defaultWindow, initialValue: a, observe: o = !1 } = r, s = shallowRef(a), c = computed(() => {
248
- var e;
249
- return unrefElement(t) || (i == null || (e = i.document) == null ? void 0 : e.documentElement);
250
- });
251
- function l() {
252
- let t = toValue(e), n = toValue(c);
253
- n && i && t && (s.value = i.getComputedStyle(n).getPropertyValue(t)?.trim() || s.value || a);
254
- }
255
- return o && useMutationObserver(c, l, {
256
- attributeFilter: ["style", "class"],
257
- window: i
258
- }), watch([c, () => toValue(e)], (e, t) => {
259
- t[0] && t[1] && t[0].style.removeProperty(t[1]), l();
260
- }, { immediate: !0 }), watch([s, c], ([t, n]) => {
261
- let r = toValue(e);
262
- n?.style && r && (t == null ? n.style.removeProperty(r) : n.style.setProperty(r, t));
263
- }, { immediate: !0 }), s;
264
- }
265
- function useResizeObserver(e, t, r = {}) {
266
- let { window: i = defaultWindow, ...a } = r, o, s = /* @__PURE__ */ useSupported(() => i && "ResizeObserver" in i), c = () => {
267
- o &&= (o.disconnect(), void 0);
268
- }, l = watch(computed(() => {
269
- let t = toValue(e);
270
- return Array.isArray(t) ? t.map((e) => unrefElement(e)) : [unrefElement(t)];
271
- }), (e) => {
272
- if (c(), s.value && i) {
273
- o = new ResizeObserver(t);
274
- for (let t of e) t && o.observe(t, a);
275
- }
276
- }, {
277
- immediate: !0,
278
- flush: "post"
279
- }), u = () => {
280
- c(), l();
281
- };
282
- return tryOnScopeDispose(u), {
283
- isSupported: s,
284
- stop: u
285
- };
286
- }
287
- function useElementSize(e, t = {
288
- width: 0,
289
- height: 0
290
- }, r = {}) {
291
- let { window: i = defaultWindow, box: a = "content-box" } = r, o = computed(() => {
292
- var t;
293
- return (t = unrefElement(e)) == null || (t = t.namespaceURI) == null ? void 0 : t.includes("svg");
294
- }), s = shallowRef(t.width), c = shallowRef(t.height), { stop: l } = useResizeObserver(e, ([t]) => {
295
- let n = a === "border-box" ? t.borderBoxSize : a === "content-box" ? t.contentBoxSize : t.devicePixelContentBoxSize;
296
- if (i && o.value) {
297
- let t = unrefElement(e);
298
- if (t) {
299
- let e = t.getBoundingClientRect();
300
- s.value = e.width, c.value = e.height;
301
- }
302
- } else if (n) {
303
- let e = toArray(n);
304
- s.value = e.reduce((e, { inlineSize: t }) => e + t, 0), c.value = e.reduce((e, { blockSize: t }) => e + t, 0);
305
- } else s.value = t.contentRect.width, c.value = t.contentRect.height;
306
- }, r);
307
- tryOnMounted(() => {
308
- let n = unrefElement(e);
309
- n && (s.value = "offsetWidth" in n ? n.offsetWidth : t.width, c.value = "offsetHeight" in n ? n.offsetHeight : t.height);
310
- });
311
- let u = watch(() => unrefElement(e), (e) => {
312
- s.value = e ? t.width : 0, c.value = e ? t.height : 0;
313
- });
314
- function d() {
315
- l(), u();
316
- }
317
- return {
318
- width: s,
319
- height: c,
320
- stop: d
321
- };
322
- }
323
- var eventHandlers = [
324
- "fullscreenchange",
325
- "webkitfullscreenchange",
326
- "webkitendfullscreen",
327
- "mozfullscreenchange",
328
- "MSFullscreenChange"
329
- ];
330
- function useFullscreen(e, t = {}) {
331
- let { document: r = defaultDocument, autoExit: i = !1 } = t, a = computed(() => unrefElement(e) ?? r?.documentElement), o = shallowRef(!1), s = computed(() => [
332
- "requestFullscreen",
333
- "webkitRequestFullscreen",
334
- "webkitEnterFullscreen",
335
- "webkitEnterFullScreen",
336
- "webkitRequestFullScreen",
337
- "mozRequestFullScreen",
338
- "msRequestFullscreen"
339
- ].find((e) => r && e in r || a.value && e in a.value)), c = computed(() => [
340
- "exitFullscreen",
341
- "webkitExitFullscreen",
342
- "webkitExitFullScreen",
343
- "webkitCancelFullScreen",
344
- "mozCancelFullScreen",
345
- "msExitFullscreen"
346
- ].find((e) => r && e in r || a.value && e in a.value)), l = computed(() => [
347
- "fullScreen",
348
- "webkitIsFullScreen",
349
- "webkitDisplayingFullscreen",
350
- "mozFullScreen",
351
- "msFullscreenElement"
352
- ].find((e) => r && e in r || a.value && e in a.value)), u = [
353
- "fullscreenElement",
354
- "webkitFullscreenElement",
355
- "mozFullScreenElement",
356
- "msFullscreenElement"
357
- ].find((e) => r && e in r), d = /* @__PURE__ */ useSupported(() => a.value && r && s.value !== void 0 && c.value !== void 0 && l.value !== void 0), f = () => u ? r?.[u] === a.value : !1, p = () => {
358
- if (l.value) {
359
- if (r && r[l.value] != null) return r[l.value];
360
- {
361
- let e = a.value;
362
- if (e?.[l.value] != null) return !!e[l.value];
363
- }
364
- }
365
- return !1;
366
- };
367
- async function m() {
368
- if (!(!d.value || !o.value)) {
369
- if (c.value) if (r?.[c.value] != null) await r[c.value]();
370
- else {
371
- let e = a.value;
372
- e?.[c.value] != null && await e[c.value]();
373
- }
374
- o.value = !1;
375
- }
376
- }
377
- async function g() {
378
- if (!d.value || o.value) return;
379
- p() && await m();
380
- let e = a.value;
381
- s.value && e?.[s.value] != null && (await e[s.value](), o.value = !0);
382
- }
383
- async function _() {
384
- await (o.value ? m() : g());
385
- }
386
- let v = () => {
387
- let e = p();
388
- (!e || e && f()) && (o.value = e);
389
- }, y = {
390
- capture: !1,
391
- passive: !0
392
- };
393
- return useEventListener(r, eventHandlers, v, y), useEventListener(() => unrefElement(a), eventHandlers, v, y), tryOnMounted(v, !1), i && tryOnScopeDispose(m), {
394
- isSupported: d,
395
- isFullscreen: o,
396
- enter: g,
397
- exit: m,
398
- toggle: _
399
- };
400
- }
401
- var DefaultMagicKeysAliasMap = {
402
- ctrl: "control",
403
- command: "meta",
404
- cmd: "meta",
405
- option: "alt",
406
- up: "arrowup",
407
- down: "arrowdown",
408
- left: "arrowleft",
409
- right: "arrowright"
410
- };
411
- function useMagicKeys(e = {}) {
412
- let { reactive: t = !1, target: r = defaultWindow, aliasMap: i = DefaultMagicKeysAliasMap, passive: a = !0, onEventFired: o = noop } = e, s = reactive(/* @__PURE__ */ new Set()), c = {
413
- toJSON() {
414
- return {};
415
- },
416
- current: s
417
- }, l = t ? reactive(c) : c, u = /* @__PURE__ */ new Set(), d = new Map([
418
- ["Meta", u],
419
- ["Shift", /* @__PURE__ */ new Set()],
420
- ["Alt", /* @__PURE__ */ new Set()]
421
- ]), f = /* @__PURE__ */ new Set();
422
- function p(e, n) {
423
- e in l && (t ? l[e] = n : l[e].value = n);
424
- }
425
- function m() {
426
- s.clear();
427
- for (let e of f) p(e, !1);
428
- }
429
- function g(e, t, n) {
430
- if (!(!e || typeof t.getModifierState != "function")) {
431
- for (let [e, r] of d) if (t.getModifierState(e)) {
432
- n.forEach((e) => r.add(e));
433
- break;
434
- }
435
- }
436
- }
437
- function _(e, t) {
438
- if (e) return;
439
- let n = `${t[0].toUpperCase()}${t.slice(1)}`, r = d.get(n);
440
- if (!["shift", "alt"].includes(t) || !r) return;
441
- let i = Array.from(r), a = i.indexOf(t);
442
- i.forEach((e, t) => {
443
- t >= a && (s.delete(e), p(e, !1));
444
- }), r.clear();
445
- }
446
- function v(e, t) {
447
- let n = e.key?.toLowerCase(), r = [e.code?.toLowerCase(), n].filter(Boolean);
448
- if (n) {
449
- n && (t ? s.add(n) : s.delete(n));
450
- for (let e of r) f.add(e), p(e, t);
451
- g(t, e, [...s, ...r]), _(t, n), n === "meta" && !t && (u.forEach((e) => {
452
- s.delete(e), p(e, !1);
453
- }), u.clear());
454
- }
455
- }
456
- useEventListener(r, "keydown", (e) => (v(e, !0), o(e)), { passive: a }), useEventListener(r, "keyup", (e) => (v(e, !1), o(e)), { passive: a }), useEventListener("blur", m, { passive: a }), useEventListener("focus", m, { passive: a });
457
- let y = new Proxy(l, { get(e, r, a) {
458
- if (typeof r != "string") return Reflect.get(e, r, a);
459
- if (r = r.toLowerCase(), r in i && (r = i[r]), !(r in l)) if (/[+_-]/.test(r)) {
460
- let e = r.split(/[+_-]/g).map((e) => e.trim());
461
- l[r] = computed(() => e.map((e) => toValue(y[e])).every(Boolean));
462
- } else l[r] = shallowRef(!1);
463
- let o = Reflect.get(e, r, a);
464
- return t ? toValue(o) : o;
465
- } });
466
- return y;
467
- }
468
- export { useFullscreen as a, isClient as c, useTimeoutFn as d, useToggle as f, useElementSize as i, toRef$1 as l, useClipboard as n, useMagicKeys as o, useCssVar as r, usePreferredDark as s, computedAsync as t, tryOnScopeDispose as u };