var vue = (function (exports) { 'use strict'; function makemap(str, expectslowercase) { const set = new set(str.split(",")); return expectslowercase ? (val) => set.has(val.tolowercase()) : (val) => set.has(val); } const empty_obj = object.freeze({}) ; const empty_arr = object.freeze([]) ; 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 isbuiltindirective = /* @__pure__ */ makemap( "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" ); 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) => { object.defineproperty(obj, key, { configurable: true, enumerable: false, 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 patchflagnames = { [1]: `text`, [2]: `class`, [4]: `style`, [8]: `props`, [16]: `full_props`, [32]: `need_hydration`, [64]: `stable_fragment`, [128]: `keyed_fragment`, [256]: `unkeyed_fragment`, [512]: `need_patch`, [1024]: `dynamic_slots`, [2048]: `dev_root_fragment`, [-1]: `hoisted`, [-2]: `bail` }; const slotflagstext = { [1]: "stable", [2]: "dynamic", [3]: "forwarded" }; 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"; const isgloballyallowed = /* @__pure__ */ makemap(globals_allowed); const range = 2; function generatecodeframe(source, start = 0, end = source.length) { let lines = source.split(/(\r?\n)/); const newlinesequences = lines.filter((_, idx) => idx % 2 === 1); lines = lines.filter((_, idx) => idx % 2 === 0); let count = 0; const res = []; for (let i = 0; i < lines.length; i++) { count += lines[i].length + (newlinesequences[i] && newlinesequences[i].length || 0); if (count >= start) { for (let j = i - range; j <= i + range || end > count; j++) { if (j < 0 || j >= lines.length) continue; const line = j + 1; res.push( `${line}${" ".repeat(math.max(3 - string(line).length, 0))}| ${lines[j]}` ); const linelength = lines[j].length; const newlineseqlength = newlinesequences[j] && newlinesequences[j].length || 0; if (j === i) { const pad = start - (count - (linelength + newlineseqlength)); const length = math.max( 1, end > count ? linelength - pad : end - start ); res.push(` | ` + " ".repeat(pad) + "^".repeat(length)); } else if (j > i) { if (end > count) { const length = math.max(math.min(end - count, linelength), 1); res.push(` | ` + "^".repeat(length)); } count += linelength + newlineseqlength; } } break; } } return res.join("\n"); } 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 stringifystyle(styles) { let ret = ""; if (!styles || isstring(styles)) { return ret; } for (const key in styles) { const value = styles[key]; const normalizedkey = key.startswith(`--`) ? key : hyphenate(key); if (isstring(value) || typeof value === "number") { ret += `${normalizedkey}:${value};`; } } 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 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 math_tags = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; const void_tags = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; const ishtmltag = /* @__pure__ */ makemap(html_tags); const issvgtag = /* @__pure__ */ makemap(svg_tags); const ismathmltag = /* @__pure__ */ makemap(math_tags); const isvoidtag = /* @__pure__ */ makemap(void_tags); const specialbooleanattrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; const isspecialbooleanattr = /* @__pure__ */ makemap(specialbooleanattrs); const isbooleanattr = /* @__pure__ */ makemap( specialbooleanattrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` ); function includebooleanattr(value) { return !!value || value === ""; } const isknownhtmlattr = /* @__pure__ */ makemap( `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` ); const isknownsvgattr = /* @__pure__ */ makemap( `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributename,attributetype,azimuth,basefrequency,baseline-shift,baseprofile,bbox,begin,bias,by,calcmode,cap-height,class,clip,clippathunits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentscripttype,contentstyletype,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseconstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgemode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterres,filterunits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphref,gradienttransform,gradientunits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelmatrix,kernelunitlength,kerning,keypoints,keysplines,keytimes,lang,lengthadjust,letter-spacing,lighting-color,limitingconeangle,local,marker-end,marker-mid,marker-start,markerheight,markerunits,markerwidth,mask,maskcontentunits,maskunits,mathematical,max,media,method,min,mode,name,numoctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathlength,patterncontentunits,patterntransform,patternunits,ping,pointer-events,points,pointsatx,pointsaty,pointsatz,preservealpha,preserveaspectratio,primitiveunits,r,radius,referrerpolicy,refx,refy,rel,rendering-intent,repeatcount,repeatdur,requiredextensions,requiredfeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularconstant,specularexponent,speed,spreadmethod,startoffset,stddeviation,stemh,stemv,stitchtiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfacescale,systemlanguage,tabindex,tablevalues,target,targetx,targety,text-anchor,text-decoration,text-rendering,textlength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewbox,viewtarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xchannelselector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,ychannelselector,z,zoomandpan` ); 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 todisplaystring = (val) => { return isstring(val) ? val : val == null ? "" : isarray(val) || isobject(val) && (val.tostring === objecttostring || !isfunction(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], 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 issymbol(v) ? `symbol(${(_a = v.description) != null ? _a : i})` : v; }; function warn$2(msg, ...args) { console.warn(`[vue warn] ${msg}`, ...args); } let activeeffectscope; class effectscope { constructor(detached = false) { this.detached = detached; /** * @internal */ this._active = true; /** * @internal */ this.effects = []; /** * @internal */ this.cleanups = []; this.parent = activeeffectscope; if (!detached && activeeffectscope) { this.index = (activeeffectscope.scopes || (activeeffectscope.scopes = [])).push( this ) - 1; } } get active() { return this._active; } run(fn) { if (this._active) { const currenteffectscope = activeeffectscope; try { activeeffectscope = this; return fn(); } finally { activeeffectscope = currenteffectscope; } } else { warn$2(`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 i, l; for (i = 0, l = this.effects.length; i < l; i++) { this.effects[i].stop(); } for (i = 0, l = this.cleanups.length; i < l; i++) { this.cleanups[i](); } if (this.scopes) { for (i = 0, l = this.scopes.length; i < l; i++) { this.scopes[i].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(fn) { if (activeeffectscope) { activeeffectscope.cleanups.push(fn); } else { warn$2( `onscopedispose() is called when there is no active effect scope to be associated with.` ); } } let activeeffect; class reactiveeffect { constructor(fn, trigger, scheduler, scope) { this.fn = fn; this.trigger = trigger; this.scheduler = scheduler; this.active = true; this.deps = []; /** * @internal */ this._dirtylevel = 3; /** * @internal */ this._trackid = 0; /** * @internal */ this._runnings = 0; /** * @internal */ this._queryings = 0; /** * @internal */ this._depslength = 0; recordeffectscope(this, scope); } get dirty() { if (this._dirtylevel === 1) { this._dirtylevel = 0; this._queryings++; pausetracking(); for (const dep of this.deps) { if (dep.computed) { triggercomputed(dep.computed); if (this._dirtylevel >= 2) { break; } } } resettracking(); this._queryings--; } return this._dirtylevel >= 2; } set dirty(v) { this._dirtylevel = v ? 3 : 0; } run() { this._dirtylevel = 0; if (!this.active) { return this.fn(); } let lastshouldtrack = shouldtrack; let lasteffect = activeeffect; try { shouldtrack = true; activeeffect = this; this._runnings++; precleanupeffect(this); return this.fn(); } finally { postcleanupeffect(this); this._runnings--; activeeffect = lasteffect; shouldtrack = lastshouldtrack; } } stop() { var _a; if (this.active) { precleanupeffect(this); postcleanupeffect(this); (_a = this.onstop) == null ? void 0 : _a.call(this); this.active = false; } } } function triggercomputed(computed) { return computed.value; } function precleanupeffect(effect2) { effect2._trackid++; effect2._depslength = 0; } function postcleanupeffect(effect2) { if (effect2.deps && effect2.deps.length > effect2._depslength) { for (let i = effect2._depslength; i < effect2.deps.length; i++) { cleanupdepeffect(effect2.deps[i], effect2); } effect2.deps.length = effect2._depslength; } } function cleanupdepeffect(dep, effect2) { const trackid = dep.get(effect2); if (trackid !== void 0 && effect2._trackid !== trackid) { dep.delete(effect2); if (dep.size === 0) { dep.cleanup(); } } } function effect(fn, options) { if (fn.effect instanceof reactiveeffect) { fn = fn.effect.fn; } const _effect = new reactiveeffect(fn, noop, () => { if (_effect.dirty) { _effect.run(); } }); if (options) { extend(_effect, options); if (options.scope) recordeffectscope(_effect, options.scope); } if (!options || !options.lazy) { _effect.run(); } const runner = _effect.run.bind(_effect); runner.effect = _effect; return runner; } function stop(runner) { runner.effect.stop(); } let shouldtrack = true; let pauseschedulestack = 0; const trackstack = []; function pausetracking() { trackstack.push(shouldtrack); shouldtrack = false; } function resettracking() { const last = trackstack.pop(); shouldtrack = last === void 0 ? true : last; } function pausescheduling() { pauseschedulestack++; } function resetscheduling() { pauseschedulestack--; while (!pauseschedulestack && queueeffectschedulers.length) { queueeffectschedulers.shift()(); } } function trackeffect(effect2, dep, debuggereventextrainfo) { var _a; if (dep.get(effect2) !== effect2._trackid) { dep.set(effect2, effect2._trackid); const olddep = effect2.deps[effect2._depslength]; if (olddep !== dep) { if (olddep) { cleanupdepeffect(olddep, effect2); } effect2.deps[effect2._depslength++] = dep; } else { effect2._depslength++; } { (_a = effect2.ontrack) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggereventextrainfo)); } } } const queueeffectschedulers = []; function triggereffects(dep, dirtylevel, debuggereventextrainfo) { var _a; pausescheduling(); for (const effect2 of dep.keys()) { if (!effect2.allowrecurse && effect2._runnings) { continue; } if (effect2._dirtylevel < dirtylevel && (!effect2._runnings || dirtylevel !== 2)) { const lastdirtylevel = effect2._dirtylevel; effect2._dirtylevel = dirtylevel; if (lastdirtylevel === 0 && (!effect2._queryings || dirtylevel !== 2)) { { (_a = effect2.ontrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggereventextrainfo)); } effect2.trigger(); if (effect2.scheduler) { queueeffectschedulers.push(effect2.scheduler); } } } } resetscheduling(); } const createdep = (cleanup, computed) => { const dep = /* @__pure__ */ new map(); dep.cleanup = cleanup; dep.computed = computed; return dep; }; const targetmap = /* @__pure__ */ new weakmap(); const iterate_key = symbol("iterate" ); const map_key_iterate_key = symbol("map key iterate" ); 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(() => depsmap.delete(key))); } trackeffect( activeeffect, dep, { target, type, key } ); } } 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(target)) { const newlength = number(newvalue); depsmap.foreach((dep, key2) => { if (key2 === "length" || !issymbol(key2) && key2 >= newlength) { deps.push(dep); } }); } else { if (key !== void 0) { deps.push(depsmap.get(key)); } switch (type) { case "add": if (!isarray(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(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; } } pausescheduling(); for (const dep of deps) { if (dep) { triggereffects( dep, 3, { target, type, key, newvalue, oldvalue, oldtarget } ); } } resetscheduling(); } function getdepfromreactive(object, key) { var _a; return (_a = targetmap.get(object)) == null ? void 0 : _a.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 arrayinstrumentations = /* @__pure__ */ createarrayinstrumentations(); function createarrayinstrumentations() { const instrumentations = {}; ["includes", "indexof", "lastindexof"].foreach((key) => { instrumentations[key] = function(...args) { const arr = toraw(this); for (let i = 0, l = this.length; i < l; i++) { track(arr, "get", i + ""); } 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(); pausescheduling(); const res = toraw(this)[key].apply(this, args); resetscheduling(); resettracking(); return res; }; }); return instrumentations; } function hasownproperty(key) { const obj = toraw(this); track(obj, "has", key); return obj.hasownproperty(key); } class basereactivehandler { constructor(_isreadonly = false, _shallow = false) { this._isreadonly = _isreadonly; this._shallow = _shallow; } get(target, key, receiver) { const isreadonly2 = this._isreadonly, shallow = this._shallow; 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") { if (receiver === (isreadonly2 ? shallow ? shallowreadonlymap : readonlymap : shallow ? shallowreactivemap : reactivemap).get(target) || // receiver is not the reactive proxy, but has the same prototype // this means the reciever is a user proxy of the reactive proxy object.getprototypeof(target) === object.getprototypeof(receiver)) { return target; } return; } const targetisarray = isarray(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; } } class mutablereactivehandler extends basereactivehandler { constructor(shallow = false) { super(false, shallow); } set(target, key, value, receiver) { let oldvalue = target[key]; if (!this._shallow) { 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, 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; } 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; } 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(shallow = false) { super(true, shallow); } set(target, key) { { warn$2( `set operation on key "${string(key)}" failed: target is readonly.`, target ); } return true; } deleteproperty(target, key) { { warn$2( `delete operation on key "${string(key)}" failed: target is readonly.`, target ); } 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 get(target, key, isreadonly = false, isshallow = false) { target = target["__v_raw"]; const rawtarget = toraw(target); const rawkey = toraw(key); if (!isreadonly) { if (haschanged(key, rawkey)) { track(rawtarget, "get", key); } track(rawtarget, "get", rawkey); } const { has: has2 } = getproto(rawtarget); const wrap = isshallow ? toshallow : isreadonly ? 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, isreadonly = false) { const target = this["__v_raw"]; const rawtarget = toraw(target); const rawkey = toraw(key); if (!isreadonly) { if (haschanged(key, rawkey)) { track(rawtarget, "has", key); } track(rawtarget, "has", rawkey); } return key === rawkey ? target.has(key) : target.has(key) || target.has(rawkey); } function size(target, isreadonly = false) { target = target["__v_raw"]; !isreadonly && 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(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(isreadonly, isshallow) { return function foreach(callback, thisarg) { const observed = this; const target = observed["__v_raw"]; const rawtarget = toraw(target); const wrap = isshallow ? toshallow : isreadonly ? toreadonly : toreactive; !isreadonly && track(rawtarget, "iterate", iterate_key); return target.foreach((value, key) => { return callback.call(thisarg, wrap(value), wrap(key), observed); }); }; } function createiterablemethod(method, isreadonly, isshallow) { 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 = isshallow ? toshallow : isreadonly ? toreadonly : toreactive; !isreadonly && 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 : type === "clear" ? void 0 : this; }; } function createinstrumentations() { const mutableinstrumentations2 = { get(key) { return get(this, key); }, get size() { return size(this); }, has, add, set, delete: deleteentry, clear, foreach: createforeach(false, false) }; const shallowinstrumentations2 = { get(key) { return get(this, key, false, true); }, get size() { return size(this); }, has, add, set, delete: deleteentry, clear, foreach: createforeach(false, true) }; const readonlyinstrumentations2 = { get(key) { return get(this, key, true); }, get size() { return size(this, true); }, has(key) { return has.call(this, key, true); }, add: createreadonlymethod("add"), set: createreadonlymethod("set"), delete: createreadonlymethod("delete"), clear: createreadonlymethod("clear"), foreach: createforeach(true, false) }; const shallowreadonlyinstrumentations2 = { get(key) { return get(this, key, true, true); }, get size() { return size(this, true); }, has(key) { return has.call(this, key, true); }, add: createreadonlymethod("add"), set: createreadonlymethod("set"), delete: createreadonlymethod("delete"), clear: createreadonlymethod("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(isreadonly, shallow) { const instrumentations = shallow ? isreadonly ? shallowreadonlyinstrumentations : shallowinstrumentations : isreadonly ? readonlyinstrumentations : mutableinstrumentations; return (target, key, receiver) => { if (key === "__v_isreactive") { return !isreadonly; } else if (key === "__v_isreadonly") { return isreadonly; } 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 /* common */; case "map": case "set": case "weakmap": case "weakset": return 2 /* collection */; default: return 0 /* invalid */; } } function gettargettype(value) { return value["__v_skip"] || !object.isextensible(value) ? 0 /* invalid */ : 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"] && !(isreadonly2 && target["__v_isreactive"])) { return target; } const existingproxy = proxymap.get(target); if (existingproxy) { return existingproxy; } const targettype = gettargettype(target); if (targettype === 0 /* invalid */) { return target; } const proxy = new proxy( target, targettype === 2 /* collection */ ? 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 isreactive(value) || isreadonly(value); } function toraw(observed) { const raw = observed && observed["__v_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; class computedrefimpl { constructor(getter, _setter, isreadonly, isssr) { this._setter = _setter; this.dep = void 0; this.__v_isref = true; this["__v_isreadonly"] = false; this.effect = new reactiveeffect( () => getter(this._value), () => triggerrefvalue(this, 1) ); this.effect.computed = this; this.effect.active = this._cacheable = !isssr; this["__v_isreadonly"] = isreadonly; } get value() { const self = toraw(this); trackrefvalue(self); if (!self._cacheable || self.effect.dirty) { if (haschanged(self._value, self._value = self.effect.run())) { triggerrefvalue(self, 2); } } return self._value; } set value(newvalue) { this._setter(newvalue); } // #region polyfill _dirty for backward compatibility third party code for vue <= 3.3.x get _dirty() { return this.effect.dirty; } set _dirty(v) { this.effect.dirty = v; } // #endregion } function computed$1(getteroroptions, debugoptions, isssr = false) { let getter; let setter; const onlygetter = isfunction(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; } function trackrefvalue(ref2) { if (shouldtrack && activeeffect) { ref2 = toraw(ref2); trackeffect( activeeffect, ref2.dep || (ref2.dep = createdep( () => ref2.dep = void 0, ref2 instanceof computedrefimpl ? ref2 : void 0 )), { target: ref2, type: "get", key: "value" } ); } } function triggerrefvalue(ref2, dirtylevel = 3, newval) { ref2 = toraw(ref2); const dep = ref2.dep; if (dep) { triggereffects( dep, dirtylevel, { target: ref2, type: "set", key: "value", newvalue: newval } ); } } function isref(r) { return !!(r && r.__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(newval) || isreadonly(newval); newval = usedirectvalue ? newval : toraw(newval); if (haschanged(newval, this._rawvalue)) { this._rawvalue = newval; this._value = usedirectvalue ? newval : toreactive(newval); triggerrefvalue(this, 3, newval); } } } function triggerref(ref2) { triggerrefvalue(ref2, 3, ref2.value ); } function unref(ref2) { return isref(ref2) ? ref2.value : ref2; } function tovalue(source) { return isfunction(source) ? source() : unref(source); } 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, set } = factory( () => trackrefvalue(this), () => triggerrefvalue(this) ); this._get = get; this._set = set; } 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(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; } 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); } } class getterrefimpl { constructor(_getter) { this._getter = _getter; this.__v_isref = true; this.__v_isreadonly = true; } get value() { return 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); } const trackoptypes = { "get": "get", "has": "has", "iterate": "iterate" }; const triggeroptypes = { "set": "set", "add": "add", "delete": "delete", "clear": "clear" }; const stack$1 = []; function pushwarningcontext(vnode) { stack$1.push(vnode); } function popwarningcontext() { stack$1.pop(); } function warn$1(msg, ...args) { pausetracking(); const instance = stack$1.length ? stack$1[stack$1.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$1[stack$1.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) { if (val === void 0) { return; } else if (typeof val !== "number") { warn$1(`${type} is not a valid number - got ${json.stringify(val)}.`); } else if (isnan(val)) { warn$1(`${type} is nan - the duration expression might be incorrect.`); } } const errorcodes = { "setup_function": 0, "0": "setup_function", "render_function": 1, "1": "render_function", "watch_getter": 2, "2": "watch_getter", "watch_callback": 3, "3": "watch_callback", "watch_cleanup": 4, "4": "watch_cleanup", "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" }; 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. this is likely a vue internals bug. please open an issue at https://github.com/vuejs/core ." }; function callwitherrorhandling(fn, instance, type, args) { let res; try { res = args ? fn(...args) : fn(); } catch (err) { handleerror(err, instance, type); } return res; } 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; } 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; if (instance) { let cur = instance.parent; const exposedinstance = instance.proxy; const errorinfo = errortypestrings$1[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; } 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$1[type]; if (contextvnode) { pushwarningcontext(contextvnode); } warn$1(`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(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.pre) { start = middle + 1; } else { 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 i = queue.indexof(job); if (i > flushindex) { queue.splice(i, 1); } } function queuepostflushcb(cb) { if (!isarray(cb)) { if (!activepostflushcbs || !activepostflushcbs.includes( cb, cb.allowrecurse ? postflushindex + 1 : postflushindex )) { pendingpostflushcbs.push(cb); } } else { pendingpostflushcbs.push(...cb); } queueflush(); } function flushpreflushcbs(instance, seen, i = isflushing ? flushindex + 1 : 0) { { seen = seen || /* @__pure__ */ new map(); } for (; i < queue.length; i++) { const cb = queue[i]; if (cb && cb.pre) { if (instance && cb.id !== instance.uid) { continue; } if (checkrecursiveupdates(seen, cb)) { continue; } queue.splice(i, 1); i--; cb(); } } } function flushpostflushcbs(seen) { if (pendingpostflushcbs.length) { const deduped = [...new set(pendingpostflushcbs)]; pendingpostflushcbs.length = 0; if (activepostflushcbs) { activepostflushcbs.push(...deduped); return; } activepostflushcbs = deduped; { seen = seen || /* @__pure__ */ new map(); } activepostflushcbs.sort((a, b) => getid(a) - getid(b)); for (postflushindex = 0; postflushindex < activepostflushcbs.length; postflushindex++) { if (checkrecursiveupdates(seen, activepostflushcbs[postflushindex])) { continue; } activepostflushcbs[postflushindex](); } activepostflushcbs = null; postflushindex = 0; } } const getid = (job) => job.id == null ? infinity : job.id; const comparator = (a, b) => { const diff = getid(a) - getid(b); if (diff === 0) { if (a.pre && !b.pre) return -1; if (b.pre && !a.pre) return 1; } return diff; }; function flushjobs(seen) { isflushpending = false; isflushing = true; { seen = seen || /* @__pure__ */ new map(); } queue.sort(comparator); const check = (job) => checkrecursiveupdates(seen, 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); } } } finally { flushindex = 0; queue.length = 0; flushpostflushcbs(seen); isflushing = false; currentflushpromise = null; if (queue.length || pendingpostflushcbs.length) { flushjobs(seen); } } } function checkrecursiveupdates(seen, fn) { if (!seen.has(fn)) { seen.set(fn, 1); } else { const count = seen.get(fn); if (count > recursion_limit) { const instance = fn.ownerinstance; const componentname = instance && getcomponentname(instance.type); handleerror( `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.`, null, 10 ); return true; } else { seen.set(fn, count + 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 id = instance.type.__hmrid; let record = map.get(id); if (!record) { createrecord(id, instance.type); record = map.get(id); } record.instances.add(instance); } function unregisterhmr(instance) { map.get(instance.type.__hmrid).instances.delete(instance); } function createrecord(id, initialdef) { if (map.has(id)) { return false; } map.set(id, { initialdef: normalizeclasscomponent(initialdef), instances: /* @__pure__ */ new set() }); return true; } function normalizeclasscomponent(component) { return isclasscomponent(component) ? component.__vccopts : component; } function rerender(id, newrender) { const record = map.get(id); 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.effect.dirty = true; instance.update(); ishmrupdating = false; }); } function reload(id, newcomp) { const record = map.get(id); 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.propscache.delete(instance.type); instance.appcontext.emitscache.delete(instance.type); instance.appcontext.optionscache.delete(instance.type); if (instance.cereload) { hmrdirtycomponents.add(oldcomp); instance.cereload(newcomp.styles); hmrdirtycomponents.delete(oldcomp); } else if (instance.parent) { instance.parent.effect.dirty = true; 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(fn) { return (id, arg) => { try { return fn(id, arg); } catch (e) { console.error(e); console.warn( `[hmr] something went wrong during vue component hot-reload. full reload required.` ); } }; } let devtools$1; let buffer = []; let devtoolsnotinstalled = false; function emit$1(event, ...args) { if (devtools$1) { devtools$1.emit(event, ...args); } else if (!devtoolsnotinstalled) { buffer.push({ event, args }); } } 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 !((_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; devtoolsnotinstalled = true; buffer = []; } }, 3e3); } else { devtoolsnotinstalled = true; buffer = []; } } function devtoolsinitapp(app, version) { emit$1("app:init" /* app_init */, app, version, { fragment, text, comment, static }); } function devtoolsunmountapp(app) { emit$1("app:unmount" /* app_unmount */, app); } const devtoolscomponentadded = /* @__pure__ */ createdevtoolscomponenthook( "component:added" /* component_added */ ); const devtoolscomponentupdated = /* @__pure__ */ createdevtoolscomponenthook("component:updated" /* component_updated */); const _devtoolscomponentremoved = /* @__pure__ */ createdevtoolscomponenthook( "component:removed" /* component_removed */ ); const devtoolscomponentremoved = (component) => { if (devtools$1 && typeof devtools$1.cleanupbuffer === "function" && // remove the component if it wasn't buffered !devtools$1.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" /* performance_start */ ); const devtoolsperfend = /* @__pure__ */ createdevtoolsperformancehook( "perf:end" /* 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_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$1( `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(validator)) { const isvalid = validator(...rawargs); if (!isvalid) { warn$1( `invalid event arguments: event validation failed for event "${event}".` ); } } } } } let args = rawargs; const ismodellistener = event.startswith("update:"); const modelarg = ismodellistener && 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((a) => isstring(a) ? a.trim() : a); } if (number) { args = rawargs.map(loosetonumber); } } { devtoolscomponentemit(instance, event, args); } { const lowercaseevent = event.tolowercase(); if (lowercaseevent !== event && props[tohandlerkey(lowercaseevent)]) { warn$1( `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 && ismodellistener) { 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 cache = appcontext.emitscache; const cached = cache.get(comp); if (cached !== void 0) { return cached; } const raw = comp.emits; let normalized = {}; let hasextends = false; if (!isfunction(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)) { cache.set(comp, null); } return null; } if (isarray(raw)) { raw.foreach((key) => normalized[key] = null); } else { extend(normalized, raw); } if (isobject(comp)) { cache.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(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); } } { 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, render, 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; const thisproxy = setupstate.__isscriptsetup ? new proxy(proxytouse, { get(target, key, receiver) { warn$1( `property '${string( key )}' was accessed via 'this'. avoid using 'this' in templates.` ); return reflect.get(target, key, receiver); } }) : proxytouse; result = normalizevnode( render.call( thisproxy, proxytouse, rendercache, props, setupstate, data, ctx ) ); fallthroughattrs = attrs; } else { const render2 = component; if (attrs === props) { markattrsaccessed(); } result = normalizevnode( render2.length > 1 ? render2( props, true ? { get attrs() { markattrsaccessed(); return attrs; }, slots, emit } : { attrs, slots, emit } ) : render2( props, null /* we know it doesn't need it */ ) ); fallthroughattrs = component.props ? attrs : getfunctionalfallthrough(attrs); } } catch (err) { blockstack.length = 0; handleerror(err, instance, 1); 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 i = 0, l = allattrs.length; i < l; i++) { const key = allattrs[i]; if (ison(key)) { if (!ismodellistener(key)) { eventattrs.push(key[2].tolowercase() + key.slice(3)); } } else { extraattrs.push(key); } } if (extraattrs.length) { warn$1( `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$1( `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$1( `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$1( `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 index = rawchildren.indexof(childroot); const dynamicindex = dynamicchildren ? dynamicchildren.indexof(childroot) : -1; const setroot = (updatedroot) => { rawchildren[index] = updatedroot; if (dynamicchildren) { if (dynamicindex > -1) { dynamicchildren[dynamicindex] = updatedroot; } else if (updatedroot.patchflag > 0) { vnode.dynamicchildren = [...dynamicchildren, updatedroot]; } } }; return [normalizevnode(childroot), setroot]; }; function filtersingleroot(children) { let singleroot; for (let i = 0; i < children.length; i++) { const child = children[i]; 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 i = 0; i < dynamicprops.length; i++) { const key = dynamicprops[i]; 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 i = 0; i < nextkeys.length; i++) { const key = nextkeys[i]; if (nextprops[key] !== prevprops[key] && !isemitlistener(emitsoptions, key)) { return true; } } return false; } function updatehochostel({ vnode, parent }, el) { if (!el) return; while (parent) { const root = parent.subtree; if (root.suspense && root.suspense.activebranch === vnode) { root.el = vnode.el; } if (root === vnode) { (vnode = parent.vnode).el = el; parent = parent.parent; } else { break; } } } 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; } 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$1(`failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); } return res; } else { warn$1( `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))]); } const issuspense = (type) => type.__issuspense; let suspenseid = 0; const suspenseimpl = { name: "suspense", // in order to make suspense tree-shakable, we need to avoid importing it // directly in the renderer. the renderer checks for the __issuspense flag // on a vnode's type and calls the `process` method, passing in renderer // internals. __issuspense: true, process(n1, n2, container, anchor, parentcomponent, parentsuspense, namespace, slotscopeids, optimized, rendererinternals) { if (n1 == null) { mountsuspense( n2, container, anchor, parentcomponent, parentsuspense, namespace, slotscopeids, optimized, rendererinternals ); } else { patchsuspense( n1, n2, container, anchor, parentcomponent, namespace, slotscopeids, optimized, rendererinternals ); } }, hydrate: hydratesuspense, create: createsuspenseboundary, normalize: normalizesuspensechildren }; const suspense = suspenseimpl ; function triggerevent(vnode, name) { const eventlistener = vnode.props && vnode.props[name]; if (isfunction(eventlistener)) { eventlistener(); } } function mountsuspense(vnode, container, anchor, parentcomponent, parentsuspense, namespace, slotscopeids, optimized, rendererinternals) { const { p: patch, o: { createelement } } = rendererinternals; const hiddencontainer = createelement("div"); const suspense = vnode.suspense = createsuspenseboundary( vnode, parentsuspense, parentcomponent, container, hiddencontainer, anchor, namespace, slotscopeids, optimized, rendererinternals ); patch( null, suspense.pendingbranch = vnode.sscontent, hiddencontainer, null, parentcomponent, suspense, namespace, slotscopeids ); if (suspense.deps > 0) { triggerevent(vnode, "onpending"); triggerevent(vnode, "onfallback"); patch( null, vnode.ssfallback, container, anchor, parentcomponent, null, // fallback tree will not have suspense context namespace, slotscopeids ); setactivebranch(suspense, vnode.ssfallback); } else { suspense.resolve(false, true); } } function patchsuspense(n1, n2, container, anchor, parentcomponent, namespace, slotscopeids, optimized, { p: patch, um: unmount, o: { createelement } }) { const suspense = n2.suspense = n1.suspense; suspense.vnode = n2; n2.el = n1.el; const newbranch = n2.sscontent; const newfallback = n2.ssfallback; const { activebranch, pendingbranch, isinfallback, ishydrating } = suspense; if (pendingbranch) { suspense.pendingbranch = newbranch; if (issamevnodetype(newbranch, pendingbranch)) { patch( pendingbranch, newbranch, suspense.hiddencontainer, null, parentcomponent, suspense, namespace, slotscopeids, optimized ); if (suspense.deps <= 0) { suspense.resolve(); } else if (isinfallback) { if (!ishydrating) { patch( activebranch, newfallback, container, anchor, parentcomponent, null, // fallback tree will not have suspense context namespace, slotscopeids, optimized ); setactivebranch(suspense, newfallback); } } } else { suspense.pendingid = suspenseid++; if (ishydrating) { suspense.ishydrating = false; suspense.activebranch = pendingbranch; } else { unmount(pendingbranch, parentcomponent, suspense); } suspense.deps = 0; suspense.effects.length = 0; suspense.hiddencontainer = createelement("div"); if (isinfallback) { patch( null, newbranch, suspense.hiddencontainer, null, parentcomponent, suspense, namespace, slotscopeids, optimized ); if (suspense.deps <= 0) { suspense.resolve(); } else { patch( activebranch, newfallback, container, anchor, parentcomponent, null, // fallback tree will not have suspense context namespace, slotscopeids, optimized ); setactivebranch(suspense, newfallback); } } else if (activebranch && issamevnodetype(newbranch, activebranch)) { patch( activebranch, newbranch, container, anchor, parentcomponent, suspense, namespace, slotscopeids, optimized ); suspense.resolve(true); } else { patch( null, newbranch, suspense.hiddencontainer, null, parentcomponent, suspense, namespace, slotscopeids, optimized ); if (suspense.deps <= 0) { suspense.resolve(); } } } } else { if (activebranch && issamevnodetype(newbranch, activebranch)) { patch( activebranch, newbranch, container, anchor, parentcomponent, suspense, namespace, slotscopeids, optimized ); setactivebranch(suspense, newbranch); } else { triggerevent(n2, "onpending"); suspense.pendingbranch = newbranch; if (newbranch.shapeflag & 512) { suspense.pendingid = newbranch.component.suspenseid; } else { suspense.pendingid = suspenseid++; } patch( null, newbranch, suspense.hiddencontainer, null, parentcomponent, suspense, namespace, slotscopeids, optimized ); if (suspense.deps <= 0) { suspense.resolve(); } else { const { timeout, pendingid } = suspense; if (timeout > 0) { settimeout(() => { if (suspense.pendingid === pendingid) { suspense.fallback(newfallback); } }, timeout); } else if (timeout === 0) { suspense.fallback(newfallback); } } } } } let haswarned = false; function createsuspenseboundary(vnode, parentsuspense, parentcomponent, container, hiddencontainer, anchor, namespace, slotscopeids, optimized, rendererinternals, ishydrating = false) { if (!haswarned) { haswarned = true; console[console.info ? "info" : "log"]( ` is an experimental feature and its api will likely change.` ); } const { p: patch, m: move, um: unmount, n: next, o: { parentnode, remove } } = rendererinternals; let parentsuspenseid; const issuspensible = isvnodesuspensible(vnode); if (issuspensible) { if (parentsuspense == null ? void 0 : parentsuspense.pendingbranch) { parentsuspenseid = parentsuspense.pendingid; parentsuspense.deps++; } } const timeout = vnode.props ? tonumber(vnode.props.timeout) : void 0; { assertnumber(timeout, `suspense timeout`); } const suspense = { vnode, parent: parentsuspense, parentcomponent, namespace, container, hiddencontainer, anchor, deps: 0, pendingid: suspenseid++, timeout: typeof timeout === "number" ? timeout : -1, activebranch: null, pendingbranch: null, isinfallback: !ishydrating, ishydrating, isunmounted: false, effects: [], resolve(resume = false, sync = false) { { if (!resume && !suspense.pendingbranch) { throw new error( `suspense.resolve() is called without a pending branch.` ); } if (suspense.isunmounted) { throw new error( `suspense.resolve() is called on an already unmounted suspense boundary.` ); } } const { vnode: vnode2, activebranch, pendingbranch, pendingid, effects, parentcomponent: parentcomponent2, container: container2 } = suspense; let delayenter = false; if (suspense.ishydrating) { suspense.ishydrating = false; } else if (!resume) { delayenter = activebranch && pendingbranch.transition && pendingbranch.transition.mode === "out-in"; if (delayenter) { activebranch.transition.afterleave = () => { if (pendingid === suspense.pendingid) { move( pendingbranch, container2, next(activebranch), 0 ); queuepostflushcb(effects); } }; } let { anchor: anchor2 } = suspense; if (activebranch) { anchor2 = next(activebranch); unmount(activebranch, parentcomponent2, suspense, true); } if (!delayenter) { move(pendingbranch, container2, anchor2, 0); } } setactivebranch(suspense, pendingbranch); suspense.pendingbranch = null; suspense.isinfallback = false; let parent = suspense.parent; let hasunresolvedancestor = false; while (parent) { if (parent.pendingbranch) { parent.effects.push(...effects); hasunresolvedancestor = true; break; } parent = parent.parent; } if (!hasunresolvedancestor && !delayenter) { queuepostflushcb(effects); } suspense.effects = []; if (issuspensible) { if (parentsuspense && parentsuspense.pendingbranch && parentsuspenseid === parentsuspense.pendingid) { parentsuspense.deps--; if (parentsuspense.deps === 0 && !sync) { parentsuspense.resolve(); } } } triggerevent(vnode2, "onresolve"); }, fallback(fallbackvnode) { if (!suspense.pendingbranch) { return; } const { vnode: vnode2, activebranch, parentcomponent: parentcomponent2, container: container2, namespace: namespace2 } = suspense; triggerevent(vnode2, "onfallback"); const anchor2 = next(activebranch); const mountfallback = () => { if (!suspense.isinfallback) { return; } patch( null, fallbackvnode, container2, anchor2, parentcomponent2, null, // fallback tree will not have suspense context namespace2, slotscopeids, optimized ); setactivebranch(suspense, fallbackvnode); }; const delayenter = fallbackvnode.transition && fallbackvnode.transition.mode === "out-in"; if (delayenter) { activebranch.transition.afterleave = mountfallback; } suspense.isinfallback = true; unmount( activebranch, parentcomponent2, null, // no suspense so unmount hooks fire now true // shouldremove ); if (!delayenter) { mountfallback(); } }, move(container2, anchor2, type) { suspense.activebranch && move(suspense.activebranch, container2, anchor2, type); suspense.container = container2; }, next() { return suspense.activebranch && next(suspense.activebranch); }, registerdep(instance, setuprendereffect) { const isinpendingsuspense = !!suspense.pendingbranch; if (isinpendingsuspense) { suspense.deps++; } const hydratedel = instance.vnode.el; instance.asyncdep.catch((err) => { handleerror(err, instance, 0); }).then((asyncsetupresult) => { if (instance.isunmounted || suspense.isunmounted || suspense.pendingid !== instance.suspenseid) { return; } instance.asyncresolved = true; const { vnode: vnode2 } = instance; { pushwarningcontext(vnode2); } handlesetupresult(instance, asyncsetupresult, false); if (hydratedel) { vnode2.el = hydratedel; } const placeholder = !hydratedel && instance.subtree.el; setuprendereffect( instance, vnode2, // component may have been moved before resolve. // if this is not a hydration, instance.subtree will be the comment // placeholder. parentnode(hydratedel || instance.subtree.el), // anchor will not be used if this is hydration, so only need to // consider the comment placeholder case. hydratedel ? null : next(instance.subtree), suspense, namespace, optimized ); if (placeholder) { remove(placeholder); } updatehochostel(instance, vnode2.el); { popwarningcontext(); } if (isinpendingsuspense && --suspense.deps === 0) { suspense.resolve(); } }); }, unmount(parentsuspense2, doremove) { suspense.isunmounted = true; if (suspense.activebranch) { unmount( suspense.activebranch, parentcomponent, parentsuspense2, doremove ); } if (suspense.pendingbranch) { unmount( suspense.pendingbranch, parentcomponent, parentsuspense2, doremove ); } } }; return suspense; } function hydratesuspense(node, vnode, parentcomponent, parentsuspense, namespace, slotscopeids, optimized, rendererinternals, hydratenode) { const suspense = vnode.suspense = createsuspenseboundary( vnode, parentsuspense, parentcomponent, node.parentnode, // eslint-disable-next-line no-restricted-globals document.createelement("div"), null, namespace, slotscopeids, optimized, rendererinternals, true ); const result = hydratenode( node, suspense.pendingbranch = vnode.sscontent, parentcomponent, suspense, slotscopeids, optimized ); if (suspense.deps === 0) { suspense.resolve(false, true); } return result; } function normalizesuspensechildren(vnode) { const { shapeflag, children } = vnode; const isslotchildren = shapeflag & 32; vnode.sscontent = normalizesuspenseslot( isslotchildren ? children.default : children ); vnode.ssfallback = isslotchildren ? normalizesuspenseslot(children.fallback) : createvnode(comment); } function normalizesuspenseslot(s) { let block; if (isfunction(s)) { const trackblock = isblocktreeenabled && s._c; if (trackblock) { s._d = false; openblock(); } s = s(); if (trackblock) { s._d = true; block = currentblock; closeblock(); } } if (isarray(s)) { const singlechild = filtersingleroot(s); if (!singlechild && s.filter((child) => child !== null_dynamic_component).length > 0) { warn$1(` slots expect a single root node.`); } s = singlechild; } s = normalizevnode(s); if (block && !s.dynamicchildren) { s.dynamicchildren = block.filter((c) => c !== s); } return s; } function queueeffectwithsuspense(fn, suspense) { if (suspense && suspense.pendingbranch) { if (isarray(fn)) { suspense.effects.push(...fn); } else { suspense.effects.push(fn); } } else { queuepostflushcb(fn); } } function setactivebranch(suspense, branch) { suspense.activebranch = branch; const { vnode, parentcomponent } = suspense; const el = vnode.el = branch.el; if (parentcomponent && parentcomponent.subtree === vnode) { parentcomponent.vnode.el = el; updatehochostel(parentcomponent, el); } } function isvnodesuspensible(vnode) { var _a; return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false; } const ssrcontextkey = symbol.for("v-scx"); const usessrcontext = () => { { warn$1(`usessrcontext() is not supported in the global build.`); } }; function watcheffect(effect, options) { return dowatch(effect, null, options); } function watchposteffect(effect, options) { return dowatch( effect, null, extend({}, options, { flush: "post" }) ); } function watchsynceffect(effect, options) { return dowatch( effect, null, extend({}, options, { flush: "sync" }) ); } const initial_watcher_value = {}; function watch(source, cb, options) { if (!isfunction(cb)) { warn$1( `\`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, once, ontrack, ontrigger } = empty_obj) { if (cb && once) { const _cb = cb; cb = (...args) => { _cb(...args); unwatch(); }; } if (deep !== void 0 && typeof deep === "number") { warn$1( `watch() "deep" option with number value will be used as watch depth in future versions. please use a boolean instead to avoid potential breakage.` ); } if (!cb) { if (immediate !== void 0) { warn$1( `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.` ); } if (deep !== void 0) { warn$1( `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.` ); } if (once !== void 0) { warn$1( `watch() "once" option is only respected when using the watch(source, callback, options?) signature.` ); } } const warninvalidsource = (s) => { warn$1( `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 = currentinstance; const reactivegetter = (source2) => deep === true ? source2 : ( // for deep: false, only traverse root-level properties traverse(source2, deep === false ? 1 : void 0) ); let getter; 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 callwitherrorhandling(s, instance, 2); } else { warninvalidsource(s); } }); } else if (isfunction(source)) { if (cb) { getter = () => callwitherrorhandling(source, instance, 2); } else { getter = () => { 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 = (fn) => { cleanup = effect.onstop = () => { callwitherrorhandling(fn, instance, 4); cleanup = effect.onstop = void 0; }; }; let oldvalue = ismultisource ? new array(source.length).fill(initial_watcher_value) : initial_watcher_value; const job = () => { if (!effect.active || !effect.dirty) { return; } if (cb) { const newvalue = effect.run(); if (deep || forcetrigger || (ismultisource ? newvalue.some((v, i) => haschanged(v, oldvalue[i])) : 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 (flush === "sync") { scheduler = job; } else if (flush === "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, noop, scheduler); const scope = getcurrentscope(); const unwatch = () => { effect.stop(); if (scope) { remove(scope.effects, effect); } }; { effect.ontrack = ontrack; effect.ontrigger = ontrigger; } if (cb) { if (immediate) { job(); } else { oldvalue = effect.run(); } } else if (flush === "post") { queuepostrendereffect( effect.run.bind(effect), instance && instance.suspense ); } else { effect.run(); } return unwatch; } function instancewatch(source, value, options) { const publicthis = this.proxy; const getter = isstring(source) ? source.includes(".") ? createpathgetter(publicthis, source) : () => publicthis[source] : source.bind(publicthis, publicthis); let cb; if (isfunction(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 i = 0; i < segments.length && cur; i++) { cur = cur[segments[i]]; } return cur; }; } function traverse(value, depth, currentdepth = 0, seen) { if (!isobject(value) || value["__v_skip"]) { return value; } if (depth && depth > 0) { if (currentdepth >= depth) { return value; } currentdepth++; } seen = seen || /* @__pure__ */ new set(); if (seen.has(value)) { return value; } seen.add(value); if (isref(value)) { traverse(value.value, depth, currentdepth, seen); } else if (isarray(value)) { for (let i = 0; i < value.length; i++) { traverse(value[i], depth, currentdepth, seen); } } else if (isset(value) || ismap(value)) { value.foreach((v) => { traverse(v, depth, currentdepth, seen); }); } else if (isplainobject(value)) { for (const key in value) { traverse(value[key], depth, currentdepth, seen); } } return value; } function validatedirectivename(name) { if (isbuiltindirective(name)) { warn$1("do not use built-in directive ids as custom directive id: " + name); } } function withdirectives(vnode, directives) { const internalinstance = currentrenderinginstance; if (internalinstance === null) { warn$1(`withdirectives can only be used inside render functions.`); return vnode; } const instance = getexposeproxy(internalinstance) || internalinstance.proxy; 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 leavecbkey = symbol("_leavecb"); const entercbkey$1 = 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 basetransitionimpl = { name: `basetransition`, props: basetransitionpropsvalidators, setup(props, { slots }) { const instance = getcurrentinstance(); const state = usetransitionstate(); let prevtransitionkey; return () => { const children = slots.default && gettransitionrawchildren(slots.default(), true); if (!children || !children.length) { return; } let child = children[0]; if (children.length > 1) { let hasfound = false; for (const c of children) { if (c.type !== comment) { if (hasfound) { warn$1( " can only be used on a single element or component. use for lists." ); break; } child = c; hasfound = true; } } } const rawprops = toraw(props); const { mode } = rawprops; if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") { warn$1(`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.effect.dirty = true; instance.update(); } }; 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; }; 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 callhook = (hook, args) => { hook && callwithasyncerrorhandling( hook, instance, 9, args ); }; const callasynchook = (hook, args) => { const done = args[1]; callhook(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](); } callhook(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$1] = (cancelled) => { if (called) return; called = true; if (cancelled) { callhook(cancelhook, [el]); } else { callhook(afterhook, [el]); } if (hooks.delayedleave) { hooks.delayedleave(); } el[entercbkey$1] = void 0; }; if (hook) { callasynchook(hook, [el, done]); } else { done(); } }, leave(el, remove) { const key2 = string(vnode.key); if (el[entercbkey$1]) { el[entercbkey$1]( true /* cancelled */ ); } if (state.isunmounting) { return remove(); } callhook(onbeforeleave, [el]); let called = false; const done = el[leavecbkey] = (cancelled) => { if (called) return; called = true; remove(); if (cancelled) { callhook(onleavecancelled, [el]); } else { callhook(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) { 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) ? ( // #7121 ensure get the child component subtree in case // it's been replaced during hmr vnode.component ? vnode.component.subtree : 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(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) ? ( // #8326: 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; } 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, 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((resolve, reject) => { const userretry = () => resolve(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$1( `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(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 ); }; if (suspensible && instance.suspense || false) { 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.effect.dirty = true; queuejob(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: ref2, props, children, ce } = parent.vnode; const vnode = createvnode(comp, props, children); vnode.ref = ref2; 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; const cache = /* @__pure__ */ new map(); const keys = /* @__pure__ */ new set(); let current = null; { instance.__v_cache = cache; } 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); { devtoolscomponentadded(instance2); } }; sharedcontext.deactivate = (vnode) => { const instance2 = vnode.component; 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); { devtoolscomponentadded(instance2); } }; 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 || !filter(name))) { prunecacheentry(key); } }); } function prunecacheentry(key) { const cached = cache.get(key); if (!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) { 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 null; } const children = slots.default(); const rawvnode = children[0]; if (children.length > 1) { { warn$1(`keepalive should contain exactly one component child.`); } current = null; return children; } else if (!isvnode(rawvnode) || !(rawvnode.shapeflag & 4) && !(rawvnode.shapeflag & 128)) { current = null; return rawvnode; } let vnode = getinnerchild(rawvnode); 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)) { 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)) { 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 &= ~256; vnode.shapeflag &= ~512; } 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) => { 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$1[type].replace(/ hook$/, "")); warn$1( `${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"); 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); } function renderlist(source, renderitem, cache, index) { let ret; const cached = cache && cache[index]; if (isarray(source) || isstring(source)) { ret = new array(source.length); for (let i = 0, l = source.length; i < l; i++) { ret[i] = renderitem(source[i], i, void 0, cached && cached[i]); } } else if (typeof source === "number") { if (!number.isinteger(source)) { warn$1(`the v-for range expect an integer value but got ${source}.`); } 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.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$1( `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 ); 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 = {}; if (!isobject(obj)) { warn$1(`v-on with no argument expects an object value.`); return 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 getexposeproxy(i) || i.proxy; 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) => shallowreadonly(i.props) , $attrs: (i) => shallowreadonly(i.attrs) , $slots: (i) => shallowreadonly(i.slots) , $refs: (i) => shallowreadonly(i.refs) , $parent: (i) => getpublicinstance(i.parent), $root: (i) => getpublicinstance(i.root), $emit: (i) => i.emit, $options: (i) => resolvemergedoptions(i) , $forceupdate: (i) => i.f || (i.f = () => { i.effect.dirty = true; queuejob(i.update); }), $nexttick: (i) => i.n || (i.n = nexttick.bind(i.proxy)), $watch: (i) => instancewatch.bind(i) }) ); 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 n = accesscache[key]; if (n !== void 0) { switch (n) { case 1 /* setup */: return setupstate[key]; case 2 /* data */: return data[key]; case 4 /* context */: return ctx[key]; case 3 /* props */: return props[key]; } } else if (hassetupbinding(setupstate, key)) { accesscache[key] = 1 /* setup */; return setupstate[key]; } else if (data !== empty_obj && hasown(data, key)) { accesscache[key] = 2 /* data */; 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 /* props */; return props[key]; } else if (ctx !== empty_obj && hasown(ctx, key)) { accesscache[key] = 4 /* context */; return ctx[key]; } else if (shouldcacheaccess) { accesscache[key] = 0 /* other */; } } const publicgetter = publicpropertiesmap[key]; let cssmodule, globalproperties; if (publicgetter) { if (key === "$attrs") { track(instance, "get", key); markattrsaccessed(); } else if (key === "$slots") { track(instance, "get", key); } 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 /* context */; return ctx[key]; } else if ( // global properties globalproperties = appcontext.config.globalproperties, hasown(globalproperties, key) ) { { return globalproperties[key]; } } else if (currentrenderinginstance && (!isstring(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$1( `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$1( `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$1(`cannot mutate