@validol4ik/uikit 0.7.1 → 0.7.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.
@@ -1,10 +1,10 @@
1
- import { ref as T, onMounted as oe, watch as S, computed as E, getCurrentInstance as R, nextTick as I, onBeforeUnmount as z, onUnmounted as Ie, h as Q, Teleport as Qe, onDeactivated as Se, Transition as _e } from "vue";
2
- import { i as Ne, P as Ke, b as je, c as Ce, r as Ue, a as Ge } from "./focusout-DjvPXP_b.js";
3
- import { p as ce, z as de, i as Pe, B as Xe, n as J, D as Ye, E as X, c as He, F as ke, G as Ze, H as fe, a as Je, b as et, I as tt, h as ot, q as nt, s as lt } from "./index-BV2qSN9C.js";
4
- let Y, V = 0;
5
- const y = new Array(256);
1
+ import { ref as T, onMounted as te, watch as S, computed as E, getCurrentInstance as R, nextTick as I, onBeforeUnmount as z, onUnmounted as Oe, h as K, Teleport as Ie, onDeactivated as Te, Transition as Ke } from "vue";
2
+ import { i as Ne, P as Qe, b as _e, c as Se, r as je, a as Ue } from "./focusout-DjvPXP_b.js";
3
+ import { p as se, D as ce, k as Ce, E as Ge, m as J, F as Xe, c as He, G as B, H as ke, I as Ye, J as de, u as Je, a as Ze, K as et, L as tt, h as ot, o as nt, s as lt } from "./index-B8rGKrFf.js";
4
+ let X, V = 0;
5
+ const w = new Array(256);
6
6
  for (let e = 0; e < 256; e++)
