@vue/compat 3.2.45 → 3.2.46

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.
@@ -20,6 +20,26 @@ function makeMap(str, expectsLowerCase) {
20
20
  return expectsLowerCase ? val => !!map[val.toLowerCase()] : val => !!map[val];
21
21
  }
22
22
 
23
+ /**
24
+ * dev only flag -> name mapping
25
+ */
26
+ const PatchFlagNames = {
27
+ [1 /* PatchFlags.TEXT */]: `TEXT`,
28
+ [2 /* PatchFlags.CLASS */]: `CLASS`,
29
+ [4 /* PatchFlags.STYLE */]: `STYLE`,
30
+ [8 /* PatchFlags.PROPS */]: `PROPS`,
31
+ [16 /* PatchFlags.FULL_PROPS */]: `FULL_PROPS`,
32
+ [32 /* PatchFlags.HYDRATE_EVENTS */]: `HYDRATE_EVENTS`,
33
+ [64 /* PatchFlags.STABLE_FRAGMENT */]: `STABLE_FRAGMENT`,
34
+ [128 /* PatchFlags.KEYED_FRAGMENT */]: `KEYED_FRAGMENT`,
35
+ [256 /* PatchFlags.UNKEYED_FRAGMENT */]: `UNKEYED_FRAGMENT`,
36
+ [512 /* PatchFlags.NEED_PATCH */]: `NEED_PATCH`,
37
+ [1024 /* PatchFlags.DYNAMIC_SLOTS */]: `DYNAMIC_SLOTS`,
38
+ [2048 /* PatchFlags.DEV_ROOT_FRAGMENT */]: `DEV_ROOT_FRAGMENT`,
39
+ [-1 /* PatchFlags.HOISTED */]: `HOISTED`,
40
+ [-2 /* PatchFlags.BAIL */]: `BAIL`
41
+ };
42
+
23
43
  const GLOBALS_WHITE_LISTED = 'Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,' +
24
44
  'decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,' +
25
45
  'Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt';
@@ -117,7 +137,7 @@ function normalizeProps(props) {
117
137
  // These tag configs are shared between compiler-dom and runtime-dom, so they
118
138
  // https://developer.mozilla.org/en-US/docs/Web/HTML/Element
119
139
  const HTML_TAGS = 'html,body,base,head,link,meta,style,title,address,article,aside,footer,' +
120
- 'header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' +
140
+ 'header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' +
121
141
  'figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,' +
122
142
  'data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,' +
123
143
  'time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,' +
@@ -129,7 +149,7 @@ const HTML_TAGS = 'html,body,base,head,link,meta,style,title,address,article,asi
129
149
  const SVG_TAGS = 'svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,' +
130
150
  'defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,' +
131
151
  'feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,' +
132
- 'feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,' +
152
+ 'feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,' +
133
153
  'feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,' +
134
154
  'fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,' +
135
155
  'foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,' +
@@ -395,12 +415,13 @@ const remove = (arr, el) => {
395
415
  arr.splice(i, 1);
396
416
  }
397
417
  };
398
- const hasOwnProperty = Object.prototype.hasOwnProperty;
399
- const hasOwn = (val, key) => hasOwnProperty.call(val, key);
418
+ const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
419
+ const hasOwn = (val, key) => hasOwnProperty$1.call(val, key);
400
420
  const isArray = Array.isArray;
401
421
  const isMap = (val) => toTypeString(val) === '[object Map]';
402
422
  const isSet = (val) => toTypeString(val) === '[object Set]';
403
423
  const isDate = (val) => toTypeString(val) === '[object Date]';
424
+ const isRegExp = (val) => toTypeString(val) === '[object RegExp]';
404
425
  const isFunction = (val) => typeof val === 'function';
405
426
  const isString = (val) => typeof val === 'string';
406
427
  const isSymbol = (val) => typeof val === 'symbol';
@@ -467,10 +488,22 @@ const def = (obj, key, value) => {
467
488
  value
468
489
  });
469
490
  };
