@vue/compat 3.6.0-alpha.7 → 3.6.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.6.0-alpha.7
2
+ * @vue/compat v3.6.0-beta.1
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -839,13 +839,13 @@ class Dep {
839
839
  }
840
840
  }
841
841
  const targetMap = /* @__PURE__ */ new WeakMap();
842
- const ITERATE_KEY = Symbol(
842
+ const ITERATE_KEY = /* @__PURE__ */ Symbol(
843
843
  !!(process.env.NODE_ENV !== "production") ? "Object iterate" : ""
844
844
  );
845
- const MAP_KEY_ITERATE_KEY = Symbol(
845
+ const MAP_KEY_ITERATE_KEY = /* @__PURE__ */ Symbol(
846
846
  !!(process.env.NODE_ENV !== "production") ? "Map keys iterate" : ""
847
847
  );
848
- const ARRAY_ITERATE_KEY = Symbol(
848
+ const ARRAY_ITERATE_KEY = /* @__PURE__ */ Symbol(
849
849
  !!(process.env.NODE_ENV !== "production") ? "Array iterate" : ""
850
850
  );
851
851
  function track(target, type, key) {
@@ -2851,10 +2851,10 @@ function flushPostFlushCbs(seen) {
2851
2851
  }
2852
2852
  }
2853
2853
  let isFlushing = false;
2854
- function flushOnAppMount() {
2854
+ function flushOnAppMount(instance) {
2855
2855
  if (!isFlushing) {
2856
2856
  isFlushing = true;
2857
- flushPreFlushCbs();
2857
+ flushPreFlushCbs(instance);
2858
2858
  flushPostFlushCbs();
2859
2859
  isFlushing = false;
2860
2860
  }
@@ -3591,65 +3591,6 @@ function emit$1(instance, event, args) {
3591
3591
  return instance.proxy;
3592
3592
  }
3593
3593
 
3594
- const compatModelEventPrefix = `onModelCompat:`;
3595
- const warnedTypes = /* @__PURE__ */ new WeakSet();
3596
- function convertLegacyVModelProps(vnode) {
3597
- const { type, shapeFlag, props, dynamicProps } = vnode;
3598
- const comp = type;
3599
- if (shapeFlag & 6 && props && "modelValue" in props) {
3600
- if (!isCompatEnabled$1(
3601
- "COMPONENT_V_MODEL",
3602
- // this is a special case where we want to use the vnode component's
3603
- // compat config instead of the current rendering instance (which is the
3604
- // parent of the component that exposes v-model)
3605
- { type }
3606
- )) {
3607
- return;
3608
- }
3609
- if (!!(process.env.NODE_ENV !== "production") && !warnedTypes.has(comp)) {
3610
- pushWarningContext(vnode);
3611
- warnDeprecation$1("COMPONENT_V_MODEL", { type }, comp);
3612
- popWarningContext();
3613
- warnedTypes.add(comp);
3614
- }
3615
- const model = comp.model || {};
3616
- applyModelFromMixins(model, comp.mixins);
3617
- const { prop = "value", event = "input" } = model;
3618
- if (prop !== "modelValue") {
3619
- props[prop] = props.modelValue;
3620
- delete props.modelValue;
3621
- }
3622
- if (dynamicProps) {
3623
- dynamicProps[dynamicProps.indexOf("modelValue")] = prop;
3624
- }
3625
- props[compatModelEventPrefix + event] = props["onUpdate:modelValue"];
3626
- delete props["onUpdate:modelValue"];
3627
- }
3628
- }
3629
- function applyModelFromMixins(model, mixins) {
3630
- if (mixins) {
3631
- mixins.forEach((m) => {
3632
- if (m.model) extend(model, m.model);
3633
- if (m.mixins) applyModelFromMixins(model, m.mixins);
3634
- });
3635
- }
3636
- }
3637
- function compatModelEmit(instance, event, args) {
3638
- if (!isCompatEnabled$1("COMPONENT_V_MODEL", instance)) {
3639
- return;
3640
- }
3641
- const props = instance.vnode.props;
3642
- const modelHandler = props && props[compatModelEventPrefix + event];
3643
- if (modelHandler) {
3644
- callWithErrorHandling(
3645
- modelHandler,
3646
- instance,
3647
- 6,
3648
- args
3649
- );
3650
- }
3651
- }
3652
-
3653
3594
  let currentRenderingInstance = null;
3654
3595
  let currentScopeId = null;
3655
3596
  function setCurrentRenderingInstance(instance) {
@@ -3800,7 +3741,203 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
3800
3741
  }
3801
3742
  }
3802
3743
 
3803
- const TeleportEndKey = Symbol("_vte");
3744
+ function provide(key, value) {
3745
+ if (!!(process.env.NODE_ENV !== "production")) {
3746
+ if (!currentInstance || currentInstance.isMounted && !isHmrUpdating) {
3747
+ warn$1(`provide() can only be used inside setup().`);
3748
+ }
3749
+ }
3750
+ if (currentInstance) {
3751
+ let provides = currentInstance.provides;
3752
+ const parentProvides = currentInstance.parent && currentInstance.parent.provides;
3753
+ if (parentProvides === provides) {
3754
+ provides = currentInstance.provides = Object.create(parentProvides);
3755
+ }
3756
+ provides[key] = value;
3757
+ }
3758
+ }
3759
+ function inject(key, defaultValue, treatDefaultAsFactory = false) {
3760
+ const instance = getCurrentGenericInstance();
3761
+ if (instance || currentApp) {
3762
+ let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.appContext && instance.appContext.provides : instance.parent.provides : void 0;
3763
+ if (provides && key in provides) {
3764
+ return provides[key];
3765
+ } else if (arguments.length > 1) {
3766
+ return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
3767
+ } else if (!!(process.env.NODE_ENV !== "production")) {
3768
+ warn$1(`injection "${String(key)}" not found.`);
3769
+ }
3770
+ } else if (!!(process.env.NODE_ENV !== "production")) {
3771
+ warn$1(`inject() can only be used inside setup() or functional components.`);
3772
+ }
3773
+ }
3774
+ function hasInjectionContext() {
3775
+ return !!(getCurrentGenericInstance() || currentApp);
3776
+ }
3777
+
3778
+ const ssrContextKey = /* @__PURE__ */ Symbol.for("v-scx");
3779
+ const useSSRContext = () => {
3780
+ {
3781
+ const ctx = inject(ssrContextKey);
3782
+ if (!ctx) {
3783
+ !!(process.env.NODE_ENV !== "production") && warn$1(
3784
+ `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
3785
+ );
3786
+ }
3787
+ return ctx;
3788
+ }
3789
+ };
3790
+
3791
+ function watchEffect(effect, options) {
3792
+ return doWatch(effect, null, options);
3793
+ }
3794
+ function watchPostEffect(effect, options) {
3795
+ return doWatch(
3796
+ effect,
3797
+ null,
3798
+ !!(process.env.NODE_ENV !== "production") ? extend({}, options, { flush: "post" }) : { flush: "post" }
3799
+ );
3800
+ }
3801
+ function watchSyncEffect(effect, options) {
3802
+ return doWatch(
3803
+ effect,
3804
+ null,
3805
+ !!(process.env.NODE_ENV !== "production") ? extend({}, options, { flush: "sync" }) : { flush: "sync" }
3806
+ );
3807
+ }
3808
+ function watch(source, cb, options) {
3809
+ if (!!(process.env.NODE_ENV !== "production") && !isFunction(cb)) {
3810
+ warn$1(
3811
+ `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.`
3812
+ );
3813
+ }
3814
+ return doWatch(source, cb, options);
3815
+ }
3816
+ class RenderWatcherEffect extends WatcherEffect {
3817
+ constructor(instance, source, cb, options, flush) {
3818
+ super(source, cb, options);
3819
+ this.flush = flush;
3820
+ const job = () => {
3821
+ if (this.dirty) {
3822
+ this.run();
3823
+ }
3824
+ };
3825
+ if (cb) {
3826
+ this.flags |= 128;
3827
+ job.flags |= 2;
3828
+ }
3829
+ if (instance) {
3830
+ job.i = instance;
3831
+ }
3832
+ this.job = job;
3833
+ }
3834
+ notify() {
3835
+ const flags = this.flags;
3836
+ if (!(flags & 256)) {
3837
+ const flush = this.flush;
3838
+ const job = this.job;
3839
+ if (flush === "post") {
3840
+ queuePostRenderEffect(job, void 0, job.i ? job.i.suspense : null);
3841
+ } else if (flush === "pre") {
3842
+ queueJob(job, job.i ? job.i.uid : void 0, true);
3843
+ } else {
3844
+ job();
3845
+ }
3846
+ }
3847
+ }
3848
+ }
3849
+ function doWatch(source, cb, options = EMPTY_OBJ) {
3850
+ const { immediate, deep, flush = "pre", once } = options;
3851
+ if (!!(process.env.NODE_ENV !== "production") && !cb) {
3852
+ if (immediate !== void 0) {
3853
+ warn$1(
3854
+ `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
3855
+ );
3856
+ }
3857
+ if (deep !== void 0) {
3858
+ warn$1(
3859
+ `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
3860
+ );
3861
+ }
3862
+ if (once !== void 0) {
3863
+ warn$1(
3864
+ `watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
3865
+ );
3866
+ }
3867
+ }
3868
+ const baseWatchOptions = extend({}, options);
3869
+ if (!!(process.env.NODE_ENV !== "production")) baseWatchOptions.onWarn = warn$1;
3870
+ const runsImmediately = cb && immediate || !cb && flush !== "post";
3871
+ let ssrCleanup;
3872
+ if (isInSSRComponentSetup) {
3873
+ if (flush === "sync") {
3874
+ const ctx = useSSRContext();
3875
+ ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
3876
+ } else if (!runsImmediately) {
3877
+ const watchStopHandle = () => {
3878
+ };
3879
+ watchStopHandle.stop = NOOP;
3880
+ watchStopHandle.resume = NOOP;
3881
+ watchStopHandle.pause = NOOP;
3882
+ return watchStopHandle;
3883
+ }
3884
+ }
3885
+ const instance = currentInstance;
3886
+ baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
3887
+ const effect = new RenderWatcherEffect(
3888
+ instance,
3889
+ source,
3890
+ cb,
3891
+ baseWatchOptions,
3892
+ flush
3893
+ );
3894
+ if (cb) {
3895
+ effect.run(true);
3896
+ } else if (flush === "post") {
3897
+ queuePostRenderEffect(effect.job, void 0, instance && instance.suspense);
3898
+ } else {
3899
+ effect.run(true);
3900
+ }
3901
+ const stop = effect.stop.bind(effect);
3902
+ stop.pause = effect.pause.bind(effect);
3903
+ stop.resume = effect.resume.bind(effect);
3904
+ stop.stop = stop;
3905
+ if (isInSSRComponentSetup) {
3906
+ if (ssrCleanup) {
3907
+ ssrCleanup.push(stop);
3908
+ } else if (runsImmediately) {
3909
+ stop();
3910
+ }
3911
+ }
3912
+ return stop;
3913
+ }
3914
+ function instanceWatch(source, value, options) {
3915
+ const publicThis = this.proxy;
3916
+ const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
3917
+ let cb;
3918
+ if (isFunction(value)) {
3919
+ cb = value;
3920
+ } else {
3921
+ cb = value.handler;
3922
+ options = value;
3923
+ }
3924
+ const prev = setCurrentInstance(this);
3925
+ const res = doWatch(getter, cb.bind(publicThis), options);
3926
+ setCurrentInstance(...prev);
3927
+ return res;
3928
+ }
3929
+ function createPathGetter(ctx, path) {
3930
+ const segments = path.split(".");
3931
+ return () => {
3932
+ let cur = ctx;
3933
+ for (let i = 0; i < segments.length && cur; i++) {
3934
+ cur = cur[segments[i]];
3935
+ }
3936
+ return cur;
3937
+ };
3938
+ }
3939
+
3940
+ const TeleportEndKey = /* @__PURE__ */ Symbol("_vte");
3804
3941
  const isTeleport = (type) => type.__isTeleport;
3805
3942
  const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
3806
3943
  const isTeleportDeferred = (props) => props && (props.defer || props.defer === "");
@@ -4172,8 +4309,8 @@ function prepareAnchor(target, vnode, createText, insert) {
4172
4309
  return targetAnchor;
4173
4310
  }
4174
4311
 
4175
- const leaveCbKey = Symbol("_leaveCb");
4176
- const enterCbKey$1 = Symbol("_enterCb");
4312
+ const leaveCbKey = /* @__PURE__ */ Symbol("_leaveCb");
4313
+ const enterCbKey$1 = /* @__PURE__ */ Symbol("_enterCb");
4177
4314
  function useTransitionState() {
4178
4315
  const state = {
4179
4316
  isMounted: false,
@@ -5813,7 +5950,9 @@ const KeepAliveImpl = {
5813
5950
  }
5814
5951
  function pruneCache(filter) {
5815
5952
  cache.forEach((vnode, key) => {
5816
- const name = getComponentName(vnode.type);
5953
+ const name = getComponentName(
5954
+ isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : vnode.type
5955
+ );
5817
5956
  if (name && !filter(name)) {
5818
5957
  pruneCacheEntry(key);
5819
5958
  }
@@ -6155,7 +6294,7 @@ const FILTERS = "filters";
6155
6294
  function resolveComponent(name, maybeSelfReference) {
6156
6295
  return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
6157
6296
  }
6158
- const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
6297
+ const NULL_DYNAMIC_COMPONENT = /* @__PURE__ */ Symbol.for("v-ndc");
6159
6298
  function resolveDynamicComponent(component) {
6160
6299
  if (isString(component)) {
6161
6300
  return resolveAsset(COMPONENTS, component, false) || component;
@@ -6597,14 +6736,14 @@ function ensureVaporSlotFallback(vnodes, fallback) {
6597
6736
  }
6598
6737
  }
6599
6738
 
6600
- function toHandlers(obj, preserveCaseIfNecessary) {
6739
+ function toHandlers(obj, preserveCaseIfNecessary, needWrap) {
6601
6740
  const ret = {};
6602
6741
  if (!!(process.env.NODE_ENV !== "production") && !isObject(obj)) {
6603
6742
  warn$1(`v-on with no argument expects an object value.`);
6604
6743
  return ret;
6605
6744
  }
6606
6745
  for (const key in obj) {
6607
- ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key];
6746
+ ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = needWrap ? () => obj[key] : obj[key];
6608
6747
  }
6609
6748
  return ret;
6610
6749
  }
@@ -7747,7 +7886,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
7747
7886
  return vm;
7748
7887
  }
7749
7888
  }
7750
- Vue.version = `2.6.14-compat:${"3.6.0-alpha.7"}`;
7889
+ Vue.version = `2.6.14-compat:${"3.6.0-beta.1"}`;
7751
7890
  Vue.config = singletonApp.config;
7752
7891
  Vue.use = (plugin, ...options) => {
7753
7892
  if (plugin && isFunction(plugin.install)) {
@@ -8242,271 +8381,141 @@ function createAppAPI(mount, unmount, getPublicInstance, render) {
8242
8381
  isMounted = true;
8243
8382
  app._container = rootContainer;
8244
8383
  rootContainer.__vue_app__ = app;
8245
- return getPublicInstance(instance);
8246
- } else if (!!(process.env.NODE_ENV !== "production")) {
8247
- warn$1(
8248
- `App has already been mounted.
8249
- If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\``
8250
- );
8251
- }
8252
- },
8253
- onUnmount(cleanupFn) {
8254
- if (!!(process.env.NODE_ENV !== "production") && typeof cleanupFn !== "function") {
8255
- warn$1(
8256
- `Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}`
8257
- );
8258
- }
8259
- pluginCleanupFns.push(cleanupFn);
8260
- },
8261
- unmount() {
8262
- if (isMounted) {
8263
- callWithAsyncErrorHandling(
8264
- pluginCleanupFns,
8265
- app._instance,
8266
- 16
8267
- );
8268
- unmount(app);
8269
- if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
8270
- app._instance = null;
8271
- devtoolsUnmountApp(app);
8272
- }
8273
- delete app._container.__vue_app__;
8274
- } else if (!!(process.env.NODE_ENV !== "production")) {
8275
- warn$1(`Cannot unmount an app that is not mounted.`);
8276
- }
8277
- },
8278
- provide(key, value) {
8279
- if (!!(process.env.NODE_ENV !== "production") && key in context.provides) {
8280
- if (hasOwn(context.provides, key)) {
8281
- warn$1(
8282
- `App already provides property with key "${String(key)}". It will be overwritten with the new value.`
8283
- );
8284
- } else {
8285
- warn$1(
8286
- `App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`
8287
- );
8288
- }
8289
- }
8290
- context.provides[key] = value;
8291
- return app;
8292
- },
8293
- runWithContext(fn) {
8294
- const lastApp = currentApp;
8295
- currentApp = app;
8296
- try {
8297
- return fn();
8298
- } finally {
8299
- currentApp = lastApp;
8300
- }
8301
- }
8302
- };
8303
- {
8304
- installAppCompatProperties(
8305
- app,
8306
- context,
8307
- // vapor doesn't have compat mode so this is always passed
8308
- render
8309
- );
8310
- }
8311
- return app;
8312
- };
8313
- }
8314
- let currentApp = null;
8315
-
8316
- function provide(key, value) {
8317
- if (!!(process.env.NODE_ENV !== "production")) {
8318
- if (!currentInstance || currentInstance.isMounted) {
8319
- warn$1(`provide() can only be used inside setup().`);
8320
- }
8321
- }
8322
- if (currentInstance) {
8323
- let provides = currentInstance.provides;
8324
- const parentProvides = currentInstance.parent && currentInstance.parent.provides;
8325
- if (parentProvides === provides) {
8326
- provides = currentInstance.provides = Object.create(parentProvides);
8327
- }
8328
- provides[key] = value;
8329
- }
8330
- }
8331
- function inject(key, defaultValue, treatDefaultAsFactory = false) {
8332
- const instance = getCurrentGenericInstance();
8333
- if (instance || currentApp) {
8334
- let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.appContext && instance.appContext.provides : instance.parent.provides : void 0;
8335
- if (provides && key in provides) {
8336
- return provides[key];
8337
- } else if (arguments.length > 1) {
8338
- return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
8339
- } else if (!!(process.env.NODE_ENV !== "production")) {
8340
- warn$1(`injection "${String(key)}" not found.`);
8341
- }
8342
- } else if (!!(process.env.NODE_ENV !== "production")) {
8343
- warn$1(`inject() can only be used inside setup() or functional components.`);
8344
- }
8345
- }
8346
- function hasInjectionContext() {
8347
- return !!(getCurrentGenericInstance() || currentApp);
8348
- }
8349
-
8350
- const ssrContextKey = Symbol.for("v-scx");
8351
- const useSSRContext = () => {
8352
- {
8353
- const ctx = inject(ssrContextKey);
8354
- if (!ctx) {
8355
- !!(process.env.NODE_ENV !== "production") && warn$1(
8356
- `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
8357
- );
8358
- }
8359
- return ctx;
8360
- }
8361
- };
8362
-
8363
- function watchEffect(effect, options) {
8364
- return doWatch(effect, null, options);
8365
- }
8366
- function watchPostEffect(effect, options) {
8367
- return doWatch(
8368
- effect,
8369
- null,
8370
- !!(process.env.NODE_ENV !== "production") ? extend({}, options, { flush: "post" }) : { flush: "post" }
8371
- );
8372
- }
8373
- function watchSyncEffect(effect, options) {
8374
- return doWatch(
8375
- effect,
8376
- null,
8377
- !!(process.env.NODE_ENV !== "production") ? extend({}, options, { flush: "sync" }) : { flush: "sync" }
8378
- );
8379
- }
8380
- function watch(source, cb, options) {
8381
- if (!!(process.env.NODE_ENV !== "production") && !isFunction(cb)) {
8382
- warn$1(
8383
- `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.`
8384
- );
8385
- }
8386
- return doWatch(source, cb, options);
8387
- }
8388
- class RenderWatcherEffect extends WatcherEffect {
8389
- constructor(instance, source, cb, options, flush) {
8390
- super(source, cb, options);
8391
- this.flush = flush;
8392
- const job = () => {
8393
- if (this.dirty) {
8394
- this.run();
8384
+ return getPublicInstance(instance);
8385
+ } else if (!!(process.env.NODE_ENV !== "production")) {
8386
+ warn$1(
8387
+ `App has already been mounted.
8388
+ If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\``
8389
+ );
8390
+ }
8391
+ },
8392
+ onUnmount(cleanupFn) {
8393
+ if (!!(process.env.NODE_ENV !== "production") && typeof cleanupFn !== "function") {
8394
+ warn$1(
8395
+ `Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}`
8396
+ );
8397
+ }
8398
+ pluginCleanupFns.push(cleanupFn);
8399
+ },
8400
+ unmount() {
8401
+ if (isMounted) {
8402
+ callWithAsyncErrorHandling(
8403
+ pluginCleanupFns,
8404
+ app._instance,
8405
+ 16
8406
+ );
8407
+ unmount(app);
8408
+ if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
8409
+ app._instance = null;
8410
+ devtoolsUnmountApp(app);
8411
+ }
8412
+ delete app._container.__vue_app__;
8413
+ } else if (!!(process.env.NODE_ENV !== "production")) {
8414
+ warn$1(`Cannot unmount an app that is not mounted.`);
8415
+ }
8416
+ },
8417
+ provide(key, value) {
8418
+ if (!!(process.env.NODE_ENV !== "production") && key in context.provides) {
8419
+ if (hasOwn(context.provides, key)) {
8420
+ warn$1(
8421
+ `App already provides property with key "${String(key)}". It will be overwritten with the new value.`
8422
+ );
8423
+ } else {
8424
+ warn$1(
8425
+ `App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`
8426
+ );
8427
+ }
8428
+ }
8429
+ context.provides[key] = value;
8430
+ return app;
8431
+ },
8432
+ runWithContext(fn) {
8433
+ const lastApp = currentApp;
8434
+ currentApp = app;
8435
+ try {
8436
+ return fn();
8437
+ } finally {
8438
+ currentApp = lastApp;
8439
+ }
8395
8440
  }
8396
8441
  };
8397
- if (cb) {
8398
- this.flags |= 128;
8399
- job.flags |= 2;
8400
- }
8401
- if (instance) {
8402
- job.i = instance;
8403
- }
8404
- this.job = job;
8405
- }
8406
- notify() {
8407
- const flags = this.flags;
8408
- if (!(flags & 256)) {
8409
- const flush = this.flush;
8410
- const job = this.job;
8411
- if (flush === "post") {
8412
- queuePostRenderEffect(job, void 0, job.i ? job.i.suspense : null);
8413
- } else if (flush === "pre") {
8414
- queueJob(job, job.i ? job.i.uid : void 0, true);
8415
- } else {
8416
- job();
8417
- }
8418
- }
8419
- }
8420
- }
8421
- function doWatch(source, cb, options = EMPTY_OBJ) {
8422
- const { immediate, deep, flush = "pre", once } = options;
8423
- if (!!(process.env.NODE_ENV !== "production") && !cb) {
8424
- if (immediate !== void 0) {
8425
- warn$1(
8426
- `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
8442
+ {
8443
+ installAppCompatProperties(
8444
+ app,
8445
+ context,
8446
+ // vapor doesn't have compat mode so this is always passed
8447
+ render
8427
8448
  );
8428
8449
  }
8429
- if (deep !== void 0) {
8430
- warn$1(
8431
- `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
8432
- );
8450
+ return app;
8451
+ };
8452
+ }
8453
+ let currentApp = null;
8454
+
8455
+ const compatModelEventPrefix = `onModelCompat:`;
8456
+ const warnedTypes = /* @__PURE__ */ new WeakSet();
8457
+ function convertLegacyVModelProps(vnode) {
8458
+ const { type, shapeFlag, props, dynamicProps } = vnode;
8459
+ const comp = type;
8460
+ if (shapeFlag & 6 && props && "modelValue" in props) {
8461
+ if (!isCompatEnabled$1(
8462
+ "COMPONENT_V_MODEL",
8463
+ // this is a special case where we want to use the vnode component's
8464
+ // compat config instead of the current rendering instance (which is the
8465
+ // parent of the component that exposes v-model)
8466
+ { type }
8467
+ )) {
8468
+ return;
8433
8469
  }
8434
- if (once !== void 0) {
8435
- warn$1(
8436
- `watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
8470
+ if (!!(process.env.NODE_ENV !== "production") && !warnedTypes.has(comp)) {
8471
+ pushWarningContext(vnode);
8472
+ warnDeprecation$1(
8473
+ "COMPONENT_V_MODEL",
8474
+ {
8475
+ type,
8476
+ appContext: vnode.ctx && vnode.ctx.appContext || createAppContext()
8477
+ },
8478
+ comp
8437
8479
  );
8480
+ popWarningContext();
8481
+ warnedTypes.add(comp);
8438
8482
  }
8439
- }
8440
- const baseWatchOptions = extend({}, options);
8441
- if (!!(process.env.NODE_ENV !== "production")) baseWatchOptions.onWarn = warn$1;
8442
- const runsImmediately = cb && immediate || !cb && flush !== "post";
8443
- let ssrCleanup;
8444
- if (isInSSRComponentSetup) {
8445
- if (flush === "sync") {
8446
- const ctx = useSSRContext();
8447
- ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
8448
- } else if (!runsImmediately) {
8449
- const watchStopHandle = () => {
8450
- };
8451
- watchStopHandle.stop = NOOP;
8452
- watchStopHandle.resume = NOOP;
8453
- watchStopHandle.pause = NOOP;
8454
- return watchStopHandle;
8483
+ const model = comp.model || {};
8484
+ applyModelFromMixins(model, comp.mixins);
8485
+ const { prop = "value", event = "input" } = model;
8486
+ if (prop !== "modelValue") {
8487
+ props[prop] = props.modelValue;
8488
+ delete props.modelValue;
8455
8489
  }
8456
- }
8457
- const instance = currentInstance;
8458
- baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
8459
- const effect = new RenderWatcherEffect(
8460
- instance,
8461
- source,
8462
- cb,
8463
- baseWatchOptions,
8464
- flush
8465
- );
8466
- if (cb) {
8467
- effect.run(true);
8468
- } else if (flush === "post") {
8469
- queuePostRenderEffect(effect.job, void 0, instance && instance.suspense);
8470
- } else {
8471
- effect.run(true);
8472
- }
8473
- const stop = effect.stop.bind(effect);
8474
- stop.pause = effect.pause.bind(effect);
8475
- stop.resume = effect.resume.bind(effect);
8476
- stop.stop = stop;
8477
- if (isInSSRComponentSetup) {
8478
- if (ssrCleanup) {
8479
- ssrCleanup.push(stop);
8480
- } else if (runsImmediately) {
8481
- stop();
8490
+ if (dynamicProps) {
8491
+ dynamicProps[dynamicProps.indexOf("modelValue")] = prop;
8482
8492
  }
8493
+ props[compatModelEventPrefix + event] = props["onUpdate:modelValue"];
8494
+ delete props["onUpdate:modelValue"];
8483
8495
  }
8484
- return stop;
8485
8496
  }
8486
- function instanceWatch(source, value, options) {
8487
- const publicThis = this.proxy;
8488
- const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
8489
- let cb;
8490
- if (isFunction(value)) {
8491
- cb = value;
8492
- } else {
8493
- cb = value.handler;
8494
- options = value;
8497
+ function applyModelFromMixins(model, mixins) {
8498
+ if (mixins) {
8499
+ mixins.forEach((m) => {
8500
+ if (m.model) extend(model, m.model);
8501
+ if (m.mixins) applyModelFromMixins(model, m.mixins);
8502
+ });
8495
8503
  }
8496
- const prev = setCurrentInstance(this);
8497
- const res = doWatch(getter, cb.bind(publicThis), options);
8498
- setCurrentInstance(...prev);
8499
- return res;
8500
8504
  }
8501
- function createPathGetter(ctx, path) {
8502
- const segments = path.split(".");
8503
- return () => {
8504
- let cur = ctx;
8505
- for (let i = 0; i < segments.length && cur; i++) {
8506
- cur = cur[segments[i]];
8507
- }
8508
- return cur;
8509
- };
8505
+ function compatModelEmit(instance, event, args) {
8506
+ if (!isCompatEnabled$1("COMPONENT_V_MODEL", instance)) {
8507
+ return;
8508
+ }
8509
+ const props = instance.vnode.props;
8510
+ const modelHandler = props && props[compatModelEventPrefix + event];
8511
+ if (modelHandler) {
8512
+ callWithErrorHandling(
8513
+ modelHandler,
8514
+ instance,
8515
+ 6,
8516
+ args
8517
+ );
8518
+ }
8510
8519
  }
8511
8520
 
8512
8521
  function useModel(props, name, options = EMPTY_OBJ) {
@@ -9884,7 +9893,15 @@ function baseCreateRenderer(options, createHydrationFns) {
9884
9893
  } else {
9885
9894
  const el = n2.el = n1.el;
9886
9895
  if (n2.children !== n1.children) {
9887
- hostSetText(el, n2.children);
9896
+ if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating && n2.patchFlag === -1 && "__elIndex" in n1) {
9897
+ const childNodes = container.childNodes;
9898
+ const newChild = hostCreateText(n2.children);
9899
+ const oldChild = childNodes[n2.__elIndex = n1.__elIndex];
9900
+ hostInsert(newChild, container, oldChild);
9901
+ hostRemove(oldChild);
9902
+ } else {
9903
+ hostSetText(el, n2.children);
9904
+ }
9888
9905
  }
9889
9906
  }
9890
9907
  };
@@ -10268,7 +10285,7 @@ function baseCreateRenderer(options, createHydrationFns) {
10268
10285
  } else {
10269
10286
  if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result
10270
10287
  // of renderSlot() with no valid children
10271
- n1.dynamicChildren) {
10288
+ n1.dynamicChildren && n1.dynamicChildren.length === dynamicChildren.length) {
10272
10289
  patchBlockChildren(
10273
10290
  n1.dynamicChildren,
10274
10291
  dynamicChildren,
@@ -10997,8 +11014,8 @@ function baseCreateRenderer(options, createHydrationFns) {
10997
11014
  const nextChild = c2[nextIndex];
10998
11015
  const anchorVNode = c2[nextIndex + 1];
10999
11016
  const anchor = nextIndex + 1 < l2 ? (
11000
- // #13559, fallback to el placeholder for unresolved async component
11001
- anchorVNode.el || anchorVNode.placeholder
11017
+ // #13559, #14173 fallback to el placeholder for unresolved async component
11018
+ anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode)
11002
11019
  ) : parentAnchor;
11003
11020
  if (newIndexToOldIndexMap[i] === 0) {
11004
11021
  patch(
@@ -11313,9 +11330,11 @@ function baseCreateRenderer(options, createHydrationFns) {
11313
11330
  return teleportEnd ? hostNextSibling(teleportEnd) : el;
11314
11331
  };
11315
11332
  const render = (vnode, container, namespace) => {
11333
+ let instance;
11316
11334
  if (vnode == null) {
11317
11335
  if (container._vnode) {
11318
11336
  unmount(container._vnode, null, null, true);
11337
+ instance = container._vnode.component;
11319
11338
  }
11320
11339
  } else {
11321
11340
  patch(
@@ -11329,7 +11348,7 @@ function baseCreateRenderer(options, createHydrationFns) {
11329
11348
  );
11330
11349
  }
11331
11350
  container._vnode = vnode;
11332
- flushOnAppMount();
11351
+ flushOnAppMount(instance);
11333
11352
  };
11334
11353
  const internals = {
11335
11354
  p: patch,
@@ -11421,9 +11440,13 @@ function traverseStaticChildren(n1, n2, shallow = false) {
11421
11440
  if (!shallow && c2.patchFlag !== -2)
11422
11441
  traverseStaticChildren(c1, c2);
11423
11442
  }
11424
- if (c2.type === Text && // avoid cached text nodes retaining detached dom nodes
11425
- c2.patchFlag !== -1) {
11426
- c2.el = c1.el;
11443
+ if (c2.type === Text) {
11444
+ if (c2.patchFlag !== -1) {
11445
+ c2.el = c1.el;
11446
+ } else {
11447
+ c2.__elIndex = i + // take fragment start anchor into account
11448
+ (n1.type === Fragment ? 1 : 0);
11449
+ }
11427
11450
  }
11428
11451
  if (c2.type === Comment && !c2.el) {
11429
11452
  c2.el = c1.el;
@@ -11459,16 +11482,24 @@ function performTransitionEnter(el, transition, insert, parentSuspense, force =
11459
11482
  insert();
11460
11483
  }
11461
11484
  }
11462
- function performTransitionLeave(el, transition, remove, isElement = true) {
11485
+ function performTransitionLeave(el, transition, remove, isElement = true, force = false) {
11463
11486
  const performRemove = () => {
11464
11487
  remove();
11465
11488
  if (transition && !transition.persisted && transition.afterLeave) {
11466
11489
  transition.afterLeave();
11467
11490
  }
11468
11491
  };
11469
- if (isElement && transition && !transition.persisted) {
11492
+ if (force || isElement && transition && !transition.persisted) {
11470
11493
  const { leave, delayLeave } = transition;
11471
- const performLeave = () => leave(el, performRemove);
11494
+ const performLeave = () => {
11495
+ if (el._isLeaving && force) {
11496
+ el[leaveCbKey](
11497
+ true
11498
+ /* cancelled */
11499
+ );
11500
+ }
11501
+ leave(el, performRemove);
11502
+ };
11472
11503
  if (delayLeave) {
11473
11504
  delayLeave(el, performRemove, performLeave);
11474
11505
  } else {
@@ -11524,6 +11555,16 @@ function getInheritedScopeIds(vnode, parentComponent) {
11524
11555
  }
11525
11556
  return inheritedScopeIds;
11526
11557
  }
11558
+ function resolveAsyncComponentPlaceholder(anchorVnode) {
11559
+ if (anchorVnode.placeholder) {
11560
+ return anchorVnode.placeholder;
11561
+ }
11562
+ const instance = anchorVnode.component;
11563
+ if (instance) {
11564
+ return resolveAsyncComponentPlaceholder(instance.subTree);
11565
+ }
11566
+ return null;
11567
+ }
11527
11568
 
11528
11569
  const isSuspense = (type) => type.__isSuspense;
11529
11570
  let suspenseId = 0;
@@ -12163,11 +12204,11 @@ function convertLegacyComponent(comp, instance) {
12163
12204
  return comp;
12164
12205
  }
12165
12206
 
12166
- const Fragment = Symbol.for("v-fgt");
12167
- const Text = Symbol.for("v-txt");
12168
- const Comment = Symbol.for("v-cmt");
12169
- const Static = Symbol.for("v-stc");
12170
- const VaporSlot = Symbol.for("v-vps");
12207
+ const Fragment = /* @__PURE__ */ Symbol.for("v-fgt");
12208
+ const Text = /* @__PURE__ */ Symbol.for("v-txt");
12209
+ const Comment = /* @__PURE__ */ Symbol.for("v-cmt");
12210
+ const Static = /* @__PURE__ */ Symbol.for("v-stc");
12211
+ const VaporSlot = /* @__PURE__ */ Symbol.for("v-vps");
12171
12212
  const blockStack = [];
12172
12213
  let currentBlock = null;
12173
12214
  function openBlock(disableTracking = false) {
@@ -13262,7 +13303,7 @@ function isMemoSame(cached, memo) {
13262
13303
  return true;
13263
13304
  }
13264
13305
 
13265
- const version = "3.6.0-alpha.7";
13306
+ const version = "3.6.0-beta.1";
13266
13307
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
13267
13308
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
13268
13309
  const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
@@ -13374,7 +13415,7 @@ const nodeOps = {
13374
13415
 
13375
13416
  const TRANSITION$1 = "transition";
13376
13417
  const ANIMATION = "animation";
13377
- const vtcKey = Symbol("_vtc");
13418
+ const vtcKey = /* @__PURE__ */ Symbol("_vtc");
13378
13419
  const DOMTransitionPropsValidators = {
13379
13420
  name: String,
13380
13421
  type: String,
@@ -13704,8 +13745,8 @@ function patchClass(el, value, isSVG) {
13704
13745
  }
13705
13746
  }
13706
13747
 
13707
- const vShowOriginalDisplay = Symbol("_vod");
13708
- const vShowHidden = Symbol("_vsh");
13748
+ const vShowOriginalDisplay = /* @__PURE__ */ Symbol("_vod");
13749
+ const vShowHidden = /* @__PURE__ */ Symbol("_vsh");
13709
13750
  const vShow = {
13710
13751
  // used for prop mismatch check during hydration
13711
13752
  name: "show",
@@ -13754,7 +13795,7 @@ function initVShowForSSR() {
13754
13795
  };
13755
13796
  }
13756
13797
 
13757
- const CSS_VAR_TEXT = Symbol(!!(process.env.NODE_ENV !== "production") ? "CSS_VAR_TEXT" : "");
13798
+ const CSS_VAR_TEXT = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? "CSS_VAR_TEXT" : "");
13758
13799
  function useCssVars(getter) {
13759
13800
  const instance = getCurrentInstance();
13760
13801
  const getVars = () => getter(instance.proxy);
@@ -13964,7 +14005,7 @@ function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBoolean
13964
14005
  const isEnumeratedAttr = /* @__PURE__ */ makeMap("contenteditable,draggable,spellcheck") ;
13965
14006
  function compatCoerceAttr(el, key, value, instance = null) {
13966
14007
  if (isEnumeratedAttr(key)) {
13967
- const v2CoercedValue = value === null ? "false" : typeof value !== "boolean" && value !== void 0 ? "true" : null;
14008
+ const v2CoercedValue = value === void 0 ? null : value === null || value === false || value === "false" ? "false" : "true";
13968
14009
  if (v2CoercedValue && compatUtils.softAssertCompatEnabled(
13969
14010
  "ATTR_ENUMERATED_COERCION",
13970
14011
  instance,
@@ -14059,7 +14100,7 @@ function addEventListener(el, event, handler, options) {
14059
14100
  function removeEventListener(el, event, handler, options) {
14060
14101
  el.removeEventListener(event, handler, options);
14061
14102
  }
14062
- const veiKey = Symbol("_vei");
14103
+ const veiKey = /* @__PURE__ */ Symbol("_vei");
14063
14104
  function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
14064
14105
  const invokers = el[veiKey] || (el[veiKey] = {});
14065
14106
  const existingInvoker = invokers[rawName];
@@ -14721,8 +14762,8 @@ function useCssModule(name = "$style") {
14721
14762
 
14722
14763
  const positionMap = /* @__PURE__ */ new WeakMap();
14723
14764
  const newPositionMap = /* @__PURE__ */ new WeakMap();
14724
- const moveCbKey = Symbol("_moveCb");
14725
- const enterCbKey = Symbol("_enterCb");
14765
+ const moveCbKey = /* @__PURE__ */ Symbol("_moveCb");
14766
+ const enterCbKey = /* @__PURE__ */ Symbol("_enterCb");
14726
14767
  const decorate = (t) => {
14727
14768
  delete t.props.mode;
14728
14769
  {
@@ -14894,7 +14935,7 @@ function onCompositionEnd(e) {
14894
14935
  target.dispatchEvent(new Event("input"));
14895
14936
  }
14896
14937
  }
14897
- const assignKey = Symbol("_assign");
14938
+ const assignKey = /* @__PURE__ */ Symbol("_assign");
14898
14939
  const vModelText = {
14899
14940
  created(el, { modifiers: { lazy, trim, number } }, vnode) {
14900
14941
  el[assignKey] = getModelAssigner(vnode);
@@ -15707,81 +15748,81 @@ function createCompatVue() {
15707
15748
  return Vue;
15708
15749
  }
15709
15750
 
15710
- const FRAGMENT = Symbol(!!(process.env.NODE_ENV !== "production") ? `Fragment` : ``);
15711
- const TELEPORT = Symbol(!!(process.env.NODE_ENV !== "production") ? `Teleport` : ``);
15712
- const SUSPENSE = Symbol(!!(process.env.NODE_ENV !== "production") ? `Suspense` : ``);
15713
- const KEEP_ALIVE = Symbol(!!(process.env.NODE_ENV !== "production") ? `KeepAlive` : ``);
15714
- const BASE_TRANSITION = Symbol(
15751
+ const FRAGMENT = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `Fragment` : ``);
15752
+ const TELEPORT = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `Teleport` : ``);
15753
+ const SUSPENSE = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `Suspense` : ``);
15754
+ const KEEP_ALIVE = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `KeepAlive` : ``);
15755
+ const BASE_TRANSITION = /* @__PURE__ */ Symbol(
15715
15756
  !!(process.env.NODE_ENV !== "production") ? `BaseTransition` : ``
15716
15757
  );
15717
- const OPEN_BLOCK = Symbol(!!(process.env.NODE_ENV !== "production") ? `openBlock` : ``);
15718
- const CREATE_BLOCK = Symbol(!!(process.env.NODE_ENV !== "production") ? `createBlock` : ``);
15719
- const CREATE_ELEMENT_BLOCK = Symbol(
15758
+ const OPEN_BLOCK = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `openBlock` : ``);
15759
+ const CREATE_BLOCK = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `createBlock` : ``);
15760
+ const CREATE_ELEMENT_BLOCK = /* @__PURE__ */ Symbol(
15720
15761
  !!(process.env.NODE_ENV !== "production") ? `createElementBlock` : ``
15721
15762
  );
15722
- const CREATE_VNODE = Symbol(!!(process.env.NODE_ENV !== "production") ? `createVNode` : ``);
15723
- const CREATE_ELEMENT_VNODE = Symbol(
15763
+ const CREATE_VNODE = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `createVNode` : ``);
15764
+ const CREATE_ELEMENT_VNODE = /* @__PURE__ */ Symbol(
15724
15765
  !!(process.env.NODE_ENV !== "production") ? `createElementVNode` : ``
15725
15766
  );
15726
- const CREATE_COMMENT = Symbol(
15767
+ const CREATE_COMMENT = /* @__PURE__ */ Symbol(
15727
15768
  !!(process.env.NODE_ENV !== "production") ? `createCommentVNode` : ``
15728
15769
  );
15729
- const CREATE_TEXT = Symbol(
15770
+ const CREATE_TEXT = /* @__PURE__ */ Symbol(
15730
15771
  !!(process.env.NODE_ENV !== "production") ? `createTextVNode` : ``
15731
15772
  );
15732
- const CREATE_STATIC = Symbol(
15773
+ const CREATE_STATIC = /* @__PURE__ */ Symbol(
15733
15774
  !!(process.env.NODE_ENV !== "production") ? `createStaticVNode` : ``
15734
15775
  );
15735
- const RESOLVE_COMPONENT = Symbol(
15776
+ const RESOLVE_COMPONENT = /* @__PURE__ */ Symbol(
15736
15777
  !!(process.env.NODE_ENV !== "production") ? `resolveComponent` : ``
15737
15778
  );
15738
- const RESOLVE_DYNAMIC_COMPONENT = Symbol(
15779
+ const RESOLVE_DYNAMIC_COMPONENT = /* @__PURE__ */ Symbol(
15739
15780
  !!(process.env.NODE_ENV !== "production") ? `resolveDynamicComponent` : ``
15740
15781
  );
15741
- const RESOLVE_DIRECTIVE = Symbol(
15782
+ const RESOLVE_DIRECTIVE = /* @__PURE__ */ Symbol(
15742
15783
  !!(process.env.NODE_ENV !== "production") ? `resolveDirective` : ``
15743
15784
  );
15744
- const RESOLVE_FILTER = Symbol(
15785
+ const RESOLVE_FILTER = /* @__PURE__ */ Symbol(
15745
15786
  !!(process.env.NODE_ENV !== "production") ? `resolveFilter` : ``
15746
15787
  );
15747
- const WITH_DIRECTIVES = Symbol(
15788
+ const WITH_DIRECTIVES = /* @__PURE__ */ Symbol(
15748
15789
  !!(process.env.NODE_ENV !== "production") ? `withDirectives` : ``
15749
15790
  );
15750
- const RENDER_LIST = Symbol(!!(process.env.NODE_ENV !== "production") ? `renderList` : ``);
15751
- const RENDER_SLOT = Symbol(!!(process.env.NODE_ENV !== "production") ? `renderSlot` : ``);
15752
- const CREATE_SLOTS = Symbol(!!(process.env.NODE_ENV !== "production") ? `createSlots` : ``);
15753
- const TO_DISPLAY_STRING = Symbol(
15791
+ const RENDER_LIST = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `renderList` : ``);
15792
+ const RENDER_SLOT = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `renderSlot` : ``);
15793
+ const CREATE_SLOTS = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `createSlots` : ``);
15794
+ const TO_DISPLAY_STRING = /* @__PURE__ */ Symbol(
15754
15795
  !!(process.env.NODE_ENV !== "production") ? `toDisplayString` : ``
15755
15796
  );
15756
- const MERGE_PROPS = Symbol(!!(process.env.NODE_ENV !== "production") ? `mergeProps` : ``);
15757
- const NORMALIZE_CLASS = Symbol(
15797
+ const MERGE_PROPS = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `mergeProps` : ``);
15798
+ const NORMALIZE_CLASS = /* @__PURE__ */ Symbol(
15758
15799
  !!(process.env.NODE_ENV !== "production") ? `normalizeClass` : ``
15759
15800
  );
15760
- const NORMALIZE_STYLE = Symbol(
15801
+ const NORMALIZE_STYLE = /* @__PURE__ */ Symbol(
15761
15802
  !!(process.env.NODE_ENV !== "production") ? `normalizeStyle` : ``
15762
15803
  );
15763
- const NORMALIZE_PROPS = Symbol(
15804
+ const NORMALIZE_PROPS = /* @__PURE__ */ Symbol(
15764
15805
  !!(process.env.NODE_ENV !== "production") ? `normalizeProps` : ``
15765
15806
  );
15766
- const GUARD_REACTIVE_PROPS = Symbol(
15807
+ const GUARD_REACTIVE_PROPS = /* @__PURE__ */ Symbol(
15767
15808
  !!(process.env.NODE_ENV !== "production") ? `guardReactiveProps` : ``
15768
15809
  );
15769
- const TO_HANDLERS = Symbol(!!(process.env.NODE_ENV !== "production") ? `toHandlers` : ``);
15770
- const CAMELIZE = Symbol(!!(process.env.NODE_ENV !== "production") ? `camelize` : ``);
15771
- const CAPITALIZE = Symbol(!!(process.env.NODE_ENV !== "production") ? `capitalize` : ``);
15772
- const TO_HANDLER_KEY = Symbol(
15810
+ const TO_HANDLERS = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `toHandlers` : ``);
15811
+ const CAMELIZE = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `camelize` : ``);
15812
+ const CAPITALIZE = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `capitalize` : ``);
15813
+ const TO_HANDLER_KEY = /* @__PURE__ */ Symbol(
15773
15814
  !!(process.env.NODE_ENV !== "production") ? `toHandlerKey` : ``
15774
15815
  );
15775
- const SET_BLOCK_TRACKING = Symbol(
15816
+ const SET_BLOCK_TRACKING = /* @__PURE__ */ Symbol(
15776
15817
  !!(process.env.NODE_ENV !== "production") ? `setBlockTracking` : ``
15777
15818
  );
15778
- const PUSH_SCOPE_ID = Symbol(!!(process.env.NODE_ENV !== "production") ? `pushScopeId` : ``);
15779
- const POP_SCOPE_ID = Symbol(!!(process.env.NODE_ENV !== "production") ? `popScopeId` : ``);
15780
- const WITH_CTX = Symbol(!!(process.env.NODE_ENV !== "production") ? `withCtx` : ``);
15781
- const UNREF = Symbol(!!(process.env.NODE_ENV !== "production") ? `unref` : ``);
15782
- const IS_REF = Symbol(!!(process.env.NODE_ENV !== "production") ? `isRef` : ``);
15783
- const WITH_MEMO = Symbol(!!(process.env.NODE_ENV !== "production") ? `withMemo` : ``);
15784
- const IS_MEMO_SAME = Symbol(!!(process.env.NODE_ENV !== "production") ? `isMemoSame` : ``);
15819
+ const PUSH_SCOPE_ID = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `pushScopeId` : ``);
15820
+ const POP_SCOPE_ID = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `popScopeId` : ``);
15821
+ const WITH_CTX = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `withCtx` : ``);
15822
+ const UNREF = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `unref` : ``);
15823
+ const IS_REF = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `isRef` : ``);
15824
+ const WITH_MEMO = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `withMemo` : ``);
15825
+ const IS_MEMO_SAME = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `isMemoSame` : ``);
15785
15826
  const helperNameMap = {
15786
15827
  [FRAGMENT]: `Fragment`,
15787
15828
  [TELEPORT]: `Teleport`,
@@ -16076,14 +16117,28 @@ class Tokenizer {
16076
16117
  getPos(index) {
16077
16118
  let line = 1;
16078
16119
  let column = index + 1;
16079
- for (let i = this.newlines.length - 1; i >= 0; i--) {
16080
- const newlineIndex = this.newlines[i];
16081
- if (index > newlineIndex) {
16082
- line = i + 2;
16083
- column = index - newlineIndex;
16084
- break;
16120
+ const length = this.newlines.length;
16121
+ let j = -1;
16122
+ if (length > 100) {
16123
+ let l = -1;
16124
+ let r = length;
16125
+ while (l + 1 < r) {
16126
+ const m = l + r >>> 1;
16127
+ this.newlines[m] < index ? l = m : r = m;
16128
+ }
16129
+ j = l;
16130
+ } else {
16131
+ for (let i = length - 1; i >= 0; i--) {
16132
+ if (index > this.newlines[i]) {
16133
+ j = i;
16134
+ break;
16135
+ }
16085
16136
  }
16086
16137
  }
16138
+ if (j >= 0) {
16139
+ line = j + 2;
16140
+ column = index - this.newlines[j];
16141
+ }
16087
16142
  return {
16088
16143
  column,
16089
16144
  line,
@@ -16898,7 +16953,7 @@ const errorMessages = {
16898
16953
  [32]: `v-for has invalid expression.`,
16899
16954
  [33]: `<template v-for> key should be placed on the <template> tag.`,
16900
16955
  [34]: `v-bind is missing expression.`,
16901
- [52]: `v-bind with same-name shorthand only allows static argument.`,
16956
+ [53]: `v-bind with same-name shorthand only allows static argument.`,
16902
16957
  [35]: `v-on is missing expression.`,
16903
16958
  [36]: `Unexpected custom directive on <slot> outlet.`,
16904
16959
  [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`,
@@ -16910,16 +16965,17 @@ const errorMessages = {
16910
16965
  [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
16911
16966
  [44]: `v-model cannot be used on a prop, because local prop bindings are not writable.
16912
16967
  Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
16913
- [45]: `Error parsing JavaScript expression: `,
16914
- [46]: `<KeepAlive> expects exactly one child component.`,
16915
- [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`,
16968
+ [45]: `v-model cannot be used on a const binding because it is not writable.`,
16969
+ [46]: `Error parsing JavaScript expression: `,
16970
+ [47]: `<KeepAlive> expects exactly one child component.`,
16971
+ [52]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`,
16916
16972
  // generic errors
16917
- [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
16918
- [48]: `ES module mode is not supported in this build of compiler.`,
16919
- [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
16920
- [50]: `"scopeId" option is only supported in module mode.`,
16973
+ [48]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
16974
+ [49]: `ES module mode is not supported in this build of compiler.`,
16975
+ [50]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
16976
+ [51]: `"scopeId" option is only supported in module mode.`,
16921
16977
  // just to fulfill types
16922
- [53]: ``
16978
+ [54]: ``
16923
16979
  };
16924
16980
 
16925
16981
  const isStaticExp = (p) => p.type === 4 && p.isStatic;
@@ -19112,7 +19168,7 @@ function validateBrowserExpression(node, context, asParams = false, asRawStateme
19112
19168
  }
19113
19169
  context.onError(
19114
19170
  createCompilerError(
19115
- 45,
19171
+ 46,
19116
19172
  node.loc,
19117
19173
  void 0,
19118
19174
  message
@@ -19878,7 +19934,7 @@ const transformElement = (node, context) => {
19878
19934
  patchFlag |= 1024;
19879
19935
  if (!!(process.env.NODE_ENV !== "production") && node.children.length > 1) {
19880
19936
  context.onError(
19881
- createCompilerError(46, {
19937
+ createCompilerError(47, {
19882
19938
  start: node.children[0].loc.start,
19883
19939
  end: node.children[node.children.length - 1].loc.end,
19884
19940
  source: ""
@@ -20465,7 +20521,7 @@ const transformOn$1 = (dir, node, context, augmentor) => {
20465
20521
  if (arg.isStatic) {
20466
20522
  let rawName = arg.content;
20467
20523
  if (!!(process.env.NODE_ENV !== "production") && rawName.startsWith("vnode")) {
20468
- context.onError(createCompilerError(51, arg.loc));
20524
+ context.onError(createCompilerError(52, arg.loc));
20469
20525
  }
20470
20526
  if (rawName.startsWith("vue:")) {
20471
20527
  rawName = `vnode-${rawName.slice(4)}`;
@@ -20698,6 +20754,10 @@ const transformModel$1 = (dir, node, context) => {
20698
20754
  context.onError(createCompilerError(44, exp.loc));
20699
20755
  return createTransformProps();
20700
20756
  }
20757
+ if (bindingType === "literal-const" || bindingType === "setup-const") {
20758
+ context.onError(createCompilerError(45, exp.loc));
20759
+ return createTransformProps();
20760
+ }
20701
20761
  if (!expString.trim() || !isMemberExpression(exp) && true) {
20702
20762
  context.onError(
20703
20763
  createCompilerError(42, exp.loc)
@@ -20926,7 +20986,7 @@ const transformVBindShorthand = (node, context) => {
20926
20986
  if (arg.type !== 4 || !arg.isStatic) {
20927
20987
  context.onError(
20928
20988
  createCompilerError(
20929
- 52,
20989
+ 53,
20930
20990
  arg.loc
20931
20991
  )
20932
20992
  );
@@ -20970,17 +21030,17 @@ function baseCompile(source, options = {}) {
20970
21030
  const isModuleMode = options.mode === "module";
20971
21031
  {
20972
21032
  if (options.prefixIdentifiers === true) {
20973
- onError(createCompilerError(47));
20974
- } else if (isModuleMode) {
20975
21033
  onError(createCompilerError(48));
21034
+ } else if (isModuleMode) {
21035
+ onError(createCompilerError(49));
20976
21036
  }
20977
21037
  }
20978
21038
  const prefixIdentifiers = false;
20979
21039
  if (options.cacheHandlers) {
20980
- onError(createCompilerError(49));
21040
+ onError(createCompilerError(50));
20981
21041
  }
20982
21042
  if (options.scopeId && !isModuleMode) {
20983
- onError(createCompilerError(50));
21043
+ onError(createCompilerError(51));
20984
21044
  }
20985
21045
  const resolvedOptions = extend({}, options, {
20986
21046
  prefixIdentifiers
@@ -21008,26 +21068,26 @@ function baseCompile(source, options = {}) {
21008
21068
 
21009
21069
  const noopDirectiveTransform = () => ({ props: [] });
21010
21070
 
21011
- const V_MODEL_RADIO = Symbol(!!(process.env.NODE_ENV !== "production") ? `vModelRadio` : ``);
21012
- const V_MODEL_CHECKBOX = Symbol(
21071
+ const V_MODEL_RADIO = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `vModelRadio` : ``);
21072
+ const V_MODEL_CHECKBOX = /* @__PURE__ */ Symbol(
21013
21073
  !!(process.env.NODE_ENV !== "production") ? `vModelCheckbox` : ``
21014
21074
  );
21015
- const V_MODEL_TEXT = Symbol(!!(process.env.NODE_ENV !== "production") ? `vModelText` : ``);
21016
- const V_MODEL_SELECT = Symbol(
21075
+ const V_MODEL_TEXT = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `vModelText` : ``);
21076
+ const V_MODEL_SELECT = /* @__PURE__ */ Symbol(
21017
21077
  !!(process.env.NODE_ENV !== "production") ? `vModelSelect` : ``
21018
21078
  );
21019
- const V_MODEL_DYNAMIC = Symbol(
21079
+ const V_MODEL_DYNAMIC = /* @__PURE__ */ Symbol(
21020
21080
  !!(process.env.NODE_ENV !== "production") ? `vModelDynamic` : ``
21021
21081
  );
21022
- const V_ON_WITH_MODIFIERS = Symbol(
21082
+ const V_ON_WITH_MODIFIERS = /* @__PURE__ */ Symbol(
21023
21083
  !!(process.env.NODE_ENV !== "production") ? `vOnModifiersGuard` : ``
21024
21084
  );
21025
- const V_ON_WITH_KEYS = Symbol(
21085
+ const V_ON_WITH_KEYS = /* @__PURE__ */ Symbol(
21026
21086
  !!(process.env.NODE_ENV !== "production") ? `vOnKeysGuard` : ``
21027
21087
  );
21028
- const V_SHOW = Symbol(!!(process.env.NODE_ENV !== "production") ? `vShow` : ``);
21029
- const TRANSITION = Symbol(!!(process.env.NODE_ENV !== "production") ? `Transition` : ``);
21030
- const TRANSITION_GROUP = Symbol(
21088
+ const V_SHOW = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `vShow` : ``);
21089
+ const TRANSITION = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `Transition` : ``);
21090
+ const TRANSITION_GROUP = /* @__PURE__ */ Symbol(
21031
21091
  !!(process.env.NODE_ENV !== "production") ? `TransitionGroup` : ``
21032
21092
  );
21033
21093
  registerRuntimeHelpers({
@@ -21138,31 +21198,31 @@ function createDOMCompilerError(code, loc) {
21138
21198
  );
21139
21199
  }
21140
21200
  const DOMErrorMessages = {
21141
- [53]: `v-html is missing expression.`,
21142
- [54]: `v-html will override element children.`,
21143
- [55]: `v-text is missing expression.`,
21144
- [56]: `v-text will override element children.`,
21145
- [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
21146
- [58]: `v-model argument is not supported on plain elements.`,
21147
- [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
21148
- [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
21149
- [61]: `v-show is missing expression.`,
21150
- [62]: `<Transition> expects exactly one child element or component.`,
21151
- [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`,
21201
+ [54]: `v-html is missing expression.`,
21202
+ [55]: `v-html will override element children.`,
21203
+ [56]: `v-text is missing expression.`,
21204
+ [57]: `v-text will override element children.`,
21205
+ [58]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
21206
+ [59]: `v-model argument is not supported on plain elements.`,
21207
+ [60]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
21208
+ [61]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
21209
+ [62]: `v-show is missing expression.`,
21210
+ [63]: `<Transition> expects exactly one child element or component.`,
21211
+ [64]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`,
21152
21212
  // just to fulfill types
21153
- [64]: ``
21213
+ [65]: ``
21154
21214
  };
21155
21215
 
21156
21216
  const transformVHtml = (dir, node, context) => {
21157
21217
  const { exp, loc } = dir;
21158
21218
  if (!exp) {
21159
21219
  context.onError(
21160
- createDOMCompilerError(53, loc)
21220
+ createDOMCompilerError(54, loc)
21161
21221
  );
21162
21222
  }
21163
21223
  if (node.children.length) {
21164
21224
  context.onError(
21165
- createDOMCompilerError(54, loc)
21225
+ createDOMCompilerError(55, loc)
21166
21226
  );
21167
21227
  node.children.length = 0;
21168
21228
  }
@@ -21180,12 +21240,12 @@ const transformVText = (dir, node, context) => {
21180
21240
  const { exp, loc } = dir;
21181
21241
  if (!exp) {
21182
21242
  context.onError(
21183
- createDOMCompilerError(55, loc)
21243
+ createDOMCompilerError(56, loc)
21184
21244
  );
21185
21245
  }
21186
21246
  if (node.children.length) {
21187
21247
  context.onError(
21188
- createDOMCompilerError(56, loc)
21248
+ createDOMCompilerError(57, loc)
21189
21249
  );
21190
21250
  node.children.length = 0;
21191
21251
  }
@@ -21211,7 +21271,7 @@ const transformModel = (dir, node, context) => {
21211
21271
  if (dir.arg) {
21212
21272
  context.onError(
21213
21273
  createDOMCompilerError(
21214
- 58,
21274
+ 59,
21215
21275
  dir.arg.loc
21216
21276
  )
21217
21277
  );
@@ -21221,7 +21281,7 @@ const transformModel = (dir, node, context) => {
21221
21281
  if (value && isStaticArgOf(value.arg, "value")) {
21222
21282
  context.onError(
21223
21283
  createDOMCompilerError(
21224
- 60,
21284
+ 61,
21225
21285
  value.loc
21226
21286
  )
21227
21287
  );
@@ -21249,7 +21309,7 @@ const transformModel = (dir, node, context) => {
21249
21309
  isInvalidType = true;
21250
21310
  context.onError(
21251
21311
  createDOMCompilerError(
21252
- 59,
21312
+ 60,
21253
21313
  dir.loc
21254
21314
  )
21255
21315
  );
@@ -21275,7 +21335,7 @@ const transformModel = (dir, node, context) => {
21275
21335
  } else {
21276
21336
  context.onError(
21277
21337
  createDOMCompilerError(
21278
- 57,
21338
+ 58,
21279
21339
  dir.loc
21280
21340
  )
21281
21341
  );
@@ -21386,7 +21446,7 @@ const transformShow = (dir, node, context) => {
21386
21446
  const { exp, loc } = dir;
21387
21447
  if (!exp) {
21388
21448
  context.onError(
21389
- createDOMCompilerError(61, loc)
21449
+ createDOMCompilerError(62, loc)
21390
21450
  );
21391
21451
  }
21392
21452
  return {
@@ -21410,7 +21470,7 @@ function postTransformTransition(node, onError, hasMultipleChildren = defaultHas
21410
21470
  }
21411
21471
  if (hasMultipleChildren(node)) {
21412
21472
  onError(
21413
- createDOMCompilerError(62, {
21473
+ createDOMCompilerError(63, {
21414
21474
  start: node.children[0].loc.start,
21415
21475
  end: node.children[node.children.length - 1].loc.end,
21416
21476
  source: ""
@@ -21445,7 +21505,7 @@ const ignoreSideEffectTags = (node, context) => {
21445
21505
  if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) {
21446
21506
  !!(process.env.NODE_ENV !== "production") && context.onError(
21447
21507
  createDOMCompilerError(
21448
- 63,
21508
+ 64,
21449
21509
  node.loc
21450
21510
  )
21451
21511
  );