7
- y[e] = (e + 256).toString(16).substring(1);
7
+ w[e] = (e + 256).toString(16).substring(1);
8
8
  const it = (() => {
9
9
  const e = typeof crypto < "u" ? crypto : typeof window < "u" ? window.crypto || window.msCrypto : void 0;
10
10
  if (e !== void 0) {
@@ -22,49 +22,49 @@ const it = (() => {
22
22
  o.push(Math.floor(Math.random() * 256));
23
23
  return o;
24
24
  };
25
- })(), me = 4096;
26
- function ee() {
27
- (Y === void 0 || V + 16 > me) && (V = 0, Y = it(me));
28
- const e = Array.prototype.slice.call(Y, V, V += 16);
29
- return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, y[e[0]] + y[e[1]] + y[e[2]] + y[e[3]] + "-" + y[e[4]] + y[e[5]] + "-" + y[e[6]] + y[e[7]] + "-" + y[e[8]] + y[e[9]] + "-" + y[e[10]] + y[e[11]] + y[e[12]] + y[e[13]] + y[e[14]] + y[e[15]];
25
+ })(), fe = 4096;
26
+ function Z() {
27
+ (X === void 0 || V + 16 > fe) && (V = 0, X = it(fe));
28
+ const e = Array.prototype.slice.call(X, V, V += 16);
29
+ return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, w[e[0]] + w[e[1]] + w[e[2]] + w[e[3]] + "-" + w[e[4]] + w[e[5]] + "-" + w[e[6]] + w[e[7]] + "-" + w[e[8]] + w[e[9]] + "-" + w[e[10]] + w[e[11]] + w[e[12]] + w[e[13]] + w[e[14]] + w[e[15]];
30
30
  }
31
- function ut(e) {
31
+ function at(e) {
32
32
  return e ?? null;
33
33
  }
34
- function he(e, t) {
35
- return e ?? (t === !0 ? `f_${ee()}` : null);
34
+ function me(e, t) {
35
+ return e ?? (t === !0 ? `f_${Z()}` : null);
36
36
  }
37
37
  function Nt({ getValue: e, required: t = !0 } = {}) {
38
38
  if (Ne.value === !0) {
39
- const o = e !== void 0 ? T(ut(e())) : T(null);
40
- return t === !0 && o.value === null && oe(() => {
41
- o.value = `f_${ee()}`;
39
+ const o = e !== void 0 ? T(at(e())) : T(null);
40
+ return t === !0 && o.value === null && te(() => {
41
+ o.value = `f_${Z()}`;
42
42
  }), e !== void 0 && S(e, (n) => {
43
- o.value = he(n, t);
43
+ o.value = me(n, t);
44
44
  }), o;
45
45
  }
46
- return e !== void 0 ? E(() => he(e(), t)) : T(`f_${ee()}`);
46
+ return e !== void 0 ? E(() => me(e(), t)) : T(`f_${Z()}`);
47
47
  }
48
48
  let W = [], D = [];
49
- function Me(e) {
49
+ function Pe(e) {
50
50
  D = D.filter((t) => t !== e);
51
51
  }
52
- function at(e) {
53
- Me(e), D.push(e);
52
+ function ut(e) {
53
+ Pe(e), D.push(e);
54
54
  }
55
- function ve(e) {
56
- Me(e), D.length === 0 && W.length !== 0 && (W[W.length - 1](), W = []);
55
+ function he(e) {
56
+ Pe(e), D.length === 0 && W.length !== 0 && (W[W.length - 1](), W = []);
57
57
  }
58
58
  function rt(e) {
59
59
  D.length === 0 ? e() : W.push(e);
60
60
  }
61
- function Kt(e) {
61
+ function Qt(e) {
62
62
  W = W.filter((t) => t !== e);
63
63
  }
64
64
  function st() {
65
65
  if (window.getSelection !== void 0) {
66
66
  const e = window.getSelection();
67
- e.empty !== void 0 ? e.empty() : e.removeAllRanges !== void 0 && (e.removeAllRanges(), Ke.is.mobile !== !0 && e.addRange(document.createRange()));
67
+ e.empty !== void 0 ? e.empty() : e.removeAllRanges !== void 0 && (e.removeAllRanges(), Qe.is.mobile !== !0 && e.addRange(document.createRange()));
68
68
  } else document.selection !== void 0 && document.selection.empty();
69
69
  }
70
70
  const ct = {
@@ -86,47 +86,47 @@ function ft({
86
86
  // optional
87
87
  }) {
88
88
  const { props: n, proxy: l, emit: f } = R(), i = T(null);
89
- let a = null;
90
- function m(u) {
91
- return i.value === null ? !1 : u === void 0 || u.touches === void 0 || u.touches.length <= 1;
89
+ let u = null;
90
+ function m(a) {
91
+ return i.value === null ? !1 : a === void 0 || a.touches === void 0 || a.touches.length <= 1;
92
92
  }
93
93
  const c = {};
94
94
  o === void 0 && (Object.assign(c, {
95
- hide(u) {
96
- l.hide(u);
95
+ hide(a) {
96
+ l.hide(a);
97
97
  },
98
- toggle(u) {
99
- l.toggle(u), u.qAnchorHandled = !0;
98
+ toggle(a) {
99
+ l.toggle(a), a.qAnchorHandled = !0;
100
100
  },
101
- toggleKey(u) {
102
- Pe(u, 13) === !0 && c.toggle(u);
101
+ toggleKey(a) {
102
+ Ce(a, 13) === !0 && c.toggle(a);
103
103
  },
104
- contextClick(u) {
105
- l.hide(u), ce(u), I(() => {
106
- l.show(u), u.qAnchorHandled = !0;
104
+ contextClick(a) {
105
+ l.hide(a), se(a), I(() => {
106
+ l.show(a), a.qAnchorHandled = !0;
107
107
  });
108
108
  },
109
- prevent: ce,
110
- mobileTouch(u) {
111
- if (c.mobileCleanup(u), m(u) !== !0) return;
112
- l.hide(u), i.value.classList.add("non-selectable");
113
- const d = u.target;
114
- de(c, "anchor", [
109
+ prevent: se,
110
+ mobileTouch(a) {
111
+ if (c.mobileCleanup(a), m(a) !== !0) return;
112
+ l.hide(a), i.value.classList.add("non-selectable");
113
+ const d = a.target;
114
+ ce(c, "anchor", [
115
115
  [d, "touchmove", "mobileCleanup", "passive"],
116
116
  [d, "touchend", "mobileCleanup", "passive"],
117
117
  [d, "touchcancel", "mobileCleanup", "passive"],
118
118
  [i.value, "contextmenu", "prevent", "notPassive"]
119
- ]), a = setTimeout(() => {
120
- a = null, l.show(u), u.qAnchorHandled = !0;
119
+ ]), u = setTimeout(() => {
120
+ u = null, l.show(a), a.qAnchorHandled = !0;
121
121
  }, 300);
122
122
  },
123
- mobileCleanup(u) {
124
- i.value.classList.remove("non-selectable"), a !== null && (clearTimeout(a), a = null), e.value === !0 && u !== void 0 && st();
123
+ mobileCleanup(a) {
124
+ i.value.classList.remove("non-selectable"), u !== null && (clearTimeout(u), u = null), e.value === !0 && a !== void 0 && st();
125
125
  }
126
- }), o = function(u = n.contextMenu) {
126
+ }), o = function(a = n.contextMenu) {
127
127
  if (n.noParentEvent === !0 || i.value === null) return;
128
128
  let d;
129
- u === !0 ? l.$q.platform.is.mobile === !0 ? d = [
129
+ a === !0 ? l.$q.platform.is.mobile === !0 ? d = [
130
130
  [i.value, "touchstart", "mobileTouch", "passive"]
131
131
  ] : d = [
132
132
  [i.value, "mousedown", "hide", "passive"],
@@ -134,13 +134,13 @@ function ft({
134
134
  ] : d = [
135
135
  [i.value, "click", "toggle", "passive"],
136
136
  [i.value, "keyup", "toggleKey", "passive"]
137
- ], de(c, "anchor", d);
137
+ ], ce(c, "anchor", d);
138
138
  });
139
139
  function s() {
140
- Xe(c, "anchor");
140
+ Ge(c, "anchor");
141
141
  }
142
- function g(u) {
143
- for (i.value = u; i.value.classList.contains("q-anchor--skip"); )
142
+ function g(a) {
143
+ for (i.value = a; i.value.classList.contains("q-anchor--skip"); )
144
144
  i.value = i.value.parentNode;
145
145
  o();
146
146
  }
@@ -150,26 +150,26 @@ function ft({
150
150
  else if (n.target === !0)
151
151
  g(l.$el.parentNode);
152
152
  else {
153
- let u = n.target;
153
+ let a = n.target;
154
154
  if (typeof n.target == "string")
155
155
  try {
156
- u = document.querySelector(n.target);
156
+ a = document.querySelector(n.target);
157
157
  } catch {
158
- u = void 0;
158
+ a = void 0;
159
159
  }
160
- u != null ? (i.value = u.$el || u, o()) : (i.value = null, console.error(`Anchor: target "${n.target}" not found`));
160
+ a != null ? (i.value = a.$el || a, o()) : (i.value = null, console.error(`Anchor: target "${n.target}" not found`));
161
161
  }
162
162
  }
163
- return S(() => n.contextMenu, (u) => {
164
- i.value !== null && (s(), o(u));
163
+ return S(() => n.contextMenu, (a) => {
164
+ i.value !== null && (s(), o(a));
165
165
  }), S(() => n.target, () => {
166
166
  i.value !== null && s(), p();
167
- }), S(() => n.noParentEvent, (u) => {
168
- i.value !== null && (u === !0 ? s() : o());
169
- }), oe(() => {
167
+ }), S(() => n.noParentEvent, (a) => {
168
+ i.value !== null && (a === !0 ? s() : o());
169
+ }), te(() => {
170
170
  p(), t !== !0 && n.modelValue === !0 && i.value === null && f("update:modelValue", !1);
171
171
  }), z(() => {
172
- a !== null && clearTimeout(a), s();
172
+ u !== null && clearTimeout(u), s();
173
173
  }), {
174
174
  anchorEl: i,
175
175
  canShow: m,
@@ -179,9 +179,9 @@ function ft({
179
179
  function mt(e, t) {
180
180
  const o = T(null);
181
181
  let n;
182
- function l(a, m) {
182
+ function l(u, m) {
183
183
  const c = `${m !== void 0 ? "add" : "remove"}EventListener`, s = m !== void 0 ? m : n;
184
- a !== window && a[c]("scroll", s, J.passive), window[c]("scroll", s, J.passive), n = m;
184
+ u !== window && u[c]("scroll", s, J.passive), window[c]("scroll", s, J.passive), n = m;
185
185
  }
186
186
  function f() {
187
187
  o.value !== null && (l(o.value), o.value = null);
@@ -220,75 +220,62 @@ function gt({
220
220
  processOnMount: f
221
221
  // optional
222
222
  }) {
223
- const i = R(), { props: a, emit: m, proxy: c } = i;
223
+ const i = R(), { props: u, emit: m, proxy: c } = i;
224
224
  let s;
225
225
  function g(h) {
226
226
  e.value === !0 ? d(h) : p(h);
227
227
  }
228
228
  function p(h) {
229
- if (a.disable === !0 || (h == null ? void 0 : h.qAnchorHandled) === !0 || t !== void 0 && t(h) !== !0) return;
230
- const v = a["onUpdate:modelValue"] !== void 0;
229
+ if (u.disable === !0 || (h == null ? void 0 : h.qAnchorHandled) === !0 || t !== void 0 && t(h) !== !0) return;
230
+ const v = u["onUpdate:modelValue"] !== void 0;
231
231
  v === !0 && (m("update:modelValue", !0), s = h, I(() => {
232
232
  s === h && (s = void 0);
233
- })), (a.modelValue === null || v === !1) && u(h);
233
+ })), (u.modelValue === null || v === !1) && a(h);
234
234
  }
235
- function u(h) {
235
+ function a(h) {
236
236
  e.value !== !0 && (e.value = !0, m("beforeShow", h), n !== void 0 ? n(h) : m("show", h));
237
237
  }
238
238
  function d(h) {
239
- if (a.disable === !0) return;
240
- const v = a["onUpdate:modelValue"] !== void 0;
239
+ if (u.disable === !0) return;
240
+ const v = u["onUpdate:modelValue"] !== void 0;
241
241
  v === !0 && (m("update:modelValue", !1), s = h, I(() => {
242
242
  s === h && (s = void 0);
243
- })), (a.modelValue === null || v === !1) && k(h);
243
+ })), (u.modelValue === null || v === !1) && P(h);
244
244
  }
245
- function k(h) {
245
+ function P(h) {
246
246
  e.value !== !1 && (e.value = !1, m("beforeHide", h), l !== void 0 ? l(h) : m("hide", h));
247
247
  }
248
248
  function C(h) {
249
- a.disable === !0 && h === !0 ? a["onUpdate:modelValue"] !== void 0 && m("update:modelValue", !1) : h === !0 !== e.value && (h === !0 ? u : k)(s);
249
+ u.disable === !0 && h === !0 ? u["onUpdate:modelValue"] !== void 0 && m("update:modelValue", !1) : h === !0 !== e.value && (h === !0 ? a : P)(s);
250
250
  }
251
- S(() => a.modelValue, C), o !== void 0 && Ye(i) === !0 && S(() => c.$route.fullPath, () => {
251
+ S(() => u.modelValue, C), o !== void 0 && Xe(i) === !0 && S(() => c.$route.fullPath, () => {
252
252
  o.value === !0 && e.value === !0 && d();
253
- }), oe(() => {
254
- C(a.modelValue);
253
+ }), te(() => {
254
+ C(u.modelValue);
255
255
  });
256
256
  const M = { show: p, hide: d, toggle: g };
257
257
  return Object.assign(c, M), M;
258
258
  }
259
- const ge = {};
260
- let pt = 1, wt = document.body;
261
- function yt(e, t) {
259
+ const ve = {};
260
+ let pt = 1, yt = document.body;
261
+ function wt(e, t) {
262
262
  const o = document.createElement("div");
263
- if (o.id = t !== void 0 ? `q-portal--${t}--${pt++}` : e, ge.globalNodes !== void 0) {
264
- const n = ge.globalNodes.class;
263
+ if (o.id = t !== void 0 ? `q-portal--${t}--${pt++}` : e, ve.globalNodes !== void 0) {
264
+ const n = ve.globalNodes.class;
265
265
  n !== void 0 && (o.className = n);
266
266
  }
267
- return wt.appendChild(o), o;
267
+ return yt.appendChild(o), o;
268
268
  }
269
- function bt(e) {
269
+ function xt(e) {
270
270
  e.remove();
271
271
  }
272
- const A = [];
273
- function xt(e, t) {
274
- do {
275
- if (e.$options.name === "QMenu") {
276
- if (e.hide(t), e.$props.separateClosePopup === !0)
277
- return X(e);
278
- } else if (e.__qPortal === !0) {
279
- const o = X(e);
280
- return (o == null ? void 0 : o.$options.name) === "QPopupProxy" ? (e.hide(t), o) : e;
281
- }
282
- e = X(e);
283
- } while (e != null);
284
- }
285
- const Et = He({
272
+ const bt = He({
286
273
  name: "QPortal",
287
274
  setup(e, { slots: t }) {
288
275
  return () => t.default();
289
276
  }
290
277
  });
291
- function Tt(e) {
278
+ function Et(e) {
292
279
  for (e = e.parent; e != null; ) {
293
280
  if (e.type.name === "QGlobalDialog")
294
281
  return !0;
@@ -298,34 +285,34 @@ function Tt(e) {
298
285
  }
299
286
  return !1;
300
287
  }
301
- function St(e, t, o, n) {
288
+ function Tt(e, t, o, n) {
302
289
  const l = T(!1), f = T(!1);
303
290
  let i = null;
304
- const a = {}, m = n === "dialog" && Tt(e);
291
+ const u = {}, m = n === "dialog" && Et(e);
305
292
  function c(g) {
306
293
  if (g === !0) {
307
- ve(a), f.value = !0;
294
+ he(u), f.value = !0;
308
295
  return;
309
296
  }
310
- f.value = !1, l.value === !1 && (m === !1 && i === null && (i = yt(!1, n)), l.value = !0, A.push(e.proxy), at(a));
297
+ f.value = !1, l.value === !1 && (m === !1 && i === null && (i = wt(!1, n)), l.value = !0, B.push(e.proxy), ut(u));
311
298
  }
312
299
  function s(g) {
313
300
  if (f.value = !1, g !== !0) return;
314
- ve(a), l.value = !1;
315
- const p = A.indexOf(e.proxy);
316
- p !== -1 && A.splice(p, 1), i !== null && (bt(i), i = null);
301
+ he(u), l.value = !1;
302
+ const p = B.indexOf(e.proxy);
303
+ p !== -1 && B.splice(p, 1), i !== null && (xt(i), i = null);
317
304
  }
318
- return Ie(() => {
305
+ return Oe(() => {
319
306
  s(!0);
320
- }), e.proxy.__qPortal = !0, je(e.proxy, "contentEl", () => t.value), {
307
+ }), e.proxy.__qPortal = !0, _e(e.proxy, "contentEl", () => t.value), {
321
308
  showPortal: c,
322
309
  hidePortal: s,
323
310
  portalIsActive: l,
324
311
  portalIsAccessible: f,
325
- renderPortal: () => m === !0 ? o() : l.value === !0 ? [Q(Qe, { to: i }, Q(Et, o))] : void 0
312
+ renderPortal: () => m === !0 ? o() : l.value === !0 ? [K(Ie, { to: i }, K(bt, o))] : void 0
326
313
  };
327
314
  }
328
- const Ct = {
315
+ const St = {
329
316
  transitionShow: {
330
317
  type: String,
331
318
  default: "fade"
@@ -339,7 +326,7 @@ const Ct = {
339
326
  default: 300
340
327
  }
341
328
  };
342
- function Pt(e, t = () => {
329
+ function Ct(e, t = () => {
343
330
  }, o = () => {
344
331
  }) {
345
332
  return {
@@ -364,7 +351,7 @@ function Ht() {
364
351
  function o() {
365
352
  e = void 0;
366
353
  }
367
- return Se(o), z(o), {
354
+ return Te(o), z(o), {
368
355
  removeTick: o,
369
356
  registerTick(n) {
370
357
  e = n, I(() => {
@@ -379,7 +366,7 @@ function kt() {
379
366
  function o() {
380
367
  e !== null && (clearTimeout(e), e = null);
381
368
  }
382
- return Se(o), z(o), {
369
+ return Te(o), z(o), {
383
370
  removeTimeout: o,
384
371
  registerTimeout(n, l) {
385
372
  o(), ke(t) === !1 && (e = setTimeout(() => {
@@ -388,31 +375,31 @@ function kt() {
388
375
  }
389
376
  };
390
377
  }
391
- const Mt = [Element, String], Wt = [null, document, document.body, document.scrollingElement, document.documentElement];
392
- function qt(e, t) {
393
- let o = Ze(t);
378
+ const Pt = [Element, String], Mt = [null, document, document.body, document.scrollingElement, document.documentElement];
379
+ function Wt(e, t) {
380
+ let o = Ye(t);
394
381
  if (o === void 0) {
395
382
  if (e == null)
396
383
  return window;
397
384
  o = e.closest(".scroll,.scroll-y,.overflow-auto");
398
385
  }
399
- return Wt.includes(o) ? window : o;
386
+ return Mt.includes(o) ? window : o;
400
387
  }
401
- function jt(e) {
388
+ function _t(e) {
402
389
  return e === window ? window.pageYOffset || window.scrollY || document.body.scrollTop || 0 : e.scrollTop;
403
390
  }
404
- function Ut(e) {
391
+ function jt(e) {
405
392
  return e === window ? window.pageXOffset || window.scrollX || document.body.scrollLeft || 0 : e.scrollLeft;
406
393
  }
407
394
  let O;
408
- function $t() {
395
+ function qt() {
409
396
  if (O !== void 0)
410
397
  return O;
411
398
  const e = document.createElement("p"), t = document.createElement("div");
412
- fe(e, {
399
+ de(e, {
413
400
  width: "100%",
414
401
  height: "200px"
415
- }), fe(t, {
402
+ }), de(t, {
416
403
  position: "absolute",
417
404
  top: "0px",
418
405
  left: "0px",
@@ -426,37 +413,37 @@ function $t() {
426
413
  let n = e.offsetWidth;
427
414
  return o === n && (n = t.clientWidth), t.remove(), O = o - n, O;
428
415
  }
429
- function Gt(e, t = !0) {
416
+ function Ut(e, t = !0) {
430
417
  return !e || e.nodeType !== Node.ELEMENT_NODE ? !1 : t ? e.scrollHeight > e.clientHeight && (e.classList.contains("scroll") || e.classList.contains("overflow-auto") || ["auto", "scroll"].includes(window.getComputedStyle(e)["overflow-y"])) : e.scrollWidth > e.clientWidth && (e.classList.contains("scroll") || e.classList.contains("overflow-auto") || ["auto", "scroll"].includes(window.getComputedStyle(e)["overflow-x"]));
431
418
  }
432
419
  const q = [];
433
- let F;
434
- function Bt(e) {
435
- F = e.keyCode === 27;
420
+ let $;
421
+ function Lt(e) {
422
+ $ = e.keyCode === 27;
436
423
  }
437
424
  function Ft() {
438
- F === !0 && (F = !1);
425
+ $ === !0 && ($ = !1);
439
426
  }
440
- function Lt(e) {
441
- F === !0 && (F = !1, Pe(e, 27) === !0 && q[q.length - 1](e));
427
+ function $t(e) {
428
+ $ === !0 && ($ = !1, Ce(e, 27) === !0 && q[q.length - 1](e));
442
429
  }
443
- function We(e) {
444
- window[e]("keydown", Bt), window[e]("blur", Ft), window[e]("keyup", Lt), F = !1;
430
+ function Me(e) {
431
+ window[e]("keydown", Lt), window[e]("blur", Ft), window[e]("keyup", $t), $ = !1;
445
432
  }
446
433
  function At(e) {
447
- Ce.is.desktop === !0 && (q.push(e), q.length === 1 && We("addEventListener"));
434
+ Se.is.desktop === !0 && (q.push(e), q.length === 1 && Me("addEventListener"));
448
435
  }
449
- function pe(e) {
436
+ function ge(e) {
450
437
  const t = q.indexOf(e);
451
- t !== -1 && (q.splice(t, 1), q.length === 0 && We("removeEventListener"));
438
+ t !== -1 && (q.splice(t, 1), q.length === 0 && Me("removeEventListener"));
452
439
  }
453
- const { notPassiveCapture: _ } = J, $ = [];
454
- function N(e) {
440
+ const { notPassiveCapture: N } = J, L = [];
441
+ function Q(e) {
455
442
  const t = e.target;
456
443
  if (t === void 0 || t.nodeType === 8 || t.classList.contains("no-pointer-events") === !0) return;
457
- let o = A.length - 1;
444
+ let o = B.length - 1;
458
445
  for (; o >= 0; ) {
459
- const n = A[o].$;
446
+ const n = B[o].$;
460
447
  if (n.type.name === "QTooltip") {
461
448
  o--;
462
449
  continue;
@@ -466,51 +453,51 @@ function N(e) {
466
453
  if (n.props.seamless !== !0) return;
467
454
  o--;
468
455
  }
469
- for (let n = $.length - 1; n >= 0; n--) {
470
- const l = $[n];
456
+ for (let n = L.length - 1; n >= 0; n--) {
457
+ const l = L[n];
471
458
  if ((l.anchorEl.value === null || l.anchorEl.value.contains(t) === !1) && (t === document.body || l.innerRef.value !== null && l.innerRef.value.contains(t) === !1))
472
459
  e.qClickOutside = !0, l.onClickOutside(e);
473
460
  else
474
461
  return;
475
462
  }
476
463
  }
477
- function Dt(e) {
478
- $.push(e), $.length === 1 && (document.addEventListener("mousedown", N, _), document.addEventListener("touchstart", N, _));
464
+ function Bt(e) {
465
+ L.push(e), L.length === 1 && (document.addEventListener("mousedown", Q, N), document.addEventListener("touchstart", Q, N));
479
466
  }
480
- function we(e) {
481
- const t = $.findIndex((o) => o === e);
482
- t !== -1 && ($.splice(t, 1), $.length === 0 && (document.removeEventListener("mousedown", N, _), document.removeEventListener("touchstart", N, _)));
467
+ function pe(e) {
468
+ const t = L.findIndex((o) => o === e);
469
+ t !== -1 && (L.splice(t, 1), L.length === 0 && (document.removeEventListener("mousedown", Q, N), document.removeEventListener("touchstart", Q, N)));
483
470
  }
484
- let ye, be;
471
+ let ye, we;
485
472
  function xe(e) {
486
473
  const t = e.split(" ");
487
474
  return t.length !== 2 ? !1 : ["top", "center", "bottom"].includes(t[0]) !== !0 ? (console.error("Anchor/Self position must start with one of top/center/bottom"), !1) : ["left", "middle", "right", "start", "end"].includes(t[1]) !== !0 ? (console.error("Anchor/Self position must end with one of left/middle/right/start/end"), !1) : !0;
488
475
  }
489
- function Rt(e) {
476
+ function Dt(e) {
490
477
  return e ? !(e.length !== 2 || typeof e[0] != "number" || typeof e[1] != "number") : !0;
491
478
  }
492
- const te = {
479
+ const ee = {
493
480
  "start#ltr": "left",
494
481
  "start#rtl": "right",
495
482
  "end#ltr": "right",
496
483
  "end#rtl": "left"
497
484
  };
498
485
  ["left", "middle", "right"].forEach((e) => {
499
- te[`${e}#ltr`] = e, te[`${e}#rtl`] = e;
486
+ ee[`${e}#ltr`] = e, ee[`${e}#rtl`] = e;
500
487
  });
501
- function Ee(e, t) {
488
+ function be(e, t) {
502
489
  const o = e.split(" ");
503
490
  return {
504
491
  vertical: o[0],
505
- horizontal: te[`${o[1]}#${t === !0 ? "rtl" : "ltr"}`]
492
+ horizontal: ee[`${o[1]}#${t === !0 ? "rtl" : "ltr"}`]
506
493
  };
507
494
  }
508
- function zt(e, t) {
509
- let { top: o, left: n, right: l, bottom: f, width: i, height: a } = e.getBoundingClientRect();
510
- return t !== void 0 && (o -= t[1], n -= t[0], f += t[1], l += t[0], i += t[0], a += t[1]), {
495
+ function Rt(e, t) {
496
+ let { top: o, left: n, right: l, bottom: f, width: i, height: u } = e.getBoundingClientRect();
497
+ return t !== void 0 && (o -= t[1], n -= t[0], f += t[1], l += t[0], i += t[0], u += t[1]), {
511
498
  top: o,
512
499
  bottom: f,
513
- height: a,
500
+ height: u,
514
501
  left: n,
515
502
  right: l,
516
503
  width: i,
@@ -518,7 +505,7 @@ function zt(e, t) {
518
505
  center: o + (f - o) / 2
519
506
  };
520
507
  }
521
- function Vt(e, t, o) {
508
+ function zt(e, t, o) {
522
509
  let { top: n, left: l } = e.getBoundingClientRect();
523
510
  return n += t.top, l += t.left, o !== void 0 && (n += o[1], l += o[0]), {
524
511
  top: n,
@@ -531,7 +518,7 @@ function Vt(e, t, o) {
531
518
  center: n
532
519
  };
533
520
  }
534
- function Ot(e, t) {
521
+ function Vt(e, t) {
535
522
  return {
536
523
  top: 0,
537
524
  center: t / 2,
@@ -541,17 +528,17 @@ function Ot(e, t) {
541
528
  right: e
542
529
  };
543
530
  }
544
- function Te(e, t, o, n) {
531
+ function Ee(e, t, o, n) {
545
532
  return {
546
533
  top: e[o.vertical] - t[n.vertical],
547
534
  left: e[o.horizontal] - t[n.horizontal]
548
535
  };
549
536
  }
550
- function qe(e, t = 0) {
537
+ function We(e, t = 0) {
551
538
  if (e.targetEl === null || e.anchorEl === null || t > 5) return;
552
539
  if (e.targetEl.offsetHeight === 0 || e.targetEl.offsetWidth === 0) {
553
540
  setTimeout(() => {
554
- qe(e, t + 1);
541
+ We(e, t + 1);
555
542
  }, 10);
556
543
  return;
557
544
  }
@@ -561,17 +548,17 @@ function qe(e, t = 0) {
561
548
  anchorEl: l,
562
549
  anchorOrigin: f,
563
550
  selfOrigin: i,
564
- absoluteOffset: a,
551
+ absoluteOffset: u,
565
552
  fit: m,
566
553
  cover: c,
567
554
  maxHeight: s,
568
555
  maxWidth: g
569
556
  } = e;
570
- if (Ce.is.ios === !0 && window.visualViewport !== void 0) {
571
- const B = document.body.style, { offsetLeft: b, offsetTop: x } = window.visualViewport;
572
- b !== ye && (B.setProperty("--q-pe-left", b + "px"), ye = b), x !== be && (B.setProperty("--q-pe-top", x + "px"), be = x);
557
+ if (Se.is.ios === !0 && window.visualViewport !== void 0) {
558
+ const F = document.body.style, { offsetLeft: x, offsetTop: b } = window.visualViewport;
559
+ x !== ye && (F.setProperty("--q-pe-left", x + "px"), ye = x), b !== we && (F.setProperty("--q-pe-top", b + "px"), we = b);
573
560
  }
574
- const { scrollLeft: p, scrollTop: u } = o, d = a === void 0 ? zt(l, c === !0 ? [0, 0] : n) : Vt(l, a, n);
561
+ const { scrollLeft: p, scrollTop: a } = o, d = u === void 0 ? Rt(l, c === !0 ? [0, 0] : n) : zt(l, u, n);
575
562
  Object.assign(o.style, {
576
563
  top: 0,
577
564
  left: 0,
@@ -581,36 +568,36 @@ function qe(e, t = 0) {
581
568
  maxHeight: s,
582
569
  visibility: "visible"
583
570
  });
584
- const { offsetWidth: k, offsetHeight: C } = o, { elWidth: M, elHeight: h } = m === !0 || c === !0 ? { elWidth: Math.max(d.width, k), elHeight: c === !0 ? Math.max(d.height, C) : C } : { elWidth: k, elHeight: C };
571
+ const { offsetWidth: P, offsetHeight: C } = o, { elWidth: M, elHeight: h } = m === !0 || c === !0 ? { elWidth: Math.max(d.width, P), elHeight: c === !0 ? Math.max(d.height, C) : C } : { elWidth: P, elHeight: C };
585
572
  let v = { maxWidth: g, maxHeight: s };
586
573
  (m === !0 || c === !0) && (v.minWidth = d.width + "px", c === !0 && (v.minHeight = d.height + "px")), Object.assign(o.style, v);
587
- const P = Ot(M, h);
588
- let w = Te(d, P, f, i);
589
- if (a === void 0 || n === void 0)
590
- Z(w, d, P, f, i);
574
+ const H = Vt(M, h);
575
+ let y = Ee(d, H, f, i);
576
+ if (u === void 0 || n === void 0)
577
+ Y(y, d, H, f, i);
591
578
  else {
592
- const { top: B, left: b } = w;
593
- Z(w, d, P, f, i);
594
- let x = !1;
595
- if (w.top !== B) {
596
- x = !0;
597
- const H = 2 * n[1];
598
- d.center = d.top -= H, d.bottom -= H + 2;
579
+ const { top: F, left: x } = y;
580
+ Y(y, d, H, f, i);
581
+ let b = !1;
582
+ if (y.top !== F) {
583
+ b = !0;
584
+ const k = 2 * n[1];
585
+ d.center = d.top -= k, d.bottom -= k + 2;
599
586
  }
600
- if (w.left !== b) {
601
- x = !0;
602
- const H = 2 * n[0];
603
- d.middle = d.left -= H, d.right -= H + 2;
587
+ if (y.left !== x) {
588
+ b = !0;
589
+ const k = 2 * n[0];
590
+ d.middle = d.left -= k, d.right -= k + 2;
604
591
  }
605
- x === !0 && (w = Te(d, P, f, i), Z(w, d, P, f, i));
592
+ b === !0 && (y = Ee(d, H, f, i), Y(y, d, H, f, i));
606
593
  }
607
594
  v = {
608
- top: w.top + "px",
609
- left: w.left + "px"
610
- }, w.maxHeight !== void 0 && (v.maxHeight = w.maxHeight + "px", d.height > w.maxHeight && (v.minHeight = v.maxHeight)), w.maxWidth !== void 0 && (v.maxWidth = w.maxWidth + "px", d.width > w.maxWidth && (v.minWidth = v.maxWidth)), Object.assign(o.style, v), o.scrollTop !== u && (o.scrollTop = u), o.scrollLeft !== p && (o.scrollLeft = p);
595
+ top: y.top + "px",
596
+ left: y.left + "px"
597
+ }, y.maxHeight !== void 0 && (v.maxHeight = y.maxHeight + "px", d.height > y.maxHeight && (v.minHeight = v.maxHeight)), y.maxWidth !== void 0 && (v.maxWidth = y.maxWidth + "px", d.width > y.maxWidth && (v.minWidth = v.maxWidth)), Object.assign(o.style, v), o.scrollTop !== a && (o.scrollTop = a), o.scrollLeft !== p && (o.scrollLeft = p);
611
598
  }
612
- function Z(e, t, o, n, l) {
613
- const f = o.bottom, i = o.right, a = $t(), m = window.innerHeight - a, c = document.body.clientWidth;
599
+ function Y(e, t, o, n, l) {
600
+ const f = o.bottom, i = o.right, u = qt(), m = window.innerHeight - u, c = document.body.clientWidth;
614
601
  if (e.top < 0 || e.top + f > m)
615
602
  if (l.vertical === "center")
616
603
  e.top = t[n.vertical] > m / 2 ? Math.max(0, m - f) : 0, e.maxHeight = Math.min(f, m);
@@ -640,14 +627,14 @@ function Z(e, t, o, n, l) {
640
627
  n.horizontal === "middle" ? t.middle : n.horizontal === l.horizontal ? t.left : t.right
641
628
  ), e.maxWidth = Math.min(i, c - e.left);
642
629
  }
643
- const Xt = He({
630
+ const Gt = He({
644
631
  name: "QMenu",
645
632
  inheritAttrs: !1,
646
633
  props: {
647
634
  ...dt,
648
635
  ...ht,
649
636
  ...Je,
650
- ...Ct,
637
+ ...St,
651
638
  persistent: Boolean,
652
639
  autoClose: Boolean,
653
640
  separateClosePopup: Boolean,
@@ -668,9 +655,9 @@ const Xt = He({
668
655
  },
669
656
  offset: {
670
657
  type: Array,
671
- validator: Rt
658
+ validator: Dt
672
659
  },
673
- scrollTarget: Mt,
660
+ scrollTarget: Pt,
674
661
  touchPosition: Boolean,
675
662
  maxHeight: {
676
663
  type: String,
@@ -687,36 +674,36 @@ const Xt = He({
687
674
  "escapeKey"
688
675
  ],
689
676
  setup(e, { slots: t, emit: o, attrs: n }) {
690
- let l = null, f, i, a;
691
- const m = R(), { proxy: c } = m, { $q: s } = c, g = T(null), p = T(!1), u = E(
677
+ let l = null, f, i, u;
678
+ const m = R(), { proxy: c } = m, { $q: s } = c, g = T(null), p = T(!1), a = E(
692
679
  () => e.persistent !== !0 && e.noRouteDismiss !== !0
693
- ), d = et(e, s), { registerTick: k, removeTick: C } = Ht(), { registerTimeout: M } = kt(), { transitionProps: h, transitionStyle: v } = Pt(e), { localScrollTarget: P, changeScrollEvent: w, unconfigureScrollTarget: B } = mt(e, re), { anchorEl: b, canShow: x } = ft({ showing: p }), { hide: H } = gt({
680
+ ), d = Ze(e, s), { registerTick: P, removeTick: C } = Ht(), { registerTimeout: M } = kt(), { transitionProps: h, transitionStyle: v } = Ct(e), { localScrollTarget: H, changeScrollEvent: y, unconfigureScrollTarget: F } = mt(e, ue), { anchorEl: x, canShow: b } = ft({ showing: p }), { hide: k } = gt({
694
681
  showing: p,
695
- canShow: x,
682
+ canShow: b,
696
683
  handleShow: Ae,
697
- handleHide: De,
698
- hideOnRouteChange: u,
684
+ handleHide: Be,
685
+ hideOnRouteChange: a,
699
686
  processOnMount: !0
700
- }), { showPortal: ne, hidePortal: le, renderPortal: $e } = St(m, g, ze, "menu"), K = {
701
- anchorEl: b,
687
+ }), { showPortal: oe, hidePortal: ne, renderPortal: qe } = Tt(m, g, Re, "menu"), _ = {
688
+ anchorEl: x,
702
689
  innerRef: g,
703
690
  onClickOutside(r) {
704
691
  if (e.persistent !== !0 && p.value === !0)
705
- return H(r), // always prevent touch event
692
+ return k(r), // always prevent touch event
706
693
  (r.type === "touchstart" || r.target.classList.contains("q-dialog__backdrop")) && lt(r), !0;
707
694
  }
708
- }, ie = E(
709
- () => Ee(
695
+ }, le = E(
696
+ () => be(
710
697
  e.anchor || (e.cover === !0 ? "center middle" : "bottom start"),
711
698
  s.lang.rtl
712
699
  )
713
- ), Be = E(() => e.cover === !0 ? ie.value : Ee(e.self || "top start", s.lang.rtl)), Fe = E(
700
+ ), Le = E(() => e.cover === !0 ? le.value : be(e.self || "top start", s.lang.rtl)), Fe = E(
714
701
  () => (e.square === !0 ? " q-menu--square" : "") + (d.value === !0 ? " q-menu--dark q-dark" : "")
715
- ), Le = E(() => e.autoClose === !0 ? { onClick: Re } : {}), ue = E(
702
+ ), $e = E(() => e.autoClose === !0 ? { onClick: De } : {}), ie = E(
716
703
  () => p.value === !0 && e.persistent !== !0
717
704
  );
718
- S(ue, (r) => {
719
- r === !0 ? (At(U), Dt(K)) : (pe(U), we(K));
705
+ S(ie, (r) => {
706
+ r === !0 ? (At(U), Bt(_)) : (ge(U), pe(_));
720
707
  });
721
708
  function j() {
722
709
  rt(() => {
@@ -725,50 +712,50 @@ const Xt = He({
725
712
  });
726
713
  }
727
714
  function Ae(r) {
728
- if (l = e.noRefocus === !1 ? document.activeElement : null, Ge(se), ne(), re(), f = void 0, r !== void 0 && (e.touchPosition || e.contextMenu)) {
729
- const G = tt(r);
715
+ if (l = e.noRefocus === !1 ? document.activeElement : null, Ue(re), oe(), ue(), f = void 0, r !== void 0 && (e.touchPosition || e.contextMenu)) {
716
+ const G = et(r);
730
717
  if (G.left !== void 0) {
731
- const { top: Ve, left: Oe } = b.value.getBoundingClientRect();
732
- f = { left: G.left - Oe, top: G.top - Ve };
718
+ const { top: ze, left: Ve } = x.value.getBoundingClientRect();
719
+ f = { left: G.left - Ve, top: G.top - ze };
733
720
  }
734
721
  }
735
722
  i === void 0 && (i = S(
736
723
  () => s.screen.width + "|" + s.screen.height + "|" + e.self + "|" + e.anchor + "|" + s.lang.rtl,
737
- L
738
- )), e.noFocus !== !0 && document.activeElement.blur(), k(() => {
739
- L(), e.noFocus !== !0 && j();
724
+ A
725
+ )), e.noFocus !== !0 && document.activeElement.blur(), P(() => {
726
+ A(), e.noFocus !== !0 && j();
740
727
  }), M(() => {
741
- s.platform.is.ios === !0 && (a = e.autoClose, g.value.click()), L(), ne(!0), o("show", r);
728
+ s.platform.is.ios === !0 && (u = e.autoClose, g.value.click()), A(), oe(!0), o("show", r);
742
729
  }, e.transitionDuration);
743
730
  }
744
- function De(r) {
745
- C(), le(), ae(!0), l !== null && // menu was hidden from code or ESC plugin
731
+ function Be(r) {
732
+ C(), ne(), ae(!0), l !== null && // menu was hidden from code or ESC plugin
746
733
  (r === void 0 || r.qClickOutside !== !0) && ((((r == null ? void 0 : r.type.indexOf("key")) === 0 ? l.closest('[tabindex]:not([tabindex^="-"])') : void 0) || l).focus(), l = null), M(() => {
747
- le(!0), o("hide", r);
734
+ ne(!0), o("hide", r);
748
735
  }, e.transitionDuration);
749
736
  }
750
737
  function ae(r) {
751
- f = void 0, i !== void 0 && (i(), i = void 0), (r === !0 || p.value === !0) && (Ue(se), B(), we(K), pe(U)), r !== !0 && (l = null);
738
+ f = void 0, i !== void 0 && (i(), i = void 0), (r === !0 || p.value === !0) && (je(re), F(), pe(_), ge(U)), r !== !0 && (l = null);
752
739
  }
753
- function re() {
754
- (b.value !== null || e.scrollTarget !== void 0) && (P.value = qt(b.value, e.scrollTarget), w(P.value, L));
740
+ function ue() {
741
+ (x.value !== null || e.scrollTarget !== void 0) && (H.value = Wt(x.value, e.scrollTarget), y(H.value, A));
755
742
  }
756
- function Re(r) {
757
- a !== !0 ? (xt(c, r), o("click", r)) : a = !1;
743
+ function De(r) {
744
+ u !== !0 ? (tt(c, r), o("click", r)) : u = !1;
758
745
  }
759
- function se(r) {
760
- ue.value === !0 && e.noFocus !== !0 && nt(g.value, r.target) !== !0 && j();
746
+ function re(r) {
747
+ ie.value === !0 && e.noFocus !== !0 && nt(g.value, r.target) !== !0 && j();
761
748
  }
762
749
  function U(r) {
763
- e.noEscDismiss !== !0 && (o("escapeKey"), H(r));
750
+ e.noEscDismiss !== !0 && (o("escapeKey"), k(r));
764
751
  }
765
- function L() {
766
- qe({
752
+ function A() {
753
+ We({
767
754
  targetEl: g.value,
768
755
  offset: e.offset,
769
- anchorEl: b.value,
770
- anchorOrigin: ie.value,
771
- selfOrigin: Be.value,
756
+ anchorEl: x.value,
757
+ anchorOrigin: le.value,
758
+ selfOrigin: Le.value,
772
759
  absoluteOffset: f,
773
760
  fit: e.fit,
774
761
  cover: e.cover,
@@ -776,11 +763,11 @@ const Xt = He({
776
763
  maxWidth: e.maxWidth
777
764
  });
778
765
  }
779
- function ze() {
780
- return Q(
781
- _e,
766
+ function Re() {
767
+ return K(
768
+ Ke,
782
769
  h.value,
783
- () => p.value === !0 ? Q("div", {
770
+ () => p.value === !0 ? K("div", {
784
771
  role: "menu",
785
772
  ...n,
786
773
  ref: g,
@@ -793,29 +780,29 @@ const Xt = He({
793
780
  n.style,
794
781
  v.value
795
782
  ],
796
- ...Le.value
783
+ ...$e.value
797
784
  }, ot(t.default)) : null
798
785
  );
799
786
  }
800
- return z(ae), Object.assign(c, { focus: j, updatePosition: L }), $e;
787
+ return z(ae), Object.assign(c, { focus: j, updatePosition: A }), qe;
801
788
  }
802
789
  });
803
790
  export {
804
- Xt as Q,
791
+ Gt as Q,
805
792
  rt as a,
806
- jt as b,
793
+ _t as b,
807
794
  vt as c,
808
- Ct as d,
795
+ St as d,
809
796
  ht as e,
810
797
  kt as f,
811
- Ut as g,
812
- Gt as h,
798
+ jt as g,
799
+ Ut as h,
813
800
  Ht as i,
814
- Pt as j,
815
- St as k,
801
+ Ct as j,
802
+ Tt as k,
816
803
  gt as l,
817
- pe as m,
804
+ ge as m,
818
805
  At as n,
819
- Kt as r,
806
+ Qt as r,
820
807
  Nt as u
821
808
  };