@vue/reactivity 3.4.0-alpha.1 → 3.4.0-alpha.3

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.
@@ -719,7 +719,7 @@ function createReadonlyMethod(type) {
719
719
  toRaw(this)
720
720
  );
721
721
  }
722
- return type === "delete" ? false : this;
722
+ return type === "delete" ? false : type === "clear" ? void 0 : this;
723
723
  };
724
724
  }
725
725
  function createInstrumentations() {
@@ -975,9 +975,10 @@ class ComputedRefImpl {
975
975
  this.dep = void 0;
976
976
  this.__v_isRef = true;
977
977
  this["__v_isReadonly"] = false;
978
- this.effect = new ReactiveEffect(getter, () => {
979
- triggerRefValue(this, 1);
980
- });
978
+ this.effect = new ReactiveEffect(
979
+ () => getter(this._value),
980
+ () => triggerRefValue(this, 1)
981
+ );
981
982
  this.effect.computed = this;
982
983
  this.effect.active = this._cacheable = !isSSR;
983
984
  this["__v_isReadonly"] = isReadonly;
@@ -662,7 +662,7 @@ function createIterableMethod(method, isReadonly, isShallow) {
662
662
  }
663
663
  function createReadonlyMethod(type) {
664
664
  return function(...args) {
665
- return type === "delete" ? false : this;
665
+ return type === "delete" ? false : type === "clear" ? void 0 : this;
666
666
  };
667
667
  }
668
668
  function createInstrumentations() {
@@ -906,9 +906,10 @@ class ComputedRefImpl {
906
906
  this.dep = void 0;
907
907
  this.__v_isRef = true;
908
908
  this["__v_isReadonly"] = false;
909
- this.effect = new ReactiveEffect(getter, () => {
910
- triggerRefValue(this, 1);
911
- });
909
+ this.effect = new ReactiveEffect(
910
+ () => getter(this._value),
911
+ () => triggerRefValue(this, 1)
912
+ );
912
913
  this.effect.computed = this;
913
914
  this.effect.active = this._cacheable = !isSSR;
914
915
  this["__v_isReadonly"] = isReadonly;
@@ -19,6 +19,181 @@ export declare const enum ReactiveFlags {
19
19
  RAW = "__v_raw"
20
20
  }
21
21
 
22
+ type Dep = Map<ReactiveEffect, number> & {
23
+ cleanup: () => void;
24
+ computed?: ComputedRefImpl<any>;
25
+ };
26
+
27
+ export declare class EffectScope {
28
+ detached: boolean;
29
+ constructor(detached?: boolean);
30
+ get active(): boolean;
31
+ run<T>(fn: () => T): T | undefined;
32
+ stop(fromParent?: boolean): void;
33
+ }
34
+ /**
35
+ * Creates an effect scope object which can capture the reactive effects (i.e.
36
+ * computed and watchers) created within it so that these effects can be
37
+ * disposed together. For detailed use cases of this API, please consult its
38
+ * corresponding {@link https://github.com/vuejs/rfcs/blob/master/active-rfcs/0041-reactivity-effect-scope.md | RFC}.
39
+ *
40
+ * @param detached - Can be used to create a "detached" effect scope.
41
+ * @see {@link https://vuejs.org/api/reactivity-advanced.html#effectscope}
42
+ */
43
+ export declare function effectScope(detached?: boolean): EffectScope;
44
+ /**
45
+ * Returns the current active effect scope if there is one.
46
+ *
47
+ * @see {@link https://vuejs.org/api/reactivity-advanced.html#getcurrentscope}
48
+ */
49
+ export declare function getCurrentScope(): EffectScope | undefined;
50
+ /**
51
+ * Registers a dispose callback on the current active effect scope. The
52
+ * callback will be invoked when the associated effect scope is stopped.
53
+ *
54
+ * @param fn - The callback function to attach to the scope's cleanup.
55
+ * @see {@link https://vuejs.org/api/reactivity-advanced.html#onscopedispose}
56
+ */
57
+ export declare function onScopeDispose(fn: () => void): void;
58
+
59
+ export type EffectScheduler = (...args: any[]) => any;
60
+ export type DebuggerEvent = {
61
+ effect: ReactiveEffect;
62
+ } & DebuggerEventExtraInfo;
63
+ export type DebuggerEventExtraInfo = {
64
+ target: object;
65
+ type: TrackOpTypes | TriggerOpTypes;
66
+ key: any;
67
+ newValue?: any;
68
+ oldValue?: any;
69
+ oldTarget?: Map<any, any> | Set<any>;
70
+ };
71
+ export declare class ReactiveEffect<T = any> {
72
+ fn: () => T;
73
+ trigger: () => void;
74
+ scheduler?: EffectScheduler | undefined;
75
+ active: boolean;
76
+ deps: Dep[];
77
+ onStop?: () => void;
78
+ onTrack?: (event: DebuggerEvent) => void;
79
+ onTrigger?: (event: DebuggerEvent) => void;
80
+ constructor(fn: () => T, trigger: () => void, scheduler?: EffectScheduler | undefined, scope?: EffectScope);
81
+ get dirty(): boolean;
82
+ set dirty(v: boolean);
83
+ run(): T;
84
+ stop(): void;
85
+ }
86
+ export interface DebuggerOptions {
87
+ onTrack?: (event: DebuggerEvent) => void;
88
+ onTrigger?: (event: DebuggerEvent) => void;
89
+ }
90
+ export interface ReactiveEffectOptions extends DebuggerOptions {
91
+ lazy?: boolean;
92
+ scheduler?: EffectScheduler;
93
+ scope?: EffectScope;
94
+ allowRecurse?: boolean;
95
+ onStop?: () => void;
96
+ }
97
+ export interface ReactiveEffectRunner<T = any> {
98
+ (): T;
99
+ effect: ReactiveEffect;
100
+ }
101
+ /**
102
+ * Registers the given function to track reactive updates.
103
+ *
104
+ * The given function will be run once immediately. Every time any reactive
105
+ * property that's accessed within it gets updated, the function will run again.
106
+ *
107
+ * @param fn - The function that will track reactive updates.
108
+ * @param options - Allows to control the effect's behaviour.
109
+ * @returns A runner that can be used to control the effect after creation.
110
+ */
111
+ export declare function effect<T = any>(fn: () => T, options?: ReactiveEffectOptions): ReactiveEffectRunner;
112
+ /**
113
+ * Stops the effect associated with the given runner.
114
+ *
115
+ * @param runner - Association with the effect to stop tracking.
116
+ */
117
+ export declare function stop(runner: ReactiveEffectRunner): void;
118
+ /**
119
+ * Temporarily pauses tracking.
120
+ */
121
+ export declare function pauseTracking(): void;
122
+ /**
123
+ * Re-enables effect tracking (if it was paused).
124
+ */
125
+ export declare function enableTracking(): void;
126
+ /**
127
+ * Resets the previous global effect tracking state.
128
+ */
129
+ export declare function resetTracking(): void;
130
+ export declare function pauseScheduling(): void;
131
+ export declare function resetScheduling(): void;
132
+
133
+ declare const ComputedRefSymbol: unique symbol;
134
+ export interface ComputedRef<T = any> extends WritableComputedRef<T> {
135
+ readonly value: T;
136
+ [ComputedRefSymbol]: true;
137
+ }
138
+ export interface WritableComputedRef<T> extends Ref<T> {
139
+ readonly effect: ReactiveEffect<T>;
140
+ }
141
+ export type ComputedGetter<T> = (oldValue?: T) => T;
142
+ export type ComputedSetter<T> = (newValue: T) => void;
143
+ export interface WritableComputedOptions<T> {
144
+ get: ComputedGetter<T>;
145
+ set: ComputedSetter<T>;
146
+ }
147
+ declare class ComputedRefImpl<T> {
148
+ private readonly _setter;
149
+ dep?: Dep;
150
+ private _value;
151
+ readonly effect: ReactiveEffect<T>;
152
+ readonly __v_isRef = true;
153
+ readonly [ReactiveFlags.IS_READONLY]: boolean;
154
+ _cacheable: boolean;
155
+ constructor(getter: ComputedGetter<T>, _setter: ComputedSetter<T>, isReadonly: boolean, isSSR: boolean);
156
+ get value(): T;
157
+ set value(newValue: T);
158
+ get _dirty(): boolean;
159
+ set _dirty(v: boolean);
160
+ }
161
+ /**
162
+ * Takes a getter function and returns a readonly reactive ref object for the
163
+ * returned value from the getter. It can also take an object with get and set
164
+ * functions to create a writable ref object.
165
+ *
166
+ * @example
167
+ * ```js
168
+ * // Creating a readonly computed ref:
169
+ * const count = ref(1)
170
+ * const plusOne = computed(() => count.value + 1)
171
+ *
172
+ * console.log(plusOne.value) // 2
173
+ * plusOne.value++ // error
174
+ * ```
175
+ *
176
+ * ```js
177
+ * // Creating a writable computed ref:
178
+ * const count = ref(1)
179
+ * const plusOne = computed({
180
+ * get: () => count.value + 1,
181
+ * set: (val) => {
182
+ * count.value = val - 1
183
+ * }
184
+ * })
185
+ *
186
+ * plusOne.value = 1
187
+ * console.log(count.value) // 0
188
+ * ```
189
+ *
190
+ * @param getter - Function that produces the next value.
191
+ * @param debugOptions - For debugging. See {@link https://vuejs.org/guide/extras/reactivity-in-depth.html#computed-debugging}.
192
+ * @see {@link https://vuejs.org/api/reactivity-core.html#computed}
193
+ */
194
+ export declare function computed<T>(getter: ComputedGetter<T>, debugOptions?: DebuggerOptions): ComputedRef<T>;
195
+ export declare function computed<T>(options: WritableComputedOptions<T>, debugOptions?: DebuggerOptions): WritableComputedRef<T>;
196
+
22
197
  export type UnwrapNestedRefs<T> = T extends Ref ? T : UnwrapRefSimple<T>;
23
198
  /**
24
199
  * Returns a reactive proxy of the object.
@@ -232,181 +407,6 @@ type CollectionTypes = IterableCollections | WeakCollections;
232
407
  type IterableCollections = Map<any, any> | Set<any>;
233
408
  type WeakCollections = WeakMap<any, any> | WeakSet<any>;
234
409
 
235
- export declare class EffectScope {
236
- detached: boolean;
237
- constructor(detached?: boolean);
238
- get active(): boolean;
239
- run<T>(fn: () => T): T | undefined;
240
- stop(fromParent?: boolean): void;
241
- }
242
- /**
243
- * Creates an effect scope object which can capture the reactive effects (i.e.
244
- * computed and watchers) created within it so that these effects can be
245
- * disposed together. For detailed use cases of this API, please consult its
246
- * corresponding {@link https://github.com/vuejs/rfcs/blob/master/active-rfcs/0041-reactivity-effect-scope.md | RFC}.
247
- *
248
- * @param detached - Can be used to create a "detached" effect scope.
249
- * @see {@link https://vuejs.org/api/reactivity-advanced.html#effectscope}
250
- */
251
- export declare function effectScope(detached?: boolean): EffectScope;
252
- /**
253
- * Returns the current active effect scope if there is one.
254
- *
255
- * @see {@link https://vuejs.org/api/reactivity-advanced.html#getcurrentscope}
256
- */
257
- export declare function getCurrentScope(): EffectScope | undefined;
258
- /**
259
- * Registers a dispose callback on the current active effect scope. The
260
- * callback will be invoked when the associated effect scope is stopped.
261
- *
262
- * @param fn - The callback function to attach to the scope's cleanup.
263
- * @see {@link https://vuejs.org/api/reactivity-advanced.html#onscopedispose}
264
- */
265
- export declare function onScopeDispose(fn: () => void): void;
266
-
267
- export type EffectScheduler = (...args: any[]) => any;
268
- export type DebuggerEvent = {
269
- effect: ReactiveEffect;
270
- } & DebuggerEventExtraInfo;
271
- export type DebuggerEventExtraInfo = {
272
- target: object;
273
- type: TrackOpTypes | TriggerOpTypes;
274
- key: any;
275
- newValue?: any;
276
- oldValue?: any;
277
- oldTarget?: Map<any, any> | Set<any>;
278
- };
279
- export declare class ReactiveEffect<T = any> {
280
- fn: () => T;
281
- trigger: () => void;
282
- scheduler?: EffectScheduler | undefined;
283
- active: boolean;
284
- deps: Dep[];
285
- onStop?: () => void;
286
- onTrack?: (event: DebuggerEvent) => void;
287
- onTrigger?: (event: DebuggerEvent) => void;
288
- constructor(fn: () => T, trigger: () => void, scheduler?: EffectScheduler | undefined, scope?: EffectScope);
289
- get dirty(): boolean;
290
- set dirty(v: boolean);
291
- run(): T;
292
- stop(): void;
293
- }
294
- export interface DebuggerOptions {
295
- onTrack?: (event: DebuggerEvent) => void;
296
- onTrigger?: (event: DebuggerEvent) => void;
297
- }
298
- export interface ReactiveEffectOptions extends DebuggerOptions {
299
- lazy?: boolean;
300
- scheduler?: EffectScheduler;
301
- scope?: EffectScope;
302
- allowRecurse?: boolean;
303
- onStop?: () => void;
304
- }
305
- export interface ReactiveEffectRunner<T = any> {
306
- (): T;
307
- effect: ReactiveEffect;
308
- }
309
- /**
310
- * Registers the given function to track reactive updates.
311
- *
312
- * The given function will be run once immediately. Every time any reactive
313
- * property that's accessed within it gets updated, the function will run again.
314
- *
315
- * @param fn - The function that will track reactive updates.
316
- * @param options - Allows to control the effect's behaviour.
317
- * @returns A runner that can be used to control the effect after creation.
318
- */
319
- export declare function effect<T = any>(fn: () => T, options?: ReactiveEffectOptions): ReactiveEffectRunner;
320
- /**
321
- * Stops the effect associated with the given runner.
322
- *
323
- * @param runner - Association with the effect to stop tracking.
324
- */
325
- export declare function stop(runner: ReactiveEffectRunner): void;
326
- /**
327
- * Temporarily pauses tracking.
328
- */
329
- export declare function pauseTracking(): void;
330
- /**
331
- * Re-enables effect tracking (if it was paused).
332
- */
333
- export declare function enableTracking(): void;
334
- /**
335
- * Resets the previous global effect tracking state.
336
- */
337
- export declare function resetTracking(): void;
338
- export declare function pauseScheduling(): void;
339
- export declare function resetScheduling(): void;
340
-
341
- declare const ComputedRefSymbol: unique symbol;
342
- export interface ComputedRef<T = any> extends WritableComputedRef<T> {
343
- readonly value: T;
344
- [ComputedRefSymbol]: true;
345
- }
346
- export interface WritableComputedRef<T> extends Ref<T> {
347
- readonly effect: ReactiveEffect<T>;
348
- }
349
- export type ComputedGetter<T> = (...args: any[]) => T;
350
- export type ComputedSetter<T> = (v: T) => void;
351
- export interface WritableComputedOptions<T> {
352
- get: ComputedGetter<T>;
353
- set: ComputedSetter<T>;
354
- }
355
- declare class ComputedRefImpl<T> {
356
- private readonly _setter;
357
- dep?: Dep;
358
- private _value;
359
- readonly effect: ReactiveEffect<T>;
360
- readonly __v_isRef = true;
361
- readonly [ReactiveFlags.IS_READONLY]: boolean;
362
- _cacheable: boolean;
363
- constructor(getter: ComputedGetter<T>, _setter: ComputedSetter<T>, isReadonly: boolean, isSSR: boolean);
364
- get value(): T;
365
- set value(newValue: T);
366
- get _dirty(): boolean;
367
- set _dirty(v: boolean);
368
- }
369
- /**
370
- * Takes a getter function and returns a readonly reactive ref object for the
371
- * returned value from the getter. It can also take an object with get and set
372
- * functions to create a writable ref object.
373
- *
374
- * @example
375
- * ```js
376
- * // Creating a readonly computed ref:
377
- * const count = ref(1)
378
- * const plusOne = computed(() => count.value + 1)
379
- *
380
- * console.log(plusOne.value) // 2
381
- * plusOne.value++ // error
382
- * ```
383
- *
384
- * ```js
385
- * // Creating a writable computed ref:
386
- * const count = ref(1)
387
- * const plusOne = computed({
388
- * get: () => count.value + 1,
389
- * set: (val) => {
390
- * count.value = val - 1
391
- * }
392
- * })
393
- *
394
- * plusOne.value = 1
395
- * console.log(count.value) // 0
396
- * ```
397
- *
398
- * @param getter - Function that produces the next value.
399
- * @param debugOptions - For debugging. See {@link https://vuejs.org/guide/extras/reactivity-in-depth.html#computed-debugging}.
400
- * @see {@link https://vuejs.org/api/reactivity-core.html#computed}
401
- */
402
- export declare function computed<T>(getter: ComputedGetter<T>, debugOptions?: DebuggerOptions): ComputedRef<T>;
403
- export declare function computed<T>(options: WritableComputedOptions<T>, debugOptions?: DebuggerOptions): WritableComputedRef<T>;
404
-
405
- type Dep = Map<ReactiveEffect, number> & {
406
- cleanup: () => void;
407
- computed?: ComputedRefImpl<any>;
408
- };
409
-
410
410
  declare const RefSymbol: unique symbol;
411
411
  declare const RawSymbol: unique symbol;
412
412
  export interface Ref<T = any> {
@@ -456,7 +456,8 @@ export type ShallowRef<T = any> = Ref<T> & {
456
456
  * @param value - The "inner value" for the shallow ref.
457
457
  * @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowref}
458
458
  */
459
- export declare function shallowRef<T extends object>(value: T): T extends Ref ? T : ShallowRef<T>;
459
+ export declare function shallowRef<T>(value: MaybeRef<T>): Ref<T> | ShallowRef<T>;
460
+ export declare function shallowRef<T extends Ref>(value: T): T;
460
461
  export declare function shallowRef<T>(value: T): ShallowRef<T>;
461
462
  export declare function shallowRef<T = any>(): ShallowRef<T | undefined>;
462
463
  /**
@@ -503,7 +504,7 @@ export type MaybeRefOrGetter<T = any> = MaybeRef<T> | (() => T);
503
504
  * @param ref - Ref or plain value to be converted into the plain value.
504
505
  * @see {@link https://vuejs.org/api/reactivity-utilities.html#unref}
505
506
  */
506
- export declare function unref<T>(ref: MaybeRef<T>): T;
507
+ export declare function unref<T>(ref: MaybeRef<T> | ComputedRef<T>): T;
507
508
  /**
508
509
  * Normalizes values / refs / getters to values.
509
510
  * This is similar to {@link unref()}, except that it also normalizes getters.
@@ -520,7 +521,7 @@ export declare function unref<T>(ref: MaybeRef<T>): T;
520
521
  * @param source - A getter, an existing ref, or a non-function value.
521
522
  * @see {@link https://vuejs.org/api/reactivity-utilities.html#tovalue}
522
523
  */
523
- export declare function toValue<T>(source: MaybeRefOrGetter<T>): T;
524
+ export declare function toValue<T>(source: MaybeRefOrGetter<T> | ComputedRef<T>): T;
524
525
  /**
525
526
  * Returns a reactive proxy for the given object.
526
527
  *
@@ -1,10 +1,6 @@
1
1
  function makeMap(str, expectsLowerCase) {
2
- const map = /* @__PURE__ */ Object.create(null);
3
- const list = str.split(",");
4
- for (let i = 0; i < list.length; i++) {
5
- map[list[i]] = true;
6
- }
7
- return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val];
2
+ const set = new Set(str.split(","));
3
+ return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val);
8
4
  }
9
5
 
10
6
  const NOOP = () => {
@@ -758,7 +754,7 @@ function createReadonlyMethod(type) {
758
754
  toRaw(this)
759
755
  );
760
756
  }
761
- return type === "delete" ? false : this;
757
+ return type === "delete" ? false : type === "clear" ? void 0 : this;
762
758
  };
763
759
  }
