@vue/compat 3.4.21 → 3.4.23

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.21
2
+ * @vue/compat v3.4.23
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"];
@@ -1828,11 +1829,17 @@ function callWithAsyncErrorHandling(fn, instance, type, args) {
1828
1829
  }
1829
1830
  return res;
1830
1831
  }
1831
- const values = [];
1832
- for (let i = 0; i < fn.length; i++) {
1833
- 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
+ );
1834
1842
  }
1835
- return values;
1836
1843
  }
1837
1844
  function handleError(err, instance, type, throwInDev = true) {
1838
1845
  const contextVNode = instance ? instance.vnode : null;
@@ -1853,12 +1860,14 @@ function handleError(err, instance, type, throwInDev = true) {
1853
1860
  }
1854
1861
  const appErrorHandler = instance.appContext.config.errorHandler;
1855
1862
  if (appErrorHandler) {
1863
+ pauseTracking();
1856
1864
  callWithErrorHandling(
1857
1865
  appErrorHandler,
1858
1866
  null,
1859
1867
  10,
1860
1868
  [err, exposedInstance, errorInfo]
1861
1869
  );
1870
+ resetTracking();
1862
1871
  return;
1863
1872
  }
1864
1873
  }
@@ -2234,6 +2243,8 @@ const devtoolsComponentRemoved = (component) => {
2234
2243
  _devtoolsComponentRemoved(component);
2235
2244
  }
2236
2245
  };
