@vue/compat 3.4.20 → 3.4.22

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,8 +1,10 @@
1
1
  /**
2
- * @vue/compat v3.4.20
2
+ * @vue/compat v3.4.22
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
6
+ /*! #__NO_SIDE_EFFECTS__ */
7
+ // @__NO_SIDE_EFFECTS__
6
8
  function makeMap(str, expectsLowerCase) {
7
9
  const set = new Set(str.split(","));
8
10
  return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val);
@@ -354,7 +356,11 @@ const replacer = (_key, val) => {
354
356
  };
355
357
  const stringifySymbol = (v, i = "") => {
356
358
  var _a;
357
- return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v;
359
+ return (
360
+ // Symbol.description in es2019+ so we need to cast here to pass
361
+ // the lib: es2016 check
362
+ isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v
363
+ );
358
364
  };
359
365
 
360
366
  function warn$2(msg, ...args) {
@@ -790,6 +796,8 @@ function createArrayInstrumentations() {
790
796
  return instrumentations;
791
797
  }
792
798
  function hasOwnProperty(key) {
799
+ if (!isSymbol(key))
800
+ key = String(key);
793
801
  const obj = toRaw(this);
794
802
  track(obj, "has", key);
795
803
  return obj.hasOwnProperty(key);
@@ -1142,23 +1150,16 @@ function createInstrumentations() {
1142
1150
  clear: createReadonlyMethod("clear"),
1143
1151
  forEach: createForEach(true, true)
1144
1152
  };
1145
- const iteratorMethods = ["keys", "values", "entries", Symbol.iterator];
1153
+ const iteratorMethods = [
1154
+ "keys",
1155
+ "values",
1156
+ "entries",
1157
+ Symbol.iterator
1158
+ ];
1146
1159
  iteratorMethods.forEach((method) => {
1147
- mutableInstrumentations2[method] = createIterableMethod(
1148
- method,
1149
- false,
1150
- false
1151
- );
1152
- readonlyInstrumentations2[method] = createIterableMethod(
1153
- method,
1154
- true,
1155
- false
1156
- );
1157
- shallowInstrumentations2[method] = createIterableMethod(
1158
- method,
1159
- false,
1160
- true
1161
- );
1160
+ mutableInstrumentations2[method] = createIterableMethod(method, false, false);
1161
+ readonlyInstrumentations2[method] = createIterableMethod(method, true, false);
1162
+ shallowInstrumentations2[method] = createIterableMethod(method, false, true);
1162
1163
  shallowReadonlyInstrumentations2[method] = createIterableMethod(
1163
1164
  method,
1164
1165
  true,
@@ -1315,7 +1316,7 @@ function isShallow(value) {
1315
1316
  return !!(value && value["__v_isShallow"]);
1316
1317
  }
1317
1318
  function isProxy(value) {
1318
- return isReactive(value) || isReadonly(value);
1319
+ return value ? !!value["__v_raw"] : false;
1319
1320
  }
1320
1321
  function toRaw(observed) {
1321
1322
  const raw = observed && observed["__v_raw"];
@@ -1598,7 +1599,10 @@ function warn$1(msg, ...args) {
1598
1599
  instance,
1599
1600
  11,
1600
1601
  [
1601
- msg + args.join(""),
1602
+ msg + args.map((a) => {
1603
+ var _a, _b;
1604
+ return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);
1605
+ }).join(""),
1602
1606
  instance && instance.proxy,
1603
1607
  trace.map(
1604
1608
  ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`
@@ -1774,11 +1778,17 @@ function callWithAsyncErrorHandling(fn, instance, type, args) {
1774
1778
  }
1775
1779
  return res;
1776
1780
  }
1777
- const values = [];
1778
- for (let i = 0; i < fn.length; i++) {
1779
- values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
1781
+ if (isArray(fn)) {
1782
+ const values = [];
1783
+ for (let i = 0; i < fn.length; i++) {
1784
+ values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
1785
+ }
1786
+ return values;
1787
+ } else {
1788
+ warn$1(
1789
+ `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}`
1790
+ );
1780
1791
  }
1781
- return values;
1782
1792
  }
1783
1793
  function handleError(err, instance, type, throwInDev = true) {
1784
1794
  const contextVNode = instance ? instance.vnode : null;
@@ -1799,12 +1809,14 @@ function handleError(err, instance, type, throwInDev = true) {
1799
1809
  }
1800
1810
  const appErrorHandler = instance.appContext.config.errorHandler;
1801
1811
  if (appErrorHandler) {
1812
+ pauseTracking();
1802
1813
  callWithErrorHandling(
1803
1814
  appErrorHandler,
1804
1815
  null,
1805
1816
  10,
1806
1817
  [err, exposedInstance, errorInfo]
1807
1818
  );
1819
+ resetTracking();
1808
1820
  return;
1809
1821
  }
1810
1822
  }
@@ -2180,6 +2192,8 @@ const devtoolsComponentRemoved = (component) => {
2180
2192
  _devtoolsComponentRemoved(component);
2181
2193
  }
2182
2194
  };
2195
+ /*! #__NO_SIDE_EFFECTS__ */
2196
+ // @__NO_SIDE_EFFECTS__
2183
2197
  function createDevtoolsComponentHook(hook) {
2184
2198
  return (component) => {
2185
2199
  emit$2(
@@ -3286,7 +3300,7 @@ const SuspenseImpl = {
3286
3300
  rendererInternals
3287
3301
  );
3288
3302
  } else {
3289
- if (parentSuspense && parentSuspense.deps > 0) {
3303
+ if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
3290
3304
  n2.suspense = n1.suspense;
3291
3305
  n2.suspense.vnode = n2;
3292
3306
  n2.el = n1.el;
@@ -4831,7 +4845,7 @@ const KeepAliveImpl = {
4831
4845
  return () => {
4832
4846
  pendingCacheKey = null;
4833
4847
  if (!slots.default) {
4834
- return null;
4848
+ return current = null;
4835
4849
  }
4836
4850
  const children = slots.default();
4837
4851
  const rawVNode = children[0];
@@ -5562,47 +5576,74 @@ function installCompatInstanceProperties(map) {
5562
5576
  $once: (i) => once.bind(null, i),
5563
5577
  $off: (i) => off.bind(null, i),
5564
5578
  $children: getCompatChildren,
5565
- $listeners: getCompatListeners
5579
+ $listeners: getCompatListeners,
5580
+ // inject additional properties into $options for compat
5581
+ // e.g. vuex needs this.$options.parent
5582
+ $options: (i) => {
5583
+ if (!isCompatEnabled$1("PRIVATE_APIS", i)) {
5584
+ return resolveMergedOptions(i);
5585
+ }
5586
+ if (i.resolvedOptions) {
5587
+ return i.resolvedOptions;
5588
+ }
5589
+ const res = i.resolvedOptions = extend({}, resolveMergedOptions(i));
5590
+ Object.defineProperties(res, {
5591
+ parent: {
5592
+ get() {
5593
+ warnDeprecation$1("PRIVATE_APIS", i, "$options.parent");
5594
+ return i.proxy.$parent;
5595
+ }
5596
+ },
5597
+ propsData: {
5598
+ get() {
5599
+ warnDeprecation$1(
5600
+ "PRIVATE_APIS",
5601
+ i,
5602
+ "$options.propsData"
5603
+ );
5604
+ return i.vnode.props;
5605
+ }
5606
+ }
5607
+ });
5608
+ return res;
5609
+ }
5566
5610
  });
5567
- if (isCompatEnabled$1("PRIVATE_APIS", null)) {
5568
- extend(map, {
5569
- // needed by many libs / render fns
5570
- $vnode: (i) => i.vnode,
5571
- // inject additional properties into $options for compat
5572
- // e.g. vuex needs this.$options.parent
5573
- $options: (i) => {
5574
- const res = extend({}, resolveMergedOptions(i));
5575
- res.parent = i.proxy.$parent;
5576
- res.propsData = i.vnode.props;
5577
- return res;
5578
- },
5579
- // some private properties that are likely accessed...
5580
- _self: (i) => i.proxy,
5581
- _uid: (i) => i.uid,
5582
- _data: (i) => i.data,
5583
- _isMounted: (i) => i.isMounted,
5584
- _isDestroyed: (i) => i.isUnmounted,
5585
- // v2 render helpers
5586
- $createElement: () => compatH,
5587
- _c: () => compatH,
5588
- _o: () => legacyMarkOnce,
5589
- _n: () => looseToNumber,
5590
- _s: () => toDisplayString,
5591
- _l: () => renderList,
5592
- _t: (i) => legacyRenderSlot.bind(null, i),
5593
- _q: () => looseEqual,
5594
- _i: () => looseIndexOf,
5595
- _m: (i) => legacyRenderStatic.bind(null, i),
5596
- _f: () => resolveFilter$1,
5597
- _k: (i) => legacyCheckKeyCodes.bind(null, i),
5598
- _b: () => legacyBindObjectProps,
5599
- _v: () => createTextVNode,
5600
- _e: () => createCommentVNode,
5601
- _u: () => legacyresolveScopedSlots,
5602
- _g: () => legacyBindObjectListeners,
5603
- _d: () => legacyBindDynamicKeys,
5604
- _p: () => legacyPrependModifier
5605
- });
5611
+ const privateAPIs = {
5612
+ // needed by many libs / render fns
5613
+ $vnode: (i) => i.vnode,
5614
+ // some private properties that are likely accessed...
5615
+ _self: (i) => i.proxy,
5616
+ _uid: (i) => i.uid,
5617
+ _data: (i) => i.data,
5618
+ _isMounted: (i) => i.isMounted,
5619
+ _isDestroyed: (i) => i.isUnmounted,
5620
+ // v2 render helpers
5621
+ $createElement: () => compatH,
5622
+ _c: () => compatH,
5623
+ _o: () => legacyMarkOnce,
5624
+ _n: () => looseToNumber,
5625
+ _s: () => toDisplayString,
5626
+ _l: () => renderList,
5627
+ _t: (i) => legacyRenderSlot.bind(null, i),
5628
+ _q: () => looseEqual,
5629
+ _i: () => looseIndexOf,
5630
+ _m: (i) => legacyRenderStatic.bind(null, i),
5631
+ _f: () => resolveFilter$1,
5632
+ _k: (i) => legacyCheckKeyCodes.bind(null, i),
5633
+ _b: () => legacyBindObjectProps,
5634
+ _v: () => createTextVNode,
5635
+ _e: () => createCommentVNode,
5636
+ _u: () => legacyresolveScopedSlots,
5637
+ _g: () => legacyBindObjectListeners,
5638
+ _d: () => legacyBindDynamicKeys,
5639
+ _p: () => legacyPrependModifier
5640
+ };
5641
+ for (const key in privateAPIs) {
5642
+ map[key] = (i) => {
5643
+ if (isCompatEnabled$1("PRIVATE_APIS", i)) {
5644
+ return privateAPIs[key](i);
5645
+ }
5646
+ };
5606
5647
  }
5607
5648
  }
5608
5649
 
@@ -5643,6 +5684,9 @@ const isReservedPrefix = (key) => key === "_" || key === "$";
5643
5684
  const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
5644
5685
  const PublicInstanceProxyHandlers = {
5645
5686
  get({ _: instance }, key) {
5687
+ if (key === "__v_skip") {
5688
+ return true;
5689
+ }
5646
5690
  const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
5647
5691
  if (key === "__isVue") {
5648
5692
  return true;
@@ -6497,7 +6541,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6497
6541
  return vm;
6498
6542
  }
6499
6543
  }
6500
- Vue.version = `2.6.14-compat:${"3.4.20"}`;
6544
+ Vue.version = `2.6.14-compat:${"3.4.22"}`;
6501
6545
  Vue.config = singletonApp.config;
6502
6546
  Vue.use = (p, ...options) => {
6503
6547
  if (p && isFunction(p.install)) {
@@ -6691,15 +6735,14 @@ function applySingletonPrototype(app, Ctor) {
6691
6735
  app.config.globalProperties = Object.create(Ctor.prototype);
6692
6736
  }
6693
6737
  let hasPrototypeAugmentations = false;
6694
- const descriptors = Object.getOwnPropertyDescriptors(Ctor.prototype);
6695
- for (const key in descriptors) {
6738
+ for (const key of Object.getOwnPropertyNames(Ctor.prototype)) {
6696
6739
  if (key !== "constructor") {
6697
6740
  hasPrototypeAugmentations = true;
6698
6741
  if (enabled) {
6699
6742
  Object.defineProperty(
6700
6743
  app.config.globalProperties,
6701
6744
  key,
6702
- descriptors[key]
6745
+ Object.getOwnPropertyDescriptor(Ctor.prototype, key)
6703
6746
  );
6704
6747
  }
6705
6748
  }
@@ -7135,10 +7178,10 @@ function shouldSkipAttr(key, instance) {
7135
7178
  return false;
7136
7179
  }
7137
7180
 
7181
+ const attrsProto = {};
7138
7182
  function initProps(instance, rawProps, isStateful, isSSR = false) {
7139
7183
  const props = {};
7140
- const attrs = {};
7141
- def(attrs, InternalObjectKey, 1);
7184
+ const attrs = Object.create(attrsProto);
7142
7185
  instance.propsDefaults = /* @__PURE__ */ Object.create(null);
7143
7186
  setFullProps(instance, rawProps, props, attrs);
7144
7187
  for (const key in instance.propsOptions[0]) {
@@ -7260,7 +7303,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
7260
7303
  }
7261
7304
  }
7262
7305
  if (hasAttrsChanged) {
7263
- trigger(instance, "set", "$attrs");
7306
+ trigger(instance.attrs, "set", "");
7264
7307
  }
7265
7308
  {
7266
7309
  validateProps(rawProps || {}, props, instance);
@@ -7618,7 +7661,7 @@ const initSlots = (instance, children) => {
7618
7661
  const type = children._;
7619
7662
  if (type) {
7620
7663
  instance.slots = toRaw(children);
7621
- def(children, "_", type);
7664
+ def(instance.slots, "_", type);
7622
7665
  } else {
7623
7666
  normalizeObjectSlots(
7624
7667
  children,
@@ -7632,7 +7675,6 @@ const initSlots = (instance, children) => {
7632
7675
  normalizeVNodeSlots(instance, children);
7633
7676
  }
7634
7677
  }
7635
- def(instance.slots, InternalObjectKey, 1);
7636
7678
  };
7637
7679
  const updateSlots = (instance, children, optimized) => {
7638
7680
  const { vnode, slots } = instance;
@@ -7804,6 +7846,7 @@ function createHydrationFunctions(rendererInternals) {
7804
7846
  }
7805
7847
  };
7806
7848
  const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
7849
+ optimized = optimized || !!vnode.dynamicChildren;
7807
7850
  const isFragmentStart = isComment(node) && node.data === "[";
7808
7851
  const onMismatch = () => handleMismatch(
7809
7852
  node,
@@ -10323,7 +10366,6 @@ const createVNodeWithArgsTransform = (...args) => {
10323
10366
  ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args
10324
10367
  );
10325
10368
  };
10326
- const InternalObjectKey = `__vInternal`;
10327
10369
  const normalizeKey = ({ key }) => key != null ? key : null;
10328
10370
  const normalizeRef = ({
10329
10371
  ref,
@@ -10463,7 +10505,7 @@ Component that was made reactive: `,
10463
10505
  function guardReactiveProps(props) {
10464
10506
  if (!props)
10465
10507
  return null;
10466
- return isProxy(props) || InternalObjectKey in props ? extend({}, props) : props;
10508
+ return isProxy(props) || Object.getPrototypeOf(props) === attrsProto ? extend({}, props) : props;
10467
10509
  }
10468
10510
  function cloneVNode(vnode, extraProps, mergeRef = false) {
10469
10511
  const { props, ref, patchFlag, children } = vnode;
@@ -10571,7 +10613,7 @@ function normalizeChildren(vnode, children) {
10571
10613
  } else {
10572
10614
  type = 32;
10573
10615
  const slotFlag = children._;
10574
- if (!slotFlag && !(InternalObjectKey in children)) {
10616
+ if (!slotFlag) {
10575
10617
  children._ctx = currentRenderingInstance;
10576
10618
  } else if (slotFlag === 3 && currentRenderingInstance) {
10577
10619
  if (currentRenderingInstance.slots._ === 1) {
@@ -10792,7 +10834,7 @@ function setupStatefulComponent(instance, isSSR) {
10792
10834
  }
10793
10835
  }
10794
10836
  instance.accessCache = /* @__PURE__ */ Object.create(null);
10795
- instance.proxy = markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers));
10837
+ instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
10796
10838
  {
10797
10839
  exposePropsOnRenderContext(instance);
10798
10840
  }
@@ -10936,26 +10978,21 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
10936
10978
  }
10937
10979
  }
10938
10980
  }
10939
- function getAttrsProxy(instance) {
10940
- return instance.attrsProxy || (instance.attrsProxy = new Proxy(
10941
- instance.attrs,
10942
- {
10943
- get(target, key) {
10944
- markAttrsAccessed();
10945
- track(instance, "get", "$attrs");
10946
- return target[key];
10947
- },
10948
- set() {
10949
- warn$1(`setupContext.attrs is readonly.`);
10950
- return false;
10951
- },
10952
- deleteProperty() {
10953
- warn$1(`setupContext.attrs is readonly.`);
10954
- return false;
10955
- }
10956
- }
10957
- ));
10958
- }
10981
+ const attrsProxyHandlers = {
10982
+ get(target, key) {
10983
+ markAttrsAccessed();
10984
+ track(target, "get", "");
10985
+ return target[key];
10986
+ },
10987
+ set() {
10988
+ warn$1(`setupContext.attrs is readonly.`);
10989
+ return false;
10990
+ },
10991
+ deleteProperty() {
10992
+ warn$1(`setupContext.attrs is readonly.`);
10993
+ return false;
10994
+ }
10995
+ } ;
10959
10996
  function getSlotsProxy(instance) {
10960
10997
  return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, {
10961
10998
  get(target, key) {
@@ -10989,9 +11026,10 @@ function createSetupContext(instance) {
10989
11026
  instance.exposed = exposed || {};
10990
11027
  };
10991
11028
  {
11029
+ let attrsProxy;
10992
11030
  return Object.freeze({
10993
11031
  get attrs() {
10994
- return getAttrsProxy(instance);
11032
+ return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers));
10995
11033
  },
10996
11034
  get slots() {
10997
11035
  return getSlotsProxy(instance);
@@ -11336,7 +11374,7 @@ function isMemoSame(cached, memo) {
11336
11374
  return true;
11337
11375
  }
11338
11376
 
11339
- const version = "3.4.20";
11377
+ const version = "3.4.22";
11340
11378
  const warn = warn$1 ;
11341
11379
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11342
11380
  const devtools = devtools$1 ;
@@ -11806,8 +11844,8 @@ function useCssVars(getter) {
11806
11844
  setVarsOnVNode(instance.subTree, vars);
11807
11845
  updateTeleports(vars);
11808
11846
  };
11809
- watchPostEffect(setVars);
11810
11847
  onMounted(() => {
11848
+ watchPostEffect(setVars);
11811
11849
  const ob = new MutationObserver(setVars);
11812
11850
  ob.observe(instance.subTree.el.parentNode, { childList: true });
11813
11851
  onUnmounted(() => ob.disconnect());
@@ -12009,15 +12047,15 @@ function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspe
12009
12047
  const tag = el.tagName;
12010
12048
  if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
12011
12049
  !tag.includes("-")) {
12012
- el._value = value;
12013
12050
  const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value;
12014
12051
  const newValue = value == null ? "" : value;
12015
- if (oldValue !== newValue) {
12052
+ if (oldValue !== newValue || !("_value" in el)) {
12016
12053
  el.value = newValue;
12017
12054
  }
12018
12055
  if (value == null) {
12019
12056
  el.removeAttribute(key);
12020
12057
  }
12058
+ el._value = value;
12021
12059
  return;
12022
12060
  }
12023
12061
  let needRemove = false;
@@ -12073,11 +12111,14 @@ function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
12073
12111
  const invokers = el[veiKey] || (el[veiKey] = {});
12074
12112
  const existingInvoker = invokers[rawName];
12075
12113
  if (nextValue && existingInvoker) {
12076
- existingInvoker.value = nextValue;
12114
+ existingInvoker.value = sanitizeEventValue(nextValue, rawName) ;
12077
12115
  } else {
12078
12116
  const [name, options] = parseName(rawName);
12079
12117
  if (nextValue) {
12080
- const invoker = invokers[rawName] = createInvoker(nextValue, instance);
12118
+ const invoker = invokers[rawName] = createInvoker(
12119
+ sanitizeEventValue(nextValue, rawName) ,
12120
+ instance
12121
+ );
12081
12122
  addEventListener(el, name, invoker, options);
12082
12123
  } else if (existingInvoker) {
12083
12124
  removeEventListener(el, name, existingInvoker, options);
@@ -12120,6 +12161,16 @@ function createInvoker(initialValue, instance) {
12120
12161
  invoker.attached = getNow();
12121
12162
  return invoker;
12122
12163
  }
12164
+ function sanitizeEventValue(value, propName) {
12165
+ if (isFunction(value) || isArray(value)) {
12166
+ return value;
12167
+ }
12168
+ warn(
12169
+ `Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop?
12170
+ Expected function or array of functions, received type ${typeof value}.`
12171
+ );
12172
+ return NOOP;
12173
+ }
12123
12174
  function patchStopImmediatePropagation(e, value) {
12124
12175
  if (isArray(value)) {
12125
12176
  const originalStop = e.stopImmediatePropagation;
@@ -12127,7 +12178,9 @@ function patchStopImmediatePropagation(e, value) {
12127
12178
  originalStop.call(e);
12128
12179
  e._stopped = true;
12129
12180
  };
12130
- return value.map((fn) => (e2) => !e2._stopped && fn && fn(e2));
12181
+ return value.map(
12182
+ (fn) => (e2) => !e2._stopped && fn && fn(e2)
12183
+ );
12131
12184
  } else {
12132
12185
  return value;
12133
12186
  }
@@ -12328,7 +12381,7 @@ class VueElement extends BaseClass {
12328
12381
  }
12329
12382
  }
12330
12383
  _setAttr(key) {
12331
- let value = this.getAttribute(key);
12384
+ let value = this.hasAttribute(key) ? this.getAttribute(key) : void 0;
12332
12385
  const camelKey = camelize(key);
12333
12386
  if (this._numberProps && this._numberProps[camelKey]) {
12334
12387
  value = toNumber(value);
@@ -12500,7 +12553,28 @@ const TransitionGroupImpl = {
12500
12553
  )) {
12501
12554
  tag = "span";
12502
12555
  }
12503
- prevChildren = children;
12556
+ prevChildren = [];
12557
+ if (children) {
12558
+ for (let i = 0; i < children.length; i++) {
12559
+ const child = children[i];
12560
+ if (child.el && child.el instanceof Element) {
12561
+ prevChildren.push(child);
12562
+ setTransitionHooks(
12563
+ child,
12564
+ resolveTransitionHooks(
12565
+ child,
12566
+ cssTransitionProps,
12567
+ state,
12568
+ instance
12569
+ )
12570
+ );
12571
+ positionMap.set(
12572
+ child,
12573
+ child.el.getBoundingClientRect()
12574
+ );
12575
+ }
12576
+ }
12577
+ }
12504
12578
  children = slots.default ? getTransitionRawChildren(slots.default()) : [];
12505
12579
  for (let i = 0; i < children.length; i++) {
12506
12580
  const child = children[i];
@@ -12513,16 +12587,6 @@ const TransitionGroupImpl = {
12513
12587
  warn(`<TransitionGroup> children must be keyed.`);
12514
12588
  }
12515
12589
  }
12516
- if (prevChildren) {
12517
- for (let i = 0; i < prevChildren.length; i++) {
12518
- const child = prevChildren[i];
12519
- setTransitionHooks(
12520
- child,
12521
- resolveTransitionHooks(child, cssTransitionProps, state, instance)
12522
- );
12523
- positionMap.set(child, child.el.getBoundingClientRect());
12524
- }
12525
- }
12526
12590
  return createVNode(tag, null, children);
12527
12591
  };
12528
12592
  }
@@ -12624,7 +12688,7 @@ const vModelText = {
12624
12688
  el[assignKey] = getModelAssigner(vnode);
12625
12689
  if (el.composing)
12626
12690
  return;
12627
- const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value;
12691
+ const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value;
12628
12692
  const newValue = value == null ? "" : value;
12629
12693
  if (elValue === newValue) {
12630
12694
  return;
@@ -12727,14 +12791,14 @@ const vModelSelect = {
12727
12791
  // set value in mounted & updated because <select> relies on its children
12728
12792
  // <option>s.
12729
12793
  mounted(el, { value, modifiers: { number } }) {
12730
- setSelected(el, value, number);
12794
+ setSelected(el, value);
12731
12795
  },
12732
12796
  beforeUpdate(el, _binding, vnode) {
12733
12797
  el[assignKey] = getModelAssigner(vnode);
12734
12798
  },
12735
12799
  updated(el, { value, modifiers: { number } }) {
12736
12800
  if (!el._assigning) {
12737
- setSelected(el, value, number);
12801
+ setSelected(el, value);
12738
12802
  }
12739
12803
  }
12740
12804
  };
@@ -12754,9 +12818,7 @@ function setSelected(el, value, number) {
12754
12818
  if (isArrayValue) {
12755
12819
  const optionType = typeof optionValue;
12756
12820
  if (optionType === "string" || optionType === "number") {
12757
- option.selected = value.includes(
12758
- number ? looseToNumber(optionValue) : optionValue
12759
- );
12821
+ option.selected = value.some((v) => String(v) === String(optionValue));
12760
12822
  } else {
12761
12823
  option.selected = looseIndexOf(value, optionValue) > -1;
12762
12824
  }
@@ -15077,7 +15139,7 @@ function onCloseTag(el, end, isImplied = false) {
15077
15139
  if (isImplied) {
15078
15140
  setLocEnd(el.loc, backTrack(end, 60));
15079
15141
  } else {
15080
- setLocEnd(el.loc, end + 1);
15142
+ setLocEnd(el.loc, lookAhead(end, 62) + 1);
15081
15143
  }
15082
15144
  if (tokenizer.inSFCRoot) {
15083
15145
  if (el.children.length) {
@@ -15172,6 +15234,12 @@ function onCloseTag(el, end, isImplied = false) {
15172
15234
  }
15173
15235
  }
15174
15236
  }
15237
+ function lookAhead(index, c) {
15238
+ let i = index;
15239
+ while (currentInput.charCodeAt(i) !== c && i < currentInput.length - 1)
15240
+ i++;
15241
+ return i;
15242
+ }
15175
15243
  function backTrack(index, c) {
15176
15244
  let i = index;
15177
15245
  while (currentInput.charCodeAt(i) !== c && i >= 0)
@@ -17353,13 +17421,27 @@ const transformElement = (node, context) => {
17353
17421
  function resolveComponentType(node, context, ssr = false) {
17354
17422
  let { tag } = node;
17355
17423
  const isExplicitDynamic = isComponentTag(tag);
17356
- const isProp = findProp(node, "is");
17424
+ const isProp = findProp(
17425
+ node,
17426
+ "is",
17427
+ false,
17428
+ true
17429
+ /* allow empty */
17430
+ );
17357
17431
  if (isProp) {
17358
17432
  if (isExplicitDynamic || isCompatEnabled(
17359
17433
  "COMPILER_IS_ON_ELEMENT",
17360
17434
  context
17361
17435
  )) {
17362
- const exp = isProp.type === 6 ? isProp.value && createSimpleExpression(isProp.value.content, true) : isProp.exp;
17436
+ let exp;
17437
+ if (isProp.type === 6) {
17438
+ exp = isProp.value && createSimpleExpression(isProp.value.content, true);
17439
+ } else {
17440
+ exp = isProp.exp;
17441
+ if (!exp) {
17442
+ exp = createSimpleExpression(`is`, false, isProp.loc);
17443
+ }
17444
+ }
17363
17445
  if (exp) {
17364
17446
  return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [
17365
17447
  exp