764
760
  function createInstrumentations() {
@@ -1014,9 +1010,10 @@ class ComputedRefImpl {
1014
1010
  this.dep = void 0;
1015
1011
  this.__v_isRef = true;
1016
1012
  this["__v_isReadonly"] = false;
1017
- this.effect = new ReactiveEffect(getter, () => {
1018
- triggerRefValue(this, 1);
1019
- });
1013
+ this.effect = new ReactiveEffect(
1014
+ () => getter(this._value),
1015
+ () => triggerRefValue(this, 1)
1016
+ );
1020
1017
  this.effect.computed = this;
1021
1018
  this.effect.active = this._cacheable = !isSSR;
1022
1019
  this["__v_isReadonly"] = isReadonly;
@@ -1 +1 @@
1
- function t(t,e){const n=Object.create(null),s=t.split(",");for(let r=0;r<s.length;r++)n[s[r]]=!0;return e?t=>!!n[t.toLowerCase()]:t=>!!n[t]}const e=()=>{},n=Object.assign,s=Object.prototype.hasOwnProperty,r=(t,e)=>s.call(t,e),i=Array.isArray,c=t=>"[object Map]"===l(t),o=t=>"function"==typeof t,u=t=>"symbol"==typeof t,a=t=>null!==t&&"object"==typeof t,h=Object.prototype.toString,l=t=>h.call(t),f=t=>l(t).slice(8,-1),_=t=>"string"==typeof t&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,d=(t,e)=>!Object.is(t,e);let p,v;class g{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=p,!t&&p&&(this.index=(p.scopes||(p.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const e=p;try{return p=this,t()}finally{p=e}}}on(){p=this}off(){p=this.parent}stop(t){if(this._active){let e,n;for(e=0,n=this.effects.length;e<n;e++)this.effects[e].stop();for(e=0,n=this.cleanups.length;e<n;e++)this.cleanups[e]();if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].stop(!0);if(!this.detached&&this.parent&&!t){const t=this.parent.scopes.pop();t&&t!==this&&(this.parent.scopes[this.index]=t,t.index=this.index)}this.parent=void 0,this._active=!1}}}function y(t){return new g(t)}function w(t,e=p){e&&e.active&&e.effects.push(t)}function b(){return p}function R(t){p&&p.cleanups.push(t)}class k{constructor(t,e,n,s){this.fn=t,this.trigger=e,this.scheduler=n,this.active=!0,this.deps=[],this._dirtyLevel=3,this._trackId=0,this._runnings=0,this._queryings=0,this._depsLength=0,w(this,s)}get dirty(){if(1===this._dirtyLevel){this._dirtyLevel=0,this._queryings++,z();for(const t of this.deps)if(t.computed&&(m(t.computed),this._dirtyLevel>=2))break;W(),this._queryings--}return this._dirtyLevel>=2}set dirty(t){this._dirtyLevel=t?3:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=P,e=v;try{return P=!0,v=this,this._runnings++,L(this),this.fn()}finally{O(this),this._runnings--,v=e,P=t}}stop(){var t;this.active&&(L(this),O(this),null==(t=this.onStop)||t.call(this),this.active=!1)}}function m(t){return t.value}function L(t){t._trackId++,t._depsLength=0}function O(t){if(t.deps&&t.deps.length>t._depsLength){for(let e=t._depsLength;e<t.deps.length;e++)S(t.deps[e],t);t.deps.length=t._depsLength}}function S(t,e){const n=t.get(e);void 0!==n&&e._trackId!==n&&(t.delete(e),0===t.size&&t.cleanup())}function j(t,s){t.effect instanceof k&&(t=t.effect.fn);const r=new k(t,e,(()=>{r.dirty&&r.run()}));s&&(n(r,s),s.scope&&w(r,s.scope)),s&&s.lazy||r.run();const i=r.run.bind(r);return i.effect=r,i}function x(t){t.effect.stop()}let P=!0,E=0;const M=[];function z(){M.push(P),P=!1}function I(){M.push(P),P=!0}function W(){const t=M.pop();P=void 0===t||t}function V(){E++}function N(){for(E--;!E&&A.length;)A.shift()()}function q(t,e,n){if(e.get(t)!==t._trackId){e.set(t,t._trackId);const n=t.deps[t._depsLength];n!==e?(n&&S(n,t),t.deps[t._depsLength++]=e):t._depsLength++}}const A=[];function K(t,e,n){V();for(const s of t.keys())if((s.allowRecurse||!s._runnings)&&s._dirtyLevel<e&&(!s._runnings||2!==e)){const t=s._dirtyLevel;s._dirtyLevel=e,0!==t||s._queryings&&2===e||(s.trigger(),s.scheduler&&A.push(s.scheduler))}N()}const C=(t,e)=>{const n=new Map;return n.cleanup=t,n.computed=e,n},B=new WeakMap,D=Symbol(""),F=Symbol("");function G(t,e,n){if(P&&v){let e=B.get(t);e||B.set(t,e=new Map);let s=e.get(n);s||e.set(n,s=C((()=>e.delete(n)))),q(v,s)}}function H(t,e,n,s,r,o){const a=B.get(t);if(!a)return;let h=[];if("clear"===e)h=[...a.values()];else if("length"===n&&i(t)){const t=Number(s);a.forEach(((e,n)=>{("length"===n||!u(n)&&n>=t)&&h.push(e)}))}else switch(void 0!==n&&h.push(a.get(n)),e){case"add":i(t)?_(n)&&h.push(a.get("length")):(h.push(a.get(D)),c(t)&&h.push(a.get(F)));break;case"delete":i(t)||(h.push(a.get(D)),c(t)&&h.push(a.get(F)));break;case"set":c(t)&&h.push(a.get(D))}V();for(const i of h)i&&K(i,3);N()}const J=t("__proto__,__v_isRef,__isVue"),Q=new Set(Object.getOwnPropertyNames(Symbol).filter((t=>"arguments"!==t&&"caller"!==t)).map((t=>Symbol[t])).filter(u)),T=U();function U(){const t={};return["includes","indexOf","lastIndexOf"].forEach((e=>{t[e]=function(...t){const n=Kt(this);for(let e=0,r=this.length;e<r;e++)G(n,0,e+"");const s=n[e](...t);return-1===s||!1===s?n[e](...t.map(Kt)):s}})),["push","pop","shift","unshift","splice"].forEach((e=>{t[e]=function(...t){z(),V();const n=Kt(this)[e].apply(this,t);return N(),W(),n}})),t}function X(t){const e=Kt(this);return G(e,0,t),e.hasOwnProperty(t)}class Y{constructor(t=!1,e=!1){this._isReadonly=t,this._shallow=e}get(t,e,n){const s=this._isReadonly,c=this._shallow;if("__v_isReactive"===e)return!s;if("__v_isReadonly"===e)return s;if("__v_isShallow"===e)return c;if("__v_raw"===e&&n===(s?c?Pt:xt:c?jt:St).get(t))return t;const o=i(t);if(!s){if(o&&r(T,e))return Reflect.get(T,e,n);if("hasOwnProperty"===e)return X}const h=Reflect.get(t,e,n);return(u(e)?Q.has(e):J(e))?h:(s||G(t,0,e),c?h:Qt(h)?o&&_(e)?h:h.value:a(h)?s?zt(h):Et(h):h)}}class Z extends Y{constructor(t=!1){super(!1,t)}set(t,e,n,s){let c=t[e];if(Nt(c)&&Qt(c)&&!Qt(n))return!1;if(!this._shallow&&(qt(n)||Nt(n)||(c=Kt(c),n=Kt(n)),!i(t)&&Qt(c)&&!Qt(n)))return c.value=n,!0;const o=i(t)&&_(e)?Number(e)<t.length:r(t,e),u=Reflect.set(t,e,n,s);return t===Kt(s)&&(o?d(n,c)&&H(t,"set",e,n):H(t,"add",e,n)),u}deleteProperty(t,e){const n=r(t,e),s=Reflect.deleteProperty(t,e);return s&&n&&H(t,"delete",e,void 0),s}has(t,e){const n=Reflect.has(t,e);return u(e)&&Q.has(e)||G(t,0,e),n}ownKeys(t){return G(t,0,i(t)?"length":D),Reflect.ownKeys(t)}}class $ extends Y{constructor(t=!1){super(!0,t)}set(t,e){return!0}deleteProperty(t,e){return!0}}const tt=new Z,et=new $,nt=new Z(!0),st=new $(!0),rt=t=>t,it=t=>Reflect.getPrototypeOf(t);function ct(t,e,n=!1,s=!1){const r=Kt(t=t.__v_raw),i=Kt(e);n||(d(e,i)&&G(r,0,e),G(r,0,i));const{has:c}=it(r),o=s?rt:n?Dt:Bt;return c.call(r,e)?o(t.get(e)):c.call(r,i)?o(t.get(i)):void(t!==r&&t.get(e))}function ot(t,e=!1){const n=this.__v_raw,s=Kt(n),r=Kt(t);return e||(d(t,r)&&G(s,0,t),G(s,0,r)),t===r?n.has(t):n.has(t)||n.has(r)}function ut(t,e=!1){return t=t.__v_raw,!e&&G(Kt(t),0,D),Reflect.get(t,"size",t)}function at(t){t=Kt(t);const e=Kt(this);return it(e).has.call(e,t)||(e.add(t),H(e,"add",t,t)),this}function ht(t,e){e=Kt(e);const n=Kt(this),{has:s,get:r}=it(n);let i=s.call(n,t);i||(t=Kt(t),i=s.call(n,t));const c=r.call(n,t);return n.set(t,e),i?d(e,c)&&H(n,"set",t,e):H(n,"add",t,e),this}function lt(t){const e=Kt(this),{has:n,get:s}=it(e);let r=n.call(e,t);r||(t=Kt(t),r=n.call(e,t)),s&&s.call(e,t);const i=e.delete(t);return r&&H(e,"delete",t,void 0),i}function ft(){const t=Kt(this),e=0!==t.size,n=t.clear();return e&&H(t,"clear",void 0,void 0),n}function _t(t,e){return function(n,s){const r=this,i=r.__v_raw,c=Kt(i),o=e?rt:t?Dt:Bt;return!t&&G(c,0,D),i.forEach(((t,e)=>n.call(s,o(t),o(e),r)))}}function dt(t,e,n){return function(...s){const r=this.__v_raw,i=Kt(r),o=c(i),u="entries"===t||t===Symbol.iterator&&o,a="keys"===t&&o,h=r[t](...s),l=n?rt:e?Dt:Bt;return!e&&G(i,0,a?F:D),{next(){const{value:t,done:e}=h.next();return e?{value:t,done:e}:{value:u?[l(t[0]),l(t[1])]:l(t),done:e}},[Symbol.iterator](){return this}}}}function pt(t){return function(...e){return"delete"!==t&&this}}function vt(){const t={get(t){return ct(this,t)},get size(){return ut(this)},has:ot,add:at,set:ht,delete:lt,clear:ft,forEach:_t(!1,!1)},e={get(t){return ct(this,t,!1,!0)},get size(){return ut(this)},has:ot,add:at,set:ht,delete:lt,clear:ft,forEach:_t(!1,!0)},n={get(t){return ct(this,t,!0)},get size(){return ut(this,!0)},has(t){return ot.call(this,t,!0)},add:pt("add"),set:pt("set"),delete:pt("delete"),clear:pt("clear"),forEach:_t(!0,!1)},s={get(t){return ct(this,t,!0,!0)},get size(){return ut(this,!0)},has(t){return ot.call(this,t,!0)},add:pt("add"),set:pt("set"),delete:pt("delete"),clear:pt("clear"),forEach:_t(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((r=>{t[r]=dt(r,!1,!1),n[r]=dt(r,!0,!1),e[r]=dt(r,!1,!0),s[r]=dt(r,!0,!0)})),[t,n,e,s]}const[gt,yt,wt,bt]=vt();function Rt(t,e){const n=e?t?bt:wt:t?yt:gt;return(e,s,i)=>"__v_isReactive"===s?!t:"__v_isReadonly"===s?t:"__v_raw"===s?e:Reflect.get(r(n,s)&&s in e?n:e,s,i)}const kt={get:Rt(!1,!1)},mt={get:Rt(!1,!0)},Lt={get:Rt(!0,!1)},Ot={get:Rt(!0,!0)},St=new WeakMap,jt=new WeakMap,xt=new WeakMap,Pt=new WeakMap;function Et(t){return Nt(t)?t:Wt(t,!1,tt,kt,St)}function Mt(t){return Wt(t,!1,nt,mt,jt)}function zt(t){return Wt(t,!0,et,Lt,xt)}function It(t){return Wt(t,!0,st,Ot,Pt)}function Wt(t,e,n,s,r){if(!a(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const i=r.get(t);if(i)return i;const c=(o=t).__v_skip||!Object.isExtensible(o)?0:function(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(f(o));var o;if(0===c)return t;const u=new Proxy(t,2===c?s:n);return r.set(t,u),u}function Vt(t){return Nt(t)?Vt(t.__v_raw):!(!t||!t.__v_isReactive)}function Nt(t){return!(!t||!t.__v_isReadonly)}function qt(t){return!(!t||!t.__v_isShallow)}function At(t){return Vt(t)||Nt(t)}function Kt(t){const e=t&&t.__v_raw;return e?Kt(e):t}function Ct(t){return((t,e,n)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:n})})(t,"__v_skip",!0),t}const Bt=t=>a(t)?Et(t):t,Dt=t=>a(t)?zt(t):t;class Ft{constructor(t,e,n,s){this._setter=e,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new k(t,(()=>{Jt(this,1)})),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=n}get value(){const t=Kt(this);return Ht(t),t._cacheable&&!t.effect.dirty||d(t._value,t._value=t.effect.run())&&Jt(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function Gt(t,n,s=!1){let r,i;const c=o(t);c?(r=t,i=e):(r=t.get,i=t.set);return new Ft(r,i,c||!i,s)}function Ht(t){P&&v&&(t=Kt(t),q(v,t.dep||(t.dep=C((()=>t.dep=void 0),t instanceof Ft?t:void 0))))}function Jt(t,e=3,n){const s=(t=Kt(t)).dep;s&&K(s,e)}function Qt(t){return!(!t||!0!==t.__v_isRef)}function Tt(t){return Xt(t,!1)}function Ut(t){return Xt(t,!0)}function Xt(t,e){return Qt(t)?t:new Yt(t,e)}class Yt{constructor(t,e){this.__v_isShallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?t:Kt(t),this._value=e?t:Bt(t)}get value(){return Ht(this),this._value}set value(t){const e=this.__v_isShallow||qt(t)||Nt(t);t=e?t:Kt(t),d(t,this._rawValue)&&(this._rawValue=t,this._value=e?t:Bt(t),Jt(this,3))}}function Zt(t){Jt(t,3)}function $t(t){return Qt(t)?t.value:t}function te(t){return o(t)?t():$t(t)}const ee={get:(t,e,n)=>$t(Reflect.get(t,e,n)),set:(t,e,n,s)=>{const r=t[e];return Qt(r)&&!Qt(n)?(r.value=n,!0):Reflect.set(t,e,n,s)}};function ne(t){return Vt(t)?t:new Proxy(t,ee)}class se{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:e,set:n}=t((()=>Ht(this)),(()=>Jt(this)));this._get=e,this._set=n}get value(){return this._get()}set value(t){this._set(t)}}function re(t){return new se(t)}function ie(t){const e=i(t)?new Array(t.length):{};for(const n in t)e[n]=ae(t,n);return e}class ce{constructor(t,e,n){this._object=t,this._key=e,this._defaultValue=n,this.__v_isRef=!0}get value(){const t=this._object[this._key];return void 0===t?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return t=Kt(this._object),e=this._key,null==(n=B.get(t))?void 0:n.get(e);var t,e,n}}class oe{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function ue(t,e,n){return Qt(t)?t:o(t)?new oe(t):a(t)&&arguments.length>1?ae(t,e,n):Tt(t)}function ae(t,e,n){const s=t[e];return Qt(s)?s:new ce(t,e,n)}const he=Gt;export{g as EffectScope,D as ITERATE_KEY,k as ReactiveEffect,Gt as computed,re as customRef,he as deferredComputed,j as effect,y as effectScope,I as enableTracking,b as getCurrentScope,At as isProxy,Vt as isReactive,Nt as isReadonly,Qt as isRef,qt as isShallow,Ct as markRaw,R as onScopeDispose,V as pauseScheduling,z as pauseTracking,ne as proxyRefs,Et as reactive,zt as readonly,Tt as ref,N as resetScheduling,W as resetTracking,Mt as shallowReactive,It as shallowReadonly,Ut as shallowRef,x as stop,Kt as toRaw,ue as toRef,ie as toRefs,te as toValue,G as track,H as trigger,Zt as triggerRef,$t as unref};
1
+ function t(t,e){const s=new Set(t.split(","));return e?t=>s.has(t.toLowerCase()):t=>s.has(t)}const e=()=>{},s=Object.assign,n=Object.prototype.hasOwnProperty,i=(t,e)=>n.call(t,e),r=Array.isArray,c=t=>"[object Map]"===l(t),o=t=>"function"==typeof t,u=t=>"symbol"==typeof t,a=t=>null!==t&&"object"==typeof t,h=Object.prototype.toString,l=t=>h.call(t),f=t=>l(t).slice(8,-1),_=t=>"string"==typeof t&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,d=(t,e)=>!Object.is(t,e);let p,v;class g{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=p,!t&&p&&(this.index=(p.scopes||(p.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const e=p;try{return p=this,t()}finally{p=e}}}on(){p=this}off(){p=this.parent}stop(t){if(this._active){let e,s;for(e=0,s=this.effects.length;e<s;e++)this.effects[e].stop();for(e=0,s=this.cleanups.length;e<s;e++)this.cleanups[e]();if(this.scopes)for(e=0,s=this.scopes.length;e<s;e++)this.scopes[e].stop(!0);if(!this.detached&&this.parent&&!t){const t=this.parent.scopes.pop();t&&t!==this&&(this.parent.scopes[this.index]=t,t.index=this.index)}this.parent=void 0,this._active=!1}}}function y(t){return new g(t)}function w(t,e=p){e&&e.active&&e.effects.push(t)}function b(){return p}function R(t){p&&p.cleanups.push(t)}class k{constructor(t,e,s,n){this.fn=t,this.trigger=e,this.scheduler=s,this.active=!0,this.deps=[],this._dirtyLevel=3,this._trackId=0,this._runnings=0,this._queryings=0,this._depsLength=0,w(this,n)}get dirty(){if(1===this._dirtyLevel){this._dirtyLevel=0,this._queryings++,z();for(const t of this.deps)if(t.computed&&(m(t.computed),this._dirtyLevel>=2))break;W(),this._queryings--}return this._dirtyLevel>=2}set dirty(t){this._dirtyLevel=t?3:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=P,e=v;try{return P=!0,v=this,this._runnings++,L(this),this.fn()}finally{S(this),this._runnings--,v=e,P=t}}stop(){var t;this.active&&(L(this),S(this),null==(t=this.onStop)||t.call(this),this.active=!1)}}function m(t){return t.value}function L(t){t._trackId++,t._depsLength=0}function S(t){if(t.deps&&t.deps.length>t._depsLength){for(let e=t._depsLength;e<t.deps.length;e++)O(t.deps[e],t);t.deps.length=t._depsLength}}function O(t,e){const s=t.get(e);void 0!==s&&e._trackId!==s&&(t.delete(e),0===t.size&&t.cleanup())}function j(t,n){t.effect instanceof k&&(t=t.effect.fn);const i=new k(t,e,(()=>{i.dirty&&i.run()}));n&&(s(i,n),n.scope&&w(i,n.scope)),n&&n.lazy||i.run();const r=i.run.bind(i);return r.effect=i,r}function x(t){t.effect.stop()}let P=!0,E=0;const M=[];function z(){M.push(P),P=!1}function I(){M.push(P),P=!0}function W(){const t=M.pop();P=void 0===t||t}function V(){E++}function N(){for(E--;!E&&A.length;)A.shift()()}function q(t,e,s){if(e.get(t)!==t._trackId){e.set(t,t._trackId);const s=t.deps[t._depsLength];s!==e?(s&&O(s,t),t.deps[t._depsLength++]=e):t._depsLength++}}const A=[];function K(t,e,s){V();for(const n of t.keys())if((n.allowRecurse||!n._runnings)&&n._dirtyLevel<e&&(!n._runnings||2!==e)){const t=n._dirtyLevel;n._dirtyLevel=e,0!==t||n._queryings&&2===e||(n.trigger(),n.scheduler&&A.push(n.scheduler))}N()}const C=(t,e)=>{const s=new Map;return s.cleanup=t,s.computed=e,s},B=new WeakMap,D=Symbol(""),F=Symbol("");function G(t,e,s){if(P&&v){let e=B.get(t);e||B.set(t,e=new Map);let n=e.get(s);n||e.set(s,n=C((()=>e.delete(s)))),q(v,n)}}function H(t,e,s,n,i,o){const a=B.get(t);if(!a)return;let h=[];if("clear"===e)h=[...a.values()];else if("length"===s&&r(t)){const t=Number(n);a.forEach(((e,s)=>{("length"===s||!u(s)&&s>=t)&&h.push(e)}))}else switch(void 0!==s&&h.push(a.get(s)),e){case"add":r(t)?_(s)&&h.push(a.get("length")):(h.push(a.get(D)),c(t)&&h.push(a.get(F)));break;case"delete":r(t)||(h.push(a.get(D)),c(t)&&h.push(a.get(F)));break;case"set":c(t)&&h.push(a.get(D))}V();for(const r of h)r&&K(r,3);N()}const J=t("__proto__,__v_isRef,__isVue"),Q=new Set(Object.getOwnPropertyNames(Symbol).filter((t=>"arguments"!==t&&"caller"!==t)).map((t=>Symbol[t])).filter(u)),T=U();function U(){const t={};return["includes","indexOf","lastIndexOf"].forEach((e=>{t[e]=function(...t){const s=Kt(this);for(let e=0,i=this.length;e<i;e++)G(s,0,e+"");const n=s[e](...t);return-1===n||!1===n?s[e](...t.map(Kt)):n}})),["push","pop","shift","unshift","splice"].forEach((e=>{t[e]=function(...t){z(),V();const s=Kt(this)[e].apply(this,t);return N(),W(),s}})),t}function X(t){const e=Kt(this);return G(e,0,t),e.hasOwnProperty(t)}class Y{constructor(t=!1,e=!1){this._isReadonly=t,this._shallow=e}get(t,e,s){const n=this._isReadonly,c=this._shallow;if("__v_isReactive"===e)return!n;if("__v_isReadonly"===e)return n;if("__v_isShallow"===e)return c;if("__v_raw"===e&&s===(n?c?Pt:xt:c?jt:Ot).get(t))return t;const o=r(t);if(!n){if(o&&i(T,e))return Reflect.get(T,e,s);if("hasOwnProperty"===e)return X}const h=Reflect.get(t,e,s);return(u(e)?Q.has(e):J(e))?h:(n||G(t,0,e),c?h:Qt(h)?o&&_(e)?h:h.value:a(h)?n?zt(h):Et(h):h)}}class Z extends Y{constructor(t=!1){super(!1,t)}set(t,e,s,n){let c=t[e];if(Nt(c)&&Qt(c)&&!Qt(s))return!1;if(!this._shallow&&(qt(s)||Nt(s)||(c=Kt(c),s=Kt(s)),!r(t)&&Qt(c)&&!Qt(s)))return c.value=s,!0;const o=r(t)&&_(e)?Number(e)<t.length:i(t,e),u=Reflect.set(t,e,s,n);return t===Kt(n)&&(o?d(s,c)&&H(t,"set",e,s):H(t,"add",e,s)),u}deleteProperty(t,e){const s=i(t,e),n=Reflect.deleteProperty(t,e);return n&&s&&H(t,"delete",e,void 0),n}has(t,e){const s=Reflect.has(t,e);return u(e)&&Q.has(e)||G(t,0,e),s}ownKeys(t){return G(t,0,r(t)?"length":D),Reflect.ownKeys(t)}}class $ extends Y{constructor(t=!1){super(!0,t)}set(t,e){return!0}deleteProperty(t,e){return!0}}const tt=new Z,et=new $,st=new Z(!0),nt=new $(!0),it=t=>t,rt=t=>Reflect.getPrototypeOf(t);function ct(t,e,s=!1,n=!1){const i=Kt(t=t.__v_raw),r=Kt(e);s||(d(e,r)&&G(i,0,e),G(i,0,r));const{has:c}=rt(i),o=n?it:s?Dt:Bt;return c.call(i,e)?o(t.get(e)):c.call(i,r)?o(t.get(r)):void(t!==i&&t.get(e))}function ot(t,e=!1){const s=this.__v_raw,n=Kt(s),i=Kt(t);return e||(d(t,i)&&G(n,0,t),G(n,0,i)),t===i?s.has(t):s.has(t)||s.has(i)}function ut(t,e=!1){return t=t.__v_raw,!e&&G(Kt(t),0,D),Reflect.get(t,"size",t)}function at(t){t=Kt(t);const e=Kt(this);return rt(e).has.call(e,t)||(e.add(t),H(e,"add",t,t)),this}function ht(t,e){e=Kt(e);const s=Kt(this),{has:n,get:i}=rt(s);let r=n.call(s,t);r||(t=Kt(t),r=n.call(s,t));const c=i.call(s,t);return s.set(t,e),r?d(e,c)&&H(s,"set",t,e):H(s,"add",t,e),this}function lt(t){const e=Kt(this),{has:s,get:n}=rt(e);let i=s.call(e,t);i||(t=Kt(t),i=s.call(e,t)),n&&n.call(e,t);const r=e.delete(t);return i&&H(e,"delete",t,void 0),r}function ft(){const t=Kt(this),e=0!==t.size,s=t.clear();return e&&H(t,"clear",void 0,void 0),s}function _t(t,e){return function(s,n){const i=this,r=i.__v_raw,c=Kt(r),o=e?it:t?Dt:Bt;return!t&&G(c,0,D),r.forEach(((t,e)=>s.call(n,o(t),o(e),i)))}}function dt(t,e,s){return function(...n){const i=this.__v_raw,r=Kt(i),o=c(r),u="entries"===t||t===Symbol.iterator&&o,a="keys"===t&&o,h=i[t](...n),l=s?it:e?Dt:Bt;return!e&&G(r,0,a?F:D),{next(){const{value:t,done:e}=h.next();return e?{value:t,done:e}:{value:u?[l(t[0]),l(t[1])]:l(t),done:e}},[Symbol.iterator](){return this}}}}function pt(t){return function(...e){return"delete"!==t&&("clear"===t?void 0:this)}}function vt(){const t={get(t){return ct(this,t)},get size(){return ut(this)},has:ot,add:at,set:ht,delete:lt,clear:ft,forEach:_t(!1,!1)},e={get(t){return ct(this,t,!1,!0)},get size(){return ut(this)},has:ot,add:at,set:ht,delete:lt,clear:ft,forEach:_t(!1,!0)},s={get(t){return ct(this,t,!0)},get size(){return ut(this,!0)},has(t){return ot.call(this,t,!0)},add:pt("add"),set:pt("set"),delete:pt("delete"),clear:pt("clear"),forEach:_t(!0,!1)},n={get(t){return ct(this,t,!0,!0)},get size(){return ut(this,!0)},has(t){return ot.call(this,t,!0)},add:pt("add"),set:pt("set"),delete:pt("delete"),clear:pt("clear"),forEach:_t(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((i=>{t[i]=dt(i,!1,!1),s[i]=dt(i,!0,!1),e[i]=dt(i,!1,!0),n[i]=dt(i,!0,!0)})),[t,s,e,n]}const[gt,yt,wt,bt]=vt();function Rt(t,e){const s=e?t?bt:wt:t?yt:gt;return(e,n,r)=>"__v_isReactive"===n?!t:"__v_isReadonly"===n?t:"__v_raw"===n?e:Reflect.get(i(s,n)&&n in e?s:e,n,r)}const kt={get:Rt(!1,!1)},mt={get:Rt(!1,!0)},Lt={get:Rt(!0,!1)},St={get:Rt(!0,!0)},Ot=new WeakMap,jt=new WeakMap,xt=new WeakMap,Pt=new WeakMap;function Et(t){return Nt(t)?t:Wt(t,!1,tt,kt,Ot)}function Mt(t){return Wt(t,!1,st,mt,jt)}function zt(t){return Wt(t,!0,et,Lt,xt)}function It(t){return Wt(t,!0,nt,St,Pt)}function Wt(t,e,s,n,i){if(!a(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const r=i.get(t);if(r)return r;const c=(o=t).__v_skip||!Object.isExtensible(o)?0:function(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(f(o));var o;if(0===c)return t;const u=new Proxy(t,2===c?n:s);return i.set(t,u),u}function Vt(t){return Nt(t)?Vt(t.__v_raw):!(!t||!t.__v_isReactive)}function Nt(t){return!(!t||!t.__v_isReadonly)}function qt(t){return!(!t||!t.__v_isShallow)}function At(t){return Vt(t)||Nt(t)}function Kt(t){const e=t&&t.__v_raw;return e?Kt(e):t}function Ct(t){return((t,e,s)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:s})})(t,"__v_skip",!0),t}const Bt=t=>a(t)?Et(t):t,Dt=t=>a(t)?zt(t):t;class Ft{constructor(t,e,s,n){this._setter=e,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new k((()=>t(this._value)),(()=>Jt(this,1))),this.effect.computed=this,this.effect.active=this._cacheable=!n,this.__v_isReadonly=s}get value(){const t=Kt(this);return Ht(t),t._cacheable&&!t.effect.dirty||d(t._value,t._value=t.effect.run())&&Jt(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function Gt(t,s,n=!1){let i,r;const c=o(t);c?(i=t,r=e):(i=t.get,r=t.set);return new Ft(i,r,c||!r,n)}function Ht(t){P&&v&&(t=Kt(t),q(v,t.dep||(t.dep=C((()=>t.dep=void 0),t instanceof Ft?t:void 0))))}function Jt(t,e=3,s){const n=(t=Kt(t)).dep;n&&K(n,e)}function Qt(t){return!(!t||!0!==t.__v_isRef)}function Tt(t){return Xt(t,!1)}function Ut(t){return Xt(t,!0)}function Xt(t,e){return Qt(t)?t:new Yt(t,e)}class Yt{constructor(t,e){this.__v_isShallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?t:Kt(t),this._value=e?t:Bt(t)}get value(){return Ht(this),this._value}set value(t){const e=this.__v_isShallow||qt(t)||Nt(t);t=e?t:Kt(t),d(t,this._rawValue)&&(this._rawValue=t,this._value=e?t:Bt(t),Jt(this,3))}}function Zt(t){Jt(t,3)}function $t(t){return Qt(t)?t.value:t}function te(t){return o(t)?t():$t(t)}const ee={get:(t,e,s)=>$t(Reflect.get(t,e,s)),set:(t,e,s,n)=>{const i=t[e];return Qt(i)&&!Qt(s)?(i.value=s,!0):Reflect.set(t,e,s,n)}};function se(t){return Vt(t)?t:new Proxy(t,ee)}class ne{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:e,set:s}=t((()=>Ht(this)),(()=>Jt(this)));this._get=e,this._set=s}get value(){return this._get()}set value(t){this._set(t)}}function ie(t){return new ne(t)}function re(t){const e=r(t)?new Array(t.length):{};for(const s in t)e[s]=ae(t,s);return e}class ce{constructor(t,e,s){this._object=t,this._key=e,this._defaultValue=s,this.__v_isRef=!0}get value(){const t=this._object[this._key];return void 0===t?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return t=Kt(this._object),e=this._key,null==(s=B.get(t))?void 0:s.get(e);var t,e,s}}class oe{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function ue(t,e,s){return Qt(t)?t:o(t)?new oe(t):a(t)&&arguments.length>1?ae(t,e,s):Tt(t)}function ae(t,e,s){const n=t[e];return Qt(n)?n:new ce(t,e,s)}const he=Gt;export{g as EffectScope,D as ITERATE_KEY,k as ReactiveEffect,Gt as computed,ie as customRef,he as deferredComputed,j as effect,y as effectScope,I as enableTracking,b as getCurrentScope,At as isProxy,Vt as isReactive,Nt as isReadonly,Qt as isRef,qt as isShallow,Ct as markRaw,R as onScopeDispose,V as pauseScheduling,z as pauseTracking,se as proxyRefs,Et as reactive,zt as readonly,Tt as ref,N as resetScheduling,W as resetTracking,Mt as shallowReactive,It as shallowReadonly,Ut as shallowRef,x as stop,Kt as toRaw,ue as toRef,re as toRefs,te as toValue,G as track,H as trigger,Zt as triggerRef,$t as unref};
@@ -715,7 +715,7 @@ function createReadonlyMethod(type) {
715
715
  toRaw(this)
716
716
  );
717
717
  }
718
- return type === "delete" ? false : this;
718
+ return type === "delete" ? false : type === "clear" ? void 0 : this;
719
719
  };
720
720
  }
721
721
  function createInstrumentations() {
@@ -971,9 +971,10 @@ class ComputedRefImpl {
971
971
  this.dep = void 0;
972
972
  this.__v_isRef = true;
973
973
  this["__v_isReadonly"] = false;
974
- this.effect = new ReactiveEffect(getter, () => {
975
- triggerRefValue(this, 1);
976
- });
974
+ this.effect = new ReactiveEffect(
975
+ () => getter(this._value),
976
+ () => triggerRefValue(this, 1)
977
+ );
977
978
  this.effect.computed = this;
978
979
  this.effect.active = this._cacheable = !isSSR;
979
980
  this["__v_isReadonly"] = isReadonly;
@@ -2,12 +2,8 @@ var VueReactivity = (function (exports) {
2
2
  'use strict';
3
3
 
4
4
  function makeMap(str, expectsLowerCase) {
5
- const map = /* @__PURE__ */ Object.create(null);
6
- const list = str.split(",");
7
- for (let i = 0; i < list.length; i++) {
8
- map[list[i]] = true;
9
- }
10
- return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val];
5
+ const set = new Set(str.split(","));
6
+ return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val);
11
7
  }
12
8
 
13
9
  const NOOP = () => {
@@ -761,7 +757,7 @@ var VueReactivity = (function (exports) {
761
757
  toRaw(this)
762
758
  );
763
759
  }
764
- return type === "delete" ? false : this;
760
+ return type === "delete" ? false : type === "clear" ? void 0 : this;
765
761
  };
766
762
  }
767
763
  function createInstrumentations() {
@@ -1017,9 +1013,10 @@ var VueReactivity = (function (exports) {
1017
1013
  this.dep = void 0;
1018
1014
  this.__v_isRef = true;
1019
1015
  this["__v_isReadonly"] = false;
1020
- this.effect = new ReactiveEffect(getter, () => {
1021
- triggerRefValue(this, 1);
1022
- });
1016
+ this.effect = new ReactiveEffect(
1017
+ () => getter(this._value),
1018
+ () => triggerRefValue(this, 1)
1019
+ );
1023
1020
  this.effect.computed = this;
1024
1021
  this.effect.active = this._cacheable = !isSSR;
1025
1022
  this["__v_isReadonly"] = isReadonly;
@@ -1 +1 @@
1
- var VueReactivity=function(t){"use strict";function e(t,e){const s=Object.create(null),n=t.split(",");for(let r=0;r<n.length;r++)s[n[r]]=!0;return e?t=>!!s[t.toLowerCase()]:t=>!!s[t]}const s=()=>{},n=Object.assign,r=Object.prototype.hasOwnProperty,i=(t,e)=>r.call(t,e),c=Array.isArray,o=t=>"[object Map]"===f(t),u=t=>"function"==typeof t,a=t=>"symbol"==typeof t,l=t=>null!==t&&"object"==typeof t,h=Object.prototype.toString,f=t=>h.call(t),_=t=>f(t).slice(8,-1),d=t=>"string"==typeof t&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,p=(t,e)=>!Object.is(t,e);let v,g;class y{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=v,!t&&v&&(this.index=(v.scopes||(v.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const e=v;try{return v=this,t()}finally{v=e}}}on(){v=this}off(){v=this.parent}stop(t){if(this._active){let e,s;for(e=0,s=this.effects.length;e<s;e++)this.effects[e].stop();for(e=0,s=this.cleanups.length;e<s;e++)this.cleanups[e]();if(this.scopes)for(e=0,s=this.scopes.length;e<s;e++)this.scopes[e].stop(!0);if(!this.detached&&this.parent&&!t){const t=this.parent.scopes.pop();t&&t!==this&&(this.parent.scopes[this.index]=t,t.index=this.index)}this.parent=void 0,this._active=!1}}}function w(t,e=v){e&&e.active&&e.effects.push(t)}class R{constructor(t,e,s,n){this.fn=t,this.trigger=e,this.scheduler=s,this.active=!0,this.deps=[],this._dirtyLevel=3,this._trackId=0,this._runnings=0,this._queryings=0,this._depsLength=0,w(this,n)}get dirty(){if(1===this._dirtyLevel){this._dirtyLevel=0,this._queryings++,x();for(const t of this.deps)if(t.computed&&(b(t.computed),this._dirtyLevel>=2))break;E(),this._queryings--}return this._dirtyLevel>=2}set dirty(t){this._dirtyLevel=t?3:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=L,e=g;try{return L=!0,g=this,this._runnings++,k(this),this.fn()}finally{m(this),this._runnings--,g=e,L=t}}stop(){var t;this.active&&(k(this),m(this),null==(t=this.onStop)||t.call(this),this.active=!1)}}function b(t){return t.value}function k(t){t._trackId++,t._depsLength=0}function m(t){if(t.deps&&t.deps.length>t._depsLength){for(let e=t._depsLength;e<t.deps.length;e++)S(t.deps[e],t);t.deps.length=t._depsLength}}function S(t,e){const s=t.get(e);void 0!==s&&e._trackId!==s&&(t.delete(e),0===t.size&&t.cleanup())}let L=!0,O=0;const j=[];function x(){j.push(L),L=!1}function E(){const t=j.pop();L=void 0===t||t}function P(){O++}function M(){for(O--;!O&&I.length;)I.shift()()}function z(t,e,s){if(e.get(t)!==t._trackId){e.set(t,t._trackId);const s=t.deps[t._depsLength];s!==e?(s&&S(s,t),t.deps[t._depsLength++]=e):t._depsLength++}}const I=[];function V(t,e,s){P();for(const n of t.keys())if((n.allowRecurse||!n._runnings)&&n._dirtyLevel<e&&(!n._runnings||2!==e)){const t=n._dirtyLevel;n._dirtyLevel=e,0!==t||n._queryings&&2===e||(n.trigger(),n.scheduler&&I.push(n.scheduler))}M()}const W=(t,e)=>{const s=new Map;return s.cleanup=t,s.computed=e,s},A=new WeakMap,N=Symbol(""),T=Symbol("");function q(t,e,s){if(L&&g){let e=A.get(t);e||A.set(t,e=new Map);let n=e.get(s);n||e.set(s,n=W((()=>e.delete(s)))),z(g,n)}}function C(t,e,s,n,r,i){const u=A.get(t);if(!u)return;let l=[];if("clear"===e)l=[...u.values()];else if("length"===s&&c(t)){const t=Number(n);u.forEach(((e,s)=>{("length"===s||!a(s)&&s>=t)&&l.push(e)}))}else switch(void 0!==s&&l.push(u.get(s)),e){case"add":c(t)?d(s)&&l.push(u.get("length")):(l.push(u.get(N)),o(t)&&l.push(u.get(T)));break;case"delete":c(t)||(l.push(u.get(N)),o(t)&&l.push(u.get(T)));break;case"set":o(t)&&l.push(u.get(N))}P();for(const c of l)c&&V(c,3);M()}const K=e("__proto__,__v_isRef,__isVue"),D=new Set(Object.getOwnPropertyNames(Symbol).filter((t=>"arguments"!==t&&"caller"!==t)).map((t=>Symbol[t])).filter(a)),Y=B();function B(){const t={};return["includes","indexOf","lastIndexOf"].forEach((e=>{t[e]=function(...t){const s=Mt(this);for(let e=0,r=this.length;e<r;e++)q(s,0,e+"");const n=s[e](...t);return-1===n||!1===n?s[e](...t.map(Mt)):n}})),["push","pop","shift","unshift","splice"].forEach((e=>{t[e]=function(...t){x(),P();const s=Mt(this)[e].apply(this,t);return M(),E(),s}})),t}function F(t){const e=Mt(this);return q(e,0,t),e.hasOwnProperty(t)}class G{constructor(t=!1,e=!1){this._isReadonly=t,this._shallow=e}get(t,e,s){const n=this._isReadonly,r=this._shallow;if("__v_isReactive"===e)return!n;if("__v_isReadonly"===e)return n;if("__v_isShallow"===e)return r;if("__v_raw"===e&&s===(n?r?St:mt:r?kt:bt).get(t))return t;const o=c(t);if(!n){if(o&&i(Y,e))return Reflect.get(Y,e,s);if("hasOwnProperty"===e)return F}const u=Reflect.get(t,e,s);return(a(e)?D.has(e):K(e))?u:(n||q(t,0,e),r?u:Tt(u)?o&&d(e)?u:u.value:l(u)?n?Ot(u):Lt(u):u)}}class H extends G{constructor(t=!1){super(!1,t)}set(t,e,s,n){let r=t[e];if(Et(r)&&Tt(r)&&!Tt(s))return!1;if(!this._shallow&&(Pt(s)||Et(s)||(r=Mt(r),s=Mt(s)),!c(t)&&Tt(r)&&!Tt(s)))return r.value=s,!0;const o=c(t)&&d(e)?Number(e)<t.length:i(t,e),u=Reflect.set(t,e,s,n);return t===Mt(n)&&(o?p(s,r)&&C(t,"set",e,s):C(t,"add",e,s)),u}deleteProperty(t,e){const s=i(t,e),n=Reflect.deleteProperty(t,e);return n&&s&&C(t,"delete",e,void 0),n}has(t,e){const s=Reflect.has(t,e);return a(e)&&D.has(e)||q(t,0,e),s}ownKeys(t){return q(t,0,c(t)?"length":N),Reflect.ownKeys(t)}}class J extends G{constructor(t=!1){super(!0,t)}set(t,e){return!0}deleteProperty(t,e){return!0}}const Q=new H,U=new J,X=new H(!0),Z=new J(!0),$=t=>t,tt=t=>Reflect.getPrototypeOf(t);function et(t,e,s=!1,n=!1){const r=Mt(t=t.__v_raw),i=Mt(e);s||(p(e,i)&&q(r,0,e),q(r,0,i));const{has:c}=tt(r),o=n?$:s?It:zt;return c.call(r,e)?o(t.get(e)):c.call(r,i)?o(t.get(i)):void(t!==r&&t.get(e))}function st(t,e=!1){const s=this.__v_raw,n=Mt(s),r=Mt(t);return e||(p(t,r)&&q(n,0,t),q(n,0,r)),t===r?s.has(t):s.has(t)||s.has(r)}function nt(t,e=!1){return t=t.__v_raw,!e&&q(Mt(t),0,N),Reflect.get(t,"size",t)}function rt(t){t=Mt(t);const e=Mt(this);return tt(e).has.call(e,t)||(e.add(t),C(e,"add",t,t)),this}function it(t,e){e=Mt(e);const s=Mt(this),{has:n,get:r}=tt(s);let i=n.call(s,t);i||(t=Mt(t),i=n.call(s,t));const c=r.call(s,t);return s.set(t,e),i?p(e,c)&&C(s,"set",t,e):C(s,"add",t,e),this}function ct(t){const e=Mt(this),{has:s,get:n}=tt(e);let r=s.call(e,t);r||(t=Mt(t),r=s.call(e,t)),n&&n.call(e,t);const i=e.delete(t);return r&&C(e,"delete",t,void 0),i}function ot(){const t=Mt(this),e=0!==t.size,s=t.clear();return e&&C(t,"clear",void 0,void 0),s}function ut(t,e){return function(s,n){const r=this,i=r.__v_raw,c=Mt(i),o=e?$:t?It:zt;return!t&&q(c,0,N),i.forEach(((t,e)=>s.call(n,o(t),o(e),r)))}}function at(t,e,s){return function(...n){const r=this.__v_raw,i=Mt(r),c=o(i),u="entries"===t||t===Symbol.iterator&&c,a="keys"===t&&c,l=r[t](...n),h=s?$:e?It:zt;return!e&&q(i,0,a?T:N),{next(){const{value:t,done:e}=l.next();return e?{value:t,done:e}:{value:u?[h(t[0]),h(t[1])]:h(t),done:e}},[Symbol.iterator](){return this}}}}function lt(t){return function(...e){return"delete"!==t&&this}}function ht(){const t={get(t){return et(this,t)},get size(){return nt(this)},has:st,add:rt,set:it,delete:ct,clear:ot,forEach:ut(!1,!1)},e={get(t){return et(this,t,!1,!0)},get size(){return nt(this)},has:st,add:rt,set:it,delete:ct,clear:ot,forEach:ut(!1,!0)},s={get(t){return et(this,t,!0)},get size(){return nt(this,!0)},has(t){return st.call(this,t,!0)},add:lt("add"),set:lt("set"),delete:lt("delete"),clear:lt("clear"),forEach:ut(!0,!1)},n={get(t){return et(this,t,!0,!0)},get size(){return nt(this,!0)},has(t){return st.call(this,t,!0)},add:lt("add"),set:lt("set"),delete:lt("delete"),clear:lt("clear"),forEach:ut(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((r=>{t[r]=at(r,!1,!1),s[r]=at(r,!0,!1),e[r]=at(r,!1,!0),n[r]=at(r,!0,!0)})),[t,s,e,n]}const[ft,_t,dt,pt]=ht();function vt(t,e){const s=e?t?pt:dt:t?_t:ft;return(e,n,r)=>"__v_isReactive"===n?!t:"__v_isReadonly"===n?t:"__v_raw"===n?e:Reflect.get(i(s,n)&&n in e?s:e,n,r)}const gt={get:vt(!1,!1)},yt={get:vt(!1,!0)},wt={get:vt(!0,!1)},Rt={get:vt(!0,!0)},bt=new WeakMap,kt=new WeakMap,mt=new WeakMap,St=new WeakMap;function Lt(t){return Et(t)?t:jt(t,!1,Q,gt,bt)}function Ot(t){return jt(t,!0,U,wt,mt)}function jt(t,e,s,n,r){if(!l(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const i=r.get(t);if(i)return i;const c=(o=t).__v_skip||!Object.isExtensible(o)?0:function(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(_(o));var o;if(0===c)return t;const u=new Proxy(t,2===c?n:s);return r.set(t,u),u}function xt(t){return Et(t)?xt(t.__v_raw):!(!t||!t.__v_isReactive)}function Et(t){return!(!t||!t.__v_isReadonly)}function Pt(t){return!(!t||!t.__v_isShallow)}function Mt(t){const e=t&&t.__v_raw;return e?Mt(e):t}const zt=t=>l(t)?Lt(t):t,It=t=>l(t)?Ot(t):t;class Vt{constructor(t,e,s,n){this._setter=e,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new R(t,(()=>{Nt(this,1)})),this.effect.computed=this,this.effect.active=this._cacheable=!n,this.__v_isReadonly=s}get value(){const t=Mt(this);return At(t),t._cacheable&&!t.effect.dirty||p(t._value,t._value=t.effect.run())&&Nt(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function Wt(t,e,n=!1){let r,i;const c=u(t);c?(r=t,i=s):(r=t.get,i=t.set);return new Vt(r,i,c||!i,n)}function At(t){L&&g&&(t=Mt(t),z(g,t.dep||(t.dep=W((()=>t.dep=void 0),t instanceof Vt?t:void 0))))}function Nt(t,e=3,s){const n=(t=Mt(t)).dep;n&&V(n,e)}function Tt(t){return!(!t||!0!==t.__v_isRef)}function qt(t){return Ct(t,!1)}function Ct(t,e){return Tt(t)?t:new Kt(t,e)}class Kt{constructor(t,e){this.__v_isShallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?t:Mt(t),this._value=e?t:zt(t)}get value(){return At(this),this._value}set value(t){const e=this.__v_isShallow||Pt(t)||Et(t);t=e?t:Mt(t),p(t,this._rawValue)&&(this._rawValue=t,this._value=e?t:zt(t),Nt(this,3))}}function Dt(t){return Tt(t)?t.value:t}const Yt={get:(t,e,s)=>Dt(Reflect.get(t,e,s)),set:(t,e,s,n)=>{const r=t[e];return Tt(r)&&!Tt(s)?(r.value=s,!0):Reflect.set(t,e,s,n)}};class Bt{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:e,set:s}=t((()=>At(this)),(()=>Nt(this)));this._get=e,this._set=s}get value(){return this._get()}set value(t){this._set(t)}}class Ft{constructor(t,e,s){this._object=t,this._key=e,this._defaultValue=s,this.__v_isRef=!0}get value(){const t=this._object[this._key];return void 0===t?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return t=Mt(this._object),e=this._key,null==(s=A.get(t))?void 0:s.get(e);var t,e,s}}class Gt{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Ht(t,e,s){const n=t[e];return Tt(n)?n:new Ft(t,e,s)}const Jt=Wt;return t.EffectScope=y,t.ITERATE_KEY=N,t.ReactiveEffect=R,t.computed=Wt,t.customRef=function(t){return new Bt(t)},t.deferredComputed=Jt,t.effect=function(t,e){t.effect instanceof R&&(t=t.effect.fn);const r=new R(t,s,(()=>{r.dirty&&r.run()}));e&&(n(r,e),e.scope&&w(r,e.scope)),e&&e.lazy||r.run();const i=r.run.bind(r);return i.effect=r,i},t.effectScope=function(t){return new y(t)},t.enableTracking=function(){j.push(L),L=!0},t.getCurrentScope=function(){return v},t.isProxy=function(t){return xt(t)||Et(t)},t.isReactive=xt,t.isReadonly=Et,t.isRef=Tt,t.isShallow=Pt,t.markRaw=function(t){return((t,e,s)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:s})})(t,"__v_skip",!0),t},t.onScopeDispose=function(t){v&&v.cleanups.push(t)},t.pauseScheduling=P,t.pauseTracking=x,t.proxyRefs=function(t){return xt(t)?t:new Proxy(t,Yt)},t.reactive=Lt,t.readonly=Ot,t.ref=qt,t.resetScheduling=M,t.resetTracking=E,t.shallowReactive=function(t){return jt(t,!1,X,yt,kt)},t.shallowReadonly=function(t){return jt(t,!0,Z,Rt,St)},t.shallowRef=function(t){return Ct(t,!0)},t.stop=function(t){t.effect.stop()},t.toRaw=Mt,t.toRef=function(t,e,s){return Tt(t)?t:u(t)?new Gt(t):l(t)&&arguments.length>1?Ht(t,e,s):qt(t)},t.toRefs=function(t){const e=c(t)?new Array(t.length):{};for(const s in t)e[s]=Ht(t,s);return e},t.toValue=function(t){return u(t)?t():Dt(t)},t.track=q,t.trigger=C,t.triggerRef=function(t){Nt(t,3)},t.unref=Dt,t}({});
1
+ var VueReactivity=function(t){"use strict";function e(t,e){const s=new Set(t.split(","));return e?t=>s.has(t.toLowerCase()):t=>s.has(t)}const s=()=>{},n=Object.assign,r=Object.prototype.hasOwnProperty,i=(t,e)=>r.call(t,e),c=Array.isArray,o=t=>"[object Map]"===f(t),u=t=>"function"==typeof t,a=t=>"symbol"==typeof t,h=t=>null!==t&&"object"==typeof t,l=Object.prototype.toString,f=t=>l.call(t),_=t=>f(t).slice(8,-1),d=t=>"string"==typeof t&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,p=(t,e)=>!Object.is(t,e);let v,g;class y{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=v,!t&&v&&(this.index=(v.scopes||(v.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const e=v;try{return v=this,t()}finally{v=e}}}on(){v=this}off(){v=this.parent}stop(t){if(this._active){let e,s;for(e=0,s=this.effects.length;e<s;e++)this.effects[e].stop();for(e=0,s=this.cleanups.length;e<s;e++)this.cleanups[e]();if(this.scopes)for(e=0,s=this.scopes.length;e<s;e++)this.scopes[e].stop(!0);if(!this.detached&&this.parent&&!t){const t=this.parent.scopes.pop();t&&t!==this&&(this.parent.scopes[this.index]=t,t.index=this.index)}this.parent=void 0,this._active=!1}}}function w(t,e=v){e&&e.active&&e.effects.push(t)}class R{constructor(t,e,s,n){this.fn=t,this.trigger=e,this.scheduler=s,this.active=!0,this.deps=[],this._dirtyLevel=3,this._trackId=0,this._runnings=0,this._queryings=0,this._depsLength=0,w(this,n)}get dirty(){if(1===this._dirtyLevel){this._dirtyLevel=0,this._queryings++,O();for(const t of this.deps)if(t.computed&&(b(t.computed),this._dirtyLevel>=2))break;j(),this._queryings--}return this._dirtyLevel>=2}set dirty(t){this._dirtyLevel=t?3:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=L,e=g;try{return L=!0,g=this,this._runnings++,k(this),this.fn()}finally{S(this),this._runnings--,g=e,L=t}}stop(){var t;this.active&&(k(this),S(this),null==(t=this.onStop)||t.call(this),this.active=!1)}}function b(t){return t.value}function k(t){t._trackId++,t._depsLength=0}function S(t){if(t.deps&&t.deps.length>t._depsLength){for(let e=t._depsLength;e<t.deps.length;e++)m(t.deps[e],t);t.deps.length=t._depsLength}}function m(t,e){const s=t.get(e);void 0!==s&&e._trackId!==s&&(t.delete(e),0===t.size&&t.cleanup())}let L=!0,x=0;const E=[];function O(){E.push(L),L=!1}function j(){const t=E.pop();L=void 0===t||t}function P(){x++}function M(){for(x--;!x&&I.length;)I.shift()()}function z(t,e,s){if(e.get(t)!==t._trackId){e.set(t,t._trackId);const s=t.deps[t._depsLength];s!==e?(s&&m(s,t),t.deps[t._depsLength++]=e):t._depsLength++}}const I=[];function V(t,e,s){P();for(const n of t.keys())if((n.allowRecurse||!n._runnings)&&n._dirtyLevel<e&&(!n._runnings||2!==e)){const t=n._dirtyLevel;n._dirtyLevel=e,0!==t||n._queryings&&2===e||(n.trigger(),n.scheduler&&I.push(n.scheduler))}M()}const W=(t,e)=>{const s=new Map;return s.cleanup=t,s.computed=e,s},A=new WeakMap,N=Symbol(""),T=Symbol("");function q(t,e,s){if(L&&g){let e=A.get(t);e||A.set(t,e=new Map);let n=e.get(s);n||e.set(s,n=W((()=>e.delete(s)))),z(g,n)}}function C(t,e,s,n,r,i){const u=A.get(t);if(!u)return;let h=[];if("clear"===e)h=[...u.values()];else if("length"===s&&c(t)){const t=Number(n);u.forEach(((e,s)=>{("length"===s||!a(s)&&s>=t)&&h.push(e)}))}else switch(void 0!==s&&h.push(u.get(s)),e){case"add":c(t)?d(s)&&h.push(u.get("length")):(h.push(u.get(N)),o(t)&&h.push(u.get(T)));break;case"delete":c(t)||(h.push(u.get(N)),o(t)&&h.push(u.get(T)));break;case"set":o(t)&&h.push(u.get(N))}P();for(const c of h)c&&V(c,3);M()}const K=e("__proto__,__v_isRef,__isVue"),D=new Set(Object.getOwnPropertyNames(Symbol).filter((t=>"arguments"!==t&&"caller"!==t)).map((t=>Symbol[t])).filter(a)),Y=B();function B(){const t={};return["includes","indexOf","lastIndexOf"].forEach((e=>{t[e]=function(...t){const s=Mt(this);for(let e=0,r=this.length;e<r;e++)q(s,0,e+"");const n=s[e](...t);return-1===n||!1===n?s[e](...t.map(Mt)):n}})),["push","pop","shift","unshift","splice"].forEach((e=>{t[e]=function(...t){O(),P();const s=Mt(this)[e].apply(this,t);return M(),j(),s}})),t}function F(t){const e=Mt(this);return q(e,0,t),e.hasOwnProperty(t)}class G{constructor(t=!1,e=!1){this._isReadonly=t,this._shallow=e}get(t,e,s){const n=this._isReadonly,r=this._shallow;if("__v_isReactive"===e)return!n;if("__v_isReadonly"===e)return n;if("__v_isShallow"===e)return r;if("__v_raw"===e&&s===(n?r?mt:St:r?kt:bt).get(t))return t;const o=c(t);if(!n){if(o&&i(Y,e))return Reflect.get(Y,e,s);if("hasOwnProperty"===e)return F}const u=Reflect.get(t,e,s);return(a(e)?D.has(e):K(e))?u:(n||q(t,0,e),r?u:Tt(u)?o&&d(e)?u:u.value:h(u)?n?xt(u):Lt(u):u)}}class H extends G{constructor(t=!1){super(!1,t)}set(t,e,s,n){let r=t[e];if(jt(r)&&Tt(r)&&!Tt(s))return!1;if(!this._shallow&&(Pt(s)||jt(s)||(r=Mt(r),s=Mt(s)),!c(t)&&Tt(r)&&!Tt(s)))return r.value=s,!0;const o=c(t)&&d(e)?Number(e)<t.length:i(t,e),u=Reflect.set(t,e,s,n);return t===Mt(n)&&(o?p(s,r)&&C(t,"set",e,s):C(t,"add",e,s)),u}deleteProperty(t,e){const s=i(t,e),n=Reflect.deleteProperty(t,e);return n&&s&&C(t,"delete",e,void 0),n}has(t,e){const s=Reflect.has(t,e);return a(e)&&D.has(e)||q(t,0,e),s}ownKeys(t){return q(t,0,c(t)?"length":N),Reflect.ownKeys(t)}}class J extends G{constructor(t=!1){super(!0,t)}set(t,e){return!0}deleteProperty(t,e){return!0}}const Q=new H,U=new J,X=new H(!0),Z=new J(!0),$=t=>t,tt=t=>Reflect.getPrototypeOf(t);function et(t,e,s=!1,n=!1){const r=Mt(t=t.__v_raw),i=Mt(e);s||(p(e,i)&&q(r,0,e),q(r,0,i));const{has:c}=tt(r),o=n?$:s?It:zt;return c.call(r,e)?o(t.get(e)):c.call(r,i)?o(t.get(i)):void(t!==r&&t.get(e))}function st(t,e=!1){const s=this.__v_raw,n=Mt(s),r=Mt(t);return e||(p(t,r)&&q(n,0,t),q(n,0,r)),t===r?s.has(t):s.has(t)||s.has(r)}function nt(t,e=!1){return t=t.__v_raw,!e&&q(Mt(t),0,N),Reflect.get(t,"size",t)}function rt(t){t=Mt(t);const e=Mt(this);return tt(e).has.call(e,t)||(e.add(t),C(e,"add",t,t)),this}function it(t,e){e=Mt(e);const s=Mt(this),{has:n,get:r}=tt(s);let i=n.call(s,t);i||(t=Mt(t),i=n.call(s,t));const c=r.call(s,t);return s.set(t,e),i?p(e,c)&&C(s,"set",t,e):C(s,"add",t,e),this}function ct(t){const e=Mt(this),{has:s,get:n}=tt(e);let r=s.call(e,t);r||(t=Mt(t),r=s.call(e,t)),n&&n.call(e,t);const i=e.delete(t);return r&&C(e,"delete",t,void 0),i}function ot(){const t=Mt(this),e=0!==t.size,s=t.clear();return e&&C(t,"clear",void 0,void 0),s}function ut(t,e){return function(s,n){const r=this,i=r.__v_raw,c=Mt(i),o=e?$:t?It:zt;return!t&&q(c,0,N),i.forEach(((t,e)=>s.call(n,o(t),o(e),r)))}}function at(t,e,s){return function(...n){const r=this.__v_raw,i=Mt(r),c=o(i),u="entries"===t||t===Symbol.iterator&&c,a="keys"===t&&c,h=r[t](...n),l=s?$:e?It:zt;return!e&&q(i,0,a?T:N),{next(){const{value:t,done:e}=h.next();return e?{value:t,done:e}:{value:u?[l(t[0]),l(t[1])]:l(t),done:e}},[Symbol.iterator](){return this}}}}function ht(t){return function(...e){return"delete"!==t&&("clear"===t?void 0:this)}}function lt(){const t={get(t){return et(this,t)},get size(){return nt(this)},has:st,add:rt,set:it,delete:ct,clear:ot,forEach:ut(!1,!1)},e={get(t){return et(this,t,!1,!0)},get size(){return nt(this)},has:st,add:rt,set:it,delete:ct,clear:ot,forEach:ut(!1,!0)},s={get(t){return et(this,t,!0)},get size(){return nt(this,!0)},has(t){return st.call(this,t,!0)},add:ht("add"),set:ht("set"),delete:ht("delete"),clear:ht("clear"),forEach:ut(!0,!1)},n={get(t){return et(this,t,!0,!0)},get size(){return nt(this,!0)},has(t){return st.call(this,t,!0)},add:ht("add"),set:ht("set"),delete:ht("delete"),clear:ht("clear"),forEach:ut(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((r=>{t[r]=at(r,!1,!1),s[r]=at(r,!0,!1),e[r]=at(r,!1,!0),n[r]=at(r,!0,!0)})),[t,s,e,n]}const[ft,_t,dt,pt]=lt();function vt(t,e){const s=e?t?pt:dt:t?_t:ft;return(e,n,r)=>"__v_isReactive"===n?!t:"__v_isReadonly"===n?t:"__v_raw"===n?e:Reflect.get(i(s,n)&&n in e?s:e,n,r)}const gt={get:vt(!1,!1)},yt={get:vt(!1,!0)},wt={get:vt(!0,!1)},Rt={get:vt(!0,!0)},bt=new WeakMap,kt=new WeakMap,St=new WeakMap,mt=new WeakMap;function Lt(t){return jt(t)?t:Et(t,!1,Q,gt,bt)}function xt(t){return Et(t,!0,U,wt,St)}function Et(t,e,s,n,r){if(!h(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const i=r.get(t);if(i)return i;const c=(o=t).__v_skip||!Object.isExtensible(o)?0:function(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(_(o));var o;if(0===c)return t;const u=new Proxy(t,2===c?n:s);return r.set(t,u),u}function Ot(t){return jt(t)?Ot(t.__v_raw):!(!t||!t.__v_isReactive)}function jt(t){return!(!t||!t.__v_isReadonly)}function Pt(t){return!(!t||!t.__v_isShallow)}function Mt(t){const e=t&&t.__v_raw;return e?Mt(e):t}const zt=t=>h(t)?Lt(t):t,It=t=>h(t)?xt(t):t;class Vt{constructor(t,e,s,n){this._setter=e,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new R((()=>t(this._value)),(()=>Nt(this,1))),this.effect.computed=this,this.effect.active=this._cacheable=!n,this.__v_isReadonly=s}get value(){const t=Mt(this);return At(t),t._cacheable&&!t.effect.dirty||p(t._value,t._value=t.effect.run())&&Nt(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function Wt(t,e,n=!1){let r,i;const c=u(t);c?(r=t,i=s):(r=t.get,i=t.set);return new Vt(r,i,c||!i,n)}function At(t){L&&g&&(t=Mt(t),z(g,t.dep||(t.dep=W((()=>t.dep=void 0),t instanceof Vt?t:void 0))))}function Nt(t,e=3,s){const n=(t=Mt(t)).dep;n&&V(n,e)}function Tt(t){return!(!t||!0!==t.__v_isRef)}function qt(t){return Ct(t,!1)}function Ct(t,e){return Tt(t)?t:new Kt(t,e)}class Kt{constructor(t,e){this.__v_isShallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?t:Mt(t),this._value=e?t:zt(t)}get value(){return At(this),this._value}set value(t){const e=this.__v_isShallow||Pt(t)||jt(t);t=e?t:Mt(t),p(t,this._rawValue)&&(this._rawValue=t,this._value=e?t:zt(t),Nt(this,3))}}function Dt(t){return Tt(t)?t.value:t}const Yt={get:(t,e,s)=>Dt(Reflect.get(t,e,s)),set:(t,e,s,n)=>{const r=t[e];return Tt(r)&&!Tt(s)?(r.value=s,!0):Reflect.set(t,e,s,n)}};class Bt{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:e,set:s}=t((()=>At(this)),(()=>Nt(this)));this._get=e,this._set=s}get value(){return this._get()}set value(t){this._set(t)}}class Ft{constructor(t,e,s){this._object=t,this._key=e,this._defaultValue=s,this.__v_isRef=!0}get value(){const t=this._object[this._key];return void 0===t?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return t=Mt(this._object),e=this._key,null==(s=A.get(t))?void 0:s.get(e);var t,e,s}}class Gt{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Ht(t,e,s){const n=t[e];return Tt(n)?n:new Ft(t,e,s)}const Jt=Wt;return t.EffectScope=y,t.ITERATE_KEY=N,t.ReactiveEffect=R,t.computed=Wt,t.customRef=function(t){return new Bt(t)},t.deferredComputed=Jt,t.effect=function(t,e){t.effect instanceof R&&(t=t.effect.fn);const r=new R(t,s,(()=>{r.dirty&&r.run()}));e&&(n(r,e),e.scope&&w(r,e.scope)),e&&e.lazy||r.run();const i=r.run.bind(r);return i.effect=r,i},t.effectScope=function(t){return new y(t)},t.enableTracking=function(){E.push(L),L=!0},t.getCurrentScope=function(){return v},t.isProxy=function(t){return Ot(t)||jt(t)},t.isReactive=Ot,t.isReadonly=jt,t.isRef=Tt,t.isShallow=Pt,t.markRaw=function(t){return((t,e,s)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:s})})(t,"__v_skip",!0),t},t.onScopeDispose=function(t){v&&v.cleanups.push(t)},t.pauseScheduling=P,t.pauseTracking=O,t.proxyRefs=function(t){return Ot(t)?t:new Proxy(t,Yt)},t.reactive=Lt,t.readonly=xt,t.ref=qt,t.resetScheduling=M,t.resetTracking=j,t.shallowReactive=function(t){return Et(t,!1,X,yt,kt)},t.shallowReadonly=function(t){return Et(t,!0,Z,Rt,mt)},t.shallowRef=function(t){return Ct(t,!0)},t.stop=function(t){t.effect.stop()},t.toRaw=Mt,t.toRef=function(t,e,s){return Tt(t)?t:u(t)?new Gt(t):h(t)&&arguments.length>1?Ht(t,e,s):qt(t)},t.toRefs=function(t){const e=c(t)?new Array(t.length):{};for(const s in t)e[s]=Ht(t,s);return e},t.toValue=function(t){return u(t)?t():Dt(t)},t.track=q,t.trigger=C,t.triggerRef=function(t){Nt(t,3)},t.unref=Dt,t}({});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/reactivity",
3
- "version": "3.4.0-alpha.1",
3
+ "version": "3.4.0-alpha.3",
4
4
  "description": "@vue/reactivity",
5
5
  "main": "index.js",
6
6
  "module": "dist/reactivity.esm-bundler.js",
@@ -36,6 +36,6 @@
36
36
  },
37
37
  "homepage": "https://github.com/vuejs/core/tree/main/packages/reactivity#readme",
38
38
  "dependencies": {
39
- "@vue/shared": "3.4.0-alpha.1"
39
+ "@vue/shared": "3.4.0-alpha.3"
40
40
  }
41
41
  }