@jskit-ai/assistant-core 0.1.166 → 0.1.167
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/examples/conversation/package.json +3 -3
- package/package.json +5 -5
- package/examples/conversation/dist/assets/index-CSTXm6q3.css +0 -1
- package/examples/conversation/dist/assets/index-DGgOLzoo.js +0 -30
- package/examples/conversation/dist/index.html +0 -4
- package/examples/conversation/node_modules/.vite/deps/@mdi_js.js +0 -7450
- package/examples/conversation/node_modules/.vite/deps/@mdi_js.js.map +0 -1
- package/examples/conversation/node_modules/.vite/deps/VTooltip-jIxO6ULs.js +0 -2311
- package/examples/conversation/node_modules/.vite/deps/VTooltip-jIxO6ULs.js.map +0 -1
- package/examples/conversation/node_modules/.vite/deps/_metadata.json +0 -70
- package/examples/conversation/node_modules/.vite/deps/defineComponent-DK6LSjDW.js +0 -710
- package/examples/conversation/node_modules/.vite/deps/defineComponent-DK6LSjDW.js.map +0 -1
- package/examples/conversation/node_modules/.vite/deps/hotkey-parsing-DnoZxtbW.js +0 -1214
- package/examples/conversation/node_modules/.vite/deps/hotkey-parsing-DnoZxtbW.js.map +0 -1
- package/examples/conversation/node_modules/.vite/deps/icons-ze2hmg7j.js +0 -98
- package/examples/conversation/node_modules/.vite/deps/icons-ze2hmg7j.js.map +0 -1
- package/examples/conversation/node_modules/.vite/deps/package.json +0 -3
- package/examples/conversation/node_modules/.vite/deps/theme-D78LVcJg.js +0 -1301
- package/examples/conversation/node_modules/.vite/deps/theme-D78LVcJg.js.map +0 -1
- package/examples/conversation/node_modules/.vite/deps/vue.js +0 -2
- package/examples/conversation/node_modules/.vite/deps/vue.runtime.esm-bundler-YcakWsDn.js +0 -8538
- package/examples/conversation/node_modules/.vite/deps/vue.runtime.esm-bundler-YcakWsDn.js.map +0 -1
- package/examples/conversation/node_modules/.vite/deps/vuetify.js +0 -413
- package/examples/conversation/node_modules/.vite/deps/vuetify.js.map +0 -1
- package/examples/conversation/node_modules/.vite/deps/vuetify_components.js +0 -25370
- package/examples/conversation/node_modules/.vite/deps/vuetify_components.js.map +0 -1
- package/examples/conversation/node_modules/.vite/deps/vuetify_directives.js +0 -132
- package/examples/conversation/node_modules/.vite/deps/vuetify_directives.js.map +0 -1
- package/examples/conversation/node_modules/.vite/deps/vuetify_iconsets_mdi-svg.js +0 -70
- package/examples/conversation/node_modules/.vite/deps/vuetify_iconsets_mdi-svg.js.map +0 -1
|
@@ -1,2311 +0,0 @@
|
|
|
1
|
-
import { C as vShow, Cn as withDirectives, Dt as mergeProps, Ft as onMounted, Gn as readonly, I as Teleport, Kn as ref, M as Fragment, Mn as effectScope, Ot as nextTick, Qn as toRef, U as computed, Ut as provide, Vn as onScopeDispose, W as createBaseVNode, Wn as reactive, Yn as shallowRef, Zn as toRaw, Zt as resolveDynamicComponent, _n as watchEffect, cn as useId, er as toValue, et as createVNode, gn as watch, hn as warn, jt as onBeforeUnmount, n as Transition, pt as h, r as TransitionGroup, xt as inject } from "./vue.runtime.esm-bundler-YcakWsDn.js";
|
|
2
|
-
import { $ as omit, C as destructComputed, E as eventName, G as isObject, K as isOn, M as focusableChildren, S as defer, V as includes, X as matchesSelector, Y as keys, _ as clamp, c as getCurrentInstance, d as CircularBuffer, et as onlyDefinedProps, gt as consoleError, pt as SUPPORTS_INTERSECTION, q as isPrimitive, r as genericComponent, st as templateRef, u as propsFactory, ut as IN_BROWSER, v as convertToUnit, z as hasEvent } from "./defineComponent-DK6LSjDW.js";
|
|
3
|
-
import { M as isCssColor, N as isParsableColor, P as parseColor, _ as useToggleScope, g as useProxiedModel, h as useRtl, i as provideTheme, j as hasLightForeground, r as makeThemeProps, u as useDisplay } from "./theme-D78LVcJg.js";
|
|
4
|
-
import "/home/merc/Development/current/jskit-ai/node_modules/vuetify/lib/directives/ripple/VRipple.css";
|
|
5
|
-
import "/home/merc/Development/current/jskit-ai/node_modules/vuetify/lib/components/VOverlay/VOverlay.css";
|
|
6
|
-
import "/home/merc/Development/current/jskit-ai/node_modules/vuetify/lib/components/VTooltip/VTooltip.css";
|
|
7
|
-
//#region ../../../../node_modules/vuetify/lib/util/anchor.js
|
|
8
|
-
var block = ["top", "bottom"];
|
|
9
|
-
var inline = [
|
|
10
|
-
"start",
|
|
11
|
-
"end",
|
|
12
|
-
"left",
|
|
13
|
-
"right"
|
|
14
|
-
];
|
|
15
|
-
/** Parse a raw anchor string into an object */
|
|
16
|
-
function parseAnchor(anchor, isRtl) {
|
|
17
|
-
let [side, align] = anchor.split(" ");
|
|
18
|
-
if (!align) align = includes(block, side) ? "start" : includes(inline, side) ? "top" : "center";
|
|
19
|
-
return {
|
|
20
|
-
side: toPhysical(side, isRtl),
|
|
21
|
-
align: toPhysical(align, isRtl)
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
function toPhysical(str, isRtl) {
|
|
25
|
-
if (str === "start") return isRtl ? "right" : "left";
|
|
26
|
-
if (str === "end") return isRtl ? "left" : "right";
|
|
27
|
-
return str;
|
|
28
|
-
}
|
|
29
|
-
function flipSide(anchor) {
|
|
30
|
-
return {
|
|
31
|
-
side: {
|
|
32
|
-
center: "center",
|
|
33
|
-
top: "bottom",
|
|
34
|
-
bottom: "top",
|
|
35
|
-
left: "right",
|
|
36
|
-
right: "left"
|
|
37
|
-
}[anchor.side],
|
|
38
|
-
align: anchor.align
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
function flipAlign(anchor) {
|
|
42
|
-
return {
|
|
43
|
-
side: anchor.side,
|
|
44
|
-
align: {
|
|
45
|
-
center: "center",
|
|
46
|
-
top: "bottom",
|
|
47
|
-
bottom: "top",
|
|
48
|
-
left: "right",
|
|
49
|
-
right: "left"
|
|
50
|
-
}[anchor.align]
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
function flipCorner(anchor) {
|
|
54
|
-
return {
|
|
55
|
-
side: anchor.align,
|
|
56
|
-
align: anchor.side
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
function getAxis(anchor) {
|
|
60
|
-
return includes(block, anchor.side) ? "y" : "x";
|
|
61
|
-
}
|
|
62
|
-
//#endregion
|
|
63
|
-
//#region ../../../../node_modules/vuetify/lib/util/box.js
|
|
64
|
-
var Box = class {
|
|
65
|
-
constructor(args) {
|
|
66
|
-
const pageScale = document.body.currentCSSZoom ?? 1;
|
|
67
|
-
const isElement = args instanceof Element;
|
|
68
|
-
const factor = isElement ? 1 + (1 - pageScale) / pageScale : 1;
|
|
69
|
-
const { x, y, width, height } = isElement ? args.getBoundingClientRect() : args;
|
|
70
|
-
this.x = x * factor;
|
|
71
|
-
this.y = y * factor;
|
|
72
|
-
this.width = width * factor;
|
|
73
|
-
this.height = height * factor;
|
|
74
|
-
}
|
|
75
|
-
get top() {
|
|
76
|
-
return this.y;
|
|
77
|
-
}
|
|
78
|
-
get bottom() {
|
|
79
|
-
return this.y + this.height;
|
|
80
|
-
}
|
|
81
|
-
get left() {
|
|
82
|
-
return this.x;
|
|
83
|
-
}
|
|
84
|
-
get right() {
|
|
85
|
-
return this.x + this.width;
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
function getOverflow(a, b) {
|
|
89
|
-
return {
|
|
90
|
-
x: {
|
|
91
|
-
before: Math.max(0, b.left - a.left),
|
|
92
|
-
after: Math.max(0, a.right - b.right)
|
|
93
|
-
},
|
|
94
|
-
y: {
|
|
95
|
-
before: Math.max(0, b.top - a.top),
|
|
96
|
-
after: Math.max(0, a.bottom - b.bottom)
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
function getTargetBox(target) {
|
|
101
|
-
if (Array.isArray(target)) {
|
|
102
|
-
const pageScale = document.body.currentCSSZoom ?? 1;
|
|
103
|
-
const factor = 1 + (1 - pageScale) / pageScale;
|
|
104
|
-
return new Box({
|
|
105
|
-
x: target[0] * factor,
|
|
106
|
-
y: target[1] * factor,
|
|
107
|
-
width: 0 * factor,
|
|
108
|
-
height: 0 * factor
|
|
109
|
-
});
|
|
110
|
-
} else return new Box(target);
|
|
111
|
-
}
|
|
112
|
-
function getElementBox(el) {
|
|
113
|
-
if (el === document.documentElement) {
|
|
114
|
-
if (!visualViewport) return new Box({
|
|
115
|
-
x: 0,
|
|
116
|
-
y: 0,
|
|
117
|
-
width: document.documentElement.clientWidth,
|
|
118
|
-
height: document.documentElement.clientHeight
|
|
119
|
-
});
|
|
120
|
-
else {
|
|
121
|
-
const pageScale = document.body.currentCSSZoom ?? 1;
|
|
122
|
-
return new Box({
|
|
123
|
-
x: visualViewport.scale > 1 ? 0 : visualViewport.offsetLeft,
|
|
124
|
-
y: visualViewport.scale > 1 ? 0 : visualViewport.offsetTop,
|
|
125
|
-
width: visualViewport.width * visualViewport.scale / pageScale,
|
|
126
|
-
height: visualViewport.height * visualViewport.scale / pageScale
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
} else return new Box(el);
|
|
130
|
-
}
|
|
131
|
-
//#endregion
|
|
132
|
-
//#region ../../../../node_modules/vuetify/lib/util/animation.js
|
|
133
|
-
/** @see https://stackoverflow.com/a/57876601/2074736 */
|
|
134
|
-
function nullifyTransforms(el) {
|
|
135
|
-
const rect = new Box(el);
|
|
136
|
-
const style = getComputedStyle(el);
|
|
137
|
-
const tx = style.transform;
|
|
138
|
-
if (tx) {
|
|
139
|
-
let ta, sx, sy, dx, dy;
|
|
140
|
-
if (tx.startsWith("matrix3d(")) {
|
|
141
|
-
ta = tx.slice(9, -1).split(/, /);
|
|
142
|
-
sx = Number(ta[0]);
|
|
143
|
-
sy = Number(ta[5]);
|
|
144
|
-
dx = Number(ta[12]);
|
|
145
|
-
dy = Number(ta[13]);
|
|
146
|
-
} else if (tx.startsWith("matrix(")) {
|
|
147
|
-
ta = tx.slice(7, -1).split(/, /);
|
|
148
|
-
sx = Number(ta[0]);
|
|
149
|
-
sy = Number(ta[3]);
|
|
150
|
-
dx = Number(ta[4]);
|
|
151
|
-
dy = Number(ta[5]);
|
|
152
|
-
} else return new Box(rect);
|
|
153
|
-
const to = style.transformOrigin;
|
|
154
|
-
return new Box({
|
|
155
|
-
x: rect.x - dx - (1 - sx) * parseFloat(to),
|
|
156
|
-
y: rect.y - dy - (1 - sy) * parseFloat(to.slice(to.indexOf(" ") + 1)),
|
|
157
|
-
width: sx ? rect.width / sx : el.offsetWidth + 1,
|
|
158
|
-
height: sy ? rect.height / sy : el.offsetHeight + 1
|
|
159
|
-
});
|
|
160
|
-
} else return new Box(rect);
|
|
161
|
-
}
|
|
162
|
-
function animate(el, keyframes, options) {
|
|
163
|
-
if (typeof el.animate === "undefined") return { finished: Promise.resolve() };
|
|
164
|
-
let animation;
|
|
165
|
-
try {
|
|
166
|
-
animation = el.animate(keyframes, options);
|
|
167
|
-
} catch (err) {
|
|
168
|
-
return { finished: Promise.resolve() };
|
|
169
|
-
}
|
|
170
|
-
if (typeof animation.finished === "undefined") animation.finished = new Promise((resolve) => {
|
|
171
|
-
animation.onfinish = () => {
|
|
172
|
-
resolve(animation);
|
|
173
|
-
};
|
|
174
|
-
});
|
|
175
|
-
return animation;
|
|
176
|
-
}
|
|
177
|
-
//#endregion
|
|
178
|
-
//#region ../../../../node_modules/vuetify/lib/util/bindProps.js
|
|
179
|
-
var handlers = /* @__PURE__ */ new WeakMap();
|
|
180
|
-
function bindProps(el, props) {
|
|
181
|
-
Object.keys(props).forEach((k) => {
|
|
182
|
-
if (isOn(k)) {
|
|
183
|
-
const name = eventName(k);
|
|
184
|
-
const handler = handlers.get(el);
|
|
185
|
-
if (props[k] == null) handler?.forEach((v) => {
|
|
186
|
-
const [n, fn] = v;
|
|
187
|
-
if (n === name) {
|
|
188
|
-
el.removeEventListener(name, fn);
|
|
189
|
-
handler.delete(v);
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
else if (!handler || ![...handler].some((v) => v[0] === name && v[1] === props[k])) {
|
|
193
|
-
el.addEventListener(name, props[k]);
|
|
194
|
-
const _handler = handler || /* @__PURE__ */ new Set();
|
|
195
|
-
_handler.add([name, props[k]]);
|
|
196
|
-
if (!handlers.has(el)) handlers.set(el, _handler);
|
|
197
|
-
}
|
|
198
|
-
} else if (props[k] == null) el.removeAttribute(k);
|
|
199
|
-
else el.setAttribute(k, props[k]);
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
function unbindProps(el, props) {
|
|
203
|
-
Object.keys(props).forEach((k) => {
|
|
204
|
-
if (isOn(k)) {
|
|
205
|
-
const name = eventName(k);
|
|
206
|
-
const handler = handlers.get(el);
|
|
207
|
-
handler?.forEach((v) => {
|
|
208
|
-
const [n, fn] = v;
|
|
209
|
-
if (n === name) {
|
|
210
|
-
el.removeEventListener(name, fn);
|
|
211
|
-
handler.delete(v);
|
|
212
|
-
}
|
|
213
|
-
});
|
|
214
|
-
} else el.removeAttribute(k);
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
//#endregion
|
|
218
|
-
//#region ../../../../node_modules/vuetify/lib/composables/component.js
|
|
219
|
-
var makeComponentProps = propsFactory({
|
|
220
|
-
class: [
|
|
221
|
-
String,
|
|
222
|
-
Array,
|
|
223
|
-
Object
|
|
224
|
-
],
|
|
225
|
-
style: {
|
|
226
|
-
type: [
|
|
227
|
-
String,
|
|
228
|
-
Array,
|
|
229
|
-
Object
|
|
230
|
-
],
|
|
231
|
-
default: null
|
|
232
|
-
}
|
|
233
|
-
}, "component");
|
|
234
|
-
//#endregion
|
|
235
|
-
//#region ../../../../node_modules/vuetify/lib/util/deepEqual.js
|
|
236
|
-
function updateRecursionCache(a, b, cache, result) {
|
|
237
|
-
if (!cache || isPrimitive(a) || isPrimitive(b)) return;
|
|
238
|
-
const visitedObject = cache.get(a);
|
|
239
|
-
if (visitedObject) visitedObject.set(b, result);
|
|
240
|
-
else {
|
|
241
|
-
const newCacheItem = /* @__PURE__ */ new WeakMap();
|
|
242
|
-
newCacheItem.set(b, result);
|
|
243
|
-
cache.set(a, newCacheItem);
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
function findCachedComparison(a, b, cache) {
|
|
247
|
-
if (!cache || isPrimitive(a) || isPrimitive(b)) return null;
|
|
248
|
-
const r1 = cache.get(a)?.get(b);
|
|
249
|
-
if (typeof r1 === "boolean") return r1;
|
|
250
|
-
const r2 = cache.get(b)?.get(a);
|
|
251
|
-
if (typeof r2 === "boolean") return r2;
|
|
252
|
-
return null;
|
|
253
|
-
}
|
|
254
|
-
function deepEqual(a, b, recursionCache = /* @__PURE__ */ new WeakMap()) {
|
|
255
|
-
if (a === b) return true;
|
|
256
|
-
if (a instanceof Date && b instanceof Date && a.getTime() !== b.getTime()) return false;
|
|
257
|
-
if (a !== Object(a) || b !== Object(b)) return false;
|
|
258
|
-
const props = Object.keys(a);
|
|
259
|
-
if (props.length !== Object.keys(b).length) return false;
|
|
260
|
-
const cachedComparisonResult = findCachedComparison(a, b, recursionCache);
|
|
261
|
-
if (cachedComparisonResult) return cachedComparisonResult;
|
|
262
|
-
updateRecursionCache(a, b, recursionCache, true);
|
|
263
|
-
return props.every((p) => deepEqual(a[p], b[p], recursionCache));
|
|
264
|
-
}
|
|
265
|
-
//#endregion
|
|
266
|
-
//#region ../../../../node_modules/vuetify/lib/util/dom.js
|
|
267
|
-
/**
|
|
268
|
-
* Returns:
|
|
269
|
-
* - 'null' if the node is not attached to the DOM
|
|
270
|
-
* - the root node (HTMLDocument | ShadowRoot) otherwise
|
|
271
|
-
*/
|
|
272
|
-
function attachedRoot(node) {
|
|
273
|
-
/* istanbul ignore next */
|
|
274
|
-
if (typeof node.getRootNode !== "function") {
|
|
275
|
-
while (node.parentNode) node = node.parentNode;
|
|
276
|
-
if (node !== document) return null;
|
|
277
|
-
return document;
|
|
278
|
-
}
|
|
279
|
-
const root = node.getRootNode();
|
|
280
|
-
if (root !== document && root.getRootNode({ composed: true }) !== document) return null;
|
|
281
|
-
return root;
|
|
282
|
-
}
|
|
283
|
-
//#endregion
|
|
284
|
-
//#region ../../../../node_modules/vuetify/lib/util/getScrollParent.js
|
|
285
|
-
function getScrollParent(el, includeHidden = false) {
|
|
286
|
-
while (el) {
|
|
287
|
-
if (includeHidden ? isPotentiallyScrollable(el) : hasScrollbar(el)) return el;
|
|
288
|
-
el = el.parentElement;
|
|
289
|
-
}
|
|
290
|
-
return document.scrollingElement;
|
|
291
|
-
}
|
|
292
|
-
function getScrollParents(el, stopAt) {
|
|
293
|
-
const elements = [];
|
|
294
|
-
if (stopAt && el && !stopAt.contains(el)) return elements;
|
|
295
|
-
while (el) {
|
|
296
|
-
if (hasScrollbar(el)) elements.push(el);
|
|
297
|
-
if (el === stopAt) break;
|
|
298
|
-
el = el.parentElement;
|
|
299
|
-
}
|
|
300
|
-
return elements;
|
|
301
|
-
}
|
|
302
|
-
function hasScrollbar(el) {
|
|
303
|
-
if (!el || el.nodeType !== Node.ELEMENT_NODE) return false;
|
|
304
|
-
const style = window.getComputedStyle(el);
|
|
305
|
-
const hasVerticalScrollbar = style.overflowY === "scroll" || style.overflowY === "auto" && el.scrollHeight > el.clientHeight;
|
|
306
|
-
const hasHorizontalScrollbar = style.overflowX === "scroll" || style.overflowX === "auto" && el.scrollWidth > el.clientWidth;
|
|
307
|
-
return hasVerticalScrollbar || hasHorizontalScrollbar;
|
|
308
|
-
}
|
|
309
|
-
function isPotentiallyScrollable(el) {
|
|
310
|
-
if (!el || el.nodeType !== Node.ELEMENT_NODE) return false;
|
|
311
|
-
const style = window.getComputedStyle(el);
|
|
312
|
-
return ["scroll", "auto"].includes(style.overflowY);
|
|
313
|
-
}
|
|
314
|
-
//#endregion
|
|
315
|
-
//#region ../../../../node_modules/vuetify/lib/util/isFixedPosition.js
|
|
316
|
-
function isFixedPosition(el) {
|
|
317
|
-
while (el) {
|
|
318
|
-
if (window.getComputedStyle(el).position === "fixed") return true;
|
|
319
|
-
el = el.offsetParent;
|
|
320
|
-
}
|
|
321
|
-
return false;
|
|
322
|
-
}
|
|
323
|
-
//#endregion
|
|
324
|
-
//#region ../../../../node_modules/vuetify/lib/util/useRender.js
|
|
325
|
-
function useRender(render) {
|
|
326
|
-
const vm = getCurrentInstance("useRender");
|
|
327
|
-
vm.render = render;
|
|
328
|
-
}
|
|
329
|
-
//#endregion
|
|
330
|
-
//#region ../../../../node_modules/vuetify/lib/composables/dimensions.js
|
|
331
|
-
var makeDimensionProps = propsFactory({
|
|
332
|
-
height: [Number, String],
|
|
333
|
-
maxHeight: [Number, String],
|
|
334
|
-
maxWidth: [Number, String],
|
|
335
|
-
minHeight: [Number, String],
|
|
336
|
-
minWidth: [Number, String],
|
|
337
|
-
width: [Number, String]
|
|
338
|
-
}, "dimension");
|
|
339
|
-
function useDimension(props) {
|
|
340
|
-
return { dimensionStyles: computed(() => {
|
|
341
|
-
const styles = {};
|
|
342
|
-
const height = convertToUnit(props.height);
|
|
343
|
-
const maxHeight = convertToUnit(props.maxHeight);
|
|
344
|
-
const maxWidth = convertToUnit(props.maxWidth);
|
|
345
|
-
const minHeight = convertToUnit(props.minHeight);
|
|
346
|
-
const minWidth = convertToUnit(props.minWidth);
|
|
347
|
-
const width = convertToUnit(props.width);
|
|
348
|
-
if (height != null) styles.height = height;
|
|
349
|
-
if (maxHeight != null) styles.maxHeight = maxHeight;
|
|
350
|
-
if (maxWidth != null) styles.maxWidth = maxWidth;
|
|
351
|
-
if (minHeight != null) styles.minHeight = minHeight;
|
|
352
|
-
if (minWidth != null) styles.minWidth = minWidth;
|
|
353
|
-
if (width != null) styles.width = width;
|
|
354
|
-
return styles;
|
|
355
|
-
}) };
|
|
356
|
-
}
|
|
357
|
-
//#endregion
|
|
358
|
-
//#region ../../../../node_modules/vuetify/lib/composables/color.js
|
|
359
|
-
function useColor(colors) {
|
|
360
|
-
return destructComputed(() => {
|
|
361
|
-
const { class: colorClasses, style: colorStyles } = computeColor(colors);
|
|
362
|
-
return {
|
|
363
|
-
colorClasses,
|
|
364
|
-
colorStyles
|
|
365
|
-
};
|
|
366
|
-
});
|
|
367
|
-
}
|
|
368
|
-
function useTextColor(color) {
|
|
369
|
-
const { colorClasses: textColorClasses, colorStyles: textColorStyles } = useColor(() => ({ text: toValue(color) }));
|
|
370
|
-
return {
|
|
371
|
-
textColorClasses,
|
|
372
|
-
textColorStyles
|
|
373
|
-
};
|
|
374
|
-
}
|
|
375
|
-
function useBackgroundColor(color) {
|
|
376
|
-
const { colorClasses: backgroundColorClasses, colorStyles: backgroundColorStyles } = useColor(() => ({ background: toValue(color) }));
|
|
377
|
-
return {
|
|
378
|
-
backgroundColorClasses,
|
|
379
|
-
backgroundColorStyles
|
|
380
|
-
};
|
|
381
|
-
}
|
|
382
|
-
function normalizeColors(colors) {
|
|
383
|
-
return {
|
|
384
|
-
text: typeof colors.text === "string" ? colors.text.replace(/^text-/, "") : colors.text,
|
|
385
|
-
background: typeof colors.background === "string" ? colors.background.replace(/^bg-/, "") : colors.background
|
|
386
|
-
};
|
|
387
|
-
}
|
|
388
|
-
function computeColor(colors) {
|
|
389
|
-
const _colors = normalizeColors(toValue(colors));
|
|
390
|
-
const classes = [];
|
|
391
|
-
const styles = {};
|
|
392
|
-
if (_colors.background) {
|
|
393
|
-
if (isCssColor(_colors.background)) {
|
|
394
|
-
styles.backgroundColor = _colors.background;
|
|
395
|
-
if (!_colors.text && isParsableColor(_colors.background)) {
|
|
396
|
-
const backgroundColor = parseColor(_colors.background);
|
|
397
|
-
if (backgroundColor.a == null || backgroundColor.a === 1) classes.push(hasLightForeground(backgroundColor) ? "v-theme-on-dark" : "v-theme-on-light");
|
|
398
|
-
}
|
|
399
|
-
} else classes.push(`bg-${_colors.background}`);
|
|
400
|
-
}
|
|
401
|
-
if (_colors.text) {
|
|
402
|
-
if (isCssColor(_colors.text)) {
|
|
403
|
-
styles.color = _colors.text;
|
|
404
|
-
styles.caretColor = _colors.text;
|
|
405
|
-
} else classes.push(`text-${_colors.text}`);
|
|
406
|
-
}
|
|
407
|
-
return {
|
|
408
|
-
class: classes,
|
|
409
|
-
style: styles
|
|
410
|
-
};
|
|
411
|
-
}
|
|
412
|
-
//#endregion
|
|
413
|
-
//#region ../../../../node_modules/vuetify/lib/composables/transition.js
|
|
414
|
-
var makeTransitionProps = propsFactory({ transition: {
|
|
415
|
-
type: null,
|
|
416
|
-
default: "fade-transition",
|
|
417
|
-
validator: (val) => val !== true
|
|
418
|
-
} }, "transition");
|
|
419
|
-
var MaybeTransition = (props, { slots }) => {
|
|
420
|
-
const { transition, disabled, group, ...rest } = props;
|
|
421
|
-
const { component = group ? TransitionGroup : Transition, ...customProps } = isObject(transition) ? transition : {};
|
|
422
|
-
let transitionProps;
|
|
423
|
-
if (isObject(transition)) transitionProps = mergeProps(customProps, onlyDefinedProps({
|
|
424
|
-
disabled,
|
|
425
|
-
group
|
|
426
|
-
}), rest);
|
|
427
|
-
else transitionProps = mergeProps({ name: disabled || !transition ? "" : transition }, rest);
|
|
428
|
-
return h(component, transitionProps, slots);
|
|
429
|
-
};
|
|
430
|
-
//#endregion
|
|
431
|
-
//#region ../../../../node_modules/vuetify/lib/directives/intersect/index.js
|
|
432
|
-
function mounted$3(el, binding) {
|
|
433
|
-
if (!SUPPORTS_INTERSECTION) return;
|
|
434
|
-
const modifiers = binding.modifiers || {};
|
|
435
|
-
const value = binding.value;
|
|
436
|
-
const { handler, options } = typeof value === "object" ? value : {
|
|
437
|
-
handler: value,
|
|
438
|
-
options: {}
|
|
439
|
-
};
|
|
440
|
-
const observer = new IntersectionObserver((entries = [], observer) => {
|
|
441
|
-
const _observe = el._observe?.[binding.instance.$.uid];
|
|
442
|
-
if (!_observe) return;
|
|
443
|
-
const isIntersecting = entries.some((entry) => entry.isIntersecting);
|
|
444
|
-
if (handler && (!modifiers.quiet || _observe.init) && (!modifiers.once || isIntersecting || _observe.init)) handler(isIntersecting, entries, observer);
|
|
445
|
-
if (isIntersecting && modifiers.once) unmounted$3(el, binding);
|
|
446
|
-
else _observe.init = true;
|
|
447
|
-
}, options);
|
|
448
|
-
el._observe = Object(el._observe);
|
|
449
|
-
el._observe[binding.instance.$.uid] = {
|
|
450
|
-
init: false,
|
|
451
|
-
observer
|
|
452
|
-
};
|
|
453
|
-
observer.observe(el);
|
|
454
|
-
}
|
|
455
|
-
function unmounted$3(el, binding) {
|
|
456
|
-
const observe = el._observe?.[binding.instance.$.uid];
|
|
457
|
-
if (!observe) return;
|
|
458
|
-
observe.observer.unobserve(el);
|
|
459
|
-
delete el._observe[binding.instance.$.uid];
|
|
460
|
-
}
|
|
461
|
-
var Intersect = {
|
|
462
|
-
mounted: mounted$3,
|
|
463
|
-
unmounted: unmounted$3,
|
|
464
|
-
updated: (el, binding) => {
|
|
465
|
-
if (el._observe?.[binding.instance.$.uid]) {
|
|
466
|
-
unmounted$3(el, binding);
|
|
467
|
-
mounted$3(el, binding);
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
};
|
|
471
|
-
//#endregion
|
|
472
|
-
//#region ../../../../node_modules/vuetify/lib/composables/router.js
|
|
473
|
-
function useRoute() {
|
|
474
|
-
const vm = getCurrentInstance("useRoute");
|
|
475
|
-
return computed(() => vm?.proxy?.$route);
|
|
476
|
-
}
|
|
477
|
-
function useRouter() {
|
|
478
|
-
return getCurrentInstance("useRouter")?.proxy?.$router;
|
|
479
|
-
}
|
|
480
|
-
function useLink(props, attrs) {
|
|
481
|
-
const RouterLink = resolveDynamicComponent("RouterLink");
|
|
482
|
-
const isLink = toRef(() => !!(props.href || props.to));
|
|
483
|
-
const isClickable = computed(() => {
|
|
484
|
-
return isLink?.value || hasEvent(attrs, "click") || hasEvent(props, "click");
|
|
485
|
-
});
|
|
486
|
-
if (typeof RouterLink === "string" || !("useLink" in RouterLink)) {
|
|
487
|
-
const href = toRef(() => props.href);
|
|
488
|
-
return {
|
|
489
|
-
isLink,
|
|
490
|
-
isRouterLink: toRef(() => false),
|
|
491
|
-
isClickable,
|
|
492
|
-
href,
|
|
493
|
-
linkProps: reactive({ href }),
|
|
494
|
-
route: toRef(() => void 0),
|
|
495
|
-
navigate: toRef(() => void 0)
|
|
496
|
-
};
|
|
497
|
-
}
|
|
498
|
-
const routerLink = RouterLink.useLink({
|
|
499
|
-
to: toRef(() => props.to || ""),
|
|
500
|
-
replace: toRef(() => props.replace)
|
|
501
|
-
});
|
|
502
|
-
const link = computed(() => props.to ? routerLink : void 0);
|
|
503
|
-
const route = useRoute();
|
|
504
|
-
const isActive = computed(() => {
|
|
505
|
-
if (!link.value) return false;
|
|
506
|
-
if (!props.exact) return link.value.isActive?.value ?? false;
|
|
507
|
-
if (!route.value) return link.value.isExactActive?.value ?? false;
|
|
508
|
-
return link.value.isExactActive?.value && deepEqual(link.value.route.value.query, route.value.query);
|
|
509
|
-
});
|
|
510
|
-
const href = computed(() => props.to ? link.value?.route.value.href : props.href);
|
|
511
|
-
return {
|
|
512
|
-
isLink,
|
|
513
|
-
isRouterLink: toRef(() => !!props.to),
|
|
514
|
-
isClickable,
|
|
515
|
-
isActive,
|
|
516
|
-
route: toRef(() => link.value?.route.value),
|
|
517
|
-
navigate: toRef(() => link.value?.navigate),
|
|
518
|
-
href,
|
|
519
|
-
linkProps: reactive({
|
|
520
|
-
href,
|
|
521
|
-
"aria-current": toRef(() => isActive.value ? "page" : void 0),
|
|
522
|
-
"aria-disabled": toRef(() => props.disabled && isLink.value ? "true" : void 0),
|
|
523
|
-
tabindex: toRef(() => props.disabled && isLink.value ? "-1" : void 0)
|
|
524
|
-
})
|
|
525
|
-
};
|
|
526
|
-
}
|
|
527
|
-
var makeRouterProps = propsFactory({
|
|
528
|
-
href: String,
|
|
529
|
-
replace: Boolean,
|
|
530
|
-
to: [String, Object],
|
|
531
|
-
exact: Boolean
|
|
532
|
-
}, "router");
|
|
533
|
-
var inTransition = false;
|
|
534
|
-
function useBackButton(router, cb) {
|
|
535
|
-
let popped = false;
|
|
536
|
-
let removeBefore;
|
|
537
|
-
let removeAfter;
|
|
538
|
-
if (IN_BROWSER && router?.beforeEach) {
|
|
539
|
-
nextTick(() => {
|
|
540
|
-
window.addEventListener("popstate", onPopstate);
|
|
541
|
-
removeBefore = router.beforeEach((to, from, next) => {
|
|
542
|
-
if (!inTransition) setTimeout(() => popped ? cb(next) : next());
|
|
543
|
-
else popped ? cb(next) : next();
|
|
544
|
-
inTransition = true;
|
|
545
|
-
});
|
|
546
|
-
removeAfter = router?.afterEach(() => {
|
|
547
|
-
inTransition = false;
|
|
548
|
-
});
|
|
549
|
-
});
|
|
550
|
-
onScopeDispose(() => {
|
|
551
|
-
window.removeEventListener("popstate", onPopstate);
|
|
552
|
-
removeBefore?.();
|
|
553
|
-
removeAfter?.();
|
|
554
|
-
});
|
|
555
|
-
}
|
|
556
|
-
function onPopstate(e) {
|
|
557
|
-
if (e.state?.replaced) return;
|
|
558
|
-
popped = true;
|
|
559
|
-
setTimeout(() => popped = false);
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
//#endregion
|
|
563
|
-
//#region ../../../../node_modules/vuetify/lib/directives/ripple/index.js
|
|
564
|
-
var stopSymbol = Symbol("rippleStop");
|
|
565
|
-
var DELAY_RIPPLE = 80;
|
|
566
|
-
function transform(el, value) {
|
|
567
|
-
el.style.transform = value;
|
|
568
|
-
el.style.webkitTransform = value;
|
|
569
|
-
}
|
|
570
|
-
function isTouchEvent(e) {
|
|
571
|
-
return e.constructor.name === "TouchEvent";
|
|
572
|
-
}
|
|
573
|
-
function isKeyboardEvent(e) {
|
|
574
|
-
return e.constructor.name === "KeyboardEvent";
|
|
575
|
-
}
|
|
576
|
-
var calculate = (e, el, value = {}) => {
|
|
577
|
-
let localX = 0;
|
|
578
|
-
let localY = 0;
|
|
579
|
-
if (!isKeyboardEvent(e)) {
|
|
580
|
-
const offset = el.getBoundingClientRect();
|
|
581
|
-
const target = isTouchEvent(e) ? e.touches[e.touches.length - 1] : e;
|
|
582
|
-
localX = target.clientX - offset.left;
|
|
583
|
-
localY = target.clientY - offset.top;
|
|
584
|
-
}
|
|
585
|
-
let radius = 0;
|
|
586
|
-
let scale = .3;
|
|
587
|
-
if (el._ripple?.circle) {
|
|
588
|
-
scale = .15;
|
|
589
|
-
radius = el.clientWidth / 2;
|
|
590
|
-
radius = value.center ? radius : radius + Math.sqrt((localX - radius) ** 2 + (localY - radius) ** 2) / 4;
|
|
591
|
-
} else radius = Math.sqrt(el.clientWidth ** 2 + el.clientHeight ** 2) / 2;
|
|
592
|
-
const centerX = `${(el.clientWidth - radius * 2) / 2}px`;
|
|
593
|
-
const centerY = `${(el.clientHeight - radius * 2) / 2}px`;
|
|
594
|
-
const x = value.center ? centerX : `${localX - radius}px`;
|
|
595
|
-
const y = value.center ? centerY : `${localY - radius}px`;
|
|
596
|
-
return {
|
|
597
|
-
radius,
|
|
598
|
-
scale,
|
|
599
|
-
x,
|
|
600
|
-
y,
|
|
601
|
-
centerX,
|
|
602
|
-
centerY
|
|
603
|
-
};
|
|
604
|
-
};
|
|
605
|
-
var ripples = {
|
|
606
|
-
show(e, el, value = {}) {
|
|
607
|
-
if (!el?._ripple?.enabled) return;
|
|
608
|
-
const container = document.createElement("span");
|
|
609
|
-
const animation = document.createElement("span");
|
|
610
|
-
container.appendChild(animation);
|
|
611
|
-
container.className = "v-ripple__container";
|
|
612
|
-
if (value.class) container.className += ` ${value.class}`;
|
|
613
|
-
const { radius, scale, x, y, centerX, centerY } = calculate(e, el, value);
|
|
614
|
-
const size = `${radius * 2}px`;
|
|
615
|
-
animation.className = "v-ripple__animation";
|
|
616
|
-
animation.style.width = size;
|
|
617
|
-
animation.style.height = size;
|
|
618
|
-
el.appendChild(container);
|
|
619
|
-
const computed = window.getComputedStyle(el);
|
|
620
|
-
if (computed && computed.position === "static") {
|
|
621
|
-
el.style.position = "relative";
|
|
622
|
-
el.dataset.previousPosition = "static";
|
|
623
|
-
}
|
|
624
|
-
animation.classList.add("v-ripple__animation--enter");
|
|
625
|
-
animation.classList.add("v-ripple__animation--visible");
|
|
626
|
-
transform(animation, `translate(${x}, ${y}) scale3d(${scale},${scale},${scale})`);
|
|
627
|
-
animation.dataset.activated = String(performance.now());
|
|
628
|
-
requestAnimationFrame(() => {
|
|
629
|
-
requestAnimationFrame(() => {
|
|
630
|
-
animation.classList.remove("v-ripple__animation--enter");
|
|
631
|
-
animation.classList.add("v-ripple__animation--in");
|
|
632
|
-
transform(animation, `translate(${centerX}, ${centerY}) scale3d(1,1,1)`);
|
|
633
|
-
});
|
|
634
|
-
});
|
|
635
|
-
},
|
|
636
|
-
hide(el) {
|
|
637
|
-
if (!el?._ripple?.enabled) return;
|
|
638
|
-
const ripples = el.getElementsByClassName("v-ripple__animation");
|
|
639
|
-
if (ripples.length === 0) return;
|
|
640
|
-
const animation = Array.from(ripples).findLast((ripple) => !ripple.dataset.isHiding);
|
|
641
|
-
if (!animation) return;
|
|
642
|
-
else animation.dataset.isHiding = "true";
|
|
643
|
-
const diff = performance.now() - Number(animation.dataset.activated);
|
|
644
|
-
const delay = Math.max(250 - diff, 0);
|
|
645
|
-
setTimeout(() => {
|
|
646
|
-
animation.classList.remove("v-ripple__animation--in");
|
|
647
|
-
animation.classList.add("v-ripple__animation--out");
|
|
648
|
-
setTimeout(() => {
|
|
649
|
-
if (el.getElementsByClassName("v-ripple__animation").length === 1 && el.dataset.previousPosition) {
|
|
650
|
-
el.style.position = el.dataset.previousPosition;
|
|
651
|
-
delete el.dataset.previousPosition;
|
|
652
|
-
}
|
|
653
|
-
if (animation.parentNode?.parentNode === el) el.removeChild(animation.parentNode);
|
|
654
|
-
}, 300);
|
|
655
|
-
}, delay);
|
|
656
|
-
}
|
|
657
|
-
};
|
|
658
|
-
function isRippleEnabled(value) {
|
|
659
|
-
return typeof value === "undefined" || !!value;
|
|
660
|
-
}
|
|
661
|
-
function rippleShow(e) {
|
|
662
|
-
const value = {};
|
|
663
|
-
const element = e.currentTarget;
|
|
664
|
-
if (!element?._ripple || element._ripple.touched || e[stopSymbol]) return;
|
|
665
|
-
e[stopSymbol] = true;
|
|
666
|
-
if (isTouchEvent(e)) {
|
|
667
|
-
element._ripple.touched = true;
|
|
668
|
-
element._ripple.isTouch = true;
|
|
669
|
-
} else if (element._ripple.isTouch) return;
|
|
670
|
-
value.center = element._ripple.centered || isKeyboardEvent(e);
|
|
671
|
-
if (element._ripple.class) value.class = element._ripple.class;
|
|
672
|
-
if (isTouchEvent(e)) {
|
|
673
|
-
if (element._ripple.showTimerCommit) return;
|
|
674
|
-
element._ripple.showTimerCommit = () => {
|
|
675
|
-
ripples.show(e, element, value);
|
|
676
|
-
};
|
|
677
|
-
element._ripple.showTimer = window.setTimeout(() => {
|
|
678
|
-
if (element?._ripple?.showTimerCommit) {
|
|
679
|
-
element._ripple.showTimerCommit();
|
|
680
|
-
element._ripple.showTimerCommit = null;
|
|
681
|
-
}
|
|
682
|
-
}, DELAY_RIPPLE);
|
|
683
|
-
} else ripples.show(e, element, value);
|
|
684
|
-
}
|
|
685
|
-
function rippleStop(e) {
|
|
686
|
-
e[stopSymbol] = true;
|
|
687
|
-
}
|
|
688
|
-
function rippleHide(e) {
|
|
689
|
-
const element = e.currentTarget;
|
|
690
|
-
if (!element?._ripple) return;
|
|
691
|
-
window.clearTimeout(element._ripple.showTimer);
|
|
692
|
-
if (e.type === "touchend" && element._ripple.showTimerCommit) {
|
|
693
|
-
element._ripple.showTimerCommit();
|
|
694
|
-
element._ripple.showTimerCommit = null;
|
|
695
|
-
element._ripple.showTimer = window.setTimeout(() => {
|
|
696
|
-
rippleHide(e);
|
|
697
|
-
});
|
|
698
|
-
return;
|
|
699
|
-
}
|
|
700
|
-
window.setTimeout(() => {
|
|
701
|
-
if (element._ripple) element._ripple.touched = false;
|
|
702
|
-
});
|
|
703
|
-
ripples.hide(element);
|
|
704
|
-
}
|
|
705
|
-
function rippleCancelShow(e) {
|
|
706
|
-
const element = e.currentTarget;
|
|
707
|
-
if (!element?._ripple) return;
|
|
708
|
-
if (element._ripple.showTimerCommit) element._ripple.showTimerCommit = null;
|
|
709
|
-
window.clearTimeout(element._ripple.showTimer);
|
|
710
|
-
}
|
|
711
|
-
var keyboardRipple = false;
|
|
712
|
-
function keyboardRippleShow(e, keys) {
|
|
713
|
-
if (!keyboardRipple && keys.includes(e.key)) {
|
|
714
|
-
keyboardRipple = true;
|
|
715
|
-
rippleShow(e);
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
function keyboardRippleHide(e) {
|
|
719
|
-
keyboardRipple = false;
|
|
720
|
-
rippleHide(e);
|
|
721
|
-
}
|
|
722
|
-
function focusRippleHide(e) {
|
|
723
|
-
if (keyboardRipple) {
|
|
724
|
-
keyboardRipple = false;
|
|
725
|
-
rippleHide(e);
|
|
726
|
-
}
|
|
727
|
-
}
|
|
728
|
-
function updateRipple(el, binding, wasEnabled) {
|
|
729
|
-
const { value, modifiers } = binding;
|
|
730
|
-
const enabled = isRippleEnabled(value);
|
|
731
|
-
if (!enabled) ripples.hide(el);
|
|
732
|
-
el._ripple = el._ripple ?? {};
|
|
733
|
-
el._ripple.enabled = enabled;
|
|
734
|
-
el._ripple.centered = modifiers.center;
|
|
735
|
-
el._ripple.circle = modifiers.circle;
|
|
736
|
-
const bindingValue = isObject(value) ? value : {};
|
|
737
|
-
if (bindingValue.class) el._ripple.class = bindingValue.class;
|
|
738
|
-
const allowedKeys = bindingValue.keys ?? ["Enter", "Space"];
|
|
739
|
-
el._ripple.keyDownHandler = (e) => keyboardRippleShow(e, allowedKeys);
|
|
740
|
-
if (enabled && !wasEnabled) {
|
|
741
|
-
if (modifiers.stop) {
|
|
742
|
-
el.addEventListener("touchstart", rippleStop, { passive: true });
|
|
743
|
-
el.addEventListener("mousedown", rippleStop);
|
|
744
|
-
return;
|
|
745
|
-
}
|
|
746
|
-
el.addEventListener("touchstart", rippleShow, { passive: true });
|
|
747
|
-
el.addEventListener("touchend", rippleHide, { passive: true });
|
|
748
|
-
el.addEventListener("touchmove", rippleCancelShow, { passive: true });
|
|
749
|
-
el.addEventListener("touchcancel", rippleHide);
|
|
750
|
-
el.addEventListener("mousedown", rippleShow);
|
|
751
|
-
el.addEventListener("mouseup", rippleHide);
|
|
752
|
-
el.addEventListener("mouseleave", rippleHide);
|
|
753
|
-
el.addEventListener("keydown", el._ripple.keyDownHandler);
|
|
754
|
-
el.addEventListener("keyup", keyboardRippleHide);
|
|
755
|
-
el.addEventListener("blur", focusRippleHide);
|
|
756
|
-
el.addEventListener("dragstart", rippleHide, { passive: true });
|
|
757
|
-
} else if (!enabled && wasEnabled) removeListeners(el);
|
|
758
|
-
}
|
|
759
|
-
function removeListeners(el) {
|
|
760
|
-
el.removeEventListener("touchstart", rippleStop);
|
|
761
|
-
el.removeEventListener("mousedown", rippleStop);
|
|
762
|
-
el.removeEventListener("touchstart", rippleShow);
|
|
763
|
-
el.removeEventListener("touchend", rippleHide);
|
|
764
|
-
el.removeEventListener("touchmove", rippleCancelShow);
|
|
765
|
-
el.removeEventListener("touchcancel", rippleHide);
|
|
766
|
-
el.removeEventListener("mousedown", rippleShow);
|
|
767
|
-
el.removeEventListener("mouseup", rippleHide);
|
|
768
|
-
el.removeEventListener("mouseleave", rippleHide);
|
|
769
|
-
if (el._ripple?.keyDownHandler) el.removeEventListener("keydown", el._ripple.keyDownHandler);
|
|
770
|
-
el.removeEventListener("keyup", keyboardRippleHide);
|
|
771
|
-
el.removeEventListener("blur", focusRippleHide);
|
|
772
|
-
el.removeEventListener("dragstart", rippleHide);
|
|
773
|
-
}
|
|
774
|
-
function mounted$2(el, binding) {
|
|
775
|
-
updateRipple(el, binding, false);
|
|
776
|
-
}
|
|
777
|
-
function unmounted$2(el) {
|
|
778
|
-
removeListeners(el);
|
|
779
|
-
delete el._ripple;
|
|
780
|
-
}
|
|
781
|
-
function updated(el, binding) {
|
|
782
|
-
if (binding.value === binding.oldValue) return;
|
|
783
|
-
updateRipple(el, binding, isRippleEnabled(binding.oldValue));
|
|
784
|
-
}
|
|
785
|
-
var Ripple = {
|
|
786
|
-
mounted: mounted$2,
|
|
787
|
-
unmounted: unmounted$2,
|
|
788
|
-
updated
|
|
789
|
-
};
|
|
790
|
-
//#endregion
|
|
791
|
-
//#region ../../../../node_modules/vuetify/lib/composables/forwardRefs.js
|
|
792
|
-
var Refs = Symbol("Forwarded refs");
|
|
793
|
-
/** Omit properties starting with P */
|
|
794
|
-
/** Omit keyof $props from T */
|
|
795
|
-
function getDescriptor(obj, key) {
|
|
796
|
-
let currentObj = obj;
|
|
797
|
-
while (currentObj) {
|
|
798
|
-
const descriptor = Reflect.getOwnPropertyDescriptor(currentObj, key);
|
|
799
|
-
if (descriptor) return descriptor;
|
|
800
|
-
currentObj = Object.getPrototypeOf(currentObj);
|
|
801
|
-
}
|
|
802
|
-
}
|
|
803
|
-
function forwardRefs(target, ...refs) {
|
|
804
|
-
target[Refs] = refs;
|
|
805
|
-
return new Proxy(target, {
|
|
806
|
-
get(target, key) {
|
|
807
|
-
if (Reflect.has(target, key)) return Reflect.get(target, key);
|
|
808
|
-
if (typeof key === "symbol" || key.startsWith("$") || key.startsWith("__")) return;
|
|
809
|
-
for (const ref of refs) if (ref.value && Reflect.has(ref.value, key)) {
|
|
810
|
-
const val = Reflect.get(ref.value, key);
|
|
811
|
-
return typeof val === "function" ? val.bind(ref.value) : val;
|
|
812
|
-
}
|
|
813
|
-
},
|
|
814
|
-
has(target, key) {
|
|
815
|
-
if (Reflect.has(target, key)) return true;
|
|
816
|
-
if (typeof key === "symbol" || key.startsWith("$") || key.startsWith("__")) return false;
|
|
817
|
-
for (const ref of refs) if (ref.value && Reflect.has(ref.value, key)) return true;
|
|
818
|
-
return false;
|
|
819
|
-
},
|
|
820
|
-
set(target, key, value) {
|
|
821
|
-
if (Reflect.has(target, key)) return Reflect.set(target, key, value);
|
|
822
|
-
if (typeof key === "symbol" || key.startsWith("$") || key.startsWith("__")) return false;
|
|
823
|
-
for (const ref of refs) if (ref.value && Reflect.has(ref.value, key)) return Reflect.set(ref.value, key, value);
|
|
824
|
-
return false;
|
|
825
|
-
},
|
|
826
|
-
getOwnPropertyDescriptor(target, key) {
|
|
827
|
-
const descriptor = Reflect.getOwnPropertyDescriptor(target, key);
|
|
828
|
-
if (descriptor) return descriptor;
|
|
829
|
-
if (typeof key === "symbol" || key.startsWith("$") || key.startsWith("__")) return;
|
|
830
|
-
for (const ref of refs) {
|
|
831
|
-
if (!ref.value) continue;
|
|
832
|
-
const descriptor = getDescriptor(ref.value, key) ?? ("_" in ref.value ? getDescriptor(ref.value._?.setupState, key) : void 0);
|
|
833
|
-
if (descriptor) return descriptor;
|
|
834
|
-
}
|
|
835
|
-
for (const ref of refs) {
|
|
836
|
-
const childRefs = ref.value && ref.value[Refs];
|
|
837
|
-
if (!childRefs) continue;
|
|
838
|
-
const queue = childRefs.slice();
|
|
839
|
-
while (queue.length) {
|
|
840
|
-
const ref = queue.shift();
|
|
841
|
-
const descriptor = getDescriptor(ref.value, key);
|
|
842
|
-
if (descriptor) return descriptor;
|
|
843
|
-
const childRefs = ref.value && ref.value[Refs];
|
|
844
|
-
if (childRefs) queue.push(...childRefs);
|
|
845
|
-
}
|
|
846
|
-
}
|
|
847
|
-
}
|
|
848
|
-
});
|
|
849
|
-
}
|
|
850
|
-
//#endregion
|
|
851
|
-
//#region ../../../../node_modules/vuetify/lib/components/VOverlay/util/point.js
|
|
852
|
-
/** Convert a point in local space to viewport space */
|
|
853
|
-
function elementToViewport(point, offset) {
|
|
854
|
-
return {
|
|
855
|
-
x: point.x + offset.x,
|
|
856
|
-
y: point.y + offset.y
|
|
857
|
-
};
|
|
858
|
-
}
|
|
859
|
-
/** Get the difference between two points */
|
|
860
|
-
function getOffset(a, b) {
|
|
861
|
-
return {
|
|
862
|
-
x: a.x - b.x,
|
|
863
|
-
y: a.y - b.y
|
|
864
|
-
};
|
|
865
|
-
}
|
|
866
|
-
/** Convert an anchor object to a point in local space */
|
|
867
|
-
function anchorToPoint(anchor, box) {
|
|
868
|
-
if (anchor.side === "top" || anchor.side === "bottom") {
|
|
869
|
-
const { side, align } = anchor;
|
|
870
|
-
return elementToViewport({
|
|
871
|
-
x: align === "left" ? 0 : align === "center" ? box.width / 2 : align === "right" ? box.width : align,
|
|
872
|
-
y: side === "top" ? 0 : side === "bottom" ? box.height : side
|
|
873
|
-
}, box);
|
|
874
|
-
} else if (anchor.side === "left" || anchor.side === "right") {
|
|
875
|
-
const { side, align } = anchor;
|
|
876
|
-
return elementToViewport({
|
|
877
|
-
x: side === "left" ? 0 : side === "right" ? box.width : side,
|
|
878
|
-
y: align === "top" ? 0 : align === "center" ? box.height / 2 : align === "bottom" ? box.height : align
|
|
879
|
-
}, box);
|
|
880
|
-
}
|
|
881
|
-
return elementToViewport({
|
|
882
|
-
x: box.width / 2,
|
|
883
|
-
y: box.height / 2
|
|
884
|
-
}, box);
|
|
885
|
-
}
|
|
886
|
-
//#endregion
|
|
887
|
-
//#region ../../../../node_modules/vuetify/lib/components/VOverlay/locationStrategies.js
|
|
888
|
-
var locationStrategies = {
|
|
889
|
-
static: staticLocationStrategy,
|
|
890
|
-
connected: connectedLocationStrategy
|
|
891
|
-
};
|
|
892
|
-
var makeLocationStrategyProps = propsFactory({
|
|
893
|
-
locationStrategy: {
|
|
894
|
-
type: [String, Function],
|
|
895
|
-
default: "static",
|
|
896
|
-
validator: (val) => typeof val === "function" || val in locationStrategies
|
|
897
|
-
},
|
|
898
|
-
location: {
|
|
899
|
-
type: String,
|
|
900
|
-
default: "bottom"
|
|
901
|
-
},
|
|
902
|
-
origin: {
|
|
903
|
-
type: String,
|
|
904
|
-
default: "auto"
|
|
905
|
-
},
|
|
906
|
-
offset: [
|
|
907
|
-
Number,
|
|
908
|
-
String,
|
|
909
|
-
Array
|
|
910
|
-
],
|
|
911
|
-
stickToTarget: Boolean,
|
|
912
|
-
viewportMargin: {
|
|
913
|
-
type: [Number, String],
|
|
914
|
-
default: 12
|
|
915
|
-
}
|
|
916
|
-
}, "VOverlay-location-strategies");
|
|
917
|
-
function useLocationStrategies(props, data) {
|
|
918
|
-
const contentStyles = ref({});
|
|
919
|
-
const updateLocation = ref();
|
|
920
|
-
if (IN_BROWSER) useToggleScope(() => !!(data.isActive.value && props.locationStrategy), (reset) => {
|
|
921
|
-
watch(() => props.locationStrategy, reset);
|
|
922
|
-
onScopeDispose(() => {
|
|
923
|
-
window.removeEventListener("resize", onResize);
|
|
924
|
-
visualViewport?.removeEventListener("resize", onVisualResize);
|
|
925
|
-
visualViewport?.removeEventListener("scroll", onVisualScroll);
|
|
926
|
-
updateLocation.value = void 0;
|
|
927
|
-
});
|
|
928
|
-
window.addEventListener("resize", onResize, { passive: true });
|
|
929
|
-
visualViewport?.addEventListener("resize", onVisualResize, { passive: true });
|
|
930
|
-
visualViewport?.addEventListener("scroll", onVisualScroll, { passive: true });
|
|
931
|
-
if (typeof props.locationStrategy === "function") updateLocation.value = props.locationStrategy(data, props, contentStyles)?.updateLocation;
|
|
932
|
-
else updateLocation.value = locationStrategies[props.locationStrategy](data, props, contentStyles)?.updateLocation;
|
|
933
|
-
});
|
|
934
|
-
function onResize(e) {
|
|
935
|
-
updateLocation.value?.(e);
|
|
936
|
-
}
|
|
937
|
-
function onVisualResize(e) {
|
|
938
|
-
updateLocation.value?.(e);
|
|
939
|
-
}
|
|
940
|
-
function onVisualScroll(e) {
|
|
941
|
-
updateLocation.value?.(e);
|
|
942
|
-
}
|
|
943
|
-
return {
|
|
944
|
-
contentStyles,
|
|
945
|
-
updateLocation
|
|
946
|
-
};
|
|
947
|
-
}
|
|
948
|
-
function staticLocationStrategy() {}
|
|
949
|
-
/** Get size of element ignoring max-width/max-height */
|
|
950
|
-
function getIntrinsicSize(el, isRtl) {
|
|
951
|
-
const contentBox = nullifyTransforms(el);
|
|
952
|
-
if (isRtl) contentBox.x += parseFloat(el.style.right || 0);
|
|
953
|
-
else contentBox.x -= parseFloat(el.style.left || 0);
|
|
954
|
-
contentBox.y -= parseFloat(el.style.top || 0);
|
|
955
|
-
return contentBox;
|
|
956
|
-
}
|
|
957
|
-
function connectedLocationStrategy(data, props, contentStyles) {
|
|
958
|
-
if (Array.isArray(data.target.value) || isFixedPosition(data.target.value)) Object.assign(contentStyles.value, {
|
|
959
|
-
position: "fixed",
|
|
960
|
-
top: 0,
|
|
961
|
-
[data.isRtl.value ? "right" : "left"]: 0
|
|
962
|
-
});
|
|
963
|
-
const { preferredAnchor, preferredOrigin } = destructComputed(() => {
|
|
964
|
-
const parsedAnchor = parseAnchor(props.location, data.isRtl.value);
|
|
965
|
-
const parsedOrigin = props.origin === "overlap" ? parsedAnchor : props.origin === "auto" ? flipSide(parsedAnchor) : parseAnchor(props.origin, data.isRtl.value);
|
|
966
|
-
if (parsedAnchor.side === parsedOrigin.side && parsedAnchor.align === flipAlign(parsedOrigin).align) return {
|
|
967
|
-
preferredAnchor: flipCorner(parsedAnchor),
|
|
968
|
-
preferredOrigin: flipCorner(parsedOrigin)
|
|
969
|
-
};
|
|
970
|
-
else return {
|
|
971
|
-
preferredAnchor: parsedAnchor,
|
|
972
|
-
preferredOrigin: parsedOrigin
|
|
973
|
-
};
|
|
974
|
-
});
|
|
975
|
-
const [minWidth, minHeight, maxWidth, maxHeight] = [
|
|
976
|
-
"minWidth",
|
|
977
|
-
"minHeight",
|
|
978
|
-
"maxWidth",
|
|
979
|
-
"maxHeight"
|
|
980
|
-
].map((key) => {
|
|
981
|
-
return computed(() => {
|
|
982
|
-
const val = parseFloat(props[key]);
|
|
983
|
-
return isNaN(val) ? Infinity : val;
|
|
984
|
-
});
|
|
985
|
-
});
|
|
986
|
-
const offset = computed(() => {
|
|
987
|
-
if (Array.isArray(props.offset)) return props.offset;
|
|
988
|
-
if (typeof props.offset === "string") {
|
|
989
|
-
const offset = props.offset.split(" ").map(parseFloat);
|
|
990
|
-
if (offset.length < 2) offset.push(0);
|
|
991
|
-
return offset;
|
|
992
|
-
}
|
|
993
|
-
return typeof props.offset === "number" ? [props.offset, 0] : [0, 0];
|
|
994
|
-
});
|
|
995
|
-
let observe = false;
|
|
996
|
-
let lastFrame = -1;
|
|
997
|
-
const flipped = new CircularBuffer(4);
|
|
998
|
-
const observer = new ResizeObserver(() => {
|
|
999
|
-
if (!observe) return;
|
|
1000
|
-
requestAnimationFrame((newTime) => {
|
|
1001
|
-
if (newTime !== lastFrame) flipped.clear();
|
|
1002
|
-
requestAnimationFrame((newNewTime) => {
|
|
1003
|
-
lastFrame = newNewTime;
|
|
1004
|
-
});
|
|
1005
|
-
});
|
|
1006
|
-
if (flipped.isFull) {
|
|
1007
|
-
const values = flipped.values();
|
|
1008
|
-
if (deepEqual(values.at(-1), values.at(-3)) && !deepEqual(values.at(-1), values.at(-2))) return;
|
|
1009
|
-
}
|
|
1010
|
-
const result = updateLocation();
|
|
1011
|
-
if (result) flipped.push(result.flipped);
|
|
1012
|
-
});
|
|
1013
|
-
let targetBox = new Box({
|
|
1014
|
-
x: 0,
|
|
1015
|
-
y: 0,
|
|
1016
|
-
width: 0,
|
|
1017
|
-
height: 0
|
|
1018
|
-
});
|
|
1019
|
-
watch(data.target, (newTarget, oldTarget) => {
|
|
1020
|
-
if (oldTarget && !Array.isArray(oldTarget)) observer.unobserve(oldTarget);
|
|
1021
|
-
if (!Array.isArray(newTarget)) {
|
|
1022
|
-
if (newTarget) observer.observe(newTarget);
|
|
1023
|
-
} else if (!deepEqual(newTarget, oldTarget)) updateLocation();
|
|
1024
|
-
}, { immediate: true });
|
|
1025
|
-
watch(data.contentEl, (newContentEl, oldContentEl) => {
|
|
1026
|
-
if (oldContentEl) observer.unobserve(oldContentEl);
|
|
1027
|
-
if (newContentEl) observer.observe(newContentEl);
|
|
1028
|
-
}, { immediate: true });
|
|
1029
|
-
onScopeDispose(() => {
|
|
1030
|
-
observer.disconnect();
|
|
1031
|
-
});
|
|
1032
|
-
function updateLocation() {
|
|
1033
|
-
observe = false;
|
|
1034
|
-
requestAnimationFrame(() => observe = true);
|
|
1035
|
-
if (!data.target.value || !data.contentEl.value) return;
|
|
1036
|
-
if (Array.isArray(data.target.value) || data.target.value.offsetParent || data.target.value.getClientRects().length) targetBox = getTargetBox(data.target.value);
|
|
1037
|
-
const contentBox = getIntrinsicSize(data.contentEl.value, data.isRtl.value);
|
|
1038
|
-
const scrollParents = getScrollParents(data.contentEl.value);
|
|
1039
|
-
const viewportMargin = Number(props.viewportMargin);
|
|
1040
|
-
if (!scrollParents.length) {
|
|
1041
|
-
scrollParents.push(document.documentElement);
|
|
1042
|
-
if (!(data.contentEl.value.style.top && data.contentEl.value.style.left)) {
|
|
1043
|
-
contentBox.x -= parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-x") || 0);
|
|
1044
|
-
contentBox.y -= parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-y") || 0);
|
|
1045
|
-
}
|
|
1046
|
-
}
|
|
1047
|
-
const viewport = scrollParents.reduce((box, el) => {
|
|
1048
|
-
const scrollBox = getElementBox(el);
|
|
1049
|
-
if (box) return new Box({
|
|
1050
|
-
x: Math.max(box.left, scrollBox.left),
|
|
1051
|
-
y: Math.max(box.top, scrollBox.top),
|
|
1052
|
-
width: Math.min(box.right, scrollBox.right) - Math.max(box.left, scrollBox.left),
|
|
1053
|
-
height: Math.min(box.bottom, scrollBox.bottom) - Math.max(box.top, scrollBox.top)
|
|
1054
|
-
});
|
|
1055
|
-
return scrollBox;
|
|
1056
|
-
}, void 0);
|
|
1057
|
-
if (props.stickToTarget) {
|
|
1058
|
-
viewport.x += Math.min(viewportMargin, targetBox.x);
|
|
1059
|
-
viewport.y += Math.min(viewportMargin, targetBox.y);
|
|
1060
|
-
viewport.width = Math.max(viewport.width - viewportMargin * 2, targetBox.x + targetBox.width - viewportMargin);
|
|
1061
|
-
viewport.height = Math.max(viewport.height - viewportMargin * 2, targetBox.y + targetBox.height - viewportMargin);
|
|
1062
|
-
} else {
|
|
1063
|
-
viewport.x += viewportMargin;
|
|
1064
|
-
viewport.y += viewportMargin;
|
|
1065
|
-
viewport.width -= viewportMargin * 2;
|
|
1066
|
-
viewport.height -= viewportMargin * 2;
|
|
1067
|
-
}
|
|
1068
|
-
let placement = {
|
|
1069
|
-
anchor: preferredAnchor.value,
|
|
1070
|
-
origin: preferredOrigin.value
|
|
1071
|
-
};
|
|
1072
|
-
function checkOverflow(_placement) {
|
|
1073
|
-
const box = new Box(contentBox);
|
|
1074
|
-
let { x, y } = getOffset(anchorToPoint(_placement.anchor, targetBox), anchorToPoint(_placement.origin, box));
|
|
1075
|
-
switch (_placement.anchor.side) {
|
|
1076
|
-
case "top":
|
|
1077
|
-
y -= offset.value[0];
|
|
1078
|
-
break;
|
|
1079
|
-
case "bottom":
|
|
1080
|
-
y += offset.value[0];
|
|
1081
|
-
break;
|
|
1082
|
-
case "left":
|
|
1083
|
-
x -= offset.value[0];
|
|
1084
|
-
break;
|
|
1085
|
-
case "right": x += offset.value[0];
|
|
1086
|
-
}
|
|
1087
|
-
switch (_placement.anchor.align) {
|
|
1088
|
-
case "top":
|
|
1089
|
-
y -= offset.value[1];
|
|
1090
|
-
break;
|
|
1091
|
-
case "bottom":
|
|
1092
|
-
y += offset.value[1];
|
|
1093
|
-
break;
|
|
1094
|
-
case "left":
|
|
1095
|
-
x -= offset.value[1];
|
|
1096
|
-
break;
|
|
1097
|
-
case "right": x += offset.value[1];
|
|
1098
|
-
}
|
|
1099
|
-
box.x += x;
|
|
1100
|
-
box.y += y;
|
|
1101
|
-
box.width = Math.min(box.width, maxWidth.value);
|
|
1102
|
-
box.height = Math.min(box.height, maxHeight.value);
|
|
1103
|
-
return {
|
|
1104
|
-
overflows: getOverflow(box, viewport),
|
|
1105
|
-
x,
|
|
1106
|
-
y
|
|
1107
|
-
};
|
|
1108
|
-
}
|
|
1109
|
-
let x = 0;
|
|
1110
|
-
let y = 0;
|
|
1111
|
-
const available = {
|
|
1112
|
-
x: 0,
|
|
1113
|
-
y: 0
|
|
1114
|
-
};
|
|
1115
|
-
const flipped = {
|
|
1116
|
-
x: false,
|
|
1117
|
-
y: false
|
|
1118
|
-
};
|
|
1119
|
-
let resets = -1;
|
|
1120
|
-
while (true) {
|
|
1121
|
-
if (resets++ > 10) {
|
|
1122
|
-
consoleError("Infinite loop detected in connectedLocationStrategy");
|
|
1123
|
-
break;
|
|
1124
|
-
}
|
|
1125
|
-
const { x: _x, y: _y, overflows } = checkOverflow(placement);
|
|
1126
|
-
x += _x;
|
|
1127
|
-
y += _y;
|
|
1128
|
-
contentBox.x += _x;
|
|
1129
|
-
contentBox.y += _y;
|
|
1130
|
-
{
|
|
1131
|
-
const axis = getAxis(placement.anchor);
|
|
1132
|
-
const hasOverflowX = overflows.x.before || overflows.x.after;
|
|
1133
|
-
const hasOverflowY = overflows.y.before || overflows.y.after;
|
|
1134
|
-
let reset = false;
|
|
1135
|
-
["x", "y"].forEach((key) => {
|
|
1136
|
-
if (key === "x" && hasOverflowX && !flipped.x || key === "y" && hasOverflowY && !flipped.y) {
|
|
1137
|
-
const newPlacement = {
|
|
1138
|
-
anchor: { ...placement.anchor },
|
|
1139
|
-
origin: { ...placement.origin }
|
|
1140
|
-
};
|
|
1141
|
-
const flip = key === "x" ? axis === "y" ? flipAlign : flipSide : axis === "y" ? flipSide : flipAlign;
|
|
1142
|
-
newPlacement.anchor = flip(newPlacement.anchor);
|
|
1143
|
-
newPlacement.origin = flip(newPlacement.origin);
|
|
1144
|
-
const { overflows: newOverflows } = checkOverflow(newPlacement);
|
|
1145
|
-
if (newOverflows[key].before <= overflows[key].before && newOverflows[key].after <= overflows[key].after || newOverflows[key].before + newOverflows[key].after < (overflows[key].before + overflows[key].after) / 2) {
|
|
1146
|
-
placement = newPlacement;
|
|
1147
|
-
reset = flipped[key] = true;
|
|
1148
|
-
}
|
|
1149
|
-
}
|
|
1150
|
-
});
|
|
1151
|
-
if (reset) continue;
|
|
1152
|
-
}
|
|
1153
|
-
if (overflows.x.before) {
|
|
1154
|
-
x += overflows.x.before;
|
|
1155
|
-
contentBox.x += overflows.x.before;
|
|
1156
|
-
}
|
|
1157
|
-
if (overflows.x.after) {
|
|
1158
|
-
x -= overflows.x.after;
|
|
1159
|
-
contentBox.x -= overflows.x.after;
|
|
1160
|
-
}
|
|
1161
|
-
if (overflows.y.before) {
|
|
1162
|
-
y += overflows.y.before;
|
|
1163
|
-
contentBox.y += overflows.y.before;
|
|
1164
|
-
}
|
|
1165
|
-
if (overflows.y.after) {
|
|
1166
|
-
y -= overflows.y.after;
|
|
1167
|
-
contentBox.y -= overflows.y.after;
|
|
1168
|
-
}
|
|
1169
|
-
{
|
|
1170
|
-
const overflows = getOverflow(contentBox, viewport);
|
|
1171
|
-
available.x = viewport.width - overflows.x.before - overflows.x.after;
|
|
1172
|
-
available.y = viewport.height - overflows.y.before - overflows.y.after;
|
|
1173
|
-
x += overflows.x.before;
|
|
1174
|
-
contentBox.x += overflows.x.before;
|
|
1175
|
-
y += overflows.y.before;
|
|
1176
|
-
contentBox.y += overflows.y.before;
|
|
1177
|
-
}
|
|
1178
|
-
break;
|
|
1179
|
-
}
|
|
1180
|
-
const axis = getAxis(placement.anchor);
|
|
1181
|
-
Object.assign(contentStyles.value, {
|
|
1182
|
-
"--v-overlay-anchor-origin": `${placement.anchor.side} ${placement.anchor.align}`,
|
|
1183
|
-
transformOrigin: `${placement.origin.side} ${placement.origin.align}`,
|
|
1184
|
-
top: convertToUnit(pixelRound(y)),
|
|
1185
|
-
left: data.isRtl.value ? void 0 : convertToUnit(pixelRound(x)),
|
|
1186
|
-
right: data.isRtl.value ? convertToUnit(pixelRound(-x)) : void 0,
|
|
1187
|
-
minWidth: convertToUnit(axis === "y" ? Math.min(minWidth.value, targetBox.width) : minWidth.value),
|
|
1188
|
-
maxWidth: convertToUnit(pixelCeil(clamp(available.x, minWidth.value === Infinity ? 0 : minWidth.value, maxWidth.value))),
|
|
1189
|
-
maxHeight: convertToUnit(pixelCeil(clamp(available.y, minHeight.value === Infinity ? 0 : minHeight.value, maxHeight.value)))
|
|
1190
|
-
});
|
|
1191
|
-
return {
|
|
1192
|
-
available,
|
|
1193
|
-
contentBox,
|
|
1194
|
-
flipped
|
|
1195
|
-
};
|
|
1196
|
-
}
|
|
1197
|
-
watch(() => [
|
|
1198
|
-
preferredAnchor.value,
|
|
1199
|
-
preferredOrigin.value,
|
|
1200
|
-
props.offset,
|
|
1201
|
-
props.minWidth,
|
|
1202
|
-
props.minHeight,
|
|
1203
|
-
props.maxWidth,
|
|
1204
|
-
props.maxHeight
|
|
1205
|
-
], () => updateLocation());
|
|
1206
|
-
nextTick(() => {
|
|
1207
|
-
const result = updateLocation();
|
|
1208
|
-
if (!result) return;
|
|
1209
|
-
const { available, contentBox } = result;
|
|
1210
|
-
if (contentBox.height > available.y) requestAnimationFrame(() => {
|
|
1211
|
-
updateLocation();
|
|
1212
|
-
requestAnimationFrame(() => {
|
|
1213
|
-
updateLocation();
|
|
1214
|
-
});
|
|
1215
|
-
});
|
|
1216
|
-
});
|
|
1217
|
-
return { updateLocation };
|
|
1218
|
-
}
|
|
1219
|
-
function pixelRound(val) {
|
|
1220
|
-
return Math.round(val * devicePixelRatio) / devicePixelRatio;
|
|
1221
|
-
}
|
|
1222
|
-
function pixelCeil(val) {
|
|
1223
|
-
return Math.ceil(val * devicePixelRatio) / devicePixelRatio;
|
|
1224
|
-
}
|
|
1225
|
-
//#endregion
|
|
1226
|
-
//#region ../../../../node_modules/vuetify/lib/components/VOverlay/requestNewFrame.js
|
|
1227
|
-
var clean = true;
|
|
1228
|
-
var frames = [];
|
|
1229
|
-
/**
|
|
1230
|
-
* Schedule a task to run in an animation frame on its own
|
|
1231
|
-
* This is useful for heavy tasks that may cause jank if all ran together
|
|
1232
|
-
*/
|
|
1233
|
-
function requestNewFrame(cb) {
|
|
1234
|
-
if (!clean || frames.length) {
|
|
1235
|
-
frames.push(cb);
|
|
1236
|
-
run();
|
|
1237
|
-
} else {
|
|
1238
|
-
clean = false;
|
|
1239
|
-
cb();
|
|
1240
|
-
run();
|
|
1241
|
-
}
|
|
1242
|
-
}
|
|
1243
|
-
var raf = -1;
|
|
1244
|
-
function run() {
|
|
1245
|
-
cancelAnimationFrame(raf);
|
|
1246
|
-
raf = requestAnimationFrame(() => {
|
|
1247
|
-
const frame = frames.shift();
|
|
1248
|
-
if (frame) frame();
|
|
1249
|
-
if (frames.length) run();
|
|
1250
|
-
else clean = true;
|
|
1251
|
-
});
|
|
1252
|
-
}
|
|
1253
|
-
//#endregion
|
|
1254
|
-
//#region ../../../../node_modules/vuetify/lib/components/VOverlay/scrollStrategies.js
|
|
1255
|
-
var scrollStrategies = {
|
|
1256
|
-
none: null,
|
|
1257
|
-
close: closeScrollStrategy,
|
|
1258
|
-
block: blockScrollStrategy,
|
|
1259
|
-
reposition: repositionScrollStrategy
|
|
1260
|
-
};
|
|
1261
|
-
var makeScrollStrategyProps = propsFactory({ scrollStrategy: {
|
|
1262
|
-
type: [String, Function],
|
|
1263
|
-
default: "block",
|
|
1264
|
-
validator: (val) => typeof val === "function" || val in scrollStrategies
|
|
1265
|
-
} }, "VOverlay-scroll-strategies");
|
|
1266
|
-
function useScrollStrategies(props, data) {
|
|
1267
|
-
if (!IN_BROWSER) return;
|
|
1268
|
-
let scope;
|
|
1269
|
-
watchEffect(async () => {
|
|
1270
|
-
scope?.stop();
|
|
1271
|
-
if (!(data.isActive.value && props.scrollStrategy)) return;
|
|
1272
|
-
scope = effectScope();
|
|
1273
|
-
await new Promise((resolve) => setTimeout(resolve));
|
|
1274
|
-
scope.active && scope.run(() => {
|
|
1275
|
-
if (typeof props.scrollStrategy === "function") props.scrollStrategy(data, props, scope);
|
|
1276
|
-
else scrollStrategies[props.scrollStrategy]?.(data, props, scope);
|
|
1277
|
-
});
|
|
1278
|
-
});
|
|
1279
|
-
onScopeDispose(() => {
|
|
1280
|
-
scope?.stop();
|
|
1281
|
-
});
|
|
1282
|
-
}
|
|
1283
|
-
function closeScrollStrategy(data) {
|
|
1284
|
-
function onScroll(e) {
|
|
1285
|
-
data.isActive.value = false;
|
|
1286
|
-
}
|
|
1287
|
-
bindScroll(getTargetEl(data.target.value, data.contentEl.value), onScroll);
|
|
1288
|
-
}
|
|
1289
|
-
function blockScrollStrategy(data, props) {
|
|
1290
|
-
const offsetParent = data.root.value?.offsetParent;
|
|
1291
|
-
const target = getTargetEl(data.target.value, data.contentEl.value);
|
|
1292
|
-
const scrollElements = [.../* @__PURE__ */ new Set([...getScrollParents(target, props.contained ? offsetParent : void 0), ...getScrollParents(data.contentEl.value, props.contained ? offsetParent : void 0)])].filter((el) => !el.classList.contains("v-overlay-scroll-blocked"));
|
|
1293
|
-
const scrollbarWidth = window.innerWidth - document.documentElement.offsetWidth;
|
|
1294
|
-
const scrollableParent = ((el) => hasScrollbar(el) && el)(offsetParent || document.documentElement);
|
|
1295
|
-
if (scrollableParent) data.root.value.classList.add("v-overlay--scroll-blocked");
|
|
1296
|
-
scrollElements.forEach((el, i) => {
|
|
1297
|
-
el.style.setProperty("--v-body-scroll-x", convertToUnit(-el.scrollLeft));
|
|
1298
|
-
el.style.setProperty("--v-body-scroll-y", convertToUnit(-el.scrollTop));
|
|
1299
|
-
if (el !== document.documentElement || getComputedStyle(el).overflowY !== "scroll") el.style.setProperty("--v-scrollbar-offset", convertToUnit(scrollbarWidth));
|
|
1300
|
-
el.classList.add("v-overlay-scroll-blocked");
|
|
1301
|
-
});
|
|
1302
|
-
onScopeDispose(() => {
|
|
1303
|
-
scrollElements.forEach((el, i) => {
|
|
1304
|
-
const x = parseFloat(el.style.getPropertyValue("--v-body-scroll-x"));
|
|
1305
|
-
const y = parseFloat(el.style.getPropertyValue("--v-body-scroll-y"));
|
|
1306
|
-
const scrollBehavior = el.style.scrollBehavior;
|
|
1307
|
-
el.style.scrollBehavior = "auto";
|
|
1308
|
-
el.style.removeProperty("--v-body-scroll-x");
|
|
1309
|
-
el.style.removeProperty("--v-body-scroll-y");
|
|
1310
|
-
el.style.removeProperty("--v-scrollbar-offset");
|
|
1311
|
-
el.classList.remove("v-overlay-scroll-blocked");
|
|
1312
|
-
el.scrollLeft = -x;
|
|
1313
|
-
el.scrollTop = -y;
|
|
1314
|
-
el.style.scrollBehavior = scrollBehavior;
|
|
1315
|
-
});
|
|
1316
|
-
if (scrollableParent) data.root.value.classList.remove("v-overlay--scroll-blocked");
|
|
1317
|
-
});
|
|
1318
|
-
}
|
|
1319
|
-
function repositionScrollStrategy(data, props, scope) {
|
|
1320
|
-
let slow = false;
|
|
1321
|
-
let raf = -1;
|
|
1322
|
-
let ric = -1;
|
|
1323
|
-
function update(e) {
|
|
1324
|
-
requestNewFrame(() => {
|
|
1325
|
-
const start = performance.now();
|
|
1326
|
-
data.updateLocation.value?.(e);
|
|
1327
|
-
slow = (performance.now() - start) / (1e3 / 60) > 2;
|
|
1328
|
-
});
|
|
1329
|
-
}
|
|
1330
|
-
ric = (typeof requestIdleCallback === "undefined" ? (cb) => cb() : requestIdleCallback)(() => {
|
|
1331
|
-
scope.run(() => {
|
|
1332
|
-
bindScroll(getTargetEl(data.target.value, data.contentEl.value), (e) => {
|
|
1333
|
-
if (slow) {
|
|
1334
|
-
cancelAnimationFrame(raf);
|
|
1335
|
-
raf = requestAnimationFrame(() => {
|
|
1336
|
-
raf = requestAnimationFrame(() => {
|
|
1337
|
-
update(e);
|
|
1338
|
-
});
|
|
1339
|
-
});
|
|
1340
|
-
} else update(e);
|
|
1341
|
-
});
|
|
1342
|
-
});
|
|
1343
|
-
});
|
|
1344
|
-
onScopeDispose(() => {
|
|
1345
|
-
typeof cancelIdleCallback !== "undefined" && cancelIdleCallback(ric);
|
|
1346
|
-
cancelAnimationFrame(raf);
|
|
1347
|
-
});
|
|
1348
|
-
}
|
|
1349
|
-
function getTargetEl(target, contentEl) {
|
|
1350
|
-
return Array.isArray(target) ? document.elementsFromPoint(...target).find((el) => !contentEl?.contains(el)) : target ?? contentEl;
|
|
1351
|
-
}
|
|
1352
|
-
function bindScroll(el, onScroll) {
|
|
1353
|
-
const scrollElements = [document, ...getScrollParents(el)];
|
|
1354
|
-
scrollElements.forEach((el) => {
|
|
1355
|
-
el.addEventListener("scroll", onScroll, { passive: true });
|
|
1356
|
-
});
|
|
1357
|
-
onScopeDispose(() => {
|
|
1358
|
-
scrollElements.forEach((el) => {
|
|
1359
|
-
el.removeEventListener("scroll", onScroll);
|
|
1360
|
-
});
|
|
1361
|
-
});
|
|
1362
|
-
}
|
|
1363
|
-
//#endregion
|
|
1364
|
-
//#region ../../../../node_modules/vuetify/lib/components/VMenu/shared.js
|
|
1365
|
-
var VMenuSymbol = Symbol.for("vuetify:v-menu");
|
|
1366
|
-
//#endregion
|
|
1367
|
-
//#region ../../../../node_modules/vuetify/lib/composables/delay.js
|
|
1368
|
-
var makeDelayProps = propsFactory({
|
|
1369
|
-
closeDelay: [Number, String],
|
|
1370
|
-
openDelay: [Number, String]
|
|
1371
|
-
}, "delay");
|
|
1372
|
-
function useDelay(props, cb) {
|
|
1373
|
-
let clearDelay = () => {};
|
|
1374
|
-
function runDelay(isOpening, options) {
|
|
1375
|
-
clearDelay?.();
|
|
1376
|
-
const delay = isOpening ? props.openDelay : props.closeDelay;
|
|
1377
|
-
const normalizedDelay = Math.max(options?.minDelay ?? 0, Number(delay ?? 0));
|
|
1378
|
-
return new Promise((resolve) => {
|
|
1379
|
-
clearDelay = defer(normalizedDelay, () => {
|
|
1380
|
-
cb?.(isOpening);
|
|
1381
|
-
resolve(isOpening);
|
|
1382
|
-
});
|
|
1383
|
-
});
|
|
1384
|
-
}
|
|
1385
|
-
function runOpenDelay() {
|
|
1386
|
-
return runDelay(true);
|
|
1387
|
-
}
|
|
1388
|
-
function runCloseDelay(options) {
|
|
1389
|
-
return runDelay(false, options);
|
|
1390
|
-
}
|
|
1391
|
-
return {
|
|
1392
|
-
clearDelay,
|
|
1393
|
-
runOpenDelay,
|
|
1394
|
-
runCloseDelay
|
|
1395
|
-
};
|
|
1396
|
-
}
|
|
1397
|
-
//#endregion
|
|
1398
|
-
//#region ../../../../node_modules/vuetify/lib/components/VOverlay/useActivator.js
|
|
1399
|
-
var makeActivatorProps = propsFactory({
|
|
1400
|
-
target: [String, Object],
|
|
1401
|
-
activator: [String, Object],
|
|
1402
|
-
activatorProps: {
|
|
1403
|
-
type: Object,
|
|
1404
|
-
default: () => ({})
|
|
1405
|
-
},
|
|
1406
|
-
openOnClick: {
|
|
1407
|
-
type: Boolean,
|
|
1408
|
-
default: void 0
|
|
1409
|
-
},
|
|
1410
|
-
openOnHover: Boolean,
|
|
1411
|
-
openOnFocus: {
|
|
1412
|
-
type: Boolean,
|
|
1413
|
-
default: void 0
|
|
1414
|
-
},
|
|
1415
|
-
closeOnContentClick: Boolean,
|
|
1416
|
-
...makeDelayProps()
|
|
1417
|
-
}, "VOverlay-activator");
|
|
1418
|
-
function useActivator(props, { isActive, isTop, contentEl }) {
|
|
1419
|
-
const vm = getCurrentInstance("useActivator");
|
|
1420
|
-
const activatorEl = ref();
|
|
1421
|
-
let isHovered = false;
|
|
1422
|
-
let isFocused = false;
|
|
1423
|
-
let firstEnter = true;
|
|
1424
|
-
const openOnFocus = computed(() => props.openOnFocus || props.openOnFocus == null && props.openOnHover);
|
|
1425
|
-
const openOnClick = computed(() => props.openOnClick || props.openOnClick == null && !props.openOnHover && !openOnFocus.value);
|
|
1426
|
-
const { runOpenDelay, runCloseDelay } = useDelay(props, (value) => {
|
|
1427
|
-
if (value === (props.openOnHover && isHovered || openOnFocus.value && isFocused) && !(props.openOnHover && isActive.value && !isTop.value)) {
|
|
1428
|
-
if (isActive.value !== value) firstEnter = true;
|
|
1429
|
-
isActive.value = value;
|
|
1430
|
-
}
|
|
1431
|
-
});
|
|
1432
|
-
const cursorTarget = ref();
|
|
1433
|
-
const availableEvents = {
|
|
1434
|
-
onClick: (e) => {
|
|
1435
|
-
e.stopPropagation();
|
|
1436
|
-
activatorEl.value = e.currentTarget || e.target;
|
|
1437
|
-
if (!isActive.value) cursorTarget.value = [e.clientX, e.clientY];
|
|
1438
|
-
isActive.value = !isActive.value;
|
|
1439
|
-
},
|
|
1440
|
-
onMouseenter: (e) => {
|
|
1441
|
-
isHovered = true;
|
|
1442
|
-
activatorEl.value = e.currentTarget || e.target;
|
|
1443
|
-
runOpenDelay();
|
|
1444
|
-
},
|
|
1445
|
-
onMouseleave: (e) => {
|
|
1446
|
-
isHovered = false;
|
|
1447
|
-
runCloseDelay();
|
|
1448
|
-
},
|
|
1449
|
-
onFocus: (e) => {
|
|
1450
|
-
if (matchesSelector(e.target, ":focus-visible") === false) return;
|
|
1451
|
-
isFocused = true;
|
|
1452
|
-
e.stopPropagation();
|
|
1453
|
-
activatorEl.value = e.currentTarget || e.target;
|
|
1454
|
-
runOpenDelay();
|
|
1455
|
-
},
|
|
1456
|
-
onBlur: (e) => {
|
|
1457
|
-
isFocused = false;
|
|
1458
|
-
e.stopPropagation();
|
|
1459
|
-
runCloseDelay({ minDelay: 1 });
|
|
1460
|
-
}
|
|
1461
|
-
};
|
|
1462
|
-
const activatorEvents = computed(() => {
|
|
1463
|
-
const events = {};
|
|
1464
|
-
if (openOnClick.value) events.onClick = availableEvents.onClick;
|
|
1465
|
-
if (props.openOnHover) {
|
|
1466
|
-
events.onMouseenter = availableEvents.onMouseenter;
|
|
1467
|
-
events.onMouseleave = availableEvents.onMouseleave;
|
|
1468
|
-
}
|
|
1469
|
-
if (openOnFocus.value) {
|
|
1470
|
-
events.onFocus = availableEvents.onFocus;
|
|
1471
|
-
events.onBlur = availableEvents.onBlur;
|
|
1472
|
-
}
|
|
1473
|
-
return events;
|
|
1474
|
-
});
|
|
1475
|
-
const contentEvents = computed(() => {
|
|
1476
|
-
const events = {};
|
|
1477
|
-
if (props.openOnHover) {
|
|
1478
|
-
events.onMouseenter = () => {
|
|
1479
|
-
isHovered = true;
|
|
1480
|
-
runOpenDelay();
|
|
1481
|
-
};
|
|
1482
|
-
events.onMouseleave = () => {
|
|
1483
|
-
isHovered = false;
|
|
1484
|
-
runCloseDelay();
|
|
1485
|
-
};
|
|
1486
|
-
}
|
|
1487
|
-
if (openOnFocus.value) {
|
|
1488
|
-
events.onFocusin = (e) => {
|
|
1489
|
-
if (!e.target.matches(":focus-visible")) return;
|
|
1490
|
-
isFocused = true;
|
|
1491
|
-
runOpenDelay();
|
|
1492
|
-
};
|
|
1493
|
-
events.onFocusout = () => {
|
|
1494
|
-
isFocused = false;
|
|
1495
|
-
runCloseDelay({ minDelay: 1 });
|
|
1496
|
-
};
|
|
1497
|
-
}
|
|
1498
|
-
if (props.closeOnContentClick) {
|
|
1499
|
-
const menu = inject(VMenuSymbol, null);
|
|
1500
|
-
events.onClick = () => {
|
|
1501
|
-
isActive.value = false;
|
|
1502
|
-
menu?.closeParents();
|
|
1503
|
-
};
|
|
1504
|
-
}
|
|
1505
|
-
return events;
|
|
1506
|
-
});
|
|
1507
|
-
const scrimEvents = computed(() => {
|
|
1508
|
-
const events = {};
|
|
1509
|
-
if (props.openOnHover) {
|
|
1510
|
-
events.onMouseenter = () => {
|
|
1511
|
-
if (firstEnter) {
|
|
1512
|
-
isHovered = true;
|
|
1513
|
-
firstEnter = false;
|
|
1514
|
-
runOpenDelay();
|
|
1515
|
-
}
|
|
1516
|
-
};
|
|
1517
|
-
events.onMouseleave = () => {
|
|
1518
|
-
isHovered = false;
|
|
1519
|
-
runCloseDelay();
|
|
1520
|
-
};
|
|
1521
|
-
}
|
|
1522
|
-
return events;
|
|
1523
|
-
});
|
|
1524
|
-
watch(isTop, (val) => {
|
|
1525
|
-
if (val && (props.openOnHover && !isHovered && (!openOnFocus.value || !isFocused) || openOnFocus.value && !isFocused && (!props.openOnHover || !isHovered)) && !contentEl.value?.contains(document.activeElement)) isActive.value = false;
|
|
1526
|
-
});
|
|
1527
|
-
watch(isActive, (val) => {
|
|
1528
|
-
if (!val) setTimeout(() => {
|
|
1529
|
-
cursorTarget.value = void 0;
|
|
1530
|
-
});
|
|
1531
|
-
}, { flush: "post" });
|
|
1532
|
-
const activatorRef = templateRef();
|
|
1533
|
-
watchEffect(() => {
|
|
1534
|
-
if (!activatorRef.value) return;
|
|
1535
|
-
nextTick(() => {
|
|
1536
|
-
activatorEl.value = activatorRef.el;
|
|
1537
|
-
});
|
|
1538
|
-
});
|
|
1539
|
-
const targetRef = templateRef();
|
|
1540
|
-
const target = computed(() => {
|
|
1541
|
-
if (props.target === "cursor" && cursorTarget.value) return cursorTarget.value;
|
|
1542
|
-
if (targetRef.value) return targetRef.el;
|
|
1543
|
-
return getTarget(props.target, vm) || activatorEl.value;
|
|
1544
|
-
});
|
|
1545
|
-
const targetEl = computed(() => {
|
|
1546
|
-
return Array.isArray(target.value) ? void 0 : target.value;
|
|
1547
|
-
});
|
|
1548
|
-
let scope;
|
|
1549
|
-
watch(() => !!props.activator, (val) => {
|
|
1550
|
-
if (val && IN_BROWSER) {
|
|
1551
|
-
scope = effectScope();
|
|
1552
|
-
scope.run(() => {
|
|
1553
|
-
_useActivator(props, vm, {
|
|
1554
|
-
activatorEl,
|
|
1555
|
-
activatorEvents
|
|
1556
|
-
});
|
|
1557
|
-
});
|
|
1558
|
-
} else if (scope) scope.stop();
|
|
1559
|
-
}, {
|
|
1560
|
-
flush: "post",
|
|
1561
|
-
immediate: true
|
|
1562
|
-
});
|
|
1563
|
-
onScopeDispose(() => {
|
|
1564
|
-
scope?.stop();
|
|
1565
|
-
});
|
|
1566
|
-
return {
|
|
1567
|
-
activatorEl,
|
|
1568
|
-
activatorRef,
|
|
1569
|
-
target,
|
|
1570
|
-
targetEl,
|
|
1571
|
-
targetRef,
|
|
1572
|
-
activatorEvents,
|
|
1573
|
-
contentEvents,
|
|
1574
|
-
scrimEvents
|
|
1575
|
-
};
|
|
1576
|
-
}
|
|
1577
|
-
function _useActivator(props, vm, { activatorEl, activatorEvents }) {
|
|
1578
|
-
watch(() => props.activator, (val, oldVal) => {
|
|
1579
|
-
if (oldVal && val !== oldVal) {
|
|
1580
|
-
const activator = getActivator(oldVal);
|
|
1581
|
-
activator && unbindActivatorProps(activator);
|
|
1582
|
-
}
|
|
1583
|
-
if (val) nextTick(() => bindActivatorProps());
|
|
1584
|
-
}, { immediate: true });
|
|
1585
|
-
watch(() => props.activatorProps, () => {
|
|
1586
|
-
bindActivatorProps();
|
|
1587
|
-
});
|
|
1588
|
-
onScopeDispose(() => {
|
|
1589
|
-
unbindActivatorProps();
|
|
1590
|
-
});
|
|
1591
|
-
function bindActivatorProps(el = getActivator(), _props = props.activatorProps) {
|
|
1592
|
-
if (!el) return;
|
|
1593
|
-
bindProps(el, mergeProps(activatorEvents.value, _props));
|
|
1594
|
-
}
|
|
1595
|
-
function unbindActivatorProps(el = getActivator(), _props = props.activatorProps) {
|
|
1596
|
-
if (!el) return;
|
|
1597
|
-
unbindProps(el, mergeProps(activatorEvents.value, _props));
|
|
1598
|
-
}
|
|
1599
|
-
function getActivator(selector = props.activator) {
|
|
1600
|
-
const activator = getTarget(selector, vm);
|
|
1601
|
-
activatorEl.value = activator?.nodeType === Node.ELEMENT_NODE ? activator : void 0;
|
|
1602
|
-
return activatorEl.value;
|
|
1603
|
-
}
|
|
1604
|
-
}
|
|
1605
|
-
function getTarget(selector, vm) {
|
|
1606
|
-
if (!selector) return;
|
|
1607
|
-
let target;
|
|
1608
|
-
if (selector === "parent") {
|
|
1609
|
-
let el = vm?.proxy?.$el?.parentNode;
|
|
1610
|
-
while (el?.hasAttribute("data-no-activator")) el = el.parentNode;
|
|
1611
|
-
target = el;
|
|
1612
|
-
} else if (typeof selector === "string") target = document.querySelector(selector);
|
|
1613
|
-
else if ("$el" in selector) target = selector.$el;
|
|
1614
|
-
else target = selector;
|
|
1615
|
-
return target;
|
|
1616
|
-
}
|
|
1617
|
-
//#endregion
|
|
1618
|
-
//#region ../../../../node_modules/vuetify/lib/composables/focusTrap.js
|
|
1619
|
-
var makeFocusTrapProps = propsFactory({
|
|
1620
|
-
retainFocus: Boolean,
|
|
1621
|
-
captureFocus: Boolean,
|
|
1622
|
-
/** @deprecated */
|
|
1623
|
-
disableInitialFocus: Boolean
|
|
1624
|
-
}, "focusTrap");
|
|
1625
|
-
var registry = /* @__PURE__ */ new Map();
|
|
1626
|
-
var subscribers = 0;
|
|
1627
|
-
function onKeydown(e) {
|
|
1628
|
-
const activeElement = document.activeElement;
|
|
1629
|
-
if (e.key !== "Tab" || !activeElement) return;
|
|
1630
|
-
const parentTraps = Array.from(registry.values()).filter(({ isActive, contentEl }) => isActive.value && contentEl.value?.contains(activeElement)).map((x) => x.contentEl.value);
|
|
1631
|
-
let closestTrap;
|
|
1632
|
-
let currentParent = activeElement.parentElement;
|
|
1633
|
-
while (currentParent) {
|
|
1634
|
-
if (parentTraps.includes(currentParent)) {
|
|
1635
|
-
closestTrap = currentParent;
|
|
1636
|
-
break;
|
|
1637
|
-
}
|
|
1638
|
-
currentParent = currentParent.parentElement;
|
|
1639
|
-
}
|
|
1640
|
-
if (!closestTrap) return;
|
|
1641
|
-
const focusable = focusableChildren(closestTrap).filter((x) => x.tabIndex >= 0);
|
|
1642
|
-
if (!focusable.length) return;
|
|
1643
|
-
const active = document.activeElement;
|
|
1644
|
-
if (focusable.length === 1 && focusable[0].classList.contains("v-list") && focusable[0].contains(active)) {
|
|
1645
|
-
e.preventDefault();
|
|
1646
|
-
return;
|
|
1647
|
-
}
|
|
1648
|
-
const firstElement = focusable[0];
|
|
1649
|
-
const lastElement = focusable[focusable.length - 1];
|
|
1650
|
-
if (e.shiftKey && (active === firstElement || firstElement.classList.contains("v-list") && firstElement.contains(active))) {
|
|
1651
|
-
e.preventDefault();
|
|
1652
|
-
lastElement.focus();
|
|
1653
|
-
}
|
|
1654
|
-
if (!e.shiftKey && (active === lastElement || lastElement.classList.contains("v-list") && lastElement.contains(active))) {
|
|
1655
|
-
e.preventDefault();
|
|
1656
|
-
firstElement.focus();
|
|
1657
|
-
}
|
|
1658
|
-
}
|
|
1659
|
-
function useFocusTrap(props, { isActive, localTop, activatorEl, contentEl }) {
|
|
1660
|
-
const trapId = Symbol("trap");
|
|
1661
|
-
let focusTrapSuppressed = false;
|
|
1662
|
-
let focusTrapSuppressionTimeout = -1;
|
|
1663
|
-
async function onPointerdown() {
|
|
1664
|
-
focusTrapSuppressed = true;
|
|
1665
|
-
focusTrapSuppressionTimeout = window.setTimeout(() => {
|
|
1666
|
-
focusTrapSuppressed = false;
|
|
1667
|
-
}, 100);
|
|
1668
|
-
}
|
|
1669
|
-
async function captureOnFocus(e) {
|
|
1670
|
-
const before = e.relatedTarget;
|
|
1671
|
-
const after = e.target;
|
|
1672
|
-
document.removeEventListener("pointerdown", onPointerdown);
|
|
1673
|
-
document.removeEventListener("keydown", captureOnKeydown);
|
|
1674
|
-
await nextTick();
|
|
1675
|
-
if (isActive.value && !focusTrapSuppressed && before !== after && contentEl.value && toValue(localTop) && ![document, contentEl.value].includes(after) && !contentEl.value.contains(after)) focusableChildren(contentEl.value)[0]?.focus();
|
|
1676
|
-
}
|
|
1677
|
-
function captureOnKeydown(e) {
|
|
1678
|
-
if (e.key !== "Tab") return;
|
|
1679
|
-
document.removeEventListener("keydown", captureOnKeydown);
|
|
1680
|
-
if (isActive.value && contentEl.value && e.target && !contentEl.value.contains(e.target)) {
|
|
1681
|
-
const allFocusableElements = focusableChildren(document.documentElement);
|
|
1682
|
-
if (e.shiftKey && e.target === allFocusableElements.at(0) || !e.shiftKey && e.target === allFocusableElements.at(-1)) {
|
|
1683
|
-
const focusable = focusableChildren(contentEl.value);
|
|
1684
|
-
if (focusable.length > 0) {
|
|
1685
|
-
e.preventDefault();
|
|
1686
|
-
focusable[0].focus();
|
|
1687
|
-
}
|
|
1688
|
-
}
|
|
1689
|
-
}
|
|
1690
|
-
}
|
|
1691
|
-
const shouldCapture = toRef(() => isActive.value && props.captureFocus && !props.disableInitialFocus);
|
|
1692
|
-
if (IN_BROWSER) {
|
|
1693
|
-
watch(() => props.retainFocus, (val) => {
|
|
1694
|
-
if (val) registry.set(trapId, {
|
|
1695
|
-
isActive,
|
|
1696
|
-
contentEl
|
|
1697
|
-
});
|
|
1698
|
-
else registry.delete(trapId);
|
|
1699
|
-
}, { immediate: true });
|
|
1700
|
-
watch(shouldCapture, (val) => {
|
|
1701
|
-
if (val) {
|
|
1702
|
-
document.addEventListener("pointerdown", onPointerdown);
|
|
1703
|
-
document.addEventListener("focusin", captureOnFocus, { once: true });
|
|
1704
|
-
document.addEventListener("keydown", captureOnKeydown);
|
|
1705
|
-
} else {
|
|
1706
|
-
document.removeEventListener("pointerdown", onPointerdown);
|
|
1707
|
-
document.removeEventListener("focusin", captureOnFocus);
|
|
1708
|
-
document.removeEventListener("keydown", captureOnKeydown);
|
|
1709
|
-
}
|
|
1710
|
-
}, { immediate: true });
|
|
1711
|
-
if (subscribers++ < 1) document.addEventListener("keydown", onKeydown);
|
|
1712
|
-
}
|
|
1713
|
-
onScopeDispose(() => {
|
|
1714
|
-
registry.delete(trapId);
|
|
1715
|
-
clearTimeout(focusTrapSuppressionTimeout);
|
|
1716
|
-
document.removeEventListener("pointerdown", onPointerdown);
|
|
1717
|
-
document.removeEventListener("focusin", captureOnFocus);
|
|
1718
|
-
document.removeEventListener("keydown", captureOnKeydown);
|
|
1719
|
-
if (--subscribers < 1) document.removeEventListener("keydown", onKeydown);
|
|
1720
|
-
});
|
|
1721
|
-
}
|
|
1722
|
-
//#endregion
|
|
1723
|
-
//#region ../../../../node_modules/vuetify/lib/composables/hydration.js
|
|
1724
|
-
function useHydration() {
|
|
1725
|
-
if (!IN_BROWSER) return shallowRef(false);
|
|
1726
|
-
const { ssr } = useDisplay();
|
|
1727
|
-
if (ssr) {
|
|
1728
|
-
const isMounted = shallowRef(false);
|
|
1729
|
-
onMounted(() => {
|
|
1730
|
-
isMounted.value = true;
|
|
1731
|
-
});
|
|
1732
|
-
return isMounted;
|
|
1733
|
-
} else return shallowRef(true);
|
|
1734
|
-
}
|
|
1735
|
-
//#endregion
|
|
1736
|
-
//#region ../../../../node_modules/vuetify/lib/composables/lazy.js
|
|
1737
|
-
var makeLazyProps = propsFactory({ eager: Boolean }, "lazy");
|
|
1738
|
-
function useLazy(props, active) {
|
|
1739
|
-
const isBooted = shallowRef(false);
|
|
1740
|
-
const hasContent = toRef(() => isBooted.value || props.eager || active.value);
|
|
1741
|
-
watch(active, () => isBooted.value = true);
|
|
1742
|
-
function onAfterLeave() {
|
|
1743
|
-
if (!props.eager) isBooted.value = false;
|
|
1744
|
-
}
|
|
1745
|
-
return {
|
|
1746
|
-
isBooted,
|
|
1747
|
-
hasContent,
|
|
1748
|
-
onAfterLeave
|
|
1749
|
-
};
|
|
1750
|
-
}
|
|
1751
|
-
//#endregion
|
|
1752
|
-
//#region ../../../../node_modules/vuetify/lib/composables/scopeId.js
|
|
1753
|
-
function useScopeId() {
|
|
1754
|
-
const scopeId = getCurrentInstance("useScopeId").vnode.scopeId;
|
|
1755
|
-
return { scopeId: scopeId ? { [scopeId]: "" } : void 0 };
|
|
1756
|
-
}
|
|
1757
|
-
//#endregion
|
|
1758
|
-
//#region ../../../../node_modules/vuetify/lib/composables/stack.js
|
|
1759
|
-
var StackSymbol = Symbol.for("vuetify:stack");
|
|
1760
|
-
var globalStack = reactive([]);
|
|
1761
|
-
function useStack(isActive, zIndex, disableGlobalStack) {
|
|
1762
|
-
const vm = getCurrentInstance("useStack");
|
|
1763
|
-
const createStackEntry = !disableGlobalStack;
|
|
1764
|
-
const parent = inject(StackSymbol, void 0);
|
|
1765
|
-
const stack = reactive({ activeChildren: /* @__PURE__ */ new Set() });
|
|
1766
|
-
provide(StackSymbol, stack);
|
|
1767
|
-
const _zIndex = shallowRef(Number(toValue(zIndex)));
|
|
1768
|
-
useToggleScope(isActive, () => {
|
|
1769
|
-
const lastZIndex = globalStack.at(-1)?.[1];
|
|
1770
|
-
_zIndex.value = lastZIndex ? lastZIndex + 10 : Number(toValue(zIndex));
|
|
1771
|
-
if (createStackEntry) globalStack.push([vm.uid, _zIndex.value]);
|
|
1772
|
-
parent?.activeChildren.add(vm.uid);
|
|
1773
|
-
onScopeDispose(() => {
|
|
1774
|
-
if (createStackEntry) {
|
|
1775
|
-
const idx = toRaw(globalStack).findIndex((v) => v[0] === vm.uid);
|
|
1776
|
-
globalStack.splice(idx, 1);
|
|
1777
|
-
}
|
|
1778
|
-
parent?.activeChildren.delete(vm.uid);
|
|
1779
|
-
});
|
|
1780
|
-
});
|
|
1781
|
-
const globalTop = shallowRef(true);
|
|
1782
|
-
if (createStackEntry) watchEffect(() => {
|
|
1783
|
-
const _isTop = globalStack.at(-1)?.[0] === vm.uid;
|
|
1784
|
-
setTimeout(() => globalTop.value = _isTop);
|
|
1785
|
-
});
|
|
1786
|
-
const localTop = toRef(() => !stack.activeChildren.size);
|
|
1787
|
-
return {
|
|
1788
|
-
globalTop: readonly(globalTop),
|
|
1789
|
-
localTop,
|
|
1790
|
-
stackStyles: toRef(() => ({ zIndex: _zIndex.value }))
|
|
1791
|
-
};
|
|
1792
|
-
}
|
|
1793
|
-
//#endregion
|
|
1794
|
-
//#region ../../../../node_modules/vuetify/lib/composables/teleport.js
|
|
1795
|
-
function useTeleport(target) {
|
|
1796
|
-
return { teleportTarget: computed(() => {
|
|
1797
|
-
const _target = target();
|
|
1798
|
-
if (_target === true || !IN_BROWSER) return void 0;
|
|
1799
|
-
const targetElement = _target === false ? document.body : typeof _target === "string" ? document.querySelector(_target) : _target;
|
|
1800
|
-
if (targetElement == null) {
|
|
1801
|
-
warn(`Unable to locate target ${_target}`);
|
|
1802
|
-
return;
|
|
1803
|
-
}
|
|
1804
|
-
let container = [...targetElement.children].find((el) => el.matches(".v-overlay-container"));
|
|
1805
|
-
if (!container) {
|
|
1806
|
-
container = document.createElement("div");
|
|
1807
|
-
container.className = "v-overlay-container";
|
|
1808
|
-
targetElement.appendChild(container);
|
|
1809
|
-
}
|
|
1810
|
-
return container;
|
|
1811
|
-
}) };
|
|
1812
|
-
}
|
|
1813
|
-
//#endregion
|
|
1814
|
-
//#region ../../../../node_modules/vuetify/lib/directives/click-outside/index.js
|
|
1815
|
-
function defaultConditional() {
|
|
1816
|
-
return true;
|
|
1817
|
-
}
|
|
1818
|
-
function checkEvent(e, el, binding) {
|
|
1819
|
-
if (!e || checkIsActive(e, binding) === false) return false;
|
|
1820
|
-
const root = attachedRoot(el);
|
|
1821
|
-
if (typeof ShadowRoot !== "undefined" && root instanceof ShadowRoot && root.host === e.target) return false;
|
|
1822
|
-
const elements = (typeof binding.value === "object" && binding.value.include || (() => []))();
|
|
1823
|
-
elements.push(el);
|
|
1824
|
-
return !elements.some((el) => el?.contains(e.target));
|
|
1825
|
-
}
|
|
1826
|
-
function checkIsActive(e, binding) {
|
|
1827
|
-
return (typeof binding.value === "object" && binding.value.closeConditional || defaultConditional)(e);
|
|
1828
|
-
}
|
|
1829
|
-
function directive(e, el, binding) {
|
|
1830
|
-
const handler = typeof binding.value === "function" ? binding.value : binding.value.handler;
|
|
1831
|
-
e.shadowTarget = e.target;
|
|
1832
|
-
el._clickOutside.lastMousedownWasOutside && checkEvent(e, el, binding) && setTimeout(() => {
|
|
1833
|
-
checkIsActive(e, binding) && handler && handler(e);
|
|
1834
|
-
}, 0);
|
|
1835
|
-
}
|
|
1836
|
-
function handleShadow(el, callback) {
|
|
1837
|
-
const root = attachedRoot(el);
|
|
1838
|
-
callback(document);
|
|
1839
|
-
if (typeof ShadowRoot !== "undefined" && root instanceof ShadowRoot) callback(root);
|
|
1840
|
-
}
|
|
1841
|
-
var ClickOutside = {
|
|
1842
|
-
mounted(el, binding) {
|
|
1843
|
-
const onClick = (e) => directive(e, el, binding);
|
|
1844
|
-
const onMousedown = (e) => {
|
|
1845
|
-
el._clickOutside.lastMousedownWasOutside = checkEvent(e, el, binding);
|
|
1846
|
-
};
|
|
1847
|
-
handleShadow(el, (app) => {
|
|
1848
|
-
app.addEventListener("click", onClick, true);
|
|
1849
|
-
app.addEventListener("mousedown", onMousedown, true);
|
|
1850
|
-
});
|
|
1851
|
-
if (!el._clickOutside) el._clickOutside = { lastMousedownWasOutside: false };
|
|
1852
|
-
el._clickOutside[binding.instance.$.uid] = {
|
|
1853
|
-
onClick,
|
|
1854
|
-
onMousedown
|
|
1855
|
-
};
|
|
1856
|
-
},
|
|
1857
|
-
beforeUnmount(el, binding) {
|
|
1858
|
-
if (!el._clickOutside) return;
|
|
1859
|
-
handleShadow(el, (app) => {
|
|
1860
|
-
if (!app || !el._clickOutside?.[binding.instance.$.uid]) return;
|
|
1861
|
-
const { onClick, onMousedown } = el._clickOutside[binding.instance.$.uid];
|
|
1862
|
-
app.removeEventListener("click", onClick, true);
|
|
1863
|
-
app.removeEventListener("mousedown", onMousedown, true);
|
|
1864
|
-
});
|
|
1865
|
-
delete el._clickOutside[binding.instance.$.uid];
|
|
1866
|
-
}
|
|
1867
|
-
};
|
|
1868
|
-
//#endregion
|
|
1869
|
-
//#region ../../../../node_modules/vuetify/lib/components/VOverlay/VOverlay.js
|
|
1870
|
-
function Scrim(props) {
|
|
1871
|
-
const { modelValue, color, ...rest } = props;
|
|
1872
|
-
return createVNode(Transition, {
|
|
1873
|
-
"name": "fade-transition",
|
|
1874
|
-
"appear": true
|
|
1875
|
-
}, { default: () => [props.modelValue && createBaseVNode("div", mergeProps({
|
|
1876
|
-
"class": ["v-overlay__scrim", props.color.backgroundColorClasses.value],
|
|
1877
|
-
"style": props.color.backgroundColorStyles.value
|
|
1878
|
-
}, rest), null)] });
|
|
1879
|
-
}
|
|
1880
|
-
var makeVOverlayProps = propsFactory({
|
|
1881
|
-
absolute: Boolean,
|
|
1882
|
-
attach: [
|
|
1883
|
-
Boolean,
|
|
1884
|
-
String,
|
|
1885
|
-
Object
|
|
1886
|
-
],
|
|
1887
|
-
closeOnBack: {
|
|
1888
|
-
type: Boolean,
|
|
1889
|
-
default: true
|
|
1890
|
-
},
|
|
1891
|
-
contained: Boolean,
|
|
1892
|
-
contentClass: null,
|
|
1893
|
-
contentProps: null,
|
|
1894
|
-
disabled: Boolean,
|
|
1895
|
-
opacity: [Number, String],
|
|
1896
|
-
noClickAnimation: Boolean,
|
|
1897
|
-
modelValue: Boolean,
|
|
1898
|
-
persistent: Boolean,
|
|
1899
|
-
scrim: {
|
|
1900
|
-
type: [Boolean, String],
|
|
1901
|
-
default: true
|
|
1902
|
-
},
|
|
1903
|
-
zIndex: {
|
|
1904
|
-
type: [Number, String],
|
|
1905
|
-
default: 2e3
|
|
1906
|
-
},
|
|
1907
|
-
...makeActivatorProps(),
|
|
1908
|
-
...makeComponentProps(),
|
|
1909
|
-
...makeDimensionProps(),
|
|
1910
|
-
...makeLazyProps(),
|
|
1911
|
-
...makeLocationStrategyProps(),
|
|
1912
|
-
...makeScrollStrategyProps(),
|
|
1913
|
-
...makeFocusTrapProps(),
|
|
1914
|
-
...makeThemeProps(),
|
|
1915
|
-
...makeTransitionProps()
|
|
1916
|
-
}, "VOverlay");
|
|
1917
|
-
var VOverlay = genericComponent()({
|
|
1918
|
-
name: "VOverlay",
|
|
1919
|
-
directives: { vClickOutside: ClickOutside },
|
|
1920
|
-
inheritAttrs: false,
|
|
1921
|
-
props: {
|
|
1922
|
-
_disableGlobalStack: Boolean,
|
|
1923
|
-
...omit(makeVOverlayProps(), ["disableInitialFocus"])
|
|
1924
|
-
},
|
|
1925
|
-
emits: {
|
|
1926
|
-
"click:outside": (e) => true,
|
|
1927
|
-
"update:modelValue": (value) => true,
|
|
1928
|
-
keydown: (e) => true,
|
|
1929
|
-
afterEnter: () => true,
|
|
1930
|
-
afterLeave: () => true
|
|
1931
|
-
},
|
|
1932
|
-
setup(props, { slots, attrs, emit }) {
|
|
1933
|
-
const vm = getCurrentInstance("VOverlay");
|
|
1934
|
-
const root = ref();
|
|
1935
|
-
const scrimEl = ref();
|
|
1936
|
-
const contentEl = ref();
|
|
1937
|
-
const model = useProxiedModel(props, "modelValue");
|
|
1938
|
-
const isActive = computed({
|
|
1939
|
-
get: () => model.value,
|
|
1940
|
-
set: (v) => {
|
|
1941
|
-
if (!(v && props.disabled)) model.value = v;
|
|
1942
|
-
}
|
|
1943
|
-
});
|
|
1944
|
-
const { themeClasses } = provideTheme(props);
|
|
1945
|
-
const { rtlClasses, isRtl } = useRtl();
|
|
1946
|
-
const { hasContent, onAfterLeave: _onAfterLeave } = useLazy(props, isActive);
|
|
1947
|
-
const scrimColor = useBackgroundColor(() => {
|
|
1948
|
-
return typeof props.scrim === "string" ? props.scrim : null;
|
|
1949
|
-
});
|
|
1950
|
-
const { globalTop, localTop, stackStyles } = useStack(isActive, () => props.zIndex, props._disableGlobalStack);
|
|
1951
|
-
const { activatorEl, activatorRef, target, targetEl, targetRef, activatorEvents, contentEvents, scrimEvents } = useActivator(props, {
|
|
1952
|
-
isActive,
|
|
1953
|
-
isTop: localTop,
|
|
1954
|
-
contentEl
|
|
1955
|
-
});
|
|
1956
|
-
const { teleportTarget } = useTeleport(() => {
|
|
1957
|
-
const target = props.attach || props.contained;
|
|
1958
|
-
if (target) return target;
|
|
1959
|
-
const rootNode = activatorEl?.value?.getRootNode() || vm.proxy?.$el?.getRootNode();
|
|
1960
|
-
if (rootNode instanceof ShadowRoot) return rootNode;
|
|
1961
|
-
return false;
|
|
1962
|
-
});
|
|
1963
|
-
const { dimensionStyles } = useDimension(props);
|
|
1964
|
-
const isMounted = useHydration();
|
|
1965
|
-
const { scopeId } = useScopeId();
|
|
1966
|
-
watch(() => props.disabled, (v) => {
|
|
1967
|
-
if (v) isActive.value = false;
|
|
1968
|
-
});
|
|
1969
|
-
const { contentStyles, updateLocation } = useLocationStrategies(props, {
|
|
1970
|
-
isRtl,
|
|
1971
|
-
contentEl,
|
|
1972
|
-
target,
|
|
1973
|
-
isActive
|
|
1974
|
-
});
|
|
1975
|
-
useScrollStrategies(props, {
|
|
1976
|
-
root,
|
|
1977
|
-
contentEl,
|
|
1978
|
-
targetEl,
|
|
1979
|
-
target,
|
|
1980
|
-
isActive,
|
|
1981
|
-
updateLocation
|
|
1982
|
-
});
|
|
1983
|
-
function onClickOutside(e) {
|
|
1984
|
-
emit("click:outside", e);
|
|
1985
|
-
if (!props.persistent) isActive.value = false;
|
|
1986
|
-
else animateClick();
|
|
1987
|
-
}
|
|
1988
|
-
function closeConditional(e) {
|
|
1989
|
-
return isActive.value && localTop.value && (!props.scrim || e.target === scrimEl.value || e instanceof MouseEvent && e.shadowTarget === scrimEl.value);
|
|
1990
|
-
}
|
|
1991
|
-
useFocusTrap(props, {
|
|
1992
|
-
isActive,
|
|
1993
|
-
localTop,
|
|
1994
|
-
contentEl,
|
|
1995
|
-
activatorEl
|
|
1996
|
-
});
|
|
1997
|
-
IN_BROWSER && watch(isActive, (val) => {
|
|
1998
|
-
if (val) window.addEventListener("keydown", onKeydown);
|
|
1999
|
-
else window.removeEventListener("keydown", onKeydown);
|
|
2000
|
-
}, { immediate: true });
|
|
2001
|
-
onBeforeUnmount(() => {
|
|
2002
|
-
if (!IN_BROWSER) return;
|
|
2003
|
-
window.removeEventListener("keydown", onKeydown);
|
|
2004
|
-
});
|
|
2005
|
-
function onKeydown(e) {
|
|
2006
|
-
if (e.key === "Escape" && globalTop.value) {
|
|
2007
|
-
if (!contentEl.value?.contains(document.activeElement)) emit("keydown", e);
|
|
2008
|
-
if (!props.persistent) {
|
|
2009
|
-
isActive.value = false;
|
|
2010
|
-
if (contentEl.value?.contains(document.activeElement)) activatorEl.value?.focus();
|
|
2011
|
-
} else animateClick();
|
|
2012
|
-
}
|
|
2013
|
-
}
|
|
2014
|
-
function onKeydownSelf(e) {
|
|
2015
|
-
if (e.key === "Escape" && !globalTop.value) return;
|
|
2016
|
-
emit("keydown", e);
|
|
2017
|
-
}
|
|
2018
|
-
const router = useRouter();
|
|
2019
|
-
useToggleScope(() => props.closeOnBack, () => {
|
|
2020
|
-
useBackButton(router, (next) => {
|
|
2021
|
-
if (globalTop.value && isActive.value) {
|
|
2022
|
-
next(false);
|
|
2023
|
-
if (!props.persistent) isActive.value = false;
|
|
2024
|
-
else animateClick();
|
|
2025
|
-
} else next();
|
|
2026
|
-
});
|
|
2027
|
-
});
|
|
2028
|
-
const top = ref();
|
|
2029
|
-
watch(() => isActive.value && (props.absolute || props.contained) && teleportTarget.value == null, (val) => {
|
|
2030
|
-
if (val) {
|
|
2031
|
-
const scrollParent = getScrollParent(root.value);
|
|
2032
|
-
if (scrollParent && scrollParent !== document.scrollingElement) top.value = scrollParent.scrollTop;
|
|
2033
|
-
}
|
|
2034
|
-
});
|
|
2035
|
-
function animateClick() {
|
|
2036
|
-
if (props.noClickAnimation) return;
|
|
2037
|
-
contentEl.value && animate(contentEl.value, [
|
|
2038
|
-
{ transformOrigin: "center" },
|
|
2039
|
-
{ transform: "scale(1.03)" },
|
|
2040
|
-
{ transformOrigin: "center" }
|
|
2041
|
-
], {
|
|
2042
|
-
duration: 150,
|
|
2043
|
-
easing: "cubic-bezier(0.4, 0, 0.2, 1)"
|
|
2044
|
-
});
|
|
2045
|
-
}
|
|
2046
|
-
function onAfterEnter() {
|
|
2047
|
-
emit("afterEnter");
|
|
2048
|
-
}
|
|
2049
|
-
function onAfterLeave() {
|
|
2050
|
-
_onAfterLeave();
|
|
2051
|
-
emit("afterLeave");
|
|
2052
|
-
}
|
|
2053
|
-
useRender(() => createBaseVNode(Fragment, null, [slots.activator?.({
|
|
2054
|
-
isActive: isActive.value,
|
|
2055
|
-
targetRef,
|
|
2056
|
-
props: mergeProps({ ref: activatorRef }, activatorEvents.value, props.activatorProps)
|
|
2057
|
-
}), isMounted.value && hasContent.value && createVNode(Teleport, {
|
|
2058
|
-
"disabled": !teleportTarget.value,
|
|
2059
|
-
"to": teleportTarget.value
|
|
2060
|
-
}, { default: () => [createBaseVNode("div", mergeProps({
|
|
2061
|
-
"class": [
|
|
2062
|
-
"v-overlay",
|
|
2063
|
-
{
|
|
2064
|
-
"v-overlay--absolute": props.absolute || props.contained,
|
|
2065
|
-
"v-overlay--active": isActive.value,
|
|
2066
|
-
"v-overlay--contained": props.contained
|
|
2067
|
-
},
|
|
2068
|
-
themeClasses.value,
|
|
2069
|
-
rtlClasses.value,
|
|
2070
|
-
props.class
|
|
2071
|
-
],
|
|
2072
|
-
"style": [
|
|
2073
|
-
stackStyles.value,
|
|
2074
|
-
{
|
|
2075
|
-
"--v-overlay-opacity": props.opacity,
|
|
2076
|
-
top: convertToUnit(top.value)
|
|
2077
|
-
},
|
|
2078
|
-
props.style
|
|
2079
|
-
],
|
|
2080
|
-
"ref": root,
|
|
2081
|
-
"onKeydown": onKeydownSelf
|
|
2082
|
-
}, scopeId, attrs), [createVNode(Scrim, mergeProps({
|
|
2083
|
-
"color": scrimColor,
|
|
2084
|
-
"modelValue": isActive.value && !!props.scrim,
|
|
2085
|
-
"ref": scrimEl
|
|
2086
|
-
}, scrimEvents.value), null), createVNode(MaybeTransition, {
|
|
2087
|
-
"appear": true,
|
|
2088
|
-
"persisted": true,
|
|
2089
|
-
"transition": props.transition,
|
|
2090
|
-
"target": target.value,
|
|
2091
|
-
"onAfterEnter": onAfterEnter,
|
|
2092
|
-
"onAfterLeave": onAfterLeave
|
|
2093
|
-
}, { default: () => [withDirectives(createBaseVNode("div", mergeProps({
|
|
2094
|
-
"ref": contentEl,
|
|
2095
|
-
"class": ["v-overlay__content", props.contentClass],
|
|
2096
|
-
"style": [dimensionStyles.value, contentStyles.value]
|
|
2097
|
-
}, contentEvents.value, props.contentProps), [slots.default?.({ isActive })]), [[vShow, isActive.value], [ClickOutside, {
|
|
2098
|
-
handler: onClickOutside,
|
|
2099
|
-
closeConditional,
|
|
2100
|
-
include: () => [activatorEl.value]
|
|
2101
|
-
}]])] })])] })]));
|
|
2102
|
-
return {
|
|
2103
|
-
activatorEl,
|
|
2104
|
-
scrimEl,
|
|
2105
|
-
target,
|
|
2106
|
-
animateClick,
|
|
2107
|
-
contentEl,
|
|
2108
|
-
rootEl: root,
|
|
2109
|
-
globalTop,
|
|
2110
|
-
localTop,
|
|
2111
|
-
updateLocation
|
|
2112
|
-
};
|
|
2113
|
-
}
|
|
2114
|
-
});
|
|
2115
|
-
//#endregion
|
|
2116
|
-
//#region ../../../../node_modules/vuetify/lib/directives/resize/index.js
|
|
2117
|
-
function mounted$1(el, binding) {
|
|
2118
|
-
const handler = binding.value;
|
|
2119
|
-
const options = { passive: !binding.modifiers?.active };
|
|
2120
|
-
window.addEventListener("resize", handler, options);
|
|
2121
|
-
el._onResize = Object(el._onResize);
|
|
2122
|
-
el._onResize[binding.instance.$.uid] = {
|
|
2123
|
-
handler,
|
|
2124
|
-
options
|
|
2125
|
-
};
|
|
2126
|
-
if (!binding.modifiers?.quiet) handler();
|
|
2127
|
-
}
|
|
2128
|
-
function unmounted$1(el, binding) {
|
|
2129
|
-
if (!el._onResize?.[binding.instance.$.uid]) return;
|
|
2130
|
-
const { handler, options } = el._onResize[binding.instance.$.uid];
|
|
2131
|
-
window.removeEventListener("resize", handler, options);
|
|
2132
|
-
delete el._onResize[binding.instance.$.uid];
|
|
2133
|
-
}
|
|
2134
|
-
var Resize = {
|
|
2135
|
-
mounted: mounted$1,
|
|
2136
|
-
unmounted: unmounted$1
|
|
2137
|
-
};
|
|
2138
|
-
//#endregion
|
|
2139
|
-
//#region ../../../../node_modules/vuetify/lib/directives/touch/index.js
|
|
2140
|
-
var handleGesture = (wrapper) => {
|
|
2141
|
-
const { touchstartX, touchendX, touchstartY, touchendY } = wrapper;
|
|
2142
|
-
const dirRatio = .5;
|
|
2143
|
-
const minDistance = 16;
|
|
2144
|
-
wrapper.offsetX = touchendX - touchstartX;
|
|
2145
|
-
wrapper.offsetY = touchendY - touchstartY;
|
|
2146
|
-
if (Math.abs(wrapper.offsetY) < dirRatio * Math.abs(wrapper.offsetX)) {
|
|
2147
|
-
wrapper.left && touchendX < touchstartX - minDistance && wrapper.left(wrapper);
|
|
2148
|
-
wrapper.right && touchendX > touchstartX + minDistance && wrapper.right(wrapper);
|
|
2149
|
-
}
|
|
2150
|
-
if (Math.abs(wrapper.offsetX) < dirRatio * Math.abs(wrapper.offsetY)) {
|
|
2151
|
-
wrapper.up && touchendY < touchstartY - minDistance && wrapper.up(wrapper);
|
|
2152
|
-
wrapper.down && touchendY > touchstartY + minDistance && wrapper.down(wrapper);
|
|
2153
|
-
}
|
|
2154
|
-
};
|
|
2155
|
-
function touchstart(event, wrapper) {
|
|
2156
|
-
const touch = event.changedTouches[0];
|
|
2157
|
-
wrapper.touchstartX = touch.clientX;
|
|
2158
|
-
wrapper.touchstartY = touch.clientY;
|
|
2159
|
-
wrapper.start?.({
|
|
2160
|
-
originalEvent: event,
|
|
2161
|
-
...wrapper
|
|
2162
|
-
});
|
|
2163
|
-
}
|
|
2164
|
-
function touchend(event, wrapper) {
|
|
2165
|
-
const touch = event.changedTouches[0];
|
|
2166
|
-
wrapper.touchendX = touch.clientX;
|
|
2167
|
-
wrapper.touchendY = touch.clientY;
|
|
2168
|
-
wrapper.end?.({
|
|
2169
|
-
originalEvent: event,
|
|
2170
|
-
...wrapper
|
|
2171
|
-
});
|
|
2172
|
-
handleGesture(wrapper);
|
|
2173
|
-
}
|
|
2174
|
-
function touchmove(event, wrapper) {
|
|
2175
|
-
const touch = event.changedTouches[0];
|
|
2176
|
-
wrapper.touchmoveX = touch.clientX;
|
|
2177
|
-
wrapper.touchmoveY = touch.clientY;
|
|
2178
|
-
wrapper.move?.({
|
|
2179
|
-
originalEvent: event,
|
|
2180
|
-
...wrapper
|
|
2181
|
-
});
|
|
2182
|
-
}
|
|
2183
|
-
function createHandlers(value = {}) {
|
|
2184
|
-
const wrapper = {
|
|
2185
|
-
touchstartX: 0,
|
|
2186
|
-
touchstartY: 0,
|
|
2187
|
-
touchendX: 0,
|
|
2188
|
-
touchendY: 0,
|
|
2189
|
-
touchmoveX: 0,
|
|
2190
|
-
touchmoveY: 0,
|
|
2191
|
-
offsetX: 0,
|
|
2192
|
-
offsetY: 0,
|
|
2193
|
-
left: value.left,
|
|
2194
|
-
right: value.right,
|
|
2195
|
-
up: value.up,
|
|
2196
|
-
down: value.down,
|
|
2197
|
-
start: value.start,
|
|
2198
|
-
move: value.move,
|
|
2199
|
-
end: value.end
|
|
2200
|
-
};
|
|
2201
|
-
return {
|
|
2202
|
-
touchstart: (e) => touchstart(e, wrapper),
|
|
2203
|
-
touchend: (e) => touchend(e, wrapper),
|
|
2204
|
-
touchmove: (e) => touchmove(e, wrapper)
|
|
2205
|
-
};
|
|
2206
|
-
}
|
|
2207
|
-
function mounted(el, binding) {
|
|
2208
|
-
const value = binding.value;
|
|
2209
|
-
const target = value?.parent ? el.parentElement : el;
|
|
2210
|
-
const options = value?.options ?? { passive: true };
|
|
2211
|
-
const uid = binding.instance?.$.uid;
|
|
2212
|
-
if (!target || uid === void 0) return;
|
|
2213
|
-
const handlers = createHandlers(binding.value);
|
|
2214
|
-
target._touchHandlers = target._touchHandlers ?? Object.create(null);
|
|
2215
|
-
target._touchHandlers[uid] = handlers;
|
|
2216
|
-
keys(handlers).forEach((eventName) => {
|
|
2217
|
-
target.addEventListener(eventName, handlers[eventName], options);
|
|
2218
|
-
});
|
|
2219
|
-
}
|
|
2220
|
-
function unmounted(el, binding) {
|
|
2221
|
-
const target = binding.value?.parent ? el.parentElement : el;
|
|
2222
|
-
const uid = binding.instance?.$.uid;
|
|
2223
|
-
if (!target?._touchHandlers || uid === void 0) return;
|
|
2224
|
-
const handlers = target._touchHandlers[uid];
|
|
2225
|
-
keys(handlers).forEach((eventName) => {
|
|
2226
|
-
target.removeEventListener(eventName, handlers[eventName]);
|
|
2227
|
-
});
|
|
2228
|
-
delete target._touchHandlers[uid];
|
|
2229
|
-
}
|
|
2230
|
-
var Touch = {
|
|
2231
|
-
mounted,
|
|
2232
|
-
unmounted
|
|
2233
|
-
};
|
|
2234
|
-
//#endregion
|
|
2235
|
-
//#region ../../../../node_modules/vuetify/lib/components/VTooltip/VTooltip.js
|
|
2236
|
-
var makeVTooltipProps = propsFactory({
|
|
2237
|
-
id: String,
|
|
2238
|
-
interactive: Boolean,
|
|
2239
|
-
text: String,
|
|
2240
|
-
...omit(makeVOverlayProps({
|
|
2241
|
-
closeOnBack: false,
|
|
2242
|
-
location: "end",
|
|
2243
|
-
locationStrategy: "connected",
|
|
2244
|
-
eager: true,
|
|
2245
|
-
minWidth: 0,
|
|
2246
|
-
offset: 10,
|
|
2247
|
-
openOnClick: false,
|
|
2248
|
-
openOnHover: true,
|
|
2249
|
-
origin: "auto",
|
|
2250
|
-
scrim: false,
|
|
2251
|
-
scrollStrategy: "reposition",
|
|
2252
|
-
transition: null
|
|
2253
|
-
}), [
|
|
2254
|
-
"absolute",
|
|
2255
|
-
"retainFocus",
|
|
2256
|
-
"captureFocus",
|
|
2257
|
-
"disableInitialFocus"
|
|
2258
|
-
])
|
|
2259
|
-
}, "VTooltip");
|
|
2260
|
-
var VTooltip = genericComponent()({
|
|
2261
|
-
name: "VTooltip",
|
|
2262
|
-
props: makeVTooltipProps(),
|
|
2263
|
-
emits: { "update:modelValue": (value) => true },
|
|
2264
|
-
setup(props, { slots }) {
|
|
2265
|
-
const isActive = useProxiedModel(props, "modelValue");
|
|
2266
|
-
const { scopeId } = useScopeId();
|
|
2267
|
-
const uid = useId();
|
|
2268
|
-
const id = toRef(() => props.id || `v-tooltip-${uid}`);
|
|
2269
|
-
const overlay = ref();
|
|
2270
|
-
const location = computed(() => {
|
|
2271
|
-
return props.location.split(" ").length > 1 ? props.location : props.location + " center";
|
|
2272
|
-
});
|
|
2273
|
-
const origin = computed(() => {
|
|
2274
|
-
return props.origin === "auto" || props.origin === "overlap" || props.origin.split(" ").length > 1 || props.location.split(" ").length > 1 ? props.origin : props.origin + " center";
|
|
2275
|
-
});
|
|
2276
|
-
const transition = toRef(() => {
|
|
2277
|
-
if (props.transition != null) return props.transition;
|
|
2278
|
-
return isActive.value ? "scale-transition" : "fade-transition";
|
|
2279
|
-
});
|
|
2280
|
-
const activatorProps = computed(() => mergeProps({ "aria-describedby": id.value }, props.activatorProps));
|
|
2281
|
-
useRender(() => {
|
|
2282
|
-
const overlayProps = VOverlay.filterProps(props);
|
|
2283
|
-
return createVNode(VOverlay, mergeProps({
|
|
2284
|
-
"ref": overlay,
|
|
2285
|
-
"class": [
|
|
2286
|
-
"v-tooltip",
|
|
2287
|
-
{ "v-tooltip--interactive": props.interactive },
|
|
2288
|
-
props.class
|
|
2289
|
-
],
|
|
2290
|
-
"style": props.style,
|
|
2291
|
-
"id": id.value
|
|
2292
|
-
}, overlayProps, {
|
|
2293
|
-
"modelValue": isActive.value,
|
|
2294
|
-
"onUpdate:modelValue": ($event) => isActive.value = $event,
|
|
2295
|
-
"transition": transition.value,
|
|
2296
|
-
"absolute": true,
|
|
2297
|
-
"location": location.value,
|
|
2298
|
-
"origin": origin.value,
|
|
2299
|
-
"role": "tooltip",
|
|
2300
|
-
"activatorProps": activatorProps.value,
|
|
2301
|
-
"_disableGlobalStack": true
|
|
2302
|
-
}, scopeId), {
|
|
2303
|
-
activator: slots.activator,
|
|
2304
|
-
default: (...args) => slots.default?.(...args) ?? props.text
|
|
2305
|
-
});
|
|
2306
|
-
});
|
|
2307
|
-
return forwardRefs({}, overlay);
|
|
2308
|
-
}
|
|
2309
|
-
});
|
|
2310
|
-
//#endregion
|
|
2311
|
-
export { useRender as A, makeTransitionProps as C, useTextColor as D, useColor as E, nullifyTransforms as F, getTargetBox as I, parseAnchor as L, deepEqual as M, makeComponentProps as N, makeDimensionProps as O, animate as P, toPhysical as R, MaybeTransition as S, useBackgroundColor as T, Ripple as _, makeVOverlayProps as a, useRouter as b, makeLazyProps as c, makeFocusTrapProps as d, useFocusTrap as f, forwardRefs as g, VMenuSymbol as h, VOverlay as i, getScrollParent as j, useDimension as k, useLazy as l, useDelay as m, Touch as n, ClickOutside as o, makeDelayProps as p, Resize as r, useScopeId as s, VTooltip as t, useHydration as u, makeRouterProps as v, computeColor as w, Intersect as x, useLink as y };
|