@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,1214 +0,0 @@
|
|
|
1
|
-
import { Ft as onMounted, Gn as readonly, Kn as ref, Nt as onDeactivated, Qn as toRef, U as computed, Ut as provide, Wn as reactive, Yn as shallowRef, cn as useId, gn as watch, jt as onBeforeUnmount, kt as onActivated, xt as inject } from "./vue.runtime.esm-bundler-YcakWsDn.js";
|
|
2
|
-
import { Z as mergeDeep, _ as clamp, _t as consoleWarn, at as refElement, c as getCurrentInstance, dt as PREFERS_REDUCED_MOTION, k as findChildrenWithProvide, nt as padStart, st as templateRef, u as propsFactory, ut as IN_BROWSER, v as convertToUnit, y as createRange } from "./defineComponent-DK6LSjDW.js";
|
|
3
|
-
import { b as easingPatterns, h as useRtl, m as useLocale } from "./theme-D78LVcJg.js";
|
|
4
|
-
//#region ../../../../node_modules/vuetify/lib/composables/date/adapters/vuetify.js
|
|
5
|
-
function weekInfo(locale) {
|
|
6
|
-
const code = locale.slice(-2).toUpperCase();
|
|
7
|
-
switch (true) {
|
|
8
|
-
case locale === "GB-alt-variant": return {
|
|
9
|
-
firstDay: 0,
|
|
10
|
-
firstWeekSize: 4
|
|
11
|
-
};
|
|
12
|
-
case locale === "001": return {
|
|
13
|
-
firstDay: 1,
|
|
14
|
-
firstWeekSize: 1
|
|
15
|
-
};
|
|
16
|
-
case `AG AS BD BR BS BT BW BZ CA CO DM DO ET GT GU HK HN ID IL IN JM JP KE
|
|
17
|
-
KH KR LA MH MM MO MT MX MZ NI NP PA PE PH PK PR PY SA SG SV TH TT TW UM US
|
|
18
|
-
VE VI WS YE ZA ZW`.includes(code): return {
|
|
19
|
-
firstDay: 0,
|
|
20
|
-
firstWeekSize: 1
|
|
21
|
-
};
|
|
22
|
-
case `AI AL AM AR AU AZ BA BM BN BY CL CM CN CR CY EC GE HR KG KZ LB LK LV
|
|
23
|
-
MD ME MK MN MY NZ RO RS SI TJ TM TR UA UY UZ VN XK`.includes(code): return {
|
|
24
|
-
firstDay: 1,
|
|
25
|
-
firstWeekSize: 1
|
|
26
|
-
};
|
|
27
|
-
case `AD AN AT AX BE BG CH CZ DE DK EE ES FI FJ FO FR GB GF GP GR HU IE IS
|
|
28
|
-
IT LI LT LU MC MQ NL NO PL RE RU SE SK SM VA`.includes(code): return {
|
|
29
|
-
firstDay: 1,
|
|
30
|
-
firstWeekSize: 4
|
|
31
|
-
};
|
|
32
|
-
case `AE AF BH DJ DZ EG IQ IR JO KW LY OM QA SD SY`.includes(code): return {
|
|
33
|
-
firstDay: 6,
|
|
34
|
-
firstWeekSize: 1
|
|
35
|
-
};
|
|
36
|
-
case code === "MV": return {
|
|
37
|
-
firstDay: 5,
|
|
38
|
-
firstWeekSize: 1
|
|
39
|
-
};
|
|
40
|
-
case code === "PT": return {
|
|
41
|
-
firstDay: 0,
|
|
42
|
-
firstWeekSize: 4
|
|
43
|
-
};
|
|
44
|
-
default: return null;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
function getWeekArray(date, locale, firstDayOfWeek) {
|
|
48
|
-
const weeks = [];
|
|
49
|
-
let currentWeek = [];
|
|
50
|
-
const firstDayOfMonth = startOfMonth(date);
|
|
51
|
-
const lastDayOfMonth = endOfMonth(date);
|
|
52
|
-
const first = firstDayOfWeek ?? weekInfo(locale)?.firstDay ?? 0;
|
|
53
|
-
const firstDayWeekIndex = (firstDayOfMonth.getDay() - first + 7) % 7;
|
|
54
|
-
const lastDayWeekIndex = (lastDayOfMonth.getDay() - first + 7) % 7;
|
|
55
|
-
for (let i = 0; i < firstDayWeekIndex; i++) {
|
|
56
|
-
const adjacentDay = new Date(firstDayOfMonth);
|
|
57
|
-
adjacentDay.setDate(adjacentDay.getDate() - (firstDayWeekIndex - i));
|
|
58
|
-
currentWeek.push(adjacentDay);
|
|
59
|
-
}
|
|
60
|
-
for (let i = 1; i <= lastDayOfMonth.getDate(); i++) {
|
|
61
|
-
const day = new Date(date.getFullYear(), date.getMonth(), i);
|
|
62
|
-
currentWeek.push(day);
|
|
63
|
-
if (currentWeek.length === 7) {
|
|
64
|
-
weeks.push(currentWeek);
|
|
65
|
-
currentWeek = [];
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
for (let i = 1; i < 7 - lastDayWeekIndex; i++) {
|
|
69
|
-
const adjacentDay = new Date(lastDayOfMonth);
|
|
70
|
-
adjacentDay.setDate(adjacentDay.getDate() + i);
|
|
71
|
-
currentWeek.push(adjacentDay);
|
|
72
|
-
}
|
|
73
|
-
if (currentWeek.length > 0) weeks.push(currentWeek);
|
|
74
|
-
return weeks;
|
|
75
|
-
}
|
|
76
|
-
function startOfWeek(date, locale, firstDayOfWeek) {
|
|
77
|
-
let day = (firstDayOfWeek ?? weekInfo(locale)?.firstDay ?? 0) % 7;
|
|
78
|
-
if (![
|
|
79
|
-
0,
|
|
80
|
-
1,
|
|
81
|
-
2,
|
|
82
|
-
3,
|
|
83
|
-
4,
|
|
84
|
-
5,
|
|
85
|
-
6
|
|
86
|
-
].includes(day)) {
|
|
87
|
-
consoleWarn("Invalid firstDayOfWeek, expected discrete number in range [0-6]");
|
|
88
|
-
day = 0;
|
|
89
|
-
}
|
|
90
|
-
const d = new Date(date);
|
|
91
|
-
while (d.getDay() !== day) d.setDate(d.getDate() - 1);
|
|
92
|
-
return d;
|
|
93
|
-
}
|
|
94
|
-
function endOfWeek(date, locale) {
|
|
95
|
-
const d = new Date(date);
|
|
96
|
-
const lastDay = ((weekInfo(locale)?.firstDay ?? 0) + 6) % 7;
|
|
97
|
-
while (d.getDay() !== lastDay) d.setDate(d.getDate() + 1);
|
|
98
|
-
return d;
|
|
99
|
-
}
|
|
100
|
-
function startOfMonth(date) {
|
|
101
|
-
return new Date(date.getFullYear(), date.getMonth(), 1);
|
|
102
|
-
}
|
|
103
|
-
function endOfMonth(date) {
|
|
104
|
-
return new Date(date.getFullYear(), date.getMonth() + 1, 0);
|
|
105
|
-
}
|
|
106
|
-
function parseLocalDate(value) {
|
|
107
|
-
const parts = value.split("-").map(Number);
|
|
108
|
-
return new Date(parts[0], parts[1] - 1, parts[2]);
|
|
109
|
-
}
|
|
110
|
-
var _YYYMMDD = /^([12]\d{3}-([1-9]|0[1-9]|1[0-2])-([1-9]|0[1-9]|[12]\d|3[01]))$/;
|
|
111
|
-
function date(value) {
|
|
112
|
-
if (value == null) return /* @__PURE__ */ new Date();
|
|
113
|
-
if (value instanceof Date) return value;
|
|
114
|
-
if (typeof value === "string") {
|
|
115
|
-
let parsed;
|
|
116
|
-
if (_YYYMMDD.test(value)) return parseLocalDate(value);
|
|
117
|
-
else parsed = Date.parse(value);
|
|
118
|
-
if (!isNaN(parsed)) return new Date(parsed);
|
|
119
|
-
}
|
|
120
|
-
return null;
|
|
121
|
-
}
|
|
122
|
-
var sundayJanuarySecond2000 = new Date(2e3, 0, 2);
|
|
123
|
-
function getWeekdays(locale, firstDayOfWeek, weekdayFormat) {
|
|
124
|
-
const daysFromSunday = firstDayOfWeek ?? weekInfo(locale)?.firstDay ?? 0;
|
|
125
|
-
return createRange(7).map((i) => {
|
|
126
|
-
const weekday = new Date(sundayJanuarySecond2000);
|
|
127
|
-
weekday.setDate(sundayJanuarySecond2000.getDate() + daysFromSunday + i);
|
|
128
|
-
return new Intl.DateTimeFormat(locale, { weekday: weekdayFormat ?? "narrow" }).format(weekday);
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
function format(value, formatString, locale, formats) {
|
|
132
|
-
const newDate = date(value) ?? /* @__PURE__ */ new Date();
|
|
133
|
-
const customFormat = formats?.[formatString];
|
|
134
|
-
if (typeof customFormat === "function") return customFormat(newDate, formatString, locale);
|
|
135
|
-
let options = {};
|
|
136
|
-
switch (formatString) {
|
|
137
|
-
case "fullDate":
|
|
138
|
-
options = {
|
|
139
|
-
year: "numeric",
|
|
140
|
-
month: "short",
|
|
141
|
-
day: "numeric"
|
|
142
|
-
};
|
|
143
|
-
break;
|
|
144
|
-
case "fullDateWithWeekday":
|
|
145
|
-
options = {
|
|
146
|
-
weekday: "long",
|
|
147
|
-
year: "numeric",
|
|
148
|
-
month: "long",
|
|
149
|
-
day: "numeric"
|
|
150
|
-
};
|
|
151
|
-
break;
|
|
152
|
-
case "normalDate": return `${newDate.getDate()} ${new Intl.DateTimeFormat(locale, { month: "long" }).format(newDate)}`;
|
|
153
|
-
case "normalDateWithWeekday":
|
|
154
|
-
options = {
|
|
155
|
-
weekday: "short",
|
|
156
|
-
day: "numeric",
|
|
157
|
-
month: "short"
|
|
158
|
-
};
|
|
159
|
-
break;
|
|
160
|
-
case "shortDate":
|
|
161
|
-
options = {
|
|
162
|
-
month: "short",
|
|
163
|
-
day: "numeric"
|
|
164
|
-
};
|
|
165
|
-
break;
|
|
166
|
-
case "year":
|
|
167
|
-
options = { year: "numeric" };
|
|
168
|
-
break;
|
|
169
|
-
case "month":
|
|
170
|
-
options = { month: "long" };
|
|
171
|
-
break;
|
|
172
|
-
case "monthShort":
|
|
173
|
-
options = { month: "short" };
|
|
174
|
-
break;
|
|
175
|
-
case "monthAndYear":
|
|
176
|
-
options = {
|
|
177
|
-
month: "long",
|
|
178
|
-
year: "numeric"
|
|
179
|
-
};
|
|
180
|
-
break;
|
|
181
|
-
case "monthAndDate":
|
|
182
|
-
options = {
|
|
183
|
-
month: "long",
|
|
184
|
-
day: "numeric"
|
|
185
|
-
};
|
|
186
|
-
break;
|
|
187
|
-
case "weekday":
|
|
188
|
-
options = { weekday: "long" };
|
|
189
|
-
break;
|
|
190
|
-
case "weekdayShort":
|
|
191
|
-
options = { weekday: "short" };
|
|
192
|
-
break;
|
|
193
|
-
case "dayOfMonth": return new Intl.NumberFormat(locale).format(newDate.getDate());
|
|
194
|
-
case "hours12h":
|
|
195
|
-
options = {
|
|
196
|
-
hour: "numeric",
|
|
197
|
-
hour12: true
|
|
198
|
-
};
|
|
199
|
-
break;
|
|
200
|
-
case "hours24h":
|
|
201
|
-
options = {
|
|
202
|
-
hour: "numeric",
|
|
203
|
-
hour12: false
|
|
204
|
-
};
|
|
205
|
-
break;
|
|
206
|
-
case "minutes":
|
|
207
|
-
options = { minute: "numeric" };
|
|
208
|
-
break;
|
|
209
|
-
case "seconds":
|
|
210
|
-
options = { second: "numeric" };
|
|
211
|
-
break;
|
|
212
|
-
case "fullTime":
|
|
213
|
-
options = {
|
|
214
|
-
hour: "numeric",
|
|
215
|
-
minute: "numeric"
|
|
216
|
-
};
|
|
217
|
-
break;
|
|
218
|
-
case "fullTime12h":
|
|
219
|
-
options = {
|
|
220
|
-
hour: "numeric",
|
|
221
|
-
minute: "numeric",
|
|
222
|
-
hour12: true
|
|
223
|
-
};
|
|
224
|
-
break;
|
|
225
|
-
case "fullTime24h":
|
|
226
|
-
options = {
|
|
227
|
-
hour: "numeric",
|
|
228
|
-
minute: "numeric",
|
|
229
|
-
hour12: false
|
|
230
|
-
};
|
|
231
|
-
break;
|
|
232
|
-
case "fullDateTime":
|
|
233
|
-
options = {
|
|
234
|
-
year: "numeric",
|
|
235
|
-
month: "short",
|
|
236
|
-
day: "numeric",
|
|
237
|
-
hour: "numeric",
|
|
238
|
-
minute: "numeric"
|
|
239
|
-
};
|
|
240
|
-
break;
|
|
241
|
-
case "fullDateTime12h":
|
|
242
|
-
options = {
|
|
243
|
-
year: "numeric",
|
|
244
|
-
month: "short",
|
|
245
|
-
day: "numeric",
|
|
246
|
-
hour: "numeric",
|
|
247
|
-
minute: "numeric",
|
|
248
|
-
hour12: true
|
|
249
|
-
};
|
|
250
|
-
break;
|
|
251
|
-
case "fullDateTime24h":
|
|
252
|
-
options = {
|
|
253
|
-
year: "numeric",
|
|
254
|
-
month: "short",
|
|
255
|
-
day: "numeric",
|
|
256
|
-
hour: "numeric",
|
|
257
|
-
minute: "numeric",
|
|
258
|
-
hour12: false
|
|
259
|
-
};
|
|
260
|
-
break;
|
|
261
|
-
case "keyboardDate":
|
|
262
|
-
options = {
|
|
263
|
-
year: "numeric",
|
|
264
|
-
month: "2-digit",
|
|
265
|
-
day: "2-digit"
|
|
266
|
-
};
|
|
267
|
-
break;
|
|
268
|
-
case "keyboardDateTime":
|
|
269
|
-
options = {
|
|
270
|
-
year: "numeric",
|
|
271
|
-
month: "2-digit",
|
|
272
|
-
day: "2-digit",
|
|
273
|
-
hour: "numeric",
|
|
274
|
-
minute: "numeric"
|
|
275
|
-
};
|
|
276
|
-
return new Intl.DateTimeFormat(locale, options).format(newDate).replace(/, /g, " ");
|
|
277
|
-
case "keyboardDateTime12h":
|
|
278
|
-
options = {
|
|
279
|
-
year: "numeric",
|
|
280
|
-
month: "2-digit",
|
|
281
|
-
day: "2-digit",
|
|
282
|
-
hour: "numeric",
|
|
283
|
-
minute: "numeric",
|
|
284
|
-
hour12: true
|
|
285
|
-
};
|
|
286
|
-
return new Intl.DateTimeFormat(locale, options).format(newDate).replace(/, /g, " ");
|
|
287
|
-
case "keyboardDateTime24h":
|
|
288
|
-
options = {
|
|
289
|
-
year: "numeric",
|
|
290
|
-
month: "2-digit",
|
|
291
|
-
day: "2-digit",
|
|
292
|
-
hour: "numeric",
|
|
293
|
-
minute: "numeric",
|
|
294
|
-
hour12: false
|
|
295
|
-
};
|
|
296
|
-
return new Intl.DateTimeFormat(locale, options).format(newDate).replace(/, /g, " ");
|
|
297
|
-
default: options = customFormat ?? {
|
|
298
|
-
timeZone: "UTC",
|
|
299
|
-
timeZoneName: "short"
|
|
300
|
-
};
|
|
301
|
-
}
|
|
302
|
-
return new Intl.DateTimeFormat(locale, options).format(newDate);
|
|
303
|
-
}
|
|
304
|
-
function toISO(adapter, value) {
|
|
305
|
-
const date = adapter.toJsDate(value);
|
|
306
|
-
return `${date.getFullYear()}-${padStart(String(date.getMonth() + 1), 2, "0")}-${padStart(String(date.getDate()), 2, "0")}`;
|
|
307
|
-
}
|
|
308
|
-
function parseISO(value) {
|
|
309
|
-
const [year, month, day] = value.split("-").map(Number);
|
|
310
|
-
return new Date(year, month - 1, day);
|
|
311
|
-
}
|
|
312
|
-
function addMinutes(date, amount) {
|
|
313
|
-
const d = new Date(date);
|
|
314
|
-
d.setMinutes(d.getMinutes() + amount);
|
|
315
|
-
return d;
|
|
316
|
-
}
|
|
317
|
-
function addHours(date, amount) {
|
|
318
|
-
const d = new Date(date);
|
|
319
|
-
d.setHours(d.getHours() + amount);
|
|
320
|
-
return d;
|
|
321
|
-
}
|
|
322
|
-
function addDays(date, amount) {
|
|
323
|
-
const d = new Date(date);
|
|
324
|
-
d.setDate(d.getDate() + amount);
|
|
325
|
-
return d;
|
|
326
|
-
}
|
|
327
|
-
function addWeeks(date, amount) {
|
|
328
|
-
const d = new Date(date);
|
|
329
|
-
d.setDate(d.getDate() + amount * 7);
|
|
330
|
-
return d;
|
|
331
|
-
}
|
|
332
|
-
function addMonths(date, amount) {
|
|
333
|
-
const d = new Date(date);
|
|
334
|
-
d.setDate(1);
|
|
335
|
-
d.setMonth(d.getMonth() + amount);
|
|
336
|
-
return d;
|
|
337
|
-
}
|
|
338
|
-
function getYear(date) {
|
|
339
|
-
return date.getFullYear();
|
|
340
|
-
}
|
|
341
|
-
function getMonth(date) {
|
|
342
|
-
return date.getMonth();
|
|
343
|
-
}
|
|
344
|
-
function getWeek(date, locale, firstDayOfWeek, firstDayOfYear) {
|
|
345
|
-
const weekInfoFromLocale = weekInfo(locale);
|
|
346
|
-
const weekStart = firstDayOfWeek ?? weekInfoFromLocale?.firstDay ?? 0;
|
|
347
|
-
const minWeekSize = weekInfoFromLocale?.firstWeekSize ?? 1;
|
|
348
|
-
return firstDayOfYear !== void 0 ? calculateWeekWithFirstDayOfYear(date, locale, weekStart, firstDayOfYear) : calculateWeekWithMinWeekSize(date, locale, weekStart, minWeekSize);
|
|
349
|
-
}
|
|
350
|
-
function calculateWeekWithFirstDayOfYear(date, locale, weekStart, firstDayOfYear) {
|
|
351
|
-
const firstDayOfYearOffset = (7 + firstDayOfYear - weekStart) % 7;
|
|
352
|
-
const currentWeekStart = startOfWeek(date, locale, weekStart);
|
|
353
|
-
const currentWeekEnd = addDays(currentWeekStart, 6);
|
|
354
|
-
function yearStartWeekdayOffset(year) {
|
|
355
|
-
return (7 + new Date(year, 0, 1).getDay() - weekStart) % 7;
|
|
356
|
-
}
|
|
357
|
-
let year = getYear(currentWeekStart);
|
|
358
|
-
if (year < getYear(currentWeekEnd) && yearStartWeekdayOffset(year + 1) <= firstDayOfYearOffset) year++;
|
|
359
|
-
const yearStart = new Date(year, 0, 1);
|
|
360
|
-
const offset = yearStartWeekdayOffset(year);
|
|
361
|
-
const d1w1 = offset <= firstDayOfYearOffset ? addDays(yearStart, -offset) : addDays(yearStart, 7 - offset);
|
|
362
|
-
return 1 + getDiff(endOfDay(currentWeekStart), startOfDay(d1w1), "weeks");
|
|
363
|
-
}
|
|
364
|
-
function calculateWeekWithMinWeekSize(date, locale, weekStart, minWeekSize) {
|
|
365
|
-
const currentWeekStart = startOfWeek(date, locale, weekStart);
|
|
366
|
-
const currentWeekEnd = addDays(startOfWeek(date, locale, weekStart), 6);
|
|
367
|
-
function firstWeekSize(year) {
|
|
368
|
-
const yearStart = new Date(year, 0, 1);
|
|
369
|
-
return 7 - getDiff(yearStart, startOfWeek(yearStart, locale, weekStart), "days");
|
|
370
|
-
}
|
|
371
|
-
let year = getYear(currentWeekStart);
|
|
372
|
-
if (year < getYear(currentWeekEnd) && firstWeekSize(year + 1) >= minWeekSize) year++;
|
|
373
|
-
const yearStart = new Date(year, 0, 1);
|
|
374
|
-
const size = firstWeekSize(year);
|
|
375
|
-
const d1w1 = size >= minWeekSize ? addDays(yearStart, size - 7) : addDays(yearStart, size);
|
|
376
|
-
return 1 + getDiff(endOfDay(currentWeekStart), startOfDay(d1w1), "weeks");
|
|
377
|
-
}
|
|
378
|
-
function getDate(date) {
|
|
379
|
-
return date.getDate();
|
|
380
|
-
}
|
|
381
|
-
function getNextMonth(date) {
|
|
382
|
-
return new Date(date.getFullYear(), date.getMonth() + 1, 1);
|
|
383
|
-
}
|
|
384
|
-
function getPreviousMonth(date) {
|
|
385
|
-
return new Date(date.getFullYear(), date.getMonth() - 1, 1);
|
|
386
|
-
}
|
|
387
|
-
function getHours(date) {
|
|
388
|
-
return date.getHours();
|
|
389
|
-
}
|
|
390
|
-
function getMinutes(date) {
|
|
391
|
-
return date.getMinutes();
|
|
392
|
-
}
|
|
393
|
-
function startOfYear(date) {
|
|
394
|
-
return new Date(date.getFullYear(), 0, 1);
|
|
395
|
-
}
|
|
396
|
-
function endOfYear(date) {
|
|
397
|
-
return new Date(date.getFullYear(), 11, 31);
|
|
398
|
-
}
|
|
399
|
-
function isWithinRange(date, range) {
|
|
400
|
-
return isEqual(date, range[0]) || isEqual(date, range[1]) || isAfter(date, range[0]) && isBefore(date, range[1]);
|
|
401
|
-
}
|
|
402
|
-
function isValid(date) {
|
|
403
|
-
const d = new Date(date);
|
|
404
|
-
return d instanceof Date && !isNaN(d.getTime());
|
|
405
|
-
}
|
|
406
|
-
function isAfter(date, comparing) {
|
|
407
|
-
return date.getTime() > comparing.getTime();
|
|
408
|
-
}
|
|
409
|
-
function isAfterDay(date, comparing) {
|
|
410
|
-
return isAfter(startOfDay(date), startOfDay(comparing));
|
|
411
|
-
}
|
|
412
|
-
function isBefore(date, comparing) {
|
|
413
|
-
return date.getTime() < comparing.getTime();
|
|
414
|
-
}
|
|
415
|
-
function isEqual(date, comparing) {
|
|
416
|
-
return date.getTime() === comparing.getTime();
|
|
417
|
-
}
|
|
418
|
-
function isSameDay(date, comparing) {
|
|
419
|
-
return date.getDate() === comparing.getDate() && date.getMonth() === comparing.getMonth() && date.getFullYear() === comparing.getFullYear();
|
|
420
|
-
}
|
|
421
|
-
function isSameMonth(date, comparing) {
|
|
422
|
-
return date.getMonth() === comparing.getMonth() && date.getFullYear() === comparing.getFullYear();
|
|
423
|
-
}
|
|
424
|
-
function isSameYear(date, comparing) {
|
|
425
|
-
return date.getFullYear() === comparing.getFullYear();
|
|
426
|
-
}
|
|
427
|
-
function getDiff(date, comparing, unit) {
|
|
428
|
-
const d = new Date(date);
|
|
429
|
-
const c = new Date(comparing);
|
|
430
|
-
switch (unit) {
|
|
431
|
-
case "years": return d.getFullYear() - c.getFullYear();
|
|
432
|
-
case "quarters": return Math.floor((d.getMonth() - c.getMonth() + (d.getFullYear() - c.getFullYear()) * 12) / 4);
|
|
433
|
-
case "months": return d.getMonth() - c.getMonth() + (d.getFullYear() - c.getFullYear()) * 12;
|
|
434
|
-
case "weeks": return Math.floor((d.getTime() - c.getTime()) / 6048e5);
|
|
435
|
-
case "days": return Math.floor((d.getTime() - c.getTime()) / 864e5);
|
|
436
|
-
case "hours": return Math.floor((d.getTime() - c.getTime()) / 36e5);
|
|
437
|
-
case "minutes": return Math.floor((d.getTime() - c.getTime()) / 6e4);
|
|
438
|
-
case "seconds": return Math.floor((d.getTime() - c.getTime()) / 1e3);
|
|
439
|
-
default: return d.getTime() - c.getTime();
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
function setHours(date, count) {
|
|
443
|
-
const d = new Date(date);
|
|
444
|
-
d.setHours(count);
|
|
445
|
-
return d;
|
|
446
|
-
}
|
|
447
|
-
function setMinutes(date, count) {
|
|
448
|
-
const d = new Date(date);
|
|
449
|
-
d.setMinutes(count);
|
|
450
|
-
return d;
|
|
451
|
-
}
|
|
452
|
-
function setMonth(date, count) {
|
|
453
|
-
const d = new Date(date);
|
|
454
|
-
d.setMonth(count);
|
|
455
|
-
return d;
|
|
456
|
-
}
|
|
457
|
-
function setDate(date, day) {
|
|
458
|
-
const d = new Date(date);
|
|
459
|
-
d.setDate(day);
|
|
460
|
-
return d;
|
|
461
|
-
}
|
|
462
|
-
function setYear(date, year) {
|
|
463
|
-
const d = new Date(date);
|
|
464
|
-
d.setFullYear(year);
|
|
465
|
-
return d;
|
|
466
|
-
}
|
|
467
|
-
function startOfDay(date) {
|
|
468
|
-
return new Date(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0, 0);
|
|
469
|
-
}
|
|
470
|
-
function endOfDay(date) {
|
|
471
|
-
return new Date(date.getFullYear(), date.getMonth(), date.getDate(), 23, 59, 59, 999);
|
|
472
|
-
}
|
|
473
|
-
var VuetifyDateAdapter = class {
|
|
474
|
-
constructor(options) {
|
|
475
|
-
this.locale = options.locale;
|
|
476
|
-
this.formats = options.formats;
|
|
477
|
-
}
|
|
478
|
-
date(value) {
|
|
479
|
-
return date(value);
|
|
480
|
-
}
|
|
481
|
-
toJsDate(date) {
|
|
482
|
-
return date;
|
|
483
|
-
}
|
|
484
|
-
toISO(date) {
|
|
485
|
-
return toISO(this, date);
|
|
486
|
-
}
|
|
487
|
-
parseISO(date) {
|
|
488
|
-
return parseISO(date);
|
|
489
|
-
}
|
|
490
|
-
addMinutes(date, amount) {
|
|
491
|
-
return addMinutes(date, amount);
|
|
492
|
-
}
|
|
493
|
-
addHours(date, amount) {
|
|
494
|
-
return addHours(date, amount);
|
|
495
|
-
}
|
|
496
|
-
addDays(date, amount) {
|
|
497
|
-
return addDays(date, amount);
|
|
498
|
-
}
|
|
499
|
-
addWeeks(date, amount) {
|
|
500
|
-
return addWeeks(date, amount);
|
|
501
|
-
}
|
|
502
|
-
addMonths(date, amount) {
|
|
503
|
-
return addMonths(date, amount);
|
|
504
|
-
}
|
|
505
|
-
getWeekArray(date, firstDayOfWeek) {
|
|
506
|
-
const firstDay = firstDayOfWeek !== void 0 ? Number(firstDayOfWeek) : void 0;
|
|
507
|
-
return getWeekArray(date, this.locale, firstDay);
|
|
508
|
-
}
|
|
509
|
-
startOfWeek(date, firstDayOfWeek) {
|
|
510
|
-
const firstDay = firstDayOfWeek !== void 0 ? Number(firstDayOfWeek) : void 0;
|
|
511
|
-
return startOfWeek(date, this.locale, firstDay);
|
|
512
|
-
}
|
|
513
|
-
endOfWeek(date) {
|
|
514
|
-
return endOfWeek(date, this.locale);
|
|
515
|
-
}
|
|
516
|
-
startOfMonth(date) {
|
|
517
|
-
return startOfMonth(date);
|
|
518
|
-
}
|
|
519
|
-
endOfMonth(date) {
|
|
520
|
-
return endOfMonth(date);
|
|
521
|
-
}
|
|
522
|
-
format(date, formatString) {
|
|
523
|
-
return format(date, formatString, this.locale, this.formats);
|
|
524
|
-
}
|
|
525
|
-
isEqual(date, comparing) {
|
|
526
|
-
return isEqual(date, comparing);
|
|
527
|
-
}
|
|
528
|
-
isValid(date) {
|
|
529
|
-
return isValid(date);
|
|
530
|
-
}
|
|
531
|
-
isWithinRange(date, range) {
|
|
532
|
-
return isWithinRange(date, range);
|
|
533
|
-
}
|
|
534
|
-
isAfter(date, comparing) {
|
|
535
|
-
return isAfter(date, comparing);
|
|
536
|
-
}
|
|
537
|
-
isAfterDay(date, comparing) {
|
|
538
|
-
return isAfterDay(date, comparing);
|
|
539
|
-
}
|
|
540
|
-
isBefore(date, comparing) {
|
|
541
|
-
return !isAfter(date, comparing) && !isEqual(date, comparing);
|
|
542
|
-
}
|
|
543
|
-
isSameDay(date, comparing) {
|
|
544
|
-
return isSameDay(date, comparing);
|
|
545
|
-
}
|
|
546
|
-
isSameMonth(date, comparing) {
|
|
547
|
-
return isSameMonth(date, comparing);
|
|
548
|
-
}
|
|
549
|
-
isSameYear(date, comparing) {
|
|
550
|
-
return isSameYear(date, comparing);
|
|
551
|
-
}
|
|
552
|
-
setMinutes(date, count) {
|
|
553
|
-
return setMinutes(date, count);
|
|
554
|
-
}
|
|
555
|
-
setHours(date, count) {
|
|
556
|
-
return setHours(date, count);
|
|
557
|
-
}
|
|
558
|
-
setMonth(date, count) {
|
|
559
|
-
return setMonth(date, count);
|
|
560
|
-
}
|
|
561
|
-
setDate(date, day) {
|
|
562
|
-
return setDate(date, day);
|
|
563
|
-
}
|
|
564
|
-
setYear(date, year) {
|
|
565
|
-
return setYear(date, year);
|
|
566
|
-
}
|
|
567
|
-
getDiff(date, comparing, unit) {
|
|
568
|
-
return getDiff(date, comparing, unit);
|
|
569
|
-
}
|
|
570
|
-
getWeekdays(firstDayOfWeek, weekdayFormat) {
|
|
571
|
-
const firstDay = firstDayOfWeek !== void 0 ? Number(firstDayOfWeek) : void 0;
|
|
572
|
-
return getWeekdays(this.locale, firstDay, weekdayFormat);
|
|
573
|
-
}
|
|
574
|
-
getYear(date) {
|
|
575
|
-
return getYear(date);
|
|
576
|
-
}
|
|
577
|
-
getMonth(date) {
|
|
578
|
-
return getMonth(date);
|
|
579
|
-
}
|
|
580
|
-
getWeek(date, firstDayOfWeek, firstDayOfYear) {
|
|
581
|
-
const firstDay = firstDayOfWeek !== void 0 ? Number(firstDayOfWeek) : void 0;
|
|
582
|
-
const firstWeekStart = firstDayOfYear !== void 0 ? Number(firstDayOfYear) : void 0;
|
|
583
|
-
return getWeek(date, this.locale, firstDay, firstWeekStart);
|
|
584
|
-
}
|
|
585
|
-
getDate(date) {
|
|
586
|
-
return getDate(date);
|
|
587
|
-
}
|
|
588
|
-
getNextMonth(date) {
|
|
589
|
-
return getNextMonth(date);
|
|
590
|
-
}
|
|
591
|
-
getPreviousMonth(date) {
|
|
592
|
-
return getPreviousMonth(date);
|
|
593
|
-
}
|
|
594
|
-
getHours(date) {
|
|
595
|
-
return getHours(date);
|
|
596
|
-
}
|
|
597
|
-
getMinutes(date) {
|
|
598
|
-
return getMinutes(date);
|
|
599
|
-
}
|
|
600
|
-
startOfDay(date) {
|
|
601
|
-
return startOfDay(date);
|
|
602
|
-
}
|
|
603
|
-
endOfDay(date) {
|
|
604
|
-
return endOfDay(date);
|
|
605
|
-
}
|
|
606
|
-
startOfYear(date) {
|
|
607
|
-
return startOfYear(date);
|
|
608
|
-
}
|
|
609
|
-
endOfYear(date) {
|
|
610
|
-
return endOfYear(date);
|
|
611
|
-
}
|
|
612
|
-
};
|
|
613
|
-
//#endregion
|
|
614
|
-
//#region ../../../../node_modules/vuetify/lib/composables/date/date.js
|
|
615
|
-
var DateOptionsSymbol = Symbol.for("vuetify:date-options");
|
|
616
|
-
var DateAdapterSymbol = Symbol.for("vuetify:date-adapter");
|
|
617
|
-
function createDate(options, locale) {
|
|
618
|
-
const _options = mergeDeep({
|
|
619
|
-
adapter: VuetifyDateAdapter,
|
|
620
|
-
locale: {
|
|
621
|
-
af: "af-ZA",
|
|
622
|
-
bg: "bg-BG",
|
|
623
|
-
ca: "ca-ES",
|
|
624
|
-
ckb: "",
|
|
625
|
-
cs: "cs-CZ",
|
|
626
|
-
de: "de-DE",
|
|
627
|
-
el: "el-GR",
|
|
628
|
-
en: "en-US",
|
|
629
|
-
et: "et-EE",
|
|
630
|
-
fa: "fa-IR",
|
|
631
|
-
fi: "fi-FI",
|
|
632
|
-
hr: "hr-HR",
|
|
633
|
-
hu: "hu-HU",
|
|
634
|
-
he: "he-IL",
|
|
635
|
-
id: "id-ID",
|
|
636
|
-
it: "it-IT",
|
|
637
|
-
ja: "ja-JP",
|
|
638
|
-
ko: "ko-KR",
|
|
639
|
-
lv: "lv-LV",
|
|
640
|
-
lt: "lt-LT",
|
|
641
|
-
nl: "nl-NL",
|
|
642
|
-
no: "no-NO",
|
|
643
|
-
pl: "pl-PL",
|
|
644
|
-
pt: "pt-PT",
|
|
645
|
-
ro: "ro-RO",
|
|
646
|
-
ru: "ru-RU",
|
|
647
|
-
sk: "sk-SK",
|
|
648
|
-
sl: "sl-SI",
|
|
649
|
-
srCyrl: "sr-SP",
|
|
650
|
-
srLatn: "sr-SP",
|
|
651
|
-
sv: "sv-SE",
|
|
652
|
-
th: "th-TH",
|
|
653
|
-
tr: "tr-TR",
|
|
654
|
-
az: "az-AZ",
|
|
655
|
-
uk: "uk-UA",
|
|
656
|
-
vi: "vi-VN",
|
|
657
|
-
zhHans: "zh-CN",
|
|
658
|
-
zhHant: "zh-TW"
|
|
659
|
-
}
|
|
660
|
-
}, options);
|
|
661
|
-
return {
|
|
662
|
-
options: _options,
|
|
663
|
-
instance: createInstance(_options, locale)
|
|
664
|
-
};
|
|
665
|
-
}
|
|
666
|
-
function daysDiff(adapter, start, stop) {
|
|
667
|
-
const iso = [`${adapter.toISO(stop ?? start).split("T")[0]}T00:00:00Z`, `${adapter.toISO(start).split("T")[0]}T00:00:00Z`];
|
|
668
|
-
return typeof adapter.date() === "string" ? adapter.getDiff(iso[0], iso[1], "days") : adapter.getDiff(adapter.date(iso[0]), adapter.date(iso[1]), "days");
|
|
669
|
-
}
|
|
670
|
-
function createInstance(options, locale) {
|
|
671
|
-
const instance = reactive(typeof options.adapter === "function" ? new options.adapter({
|
|
672
|
-
locale: options.locale[locale.current.value] ?? locale.current.value,
|
|
673
|
-
formats: options.formats
|
|
674
|
-
}) : options.adapter);
|
|
675
|
-
watch(locale.current, (value) => {
|
|
676
|
-
instance.locale = options.locale[value] ?? value ?? instance.locale;
|
|
677
|
-
});
|
|
678
|
-
return instance;
|
|
679
|
-
}
|
|
680
|
-
function useDate() {
|
|
681
|
-
const options = inject(DateOptionsSymbol);
|
|
682
|
-
if (!options) throw new Error("[Vuetify] Could not find injected date options");
|
|
683
|
-
return createInstance(options, useLocale());
|
|
684
|
-
}
|
|
685
|
-
//#endregion
|
|
686
|
-
//#region ../../../../node_modules/vuetify/lib/composables/goto.js
|
|
687
|
-
var GoToSymbol = Symbol.for("vuetify:goto");
|
|
688
|
-
function genDefaults() {
|
|
689
|
-
return {
|
|
690
|
-
container: void 0,
|
|
691
|
-
duration: 300,
|
|
692
|
-
layout: false,
|
|
693
|
-
offset: 0,
|
|
694
|
-
easing: "easeInOutCubic",
|
|
695
|
-
patterns: easingPatterns
|
|
696
|
-
};
|
|
697
|
-
}
|
|
698
|
-
function getContainer(el) {
|
|
699
|
-
return getTarget(el) ?? (document.scrollingElement || document.body);
|
|
700
|
-
}
|
|
701
|
-
function getTarget(el) {
|
|
702
|
-
return typeof el === "string" ? document.querySelector(el) : refElement(el);
|
|
703
|
-
}
|
|
704
|
-
function getOffset(target, horizontal, rtl) {
|
|
705
|
-
if (typeof target === "number") return horizontal && rtl ? -target : target;
|
|
706
|
-
let el = getTarget(target);
|
|
707
|
-
let totalOffset = 0;
|
|
708
|
-
while (el) {
|
|
709
|
-
totalOffset += horizontal ? el.offsetLeft : el.offsetTop;
|
|
710
|
-
el = el.offsetParent;
|
|
711
|
-
}
|
|
712
|
-
return totalOffset;
|
|
713
|
-
}
|
|
714
|
-
function createGoTo(options, locale) {
|
|
715
|
-
return {
|
|
716
|
-
rtl: locale.isRtl,
|
|
717
|
-
options: mergeDeep(genDefaults(), options)
|
|
718
|
-
};
|
|
719
|
-
}
|
|
720
|
-
async function scrollTo(_target, _options, horizontal, goTo) {
|
|
721
|
-
const property = horizontal ? "scrollLeft" : "scrollTop";
|
|
722
|
-
const options = mergeDeep(goTo?.options ?? genDefaults(), _options);
|
|
723
|
-
const rtl = goTo?.rtl.value;
|
|
724
|
-
const target = (typeof _target === "number" ? _target : getTarget(_target)) ?? 0;
|
|
725
|
-
const container = options.container === "parent" && target instanceof HTMLElement ? target.parentElement : getContainer(options.container);
|
|
726
|
-
const ease = PREFERS_REDUCED_MOTION() ? options.patterns.instant : typeof options.easing === "function" ? options.easing : options.patterns[options.easing];
|
|
727
|
-
if (!ease) throw new TypeError(`Easing function "${options.easing}" not found.`);
|
|
728
|
-
let targetLocation;
|
|
729
|
-
if (typeof target === "number") targetLocation = getOffset(target, horizontal, rtl);
|
|
730
|
-
else {
|
|
731
|
-
targetLocation = getOffset(target, horizontal, rtl) - getOffset(container, horizontal, rtl);
|
|
732
|
-
if (options.layout) {
|
|
733
|
-
const layoutOffset = window.getComputedStyle(target).getPropertyValue("--v-layout-top");
|
|
734
|
-
if (layoutOffset) targetLocation -= parseInt(layoutOffset, 10);
|
|
735
|
-
}
|
|
736
|
-
}
|
|
737
|
-
targetLocation += options.offset;
|
|
738
|
-
targetLocation = clampTarget(container, targetLocation, !!rtl, !!horizontal);
|
|
739
|
-
const startLocation = container[property] ?? 0;
|
|
740
|
-
if (targetLocation === startLocation) return Promise.resolve(targetLocation);
|
|
741
|
-
const startTime = performance.now();
|
|
742
|
-
return new Promise((resolve) => requestAnimationFrame(function step(currentTime) {
|
|
743
|
-
const progress = (currentTime - startTime) / options.duration;
|
|
744
|
-
const location = Math.floor(startLocation + (targetLocation - startLocation) * ease(clamp(progress, 0, 1)));
|
|
745
|
-
container[property] = location;
|
|
746
|
-
if (progress >= 1 && Math.abs(location - container[property]) < 10) return resolve(targetLocation);
|
|
747
|
-
else if (progress > 2) {
|
|
748
|
-
consoleWarn("Scroll target is not reachable");
|
|
749
|
-
return resolve(container[property]);
|
|
750
|
-
}
|
|
751
|
-
requestAnimationFrame(step);
|
|
752
|
-
}));
|
|
753
|
-
}
|
|
754
|
-
function useGoTo(_options = {}) {
|
|
755
|
-
const goToInstance = inject(GoToSymbol);
|
|
756
|
-
const { isRtl } = useRtl();
|
|
757
|
-
if (!goToInstance) throw new Error("[Vuetify] Could not find injected goto instance");
|
|
758
|
-
const goTo = {
|
|
759
|
-
...goToInstance,
|
|
760
|
-
rtl: toRef(() => goToInstance.rtl.value || isRtl.value)
|
|
761
|
-
};
|
|
762
|
-
async function go(target, options) {
|
|
763
|
-
return scrollTo(target, mergeDeep(_options, options), false, goTo);
|
|
764
|
-
}
|
|
765
|
-
go.horizontal = async (target, options) => {
|
|
766
|
-
return scrollTo(target, mergeDeep(_options, options), true, goTo);
|
|
767
|
-
};
|
|
768
|
-
return go;
|
|
769
|
-
}
|
|
770
|
-
/**
|
|
771
|
-
* Clamp target value to achieve a smooth scroll animation
|
|
772
|
-
* when the value goes outside the scroll container size
|
|
773
|
-
*/
|
|
774
|
-
function clampTarget(container, value, rtl, horizontal) {
|
|
775
|
-
const { scrollWidth, scrollHeight } = container;
|
|
776
|
-
const [containerWidth, containerHeight] = container === document.scrollingElement ? [window.innerWidth, window.innerHeight] : [container.offsetWidth, container.offsetHeight];
|
|
777
|
-
let min;
|
|
778
|
-
let max;
|
|
779
|
-
if (horizontal) {
|
|
780
|
-
if (rtl) {
|
|
781
|
-
min = -(scrollWidth - containerWidth);
|
|
782
|
-
max = 0;
|
|
783
|
-
} else {
|
|
784
|
-
min = 0;
|
|
785
|
-
max = scrollWidth - containerWidth;
|
|
786
|
-
}
|
|
787
|
-
} else {
|
|
788
|
-
min = 0;
|
|
789
|
-
max = scrollHeight + -containerHeight;
|
|
790
|
-
}
|
|
791
|
-
return clamp(value, min, max);
|
|
792
|
-
}
|
|
793
|
-
//#endregion
|
|
794
|
-
//#region ../../../../node_modules/vuetify/lib/composables/resizeObserver.js
|
|
795
|
-
function useResizeObserver(callback, box = "content") {
|
|
796
|
-
const resizeRef = templateRef();
|
|
797
|
-
const contentRect = ref();
|
|
798
|
-
if (IN_BROWSER) {
|
|
799
|
-
const observer = new ResizeObserver((entries) => {
|
|
800
|
-
callback?.(entries, observer);
|
|
801
|
-
if (!entries.length) return;
|
|
802
|
-
if (box === "content") contentRect.value = entries[0].contentRect;
|
|
803
|
-
else contentRect.value = entries[0].target.getBoundingClientRect();
|
|
804
|
-
});
|
|
805
|
-
onBeforeUnmount(() => {
|
|
806
|
-
observer.disconnect();
|
|
807
|
-
});
|
|
808
|
-
watch(() => resizeRef.el, (newValue, oldValue) => {
|
|
809
|
-
if (oldValue) {
|
|
810
|
-
observer.unobserve(oldValue);
|
|
811
|
-
contentRect.value = void 0;
|
|
812
|
-
}
|
|
813
|
-
if (newValue) observer.observe(newValue);
|
|
814
|
-
}, { flush: "post" });
|
|
815
|
-
}
|
|
816
|
-
return {
|
|
817
|
-
resizeRef,
|
|
818
|
-
contentRect: readonly(contentRect)
|
|
819
|
-
};
|
|
820
|
-
}
|
|
821
|
-
//#endregion
|
|
822
|
-
//#region ../../../../node_modules/vuetify/lib/composables/layout.js
|
|
823
|
-
var VuetifyLayoutKey = Symbol.for("vuetify:layout");
|
|
824
|
-
var VuetifyLayoutItemKey = Symbol.for("vuetify:layout-item");
|
|
825
|
-
var ROOT_ZINDEX = 1e3;
|
|
826
|
-
var makeLayoutProps = propsFactory({
|
|
827
|
-
overlaps: {
|
|
828
|
-
type: Array,
|
|
829
|
-
default: () => []
|
|
830
|
-
},
|
|
831
|
-
fullHeight: Boolean
|
|
832
|
-
}, "layout");
|
|
833
|
-
var makeLayoutItemProps = propsFactory({
|
|
834
|
-
name: { type: String },
|
|
835
|
-
order: {
|
|
836
|
-
type: [Number, String],
|
|
837
|
-
default: 0
|
|
838
|
-
},
|
|
839
|
-
absolute: Boolean
|
|
840
|
-
}, "layout-item");
|
|
841
|
-
function useLayout() {
|
|
842
|
-
const layout = inject(VuetifyLayoutKey);
|
|
843
|
-
if (!layout) throw new Error("[Vuetify] Could not find injected layout");
|
|
844
|
-
return {
|
|
845
|
-
getLayoutItem: layout.getLayoutItem,
|
|
846
|
-
mainRect: layout.mainRect,
|
|
847
|
-
mainStyles: layout.mainStyles
|
|
848
|
-
};
|
|
849
|
-
}
|
|
850
|
-
function useLayoutItem(options) {
|
|
851
|
-
const layout = inject(VuetifyLayoutKey);
|
|
852
|
-
if (!layout) throw new Error("[Vuetify] Could not find injected layout");
|
|
853
|
-
const id = options.id ?? `layout-item-${useId()}`;
|
|
854
|
-
const vm = getCurrentInstance("useLayoutItem");
|
|
855
|
-
provide(VuetifyLayoutItemKey, { id });
|
|
856
|
-
const isKeptAlive = shallowRef(false);
|
|
857
|
-
onDeactivated(() => isKeptAlive.value = true);
|
|
858
|
-
onActivated(() => isKeptAlive.value = false);
|
|
859
|
-
const { layoutItemStyles, layoutItemScrimStyles } = layout.register(vm, {
|
|
860
|
-
...options,
|
|
861
|
-
active: computed(() => isKeptAlive.value ? false : options.active.value),
|
|
862
|
-
id
|
|
863
|
-
});
|
|
864
|
-
onBeforeUnmount(() => layout.unregister(id));
|
|
865
|
-
return {
|
|
866
|
-
layoutItemStyles,
|
|
867
|
-
layoutRect: layout.layoutRect,
|
|
868
|
-
layoutItemScrimStyles
|
|
869
|
-
};
|
|
870
|
-
}
|
|
871
|
-
var generateLayers = (layout, positions, layoutSizes, activeItems) => {
|
|
872
|
-
let previousLayer = {
|
|
873
|
-
top: 0,
|
|
874
|
-
left: 0,
|
|
875
|
-
right: 0,
|
|
876
|
-
bottom: 0
|
|
877
|
-
};
|
|
878
|
-
const layers = [{
|
|
879
|
-
id: "",
|
|
880
|
-
layer: { ...previousLayer }
|
|
881
|
-
}];
|
|
882
|
-
for (const id of layout) {
|
|
883
|
-
const position = positions.get(id);
|
|
884
|
-
const amount = layoutSizes.get(id);
|
|
885
|
-
const active = activeItems.get(id);
|
|
886
|
-
if (!position || !amount || !active) continue;
|
|
887
|
-
const layer = {
|
|
888
|
-
...previousLayer,
|
|
889
|
-
[position.value]: parseInt(previousLayer[position.value], 10) + (active.value ? parseInt(amount.value, 10) : 0)
|
|
890
|
-
};
|
|
891
|
-
layers.push({
|
|
892
|
-
id,
|
|
893
|
-
layer
|
|
894
|
-
});
|
|
895
|
-
previousLayer = layer;
|
|
896
|
-
}
|
|
897
|
-
return layers;
|
|
898
|
-
};
|
|
899
|
-
function createLayout(props) {
|
|
900
|
-
const parentLayout = inject(VuetifyLayoutKey, null);
|
|
901
|
-
const rootZIndex = computed(() => parentLayout ? parentLayout.rootZIndex.value - 100 : ROOT_ZINDEX);
|
|
902
|
-
const registered = ref([]);
|
|
903
|
-
const positions = reactive(/* @__PURE__ */ new Map());
|
|
904
|
-
const layoutSizes = reactive(/* @__PURE__ */ new Map());
|
|
905
|
-
const priorities = reactive(/* @__PURE__ */ new Map());
|
|
906
|
-
const activeItems = reactive(/* @__PURE__ */ new Map());
|
|
907
|
-
const disabledTransitions = reactive(/* @__PURE__ */ new Map());
|
|
908
|
-
const { resizeRef, contentRect: layoutRect } = useResizeObserver();
|
|
909
|
-
const computedOverlaps = computed(() => {
|
|
910
|
-
const map = /* @__PURE__ */ new Map();
|
|
911
|
-
const overlaps = props.overlaps ?? [];
|
|
912
|
-
for (const overlap of overlaps.filter((item) => item.includes(":"))) {
|
|
913
|
-
const [top, bottom] = overlap.split(":");
|
|
914
|
-
if (!registered.value.includes(top) || !registered.value.includes(bottom)) continue;
|
|
915
|
-
const topPosition = positions.get(top);
|
|
916
|
-
const bottomPosition = positions.get(bottom);
|
|
917
|
-
const topAmount = layoutSizes.get(top);
|
|
918
|
-
const bottomAmount = layoutSizes.get(bottom);
|
|
919
|
-
if (!topPosition || !bottomPosition || !topAmount || !bottomAmount) continue;
|
|
920
|
-
map.set(bottom, {
|
|
921
|
-
position: topPosition.value,
|
|
922
|
-
amount: parseInt(topAmount.value, 10)
|
|
923
|
-
});
|
|
924
|
-
map.set(top, {
|
|
925
|
-
position: bottomPosition.value,
|
|
926
|
-
amount: -parseInt(bottomAmount.value, 10)
|
|
927
|
-
});
|
|
928
|
-
}
|
|
929
|
-
return map;
|
|
930
|
-
});
|
|
931
|
-
const layers = computed(() => {
|
|
932
|
-
const uniquePriorities = [...new Set([...priorities.values()].map((p) => p.value))].sort((a, b) => a - b);
|
|
933
|
-
const layout = [];
|
|
934
|
-
for (const p of uniquePriorities) {
|
|
935
|
-
const items = registered.value.filter((id) => priorities.get(id)?.value === p);
|
|
936
|
-
layout.push(...items);
|
|
937
|
-
}
|
|
938
|
-
return generateLayers(layout, positions, layoutSizes, activeItems);
|
|
939
|
-
});
|
|
940
|
-
const transitionsEnabled = computed(() => {
|
|
941
|
-
return !Array.from(disabledTransitions.values()).some((ref) => ref.value);
|
|
942
|
-
});
|
|
943
|
-
const mainRect = computed(() => {
|
|
944
|
-
return layers.value[layers.value.length - 1].layer;
|
|
945
|
-
});
|
|
946
|
-
const mainStyles = toRef(() => {
|
|
947
|
-
return {
|
|
948
|
-
"--v-layout-left": convertToUnit(mainRect.value.left),
|
|
949
|
-
"--v-layout-right": convertToUnit(mainRect.value.right),
|
|
950
|
-
"--v-layout-top": convertToUnit(mainRect.value.top),
|
|
951
|
-
"--v-layout-bottom": convertToUnit(mainRect.value.bottom),
|
|
952
|
-
...transitionsEnabled.value ? void 0 : { transition: "none" }
|
|
953
|
-
};
|
|
954
|
-
});
|
|
955
|
-
const items = computed(() => {
|
|
956
|
-
return layers.value.slice(1).map(({ id }, index) => {
|
|
957
|
-
const { layer } = layers.value[index];
|
|
958
|
-
const size = layoutSizes.get(id);
|
|
959
|
-
const position = positions.get(id);
|
|
960
|
-
return {
|
|
961
|
-
id,
|
|
962
|
-
...layer,
|
|
963
|
-
size: Number(size.value),
|
|
964
|
-
position: position.value
|
|
965
|
-
};
|
|
966
|
-
});
|
|
967
|
-
});
|
|
968
|
-
const getLayoutItem = (id) => {
|
|
969
|
-
return items.value.find((item) => item.id === id);
|
|
970
|
-
};
|
|
971
|
-
const rootVm = getCurrentInstance("createLayout");
|
|
972
|
-
const isMounted = shallowRef(false);
|
|
973
|
-
onMounted(() => {
|
|
974
|
-
isMounted.value = true;
|
|
975
|
-
});
|
|
976
|
-
provide(VuetifyLayoutKey, {
|
|
977
|
-
register: (vm, { id, order, position, layoutSize, elementSize, active, disableTransitions, absolute }) => {
|
|
978
|
-
priorities.set(id, order);
|
|
979
|
-
positions.set(id, position);
|
|
980
|
-
layoutSizes.set(id, layoutSize);
|
|
981
|
-
activeItems.set(id, active);
|
|
982
|
-
disableTransitions && disabledTransitions.set(id, disableTransitions);
|
|
983
|
-
const instanceIndex = findChildrenWithProvide(VuetifyLayoutItemKey, rootVm?.vnode).indexOf(vm);
|
|
984
|
-
if (instanceIndex > -1) registered.value.splice(instanceIndex, 0, id);
|
|
985
|
-
else registered.value.push(id);
|
|
986
|
-
const index = computed(() => items.value.findIndex((i) => i.id === id));
|
|
987
|
-
const zIndex = computed(() => rootZIndex.value + layers.value.length * 2 - index.value * 2);
|
|
988
|
-
return {
|
|
989
|
-
layoutItemStyles: computed(() => {
|
|
990
|
-
const isHorizontal = position.value === "left" || position.value === "right";
|
|
991
|
-
const isOppositeHorizontal = position.value === "right";
|
|
992
|
-
const isOppositeVertical = position.value === "bottom";
|
|
993
|
-
const size = elementSize.value ?? layoutSize.value;
|
|
994
|
-
const unit = size === 0 ? "%" : "px";
|
|
995
|
-
const styles = {
|
|
996
|
-
[position.value]: 0,
|
|
997
|
-
zIndex: zIndex.value,
|
|
998
|
-
transform: `translate${isHorizontal ? "X" : "Y"}(${(active.value ? 0 : -(size === 0 ? 100 : size)) * (isOppositeHorizontal || isOppositeVertical ? -1 : 1)}${unit})`,
|
|
999
|
-
position: absolute.value || rootZIndex.value !== ROOT_ZINDEX ? "absolute" : "fixed",
|
|
1000
|
-
...transitionsEnabled.value ? void 0 : { transition: "none" }
|
|
1001
|
-
};
|
|
1002
|
-
if (!isMounted.value) return styles;
|
|
1003
|
-
const item = items.value[index.value];
|
|
1004
|
-
if (!item) consoleWarn(`[Vuetify] Could not find layout item "${id}"`);
|
|
1005
|
-
const overlap = computedOverlaps.value.get(id);
|
|
1006
|
-
if (overlap) item[overlap.position] += overlap.amount;
|
|
1007
|
-
return {
|
|
1008
|
-
...styles,
|
|
1009
|
-
height: isHorizontal ? `calc(100% - ${item.top}px - ${item.bottom}px)` : elementSize.value ? `${elementSize.value}px` : void 0,
|
|
1010
|
-
left: isOppositeHorizontal ? void 0 : `${item.left}px`,
|
|
1011
|
-
right: isOppositeHorizontal ? `${item.right}px` : void 0,
|
|
1012
|
-
top: position.value !== "bottom" ? `${item.top}px` : void 0,
|
|
1013
|
-
bottom: position.value !== "top" ? `${item.bottom}px` : void 0,
|
|
1014
|
-
width: !isHorizontal ? `calc(100% - ${item.left}px - ${item.right}px)` : elementSize.value ? `${elementSize.value}px` : void 0
|
|
1015
|
-
};
|
|
1016
|
-
}),
|
|
1017
|
-
layoutItemScrimStyles: computed(() => ({ zIndex: zIndex.value - 1 })),
|
|
1018
|
-
zIndex
|
|
1019
|
-
};
|
|
1020
|
-
},
|
|
1021
|
-
unregister: (id) => {
|
|
1022
|
-
priorities.delete(id);
|
|
1023
|
-
positions.delete(id);
|
|
1024
|
-
layoutSizes.delete(id);
|
|
1025
|
-
activeItems.delete(id);
|
|
1026
|
-
disabledTransitions.delete(id);
|
|
1027
|
-
registered.value = registered.value.filter((v) => v !== id);
|
|
1028
|
-
},
|
|
1029
|
-
mainRect,
|
|
1030
|
-
mainStyles,
|
|
1031
|
-
getLayoutItem,
|
|
1032
|
-
items,
|
|
1033
|
-
layoutRect,
|
|
1034
|
-
rootZIndex
|
|
1035
|
-
});
|
|
1036
|
-
return {
|
|
1037
|
-
layoutClasses: toRef(() => ["v-layout", { "v-layout--full-height": props.fullHeight }]),
|
|
1038
|
-
layoutStyles: toRef(() => ({
|
|
1039
|
-
zIndex: parentLayout ? rootZIndex.value : void 0,
|
|
1040
|
-
position: parentLayout ? "relative" : void 0,
|
|
1041
|
-
overflow: parentLayout ? "hidden" : void 0
|
|
1042
|
-
})),
|
|
1043
|
-
getLayoutItem,
|
|
1044
|
-
items,
|
|
1045
|
-
layoutRect,
|
|
1046
|
-
layoutRef: resizeRef
|
|
1047
|
-
};
|
|
1048
|
-
}
|
|
1049
|
-
//#endregion
|
|
1050
|
-
//#region ../../../../node_modules/vuetify/lib/composables/hotkey/key-aliases.js
|
|
1051
|
-
/**
|
|
1052
|
-
* Centralized key alias mapping for consistent key normalization across the hotkey system.
|
|
1053
|
-
*
|
|
1054
|
-
* This maps various user-friendly aliases to canonical key names that match
|
|
1055
|
-
* KeyboardEvent.key values (in lowercase) where possible.
|
|
1056
|
-
*/
|
|
1057
|
-
var keyAliasMap = {
|
|
1058
|
-
control: "ctrl",
|
|
1059
|
-
command: "cmd",
|
|
1060
|
-
option: "alt",
|
|
1061
|
-
up: "arrowup",
|
|
1062
|
-
down: "arrowdown",
|
|
1063
|
-
left: "arrowleft",
|
|
1064
|
-
right: "arrowright",
|
|
1065
|
-
esc: "escape",
|
|
1066
|
-
spacebar: " ",
|
|
1067
|
-
space: " ",
|
|
1068
|
-
return: "enter",
|
|
1069
|
-
del: "delete",
|
|
1070
|
-
minus: "-",
|
|
1071
|
-
hyphen: "-"
|
|
1072
|
-
};
|
|
1073
|
-
/**
|
|
1074
|
-
* Normalizes a key string to its canonical form using the alias map.
|
|
1075
|
-
*
|
|
1076
|
-
* @param key - The key string to normalize
|
|
1077
|
-
* @returns The canonical key name in lowercase
|
|
1078
|
-
*/
|
|
1079
|
-
function normalizeKey(key) {
|
|
1080
|
-
const lowerKey = key.toLowerCase();
|
|
1081
|
-
return keyAliasMap[lowerKey] || lowerKey;
|
|
1082
|
-
}
|
|
1083
|
-
//#endregion
|
|
1084
|
-
//#region ../../../../node_modules/vuetify/lib/composables/hotkey/hotkey-parsing.js
|
|
1085
|
-
/**
|
|
1086
|
-
* Splits a single combination string into individual key parts.
|
|
1087
|
-
*
|
|
1088
|
-
* A combination is a set of keys that must be pressed simultaneously.
|
|
1089
|
-
* e.g. `ctrl+k`, `shift--`
|
|
1090
|
-
*/
|
|
1091
|
-
function splitKeyCombination(combination, isInternal = false) {
|
|
1092
|
-
const emptyResult = {
|
|
1093
|
-
keys: [],
|
|
1094
|
-
separators: []
|
|
1095
|
-
};
|
|
1096
|
-
if (!combination) {
|
|
1097
|
-
if (!isInternal) consoleWarn("Invalid hotkey combination: empty string provided");
|
|
1098
|
-
return emptyResult;
|
|
1099
|
-
}
|
|
1100
|
-
if (combination.length > 1 && [
|
|
1101
|
-
"+",
|
|
1102
|
-
"/",
|
|
1103
|
-
"_"
|
|
1104
|
-
].some((v) => combination.startsWith(v)) && ![
|
|
1105
|
-
"++",
|
|
1106
|
-
"//",
|
|
1107
|
-
"__"
|
|
1108
|
-
].some((v) => combination.startsWith(v)) || combination.includes("++") || combination.includes("__") || combination === "+" || combination === "_" || combination.length > 1 && (combination.endsWith("+") || combination.endsWith("_")) && combination.at(-2) !== combination.at(-1) || combination === "++" || combination === "--" || combination === "__") {
|
|
1109
|
-
if (!isInternal) consoleWarn(`Invalid hotkey combination: "${combination}" has invalid structure`);
|
|
1110
|
-
return emptyResult;
|
|
1111
|
-
}
|
|
1112
|
-
const keys = [];
|
|
1113
|
-
const separators = [];
|
|
1114
|
-
let buffer = "";
|
|
1115
|
-
const flushBuffer = (separator) => {
|
|
1116
|
-
if (buffer) {
|
|
1117
|
-
separator && separators.push(separator);
|
|
1118
|
-
keys.push(normalizeKey(buffer));
|
|
1119
|
-
buffer = "";
|
|
1120
|
-
}
|
|
1121
|
-
};
|
|
1122
|
-
for (let i = 0; i < combination.length; i++) {
|
|
1123
|
-
const char = combination[i];
|
|
1124
|
-
const nextChar = combination[i + 1];
|
|
1125
|
-
if ([
|
|
1126
|
-
"+",
|
|
1127
|
-
"/",
|
|
1128
|
-
"_",
|
|
1129
|
-
"-"
|
|
1130
|
-
].includes(char)) {
|
|
1131
|
-
if (char === nextChar) {
|
|
1132
|
-
flushBuffer(char);
|
|
1133
|
-
keys.push(char);
|
|
1134
|
-
i++;
|
|
1135
|
-
} else if ([
|
|
1136
|
-
"+",
|
|
1137
|
-
"/",
|
|
1138
|
-
"_"
|
|
1139
|
-
].includes(char)) flushBuffer(char);
|
|
1140
|
-
else buffer += char;
|
|
1141
|
-
} else buffer += char;
|
|
1142
|
-
}
|
|
1143
|
-
flushBuffer();
|
|
1144
|
-
if (keys.some((key) => key.length > 1 && key.includes("-") && key !== "--")) {
|
|
1145
|
-
if (!isInternal) consoleWarn(`Invalid hotkey combination: "${combination}" has invalid structure`);
|
|
1146
|
-
return emptyResult;
|
|
1147
|
-
}
|
|
1148
|
-
if (keys.length === 0 && combination) return {
|
|
1149
|
-
keys: [normalizeKey(combination)],
|
|
1150
|
-
separators
|
|
1151
|
-
};
|
|
1152
|
-
return {
|
|
1153
|
-
keys,
|
|
1154
|
-
separators
|
|
1155
|
-
};
|
|
1156
|
-
}
|
|
1157
|
-
/**
|
|
1158
|
-
* Splits a hotkey string into its constituent combination groups.
|
|
1159
|
-
*
|
|
1160
|
-
* A sequence is a series of combinations that must be pressed in order.
|
|
1161
|
-
* e.g. `a-b`, `ctrl+k-p`
|
|
1162
|
-
*/
|
|
1163
|
-
function splitKeySequence(str) {
|
|
1164
|
-
if (!str) {
|
|
1165
|
-
consoleWarn("Invalid hotkey sequence: empty string provided");
|
|
1166
|
-
return [];
|
|
1167
|
-
}
|
|
1168
|
-
const hasInvalidStart = str.startsWith("-") && !["---", "--+"].includes(str);
|
|
1169
|
-
const hasInvalidEnd = str.endsWith("-") && !str.endsWith("+-") && !str.endsWith("_-") && str !== "-" && str !== "---";
|
|
1170
|
-
if (hasInvalidStart || hasInvalidEnd) {
|
|
1171
|
-
consoleWarn(`Invalid hotkey sequence: "${str}" contains invalid combinations`);
|
|
1172
|
-
return [];
|
|
1173
|
-
}
|
|
1174
|
-
const result = [];
|
|
1175
|
-
let buffer = "";
|
|
1176
|
-
let i = 0;
|
|
1177
|
-
while (i < str.length) {
|
|
1178
|
-
const char = str[i];
|
|
1179
|
-
if (char === "-") {
|
|
1180
|
-
const prevChar = str[i - 1];
|
|
1181
|
-
const prevPrevChar = i > 1 ? str[i - 2] : void 0;
|
|
1182
|
-
if (["+", "_"].includes(prevChar) && !["+", "/"].includes(prevPrevChar ?? "")) {
|
|
1183
|
-
buffer += char;
|
|
1184
|
-
i++;
|
|
1185
|
-
} else {
|
|
1186
|
-
if (buffer) {
|
|
1187
|
-
result.push(buffer);
|
|
1188
|
-
buffer = "";
|
|
1189
|
-
} else result.push("-");
|
|
1190
|
-
i++;
|
|
1191
|
-
}
|
|
1192
|
-
} else {
|
|
1193
|
-
buffer += char;
|
|
1194
|
-
i++;
|
|
1195
|
-
}
|
|
1196
|
-
}
|
|
1197
|
-
if (buffer) result.push(buffer);
|
|
1198
|
-
const collapsed = [];
|
|
1199
|
-
let minusCount = 0;
|
|
1200
|
-
for (const part of result) if (part === "-") {
|
|
1201
|
-
if (minusCount % 2 === 0) collapsed.push("-");
|
|
1202
|
-
minusCount++;
|
|
1203
|
-
} else {
|
|
1204
|
-
minusCount = 0;
|
|
1205
|
-
collapsed.push(part);
|
|
1206
|
-
}
|
|
1207
|
-
if (!collapsed.every((s) => splitKeyCombination(s, true).keys.length > 0)) {
|
|
1208
|
-
consoleWarn(`Invalid hotkey sequence: "${str}" contains invalid combinations`);
|
|
1209
|
-
return [];
|
|
1210
|
-
}
|
|
1211
|
-
return collapsed;
|
|
1212
|
-
}
|
|
1213
|
-
//#endregion
|
|
1214
|
-
export { useDate as _, makeLayoutItemProps as a, useLayoutItem as c, createGoTo as d, useGoTo as f, daysDiff as g, createDate as h, createLayout as i, useResizeObserver as l, DateOptionsSymbol as m, splitKeySequence as n, makeLayoutProps as o, DateAdapterSymbol as p, VuetifyLayoutKey as r, useLayout as s, splitKeyCombination as t, GoToSymbol as u };
|