@vue/compat 3.5.17 → 3.5.19

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/compat v3.5.17
2
+ * @vue/compat v3.5.19
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -59,10 +59,10 @@ var Vue = (function () {
59
59
  );
60
60
  const cacheStringFunction = (fn) => {
61
61
  const cache = /* @__PURE__ */ Object.create(null);
62
- return (str) => {
62
+ return ((str) => {
63
63
  const hit = cache[str];
64
64
  return hit || (cache[str] = fn(str));
65
- };
65
+ });
66
66
  };
67
67
  const camelizeRE = /-(\w)/g;
68
68
  const camelize = cacheStringFunction(
@@ -387,6 +387,24 @@ var Vue = (function () {
387
387
  );
388
388
  };
389
389
 
390
+ function normalizeCssVarValue(value) {
391
+ if (value == null) {
392
+ return "initial";
393
+ }
394
+ if (typeof value === "string") {
395
+ return value === "" ? " " : value;
396
+ }
397
+ if (typeof value !== "number" || !Number.isFinite(value)) {
398
+ {
399
+ console.warn(
400
+ "[Vue warn] Invalid value used for CSS binding. Expected a string or a finite number but received:",
401
+ value
402
+ );
403
+ }
404
+ }
405
+ return String(value);
406
+ }
407
+
390
408
  function warn$2(msg, ...args) {
391
409
  console.warn(`[Vue warn] ${msg}`, ...args);
392
410
  }
@@ -1350,7 +1368,13 @@ var Vue = (function () {
1350
1368
  }
1351
1369
  if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
1352
1370
  if (isOldValueReadonly) {
1353
- return false;
1371
+ {
1372
+ warn$2(
1373
+ `Set operation on key "${String(key)}" failed: target is readonly.`,
1374
+ target[key]
1375
+ );
1376
+ }
1377
+ return true;
1354
1378
  } else {
1355
1379
  oldValue.value = value;
1356
1380
  return true;
@@ -2717,7 +2741,9 @@ var Vue = (function () {
2717
2741
  }
2718
2742
  instance.renderCache = [];
2719
2743
  isHmrUpdating = true;
2720
- instance.update();
2744
+ if (!(instance.job.flags & 8)) {
2745
+ instance.update();
2746
+ }
2721
2747
  isHmrUpdating = false;
2722
2748
  });
2723
2749
  }
@@ -4309,7 +4335,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4309
4335
  const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
4310
4336
  const setupState = owner.setupState;
4311
4337
  const rawSetupState = toRaw(setupState);
4312
- const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => {
4338
+ const canSetSetupRef = setupState === EMPTY_OBJ ? NO : (key) => {
4313
4339
  {
4314
4340
  if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {
4315
4341
  warn$1(
@@ -4322,6 +4348,9 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4322
4348
  }
4323
4349
  return hasOwn(rawSetupState, key);
4324
4350
  };
4351
+ const canSetRef = (ref2) => {
4352
+ return !knownTemplateRefs.has(ref2);
4353
+ };
4325
4354
  if (oldRef != null && oldRef !== ref) {
4326
4355
  if (isString(oldRef)) {
4327
4356
  refs[oldRef] = null;
@@ -4329,7 +4358,11 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4329
4358
  setupState[oldRef] = null;
4330
4359
  }
4331
4360
  } else if (isRef(oldRef)) {
4332
- oldRef.value = null;
4361
+ if (canSetRef(oldRef)) {
4362
+ oldRef.value = null;
4363
+ }
4364
+ const oldRawRefAtom = oldRawRef;
4365
+ if (oldRawRefAtom.k) refs[oldRawRefAtom.k] = null;
4333
4366
  }
4334
4367
  }
4335
4368
  if (isFunction(ref)) {
@@ -4340,7 +4373,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4340
4373
  if (_isString || _isRef) {
4341
4374
  const doSet = () => {
4342
4375
  if (rawRef.f) {
4343
- const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value;
4376
+ const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : canSetRef(ref) || !rawRef.k ? ref.value : refs[rawRef.k];
4344
4377
  if (isUnmount) {
4345
4378
  isArray(existing) && remove(existing, refValue);
4346
4379
  } else {
@@ -4351,8 +4384,11 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4351
4384
  setupState[ref] = refs[ref];
4352
4385
  }
4353
4386
  } else {
4354
- ref.value = [refValue];
4355
- if (rawRef.k) refs[rawRef.k] = ref.value;
4387
+ const newVal = [refValue];
4388
+ if (canSetRef(ref)) {
4389
+ ref.value = newVal;
4390
+ }
4391
+ if (rawRef.k) refs[rawRef.k] = newVal;
4356
4392
  }
4357
4393
  } else if (!existing.includes(refValue)) {
4358
4394
  existing.push(refValue);
@@ -4364,7 +4400,9 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4364
4400
  setupState[ref] = value;
4365
4401
  }
4366
4402
  } else if (_isRef) {
4367
- ref.value = value;
4403
+ if (canSetRef(ref)) {
4404
+ ref.value = value;
4405
+ }
4368
4406
  if (rawRef.k) refs[rawRef.k] = value;
4369
4407
  } else {
4370
4408
  warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
@@ -4985,10 +5023,8 @@ Server rendered element contains fewer child nodes than client vdom.`
4985
5023
  if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) {
4986
5024
  const cssVars = instance.getCssVars();
4987
5025
  for (const key in cssVars) {
4988
- expectedMap.set(
4989
- `--${getEscapedCssVarName(key)}`,
4990
- String(cssVars[key])
4991
- );
5026
+ const value = normalizeCssVarValue(cssVars[key]);
5027
+ expectedMap.set(`--${getEscapedCssVarName(key)}`, value);
4992
5028
  }
4993
5029
  }
4994
5030
  if (vnode === root && instance.parent) {
@@ -5177,16 +5213,19 @@ Server rendered element contains fewer child nodes than client vdom.`
5177
5213
  __asyncLoader: load,
5178
5214
  __asyncHydrate(el, instance, hydrate) {
5179
5215
  let patched = false;
5180
- const doHydrate = hydrateStrategy ? () => {
5181
- const performHydrate = () => {
5182
- if (patched) {
5216
+ (instance.bu || (instance.bu = [])).push(() => patched = true);
5217
+ const performHydrate = () => {
5218
+ if (patched) {
5219
+ {
5183
5220
  warn$1(
5184
- `Skipping lazy hydration for component '${getComponentName(resolvedComp)}': it was updated before lazy hydration performed.`
5221
+ `Skipping lazy hydration for component '${getComponentName(resolvedComp) || resolvedComp.__file}': it was updated before lazy hydration performed.`
5185
5222
  );
5186
- return;
5187
5223
  }
5188
- hydrate();
5189
- };
5224
+ return;
5225
+ }
5226
+ hydrate();
5227
+ };
5228
+ const doHydrate = hydrateStrategy ? () => {
5190
5229
  const teardown = hydrateStrategy(
5191
5230
  performHydrate,
5192
5231
  (cb) => forEachElement(el, cb)
@@ -5194,8 +5233,7 @@ Server rendered element contains fewer child nodes than client vdom.`
5194
5233
  if (teardown) {
5195
5234
  (instance.bum || (instance.bum = [])).push(teardown);
5196
5235
  }
5197
- (instance.u || (instance.u = [])).push(() => patched = true);
5198
- } : hydrate;
5236
+ } : performHydrate;
5199
5237
  if (resolvedComp) {
5200
5238
  doHydrate();
5201
5239
  } else {
@@ -6456,10 +6494,10 @@ If this is a native custom element, make sure to exclude it from component resol
6456
6494
  return true;
6457
6495
  },
6458
6496
  has({
6459
- _: { data, setupState, accessCache, ctx, appContext, propsOptions }
6497
+ _: { data, setupState, accessCache, ctx, appContext, propsOptions, type }
6460
6498
  }, key) {
6461
- let normalizedProps;
6462
- return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key);
6499
+ let normalizedProps, cssModules;
6500
+ return !!(accessCache[key] || data !== EMPTY_OBJ && key[0] !== "$" && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key) || (cssModules = type.__cssModules) && cssModules[key]);
6463
6501
  },
6464
6502
  defineProperty(target, key, descriptor) {
6465
6503
  if (descriptor.get != null) {
@@ -6611,15 +6649,15 @@ If this is a native custom element, make sure to exclude it from component resol
6611
6649
  return null;
6612
6650
  }
6613
6651
  function useSlots() {
6614
- return getContext().slots;
6652
+ return getContext("useSlots").slots;
6615
6653
  }
6616
6654
  function useAttrs() {
6617
- return getContext().attrs;
6655
+ return getContext("useAttrs").attrs;
6618
6656
  }
6619
- function getContext() {
6657
+ function getContext(calledFunctionName) {
6620
6658
  const i = getCurrentInstance();
6621
6659
  if (!i) {
6622
- warn$1(`useContext() called without active instance.`);
6660
+ warn$1(`${calledFunctionName}() called without active instance.`);
6623
6661
  }
6624
6662
  return i.setupContext || (i.setupContext = createSetupContext(i));
6625
6663
  }
@@ -6878,7 +6916,8 @@ If this is a native custom element, make sure to exclude it from component resol
6878
6916
  expose.forEach((key) => {
6879
6917
  Object.defineProperty(exposed, key, {
6880
6918
  get: () => publicThis[key],
6881
- set: (val) => publicThis[key] = val
6919
+ set: (val) => publicThis[key] = val,
6920
+ enumerable: true
6882
6921
  });
6883
6922
  });
6884
6923
  } else if (!instance.exposed) {
@@ -7200,7 +7239,7 @@ If this is a native custom element, make sure to exclude it from component resol
7200
7239
  return vm;
7201
7240
  }
7202
7241
  }
7203
- Vue.version = `2.6.14-compat:${"3.5.17"}`;
7242
+ Vue.version = `2.6.14-compat:${"3.5.19"}`;
7204
7243
  Vue.config = singletonApp.config;
7205
7244
  Vue.use = (plugin, ...options) => {
7206
7245
  if (plugin && isFunction(plugin.install)) {
@@ -7214,22 +7253,22 @@ If this is a native custom element, make sure to exclude it from component resol
7214
7253
  singletonApp.mixin(m);
7215
7254
  return Vue;
7216
7255
  };
7217
- Vue.component = (name, comp) => {
7256
+ Vue.component = ((name, comp) => {
7218
7257
  if (comp) {
7219
7258
  singletonApp.component(name, comp);
7220
7259
  return Vue;
7221
7260
  } else {
7222
7261
  return singletonApp.component(name);
7223
7262
  }
7224
- };
7225
- Vue.directive = (name, dir) => {
7263
+ });
7264
+ Vue.directive = ((name, dir) => {
7226
7265
  if (dir) {
7227
7266
  singletonApp.directive(name, dir);
7228
7267
  return Vue;
7229
7268
  } else {
7230
7269
  return singletonApp.directive(name);
7231
7270
  }
7232
- };
7271
+ });
7233
7272
  Vue.options = { _base: Vue };
7234
7273
  let cid = 1;
7235
7274
  Vue.cid = cid;
@@ -7292,14 +7331,14 @@ If this is a native custom element, make sure to exclude it from component resol
7292
7331
  assertCompatEnabled("GLOBAL_OBSERVABLE", null);
7293
7332
  return reactive(target);
7294
7333
  };
7295
- Vue.filter = (name, filter) => {
7334
+ Vue.filter = ((name, filter) => {
7296
7335
  if (filter) {
7297
7336
  singletonApp.filter(name, filter);
7298
7337
  return Vue;
7299
7338
  } else {
7300
7339
  return singletonApp.filter(name);
7301
7340
  }
7302
- };
7341
+ });
7303
7342
  const util = {
7304
7343
  warn: warn$1 ,
7305
7344
  extend,
@@ -7792,7 +7831,7 @@ If you want to remount the same app, move your app creation logic into a factory
7792
7831
  }
7793
7832
  }
7794
7833
  function inject(key, defaultValue, treatDefaultAsFactory = false) {
7795
- const instance = currentInstance || currentRenderingInstance;
7834
+ const instance = getCurrentInstance();
7796
7835
  if (instance || currentApp) {
7797
7836
  let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
7798
7837
  if (provides && key in provides) {
@@ -7807,7 +7846,7 @@ If you want to remount the same app, move your app creation logic into a factory
7807
7846
  }
7808
7847
  }
7809
7848
  function hasInjectionContext() {
7810
- return !!(currentInstance || currentRenderingInstance || currentApp);
7849
+ return !!(getCurrentInstance() || currentApp);
7811
7850
  }
7812
7851
 
7813
7852
  function createPropsDefaultThis(instance, rawProps, propKey) {
@@ -8293,7 +8332,7 @@ If you want to remount the same app, move your app creation logic into a factory
8293
8332
  return args.some((elem) => elem.toLowerCase() === "boolean");
8294
8333
  }
8295
8334
 
8296
- const isInternalKey = (key) => key[0] === "_" || key === "$stable";
8335
+ const isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
8297
8336
  const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
8298
8337
  const normalizeSlot = (key, rawSlot, ctx) => {
8299
8338
  if (rawSlot._n) {
@@ -8347,8 +8386,6 @@ If you want to remount the same app, move your app creation logic into a factory
8347
8386
  const initSlots = (instance, children, optimized) => {
8348
8387
  const slots = instance.slots = createInternalObject();
8349
8388
  if (instance.vnode.shapeFlag & 32) {
8350
- const cacheIndexes = children.__;
8351
- if (cacheIndexes) def(slots, "__", cacheIndexes, true);
8352
8389
  const type = children._;
8353
8390
  if (type) {
8354
8391
  assignSlots(slots, children, optimized);
@@ -8409,12 +8446,10 @@ If you want to remount the same app, move your app creation logic into a factory
8409
8446
  if (instance.appContext.config.performance && isSupported()) {
8410
8447
  const startTag = `vue-${type}-${instance.uid}`;
8411
8448
  const endTag = startTag + `:end`;
8449
+ const measureName = `<${formatComponentName(instance, instance.type)}> ${type}`;
8412
8450
  perf.mark(endTag);
8413
- perf.measure(
8414
- `<${formatComponentName(instance, instance.type)}> ${type}`,
8415
- startTag,
8416
- endTag
8417
- );
8451
+ perf.measure(measureName, startTag, endTag);
8452
+ perf.clearMeasures(measureName);
8418
8453
  perf.clearMarks(startTag);
8419
8454
  perf.clearMarks(endTag);
8420
8455
  }
@@ -9036,6 +9071,7 @@ If you want to remount the same app, move your app creation logic into a factory
9036
9071
  if (!initialVNode.el) {
9037
9072
  const placeholder = instance.subTree = createVNode(Comment);
9038
9073
  processCommentNode(null, placeholder, container, anchor);
9074
+ initialVNode.placeholder = placeholder.el;
9039
9075
  }
9040
9076
  } else {
9041
9077
  setupRenderEffect(
@@ -9561,7 +9597,11 @@ If you want to remount the same app, move your app creation logic into a factory
9561
9597
  for (i = toBePatched - 1; i >= 0; i--) {
9562
9598
  const nextIndex = s2 + i;
9563
9599
  const nextChild = c2[nextIndex];
9564
- const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor;
9600
+ const anchorVNode = c2[nextIndex + 1];
9601
+ const anchor = nextIndex + 1 < l2 ? (
9602
+ // #13559, fallback to el placeholder for unresolved async component
9603
+ anchorVNode.el || anchorVNode.placeholder
9604
+ ) : parentAnchor;
9565
9605
  if (newIndexToOldIndexMap[i] === 0) {
9566
9606
  patch(
9567
9607
  null,
@@ -9626,6 +9666,12 @@ If you want to remount the same app, move your app creation logic into a factory
9626
9666
  }
9627
9667
  };
9628
9668
  const performLeave = () => {
9669
+ if (el._isLeaving) {
9670
+ el[leaveCbKey](
9671
+ true
9672
+ /* cancelled */
9673
+ );
9674
+ }
9629
9675
  leave(el, () => {
9630
9676
  remove2();
9631
9677
  afterLeave && afterLeave();
@@ -9771,27 +9817,12 @@ If you want to remount the same app, move your app creation logic into a factory
9771
9817
  if (instance.type.__hmrId) {
9772
9818
  unregisterHMR(instance);
9773
9819
  }
9774
- const {
9775
- bum,
9776
- scope,
9777
- job,
9778
- subTree,
9779
- um,
9780
- m,
9781
- a,
9782
- parent,
9783
- slots: { __: slotCacheKeys }
9784
- } = instance;
9820
+ const { bum, scope, job, subTree, um, m, a } = instance;
9785
9821
  invalidateMount(m);
9786
9822
  invalidateMount(a);
9787
9823
  if (bum) {
9788
9824
  invokeArrayFns(bum);
9789
9825
  }
9790
- if (parent && isArray(slotCacheKeys)) {
9791
- slotCacheKeys.forEach((v) => {
9792
- parent.renderCache[v] = void 0;
9793
- });
9794
- }
9795
9826
  if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) {
9796
9827
  instance.emit("hook:beforeDestroy");
9797
9828
  }
@@ -9812,12 +9843,6 @@ If you want to remount the same app, move your app creation logic into a factory
9812
9843
  queuePostRenderEffect(() => {
9813
9844
  instance.isUnmounted = true;
9814
9845
  }, parentSuspense);
9815
- if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) {
9816
- parentSuspense.deps--;
9817
- if (parentSuspense.deps === 0) {
9818
- parentSuspense.resolve();
9819
- }
9820
- }
9821
9846
  {
9822
9847
  devtoolsComponentRemoved(instance);
9823
9848
  }
@@ -9918,7 +9943,8 @@ If you want to remount the same app, move your app creation logic into a factory
9918
9943
  if (!shallow && c2.patchFlag !== -2)
9919
9944
  traverseStaticChildren(c1, c2);
9920
9945
  }
9921
- if (c2.type === Text) {
9946
+ if (c2.type === Text && // avoid cached text nodes retaining detached dom nodes
9947
+ c2.patchFlag !== -1) {
9922
9948
  c2.el = c1.el;
9923
9949
  }
9924
9950
  if (c2.type === Comment && !c2.el) {
@@ -11528,6 +11554,7 @@ Component that was made reactive: `,
11528
11554
  suspense: vnode.suspense,
11529
11555
  ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
11530
11556
  ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
11557
+ placeholder: vnode.placeholder,
11531
11558
  el: vnode.el,
11532
11559
  anchor: vnode.anchor,
11533
11560
  ctx: vnode.ctx,
@@ -12320,7 +12347,7 @@ Component that was made reactive: `,
12320
12347
  return true;
12321
12348
  }
12322
12349
 
12323
- const version = "3.5.17";
12350
+ const version = "3.5.19";
12324
12351
  const warn = warn$1 ;
12325
12352
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12326
12353
  const devtools = devtools$1 ;
@@ -12858,8 +12885,9 @@ Component that was made reactive: `,
12858
12885
  const style = el.style;
12859
12886
  let cssText = "";
12860
12887
  for (const key in vars) {
12861
- style.setProperty(`--${key}`, vars[key]);
12862
- cssText += `--${key}: ${vars[key]};`;
12888
+ const value = normalizeCssVarValue(vars[key]);
12889
+ style.setProperty(`--${key}`, value);
12890
+ cssText += `--${key}: ${value};`;
12863
12891
  }
12864
12892
  style[CSS_VAR_TEXT] = cssText;
12865
12893
  }
@@ -13245,10 +13273,10 @@ Expected function or array of functions, received type ${typeof value}.`
13245
13273
  VueCustomElement.def = Comp;
13246
13274
  return VueCustomElement;
13247
13275
  }
13248
- /*! #__NO_SIDE_EFFECTS__ */
13249
- const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {
13276
+
13277
+ const defineSSRCustomElement = (/* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {
13250
13278
  return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp);
13251
- };
13279
+ });
13252
13280
  const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
13253
13281
  };
13254
13282
  class VueElement extends BaseClass {
@@ -14072,13 +14100,13 @@ Expected function or array of functions, received type ${typeof value}.`
14072
14100
  const withModifiers = (fn, modifiers) => {
14073
14101
  const cache = fn._withMods || (fn._withMods = {});
14074
14102
  const cacheKey = modifiers.join(".");
14075
- return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => {
14103
+ return cache[cacheKey] || (cache[cacheKey] = ((event, ...args) => {
14076
14104
  for (let i = 0; i < modifiers.length; i++) {
14077
14105
  const guard = modifierGuards[modifiers[i]];
14078
14106
  if (guard && guard(event, modifiers)) return;
14079
14107
  }
14080
14108
  return fn(event, ...args);
14081
- });
14109
+ }));
14082
14110
  };
14083
14111
  const keyNames = {
14084
14112
  esc: "escape",
@@ -14108,7 +14136,7 @@ Expected function or array of functions, received type ${typeof value}.`
14108
14136
  }
14109
14137
  const cache = fn._withKeys || (fn._withKeys = {});
14110
14138
  const cacheKey = modifiers.join(".");
14111
- return cache[cacheKey] || (cache[cacheKey] = (event) => {
14139
+ return cache[cacheKey] || (cache[cacheKey] = ((event) => {
14112
14140
  if (!("key" in event)) {
14113
14141
  return;
14114
14142
  }
@@ -14138,7 +14166,7 @@ Expected function or array of functions, received type ${typeof value}.`
14138
14166
  }
14139
14167
  }
14140
14168
  }
14141
- });
14169
+ }));
14142
14170
  };
14143
14171
 
14144
14172
  const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
@@ -14152,13 +14180,13 @@ Expected function or array of functions, received type ${typeof value}.`
14152
14180
  enabledHydration = true;
14153
14181
  return renderer;
14154
14182
  }
14155
- const render = (...args) => {
14183
+ const render = ((...args) => {
14156
14184
  ensureRenderer().render(...args);
14157
- };
14158
- const hydrate = (...args) => {
14185
+ });
14186
+ const hydrate = ((...args) => {
14159
14187
  ensureHydrationRenderer().hydrate(...args);
14160
- };
14161
- const createApp = (...args) => {
14188
+ });
14189
+ const createApp = ((...args) => {
14162
14190
  const app = ensureRenderer().createApp(...args);
14163
14191
  {
14164
14192
  injectNativeTagCheck(app);
@@ -14195,8 +14223,8 @@ Expected function or array of functions, received type ${typeof value}.`
14195
14223
  return proxy;
14196
14224
  };
