@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);
@@ -289,7 +291,11 @@ const replacer = (_key, val) => {
289
291
  };
290
292
  const stringifySymbol = (v, i = "") => {
291
293
  var _a;
292
- return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v;
294
+ return (
295
+ // Symbol.description in es2019+ so we need to cast here to pass
296
+ // the lib: es2016 check
297
+ isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v
298
+ );
293
299
  };
294
300
 
295
301
  function warn$2(msg, ...args) {
@@ -725,6 +731,8 @@ function createArrayInstrumentations() {
725
731
  return instrumentations;
726
732
  }
727
733
  function hasOwnProperty(key) {
734
+ if (!isSymbol(key))
735
+ key = String(key);
728
736
  const obj = toRaw(this);
729
737
  track(obj, "has", key);
730
738
  return obj.hasOwnProperty(key);
@@ -1077,23 +1085,16 @@ function createInstrumentations() {
1077
1085
  clear: createReadonlyMethod("clear"),
1078
1086
  forEach: createForEach(true, true)
1079
1087
  };
1080
- const iteratorMethods = ["keys", "values", "entries", Symbol.iterator];
1088
+ const iteratorMethods = [
1089
+ "keys",
1090
+ "values",
1091
+ "entries",
1092
+ Symbol.iterator
1093
+ ];
1081
1094
  iteratorMethods.forEach((method) => {
1082
- mutableInstrumentations2[method] = createIterableMethod(
1083
- method,
1084
- false,
1085
- false
1086
- );
1087
- readonlyInstrumentations2[method] = createIterableMethod(
1088
- method,
1089
- true,
1090
- false
1091
- );
1092
- shallowInstrumentations2[method] = createIterableMethod(
1093
- method,
1094
- false,
1095
- true
1096
- );
1095
+ mutableInstrumentations2[method] = createIterableMethod(method, false, false);
1096
+ readonlyInstrumentations2[method] = createIterableMethod(method, true, false);
1097
+ shallowInstrumentations2[method] = createIterableMethod(method, false, true);
1097
1098
  shallowReadonlyInstrumentations2[method] = createIterableMethod(
1098
1099
  method,
1099
1100
  true,
@@ -1250,7 +1251,7 @@ function isShallow(value) {
1250
1251
  return !!(value && value["__v_isShallow"]);
1251
1252
  }
1252
1253
  function isProxy(value) {
1253
- return isReactive(value) || isReadonly(value);
1254
+ return value ? !!value["__v_raw"] : false;
1254
1255
  }
1255
1256
  function toRaw(observed) {
1256
1257
  const raw = observed && observed["__v_raw"];
@@ -1533,7 +1534,10 @@ function warn$1(msg, ...args) {
1533
1534
  instance,
1534
1535
  11,
1535
1536
  [
1536
- msg + args.join(""),
1537
+ msg + args.map((a) => {
1538
+ var _a, _b;
1539
+ return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);
1540
+ }).join(""),
1537
1541
  instance && instance.proxy,
1538
1542
  trace.map(
1539
1543
  ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`
@@ -1709,11 +1713,17 @@ function callWithAsyncErrorHandling(fn, instance, type, args) {
1709
1713
  }
1710
1714
  return res;
1711
1715
  }
1712
- const values = [];
1713
- for (let i = 0; i < fn.length; i++) {
1714
- values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
1716
+ if (isArray(fn)) {
1717
+ const values = [];
1718
+ for (let i = 0; i < fn.length; i++) {
1719
+ values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
1720
+ }
1721
+ return values;
1722
+ } else {
1723
+ warn$1(
1724
+ `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}`
1725
+ );
1715
1726
  }
1716
- return values;
1717
1727
  }
1718
1728
  function handleError(err, instance, type, throwInDev = true) {
1719
1729
  const contextVNode = instance ? instance.vnode : null;
@@ -1734,12 +1744,14 @@ function handleError(err, instance, type, throwInDev = true) {
1734
1744
  }
1735
1745
  const appErrorHandler = instance.appContext.config.errorHandler;
1736
1746
  if (appErrorHandler) {
1747
+ pauseTracking();
1737
1748
  callWithErrorHandling(
1738
1749
  appErrorHandler,
1739
1750
  null,
1740
1751
  10,
1741
1752
  [err, exposedInstance, errorInfo]
1742
1753
  );
1754
+ resetTracking();
1743
1755
  return;
1744
1756
  }
1745
1757
  }
@@ -2115,6 +2127,8 @@ const devtoolsComponentRemoved = (component) => {
2115
2127
  _devtoolsComponentRemoved(component);
2116
2128
  }
2117
2129
  };
2130
+ /*! #__NO_SIDE_EFFECTS__ */
2131
+ // @__NO_SIDE_EFFECTS__
2118
2132
  function createDevtoolsComponentHook(hook) {
2119
2133
  return (component) => {
2120
2134
  emit$2(
@@ -3221,7 +3235,7 @@ const SuspenseImpl = {
3221
3235
  rendererInternals
3222
3236
  );
3223
3237
  } else {
3224
- if (parentSuspense && parentSuspense.deps > 0) {
3238
+ if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
3225
3239
  n2.suspense = n1.suspense;
3226
3240
  n2.suspense.vnode = n2;
3227
3241
  n2.el = n1.el;
@@ -4766,7 +4780,7 @@ const KeepAliveImpl = {
4766
4780
  return () => {
4767
4781
  pendingCacheKey = null;
4768
4782
  if (!slots.default) {
4769
- return null;
4783
+ return current = null;
4770
4784
  }
4771
4785
  const children = slots.default();
4772
4786
  const rawVNode = children[0];
@@ -5497,47 +5511,74 @@ function installCompatInstanceProperties(map) {
5497
5511
  $once: (i) => once.bind(null, i),
5498
5512
  $off: (i) => off.bind(null, i),
5499
5513
  $children: getCompatChildren,
5500
- $listeners: getCompatListeners
5514
+ $listeners: getCompatListeners,
5515
+ // inject additional properties into $options for compat
5516
+ // e.g. vuex needs this.$options.parent
5517
+ $options: (i) => {
5518
+ if (!isCompatEnabled("PRIVATE_APIS", i)) {
5519
+ return resolveMergedOptions(i);
5520
+ }
5521
+ if (i.resolvedOptions) {
5522
+ return i.resolvedOptions;
5523
+ }
5524
+ const res = i.resolvedOptions = extend({}, resolveMergedOptions(i));
5525
+ Object.defineProperties(res, {
5526
+ parent: {
5527
+ get() {
5528
+ warnDeprecation("PRIVATE_APIS", i, "$options.parent");
5529
+ return i.proxy.$parent;
5530
+ }
5531
+ },
5532
+ propsData: {
5533
+ get() {
5534
+ warnDeprecation(
5535
+ "PRIVATE_APIS",
5536
+ i,
5537
+ "$options.propsData"
5538
+ );
5539
+ return i.vnode.props;
5540
+ }
5541
+ }
5542
+ });
5543
+ return res;
5544
+ }
5501
5545
  });
5502
- if (isCompatEnabled("PRIVATE_APIS", null)) {
5503
- extend(map, {
5504
- // needed by many libs / render fns
5505
- $vnode: (i) => i.vnode,
5506
- // inject additional properties into $options for compat
5507
- // e.g. vuex needs this.$options.parent
5508
- $options: (i) => {
5509
- const res = extend({}, resolveMergedOptions(i));
5510
- res.parent = i.proxy.$parent;
5511
- res.propsData = i.vnode.props;
5512
- return res;
5513
- },
5514
- // some private properties that are likely accessed...
5515
- _self: (i) => i.proxy,
5516
- _uid: (i) => i.uid,
5517
- _data: (i) => i.data,
5518
- _isMounted: (i) => i.isMounted,
5519
- _isDestroyed: (i) => i.isUnmounted,
5520
- // v2 render helpers
5521
- $createElement: () => compatH,
5522
- _c: () => compatH,
5523
- _o: () => legacyMarkOnce,
5524
- _n: () => looseToNumber,
5525
- _s: () => toDisplayString,
5526
- _l: () => renderList,
5527
- _t: (i) => legacyRenderSlot.bind(null, i),
5528
- _q: () => looseEqual,
5529
- _i: () => looseIndexOf,
5530
- _m: (i) => legacyRenderStatic.bind(null, i),
5531
- _f: () => resolveFilter$1,
5532
- _k: (i) => legacyCheckKeyCodes.bind(null, i),
5533
- _b: () => legacyBindObjectProps,
5534
- _v: () => createTextVNode,
5535
- _e: () => createCommentVNode,
5536
- _u: () => legacyresolveScopedSlots,
5537
- _g: () => legacyBindObjectListeners,
5538
- _d: () => legacyBindDynamicKeys,
5539
- _p: () => legacyPrependModifier
5540
- });
5546
+ const privateAPIs = {
5547
+ // needed by many libs / render fns
5548
+ $vnode: (i) => i.vnode,
5549
+ // some private properties that are likely accessed...
5550
+ _self: (i) => i.proxy,
5551
+ _uid: (i) => i.uid,
5552
+ _data: (i) => i.data,
5553
+ _isMounted: (i) => i.isMounted,
5554
+ _isDestroyed: (i) => i.isUnmounted,
5555
+ // v2 render helpers
5556
+ $createElement: () => compatH,
5557
+ _c: () => compatH,
5558
+ _o: () => legacyMarkOnce,
5559
+ _n: () => looseToNumber,
5560
+ _s: () => toDisplayString,
5561
+ _l: () => renderList,
5562
+ _t: (i) => legacyRenderSlot.bind(null, i),
5563
+ _q: () => looseEqual,
5564
+ _i: () => looseIndexOf,
5565
+ _m: (i) => legacyRenderStatic.bind(null, i),
5566
+ _f: () => resolveFilter$1,
5567
+ _k: (i) => legacyCheckKeyCodes.bind(null, i),
5568
+ _b: () => legacyBindObjectProps,
5569
+ _v: () => createTextVNode,
5570
+ _e: () => createCommentVNode,
5571
+ _u: () => legacyresolveScopedSlots,
5572
+ _g: () => legacyBindObjectListeners,
5573
+ _d: () => legacyBindDynamicKeys,
5574
+ _p: () => legacyPrependModifier
5575
+ };
5576
+ for (const key in privateAPIs) {
5577
+ map[key] = (i) => {
5578
+ if (isCompatEnabled("PRIVATE_APIS", i)) {
5579
+ return privateAPIs[key](i);
5580
+ }
5581
+ };
5541
5582
  }
5542
5583
  }
5543
5584
 
@@ -5578,6 +5619,9 @@ const isReservedPrefix = (key) => key === "_" || key === "$";
5578
5619
  const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
5579
5620
  const PublicInstanceProxyHandlers = {
5580
5621
  get({ _: instance }, key) {
5622
+ if (key === "__v_skip") {
5623
+ return true;
5624
+ }
5581
5625
  const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
5582
5626
  if (key === "__isVue") {
5583
5627
  return true;
@@ -6432,7 +6476,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6432
6476
  return vm;
6433
6477
  }
6434
6478
  }
6435
- Vue.version = `2.6.14-compat:${"3.4.20"}`;
6479
+ Vue.version = `2.6.14-compat:${"3.4.22"}`;
6436
6480
  Vue.config = singletonApp.config;
6437
6481
  Vue.use = (p, ...options) => {
6438
6482
  if (p && isFunction(p.install)) {
@@ -6626,15 +6670,14 @@ function applySingletonPrototype(app, Ctor) {
6626
6670
  app.config.globalProperties = Object.create(Ctor.prototype);
6627
6671
  }
6628
6672
  let hasPrototypeAugmentations = false;
6629
- const descriptors = Object.getOwnPropertyDescriptors(Ctor.prototype);
6630
- for (const key in descriptors) {
6673
+ for (const key of Object.getOwnPropertyNames(Ctor.prototype)) {
6631
6674
  if (key !== "constructor") {
6632
6675
  hasPrototypeAugmentations = true;
6633
6676
  if (enabled) {
6634
6677
  Object.defineProperty(
6635
6678
  app.config.globalProperties,
6636
6679
  key,
6637
- descriptors[key]
6680
+ Object.getOwnPropertyDescriptor(Ctor.prototype, key)
6638
6681
  );
6639
6682
  }
6640
6683
  }
@@ -7070,10 +7113,10 @@ function shouldSkipAttr(key, instance) {
7070
7113
  return false;
7071
7114
  }
7072
7115
 
7116
+ const attrsProto = {};
7073
7117
  function initProps(instance, rawProps, isStateful, isSSR = false) {
7074
7118
  const props = {};
7075
- const attrs = {};
7076
- def(attrs, InternalObjectKey, 1);
7119
+ const attrs = Object.create(attrsProto);
7077
7120
  instance.propsDefaults = /* @__PURE__ */ Object.create(null);
7078
7121
  setFullProps(instance, rawProps, props, attrs);
7079
7122
  for (const key in instance.propsOptions[0]) {
@@ -7195,7 +7238,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
7195
7238
  }
7196
7239
  }
7197
7240
  if (hasAttrsChanged) {
7198
- trigger(instance, "set", "$attrs");
7241
+ trigger(instance.attrs, "set", "");
7199
7242
  }
7200
7243
  {
7201
7244
  validateProps(rawProps || {}, props, instance);
@@ -7553,7 +7596,7 @@ const initSlots = (instance, children) => {
7553
7596
  const type = children._;
7554
7597
  if (type) {
7555
7598
  instance.slots = toRaw(children);
7556
- def(children, "_", type);
7599
+ def(instance.slots, "_", type);
7557
7600
  } else {
7558
7601
  normalizeObjectSlots(
7559
7602
  children,
@@ -7567,7 +7610,6 @@ const initSlots = (instance, children) => {
7567
7610
  normalizeVNodeSlots(instance, children);
7568
7611
  }
7569
7612
  }
7570
- def(instance.slots, InternalObjectKey, 1);
7571
7613
  };
7572
7614
  const updateSlots = (instance, children, optimized) => {
7573
7615
  const { vnode, slots } = instance;
@@ -7739,6 +7781,7 @@ function createHydrationFunctions(rendererInternals) {
7739
7781
  }
7740
7782
  };
7741
7783
  const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
7784
+ optimized = optimized || !!vnode.dynamicChildren;
7742
7785
  const isFragmentStart = isComment(node) && node.data === "[";
7743
7786
  const onMismatch = () => handleMismatch(
7744
7787
  node,
@@ -10258,7 +10301,6 @@ const createVNodeWithArgsTransform = (...args) => {
10258
10301
  ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args
10259
10302
  );
10260
10303
  };
10261
- const InternalObjectKey = `__vInternal`;
10262
10304
  const normalizeKey = ({ key }) => key != null ? key : null;
10263
10305
  const normalizeRef = ({
10264
10306
  ref,
@@ -10398,7 +10440,7 @@ Component that was made reactive: `,
10398
10440
  function guardReactiveProps(props) {
10399
10441
  if (!props)
10400
10442
  return null;
10401
- return isProxy(props) || InternalObjectKey in props ? extend({}, props) : props;
10443
+ return isProxy(props) || Object.getPrototypeOf(props) === attrsProto ? extend({}, props) : props;
10402
10444
  }
10403
10445
  function cloneVNode(vnode, extraProps, mergeRef = false) {
10404
10446
  const { props, ref, patchFlag, children } = vnode;
@@ -10506,7 +10548,7 @@ function normalizeChildren(vnode, children) {
10506
10548
  } else {
10507
10549
  type = 32;
10508
10550
  const slotFlag = children._;
10509
- if (!slotFlag && !(InternalObjectKey in children)) {
10551
+ if (!slotFlag) {
10510
10552
  children._ctx = currentRenderingInstance;
10511
10553
  } else if (slotFlag === 3 && currentRenderingInstance) {
10512
10554
  if (currentRenderingInstance.slots._ === 1) {
@@ -10727,7 +10769,7 @@ function setupStatefulComponent(instance, isSSR) {
10727
10769
  }
10728
10770
  }
10729
10771
  instance.accessCache = /* @__PURE__ */ Object.create(null);
10730
- instance.proxy = markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers));
10772
+ instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
10731
10773
  {
10732
10774
  exposePropsOnRenderContext(instance);
10733
10775
  }
@@ -10871,26 +10913,21 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
10871
10913
  }
10872
10914
  }
10873
10915
  }
10874
- function getAttrsProxy(instance) {
10875
- return instance.attrsProxy || (instance.attrsProxy = new Proxy(
10876
- instance.attrs,
10877
- {
10878
- get(target, key) {
10879
- markAttrsAccessed();
10880
- track(instance, "get", "$attrs");
10881
- return target[key];
10882
- },
10883
- set() {
10884
- warn$1(`setupContext.attrs is readonly.`);
10885
- return false;
10886
- },
10887
- deleteProperty() {
10888
- warn$1(`setupContext.attrs is readonly.`);
10889
- return false;
10890
- }
10891
- }
10892
- ));
10893
- }
10916
+ const attrsProxyHandlers = {
10917
+ get(target, key) {
10918
+ markAttrsAccessed();
10919
+ track(target, "get", "");
10920
+ return target[key];
10921
+ },
10922
+ set() {
10923
+ warn$1(`setupContext.attrs is readonly.`);
10924
+ return false;
10925
+ },
10926
+ deleteProperty() {
10927
+ warn$1(`setupContext.attrs is readonly.`);
10928
+ return false;
10929
+ }
10930
+ } ;
10894
10931
  function getSlotsProxy(instance) {
10895
10932
  return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, {
10896
10933
  get(target, key) {
@@ -10924,9 +10961,10 @@ function createSetupContext(instance) {
10924
10961
  instance.exposed = exposed || {};
10925
10962
  };
10926
10963
  {
10964
+ let attrsProxy;
10927
10965
  return Object.freeze({
10928
10966
  get attrs() {
10929
- return getAttrsProxy(instance);
10967
+ return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers));
10930
10968
  },
10931
10969
  get slots() {
10932
10970
  return getSlotsProxy(instance);
@@ -11271,7 +11309,7 @@ function isMemoSame(cached, memo) {
11271
11309
  return true;
11272
11310
  }
11273
11311
 
11274
- const version = "3.4.20";
11312
+ const version = "3.4.22";
11275
11313
  const warn = warn$1 ;
11276
11314
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11277
11315
  const devtools = devtools$1 ;
@@ -11741,8 +11779,8 @@ function useCssVars(getter) {
11741
11779
  setVarsOnVNode(instance.subTree, vars);
11742
11780
  updateTeleports(vars);
11743
11781
  };
11744
- watchPostEffect(setVars);
11745
11782
  onMounted(() => {
11783
+ watchPostEffect(setVars);
11746
11784
  const ob = new MutationObserver(setVars);
11747
11785
  ob.observe(instance.subTree.el.parentNode, { childList: true });
11748
11786
  onUnmounted(() => ob.disconnect());
@@ -11944,15 +11982,15 @@ function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspe
11944
11982
  const tag = el.tagName;
11945
11983
  if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
11946
11984
  !tag.includes("-")) {
11947
- el._value = value;
11948
11985
  const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value;
11949
11986
  const newValue = value == null ? "" : value;
11950
- if (oldValue !== newValue) {
11987
+ if (oldValue !== newValue || !("_value" in el)) {
11951
11988
  el.value = newValue;
11952
11989
  }
11953
11990
  if (value == null) {
11954
11991
  el.removeAttribute(key);
11955
11992
  }
11993
+ el._value = value;
11956
11994
  return;
11957
11995
  }
11958
11996
  let needRemove = false;
@@ -12008,11 +12046,14 @@ function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
12008
12046
  const invokers = el[veiKey] || (el[veiKey] = {});
12009
12047
  const existingInvoker = invokers[rawName];
12010
12048
  if (nextValue && existingInvoker) {
12011
- existingInvoker.value = nextValue;
12049
+ existingInvoker.value = sanitizeEventValue(nextValue, rawName) ;
12012
12050
  } else {
12013
12051
  const [name, options] = parseName(rawName);
12014
12052
  if (nextValue) {
12015
- const invoker = invokers[rawName] = createInvoker(nextValue, instance);
12053
+ const invoker = invokers[rawName] = createInvoker(
12054
+ sanitizeEventValue(nextValue, rawName) ,
12055
+ instance
12056
+ );
12016
12057
  addEventListener(el, name, invoker, options);
12017
12058
  } else if (existingInvoker) {
12018
12059
  removeEventListener(el, name, existingInvoker, options);
@@ -12055,6 +12096,16 @@ function createInvoker(initialValue, instance) {
12055
12096
  invoker.attached = getNow();
12056
12097
  return invoker;
12057
12098
  }
12099
+ function sanitizeEventValue(value, propName) {
12100
+ if (isFunction(value) || isArray(value)) {
12101
+ return value;
12102
+ }
12103
+ warn(
12104
+ `Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop?
12105
+ Expected function or array of functions, received type ${typeof value}.`
12106
+ );
12107
+ return NOOP;
12108
+ }
12058
12109
  function patchStopImmediatePropagation(e, value) {
12059
12110
  if (isArray(value)) {
12060
12111
  const originalStop = e.stopImmediatePropagation;
@@ -12062,7 +12113,9 @@ function patchStopImmediatePropagation(e, value) {
12062
12113
  originalStop.call(e);
12063
12114
  e._stopped = true;
12064
12115
  };
12065
- return value.map((fn) => (e2) => !e2._stopped && fn && fn(e2));
12116
+ return value.map(
12117
+ (fn) => (e2) => !e2._stopped && fn && fn(e2)
12118
+ );
12066
12119
  } else {
12067
12120
  return value;
12068
12121
  }
@@ -12263,7 +12316,7 @@ class VueElement extends BaseClass {
12263
12316
  }
12264
12317
  }
12265
12318
  _setAttr(key) {
12266
- let value = this.getAttribute(key);
12319
+ let value = this.hasAttribute(key) ? this.getAttribute(key) : void 0;
12267
12320
  const camelKey = camelize(key);
12268
12321
  if (this._numberProps && this._numberProps[camelKey]) {
12269
12322
  value = toNumber(value);
@@ -12435,7 +12488,28 @@ const TransitionGroupImpl = {
12435
12488
  )) {
12436
12489
  tag = "span";
12437
12490
  }
12438
- prevChildren = children;
12491
+ prevChildren = [];
12492
+ if (children) {
12493
+ for (let i = 0; i < children.length; i++) {
12494
+ const child = children[i];
12495
+ if (child.el && child.el instanceof Element) {
12496
+ prevChildren.push(child);
12497
+ setTransitionHooks(
12498
+ child,
12499
+ resolveTransitionHooks(
12500
+ child,
12501
+ cssTransitionProps,
12502
+ state,
12503
+ instance
12504
+ )
12505
+ );
12506
+ positionMap.set(
12507
+ child,
12508
+ child.el.getBoundingClientRect()
12509
+ );
12510
+ }
12511
+ }
12512
+ }
12439
12513
  children = slots.default ? getTransitionRawChildren(slots.default()) : [];
12440
12514
  for (let i = 0; i < children.length; i++) {
12441
12515
  const child = children[i];
@@ -12448,16 +12522,6 @@ const TransitionGroupImpl = {
12448
12522
  warn(`<TransitionGroup> children must be keyed.`);
12449
12523
  }
12450
12524
  }
12451
- if (prevChildren) {
12452
- for (let i = 0; i < prevChildren.length; i++) {
12453
- const child = prevChildren[i];
12454
- setTransitionHooks(
12455
- child,
12456
- resolveTransitionHooks(child, cssTransitionProps, state, instance)
12457
- );
12458
- positionMap.set(child, child.el.getBoundingClientRect());
12459
- }
12460
- }
12461
12525
  return createVNode(tag, null, children);
12462
12526
  };
12463
12527
  }
@@ -12559,7 +12623,7 @@ const vModelText = {
12559
12623
  el[assignKey] = getModelAssigner(vnode);
12560
12624
  if (el.composing)
12561
12625
  return;
12562
- const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value;
12626
+ const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value;
12563
12627
  const newValue = value == null ? "" : value;
12564
12628
  if (elValue === newValue) {
12565
12629
  return;
@@ -12662,14 +12726,14 @@ const vModelSelect = {
12662
12726
  // set value in mounted & updated because <select> relies on its children
12663
12727
  // <option>s.
12664
12728
  mounted(el, { value, modifiers: { number } }) {
12665
- setSelected(el, value, number);
12729
+ setSelected(el, value);
12666
12730
  },
12667
12731
  beforeUpdate(el, _binding, vnode) {
12668
12732
  el[assignKey] = getModelAssigner(vnode);
12669
12733
  },
12670
12734
  updated(el, { value, modifiers: { number } }) {
12671
12735
  if (!el._assigning) {
12672
- setSelected(el, value, number);
12736
+ setSelected(el, value);
12673
12737
  }
12674
12738
  }
12675
12739
  };
@@ -12689,9 +12753,7 @@ function setSelected(el, value, number) {
12689
12753
  if (isArrayValue) {
12690
12754
  const optionType = typeof optionValue;
12691
12755
  if (optionType === "string" || optionType === "number") {
12692
- option.selected = value.includes(
12693
- number ? looseToNumber(optionValue) : optionValue
12694
- );
12756
+ option.selected = value.some((v) => String(v) === String(optionValue));
12695
12757
  } else {
12696
12758
  option.selected = looseIndexOf(value, optionValue) > -1;
12697
12759
  }