var _a2, _b; function makeMap(str, expectsLowerCase) { const map2 = /* @__PURE__ */ Object.create(null); const list = str.split(","); for (let i2 = 0; i2 < list.length; i2++) { map2[list[i2]] = true; } return expectsLowerCase ? (val) => !!map2[val.toLowerCase()] : (val) => !!map2[val]; } function normalizeStyle(value) { if (isArray$1(value)) { const res = {}; for (let i2 = 0; i2 < value.length; i2++) { const item = value[i2]; const normalized = isString$1(item) ? parseStringStyle(item) : normalizeStyle(item); if (normalized) { for (const key in normalized) { res[key] = normalized[key]; } } } return res; } else if (isString$1(value)) { return value; } else if (isObject(value)) { return value; } } const listDelimiterRE = /;(?![^(]*\))/g; const propertyDelimiterRE = /:([^]+)/; const styleCommentRE = /\/\*.*?\*\//gs; 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$1(value)) { res = value; } else if (isArray$1(value)) { for (let i2 = 0; i2 < value.length; i2++) { const normalized = normalizeClass(value[i2]); 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$1(klass)) { props.class = normalizeClass(klass); } if (style) { props.style = normalizeStyle(style); } return props; } const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); function includeBooleanAttr(value) { return !!value || value === ""; } const toDisplayString = (val) => { return isString$1(val) ? val : val == null ? "" : isArray$1(val) || isObject(val) && (val.toString === objectToString || !isFunction$1(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val); }; const replacer = (_key, val) => { if (val && val.__v_isRef) { return replacer(_key, val.value); } else if (isMap(val)) { return { [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val2]) => { entries[`${key} =>`] = val2; return entries; }, {}) }; } else if (isSet(val)) { return { [`Set(${val.size})`]: [...val.values()] }; } else if (isObject(val) && !isArray$1(val) && !isPlainObject$1(val)) { return String(val); } return val; }; const EMPTY_OBJ = Object.freeze({}); const EMPTY_ARR = Object.freeze([]); const NOOP = () => { }; const NO = () => false; const onRE = /^on[^a-z]/; const isOn = (key) => onRE.test(key); const isModelListener = (key) => key.startsWith("onUpdate:"); const extend = Object.assign; const remove = (arr, el2) => { const i2 = arr.indexOf(el2); if (i2 > -1) { arr.splice(i2, 1); } }; const hasOwnProperty$1 = Object.prototype.hasOwnProperty; const hasOwn = (val, key) => hasOwnProperty$1.call(val, key); const isArray$1 = Array.isArray; const isMap = (val) => toTypeString(val) === "[object Map]"; const isSet = (val) => toTypeString(val) === "[object Set]"; const isFunction$1 = (val) => typeof val === "function"; const isString$1 = (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$1(val.then) && isFunction$1(val.catch); }; const objectToString = Object.prototype.toString; const toTypeString = (value) => objectToString.call(value); const toRawType = (value) => { return toTypeString(value).slice(8, -1); }; const isPlainObject$1 = (val) => toTypeString(val) === "[object Object]"; const isIntegerKey = (key) => isString$1(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 isBuiltInDirective = /* @__PURE__ */ makeMap("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"); const cacheStringFunction = (fn2) => { const cache2 = /* @__PURE__ */ Object.create(null); return (str) => { const hit = cache2[str]; return hit || (cache2[str] = fn2(str)); }; }; const camelizeRE = /-(\w)/g; const camelize = cacheStringFunction((str) => { return str.replace(camelizeRE, (_, c2) => c2 ? c2.toUpperCase() : ""); }); const hyphenateRE = /\B([A-Z])/g; const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase()); const capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1)); const toHandlerKey = cacheStringFunction((str) => str ? `on${capitalize(str)}` : ``); const hasChanged = (value, oldValue) => !Object.is(value, oldValue); const invokeArrayFns = (fns, arg) => { for (let i2 = 0; i2 < fns.length; i2++) { fns[i2](arg); } }; const def = (obj, key, value) => { Object.defineProperty(obj, key, { configurable: true, enumerable: false, value }); }; const looseToNumber = (val) => { const n2 = parseFloat(val); return isNaN(n2) ? val : n2; }; const toNumber = (val) => { const n2 = isString$1(val) ? Number(val) : NaN; return isNaN(n2) ? val : n2; }; let _globalThis; const getGlobalThis = () => { return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); }; function warn$1(msg, ...args) { console.warn(`[Vue warn] ${msg}`, ...args); } let activeEffectScope; class EffectScope { constructor(detached = false) { this.detached = detached; this._active = true; this.effects = []; this.cleanups = []; this.parent = activeEffectScope; if (!detached && activeEffectScope) { this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1; } } get active() { return this._active; } run(fn2) { if (this._active) { const currentEffectScope = activeEffectScope; try { activeEffectScope = this; return fn2(); } finally { activeEffectScope = currentEffectScope; } } else { warn$1(`cannot run an inactive effect scope.`); } } /** * 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) { let i2, l; for (i2 = 0, l = this.effects.length; i2 < l; i2++) { this.effects[i2].stop(); } for (i2 = 0, l = this.cleanups.length; i2 < l; i2++) { this.cleanups[i2](); } if (this.scopes) { for (i2 = 0, l = this.scopes.length; i2 < l; i2++) { this.scopes[i2].stop(true); } } 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; this._active = false; } } } function effectScope(detached) { return new EffectScope(detached); } function recordEffectScope(effect, scope = activeEffectScope) { if (scope && scope.active) { scope.effects.push(effect); } } function getCurrentScope() { return activeEffectScope; } function onScopeDispose(fn2) { if (activeEffectScope) { activeEffectScope.cleanups.push(fn2); } else { warn$1(`onScopeDispose() is called when there is no active effect scope to be associated with.`); } } const createDep = (effects) => { const dep = new Set(effects); dep.w = 0; dep.n = 0; return dep; }; const wasTracked = (dep) => (dep.w & trackOpBit) > 0; const newTracked = (dep) => (dep.n & trackOpBit) > 0; const initDepMarkers = ({ deps }) => { if (deps.length) { for (let i2 = 0; i2 < deps.length; i2++) { deps[i2].w |= trackOpBit; } } }; const finalizeDepMarkers = (effect) => { const { deps } = effect; if (deps.length) { let ptr = 0; for (let i2 = 0; i2 < deps.length; i2++) { const dep = deps[i2]; if (wasTracked(dep) && !newTracked(dep)) { dep.delete(effect); } else { deps[ptr++] = dep; } dep.w &= ~trackOpBit; dep.n &= ~trackOpBit; } deps.length = ptr; } }; const targetMap = /* @__PURE__ */ new WeakMap(); let effectTrackDepth = 0; let trackOpBit = 1; const maxMarkerBits = 30; let activeEffect; const ITERATE_KEY = Symbol("iterate"); const MAP_KEY_ITERATE_KEY = Symbol("Map key iterate"); class ReactiveEffect { constructor(fn2, scheduler = null, scope) { this.fn = fn2; this.scheduler = scheduler; this.active = true; this.deps = []; this.parent = void 0; recordEffectScope(this, scope); } run() { if (!this.active) { return this.fn(); } let parent = activeEffect; let lastShouldTrack = shouldTrack; while (parent) { if (parent === this) { return; } parent = parent.parent; } try { this.parent = activeEffect; activeEffect = this; shouldTrack = true; trackOpBit = 1 << ++effectTrackDepth; if (effectTrackDepth <= maxMarkerBits) { initDepMarkers(this); } else { cleanupEffect(this); } return this.fn(); } finally { if (effectTrackDepth <= maxMarkerBits) { finalizeDepMarkers(this); } trackOpBit = 1 << --effectTrackDepth; activeEffect = this.parent; shouldTrack = lastShouldTrack; this.parent = void 0; if (this.deferStop) { this.stop(); } } } stop() { if (activeEffect === this) { this.deferStop = true; } else if (this.active) { cleanupEffect(this); if (this.onStop) { this.onStop(); } this.active = false; } } } function cleanupEffect(effect) { const { deps } = effect; if (deps.length) { for (let i2 = 0; i2 < deps.length; i2++) { deps[i2].delete(effect); } deps.length = 0; } } 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 track(target, type, key) { if (shouldTrack && activeEffect) { 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 = createDep()); } const eventInfo = { effect: activeEffect, target, type, key }; trackEffects(dep, eventInfo); } } function trackEffects(dep, debuggerEventExtraInfo) { let shouldTrack2 = false; if (effectTrackDepth <= maxMarkerBits) { if (!newTracked(dep)) { dep.n |= trackOpBit; shouldTrack2 = !wasTracked(dep); } } else { shouldTrack2 = !dep.has(activeEffect); } if (shouldTrack2) { dep.add(activeEffect); activeEffect.deps.push(dep); if (activeEffect.onTrack) { activeEffect.onTrack(Object.assign({ effect: activeEffect }, debuggerEventExtraInfo)); } } } function trigger(target, type, key, newValue, oldValue, oldTarget) { const depsMap = targetMap.get(target); if (!depsMap) { return; } let deps = []; if (type === "clear") { deps = [...depsMap.values()]; } else if (key === "length" && isArray$1(target)) { const newLength = Number(newValue); depsMap.forEach((dep, key2) => { if (key2 === "length" || key2 >= newLength) { deps.push(dep); } }); } else { if (key !== void 0) { deps.push(depsMap.get(key)); } switch (type) { case "add": if (!isArray$1(target)) { deps.push(depsMap.get(ITERATE_KEY)); if (isMap(target)) { deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); } } else if (isIntegerKey(key)) { deps.push(depsMap.get("length")); } break; case "delete": if (!isArray$1(target)) { deps.push(depsMap.get(ITERATE_KEY)); if (isMap(target)) { deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); } } break; case "set": if (isMap(target)) { deps.push(depsMap.get(ITERATE_KEY)); } break; } } const eventInfo = { target, type, key, newValue, oldValue, oldTarget }; if (deps.length === 1) { if (deps[0]) { { triggerEffects(deps[0], eventInfo); } } } else { const effects = []; for (const dep of deps) { if (dep) { effects.push(...dep); } } { triggerEffects(createDep(effects), eventInfo); } } } function triggerEffects(dep, debuggerEventExtraInfo) { const effects = isArray$1(dep) ? dep : [...dep]; for (const effect of effects) { if (effect.computed) { triggerEffect(effect, debuggerEventExtraInfo); } } for (const effect of effects) { if (!effect.computed) { triggerEffect(effect, debuggerEventExtraInfo); } } } function triggerEffect(effect, debuggerEventExtraInfo) { if (effect !== activeEffect || effect.allowRecurse) { if (effect.onTrigger) { effect.onTrigger(extend({ effect }, debuggerEventExtraInfo)); } if (effect.scheduler) { effect.scheduler(); } else { effect.run(); } } } function getDepFromReactive(object, key) { var _a3; return (_a3 = targetMap.get(object)) === null || _a3 === void 0 ? void 0 : _a3.get(key); } 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) ); const get$1 = /* @__PURE__ */ createGetter(); const shallowGet = /* @__PURE__ */ createGetter(false, true); const readonlyGet = /* @__PURE__ */ createGetter(true); const shallowReadonlyGet = /* @__PURE__ */ createGetter(true, true); const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations(); function createArrayInstrumentations() { const instrumentations = {}; ["includes", "indexOf", "lastIndexOf"].forEach((key) => { instrumentations[key] = function(...args) { const arr = toRaw(this); for (let i2 = 0, l = this.length; i2 < l; i2++) { track(arr, "get", i2 + ""); } const res = arr[key](...args); if (res === -1 || res === false) { return arr[key](...args.map(toRaw)); } else { return res; } }; }); ["push", "pop", "shift", "unshift", "splice"].forEach((key) => { instrumentations[key] = function(...args) { pauseTracking(); const res = toRaw(this)[key].apply(this, args); resetTracking(); return res; }; }); return instrumentations; } function hasOwnProperty(key) { const obj = toRaw(this); track(obj, "has", key); return obj.hasOwnProperty(key); } function createGetter(isReadonly2 = false, shallow = false) { return function get2(target, key, receiver) { if (key === "__v_isReactive") { return !isReadonly2; } else if (key === "__v_isReadonly") { return isReadonly2; } else if (key === "__v_isShallow") { return shallow; } else if (key === "__v_raw" && receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target)) { return target; } const targetIsArray = isArray$1(target); if (!isReadonly2) { if (targetIsArray && hasOwn(arrayInstrumentations, key)) { return Reflect.get(arrayInstrumentations, key, receiver); } if (key === "hasOwnProperty") { return hasOwnProperty; } } const res = Reflect.get(target, key, receiver); if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { return res; } if (!isReadonly2) { track(target, "get", key); } if (shallow) { return res; } if (isRef(res)) { return targetIsArray && isIntegerKey(key) ? res : res.value; } if (isObject(res)) { return isReadonly2 ? readonly(res) : reactive(res); } return res; }; } const set$1 = /* @__PURE__ */ createSetter(); const shallowSet = /* @__PURE__ */ createSetter(true); function createSetter(shallow = false) { return function set2(target, key, value, receiver) { let oldValue = target[key]; if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) { return false; } if (!shallow) { if (!isShallow$1(value) && !isReadonly(value)) { oldValue = toRaw(oldValue); value = toRaw(value); } if (!isArray$1(target) && isRef(oldValue) && !isRef(value)) { oldValue.value = value; return true; } } const hadKey = isArray$1(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); const result = Reflect.set(target, key, value, receiver); if (target === toRaw(receiver)) { if (!hadKey) { trigger(target, "add", key, value); } else if (hasChanged(value, oldValue)) { trigger(target, "set", key, value, oldValue); } } return result; }; } function deleteProperty(target, key) { const hadKey = hasOwn(target, key); const oldValue = target[key]; const result = Reflect.deleteProperty(target, key); if (result && hadKey) { trigger(target, "delete", key, void 0, oldValue); } return result; } function has$1(target, key) { const result = Reflect.has(target, key); if (!isSymbol(key) || !builtInSymbols.has(key)) { track(target, "has", key); } return result; } function ownKeys(target) { track(target, "iterate", isArray$1(target) ? "length" : ITERATE_KEY); return Reflect.ownKeys(target); } const mutableHandlers = { get: get$1, set: set$1, deleteProperty, has: has$1, ownKeys }; const readonlyHandlers = { get: readonlyGet, set(target, key) { { warn$1(`Set operation on key "${String(key)}" failed: target is readonly.`, target); } return true; }, deleteProperty(target, key) { { warn$1(`Delete operation on key "${String(key)}" failed: target is readonly.`, target); } return true; } }; const shallowReactiveHandlers = /* @__PURE__ */ extend({}, mutableHandlers, { get: shallowGet, set: shallowSet }); const shallowReadonlyHandlers = /* @__PURE__ */ extend({}, readonlyHandlers, { get: shallowReadonlyGet }); const toShallow = (value) => value; const getProto = (v2) => Reflect.getPrototypeOf(v2); function get(target, key, isReadonly2 = false, isShallow2 = false) { target = target[ "__v_raw" /* ReactiveFlags.RAW */ ]; const rawTarget = toRaw(target); const rawKey = toRaw(key); if (!isReadonly2) { if (key !== rawKey) { track(rawTarget, "get", key); } track(rawTarget, "get", rawKey); } const { has: has2 } = getProto(rawTarget); const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; if (has2.call(rawTarget, key)) { return wrap(target.get(key)); } else if (has2.call(rawTarget, rawKey)) { return wrap(target.get(rawKey)); } else if (target !== rawTarget) { target.get(key); } } function has(key, isReadonly2 = false) { const target = this[ "__v_raw" /* ReactiveFlags.RAW */ ]; const rawTarget = toRaw(target); const rawKey = toRaw(key); if (!isReadonly2) { if (key !== rawKey) { track(rawTarget, "has", key); } track(rawTarget, "has", rawKey); } return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); } function size$1(target, isReadonly2 = false) { target = target[ "__v_raw" /* ReactiveFlags.RAW */ ]; !isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY); return Reflect.get(target, "size", target); } function add(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; } function set$2(key, value) { value = toRaw(value); const target = toRaw(this); const { has: has2, get: get2 } = getProto(target); let hadKey = has2.call(target, key); if (!hadKey) { key = toRaw(key); hadKey = has2.call(target, key); } else { checkIdentityKeys(target, has2, key); } const oldValue = get2.call(target, key); target.set(key, value); if (!hadKey) { trigger(target, "add", key, value); } else if (hasChanged(value, oldValue)) { trigger(target, "set", key, value, oldValue); } return this; } function deleteEntry(key) { const target = toRaw(this); const { has: has2, get: get2 } = getProto(target); let hadKey = has2.call(target, key); if (!hadKey) { key = toRaw(key); hadKey = has2.call(target, key); } else { checkIdentityKeys(target, has2, key); } const oldValue = get2 ? get2.call(target, key) : void 0; const result = target.delete(key); if (hadKey) { trigger(target, "delete", key, void 0, oldValue); } return result; } function clear() { const target = toRaw(this); const hadItems = target.size !== 0; const oldTarget = isMap(target) ? new Map(target) : new Set(target); const result = target.clear(); if (hadItems) { trigger(target, "clear", void 0, void 0, oldTarget); } return result; } function createForEach(isReadonly2, isShallow2) { return function forEach(callback, thisArg) { const observed = this; const target = observed[ "__v_raw" /* ReactiveFlags.RAW */ ]; const rawTarget = toRaw(target); const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; !isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY); return target.forEach((value, key) => { return callback.call(thisArg, wrap(value), wrap(key), observed); }); }; } function createIterableMethod(method, isReadonly2, isShallow2) { return function(...args) { const target = this[ "__v_raw" /* ReactiveFlags.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) { { const key = args[0] ? `on key "${args[0]}" ` : ``; console.warn(`${capitalize(type)} operation ${key}failed: target is readonly.`, toRaw(this)); } return type === "delete" ? false : this; }; } function createInstrumentations() { const mutableInstrumentations2 = { get(key) { return get(this, key); }, get size() { return size$1(this); }, has, add, set: set$2, delete: deleteEntry, clear, forEach: createForEach(false, false) }; const shallowInstrumentations2 = { get(key) { return get(this, key, false, true); }, get size() { return size$1(this); }, has, add, set: set$2, delete: deleteEntry, clear, forEach: createForEach(false, true) }; const readonlyInstrumentations2 = { get(key) { return get(this, key, true); }, get size() { return size$1(this, true); }, has(key) { return has.call(this, key, true); }, add: createReadonlyMethod( "add" /* TriggerOpTypes.ADD */ ), set: createReadonlyMethod( "set" /* TriggerOpTypes.SET */ ), delete: createReadonlyMethod( "delete" /* TriggerOpTypes.DELETE */ ), clear: createReadonlyMethod( "clear" /* TriggerOpTypes.CLEAR */ ), forEach: createForEach(true, false) }; const shallowReadonlyInstrumentations2 = { get(key) { return get(this, key, true, true); }, get size() { return size$1(this, true); }, has(key) { return has.call(this, key, true); }, add: createReadonlyMethod( "add" /* TriggerOpTypes.ADD */ ), set: createReadonlyMethod( "set" /* TriggerOpTypes.SET */ ), delete: createReadonlyMethod( "delete" /* TriggerOpTypes.DELETE */ ), clear: createReadonlyMethod( "clear" /* TriggerOpTypes.CLEAR */ ), forEach: createForEach(true, true) }; const iteratorMethods = ["keys", "values", "entries", Symbol.iterator]; iteratorMethods.forEach((method) => { mutableInstrumentations2[method] = createIterableMethod(method, false, false); readonlyInstrumentations2[method] = createIterableMethod(method, true, false); shallowInstrumentations2[method] = createIterableMethod(method, false, true); shallowReadonlyInstrumentations2[method] = createIterableMethod(method, true, true); }); return [ mutableInstrumentations2, readonlyInstrumentations2, shallowInstrumentations2, shallowReadonlyInstrumentations2 ]; } const [mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations] = /* @__PURE__ */ createInstrumentations(); function createInstrumentationGetter(isReadonly2, shallow) { const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations; 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) }; function checkIdentityKeys(target, has2, key) { const rawKey = toRaw(key); if (rawKey !== key && has2.call(target, rawKey)) { const type = toRawType(target); console.warn(`Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`); } } 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" /* ReactiveFlags.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)) { { console.warn(`value cannot be made reactive: ${String(target)}`); } return target; } if (target[ "__v_raw" /* ReactiveFlags.RAW */ ] && !(isReadonly2 && target[ "__v_isReactive" /* ReactiveFlags.IS_REACTIVE */ ])) { 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" /* ReactiveFlags.RAW */ ]); } return !!(value && value[ "__v_isReactive" /* ReactiveFlags.IS_REACTIVE */ ]); } function isReadonly(value) { return !!(value && value[ "__v_isReadonly" /* ReactiveFlags.IS_READONLY */ ]); } function isShallow$1(value) { return !!(value && value[ "__v_isShallow" /* ReactiveFlags.IS_SHALLOW */ ]); } function isProxy(value) { return isReactive(value) || isReadonly(value); } function toRaw(observed) { const raw = observed && observed[ "__v_raw" /* ReactiveFlags.RAW */ ]; return raw ? toRaw(raw) : observed; } function markRaw(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 trackRefValue(ref2) { if (shouldTrack && activeEffect) { ref2 = toRaw(ref2); { trackEffects(ref2.dep || (ref2.dep = createDep()), { target: ref2, type: "get", key: "value" }); } } } function triggerRefValue(ref2, newVal) { ref2 = toRaw(ref2); const dep = ref2.dep; if (dep) { { triggerEffects(dep, { target: ref2, type: "set", key: "value", newValue: newVal }); } } } function isRef(r2) { return !!(r2 && r2.__v_isRef === true); } 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, __v_isShallow) { this.__v_isShallow = __v_isShallow; this.dep = void 0; this.__v_isRef = true; this._rawValue = __v_isShallow ? value : toRaw(value); this._value = __v_isShallow ? value : toReactive(value); } get value() { trackRefValue(this); return this._value; } set value(newVal) { const useDirectValue = this.__v_isShallow || isShallow$1(newVal) || isReadonly(newVal); newVal = useDirectValue ? newVal : toRaw(newVal); if (hasChanged(newVal, this._rawValue)) { this._rawValue = newVal; this._value = useDirectValue ? newVal : toReactive(newVal); triggerRefValue(this, newVal); } } } function unref(ref2) { return isRef(ref2) ? ref2.value : ref2; } const shallowUnwrapHandlers = { get: (target, key, receiver) => 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.dep = void 0; this.__v_isRef = true; const { get: get2, set: set2 } = factory(() => trackRefValue(this), () => triggerRefValue(this)); this._get = get2; this._set = set2; } get value() { return this._get(); } set value(newVal) { this._set(newVal); } } function customRef(factory) { return new CustomRefImpl(factory); } function toRefs(object) { if (!isProxy(object)) { console.warn(`toRefs() expects a reactive object but received a plain one.`); } const ret = isArray$1(object) ? new Array(object.length) : {}; for (const key in object) { ret[key] = toRef(object, key); } return ret; } class ObjectRefImpl { constructor(_object, _key, _defaultValue) { this._object = _object; this._key = _key; this._defaultValue = _defaultValue; this.__v_isRef = true; } get value() { const val = this._object[this._key]; return val === void 0 ? this._defaultValue : val; } set value(newVal) { this._object[this._key] = newVal; } get dep() { return getDepFromReactive(toRaw(this._object), this._key); } } function toRef(object, key, defaultValue) { const val = object[key]; return isRef(val) ? val : new ObjectRefImpl(object, key, defaultValue); } var _a$1$1; class ComputedRefImpl { constructor(getter, _setter, isReadonly2, isSSR) { this._setter = _setter; this.dep = void 0; this.__v_isRef = true; this[_a$1$1] = false; this._dirty = true; this.effect = new ReactiveEffect(getter, () => { if (!this._dirty) { this._dirty = true; triggerRefValue(this); } }); this.effect.computed = this; this.effect.active = this._cacheable = !isSSR; this[ "__v_isReadonly" /* ReactiveFlags.IS_READONLY */ ] = isReadonly2; } get value() { const self2 = toRaw(this); trackRefValue(self2); if (self2._dirty || !self2._cacheable) { self2._dirty = false; self2._value = self2.effect.run(); } return self2._value; } set value(newValue) { this._setter(newValue); } } _a$1$1 = "__v_isReadonly"; function computed$1(getterOrOptions, debugOptions, isSSR = false) { let getter; let setter; const onlyGetter = isFunction$1(getterOrOptions); if (onlyGetter) { getter = getterOrOptions; setter = () => { console.warn("Write operation failed: computed value is readonly"); }; } else { getter = getterOrOptions.get; setter = getterOrOptions.set; } const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); if (debugOptions && !isSSR) { cRef.effect.onTrack = debugOptions.onTrack; cRef.effect.onTrigger = debugOptions.onTrigger; } return cRef; } const stack = []; function pushWarningContext(vnode) { stack.push(vnode); } function popWarningContext() { stack.pop(); } function warn$2(msg, ...args) { 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, [ msg + args.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(); } 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, i2) => { logs.push(...i2 === 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 open2 = ` at <${formatComponentName(vnode.component, vnode.type, isRoot)}`; const close = `>` + postfix; return vnode.props ? [open2, ...formatProps(vnode.props), close] : [open2 + 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$1(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$1(value)) { return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; } else { value = toRaw(value); return raw ? value : [`${key}=`, value]; } } function assertNumber(val, type) { if (val === void 0) { return; } else if (typeof val !== "number") { warn$2(`${type} is not a valid number - got ${JSON.stringify(val)}.`); } else if (isNaN(val)) { warn$2(`${type} is NaN - the duration expression might be incorrect.`); } } const ErrorTypeStrings = { [ "sp" /* LifecycleHooks.SERVER_PREFETCH */ ]: "serverPrefetch hook", [ "bc" /* LifecycleHooks.BEFORE_CREATE */ ]: "beforeCreate hook", [ "c" /* LifecycleHooks.CREATED */ ]: "created hook", [ "bm" /* LifecycleHooks.BEFORE_MOUNT */ ]: "beforeMount hook", [ "m" /* LifecycleHooks.MOUNTED */ ]: "mounted hook", [ "bu" /* LifecycleHooks.BEFORE_UPDATE */ ]: "beforeUpdate hook", [ "u" /* LifecycleHooks.UPDATED */ ]: "updated", [ "bum" /* LifecycleHooks.BEFORE_UNMOUNT */ ]: "beforeUnmount hook", [ "um" /* LifecycleHooks.UNMOUNTED */ ]: "unmounted hook", [ "a" /* LifecycleHooks.ACTIVATED */ ]: "activated hook", [ "da" /* LifecycleHooks.DEACTIVATED */ ]: "deactivated hook", [ "ec" /* LifecycleHooks.ERROR_CAPTURED */ ]: "errorCaptured hook", [ "rtc" /* LifecycleHooks.RENDER_TRACKED */ ]: "renderTracked hook", [ "rtg" /* LifecycleHooks.RENDER_TRIGGERED */ ]: "renderTriggered hook", [ 0 /* ErrorCodes.SETUP_FUNCTION */ ]: "setup function", [ 1 /* ErrorCodes.RENDER_FUNCTION */ ]: "render function", [ 2 /* ErrorCodes.WATCH_GETTER */ ]: "watcher getter", [ 3 /* ErrorCodes.WATCH_CALLBACK */ ]: "watcher callback", [ 4 /* ErrorCodes.WATCH_CLEANUP */ ]: "watcher cleanup function", [ 5 /* ErrorCodes.NATIVE_EVENT_HANDLER */ ]: "native event handler", [ 6 /* ErrorCodes.COMPONENT_EVENT_HANDLER */ ]: "component event handler", [ 7 /* ErrorCodes.VNODE_HOOK */ ]: "vnode hook", [ 8 /* ErrorCodes.DIRECTIVE_HOOK */ ]: "directive hook", [ 9 /* ErrorCodes.TRANSITION_HOOK */ ]: "transition hook", [ 10 /* ErrorCodes.APP_ERROR_HANDLER */ ]: "app errorHandler", [ 11 /* ErrorCodes.APP_WARN_HANDLER */ ]: "app warnHandler", [ 12 /* ErrorCodes.FUNCTION_REF */ ]: "ref function", [ 13 /* ErrorCodes.ASYNC_COMPONENT_LOADER */ ]: "async component loader", [ 14 /* ErrorCodes.SCHEDULER */ ]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core" }; function callWithErrorHandling(fn2, instance, type, args) { let res; try { res = args ? fn2(...args) : fn2(); } catch (err) { handleError(err, instance, type); } return res; } function callWithAsyncErrorHandling(fn2, instance, type, args) { if (isFunction$1(fn2)) { const res = callWithErrorHandling(fn2, instance, type, args); if (res && isPromise(res)) { res.catch((err) => { handleError(err, instance, type); }); } return res; } const values = []; for (let i2 = 0; i2 < fn2.length; i2++) { values.push(callWithAsyncErrorHandling(fn2[i2], instance, type, args)); } return values; } function handleError(err, instance, type, throwInDev = true) { const contextVNode = instance ? instance.vnode : null; if (instance) { let cur = instance.parent; const exposedInstance = instance.proxy; const errorInfo = ErrorTypeStrings[type]; while (cur) { const errorCapturedHooks = cur.ec; if (errorCapturedHooks) { for (let i2 = 0; i2 < errorCapturedHooks.length; i2++) { if (errorCapturedHooks[i2](err, exposedInstance, errorInfo) === false) { return; } } } cur = cur.parent; } const appErrorHandler = instance.appContext.config.errorHandler; if (appErrorHandler) { callWithErrorHandling(appErrorHandler, null, 10, [err, exposedInstance, errorInfo]); return; } } logError(err, type, contextVNode, throwInDev); } function logError(err, type, contextVNode, throwInDev = true) { { const info = ErrorTypeStrings[type]; if (contextVNode) { pushWarningContext(contextVNode); } warn$2(`Unhandled error${info ? ` during execution of ${info}` : ``}`); if (contextVNode) { popWarningContext(); } if (throwInDev) { throw err; } else { console.error(err); } } } let isFlushing = false; let isFlushPending = false; const queue = []; let flushIndex = 0; const pendingPostFlushCbs = []; let activePostFlushCbs = null; let postFlushIndex = 0; const resolvedPromise = /* @__PURE__ */ Promise.resolve(); let currentFlushPromise = null; const RECURSION_LIMIT = 100; function nextTick(fn2) { const p2 = currentFlushPromise || resolvedPromise; return fn2 ? p2.then(this ? fn2.bind(this) : fn2) : p2; } function findInsertionIndex(id2) { let start = flushIndex + 1; let end = queue.length; while (start < end) { const middle = start + end >>> 1; const middleJobId = getId(queue[middle]); middleJobId < id2 ? start = middle + 1 : end = middle; } return start; } function queueJob(job) { if (!queue.length || !queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) { if (job.id == null) { queue.push(job); } else { queue.splice(findInsertionIndex(job.id), 0, job); } queueFlush(); } } function queueFlush() { if (!isFlushing && !isFlushPending) { isFlushPending = true; currentFlushPromise = resolvedPromise.then(flushJobs); } } function invalidateJob(job) { const i2 = queue.indexOf(job); if (i2 > flushIndex) { queue.splice(i2, 1); } } function queuePostFlushCb(cb) { if (!isArray$1(cb)) { if (!activePostFlushCbs || !activePostFlushCbs.includes(cb, cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex)) { pendingPostFlushCbs.push(cb); } } else { pendingPostFlushCbs.push(...cb); } queueFlush(); } function flushPreFlushCbs(seen2, i2 = isFlushing ? flushIndex + 1 : 0) { { seen2 = seen2 || /* @__PURE__ */ new Map(); } for (; i2 < queue.length; i2++) { const cb = queue[i2]; if (cb && cb.pre) { if (checkRecursiveUpdates(seen2, cb)) { continue; } queue.splice(i2, 1); i2--; cb(); } } } function flushPostFlushCbs(seen2) { if (pendingPostFlushCbs.length) { const deduped = [...new Set(pendingPostFlushCbs)]; pendingPostFlushCbs.length = 0; if (activePostFlushCbs) { activePostFlushCbs.push(...deduped); return; } activePostFlushCbs = deduped; { seen2 = seen2 || /* @__PURE__ */ new Map(); } activePostFlushCbs.sort((a2, b3) => getId(a2) - getId(b3)); for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { if (checkRecursiveUpdates(seen2, activePostFlushCbs[postFlushIndex])) { continue; } activePostFlushCbs[postFlushIndex](); } activePostFlushCbs = null; postFlushIndex = 0; } } const getId = (job) => job.id == null ? Infinity : job.id; const comparator = (a2, b3) => { const diff = getId(a2) - getId(b3); if (diff === 0) { if (a2.pre && !b3.pre) return -1; if (b3.pre && !a2.pre) return 1; } return diff; }; function flushJobs(seen2) { isFlushPending = false; isFlushing = true; { seen2 = seen2 || /* @__PURE__ */ new Map(); } queue.sort(comparator); const check = (job) => checkRecursiveUpdates(seen2, job); try { for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { const job = queue[flushIndex]; if (job && job.active !== false) { if (check(job)) { continue; } callWithErrorHandling( job, null, 14 /* ErrorCodes.SCHEDULER */ ); } } } finally { flushIndex = 0; queue.length = 0; flushPostFlushCbs(seen2); isFlushing = false; currentFlushPromise = null; if (queue.length || pendingPostFlushCbs.length) { flushJobs(seen2); } } } function checkRecursiveUpdates(seen2, fn2) { if (!seen2.has(fn2)) { seen2.set(fn2, 1); } else { const count2 = seen2.get(fn2); if (count2 > RECURSION_LIMIT) { const instance = fn2.ownerInstance; const componentName = instance && getComponentName(instance.type); warn$2(`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`); return true; } else { seen2.set(fn2, count2 + 1); } } } let isHmrUpdating = false; const hmrDirtyComponents = /* @__PURE__ */ new Set(); { getGlobalThis().__VUE_HMR_RUNTIME__ = { createRecord: tryWrap(createRecord), rerender: tryWrap(rerender), reload: tryWrap(reload) }; } const map = /* @__PURE__ */ new Map(); function registerHMR(instance) { const id2 = instance.type.__hmrId; let record = map.get(id2); if (!record) { createRecord(id2, instance.type); record = map.get(id2); } record.instances.add(instance); } function unregisterHMR(instance) { map.get(instance.type.__hmrId).instances.delete(instance); } function createRecord(id2, initialDef) { if (map.has(id2)) { return false; } map.set(id2, { initialDef: normalizeClassComponent(initialDef), instances: /* @__PURE__ */ new Set() }); return true; } function normalizeClassComponent(component) { return isClassComponent(component) ? component.__vccOpts : component; } function rerender(id2, newRender) { const record = map.get(id2); if (!record) { return; } record.initialDef.render = newRender; [...record.instances].forEach((instance) => { if (newRender) { instance.render = newRender; normalizeClassComponent(instance.type).render = newRender; } instance.renderCache = []; isHmrUpdating = true; instance.update(); isHmrUpdating = false; }); } function reload(id2, newComp) { const record = map.get(id2); if (!record) return; newComp = normalizeClassComponent(newComp); updateComponentDef(record.initialDef, newComp); const instances = [...record.instances]; for (const instance of instances) { const oldComp = normalizeClassComponent(instance.type); if (!hmrDirtyComponents.has(oldComp)) { if (oldComp !== record.initialDef) { updateComponentDef(oldComp, newComp); } hmrDirtyComponents.add(oldComp); } instance.appContext.optionsCache.delete(instance.type); if (instance.ceReload) { hmrDirtyComponents.add(oldComp); instance.ceReload(newComp.styles); hmrDirtyComponents.delete(oldComp); } else if (instance.parent) { queueJob(instance.parent.update); } else if (instance.appContext.reload) { instance.appContext.reload(); } else if (typeof window !== "undefined") { window.location.reload(); } else { console.warn("[HMR] Root or manually mounted instance modified. Full reload required."); } } queuePostFlushCb(() => { for (const instance of instances) { hmrDirtyComponents.delete(normalizeClassComponent(instance.type)); } }); } function updateComponentDef(oldComp, newComp) { extend(oldComp, newComp); for (const key in oldComp) { if (key !== "__file" && !(key in newComp)) { delete oldComp[key]; } } } function tryWrap(fn2) { return (id2, arg) => { try { return fn2(id2, arg); } catch (e2) { console.error(e2); console.warn(`[HMR] Something went wrong during Vue component hot-reload. Full reload required.`); } }; } let devtools; let buffer = []; let devtoolsNotInstalled = false; function emit$1(event, ...args) { if (devtools) { devtools.emit(event, ...args); } else if (!devtoolsNotInstalled) { buffer.push({ event, args }); } } function setDevtoolsHook(hook, target) { var _a3, _b2; devtools = hook; if (devtools) { devtools.enabled = true; buffer.forEach(({ event, args }) => devtools.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 !((_b2 = (_a3 = window.navigator) === null || _a3 === void 0 ? void 0 : _a3.userAgent) === null || _b2 === void 0 ? void 0 : _b2.includes("jsdom")) ) { const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; replay.push((newHook) => { setDevtoolsHook(newHook, target); }); setTimeout(() => { if (!devtools) { target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; devtoolsNotInstalled = true; buffer = []; } }, 3e3); } else { devtoolsNotInstalled = true; buffer = []; } } function devtoolsInitApp(app, version2) { emit$1("app:init", app, version2, { Fragment, Text, Comment, Static }); } function devtoolsUnmountApp(app) { emit$1("app:unmount", app); } const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook( "component:added" /* DevtoolsHooks.COMPONENT_ADDED */ ); const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook( "component:updated" /* DevtoolsHooks.COMPONENT_UPDATED */ ); const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook( "component:removed" /* DevtoolsHooks.COMPONENT_REMOVED */ ); const devtoolsComponentRemoved = (component) => { if (devtools && typeof devtools.cleanupBuffer === "function" && // remove the component if it wasn't buffered !devtools.cleanupBuffer(component)) { _devtoolsComponentRemoved(component); } }; function createDevtoolsComponentHook(hook) { return (component) => { emit$1(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : void 0, component); }; } const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook( "perf:start" /* DevtoolsHooks.PERFORMANCE_START */ ); const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook( "perf:end" /* DevtoolsHooks.PERFORMANCE_END */ ); function createDevtoolsPerformanceHook(hook) { return (component, type, time) => { emit$1(hook, component.appContext.app, component.uid, component, type, time); }; } function devtoolsComponentEmit(component, event, params) { emit$1("component:emit", component.appContext.app, component, event, params); } function emit(instance, event, ...rawArgs) { if (instance.isUnmounted) return; const props = instance.vnode.props || EMPTY_OBJ; { const { emitsOptions, propsOptions: [propsOptions] } = instance; if (emitsOptions) { if (!(event in emitsOptions) && true) { if (!propsOptions || !(toHandlerKey(event) in propsOptions)) { warn$2(`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.`); } } else { const validator = emitsOptions[event]; if (isFunction$1(validator)) { const isValid = validator(...rawArgs); if (!isValid) { warn$2(`Invalid event arguments: event validation failed for event "${event}".`); } } } } } let args = rawArgs; const isModelListener2 = event.startsWith("update:"); const modelArg = isModelListener2 && event.slice(7); if (modelArg && modelArg in props) { const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`; const { number, trim } = props[modifiersKey] || EMPTY_OBJ; if (trim) { args = rawArgs.map((a2) => isString$1(a2) ? a2.trim() : a2); } if (number) { args = rawArgs.map(looseToNumber); } } { devtoolsComponentEmit(instance, event, args); } { const lowerCaseEvent = event.toLowerCase(); if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { warn$2(`Event "${lowerCaseEvent}" is emitted in component ${formatComponentName(instance, instance.type)} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate(event)}" instead of "${event}".`); } } let handlerName; let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249) props[handlerName = toHandlerKey(camelize(event))]; if (!handler && isModelListener2) { handler = props[handlerName = toHandlerKey(hyphenate(event))]; } if (handler) { callWithAsyncErrorHandling(handler, instance, 6, args); } const onceHandler = props[handlerName + `Once`]; if (onceHandler) { if (!instance.emitted) { instance.emitted = {}; } else if (instance.emitted[handlerName]) { return; } instance.emitted[handlerName] = true; callWithAsyncErrorHandling(onceHandler, instance, 6, args); } } function normalizeEmitsOptions(comp, appContext, asMixin = false) { const cache2 = appContext.emitsCache; const cached = cache2.get(comp); if (cached !== void 0) { return cached; } const raw = comp.emits; let normalized = {}; let hasExtends = false; if (!isFunction$1(comp)) { const extendEmits = (raw2) => { const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); if (normalizedFromExtend) { hasExtends = true; extend(normalized, normalizedFromExtend); } }; if (!asMixin && appContext.mixins.length) { appContext.mixins.forEach(extendEmits); } if (comp.extends) { extendEmits(comp.extends); } if (comp.mixins) { comp.mixins.forEach(extendEmits); } } if (!raw && !hasExtends) { if (isObject(comp)) { cache2.set(comp, null); } return null; } if (isArray$1(raw)) { raw.forEach((key) => normalized[key] = null); } else { extend(normalized, raw); } if (isObject(comp)) { cache2.set(comp, normalized); } return normalized; } function isEmitListener(options, key) { if (!options || !isOn(key)) { return false; } key = key.slice(2).replace(/Once$/, ""); return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key); } let currentRenderingInstance = null; let currentScopeId = null; function setCurrentRenderingInstance(instance) { const prev = currentRenderingInstance; currentRenderingInstance = instance; currentScopeId = instance && instance.type.__scopeId || null; return prev; } function pushScopeId(id2) { currentScopeId = id2; } function popScopeId() { currentScopeId = null; } const withScopeId = (_id) => withCtx; function withCtx(fn2, ctx = currentRenderingInstance, isNonScopedSlot) { if (!ctx) return fn2; if (fn2._n) { return fn2; } const renderFnWithContext = (...args) => { if (renderFnWithContext._d) { setBlockTracking(-1); } const prevInstance = setCurrentRenderingInstance(ctx); let res; try { res = fn2(...args); } finally { setCurrentRenderingInstance(prevInstance); if (renderFnWithContext._d) { setBlockTracking(1); } } { devtoolsComponentUpdated(ctx); } return res; }; renderFnWithContext._n = true; renderFnWithContext._c = true; renderFnWithContext._d = true; return renderFnWithContext; } let accessedAttrs = false; function markAttrsAccessed() { accessedAttrs = true; } function renderComponentRoot(instance) { const { type: Component, vnode, proxy, withProxy, props, propsOptions: [propsOptions], slots, attrs, emit: emit2, render: render2, renderCache, data, setupState, ctx, inheritAttrs } = instance; let result; let fallthroughAttrs; const prev = setCurrentRenderingInstance(instance); { accessedAttrs = false; } try { if (vnode.shapeFlag & 4) { const proxyToUse = withProxy || proxy; result = normalizeVNode(render2.call(proxyToUse, proxyToUse, renderCache, props, setupState, data, ctx)); fallthroughAttrs = attrs; } else { const render3 = Component; if (attrs === props) { markAttrsAccessed(); } result = normalizeVNode(render3.length > 1 ? render3(props, true ? { get attrs() { markAttrsAccessed(); return attrs; }, slots, emit: emit2 } : { attrs, slots, emit: emit2 }) : render3( props, null /* we know it doesn't need it */ )); fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); } } catch (err) { blockStack.length = 0; handleError( err, instance, 1 /* ErrorCodes.RENDER_FUNCTION */ ); result = createVNode(Comment); } let root = result; let setRoot = void 0; if (result.patchFlag > 0 && result.patchFlag & 2048) { [root, setRoot] = getChildRoot(result); } if (fallthroughAttrs && inheritAttrs !== false) { const keys = Object.keys(fallthroughAttrs); const { shapeFlag } = root; if (keys.length) { if (shapeFlag & (1 | 6)) { if (propsOptions && keys.some(isModelListener)) { fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions); } root = cloneVNode(root, fallthroughAttrs); } else if (!accessedAttrs && root.type !== Comment) { const allAttrs = Object.keys(attrs); const eventAttrs = []; const extraAttrs = []; for (let i2 = 0, l = allAttrs.length; i2 < l; i2++) { const key = allAttrs[i2]; if (isOn(key)) { if (!isModelListener(key)) { eventAttrs.push(key[2].toLowerCase() + key.slice(3)); } } else { extraAttrs.push(key); } } if (extraAttrs.length) { warn$2(`Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`); } if (eventAttrs.length) { warn$2(`Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`); } } } } if (vnode.dirs) { if (!isElementRoot(root)) { warn$2(`Runtime directive used on component with non-element root node. The directives will not function as intended.`); } root = cloneVNode(root); root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; } if (vnode.transition) { if (!isElementRoot(root)) { warn$2(`Component inside renders non-element root node that cannot be animated.`); } root.transition = vnode.transition; } if (setRoot) { setRoot(root); } else { result = root; } setCurrentRenderingInstance(prev); return result; } const getChildRoot = (vnode) => { const rawChildren = vnode.children; const dynamicChildren = vnode.dynamicChildren; const childRoot = filterSingleRoot(rawChildren); if (!childRoot) { return [vnode, void 0]; } const index2 = rawChildren.indexOf(childRoot); const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; const setRoot = (updatedRoot) => { rawChildren[index2] = updatedRoot; if (dynamicChildren) { if (dynamicIndex > -1) { dynamicChildren[dynamicIndex] = updatedRoot; } else if (updatedRoot.patchFlag > 0) { vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; } } }; return [normalizeVNode(childRoot), setRoot]; }; function filterSingleRoot(children2) { let singleRoot; for (let i2 = 0; i2 < children2.length; i2++) { const child = children2[i2]; if (isVNode(child)) { if (child.type !== Comment || child.children === "v-if") { if (singleRoot) { return; } else { singleRoot = child; } } } else { return; } } return singleRoot; } const getFunctionalFallthrough = (attrs) => { let res; for (const key in attrs) { if (key === "class" || key === "style" || isOn(key)) { (res || (res = {}))[key] = attrs[key]; } } return res; }; const filterModelListeners = (attrs, props) => { const res = {}; for (const key in attrs) { if (!isModelListener(key) || !(key.slice(9) in props)) { res[key] = attrs[key]; } } return res; }; const isElementRoot = (vnode) => { return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; }; function shouldUpdateComponent(prevVNode, nextVNode, optimized) { const { props: prevProps, children: prevChildren, component } = prevVNode; const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; const emits = component.emitsOptions; if ((prevChildren || nextChildren) && isHmrUpdating) { return true; } if (nextVNode.dirs || nextVNode.transition) { return true; } if (optimized && patchFlag >= 0) { if (patchFlag & 1024) { return true; } if (patchFlag & 16) { if (!prevProps) { return !!nextProps; } return hasPropsChanged(prevProps, nextProps, emits); } else if (patchFlag & 8) { const dynamicProps = nextVNode.dynamicProps; for (let i2 = 0; i2 < dynamicProps.length; i2++) { const key = dynamicProps[i2]; if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { return true; } } } } else { if (prevChildren || nextChildren) { if (!nextChildren || !nextChildren.$stable) { return true; } } if (prevProps === nextProps) { return false; } if (!prevProps) { return !!nextProps; } if (!nextProps) { return true; } return hasPropsChanged(prevProps, nextProps, emits); } return false; } function hasPropsChanged(prevProps, nextProps, emitsOptions) { const nextKeys = Object.keys(nextProps); if (nextKeys.length !== Object.keys(prevProps).length) { return true; } for (let i2 = 0; i2 < nextKeys.length; i2++) { const key = nextKeys[i2]; if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { return true; } } return false; } function updateHOCHostEl({ vnode, parent }, el2) { while (parent && parent.subTree === vnode) { (vnode = parent.vnode).el = el2; parent = parent.parent; } } const isSuspense = (type) => type.__isSuspense; function queueEffectWithSuspense(fn2, suspense) { if (suspense && suspense.pendingBranch) { if (isArray$1(fn2)) { suspense.effects.push(...fn2); } else { suspense.effects.push(fn2); } } else { queuePostFlushCb(fn2); } } function provide(key, value) { if (!currentInstance) { { warn$2(`provide() can only be used inside setup().`); } } 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) { const provides = instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides; if (provides && key in provides) { return provides[key]; } else if (arguments.length > 1) { return treatDefaultAsFactory && isFunction$1(defaultValue) ? defaultValue.call(instance.proxy) : defaultValue; } else { warn$2(`injection "${String(key)}" not found.`); } } else { warn$2(`inject() can only be used inside setup() or functional components.`); } } function watchEffect(effect, options) { return doWatch(effect, null, options); } function watchPostEffect(effect, options) { return doWatch(effect, null, Object.assign(Object.assign({}, options), { flush: "post" })); } const INITIAL_WATCHER_VALUE = {}; function watch(source, cb, options) { if (!isFunction$1(cb)) { warn$2(`\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.`); } return doWatch(source, cb, options); } function doWatch(source, cb, { immediate, deep, flush: flush2, onTrack, onTrigger } = EMPTY_OBJ) { if (!cb) { if (immediate !== void 0) { warn$2(`watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`); } if (deep !== void 0) { warn$2(`watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`); } } const warnInvalidSource = (s) => { warn$2(`Invalid watch source: `, s, `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`); }; const instance = getCurrentScope() === (currentInstance === null || currentInstance === void 0 ? void 0 : currentInstance.scope) ? currentInstance : null; let getter; let forceTrigger = false; let isMultiSource = false; if (isRef(source)) { getter = () => source.value; forceTrigger = isShallow$1(source); } else if (isReactive(source)) { getter = () => source; deep = true; } else if (isArray$1(source)) { isMultiSource = true; forceTrigger = source.some((s) => isReactive(s) || isShallow$1(s)); getter = () => source.map((s) => { if (isRef(s)) { return s.value; } else if (isReactive(s)) { return traverse(s); } else if (isFunction$1(s)) { return callWithErrorHandling( s, instance, 2 /* ErrorCodes.WATCH_GETTER */ ); } else { warnInvalidSource(s); } }); } else if (isFunction$1(source)) { if (cb) { getter = () => callWithErrorHandling( source, instance, 2 /* ErrorCodes.WATCH_GETTER */ ); } else { getter = () => { if (instance && instance.isUnmounted) { return; } if (cleanup) { cleanup(); } return callWithAsyncErrorHandling(source, instance, 3, [onCleanup]); }; } } else { getter = NOOP; warnInvalidSource(source); } if (cb && deep) { const baseGetter = getter; getter = () => traverse(baseGetter()); } let cleanup; let onCleanup = (fn2) => { cleanup = effect.onStop = () => { callWithErrorHandling( fn2, instance, 4 /* ErrorCodes.WATCH_CLEANUP */ ); }; }; let ssrCleanup; if (isInSSRComponentSetup) { onCleanup = NOOP; if (!cb) { getter(); } else if (immediate) { callWithAsyncErrorHandling(cb, instance, 3, [ getter(), isMultiSource ? [] : void 0, onCleanup ]); } if (flush2 === "sync") { const ctx = useSSRContext(); ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []); } else { return NOOP; } } let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; const job = () => { if (!effect.active) { return; } if (cb) { const newValue = effect.run(); if (deep || forceTrigger || (isMultiSource ? newValue.some((v2, i2) => hasChanged(v2, oldValue[i2])) : hasChanged(newValue, oldValue)) || false) { if (cleanup) { cleanup(); } callWithAsyncErrorHandling(cb, instance, 3, [ 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, onCleanup ]); oldValue = newValue; } } else { effect.run(); } }; job.allowRecurse = !!cb; let scheduler; if (flush2 === "sync") { scheduler = job; } else if (flush2 === "post") { scheduler = () => queuePostRenderEffect(job, instance && instance.suspense); } else { job.pre = true; if (instance) job.id = instance.uid; scheduler = () => queueJob(job); } const effect = new ReactiveEffect(getter, scheduler); { effect.onTrack = onTrack; effect.onTrigger = onTrigger; } if (cb) { if (immediate) { job(); } else { oldValue = effect.run(); } } else if (flush2 === "post") { queuePostRenderEffect(effect.run.bind(effect), instance && instance.suspense); } else { effect.run(); } const unwatch = () => { effect.stop(); if (instance && instance.scope) { remove(instance.scope.effects, effect); } }; if (ssrCleanup) ssrCleanup.push(unwatch); return unwatch; } function instanceWatch(source, value, options) { const publicThis = this.proxy; const getter = isString$1(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); let cb; if (isFunction$1(value)) { cb = value; } else { cb = value.handler; options = value; } const cur = currentInstance; setCurrentInstance(this); const res = doWatch(getter, cb.bind(publicThis), options); if (cur) { setCurrentInstance(cur); } else { unsetCurrentInstance(); } return res; } function createPathGetter(ctx, path) { const segments = path.split("."); return () => { let cur = ctx; for (let i2 = 0; i2 < segments.length && cur; i2++) { cur = cur[segments[i2]]; } return cur; }; } function traverse(value, seen2) { if (!isObject(value) || value[ "__v_skip" /* ReactiveFlags.SKIP */ ]) { return value; } seen2 = seen2 || /* @__PURE__ */ new Set(); if (seen2.has(value)) { return value; } seen2.add(value); if (isRef(value)) { traverse(value.value, seen2); } else if (isArray$1(value)) { for (let i2 = 0; i2 < value.length; i2++) { traverse(value[i2], seen2); } } else if (isSet(value) || isMap(value)) { value.forEach((v2) => { traverse(v2, seen2); }); } else if (isPlainObject$1(value)) { for (const key in value) { traverse(value[key], seen2); } } return value; } 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 BaseTransitionImpl = { name: `BaseTransition`, props: { 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 }, setup(props, { slots }) { const instance = getCurrentInstance(); const state = useTransitionState(); let prevTransitionKey; return () => { const children2 = slots.default && getTransitionRawChildren(slots.default(), true); if (!children2 || !children2.length) { return; } let child = children2[0]; if (children2.length > 1) { let hasFound = false; for (const c2 of children2) { if (c2.type !== Comment) { if (hasFound) { warn$2(" can only be used on a single element or component. Use for lists."); break; } child = c2; hasFound = true; } } } const rawProps = toRaw(props); const { mode } = rawProps; if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") { warn$2(`invalid mode: ${mode}`); } if (state.isLeaving) { return emptyPlaceholder(child); } const innerChild = getKeepAliveChild(child); if (!innerChild) { return emptyPlaceholder(child); } const enterHooks = resolveTransitionHooks(innerChild, rawProps, state, instance); setTransitionHooks(innerChild, enterHooks); const oldChild = instance.subTree; const oldInnerChild = oldChild && getKeepAliveChild(oldChild); let transitionKeyChanged = false; const { getTransitionKey } = innerChild.type; if (getTransitionKey) { const key = getTransitionKey(); if (prevTransitionKey === void 0) { prevTransitionKey = key; } else if (key !== prevTransitionKey) { prevTransitionKey = key; transitionKeyChanged = true; } } if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) { const leavingHooks = resolveTransitionHooks(oldInnerChild, rawProps, state, instance); setTransitionHooks(oldInnerChild, leavingHooks); if (mode === "out-in") { state.isLeaving = true; leavingHooks.afterLeave = () => { state.isLeaving = false; if (instance.update.active !== false) { instance.update(); } }; return emptyPlaceholder(child); } else if (mode === "in-out" && innerChild.type !== Comment) { leavingHooks.delayLeave = (el2, earlyRemove, delayedLeave) => { const leavingVNodesCache = getLeavingNodesForType(state, oldInnerChild); leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; el2._leaveCb = () => { earlyRemove(); el2._leaveCb = void 0; delete enterHooks.delayedLeave; }; enterHooks.delayedLeave = delayedLeave; }; } } 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) { 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$1(hook)) { if (hook.every((hook2) => hook2.length <= 1)) done(); } else if (hook.length <= 1) { done(); } }; const hooks = { mode, persisted, beforeEnter(el2) { let hook = onBeforeEnter; if (!state.isMounted) { if (appear) { hook = onBeforeAppear || onBeforeEnter; } else { return; } } if (el2._leaveCb) { el2._leaveCb( true /* cancelled */ ); } const leavingVNode = leavingVNodesCache[key]; if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el._leaveCb) { leavingVNode.el._leaveCb(); } callHook2(hook, [el2]); }, enter(el2) { 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 = el2._enterCb = (cancelled) => { if (called) return; called = true; if (cancelled) { callHook2(cancelHook, [el2]); } else { callHook2(afterHook, [el2]); } if (hooks.delayedLeave) { hooks.delayedLeave(); } el2._enterCb = void 0; }; if (hook) { callAsyncHook(hook, [el2, done]); } else { done(); } }, leave(el2, remove2) { const key2 = String(vnode.key); if (el2._enterCb) { el2._enterCb( true /* cancelled */ ); } if (state.isUnmounting) { return remove2(); } callHook2(onBeforeLeave, [el2]); let called = false; const done = el2._leaveCb = (cancelled) => { if (called) return; called = true; remove2(); if (cancelled) { callHook2(onLeaveCancelled, [el2]); } else { callHook2(onAfterLeave, [el2]); } el2._leaveCb = void 0; if (leavingVNodesCache[key2] === vnode) { delete leavingVNodesCache[key2]; } }; leavingVNodesCache[key2] = vnode; if (onLeave) { callAsyncHook(onLeave, [el2, done]); } else { done(); } }, clone(vnode2) { return resolveTransitionHooks(vnode2, props, state, instance); } }; return hooks; } function emptyPlaceholder(vnode) { if (isKeepAlive(vnode)) { vnode = cloneVNode(vnode); vnode.children = null; return vnode; } } function getKeepAliveChild(vnode) { return isKeepAlive(vnode) ? vnode.children ? vnode.children[0] : void 0 : vnode; } function setTransitionHooks(vnode, hooks) { if (vnode.shapeFlag & 6 && vnode.component) { 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(children2, keepComment = false, parentKey) { let ret = []; let keyedFragmentCount = 0; for (let i2 = 0; i2 < children2.length; i2++) { let child = children2[i2]; const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i2); 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 i2 = 0; i2 < ret.length; i2++) { ret[i2].patchFlag = -2; } } return ret; } function defineComponent(options) { return isFunction$1(options) ? { setup: options, name: options.name } : options; } const isAsyncWrapper = (i2) => !!i2.type.__asyncLoader; function defineAsyncComponent(source) { if (isFunction$1(source)) { source = { loader: source }; } const { loader, loadingComponent, errorComponent, delay = 200, 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) { warn$2(`Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`); } if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { comp = comp.default; } if (comp && !isObject(comp) && !isFunction$1(comp)) { throw new Error(`Invalid async component load result: ${comp}`); } resolvedComp = comp; return comp; })); }; return defineComponent({ name: "AsyncComponentWrapper", __asyncLoader: load, get __asyncResolved() { return resolvedComp; }, setup() { const instance = currentInstance; if (resolvedComp) { return () => createInnerComp(resolvedComp, instance); } const onError = (err) => { pendingRequest = null; handleError( err, instance, 13, !errorComponent /* do not throw in dev if user provided error component */ ); }; 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 loaded2 = ref(false); const error = ref(); const delayed = ref(!!delay); if (delay) { setTimeout(() => { delayed.value = false; }, delay); } if (timeout != null) { setTimeout(() => { if (!loaded2.value && !error.value) { const err = new Error(`Async component timed out after ${timeout}ms.`); onError(err); error.value = err; } }, timeout); } load().then(() => { loaded2.value = true; if (instance.parent && isKeepAlive(instance.parent.vnode)) { queueJob(instance.parent.update); } }).catch((err) => { onError(err); error.value = err; }); return () => { if (loaded2.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: ref2, props, children: children2, ce: ce2 } = parent.vnode; const vnode = createVNode(comp, props, children2); vnode.ref = ref2; vnode.ce = ce2; delete parent.vnode.ce; return vnode; } const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; 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 injectHook(type, hook, target = currentInstance, prepend = false) { if (target) { const hooks = target[type] || (target[type] = []); const wrappedHook = hook.__weh || (hook.__weh = (...args) => { if (target.isUnmounted) { return; } pauseTracking(); setCurrentInstance(target); const res = callWithAsyncErrorHandling(hook, target, type, args); unsetCurrentInstance(); resetTracking(); return res; }); if (prepend) { hooks.unshift(wrappedHook); } else { hooks.push(wrappedHook); } return wrappedHook; } else { const apiName = toHandlerKey(ErrorTypeStrings[type].replace(/ hook$/, "")); warn$2(`${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`); } } const createHook = (lifecycle) => (hook, target = currentInstance) => ( // post-create lifecycle registrations are noops during SSR (except for serverPrefetch) (!isInSSRComponentSetup || lifecycle === "sp") && injectHook(lifecycle, (...args) => hook(...args), target) ); const onBeforeMount = createHook( "bm" /* LifecycleHooks.BEFORE_MOUNT */ ); const onMounted = createHook( "m" /* LifecycleHooks.MOUNTED */ ); const onBeforeUpdate = createHook( "bu" /* LifecycleHooks.BEFORE_UPDATE */ ); const onUpdated = createHook( "u" /* LifecycleHooks.UPDATED */ ); const onBeforeUnmount = createHook( "bum" /* LifecycleHooks.BEFORE_UNMOUNT */ ); const onUnmounted = createHook( "um" /* LifecycleHooks.UNMOUNTED */ ); const onServerPrefetch = createHook( "sp" /* LifecycleHooks.SERVER_PREFETCH */ ); const onRenderTriggered = createHook( "rtg" /* LifecycleHooks.RENDER_TRIGGERED */ ); const onRenderTracked = createHook( "rtc" /* LifecycleHooks.RENDER_TRACKED */ ); function onErrorCaptured(hook, target = currentInstance) { injectHook("ec", hook, target); } function validateDirectiveName(name) { if (isBuiltInDirective(name)) { warn$2("Do not use built-in directive ids as custom directive id: " + name); } } function withDirectives(vnode, directives2) { const internalInstance = currentRenderingInstance; if (internalInstance === null) { warn$2(`withDirectives can only be used inside render functions.`); return vnode; } const instance = getExposeProxy(internalInstance) || internalInstance.proxy; const bindings = vnode.dirs || (vnode.dirs = []); for (let i2 = 0; i2 < directives2.length; i2++) { let [dir, value, arg, modifiers = EMPTY_OBJ] = directives2[i2]; if (dir) { if (isFunction$1(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 i2 = 0; i2 < bindings.length; i2++) { const binding = bindings[i2]; if (oldBindings) { binding.oldValue = oldBindings[i2].value; } let hook = binding.dir[name]; if (hook) { pauseTracking(); callWithAsyncErrorHandling(hook, instance, 8, [ vnode.el, binding, vnode, prevVNode ]); resetTracking(); } } } const COMPONENTS = "components"; const DIRECTIVES = "directives"; function resolveComponent(name, maybeSelfReference) { return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; } const NULL_DYNAMIC_COMPONENT = Symbol(); function resolveDynamicComponent(component) { if (isString$1(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 /* do not include inferred name to avoid breaking existing code */ ); 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; } if (warnMissing && !res) { const extra = type === COMPONENTS ? ` If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``; warn$2(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); } return res; } else { warn$2(`resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`); } } function resolve(registry, name) { return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]); } function renderList(source, renderItem, cache2, index2) { let ret; const cached = cache2 && cache2[index2]; if (isArray$1(source) || isString$1(source)) { ret = new Array(source.length); for (let i2 = 0, l = source.length; i2 < l; i2++) { ret[i2] = renderItem(source[i2], i2, void 0, cached && cached[i2]); } } else if (typeof source === "number") { if (!Number.isInteger(source)) { warn$2(`The v-for range expect an integer value but got ${source}.`); } ret = new Array(source); for (let i2 = 0; i2 < source; i2++) { ret[i2] = renderItem(i2 + 1, i2, void 0, cached && cached[i2]); } } else if (isObject(source)) { if (source[Symbol.iterator]) { ret = Array.from(source, (item, i2) => renderItem(item, i2, void 0, cached && cached[i2])); } else { const keys = Object.keys(source); ret = new Array(keys.length); for (let i2 = 0, l = keys.length; i2 < l; i2++) { const key = keys[i2]; ret[i2] = renderItem(source[key], key, i2, cached && cached[i2]); } } } else { ret = []; } if (cache2) { cache2[index2] = ret; } return ret; } function renderSlot(slots, name, props = {}, fallback, noSlotted) { if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) { if (name !== "default") props.name = name; return createVNode("slot", props, fallback && fallback()); } let slot = slots[name]; if (slot && slot.length > 1) { warn$2(`SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.`); slot = () => []; } if (slot && slot._c) { slot._d = false; } openBlock(); const validSlotContent = slot && ensureValidVNode(slot(props)); const rendered = createBlock( Fragment, { key: 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 || `_${name}` }, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 ? 64 : -2 /* PatchFlags.BAIL */ ); 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; } const getPublicInstance = (i2) => { if (!i2) return null; if (isStatefulComponent(i2)) return getExposeProxy(i2) || i2.proxy; return getPublicInstance(i2.parent); }; const publicPropertiesMap = ( // Move PURE marker to new line to workaround compiler discarding it // due to type annotation /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), { $: (i2) => i2, $el: (i2) => i2.vnode.el, $data: (i2) => i2.data, $props: (i2) => shallowReadonly(i2.props), $attrs: (i2) => shallowReadonly(i2.attrs), $slots: (i2) => shallowReadonly(i2.slots), $refs: (i2) => shallowReadonly(i2.refs), $parent: (i2) => getPublicInstance(i2.parent), $root: (i2) => getPublicInstance(i2.root), $emit: (i2) => i2.emit, $options: (i2) => resolveMergedOptions(i2), $forceUpdate: (i2) => i2.f || (i2.f = () => queueJob(i2.update)), $nextTick: (i2) => i2.n || (i2.n = nextTick.bind(i2.proxy)), $watch: (i2) => instanceWatch.bind(i2) }) ); const isReservedPrefix = (key) => key === "_" || key === "$"; const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key); const PublicInstanceProxyHandlers = { get({ _: instance }, key) { const { ctx, setupState, data, props, accessCache, type, appContext } = instance; if (key === "__isVue") { return true; } let normalizedProps; if (key[0] !== "$") { const n2 = accessCache[key]; if (n2 !== void 0) { switch (n2) { 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, "get", key); markAttrsAccessed(); } 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 if (currentRenderingInstance && (!isString$1(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading // to infinite warning loop key.indexOf("__v") !== 0)) { if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { warn$2(`Property ${JSON.stringify(key)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`); } else if (instance === currentRenderingInstance) { warn$2(`Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`); } } }, set({ _: instance }, key, value) { const { data, setupState, ctx } = instance; if (hasSetupBinding(setupState, key)) { setupState[key] = value; return true; } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) { warn$2(`Cannot mutate