import { useLocale } from "./chunk-ENTLCOCZ.js"; import { IN_BROWSER, consoleWarn, createRange, isObject, mergeDeep, padStart, propsFactory } from "./chunk-LZ5T2ERG.js"; import { computed, inject, onScopeDispose, reactive, toValue, watch } from "./chunk-2MKFL3BX.js"; // node_modules/vuetify/lib/composables/date/adapters/vuetify.js function weekInfo(locale) { const code = locale.slice(-2).toUpperCase(); switch (true) { case locale === "GB-alt-variant": { return { firstDay: 0, firstWeekSize: 4 }; } case locale === "001": { return { firstDay: 1, firstWeekSize: 1 }; } case `AG AS BD BR BS BT BW BZ CA CO DM DO ET GT GU HK HN ID IL IN JM JP KE 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 VE VI WS YE ZA ZW`.includes(code): { return { firstDay: 0, firstWeekSize: 1 }; } case `AI AL AM AR AU AZ BA BM BN BY CL CM CN CR CY EC GE HR KG KZ LB LK LV MD ME MK MN MY NZ RO RS SI TJ TM TR UA UY UZ VN XK`.includes(code): { return { firstDay: 1, firstWeekSize: 1 }; } case `AD AN AT AX BE BG CH CZ DE DK EE ES FI FJ FO FR GB GF GP GR HU IE IS IT LI LT LU MC MQ NL NO PL RE RU SE SK SM VA`.includes(code): { return { firstDay: 1, firstWeekSize: 4 }; } case `AE AF BH DJ DZ EG IQ IR JO KW LY OM QA SD SY`.includes(code): { return { firstDay: 6, firstWeekSize: 1 }; } case code === "MV": { return { firstDay: 5, firstWeekSize: 1 }; } case code === "PT": { return { firstDay: 0, firstWeekSize: 4 }; } default: return null; } } function getWeekArray(date2, locale, firstDayOfWeek) { const weeks = []; let currentWeek = []; const firstDayOfMonth = startOfMonth(date2); const lastDayOfMonth = endOfMonth(date2); const first = firstDayOfWeek ?? weekInfo(locale)?.firstDay ?? 0; const firstDayWeekIndex = (firstDayOfMonth.getDay() - first + 7) % 7; const lastDayWeekIndex = (lastDayOfMonth.getDay() - first + 7) % 7; for (let i = 0; i < firstDayWeekIndex; i++) { const adjacentDay = new Date(firstDayOfMonth); adjacentDay.setDate(adjacentDay.getDate() - (firstDayWeekIndex - i)); currentWeek.push(adjacentDay); } for (let i = 1; i <= lastDayOfMonth.getDate(); i++) { const day = new Date(date2.getFullYear(), date2.getMonth(), i); currentWeek.push(day); if (currentWeek.length === 7) { weeks.push(currentWeek); currentWeek = []; } } for (let i = 1; i < 7 - lastDayWeekIndex; i++) { const adjacentDay = new Date(lastDayOfMonth); adjacentDay.setDate(adjacentDay.getDate() + i); currentWeek.push(adjacentDay); } if (currentWeek.length > 0) { weeks.push(currentWeek); } return weeks; } function startOfWeek(date2, locale, firstDayOfWeek) { let day = (firstDayOfWeek ?? weekInfo(locale)?.firstDay ?? 0) % 7; if (![0, 1, 2, 3, 4, 5, 6].includes(day)) { consoleWarn("Invalid firstDayOfWeek, expected discrete number in range [0-6]"); day = 0; } const d = new Date(date2); while (d.getDay() !== day) { d.setDate(d.getDate() - 1); } return d; } function endOfWeek(date2, locale) { const d = new Date(date2); const lastDay = ((weekInfo(locale)?.firstDay ?? 0) + 6) % 7; while (d.getDay() !== lastDay) { d.setDate(d.getDate() + 1); } return d; } function startOfMonth(date2) { return new Date(date2.getFullYear(), date2.getMonth(), 1); } function endOfMonth(date2) { return new Date(date2.getFullYear(), date2.getMonth() + 1, 0); } function parseLocalDate(value) { const parts = value.split("-").map(Number); return new Date(parts[0], parts[1] - 1, parts[2]); } var _YYYMMDD = /^([12]\d{3}-([1-9]|0[1-9]|1[0-2])-([1-9]|0[1-9]|[12]\d|3[01]))$/; function date(value) { if (value == null) return /* @__PURE__ */ new Date(); if (value instanceof Date) return value; if (typeof value === "string") { let parsed; if (_YYYMMDD.test(value)) { return parseLocalDate(value); } else { parsed = Date.parse(value); } if (!isNaN(parsed)) return new Date(parsed); } return null; } var sundayJanuarySecond2000 = new Date(2e3, 0, 2); function getWeekdays(locale, firstDayOfWeek, weekdayFormat) { const daysFromSunday = firstDayOfWeek ?? weekInfo(locale)?.firstDay ?? 0; return createRange(7).map((i) => { const weekday = new Date(sundayJanuarySecond2000); weekday.setDate(sundayJanuarySecond2000.getDate() + daysFromSunday + i); return new Intl.DateTimeFormat(locale, { weekday: weekdayFormat ?? "narrow" }).format(weekday); }); } function format(value, formatString, locale, formats) { const newDate = date(value) ?? /* @__PURE__ */ new Date(); const customFormat = formats?.[formatString]; if (typeof customFormat === "function") { return customFormat(newDate, formatString, locale); } let options = {}; switch (formatString) { case "fullDate": options = { year: "numeric", month: "short", day: "numeric" }; break; case "fullDateWithWeekday": options = { weekday: "long", year: "numeric", month: "long", day: "numeric" }; break; case "normalDate": const day = newDate.getDate(); const month = new Intl.DateTimeFormat(locale, { month: "long" }).format(newDate); return `${day} ${month}`; case "normalDateWithWeekday": options = { weekday: "short", day: "numeric", month: "short" }; break; case "shortDate": options = { month: "short", day: "numeric" }; break; case "year": options = { year: "numeric" }; break; case "month": options = { month: "long" }; break; case "monthShort": options = { month: "short" }; break; case "monthAndYear": options = { month: "long", year: "numeric" }; break; case "monthAndDate": options = { month: "long", day: "numeric" }; break; case "weekday": options = { weekday: "long" }; break; case "weekdayShort": options = { weekday: "short" }; break; case "dayOfMonth": return new Intl.NumberFormat(locale).format(newDate.getDate()); case "hours12h": options = { hour: "numeric", hour12: true }; break; case "hours24h": options = { hour: "numeric", hour12: false }; break; case "minutes": options = { minute: "numeric" }; break; case "seconds": options = { second: "numeric" }; break; case "fullTime": options = { hour: "numeric", minute: "numeric" }; break; case "fullTime12h": options = { hour: "numeric", minute: "numeric", hour12: true }; break; case "fullTime24h": options = { hour: "numeric", minute: "numeric", hour12: false }; break; case "fullDateTime": options = { year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric" }; break; case "fullDateTime12h": options = { year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", hour12: true }; break; case "fullDateTime24h": options = { year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", hour12: false }; break; case "keyboardDate": options = { year: "numeric", month: "2-digit", day: "2-digit" }; break; case "keyboardDateTime": options = { year: "numeric", month: "2-digit", day: "2-digit", hour: "numeric", minute: "numeric" }; return new Intl.DateTimeFormat(locale, options).format(newDate).replace(/, /g, " "); case "keyboardDateTime12h": options = { year: "numeric", month: "2-digit", day: "2-digit", hour: "numeric", minute: "numeric", hour12: true }; return new Intl.DateTimeFormat(locale, options).format(newDate).replace(/, /g, " "); case "keyboardDateTime24h": options = { year: "numeric", month: "2-digit", day: "2-digit", hour: "numeric", minute: "numeric", hour12: false }; return new Intl.DateTimeFormat(locale, options).format(newDate).replace(/, /g, " "); default: options = customFormat ?? { timeZone: "UTC", timeZoneName: "short" }; } return new Intl.DateTimeFormat(locale, options).format(newDate); } function toISO(adapter, value) { const date2 = adapter.toJsDate(value); const year = date2.getFullYear(); const month = padStart(String(date2.getMonth() + 1), 2, "0"); const day = padStart(String(date2.getDate()), 2, "0"); return `${year}-${month}-${day}`; } function parseISO(value) { const [year, month, day] = value.split("-").map(Number); return new Date(year, month - 1, day); } function addMinutes(date2, amount) { const d = new Date(date2); d.setMinutes(d.getMinutes() + amount); return d; } function addHours(date2, amount) { const d = new Date(date2); d.setHours(d.getHours() + amount); return d; } function addDays(date2, amount) { const d = new Date(date2); d.setDate(d.getDate() + amount); return d; } function addWeeks(date2, amount) { const d = new Date(date2); d.setDate(d.getDate() + amount * 7); return d; } function addMonths(date2, amount) { const d = new Date(date2); d.setDate(1); d.setMonth(d.getMonth() + amount); return d; } function getYear(date2) { return date2.getFullYear(); } function getMonth(date2) { return date2.getMonth(); } function getWeek(date2, locale, firstDayOfWeek, firstDayOfYear) { const weekInfoFromLocale = weekInfo(locale); const weekStart = firstDayOfWeek ?? weekInfoFromLocale?.firstDay ?? 0; const minWeekSize = weekInfoFromLocale?.firstWeekSize ?? 1; return firstDayOfYear !== void 0 ? calculateWeekWithFirstDayOfYear(date2, locale, weekStart, firstDayOfYear) : calculateWeekWithMinWeekSize(date2, locale, weekStart, minWeekSize); } function calculateWeekWithFirstDayOfYear(date2, locale, weekStart, firstDayOfYear) { const firstDayOfYearOffset = (7 + firstDayOfYear - weekStart) % 7; const currentWeekStart = startOfWeek(date2, locale, weekStart); const currentWeekEnd = addDays(currentWeekStart, 6); function yearStartWeekdayOffset(year2) { return (7 + new Date(year2, 0, 1).getDay() - weekStart) % 7; } let year = getYear(currentWeekStart); if (year < getYear(currentWeekEnd) && yearStartWeekdayOffset(year + 1) <= firstDayOfYearOffset) { year++; } const yearStart = new Date(year, 0, 1); const offset = yearStartWeekdayOffset(year); const d1w1 = offset <= firstDayOfYearOffset ? addDays(yearStart, -offset) : addDays(yearStart, 7 - offset); return 1 + getDiff(endOfDay(currentWeekStart), startOfDay(d1w1), "weeks"); } function calculateWeekWithMinWeekSize(date2, locale, weekStart, minWeekSize) { const currentWeekStart = startOfWeek(date2, locale, weekStart); const currentWeekEnd = addDays(startOfWeek(date2, locale, weekStart), 6); function firstWeekSize(year2) { const yearStart2 = new Date(year2, 0, 1); return 7 - getDiff(yearStart2, startOfWeek(yearStart2, locale, weekStart), "days"); } let year = getYear(currentWeekStart); if (year < getYear(currentWeekEnd) && firstWeekSize(year + 1) >= minWeekSize) { year++; } const yearStart = new Date(year, 0, 1); const size = firstWeekSize(year); const d1w1 = size >= minWeekSize ? addDays(yearStart, size - 7) : addDays(yearStart, size); return 1 + getDiff(endOfDay(currentWeekStart), startOfDay(d1w1), "weeks"); } function getDate(date2) { return date2.getDate(); } function getNextMonth(date2) { return new Date(date2.getFullYear(), date2.getMonth() + 1, 1); } function getPreviousMonth(date2) { return new Date(date2.getFullYear(), date2.getMonth() - 1, 1); } function getHours(date2) { return date2.getHours(); } function getMinutes(date2) { return date2.getMinutes(); } function startOfYear(date2) { return new Date(date2.getFullYear(), 0, 1); } function endOfYear(date2) { return new Date(date2.getFullYear(), 11, 31); } function isWithinRange(date2, range) { return isAfter(date2, range[0]) && isBefore(date2, range[1]); } function isValid(date2) { const d = new Date(date2); return d instanceof Date && !isNaN(d.getTime()); } function isAfter(date2, comparing) { return date2.getTime() > comparing.getTime(); } function isAfterDay(date2, comparing) { return isAfter(startOfDay(date2), startOfDay(comparing)); } function isBefore(date2, comparing) { return date2.getTime() < comparing.getTime(); } function isEqual(date2, comparing) { return date2.getTime() === comparing.getTime(); } function isSameDay(date2, comparing) { return date2.getDate() === comparing.getDate() && date2.getMonth() === comparing.getMonth() && date2.getFullYear() === comparing.getFullYear(); } function isSameMonth(date2, comparing) { return date2.getMonth() === comparing.getMonth() && date2.getFullYear() === comparing.getFullYear(); } function isSameYear(date2, comparing) { return date2.getFullYear() === comparing.getFullYear(); } function getDiff(date2, comparing, unit) { const d = new Date(date2); const c = new Date(comparing); switch (unit) { case "years": return d.getFullYear() - c.getFullYear(); case "quarters": return Math.floor((d.getMonth() - c.getMonth() + (d.getFullYear() - c.getFullYear()) * 12) / 4); case "months": return d.getMonth() - c.getMonth() + (d.getFullYear() - c.getFullYear()) * 12; case "weeks": return Math.floor((d.getTime() - c.getTime()) / (1e3 * 60 * 60 * 24 * 7)); case "days": return Math.floor((d.getTime() - c.getTime()) / (1e3 * 60 * 60 * 24)); case "hours": return Math.floor((d.getTime() - c.getTime()) / (1e3 * 60 * 60)); case "minutes": return Math.floor((d.getTime() - c.getTime()) / (1e3 * 60)); case "seconds": return Math.floor((d.getTime() - c.getTime()) / 1e3); default: { return d.getTime() - c.getTime(); } } } function setHours(date2, count) { const d = new Date(date2); d.setHours(count); return d; } function setMinutes(date2, count) { const d = new Date(date2); d.setMinutes(count); return d; } function setMonth(date2, count) { const d = new Date(date2); d.setMonth(count); return d; } function setDate(date2, day) { const d = new Date(date2); d.setDate(day); return d; } function setYear(date2, year) { const d = new Date(date2); d.setFullYear(year); return d; } function startOfDay(date2) { return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate(), 0, 0, 0, 0); } function endOfDay(date2) { return new Date(date2.getFullYear(), date2.getMonth(), date2.getDate(), 23, 59, 59, 999); } var VuetifyDateAdapter = class { constructor(options) { this.locale = options.locale; this.formats = options.formats; } date(value) { return date(value); } toJsDate(date2) { return date2; } toISO(date2) { return toISO(this, date2); } parseISO(date2) { return parseISO(date2); } addMinutes(date2, amount) { return addMinutes(date2, amount); } addHours(date2, amount) { return addHours(date2, amount); } addDays(date2, amount) { return addDays(date2, amount); } addWeeks(date2, amount) { return addWeeks(date2, amount); } addMonths(date2, amount) { return addMonths(date2, amount); } getWeekArray(date2, firstDayOfWeek) { const firstDay = firstDayOfWeek !== void 0 ? Number(firstDayOfWeek) : void 0; return getWeekArray(date2, this.locale, firstDay); } startOfWeek(date2, firstDayOfWeek) { const firstDay = firstDayOfWeek !== void 0 ? Number(firstDayOfWeek) : void 0; return startOfWeek(date2, this.locale, firstDay); } endOfWeek(date2) { return endOfWeek(date2, this.locale); } startOfMonth(date2) { return startOfMonth(date2); } endOfMonth(date2) { return endOfMonth(date2); } format(date2, formatString) { return format(date2, formatString, this.locale, this.formats); } isEqual(date2, comparing) { return isEqual(date2, comparing); } isValid(date2) { return isValid(date2); } isWithinRange(date2, range) { return isWithinRange(date2, range); } isAfter(date2, comparing) { return isAfter(date2, comparing); } isAfterDay(date2, comparing) { return isAfterDay(date2, comparing); } isBefore(date2, comparing) { return !isAfter(date2, comparing) && !isEqual(date2, comparing); } isSameDay(date2, comparing) { return isSameDay(date2, comparing); } isSameMonth(date2, comparing) { return isSameMonth(date2, comparing); } isSameYear(date2, comparing) { return isSameYear(date2, comparing); } setMinutes(date2, count) { return setMinutes(date2, count); } setHours(date2, count) { return setHours(date2, count); } setMonth(date2, count) { return setMonth(date2, count); } setDate(date2, day) { return setDate(date2, day); } setYear(date2, year) { return setYear(date2, year); } getDiff(date2, comparing, unit) { return getDiff(date2, comparing, unit); } getWeekdays(firstDayOfWeek, weekdayFormat) { const firstDay = firstDayOfWeek !== void 0 ? Number(firstDayOfWeek) : void 0; return getWeekdays(this.locale, firstDay, weekdayFormat); } getYear(date2) { return getYear(date2); } getMonth(date2) { return getMonth(date2); } getWeek(date2, firstDayOfWeek, firstDayOfYear) { const firstDay = firstDayOfWeek !== void 0 ? Number(firstDayOfWeek) : void 0; const firstWeekStart = firstDayOfYear !== void 0 ? Number(firstDayOfYear) : void 0; return getWeek(date2, this.locale, firstDay, firstWeekStart); } getDate(date2) { return getDate(date2); } getNextMonth(date2) { return getNextMonth(date2); } getPreviousMonth(date2) { return getPreviousMonth(date2); } getHours(date2) { return getHours(date2); } getMinutes(date2) { return getMinutes(date2); } startOfDay(date2) { return startOfDay(date2); } endOfDay(date2) { return endOfDay(date2); } startOfYear(date2) { return startOfYear(date2); } endOfYear(date2) { return endOfYear(date2); } }; // node_modules/vuetify/lib/composables/date/date.js var DateOptionsSymbol = /* @__PURE__ */ Symbol.for("vuetify:date-options"); var DateAdapterSymbol = /* @__PURE__ */ Symbol.for("vuetify:date-adapter"); function createDate(options, locale) { const _options = mergeDeep({ adapter: VuetifyDateAdapter, locale: { af: "af-ZA", // ar: '', # not the same value for all variants bg: "bg-BG", ca: "ca-ES", ckb: "", cs: "cs-CZ", de: "de-DE", el: "el-GR", en: "en-US", // es: '', # not the same value for all variants et: "et-EE", fa: "fa-IR", fi: "fi-FI", // fr: '', #not the same value for all variants hr: "hr-HR", hu: "hu-HU", he: "he-IL", id: "id-ID", it: "it-IT", ja: "ja-JP", ko: "ko-KR", lv: "lv-LV", lt: "lt-LT", nl: "nl-NL", no: "no-NO", pl: "pl-PL", pt: "pt-PT", ro: "ro-RO", ru: "ru-RU", sk: "sk-SK", sl: "sl-SI", srCyrl: "sr-SP", srLatn: "sr-SP", sv: "sv-SE", th: "th-TH", tr: "tr-TR", az: "az-AZ", uk: "uk-UA", vi: "vi-VN", zhHans: "zh-CN", zhHant: "zh-TW" } }, options); return { options: _options, instance: createInstance(_options, locale) }; } function createDateRange(adapter, start, stop) { const diff = daysDiff(adapter, start, stop); const datesInRange = [start]; for (let i = 1; i < diff; i++) { const nextDate = adapter.addDays(start, i); datesInRange.push(nextDate); } if (stop) { datesInRange.push(adapter.endOfDay(stop)); } return datesInRange; } function daysDiff(adapter, start, stop) { const iso = [`${adapter.toISO(stop ?? start).split("T")[0]}T00:00:00Z`, `${adapter.toISO(start).split("T")[0]}T00:00:00Z`]; return typeof adapter.date() === "string" ? adapter.getDiff(iso[0], iso[1], "days") : adapter.getDiff(adapter.date(iso[0]), adapter.date(iso[1]), "days"); } function createInstance(options, locale) { const instance = reactive(typeof options.adapter === "function" ? new options.adapter({ locale: options.locale[locale.current.value] ?? locale.current.value, formats: options.formats }) : options.adapter); watch(locale.current, (value) => { instance.locale = options.locale[value] ?? value ?? instance.locale; }); return instance; } function useDate() { const options = inject(DateOptionsSymbol); if (!options) throw new Error("[Vuetify] Could not find injected date options"); const locale = useLocale(); return createInstance(options, locale); } // node_modules/vuetify/lib/composables/hotkey/key-aliases.js var keyAliasMap = { // Modifier aliases (from vue-use, other libraries, and current implementation) control: "ctrl", command: "cmd", option: "alt", // Arrow key aliases (common abbreviations) up: "arrowup", down: "arrowdown", left: "arrowleft", right: "arrowright", // Other common key aliases esc: "escape", spacebar: " ", space: " ", return: "enter", del: "delete", // Symbol aliases (existing from hotkey-parsing.ts) minus: "-", hyphen: "-" }; function normalizeKey(key) { const lowerKey = key.toLowerCase(); return keyAliasMap[lowerKey] || lowerKey; } // node_modules/vuetify/lib/composables/hotkey/hotkey-parsing.js function splitKeyCombination(combination) { let isInternal = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false; const emptyResult = { keys: [], separators: [] }; if (!combination) { if (!isInternal) consoleWarn("Invalid hotkey combination: empty string provided"); return emptyResult; } const hasInvalidLeadingSeparator = combination.length > 1 && // Starts with a single separator followed by a non-separator character (e.g. '+a', '_a') ["+", "/", "_"].some((v) => combination.startsWith(v)) && !["++", "//", "__"].some((v) => combination.startsWith(v)); const hasInvalidStructure = hasInvalidLeadingSeparator || // Disallow literal + or _ keys (they require shift) combination.includes("++") || combination.includes("__") || combination === "+" || combination === "_" || // Ends with a separator that is not part of a doubled literal combination.length > 1 && (combination.endsWith("+") || combination.endsWith("_")) && combination.at(-2) !== combination.at(-1) || // Stand-alone doubled separators (dangling) combination === "++" || combination === "--" || combination === "__"; if (hasInvalidStructure) { if (!isInternal) consoleWarn(`Invalid hotkey combination: "${combination}" has invalid structure`); return emptyResult; } const keys = []; const separators = []; let buffer = ""; const flushBuffer = (separator) => { if (buffer) { separator && separators.push(separator); keys.push(normalizeKey(buffer)); buffer = ""; } }; for (let i = 0; i < combination.length; i++) { const char = combination[i]; const nextChar = combination[i + 1]; if (["+", "/", "_", "-"].includes(char)) { if (char === nextChar) { flushBuffer(char); keys.push(char); i++; } else if (["+", "/", "_"].includes(char)) { flushBuffer(char); } else { buffer += char; } } else { buffer += char; } } flushBuffer(); const hasInvalidMinus = keys.some((key) => key.length > 1 && key.includes("-") && key !== "--"); if (hasInvalidMinus) { if (!isInternal) consoleWarn(`Invalid hotkey combination: "${combination}" has invalid structure`); return emptyResult; } if (keys.length === 0 && combination) { return { keys: [normalizeKey(combination)], separators }; } return { keys, separators }; } function splitKeySequence(str) { if (!str) { consoleWarn("Invalid hotkey sequence: empty string provided"); return []; } const hasInvalidStart = str.startsWith("-") && !["---", "--+"].includes(str); const hasInvalidEnd = str.endsWith("-") && !str.endsWith("+-") && !str.endsWith("_-") && str !== "-" && str !== "---"; if (hasInvalidStart || hasInvalidEnd) { consoleWarn(`Invalid hotkey sequence: "${str}" contains invalid combinations`); return []; } const result = []; let buffer = ""; let i = 0; while (i < str.length) { const char = str[i]; if (char === "-") { const prevChar = str[i - 1]; const prevPrevChar = i > 1 ? str[i - 2] : void 0; const precededBySeparator = ["+", "_"].includes(prevChar) && !["+", "/"].includes(prevPrevChar ?? ""); if (precededBySeparator) { buffer += char; i++; } else { if (buffer) { result.push(buffer); buffer = ""; } else { result.push("-"); } i++; } } else { buffer += char; i++; } } if (buffer) { result.push(buffer); } const collapsed = []; let minusCount = 0; for (const part of result) { if (part === "-") { if (minusCount % 2 === 0) collapsed.push("-"); minusCount++; } else { minusCount = 0; collapsed.push(part); } } const areAllValid = collapsed.every((s) => splitKeyCombination(s, true).keys.length > 0); if (!areAllValid) { consoleWarn(`Invalid hotkey sequence: "${str}" contains invalid combinations`); return []; } return collapsed; } // node_modules/vuetify/lib/composables/hotkey/hotkey.js function useHotkey(keys, callback) { let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; if (!IN_BROWSER) return function() { }; const { event = "keydown", inputs = false, preventDefault = true, sequenceTimeout = 1e3 } = options; const isMac = navigator?.userAgent?.includes("Macintosh") ?? false; let timeout = 0; let keyGroups; let isSequence = false; let groupIndex = 0; function isInputFocused() { if (toValue(inputs)) return false; const activeElement = document.activeElement; return activeElement && (activeElement.tagName === "INPUT" || activeElement.tagName === "TEXTAREA" || activeElement.isContentEditable || activeElement.contentEditable === "true"); } function resetSequence() { groupIndex = 0; clearTimeout(timeout); } function handler(e) { const group = keyGroups[groupIndex]; if (!group || isInputFocused()) return; if (!matchesKeyGroup(e, group, isMac)) { if (isSequence) resetSequence(); return; } if (toValue(preventDefault)) e.preventDefault(); if (!isSequence) { callback(e); return; } clearTimeout(timeout); groupIndex++; if (groupIndex === keyGroups.length) { callback(e); resetSequence(); return; } timeout = window.setTimeout(resetSequence, toValue(sequenceTimeout)); } function cleanup() { window.removeEventListener(toValue(event), handler); clearTimeout(timeout); } watch(() => toValue(keys), (newKeys) => { cleanup(); if (newKeys) { const groups = splitKeySequence(newKeys.toLowerCase()); isSequence = groups.length > 1; keyGroups = groups; resetSequence(); window.addEventListener(toValue(event), handler); } }, { immediate: true }); watch(() => toValue(event), (newEvent, oldEvent) => { if (oldEvent && keyGroups && keyGroups.length > 0) { window.removeEventListener(oldEvent, handler); window.addEventListener(newEvent, handler); } }); onScopeDispose(cleanup, true); return cleanup; } function matchesKeyGroup(e, group, isMac) { const { modifiers, actualKey } = parseKeyGroup(group); const expectCtrl = modifiers.ctrl || !isMac && (modifiers.cmd || modifiers.meta); const expectMeta = isMac && (modifiers.cmd || modifiers.meta); return e.ctrlKey === expectCtrl && e.metaKey === expectMeta && e.shiftKey === modifiers.shift && e.altKey === modifiers.alt && e.key.toLowerCase() === actualKey?.toLowerCase(); } function parseKeyGroup(group) { const MODIFIERS = ["ctrl", "shift", "alt", "meta", "cmd"]; const { keys: parts } = splitKeyCombination(group.toLowerCase()); if (parts.length === 0) { return { modifiers: Object.fromEntries(MODIFIERS.map((m) => [m, false])), actualKey: void 0 }; } const modifiers = Object.fromEntries(MODIFIERS.map((m) => [m, false])); let actualKey; for (const part of parts) { if (MODIFIERS.includes(part)) { modifiers[part] = true; } else { actualKey = part; } } return { modifiers, actualKey }; } // node_modules/vuetify/lib/composables/mask/mask.js var makeMaskProps = propsFactory({ mask: [String, Object] }, "mask"); var defaultDelimiters = /[-!$%^&*()_+|~=`{}[\]:";'<>?,./\\ ]/; var presets = { "credit-card": "#### - #### - #### - ####", date: "##/##/####", "date-time": "##/##/#### ##:##", "iso-date": "####-##-##", "iso-date-time": "####-##-## ##:##", phone: "(###) ### - ####", social: "###-##-####", time: "##:##", "time-with-seconds": "##:##:##" }; var defaultTokens = { "#": { pattern: /[0-9]/ }, A: { pattern: /[A-Z]/i, convert: (v) => v.toUpperCase() }, a: { pattern: /[a-z]/i, convert: (v) => v.toLowerCase() }, N: { pattern: /[0-9A-Z]/i, convert: (v) => v.toUpperCase() }, n: { pattern: /[0-9a-z]/i, convert: (v) => v.toLowerCase() }, X: { pattern: defaultDelimiters } }; function useMask(props) { const mask = computed(() => { if (typeof props.mask === "string") { if (props.mask in presets) return presets[props.mask]; return props.mask; } return props.mask?.mask ?? ""; }); const tokens = computed(() => { return { ...defaultTokens, ...isObject(props.mask) ? props.mask.tokens : null }; }); function isMask(char) { return char in tokens.value; } function maskValidates(mask2, char) { if (char == null || !isMask(mask2)) return false; const item = tokens.value[mask2]; if (item.pattern) return item.pattern.test(char); return item.test(char); } function convert(mask2, char) { const item = tokens.value[mask2]; return item.convert ? item.convert(char) : char; } function maskText(text) { const trimmedText = text?.trim().replace(/\s+/g, " "); if (trimmedText == null) return ""; if (!mask.value.length || !trimmedText.length) return trimmedText; let textIndex = 0; let maskIndex = 0; let newText = ""; while (maskIndex < mask.value.length) { const mchar = mask.value[maskIndex]; const tchar = trimmedText[textIndex]; if (mchar === "\\") { newText += mask.value[maskIndex + 1]; maskIndex += 2; continue; } if (!isMask(mchar)) { newText += mchar; if (tchar === mchar) { textIndex++; } } else if (maskValidates(mchar, tchar)) { newText += convert(mchar, tchar); textIndex++; } else { break; } maskIndex++; } return newText; } function unmaskText(text) { if (text == null) return null; if (!mask.value.length || !text.length) return text; let textIndex = 0; let maskIndex = 0; let newText = ""; while (true) { const mchar = mask.value[maskIndex]; const tchar = text[textIndex]; if (tchar == null) break; if (mchar == null) { newText += tchar; textIndex++; continue; } if (mchar === "\\") { if (tchar === mask.value[maskIndex + 1]) { textIndex++; } maskIndex += 2; continue; } if (maskValidates(mchar, tchar)) { newText += tchar; textIndex++; maskIndex++; continue; } else if (mchar !== tchar) { while (true) { const mchar2 = mask.value[maskIndex++]; if (mchar2 == null || maskValidates(mchar2, tchar)) break; } continue; } textIndex++; maskIndex++; } return newText; } function isValid2(text) { if (!text) return false; return unmaskText(text) === unmaskText(maskText(text)); } function isComplete(text) { if (!text) return false; const maskedText = maskText(text); return maskedText.length === mask.value.length && isValid2(text); } return { isValid: isValid2, isComplete, mask: maskText, unmask: unmaskText }; } export { DateOptionsSymbol, DateAdapterSymbol, createDate, createDateRange, daysDiff, useDate, splitKeyCombination, splitKeySequence, useHotkey, useMask }; //# sourceMappingURL=chunk-WGYWYQOA.js.map