@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.
package/dist/vue.cjs.js CHANGED
@@ -1,5 +1,5 @@
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
  **/
@@ -10,6 +10,8 @@ var estreeWalker = require('estree-walker');
10
10
  var decode_js = require('entities/lib/decode.js');
11
11
  var sourceMapJs = require('source-map-js');
12
12
 
13
+ /*! #__NO_SIDE_EFFECTS__ */
14
+ // @__NO_SIDE_EFFECTS__
13
15
  function makeMap(str, expectsLowerCase) {
14
16
  const set = new Set(str.split(","));
15
17
  return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val);
@@ -405,7 +407,11 @@ const replacer = (_key, val) => {
405
407
  };
406
408
  const stringifySymbol = (v, i = "") => {
407
409
  var _a;
408
- return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v;
410
+ return (
411
+ // Symbol.description in es2019+ so we need to cast here to pass
412
+ // the lib: es2016 check
413
+ isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v
414
+ );
409
415
  };
410
416
 
411
417
  function warn$2(msg, ...args) {
@@ -841,6 +847,8 @@ function createArrayInstrumentations() {
841
847
  return instrumentations;
842
848
  }
843
849
  function hasOwnProperty(key) {
850
+ if (!isSymbol(key))
851
+ key = String(key);
844
852
  const obj = toRaw(this);
845
853
  track(obj, "has", key);
846
854
  return obj.hasOwnProperty(key);
@@ -1193,23 +1201,16 @@ function createInstrumentations() {
1193
1201
  clear: createReadonlyMethod("clear"),
1194
1202
  forEach: createForEach(true, true)
1195
1203
  };
1196
- const iteratorMethods = ["keys", "values", "entries", Symbol.iterator];
1204
+ const iteratorMethods = [
1205
+ "keys",
1206
+ "values",
1207
+ "entries",
1208
+ Symbol.iterator
1209
+ ];
1197
1210
  iteratorMethods.forEach((method) => {
1198
- mutableInstrumentations2[method] = createIterableMethod(
1199
- method,
1200
- false,
1201
- false
1202
- );
1203
- readonlyInstrumentations2[method] = createIterableMethod(
1204
- method,
1205
- true,
1206
- false
1207
- );
1208
- shallowInstrumentations2[method] = createIterableMethod(
1209
- method,
1210
- false,
1211
- true
1212
- );
1211
+ mutableInstrumentations2[method] = createIterableMethod(method, false, false);
1212
+ readonlyInstrumentations2[method] = createIterableMethod(method, true, false);
1213
+ shallowInstrumentations2[method] = createIterableMethod(method, false, true);
1213
1214
  shallowReadonlyInstrumentations2[method] = createIterableMethod(
1214
1215
  method,
1215
1216
  true,
@@ -1366,7 +1367,7 @@ function isShallow(value) {
1366
1367
  return !!(value && value["__v_isShallow"]);
1367
1368
  }
1368
1369
  function isProxy(value) {
1369
- return isReactive(value) || isReadonly(value);
1370
+ return value ? !!value["__v_raw"] : false;
1370
1371
  }
1371
1372
  function toRaw(observed) {
1372
1373
  const raw = observed && observed["__v_raw"];
@@ -1649,7 +1650,10 @@ function warn$1(msg, ...args) {
1649
1650
  instance,
1650
1651
  11,
1651
1652
  [
1652
- msg + args.join(""),
1653
+ msg + args.map((a) => {
1654
+ var _a, _b;
1655
+ return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);
1656
+ }).join(""),
1653
1657
  instance && instance.proxy,
1654
1658
  trace.map(
1655
1659
  ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`
@@ -1825,11 +1829,17 @@ function callWithAsyncErrorHandling(fn, instance, type, args) {
1825
1829
  }
1826
1830
  return res;
1827
1831
  }
1828
- const values = [];
1829
- for (let i = 0; i < fn.length; i++) {
1830
- values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
1832
+ if (isArray(fn)) {
1833
+ const values = [];
1834
+ for (let i = 0; i < fn.length; i++) {
1835
+ values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
1836
+ }
1837
+ return values;
1838
+ } else {
1839
+ warn$1(
1840
+ `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}`
1841
+ );
1831
1842
  }
1832
- return values;
1833
1843
  }
1834
1844
  function handleError(err, instance, type, throwInDev = true) {
1835
1845
  const contextVNode = instance ? instance.vnode : null;
@@ -1850,12 +1860,14 @@ function handleError(err, instance, type, throwInDev = true) {
1850
1860
  }
1851
1861
  const appErrorHandler = instance.appContext.config.errorHandler;
1852
1862
  if (appErrorHandler) {
1863
+ pauseTracking();
1853
1864
  callWithErrorHandling(
1854
1865
  appErrorHandler,
1855
1866
  null,
1856
1867
  10,
1857
1868
  [err, exposedInstance, errorInfo]
1858
1869
  );
1870
+ resetTracking();
1859
1871
  return;
1860
1872
  }
1861
1873
  }
@@ -2231,6 +2243,8 @@ const devtoolsComponentRemoved = (component) => {
2231
2243
  _devtoolsComponentRemoved(component);
2232
2244
  }
2233
2245
  };
2246
+ /*! #__NO_SIDE_EFFECTS__ */
2247
+ // @__NO_SIDE_EFFECTS__
2234
2248
  function createDevtoolsComponentHook(hook) {
2235
2249
  return (component) => {
2236
2250
  emit$2(
@@ -3337,7 +3351,7 @@ const SuspenseImpl = {
3337
3351
  rendererInternals
3338
3352
  );
3339
3353
  } else {
3340
- if (parentSuspense && parentSuspense.deps > 0) {
3354
+ if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
3341
3355
  n2.suspense = n1.suspense;
3342
3356
  n2.suspense.vnode = n2;
3343
3357
  n2.el = n1.el;
@@ -4909,7 +4923,7 @@ const KeepAliveImpl = {
4909
4923
  return () => {
4910
4924
  pendingCacheKey = null;
4911
4925
  if (!slots.default) {
4912
- return null;
4926
+ return current = null;
4913
4927
  }
4914
4928
  const children = slots.default();
4915
4929
  const rawVNode = children[0];
@@ -5640,47 +5654,74 @@ function installCompatInstanceProperties(map) {
5640
5654
  $once: (i) => once.bind(null, i),
5641
5655
  $off: (i) => off.bind(null, i),
5642
5656
  $children: getCompatChildren,
5643
- $listeners: getCompatListeners
5657
+ $listeners: getCompatListeners,
5658
+ // inject additional properties into $options for compat
5659
+ // e.g. vuex needs this.$options.parent
5660
+ $options: (i) => {
5661
+ if (!isCompatEnabled$1("PRIVATE_APIS", i)) {
5662
+ return resolveMergedOptions(i);
5663
+ }
5664
+ if (i.resolvedOptions) {
5665
+ return i.resolvedOptions;
5666
+ }
5667
+ const res = i.resolvedOptions = extend({}, resolveMergedOptions(i));
5668
+ Object.defineProperties(res, {
5669
+ parent: {
5670
+ get() {
5671
+ warnDeprecation$1("PRIVATE_APIS", i, "$options.parent");
5672
+ return i.proxy.$parent;
5673
+ }
5674
+ },
5675
+ propsData: {
5676
+ get() {
5677
+ warnDeprecation$1(
5678
+ "PRIVATE_APIS",
5679
+ i,
5680
+ "$options.propsData"
5681
+ );
5682
+ return i.vnode.props;
5683
+ }
5684
+ }
5685
+ });
5686
+ return res;
5687
+ }
5644
5688
  });
5645
- if (isCompatEnabled$1("PRIVATE_APIS", null)) {
5646
- extend(map, {
5647
- // needed by many libs / render fns
5648
- $vnode: (i) => i.vnode,
5649
- // inject additional properties into $options for compat
5650
- // e.g. vuex needs this.$options.parent
5651
- $options: (i) => {
5652
- const res = extend({}, resolveMergedOptions(i));
5653
- res.parent = i.proxy.$parent;
5654
- res.propsData = i.vnode.props;
5655
- return res;
5656
- },
5657
- // some private properties that are likely accessed...
5658
- _self: (i) => i.proxy,
5659
- _uid: (i) => i.uid,
5660
- _data: (i) => i.data,
5661
- _isMounted: (i) => i.isMounted,
5662
- _isDestroyed: (i) => i.isUnmounted,
5663
- // v2 render helpers
5664
- $createElement: () => compatH,
5665
- _c: () => compatH,
5666
- _o: () => legacyMarkOnce,
5667
- _n: () => looseToNumber,
5668
- _s: () => toDisplayString,
5669
- _l: () => renderList,
5670
- _t: (i) => legacyRenderSlot.bind(null, i),
5671
- _q: () => looseEqual,
5672
- _i: () => looseIndexOf,
5673
- _m: (i) => legacyRenderStatic.bind(null, i),
5674
- _f: () => resolveFilter$1,
5675
- _k: (i) => legacyCheckKeyCodes.bind(null, i),
5676
- _b: () => legacyBindObjectProps,
5677
- _v: () => createTextVNode,
5678
- _e: () => createCommentVNode,
5679
- _u: () => legacyresolveScopedSlots,
5680
- _g: () => legacyBindObjectListeners,
5681
- _d: () => legacyBindDynamicKeys,
5682
- _p: () => legacyPrependModifier
5683
- });
5689
+ const privateAPIs = {
5690
+ // needed by many libs / render fns
5691
+ $vnode: (i) => i.vnode,
5692
+ // some private properties that are likely accessed...
5693
+ _self: (i) => i.proxy,
5694
+ _uid: (i) => i.uid,
5695
+ _data: (i) => i.data,
5696
+ _isMounted: (i) => i.isMounted,
5697
+ _isDestroyed: (i) => i.isUnmounted,
5698
+ // v2 render helpers
5699
+ $createElement: () => compatH,
5700
+ _c: () => compatH,
5701
+ _o: () => legacyMarkOnce,
5702
+ _n: () => looseToNumber,
5703
+ _s: () => toDisplayString,
5704
+ _l: () => renderList,
5705
+ _t: (i) => legacyRenderSlot.bind(null, i),
5706
+ _q: () => looseEqual,
5707
+ _i: () => looseIndexOf,
5708
+ _m: (i) => legacyRenderStatic.bind(null, i),
5709
+ _f: () => resolveFilter$1,
5710
+ _k: (i) => legacyCheckKeyCodes.bind(null, i),
5711
+ _b: () => legacyBindObjectProps,
5712
+ _v: () => createTextVNode,
5713
+ _e: () => createCommentVNode,
5714
+ _u: () => legacyresolveScopedSlots,
5715
+ _g: () => legacyBindObjectListeners,
5716
+ _d: () => legacyBindDynamicKeys,
5717
+ _p: () => legacyPrependModifier
5718
+ };
5719
+ for (const key in privateAPIs) {
5720
+ map[key] = (i) => {
5721
+ if (isCompatEnabled$1("PRIVATE_APIS", i)) {
5722
+ return privateAPIs[key](i);
5723
+ }
5724
+ };
5684
5725
  }
5685
5726
  }
5686
5727
 
@@ -5721,6 +5762,9 @@ const isReservedPrefix = (key) => key === "_" || key === "$";
5721
5762
  const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
5722
5763
  const PublicInstanceProxyHandlers = {
5723
5764
  get({ _: instance }, key) {
5765
+ if (key === "__v_skip") {
5766
+ return true;
5767
+ }
5724
5768
  const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
5725
5769
  if (key === "__isVue") {
5726
5770
  return true;
@@ -6575,7 +6619,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6575
6619
  return vm;
6576
6620
  }
6577
6621
  }
6578
- Vue.version = `2.6.14-compat:${"3.4.20"}`;
6622
+ Vue.version = `2.6.14-compat:${"3.4.22"}`;
6579
6623
  Vue.config = singletonApp.config;
6580
6624
  Vue.use = (p, ...options) => {
6581
6625
  if (p && isFunction(p.install)) {
@@ -6769,15 +6813,14 @@ function applySingletonPrototype(app, Ctor) {
6769
6813
  app.config.globalProperties = Object.create(Ctor.prototype);
6770
6814
  }
6771
6815
  let hasPrototypeAugmentations = false;
6772
- const descriptors = Object.getOwnPropertyDescriptors(Ctor.prototype);
6773
- for (const key in descriptors) {
6816
+ for (const key of Object.getOwnPropertyNames(Ctor.prototype)) {
6774
6817
  if (key !== "constructor") {
6775
6818
  hasPrototypeAugmentations = true;
6776
6819
  if (enabled) {
6777
6820
  Object.defineProperty(
6778
6821
  app.config.globalProperties,
6779
6822
  key,
6780
- descriptors[key]
6823
+ Object.getOwnPropertyDescriptor(Ctor.prototype, key)
6781
6824
  );
6782
6825
  }
6783
6826
  }
@@ -7213,10 +7256,10 @@ function shouldSkipAttr(key, instance) {
7213
7256
  return false;
7214
7257
  }
7215
7258
 
7259
+ const attrsProto = {};
7216
7260
  function initProps(instance, rawProps, isStateful, isSSR = false) {
7217
7261
  const props = {};
7218
- const attrs = {};
7219
- def(attrs, InternalObjectKey, 1);
7262
+ const attrs = Object.create(attrsProto);
7220
7263
  instance.propsDefaults = /* @__PURE__ */ Object.create(null);
7221
7264
  setFullProps(instance, rawProps, props, attrs);
7222
7265
  for (const key in instance.propsOptions[0]) {
@@ -7338,7 +7381,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
7338
7381
  }
7339
7382
  }
7340
7383
  if (hasAttrsChanged) {
7341
- trigger(instance, "set", "$attrs");
7384
+ trigger(instance.attrs, "set", "");
7342
7385
  }
7343
7386
  {
7344
7387
  validateProps(rawProps || {}, props, instance);
@@ -7696,7 +7739,7 @@ const initSlots = (instance, children) => {
7696
7739
  const type = children._;
7697
7740
  if (type) {
7698
7741
  instance.slots = toRaw(children);
7699
- def(children, "_", type);
7742
+ def(instance.slots, "_", type);
7700
7743
  } else {
7701
7744
  normalizeObjectSlots(
7702
7745
  children,
@@ -7710,7 +7753,6 @@ const initSlots = (instance, children) => {
7710
7753
  normalizeVNodeSlots(instance, children);
7711
7754
  }
7712
7755
  }
7713
- def(instance.slots, InternalObjectKey, 1);
7714
7756
  };
7715
7757
  const updateSlots = (instance, children, optimized) => {
7716
7758
  const { vnode, slots } = instance;
@@ -7882,6 +7924,7 @@ function createHydrationFunctions(rendererInternals) {
7882
7924
  }
7883
7925
  };
7884
7926
  const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
7927
+ optimized = optimized || !!vnode.dynamicChildren;
7885
7928
  const isFragmentStart = isComment(node) && node.data === "[";
7886
7929
  const onMismatch = () => handleMismatch(
7887
7930
  node,
@@ -10401,7 +10444,6 @@ const createVNodeWithArgsTransform = (...args) => {
10401
10444
  ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args
10402
10445
  );
10403
10446
  };
10404
- const InternalObjectKey = `__vInternal`;
10405
10447
  const normalizeKey = ({ key }) => key != null ? key : null;
10406
10448
  const normalizeRef = ({
10407
10449
  ref,
@@ -10541,7 +10583,7 @@ Component that was made reactive: `,
10541
10583
  function guardReactiveProps(props) {
10542
10584
  if (!props)
10543
10585
  return null;
10544
- return isProxy(props) || InternalObjectKey in props ? extend({}, props) : props;
10586
+ return isProxy(props) || Object.getPrototypeOf(props) === attrsProto ? extend({}, props) : props;
10545
10587
  }
10546
10588
  function cloneVNode(vnode, extraProps, mergeRef = false) {
10547
10589
  const { props, ref, patchFlag, children } = vnode;
@@ -10649,7 +10691,7 @@ function normalizeChildren(vnode, children) {
10649
10691
  } else {
10650
10692
  type = 32;
10651
10693
  const slotFlag = children._;
10652
- if (!slotFlag && !(InternalObjectKey in children)) {
10694
+ if (!slotFlag) {
10653
10695
  children._ctx = currentRenderingInstance;
10654
10696
  } else if (slotFlag === 3 && currentRenderingInstance) {
10655
10697
  if (currentRenderingInstance.slots._ === 1) {
@@ -10885,7 +10927,7 @@ function setupStatefulComponent(instance, isSSR) {
10885
10927
  }
10886
10928
  }
10887
10929
  instance.accessCache = /* @__PURE__ */ Object.create(null);
10888
- instance.proxy = markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers));
10930
+ instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
10889
10931
  {
10890
10932
  exposePropsOnRenderContext(instance);
10891
10933
  }
@@ -11031,26 +11073,21 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
11031
11073
  }
11032
11074
  }
11033
11075
  }
11034
- function getAttrsProxy(instance) {
11035
- return instance.attrsProxy || (instance.attrsProxy = new Proxy(
11036
- instance.attrs,
11037
- {
11038
- get(target, key) {
11039
- markAttrsAccessed();
11040
- track(instance, "get", "$attrs");
11041
- return target[key];
11042
- },
11043
- set() {
11044
- warn$1(`setupContext.attrs is readonly.`);
11045
- return false;
11046
- },
11047
- deleteProperty() {
11048
- warn$1(`setupContext.attrs is readonly.`);
11049
- return false;
11050
- }
11051
- }
11052
- ));
11053
- }
11076
+ const attrsProxyHandlers = {
11077
+ get(target, key) {
11078
+ markAttrsAccessed();
11079
+ track(target, "get", "");
11080
+ return target[key];
11081
+ },
11082
+ set() {
11083
+ warn$1(`setupContext.attrs is readonly.`);
11084
+ return false;
11085
+ },
11086
+ deleteProperty() {
11087
+ warn$1(`setupContext.attrs is readonly.`);
11088
+ return false;
11089
+ }
11090
+ } ;
11054
11091
  function getSlotsProxy(instance) {
11055
11092
  return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, {
11056
11093
  get(target, key) {
@@ -11084,9 +11121,10 @@ function createSetupContext(instance) {
11084
11121
  instance.exposed = exposed || {};
11085
11122
  };
11086
11123
  {
11124
+ let attrsProxy;
11087
11125
  return Object.freeze({
11088
11126
  get attrs() {
11089
- return getAttrsProxy(instance);
11127
+ return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers));
11090
11128
  },
11091
11129
  get slots() {
11092
11130
  return getSlotsProxy(instance);
@@ -11431,7 +11469,7 @@ function isMemoSame(cached, memo) {
11431
11469
  return true;
11432
11470
  }
11433
11471
 
11434
- const version = "3.4.20";
11472
+ const version = "3.4.22";
11435
11473
  const warn = warn$1 ;
11436
11474
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11437
11475
  const devtools = devtools$1 ;
@@ -12058,15 +12096,15 @@ function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspe
12058
12096
  const tag = el.tagName;
12059
12097
  if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
12060
12098
  !tag.includes("-")) {
12061
- el._value = value;
12062
12099
  const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value;
12063
12100
  const newValue = value == null ? "" : value;
12064
- if (oldValue !== newValue) {
12101
+ if (oldValue !== newValue || !("_value" in el)) {
12065
12102
  el.value = newValue;
12066
12103
  }
12067
12104
  if (value == null) {
12068
12105
  el.removeAttribute(key);
12069
12106
  }
12107
+ el._value = value;
12070
12108
  return;
12071
12109
  }
12072
12110
  let needRemove = false;
@@ -12122,11 +12160,14 @@ function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
12122
12160
  const invokers = el[veiKey] || (el[veiKey] = {});
12123
12161
  const existingInvoker = invokers[rawName];
12124
12162
  if (nextValue && existingInvoker) {
12125
- existingInvoker.value = nextValue;
12163
+ existingInvoker.value = sanitizeEventValue(nextValue, rawName) ;
12126
12164
  } else {
12127
12165
  const [name, options] = parseName(rawName);
12128
12166
  if (nextValue) {
12129
- const invoker = invokers[rawName] = createInvoker(nextValue, instance);
12167
+ const invoker = invokers[rawName] = createInvoker(
12168
+ sanitizeEventValue(nextValue, rawName) ,
12169
+ instance
12170
+ );
12130
12171
  addEventListener(el, name, invoker, options);
12131
12172
  } else if (existingInvoker) {
12132
12173
  removeEventListener(el, name, existingInvoker, options);
@@ -12169,6 +12210,16 @@ function createInvoker(initialValue, instance) {
12169
12210
  invoker.attached = getNow();
12170
12211
  return invoker;
12171
12212
  }
12213
+ function sanitizeEventValue(value, propName) {
12214
+ if (isFunction(value) || isArray(value)) {
12215
+ return value;
12216
+ }
12217
+ warn(
12218
+ `Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop?
12219
+ Expected function or array of functions, received type ${typeof value}.`
12220
+ );
12221
+ return NOOP;
12222
+ }
12172
12223
  function patchStopImmediatePropagation(e, value) {
12173
12224
  if (isArray(value)) {
12174
12225
  const originalStop = e.stopImmediatePropagation;
@@ -12176,7 +12227,9 @@ function patchStopImmediatePropagation(e, value) {
12176
12227
  originalStop.call(e);
12177
12228
  e._stopped = true;
12178
12229
  };
12179
- return value.map((fn) => (e2) => !e2._stopped && fn && fn(e2));
12230
+ return value.map(
12231
+ (fn) => (e2) => !e2._stopped && fn && fn(e2)
12232
+ );
12180
12233
  } else {
12181
12234
  return value;
12182
12235
  }
@@ -12377,7 +12430,7 @@ class VueElement extends BaseClass {
12377
12430
  }
12378
12431
  }
12379
12432
  _setAttr(key) {
12380
- let value = this.getAttribute(key);
12433
+ let value = this.hasAttribute(key) ? this.getAttribute(key) : void 0;
12381
12434
  const camelKey = camelize(key);
12382
12435
  if (this._numberProps && this._numberProps[camelKey]) {
12383
12436
  value = toNumber(value);
@@ -12549,7 +12602,28 @@ const TransitionGroupImpl = {
12549
12602
  )) {
12550
12603
  tag = "span";
12551
12604
  }
12552
- prevChildren = children;
12605
+ prevChildren = [];
12606
+ if (children) {
12607
+ for (let i = 0; i < children.length; i++) {
12608
+ const child = children[i];
12609
+ if (child.el && child.el instanceof Element) {
12610
+ prevChildren.push(child);
12611
+ setTransitionHooks(
12612
+ child,
12613
+ resolveTransitionHooks(
12614
+ child,
12615
+ cssTransitionProps,
12616
+ state,
12617
+ instance
12618
+ )
12619
+ );
12620
+ positionMap.set(
12621
+ child,
12622
+ child.el.getBoundingClientRect()
12623
+ );
12624
+ }
12625
+ }
12626
+ }
12553
12627
  children = slots.default ? getTransitionRawChildren(slots.default()) : [];
12554
12628
  for (let i = 0; i < children.length; i++) {
12555
12629
  const child = children[i];
@@ -12562,16 +12636,6 @@ const TransitionGroupImpl = {
12562
12636
  warn(`<TransitionGroup> children must be keyed.`);
12563
12637
  }
12564
12638
  }
12565
- if (prevChildren) {
12566
- for (let i = 0; i < prevChildren.length; i++) {
12567
- const child = prevChildren[i];
12568
- setTransitionHooks(
12569
- child,
12570
- resolveTransitionHooks(child, cssTransitionProps, state, instance)
12571
- );
12572
- positionMap.set(child, child.el.getBoundingClientRect());
12573
- }
12574
- }
12575
12639
  return createVNode(tag, null, children);
12576
12640
  };
12577
12641
  }
@@ -12673,7 +12737,7 @@ const vModelText = {
12673
12737
  el[assignKey] = getModelAssigner(vnode);
12674
12738
  if (el.composing)
12675
12739
  return;
12676
- const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value;
12740
+ const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value;
12677
12741
  const newValue = value == null ? "" : value;
12678
12742
  if (elValue === newValue) {
12679
12743
  return;
@@ -12776,14 +12840,14 @@ const vModelSelect = {
12776
12840
  // set value in mounted & updated because <select> relies on its children
12777
12841
  // <option>s.
12778
12842
  mounted(el, { value, modifiers: { number } }) {
12779
- setSelected(el, value, number);
12843
+ setSelected(el, value);
12780
12844
  },
12781
12845
  beforeUpdate(el, _binding, vnode) {
12782
12846
  el[assignKey] = getModelAssigner(vnode);
12783
12847
  },
12784
12848
  updated(el, { value, modifiers: { number } }) {
12785
12849
  if (!el._assigning) {
12786
- setSelected(el, value, number);
12850
+ setSelected(el, value);
12787
12851
  }
12788
12852
  }
12789
12853
  };
@@ -12803,9 +12867,7 @@ function setSelected(el, value, number) {
12803
12867
  if (isArrayValue) {
12804
12868
  const optionType = typeof optionValue;
12805
12869
  if (optionType === "string" || optionType === "number") {
12806
- option.selected = value.includes(
12807
- number ? looseToNumber(optionValue) : optionValue
12808
- );
12870
+ option.selected = value.some((v) => String(v) === String(optionValue));
12809
12871
  } else {
12810
12872
  option.selected = looseIndexOf(value, optionValue) > -1;
12811
12873
  }
@@ -15511,7 +15573,7 @@ function onCloseTag(el, end, isImplied = false) {
15511
15573
  if (isImplied) {
15512
15574
  setLocEnd(el.loc, backTrack(end, 60));
15513
15575
  } else {
15514
- setLocEnd(el.loc, end + 1);
15576
+ setLocEnd(el.loc, lookAhead(end, 62) + 1);
15515
15577
  }
15516
15578
  if (tokenizer.inSFCRoot) {
15517
15579
  if (el.children.length) {
@@ -15606,6 +15668,12 @@ function onCloseTag(el, end, isImplied = false) {
15606
15668
  }
15607
15669
  }
15608
15670
  }
15671
+ function lookAhead(index, c) {
15672
+ let i = index;
15673
+ while (currentInput.charCodeAt(i) !== c && i < currentInput.length - 1)
15674
+ i++;
15675
+ return i;
15676
+ }
15609
15677
  function backTrack(index, c) {
15610
15678
  let i = index;
15611
15679
  while (currentInput.charCodeAt(i) !== c && i >= 0)
@@ -16507,7 +16575,6 @@ function createCodegenContext(ast, {
16507
16575
  generatedLine: context.line,
16508
16576
  generatedColumn: context.column - 1,
16509
16577
  source: filename,
16510
- // @ts-expect-error it is possible to be null
16511
16578
  name
16512
16579
  });
16513
16580
  }
@@ -18268,13 +18335,30 @@ const transformElement = (node, context) => {
18268
18335
  function resolveComponentType(node, context, ssr = false) {
18269
18336
  let { tag } = node;
18270
18337
  const isExplicitDynamic = isComponentTag(tag);
18271
- const isProp = findProp(node, "is");
18338
+ const isProp = findProp(
18339
+ node,
18340
+ "is",
18341
+ false,
18342
+ true
18343
+ /* allow empty */
18344
+ );
18272
18345
  if (isProp) {
18273
18346
  if (isExplicitDynamic || isCompatEnabled(
18274
18347
  "COMPILER_IS_ON_ELEMENT",
18275
18348
  context
18276
18349
  )) {
18277
- const exp = isProp.type === 6 ? isProp.value && createSimpleExpression(isProp.value.content, true) : isProp.exp;
18350
+ let exp;
18351
+ if (isProp.type === 6) {
18352
+ exp = isProp.value && createSimpleExpression(isProp.value.content, true);
18353
+ } else {
18354
+ exp = isProp.exp;
18355
+ if (!exp) {
18356
+ exp = createSimpleExpression(`is`, false, isProp.loc);
18357
+ {
18358
+ exp = isProp.exp = processExpression(exp, context);
18359
+ }
18360
+ }
18361
+ }
18278
18362
  if (exp) {
18279
18363
  return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [
18280
18364
  exp