@solidjs/signals 0.9.0 → 0.9.2
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/dev.js +109 -48
- package/dist/node.cjs +598 -546
- package/dist/prod.js +398 -351
- package/dist/types/core/core.d.ts +1 -0
- package/dist/types/core/scheduler.d.ts +6 -0
- package/package.json +1 -1
package/dist/prod.js
CHANGED
|
@@ -40,56 +40,56 @@ function actualInsertIntoHeap(e, t) {
|
|
|
40
40
|
if (r === undefined) t.l[i] = e;
|
|
41
41
|
else {
|
|
42
42
|
const t = r.T;
|
|
43
|
-
t.
|
|
43
|
+
t.R = e;
|
|
44
44
|
e.T = t;
|
|
45
45
|
r.T = e;
|
|
46
46
|
}
|
|
47
|
-
if (i > t.
|
|
47
|
+
if (i > t.h) t.h = i;
|
|
48
48
|
}
|
|
49
49
|
function insertIntoHeap(e, t) {
|
|
50
|
-
let n = e.
|
|
50
|
+
let n = e.S;
|
|
51
51
|
if (n & (REACTIVE_IN_HEAP | REACTIVE_RECOMPUTING_DEPS)) return;
|
|
52
52
|
if (n & REACTIVE_CHECK) {
|
|
53
|
-
e.
|
|
54
|
-
} else e.
|
|
53
|
+
e.S = (n & -4) | REACTIVE_DIRTY | REACTIVE_IN_HEAP;
|
|
54
|
+
} else e.S = n | REACTIVE_IN_HEAP;
|
|
55
55
|
if (!(n & REACTIVE_IN_HEAP_HEIGHT)) actualInsertIntoHeap(e, t);
|
|
56
56
|
}
|
|
57
57
|
function insertIntoHeapHeight(e, t) {
|
|
58
|
-
let n = e.
|
|
58
|
+
let n = e.S;
|
|
59
59
|
if (n & (REACTIVE_IN_HEAP | REACTIVE_RECOMPUTING_DEPS | REACTIVE_IN_HEAP_HEIGHT)) return;
|
|
60
|
-
e.
|
|
60
|
+
e.S = n | REACTIVE_IN_HEAP_HEIGHT;
|
|
61
61
|
actualInsertIntoHeap(e, t);
|
|
62
62
|
}
|
|
63
63
|
function deleteFromHeap(e, t) {
|
|
64
|
-
const n = e.
|
|
64
|
+
const n = e.S;
|
|
65
65
|
if (!(n & (REACTIVE_IN_HEAP | REACTIVE_IN_HEAP_HEIGHT))) return;
|
|
66
|
-
e.
|
|
66
|
+
e.S = n & -25;
|
|
67
67
|
const i = e.o;
|
|
68
68
|
if (e.T === e) t.l[i] = undefined;
|
|
69
69
|
else {
|
|
70
|
-
const n = e.
|
|
70
|
+
const n = e.R;
|
|
71
71
|
const r = t.l[i];
|
|
72
72
|
const s = n ?? r;
|
|
73
73
|
if (e === r) t.l[i] = n;
|
|
74
|
-
else e.T.
|
|
74
|
+
else e.T.R = n;
|
|
75
75
|
s.T = e.T;
|
|
76
76
|
}
|
|
77
77
|
e.T = e;
|
|
78
|
-
e.
|
|
78
|
+
e.R = undefined;
|
|
79
79
|
}
|
|
80
80
|
function markHeap(e) {
|
|
81
|
-
if (e.
|
|
82
|
-
e.
|
|
83
|
-
for (let t = 0; t <= e.
|
|
84
|
-
for (let n = e.l[t]; n !== undefined; n = n.
|
|
85
|
-
if (n.
|
|
81
|
+
if (e._) return;
|
|
82
|
+
e._ = true;
|
|
83
|
+
for (let t = 0; t <= e.h; t++) {
|
|
84
|
+
for (let n = e.l[t]; n !== undefined; n = n.R) {
|
|
85
|
+
if (n.S & REACTIVE_IN_HEAP) markNode(n);
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
function markNode(e, t = REACTIVE_DIRTY) {
|
|
90
|
-
const n = e.
|
|
90
|
+
const n = e.S;
|
|
91
91
|
if ((n & (REACTIVE_CHECK | REACTIVE_DIRTY)) >= t) return;
|
|
92
|
-
e.
|
|
92
|
+
e.S = (n & -4) | t;
|
|
93
93
|
for (let t = e.O; t !== null; t = t.p) {
|
|
94
94
|
markNode(t.A, REACTIVE_CHECK);
|
|
95
95
|
}
|
|
@@ -102,24 +102,24 @@ function markNode(e, t = REACTIVE_DIRTY) {
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
function runHeap(e, t) {
|
|
105
|
-
e.
|
|
106
|
-
for (e.C = 0; e.C <= e.
|
|
105
|
+
e._ = false;
|
|
106
|
+
for (e.C = 0; e.C <= e.h; e.C++) {
|
|
107
107
|
let n = e.l[e.C];
|
|
108
108
|
while (n !== undefined) {
|
|
109
|
-
if (n.
|
|
109
|
+
if (n.S & REACTIVE_IN_HEAP) t(n);
|
|
110
110
|
else adjustHeight(n, e);
|
|
111
111
|
n = e.l[e.C];
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
e.
|
|
114
|
+
e.h = 0;
|
|
115
115
|
}
|
|
116
116
|
function adjustHeight(e, t) {
|
|
117
117
|
deleteFromHeap(e, t);
|
|
118
118
|
let n = e.o;
|
|
119
119
|
for (let t = e.D; t; t = t.P) {
|
|
120
120
|
const e = t.V;
|
|
121
|
-
const i = e.
|
|
122
|
-
if (i.
|
|
121
|
+
const i = e.m || e;
|
|
122
|
+
if (i.U && i.o >= n) n = i.o + 1;
|
|
123
123
|
}
|
|
124
124
|
if (e.o !== n) {
|
|
125
125
|
e.o = n;
|
|
@@ -129,8 +129,9 @@ function adjustHeight(e, t) {
|
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
const transitions = new Set();
|
|
132
|
-
|
|
133
|
-
const
|
|
132
|
+
let optimisticRun = false;
|
|
133
|
+
const dirtyQueue = { l: new Array(2e3).fill(undefined), _: false, C: 0, h: 0 };
|
|
134
|
+
const zombieQueue = { l: new Array(2e3).fill(undefined), _: false, C: 0, h: 0 };
|
|
134
135
|
let clock = 0;
|
|
135
136
|
let activeTransition = null;
|
|
136
137
|
let scheduled = false;
|
|
@@ -200,40 +201,34 @@ class Queue {
|
|
|
200
201
|
class GlobalQueue extends Queue {
|
|
201
202
|
k = false;
|
|
202
203
|
$ = [];
|
|
203
|
-
|
|
204
|
+
L = [];
|
|
204
205
|
static F;
|
|
206
|
+
static W;
|
|
205
207
|
flush() {
|
|
206
208
|
if (this.k) return;
|
|
207
209
|
this.k = true;
|
|
208
210
|
try {
|
|
209
|
-
runHeap(dirtyQueue, GlobalQueue.
|
|
211
|
+
runHeap(dirtyQueue, GlobalQueue.F);
|
|
210
212
|
if (activeTransition) {
|
|
211
213
|
if (!transitionComplete(activeTransition)) {
|
|
212
|
-
|
|
214
|
+
let e = activeTransition;
|
|
215
|
+
runHeap(zombieQueue, GlobalQueue.F);
|
|
213
216
|
this.$ = [];
|
|
214
217
|
this.stashQueues(activeTransition.queueStash);
|
|
215
218
|
clock++;
|
|
216
219
|
scheduled = false;
|
|
217
|
-
|
|
220
|
+
runTransitionPending(activeTransition.pendingNodes, true);
|
|
218
221
|
activeTransition = null;
|
|
222
|
+
runOptimistic(e);
|
|
219
223
|
return;
|
|
220
224
|
}
|
|
221
225
|
this.$.push(...activeTransition.pendingNodes);
|
|
222
226
|
this.restoreQueues(activeTransition.queueStash);
|
|
223
227
|
transitions.delete(activeTransition);
|
|
224
228
|
activeTransition = null;
|
|
225
|
-
|
|
226
|
-
} else if (transitions.size) runHeap(zombieQueue, GlobalQueue.
|
|
227
|
-
|
|
228
|
-
const t = this.$[e];
|
|
229
|
-
if (t.W !== NOT_PENDING) {
|
|
230
|
-
t.j = t.W;
|
|
231
|
-
t.W = NOT_PENDING;
|
|
232
|
-
if (t.K) t.M = true;
|
|
233
|
-
}
|
|
234
|
-
if (t.m) GlobalQueue.F(t, false, true);
|
|
235
|
-
}
|
|
236
|
-
this.$.length = 0;
|
|
229
|
+
runTransitionPending(this.$, false);
|
|
230
|
+
} else if (transitions.size) runHeap(zombieQueue, GlobalQueue.F);
|
|
231
|
+
runOptimistic();
|
|
237
232
|
clock++;
|
|
238
233
|
scheduled = false;
|
|
239
234
|
this.run(EFFECT_RENDER);
|
|
@@ -245,8 +240,8 @@ class GlobalQueue extends Queue {
|
|
|
245
240
|
notify(e, t, n) {
|
|
246
241
|
if (t & STATUS_PENDING) {
|
|
247
242
|
if (n & STATUS_PENDING) {
|
|
248
|
-
if (activeTransition && !activeTransition.asyncNodes.includes(e.
|
|
249
|
-
activeTransition.asyncNodes.push(e.
|
|
243
|
+
if (activeTransition && !activeTransition.asyncNodes.includes(e.j.cause)) {
|
|
244
|
+
activeTransition.asyncNodes.push(e.j.cause);
|
|
250
245
|
schedule();
|
|
251
246
|
}
|
|
252
247
|
}
|
|
@@ -257,40 +252,78 @@ class GlobalQueue extends Queue {
|
|
|
257
252
|
initTransition(e) {
|
|
258
253
|
if (activeTransition && activeTransition.time === clock) return;
|
|
259
254
|
if (!activeTransition) {
|
|
260
|
-
activeTransition = e.
|
|
255
|
+
activeTransition = e.K ?? {
|
|
261
256
|
time: clock,
|
|
262
257
|
pendingNodes: [],
|
|
263
258
|
asyncNodes: [],
|
|
264
|
-
|
|
259
|
+
optimisticNodes: [],
|
|
260
|
+
queueStash: { G: [[], []], H: [] },
|
|
261
|
+
done: false
|
|
265
262
|
};
|
|
266
263
|
}
|
|
267
264
|
transitions.add(activeTransition);
|
|
268
265
|
activeTransition.time = clock;
|
|
269
266
|
for (let e = 0; e < this.$.length; e++) {
|
|
270
267
|
const t = this.$[e];
|
|
271
|
-
t.
|
|
268
|
+
t.K = activeTransition;
|
|
272
269
|
activeTransition.pendingNodes.push(t);
|
|
273
270
|
}
|
|
271
|
+
for (let e = 0; e < this.L.length; e++) {
|
|
272
|
+
const t = this.L[e];
|
|
273
|
+
t.K = activeTransition;
|
|
274
|
+
activeTransition.optimisticNodes.push(t);
|
|
275
|
+
}
|
|
274
276
|
this.$ = activeTransition.pendingNodes;
|
|
277
|
+
this.L = activeTransition.optimisticNodes;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
function notifySubs(e) {
|
|
281
|
+
for (let t = e.O; t !== null; t = t.p) {
|
|
282
|
+
const e = t.A.S & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
|
|
283
|
+
if (e.C > t.A.o) e.C = t.A.o;
|
|
284
|
+
insertIntoHeap(t.A, e);
|
|
275
285
|
}
|
|
276
286
|
}
|
|
277
|
-
function
|
|
278
|
-
let
|
|
279
|
-
const
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
if (
|
|
284
|
-
|
|
285
|
-
|
|
287
|
+
function runOptimistic(e = null) {
|
|
288
|
+
let t = !e;
|
|
289
|
+
const n = globalQueue.L;
|
|
290
|
+
optimisticRun = true;
|
|
291
|
+
for (let t = 0; t < n.length; t++) {
|
|
292
|
+
const i = n[t];
|
|
293
|
+
if (!e && (!i.K || i.K.done) && i.M !== NOT_PENDING) {
|
|
294
|
+
i.Y = i.M;
|
|
295
|
+
i.M = NOT_PENDING;
|
|
286
296
|
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
297
|
+
i.K = e;
|
|
298
|
+
notifySubs(i);
|
|
299
|
+
}
|
|
300
|
+
globalQueue.L = [];
|
|
301
|
+
if (dirtyQueue.h >= dirtyQueue.C) {
|
|
302
|
+
t = true;
|
|
303
|
+
runHeap(dirtyQueue, GlobalQueue.F);
|
|
304
|
+
}
|
|
305
|
+
optimisticRun = false;
|
|
306
|
+
t && runPending(globalQueue.$);
|
|
307
|
+
}
|
|
308
|
+
function runPending(e) {
|
|
309
|
+
for (let t = 0; t < e.length; t++) {
|
|
310
|
+
const n = e[t];
|
|
311
|
+
if (n.M !== NOT_PENDING) {
|
|
312
|
+
n.Y = n.M;
|
|
313
|
+
n.M = NOT_PENDING;
|
|
314
|
+
if (n.B) n.X = true;
|
|
291
315
|
}
|
|
316
|
+
if (n.U) GlobalQueue.W(n, false, true);
|
|
317
|
+
}
|
|
318
|
+
e.length = 0;
|
|
319
|
+
}
|
|
320
|
+
function runTransitionPending(e, t) {
|
|
321
|
+
const n = e.slice();
|
|
322
|
+
for (let e = 0; e < n.length; e++) {
|
|
323
|
+
const i = n[e];
|
|
324
|
+
i.K = activeTransition;
|
|
325
|
+
if (i.q) i.q.Z(t);
|
|
292
326
|
}
|
|
293
|
-
return n;
|
|
294
327
|
}
|
|
295
328
|
const globalQueue = new GlobalQueue();
|
|
296
329
|
function flush() {
|
|
@@ -302,6 +335,7 @@ function runQueue(e, t) {
|
|
|
302
335
|
for (let n = 0; n < e.length; n++) e[n](t);
|
|
303
336
|
}
|
|
304
337
|
function transitionComplete(e) {
|
|
338
|
+
if (e.done) return true;
|
|
305
339
|
let t = true;
|
|
306
340
|
for (let n = 0; n < e.asyncNodes.length; n++) {
|
|
307
341
|
if (e.asyncNodes[n].J & STATUS_PENDING) {
|
|
@@ -309,35 +343,29 @@ function transitionComplete(e) {
|
|
|
309
343
|
break;
|
|
310
344
|
}
|
|
311
345
|
}
|
|
346
|
+
t && (e.done = true);
|
|
312
347
|
return t;
|
|
313
348
|
}
|
|
314
349
|
function runInTransition(e, t) {
|
|
315
350
|
const n = activeTransition;
|
|
316
|
-
activeTransition = e.
|
|
351
|
+
activeTransition = e.K;
|
|
317
352
|
t(e);
|
|
318
353
|
activeTransition = n;
|
|
319
354
|
}
|
|
320
|
-
GlobalQueue.
|
|
321
|
-
GlobalQueue.
|
|
355
|
+
GlobalQueue.F = recompute;
|
|
356
|
+
GlobalQueue.W = disposeChildren;
|
|
322
357
|
let tracking = false;
|
|
323
358
|
let stale = false;
|
|
324
359
|
let pendingValueCheck = false;
|
|
325
360
|
let pendingCheck = null;
|
|
326
361
|
let refreshing = false;
|
|
327
362
|
let context = null;
|
|
328
|
-
function notifySubs(e) {
|
|
329
|
-
for (let t = e.O; t !== null; t = t.p) {
|
|
330
|
-
const e = t.A._ & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
|
|
331
|
-
if (e.C > t.A.o) e.C = t.A.o;
|
|
332
|
-
insertIntoHeap(t.A, e);
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
363
|
function recompute(e, t = false) {
|
|
336
|
-
const n = e.
|
|
364
|
+
const n = e.B && e.K != activeTransition;
|
|
337
365
|
if (!t) {
|
|
338
|
-
if (e.
|
|
339
|
-
deleteFromHeap(e, e.
|
|
340
|
-
if (e.
|
|
366
|
+
if (e.K && activeTransition !== e.K && !n) globalQueue.initTransition(e);
|
|
367
|
+
deleteFromHeap(e, e.S & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
|
|
368
|
+
if (e.K) disposeChildren(e);
|
|
341
369
|
else {
|
|
342
370
|
markDisposal(e);
|
|
343
371
|
e.ee = e.te;
|
|
@@ -349,17 +377,17 @@ function recompute(e, t = false) {
|
|
|
349
377
|
const i = context;
|
|
350
378
|
context = e;
|
|
351
379
|
e.re = null;
|
|
352
|
-
e.
|
|
380
|
+
e.S = REACTIVE_RECOMPUTING_DEPS;
|
|
353
381
|
e.se = clock;
|
|
354
|
-
let r = e.
|
|
382
|
+
let r = e.M === NOT_PENDING || (e.oe && e.K) ? e.Y : e.M;
|
|
355
383
|
let s = e.o;
|
|
356
384
|
let o = e.J;
|
|
357
|
-
let u = e.
|
|
385
|
+
let u = e.j;
|
|
358
386
|
let l = tracking;
|
|
359
387
|
setStatusFlags(e, STATUS_NONE | (o & STATUS_UNINITIALIZED));
|
|
360
388
|
tracking = true;
|
|
361
389
|
try {
|
|
362
|
-
r = handleAsync(e, e.
|
|
390
|
+
r = handleAsync(e, e.U(r));
|
|
363
391
|
e.J &= ~STATUS_UNINITIALIZED;
|
|
364
392
|
} catch (t) {
|
|
365
393
|
if (t instanceof NotReadyError) {
|
|
@@ -369,7 +397,7 @@ function recompute(e, t = false) {
|
|
|
369
397
|
} finally {
|
|
370
398
|
tracking = l;
|
|
371
399
|
}
|
|
372
|
-
e.
|
|
400
|
+
e.S = REACTIVE_NONE;
|
|
373
401
|
context = i;
|
|
374
402
|
if (!(e.J & STATUS_PENDING)) {
|
|
375
403
|
const t = e.re;
|
|
@@ -382,45 +410,42 @@ function recompute(e, t = false) {
|
|
|
382
410
|
else e.D = null;
|
|
383
411
|
}
|
|
384
412
|
}
|
|
385
|
-
const c = !e.
|
|
386
|
-
const a = e.J !== o || e.
|
|
413
|
+
const c = !e.ue || !e.ue(e.M === NOT_PENDING || e.oe || n ? e.Y : e.M, r);
|
|
414
|
+
const a = e.J !== o || e.j !== u;
|
|
387
415
|
e.le?.(a, o);
|
|
388
416
|
if (c || a) {
|
|
389
417
|
if (c) {
|
|
390
|
-
if (t || e.
|
|
391
|
-
else e.
|
|
392
|
-
if (e.
|
|
393
|
-
}
|
|
394
|
-
for (let t = e.O; t !== null; t = t.p) {
|
|
395
|
-
const n = t.A._ & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
|
|
396
|
-
if (t.A.o < e.o && n.C > t.A.o) n.C = t.A.o;
|
|
397
|
-
insertIntoHeap(t.A, n);
|
|
418
|
+
if (t || e.oe || n) e.Y = r;
|
|
419
|
+
else e.M = r;
|
|
420
|
+
if (e.ce) setSignal(e.ce, r);
|
|
398
421
|
}
|
|
422
|
+
(!e.oe || optimisticRun) && notifySubs(e);
|
|
399
423
|
} else if (e.o != s) {
|
|
400
424
|
for (let t = e.O; t !== null; t = t.p) {
|
|
401
|
-
insertIntoHeapHeight(t.A, t.A.
|
|
425
|
+
insertIntoHeapHeight(t.A, t.A.S & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
|
|
402
426
|
}
|
|
403
427
|
}
|
|
404
|
-
|
|
405
|
-
|
|
428
|
+
e.oe && !optimisticRun && globalQueue.L.push(e);
|
|
429
|
+
(!t || e.J & STATUS_PENDING) && !e.K && globalQueue.$.push(e);
|
|
430
|
+
e.K && n && runInTransition(e, recompute);
|
|
406
431
|
}
|
|
407
432
|
function handleAsync(e, t, n) {
|
|
408
433
|
const i = typeof t === "object" && t !== null;
|
|
409
434
|
const r = i && t instanceof Promise;
|
|
410
435
|
const s = i && untrack(() => t[Symbol.asyncIterator]);
|
|
411
436
|
if (!r && !s) {
|
|
412
|
-
e.
|
|
437
|
+
e.ae = null;
|
|
413
438
|
return t;
|
|
414
439
|
}
|
|
415
|
-
e.
|
|
440
|
+
e.ae = t;
|
|
416
441
|
if (r) {
|
|
417
442
|
t.then(i => {
|
|
418
|
-
if (e.
|
|
443
|
+
if (e.ae !== t) return;
|
|
419
444
|
globalQueue.initTransition(e);
|
|
420
445
|
n?.(i) ?? setSignal(e, () => i);
|
|
421
446
|
flush();
|
|
422
447
|
}).catch(n => {
|
|
423
|
-
if (e.
|
|
448
|
+
if (e.ae !== t) return;
|
|
424
449
|
globalQueue.initTransition(e);
|
|
425
450
|
setStatusFlags(e, STATUS_ERROR, n);
|
|
426
451
|
e.se = clock;
|
|
@@ -432,13 +457,13 @@ function handleAsync(e, t, n) {
|
|
|
432
457
|
(async () => {
|
|
433
458
|
try {
|
|
434
459
|
for await (let i of t) {
|
|
435
|
-
if (e.
|
|
460
|
+
if (e.ae !== t) return;
|
|
436
461
|
globalQueue.initTransition(e);
|
|
437
462
|
n?.(i) ?? setSignal(e, () => i);
|
|
438
463
|
flush();
|
|
439
464
|
}
|
|
440
465
|
} catch (n) {
|
|
441
|
-
if (e.
|
|
466
|
+
if (e.ae !== t) return;
|
|
442
467
|
globalQueue.initTransition(e);
|
|
443
468
|
setStatusFlags(e, STATUS_ERROR, n);
|
|
444
469
|
e.se = clock;
|
|
@@ -452,42 +477,42 @@ function handleAsync(e, t, n) {
|
|
|
452
477
|
throw new NotReadyError(context);
|
|
453
478
|
}
|
|
454
479
|
function updateIfNecessary(e) {
|
|
455
|
-
if (e.
|
|
480
|
+
if (e.S & REACTIVE_CHECK) {
|
|
456
481
|
for (let t = e.D; t; t = t.P) {
|
|
457
482
|
const n = t.V;
|
|
458
|
-
const i = n.
|
|
459
|
-
if (i.
|
|
483
|
+
const i = n.m || n;
|
|
484
|
+
if (i.U) {
|
|
460
485
|
updateIfNecessary(i);
|
|
461
486
|
}
|
|
462
|
-
if (e.
|
|
487
|
+
if (e.S & REACTIVE_DIRTY) {
|
|
463
488
|
break;
|
|
464
489
|
}
|
|
465
490
|
}
|
|
466
491
|
}
|
|
467
|
-
if (e.
|
|
492
|
+
if (e.S & REACTIVE_DIRTY) {
|
|
468
493
|
recompute(e);
|
|
469
494
|
}
|
|
470
|
-
e.
|
|
495
|
+
e.S = REACTIVE_NONE;
|
|
471
496
|
}
|
|
472
497
|
function unlinkSubs(e) {
|
|
473
498
|
const t = e.V;
|
|
474
499
|
const n = e.P;
|
|
475
500
|
const i = e.p;
|
|
476
|
-
const r = e.
|
|
477
|
-
if (i !== null) i.
|
|
478
|
-
else t.
|
|
501
|
+
const r = e.fe;
|
|
502
|
+
if (i !== null) i.fe = r;
|
|
503
|
+
else t.Ee = r;
|
|
479
504
|
if (r !== null) r.p = i;
|
|
480
505
|
else {
|
|
481
506
|
t.O = i;
|
|
482
507
|
if (i === null) {
|
|
483
|
-
t.
|
|
484
|
-
t.
|
|
508
|
+
t.de?.();
|
|
509
|
+
t.U && !t.Te && unobserved(t);
|
|
485
510
|
}
|
|
486
511
|
}
|
|
487
512
|
return n;
|
|
488
513
|
}
|
|
489
514
|
function unobserved(e) {
|
|
490
|
-
deleteFromHeap(e, e.
|
|
515
|
+
deleteFromHeap(e, e.S & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
|
|
491
516
|
let t = e.D;
|
|
492
517
|
while (t !== null) {
|
|
493
518
|
t = unlinkSubs(t);
|
|
@@ -499,7 +524,7 @@ function link(e, t) {
|
|
|
499
524
|
const n = t.re;
|
|
500
525
|
if (n !== null && n.V === e) return;
|
|
501
526
|
let i = null;
|
|
502
|
-
const r = t.
|
|
527
|
+
const r = t.S & REACTIVE_RECOMPUTING_DEPS;
|
|
503
528
|
if (r) {
|
|
504
529
|
i = n !== null ? n.P : t.D;
|
|
505
530
|
if (i !== null && i.V === e) {
|
|
@@ -507,9 +532,9 @@ function link(e, t) {
|
|
|
507
532
|
return;
|
|
508
533
|
}
|
|
509
534
|
}
|
|
510
|
-
const s = e.
|
|
535
|
+
const s = e.Ee;
|
|
511
536
|
if (s !== null && s.A === t && (!r || isValidLink(s, t))) return;
|
|
512
|
-
const o = (t.re = e.
|
|
537
|
+
const o = (t.re = e.Ee = { V: e, A: t, P: i, fe: s, p: null });
|
|
513
538
|
if (n !== null) n.P = o;
|
|
514
539
|
else t.D = o;
|
|
515
540
|
if (s !== null) s.p = o;
|
|
@@ -529,18 +554,18 @@ function isValidLink(e, t) {
|
|
|
529
554
|
}
|
|
530
555
|
function setStatusFlags(e, t, n = null) {
|
|
531
556
|
e.J = t;
|
|
532
|
-
e.
|
|
557
|
+
e.j = n;
|
|
533
558
|
}
|
|
534
559
|
function markDisposal(e) {
|
|
535
560
|
let t = e.ie;
|
|
536
561
|
while (t) {
|
|
537
|
-
t.
|
|
538
|
-
if (t.
|
|
562
|
+
t.S |= REACTIVE_ZOMBIE;
|
|
563
|
+
if (t.S & REACTIVE_IN_HEAP) {
|
|
539
564
|
deleteFromHeap(t, dirtyQueue);
|
|
540
565
|
insertIntoHeap(t, zombieQueue);
|
|
541
566
|
}
|
|
542
567
|
markDisposal(t);
|
|
543
|
-
t = t.
|
|
568
|
+
t = t.Re;
|
|
544
569
|
}
|
|
545
570
|
}
|
|
546
571
|
function dispose(e) {
|
|
@@ -553,14 +578,14 @@ function dispose(e) {
|
|
|
553
578
|
disposeChildren(e, true);
|
|
554
579
|
}
|
|
555
580
|
function disposeChildren(e, t = false, n) {
|
|
556
|
-
if (e.
|
|
557
|
-
if (t) e.
|
|
581
|
+
if (e.S & REACTIVE_DISPOSED) return;
|
|
582
|
+
if (t) e.S = REACTIVE_DISPOSED;
|
|
558
583
|
let i = n ? e.ne : e.ie;
|
|
559
584
|
while (i) {
|
|
560
|
-
const e = i.
|
|
585
|
+
const e = i.Re;
|
|
561
586
|
if (i.D) {
|
|
562
587
|
const e = i;
|
|
563
|
-
deleteFromHeap(e, e.
|
|
588
|
+
deleteFromHeap(e, e.S & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
|
|
564
589
|
let t = e.D;
|
|
565
590
|
do {
|
|
566
591
|
t = unlinkSubs(t);
|
|
@@ -575,7 +600,7 @@ function disposeChildren(e, t = false, n) {
|
|
|
575
600
|
e.ne = null;
|
|
576
601
|
} else {
|
|
577
602
|
e.ie = null;
|
|
578
|
-
e.
|
|
603
|
+
e.Re = null;
|
|
579
604
|
}
|
|
580
605
|
runDisposal(e, n);
|
|
581
606
|
}
|
|
@@ -604,36 +629,36 @@ function formatId(e, t) {
|
|
|
604
629
|
function computed(e, t, n) {
|
|
605
630
|
const i = {
|
|
606
631
|
id: n?.id ?? (context?.id != null ? getNextChildId(context) : undefined),
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
632
|
+
ue: n?.equals != null ? n.equals : isEqual,
|
|
633
|
+
Se: !!n?.pureWrite,
|
|
634
|
+
de: n?.unobserved,
|
|
610
635
|
te: null,
|
|
611
636
|
_e: context?._e ?? globalQueue,
|
|
612
|
-
|
|
637
|
+
Oe: context?.Oe ?? defaultContext,
|
|
613
638
|
he: 0,
|
|
614
|
-
|
|
615
|
-
|
|
639
|
+
U: e,
|
|
640
|
+
Y: t,
|
|
616
641
|
o: 0,
|
|
617
642
|
N: null,
|
|
618
|
-
|
|
643
|
+
R: undefined,
|
|
619
644
|
T: null,
|
|
620
645
|
D: null,
|
|
621
646
|
re: null,
|
|
622
647
|
O: null,
|
|
623
|
-
|
|
648
|
+
Ee: null,
|
|
624
649
|
i: context,
|
|
625
|
-
|
|
650
|
+
Re: null,
|
|
626
651
|
ie: null,
|
|
627
|
-
|
|
652
|
+
S: REACTIVE_NONE,
|
|
628
653
|
J: STATUS_UNINITIALIZED,
|
|
629
654
|
se: clock,
|
|
630
|
-
|
|
655
|
+
M: NOT_PENDING,
|
|
631
656
|
ee: null,
|
|
632
657
|
ne: null,
|
|
633
|
-
|
|
634
|
-
|
|
658
|
+
ae: null,
|
|
659
|
+
K: null
|
|
635
660
|
};
|
|
636
|
-
if (n?.
|
|
661
|
+
if (n?.pe) Object.assign(i, n.pe);
|
|
637
662
|
i.T = i;
|
|
638
663
|
const r = context?.t ? context.u : context;
|
|
639
664
|
if (context) {
|
|
@@ -641,28 +666,28 @@ function computed(e, t, n) {
|
|
|
641
666
|
if (e === null) {
|
|
642
667
|
context.ie = i;
|
|
643
668
|
} else {
|
|
644
|
-
i.
|
|
669
|
+
i.Re = e;
|
|
645
670
|
context.ie = i;
|
|
646
671
|
}
|
|
647
672
|
}
|
|
648
673
|
if (r) i.o = r.o + 1;
|
|
649
|
-
recompute(i, true);
|
|
674
|
+
!n?.lazy && recompute(i, true);
|
|
650
675
|
return i;
|
|
651
676
|
}
|
|
652
677
|
function signal(e, t, n = null) {
|
|
653
678
|
const i = {
|
|
654
679
|
id: t?.id ?? (context?.id != null ? getNextChildId(context) : undefined),
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
680
|
+
ue: t?.equals != null ? t.equals : isEqual,
|
|
681
|
+
Se: !!t?.pureWrite,
|
|
682
|
+
de: t?.unobserved,
|
|
683
|
+
Y: e,
|
|
659
684
|
O: null,
|
|
660
|
-
|
|
685
|
+
Ee: null,
|
|
661
686
|
J: STATUS_NONE,
|
|
662
687
|
se: clock,
|
|
663
|
-
|
|
688
|
+
m: n,
|
|
664
689
|
I: n?.N || null,
|
|
665
|
-
|
|
690
|
+
M: NOT_PENDING
|
|
666
691
|
};
|
|
667
692
|
n && (n.N = i);
|
|
668
693
|
return i;
|
|
@@ -682,13 +707,13 @@ function untrack(e) {
|
|
|
682
707
|
function read(e) {
|
|
683
708
|
let t = context;
|
|
684
709
|
if (t?.t) t = t.u;
|
|
685
|
-
if (refreshing && e.
|
|
710
|
+
if (refreshing && e.U) recompute(e);
|
|
686
711
|
if (t && tracking && !pendingCheck && !pendingValueCheck) {
|
|
687
|
-
if (e.
|
|
712
|
+
if (e.U && e.S & REACTIVE_DISPOSED) recompute(e);
|
|
688
713
|
link(e, t);
|
|
689
|
-
const n = e.
|
|
690
|
-
if (n.
|
|
691
|
-
const i = e.
|
|
714
|
+
const n = e.m || e;
|
|
715
|
+
if (n.U) {
|
|
716
|
+
const i = e.S & REACTIVE_ZOMBIE;
|
|
692
717
|
if (n.o >= (i ? zombieQueue.C : dirtyQueue.C)) {
|
|
693
718
|
markNode(t);
|
|
694
719
|
markHeap(i ? zombieQueue : dirtyQueue);
|
|
@@ -701,33 +726,32 @@ function read(e) {
|
|
|
701
726
|
}
|
|
702
727
|
}
|
|
703
728
|
if (pendingCheck) {
|
|
704
|
-
if (!e.
|
|
705
|
-
e.
|
|
706
|
-
e.
|
|
707
|
-
e.
|
|
729
|
+
if (!e.q) {
|
|
730
|
+
e.q = signal(false);
|
|
731
|
+
e.q.oe = true;
|
|
732
|
+
e.q.Z = t => setSignal(e.q, t);
|
|
708
733
|
}
|
|
709
734
|
const t = pendingCheck;
|
|
710
735
|
pendingCheck = null;
|
|
711
|
-
t.
|
|
736
|
+
t.Y = read(e.q) || t.Y;
|
|
712
737
|
pendingCheck = t;
|
|
713
738
|
}
|
|
714
739
|
if (pendingValueCheck) {
|
|
715
|
-
if (!e.
|
|
716
|
-
e.
|
|
717
|
-
e.
|
|
718
|
-
e.Z.q = t => setSignal(e.Z, t);
|
|
740
|
+
if (!e.ce) {
|
|
741
|
+
e.ce = signal(e.Y);
|
|
742
|
+
e.ce.oe = true;
|
|
719
743
|
}
|
|
720
744
|
pendingValueCheck = false;
|
|
721
745
|
try {
|
|
722
|
-
return read(e.
|
|
746
|
+
return read(e.ce);
|
|
723
747
|
} finally {
|
|
724
748
|
pendingValueCheck = true;
|
|
725
749
|
}
|
|
726
750
|
}
|
|
727
751
|
if (e.J & STATUS_PENDING && !pendingCheck) {
|
|
728
|
-
if ((t && !stale) || e.J & STATUS_UNINITIALIZED) throw e.
|
|
752
|
+
if ((t && !stale) || e.J & STATUS_UNINITIALIZED) throw e.j;
|
|
729
753
|
else if (t && stale) {
|
|
730
|
-
setStatusFlags(t, t.J | 1, e.
|
|
754
|
+
setStatusFlags(t, t.J | 1, e.j);
|
|
731
755
|
}
|
|
732
756
|
}
|
|
733
757
|
if (e.J & STATUS_ERROR) {
|
|
@@ -735,33 +759,33 @@ function read(e) {
|
|
|
735
759
|
recompute(e, true);
|
|
736
760
|
return read(e);
|
|
737
761
|
} else {
|
|
738
|
-
throw e.
|
|
762
|
+
throw e.j;
|
|
739
763
|
}
|
|
740
764
|
}
|
|
741
765
|
return !t ||
|
|
742
|
-
e.
|
|
743
|
-
e.
|
|
744
|
-
(stale && !pendingCheck && e.
|
|
745
|
-
? e.
|
|
746
|
-
: e.
|
|
766
|
+
e.oe ||
|
|
767
|
+
e.M === NOT_PENDING ||
|
|
768
|
+
(stale && !pendingCheck && (t.oe || (e.K && activeTransition !== e.K)))
|
|
769
|
+
? e.Y
|
|
770
|
+
: e.M;
|
|
747
771
|
}
|
|
748
772
|
function setSignal(e, t) {
|
|
749
773
|
if (typeof t === "function") {
|
|
750
|
-
t = t(e.
|
|
774
|
+
t = t(e.M === NOT_PENDING || (e.oe && e.K) ? e.Y : e.M);
|
|
751
775
|
}
|
|
752
|
-
const n = !e.
|
|
776
|
+
const n = !e.ue || !e.ue(e.M === NOT_PENDING || e.oe ? e.Y : e.M, t);
|
|
753
777
|
if (!n && !e.J) return t;
|
|
754
778
|
if (n) {
|
|
755
|
-
if (e.
|
|
779
|
+
if (e.oe) e.Y = t;
|
|
756
780
|
else {
|
|
757
|
-
if (e.
|
|
758
|
-
e.
|
|
781
|
+
if (e.M === NOT_PENDING) globalQueue.$.push(e);
|
|
782
|
+
e.M = t;
|
|
759
783
|
}
|
|
760
|
-
if (e.
|
|
784
|
+
if (e.ce) setSignal(e.ce, t);
|
|
761
785
|
}
|
|
762
786
|
setStatusFlags(e, STATUS_NONE);
|
|
763
787
|
e.se = clock;
|
|
764
|
-
notifySubs(e);
|
|
788
|
+
e.oe && !optimisticRun ? globalQueue.L.push(e) : notifySubs(e);
|
|
765
789
|
schedule();
|
|
766
790
|
return t;
|
|
767
791
|
}
|
|
@@ -789,11 +813,11 @@ function createOwner(e) {
|
|
|
789
813
|
t: true,
|
|
790
814
|
u: t?.t ? t.u : t,
|
|
791
815
|
ie: null,
|
|
792
|
-
|
|
816
|
+
Re: null,
|
|
793
817
|
te: null,
|
|
794
818
|
id: e?.id ?? (t?.id != null ? getNextChildId(t) : undefined),
|
|
795
819
|
_e: t?._e ?? globalQueue,
|
|
796
|
-
|
|
820
|
+
Oe: t?.Oe || defaultContext,
|
|
797
821
|
he: 0,
|
|
798
822
|
ee: null,
|
|
799
823
|
ne: null,
|
|
@@ -807,7 +831,7 @@ function createOwner(e) {
|
|
|
807
831
|
if (e === null) {
|
|
808
832
|
t.ie = n;
|
|
809
833
|
} else {
|
|
810
|
-
n.
|
|
834
|
+
n.Re = e;
|
|
811
835
|
t.ie = n;
|
|
812
836
|
}
|
|
813
837
|
}
|
|
@@ -846,10 +870,10 @@ function pending(e) {
|
|
|
846
870
|
}
|
|
847
871
|
function isPending(e) {
|
|
848
872
|
const t = pendingCheck;
|
|
849
|
-
pendingCheck = {
|
|
873
|
+
pendingCheck = { Y: false };
|
|
850
874
|
try {
|
|
851
875
|
staleValues(e);
|
|
852
|
-
return pendingCheck.
|
|
876
|
+
return pendingCheck.Y;
|
|
853
877
|
} catch (e) {
|
|
854
878
|
if (!(e instanceof NotReadyError)) return false;
|
|
855
879
|
throw e;
|
|
@@ -880,7 +904,7 @@ function getContext(e, t = getOwner()) {
|
|
|
880
904
|
if (!t) {
|
|
881
905
|
throw new NoOwnerError();
|
|
882
906
|
}
|
|
883
|
-
const n = hasContext(e, t) ? t.
|
|
907
|
+
const n = hasContext(e, t) ? t.Oe[e.id] : e.defaultValue;
|
|
884
908
|
if (isUndefined(n)) {
|
|
885
909
|
throw new ContextNotFoundError();
|
|
886
910
|
}
|
|
@@ -890,10 +914,10 @@ function setContext(e, t, n = getOwner()) {
|
|
|
890
914
|
if (!n) {
|
|
891
915
|
throw new NoOwnerError();
|
|
892
916
|
}
|
|
893
|
-
n.
|
|
917
|
+
n.Oe = { ...n.Oe, [e.id]: isUndefined(t) ? e.defaultValue : t };
|
|
894
918
|
}
|
|
895
919
|
function hasContext(e, t) {
|
|
896
|
-
return !isUndefined(t?.
|
|
920
|
+
return !isUndefined(t?.Oe[e.id]);
|
|
897
921
|
}
|
|
898
922
|
function isUndefined(e) {
|
|
899
923
|
return typeof e === "undefined";
|
|
@@ -902,23 +926,23 @@ function effect(e, t, n, i, r) {
|
|
|
902
926
|
let s = false;
|
|
903
927
|
const o = computed(e, i, {
|
|
904
928
|
...r,
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
929
|
+
pe: {
|
|
930
|
+
X: true,
|
|
931
|
+
Ae: i,
|
|
932
|
+
ge: t,
|
|
909
933
|
Ne: n,
|
|
910
934
|
Ie: undefined,
|
|
911
|
-
|
|
935
|
+
B: r?.render ? EFFECT_RENDER : EFFECT_USER,
|
|
912
936
|
le(e, t) {
|
|
913
937
|
if (s) {
|
|
914
938
|
const n = this.J && this.J === t && e;
|
|
915
|
-
this.
|
|
916
|
-
if (this.
|
|
939
|
+
this.X = !(this.J & STATUS_ERROR) && !(this.J & STATUS_PENDING & ~t) && !n;
|
|
940
|
+
if (this.X) this._e.enqueue(this.B, runEffect.bind(this));
|
|
917
941
|
}
|
|
918
942
|
if (this.J & STATUS_ERROR) {
|
|
919
|
-
let e = this.
|
|
943
|
+
let e = this.j;
|
|
920
944
|
this._e.notify(this, STATUS_PENDING, 0);
|
|
921
|
-
if (this.
|
|
945
|
+
if (this.B === EFFECT_USER) {
|
|
922
946
|
try {
|
|
923
947
|
return this.Ne
|
|
924
948
|
? this.Ne(e, () => {
|
|
@@ -931,30 +955,30 @@ function effect(e, t, n, i, r) {
|
|
|
931
955
|
}
|
|
932
956
|
}
|
|
933
957
|
if (!this._e.notify(this, STATUS_ERROR, STATUS_ERROR)) throw e;
|
|
934
|
-
} else if (this.
|
|
958
|
+
} else if (this.B === EFFECT_RENDER) {
|
|
935
959
|
this._e.notify(this, STATUS_PENDING | STATUS_ERROR, this.J);
|
|
936
960
|
}
|
|
937
961
|
}
|
|
938
962
|
}
|
|
939
963
|
});
|
|
940
964
|
s = true;
|
|
941
|
-
if (o.
|
|
965
|
+
if (o.B === EFFECT_RENDER) o.U = t => staleValues(() => e(t));
|
|
942
966
|
!r?.defer &&
|
|
943
967
|
!(o.J & (STATUS_ERROR | STATUS_PENDING)) &&
|
|
944
|
-
(o.
|
|
968
|
+
(o.B === EFFECT_USER ? o._e.enqueue(o.B, runEffect.bind(o)) : runEffect.call(o));
|
|
945
969
|
onCleanup(() => o.Ie?.());
|
|
946
970
|
}
|
|
947
971
|
function runEffect() {
|
|
948
|
-
if (!this.
|
|
972
|
+
if (!this.X || this.S & REACTIVE_DISPOSED) return;
|
|
949
973
|
this.Ie?.();
|
|
950
974
|
this.Ie = undefined;
|
|
951
975
|
try {
|
|
952
|
-
this.Ie = this.
|
|
976
|
+
this.Ie = this.ge(this.Y, this.Ae);
|
|
953
977
|
} catch (e) {
|
|
954
978
|
if (!this._e.notify(this, STATUS_ERROR, STATUS_ERROR)) throw e;
|
|
955
979
|
} finally {
|
|
956
|
-
this.
|
|
957
|
-
this.
|
|
980
|
+
this.Ae = this.Y;
|
|
981
|
+
this.X = false;
|
|
958
982
|
}
|
|
959
983
|
}
|
|
960
984
|
function createSignal(e, t, n) {
|
|
@@ -1014,7 +1038,30 @@ function resolve(e) {
|
|
|
1014
1038
|
});
|
|
1015
1039
|
}
|
|
1016
1040
|
function createOptimistic(e, t, n) {
|
|
1017
|
-
|
|
1041
|
+
if (typeof e === "function") {
|
|
1042
|
+
const i = computed(
|
|
1043
|
+
t => {
|
|
1044
|
+
let n = i || getOwner();
|
|
1045
|
+
n.M = e(t);
|
|
1046
|
+
return t;
|
|
1047
|
+
},
|
|
1048
|
+
t,
|
|
1049
|
+
n
|
|
1050
|
+
);
|
|
1051
|
+
i.oe = true;
|
|
1052
|
+
return [read.bind(null, i), setSignal.bind(null, i)];
|
|
1053
|
+
}
|
|
1054
|
+
const i = getOwner();
|
|
1055
|
+
const r = i?.id != null;
|
|
1056
|
+
const s = signal(e, r ? { id: getNextChildId(i), ...t } : t);
|
|
1057
|
+
s.oe = true;
|
|
1058
|
+
return [
|
|
1059
|
+
read.bind(null, s),
|
|
1060
|
+
t => {
|
|
1061
|
+
s.M = e;
|
|
1062
|
+
return setSignal(s, t);
|
|
1063
|
+
}
|
|
1064
|
+
];
|
|
1018
1065
|
}
|
|
1019
1066
|
function onSettled(e) {
|
|
1020
1067
|
let t;
|
|
@@ -1050,7 +1097,7 @@ function applyState(e, t, n, i) {
|
|
|
1050
1097
|
let t = false;
|
|
1051
1098
|
const l = getOverrideValue(s, o, u, "length");
|
|
1052
1099
|
if (e.length && l && e[0] && n(e[0]) != null) {
|
|
1053
|
-
let c, a, f, E, d, T,
|
|
1100
|
+
let c, a, f, E, d, T, R, h;
|
|
1054
1101
|
for (
|
|
1055
1102
|
f = 0, E = Math.min(l, e.length);
|
|
1056
1103
|
f < E && ((T = getOverrideValue(s, o, u, f)) === e[f] || (T && e[f] && n(T) === n(e[f])));
|
|
@@ -1058,8 +1105,8 @@ function applyState(e, t, n, i) {
|
|
|
1058
1105
|
) {
|
|
1059
1106
|
applyState(e[f], wrap(T, r), n, i);
|
|
1060
1107
|
}
|
|
1061
|
-
const
|
|
1062
|
-
|
|
1108
|
+
const S = new Array(e.length),
|
|
1109
|
+
_ = new Map();
|
|
1063
1110
|
for (
|
|
1064
1111
|
E = l - 1, d = e.length - 1;
|
|
1065
1112
|
E >= f &&
|
|
@@ -1067,7 +1114,7 @@ function applyState(e, t, n, i) {
|
|
|
1067
1114
|
((T = getOverrideValue(s, o, u, E)) === e[d] || (T && e[d] && n(T) === n(e[d])));
|
|
1068
1115
|
E--, d--
|
|
1069
1116
|
) {
|
|
1070
|
-
|
|
1117
|
+
S[d] = T;
|
|
1071
1118
|
}
|
|
1072
1119
|
if (f > d || f > E) {
|
|
1073
1120
|
for (a = f; a <= d; a++) {
|
|
@@ -1076,7 +1123,7 @@ function applyState(e, t, n, i) {
|
|
|
1076
1123
|
}
|
|
1077
1124
|
for (; a < e.length; a++) {
|
|
1078
1125
|
t = true;
|
|
1079
|
-
const s = wrap(
|
|
1126
|
+
const s = wrap(S[a], r);
|
|
1080
1127
|
r[STORE_NODE][a] && setSignal(r[STORE_NODE][a], s);
|
|
1081
1128
|
applyState(e[a], s, n, i);
|
|
1082
1129
|
}
|
|
@@ -1084,27 +1131,27 @@ function applyState(e, t, n, i) {
|
|
|
1084
1131
|
l !== e.length && r[STORE_NODE].length && setSignal(r[STORE_NODE].length, e.length);
|
|
1085
1132
|
return;
|
|
1086
1133
|
}
|
|
1087
|
-
|
|
1134
|
+
R = new Array(d + 1);
|
|
1088
1135
|
for (a = d; a >= f; a--) {
|
|
1089
1136
|
T = e[a];
|
|
1090
|
-
|
|
1091
|
-
c =
|
|
1092
|
-
|
|
1093
|
-
|
|
1137
|
+
h = T ? n(T) : T;
|
|
1138
|
+
c = _.get(h);
|
|
1139
|
+
R[a] = c === undefined ? -1 : c;
|
|
1140
|
+
_.set(h, a);
|
|
1094
1141
|
}
|
|
1095
1142
|
for (c = f; c <= E; c++) {
|
|
1096
1143
|
T = getOverrideValue(s, o, u, c);
|
|
1097
|
-
|
|
1098
|
-
a =
|
|
1144
|
+
h = T ? n(T) : T;
|
|
1145
|
+
a = _.get(h);
|
|
1099
1146
|
if (a !== undefined && a !== -1) {
|
|
1100
|
-
|
|
1101
|
-
a =
|
|
1102
|
-
|
|
1147
|
+
S[a] = T;
|
|
1148
|
+
a = R[a];
|
|
1149
|
+
_.set(h, a);
|
|
1103
1150
|
}
|
|
1104
1151
|
}
|
|
1105
1152
|
for (a = f; a < e.length; a++) {
|
|
1106
|
-
if (a in
|
|
1107
|
-
const t = wrap(
|
|
1153
|
+
if (a in S) {
|
|
1154
|
+
const t = wrap(S[a], r);
|
|
1108
1155
|
r[STORE_NODE][a] && setSignal(r[STORE_NODE][a], t);
|
|
1109
1156
|
applyState(e[a], t, n, i);
|
|
1110
1157
|
} else r[STORE_NODE][a] && setSignal(r[STORE_NODE][a], wrap(e[a], r));
|
|
@@ -1279,7 +1326,7 @@ const storeTraps = {
|
|
|
1279
1326
|
if (e && e.get) return e.get.call(n);
|
|
1280
1327
|
}
|
|
1281
1328
|
if (Writing?.has(n)) {
|
|
1282
|
-
let n = r && (s || !o) ? (r.
|
|
1329
|
+
let n = r && (s || !o) ? (r.M !== NOT_PENDING ? r.M : r.Y) : u[t];
|
|
1283
1330
|
n === $DELETED && (n = undefined);
|
|
1284
1331
|
if (!isWrappable(n)) return n;
|
|
1285
1332
|
const i = wrap(n, e);
|
|
@@ -1639,68 +1686,68 @@ function mapArray(e, t, n) {
|
|
|
1639
1686
|
const i = typeof n?.keyed === "function" ? n.keyed : undefined;
|
|
1640
1687
|
return createMemo(
|
|
1641
1688
|
updateKeyedMap.bind({
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
we: [],
|
|
1689
|
+
ye: createOwner(),
|
|
1690
|
+
Ce: 0,
|
|
1691
|
+
De: e,
|
|
1692
|
+
Pe: [],
|
|
1693
|
+
we: t,
|
|
1648
1694
|
be: [],
|
|
1649
|
-
Ve:
|
|
1695
|
+
Ve: [],
|
|
1696
|
+
me: i,
|
|
1650
1697
|
Ue: i || n?.keyed === false ? [] : undefined,
|
|
1651
|
-
|
|
1652
|
-
|
|
1698
|
+
ke: t.length > 1 ? [] : undefined,
|
|
1699
|
+
ve: n?.fallback
|
|
1653
1700
|
})
|
|
1654
1701
|
);
|
|
1655
1702
|
}
|
|
1656
1703
|
const pureOptions = { pureWrite: true };
|
|
1657
1704
|
function updateKeyedMap() {
|
|
1658
|
-
const e = this.
|
|
1705
|
+
const e = this.De() || [],
|
|
1659
1706
|
t = e.length;
|
|
1660
1707
|
e[$TRACK];
|
|
1661
|
-
runWithOwner(this.
|
|
1708
|
+
runWithOwner(this.ye, () => {
|
|
1662
1709
|
let n,
|
|
1663
1710
|
i,
|
|
1664
1711
|
r = this.Ue
|
|
1665
1712
|
? () => {
|
|
1666
1713
|
this.Ue[i] = signal(e[i], pureOptions);
|
|
1667
|
-
this.
|
|
1668
|
-
return this.
|
|
1714
|
+
this.ke && (this.ke[i] = signal(i, pureOptions));
|
|
1715
|
+
return this.we(
|
|
1669
1716
|
read.bind(null, this.Ue[i]),
|
|
1670
|
-
this.
|
|
1717
|
+
this.ke ? read.bind(null, this.ke[i]) : undefined
|
|
1671
1718
|
);
|
|
1672
1719
|
}
|
|
1673
|
-
: this.
|
|
1720
|
+
: this.ke
|
|
1674
1721
|
? () => {
|
|
1675
1722
|
const t = e[i];
|
|
1676
|
-
this.
|
|
1677
|
-
return this.
|
|
1723
|
+
this.ke[i] = signal(i, pureOptions);
|
|
1724
|
+
return this.we(() => t, read.bind(null, this.ke[i]));
|
|
1678
1725
|
}
|
|
1679
1726
|
: () => {
|
|
1680
1727
|
const t = e[i];
|
|
1681
|
-
return this.
|
|
1728
|
+
return this.we(() => t);
|
|
1682
1729
|
};
|
|
1683
1730
|
if (t === 0) {
|
|
1684
|
-
if (this.
|
|
1685
|
-
this.
|
|
1731
|
+
if (this.Ce !== 0) {
|
|
1732
|
+
this.ye.dispose(false);
|
|
1733
|
+
this.Ve = [];
|
|
1734
|
+
this.Pe = [];
|
|
1686
1735
|
this.be = [];
|
|
1687
|
-
this.
|
|
1688
|
-
this.we = [];
|
|
1689
|
-
this.ye = 0;
|
|
1736
|
+
this.Ce = 0;
|
|
1690
1737
|
this.Ue && (this.Ue = []);
|
|
1691
|
-
this.
|
|
1738
|
+
this.ke && (this.ke = []);
|
|
1692
1739
|
}
|
|
1693
|
-
if (this.
|
|
1694
|
-
this.
|
|
1740
|
+
if (this.ve && !this.be[0]) {
|
|
1741
|
+
this.be[0] = runWithOwner((this.Ve[0] = createOwner()), this.ve);
|
|
1695
1742
|
}
|
|
1696
|
-
} else if (this.
|
|
1697
|
-
if (this.
|
|
1698
|
-
this.
|
|
1743
|
+
} else if (this.Ce === 0) {
|
|
1744
|
+
if (this.Ve[0]) this.Ve[0].dispose();
|
|
1745
|
+
this.be = new Array(t);
|
|
1699
1746
|
for (i = 0; i < t; i++) {
|
|
1700
|
-
this.
|
|
1701
|
-
this.
|
|
1747
|
+
this.Pe[i] = e[i];
|
|
1748
|
+
this.be[i] = runWithOwner((this.Ve[i] = createOwner()), r);
|
|
1702
1749
|
}
|
|
1703
|
-
this.
|
|
1750
|
+
this.Ce = t;
|
|
1704
1751
|
} else {
|
|
1705
1752
|
let s,
|
|
1706
1753
|
o,
|
|
@@ -1712,149 +1759,149 @@ function updateKeyedMap() {
|
|
|
1712
1759
|
E = new Array(t),
|
|
1713
1760
|
d = new Array(t),
|
|
1714
1761
|
T = this.Ue ? new Array(t) : undefined,
|
|
1715
|
-
|
|
1762
|
+
R = this.ke ? new Array(t) : undefined;
|
|
1716
1763
|
for (
|
|
1717
|
-
s = 0, o = Math.min(this.
|
|
1718
|
-
s < o && (this.
|
|
1764
|
+
s = 0, o = Math.min(this.Ce, t);
|
|
1765
|
+
s < o && (this.Pe[s] === e[s] || (this.Ue && compare(this.me, this.Pe[s], e[s])));
|
|
1719
1766
|
s++
|
|
1720
1767
|
) {
|
|
1721
1768
|
if (this.Ue) setSignal(this.Ue[s], e[s]);
|
|
1722
1769
|
}
|
|
1723
1770
|
for (
|
|
1724
|
-
o = this.
|
|
1771
|
+
o = this.Ce - 1, u = t - 1;
|
|
1725
1772
|
o >= s &&
|
|
1726
1773
|
u >= s &&
|
|
1727
|
-
(this.
|
|
1774
|
+
(this.Pe[o] === e[u] || (this.Ue && compare(this.me, this.Pe[o], e[u])));
|
|
1728
1775
|
o--, u--
|
|
1729
1776
|
) {
|
|
1730
|
-
E[u] = this.
|
|
1731
|
-
d[u] = this.
|
|
1777
|
+
E[u] = this.be[o];
|
|
1778
|
+
d[u] = this.Ve[o];
|
|
1732
1779
|
T && (T[u] = this.Ue[o]);
|
|
1733
|
-
|
|
1780
|
+
R && (R[u] = this.ke[o]);
|
|
1734
1781
|
}
|
|
1735
1782
|
a = new Map();
|
|
1736
1783
|
f = new Array(u + 1);
|
|
1737
1784
|
for (i = u; i >= s; i--) {
|
|
1738
1785
|
l = e[i];
|
|
1739
|
-
c = this.
|
|
1786
|
+
c = this.me ? this.me(l) : l;
|
|
1740
1787
|
n = a.get(c);
|
|
1741
1788
|
f[i] = n === undefined ? -1 : n;
|
|
1742
1789
|
a.set(c, i);
|
|
1743
1790
|
}
|
|
1744
1791
|
for (n = s; n <= o; n++) {
|
|
1745
|
-
l = this.
|
|
1746
|
-
c = this.
|
|
1792
|
+
l = this.Pe[n];
|
|
1793
|
+
c = this.me ? this.me(l) : l;
|
|
1747
1794
|
i = a.get(c);
|
|
1748
1795
|
if (i !== undefined && i !== -1) {
|
|
1749
|
-
E[i] = this.
|
|
1750
|
-
d[i] = this.
|
|
1796
|
+
E[i] = this.be[n];
|
|
1797
|
+
d[i] = this.Ve[n];
|
|
1751
1798
|
T && (T[i] = this.Ue[n]);
|
|
1752
|
-
|
|
1799
|
+
R && (R[i] = this.ke[n]);
|
|
1753
1800
|
i = f[i];
|
|
1754
1801
|
a.set(c, i);
|
|
1755
|
-
} else this.
|
|
1802
|
+
} else this.Ve[n].dispose();
|
|
1756
1803
|
}
|
|
1757
1804
|
for (i = s; i < t; i++) {
|
|
1758
1805
|
if (i in E) {
|
|
1759
|
-
this.
|
|
1760
|
-
this.
|
|
1806
|
+
this.be[i] = E[i];
|
|
1807
|
+
this.Ve[i] = d[i];
|
|
1761
1808
|
if (T) {
|
|
1762
1809
|
this.Ue[i] = T[i];
|
|
1763
1810
|
setSignal(this.Ue[i], e[i]);
|
|
1764
1811
|
}
|
|
1765
|
-
if (
|
|
1766
|
-
this.
|
|
1767
|
-
setSignal(this.
|
|
1812
|
+
if (R) {
|
|
1813
|
+
this.ke[i] = R[i];
|
|
1814
|
+
setSignal(this.ke[i], i);
|
|
1768
1815
|
}
|
|
1769
1816
|
} else {
|
|
1770
|
-
this.
|
|
1817
|
+
this.be[i] = runWithOwner((this.Ve[i] = createOwner()), r);
|
|
1771
1818
|
}
|
|
1772
1819
|
}
|
|
1773
|
-
this.
|
|
1774
|
-
this.
|
|
1820
|
+
this.be = this.be.slice(0, (this.Ce = t));
|
|
1821
|
+
this.Pe = e.slice(0);
|
|
1775
1822
|
}
|
|
1776
1823
|
});
|
|
1777
|
-
return this.
|
|
1824
|
+
return this.be;
|
|
1778
1825
|
}
|
|
1779
1826
|
function repeat(e, t, n) {
|
|
1780
1827
|
return updateRepeat.bind({
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1828
|
+
ye: createOwner(),
|
|
1829
|
+
Ce: 0,
|
|
1830
|
+
xe: 0,
|
|
1831
|
+
Ge: e,
|
|
1832
|
+
we: t,
|
|
1833
|
+
Ve: [],
|
|
1786
1834
|
be: [],
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
ke: n?.fallback
|
|
1835
|
+
He: n?.from,
|
|
1836
|
+
ve: n?.fallback
|
|
1790
1837
|
});
|
|
1791
1838
|
}
|
|
1792
1839
|
function updateRepeat() {
|
|
1793
|
-
const e = this.
|
|
1794
|
-
const t = this.
|
|
1795
|
-
runWithOwner(this.
|
|
1840
|
+
const e = this.Ge();
|
|
1841
|
+
const t = this.He?.() || 0;
|
|
1842
|
+
runWithOwner(this.ye, () => {
|
|
1796
1843
|
if (e === 0) {
|
|
1797
|
-
if (this.
|
|
1798
|
-
this.
|
|
1844
|
+
if (this.Ce !== 0) {
|
|
1845
|
+
this.ye.dispose(false);
|
|
1846
|
+
this.Ve = [];
|
|
1799
1847
|
this.be = [];
|
|
1800
|
-
this.
|
|
1801
|
-
this.ye = 0;
|
|
1848
|
+
this.Ce = 0;
|
|
1802
1849
|
}
|
|
1803
|
-
if (this.
|
|
1804
|
-
this.
|
|
1850
|
+
if (this.ve && !this.be[0]) {
|
|
1851
|
+
this.be[0] = runWithOwner((this.Ve[0] = createOwner()), this.ve);
|
|
1805
1852
|
}
|
|
1806
1853
|
return;
|
|
1807
1854
|
}
|
|
1808
1855
|
const n = t + e;
|
|
1809
|
-
const i = this.
|
|
1810
|
-
if (this.
|
|
1811
|
-
for (let e = n; e < i; e++) this.
|
|
1812
|
-
if (this.
|
|
1813
|
-
let e = this.
|
|
1814
|
-
while (e < t && e < this.
|
|
1815
|
-
this.
|
|
1816
|
-
this.
|
|
1817
|
-
} else if (this.
|
|
1818
|
-
let n = i - this.
|
|
1819
|
-
let r = this.
|
|
1820
|
-
this.
|
|
1856
|
+
const i = this.xe + this.Ce;
|
|
1857
|
+
if (this.Ce === 0 && this.Ve[0]) this.Ve[0].dispose();
|
|
1858
|
+
for (let e = n; e < i; e++) this.Ve[e - this.xe].dispose();
|
|
1859
|
+
if (this.xe < t) {
|
|
1860
|
+
let e = this.xe;
|
|
1861
|
+
while (e < t && e < this.Ce) this.Ve[e++].dispose();
|
|
1862
|
+
this.Ve.splice(0, t - this.xe);
|
|
1863
|
+
this.be.splice(0, t - this.xe);
|
|
1864
|
+
} else if (this.xe > t) {
|
|
1865
|
+
let n = i - this.xe - 1;
|
|
1866
|
+
let r = this.xe - t;
|
|
1867
|
+
this.Ve.length = this.be.length = e;
|
|
1821
1868
|
while (n >= r) {
|
|
1869
|
+
this.Ve[n] = this.Ve[n - r];
|
|
1822
1870
|
this.be[n] = this.be[n - r];
|
|
1823
|
-
this.we[n] = this.we[n - r];
|
|
1824
1871
|
n--;
|
|
1825
1872
|
}
|
|
1826
1873
|
for (let e = 0; e < r; e++) {
|
|
1827
|
-
this.
|
|
1874
|
+
this.be[e] = runWithOwner((this.Ve[e] = createOwner()), () => this.we(e + t));
|
|
1828
1875
|
}
|
|
1829
1876
|
}
|
|
1830
1877
|
for (let e = i; e < n; e++) {
|
|
1831
|
-
this.
|
|
1878
|
+
this.be[e - t] = runWithOwner((this.Ve[e - t] = createOwner()), () => this.we(e));
|
|
1832
1879
|
}
|
|
1833
|
-
this.
|
|
1834
|
-
this.
|
|
1835
|
-
this.
|
|
1880
|
+
this.be = this.be.slice(0, e);
|
|
1881
|
+
this.xe = t;
|
|
1882
|
+
this.Ce = e;
|
|
1836
1883
|
});
|
|
1837
|
-
return this.
|
|
1884
|
+
return this.be;
|
|
1838
1885
|
}
|
|
1839
1886
|
function compare(e, t, n) {
|
|
1840
1887
|
return e ? e(t) === e(n) : true;
|
|
1841
1888
|
}
|
|
1842
1889
|
function boundaryComputed(e, t) {
|
|
1843
1890
|
const n = computed(e, undefined, {
|
|
1844
|
-
|
|
1891
|
+
pe: {
|
|
1845
1892
|
le() {
|
|
1846
1893
|
let e = this.J;
|
|
1847
|
-
this.J &= ~this.
|
|
1848
|
-
if (this.
|
|
1894
|
+
this.J &= ~this.Qe;
|
|
1895
|
+
if (this.Qe & STATUS_PENDING && !(this.J & STATUS_UNINITIALIZED)) {
|
|
1849
1896
|
e &= ~STATUS_PENDING;
|
|
1850
1897
|
}
|
|
1851
|
-
this._e.notify(this, this.
|
|
1898
|
+
this._e.notify(this, this.Qe, e);
|
|
1852
1899
|
},
|
|
1853
|
-
|
|
1900
|
+
Qe: t
|
|
1854
1901
|
}
|
|
1855
1902
|
});
|
|
1856
|
-
n.
|
|
1857
|
-
n.
|
|
1903
|
+
n.Qe = t;
|
|
1904
|
+
n.Te = true;
|
|
1858
1905
|
return n;
|
|
1859
1906
|
}
|
|
1860
1907
|
function createBoundChildren(e, t, n, i) {
|
|
@@ -1867,19 +1914,19 @@ function createBoundChildren(e, t, n, i) {
|
|
|
1867
1914
|
});
|
|
1868
1915
|
}
|
|
1869
1916
|
class ConditionalQueue extends Queue {
|
|
1870
|
-
|
|
1871
|
-
|
|
1917
|
+
$e;
|
|
1918
|
+
Le = new Set();
|
|
1872
1919
|
$ = new Set();
|
|
1873
1920
|
constructor(e) {
|
|
1874
1921
|
super();
|
|
1875
|
-
this
|
|
1922
|
+
this.$e = e;
|
|
1876
1923
|
}
|
|
1877
1924
|
run(e) {
|
|
1878
|
-
if (!e || read(this
|
|
1925
|
+
if (!e || read(this.$e)) return;
|
|
1879
1926
|
return super.run(e);
|
|
1880
1927
|
}
|
|
1881
1928
|
notify(e, t, n) {
|
|
1882
|
-
if (read(this
|
|
1929
|
+
if (read(this.$e)) {
|
|
1883
1930
|
if (t & STATUS_PENDING) {
|
|
1884
1931
|
if (n & STATUS_PENDING) {
|
|
1885
1932
|
this.$.add(e);
|
|
@@ -1888,37 +1935,37 @@ class ConditionalQueue extends Queue {
|
|
|
1888
1935
|
}
|
|
1889
1936
|
if (t & STATUS_ERROR) {
|
|
1890
1937
|
if (n & STATUS_ERROR) {
|
|
1891
|
-
this
|
|
1938
|
+
this.Le.add(e);
|
|
1892
1939
|
t &= ~STATUS_ERROR;
|
|
1893
|
-
} else if (this
|
|
1940
|
+
} else if (this.Le.delete(e)) t &= ~STATUS_ERROR;
|
|
1894
1941
|
}
|
|
1895
1942
|
}
|
|
1896
1943
|
return t ? super.notify(e, t, n) : true;
|
|
1897
1944
|
}
|
|
1898
1945
|
}
|
|
1899
1946
|
class CollectionQueue extends Queue {
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1947
|
+
Fe;
|
|
1948
|
+
Ve = new Set();
|
|
1949
|
+
$e = signal(false, { pureWrite: true });
|
|
1950
|
+
We = false;
|
|
1904
1951
|
constructor(e) {
|
|
1905
1952
|
super();
|
|
1906
|
-
this.
|
|
1953
|
+
this.Fe = e;
|
|
1907
1954
|
}
|
|
1908
1955
|
run(e) {
|
|
1909
|
-
if (!e || read(this
|
|
1956
|
+
if (!e || read(this.$e)) return;
|
|
1910
1957
|
return super.run(e);
|
|
1911
1958
|
}
|
|
1912
1959
|
notify(e, t, n) {
|
|
1913
|
-
if (!(t & this.
|
|
1914
|
-
if (n & this.
|
|
1915
|
-
this.
|
|
1916
|
-
if (this.
|
|
1917
|
-
} else if (this.
|
|
1918
|
-
this.
|
|
1919
|
-
if (this.
|
|
1920
|
-
}
|
|
1921
|
-
t &= ~this.
|
|
1960
|
+
if (!(t & this.Fe) || (this.Fe & STATUS_PENDING && this.We)) return super.notify(e, t, n);
|
|
1961
|
+
if (n & this.Fe) {
|
|
1962
|
+
this.Ve.add(e);
|
|
1963
|
+
if (this.Ve.size === 1) setSignal(this.$e, true);
|
|
1964
|
+
} else if (this.Ve.size > 0) {
|
|
1965
|
+
this.Ve.delete(e);
|
|
1966
|
+
if (this.Ve.size === 0) setSignal(this.$e, false);
|
|
1967
|
+
}
|
|
1968
|
+
t &= ~this.Fe;
|
|
1922
1969
|
return t ? super.notify(e, t, n) : true;
|
|
1923
1970
|
}
|
|
1924
1971
|
}
|
|
@@ -1932,25 +1979,25 @@ function createBoundary(e, t) {
|
|
|
1932
1979
|
const i = new ConditionalQueue(computed(() => t() === BoundaryMode.HIDDEN));
|
|
1933
1980
|
const r = createBoundChildren(n, e, i, 0);
|
|
1934
1981
|
computed(() => {
|
|
1935
|
-
const e = read(i
|
|
1936
|
-
r.
|
|
1982
|
+
const e = read(i.$e);
|
|
1983
|
+
r.Qe = e ? STATUS_ERROR | STATUS_PENDING : 0;
|
|
1937
1984
|
if (!e) {
|
|
1938
1985
|
i.$.forEach(e => i.notify(e, STATUS_PENDING, STATUS_PENDING));
|
|
1939
|
-
i
|
|
1986
|
+
i.Le.forEach(e => i.notify(e, STATUS_ERROR, STATUS_ERROR));
|
|
1940
1987
|
i.$.clear();
|
|
1941
|
-
i
|
|
1988
|
+
i.Le.clear();
|
|
1942
1989
|
}
|
|
1943
1990
|
});
|
|
1944
|
-
return () => (read(i
|
|
1991
|
+
return () => (read(i.$e) ? undefined : read(r));
|
|
1945
1992
|
}
|
|
1946
1993
|
function createCollectionBoundary(e, t, n) {
|
|
1947
1994
|
const i = createOwner();
|
|
1948
1995
|
const r = new CollectionQueue(e);
|
|
1949
1996
|
const s = createBoundChildren(i, t, r, e);
|
|
1950
1997
|
const o = computed(() => {
|
|
1951
|
-
if (!read(r
|
|
1998
|
+
if (!read(r.$e)) {
|
|
1952
1999
|
const e = read(s);
|
|
1953
|
-
if (!untrack(() => read(r
|
|
2000
|
+
if (!untrack(() => read(r.$e))) r.We = true;
|
|
1954
2001
|
return e;
|
|
1955
2002
|
}
|
|
1956
2003
|
return n(r);
|
|
@@ -1975,10 +2022,10 @@ function collectErrorSources(e, t) {
|
|
|
1975
2022
|
}
|
|
1976
2023
|
function createErrorBoundary(e, t) {
|
|
1977
2024
|
return createCollectionBoundary(STATUS_ERROR, e, e => {
|
|
1978
|
-
let n = e.
|
|
1979
|
-
return t(n.
|
|
2025
|
+
let n = e.Ve.values().next().value;
|
|
2026
|
+
return t(n.j, () => {
|
|
1980
2027
|
const t = [];
|
|
1981
|
-
for (const n of e.
|
|
2028
|
+
for (const n of e.Ve) collectErrorSources(n, t);
|
|
1982
2029
|
for (const e of t) recompute(e);
|
|
1983
2030
|
schedule();
|
|
1984
2031
|
});
|