470
- const toNumber = (val) => {
491
+ /**
492
+ * "123-foo" will be parsed to 123
493
+ * This is used for the .number modifier in v-model
494
+ */
495
+ const looseToNumber = (val) => {
471
496
  const n = parseFloat(val);
472
497
  return isNaN(n) ? val : n;
473
498
  };
499
+ /**
500
+ * Only conerces number-like strings
501
+ * "123-foo" will be returned as-is
502
+ */
503
+ const toNumber = (val) => {
504
+ const n = isString(val) ? Number(val) : NaN;
505
+ return isNaN(n) ? val : n;
506
+ };
474
507
  let _globalThis;
475
508
  const getGlobalThis = () => {
476
509
  return (_globalThis ||
@@ -499,7 +532,7 @@ class EffectScope {
499
532
  /**
500
533
  * @internal
501
534
  */
502
- this.active = true;
535
+ this._active = true;
503
536
  /**
504
537
  * @internal
505
538
  */
@@ -514,8 +547,11 @@ class EffectScope {
514
547
  (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;
515
548
  }
516
549
  }
550
+ get active() {
551
+ return this._active;
552
+ }
517
553
  run(fn) {
518
- if (this.active) {
554
+ if (this._active) {
519
555
  const currentEffectScope = activeEffectScope;
520
556
  try {
521
557
  activeEffectScope = this;
@@ -541,7 +577,7 @@ class EffectScope {
541
577
  activeEffectScope = this.parent;
542
578
  }
543
579
  stop(fromParent) {
544
- if (this.active) {
580
+ if (this._active) {
545
581
  let i, l;
546
582
  for (i = 0, l = this.effects.length; i < l; i++) {
547
583
  this.effects[i].stop();
@@ -564,7 +600,7 @@ class EffectScope {
564
600
  }
565
601
  }
566
602
  this.parent = undefined;
567
- this.active = false;
603
+ this._active = false;
568
604
  }
569
605
  }
570
606
  }
@@ -776,7 +812,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
776
812
  deps = [...depsMap.values()];
777
813
  }
778
814
  else if (key === 'length' && isArray(target)) {
779
- const newLength = toNumber(newValue);
815
+ const newLength = Number(newValue);
780
816
  depsMap.forEach((dep, key) => {
781
817
  if (key === 'length' || key >= newLength) {
782
818
  deps.push(dep);
@@ -860,6 +896,10 @@ function triggerEffect(effect, debuggerEventExtraInfo) {
860
896
  }
861
897
  }
862
898
  }
899
+ function getDepFromReactive(object, key) {
900
+ var _a;
901
+ return (_a = targetMap.get(object)) === null || _a === void 0 ? void 0 : _a.get(key);
902
+ }
863
903
 
864
904
  const isNonTrackableKeys = /*#__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`);
865
905
  const builtInSymbols = new Set(
@@ -871,7 +911,7 @@ Object.getOwnPropertyNames(Symbol)
871
911
  .filter(key => key !== 'arguments' && key !== 'caller')
872
912
  .map(key => Symbol[key])
873
913
  .filter(isSymbol));
874
- const get = /*#__PURE__*/ createGetter();
914
+ const get$1 = /*#__PURE__*/ createGetter();
875
915
  const shallowGet = /*#__PURE__*/ createGetter(false, true);
876
916
  const readonlyGet = /*#__PURE__*/ createGetter(true);
877
917
  const shallowReadonlyGet = /*#__PURE__*/ createGetter(true, true);
@@ -905,6 +945,11 @@ function createArrayInstrumentations() {
905
945
  });
906
946
  return instrumentations;
907
947
  }
948
+ function hasOwnProperty(key) {
949
+ const obj = toRaw(this);
950
+ track(obj, "has" /* TrackOpTypes.HAS */, key);
951
+ return obj.hasOwnProperty(key);
952
+ }
908
953
  function createGetter(isReadonly = false, shallow = false) {
909
954
  return function get(target, key, receiver) {
910
955
  if (key === "__v_isReactive" /* ReactiveFlags.IS_REACTIVE */) {
@@ -928,8 +973,13 @@ function createGetter(isReadonly = false, shallow = false) {
928
973
  return target;
929
974
  }
930
975
  const targetIsArray = isArray(target);
931
- if (!isReadonly && targetIsArray && hasOwn(arrayInstrumentations, key)) {
932
- return Reflect.get(arrayInstrumentations, key, receiver);
976
+ if (!isReadonly) {
977
+ if (targetIsArray && hasOwn(arrayInstrumentations, key)) {
978
+ return Reflect.get(arrayInstrumentations, key, receiver);
979
+ }
980
+ if (key === 'hasOwnProperty') {
981
+ return hasOwnProperty;
982
+ }
933
983
  }
934
984
  const res = Reflect.get(target, key, receiver);
935
985
  if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
@@ -954,7 +1004,7 @@ function createGetter(isReadonly = false, shallow = false) {
954
1004
  return res;
955
1005
  };
956
1006
  }
957
- const set = /*#__PURE__*/ createSetter();
1007
+ const set$1 = /*#__PURE__*/ createSetter();
958
1008
  const shallowSet = /*#__PURE__*/ createSetter(true);
959
1009
  function createSetter(shallow = false) {
960
1010
  return function set(target, key, value, receiver) {
@@ -997,7 +1047,7 @@ function deleteProperty(target, key) {
997
1047
  }
998
1048
  return result;
999
1049
  }
1000
- function has(target, key) {
1050
+ function has$1(target, key) {
1001
1051
  const result = Reflect.has(target, key);
1002
1052
  if (!isSymbol(key) || !builtInSymbols.has(key)) {
1003
1053
  track(target, "has" /* TrackOpTypes.HAS */, key);
@@ -1009,10 +1059,10 @@ function ownKeys(target) {
1009
1059
  return Reflect.ownKeys(target);
1010
1060
  }
1011
1061
  const mutableHandlers = {
1012
- get,
1013
- set,
1062
+ get: get$1,
1063
+ set: set$1,
1014
1064
  deleteProperty,
1015
- has,
1065
+ has: has$1,
1016
1066
  ownKeys
1017
1067
  };
1018
1068
  const readonlyHandlers = {
@@ -1037,7 +1087,7 @@ const shallowReadonlyHandlers = /*#__PURE__*/ extend({}, readonlyHandlers, {
1037
1087
 
1038
1088
  const toShallow = (value) => value;
1039
1089
  const getProto = (v) => Reflect.getPrototypeOf(v);
1040
- function get$1(target, key, isReadonly = false, isShallow = false) {
1090
+ function get(target, key, isReadonly = false, isShallow = false) {
1041
1091
  // #1772: readonly(reactive(Map)) should return readonly + reactive version
1042
1092
  // of the value
1043
1093
  target = target["__v_raw" /* ReactiveFlags.RAW */];
@@ -1063,7 +1113,7 @@ function get$1(target, key, isReadonly = false, isShallow = false) {
1063
1113
  target.get(key);
1064
1114
  }
1065
1115
  }
1066
- function has$1(key, isReadonly = false) {
1116
+ function has(key, isReadonly = false) {
1067
1117
  const target = this["__v_raw" /* ReactiveFlags.RAW */];
1068
1118
  const rawTarget = toRaw(target);
1069
1119
  const rawKey = toRaw(key);
@@ -1093,7 +1143,7 @@ function add(value) {
1093
1143
  }
1094
1144
  return this;
1095
1145
  }
1096
- function set$1(key, value) {
1146
+ function set(key, value) {
1097
1147
  value = toRaw(value);
1098
1148
  const target = toRaw(this);
1099
1149
  const { has, get } = getProto(target);
@@ -1192,41 +1242,41 @@ function createReadonlyMethod(type) {
1192
1242
  function createInstrumentations() {
1193
1243
  const mutableInstrumentations = {
1194
1244
  get(key) {
1195
- return get$1(this, key);
1245
+ return get(this, key);
1196
1246
  },
1197
1247
  get size() {
1198
1248
  return size(this);
1199
1249
  },
1200
- has: has$1,
1250
+ has,
1201
1251
  add,
1202
- set: set$1,
1252
+ set,
1203
1253
  delete: deleteEntry,
1204
1254
  clear,
1205
1255
  forEach: createForEach(false, false)
1206
1256
  };
1207
1257
  const shallowInstrumentations = {
1208
1258
  get(key) {
1209
- return get$1(this, key, false, true);
1259
+ return get(this, key, false, true);
1210
1260
  },
1211
1261
  get size() {
1212
1262
  return size(this);
1213
1263
  },
1214
- has: has$1,
1264
+ has,
1215
1265
  add,
1216
- set: set$1,
1266
+ set,
1217
1267
  delete: deleteEntry,
1218
1268
  clear,
1219
1269
  forEach: createForEach(false, true)
1220
1270
  };
1221
1271
  const readonlyInstrumentations = {
1222
1272
  get(key) {
1223
- return get$1(this, key, true);
1273
+ return get(this, key, true);
1224
1274
  },
1225
1275
  get size() {
1226
1276
  return size(this, true);
1227
1277
  },
1228
1278
  has(key) {
1229
- return has$1.call(this, key, true);
1279
+ return has.call(this, key, true);
1230
1280
  },
1231
1281
  add: createReadonlyMethod("add" /* TriggerOpTypes.ADD */),
1232
1282
  set: createReadonlyMethod("set" /* TriggerOpTypes.SET */),
@@ -1236,13 +1286,13 @@ function createInstrumentations() {
1236
1286
  };
1237
1287
  const shallowReadonlyInstrumentations = {
1238
1288
  get(key) {
1239
- return get$1(this, key, true, true);
1289
+ return get(this, key, true, true);
1240
1290
  },
1241
1291
  get size() {
1242
1292
  return size(this, true);
1243
1293
  },
1244
1294
  has(key) {
1245
- return has$1.call(this, key, true);
1295
+ return has.call(this, key, true);
1246
1296
  },
1247
1297
  add: createReadonlyMethod("add" /* TriggerOpTypes.ADD */),
1248
1298
  set: createReadonlyMethod("set" /* TriggerOpTypes.SET */),
@@ -1415,9 +1465,10 @@ function trackRefValue(ref) {
1415
1465
  }
1416
1466
  function triggerRefValue(ref, newVal) {
1417
1467
  ref = toRaw(ref);
1418
- if (ref.dep) {
1468
+ const dep = ref.dep;
1469
+ if (dep) {
1419
1470
  {
1420
- triggerEffects(ref.dep);
1471
+ triggerEffects(dep);
1421
1472
  }
1422
1473
  }
1423
1474
  }
@@ -1521,6 +1572,9 @@ class ObjectRefImpl {
1521
1572
  set value(newVal) {
1522
1573
  this._object[this._key] = newVal;
1523
1574
  }
1575
+ get dep() {
1576
+ return getDepFromReactive(toRaw(this._object), this._key);
1577
+ }
1524
1578
  }
1525
1579
  function toRef(object, key, defaultValue) {
1526
1580
  const val = object[key];
@@ -1562,7 +1616,7 @@ class ComputedRefImpl {
1562
1616
  }
1563
1617
  }
1564
1618
  _a = "__v_isReadonly" /* ReactiveFlags.IS_READONLY */;
1565
- function computed(getterOrOptions, debugOptions, isSSR = false) {
1619
+ function computed$1(getterOrOptions, debugOptions, isSSR = false) {
1566
1620
  let getter;
1567
1621
  let setter;
1568
1622
  const onlyGetter = isFunction(getterOrOptions);
@@ -1581,6 +1635,12 @@ function computed(getterOrOptions, debugOptions, isSSR = false) {
1581
1635
  function warn(msg, ...args) {
1582
1636
  return;
1583
1637
  }
1638
+ /**
1639
+ * @internal
1640
+ */
1641
+ function assertNumber(val, type) {
1642
+ return;
1643
+ }
1584
1644
 
1585
1645
  function callWithErrorHandling(fn, instance, type, args) {
1586
1646
  let res;
@@ -1854,7 +1914,7 @@ function getCompatConfigForKey(key, instance) {
1854
1914
  }
1855
1915
  return globalCompatConfig[key];
1856
1916
  }
1857
- function isCompatEnabled(key, instance, enableForBuiltIn = false) {
1917
+ function isCompatEnabled$1(key, instance, enableForBuiltIn = false) {
1858
1918
  // skip compat for built-in components
1859
1919
  if (!enableForBuiltIn && instance && instance.type.__isBuiltIn) {
1860
1920
  return false;
@@ -1875,7 +1935,7 @@ function isCompatEnabled(key, instance, enableForBuiltIn = false) {
1875
1935
  * Use this for features that are completely removed in non-compat build.
1876
1936
  */
1877
1937
  function assertCompatEnabled(key, instance, ...args) {
1878
- if (!isCompatEnabled(key, instance)) {
1938
+ if (!isCompatEnabled$1(key, instance)) {
1879
1939
  throw new Error(`${key} compat has been disabled.`);
1880
1940
  }
1881
1941
  }
@@ -1884,15 +1944,15 @@ function assertCompatEnabled(key, instance, ...args) {
1884
1944
  * lead to runtime error if compat is disabled. (warn in all cases)
1885
1945
  */
1886
1946
  function softAssertCompatEnabled(key, instance, ...args) {
1887
- return isCompatEnabled(key, instance);
1947
+ return isCompatEnabled$1(key, instance);
1888
1948
  }
1889
1949
  /**
1890
1950
  * Use this for features with the same syntax but with mutually exclusive
1891
1951
  * behavior in 2 vs 3. Only warn if compat is enabled.
1892
1952
  * e.g. render function
1893
1953
  */
1894
- function checkCompatEnabled(key, instance, ...args) {
1895
- const enabled = isCompatEnabled(key, instance);
1954
+ function checkCompatEnabled$1(key, instance, ...args) {
1955
+ const enabled = isCompatEnabled$1(key, instance);
1896
1956
  return enabled;
1897
1957
  }
1898
1958
 
@@ -1955,7 +2015,7 @@ function off(instance, event, fn) {
1955
2015
  events[event] = cbs.filter(cb => !(cb === fn || cb.fn === fn));
1956
2016
  return vm;
1957
2017
  }
1958
- function emit(instance, event, args) {
2018
+ function emit$1(instance, event, args) {
1959
2019
  const cbs = getRegistry(instance)[event];
1960
2020
  if (cbs) {
1961
2021
  callWithAsyncErrorHandling(cbs.map(cb => cb.bind(instance.proxy)), instance, 6 /* ErrorCodes.COMPONENT_EVENT_HANDLER */, args);
@@ -1968,7 +2028,7 @@ function convertLegacyVModelProps(vnode) {
1968
2028
  const { type, shapeFlag, props, dynamicProps } = vnode;
1969
2029
  const comp = type;
1970
2030
  if (shapeFlag & 6 /* ShapeFlags.COMPONENT */ && props && 'modelValue' in props) {
1971
- if (!isCompatEnabled("COMPONENT_V_MODEL" /* DeprecationTypes.COMPONENT_V_MODEL */,
2031
+ if (!isCompatEnabled$1("COMPONENT_V_MODEL" /* DeprecationTypes.COMPONENT_V_MODEL */,
1972
2032
  // this is a special case where we want to use the vnode component's
1973
2033
  // compat config instead of the current rendering instance (which is the
1974
2034
  // parent of the component that exposes v-model)
@@ -2004,7 +2064,7 @@ function applyModelFromMixins(model, mixins) {
2004
2064
  }
2005
2065
  }
2006
2066
  function compatModelEmit(instance, event, args) {
2007
- if (!isCompatEnabled("COMPONENT_V_MODEL" /* DeprecationTypes.COMPONENT_V_MODEL */, instance)) {
2067
+ if (!isCompatEnabled$1("COMPONENT_V_MODEL" /* DeprecationTypes.COMPONENT_V_MODEL */, instance)) {
2008
2068
  return;
2009
2069
  }
2010
2070
  const props = instance.vnode.props;
@@ -2014,7 +2074,7 @@ function compatModelEmit(instance, event, args) {
2014
2074
  }
2015
2075
  }
2016
2076
 
2017
- function emit$1(instance, event, ...rawArgs) {
2077
+ function emit(instance, event, ...rawArgs) {
2018
2078
  if (instance.isUnmounted)
2019
2079
  return;
2020
2080
  const props = instance.vnode.props || EMPTY_OBJ;
@@ -2029,7 +2089,7 @@ function emit$1(instance, event, ...rawArgs) {
2029
2089
  args = rawArgs.map(a => (isString(a) ? a.trim() : a));
2030
2090
  }
2031
2091
  if (number) {
2032
- args = rawArgs.map(toNumber);
2092
+ args = rawArgs.map(looseToNumber);
2033
2093
  }
2034
2094
  }
2035
2095
  let handlerName;
@@ -2057,7 +2117,7 @@ function emit$1(instance, event, ...rawArgs) {
2057
2117
  }
2058
2118
  {
2059
2119
  compatModelEmit(instance, event, args);
2060
- return emit(instance, event, args);
2120
+ return emit$1(instance, event, args);
2061
2121
  }
2062
2122
  }
2063
2123
  function normalizeEmitsOptions(comp, appContext, asMixin = false) {
@@ -2278,7 +2338,7 @@ function renderComponentRoot(instance) {
2278
2338
  }
2279
2339
  }
2280
2340
  }
2281
- if (isCompatEnabled("INSTANCE_ATTRS_CLASS_STYLE" /* DeprecationTypes.INSTANCE_ATTRS_CLASS_STYLE */, instance) &&
2341
+ if (isCompatEnabled$1("INSTANCE_ATTRS_CLASS_STYLE" /* DeprecationTypes.INSTANCE_ATTRS_CLASS_STYLE */, instance) &&
2282
2342
  vnode.shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */ &&
2283
2343
  root.shapeFlag & (1 /* ShapeFlags.ELEMENT */ | 6 /* ShapeFlags.COMPONENT */)) {
2284
2344
  const { class: cls, style } = vnode.props || {};
@@ -2580,7 +2640,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotSc
2580
2640
  }
2581
2641
  function createSuspenseBoundary(vnode, parent, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
2582
2642
  const { p: patch, m: move, um: unmount, n: next, o: { parentNode, remove } } = rendererInternals;
2583
- const timeout = toNumber(vnode.props && vnode.props.timeout);
2643
+ const timeout = vnode.props ? toNumber(vnode.props.timeout) : undefined;
2584
2644
  const suspense = {
2585
2645
  vnode,
2586
2646
  parent,
@@ -2872,10 +2932,10 @@ function watchEffect(effect, options) {
2872
2932
  return doWatch(effect, null, options);
2873
2933
  }
2874
2934
  function watchPostEffect(effect, options) {
2875
- return doWatch(effect, null, ({ flush: 'post' }));
2935
+ return doWatch(effect, null, { flush: 'post' });
2876
2936
  }
2877
2937
  function watchSyncEffect(effect, options) {
2878
- return doWatch(effect, null, ({ flush: 'sync' }));
2938
+ return doWatch(effect, null, { flush: 'sync' });
2879
2939
  }
2880
2940
  // initial value for watchers to trigger on undefined initial values
2881
2941
  const INITIAL_WATCHER_VALUE = {};
@@ -2884,7 +2944,8 @@ function watch(source, cb, options) {
2884
2944
  return doWatch(source, cb, options);
2885
2945
  }
2886
2946
  function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) {
2887
- const instance = currentInstance;
2947
+ const instance = getCurrentScope() === (currentInstance === null || currentInstance === void 0 ? void 0 : currentInstance.scope) ? currentInstance : null;
2948
+ // const instance = currentInstance
2888
2949
  let getter;
2889
2950
  let forceTrigger = false;
2890
2951
  let isMultiSource = false;
@@ -2939,7 +3000,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
2939
3000
  getter = () => {
2940
3001
  const val = baseGetter();
2941
3002
  if (isArray(val) &&
2942
- checkCompatEnabled("WATCH_ARRAY" /* DeprecationTypes.WATCH_ARRAY */, instance)) {
3003
+ checkCompatEnabled$1("WATCH_ARRAY" /* DeprecationTypes.WATCH_ARRAY */, instance)) {
2943
3004
  traverse(val);
2944
3005
  }
2945
3006
  return val;
@@ -2995,7 +3056,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
2995
3056
  ? newValue.some((v, i) => hasChanged(v, oldValue[i]))
2996
3057
  : hasChanged(newValue, oldValue)) ||
2997
3058
  (isArray(newValue) &&
2998
- isCompatEnabled("WATCH_ARRAY" /* DeprecationTypes.WATCH_ARRAY */, instance))) {
3059
+ isCompatEnabled$1("WATCH_ARRAY" /* DeprecationTypes.WATCH_ARRAY */, instance))) {
2999
3060
  // cleanup before running cb again
3000
3061
  if (cleanup) {
3001
3062
  cleanup();
@@ -3005,7 +3066,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
3005
3066
  // pass undefined as the old value when it's changed for the first time
3006
3067
  oldValue === INITIAL_WATCHER_VALUE
3007
3068
  ? undefined
3008
- : (isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE)
3069
+ : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE
3009
3070
  ? []
3010
3071
  : oldValue,
3011
3072
  onCleanup
@@ -3675,7 +3736,7 @@ const KeepAliveImpl = {
3675
3736
  }
3676
3737
  function pruneCacheEntry(key) {
3677
3738
  const cached = cache.get(key);
3678
- if (!current || cached.type !== current.type) {
3739
+ if (!current || !isSameVNodeType(cached, current)) {
3679
3740
  unmount(cached);
3680
3741
  }
3681
3742
  else if (current) {
@@ -3707,7 +3768,7 @@ const KeepAliveImpl = {
3707
3768
  cache.forEach(cached => {
3708
3769
  const { subTree, suspense } = instance;
3709
3770
  const vnode = getInnerChild(subTree);
3710
- if (cached.type === vnode.type) {
3771
+ if (cached.type === vnode.type && cached.key === vnode.key) {
3711
3772
  // current instance will be unmounted as part of keep-alive's unmount
3712
3773
  resetShapeFlag(vnode);
3713
3774
  // but invoke its deactivated hook here
@@ -3804,7 +3865,7 @@ function matches(pattern, name) {
3804
3865
  else if (isString(pattern)) {
3805
3866
  return pattern.split(',').includes(name);
3806
3867
  }
3807
- else if (pattern.test) {
3868
+ else if (isRegExp(pattern)) {
3808
3869
  return pattern.test(name);
3809
3870
  }
3810
3871
  /* istanbul ignore next */
@@ -3919,18 +3980,18 @@ function getCompatChildren(instance) {
3919
3980
  const root = instance.subTree;
3920
3981
  const children = [];
3921
3982
  if (root) {
3922
- walk(root, children);
3983
+ walk$1(root, children);
3923
3984
  }
3924
3985
  return children;
3925
3986
  }
3926
- function walk(vnode, children) {
3987
+ function walk$1(vnode, children) {
3927
3988
  if (vnode.component) {
3928
3989
  children.push(vnode.component.proxy);
3929
3990
  }
3930
3991
  else if (vnode.shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
3931
3992
  const vnodes = vnode.children;
3932
3993
  for (let i = 0; i < vnodes.length; i++) {
3933
- walk(vnodes[i], children);
3994
+ walk$1(vnodes[i], children);
3934
3995
  }
3935
3996
  }
3936
3997
  }
@@ -4085,7 +4146,7 @@ function resolveDirective(name) {
4085
4146
  * v2 compat only
4086
4147
  * @internal
4087
4148
  */
4088
- function resolveFilter(name) {
4149
+ function resolveFilter$1(name) {
4089
4150
  return resolveAsset(FILTERS, name);
4090
4151
  }
4091
4152
  // implementation
@@ -4138,7 +4199,7 @@ function convertLegacyRenderFn(instance) {
4138
4199
  return;
4139
4200
  }
4140
4201
  // v2 render function, try to provide compat
4141
- if (checkCompatEnabled("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, instance)) {
4202
+ if (checkCompatEnabled$1("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, instance)) {
4142
4203
  const wrapped = (Component.render = function compatRender() {
4143
4204
  // @ts-ignore
4144
4205
  return render.call(this, compatH);
@@ -4299,8 +4360,8 @@ function convertLegacySlots(vnode) {
4299
4360
  }
4300
4361
  function defineLegacyVNodeProperties(vnode) {
4301
4362
  /* istanbul ignore if */
4302
- if (isCompatEnabled("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, currentRenderingInstance, true /* enable for built-ins */) &&
4303
- isCompatEnabled("PRIVATE_APIS" /* DeprecationTypes.PRIVATE_APIS */, currentRenderingInstance, true /* enable for built-ins */)) {
4363
+ if (isCompatEnabled$1("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, currentRenderingInstance, true /* enable for built-ins */) &&
4364
+ isCompatEnabled$1("PRIVATE_APIS" /* DeprecationTypes.PRIVATE_APIS */, currentRenderingInstance, true /* enable for built-ins */)) {
4304
4365
  const context = currentRenderingInstance;
4305
4366
  const getInstance = () => vnode.component && vnode.component.proxy;
4306
4367
  let componentOptions;
@@ -4668,7 +4729,7 @@ function installCompatInstanceProperties(map) {
4668
4729
  },
4669
4730
  // overrides existing accessor
4670
4731
  $slots: i => {
4671
- if (isCompatEnabled("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, i) &&
4732
+ if (isCompatEnabled$1("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, i) &&
4672
4733
  i.render &&
4673
4734
  i.render._compatWrapped) {
4674
4735
  return new Proxy(i.slots, legacySlotProxyHandlers);
@@ -4693,7 +4754,7 @@ function installCompatInstanceProperties(map) {
4693
4754
  $listeners: getCompatListeners
4694
4755
  });
4695
4756
  /* istanbul ignore if */
4696
- if (isCompatEnabled("PRIVATE_APIS" /* DeprecationTypes.PRIVATE_APIS */, null)) {
4757
+ if (isCompatEnabled$1("PRIVATE_APIS" /* DeprecationTypes.PRIVATE_APIS */, null)) {
4697
4758
  extend(map, {
4698
4759
  // needed by many libs / render fns
4699
4760
  $vnode: i => i.vnode,
@@ -4715,14 +4776,14 @@ function installCompatInstanceProperties(map) {
4715
4776
  $createElement: () => compatH,
4716
4777
  _c: () => compatH,
4717
4778
  _o: () => legacyMarkOnce,
4718
- _n: () => toNumber,
4779
+ _n: () => looseToNumber,
4719
4780
  _s: () => toDisplayString,
4720
4781
  _l: () => renderList,
4721
4782
  _t: i => legacyRenderSlot.bind(null, i),
4722
4783
  _q: () => looseEqual,
4723
4784
  _i: () => looseIndexOf,
4724
4785
  _m: i => legacyRenderStatic.bind(null, i),
4725
- _f: () => resolveFilter,
4786
+ _f: () => resolveFilter$1,
4726
4787
  _k: i => legacyCheckKeyCodes.bind(null, i),
4727
4788
  _b: () => legacyBindObjectProps,
4728
4789
  _v: () => createTextVNode,
@@ -4940,7 +5001,7 @@ function applyOptions(instance) {
4940
5001
  // call beforeCreate first before accessing other options since
4941
5002
  // the hook may mutate resolved options (#2791)
4942
5003
  if (options.beforeCreate) {
4943
- callHook(options.beforeCreate, instance, "bc" /* LifecycleHooks.BEFORE_CREATE */);
5004
+ callHook$1(options.beforeCreate, instance, "bc" /* LifecycleHooks.BEFORE_CREATE */);
4944
5005
  }
4945
5006
  const {
4946
5007
  // state
@@ -4995,7 +5056,7 @@ function applyOptions(instance) {
4995
5056
  const set = !isFunction(opt) && isFunction(opt.set)
4996
5057
  ? opt.set.bind(publicThis)
4997
5058
  : NOOP;
4998
- const c = computed$1({
5059
+ const c = computed({
4999
5060
  get,
5000
5061
  set
5001
5062
  });
@@ -5021,7 +5082,7 @@ function applyOptions(instance) {
5021
5082
  });
5022
5083
  }
5023
5084
  if (created) {
5024
- callHook(created, instance, "c" /* LifecycleHooks.CREATED */);
5085
+ callHook$1(created, instance, "c" /* LifecycleHooks.CREATED */);
5025
5086
  }
5026
5087
  function registerLifecycleHook(register, hook) {
5027
5088
  if (isArray(hook)) {
@@ -5081,7 +5142,7 @@ function applyOptions(instance) {
5081
5142
  if (directives)
5082
5143
  instance.directives = directives;
5083
5144
  if (filters &&
5084
- isCompatEnabled("FILTERS" /* DeprecationTypes.FILTERS */, instance)) {
5145
+ isCompatEnabled$1("FILTERS" /* DeprecationTypes.FILTERS */, instance)) {
5085
5146
  instance.filters = filters;
5086
5147
  }
5087
5148
  }
@@ -5122,7 +5183,7 @@ function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP,
5122
5183
  }
5123
5184
  }
5124
5185
  }
5125
- function callHook(hook, instance, type) {
5186
+ function callHook$1(hook, instance, type) {
5126
5187
  callWithAsyncErrorHandling(isArray(hook)
5127
5188
  ? hook.map(h => h.bind(instance.proxy))
5128
5189
  : hook.bind(instance.proxy), instance, type);
@@ -5170,7 +5231,7 @@ function resolveMergedOptions(instance) {
5170
5231
  resolved = cached;
5171
5232
  }
5172
5233
  else if (!globalMixins.length && !mixins && !extendsOptions) {
5173
- if (isCompatEnabled("PRIVATE_APIS" /* DeprecationTypes.PRIVATE_APIS */, instance)) {
5234
+ if (isCompatEnabled$1("PRIVATE_APIS" /* DeprecationTypes.PRIVATE_APIS */, instance)) {
5174
5235
  resolved = extend({}, base);
5175
5236
  resolved.parent = instance.parent && instance.parent.proxy;
5176
5237
  resolved.propsData = instance.vnode.props;
@@ -5219,20 +5280,20 @@ const internalOptionMergeStrats = {
5219
5280
  methods: mergeObjectOptions,
5220
5281
  computed: mergeObjectOptions,
5221
5282
  // lifecycle
5222
- beforeCreate: mergeAsArray,
5223
- created: mergeAsArray,
5224
- beforeMount: mergeAsArray,
5225
- mounted: mergeAsArray,
5226
- beforeUpdate: mergeAsArray,
5227
- updated: mergeAsArray,
5228
- beforeDestroy: mergeAsArray,
5229
- beforeUnmount: mergeAsArray,
5230
- destroyed: mergeAsArray,
5231
- unmounted: mergeAsArray,
5232
- activated: mergeAsArray,
5233
- deactivated: mergeAsArray,
5234
- errorCaptured: mergeAsArray,
5235
- serverPrefetch: mergeAsArray,
5283
+ beforeCreate: mergeAsArray$1,
5284
+ created: mergeAsArray$1,
5285
+ beforeMount: mergeAsArray$1,
5286
+ mounted: mergeAsArray$1,
5287
+ beforeUpdate: mergeAsArray$1,
5288
+ updated: mergeAsArray$1,
5289
+ beforeDestroy: mergeAsArray$1,
5290
+ beforeUnmount: mergeAsArray$1,
5291
+ destroyed: mergeAsArray$1,
5292
+ unmounted: mergeAsArray$1,
5293
+ activated: mergeAsArray$1,
5294
+ deactivated: mergeAsArray$1,
5295
+ errorCaptured: mergeAsArray$1,
5296
+ serverPrefetch: mergeAsArray$1,
5236
5297
  // assets
5237
5298
  components: mergeObjectOptions,
5238
5299
  directives: mergeObjectOptions,
@@ -5253,7 +5314,7 @@ function mergeDataFn(to, from) {
5253
5314
  return from;
5254
5315
  }
5255
5316
  return function mergedDataFn() {
5256
- return (isCompatEnabled("OPTIONS_DATA_MERGE" /* DeprecationTypes.OPTIONS_DATA_MERGE */, null)
5317
+ return (isCompatEnabled$1("OPTIONS_DATA_MERGE" /* DeprecationTypes.OPTIONS_DATA_MERGE */, null)
5257
5318
  ? deepMergeData
5258
5319
  : extend)(isFunction(to) ? to.call(this, this) : to, isFunction(from) ? from.call(this, this) : from);
5259
5320
  };
@@ -5271,7 +5332,7 @@ function normalizeInject(raw) {
5271
5332
  }
5272
5333
  return raw;
5273
5334
  }
5274
- function mergeAsArray(to, from) {
5335
+ function mergeAsArray$1(to, from) {
5275
5336
  return to ? [...new Set([].concat(to, from))] : from;
5276
5337
  }
5277
5338
  function mergeObjectOptions(to, from) {
@@ -5284,7 +5345,7 @@ function mergeWatchOptions(to, from) {
5284
5345
  return to;
5285
5346
  const merged = extend(Object.create(null), to);
5286
5347
  for (const key in from) {
5287
- merged[key] = mergeAsArray(to[key], from[key]);
5348
+ merged[key] = mergeAsArray$1(to[key], from[key]);
5288
5349
  }
5289
5350
  return merged;
5290
5351
  }
@@ -5321,11 +5382,11 @@ function shouldSkipAttr(key, instance) {
5321
5382
  return true;
5322
5383
  }
5323
5384
  if ((key === 'class' || key === 'style') &&
5324
- isCompatEnabled("INSTANCE_ATTRS_CLASS_STYLE" /* DeprecationTypes.INSTANCE_ATTRS_CLASS_STYLE */, instance)) {
5385
+ isCompatEnabled$1("INSTANCE_ATTRS_CLASS_STYLE" /* DeprecationTypes.INSTANCE_ATTRS_CLASS_STYLE */, instance)) {
5325
5386
  return true;
5326
5387
  }
5327
5388
  if (isOn(key) &&
5328
- isCompatEnabled("INSTANCE_LISTENERS" /* DeprecationTypes.INSTANCE_LISTENERS */, instance)) {
5389
+ isCompatEnabled$1("INSTANCE_LISTENERS" /* DeprecationTypes.INSTANCE_LISTENERS */, instance)) {
5329
5390
  return true;
5330
5391
  }
5331
5392
  // vue-router
@@ -5538,7 +5599,7 @@ function resolvePropValue(options, props, key, value, instance, isAbsent) {
5538
5599
  }
5539
5600
  else {
5540
5601
  setCurrentInstance(instance);
5541
- value = propsDefaults[key] = defaultValue.call(isCompatEnabled("PROPS_DEFAULT_THIS" /* DeprecationTypes.PROPS_DEFAULT_THIS */, instance)
5602
+ value = propsDefaults[key] = defaultValue.call(isCompatEnabled$1("PROPS_DEFAULT_THIS" /* DeprecationTypes.PROPS_DEFAULT_THIS */, instance)
5542
5603
  ? createPropsDefaultThis(instance, props)
5543
5604
  : null, props);
5544
5605
  unsetCurrentInstance();
@@ -5643,8 +5704,8 @@ function validatePropName(key) {
5643
5704
  // use function string name to check type constructors
5644
5705
  // so that it works across vms / iframes.
5645
5706
  function getType(ctor) {
5646
- const match = ctor && ctor.toString().match(/^\s*function (\w+)/);
5647
- return match ? match[1] : ctor === null ? 'null' : '';
5707
+ const match = ctor && ctor.toString().match(/^\s*(function|class) (\w+)/);
5708
+ return match ? match[2] : ctor === null ? 'null' : '';
5648
5709
  }
5649
5710
  function isSameType(a, b) {
5650
5711
  return getType(a) === getType(b);
@@ -5781,7 +5842,7 @@ function installLegacyOptionMergeStrats(config) {
5781
5842
  let singletonApp;
5782
5843
  let singletonCtor;
5783
5844
  // Legacy global Vue constructor
5784
- function createCompatVue(createApp, createSingletonApp) {
5845
+ function createCompatVue$1(createApp, createSingletonApp) {
5785
5846
  singletonApp = createSingletonApp({});
5786
5847
  const Vue = (singletonCtor = function Vue(options = {}) {
5787
5848
  return createCompatApp(options, Vue);
@@ -5806,7 +5867,7 @@ function createCompatVue(createApp, createSingletonApp) {
5806
5867
  return vm;
5807
5868
  }
5808
5869
  }
5809
- Vue.version = `2.6.14-compat:${"3.2.45"}`;
5870
+ Vue.version = `2.6.14-compat:${"3.2.46"}`;
5810
5871
  Vue.config = singletonApp.config;
5811
5872
  Vue.use = (p, ...options) => {
5812
5873
  if (p && isFunction(p.install)) {
@@ -5985,7 +6046,7 @@ function applySingletonAppMutations(app) {
5985
6046
  app.config[key] = isObject(val) ? Object.create(val) : val;
5986
6047
  // compat for runtime ignoredElements -> isCustomElement
5987
6048
  if (key === 'ignoredElements' &&
5988
- isCompatEnabled("CONFIG_IGNORED_ELEMENTS" /* DeprecationTypes.CONFIG_IGNORED_ELEMENTS */, null) &&
6049
+ isCompatEnabled$1("CONFIG_IGNORED_ELEMENTS" /* DeprecationTypes.CONFIG_IGNORED_ELEMENTS */, null) &&
5989
6050
  !isRuntimeOnly() &&
5990
6051
  isArray(val)) {
5991
6052
  app.config.compilerOptions.isCustomElement = tag => {
@@ -5997,7 +6058,7 @@ function applySingletonAppMutations(app) {
5997
6058
  }
5998
6059
  function applySingletonPrototype(app, Ctor) {
5999
6060
  // copy prototype augmentations as config.globalProperties
6000
- const enabled = isCompatEnabled("GLOBAL_PROTOTYPE" /* DeprecationTypes.GLOBAL_PROTOTYPE */, null);
6061
+ const enabled = isCompatEnabled$1("GLOBAL_PROTOTYPE" /* DeprecationTypes.GLOBAL_PROTOTYPE */, null);
6001
6062
  if (enabled) {
6002
6063
  app.config.globalProperties = Object.create(Ctor.prototype);
6003
6064
  }
@@ -6089,7 +6150,7 @@ function installCompatMount(app, context, render) {
6089
6150
  if (bum) {
6090
6151
  invokeArrayFns(bum);
6091
6152
  }
6092
- if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
6153
+ if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
6093
6154
  instance.emit('hook:beforeDestroy');
6094
6155
  }
6095
6156
  // stop effects
@@ -6100,7 +6161,7 @@ function installCompatMount(app, context, render) {
6100
6161
  if (um) {
6101
6162
  invokeArrayFns(um);
6102
6163
  }
6103
- if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
6164
+ if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
6104
6165
  instance.emit('hook:destroyed');
6105
6166
  }
6106
6167
  }
@@ -6192,7 +6253,7 @@ function createAppContext() {
6192
6253
  emitsCache: new WeakMap()
6193
6254
  };
6194
6255
  }
6195
- let uid = 0;
6256
+ let uid$1 = 0;
6196
6257
  function createAppAPI(render, hydrate) {
6197
6258
  return function createApp(rootComponent, rootProps = null) {
6198
6259
  if (!isFunction(rootComponent)) {
@@ -6205,7 +6266,7 @@ function createAppAPI(render, hydrate) {
6205
6266
  const installedPlugins = new Set();
6206
6267
  let isMounted = false;
6207
6268
  const app = (context.app = {
6208
- _uid: uid++,
6269
+ _uid: uid$1++,
6209
6270
  _component: rootComponent,
6210
6271
  _props: rootProps,
6211
6272
  _container: null,
@@ -6854,6 +6915,8 @@ function baseCreateRenderer(options, createHydrationFns) {
6854
6915
  if (dirs) {
6855
6916
  invokeDirectiveHook(vnode, null, parentComponent, 'created');
6856
6917
  }
6918
+ // scopeId
6919
+ setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);
6857
6920
  // props
6858
6921
  if (props) {
6859
6922
  for (const key in props) {
@@ -6877,8 +6940,6 @@ function baseCreateRenderer(options, createHydrationFns) {
6877
6940
  invokeVNodeHook(vnodeHook, parentComponent, vnode);
6878
6941
  }
6879
6942
  }
6880
- // scopeId
6881
- setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);
6882
6943
  if (dirs) {
6883
6944
  invokeDirectiveHook(vnode, null, parentComponent, 'beforeMount');
6884
6945
  }
@@ -7193,7 +7254,7 @@ function baseCreateRenderer(options, createHydrationFns) {
7193
7254
  (vnodeHook = props && props.onVnodeBeforeMount)) {
7194
7255
  invokeVNodeHook(vnodeHook, parent, initialVNode);
7195
7256
  }
7196
- if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
7257
+ if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
7197
7258
  instance.emit('hook:beforeMount');
7198
7259
  }
7199
7260
  toggleRecurse(instance, true);
@@ -7230,7 +7291,7 @@ function baseCreateRenderer(options, createHydrationFns) {
7230
7291
  const scopedInitialVNode = initialVNode;
7231
7292
  queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), parentSuspense);
7232
7293
  }
7233
- if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
7294
+ if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
7234
7295
  queuePostRenderEffect(() => instance.emit('hook:mounted'), parentSuspense);
7235
7296
  }
7236
7297
  // activated hook for keep-alive roots.
@@ -7241,7 +7302,7 @@ function baseCreateRenderer(options, createHydrationFns) {
7241
7302
  isAsyncWrapper(parent.vnode) &&
7242
7303
  parent.vnode.shapeFlag & 256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */)) {
7243
7304
  instance.a && queuePostRenderEffect(instance.a, parentSuspense);
7244
- if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
7305
+ if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
7245
7306
  queuePostRenderEffect(() => instance.emit('hook:activated'), parentSuspense);
7246
7307
  }
7247
7308
  }
@@ -7273,7 +7334,7 @@ function baseCreateRenderer(options, createHydrationFns) {
7273
7334
  if ((vnodeHook = next.props && next.props.onVnodeBeforeUpdate)) {
7274
7335
  invokeVNodeHook(vnodeHook, parent, next, vnode);
7275
7336
  }
7276
- if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
7337
+ if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
7277
7338
  instance.emit('hook:beforeUpdate');
7278
7339
  }
7279
7340
  toggleRecurse(instance, true);
@@ -7300,7 +7361,7 @@ function baseCreateRenderer(options, createHydrationFns) {
7300
7361
  if ((vnodeHook = next.props && next.props.onVnodeUpdated)) {
7301
7362
  queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), parentSuspense);
7302
7363
  }
7303
- if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
7364
+ if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
7304
7365
  queuePostRenderEffect(() => instance.emit('hook:updated'), parentSuspense);
7305
7366
  }
7306
7367
  }
@@ -7739,7 +7800,7 @@ function baseCreateRenderer(options, createHydrationFns) {
7739
7800
  if (bum) {
7740
7801
  invokeArrayFns(bum);
7741
7802
  }
7742
- if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
7803
+ if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
7743
7804
  instance.emit('hook:beforeDestroy');
7744
7805
  }
7745
7806
  // stop effects in component scope
@@ -7755,7 +7816,7 @@ function baseCreateRenderer(options, createHydrationFns) {
7755
7816
  if (um) {
7756
7817
  queuePostRenderEffect(um, parentSuspense);
7757
7818
  }
7758
- if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
7819
+ if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
7759
7820
  queuePostRenderEffect(() => instance.emit('hook:destroyed'), parentSuspense);
7760
7821
  }
7761
7822
  queuePostRenderEffect(() => {
@@ -8147,7 +8208,7 @@ function convertLegacyComponent(comp, instance) {
8147
8208
  }
8148
8209
  // 2.x async component
8149
8210
  if (isFunction(comp) &&
8150
- checkCompatEnabled("COMPONENT_ASYNC" /* DeprecationTypes.COMPONENT_ASYNC */, instance, comp)) {
8211
+ checkCompatEnabled$1("COMPONENT_ASYNC" /* DeprecationTypes.COMPONENT_ASYNC */, instance, comp)) {
8151
8212
  // since after disabling this, plain functions are still valid usage, do not
8152
8213
  // use softAssert here.
8153
8214
  return convertLegacyAsyncComponent(comp);
@@ -8458,7 +8519,8 @@ function cloneVNode(vnode, extraProps, mergeRef = false) {
8458
8519
  ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
8459
8520
  el: vnode.el,
8460
8521
  anchor: vnode.anchor,
8461
- ctx: vnode.ctx
8522
+ ctx: vnode.ctx,
8523
+ ce: vnode.ce
8462
8524
  };
8463
8525
  {
8464
8526
  defineLegacyVNodeProperties(cloned);
@@ -8617,13 +8679,13 @@ function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
8617
8679
  }
8618
8680
 
8619
8681
  const emptyAppContext = createAppContext();
8620
- let uid$1 = 0;
8682
+ let uid = 0;
8621
8683
  function createComponentInstance(vnode, parent, suspense) {
8622
8684
  const type = vnode.type;
8623
8685
  // inherit parent app context - or - if root, adopt from root vnode
8624
8686
  const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
8625
8687
  const instance = {
8626
- uid: uid$1++,
8688
+ uid: uid++,
8627
8689
  vnode,
8628
8690
  type,
8629
8691
  parent,
@@ -8693,7 +8755,7 @@ function createComponentInstance(vnode, parent, suspense) {
8693
8755
  instance.ctx = { _: instance };
8694
8756
  }
8695
8757
  instance.root = parent ? parent.root : instance;
8696
- instance.emit = emit$1.bind(null, instance);
8758
+ instance.emit = emit.bind(null, instance);
8697
8759
  // apply custom element special handling
8698
8760
  if (vnode.ce) {
8699
8761
  vnode.ce(instance);
@@ -8787,14 +8849,14 @@ function handleSetupResult(instance, setupResult, isSSR) {
8787
8849
  else ;
8788
8850
  finishComponentSetup(instance, isSSR);
8789
8851
  }
8790
- let compile;
8852
+ let compile$1;
8791
8853
  let installWithProxy;
8792
8854
  /**
8793
8855
  * For runtime-dom to register the compiler.
8794
8856
  * Note the exported method uses any to avoid d.ts relying on the compiler types.
8795
8857
  */
8796
8858
  function registerRuntimeCompiler(_compile) {
8797
- compile = _compile;
8859
+ compile$1 = _compile;
8798
8860
  installWithProxy = i => {
8799
8861
  if (i.render._rc) {
8800
8862
  i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers);
@@ -8802,7 +8864,7 @@ function registerRuntimeCompiler(_compile) {
8802
8864
  };
8803
8865
  }
8804
8866
  // dev only
8805
- const isRuntimeOnly = () => !compile;
8867
+ const isRuntimeOnly = () => !compile$1;
8806
8868
  function finishComponentSetup(instance, isSSR, skipOptions) {
8807
8869
  const Component = instance.type;
8808
8870
  {
@@ -8813,7 +8875,7 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
8813
8875
  if (!instance.render) {
8814
8876
  // only do on-the-fly compile if not in SSR - SSR on-the-fly compilation
8815
8877
  // is done by server-renderer
8816
- if (!isSSR && compile && !Component.render) {
8878
+ if (!isSSR && compile$1 && !Component.render) {
8817
8879
  const template = (instance.vnode.props &&
8818
8880
  instance.vnode.props['inline-template']) ||
8819
8881
  Component.template ||
@@ -8833,7 +8895,7 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
8833
8895
  extend(finalCompilerOptions.compatConfig, Component.compatConfig);
8834
8896
  }
8835
8897
  }
8836
- Component.render = compile(template, finalCompilerOptions);
8898
+ Component.render = compile$1(template, finalCompilerOptions);
8837
8899
  }
8838
8900
  }
8839
8901
  instance.render = (Component.render || NOOP);
@@ -8904,9 +8966,9 @@ function isClassComponent(value) {
8904
8966
  return isFunction(value) && '__vccOpts' in value;
8905
8967
  }
8906
8968
 
8907
- const computed$1 = ((getterOrOptions, debugOptions) => {
8969
+ const computed = ((getterOrOptions, debugOptions) => {
8908
8970
  // @ts-ignore
8909
- return computed(getterOrOptions, debugOptions, isInSSRComponentSetup);
8971
+ return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
8910
8972
  });
8911
8973
 
8912
8974
  // implementation
@@ -9107,7 +9169,7 @@ function isMemoSame(cached, memo) {
9107
9169
  }
9108
9170
 
9109
9171
  // Core API ------------------------------------------------------------------
9110
- const version = "3.2.45";
9172
+ const version = "3.2.46";
9111
9173
  const _ssrUtils = {
9112
9174
  createComponentInstance,
9113
9175
  setupComponent,
@@ -9124,12 +9186,12 @@ const ssrUtils = (_ssrUtils );
9124
9186
  /**
9125
9187
  * @internal only exposed in compat builds
9126
9188
  */
9127
- const resolveFilter$1 = resolveFilter ;
9189
+ const resolveFilter = resolveFilter$1 ;
9128
9190
  const _compatUtils = {
9129
9191
  warnDeprecation,
9130
- createCompatVue,
9131
- isCompatEnabled,
9132
- checkCompatEnabled,
9192
+ createCompatVue: createCompatVue$1,
9193
+ isCompatEnabled: isCompatEnabled$1,
9194
+ checkCompatEnabled: checkCompatEnabled$1,
9133
9195
  softAssertCompatEnabled
9134
9196
  };
9135
9197
  /**
@@ -9239,9 +9301,6 @@ function patchStyle(el, prev, next) {
9239
9301
  const style = el.style;
9240
9302
  const isCssString = isString(next);
9241
9303
  if (next && !isCssString) {
9242
- for (const key in next) {
9243
- setStyle(style, key, next[key]);
9244
- }
9245
9304
  if (prev && !isString(prev)) {
9246
9305
  for (const key in prev) {
9247
9306
  if (next[key] == null) {
@@ -9249,6 +9308,9 @@ function patchStyle(el, prev, next) {
9249
9308
  }
9250
9309
  }
9251
9310
  }
9311
+ for (const key in next) {
9312
+ setStyle(style, key, next[key]);
9313
+ }
9252
9314
  }
9253
9315
  else {
9254
9316
  const currentDisplay = style.display;
@@ -9841,7 +9903,7 @@ function useCssVars(getter) {
9841
9903
  return;
9842
9904
  }
9843
9905
 
9844
- const TRANSITION = 'transition';
9906
+ const TRANSITION$1 = 'transition';
9845
9907
  const ANIMATION = 'animation';
9846
9908
  // DOM Transition is a higher-order-component based on the platform-agnostic
9847
9909
  // base Transition component, with DOM-specific logic.
@@ -9874,7 +9936,7 @@ const TransitionPropsValidators = (Transition.props =
9874
9936
  * #3227 Incoming hooks may be merged into arrays when wrapping Transition
9875
9937
  * with custom HOCs.
9876
9938
  */
9877
- const callHook$1 = (hook, args = []) => {
9939
+ const callHook = (hook, args = []) => {
9878
9940
  if (isArray(hook)) {
9879
9941
  hook.forEach(h => h(...args));
9880
9942
  }
@@ -9941,11 +10003,16 @@ function resolveTransitionProps(rawProps) {
9941
10003
  return (el, done) => {
9942
10004
  const hook = isAppear ? onAppear : onEnter;
9943
10005
  const resolve = () => finishEnter(el, isAppear, done);
9944
- callHook$1(hook, [el, resolve]);
10006
+ callHook(hook, [el, resolve]);
9945
10007
  nextFrame(() => {
9946
10008
  removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
9947
10009
  if (legacyClassEnabled) {
9948
- removeTransitionClass(el, isAppear ? legacyAppearFromClass : legacyEnterFromClass);
10010
+ const legacyClass = isAppear
10011
+ ? legacyAppearFromClass
10012
+ : legacyEnterFromClass;
10013
+ if (legacyClass) {
10014
+ removeTransitionClass(el, legacyClass);
10015
+ }
9949
10016
  }
9950
10017
  addTransitionClass(el, isAppear ? appearToClass : enterToClass);
9951
10018
  if (!hasExplicitCallback(hook)) {
@@ -9956,17 +10023,17 @@ function resolveTransitionProps(rawProps) {
9956
10023
  };
9957
10024
  return extend(baseProps, {
9958
10025
  onBeforeEnter(el) {
9959
- callHook$1(onBeforeEnter, [el]);
10026
+ callHook(onBeforeEnter, [el]);
9960
10027
  addTransitionClass(el, enterFromClass);
9961
- if (legacyClassEnabled) {
10028
+ if (legacyClassEnabled && legacyEnterFromClass) {
9962
10029
  addTransitionClass(el, legacyEnterFromClass);
9963
10030
  }
9964
10031
  addTransitionClass(el, enterActiveClass);
9965
10032
  },
9966
10033
  onBeforeAppear(el) {
9967
- callHook$1(onBeforeAppear, [el]);
10034
+ callHook(onBeforeAppear, [el]);
9968
10035
  addTransitionClass(el, appearFromClass);
9969
- if (legacyClassEnabled) {
10036
+ if (legacyClassEnabled && legacyAppearFromClass) {
9970
10037
  addTransitionClass(el, legacyAppearFromClass);
9971
10038
  }
9972
10039
  addTransitionClass(el, appearActiveClass);
@@ -9977,7 +10044,7 @@ function resolveTransitionProps(rawProps) {
9977
10044
  el._isLeaving = true;
9978
10045
  const resolve = () => finishLeave(el, done);
9979
10046
  addTransitionClass(el, leaveFromClass);
9980
- if (legacyClassEnabled) {
10047
+ if (legacyClassEnabled && legacyLeaveFromClass) {
9981
10048
  addTransitionClass(el, legacyLeaveFromClass);
9982
10049
  }
9983
10050
  // force reflow so *-leave-from classes immediately take effect (#2593)
@@ -9989,7 +10056,7 @@ function resolveTransitionProps(rawProps) {
9989
10056
  return;
9990
10057
  }
9991
10058
  removeTransitionClass(el, leaveFromClass);
9992
- if (legacyClassEnabled) {
10059
+ if (legacyClassEnabled && legacyLeaveFromClass) {
9993
10060
  removeTransitionClass(el, legacyLeaveFromClass);
9994
10061
  }
9995
10062
  addTransitionClass(el, leaveToClass);
@@ -9997,19 +10064,19 @@ function resolveTransitionProps(rawProps) {
9997
10064
  whenTransitionEnds(el, type, leaveDuration, resolve);
9998
10065
  }
9999
10066
  });
10000
- callHook$1(onLeave, [el, resolve]);
10067
+ callHook(onLeave, [el, resolve]);
10001
10068
  },
10002
10069
  onEnterCancelled(el) {
10003
10070
  finishEnter(el, false);
10004
- callHook$1(onEnterCancelled, [el]);
10071
+ callHook(onEnterCancelled, [el]);
10005
10072
  },
10006
10073
  onAppearCancelled(el) {
10007
10074
  finishEnter(el, true);
10008
- callHook$1(onAppearCancelled, [el]);
10075
+ callHook(onAppearCancelled, [el]);
10009
10076
  },
10010
10077
  onLeaveCancelled(el) {
10011
10078
  finishLeave(el);
10012
- callHook$1(onLeaveCancelled, [el]);
10079
+ callHook(onLeaveCancelled, [el]);
10013
10080
  }
10014
10081
  });
10015
10082
  }
@@ -10086,8 +10153,8 @@ function getTransitionInfo(el, expectedType) {
10086
10153
  const styles = window.getComputedStyle(el);
10087
10154
  // JSDOM may return undefined for transition properties
10088
10155
  const getStyleProperties = (key) => (styles[key] || '').split(', ');
10089
- const transitionDelays = getStyleProperties(`${TRANSITION}Delay`);
10090
- const transitionDurations = getStyleProperties(`${TRANSITION}Duration`);
10156
+ const transitionDelays = getStyleProperties(`${TRANSITION$1}Delay`);
10157
+ const transitionDurations = getStyleProperties(`${TRANSITION$1}Duration`);
10091
10158
  const transitionTimeout = getTimeout(transitionDelays, transitionDurations);
10092
10159
  const animationDelays = getStyleProperties(`${ANIMATION}Delay`);
10093
10160
  const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
@@ -10096,9 +10163,9 @@ function getTransitionInfo(el, expectedType) {
10096
10163
  let timeout = 0;
10097
10164
  let propCount = 0;
10098
10165
  /* istanbul ignore if */
10099
- if (expectedType === TRANSITION) {
10166
+ if (expectedType === TRANSITION$1) {
10100
10167
  if (transitionTimeout > 0) {
10101
- type = TRANSITION;
10168
+ type = TRANSITION$1;
10102
10169
  timeout = transitionTimeout;
10103
10170
  propCount = transitionDurations.length;
10104
10171
  }
@@ -10115,17 +10182,17 @@ function getTransitionInfo(el, expectedType) {
10115
10182
  type =
10116
10183
  timeout > 0
10117
10184
  ? transitionTimeout > animationTimeout
10118
- ? TRANSITION
10185
+ ? TRANSITION$1
10119
10186
  : ANIMATION
10120
10187
  : null;
10121
10188
  propCount = type
10122
- ? type === TRANSITION
10189
+ ? type === TRANSITION$1
10123
10190
  ? transitionDurations.length
10124
10191
  : animationDurations.length
10125
10192
  : 0;
10126
10193
  }
10127
- const hasTransform = type === TRANSITION &&
10128
- /\b(transform|all)(,|$)/.test(getStyleProperties(`${TRANSITION}Property`).toString());
10194
+ const hasTransform = type === TRANSITION$1 &&
10195
+ /\b(transform|all)(,|$)/.test(getStyleProperties(`${TRANSITION$1}Property`).toString());
10129
10196
  return {
10130
10197
  type,
10131
10198
  timeout,
@@ -10228,6 +10295,14 @@ const TransitionGroupImpl = {
10228
10295
  {
10229
10296
  TransitionGroupImpl.__isBuiltIn = true;
10230
10297
  }
10298
+ /**
10299
+ * TransitionGroup does not support "mode" so we need to remove it from the
10300
+ * props declarations, but direct delete operation is considered a side effect
10301
+ * and will make the entire transition feature non-tree-shakeable, so we do it
10302
+ * in a function and mark the function's invocation as pure.
10303
+ */
10304
+ const removeMode = (props) => delete props.mode;
10305
+ /*#__PURE__*/ removeMode(TransitionGroupImpl.props);
10231
10306
  const TransitionGroup = TransitionGroupImpl;
10232
10307
  function callPendingCbs(c) {
10233
10308
  const el = c.el;
@@ -10303,7 +10378,7 @@ const vModelText = {
10303
10378
  domValue = domValue.trim();
10304
10379
  }
10305
10380
  if (castToNumber) {
10306
- domValue = toNumber(domValue);
10381
+ domValue = looseToNumber(domValue);
10307
10382
  }
10308
10383
  el._assign(domValue);
10309
10384
  });
@@ -10338,7 +10413,8 @@ const vModelText = {
10338
10413
  if (trim && el.value.trim() === value) {
10339
10414
  return;
10340
10415
  }
10341
- if ((number || el.type === 'number') && toNumber(el.value) === value) {
10416
+ if ((number || el.type === 'number') &&
10417
+ looseToNumber(el.value) === value) {
10342
10418
  return;
10343
10419
  }
10344
10420
  }
@@ -10427,7 +10503,7 @@ const vModelSelect = {
10427
10503
  addEventListener(el, 'change', () => {
10428
10504
  const selectedVal = Array.prototype.filter
10429
10505
  .call(el.options, (o) => o.selected)
10430
- .map((o) => number ? toNumber(getValue(o)) : getValue(o));
10506
+ .map((o) => number ? looseToNumber(getValue(o)) : getValue(o));
10431
10507
  el._assign(el.multiple
10432
10508
  ? isSetModel
10433
10509
  ? new Set(selectedVal)
@@ -10774,150 +10850,151 @@ const initDirectivesForSSR = () => {
10774
10850
 
10775
10851
  var runtimeDom = /*#__PURE__*/Object.freeze({
10776
10852
  __proto__: null,
10777
- render: render,
10778
- hydrate: hydrate,
10853
+ BaseTransition: BaseTransition,
10854
+ Comment: Comment,
10855
+ EffectScope: EffectScope,
10856
+ Fragment: Fragment,
10857
+ KeepAlive: KeepAlive,
10858
+ ReactiveEffect: ReactiveEffect,
10859
+ Static: Static,
10860
+ Suspense: Suspense,
10861
+ Teleport: Teleport,
10862
+ Text: Text,
10863
+ Transition: Transition,
10864
+ TransitionGroup: TransitionGroup,
10865
+ VueElement: VueElement,
10866
+ assertNumber: assertNumber,
10867
+ callWithAsyncErrorHandling: callWithAsyncErrorHandling,
10868
+ callWithErrorHandling: callWithErrorHandling,
10869
+ camelize: camelize,
10870
+ capitalize: capitalize,
10871
+ cloneVNode: cloneVNode,
10872
+ compatUtils: compatUtils,
10873
+ computed: computed,
10779
10874
  createApp: createApp,
10875
+ createBlock: createBlock,
10876
+ createCommentVNode: createCommentVNode,
10877
+ createElementBlock: createElementBlock,
10878
+ createElementVNode: createBaseVNode,
10879
+ createHydrationRenderer: createHydrationRenderer,
10880
+ createPropsRestProxy: createPropsRestProxy,
10881
+ createRenderer: createRenderer,
10780
10882
  createSSRApp: createSSRApp,
10781
- initDirectivesForSSR: initDirectivesForSSR,
10883
+ createSlots: createSlots,
10884
+ createStaticVNode: createStaticVNode,
10885
+ createTextVNode: createTextVNode,
10886
+ createVNode: createVNode,
10887
+ customRef: customRef,
10888
+ defineAsyncComponent: defineAsyncComponent,
10889
+ defineComponent: defineComponent,
10782
10890
  defineCustomElement: defineCustomElement,
10891
+ defineEmits: defineEmits,
10892
+ defineExpose: defineExpose,
10893
+ defineProps: defineProps,
10783
10894
  defineSSRCustomElement: defineSSRCustomElement,
10784
- VueElement: VueElement,
10785
- useCssModule: useCssModule,
10786
- useCssVars: useCssVars,
10787
- Transition: Transition,
10788
- TransitionGroup: TransitionGroup,
10789
- vModelText: vModelText,
10790
- vModelCheckbox: vModelCheckbox,
10791
- vModelRadio: vModelRadio,
10792
- vModelSelect: vModelSelect,
10793
- vModelDynamic: vModelDynamic,
10794
- withModifiers: withModifiers,
10795
- withKeys: withKeys,
10796
- vShow: vShow,
10797
- reactive: reactive,
10798
- ref: ref,
10799
- readonly: readonly,
10800
- unref: unref,
10801
- proxyRefs: proxyRefs,
10802
- isRef: isRef,
10803
- toRef: toRef,
10804
- toRefs: toRefs,
10895
+ get devtools () { return devtools; },
10896
+ effect: effect,
10897
+ effectScope: effectScope,
10898
+ getCurrentInstance: getCurrentInstance,
10899
+ getCurrentScope: getCurrentScope,
10900
+ getTransitionRawChildren: getTransitionRawChildren,
10901
+ guardReactiveProps: guardReactiveProps,
10902
+ h: h,
10903
+ handleError: handleError,
10904
+ hydrate: hydrate,
10905
+ initCustomFormatter: initCustomFormatter,
10906
+ initDirectivesForSSR: initDirectivesForSSR,
10907
+ inject: inject,
10908
+ isMemoSame: isMemoSame,
10805
10909
  isProxy: isProxy,
10806
10910
  isReactive: isReactive,
10807
10911
  isReadonly: isReadonly,
10912
+ isRef: isRef,
10913
+ isRuntimeOnly: isRuntimeOnly,
10808
10914
  isShallow: isShallow,
10809
- customRef: customRef,
10810
- triggerRef: triggerRef,
10811
- shallowRef: shallowRef,
10812
- shallowReactive: shallowReactive,
10813
- shallowReadonly: shallowReadonly,
10915
+ isVNode: isVNode,
10814
10916
  markRaw: markRaw,
10815
- toRaw: toRaw,
10816
- effect: effect,
10817
- stop: stop,
10818
- ReactiveEffect: ReactiveEffect,
10819
- effectScope: effectScope,
10820
- EffectScope: EffectScope,
10821
- getCurrentScope: getCurrentScope,
10822
- onScopeDispose: onScopeDispose,
10823
- computed: computed$1,
10824
- watch: watch,
10825
- watchEffect: watchEffect,
10826
- watchPostEffect: watchPostEffect,
10827
- watchSyncEffect: watchSyncEffect,
10917
+ mergeDefaults: mergeDefaults,
10918
+ mergeProps: mergeProps,
10919
+ nextTick: nextTick,
10920
+ normalizeClass: normalizeClass,
10921
+ normalizeProps: normalizeProps,
10922
+ normalizeStyle: normalizeStyle,
10923
+ onActivated: onActivated,
10828
10924
  onBeforeMount: onBeforeMount,
10829
- onMounted: onMounted,
10830
- onBeforeUpdate: onBeforeUpdate,
10831
- onUpdated: onUpdated,
10832
10925
  onBeforeUnmount: onBeforeUnmount,
10833
- onUnmounted: onUnmounted,
10834
- onActivated: onActivated,
10926
+ onBeforeUpdate: onBeforeUpdate,
10835
10927
  onDeactivated: onDeactivated,
10928
+ onErrorCaptured: onErrorCaptured,
10929
+ onMounted: onMounted,
10836
10930
  onRenderTracked: onRenderTracked,
10837
10931
  onRenderTriggered: onRenderTriggered,
10838
- onErrorCaptured: onErrorCaptured,
10932
+ onScopeDispose: onScopeDispose,
10839
10933
  onServerPrefetch: onServerPrefetch,
10934
+ onUnmounted: onUnmounted,
10935
+ onUpdated: onUpdated,
10936
+ openBlock: openBlock,
10937
+ popScopeId: popScopeId,
10840
10938
  provide: provide,
10841
- inject: inject,
10842
- nextTick: nextTick,
10843
- defineComponent: defineComponent,
10844
- defineAsyncComponent: defineAsyncComponent,
10845
- useAttrs: useAttrs,
10846
- useSlots: useSlots,
10847
- defineProps: defineProps,
10848
- defineEmits: defineEmits,
10849
- defineExpose: defineExpose,
10850
- withDefaults: withDefaults,
10851
- mergeDefaults: mergeDefaults,
10852
- createPropsRestProxy: createPropsRestProxy,
10853
- withAsyncContext: withAsyncContext,
10854
- getCurrentInstance: getCurrentInstance,
10855
- h: h,
10856
- createVNode: createVNode,
10857
- cloneVNode: cloneVNode,
10858
- mergeProps: mergeProps,
10859
- isVNode: isVNode,
10860
- Fragment: Fragment,
10861
- Text: Text,
10862
- Comment: Comment,
10863
- Static: Static,
10864
- Teleport: Teleport,
10865
- Suspense: Suspense,
10866
- KeepAlive: KeepAlive,
10867
- BaseTransition: BaseTransition,
10868
- withDirectives: withDirectives,
10869
- useSSRContext: useSSRContext,
10870
- ssrContextKey: ssrContextKey,
10871
- createRenderer: createRenderer,
10872
- createHydrationRenderer: createHydrationRenderer,
10939
+ proxyRefs: proxyRefs,
10940
+ pushScopeId: pushScopeId,
10873
10941
  queuePostFlushCb: queuePostFlushCb,
10874
- warn: warn,
10875
- handleError: handleError,
10876
- callWithErrorHandling: callWithErrorHandling,
10877
- callWithAsyncErrorHandling: callWithAsyncErrorHandling,
10942
+ reactive: reactive,
10943
+ readonly: readonly,
10944
+ ref: ref,
10945
+ registerRuntimeCompiler: registerRuntimeCompiler,
10946
+ render: render,
10947
+ renderList: renderList,
10948
+ renderSlot: renderSlot,
10878
10949
  resolveComponent: resolveComponent,
10879
10950
  resolveDirective: resolveDirective,
10880
10951
  resolveDynamicComponent: resolveDynamicComponent,
10881
- registerRuntimeCompiler: registerRuntimeCompiler,
10882
- isRuntimeOnly: isRuntimeOnly,
10883
- useTransitionState: useTransitionState,
10952
+ resolveFilter: resolveFilter,
10884
10953
  resolveTransitionHooks: resolveTransitionHooks,
10885
- setTransitionHooks: setTransitionHooks,
10886
- getTransitionRawChildren: getTransitionRawChildren,
10887
- initCustomFormatter: initCustomFormatter,
10888
- get devtools () { return devtools; },
10889
- setDevtoolsHook: setDevtoolsHook,
10890
- withCtx: withCtx,
10891
- pushScopeId: pushScopeId,
10892
- popScopeId: popScopeId,
10893
- withScopeId: withScopeId,
10894
- renderList: renderList,
10895
- toHandlers: toHandlers,
10896
- renderSlot: renderSlot,
10897
- createSlots: createSlots,
10898
- withMemo: withMemo,
10899
- isMemoSame: isMemoSame,
10900
- openBlock: openBlock,
10901
- createBlock: createBlock,
10902
10954
  setBlockTracking: setBlockTracking,
10903
- createTextVNode: createTextVNode,
10904
- createCommentVNode: createCommentVNode,
10905
- createStaticVNode: createStaticVNode,
10906
- createElementVNode: createBaseVNode,
10907
- createElementBlock: createElementBlock,
10908
- guardReactiveProps: guardReactiveProps,
10955
+ setDevtoolsHook: setDevtoolsHook,
10956
+ setTransitionHooks: setTransitionHooks,
10957
+ shallowReactive: shallowReactive,
10958
+ shallowReadonly: shallowReadonly,
10959
+ shallowRef: shallowRef,
10960
+ ssrContextKey: ssrContextKey,
10961
+ ssrUtils: ssrUtils,
10962
+ stop: stop,
10909
10963
  toDisplayString: toDisplayString,
10910
- camelize: camelize,
10911
- capitalize: capitalize,
10912
10964
  toHandlerKey: toHandlerKey,
10913
- normalizeProps: normalizeProps,
10914
- normalizeClass: normalizeClass,
10915
- normalizeStyle: normalizeStyle,
10965
+ toHandlers: toHandlers,
10966
+ toRaw: toRaw,
10967
+ toRef: toRef,
10968
+ toRefs: toRefs,
10916
10969
  transformVNodeArgs: transformVNodeArgs,
10970
+ triggerRef: triggerRef,
10971
+ unref: unref,
10972
+ useAttrs: useAttrs,
10973
+ useCssModule: useCssModule,
10974
+ useCssVars: useCssVars,
10975
+ useSSRContext: useSSRContext,
10976
+ useSlots: useSlots,
10977
+ useTransitionState: useTransitionState,
10978
+ vModelCheckbox: vModelCheckbox,
10979
+ vModelDynamic: vModelDynamic,
10980
+ vModelRadio: vModelRadio,
10981
+ vModelSelect: vModelSelect,
10982
+ vModelText: vModelText,
10983
+ vShow: vShow,
10917
10984
  version: version,
10918
- ssrUtils: ssrUtils,
10919
- resolveFilter: resolveFilter$1,
10920
- compatUtils: compatUtils
10985
+ warn: warn,
10986
+ watch: watch,
10987
+ watchEffect: watchEffect,
10988
+ watchPostEffect: watchPostEffect,
10989
+ watchSyncEffect: watchSyncEffect,
10990
+ withAsyncContext: withAsyncContext,
10991
+ withCtx: withCtx,
10992
+ withDefaults: withDefaults,
10993
+ withDirectives: withDirectives,
10994
+ withKeys: withKeys,
10995
+ withMemo: withMemo,
10996
+ withModifiers: withModifiers,
10997
+ withScopeId: withScopeId
10921
10998
  });
10922
10999
 
10923
11000
  // This entry exports the runtime only, and is built as
@@ -10938,7 +11015,7 @@ function wrappedCreateApp(...args) {
10938
11015
  }
10939
11016
  return app;
10940
11017
  }
10941
- function createCompatVue$1() {
11018
+ function createCompatVue() {
10942
11019
  const Vue = compatUtils.createCompatVue(createApp, wrappedCreateApp);
10943
11020
  extend(Vue, runtimeDom);
10944
11021
  return Vue;
@@ -10999,7 +11076,7 @@ const errorMessages = {
10999
11076
  [34 /* ErrorCodes.X_V_BIND_NO_EXPRESSION */]: `v-bind is missing expression.`,
11000
11077
  [35 /* ErrorCodes.X_V_ON_NO_EXPRESSION */]: `v-on is missing expression.`,
11001
11078
  [36 /* ErrorCodes.X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET */]: `Unexpected custom directive on <slot> outlet.`,
11002
- [37 /* ErrorCodes.X_V_SLOT_MIXED_SLOT_USAGE */]: `Mixed v-slot usage on both the component and nested <template>.` +
11079
+ [37 /* ErrorCodes.X_V_SLOT_MIXED_SLOT_USAGE */]: `Mixed v-slot usage on both the component and nested <template>. ` +
11003
11080
  `When there are multiple named slots, all slots should use <template> ` +
11004
11081
  `syntax to avoid scope ambiguity.`,
11005
11082
  [38 /* ErrorCodes.X_V_SLOT_DUPLICATE_SLOT_NAMES */]: `Duplicate slot names found. `,
@@ -11122,7 +11199,7 @@ function createRoot(children, loc = locStub) {
11122
11199
  return {
11123
11200
  type: 0 /* NodeTypes.ROOT */,
11124
11201
  children,
11125
- helpers: [],
11202
+ helpers: new Set(),
11126
11203
  components: [],
11127
11204
  directives: [],
11128
11205
  hoists: [],
@@ -11350,7 +11427,7 @@ function hasDynamicKeyVBind(node) {
11350
11427
  !p.arg.isStatic) // v-bind:[foo]
11351
11428
  );
11352
11429
  }
11353
- function isText(node) {
11430
+ function isText$1(node) {
11354
11431
  return node.type === 5 /* NodeTypes.INTERPOLATION */ || node.type === 2 /* NodeTypes.TEXT */;
11355
11432
  }
11356
11433
  function isVSlot(p) {
@@ -11553,15 +11630,15 @@ function getCompatValue(key, context) {
11553
11630
  return value;
11554
11631
  }
11555
11632
  }
11556
- function isCompatEnabled$1(key, context) {
11633
+ function isCompatEnabled(key, context) {
11557
11634
  const mode = getCompatValue('MODE', context);
11558
11635
  const value = getCompatValue(key, context);
11559
11636
  // in v3 mode, only enable if explicitly set to true
11560
11637
  // otherwise enable for any non-false value
11561
11638
  return mode === 3 ? value === true : value !== false;
11562
11639
  }
11563
- function checkCompatEnabled$1(key, context, loc, ...args) {
11564
- const enabled = isCompatEnabled$1(key, context);
11640
+ function checkCompatEnabled(key, context, loc, ...args) {
11641
+ const enabled = isCompatEnabled(key, context);
11565
11642
  return enabled;
11566
11643
  }
11567
11644
 
@@ -11678,7 +11755,7 @@ function parseChildren(context, mode, ancestors) {
11678
11755
  else if (/[a-z]/i.test(s[1])) {
11679
11756
  node = parseElement(context, ancestors);
11680
11757
  // 2.x <template> with no directive compat
11681
- if (isCompatEnabled$1("COMPILER_NATIVE_TEMPLATE" /* CompilerDeprecationTypes.COMPILER_NATIVE_TEMPLATE */, context) &&
11758
+ if (isCompatEnabled("COMPILER_NATIVE_TEMPLATE" /* CompilerDeprecationTypes.COMPILER_NATIVE_TEMPLATE */, context) &&
11682
11759
  node &&
11683
11760
  node.tag === 'template' &&
11684
11761
  !node.props.some(p => p.type === 7 /* NodeTypes.DIRECTIVE */ &&
@@ -11882,7 +11959,7 @@ function parseElement(context, ancestors) {
11882
11959
  {
11883
11960
  const inlineTemplateProp = element.props.find(p => p.type === 6 /* NodeTypes.ATTRIBUTE */ && p.name === 'inline-template');
11884
11961
  if (inlineTemplateProp &&
11885
- checkCompatEnabled$1("COMPILER_INLINE_TEMPLATE" /* CompilerDeprecationTypes.COMPILER_INLINE_TEMPLATE */, context, inlineTemplateProp.loc)) {
11962
+ checkCompatEnabled("COMPILER_INLINE_TEMPLATE" /* CompilerDeprecationTypes.COMPILER_INLINE_TEMPLATE */, context, inlineTemplateProp.loc)) {
11886
11963
  const loc = getSelection(context, element.loc.end);
11887
11964
  inlineTemplateProp.value = {
11888
11965
  type: 2 /* NodeTypes.TEXT */,
@@ -12005,7 +12082,7 @@ function isComponent(tag, props, context) {
12005
12082
  if (p.value.content.startsWith('vue:')) {
12006
12083
  return true;
12007
12084
  }
12008
- else if (checkCompatEnabled$1("COMPILER_IS_ON_ELEMENT" /* CompilerDeprecationTypes.COMPILER_IS_ON_ELEMENT */, context, p.loc)) {
12085
+ else if (checkCompatEnabled("COMPILER_IS_ON_ELEMENT" /* CompilerDeprecationTypes.COMPILER_IS_ON_ELEMENT */, context, p.loc)) {
12009
12086
  return true;
12010
12087
  }
12011
12088
  }
@@ -12021,7 +12098,7 @@ function isComponent(tag, props, context) {
12021
12098
  p.name === 'bind' &&
12022
12099
  isStaticArgOf(p.arg, 'is') &&
12023
12100
  true &&
12024
- checkCompatEnabled$1("COMPILER_IS_ON_ELEMENT" /* CompilerDeprecationTypes.COMPILER_IS_ON_ELEMENT */, context, p.loc)) {
12101
+ checkCompatEnabled("COMPILER_IS_ON_ELEMENT" /* CompilerDeprecationTypes.COMPILER_IS_ON_ELEMENT */, context, p.loc)) {
12025
12102
  return true;
12026
12103
  }
12027
12104
  }
@@ -12147,7 +12224,7 @@ function parseAttribute(context, nameSet) {
12147
12224
  // 2.x compat v-bind:foo.sync -> v-model:foo
12148
12225
  if (dirName === 'bind' && arg) {
12149
12226
  if (modifiers.includes('sync') &&
12150
- checkCompatEnabled$1("COMPILER_V_BIND_SYNC" /* CompilerDeprecationTypes.COMPILER_V_BIND_SYNC */, context, loc, arg.loc.source)) {
12227
+ checkCompatEnabled("COMPILER_V_BIND_SYNC" /* CompilerDeprecationTypes.COMPILER_V_BIND_SYNC */, context, loc, arg.loc.source)) {
12151
12228
  dirName = 'model';
12152
12229
  modifiers.splice(modifiers.indexOf('sync'), 1);
12153
12230
  }
@@ -12364,7 +12441,7 @@ function startsWithEndTagOpen(source, tag) {
12364
12441
  }
12365
12442
 
12366
12443
  function hoistStatic(root, context) {
12367
- walk$1(root, context,
12444
+ walk(root, context,
12368
12445
  // Root node is unfortunately non-hoistable due to potential parent
12369
12446
  // fallthrough attributes.
12370
12447
  isSingleElementRoot(root, root.children[0]));
@@ -12375,7 +12452,7 @@ function isSingleElementRoot(root, child) {
12375
12452
  child.type === 1 /* NodeTypes.ELEMENT */ &&
12376
12453
  !isSlotOutlet(child));
12377
12454
  }
12378
- function walk$1(node, context, doNotHoistNode = false) {
12455
+ function walk(node, context, doNotHoistNode = false) {
12379
12456
  const { children } = node;
12380
12457
  const originalCount = children.length;
12381
12458
  let hoistedCount = 0;
@@ -12424,19 +12501,19 @@ function walk$1(node, context, doNotHoistNode = false) {
12424
12501
  if (isComponent) {
12425
12502
  context.scopes.vSlot++;
12426
12503
  }
12427
- walk$1(child, context);
12504
+ walk(child, context);
12428
12505
  if (isComponent) {
12429
12506
  context.scopes.vSlot--;
12430
12507
  }
12431
12508
  }
12432
12509
  else if (child.type === 11 /* NodeTypes.FOR */) {
12433
12510
  // Do not hoist v-for single child because it has to be a block
12434
- walk$1(child, context, child.children.length === 1);
12511
+ walk(child, context, child.children.length === 1);
12435
12512
  }
12436
12513
  else if (child.type === 9 /* NodeTypes.IF */) {
12437
12514
  for (let i = 0; i < child.branches.length; i++) {
12438
12515
  // Do not hoist v-if single child because it has to be a block
12439
- walk$1(child.branches[i], context, child.branches[i].children.length === 1);
12516
+ walk(child.branches[i], context, child.branches[i].children.length === 1);
12440
12517
  }
12441
12518
  }
12442
12519
  }
@@ -12801,7 +12878,7 @@ function transform(root, options) {
12801
12878
  createRootCodegen(root, context);
12802
12879
  }
12803
12880
  // finalize meta information
12804
- root.helpers = [...context.helpers.keys()];
12881
+ root.helpers = new Set([...context.helpers.keys()]);
12805
12882
  root.components = [...context.components];
12806
12883
  root.directives = [...context.directives];
12807
12884
  root.imports = context.imports;
@@ -12837,6 +12914,7 @@ function createRootCodegen(root, context) {
12837
12914
  else if (children.length > 1) {
12838
12915
  // root has multiple nodes - return a fragment block.
12839
12916
  let patchFlag = 64 /* PatchFlags.STABLE_FRAGMENT */;
12917
+ PatchFlagNames[64 /* PatchFlags.STABLE_FRAGMENT */];
12840
12918
  root.codegenNode = createVNodeCall(context, helper(FRAGMENT), undefined, root.children, patchFlag + (``), undefined, undefined, true, undefined, false /* isComponent */);
12841
12919
  }
12842
12920
  else ;
@@ -13035,7 +13113,8 @@ function generate(ast, options = {}) {
13035
13113
  if (options.onContextCreated)
13036
13114
  options.onContextCreated(context);
13037
13115
  const { mode, push, prefixIdentifiers, indent, deindent, newline, scopeId, ssr } = context;
13038
- const hasHelpers = ast.helpers.length > 0;
13116
+ const helpers = Array.from(ast.helpers);
13117
+ const hasHelpers = helpers.length > 0;
13039
13118
  const useWithBlock = !prefixIdentifiers && mode !== 'module';
13040
13119
  const genScopeId = scopeId != null && mode === 'module';
13041
13120
  const isSetupInlined = !!options.inline;
@@ -13074,7 +13153,7 @@ function generate(ast, options = {}) {
13074
13153
  // function mode const declarations should be inside with block
13075
13154
  // also they should be renamed to avoid collision with user properties
13076
13155
  if (hasHelpers) {
13077
- push(`const { ${ast.helpers.map(aliasHelper).join(', ')} } = _Vue`);
13156
+ push(`const { ${helpers.map(aliasHelper).join(', ')} } = _Vue`);
13078
13157
  push(`\n`);
13079
13158
  newline();
13080
13159
  }
@@ -13140,9 +13219,10 @@ function genFunctionPreamble(ast, context) {
13140
13219
  // In prefix mode, we place the const declaration at top so it's done
13141
13220
  // only once; But if we not prefixing, we place the declaration inside the
13142
13221
  // with block so it doesn't incur the `in` check cost for every helper access.
13143
- if (ast.helpers.length > 0) {
13222
+ const helpers = Array.from(ast.helpers);
13223
+ if (helpers.length > 0) {
13144
13224
  if (prefixIdentifiers) {
13145
- push(`const { ${ast.helpers.map(aliasHelper).join(', ')} } = ${VueBinding}\n`);
13225
+ push(`const { ${helpers.map(aliasHelper).join(', ')} } = ${VueBinding}\n`);
13146
13226
  }
13147
13227
  else {
13148
13228
  // "with" mode.
@@ -13159,7 +13239,7 @@ function genFunctionPreamble(ast, context) {
13159
13239
  CREATE_TEXT,
13160
13240
  CREATE_STATIC
13161
13241
  ]
13162
- .filter(helper => ast.helpers.includes(helper))
13242
+ .filter(helper => helpers.includes(helper))
13163
13243
  .map(aliasHelper)
13164
13244
  .join(', ');
13165
13245
  push(`const { ${staticHelpers} } = _Vue\n`);
@@ -13180,25 +13260,27 @@ function genFunctionPreamble(ast, context) {
13180
13260
  function genModulePreamble(ast, context, genScopeId, inline) {
13181
13261
  const { push, newline, optimizeImports, runtimeModuleName, ssrRuntimeModuleName } = context;
13182
13262
  if (genScopeId && ast.hoists.length) {
13183
- ast.helpers.push(PUSH_SCOPE_ID, POP_SCOPE_ID);
13263
+ ast.helpers.add(PUSH_SCOPE_ID);
13264
+ ast.helpers.add(POP_SCOPE_ID);
13184
13265
  }
13185
13266
  // generate import statements for helpers
13186
- if (ast.helpers.length) {
13267
+ if (ast.helpers.size) {
13268
+ const helpers = Array.from(ast.helpers);
13187
13269
  if (optimizeImports) {
13188
13270
  // when bundled with webpack with code-split, calling an import binding
13189
13271
  // as a function leads to it being wrapped with `Object(a.b)` or `(0,a.b)`,
13190
13272
  // incurring both payload size increase and potential perf overhead.
13191
13273
  // therefore we assign the imports to variables (which is a constant ~50b
13192
13274
  // cost per-component instead of scaling with template size)
13193
- push(`import { ${ast.helpers
13275
+ push(`import { ${helpers
13194
13276
  .map(s => helperNameMap[s])
13195
13277
  .join(', ')} } from ${JSON.stringify(runtimeModuleName)}\n`);
13196
- push(`\n// Binding optimization for webpack code-split\nconst ${ast.helpers
13278
+ push(`\n// Binding optimization for webpack code-split\nconst ${helpers
13197
13279
  .map(s => `_${helperNameMap[s]} = ${helperNameMap[s]}`)
13198
13280
  .join(', ')}\n`);
13199
13281
  }
13200
13282
  else {
13201
- push(`import { ${ast.helpers
13283
+ push(`import { ${helpers
13202
13284
  .map(s => `${helperNameMap[s]} as _${helperNameMap[s]}`)
13203
13285
  .join(', ')} } from ${JSON.stringify(runtimeModuleName)}\n`);
13204
13286
  }
@@ -13275,7 +13357,7 @@ function genImports(importsOptions, context) {
13275
13357
  context.newline();
13276
13358
  });
13277
13359
  }
13278
- function isText$1(n) {
13360
+ function isText(n) {
13279
13361
  return (isString(n) ||
13280
13362
  n.type === 4 /* NodeTypes.SIMPLE_EXPRESSION */ ||
13281
13363
  n.type === 2 /* NodeTypes.TEXT */ ||
@@ -13284,7 +13366,7 @@ function isText$1(n) {
13284
13366
  }
13285
13367
  function genNodeListAsArray(nodes, context) {
13286
13368
  const multilines = nodes.length > 3 ||
13287
- (nodes.some(n => isArray(n) || !isText$1(n)));
13369
+ (nodes.some(n => isArray(n) || !isText(n)));
13288
13370
  context.push(`[`);
13289
13371
  multilines && context.indent();
13290
13372
  genNodeList(nodes, context, multilines);
@@ -15109,7 +15191,7 @@ function resolveComponentType(node, context, ssr = false) {
15109
15191
  const isProp = findProp(node, 'is');
15110
15192
  if (isProp) {
15111
15193
  if (isExplicitDynamic ||
15112
- (isCompatEnabled$1("COMPILER_IS_ON_ELEMENT" /* CompilerDeprecationTypes.COMPILER_IS_ON_ELEMENT */, context))) {
15194
+ (isCompatEnabled("COMPILER_IS_ON_ELEMENT" /* CompilerDeprecationTypes.COMPILER_IS_ON_ELEMENT */, context))) {
15113
15195
  const exp = isProp.type === 6 /* NodeTypes.ATTRIBUTE */
15114
15196
  ? isProp.value && createSimpleExpression(isProp.value.content, true)
15115
15197
  : isProp.exp;
@@ -15311,7 +15393,7 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
15311
15393
  if (name === 'is' &&
15312
15394
  (isComponentTag(tag) ||
15313
15395
  (value && value.content.startsWith('vue:')) ||
15314
- (isCompatEnabled$1("COMPILER_IS_ON_ELEMENT" /* CompilerDeprecationTypes.COMPILER_IS_ON_ELEMENT */, context)))) {
15396
+ (isCompatEnabled("COMPILER_IS_ON_ELEMENT" /* CompilerDeprecationTypes.COMPILER_IS_ON_ELEMENT */, context)))) {
15315
15397
  continue;
15316
15398
  }
15317
15399
  properties.push(createObjectProperty(createSimpleExpression(name, true, getInnerRange(loc, 0, name.length)), createSimpleExpression(value ? value.content : '', isStatic, value ? value.loc : loc)));
@@ -15337,7 +15419,7 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
15337
15419
  (isVBind &&
15338
15420
  isStaticArgOf(arg, 'is') &&
15339
15421
  (isComponentTag(tag) ||
15340
- (isCompatEnabled$1("COMPILER_IS_ON_ELEMENT" /* CompilerDeprecationTypes.COMPILER_IS_ON_ELEMENT */, context))))) {
15422
+ (isCompatEnabled("COMPILER_IS_ON_ELEMENT" /* CompilerDeprecationTypes.COMPILER_IS_ON_ELEMENT */, context))))) {
15341
15423
  continue;
15342
15424
  }
15343
15425
  // skip v-on in SSR compilation
@@ -15363,7 +15445,7 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
15363
15445
  // have to merge early for compat build check
15364
15446
  pushMergeArg();
15365
15447
  {
15366
- if (isCompatEnabled$1("COMPILER_V_BIND_OBJECT_ORDER" /* CompilerDeprecationTypes.COMPILER_V_BIND_OBJECT_ORDER */, context)) {
15448
+ if (isCompatEnabled("COMPILER_V_BIND_OBJECT_ORDER" /* CompilerDeprecationTypes.COMPILER_V_BIND_OBJECT_ORDER */, context)) {
15367
15449
  mergeArgs.unshift(exp);
15368
15450
  continue;
15369
15451
  }
@@ -15543,7 +15625,7 @@ function dedupeProperties(properties) {
15543
15625
  const existing = knownProps.get(name);
15544
15626
  if (existing) {
15545
15627
  if (name === 'style' || name === 'class' || isOn(name)) {
15546
- mergeAsArray$1(existing, prop);
15628
+ mergeAsArray(existing, prop);
15547
15629
  }
15548
15630
  // unexpected duplicate, should have emitted error during parse
15549
15631
  }
@@ -15554,7 +15636,7 @@ function dedupeProperties(properties) {
15554
15636
  }
15555
15637
  return deduped;
15556
15638
  }
15557
- function mergeAsArray$1(existing, incoming) {
15639
+ function mergeAsArray(existing, incoming) {
15558
15640
  if (existing.value.type === 17 /* NodeTypes.JS_ARRAY_EXPRESSION */) {
15559
15641
  existing.value.elements.push(incoming.value);
15560
15642
  }
@@ -15688,7 +15770,7 @@ function processSlotOutlet(node, context) {
15688
15770
  }
15689
15771
 
15690
15772
  const fnExpRE = /^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
15691
- const transformOn = (dir, node, context, augmentor) => {
15773
+ const transformOn$1 = (dir, node, context, augmentor) => {
15692
15774
  const { loc, modifiers, arg } = dir;
15693
15775
  if (!dir.exp && !modifiers.length) {
15694
15776
  context.onError(createCompilerError(35 /* ErrorCodes.X_V_ON_NO_EXPRESSION */, loc));
@@ -15883,11 +15965,11 @@ const transformText = (node, context) => {
15883
15965
  let hasText = false;
15884
15966
  for (let i = 0; i < children.length; i++) {
15885
15967
  const child = children[i];
15886
- if (isText(child)) {
15968
+ if (isText$1(child)) {
15887
15969
  hasText = true;
15888
15970
  for (let j = i + 1; j < children.length; j++) {
15889
15971
  const next = children[j];
15890
- if (isText(next)) {
15972
+ if (isText$1(next)) {
15891
15973
  if (!currentContainer) {
15892
15974
  currentContainer = children[i] = createCompoundExpression([child], child.loc);
15893
15975
  }
@@ -15929,7 +16011,7 @@ const transformText = (node, context) => {
15929
16011
  // runtime normalization.
15930
16012
  for (let i = 0; i < children.length; i++) {
15931
16013
  const child = children[i];
15932
- if (isText(child) || child.type === 8 /* NodeTypes.COMPOUND_EXPRESSION */) {
16014
+ if (isText$1(child) || child.type === 8 /* NodeTypes.COMPOUND_EXPRESSION */) {
15933
16015
  const callArgs = [];
15934
16016
  // createTextVNode defaults to single whitespace, so if it is a
15935
16017
  // single space the code could be an empty call to save bytes.
@@ -15954,13 +16036,13 @@ const transformText = (node, context) => {
15954
16036
  }
15955
16037
  };
15956
16038
 
15957
- const seen = new WeakSet();
16039
+ const seen$1 = new WeakSet();
15958
16040
  const transformOnce = (node, context) => {
15959
16041
  if (node.type === 1 /* NodeTypes.ELEMENT */ && findDir(node, 'once', true)) {
15960
- if (seen.has(node) || context.inVOnce) {
16042
+ if (seen$1.has(node) || context.inVOnce) {
15961
16043
  return;
15962
16044
  }
15963
- seen.add(node);
16045
+ seen$1.add(node);
15964
16046
  context.inVOnce = true;
15965
16047
  context.helper(SET_BLOCK_TRACKING);
15966
16048
  return () => {
@@ -15973,7 +16055,7 @@ const transformOnce = (node, context) => {
15973
16055
  }
15974
16056
  };
15975
16057
 
15976
- const transformModel = (dir, node, context) => {
16058
+ const transformModel$1 = (dir, node, context) => {
15977
16059
  const { exp, arg } = dir;
15978
16060
  if (!exp) {
15979
16061
  context.onError(createCompilerError(41 /* ErrorCodes.X_V_MODEL_NO_EXPRESSION */, dir.loc));
@@ -16008,7 +16090,7 @@ const transformModel = (dir, node, context) => {
16008
16090
  const propName = arg ? arg : createSimpleExpression('modelValue', true);
16009
16091
  const eventName = arg
16010
16092
  ? isStaticExp(arg)
16011
- ? `onUpdate:${arg.content}`
16093
+ ? `onUpdate:${camelize(arg.content)}`
16012
16094
  : createCompoundExpression(['"onUpdate:" + ', arg])
16013
16095
  : `onUpdate:modelValue`;
16014
16096
  let assignmentExp;
@@ -16073,7 +16155,7 @@ function createTransformProps(props = []) {
16073
16155
 
16074
16156
  const validDivisionCharRE = /[\w).+\-_$\]]/;
16075
16157
  const transformFilter = (node, context) => {
16076
- if (!isCompatEnabled$1("COMPILER_FILTER" /* CompilerDeprecationTypes.COMPILER_FILTERS */, context)) {
16158
+ if (!isCompatEnabled("COMPILER_FILTER" /* CompilerDeprecationTypes.COMPILER_FILTERS */, context)) {
16077
16159
  return;
16078
16160
  }
16079
16161
  if (node.type === 5 /* NodeTypes.INTERPOLATION */) {
@@ -16235,14 +16317,14 @@ function wrapFilter(exp, filter, context) {
16235
16317
  }
16236
16318
  }
16237
16319
 
16238
- const seen$1 = new WeakSet();
16320
+ const seen = new WeakSet();
16239
16321
  const transformMemo = (node, context) => {
16240
16322
  if (node.type === 1 /* NodeTypes.ELEMENT */) {
16241
16323
  const dir = findDir(node, 'memo');
16242
- if (!dir || seen$1.has(node)) {
16324
+ if (!dir || seen.has(node)) {
16243
16325
  return;
16244
16326
  }
16245
- seen$1.add(node);
16327
+ seen.add(node);
16246
16328
  return () => {
16247
16329
  const codegenNode = node.codegenNode ||
16248
16330
  context.currentNode.codegenNode;
@@ -16283,9 +16365,9 @@ function getBaseTransformPreset(prefixIdentifiers) {
16283
16365
  transformText
16284
16366
  ],
16285
16367
  {
16286
- on: transformOn,
16368
+ on: transformOn$1,
16287
16369
  bind: transformBind,
16288
- model: transformModel
16370
+ model: transformModel$1
16289
16371
  }
16290
16372
  ];
16291
16373
  }
@@ -16333,7 +16415,7 @@ const V_MODEL_DYNAMIC = Symbol(``);
16333
16415
  const V_ON_WITH_MODIFIERS = Symbol(``);
16334
16416
  const V_ON_WITH_KEYS = Symbol(``);
16335
16417
  const V_SHOW = Symbol(``);
16336
- const TRANSITION$1 = Symbol(``);
16418
+ const TRANSITION = Symbol(``);
16337
16419
  const TRANSITION_GROUP = Symbol(``);
16338
16420
  registerRuntimeHelpers({
16339
16421
  [V_MODEL_RADIO]: `vModelRadio`,
@@ -16344,7 +16426,7 @@ registerRuntimeHelpers({
16344
16426
  [V_ON_WITH_MODIFIERS]: `withModifiers`,
16345
16427
  [V_ON_WITH_KEYS]: `withKeys`,
16346
16428
  [V_SHOW]: `vShow`,
16347
- [TRANSITION$1]: `Transition`,
16429
+ [TRANSITION]: `Transition`,
16348
16430
  [TRANSITION_GROUP]: `TransitionGroup`
16349
16431
  });
16350
16432
 
@@ -18712,7 +18794,7 @@ const parserOptions = {
18712
18794
  decodeEntities: decodeHtml,
18713
18795
  isBuiltInComponent: (tag) => {
18714
18796
  if (isBuiltInType(tag, `Transition`)) {
18715
- return TRANSITION$1;
18797
+ return TRANSITION;
18716
18798
  }
18717
18799
  else if (isBuiltInType(tag, `TransitionGroup`)) {
18718
18800
  return TRANSITION_GROUP;
@@ -18852,8 +18934,8 @@ const transformVText = (dir, node, context) => {
18852
18934
  };
18853
18935
  };
18854
18936
 
18855
- const transformModel$1 = (dir, node, context) => {
18856
- const baseResult = transformModel(dir, node, context);
18937
+ const transformModel = (dir, node, context) => {
18938
+ const baseResult = transformModel$1(dir, node, context);
18857
18939
  // base transform has errors OR component v-model (only need props)
18858
18940
  if (!baseResult.props.length || node.tagType === 1 /* ElementTypes.COMPONENT */) {
18859
18941
  return baseResult;
@@ -18937,7 +19019,7 @@ const resolveModifiers = (key, modifiers, context, loc) => {
18937
19019
  for (let i = 0; i < modifiers.length; i++) {
18938
19020
  const modifier = modifiers[i];
18939
19021
  if (modifier === 'native' &&
18940
- checkCompatEnabled$1("COMPILER_V_ON_NATIVE" /* CompilerDeprecationTypes.COMPILER_V_ON_NATIVE */, context)) {
19022
+ checkCompatEnabled("COMPILER_V_ON_NATIVE" /* CompilerDeprecationTypes.COMPILER_V_ON_NATIVE */, context)) {
18941
19023
  eventOptionModifiers.push(modifier);
18942
19024
  }
18943
19025
  else if (isEventOptionModifier(modifier)) {
@@ -18991,8 +19073,8 @@ const transformClick = (key, event) => {
18991
19073
  ])
18992
19074
  : key;
18993
19075
  };
18994
- const transformOn$1 = (dir, node, context) => {
18995
- return transformOn(dir, node, context, baseResult => {
19076
+ const transformOn = (dir, node, context) => {
19077
+ return transformOn$1(dir, node, context, baseResult => {
18996
19078
  const { modifiers } = dir;
18997
19079
  if (!modifiers.length)
18998
19080
  return baseResult;
@@ -19355,11 +19437,11 @@ const DOMDirectiveTransforms = {
19355
19437
  cloak: noopDirectiveTransform,
19356
19438
  html: transformVHtml,
19357
19439
  text: transformVText,
19358
- model: transformModel$1,
19359
- on: transformOn$1,
19440
+ model: transformModel,
19441
+ on: transformOn,
19360
19442
  show: transformShow
19361
19443
  };
19362
- function compile$1(template, options = {}) {
19444
+ function compile(template, options = {}) {
19363
19445
  return baseCompile(template, extend({}, parserOptions, options, {
19364
19446
  nodeTransforms: [
19365
19447
  // ignore <script> and <tag>
@@ -19398,7 +19480,7 @@ function compileToFunction(template, options) {
19398
19480
  // by the server, the template should not contain any user data.
19399
19481
  template = el ? el.innerHTML : ``;
19400
19482
  }
19401
- const { code } = compile$1(template, extend({
19483
+ const { code } = compile(template, extend({
19402
19484
  hoistStatic: true,
19403
19485
  whitespace: 'preserve',
19404
19486
  onError: undefined,
@@ -19413,7 +19495,7 @@ function compileToFunction(template, options) {
19413
19495
  return (compileCache[key] = render);
19414
19496
  }
19415
19497
  registerRuntimeCompiler(compileToFunction);
19416
- const Vue = createCompatVue$1();
19498
+ const Vue = createCompatVue();
19417
19499
  Vue.compile = compileToFunction;
19418
19500
 
19419
19501
  module.exports = Vue;