@vue/reactivity 3.4.12 → 3.4.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/reactivity.cjs.js +22 -19
- package/dist/reactivity.cjs.prod.js +22 -19
- package/dist/reactivity.esm-browser.js +22 -19
- package/dist/reactivity.esm-browser.prod.js +2 -2
- package/dist/reactivity.esm-bundler.js +22 -19
- package/dist/reactivity.global.js +22 -19
- package/dist/reactivity.global.prod.js +2 -2
- package/package.json +2 -2
package/dist/reactivity.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/reactivity v3.4.
|
|
2
|
+
* @vue/reactivity v3.4.14
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -124,7 +124,7 @@ class ReactiveEffect {
|
|
|
124
124
|
/**
|
|
125
125
|
* @internal
|
|
126
126
|
*/
|
|
127
|
-
this._dirtyLevel =
|
|
127
|
+
this._dirtyLevel = 2;
|
|
128
128
|
/**
|
|
129
129
|
* @internal
|
|
130
130
|
*/
|
|
@@ -136,7 +136,7 @@ class ReactiveEffect {
|
|
|
136
136
|
/**
|
|
137
137
|
* @internal
|
|
138
138
|
*/
|
|
139
|
-
this.
|
|
139
|
+
this._shouldSchedule = false;
|
|
140
140
|
/**
|
|
141
141
|
* @internal
|
|
142
142
|
*/
|
|
@@ -145,10 +145,9 @@ class ReactiveEffect {
|
|
|
145
145
|
}
|
|
146
146
|
get dirty() {
|
|
147
147
|
if (this._dirtyLevel === 1) {
|
|
148
|
-
this._dirtyLevel = 0;
|
|
149
|
-
this._queryings++;
|
|
150
148
|
pauseTracking();
|
|
151
|
-
for (
|
|
149
|
+
for (let i = 0; i < this._depsLength; i++) {
|
|
150
|
+
const dep = this.deps[i];
|
|
152
151
|
if (dep.computed) {
|
|
153
152
|
triggerComputed(dep.computed);
|
|
154
153
|
if (this._dirtyLevel >= 2) {
|
|
@@ -156,13 +155,15 @@ class ReactiveEffect {
|
|
|
156
155
|
}
|
|
157
156
|
}
|
|
158
157
|
}
|
|
158
|
+
if (this._dirtyLevel < 2) {
|
|
159
|
+
this._dirtyLevel = 0;
|
|
160
|
+
}
|
|
159
161
|
resetTracking();
|
|
160
|
-
this._queryings--;
|
|
161
162
|
}
|
|
162
163
|
return this._dirtyLevel >= 2;
|
|
163
164
|
}
|
|
164
165
|
set dirty(v) {
|
|
165
|
-
this._dirtyLevel = v ?
|
|
166
|
+
this._dirtyLevel = v ? 2 : 0;
|
|
166
167
|
}
|
|
167
168
|
run() {
|
|
168
169
|
this._dirtyLevel = 0;
|
|
@@ -289,22 +290,24 @@ function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
|
|
|
289
290
|
var _a;
|
|
290
291
|
pauseScheduling();
|
|
291
292
|
for (const effect2 of dep.keys()) {
|
|
292
|
-
if (
|
|
293
|
+
if (dep.get(effect2) !== effect2._trackId) {
|
|
293
294
|
continue;
|
|
294
295
|
}
|
|
295
|
-
if (effect2._dirtyLevel < dirtyLevel && (
|
|
296
|
+
if (effect2._dirtyLevel < dirtyLevel && !(effect2._runnings && !effect2.allowRecurse)) {
|
|
296
297
|
const lastDirtyLevel = effect2._dirtyLevel;
|
|
297
298
|
effect2._dirtyLevel = dirtyLevel;
|
|
298
|
-
if (lastDirtyLevel === 0
|
|
299
|
+
if (lastDirtyLevel === 0) {
|
|
300
|
+
effect2._shouldSchedule = true;
|
|
299
301
|
{
|
|
300
302
|
(_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, shared.extend({ effect: effect2 }, debuggerEventExtraInfo));
|
|
301
303
|
}
|
|
302
304
|
effect2.trigger();
|
|
303
|
-
if (effect2.scheduler) {
|
|
304
|
-
queueEffectSchedulers.push(effect2.scheduler);
|
|
305
|
-
}
|
|
306
305
|
}
|
|
307
306
|
}
|
|
307
|
+
if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse)) {
|
|
308
|
+
effect2._shouldSchedule = false;
|
|
309
|
+
queueEffectSchedulers.push(effect2.scheduler);
|
|
310
|
+
}
|
|
308
311
|
}
|
|
309
312
|
resetScheduling();
|
|
310
313
|
}
|
|
@@ -390,7 +393,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
390
393
|
if (dep) {
|
|
391
394
|
triggerEffects(
|
|
392
395
|
dep,
|
|
393
|
-
|
|
396
|
+
2,
|
|
394
397
|
{
|
|
395
398
|
target,
|
|
396
399
|
type,
|
|
@@ -997,12 +1000,12 @@ class ComputedRefImpl {
|
|
|
997
1000
|
}
|
|
998
1001
|
get value() {
|
|
999
1002
|
const self = toRaw(this);
|
|
1000
|
-
trackRefValue(self);
|
|
1001
1003
|
if (!self._cacheable || self.effect.dirty) {
|
|
1002
1004
|
if (shared.hasChanged(self._value, self._value = self.effect.run())) {
|
|
1003
1005
|
triggerRefValue(self, 2);
|
|
1004
1006
|
}
|
|
1005
1007
|
}
|
|
1008
|
+
trackRefValue(self);
|
|
1006
1009
|
return self._value;
|
|
1007
1010
|
}
|
|
1008
1011
|
set value(newValue) {
|
|
@@ -1055,7 +1058,7 @@ function trackRefValue(ref2) {
|
|
|
1055
1058
|
);
|
|
1056
1059
|
}
|
|
1057
1060
|
}
|
|
1058
|
-
function triggerRefValue(ref2, dirtyLevel =
|
|
1061
|
+
function triggerRefValue(ref2, dirtyLevel = 2, newVal) {
|
|
1059
1062
|
ref2 = toRaw(ref2);
|
|
1060
1063
|
const dep = ref2.dep;
|
|
1061
1064
|
if (dep) {
|
|
@@ -1104,12 +1107,12 @@ class RefImpl {
|
|
|
1104
1107
|
if (shared.hasChanged(newVal, this._rawValue)) {
|
|
1105
1108
|
this._rawValue = newVal;
|
|
1106
1109
|
this._value = useDirectValue ? newVal : toReactive(newVal);
|
|
1107
|
-
triggerRefValue(this,
|
|
1110
|
+
triggerRefValue(this, 2, newVal);
|
|
1108
1111
|
}
|
|
1109
1112
|
}
|
|
1110
1113
|
}
|
|
1111
1114
|
function triggerRef(ref2) {
|
|
1112
|
-
triggerRefValue(ref2,
|
|
1115
|
+
triggerRefValue(ref2, 2, ref2.value );
|
|
1113
1116
|
}
|
|
1114
1117
|
function unref(ref2) {
|
|
1115
1118
|
return isRef(ref2) ? ref2.value : ref2;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/reactivity v3.4.
|
|
2
|
+
* @vue/reactivity v3.4.14
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -114,7 +114,7 @@ class ReactiveEffect {
|
|
|
114
114
|
/**
|
|
115
115
|
* @internal
|
|
116
116
|
*/
|
|
117
|
-
this._dirtyLevel =
|
|
117
|
+
this._dirtyLevel = 2;
|
|
118
118
|
/**
|
|
119
119
|
* @internal
|
|
120
120
|
*/
|
|
@@ -126,7 +126,7 @@ class ReactiveEffect {
|
|
|
126
126
|
/**
|
|
127
127
|
* @internal
|
|
128
128
|
*/
|
|
129
|
-
this.
|
|
129
|
+
this._shouldSchedule = false;
|
|
130
130
|
/**
|
|
131
131
|
* @internal
|
|
132
132
|
*/
|
|
@@ -135,10 +135,9 @@ class ReactiveEffect {
|
|
|
135
135
|
}
|
|
136
136
|
get dirty() {
|
|
137
137
|
if (this._dirtyLevel === 1) {
|
|
138
|
-
this._dirtyLevel = 0;
|
|
139
|
-
this._queryings++;
|
|
140
138
|
pauseTracking();
|
|
141
|
-
for (
|
|
139
|
+
for (let i = 0; i < this._depsLength; i++) {
|
|
140
|
+
const dep = this.deps[i];
|
|
142
141
|
if (dep.computed) {
|
|
143
142
|
triggerComputed(dep.computed);
|
|
144
143
|
if (this._dirtyLevel >= 2) {
|
|
@@ -146,13 +145,15 @@ class ReactiveEffect {
|
|
|
146
145
|
}
|
|
147
146
|
}
|
|
148
147
|
}
|
|
148
|
+
if (this._dirtyLevel < 2) {
|
|
149
|
+
this._dirtyLevel = 0;
|
|
150
|
+
}
|
|
149
151
|
resetTracking();
|
|
150
|
-
this._queryings--;
|
|
151
152
|
}
|
|
152
153
|
return this._dirtyLevel >= 2;
|
|
153
154
|
}
|
|
154
155
|
set dirty(v) {
|
|
155
|
-
this._dirtyLevel = v ?
|
|
156
|
+
this._dirtyLevel = v ? 2 : 0;
|
|
156
157
|
}
|
|
157
158
|
run() {
|
|
158
159
|
this._dirtyLevel = 0;
|
|
@@ -274,19 +275,21 @@ const queueEffectSchedulers = [];
|
|
|
274
275
|
function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
|
|
275
276
|
pauseScheduling();
|
|
276
277
|
for (const effect2 of dep.keys()) {
|
|
277
|
-
if (
|
|
278
|
+
if (dep.get(effect2) !== effect2._trackId) {
|
|
278
279
|
continue;
|
|
279
280
|
}
|
|
280
|
-
if (effect2._dirtyLevel < dirtyLevel && (
|
|
281
|
+
if (effect2._dirtyLevel < dirtyLevel && !(effect2._runnings && !effect2.allowRecurse)) {
|
|
281
282
|
const lastDirtyLevel = effect2._dirtyLevel;
|
|
282
283
|
effect2._dirtyLevel = dirtyLevel;
|
|
283
|
-
if (lastDirtyLevel === 0
|
|
284
|
+
if (lastDirtyLevel === 0) {
|
|
285
|
+
effect2._shouldSchedule = true;
|
|
284
286
|
effect2.trigger();
|
|
285
|
-
if (effect2.scheduler) {
|
|
286
|
-
queueEffectSchedulers.push(effect2.scheduler);
|
|
287
|
-
}
|
|
288
287
|
}
|
|
289
288
|
}
|
|
289
|
+
if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse)) {
|
|
290
|
+
effect2._shouldSchedule = false;
|
|
291
|
+
queueEffectSchedulers.push(effect2.scheduler);
|
|
292
|
+
}
|
|
290
293
|
}
|
|
291
294
|
resetScheduling();
|
|
292
295
|
}
|
|
@@ -366,7 +369,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
366
369
|
if (dep) {
|
|
367
370
|
triggerEffects(
|
|
368
371
|
dep,
|
|
369
|
-
|
|
372
|
+
2);
|
|
370
373
|
}
|
|
371
374
|
}
|
|
372
375
|
resetScheduling();
|
|
@@ -928,12 +931,12 @@ class ComputedRefImpl {
|
|
|
928
931
|
}
|
|
929
932
|
get value() {
|
|
930
933
|
const self = toRaw(this);
|
|
931
|
-
trackRefValue(self);
|
|
932
934
|
if (!self._cacheable || self.effect.dirty) {
|
|
933
935
|
if (shared.hasChanged(self._value, self._value = self.effect.run())) {
|
|
934
936
|
triggerRefValue(self, 2);
|
|
935
937
|
}
|
|
936
938
|
}
|
|
939
|
+
trackRefValue(self);
|
|
937
940
|
return self._value;
|
|
938
941
|
}
|
|
939
942
|
set value(newValue) {
|
|
@@ -974,7 +977,7 @@ function trackRefValue(ref2) {
|
|
|
974
977
|
)));
|
|
975
978
|
}
|
|
976
979
|
}
|
|
977
|
-
function triggerRefValue(ref2, dirtyLevel =
|
|
980
|
+
function triggerRefValue(ref2, dirtyLevel = 2, newVal) {
|
|
978
981
|
ref2 = toRaw(ref2);
|
|
979
982
|
const dep = ref2.dep;
|
|
980
983
|
if (dep) {
|
|
@@ -1016,12 +1019,12 @@ class RefImpl {
|
|
|
1016
1019
|
if (shared.hasChanged(newVal, this._rawValue)) {
|
|
1017
1020
|
this._rawValue = newVal;
|
|
1018
1021
|
this._value = useDirectValue ? newVal : toReactive(newVal);
|
|
1019
|
-
triggerRefValue(this,
|
|
1022
|
+
triggerRefValue(this, 2);
|
|
1020
1023
|
}
|
|
1021
1024
|
}
|
|
1022
1025
|
}
|
|
1023
1026
|
function triggerRef(ref2) {
|
|
1024
|
-
triggerRefValue(ref2,
|
|
1027
|
+
triggerRefValue(ref2, 2);
|
|
1025
1028
|
}
|
|
1026
1029
|
function unref(ref2) {
|
|
1027
1030
|
return isRef(ref2) ? ref2.value : ref2;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/reactivity v3.4.
|
|
2
|
+
* @vue/reactivity v3.4.14
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -159,7 +159,7 @@ class ReactiveEffect {
|
|
|
159
159
|
/**
|
|
160
160
|
* @internal
|
|
161
161
|
*/
|
|
162
|
-
this._dirtyLevel =
|
|
162
|
+
this._dirtyLevel = 2;
|
|
163
163
|
/**
|
|
164
164
|
* @internal
|
|
165
165
|
*/
|
|
@@ -171,7 +171,7 @@ class ReactiveEffect {
|
|
|
171
171
|
/**
|
|
172
172
|
* @internal
|
|
173
173
|
*/
|
|
174
|
-
this.
|
|
174
|
+
this._shouldSchedule = false;
|
|
175
175
|
/**
|
|
176
176
|
* @internal
|
|
177
177
|
*/
|
|
@@ -180,10 +180,9 @@ class ReactiveEffect {
|
|
|
180
180
|
}
|
|
181
181
|
get dirty() {
|
|
182
182
|
if (this._dirtyLevel === 1) {
|
|
183
|
-
this._dirtyLevel = 0;
|
|
184
|
-
this._queryings++;
|
|
185
183
|
pauseTracking();
|
|
186
|
-
for (
|
|
184
|
+
for (let i = 0; i < this._depsLength; i++) {
|
|
185
|
+
const dep = this.deps[i];
|
|
187
186
|
if (dep.computed) {
|
|
188
187
|
triggerComputed(dep.computed);
|
|
189
188
|
if (this._dirtyLevel >= 2) {
|
|
@@ -191,13 +190,15 @@ class ReactiveEffect {
|
|
|
191
190
|
}
|
|
192
191
|
}
|
|
193
192
|
}
|
|
193
|
+
if (this._dirtyLevel < 2) {
|
|
194
|
+
this._dirtyLevel = 0;
|
|
195
|
+
}
|
|
194
196
|
resetTracking();
|
|
195
|
-
this._queryings--;
|
|
196
197
|
}
|
|
197
198
|
return this._dirtyLevel >= 2;
|
|
198
199
|
}
|
|
199
200
|
set dirty(v) {
|
|
200
|
-
this._dirtyLevel = v ?
|
|
201
|
+
this._dirtyLevel = v ? 2 : 0;
|
|
201
202
|
}
|
|
202
203
|
run() {
|
|
203
204
|
this._dirtyLevel = 0;
|
|
@@ -324,22 +325,24 @@ function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
|
|
|
324
325
|
var _a;
|
|
325
326
|
pauseScheduling();
|
|
326
327
|
for (const effect2 of dep.keys()) {
|
|
327
|
-
if (
|
|
328
|
+
if (dep.get(effect2) !== effect2._trackId) {
|
|
328
329
|
continue;
|
|
329
330
|
}
|
|
330
|
-
if (effect2._dirtyLevel < dirtyLevel && (
|
|
331
|
+
if (effect2._dirtyLevel < dirtyLevel && !(effect2._runnings && !effect2.allowRecurse)) {
|
|
331
332
|
const lastDirtyLevel = effect2._dirtyLevel;
|
|
332
333
|
effect2._dirtyLevel = dirtyLevel;
|
|
333
|
-
if (lastDirtyLevel === 0
|
|
334
|
+
if (lastDirtyLevel === 0) {
|
|
335
|
+
effect2._shouldSchedule = true;
|
|
334
336
|
{
|
|
335
337
|
(_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
|
|
336
338
|
}
|
|
337
339
|
effect2.trigger();
|
|
338
|
-
if (effect2.scheduler) {
|
|
339
|
-
queueEffectSchedulers.push(effect2.scheduler);
|
|
340
|
-
}
|
|
341
340
|
}
|
|
342
341
|
}
|
|
342
|
+
if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse)) {
|
|
343
|
+
effect2._shouldSchedule = false;
|
|
344
|
+
queueEffectSchedulers.push(effect2.scheduler);
|
|
345
|
+
}
|
|
343
346
|
}
|
|
344
347
|
resetScheduling();
|
|
345
348
|
}
|
|
@@ -425,7 +428,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
425
428
|
if (dep) {
|
|
426
429
|
triggerEffects(
|
|
427
430
|
dep,
|
|
428
|
-
|
|
431
|
+
2,
|
|
429
432
|
{
|
|
430
433
|
target,
|
|
431
434
|
type,
|
|
@@ -1032,12 +1035,12 @@ class ComputedRefImpl {
|
|
|
1032
1035
|
}
|
|
1033
1036
|
get value() {
|
|
1034
1037
|
const self = toRaw(this);
|
|
1035
|
-
trackRefValue(self);
|
|
1036
1038
|
if (!self._cacheable || self.effect.dirty) {
|
|
1037
1039
|
if (hasChanged(self._value, self._value = self.effect.run())) {
|
|
1038
1040
|
triggerRefValue(self, 2);
|
|
1039
1041
|
}
|
|
1040
1042
|
}
|
|
1043
|
+
trackRefValue(self);
|
|
1041
1044
|
return self._value;
|
|
1042
1045
|
}
|
|
1043
1046
|
set value(newValue) {
|
|
@@ -1090,7 +1093,7 @@ function trackRefValue(ref2) {
|
|
|
1090
1093
|
);
|
|
1091
1094
|
}
|
|
1092
1095
|
}
|
|
1093
|
-
function triggerRefValue(ref2, dirtyLevel =
|
|
1096
|
+
function triggerRefValue(ref2, dirtyLevel = 2, newVal) {
|
|
1094
1097
|
ref2 = toRaw(ref2);
|
|
1095
1098
|
const dep = ref2.dep;
|
|
1096
1099
|
if (dep) {
|
|
@@ -1139,12 +1142,12 @@ class RefImpl {
|
|
|
1139
1142
|
if (hasChanged(newVal, this._rawValue)) {
|
|
1140
1143
|
this._rawValue = newVal;
|
|
1141
1144
|
this._value = useDirectValue ? newVal : toReactive(newVal);
|
|
1142
|
-
triggerRefValue(this,
|
|
1145
|
+
triggerRefValue(this, 2, newVal);
|
|
1143
1146
|
}
|
|
1144
1147
|
}
|
|
1145
1148
|
}
|
|
1146
1149
|
function triggerRef(ref2) {
|
|
1147
|
-
triggerRefValue(ref2,
|
|
1150
|
+
triggerRefValue(ref2, 2, ref2.value );
|
|
1148
1151
|
}
|
|
1149
1152
|
function unref(ref2) {
|
|
1150
1153
|
return isRef(ref2) ? ref2.value : ref2;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/reactivity v3.4.
|
|
2
|
+
* @vue/reactivity v3.4.14
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
6
|
-
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),_=t=>l(t).slice(8,-1),f=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 R(){return p}function b(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++,A();for(const t of this.deps)if(t.computed&&(S(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=x,e=v;try{return x=!0,v=this,this._runnings++,L(this),this.fn()}finally{E(this),this._runnings--,v=e,x=t}}stop(){var t;this.active&&(L(this),E(this),null==(t=this.onStop)||t.call(this),this.active=!1)}}function S(t){return t.value}function L(t){t._trackId++,t._depsLength=0}function E(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 m(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 j(t){t.effect.stop()}let x=!0,P=0;const I=[];function A(){I.push(x),x=!1}function M(){I.push(x),x=!0}function W(){const t=I.pop();x=void 0===t||t}function z(){P++}function V(){for(P--;!P&&T.length;)T.shift()()}function N(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 T=[];function q(t,e,s){z();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&&T.push(n.scheduler))}V()}const D=(t,e)=>{const s=new Map;return s.cleanup=t,s.computed=e,s},C=new WeakMap,K=Symbol(""),H=Symbol("");function G(t,e,s){if(x&&v){let e=C.get(t);e||C.set(t,e=new Map);let n=e.get(s);n||e.set(s,n=D((()=>e.delete(s)))),N(v,n)}}function Y(t,e,s,n,i,o){const a=C.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)?f(s)&&h.push(a.get("length")):(h.push(a.get(K)),c(t)&&h.push(a.get(H)));break;case"delete":r(t)||(h.push(a.get(K)),c(t)&&h.push(a.get(H)));break;case"set":c(t)&&h.push(a.get(K))}z();for(const r of h)r&&q(r,3);V()}const B=t("__proto__,__v_isRef,__isVue"),F=new Set(Object.getOwnPropertyNames(Symbol).filter((t=>"arguments"!==t&&"caller"!==t)).map((t=>Symbol[t])).filter(u)),J=Q();function Q(){const t={};return["includes","indexOf","lastIndexOf"].forEach((e=>{t[e]=function(...t){const s=qt(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(qt)):n}})),["push","pop","shift","unshift","splice"].forEach((e=>{t[e]=function(...t){A(),z();const s=qt(this)[e].apply(this,t);return V(),W(),s}})),t}function U(t){const e=qt(this);return G(e,0,t),e.hasOwnProperty(t)}class X{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)return s===(n?c?xt:jt:c?mt:Ot).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=r(t);if(!n){if(o&&i(J,e))return Reflect.get(J,e,s);if("hasOwnProperty"===e)return U}const h=Reflect.get(t,e,s);return(u(e)?F.has(e):B(e))?h:(n||G(t,0,e),c?h:Ft(h)?o&&f(e)?h:h.value:a(h)?n?At(h):Pt(h):h)}}class Z extends X{constructor(t=!1){super(!1,t)}set(t,e,s,n){let c=t[e];if(!this._shallow){const e=Vt(c);if(Nt(s)||Vt(s)||(c=qt(c),s=qt(s)),!r(t)&&Ft(c)&&!Ft(s))return!e&&(c.value=s,!0)}const o=r(t)&&f(e)?Number(e)<t.length:i(t,e),u=Reflect.set(t,e,s,n);return t===qt(n)&&(o?d(s,c)&&Y(t,"set",e,s):Y(t,"add",e,s)),u}deleteProperty(t,e){const s=i(t,e),n=Reflect.deleteProperty(t,e);return n&&s&&Y(t,"delete",e,void 0),n}has(t,e){const s=Reflect.has(t,e);return u(e)&&F.has(e)||G(t,0,e),s}ownKeys(t){return G(t,0,r(t)?"length":K),Reflect.ownKeys(t)}}class $ extends X{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=qt(t=t.__v_raw),r=qt(e);s||(d(e,r)&&G(i,0,e),G(i,0,r));const{has:c}=rt(i),o=n?it:s?Kt:Ct;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=qt(s),i=qt(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(qt(t),0,K),Reflect.get(t,"size",t)}function at(t){t=qt(t);const e=qt(this);return rt(e).has.call(e,t)||(e.add(t),Y(e,"add",t,t)),this}function ht(t,e){e=qt(e);const s=qt(this),{has:n,get:i}=rt(s);let r=n.call(s,t);r||(t=qt(t),r=n.call(s,t));const c=i.call(s,t);return s.set(t,e),r?d(e,c)&&Y(s,"set",t,e):Y(s,"add",t,e),this}function lt(t){const e=qt(this),{has:s,get:n}=rt(e);let i=s.call(e,t);i||(t=qt(t),i=s.call(e,t)),n&&n.call(e,t);const r=e.delete(t);return i&&Y(e,"delete",t,void 0),r}function _t(){const t=qt(this),e=0!==t.size,s=t.clear();return e&&Y(t,"clear",void 0,void 0),s}function ft(t,e){return function(s,n){const i=this,r=i.__v_raw,c=qt(r),o=e?it:t?Kt:Ct;return!t&&G(c,0,K),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=qt(i),o=c(r),u="entries"===t||t===Symbol.iterator&&o,a="keys"===t&&o,h=i[t](...n),l=s?it:e?Kt:Ct;return!e&&G(r,0,a?H:K),{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:_t,forEach:ft(!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:_t,forEach:ft(!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:ft(!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:ft(!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,Rt]=vt();function bt(t,e){const s=e?t?Rt: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:bt(!1,!1)},St={get:bt(!1,!0)},Lt={get:bt(!0,!1)},Et={get:bt(!0,!0)},Ot=new WeakMap,mt=new WeakMap,jt=new WeakMap,xt=new WeakMap;function Pt(t){return Vt(t)?t:Wt(t,!1,tt,kt,Ot)}function It(t){return Wt(t,!1,st,St,mt)}function At(t){return Wt(t,!0,et,Lt,jt)}function Mt(t){return Wt(t,!0,nt,Et,xt)}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}}(_(o));var o;if(0===c)return t;const u=new Proxy(t,2===c?n:s);return i.set(t,u),u}function zt(t){return Vt(t)?zt(t.__v_raw):!(!t||!t.__v_isReactive)}function Vt(t){return!(!t||!t.__v_isReadonly)}function Nt(t){return!(!t||!t.__v_isShallow)}function Tt(t){return zt(t)||Vt(t)}function qt(t){const e=t&&t.__v_raw;return e?qt(e):t}function Dt(t){return((t,e,s)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:s})})(t,"__v_skip",!0),t}const Ct=t=>a(t)?Pt(t):t,Kt=t=>a(t)?At(t):t;class Ht{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)),(()=>Bt(this,1))),this.effect.computed=this,this.effect.active=this._cacheable=!n,this.__v_isReadonly=s}get value(){const t=qt(this);return Yt(t),t._cacheable&&!t.effect.dirty||d(t._value,t._value=t.effect.run())&&Bt(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 Ht(i,r,c||!r,n)}function Yt(t){x&&v&&(t=qt(t),N(v,t.dep||(t.dep=D((()=>t.dep=void 0),t instanceof Ht?t:void 0))))}function Bt(t,e=3,s){const n=(t=qt(t)).dep;n&&q(n,e)}function Ft(t){return!(!t||!0!==t.__v_isRef)}function Jt(t){return Ut(t,!1)}function Qt(t){return Ut(t,!0)}function Ut(t,e){return Ft(t)?t:new Xt(t,e)}class Xt{constructor(t,e){this.__v_isShallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?t:qt(t),this._value=e?t:Ct(t)}get value(){return Yt(this),this._value}set value(t){const e=this.__v_isShallow||Nt(t)||Vt(t);t=e?t:qt(t),d(t,this._rawValue)&&(this._rawValue=t,this._value=e?t:Ct(t),Bt(this,3))}}function Zt(t){Bt(t,3)}function $t(t){return Ft(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 Ft(i)&&!Ft(s)?(i.value=s,!0):Reflect.set(t,e,s,n)}};function se(t){return zt(t)?t:new Proxy(t,ee)}class ne{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:e,set:s}=t((()=>Yt(this)),(()=>Bt(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=qt(this._object),e=this._key,null==(s=C.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 Ft(t)?t:o(t)?new oe(t):a(t)&&arguments.length>1?ae(t,e,s):Jt(t)}function ae(t,e,s){const n=t[e];return Ft(n)?n:new ce(t,e,s)}const he=Gt,le={GET:"get",HAS:"has",ITERATE:"iterate"},_e={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},fe={SKIP:"__v_skip",IS_REACTIVE:"__v_isReactive",IS_READONLY:"__v_isReadonly",IS_SHALLOW:"__v_isShallow",RAW:"__v_raw"};export{g as EffectScope,K as ITERATE_KEY,k as ReactiveEffect,fe as ReactiveFlags,le as TrackOpTypes,_e as TriggerOpTypes,Gt as computed,ie as customRef,he as deferredComputed,m as effect,y as effectScope,M as enableTracking,R as getCurrentScope,Tt as isProxy,zt as isReactive,Vt as isReadonly,Ft as isRef,Nt as isShallow,Dt as markRaw,b as onScopeDispose,z as pauseScheduling,A as pauseTracking,se as proxyRefs,Pt as reactive,At as readonly,Jt as ref,V as resetScheduling,W as resetTracking,It as shallowReactive,Mt as shallowReadonly,Qt as shallowRef,j as stop,qt as toRaw,ue as toRef,re as toRefs,te as toValue,G as track,Y as trigger,Zt as triggerRef,$t as unref};
|
|
6
|
+
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),_=t=>l(t).slice(8,-1),f=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 R(){return p}function b(t){p&&p.cleanups.push(t)}class S{constructor(t,e,s,n){this.fn=t,this.trigger=e,this.scheduler=s,this.active=!0,this.deps=[],this._dirtyLevel=2,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,w(this,n)}get dirty(){if(1===this._dirtyLevel){A();for(let t=0;t<this._depsLength;t++){const e=this.deps[t];if(e.computed&&(k(e.computed),this._dirtyLevel>=2))break}this._dirtyLevel<2&&(this._dirtyLevel=0),W()}return this._dirtyLevel>=2}set dirty(t){this._dirtyLevel=t?2:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=x,e=v;try{return x=!0,v=this,this._runnings++,L(this),this.fn()}finally{E(this),this._runnings--,v=e,x=t}}stop(){var t;this.active&&(L(this),E(this),null==(t=this.onStop)||t.call(this),this.active=!1)}}function k(t){return t.value}function L(t){t._trackId++,t._depsLength=0}function E(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 m(t,n){t.effect instanceof S&&(t=t.effect.fn);const i=new S(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 j(t){t.effect.stop()}let x=!0,I=0;const P=[];function A(){P.push(x),x=!1}function M(){P.push(x),x=!0}function W(){const t=P.pop();x=void 0===t||t}function z(){I++}function V(){for(I--;!I&&T.length;)T.shift()()}function N(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 T=[];function D(t,e,s){z();for(const n of t.keys())if(t.get(n)===n._trackId){if(n._dirtyLevel<e&&(!n._runnings||n.allowRecurse)){const t=n._dirtyLevel;n._dirtyLevel=e,0===t&&(n._shouldSchedule=!0,n.trigger())}n.scheduler&&n._shouldSchedule&&(!n._runnings||n.allowRecurse)&&(n._shouldSchedule=!1,T.push(n.scheduler))}V()}const C=(t,e)=>{const s=new Map;return s.cleanup=t,s.computed=e,s},K=new WeakMap,H=Symbol(""),G=Symbol("");function Y(t,e,s){if(x&&v){let e=K.get(t);e||K.set(t,e=new Map);let n=e.get(s);n||e.set(s,n=C((()=>e.delete(s)))),N(v,n)}}function q(t,e,s,n,i,o){const a=K.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)?f(s)&&h.push(a.get("length")):(h.push(a.get(H)),c(t)&&h.push(a.get(G)));break;case"delete":r(t)||(h.push(a.get(H)),c(t)&&h.push(a.get(G)));break;case"set":c(t)&&h.push(a.get(H))}z();for(const r of h)r&&D(r,2);V()}const B=t("__proto__,__v_isRef,__isVue"),F=new Set(Object.getOwnPropertyNames(Symbol).filter((t=>"arguments"!==t&&"caller"!==t)).map((t=>Symbol[t])).filter(u)),J=Q();function Q(){const t={};return["includes","indexOf","lastIndexOf"].forEach((e=>{t[e]=function(...t){const s=Dt(this);for(let e=0,i=this.length;e<i;e++)Y(s,0,e+"");const n=s[e](...t);return-1===n||!1===n?s[e](...t.map(Dt)):n}})),["push","pop","shift","unshift","splice"].forEach((e=>{t[e]=function(...t){A(),z();const s=Dt(this)[e].apply(this,t);return V(),W(),s}})),t}function U(t){const e=Dt(this);return Y(e,0,t),e.hasOwnProperty(t)}class X{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)return s===(n?c?xt:jt:c?mt:Ot).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=r(t);if(!n){if(o&&i(J,e))return Reflect.get(J,e,s);if("hasOwnProperty"===e)return U}const h=Reflect.get(t,e,s);return(u(e)?F.has(e):B(e))?h:(n||Y(t,0,e),c?h:Ft(h)?o&&f(e)?h:h.value:a(h)?n?At(h):It(h):h)}}class Z extends X{constructor(t=!1){super(!1,t)}set(t,e,s,n){let c=t[e];if(!this._shallow){const e=Vt(c);if(Nt(s)||Vt(s)||(c=Dt(c),s=Dt(s)),!r(t)&&Ft(c)&&!Ft(s))return!e&&(c.value=s,!0)}const o=r(t)&&f(e)?Number(e)<t.length:i(t,e),u=Reflect.set(t,e,s,n);return t===Dt(n)&&(o?d(s,c)&&q(t,"set",e,s):q(t,"add",e,s)),u}deleteProperty(t,e){const s=i(t,e),n=Reflect.deleteProperty(t,e);return n&&s&&q(t,"delete",e,void 0),n}has(t,e){const s=Reflect.has(t,e);return u(e)&&F.has(e)||Y(t,0,e),s}ownKeys(t){return Y(t,0,r(t)?"length":H),Reflect.ownKeys(t)}}class $ extends X{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=Dt(t=t.__v_raw),r=Dt(e);s||(d(e,r)&&Y(i,0,e),Y(i,0,r));const{has:c}=rt(i),o=n?it:s?Ht:Kt;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=Dt(s),i=Dt(t);return e||(d(t,i)&&Y(n,0,t),Y(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&&Y(Dt(t),0,H),Reflect.get(t,"size",t)}function at(t){t=Dt(t);const e=Dt(this);return rt(e).has.call(e,t)||(e.add(t),q(e,"add",t,t)),this}function ht(t,e){e=Dt(e);const s=Dt(this),{has:n,get:i}=rt(s);let r=n.call(s,t);r||(t=Dt(t),r=n.call(s,t));const c=i.call(s,t);return s.set(t,e),r?d(e,c)&&q(s,"set",t,e):q(s,"add",t,e),this}function lt(t){const e=Dt(this),{has:s,get:n}=rt(e);let i=s.call(e,t);i||(t=Dt(t),i=s.call(e,t)),n&&n.call(e,t);const r=e.delete(t);return i&&q(e,"delete",t,void 0),r}function _t(){const t=Dt(this),e=0!==t.size,s=t.clear();return e&&q(t,"clear",void 0,void 0),s}function ft(t,e){return function(s,n){const i=this,r=i.__v_raw,c=Dt(r),o=e?it:t?Ht:Kt;return!t&&Y(c,0,H),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=Dt(i),o=c(r),u="entries"===t||t===Symbol.iterator&&o,a="keys"===t&&o,h=i[t](...n),l=s?it:e?Ht:Kt;return!e&&Y(r,0,a?G:H),{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:_t,forEach:ft(!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:_t,forEach:ft(!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:ft(!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:ft(!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,Rt]=vt();function bt(t,e){const s=e?t?Rt: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 St={get:bt(!1,!1)},kt={get:bt(!1,!0)},Lt={get:bt(!0,!1)},Et={get:bt(!0,!0)},Ot=new WeakMap,mt=new WeakMap,jt=new WeakMap,xt=new WeakMap;function It(t){return Vt(t)?t:Wt(t,!1,tt,St,Ot)}function Pt(t){return Wt(t,!1,st,kt,mt)}function At(t){return Wt(t,!0,et,Lt,jt)}function Mt(t){return Wt(t,!0,nt,Et,xt)}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}}(_(o));var o;if(0===c)return t;const u=new Proxy(t,2===c?n:s);return i.set(t,u),u}function zt(t){return Vt(t)?zt(t.__v_raw):!(!t||!t.__v_isReactive)}function Vt(t){return!(!t||!t.__v_isReadonly)}function Nt(t){return!(!t||!t.__v_isShallow)}function Tt(t){return zt(t)||Vt(t)}function Dt(t){const e=t&&t.__v_raw;return e?Dt(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 Kt=t=>a(t)?It(t):t,Ht=t=>a(t)?At(t):t;class Gt{constructor(t,e,s,n){this._setter=e,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new S((()=>t(this._value)),(()=>Bt(this,1))),this.effect.computed=this,this.effect.active=this._cacheable=!n,this.__v_isReadonly=s}get value(){const t=Dt(this);return t._cacheable&&!t.effect.dirty||d(t._value,t._value=t.effect.run())&&Bt(t,2),qt(t),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function Yt(t,s,n=!1){let i,r;const c=o(t);c?(i=t,r=e):(i=t.get,r=t.set);return new Gt(i,r,c||!r,n)}function qt(t){x&&v&&(t=Dt(t),N(v,t.dep||(t.dep=C((()=>t.dep=void 0),t instanceof Gt?t:void 0))))}function Bt(t,e=2,s){const n=(t=Dt(t)).dep;n&&D(n,e)}function Ft(t){return!(!t||!0!==t.__v_isRef)}function Jt(t){return Ut(t,!1)}function Qt(t){return Ut(t,!0)}function Ut(t,e){return Ft(t)?t:new Xt(t,e)}class Xt{constructor(t,e){this.__v_isShallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?t:Dt(t),this._value=e?t:Kt(t)}get value(){return qt(this),this._value}set value(t){const e=this.__v_isShallow||Nt(t)||Vt(t);t=e?t:Dt(t),d(t,this._rawValue)&&(this._rawValue=t,this._value=e?t:Kt(t),Bt(this,2))}}function Zt(t){Bt(t,2)}function $t(t){return Ft(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 Ft(i)&&!Ft(s)?(i.value=s,!0):Reflect.set(t,e,s,n)}};function se(t){return zt(t)?t:new Proxy(t,ee)}class ne{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:e,set:s}=t((()=>qt(this)),(()=>Bt(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=Dt(this._object),e=this._key,null==(s=K.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 Ft(t)?t:o(t)?new oe(t):a(t)&&arguments.length>1?ae(t,e,s):Jt(t)}function ae(t,e,s){const n=t[e];return Ft(n)?n:new ce(t,e,s)}const he=Yt,le={GET:"get",HAS:"has",ITERATE:"iterate"},_e={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},fe={SKIP:"__v_skip",IS_REACTIVE:"__v_isReactive",IS_READONLY:"__v_isReadonly",IS_SHALLOW:"__v_isShallow",RAW:"__v_raw"};export{g as EffectScope,H as ITERATE_KEY,S as ReactiveEffect,fe as ReactiveFlags,le as TrackOpTypes,_e as TriggerOpTypes,Yt as computed,ie as customRef,he as deferredComputed,m as effect,y as effectScope,M as enableTracking,R as getCurrentScope,Tt as isProxy,zt as isReactive,Vt as isReadonly,Ft as isRef,Nt as isShallow,Ct as markRaw,b as onScopeDispose,z as pauseScheduling,A as pauseTracking,se as proxyRefs,It as reactive,At as readonly,Jt as ref,V as resetScheduling,W as resetTracking,Pt as shallowReactive,Mt as shallowReadonly,Qt as shallowRef,j as stop,Dt as toRaw,ue as toRef,re as toRefs,te as toValue,Y as track,q as trigger,Zt as triggerRef,$t as unref};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/reactivity v3.4.
|
|
2
|
+
* @vue/reactivity v3.4.14
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -120,7 +120,7 @@ class ReactiveEffect {
|
|
|
120
120
|
/**
|
|
121
121
|
* @internal
|
|
122
122
|
*/
|
|
123
|
-
this._dirtyLevel =
|
|
123
|
+
this._dirtyLevel = 2;
|
|
124
124
|
/**
|
|
125
125
|
* @internal
|
|
126
126
|
*/
|
|
@@ -132,7 +132,7 @@ class ReactiveEffect {
|
|
|
132
132
|
/**
|
|
133
133
|
* @internal
|
|
134
134
|
*/
|
|
135
|
-
this.
|
|
135
|
+
this._shouldSchedule = false;
|
|
136
136
|
/**
|
|
137
137
|
* @internal
|
|
138
138
|
*/
|
|
@@ -141,10 +141,9 @@ class ReactiveEffect {
|
|
|
141
141
|
}
|
|
142
142
|
get dirty() {
|
|
143
143
|
if (this._dirtyLevel === 1) {
|
|
144
|
-
this._dirtyLevel = 0;
|
|
145
|
-
this._queryings++;
|
|
146
144
|
pauseTracking();
|
|
147
|
-
for (
|
|
145
|
+
for (let i = 0; i < this._depsLength; i++) {
|
|
146
|
+
const dep = this.deps[i];
|
|
148
147
|
if (dep.computed) {
|
|
149
148
|
triggerComputed(dep.computed);
|
|
150
149
|
if (this._dirtyLevel >= 2) {
|
|
@@ -152,13 +151,15 @@ class ReactiveEffect {
|
|
|
152
151
|
}
|
|
153
152
|
}
|
|
154
153
|
}
|
|
154
|
+
if (this._dirtyLevel < 2) {
|
|
155
|
+
this._dirtyLevel = 0;
|
|
156
|
+
}
|
|
155
157
|
resetTracking();
|
|
156
|
-
this._queryings--;
|
|
157
158
|
}
|
|
158
159
|
return this._dirtyLevel >= 2;
|
|
159
160
|
}
|
|
160
161
|
set dirty(v) {
|
|
161
|
-
this._dirtyLevel = v ?
|
|
162
|
+
this._dirtyLevel = v ? 2 : 0;
|
|
162
163
|
}
|
|
163
164
|
run() {
|
|
164
165
|
this._dirtyLevel = 0;
|
|
@@ -285,22 +286,24 @@ function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
|
|
|
285
286
|
var _a;
|
|
286
287
|
pauseScheduling();
|
|
287
288
|
for (const effect2 of dep.keys()) {
|
|
288
|
-
if (
|
|
289
|
+
if (dep.get(effect2) !== effect2._trackId) {
|
|
289
290
|
continue;
|
|
290
291
|
}
|
|
291
|
-
if (effect2._dirtyLevel < dirtyLevel && (
|
|
292
|
+
if (effect2._dirtyLevel < dirtyLevel && !(effect2._runnings && !effect2.allowRecurse)) {
|
|
292
293
|
const lastDirtyLevel = effect2._dirtyLevel;
|
|
293
294
|
effect2._dirtyLevel = dirtyLevel;
|
|
294
|
-
if (lastDirtyLevel === 0
|
|
295
|
+
if (lastDirtyLevel === 0) {
|
|
296
|
+
effect2._shouldSchedule = true;
|
|
295
297
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
296
298
|
(_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
|
|
297
299
|
}
|
|
298
300
|
effect2.trigger();
|
|
299
|
-
if (effect2.scheduler) {
|
|
300
|
-
queueEffectSchedulers.push(effect2.scheduler);
|
|
301
|
-
}
|
|
302
301
|
}
|
|
303
302
|
}
|
|
303
|
+
if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse)) {
|
|
304
|
+
effect2._shouldSchedule = false;
|
|
305
|
+
queueEffectSchedulers.push(effect2.scheduler);
|
|
306
|
+
}
|
|
304
307
|
}
|
|
305
308
|
resetScheduling();
|
|
306
309
|
}
|
|
@@ -386,7 +389,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
386
389
|
if (dep) {
|
|
387
390
|
triggerEffects(
|
|
388
391
|
dep,
|
|
389
|
-
|
|
392
|
+
2,
|
|
390
393
|
!!(process.env.NODE_ENV !== "production") ? {
|
|
391
394
|
target,
|
|
392
395
|
type,
|
|
@@ -993,12 +996,12 @@ class ComputedRefImpl {
|
|
|
993
996
|
}
|
|
994
997
|
get value() {
|
|
995
998
|
const self = toRaw(this);
|
|
996
|
-
trackRefValue(self);
|
|
997
999
|
if (!self._cacheable || self.effect.dirty) {
|
|
998
1000
|
if (hasChanged(self._value, self._value = self.effect.run())) {
|
|
999
1001
|
triggerRefValue(self, 2);
|
|
1000
1002
|
}
|
|
1001
1003
|
}
|
|
1004
|
+
trackRefValue(self);
|
|
1002
1005
|
return self._value;
|
|
1003
1006
|
}
|
|
1004
1007
|
set value(newValue) {
|
|
@@ -1051,7 +1054,7 @@ function trackRefValue(ref2) {
|
|
|
1051
1054
|
);
|
|
1052
1055
|
}
|
|
1053
1056
|
}
|
|
1054
|
-
function triggerRefValue(ref2, dirtyLevel =
|
|
1057
|
+
function triggerRefValue(ref2, dirtyLevel = 2, newVal) {
|
|
1055
1058
|
ref2 = toRaw(ref2);
|
|
1056
1059
|
const dep = ref2.dep;
|
|
1057
1060
|
if (dep) {
|
|
@@ -1100,12 +1103,12 @@ class RefImpl {
|
|
|
1100
1103
|
if (hasChanged(newVal, this._rawValue)) {
|
|
1101
1104
|
this._rawValue = newVal;
|
|
1102
1105
|
this._value = useDirectValue ? newVal : toReactive(newVal);
|
|
1103
|
-
triggerRefValue(this,
|
|
1106
|
+
triggerRefValue(this, 2, newVal);
|
|
1104
1107
|
}
|
|
1105
1108
|
}
|
|
1106
1109
|
}
|
|
1107
1110
|
function triggerRef(ref2) {
|
|
1108
|
-
triggerRefValue(ref2,
|
|
1111
|
+
triggerRefValue(ref2, 2, !!(process.env.NODE_ENV !== "production") ? ref2.value : void 0);
|
|
1109
1112
|
}
|
|
1110
1113
|
function unref(ref2) {
|
|
1111
1114
|
return isRef(ref2) ? ref2.value : ref2;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/reactivity v3.4.
|
|
2
|
+
* @vue/reactivity v3.4.14
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -162,7 +162,7 @@ var VueReactivity = (function (exports) {
|
|
|
162
162
|
/**
|
|
163
163
|
* @internal
|
|
164
164
|
*/
|
|
165
|
-
this._dirtyLevel =
|
|
165
|
+
this._dirtyLevel = 2;
|
|
166
166
|
/**
|
|
167
167
|
* @internal
|
|
168
168
|
*/
|
|
@@ -174,7 +174,7 @@ var VueReactivity = (function (exports) {
|
|
|
174
174
|
/**
|
|
175
175
|
* @internal
|
|
176
176
|
*/
|
|
177
|
-
this.
|
|
177
|
+
this._shouldSchedule = false;
|
|
178
178
|
/**
|
|
179
179
|
* @internal
|
|
180
180
|
*/
|
|
@@ -183,10 +183,9 @@ var VueReactivity = (function (exports) {
|
|
|
183
183
|
}
|
|
184
184
|
get dirty() {
|
|
185
185
|
if (this._dirtyLevel === 1) {
|
|
186
|
-
this._dirtyLevel = 0;
|
|
187
|
-
this._queryings++;
|
|
188
186
|
pauseTracking();
|
|
189
|
-
for (
|
|
187
|
+
for (let i = 0; i < this._depsLength; i++) {
|
|
188
|
+
const dep = this.deps[i];
|
|
190
189
|
if (dep.computed) {
|
|
191
190
|
triggerComputed(dep.computed);
|
|
192
191
|
if (this._dirtyLevel >= 2) {
|
|
@@ -194,13 +193,15 @@ var VueReactivity = (function (exports) {
|
|
|
194
193
|
}
|
|
195
194
|
}
|
|
196
195
|
}
|
|
196
|
+
if (this._dirtyLevel < 2) {
|
|
197
|
+
this._dirtyLevel = 0;
|
|
198
|
+
}
|
|
197
199
|
resetTracking();
|
|
198
|
-
this._queryings--;
|
|
199
200
|
}
|
|
200
201
|
return this._dirtyLevel >= 2;
|
|
201
202
|
}
|
|
202
203
|
set dirty(v) {
|
|
203
|
-
this._dirtyLevel = v ?
|
|
204
|
+
this._dirtyLevel = v ? 2 : 0;
|
|
204
205
|
}
|
|
205
206
|
run() {
|
|
206
207
|
this._dirtyLevel = 0;
|
|
@@ -327,22 +328,24 @@ var VueReactivity = (function (exports) {
|
|
|
327
328
|
var _a;
|
|
328
329
|
pauseScheduling();
|
|
329
330
|
for (const effect2 of dep.keys()) {
|
|
330
|
-
if (
|
|
331
|
+
if (dep.get(effect2) !== effect2._trackId) {
|
|
331
332
|
continue;
|
|
332
333
|
}
|
|
333
|
-
if (effect2._dirtyLevel < dirtyLevel && (
|
|
334
|
+
if (effect2._dirtyLevel < dirtyLevel && !(effect2._runnings && !effect2.allowRecurse)) {
|
|
334
335
|
const lastDirtyLevel = effect2._dirtyLevel;
|
|
335
336
|
effect2._dirtyLevel = dirtyLevel;
|
|
336
|
-
if (lastDirtyLevel === 0
|
|
337
|
+
if (lastDirtyLevel === 0) {
|
|
338
|
+
effect2._shouldSchedule = true;
|
|
337
339
|
{
|
|
338
340
|
(_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
|
|
339
341
|
}
|
|
340
342
|
effect2.trigger();
|
|
341
|
-
if (effect2.scheduler) {
|
|
342
|
-
queueEffectSchedulers.push(effect2.scheduler);
|
|
343
|
-
}
|
|
344
343
|
}
|
|
345
344
|
}
|
|
345
|
+
if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse)) {
|
|
346
|
+
effect2._shouldSchedule = false;
|
|
347
|
+
queueEffectSchedulers.push(effect2.scheduler);
|
|
348
|
+
}
|
|
346
349
|
}
|
|
347
350
|
resetScheduling();
|
|
348
351
|
}
|
|
@@ -428,7 +431,7 @@ var VueReactivity = (function (exports) {
|
|
|
428
431
|
if (dep) {
|
|
429
432
|
triggerEffects(
|
|
430
433
|
dep,
|
|
431
|
-
|
|
434
|
+
2,
|
|
432
435
|
{
|
|
433
436
|
target,
|
|
434
437
|
type,
|
|
@@ -1035,12 +1038,12 @@ var VueReactivity = (function (exports) {
|
|
|
1035
1038
|
}
|
|
1036
1039
|
get value() {
|
|
1037
1040
|
const self = toRaw(this);
|
|
1038
|
-
trackRefValue(self);
|
|
1039
1041
|
if (!self._cacheable || self.effect.dirty) {
|
|
1040
1042
|
if (hasChanged(self._value, self._value = self.effect.run())) {
|
|
1041
1043
|
triggerRefValue(self, 2);
|
|
1042
1044
|
}
|
|
1043
1045
|
}
|
|
1046
|
+
trackRefValue(self);
|
|
1044
1047
|
return self._value;
|
|
1045
1048
|
}
|
|
1046
1049
|
set value(newValue) {
|
|
@@ -1093,7 +1096,7 @@ var VueReactivity = (function (exports) {
|
|
|
1093
1096
|
);
|
|
1094
1097
|
}
|
|
1095
1098
|
}
|
|
1096
|
-
function triggerRefValue(ref2, dirtyLevel =
|
|
1099
|
+
function triggerRefValue(ref2, dirtyLevel = 2, newVal) {
|
|
1097
1100
|
ref2 = toRaw(ref2);
|
|
1098
1101
|
const dep = ref2.dep;
|
|
1099
1102
|
if (dep) {
|
|
@@ -1142,12 +1145,12 @@ var VueReactivity = (function (exports) {
|
|
|
1142
1145
|
if (hasChanged(newVal, this._rawValue)) {
|
|
1143
1146
|
this._rawValue = newVal;
|
|
1144
1147
|
this._value = useDirectValue ? newVal : toReactive(newVal);
|
|
1145
|
-
triggerRefValue(this,
|
|
1148
|
+
triggerRefValue(this, 2, newVal);
|
|
1146
1149
|
}
|
|
1147
1150
|
}
|
|
1148
1151
|
}
|
|
1149
1152
|
function triggerRef(ref2) {
|
|
1150
|
-
triggerRefValue(ref2,
|
|
1153
|
+
triggerRefValue(ref2, 2, ref2.value );
|
|
1151
1154
|
}
|
|
1152
1155
|
function unref(ref2) {
|
|
1153
1156
|
return isRef(ref2) ? ref2.value : ref2;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/reactivity v3.4.
|
|
2
|
+
* @vue/reactivity v3.4.14
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
6
|
-
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,i=Object.prototype.hasOwnProperty,r=(t,e)=>i.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++,j();for(const t of this.deps)if(t.computed&&(b(t.computed),this._dirtyLevel>=2))break;x(),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++,S(this),this.fn()}finally{k(this),this._runnings--,g=e,L=t}}stop(){var t;this.active&&(S(this),k(this),null==(t=this.onStop)||t.call(this),this.active=!1)}}function b(t){return t.value}function S(t){t._trackId++,t._depsLength=0}function k(t){if(t.deps&&t.deps.length>t._depsLength){for(let e=t._depsLength;e<t.deps.length;e++)E(t.deps[e],t);t.deps.length=t._depsLength}}function E(t,e){const s=t.get(e);void 0!==s&&e._trackId!==s&&(t.delete(e),0===t.size&&t.cleanup())}let L=!0,m=0;const O=[];function j(){O.push(L),L=!1}function x(){const t=O.pop();L=void 0===t||t}function P(){m++}function T(){for(m--;!m&&A.length;)A.shift()()}function I(t,e,s){if(e.get(t)!==t._trackId){e.set(t,t._trackId);const s=t.deps[t._depsLength];s!==e?(s&&E(s,t),t.deps[t._depsLength++]=e):t._depsLength++}}const A=[];function M(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&&A.push(n.scheduler))}T()}const V=(t,e)=>{const s=new Map;return s.cleanup=t,s.computed=e,s},W=new WeakMap,z=Symbol(""),N=Symbol("");function C(t,e,s){if(L&&g){let e=W.get(t);e||W.set(t,e=new Map);let n=e.get(s);n||e.set(s,n=V((()=>e.delete(s)))),I(g,n)}}function D(t,e,s,n,i,r){const u=W.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(z)),o(t)&&l.push(u.get(N)));break;case"delete":c(t)||(l.push(u.get(z)),o(t)&&l.push(u.get(N)));break;case"set":o(t)&&l.push(u.get(z))}P();for(const c of l)c&&M(c,3);T()}const q=e("__proto__,__v_isRef,__isVue"),K=new Set(Object.getOwnPropertyNames(Symbol).filter((t=>"arguments"!==t&&"caller"!==t)).map((t=>Symbol[t])).filter(a)),H=Y();function Y(){const t={};return["includes","indexOf","lastIndexOf"].forEach((e=>{t[e]=function(...t){const s=Tt(this);for(let e=0,i=this.length;e<i;e++)C(s,0,e+"");const n=s[e](...t);return-1===n||!1===n?s[e](...t.map(Tt)):n}})),["push","pop","shift","unshift","splice"].forEach((e=>{t[e]=function(...t){j(),P();const s=Tt(this)[e].apply(this,t);return T(),x(),s}})),t}function F(t){const e=Tt(this);return C(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,i=this._shallow;if("__v_isReactive"===e)return!n;if("__v_isReadonly"===e)return n;if("__v_isShallow"===e)return i;if("__v_raw"===e)return s===(n?i?Et:kt:i?St:bt).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=c(t);if(!n){if(o&&r(H,e))return Reflect.get(H,e,s);if("hasOwnProperty"===e)return F}const u=Reflect.get(t,e,s);return(a(e)?K.has(e):q(e))?u:(n||C(t,0,e),i?u:Nt(u)?o&&d(e)?u:u.value:l(u)?n?mt(u):Lt(u):u)}}class B extends G{constructor(t=!1){super(!1,t)}set(t,e,s,n){let i=t[e];if(!this._shallow){const e=xt(i);if(Pt(s)||xt(s)||(i=Tt(i),s=Tt(s)),!c(t)&&Nt(i)&&!Nt(s))return!e&&(i.value=s,!0)}const o=c(t)&&d(e)?Number(e)<t.length:r(t,e),u=Reflect.set(t,e,s,n);return t===Tt(n)&&(o?p(s,i)&&D(t,"set",e,s):D(t,"add",e,s)),u}deleteProperty(t,e){const s=r(t,e),n=Reflect.deleteProperty(t,e);return n&&s&&D(t,"delete",e,void 0),n}has(t,e){const s=Reflect.has(t,e);return a(e)&&K.has(e)||C(t,0,e),s}ownKeys(t){return C(t,0,c(t)?"length":z),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 B,U=new J,X=new B(!0),Z=new J(!0),$=t=>t,tt=t=>Reflect.getPrototypeOf(t);function et(t,e,s=!1,n=!1){const i=Tt(t=t.__v_raw),r=Tt(e);s||(p(e,r)&&C(i,0,e),C(i,0,r));const{has:c}=tt(i),o=n?$:s?At:It;return c.call(i,e)?o(t.get(e)):c.call(i,r)?o(t.get(r)):void(t!==i&&t.get(e))}function st(t,e=!1){const s=this.__v_raw,n=Tt(s),i=Tt(t);return e||(p(t,i)&&C(n,0,t),C(n,0,i)),t===i?s.has(t):s.has(t)||s.has(i)}function nt(t,e=!1){return t=t.__v_raw,!e&&C(Tt(t),0,z),Reflect.get(t,"size",t)}function it(t){t=Tt(t);const e=Tt(this);return tt(e).has.call(e,t)||(e.add(t),D(e,"add",t,t)),this}function rt(t,e){e=Tt(e);const s=Tt(this),{has:n,get:i}=tt(s);let r=n.call(s,t);r||(t=Tt(t),r=n.call(s,t));const c=i.call(s,t);return s.set(t,e),r?p(e,c)&&D(s,"set",t,e):D(s,"add",t,e),this}function ct(t){const e=Tt(this),{has:s,get:n}=tt(e);let i=s.call(e,t);i||(t=Tt(t),i=s.call(e,t)),n&&n.call(e,t);const r=e.delete(t);return i&&D(e,"delete",t,void 0),r}function ot(){const t=Tt(this),e=0!==t.size,s=t.clear();return e&&D(t,"clear",void 0,void 0),s}function ut(t,e){return function(s,n){const i=this,r=i.__v_raw,c=Tt(r),o=e?$:t?At:It;return!t&&C(c,0,z),r.forEach(((t,e)=>s.call(n,o(t),o(e),i)))}}function at(t,e,s){return function(...n){const i=this.__v_raw,r=Tt(i),c=o(r),u="entries"===t||t===Symbol.iterator&&c,a="keys"===t&&c,l=i[t](...n),h=s?$:e?At:It;return!e&&C(r,0,a?N:z),{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&&("clear"===t?void 0:this)}}function ht(){const t={get(t){return et(this,t)},get size(){return nt(this)},has:st,add:it,set:rt,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:it,set:rt,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((i=>{t[i]=at(i,!1,!1),s[i]=at(i,!0,!1),e[i]=at(i,!1,!0),n[i]=at(i,!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,i)=>"__v_isReactive"===n?!t:"__v_isReadonly"===n?t:"__v_raw"===n?e:Reflect.get(r(s,n)&&n in e?s:e,n,i)}const gt={get:vt(!1,!1)},yt={get:vt(!1,!0)},wt={get:vt(!0,!1)},Rt={get:vt(!0,!0)},bt=new WeakMap,St=new WeakMap,kt=new WeakMap,Et=new WeakMap;function Lt(t){return xt(t)?t:Ot(t,!1,Q,gt,bt)}function mt(t){return Ot(t,!0,U,wt,kt)}function Ot(t,e,s,n,i){if(!l(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}}(_(o));var o;if(0===c)return t;const u=new Proxy(t,2===c?n:s);return i.set(t,u),u}function jt(t){return xt(t)?jt(t.__v_raw):!(!t||!t.__v_isReactive)}function xt(t){return!(!t||!t.__v_isReadonly)}function Pt(t){return!(!t||!t.__v_isShallow)}function Tt(t){const e=t&&t.__v_raw;return e?Tt(e):t}const It=t=>l(t)?Lt(t):t,At=t=>l(t)?mt(t):t;class Mt{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)),(()=>zt(this,1))),this.effect.computed=this,this.effect.active=this._cacheable=!n,this.__v_isReadonly=s}get value(){const t=Tt(this);return Wt(t),t._cacheable&&!t.effect.dirty||p(t._value,t._value=t.effect.run())&&zt(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function Vt(t,e,n=!1){let i,r;const c=u(t);c?(i=t,r=s):(i=t.get,r=t.set);return new Mt(i,r,c||!r,n)}function Wt(t){L&&g&&(t=Tt(t),I(g,t.dep||(t.dep=V((()=>t.dep=void 0),t instanceof Mt?t:void 0))))}function zt(t,e=3,s){const n=(t=Tt(t)).dep;n&&M(n,e)}function Nt(t){return!(!t||!0!==t.__v_isRef)}function Ct(t){return Dt(t,!1)}function Dt(t,e){return Nt(t)?t:new qt(t,e)}class qt{constructor(t,e){this.__v_isShallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?t:Tt(t),this._value=e?t:It(t)}get value(){return Wt(this),this._value}set value(t){const e=this.__v_isShallow||Pt(t)||xt(t);t=e?t:Tt(t),p(t,this._rawValue)&&(this._rawValue=t,this._value=e?t:It(t),zt(this,3))}}function Kt(t){return Nt(t)?t.value:t}const Ht={get:(t,e,s)=>Kt(Reflect.get(t,e,s)),set:(t,e,s,n)=>{const i=t[e];return Nt(i)&&!Nt(s)?(i.value=s,!0):Reflect.set(t,e,s,n)}};class Yt{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:e,set:s}=t((()=>Wt(this)),(()=>zt(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=Tt(this._object),e=this._key,null==(s=W.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 Bt(t,e,s){const n=t[e];return Nt(n)?n:new Ft(t,e,s)}const Jt=Vt;return t.EffectScope=y,t.ITERATE_KEY=z,t.ReactiveEffect=R,t.ReactiveFlags={SKIP:"__v_skip",IS_REACTIVE:"__v_isReactive",IS_READONLY:"__v_isReadonly",IS_SHALLOW:"__v_isShallow",RAW:"__v_raw"},t.TrackOpTypes={GET:"get",HAS:"has",ITERATE:"iterate"},t.TriggerOpTypes={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},t.computed=Vt,t.customRef=function(t){return new Yt(t)},t.deferredComputed=Jt,t.effect=function(t,e){t.effect instanceof R&&(t=t.effect.fn);const i=new R(t,s,(()=>{i.dirty&&i.run()}));e&&(n(i,e),e.scope&&w(i,e.scope)),e&&e.lazy||i.run();const r=i.run.bind(i);return r.effect=i,r},t.effectScope=function(t){return new y(t)},t.enableTracking=function(){O.push(L),L=!0},t.getCurrentScope=function(){return v},t.isProxy=function(t){return jt(t)||xt(t)},t.isReactive=jt,t.isReadonly=xt,t.isRef=Nt,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=j,t.proxyRefs=function(t){return jt(t)?t:new Proxy(t,Ht)},t.reactive=Lt,t.readonly=mt,t.ref=Ct,t.resetScheduling=T,t.resetTracking=x,t.shallowReactive=function(t){return Ot(t,!1,X,yt,St)},t.shallowReadonly=function(t){return Ot(t,!0,Z,Rt,Et)},t.shallowRef=function(t){return Dt(t,!0)},t.stop=function(t){t.effect.stop()},t.toRaw=Tt,t.toRef=function(t,e,s){return Nt(t)?t:u(t)?new Gt(t):l(t)&&arguments.length>1?Bt(t,e,s):Ct(t)},t.toRefs=function(t){const e=c(t)?new Array(t.length):{};for(const s in t)e[s]=Bt(t,s);return e},t.toValue=function(t){return u(t)?t():Kt(t)},t.track=C,t.trigger=D,t.triggerRef=function(t){zt(t,3)},t.unref=Kt,t}({});
|
|
6
|
+
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,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=2,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,w(this,n)}get dirty(){if(1===this._dirtyLevel){j();for(let t=0;t<this._depsLength;t++){const e=this.deps[t];if(e.computed&&(b(e.computed),this._dirtyLevel>=2))break}this._dirtyLevel<2&&(this._dirtyLevel=0),x()}return this._dirtyLevel>=2}set dirty(t){this._dirtyLevel=t?2:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=L,e=g;try{return L=!0,g=this,this._runnings++,S(this),this.fn()}finally{k(this),this._runnings--,g=e,L=t}}stop(){var t;this.active&&(S(this),k(this),null==(t=this.onStop)||t.call(this),this.active=!1)}}function b(t){return t.value}function S(t){t._trackId++,t._depsLength=0}function k(t){if(t.deps&&t.deps.length>t._depsLength){for(let e=t._depsLength;e<t.deps.length;e++)E(t.deps[e],t);t.deps.length=t._depsLength}}function E(t,e){const s=t.get(e);void 0!==s&&e._trackId!==s&&(t.delete(e),0===t.size&&t.cleanup())}let L=!0,m=0;const O=[];function j(){O.push(L),L=!1}function x(){const t=O.pop();L=void 0===t||t}function I(){m++}function P(){for(m--;!m&&A.length;)A.shift()()}function T(t,e,s){if(e.get(t)!==t._trackId){e.set(t,t._trackId);const s=t.deps[t._depsLength];s!==e?(s&&E(s,t),t.deps[t._depsLength++]=e):t._depsLength++}}const A=[];function M(t,e,s){I();for(const n of t.keys())if(t.get(n)===n._trackId){if(n._dirtyLevel<e&&(!n._runnings||n.allowRecurse)){const t=n._dirtyLevel;n._dirtyLevel=e,0===t&&(n._shouldSchedule=!0,n.trigger())}n.scheduler&&n._shouldSchedule&&(!n._runnings||n.allowRecurse)&&(n._shouldSchedule=!1,A.push(n.scheduler))}P()}const V=(t,e)=>{const s=new Map;return s.cleanup=t,s.computed=e,s},W=new WeakMap,z=Symbol(""),N=Symbol("");function C(t,e,s){if(L&&g){let e=W.get(t);e||W.set(t,e=new Map);let n=e.get(s);n||e.set(s,n=V((()=>e.delete(s)))),T(g,n)}}function D(t,e,s,n,r,i){const u=W.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(z)),o(t)&&l.push(u.get(N)));break;case"delete":c(t)||(l.push(u.get(z)),o(t)&&l.push(u.get(N)));break;case"set":o(t)&&l.push(u.get(z))}I();for(const c of l)c&&M(c,2);P()}const K=e("__proto__,__v_isRef,__isVue"),H=new Set(Object.getOwnPropertyNames(Symbol).filter((t=>"arguments"!==t&&"caller"!==t)).map((t=>Symbol[t])).filter(a)),Y=F();function F(){const t={};return["includes","indexOf","lastIndexOf"].forEach((e=>{t[e]=function(...t){const s=Pt(this);for(let e=0,r=this.length;e<r;e++)C(s,0,e+"");const n=s[e](...t);return-1===n||!1===n?s[e](...t.map(Pt)):n}})),["push","pop","shift","unshift","splice"].forEach((e=>{t[e]=function(...t){j(),I();const s=Pt(this)[e].apply(this,t);return P(),x(),s}})),t}function G(t){const e=Pt(this);return C(e,0,t),e.hasOwnProperty(t)}class q{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)return s===(n?r?Et:kt:r?St:bt).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=c(t);if(!n){if(o&&i(Y,e))return Reflect.get(Y,e,s);if("hasOwnProperty"===e)return G}const u=Reflect.get(t,e,s);return(a(e)?H.has(e):K(e))?u:(n||C(t,0,e),r?u:Nt(u)?o&&d(e)?u:u.value:l(u)?n?mt(u):Lt(u):u)}}class B extends q{constructor(t=!1){super(!1,t)}set(t,e,s,n){let r=t[e];if(!this._shallow){const e=xt(r);if(It(s)||xt(s)||(r=Pt(r),s=Pt(s)),!c(t)&&Nt(r)&&!Nt(s))return!e&&(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===Pt(n)&&(o?p(s,r)&&D(t,"set",e,s):D(t,"add",e,s)),u}deleteProperty(t,e){const s=i(t,e),n=Reflect.deleteProperty(t,e);return n&&s&&D(t,"delete",e,void 0),n}has(t,e){const s=Reflect.has(t,e);return a(e)&&H.has(e)||C(t,0,e),s}ownKeys(t){return C(t,0,c(t)?"length":z),Reflect.ownKeys(t)}}class J extends q{constructor(t=!1){super(!0,t)}set(t,e){return!0}deleteProperty(t,e){return!0}}const Q=new B,U=new J,X=new B(!0),Z=new J(!0),$=t=>t,tt=t=>Reflect.getPrototypeOf(t);function et(t,e,s=!1,n=!1){const r=Pt(t=t.__v_raw),i=Pt(e);s||(p(e,i)&&C(r,0,e),C(r,0,i));const{has:c}=tt(r),o=n?$:s?At:Tt;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=Pt(s),r=Pt(t);return e||(p(t,r)&&C(n,0,t),C(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&&C(Pt(t),0,z),Reflect.get(t,"size",t)}function rt(t){t=Pt(t);const e=Pt(this);return tt(e).has.call(e,t)||(e.add(t),D(e,"add",t,t)),this}function it(t,e){e=Pt(e);const s=Pt(this),{has:n,get:r}=tt(s);let i=n.call(s,t);i||(t=Pt(t),i=n.call(s,t));const c=r.call(s,t);return s.set(t,e),i?p(e,c)&&D(s,"set",t,e):D(s,"add",t,e),this}function ct(t){const e=Pt(this),{has:s,get:n}=tt(e);let r=s.call(e,t);r||(t=Pt(t),r=s.call(e,t)),n&&n.call(e,t);const i=e.delete(t);return r&&D(e,"delete",t,void 0),i}function ot(){const t=Pt(this),e=0!==t.size,s=t.clear();return e&&D(t,"clear",void 0,void 0),s}function ut(t,e){return function(s,n){const r=this,i=r.__v_raw,c=Pt(i),o=e?$:t?At:Tt;return!t&&C(c,0,z),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=Pt(r),c=o(i),u="entries"===t||t===Symbol.iterator&&c,a="keys"===t&&c,l=r[t](...n),h=s?$:e?At:Tt;return!e&&C(i,0,a?N:z),{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&&("clear"===t?void 0: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,St=new WeakMap,kt=new WeakMap,Et=new WeakMap;function Lt(t){return xt(t)?t:Ot(t,!1,Q,gt,bt)}function mt(t){return Ot(t,!0,U,wt,kt)}function Ot(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 jt(t){return xt(t)?jt(t.__v_raw):!(!t||!t.__v_isReactive)}function xt(t){return!(!t||!t.__v_isReadonly)}function It(t){return!(!t||!t.__v_isShallow)}function Pt(t){const e=t&&t.__v_raw;return e?Pt(e):t}const Tt=t=>l(t)?Lt(t):t,At=t=>l(t)?mt(t):t;class Mt{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)),(()=>zt(this,1))),this.effect.computed=this,this.effect.active=this._cacheable=!n,this.__v_isReadonly=s}get value(){const t=Pt(this);return t._cacheable&&!t.effect.dirty||p(t._value,t._value=t.effect.run())&&zt(t,2),Wt(t),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function Vt(t,e,n=!1){let r,i;const c=u(t);c?(r=t,i=s):(r=t.get,i=t.set);return new Mt(r,i,c||!i,n)}function Wt(t){L&&g&&(t=Pt(t),T(g,t.dep||(t.dep=V((()=>t.dep=void 0),t instanceof Mt?t:void 0))))}function zt(t,e=2,s){const n=(t=Pt(t)).dep;n&&M(n,e)}function Nt(t){return!(!t||!0!==t.__v_isRef)}function Ct(t){return Dt(t,!1)}function Dt(t,e){return Nt(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:Pt(t),this._value=e?t:Tt(t)}get value(){return Wt(this),this._value}set value(t){const e=this.__v_isShallow||It(t)||xt(t);t=e?t:Pt(t),p(t,this._rawValue)&&(this._rawValue=t,this._value=e?t:Tt(t),zt(this,2))}}function Ht(t){return Nt(t)?t.value:t}const Yt={get:(t,e,s)=>Ht(Reflect.get(t,e,s)),set:(t,e,s,n)=>{const r=t[e];return Nt(r)&&!Nt(s)?(r.value=s,!0):Reflect.set(t,e,s,n)}};class Ft{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:e,set:s}=t((()=>Wt(this)),(()=>zt(this)));this._get=e,this._set=s}get value(){return this._get()}set value(t){this._set(t)}}class Gt{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=Pt(this._object),e=this._key,null==(s=W.get(t))?void 0:s.get(e);var t,e,s}}class qt{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Bt(t,e,s){const n=t[e];return Nt(n)?n:new Gt(t,e,s)}const Jt=Vt;return t.EffectScope=y,t.ITERATE_KEY=z,t.ReactiveEffect=R,t.ReactiveFlags={SKIP:"__v_skip",IS_REACTIVE:"__v_isReactive",IS_READONLY:"__v_isReadonly",IS_SHALLOW:"__v_isShallow",RAW:"__v_raw"},t.TrackOpTypes={GET:"get",HAS:"has",ITERATE:"iterate"},t.TriggerOpTypes={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},t.computed=Vt,t.customRef=function(t){return new Ft(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(){O.push(L),L=!0},t.getCurrentScope=function(){return v},t.isProxy=function(t){return jt(t)||xt(t)},t.isReactive=jt,t.isReadonly=xt,t.isRef=Nt,t.isShallow=It,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=I,t.pauseTracking=j,t.proxyRefs=function(t){return jt(t)?t:new Proxy(t,Yt)},t.reactive=Lt,t.readonly=mt,t.ref=Ct,t.resetScheduling=P,t.resetTracking=x,t.shallowReactive=function(t){return Ot(t,!1,X,yt,St)},t.shallowReadonly=function(t){return Ot(t,!0,Z,Rt,Et)},t.shallowRef=function(t){return Dt(t,!0)},t.stop=function(t){t.effect.stop()},t.toRaw=Pt,t.toRef=function(t,e,s){return Nt(t)?t:u(t)?new qt(t):l(t)&&arguments.length>1?Bt(t,e,s):Ct(t)},t.toRefs=function(t){const e=c(t)?new Array(t.length):{};for(const s in t)e[s]=Bt(t,s);return e},t.toValue=function(t){return u(t)?t():Ht(t)},t.track=C,t.trigger=D,t.triggerRef=function(t){zt(t,2)},t.unref=Ht,t}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/reactivity",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.14",
|
|
4
4
|
"description": "@vue/reactivity",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/reactivity.esm-bundler.js",
|
|
@@ -50,6 +50,6 @@
|
|
|
50
50
|
},
|
|
51
51
|
"homepage": "https://github.com/vuejs/core/tree/main/packages/reactivity#readme",
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@vue/shared": "3.4.
|
|
53
|
+
"@vue/shared": "3.4.14"
|
|
54
54
|
}
|
|
55
55
|
}
|