@vue/server-renderer 3.4.31 → 3.4.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/server-renderer v3.4.31
2
+ * @vue/server-renderer v3.4.33
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -873,18 +873,18 @@ const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true
873
873
 
874
874
  const toShallow = (value) => value;
875
875
  const getProto = (v) => Reflect.getPrototypeOf(v);
876
- function get(target, key, isReadonly = false, isShallow = false) {
876
+ function get(target, key, isReadonly2 = false, isShallow2 = false) {
877
877
  target = target["__v_raw"];
878
878
  const rawTarget = toRaw(target);
879
879
  const rawKey = toRaw(key);
880
- if (!isReadonly) {
880
+ if (!isReadonly2) {
881
881
  if (hasChanged(key, rawKey)) {
882
882
  track(rawTarget, "get", key);
883
883
  }
884
884
  track(rawTarget, "get", rawKey);
885
885
  }
886
886
  const { has: has2 } = getProto(rawTarget);
887
- const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;
887
+ const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
888
888
  if (has2.call(rawTarget, key)) {
889
889
  return wrap(target.get(key));
890
890
  } else if (has2.call(rawTarget, rawKey)) {
@@ -893,11 +893,11 @@ function get(target, key, isReadonly = false, isShallow = false) {
893
893
  target.get(key);
894
894
  }
895
895
  }
896
- function has(key, isReadonly = false) {
896
+ function has(key, isReadonly2 = false) {
897
897
  const target = this["__v_raw"];
898
898
  const rawTarget = toRaw(target);
899
899
  const rawKey = toRaw(key);
900
- if (!isReadonly) {
900
+ if (!isReadonly2) {
901
901
  if (hasChanged(key, rawKey)) {
902
902
  track(rawTarget, "has", key);
903
903
  }
@@ -905,13 +905,15 @@ function has(key, isReadonly = false) {
905
905
  }
906
906
  return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
907
907
  }
908
- function size(target, isReadonly = false) {
908
+ function size(target, isReadonly2 = false) {
909
909
  target = target["__v_raw"];
910
- !isReadonly && track(toRaw(target), "iterate", ITERATE_KEY);
910
+ !isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY);
911
911
  return Reflect.get(target, "size", target);
912
912
  }
913
- function add(value) {
914
- value = toRaw(value);
913
+ function add(value, _isShallow = false) {
914
+ if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
915
+ value = toRaw(value);
916
+ }
915
917
  const target = toRaw(this);
916
918
  const proto = getProto(target);
917
919
  const hadKey = proto.has.call(target, value);
@@ -921,8 +923,10 @@ function add(value) {
921
923
  }
922
924
  return this;
923
925
  }
924
- function set(key, value) {
925
- value = toRaw(value);
926
+ function set(key, value, _isShallow = false) {
927
+ if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
928
+ value = toRaw(value);
929
+ }
926
930
  const target = toRaw(this);
927
931
  const { has: has2, get: get2 } = getProto(target);
928
932
  let hadKey = has2.call(target, key);
@@ -968,19 +972,19 @@ function clear() {
968
972
  }
969
973
  return result;
970
974
  }
971
- function createForEach(isReadonly, isShallow) {
975
+ function createForEach(isReadonly2, isShallow2) {
972
976
  return function forEach(callback, thisArg) {
973
977
  const observed = this;
974
978
  const target = observed["__v_raw"];
975
979
  const rawTarget = toRaw(target);
976
- const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;
977
- !isReadonly && track(rawTarget, "iterate", ITERATE_KEY);
980
+ const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
981
+ !isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY);
978
982
  return target.forEach((value, key) => {
979
983
  return callback.call(thisArg, wrap(value), wrap(key), observed);
980
984
  });
981
985
  };
982
986
  }
983
- function createIterableMethod(method, isReadonly, isShallow) {
987
+ function createIterableMethod(method, isReadonly2, isShallow2) {
984
988
  return function(...args) {
985
989
  const target = this["__v_raw"];
986
990
  const rawTarget = toRaw(target);
@@ -988,8 +992,8 @@ function createIterableMethod(method, isReadonly, isShallow) {
988
992
  const isPair = method === "entries" || method === Symbol.iterator && targetIsMap;
989
993
  const isKeyOnly = method === "keys" && targetIsMap;
990
994
  const innerIterator = target[method](...args);
991
- const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;
992
- !isReadonly && track(
995
+ const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
996
+ !isReadonly2 && track(
993
997
  rawTarget,
994
998
  "iterate",
995
999
  isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY
@@ -1045,8 +1049,12 @@ function createInstrumentations() {
1045
1049
  return size(this);
1046
1050
  },
1047
1051
  has,
1048
- add,
1049
- set,
1052
+ add(value) {
1053
+ return add.call(this, value, true);
1054
+ },
1055
+ set(key, value) {
1056
+ return set.call(this, key, value, true);
1057
+ },
1050
1058
  delete: deleteEntry,
1051
1059
  clear,
1052
1060
  forEach: createForEach(false, true)
@@ -1112,13 +1120,13 @@ const [
1112
1120
  shallowInstrumentations,
1113
1121
  shallowReadonlyInstrumentations
1114
1122
  ] = /* @__PURE__ */ createInstrumentations();
1115
- function createInstrumentationGetter(isReadonly, shallow) {
1116
- const instrumentations = shallow ? isReadonly ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly ? readonlyInstrumentations : mutableInstrumentations;
1123
+ function createInstrumentationGetter(isReadonly2, shallow) {
1124
+ const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations;
1117
1125
  return (target, key, receiver) => {
1118
1126
  if (key === "__v_isReactive") {
1119
- return !isReadonly;
1127
+ return !isReadonly2;
1120
1128
  } else if (key === "__v_isReadonly") {
1121
- return isReadonly;
1129
+ return isReadonly2;
1122
1130
  } else if (key === "__v_raw") {
1123
1131
  return target;
1124
1132
  }
@@ -1396,7 +1404,10 @@ function pushWarningContext(vnode) {
1396
1404
  function popWarningContext() {
1397
1405
  stack.pop();
1398
1406
  }
1407
+ let isWarning = false;
1399
1408
  function warn$1(msg, ...args) {
1409
+ if (isWarning) return;
1410
+ isWarning = true;
1400
1411
  pauseTracking();
1401
1412
  const instance = stack.length ? stack[stack.length - 1].component : null;
1402
1413
  const appWarnHandler = instance && instance.appContext.config.warnHandler;
@@ -1429,6 +1440,7 @@ function warn$1(msg, ...args) {
1429
1440
  console.warn(...warnArgs);
1430
1441
  }
1431
1442
  resetTracking();
1443
+ isWarning = false;
1432
1444
  }
1433
1445
  function getComponentTrace() {
1434
1446
  let currentVNode = stack[stack.length - 1];
@@ -1527,7 +1539,8 @@ const ErrorTypeStrings = {
1527
1539
  [11]: "app warnHandler",
1528
1540
  [12]: "ref function",
1529
1541
  [13]: "async component loader",
1530
- [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ."
1542
+ [14]: "scheduler flush",
1543
+ [15]: "component update"
1531
1544
  };
1532
1545
  function callWithErrorHandling(fn, instance, type, args) {
1533
1546
  try {
@@ -1743,7 +1756,11 @@ function flushJobs(seen) {
1743
1756
  if (check(job)) {
1744
1757
  continue;
1745
1758
  }
1746
- callWithErrorHandling(job, null, 14);
1759
+ callWithErrorHandling(
1760
+ job,
1761
+ job.i,
1762
+ job.i ? 15 : 14
1763
+ );
1747
1764
  }
1748
1765
  }
1749
1766
  } finally {
@@ -1763,7 +1780,7 @@ function checkRecursiveUpdates(seen, fn) {
1763
1780
  } else {
1764
1781
  const count = seen.get(fn);
1765
1782
  if (count > RECURSION_LIMIT) {
1766
- const instance = fn.ownerInstance;
1783
+ const instance = fn.i;
1767
1784
  const componentName = instance && getComponentName(instance.type);
1768
1785
  handleError(
1769
1786
  `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.`,
@@ -1778,7 +1795,7 @@ function checkRecursiveUpdates(seen, fn) {
1778
1795
  }
1779
1796
 
1780
1797
  let isHmrUpdating = false;
1781
- const hmrDirtyComponents = /* @__PURE__ */ new Set();
1798
+ const hmrDirtyComponents = /* @__PURE__ */ new Map();
1782
1799
  {
1783
1800
  getGlobalThis().__VUE_HMR_RUNTIME__ = {
1784
1801
  createRecord: tryWrap(createRecord),
@@ -1836,26 +1853,29 @@ function reload(id, newComp) {
1836
1853
  newComp = normalizeClassComponent(newComp);
1837
1854
  updateComponentDef(record.initialDef, newComp);
1838
1855
  const instances = [...record.instances];
1839
- for (const instance of instances) {
1856
+ for (let i = 0; i < instances.length; i++) {
1857
+ const instance = instances[i];
1840
1858
  const oldComp = normalizeClassComponent(instance.type);
1841
- if (!hmrDirtyComponents.has(oldComp)) {
1859
+ let dirtyInstances = hmrDirtyComponents.get(oldComp);
1860
+ if (!dirtyInstances) {
1842
1861
  if (oldComp !== record.initialDef) {
1843
1862
  updateComponentDef(oldComp, newComp);
1844
1863
  }
1845
- hmrDirtyComponents.add(oldComp);
1864
+ hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
1846
1865
  }
1866
+ dirtyInstances.add(instance);
1847
1867
  instance.appContext.propsCache.delete(instance.type);
1848
1868
  instance.appContext.emitsCache.delete(instance.type);
1849
1869
  instance.appContext.optionsCache.delete(instance.type);
1850
1870
  if (instance.ceReload) {
1851
- hmrDirtyComponents.add(oldComp);
1871
+ dirtyInstances.add(instance);
1852
1872
  instance.ceReload(newComp.styles);
1853
- hmrDirtyComponents.delete(oldComp);
1873
+ dirtyInstances.delete(instance);
1854
1874
  } else if (instance.parent) {
1855
1875
  instance.parent.effect.dirty = true;
1856
1876
  queueJob(() => {
1857
1877
  instance.parent.update();
1858
- hmrDirtyComponents.delete(oldComp);
1878
+ dirtyInstances.delete(instance);
1859
1879
  });
1860
1880
  } else if (instance.appContext.reload) {
1861
1881
  instance.appContext.reload();
@@ -1868,11 +1888,7 @@ function reload(id, newComp) {
1868
1888
  }
1869
1889
  }
1870
1890
  queuePostFlushCb(() => {
1871
- for (const instance of instances) {
1872
- hmrDirtyComponents.delete(
1873
- normalizeClassComponent(instance.type)
1874
- );
1875
- }
1891
+ hmrDirtyComponents.clear();
1876
1892
  });
1877
1893
  }
1878
1894
  function updateComponentDef(oldComp, newComp) {
@@ -1996,144 +2012,6 @@ function devtoolsComponentEmit(component, event, params) {
1996
2012
  );
1997
2013
  }
1998
2014
 
1999
- function emit(instance, event, ...rawArgs) {
2000
- if (instance.isUnmounted) return;
2001
- const props = instance.vnode.props || EMPTY_OBJ;
2002
- {
2003
- const {
2004
- emitsOptions,
2005
- propsOptions: [propsOptions]
2006
- } = instance;
2007
- if (emitsOptions) {
2008
- if (!(event in emitsOptions) && true) {
2009
- if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
2010
- warn$1(
2011
- `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.`
2012
- );
2013
- }
2014
- } else {
2015
- const validator = emitsOptions[event];
2016
- if (isFunction(validator)) {
2017
- const isValid = validator(...rawArgs);
2018
- if (!isValid) {
2019
- warn$1(
2020
- `Invalid event arguments: event validation failed for event "${event}".`
2021
- );
2022
- }
2023
- }
2024
- }
2025
- }
2026
- }
2027
- let args = rawArgs;
2028
- const isModelListener = event.startsWith("update:");
2029
- const modelArg = isModelListener && event.slice(7);
2030
- if (modelArg && modelArg in props) {
2031
- const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`;
2032
- const { number, trim } = props[modifiersKey] || EMPTY_OBJ;
2033
- if (trim) {
2034
- args = rawArgs.map((a) => isString(a) ? a.trim() : a);
2035
- }
2036
- if (number) {
2037
- args = rawArgs.map(looseToNumber);
2038
- }
2039
- }
2040
- {
2041
- devtoolsComponentEmit(instance, event, args);
2042
- }
2043
- {
2044
- const lowerCaseEvent = event.toLowerCase();
2045
- if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {
2046
- warn$1(
2047
- `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName(
2048
- instance,
2049
- instance.type
2050
- )} 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(
2051
- event
2052
- )}" instead of "${event}".`
2053
- );
2054
- }
2055
- }
2056
- let handlerName;
2057
- let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249)
2058
- props[handlerName = toHandlerKey(camelize(event))];
2059
- if (!handler && isModelListener) {
2060
- handler = props[handlerName = toHandlerKey(hyphenate(event))];
2061
- }
2062
- if (handler) {
2063
- callWithAsyncErrorHandling(
2064
- handler,
2065
- instance,
2066
- 6,
2067
- args
2068
- );
2069
- }
2070
- const onceHandler = props[handlerName + `Once`];
2071
- if (onceHandler) {
2072
- if (!instance.emitted) {
2073
- instance.emitted = {};
2074
- } else if (instance.emitted[handlerName]) {
2075
- return;
2076
- }
2077
- instance.emitted[handlerName] = true;
2078
- callWithAsyncErrorHandling(
2079
- onceHandler,
2080
- instance,
2081
- 6,
2082
- args
2083
- );
2084
- }
2085
- }
2086
- function normalizeEmitsOptions(comp, appContext, asMixin = false) {
2087
- const cache = appContext.emitsCache;
2088
- const cached = cache.get(comp);
2089
- if (cached !== void 0) {
2090
- return cached;
2091
- }
2092
- const raw = comp.emits;
2093
- let normalized = {};
2094
- let hasExtends = false;
2095
- if (!isFunction(comp)) {
2096
- const extendEmits = (raw2) => {
2097
- const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);
2098
- if (normalizedFromExtend) {
2099
- hasExtends = true;
2100
- extend(normalized, normalizedFromExtend);
2101
- }
2102
- };
2103
- if (!asMixin && appContext.mixins.length) {
2104
- appContext.mixins.forEach(extendEmits);
2105
- }
2106
- if (comp.extends) {
2107
- extendEmits(comp.extends);
2108
- }
2109
- if (comp.mixins) {
2110
- comp.mixins.forEach(extendEmits);
2111
- }
2112
- }
2113
- if (!raw && !hasExtends) {
2114
- if (isObject(comp)) {
2115
- cache.set(comp, null);
2116
- }
2117
- return null;
2118
- }
2119
- if (isArray(raw)) {
2120
- raw.forEach((key) => normalized[key] = null);
2121
- } else {
2122
- extend(normalized, raw);
2123
- }
2124
- if (isObject(comp)) {
2125
- cache.set(comp, normalized);
2126
- }
2127
- return normalized;
2128
- }
2129
- function isEmitListener(options, key) {
2130
- if (!options || !isOn(key)) {
2131
- return false;
2132
- }
2133
- key = key.slice(2).replace(/Once$/, "");
2134
- return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
2135
- }
2136
-
2137
2015
  let currentRenderingInstance = null;
2138
2016
  let currentScopeId = null;
2139
2017
  function setCurrentRenderingInstance$1(instance) {
@@ -2172,308 +2050,86 @@ function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {
2172
2050
  return renderFnWithContext;
2173
2051
  }
2174
2052
 
2175
- let accessedAttrs = false;
2176
- function markAttrsAccessed() {
2177
- accessedAttrs = true;
2178
- }
2179
- function renderComponentRoot$1(instance) {
2180
- const {
2181
- type: Component,
2182
- vnode,
2183
- proxy,
2184
- withProxy,
2185
- propsOptions: [propsOptions],
2186
- slots,
2187
- attrs,
2188
- emit,
2189
- render,
2190
- renderCache,
2191
- props,
2192
- data,
2193
- setupState,
2194
- ctx,
2195
- inheritAttrs
2196
- } = instance;
2197
- const prev = setCurrentRenderingInstance$1(instance);
2198
- let result;
2199
- let fallthroughAttrs;
2200
- {
2201
- accessedAttrs = false;
2053
+ function validateDirectiveName(name) {
2054
+ if (isBuiltInDirective(name)) {
2055
+ warn$1("Do not use built-in directive ids as custom directive id: " + name);
2202
2056
  }
2203
- try {
2204
- if (vnode.shapeFlag & 4) {
2205
- const proxyToUse = withProxy || proxy;
2206
- const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, {
2207
- get(target, key, receiver) {
2208
- warn$1(
2209
- `Property '${String(
2210
- key
2211
- )}' was accessed via 'this'. Avoid using 'this' in templates.`
2212
- );
2213
- return Reflect.get(target, key, receiver);
2214
- }
2215
- }) : proxyToUse;
2216
- result = normalizeVNode$1(
2217
- render.call(
2218
- thisProxy,
2219
- proxyToUse,
2220
- renderCache,
2221
- true ? shallowReadonly(props) : props,
2222
- setupState,
2223
- data,
2224
- ctx
2225
- )
2226
- );
2227
- fallthroughAttrs = attrs;
2228
- } else {
2229
- const render2 = Component;
2230
- if (attrs === props) {
2231
- markAttrsAccessed();
2232
- }
2233
- result = normalizeVNode$1(
2234
- render2.length > 1 ? render2(
2235
- true ? shallowReadonly(props) : props,
2236
- true ? {
2237
- get attrs() {
2238
- markAttrsAccessed();
2239
- return shallowReadonly(attrs);
2240
- },
2241
- slots,
2242
- emit
2243
- } : { attrs, slots, emit }
2244
- ) : render2(
2245
- true ? shallowReadonly(props) : props,
2246
- null
2247
- )
2248
- );
2249
- fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
2057
+ }
2058
+ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
2059
+ const bindings = vnode.dirs;
2060
+ const oldBindings = prevVNode && prevVNode.dirs;
2061
+ for (let i = 0; i < bindings.length; i++) {
2062
+ const binding = bindings[i];
2063
+ if (oldBindings) {
2064
+ binding.oldValue = oldBindings[i].value;
2065
+ }
2066
+ let hook = binding.dir[name];
2067
+ if (hook) {
2068
+ pauseTracking();
2069
+ callWithAsyncErrorHandling(hook, instance, 8, [
2070
+ vnode.el,
2071
+ binding,
2072
+ vnode,
2073
+ prevVNode
2074
+ ]);
2075
+ resetTracking();
2250
2076
  }
2251
- } catch (err) {
2252
- handleError(err, instance, 1);
2253
- result = createVNode(Comment);
2254
- }
2255
- let root = result;
2256
- let setRoot = void 0;
2257
- if (result.patchFlag > 0 && result.patchFlag & 2048) {
2258
- [root, setRoot] = getChildRoot(result);
2259
2077
  }
2260
- if (fallthroughAttrs && inheritAttrs !== false) {
2261
- const keys = Object.keys(fallthroughAttrs);
2262
- const { shapeFlag } = root;
2263
- if (keys.length) {
2264
- if (shapeFlag & (1 | 6)) {
2265
- if (propsOptions && keys.some(isModelListener)) {
2266
- fallthroughAttrs = filterModelListeners(
2267
- fallthroughAttrs,
2268
- propsOptions
2269
- );
2270
- }
2271
- root = cloneVNode(root, fallthroughAttrs, false, true);
2272
- } else if (!accessedAttrs && root.type !== Comment) {
2273
- const allAttrs = Object.keys(attrs);
2274
- const eventAttrs = [];
2275
- const extraAttrs = [];
2276
- for (let i = 0, l = allAttrs.length; i < l; i++) {
2277
- const key = allAttrs[i];
2278
- if (isOn(key)) {
2279
- if (!isModelListener(key)) {
2280
- eventAttrs.push(key[2].toLowerCase() + key.slice(3));
2281
- }
2282
- } else {
2283
- extraAttrs.push(key);
2284
- }
2285
- }
2286
- if (extraAttrs.length) {
2287
- warn$1(
2288
- `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`
2289
- );
2290
- }
2291
- if (eventAttrs.length) {
2292
- warn$1(
2293
- `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.`
2294
- );
2295
- }
2296
- }
2297
- }
2298
- }
2299
- if (vnode.dirs) {
2300
- if (!isElementRoot(root)) {
2301
- warn$1(
2302
- `Runtime directive used on component with non-element root node. The directives will not function as intended.`
2303
- );
2304
- }
2305
- root = cloneVNode(root, null, false, true);
2306
- root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
2307
- }
2308
- if (vnode.transition) {
2309
- if (!isElementRoot(root)) {
2310
- warn$1(
2311
- `Component inside <Transition> renders non-element root node that cannot be animated.`
2312
- );
2313
- }
2314
- root.transition = vnode.transition;
2315
- }
2316
- if (setRoot) {
2317
- setRoot(root);
2078
+ }
2079
+
2080
+ function setTransitionHooks(vnode, hooks) {
2081
+ if (vnode.shapeFlag & 6 && vnode.component) {
2082
+ setTransitionHooks(vnode.component.subTree, hooks);
2083
+ } else if (vnode.shapeFlag & 128) {
2084
+ vnode.ssContent.transition = hooks.clone(vnode.ssContent);
2085
+ vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
2318
2086
  } else {
2319
- result = root;
2087
+ vnode.transition = hooks;
2320
2088
  }
2321
- setCurrentRenderingInstance$1(prev);
2322
- return result;
2323
2089
  }
2324
- const getChildRoot = (vnode) => {
2325
- const rawChildren = vnode.children;
2326
- const dynamicChildren = vnode.dynamicChildren;
2327
- const childRoot = filterSingleRoot(rawChildren, false);
2328
- if (!childRoot) {
2329
- return [vnode, void 0];
2330
- } else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) {
2331
- return getChildRoot(childRoot);
2332
- }
2333
- const index = rawChildren.indexOf(childRoot);
2334
- const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;
2335
- const setRoot = (updatedRoot) => {
2336
- rawChildren[index] = updatedRoot;
2337
- if (dynamicChildren) {
2338
- if (dynamicIndex > -1) {
2339
- dynamicChildren[dynamicIndex] = updatedRoot;
2340
- } else if (updatedRoot.patchFlag > 0) {
2341
- vnode.dynamicChildren = [...dynamicChildren, updatedRoot];
2342
- }
2343
- }
2344
- };
2345
- return [normalizeVNode$1(childRoot), setRoot];
2346
- };
2347
- function filterSingleRoot(children, recurse = true) {
2348
- let singleRoot;
2349
- for (let i = 0; i < children.length; i++) {
2350
- const child = children[i];
2351
- if (isVNode$2(child)) {
2352
- if (child.type !== Comment || child.children === "v-if") {
2353
- if (singleRoot) {
2354
- return;
2355
- } else {
2356
- singleRoot = child;
2357
- if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) {
2358
- return filterSingleRoot(singleRoot.children);
2359
- }
2360
- }
2361
- }
2362
- } else {
2363
- return;
2364
- }
2365
- }
2366
- return singleRoot;
2090
+
2091
+ const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
2092
+
2093
+ const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
2094
+ function onActivated(hook, target) {
2095
+ registerKeepAliveHook(hook, "a", target);
2367
2096
  }
2368
- const getFunctionalFallthrough = (attrs) => {
2369
- let res;
2370
- for (const key in attrs) {
2371
- if (key === "class" || key === "style" || isOn(key)) {
2372
- (res || (res = {}))[key] = attrs[key];
2373
- }
2374
- }
2375
- return res;
2376
- };
2377
- const filterModelListeners = (attrs, props) => {
2378
- const res = {};
2379
- for (const key in attrs) {
2380
- if (!isModelListener(key) || !(key.slice(9) in props)) {
2381
- res[key] = attrs[key];
2382
- }
2383
- }
2384
- return res;
2385
- };
2386
- const isElementRoot = (vnode) => {
2387
- return vnode.shapeFlag & (6 | 1) || vnode.type === Comment;
2388
- };
2389
- function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
2390
- const { props: prevProps, children: prevChildren, component } = prevVNode;
2391
- const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;
2392
- const emits = component.emitsOptions;
2393
- if ((prevChildren || nextChildren) && isHmrUpdating) {
2394
- return true;
2395
- }
2396
- if (nextVNode.dirs || nextVNode.transition) {
2397
- return true;
2398
- }
2399
- if (optimized && patchFlag >= 0) {
2400
- if (patchFlag & 1024) {
2401
- return true;
2402
- }
2403
- if (patchFlag & 16) {
2404
- if (!prevProps) {
2405
- return !!nextProps;
2406
- }
2407
- return hasPropsChanged(prevProps, nextProps, emits);
2408
- } else if (patchFlag & 8) {
2409
- const dynamicProps = nextVNode.dynamicProps;
2410
- for (let i = 0; i < dynamicProps.length; i++) {
2411
- const key = dynamicProps[i];
2412
- if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) {
2413
- return true;
2414
- }
2097
+ function onDeactivated(hook, target) {
2098
+ registerKeepAliveHook(hook, "da", target);
2099
+ }
2100
+ function registerKeepAliveHook(hook, type, target = currentInstance) {
2101
+ const wrappedHook = hook.__wdc || (hook.__wdc = () => {
2102
+ let current = target;
2103
+ while (current) {
2104
+ if (current.isDeactivated) {
2105
+ return;
2415
2106
  }
2107
+ current = current.parent;
2416
2108
  }
2417
- } else {
2418
- if (prevChildren || nextChildren) {
2419
- if (!nextChildren || !nextChildren.$stable) {
2420
- return true;
2109
+ return hook();
2110
+ });
2111
+ injectHook(type, wrappedHook, target);
2112
+ if (target) {
2113
+ let current = target.parent;
2114
+ while (current && current.parent) {
2115
+ if (isKeepAlive(current.parent.vnode)) {
2116
+ injectToKeepAliveRoot(wrappedHook, type, target, current);
2421
2117
  }
2422
- }
2423
- if (prevProps === nextProps) {
2424
- return false;
2425
- }
2426
- if (!prevProps) {
2427
- return !!nextProps;
2428
- }
2429
- if (!nextProps) {
2430
- return true;
2431
- }
2432
- return hasPropsChanged(prevProps, nextProps, emits);
2433
- }
2434
- return false;
2435
- }
2436
- function hasPropsChanged(prevProps, nextProps, emitsOptions) {
2437
- const nextKeys = Object.keys(nextProps);
2438
- if (nextKeys.length !== Object.keys(prevProps).length) {
2439
- return true;
2440
- }
2441
- for (let i = 0; i < nextKeys.length; i++) {
2442
- const key = nextKeys[i];
2443
- if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) {
2444
- return true;
2445
- }
2446
- }
2447
- return false;
2448
- }
2449
- function updateHOCHostEl({ vnode, parent }, el) {
2450
- while (parent) {
2451
- const root = parent.subTree;
2452
- if (root.suspense && root.suspense.activeBranch === vnode) {
2453
- root.el = vnode.el;
2454
- }
2455
- if (root === vnode) {
2456
- (vnode = parent.vnode).el = el;
2457
- parent = parent.parent;
2458
- } else {
2459
- break;
2118
+ current = current.parent;
2460
2119
  }
2461
2120
  }
2462
2121
  }
2463
-
2464
- const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
2465
-
2466
- const isSuspense = (type) => type.__isSuspense;
2467
- function queueEffectWithSuspense(fn, suspense) {
2468
- if (suspense && suspense.pendingBranch) {
2469
- if (isArray(fn)) {
2470
- suspense.effects.push(...fn);
2471
- } else {
2472
- suspense.effects.push(fn);
2473
- }
2474
- } else {
2475
- queuePostFlushCb(fn);
2476
- }
2122
+ function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
2123
+ const injected = injectHook(
2124
+ type,
2125
+ hook,
2126
+ keepAliveRoot,
2127
+ true
2128
+ /* prepend */
2129
+ );
2130
+ onUnmounted(() => {
2131
+ remove(keepAliveRoot[type], injected);
2132
+ }, target);
2477
2133
  }
2478
2134
 
2479
2135
  function injectHook(type, hook, target = currentInstance, prepend = false) {
@@ -2522,34 +2178,7 @@ function onErrorCaptured(hook, target = currentInstance) {
2522
2178
  injectHook("ec", hook, target);
2523
2179
  }
2524
2180
 
2525
- function validateDirectiveName(name) {
2526
- if (isBuiltInDirective(name)) {
2527
- warn$1("Do not use built-in directive ids as custom directive id: " + name);
2528
- }
2529
- }
2530
- function invokeDirectiveHook(vnode, prevVNode, instance, name) {
2531
- const bindings = vnode.dirs;
2532
- const oldBindings = prevVNode && prevVNode.dirs;
2533
- for (let i = 0; i < bindings.length; i++) {
2534
- const binding = bindings[i];
2535
- if (oldBindings) {
2536
- binding.oldValue = oldBindings[i].value;
2537
- }
2538
- let hook = binding.dir[name];
2539
- if (hook) {
2540
- pauseTracking();
2541
- callWithAsyncErrorHandling(hook, instance, 8, [
2542
- vnode.el,
2543
- binding,
2544
- vnode,
2545
- prevVNode
2546
- ]);
2547
- resetTracking();
2548
- }
2549
- }
2550
- }
2551
-
2552
- const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
2181
+ const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
2553
2182
 
2554
2183
  const getPublicInstance = (i) => {
2555
2184
  if (!i) return null;
@@ -3609,8 +3238,9 @@ function resolvePropValue(options, props, key, value, instance, isAbsent) {
3609
3238
  }
3610
3239
  return value;
3611
3240
  }
3241
+ const mixinPropsCache = /* @__PURE__ */ new WeakMap();
3612
3242
  function normalizePropsOptions(comp, appContext, asMixin = false) {
3613
- const cache = appContext.propsCache;
3243
+ const cache = asMixin ? mixinPropsCache : appContext.propsCache;
3614
3244
  const cached = cache.get(comp);
3615
3245
  if (cached) {
3616
3246
  return cached;
@@ -3857,13 +3487,22 @@ const normalizeVNodeSlots = (instance, children) => {
3857
3487
  const normalized = normalizeSlotValue(children);
3858
3488
  instance.slots.default = () => normalized;
3859
3489
  };
3860
- const initSlots = (instance, children) => {
3490
+ const assignSlots = (slots, children, optimized) => {
3491
+ for (const key in children) {
3492
+ if (optimized || key !== "_") {
3493
+ slots[key] = children[key];
3494
+ }
3495
+ }
3496
+ };
3497
+ const initSlots = (instance, children, optimized) => {
3861
3498
  const slots = instance.slots = createInternalObject();
3862
3499
  if (instance.vnode.shapeFlag & 32) {
3863
3500
  const type = children._;
3864
3501
  if (type) {
3865
- extend(slots, children);
3866
- def(slots, "_", type, true);
3502
+ assignSlots(slots, children, optimized);
3503
+ if (optimized) {
3504
+ def(slots, "_", type, true);
3505
+ }
3867
3506
  } else {
3868
3507
  normalizeObjectSlots(children, slots);
3869
3508
  }
@@ -3879,15 +3518,12 @@ const updateSlots = (instance, children, optimized) => {
3879
3518
  const type = children._;
3880
3519
  if (type) {
3881
3520
  if (isHmrUpdating) {
3882
- extend(slots, children);
3521
+ assignSlots(slots, children, optimized);
3883
3522
  trigger(instance, "set", "$slots");
3884
3523
  } else if (optimized && type === 1) {
3885
3524
  needDeletionCheck = false;
3886
3525
  } else {
3887
- extend(slots, children);
3888
- if (!optimized && type === 1) {
3889
- delete slots._;
3890
- }
3526
+ assignSlots(slots, children, optimized);
3891
3527
  }
3892
3528
  } else {
3893
3529
  needDeletionCheck = !children.$stable;
@@ -3995,6 +3631,9 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
3995
3631
  }
3996
3632
  }
3997
3633
 
3634
+ const TeleportEndKey = Symbol("_vte");
3635
+ const isTeleport = (type) => type.__isTeleport;
3636
+
3998
3637
  let supported;
3999
3638
  let perf;
4000
3639
  function startMeasure(instance, type) {
@@ -4287,17 +3926,7 @@ function baseCreateRenderer(options, createHydrationFns) {
4287
3926
  if (props) {
4288
3927
  for (const key in props) {
4289
3928
  if (key !== "value" && !isReservedProp(key)) {
4290
- hostPatchProp(
4291
- el,
4292
- key,
4293
- null,
4294
- props[key],
4295
- namespace,
4296
- vnode.children,
4297
- parentComponent,
4298
- parentSuspense,
4299
- unmountChildren
4300
- );
3929
+ hostPatchProp(el, key, null, props[key], namespace, parentComponent);
4301
3930
  }
4302
3931
  }
4303
3932
  if ("value" in props) {
@@ -4392,6 +4021,9 @@ function baseCreateRenderer(options, createHydrationFns) {
4392
4021
  optimized = false;
4393
4022
  dynamicChildren = null;
4394
4023
  }
4024
+ if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) {
4025
+ hostSetElementText(el, "");
4026
+ }
4395
4027
  if (dynamicChildren) {
4396
4028
  patchBlockChildren(
4397
4029
  n1.dynamicChildren,
@@ -4420,15 +4052,7 @@ function baseCreateRenderer(options, createHydrationFns) {
4420
4052
  }
4421
4053
  if (patchFlag > 0) {
4422
4054
  if (patchFlag & 16) {
4423
- patchProps(
4424
- el,
4425
- n2,
4426
- oldProps,
4427
- newProps,
4428
- parentComponent,
4429
- parentSuspense,
4430
- namespace
4431
- );
4055
+ patchProps(el, oldProps, newProps, parentComponent, namespace);
4432
4056
  } else {
4433
4057
  if (patchFlag & 2) {
4434
4058
  if (oldProps.class !== newProps.class) {
@@ -4445,17 +4069,7 @@ function baseCreateRenderer(options, createHydrationFns) {
4445
4069
  const prev = oldProps[key];
4446
4070
  const next = newProps[key];
4447
4071
  if (next !== prev || key === "value") {
4448
- hostPatchProp(
4449
- el,
4450
- key,
4451
- prev,
4452
- next,
4453
- namespace,
4454
- n1.children,
4455
- parentComponent,
4456
- parentSuspense,
4457
- unmountChildren
4458
- );
4072
+ hostPatchProp(el, key, prev, next, namespace, parentComponent);
4459
4073
  }
4460
4074
  }
4461
4075
  }
@@ -4466,15 +4080,7 @@ function baseCreateRenderer(options, createHydrationFns) {
4466
4080
  }
4467
4081
  }
4468
4082
  } else if (!optimized && dynamicChildren == null) {
4469
- patchProps(
4470
- el,
4471
- n2,
4472
- oldProps,
4473
- newProps,
4474
- parentComponent,
4475
- parentSuspense,
4476
- namespace
4477
- );
4083
+ patchProps(el, oldProps, newProps, parentComponent, namespace);
4478
4084
  }
4479
4085
  if ((vnodeHook = newProps.onVnodeUpdated) || dirs) {
4480
4086
  queuePostRenderEffect(() => {
@@ -4514,7 +4120,7 @@ function baseCreateRenderer(options, createHydrationFns) {
4514
4120
  );
4515
4121
  }
4516
4122
  };
4517
- const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, namespace) => {
4123
+ const patchProps = (el, oldProps, newProps, parentComponent, namespace) => {
4518
4124
  if (oldProps !== newProps) {
4519
4125
  if (oldProps !== EMPTY_OBJ) {
4520
4126
  for (const key in oldProps) {
@@ -4525,10 +4131,7 @@ function baseCreateRenderer(options, createHydrationFns) {
4525
4131
  oldProps[key],
4526
4132
  null,
4527
4133
  namespace,
4528
- vnode.children,
4529
- parentComponent,
4530
- parentSuspense,
4531
- unmountChildren
4134
+ parentComponent
4532
4135
  );
4533
4136
  }
4534
4137
  }
@@ -4538,17 +4141,7 @@ function baseCreateRenderer(options, createHydrationFns) {
4538
4141
  const next = newProps[key];
4539
4142
  const prev = oldProps[key];
4540
4143
  if (next !== prev && key !== "value") {
4541
- hostPatchProp(
4542
- el,
4543
- key,
4544
- prev,
4545
- next,
4546
- namespace,
4547
- vnode.children,
4548
- parentComponent,
4549
- parentSuspense,
4550
- unmountChildren
4551
- );
4144
+ hostPatchProp(el, key, prev, next, namespace, parentComponent);
4552
4145
  }
4553
4146
  }
4554
4147
  if ("value" in newProps) {
@@ -4665,7 +4258,7 @@ function baseCreateRenderer(options, createHydrationFns) {
4665
4258
  {
4666
4259
  startMeasure(instance, `init`);
4667
4260
  }
4668
- setupComponent$1(instance);
4261
+ setupComponent$1(instance, false, optimized);
4669
4262
  {
4670
4263
  endMeasure(instance, `init`);
4671
4264
  }
@@ -4902,12 +4495,12 @@ function baseCreateRenderer(options, createHydrationFns) {
4902
4495
  effect.run();
4903
4496
  }
4904
4497
  };
4498
+ update.i = instance;
4905
4499
  update.id = instance.uid;
4906
4500
  toggleRecurse(instance, true);
4907
4501
  {
4908
4502
  effect.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0;
4909
4503
  effect.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0;
4910
- update.ownerInstance = instance;
4911
4504
  }
4912
4505
  update();
4913
4506
  };
@@ -5266,7 +4859,7 @@ function baseCreateRenderer(options, createHydrationFns) {
5266
4859
  shapeFlag,
5267
4860
  patchFlag,
5268
4861
  dirs,
5269
- memoIndex
4862
+ cacheIndex
5270
4863
  } = vnode;
5271
4864
  if (patchFlag === -2) {
5272
4865
  optimized = false;
@@ -5274,8 +4867,8 @@ function baseCreateRenderer(options, createHydrationFns) {
5274
4867
  if (ref != null) {
5275
4868
  setRef(ref, null, parentSuspense, vnode, true);
5276
4869
  }
5277
- if (memoIndex != null) {
5278
- parentComponent.renderCache[memoIndex] = void 0;
4870
+ if (cacheIndex != null) {
4871
+ parentComponent.renderCache[cacheIndex] = void 0;
5279
4872
  }
5280
4873
  if (shapeFlag & 256) {
5281
4874
  parentComponent.ctx.deactivate(vnode);
@@ -5305,7 +4898,12 @@ function baseCreateRenderer(options, createHydrationFns) {
5305
4898
  internals,
5306
4899
  doRemove
5307
4900
  );
5308
- } else if (dynamicChildren && // #1153: fast path should not be taken for non-stable (v-for) fragments
4901
+ } else if (dynamicChildren && // #5154
4902
+ // when v-once is used inside a block, setBlockTracking(-1) marks the
4903
+ // parent block with hasOnce: true
4904
+ // so that it doesn't take the fast path during unmount - otherwise
4905
+ // components nested in v-once are never unmounted.
4906
+ !dynamicChildren.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments
5309
4907
  (type !== Fragment || patchFlag > 0 && patchFlag & 64)) {
5310
4908
  unmountChildren(
5311
4909
  dynamicChildren,
@@ -5418,7 +5016,9 @@ function baseCreateRenderer(options, createHydrationFns) {
5418
5016
  if (vnode.shapeFlag & 128) {
5419
5017
  return vnode.suspense.next();
5420
5018
  }
5421
- return hostNextSibling(vnode.anchor || vnode.el);
5019
+ const el = hostNextSibling(vnode.anchor || vnode.el);
5020
+ const teleportEnd = el && el[TeleportEndKey];
5021
+ return teleportEnd ? hostNextSibling(teleportEnd) : el;
5422
5022
  };
5423
5023
  let isFlushing = false;
5424
5024
  const render = (vnode, container, namespace) => {
@@ -5740,140 +5340,527 @@ function doWatch(source, cb, {
5740
5340
  remove(scope.effects, effect);
5741
5341
  }
5742
5342
  };
5743
- {
5744
- effect.onTrack = onTrack;
5745
- effect.onTrigger = onTrigger;
5746
- }
5747
- if (cb) {
5748
- if (immediate) {
5749
- job();
5343
+ {
5344
+ effect.onTrack = onTrack;
5345
+ effect.onTrigger = onTrigger;
5346
+ }
5347
+ if (cb) {
5348
+ if (immediate) {
5349
+ job();
5350
+ } else {
5351
+ oldValue = effect.run();
5352
+ }
5353
+ } else if (flush === "post") {
5354
+ queuePostRenderEffect(
5355
+ effect.run.bind(effect),
5356
+ instance && instance.suspense
5357
+ );
5358
+ } else {
5359
+ effect.run();
5360
+ }
5361
+ if (ssrCleanup) ssrCleanup.push(unwatch);
5362
+ return unwatch;
5363
+ }
5364
+ function instanceWatch(source, value, options) {
5365
+ const publicThis = this.proxy;
5366
+ const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
5367
+ let cb;
5368
+ if (isFunction(value)) {
5369
+ cb = value;
5370
+ } else {
5371
+ cb = value.handler;
5372
+ options = value;
5373
+ }
5374
+ const reset = setCurrentInstance(this);
5375
+ const res = doWatch(getter, cb.bind(publicThis), options);
5376
+ reset();
5377
+ return res;
5378
+ }
5379
+ function createPathGetter(ctx, path) {
5380
+ const segments = path.split(".");
5381
+ return () => {
5382
+ let cur = ctx;
5383
+ for (let i = 0; i < segments.length && cur; i++) {
5384
+ cur = cur[segments[i]];
5385
+ }
5386
+ return cur;
5387
+ };
5388
+ }
5389
+ function traverse(value, depth = Infinity, seen) {
5390
+ if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
5391
+ return value;
5392
+ }
5393
+ seen = seen || /* @__PURE__ */ new Set();
5394
+ if (seen.has(value)) {
5395
+ return value;
5396
+ }
5397
+ seen.add(value);
5398
+ depth--;
5399
+ if (isRef(value)) {
5400
+ traverse(value.value, depth, seen);
5401
+ } else if (isArray(value)) {
5402
+ for (let i = 0; i < value.length; i++) {
5403
+ traverse(value[i], depth, seen);
5404
+ }
5405
+ } else if (isSet(value) || isMap(value)) {
5406
+ value.forEach((v) => {
5407
+ traverse(v, depth, seen);
5408
+ });
5409
+ } else if (isPlainObject(value)) {
5410
+ for (const key in value) {
5411
+ traverse(value[key], depth, seen);
5412
+ }
5413
+ for (const key of Object.getOwnPropertySymbols(value)) {
5414
+ if (Object.prototype.propertyIsEnumerable.call(value, key)) {
5415
+ traverse(value[key], depth, seen);
5416
+ }
5417
+ }
5418
+ }
5419
+ return value;
5420
+ }
5421
+
5422
+ const getModelModifiers = (props, modelName) => {
5423
+ return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize(modelName)}Modifiers`] || props[`${hyphenate(modelName)}Modifiers`];
5424
+ };
5425
+
5426
+ function emit(instance, event, ...rawArgs) {
5427
+ if (instance.isUnmounted) return;
5428
+ const props = instance.vnode.props || EMPTY_OBJ;
5429
+ {
5430
+ const {
5431
+ emitsOptions,
5432
+ propsOptions: [propsOptions]
5433
+ } = instance;
5434
+ if (emitsOptions) {
5435
+ if (!(event in emitsOptions) && true) {
5436
+ if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
5437
+ warn$1(
5438
+ `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.`
5439
+ );
5440
+ }
5441
+ } else {
5442
+ const validator = emitsOptions[event];
5443
+ if (isFunction(validator)) {
5444
+ const isValid = validator(...rawArgs);
5445
+ if (!isValid) {
5446
+ warn$1(
5447
+ `Invalid event arguments: event validation failed for event "${event}".`
5448
+ );
5449
+ }
5450
+ }
5451
+ }
5452
+ }
5453
+ }
5454
+ let args = rawArgs;
5455
+ const isModelListener = event.startsWith("update:");
5456
+ const modifiers = isModelListener && getModelModifiers(props, event.slice(7));
5457
+ if (modifiers) {
5458
+ if (modifiers.trim) {
5459
+ args = rawArgs.map((a) => isString(a) ? a.trim() : a);
5460
+ }
5461
+ if (modifiers.number) {
5462
+ args = rawArgs.map(looseToNumber);
5463
+ }
5464
+ }
5465
+ {
5466
+ devtoolsComponentEmit(instance, event, args);
5467
+ }
5468
+ {
5469
+ const lowerCaseEvent = event.toLowerCase();
5470
+ if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {
5471
+ warn$1(
5472
+ `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName(
5473
+ instance,
5474
+ instance.type
5475
+ )} 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(
5476
+ event
5477
+ )}" instead of "${event}".`
5478
+ );
5479
+ }
5480
+ }
5481
+ let handlerName;
5482
+ let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249)
5483
+ props[handlerName = toHandlerKey(camelize(event))];
5484
+ if (!handler && isModelListener) {
5485
+ handler = props[handlerName = toHandlerKey(hyphenate(event))];
5486
+ }
5487
+ if (handler) {
5488
+ callWithAsyncErrorHandling(
5489
+ handler,
5490
+ instance,
5491
+ 6,
5492
+ args
5493
+ );
5494
+ }
5495
+ const onceHandler = props[handlerName + `Once`];
5496
+ if (onceHandler) {
5497
+ if (!instance.emitted) {
5498
+ instance.emitted = {};
5499
+ } else if (instance.emitted[handlerName]) {
5500
+ return;
5501
+ }
5502
+ instance.emitted[handlerName] = true;
5503
+ callWithAsyncErrorHandling(
5504
+ onceHandler,
5505
+ instance,
5506
+ 6,
5507
+ args
5508
+ );
5509
+ }
5510
+ }
5511
+ function normalizeEmitsOptions(comp, appContext, asMixin = false) {
5512
+ const cache = appContext.emitsCache;
5513
+ const cached = cache.get(comp);
5514
+ if (cached !== void 0) {
5515
+ return cached;
5516
+ }
5517
+ const raw = comp.emits;
5518
+ let normalized = {};
5519
+ let hasExtends = false;
5520
+ if (!isFunction(comp)) {
5521
+ const extendEmits = (raw2) => {
5522
+ const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);
5523
+ if (normalizedFromExtend) {
5524
+ hasExtends = true;
5525
+ extend(normalized, normalizedFromExtend);
5526
+ }
5527
+ };
5528
+ if (!asMixin && appContext.mixins.length) {
5529
+ appContext.mixins.forEach(extendEmits);
5530
+ }
5531
+ if (comp.extends) {
5532
+ extendEmits(comp.extends);
5533
+ }
5534
+ if (comp.mixins) {
5535
+ comp.mixins.forEach(extendEmits);
5536
+ }
5537
+ }
5538
+ if (!raw && !hasExtends) {
5539
+ if (isObject(comp)) {
5540
+ cache.set(comp, null);
5541
+ }
5542
+ return null;
5543
+ }
5544
+ if (isArray(raw)) {
5545
+ raw.forEach((key) => normalized[key] = null);
5546
+ } else {
5547
+ extend(normalized, raw);
5548
+ }
5549
+ if (isObject(comp)) {
5550
+ cache.set(comp, normalized);
5551
+ }
5552
+ return normalized;
5553
+ }
5554
+ function isEmitListener(options, key) {
5555
+ if (!options || !isOn(key)) {
5556
+ return false;
5557
+ }
5558
+ key = key.slice(2).replace(/Once$/, "");
5559
+ return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
5560
+ }
5561
+
5562
+ let accessedAttrs = false;
5563
+ function markAttrsAccessed() {
5564
+ accessedAttrs = true;
5565
+ }
5566
+ function renderComponentRoot$1(instance) {
5567
+ const {
5568
+ type: Component,
5569
+ vnode,
5570
+ proxy,
5571
+ withProxy,
5572
+ propsOptions: [propsOptions],
5573
+ slots,
5574
+ attrs,
5575
+ emit,
5576
+ render,
5577
+ renderCache,
5578
+ props,
5579
+ data,
5580
+ setupState,
5581
+ ctx,
5582
+ inheritAttrs
5583
+ } = instance;
5584
+ const prev = setCurrentRenderingInstance$1(instance);
5585
+ let result;
5586
+ let fallthroughAttrs;
5587
+ {
5588
+ accessedAttrs = false;
5589
+ }
5590
+ try {
5591
+ if (vnode.shapeFlag & 4) {
5592
+ const proxyToUse = withProxy || proxy;
5593
+ const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, {
5594
+ get(target, key, receiver) {
5595
+ warn$1(
5596
+ `Property '${String(
5597
+ key
5598
+ )}' was accessed via 'this'. Avoid using 'this' in templates.`
5599
+ );
5600
+ return Reflect.get(target, key, receiver);
5601
+ }
5602
+ }) : proxyToUse;
5603
+ result = normalizeVNode$1(
5604
+ render.call(
5605
+ thisProxy,
5606
+ proxyToUse,
5607
+ renderCache,
5608
+ true ? shallowReadonly(props) : props,
5609
+ setupState,
5610
+ data,
5611
+ ctx
5612
+ )
5613
+ );
5614
+ fallthroughAttrs = attrs;
5615
+ } else {
5616
+ const render2 = Component;
5617
+ if (attrs === props) {
5618
+ markAttrsAccessed();
5619
+ }
5620
+ result = normalizeVNode$1(
5621
+ render2.length > 1 ? render2(
5622
+ true ? shallowReadonly(props) : props,
5623
+ true ? {
5624
+ get attrs() {
5625
+ markAttrsAccessed();
5626
+ return shallowReadonly(attrs);
5627
+ },
5628
+ slots,
5629
+ emit
5630
+ } : { attrs, slots, emit }
5631
+ ) : render2(
5632
+ true ? shallowReadonly(props) : props,
5633
+ null
5634
+ )
5635
+ );
5636
+ fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
5637
+ }
5638
+ } catch (err) {
5639
+ handleError(err, instance, 1);
5640
+ result = createVNode(Comment);
5641
+ }
5642
+ let root = result;
5643
+ let setRoot = void 0;
5644
+ if (result.patchFlag > 0 && result.patchFlag & 2048) {
5645
+ [root, setRoot] = getChildRoot(result);
5646
+ }
5647
+ if (fallthroughAttrs && inheritAttrs !== false) {
5648
+ const keys = Object.keys(fallthroughAttrs);
5649
+ const { shapeFlag } = root;
5650
+ if (keys.length) {
5651
+ if (shapeFlag & (1 | 6)) {
5652
+ if (propsOptions && keys.some(isModelListener)) {
5653
+ fallthroughAttrs = filterModelListeners(
5654
+ fallthroughAttrs,
5655
+ propsOptions
5656
+ );
5657
+ }
5658
+ root = cloneVNode(root, fallthroughAttrs, false, true);
5659
+ } else if (!accessedAttrs && root.type !== Comment) {
5660
+ const allAttrs = Object.keys(attrs);
5661
+ const eventAttrs = [];
5662
+ const extraAttrs = [];
5663
+ for (let i = 0, l = allAttrs.length; i < l; i++) {
5664
+ const key = allAttrs[i];
5665
+ if (isOn(key)) {
5666
+ if (!isModelListener(key)) {
5667
+ eventAttrs.push(key[2].toLowerCase() + key.slice(3));
5668
+ }
5669
+ } else {
5670
+ extraAttrs.push(key);
5671
+ }
5672
+ }
5673
+ if (extraAttrs.length) {
5674
+ warn$1(
5675
+ `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`
5676
+ );
5677
+ }
5678
+ if (eventAttrs.length) {
5679
+ warn$1(
5680
+ `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.`
5681
+ );
5682
+ }
5683
+ }
5684
+ }
5685
+ }
5686
+ if (vnode.dirs) {
5687
+ if (!isElementRoot(root)) {
5688
+ warn$1(
5689
+ `Runtime directive used on component with non-element root node. The directives will not function as intended.`
5690
+ );
5691
+ }
5692
+ root = cloneVNode(root, null, false, true);
5693
+ root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
5694
+ }
5695
+ if (vnode.transition) {
5696
+ if (!isElementRoot(root)) {
5697
+ warn$1(
5698
+ `Component inside <Transition> renders non-element root node that cannot be animated.`
5699
+ );
5700
+ }
5701
+ root.transition = vnode.transition;
5702
+ }
5703
+ if (setRoot) {
5704
+ setRoot(root);
5705
+ } else {
5706
+ result = root;
5707
+ }
5708
+ setCurrentRenderingInstance$1(prev);
5709
+ return result;
5710
+ }
5711
+ const getChildRoot = (vnode) => {
5712
+ const rawChildren = vnode.children;
5713
+ const dynamicChildren = vnode.dynamicChildren;
5714
+ const childRoot = filterSingleRoot(rawChildren, false);
5715
+ if (!childRoot) {
5716
+ return [vnode, void 0];
5717
+ } else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) {
5718
+ return getChildRoot(childRoot);
5719
+ }
5720
+ const index = rawChildren.indexOf(childRoot);
5721
+ const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;
5722
+ const setRoot = (updatedRoot) => {
5723
+ rawChildren[index] = updatedRoot;
5724
+ if (dynamicChildren) {
5725
+ if (dynamicIndex > -1) {
5726
+ dynamicChildren[dynamicIndex] = updatedRoot;
5727
+ } else if (updatedRoot.patchFlag > 0) {
5728
+ vnode.dynamicChildren = [...dynamicChildren, updatedRoot];
5729
+ }
5730
+ }
5731
+ };
5732
+ return [normalizeVNode$1(childRoot), setRoot];
5733
+ };
5734
+ function filterSingleRoot(children, recurse = true) {
5735
+ let singleRoot;
5736
+ for (let i = 0; i < children.length; i++) {
5737
+ const child = children[i];
5738
+ if (isVNode$2(child)) {
5739
+ if (child.type !== Comment || child.children === "v-if") {
5740
+ if (singleRoot) {
5741
+ return;
5742
+ } else {
5743
+ singleRoot = child;
5744
+ if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) {
5745
+ return filterSingleRoot(singleRoot.children);
5746
+ }
5747
+ }
5748
+ }
5750
5749
  } else {
5751
- oldValue = effect.run();
5750
+ return;
5752
5751
  }
5753
- } else if (flush === "post") {
5754
- queuePostRenderEffect(
5755
- effect.run.bind(effect),
5756
- instance && instance.suspense
5757
- );
5758
- } else {
5759
- effect.run();
5760
5752
  }
5761
- if (ssrCleanup) ssrCleanup.push(unwatch);
5762
- return unwatch;
5753
+ return singleRoot;
5763
5754
  }
5764
- function instanceWatch(source, value, options) {
5765
- const publicThis = this.proxy;
5766
- const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
5767
- let cb;
5768
- if (isFunction(value)) {
5769
- cb = value;
5770
- } else {
5771
- cb = value.handler;
5772
- options = value;
5755
+ const getFunctionalFallthrough = (attrs) => {
5756
+ let res;
5757
+ for (const key in attrs) {
5758
+ if (key === "class" || key === "style" || isOn(key)) {
5759
+ (res || (res = {}))[key] = attrs[key];
5760
+ }
5773
5761
  }
5774
- const reset = setCurrentInstance(this);
5775
- const res = doWatch(getter, cb.bind(publicThis), options);
5776
- reset();
5777
5762
  return res;
5778
- }
5779
- function createPathGetter(ctx, path) {
5780
- const segments = path.split(".");
5781
- return () => {
5782
- let cur = ctx;
5783
- for (let i = 0; i < segments.length && cur; i++) {
5784
- cur = cur[segments[i]];
5763
+ };
5764
+ const filterModelListeners = (attrs, props) => {
5765
+ const res = {};
5766
+ for (const key in attrs) {
5767
+ if (!isModelListener(key) || !(key.slice(9) in props)) {
5768
+ res[key] = attrs[key];
5785
5769
  }
5786
- return cur;
5787
- };
5788
- }
5789
- function traverse(value, depth = Infinity, seen) {
5790
- if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
5791
- return value;
5792
5770
  }
5793
- seen = seen || /* @__PURE__ */ new Set();
5794
- if (seen.has(value)) {
5795
- return value;
5771
+ return res;
5772
+ };
5773
+ const isElementRoot = (vnode) => {
5774
+ return vnode.shapeFlag & (6 | 1) || vnode.type === Comment;
5775
+ };
5776
+ function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
5777
+ const { props: prevProps, children: prevChildren, component } = prevVNode;
5778
+ const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;
5779
+ const emits = component.emitsOptions;
5780
+ if ((prevChildren || nextChildren) && isHmrUpdating) {
5781
+ return true;
5796
5782
  }
5797
- seen.add(value);
5798
- depth--;
5799
- if (isRef(value)) {
5800
- traverse(value.value, depth, seen);
5801
- } else if (isArray(value)) {
5802
- for (let i = 0; i < value.length; i++) {
5803
- traverse(value[i], depth, seen);
5783
+ if (nextVNode.dirs || nextVNode.transition) {
5784
+ return true;
5785
+ }
5786
+ if (optimized && patchFlag >= 0) {
5787
+ if (patchFlag & 1024) {
5788
+ return true;
5804
5789
  }
5805
- } else if (isSet(value) || isMap(value)) {
5806
- value.forEach((v) => {
5807
- traverse(v, depth, seen);
5808
- });
5809
- } else if (isPlainObject(value)) {
5810
- for (const key in value) {
5811
- traverse(value[key], depth, seen);
5790
+ if (patchFlag & 16) {
5791
+ if (!prevProps) {
5792
+ return !!nextProps;
5793
+ }
5794
+ return hasPropsChanged(prevProps, nextProps, emits);
5795
+ } else if (patchFlag & 8) {
5796
+ const dynamicProps = nextVNode.dynamicProps;
5797
+ for (let i = 0; i < dynamicProps.length; i++) {
5798
+ const key = dynamicProps[i];
5799
+ if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) {
5800
+ return true;
5801
+ }
5802
+ }
5812
5803
  }
5813
- for (const key of Object.getOwnPropertySymbols(value)) {
5814
- if (Object.prototype.propertyIsEnumerable.call(value, key)) {
5815
- traverse(value[key], depth, seen);
5804
+ } else {
5805
+ if (prevChildren || nextChildren) {
5806
+ if (!nextChildren || !nextChildren.$stable) {
5807
+ return true;
5816
5808
  }
5817
5809
  }
5810
+ if (prevProps === nextProps) {
5811
+ return false;
5812
+ }
5813
+ if (!prevProps) {
5814
+ return !!nextProps;
5815
+ }
5816
+ if (!nextProps) {
5817
+ return true;
5818
+ }
5819
+ return hasPropsChanged(prevProps, nextProps, emits);
5818
5820
  }
5819
- return value;
5820
- }
5821
-
5822
- const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
5823
- function onActivated(hook, target) {
5824
- registerKeepAliveHook(hook, "a", target);
5821
+ return false;
5825
5822
  }
5826
- function onDeactivated(hook, target) {
5827
- registerKeepAliveHook(hook, "da", target);
5823
+ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
5824
+ const nextKeys = Object.keys(nextProps);
5825
+ if (nextKeys.length !== Object.keys(prevProps).length) {
5826
+ return true;
5827
+ }
5828
+ for (let i = 0; i < nextKeys.length; i++) {
5829
+ const key = nextKeys[i];
5830
+ if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) {
5831
+ return true;
5832
+ }
5833
+ }
5834
+ return false;
5828
5835
  }
5829
- function registerKeepAliveHook(hook, type, target = currentInstance) {
5830
- const wrappedHook = hook.__wdc || (hook.__wdc = () => {
5831
- let current = target;
5832
- while (current) {
5833
- if (current.isDeactivated) {
5834
- return;
5835
- }
5836
- current = current.parent;
5836
+ function updateHOCHostEl({ vnode, parent }, el) {
5837
+ while (parent) {
5838
+ const root = parent.subTree;
5839
+ if (root.suspense && root.suspense.activeBranch === vnode) {
5840
+ root.el = vnode.el;
5837
5841
  }
5838
- return hook();
5839
- });
5840
- injectHook(type, wrappedHook, target);
5841
- if (target) {
5842
- let current = target.parent;
5843
- while (current && current.parent) {
5844
- if (isKeepAlive(current.parent.vnode)) {
5845
- injectToKeepAliveRoot(wrappedHook, type, target, current);
5846
- }
5847
- current = current.parent;
5842
+ if (root === vnode) {
5843
+ (vnode = parent.vnode).el = el;
5844
+ parent = parent.parent;
5845
+ } else {
5846
+ break;
5848
5847
  }
5849
5848
  }
5850
5849
  }
5851
- function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
5852
- const injected = injectHook(
5853
- type,
5854
- hook,
5855
- keepAliveRoot,
5856
- true
5857
- /* prepend */
5858
- );
5859
- onUnmounted(() => {
5860
- remove(keepAliveRoot[type], injected);
5861
- }, target);
5862
- }
5863
5850
 
5864
- function setTransitionHooks(vnode, hooks) {
5865
- if (vnode.shapeFlag & 6 && vnode.component) {
5866
- setTransitionHooks(vnode.component.subTree, hooks);
5867
- } else if (vnode.shapeFlag & 128) {
5868
- vnode.ssContent.transition = hooks.clone(vnode.ssContent);
5869
- vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
5851
+ const isSuspense = (type) => type.__isSuspense;
5852
+ function queueEffectWithSuspense(fn, suspense) {
5853
+ if (suspense && suspense.pendingBranch) {
5854
+ if (isArray(fn)) {
5855
+ suspense.effects.push(...fn);
5856
+ } else {
5857
+ suspense.effects.push(fn);
5858
+ }
5870
5859
  } else {
5871
- vnode.transition = hooks;
5860
+ queuePostFlushCb(fn);
5872
5861
  }
5873
5862
  }
5874
5863
 
5875
- const isTeleport = (type) => type.__isTeleport;
5876
-
5877
5864
  const Fragment = Symbol.for("v-fgt");
5878
5865
  const Text = Symbol.for("v-txt");
5879
5866
  const Comment = Symbol.for("v-cmt");
@@ -5882,15 +5869,21 @@ let currentBlock = null;
5882
5869
  let isBlockTreeEnabled = 1;
5883
5870
  function setBlockTracking(value) {
5884
5871
  isBlockTreeEnabled += value;
5872
+ if (value < 0 && currentBlock) {
5873
+ currentBlock.hasOnce = true;
5874
+ }
5885
5875
  }
5886
5876
  function isVNode$2(value) {
5887
5877
  return value ? value.__v_isVNode === true : false;
5888
5878
  }
5889
5879
  function isSameVNodeType(n1, n2) {
5890
- if (n2.shapeFlag & 6 && hmrDirtyComponents.has(n2.type)) {
5891
- n1.shapeFlag &= ~256;
5892
- n2.shapeFlag &= ~512;
5893
- return false;
5880
+ if (n2.shapeFlag & 6 && n1.component) {
5881
+ const dirtyInstances = hmrDirtyComponents.get(n2.type);
5882
+ if (dirtyInstances && dirtyInstances.has(n1.component)) {
5883
+ n1.shapeFlag &= ~256;
5884
+ n2.shapeFlag &= ~512;
5885
+ return false;
5886
+ }
5894
5887
  }
5895
5888
  return n1.type === n2.type && n1.key === n2.key;
5896
5889
  }
@@ -5930,6 +5923,7 @@ function createBaseVNode(type, props = null, children = null, patchFlag = 0, dyn
5930
5923
  el: null,
5931
5924
  anchor: null,
5932
5925
  target: null,
5926
+ targetStart: null,
5933
5927
  targetAnchor: null,
5934
5928
  staticCount: 0,
5935
5929
  shapeFlag,
@@ -6051,6 +6045,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
6051
6045
  slotScopeIds: vnode.slotScopeIds,
6052
6046
  children: patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children,
6053
6047
  target: vnode.target,
6048
+ targetStart: vnode.targetStart,
6054
6049
  targetAnchor: vnode.targetAnchor,
6055
6050
  staticCount: vnode.staticCount,
6056
6051
  shapeFlag: vnode.shapeFlag,
@@ -6244,8 +6239,6 @@ function createComponentInstance$1(vnode, parent, suspense) {
6244
6239
  refs: EMPTY_OBJ,
6245
6240
  setupState: EMPTY_OBJ,
6246
6241
  setupContext: null,
6247
- attrsProxy: null,
6248
- slotsProxy: null,
6249
6242
  // suspense related
6250
6243
  suspense,
6251
6244
  suspenseId: suspense ? suspense.pendingId : 0,
@@ -6330,12 +6323,12 @@ function isStatefulComponent(instance) {
6330
6323
  return instance.vnode.shapeFlag & 4;
6331
6324
  }
6332
6325
  let isInSSRComponentSetup = false;
6333
- function setupComponent$1(instance, isSSR = false) {
6326
+ function setupComponent$1(instance, isSSR = false, optimized = false) {
6334
6327
  isSSR && setInSSRSetupState(isSSR);
6335
6328
  const { props, children } = instance.vnode;
6336
6329
  const isStateful = isStatefulComponent(instance);
6337
6330
  initProps(instance, props, isStateful, isSSR);
6338
- initSlots(instance, children);
6331
+ initSlots(instance, children, optimized);
6339
6332
  const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
6340
6333
  isSSR && setInSSRSetupState(false);
6341
6334
  return setupResult;
@@ -6504,12 +6497,12 @@ const attrsProxyHandlers = {
6504
6497
  }
6505
6498
  } ;
6506
6499
  function getSlotsProxy(instance) {
6507
- return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, {
6500
+ return new Proxy(instance.slots, {
6508
6501
  get(target, key) {
6509
6502
  track(instance, "get", "$slots");
6510
6503
  return target[key];
6511
6504
  }
6512
- }));
6505
+ });
6513
6506
  }
6514
6507
  function createSetupContext(instance) {
6515
6508
  const expose = (exposed) => {
@@ -6537,12 +6530,13 @@ function createSetupContext(instance) {
6537
6530
  };
6538
6531
  {
6539
6532
  let attrsProxy;
6533
+ let slotsProxy;
6540
6534
  return Object.freeze({
6541
6535
  get attrs() {
6542
6536
  return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers));
6543
6537
  },
6544
6538
  get slots() {
6545
- return getSlotsProxy(instance);
6539
+ return slotsProxy || (slotsProxy = getSlotsProxy(instance));
6546
6540
  },
6547
6541
  get emit() {
6548
6542
  return (event, ...args) => instance.emit(event, ...args);
@@ -6611,7 +6605,7 @@ const computed = (getterOrOptions, debugOptions) => {
6611
6605
  return c;
6612
6606
  };
6613
6607
 
6614
- const version = "3.4.31";
6608
+ const version = "3.4.33";
6615
6609
  const warn = warn$1 ;
6616
6610
  const _ssrUtils = {
6617
6611
  createComponentInstance: createComponentInstance$1,
@@ -6832,12 +6826,10 @@ function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBoolean
6832
6826
  }
6833
6827
  }
6834
6828
 
6835
- function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspense, unmountChildren) {
6829
+ function patchDOMProp(el, key, value, parentComponent) {
6836
6830
  if (key === "innerHTML" || key === "textContent") {
6837
- if (prevChildren) {
6838
- unmountChildren(prevChildren, parentComponent, parentSuspense);
6839
- }
6840
- el[key] = value == null ? "" : value;
6831
+ if (value == null) return;
6832
+ el[key] = value;
6841
6833
  return;
6842
6834
  }
6843
6835
  const tag = el.tagName;
@@ -6968,7 +6960,7 @@ function patchStopImmediatePropagation(e, value) {
6968
6960
 
6969
6961
  const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter
6970
6962
  key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;
6971
- const patchProp = (el, key, prevValue, nextValue, namespace, prevChildren, parentComponent, parentSuspense, unmountChildren) => {
6963
+ const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => {
6972
6964
  const isSVG = namespace === "svg";
6973
6965
  if (key === "class") {
6974
6966
  patchClass(el, nextValue, isSVG);
@@ -6979,15 +6971,7 @@ const patchProp = (el, key, prevValue, nextValue, namespace, prevChildren, paren
6979
6971
  patchEvent(el, key, prevValue, nextValue, parentComponent);
6980
6972
  }
6981
6973
  } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) {
6982
- patchDOMProp(
6983
- el,
6984
- key,
6985
- nextValue,
6986
- prevChildren,
6987
- parentComponent,
6988
- parentSuspense,
6989
- unmountChildren
6990
- );
6974
+ patchDOMProp(el, key, nextValue);
6991
6975
  if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) {
6992
6976
  patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value");
6993
6977
  }
@@ -7551,9 +7535,9 @@ function createBuffer() {
7551
7535
  const isStringItem = isString(item);
7552
7536
  if (appendable && isStringItem) {
7553
7537
  buffer[buffer.length - 1] += item;
7554
- } else {
7555
- buffer.push(item);
7538
+ return;
7556
7539
  }
7540
+ buffer.push(item);
7557
7541
  appendable = isStringItem;
7558
7542
  if (isPromise(item) || isArray(item) && item.hasAsync) {
7559
7543
  buffer.hasAsync = true;
@@ -7817,24 +7801,36 @@ function renderTeleportVNode(push, vnode, parentComponent, slotScopeId) {
7817
7801
  }
7818
7802
 
7819
7803
  const { isVNode: isVNode$1 } = ssrUtils;
7820
- async function unrollBuffer$1(buffer) {
7821
- if (buffer.hasAsync) {
7822
- let ret = "";
7823
- for (let i = 0; i < buffer.length; i++) {
7824
- let item = buffer[i];
7825
- if (isPromise(item)) {
7826
- item = await item;
7827
- }
7828
- if (isString(item)) {
7829
- ret += item;
7830
- } else {
7831
- ret += await unrollBuffer$1(item);
7832
- }
7804
+ function nestedUnrollBuffer(buffer, parentRet, startIndex) {
7805
+ if (!buffer.hasAsync) {
7806
+ return parentRet + unrollBufferSync$1(buffer);
7807
+ }
7808
+ let ret = parentRet;
7809
+ for (let i = startIndex; i < buffer.length; i += 1) {
7810
+ const item = buffer[i];
7811
+ if (isString(item)) {
7812
+ ret += item;
7813
+ continue;
7833
7814
  }
7834
- return ret;
7835
- } else {
7836
- return unrollBufferSync$1(buffer);
7815
+ if (isPromise(item)) {
7816
+ return item.then((nestedItem) => {
7817
+ buffer[i] = nestedItem;
7818
+ return nestedUnrollBuffer(buffer, ret, i);
7819
+ });
7820
+ }
7821
+ const result = nestedUnrollBuffer(item, ret, 0);
7822
+ if (isPromise(result)) {
7823
+ return result.then((nestedItem) => {
7824
+ buffer[i] = nestedItem;
7825
+ return nestedUnrollBuffer(buffer, "", i);
7826
+ });
7827
+ }
7828
+ ret = result;
7837
7829
  }
7830
+ return ret;
7831
+ }
7832
+ function unrollBuffer$1(buffer) {
7833
+ return nestedUnrollBuffer(buffer, "", 0);
7838
7834
  }
7839
7835
  function unrollBufferSync$1(buffer) {
7840
7836
  let ret = "";