From 5252dea2ba6436cbd470da22fa4b29cce2c2534f Mon Sep 17 00:00:00 2001 From: jxxghp Date: Tue, 3 Jun 2025 10:44:20 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=8E=BB=E9=99=A4=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dist/assets/date--mM7W7--.js | 3498 ------- .../runtime-core.esm-bundler-BQhfUSSX.js | 8546 ----------------- plugins.v2/clashruleprovider/dist/index.html | 34 - 3 files changed, 12078 deletions(-) delete mode 100644 plugins.v2/clashruleprovider/dist/assets/date--mM7W7--.js delete mode 100644 plugins.v2/clashruleprovider/dist/assets/runtime-core.esm-bundler-BQhfUSSX.js delete mode 100644 plugins.v2/clashruleprovider/dist/index.html diff --git a/plugins.v2/clashruleprovider/dist/assets/date--mM7W7--.js b/plugins.v2/clashruleprovider/dist/assets/date--mM7W7--.js deleted file mode 100644 index 51af79e..0000000 --- a/plugins.v2/clashruleprovider/dist/assets/date--mM7W7--.js +++ /dev/null @@ -1,3498 +0,0 @@ -import { importShared } from './__federation_fn_import-JrT3xvdd.js'; - -// Types -// eslint-disable-line vue/prefer-import-from-vue - -/** - * Creates a factory function for props definitions. - * This is used to define props in a composable then override - * default values in an implementing component. - * - * @example Simplified signature - * (props: Props) => (defaults?: Record) => Props - * - * @example Usage - * const makeProps = propsFactory({ - * foo: String, - * }) - * - * defineComponent({ - * props: { - * ...makeProps({ - * foo: 'a', - * }), - * }, - * setup (props) { - * // would be "string | undefined", now "string" because a default has been provided - * props.foo - * }, - * } - */ - -function propsFactory(props, source) { - return defaults => { - return Object.keys(props).reduce((obj, prop) => { - const isObjectDefinition = typeof props[prop] === 'object' && props[prop] != null && !Array.isArray(props[prop]); - const definition = isObjectDefinition ? props[prop] : { - type: props[prop] - }; - if (defaults && prop in defaults) { - obj[prop] = { - ...definition, - default: defaults[prop] - }; - } else { - obj[prop] = definition; - } - if (source && !obj[prop].source) { - obj[prop].source = source; - } - return obj; - }, {}); - }; -} - -/** - * Like `Partial` but doesn't care what the value is - */ - -// Copied from Vue - -const IN_BROWSER = typeof window !== 'undefined'; -const SUPPORTS_INTERSECTION = IN_BROWSER && 'IntersectionObserver' in window; -const SUPPORTS_TOUCH = IN_BROWSER && ('ontouchstart' in window || window.navigator.maxTouchPoints > 0); -const SUPPORTS_EYE_DROPPER = IN_BROWSER && 'EyeDropper' in window; - -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } -function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; } -function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); } -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } -// Utilities -const {capitalize,Comment,computed: computed$8,Fragment,isVNode,reactive: reactive$3,readonly: readonly$1,shallowRef: shallowRef$4,toRefs: toRefs$1,unref: unref$2,watchEffect: watchEffect$3} = await importShared('vue'); -function getNestedValue(obj, path, fallback) { - const last = path.length - 1; - if (last < 0) return obj === undefined ? fallback : obj; - for (let i = 0; i < last; i++) { - if (obj == null) { - return fallback; - } - obj = obj[path[i]]; - } - if (obj == null) return fallback; - return obj[path[last]] === undefined ? fallback : obj[path[last]]; -} -function deepEqual(a, b) { - if (a === b) return true; - if (a instanceof Date && b instanceof Date && a.getTime() !== b.getTime()) { - // If the values are Date, compare them as timestamps - return false; - } - if (a !== Object(a) || b !== Object(b)) { - // If the values aren't objects, they were already checked for equality - return false; - } - const props = Object.keys(a); - if (props.length !== Object.keys(b).length) { - // Different number of props, don't bother to check - return false; - } - return props.every(p => deepEqual(a[p], b[p])); -} -function getObjectValueByPath(obj, path, fallback) { - // credit: http://stackoverflow.com/questions/6491463/accessing-nested-javascript-objects-with-string-key#comment55278413_6491621 - if (obj == null || !path || typeof path !== 'string') return fallback; - if (obj[path] !== undefined) return obj[path]; - path = path.replace(/\[(\w+)\]/g, '.$1'); // convert indexes to properties - path = path.replace(/^\./, ''); // strip a leading dot - return getNestedValue(obj, path.split('.'), fallback); -} -function getPropertyFromItem(item, property, fallback) { - if (property === true) return item === undefined ? fallback : item; - if (property == null || typeof property === 'boolean') return fallback; - if (item !== Object(item)) { - if (typeof property !== 'function') return fallback; - const value = property(item, fallback); - return typeof value === 'undefined' ? fallback : value; - } - if (typeof property === 'string') return getObjectValueByPath(item, property, fallback); - if (Array.isArray(property)) return getNestedValue(item, property, fallback); - if (typeof property !== 'function') return fallback; - const value = property(item, fallback); - return typeof value === 'undefined' ? fallback : value; -} -function createRange(length) { - let start = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - return Array.from({ - length - }, (v, k) => start + k); -} -function convertToUnit(str) { - let unit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'px'; - if (str == null || str === '') { - return undefined; - } else if (isNaN(+str)) { - return String(str); - } else if (!isFinite(+str)) { - return undefined; - } else { - return `${Number(str)}${unit}`; - } -} -function isObject(obj) { - return obj !== null && typeof obj === 'object' && !Array.isArray(obj); -} -function isPlainObject(obj) { - let proto; - return obj !== null && typeof obj === 'object' && ((proto = Object.getPrototypeOf(obj)) === Object.prototype || proto === null); -} -function refElement(obj) { - if (obj && '$el' in obj) { - const el = obj.$el; - if (el?.nodeType === Node.TEXT_NODE) { - // Multi-root component, use the first element - return el.nextElementSibling; - } - return el; - } - return obj; -} - -// KeyboardEvent.keyCode aliases -const keyCodes = Object.freeze({ - enter: 13, - tab: 9, - delete: 46, - esc: 27, - space: 32, - up: 38, - down: 40, - left: 37, - right: 39, - end: 35, - home: 36, - del: 46, - backspace: 8, - insert: 45, - pageup: 33, - pagedown: 34, - shift: 16 -}); -const keyValues = Object.freeze({ - enter: 'Enter', - tab: 'Tab', - delete: 'Delete', - esc: 'Escape', - space: 'Space', - up: 'ArrowUp', - down: 'ArrowDown', - left: 'ArrowLeft', - right: 'ArrowRight', - end: 'End', - home: 'Home', - del: 'Delete', - backspace: 'Backspace', - insert: 'Insert', - pageup: 'PageUp', - pagedown: 'PageDown', - shift: 'Shift' -}); -function keys(o) { - return Object.keys(o); -} -function has(obj, key) { - return key.every(k => obj.hasOwnProperty(k)); -} -// Array of keys -function pick(obj, paths) { - const found = {}; - const keys = new Set(Object.keys(obj)); - for (const path of paths) { - if (keys.has(path)) { - found[path] = obj[path]; - } - } - return found; -} - -// Array of keys - -// Array of keys or RegExp to test keys against - -function pickWithRest(obj, paths, exclude) { - const found = Object.create(null); - const rest = Object.create(null); - for (const key in obj) { - if (paths.some(path => path instanceof RegExp ? path.test(key) : path === key) && true) { - found[key] = obj[key]; - } else { - rest[key] = obj[key]; - } - } - return [found, rest]; -} -function omit(obj, exclude) { - const clone = { - ...obj - }; - exclude.forEach(prop => delete clone[prop]); - return clone; -} -function only(obj, include) { - const clone = {}; - include.forEach(prop => clone[prop] = obj[prop]); - return clone; -} -const onRE = /^on[^a-z]/; -const isOn = key => onRE.test(key); -const bubblingEvents = ['onAfterscriptexecute', 'onAnimationcancel', 'onAnimationend', 'onAnimationiteration', 'onAnimationstart', 'onAuxclick', 'onBeforeinput', 'onBeforescriptexecute', 'onChange', 'onClick', 'onCompositionend', 'onCompositionstart', 'onCompositionupdate', 'onContextmenu', 'onCopy', 'onCut', 'onDblclick', 'onFocusin', 'onFocusout', 'onFullscreenchange', 'onFullscreenerror', 'onGesturechange', 'onGestureend', 'onGesturestart', 'onGotpointercapture', 'onInput', 'onKeydown', 'onKeypress', 'onKeyup', 'onLostpointercapture', 'onMousedown', 'onMousemove', 'onMouseout', 'onMouseover', 'onMouseup', 'onMousewheel', 'onPaste', 'onPointercancel', 'onPointerdown', 'onPointerenter', 'onPointerleave', 'onPointermove', 'onPointerout', 'onPointerover', 'onPointerup', 'onReset', 'onSelect', 'onSubmit', 'onTouchcancel', 'onTouchend', 'onTouchmove', 'onTouchstart', 'onTransitioncancel', 'onTransitionend', 'onTransitionrun', 'onTransitionstart', 'onWheel']; -const compositionIgnoreKeys = ['ArrowUp', 'ArrowDown', 'ArrowRight', 'ArrowLeft', 'Enter', 'Escape', 'Tab', ' ']; -function isComposingIgnoreKey(e) { - return e.isComposing && compositionIgnoreKeys.includes(e.key); -} - -/** - * Filter attributes that should be applied to - * the root element of an input component. Remaining - * attributes should be passed to the element inside. - */ -function filterInputAttrs(attrs) { - const [events, props] = pickWithRest(attrs, [onRE]); - const inputEvents = omit(events, bubblingEvents); - const [rootAttrs, inputAttrs] = pickWithRest(props, ['class', 'style', 'id', /^data-/]); - Object.assign(rootAttrs, events); - Object.assign(inputAttrs, inputEvents); - return [rootAttrs, inputAttrs]; -} -function wrapInArray(v) { - return v == null ? [] : Array.isArray(v) ? v : [v]; -} -function debounce(fn, delay) { - let timeoutId = 0; - const wrap = function () { - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - clearTimeout(timeoutId); - timeoutId = setTimeout(() => fn(...args), unref$2(delay)); - }; - wrap.clear = () => { - clearTimeout(timeoutId); - }; - wrap.immediate = fn; - return wrap; -} -function clamp(value) { - let min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - let max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; - return Math.max(min, Math.min(max, value)); -} -function getDecimals(value) { - const trimmedStr = value.toString().trim(); - return trimmedStr.includes('.') ? trimmedStr.length - trimmedStr.indexOf('.') - 1 : 0; -} -function padEnd(str, length) { - let char = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '0'; - return str + char.repeat(Math.max(0, length - str.length)); -} -function padStart(str, length) { - let char = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '0'; - return char.repeat(Math.max(0, length - str.length)) + str; -} -function chunk(str) { - let size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; - const chunked = []; - let index = 0; - while (index < str.length) { - chunked.push(str.substr(index, size)); - index += size; - } - return chunked; -} -function humanReadableFileSize(bytes) { - let base = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1000; - if (bytes < base) { - return `${bytes} B`; - } - const prefix = base === 1024 ? ['Ki', 'Mi', 'Gi'] : ['k', 'M', 'G']; - let unit = -1; - while (Math.abs(bytes) >= base && unit < prefix.length - 1) { - bytes /= base; - ++unit; - } - return `${bytes.toFixed(1)} ${prefix[unit]}B`; -} -function mergeDeep() { - let source = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - let target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - let arrayFn = arguments.length > 2 ? arguments[2] : undefined; - const out = {}; - for (const key in source) { - out[key] = source[key]; - } - for (const key in target) { - const sourceProperty = source[key]; - const targetProperty = target[key]; - - // Only continue deep merging if - // both properties are plain objects - if (isPlainObject(sourceProperty) && isPlainObject(targetProperty)) { - out[key] = mergeDeep(sourceProperty, targetProperty, arrayFn); - continue; - } - if (arrayFn && Array.isArray(sourceProperty) && Array.isArray(targetProperty)) { - out[key] = arrayFn(sourceProperty, targetProperty); - continue; - } - out[key] = targetProperty; - } - return out; -} -function flattenFragments(nodes) { - return nodes.map(node => { - if (node.type === Fragment) { - return flattenFragments(node.children); - } else { - return node; - } - }).flat(); -} -function toKebabCase() { - let str = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; - if (toKebabCase.cache.has(str)) return toKebabCase.cache.get(str); - const kebab = str.replace(/[^a-z]/gi, '-').replace(/\B([A-Z])/g, '-$1').toLowerCase(); - toKebabCase.cache.set(str, kebab); - return kebab; -} -toKebabCase.cache = new Map(); -function findChildrenWithProvide(key, vnode) { - if (!vnode || typeof vnode !== 'object') return []; - if (Array.isArray(vnode)) { - return vnode.map(child => findChildrenWithProvide(key, child)).flat(1); - } else if (vnode.suspense) { - return findChildrenWithProvide(key, vnode.ssContent); - } else if (Array.isArray(vnode.children)) { - return vnode.children.map(child => findChildrenWithProvide(key, child)).flat(1); - } else if (vnode.component) { - if (Object.getOwnPropertySymbols(vnode.component.provides).includes(key)) { - return [vnode.component]; - } else if (vnode.component.subTree) { - return findChildrenWithProvide(key, vnode.component.subTree).flat(1); - } - } - return []; -} -var _arr = /*#__PURE__*/new WeakMap(); -var _pointer = /*#__PURE__*/new WeakMap(); -class CircularBuffer { - constructor(size) { - _classPrivateFieldInitSpec(this, _arr, []); - _classPrivateFieldInitSpec(this, _pointer, 0); - this.size = size; - } - push(val) { - _classPrivateFieldGet(_arr, this)[_classPrivateFieldGet(_pointer, this)] = val; - _classPrivateFieldSet(_pointer, this, (_classPrivateFieldGet(_pointer, this) + 1) % this.size); - } - values() { - return _classPrivateFieldGet(_arr, this).slice(_classPrivateFieldGet(_pointer, this)).concat(_classPrivateFieldGet(_arr, this).slice(0, _classPrivateFieldGet(_pointer, this))); - } -} -function getEventCoordinates(e) { - if ('touches' in e) { - return { - clientX: e.touches[0].clientX, - clientY: e.touches[0].clientY - }; - } - return { - clientX: e.clientX, - clientY: e.clientY - }; -} - -// Only allow a single return type - -/** - * Convert a computed ref to a record of refs. - * The getter function must always return an object with the same keys. - */ - -function destructComputed(getter) { - const refs = reactive$3({}); - const base = computed$8(getter); - watchEffect$3(() => { - for (const key in base.value) { - refs[key] = base.value[key]; - } - }, { - flush: 'sync' - }); - return toRefs$1(refs); -} - -/** Array.includes but value can be any type */ -function includes(arr, val) { - return arr.includes(val); -} -function eventName(propName) { - return propName[2].toLowerCase() + propName.slice(3); -} -const EventProp = () => [Function, Array]; -function hasEvent(props, name) { - name = 'on' + capitalize(name); - return !!(props[name] || props[`${name}Once`] || props[`${name}Capture`] || props[`${name}OnceCapture`] || props[`${name}CaptureOnce`]); -} -function callEvent(handler) { - for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { - args[_key2 - 1] = arguments[_key2]; - } - if (Array.isArray(handler)) { - for (const h of handler) { - h(...args); - } - } else if (typeof handler === 'function') { - handler(...args); - } -} -function focusableChildren(el) { - let filterByTabIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - const targets = ['button', '[href]', 'input:not([type="hidden"])', 'select', 'textarea', '[tabindex]'].map(s => `${s}${filterByTabIndex ? ':not([tabindex="-1"])' : ''}:not([disabled])`).join(', '); - return [...el.querySelectorAll(targets)]; -} -function getNextElement(elements, location, condition) { - let _el; - let idx = elements.indexOf(document.activeElement); - const inc = location === 'next' ? 1 : -1; - do { - idx += inc; - _el = elements[idx]; - } while ((!_el || _el.offsetParent == null || !(condition?.(_el) ?? true)) && idx < elements.length && idx >= 0); - return _el; -} -function focusChild(el, location) { - const focusable = focusableChildren(el); - if (!location) { - if (el === document.activeElement || !el.contains(document.activeElement)) { - focusable[0]?.focus(); - } - } else if (location === 'first') { - focusable[0]?.focus(); - } else if (location === 'last') { - focusable.at(-1)?.focus(); - } else if (typeof location === 'number') { - focusable[location]?.focus(); - } else { - const _el = getNextElement(focusable, location); - if (_el) _el.focus();else focusChild(el, location === 'next' ? 'first' : 'last'); - } -} -function isEmpty(val) { - return val === null || val === undefined || typeof val === 'string' && val.trim() === ''; -} -function noop() {} - -/** Returns null if the selector is not supported or we can't check */ -function matchesSelector(el, selector) { - const supportsSelector = IN_BROWSER && typeof CSS !== 'undefined' && typeof CSS.supports !== 'undefined' && CSS.supports(`selector(${selector})`); - if (!supportsSelector) return null; - try { - return !!el && el.matches(selector); - } catch (err) { - return null; - } -} -function ensureValidVNode(vnodes) { - return vnodes.some(child => { - if (!isVNode(child)) return true; - if (child.type === Comment) return false; - return child.type !== Fragment || ensureValidVNode(child.children); - }) ? vnodes : null; -} -function defer(timeout, cb) { - if (!IN_BROWSER || timeout === 0) { - cb(); - return () => {}; - } - const timeoutId = window.setTimeout(cb, timeout); - return () => window.clearTimeout(timeoutId); -} -function isClickInsideElement(event, targetDiv) { - const mouseX = event.clientX; - const mouseY = event.clientY; - const divRect = targetDiv.getBoundingClientRect(); - const divLeft = divRect.left; - const divTop = divRect.top; - const divRight = divRect.right; - const divBottom = divRect.bottom; - return mouseX >= divLeft && mouseX <= divRight && mouseY >= divTop && mouseY <= divBottom; -} -function templateRef() { - const el = shallowRef$4(); - const fn = target => { - el.value = target; - }; - Object.defineProperty(fn, 'value', { - enumerable: true, - get: () => el.value, - set: val => el.value = val - }); - Object.defineProperty(fn, 'el', { - enumerable: true, - get: () => refElement(el.value) - }); - return fn; -} -function checkPrintable(e) { - const isPrintableChar = e.key.length === 1; - const noModifier = !e.ctrlKey && !e.metaKey && !e.altKey; - return isPrintableChar && noModifier; -} - -/** - * WCAG 3.0 APCA perceptual contrast algorithm from https://github.com/Myndex/SAPC-APCA - * @licence https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document - * @see https://www.w3.org/WAI/GL/task-forces/silver/wiki/Visual_Contrast_of_Text_Subgroup - */ -// Types - -// MAGICAL NUMBERS - -// sRGB Conversion to Relative Luminance (Y) - -// Transfer Curve (aka "Gamma") for sRGB linearization -// Simple power curve vs piecewise described in docs -// Essentially, 2.4 best models actual display -// characteristics in combination with the total method -const mainTRC = 2.4; -const Rco = 0.2126729; // sRGB Red Coefficient (from matrix) -const Gco = 0.7151522; // sRGB Green Coefficient (from matrix) -const Bco = 0.0721750; // sRGB Blue Coefficient (from matrix) - -// For Finding Raw SAPC Contrast from Relative Luminance (Y) - -// Constants for SAPC Power Curve Exponents -// One pair for normal text, and one for reverse -// These are the "beating heart" of SAPC -const normBG = 0.55; -const normTXT = 0.58; -const revTXT = 0.57; -const revBG = 0.62; - -// For Clamping and Scaling Values - -const blkThrs = 0.03; // Level that triggers the soft black clamp -const blkClmp = 1.45; // Exponent for the soft black clamp curve -const deltaYmin = 0.0005; // Lint trap -const scaleBoW = 1.25; // Scaling for dark text on light -const scaleWoB = 1.25; // Scaling for light text on dark -const loConThresh = 0.078; // Threshold for new simple offset scale -const loConFactor = 12.82051282051282; // = 1/0.078, -const loConOffset = 0.06; // The simple offset -const loClip = 0.001; // Output clip (lint trap #2) - -function APCAcontrast(text, background) { - // Linearize sRGB - const Rtxt = (text.r / 255) ** mainTRC; - const Gtxt = (text.g / 255) ** mainTRC; - const Btxt = (text.b / 255) ** mainTRC; - const Rbg = (background.r / 255) ** mainTRC; - const Gbg = (background.g / 255) ** mainTRC; - const Bbg = (background.b / 255) ** mainTRC; - - // Apply the standard coefficients and sum to Y - let Ytxt = Rtxt * Rco + Gtxt * Gco + Btxt * Bco; - let Ybg = Rbg * Rco + Gbg * Gco + Bbg * Bco; - - // Soft clamp Y when near black. - // Now clamping all colors to prevent crossover errors - if (Ytxt <= blkThrs) Ytxt += (blkThrs - Ytxt) ** blkClmp; - if (Ybg <= blkThrs) Ybg += (blkThrs - Ybg) ** blkClmp; - - // Return 0 Early for extremely low ∆Y (lint trap #1) - if (Math.abs(Ybg - Ytxt) < deltaYmin) return 0.0; - - // SAPC CONTRAST - - let outputContrast; // For weighted final values - if (Ybg > Ytxt) { - // For normal polarity, black text on white - // Calculate the SAPC contrast value and scale - - const SAPC = (Ybg ** normBG - Ytxt ** normTXT) * scaleBoW; - - // NEW! SAPC SmoothScale™ - // Low Contrast Smooth Scale Rollout to prevent polarity reversal - // and also a low clip for very low contrasts (lint trap #2) - // much of this is for very low contrasts, less than 10 - // therefore for most reversing needs, only loConOffset is important - outputContrast = SAPC < loClip ? 0.0 : SAPC < loConThresh ? SAPC - SAPC * loConFactor * loConOffset : SAPC - loConOffset; - } else { - // For reverse polarity, light text on dark - // WoB should always return negative value. - - const SAPC = (Ybg ** revBG - Ytxt ** revTXT) * scaleWoB; - outputContrast = SAPC > -1e-3 ? 0.0 : SAPC > -0.078 ? SAPC - SAPC * loConFactor * loConOffset : SAPC + loConOffset; - } - return outputContrast * 100; -} - -/* eslint-disable no-console */ - -// Utilities -const {warn} = await importShared('vue'); - -function consoleWarn(message) { - warn(`Vuetify: ${message}`); -} -function consoleError(message) { - warn(`Vuetify error: ${message}`); -} -function deprecate(original, replacement) { - replacement = Array.isArray(replacement) ? replacement.slice(0, -1).map(s => `'${s}'`).join(', ') + ` or '${replacement.at(-1)}'` : `'${replacement}'`; - warn(`[Vuetify UPGRADE] '${original}' is deprecated, use ${replacement} instead.`); -} - -// Types - -const delta = 0.20689655172413793; // 6÷29 - -const cielabForwardTransform = t => t > delta ** 3 ? Math.cbrt(t) : t / (3 * delta ** 2) + 4 / 29; -const cielabReverseTransform = t => t > delta ? t ** 3 : 3 * delta ** 2 * (t - 4 / 29); -function fromXYZ$1(xyz) { - const transform = cielabForwardTransform; - const transformedY = transform(xyz[1]); - return [116 * transformedY - 16, 500 * (transform(xyz[0] / 0.95047) - transformedY), 200 * (transformedY - transform(xyz[2] / 1.08883))]; -} -function toXYZ$1(lab) { - const transform = cielabReverseTransform; - const Ln = (lab[0] + 16) / 116; - return [transform(Ln + lab[1] / 500) * 0.95047, transform(Ln), transform(Ln - lab[2] / 200) * 1.08883]; -} - -// Utilities -// For converting XYZ to sRGB -const srgbForwardMatrix = [[3.2406, -1.5372, -0.4986], [-0.9689, 1.8758, 0.0415], [0.0557, -0.204, 1.0570]]; - -// Forward gamma adjust -const srgbForwardTransform = C => C <= 0.0031308 ? C * 12.92 : 1.055 * C ** (1 / 2.4) - 0.055; - -// For converting sRGB to XYZ -const srgbReverseMatrix = [[0.4124, 0.3576, 0.1805], [0.2126, 0.7152, 0.0722], [0.0193, 0.1192, 0.9505]]; - -// Reverse gamma adjust -const srgbReverseTransform = C => C <= 0.04045 ? C / 12.92 : ((C + 0.055) / 1.055) ** 2.4; -function fromXYZ(xyz) { - const rgb = Array(3); - const transform = srgbForwardTransform; - const matrix = srgbForwardMatrix; - - // Matrix transform, then gamma adjustment - for (let i = 0; i < 3; ++i) { - // Rescale back to [0, 255] - rgb[i] = Math.round(clamp(transform(matrix[i][0] * xyz[0] + matrix[i][1] * xyz[1] + matrix[i][2] * xyz[2])) * 255); - } - return { - r: rgb[0], - g: rgb[1], - b: rgb[2] - }; -} -function toXYZ(_ref) { - let { - r, - g, - b - } = _ref; - const xyz = [0, 0, 0]; - const transform = srgbReverseTransform; - const matrix = srgbReverseMatrix; - - // Rescale from [0, 255] to [0, 1] then adjust sRGB gamma to linear RGB - r = transform(r / 255); - g = transform(g / 255); - b = transform(b / 255); - - // Matrix color space transform - for (let i = 0; i < 3; ++i) { - xyz[i] = matrix[i][0] * r + matrix[i][1] * g + matrix[i][2] * b; - } - return xyz; -} - -// Utilities -function isCssColor(color) { - return !!color && /^(#|var\(--|(rgb|hsl)a?\()/.test(color); -} -function isParsableColor(color) { - return isCssColor(color) && !/^((rgb|hsl)a?\()?var\(--/.test(color); -} -const cssColorRe = /^(?(?:rgb|hsl)a?)\((?.+)\)/; -const mappers = { - rgb: (r, g, b, a) => ({ - r, - g, - b, - a - }), - rgba: (r, g, b, a) => ({ - r, - g, - b, - a - }), - hsl: (h, s, l, a) => HSLtoRGB({ - h, - s, - l, - a - }), - hsla: (h, s, l, a) => HSLtoRGB({ - h, - s, - l, - a - }), - hsv: (h, s, v, a) => HSVtoRGB({ - h, - s, - v, - a - }), - hsva: (h, s, v, a) => HSVtoRGB({ - h, - s, - v, - a - }) -}; -function parseColor(color) { - if (typeof color === 'number') { - if (isNaN(color) || color < 0 || color > 0xFFFFFF) { - // int can't have opacity - consoleWarn(`'${color}' is not a valid hex color`); - } - return { - r: (color & 0xFF0000) >> 16, - g: (color & 0xFF00) >> 8, - b: color & 0xFF - }; - } else if (typeof color === 'string' && cssColorRe.test(color)) { - const { - groups - } = color.match(cssColorRe); - const { - fn, - values - } = groups; - const realValues = values.split(/,\s*/).map(v => { - if (v.endsWith('%') && ['hsl', 'hsla', 'hsv', 'hsva'].includes(fn)) { - return parseFloat(v) / 100; - } else { - return parseFloat(v); - } - }); - return mappers[fn](...realValues); - } else if (typeof color === 'string') { - let hex = color.startsWith('#') ? color.slice(1) : color; - if ([3, 4].includes(hex.length)) { - hex = hex.split('').map(char => char + char).join(''); - } else if (![6, 8].includes(hex.length)) { - consoleWarn(`'${color}' is not a valid hex(a) color`); - } - const int = parseInt(hex, 16); - if (isNaN(int) || int < 0 || int > 0xFFFFFFFF) { - consoleWarn(`'${color}' is not a valid hex(a) color`); - } - return HexToRGB(hex); - } else if (typeof color === 'object') { - if (has(color, ['r', 'g', 'b'])) { - return color; - } else if (has(color, ['h', 's', 'l'])) { - return HSVtoRGB(HSLtoHSV(color)); - } else if (has(color, ['h', 's', 'v'])) { - return HSVtoRGB(color); - } - } - throw new TypeError(`Invalid color: ${color == null ? color : String(color) || color.constructor.name}\nExpected #hex, #hexa, rgb(), rgba(), hsl(), hsla(), object or number`); -} - -/** Converts HSVA to RGBA. Based on formula from https://en.wikipedia.org/wiki/HSL_and_HSV */ -function HSVtoRGB(hsva) { - const { - h, - s, - v, - a - } = hsva; - const f = n => { - const k = (n + h / 60) % 6; - return v - v * s * Math.max(Math.min(k, 4 - k, 1), 0); - }; - const rgb = [f(5), f(3), f(1)].map(v => Math.round(v * 255)); - return { - r: rgb[0], - g: rgb[1], - b: rgb[2], - a - }; -} -function HSLtoRGB(hsla) { - return HSVtoRGB(HSLtoHSV(hsla)); -} - -/** Converts RGBA to HSVA. Based on formula from https://en.wikipedia.org/wiki/HSL_and_HSV */ -function RGBtoHSV(rgba) { - if (!rgba) return { - h: 0, - s: 1, - v: 1, - a: 1 - }; - const r = rgba.r / 255; - const g = rgba.g / 255; - const b = rgba.b / 255; - const max = Math.max(r, g, b); - const min = Math.min(r, g, b); - let h = 0; - if (max !== min) { - if (max === r) { - h = 60 * (0 + (g - b) / (max - min)); - } else if (max === g) { - h = 60 * (2 + (b - r) / (max - min)); - } else if (max === b) { - h = 60 * (4 + (r - g) / (max - min)); - } - } - if (h < 0) h = h + 360; - const s = max === 0 ? 0 : (max - min) / max; - const hsv = [h, s, max]; - return { - h: hsv[0], - s: hsv[1], - v: hsv[2], - a: rgba.a - }; -} -function HSVtoHSL(hsva) { - const { - h, - s, - v, - a - } = hsva; - const l = v - v * s / 2; - const sprime = l === 1 || l === 0 ? 0 : (v - l) / Math.min(l, 1 - l); - return { - h, - s: sprime, - l, - a - }; -} -function HSLtoHSV(hsl) { - const { - h, - s, - l, - a - } = hsl; - const v = l + s * Math.min(l, 1 - l); - const sprime = v === 0 ? 0 : 2 - 2 * l / v; - return { - h, - s: sprime, - v, - a - }; -} -function RGBtoCSS(_ref) { - let { - r, - g, - b, - a - } = _ref; - return a === undefined ? `rgb(${r}, ${g}, ${b})` : `rgba(${r}, ${g}, ${b}, ${a})`; -} -function HSVtoCSS(hsva) { - return RGBtoCSS(HSVtoRGB(hsva)); -} -function toHex(v) { - const h = Math.round(v).toString(16); - return ('00'.substr(0, 2 - h.length) + h).toUpperCase(); -} -function RGBtoHex(_ref2) { - let { - r, - g, - b, - a - } = _ref2; - return `#${[toHex(r), toHex(g), toHex(b), a !== undefined ? toHex(Math.round(a * 255)) : ''].join('')}`; -} -function HexToRGB(hex) { - hex = parseHex(hex); - let [r, g, b, a] = chunk(hex, 2).map(c => parseInt(c, 16)); - a = a === undefined ? a : a / 255; - return { - r, - g, - b, - a - }; -} -function HexToHSV(hex) { - const rgb = HexToRGB(hex); - return RGBtoHSV(rgb); -} -function HSVtoHex(hsva) { - return RGBtoHex(HSVtoRGB(hsva)); -} -function parseHex(hex) { - if (hex.startsWith('#')) { - hex = hex.slice(1); - } - hex = hex.replace(/([^0-9a-f])/gi, 'F'); - if (hex.length === 3 || hex.length === 4) { - hex = hex.split('').map(x => x + x).join(''); - } - if (hex.length !== 6) { - hex = padEnd(padEnd(hex, 6), 8, 'F'); - } - return hex; -} -function lighten(value, amount) { - const lab = fromXYZ$1(toXYZ(value)); - lab[0] = lab[0] + amount * 10; - return fromXYZ(toXYZ$1(lab)); -} -function darken(value, amount) { - const lab = fromXYZ$1(toXYZ(value)); - lab[0] = lab[0] - amount * 10; - return fromXYZ(toXYZ$1(lab)); -} - -/** - * Calculate the relative luminance of a given color - * @see https://www.w3.org/TR/WCAG20/#relativeluminancedef - */ -function getLuma(color) { - const rgb = parseColor(color); - return toXYZ(rgb)[1]; -} - -/** - * Returns the contrast ratio (1-21) between two colors. - * @see https://www.w3.org/TR/WCAG20/#contrast-ratiodef - */ -function getContrast(first, second) { - const l1 = getLuma(first); - const l2 = getLuma(second); - const light = Math.max(l1, l2); - const dark = Math.min(l1, l2); - return (light + 0.05) / (dark + 0.05); -} -function getForeground(color) { - const blackContrast = Math.abs(APCAcontrast(parseColor(0), parseColor(color))); - const whiteContrast = Math.abs(APCAcontrast(parseColor(0xffffff), parseColor(color))); - - // TODO: warn about poor color selections - // const contrastAsText = Math.abs(APCAcontrast(colorVal, colorToInt(theme.colors.background))) - // const minContrast = Math.max(blackContrast, whiteContrast) - // if (minContrast < 60) { - // consoleInfo(`${key} theme color ${color} has poor contrast (${minContrast.toFixed()}%)`) - // } else if (contrastAsText < 60 && !['background', 'surface'].includes(color)) { - // consoleInfo(`${key} theme color ${color} has poor contrast as text (${contrastAsText.toFixed()}%)`) - // } - - // Prefer white text if both have an acceptable contrast ratio - return whiteContrast > Math.min(blackContrast, 50) ? '#fff' : '#000'; -} - -// Utilities -const {getCurrentInstance:_getCurrentInstance} = await importShared('vue'); -function getCurrentInstance(name, message) { - const vm = _getCurrentInstance(); - if (!vm) { - throw new Error(`[Vuetify] ${name} ${'must be called from inside a setup function'}`); - } - return vm; -} -function getCurrentInstanceName() { - let name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'composables'; - const vm = getCurrentInstance(name).type; - return toKebabCase(vm?.aliasName || vm?.name); -} -let _uid = 0; -let _map = new WeakMap(); -function getUid() { - const vm = getCurrentInstance('getUid'); - if (_map.has(vm)) return _map.get(vm);else { - const uid = _uid++; - _map.set(vm, uid); - return uid; - } -} -getUid.reset = () => { - _uid = 0; - _map = new WeakMap(); -}; - -// Utilities -function injectSelf(key) { - let vm = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getCurrentInstance('injectSelf'); - const { - provides - } = vm; - if (provides && key in provides) { - // TS doesn't allow symbol as index type - return provides[key]; - } - return undefined; -} - -// Utilities -const {computed: computed$7,inject: inject$7,provide: provide$3,ref: ref$6,shallowRef: shallowRef$3,unref: unref$1,watchEffect: watchEffect$2} = await importShared('vue'); -const DefaultsSymbol = Symbol.for('vuetify:defaults'); -function createDefaults(options) { - return ref$6(options); -} -function injectDefaults() { - const defaults = inject$7(DefaultsSymbol); - if (!defaults) throw new Error('[Vuetify] Could not find defaults instance'); - return defaults; -} -function provideDefaults(defaults, options) { - const injectedDefaults = injectDefaults(); - const providedDefaults = ref$6(defaults); - const newDefaults = computed$7(() => { - const disabled = unref$1(options?.disabled); - if (disabled) return injectedDefaults.value; - const scoped = unref$1(options?.scoped); - const reset = unref$1(options?.reset); - const root = unref$1(options?.root); - if (providedDefaults.value == null && !(scoped || reset || root)) return injectedDefaults.value; - let properties = mergeDeep(providedDefaults.value, { - prev: injectedDefaults.value - }); - if (scoped) return properties; - if (reset || root) { - const len = Number(reset || Infinity); - for (let i = 0; i <= len; i++) { - if (!properties || !('prev' in properties)) { - break; - } - properties = properties.prev; - } - if (properties && typeof root === 'string' && root in properties) { - properties = mergeDeep(mergeDeep(properties, { - prev: properties - }), properties[root]); - } - return properties; - } - return properties.prev ? mergeDeep(properties.prev, properties) : properties; - }); - provide$3(DefaultsSymbol, newDefaults); - return newDefaults; -} -function propIsDefined(vnode, prop) { - return typeof vnode.props?.[prop] !== 'undefined' || typeof vnode.props?.[toKebabCase(prop)] !== 'undefined'; -} -function internalUseDefaults() { - let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - let name = arguments.length > 1 ? arguments[1] : undefined; - let defaults = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : injectDefaults(); - const vm = getCurrentInstance('useDefaults'); - name = name ?? vm.type.name ?? vm.type.__name; - if (!name) { - throw new Error('[Vuetify] Could not determine component name'); - } - const componentDefaults = computed$7(() => defaults.value?.[props._as ?? name]); - const _props = new Proxy(props, { - get(target, prop) { - const propValue = Reflect.get(target, prop); - if (prop === 'class' || prop === 'style') { - return [componentDefaults.value?.[prop], propValue].filter(v => v != null); - } else if (typeof prop === 'string' && !propIsDefined(vm.vnode, prop)) { - return componentDefaults.value?.[prop] !== undefined ? componentDefaults.value?.[prop] : defaults.value?.global?.[prop] !== undefined ? defaults.value?.global?.[prop] : propValue; - } - return propValue; - } - }); - const _subcomponentDefaults = shallowRef$3(); - watchEffect$2(() => { - if (componentDefaults.value) { - const subComponents = Object.entries(componentDefaults.value).filter(_ref => { - let [key] = _ref; - return key.startsWith(key[0].toUpperCase()); - }); - _subcomponentDefaults.value = subComponents.length ? Object.fromEntries(subComponents) : undefined; - } else { - _subcomponentDefaults.value = undefined; - } - }); - function provideSubDefaults() { - const injected = injectSelf(DefaultsSymbol, vm); - provide$3(DefaultsSymbol, computed$7(() => { - return _subcomponentDefaults.value ? mergeDeep(injected?.value ?? {}, _subcomponentDefaults.value) : injected?.value; - })); - } - return { - props: _props, - provideSubDefaults - }; -} -function useDefaults() { - let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - let name = arguments.length > 1 ? arguments[1] : undefined; - const { - props: _props, - provideSubDefaults - } = internalUseDefaults(props, name); - provideSubDefaults(); - return _props; -} - -const {defineComponent:_defineComponent} = await importShared('vue'); -// No props -// Object Props -// Implementation -function defineComponent(options) { - options._setup = options._setup ?? options.setup; - if (!options.name) { - consoleWarn('The component is missing an explicit name, unable to generate default prop value'); - return options; - } - if (options._setup) { - options.props = propsFactory(options.props ?? {}, options.name)(); - const propKeys = Object.keys(options.props).filter(key => key !== 'class' && key !== 'style'); - options.filterProps = function filterProps(props) { - return pick(props, propKeys); - }; - options.props._as = String; - options.setup = function setup(props, ctx) { - const defaults = injectDefaults(); - - // Skip props proxy if defaults are not provided - if (!defaults.value) return options._setup(props, ctx); - const { - props: _props, - provideSubDefaults - } = internalUseDefaults(props, props._as ?? options.name, defaults); - const setupBindings = options._setup(_props, ctx); - provideSubDefaults(); - return setupBindings; - }; - } - return options; -} - -// No argument - simple default slot - -// Generic constructor argument - generic props and slots - -// Slots argument - simple slots - -// Implementation -function genericComponent() { - let exposeDefaults = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - return options => (exposeDefaults ? defineComponent : _defineComponent)(options); -} -function defineFunctionalComponent(props, render) { - render.props = props; - return render; -} - -// Adds a filterProps method to the component options - -// https://github.com/vuejs/core/pull/10557 - -// not a vue Component - -// Utilities -const {onBeforeUnmount: onBeforeUnmount$1,readonly,ref: ref$5,watch: watch$5} = await importShared('vue'); -function useResizeObserver(callback) { - let box = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'content'; - const resizeRef = templateRef(); - const contentRect = ref$5(); - if (IN_BROWSER) { - const observer = new ResizeObserver(entries => { - callback?.(entries, observer); - if (!entries.length) return; - if (box === 'content') { - contentRect.value = entries[0].contentRect; - } else { - contentRect.value = entries[0].target.getBoundingClientRect(); - } - }); - onBeforeUnmount$1(() => { - observer.disconnect(); - }); - watch$5(() => resizeRef.el, (newValue, oldValue) => { - if (oldValue) { - observer.unobserve(oldValue); - contentRect.value = undefined; - } - if (newValue) observer.observe(newValue); - }, { - flush: 'post' - }); - } - return { - resizeRef, - contentRect: readonly(contentRect) - }; -} - -const {computed: computed$6,inject: inject$6,onActivated,onBeforeUnmount,onDeactivated,onMounted,provide: provide$2,reactive: reactive$2,ref: ref$4,shallowRef: shallowRef$2} = await importShared('vue'); -const VuetifyLayoutKey = Symbol.for('vuetify:layout'); -const VuetifyLayoutItemKey = Symbol.for('vuetify:layout-item'); -const ROOT_ZINDEX = 1000; -const makeLayoutProps = propsFactory({ - overlaps: { - type: Array, - default: () => [] - }, - fullHeight: Boolean -}, 'layout'); - -// Composables -const makeLayoutItemProps = propsFactory({ - name: { - type: String - }, - order: { - type: [Number, String], - default: 0 - }, - absolute: Boolean -}, 'layout-item'); -function useLayout() { - const layout = inject$6(VuetifyLayoutKey); - if (!layout) throw new Error('[Vuetify] Could not find injected layout'); - return { - getLayoutItem: layout.getLayoutItem, - mainRect: layout.mainRect, - mainStyles: layout.mainStyles - }; -} -function useLayoutItem(options) { - const layout = inject$6(VuetifyLayoutKey); - if (!layout) throw new Error('[Vuetify] Could not find injected layout'); - const id = options.id ?? `layout-item-${getUid()}`; - const vm = getCurrentInstance('useLayoutItem'); - provide$2(VuetifyLayoutItemKey, { - id - }); - const isKeptAlive = shallowRef$2(false); - onDeactivated(() => isKeptAlive.value = true); - onActivated(() => isKeptAlive.value = false); - const { - layoutItemStyles, - layoutItemScrimStyles - } = layout.register(vm, { - ...options, - active: computed$6(() => isKeptAlive.value ? false : options.active.value), - id - }); - onBeforeUnmount(() => layout.unregister(id)); - return { - layoutItemStyles, - layoutRect: layout.layoutRect, - layoutItemScrimStyles - }; -} -const generateLayers = (layout, positions, layoutSizes, activeItems) => { - let previousLayer = { - top: 0, - left: 0, - right: 0, - bottom: 0 - }; - const layers = [{ - id: '', - layer: { - ...previousLayer - } - }]; - for (const id of layout) { - const position = positions.get(id); - const amount = layoutSizes.get(id); - const active = activeItems.get(id); - if (!position || !amount || !active) continue; - const layer = { - ...previousLayer, - [position.value]: parseInt(previousLayer[position.value], 10) + (active.value ? parseInt(amount.value, 10) : 0) - }; - layers.push({ - id, - layer - }); - previousLayer = layer; - } - return layers; -}; -function createLayout(props) { - const parentLayout = inject$6(VuetifyLayoutKey, null); - const rootZIndex = computed$6(() => parentLayout ? parentLayout.rootZIndex.value - 100 : ROOT_ZINDEX); - const registered = ref$4([]); - const positions = reactive$2(new Map()); - const layoutSizes = reactive$2(new Map()); - const priorities = reactive$2(new Map()); - const activeItems = reactive$2(new Map()); - const disabledTransitions = reactive$2(new Map()); - const { - resizeRef, - contentRect: layoutRect - } = useResizeObserver(); - const computedOverlaps = computed$6(() => { - const map = new Map(); - const overlaps = props.overlaps ?? []; - for (const overlap of overlaps.filter(item => item.includes(':'))) { - const [top, bottom] = overlap.split(':'); - if (!registered.value.includes(top) || !registered.value.includes(bottom)) continue; - const topPosition = positions.get(top); - const bottomPosition = positions.get(bottom); - const topAmount = layoutSizes.get(top); - const bottomAmount = layoutSizes.get(bottom); - if (!topPosition || !bottomPosition || !topAmount || !bottomAmount) continue; - map.set(bottom, { - position: topPosition.value, - amount: parseInt(topAmount.value, 10) - }); - map.set(top, { - position: bottomPosition.value, - amount: -parseInt(bottomAmount.value, 10) - }); - } - return map; - }); - const layers = computed$6(() => { - const uniquePriorities = [...new Set([...priorities.values()].map(p => p.value))].sort((a, b) => a - b); - const layout = []; - for (const p of uniquePriorities) { - const items = registered.value.filter(id => priorities.get(id)?.value === p); - layout.push(...items); - } - return generateLayers(layout, positions, layoutSizes, activeItems); - }); - const transitionsEnabled = computed$6(() => { - return !Array.from(disabledTransitions.values()).some(ref => ref.value); - }); - const mainRect = computed$6(() => { - return layers.value[layers.value.length - 1].layer; - }); - const mainStyles = computed$6(() => { - return { - '--v-layout-left': convertToUnit(mainRect.value.left), - '--v-layout-right': convertToUnit(mainRect.value.right), - '--v-layout-top': convertToUnit(mainRect.value.top), - '--v-layout-bottom': convertToUnit(mainRect.value.bottom), - ...(transitionsEnabled.value ? undefined : { - transition: 'none' - }) - }; - }); - const items = computed$6(() => { - return layers.value.slice(1).map((_ref, index) => { - let { - id - } = _ref; - const { - layer - } = layers.value[index]; - const size = layoutSizes.get(id); - const position = positions.get(id); - return { - id, - ...layer, - size: Number(size.value), - position: position.value - }; - }); - }); - const getLayoutItem = id => { - return items.value.find(item => item.id === id); - }; - const rootVm = getCurrentInstance('createLayout'); - const isMounted = shallowRef$2(false); - onMounted(() => { - isMounted.value = true; - }); - provide$2(VuetifyLayoutKey, { - register: (vm, _ref2) => { - let { - id, - order, - position, - layoutSize, - elementSize, - active, - disableTransitions, - absolute - } = _ref2; - priorities.set(id, order); - positions.set(id, position); - layoutSizes.set(id, layoutSize); - activeItems.set(id, active); - disableTransitions && disabledTransitions.set(id, disableTransitions); - const instances = findChildrenWithProvide(VuetifyLayoutItemKey, rootVm?.vnode); - const instanceIndex = instances.indexOf(vm); - if (instanceIndex > -1) registered.value.splice(instanceIndex, 0, id);else registered.value.push(id); - const index = computed$6(() => items.value.findIndex(i => i.id === id)); - const zIndex = computed$6(() => rootZIndex.value + layers.value.length * 2 - index.value * 2); - const layoutItemStyles = computed$6(() => { - const isHorizontal = position.value === 'left' || position.value === 'right'; - const isOppositeHorizontal = position.value === 'right'; - const isOppositeVertical = position.value === 'bottom'; - const size = elementSize.value ?? layoutSize.value; - const unit = size === 0 ? '%' : 'px'; - const styles = { - [position.value]: 0, - zIndex: zIndex.value, - transform: `translate${isHorizontal ? 'X' : 'Y'}(${(active.value ? 0 : -(size === 0 ? 100 : size)) * (isOppositeHorizontal || isOppositeVertical ? -1 : 1)}${unit})`, - position: absolute.value || rootZIndex.value !== ROOT_ZINDEX ? 'absolute' : 'fixed', - ...(transitionsEnabled.value ? undefined : { - transition: 'none' - }) - }; - if (!isMounted.value) return styles; - const item = items.value[index.value]; - if (!item) throw new Error(`[Vuetify] Could not find layout item "${id}"`); - const overlap = computedOverlaps.value.get(id); - if (overlap) { - item[overlap.position] += overlap.amount; - } - return { - ...styles, - height: isHorizontal ? `calc(100% - ${item.top}px - ${item.bottom}px)` : elementSize.value ? `${elementSize.value}px` : undefined, - left: isOppositeHorizontal ? undefined : `${item.left}px`, - right: isOppositeHorizontal ? `${item.right}px` : undefined, - top: position.value !== 'bottom' ? `${item.top}px` : undefined, - bottom: position.value !== 'top' ? `${item.bottom}px` : undefined, - width: !isHorizontal ? `calc(100% - ${item.left}px - ${item.right}px)` : elementSize.value ? `${elementSize.value}px` : undefined - }; - }); - const layoutItemScrimStyles = computed$6(() => ({ - zIndex: zIndex.value - 1 - })); - return { - layoutItemStyles, - layoutItemScrimStyles, - zIndex - }; - }, - unregister: id => { - priorities.delete(id); - positions.delete(id); - layoutSizes.delete(id); - activeItems.delete(id); - disabledTransitions.delete(id); - registered.value = registered.value.filter(v => v !== id); - }, - mainRect, - mainStyles, - getLayoutItem, - items, - layoutRect, - rootZIndex - }); - const layoutClasses = computed$6(() => ['v-layout', { - 'v-layout--full-height': props.fullHeight - }]); - const layoutStyles = computed$6(() => ({ - zIndex: parentLayout ? rootZIndex.value : undefined, - position: parentLayout ? 'relative' : undefined, - overflow: parentLayout ? 'hidden' : undefined - })); - return { - layoutClasses, - layoutStyles, - getLayoutItem, - items, - layoutRect, - layoutRef: resizeRef - }; -} - -// Utilities -const {effectScope,onScopeDispose,watch: watch$4} = await importShared('vue'); - - -// Types - -function useToggleScope(source, fn) { - let scope; - function start() { - scope = effectScope(); - scope.run(() => fn.length ? fn(() => { - scope?.stop(); - start(); - }) : fn()); - } - watch$4(source, active => { - if (active && !scope) { - start(); - } else if (!active) { - scope?.stop(); - scope = undefined; - } - }, { - immediate: true - }); - onScopeDispose(() => { - scope?.stop(); - }); -} - -const {computed: computed$5,ref: ref$3,toRaw,watch: watch$3} = await importShared('vue'); -// Composables -function useProxiedModel(props, prop, defaultValue) { - let transformIn = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : v => v; - let transformOut = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : v => v; - const vm = getCurrentInstance('useProxiedModel'); - const internal = ref$3(props[prop] !== undefined ? props[prop] : defaultValue); - const kebabProp = toKebabCase(prop); - const checkKebab = kebabProp !== prop; - const isControlled = checkKebab ? computed$5(() => { - void props[prop]; - return !!((vm.vnode.props?.hasOwnProperty(prop) || vm.vnode.props?.hasOwnProperty(kebabProp)) && (vm.vnode.props?.hasOwnProperty(`onUpdate:${prop}`) || vm.vnode.props?.hasOwnProperty(`onUpdate:${kebabProp}`))); - }) : computed$5(() => { - void props[prop]; - return !!(vm.vnode.props?.hasOwnProperty(prop) && vm.vnode.props?.hasOwnProperty(`onUpdate:${prop}`)); - }); - useToggleScope(() => !isControlled.value, () => { - watch$3(() => props[prop], val => { - internal.value = val; - }); - }); - const model = computed$5({ - get() { - const externalValue = props[prop]; - return transformIn(isControlled.value ? externalValue : internal.value); - }, - set(internalValue) { - const newValue = transformOut(internalValue); - const value = toRaw(isControlled.value ? props[prop] : internal.value); - if (value === newValue || transformIn(value) === internalValue) { - return; - } - internal.value = newValue; - vm?.emit(`update:${prop}`, newValue); - } - }); - Object.defineProperty(model, 'externalValue', { - get: () => isControlled.value ? props[prop] : internal.value - }); - return model; -} - -const en = { - badge: 'Badge', - open: 'Open', - close: 'Close', - dismiss: 'Dismiss', - confirmEdit: { - ok: 'OK', - cancel: 'Cancel' - }, - dataIterator: { - noResultsText: 'No matching records found', - loadingText: 'Loading items...' - }, - dataTable: { - itemsPerPageText: 'Rows per page:', - ariaLabel: { - sortDescending: 'Sorted descending.', - sortAscending: 'Sorted ascending.', - sortNone: 'Not sorted.', - activateNone: 'Activate to remove sorting.', - activateDescending: 'Activate to sort descending.', - activateAscending: 'Activate to sort ascending.' - }, - sortBy: 'Sort by' - }, - dataFooter: { - itemsPerPageText: 'Items per page:', - itemsPerPageAll: 'All', - nextPage: 'Next page', - prevPage: 'Previous page', - firstPage: 'First page', - lastPage: 'Last page', - pageText: '{0}-{1} of {2}' - }, - dateRangeInput: { - divider: 'to' - }, - datePicker: { - itemsSelected: '{0} selected', - range: { - title: 'Select dates', - header: 'Enter dates' - }, - title: 'Select date', - header: 'Enter date', - input: { - placeholder: 'Enter date' - } - }, - noDataText: 'No data available', - carousel: { - prev: 'Previous visual', - next: 'Next visual', - ariaLabel: { - delimiter: 'Carousel slide {0} of {1}' - } - }, - calendar: { - moreEvents: '{0} more', - today: 'Today' - }, - input: { - clear: 'Clear {0}', - prependAction: '{0} prepended action', - appendAction: '{0} appended action', - otp: 'Please enter OTP character {0}' - }, - fileInput: { - counter: '{0} files', - counterSize: '{0} files ({1} in total)' - }, - timePicker: { - am: 'AM', - pm: 'PM', - title: 'Select Time' - }, - pagination: { - ariaLabel: { - root: 'Pagination Navigation', - next: 'Next page', - previous: 'Previous page', - page: 'Go to page {0}', - currentPage: 'Page {0}, Current page', - first: 'First page', - last: 'Last page' - } - }, - stepper: { - next: 'Next', - prev: 'Previous' - }, - rating: { - ariaLabel: { - item: 'Rating {0} of {1}' - } - }, - loading: 'Loading...', - infiniteScroll: { - loadMore: 'Load more', - empty: 'No more' - } -}; - -const {ref: ref$2,shallowRef: shallowRef$1,watch: watch$2} = await importShared('vue'); -const LANG_PREFIX = '$vuetify.'; -const replace = (str, params) => { - return str.replace(/\{(\d+)\}/g, (match, index) => { - return String(params[+index]); - }); -}; -const createTranslateFunction = (current, fallback, messages) => { - return function (key) { - for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - params[_key - 1] = arguments[_key]; - } - if (!key.startsWith(LANG_PREFIX)) { - return replace(key, params); - } - const shortKey = key.replace(LANG_PREFIX, ''); - const currentLocale = current.value && messages.value[current.value]; - const fallbackLocale = fallback.value && messages.value[fallback.value]; - let str = getObjectValueByPath(currentLocale, shortKey, null); - if (!str) { - consoleWarn(`Translation key "${key}" not found in "${current.value}", trying fallback locale`); - str = getObjectValueByPath(fallbackLocale, shortKey, null); - } - if (!str) { - consoleError(`Translation key "${key}" not found in fallback`); - str = key; - } - if (typeof str !== 'string') { - consoleError(`Translation key "${key}" has a non-string value`); - str = key; - } - return replace(str, params); - }; -}; -function createNumberFunction(current, fallback) { - return (value, options) => { - const numberFormat = new Intl.NumberFormat([current.value, fallback.value], options); - return numberFormat.format(value); - }; -} -function useProvided(props, prop, provided) { - const internal = useProxiedModel(props, prop, props[prop] ?? provided.value); - - // TODO: Remove when defaultValue works - internal.value = props[prop] ?? provided.value; - watch$2(provided, v => { - if (props[prop] == null) { - internal.value = provided.value; - } - }); - return internal; -} -function createProvideFunction(state) { - return props => { - const current = useProvided(props, 'locale', state.current); - const fallback = useProvided(props, 'fallback', state.fallback); - const messages = useProvided(props, 'messages', state.messages); - return { - name: 'vuetify', - current, - fallback, - messages, - t: createTranslateFunction(current, fallback, messages), - n: createNumberFunction(current, fallback), - provide: createProvideFunction({ - current, - fallback, - messages - }) - }; - }; -} -function createVuetifyAdapter(options) { - const current = shallowRef$1(options?.locale ?? 'en'); - const fallback = shallowRef$1(options?.fallback ?? 'en'); - const messages = ref$2({ - en, - ...options?.messages - }); - return { - name: 'vuetify', - current, - fallback, - messages, - t: createTranslateFunction(current, fallback, messages), - n: createNumberFunction(current, fallback), - provide: createProvideFunction({ - current, - fallback, - messages - }) - }; -} - -// Utilities -const {computed: computed$4,inject: inject$5,provide: provide$1,ref: ref$1} = await importShared('vue'); -const LocaleSymbol = Symbol.for('vuetify:locale'); -function isLocaleInstance(obj) { - return obj.name != null; -} -function createLocale(options) { - const i18n = options?.adapter && isLocaleInstance(options?.adapter) ? options?.adapter : createVuetifyAdapter(options); - const rtl = createRtl(i18n, options); - return { - ...i18n, - ...rtl - }; -} -function useLocale() { - const locale = inject$5(LocaleSymbol); - if (!locale) throw new Error('[Vuetify] Could not find injected locale instance'); - return locale; -} -function provideLocale(props) { - const locale = inject$5(LocaleSymbol); - if (!locale) throw new Error('[Vuetify] Could not find injected locale instance'); - const i18n = locale.provide(props); - const rtl = provideRtl(i18n, locale.rtl, props); - const data = { - ...i18n, - ...rtl - }; - provide$1(LocaleSymbol, data); - return data; -} -function genDefaults$3() { - return { - af: false, - ar: true, - bg: false, - ca: false, - ckb: false, - cs: false, - de: false, - el: false, - en: false, - es: false, - et: false, - fa: true, - fi: false, - fr: false, - hr: false, - hu: false, - he: true, - id: false, - it: false, - ja: false, - km: false, - ko: false, - lv: false, - lt: false, - nl: false, - no: false, - pl: false, - pt: false, - ro: false, - ru: false, - sk: false, - sl: false, - srCyrl: false, - srLatn: false, - sv: false, - th: false, - tr: false, - az: false, - uk: false, - vi: false, - zhHans: false, - zhHant: false - }; -} -function createRtl(i18n, options) { - const rtl = ref$1(options?.rtl ?? genDefaults$3()); - const isRtl = computed$4(() => rtl.value[i18n.current.value] ?? false); - return { - isRtl, - rtl, - rtlClasses: computed$4(() => `v-locale--is-${isRtl.value ? 'rtl' : 'ltr'}`) - }; -} -function provideRtl(locale, rtl, props) { - const isRtl = computed$4(() => props.rtl ?? rtl.value[locale.current.value] ?? false); - return { - isRtl, - rtl, - rtlClasses: computed$4(() => `v-locale--is-${isRtl.value ? 'rtl' : 'ltr'}`) - }; -} -function useRtl() { - const locale = inject$5(LocaleSymbol); - if (!locale) throw new Error('[Vuetify] Could not find injected rtl instance'); - return { - isRtl: locale.isRtl, - rtlClasses: locale.rtlClasses - }; -} - -// Utilities -const {computed: computed$3,inject: inject$4,provide,ref,watch: watch$1,watchEffect: watchEffect$1} = await importShared('vue'); -const ThemeSymbol = Symbol.for('vuetify:theme'); -const makeThemeProps = propsFactory({ - theme: String -}, 'theme'); -function genDefaults$2() { - return { - defaultTheme: 'light', - variations: { - colors: [], - lighten: 0, - darken: 0 - }, - themes: { - light: { - dark: false, - colors: { - background: '#FFFFFF', - surface: '#FFFFFF', - 'surface-bright': '#FFFFFF', - 'surface-light': '#EEEEEE', - 'surface-variant': '#424242', - 'on-surface-variant': '#EEEEEE', - primary: '#1867C0', - 'primary-darken-1': '#1F5592', - secondary: '#48A9A6', - 'secondary-darken-1': '#018786', - error: '#B00020', - info: '#2196F3', - success: '#4CAF50', - warning: '#FB8C00' - }, - variables: { - 'border-color': '#000000', - 'border-opacity': 0.12, - 'high-emphasis-opacity': 0.87, - 'medium-emphasis-opacity': 0.60, - 'disabled-opacity': 0.38, - 'idle-opacity': 0.04, - 'hover-opacity': 0.04, - 'focus-opacity': 0.12, - 'selected-opacity': 0.08, - 'activated-opacity': 0.12, - 'pressed-opacity': 0.12, - 'dragged-opacity': 0.08, - 'theme-kbd': '#212529', - 'theme-on-kbd': '#FFFFFF', - 'theme-code': '#F5F5F5', - 'theme-on-code': '#000000' - } - }, - dark: { - dark: true, - colors: { - background: '#121212', - surface: '#212121', - 'surface-bright': '#ccbfd6', - 'surface-light': '#424242', - 'surface-variant': '#a3a3a3', - 'on-surface-variant': '#424242', - primary: '#2196F3', - 'primary-darken-1': '#277CC1', - secondary: '#54B6B2', - 'secondary-darken-1': '#48A9A6', - error: '#CF6679', - info: '#2196F3', - success: '#4CAF50', - warning: '#FB8C00' - }, - variables: { - 'border-color': '#FFFFFF', - 'border-opacity': 0.12, - 'high-emphasis-opacity': 1, - 'medium-emphasis-opacity': 0.70, - 'disabled-opacity': 0.50, - 'idle-opacity': 0.10, - 'hover-opacity': 0.04, - 'focus-opacity': 0.12, - 'selected-opacity': 0.08, - 'activated-opacity': 0.12, - 'pressed-opacity': 0.16, - 'dragged-opacity': 0.08, - 'theme-kbd': '#212529', - 'theme-on-kbd': '#FFFFFF', - 'theme-code': '#343434', - 'theme-on-code': '#CCCCCC' - } - } - } - }; -} -function parseThemeOptions() { - let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : genDefaults$2(); - const defaults = genDefaults$2(); - if (!options) return { - ...defaults, - isDisabled: true - }; - const themes = {}; - for (const [key, theme] of Object.entries(options.themes ?? {})) { - const defaultTheme = theme.dark || key === 'dark' ? defaults.themes?.dark : defaults.themes?.light; - themes[key] = mergeDeep(defaultTheme, theme); - } - return mergeDeep(defaults, { - ...options, - themes - }); -} - -// Composables -function createTheme(options) { - const parsedOptions = parseThemeOptions(options); - const name = ref(parsedOptions.defaultTheme); - const themes = ref(parsedOptions.themes); - const computedThemes = computed$3(() => { - const acc = {}; - for (const [name, original] of Object.entries(themes.value)) { - const theme = acc[name] = { - ...original, - colors: { - ...original.colors - } - }; - if (parsedOptions.variations) { - for (const name of parsedOptions.variations.colors) { - const color = theme.colors[name]; - if (!color) continue; - for (const variation of ['lighten', 'darken']) { - const fn = variation === 'lighten' ? lighten : darken; - for (const amount of createRange(parsedOptions.variations[variation], 1)) { - theme.colors[`${name}-${variation}-${amount}`] = RGBtoHex(fn(parseColor(color), amount)); - } - } - } - } - for (const color of Object.keys(theme.colors)) { - if (/^on-[a-z]/.test(color) || theme.colors[`on-${color}`]) continue; - const onColor = `on-${color}`; - const colorVal = parseColor(theme.colors[color]); - theme.colors[onColor] = getForeground(colorVal); - } - } - return acc; - }); - const current = computed$3(() => computedThemes.value[name.value]); - const styles = computed$3(() => { - const lines = []; - if (current.value?.dark) { - createCssClass(lines, ':root', ['color-scheme: dark']); - } - createCssClass(lines, ':root', genCssVariables(current.value)); - for (const [themeName, theme] of Object.entries(computedThemes.value)) { - createCssClass(lines, `.v-theme--${themeName}`, [`color-scheme: ${theme.dark ? 'dark' : 'normal'}`, ...genCssVariables(theme)]); - } - const bgLines = []; - const fgLines = []; - const colors = new Set(Object.values(computedThemes.value).flatMap(theme => Object.keys(theme.colors))); - for (const key of colors) { - if (/^on-[a-z]/.test(key)) { - createCssClass(fgLines, `.${key}`, [`color: rgb(var(--v-theme-${key})) !important`]); - } else { - createCssClass(bgLines, `.bg-${key}`, [`--v-theme-overlay-multiplier: var(--v-theme-${key}-overlay-multiplier)`, `background-color: rgb(var(--v-theme-${key})) !important`, `color: rgb(var(--v-theme-on-${key})) !important`]); - createCssClass(fgLines, `.text-${key}`, [`color: rgb(var(--v-theme-${key})) !important`]); - createCssClass(fgLines, `.border-${key}`, [`--v-border-color: var(--v-theme-${key})`]); - } - } - lines.push(...bgLines, ...fgLines); - return lines.map((str, i) => i === 0 ? str : ` ${str}`).join(''); - }); - function getHead() { - return { - style: [{ - children: styles.value, - id: 'vuetify-theme-stylesheet', - nonce: parsedOptions.cspNonce || false - }] - }; - } - function install(app) { - if (parsedOptions.isDisabled) return; - const head = app._context.provides.usehead; - if (head) { - if (head.push) { - const entry = head.push(getHead); - if (IN_BROWSER) { - watch$1(styles, () => { - entry.patch(getHead); - }); - } - } else { - if (IN_BROWSER) { - head.addHeadObjs(computed$3(getHead)); - watchEffect$1(() => head.updateDOM()); - } else { - head.addHeadObjs(getHead()); - } - } - } else { - let styleEl = IN_BROWSER ? document.getElementById('vuetify-theme-stylesheet') : null; - if (IN_BROWSER) { - watch$1(styles, updateStyles, { - immediate: true - }); - } else { - updateStyles(); - } - function updateStyles() { - if (typeof document !== 'undefined' && !styleEl) { - const el = document.createElement('style'); - el.type = 'text/css'; - el.id = 'vuetify-theme-stylesheet'; - if (parsedOptions.cspNonce) el.setAttribute('nonce', parsedOptions.cspNonce); - styleEl = el; - document.head.appendChild(styleEl); - } - if (styleEl) styleEl.innerHTML = styles.value; - } - } - } - const themeClasses = computed$3(() => parsedOptions.isDisabled ? undefined : `v-theme--${name.value}`); - return { - install, - isDisabled: parsedOptions.isDisabled, - name, - themes, - current, - computedThemes, - themeClasses, - styles, - global: { - name, - current - } - }; -} -function provideTheme(props) { - getCurrentInstance('provideTheme'); - const theme = inject$4(ThemeSymbol, null); - if (!theme) throw new Error('Could not find Vuetify theme injection'); - const name = computed$3(() => { - return props.theme ?? theme.name.value; - }); - const current = computed$3(() => theme.themes.value[name.value]); - const themeClasses = computed$3(() => theme.isDisabled ? undefined : `v-theme--${name.value}`); - const newTheme = { - ...theme, - name, - current, - themeClasses - }; - provide(ThemeSymbol, newTheme); - return newTheme; -} -function useTheme() { - getCurrentInstance('useTheme'); - const theme = inject$4(ThemeSymbol, null); - if (!theme) throw new Error('Could not find Vuetify theme injection'); - return theme; -} -function createCssClass(lines, selector, content) { - lines.push(`${selector} {\n`, ...content.map(line => ` ${line};\n`), '}\n'); -} -function genCssVariables(theme) { - const lightOverlay = theme.dark ? 2 : 1; - const darkOverlay = theme.dark ? 1 : 2; - const variables = []; - for (const [key, value] of Object.entries(theme.colors)) { - const rgb = parseColor(value); - variables.push(`--v-theme-${key}: ${rgb.r},${rgb.g},${rgb.b}`); - if (!key.startsWith('on-')) { - variables.push(`--v-theme-${key}-overlay-multiplier: ${getLuma(value) > 0.18 ? lightOverlay : darkOverlay}`); - } - } - for (const [key, value] of Object.entries(theme.variables)) { - const color = typeof value === 'string' && value.startsWith('#') ? parseColor(value) : undefined; - const rgb = color ? `${color.r}, ${color.g}, ${color.b}` : undefined; - variables.push(`--v-${key}: ${rgb ?? value}`); - } - return variables; -} - -const {h} = await importShared('vue'); - - -// Types - -const aliases = { - collapse: 'mdi-chevron-up', - complete: 'mdi-check', - cancel: 'mdi-close-circle', - close: 'mdi-close', - delete: 'mdi-close-circle', - // delete (e.g. v-chip close) - clear: 'mdi-close-circle', - success: 'mdi-check-circle', - info: 'mdi-information', - warning: 'mdi-alert-circle', - error: 'mdi-close-circle', - prev: 'mdi-chevron-left', - next: 'mdi-chevron-right', - checkboxOn: 'mdi-checkbox-marked', - checkboxOff: 'mdi-checkbox-blank-outline', - checkboxIndeterminate: 'mdi-minus-box', - delimiter: 'mdi-circle', - // for carousel - sortAsc: 'mdi-arrow-up', - sortDesc: 'mdi-arrow-down', - expand: 'mdi-chevron-down', - menu: 'mdi-menu', - subgroup: 'mdi-menu-down', - dropdown: 'mdi-menu-down', - radioOn: 'mdi-radiobox-marked', - radioOff: 'mdi-radiobox-blank', - edit: 'mdi-pencil', - ratingEmpty: 'mdi-star-outline', - ratingFull: 'mdi-star', - ratingHalf: 'mdi-star-half-full', - loading: 'mdi-cached', - first: 'mdi-page-first', - last: 'mdi-page-last', - unfold: 'mdi-unfold-more-horizontal', - file: 'mdi-paperclip', - plus: 'mdi-plus', - minus: 'mdi-minus', - calendar: 'mdi-calendar', - treeviewCollapse: 'mdi-menu-down', - treeviewExpand: 'mdi-menu-right', - eyeDropper: 'mdi-eyedropper' -}; -const mdi = { - // Not using mergeProps here, functional components merge props by default (?) - component: props => h(VClassIcon, { - ...props, - class: 'mdi' - }) -}; - -const {mergeProps:_mergeProps,createVNode:_createVNode} = await importShared('vue'); -const {computed: computed$2,inject: inject$3,unref} = await importShared('vue'); -const IconValue = [String, Function, Object, Array]; -const IconSymbol = Symbol.for('vuetify:icons'); -const makeIconProps = propsFactory({ - icon: { - type: IconValue - }, - // Could not remove this and use makeTagProps, types complained because it is not required - tag: { - type: String, - required: true - } -}, 'icon'); -const VComponentIcon = genericComponent()({ - name: 'VComponentIcon', - props: makeIconProps(), - setup(props, _ref) { - let { - slots - } = _ref; - return () => { - const Icon = props.icon; - return _createVNode(props.tag, null, { - default: () => [props.icon ? _createVNode(Icon, null, null) : slots.default?.()] - }); - }; - } -}); -const VSvgIcon = defineComponent({ - name: 'VSvgIcon', - inheritAttrs: false, - props: makeIconProps(), - setup(props, _ref2) { - let { - attrs - } = _ref2; - return () => { - return _createVNode(props.tag, _mergeProps(attrs, { - "style": null - }), { - default: () => [_createVNode("svg", { - "class": "v-icon__svg", - "xmlns": "http://www.w3.org/2000/svg", - "viewBox": "0 0 24 24", - "role": "img", - "aria-hidden": "true" - }, [Array.isArray(props.icon) ? props.icon.map(path => Array.isArray(path) ? _createVNode("path", { - "d": path[0], - "fill-opacity": path[1] - }, null) : _createVNode("path", { - "d": path - }, null)) : _createVNode("path", { - "d": props.icon - }, null)])] - }); - }; - } -}); -const VLigatureIcon = defineComponent({ - name: 'VLigatureIcon', - props: makeIconProps(), - setup(props) { - return () => { - return _createVNode(props.tag, null, { - default: () => [props.icon] - }); - }; - } -}); -const VClassIcon = defineComponent({ - name: 'VClassIcon', - props: makeIconProps(), - setup(props) { - return () => { - return _createVNode(props.tag, { - "class": props.icon - }, null); - }; - } -}); -function genDefaults$1() { - return { - svg: { - component: VSvgIcon - }, - class: { - component: VClassIcon - } - }; -} - -// Composables -function createIcons(options) { - const sets = genDefaults$1(); - const defaultSet = options?.defaultSet ?? 'mdi'; - if (defaultSet === 'mdi' && !sets.mdi) { - sets.mdi = mdi; - } - return mergeDeep({ - defaultSet, - sets, - aliases: { - ...aliases, - /* eslint-disable max-len */ - vuetify: ['M8.2241 14.2009L12 21L22 3H14.4459L8.2241 14.2009Z', ['M7.26303 12.4733L7.00113 12L2 3H12.5261C12.5261 3 12.5261 3 12.5261 3L7.26303 12.4733Z', 0.6]], - 'vuetify-outline': 'svg:M7.26 12.47 12.53 3H2L7.26 12.47ZM14.45 3 8.22 14.2 12 21 22 3H14.45ZM18.6 5 12 16.88 10.51 14.2 15.62 5ZM7.26 8.35 5.4 5H9.13L7.26 8.35Z', - 'vuetify-play': ['m6.376 13.184-4.11-7.192C1.505 4.66 2.467 3 4.003 3h8.532l-.953 1.576-.006.01-.396.677c-.429.732-.214 1.507.194 2.015.404.503 1.092.878 1.869.806a3.72 3.72 0 0 1 1.005.022c.276.053.434.143.523.237.138.146.38.635-.25 2.09-.893 1.63-1.553 1.722-1.847 1.677-.213-.033-.468-.158-.756-.406a4.95 4.95 0 0 1-.8-.927c-.39-.564-1.04-.84-1.66-.846-.625-.006-1.316.27-1.693.921l-.478.826-.911 1.506Z', ['M9.093 11.552c.046-.079.144-.15.32-.148a.53.53 0 0 1 .43.207c.285.414.636.847 1.046 1.2.405.35.914.662 1.516.754 1.334.205 2.502-.698 3.48-2.495l.014-.028.013-.03c.687-1.574.774-2.852-.005-3.675-.37-.391-.861-.586-1.333-.676a5.243 5.243 0 0 0-1.447-.044c-.173.016-.393-.073-.54-.257-.145-.18-.127-.316-.082-.392l.393-.672L14.287 3h5.71c1.536 0 2.499 1.659 1.737 2.992l-7.997 13.996c-.768 1.344-2.706 1.344-3.473 0l-3.037-5.314 1.377-2.278.004-.006.004-.007.481-.831Z', 0.6]] - /* eslint-enable max-len */ - } - }, options); -} -const useIcon = props => { - const icons = inject$3(IconSymbol); - if (!icons) throw new Error('Missing Vuetify Icons provide!'); - const iconData = computed$2(() => { - const iconAlias = unref(props); - if (!iconAlias) return { - component: VComponentIcon - }; - let icon = iconAlias; - if (typeof icon === 'string') { - icon = icon.trim(); - if (icon.startsWith('$')) { - icon = icons.aliases?.[icon.slice(1)]; - } - } - if (!icon) consoleWarn(`Could not find aliased icon "${iconAlias}"`); - if (Array.isArray(icon)) { - return { - component: VSvgIcon, - icon - }; - } else if (typeof icon !== 'string') { - return { - component: VComponentIcon, - icon - }; - } - const iconSetName = Object.keys(icons.sets).find(setName => typeof icon === 'string' && icon.startsWith(`${setName}:`)); - const iconName = iconSetName ? icon.slice(iconSetName.length + 1) : icon; - const iconSet = icons.sets[iconSetName ?? icons.defaultSet]; - return { - component: iconSet.component, - icon: iconName - }; - }); - return { - iconData - }; -}; - -// Utilities -const {computed: computed$1,inject: inject$2,reactive: reactive$1,shallowRef,toRefs,watchEffect} = await importShared('vue'); -const breakpoints = ['sm', 'md', 'lg', 'xl', 'xxl']; // no xs - -const DisplaySymbol = Symbol.for('vuetify:display'); -const defaultDisplayOptions = { - mobileBreakpoint: 'lg', - thresholds: { - xs: 0, - sm: 600, - md: 960, - lg: 1280, - xl: 1920, - xxl: 2560 - } -}; -const parseDisplayOptions = function () { - let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultDisplayOptions; - return mergeDeep(defaultDisplayOptions, options); -}; -function getClientWidth(ssr) { - return IN_BROWSER && !ssr ? window.innerWidth : typeof ssr === 'object' && ssr.clientWidth || 0; -} -function getClientHeight(ssr) { - return IN_BROWSER && !ssr ? window.innerHeight : typeof ssr === 'object' && ssr.clientHeight || 0; -} -function getPlatform(ssr) { - const userAgent = IN_BROWSER && !ssr ? window.navigator.userAgent : 'ssr'; - function match(regexp) { - return Boolean(userAgent.match(regexp)); - } - const android = match(/android/i); - const ios = match(/iphone|ipad|ipod/i); - const cordova = match(/cordova/i); - const electron = match(/electron/i); - const chrome = match(/chrome/i); - const edge = match(/edge/i); - const firefox = match(/firefox/i); - const opera = match(/opera/i); - const win = match(/win/i); - const mac = match(/mac/i); - const linux = match(/linux/i); - return { - android, - ios, - cordova, - electron, - chrome, - edge, - firefox, - opera, - win, - mac, - linux, - touch: SUPPORTS_TOUCH, - ssr: userAgent === 'ssr' - }; -} -function createDisplay(options, ssr) { - const { - thresholds, - mobileBreakpoint - } = parseDisplayOptions(options); - const height = shallowRef(getClientHeight(ssr)); - const platform = shallowRef(getPlatform(ssr)); - const state = reactive$1({}); - const width = shallowRef(getClientWidth(ssr)); - function updateSize() { - height.value = getClientHeight(); - width.value = getClientWidth(); - } - function update() { - updateSize(); - platform.value = getPlatform(); - } - - // eslint-disable-next-line max-statements - watchEffect(() => { - const xs = width.value < thresholds.sm; - const sm = width.value < thresholds.md && !xs; - const md = width.value < thresholds.lg && !(sm || xs); - const lg = width.value < thresholds.xl && !(md || sm || xs); - const xl = width.value < thresholds.xxl && !(lg || md || sm || xs); - const xxl = width.value >= thresholds.xxl; - const name = xs ? 'xs' : sm ? 'sm' : md ? 'md' : lg ? 'lg' : xl ? 'xl' : 'xxl'; - const breakpointValue = typeof mobileBreakpoint === 'number' ? mobileBreakpoint : thresholds[mobileBreakpoint]; - const mobile = width.value < breakpointValue; - state.xs = xs; - state.sm = sm; - state.md = md; - state.lg = lg; - state.xl = xl; - state.xxl = xxl; - state.smAndUp = !xs; - state.mdAndUp = !(xs || sm); - state.lgAndUp = !(xs || sm || md); - state.xlAndUp = !(xs || sm || md || lg); - state.smAndDown = !(md || lg || xl || xxl); - state.mdAndDown = !(lg || xl || xxl); - state.lgAndDown = !(xl || xxl); - state.xlAndDown = !xxl; - state.name = name; - state.height = height.value; - state.width = width.value; - state.mobile = mobile; - state.mobileBreakpoint = mobileBreakpoint; - state.platform = platform.value; - state.thresholds = thresholds; - }); - if (IN_BROWSER) { - window.addEventListener('resize', updateSize, { - passive: true - }); - } - return { - ...toRefs(state), - update, - ssr: !!ssr - }; -} -const makeDisplayProps = propsFactory({ - mobile: { - type: Boolean, - default: false - }, - mobileBreakpoint: [Number, String] -}, 'display'); -function useDisplay() { - let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - let name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getCurrentInstanceName(); - const display = inject$2(DisplaySymbol); - if (!display) throw new Error('Could not find Vuetify display injection'); - const mobile = computed$1(() => { - if (props.mobile != null) return props.mobile; - if (!props.mobileBreakpoint) return display.mobile.value; - const breakpointValue = typeof props.mobileBreakpoint === 'number' ? props.mobileBreakpoint : display.thresholds.value[props.mobileBreakpoint]; - return display.width.value < breakpointValue; - }); - const displayClasses = computed$1(() => { - if (!name) return {}; - return { - [`${name}--mobile`]: mobile.value - }; - }); - return { - ...display, - displayClasses, - mobile - }; -} - -// Utilities -const {computed,inject: inject$1} = await importShared('vue'); -const GoToSymbol = Symbol.for('vuetify:goto'); -function genDefaults() { - return { - container: undefined, - duration: 300, - layout: false, - offset: 0, - easing: 'easeInOutCubic', - patterns: { - linear: t => t, - easeInQuad: t => t ** 2, - easeOutQuad: t => t * (2 - t), - easeInOutQuad: t => t < 0.5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t, - easeInCubic: t => t ** 3, - easeOutCubic: t => --t ** 3 + 1, - easeInOutCubic: t => t < 0.5 ? 4 * t ** 3 : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1, - easeInQuart: t => t ** 4, - easeOutQuart: t => 1 - --t ** 4, - easeInOutQuart: t => t < 0.5 ? 8 * t ** 4 : 1 - 8 * --t ** 4, - easeInQuint: t => t ** 5, - easeOutQuint: t => 1 + --t ** 5, - easeInOutQuint: t => t < 0.5 ? 16 * t ** 5 : 1 + 16 * --t ** 5 - } - }; -} -function getContainer(el) { - return getTarget(el) ?? (document.scrollingElement || document.body); -} -function getTarget(el) { - return typeof el === 'string' ? document.querySelector(el) : refElement(el); -} -function getOffset(target, horizontal, rtl) { - if (typeof target === 'number') return horizontal && rtl ? -target : target; - let el = getTarget(target); - let totalOffset = 0; - while (el) { - totalOffset += horizontal ? el.offsetLeft : el.offsetTop; - el = el.offsetParent; - } - return totalOffset; -} -function createGoTo(options, locale) { - return { - rtl: locale.isRtl, - options: mergeDeep(genDefaults(), options) - }; -} -async function scrollTo(_target, _options, horizontal, goTo) { - const property = horizontal ? 'scrollLeft' : 'scrollTop'; - const options = mergeDeep(goTo?.options ?? genDefaults(), _options); - const rtl = goTo?.rtl.value; - const target = (typeof _target === 'number' ? _target : getTarget(_target)) ?? 0; - const container = options.container === 'parent' && target instanceof HTMLElement ? target.parentElement : getContainer(options.container); - const ease = typeof options.easing === 'function' ? options.easing : options.patterns[options.easing]; - if (!ease) throw new TypeError(`Easing function "${options.easing}" not found.`); - let targetLocation; - if (typeof target === 'number') { - targetLocation = getOffset(target, horizontal, rtl); - } else { - targetLocation = getOffset(target, horizontal, rtl) - getOffset(container, horizontal, rtl); - if (options.layout) { - const styles = window.getComputedStyle(target); - const layoutOffset = styles.getPropertyValue('--v-layout-top'); - if (layoutOffset) targetLocation -= parseInt(layoutOffset, 10); - } - } - targetLocation += options.offset; - targetLocation = clampTarget(container, targetLocation, !!rtl, !!horizontal); - const startLocation = container[property] ?? 0; - if (targetLocation === startLocation) return Promise.resolve(targetLocation); - const startTime = performance.now(); - return new Promise(resolve => requestAnimationFrame(function step(currentTime) { - const timeElapsed = currentTime - startTime; - const progress = timeElapsed / options.duration; - const location = Math.floor(startLocation + (targetLocation - startLocation) * ease(clamp(progress, 0, 1))); - container[property] = location; - - // Allow for some jitter if target time has elapsed - if (progress >= 1 && Math.abs(location - container[property]) < 10) { - return resolve(targetLocation); - } else if (progress > 2) { - // The target might not be reachable - consoleWarn('Scroll target is not reachable'); - return resolve(container[property]); - } - requestAnimationFrame(step); - })); -} -function useGoTo() { - let _options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - const goToInstance = inject$1(GoToSymbol); - const { - isRtl - } = useRtl(); - if (!goToInstance) throw new Error('[Vuetify] Could not find injected goto instance'); - const goTo = { - ...goToInstance, - // can be set via VLocaleProvider - rtl: computed(() => goToInstance.rtl.value || isRtl.value) - }; - async function go(target, options) { - return scrollTo(target, mergeDeep(_options, options), false, goTo); - } - go.horizontal = async (target, options) => { - return scrollTo(target, mergeDeep(_options, options), true, goTo); - }; - return go; -} - -/** - * Clamp target value to achieve a smooth scroll animation - * when the value goes outside the scroll container size - */ -function clampTarget(container, value, rtl, horizontal) { - const { - scrollWidth, - scrollHeight - } = container; - const [containerWidth, containerHeight] = container === document.scrollingElement ? [window.innerWidth, window.innerHeight] : [container.offsetWidth, container.offsetHeight]; - let min; - let max; - if (horizontal) { - if (rtl) { - min = -(scrollWidth - containerWidth); - max = 0; - } else { - min = 0; - max = scrollWidth - containerWidth; - } - } else { - min = 0; - max = scrollHeight + -containerHeight; - } - return Math.max(Math.min(value, max), min); -} - -// Utilities -const firstDay = { - '001': 1, - AD: 1, - AE: 6, - AF: 6, - AG: 0, - AI: 1, - AL: 1, - AM: 1, - AN: 1, - AR: 1, - AS: 0, - AT: 1, - AU: 1, - AX: 1, - AZ: 1, - BA: 1, - BD: 0, - BE: 1, - BG: 1, - BH: 6, - BM: 1, - BN: 1, - BR: 0, - BS: 0, - BT: 0, - BW: 0, - BY: 1, - BZ: 0, - CA: 0, - CH: 1, - CL: 1, - CM: 1, - CN: 1, - CO: 0, - CR: 1, - CY: 1, - CZ: 1, - DE: 1, - DJ: 6, - DK: 1, - DM: 0, - DO: 0, - DZ: 6, - EC: 1, - EE: 1, - EG: 6, - ES: 1, - ET: 0, - FI: 1, - FJ: 1, - FO: 1, - FR: 1, - GB: 1, - 'GB-alt-variant': 0, - GE: 1, - GF: 1, - GP: 1, - GR: 1, - GT: 0, - GU: 0, - HK: 0, - HN: 0, - HR: 1, - HU: 1, - ID: 0, - IE: 1, - IL: 0, - IN: 0, - IQ: 6, - IR: 6, - IS: 1, - IT: 1, - JM: 0, - JO: 6, - JP: 0, - KE: 0, - KG: 1, - KH: 0, - KR: 0, - KW: 6, - KZ: 1, - LA: 0, - LB: 1, - LI: 1, - LK: 1, - LT: 1, - LU: 1, - LV: 1, - LY: 6, - MC: 1, - MD: 1, - ME: 1, - MH: 0, - MK: 1, - MM: 0, - MN: 1, - MO: 0, - MQ: 1, - MT: 0, - MV: 5, - MX: 0, - MY: 1, - MZ: 0, - NI: 0, - NL: 1, - NO: 1, - NP: 0, - NZ: 1, - OM: 6, - PA: 0, - PE: 0, - PH: 0, - PK: 0, - PL: 1, - PR: 0, - PT: 0, - PY: 0, - QA: 6, - RE: 1, - RO: 1, - RS: 1, - RU: 1, - SA: 0, - SD: 6, - SE: 1, - SG: 0, - SI: 1, - SK: 1, - SM: 1, - SV: 0, - SY: 6, - TH: 0, - TJ: 1, - TM: 1, - TR: 1, - TT: 0, - TW: 0, - UA: 1, - UM: 0, - US: 0, - UY: 1, - UZ: 1, - VA: 1, - VE: 0, - VI: 0, - VN: 1, - WS: 0, - XK: 1, - YE: 0, - ZA: 0, - ZW: 0 -}; -function getWeekArray(date, locale, firstDayOfWeek) { - const weeks = []; - let currentWeek = []; - const firstDayOfMonth = startOfMonth(date); - const lastDayOfMonth = endOfMonth(date); - const first = firstDayOfWeek ?? firstDay[locale.slice(-2).toUpperCase()] ?? 0; - const firstDayWeekIndex = (firstDayOfMonth.getDay() - first + 7) % 7; - const lastDayWeekIndex = (lastDayOfMonth.getDay() - first + 7) % 7; - for (let i = 0; i < firstDayWeekIndex; i++) { - const adjacentDay = new Date(firstDayOfMonth); - adjacentDay.setDate(adjacentDay.getDate() - (firstDayWeekIndex - i)); - currentWeek.push(adjacentDay); - } - for (let i = 1; i <= lastDayOfMonth.getDate(); i++) { - const day = new Date(date.getFullYear(), date.getMonth(), i); - - // Add the day to the current week - currentWeek.push(day); - - // If the current week has 7 days, add it to the weeks array and start a new week - if (currentWeek.length === 7) { - weeks.push(currentWeek); - currentWeek = []; - } - } - for (let i = 1; i < 7 - lastDayWeekIndex; i++) { - const adjacentDay = new Date(lastDayOfMonth); - adjacentDay.setDate(adjacentDay.getDate() + i); - currentWeek.push(adjacentDay); - } - if (currentWeek.length > 0) { - weeks.push(currentWeek); - } - return weeks; -} -function startOfWeek(date, locale, firstDayOfWeek) { - const day = firstDayOfWeek ?? firstDay[locale.slice(-2).toUpperCase()] ?? 0; - const d = new Date(date); - while (d.getDay() !== day) { - d.setDate(d.getDate() - 1); - } - return d; -} -function endOfWeek(date, locale) { - const d = new Date(date); - const lastDay = ((firstDay[locale.slice(-2).toUpperCase()] ?? 0) + 6) % 7; - while (d.getDay() !== lastDay) { - d.setDate(d.getDate() + 1); - } - return d; -} -function startOfMonth(date) { - return new Date(date.getFullYear(), date.getMonth(), 1); -} -function endOfMonth(date) { - return new Date(date.getFullYear(), date.getMonth() + 1, 0); -} -function parseLocalDate(value) { - const parts = value.split('-').map(Number); - - // new Date() uses local time zone when passing individual date component values - return new Date(parts[0], parts[1] - 1, parts[2]); -} -const _YYYMMDD = /^([12]\d{3}-([1-9]|0[1-9]|1[0-2])-([1-9]|0[1-9]|[12]\d|3[01]))$/; -function date(value) { - if (value == null) return new Date(); - if (value instanceof Date) return value; - if (typeof value === 'string') { - let parsed; - if (_YYYMMDD.test(value)) { - return parseLocalDate(value); - } else { - parsed = Date.parse(value); - } - if (!isNaN(parsed)) return new Date(parsed); - } - return null; -} -const sundayJanuarySecond2000 = new Date(2000, 0, 2); -function getWeekdays(locale, firstDayOfWeek) { - const daysFromSunday = firstDayOfWeek ?? firstDay[locale.slice(-2).toUpperCase()] ?? 0; - return createRange(7).map(i => { - const weekday = new Date(sundayJanuarySecond2000); - weekday.setDate(sundayJanuarySecond2000.getDate() + daysFromSunday + i); - return new Intl.DateTimeFormat(locale, { - weekday: 'narrow' - }).format(weekday); - }); -} -function format(value, formatString, locale, formats) { - const newDate = date(value) ?? new Date(); - const customFormat = formats?.[formatString]; - if (typeof customFormat === 'function') { - return customFormat(newDate, formatString, locale); - } - let options = {}; - switch (formatString) { - case 'fullDate': - options = { - year: 'numeric', - month: 'long', - day: 'numeric' - }; - break; - case 'fullDateWithWeekday': - options = { - weekday: 'long', - year: 'numeric', - month: 'long', - day: 'numeric' - }; - break; - case 'normalDate': - const day = newDate.getDate(); - const month = new Intl.DateTimeFormat(locale, { - month: 'long' - }).format(newDate); - return `${day} ${month}`; - case 'normalDateWithWeekday': - options = { - weekday: 'short', - day: 'numeric', - month: 'short' - }; - break; - case 'shortDate': - options = { - month: 'short', - day: 'numeric' - }; - break; - case 'year': - options = { - year: 'numeric' - }; - break; - case 'month': - options = { - month: 'long' - }; - break; - case 'monthShort': - options = { - month: 'short' - }; - break; - case 'monthAndYear': - options = { - month: 'long', - year: 'numeric' - }; - break; - case 'monthAndDate': - options = { - month: 'long', - day: 'numeric' - }; - break; - case 'weekday': - options = { - weekday: 'long' - }; - break; - case 'weekdayShort': - options = { - weekday: 'short' - }; - break; - case 'dayOfMonth': - return new Intl.NumberFormat(locale).format(newDate.getDate()); - case 'hours12h': - options = { - hour: 'numeric', - hour12: true - }; - break; - case 'hours24h': - options = { - hour: 'numeric', - hour12: false - }; - break; - case 'minutes': - options = { - minute: 'numeric' - }; - break; - case 'seconds': - options = { - second: 'numeric' - }; - break; - case 'fullTime': - options = { - hour: 'numeric', - minute: 'numeric', - second: 'numeric', - hour12: true - }; - break; - case 'fullTime12h': - options = { - hour: 'numeric', - minute: 'numeric', - second: 'numeric', - hour12: true - }; - break; - case 'fullTime24h': - options = { - hour: 'numeric', - minute: 'numeric', - second: 'numeric', - hour12: false - }; - break; - case 'fullDateTime': - options = { - year: 'numeric', - month: 'long', - day: 'numeric', - hour: 'numeric', - minute: 'numeric', - second: 'numeric', - hour12: true - }; - break; - case 'fullDateTime12h': - options = { - year: 'numeric', - month: 'long', - day: 'numeric', - hour: 'numeric', - minute: 'numeric', - second: 'numeric', - hour12: true - }; - break; - case 'fullDateTime24h': - options = { - year: 'numeric', - month: 'long', - day: 'numeric', - hour: 'numeric', - minute: 'numeric', - second: 'numeric', - hour12: false - }; - break; - case 'keyboardDate': - options = { - year: 'numeric', - month: '2-digit', - day: '2-digit' - }; - break; - case 'keyboardDateTime': - options = { - year: 'numeric', - month: '2-digit', - day: '2-digit', - hour: 'numeric', - minute: 'numeric', - second: 'numeric', - hour12: false - }; - break; - case 'keyboardDateTime12h': - options = { - year: 'numeric', - month: '2-digit', - day: '2-digit', - hour: 'numeric', - minute: 'numeric', - second: 'numeric', - hour12: true - }; - break; - case 'keyboardDateTime24h': - options = { - year: 'numeric', - month: '2-digit', - day: '2-digit', - hour: 'numeric', - minute: 'numeric', - second: 'numeric', - hour12: false - }; - break; - default: - options = customFormat ?? { - timeZone: 'UTC', - timeZoneName: 'short' - }; - } - return new Intl.DateTimeFormat(locale, options).format(newDate); -} -function toISO(adapter, value) { - const date = adapter.toJsDate(value); - const year = date.getFullYear(); - const month = padStart(String(date.getMonth() + 1), 2, '0'); - const day = padStart(String(date.getDate()), 2, '0'); - return `${year}-${month}-${day}`; -} -function parseISO(value) { - const [year, month, day] = value.split('-').map(Number); - return new Date(year, month - 1, day); -} -function addMinutes(date, amount) { - const d = new Date(date); - d.setMinutes(d.getMinutes() + amount); - return d; -} -function addHours(date, amount) { - const d = new Date(date); - d.setHours(d.getHours() + amount); - return d; -} -function addDays(date, amount) { - const d = new Date(date); - d.setDate(d.getDate() + amount); - return d; -} -function addWeeks(date, amount) { - const d = new Date(date); - d.setDate(d.getDate() + amount * 7); - return d; -} -function addMonths(date, amount) { - const d = new Date(date); - d.setDate(1); - d.setMonth(d.getMonth() + amount); - return d; -} -function getYear(date) { - return date.getFullYear(); -} -function getMonth(date) { - return date.getMonth(); -} -function getDate(date) { - return date.getDate(); -} -function getNextMonth(date) { - return new Date(date.getFullYear(), date.getMonth() + 1, 1); -} -function getPreviousMonth(date) { - return new Date(date.getFullYear(), date.getMonth() - 1, 1); -} -function getHours(date) { - return date.getHours(); -} -function getMinutes(date) { - return date.getMinutes(); -} -function startOfYear(date) { - return new Date(date.getFullYear(), 0, 1); -} -function endOfYear(date) { - return new Date(date.getFullYear(), 11, 31); -} -function isWithinRange(date, range) { - return isAfter(date, range[0]) && isBefore(date, range[1]); -} -function isValid(date) { - const d = new Date(date); - return d instanceof Date && !isNaN(d.getTime()); -} -function isAfter(date, comparing) { - return date.getTime() > comparing.getTime(); -} -function isAfterDay(date, comparing) { - return isAfter(startOfDay(date), startOfDay(comparing)); -} -function isBefore(date, comparing) { - return date.getTime() < comparing.getTime(); -} -function isEqual(date, comparing) { - return date.getTime() === comparing.getTime(); -} -function isSameDay(date, comparing) { - return date.getDate() === comparing.getDate() && date.getMonth() === comparing.getMonth() && date.getFullYear() === comparing.getFullYear(); -} -function isSameMonth(date, comparing) { - return date.getMonth() === comparing.getMonth() && date.getFullYear() === comparing.getFullYear(); -} -function isSameYear(date, comparing) { - return date.getFullYear() === comparing.getFullYear(); -} -function getDiff(date, comparing, unit) { - const d = new Date(date); - const c = new Date(comparing); - switch (unit) { - case 'years': - return d.getFullYear() - c.getFullYear(); - case 'quarters': - return Math.floor((d.getMonth() - c.getMonth() + (d.getFullYear() - c.getFullYear()) * 12) / 4); - case 'months': - return d.getMonth() - c.getMonth() + (d.getFullYear() - c.getFullYear()) * 12; - case 'weeks': - return Math.floor((d.getTime() - c.getTime()) / (1000 * 60 * 60 * 24 * 7)); - case 'days': - return Math.floor((d.getTime() - c.getTime()) / (1000 * 60 * 60 * 24)); - case 'hours': - return Math.floor((d.getTime() - c.getTime()) / (1000 * 60 * 60)); - case 'minutes': - return Math.floor((d.getTime() - c.getTime()) / (1000 * 60)); - case 'seconds': - return Math.floor((d.getTime() - c.getTime()) / 1000); - default: - { - return d.getTime() - c.getTime(); - } - } -} -function setHours(date, count) { - const d = new Date(date); - d.setHours(count); - return d; -} -function setMinutes(date, count) { - const d = new Date(date); - d.setMinutes(count); - return d; -} -function setMonth(date, count) { - const d = new Date(date); - d.setMonth(count); - return d; -} -function setDate(date, day) { - const d = new Date(date); - d.setDate(day); - return d; -} -function setYear(date, year) { - const d = new Date(date); - d.setFullYear(year); - return d; -} -function startOfDay(date) { - return new Date(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0, 0); -} -function endOfDay(date) { - return new Date(date.getFullYear(), date.getMonth(), date.getDate(), 23, 59, 59, 999); -} -class VuetifyDateAdapter { - constructor(options) { - this.locale = options.locale; - this.formats = options.formats; - } - date(value) { - return date(value); - } - toJsDate(date) { - return date; - } - toISO(date) { - return toISO(this, date); - } - parseISO(date) { - return parseISO(date); - } - addMinutes(date, amount) { - return addMinutes(date, amount); - } - addHours(date, amount) { - return addHours(date, amount); - } - addDays(date, amount) { - return addDays(date, amount); - } - addWeeks(date, amount) { - return addWeeks(date, amount); - } - addMonths(date, amount) { - return addMonths(date, amount); - } - getWeekArray(date, firstDayOfWeek) { - return getWeekArray(date, this.locale, firstDayOfWeek ? Number(firstDayOfWeek) : undefined); - } - startOfWeek(date, firstDayOfWeek) { - return startOfWeek(date, this.locale, firstDayOfWeek ? Number(firstDayOfWeek) : undefined); - } - endOfWeek(date) { - return endOfWeek(date, this.locale); - } - startOfMonth(date) { - return startOfMonth(date); - } - endOfMonth(date) { - return endOfMonth(date); - } - format(date, formatString) { - return format(date, formatString, this.locale, this.formats); - } - isEqual(date, comparing) { - return isEqual(date, comparing); - } - isValid(date) { - return isValid(date); - } - isWithinRange(date, range) { - return isWithinRange(date, range); - } - isAfter(date, comparing) { - return isAfter(date, comparing); - } - isAfterDay(date, comparing) { - return isAfterDay(date, comparing); - } - isBefore(date, comparing) { - return !isAfter(date, comparing) && !isEqual(date, comparing); - } - isSameDay(date, comparing) { - return isSameDay(date, comparing); - } - isSameMonth(date, comparing) { - return isSameMonth(date, comparing); - } - isSameYear(date, comparing) { - return isSameYear(date, comparing); - } - setMinutes(date, count) { - return setMinutes(date, count); - } - setHours(date, count) { - return setHours(date, count); - } - setMonth(date, count) { - return setMonth(date, count); - } - setDate(date, day) { - return setDate(date, day); - } - setYear(date, year) { - return setYear(date, year); - } - getDiff(date, comparing, unit) { - return getDiff(date, comparing, unit); - } - getWeekdays(firstDayOfWeek) { - return getWeekdays(this.locale, firstDayOfWeek ? Number(firstDayOfWeek) : undefined); - } - getYear(date) { - return getYear(date); - } - getMonth(date) { - return getMonth(date); - } - getDate(date) { - return getDate(date); - } - getNextMonth(date) { - return getNextMonth(date); - } - getPreviousMonth(date) { - return getPreviousMonth(date); - } - getHours(date) { - return getHours(date); - } - getMinutes(date) { - return getMinutes(date); - } - startOfDay(date) { - return startOfDay(date); - } - endOfDay(date) { - return endOfDay(date); - } - startOfYear(date) { - return startOfYear(date); - } - endOfYear(date) { - return endOfYear(date); - } -} - -const {inject,reactive,watch} = await importShared('vue'); -const DateOptionsSymbol = Symbol.for('vuetify:date-options'); -const DateAdapterSymbol = Symbol.for('vuetify:date-adapter'); -function createDate(options, locale) { - const _options = mergeDeep({ - adapter: VuetifyDateAdapter, - locale: { - af: 'af-ZA', - // ar: '', # not the same value for all variants - bg: 'bg-BG', - ca: 'ca-ES', - ckb: '', - cs: 'cs-CZ', - de: 'de-DE', - el: 'el-GR', - en: 'en-US', - // es: '', # not the same value for all variants - et: 'et-EE', - fa: 'fa-IR', - fi: 'fi-FI', - // fr: '', #not the same value for all variants - hr: 'hr-HR', - hu: 'hu-HU', - he: 'he-IL', - id: 'id-ID', - it: 'it-IT', - ja: 'ja-JP', - ko: 'ko-KR', - lv: 'lv-LV', - lt: 'lt-LT', - nl: 'nl-NL', - no: 'no-NO', - pl: 'pl-PL', - pt: 'pt-PT', - ro: 'ro-RO', - ru: 'ru-RU', - sk: 'sk-SK', - sl: 'sl-SI', - srCyrl: 'sr-SP', - srLatn: 'sr-SP', - sv: 'sv-SE', - th: 'th-TH', - tr: 'tr-TR', - az: 'az-AZ', - uk: 'uk-UA', - vi: 'vi-VN', - zhHans: 'zh-CN', - zhHant: 'zh-TW' - } - }, options); - return { - options: _options, - instance: createInstance(_options, locale) - }; -} -function createInstance(options, locale) { - const instance = reactive(typeof options.adapter === 'function' - // eslint-disable-next-line new-cap - ? new options.adapter({ - locale: options.locale[locale.current.value] ?? locale.current.value, - formats: options.formats - }) : options.adapter); - watch(locale.current, value => { - instance.locale = options.locale[value] ?? value ?? instance.locale; - }); - return instance; -} -function useDate() { - const options = inject(DateOptionsSymbol); - if (!options) throw new Error('[Vuetify] Could not find injected date options'); - const locale = useLocale(); - return createInstance(options, locale); -} - -// https://stackoverflow.com/questions/274861/how-do-i-calculate-the-week-number-given-a-date/275024#275024 -function getWeek(adapter, value) { - const date = adapter.toJsDate(value); - let year = date.getFullYear(); - let d1w1 = new Date(year, 0, 1); - if (date < d1w1) { - year = year - 1; - d1w1 = new Date(year, 0, 1); - } else { - const tv = new Date(year + 1, 0, 1); - if (date >= tv) { - year = year + 1; - d1w1 = tv; - } - } - const diffTime = Math.abs(date.getTime() - d1w1.getTime()); - const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24)); - return Math.floor(diffDays / 7) + 1; -} - -export { defer as $, deepEqual as A, wrapInArray as B, findChildrenWithProvide as C, useIcon as D, flattenFragments as E, useResizeObserver as F, IN_BROWSER as G, hasEvent as H, IconValue as I, isObject as J, keyCodes as K, useLocale as L, EventProp as M, filterInputAttrs as N, matchesSelector as O, omit as P, only as Q, useDisplay as R, SUPPORTS_INTERSECTION as S, useGoTo as T, makeDisplayProps as U, focusableChildren as V, consoleError as W, defineComponent as X, deprecate as Y, getPropertyFromItem as Z, focusChild as _, isOn as a, templateRef as a0, isClickInsideElement as a1, getNextElement as a2, pick as a3, callEvent as a4, debounce as a5, ensureValidVNode as a6, checkPrintable as a7, noop as a8, useTheme as a9, useLayout as aA, CircularBuffer as aB, VuetifyLayoutKey as aC, refElement as aD, VClassIcon as aE, VComponentIcon as aF, VLigatureIcon as aG, VSvgIcon as aH, mergeDeep as aI, createDefaults as aJ, createDisplay as aK, createTheme as aL, createIcons as aM, createLocale as aN, createDate as aO, createGoTo as aP, DefaultsSymbol as aQ, DisplaySymbol as aR, ThemeSymbol as aS, IconSymbol as aT, LocaleSymbol as aU, DateOptionsSymbol as aV, DateAdapterSymbol as aW, GoToSymbol as aX, useDefaults as aY, pickWithRest as aa, keys as ab, getEventCoordinates as ac, HexToHSV as ad, HSVtoHex as ae, HSLtoHSV as af, HSVtoHSL as ag, RGBtoHSV as ah, HSVtoRGB as ai, has as aj, getDecimals as ak, createRange as al, keyValues as am, SUPPORTS_EYE_DROPPER as an, HSVtoCSS as ao, RGBtoCSS as ap, getContrast as aq, isComposingIgnoreKey as ar, getObjectValueByPath as as, isEmpty as at, defineFunctionalComponent as au, breakpoints as av, useDate as aw, getWeek as ax, humanReadableFileSize as ay, provideLocale as az, getCurrentInstance as b, provideTheme as c, createLayout as d, eventName as e, makeLayoutProps as f, genericComponent as g, provideDefaults as h, includes as i, convertToUnit as j, destructComputed as k, isCssColor as l, makeThemeProps as m, isParsableColor as n, parseColor as o, propsFactory as p, getForeground as q, getCurrentInstanceName as r, clamp as s, consoleWarn as t, useRtl as u, useProxiedModel as v, useToggleScope as w, useLayoutItem as x, makeLayoutItemProps as y, getUid as z }; diff --git a/plugins.v2/clashruleprovider/dist/assets/runtime-core.esm-bundler-BQhfUSSX.js b/plugins.v2/clashruleprovider/dist/assets/runtime-core.esm-bundler-BQhfUSSX.js deleted file mode 100644 index a81a3cc..0000000 --- a/plugins.v2/clashruleprovider/dist/assets/runtime-core.esm-bundler-BQhfUSSX.js +++ /dev/null @@ -1,8546 +0,0 @@ -/** -* @vue/shared v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -/*! #__NO_SIDE_EFFECTS__ */ -// @__NO_SIDE_EFFECTS__ -function makeMap(str) { - const map = /* @__PURE__ */ Object.create(null); - for (const key of str.split(",")) map[key] = 1; - return (val) => val in map; -} -const EMPTY_OBJ = {}; -const EMPTY_ARR = []; -const NOOP = () => { -}; -const NO = () => false; -const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter -(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); -const isModelListener = (key) => key.startsWith("onUpdate:"); -const extend = Object.assign; -const remove = (arr, el) => { - const i = arr.indexOf(el); - if (i > -1) { - arr.splice(i, 1); - } -}; -const hasOwnProperty$1 = Object.prototype.hasOwnProperty; -const hasOwn = (val, key) => hasOwnProperty$1.call(val, key); -const isArray = Array.isArray; -const isMap = (val) => toTypeString(val) === "[object Map]"; -const isSet = (val) => toTypeString(val) === "[object Set]"; -const isDate = (val) => toTypeString(val) === "[object Date]"; -const isRegExp = (val) => toTypeString(val) === "[object RegExp]"; -const isFunction = (val) => typeof val === "function"; -const isString = (val) => typeof val === "string"; -const isSymbol = (val) => typeof val === "symbol"; -const isObject = (val) => val !== null && typeof val === "object"; -const isPromise = (val) => { - return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); -}; -const objectToString = Object.prototype.toString; -const toTypeString = (value) => objectToString.call(value); -const toRawType = (value) => { - return toTypeString(value).slice(8, -1); -}; -const isPlainObject = (val) => toTypeString(val) === "[object Object]"; -const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; -const isReservedProp = /* @__PURE__ */ makeMap( - // the leading comma is intentional so empty string "" is also included - ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" -); -const cacheStringFunction = (fn) => { - const cache = /* @__PURE__ */ Object.create(null); - return (str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }; -}; -const camelizeRE = /-(\w)/g; -const camelize = cacheStringFunction( - (str) => { - return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); - } -); -const hyphenateRE = /\B([A-Z])/g; -const hyphenate = cacheStringFunction( - (str) => str.replace(hyphenateRE, "-$1").toLowerCase() -); -const capitalize = cacheStringFunction((str) => { - return str.charAt(0).toUpperCase() + str.slice(1); -}); -const toHandlerKey = cacheStringFunction( - (str) => { - const s = str ? `on${capitalize(str)}` : ``; - return s; - } -); -const hasChanged = (value, oldValue) => !Object.is(value, oldValue); -const invokeArrayFns = (fns, ...arg) => { - for (let i = 0; i < fns.length; i++) { - fns[i](...arg); - } -}; -const def = (obj, key, value, writable = false) => { - Object.defineProperty(obj, key, { - configurable: true, - enumerable: false, - writable, - value - }); -}; -const looseToNumber = (val) => { - const n = parseFloat(val); - return isNaN(n) ? val : n; -}; -const toNumber = (val) => { - const n = isString(val) ? Number(val) : NaN; - return isNaN(n) ? val : n; -}; -let _globalThis; -const getGlobalThis = () => { - return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); -}; -const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol"; -const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); -function normalizeStyle(value) { - if (isArray(value)) { - const res = {}; - for (let i = 0; i < value.length; i++) { - const item = value[i]; - const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); - if (normalized) { - for (const key in normalized) { - res[key] = normalized[key]; - } - } - } - return res; - } else if (isString(value) || isObject(value)) { - return value; - } -} -const listDelimiterRE = /;(?![^(]*\))/g; -const propertyDelimiterRE = /:([^]+)/; -const styleCommentRE = /\/\*[^]*?\*\//g; -function parseStringStyle(cssText) { - const ret = {}; - cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { - if (item) { - const tmp = item.split(propertyDelimiterRE); - tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); - } - }); - return ret; -} -function normalizeClass(value) { - let res = ""; - if (isString(value)) { - res = value; - } else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - const normalized = normalizeClass(value[i]); - if (normalized) { - res += normalized + " "; - } - } - } else if (isObject(value)) { - for (const name in value) { - if (value[name]) { - res += name + " "; - } - } - } - return res.trim(); -} -function normalizeProps(props) { - if (!props) return null; - let { class: klass, style } = props; - if (klass && !isString(klass)) { - props.class = normalizeClass(klass); - } - if (style) { - props.style = normalizeStyle(style); - } - return props; -} -const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; -const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); -function includeBooleanAttr(value) { - return !!value || value === ""; -} -function looseCompareArrays(a, b) { - if (a.length !== b.length) return false; - let equal = true; - for (let i = 0; equal && i < a.length; i++) { - equal = looseEqual(a[i], b[i]); - } - return equal; -} -function looseEqual(a, b) { - if (a === b) return true; - let aValidType = isDate(a); - let bValidType = isDate(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? a.getTime() === b.getTime() : false; - } - aValidType = isSymbol(a); - bValidType = isSymbol(b); - if (aValidType || bValidType) { - return a === b; - } - aValidType = isArray(a); - bValidType = isArray(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? looseCompareArrays(a, b) : false; - } - aValidType = isObject(a); - bValidType = isObject(b); - if (aValidType || bValidType) { - if (!aValidType || !bValidType) { - return false; - } - const aKeysCount = Object.keys(a).length; - const bKeysCount = Object.keys(b).length; - if (aKeysCount !== bKeysCount) { - return false; - } - for (const key in a) { - const aHasKey = a.hasOwnProperty(key); - const bHasKey = b.hasOwnProperty(key); - if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { - return false; - } - } - } - return String(a) === String(b); -} -function looseIndexOf(arr, val) { - return arr.findIndex((item) => looseEqual(item, val)); -} -const isRef$1 = (val) => { - return !!(val && val["__v_isRef"] === true); -}; -const toDisplayString = (val) => { - return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef$1(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val); -}; -const replacer = (_key, val) => { - if (isRef$1(val)) { - return replacer(_key, val.value); - } else if (isMap(val)) { - return { - [`Map(${val.size})`]: [...val.entries()].reduce( - (entries, [key, val2], i) => { - entries[stringifySymbol(key, i) + " =>"] = val2; - return entries; - }, - {} - ) - }; - } else if (isSet(val)) { - return { - [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) - }; - } else if (isSymbol(val)) { - return stringifySymbol(val); - } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { - return String(val); - } - return val; -}; -const stringifySymbol = (v, i = "") => { - var _a; - return ( - // Symbol.description in es2019+ so we need to cast here to pass - // the lib: es2016 check - isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v - ); -}; - -/** -* @vue/reactivity v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -let activeEffectScope; -class EffectScope { - constructor(detached = false) { - this.detached = detached; - this._active = true; - this.effects = []; - this.cleanups = []; - this._isPaused = false; - this.parent = activeEffectScope; - if (!detached && activeEffectScope) { - this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( - this - ) - 1; - } - } - get active() { - return this._active; - } - pause() { - if (this._active) { - this._isPaused = true; - let i, l; - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].pause(); - } - } - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].pause(); - } - } - } - /** - * Resumes the effect scope, including all child scopes and effects. - */ - resume() { - if (this._active) { - if (this._isPaused) { - this._isPaused = false; - let i, l; - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].resume(); - } - } - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].resume(); - } - } - } - } - run(fn) { - if (this._active) { - const currentEffectScope = activeEffectScope; - try { - activeEffectScope = this; - return fn(); - } finally { - activeEffectScope = currentEffectScope; - } - } - } - /** - * This should only be called on non-detached scopes - * @internal - */ - on() { - activeEffectScope = this; - } - /** - * This should only be called on non-detached scopes - * @internal - */ - off() { - activeEffectScope = this.parent; - } - stop(fromParent) { - if (this._active) { - this._active = false; - let i, l; - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].stop(); - } - this.effects.length = 0; - for (i = 0, l = this.cleanups.length; i < l; i++) { - this.cleanups[i](); - } - this.cleanups.length = 0; - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].stop(true); - } - this.scopes.length = 0; - } - if (!this.detached && this.parent && !fromParent) { - const last = this.parent.scopes.pop(); - if (last && last !== this) { - this.parent.scopes[this.index] = last; - last.index = this.index; - } - } - this.parent = void 0; - } - } -} -function effectScope(detached) { - return new EffectScope(detached); -} -function getCurrentScope() { - return activeEffectScope; -} -function onScopeDispose(fn, failSilently = false) { - if (activeEffectScope) { - activeEffectScope.cleanups.push(fn); - } -} -let activeSub; -const pausedQueueEffects = /* @__PURE__ */ new WeakSet(); -class ReactiveEffect { - constructor(fn) { - this.fn = fn; - this.deps = void 0; - this.depsTail = void 0; - this.flags = 1 | 4; - this.next = void 0; - this.cleanup = void 0; - this.scheduler = void 0; - if (activeEffectScope && activeEffectScope.active) { - activeEffectScope.effects.push(this); - } - } - pause() { - this.flags |= 64; - } - resume() { - if (this.flags & 64) { - this.flags &= -65; - if (pausedQueueEffects.has(this)) { - pausedQueueEffects.delete(this); - this.trigger(); - } - } - } - /** - * @internal - */ - notify() { - if (this.flags & 2 && !(this.flags & 32)) { - return; - } - if (!(this.flags & 8)) { - batch(this); - } - } - run() { - if (!(this.flags & 1)) { - return this.fn(); - } - this.flags |= 2; - cleanupEffect(this); - prepareDeps(this); - const prevEffect = activeSub; - const prevShouldTrack = shouldTrack; - activeSub = this; - shouldTrack = true; - try { - return this.fn(); - } finally { - cleanupDeps(this); - activeSub = prevEffect; - shouldTrack = prevShouldTrack; - this.flags &= -3; - } - } - stop() { - if (this.flags & 1) { - for (let link = this.deps; link; link = link.nextDep) { - removeSub(link); - } - this.deps = this.depsTail = void 0; - cleanupEffect(this); - this.onStop && this.onStop(); - this.flags &= -2; - } - } - trigger() { - if (this.flags & 64) { - pausedQueueEffects.add(this); - } else if (this.scheduler) { - this.scheduler(); - } else { - this.runIfDirty(); - } - } - /** - * @internal - */ - runIfDirty() { - if (isDirty(this)) { - this.run(); - } - } - get dirty() { - return isDirty(this); - } -} -let batchDepth = 0; -let batchedSub; -let batchedComputed; -function batch(sub, isComputed = false) { - sub.flags |= 8; - if (isComputed) { - sub.next = batchedComputed; - batchedComputed = sub; - return; - } - sub.next = batchedSub; - batchedSub = sub; -} -function startBatch() { - batchDepth++; -} -function endBatch() { - if (--batchDepth > 0) { - return; - } - if (batchedComputed) { - let e = batchedComputed; - batchedComputed = void 0; - while (e) { - const next = e.next; - e.next = void 0; - e.flags &= -9; - e = next; - } - } - let error; - while (batchedSub) { - let e = batchedSub; - batchedSub = void 0; - while (e) { - const next = e.next; - e.next = void 0; - e.flags &= -9; - if (e.flags & 1) { - try { - ; - e.trigger(); - } catch (err) { - if (!error) error = err; - } - } - e = next; - } - } - if (error) throw error; -} -function prepareDeps(sub) { - for (let link = sub.deps; link; link = link.nextDep) { - link.version = -1; - link.prevActiveLink = link.dep.activeLink; - link.dep.activeLink = link; - } -} -function cleanupDeps(sub) { - let head; - let tail = sub.depsTail; - let link = tail; - while (link) { - const prev = link.prevDep; - if (link.version === -1) { - if (link === tail) tail = prev; - removeSub(link); - removeDep(link); - } else { - head = link; - } - link.dep.activeLink = link.prevActiveLink; - link.prevActiveLink = void 0; - link = prev; - } - sub.deps = head; - sub.depsTail = tail; -} -function isDirty(sub) { - for (let link = sub.deps; link; link = link.nextDep) { - if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) { - return true; - } - } - if (sub._dirty) { - return true; - } - return false; -} -function refreshComputed(computed2) { - if (computed2.flags & 4 && !(computed2.flags & 16)) { - return; - } - computed2.flags &= -17; - if (computed2.globalVersion === globalVersion) { - return; - } - computed2.globalVersion = globalVersion; - const dep = computed2.dep; - computed2.flags |= 2; - if (dep.version > 0 && !computed2.isSSR && computed2.deps && !isDirty(computed2)) { - computed2.flags &= -3; - return; - } - const prevSub = activeSub; - const prevShouldTrack = shouldTrack; - activeSub = computed2; - shouldTrack = true; - try { - prepareDeps(computed2); - const value = computed2.fn(computed2._value); - if (dep.version === 0 || hasChanged(value, computed2._value)) { - computed2._value = value; - dep.version++; - } - } catch (err) { - dep.version++; - throw err; - } finally { - activeSub = prevSub; - shouldTrack = prevShouldTrack; - cleanupDeps(computed2); - computed2.flags &= -3; - } -} -function removeSub(link, soft = false) { - const { dep, prevSub, nextSub } = link; - if (prevSub) { - prevSub.nextSub = nextSub; - link.prevSub = void 0; - } - if (nextSub) { - nextSub.prevSub = prevSub; - link.nextSub = void 0; - } - if (dep.subs === link) { - dep.subs = prevSub; - if (!prevSub && dep.computed) { - dep.computed.flags &= -5; - for (let l = dep.computed.deps; l; l = l.nextDep) { - removeSub(l, true); - } - } - } - if (!soft && !--dep.sc && dep.map) { - dep.map.delete(dep.key); - } -} -function removeDep(link) { - const { prevDep, nextDep } = link; - if (prevDep) { - prevDep.nextDep = nextDep; - link.prevDep = void 0; - } - if (nextDep) { - nextDep.prevDep = prevDep; - link.nextDep = void 0; - } -} -function effect(fn, options) { - if (fn.effect instanceof ReactiveEffect) { - fn = fn.effect.fn; - } - const e = new ReactiveEffect(fn); - if (options) { - extend(e, options); - } - try { - e.run(); - } catch (err) { - e.stop(); - throw err; - } - const runner = e.run.bind(e); - runner.effect = e; - return runner; -} -function stop(runner) { - runner.effect.stop(); -} -let shouldTrack = true; -const trackStack = []; -function pauseTracking() { - trackStack.push(shouldTrack); - shouldTrack = false; -} -function resetTracking() { - const last = trackStack.pop(); - shouldTrack = last === void 0 ? true : last; -} -function cleanupEffect(e) { - const { cleanup } = e; - e.cleanup = void 0; - if (cleanup) { - const prevSub = activeSub; - activeSub = void 0; - try { - cleanup(); - } finally { - activeSub = prevSub; - } - } -} -let globalVersion = 0; -class Link { - constructor(sub, dep) { - this.sub = sub; - this.dep = dep; - this.version = dep.version; - this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0; - } -} -class Dep { - constructor(computed2) { - this.computed = computed2; - this.version = 0; - this.activeLink = void 0; - this.subs = void 0; - this.map = void 0; - this.key = void 0; - this.sc = 0; - } - track(debugInfo) { - if (!activeSub || !shouldTrack || activeSub === this.computed) { - return; - } - let link = this.activeLink; - if (link === void 0 || link.sub !== activeSub) { - link = this.activeLink = new Link(activeSub, this); - if (!activeSub.deps) { - activeSub.deps = activeSub.depsTail = link; - } else { - link.prevDep = activeSub.depsTail; - activeSub.depsTail.nextDep = link; - activeSub.depsTail = link; - } - addSub(link); - } else if (link.version === -1) { - link.version = this.version; - if (link.nextDep) { - const next = link.nextDep; - next.prevDep = link.prevDep; - if (link.prevDep) { - link.prevDep.nextDep = next; - } - link.prevDep = activeSub.depsTail; - link.nextDep = void 0; - activeSub.depsTail.nextDep = link; - activeSub.depsTail = link; - if (activeSub.deps === link) { - activeSub.deps = next; - } - } - } - return link; - } - trigger(debugInfo) { - this.version++; - globalVersion++; - this.notify(debugInfo); - } - notify(debugInfo) { - startBatch(); - try { - if (false) ; - for (let link = this.subs; link; link = link.prevSub) { - if (link.sub.notify()) { - ; - link.sub.dep.notify(); - } - } - } finally { - endBatch(); - } - } -} -function addSub(link) { - link.dep.sc++; - if (link.sub.flags & 4) { - const computed2 = link.dep.computed; - if (computed2 && !link.dep.subs) { - computed2.flags |= 4 | 16; - for (let l = computed2.deps; l; l = l.nextDep) { - addSub(l); - } - } - const currentTail = link.dep.subs; - if (currentTail !== link) { - link.prevSub = currentTail; - if (currentTail) currentTail.nextSub = link; - } - link.dep.subs = link; - } -} -const targetMap = /* @__PURE__ */ new WeakMap(); -const ITERATE_KEY = Symbol( - "" -); -const MAP_KEY_ITERATE_KEY = Symbol( - "" -); -const ARRAY_ITERATE_KEY = Symbol( - "" -); -function track(target, type, key) { - if (shouldTrack && activeSub) { - let depsMap = targetMap.get(target); - if (!depsMap) { - targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); - } - let dep = depsMap.get(key); - if (!dep) { - depsMap.set(key, dep = new Dep()); - dep.map = depsMap; - dep.key = key; - } - { - dep.track(); - } - } -} -function trigger(target, type, key, newValue, oldValue, oldTarget) { - const depsMap = targetMap.get(target); - if (!depsMap) { - globalVersion++; - return; - } - const run = (dep) => { - if (dep) { - { - dep.trigger(); - } - } - }; - startBatch(); - if (type === "clear") { - depsMap.forEach(run); - } else { - const targetIsArray = isArray(target); - const isArrayIndex = targetIsArray && isIntegerKey(key); - if (targetIsArray && key === "length") { - const newLength = Number(newValue); - depsMap.forEach((dep, key2) => { - if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) { - run(dep); - } - }); - } else { - if (key !== void 0 || depsMap.has(void 0)) { - run(depsMap.get(key)); - } - if (isArrayIndex) { - run(depsMap.get(ARRAY_ITERATE_KEY)); - } - switch (type) { - case "add": - if (!targetIsArray) { - run(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - run(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } else if (isArrayIndex) { - run(depsMap.get("length")); - } - break; - case "delete": - if (!targetIsArray) { - run(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - run(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - break; - case "set": - if (isMap(target)) { - run(depsMap.get(ITERATE_KEY)); - } - break; - } - } - } - endBatch(); -} -function getDepFromReactive(object, key) { - const depMap = targetMap.get(object); - return depMap && depMap.get(key); -} -function reactiveReadArray(array) { - const raw = toRaw(array); - if (raw === array) return raw; - track(raw, "iterate", ARRAY_ITERATE_KEY); - return isShallow(array) ? raw : raw.map(toReactive); -} -function shallowReadArray(arr) { - track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY); - return arr; -} -const arrayInstrumentations = { - __proto__: null, - [Symbol.iterator]() { - return iterator(this, Symbol.iterator, toReactive); - }, - concat(...args) { - return reactiveReadArray(this).concat( - ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x) - ); - }, - entries() { - return iterator(this, "entries", (value) => { - value[1] = toReactive(value[1]); - return value; - }); - }, - every(fn, thisArg) { - return apply(this, "every", fn, thisArg, void 0, arguments); - }, - filter(fn, thisArg) { - return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments); - }, - find(fn, thisArg) { - return apply(this, "find", fn, thisArg, toReactive, arguments); - }, - findIndex(fn, thisArg) { - return apply(this, "findIndex", fn, thisArg, void 0, arguments); - }, - findLast(fn, thisArg) { - return apply(this, "findLast", fn, thisArg, toReactive, arguments); - }, - findLastIndex(fn, thisArg) { - return apply(this, "findLastIndex", fn, thisArg, void 0, arguments); - }, - // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement - forEach(fn, thisArg) { - return apply(this, "forEach", fn, thisArg, void 0, arguments); - }, - includes(...args) { - return searchProxy(this, "includes", args); - }, - indexOf(...args) { - return searchProxy(this, "indexOf", args); - }, - join(separator) { - return reactiveReadArray(this).join(separator); - }, - // keys() iterator only reads `length`, no optimisation required - lastIndexOf(...args) { - return searchProxy(this, "lastIndexOf", args); - }, - map(fn, thisArg) { - return apply(this, "map", fn, thisArg, void 0, arguments); - }, - pop() { - return noTracking(this, "pop"); - }, - push(...args) { - return noTracking(this, "push", args); - }, - reduce(fn, ...args) { - return reduce(this, "reduce", fn, args); - }, - reduceRight(fn, ...args) { - return reduce(this, "reduceRight", fn, args); - }, - shift() { - return noTracking(this, "shift"); - }, - // slice could use ARRAY_ITERATE but also seems to beg for range tracking - some(fn, thisArg) { - return apply(this, "some", fn, thisArg, void 0, arguments); - }, - splice(...args) { - return noTracking(this, "splice", args); - }, - toReversed() { - return reactiveReadArray(this).toReversed(); - }, - toSorted(comparer) { - return reactiveReadArray(this).toSorted(comparer); - }, - toSpliced(...args) { - return reactiveReadArray(this).toSpliced(...args); - }, - unshift(...args) { - return noTracking(this, "unshift", args); - }, - values() { - return iterator(this, "values", toReactive); - } -}; -function iterator(self, method, wrapValue) { - const arr = shallowReadArray(self); - const iter = arr[method](); - if (arr !== self && !isShallow(self)) { - iter._next = iter.next; - iter.next = () => { - const result = iter._next(); - if (result.value) { - result.value = wrapValue(result.value); - } - return result; - }; - } - return iter; -} -const arrayProto = Array.prototype; -function apply(self, method, fn, thisArg, wrappedRetFn, args) { - const arr = shallowReadArray(self); - const needsWrap = arr !== self && !isShallow(self); - const methodFn = arr[method]; - if (methodFn !== arrayProto[method]) { - const result2 = methodFn.apply(self, args); - return needsWrap ? toReactive(result2) : result2; - } - let wrappedFn = fn; - if (arr !== self) { - if (needsWrap) { - wrappedFn = function(item, index) { - return fn.call(this, toReactive(item), index, self); - }; - } else if (fn.length > 2) { - wrappedFn = function(item, index) { - return fn.call(this, item, index, self); - }; - } - } - const result = methodFn.call(arr, wrappedFn, thisArg); - return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result; -} -function reduce(self, method, fn, args) { - const arr = shallowReadArray(self); - let wrappedFn = fn; - if (arr !== self) { - if (!isShallow(self)) { - wrappedFn = function(acc, item, index) { - return fn.call(this, acc, toReactive(item), index, self); - }; - } else if (fn.length > 3) { - wrappedFn = function(acc, item, index) { - return fn.call(this, acc, item, index, self); - }; - } - } - return arr[method](wrappedFn, ...args); -} -function searchProxy(self, method, args) { - const arr = toRaw(self); - track(arr, "iterate", ARRAY_ITERATE_KEY); - const res = arr[method](...args); - if ((res === -1 || res === false) && isProxy(args[0])) { - args[0] = toRaw(args[0]); - return arr[method](...args); - } - return res; -} -function noTracking(self, method, args = []) { - pauseTracking(); - startBatch(); - const res = toRaw(self)[method].apply(self, args); - endBatch(); - resetTracking(); - return res; -} -const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); -const builtInSymbols = new Set( - /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) -); -function hasOwnProperty(key) { - if (!isSymbol(key)) key = String(key); - const obj = toRaw(this); - track(obj, "has", key); - return obj.hasOwnProperty(key); -} -class BaseReactiveHandler { - constructor(_isReadonly = false, _isShallow = false) { - this._isReadonly = _isReadonly; - this._isShallow = _isShallow; - } - get(target, key, receiver) { - if (key === "__v_skip") return target["__v_skip"]; - const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow; - if (key === "__v_isReactive") { - return !isReadonly2; - } else if (key === "__v_isReadonly") { - return isReadonly2; - } else if (key === "__v_isShallow") { - return isShallow2; - } else if (key === "__v_raw") { - if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype - // this means the receiver is a user proxy of the reactive proxy - Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { - return target; - } - return; - } - const targetIsArray = isArray(target); - if (!isReadonly2) { - let fn; - if (targetIsArray && (fn = arrayInstrumentations[key])) { - return fn; - } - if (key === "hasOwnProperty") { - return hasOwnProperty; - } - } - const res = Reflect.get( - target, - key, - // if this is a proxy wrapping a ref, return methods using the raw ref - // as receiver so that we don't have to call `toRaw` on the ref in all - // its class methods - isRef(target) ? target : receiver - ); - if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { - return res; - } - if (!isReadonly2) { - track(target, "get", key); - } - if (isShallow2) { - return res; - } - if (isRef(res)) { - return targetIsArray && isIntegerKey(key) ? res : res.value; - } - if (isObject(res)) { - return isReadonly2 ? readonly(res) : reactive(res); - } - return res; - } -} -class MutableReactiveHandler extends BaseReactiveHandler { - constructor(isShallow2 = false) { - super(false, isShallow2); - } - set(target, key, value, receiver) { - let oldValue = target[key]; - if (!this._isShallow) { - const isOldValueReadonly = isReadonly(oldValue); - if (!isShallow(value) && !isReadonly(value)) { - oldValue = toRaw(oldValue); - value = toRaw(value); - } - if (!isArray(target) && isRef(oldValue) && !isRef(value)) { - if (isOldValueReadonly) { - return false; - } else { - oldValue.value = value; - return true; - } - } - } - const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); - const result = Reflect.set( - target, - key, - value, - isRef(target) ? target : receiver - ); - if (target === toRaw(receiver)) { - if (!hadKey) { - trigger(target, "add", key, value); - } else if (hasChanged(value, oldValue)) { - trigger(target, "set", key, value); - } - } - return result; - } - deleteProperty(target, key) { - const hadKey = hasOwn(target, key); - target[key]; - const result = Reflect.deleteProperty(target, key); - if (result && hadKey) { - trigger(target, "delete", key, void 0); - } - return result; - } - has(target, key) { - const result = Reflect.has(target, key); - if (!isSymbol(key) || !builtInSymbols.has(key)) { - track(target, "has", key); - } - return result; - } - ownKeys(target) { - track( - target, - "iterate", - isArray(target) ? "length" : ITERATE_KEY - ); - return Reflect.ownKeys(target); - } -} -class ReadonlyReactiveHandler extends BaseReactiveHandler { - constructor(isShallow2 = false) { - super(true, isShallow2); - } - set(target, key) { - return true; - } - deleteProperty(target, key) { - return true; - } -} -const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); -const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); -const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true); -const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); -const toShallow = (value) => value; -const getProto = (v) => Reflect.getPrototypeOf(v); -function createIterableMethod(method, isReadonly2, isShallow2) { - return function(...args) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const targetIsMap = isMap(rawTarget); - const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; - const isKeyOnly = method === "keys" && targetIsMap; - const innerIterator = target[method](...args); - const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; - !isReadonly2 && track( - rawTarget, - "iterate", - isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY - ); - return { - // iterator protocol - next() { - const { value, done } = innerIterator.next(); - return done ? { value, done } : { - value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), - done - }; - }, - // iterable protocol - [Symbol.iterator]() { - return this; - } - }; - }; -} -function createReadonlyMethod(type) { - return function(...args) { - return type === "delete" ? false : type === "clear" ? void 0 : this; - }; -} -function createInstrumentations(readonly2, shallow) { - const instrumentations = { - get(key) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!readonly2) { - if (hasChanged(key, rawKey)) { - track(rawTarget, "get", key); - } - track(rawTarget, "get", rawKey); - } - const { has } = getProto(rawTarget); - const wrap = shallow ? toShallow : readonly2 ? toReadonly : toReactive; - if (has.call(rawTarget, key)) { - return wrap(target.get(key)); - } else if (has.call(rawTarget, rawKey)) { - return wrap(target.get(rawKey)); - } else if (target !== rawTarget) { - target.get(key); - } - }, - get size() { - const target = this["__v_raw"]; - !readonly2 && track(toRaw(target), "iterate", ITERATE_KEY); - return Reflect.get(target, "size", target); - }, - has(key) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!readonly2) { - if (hasChanged(key, rawKey)) { - track(rawTarget, "has", key); - } - track(rawTarget, "has", rawKey); - } - return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); - }, - forEach(callback, thisArg) { - const observed = this; - const target = observed["__v_raw"]; - const rawTarget = toRaw(target); - const wrap = shallow ? toShallow : readonly2 ? toReadonly : toReactive; - !readonly2 && track(rawTarget, "iterate", ITERATE_KEY); - return target.forEach((value, key) => { - return callback.call(thisArg, wrap(value), wrap(key), observed); - }); - } - }; - extend( - instrumentations, - readonly2 ? { - add: createReadonlyMethod("add"), - set: createReadonlyMethod("set"), - delete: createReadonlyMethod("delete"), - clear: createReadonlyMethod("clear") - } : { - add(value) { - if (!shallow && !isShallow(value) && !isReadonly(value)) { - value = toRaw(value); - } - const target = toRaw(this); - const proto = getProto(target); - const hadKey = proto.has.call(target, value); - if (!hadKey) { - target.add(value); - trigger(target, "add", value, value); - } - return this; - }, - set(key, value) { - if (!shallow && !isShallow(value) && !isReadonly(value)) { - value = toRaw(value); - } - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } - const oldValue = get.call(target, key); - target.set(key, value); - if (!hadKey) { - trigger(target, "add", key, value); - } else if (hasChanged(value, oldValue)) { - trigger(target, "set", key, value); - } - return this; - }, - delete(key) { - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } - get ? get.call(target, key) : void 0; - const result = target.delete(key); - if (hadKey) { - trigger(target, "delete", key, void 0); - } - return result; - }, - clear() { - const target = toRaw(this); - const hadItems = target.size !== 0; - const result = target.clear(); - if (hadItems) { - trigger( - target, - "clear", - void 0, - void 0); - } - return result; - } - } - ); - const iteratorMethods = [ - "keys", - "values", - "entries", - Symbol.iterator - ]; - iteratorMethods.forEach((method) => { - instrumentations[method] = createIterableMethod(method, readonly2, shallow); - }); - return instrumentations; -} -function createInstrumentationGetter(isReadonly2, shallow) { - const instrumentations = createInstrumentations(isReadonly2, shallow); - return (target, key, receiver) => { - if (key === "__v_isReactive") { - return !isReadonly2; - } else if (key === "__v_isReadonly") { - return isReadonly2; - } else if (key === "__v_raw") { - return target; - } - return Reflect.get( - hasOwn(instrumentations, key) && key in target ? instrumentations : target, - key, - receiver - ); - }; -} -const mutableCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(false, false) -}; -const shallowCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(false, true) -}; -const readonlyCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(true, false) -}; -const shallowReadonlyCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(true, true) -}; -const reactiveMap = /* @__PURE__ */ new WeakMap(); -const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); -const readonlyMap = /* @__PURE__ */ new WeakMap(); -const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); -function targetTypeMap(rawType) { - switch (rawType) { - case "Object": - case "Array": - return 1; - case "Map": - case "Set": - case "WeakMap": - case "WeakSet": - return 2; - default: - return 0; - } -} -function getTargetType(value) { - return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value)); -} -function reactive(target) { - if (isReadonly(target)) { - return target; - } - return createReactiveObject( - target, - false, - mutableHandlers, - mutableCollectionHandlers, - reactiveMap - ); -} -function shallowReactive(target) { - return createReactiveObject( - target, - false, - shallowReactiveHandlers, - shallowCollectionHandlers, - shallowReactiveMap - ); -} -function readonly(target) { - return createReactiveObject( - target, - true, - readonlyHandlers, - readonlyCollectionHandlers, - readonlyMap - ); -} -function shallowReadonly(target) { - return createReactiveObject( - target, - true, - shallowReadonlyHandlers, - shallowReadonlyCollectionHandlers, - shallowReadonlyMap - ); -} -function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { - if (!isObject(target)) { - return target; - } - if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { - return target; - } - const existingProxy = proxyMap.get(target); - if (existingProxy) { - return existingProxy; - } - const targetType = getTargetType(target); - if (targetType === 0) { - return target; - } - const proxy = new Proxy( - target, - targetType === 2 ? collectionHandlers : baseHandlers - ); - proxyMap.set(target, proxy); - return proxy; -} -function isReactive(value) { - if (isReadonly(value)) { - return isReactive(value["__v_raw"]); - } - return !!(value && value["__v_isReactive"]); -} -function isReadonly(value) { - return !!(value && value["__v_isReadonly"]); -} -function isShallow(value) { - return !!(value && value["__v_isShallow"]); -} -function isProxy(value) { - return value ? !!value["__v_raw"] : false; -} -function toRaw(observed) { - const raw = observed && observed["__v_raw"]; - return raw ? toRaw(raw) : observed; -} -function markRaw(value) { - if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) { - def(value, "__v_skip", true); - } - return value; -} -const toReactive = (value) => isObject(value) ? reactive(value) : value; -const toReadonly = (value) => isObject(value) ? readonly(value) : value; -function isRef(r) { - return r ? r["__v_isRef"] === true : false; -} -function ref(value) { - return createRef(value, false); -} -function shallowRef(value) { - return createRef(value, true); -} -function createRef(rawValue, shallow) { - if (isRef(rawValue)) { - return rawValue; - } - return new RefImpl(rawValue, shallow); -} -class RefImpl { - constructor(value, isShallow2) { - this.dep = new Dep(); - this["__v_isRef"] = true; - this["__v_isShallow"] = false; - this._rawValue = isShallow2 ? value : toRaw(value); - this._value = isShallow2 ? value : toReactive(value); - this["__v_isShallow"] = isShallow2; - } - get value() { - { - this.dep.track(); - } - return this._value; - } - set value(newValue) { - const oldValue = this._rawValue; - const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue); - newValue = useDirectValue ? newValue : toRaw(newValue); - if (hasChanged(newValue, oldValue)) { - this._rawValue = newValue; - this._value = useDirectValue ? newValue : toReactive(newValue); - { - this.dep.trigger(); - } - } - } -} -function triggerRef(ref2) { - if (ref2.dep) { - { - ref2.dep.trigger(); - } - } -} -function unref(ref2) { - return isRef(ref2) ? ref2.value : ref2; -} -function toValue(source) { - return isFunction(source) ? source() : unref(source); -} -const shallowUnwrapHandlers = { - get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)), - set: (target, key, value, receiver) => { - const oldValue = target[key]; - if (isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } else { - return Reflect.set(target, key, value, receiver); - } - } -}; -function proxyRefs(objectWithRefs) { - return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); -} -class CustomRefImpl { - constructor(factory) { - this["__v_isRef"] = true; - this._value = void 0; - const dep = this.dep = new Dep(); - const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep)); - this._get = get; - this._set = set; - } - get value() { - return this._value = this._get(); - } - set value(newVal) { - this._set(newVal); - } -} -function customRef(factory) { - return new CustomRefImpl(factory); -} -function toRefs(object) { - const ret = isArray(object) ? new Array(object.length) : {}; - for (const key in object) { - ret[key] = propertyToRef(object, key); - } - return ret; -} -class ObjectRefImpl { - constructor(_object, _key, _defaultValue) { - this._object = _object; - this._key = _key; - this._defaultValue = _defaultValue; - this["__v_isRef"] = true; - this._value = void 0; - } - get value() { - const val = this._object[this._key]; - return this._value = val === void 0 ? this._defaultValue : val; - } - set value(newVal) { - this._object[this._key] = newVal; - } - get dep() { - return getDepFromReactive(toRaw(this._object), this._key); - } -} -class GetterRefImpl { - constructor(_getter) { - this._getter = _getter; - this["__v_isRef"] = true; - this["__v_isReadonly"] = true; - this._value = void 0; - } - get value() { - return this._value = this._getter(); - } -} -function toRef(source, key, defaultValue) { - if (isRef(source)) { - return source; - } else if (isFunction(source)) { - return new GetterRefImpl(source); - } else if (isObject(source) && arguments.length > 1) { - return propertyToRef(source, key, defaultValue); - } else { - return ref(source); - } -} -function propertyToRef(source, key, defaultValue) { - const val = source[key]; - return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); -} -class ComputedRefImpl { - constructor(fn, setter, isSSR) { - this.fn = fn; - this.setter = setter; - this._value = void 0; - this.dep = new Dep(this); - this.__v_isRef = true; - this.deps = void 0; - this.depsTail = void 0; - this.flags = 16; - this.globalVersion = globalVersion - 1; - this.next = void 0; - this.effect = this; - this["__v_isReadonly"] = !setter; - this.isSSR = isSSR; - } - /** - * @internal - */ - notify() { - this.flags |= 16; - if (!(this.flags & 8) && // avoid infinite self recursion - activeSub !== this) { - batch(this, true); - return true; - } - } - get value() { - const link = this.dep.track(); - refreshComputed(this); - if (link) { - link.version = this.dep.version; - } - return this._value; - } - set value(newValue) { - if (this.setter) { - this.setter(newValue); - } - } -} -function computed$1(getterOrOptions, debugOptions, isSSR = false) { - let getter; - let setter; - if (isFunction(getterOrOptions)) { - getter = getterOrOptions; - } else { - getter = getterOrOptions.get; - setter = getterOrOptions.set; - } - const cRef = new ComputedRefImpl(getter, setter, isSSR); - return cRef; -} -const TrackOpTypes = { - "GET": "get", - "HAS": "has", - "ITERATE": "iterate" -}; -const TriggerOpTypes = { - "SET": "set", - "ADD": "add", - "DELETE": "delete", - "CLEAR": "clear" -}; -const INITIAL_WATCHER_VALUE = {}; -const cleanupMap = /* @__PURE__ */ new WeakMap(); -let activeWatcher = void 0; -function getCurrentWatcher() { - return activeWatcher; -} -function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) { - if (owner) { - let cleanups = cleanupMap.get(owner); - if (!cleanups) cleanupMap.set(owner, cleanups = []); - cleanups.push(cleanupFn); - } -} -function watch$1(source, cb, options = EMPTY_OBJ) { - const { immediate, deep, once, scheduler, augmentJob, call } = options; - const reactiveGetter = (source2) => { - if (deep) return source2; - if (isShallow(source2) || deep === false || deep === 0) - return traverse(source2, 1); - return traverse(source2); - }; - let effect2; - let getter; - let cleanup; - let boundCleanup; - let forceTrigger = false; - let isMultiSource = false; - if (isRef(source)) { - getter = () => source.value; - forceTrigger = isShallow(source); - } else if (isReactive(source)) { - getter = () => reactiveGetter(source); - forceTrigger = true; - } else if (isArray(source)) { - isMultiSource = true; - forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); - getter = () => source.map((s) => { - if (isRef(s)) { - return s.value; - } else if (isReactive(s)) { - return reactiveGetter(s); - } else if (isFunction(s)) { - return call ? call(s, 2) : s(); - } else ; - }); - } else if (isFunction(source)) { - if (cb) { - getter = call ? () => call(source, 2) : source; - } else { - getter = () => { - if (cleanup) { - pauseTracking(); - try { - cleanup(); - } finally { - resetTracking(); - } - } - const currentEffect = activeWatcher; - activeWatcher = effect2; - try { - return call ? call(source, 3, [boundCleanup]) : source(boundCleanup); - } finally { - activeWatcher = currentEffect; - } - }; - } - } else { - getter = NOOP; - } - if (cb && deep) { - const baseGetter = getter; - const depth = deep === true ? Infinity : deep; - getter = () => traverse(baseGetter(), depth); - } - const scope = getCurrentScope(); - const watchHandle = () => { - effect2.stop(); - if (scope && scope.active) { - remove(scope.effects, effect2); - } - }; - if (once && cb) { - const _cb = cb; - cb = (...args) => { - _cb(...args); - watchHandle(); - }; - } - let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; - const job = (immediateFirstRun) => { - if (!(effect2.flags & 1) || !effect2.dirty && !immediateFirstRun) { - return; - } - if (cb) { - const newValue = effect2.run(); - if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) { - if (cleanup) { - cleanup(); - } - const currentWatcher = activeWatcher; - activeWatcher = effect2; - try { - const args = [ - newValue, - // pass undefined as the old value when it's changed for the first time - oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, - boundCleanup - ]; - call ? call(cb, 3, args) : ( - // @ts-expect-error - cb(...args) - ); - oldValue = newValue; - } finally { - activeWatcher = currentWatcher; - } - } - } else { - effect2.run(); - } - }; - if (augmentJob) { - augmentJob(job); - } - effect2 = new ReactiveEffect(getter); - effect2.scheduler = scheduler ? () => scheduler(job, false) : job; - boundCleanup = (fn) => onWatcherCleanup(fn, false, effect2); - cleanup = effect2.onStop = () => { - const cleanups = cleanupMap.get(effect2); - if (cleanups) { - if (call) { - call(cleanups, 4); - } else { - for (const cleanup2 of cleanups) cleanup2(); - } - cleanupMap.delete(effect2); - } - }; - if (cb) { - if (immediate) { - job(true); - } else { - oldValue = effect2.run(); - } - } else if (scheduler) { - scheduler(job.bind(null, true), true); - } else { - effect2.run(); - } - watchHandle.pause = effect2.pause.bind(effect2); - watchHandle.resume = effect2.resume.bind(effect2); - watchHandle.stop = watchHandle; - return watchHandle; -} -function traverse(value, depth = Infinity, seen) { - if (depth <= 0 || !isObject(value) || value["__v_skip"]) { - return value; - } - seen = seen || /* @__PURE__ */ new Set(); - if (seen.has(value)) { - return value; - } - seen.add(value); - depth--; - if (isRef(value)) { - traverse(value.value, depth, seen); - } else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - traverse(value[i], depth, seen); - } - } else if (isSet(value) || isMap(value)) { - value.forEach((v) => { - traverse(v, depth, seen); - }); - } else if (isPlainObject(value)) { - for (const key in value) { - traverse(value[key], depth, seen); - } - for (const key of Object.getOwnPropertySymbols(value)) { - if (Object.prototype.propertyIsEnumerable.call(value, key)) { - traverse(value[key], depth, seen); - } - } - } - return value; -} - -/** -* @vue/runtime-core v3.5.13 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -const stack = []; -function pushWarningContext(vnode) { - stack.push(vnode); -} -function popWarningContext() { - stack.pop(); -} -let isWarning = false; -function warn$1(msg, ...args) { - if (isWarning) return; - isWarning = true; - pauseTracking(); - const instance = stack.length ? stack[stack.length - 1].component : null; - const appWarnHandler = instance && instance.appContext.config.warnHandler; - const trace = getComponentTrace(); - if (appWarnHandler) { - callWithErrorHandling( - appWarnHandler, - instance, - 11, - [ - // eslint-disable-next-line no-restricted-syntax - msg + args.map((a) => { - var _a, _b; - return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a); - }).join(""), - instance && instance.proxy, - trace.map( - ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` - ).join("\n"), - trace - ] - ); - } else { - const warnArgs = [`[Vue warn]: ${msg}`, ...args]; - if (trace.length && // avoid spamming console during tests - true) { - warnArgs.push(` -`, ...formatTrace(trace)); - } - console.warn(...warnArgs); - } - resetTracking(); - isWarning = false; -} -function getComponentTrace() { - let currentVNode = stack[stack.length - 1]; - if (!currentVNode) { - return []; - } - const normalizedStack = []; - while (currentVNode) { - const last = normalizedStack[0]; - if (last && last.vnode === currentVNode) { - last.recurseCount++; - } else { - normalizedStack.push({ - vnode: currentVNode, - recurseCount: 0 - }); - } - const parentInstance = currentVNode.component && currentVNode.component.parent; - currentVNode = parentInstance && parentInstance.vnode; - } - return normalizedStack; -} -function formatTrace(trace) { - const logs = []; - trace.forEach((entry, i) => { - logs.push(...i === 0 ? [] : [` -`], ...formatTraceEntry(entry)); - }); - return logs; -} -function formatTraceEntry({ vnode, recurseCount }) { - const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; - const isRoot = vnode.component ? vnode.component.parent == null : false; - const open = ` at <${formatComponentName( - vnode.component, - vnode.type, - isRoot - )}`; - const close = `>` + postfix; - return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; -} -function formatProps(props) { - const res = []; - const keys = Object.keys(props); - keys.slice(0, 3).forEach((key) => { - res.push(...formatProp(key, props[key])); - }); - if (keys.length > 3) { - res.push(` ...`); - } - return res; -} -function formatProp(key, value, raw) { - if (isString(value)) { - value = JSON.stringify(value); - return raw ? value : [`${key}=${value}`]; - } else if (typeof value === "number" || typeof value === "boolean" || value == null) { - return raw ? value : [`${key}=${value}`]; - } else if (isRef(value)) { - value = formatProp(key, toRaw(value.value), true); - return raw ? value : [`${key}=Ref<`, value, `>`]; - } else if (isFunction(value)) { - return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; - } else { - value = toRaw(value); - return raw ? value : [`${key}=`, value]; - } -} -function assertNumber(val, type) { - return; -} -const ErrorCodes = { - "SETUP_FUNCTION": 0, - "0": "SETUP_FUNCTION", - "RENDER_FUNCTION": 1, - "1": "RENDER_FUNCTION", - "NATIVE_EVENT_HANDLER": 5, - "5": "NATIVE_EVENT_HANDLER", - "COMPONENT_EVENT_HANDLER": 6, - "6": "COMPONENT_EVENT_HANDLER", - "VNODE_HOOK": 7, - "7": "VNODE_HOOK", - "DIRECTIVE_HOOK": 8, - "8": "DIRECTIVE_HOOK", - "TRANSITION_HOOK": 9, - "9": "TRANSITION_HOOK", - "APP_ERROR_HANDLER": 10, - "10": "APP_ERROR_HANDLER", - "APP_WARN_HANDLER": 11, - "11": "APP_WARN_HANDLER", - "FUNCTION_REF": 12, - "12": "FUNCTION_REF", - "ASYNC_COMPONENT_LOADER": 13, - "13": "ASYNC_COMPONENT_LOADER", - "SCHEDULER": 14, - "14": "SCHEDULER", - "COMPONENT_UPDATE": 15, - "15": "COMPONENT_UPDATE", - "APP_UNMOUNT_CLEANUP": 16, - "16": "APP_UNMOUNT_CLEANUP" -}; -const ErrorTypeStrings$1 = { - ["sp"]: "serverPrefetch hook", - ["bc"]: "beforeCreate hook", - ["c"]: "created hook", - ["bm"]: "beforeMount hook", - ["m"]: "mounted hook", - ["bu"]: "beforeUpdate hook", - ["u"]: "updated", - ["bum"]: "beforeUnmount hook", - ["um"]: "unmounted hook", - ["a"]: "activated hook", - ["da"]: "deactivated hook", - ["ec"]: "errorCaptured hook", - ["rtc"]: "renderTracked hook", - ["rtg"]: "renderTriggered hook", - [0]: "setup function", - [1]: "render function", - [2]: "watcher getter", - [3]: "watcher callback", - [4]: "watcher cleanup function", - [5]: "native event handler", - [6]: "component event handler", - [7]: "vnode hook", - [8]: "directive hook", - [9]: "transition hook", - [10]: "app errorHandler", - [11]: "app warnHandler", - [12]: "ref function", - [13]: "async component loader", - [14]: "scheduler flush", - [15]: "component update", - [16]: "app unmount cleanup function" -}; -function callWithErrorHandling(fn, instance, type, args) { - try { - return args ? fn(...args) : fn(); - } catch (err) { - handleError(err, instance, type); - } -} -function callWithAsyncErrorHandling(fn, instance, type, args) { - if (isFunction(fn)) { - const res = callWithErrorHandling(fn, instance, type, args); - if (res && isPromise(res)) { - res.catch((err) => { - handleError(err, instance, type); - }); - } - return res; - } - if (isArray(fn)) { - const values = []; - for (let i = 0; i < fn.length; i++) { - values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); - } - return values; - } -} -function handleError(err, instance, type, throwInDev = true) { - const contextVNode = instance ? instance.vnode : null; - const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ; - if (instance) { - let cur = instance.parent; - const exposedInstance = instance.proxy; - const errorInfo = `https://vuejs.org/error-reference/#runtime-${type}`; - while (cur) { - const errorCapturedHooks = cur.ec; - if (errorCapturedHooks) { - for (let i = 0; i < errorCapturedHooks.length; i++) { - if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { - return; - } - } - } - cur = cur.parent; - } - if (errorHandler) { - pauseTracking(); - callWithErrorHandling(errorHandler, null, 10, [ - err, - exposedInstance, - errorInfo - ]); - resetTracking(); - return; - } - } - logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction); -} -function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) { - if (throwInProd) { - throw err; - } else { - console.error(err); - } -} -const queue = []; -let flushIndex = -1; -const pendingPostFlushCbs = []; -let activePostFlushCbs = null; -let postFlushIndex = 0; -const resolvedPromise = /* @__PURE__ */ Promise.resolve(); -let currentFlushPromise = null; -function nextTick(fn) { - const p = currentFlushPromise || resolvedPromise; - return fn ? p.then(this ? fn.bind(this) : fn) : p; -} -function findInsertionIndex(id) { - let start = flushIndex + 1; - let end = queue.length; - while (start < end) { - const middle = start + end >>> 1; - const middleJob = queue[middle]; - const middleJobId = getId(middleJob); - if (middleJobId < id || middleJobId === id && middleJob.flags & 2) { - start = middle + 1; - } else { - end = middle; - } - } - return start; -} -function queueJob(job) { - if (!(job.flags & 1)) { - const jobId = getId(job); - const lastJob = queue[queue.length - 1]; - if (!lastJob || // fast path when the job id is larger than the tail - !(job.flags & 2) && jobId >= getId(lastJob)) { - queue.push(job); - } else { - queue.splice(findInsertionIndex(jobId), 0, job); - } - job.flags |= 1; - queueFlush(); - } -} -function queueFlush() { - if (!currentFlushPromise) { - currentFlushPromise = resolvedPromise.then(flushJobs); - } -} -function queuePostFlushCb(cb) { - if (!isArray(cb)) { - if (activePostFlushCbs && cb.id === -1) { - activePostFlushCbs.splice(postFlushIndex + 1, 0, cb); - } else if (!(cb.flags & 1)) { - pendingPostFlushCbs.push(cb); - cb.flags |= 1; - } - } else { - pendingPostFlushCbs.push(...cb); - } - queueFlush(); -} -function flushPreFlushCbs(instance, seen, i = flushIndex + 1) { - for (; i < queue.length; i++) { - const cb = queue[i]; - if (cb && cb.flags & 2) { - if (instance && cb.id !== instance.uid) { - continue; - } - queue.splice(i, 1); - i--; - if (cb.flags & 4) { - cb.flags &= -2; - } - cb(); - if (!(cb.flags & 4)) { - cb.flags &= -2; - } - } - } -} -function flushPostFlushCbs(seen) { - if (pendingPostFlushCbs.length) { - const deduped = [...new Set(pendingPostFlushCbs)].sort( - (a, b) => getId(a) - getId(b) - ); - pendingPostFlushCbs.length = 0; - if (activePostFlushCbs) { - activePostFlushCbs.push(...deduped); - return; - } - activePostFlushCbs = deduped; - for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { - const cb = activePostFlushCbs[postFlushIndex]; - if (cb.flags & 4) { - cb.flags &= -2; - } - if (!(cb.flags & 8)) cb(); - cb.flags &= -2; - } - activePostFlushCbs = null; - postFlushIndex = 0; - } -} -const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id; -function flushJobs(seen) { - try { - for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { - const job = queue[flushIndex]; - if (job && !(job.flags & 8)) { - if (false) ; - if (job.flags & 4) { - job.flags &= ~1; - } - callWithErrorHandling( - job, - job.i, - job.i ? 15 : 14 - ); - if (!(job.flags & 4)) { - job.flags &= ~1; - } - } - } - } finally { - for (; flushIndex < queue.length; flushIndex++) { - const job = queue[flushIndex]; - if (job) { - job.flags &= -2; - } - } - flushIndex = -1; - queue.length = 0; - flushPostFlushCbs(); - currentFlushPromise = null; - if (queue.length || pendingPostFlushCbs.length) { - flushJobs(); - } - } -} -let devtools$1; -let buffer = []; -function setDevtoolsHook$1(hook, target) { - var _a, _b; - devtools$1 = hook; - if (devtools$1) { - devtools$1.enabled = true; - buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args)); - buffer = []; - } else if ( - // handle late devtools injection - only do this if we are in an actual - // browser environment to avoid the timer handle stalling test runner exit - // (#4815) - typeof window !== "undefined" && // some envs mock window but not fully - window.HTMLElement && // also exclude jsdom - // eslint-disable-next-line no-restricted-syntax - !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) - ) { - const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; - replay.push((newHook) => { - setDevtoolsHook$1(newHook, target); - }); - setTimeout(() => { - if (!devtools$1) { - target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; - buffer = []; - } - }, 3e3); - } else { - buffer = []; - } -} -let currentRenderingInstance = null; -let currentScopeId = null; -function setCurrentRenderingInstance(instance) { - const prev = currentRenderingInstance; - currentRenderingInstance = instance; - currentScopeId = instance && instance.type.__scopeId || null; - return prev; -} -function pushScopeId(id) { - currentScopeId = id; -} -function popScopeId() { - currentScopeId = null; -} -const withScopeId = (_id) => withCtx; -function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { - if (!ctx) return fn; - if (fn._n) { - return fn; - } - const renderFnWithContext = (...args) => { - if (renderFnWithContext._d) { - setBlockTracking(-1); - } - const prevInstance = setCurrentRenderingInstance(ctx); - let res; - try { - res = fn(...args); - } finally { - setCurrentRenderingInstance(prevInstance); - if (renderFnWithContext._d) { - setBlockTracking(1); - } - } - return res; - }; - renderFnWithContext._n = true; - renderFnWithContext._c = true; - renderFnWithContext._d = true; - return renderFnWithContext; -} -function withDirectives(vnode, directives) { - if (currentRenderingInstance === null) { - return vnode; - } - const instance = getComponentPublicInstance(currentRenderingInstance); - const bindings = vnode.dirs || (vnode.dirs = []); - for (let i = 0; i < directives.length; i++) { - let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; - if (dir) { - if (isFunction(dir)) { - dir = { - mounted: dir, - updated: dir - }; - } - if (dir.deep) { - traverse(value); - } - bindings.push({ - dir, - instance, - value, - oldValue: void 0, - arg, - modifiers - }); - } - } - return vnode; -} -function invokeDirectiveHook(vnode, prevVNode, instance, name) { - const bindings = vnode.dirs; - const oldBindings = prevVNode && prevVNode.dirs; - for (let i = 0; i < bindings.length; i++) { - const binding = bindings[i]; - if (oldBindings) { - binding.oldValue = oldBindings[i].value; - } - let hook = binding.dir[name]; - if (hook) { - pauseTracking(); - callWithAsyncErrorHandling(hook, instance, 8, [ - vnode.el, - binding, - vnode, - prevVNode - ]); - resetTracking(); - } - } -} -const TeleportEndKey = Symbol("_vte"); -const isTeleport = (type) => type.__isTeleport; -const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ""); -const isTeleportDeferred = (props) => props && (props.defer || props.defer === ""); -const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement; -const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement; -const resolveTarget = (props, select) => { - const targetSelector = props && props.to; - if (isString(targetSelector)) { - if (!select) { - return null; - } else { - const target = select(targetSelector); - return target; - } - } else { - return targetSelector; - } -}; -const TeleportImpl = { - name: "Teleport", - __isTeleport: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) { - const { - mc: mountChildren, - pc: patchChildren, - pbc: patchBlockChildren, - o: { insert, querySelector, createText, createComment } - } = internals; - const disabled = isTeleportDisabled(n2.props); - let { shapeFlag, children, dynamicChildren } = n2; - if (n1 == null) { - const placeholder = n2.el = createText(""); - const mainAnchor = n2.anchor = createText(""); - insert(placeholder, container, anchor); - insert(mainAnchor, container, anchor); - const mount = (container2, anchor2) => { - if (shapeFlag & 16) { - if (parentComponent && parentComponent.isCE) { - parentComponent.ce._teleportTarget = container2; - } - mountChildren( - children, - container2, - anchor2, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - }; - const mountToTarget = () => { - const target = n2.target = resolveTarget(n2.props, querySelector); - const targetAnchor = prepareAnchor(target, n2, createText, insert); - if (target) { - if (namespace !== "svg" && isTargetSVG(target)) { - namespace = "svg"; - } else if (namespace !== "mathml" && isTargetMathML(target)) { - namespace = "mathml"; - } - if (!disabled) { - mount(target, targetAnchor); - updateCssVars(n2, false); - } - } - }; - if (disabled) { - mount(container, mainAnchor); - updateCssVars(n2, true); - } - if (isTeleportDeferred(n2.props)) { - queuePostRenderEffect(() => { - mountToTarget(); - n2.el.__isMounted = true; - }, parentSuspense); - } else { - mountToTarget(); - } - } else { - if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) { - queuePostRenderEffect(() => { - TeleportImpl.process( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - internals - ); - delete n1.el.__isMounted; - }, parentSuspense); - return; - } - n2.el = n1.el; - n2.targetStart = n1.targetStart; - const mainAnchor = n2.anchor = n1.anchor; - const target = n2.target = n1.target; - const targetAnchor = n2.targetAnchor = n1.targetAnchor; - const wasDisabled = isTeleportDisabled(n1.props); - const currentContainer = wasDisabled ? container : target; - const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; - if (namespace === "svg" || isTargetSVG(target)) { - namespace = "svg"; - } else if (namespace === "mathml" || isTargetMathML(target)) { - namespace = "mathml"; - } - if (dynamicChildren) { - patchBlockChildren( - n1.dynamicChildren, - dynamicChildren, - currentContainer, - parentComponent, - parentSuspense, - namespace, - slotScopeIds - ); - traverseStaticChildren(n1, n2, true); - } else if (!optimized) { - patchChildren( - n1, - n2, - currentContainer, - currentAnchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - false - ); - } - if (disabled) { - if (!wasDisabled) { - moveTeleport( - n2, - container, - mainAnchor, - internals, - 1 - ); - } else { - if (n2.props && n1.props && n2.props.to !== n1.props.to) { - n2.props.to = n1.props.to; - } - } - } else { - if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { - const nextTarget = n2.target = resolveTarget( - n2.props, - querySelector - ); - if (nextTarget) { - moveTeleport( - n2, - nextTarget, - null, - internals, - 0 - ); - } - } else if (wasDisabled) { - moveTeleport( - n2, - target, - targetAnchor, - internals, - 1 - ); - } - } - updateCssVars(n2, disabled); - } - }, - remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) { - const { - shapeFlag, - children, - anchor, - targetStart, - targetAnchor, - target, - props - } = vnode; - if (target) { - hostRemove(targetStart); - hostRemove(targetAnchor); - } - doRemove && hostRemove(anchor); - if (shapeFlag & 16) { - const shouldRemove = doRemove || !isTeleportDisabled(props); - for (let i = 0; i < children.length; i++) { - const child = children[i]; - unmount( - child, - parentComponent, - parentSuspense, - shouldRemove, - !!child.dynamicChildren - ); - } - } - }, - move: moveTeleport, - hydrate: hydrateTeleport -}; -function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) { - if (moveType === 0) { - insert(vnode.targetAnchor, container, parentAnchor); - } - const { el, anchor, shapeFlag, children, props } = vnode; - const isReorder = moveType === 2; - if (isReorder) { - insert(el, container, parentAnchor); - } - if (!isReorder || isTeleportDisabled(props)) { - if (shapeFlag & 16) { - for (let i = 0; i < children.length; i++) { - move( - children[i], - container, - parentAnchor, - 2 - ); - } - } - } - if (isReorder) { - insert(anchor, container, parentAnchor); - } -} -function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { - o: { nextSibling, parentNode, querySelector, insert, createText } -}, hydrateChildren) { - const target = vnode.target = resolveTarget( - vnode.props, - querySelector - ); - if (target) { - const disabled = isTeleportDisabled(vnode.props); - const targetNode = target._lpa || target.firstChild; - if (vnode.shapeFlag & 16) { - if (disabled) { - vnode.anchor = hydrateChildren( - nextSibling(node), - vnode, - parentNode(node), - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - vnode.targetStart = targetNode; - vnode.targetAnchor = targetNode && nextSibling(targetNode); - } else { - vnode.anchor = nextSibling(node); - let targetAnchor = targetNode; - while (targetAnchor) { - if (targetAnchor && targetAnchor.nodeType === 8) { - if (targetAnchor.data === "teleport start anchor") { - vnode.targetStart = targetAnchor; - } else if (targetAnchor.data === "teleport anchor") { - vnode.targetAnchor = targetAnchor; - target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor); - break; - } - } - targetAnchor = nextSibling(targetAnchor); - } - if (!vnode.targetAnchor) { - prepareAnchor(target, vnode, createText, insert); - } - hydrateChildren( - targetNode && nextSibling(targetNode), - vnode, - target, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - } - } - updateCssVars(vnode, disabled); - } - return vnode.anchor && nextSibling(vnode.anchor); -} -const Teleport = TeleportImpl; -function updateCssVars(vnode, isDisabled) { - const ctx = vnode.ctx; - if (ctx && ctx.ut) { - let node, anchor; - if (isDisabled) { - node = vnode.el; - anchor = vnode.anchor; - } else { - node = vnode.targetStart; - anchor = vnode.targetAnchor; - } - while (node && node !== anchor) { - if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid); - node = node.nextSibling; - } - ctx.ut(); - } -} -function prepareAnchor(target, vnode, createText, insert) { - const targetStart = vnode.targetStart = createText(""); - const targetAnchor = vnode.targetAnchor = createText(""); - targetStart[TeleportEndKey] = targetAnchor; - if (target) { - insert(targetStart, target); - insert(targetAnchor, target); - } - return targetAnchor; -} -const leaveCbKey = Symbol("_leaveCb"); -const enterCbKey = Symbol("_enterCb"); -function useTransitionState() { - const state = { - isMounted: false, - isLeaving: false, - isUnmounting: false, - leavingVNodes: /* @__PURE__ */ new Map() - }; - onMounted(() => { - state.isMounted = true; - }); - onBeforeUnmount(() => { - state.isUnmounting = true; - }); - return state; -} -const TransitionHookValidator = [Function, Array]; -const BaseTransitionPropsValidators = { - mode: String, - appear: Boolean, - persisted: Boolean, - // enter - onBeforeEnter: TransitionHookValidator, - onEnter: TransitionHookValidator, - onAfterEnter: TransitionHookValidator, - onEnterCancelled: TransitionHookValidator, - // leave - onBeforeLeave: TransitionHookValidator, - onLeave: TransitionHookValidator, - onAfterLeave: TransitionHookValidator, - onLeaveCancelled: TransitionHookValidator, - // appear - onBeforeAppear: TransitionHookValidator, - onAppear: TransitionHookValidator, - onAfterAppear: TransitionHookValidator, - onAppearCancelled: TransitionHookValidator -}; -const recursiveGetSubtree = (instance) => { - const subTree = instance.subTree; - return subTree.component ? recursiveGetSubtree(subTree.component) : subTree; -}; -const BaseTransitionImpl = { - name: `BaseTransition`, - props: BaseTransitionPropsValidators, - setup(props, { slots }) { - const instance = getCurrentInstance(); - const state = useTransitionState(); - return () => { - const children = slots.default && getTransitionRawChildren(slots.default(), true); - if (!children || !children.length) { - return; - } - const child = findNonCommentChild(children); - const rawProps = toRaw(props); - const { mode } = rawProps; - if (state.isLeaving) { - return emptyPlaceholder(child); - } - const innerChild = getInnerChild$1(child); - if (!innerChild) { - return emptyPlaceholder(child); - } - let enterHooks = resolveTransitionHooks( - innerChild, - rawProps, - state, - instance, - // #11061, ensure enterHooks is fresh after clone - (hooks) => enterHooks = hooks - ); - if (innerChild.type !== Comment) { - setTransitionHooks(innerChild, enterHooks); - } - let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree); - if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) { - let leavingHooks = resolveTransitionHooks( - oldInnerChild, - rawProps, - state, - instance - ); - setTransitionHooks(oldInnerChild, leavingHooks); - if (mode === "out-in" && innerChild.type !== Comment) { - state.isLeaving = true; - leavingHooks.afterLeave = () => { - state.isLeaving = false; - if (!(instance.job.flags & 8)) { - instance.update(); - } - delete leavingHooks.afterLeave; - oldInnerChild = void 0; - }; - return emptyPlaceholder(child); - } else if (mode === "in-out" && innerChild.type !== Comment) { - leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { - const leavingVNodesCache = getLeavingNodesForType( - state, - oldInnerChild - ); - leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; - el[leaveCbKey] = () => { - earlyRemove(); - el[leaveCbKey] = void 0; - delete enterHooks.delayedLeave; - oldInnerChild = void 0; - }; - enterHooks.delayedLeave = () => { - delayedLeave(); - delete enterHooks.delayedLeave; - oldInnerChild = void 0; - }; - }; - } else { - oldInnerChild = void 0; - } - } else if (oldInnerChild) { - oldInnerChild = void 0; - } - return child; - }; - } -}; -function findNonCommentChild(children) { - let child = children[0]; - if (children.length > 1) { - for (const c of children) { - if (c.type !== Comment) { - child = c; - break; - } - } - } - return child; -} -const BaseTransition = BaseTransitionImpl; -function getLeavingNodesForType(state, vnode) { - const { leavingVNodes } = state; - let leavingVNodesCache = leavingVNodes.get(vnode.type); - if (!leavingVNodesCache) { - leavingVNodesCache = /* @__PURE__ */ Object.create(null); - leavingVNodes.set(vnode.type, leavingVNodesCache); - } - return leavingVNodesCache; -} -function resolveTransitionHooks(vnode, props, state, instance, postClone) { - const { - appear, - mode, - persisted = false, - onBeforeEnter, - onEnter, - onAfterEnter, - onEnterCancelled, - onBeforeLeave, - onLeave, - onAfterLeave, - onLeaveCancelled, - onBeforeAppear, - onAppear, - onAfterAppear, - onAppearCancelled - } = props; - const key = String(vnode.key); - const leavingVNodesCache = getLeavingNodesForType(state, vnode); - const callHook2 = (hook, args) => { - hook && callWithAsyncErrorHandling( - hook, - instance, - 9, - args - ); - }; - const callAsyncHook = (hook, args) => { - const done = args[1]; - callHook2(hook, args); - if (isArray(hook)) { - if (hook.every((hook2) => hook2.length <= 1)) done(); - } else if (hook.length <= 1) { - done(); - } - }; - const hooks = { - mode, - persisted, - beforeEnter(el) { - let hook = onBeforeEnter; - if (!state.isMounted) { - if (appear) { - hook = onBeforeAppear || onBeforeEnter; - } else { - return; - } - } - if (el[leaveCbKey]) { - el[leaveCbKey]( - true - /* cancelled */ - ); - } - const leavingVNode = leavingVNodesCache[key]; - if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) { - leavingVNode.el[leaveCbKey](); - } - callHook2(hook, [el]); - }, - enter(el) { - let hook = onEnter; - let afterHook = onAfterEnter; - let cancelHook = onEnterCancelled; - if (!state.isMounted) { - if (appear) { - hook = onAppear || onEnter; - afterHook = onAfterAppear || onAfterEnter; - cancelHook = onAppearCancelled || onEnterCancelled; - } else { - return; - } - } - let called = false; - const done = el[enterCbKey] = (cancelled) => { - if (called) return; - called = true; - if (cancelled) { - callHook2(cancelHook, [el]); - } else { - callHook2(afterHook, [el]); - } - if (hooks.delayedLeave) { - hooks.delayedLeave(); - } - el[enterCbKey] = void 0; - }; - if (hook) { - callAsyncHook(hook, [el, done]); - } else { - done(); - } - }, - leave(el, remove2) { - const key2 = String(vnode.key); - if (el[enterCbKey]) { - el[enterCbKey]( - true - /* cancelled */ - ); - } - if (state.isUnmounting) { - return remove2(); - } - callHook2(onBeforeLeave, [el]); - let called = false; - const done = el[leaveCbKey] = (cancelled) => { - if (called) return; - called = true; - remove2(); - if (cancelled) { - callHook2(onLeaveCancelled, [el]); - } else { - callHook2(onAfterLeave, [el]); - } - el[leaveCbKey] = void 0; - if (leavingVNodesCache[key2] === vnode) { - delete leavingVNodesCache[key2]; - } - }; - leavingVNodesCache[key2] = vnode; - if (onLeave) { - callAsyncHook(onLeave, [el, done]); - } else { - done(); - } - }, - clone(vnode2) { - const hooks2 = resolveTransitionHooks( - vnode2, - props, - state, - instance, - postClone - ); - if (postClone) postClone(hooks2); - return hooks2; - } - }; - return hooks; -} -function emptyPlaceholder(vnode) { - if (isKeepAlive(vnode)) { - vnode = cloneVNode(vnode); - vnode.children = null; - return vnode; - } -} -function getInnerChild$1(vnode) { - if (!isKeepAlive(vnode)) { - if (isTeleport(vnode.type) && vnode.children) { - return findNonCommentChild(vnode.children); - } - return vnode; - } - const { shapeFlag, children } = vnode; - if (children) { - if (shapeFlag & 16) { - return children[0]; - } - if (shapeFlag & 32 && isFunction(children.default)) { - return children.default(); - } - } -} -function setTransitionHooks(vnode, hooks) { - if (vnode.shapeFlag & 6 && vnode.component) { - vnode.transition = hooks; - setTransitionHooks(vnode.component.subTree, hooks); - } else if (vnode.shapeFlag & 128) { - vnode.ssContent.transition = hooks.clone(vnode.ssContent); - vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); - } else { - vnode.transition = hooks; - } -} -function getTransitionRawChildren(children, keepComment = false, parentKey) { - let ret = []; - let keyedFragmentCount = 0; - for (let i = 0; i < children.length; i++) { - let child = children[i]; - const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i); - if (child.type === Fragment) { - if (child.patchFlag & 128) keyedFragmentCount++; - ret = ret.concat( - getTransitionRawChildren(child.children, keepComment, key) - ); - } else if (keepComment || child.type !== Comment) { - ret.push(key != null ? cloneVNode(child, { key }) : child); - } - } - if (keyedFragmentCount > 1) { - for (let i = 0; i < ret.length; i++) { - ret[i].patchFlag = -2; - } - } - return ret; -} -/*! #__NO_SIDE_EFFECTS__ */ -// @__NO_SIDE_EFFECTS__ -function defineComponent(options, extraOptions) { - return isFunction(options) ? ( - // #8236: extend call and options.name access are considered side-effects - // by Rollup, so we have to wrap it in a pure-annotated IIFE. - /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))() - ) : options; -} -function useId() { - const i = getCurrentInstance(); - if (i) { - return (i.appContext.config.idPrefix || "v") + "-" + i.ids[0] + i.ids[1]++; - } - return ""; -} -function markAsyncBoundary(instance) { - instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0]; -} -function useTemplateRef(key) { - const i = getCurrentInstance(); - const r = shallowRef(null); - if (i) { - const refs = i.refs === EMPTY_OBJ ? i.refs = {} : i.refs; - { - Object.defineProperty(refs, key, { - enumerable: true, - get: () => r.value, - set: (val) => r.value = val - }); - } - } - const ret = r; - return ret; -} -function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { - if (isArray(rawRef)) { - rawRef.forEach( - (r, i) => setRef( - r, - oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), - parentSuspense, - vnode, - isUnmount - ) - ); - return; - } - if (isAsyncWrapper(vnode) && !isUnmount) { - if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) { - setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree); - } - return; - } - const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el; - const value = isUnmount ? null : refValue; - const { i: owner, r: ref3 } = rawRef; - const oldRef = oldRawRef && oldRawRef.r; - const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs; - const setupState = owner.setupState; - const rawSetupState = toRaw(setupState); - const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => { - return hasOwn(rawSetupState, key); - }; - if (oldRef != null && oldRef !== ref3) { - if (isString(oldRef)) { - refs[oldRef] = null; - if (canSetSetupRef(oldRef)) { - setupState[oldRef] = null; - } - } else if (isRef(oldRef)) { - oldRef.value = null; - } - } - if (isFunction(ref3)) { - callWithErrorHandling(ref3, owner, 12, [value, refs]); - } else { - const _isString = isString(ref3); - const _isRef = isRef(ref3); - if (_isString || _isRef) { - const doSet = () => { - if (rawRef.f) { - const existing = _isString ? canSetSetupRef(ref3) ? setupState[ref3] : refs[ref3] : ref3.value; - if (isUnmount) { - isArray(existing) && remove(existing, refValue); - } else { - if (!isArray(existing)) { - if (_isString) { - refs[ref3] = [refValue]; - if (canSetSetupRef(ref3)) { - setupState[ref3] = refs[ref3]; - } - } else { - ref3.value = [refValue]; - if (rawRef.k) refs[rawRef.k] = ref3.value; - } - } else if (!existing.includes(refValue)) { - existing.push(refValue); - } - } - } else if (_isString) { - refs[ref3] = value; - if (canSetSetupRef(ref3)) { - setupState[ref3] = value; - } - } else if (_isRef) { - ref3.value = value; - if (rawRef.k) refs[rawRef.k] = value; - } else ; - }; - if (value) { - doSet.id = -1; - queuePostRenderEffect(doSet, parentSuspense); - } else { - doSet(); - } - } - } -} -let hasLoggedMismatchError = false; -const logMismatchError = () => { - if (hasLoggedMismatchError) { - return; - } - console.error("Hydration completed but contains mismatches."); - hasLoggedMismatchError = true; -}; -const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject"; -const isMathMLContainer = (container) => container.namespaceURI.includes("MathML"); -const getContainerType = (container) => { - if (container.nodeType !== 1) return void 0; - if (isSVGContainer(container)) return "svg"; - if (isMathMLContainer(container)) return "mathml"; - return void 0; -}; -const isComment = (node) => node.nodeType === 8; -function createHydrationFunctions(rendererInternals) { - const { - mt: mountComponent, - p: patch, - o: { - patchProp, - createText, - nextSibling, - parentNode, - remove: remove2, - insert, - createComment - } - } = rendererInternals; - const hydrate = (vnode, container) => { - if (!container.hasChildNodes()) { - patch(null, vnode, container); - flushPostFlushCbs(); - container._vnode = vnode; - return; - } - hydrateNode(container.firstChild, vnode, null, null, null); - flushPostFlushCbs(); - container._vnode = vnode; - }; - const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { - optimized = optimized || !!vnode.dynamicChildren; - const isFragmentStart = isComment(node) && node.data === "["; - const onMismatch = () => handleMismatch( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - isFragmentStart - ); - const { type, ref: ref3, shapeFlag, patchFlag } = vnode; - let domType = node.nodeType; - vnode.el = node; - if (patchFlag === -2) { - optimized = false; - vnode.dynamicChildren = null; - } - let nextNode = null; - switch (type) { - case Text: - if (domType !== 3) { - if (vnode.children === "") { - insert(vnode.el = createText(""), parentNode(node), node); - nextNode = node; - } else { - nextNode = onMismatch(); - } - } else { - if (node.data !== vnode.children) { - logMismatchError(); - node.data = vnode.children; - } - nextNode = nextSibling(node); - } - break; - case Comment: - if (isTemplateNode(node)) { - nextNode = nextSibling(node); - replaceNode( - vnode.el = node.content.firstChild, - node, - parentComponent - ); - } else if (domType !== 8 || isFragmentStart) { - nextNode = onMismatch(); - } else { - nextNode = nextSibling(node); - } - break; - case Static: - if (isFragmentStart) { - node = nextSibling(node); - domType = node.nodeType; - } - if (domType === 1 || domType === 3) { - nextNode = node; - const needToAdoptContent = !vnode.children.length; - for (let i = 0; i < vnode.staticCount; i++) { - if (needToAdoptContent) - vnode.children += nextNode.nodeType === 1 ? nextNode.outerHTML : nextNode.data; - if (i === vnode.staticCount - 1) { - vnode.anchor = nextNode; - } - nextNode = nextSibling(nextNode); - } - return isFragmentStart ? nextSibling(nextNode) : nextNode; - } else { - onMismatch(); - } - break; - case Fragment: - if (!isFragmentStart) { - nextNode = onMismatch(); - } else { - nextNode = hydrateFragment( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - } - break; - default: - if (shapeFlag & 1) { - if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) { - nextNode = onMismatch(); - } else { - nextNode = hydrateElement( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - } - } else if (shapeFlag & 6) { - vnode.slotScopeIds = slotScopeIds; - const container = parentNode(node); - if (isFragmentStart) { - nextNode = locateClosingAnchor(node); - } else if (isComment(node) && node.data === "teleport start") { - nextNode = locateClosingAnchor(node, node.data, "teleport end"); - } else { - nextNode = nextSibling(node); - } - mountComponent( - vnode, - container, - null, - parentComponent, - parentSuspense, - getContainerType(container), - optimized - ); - if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) { - let subTree; - if (isFragmentStart) { - subTree = createVNode(Fragment); - subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild; - } else { - subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div"); - } - subTree.el = node; - vnode.component.subTree = subTree; - } - } else if (shapeFlag & 64) { - if (domType !== 8) { - nextNode = onMismatch(); - } else { - nextNode = vnode.type.hydrate( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - optimized, - rendererInternals, - hydrateChildren - ); - } - } else if (shapeFlag & 128) { - nextNode = vnode.type.hydrate( - node, - vnode, - parentComponent, - parentSuspense, - getContainerType(parentNode(node)), - slotScopeIds, - optimized, - rendererInternals, - hydrateNode - ); - } else ; - } - if (ref3 != null) { - setRef(ref3, null, parentSuspense, vnode); - } - return nextNode; - }; - const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { - optimized = optimized || !!vnode.dynamicChildren; - const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode; - const forcePatch = type === "input" || type === "option"; - if (forcePatch || patchFlag !== -1) { - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, "created"); - } - let needCallTransitionHooks = false; - if (isTemplateNode(el)) { - needCallTransitionHooks = needTransition( - null, - // no need check parentSuspense in hydration - transition - ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear; - const content = el.content.firstChild; - if (needCallTransitionHooks) { - transition.beforeEnter(content); - } - replaceNode(content, el, parentComponent); - vnode.el = el = content; - } - if (shapeFlag & 16 && // skip if element has innerHTML / textContent - !(props && (props.innerHTML || props.textContent))) { - let next = hydrateChildren( - el.firstChild, - vnode, - el, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - while (next) { - if (!isMismatchAllowed( - el, - 1 - /* CHILDREN */ - )) { - logMismatchError(); - } - const cur = next; - next = next.nextSibling; - remove2(cur); - } - } else if (shapeFlag & 8) { - let clientText = vnode.children; - if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) { - clientText = clientText.slice(1); - } - if (el.textContent !== clientText) { - if (!isMismatchAllowed( - el, - 0 - /* TEXT */ - )) { - logMismatchError(); - } - el.textContent = vnode.children; - } - } - if (props) { - if (forcePatch || !optimized || patchFlag & (16 | 32)) { - const isCustomElement = el.tagName.includes("-"); - for (const key in props) { - if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers - key[0] === "." || isCustomElement) { - patchProp(el, key, null, props[key], void 0, parentComponent); - } - } - } else if (props.onClick) { - patchProp( - el, - "onClick", - null, - props.onClick, - void 0, - parentComponent - ); - } else if (patchFlag & 4 && isReactive(props.style)) { - for (const key in props.style) props.style[key]; - } - } - let vnodeHooks; - if (vnodeHooks = props && props.onVnodeBeforeMount) { - invokeVNodeHook(vnodeHooks, parentComponent, vnode); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); - } - if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) { - queueEffectWithSuspense(() => { - vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); - needCallTransitionHooks && transition.enter(el); - dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); - }, parentSuspense); - } - } - return el.nextSibling; - }; - const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { - optimized = optimized || !!parentVNode.dynamicChildren; - const children = parentVNode.children; - const l = children.length; - for (let i = 0; i < l; i++) { - const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]); - const isText = vnode.type === Text; - if (node) { - if (isText && !optimized) { - if (i + 1 < l && normalizeVNode(children[i + 1]).type === Text) { - insert( - createText( - node.data.slice(vnode.children.length) - ), - container, - nextSibling(node) - ); - node.data = vnode.children; - } - } - node = hydrateNode( - node, - vnode, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - } else if (isText && !vnode.children) { - insert(vnode.el = createText(""), container); - } else { - if (!isMismatchAllowed( - container, - 1 - /* CHILDREN */ - )) { - logMismatchError(); - } - patch( - null, - vnode, - container, - null, - parentComponent, - parentSuspense, - getContainerType(container), - slotScopeIds - ); - } - } - return node; - }; - const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { - const { slotScopeIds: fragmentSlotScopeIds } = vnode; - if (fragmentSlotScopeIds) { - slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; - } - const container = parentNode(node); - const next = hydrateChildren( - nextSibling(node), - vnode, - container, - parentComponent, - parentSuspense, - slotScopeIds, - optimized - ); - if (next && isComment(next) && next.data === "]") { - return nextSibling(vnode.anchor = next); - } else { - logMismatchError(); - insert(vnode.anchor = createComment(`]`), container, next); - return next; - } - }; - const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { - if (!isMismatchAllowed( - node.parentElement, - 1 - /* CHILDREN */ - )) { - logMismatchError(); - } - vnode.el = null; - if (isFragment) { - const end = locateClosingAnchor(node); - while (true) { - const next2 = nextSibling(node); - if (next2 && next2 !== end) { - remove2(next2); - } else { - break; - } - } - } - const next = nextSibling(node); - const container = parentNode(node); - remove2(node); - patch( - null, - vnode, - container, - next, - parentComponent, - parentSuspense, - getContainerType(container), - slotScopeIds - ); - if (parentComponent) { - parentComponent.vnode.el = vnode.el; - updateHOCHostEl(parentComponent, vnode.el); - } - return next; - }; - const locateClosingAnchor = (node, open = "[", close = "]") => { - let match = 0; - while (node) { - node = nextSibling(node); - if (node && isComment(node)) { - if (node.data === open) match++; - if (node.data === close) { - if (match === 0) { - return nextSibling(node); - } else { - match--; - } - } - } - } - return node; - }; - const replaceNode = (newNode, oldNode, parentComponent) => { - const parentNode2 = oldNode.parentNode; - if (parentNode2) { - parentNode2.replaceChild(newNode, oldNode); - } - let parent = parentComponent; - while (parent) { - if (parent.vnode.el === oldNode) { - parent.vnode.el = parent.subTree.el = newNode; - } - parent = parent.parent; - } - }; - const isTemplateNode = (node) => { - return node.nodeType === 1 && node.tagName === "TEMPLATE"; - }; - return [hydrate, hydrateNode]; -} -const allowMismatchAttr = "data-allow-mismatch"; -const MismatchTypeString = { - [ - 0 - /* TEXT */ - ]: "text", - [ - 1 - /* CHILDREN */ - ]: "children", - [ - 2 - /* CLASS */ - ]: "class", - [ - 3 - /* STYLE */ - ]: "style", - [ - 4 - /* ATTRIBUTE */ - ]: "attribute" -}; -function isMismatchAllowed(el, allowedType) { - if (allowedType === 0 || allowedType === 1) { - while (el && !el.hasAttribute(allowMismatchAttr)) { - el = el.parentElement; - } - } - const allowedAttr = el && el.getAttribute(allowMismatchAttr); - if (allowedAttr == null) { - return false; - } else if (allowedAttr === "") { - return true; - } else { - const list = allowedAttr.split(","); - if (allowedType === 0 && list.includes("children")) { - return true; - } - return allowedAttr.split(",").includes(MismatchTypeString[allowedType]); - } -} -const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1)); -const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id)); -const hydrateOnIdle = (timeout = 1e4) => (hydrate) => { - const id = requestIdleCallback(hydrate, { timeout }); - return () => cancelIdleCallback(id); -}; -function elementIsVisibleInViewport(el) { - const { top, left, bottom, right } = el.getBoundingClientRect(); - const { innerHeight, innerWidth } = window; - return (top > 0 && top < innerHeight || bottom > 0 && bottom < innerHeight) && (left > 0 && left < innerWidth || right > 0 && right < innerWidth); -} -const hydrateOnVisible = (opts) => (hydrate, forEach) => { - const ob = new IntersectionObserver((entries) => { - for (const e of entries) { - if (!e.isIntersecting) continue; - ob.disconnect(); - hydrate(); - break; - } - }, opts); - forEach((el) => { - if (!(el instanceof Element)) return; - if (elementIsVisibleInViewport(el)) { - hydrate(); - ob.disconnect(); - return false; - } - ob.observe(el); - }); - return () => ob.disconnect(); -}; -const hydrateOnMediaQuery = (query) => (hydrate) => { - if (query) { - const mql = matchMedia(query); - if (mql.matches) { - hydrate(); - } else { - mql.addEventListener("change", hydrate, { once: true }); - return () => mql.removeEventListener("change", hydrate); - } - } -}; -const hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => { - if (isString(interactions)) interactions = [interactions]; - let hasHydrated = false; - const doHydrate = (e) => { - if (!hasHydrated) { - hasHydrated = true; - teardown(); - hydrate(); - e.target.dispatchEvent(new e.constructor(e.type, e)); - } - }; - const teardown = () => { - forEach((el) => { - for (const i of interactions) { - el.removeEventListener(i, doHydrate); - } - }); - }; - forEach((el) => { - for (const i of interactions) { - el.addEventListener(i, doHydrate, { once: true }); - } - }); - return teardown; -}; -function forEachElement(node, cb) { - if (isComment(node) && node.data === "[") { - let depth = 1; - let next = node.nextSibling; - while (next) { - if (next.nodeType === 1) { - const result = cb(next); - if (result === false) { - break; - } - } else if (isComment(next)) { - if (next.data === "]") { - if (--depth === 0) break; - } else if (next.data === "[") { - depth++; - } - } - next = next.nextSibling; - } - } else { - cb(node); - } -} -const isAsyncWrapper = (i) => !!i.type.__asyncLoader; -/*! #__NO_SIDE_EFFECTS__ */ -// @__NO_SIDE_EFFECTS__ -function defineAsyncComponent(source) { - if (isFunction(source)) { - source = { loader: source }; - } - const { - loader, - loadingComponent, - errorComponent, - delay = 200, - hydrate: hydrateStrategy, - timeout, - // undefined = never times out - suspensible = true, - onError: userOnError - } = source; - let pendingRequest = null; - let resolvedComp; - let retries = 0; - const retry = () => { - retries++; - pendingRequest = null; - return load(); - }; - const load = () => { - let thisRequest; - return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => { - err = err instanceof Error ? err : new Error(String(err)); - if (userOnError) { - return new Promise((resolve2, reject) => { - const userRetry = () => resolve2(retry()); - const userFail = () => reject(err); - userOnError(err, userRetry, userFail, retries + 1); - }); - } else { - throw err; - } - }).then((comp) => { - if (thisRequest !== pendingRequest && pendingRequest) { - return pendingRequest; - } - if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { - comp = comp.default; - } - resolvedComp = comp; - return comp; - })); - }; - return /* @__PURE__ */ defineComponent({ - name: "AsyncComponentWrapper", - __asyncLoader: load, - __asyncHydrate(el, instance, hydrate) { - const doHydrate = hydrateStrategy ? () => { - const teardown = hydrateStrategy( - hydrate, - (cb) => forEachElement(el, cb) - ); - if (teardown) { - (instance.bum || (instance.bum = [])).push(teardown); - } - } : hydrate; - if (resolvedComp) { - doHydrate(); - } else { - load().then(() => !instance.isUnmounted && doHydrate()); - } - }, - get __asyncResolved() { - return resolvedComp; - }, - setup() { - const instance = currentInstance; - markAsyncBoundary(instance); - if (resolvedComp) { - return () => createInnerComp(resolvedComp, instance); - } - const onError = (err) => { - pendingRequest = null; - handleError( - err, - instance, - 13, - !errorComponent - ); - }; - if (suspensible && instance.suspense || isInSSRComponentSetup) { - return load().then((comp) => { - return () => createInnerComp(comp, instance); - }).catch((err) => { - onError(err); - return () => errorComponent ? createVNode(errorComponent, { - error: err - }) : null; - }); - } - const loaded = ref(false); - const error = ref(); - const delayed = ref(!!delay); - if (delay) { - setTimeout(() => { - delayed.value = false; - }, delay); - } - if (timeout != null) { - setTimeout(() => { - if (!loaded.value && !error.value) { - const err = new Error( - `Async component timed out after ${timeout}ms.` - ); - onError(err); - error.value = err; - } - }, timeout); - } - load().then(() => { - loaded.value = true; - if (instance.parent && isKeepAlive(instance.parent.vnode)) { - instance.parent.update(); - } - }).catch((err) => { - onError(err); - error.value = err; - }); - return () => { - if (loaded.value && resolvedComp) { - return createInnerComp(resolvedComp, instance); - } else if (error.value && errorComponent) { - return createVNode(errorComponent, { - error: error.value - }); - } else if (loadingComponent && !delayed.value) { - return createVNode(loadingComponent); - } - }; - } - }); -} -function createInnerComp(comp, parent) { - const { ref: ref22, props, children, ce } = parent.vnode; - const vnode = createVNode(comp, props, children); - vnode.ref = ref22; - vnode.ce = ce; - delete parent.vnode.ce; - return vnode; -} -const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; -const KeepAliveImpl = { - name: `KeepAlive`, - // Marker for special handling inside the renderer. We are not using a === - // check directly on KeepAlive in the renderer, because importing it directly - // would prevent it from being tree-shaken. - __isKeepAlive: true, - props: { - include: [String, RegExp, Array], - exclude: [String, RegExp, Array], - max: [String, Number] - }, - setup(props, { slots }) { - const instance = getCurrentInstance(); - const sharedContext = instance.ctx; - if (!sharedContext.renderer) { - return () => { - const children = slots.default && slots.default(); - return children && children.length === 1 ? children[0] : children; - }; - } - const cache = /* @__PURE__ */ new Map(); - const keys = /* @__PURE__ */ new Set(); - let current = null; - const parentSuspense = instance.suspense; - const { - renderer: { - p: patch, - m: move, - um: _unmount, - o: { createElement } - } - } = sharedContext; - const storageContainer = createElement("div"); - sharedContext.activate = (vnode, container, anchor, namespace, optimized) => { - const instance2 = vnode.component; - move(vnode, container, anchor, 0, parentSuspense); - patch( - instance2.vnode, - vnode, - container, - anchor, - instance2, - parentSuspense, - namespace, - vnode.slotScopeIds, - optimized - ); - queuePostRenderEffect(() => { - instance2.isDeactivated = false; - if (instance2.a) { - invokeArrayFns(instance2.a); - } - const vnodeHook = vnode.props && vnode.props.onVnodeMounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance2.parent, vnode); - } - }, parentSuspense); - }; - sharedContext.deactivate = (vnode) => { - const instance2 = vnode.component; - invalidateMount(instance2.m); - invalidateMount(instance2.a); - move(vnode, storageContainer, null, 1, parentSuspense); - queuePostRenderEffect(() => { - if (instance2.da) { - invokeArrayFns(instance2.da); - } - const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance2.parent, vnode); - } - instance2.isDeactivated = true; - }, parentSuspense); - }; - function unmount(vnode) { - resetShapeFlag(vnode); - _unmount(vnode, instance, parentSuspense, true); - } - function pruneCache(filter) { - cache.forEach((vnode, key) => { - const name = getComponentName(vnode.type); - if (name && !filter(name)) { - pruneCacheEntry(key); - } - }); - } - function pruneCacheEntry(key) { - const cached = cache.get(key); - if (cached && (!current || !isSameVNodeType(cached, current))) { - unmount(cached); - } else if (current) { - resetShapeFlag(current); - } - cache.delete(key); - keys.delete(key); - } - watch( - () => [props.include, props.exclude], - ([include, exclude]) => { - include && pruneCache((name) => matches(include, name)); - exclude && pruneCache((name) => !matches(exclude, name)); - }, - // prune post-render after `current` has been updated - { flush: "post", deep: true } - ); - let pendingCacheKey = null; - const cacheSubtree = () => { - if (pendingCacheKey != null) { - if (isSuspense(instance.subTree.type)) { - queuePostRenderEffect(() => { - cache.set(pendingCacheKey, getInnerChild(instance.subTree)); - }, instance.subTree.suspense); - } else { - cache.set(pendingCacheKey, getInnerChild(instance.subTree)); - } - } - }; - onMounted(cacheSubtree); - onUpdated(cacheSubtree); - onBeforeUnmount(() => { - cache.forEach((cached) => { - const { subTree, suspense } = instance; - const vnode = getInnerChild(subTree); - if (cached.type === vnode.type && cached.key === vnode.key) { - resetShapeFlag(vnode); - const da = vnode.component.da; - da && queuePostRenderEffect(da, suspense); - return; - } - unmount(cached); - }); - }); - return () => { - pendingCacheKey = null; - if (!slots.default) { - return current = null; - } - const children = slots.default(); - const rawVNode = children[0]; - if (children.length > 1) { - current = null; - return children; - } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) { - current = null; - return rawVNode; - } - let vnode = getInnerChild(rawVNode); - if (vnode.type === Comment) { - current = null; - return vnode; - } - const comp = vnode.type; - const name = getComponentName( - isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp - ); - const { include, exclude, max } = props; - if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) { - vnode.shapeFlag &= -257; - current = vnode; - return rawVNode; - } - const key = vnode.key == null ? comp : vnode.key; - const cachedVNode = cache.get(key); - if (vnode.el) { - vnode = cloneVNode(vnode); - if (rawVNode.shapeFlag & 128) { - rawVNode.ssContent = vnode; - } - } - pendingCacheKey = key; - if (cachedVNode) { - vnode.el = cachedVNode.el; - vnode.component = cachedVNode.component; - if (vnode.transition) { - setTransitionHooks(vnode, vnode.transition); - } - vnode.shapeFlag |= 512; - keys.delete(key); - keys.add(key); - } else { - keys.add(key); - if (max && keys.size > parseInt(max, 10)) { - pruneCacheEntry(keys.values().next().value); - } - } - vnode.shapeFlag |= 256; - current = vnode; - return isSuspense(rawVNode.type) ? rawVNode : vnode; - }; - } -}; -const KeepAlive = KeepAliveImpl; -function matches(pattern, name) { - if (isArray(pattern)) { - return pattern.some((p) => matches(p, name)); - } else if (isString(pattern)) { - return pattern.split(",").includes(name); - } else if (isRegExp(pattern)) { - pattern.lastIndex = 0; - return pattern.test(name); - } - return false; -} -function onActivated(hook, target) { - registerKeepAliveHook(hook, "a", target); -} -function onDeactivated(hook, target) { - registerKeepAliveHook(hook, "da", target); -} -function registerKeepAliveHook(hook, type, target = currentInstance) { - const wrappedHook = hook.__wdc || (hook.__wdc = () => { - let current = target; - while (current) { - if (current.isDeactivated) { - return; - } - current = current.parent; - } - return hook(); - }); - injectHook(type, wrappedHook, target); - if (target) { - let current = target.parent; - while (current && current.parent) { - if (isKeepAlive(current.parent.vnode)) { - injectToKeepAliveRoot(wrappedHook, type, target, current); - } - current = current.parent; - } - } -} -function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { - const injected = injectHook( - type, - hook, - keepAliveRoot, - true - /* prepend */ - ); - onUnmounted(() => { - remove(keepAliveRoot[type], injected); - }, target); -} -function resetShapeFlag(vnode) { - vnode.shapeFlag &= -257; - vnode.shapeFlag &= -513; -} -function getInnerChild(vnode) { - return vnode.shapeFlag & 128 ? vnode.ssContent : vnode; -} -function injectHook(type, hook, target = currentInstance, prepend = false) { - if (target) { - const hooks = target[type] || (target[type] = []); - const wrappedHook = hook.__weh || (hook.__weh = (...args) => { - pauseTracking(); - const reset = setCurrentInstance(target); - const res = callWithAsyncErrorHandling(hook, target, type, args); - reset(); - resetTracking(); - return res; - }); - if (prepend) { - hooks.unshift(wrappedHook); - } else { - hooks.push(wrappedHook); - } - return wrappedHook; - } -} -const createHook = (lifecycle) => (hook, target = currentInstance) => { - if (!isInSSRComponentSetup || lifecycle === "sp") { - injectHook(lifecycle, (...args) => hook(...args), target); - } -}; -const onBeforeMount = createHook("bm"); -const onMounted = createHook("m"); -const onBeforeUpdate = createHook( - "bu" -); -const onUpdated = createHook("u"); -const onBeforeUnmount = createHook( - "bum" -); -const onUnmounted = createHook("um"); -const onServerPrefetch = createHook( - "sp" -); -const onRenderTriggered = createHook("rtg"); -const onRenderTracked = createHook("rtc"); -function onErrorCaptured(hook, target = currentInstance) { - injectHook("ec", hook, target); -} -const COMPONENTS = "components"; -const DIRECTIVES = "directives"; -function resolveComponent(name, maybeSelfReference) { - return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; -} -const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); -function resolveDynamicComponent(component) { - if (isString(component)) { - return resolveAsset(COMPONENTS, component, false) || component; - } else { - return component || NULL_DYNAMIC_COMPONENT; - } -} -function resolveDirective(name) { - return resolveAsset(DIRECTIVES, name); -} -function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { - const instance = currentRenderingInstance || currentInstance; - if (instance) { - const Component = instance.type; - if (type === COMPONENTS) { - const selfName = getComponentName( - Component, - false - ); - if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) { - return Component; - } - } - const res = ( - // local registration - // check instance[type] first which is resolved for options API - resolve(instance[type] || Component[type], name) || // global registration - resolve(instance.appContext[type], name) - ); - if (!res && maybeSelfReference) { - return Component; - } - return res; - } -} -function resolve(registry, name) { - return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]); -} -function renderList(source, renderItem, cache, index) { - let ret; - const cached = cache && cache[index]; - const sourceIsArray = isArray(source); - if (sourceIsArray || isString(source)) { - const sourceIsReactiveArray = sourceIsArray && isReactive(source); - let needsWrap = false; - if (sourceIsReactiveArray) { - needsWrap = !isShallow(source); - source = shallowReadArray(source); - } - ret = new Array(source.length); - for (let i = 0, l = source.length; i < l; i++) { - ret[i] = renderItem( - needsWrap ? toReactive(source[i]) : source[i], - i, - void 0, - cached && cached[i] - ); - } - } else if (typeof source === "number") { - ret = new Array(source); - for (let i = 0; i < source; i++) { - ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]); - } - } else if (isObject(source)) { - if (source[Symbol.iterator]) { - ret = Array.from( - source, - (item, i) => renderItem(item, i, void 0, cached && cached[i]) - ); - } else { - const keys = Object.keys(source); - ret = new Array(keys.length); - for (let i = 0, l = keys.length; i < l; i++) { - const key = keys[i]; - ret[i] = renderItem(source[key], key, i, cached && cached[i]); - } - } - } else { - ret = []; - } - if (cache) { - cache[index] = ret; - } - return ret; -} -function createSlots(slots, dynamicSlots) { - for (let i = 0; i < dynamicSlots.length; i++) { - const slot = dynamicSlots[i]; - if (isArray(slot)) { - for (let j = 0; j < slot.length; j++) { - slots[slot[j].name] = slot[j].fn; - } - } else if (slot) { - slots[slot.name] = slot.key ? (...args) => { - const res = slot.fn(...args); - if (res) res.key = slot.key; - return res; - } : slot.fn; - } - } - return slots; -} -function renderSlot(slots, name, props = {}, fallback, noSlotted) { - if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) { - if (name !== "default") props.name = name; - return openBlock(), createBlock( - Fragment, - null, - [createVNode("slot", props, fallback && fallback())], - 64 - ); - } - let slot = slots[name]; - if (slot && slot._c) { - slot._d = false; - } - openBlock(); - const validSlotContent = slot && ensureValidVNode(slot(props)); - const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch - // key attached in the `createSlots` helper, respect that - validSlotContent && validSlotContent.key; - const rendered = createBlock( - Fragment, - { - key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content - (!validSlotContent && fallback ? "_fb" : "") - }, - validSlotContent || (fallback ? fallback() : []), - validSlotContent && slots._ === 1 ? 64 : -2 - ); - if (!noSlotted && rendered.scopeId) { - rendered.slotScopeIds = [rendered.scopeId + "-s"]; - } - if (slot && slot._c) { - slot._d = true; - } - return rendered; -} -function ensureValidVNode(vnodes) { - return vnodes.some((child) => { - if (!isVNode(child)) return true; - if (child.type === Comment) return false; - if (child.type === Fragment && !ensureValidVNode(child.children)) - return false; - return true; - }) ? vnodes : null; -} -function toHandlers(obj, preserveCaseIfNecessary) { - const ret = {}; - for (const key in obj) { - ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key]; - } - return ret; -} -const getPublicInstance = (i) => { - if (!i) return null; - if (isStatefulComponent(i)) return getComponentPublicInstance(i); - return getPublicInstance(i.parent); -}; -const publicPropertiesMap = ( - // Move PURE marker to new line to workaround compiler discarding it - // due to type annotation - /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), { - $: (i) => i, - $el: (i) => i.vnode.el, - $data: (i) => i.data, - $props: (i) => i.props, - $attrs: (i) => i.attrs, - $slots: (i) => i.slots, - $refs: (i) => i.refs, - $parent: (i) => getPublicInstance(i.parent), - $root: (i) => getPublicInstance(i.root), - $host: (i) => i.ce, - $emit: (i) => i.emit, - $options: (i) => resolveMergedOptions(i) , - $forceUpdate: (i) => i.f || (i.f = () => { - queueJob(i.update); - }), - $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), - $watch: (i) => instanceWatch.bind(i) - }) -); -const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key); -const PublicInstanceProxyHandlers = { - get({ _: instance }, key) { - if (key === "__v_skip") { - return true; - } - const { ctx, setupState, data, props, accessCache, type, appContext } = instance; - let normalizedProps; - if (key[0] !== "$") { - const n = accessCache[key]; - if (n !== void 0) { - switch (n) { - case 1: - return setupState[key]; - case 2: - return data[key]; - case 4: - return ctx[key]; - case 3: - return props[key]; - } - } else if (hasSetupBinding(setupState, key)) { - accessCache[key] = 1; - return setupState[key]; - } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { - accessCache[key] = 2; - return data[key]; - } else if ( - // only cache other properties when instance has declared (thus stable) - // props - (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key) - ) { - accessCache[key] = 3; - return props[key]; - } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { - accessCache[key] = 4; - return ctx[key]; - } else if (shouldCacheAccess) { - accessCache[key] = 0; - } - } - const publicGetter = publicPropertiesMap[key]; - let cssModule, globalProperties; - if (publicGetter) { - if (key === "$attrs") { - track(instance.attrs, "get", ""); - } - return publicGetter(instance); - } else if ( - // css module (injected by vue-loader) - (cssModule = type.__cssModules) && (cssModule = cssModule[key]) - ) { - return cssModule; - } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { - accessCache[key] = 4; - return ctx[key]; - } else if ( - // global properties - globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key) - ) { - { - return globalProperties[key]; - } - } else ; - }, - set({ _: instance }, key, value) { - const { data, setupState, ctx } = instance; - if (hasSetupBinding(setupState, key)) { - setupState[key] = value; - return true; - } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { - data[key] = value; - return true; - } else if (hasOwn(instance.props, key)) { - return false; - } - if (key[0] === "$" && key.slice(1) in instance) { - return false; - } else { - { - ctx[key] = value; - } - } - return true; - }, - has({ - _: { data, setupState, accessCache, ctx, appContext, propsOptions } - }, key) { - let normalizedProps; - return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key); - }, - defineProperty(target, key, descriptor) { - if (descriptor.get != null) { - target._.accessCache[key] = 0; - } else if (hasOwn(descriptor, "value")) { - this.set(target, key, descriptor.value, null); - } - return Reflect.defineProperty(target, key, descriptor); - } -}; -const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend({}, PublicInstanceProxyHandlers, { - get(target, key) { - if (key === Symbol.unscopables) { - return; - } - return PublicInstanceProxyHandlers.get(target, key, target); - }, - has(_, key) { - const has = key[0] !== "_" && !isGloballyAllowed(key); - return has; - } -}); -function defineProps() { - return null; -} -function defineEmits() { - return null; -} -function defineExpose(exposed) { -} -function defineOptions(options) { -} -function defineSlots() { - return null; -} -function defineModel() { -} -function withDefaults(props, defaults) { - return null; -} -function useSlots() { - return getContext().slots; -} -function useAttrs() { - return getContext().attrs; -} -function getContext() { - const i = getCurrentInstance(); - return i.setupContext || (i.setupContext = createSetupContext(i)); -} -function normalizePropsOrEmits(props) { - return isArray(props) ? props.reduce( - (normalized, p) => (normalized[p] = null, normalized), - {} - ) : props; -} -function mergeDefaults(raw, defaults) { - const props = normalizePropsOrEmits(raw); - for (const key in defaults) { - if (key.startsWith("__skip")) continue; - let opt = props[key]; - if (opt) { - if (isArray(opt) || isFunction(opt)) { - opt = props[key] = { type: opt, default: defaults[key] }; - } else { - opt.default = defaults[key]; - } - } else if (opt === null) { - opt = props[key] = { default: defaults[key] }; - } else ; - if (opt && defaults[`__skip_${key}`]) { - opt.skipFactory = true; - } - } - return props; -} -function mergeModels(a, b) { - if (!a || !b) return a || b; - if (isArray(a) && isArray(b)) return a.concat(b); - return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b)); -} -function createPropsRestProxy(props, excludedKeys) { - const ret = {}; - for (const key in props) { - if (!excludedKeys.includes(key)) { - Object.defineProperty(ret, key, { - enumerable: true, - get: () => props[key] - }); - } - } - return ret; -} -function withAsyncContext(getAwaitable) { - const ctx = getCurrentInstance(); - let awaitable = getAwaitable(); - unsetCurrentInstance(); - if (isPromise(awaitable)) { - awaitable = awaitable.catch((e) => { - setCurrentInstance(ctx); - throw e; - }); - } - return [awaitable, () => setCurrentInstance(ctx)]; -} -let shouldCacheAccess = true; -function applyOptions(instance) { - const options = resolveMergedOptions(instance); - const publicThis = instance.proxy; - const ctx = instance.ctx; - shouldCacheAccess = false; - if (options.beforeCreate) { - callHook(options.beforeCreate, instance, "bc"); - } - const { - // state - data: dataOptions, - computed: computedOptions, - methods, - watch: watchOptions, - provide: provideOptions, - inject: injectOptions, - // lifecycle - created, - beforeMount, - mounted, - beforeUpdate, - updated, - activated, - deactivated, - beforeDestroy, - beforeUnmount, - destroyed, - unmounted, - render, - renderTracked, - renderTriggered, - errorCaptured, - serverPrefetch, - // public API - expose, - inheritAttrs, - // assets - components, - directives, - filters - } = options; - const checkDuplicateProperties = null; - if (injectOptions) { - resolveInjections(injectOptions, ctx, checkDuplicateProperties); - } - if (methods) { - for (const key in methods) { - const methodHandler = methods[key]; - if (isFunction(methodHandler)) { - { - ctx[key] = methodHandler.bind(publicThis); - } - } - } - } - if (dataOptions) { - const data = dataOptions.call(publicThis, publicThis); - if (!isObject(data)) ; else { - instance.data = reactive(data); - } - } - shouldCacheAccess = true; - if (computedOptions) { - for (const key in computedOptions) { - const opt = computedOptions[key]; - const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP; - const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : NOOP; - const c = computed({ - get, - set - }); - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => c.value, - set: (v) => c.value = v - }); - } - } - if (watchOptions) { - for (const key in watchOptions) { - createWatcher(watchOptions[key], ctx, publicThis, key); - } - } - if (provideOptions) { - const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; - Reflect.ownKeys(provides).forEach((key) => { - provide(key, provides[key]); - }); - } - if (created) { - callHook(created, instance, "c"); - } - function registerLifecycleHook(register, hook) { - if (isArray(hook)) { - hook.forEach((_hook) => register(_hook.bind(publicThis))); - } else if (hook) { - register(hook.bind(publicThis)); - } - } - registerLifecycleHook(onBeforeMount, beforeMount); - registerLifecycleHook(onMounted, mounted); - registerLifecycleHook(onBeforeUpdate, beforeUpdate); - registerLifecycleHook(onUpdated, updated); - registerLifecycleHook(onActivated, activated); - registerLifecycleHook(onDeactivated, deactivated); - registerLifecycleHook(onErrorCaptured, errorCaptured); - registerLifecycleHook(onRenderTracked, renderTracked); - registerLifecycleHook(onRenderTriggered, renderTriggered); - registerLifecycleHook(onBeforeUnmount, beforeUnmount); - registerLifecycleHook(onUnmounted, unmounted); - registerLifecycleHook(onServerPrefetch, serverPrefetch); - if (isArray(expose)) { - if (expose.length) { - const exposed = instance.exposed || (instance.exposed = {}); - expose.forEach((key) => { - Object.defineProperty(exposed, key, { - get: () => publicThis[key], - set: (val) => publicThis[key] = val - }); - }); - } else if (!instance.exposed) { - instance.exposed = {}; - } - } - if (render && instance.render === NOOP) { - instance.render = render; - } - if (inheritAttrs != null) { - instance.inheritAttrs = inheritAttrs; - } - if (components) instance.components = components; - if (directives) instance.directives = directives; - if (serverPrefetch) { - markAsyncBoundary(instance); - } -} -function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) { - if (isArray(injectOptions)) { - injectOptions = normalizeInject(injectOptions); - } - for (const key in injectOptions) { - const opt = injectOptions[key]; - let injected; - if (isObject(opt)) { - if ("default" in opt) { - injected = inject( - opt.from || key, - opt.default, - true - ); - } else { - injected = inject(opt.from || key); - } - } else { - injected = inject(opt); - } - if (isRef(injected)) { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => injected.value, - set: (v) => injected.value = v - }); - } else { - ctx[key] = injected; - } - } -} -function callHook(hook, instance, type) { - callWithAsyncErrorHandling( - isArray(hook) ? hook.map((h2) => h2.bind(instance.proxy)) : hook.bind(instance.proxy), - instance, - type - ); -} -function createWatcher(raw, ctx, publicThis, key) { - let getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; - if (isString(raw)) { - const handler = ctx[raw]; - if (isFunction(handler)) { - { - watch(getter, handler); - } - } - } else if (isFunction(raw)) { - { - watch(getter, raw.bind(publicThis)); - } - } else if (isObject(raw)) { - if (isArray(raw)) { - raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); - } else { - const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; - if (isFunction(handler)) { - watch(getter, handler, raw); - } - } - } else ; -} -function resolveMergedOptions(instance) { - const base = instance.type; - const { mixins, extends: extendsOptions } = base; - const { - mixins: globalMixins, - optionsCache: cache, - config: { optionMergeStrategies } - } = instance.appContext; - const cached = cache.get(base); - let resolved; - if (cached) { - resolved = cached; - } else if (!globalMixins.length && !mixins && !extendsOptions) { - { - resolved = base; - } - } else { - resolved = {}; - if (globalMixins.length) { - globalMixins.forEach( - (m) => mergeOptions(resolved, m, optionMergeStrategies, true) - ); - } - mergeOptions(resolved, base, optionMergeStrategies); - } - if (isObject(base)) { - cache.set(base, resolved); - } - return resolved; -} -function mergeOptions(to, from, strats, asMixin = false) { - const { mixins, extends: extendsOptions } = from; - if (extendsOptions) { - mergeOptions(to, extendsOptions, strats, true); - } - if (mixins) { - mixins.forEach( - (m) => mergeOptions(to, m, strats, true) - ); - } - for (const key in from) { - if (asMixin && key === "expose") ; else { - const strat = internalOptionMergeStrats[key] || strats && strats[key]; - to[key] = strat ? strat(to[key], from[key]) : from[key]; - } - } - return to; -} -const internalOptionMergeStrats = { - data: mergeDataFn, - props: mergeEmitsOrPropsOptions, - emits: mergeEmitsOrPropsOptions, - // objects - methods: mergeObjectOptions, - computed: mergeObjectOptions, - // lifecycle - beforeCreate: mergeAsArray, - created: mergeAsArray, - beforeMount: mergeAsArray, - mounted: mergeAsArray, - beforeUpdate: mergeAsArray, - updated: mergeAsArray, - beforeDestroy: mergeAsArray, - beforeUnmount: mergeAsArray, - destroyed: mergeAsArray, - unmounted: mergeAsArray, - activated: mergeAsArray, - deactivated: mergeAsArray, - errorCaptured: mergeAsArray, - serverPrefetch: mergeAsArray, - // assets - components: mergeObjectOptions, - directives: mergeObjectOptions, - // watch - watch: mergeWatchOptions, - // provide / inject - provide: mergeDataFn, - inject: mergeInject -}; -function mergeDataFn(to, from) { - if (!from) { - return to; - } - if (!to) { - return from; - } - return function mergedDataFn() { - return extend( - isFunction(to) ? to.call(this, this) : to, - isFunction(from) ? from.call(this, this) : from - ); - }; -} -function mergeInject(to, from) { - return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); -} -function normalizeInject(raw) { - if (isArray(raw)) { - const res = {}; - for (let i = 0; i < raw.length; i++) { - res[raw[i]] = raw[i]; - } - return res; - } - return raw; -} -function mergeAsArray(to, from) { - return to ? [...new Set([].concat(to, from))] : from; -} -function mergeObjectOptions(to, from) { - return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from; -} -function mergeEmitsOrPropsOptions(to, from) { - if (to) { - if (isArray(to) && isArray(from)) { - return [.../* @__PURE__ */ new Set([...to, ...from])]; - } - return extend( - /* @__PURE__ */ Object.create(null), - normalizePropsOrEmits(to), - normalizePropsOrEmits(from != null ? from : {}) - ); - } else { - return from; - } -} -function mergeWatchOptions(to, from) { - if (!to) return from; - if (!from) return to; - const merged = extend(/* @__PURE__ */ Object.create(null), to); - for (const key in from) { - merged[key] = mergeAsArray(to[key], from[key]); - } - return merged; -} -function createAppContext() { - return { - app: null, - config: { - isNativeTag: NO, - performance: false, - globalProperties: {}, - optionMergeStrategies: {}, - errorHandler: void 0, - warnHandler: void 0, - compilerOptions: {} - }, - mixins: [], - components: {}, - directives: {}, - provides: /* @__PURE__ */ Object.create(null), - optionsCache: /* @__PURE__ */ new WeakMap(), - propsCache: /* @__PURE__ */ new WeakMap(), - emitsCache: /* @__PURE__ */ new WeakMap() - }; -} -let uid$1 = 0; -function createAppAPI(render, hydrate) { - return function createApp(rootComponent, rootProps = null) { - if (!isFunction(rootComponent)) { - rootComponent = extend({}, rootComponent); - } - if (rootProps != null && !isObject(rootProps)) { - rootProps = null; - } - const context = createAppContext(); - const installedPlugins = /* @__PURE__ */ new WeakSet(); - const pluginCleanupFns = []; - let isMounted = false; - const app = context.app = { - _uid: uid$1++, - _component: rootComponent, - _props: rootProps, - _container: null, - _context: context, - _instance: null, - version, - get config() { - return context.config; - }, - set config(v) { - }, - use(plugin, ...options) { - if (installedPlugins.has(plugin)) ; else if (plugin && isFunction(plugin.install)) { - installedPlugins.add(plugin); - plugin.install(app, ...options); - } else if (isFunction(plugin)) { - installedPlugins.add(plugin); - plugin(app, ...options); - } else ; - return app; - }, - mixin(mixin) { - { - if (!context.mixins.includes(mixin)) { - context.mixins.push(mixin); - } - } - return app; - }, - component(name, component) { - if (!component) { - return context.components[name]; - } - context.components[name] = component; - return app; - }, - directive(name, directive) { - if (!directive) { - return context.directives[name]; - } - context.directives[name] = directive; - return app; - }, - mount(rootContainer, isHydrate, namespace) { - if (!isMounted) { - const vnode = app._ceVNode || createVNode(rootComponent, rootProps); - vnode.appContext = context; - if (namespace === true) { - namespace = "svg"; - } else if (namespace === false) { - namespace = void 0; - } - if (isHydrate && hydrate) { - hydrate(vnode, rootContainer); - } else { - render(vnode, rootContainer, namespace); - } - isMounted = true; - app._container = rootContainer; - rootContainer.__vue_app__ = app; - return getComponentPublicInstance(vnode.component); - } - }, - onUnmount(cleanupFn) { - pluginCleanupFns.push(cleanupFn); - }, - unmount() { - if (isMounted) { - callWithAsyncErrorHandling( - pluginCleanupFns, - app._instance, - 16 - ); - render(null, app._container); - delete app._container.__vue_app__; - } - }, - provide(key, value) { - context.provides[key] = value; - return app; - }, - runWithContext(fn) { - const lastApp = currentApp; - currentApp = app; - try { - return fn(); - } finally { - currentApp = lastApp; - } - } - }; - return app; - }; -} -let currentApp = null; -function provide(key, value) { - if (!currentInstance) ; else { - let provides = currentInstance.provides; - const parentProvides = currentInstance.parent && currentInstance.parent.provides; - if (parentProvides === provides) { - provides = currentInstance.provides = Object.create(parentProvides); - } - provides[key] = value; - } -} -function inject(key, defaultValue, treatDefaultAsFactory = false) { - const instance = currentInstance || currentRenderingInstance; - if (instance || currentApp) { - const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0; - if (provides && key in provides) { - return provides[key]; - } else if (arguments.length > 1) { - return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue; - } else ; - } -} -function hasInjectionContext() { - return !!(currentInstance || currentRenderingInstance || currentApp); -} -const internalObjectProto = {}; -const createInternalObject = () => Object.create(internalObjectProto); -const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto; -function initProps(instance, rawProps, isStateful, isSSR = false) { - const props = {}; - const attrs = createInternalObject(); - instance.propsDefaults = /* @__PURE__ */ Object.create(null); - setFullProps(instance, rawProps, props, attrs); - for (const key in instance.propsOptions[0]) { - if (!(key in props)) { - props[key] = void 0; - } - } - if (isStateful) { - instance.props = isSSR ? props : shallowReactive(props); - } else { - if (!instance.type.props) { - instance.props = attrs; - } else { - instance.props = props; - } - } - instance.attrs = attrs; -} -function updateProps(instance, rawProps, rawPrevProps, optimized) { - const { - props, - attrs, - vnode: { patchFlag } - } = instance; - const rawCurrentProps = toRaw(props); - const [options] = instance.propsOptions; - let hasAttrsChanged = false; - if ( - // always force full diff in dev - // - #1942 if hmr is enabled with sfc component - // - vite#872 non-sfc component used by sfc component - (optimized || patchFlag > 0) && !(patchFlag & 16) - ) { - if (patchFlag & 8) { - const propsToUpdate = instance.vnode.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - let key = propsToUpdate[i]; - if (isEmitListener(instance.emitsOptions, key)) { - continue; - } - const value = rawProps[key]; - if (options) { - if (hasOwn(attrs, key)) { - if (value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } else { - const camelizedKey = camelize(key); - props[camelizedKey] = resolvePropValue( - options, - rawCurrentProps, - camelizedKey, - value, - instance, - false - ); - } - } else { - if (value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } - } - } - } else { - if (setFullProps(instance, rawProps, props, attrs)) { - hasAttrsChanged = true; - } - let kebabKey; - for (const key in rawCurrentProps) { - if (!rawProps || // for camelCase - !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case - // and converted to camelCase (#955) - ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) { - if (options) { - if (rawPrevProps && // for camelCase - (rawPrevProps[key] !== void 0 || // for kebab-case - rawPrevProps[kebabKey] !== void 0)) { - props[key] = resolvePropValue( - options, - rawCurrentProps, - key, - void 0, - instance, - true - ); - } - } else { - delete props[key]; - } - } - } - if (attrs !== rawCurrentProps) { - for (const key in attrs) { - if (!rawProps || !hasOwn(rawProps, key) && true) { - delete attrs[key]; - hasAttrsChanged = true; - } - } - } - } - if (hasAttrsChanged) { - trigger(instance.attrs, "set", ""); - } -} -function setFullProps(instance, rawProps, props, attrs) { - const [options, needCastKeys] = instance.propsOptions; - let hasAttrsChanged = false; - let rawCastValues; - if (rawProps) { - for (let key in rawProps) { - if (isReservedProp(key)) { - continue; - } - const value = rawProps[key]; - let camelKey; - if (options && hasOwn(options, camelKey = camelize(key))) { - if (!needCastKeys || !needCastKeys.includes(camelKey)) { - props[camelKey] = value; - } else { - (rawCastValues || (rawCastValues = {}))[camelKey] = value; - } - } else if (!isEmitListener(instance.emitsOptions, key)) { - if (!(key in attrs) || value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } - } - } - if (needCastKeys) { - const rawCurrentProps = toRaw(props); - const castValues = rawCastValues || EMPTY_OBJ; - for (let i = 0; i < needCastKeys.length; i++) { - const key = needCastKeys[i]; - props[key] = resolvePropValue( - options, - rawCurrentProps, - key, - castValues[key], - instance, - !hasOwn(castValues, key) - ); - } - } - return hasAttrsChanged; -} -function resolvePropValue(options, props, key, value, instance, isAbsent) { - const opt = options[key]; - if (opt != null) { - const hasDefault = hasOwn(opt, "default"); - if (hasDefault && value === void 0) { - const defaultValue = opt.default; - if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) { - const { propsDefaults } = instance; - if (key in propsDefaults) { - value = propsDefaults[key]; - } else { - const reset = setCurrentInstance(instance); - value = propsDefaults[key] = defaultValue.call( - null, - props - ); - reset(); - } - } else { - value = defaultValue; - } - if (instance.ce) { - instance.ce._setProp(key, value); - } - } - if (opt[ - 0 - /* shouldCast */ - ]) { - if (isAbsent && !hasDefault) { - value = false; - } else if (opt[ - 1 - /* shouldCastTrue */ - ] && (value === "" || value === hyphenate(key))) { - value = true; - } - } - } - return value; -} -const mixinPropsCache = /* @__PURE__ */ new WeakMap(); -function normalizePropsOptions(comp, appContext, asMixin = false) { - const cache = asMixin ? mixinPropsCache : appContext.propsCache; - const cached = cache.get(comp); - if (cached) { - return cached; - } - const raw = comp.props; - const normalized = {}; - const needCastKeys = []; - let hasExtends = false; - if (!isFunction(comp)) { - const extendProps = (raw2) => { - hasExtends = true; - const [props, keys] = normalizePropsOptions(raw2, appContext, true); - extend(normalized, props); - if (keys) needCastKeys.push(...keys); - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendProps); - } - if (comp.extends) { - extendProps(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendProps); - } - } - if (!raw && !hasExtends) { - if (isObject(comp)) { - cache.set(comp, EMPTY_ARR); - } - return EMPTY_ARR; - } - if (isArray(raw)) { - for (let i = 0; i < raw.length; i++) { - const normalizedKey = camelize(raw[i]); - if (validatePropName(normalizedKey)) { - normalized[normalizedKey] = EMPTY_OBJ; - } - } - } else if (raw) { - for (const key in raw) { - const normalizedKey = camelize(key); - if (validatePropName(normalizedKey)) { - const opt = raw[key]; - const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt); - const propType = prop.type; - let shouldCast = false; - let shouldCastTrue = true; - if (isArray(propType)) { - for (let index = 0; index < propType.length; ++index) { - const type = propType[index]; - const typeName = isFunction(type) && type.name; - if (typeName === "Boolean") { - shouldCast = true; - break; - } else if (typeName === "String") { - shouldCastTrue = false; - } - } - } else { - shouldCast = isFunction(propType) && propType.name === "Boolean"; - } - prop[ - 0 - /* shouldCast */ - ] = shouldCast; - prop[ - 1 - /* shouldCastTrue */ - ] = shouldCastTrue; - if (shouldCast || hasOwn(prop, "default")) { - needCastKeys.push(normalizedKey); - } - } - } - } - const res = [normalized, needCastKeys]; - if (isObject(comp)) { - cache.set(comp, res); - } - return res; -} -function validatePropName(key) { - if (key[0] !== "$" && !isReservedProp(key)) { - return true; - } - return false; -} -const isInternalKey = (key) => key[0] === "_" || key === "$stable"; -const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; -const normalizeSlot = (key, rawSlot, ctx) => { - if (rawSlot._n) { - return rawSlot; - } - const normalized = withCtx((...args) => { - if (false) ; - return normalizeSlotValue(rawSlot(...args)); - }, ctx); - normalized._c = false; - return normalized; -}; -const normalizeObjectSlots = (rawSlots, slots, instance) => { - const ctx = rawSlots._ctx; - for (const key in rawSlots) { - if (isInternalKey(key)) continue; - const value = rawSlots[key]; - if (isFunction(value)) { - slots[key] = normalizeSlot(key, value, ctx); - } else if (value != null) { - const normalized = normalizeSlotValue(value); - slots[key] = () => normalized; - } - } -}; -const normalizeVNodeSlots = (instance, children) => { - const normalized = normalizeSlotValue(children); - instance.slots.default = () => normalized; -}; -const assignSlots = (slots, children, optimized) => { - for (const key in children) { - if (optimized || key !== "_") { - slots[key] = children[key]; - } - } -}; -const initSlots = (instance, children, optimized) => { - const slots = instance.slots = createInternalObject(); - if (instance.vnode.shapeFlag & 32) { - const type = children._; - if (type) { - assignSlots(slots, children, optimized); - if (optimized) { - def(slots, "_", type, true); - } - } else { - normalizeObjectSlots(children, slots); - } - } else if (children) { - normalizeVNodeSlots(instance, children); - } -}; -const updateSlots = (instance, children, optimized) => { - const { vnode, slots } = instance; - let needDeletionCheck = true; - let deletionComparisonTarget = EMPTY_OBJ; - if (vnode.shapeFlag & 32) { - const type = children._; - if (type) { - if (optimized && type === 1) { - needDeletionCheck = false; - } else { - assignSlots(slots, children, optimized); - } - } else { - needDeletionCheck = !children.$stable; - normalizeObjectSlots(children, slots); - } - deletionComparisonTarget = children; - } else if (children) { - normalizeVNodeSlots(instance, children); - deletionComparisonTarget = { default: 1 }; - } - if (needDeletionCheck) { - for (const key in slots) { - if (!isInternalKey(key) && deletionComparisonTarget[key] == null) { - delete slots[key]; - } - } - } -}; -const queuePostRenderEffect = queueEffectWithSuspense; -function createRenderer(options) { - return baseCreateRenderer(options); -} -function createHydrationRenderer(options) { - return baseCreateRenderer(options, createHydrationFunctions); -} -function baseCreateRenderer(options, createHydrationFns) { - const target = getGlobalThis(); - target.__VUE__ = true; - const { - insert: hostInsert, - remove: hostRemove, - patchProp: hostPatchProp, - createElement: hostCreateElement, - createText: hostCreateText, - createComment: hostCreateComment, - setText: hostSetText, - setElementText: hostSetElementText, - parentNode: hostParentNode, - nextSibling: hostNextSibling, - setScopeId: hostSetScopeId = NOOP, - insertStaticContent: hostInsertStaticContent - } = options; - const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = !!n2.dynamicChildren) => { - if (n1 === n2) { - return; - } - if (n1 && !isSameVNodeType(n1, n2)) { - anchor = getNextHostNode(n1); - unmount(n1, parentComponent, parentSuspense, true); - n1 = null; - } - if (n2.patchFlag === -2) { - optimized = false; - n2.dynamicChildren = null; - } - const { type, ref: ref3, shapeFlag } = n2; - switch (type) { - case Text: - processText(n1, n2, container, anchor); - break; - case Comment: - processCommentNode(n1, n2, container, anchor); - break; - case Static: - if (n1 == null) { - mountStaticNode(n2, container, anchor, namespace); - } - break; - case Fragment: - processFragment( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - break; - default: - if (shapeFlag & 1) { - processElement( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else if (shapeFlag & 6) { - processComponent( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else if (shapeFlag & 64) { - type.process( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - internals - ); - } else if (shapeFlag & 128) { - type.process( - n1, - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - internals - ); - } else ; - } - if (ref3 != null && parentComponent) { - setRef(ref3, n1 && n1.ref, parentSuspense, n2 || n1, !n2); - } - }; - const processText = (n1, n2, container, anchor) => { - if (n1 == null) { - hostInsert( - n2.el = hostCreateText(n2.children), - container, - anchor - ); - } else { - const el = n2.el = n1.el; - if (n2.children !== n1.children) { - hostSetText(el, n2.children); - } - } - }; - const processCommentNode = (n1, n2, container, anchor) => { - if (n1 == null) { - hostInsert( - n2.el = hostCreateComment(n2.children || ""), - container, - anchor - ); - } else { - n2.el = n1.el; - } - }; - const mountStaticNode = (n2, container, anchor, namespace) => { - [n2.el, n2.anchor] = hostInsertStaticContent( - n2.children, - container, - anchor, - namespace, - n2.el, - n2.anchor - ); - }; - const moveStaticNode = ({ el, anchor }, container, nextSibling) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostInsert(el, container, nextSibling); - el = next; - } - hostInsert(anchor, container, nextSibling); - }; - const removeStaticNode = ({ el, anchor }) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostRemove(el); - el = next; - } - hostRemove(anchor); - }; - const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - if (n2.type === "svg") { - namespace = "svg"; - } else if (n2.type === "math") { - namespace = "mathml"; - } - if (n1 == null) { - mountElement( - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else { - patchElement( - n1, - n2, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - }; - const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - let el; - let vnodeHook; - const { props, shapeFlag, transition, dirs } = vnode; - el = vnode.el = hostCreateElement( - vnode.type, - namespace, - props && props.is, - props - ); - if (shapeFlag & 8) { - hostSetElementText(el, vnode.children); - } else if (shapeFlag & 16) { - mountChildren( - vnode.children, - el, - null, - parentComponent, - parentSuspense, - resolveChildrenNamespace(vnode, namespace), - slotScopeIds, - optimized - ); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, "created"); - } - setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); - if (props) { - for (const key in props) { - if (key !== "value" && !isReservedProp(key)) { - hostPatchProp(el, key, null, props[key], namespace, parentComponent); - } - } - if ("value" in props) { - hostPatchProp(el, "value", null, props.value, namespace); - } - if (vnodeHook = props.onVnodeBeforeMount) { - invokeVNodeHook(vnodeHook, parentComponent, vnode); - } - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); - } - const needCallTransitionHooks = needTransition(parentSuspense, transition); - if (needCallTransitionHooks) { - transition.beforeEnter(el); - } - hostInsert(el, container, anchor); - if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); - needCallTransitionHooks && transition.enter(el); - dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); - }, parentSuspense); - } - }; - const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { - if (scopeId) { - hostSetScopeId(el, scopeId); - } - if (slotScopeIds) { - for (let i = 0; i < slotScopeIds.length; i++) { - hostSetScopeId(el, slotScopeIds[i]); - } - } - if (parentComponent) { - let subTree = parentComponent.subTree; - if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) { - const parentVNode = parentComponent.vnode; - setScopeId( - el, - parentVNode, - parentVNode.scopeId, - parentVNode.slotScopeIds, - parentComponent.parent - ); - } - } - }; - const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => { - for (let i = start; i < children.length; i++) { - const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]); - patch( - null, - child, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } - }; - const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - const el = n2.el = n1.el; - let { patchFlag, dynamicChildren, dirs } = n2; - patchFlag |= n1.patchFlag & 16; - const oldProps = n1.props || EMPTY_OBJ; - const newProps = n2.props || EMPTY_OBJ; - let vnodeHook; - parentComponent && toggleRecurse(parentComponent, false); - if (vnodeHook = newProps.onVnodeBeforeUpdate) { - invokeVNodeHook(vnodeHook, parentComponent, n2, n1); - } - if (dirs) { - invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate"); - } - parentComponent && toggleRecurse(parentComponent, true); - if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) { - hostSetElementText(el, ""); - } - if (dynamicChildren) { - patchBlockChildren( - n1.dynamicChildren, - dynamicChildren, - el, - parentComponent, - parentSuspense, - resolveChildrenNamespace(n2, namespace), - slotScopeIds - ); - } else if (!optimized) { - patchChildren( - n1, - n2, - el, - null, - parentComponent, - parentSuspense, - resolveChildrenNamespace(n2, namespace), - slotScopeIds, - false - ); - } - if (patchFlag > 0) { - if (patchFlag & 16) { - patchProps(el, oldProps, newProps, parentComponent, namespace); - } else { - if (patchFlag & 2) { - if (oldProps.class !== newProps.class) { - hostPatchProp(el, "class", null, newProps.class, namespace); - } - } - if (patchFlag & 4) { - hostPatchProp(el, "style", oldProps.style, newProps.style, namespace); - } - if (patchFlag & 8) { - const propsToUpdate = n2.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - const key = propsToUpdate[i]; - const prev = oldProps[key]; - const next = newProps[key]; - if (next !== prev || key === "value") { - hostPatchProp(el, key, prev, next, namespace, parentComponent); - } - } - } - } - if (patchFlag & 1) { - if (n1.children !== n2.children) { - hostSetElementText(el, n2.children); - } - } - } else if (!optimized && dynamicChildren == null) { - patchProps(el, oldProps, newProps, parentComponent, namespace); - } - if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); - dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated"); - }, parentSuspense); - } - }; - const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => { - for (let i = 0; i < newChildren.length; i++) { - const oldVNode = oldChildren[i]; - const newVNode = newChildren[i]; - const container = ( - // oldVNode may be an errored async setup() component inside Suspense - // which will not have a mounted element - oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent - // of the Fragment itself so it can move its children. - (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement - // which also requires the correct parent container - !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything. - oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : ( - // In other cases, the parent container is not actually used so we - // just pass the block element here to avoid a DOM parentNode call. - fallbackContainer - ) - ); - patch( - oldVNode, - newVNode, - container, - null, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - true - ); - } - }; - const patchProps = (el, oldProps, newProps, parentComponent, namespace) => { - if (oldProps !== newProps) { - if (oldProps !== EMPTY_OBJ) { - for (const key in oldProps) { - if (!isReservedProp(key) && !(key in newProps)) { - hostPatchProp( - el, - key, - oldProps[key], - null, - namespace, - parentComponent - ); - } - } - } - for (const key in newProps) { - if (isReservedProp(key)) continue; - const next = newProps[key]; - const prev = oldProps[key]; - if (next !== prev && key !== "value") { - hostPatchProp(el, key, prev, next, namespace, parentComponent); - } - } - if ("value" in newProps) { - hostPatchProp(el, "value", oldProps.value, newProps.value, namespace); - } - } - }; - const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { - const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); - const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); - let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; - if (fragmentSlotScopeIds) { - slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; - } - if (n1 == null) { - hostInsert(fragmentStartAnchor, container, anchor); - hostInsert(fragmentEndAnchor, container, anchor); - mountChildren( - // #10007 - // such fragment like `<>` will be compiled into - // a fragment which doesn't have a children. - // In this case fallback to an empty array - n2.children || [], - container, - fragmentEndAnchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized - ); - } else { - if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result - // of renderSlot() with no valid children - n1.dynamicChildren) { - patchBlockChildren( - n1.dynamicChildren, - dynamicChildren, - container, - parentComponent, - parentSuspense, - namespace, - slotScopeIds - ); - if ( - // #2080 if the stable fragment has a key, it's a