rei-kit 0.1.0 → 0.2.0
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/README.md +21 -0
- package/dist/components/GoogleButton.vue.d.ts +10 -0
- package/dist/components/TabBar.vue.d.ts +34 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +761 -66
- package/dist/index.js.map +1 -1
- package/dist/styles.css +305 -0
- package/package.json +7 -2
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["$attrs","$slots"],"sources":["../src/utils/date.ts","../src/utils/format.ts","../src/utils/day-label.ts","../src/utils/download.ts","../src/utils/redirect.ts","../src/utils/haptics.ts","../src/utils/platform.ts","../src/composables/use-theme.ts","../src/composables/use-today.ts","../src/composables/use-online.ts","../src/composables/use-debounced-callback.ts","../src/composables/use-drag-scroll.ts","../src/composables/use-visual-viewport.ts","../src/components/BaseButton.vue","../src/components/BaseButton.vue","../src/components/BaseInput.vue","../src/components/BaseInput.vue","../src/components/BaseSheet.vue","../src/components/BaseSheet.vue","../src/components/EmptyState.vue","../src/components/EmptyState.vue","../src/components/PageHeader.vue","../src/components/PageHeader.vue","../src/components/ToneDot.vue","../src/components/ToneDot.vue","../src/components/SectionHeading.vue","../src/components/SectionHeading.vue","../src/components/SegmentedControl.vue","../src/components/SegmentedControl.vue","../src/components/SettingsGroup.vue","../src/components/SettingsGroup.vue","../src/components/SettingsRow.vue","../src/components/SettingsRow.vue","../src/components/SkeletonList.vue","../src/components/SkeletonList.vue","../src/components/StatCard.vue","../src/components/StatCard.vue","../src/components/LocaleLinks.vue","../src/components/LocaleLinks.vue","../src/i18n/runtime.ts","../src/index.ts"],"sourcesContent":["/**\n * Local calendar-day helpers.\n *\n * Every function is pure and works on `YYYY-MM-DD` keys, the same shape as the\n * `date` columns in Postgres. Nothing here calls `toISOString`: that converts to\n * UTC, so in a UTC+9 timezone every entry made between midnight and 09:00 would\n * be written to the previous day.\n */\n\n/**\n * Formats a `Date` as a local `YYYY-MM-DD` key.\n *\n * @param date - Any `Date`; only its local year, month and day are read.\n * @returns The calendar day in the runtime's own timezone.\n *\n * @example\n * ```ts\n * // 2026-08-23 01:30 in Tokyo\n * toDateKey(new Date()) // '2026-08-23'\n * new Date().toISOString() // '2026-08-22T16:30…' ← the bug\n * ```\n */\nexport function toDateKey(date: Date): string {\n const year = String(date.getFullYear()).padStart(4, '0')\n const month = String(date.getMonth() + 1).padStart(2, '0')\n const day = String(date.getDate()).padStart(2, '0')\n\n return `${year}-${month}-${day}`\n}\n\n/** Today's key in the user's own timezone. */\nexport function todayKey(): string {\n return toDateKey(new Date())\n}\n\n/**\n * Parses a `YYYY-MM-DD` key into a `Date` at local midnight.\n *\n * @param key - A key produced by {@link toDateKey}.\n * @returns Local midnight of that calendar day.\n * @throws If the key is not three numeric parts.\n *\n * @example\n * ```ts\n * fromDateKey('2026-08-23') // local midnight, correct\n * new Date('2026-08-23') // UTC midnight — shifts a day in some zones\n * ```\n */\nexport function fromDateKey(key: string): Date {\n const [year, month, day] = key.split('-').map(Number)\n\n if (year === undefined || month === undefined || day === undefined) {\n throw new Error(`Invalid date key: ${key}`)\n }\n\n return new Date(year, month - 1, day)\n}\n\n/**\n * Shifts a date key by whole calendar days.\n *\n * Uses `setDate`, which is calendar-aware: it rolls over month and year ends,\n * and stays correct across daylight-saving transitions. Adding\n * `days * 86_400_000` milliseconds would not — a DST day is 23 or 25 hours long.\n *\n * @param key - Starting `YYYY-MM-DD` key.\n * @param days - Days to add; negative goes back.\n * @returns The resulting key.\n *\n * @example\n * ```ts\n * addDays('2026-01-31', 1) // '2026-02-01'\n * addDays('2026-01-01', -1) // '2025-12-31'\n * addDays('2028-02-28', 1) // '2028-02-29' — leap year\n * ```\n */\nexport function addDays(key: string, days: number): string {\n const date = fromDateKey(key)\n date.setDate(date.getDate() + days)\n\n return toDateKey(date)\n}\n\n/**\n * The last `count` days ending today, oldest first.\n *\n * `today` is a parameter so the function stays pure and testable; call sites\n * normally omit it.\n *\n * @param count - How many days to return, including `today`.\n * @param today - End of the range. Defaults to the real today.\n * @returns Keys in ascending order.\n *\n * @example\n * ```ts\n * lastNDays(3, '2026-08-23') // ['2026-08-21', '2026-08-22', '2026-08-23']\n * ```\n */\nexport function lastNDays(count: number, today: string = todayKey()): string[] {\n const keys: string[] = []\n\n for (let offset = count - 1; offset >= 0; offset -= 1) {\n keys.push(addDays(today, -offset))\n }\n\n return keys\n}\n\n/** 0 = week starts on Sunday, 1 = on Monday. Mirrors `profiles.week_starts_on`. */\nexport type WeekStart = 0 | 1\n\n/**\n * The first day of the week containing `key`.\n *\n * The user's preference is a parameter, not a module-level setting: changing it\n * in Profile has to re-render the week grid and the year heatmap immediately,\n * and a global would make that a hidden dependency.\n *\n * @param key - Any day in the week.\n * @param weekStartsOn - 0 for Sunday, 1 for Monday.\n * @returns Key of that week's first day.\n *\n * @example\n * ```ts\n * // 2026-08-23 is a Sunday\n * startOfWeek('2026-08-23', 1) // '2026-08-17' — previous Monday\n * startOfWeek('2026-08-23', 0) // '2026-08-23' — already Sunday\n * ```\n */\nexport function startOfWeek(key: string, weekStartsOn: WeekStart): string {\n const weekday = fromDateKey(key).getDay()\n const offset = (weekday - weekStartsOn + 7) % 7\n\n return addDays(key, -offset)\n}\n\n/**\n * Every day of a calendar year, in order.\n *\n * Leap years fall out of the loop for free: it walks day by day until the year\n * rolls over, so February 29 is included when it exists.\n *\n * @param year - Four-digit year.\n * @returns 365 or 366 keys, oldest first.\n */\nexport function eachDayOfYear(year: number): string[] {\n const keys: string[] = []\n const date = new Date(year, 0, 1)\n\n while (date.getFullYear() === year) {\n keys.push(toDateKey(date))\n date.setDate(date.getDate() + 1)\n }\n\n return keys\n}\n\n/**\n * Empty cells before a block's first day in a seven-row column grid.\n *\n * The grid fills column by column, so the first column is only partly used\n * unless the block starts exactly on the week's first day. An off-by-one here\n * shifts the whole block by a row, so this is unit tested.\n *\n * @param firstDayKey - First day of the block, e.g. `'2026-02-01'`.\n * @param weekStartsOn - 0 for Sunday, 1 for Monday.\n * @returns 0-6 blank cells.\n *\n * @example\n * ```ts\n * leadingBlanks('2026-01-01', 1) // 3 — a Thursday, Mon-Wed are blank\n * leadingBlanks('2024-01-01', 1) // 0 — a Monday\n * ```\n */\nexport function leadingBlanks(firstDayKey: string, weekStartsOn: WeekStart): number {\n return (fromDateKey(firstDayKey).getDay() - weekStartsOn + 7) % 7\n}\n","import { ref } from 'vue'\n\n/**\n * The locale `Intl` formatting uses.\n *\n * Held here rather than imported from an i18n runtime so the utilities have no\n * i18n dependency at all: an app that never installs vue-i18n still gets dates\n * in the right language. `createI18nRuntime` sets this when it is used.\n */\nconst locale = ref<string>(typeof navigator === 'undefined' ? 'en' : (navigator.language ?? 'en'))\n\n/**\n * Points every formatter at a new locale.\n *\n * @example\n * ```ts\n * setFormatLocale('tr-TR')\n * ```\n */\nexport function setFormatLocale(next: string): void {\n locale.value = next\n}\n\n/**\n * `Intl.DateTimeFormat` is expensive to construct, so instances are cached per\n * locale and option set. The key includes the locale, which is what lets the\n * cache survive a language change instead of returning stale formatters.\n */\nconst cache = new Map<string, Intl.DateTimeFormat>()\n\n/**\n * Formats a date in the active locale.\n *\n * Reading the locale ref here is deliberate: called from a `computed`, the\n * result re-evaluates when the language changes.\n *\n * @param date - Date to format.\n * @param options - Passed straight to `Intl.DateTimeFormat`.\n *\n * @example\n * ```ts\n * formatDate(new Date(), { weekday: 'narrow' }) // 'T'\n * ```\n */\nexport function formatDate(date: Date, options: Intl.DateTimeFormatOptions): string {\n const tag = locale.value\n const key = `${tag}:${JSON.stringify(options)}`\n\n let formatter = cache.get(key)\n if (!formatter) {\n formatter = new Intl.DateTimeFormat(tag, options)\n cache.set(key, formatter)\n }\n\n return formatter.format(date)\n}\n","import { addDays, fromDateKey } from './date'\nimport { formatDate } from './format'\n\n/** The two days worth naming rather than numbering. */\nexport interface DayLabels {\n today: string\n yesterday: string\n}\n\n/**\n * A short name for a day, relative to today.\n *\n * \"Today\" and \"Yesterday\" are worth spelling out — they are the two a user\n * actually reaches for. Anything older gets its weekday, which inside a\n * five-day window is unambiguous and stays two or three characters in every\n * language.\n *\n * The two words are arguments rather than translated here: a library that calls\n * `t()` forces every consumer onto one i18n setup.\n *\n * @param dateKey - The day to label (`YYYY-MM-DD`).\n * @param today - Today's key, passed in so the caller controls the clock.\n * @param labels - What to call today and yesterday.\n *\n * @example\n * ```ts\n * relativeDayLabel('2026-08-28', '2026-08-31', { today: 'Today', yesterday: 'Yesterday' })\n * // 'Fri'\n * ```\n */\nexport function relativeDayLabel(dateKey: string, today: string, labels: DayLabels): string {\n if (dateKey === today) return labels.today\n if (dateKey === addDays(today, -1)) return labels.yesterday\n\n return formatDate(fromDateKey(dateKey), { weekday: 'short' })\n}\n","/**\n * Hands the user a file without a server round trip.\n *\n * @param data - Anything `JSON.stringify` can serialise.\n * @param filename - Suggested name, e.g. `hibi-export-2026-08-24.json`.\n */\nexport function downloadJson(data: unknown, filename: string): void {\n const blob = new Blob([JSON.stringify(data, null, 2)], { type: 'application/json' })\n const url = URL.createObjectURL(blob)\n const link = document.createElement('a')\n\n link.href = url\n link.download = filename\n link.click()\n\n URL.revokeObjectURL(url)\n}\n","/**\n * What a router hands back for one query key.\n *\n * Inlined rather than imported from vue-router: the shape is `string | null`\n * either way, and a helper this small should not drag a router into the\n * package's dependencies.\n */\nexport type QueryValue = string | null\n\n/**\n * Resolves a `?redirect=` query value into a safe in-app path.\n *\n * Only same-origin paths are accepted. Anything else falls back to `/`,\n * so a crafted link cannot bounce a user from the real login page to a\n * phishing clone.\n *\n * Pure: takes the query value instead of reading the router, so it also\n * works inside navigation guards and can be unit tested.\n *\n * @param target - Raw `route.query.redirect` value. May be a string, an\n * array (repeated query key), `null`, or `undefined`.\n * @returns A path starting with a single `/`. Defaults to `/`.\n *\n * @example\n * ```ts\n * // in a view\n * await router.push(safeRedirect(route.query.redirect))\n *\n * // in a guard\n * return safeRedirect(to.query.redirect)\n * ```\n *\n * @example\n * ```ts\n * safeRedirect('/week') // '/week'\n * safeRedirect('https://evil.com') // '/'\n * safeRedirect('//evil.com') // '/' (protocol-relative URL)\n * safeRedirect(['/a', '/b']) // '/'\n * safeRedirect(undefined) // '/'\n * ```\n */\nexport function safeRedirect(target: QueryValue | QueryValue[] | undefined): string {\n if (typeof target === 'string' && target.startsWith('/') && !target.startsWith('//')) {\n return target\n }\n\n return '/'\n}\n","/**\n * A short vibration for a confirmed tap.\n *\n * Optional chaining is not decoration: iOS Safari has no `vibrate` at all, and\n * calling it unguarded would throw on every marked day.\n *\n * @param duration - Milliseconds. Keep it under ~15ms; longer reads as an alert.\n */\nexport function tapFeedback(duration = 10): void {\n navigator.vibrate?.(duration)\n}\n","/**\n * Whether the app is running from the Home Screen rather than a browser tab.\n *\n * Two checks because iOS predates the standard one: `display-mode: standalone`\n * is the modern signal, `navigator.standalone` is Safari's own.\n */\nexport function isInstalled(): boolean {\n if (typeof window === 'undefined') return false\n\n return (\n window.matchMedia('(display-mode: standalone)').matches ||\n (navigator as Navigator & { standalone?: boolean }).standalone === true\n )\n}\n\n/** iPhone and iPad, including iPadOS reporting itself as a Mac. */\nexport function isApplePortable(): boolean {\n if (typeof window === 'undefined') return false\n\n return (\n /iPad|iPhone|iPod/.test(navigator.userAgent) ||\n (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)\n )\n}\n\n/**\n * Whether this device can only receive notifications once the app is installed.\n *\n * Safari on iOS grants notification permission to an installed web app and to\n * nothing else — in a normal tab the request does not even prompt. Telling the\n * user to allow notifications there is asking for something the browser will\n * not offer, so the UI has to say \"add to Home Screen\" instead.\n *\n * @example\n * ```ts\n * if (needsIosInstall()) // show the Home Screen instruction, not the button\n * ```\n */\nexport function needsIosInstall(): boolean {\n return isApplePortable() && !isInstalled()\n}\n","import { ref, watch } from 'vue'\nimport type { Ref } from 'vue'\n\n/** What the user asked for; `system` follows the OS. */\nexport type ThemePreference = 'system' | 'light' | 'dark'\n\n/**\n * Namespaced by the app, not by this package.\n *\n * Two rei-kit apps served from the same origin would otherwise share one theme\n * setting — and during development on localhost, they will be.\n */\nlet storageKey = 'rei-theme'\n\nexport function isThemePreference(value: unknown): value is ThemePreference {\n return value === 'system' || value === 'light' || value === 'dark'\n}\n\n/** Reads the stored preference, falling back to `system`. */\nexport function readStoredTheme(): ThemePreference {\n try {\n const stored = localStorage.getItem(storageKey)\n\n return isThemePreference(stored) ? stored : 'system'\n } catch {\n return 'system'\n }\n}\n\nfunction storeTheme(preference: ThemePreference): void {\n try {\n localStorage.setItem(storageKey, preference)\n } catch {\n // Private mode or blocked storage: the choice just will not persist.\n }\n}\n\n/** Adds or removes `.dark` on `<html>`, resolving `system` against the OS. */\nexport function applyTheme(preference: ThemePreference): void {\n const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches\n const isDark = preference === 'dark' || (preference === 'system' && prefersDark)\n\n document.documentElement.classList.toggle('dark', isDark)\n}\n\n/**\n * The shared preference, created on first use rather than at import.\n *\n * Lazy on purpose: reading storage at import time would lock in the default key\n * before an app had a chance to set its own, leaving the controller reading one\n * key and writing another.\n */\nlet preference: Ref<ThemePreference> | null = null\n\nfunction controller(): Ref<ThemePreference> {\n if (preference) return preference\n\n preference = ref<ThemePreference>(readStoredTheme())\n\n watch(\n preference,\n (next) => {\n storeTheme(next)\n applyTheme(next)\n },\n { immediate: true },\n )\n\n // While on `system`, follow the OS if the user flips it at night.\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => {\n if (preference?.value === 'system') applyTheme('system')\n })\n\n return preference\n}\n\n/**\n * Sets where the preference is stored.\n *\n * Safe in either order: called before the first `useTheme()` it simply changes\n * the key, and called after it re-reads under the new one, so the controller\n * never reads from one key while writing to another.\n *\n * @example\n * ```ts\n * setThemeStorageKey('hibi-theme') // once, at startup\n * ```\n */\nexport function setThemeStorageKey(key: string): void {\n storageKey = key\n if (preference) preference.value = readStoredTheme()\n}\n\n/** @returns The shared preference ref; assigning to it stores and applies it. */\nexport function useTheme(): Ref<ThemePreference> {\n return controller()\n}\n","import { readonly, ref } from 'vue'\n\nimport { todayKey } from '../utils/date'\n\n/**\n * Today's date key, kept current while the app stays open.\n *\n * `todayKey()` called once in `setup` freezes the date for the lifetime of the\n * component. Nobody notices in a session that lasts minutes, but a phone left\n * on the Today screen overnight would keep marking yesterday, and the Week grid\n * would disable the column that just became today.\n */\nconst current = ref(todayKey())\n\nlet timer: ReturnType<typeof setTimeout> | undefined\n\n/** A second past midnight, so a fast timer cannot fire on the old date. */\nfunction msUntilMidnight(): number {\n const now = new Date()\n const next = new Date(now.getFullYear(), now.getMonth(), now.getDate() + 1, 0, 0, 1)\n\n return next.getTime() - now.getTime()\n}\n\nfunction refresh() {\n current.value = todayKey()\n}\n\nfunction schedule() {\n clearTimeout(timer)\n timer = setTimeout(() => {\n refresh()\n schedule()\n }, msUntilMidnight())\n}\n\nschedule()\n\n// A sleeping phone does not run timers reliably, so the tab also re-checks the\n// moment it comes back — which is when the user would see a stale date.\ndocument.addEventListener('visibilitychange', () => {\n if (document.visibilityState !== 'visible') return\n\n refresh()\n schedule()\n})\n\n/**\n * @returns Read-only ref holding today's `YYYY-MM-DD` key.\n *\n * @example\n * ```ts\n * const today = useToday()\n * const isFuture = computed(() => day > today.value)\n * ```\n */\nexport function useToday() {\n return readonly(current)\n}\n","import { onMounted, onUnmounted, readonly, ref } from 'vue'\n\n/**\n * Tracks whether the browser thinks it has a network connection.\n *\n * Note the limit: `navigator.onLine` only reports whether a network interface\n * is up, not whether requests actually succeed. Treat it as a hint for the UI,\n * never as a reason to skip error handling.\n *\n * Listeners are removed on unmount, so the composable is safe to call per view.\n *\n * @returns A readonly ref that flips with the browser's online/offline events.\n *\n * @example\n * ```ts\n * const isOnline = useOnline()\n * // <p v-if=\"!isOnline\">You're offline.</p>\n * ```\n */\nexport function useOnline() {\n const isOnline = ref(true)\n\n function update() {\n isOnline.value = navigator.onLine\n }\n\n onMounted(() => {\n update()\n window.addEventListener('online', update)\n window.addEventListener('offline', update)\n })\n\n onUnmounted(() => {\n window.removeEventListener('online', update)\n window.removeEventListener('offline', update)\n })\n\n return readonly(isOnline)\n}\n","import { onScopeDispose } from 'vue'\n\n/**\n * Delays a callback until the caller stops calling it.\n *\n * Used for note autosave: a request per keystroke would be wasteful, but losing\n * the last keystrokes when the user navigates away would be worse — so the\n * pending call is flushed on dispose, and `flush` is exposed for route guards.\n *\n * @param callback - Runs with the arguments of the most recent call.\n * @param delay - Quiet period in milliseconds.\n * @returns `run` to schedule, `flush` to run now, `cancel` to drop.\n *\n * @example\n * ```ts\n * const save = useDebouncedCallback((body: string) => mutate(body), 800)\n * watch(text, (value) => save.run(value))\n * onBeforeRouteLeave(() => save.flush())\n * ```\n */\nexport function useDebouncedCallback<A extends unknown[]>(\n callback: (...args: A) => void,\n delay = 800,\n) {\n let timer: ReturnType<typeof setTimeout> | null = null\n let pending: A | null = null\n\n /** Runs the pending call right now, if there is one. */\n function flush() {\n if (timer !== null) clearTimeout(timer)\n timer = null\n\n if (pending !== null) {\n const args = pending\n pending = null\n callback(...args)\n }\n }\n\n /** Drops the pending call without running it. */\n function cancel() {\n if (timer !== null) clearTimeout(timer)\n timer = null\n pending = null\n }\n\n function run(...args: A) {\n pending = args\n if (timer !== null) clearTimeout(timer)\n timer = setTimeout(flush, delay)\n }\n\n // A closing sheet or an unmounting view must not eat the last keystrokes.\n onScopeDispose(flush)\n\n return { run, flush, cancel }\n}\n","import { onScopeDispose, watch } from 'vue'\nimport type { Ref } from 'vue'\n\n/** Movement before a press counts as a drag rather than a tap. */\nconst DRAG_THRESHOLD_PX = 6\n\n/**\n * Drag-to-scroll for a horizontally scrolling element.\n *\n * The app puts `touch-action: pan-y` on the page content so the tab-swipe\n * gesture keeps its pointer events — the browser never claims a horizontal\n * drag, which also means it never pans this element natively. Rather than give\n * that up, horizontal scrolling is driven here.\n *\n * @param target - The scroll container.\n * @returns `didDrag`, so a click handler can ignore the press that ended a drag.\n *\n * @example\n * ```ts\n * const scroller = ref<HTMLElement | null>(null)\n * const { didDrag } = useDragScroll(scroller)\n *\n * function onClick() {\n * if (didDrag()) return\n * // …treat as a tap\n * }\n * ```\n */\nexport function useDragScroll(target: Ref<HTMLElement | null>) {\n let pointerId: number | null = null\n let startX = 0\n let startScroll = 0\n let dragged = false\n\n function onPointerDown(event: PointerEvent) {\n const element = target.value\n if (!element || event.pointerType === 'mouse') return\n\n pointerId = event.pointerId\n startX = event.clientX\n startScroll = element.scrollLeft\n dragged = false\n }\n\n function onPointerMove(event: PointerEvent) {\n const element = target.value\n if (!element || event.pointerId !== pointerId) return\n\n const dx = event.clientX - startX\n if (!dragged && Math.abs(dx) < DRAG_THRESHOLD_PX) return\n\n // Capture only once the gesture is clearly horizontal, so a vertical scroll\n // that happens to start here still belongs to the page.\n if (!dragged) {\n dragged = true\n element.setPointerCapture(event.pointerId)\n }\n\n element.scrollLeft = startScroll - dx\n }\n\n function onPointerUp(event: PointerEvent) {\n const element = target.value\n if (element?.hasPointerCapture(event.pointerId)) {\n element.releasePointerCapture(event.pointerId)\n }\n\n pointerId = null\n }\n\n function bind(element: HTMLElement) {\n element.addEventListener('pointerdown', onPointerDown)\n element.addEventListener('pointermove', onPointerMove)\n element.addEventListener('pointerup', onPointerUp)\n element.addEventListener('pointercancel', onPointerUp)\n }\n\n function unbind(element: HTMLElement) {\n element.removeEventListener('pointerdown', onPointerDown)\n element.removeEventListener('pointermove', onPointerMove)\n element.removeEventListener('pointerup', onPointerUp)\n element.removeEventListener('pointercancel', onPointerUp)\n }\n\n watch(\n target,\n (element, previous) => {\n if (previous) unbind(previous)\n if (element) bind(element)\n },\n { immediate: true },\n )\n\n onScopeDispose(() => {\n if (target.value) unbind(target.value)\n })\n\n return { didDrag: () => dragged }\n}\n","import { onScopeDispose, readonly, ref } from 'vue'\n\n/** The visible area, once the on-screen keyboard has taken its share. */\nexport interface VisualViewportRect {\n height: number\n offsetTop: number\n}\n\n/**\n * Tracks the visual viewport.\n *\n * Chrome and Android browsers honour `interactive-widget=resizes-content`, so\n * the layout viewport already shrinks for the keyboard there. Safari on iOS\n * does not implement it: it shrinks only the *visual* viewport, leaving a sheet\n * sized in `dvh` sitting partly underneath the keyboard.\n *\n * `null` means the API is unavailable, which callers should read as \"trust the\n * layout viewport\" rather than as zero.\n *\n * @example\n * ```ts\n * const viewport = useVisualViewport()\n * // :style=\"viewport ? { height: `${viewport.height}px` } : undefined\"\n * ```\n */\nexport function useVisualViewport() {\n const rect = ref<VisualViewportRect | null>(null)\n\n const viewport = window.visualViewport\n if (!viewport) return readonly(rect)\n\n function read() {\n if (!viewport) return\n\n rect.value = { height: viewport.height, offsetTop: viewport.offsetTop }\n }\n\n read()\n\n // `scroll` matters as much as `resize`: iOS shifts the visual viewport up to\n // keep the focused field visible, without changing its height.\n viewport.addEventListener('resize', read)\n viewport.addEventListener('scroll', read)\n\n onScopeDispose(() => {\n viewport.removeEventListener('resize', read)\n viewport.removeEventListener('scroll', read)\n })\n\n return readonly(rect)\n}\n","<script setup lang=\"ts\">\nconst {\n variant = 'primary',\n size = 'md',\n loading = false,\n disabled = false,\n type = 'button',\n} = defineProps<{\n variant?: 'primary' | 'ghost' | 'danger'\n size?: 'sm' | 'md'\n loading?: boolean\n disabled?: boolean\n type?: 'button' | 'submit'\n}>()\n\nconst VARIANT_CLASS = {\n primary: 'bg-primary text-white hover:bg-primary/90',\n ghost: 'bg-transparent text-ink hover:bg-muted',\n danger: 'bg-negative text-white hover:bg-negative/90',\n} as const\n\nconst SIZE_CLASS = {\n sm: 'h-9 px-3 text-sm',\n md: 'h-11 px-4 text-base',\n} as const\n</script>\n\n<template>\n <button\n :type=\"type\"\n :disabled=\"disabled || loading\"\n :aria-busy=\"loading\"\n class=\"rounded-card focus-visible:outline-primary inline-flex items-center justify-center gap-2 font-medium transition-transform duration-100 select-none focus-visible:outline-2 focus-visible:outline-offset-2 active:scale-95 disabled:pointer-events-none disabled:opacity-50\"\n :class=\"[VARIANT_CLASS[variant], SIZE_CLASS[size]]\"\n >\n <span\n v-if=\"loading\"\n class=\"size-4 animate-spin rounded-full border-2 border-current border-t-transparent\"\n aria-hidden=\"true\"\n />\n <slot />\n </button>\n</template>\n","<script setup lang=\"ts\">\nconst {\n variant = 'primary',\n size = 'md',\n loading = false,\n disabled = false,\n type = 'button',\n} = defineProps<{\n variant?: 'primary' | 'ghost' | 'danger'\n size?: 'sm' | 'md'\n loading?: boolean\n disabled?: boolean\n type?: 'button' | 'submit'\n}>()\n\nconst VARIANT_CLASS = {\n primary: 'bg-primary text-white hover:bg-primary/90',\n ghost: 'bg-transparent text-ink hover:bg-muted',\n danger: 'bg-negative text-white hover:bg-negative/90',\n} as const\n\nconst SIZE_CLASS = {\n sm: 'h-9 px-3 text-sm',\n md: 'h-11 px-4 text-base',\n} as const\n</script>\n\n<template>\n <button\n :type=\"type\"\n :disabled=\"disabled || loading\"\n :aria-busy=\"loading\"\n class=\"rounded-card focus-visible:outline-primary inline-flex items-center justify-center gap-2 font-medium transition-transform duration-100 select-none focus-visible:outline-2 focus-visible:outline-offset-2 active:scale-95 disabled:pointer-events-none disabled:opacity-50\"\n :class=\"[VARIANT_CLASS[variant], SIZE_CLASS[size]]\"\n >\n <span\n v-if=\"loading\"\n class=\"size-4 animate-spin rounded-full border-2 border-current border-t-transparent\"\n aria-hidden=\"true\"\n />\n <slot />\n </button>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useId } from 'vue'\n\ndefineOptions({ inheritAttrs: false })\n\nconst {\n label,\n error = '',\n hint = '',\n type = 'text',\n labelHidden = false,\n} = defineProps<{\n label: string\n error?: string | undefined\n hint?: string | undefined\n /**\n * Hides the label visually but keeps it for assistive tech. For fields whose\n * surrounding row already names them — dropping the label entirely would\n * leave the input with no accessible name at all.\n */\n labelHidden?: boolean\n type?: 'text' | 'email' | 'password' | 'number'\n}>()\n\nconst model = defineModel<string | undefined>()\n\nconst id = useId()\nconst errorId = `${id}-error`\nconst hintId = `${id}-hint`\n\nconst describedBy = computed(() => {\n if (error) return errorId\n if (hint) return hintId\n return undefined\n})\n</script>\n\n<template>\n <div class=\"flex flex-col gap-1.5\">\n <label :for=\"id\" class=\"text-ink text-sm font-medium\" :class=\"labelHidden ? 'sr-only' : ''\">\n {{ label }}\n </label>\n\n <input\n :id=\"id\"\n v-model=\"model\"\n :type=\"type\"\n :aria-invalid=\"Boolean(error)\"\n :aria-describedby=\"describedBy\"\n v-bind=\"$attrs\"\n class=\"border-hair bg-surface text-ink rounded-card focus-visible:outline-primary h-11 border px-3 focus-visible:outline-2 focus-visible:outline-offset-1\"\n :class=\"error ? 'border-negative' : ''\"\n />\n\n <p v-if=\"error\" :id=\"errorId\" class=\"text-negative text-xs\">{{ error }}</p>\n <p v-else-if=\"hint\" :id=\"hintId\" class=\"text-ink-soft text-xs\">{{ hint }}</p>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useId } from 'vue'\n\ndefineOptions({ inheritAttrs: false })\n\nconst {\n label,\n error = '',\n hint = '',\n type = 'text',\n labelHidden = false,\n} = defineProps<{\n label: string\n error?: string | undefined\n hint?: string | undefined\n /**\n * Hides the label visually but keeps it for assistive tech. For fields whose\n * surrounding row already names them — dropping the label entirely would\n * leave the input with no accessible name at all.\n */\n labelHidden?: boolean\n type?: 'text' | 'email' | 'password' | 'number'\n}>()\n\nconst model = defineModel<string | undefined>()\n\nconst id = useId()\nconst errorId = `${id}-error`\nconst hintId = `${id}-hint`\n\nconst describedBy = computed(() => {\n if (error) return errorId\n if (hint) return hintId\n return undefined\n})\n</script>\n\n<template>\n <div class=\"flex flex-col gap-1.5\">\n <label :for=\"id\" class=\"text-ink text-sm font-medium\" :class=\"labelHidden ? 'sr-only' : ''\">\n {{ label }}\n </label>\n\n <input\n :id=\"id\"\n v-model=\"model\"\n :type=\"type\"\n :aria-invalid=\"Boolean(error)\"\n :aria-describedby=\"describedBy\"\n v-bind=\"$attrs\"\n class=\"border-hair bg-surface text-ink rounded-card focus-visible:outline-primary h-11 border px-3 focus-visible:outline-2 focus-visible:outline-offset-1\"\n :class=\"error ? 'border-negative' : ''\"\n />\n\n <p v-if=\"error\" :id=\"errorId\" class=\"text-negative text-xs\">{{ error }}</p>\n <p v-else-if=\"hint\" :id=\"hintId\" class=\"text-ink-soft text-xs\">{{ hint }}</p>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, nextTick, onUnmounted, ref, watch } from 'vue'\nimport { X } from 'lucide-vue-next'\n\nimport { useVisualViewport } from '../composables/use-visual-viewport'\n\nconst open = defineModel<boolean>({ required: true })\nconst {\n title,\n subtitle = '',\n closeLabel = 'Close',\n} = defineProps<{\n title: string\n subtitle?: string\n /**\n * Accessible name for the close button.\n *\n * A prop rather than a translation: a component that calls t() forces every\n * consumer onto one i18n setup, and this is the package's only visible string.\n */\n closeLabel?: string\n}>()\n\nconst viewport = useVisualViewport()\n\n/**\n * Pins the sheet to the area the keyboard has left visible.\n *\n * Only needed where the layout viewport does not shrink on its own — iOS. On\n * Android the numbers already agree, so this is a no-op there rather than a\n * second, competing adjustment.\n */\nconst viewportStyle = computed(() =>\n viewport.value\n ? { height: `${viewport.value.height}px`, top: `${viewport.value.offsetTop}px` }\n : undefined,\n)\n\nconst panel = ref<HTMLElement | null>(null)\nlet lastFocused: HTMLElement | null = null\n\nfunction close() {\n open.value = false\n}\n\nfunction onKeydown(event: KeyboardEvent) {\n if (event.key === 'Escape') close()\n}\n\nwatch(open, async (isOpen) => {\n if (isOpen) {\n setBackgroundInert(true)\n lastFocused = document.activeElement instanceof HTMLElement ? document.activeElement : null\n window.addEventListener('keydown', onKeydown)\n await nextTick()\n panel.value?.focus()\n } else {\n window.removeEventListener('keydown', onKeydown)\n lastFocused?.focus()\n lastFocused = null\n setBackgroundInert(false)\n }\n})\n\n/**\n * `inert` takes the whole app out of tab order and pointer events while the\n * sheet is open — a real focus trap without keydown bookkeeping.\n *\n * The sheet itself is teleported to `#sheet-root`, a sibling of `#app`, so it\n * stays interactive.\n */\nfunction setBackgroundInert(isInert: boolean) {\n document.getElementById('app')?.toggleAttribute('inert', isInert)\n}\n\nonUnmounted(() => {\n window.removeEventListener('keydown', onKeydown)\n // Unmounting while open would otherwise leave the whole app inert forever.\n setBackgroundInert(false)\n})\n</script>\n\n<template>\n <Teleport to=\"#sheet-root\">\n <Transition name=\"sheet\">\n <div\n v-if=\"open\"\n class=\"fixed inset-x-0 top-0 bottom-0 z-50 flex items-center justify-center\"\n :style=\"viewportStyle\"\n >\n <div\n class=\"shell-frame md:rounded-shell relative flex max-h-full flex-col justify-end overflow-hidden\"\n >\n <div class=\"bg-ink/45 absolute inset-0 backdrop-blur-[2px]\" @click=\"close\" />\n\n <!-- Header and footer stay put; only the slot scrolls. Sized in dvh so\n the on-screen keyboard shrinks the sheet instead of pushing its\n content out of reach. -->\n <section\n ref=\"panel\"\n role=\"dialog\"\n aria-modal=\"true\"\n :aria-label=\"title\"\n tabindex=\"-1\"\n class=\"sheet-panel bg-surface relative flex max-h-[94%] min-h-[56dvh] flex-col rounded-t-[28px] shadow-2xl outline-none\"\n >\n <div class=\"flex shrink-0 justify-center pt-3\" aria-hidden=\"true\">\n <span class=\"bg-hair h-1.5 w-10 rounded-full\" />\n </div>\n\n <header class=\"flex shrink-0 items-start gap-3 px-6 pt-4 pb-5\">\n <div class=\"min-w-0 flex-1\">\n <h2 class=\"text-ink text-xl leading-tight font-semibold\">{{ title }}</h2>\n <p v-if=\"subtitle\" class=\"text-ink-soft mt-1 text-sm leading-snug\">\n {{ subtitle }}\n </p>\n </div>\n\n <button\n type=\"button\"\n class=\"text-ink-soft hover:bg-muted hover:text-ink -mt-1 flex size-10 shrink-0 items-center justify-center rounded-full transition-colors active:scale-90\"\n :aria-label=\"closeLabel\"\n @click=\"close\"\n >\n <X class=\"size-5\" />\n </button>\n </header>\n\n <div\n class=\"min-h-0 flex-1 overflow-y-auto px-6 pb-[calc(2rem+env(safe-area-inset-bottom,0px))]\"\n >\n <slot />\n </div>\n </section>\n </div>\n </div>\n </Transition>\n </Teleport>\n</template>\n\n<style scoped>\n.sheet-enter-active,\n.sheet-leave-active {\n transition: opacity 200ms ease;\n}\n.sheet-enter-from,\n.sheet-leave-to {\n opacity: 0;\n}\n\n/* The panel travels further than the scrim fades, which is what makes the\n sheet read as rising rather than appearing. */\n.sheet-enter-active .sheet-panel,\n.sheet-leave-active .sheet-panel {\n transition: transform 280ms cubic-bezier(0.32, 0.72, 0, 1);\n}\n.sheet-enter-from .sheet-panel,\n.sheet-leave-to .sheet-panel {\n transform: translateY(6%);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .sheet-enter-from .sheet-panel,\n .sheet-leave-to .sheet-panel {\n transform: none;\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, nextTick, onUnmounted, ref, watch } from 'vue'\nimport { X } from 'lucide-vue-next'\n\nimport { useVisualViewport } from '../composables/use-visual-viewport'\n\nconst open = defineModel<boolean>({ required: true })\nconst {\n title,\n subtitle = '',\n closeLabel = 'Close',\n} = defineProps<{\n title: string\n subtitle?: string\n /**\n * Accessible name for the close button.\n *\n * A prop rather than a translation: a component that calls t() forces every\n * consumer onto one i18n setup, and this is the package's only visible string.\n */\n closeLabel?: string\n}>()\n\nconst viewport = useVisualViewport()\n\n/**\n * Pins the sheet to the area the keyboard has left visible.\n *\n * Only needed where the layout viewport does not shrink on its own — iOS. On\n * Android the numbers already agree, so this is a no-op there rather than a\n * second, competing adjustment.\n */\nconst viewportStyle = computed(() =>\n viewport.value\n ? { height: `${viewport.value.height}px`, top: `${viewport.value.offsetTop}px` }\n : undefined,\n)\n\nconst panel = ref<HTMLElement | null>(null)\nlet lastFocused: HTMLElement | null = null\n\nfunction close() {\n open.value = false\n}\n\nfunction onKeydown(event: KeyboardEvent) {\n if (event.key === 'Escape') close()\n}\n\nwatch(open, async (isOpen) => {\n if (isOpen) {\n setBackgroundInert(true)\n lastFocused = document.activeElement instanceof HTMLElement ? document.activeElement : null\n window.addEventListener('keydown', onKeydown)\n await nextTick()\n panel.value?.focus()\n } else {\n window.removeEventListener('keydown', onKeydown)\n lastFocused?.focus()\n lastFocused = null\n setBackgroundInert(false)\n }\n})\n\n/**\n * `inert` takes the whole app out of tab order and pointer events while the\n * sheet is open — a real focus trap without keydown bookkeeping.\n *\n * The sheet itself is teleported to `#sheet-root`, a sibling of `#app`, so it\n * stays interactive.\n */\nfunction setBackgroundInert(isInert: boolean) {\n document.getElementById('app')?.toggleAttribute('inert', isInert)\n}\n\nonUnmounted(() => {\n window.removeEventListener('keydown', onKeydown)\n // Unmounting while open would otherwise leave the whole app inert forever.\n setBackgroundInert(false)\n})\n</script>\n\n<template>\n <Teleport to=\"#sheet-root\">\n <Transition name=\"sheet\">\n <div\n v-if=\"open\"\n class=\"fixed inset-x-0 top-0 bottom-0 z-50 flex items-center justify-center\"\n :style=\"viewportStyle\"\n >\n <div\n class=\"shell-frame md:rounded-shell relative flex max-h-full flex-col justify-end overflow-hidden\"\n >\n <div class=\"bg-ink/45 absolute inset-0 backdrop-blur-[2px]\" @click=\"close\" />\n\n <!-- Header and footer stay put; only the slot scrolls. Sized in dvh so\n the on-screen keyboard shrinks the sheet instead of pushing its\n content out of reach. -->\n <section\n ref=\"panel\"\n role=\"dialog\"\n aria-modal=\"true\"\n :aria-label=\"title\"\n tabindex=\"-1\"\n class=\"sheet-panel bg-surface relative flex max-h-[94%] min-h-[56dvh] flex-col rounded-t-[28px] shadow-2xl outline-none\"\n >\n <div class=\"flex shrink-0 justify-center pt-3\" aria-hidden=\"true\">\n <span class=\"bg-hair h-1.5 w-10 rounded-full\" />\n </div>\n\n <header class=\"flex shrink-0 items-start gap-3 px-6 pt-4 pb-5\">\n <div class=\"min-w-0 flex-1\">\n <h2 class=\"text-ink text-xl leading-tight font-semibold\">{{ title }}</h2>\n <p v-if=\"subtitle\" class=\"text-ink-soft mt-1 text-sm leading-snug\">\n {{ subtitle }}\n </p>\n </div>\n\n <button\n type=\"button\"\n class=\"text-ink-soft hover:bg-muted hover:text-ink -mt-1 flex size-10 shrink-0 items-center justify-center rounded-full transition-colors active:scale-90\"\n :aria-label=\"closeLabel\"\n @click=\"close\"\n >\n <X class=\"size-5\" />\n </button>\n </header>\n\n <div\n class=\"min-h-0 flex-1 overflow-y-auto px-6 pb-[calc(2rem+env(safe-area-inset-bottom,0px))]\"\n >\n <slot />\n </div>\n </section>\n </div>\n </div>\n </Transition>\n </Teleport>\n</template>\n\n<style scoped>\n.sheet-enter-active,\n.sheet-leave-active {\n transition: opacity 200ms ease;\n}\n.sheet-enter-from,\n.sheet-leave-to {\n opacity: 0;\n}\n\n/* The panel travels further than the scrim fades, which is what makes the\n sheet read as rising rather than appearing. */\n.sheet-enter-active .sheet-panel,\n.sheet-leave-active .sheet-panel {\n transition: transform 280ms cubic-bezier(0.32, 0.72, 0, 1);\n}\n.sheet-enter-from .sheet-panel,\n.sheet-leave-to .sheet-panel {\n transform: translateY(6%);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .sheet-enter-from .sheet-panel,\n .sheet-leave-to .sheet-panel {\n transform: none;\n }\n}\n</style>\n","<script lang=\"ts\" setup>\nconst { title, description = '' } = defineProps<{\n title: string\n description?: string | undefined\n}>()\n</script>\n\n<template>\n <div class=\"flex flex-col items-center gap-3 px-6 py-10 text-center\">\n <div v-if=\"$slots.icon\" class=\"bg-muted text-primary rounded-card flex size-12 items-center\">\n <slot name=\"icon\" />\n </div>\n\n <h3 class=\"text-ink text-base font-semibold\">{{ title }}</h3>\n <p v-if=\"description\" class=\"text-ink-soft max-w-[36ch] text-sm\">\n {{ description }}\n </p>\n\n <div v-if=\"$slots.action\" class=\"mt-2 flex w-full flex-col gap-2\">\n <slot name=\"action\" />\n </div>\n </div>\n</template>\n\n<style></style>\n","<script lang=\"ts\" setup>\nconst { title, description = '' } = defineProps<{\n title: string\n description?: string | undefined\n}>()\n</script>\n\n<template>\n <div class=\"flex flex-col items-center gap-3 px-6 py-10 text-center\">\n <div v-if=\"$slots.icon\" class=\"bg-muted text-primary rounded-card flex size-12 items-center\">\n <slot name=\"icon\" />\n </div>\n\n <h3 class=\"text-ink text-base font-semibold\">{{ title }}</h3>\n <p v-if=\"description\" class=\"text-ink-soft max-w-[36ch] text-sm\">\n {{ description }}\n </p>\n\n <div v-if=\"$slots.action\" class=\"mt-2 flex w-full flex-col gap-2\">\n <slot name=\"action\" />\n </div>\n </div>\n</template>\n\n<style></style>\n","<script setup lang=\"ts\">\nconst { title } = defineProps<{ title: string }>()\n</script>\n\n<template>\n <header class=\"grid h-12 shrink-0 grid-cols-[2.5rem_1fr_2.5rem] items-center\">\n <div class=\"justify-self-start\"><slot name=\"left\" /></div>\n\n <h1 class=\"text-ink flex min-w-0 justify-center text-base font-semibold tabular-nums\">\n <slot name=\"title\">\n <span class=\"truncate\">{{ title }}</span>\n </slot>\n </h1>\n\n <div class=\"justify-self-end\"><slot name=\"right\" /></div>\n </header>\n</template>\n","<script setup lang=\"ts\">\nconst { title } = defineProps<{ title: string }>()\n</script>\n\n<template>\n <header class=\"grid h-12 shrink-0 grid-cols-[2.5rem_1fr_2.5rem] items-center\">\n <div class=\"justify-self-start\"><slot name=\"left\" /></div>\n\n <h1 class=\"text-ink flex min-w-0 justify-center text-base font-semibold tabular-nums\">\n <slot name=\"title\">\n <span class=\"truncate\">{{ title }}</span>\n </slot>\n </h1>\n\n <div class=\"justify-self-end\"><slot name=\"right\" /></div>\n </header>\n</template>\n","<script setup lang=\"ts\">\n/**\n * A small coloured dot, optionally labelled.\n *\n * Takes the colour as a class rather than a category, so an app can key it off\n * whatever its own domain calls a category — habit kinds, expense types,\n * priorities — without this component knowing about any of them.\n */\nconst { fill, label = '' } = defineProps<{\n /** Background utility for the dot, e.g. `bg-positive`. */\n fill: string\n /** Optional text after the dot. Omit for a bare marker. */\n label?: string\n}>()\n</script>\n\n<template>\n <span class=\"inline-flex items-center gap-1.5\">\n <span class=\"size-2 rounded-full\" :class=\"fill\" />\n <span v-if=\"label\" class=\"text-ink-soft text-xs font-medium\">{{ label }}</span>\n </span>\n</template>\n","<script setup lang=\"ts\">\n/**\n * A small coloured dot, optionally labelled.\n *\n * Takes the colour as a class rather than a category, so an app can key it off\n * whatever its own domain calls a category — habit kinds, expense types,\n * priorities — without this component knowing about any of them.\n */\nconst { fill, label = '' } = defineProps<{\n /** Background utility for the dot, e.g. `bg-positive`. */\n fill: string\n /** Optional text after the dot. Omit for a bare marker. */\n label?: string\n}>()\n</script>\n\n<template>\n <span class=\"inline-flex items-center gap-1.5\">\n <span class=\"size-2 rounded-full\" :class=\"fill\" />\n <span v-if=\"label\" class=\"text-ink-soft text-xs font-medium\">{{ label }}</span>\n </span>\n</template>\n","<script setup lang=\"ts\">\nimport ToneDot from './ToneDot.vue'\n\n/** The three classes a category needs to colour a heading. */\nexport interface Tone {\n /** Solid background for the dot, e.g. `bg-positive`. */\n fill: string\n /** Tinted surface for the pill, e.g. `bg-positive/5 border-positive/25`. */\n card: string\n /** Foreground that pairs with the surface, e.g. `text-positive`. */\n text: string\n}\n\n/**\n * A pill heading for a group of things.\n *\n * The tone arrives as three class strings rather than a category name: Tailwind\n * reads source files as plain text, so a class assembled at runtime never\n * reaches the stylesheet — the app has to write them out, and it is the app\n * that knows its own categories anyway.\n */\nconst {\n tone,\n label,\n count = 0,\n} = defineProps<{\n tone: Tone\n label: string\n /** Hidden when zero, so an empty group's heading stays quiet. */\n count?: number\n}>()\n</script>\n\n<template>\n <h2 class=\"flex items-center gap-2 self-start rounded-full border px-3 py-1\" :class=\"tone.card\">\n <ToneDot :fill=\"tone.fill\" />\n <span class=\"text-xs font-semibold tracking-wide uppercase\" :class=\"tone.text\">\n {{ label }}\n </span>\n <span v-if=\"count > 0\" class=\"text-ink-soft text-xs tabular-nums\">{{ count }}</span>\n </h2>\n</template>\n","<script setup lang=\"ts\">\nimport ToneDot from './ToneDot.vue'\n\n/** The three classes a category needs to colour a heading. */\nexport interface Tone {\n /** Solid background for the dot, e.g. `bg-positive`. */\n fill: string\n /** Tinted surface for the pill, e.g. `bg-positive/5 border-positive/25`. */\n card: string\n /** Foreground that pairs with the surface, e.g. `text-positive`. */\n text: string\n}\n\n/**\n * A pill heading for a group of things.\n *\n * The tone arrives as three class strings rather than a category name: Tailwind\n * reads source files as plain text, so a class assembled at runtime never\n * reaches the stylesheet — the app has to write them out, and it is the app\n * that knows its own categories anyway.\n */\nconst {\n tone,\n label,\n count = 0,\n} = defineProps<{\n tone: Tone\n label: string\n /** Hidden when zero, so an empty group's heading stays quiet. */\n count?: number\n}>()\n</script>\n\n<template>\n <h2 class=\"flex items-center gap-2 self-start rounded-full border px-3 py-1\" :class=\"tone.card\">\n <ToneDot :fill=\"tone.fill\" />\n <span class=\"text-xs font-semibold tracking-wide uppercase\" :class=\"tone.text\">\n {{ label }}\n </span>\n <span v-if=\"count > 0\" class=\"text-ink-soft text-xs tabular-nums\">{{ count }}</span>\n </h2>\n</template>\n","<script setup lang=\"ts\" generic=\"T extends string | number\">\nimport { useId } from 'vue'\n\n/**\n * A row of mutually exclusive choices.\n *\n * Radio inputs rather than buttons: it is a single choice out of a small set,\n * so arrow-key navigation and the \"one of N selected\" announcement come free.\n */\nconst { options } = defineProps<{\n options: readonly { value: T; label: string }[]\n}>()\n\nconst model = defineModel<T>({ required: true })\n\nconst name = useId()\n</script>\n\n<template>\n <div class=\"bg-muted rounded-card flex w-full gap-1 p-1\">\n <label v-for=\"option in options\" :key=\"String(option.value)\" class=\"flex-1 cursor-pointer\">\n <input v-model=\"model\" type=\"radio\" :value=\"option.value\" :name=\"name\" class=\"sr-only\" />\n <span\n class=\"flex h-10 items-center justify-center rounded-xl px-2 text-sm font-medium transition-colors select-none\"\n :class=\"model === option.value ? 'bg-surface text-ink shadow-sm' : 'text-ink-soft'\"\n >\n {{ option.label }}\n </span>\n </label>\n </div>\n</template>\n","<script setup lang=\"ts\" generic=\"T extends string | number\">\nimport { useId } from 'vue'\n\n/**\n * A row of mutually exclusive choices.\n *\n * Radio inputs rather than buttons: it is a single choice out of a small set,\n * so arrow-key navigation and the \"one of N selected\" announcement come free.\n */\nconst { options } = defineProps<{\n options: readonly { value: T; label: string }[]\n}>()\n\nconst model = defineModel<T>({ required: true })\n\nconst name = useId()\n</script>\n\n<template>\n <div class=\"bg-muted rounded-card flex w-full gap-1 p-1\">\n <label v-for=\"option in options\" :key=\"String(option.value)\" class=\"flex-1 cursor-pointer\">\n <input v-model=\"model\" type=\"radio\" :value=\"option.value\" :name=\"name\" class=\"sr-only\" />\n <span\n class=\"flex h-10 items-center justify-center rounded-xl px-2 text-sm font-medium transition-colors select-none\"\n :class=\"model === option.value ? 'bg-surface text-ink shadow-sm' : 'text-ink-soft'\"\n >\n {{ option.label }}\n </span>\n </label>\n </div>\n</template>\n","<script setup lang=\"ts\">\ndefineProps<{ title: string }>()\n</script>\n\n<template>\n <section class=\"flex flex-col gap-2\">\n <h2 class=\"text-ink-soft px-1 text-xs font-semibold tracking-wide uppercase\">{{ title }}</h2>\n\n <!-- One card per group, rows divided by hairlines. Loose fields floating on\n the page gave no sense of what belonged with what. -->\n <div class=\"border-hair bg-surface rounded-card divide-hair divide-y overflow-hidden border\">\n <slot />\n </div>\n </section>\n</template>\n","<script setup lang=\"ts\">\ndefineProps<{ title: string }>()\n</script>\n\n<template>\n <section class=\"flex flex-col gap-2\">\n <h2 class=\"text-ink-soft px-1 text-xs font-semibold tracking-wide uppercase\">{{ title }}</h2>\n\n <!-- One card per group, rows divided by hairlines. Loose fields floating on\n the page gave no sense of what belonged with what. -->\n <div class=\"border-hair bg-surface rounded-card divide-hair divide-y overflow-hidden border\">\n <slot />\n </div>\n </section>\n</template>\n","<script setup lang=\"ts\">\nimport { ChevronRight } from 'lucide-vue-next'\nimport type { Component } from 'vue'\n\n/**\n * One line in a settings card.\n *\n * `as` decides the element: a row that navigates has to be a button, and a row\n * that merely holds a control must not be, or the control becomes unreachable.\n */\nconst {\n label,\n description = '',\n icon = undefined,\n interactive = false,\n stacked = false,\n} = defineProps<{\n label: string\n description?: string\n icon?: Component | undefined\n /** Renders the row as a button with a chevron. */\n interactive?: boolean\n /** Puts the control on its own line below the label, for wide controls. */\n stacked?: boolean\n}>()\n\nconst emit = defineEmits<{ click: [] }>()\n</script>\n\n<template>\n <component\n :is=\"interactive ? 'button' : 'div'\"\n :type=\"interactive ? 'button' : undefined\"\n class=\"flex w-full items-center gap-3 px-4 py-3 text-left\"\n :class=\"[\n interactive ? 'hover:bg-muted/60 transition-colors active:scale-[0.99]' : '',\n stacked ? 'flex-col items-stretch gap-3' : '',\n ]\"\n @click=\"interactive && emit('click')\"\n >\n <div class=\"flex items-center gap-3\">\n <span\n v-if=\"icon\"\n class=\"bg-muted text-ink-soft flex size-9 shrink-0 items-center justify-center rounded-xl\"\n aria-hidden=\"true\"\n >\n <component :is=\"icon\" class=\"size-[18px]\" />\n </span>\n\n <div class=\"min-w-0 flex-1\">\n <p class=\"text-ink text-sm font-medium\">{{ label }}</p>\n <p v-if=\"description\" class=\"text-ink-soft mt-0.5 text-xs leading-snug\">\n {{ description }}\n </p>\n </div>\n\n <div v-if=\"!stacked\" class=\"shrink-0\"><slot /></div>\n\n <ChevronRight v-if=\"interactive\" class=\"text-ink-soft size-4 shrink-0\" aria-hidden=\"true\" />\n </div>\n\n <div v-if=\"stacked\"><slot /></div>\n </component>\n</template>\n","<script setup lang=\"ts\">\nimport { ChevronRight } from 'lucide-vue-next'\nimport type { Component } from 'vue'\n\n/**\n * One line in a settings card.\n *\n * `as` decides the element: a row that navigates has to be a button, and a row\n * that merely holds a control must not be, or the control becomes unreachable.\n */\nconst {\n label,\n description = '',\n icon = undefined,\n interactive = false,\n stacked = false,\n} = defineProps<{\n label: string\n description?: string\n icon?: Component | undefined\n /** Renders the row as a button with a chevron. */\n interactive?: boolean\n /** Puts the control on its own line below the label, for wide controls. */\n stacked?: boolean\n}>()\n\nconst emit = defineEmits<{ click: [] }>()\n</script>\n\n<template>\n <component\n :is=\"interactive ? 'button' : 'div'\"\n :type=\"interactive ? 'button' : undefined\"\n class=\"flex w-full items-center gap-3 px-4 py-3 text-left\"\n :class=\"[\n interactive ? 'hover:bg-muted/60 transition-colors active:scale-[0.99]' : '',\n stacked ? 'flex-col items-stretch gap-3' : '',\n ]\"\n @click=\"interactive && emit('click')\"\n >\n <div class=\"flex items-center gap-3\">\n <span\n v-if=\"icon\"\n class=\"bg-muted text-ink-soft flex size-9 shrink-0 items-center justify-center rounded-xl\"\n aria-hidden=\"true\"\n >\n <component :is=\"icon\" class=\"size-[18px]\" />\n </span>\n\n <div class=\"min-w-0 flex-1\">\n <p class=\"text-ink text-sm font-medium\">{{ label }}</p>\n <p v-if=\"description\" class=\"text-ink-soft mt-0.5 text-xs leading-snug\">\n {{ description }}\n </p>\n </div>\n\n <div v-if=\"!stacked\" class=\"shrink-0\"><slot /></div>\n\n <ChevronRight v-if=\"interactive\" class=\"text-ink-soft size-4 shrink-0\" aria-hidden=\"true\" />\n </div>\n\n <div v-if=\"stacked\"><slot /></div>\n </component>\n</template>\n","<script setup lang=\"ts\">\nconst {\n rows = 3,\n rowHeight = 'h-14',\n label = 'Loading…',\n} = defineProps<{\n rows?: number\n rowHeight?: string\n label?: string\n}>()\n</script>\n\n<template>\n <div role=\"status\" class=\"flex flex-col gap-1\">\n <span class=\"sr-only\">{{ label }}</span>\n\n <div\n v-for=\"row in rows\"\n :key=\"row\"\n class=\"bg-muted rounded-card animate-pulse\"\n :class=\"rowHeight\"\n aria-hidden=\"true\"\n />\n </div>\n</template>\n","<script setup lang=\"ts\">\nconst {\n rows = 3,\n rowHeight = 'h-14',\n label = 'Loading…',\n} = defineProps<{\n rows?: number\n rowHeight?: string\n label?: string\n}>()\n</script>\n\n<template>\n <div role=\"status\" class=\"flex flex-col gap-1\">\n <span class=\"sr-only\">{{ label }}</span>\n\n <div\n v-for=\"row in rows\"\n :key=\"row\"\n class=\"bg-muted rounded-card animate-pulse\"\n :class=\"rowHeight\"\n aria-hidden=\"true\"\n />\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { ArrowDown, ArrowRight, ArrowUp } from 'lucide-vue-next'\n\nconst {\n value,\n label,\n trend = null,\n} = defineProps<{\n value: string\n label: string\n trend?: 'up' | 'down' | 'flat' | null\n}>()\n\nconst TREND_ICON = { up: ArrowUp, down: ArrowDown, flat: ArrowRight } as const\n</script>\n\n<template>\n <div class=\"border-hair rounded-card flex flex-1 flex-col gap-0.5 border p-3\">\n <div class=\"flex items-baseline gap-1\">\n <span class=\"text-ink text-xl font-semibold tabular-nums\">{{ value }}</span>\n <component :is=\"TREND_ICON[trend]\" v-if=\"trend\" class=\"text-ink-soft size-3\" />\n </div>\n <span class=\"text-ink-soft text-xs\">{{ label }}</span>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { ArrowDown, ArrowRight, ArrowUp } from 'lucide-vue-next'\n\nconst {\n value,\n label,\n trend = null,\n} = defineProps<{\n value: string\n label: string\n trend?: 'up' | 'down' | 'flat' | null\n}>()\n\nconst TREND_ICON = { up: ArrowUp, down: ArrowDown, flat: ArrowRight } as const\n</script>\n\n<template>\n <div class=\"border-hair rounded-card flex flex-1 flex-col gap-0.5 border p-3\">\n <div class=\"flex items-baseline gap-1\">\n <span class=\"text-ink text-xl font-semibold tabular-nums\">{{ value }}</span>\n <component :is=\"TREND_ICON[trend]\" v-if=\"trend\" class=\"text-ink-soft size-3\" />\n </div>\n <span class=\"text-ink-soft text-xs\">{{ label }}</span>\n </div>\n</template>\n","<script setup lang=\"ts\" generic=\"L extends string\">\n/**\n * A flat language switcher for screens with no Settings behind them.\n *\n * The list and the labels are props: only the app knows which languages it\n * ships, and endonyms — each language written in itself — are what make the\n * right option legible to someone who cannot read the current interface.\n */\nconst {\n locales,\n labels,\n label = '',\n} = defineProps<{\n locales: readonly L[]\n /** Endonyms, e.g. `{ en: 'English', tr: 'Türkçe' }`. */\n labels: Record<L, string>\n /** Accessible name for the group. */\n label?: string\n}>()\n\n/**\n * Two-way bound rather than taking the runtime's ref as a prop: props are not\n * unwrapped in a template and cannot be assigned to, so the ref would compare\n * against itself and the click handler would not compile.\n */\nconst preference = defineModel<'system' | L>({ required: true })\n</script>\n\n<template>\n <nav class=\"flex flex-wrap items-center justify-center gap-1\" :aria-label=\"label || undefined\">\n <button\n v-for=\"locale in locales\"\n :key=\"locale\"\n type=\"button\"\n :lang=\"locale\"\n class=\"rounded-full px-2.5 py-1.5 text-xs transition-colors\"\n :class=\"\n preference === locale ? 'bg-muted text-ink font-semibold' : 'text-ink-soft hover:text-ink'\n \"\n :aria-pressed=\"preference === locale\"\n @click=\"preference = locale\"\n >\n {{ labels[locale] }}\n </button>\n </nav>\n</template>\n","<script setup lang=\"ts\" generic=\"L extends string\">\n/**\n * A flat language switcher for screens with no Settings behind them.\n *\n * The list and the labels are props: only the app knows which languages it\n * ships, and endonyms — each language written in itself — are what make the\n * right option legible to someone who cannot read the current interface.\n */\nconst {\n locales,\n labels,\n label = '',\n} = defineProps<{\n locales: readonly L[]\n /** Endonyms, e.g. `{ en: 'English', tr: 'Türkçe' }`. */\n labels: Record<L, string>\n /** Accessible name for the group. */\n label?: string\n}>()\n\n/**\n * Two-way bound rather than taking the runtime's ref as a prop: props are not\n * unwrapped in a template and cannot be assigned to, so the ref would compare\n * against itself and the click handler would not compile.\n */\nconst preference = defineModel<'system' | L>({ required: true })\n</script>\n\n<template>\n <nav class=\"flex flex-wrap items-center justify-center gap-1\" :aria-label=\"label || undefined\">\n <button\n v-for=\"locale in locales\"\n :key=\"locale\"\n type=\"button\"\n :lang=\"locale\"\n class=\"rounded-full px-2.5 py-1.5 text-xs transition-colors\"\n :class=\"\n preference === locale ? 'bg-muted text-ink font-semibold' : 'text-ink-soft hover:text-ink'\n \"\n :aria-pressed=\"preference === locale\"\n @click=\"preference = locale\"\n >\n {{ labels[locale] }}\n </button>\n </nav>\n</template>\n","import { computed, ref, watchEffect } from 'vue'\nimport { createI18n } from 'vue-i18n'\n\nimport { setFormatLocale } from '../utils/format'\n\n/** What the user picked. `system` re-reads the browser on every launch. */\nexport type LocalePreference<L extends string> = 'system' | L\n\nexport interface I18nRuntimeOptions<L extends string, Schema> {\n /** Languages the app ships, in no particular order. */\n locales: readonly L[]\n /** The one that is always loaded, and the fallback when a load fails. */\n fallback: L\n /**\n * BCP 47 tag per locale, for `Intl`.\n *\n * Message lookup only needs the base language, but dates and numbers need a\n * region to be right — `zh` alone would leave the formatter to guess.\n */\n intlTags: Record<L, string>\n /** The fallback's messages, bundled. */\n messages: Schema\n /** The rest, fetched only when they are the one in use. */\n loaders?: Partial<Record<L, () => Promise<{ default: Schema }>>>\n /** Where the choice is stored. Namespace it per app. */\n storageKey?: string\n}\n\n/**\n * Builds an i18n runtime around an app's own catalogue.\n *\n * A factory rather than a module singleton because the schema is the app's:\n * typing every locale as `typeof en` is what makes a missing key a build error,\n * and this package has no `en` of its own to type against.\n *\n * @example\n * ```ts\n * export const { i18n, t, useLocalePreference, loadActiveLocale } =\n * createI18nRuntime({\n * locales: ['en', 'tr'] as const,\n * fallback: 'en',\n * intlTags: { en: 'en-GB', tr: 'tr-TR' },\n * messages: en,\n * loaders: { tr: () => import('./locales/tr') },\n * storageKey: 'myapp-locale',\n * })\n * ```\n */\nexport function createI18nRuntime<L extends string, Schema extends Record<string, unknown>>(\n options: I18nRuntimeOptions<L, Schema>,\n) {\n const { locales, fallback, intlTags, messages, storageKey = 'rei-locale' } = options\n\n // Typed rather than defaulted to `{}`, which erases the locale keys and makes\n // `loaders[locale]` an index into an empty object.\n const loaders: Partial<Record<L, () => Promise<{ default: Schema }>>> = options.loaders ?? {}\n\n function isSupported(value: string): value is L {\n return (locales as readonly string[]).includes(value)\n }\n\n /**\n * First browser language the app can actually speak.\n *\n * `navigator.languages` is ordered by the user's own preference, so the first\n * match is the best one — not simply the first entry.\n */\n function detectSystemLocale(): L {\n for (const tag of navigator.languages ?? [navigator.language]) {\n const base = tag.split('-')[0]?.toLowerCase()\n if (base && isSupported(base)) return base\n }\n\n return fallback\n }\n\n function readStored(): LocalePreference<L> {\n try {\n const stored = localStorage.getItem(storageKey)\n if (stored === 'system' || (stored && isSupported(stored))) return stored\n } catch {\n // Storage blocked; fall through to the system language.\n }\n\n return 'system'\n }\n\n const preference = ref<LocalePreference<L>>(readStored())\n\n const activeLocale = computed<L>(() =>\n preference.value === 'system' ? detectSystemLocale() : (preference.value as L),\n )\n\n const intlLocale = computed(() => intlTags[activeLocale.value])\n\n // Only the fallback at construction; the rest arrive through\n // setLocaleMessage.\n const initial = { [fallback]: messages } as Record<string, Record<string, unknown>>\n\n const i18n = createI18n({\n legacy: false,\n locale: activeLocale.value as string,\n fallbackLocale: fallback as string,\n messages: initial,\n } as unknown as Parameters<typeof createI18n>[0])\n\n /**\n * A narrow view of the instance.\n *\n * vue-i18n infers its own generics from the messages it is handed, which\n * fights a runtime that is generic over the app's schema. Casting once, here,\n * keeps that fight out of every call site — and the surface below is the\n * whole of what this runtime uses.\n */\n const core = i18n.global as unknown as {\n locale: { value: string }\n setLocaleMessage: (locale: string, messages: Schema) => void\n t: (key: string, named?: Record<string, unknown>) => string\n }\n\n const loaded = new Set<L>([fallback])\n\n /**\n * Makes sure a locale's messages are in place before it becomes active.\n *\n * Awaited rather than fired and forgotten: setting the locale first paints one\n * frame of the fallback at every other user, which is the flash a fallback\n * exists to prevent, not cause.\n */\n async function ensureMessages(locale: L): Promise<void> {\n if (loaded.has(locale)) return\n\n const load = loaders[locale]\n if (!load) return\n\n try {\n const module = await load()\n core.setLocaleMessage(locale, module.default)\n loaded.add(locale)\n } catch {\n // Offline, or a stale chunk after a deploy. The fallback is loaded and\n // will carry the UI, which beats a blank screen.\n }\n }\n\n /** Loads whatever the stored preference resolves to. Call before mounting. */\n function loadActiveLocale(): Promise<void> {\n return ensureMessages(activeLocale.value)\n }\n\n // Keeps vue-i18n, `Intl` and the document in step. `lang` matters beyond\n // tidiness: it drives hyphenation, font fallback and screen readers.\n watchEffect(() => {\n core.locale.value = activeLocale.value\n setFormatLocale(intlLocale.value)\n document.documentElement.lang = activeLocale.value\n })\n\n /** Read and write the language preference. */\n function useLocalePreference() {\n return computed<LocalePreference<L>>({\n get: () => preference.value,\n set: (next) => {\n const resolved = next === 'system' ? detectSystemLocale() : (next as L)\n\n // Messages first, then the switch — the other order shows the fallback\n // for a frame on the way to the language the user just picked.\n void ensureMessages(resolved).then(() => {\n preference.value = next\n })\n\n try {\n localStorage.setItem(storageKey, next)\n } catch {\n // Storage blocked; the choice lasts for this session only.\n }\n },\n })\n }\n\n return {\n i18n,\n /** `t` for code outside a component. Tracks the locale inside a computed. */\n t: core.t,\n activeLocale,\n intlLocale,\n ensureMessages,\n loadActiveLocale,\n useLocalePreference,\n }\n}\n","/**\n * rei-kit — the layer every app starts from.\n *\n * Everything here is free of any backend, router or i18n choice. Components\n * take strings rather than calling a translator, and utilities take the clock\n * rather than reading it, so nothing in this package can force a decision on\n * the app that installs it.\n *\n * @see https://github.com/ramazandogna/rei-kit\n */\n\nexport const VERSION = '0.0.0'\n\n// ── Utilities ──────────────────────────────────────────────────────────────\nexport {\n addDays,\n eachDayOfYear,\n fromDateKey,\n lastNDays,\n leadingBlanks,\n startOfWeek,\n toDateKey,\n todayKey,\n} from './utils/date'\nexport type { WeekStart } from './utils/date'\n\nexport { formatDate, setFormatLocale } from './utils/format'\nexport { relativeDayLabel } from './utils/day-label'\nexport type { DayLabels } from './utils/day-label'\n\nexport { downloadJson } from './utils/download'\nexport { safeRedirect } from './utils/redirect'\nexport type { QueryValue } from './utils/redirect'\nexport { tapFeedback } from './utils/haptics'\nexport { isApplePortable, isInstalled, needsIosInstall } from './utils/platform'\n\nexport { AppError, registerErrorMapper, toAppError } from './utils/app-error'\nexport type { AppErrorKind, ErrorMapper } from './utils/app-error'\n\n// ── Composables ────────────────────────────────────────────────────────────\nexport {\n applyTheme,\n isThemePreference,\n readStoredTheme,\n setThemeStorageKey,\n useTheme,\n} from './composables/use-theme'\nexport type { ThemePreference } from './composables/use-theme'\n\nexport { useToday } from './composables/use-today'\nexport { useOnline } from './composables/use-online'\nexport { useDebouncedCallback } from './composables/use-debounced-callback'\nexport { useDragScroll } from './composables/use-drag-scroll'\nexport { useVisualViewport } from './composables/use-visual-viewport'\nexport type { VisualViewportRect } from './composables/use-visual-viewport'\n\n// ── Components ─────────────────────────────────────────────────────────────\nexport { default as BaseButton } from './components/BaseButton.vue'\nexport { default as BaseInput } from './components/BaseInput.vue'\nexport { default as BaseSheet } from './components/BaseSheet.vue'\nexport { default as EmptyState } from './components/EmptyState.vue'\nexport { default as PageHeader } from './components/PageHeader.vue'\nexport { default as SectionHeading } from './components/SectionHeading.vue'\nexport { default as SegmentedControl } from './components/SegmentedControl.vue'\nexport { default as SettingsGroup } from './components/SettingsGroup.vue'\nexport { default as SettingsRow } from './components/SettingsRow.vue'\nexport { default as SkeletonList } from './components/SkeletonList.vue'\nexport { default as StatCard } from './components/StatCard.vue'\nexport { default as ToneDot } from './components/ToneDot.vue'\nexport type { Tone } from './components/SectionHeading.vue'\nexport { default as LocaleLinks } from './components/LocaleLinks.vue'\n\n// ── i18n ───────────────────────────────────────────────────────────────────\nexport { createI18nRuntime } from './i18n/runtime'\nexport type { I18nRuntimeOptions, LocalePreference } from './i18n/runtime'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,SAAgB,UAAU,MAAoB;CAK5C,OAAO,GAJM,OAAO,KAAK,YAAY,CAAC,CAAC,CAAC,SAAS,GAAG,GAI1C,EAAK,GAHD,OAAO,KAAK,SAAS,IAAI,CAAC,CAAC,CAAC,SAAS,GAAG,GAGpC,EAAM,GAFZ,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,GAAG,GAEpB;AAC7B;;AAGA,SAAgB,WAAmB;CACjC,OAAO,0BAAU,IAAI,KAAK,CAAC;AAC7B;;;;;;;;;;;;;;AAeA,SAAgB,YAAY,KAAmB;CAC7C,MAAM,CAAC,MAAM,OAAO,OAAO,IAAI,MAAM,GAAG,CAAC,CAAC,IAAI,MAAM;CAEpD,IAAI,SAAS,KAAA,KAAa,UAAU,KAAA,KAAa,QAAQ,KAAA,GACvD,MAAM,IAAI,MA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AU,GAAG,WAAW,SAAS;CAEvC,MAAM,OAAO,WAAW;EACtB,QAAQ;EACR,QAAQ,aAAa;EACrB,gBAAgB;EAChB,UAAU;CACZ,CAAgD;;;;;;;;;CAUhD,MAAM,OAAO,KAAK;CAMlB,MAAM,yBAAS,IAAI,IAAO,CAAC,QAAQ,CAAC;;;;;;;;CASpC,eAAe,eAAe,QAA0B;EACtD,IAAI,OAAO,IAAI,MAAM,GAAG;EAExB,MAAM,OAAO,QAAQ;EACrB,IAAI,CAAC,MAAM;EAEX,IAAI;GACF,MAAM,SAAS,MAAM,KAAK;GAC1B,KAAK,iBAAiB,QAAQ,OAAO,OAAO;GAC5C,OAAO,IAAI,MAAM;EACnB,QAAQ,CAGR;CACF;;CAGA,SAAS,mBAAkC;EACzC,OAAO,eAAe,aAAa,KAAK;CAC1C;CAIA,kBAAkB;EAChB,KAAK,OAAO,QAAQ,aAAa;EACjC,gBAAgB,WAAW,KAAK;EAChC,SAAS,gBAAgB,OAAO,aAAa;CAC/C,CAAC;;CAGD,SAAS,sBAAsB;EAC7B,OAAO,SAA8B;GACnC,WAAW,WAAW;GACtB,MAAM,SAAS;IAKb,eAJiB,SAAS,WAAW,mBAAmB,IAAK,IAIjC,CAAC,CAAC,WAAW;KACvC,WAAW,QAAQ;IACrB,CAAC;IAED,IAAI;KACF,aAAa,QAAQ,YAAY,IAAI;IACvC,QAAQ,CAER;GACF;EACF,CAAC;CACH;CAEA,OAAO;EACL;;EAEA,GAAG,KAAK;EACR;EACA;EACA;EACA;EACA;CACF;AACF;;;;;;;;;;;;;ACnLA,IAAa,UAAU"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["$attrs","$slots"],"sources":["../src/utils/date.ts","../src/utils/format.ts","../src/utils/day-label.ts","../src/utils/download.ts","../src/utils/redirect.ts","../src/utils/haptics.ts","../src/utils/platform.ts","../src/composables/use-theme.ts","../src/composables/use-today.ts","../src/composables/use-online.ts","../src/composables/use-debounced-callback.ts","../src/composables/use-drag-scroll.ts","../src/composables/use-visual-viewport.ts","../src/components/BaseButton.vue","../src/components/BaseButton.vue","../src/components/BaseInput.vue","../src/components/BaseInput.vue","../src/components/BaseSheet.vue","../src/components/BaseSheet.vue","../src/components/EmptyState.vue","../src/components/EmptyState.vue","../src/components/PageHeader.vue","../src/components/PageHeader.vue","../src/components/ToneDot.vue","../src/components/ToneDot.vue","../src/components/SectionHeading.vue","../src/components/SectionHeading.vue","../src/components/SegmentedControl.vue","../src/components/SegmentedControl.vue","../src/components/SettingsGroup.vue","../src/components/SettingsGroup.vue","../src/components/SettingsRow.vue","../src/components/SettingsRow.vue","../src/components/SkeletonList.vue","../src/components/SkeletonList.vue","../src/components/StatCard.vue","../src/components/StatCard.vue","../src/components/LocaleLinks.vue","../src/components/LocaleLinks.vue","../src/components/GoogleButton.vue","../src/components/GoogleButton.vue","../node_modules/.pnpm/nostics@1.2.0/node_modules/nostics/dist/index.mjs","../node_modules/.pnpm/vue-router@5.3.0_@vue+compiler-sfc@3.5.42_rolldown@1.2.6_vite@8.2.2_@types+node@24.13.3_32624d71e3238734f500b9958d6cb19f/node_modules/vue-router/dist/useApi-CUgTH_jn.js","../node_modules/.pnpm/vue-router@5.3.0_@vue+compiler-sfc@3.5.42_rolldown@1.2.6_vite@8.2.2_@types+node@24.13.3_32624d71e3238734f500b9958d6cb19f/node_modules/vue-router/dist/devtools-CLRpXhL7.js","../node_modules/.pnpm/vue-router@5.3.0_@vue+compiler-sfc@3.5.42_rolldown@1.2.6_vite@8.2.2_@types+node@24.13.3_32624d71e3238734f500b9958d6cb19f/node_modules/vue-router/dist/vue-router.js","../src/components/TabBar.vue","../src/components/TabBar.vue","../src/i18n/runtime.ts","../src/index.ts"],"sourcesContent":["/**\n * Local calendar-day helpers.\n *\n * Every function is pure and works on `YYYY-MM-DD` keys, the same shape as the\n * `date` columns in Postgres. Nothing here calls `toISOString`: that converts to\n * UTC, so in a UTC+9 timezone every entry made between midnight and 09:00 would\n * be written to the previous day.\n */\n\n/**\n * Formats a `Date` as a local `YYYY-MM-DD` key.\n *\n * @param date - Any `Date`; only its local year, month and day are read.\n * @returns The calendar day in the runtime's own timezone.\n *\n * @example\n * ```ts\n * // 2026-08-23 01:30 in Tokyo\n * toDateKey(new Date()) // '2026-08-23'\n * new Date().toISOString() // '2026-08-22T16:30…' ← the bug\n * ```\n */\nexport function toDateKey(date: Date): string {\n const year = String(date.getFullYear()).padStart(4, '0')\n const month = String(date.getMonth() + 1).padStart(2, '0')\n const day = String(date.getDate()).padStart(2, '0')\n\n return `${year}-${month}-${day}`\n}\n\n/** Today's key in the user's own timezone. */\nexport function todayKey(): string {\n return toDateKey(new Date())\n}\n\n/**\n * Parses a `YYYY-MM-DD` key into a `Date` at local midnight.\n *\n * @param key - A key produced by {@link toDateKey}.\n * @returns Local midnight of that calendar day.\n * @throws If the key is not three numeric parts.\n *\n * @example\n * ```ts\n * fromDateKey('2026-08-23') // local midnight, correct\n * new Date('2026-08-23') // UTC midnight — shifts a day in some zones\n * ```\n */\nexport function fromDateKey(key: string): Date {\n const [year, month, day] = key.split('-').map(Number)\n\n if (year === undefined || month === undefined || day === undefined) {\n throw new Error(`Invalid date key: ${key}`)\n }\n\n return new Date(year, month - 1, day)\n}\n\n/**\n * Shifts a date key by whole calendar days.\n *\n * Uses `setDate`, which is calendar-aware: it rolls over month and year ends,\n * and stays correct across daylight-saving transitions. Adding\n * `days * 86_400_000` milliseconds would not — a DST day is 23 or 25 hours long.\n *\n * @param key - Starting `YYYY-MM-DD` key.\n * @param days - Days to add; negative goes back.\n * @returns The resulting key.\n *\n * @example\n * ```ts\n * addDays('2026-01-31', 1) // '2026-02-01'\n * addDays('2026-01-01', -1) // '2025-12-31'\n * addDays('2028-02-28', 1) // '2028-02-29' — leap year\n * ```\n */\nexport function addDays(key: string, days: number): string {\n const date = fromDateKey(key)\n date.setDate(date.getDate() + days)\n\n return toDateKey(date)\n}\n\n/**\n * The last `count` days ending today, oldest first.\n *\n * `today` is a parameter so the function stays pure and testable; call sites\n * normally omit it.\n *\n * @param count - How many days to return, including `today`.\n * @param today - End of the range. Defaults to the real today.\n * @returns Keys in ascending order.\n *\n * @example\n * ```ts\n * lastNDays(3, '2026-08-23') // ['2026-08-21', '2026-08-22', '2026-08-23']\n * ```\n */\nexport function lastNDays(count: number, today: string = todayKey()): string[] {\n const keys: string[] = []\n\n for (let offset = count - 1; offset >= 0; offset -= 1) {\n keys.push(addDays(today, -offset))\n }\n\n return keys\n}\n\n/** 0 = week starts on Sunday, 1 = on Monday. Mirrors `profiles.week_starts_on`. */\nexport type WeekStart = 0 | 1\n\n/**\n * The first day of the week containing `key`.\n *\n * The user's preference is a parameter, not a module-level setting: changing it\n * in Profile has to re-render the week grid and the year heatmap immediately,\n * and a global would make that a hidden dependency.\n *\n * @param key - Any day in the week.\n * @param weekStartsOn - 0 for Sunday, 1 for Monday.\n * @returns Key of that week's first day.\n *\n * @example\n * ```ts\n * // 2026-08-23 is a Sunday\n * startOfWeek('2026-08-23', 1) // '2026-08-17' — previous Monday\n * startOfWeek('2026-08-23', 0) // '2026-08-23' — already Sunday\n * ```\n */\nexport function startOfWeek(key: string, weekStartsOn: WeekStart): string {\n const weekday = fromDateKey(key).getDay()\n const offset = (weekday - weekStartsOn + 7) % 7\n\n return addDays(key, -offset)\n}\n\n/**\n * Every day of a calendar year, in order.\n *\n * Leap years fall out of the loop for free: it walks day by day until the year\n * rolls over, so February 29 is included when it exists.\n *\n * @param year - Four-digit year.\n * @returns 365 or 366 keys, oldest first.\n */\nexport function eachDayOfYear(year: number): string[] {\n const keys: string[] = []\n const date = new Date(year, 0, 1)\n\n while (date.getFullYear() === year) {\n keys.push(toDateKey(date))\n date.setDate(date.getDate() + 1)\n }\n\n return keys\n}\n\n/**\n * Empty cells before a block's first day in a seven-row column grid.\n *\n * The grid fills column by column, so the first column is only partly used\n * unless the block starts exactly on the week's first day. An off-by-one here\n * shifts the whole block by a row, so this is unit tested.\n *\n * @param firstDayKey - First day of the block, e.g. `'2026-02-01'`.\n * @param weekStartsOn - 0 for Sunday, 1 for Monday.\n * @returns 0-6 blank cells.\n *\n * @example\n * ```ts\n * leadingBlanks('2026-01-01', 1) // 3 — a Thursday, Mon-Wed are blank\n * leadingBlanks('2024-01-01', 1) // 0 — a Monday\n * ```\n */\nexport function leadingBlanks(firstDayKey: string, weekStartsOn: WeekStart): number {\n return (fromDateKey(firstDayKey).getDay() - weekStartsOn + 7) % 7\n}\n","import { ref } from 'vue'\n\n/**\n * The locale `Intl` formatting uses.\n *\n * Held here rather than imported from an i18n runtime so the utilities have no\n * i18n dependency at all: an app that never installs vue-i18n still gets dates\n * in the right language. `createI18nRuntime` sets this when it is used.\n */\nconst locale = ref<string>(typeof navigator === 'undefined' ? 'en' : (navigator.language ?? 'en'))\n\n/**\n * Points every formatter at a new locale.\n *\n * @example\n * ```ts\n * setFormatLocale('tr-TR')\n * ```\n */\nexport function setFormatLocale(next: string): void {\n locale.value = next\n}\n\n/**\n * `Intl.DateTimeFormat` is expensive to construct, so instances are cached per\n * locale and option set. The key includes the locale, which is what lets the\n * cache survive a language change instead of returning stale formatters.\n */\nconst cache = new Map<string, Intl.DateTimeFormat>()\n\n/**\n * Formats a date in the active locale.\n *\n * Reading the locale ref here is deliberate: called from a `computed`, the\n * result re-evaluates when the language changes.\n *\n * @param date - Date to format.\n * @param options - Passed straight to `Intl.DateTimeFormat`.\n *\n * @example\n * ```ts\n * formatDate(new Date(), { weekday: 'narrow' }) // 'T'\n * ```\n */\nexport function formatDate(date: Date, options: Intl.DateTimeFormatOptions): string {\n const tag = locale.value\n const key = `${tag}:${JSON.stringify(options)}`\n\n let formatter = cache.get(key)\n if (!formatter) {\n formatter = new Intl.DateTimeFormat(tag, options)\n cache.set(key, formatter)\n }\n\n return formatter.format(date)\n}\n","import { addDays, fromDateKey } from './date'\nimport { formatDate } from './format'\n\n/** The two days worth naming rather than numbering. */\nexport interface DayLabels {\n today: string\n yesterday: string\n}\n\n/**\n * A short name for a day, relative to today.\n *\n * \"Today\" and \"Yesterday\" are worth spelling out — they are the two a user\n * actually reaches for. Anything older gets its weekday, which inside a\n * five-day window is unambiguous and stays two or three characters in every\n * language.\n *\n * The two words are arguments rather than translated here: a library that calls\n * `t()` forces every consumer onto one i18n setup.\n *\n * @param dateKey - The day to label (`YYYY-MM-DD`).\n * @param today - Today's key, passed in so the caller controls the clock.\n * @param labels - What to call today and yesterday.\n *\n * @example\n * ```ts\n * relativeDayLabel('2026-08-28', '2026-08-31', { today: 'Today', yesterday: 'Yesterday' })\n * // 'Fri'\n * ```\n */\nexport function relativeDayLabel(dateKey: string, today: string, labels: DayLabels): string {\n if (dateKey === today) return labels.today\n if (dateKey === addDays(today, -1)) return labels.yesterday\n\n return formatDate(fromDateKey(dateKey), { weekday: 'short' })\n}\n","/**\n * Hands the user a file without a server round trip.\n *\n * @param data - Anything `JSON.stringify` can serialise.\n * @param filename - Suggested name, e.g. `hibi-export-2026-08-24.json`.\n */\nexport function downloadJson(data: unknown, filename: string): void {\n const blob = new Blob([JSON.stringify(data, null, 2)], { type: 'application/json' })\n const url = URL.createObjectURL(blob)\n const link = document.createElement('a')\n\n link.href = url\n link.download = filename\n link.click()\n\n URL.revokeObjectURL(url)\n}\n","/**\n * What a router hands back for one query key.\n *\n * Inlined rather than imported from vue-router: the shape is `string | null`\n * either way, and a helper this small should not drag a router into the\n * package's dependencies.\n */\nexport type QueryValue = string | null\n\n/**\n * Resolves a `?redirect=` query value into a safe in-app path.\n *\n * Only same-origin paths are accepted. Anything else falls back to `/`,\n * so a crafted link cannot bounce a user from the real login page to a\n * phishing clone.\n *\n * Pure: takes the query value instead of reading the router, so it also\n * works inside navigation guards and can be unit tested.\n *\n * @param target - Raw `route.query.redirect` value. May be a string, an\n * array (repeated query key), `null`, or `undefined`.\n * @returns A path starting with a single `/`. Defaults to `/`.\n *\n * @example\n * ```ts\n * // in a view\n * await router.push(safeRedirect(route.query.redirect))\n *\n * // in a guard\n * return safeRedirect(to.query.redirect)\n * ```\n *\n * @example\n * ```ts\n * safeRedirect('/week') // '/week'\n * safeRedirect('https://evil.com') // '/'\n * safeRedirect('//evil.com') // '/' (protocol-relative URL)\n * safeRedirect(['/a', '/b']) // '/'\n * safeRedirect(undefined) // '/'\n * ```\n */\nexport function safeRedirect(target: QueryValue | QueryValue[] | undefined): string {\n if (typeof target === 'string' && target.startsWith('/') && !target.startsWith('//')) {\n return target\n }\n\n return '/'\n}\n","/**\n * A short vibration for a confirmed tap.\n *\n * Optional chaining is not decoration: iOS Safari has no `vibrate` at all, and\n * calling it unguarded would throw on every marked day.\n *\n * @param duration - Milliseconds. Keep it under ~15ms; longer reads as an alert.\n */\nexport function tapFeedback(duration = 10): void {\n navigator.vibrate?.(duration)\n}\n","/**\n * Whether the app is running from the Home Screen rather than a browser tab.\n *\n * Two checks because iOS predates the standard one: `display-mode: standalone`\n * is the modern signal, `navigator.standalone` is Safari's own.\n */\nexport function isInstalled(): boolean {\n if (typeof window === 'undefined') return false\n\n return (\n window.matchMedia('(display-mode: standalone)').matches ||\n (navigator as Navigator & { standalone?: boolean }).standalone === true\n )\n}\n\n/** iPhone and iPad, including iPadOS reporting itself as a Mac. */\nexport function isApplePortable(): boolean {\n if (typeof window === 'undefined') return false\n\n return (\n /iPad|iPhone|iPod/.test(navigator.userAgent) ||\n (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)\n )\n}\n\n/**\n * Whether this device can only receive notifications once the app is installed.\n *\n * Safari on iOS grants notification permission to an installed web app and to\n * nothing else — in a normal tab the request does not even prompt. Telling the\n * user to allow notifications there is asking for something the browser will\n * not offer, so the UI has to say \"add to Home Screen\" instead.\n *\n * @example\n * ```ts\n * if (needsIosInstall()) // show the Home Screen instruction, not the button\n * ```\n */\nexport function needsIosInstall(): boolean {\n return isApplePortable() && !isInstalled()\n}\n","import { ref, watch } from 'vue'\nimport type { Ref } from 'vue'\n\n/** What the user asked for; `system` follows the OS. */\nexport type ThemePreference = 'system' | 'light' | 'dark'\n\n/**\n * Namespaced by the app, not by this package.\n *\n * Two rei-kit apps served from the same origin would otherwise share one theme\n * setting — and during development on localhost, they will be.\n */\nlet storageKey = 'rei-theme'\n\nexport function isThemePreference(value: unknown): value is ThemePreference {\n return value === 'system' || value === 'light' || value === 'dark'\n}\n\n/** Reads the stored preference, falling back to `system`. */\nexport function readStoredTheme(): ThemePreference {\n try {\n const stored = localStorage.getItem(storageKey)\n\n return isThemePreference(stored) ? stored : 'system'\n } catch {\n return 'system'\n }\n}\n\nfunction storeTheme(preference: ThemePreference): void {\n try {\n localStorage.setItem(storageKey, preference)\n } catch {\n // Private mode or blocked storage: the choice just will not persist.\n }\n}\n\n/** Adds or removes `.dark` on `<html>`, resolving `system` against the OS. */\nexport function applyTheme(preference: ThemePreference): void {\n const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches\n const isDark = preference === 'dark' || (preference === 'system' && prefersDark)\n\n document.documentElement.classList.toggle('dark', isDark)\n}\n\n/**\n * The shared preference, created on first use rather than at import.\n *\n * Lazy on purpose: reading storage at import time would lock in the default key\n * before an app had a chance to set its own, leaving the controller reading one\n * key and writing another.\n */\nlet preference: Ref<ThemePreference> | null = null\n\nfunction controller(): Ref<ThemePreference> {\n if (preference) return preference\n\n preference = ref<ThemePreference>(readStoredTheme())\n\n watch(\n preference,\n (next) => {\n storeTheme(next)\n applyTheme(next)\n },\n { immediate: true },\n )\n\n // While on `system`, follow the OS if the user flips it at night.\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => {\n if (preference?.value === 'system') applyTheme('system')\n })\n\n return preference\n}\n\n/**\n * Sets where the preference is stored.\n *\n * Safe in either order: called before the first `useTheme()` it simply changes\n * the key, and called after it re-reads under the new one, so the controller\n * never reads from one key while writing to another.\n *\n * @example\n * ```ts\n * setThemeStorageKey('hibi-theme') // once, at startup\n * ```\n */\nexport function setThemeStorageKey(key: string): void {\n storageKey = key\n if (preference) preference.value = readStoredTheme()\n}\n\n/** @returns The shared preference ref; assigning to it stores and applies it. */\nexport function useTheme(): Ref<ThemePreference> {\n return controller()\n}\n","import { readonly, ref } from 'vue'\n\nimport { todayKey } from '../utils/date'\n\n/**\n * Today's date key, kept current while the app stays open.\n *\n * `todayKey()` called once in `setup` freezes the date for the lifetime of the\n * component. Nobody notices in a session that lasts minutes, but a phone left\n * on the Today screen overnight would keep marking yesterday, and the Week grid\n * would disable the column that just became today.\n */\nconst current = ref(todayKey())\n\nlet timer: ReturnType<typeof setTimeout> | undefined\n\n/** A second past midnight, so a fast timer cannot fire on the old date. */\nfunction msUntilMidnight(): number {\n const now = new Date()\n const next = new Date(now.getFullYear(), now.getMonth(), now.getDate() + 1, 0, 0, 1)\n\n return next.getTime() - now.getTime()\n}\n\nfunction refresh() {\n current.value = todayKey()\n}\n\nfunction schedule() {\n clearTimeout(timer)\n timer = setTimeout(() => {\n refresh()\n schedule()\n }, msUntilMidnight())\n}\n\nschedule()\n\n// A sleeping phone does not run timers reliably, so the tab also re-checks the\n// moment it comes back — which is when the user would see a stale date.\ndocument.addEventListener('visibilitychange', () => {\n if (document.visibilityState !== 'visible') return\n\n refresh()\n schedule()\n})\n\n/**\n * @returns Read-only ref holding today's `YYYY-MM-DD` key.\n *\n * @example\n * ```ts\n * const today = useToday()\n * const isFuture = computed(() => day > today.value)\n * ```\n */\nexport function useToday() {\n return readonly(current)\n}\n","import { onMounted, onUnmounted, readonly, ref } from 'vue'\n\n/**\n * Tracks whether the browser thinks it has a network connection.\n *\n * Note the limit: `navigator.onLine` only reports whether a network interface\n * is up, not whether requests actually succeed. Treat it as a hint for the UI,\n * never as a reason to skip error handling.\n *\n * Listeners are removed on unmount, so the composable is safe to call per view.\n *\n * @returns A readonly ref that flips with the browser's online/offline events.\n *\n * @example\n * ```ts\n * const isOnline = useOnline()\n * // <p v-if=\"!isOnline\">You're offline.</p>\n * ```\n */\nexport function useOnline() {\n const isOnline = ref(true)\n\n function update() {\n isOnline.value = navigator.onLine\n }\n\n onMounted(() => {\n update()\n window.addEventListener('online', update)\n window.addEventListener('offline', update)\n })\n\n onUnmounted(() => {\n window.removeEventListener('online', update)\n window.removeEventListener('offline', update)\n })\n\n return readonly(isOnline)\n}\n","import { onScopeDispose } from 'vue'\n\n/**\n * Delays a callback until the caller stops calling it.\n *\n * Used for note autosave: a request per keystroke would be wasteful, but losing\n * the last keystrokes when the user navigates away would be worse — so the\n * pending call is flushed on dispose, and `flush` is exposed for route guards.\n *\n * @param callback - Runs with the arguments of the most recent call.\n * @param delay - Quiet period in milliseconds.\n * @returns `run` to schedule, `flush` to run now, `cancel` to drop.\n *\n * @example\n * ```ts\n * const save = useDebouncedCallback((body: string) => mutate(body), 800)\n * watch(text, (value) => save.run(value))\n * onBeforeRouteLeave(() => save.flush())\n * ```\n */\nexport function useDebouncedCallback<A extends unknown[]>(\n callback: (...args: A) => void,\n delay = 800,\n) {\n let timer: ReturnType<typeof setTimeout> | null = null\n let pending: A | null = null\n\n /** Runs the pending call right now, if there is one. */\n function flush() {\n if (timer !== null) clearTimeout(timer)\n timer = null\n\n if (pending !== null) {\n const args = pending\n pending = null\n callback(...args)\n }\n }\n\n /** Drops the pending call without running it. */\n function cancel() {\n if (timer !== null) clearTimeout(timer)\n timer = null\n pending = null\n }\n\n function run(...args: A) {\n pending = args\n if (timer !== null) clearTimeout(timer)\n timer = setTimeout(flush, delay)\n }\n\n // A closing sheet or an unmounting view must not eat the last keystrokes.\n onScopeDispose(flush)\n\n return { run, flush, cancel }\n}\n","import { onScopeDispose, watch } from 'vue'\nimport type { Ref } from 'vue'\n\n/** Movement before a press counts as a drag rather than a tap. */\nconst DRAG_THRESHOLD_PX = 6\n\n/**\n * Drag-to-scroll for a horizontally scrolling element.\n *\n * The app puts `touch-action: pan-y` on the page content so the tab-swipe\n * gesture keeps its pointer events — the browser never claims a horizontal\n * drag, which also means it never pans this element natively. Rather than give\n * that up, horizontal scrolling is driven here.\n *\n * @param target - The scroll container.\n * @returns `didDrag`, so a click handler can ignore the press that ended a drag.\n *\n * @example\n * ```ts\n * const scroller = ref<HTMLElement | null>(null)\n * const { didDrag } = useDragScroll(scroller)\n *\n * function onClick() {\n * if (didDrag()) return\n * // …treat as a tap\n * }\n * ```\n */\nexport function useDragScroll(target: Ref<HTMLElement | null>) {\n let pointerId: number | null = null\n let startX = 0\n let startScroll = 0\n let dragged = false\n\n function onPointerDown(event: PointerEvent) {\n const element = target.value\n if (!element || event.pointerType === 'mouse') return\n\n pointerId = event.pointerId\n startX = event.clientX\n startScroll = element.scrollLeft\n dragged = false\n }\n\n function onPointerMove(event: PointerEvent) {\n const element = target.value\n if (!element || event.pointerId !== pointerId) return\n\n const dx = event.clientX - startX\n if (!dragged && Math.abs(dx) < DRAG_THRESHOLD_PX) return\n\n // Capture only once the gesture is clearly horizontal, so a vertical scroll\n // that happens to start here still belongs to the page.\n if (!dragged) {\n dragged = true\n element.setPointerCapture(event.pointerId)\n }\n\n element.scrollLeft = startScroll - dx\n }\n\n function onPointerUp(event: PointerEvent) {\n const element = target.value\n if (element?.hasPointerCapture(event.pointerId)) {\n element.releasePointerCapture(event.pointerId)\n }\n\n pointerId = null\n }\n\n function bind(element: HTMLElement) {\n element.addEventListener('pointerdown', onPointerDown)\n element.addEventListener('pointermove', onPointerMove)\n element.addEventListener('pointerup', onPointerUp)\n element.addEventListener('pointercancel', onPointerUp)\n }\n\n function unbind(element: HTMLElement) {\n element.removeEventListener('pointerdown', onPointerDown)\n element.removeEventListener('pointermove', onPointerMove)\n element.removeEventListener('pointerup', onPointerUp)\n element.removeEventListener('pointercancel', onPointerUp)\n }\n\n watch(\n target,\n (element, previous) => {\n if (previous) unbind(previous)\n if (element) bind(element)\n },\n { immediate: true },\n )\n\n onScopeDispose(() => {\n if (target.value) unbind(target.value)\n })\n\n return { didDrag: () => dragged }\n}\n","import { onScopeDispose, readonly, ref } from 'vue'\n\n/** The visible area, once the on-screen keyboard has taken its share. */\nexport interface VisualViewportRect {\n height: number\n offsetTop: number\n}\n\n/**\n * Tracks the visual viewport.\n *\n * Chrome and Android browsers honour `interactive-widget=resizes-content`, so\n * the layout viewport already shrinks for the keyboard there. Safari on iOS\n * does not implement it: it shrinks only the *visual* viewport, leaving a sheet\n * sized in `dvh` sitting partly underneath the keyboard.\n *\n * `null` means the API is unavailable, which callers should read as \"trust the\n * layout viewport\" rather than as zero.\n *\n * @example\n * ```ts\n * const viewport = useVisualViewport()\n * // :style=\"viewport ? { height: `${viewport.height}px` } : undefined\"\n * ```\n */\nexport function useVisualViewport() {\n const rect = ref<VisualViewportRect | null>(null)\n\n const viewport = window.visualViewport\n if (!viewport) return readonly(rect)\n\n function read() {\n if (!viewport) return\n\n rect.value = { height: viewport.height, offsetTop: viewport.offsetTop }\n }\n\n read()\n\n // `scroll` matters as much as `resize`: iOS shifts the visual viewport up to\n // keep the focused field visible, without changing its height.\n viewport.addEventListener('resize', read)\n viewport.addEventListener('scroll', read)\n\n onScopeDispose(() => {\n viewport.removeEventListener('resize', read)\n viewport.removeEventListener('scroll', read)\n })\n\n return readonly(rect)\n}\n","<script setup lang=\"ts\">\nconst {\n variant = 'primary',\n size = 'md',\n loading = false,\n disabled = false,\n type = 'button',\n} = defineProps<{\n variant?: 'primary' | 'ghost' | 'danger'\n size?: 'sm' | 'md'\n loading?: boolean\n disabled?: boolean\n type?: 'button' | 'submit'\n}>()\n\nconst VARIANT_CLASS = {\n primary: 'bg-primary text-white hover:bg-primary/90',\n ghost: 'bg-transparent text-ink hover:bg-muted',\n danger: 'bg-negative text-white hover:bg-negative/90',\n} as const\n\nconst SIZE_CLASS = {\n sm: 'h-9 px-3 text-sm',\n md: 'h-11 px-4 text-base',\n} as const\n</script>\n\n<template>\n <button\n :type=\"type\"\n :disabled=\"disabled || loading\"\n :aria-busy=\"loading\"\n class=\"rounded-card focus-visible:outline-primary inline-flex items-center justify-center gap-2 font-medium transition-transform duration-100 select-none focus-visible:outline-2 focus-visible:outline-offset-2 active:scale-95 disabled:pointer-events-none disabled:opacity-50\"\n :class=\"[VARIANT_CLASS[variant], SIZE_CLASS[size]]\"\n >\n <span\n v-if=\"loading\"\n class=\"size-4 animate-spin rounded-full border-2 border-current border-t-transparent\"\n aria-hidden=\"true\"\n />\n <slot />\n </button>\n</template>\n","<script setup lang=\"ts\">\nconst {\n variant = 'primary',\n size = 'md',\n loading = false,\n disabled = false,\n type = 'button',\n} = defineProps<{\n variant?: 'primary' | 'ghost' | 'danger'\n size?: 'sm' | 'md'\n loading?: boolean\n disabled?: boolean\n type?: 'button' | 'submit'\n}>()\n\nconst VARIANT_CLASS = {\n primary: 'bg-primary text-white hover:bg-primary/90',\n ghost: 'bg-transparent text-ink hover:bg-muted',\n danger: 'bg-negative text-white hover:bg-negative/90',\n} as const\n\nconst SIZE_CLASS = {\n sm: 'h-9 px-3 text-sm',\n md: 'h-11 px-4 text-base',\n} as const\n</script>\n\n<template>\n <button\n :type=\"type\"\n :disabled=\"disabled || loading\"\n :aria-busy=\"loading\"\n class=\"rounded-card focus-visible:outline-primary inline-flex items-center justify-center gap-2 font-medium transition-transform duration-100 select-none focus-visible:outline-2 focus-visible:outline-offset-2 active:scale-95 disabled:pointer-events-none disabled:opacity-50\"\n :class=\"[VARIANT_CLASS[variant], SIZE_CLASS[size]]\"\n >\n <span\n v-if=\"loading\"\n class=\"size-4 animate-spin rounded-full border-2 border-current border-t-transparent\"\n aria-hidden=\"true\"\n />\n <slot />\n </button>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useId } from 'vue'\n\ndefineOptions({ inheritAttrs: false })\n\nconst {\n label,\n error = '',\n hint = '',\n type = 'text',\n labelHidden = false,\n} = defineProps<{\n label: string\n error?: string | undefined\n hint?: string | undefined\n /**\n * Hides the label visually but keeps it for assistive tech. For fields whose\n * surrounding row already names them — dropping the label entirely would\n * leave the input with no accessible name at all.\n */\n labelHidden?: boolean\n type?: 'text' | 'email' | 'password' | 'number'\n}>()\n\nconst model = defineModel<string | undefined>()\n\nconst id = useId()\nconst errorId = `${id}-error`\nconst hintId = `${id}-hint`\n\nconst describedBy = computed(() => {\n if (error) return errorId\n if (hint) return hintId\n return undefined\n})\n</script>\n\n<template>\n <div class=\"flex flex-col gap-1.5\">\n <label :for=\"id\" class=\"text-ink text-sm font-medium\" :class=\"labelHidden ? 'sr-only' : ''\">\n {{ label }}\n </label>\n\n <input\n :id=\"id\"\n v-model=\"model\"\n :type=\"type\"\n :aria-invalid=\"Boolean(error)\"\n :aria-describedby=\"describedBy\"\n v-bind=\"$attrs\"\n class=\"border-hair bg-surface text-ink rounded-card focus-visible:outline-primary h-11 border px-3 focus-visible:outline-2 focus-visible:outline-offset-1\"\n :class=\"error ? 'border-negative' : ''\"\n />\n\n <p v-if=\"error\" :id=\"errorId\" class=\"text-negative text-xs\">{{ error }}</p>\n <p v-else-if=\"hint\" :id=\"hintId\" class=\"text-ink-soft text-xs\">{{ hint }}</p>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, useId } from 'vue'\n\ndefineOptions({ inheritAttrs: false })\n\nconst {\n label,\n error = '',\n hint = '',\n type = 'text',\n labelHidden = false,\n} = defineProps<{\n label: string\n error?: string | undefined\n hint?: string | undefined\n /**\n * Hides the label visually but keeps it for assistive tech. For fields whose\n * surrounding row already names them — dropping the label entirely would\n * leave the input with no accessible name at all.\n */\n labelHidden?: boolean\n type?: 'text' | 'email' | 'password' | 'number'\n}>()\n\nconst model = defineModel<string | undefined>()\n\nconst id = useId()\nconst errorId = `${id}-error`\nconst hintId = `${id}-hint`\n\nconst describedBy = computed(() => {\n if (error) return errorId\n if (hint) return hintId\n return undefined\n})\n</script>\n\n<template>\n <div class=\"flex flex-col gap-1.5\">\n <label :for=\"id\" class=\"text-ink text-sm font-medium\" :class=\"labelHidden ? 'sr-only' : ''\">\n {{ label }}\n </label>\n\n <input\n :id=\"id\"\n v-model=\"model\"\n :type=\"type\"\n :aria-invalid=\"Boolean(error)\"\n :aria-describedby=\"describedBy\"\n v-bind=\"$attrs\"\n class=\"border-hair bg-surface text-ink rounded-card focus-visible:outline-primary h-11 border px-3 focus-visible:outline-2 focus-visible:outline-offset-1\"\n :class=\"error ? 'border-negative' : ''\"\n />\n\n <p v-if=\"error\" :id=\"errorId\" class=\"text-negative text-xs\">{{ error }}</p>\n <p v-else-if=\"hint\" :id=\"hintId\" class=\"text-ink-soft text-xs\">{{ hint }}</p>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, nextTick, onUnmounted, ref, watch } from 'vue'\nimport { X } from 'lucide-vue-next'\n\nimport { useVisualViewport } from '../composables/use-visual-viewport'\n\nconst open = defineModel<boolean>({ required: true })\nconst {\n title,\n subtitle = '',\n closeLabel = 'Close',\n} = defineProps<{\n title: string\n subtitle?: string\n /**\n * Accessible name for the close button.\n *\n * A prop rather than a translation: a component that calls t() forces every\n * consumer onto one i18n setup, and this is the package's only visible string.\n */\n closeLabel?: string\n}>()\n\nconst viewport = useVisualViewport()\n\n/**\n * Pins the sheet to the area the keyboard has left visible.\n *\n * Only needed where the layout viewport does not shrink on its own — iOS. On\n * Android the numbers already agree, so this is a no-op there rather than a\n * second, competing adjustment.\n */\nconst viewportStyle = computed(() =>\n viewport.value\n ? { height: `${viewport.value.height}px`, top: `${viewport.value.offsetTop}px` }\n : undefined,\n)\n\nconst panel = ref<HTMLElement | null>(null)\nlet lastFocused: HTMLElement | null = null\n\nfunction close() {\n open.value = false\n}\n\nfunction onKeydown(event: KeyboardEvent) {\n if (event.key === 'Escape') close()\n}\n\nwatch(open, async (isOpen) => {\n if (isOpen) {\n setBackgroundInert(true)\n lastFocused = document.activeElement instanceof HTMLElement ? document.activeElement : null\n window.addEventListener('keydown', onKeydown)\n await nextTick()\n panel.value?.focus()\n } else {\n window.removeEventListener('keydown', onKeydown)\n lastFocused?.focus()\n lastFocused = null\n setBackgroundInert(false)\n }\n})\n\n/**\n * `inert` takes the whole app out of tab order and pointer events while the\n * sheet is open — a real focus trap without keydown bookkeeping.\n *\n * The sheet itself is teleported to `#sheet-root`, a sibling of `#app`, so it\n * stays interactive.\n */\nfunction setBackgroundInert(isInert: boolean) {\n document.getElementById('app')?.toggleAttribute('inert', isInert)\n}\n\nonUnmounted(() => {\n window.removeEventListener('keydown', onKeydown)\n // Unmounting while open would otherwise leave the whole app inert forever.\n setBackgroundInert(false)\n})\n</script>\n\n<template>\n <Teleport to=\"#sheet-root\">\n <Transition name=\"sheet\">\n <div\n v-if=\"open\"\n class=\"fixed inset-x-0 top-0 bottom-0 z-50 flex items-center justify-center\"\n :style=\"viewportStyle\"\n >\n <div\n class=\"shell-frame md:rounded-shell relative flex max-h-full flex-col justify-end overflow-hidden\"\n >\n <div class=\"bg-ink/45 absolute inset-0 backdrop-blur-[2px]\" @click=\"close\" />\n\n <!-- Header and footer stay put; only the slot scrolls. Sized in dvh so\n the on-screen keyboard shrinks the sheet instead of pushing its\n content out of reach. -->\n <section\n ref=\"panel\"\n role=\"dialog\"\n aria-modal=\"true\"\n :aria-label=\"title\"\n tabindex=\"-1\"\n class=\"sheet-panel bg-surface relative flex max-h-[94%] min-h-[56dvh] flex-col rounded-t-[28px] shadow-2xl outline-none\"\n >\n <div class=\"flex shrink-0 justify-center pt-3\" aria-hidden=\"true\">\n <span class=\"bg-hair h-1.5 w-10 rounded-full\" />\n </div>\n\n <header class=\"flex shrink-0 items-start gap-3 px-6 pt-4 pb-5\">\n <div class=\"min-w-0 flex-1\">\n <h2 class=\"text-ink text-xl leading-tight font-semibold\">{{ title }}</h2>\n <p v-if=\"subtitle\" class=\"text-ink-soft mt-1 text-sm leading-snug\">\n {{ subtitle }}\n </p>\n </div>\n\n <button\n type=\"button\"\n class=\"text-ink-soft hover:bg-muted hover:text-ink -mt-1 flex size-10 shrink-0 items-center justify-center rounded-full transition-colors active:scale-90\"\n :aria-label=\"closeLabel\"\n @click=\"close\"\n >\n <X class=\"size-5\" />\n </button>\n </header>\n\n <div\n class=\"min-h-0 flex-1 overflow-y-auto px-6 pb-[calc(2rem+env(safe-area-inset-bottom,0px))]\"\n >\n <slot />\n </div>\n </section>\n </div>\n </div>\n </Transition>\n </Teleport>\n</template>\n\n<style scoped>\n.sheet-enter-active,\n.sheet-leave-active {\n transition: opacity 200ms ease;\n}\n.sheet-enter-from,\n.sheet-leave-to {\n opacity: 0;\n}\n\n/* The panel travels further than the scrim fades, which is what makes the\n sheet read as rising rather than appearing. */\n.sheet-enter-active .sheet-panel,\n.sheet-leave-active .sheet-panel {\n transition: transform 280ms cubic-bezier(0.32, 0.72, 0, 1);\n}\n.sheet-enter-from .sheet-panel,\n.sheet-leave-to .sheet-panel {\n transform: translateY(6%);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .sheet-enter-from .sheet-panel,\n .sheet-leave-to .sheet-panel {\n transform: none;\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, nextTick, onUnmounted, ref, watch } from 'vue'\nimport { X } from 'lucide-vue-next'\n\nimport { useVisualViewport } from '../composables/use-visual-viewport'\n\nconst open = defineModel<boolean>({ required: true })\nconst {\n title,\n subtitle = '',\n closeLabel = 'Close',\n} = defineProps<{\n title: string\n subtitle?: string\n /**\n * Accessible name for the close button.\n *\n * A prop rather than a translation: a component that calls t() forces every\n * consumer onto one i18n setup, and this is the package's only visible string.\n */\n closeLabel?: string\n}>()\n\nconst viewport = useVisualViewport()\n\n/**\n * Pins the sheet to the area the keyboard has left visible.\n *\n * Only needed where the layout viewport does not shrink on its own — iOS. On\n * Android the numbers already agree, so this is a no-op there rather than a\n * second, competing adjustment.\n */\nconst viewportStyle = computed(() =>\n viewport.value\n ? { height: `${viewport.value.height}px`, top: `${viewport.value.offsetTop}px` }\n : undefined,\n)\n\nconst panel = ref<HTMLElement | null>(null)\nlet lastFocused: HTMLElement | null = null\n\nfunction close() {\n open.value = false\n}\n\nfunction onKeydown(event: KeyboardEvent) {\n if (event.key === 'Escape') close()\n}\n\nwatch(open, async (isOpen) => {\n if (isOpen) {\n setBackgroundInert(true)\n lastFocused = document.activeElement instanceof HTMLElement ? document.activeElement : null\n window.addEventListener('keydown', onKeydown)\n await nextTick()\n panel.value?.focus()\n } else {\n window.removeEventListener('keydown', onKeydown)\n lastFocused?.focus()\n lastFocused = null\n setBackgroundInert(false)\n }\n})\n\n/**\n * `inert` takes the whole app out of tab order and pointer events while the\n * sheet is open — a real focus trap without keydown bookkeeping.\n *\n * The sheet itself is teleported to `#sheet-root`, a sibling of `#app`, so it\n * stays interactive.\n */\nfunction setBackgroundInert(isInert: boolean) {\n document.getElementById('app')?.toggleAttribute('inert', isInert)\n}\n\nonUnmounted(() => {\n window.removeEventListener('keydown', onKeydown)\n // Unmounting while open would otherwise leave the whole app inert forever.\n setBackgroundInert(false)\n})\n</script>\n\n<template>\n <Teleport to=\"#sheet-root\">\n <Transition name=\"sheet\">\n <div\n v-if=\"open\"\n class=\"fixed inset-x-0 top-0 bottom-0 z-50 flex items-center justify-center\"\n :style=\"viewportStyle\"\n >\n <div\n class=\"shell-frame md:rounded-shell relative flex max-h-full flex-col justify-end overflow-hidden\"\n >\n <div class=\"bg-ink/45 absolute inset-0 backdrop-blur-[2px]\" @click=\"close\" />\n\n <!-- Header and footer stay put; only the slot scrolls. Sized in dvh so\n the on-screen keyboard shrinks the sheet instead of pushing its\n content out of reach. -->\n <section\n ref=\"panel\"\n role=\"dialog\"\n aria-modal=\"true\"\n :aria-label=\"title\"\n tabindex=\"-1\"\n class=\"sheet-panel bg-surface relative flex max-h-[94%] min-h-[56dvh] flex-col rounded-t-[28px] shadow-2xl outline-none\"\n >\n <div class=\"flex shrink-0 justify-center pt-3\" aria-hidden=\"true\">\n <span class=\"bg-hair h-1.5 w-10 rounded-full\" />\n </div>\n\n <header class=\"flex shrink-0 items-start gap-3 px-6 pt-4 pb-5\">\n <div class=\"min-w-0 flex-1\">\n <h2 class=\"text-ink text-xl leading-tight font-semibold\">{{ title }}</h2>\n <p v-if=\"subtitle\" class=\"text-ink-soft mt-1 text-sm leading-snug\">\n {{ subtitle }}\n </p>\n </div>\n\n <button\n type=\"button\"\n class=\"text-ink-soft hover:bg-muted hover:text-ink -mt-1 flex size-10 shrink-0 items-center justify-center rounded-full transition-colors active:scale-90\"\n :aria-label=\"closeLabel\"\n @click=\"close\"\n >\n <X class=\"size-5\" />\n </button>\n </header>\n\n <div\n class=\"min-h-0 flex-1 overflow-y-auto px-6 pb-[calc(2rem+env(safe-area-inset-bottom,0px))]\"\n >\n <slot />\n </div>\n </section>\n </div>\n </div>\n </Transition>\n </Teleport>\n</template>\n\n<style scoped>\n.sheet-enter-active,\n.sheet-leave-active {\n transition: opacity 200ms ease;\n}\n.sheet-enter-from,\n.sheet-leave-to {\n opacity: 0;\n}\n\n/* The panel travels further than the scrim fades, which is what makes the\n sheet read as rising rather than appearing. */\n.sheet-enter-active .sheet-panel,\n.sheet-leave-active .sheet-panel {\n transition: transform 280ms cubic-bezier(0.32, 0.72, 0, 1);\n}\n.sheet-enter-from .sheet-panel,\n.sheet-leave-to .sheet-panel {\n transform: translateY(6%);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .sheet-enter-from .sheet-panel,\n .sheet-leave-to .sheet-panel {\n transform: none;\n }\n}\n</style>\n","<script lang=\"ts\" setup>\nconst { title, description = '' } = defineProps<{\n title: string\n description?: string | undefined\n}>()\n</script>\n\n<template>\n <div class=\"flex flex-col items-center gap-3 px-6 py-10 text-center\">\n <div v-if=\"$slots.icon\" class=\"bg-muted text-primary rounded-card flex size-12 items-center\">\n <slot name=\"icon\" />\n </div>\n\n <h3 class=\"text-ink text-base font-semibold\">{{ title }}</h3>\n <p v-if=\"description\" class=\"text-ink-soft max-w-[36ch] text-sm\">\n {{ description }}\n </p>\n\n <div v-if=\"$slots.action\" class=\"mt-2 flex w-full flex-col gap-2\">\n <slot name=\"action\" />\n </div>\n </div>\n</template>\n\n<style></style>\n","<script lang=\"ts\" setup>\nconst { title, description = '' } = defineProps<{\n title: string\n description?: string | undefined\n}>()\n</script>\n\n<template>\n <div class=\"flex flex-col items-center gap-3 px-6 py-10 text-center\">\n <div v-if=\"$slots.icon\" class=\"bg-muted text-primary rounded-card flex size-12 items-center\">\n <slot name=\"icon\" />\n </div>\n\n <h3 class=\"text-ink text-base font-semibold\">{{ title }}</h3>\n <p v-if=\"description\" class=\"text-ink-soft max-w-[36ch] text-sm\">\n {{ description }}\n </p>\n\n <div v-if=\"$slots.action\" class=\"mt-2 flex w-full flex-col gap-2\">\n <slot name=\"action\" />\n </div>\n </div>\n</template>\n\n<style></style>\n","<script setup lang=\"ts\">\nconst { title } = defineProps<{ title: string }>()\n</script>\n\n<template>\n <header class=\"grid h-12 shrink-0 grid-cols-[2.5rem_1fr_2.5rem] items-center\">\n <div class=\"justify-self-start\"><slot name=\"left\" /></div>\n\n <h1 class=\"text-ink flex min-w-0 justify-center text-base font-semibold tabular-nums\">\n <slot name=\"title\">\n <span class=\"truncate\">{{ title }}</span>\n </slot>\n </h1>\n\n <div class=\"justify-self-end\"><slot name=\"right\" /></div>\n </header>\n</template>\n","<script setup lang=\"ts\">\nconst { title } = defineProps<{ title: string }>()\n</script>\n\n<template>\n <header class=\"grid h-12 shrink-0 grid-cols-[2.5rem_1fr_2.5rem] items-center\">\n <div class=\"justify-self-start\"><slot name=\"left\" /></div>\n\n <h1 class=\"text-ink flex min-w-0 justify-center text-base font-semibold tabular-nums\">\n <slot name=\"title\">\n <span class=\"truncate\">{{ title }}</span>\n </slot>\n </h1>\n\n <div class=\"justify-self-end\"><slot name=\"right\" /></div>\n </header>\n</template>\n","<script setup lang=\"ts\">\n/**\n * A small coloured dot, optionally labelled.\n *\n * Takes the colour as a class rather than a category, so an app can key it off\n * whatever its own domain calls a category — habit kinds, expense types,\n * priorities — without this component knowing about any of them.\n */\nconst { fill, label = '' } = defineProps<{\n /** Background utility for the dot, e.g. `bg-positive`. */\n fill: string\n /** Optional text after the dot. Omit for a bare marker. */\n label?: string\n}>()\n</script>\n\n<template>\n <span class=\"inline-flex items-center gap-1.5\">\n <span class=\"size-2 rounded-full\" :class=\"fill\" />\n <span v-if=\"label\" class=\"text-ink-soft text-xs font-medium\">{{ label }}</span>\n </span>\n</template>\n","<script setup lang=\"ts\">\n/**\n * A small coloured dot, optionally labelled.\n *\n * Takes the colour as a class rather than a category, so an app can key it off\n * whatever its own domain calls a category — habit kinds, expense types,\n * priorities — without this component knowing about any of them.\n */\nconst { fill, label = '' } = defineProps<{\n /** Background utility for the dot, e.g. `bg-positive`. */\n fill: string\n /** Optional text after the dot. Omit for a bare marker. */\n label?: string\n}>()\n</script>\n\n<template>\n <span class=\"inline-flex items-center gap-1.5\">\n <span class=\"size-2 rounded-full\" :class=\"fill\" />\n <span v-if=\"label\" class=\"text-ink-soft text-xs font-medium\">{{ label }}</span>\n </span>\n</template>\n","<script setup lang=\"ts\">\nimport ToneDot from './ToneDot.vue'\n\n/** The three classes a category needs to colour a heading. */\nexport interface Tone {\n /** Solid background for the dot, e.g. `bg-positive`. */\n fill: string\n /** Tinted surface for the pill, e.g. `bg-positive/5 border-positive/25`. */\n card: string\n /** Foreground that pairs with the surface, e.g. `text-positive`. */\n text: string\n}\n\n/**\n * A pill heading for a group of things.\n *\n * The tone arrives as three class strings rather than a category name: Tailwind\n * reads source files as plain text, so a class assembled at runtime never\n * reaches the stylesheet — the app has to write them out, and it is the app\n * that knows its own categories anyway.\n */\nconst {\n tone,\n label,\n count = 0,\n} = defineProps<{\n tone: Tone\n label: string\n /** Hidden when zero, so an empty group's heading stays quiet. */\n count?: number\n}>()\n</script>\n\n<template>\n <h2 class=\"flex items-center gap-2 self-start rounded-full border px-3 py-1\" :class=\"tone.card\">\n <ToneDot :fill=\"tone.fill\" />\n <span class=\"text-xs font-semibold tracking-wide uppercase\" :class=\"tone.text\">\n {{ label }}\n </span>\n <span v-if=\"count > 0\" class=\"text-ink-soft text-xs tabular-nums\">{{ count }}</span>\n </h2>\n</template>\n","<script setup lang=\"ts\">\nimport ToneDot from './ToneDot.vue'\n\n/** The three classes a category needs to colour a heading. */\nexport interface Tone {\n /** Solid background for the dot, e.g. `bg-positive`. */\n fill: string\n /** Tinted surface for the pill, e.g. `bg-positive/5 border-positive/25`. */\n card: string\n /** Foreground that pairs with the surface, e.g. `text-positive`. */\n text: string\n}\n\n/**\n * A pill heading for a group of things.\n *\n * The tone arrives as three class strings rather than a category name: Tailwind\n * reads source files as plain text, so a class assembled at runtime never\n * reaches the stylesheet — the app has to write them out, and it is the app\n * that knows its own categories anyway.\n */\nconst {\n tone,\n label,\n count = 0,\n} = defineProps<{\n tone: Tone\n label: string\n /** Hidden when zero, so an empty group's heading stays quiet. */\n count?: number\n}>()\n</script>\n\n<template>\n <h2 class=\"flex items-center gap-2 self-start rounded-full border px-3 py-1\" :class=\"tone.card\">\n <ToneDot :fill=\"tone.fill\" />\n <span class=\"text-xs font-semibold tracking-wide uppercase\" :class=\"tone.text\">\n {{ label }}\n </span>\n <span v-if=\"count > 0\" class=\"text-ink-soft text-xs tabular-nums\">{{ count }}</span>\n </h2>\n</template>\n","<script setup lang=\"ts\" generic=\"T extends string | number\">\nimport { useId } from 'vue'\n\n/**\n * A row of mutually exclusive choices.\n *\n * Radio inputs rather than buttons: it is a single choice out of a small set,\n * so arrow-key navigation and the \"one of N selected\" announcement come free.\n */\nconst { options } = defineProps<{\n options: readonly { value: T; label: string }[]\n}>()\n\nconst model = defineModel<T>({ required: true })\n\nconst name = useId()\n</script>\n\n<template>\n <div class=\"bg-muted rounded-card flex w-full gap-1 p-1\">\n <label v-for=\"option in options\" :key=\"String(option.value)\" class=\"flex-1 cursor-pointer\">\n <input v-model=\"model\" type=\"radio\" :value=\"option.value\" :name=\"name\" class=\"sr-only\" />\n <span\n class=\"flex h-10 items-center justify-center rounded-xl px-2 text-sm font-medium transition-colors select-none\"\n :class=\"model === option.value ? 'bg-surface text-ink shadow-sm' : 'text-ink-soft'\"\n >\n {{ option.label }}\n </span>\n </label>\n </div>\n</template>\n","<script setup lang=\"ts\" generic=\"T extends string | number\">\nimport { useId } from 'vue'\n\n/**\n * A row of mutually exclusive choices.\n *\n * Radio inputs rather than buttons: it is a single choice out of a small set,\n * so arrow-key navigation and the \"one of N selected\" announcement come free.\n */\nconst { options } = defineProps<{\n options: readonly { value: T; label: string }[]\n}>()\n\nconst model = defineModel<T>({ required: true })\n\nconst name = useId()\n</script>\n\n<template>\n <div class=\"bg-muted rounded-card flex w-full gap-1 p-1\">\n <label v-for=\"option in options\" :key=\"String(option.value)\" class=\"flex-1 cursor-pointer\">\n <input v-model=\"model\" type=\"radio\" :value=\"option.value\" :name=\"name\" class=\"sr-only\" />\n <span\n class=\"flex h-10 items-center justify-center rounded-xl px-2 text-sm font-medium transition-colors select-none\"\n :class=\"model === option.value ? 'bg-surface text-ink shadow-sm' : 'text-ink-soft'\"\n >\n {{ option.label }}\n </span>\n </label>\n </div>\n</template>\n","<script setup lang=\"ts\">\ndefineProps<{ title: string }>()\n</script>\n\n<template>\n <section class=\"flex flex-col gap-2\">\n <h2 class=\"text-ink-soft px-1 text-xs font-semibold tracking-wide uppercase\">{{ title }}</h2>\n\n <!-- One card per group, rows divided by hairlines. Loose fields floating on\n the page gave no sense of what belonged with what. -->\n <div class=\"border-hair bg-surface rounded-card divide-hair divide-y overflow-hidden border\">\n <slot />\n </div>\n </section>\n</template>\n","<script setup lang=\"ts\">\ndefineProps<{ title: string }>()\n</script>\n\n<template>\n <section class=\"flex flex-col gap-2\">\n <h2 class=\"text-ink-soft px-1 text-xs font-semibold tracking-wide uppercase\">{{ title }}</h2>\n\n <!-- One card per group, rows divided by hairlines. Loose fields floating on\n the page gave no sense of what belonged with what. -->\n <div class=\"border-hair bg-surface rounded-card divide-hair divide-y overflow-hidden border\">\n <slot />\n </div>\n </section>\n</template>\n","<script setup lang=\"ts\">\nimport { ChevronRight } from 'lucide-vue-next'\nimport type { Component } from 'vue'\n\n/**\n * One line in a settings card.\n *\n * `as` decides the element: a row that navigates has to be a button, and a row\n * that merely holds a control must not be, or the control becomes unreachable.\n */\nconst {\n label,\n description = '',\n icon = undefined,\n interactive = false,\n stacked = false,\n} = defineProps<{\n label: string\n description?: string\n icon?: Component | undefined\n /** Renders the row as a button with a chevron. */\n interactive?: boolean\n /** Puts the control on its own line below the label, for wide controls. */\n stacked?: boolean\n}>()\n\nconst emit = defineEmits<{ click: [] }>()\n</script>\n\n<template>\n <component\n :is=\"interactive ? 'button' : 'div'\"\n :type=\"interactive ? 'button' : undefined\"\n class=\"flex w-full items-center gap-3 px-4 py-3 text-left\"\n :class=\"[\n interactive ? 'hover:bg-muted/60 transition-colors active:scale-[0.99]' : '',\n stacked ? 'flex-col items-stretch gap-3' : '',\n ]\"\n @click=\"interactive && emit('click')\"\n >\n <div class=\"flex items-center gap-3\">\n <span\n v-if=\"icon\"\n class=\"bg-muted text-ink-soft flex size-9 shrink-0 items-center justify-center rounded-xl\"\n aria-hidden=\"true\"\n >\n <component :is=\"icon\" class=\"size-[18px]\" />\n </span>\n\n <div class=\"min-w-0 flex-1\">\n <p class=\"text-ink text-sm font-medium\">{{ label }}</p>\n <p v-if=\"description\" class=\"text-ink-soft mt-0.5 text-xs leading-snug\">\n {{ description }}\n </p>\n </div>\n\n <div v-if=\"!stacked\" class=\"shrink-0\"><slot /></div>\n\n <ChevronRight v-if=\"interactive\" class=\"text-ink-soft size-4 shrink-0\" aria-hidden=\"true\" />\n </div>\n\n <div v-if=\"stacked\"><slot /></div>\n </component>\n</template>\n","<script setup lang=\"ts\">\nimport { ChevronRight } from 'lucide-vue-next'\nimport type { Component } from 'vue'\n\n/**\n * One line in a settings card.\n *\n * `as` decides the element: a row that navigates has to be a button, and a row\n * that merely holds a control must not be, or the control becomes unreachable.\n */\nconst {\n label,\n description = '',\n icon = undefined,\n interactive = false,\n stacked = false,\n} = defineProps<{\n label: string\n description?: string\n icon?: Component | undefined\n /** Renders the row as a button with a chevron. */\n interactive?: boolean\n /** Puts the control on its own line below the label, for wide controls. */\n stacked?: boolean\n}>()\n\nconst emit = defineEmits<{ click: [] }>()\n</script>\n\n<template>\n <component\n :is=\"interactive ? 'button' : 'div'\"\n :type=\"interactive ? 'button' : undefined\"\n class=\"flex w-full items-center gap-3 px-4 py-3 text-left\"\n :class=\"[\n interactive ? 'hover:bg-muted/60 transition-colors active:scale-[0.99]' : '',\n stacked ? 'flex-col items-stretch gap-3' : '',\n ]\"\n @click=\"interactive && emit('click')\"\n >\n <div class=\"flex items-center gap-3\">\n <span\n v-if=\"icon\"\n class=\"bg-muted text-ink-soft flex size-9 shrink-0 items-center justify-center rounded-xl\"\n aria-hidden=\"true\"\n >\n <component :is=\"icon\" class=\"size-[18px]\" />\n </span>\n\n <div class=\"min-w-0 flex-1\">\n <p class=\"text-ink text-sm font-medium\">{{ label }}</p>\n <p v-if=\"description\" class=\"text-ink-soft mt-0.5 text-xs leading-snug\">\n {{ description }}\n </p>\n </div>\n\n <div v-if=\"!stacked\" class=\"shrink-0\"><slot /></div>\n\n <ChevronRight v-if=\"interactive\" class=\"text-ink-soft size-4 shrink-0\" aria-hidden=\"true\" />\n </div>\n\n <div v-if=\"stacked\"><slot /></div>\n </component>\n</template>\n","<script setup lang=\"ts\">\nconst {\n rows = 3,\n rowHeight = 'h-14',\n label = 'Loading…',\n} = defineProps<{\n rows?: number\n rowHeight?: string\n label?: string\n}>()\n</script>\n\n<template>\n <div role=\"status\" class=\"flex flex-col gap-1\">\n <span class=\"sr-only\">{{ label }}</span>\n\n <div\n v-for=\"row in rows\"\n :key=\"row\"\n class=\"bg-muted rounded-card animate-pulse\"\n :class=\"rowHeight\"\n aria-hidden=\"true\"\n />\n </div>\n</template>\n","<script setup lang=\"ts\">\nconst {\n rows = 3,\n rowHeight = 'h-14',\n label = 'Loading…',\n} = defineProps<{\n rows?: number\n rowHeight?: string\n label?: string\n}>()\n</script>\n\n<template>\n <div role=\"status\" class=\"flex flex-col gap-1\">\n <span class=\"sr-only\">{{ label }}</span>\n\n <div\n v-for=\"row in rows\"\n :key=\"row\"\n class=\"bg-muted rounded-card animate-pulse\"\n :class=\"rowHeight\"\n aria-hidden=\"true\"\n />\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { ArrowDown, ArrowRight, ArrowUp } from 'lucide-vue-next'\n\nconst {\n value,\n label,\n trend = null,\n} = defineProps<{\n value: string\n label: string\n trend?: 'up' | 'down' | 'flat' | null\n}>()\n\nconst TREND_ICON = { up: ArrowUp, down: ArrowDown, flat: ArrowRight } as const\n</script>\n\n<template>\n <div class=\"border-hair rounded-card flex flex-1 flex-col gap-0.5 border p-3\">\n <div class=\"flex items-baseline gap-1\">\n <span class=\"text-ink text-xl font-semibold tabular-nums\">{{ value }}</span>\n <component :is=\"TREND_ICON[trend]\" v-if=\"trend\" class=\"text-ink-soft size-3\" />\n </div>\n <span class=\"text-ink-soft text-xs\">{{ label }}</span>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { ArrowDown, ArrowRight, ArrowUp } from 'lucide-vue-next'\n\nconst {\n value,\n label,\n trend = null,\n} = defineProps<{\n value: string\n label: string\n trend?: 'up' | 'down' | 'flat' | null\n}>()\n\nconst TREND_ICON = { up: ArrowUp, down: ArrowDown, flat: ArrowRight } as const\n</script>\n\n<template>\n <div class=\"border-hair rounded-card flex flex-1 flex-col gap-0.5 border p-3\">\n <div class=\"flex items-baseline gap-1\">\n <span class=\"text-ink text-xl font-semibold tabular-nums\">{{ value }}</span>\n <component :is=\"TREND_ICON[trend]\" v-if=\"trend\" class=\"text-ink-soft size-3\" />\n </div>\n <span class=\"text-ink-soft text-xs\">{{ label }}</span>\n </div>\n</template>\n","<script setup lang=\"ts\" generic=\"L extends string\">\n/**\n * A flat language switcher for screens with no Settings behind them.\n *\n * The list and the labels are props: only the app knows which languages it\n * ships, and endonyms — each language written in itself — are what make the\n * right option legible to someone who cannot read the current interface.\n */\nconst {\n locales,\n labels,\n label = '',\n} = defineProps<{\n locales: readonly L[]\n /** Endonyms, e.g. `{ en: 'English', tr: 'Türkçe' }`. */\n labels: Record<L, string>\n /** Accessible name for the group. */\n label?: string\n}>()\n\n/**\n * Two-way bound rather than taking the runtime's ref as a prop: props are not\n * unwrapped in a template and cannot be assigned to, so the ref would compare\n * against itself and the click handler would not compile.\n */\nconst preference = defineModel<'system' | L>({ required: true })\n</script>\n\n<template>\n <nav class=\"flex flex-wrap items-center justify-center gap-1\" :aria-label=\"label || undefined\">\n <button\n v-for=\"locale in locales\"\n :key=\"locale\"\n type=\"button\"\n :lang=\"locale\"\n class=\"rounded-full px-2.5 py-1.5 text-xs transition-colors\"\n :class=\"\n preference === locale ? 'bg-muted text-ink font-semibold' : 'text-ink-soft hover:text-ink'\n \"\n :aria-pressed=\"preference === locale\"\n @click=\"preference = locale\"\n >\n {{ labels[locale] }}\n </button>\n </nav>\n</template>\n","<script setup lang=\"ts\" generic=\"L extends string\">\n/**\n * A flat language switcher for screens with no Settings behind them.\n *\n * The list and the labels are props: only the app knows which languages it\n * ships, and endonyms — each language written in itself — are what make the\n * right option legible to someone who cannot read the current interface.\n */\nconst {\n locales,\n labels,\n label = '',\n} = defineProps<{\n locales: readonly L[]\n /** Endonyms, e.g. `{ en: 'English', tr: 'Türkçe' }`. */\n labels: Record<L, string>\n /** Accessible name for the group. */\n label?: string\n}>()\n\n/**\n * Two-way bound rather than taking the runtime's ref as a prop: props are not\n * unwrapped in a template and cannot be assigned to, so the ref would compare\n * against itself and the click handler would not compile.\n */\nconst preference = defineModel<'system' | L>({ required: true })\n</script>\n\n<template>\n <nav class=\"flex flex-wrap items-center justify-center gap-1\" :aria-label=\"label || undefined\">\n <button\n v-for=\"locale in locales\"\n :key=\"locale\"\n type=\"button\"\n :lang=\"locale\"\n class=\"rounded-full px-2.5 py-1.5 text-xs transition-colors\"\n :class=\"\n preference === locale ? 'bg-muted text-ink font-semibold' : 'text-ink-soft hover:text-ink'\n \"\n :aria-pressed=\"preference === locale\"\n @click=\"preference = locale\"\n >\n {{ labels[locale] }}\n </button>\n </nav>\n</template>\n","<script setup lang=\"ts\">\nconst { label } = defineProps<{ label: string }>()\n\nconst emit = defineEmits<{ click: [] }>()\n</script>\n\n<template>\n <button\n type=\"button\"\n class=\"border-hair bg-surface text-ink rounded-card hover:bg-muted flex h-11 w-full items-center justify-center gap-2 border text-sm font-medium transition-colors active:scale-95\"\n @click=\"emit('click')\"\n >\n <!-- Google asks for its own mark, so it is inlined rather than themed. -->\n <svg class=\"size-4\" viewBox=\"0 0 48 48\" aria-hidden=\"true\">\n <path\n fill=\"#EA4335\"\n d=\"M24 9.5c3.5 0 6.6 1.2 9 3.6l6.7-6.7C35.6 2.7 30.2.5 24 .5 14.6.5 6.5 5.9 2.6 13.7l7.8 6.1C12.3 13.7 17.7 9.5 24 9.5z\"\n />\n <path\n fill=\"#4285F4\"\n d=\"M46.5 24.5c0-1.6-.1-3.1-.4-4.5H24v9h12.7c-.6 3-2.3 5.6-4.9 7.3l7.6 5.9c4.4-4.1 7.1-10.2 7.1-17.7z\"\n />\n <path\n fill=\"#FBBC05\"\n d=\"M10.4 28.2a14.6 14.6 0 0 1 0-8.4l-7.8-6.1a24 24 0 0 0 0 20.6l7.8-6.1z\"\n />\n <path\n fill=\"#34A853\"\n d=\"M24 47.5c6.2 0 11.5-2 15.4-5.6l-7.6-5.9c-2.1 1.4-4.8 2.3-7.8 2.3-6.3 0-11.7-4.2-13.6-10l-7.8 6.1C6.5 42.1 14.6 47.5 24 47.5z\"\n />\n </svg>\n {{ label }}\n </button>\n</template>\n","<script setup lang=\"ts\">\nconst { label } = defineProps<{ label: string }>()\n\nconst emit = defineEmits<{ click: [] }>()\n</script>\n\n<template>\n <button\n type=\"button\"\n class=\"border-hair bg-surface text-ink rounded-card hover:bg-muted flex h-11 w-full items-center justify-center gap-2 border text-sm font-medium transition-colors active:scale-95\"\n @click=\"emit('click')\"\n >\n <!-- Google asks for its own mark, so it is inlined rather than themed. -->\n <svg class=\"size-4\" viewBox=\"0 0 48 48\" aria-hidden=\"true\">\n <path\n fill=\"#EA4335\"\n d=\"M24 9.5c3.5 0 6.6 1.2 9 3.6l6.7-6.7C35.6 2.7 30.2.5 24 .5 14.6.5 6.5 5.9 2.6 13.7l7.8 6.1C12.3 13.7 17.7 9.5 24 9.5z\"\n />\n <path\n fill=\"#4285F4\"\n d=\"M46.5 24.5c0-1.6-.1-3.1-.4-4.5H24v9h12.7c-.6 3-2.3 5.6-4.9 7.3l7.6 5.9c4.4-4.1 7.1-10.2 7.1-17.7z\"\n />\n <path\n fill=\"#FBBC05\"\n d=\"M10.4 28.2a14.6 14.6 0 0 1 0-8.4l-7.8-6.1a24 24 0 0 0 0 20.6l7.8-6.1z\"\n />\n <path\n fill=\"#34A853\"\n d=\"M24 47.5c6.2 0 11.5-2 15.4-5.6l-7.6-5.9c-2.1 1.4-4.8 2.3-7.8 2.3-6.3 0-11.7-4.2-13.6-10l-7.8 6.1C6.5 42.1 14.6 47.5 24 47.5z\"\n />\n </svg>\n {{ label }}\n </button>\n</template>\n","//#region src/formatters/plain.ts\n/**\n* Renders a diagnostic into a multi-line, unicode-decorated string suitable\n* for terminal output. The first line is `[<name>] <message>`; optional\n* details (`fix`, `sources`, `docs`) follow with `├▶`/`╰▶` connectors.\n*/\nfunction formatDiagnostic(diagnostic) {\n\tconst header = `[${diagnostic.name}] ${diagnostic.message}`;\n\tconst details = [];\n\tif (diagnostic.fix) details.push(`fix: ${diagnostic.fix}`);\n\tif (diagnostic.sources?.length) details.push(`sources: ${diagnostic.sources.join(\", \")}`);\n\tif (diagnostic.docs) details.push(`see: ${diagnostic.docs}`);\n\tif (details.length === 0) return header;\n\treturn [header, ...details.map((detail, i) => {\n\t\treturn `${i < details.length - 1 ? \"├▶\" : \"╰▶\"} ${detail}`;\n\t})].join(\"\\n\");\n}\n//#endregion\n//#region src/utils.ts\n/**\n* Transforms a value or a function that returns a value to a value.\n*\n* @param valFn either a value or a function that returns a value\n* @param args arguments to pass to the function if `valFn` is a function\n*\n* @internal\n*/\nfunction toValueWithArgs(valFn, ...args) {\n\treturn typeof valFn === \"function\" ? valFn(...args) : valFn;\n}\n//#endregion\n//#region src/diagnostic.ts\n/**\n* Creates a console reporter that renders each diagnostic with `formatter` and\n* prints the result via `console[method]`. Both default sensibly (`'warn'` and\n* {@link formatDiagnostic}); `method` can also be overridden per call through\n* the reporter options.\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction createConsoleReporter({ method: defaultMethod = \"warn\", formatter = formatDiagnostic } = {}) {\n\treturn (diagnostic, { method = defaultMethod } = {}) => {\n\t\tconsole[method](formatter(diagnostic));\n\t};\n}\nconst captureStackTrace = Error.captureStackTrace;\nvar Diagnostic = class Diagnostic extends Error {\n\tname;\n\t/**\n\t* The diagnostic code, e.g. `MATH_E001`.\n\t* Also appears as the `name` property.\n\t*/\n\tcode;\n\t/**\n\t* URL to extended documentation for this diagnostic code.\n\t* Auto-generated from {@link DefineDiagnosticsOptions.docsBase}.\n\t*/\n\tdocs;\n\t/**\n\t* Optional actionable instructions on how to resolve the problem.\n\t*/\n\tfix;\n\t/**\n\t* Locations in user code that contributed to this diagnostic, in\n\t* `file:line:column` format. Relevant when the stack trace doesn't reflect\n\t* the user's source (e.g. compilers, bundlers), otherwise redundant with the\n\t* stack and should be omitted.\n\t*/\n\tsources;\n\t/**\n\t* Alias for {@link Error.message}: the reason this diagnostic was raised.\n\t*/\n\tget why() {\n\t\treturn this.message;\n\t}\n\t/**\n\t* @param init structured initializer; `why` is required\n\t* @param captureFrom V8 stack-cutoff frame. Defaults to {@link Diagnostic}\n\t* so the top of the trace is the `new Diagnostic(...)` call site.\n\t* `defineDiagnostics` passes its action method to strip its own frames too.\n\t* Ignored on engines without `Error.captureStackTrace`.\n\t*/\n\tconstructor(init, captureFrom = Diagnostic) {\n\t\tsuper(init.why, { cause: init.cause });\n\t\tthis.code = this.name = init.code;\n\t\tthis.fix = init.fix;\n\t\tthis.docs = init.docs;\n\t\tthis.sources = init.sources;\n\t\tcaptureStackTrace?.(this, captureFrom);\n\t}\n\t/**\n\t* Converts the diagnostic into a serializable structured object.\n\t*/\n\ttoJSON() {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\twhy: this.why,\n\t\t\tfix: this.fix,\n\t\t\tdocs: this.docs,\n\t\t\tsources: this.sources,\n\t\t\tcause: this.cause,\n\t\t\tstack: this.stack\n\t\t};\n\t}\n};\n/**\n* Resolves the docs URL for a code from a `docsBase` (string template or\n* resolver function). Shared by {@link defineDiagnostics} and\n* {@link defineProdDiagnostics}. Per-code `docs` overrides are handled by the\n* caller; this only covers the `docsBase`-derived case.\n*\n* @internal\n*/\nfunction deriveDocs(docsBase, code) {\n\treturn typeof docsBase === \"string\" ? `${docsBase}/${code.toLowerCase()}` : docsBase?.(code);\n}\n/**\n* Creates a typed diagnostics object from a set of code definitions. Each\n* code becomes a callable {@link DiagnosticHandle}: invoke to report, or\n* `throw` the result to raise. No `new` required, no proxy.\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction defineDiagnostics(options) {\n\tconst reporters = options.reporters ?? [];\n\tconst result = {};\n\tconst { docsBase } = options;\n\tfor (const code of Object.keys(options.codes)) {\n\t\tconst def = options.codes[code];\n\t\tconst docs = def.docs === false ? void 0 : def.docs || deriveDocs(docsBase, code);\n\t\tconst handle = (params = {}, reporterOptions = {}) => {\n\t\t\tconst diagnostic = new Diagnostic({\n\t\t\t\tcode,\n\t\t\t\twhy: toValueWithArgs(def.why, params),\n\t\t\t\tfix: toValueWithArgs(def.fix, params),\n\t\t\t\tdocs,\n\t\t\t\tcause: params.cause,\n\t\t\t\tsources: params.sources\n\t\t\t}, handle);\n\t\t\tfor (const reporter of reporters) reporter(diagnostic, reporterOptions);\n\t\t\treturn diagnostic;\n\t\t};\n\t\tresult[code] = handle;\n\t}\n\treturn result;\n}\n//#endregion\n//#region src/prod-diagnostics.ts\n/**\n* Production counterpart to {@link defineDiagnostics}. Returns a `Proxy` that\n* builds a minimal {@link Diagnostic} for any accessed code: the code becomes\n* the instance `name`, `docs` is derived from `docsBase`, and `why` points to\n* the docs URL when one exists (empty otherwise, so the thrown header is just\n* the code). It carries no catalog text, so it stays tiny in a bundle.\n*\n* The strip plugin (`@nostics/unplugin`) can rewrite a `defineDiagnostics()`\n* call into a `process.env.NODE_ENV === 'production'` ternary that selects this\n* factory in production, dropping every `why`/`fix` string from the bundle.\n*\n* @example\n* ```ts\n* const diagnostics = defineProdDiagnostics({ docsBase: 'https://docs.example.com' })\n* throw diagnostics.NUXT_B2011() // NUXT_B2011: https://docs.example.com/nuxt_b2011\n* ```\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction defineProdDiagnostics(options = {}) {\n\tconst { docsBase, reporters = [] } = options;\n\treturn new Proxy({}, { get(_target, code) {\n\t\tif (typeof code !== \"string\") return void 0;\n\t\tconst handle = (params = {}, reporterOptions = {}) => {\n\t\t\tconst docs = deriveDocs(docsBase, code);\n\t\t\tconst diagnostic = new Diagnostic({\n\t\t\t\tcode,\n\t\t\t\twhy: docs ?? \"\",\n\t\t\t\tdocs,\n\t\t\t\tcause: params.cause,\n\t\t\t\tsources: params.sources\n\t\t\t}, handle);\n\t\t\tfor (const reporter of reporters) reporter(diagnostic, reporterOptions);\n\t\t\treturn diagnostic;\n\t\t};\n\t\treturn handle;\n\t} });\n}\n//#endregion\nexport { Diagnostic, createConsoleReporter, defineDiagnostics, defineProdDiagnostics, formatDiagnostic };\n\n//# sourceMappingURL=index.mjs.map","/*!\n* vue-router v5.3.0\n* (c) 2026 Eduardo San Martin Morote\n* @license MIT\n*/\nimport { createConsoleReporter, defineDiagnostics } from \"nostics\";\nimport { inject } from \"vue\";\n//#region src/utils/index.ts\n/**\n* Identity function that returns the value as is.\n*\n* @param v - the value to return\n*\n* @internal\n*/\nconst identityFn = (v) => v;\n/**\n* Checks if a path is absolute, meaning it starts with a `/`.\n*\n* @param path - path to check\n*\n* @internal\n*/\nconst isAbsolutePath = (path) => path.startsWith(\"/\");\n/**\n* Allows differentiating lazy components from functional components and vue-class-component\n* @internal\n*\n* @param component\n*/\nfunction isRouteComponent(component) {\n\treturn typeof component === \"object\" || \"displayName\" in component || \"props\" in component || \"__vccOpts\" in component;\n}\nfunction isESModule(obj) {\n\treturn obj.__esModule || obj[Symbol.toStringTag] === \"Module\" || obj.default && isRouteComponent(obj.default);\n}\nconst assign = Object.assign;\nfunction applyToParams(fn, params) {\n\tconst newParams = {};\n\tfor (const key in params) {\n\t\tconst value = params[key];\n\t\tnewParams[key] = isArray(value) ? value.map(fn) : fn(value);\n\t}\n\treturn newParams;\n}\nconst noop = () => {};\n/**\n* Typesafe alternative to Array.isArray\n* https://github.com/microsoft/TypeScript/pull/48228\n*\n* @internal\n*/\nconst isArray = Array.isArray;\nfunction mergeOptions(defaults, partialOptions) {\n\tconst options = {};\n\tfor (const key in defaults) options[key] = key in partialOptions ? partialOptions[key] : defaults[key];\n\treturn options;\n}\n//#endregion\n//#region src/errors.ts\nconst NavigationFailureSymbol = Symbol(process.env.NODE_ENV !== \"production\" ? \"navigation failure\" : \"\");\n/**\n* Enumeration with all possible types for navigation failures. Can be passed to\n* {@link isNavigationFailure} to check for specific failures.\n*/\nlet NavigationFailureType = /* @__PURE__ */ function(NavigationFailureType) {\n\t/**\n\t* An aborted navigation is a navigation that failed because a navigation\n\t* guard returned `false` or called `next(false)`\n\t*/\n\tNavigationFailureType[NavigationFailureType[\"aborted\"] = 4] = \"aborted\";\n\t/**\n\t* A cancelled navigation is a navigation that failed because a more recent\n\t* navigation finished started (not necessarily finished).\n\t*/\n\tNavigationFailureType[NavigationFailureType[\"cancelled\"] = 8] = \"cancelled\";\n\t/**\n\t* A duplicated navigation is a navigation that failed because it was\n\t* initiated while already being at the exact same location.\n\t*/\n\tNavigationFailureType[NavigationFailureType[\"duplicated\"] = 16] = \"duplicated\";\n\treturn NavigationFailureType;\n}({});\nconst ErrorTypeMessages = {\n\t[1]({ location, currentLocation }) {\n\t\treturn `No match for\\n ${JSON.stringify(location)}${currentLocation ? \"\\nwhile being at\\n\" + JSON.stringify(currentLocation) : \"\"}`;\n\t},\n\t[2]({ from, to }) {\n\t\treturn `Redirected from \"${from.fullPath}\" to \"${stringifyRoute(to)}\" via a navigation guard.`;\n\t},\n\t[4]({ from, to }) {\n\t\treturn `Navigation aborted from \"${from.fullPath}\" to \"${to.fullPath}\" via a navigation guard.`;\n\t},\n\t[8]({ from, to }) {\n\t\treturn `Navigation cancelled from \"${from.fullPath}\" to \"${to.fullPath}\" with a new navigation.`;\n\t},\n\t[16]({ from, to: _to }) {\n\t\treturn `Avoided redundant navigation to current location: \"${from.fullPath}\".`;\n\t}\n};\n/**\n* Creates a typed NavigationFailure object.\n* @internal\n* @param type - NavigationFailureType\n* @param params - { from, to }\n*/\nfunction createRouterError(type, params) {\n\tif (process.env.NODE_ENV !== \"production\" || false) return assign(new Error(ErrorTypeMessages[type](params)), {\n\t\ttype,\n\t\t[NavigationFailureSymbol]: true\n\t}, params);\n\telse return assign(/* @__PURE__ */ new Error(), {\n\t\ttype,\n\t\t[NavigationFailureSymbol]: true\n\t}, params);\n}\nfunction isNavigationFailure(error, type) {\n\treturn error instanceof Error && NavigationFailureSymbol in error && (type == null || !!(error.type & type));\n}\nconst propertiesToLog = [\n\t\"params\",\n\t\"query\",\n\t\"hash\"\n];\n/**\n* Stringifies a raw location for display in dev warnings.\n*\n* @internal\n*/\nfunction stringifyRoute(to) {\n\tif (!to || typeof to === \"string\") return to;\n\tif (to.path != null) return to.path;\n\tconst location = {};\n\tfor (const key of propertiesToLog) if (key in to) location[key] = to[key];\n\treturn JSON.stringify(location, null, 2);\n}\n//#endregion\n//#region src/diagnostics.ts\n/**\n* Runtime diagnostics catalog for Vue Router.\n*\n* Every entry has a stable `VUE_ROUTER_R####` code, a `why` that states the problem\n* (the diagnosis only, never the remedy) and a `fix` that states the remedy\n* (only, never the diagnosis). They are complementary: the reporter prints\n* both, so neither repeats the other. The diagnosis substrings asserted by the\n* warning tests stay in `why`. All call sites stay behind the existing `__DEV__` (or\n* `process.env.NODE_ENV !== 'production'`) guards and remain bare expression\n* statements so they tree-shake out of production builds.\n*\n* Codes are permanent: never rename or reuse one.\n* - `VUE_ROUTER_R0###` core runtime warnings\n* - `VUE_ROUTER_R1###` experimental data-loaders\n*/\nconst diagnostics = /*#__PURE__*/ defineDiagnostics({\n\treporters: [/*#__PURE__*/ createConsoleReporter()],\n\tcodes: {\n\t\tVUE_ROUTER_R0001: {\n\t\t\twhy: (p) => `Parent route \"${p.name}\" not found when adding child route`,\n\t\t\tfix: \"Add the parent route before its children, or check the parent name for typos.\",\n\t\t\tdocs: \"https://router.vuejs.org/guide/advanced/dynamic-routing.html#Adding-nested-routes\"\n\t\t},\n\t\tVUE_ROUTER_R0002: {\n\t\t\twhy: (p) => `Cannot remove non-existent route \"${p.name}\"`,\n\t\t\tfix: \"Check the route name; it may already have been removed or was never added.\",\n\t\t\tdocs: \"https://router.vuejs.org/guide/advanced/dynamic-routing.html#Removing-routes\"\n\t\t},\n\t\tVUE_ROUTER_R0003: {\n\t\t\twhy: (p) => `Location \"${stringifyRoute(p.location)}\" resolved to \"${p.href}\". A resolved location cannot start with multiple slashes.`,\n\t\t\tfix: \"Remove the leading slashes from the location or fix the route configuration.\"\n\t\t},\n\t\tVUE_ROUTER_R0004: {\n\t\t\twhy: (p) => `No match found for location with path \"${stringifyRoute(p.path)}\"`,\n\t\t\tfix: \"Add a route matching this path or check for typos in the location.\",\n\t\t\tdocs: \"https://router.vuejs.org/guide/essentials/dynamic-matching.html#Catch-all-404-Not-found-Route\"\n\t\t},\n\t\tVUE_ROUTER_R0005: {\n\t\t\twhy: (p) => `router.resolve() was passed an invalid location. This will fail in production.\\nLocation: ${stringifyRoute(p.rawLocation)}`,\n\t\t\tfix: \"Pass a valid route location: a string path or an object with `path` or `name`.\"\n\t\t},\n\t\tVUE_ROUTER_R0006: {\n\t\t\twhy: (p) => `Path \"${p.path}\" was passed with params but they will be ignored because a \"path\" was passed.`,\n\t\t\tfix: \"Use a named route `{ name, params }` instead of `{ path, params }`.\",\n\t\t\tdocs: \"https://router.vuejs.org/guide/essentials/navigation.html#Navigate-to-a-different-location\"\n\t\t},\n\t\tVUE_ROUTER_R0007: {\n\t\t\twhy: (p) => `A \\`hash\\` should always start with the character \"#\" but received \"${p.hash}\".`,\n\t\t\tfix: (p) => `Prepend \"#\" to the hash in your route location: use \"#${p.hash}\".`\n\t\t},\n\t\tVUE_ROUTER_R0008: {\n\t\t\twhy: (p) => `Invalid redirect found:\\n${p.target}\\n when navigating to \"${p.to}\".\\nThis will break in production.`,\n\t\t\tfix: \"A redirect must resolve to a location with a `name` or `path`; return one of those (or a string path) from `redirect`.\",\n\t\t\tdocs: \"https://router.vuejs.org/guide/essentials/redirect-and-alias.html#Redirect\"\n\t\t},\n\t\tVUE_ROUTER_R0009: {\n\t\t\twhy: (p) => `Detected a possibly infinite redirection in a navigation guard when going from \"${p.from}\" to \"${p.to}\". Aborting to avoid a Stack Overflow. This might break in production if not fixed.`,\n\t\t\tfix: \"A guard is returning a new location on every call; make that return conditional so it only redirects when actually needed.\",\n\t\t\tdocs: \"https://router.vuejs.org/guide/advanced/navigation-guards.html#Global-Before-Guards\"\n\t\t},\n\t\tVUE_ROUTER_R0010: {\n\t\t\twhy: \"Uncaught error during route navigation\",\n\t\t\tfix: \"Register an error handler with `router.onError()` to handle navigation errors.\"\n\t\t},\n\t\tVUE_ROUTER_R0011: {\n\t\t\twhy: \"Unexpected error when starting the router:\",\n\t\t\tfix: \"Inspect the actual cause; a navigation guard or async component likely threw during the initial navigation.\"\n\t\t},\n\t\tVUE_ROUTER_R0020: {\n\t\t\twhy: (p) => `No active route record was found when calling \\`${p.fn}()\\`. Maybe you called it inside of App.vue?`,\n\t\t\tfix: \"Call it from a component rendered inside <router-view> (a page component or one of its children), not from App.vue.\",\n\t\t\tdocs: \"https://router.vuejs.org/guide/advanced/composition-api.html#Navigation-Guards\"\n\t\t},\n\t\tVUE_ROUTER_R0021: {\n\t\t\twhy: \"No active route record was found when reactivating component with navigation guard. This is likely a bug in vue-router.\",\n\t\t\tfix: \"Report with a minimal reproduction at https://github.com/vuejs/router/issues/new/choose.\"\n\t\t},\n\t\tVUE_ROUTER_R0022: {\n\t\t\twhy: (p) => `${p.fn}() was called outside of component setup but it must be called at the top of a setup function`,\n\t\t\tfix: \"Call it synchronously at the top of `setup()`, before any `await`.\",\n\t\t\tdocs: \"https://router.vuejs.org/guide/advanced/composition-api.html#Navigation-Guards\"\n\t\t},\n\t\tVUE_ROUTER_R0023: {\n\t\t\twhy: (p) => `The \"next\" callback was never called inside of ${p.name ? `\"${p.name}\"` : \"\"}:\\n${p.guard}`,\n\t\t\tfix: \"Make sure `next()` runs on every branch, including early returns and async paths, or drop the `next` parameter and return the value instead.\",\n\t\t\tdocs: \"https://router.vuejs.org/guide/advanced/navigation-guards.html#Optional-third-argument-next\"\n\t\t},\n\t\tVUE_ROUTER_R0024: {\n\t\t\twhy: (p) => `The \"next\" callback was called more than once in one navigation guard when going from \"${p.from}\" to \"${p.to}\". This will fail in production.`,\n\t\t\tfix: \"Call `next()` exactly once per guard: remove the extra call, or migrate to returning the value you passed to `next()`.\",\n\t\t\tdocs: \"https://router.vuejs.org/guide/advanced/navigation-guards.html#Optional-third-argument-next\"\n\t\t},\n\t\tVUE_ROUTER_R0025: {\n\t\t\twhy: \"The `next()` callback in navigation guards is deprecated.\",\n\t\t\tfix: \"Return the value instead: `next()` becomes `return`, `next(false)` becomes `return false`, `next(\\\"/path\\\")` becomes `return \\\"/path\\\"`.\",\n\t\t\tdocs: \"https://router.vuejs.org/guide/advanced/navigation-guards.html#Optional-third-argument-next\"\n\t\t},\n\t\tVUE_ROUTER_R0026: {\n\t\t\twhy: (p) => `Record with path \"${p.path}\" is either missing a \"component(s)\" or \"children\" property.`,\n\t\t\tfix: \"Add a `component`, `components`, or `children` to the route record.\",\n\t\t\tdocs: \"https://router.vuejs.org/guide/essentials/nested-routes.html\"\n\t\t},\n\t\tVUE_ROUTER_R0027: {\n\t\t\twhy: (p) => `Component \"${p.name}\" in record with path \"${p.path}\" is not a valid component. Received \"${p.received}\".`,\n\t\t\tfix: \"Pass a component or a function returning a Promise that resolves to one.\"\n\t\t},\n\t\tVUE_ROUTER_R0028: {\n\t\t\twhy: (p) => `Component \"${p.name}\" in record with path \"${p.path}\" is a Promise instead of a function that returns a Promise. This will break in production if not fixed.`,\n\t\t\tfix: `Defer the import in an arrow function so it loads lazily: write \"() => import('./MyPage.vue')\", not \"import('./MyPage.vue')\".`,\n\t\t\tdocs: \"https://router.vuejs.org/guide/advanced/lazy-loading.html\"\n\t\t},\n\t\tVUE_ROUTER_R0029: {\n\t\t\twhy: (p) => `Component \"${p.name}\" in record with path \"${p.path}\" is defined using \"defineAsyncComponent()\".`,\n\t\t\tfix: `Drop the wrapper and pass \"() => import('./MyPage.vue')\" directly; the router handles lazy components itself.`,\n\t\t\tdocs: \"https://router.vuejs.org/guide/advanced/lazy-loading.html#Relationship-to-async-components\"\n\t\t},\n\t\tVUE_ROUTER_R0030: {\n\t\t\twhy: (p) => `Component \"${p.name}\" in record with path \"${p.path}\" is a function that does not return a Promise. This will break in production if not fixed.`,\n\t\t\tfix: \"Return a dynamic import (`() => import(\\\"./MyPage.vue\\\")`) from the function, or add a `displayName` if it is a functional component.\",\n\t\t\tdocs: \"https://router.vuejs.org/guide/advanced/lazy-loading.html\"\n\t\t},\n\t\tVUE_ROUTER_R0040: {\n\t\t\twhy: (p) => `Because \"${p.el}\" starts with \"#\", scrollBehavior resolves it as an element id via document.getElementById(\"${p.el.slice(1)}\"), not as a CSS selector. No element has that id, but \"${p.el}\" does match an element with document.querySelector().`,\n\t\t\tfix: (p) => `Resolve the element yourself and return the node: el: document.querySelector('${p.el}').`,\n\t\t\tdocs: \"https://router.vuejs.org/guide/advanced/scroll-behavior.html\"\n\t\t},\n\t\tVUE_ROUTER_R0041: {\n\t\t\twhy: (p) => `The selector \"${p.el}\" is invalid. See https://mathiasbynens.be/notes/css-escapes or CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape) for the escaping rules.`,\n\t\t\tfix: \"Build an id selector as `#${CSS.escape(id)}` so special characters in the id are escaped.\",\n\t\t\tdocs: \"https://router.vuejs.org/guide/advanced/scroll-behavior.html\"\n\t\t},\n\t\tVUE_ROUTER_R0042: {\n\t\t\twhy: (p) => `Couldn't find element using selector \"${p.el}\" returned by scrollBehavior.`,\n\t\t\tfix: \"Return a selector that matches an existing element, or guard against missing elements.\",\n\t\t\tdocs: \"https://router.vuejs.org/guide/advanced/scroll-behavior.html\"\n\t\t},\n\t\tVUE_ROUTER_R0050: {\n\t\t\twhy: (p) => {\n\t\t\t\tlet to;\n\t\t\t\ttry {\n\t\t\t\t\tto = p.to === void 0 ? \"undefined\" : JSON.stringify(p.to);\n\t\t\t\t} catch {\n\t\t\t\t\tto = String(p.to);\n\t\t\t\t}\n\t\t\t\treturn `Invalid value for prop \"to\" in useLink()\\n- to: ${to}`;\n\t\t\t},\n\t\t\tfix: \"Pass a valid route location (a string path or an object) to the \\\"to\\\" prop.\"\n\t\t},\n\t\tVUE_ROUTER_R0060: {\n\t\t\twhy: (p) => `<router-view> can no longer be used directly inside <${p.comp}>.`,\n\t\t\tfix: (p) => `Wrap the slot's resolved component with <${p.comp}> instead of nesting <router-view> in it:\\n\\n<router-view v-slot=\"{ Component }\">\\n <${p.comp}>\\n <component :is=\"Component\" />\\n </${p.comp}>\\n</router-view>`,\n\t\t\tdocs: \"https://router.vuejs.org/guide/advanced/router-view-slot.html#KeepAlive-Transition\"\n\t\t},\n\t\tVUE_ROUTER_R0070: {\n\t\t\twhy: (p) => `Cannot resolve a relative location without an absolute path. Trying to resolve \"${p.to}\" from \"${p.from}\".`,\n\t\t\tfix: (p) => `Resolve from an absolute \\`from\\` path that starts with \"/\", e.g. \"/${p.from}\".`\n\t\t},\n\t\tVUE_ROUTER_R0080: {\n\t\t\twhy: (p) => `Error decoding \"${p.text}\". Using original value`,\n\t\t\tfix: \"Ensure the value is correctly percent-encoded.\"\n\t\t},\n\t\tVUE_ROUTER_R0090: {\n\t\t\twhy: (p) => `Found duplicated params with name \"${p.name}\" for path \"${p.path}\". Only the last one will be available on \"$route.params\".`,\n\t\t\tfix: \"Give each param a unique name within the path.\",\n\t\t\tdocs: \"https://router.vuejs.org/guide/essentials/route-matching-syntax.html\"\n\t\t},\n\t\tVUE_ROUTER_R0100: {\n\t\t\twhy: (p) => `Discarded invalid param(s) \"${p.params}\" when navigating.` + p.inherited + ` See https://github.com/vuejs/router/commit/e887570 for more details.`,\n\t\t\tfix: \"Only pass params that exist on the target route.\"\n\t\t},\n\t\tVUE_ROUTER_R0101: {\n\t\t\twhy: (p) => `The Matcher cannot resolve relative paths but received \"${p.path}\". Unless you directly called \\`matcher.resolve(\"${p.path}\")\\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`,\n\t\t\tfix: \"Pass an absolute path (starting with \\\"/\\\") to the matcher.\"\n\t\t},\n\t\tVUE_ROUTER_R0102: {\n\t\t\twhy: (p) => `Alias \"${p.alias}\" and the original record: \"${p.original}\" must have the exact same param named \"${p.name}\"`,\n\t\t\tfix: \"Use the same param names in the alias as in the original route.\",\n\t\t\tdocs: \"https://router.vuejs.org/guide/essentials/redirect-and-alias.html#Alias\"\n\t\t},\n\t\tVUE_ROUTER_R0103: {\n\t\t\twhy: (p) => `The route named \"${p.name}\" has a child without a name, an empty path, and no children. Using that name won't render the empty path child, so this is probably a mistake.`,\n\t\t\tfix: \"Move the `name` onto the empty-path child; or, if intentional, give the child its own name to silence this.\",\n\t\t\tdocs: \"https://router.vuejs.org/guide/essentials/nested-routes.html#Nested-Named-Routes\"\n\t\t},\n\t\tVUE_ROUTER_R0104: {\n\t\t\twhy: (p) => `Absolute path \"${p.path}\" must have the exact same param named \"${p.name}\" as its parent \"${p.parent}\".`,\n\t\t\tfix: \"Include the parent route params in the absolute child path.\",\n\t\t\tdocs: \"https://router.vuejs.org/guide/essentials/nested-routes.html\"\n\t\t},\n\t\tVUE_ROUTER_R0105: {\n\t\t\twhy: (p) => `Finding ancestor route \"${p.ancestor}\" failed for \"${p.record}\"`,\n\t\t\tfix: \"Report a reproduction at https://github.com/vuejs/router/issues/new/choose.\"\n\t\t},\n\t\tVUE_ROUTER_R0110: {\n\t\t\twhy: `A hash base must end with a \"#\"`,\n\t\t\tfix: (p) => `Append \"#\" to the \"base\" argument passed to \"createWebHashHistory()\": \"${p.base}\" should be \"${p.suggestion}\".`\n\t\t},\n\t\tVUE_ROUTER_R0120: {\n\t\t\twhy: \"Error with push/replace State\",\n\t\t\tfix: \"The browser rejected the history API call; check for cross-origin or rate-limit issues.\"\n\t\t},\n\t\tVUE_ROUTER_R0121: {\n\t\t\twhy: \"history.state seems to have been manually replaced without preserving the necessary values.\\nYou can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state\",\n\t\t\tfix: \"Merge the router's state into your own when calling it manually: `history.replaceState({ ...history.state, ...yourState }, '', url)`.\",\n\t\t\tdocs: \"https://router.vuejs.org/guide/migration.html#Usage-of-history-state\"\n\t\t},\n\t\tVUE_ROUTER_R1001: {\n\t\t\twhy: (p) => `Data loader \"${String(p.key)}\" has a different parent than the current context. This shouldn't be happening.`,\n\t\t\tfix: \"Report a bug with a minimal reproduction at https://github.com/vuejs/router/.\"\n\t\t},\n\t\tVUE_ROUTER_R1002: {\n\t\t\twhy: \"Returning a NavigationResult is deprecated.\",\n\t\t\tfix: \"Replace `return new NavigationResult(to)` with `reroute(to)`, which throws internally to reroute.\",\n\t\t\tdocs: \"https://router.vuejs.org/data-loaders/navigation-aware.html#Controlling-the-navigation-with-reroute-\"\n\t\t},\n\t\tVUE_ROUTER_R1003: {\n\t\t\twhy: (p) => `Loader \"${p.key}\"'s \"commit()\" was called but there is no staged data.`,\n\t\t\tfix: \"Ensure the loader resolved before calling `commit()`.\",\n\t\t\tdocs: \"https://router.vuejs.org/data-loaders/defining-loaders.html#Delaying-data-updates-with-commit\"\n\t\t},\n\t\tVUE_ROUTER_R1004: {\n\t\t\twhy: (p) => \"A loader returned a NavigationResult but is not registered on the route.\" + p.key,\n\t\t\tfix: \"Export the loader from the page component so it gets registered, e.g. `export const useUserData = defineLoader(...)`.\",\n\t\t\tdocs: \"https://router.vuejs.org/data-loaders/organization.html\"\n\t\t},\n\t\tVUE_ROUTER_R1005: {\n\t\t\twhy: (p) => `Data loader \"${p.key}\" has itself as parent. This shouldn't be happening.`,\n\t\t\tfix: \"Report a bug with a minimal reproduction at https://github.com/vuejs/router/.\"\n\t\t},\n\t\tVUE_ROUTER_R1006: {\n\t\t\twhy: (p) => `A query was defined with the same key as the loader \"[${p.key}]\".\\nSee https://pinia-colada.esm.dev/#TODO`,\n\t\t\tfix: \"If the key is meant to match, use the data loader directly; otherwise rename the `useQuery()` key so it no longer collides.\",\n\t\t\tdocs: \"https://router.vuejs.org/data-loaders/colada.html\"\n\t\t},\n\t\tVUE_ROUTER_R1007: {\n\t\t\twhy: \"Data Loader was setup twice.\",\n\t\t\tfix: \"Register `DataLoaderPlugin` a single time via `app.use()`.\",\n\t\t\tdocs: \"https://router.vuejs.org/data-loaders.html#Installation\"\n\t\t},\n\t\tVUE_ROUTER_R1008: {\n\t\t\twhy: \"Data Loader is experimental and subject to breaking changes in the future.\",\n\t\t\tdocs: \"https://router.vuejs.org/data-loaders.html\"\n\t\t},\n\t\tVUE_ROUTER_R1009: {\n\t\t\twhy: \"Returning a NavigationResult from a loader is deprecated.\",\n\t\t\tfix: \"Call `reroute(to)` inside the loader instead of returning `new NavigationResult(to)`; it throws internally to reroute.\",\n\t\t\tdocs: \"https://router.vuejs.org/data-loaders/navigation-aware.html#Controlling-the-navigation-with-reroute-\"\n\t\t}\n\t}\n});\n//#endregion\n//#region src/injectionSymbols.ts\n/**\n* RouteRecord being rendered by the closest ancestor Router View. Used for\n* `onBeforeRouteUpdate` and `onBeforeRouteLeave`. rvlm stands for Router View\n* Location Matched\n*\n* @internal\n*/\nconst matchedRouteKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view location matched\" : \"\");\n/**\n* Allows overriding the router view depth to control which component in\n* `matched` is rendered. rvd stands for Router View Depth\n*\n* @internal\n*/\nconst viewDepthKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view depth\" : \"\");\n/**\n* Allows overriding the router instance returned by `useRouter` in tests. r\n* stands for router\n*\n* @internal\n*/\nconst routerKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router\" : \"\");\n/**\n* Allows overriding the current route returned by `useRoute` in tests. rl\n* stands for route location\n*\n* @internal\n*/\nconst routeLocationKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"route location\" : \"\");\n/**\n* Allows overriding the current route used by router-view. Internally this is\n* used when the `route` prop is passed.\n*\n* @internal\n*/\nconst routerViewLocationKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view location\" : \"\");\n//#endregion\n//#region src/useApi.ts\n/**\n* Returns the router instance. Equivalent to using `$router` inside\n* templates.\n*/\nfunction useRouter() {\n\treturn inject(routerKey);\n}\n/**\n* Returns the current route location. Equivalent to using `$route` inside\n* templates.\n*/\nfunction useRoute(_name) {\n\treturn inject(routeLocationKey);\n}\n//#endregion\nexport { isESModule as _, routerKey as a, noop as b, diagnostics as c, isNavigationFailure as d, applyToParams as f, isArray as g, isAbsolutePath as h, routeLocationKey as i, NavigationFailureType as l, identityFn as m, useRouter as n, routerViewLocationKey as o, assign as p, matchedRouteKey as r, viewDepthKey as s, useRoute as t, createRouterError as u, isRouteComponent as v, mergeOptions as y };\n","/*!\n* vue-router v5.3.0\n* (c) 2026 Eduardo San Martin Morote\n* @license MIT\n*/\nimport { _ as isESModule, c as diagnostics, g as isArray, h as isAbsolutePath, p as assign, r as matchedRouteKey, u as createRouterError, v as isRouteComponent } from \"./useApi-CUgTH_jn.js\";\nimport { getCurrentInstance, inject, onActivated, onDeactivated, onUnmounted, watch } from \"vue\";\nimport { setupDevtoolsPlugin } from \"@vue/devtools-api\";\n//#region src/utils/env.ts\nconst isBrowser = typeof document !== \"undefined\";\n//#endregion\n//#region src/encoding.ts\n/**\n* Encoding Rules (␣ = Space)\n* - Path: ␣ \" < > # ? { }\n* - Query: ␣ \" < > # & =\n* - Hash: ␣ \" < > `\n*\n* On top of that, the RFC3986 (https://tools.ietf.org/html/rfc3986#section-2.2)\n* defines some extra characters to be encoded. Most browsers do not encode them\n* in encodeURI https://github.com/whatwg/url/issues/369, so it may be safer to\n* also encode `!'()*`. Leaving un-encoded only ASCII alphanumeric(`a-zA-Z0-9`)\n* plus `-._~`. This extra safety should be applied to query by patching the\n* string returned by encodeURIComponent encodeURI also encodes `[\\]^`. `\\`\n* should be encoded to avoid ambiguity. Browsers (IE, FF, C) transform a `\\`\n* into a `/` if directly typed in. The _backtick_ (`````) should also be\n* encoded everywhere because some browsers like FF encode it when directly\n* written while others don't. Safari and IE don't encode ``\"<>{}``` in hash.\n*/\nconst HASH_RE = /#/g;\nconst AMPERSAND_RE = /&/g;\nconst SLASH_RE = /\\//g;\nconst EQUAL_RE = /=/g;\nconst IM_RE = /\\?/g;\nconst PLUS_RE = /\\+/g;\n/**\n* NOTE: It's not clear to me if we should encode the + symbol in queries, it\n* seems to be less flexible than not doing so and I can't find out the legacy\n* systems requiring this for regular requests like text/html. In the standard,\n* the encoding of the plus character is only mentioned for\n* application/x-www-form-urlencoded\n* (https://url.spec.whatwg.org/#urlencoded-parsing) and most browsers seems lo\n* leave the plus character as is in queries. To be more flexible, we allow the\n* plus character on the query, but it can also be manually encoded by the user.\n*\n* Resources:\n* - https://url.spec.whatwg.org/#urlencoded-parsing\n* - https://stackoverflow.com/questions/1634271/url-encoding-the-space-character-or-20\n*/\nconst ENC_BRACKET_OPEN_RE = /%5B/g;\nconst ENC_BRACKET_CLOSE_RE = /%5D/g;\nconst ENC_CARET_RE = /%5E/g;\nconst ENC_BACKTICK_RE = /%60/g;\nconst ENC_CURLY_OPEN_RE = /%7B/g;\nconst ENC_PIPE_RE = /%7C/g;\nconst ENC_CURLY_CLOSE_RE = /%7D/g;\nconst ENC_SPACE_RE = /%20/g;\n/**\n* Encode characters that need to be encoded on the path, search and hash\n* sections of the URL.\n*\n* @internal\n* @param text - string to encode\n* @returns encoded string\n*/\nfunction commonEncode(text) {\n\treturn text == null ? \"\" : encodeURI(\"\" + text).replace(ENC_PIPE_RE, \"|\").replace(ENC_BRACKET_OPEN_RE, \"[\").replace(ENC_BRACKET_CLOSE_RE, \"]\");\n}\n/**\n* Encode characters that need to be encoded on the hash section of the URL.\n*\n* @param text - string to encode\n* @returns encoded string\n*/\nfunction encodeHash(text) {\n\treturn commonEncode(text).replace(ENC_CURLY_OPEN_RE, \"{\").replace(ENC_CURLY_CLOSE_RE, \"}\").replace(ENC_CARET_RE, \"^\");\n}\n/**\n* Encode characters that need to be encoded query values on the query\n* section of the URL.\n*\n* @param text - string to encode\n* @returns encoded string\n*/\nfunction encodeQueryValue(text) {\n\treturn commonEncode(text).replace(PLUS_RE, \"%2B\").replace(ENC_SPACE_RE, \"+\").replace(HASH_RE, \"%23\").replace(AMPERSAND_RE, \"%26\").replace(ENC_BACKTICK_RE, \"`\").replace(ENC_CURLY_OPEN_RE, \"{\").replace(ENC_CURLY_CLOSE_RE, \"}\").replace(ENC_CARET_RE, \"^\");\n}\n/**\n* Like `encodeQueryValue` but also encodes the `=` character.\n*\n* @param text - string to encode\n*/\nfunction encodeQueryKey(text) {\n\treturn encodeQueryValue(text).replace(EQUAL_RE, \"%3D\");\n}\n/**\n* Encode characters that need to be encoded on the path section of the URL.\n*\n* @param text - string to encode\n* @returns encoded string\n*/\nfunction encodePath(text) {\n\treturn commonEncode(text).replace(HASH_RE, \"%23\").replace(IM_RE, \"%3F\");\n}\n/**\n* Encode characters that need to be encoded on the path section of the URL as a\n* param. This function encodes everything {@link encodePath} does plus the\n* slash (`/`) character. If `text` is `null` or `undefined`, returns an empty\n* string instead.\n*\n* @param text - string to encode\n* @returns encoded string\n*/\nfunction encodeParam(text) {\n\treturn encodePath(text).replace(SLASH_RE, \"%2F\");\n}\nfunction decode(text) {\n\tif (text == null) return null;\n\ttry {\n\t\treturn decodeURIComponent(\"\" + text);\n\t} catch {\n\t\tprocess.env.NODE_ENV !== \"production\" && diagnostics.VUE_ROUTER_R0080({ text: \"\" + text });\n\t}\n\treturn \"\" + text;\n}\n//#endregion\n//#region src/location.ts\nconst TRAILING_SLASH_RE = /\\/$/;\nconst removeTrailingSlash = (path) => path.replace(TRAILING_SLASH_RE, \"\");\n/**\n* Transforms a URI into a normalized history location\n*\n* @param parseQuery\n* @param location - URI to normalize\n* @param currentLocation - current absolute location. Allows resolving relative\n* paths. Must start with `/`. Defaults to `/`\n* @returns a normalized history location\n*/\nfunction parseURL(parseQuery, location, currentLocation = \"/\") {\n\tlet path, query = {}, searchString = \"\", hash = \"\";\n\tconst hashPos = location.indexOf(\"#\");\n\tlet searchPos = location.indexOf(\"?\");\n\tsearchPos = hashPos >= 0 && searchPos > hashPos ? -1 : searchPos;\n\tif (searchPos >= 0) {\n\t\tpath = location.slice(0, searchPos);\n\t\tsearchString = location.slice(searchPos, hashPos > 0 ? hashPos : location.length);\n\t\tquery = parseQuery(searchString.slice(1));\n\t}\n\tif (hashPos >= 0) {\n\t\tpath = path || location.slice(0, hashPos);\n\t\thash = location.slice(hashPos, location.length);\n\t}\n\tpath = resolveRelativePath(path != null ? path : location, currentLocation);\n\treturn {\n\t\tfullPath: path + searchString + hash,\n\t\tpath,\n\t\tquery,\n\t\thash: decode(hash)\n\t};\n}\nfunction NEW_stringifyURL(stringifyQuery, path, query, hash = \"\") {\n\tconst searchText = stringifyQuery(query);\n\treturn path + (searchText && \"?\") + searchText + encodeHash(hash);\n}\n/**\n* Stringifies a URL object\n*\n* @param stringifyQuery\n* @param location\n*/\nfunction stringifyURL(stringifyQuery, location) {\n\tconst query = location.query ? stringifyQuery(location.query) : \"\";\n\treturn location.path + (query && \"?\") + query + (location.hash || \"\");\n}\n/**\n* Strips off the base from the beginning of a location.pathname in a non-case-sensitive way.\n*\n* @param pathname - location.pathname\n* @param base - base to strip off\n*/\nfunction stripBase(pathname, base) {\n\tif (!base || !pathname.toLowerCase().startsWith(base.toLowerCase())) return pathname;\n\treturn pathname.slice(base.length) || \"/\";\n}\n/**\n* Checks if two RouteLocation are equal. This means that both locations are\n* pointing towards the same {@link RouteRecord} and that all `params`, `query`\n* parameters and `hash` are the same\n*\n* @param stringifyQuery - A function that takes a query object of type LocationQueryRaw and returns a string representation of it.\n* @param a - first {@link RouteLocation}\n* @param b - second {@link RouteLocation}\n*/\nfunction isSameRouteLocation(stringifyQuery, a, b) {\n\tconst aLastIndex = a.matched.length - 1;\n\tconst bLastIndex = b.matched.length - 1;\n\treturn aLastIndex > -1 && aLastIndex === bLastIndex && isSameRouteRecord(a.matched[aLastIndex], b.matched[bLastIndex]) && isSameRouteLocationParams(a.params, b.params) && stringifyQuery(a.query) === stringifyQuery(b.query) && a.hash === b.hash;\n}\n/**\n* Check if two `RouteRecords` are equal. Takes into account aliases: they are\n* considered equal to the `RouteRecord` they are aliasing.\n*\n* @param a - first {@link RouteRecord}\n* @param b - second {@link RouteRecord}\n*/\nfunction isSameRouteRecord(a, b) {\n\treturn (a.aliasOf || a) === (b.aliasOf || b);\n}\nfunction isSameRouteLocationParams(a, b) {\n\tif (Object.keys(a).length !== Object.keys(b).length) return false;\n\tfor (var key in a) if (!isSameRouteLocationParamsValue(a[key], b[key])) return false;\n\treturn true;\n}\nfunction isSameRouteLocationParamsValue(a, b) {\n\treturn isArray(a) ? isEquivalentArray(a, b) : isArray(b) ? isEquivalentArray(b, a) : (a && a.valueOf()) === (b && b.valueOf());\n}\n/**\n* Check if two arrays are the same or if an array with one single entry is the\n* same as another primitive value. Used to check query and parameters\n*\n* @param a - array of values\n* @param b - array of values or a single value\n*/\nfunction isEquivalentArray(a, b) {\n\treturn isArray(b) ? a.length === b.length && a.every((value, i) => value === b[i]) : a.length === 1 && a[0] === b;\n}\n/**\n* Resolves a relative path that starts with `.`.\n*\n* @param to - path location we are resolving\n* @param from - currentLocation.path, should start with `/`\n*/\nfunction resolveRelativePath(to, from) {\n\tif (isAbsolutePath(to)) return to;\n\tif (process.env.NODE_ENV !== \"production\" && !isAbsolutePath(from)) {\n\t\tdiagnostics.VUE_ROUTER_R0070({\n\t\t\tto,\n\t\t\tfrom\n\t\t});\n\t\treturn to;\n\t}\n\tif (!to) return from;\n\tconst fromSegments = from.split(\"/\");\n\tconst toSegments = to.split(\"/\");\n\tconst lastToSegment = toSegments[toSegments.length - 1];\n\tif (lastToSegment === \"..\" || lastToSegment === \".\") toSegments.push(\"\");\n\tlet position = fromSegments.length - 1;\n\tlet toPosition;\n\tlet segment;\n\tfor (toPosition = 0; toPosition < toSegments.length; toPosition++) {\n\t\tsegment = toSegments[toPosition];\n\t\tif (segment === \".\") continue;\n\t\tif (segment === \"..\") {\n\t\t\tif (position > 1) position--;\n\t\t} else break;\n\t}\n\treturn fromSegments.slice(0, position).join(\"/\") + \"/\" + toSegments.slice(toPosition).join(\"/\");\n}\n/**\n* Initial route location where the router is. Can be used in navigation guards\n* to differentiate the initial navigation.\n*\n* @example\n* ```js\n* import { START_LOCATION } from 'vue-router'\n*\n* router.beforeEach((to, from) => {\n* if (from === START_LOCATION) {\n* // initial navigation\n* }\n* })\n* ```\n*/\nconst START_LOCATION_NORMALIZED = {\n\tpath: \"/\",\n\tname: void 0,\n\tparams: {},\n\tquery: {},\n\thash: \"\",\n\tfullPath: \"/\",\n\tmatched: [],\n\tmeta: {},\n\tredirectedFrom: void 0\n};\n//#endregion\n//#region src/history/common.ts\n/**\n* Normalizes a base by removing any trailing slash and reading the base tag if\n* present.\n*\n* @param base - base to normalize\n*/\nfunction normalizeBase(base) {\n\tif (!base) {\n\t\tif (isBrowser) {\n\t\t\tconst baseEl = document.querySelector(\"base\");\n\t\t\tbase = baseEl && baseEl.getAttribute(\"href\") || \"/\";\n\t\t\tbase = base.replace(/^\\w+:\\/\\/[^/]+/, \"\");\n\t\t} else base = \"/\";\n\t}\n\tif (base[0] !== \"/\" && base[0] !== \"#\") base = \"/\" + base;\n\treturn removeTrailingSlash(base);\n}\nconst BEFORE_HASH_RE = /^[^#]+#/;\nfunction createHref(base, location) {\n\treturn base.replace(BEFORE_HASH_RE, \"#\") + location;\n}\n//#endregion\n//#region src/scrollBehavior.ts\nfunction getElementPosition(el, offset) {\n\tconst docRect = document.documentElement.getBoundingClientRect();\n\tconst elRect = el.getBoundingClientRect();\n\treturn {\n\t\tbehavior: offset.behavior,\n\t\tleft: elRect.left - docRect.left - (offset.left || 0),\n\t\ttop: elRect.top - docRect.top - (offset.top || 0)\n\t};\n}\nconst computeScrollPosition = () => history.scrollRestoration === \"manual\" ? {\n\tleft: window.scrollX,\n\ttop: window.scrollY\n} : null;\nfunction scrollToPosition(position) {\n\tlet scrollToOptions;\n\tif (\"el\" in position) {\n\t\tconst positionEl = position.el;\n\t\tconst isIdSelector = typeof positionEl === \"string\" && positionEl.startsWith(\"#\");\n\t\t/**\n\t\t* `id`s can accept pretty much any characters, including CSS combinators\n\t\t* like `>` or `~`. It's still possible to retrieve elements using\n\t\t* `document.getElementById('~')` but it needs to be escaped when using\n\t\t* `document.querySelector('#\\\\~')` for it to be valid. The only\n\t\t* requirements for `id`s are them to be unique on the page and to not be\n\t\t* empty (`id=\"\"`). Because of that, when passing an id selector, it should\n\t\t* be properly escaped for it to work with `querySelector`. We could check\n\t\t* for the id selector to be simple (no CSS combinators `+ >~`) but that\n\t\t* would make things inconsistent since they are valid characters for an\n\t\t* `id` but would need to be escaped when using `querySelector`, breaking\n\t\t* their usage and ending up in no selector returned. Selectors need to be\n\t\t* escaped:\n\t\t*\n\t\t* - `#1-thing` becomes `#\\31 -thing`\n\t\t* - `#with~symbols` becomes `#with\\\\~symbols`\n\t\t*\n\t\t* - More information about the topic can be found at\n\t\t* https://mathiasbynens.be/notes/html5-id-class.\n\t\t* - Practical example: https://mathiasbynens.be/demo/html5-id\n\t\t*/\n\t\tif (process.env.NODE_ENV !== \"production\" && typeof position.el === \"string\") {\n\t\t\tif (!isIdSelector || !document.getElementById(position.el.slice(1))) try {\n\t\t\t\tconst foundEl = document.querySelector(position.el);\n\t\t\t\tif (isIdSelector && foundEl) {\n\t\t\t\t\tdiagnostics.VUE_ROUTER_R0040({ el: position.el });\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\tdiagnostics.VUE_ROUTER_R0041({ el: position.el });\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tconst el = typeof positionEl === \"string\" ? isIdSelector ? document.getElementById(positionEl.slice(1)) : document.querySelector(positionEl) : positionEl;\n\t\tif (!el) {\n\t\t\tprocess.env.NODE_ENV !== \"production\" && diagnostics.VUE_ROUTER_R0042({ el: position.el });\n\t\t\treturn;\n\t\t}\n\t\tscrollToOptions = getElementPosition(el, position);\n\t} else scrollToOptions = position;\n\tif (\"scrollBehavior\" in document.documentElement.style) window.scrollTo(scrollToOptions);\n\telse window.scrollTo(scrollToOptions.left != null ? scrollToOptions.left : window.scrollX, scrollToOptions.top != null ? scrollToOptions.top : window.scrollY);\n}\nfunction getScrollKey(path, delta) {\n\treturn (history.state ? history.state.position - delta : -1) + path;\n}\nconst scrollPositions = /* @__PURE__ */ new Map();\nfunction saveScrollPosition(key) {\n\tscrollPositions.set(key, computeScrollPosition());\n}\nfunction getSavedScrollPosition(key) {\n\tconst scroll = scrollPositions.get(key);\n\tscrollPositions.delete(key);\n\treturn scroll;\n}\n/**\n* ScrollBehavior instance used by the router to compute and restore the scroll\n* position when navigating.\n*/\n//#endregion\n//#region src/types/typeGuards.ts\nfunction isRouteLocation(route) {\n\treturn typeof route === \"string\" || route && typeof route === \"object\";\n}\nfunction isRouteName(name) {\n\treturn typeof name === \"string\" || typeof name === \"symbol\";\n}\n//#endregion\n//#region src/query.ts\n/**\n* Transforms a queryString into a {@link LocationQuery} object. Accept both, a\n* version with the leading `?` and without Should work as URLSearchParams\n\n* @internal\n*\n* @param search - search string to parse\n* @returns a query object\n*/\nfunction parseQuery(search) {\n\tconst query = {};\n\tif (search === \"\" || search === \"?\") return query;\n\tconst searchParams = (search[0] === \"?\" ? search.slice(1) : search).split(\"&\");\n\tfor (let i = 0; i < searchParams.length; ++i) {\n\t\tconst searchParam = searchParams[i].replace(PLUS_RE, \" \");\n\t\tconst eqPos = searchParam.indexOf(\"=\");\n\t\tconst key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos));\n\t\tconst value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1));\n\t\tif (key in query) {\n\t\t\tlet currentValue = query[key];\n\t\t\tif (!isArray(currentValue)) currentValue = query[key] = [currentValue];\n\t\t\tcurrentValue.push(value);\n\t\t} else query[key] = value;\n\t}\n\treturn query;\n}\n/**\n* Stringifies a {@link LocationQueryRaw} object. Like `URLSearchParams`, it\n* doesn't prepend a `?`\n*\n* @internal\n*\n* @param query - query object to stringify\n* @returns string version of the query without the leading `?`\n*/\nfunction stringifyQuery(query) {\n\tlet search = \"\";\n\tfor (let key in query) {\n\t\tconst value = query[key];\n\t\tkey = encodeQueryKey(key);\n\t\tif (value == null) {\n\t\t\tif (value !== void 0) search += (search.length ? \"&\" : \"\") + key;\n\t\t\tcontinue;\n\t\t}\n\t\t(isArray(value) ? value.map((v) => v && encodeQueryValue(v)) : [value && encodeQueryValue(value)]).forEach((value) => {\n\t\t\tif (value !== void 0) {\n\t\t\t\tsearch += (search.length ? \"&\" : \"\") + key;\n\t\t\t\tif (value != null) search += \"=\" + value;\n\t\t\t}\n\t\t});\n\t}\n\treturn search;\n}\n/**\n* Transforms a {@link LocationQueryRaw} into a {@link LocationQuery} by casting\n* numbers into strings, removing keys with an undefined value and replacing\n* undefined with null in arrays\n*\n* @param query - query object to normalize\n* @returns a normalized query object\n*/\nfunction normalizeQuery(query) {\n\tconst normalizedQuery = {};\n\tfor (const key in query) {\n\t\tconst value = query[key];\n\t\tif (value !== void 0) normalizedQuery[key] = isArray(value) ? value.map((v) => v == null ? null : \"\" + v) : value == null ? value : \"\" + value;\n\t}\n\treturn normalizedQuery;\n}\n//#endregion\n//#region src/utils/callbacks.ts\n/**\n* Create a list of callbacks that can be reset. Used to create before and after navigation guards list\n*/\nfunction useCallbacks() {\n\tlet handlers = [];\n\tfunction add(handler) {\n\t\thandlers.push(handler);\n\t\treturn () => {\n\t\t\tconst i = handlers.indexOf(handler);\n\t\t\tif (i > -1) handlers.splice(i, 1);\n\t\t};\n\t}\n\tfunction reset() {\n\t\thandlers = [];\n\t}\n\treturn {\n\t\tadd,\n\t\tlist: () => handlers.slice(),\n\t\treset\n\t};\n}\n//#endregion\n//#region src/navigationGuards.ts\nfunction registerGuard(activeRecordRef, name, guard) {\n\tconst record = activeRecordRef.value;\n\tif (!record) {\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tconst fnName = name === \"updateGuards\" ? \"onBeforeRouteUpdate\" : \"onBeforeRouteLeave\";\n\t\t\tdiagnostics.VUE_ROUTER_R0020({ fn: fnName });\n\t\t}\n\t\treturn;\n\t}\n\tlet currentRecord = record;\n\tconst removeFromList = () => {\n\t\tcurrentRecord[name].delete(guard);\n\t};\n\tonUnmounted(removeFromList);\n\tonDeactivated(removeFromList);\n\tonActivated(() => {\n\t\tconst newRecord = activeRecordRef.value;\n\t\tif (process.env.NODE_ENV !== \"production\" && !newRecord) diagnostics.VUE_ROUTER_R0021();\n\t\tif (newRecord) currentRecord = newRecord;\n\t\tcurrentRecord[name].add(guard);\n\t});\n\tcurrentRecord[name].add(guard);\n}\n/**\n* Add a navigation guard that triggers whenever the component for the current\n* location is about to be left. Similar to {@link beforeRouteLeave} but can be\n* used in any component. The guard is removed when the component is unmounted.\n*\n* @param leaveGuard - {@link NavigationGuard}\n*/\nfunction onBeforeRouteLeave(leaveGuard) {\n\tif (process.env.NODE_ENV !== \"production\" && !getCurrentInstance()) {\n\t\tdiagnostics.VUE_ROUTER_R0022({ fn: \"onBeforeRouteLeave\" });\n\t\treturn;\n\t}\n\tregisterGuard(inject(matchedRouteKey, {}), \"leaveGuards\", leaveGuard);\n}\n/**\n* Add a navigation guard that triggers whenever the current location is about\n* to be updated. Similar to {@link beforeRouteUpdate} but can be used in any\n* component. The guard is removed when the component is unmounted.\n*\n* @param updateGuard - {@link NavigationGuard}\n*/\nfunction onBeforeRouteUpdate(updateGuard) {\n\tif (process.env.NODE_ENV !== \"production\" && !getCurrentInstance()) {\n\t\tdiagnostics.VUE_ROUTER_R0022({ fn: \"onBeforeRouteUpdate\" });\n\t\treturn;\n\t}\n\tregisterGuard(inject(matchedRouteKey, {}), \"updateGuards\", updateGuard);\n}\nfunction guardToPromiseFn(guard, to, from, record, name, runWithContext = (fn) => fn()) {\n\tconst enterCallbackArray = record && (record.enterCallbacks[name] = record.enterCallbacks[name] || []);\n\treturn () => new Promise((resolve, reject) => {\n\t\tconst next = (valid) => {\n\t\t\tif (valid === false) reject(createRouterError(4, {\n\t\t\t\tfrom,\n\t\t\t\tto\n\t\t\t}));\n\t\t\telse if (valid instanceof Error) reject(valid);\n\t\t\telse if (isRouteLocation(valid)) reject(createRouterError(2, {\n\t\t\t\tfrom: to,\n\t\t\t\tto: valid\n\t\t\t}));\n\t\t\telse {\n\t\t\t\tif (enterCallbackArray && record.enterCallbacks[name] === enterCallbackArray && typeof valid === \"function\") enterCallbackArray.push(valid);\n\t\t\t\tresolve();\n\t\t\t}\n\t\t};\n\t\tconst guardReturn = runWithContext(() => guard.call(record && record.instances[name], to, from, process.env.NODE_ENV !== \"production\" ? withDeprecationWarning(canOnlyBeCalledOnce(next, to, from)) : next));\n\t\tlet guardCall = Promise.resolve(guardReturn);\n\t\tif (guard.length < 3) guardCall = guardCall.then(next);\n\t\tif (process.env.NODE_ENV !== \"production\" && guard.length > 2) {\n\t\t\tconst guardInfo = {\n\t\t\t\tname: guard.name,\n\t\t\t\tguard: guard.toString()\n\t\t\t};\n\t\t\tif (typeof guardReturn === \"object\" && \"then\" in guardReturn) guardCall = guardCall.then((resolvedValue) => {\n\t\t\t\tif (!next._called) {\n\t\t\t\t\tdiagnostics.VUE_ROUTER_R0023(guardInfo);\n\t\t\t\t\treturn Promise.reject(/* @__PURE__ */ new Error(\"Invalid navigation guard\"));\n\t\t\t\t}\n\t\t\t\treturn resolvedValue;\n\t\t\t});\n\t\t\telse if (guardReturn !== void 0) {\n\t\t\t\tif (!next._called) {\n\t\t\t\t\tdiagnostics.VUE_ROUTER_R0023(guardInfo);\n\t\t\t\t\treject(/* @__PURE__ */ new Error(\"Invalid navigation guard\"));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tguardCall.catch((err) => reject(err));\n\t});\n}\n/**\n* Wraps the next callback to warn when it is used. Dev-only: when __DEV__ is\n* false (production builds), this branch is dead code and is stripped from the\n* bundle.\n*\n* @internal\n*/\nfunction withDeprecationWarning(next) {\n\tlet warned = false;\n\treturn function() {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tdiagnostics.VUE_ROUTER_R0025();\n\t\t}\n\t\treturn next.apply(this, arguments);\n\t};\n}\nfunction canOnlyBeCalledOnce(next, to, from) {\n\tlet called = 0;\n\treturn function() {\n\t\tif (called++ === 1) diagnostics.VUE_ROUTER_R0024({\n\t\t\tfrom: from.fullPath,\n\t\t\tto: to.fullPath\n\t\t});\n\t\tnext._called = true;\n\t\tif (called === 1) next.apply(null, arguments);\n\t};\n}\nfunction extractComponentsGuards(matched, guardType, to, from, runWithContext = (fn) => fn()) {\n\tconst guards = [];\n\tfor (const record of matched) {\n\t\tif (process.env.NODE_ENV !== \"production\" && !record.components && record.children && !record.children.length) diagnostics.VUE_ROUTER_R0026({ path: record.path });\n\t\tfor (const name in record.components) {\n\t\t\tlet rawComponent = record.components[name];\n\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\tif (!rawComponent || typeof rawComponent !== \"object\" && typeof rawComponent !== \"function\") {\n\t\t\t\t\tdiagnostics.VUE_ROUTER_R0027({\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tpath: record.path,\n\t\t\t\t\t\treceived: String(rawComponent)\n\t\t\t\t\t});\n\t\t\t\t\tthrow new Error(\"Invalid route component\");\n\t\t\t\t} else if (\"then\" in rawComponent) {\n\t\t\t\t\tdiagnostics.VUE_ROUTER_R0028({\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tpath: record.path\n\t\t\t\t\t});\n\t\t\t\t\tconst promise = rawComponent;\n\t\t\t\t\trawComponent = () => promise;\n\t\t\t\t} else if (rawComponent.__asyncLoader && !rawComponent.__warnedDefineAsync) {\n\t\t\t\t\trawComponent.__warnedDefineAsync = true;\n\t\t\t\t\tdiagnostics.VUE_ROUTER_R0029({\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tpath: record.path\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (guardType !== \"beforeRouteEnter\" && !record.instances[name]) continue;\n\t\t\tif (isRouteComponent(rawComponent)) {\n\t\t\t\tconst guard = (rawComponent.__vccOpts || rawComponent)[guardType];\n\t\t\t\tguard && guards.push(guardToPromiseFn(guard, to, from, record, name, runWithContext));\n\t\t\t} else {\n\t\t\t\tlet componentPromise = rawComponent();\n\t\t\t\tif (process.env.NODE_ENV !== \"production\" && !(\"catch\" in componentPromise)) {\n\t\t\t\t\tdiagnostics.VUE_ROUTER_R0030({\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tpath: record.path\n\t\t\t\t\t});\n\t\t\t\t\tcomponentPromise = Promise.resolve(componentPromise);\n\t\t\t\t}\n\t\t\t\tguards.push(() => componentPromise.then((resolved) => {\n\t\t\t\t\tif (!resolved) throw new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\"`);\n\t\t\t\t\tconst resolvedComponent = isESModule(resolved) ? resolved.default : resolved;\n\t\t\t\t\trecord.mods[name] = resolved;\n\t\t\t\t\trecord.components[name] = resolvedComponent;\n\t\t\t\t\tconst guard = (resolvedComponent.__vccOpts || resolvedComponent)[guardType];\n\t\t\t\t\treturn guard && guardToPromiseFn(guard, to, from, record, name, runWithContext)();\n\t\t\t\t}));\n\t\t\t}\n\t\t}\n\t}\n\treturn guards;\n}\n/**\n* Ensures a route is loaded, so it can be passed as o prop to `<RouterView>`.\n*\n* @param route - resolved route to load\n*/\nfunction loadRouteLocation(route) {\n\treturn route.matched.every((record) => record.redirect) ? Promise.reject(/* @__PURE__ */ new Error(\"Cannot load a route that redirects.\")) : Promise.all(route.matched.map((record) => record.components && Promise.all(Object.keys(record.components).reduce((promises, name) => {\n\t\tconst rawComponent = record.components[name];\n\t\tif (typeof rawComponent === \"function\" && !(\"displayName\" in rawComponent)) promises.push(rawComponent().then((resolved) => {\n\t\t\tif (!resolved) return Promise.reject(/* @__PURE__ */ new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\". Ensure you passed a function that returns a promise.`));\n\t\t\tconst resolvedComponent = isESModule(resolved) ? resolved.default : resolved;\n\t\t\trecord.mods[name] = resolved;\n\t\t\trecord.components[name] = resolvedComponent;\n\t\t}));\n\t\treturn promises;\n\t}, [])))).then(() => route);\n}\n/**\n* Split the leaving, updating, and entering records.\n* @internal\n*\n* @param to - Location we are navigating to\n* @param from - Location we are navigating from\n*/\nfunction extractChangingRecords(to, from) {\n\tconst leavingRecords = [];\n\tconst updatingRecords = [];\n\tconst enteringRecords = [];\n\tconst len = Math.max(from.matched.length, to.matched.length);\n\tfor (let i = 0; i < len; i++) {\n\t\tconst recordFrom = from.matched[i];\n\t\tif (recordFrom) {\n\t\t\tif (to.matched.find((record) => isSameRouteRecord(record, recordFrom))) updatingRecords.push(recordFrom);\n\t\t\telse leavingRecords.push(recordFrom);\n\t\t}\n\t\tconst recordTo = to.matched[i];\n\t\tif (recordTo) {\n\t\t\tif (!from.matched.find((record) => isSameRouteRecord(record, recordTo))) enteringRecords.push(recordTo);\n\t\t}\n\t}\n\treturn [\n\t\tleavingRecords,\n\t\tupdatingRecords,\n\t\tenteringRecords\n\t];\n}\n//#endregion\n//#region src/devtools.ts\n/**\n* Copies a route location and removes any problematic properties that cannot be shown in devtools (e.g. Vue instances).\n*\n* @param routeLocation - routeLocation to format\n* @param tooltip - optional tooltip\n* @returns a copy of the routeLocation\n*/\nfunction formatRouteLocation(routeLocation, tooltip) {\n\tconst copy = assign({}, routeLocation, { matched: routeLocation.matched.map((matched) => omit(matched, [\n\t\t\"instances\",\n\t\t\"children\",\n\t\t\"aliasOf\"\n\t])) });\n\treturn { _custom: {\n\t\ttype: null,\n\t\treadOnly: true,\n\t\tdisplay: routeLocation.fullPath,\n\t\ttooltip,\n\t\tvalue: copy\n\t} };\n}\nfunction formatDisplay(display) {\n\treturn { _custom: { display } };\n}\nlet routerId = 0;\nfunction addDevtools(app, router, matcher) {\n\tif (router.__hasDevtools) return;\n\trouter.__hasDevtools = true;\n\tconst id = routerId++;\n\tsetupDevtoolsPlugin({\n\t\tid: \"org.vuejs.router\" + (id ? \".\" + id : \"\"),\n\t\tlabel: \"Vue Router\",\n\t\tpackageName: \"vue-router\",\n\t\thomepage: \"https://router.vuejs.org\",\n\t\tlogo: \"https://router.vuejs.org/logo.png\",\n\t\tcomponentStateTypes: [\"Routing\"],\n\t\tapp\n\t}, (api) => {\n\t\tapi.on.inspectComponent((payload) => {\n\t\t\tif (payload.instanceData) payload.instanceData.state.push({\n\t\t\t\ttype: \"Routing\",\n\t\t\t\tkey: \"$route\",\n\t\t\t\teditable: false,\n\t\t\t\tvalue: formatRouteLocation(router.currentRoute.value, \"Current Route\")\n\t\t\t});\n\t\t});\n\t\tapi.on.visitComponentTree(({ treeNode: node, componentInstance }) => {\n\t\t\tif (componentInstance.__vrv_devtools) {\n\t\t\t\tconst info = componentInstance.__vrv_devtools;\n\t\t\t\tnode.tags.push({\n\t\t\t\t\tlabel: (info.name ? `${info.name.toString()}: ` : \"\") + info.path,\n\t\t\t\t\ttextColor: 0,\n\t\t\t\t\ttooltip: \"This component is rendered by <router-view>\",\n\t\t\t\t\tbackgroundColor: PINK_500\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (isArray(componentInstance.__vrl_devtools)) {\n\t\t\t\tcomponentInstance.__devtoolsApi = api;\n\t\t\t\tcomponentInstance.__vrl_devtools.forEach((devtoolsData) => {\n\t\t\t\t\tlet label = devtoolsData.route.path;\n\t\t\t\t\tlet backgroundColor = ORANGE_400;\n\t\t\t\t\tlet tooltip = \"\";\n\t\t\t\t\tlet textColor = 0;\n\t\t\t\t\tif (devtoolsData.error) {\n\t\t\t\t\t\tlabel = devtoolsData.error;\n\t\t\t\t\t\tbackgroundColor = RED_100;\n\t\t\t\t\t\ttextColor = RED_700;\n\t\t\t\t\t} else if (devtoolsData.isExactActive) {\n\t\t\t\t\t\tbackgroundColor = LIME_500;\n\t\t\t\t\t\ttooltip = \"This is exactly active\";\n\t\t\t\t\t} else if (devtoolsData.isActive) {\n\t\t\t\t\t\tbackgroundColor = BLUE_600;\n\t\t\t\t\t\ttooltip = \"This link is active\";\n\t\t\t\t\t}\n\t\t\t\t\tnode.tags.push({\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t\ttextColor,\n\t\t\t\t\t\ttooltip,\n\t\t\t\t\t\tbackgroundColor\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\twatch(router.currentRoute, () => {\n\t\t\trefreshRoutesView();\n\t\t\tapi.notifyComponentUpdate();\n\t\t\tapi.sendInspectorTree(routerInspectorId);\n\t\t\tapi.sendInspectorState(routerInspectorId);\n\t\t});\n\t\tconst navigationsLayerId = \"router:navigations:\" + id;\n\t\tapi.addTimelineLayer({\n\t\t\tid: navigationsLayerId,\n\t\t\tlabel: `Router${id ? \" \" + id : \"\"} Navigations`,\n\t\t\tcolor: 4237508\n\t\t});\n\t\trouter.onError((error, to) => {\n\t\t\tapi.addTimelineEvent({\n\t\t\t\tlayerId: navigationsLayerId,\n\t\t\t\tevent: {\n\t\t\t\t\ttitle: \"Error during Navigation\",\n\t\t\t\t\tsubtitle: to.fullPath,\n\t\t\t\t\tlogType: \"error\",\n\t\t\t\t\ttime: api.now(),\n\t\t\t\t\tdata: { error },\n\t\t\t\t\tgroupId: to.meta.__navigationId\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\tlet navigationId = 0;\n\t\trouter.beforeEach((to, from) => {\n\t\t\tconst data = {\n\t\t\t\tguard: formatDisplay(\"beforeEach\"),\n\t\t\t\tfrom: formatRouteLocation(from, \"Current Location during this navigation\"),\n\t\t\t\tto: formatRouteLocation(to, \"Target location\")\n\t\t\t};\n\t\t\tObject.defineProperty(to.meta, \"__navigationId\", { value: navigationId++ });\n\t\t\tapi.addTimelineEvent({\n\t\t\t\tlayerId: navigationsLayerId,\n\t\t\t\tevent: {\n\t\t\t\t\ttime: api.now(),\n\t\t\t\t\ttitle: \"Start of navigation\",\n\t\t\t\t\tsubtitle: to.fullPath,\n\t\t\t\t\tdata,\n\t\t\t\t\tgroupId: to.meta.__navigationId\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\trouter.afterEach((to, from, failure) => {\n\t\t\tconst data = { guard: formatDisplay(\"afterEach\") };\n\t\t\tif (failure) {\n\t\t\t\tdata.failure = { _custom: {\n\t\t\t\t\ttype: Error,\n\t\t\t\t\treadOnly: true,\n\t\t\t\t\tdisplay: failure ? failure.message : \"\",\n\t\t\t\t\ttooltip: \"Navigation Failure\",\n\t\t\t\t\tvalue: failure\n\t\t\t\t} };\n\t\t\t\tdata.status = formatDisplay(\"❌\");\n\t\t\t} else data.status = formatDisplay(\"✅\");\n\t\t\tdata.from = formatRouteLocation(from, \"Current Location during this navigation\");\n\t\t\tdata.to = formatRouteLocation(to, \"Target location\");\n\t\t\tapi.addTimelineEvent({\n\t\t\t\tlayerId: navigationsLayerId,\n\t\t\t\tevent: {\n\t\t\t\t\ttitle: \"End of navigation\",\n\t\t\t\t\tsubtitle: to.fullPath,\n\t\t\t\t\ttime: api.now(),\n\t\t\t\t\tdata,\n\t\t\t\t\tlogType: failure ? \"warning\" : \"default\",\n\t\t\t\t\tgroupId: to.meta.__navigationId\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\t/**\n\t\t* Inspector of Existing routes\n\t\t*/\n\t\tconst routerInspectorId = \"router-inspector:\" + id;\n\t\tapi.addInspector({\n\t\t\tid: routerInspectorId,\n\t\t\tlabel: \"Routes\" + (id ? \" \" + id : \"\"),\n\t\t\ticon: \"book\",\n\t\t\ttreeFilterPlaceholder: \"Search routes\"\n\t\t});\n\t\tfunction refreshRoutesView() {\n\t\t\tif (!activeRoutesPayload) return;\n\t\t\tconst payload = activeRoutesPayload;\n\t\t\tlet routes = matcher.getRoutes().filter((route) => !route.parent || !route.parent.record.components);\n\t\t\troutes.forEach(resetMatchStateOnRouteRecord);\n\t\t\tif (payload.filter) routes = routes.filter((route) => isRouteMatching(route, payload.filter.toLowerCase()));\n\t\t\troutes.forEach((route) => markRouteRecordActive(route, router.currentRoute.value));\n\t\t\tpayload.rootNodes = routes.map(formatRouteRecordForInspector);\n\t\t}\n\t\tlet activeRoutesPayload;\n\t\tapi.on.getInspectorTree((payload) => {\n\t\t\tactiveRoutesPayload = payload;\n\t\t\tif (payload.app === app && payload.inspectorId === routerInspectorId) refreshRoutesView();\n\t\t});\n\t\t/**\n\t\t* Display information about the currently selected route record\n\t\t*/\n\t\tapi.on.getInspectorState((payload) => {\n\t\t\tif (payload.app === app && payload.inspectorId === routerInspectorId) {\n\t\t\t\tconst route = matcher.getRoutes().find((route) => route.record.__vd_id === payload.nodeId);\n\t\t\t\tif (route) payload.state = { options: formatRouteRecordMatcherForStateInspector(route) };\n\t\t\t}\n\t\t});\n\t\tapi.sendInspectorTree(routerInspectorId);\n\t\tapi.sendInspectorState(routerInspectorId);\n\t});\n}\nfunction modifierForKey(key) {\n\tif (key.optional) return key.repeatable ? \"*\" : \"?\";\n\telse return key.repeatable ? \"+\" : \"\";\n}\nfunction formatRouteRecordMatcherForStateInspector(route) {\n\tconst { record } = route;\n\tconst fields = [{\n\t\teditable: false,\n\t\tkey: \"path\",\n\t\tvalue: record.path\n\t}];\n\tif (record.name != null) fields.push({\n\t\teditable: false,\n\t\tkey: \"name\",\n\t\tvalue: record.name\n\t});\n\tfields.push({\n\t\teditable: false,\n\t\tkey: \"regexp\",\n\t\tvalue: route.re\n\t});\n\tif (route.keys.length) fields.push({\n\t\teditable: false,\n\t\tkey: \"keys\",\n\t\tvalue: { _custom: {\n\t\t\ttype: null,\n\t\t\treadOnly: true,\n\t\t\tdisplay: route.keys.map((key) => `${key.name}${modifierForKey(key)}`).join(\" \"),\n\t\t\ttooltip: \"Param keys\",\n\t\t\tvalue: route.keys\n\t\t} }\n\t});\n\tif (record.redirect != null) fields.push({\n\t\teditable: false,\n\t\tkey: \"redirect\",\n\t\tvalue: record.redirect\n\t});\n\tif (route.alias.length) fields.push({\n\t\teditable: false,\n\t\tkey: \"aliases\",\n\t\tvalue: route.alias.map((alias) => alias.record.path)\n\t});\n\tif (Object.keys(route.record.meta).length) fields.push({\n\t\teditable: false,\n\t\tkey: \"meta\",\n\t\tvalue: route.record.meta\n\t});\n\tfields.push({\n\t\tkey: \"score\",\n\t\teditable: false,\n\t\tvalue: { _custom: {\n\t\t\ttype: null,\n\t\t\treadOnly: true,\n\t\t\tdisplay: route.score.map((score) => score.join(\", \")).join(\" | \"),\n\t\t\ttooltip: \"Score used to sort routes\",\n\t\t\tvalue: route.score\n\t\t} }\n\t});\n\treturn fields;\n}\n/**\n* Extracted from tailwind palette\n*/\nconst PINK_500 = 15485081;\nconst BLUE_600 = 2450411;\nconst LIME_500 = 8702998;\nconst CYAN_400 = 2282478;\nconst ORANGE_400 = 16486972;\nconst DARK = 6710886;\nconst RED_100 = 16704226;\nconst RED_700 = 12131356;\nfunction formatRouteRecordForInspector(route) {\n\tconst tags = [];\n\tconst { record } = route;\n\tif (record.name != null) tags.push({\n\t\tlabel: String(record.name),\n\t\ttextColor: 0,\n\t\tbackgroundColor: CYAN_400\n\t});\n\tif (record.aliasOf) tags.push({\n\t\tlabel: \"alias\",\n\t\ttextColor: 0,\n\t\tbackgroundColor: ORANGE_400\n\t});\n\tif (route.__vd_match) tags.push({\n\t\tlabel: \"matches\",\n\t\ttextColor: 0,\n\t\tbackgroundColor: PINK_500\n\t});\n\tif (route.__vd_exactActive) tags.push({\n\t\tlabel: \"exact\",\n\t\ttextColor: 0,\n\t\tbackgroundColor: LIME_500\n\t});\n\tif (route.__vd_active) tags.push({\n\t\tlabel: \"active\",\n\t\ttextColor: 0,\n\t\tbackgroundColor: BLUE_600\n\t});\n\tif (record.redirect) tags.push({\n\t\tlabel: typeof record.redirect === \"string\" ? `redirect: ${record.redirect}` : \"redirects\",\n\t\ttextColor: 16777215,\n\t\tbackgroundColor: DARK\n\t});\n\tlet id = record.__vd_id;\n\tif (id == null) {\n\t\tid = String(routeRecordId++);\n\t\trecord.__vd_id = id;\n\t}\n\treturn {\n\t\tid,\n\t\tlabel: record.path,\n\t\ttags,\n\t\tchildren: route.children.map(formatRouteRecordForInspector)\n\t};\n}\nlet routeRecordId = 0;\nconst EXTRACT_REGEXP_RE = /^\\/(.*)\\/([a-z]*)$/;\nfunction markRouteRecordActive(route, currentRoute) {\n\tconst isExactActive = currentRoute.matched.length && isSameRouteRecord(currentRoute.matched[currentRoute.matched.length - 1], route.record);\n\troute.__vd_exactActive = route.__vd_active = isExactActive;\n\tif (!isExactActive) route.__vd_active = currentRoute.matched.some((match) => isSameRouteRecord(match, route.record));\n\troute.children.forEach((childRoute) => markRouteRecordActive(childRoute, currentRoute));\n}\nfunction resetMatchStateOnRouteRecord(route) {\n\troute.__vd_match = false;\n\troute.children.forEach(resetMatchStateOnRouteRecord);\n}\nfunction isRouteMatching(route, filter) {\n\tconst found = String(route.re).match(EXTRACT_REGEXP_RE);\n\troute.__vd_match = false;\n\tif (!found || found.length < 3) return false;\n\tif (new RegExp(found[1].replace(/\\$$/, \"\"), found[2]).test(filter)) {\n\t\troute.children.forEach((child) => isRouteMatching(child, filter));\n\t\tif (route.record.path !== \"/\" || filter === \"/\") {\n\t\t\troute.__vd_match = route.re.test(filter);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\tconst path = route.record.path.toLowerCase();\n\tconst decodedPath = decode(path);\n\tif (!isAbsolutePath(filter) && (decodedPath.includes(filter) || path.includes(filter))) return true;\n\tif (decodedPath.startsWith(filter) || path.startsWith(filter)) return true;\n\tif (route.record.name && String(route.record.name).includes(filter)) return true;\n\treturn route.children.some((child) => isRouteMatching(child, filter));\n}\nfunction omit(obj, keys) {\n\tconst ret = {};\n\tfor (const key in obj) if (!keys.includes(key)) ret[key] = obj[key];\n\treturn ret;\n}\n//#endregion\nexport { PLUS_RE as A, isSameRouteLocation as C, resolveRelativePath as D, parseURL as E, isBrowser as F, encodeHash as M, encodeParam as N, stringifyURL as O, encodePath as P, START_LOCATION_NORMALIZED as S, isSameRouteRecord as T, saveScrollPosition as _, loadRouteLocation as a, normalizeBase as b, useCallbacks as c, stringifyQuery as d, isRouteLocation as f, getScrollKey as g, getSavedScrollPosition as h, guardToPromiseFn as i, decode as j, stripBase as k, normalizeQuery as l, computeScrollPosition as m, extractChangingRecords as n, onBeforeRouteLeave as o, isRouteName as p, extractComponentsGuards as r, onBeforeRouteUpdate as s, addDevtools as t, parseQuery as u, scrollToPosition as v, isSameRouteLocationParams as w, NEW_stringifyURL as x, createHref as y };\n","/*!\n* vue-router v5.3.0\n* (c) 2026 Eduardo San Martin Morote\n* @license MIT\n*/\nimport { C as isSameRouteLocation, E as parseURL, F as isBrowser, M as encodeHash, N as encodeParam, O as stringifyURL, S as START_LOCATION_NORMALIZED, T as isSameRouteRecord, _ as saveScrollPosition, a as loadRouteLocation, b as normalizeBase, c as useCallbacks, d as stringifyQuery, f as isRouteLocation, g as getScrollKey, h as getSavedScrollPosition, i as guardToPromiseFn, j as decode, k as stripBase, l as normalizeQuery, m as computeScrollPosition, n as extractChangingRecords, o as onBeforeRouteLeave, p as isRouteName, r as extractComponentsGuards, s as onBeforeRouteUpdate, t as addDevtools, u as parseQuery, v as scrollToPosition, w as isSameRouteLocationParams, y as createHref } from \"./devtools-CLRpXhL7.js\";\nimport { a as routerKey, b as noop, c as diagnostics, d as isNavigationFailure, f as applyToParams, g as isArray, h as isAbsolutePath, i as routeLocationKey, l as NavigationFailureType, n as useRouter, o as routerViewLocationKey, p as assign, r as matchedRouteKey, s as viewDepthKey, t as useRoute, u as createRouterError, y as mergeOptions } from \"./useApi-CUgTH_jn.js\";\nimport { computed, defineComponent, getCurrentInstance, h, inject, nextTick, provide, reactive, ref, shallowReactive, shallowRef, unref, watch, watchEffect } from \"vue\";\n//#region src/history/html5.ts\nlet createBaseLocation = () => location.protocol + \"//\" + location.host;\n/**\n* Creates a normalized history location from a window.location object\n* @param base - The base path\n* @param location - The window.location object\n*/\nfunction createCurrentLocation(base, location) {\n\tconst { pathname, search, hash } = location;\n\tconst hashPos = base.indexOf(\"#\");\n\tif (hashPos > -1) {\n\t\tlet slicePos = hash.includes(base.slice(hashPos)) ? base.slice(hashPos).length : 1;\n\t\tlet pathFromHash = hash.slice(slicePos);\n\t\tif (pathFromHash[0] !== \"/\") pathFromHash = \"/\" + pathFromHash;\n\t\treturn stripBase(pathFromHash, \"\");\n\t}\n\treturn stripBase(pathname, base) + search + hash;\n}\nfunction useHistoryListeners(base, historyState, currentLocation, replace) {\n\tlet listeners = [];\n\tlet teardowns = [];\n\tlet pauseState = null;\n\tconst popStateHandler = ({ state }) => {\n\t\tconst to = createCurrentLocation(base, location);\n\t\tconst from = currentLocation.value;\n\t\tconst fromState = historyState.value;\n\t\tlet delta = 0;\n\t\tif (state) {\n\t\t\tcurrentLocation.value = to;\n\t\t\thistoryState.value = state;\n\t\t\tif (pauseState && pauseState === from) {\n\t\t\t\tpauseState = null;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tdelta = fromState ? state.position - fromState.position : 0;\n\t\t} else replace(to);\n\t\tlisteners.forEach((listener) => {\n\t\t\tlistener(currentLocation.value, from, {\n\t\t\t\tdelta,\n\t\t\t\ttype: \"pop\",\n\t\t\t\tdirection: delta ? delta > 0 ? \"forward\" : \"back\" : \"\"\n\t\t\t});\n\t\t});\n\t};\n\tfunction pauseListeners() {\n\t\tpauseState = currentLocation.value;\n\t}\n\tfunction listen(callback) {\n\t\tlisteners.push(callback);\n\t\tconst teardown = () => {\n\t\t\tconst index = listeners.indexOf(callback);\n\t\t\tif (index > -1) listeners.splice(index, 1);\n\t\t};\n\t\tteardowns.push(teardown);\n\t\treturn teardown;\n\t}\n\tfunction beforeUnloadListener() {\n\t\tconst { history } = window;\n\t\tif (!history.state) return;\n\t\thistory.replaceState(assign({}, history.state, { scroll: computeScrollPosition() }), \"\");\n\t}\n\tfunction destroy() {\n\t\tfor (const teardown of teardowns) teardown();\n\t\tteardowns = [];\n\t\twindow.removeEventListener(\"popstate\", popStateHandler);\n\t\twindow.removeEventListener(\"pagehide\", beforeUnloadListener);\n\t}\n\twindow.addEventListener(\"popstate\", popStateHandler);\n\twindow.addEventListener(\"pagehide\", beforeUnloadListener);\n\treturn {\n\t\tpauseListeners,\n\t\tlisten,\n\t\tdestroy\n\t};\n}\n/**\n* Creates a state object\n*/\nfunction buildState(back, current, forward, replaced = false) {\n\treturn {\n\t\tback,\n\t\tcurrent,\n\t\tforward,\n\t\treplaced,\n\t\tposition: window.history.length,\n\t\tscroll: null\n\t};\n}\nfunction useHistoryStateNavigation(base) {\n\tconst { history, location } = window;\n\tconst currentLocation = { value: createCurrentLocation(base, location) };\n\tconst historyState = { value: history.state };\n\tif (!historyState.value) changeLocation(currentLocation.value, {\n\t\tback: null,\n\t\tcurrent: currentLocation.value,\n\t\tforward: null,\n\t\tposition: history.length - 1,\n\t\treplaced: true,\n\t\tscroll: null\n\t}, true);\n\tfunction changeLocation(to, state, replace) {\n\t\t/**\n\t\t* if a base tag is provided, and we are on a normal domain, we have to\n\t\t* respect the provided `base` attribute because pushState() will use it and\n\t\t* potentially erase anything before the `#` like at\n\t\t* https://github.com/vuejs/router/issues/685 where a base of\n\t\t* `/folder/#` but a base of `/` would erase the `/folder/` section. If\n\t\t* there is no host, the `<base>` tag makes no sense and if there isn't a\n\t\t* base tag we can just use everything after the `#`.\n\t\t*/\n\t\tconst hashIndex = base.indexOf(\"#\");\n\t\tconst url = hashIndex > -1 ? (location.host && document.querySelector(\"base\") ? base : base.slice(hashIndex)) + to : createBaseLocation() + base + to;\n\t\ttry {\n\t\t\thistory[replace ? \"replaceState\" : \"pushState\"](state, \"\", url);\n\t\t\thistoryState.value = state;\n\t\t} catch (err) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") diagnostics.VUE_ROUTER_R0120({ cause: err });\n\t\t\telse console.error(err);\n\t\t\tlocation[replace ? \"replace\" : \"assign\"](url);\n\t\t}\n\t}\n\tfunction replace(to, data) {\n\t\tchangeLocation(to, assign({}, history.state, buildState(historyState.value.back, to, historyState.value.forward, true), data, { position: historyState.value.position }), true);\n\t\tcurrentLocation.value = to;\n\t}\n\tfunction push(to, data) {\n\t\tconst currentState = assign({}, historyState.value, history.state, {\n\t\t\tforward: to,\n\t\t\tscroll: computeScrollPosition()\n\t\t});\n\t\tif (process.env.NODE_ENV !== \"production\" && !history.state) diagnostics.VUE_ROUTER_R0121();\n\t\tchangeLocation(currentState.current, currentState, true);\n\t\tchangeLocation(to, assign({}, buildState(currentLocation.value, to, null), { position: currentState.position + 1 }, data), false);\n\t\tcurrentLocation.value = to;\n\t}\n\treturn {\n\t\tlocation: currentLocation,\n\t\tstate: historyState,\n\t\tpush,\n\t\treplace\n\t};\n}\n/**\n* Creates an HTML5 history. Most common history for single page applications.\n*\n* @param base -\n*/\nfunction createWebHistory(base) {\n\tbase = normalizeBase(base);\n\tconst historyNavigation = useHistoryStateNavigation(base);\n\tconst historyListeners = useHistoryListeners(base, historyNavigation.state, historyNavigation.location, historyNavigation.replace);\n\tfunction go(delta, triggerListeners = true) {\n\t\tif (!triggerListeners) historyListeners.pauseListeners();\n\t\thistory.go(delta);\n\t}\n\tconst routerHistory = assign({\n\t\tlocation: \"\",\n\t\tbase,\n\t\tgo,\n\t\tcreateHref: createHref.bind(null, base)\n\t}, historyNavigation, historyListeners);\n\tObject.defineProperty(routerHistory, \"location\", {\n\t\tenumerable: true,\n\t\tget: () => historyNavigation.location.value\n\t});\n\tObject.defineProperty(routerHistory, \"state\", {\n\t\tenumerable: true,\n\t\tget: () => historyNavigation.state.value\n\t});\n\treturn routerHistory;\n}\n//#endregion\n//#region src/history/hash.ts\n/**\n* Creates a hash history. Useful for web applications with no host (e.g. `file://`) or when configuring a server to\n* handle any URL is not possible.\n*\n* @param base - optional base to provide. Defaults to `location.pathname + location.search` If there is a `<base>` tag\n* in the `head`, its value will be ignored in favor of this parameter **but note it affects all the history.pushState()\n* calls**, meaning that if you use a `<base>` tag, it's `href` value **has to match this parameter** (ignoring anything\n* after the `#`).\n*\n* @example\n* ```js\n* // at https://example.com/folder\n* createWebHashHistory() // gives a url of `https://example.com/folder#`\n* createWebHashHistory('/folder/') // gives a url of `https://example.com/folder/#`\n* // if the `#` is provided in the base, it won't be added by `createWebHashHistory`\n* createWebHashHistory('/folder/#/app/') // gives a url of `https://example.com/folder/#/app/`\n* // you should avoid doing this because it changes the original url and breaks copying urls\n* createWebHashHistory('/other-folder/') // gives a url of `https://example.com/other-folder/#`\n*\n* // at file:///usr/etc/folder/index.html\n* // for locations with no `host`, the base is ignored\n* createWebHashHistory('/iAmIgnored') // gives a url of `file:///usr/etc/folder/index.html#`\n* ```\n*/\nfunction createWebHashHistory(base) {\n\tbase = location.host ? base || location.pathname + location.search : \"\";\n\tif (!base.includes(\"#\")) base += \"#\";\n\tif (process.env.NODE_ENV !== \"production\" && !base.endsWith(\"#/\") && !base.endsWith(\"#\")) diagnostics.VUE_ROUTER_R0110({\n\t\tbase,\n\t\tsuggestion: base.replace(/#.*$/, \"#\")\n\t});\n\treturn createWebHistory(base);\n}\n//#endregion\n//#region src/history/memory.ts\n/**\n* Creates an in-memory based history. The main purpose of this history is to handle SSR. It starts in a special location that is nowhere.\n* It's up to the user to replace that location with the starter location by either calling `router.push` or `router.replace`.\n*\n* @param base - Base applied to all urls, defaults to '/'\n* @returns a history object that can be passed to the router constructor\n*/\nfunction createMemoryHistory(base = \"\") {\n\tlet listeners = [];\n\tlet queue = [[\"\", {}]];\n\tlet position = 0;\n\tbase = normalizeBase(base);\n\tfunction setLocation(location, state = {}) {\n\t\tposition++;\n\t\tif (position !== queue.length) queue.splice(position);\n\t\tqueue.push([location, state]);\n\t}\n\tfunction triggerListeners(to, from, { direction, delta }) {\n\t\tconst info = {\n\t\t\tdirection,\n\t\t\tdelta,\n\t\t\ttype: \"pop\"\n\t\t};\n\t\tfor (const callback of listeners) callback(to, from, info);\n\t}\n\tconst routerHistory = {\n\t\tlocation: \"\",\n\t\tstate: {},\n\t\tbase,\n\t\tcreateHref: createHref.bind(null, base),\n\t\treplace(to, state) {\n\t\t\tqueue.splice(position--, 1);\n\t\t\tsetLocation(to, state);\n\t\t},\n\t\tpush(to, state) {\n\t\t\tsetLocation(to, state);\n\t\t},\n\t\tlisten(callback) {\n\t\t\tlisteners.push(callback);\n\t\t\treturn () => {\n\t\t\t\tconst index = listeners.indexOf(callback);\n\t\t\t\tif (index > -1) listeners.splice(index, 1);\n\t\t\t};\n\t\t},\n\t\tdestroy() {\n\t\t\tlisteners = [];\n\t\t\tqueue = [[\"\", {}]];\n\t\t\tposition = 0;\n\t\t},\n\t\tgo(delta, shouldTrigger = true) {\n\t\t\tconst from = this.location;\n\t\t\tconst direction = delta < 0 ? \"back\" : \"forward\";\n\t\t\tposition = Math.max(0, Math.min(position + delta, queue.length - 1));\n\t\t\tif (shouldTrigger) triggerListeners(this.location, from, {\n\t\t\t\tdirection,\n\t\t\t\tdelta\n\t\t\t});\n\t\t}\n\t};\n\tObject.defineProperty(routerHistory, \"location\", {\n\t\tenumerable: true,\n\t\tget: () => queue[position][0]\n\t});\n\tObject.defineProperty(routerHistory, \"state\", {\n\t\tenumerable: true,\n\t\tget: () => queue[position][1]\n\t});\n\treturn routerHistory;\n}\n//#endregion\n//#region src/matcher/pathTokenizer.ts\nconst ROOT_TOKEN = {\n\ttype: 0,\n\tvalue: \"\"\n};\nconst VALID_PARAM_RE = /[a-zA-Z0-9_]/;\nfunction tokenizePath(path) {\n\tif (!path) return [[]];\n\tif (path === \"/\") return [[ROOT_TOKEN]];\n\tif (!isAbsolutePath(path)) throw new Error(process.env.NODE_ENV !== \"production\" ? `Route paths should start with a \"/\": \"${path}\" should be \"/${path}\".` : `Invalid path \"${path}\"`);\n\tfunction crash(message) {\n\t\tthrow new Error(`ERR (${state})/\"${buffer}\": ${message}`);\n\t}\n\tlet state = 0;\n\tlet previousState = state;\n\tconst tokens = [];\n\tlet segment;\n\tfunction finalizeSegment() {\n\t\tif (segment) tokens.push(segment);\n\t\tsegment = [];\n\t}\n\tlet i = 0;\n\tlet char;\n\tlet buffer = \"\";\n\tlet customRe = \"\";\n\tfunction consumeBuffer() {\n\t\tif (!buffer) return;\n\t\tif (state === 0) segment.push({\n\t\t\ttype: 0,\n\t\t\tvalue: buffer\n\t\t});\n\t\telse if (state === 1 || state === 2 || state === 3) {\n\t\t\tif (segment.length > 1 && (char === \"*\" || char === \"+\")) crash(`A repeatable param (${buffer}) must be alone in its segment. eg: '/:ids+.`);\n\t\t\tsegment.push({\n\t\t\t\ttype: 1,\n\t\t\t\tvalue: buffer,\n\t\t\t\tregexp: customRe,\n\t\t\t\trepeatable: char === \"*\" || char === \"+\",\n\t\t\t\toptional: char === \"*\" || char === \"?\"\n\t\t\t});\n\t\t} else crash(\"Invalid state to consume buffer\");\n\t\tbuffer = \"\";\n\t}\n\tfunction addCharToBuffer() {\n\t\tbuffer += char;\n\t}\n\twhile (i < path.length) {\n\t\tchar = path[i++];\n\t\tswitch (state) {\n\t\t\tcase 0:\n\t\t\t\tif (char === \"\\\\\") {\n\t\t\t\t\tpreviousState = state;\n\t\t\t\t\tstate = 4;\n\t\t\t\t} else if (char === \"/\") {\n\t\t\t\t\tif (buffer) consumeBuffer();\n\t\t\t\t\tfinalizeSegment();\n\t\t\t\t} else if (char === \":\") {\n\t\t\t\t\tconsumeBuffer();\n\t\t\t\t\tstate = 1;\n\t\t\t\t} else addCharToBuffer();\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\taddCharToBuffer();\n\t\t\t\tstate = previousState;\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tif (char === \"(\") state = 2;\n\t\t\t\telse if (VALID_PARAM_RE.test(char)) addCharToBuffer();\n\t\t\t\telse {\n\t\t\t\t\tconsumeBuffer();\n\t\t\t\t\tstate = 0;\n\t\t\t\t\tif (char !== \"*\" && char !== \"?\" && char !== \"+\") i--;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tif (char === \")\") {\n\t\t\t\t\tif (customRe[customRe.length - 1] == \"\\\\\") customRe = customRe.slice(0, -1) + char;\n\t\t\t\t\telse state = 3;\n\t\t\t\t} else customRe += char;\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tconsumeBuffer();\n\t\t\t\tstate = 0;\n\t\t\t\tif (char !== \"*\" && char !== \"?\" && char !== \"+\") i--;\n\t\t\t\tcustomRe = \"\";\n\t\t\t\tbreak;\n\t\t\tdefault: crash(\"Unknown state\");\n\t\t}\n\t}\n\tif (state === 2) crash(`Unfinished custom RegExp for param \"${buffer}\"`);\n\tconsumeBuffer();\n\tfinalizeSegment();\n\treturn tokens;\n}\n//#endregion\n//#region src/matcher/pathParserRanker.ts\nconst BASE_PARAM_PATTERN = \"[^/]+?\";\nconst BASE_PATH_PARSER_OPTIONS = {\n\tsensitive: false,\n\tstrict: false,\n\tstart: true,\n\tend: true\n};\nconst REGEX_CHARS_RE = /[.+*?^${}()[\\]/\\\\]/g;\n/**\n* Creates a path parser from an array of Segments (a segment is an array of Tokens)\n*\n* @param segments - array of segments returned by tokenizePath\n* @param extraOptions - optional options for the regexp\n* @returns a PathParser\n*/\nfunction tokensToParser(segments, extraOptions) {\n\tconst options = assign({}, BASE_PATH_PARSER_OPTIONS, extraOptions);\n\tconst score = [];\n\tlet pattern = options.start ? \"^\" : \"\";\n\tconst keys = [];\n\tfor (const segment of segments) {\n\t\tconst segmentScores = segment.length ? [] : [90];\n\t\tif (options.strict && !segment.length) pattern += \"/\";\n\t\tfor (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) {\n\t\t\tconst token = segment[tokenIndex];\n\t\t\tlet subSegmentScore = 40 + (options.sensitive ? .25 : 0);\n\t\t\tif (token.type === 0) {\n\t\t\t\tif (!tokenIndex) pattern += \"/\";\n\t\t\t\tpattern += token.value.replace(REGEX_CHARS_RE, \"\\\\$&\");\n\t\t\t\tsubSegmentScore += 40;\n\t\t\t} else if (token.type === 1) {\n\t\t\t\tconst { value, repeatable, optional, regexp } = token;\n\t\t\t\tkeys.push({\n\t\t\t\t\tname: value,\n\t\t\t\t\trepeatable,\n\t\t\t\t\toptional\n\t\t\t\t});\n\t\t\t\tconst re = regexp ? regexp : BASE_PARAM_PATTERN;\n\t\t\t\tif (re !== BASE_PARAM_PATTERN) {\n\t\t\t\t\tsubSegmentScore += 10;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tnew RegExp(`(${re})`);\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\tthrow new Error(`Invalid custom RegExp for param \"${value}\" (${re}): ` + err.message);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlet subPattern = repeatable ? `((?:${re})(?:/(?:${re}))*)` : `(${re})`;\n\t\t\t\tif (!tokenIndex) subPattern = optional && segment.length < 2 ? `(?:/${subPattern})` : \"/\" + subPattern;\n\t\t\t\tif (optional) subPattern += \"?\";\n\t\t\t\tpattern += subPattern;\n\t\t\t\tsubSegmentScore += 20;\n\t\t\t\tif (optional) subSegmentScore += -8;\n\t\t\t\tif (repeatable) subSegmentScore += -20;\n\t\t\t\tif (re === \".*\") subSegmentScore += -50;\n\t\t\t}\n\t\t\tsegmentScores.push(subSegmentScore);\n\t\t}\n\t\tscore.push(segmentScores);\n\t}\n\tif (options.strict && options.end) {\n\t\tconst i = score.length - 1;\n\t\tscore[i][score[i].length - 1] += .7000000000000001;\n\t}\n\tif (!options.strict) pattern += \"/?\";\n\tif (options.end) pattern += \"$\";\n\telse if (options.strict && !pattern.endsWith(\"/\")) pattern += \"(?:/|$)\";\n\tconst re = new RegExp(pattern, options.sensitive ? \"\" : \"i\");\n\tfunction parse(path) {\n\t\tconst match = path.match(re);\n\t\tconst params = {};\n\t\tif (!match) return null;\n\t\tfor (let i = 1; i < match.length; i++) {\n\t\t\tconst value = match[i] || \"\";\n\t\t\tconst key = keys[i - 1];\n\t\t\tparams[key.name] = value && key.repeatable ? value.split(\"/\") : value;\n\t\t}\n\t\treturn params;\n\t}\n\tfunction stringify(params) {\n\t\tlet path = \"\";\n\t\tlet avoidDuplicatedSlash = false;\n\t\tfor (const segment of segments) {\n\t\t\tif (!avoidDuplicatedSlash || !path.endsWith(\"/\")) path += \"/\";\n\t\t\tavoidDuplicatedSlash = false;\n\t\t\tfor (const token of segment) if (token.type === 0) path += token.value;\n\t\t\telse if (token.type === 1) {\n\t\t\t\tconst { value, repeatable, optional } = token;\n\t\t\t\tconst param = value in params ? params[value] : \"\";\n\t\t\t\tif (isArray(param) && !repeatable) throw new Error(`Provided param \"${value}\" is an array but it is not repeatable (* or + modifiers)`);\n\t\t\t\tconst text = isArray(param) ? param.join(\"/\") : param;\n\t\t\t\tif (!text) {\n\t\t\t\t\tif (optional) {\n\t\t\t\t\t\tif (segment.length < 2) {\n\t\t\t\t\t\t\tif (path.endsWith(\"/\")) path = path.slice(0, -1);\n\t\t\t\t\t\t\telse avoidDuplicatedSlash = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else throw new Error(`Missing required param \"${value}\"`);\n\t\t\t\t}\n\t\t\t\tpath += text;\n\t\t\t}\n\t\t}\n\t\treturn path || \"/\";\n\t}\n\treturn {\n\t\tre,\n\t\tscore,\n\t\tkeys,\n\t\tparse,\n\t\tstringify\n\t};\n}\n/**\n* Compares an array of numbers as used in PathParser.score and returns a\n* number. This function can be used to `sort` an array\n*\n* @param a - first array of numbers\n* @param b - second array of numbers\n* @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b\n* should be sorted first\n*/\nfunction compareScoreArray(a, b) {\n\tlet i = 0;\n\twhile (i < a.length && i < b.length) {\n\t\tconst diff = b[i] - a[i];\n\t\tif (diff) return diff;\n\t\ti++;\n\t}\n\tif (a.length < b.length) return a.length === 1 && a[0] === 80 ? -1 : 1;\n\telse if (a.length > b.length) return b.length === 1 && b[0] === 80 ? 1 : -1;\n\treturn 0;\n}\n/**\n* Compare function that can be used with `sort` to sort an array of PathParser\n*\n* @param a - first PathParser\n* @param b - second PathParser\n* @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b\n*/\nfunction comparePathParserScore(a, b) {\n\tlet i = 0;\n\tconst aScore = a.score;\n\tconst bScore = b.score;\n\twhile (i < aScore.length && i < bScore.length) {\n\t\tconst comp = compareScoreArray(aScore[i], bScore[i]);\n\t\tif (comp) return comp;\n\t\ti++;\n\t}\n\tif (Math.abs(bScore.length - aScore.length) === 1) {\n\t\tif (isLastScoreNegative(aScore)) return 1;\n\t\tif (isLastScoreNegative(bScore)) return -1;\n\t}\n\treturn bScore.length - aScore.length;\n}\n/**\n* This allows detecting splats at the end of a path: /home/:id(.*)*\n*\n* @param score - score to check\n* @returns true if the last entry is negative\n*/\nfunction isLastScoreNegative(score) {\n\tconst last = score[score.length - 1];\n\treturn score.length > 0 && last[last.length - 1] < 0;\n}\nconst PATH_PARSER_OPTIONS_DEFAULTS = {\n\tstrict: false,\n\tend: true,\n\tsensitive: false\n};\n//#endregion\n//#region src/matcher/pathMatcher.ts\nfunction createRouteRecordMatcher(record, parent, options) {\n\tconst parser = tokensToParser(tokenizePath(record.path), options);\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tconst existingKeys = /* @__PURE__ */ new Set();\n\t\tfor (const key of parser.keys) {\n\t\t\tif (existingKeys.has(key.name)) diagnostics.VUE_ROUTER_R0090({\n\t\t\t\tname: key.name,\n\t\t\t\tpath: record.path\n\t\t\t});\n\t\t\texistingKeys.add(key.name);\n\t\t}\n\t}\n\tconst matcher = assign(parser, {\n\t\trecord,\n\t\tparent,\n\t\tchildren: [],\n\t\talias: []\n\t});\n\tif (parent) {\n\t\tif (!matcher.record.aliasOf === !parent.record.aliasOf) parent.children.push(matcher);\n\t}\n\treturn matcher;\n}\n//#endregion\n//#region src/matcher/index.ts\n/**\n* Creates a Router Matcher.\n*\n* @internal\n* @param routes - array of initial routes\n* @param globalOptions - global route options\n*/\nfunction createRouterMatcher(routes, globalOptions) {\n\tconst matchers = [];\n\tconst matcherMap = /* @__PURE__ */ new Map();\n\tglobalOptions = mergeOptions(PATH_PARSER_OPTIONS_DEFAULTS, globalOptions);\n\tfunction getRecordMatcher(name) {\n\t\treturn matcherMap.get(name);\n\t}\n\tfunction addRoute(record, parent, originalRecord) {\n\t\tconst isRootAdd = !originalRecord;\n\t\tconst mainNormalizedRecord = normalizeRouteRecord(record);\n\t\tif (process.env.NODE_ENV !== \"production\") checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent);\n\t\tmainNormalizedRecord.aliasOf = originalRecord && originalRecord.record;\n\t\tconst options = mergeOptions(globalOptions, record);\n\t\tconst normalizedRecords = [mainNormalizedRecord];\n\t\tif (\"alias\" in record) {\n\t\t\tconst aliases = typeof record.alias === \"string\" ? [record.alias] : record.alias;\n\t\t\tfor (const alias of aliases) normalizedRecords.push(normalizeRouteRecord(assign({}, mainNormalizedRecord, {\n\t\t\t\tcomponents: originalRecord ? originalRecord.record.components : mainNormalizedRecord.components,\n\t\t\t\tpath: alias,\n\t\t\t\taliasOf: originalRecord ? originalRecord.record : mainNormalizedRecord\n\t\t\t})));\n\t\t}\n\t\tlet matcher;\n\t\tlet originalMatcher;\n\t\tfor (const normalizedRecord of normalizedRecords) {\n\t\t\tconst { path } = normalizedRecord;\n\t\t\tif (parent && !isAbsolutePath(path)) {\n\t\t\t\tconst parentPath = parent.record.path;\n\t\t\t\tconst connectingSlash = parentPath[parentPath.length - 1] === \"/\" ? \"\" : \"/\";\n\t\t\t\tnormalizedRecord.path = parent.record.path + (path && connectingSlash + path);\n\t\t\t}\n\t\t\tif (process.env.NODE_ENV !== \"production\" && normalizedRecord.path === \"*\") throw new Error(\"Catch all routes (\\\"*\\\") must now be defined using a param with a custom regexp.\\nSee more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.\");\n\t\t\tmatcher = createRouteRecordMatcher(normalizedRecord, parent, options);\n\t\t\tif (process.env.NODE_ENV !== \"production\" && parent && isAbsolutePath(path)) checkMissingParamsInAbsolutePath(matcher, parent);\n\t\t\tif (originalRecord) {\n\t\t\t\toriginalRecord.alias.push(matcher);\n\t\t\t\tif (process.env.NODE_ENV !== \"production\") checkSameParams(originalRecord, matcher);\n\t\t\t} else {\n\t\t\t\toriginalMatcher = originalMatcher || matcher;\n\t\t\t\tif (originalMatcher !== matcher) originalMatcher.alias.push(matcher);\n\t\t\t\tif (isRootAdd && record.name && !isAliasRecord(matcher)) {\n\t\t\t\t\tif (process.env.NODE_ENV !== \"production\") checkSameNameAsAncestor(record, parent);\n\t\t\t\t\tremoveRoute(record.name);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isMatchable(matcher)) insertMatcher(matcher);\n\t\t\tif (mainNormalizedRecord.children) {\n\t\t\t\tconst children = mainNormalizedRecord.children;\n\t\t\t\tfor (let i = 0; i < children.length; i++) addRoute(children[i], matcher, originalRecord && originalRecord.children[i]);\n\t\t\t}\n\t\t\toriginalRecord = originalRecord || matcher;\n\t\t}\n\t\treturn originalMatcher ? () => {\n\t\t\tremoveRoute(originalMatcher);\n\t\t} : noop;\n\t}\n\tfunction removeRoute(matcherRef) {\n\t\tif (isRouteName(matcherRef)) {\n\t\t\tconst matcher = matcherMap.get(matcherRef);\n\t\t\tif (matcher) {\n\t\t\t\tmatcherMap.delete(matcherRef);\n\t\t\t\tmatchers.splice(matchers.indexOf(matcher), 1);\n\t\t\t\tmatcher.children.forEach(removeRoute);\n\t\t\t\tmatcher.alias.forEach(removeRoute);\n\t\t\t}\n\t\t} else {\n\t\t\tconst index = matchers.indexOf(matcherRef);\n\t\t\tif (index > -1) {\n\t\t\t\tmatchers.splice(index, 1);\n\t\t\t\tif (matcherRef.record.name) matcherMap.delete(matcherRef.record.name);\n\t\t\t\tmatcherRef.children.forEach(removeRoute);\n\t\t\t\tmatcherRef.alias.forEach(removeRoute);\n\t\t\t}\n\t\t}\n\t}\n\tfunction getRoutes() {\n\t\treturn matchers;\n\t}\n\tfunction insertMatcher(matcher) {\n\t\tconst index = findInsertionIndex(matcher, matchers);\n\t\tmatchers.splice(index, 0, matcher);\n\t\tif (matcher.record.name && !isAliasRecord(matcher)) matcherMap.set(matcher.record.name, matcher);\n\t}\n\tfunction resolve(location, currentLocation) {\n\t\tlet matcher;\n\t\tlet params = {};\n\t\tlet path;\n\t\tlet name;\n\t\tif (\"name\" in location && location.name) {\n\t\t\tmatcher = matcherMap.get(location.name);\n\t\t\tif (!matcher) throw createRouterError(1, { location });\n\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\tconst invalidParams = Object.keys(location.params || {}).filter((paramName) => !matcher.keys.find((k) => k.name === paramName));\n\t\t\t\tif (invalidParams.length) {\n\t\t\t\t\tconst isInherited = !matcher.keys.length && invalidParams.some((name) => name in currentLocation.params);\n\t\t\t\t\tdiagnostics.VUE_ROUTER_R0100({\n\t\t\t\t\t\tparams: invalidParams.join(\"\\\", \\\"\"),\n\t\t\t\t\t\tinherited: isInherited ? ` If you are using a catch-all route with a named redirect, pass an empty \\`params\\` object: \\`redirect: { name: '...', params: {} }\\`.` : \"\"\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tname = matcher.record.name;\n\t\t\tparams = assign(pickParams(currentLocation.params, matcher.keys.filter((k) => !k.optional).concat(matcher.parent ? matcher.parent.keys.filter((k) => k.optional) : []).map((k) => k.name)), location.params && pickParams(location.params, matcher.keys.map((k) => k.name)));\n\t\t\tpath = matcher.stringify(params);\n\t\t} else if (location.path != null) {\n\t\t\tpath = location.path;\n\t\t\tif (process.env.NODE_ENV !== \"production\" && !isAbsolutePath(path)) diagnostics.VUE_ROUTER_R0101({ path });\n\t\t\tmatcher = matchers.find((m) => m.re.test(path));\n\t\t\tif (matcher) {\n\t\t\t\tparams = matcher.parse(path);\n\t\t\t\tname = matcher.record.name;\n\t\t\t\tmatcher.keys.forEach((key) => {\n\t\t\t\t\tif (key.optional && !params[key.name]) delete params[key.name];\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tmatcher = currentLocation.name ? matcherMap.get(currentLocation.name) : matchers.find((m) => m.re.test(currentLocation.path));\n\t\t\tif (!matcher) throw createRouterError(1, {\n\t\t\t\tlocation,\n\t\t\t\tcurrentLocation\n\t\t\t});\n\t\t\tname = matcher.record.name;\n\t\t\tparams = assign({}, currentLocation.params, location.params);\n\t\t\tpath = matcher.stringify(params);\n\t\t}\n\t\tconst matched = [];\n\t\tlet parentMatcher = matcher;\n\t\twhile (parentMatcher) {\n\t\t\tmatched.unshift(parentMatcher.record);\n\t\t\tparentMatcher = parentMatcher.parent;\n\t\t}\n\t\treturn {\n\t\t\tname,\n\t\t\tpath,\n\t\t\tparams,\n\t\t\tmatched,\n\t\t\tmeta: mergeMetaFields(matched)\n\t\t};\n\t}\n\troutes.forEach((route) => addRoute(route));\n\tfunction clearRoutes() {\n\t\tmatchers.length = 0;\n\t\tmatcherMap.clear();\n\t}\n\treturn {\n\t\taddRoute,\n\t\tresolve,\n\t\tremoveRoute,\n\t\tclearRoutes,\n\t\tgetRoutes,\n\t\tgetRecordMatcher\n\t};\n}\n/**\n* Picks an object param to contain only specified keys.\n*\n* @param params - params object to pick from\n* @param keys - keys to pick\n*/\nfunction pickParams(params, keys) {\n\tconst newParams = {};\n\tfor (const key of keys) if (key in params) newParams[key] = params[key];\n\treturn newParams;\n}\n/**\n* Normalizes a RouteRecordRaw. Creates a copy\n*\n* @param record\n* @returns the normalized version\n*/\nfunction normalizeRouteRecord(record) {\n\tconst normalized = {\n\t\tpath: record.path,\n\t\tredirect: record.redirect,\n\t\tname: record.name,\n\t\tmeta: record.meta || {},\n\t\taliasOf: record.aliasOf,\n\t\tbeforeEnter: record.beforeEnter,\n\t\tprops: normalizeRecordProps(record),\n\t\tchildren: record.children || [],\n\t\tinstances: {},\n\t\tleaveGuards: /* @__PURE__ */ new Set(),\n\t\tupdateGuards: /* @__PURE__ */ new Set(),\n\t\tenterCallbacks: {},\n\t\tcomponents: \"components\" in record ? record.components || null : record.component && { default: record.component }\n\t};\n\tObject.defineProperty(normalized, \"mods\", { value: {} });\n\treturn normalized;\n}\n/**\n* Normalize the optional `props` in a record to always be an object similar to\n* components. Also accept a boolean for components.\n* @param record\n*/\nfunction normalizeRecordProps(record) {\n\tconst propsObject = {};\n\tconst props = record.props || false;\n\tif (\"component\" in record) propsObject.default = props;\n\telse for (const name in record.components) propsObject[name] = typeof props === \"object\" ? props[name] : props;\n\treturn propsObject;\n}\n/**\n* Checks if a record or any of its parent is an alias\n* @param record\n*/\nfunction isAliasRecord(record) {\n\twhile (record) {\n\t\tif (record.record.aliasOf) return true;\n\t\trecord = record.parent;\n\t}\n\treturn false;\n}\n/**\n* Merge meta fields of an array of records\n*\n* @param matched - array of matched records\n*/\nfunction mergeMetaFields(matched) {\n\treturn matched.reduce((meta, record) => assign(meta, record.meta), {});\n}\nfunction isSameParam(a, b) {\n\treturn a.name === b.name && a.optional === b.optional && a.repeatable === b.repeatable;\n}\n/**\n* Check if a path and its alias have the same required params\n*\n* @param a - original record\n* @param b - alias record\n*/\nfunction checkSameParams(a, b) {\n\tfor (const key of a.keys) if (!key.optional && !b.keys.find(isSameParam.bind(null, key))) {\n\t\tdiagnostics.VUE_ROUTER_R0102({\n\t\t\talias: b.record.path,\n\t\t\toriginal: a.record.path,\n\t\t\tname: key.name\n\t\t});\n\t\treturn;\n\t}\n\tfor (const key of b.keys) if (!key.optional && !a.keys.find(isSameParam.bind(null, key))) {\n\t\tdiagnostics.VUE_ROUTER_R0102({\n\t\t\talias: b.record.path,\n\t\t\toriginal: a.record.path,\n\t\t\tname: key.name\n\t\t});\n\t\treturn;\n\t}\n}\n/**\n* A route with a name and a child with an empty path without a name should warn when adding the route\n*\n* @param mainNormalizedRecord - RouteRecordNormalized\n* @param parent - RouteRecordMatcher\n*/\nfunction checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent) {\n\tif (parent && parent.record.name && !mainNormalizedRecord.name && !mainNormalizedRecord.path && mainNormalizedRecord.children.length === 0) diagnostics.VUE_ROUTER_R0103({ name: String(parent.record.name) });\n}\nfunction checkSameNameAsAncestor(record, parent) {\n\tfor (let ancestor = parent; ancestor; ancestor = ancestor.parent) if (ancestor.record.name === record.name) throw new Error(`A route named \"${String(record.name)}\" has been added as a ${parent === ancestor ? \"child\" : \"descendant\"} of a route with the same name. Route names must be unique and a nested route cannot use the same name as an ancestor.`);\n}\nfunction checkMissingParamsInAbsolutePath(record, parent) {\n\tfor (const key of parent.keys) if (!record.keys.find(isSameParam.bind(null, key))) {\n\t\tdiagnostics.VUE_ROUTER_R0104({\n\t\t\tpath: record.record.path,\n\t\t\tname: key.name,\n\t\t\tparent: parent.record.path\n\t\t});\n\t\treturn;\n\t}\n}\n/**\n* Performs a binary search to find the correct insertion index for a new matcher.\n*\n* Matchers are primarily sorted by their score. If scores are tied then we also consider parent/child relationships,\n* with descendants coming before ancestors. If there's still a tie, new routes are inserted after existing routes.\n*\n* @param matcher - new matcher to be inserted\n* @param matchers - existing matchers\n*/\nfunction findInsertionIndex(matcher, matchers) {\n\tlet lower = 0;\n\tlet upper = matchers.length;\n\twhile (lower !== upper) {\n\t\tconst mid = lower + upper >> 1;\n\t\tif (comparePathParserScore(matcher, matchers[mid]) < 0) upper = mid;\n\t\telse lower = mid + 1;\n\t}\n\tconst insertionAncestor = getInsertionAncestor(matcher);\n\tif (insertionAncestor) {\n\t\tupper = matchers.lastIndexOf(insertionAncestor, upper - 1);\n\t\tif (process.env.NODE_ENV !== \"production\" && upper < 0) diagnostics.VUE_ROUTER_R0105({\n\t\t\tancestor: insertionAncestor.record.path,\n\t\t\trecord: matcher.record.path\n\t\t});\n\t}\n\treturn upper;\n}\nfunction getInsertionAncestor(matcher) {\n\tlet ancestor = matcher;\n\twhile (ancestor = ancestor.parent) if (isMatchable(ancestor) && comparePathParserScore(matcher, ancestor) === 0) return ancestor;\n}\n/**\n* Checks if a matcher can be reachable. This means if it's possible to reach it as a route. For example, routes without\n* a component, or name, or redirect, are just used to group other routes.\n* @param matcher\n* @param matcher.record record of the matcher\n* @returns\n*/\nfunction isMatchable({ record }) {\n\treturn !!(record.name || record.components && Object.keys(record.components).length || record.redirect);\n}\n//#endregion\n//#region src/RouterLink.ts\n/**\n* Returns the internal behavior of a {@link RouterLink} without the rendering part.\n*\n* @param props - a `to` location and an optional `replace` flag\n*/\nfunction useLink(props) {\n\tconst router = inject(routerKey);\n\tconst currentRoute = inject(routeLocationKey);\n\tlet hasPrevious = false;\n\tlet previousTo = null;\n\tconst route = computed(() => {\n\t\tconst to = unref(props.to);\n\t\tif (process.env.NODE_ENV !== \"production\" && (!hasPrevious || to !== previousTo)) {\n\t\t\tif (!isRouteLocation(to)) diagnostics.VUE_ROUTER_R0050({ to });\n\t\t\tpreviousTo = to;\n\t\t\thasPrevious = true;\n\t\t}\n\t\treturn router.resolve(to);\n\t});\n\tconst activeRecordIndex = computed(() => {\n\t\tconst { matched } = route.value;\n\t\tconst { length } = matched;\n\t\tconst routeMatched = matched[length - 1];\n\t\tconst currentMatched = currentRoute.matched;\n\t\tif (!routeMatched || !currentMatched.length) return -1;\n\t\tconst index = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched));\n\t\tif (index > -1) return index;\n\t\tconst parentRecordPath = getOriginalPath(matched[length - 2]);\n\t\treturn length > 1 && getOriginalPath(routeMatched) === parentRecordPath && currentMatched[currentMatched.length - 1].path !== parentRecordPath ? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2])) : index;\n\t});\n\tconst isActive = computed(() => activeRecordIndex.value > -1 && includesParams(currentRoute.params, route.value.params));\n\tconst isExactActive = computed(() => activeRecordIndex.value > -1 && activeRecordIndex.value === currentRoute.matched.length - 1 && isSameRouteLocationParams(currentRoute.params, route.value.params));\n\tfunction navigate(e = {}) {\n\t\tif (guardEvent(e)) {\n\t\t\tconst p = router[unref(props.replace) ? \"replace\" : \"push\"](unref(props.to)).catch(noop);\n\t\t\tif (props.viewTransition && typeof document !== \"undefined\" && \"startViewTransition\" in document) document.startViewTransition(() => p);\n\t\t\treturn p;\n\t\t}\n\t\treturn Promise.resolve();\n\t}\n\tif ((process.env.NODE_ENV !== \"production\" || __VUE_PROD_DEVTOOLS__) && isBrowser) {\n\t\tconst instance = getCurrentInstance();\n\t\tif (instance) {\n\t\t\tconst linkContextDevtools = {\n\t\t\t\troute: route.value,\n\t\t\t\tisActive: isActive.value,\n\t\t\t\tisExactActive: isExactActive.value,\n\t\t\t\terror: null\n\t\t\t};\n\t\t\tinstance.__vrl_devtools = instance.__vrl_devtools || [];\n\t\t\tinstance.__vrl_devtools.push(linkContextDevtools);\n\t\t\twatchEffect(() => {\n\t\t\t\tlinkContextDevtools.route = route.value;\n\t\t\t\tlinkContextDevtools.isActive = isActive.value;\n\t\t\t\tlinkContextDevtools.isExactActive = isExactActive.value;\n\t\t\t\tlinkContextDevtools.error = isRouteLocation(unref(props.to)) ? null : \"Invalid \\\"to\\\" value\";\n\t\t\t}, { flush: \"post\" });\n\t\t}\n\t}\n\t/**\n\t* NOTE: update {@link _RouterLinkI}'s `$slots` type when updating this\n\t*/\n\treturn {\n\t\troute,\n\t\thref: computed(() => route.value.href),\n\t\tisActive,\n\t\tisExactActive,\n\t\tnavigate\n\t};\n}\nfunction preferSingleVNode(vnodes) {\n\treturn vnodes.length === 1 ? vnodes[0] : vnodes;\n}\n/**\n* Component to render a link that triggers a navigation on click.\n*/\nconst RouterLink = /* @__PURE__ */ defineComponent({\n\tname: \"RouterLink\",\n\tcompatConfig: { MODE: 3 },\n\tprops: {\n\t\tto: {\n\t\t\ttype: [String, Object],\n\t\t\trequired: true\n\t\t},\n\t\treplace: Boolean,\n\t\tactiveClass: String,\n\t\texactActiveClass: String,\n\t\tcustom: Boolean,\n\t\tariaCurrentValue: {\n\t\t\ttype: String,\n\t\t\tdefault: \"page\"\n\t\t},\n\t\tviewTransition: Boolean\n\t},\n\tuseLink,\n\tsetup(props, { slots }) {\n\t\tconst link = reactive(useLink(props));\n\t\tconst { options } = inject(routerKey);\n\t\tconst elClass = computed(() => ({\n\t\t\t[getLinkClass(props.activeClass, options.linkActiveClass, \"router-link-active\")]: link.isActive,\n\t\t\t[getLinkClass(props.exactActiveClass, options.linkExactActiveClass, \"router-link-exact-active\")]: link.isExactActive\n\t\t}));\n\t\treturn () => {\n\t\t\tconst children = slots.default && preferSingleVNode(slots.default(link));\n\t\t\treturn props.custom ? children : h(\"a\", {\n\t\t\t\t\"aria-current\": link.isExactActive ? props.ariaCurrentValue : null,\n\t\t\t\thref: link.href,\n\t\t\t\tonClick: link.navigate,\n\t\t\t\tclass: elClass.value\n\t\t\t}, children);\n\t\t};\n\t}\n});\nfunction guardEvent(e) {\n\tif (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) return;\n\tif (e.defaultPrevented) return;\n\tif (e.button !== void 0 && e.button !== 0) return;\n\tif (e.currentTarget && e.currentTarget.getAttribute) {\n\t\tconst target = e.currentTarget.getAttribute(\"target\");\n\t\tif (/\\b_blank\\b/i.test(target)) return;\n\t}\n\tif (e.preventDefault) e.preventDefault();\n\treturn true;\n}\nfunction includesParams(outer, inner) {\n\tfor (const key in inner) {\n\t\tconst innerValue = inner[key];\n\t\tconst outerValue = outer[key];\n\t\tif (typeof innerValue === \"string\") {\n\t\t\tif (innerValue !== outerValue) return false;\n\t\t} else if (!isArray(outerValue) || outerValue.length !== innerValue.length || innerValue.some((value, i) => value.valueOf() !== outerValue[i].valueOf())) return false;\n\t}\n\treturn true;\n}\n/**\n* Get the original path value of a record by following its aliasOf\n* @param record\n*/\nfunction getOriginalPath(record) {\n\treturn record ? record.aliasOf ? record.aliasOf.path : record.path : \"\";\n}\n/**\n* Utility class to get the active class based on defaults.\n* @param propClass\n* @param globalClass\n* @param defaultClass\n*/\nconst getLinkClass = (propClass, globalClass, defaultClass) => propClass != null ? propClass : globalClass != null ? globalClass : defaultClass;\n//#endregion\n//#region src/RouterView.ts\nconst RouterViewImpl = /*#__PURE__*/ defineComponent({\n\tname: \"RouterView\",\n\tinheritAttrs: false,\n\tprops: {\n\t\tname: {\n\t\t\ttype: String,\n\t\t\tdefault: \"default\"\n\t\t},\n\t\troute: Object\n\t},\n\tcompatConfig: { MODE: 3 },\n\tsetup(props, { attrs, slots }) {\n\t\tprocess.env.NODE_ENV !== \"production\" && warnDeprecatedUsage();\n\t\tconst injectedRoute = inject(routerViewLocationKey);\n\t\tconst routeToDisplay = computed(() => props.route || injectedRoute.value);\n\t\tconst injectedDepth = inject(viewDepthKey, 0);\n\t\tconst depth = computed(() => {\n\t\t\tlet initialDepth = unref(injectedDepth);\n\t\t\tconst { matched } = routeToDisplay.value;\n\t\t\tlet matchedRoute;\n\t\t\twhile ((matchedRoute = matched[initialDepth]) && !matchedRoute.components) initialDepth++;\n\t\t\treturn initialDepth;\n\t\t});\n\t\tconst matchedRouteRef = computed(() => routeToDisplay.value.matched[depth.value]);\n\t\tprovide(viewDepthKey, computed(() => depth.value + 1));\n\t\tprovide(matchedRouteKey, matchedRouteRef);\n\t\tprovide(routerViewLocationKey, routeToDisplay);\n\t\tconst viewRef = ref();\n\t\twatch(() => [\n\t\t\tviewRef.value,\n\t\t\tmatchedRouteRef.value,\n\t\t\tprops.name\n\t\t], ([instance, to, name], [oldInstance, from, _oldName]) => {\n\t\t\tif (to) {\n\t\t\t\tto.instances[name] = instance;\n\t\t\t\tif (from && from !== to && instance && instance === oldInstance) {\n\t\t\t\t\tif (!to.leaveGuards.size) to.leaveGuards = from.leaveGuards;\n\t\t\t\t\tif (!to.updateGuards.size) to.updateGuards = from.updateGuards;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (instance && to && (!from || !isSameRouteRecord(to, from) || !oldInstance)) (to.enterCallbacks[name] || []).forEach((callback) => callback(instance));\n\t\t}, { flush: \"post\" });\n\t\treturn () => {\n\t\t\tconst route = routeToDisplay.value;\n\t\t\tconst currentName = props.name;\n\t\t\tconst matchedRoute = matchedRouteRef.value;\n\t\t\tconst ViewComponent = matchedRoute && matchedRoute.components[currentName];\n\t\t\tif (!ViewComponent) return normalizeSlot(slots.default, {\n\t\t\t\tComponent: ViewComponent,\n\t\t\t\troute\n\t\t\t});\n\t\t\tconst routePropsOption = matchedRoute.props[currentName];\n\t\t\tconst routeProps = routePropsOption ? routePropsOption === true ? route.params : typeof routePropsOption === \"function\" ? routePropsOption(route) : routePropsOption : null;\n\t\t\tconst onVnodeUnmounted = (vnode) => {\n\t\t\t\tif (vnode.component.isUnmounted) matchedRoute.instances[currentName] = null;\n\t\t\t};\n\t\t\tconst component = h(ViewComponent, assign({}, routeProps, attrs, {\n\t\t\t\tonVnodeUnmounted,\n\t\t\t\tref: viewRef\n\t\t\t}));\n\t\t\tif ((process.env.NODE_ENV !== \"production\" || __VUE_PROD_DEVTOOLS__) && isBrowser && component.ref) {\n\t\t\t\tconst info = {\n\t\t\t\t\tdepth: depth.value,\n\t\t\t\t\tname: matchedRoute.name,\n\t\t\t\t\tpath: matchedRoute.path,\n\t\t\t\t\tmeta: matchedRoute.meta\n\t\t\t\t};\n\t\t\t\t(isArray(component.ref) ? component.ref.map((r) => r.i) : [component.ref.i]).forEach((instance) => {\n\t\t\t\t\tif (instance) instance.__vrv_devtools = info;\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn normalizeSlot(slots.default, {\n\t\t\t\tComponent: component,\n\t\t\t\troute\n\t\t\t}) || component;\n\t\t};\n\t}\n});\nfunction normalizeSlot(slot, data) {\n\tif (!slot) return null;\n\tconst slotContent = slot(data);\n\treturn slotContent.length === 1 ? slotContent[0] : slotContent;\n}\n/**\n* Component to display the current route the user is at.\n*/\nconst RouterView = RouterViewImpl;\nfunction warnDeprecatedUsage() {\n\tconst instance = getCurrentInstance();\n\tconst parentName = instance.parent && instance.parent.type.name;\n\tconst parentSubTreeType = instance.parent && instance.parent.subTree && instance.parent.subTree.type;\n\tif (parentName && (parentName === \"KeepAlive\" || parentName.includes(\"Transition\")) && typeof parentSubTreeType === \"object\" && parentSubTreeType.name === \"RouterView\") {\n\t\tconst comp = parentName === \"KeepAlive\" ? \"keep-alive\" : \"transition\";\n\t\tdiagnostics.VUE_ROUTER_R0060({ comp });\n\t}\n}\n//#endregion\n//#region src/router.ts\n/**\n* Creates a Router instance that can be used by a Vue app.\n*\n* @param options - {@link RouterOptions}\n*/\nfunction createRouter(options) {\n\tconst matcher = createRouterMatcher(options.routes, options);\n\tconst parseQuery$1 = options.parseQuery || parseQuery;\n\tconst stringifyQuery$1 = options.stringifyQuery || stringifyQuery;\n\tconst routerHistory = options.history;\n\tif (process.env.NODE_ENV !== \"production\" && !routerHistory) throw new Error(\"Provide the \\\"history\\\" option when calling \\\"createRouter()\\\": https://router.vuejs.org/api/interfaces/RouterOptions.html#history\");\n\tconst beforeGuards = useCallbacks();\n\tconst beforeResolveGuards = useCallbacks();\n\tconst afterGuards = useCallbacks();\n\tconst currentRoute = shallowRef(START_LOCATION_NORMALIZED);\n\tconst routesVersion = shallowRef(0);\n\tlet pendingLocation = START_LOCATION_NORMALIZED;\n\tif (isBrowser && options.scrollBehavior && \"scrollRestoration\" in history) history.scrollRestoration = \"manual\";\n\tconst normalizeParams = applyToParams.bind(null, (paramValue) => \"\" + paramValue);\n\tconst encodeParams = applyToParams.bind(null, encodeParam);\n\tconst decodeParams = applyToParams.bind(null, decode);\n\tfunction addRoute(parentOrRoute, route) {\n\t\tlet parent;\n\t\tlet record;\n\t\tif (isRouteName(parentOrRoute)) {\n\t\t\tparent = matcher.getRecordMatcher(parentOrRoute);\n\t\t\tif (process.env.NODE_ENV !== \"production\" && !parent) diagnostics.VUE_ROUTER_R0001({ name: String(parentOrRoute) });\n\t\t\trecord = route;\n\t\t} else record = parentOrRoute;\n\t\tconst removeRoute = matcher.addRoute(record, parent);\n\t\troutesVersion.value++;\n\t\treturn () => {\n\t\t\tremoveRoute();\n\t\t\troutesVersion.value++;\n\t\t};\n\t}\n\tfunction removeRoute(name) {\n\t\tconst recordMatcher = matcher.getRecordMatcher(name);\n\t\tif (recordMatcher) {\n\t\t\tmatcher.removeRoute(recordMatcher);\n\t\t\troutesVersion.value++;\n\t\t} else if (process.env.NODE_ENV !== \"production\") diagnostics.VUE_ROUTER_R0002({ name: String(name) });\n\t}\n\tfunction clearRoutes() {\n\t\tmatcher.clearRoutes();\n\t\troutesVersion.value++;\n\t}\n\tfunction getRoutes() {\n\t\treturn matcher.getRoutes().map((routeMatcher) => routeMatcher.record);\n\t}\n\tfunction hasRoute(name) {\n\t\treturn !!matcher.getRecordMatcher(name);\n\t}\n\tfunction resolve(rawLocation, currentLocation) {\n\t\troutesVersion.value;\n\t\tif (typeof rawLocation === \"string\") {\n\t\t\tcurrentLocation = currentLocation || (rawLocation.startsWith(\"/\") ? START_LOCATION_NORMALIZED : currentRoute.value);\n\t\t\tconst locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);\n\t\t\tconst matchedRoute = matcher.resolve({ path: locationNormalized.path }, currentLocation);\n\t\t\tconst href = routerHistory.createHref(locationNormalized.fullPath);\n\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\tif (href.startsWith(\"//\")) diagnostics.VUE_ROUTER_R0003({\n\t\t\t\t\tlocation: rawLocation,\n\t\t\t\t\thref\n\t\t\t\t});\n\t\t\t\telse if (!matchedRoute.matched.length) diagnostics.VUE_ROUTER_R0004({ path: rawLocation });\n\t\t\t}\n\t\t\treturn assign(locationNormalized, matchedRoute, {\n\t\t\t\tparams: decodeParams(matchedRoute.params),\n\t\t\t\tredirectedFrom: void 0,\n\t\t\t\thref\n\t\t\t});\n\t\t}\n\t\tif (process.env.NODE_ENV !== \"production\" && !isRouteLocation(rawLocation)) {\n\t\t\tdiagnostics.VUE_ROUTER_R0005({ rawLocation });\n\t\t\treturn resolve({});\n\t\t}\n\t\tcurrentLocation = assign({}, currentLocation || (rawLocation.path != null && rawLocation.path.startsWith(\"/\") && !(\"name\" in rawLocation && rawLocation.name) ? START_LOCATION_NORMALIZED : currentRoute.value));\n\t\tlet matcherLocation;\n\t\tif (rawLocation.path != null) {\n\t\t\tif (process.env.NODE_ENV !== \"production\" && \"params\" in rawLocation && !(\"name\" in rawLocation) && Object.keys(rawLocation.params).length) diagnostics.VUE_ROUTER_R0006({ path: rawLocation.path });\n\t\t\tmatcherLocation = assign({}, rawLocation, { path: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path });\n\t\t} else {\n\t\t\tconst targetParams = assign({}, rawLocation.params);\n\t\t\tfor (const key in targetParams) if (targetParams[key] == null) delete targetParams[key];\n\t\t\tmatcherLocation = assign({}, rawLocation, { params: encodeParams(targetParams) });\n\t\t\tcurrentLocation.params = encodeParams(currentLocation.params);\n\t\t}\n\t\tconst matchedRoute = matcher.resolve(matcherLocation, currentLocation);\n\t\tconst hash = rawLocation.hash || \"\";\n\t\tif (process.env.NODE_ENV !== \"production\" && hash && !hash.startsWith(\"#\")) diagnostics.VUE_ROUTER_R0007({ hash });\n\t\tmatchedRoute.params = normalizeParams(decodeParams(matchedRoute.params));\n\t\tconst fullPath = stringifyURL(stringifyQuery$1, assign({}, rawLocation, {\n\t\t\thash: encodeHash(hash),\n\t\t\tpath: matchedRoute.path\n\t\t}));\n\t\tconst href = routerHistory.createHref(fullPath);\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tif (href.startsWith(\"//\")) diagnostics.VUE_ROUTER_R0003({\n\t\t\t\tlocation: rawLocation,\n\t\t\t\thref\n\t\t\t});\n\t\t\telse if (!matchedRoute.matched.length) diagnostics.VUE_ROUTER_R0004({ path: rawLocation.path != null ? rawLocation.path : rawLocation });\n\t\t}\n\t\treturn assign({\n\t\t\tfullPath,\n\t\t\thash,\n\t\t\tquery: stringifyQuery$1 === stringifyQuery ? normalizeQuery(rawLocation.query) : rawLocation.query || {}\n\t\t}, matchedRoute, {\n\t\t\tredirectedFrom: void 0,\n\t\t\thref\n\t\t});\n\t}\n\tfunction locationAsObject(to) {\n\t\treturn typeof to === \"string\" ? parseURL(parseQuery$1, to, currentRoute.value.path) : assign({}, to);\n\t}\n\tfunction checkCanceledNavigation(to, from) {\n\t\tif (pendingLocation !== to) return createRouterError(8, {\n\t\t\tfrom,\n\t\t\tto\n\t\t});\n\t}\n\tfunction push(to) {\n\t\treturn pushWithRedirect(to);\n\t}\n\tfunction replace(to) {\n\t\treturn push(assign(locationAsObject(to), { replace: true }));\n\t}\n\tfunction handleRedirectRecord(to, from) {\n\t\tconst lastMatched = to.matched[to.matched.length - 1];\n\t\tif (lastMatched && lastMatched.redirect) {\n\t\t\tconst { redirect } = lastMatched;\n\t\t\tlet newTargetLocation = typeof redirect === \"function\" ? redirect(to, from) : redirect;\n\t\t\tif (typeof newTargetLocation === \"string\") {\n\t\t\t\tnewTargetLocation = newTargetLocation.includes(\"?\") || newTargetLocation.includes(\"#\") ? newTargetLocation = locationAsObject(newTargetLocation) : { path: newTargetLocation };\n\t\t\t\tnewTargetLocation.params = {};\n\t\t\t}\n\t\t\tif (process.env.NODE_ENV !== \"production\" && newTargetLocation.path == null && !(\"name\" in newTargetLocation)) {\n\t\t\t\tdiagnostics.VUE_ROUTER_R0008({\n\t\t\t\t\ttarget: JSON.stringify(newTargetLocation, null, 2),\n\t\t\t\t\tto: to.fullPath\n\t\t\t\t});\n\t\t\t\tthrow new Error(\"Invalid redirect\");\n\t\t\t}\n\t\t\treturn assign({\n\t\t\t\tquery: to.query,\n\t\t\t\thash: to.hash,\n\t\t\t\tparams: newTargetLocation.path != null ? {} : to.params\n\t\t\t}, newTargetLocation);\n\t\t}\n\t}\n\tfunction pushWithRedirect(to, redirectedFrom) {\n\t\tconst targetLocation = pendingLocation = resolve(to);\n\t\tconst from = currentRoute.value;\n\t\tconst data = to.state;\n\t\tconst force = to.force;\n\t\tconst replace = to.replace === true;\n\t\tconst shouldRedirect = handleRedirectRecord(targetLocation, from);\n\t\tif (shouldRedirect) return pushWithRedirect(assign(locationAsObject(shouldRedirect), {\n\t\t\tstate: typeof shouldRedirect === \"object\" ? assign({}, data, shouldRedirect.state) : data,\n\t\t\tforce,\n\t\t\treplace\n\t\t}), redirectedFrom || targetLocation);\n\t\tconst toLocation = targetLocation;\n\t\ttoLocation.redirectedFrom = redirectedFrom;\n\t\tlet failure;\n\t\tif (!force && isSameRouteLocation(stringifyQuery$1, from, targetLocation)) {\n\t\t\tfailure = createRouterError(16, {\n\t\t\t\tto: toLocation,\n\t\t\t\tfrom\n\t\t\t});\n\t\t\thandleScroll(from, from, true, false);\n\t\t}\n\t\treturn (failure ? Promise.resolve(failure) : navigate(toLocation, from)).catch((error) => isNavigationFailure(error) ? isNavigationFailure(error, 2) ? error : markAsReady(error) : triggerError(error, toLocation, from)).then((failure) => {\n\t\t\tif (failure) {\n\t\t\t\tif (isNavigationFailure(failure, 2)) {\n\t\t\t\t\tif (process.env.NODE_ENV !== \"production\" && isSameRouteLocation(stringifyQuery$1, resolve(failure.to), toLocation) && redirectedFrom && (redirectedFrom._count = redirectedFrom._count ? redirectedFrom._count + 1 : 1) > 30) {\n\t\t\t\t\t\tdiagnostics.VUE_ROUTER_R0009({\n\t\t\t\t\t\t\tfrom: from.fullPath,\n\t\t\t\t\t\t\tto: toLocation.fullPath\n\t\t\t\t\t\t});\n\t\t\t\t\t\treturn Promise.reject(/* @__PURE__ */ new Error(\"Infinite redirect in navigation guard\"));\n\t\t\t\t\t}\n\t\t\t\t\treturn pushWithRedirect(assign({ replace }, locationAsObject(failure.to), {\n\t\t\t\t\t\tstate: typeof failure.to === \"object\" ? assign({}, data, failure.to.state) : data,\n\t\t\t\t\t\tforce\n\t\t\t\t\t}), redirectedFrom || toLocation);\n\t\t\t\t}\n\t\t\t} else failure = finalizeNavigation(toLocation, from, true, replace, data);\n\t\t\ttriggerAfterEach(toLocation, from, failure);\n\t\t\treturn failure;\n\t\t});\n\t}\n\t/**\n\t* Helper to reject and skip all navigation guards if a new navigation happened\n\t* @param to\n\t* @param from\n\t*/\n\tfunction checkCanceledNavigationAndReject(to, from) {\n\t\tconst error = checkCanceledNavigation(to, from);\n\t\treturn error ? Promise.reject(error) : Promise.resolve();\n\t}\n\tfunction runWithContext(fn) {\n\t\tconst app = installedApps.values().next().value;\n\t\treturn app && typeof app.runWithContext === \"function\" ? app.runWithContext(fn) : fn();\n\t}\n\tfunction navigate(to, from) {\n\t\tlet guards;\n\t\tconst [leavingRecords, updatingRecords, enteringRecords] = extractChangingRecords(to, from);\n\t\tguards = extractComponentsGuards(leavingRecords.reverse(), \"beforeRouteLeave\", to, from);\n\t\tfor (const record of leavingRecords) record.leaveGuards.forEach((guard) => {\n\t\t\tguards.push(guardToPromiseFn(guard, to, from));\n\t\t});\n\t\tconst canceledNavigationCheck = checkCanceledNavigationAndReject.bind(null, to, from);\n\t\tguards.push(canceledNavigationCheck);\n\t\treturn runGuardQueue(guards).then(() => {\n\t\t\tguards = [];\n\t\t\tfor (const guard of beforeGuards.list()) guards.push(guardToPromiseFn(guard, to, from));\n\t\t\tguards.push(canceledNavigationCheck);\n\t\t\treturn runGuardQueue(guards);\n\t\t}).then(() => {\n\t\t\tguards = extractComponentsGuards(updatingRecords, \"beforeRouteUpdate\", to, from);\n\t\t\tfor (const record of updatingRecords) record.updateGuards.forEach((guard) => {\n\t\t\t\tguards.push(guardToPromiseFn(guard, to, from));\n\t\t\t});\n\t\t\tguards.push(canceledNavigationCheck);\n\t\t\treturn runGuardQueue(guards);\n\t\t}).then(() => {\n\t\t\tguards = [];\n\t\t\tfor (const record of enteringRecords) if (record.beforeEnter) {\n\t\t\t\tif (isArray(record.beforeEnter)) for (const beforeEnter of record.beforeEnter) guards.push(guardToPromiseFn(beforeEnter, to, from));\n\t\t\t\telse guards.push(guardToPromiseFn(record.beforeEnter, to, from));\n\t\t\t}\n\t\t\tguards.push(canceledNavigationCheck);\n\t\t\treturn runGuardQueue(guards);\n\t\t}).then(() => {\n\t\t\tto.matched.forEach((record) => record.enterCallbacks = {});\n\t\t\tguards = extractComponentsGuards(enteringRecords, \"beforeRouteEnter\", to, from, runWithContext);\n\t\t\tguards.push(canceledNavigationCheck);\n\t\t\treturn runGuardQueue(guards);\n\t\t}).then(() => {\n\t\t\tguards = [];\n\t\t\tfor (const guard of beforeResolveGuards.list()) guards.push(guardToPromiseFn(guard, to, from));\n\t\t\tguards.push(canceledNavigationCheck);\n\t\t\treturn runGuardQueue(guards);\n\t\t}).catch((err) => isNavigationFailure(err, 8) ? err : Promise.reject(err));\n\t}\n\tfunction triggerAfterEach(to, from, failure) {\n\t\tafterGuards.list().forEach((guard) => runWithContext(() => guard(to, from, failure)));\n\t}\n\t/**\n\t* - Cleans up any navigation guards\n\t* - Changes the url if necessary\n\t* - Calls the scrollBehavior\n\t*/\n\tfunction finalizeNavigation(toLocation, from, isPush, replace, data) {\n\t\tconst error = checkCanceledNavigation(toLocation, from);\n\t\tif (error) return error;\n\t\tconst isFirstNavigation = from === START_LOCATION_NORMALIZED;\n\t\tconst state = !isBrowser ? {} : history.state;\n\t\tif (isPush) {\n\t\t\tif (replace || isFirstNavigation) routerHistory.replace(toLocation.fullPath, assign({ scroll: isFirstNavigation && state && state.scroll }, data));\n\t\t\telse routerHistory.push(toLocation.fullPath, data);\n\t\t}\n\t\tcurrentRoute.value = toLocation;\n\t\thandleScroll(toLocation, from, isPush, isFirstNavigation);\n\t\tmarkAsReady();\n\t}\n\tlet removeHistoryListener;\n\tfunction setupListeners() {\n\t\tif (removeHistoryListener) return;\n\t\tremoveHistoryListener = routerHistory.listen((to, _from, info) => {\n\t\t\tif (!router.listening) return;\n\t\t\tconst toLocation = resolve(to);\n\t\t\tconst shouldRedirect = handleRedirectRecord(toLocation, router.currentRoute.value);\n\t\t\tif (shouldRedirect) {\n\t\t\t\tpushWithRedirect(assign(shouldRedirect, {\n\t\t\t\t\treplace: true,\n\t\t\t\t\tforce: true\n\t\t\t\t}), toLocation).catch(noop);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tpendingLocation = toLocation;\n\t\t\tconst from = currentRoute.value;\n\t\t\tif (isBrowser && info.delta) saveScrollPosition(getScrollKey(from.fullPath, info.delta));\n\t\t\tnavigate(toLocation, from).catch((error) => {\n\t\t\t\tif (isNavigationFailure(error, 12)) return error;\n\t\t\t\tif (isNavigationFailure(error, 2)) {\n\t\t\t\t\tpushWithRedirect(assign(locationAsObject(error.to), { force: true }), toLocation).then((failure) => {\n\t\t\t\t\t\tif (isNavigationFailure(failure, 20) && !info.delta && info.type === \"pop\") routerHistory.go(-1, false);\n\t\t\t\t\t}).catch(noop);\n\t\t\t\t\treturn Promise.reject();\n\t\t\t\t}\n\t\t\t\tif (info.delta) routerHistory.go(-info.delta, false);\n\t\t\t\treturn triggerError(error, toLocation, from);\n\t\t\t}).then((failure) => {\n\t\t\t\tfailure = failure || finalizeNavigation(toLocation, from, false);\n\t\t\t\tif (failure) {\n\t\t\t\t\tif (info.delta && !isNavigationFailure(failure, 8)) routerHistory.go(-info.delta, false);\n\t\t\t\t\telse if (info.type === \"pop\" && isNavigationFailure(failure, 20)) routerHistory.go(-1, false);\n\t\t\t\t}\n\t\t\t\ttriggerAfterEach(toLocation, from, failure);\n\t\t\t}).catch(noop);\n\t\t});\n\t}\n\tlet readyHandlers = useCallbacks();\n\tlet errorListeners = useCallbacks();\n\tlet ready;\n\t/**\n\t* Trigger errorListeners added via onError and throws the error as well\n\t*\n\t* @param error - error to throw\n\t* @param to - location we were navigating to when the error happened\n\t* @param from - location we were navigating from when the error happened\n\t* @returns the error as a rejected promise\n\t*/\n\tfunction triggerError(error, to, from) {\n\t\tmarkAsReady(error);\n\t\tconst list = errorListeners.list();\n\t\tif (list.length) list.forEach((handler) => handler(error, to, from));\n\t\telse {\n\t\t\tif (process.env.NODE_ENV !== \"production\") diagnostics.VUE_ROUTER_R0010();\n\t\t\tconsole.error(error);\n\t\t}\n\t\treturn Promise.reject(error);\n\t}\n\tfunction isReady() {\n\t\tif (ready && currentRoute.value !== START_LOCATION_NORMALIZED) return Promise.resolve();\n\t\treturn new Promise((resolve, reject) => {\n\t\t\treadyHandlers.add([resolve, reject]);\n\t\t});\n\t}\n\tfunction markAsReady(err) {\n\t\tif (!ready) {\n\t\t\tready = !err;\n\t\t\tsetupListeners();\n\t\t\treadyHandlers.list().forEach(([resolve, reject]) => err ? reject(err) : resolve());\n\t\t\treadyHandlers.reset();\n\t\t}\n\t\treturn err;\n\t}\n\tfunction handleScroll(to, from, isPush, isFirstNavigation) {\n\t\tconst { scrollBehavior } = options;\n\t\tif (!isBrowser || !scrollBehavior) return Promise.resolve();\n\t\tconst scrollPosition = !isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0)) || (isFirstNavigation || !isPush) && history.state && history.state.scroll || null;\n\t\treturn nextTick().then(() => scrollBehavior(to, from, scrollPosition)).then((position) => to === currentRoute.value && position && scrollToPosition(position)).catch((err) => to === currentRoute.value && triggerError(err, to, from));\n\t}\n\tconst go = (delta) => routerHistory.go(delta);\n\tlet started;\n\tconst installedApps = /* @__PURE__ */ new Set();\n\tconst router = {\n\t\tcurrentRoute,\n\t\tlistening: true,\n\t\taddRoute,\n\t\tremoveRoute,\n\t\tclearRoutes,\n\t\thasRoute,\n\t\tgetRoutes,\n\t\tresolve,\n\t\toptions,\n\t\tpush,\n\t\treplace,\n\t\tgo,\n\t\tback: () => go(-1),\n\t\tforward: () => go(1),\n\t\tbeforeEach: beforeGuards.add,\n\t\tbeforeResolve: beforeResolveGuards.add,\n\t\tafterEach: afterGuards.add,\n\t\tonError: errorListeners.add,\n\t\tisReady,\n\t\tinstall(app) {\n\t\t\tapp.component(\"RouterLink\", RouterLink);\n\t\t\tapp.component(\"RouterView\", RouterView);\n\t\t\tapp.config.globalProperties.$router = router;\n\t\t\tObject.defineProperty(app.config.globalProperties, \"$route\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => unref(currentRoute)\n\t\t\t});\n\t\t\tif (isBrowser && !started && currentRoute.value === START_LOCATION_NORMALIZED) {\n\t\t\t\tstarted = true;\n\t\t\t\tpush(routerHistory.location).catch((err) => {\n\t\t\t\t\tif (process.env.NODE_ENV !== \"production\") diagnostics.VUE_ROUTER_R0011({ cause: err });\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst reactiveRoute = {};\n\t\t\tfor (const key in START_LOCATION_NORMALIZED) Object.defineProperty(reactiveRoute, key, {\n\t\t\t\tget: () => currentRoute.value[key],\n\t\t\t\tenumerable: true\n\t\t\t});\n\t\t\tapp.provide(routerKey, router);\n\t\t\tapp.provide(routeLocationKey, shallowReactive(reactiveRoute));\n\t\t\tapp.provide(routerViewLocationKey, currentRoute);\n\t\t\tconst unmountApp = app.unmount;\n\t\t\tinstalledApps.add(app);\n\t\t\tapp.unmount = function() {\n\t\t\t\tinstalledApps.delete(app);\n\t\t\t\tif (installedApps.size < 1) {\n\t\t\t\t\tpendingLocation = START_LOCATION_NORMALIZED;\n\t\t\t\t\tremoveHistoryListener && removeHistoryListener();\n\t\t\t\t\tremoveHistoryListener = null;\n\t\t\t\t\tcurrentRoute.value = START_LOCATION_NORMALIZED;\n\t\t\t\t\tstarted = false;\n\t\t\t\t\tready = false;\n\t\t\t\t}\n\t\t\t\tunmountApp();\n\t\t\t};\n\t\t\tif ((process.env.NODE_ENV !== \"production\" || __VUE_PROD_DEVTOOLS__) && isBrowser && true) addDevtools(app, router, matcher);\n\t\t}\n\t};\n\tfunction runGuardQueue(guards) {\n\t\treturn guards.reduce((promise, guard) => promise.then(() => runWithContext(guard)), Promise.resolve());\n\t}\n\treturn router;\n}\n//#endregion\nexport { NavigationFailureType, RouterLink, RouterView, START_LOCATION_NORMALIZED as START_LOCATION, createMemoryHistory, createRouter, createRouterMatcher, createWebHashHistory, createWebHistory, isNavigationFailure, loadRouteLocation, matchedRouteKey, onBeforeRouteLeave, onBeforeRouteUpdate, parseQuery, routeLocationKey, routerKey, routerViewLocationKey, stringifyQuery, useLink, useRoute, useRouter, viewDepthKey };\n","<script setup lang=\"ts\" generic=\"K extends string\">\nimport { RouterLink } from 'vue-router'\nimport type { Component } from 'vue'\n\nimport { tapFeedback } from '../utils/haptics'\n\nexport interface TabItem<K extends string> {\n /** Identity, compared against `active`. */\n key: K\n /** Router destination. */\n to: string\n /** Text under the icon. Already translated. */\n label: string\n icon: Component\n}\n\n/**\n * The floating bottom bar.\n *\n * Items and the active key are props: the package has no opinion about how an\n * app names its screens, and reading `route.meta` here would force one.\n */\nconst {\n items,\n active,\n label = '',\n} = defineProps<{\n items: readonly TabItem<K>[]\n /** Which item is current. Usually from `route.meta`. */\n active?: K | undefined\n /** Accessible name for the navigation landmark. */\n label?: string\n}>()\n</script>\n\n<template>\n <header class=\"tab-bar\">\n <nav class=\"tab-bar-inner\" :aria-label=\"label || undefined\">\n <RouterLink\n v-for=\"item in items\"\n :key=\"item.key\"\n :to=\"item.to\"\n class=\"tab-link\"\n :class=\"{ 'is-active': item.key === active }\"\n :aria-current=\"item.key === active ? 'page' : undefined\"\n @click=\"tapFeedback()\"\n >\n <span class=\"tab-icon-slot\">\n <component :is=\"item.icon\" class=\"tab-icon\" />\n </span>\n <span class=\"tab-label\">{{ item.label }}</span>\n </RouterLink>\n </nav>\n </header>\n</template>\n\n<style scoped>\n@reference \"../styles/_reference.css\";\n\n/* absolute, not fixed: the bar hangs inside the app shell. Fixed would pin it\n to the browser window, which on a desktop is nowhere near the app. */\n.tab-bar {\n @apply absolute left-1/2 z-40 w-full max-w-[360px] -translate-x-1/2 px-4;\n bottom: calc(1rem + env(safe-area-inset-bottom, 0px));\n}\n\n.tab-bar-inner {\n @apply border-hair bg-surface/85 flex items-center justify-between gap-1 border p-1.5 shadow-lg backdrop-blur-md;\n border-radius: var(--radius-shell);\n}\n\n.tab-link {\n @apply text-ink-soft flex min-h-[52px] flex-1 cursor-pointer flex-col items-center justify-center gap-1 py-1.5;\n border-radius: calc(var(--radius-shell) - 6px);\n /* Only the icon reacts to a press. Scaling the whole link drags the label and\n the pill with it, which reads as the bar wobbling. */\n transition: color 200ms ease;\n}\n\n.tab-link:hover {\n @apply text-ink;\n}\n\n/* The pill sits behind the icon rather than the link, so the active tab grows a\n marker instead of the row changing shape. */\n.tab-icon-slot {\n @apply flex h-7 w-12 items-center justify-center rounded-full transition-all duration-200 ease-out;\n}\n\n.tab-link:active .tab-icon-slot {\n transform: scale(0.88);\n}\n\n.is-active {\n @apply text-primary;\n}\n\n.is-active .tab-icon-slot {\n @apply bg-muted;\n}\n\n.tab-icon {\n @apply size-[18px] stroke-2 transition-transform duration-200;\n}\n\n.is-active .tab-icon {\n @apply scale-110 stroke-[2.5px];\n}\n\n.tab-label {\n @apply text-[10px] leading-none font-medium;\n}\n\n.is-active .tab-label {\n @apply font-semibold;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .tab-icon-slot,\n .tab-icon {\n transition: none;\n }\n .tab-link:active .tab-icon-slot {\n transform: none;\n }\n}\n</style>\n","<script setup lang=\"ts\" generic=\"K extends string\">\nimport { RouterLink } from 'vue-router'\nimport type { Component } from 'vue'\n\nimport { tapFeedback } from '../utils/haptics'\n\nexport interface TabItem<K extends string> {\n /** Identity, compared against `active`. */\n key: K\n /** Router destination. */\n to: string\n /** Text under the icon. Already translated. */\n label: string\n icon: Component\n}\n\n/**\n * The floating bottom bar.\n *\n * Items and the active key are props: the package has no opinion about how an\n * app names its screens, and reading `route.meta` here would force one.\n */\nconst {\n items,\n active,\n label = '',\n} = defineProps<{\n items: readonly TabItem<K>[]\n /** Which item is current. Usually from `route.meta`. */\n active?: K | undefined\n /** Accessible name for the navigation landmark. */\n label?: string\n}>()\n</script>\n\n<template>\n <header class=\"tab-bar\">\n <nav class=\"tab-bar-inner\" :aria-label=\"label || undefined\">\n <RouterLink\n v-for=\"item in items\"\n :key=\"item.key\"\n :to=\"item.to\"\n class=\"tab-link\"\n :class=\"{ 'is-active': item.key === active }\"\n :aria-current=\"item.key === active ? 'page' : undefined\"\n @click=\"tapFeedback()\"\n >\n <span class=\"tab-icon-slot\">\n <component :is=\"item.icon\" class=\"tab-icon\" />\n </span>\n <span class=\"tab-label\">{{ item.label }}</span>\n </RouterLink>\n </nav>\n </header>\n</template>\n\n<style scoped>\n@reference \"../styles/_reference.css\";\n\n/* absolute, not fixed: the bar hangs inside the app shell. Fixed would pin it\n to the browser window, which on a desktop is nowhere near the app. */\n.tab-bar {\n @apply absolute left-1/2 z-40 w-full max-w-[360px] -translate-x-1/2 px-4;\n bottom: calc(1rem + env(safe-area-inset-bottom, 0px));\n}\n\n.tab-bar-inner {\n @apply border-hair bg-surface/85 flex items-center justify-between gap-1 border p-1.5 shadow-lg backdrop-blur-md;\n border-radius: var(--radius-shell);\n}\n\n.tab-link {\n @apply text-ink-soft flex min-h-[52px] flex-1 cursor-pointer flex-col items-center justify-center gap-1 py-1.5;\n border-radius: calc(var(--radius-shell) - 6px);\n /* Only the icon reacts to a press. Scaling the whole link drags the label and\n the pill with it, which reads as the bar wobbling. */\n transition: color 200ms ease;\n}\n\n.tab-link:hover {\n @apply text-ink;\n}\n\n/* The pill sits behind the icon rather than the link, so the active tab grows a\n marker instead of the row changing shape. */\n.tab-icon-slot {\n @apply flex h-7 w-12 items-center justify-center rounded-full transition-all duration-200 ease-out;\n}\n\n.tab-link:active .tab-icon-slot {\n transform: scale(0.88);\n}\n\n.is-active {\n @apply text-primary;\n}\n\n.is-active .tab-icon-slot {\n @apply bg-muted;\n}\n\n.tab-icon {\n @apply size-[18px] stroke-2 transition-transform duration-200;\n}\n\n.is-active .tab-icon {\n @apply scale-110 stroke-[2.5px];\n}\n\n.tab-label {\n @apply text-[10px] leading-none font-medium;\n}\n\n.is-active .tab-label {\n @apply font-semibold;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .tab-icon-slot,\n .tab-icon {\n transition: none;\n }\n .tab-link:active .tab-icon-slot {\n transform: none;\n }\n}\n</style>\n","import { computed, ref, watchEffect } from 'vue'\nimport { createI18n } from 'vue-i18n'\n\nimport { setFormatLocale } from '../utils/format'\n\n/** What the user picked. `system` re-reads the browser on every launch. */\nexport type LocalePreference<L extends string> = 'system' | L\n\nexport interface I18nRuntimeOptions<L extends string, Schema> {\n /** Languages the app ships, in no particular order. */\n locales: readonly L[]\n /** The one that is always loaded, and the fallback when a load fails. */\n fallback: L\n /**\n * BCP 47 tag per locale, for `Intl`.\n *\n * Message lookup only needs the base language, but dates and numbers need a\n * region to be right — `zh` alone would leave the formatter to guess.\n */\n intlTags: Record<L, string>\n /** The fallback's messages, bundled. */\n messages: Schema\n /** The rest, fetched only when they are the one in use. */\n loaders?: Partial<Record<L, () => Promise<{ default: Schema }>>>\n /** Where the choice is stored. Namespace it per app. */\n storageKey?: string\n}\n\n/**\n * Builds an i18n runtime around an app's own catalogue.\n *\n * A factory rather than a module singleton because the schema is the app's:\n * typing every locale as `typeof en` is what makes a missing key a build error,\n * and this package has no `en` of its own to type against.\n *\n * @example\n * ```ts\n * export const { i18n, t, useLocalePreference, loadActiveLocale } =\n * createI18nRuntime({\n * locales: ['en', 'tr'] as const,\n * fallback: 'en',\n * intlTags: { en: 'en-GB', tr: 'tr-TR' },\n * messages: en,\n * loaders: { tr: () => import('./locales/tr') },\n * storageKey: 'myapp-locale',\n * })\n * ```\n */\nexport function createI18nRuntime<L extends string, Schema extends Record<string, unknown>>(\n options: I18nRuntimeOptions<L, Schema>,\n) {\n const { locales, fallback, intlTags, messages, storageKey = 'rei-locale' } = options\n\n // Typed rather than defaulted to `{}`, which erases the locale keys and makes\n // `loaders[locale]` an index into an empty object.\n const loaders: Partial<Record<L, () => Promise<{ default: Schema }>>> = options.loaders ?? {}\n\n function isSupported(value: string): value is L {\n return (locales as readonly string[]).includes(value)\n }\n\n /**\n * First browser language the app can actually speak.\n *\n * `navigator.languages` is ordered by the user's own preference, so the first\n * match is the best one — not simply the first entry.\n */\n function detectSystemLocale(): L {\n for (const tag of navigator.languages ?? [navigator.language]) {\n const base = tag.split('-')[0]?.toLowerCase()\n if (base && isSupported(base)) return base\n }\n\n return fallback\n }\n\n function readStored(): LocalePreference<L> {\n try {\n const stored = localStorage.getItem(storageKey)\n if (stored === 'system' || (stored && isSupported(stored))) return stored\n } catch {\n // Storage blocked; fall through to the system language.\n }\n\n return 'system'\n }\n\n const preference = ref<LocalePreference<L>>(readStored())\n\n const activeLocale = computed<L>(() =>\n preference.value === 'system' ? detectSystemLocale() : (preference.value as L),\n )\n\n const intlLocale = computed(() => intlTags[activeLocale.value])\n\n // Only the fallback at construction; the rest arrive through\n // setLocaleMessage.\n const initial = { [fallback]: messages } as Record<string, Record<string, unknown>>\n\n const i18n = createI18n({\n legacy: false,\n locale: activeLocale.value as string,\n fallbackLocale: fallback as string,\n messages: initial,\n } as unknown as Parameters<typeof createI18n>[0])\n\n /**\n * A narrow view of the instance.\n *\n * vue-i18n infers its own generics from the messages it is handed, which\n * fights a runtime that is generic over the app's schema. Casting once, here,\n * keeps that fight out of every call site — and the surface below is the\n * whole of what this runtime uses.\n */\n const core = i18n.global as unknown as {\n locale: { value: string }\n setLocaleMessage: (locale: string, messages: Schema) => void\n t: (key: string, named?: Record<string, unknown>) => string\n }\n\n const loaded = new Set<L>([fallback])\n\n /**\n * Makes sure a locale's messages are in place before it becomes active.\n *\n * Awaited rather than fired and forgotten: setting the locale first paints one\n * frame of the fallback at every other user, which is the flash a fallback\n * exists to prevent, not cause.\n */\n async function ensureMessages(locale: L): Promise<void> {\n if (loaded.has(locale)) return\n\n const load = loaders[locale]\n if (!load) return\n\n try {\n const module = await load()\n core.setLocaleMessage(locale, module.default)\n loaded.add(locale)\n } catch {\n // Offline, or a stale chunk after a deploy. The fallback is loaded and\n // will carry the UI, which beats a blank screen.\n }\n }\n\n /** Loads whatever the stored preference resolves to. Call before mounting. */\n function loadActiveLocale(): Promise<void> {\n return ensureMessages(activeLocale.value)\n }\n\n // Keeps vue-i18n, `Intl` and the document in step. `lang` matters beyond\n // tidiness: it drives hyphenation, font fallback and screen readers.\n watchEffect(() => {\n core.locale.value = activeLocale.value\n setFormatLocale(intlLocale.value)\n document.documentElement.lang = activeLocale.value\n })\n\n /** Read and write the language preference. */\n function useLocalePreference() {\n return computed<LocalePreference<L>>({\n get: () => preference.value,\n set: (next) => {\n const resolved = next === 'system' ? detectSystemLocale() : (next as L)\n\n // Messages first, then the switch — the other order shows the fallback\n // for a frame on the way to the language the user just picked.\n void ensureMessages(resolved).then(() => {\n preference.value = next\n })\n\n try {\n localStorage.setItem(storageKey, next)\n } catch {\n // Storage blocked; the choice lasts for this session only.\n }\n },\n })\n }\n\n return {\n i18n,\n /** `t` for code outside a component. Tracks the locale inside a computed. */\n t: core.t,\n activeLocale,\n intlLocale,\n ensureMessages,\n loadActiveLocale,\n useLocalePreference,\n }\n}\n","/**\n * rei-kit — the layer every app starts from.\n *\n * Everything here is free of any backend, router or i18n choice. Components\n * take strings rather than calling a translator, and utilities take the clock\n * rather than reading it, so nothing in this package can force a decision on\n * the app that installs it.\n *\n * @see https://github.com/ramazandogna/rei-kit\n */\n\nexport const VERSION = '0.0.0'\n\n// ── Utilities ──────────────────────────────────────────────────────────────\nexport {\n addDays,\n eachDayOfYear,\n fromDateKey,\n lastNDays,\n leadingBlanks,\n startOfWeek,\n toDateKey,\n todayKey,\n} from './utils/date'\nexport type { WeekStart } from './utils/date'\n\nexport { formatDate, setFormatLocale } from './utils/format'\nexport { relativeDayLabel } from './utils/day-label'\nexport type { DayLabels } from './utils/day-label'\n\nexport { downloadJson } from './utils/download'\nexport { safeRedirect } from './utils/redirect'\nexport type { QueryValue } from './utils/redirect'\nexport { tapFeedback } from './utils/haptics'\nexport { isApplePortable, isInstalled, needsIosInstall } from './utils/platform'\n\nexport { AppError, registerErrorMapper, toAppError } from './utils/app-error'\nexport type { AppErrorKind, ErrorMapper } from './utils/app-error'\n\n// ── Composables ────────────────────────────────────────────────────────────\nexport {\n applyTheme,\n isThemePreference,\n readStoredTheme,\n setThemeStorageKey,\n useTheme,\n} from './composables/use-theme'\nexport type { ThemePreference } from './composables/use-theme'\n\nexport { useToday } from './composables/use-today'\nexport { useOnline } from './composables/use-online'\nexport { useDebouncedCallback } from './composables/use-debounced-callback'\nexport { useDragScroll } from './composables/use-drag-scroll'\nexport { useVisualViewport } from './composables/use-visual-viewport'\nexport type { VisualViewportRect } from './composables/use-visual-viewport'\n\n// ── Components ─────────────────────────────────────────────────────────────\nexport { default as BaseButton } from './components/BaseButton.vue'\nexport { default as BaseInput } from './components/BaseInput.vue'\nexport { default as BaseSheet } from './components/BaseSheet.vue'\nexport { default as EmptyState } from './components/EmptyState.vue'\nexport { default as PageHeader } from './components/PageHeader.vue'\nexport { default as SectionHeading } from './components/SectionHeading.vue'\nexport { default as SegmentedControl } from './components/SegmentedControl.vue'\nexport { default as SettingsGroup } from './components/SettingsGroup.vue'\nexport { default as SettingsRow } from './components/SettingsRow.vue'\nexport { default as SkeletonList } from './components/SkeletonList.vue'\nexport { default as StatCard } from './components/StatCard.vue'\nexport { default as ToneDot } from './components/ToneDot.vue'\nexport type { Tone } from './components/SectionHeading.vue'\nexport { default as LocaleLinks } from './components/LocaleLinks.vue'\nexport { default as GoogleButton } from './components/GoogleButton.vue'\nexport { default as TabBar } from './components/TabBar.vue'\nexport type { TabItem } from './components/TabBar.vue'\n\n// ── i18n ───────────────────────────────────────────────────────────────────\nexport { createI18nRuntime } from './i18n/runtime'\nexport type { I18nRuntimeOptions, LocalePreference } from './i18n/runtime'\n"],"x_google_ignoreList":[41,42,43,44],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,SAAgB,UAAU,MAAoB;CAK5C,OAAO,GAJM,OAAO,KAAK,YAAY,CAAC,CAAC,CAAC,SAAS,GAAG,GAI1C,EAAK,GAHD,OAAO,KAAK,SAAS,IAAI,CAAC,CAAC,CAAC,SAAS,GAAG,GAGpC,EAAM,GAFZ,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,GAAG,GAEpB;AAC7B;;AAGA,SAAgB,WAAmB;CACjC,OAAO,0BAAU,IAAI,KAAK,CAAC;AAC7B;;;;;;;;;;;;;;AAeA,SAAgB,YAAY,KAAmB;CAC7C,MAAM,CAAC,MAAM,OAAO,OAAO,IAAI,MAAM,GAAG,CAAC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