2246
+ /*! #__NO_SIDE_EFFECTS__ */
2247
+ // @__NO_SIDE_EFFECTS__
2237
2248
  function createDevtoolsComponentHook(hook) {
2238
2249
  return (component) => {
2239
2250
  emit$2(
@@ -4912,7 +4923,7 @@ const KeepAliveImpl = {
4912
4923
  return () => {
4913
4924
  pendingCacheKey = null;
4914
4925
  if (!slots.default) {
4915
- return null;
4926
+ return current = null;
4916
4927
  }
4917
4928
  const children = slots.default();
4918
4929
  const rawVNode = children[0];
@@ -5643,47 +5654,74 @@ function installCompatInstanceProperties(map) {
5643
5654
  $once: (i) => once.bind(null, i),
5644
5655
  $off: (i) => off.bind(null, i),
5645
5656
  $children: getCompatChildren,
5646
- $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
+ }
5647
5688
  });
5648
- if (isCompatEnabled$1("PRIVATE_APIS", null)) {
5649
- extend(map, {
5650
- // needed by many libs / render fns
5651
- $vnode: (i) => i.vnode,
5652
- // inject additional properties into $options for compat
5653
- // e.g. vuex needs this.$options.parent
5654
- $options: (i) => {
5655
- const res = extend({}, resolveMergedOptions(i));
5656
- res.parent = i.proxy.$parent;
5657
- res.propsData = i.vnode.props;
5658
- return res;
5659
- },
5660
- // some private properties that are likely accessed...
5661
- _self: (i) => i.proxy,
5662
- _uid: (i) => i.uid,
5663
- _data: (i) => i.data,
5664
- _isMounted: (i) => i.isMounted,
5665
- _isDestroyed: (i) => i.isUnmounted,
5666
- // v2 render helpers
5667
- $createElement: () => compatH,
5668
- _c: () => compatH,
5669
- _o: () => legacyMarkOnce,
5670
- _n: () => looseToNumber,
5671
- _s: () => toDisplayString,
5672
- _l: () => renderList,
5673
- _t: (i) => legacyRenderSlot.bind(null, i),
5674
- _q: () => looseEqual,
5675
- _i: () => looseIndexOf,
5676
- _m: (i) => legacyRenderStatic.bind(null, i),
5677
- _f: () => resolveFilter$1,
5678
- _k: (i) => legacyCheckKeyCodes.bind(null, i),
5679
- _b: () => legacyBindObjectProps,
5680
- _v: () => createTextVNode,
5681
- _e: () => createCommentVNode,
5682
- _u: () => legacyresolveScopedSlots,
5683
- _g: () => legacyBindObjectListeners,
5684
- _d: () => legacyBindDynamicKeys,
5685
- _p: () => legacyPrependModifier
5686
- });
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
+ };
5687
5725
  }
5688
5726
  }
5689
5727
 
@@ -5724,6 +5762,9 @@ const isReservedPrefix = (key) => key === "_" || key === "$";
5724
5762
  const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
5725
5763
  const PublicInstanceProxyHandlers = {
5726
5764
  get({ _: instance }, key) {
5765
+ if (key === "__v_skip") {
5766
+ return true;
5767
+ }
5727
5768
  const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
5728
5769
  if (key === "__isVue") {
5729
5770
  return true;
@@ -5766,7 +5807,7 @@ const PublicInstanceProxyHandlers = {
5766
5807
  let cssModule, globalProperties;
5767
5808
  if (publicGetter) {
5768
5809
  if (key === "$attrs") {
5769
- track(instance, "get", key);
5810
+ track(instance.attrs, "get", "");
5770
5811
  markAttrsAccessed();
5771
5812
  } else if (key === "$slots") {
5772
5813
  track(instance, "get", key);
@@ -6578,7 +6619,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6578
6619
  return vm;
6579
6620
  }
6580
6621
  }
6581
- Vue.version = `2.6.14-compat:${"3.4.21"}`;
6622
+ Vue.version = `2.6.14-compat:${"3.4.23"}`;
6582
6623
  Vue.config = singletonApp.config;
6583
6624
  Vue.use = (p, ...options) => {
6584
6625
  if (p && isFunction(p.install)) {
@@ -6772,15 +6813,14 @@ function applySingletonPrototype(app, Ctor) {
6772
6813
  app.config.globalProperties = Object.create(Ctor.prototype);
6773
6814
  }
6774
6815
  let hasPrototypeAugmentations = false;
6775
- const descriptors = Object.getOwnPropertyDescriptors(Ctor.prototype);
6776
- for (const key in descriptors) {
6816
+ for (const key of Object.getOwnPropertyNames(Ctor.prototype)) {
6777
6817
  if (key !== "constructor") {
6778
6818
  hasPrototypeAugmentations = true;
6779
6819
  if (enabled) {
6780
6820
  Object.defineProperty(
6781
6821
  app.config.globalProperties,
6782
6822
  key,
6783
- descriptors[key]
6823
+ Object.getOwnPropertyDescriptor(Ctor.prototype, key)
6784
6824
  );
6785
6825
  }
6786
6826
  }
@@ -7216,10 +7256,13 @@ function shouldSkipAttr(key, instance) {
7216
7256
  return false;
7217
7257
  }
7218
7258
 
7259
+ const internalObjectProto = /* @__PURE__ */ Object.create(null);
7260
+ const createInternalObject = () => Object.create(internalObjectProto);
7261
+ const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
7262
+
7219
7263
  function initProps(instance, rawProps, isStateful, isSSR = false) {
7220
7264
  const props = {};
7221
- const attrs = {};
7222
- def(attrs, InternalObjectKey, 1);
7265
+ const attrs = createInternalObject();
7223
7266
  instance.propsDefaults = /* @__PURE__ */ Object.create(null);
7224
7267
  setFullProps(instance, rawProps, props, attrs);
7225
7268
  for (const key in instance.propsOptions[0]) {
@@ -7341,7 +7384,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
7341
7384
  }
7342
7385
  }
7343
7386
  if (hasAttrsChanged) {
7344
- trigger(instance, "set", "$attrs");
7387
+ trigger(instance.attrs, "set", "");
7345
7388
  }
7346
7389
  {
7347
7390
  validateProps(rawProps || {}, props, instance);
@@ -7699,21 +7742,20 @@ const initSlots = (instance, children) => {
7699
7742
  const type = children._;
7700
7743
  if (type) {
7701
7744
  instance.slots = toRaw(children);
7702
- def(children, "_", type);
7745
+ def(instance.slots, "_", type);
7703
7746
  } else {
7704
7747
  normalizeObjectSlots(
7705
7748
  children,
7706
- instance.slots = {},
7749
+ instance.slots = createInternalObject(),
7707
7750
  instance
7708
7751
  );
7709
7752
  }
7710
7753
  } else {
7711
- instance.slots = {};
7754
+ instance.slots = createInternalObject();
7712
7755
  if (children) {
7713
7756
  normalizeVNodeSlots(instance, children);
7714
7757
  }
7715
7758
  }
7716
- def(instance.slots, InternalObjectKey, 1);
7717
7759
  };
7718
7760
  const updateSlots = (instance, children, optimized) => {
7719
7761
  const { vnode, slots } = instance;
@@ -7885,6 +7927,7 @@ function createHydrationFunctions(rendererInternals) {
7885
7927
  }
7886
7928
  };
7887
7929
  const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
7930
+ optimized = optimized || !!vnode.dynamicChildren;
7888
7931
  const isFragmentStart = isComment(node) && node.data === "[";
7889
7932
  const onMismatch = () => handleMismatch(
7890
7933
  node,
@@ -10404,7 +10447,6 @@ const createVNodeWithArgsTransform = (...args) => {
10404
10447
  ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args
10405
10448
  );
10406
10449
  };
10407
- const InternalObjectKey = `__vInternal`;
10408
10450
  const normalizeKey = ({ key }) => key != null ? key : null;
10409
10451
  const normalizeRef = ({
10410
10452
  ref,
@@ -10544,7 +10586,7 @@ Component that was made reactive: `,
10544
10586
  function guardReactiveProps(props) {
10545
10587
  if (!props)
10546
10588
  return null;
10547
- return isProxy(props) || InternalObjectKey in props ? extend({}, props) : props;
10589
+ return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
10548
10590
  }
10549
10591
  function cloneVNode(vnode, extraProps, mergeRef = false) {
10550
10592
  const { props, ref, patchFlag, children } = vnode;
@@ -10652,7 +10694,7 @@ function normalizeChildren(vnode, children) {
10652
10694
  } else {
10653
10695
  type = 32;
10654
10696
  const slotFlag = children._;
10655
- if (!slotFlag && !(InternalObjectKey in children)) {
10697
+ if (!slotFlag && !isInternalObject(children)) {
10656
10698
  children._ctx = currentRenderingInstance;
10657
10699
  } else if (slotFlag === 3 && currentRenderingInstance) {
10658
10700
  if (currentRenderingInstance.slots._ === 1) {
@@ -10888,7 +10930,7 @@ function setupStatefulComponent(instance, isSSR) {
10888
10930
  }
10889
10931
  }
10890
10932
  instance.accessCache = /* @__PURE__ */ Object.create(null);
10891
- instance.proxy = markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers));
10933
+ instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
10892
10934
  {
10893
10935
  exposePropsOnRenderContext(instance);
10894
10936
  }
@@ -11034,26 +11076,21 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
11034
11076
  }
11035
11077
  }
11036
11078
  }
11037
- function getAttrsProxy(instance) {
11038
- return instance.attrsProxy || (instance.attrsProxy = new Proxy(
11039
- instance.attrs,
11040
- {
11041
- get(target, key) {
11042
- markAttrsAccessed();
11043
- track(instance, "get", "$attrs");
11044
- return target[key];
11045
- },
11046
- set() {
11047
- warn$1(`setupContext.attrs is readonly.`);
11048
- return false;
11049
- },
11050
- deleteProperty() {
11051
- warn$1(`setupContext.attrs is readonly.`);
11052
- return false;
11053
- }
11054
- }
11055
- ));
11056
- }
11079
+ const attrsProxyHandlers = {
11080
+ get(target, key) {
11081
+ markAttrsAccessed();
11082
+ track(target, "get", "");
11083
+ return target[key];
11084
+ },
11085
+ set() {
11086
+ warn$1(`setupContext.attrs is readonly.`);
11087
+ return false;
11088
+ },
11089
+ deleteProperty() {
11090
+ warn$1(`setupContext.attrs is readonly.`);
11091
+ return false;
11092
+ }
11093
+ } ;
11057
11094
  function getSlotsProxy(instance) {
11058
11095
  return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, {
11059
11096
  get(target, key) {
@@ -11087,9 +11124,10 @@ function createSetupContext(instance) {
11087
11124
  instance.exposed = exposed || {};
11088
11125
  };
11089
11126
  {
11127
+ let attrsProxy;
11090
11128
  return Object.freeze({
11091
11129
  get attrs() {
11092
- return getAttrsProxy(instance);
11130
+ return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers));
11093
11131
  },
11094
11132
  get slots() {
11095
11133
  return getSlotsProxy(instance);
@@ -11434,7 +11472,7 @@ function isMemoSame(cached, memo) {
11434
11472
  return true;
11435
11473
  }
11436
11474
 
11437
- const version = "3.4.21";
11475
+ const version = "3.4.23";
11438
11476
  const warn = warn$1 ;
11439
11477
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11440
11478
  const devtools = devtools$1 ;
@@ -12125,11 +12163,14 @@ function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
12125
12163
  const invokers = el[veiKey] || (el[veiKey] = {});
12126
12164
  const existingInvoker = invokers[rawName];
12127
12165
  if (nextValue && existingInvoker) {
12128
- existingInvoker.value = nextValue;
12166
+ existingInvoker.value = sanitizeEventValue(nextValue, rawName) ;
12129
12167
  } else {
12130
12168
  const [name, options] = parseName(rawName);
12131
12169
  if (nextValue) {
12132
- const invoker = invokers[rawName] = createInvoker(nextValue, instance);
12170
+ const invoker = invokers[rawName] = createInvoker(
12171
+ sanitizeEventValue(nextValue, rawName) ,
12172
+ instance
12173
+ );
12133
12174
  addEventListener(el, name, invoker, options);
12134
12175
  } else if (existingInvoker) {
12135
12176
  removeEventListener(el, name, existingInvoker, options);
@@ -12172,6 +12213,16 @@ function createInvoker(initialValue, instance) {
12172
12213
  invoker.attached = getNow();
12173
12214
  return invoker;
12174
12215
  }
12216
+ function sanitizeEventValue(value, propName) {
12217
+ if (isFunction(value) || isArray(value)) {
12218
+ return value;
12219
+ }
12220
+ warn(
12221
+ `Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop?
12222
+ Expected function or array of functions, received type ${typeof value}.`
12223
+ );
12224
+ return NOOP;
12225
+ }
12175
12226
  function patchStopImmediatePropagation(e, value) {
12176
12227
  if (isArray(value)) {
12177
12228
  const originalStop = e.stopImmediatePropagation;
@@ -12179,7 +12230,9 @@ function patchStopImmediatePropagation(e, value) {
12179
12230
  originalStop.call(e);
12180
12231
  e._stopped = true;
12181
12232
  };
12182
- return value.map((fn) => (e2) => !e2._stopped && fn && fn(e2));
12233
+ return value.map(
12234
+ (fn) => (e2) => !e2._stopped && fn && fn(e2)
12235
+ );
12183
12236
  } else {
12184
12237
  return value;
12185
12238
  }
@@ -12380,7 +12433,7 @@ class VueElement extends BaseClass {
12380
12433
  }
12381
12434
  }
12382
12435
  _setAttr(key) {
12383
- let value = this.getAttribute(key);
12436
+ let value = this.hasAttribute(key) ? this.getAttribute(key) : void 0;
12384
12437
  const camelKey = camelize(key);
12385
12438
  if (this._numberProps && this._numberProps[camelKey]) {
12386
12439
  value = toNumber(value);
@@ -12552,7 +12605,28 @@ const TransitionGroupImpl = {
12552
12605
  )) {
12553
12606
  tag = "span";
12554
12607
  }
12555
- prevChildren = children;
12608
+ prevChildren = [];
12609
+ if (children) {
12610
+ for (let i = 0; i < children.length; i++) {
12611
+ const child = children[i];
12612
+ if (child.el && child.el instanceof Element) {
12613
+ prevChildren.push(child);
12614
+ setTransitionHooks(
12615
+ child,
12616
+ resolveTransitionHooks(
12617
+ child,
12618
+ cssTransitionProps,
12619
+ state,
12620
+ instance
12621
+ )
12622
+ );
12623
+ positionMap.set(
12624
+ child,
12625
+ child.el.getBoundingClientRect()
12626
+ );
12627
+ }
12628
+ }
12629
+ }
12556
12630
  children = slots.default ? getTransitionRawChildren(slots.default()) : [];
12557
12631
  for (let i = 0; i < children.length; i++) {
12558
12632
  const child = children[i];
@@ -12565,16 +12639,6 @@ const TransitionGroupImpl = {
12565
12639
  warn(`<TransitionGroup> children must be keyed.`);
12566
12640
  }
12567
12641
  }
12568
- if (prevChildren) {
12569
- for (let i = 0; i < prevChildren.length; i++) {
12570
- const child = prevChildren[i];
12571
- setTransitionHooks(
12572
- child,
12573
- resolveTransitionHooks(child, cssTransitionProps, state, instance)
12574
- );
12575
- positionMap.set(child, child.el.getBoundingClientRect());
12576
- }
12577
- }
12578
12642
  return createVNode(tag, null, children);
12579
12643
  };
12580
12644
  }
@@ -12676,7 +12740,7 @@ const vModelText = {
12676
12740
  el[assignKey] = getModelAssigner(vnode);
12677
12741
  if (el.composing)
12678
12742
  return;
12679
- const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value;
12743
+ const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value;
12680
12744
  const newValue = value == null ? "" : value;
12681
12745
  if (elValue === newValue) {
12682
12746
  return;
@@ -12779,14 +12843,14 @@ const vModelSelect = {
12779
12843
  // set value in mounted & updated because <select> relies on its children
12780
12844
  // <option>s.
12781
12845
  mounted(el, { value, modifiers: { number } }) {
12782
- setSelected(el, value, number);
12846
+ setSelected(el, value);
12783
12847
  },
12784
12848
  beforeUpdate(el, _binding, vnode) {
12785
12849
  el[assignKey] = getModelAssigner(vnode);
12786
12850
  },
12787
12851
  updated(el, { value, modifiers: { number } }) {
12788
12852
  if (!el._assigning) {
12789
- setSelected(el, value, number);
12853
+ setSelected(el, value);
12790
12854
  }
12791
12855
  }
12792
12856
  };
@@ -12806,9 +12870,7 @@ function setSelected(el, value, number) {
12806
12870
  if (isArrayValue) {
12807
12871
  const optionType = typeof optionValue;
12808
12872
  if (optionType === "string" || optionType === "number") {
12809
- option.selected = value.includes(
12810
- number ? looseToNumber(optionValue) : optionValue
12811
- );
12873
+ option.selected = value.some((v) => String(v) === String(optionValue));
12812
12874
  } else {
12813
12875
  option.selected = looseIndexOf(value, optionValue) > -1;
12814
12876
  }
@@ -15514,7 +15576,7 @@ function onCloseTag(el, end, isImplied = false) {
15514
15576
  if (isImplied) {
15515
15577
  setLocEnd(el.loc, backTrack(end, 60));
15516
15578
  } else {
15517
- setLocEnd(el.loc, end + 1);
15579
+ setLocEnd(el.loc, lookAhead(end, 62) + 1);
15518
15580
  }
15519
15581
  if (tokenizer.inSFCRoot) {
15520
15582
  if (el.children.length) {
@@ -15609,6 +15671,12 @@ function onCloseTag(el, end, isImplied = false) {
15609
15671
  }
15610
15672
  }
15611
15673
  }
15674
+ function lookAhead(index, c) {
15675
+ let i = index;
15676
+ while (currentInput.charCodeAt(i) !== c && i < currentInput.length - 1)
15677
+ i++;
15678
+ return i;
15679
+ }
15612
15680
  function backTrack(index, c) {
15613
15681
  let i = index;
15614
15682
  while (currentInput.charCodeAt(i) !== c && i >= 0)
@@ -16510,7 +16578,6 @@ function createCodegenContext(ast, {
16510
16578
  generatedLine: context.line,
16511
16579
  generatedColumn: context.column - 1,
16512
16580
  source: filename,
16513
- // @ts-expect-error it is possible to be null
16514
16581
  name
16515
16582
  });
16516
16583
  }
@@ -18271,13 +18338,30 @@ const transformElement = (node, context) => {
18271
18338
  function resolveComponentType(node, context, ssr = false) {
18272
18339
  let { tag } = node;
18273
18340
  const isExplicitDynamic = isComponentTag(tag);
18274
- const isProp = findProp(node, "is");
18341
+ const isProp = findProp(
18342
+ node,
18343
+ "is",
18344
+ false,
18345
+ true
18346
+ /* allow empty */
18347
+ );
18275
18348
  if (isProp) {
18276
18349
  if (isExplicitDynamic || isCompatEnabled(
18277
18350
  "COMPILER_IS_ON_ELEMENT",
18278
18351
  context
18279
18352
  )) {
18280
- const exp = isProp.type === 6 ? isProp.value && createSimpleExpression(isProp.value.content, true) : isProp.exp;
18353
+ let exp;
18354
+ if (isProp.type === 6) {
18355
+ exp = isProp.value && createSimpleExpression(isProp.value.content, true);
18356
+ } else {
18357
+ exp = isProp.exp;
18358
+ if (!exp) {
18359
+ exp = createSimpleExpression(`is`, false, isProp.loc);
18360
+ {
18361
+ exp = isProp.exp = processExpression(exp, context);
18362
+ }
18363
+ }
18364
+ }
18281
18365
  if (exp) {
18282
18366
  return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [
18283
18367
  exp