14197
14225
  return app;
14198
- };
14199
- const createSSRApp = (...args) => {
14226
+ });
14227
+ const createSSRApp = ((...args) => {
14200
14228
  const app = ensureHydrationRenderer().createApp(...args);
14201
14229
  {
14202
14230
  injectNativeTagCheck(app);
@@ -14210,7 +14238,7 @@ Expected function or array of functions, received type ${typeof value}.`
14210
14238
  }
14211
14239
  };
14212
14240
  return app;
14213
- };
14241
+ });
14214
14242
  function resolveRootNamespace(container) {
14215
14243
  if (container instanceof SVGElement) {
14216
14244
  return "svg";
@@ -15709,7 +15737,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15709
15737
  return BASE_TRANSITION;
15710
15738
  }
15711
15739
  }
15712
- const nonIdentifierRE = /^\d|[^\$\w\xA0-\uFFFF]/;
15740
+ const nonIdentifierRE = /^$|^\d|[^\$\w\xA0-\uFFFF]/;
15713
15741
  const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name);
15714
15742
  const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/;
15715
15743
  const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/;
@@ -15821,6 +15849,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15821
15849
  function isText$1(node) {
15822
15850
  return node.type === 5 || node.type === 2;
15823
15851
  }
15852
+ function isVPre(p) {
15853
+ return p.type === 7 && p.name === "pre";
15854
+ }
15824
15855
  function isVSlot(p) {
15825
15856
  return p.type === 7 && p.name === "slot";
15826
15857
  }
@@ -16079,7 +16110,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16079
16110
  ondirarg(start, end) {
16080
16111
  if (start === end) return;
16081
16112
  const arg = getSlice(start, end);
16082
- if (inVPre) {
16113
+ if (inVPre && !isVPre(currentProp)) {
16083
16114
  currentProp.name += arg;
16084
16115
  setLocEnd(currentProp.nameLoc, end);
16085
16116
  } else {
@@ -16094,7 +16125,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16094
16125
  },
16095
16126
  ondirmodifier(start, end) {
16096
16127
  const mod = getSlice(start, end);
16097
- if (inVPre) {
16128
+ if (inVPre && !isVPre(currentProp)) {
16098
16129
  currentProp.name += "." + mod;
16099
16130
  setLocEnd(currentProp.nameLoc, end);
16100
16131
  } else if (currentProp.name === "slot") {
@@ -16722,6 +16753,11 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16722
16753
  } else if (child.type === 12) {
16723
16754
  const constantType = doNotHoistNode ? 0 : getConstantType(child, context);
16724
16755
  if (constantType >= 2) {
16756
+ if (child.codegenNode.type === 14 && child.codegenNode.arguments.length > 0) {
16757
+ child.codegenNode.arguments.push(
16758
+ -1 + (` /* ${PatchFlagNames[-1]} */` )
16759
+ );
16760
+ }
16725
16761
  toCache.push(child);
16726
16762
  continue;
16727
16763
  }
@@ -16750,7 +16786,6 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16750
16786
  }
16751
16787
  }
16752
16788
  let cachedAsArray = false;
16753
- const slotCacheKeys = [];
16754
16789
  if (toCache.length === children.length && node.type === 1) {
16755
16790
  if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) {
16756
16791
  node.codegenNode.children = getCacheExpression(
@@ -16760,7 +16795,6 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16760
16795
  } else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) {
16761
16796
  const slot = getSlotNode(node.codegenNode, "default");
16762
16797
  if (slot) {
16763
- slotCacheKeys.push(context.cached.length);
16764
16798
  slot.returns = getCacheExpression(
16765
16799
  createArrayExpression(slot.returns)
16766
16800
  );
@@ -16770,7 +16804,6 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16770
16804
  const slotName = findDir(node, "slot", true);
16771
16805
  const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg);
16772
16806
  if (slot) {
16773
- slotCacheKeys.push(context.cached.length);
16774
16807
  slot.returns = getCacheExpression(
16775
16808
  createArrayExpression(slot.returns)
16776
16809
  );
@@ -16780,23 +16813,12 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16780
16813
  }
16781
16814
  if (!cachedAsArray) {
16782
16815
  for (const child of toCache) {
16783
- slotCacheKeys.push(context.cached.length);
16784
16816
  child.codegenNode = context.cache(child.codegenNode);
16785
16817
  }
16786
16818
  }
16787
- if (slotCacheKeys.length && node.type === 1 && node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) {
16788
- node.codegenNode.children.properties.push(
16789
- createObjectProperty(
16790
- `__`,
16791
- createSimpleExpression(JSON.stringify(slotCacheKeys), false)
16792
- )
16793
- );
16794
- }
16795
16819
  function getCacheExpression(value) {
16796
16820
  const exp = context.cache(value);
16797
- if (inFor && context.hmr) {
16798
- exp.needArraySpread = true;
16799
- }
16821
+ exp.needArraySpread = true;
16800
16822
  return exp;
16801
16823
  }
16802
16824
  function getSlotNode(node2, name) {
@@ -17992,7 +18014,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17992
18014
  continue;
17993
18015
  }
17994
18016
  if (sibling && sibling.type === 9) {
17995
- if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) {
18017
+ if ((dir.name === "else-if" || dir.name === "else") && sibling.branches[sibling.branches.length - 1].condition === void 0) {
17996
18018
  context.onError(
17997
18019
  createCompilerError(30, node.loc)
17998
18020
  );
@@ -18171,7 +18193,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
18171
18193
  arg.children.unshift(`(`);
18172
18194
  arg.children.push(`) || ""`);
18173
18195
  } else if (!arg.isStatic) {
18174
- arg.content = `${arg.content} || ""`;
18196
+ arg.content = arg.content ? `${arg.content} || ""` : `""`;
18175
18197
  }
18176
18198
  if (modifiers.some((mod) => mod.content === "camel")) {
18177
18199
  if (arg.type === 4) {
@@ -19690,7 +19712,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
19690
19712
  const transformMemo = (node, context) => {
19691
19713
  if (node.type === 1) {
19692
19714
  const dir = findDir(node, "memo");
19693
- if (!dir || seen.has(node)) {
19715
+ if (!dir || seen.has(node) || context.inSSR) {
19694
19716
  return;
19695
19717
  }
19696
19718
  seen.add(node);