@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/node.cjs
CHANGED
|
@@ -117,10 +117,10 @@ function runHeap(e, t) {
|
|
|
117
117
|
function adjustHeight(e, t) {
|
|
118
118
|
deleteFromHeap(e, t);
|
|
119
119
|
let n = e.o;
|
|
120
|
-
for (let t = e.
|
|
121
|
-
const e = t.
|
|
122
|
-
const r = e.
|
|
123
|
-
if (r.
|
|
120
|
+
for (let t = e.P; t; t = t.W) {
|
|
121
|
+
const e = t.I;
|
|
122
|
+
const r = e.F || e;
|
|
123
|
+
if (r.H && r.o >= n) n = r.o + 1;
|
|
124
124
|
}
|
|
125
125
|
if (e.o !== n) {
|
|
126
126
|
e.o = n;
|
|
@@ -130,21 +130,22 @@ function adjustHeight(e, t) {
|
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
const w = new Set();
|
|
133
|
-
|
|
133
|
+
let _ = false;
|
|
134
134
|
const S = { l: new Array(2e3).fill(undefined), m: false, A: 0, _: 0 };
|
|
135
|
-
|
|
136
|
-
let m =
|
|
135
|
+
const b = { l: new Array(2e3).fill(undefined), m: false, A: 0, _: 0 };
|
|
136
|
+
let m = 0;
|
|
137
|
+
let O = null;
|
|
137
138
|
let x = false;
|
|
138
139
|
function schedule() {
|
|
139
140
|
if (x) return;
|
|
140
141
|
x = true;
|
|
141
|
-
if (!
|
|
142
|
+
if (!C.R) queueMicrotask(flush);
|
|
142
143
|
}
|
|
143
144
|
class Queue {
|
|
144
145
|
i = null;
|
|
145
146
|
V = [[], []];
|
|
146
147
|
q = [];
|
|
147
|
-
created =
|
|
148
|
+
created = m;
|
|
148
149
|
addChild(e) {
|
|
149
150
|
this.q.push(e);
|
|
150
151
|
e.i = this;
|
|
@@ -201,41 +202,35 @@ class Queue {
|
|
|
201
202
|
class GlobalQueue extends Queue {
|
|
202
203
|
R = false;
|
|
203
204
|
M = [];
|
|
204
|
-
|
|
205
|
+
D = [];
|
|
205
206
|
static B;
|
|
207
|
+
static T;
|
|
206
208
|
flush() {
|
|
207
209
|
if (this.R) return;
|
|
208
210
|
this.R = true;
|
|
209
211
|
try {
|
|
210
|
-
runHeap(
|
|
211
|
-
if (
|
|
212
|
-
if (!transitionComplete(
|
|
213
|
-
|
|
212
|
+
runHeap(S, GlobalQueue.B);
|
|
213
|
+
if (O) {
|
|
214
|
+
if (!transitionComplete(O)) {
|
|
215
|
+
let e = O;
|
|
216
|
+
runHeap(b, GlobalQueue.B);
|
|
214
217
|
this.M = [];
|
|
215
|
-
this.stashQueues(
|
|
216
|
-
|
|
218
|
+
this.stashQueues(O.queueStash);
|
|
219
|
+
m++;
|
|
217
220
|
x = false;
|
|
218
|
-
|
|
219
|
-
|
|
221
|
+
runTransitionPending(O.pendingNodes, true);
|
|
222
|
+
O = null;
|
|
223
|
+
runOptimistic(e);
|
|
220
224
|
return;
|
|
221
225
|
}
|
|
222
|
-
this.M.push(...
|
|
223
|
-
this.restoreQueues(
|
|
224
|
-
w.delete(
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
} else if (w.size) runHeap(
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
if (t.K !== p) {
|
|
231
|
-
t.G = t.K;
|
|
232
|
-
t.K = p;
|
|
233
|
-
if (t.T) t.U = true;
|
|
234
|
-
}
|
|
235
|
-
if (t.F) GlobalQueue.B(t, false, true);
|
|
236
|
-
}
|
|
237
|
-
this.M.length = 0;
|
|
238
|
-
b++;
|
|
226
|
+
this.M.push(...O.pendingNodes);
|
|
227
|
+
this.restoreQueues(O.queueStash);
|
|
228
|
+
w.delete(O);
|
|
229
|
+
O = null;
|
|
230
|
+
runTransitionPending(this.M, false);
|
|
231
|
+
} else if (w.size) runHeap(b, GlobalQueue.B);
|
|
232
|
+
runOptimistic();
|
|
233
|
+
m++;
|
|
239
234
|
x = false;
|
|
240
235
|
this.run(d);
|
|
241
236
|
this.run(h);
|
|
@@ -246,8 +241,8 @@ class GlobalQueue extends Queue {
|
|
|
246
241
|
notify(e, t, n) {
|
|
247
242
|
if (t & f) {
|
|
248
243
|
if (n & f) {
|
|
249
|
-
if (
|
|
250
|
-
|
|
244
|
+
if (O && !O.asyncNodes.includes(e.K.cause)) {
|
|
245
|
+
O.asyncNodes.push(e.K.cause);
|
|
251
246
|
schedule();
|
|
252
247
|
}
|
|
253
248
|
}
|
|
@@ -256,48 +251,92 @@ class GlobalQueue extends Queue {
|
|
|
256
251
|
return false;
|
|
257
252
|
}
|
|
258
253
|
initTransition(e) {
|
|
259
|
-
if (
|
|
260
|
-
if (!
|
|
261
|
-
|
|
254
|
+
if (O && O.time === m) return;
|
|
255
|
+
if (!O) {
|
|
256
|
+
O = e.G ?? {
|
|
257
|
+
time: m,
|
|
258
|
+
pendingNodes: [],
|
|
259
|
+
asyncNodes: [],
|
|
260
|
+
optimisticNodes: [],
|
|
261
|
+
queueStash: { V: [[], []], q: [] },
|
|
262
|
+
done: false
|
|
263
|
+
};
|
|
262
264
|
}
|
|
263
|
-
w.add(
|
|
264
|
-
|
|
265
|
+
w.add(O);
|
|
266
|
+
O.time = m;
|
|
265
267
|
for (let e = 0; e < this.M.length; e++) {
|
|
266
268
|
const t = this.M[e];
|
|
267
|
-
t.
|
|
268
|
-
|
|
269
|
+
t.G = O;
|
|
270
|
+
O.pendingNodes.push(t);
|
|
271
|
+
}
|
|
272
|
+
for (let e = 0; e < this.D.length; e++) {
|
|
273
|
+
const t = this.D[e];
|
|
274
|
+
t.G = O;
|
|
275
|
+
O.optimisticNodes.push(t);
|
|
269
276
|
}
|
|
270
|
-
this.M =
|
|
277
|
+
this.M = O.pendingNodes;
|
|
278
|
+
this.D = O.optimisticNodes;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
function notifySubs(e) {
|
|
282
|
+
for (let t = e.O; t !== null; t = t.C) {
|
|
283
|
+
const e = t.N.S & o ? b : S;
|
|
284
|
+
if (e.A > t.N.o) e.A = t.N.o;
|
|
285
|
+
insertIntoHeap(t.N, e);
|
|
271
286
|
}
|
|
272
287
|
}
|
|
273
|
-
function
|
|
274
|
-
let
|
|
275
|
-
const
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
if (
|
|
280
|
-
|
|
281
|
-
|
|
288
|
+
function runOptimistic(e = null) {
|
|
289
|
+
let t = !e;
|
|
290
|
+
const n = C.D;
|
|
291
|
+
_ = true;
|
|
292
|
+
for (let t = 0; t < n.length; t++) {
|
|
293
|
+
const r = n[t];
|
|
294
|
+
if (!e && (!r.G || r.G.done) && r.U !== p) {
|
|
295
|
+
r.L = r.U;
|
|
296
|
+
r.U = p;
|
|
282
297
|
}
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
298
|
+
r.G = e;
|
|
299
|
+
notifySubs(r);
|
|
300
|
+
}
|
|
301
|
+
C.D = [];
|
|
302
|
+
if (S._ >= S.A) {
|
|
303
|
+
t = true;
|
|
304
|
+
runHeap(S, GlobalQueue.B);
|
|
305
|
+
}
|
|
306
|
+
_ = false;
|
|
307
|
+
t && runPending(C.M);
|
|
308
|
+
}
|
|
309
|
+
function runPending(e) {
|
|
310
|
+
for (let t = 0; t < e.length; t++) {
|
|
311
|
+
const n = e[t];
|
|
312
|
+
if (n.U !== p) {
|
|
313
|
+
n.L = n.U;
|
|
314
|
+
n.U = p;
|
|
315
|
+
if (n.J) n.X = true;
|
|
287
316
|
}
|
|
317
|
+
if (n.H) GlobalQueue.T(n, false, true);
|
|
288
318
|
}
|
|
289
|
-
|
|
319
|
+
e.length = 0;
|
|
290
320
|
}
|
|
291
|
-
|
|
321
|
+
function runTransitionPending(e, t) {
|
|
322
|
+
const n = e.slice();
|
|
323
|
+
for (let e = 0; e < n.length; e++) {
|
|
324
|
+
const r = n[e];
|
|
325
|
+
r.G = O;
|
|
326
|
+
if (r.Y) r.Y.Z(t);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
const C = new GlobalQueue();
|
|
292
330
|
function flush() {
|
|
293
331
|
while (x) {
|
|
294
|
-
|
|
332
|
+
C.flush();
|
|
295
333
|
}
|
|
296
334
|
}
|
|
297
335
|
function runQueue(e, t) {
|
|
298
336
|
for (let n = 0; n < e.length; n++) e[n](t);
|
|
299
337
|
}
|
|
300
338
|
function transitionComplete(e) {
|
|
339
|
+
if (e.done) return true;
|
|
301
340
|
let t = true;
|
|
302
341
|
for (let n = 0; n < e.asyncNodes.length; n++) {
|
|
303
342
|
if (e.asyncNodes[n].$ & f) {
|
|
@@ -305,35 +344,29 @@ function transitionComplete(e) {
|
|
|
305
344
|
break;
|
|
306
345
|
}
|
|
307
346
|
}
|
|
347
|
+
t && (e.done = true);
|
|
308
348
|
return t;
|
|
309
349
|
}
|
|
310
350
|
function runInTransition(e, t) {
|
|
311
|
-
const n =
|
|
312
|
-
|
|
351
|
+
const n = O;
|
|
352
|
+
O = e.G;
|
|
313
353
|
t(e);
|
|
314
|
-
|
|
354
|
+
O = n;
|
|
315
355
|
}
|
|
316
|
-
GlobalQueue.
|
|
317
|
-
GlobalQueue.
|
|
318
|
-
let C = false;
|
|
319
|
-
let v = false;
|
|
356
|
+
GlobalQueue.B = recompute;
|
|
357
|
+
GlobalQueue.T = disposeChildren;
|
|
320
358
|
let N = false;
|
|
321
|
-
let
|
|
322
|
-
let
|
|
323
|
-
let
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
const e = t.N.S & o ? S : _;
|
|
327
|
-
if (e.A > t.N.o) e.A = t.N.o;
|
|
328
|
-
insertIntoHeap(t.N, e);
|
|
329
|
-
}
|
|
330
|
-
}
|
|
359
|
+
let v = false;
|
|
360
|
+
let k = false;
|
|
361
|
+
let j = null;
|
|
362
|
+
let A = false;
|
|
363
|
+
let E = null;
|
|
331
364
|
function recompute(t, n = false) {
|
|
332
|
-
const i = t.
|
|
365
|
+
const i = t.J && t.G != O;
|
|
333
366
|
if (!n) {
|
|
334
|
-
if (t.
|
|
335
|
-
deleteFromHeap(t, t.S & o ?
|
|
336
|
-
if (t.
|
|
367
|
+
if (t.G && O !== t.G && !i) C.initTransition(t);
|
|
368
|
+
deleteFromHeap(t, t.S & o ? b : S);
|
|
369
|
+
if (t.G) disposeChildren(t);
|
|
337
370
|
else {
|
|
338
371
|
markDisposal(t);
|
|
339
372
|
t.ee = t.te;
|
|
@@ -342,20 +375,20 @@ function recompute(t, n = false) {
|
|
|
342
375
|
t.re = null;
|
|
343
376
|
}
|
|
344
377
|
}
|
|
345
|
-
const s =
|
|
346
|
-
|
|
378
|
+
const s = E;
|
|
379
|
+
E = t;
|
|
347
380
|
t.ie = null;
|
|
348
381
|
t.S = r;
|
|
349
|
-
t.se =
|
|
350
|
-
let u = t.
|
|
382
|
+
t.se = m;
|
|
383
|
+
let u = t.U === p || (t.oe && t.G) ? t.L : t.U;
|
|
351
384
|
let d = t.o;
|
|
352
385
|
let h = t.$;
|
|
353
|
-
let y = t.
|
|
354
|
-
let g =
|
|
386
|
+
let y = t.K;
|
|
387
|
+
let g = N;
|
|
355
388
|
setStatusFlags(t, l | (h & a));
|
|
356
|
-
|
|
389
|
+
N = true;
|
|
357
390
|
try {
|
|
358
|
-
u = handleAsync(t, t.
|
|
391
|
+
u = handleAsync(t, t.H(u));
|
|
359
392
|
t.$ &= ~a;
|
|
360
393
|
} catch (e) {
|
|
361
394
|
if (e instanceof NotReadyError) {
|
|
@@ -363,63 +396,60 @@ function recompute(t, n = false) {
|
|
|
363
396
|
setStatusFlags(t, (h & ~c) | f, e);
|
|
364
397
|
} else setStatusFlags(t, c, e);
|
|
365
398
|
} finally {
|
|
366
|
-
|
|
399
|
+
N = g;
|
|
367
400
|
}
|
|
368
401
|
t.S = e;
|
|
369
|
-
|
|
402
|
+
E = s;
|
|
370
403
|
if (!(t.$ & f)) {
|
|
371
404
|
const e = t.ie;
|
|
372
|
-
let n = e !== null ? e.
|
|
405
|
+
let n = e !== null ? e.W : t.P;
|
|
373
406
|
if (n !== null) {
|
|
374
407
|
do {
|
|
375
408
|
n = unlinkSubs(n);
|
|
376
409
|
} while (n !== null);
|
|
377
|
-
if (e !== null) e.
|
|
378
|
-
else t.
|
|
410
|
+
if (e !== null) e.W = null;
|
|
411
|
+
else t.P = null;
|
|
379
412
|
}
|
|
380
413
|
}
|
|
381
|
-
const w = !t.
|
|
382
|
-
const x = t.$ !== h || t.
|
|
414
|
+
const w = !t.ue || !t.ue(t.U === p || t.oe || i ? t.L : t.U, u);
|
|
415
|
+
const x = t.$ !== h || t.K !== y;
|
|
383
416
|
t.le?.(x, h);
|
|
384
417
|
if (w || x) {
|
|
385
418
|
if (w) {
|
|
386
|
-
if (n || t.
|
|
387
|
-
else t.
|
|
388
|
-
if (t.
|
|
389
|
-
}
|
|
390
|
-
for (let e = t.O; e !== null; e = e.C) {
|
|
391
|
-
const n = e.N.S & o ? S : _;
|
|
392
|
-
if (e.N.o < t.o && n.A > e.N.o) n.A = e.N.o;
|
|
393
|
-
insertIntoHeap(e.N, n);
|
|
419
|
+
if (n || t.oe || i) t.L = u;
|
|
420
|
+
else t.U = u;
|
|
421
|
+
if (t.fe) setSignal(t.fe, u);
|
|
394
422
|
}
|
|
423
|
+
(!t.oe || _) && notifySubs(t);
|
|
395
424
|
} else if (t.o != d) {
|
|
396
425
|
for (let e = t.O; e !== null; e = e.C) {
|
|
397
|
-
insertIntoHeapHeight(e.N, e.N.S & o ?
|
|
426
|
+
insertIntoHeapHeight(e.N, e.N.S & o ? b : S);
|
|
398
427
|
}
|
|
399
428
|
}
|
|
400
|
-
|
|
401
|
-
|
|
429
|
+
t.oe && !_ && C.D.push(t);
|
|
430
|
+
(!n || t.$ & f) && !t.G && C.M.push(t);
|
|
431
|
+
t.G && i && runInTransition(t, recompute);
|
|
402
432
|
}
|
|
403
433
|
function handleAsync(e, t, n) {
|
|
404
434
|
const r = typeof t === "object" && t !== null;
|
|
405
435
|
const i = r && t instanceof Promise;
|
|
406
436
|
const s = r && untrack(() => t[Symbol.asyncIterator]);
|
|
407
437
|
if (!i && !s) {
|
|
408
|
-
e.
|
|
438
|
+
e.ce = null;
|
|
409
439
|
return t;
|
|
410
440
|
}
|
|
411
|
-
e.
|
|
441
|
+
e.ce = t;
|
|
412
442
|
if (i) {
|
|
413
443
|
t.then(r => {
|
|
414
|
-
if (e.
|
|
415
|
-
|
|
444
|
+
if (e.ce !== t) return;
|
|
445
|
+
C.initTransition(e);
|
|
416
446
|
n?.(r) ?? setSignal(e, () => r);
|
|
417
447
|
flush();
|
|
418
448
|
}).catch(n => {
|
|
419
|
-
if (e.
|
|
420
|
-
|
|
449
|
+
if (e.ce !== t) return;
|
|
450
|
+
C.initTransition(e);
|
|
421
451
|
setStatusFlags(e, c, n);
|
|
422
|
-
e.se =
|
|
452
|
+
e.se = m;
|
|
423
453
|
notifySubs(e);
|
|
424
454
|
schedule();
|
|
425
455
|
flush();
|
|
@@ -428,31 +458,31 @@ function handleAsync(e, t, n) {
|
|
|
428
458
|
(async () => {
|
|
429
459
|
try {
|
|
430
460
|
for await (let r of t) {
|
|
431
|
-
if (e.
|
|
432
|
-
|
|
461
|
+
if (e.ce !== t) return;
|
|
462
|
+
C.initTransition(e);
|
|
433
463
|
n?.(r) ?? setSignal(e, () => r);
|
|
434
464
|
flush();
|
|
435
465
|
}
|
|
436
466
|
} catch (n) {
|
|
437
|
-
if (e.
|
|
438
|
-
|
|
467
|
+
if (e.ce !== t) return;
|
|
468
|
+
C.initTransition(e);
|
|
439
469
|
setStatusFlags(e, c, n);
|
|
440
|
-
e.se =
|
|
470
|
+
e.se = m;
|
|
441
471
|
notifySubs(e);
|
|
442
472
|
schedule();
|
|
443
473
|
flush();
|
|
444
474
|
}
|
|
445
475
|
})();
|
|
446
476
|
}
|
|
447
|
-
|
|
448
|
-
throw new NotReadyError(
|
|
477
|
+
C.initTransition(e);
|
|
478
|
+
throw new NotReadyError(E);
|
|
449
479
|
}
|
|
450
480
|
function updateIfNecessary(r) {
|
|
451
481
|
if (r.S & t) {
|
|
452
|
-
for (let e = r.
|
|
453
|
-
const t = e.
|
|
454
|
-
const i = t.
|
|
455
|
-
if (i.
|
|
482
|
+
for (let e = r.P; e; e = e.W) {
|
|
483
|
+
const t = e.I;
|
|
484
|
+
const i = t.F || t;
|
|
485
|
+
if (i.H) {
|
|
456
486
|
updateIfNecessary(i);
|
|
457
487
|
}
|
|
458
488
|
if (r.S & n) {
|
|
@@ -466,85 +496,85 @@ function updateIfNecessary(r) {
|
|
|
466
496
|
r.S = e;
|
|
467
497
|
}
|
|
468
498
|
function unlinkSubs(e) {
|
|
469
|
-
const t = e.
|
|
470
|
-
const n = e.
|
|
499
|
+
const t = e.I;
|
|
500
|
+
const n = e.W;
|
|
471
501
|
const r = e.C;
|
|
472
|
-
const i = e.
|
|
473
|
-
if (r !== null) r.
|
|
474
|
-
else t.
|
|
502
|
+
const i = e.ae;
|
|
503
|
+
if (r !== null) r.ae = i;
|
|
504
|
+
else t.de = i;
|
|
475
505
|
if (i !== null) i.C = r;
|
|
476
506
|
else {
|
|
477
507
|
t.O = r;
|
|
478
508
|
if (r === null) {
|
|
479
|
-
t.
|
|
480
|
-
t.
|
|
509
|
+
t.he?.();
|
|
510
|
+
t.H && !t.pe && unobserved(t);
|
|
481
511
|
}
|
|
482
512
|
}
|
|
483
513
|
return n;
|
|
484
514
|
}
|
|
485
515
|
function unobserved(e) {
|
|
486
|
-
deleteFromHeap(e, e.S & o ?
|
|
487
|
-
let t = e.
|
|
516
|
+
deleteFromHeap(e, e.S & o ? b : S);
|
|
517
|
+
let t = e.P;
|
|
488
518
|
while (t !== null) {
|
|
489
519
|
t = unlinkSubs(t);
|
|
490
520
|
}
|
|
491
|
-
e.
|
|
521
|
+
e.P = null;
|
|
492
522
|
disposeChildren(e, true);
|
|
493
523
|
}
|
|
494
524
|
function link(e, t) {
|
|
495
525
|
const n = t.ie;
|
|
496
|
-
if (n !== null && n.
|
|
526
|
+
if (n !== null && n.I === e) return;
|
|
497
527
|
let i = null;
|
|
498
528
|
const s = t.S & r;
|
|
499
529
|
if (s) {
|
|
500
|
-
i = n !== null ? n.
|
|
501
|
-
if (i !== null && i.
|
|
530
|
+
i = n !== null ? n.W : t.P;
|
|
531
|
+
if (i !== null && i.I === e) {
|
|
502
532
|
t.ie = i;
|
|
503
533
|
return;
|
|
504
534
|
}
|
|
505
535
|
}
|
|
506
|
-
const o = e.
|
|
536
|
+
const o = e.de;
|
|
507
537
|
if (o !== null && o.N === t && (!s || isValidLink(o, t))) return;
|
|
508
|
-
const u = (t.ie = e.
|
|
509
|
-
if (n !== null) n.
|
|
510
|
-
else t.
|
|
538
|
+
const u = (t.ie = e.de = { I: e, N: t, W: i, ae: o, C: null });
|
|
539
|
+
if (n !== null) n.W = u;
|
|
540
|
+
else t.P = u;
|
|
511
541
|
if (o !== null) o.C = u;
|
|
512
542
|
else e.O = u;
|
|
513
543
|
}
|
|
514
544
|
function isValidLink(e, t) {
|
|
515
545
|
const n = t.ie;
|
|
516
546
|
if (n !== null) {
|
|
517
|
-
let r = t.
|
|
547
|
+
let r = t.P;
|
|
518
548
|
do {
|
|
519
549
|
if (r === e) return true;
|
|
520
550
|
if (r === n) break;
|
|
521
|
-
r = r.
|
|
551
|
+
r = r.W;
|
|
522
552
|
} while (r !== null);
|
|
523
553
|
}
|
|
524
554
|
return false;
|
|
525
555
|
}
|
|
526
556
|
function setStatusFlags(e, t, n = null) {
|
|
527
557
|
e.$ = t;
|
|
528
|
-
e.
|
|
558
|
+
e.K = n;
|
|
529
559
|
}
|
|
530
560
|
function markDisposal(e) {
|
|
531
561
|
let t = e.re;
|
|
532
562
|
while (t) {
|
|
533
563
|
t.S |= o;
|
|
534
564
|
if (t.S & i) {
|
|
535
|
-
deleteFromHeap(t,
|
|
536
|
-
insertIntoHeap(t,
|
|
565
|
+
deleteFromHeap(t, S);
|
|
566
|
+
insertIntoHeap(t, b);
|
|
537
567
|
}
|
|
538
568
|
markDisposal(t);
|
|
539
|
-
t = t.
|
|
569
|
+
t = t.ye;
|
|
540
570
|
}
|
|
541
571
|
}
|
|
542
572
|
function dispose(e) {
|
|
543
|
-
let t = e.
|
|
573
|
+
let t = e.P || null;
|
|
544
574
|
do {
|
|
545
575
|
t = unlinkSubs(t);
|
|
546
576
|
} while (t !== null);
|
|
547
|
-
e.
|
|
577
|
+
e.P = null;
|
|
548
578
|
e.ie = null;
|
|
549
579
|
disposeChildren(e, true);
|
|
550
580
|
}
|
|
@@ -553,15 +583,15 @@ function disposeChildren(e, t = false, n) {
|
|
|
553
583
|
if (t) e.S = u;
|
|
554
584
|
let r = n ? e.ne : e.re;
|
|
555
585
|
while (r) {
|
|
556
|
-
const e = r.
|
|
557
|
-
if (r.
|
|
586
|
+
const e = r.ye;
|
|
587
|
+
if (r.P) {
|
|
558
588
|
const e = r;
|
|
559
|
-
deleteFromHeap(e, e.S & o ?
|
|
560
|
-
let t = e.
|
|
589
|
+
deleteFromHeap(e, e.S & o ? b : S);
|
|
590
|
+
let t = e.P;
|
|
561
591
|
do {
|
|
562
592
|
t = unlinkSubs(t);
|
|
563
593
|
} while (t !== null);
|
|
564
|
-
e.
|
|
594
|
+
e.P = null;
|
|
565
595
|
e.ie = null;
|
|
566
596
|
}
|
|
567
597
|
disposeChildren(r, true);
|
|
@@ -571,7 +601,7 @@ function disposeChildren(e, t = false, n) {
|
|
|
571
601
|
e.ne = null;
|
|
572
602
|
} else {
|
|
573
603
|
e.re = null;
|
|
574
|
-
e.
|
|
604
|
+
e.ye = null;
|
|
575
605
|
}
|
|
576
606
|
runDisposal(e, n);
|
|
577
607
|
}
|
|
@@ -589,7 +619,7 @@ function runDisposal(e, t) {
|
|
|
589
619
|
t ? (e.ee = null) : (e.te = null);
|
|
590
620
|
}
|
|
591
621
|
function getNextChildId(e) {
|
|
592
|
-
if (e.id != null) return formatId(e.id, e.
|
|
622
|
+
if (e.id != null) return formatId(e.id, e.ge++);
|
|
593
623
|
throw new Error("Cannot get child id from owner without an id");
|
|
594
624
|
}
|
|
595
625
|
function formatId(e, t) {
|
|
@@ -599,66 +629,66 @@ function formatId(e, t) {
|
|
|
599
629
|
}
|
|
600
630
|
function computed(t, n, r) {
|
|
601
631
|
const i = {
|
|
602
|
-
id: r?.id ?? (
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
632
|
+
id: r?.id ?? (E?.id != null ? getNextChildId(E) : undefined),
|
|
633
|
+
ue: r?.equals != null ? r.equals : isEqual,
|
|
634
|
+
we: !!r?.pureWrite,
|
|
635
|
+
he: r?.unobserved,
|
|
606
636
|
te: null,
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
637
|
+
_e: E?._e ?? C,
|
|
638
|
+
Se: E?.Se ?? g,
|
|
639
|
+
ge: 0,
|
|
640
|
+
H: t,
|
|
641
|
+
L: n,
|
|
612
642
|
o: 0,
|
|
613
643
|
k: null,
|
|
614
644
|
p: undefined,
|
|
615
645
|
h: null,
|
|
616
|
-
|
|
646
|
+
P: null,
|
|
617
647
|
ie: null,
|
|
618
648
|
O: null,
|
|
619
|
-
|
|
620
|
-
i:
|
|
621
|
-
|
|
649
|
+
de: null,
|
|
650
|
+
i: E,
|
|
651
|
+
ye: null,
|
|
622
652
|
re: null,
|
|
623
653
|
S: e,
|
|
624
654
|
$: a,
|
|
625
|
-
se:
|
|
626
|
-
|
|
655
|
+
se: m,
|
|
656
|
+
U: p,
|
|
627
657
|
ee: null,
|
|
628
658
|
ne: null,
|
|
629
|
-
|
|
630
|
-
|
|
659
|
+
ce: null,
|
|
660
|
+
G: null
|
|
631
661
|
};
|
|
632
|
-
if (r?.
|
|
662
|
+
if (r?.be) Object.assign(i, r.be);
|
|
633
663
|
i.h = i;
|
|
634
|
-
const s =
|
|
635
|
-
if (
|
|
636
|
-
const e =
|
|
664
|
+
const s = E?.t ? E.u : E;
|
|
665
|
+
if (E) {
|
|
666
|
+
const e = E.re;
|
|
637
667
|
if (e === null) {
|
|
638
|
-
|
|
668
|
+
E.re = i;
|
|
639
669
|
} else {
|
|
640
|
-
i.
|
|
641
|
-
|
|
670
|
+
i.ye = e;
|
|
671
|
+
E.re = i;
|
|
642
672
|
}
|
|
643
673
|
}
|
|
644
674
|
if (s) i.o = s.o + 1;
|
|
645
|
-
recompute(i, true);
|
|
675
|
+
!r?.lazy && recompute(i, true);
|
|
646
676
|
return i;
|
|
647
677
|
}
|
|
648
678
|
function signal(e, t, n = null) {
|
|
649
679
|
const r = {
|
|
650
|
-
id: t?.id ?? (
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
680
|
+
id: t?.id ?? (E?.id != null ? getNextChildId(E) : undefined),
|
|
681
|
+
ue: t?.equals != null ? t.equals : isEqual,
|
|
682
|
+
we: !!t?.pureWrite,
|
|
683
|
+
he: t?.unobserved,
|
|
684
|
+
L: e,
|
|
655
685
|
O: null,
|
|
656
|
-
|
|
686
|
+
de: null,
|
|
657
687
|
$: l,
|
|
658
|
-
se:
|
|
659
|
-
|
|
688
|
+
se: m,
|
|
689
|
+
F: n,
|
|
660
690
|
j: n?.k || null,
|
|
661
|
-
|
|
691
|
+
U: p
|
|
662
692
|
};
|
|
663
693
|
n && (n.k = r);
|
|
664
694
|
return r;
|
|
@@ -667,27 +697,27 @@ function isEqual(e, t) {
|
|
|
667
697
|
return e === t;
|
|
668
698
|
}
|
|
669
699
|
function untrack(e) {
|
|
670
|
-
if (!
|
|
671
|
-
|
|
700
|
+
if (!N) return e();
|
|
701
|
+
N = false;
|
|
672
702
|
try {
|
|
673
703
|
return e();
|
|
674
704
|
} finally {
|
|
675
|
-
|
|
705
|
+
N = true;
|
|
676
706
|
}
|
|
677
707
|
}
|
|
678
708
|
function read(e) {
|
|
679
|
-
let t =
|
|
709
|
+
let t = E;
|
|
680
710
|
if (t?.t) t = t.u;
|
|
681
|
-
if (
|
|
682
|
-
if (t &&
|
|
683
|
-
if (e.
|
|
711
|
+
if (A && e.H) recompute(e);
|
|
712
|
+
if (t && N && !j && !k) {
|
|
713
|
+
if (e.H && e.S & u) recompute(e);
|
|
684
714
|
link(e, t);
|
|
685
|
-
const n = e.
|
|
686
|
-
if (n.
|
|
715
|
+
const n = e.F || e;
|
|
716
|
+
if (n.H) {
|
|
687
717
|
const r = e.S & o;
|
|
688
|
-
if (n.o >= (r ?
|
|
718
|
+
if (n.o >= (r ? b.A : S.A)) {
|
|
689
719
|
markNode(t);
|
|
690
|
-
markHeap(r ?
|
|
720
|
+
markHeap(r ? b : S);
|
|
691
721
|
updateIfNecessary(n);
|
|
692
722
|
}
|
|
693
723
|
const i = n.o;
|
|
@@ -696,75 +726,74 @@ function read(e) {
|
|
|
696
726
|
}
|
|
697
727
|
}
|
|
698
728
|
}
|
|
699
|
-
if (
|
|
700
|
-
if (!e.
|
|
701
|
-
e.
|
|
702
|
-
e.
|
|
703
|
-
e.
|
|
704
|
-
}
|
|
705
|
-
const t =
|
|
706
|
-
|
|
707
|
-
t.
|
|
708
|
-
|
|
729
|
+
if (j) {
|
|
730
|
+
if (!e.Y) {
|
|
731
|
+
e.Y = signal(false);
|
|
732
|
+
e.Y.oe = true;
|
|
733
|
+
e.Y.Z = t => setSignal(e.Y, t);
|
|
734
|
+
}
|
|
735
|
+
const t = j;
|
|
736
|
+
j = null;
|
|
737
|
+
t.L = read(e.Y) || t.L;
|
|
738
|
+
j = t;
|
|
709
739
|
}
|
|
710
|
-
if (
|
|
711
|
-
if (!e.
|
|
712
|
-
e.
|
|
713
|
-
e.
|
|
714
|
-
e.Z.Y = t => setSignal(e.Z, t);
|
|
740
|
+
if (k) {
|
|
741
|
+
if (!e.fe) {
|
|
742
|
+
e.fe = signal(e.L);
|
|
743
|
+
e.fe.oe = true;
|
|
715
744
|
}
|
|
716
|
-
|
|
745
|
+
k = false;
|
|
717
746
|
try {
|
|
718
|
-
return read(e.
|
|
747
|
+
return read(e.fe);
|
|
719
748
|
} finally {
|
|
720
|
-
|
|
749
|
+
k = true;
|
|
721
750
|
}
|
|
722
751
|
}
|
|
723
|
-
if (e.$ & f && !
|
|
724
|
-
if ((t && !v) || e.$ & a) throw e.
|
|
752
|
+
if (e.$ & f && !j) {
|
|
753
|
+
if ((t && !v) || e.$ & a) throw e.K;
|
|
725
754
|
else if (t && v) {
|
|
726
|
-
setStatusFlags(t, t.$ | 1, e.
|
|
755
|
+
setStatusFlags(t, t.$ | 1, e.K);
|
|
727
756
|
}
|
|
728
757
|
}
|
|
729
758
|
if (e.$ & c) {
|
|
730
|
-
if (e.se <
|
|
759
|
+
if (e.se < m) {
|
|
731
760
|
recompute(e, true);
|
|
732
761
|
return read(e);
|
|
733
762
|
} else {
|
|
734
|
-
throw e.
|
|
763
|
+
throw e.K;
|
|
735
764
|
}
|
|
736
765
|
}
|
|
737
|
-
return !t || e.
|
|
766
|
+
return !t || e.oe || e.U === p || (v && !j && (t.oe || (e.G && O !== e.G))) ? e.L : e.U;
|
|
738
767
|
}
|
|
739
768
|
function setSignal(e, t) {
|
|
740
769
|
if (typeof t === "function") {
|
|
741
|
-
t = t(e.
|
|
770
|
+
t = t(e.U === p || (e.oe && e.G) ? e.L : e.U);
|
|
742
771
|
}
|
|
743
|
-
const n = !e.
|
|
772
|
+
const n = !e.ue || !e.ue(e.U === p || e.oe ? e.L : e.U, t);
|
|
744
773
|
if (!n && !e.$) return t;
|
|
745
774
|
if (n) {
|
|
746
|
-
if (e.
|
|
775
|
+
if (e.oe) e.L = t;
|
|
747
776
|
else {
|
|
748
|
-
if (e.
|
|
749
|
-
e.
|
|
777
|
+
if (e.U === p) C.M.push(e);
|
|
778
|
+
e.U = t;
|
|
750
779
|
}
|
|
751
|
-
if (e.
|
|
780
|
+
if (e.fe) setSignal(e.fe, t);
|
|
752
781
|
}
|
|
753
782
|
setStatusFlags(e, l);
|
|
754
|
-
e.se =
|
|
755
|
-
notifySubs(e);
|
|
783
|
+
e.se = m;
|
|
784
|
+
e.oe && !_ ? C.D.push(e) : notifySubs(e);
|
|
756
785
|
schedule();
|
|
757
786
|
return t;
|
|
758
787
|
}
|
|
759
788
|
function getObserver() {
|
|
760
|
-
return
|
|
789
|
+
return N ? E : null;
|
|
761
790
|
}
|
|
762
791
|
function getOwner() {
|
|
763
|
-
return
|
|
792
|
+
return E;
|
|
764
793
|
}
|
|
765
794
|
function onCleanup(e) {
|
|
766
|
-
if (!
|
|
767
|
-
const t =
|
|
795
|
+
if (!E) return e;
|
|
796
|
+
const t = E;
|
|
768
797
|
if (!t.te) {
|
|
769
798
|
t.te = e;
|
|
770
799
|
} else if (Array.isArray(t.te)) {
|
|
@@ -775,17 +804,17 @@ function onCleanup(e) {
|
|
|
775
804
|
return e;
|
|
776
805
|
}
|
|
777
806
|
function createOwner(e) {
|
|
778
|
-
const t =
|
|
807
|
+
const t = E;
|
|
779
808
|
const n = {
|
|
780
809
|
t: true,
|
|
781
810
|
u: t?.t ? t.u : t,
|
|
782
811
|
re: null,
|
|
783
|
-
|
|
812
|
+
ye: null,
|
|
784
813
|
te: null,
|
|
785
814
|
id: e?.id ?? (t?.id != null ? getNextChildId(t) : undefined),
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
815
|
+
_e: t?._e ?? C,
|
|
816
|
+
Se: t?.Se || g,
|
|
817
|
+
ge: 0,
|
|
789
818
|
ee: null,
|
|
790
819
|
ne: null,
|
|
791
820
|
i: t,
|
|
@@ -798,7 +827,7 @@ function createOwner(e) {
|
|
|
798
827
|
if (e === null) {
|
|
799
828
|
t.re = n;
|
|
800
829
|
} else {
|
|
801
|
-
n.
|
|
830
|
+
n.ye = e;
|
|
802
831
|
t.re = n;
|
|
803
832
|
}
|
|
804
833
|
}
|
|
@@ -809,12 +838,12 @@ function createRoot(e, t) {
|
|
|
809
838
|
return runWithOwner(n, () => e(n.dispose));
|
|
810
839
|
}
|
|
811
840
|
function runWithOwner(e, t) {
|
|
812
|
-
const n =
|
|
813
|
-
|
|
841
|
+
const n = E;
|
|
842
|
+
E = e;
|
|
814
843
|
try {
|
|
815
844
|
return t();
|
|
816
845
|
} finally {
|
|
817
|
-
|
|
846
|
+
E = n;
|
|
818
847
|
}
|
|
819
848
|
}
|
|
820
849
|
function staleValues(e, t = true) {
|
|
@@ -827,34 +856,34 @@ function staleValues(e, t = true) {
|
|
|
827
856
|
}
|
|
828
857
|
}
|
|
829
858
|
function pending(e) {
|
|
830
|
-
const t =
|
|
831
|
-
|
|
859
|
+
const t = k;
|
|
860
|
+
k = true;
|
|
832
861
|
try {
|
|
833
862
|
return staleValues(e, false);
|
|
834
863
|
} finally {
|
|
835
|
-
|
|
864
|
+
k = t;
|
|
836
865
|
}
|
|
837
866
|
}
|
|
838
867
|
function isPending(e) {
|
|
839
|
-
const t =
|
|
840
|
-
|
|
868
|
+
const t = j;
|
|
869
|
+
j = { L: false };
|
|
841
870
|
try {
|
|
842
871
|
staleValues(e);
|
|
843
|
-
return
|
|
872
|
+
return j.L;
|
|
844
873
|
} catch (e) {
|
|
845
874
|
if (!(e instanceof NotReadyError)) return false;
|
|
846
875
|
throw e;
|
|
847
876
|
} finally {
|
|
848
|
-
|
|
877
|
+
j = t;
|
|
849
878
|
}
|
|
850
879
|
}
|
|
851
880
|
function refresh(e) {
|
|
852
|
-
let t =
|
|
853
|
-
|
|
881
|
+
let t = A;
|
|
882
|
+
A = true;
|
|
854
883
|
try {
|
|
855
884
|
return untrack(e);
|
|
856
885
|
} finally {
|
|
857
|
-
|
|
886
|
+
A = t;
|
|
858
887
|
if (!t) {
|
|
859
888
|
schedule();
|
|
860
889
|
flush();
|
|
@@ -862,7 +891,7 @@ function refresh(e) {
|
|
|
862
891
|
}
|
|
863
892
|
}
|
|
864
893
|
function isRefreshing() {
|
|
865
|
-
return
|
|
894
|
+
return A;
|
|
866
895
|
}
|
|
867
896
|
function createContext(e, t) {
|
|
868
897
|
return { id: Symbol(t), defaultValue: e };
|
|
@@ -871,7 +900,7 @@ function getContext(e, t = getOwner()) {
|
|
|
871
900
|
if (!t) {
|
|
872
901
|
throw new NoOwnerError();
|
|
873
902
|
}
|
|
874
|
-
const n = hasContext(e, t) ? t.
|
|
903
|
+
const n = hasContext(e, t) ? t.Se[e.id] : e.defaultValue;
|
|
875
904
|
if (isUndefined(n)) {
|
|
876
905
|
throw new ContextNotFoundError();
|
|
877
906
|
}
|
|
@@ -881,10 +910,10 @@ function setContext(e, t, n = getOwner()) {
|
|
|
881
910
|
if (!n) {
|
|
882
911
|
throw new NoOwnerError();
|
|
883
912
|
}
|
|
884
|
-
n.
|
|
913
|
+
n.Se = { ...n.Se, [e.id]: isUndefined(t) ? e.defaultValue : t };
|
|
885
914
|
}
|
|
886
915
|
function hasContext(e, t) {
|
|
887
|
-
return !isUndefined(t?.
|
|
916
|
+
return !isUndefined(t?.Se[e.id]);
|
|
888
917
|
}
|
|
889
918
|
function isUndefined(e) {
|
|
890
919
|
return typeof e === "undefined";
|
|
@@ -893,59 +922,59 @@ function effect(e, t, n, r, i) {
|
|
|
893
922
|
let s = false;
|
|
894
923
|
const o = computed(e, r, {
|
|
895
924
|
...i,
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
925
|
+
be: {
|
|
926
|
+
X: true,
|
|
927
|
+
me: r,
|
|
928
|
+
Oe: t,
|
|
900
929
|
xe: n,
|
|
901
|
-
|
|
902
|
-
|
|
930
|
+
Ce: undefined,
|
|
931
|
+
J: i?.render ? d : h,
|
|
903
932
|
le(e, t) {
|
|
904
933
|
if (s) {
|
|
905
934
|
const n = this.$ && this.$ === t && e;
|
|
906
|
-
this.
|
|
907
|
-
if (this.
|
|
935
|
+
this.X = !(this.$ & c) && !(this.$ & f & ~t) && !n;
|
|
936
|
+
if (this.X) this._e.enqueue(this.J, runEffect.bind(this));
|
|
908
937
|
}
|
|
909
938
|
if (this.$ & c) {
|
|
910
|
-
let e = this.
|
|
911
|
-
this.
|
|
912
|
-
if (this.
|
|
939
|
+
let e = this.K;
|
|
940
|
+
this._e.notify(this, f, 0);
|
|
941
|
+
if (this.J === h) {
|
|
913
942
|
try {
|
|
914
943
|
return this.xe
|
|
915
944
|
? this.xe(e, () => {
|
|
916
|
-
this.
|
|
917
|
-
this.
|
|
945
|
+
this.Ce?.();
|
|
946
|
+
this.Ce = undefined;
|
|
918
947
|
})
|
|
919
948
|
: console.error(e);
|
|
920
949
|
} catch (t) {
|
|
921
950
|
e = t;
|
|
922
951
|
}
|
|
923
952
|
}
|
|
924
|
-
if (!this.
|
|
925
|
-
} else if (this.
|
|
926
|
-
this.
|
|
953
|
+
if (!this._e.notify(this, c, c)) throw e;
|
|
954
|
+
} else if (this.J === d) {
|
|
955
|
+
this._e.notify(this, f | c, this.$);
|
|
927
956
|
}
|
|
928
957
|
}
|
|
929
958
|
}
|
|
930
959
|
});
|
|
931
960
|
s = true;
|
|
932
|
-
if (o.
|
|
961
|
+
if (o.J === d) o.H = t => staleValues(() => e(t));
|
|
933
962
|
!i?.defer &&
|
|
934
963
|
!(o.$ & (c | f)) &&
|
|
935
|
-
(o.
|
|
936
|
-
onCleanup(() => o.
|
|
964
|
+
(o.J === h ? o._e.enqueue(o.J, runEffect.bind(o)) : runEffect.call(o));
|
|
965
|
+
onCleanup(() => o.Ce?.());
|
|
937
966
|
}
|
|
938
967
|
function runEffect() {
|
|
939
|
-
if (!this.
|
|
940
|
-
this.
|
|
941
|
-
this.
|
|
968
|
+
if (!this.X || this.S & u) return;
|
|
969
|
+
this.Ce?.();
|
|
970
|
+
this.Ce = undefined;
|
|
942
971
|
try {
|
|
943
|
-
this.
|
|
972
|
+
this.Ce = this.Oe(this.L, this.me);
|
|
944
973
|
} catch (e) {
|
|
945
|
-
if (!this.
|
|
974
|
+
if (!this._e.notify(this, c, c)) throw e;
|
|
946
975
|
} finally {
|
|
947
|
-
this.
|
|
948
|
-
this.
|
|
976
|
+
this.me = this.L;
|
|
977
|
+
this.X = false;
|
|
949
978
|
}
|
|
950
979
|
}
|
|
951
980
|
function createSignal(e, t, n) {
|
|
@@ -1005,19 +1034,42 @@ function resolve(e) {
|
|
|
1005
1034
|
});
|
|
1006
1035
|
}
|
|
1007
1036
|
function createOptimistic(e, t, n) {
|
|
1008
|
-
|
|
1037
|
+
if (typeof e === "function") {
|
|
1038
|
+
const r = computed(
|
|
1039
|
+
t => {
|
|
1040
|
+
let n = r || getOwner();
|
|
1041
|
+
n.U = e(t);
|
|
1042
|
+
return t;
|
|
1043
|
+
},
|
|
1044
|
+
t,
|
|
1045
|
+
n
|
|
1046
|
+
);
|
|
1047
|
+
r.oe = true;
|
|
1048
|
+
return [read.bind(null, r), setSignal.bind(null, r)];
|
|
1049
|
+
}
|
|
1050
|
+
const r = getOwner();
|
|
1051
|
+
const i = r?.id != null;
|
|
1052
|
+
const s = signal(e, i ? { id: getNextChildId(r), ...t } : t);
|
|
1053
|
+
s.oe = true;
|
|
1054
|
+
return [
|
|
1055
|
+
read.bind(null, s),
|
|
1056
|
+
t => {
|
|
1057
|
+
s.U = e;
|
|
1058
|
+
return setSignal(s, t);
|
|
1059
|
+
}
|
|
1060
|
+
];
|
|
1009
1061
|
}
|
|
1010
1062
|
function onSettled(e) {
|
|
1011
1063
|
let t;
|
|
1012
1064
|
const n = getOwner();
|
|
1013
1065
|
if (n) onCleanup(() => t?.());
|
|
1014
|
-
|
|
1066
|
+
C.enqueue(h, () => {
|
|
1015
1067
|
t = e();
|
|
1016
1068
|
!n && t?.();
|
|
1017
1069
|
});
|
|
1018
1070
|
}
|
|
1019
1071
|
function unwrap(e) {
|
|
1020
|
-
return e?.[
|
|
1072
|
+
return e?.[I]?.[q] ?? e;
|
|
1021
1073
|
}
|
|
1022
1074
|
function getOverrideValue(e, t, n, r) {
|
|
1023
1075
|
return n && r in n ? read(n[r]) : t && r in t ? t[r] : e[r];
|
|
@@ -1028,15 +1080,15 @@ function getAllKeys(e, t, n) {
|
|
|
1028
1080
|
return Array.from(new Set([...r, ...i]));
|
|
1029
1081
|
}
|
|
1030
1082
|
function applyState(e, t, n, r) {
|
|
1031
|
-
const i = t?.[
|
|
1083
|
+
const i = t?.[I];
|
|
1032
1084
|
if (!i) return;
|
|
1033
|
-
const s = i[
|
|
1034
|
-
const o = i[
|
|
1035
|
-
let u = i[
|
|
1085
|
+
const s = i[R];
|
|
1086
|
+
const o = i[V];
|
|
1087
|
+
let u = i[q];
|
|
1036
1088
|
if (e === s && !o) return;
|
|
1037
|
-
(i[
|
|
1038
|
-
i[
|
|
1039
|
-
i[
|
|
1089
|
+
(i[B] || K).set(e, i[F]);
|
|
1090
|
+
i[R] = e;
|
|
1091
|
+
i[V] = undefined;
|
|
1040
1092
|
if (Array.isArray(s)) {
|
|
1041
1093
|
let t = false;
|
|
1042
1094
|
const l = getOverrideValue(s, o, u, "length");
|
|
@@ -1063,16 +1115,16 @@ function applyState(e, t, n, r) {
|
|
|
1063
1115
|
if (a > h || a > d) {
|
|
1064
1116
|
for (c = a; c <= h; c++) {
|
|
1065
1117
|
t = true;
|
|
1066
|
-
i[
|
|
1118
|
+
i[q][c] && setSignal(i[q][c], wrap(e[c], i));
|
|
1067
1119
|
}
|
|
1068
1120
|
for (; c < e.length; c++) {
|
|
1069
1121
|
t = true;
|
|
1070
1122
|
const s = wrap(w[c], i);
|
|
1071
|
-
i[
|
|
1123
|
+
i[q][c] && setSignal(i[q][c], s);
|
|
1072
1124
|
applyState(e[c], s, n, r);
|
|
1073
1125
|
}
|
|
1074
|
-
t && i[
|
|
1075
|
-
l !== e.length && i[
|
|
1126
|
+
t && i[q][P] && setSignal(i[q][P], void 0);
|
|
1127
|
+
l !== e.length && i[q].length && setSignal(i[q].length, e.length);
|
|
1076
1128
|
return;
|
|
1077
1129
|
}
|
|
1078
1130
|
y = new Array(h + 1);
|
|
@@ -1096,9 +1148,9 @@ function applyState(e, t, n, r) {
|
|
|
1096
1148
|
for (c = a; c < e.length; c++) {
|
|
1097
1149
|
if (c in w) {
|
|
1098
1150
|
const t = wrap(w[c], i);
|
|
1099
|
-
i[
|
|
1151
|
+
i[q][c] && setSignal(i[q][c], t);
|
|
1100
1152
|
applyState(e[c], t, n, r);
|
|
1101
|
-
} else i[
|
|
1153
|
+
} else i[q][c] && setSignal(i[q][c], wrap(e[c], i));
|
|
1102
1154
|
}
|
|
1103
1155
|
if (a < e.length) t = true;
|
|
1104
1156
|
} else if (l && e.length) {
|
|
@@ -1109,13 +1161,13 @@ function applyState(e, t, n, r) {
|
|
|
1109
1161
|
}
|
|
1110
1162
|
if (l !== e.length) {
|
|
1111
1163
|
t = true;
|
|
1112
|
-
i[
|
|
1164
|
+
i[q].length && setSignal(i[q].length, e.length);
|
|
1113
1165
|
}
|
|
1114
|
-
t && i[
|
|
1166
|
+
t && i[q][P] && setSignal(i[q][P], void 0);
|
|
1115
1167
|
return;
|
|
1116
1168
|
}
|
|
1117
1169
|
if (u) {
|
|
1118
|
-
const t = u[
|
|
1170
|
+
const t = u[P];
|
|
1119
1171
|
const l = t || r ? getAllKeys(s, o, e) : Object.keys(u);
|
|
1120
1172
|
for (let f = 0, c = l.length; f < c; f++) {
|
|
1121
1173
|
const c = l[f];
|
|
@@ -1129,7 +1181,7 @@ function applyState(e, t, n, r) {
|
|
|
1129
1181
|
} else applyState(h, wrap(d, i), n, r);
|
|
1130
1182
|
}
|
|
1131
1183
|
}
|
|
1132
|
-
if ((u = i[
|
|
1184
|
+
if ((u = i[M])) {
|
|
1133
1185
|
const t = Object.keys(u);
|
|
1134
1186
|
for (let n = 0, r = t.length; n < r; n++) {
|
|
1135
1187
|
const r = t[n];
|
|
@@ -1152,11 +1204,11 @@ function createProjectionInternal(e, t = {}, n) {
|
|
|
1152
1204
|
const i = new WeakMap();
|
|
1153
1205
|
const wrapProjection = e => {
|
|
1154
1206
|
if (i.has(e)) return i.get(e);
|
|
1155
|
-
if (e[
|
|
1156
|
-
const t = createStoreProxy(e,
|
|
1157
|
-
[
|
|
1158
|
-
[
|
|
1159
|
-
[
|
|
1207
|
+
if (e[I]?.[D] === wrapProjection) return e;
|
|
1208
|
+
const t = createStoreProxy(e, U, {
|
|
1209
|
+
[D]: wrapProjection,
|
|
1210
|
+
[B]: i,
|
|
1211
|
+
[T]() {
|
|
1160
1212
|
return r;
|
|
1161
1213
|
}
|
|
1162
1214
|
});
|
|
@@ -1178,32 +1230,32 @@ function createProjectionInternal(e, t = {}, n) {
|
|
|
1178
1230
|
function createProjection(e, t = {}, n) {
|
|
1179
1231
|
return createProjectionInternal(e, t, n).store;
|
|
1180
1232
|
}
|
|
1181
|
-
const
|
|
1233
|
+
const P = Symbol(0),
|
|
1182
1234
|
W = Symbol(0),
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
const
|
|
1187
|
-
const
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
function createStoreProxy(e, t =
|
|
1235
|
+
I = Symbol(0),
|
|
1236
|
+
F = Symbol(0),
|
|
1237
|
+
H = Symbol(0);
|
|
1238
|
+
const Q = new WeakMap();
|
|
1239
|
+
const R = "v",
|
|
1240
|
+
V = "o",
|
|
1241
|
+
q = "n",
|
|
1242
|
+
M = "h",
|
|
1243
|
+
D = "w",
|
|
1244
|
+
B = "l",
|
|
1245
|
+
T = "f";
|
|
1246
|
+
function createStoreProxy(e, t = U, n) {
|
|
1195
1247
|
let r;
|
|
1196
1248
|
if (Array.isArray(e)) {
|
|
1197
1249
|
r = [];
|
|
1198
1250
|
r.v = e;
|
|
1199
1251
|
} else r = { v: e };
|
|
1200
1252
|
n && Object.assign(r, n);
|
|
1201
|
-
return (r[
|
|
1253
|
+
return (r[F] = new Proxy(r, t));
|
|
1202
1254
|
}
|
|
1203
1255
|
const K = new WeakMap();
|
|
1204
1256
|
function wrap(e, t) {
|
|
1205
|
-
if (t?.[
|
|
1206
|
-
let n = e[
|
|
1257
|
+
if (t?.[D]) return t[D](e, t);
|
|
1258
|
+
let n = e[F] || K.get(e);
|
|
1207
1259
|
if (!n) K.set(e, (n = createStoreProxy(e)));
|
|
1208
1260
|
return n;
|
|
1209
1261
|
}
|
|
@@ -1228,8 +1280,8 @@ function getNode(e, t, n, r, i = isEqual) {
|
|
|
1228
1280
|
r
|
|
1229
1281
|
));
|
|
1230
1282
|
}
|
|
1231
|
-
function trackSelf(e, t =
|
|
1232
|
-
getObserver() && read(getNode(getNodes(e,
|
|
1283
|
+
function trackSelf(e, t = P) {
|
|
1284
|
+
getObserver() && read(getNode(getNodes(e, q), t, undefined, e[T]?.(), false));
|
|
1233
1285
|
}
|
|
1234
1286
|
function getKeys(e, t, n = true) {
|
|
1235
1287
|
const r = untrack(() => (n ? Object.keys(e) : Reflect.ownKeys(e)));
|
|
@@ -1237,7 +1289,7 @@ function getKeys(e, t, n = true) {
|
|
|
1237
1289
|
const i = new Set(r);
|
|
1238
1290
|
const s = Reflect.ownKeys(t);
|
|
1239
1291
|
for (const e of s) {
|
|
1240
|
-
if (t[e] !==
|
|
1292
|
+
if (t[e] !== H) i.add(e);
|
|
1241
1293
|
else i.delete(e);
|
|
1242
1294
|
}
|
|
1243
1295
|
return Array.from(i);
|
|
@@ -1245,118 +1297,118 @@ function getKeys(e, t, n = true) {
|
|
|
1245
1297
|
function getPropertyDescriptor(e, t, n) {
|
|
1246
1298
|
let r = e;
|
|
1247
1299
|
if (t && n in t) {
|
|
1248
|
-
if (r[n] ===
|
|
1300
|
+
if (r[n] === H) return void 0;
|
|
1249
1301
|
if (!(n in r)) r = t;
|
|
1250
1302
|
}
|
|
1251
1303
|
return Reflect.getOwnPropertyDescriptor(r, n);
|
|
1252
1304
|
}
|
|
1253
1305
|
let G = null;
|
|
1254
|
-
const
|
|
1306
|
+
const U = {
|
|
1255
1307
|
get(e, t, n) {
|
|
1256
|
-
if (t ===
|
|
1257
|
-
if (t ===
|
|
1258
|
-
if (t ===
|
|
1308
|
+
if (t === I) return e;
|
|
1309
|
+
if (t === F) return n;
|
|
1310
|
+
if (t === P || t === W) {
|
|
1259
1311
|
trackSelf(e, t);
|
|
1260
1312
|
return n;
|
|
1261
1313
|
}
|
|
1262
|
-
const r = getNodes(e,
|
|
1314
|
+
const r = getNodes(e, q);
|
|
1263
1315
|
const i = r[t];
|
|
1264
|
-
const s = e[
|
|
1265
|
-
const o = !!e[
|
|
1266
|
-
const u = s ? e[
|
|
1316
|
+
const s = e[V] && t in e[V];
|
|
1317
|
+
const o = !!e[R][I];
|
|
1318
|
+
const u = s ? e[V] : e[R];
|
|
1267
1319
|
if (!i) {
|
|
1268
1320
|
const e = Object.getOwnPropertyDescriptor(u, t);
|
|
1269
1321
|
if (e && e.get) return e.get.call(n);
|
|
1270
1322
|
}
|
|
1271
1323
|
if (G?.has(n)) {
|
|
1272
|
-
let n = i && (s || !o) ? (i.
|
|
1273
|
-
n ===
|
|
1324
|
+
let n = i && (s || !o) ? (i.U !== p ? i.U : i.L) : u[t];
|
|
1325
|
+
n === H && (n = undefined);
|
|
1274
1326
|
if (!isWrappable(n)) return n;
|
|
1275
1327
|
const r = wrap(n, e);
|
|
1276
1328
|
G.add(r);
|
|
1277
1329
|
return r;
|
|
1278
1330
|
}
|
|
1279
1331
|
let l = i ? (s || !o ? read(r[t]) : (read(r[t]), u[t])) : u[t];
|
|
1280
|
-
l ===
|
|
1332
|
+
l === H && (l = undefined);
|
|
1281
1333
|
if (!i) {
|
|
1282
1334
|
if (!s && typeof l === "function" && !u.hasOwnProperty(t)) {
|
|
1283
1335
|
let t;
|
|
1284
|
-
return !Array.isArray(e[
|
|
1336
|
+
return !Array.isArray(e[R]) && (t = Object.getPrototypeOf(e[R])) && t !== Object.prototype
|
|
1285
1337
|
? l.bind(u)
|
|
1286
1338
|
: l;
|
|
1287
1339
|
} else if (getObserver()) {
|
|
1288
|
-
return read(getNode(r, t, isWrappable(l) ? wrap(l, e) : l, e[
|
|
1340
|
+
return read(getNode(r, t, isWrappable(l) ? wrap(l, e) : l, e[T]?.()));
|
|
1289
1341
|
}
|
|
1290
1342
|
}
|
|
1291
1343
|
return isWrappable(l) ? wrap(l, e) : l;
|
|
1292
1344
|
},
|
|
1293
1345
|
has(e, t) {
|
|
1294
|
-
if (t ===
|
|
1295
|
-
const n = e[
|
|
1296
|
-
getObserver() && read(getNode(getNodes(e,
|
|
1346
|
+
if (t === F || t === P || t === "__proto__") return true;
|
|
1347
|
+
const n = e[V] && t in e[V] ? e[V][t] !== H : t in e[R];
|
|
1348
|
+
getObserver() && read(getNode(getNodes(e, M), t, n, e[T]?.()));
|
|
1297
1349
|
return n;
|
|
1298
1350
|
},
|
|
1299
1351
|
set(e, t, n) {
|
|
1300
|
-
const r = e[
|
|
1301
|
-
if (G?.has(e[
|
|
1352
|
+
const r = e[F];
|
|
1353
|
+
if (G?.has(e[F])) {
|
|
1302
1354
|
untrack(() => {
|
|
1303
|
-
const i = e[
|
|
1355
|
+
const i = e[R];
|
|
1304
1356
|
const s = i[t];
|
|
1305
|
-
const o = e[
|
|
1306
|
-
const u = n?.[
|
|
1357
|
+
const o = e[V] && t in e[V] ? e[V][t] : s;
|
|
1358
|
+
const u = n?.[I]?.[R] ?? n;
|
|
1307
1359
|
if (o === u) return true;
|
|
1308
|
-
const l = e[
|
|
1309
|
-
if (u !== undefined && u === s) delete e[
|
|
1310
|
-
else (e[
|
|
1360
|
+
const l = e[V]?.length || i.length;
|
|
1361
|
+
if (u !== undefined && u === s) delete e[V][t];
|
|
1362
|
+
else (e[V] || (e[V] = Object.create(null)))[t] = u;
|
|
1311
1363
|
const f = isWrappable(u);
|
|
1312
1364
|
if (isWrappable(o)) {
|
|
1313
|
-
const e =
|
|
1314
|
-
e && (e instanceof Set ? e.delete(r) :
|
|
1365
|
+
const e = Q.get(o);
|
|
1366
|
+
e && (e instanceof Set ? e.delete(r) : Q.delete(o));
|
|
1315
1367
|
}
|
|
1316
1368
|
if (recursivelyNotify(r, K) && f) recursivelyAddParent(u, r);
|
|
1317
|
-
e[
|
|
1318
|
-
const c = getNodes(e,
|
|
1369
|
+
e[M]?.[t] && setSignal(e[M][t], true);
|
|
1370
|
+
const c = getNodes(e, q);
|
|
1319
1371
|
c[t] && setSignal(c[t], () => (f ? wrap(u, e) : u));
|
|
1320
1372
|
if (Array.isArray(i)) {
|
|
1321
1373
|
const e = parseInt(t) + 1;
|
|
1322
1374
|
if (e > l) c.length && setSignal(c.length, e);
|
|
1323
1375
|
}
|
|
1324
|
-
c[
|
|
1376
|
+
c[P] && setSignal(c[P], undefined);
|
|
1325
1377
|
});
|
|
1326
1378
|
}
|
|
1327
1379
|
return true;
|
|
1328
1380
|
},
|
|
1329
1381
|
deleteProperty(e, t) {
|
|
1330
|
-
if (G?.has(e[
|
|
1382
|
+
if (G?.has(e[F]) && e[V]?.[t] !== H) {
|
|
1331
1383
|
untrack(() => {
|
|
1332
|
-
const n = e[
|
|
1333
|
-
if (t in e[
|
|
1334
|
-
(e[
|
|
1335
|
-
} else if (e[
|
|
1336
|
-
delete e[
|
|
1384
|
+
const n = e[V] && t in e[V] ? e[V][t] : e[R][t];
|
|
1385
|
+
if (t in e[R]) {
|
|
1386
|
+
(e[V] || (e[V] = Object.create(null)))[t] = H;
|
|
1387
|
+
} else if (e[V] && t in e[V]) {
|
|
1388
|
+
delete e[V][t];
|
|
1337
1389
|
} else return true;
|
|
1338
1390
|
if (isWrappable(n)) {
|
|
1339
|
-
const t =
|
|
1340
|
-
t && (t instanceof Set ? t.delete(e) :
|
|
1391
|
+
const t = Q.get(n);
|
|
1392
|
+
t && (t instanceof Set ? t.delete(e) : Q.delete(n));
|
|
1341
1393
|
}
|
|
1342
|
-
if (e[
|
|
1343
|
-
const r = getNodes(e,
|
|
1394
|
+
if (e[M]?.[t]) setSignal(e[M][t], false);
|
|
1395
|
+
const r = getNodes(e, q);
|
|
1344
1396
|
r[t] && setSignal(r[t], undefined);
|
|
1345
|
-
r[
|
|
1397
|
+
r[P] && setSignal(r[P], undefined);
|
|
1346
1398
|
});
|
|
1347
1399
|
}
|
|
1348
1400
|
return true;
|
|
1349
1401
|
},
|
|
1350
1402
|
ownKeys(e) {
|
|
1351
1403
|
trackSelf(e);
|
|
1352
|
-
return getKeys(e[
|
|
1404
|
+
return getKeys(e[R], e[V], false);
|
|
1353
1405
|
},
|
|
1354
1406
|
getOwnPropertyDescriptor(e, t) {
|
|
1355
|
-
if (t ===
|
|
1356
|
-
return getPropertyDescriptor(e[
|
|
1407
|
+
if (t === F) return { value: e[F], writable: true, configurable: true };
|
|
1408
|
+
return getPropertyDescriptor(e[R], e[V], t);
|
|
1357
1409
|
},
|
|
1358
1410
|
getPrototypeOf(e) {
|
|
1359
|
-
return Object.getPrototypeOf(e[
|
|
1411
|
+
return Object.getPrototypeOf(e[R]);
|
|
1360
1412
|
}
|
|
1361
1413
|
};
|
|
1362
1414
|
function storeSetter(e, t) {
|
|
@@ -1388,17 +1440,17 @@ function createStore(e, t, n) {
|
|
|
1388
1440
|
return [i, e => storeSetter(i, e)];
|
|
1389
1441
|
}
|
|
1390
1442
|
function recursivelyNotify(e, t) {
|
|
1391
|
-
let n = e[
|
|
1443
|
+
let n = e[I] || t?.get(e)?.[I];
|
|
1392
1444
|
let r = false;
|
|
1393
1445
|
if (n) {
|
|
1394
|
-
const e = getNodes(n,
|
|
1446
|
+
const e = getNodes(n, q)[W];
|
|
1395
1447
|
if (e) {
|
|
1396
1448
|
setSignal(e, undefined);
|
|
1397
1449
|
r = true;
|
|
1398
1450
|
}
|
|
1399
|
-
t = n[
|
|
1451
|
+
t = n[B] || t;
|
|
1400
1452
|
}
|
|
1401
|
-
const i =
|
|
1453
|
+
const i = Q.get(n?.[R] || e);
|
|
1402
1454
|
if (!i) return r;
|
|
1403
1455
|
if (i instanceof Set) {
|
|
1404
1456
|
for (let e of i) r = recursivelyNotify(e, t) || r;
|
|
@@ -1407,16 +1459,16 @@ function recursivelyNotify(e, t) {
|
|
|
1407
1459
|
}
|
|
1408
1460
|
function recursivelyAddParent(e, t) {
|
|
1409
1461
|
let n;
|
|
1410
|
-
const r = e[
|
|
1462
|
+
const r = e[I];
|
|
1411
1463
|
if (r) {
|
|
1412
|
-
n = r[
|
|
1413
|
-
e = r[
|
|
1464
|
+
n = r[V];
|
|
1465
|
+
e = r[R];
|
|
1414
1466
|
}
|
|
1415
1467
|
if (t) {
|
|
1416
|
-
let n =
|
|
1417
|
-
if (!n)
|
|
1468
|
+
let n = Q.get(e);
|
|
1469
|
+
if (!n) Q.set(e, t);
|
|
1418
1470
|
else if (n !== t) {
|
|
1419
|
-
if (!(n instanceof Set))
|
|
1471
|
+
if (!(n instanceof Set)) Q.set(e, (n = new Set([n])));
|
|
1420
1472
|
else if (n.has(t)) return;
|
|
1421
1473
|
n.add(t);
|
|
1422
1474
|
} else return;
|
|
@@ -1448,11 +1500,11 @@ function snapshot(e, t, n) {
|
|
|
1448
1500
|
if (!isWrappable(e)) return e;
|
|
1449
1501
|
if (t && t.has(e)) return t.get(e);
|
|
1450
1502
|
if (!t) t = new Map();
|
|
1451
|
-
if ((r = e[
|
|
1452
|
-
s = r[
|
|
1453
|
-
i = Array.isArray(r[
|
|
1454
|
-
t.set(e, s ? (o = i ? [] : Object.create(Object.getPrototypeOf(r[
|
|
1455
|
-
e = r[
|
|
1503
|
+
if ((r = e[I] || n?.get(e)?.[I])) {
|
|
1504
|
+
s = r[V];
|
|
1505
|
+
i = Array.isArray(r[R]);
|
|
1506
|
+
t.set(e, s ? (o = i ? [] : Object.create(Object.getPrototypeOf(r[R]))) : r[R]);
|
|
1507
|
+
e = r[R];
|
|
1456
1508
|
n = K;
|
|
1457
1509
|
} else {
|
|
1458
1510
|
i = Array.isArray(e);
|
|
@@ -1462,7 +1514,7 @@ function snapshot(e, t, n) {
|
|
|
1462
1514
|
const r = s?.length || e.length;
|
|
1463
1515
|
for (let i = 0; i < r; i++) {
|
|
1464
1516
|
l = s && i in s ? s[i] : e[i];
|
|
1465
|
-
if (l ===
|
|
1517
|
+
if (l === H) continue;
|
|
1466
1518
|
if ((u = snapshot(l, t, n)) !== l || o) {
|
|
1467
1519
|
if (!o) t.set(e, (o = [...e]));
|
|
1468
1520
|
o[i] = u;
|
|
@@ -1489,13 +1541,13 @@ function snapshot(e, t, n) {
|
|
|
1489
1541
|
function trueFn() {
|
|
1490
1542
|
return true;
|
|
1491
1543
|
}
|
|
1492
|
-
const
|
|
1544
|
+
const L = {
|
|
1493
1545
|
get(e, t, n) {
|
|
1494
|
-
if (t ===
|
|
1546
|
+
if (t === F) return n;
|
|
1495
1547
|
return e.get(t);
|
|
1496
1548
|
},
|
|
1497
1549
|
has(e, t) {
|
|
1498
|
-
if (t ===
|
|
1550
|
+
if (t === F) return true;
|
|
1499
1551
|
return e.has(t);
|
|
1500
1552
|
},
|
|
1501
1553
|
set: trueFn,
|
|
@@ -1518,15 +1570,15 @@ const U = {
|
|
|
1518
1570
|
function resolveSource(e) {
|
|
1519
1571
|
return !(e = typeof e === "function" ? e() : e) ? {} : e;
|
|
1520
1572
|
}
|
|
1521
|
-
const
|
|
1573
|
+
const z = Symbol(0);
|
|
1522
1574
|
function merge(...e) {
|
|
1523
1575
|
if (e.length === 1 && typeof e[0] !== "function") return e[0];
|
|
1524
1576
|
let t = false;
|
|
1525
1577
|
const n = [];
|
|
1526
1578
|
for (let r = 0; r < e.length; r++) {
|
|
1527
1579
|
const i = e[r];
|
|
1528
|
-
t = t || (!!i &&
|
|
1529
|
-
const s = !!i && i[
|
|
1580
|
+
t = t || (!!i && F in i);
|
|
1581
|
+
const s = !!i && i[z];
|
|
1530
1582
|
if (s) n.push(...s);
|
|
1531
1583
|
else n.push(typeof i === "function" ? ((t = true), createMemo(i)) : i);
|
|
1532
1584
|
}
|
|
@@ -1534,7 +1586,7 @@ function merge(...e) {
|
|
|
1534
1586
|
return new Proxy(
|
|
1535
1587
|
{
|
|
1536
1588
|
get(e) {
|
|
1537
|
-
if (e ===
|
|
1589
|
+
if (e === z) return n;
|
|
1538
1590
|
for (let t = n.length - 1; t >= 0; t--) {
|
|
1539
1591
|
const r = resolveSource(n[t]);
|
|
1540
1592
|
if (e in r) return r[e];
|
|
@@ -1552,7 +1604,7 @@ function merge(...e) {
|
|
|
1552
1604
|
return [...new Set(e)];
|
|
1553
1605
|
}
|
|
1554
1606
|
},
|
|
1555
|
-
|
|
1607
|
+
L
|
|
1556
1608
|
);
|
|
1557
1609
|
}
|
|
1558
1610
|
const r = Object.create(null);
|
|
@@ -1584,12 +1636,12 @@ function merge(...e) {
|
|
|
1584
1636
|
if (n.get) Object.defineProperty(o, t, n);
|
|
1585
1637
|
else o[t] = n.value;
|
|
1586
1638
|
}
|
|
1587
|
-
o[
|
|
1639
|
+
o[z] = n;
|
|
1588
1640
|
return o;
|
|
1589
1641
|
}
|
|
1590
1642
|
function omit(e, ...t) {
|
|
1591
1643
|
const n = new Set(t);
|
|
1592
|
-
if (y &&
|
|
1644
|
+
if (y && F in e) {
|
|
1593
1645
|
return new Proxy(
|
|
1594
1646
|
{
|
|
1595
1647
|
get(t) {
|
|
@@ -1602,7 +1654,7 @@ function omit(e, ...t) {
|
|
|
1602
1654
|
return Object.keys(e).filter(e => !n.has(e));
|
|
1603
1655
|
}
|
|
1604
1656
|
},
|
|
1605
|
-
|
|
1657
|
+
L
|
|
1606
1658
|
);
|
|
1607
1659
|
}
|
|
1608
1660
|
const r = {};
|
|
@@ -1620,66 +1672,66 @@ function mapArray(e, t, n) {
|
|
|
1620
1672
|
const r = typeof n?.keyed === "function" ? n.keyed : undefined;
|
|
1621
1673
|
return createMemo(
|
|
1622
1674
|
updateKeyedMap.bind({
|
|
1623
|
-
|
|
1675
|
+
Ne: createOwner(),
|
|
1624
1676
|
ve: 0,
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
Ae: [],
|
|
1677
|
+
ke: e,
|
|
1678
|
+
je: [],
|
|
1679
|
+
Ae: t,
|
|
1629
1680
|
Ee: [],
|
|
1681
|
+
Pe: [],
|
|
1630
1682
|
We: r,
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1683
|
+
Ie: r || n?.keyed === false ? [] : undefined,
|
|
1684
|
+
Fe: t.length > 1 ? [] : undefined,
|
|
1685
|
+
He: n?.fallback
|
|
1634
1686
|
})
|
|
1635
1687
|
);
|
|
1636
1688
|
}
|
|
1637
|
-
const
|
|
1689
|
+
const J = { pureWrite: true };
|
|
1638
1690
|
function updateKeyedMap() {
|
|
1639
|
-
const e = this.
|
|
1691
|
+
const e = this.ke() || [],
|
|
1640
1692
|
t = e.length;
|
|
1641
|
-
e[
|
|
1642
|
-
runWithOwner(this.
|
|
1693
|
+
e[P];
|
|
1694
|
+
runWithOwner(this.Ne, () => {
|
|
1643
1695
|
let n,
|
|
1644
1696
|
r,
|
|
1645
|
-
i = this.
|
|
1697
|
+
i = this.Ie
|
|
1646
1698
|
? () => {
|
|
1647
|
-
this.
|
|
1648
|
-
this.
|
|
1649
|
-
return this.
|
|
1650
|
-
read.bind(null, this.
|
|
1651
|
-
this.
|
|
1699
|
+
this.Ie[r] = signal(e[r], J);
|
|
1700
|
+
this.Fe && (this.Fe[r] = signal(r, J));
|
|
1701
|
+
return this.Ae(
|
|
1702
|
+
read.bind(null, this.Ie[r]),
|
|
1703
|
+
this.Fe ? read.bind(null, this.Fe[r]) : undefined
|
|
1652
1704
|
);
|
|
1653
1705
|
}
|
|
1654
|
-
: this.
|
|
1706
|
+
: this.Fe
|
|
1655
1707
|
? () => {
|
|
1656
1708
|
const t = e[r];
|
|
1657
|
-
this.
|
|
1658
|
-
return this.
|
|
1709
|
+
this.Fe[r] = signal(r, J);
|
|
1710
|
+
return this.Ae(() => t, read.bind(null, this.Fe[r]));
|
|
1659
1711
|
}
|
|
1660
1712
|
: () => {
|
|
1661
1713
|
const t = e[r];
|
|
1662
|
-
return this.
|
|
1714
|
+
return this.Ae(() => t);
|
|
1663
1715
|
};
|
|
1664
1716
|
if (t === 0) {
|
|
1665
1717
|
if (this.ve !== 0) {
|
|
1666
|
-
this.
|
|
1718
|
+
this.Ne.dispose(false);
|
|
1719
|
+
this.Pe = [];
|
|
1720
|
+
this.je = [];
|
|
1667
1721
|
this.Ee = [];
|
|
1668
|
-
this.ke = [];
|
|
1669
|
-
this.Ae = [];
|
|
1670
1722
|
this.ve = 0;
|
|
1671
|
-
this.
|
|
1672
|
-
this.
|
|
1723
|
+
this.Ie && (this.Ie = []);
|
|
1724
|
+
this.Fe && (this.Fe = []);
|
|
1673
1725
|
}
|
|
1674
|
-
if (this.
|
|
1675
|
-
this.
|
|
1726
|
+
if (this.He && !this.Ee[0]) {
|
|
1727
|
+
this.Ee[0] = runWithOwner((this.Pe[0] = createOwner()), this.He);
|
|
1676
1728
|
}
|
|
1677
1729
|
} else if (this.ve === 0) {
|
|
1678
|
-
if (this.
|
|
1679
|
-
this.
|
|
1730
|
+
if (this.Pe[0]) this.Pe[0].dispose();
|
|
1731
|
+
this.Ee = new Array(t);
|
|
1680
1732
|
for (r = 0; r < t; r++) {
|
|
1681
|
-
this.
|
|
1682
|
-
this.
|
|
1733
|
+
this.je[r] = e[r];
|
|
1734
|
+
this.Ee[r] = runWithOwner((this.Pe[r] = createOwner()), i);
|
|
1683
1735
|
}
|
|
1684
1736
|
this.ve = t;
|
|
1685
1737
|
} else {
|
|
@@ -1692,26 +1744,26 @@ function updateKeyedMap() {
|
|
|
1692
1744
|
a,
|
|
1693
1745
|
d = new Array(t),
|
|
1694
1746
|
h = new Array(t),
|
|
1695
|
-
p = this.
|
|
1696
|
-
y = this.
|
|
1747
|
+
p = this.Ie ? new Array(t) : undefined,
|
|
1748
|
+
y = this.Fe ? new Array(t) : undefined;
|
|
1697
1749
|
for (
|
|
1698
1750
|
s = 0, o = Math.min(this.ve, t);
|
|
1699
|
-
s < o && (this.
|
|
1751
|
+
s < o && (this.je[s] === e[s] || (this.Ie && compare(this.We, this.je[s], e[s])));
|
|
1700
1752
|
s++
|
|
1701
1753
|
) {
|
|
1702
|
-
if (this.
|
|
1754
|
+
if (this.Ie) setSignal(this.Ie[s], e[s]);
|
|
1703
1755
|
}
|
|
1704
1756
|
for (
|
|
1705
1757
|
o = this.ve - 1, u = t - 1;
|
|
1706
1758
|
o >= s &&
|
|
1707
1759
|
u >= s &&
|
|
1708
|
-
(this.
|
|
1760
|
+
(this.je[o] === e[u] || (this.Ie && compare(this.We, this.je[o], e[u])));
|
|
1709
1761
|
o--, u--
|
|
1710
1762
|
) {
|
|
1711
|
-
d[u] = this.
|
|
1712
|
-
h[u] = this.
|
|
1713
|
-
p && (p[u] = this.
|
|
1714
|
-
y && (y[u] = this.
|
|
1763
|
+
d[u] = this.Ee[o];
|
|
1764
|
+
h[u] = this.Pe[o];
|
|
1765
|
+
p && (p[u] = this.Ie[o]);
|
|
1766
|
+
y && (y[u] = this.Fe[o]);
|
|
1715
1767
|
}
|
|
1716
1768
|
c = new Map();
|
|
1717
1769
|
a = new Array(u + 1);
|
|
@@ -1723,144 +1775,144 @@ function updateKeyedMap() {
|
|
|
1723
1775
|
c.set(f, r);
|
|
1724
1776
|
}
|
|
1725
1777
|
for (n = s; n <= o; n++) {
|
|
1726
|
-
l = this.
|
|
1778
|
+
l = this.je[n];
|
|
1727
1779
|
f = this.We ? this.We(l) : l;
|
|
1728
1780
|
r = c.get(f);
|
|
1729
1781
|
if (r !== undefined && r !== -1) {
|
|
1730
|
-
d[r] = this.
|
|
1731
|
-
h[r] = this.
|
|
1732
|
-
p && (p[r] = this.
|
|
1733
|
-
y && (y[r] = this.
|
|
1782
|
+
d[r] = this.Ee[n];
|
|
1783
|
+
h[r] = this.Pe[n];
|
|
1784
|
+
p && (p[r] = this.Ie[n]);
|
|
1785
|
+
y && (y[r] = this.Fe[n]);
|
|
1734
1786
|
r = a[r];
|
|
1735
1787
|
c.set(f, r);
|
|
1736
|
-
} else this.
|
|
1788
|
+
} else this.Pe[n].dispose();
|
|
1737
1789
|
}
|
|
1738
1790
|
for (r = s; r < t; r++) {
|
|
1739
1791
|
if (r in d) {
|
|
1740
|
-
this.
|
|
1741
|
-
this.
|
|
1792
|
+
this.Ee[r] = d[r];
|
|
1793
|
+
this.Pe[r] = h[r];
|
|
1742
1794
|
if (p) {
|
|
1743
|
-
this.
|
|
1744
|
-
setSignal(this.
|
|
1795
|
+
this.Ie[r] = p[r];
|
|
1796
|
+
setSignal(this.Ie[r], e[r]);
|
|
1745
1797
|
}
|
|
1746
1798
|
if (y) {
|
|
1747
|
-
this.
|
|
1748
|
-
setSignal(this.
|
|
1799
|
+
this.Fe[r] = y[r];
|
|
1800
|
+
setSignal(this.Fe[r], r);
|
|
1749
1801
|
}
|
|
1750
1802
|
} else {
|
|
1751
|
-
this.
|
|
1803
|
+
this.Ee[r] = runWithOwner((this.Pe[r] = createOwner()), i);
|
|
1752
1804
|
}
|
|
1753
1805
|
}
|
|
1754
|
-
this.
|
|
1755
|
-
this.
|
|
1806
|
+
this.Ee = this.Ee.slice(0, (this.ve = t));
|
|
1807
|
+
this.je = e.slice(0);
|
|
1756
1808
|
}
|
|
1757
1809
|
});
|
|
1758
|
-
return this.
|
|
1810
|
+
return this.Ee;
|
|
1759
1811
|
}
|
|
1760
1812
|
function repeat(e, t, n) {
|
|
1761
1813
|
return updateRepeat.bind({
|
|
1762
|
-
|
|
1814
|
+
Ne: createOwner(),
|
|
1763
1815
|
ve: 0,
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1816
|
+
Qe: 0,
|
|
1817
|
+
Re: e,
|
|
1818
|
+
Ae: t,
|
|
1819
|
+
Pe: [],
|
|
1767
1820
|
Ee: [],
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
Ie: n?.fallback
|
|
1821
|
+
Ve: n?.from,
|
|
1822
|
+
He: n?.fallback
|
|
1771
1823
|
});
|
|
1772
1824
|
}
|
|
1773
1825
|
function updateRepeat() {
|
|
1774
|
-
const e = this.
|
|
1775
|
-
const t = this.
|
|
1776
|
-
runWithOwner(this.
|
|
1826
|
+
const e = this.Re();
|
|
1827
|
+
const t = this.Ve?.() || 0;
|
|
1828
|
+
runWithOwner(this.Ne, () => {
|
|
1777
1829
|
if (e === 0) {
|
|
1778
1830
|
if (this.ve !== 0) {
|
|
1779
|
-
this.
|
|
1831
|
+
this.Ne.dispose(false);
|
|
1832
|
+
this.Pe = [];
|
|
1780
1833
|
this.Ee = [];
|
|
1781
|
-
this.Ae = [];
|
|
1782
1834
|
this.ve = 0;
|
|
1783
1835
|
}
|
|
1784
|
-
if (this.
|
|
1785
|
-
this.
|
|
1836
|
+
if (this.He && !this.Ee[0]) {
|
|
1837
|
+
this.Ee[0] = runWithOwner((this.Pe[0] = createOwner()), this.He);
|
|
1786
1838
|
}
|
|
1787
1839
|
return;
|
|
1788
1840
|
}
|
|
1789
1841
|
const n = t + e;
|
|
1790
|
-
const r = this.
|
|
1791
|
-
if (this.ve === 0 && this.
|
|
1792
|
-
for (let e = n; e < r; e++) this.
|
|
1793
|
-
if (this.
|
|
1794
|
-
let e = this.
|
|
1795
|
-
while (e < t && e < this.ve) this.
|
|
1796
|
-
this.
|
|
1797
|
-
this.
|
|
1798
|
-
} else if (this.
|
|
1799
|
-
let n = r - this.
|
|
1800
|
-
let i = this.
|
|
1801
|
-
this.
|
|
1842
|
+
const r = this.Qe + this.ve;
|
|
1843
|
+
if (this.ve === 0 && this.Pe[0]) this.Pe[0].dispose();
|
|
1844
|
+
for (let e = n; e < r; e++) this.Pe[e - this.Qe].dispose();
|
|
1845
|
+
if (this.Qe < t) {
|
|
1846
|
+
let e = this.Qe;
|
|
1847
|
+
while (e < t && e < this.ve) this.Pe[e++].dispose();
|
|
1848
|
+
this.Pe.splice(0, t - this.Qe);
|
|
1849
|
+
this.Ee.splice(0, t - this.Qe);
|
|
1850
|
+
} else if (this.Qe > t) {
|
|
1851
|
+
let n = r - this.Qe - 1;
|
|
1852
|
+
let i = this.Qe - t;
|
|
1853
|
+
this.Pe.length = this.Ee.length = e;
|
|
1802
1854
|
while (n >= i) {
|
|
1855
|
+
this.Pe[n] = this.Pe[n - i];
|
|
1803
1856
|
this.Ee[n] = this.Ee[n - i];
|
|
1804
|
-
this.Ae[n] = this.Ae[n - i];
|
|
1805
1857
|
n--;
|
|
1806
1858
|
}
|
|
1807
1859
|
for (let e = 0; e < i; e++) {
|
|
1808
|
-
this.
|
|
1860
|
+
this.Ee[e] = runWithOwner((this.Pe[e] = createOwner()), () => this.Ae(e + t));
|
|
1809
1861
|
}
|
|
1810
1862
|
}
|
|
1811
1863
|
for (let e = r; e < n; e++) {
|
|
1812
|
-
this.
|
|
1864
|
+
this.Ee[e - t] = runWithOwner((this.Pe[e - t] = createOwner()), () => this.Ae(e));
|
|
1813
1865
|
}
|
|
1814
|
-
this.
|
|
1815
|
-
this.
|
|
1866
|
+
this.Ee = this.Ee.slice(0, e);
|
|
1867
|
+
this.Qe = t;
|
|
1816
1868
|
this.ve = e;
|
|
1817
1869
|
});
|
|
1818
|
-
return this.
|
|
1870
|
+
return this.Ee;
|
|
1819
1871
|
}
|
|
1820
1872
|
function compare(e, t, n) {
|
|
1821
1873
|
return e ? e(t) === e(n) : true;
|
|
1822
1874
|
}
|
|
1823
1875
|
function boundaryComputed(e, t) {
|
|
1824
1876
|
const n = computed(e, undefined, {
|
|
1825
|
-
|
|
1877
|
+
be: {
|
|
1826
1878
|
le() {
|
|
1827
1879
|
let e = this.$;
|
|
1828
|
-
this.$ &= ~this.
|
|
1829
|
-
if (this.
|
|
1880
|
+
this.$ &= ~this.qe;
|
|
1881
|
+
if (this.qe & f && !(this.$ & a)) {
|
|
1830
1882
|
e &= ~f;
|
|
1831
1883
|
}
|
|
1832
|
-
this.
|
|
1884
|
+
this._e.notify(this, this.qe, e);
|
|
1833
1885
|
},
|
|
1834
|
-
|
|
1886
|
+
qe: t
|
|
1835
1887
|
}
|
|
1836
1888
|
});
|
|
1837
|
-
n.
|
|
1838
|
-
n.
|
|
1889
|
+
n.qe = t;
|
|
1890
|
+
n.pe = true;
|
|
1839
1891
|
return n;
|
|
1840
1892
|
}
|
|
1841
1893
|
function createBoundChildren(e, t, n, r) {
|
|
1842
|
-
const i = e.
|
|
1843
|
-
i.addChild((e.
|
|
1844
|
-
onCleanup(() => i.removeChild(e.
|
|
1894
|
+
const i = e._e;
|
|
1895
|
+
i.addChild((e._e = n));
|
|
1896
|
+
onCleanup(() => i.removeChild(e._e));
|
|
1845
1897
|
return runWithOwner(e, () => {
|
|
1846
1898
|
const e = computed(t);
|
|
1847
1899
|
return boundaryComputed(() => staleValues(() => flatten(read(e))), r);
|
|
1848
1900
|
});
|
|
1849
1901
|
}
|
|
1850
1902
|
class ConditionalQueue extends Queue {
|
|
1851
|
-
|
|
1852
|
-
|
|
1903
|
+
Me;
|
|
1904
|
+
De = new Set();
|
|
1853
1905
|
M = new Set();
|
|
1854
1906
|
constructor(e) {
|
|
1855
1907
|
super();
|
|
1856
|
-
this.
|
|
1908
|
+
this.Me = e;
|
|
1857
1909
|
}
|
|
1858
1910
|
run(e) {
|
|
1859
|
-
if (!e || read(this.
|
|
1911
|
+
if (!e || read(this.Me)) return;
|
|
1860
1912
|
return super.run(e);
|
|
1861
1913
|
}
|
|
1862
1914
|
notify(e, t, n) {
|
|
1863
|
-
if (read(this.
|
|
1915
|
+
if (read(this.Me)) {
|
|
1864
1916
|
if (t & f) {
|
|
1865
1917
|
if (n & f) {
|
|
1866
1918
|
this.M.add(e);
|
|
@@ -1869,69 +1921,69 @@ class ConditionalQueue extends Queue {
|
|
|
1869
1921
|
}
|
|
1870
1922
|
if (t & c) {
|
|
1871
1923
|
if (n & c) {
|
|
1872
|
-
this.
|
|
1924
|
+
this.De.add(e);
|
|
1873
1925
|
t &= ~c;
|
|
1874
|
-
} else if (this.
|
|
1926
|
+
} else if (this.De.delete(e)) t &= ~c;
|
|
1875
1927
|
}
|
|
1876
1928
|
}
|
|
1877
1929
|
return t ? super.notify(e, t, n) : true;
|
|
1878
1930
|
}
|
|
1879
1931
|
}
|
|
1880
1932
|
class CollectionQueue extends Queue {
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1933
|
+
Be;
|
|
1934
|
+
Pe = new Set();
|
|
1935
|
+
Me = signal(false, { pureWrite: true });
|
|
1936
|
+
Te = false;
|
|
1885
1937
|
constructor(e) {
|
|
1886
1938
|
super();
|
|
1887
|
-
this.
|
|
1939
|
+
this.Be = e;
|
|
1888
1940
|
}
|
|
1889
1941
|
run(e) {
|
|
1890
|
-
if (!e || read(this.
|
|
1942
|
+
if (!e || read(this.Me)) return;
|
|
1891
1943
|
return super.run(e);
|
|
1892
1944
|
}
|
|
1893
1945
|
notify(e, t, n) {
|
|
1894
|
-
if (!(t & this.
|
|
1895
|
-
if (n & this.
|
|
1896
|
-
this.
|
|
1897
|
-
if (this.
|
|
1898
|
-
} else if (this.
|
|
1899
|
-
this.
|
|
1900
|
-
if (this.
|
|
1901
|
-
}
|
|
1902
|
-
t &= ~this.
|
|
1946
|
+
if (!(t & this.Be) || (this.Be & f && this.Te)) return super.notify(e, t, n);
|
|
1947
|
+
if (n & this.Be) {
|
|
1948
|
+
this.Pe.add(e);
|
|
1949
|
+
if (this.Pe.size === 1) setSignal(this.Me, true);
|
|
1950
|
+
} else if (this.Pe.size > 0) {
|
|
1951
|
+
this.Pe.delete(e);
|
|
1952
|
+
if (this.Pe.size === 0) setSignal(this.Me, false);
|
|
1953
|
+
}
|
|
1954
|
+
t &= ~this.Be;
|
|
1903
1955
|
return t ? super.notify(e, t, n) : true;
|
|
1904
1956
|
}
|
|
1905
1957
|
}
|
|
1906
|
-
var
|
|
1958
|
+
var X;
|
|
1907
1959
|
(function (e) {
|
|
1908
1960
|
e["VISIBLE"] = "visible";
|
|
1909
1961
|
e["HIDDEN"] = "hidden";
|
|
1910
|
-
})(
|
|
1962
|
+
})(X || (X = {}));
|
|
1911
1963
|
function createBoundary(e, t) {
|
|
1912
1964
|
const n = createOwner();
|
|
1913
|
-
const r = new ConditionalQueue(computed(() => t() ===
|
|
1965
|
+
const r = new ConditionalQueue(computed(() => t() === X.HIDDEN));
|
|
1914
1966
|
const i = createBoundChildren(n, e, r, 0);
|
|
1915
1967
|
computed(() => {
|
|
1916
|
-
const e = read(r.
|
|
1917
|
-
i.
|
|
1968
|
+
const e = read(r.Me);
|
|
1969
|
+
i.qe = e ? c | f : 0;
|
|
1918
1970
|
if (!e) {
|
|
1919
1971
|
r.M.forEach(e => r.notify(e, f, f));
|
|
1920
|
-
r.
|
|
1972
|
+
r.De.forEach(e => r.notify(e, c, c));
|
|
1921
1973
|
r.M.clear();
|
|
1922
|
-
r.
|
|
1974
|
+
r.De.clear();
|
|
1923
1975
|
}
|
|
1924
1976
|
});
|
|
1925
|
-
return () => (read(r.
|
|
1977
|
+
return () => (read(r.Me) ? undefined : read(i));
|
|
1926
1978
|
}
|
|
1927
1979
|
function createCollectionBoundary(e, t, n) {
|
|
1928
1980
|
const r = createOwner();
|
|
1929
1981
|
const i = new CollectionQueue(e);
|
|
1930
1982
|
const s = createBoundChildren(r, t, i, e);
|
|
1931
1983
|
const o = computed(() => {
|
|
1932
|
-
if (!read(i.
|
|
1984
|
+
if (!read(i.Me)) {
|
|
1933
1985
|
const e = read(s);
|
|
1934
|
-
if (!untrack(() => read(i.
|
|
1986
|
+
if (!untrack(() => read(i.Me))) i.Te = true;
|
|
1935
1987
|
return e;
|
|
1936
1988
|
}
|
|
1937
1989
|
return n(i);
|
|
@@ -1943,23 +1995,23 @@ function createLoadBoundary(e, t) {
|
|
|
1943
1995
|
}
|
|
1944
1996
|
function collectErrorSources(e, t) {
|
|
1945
1997
|
let n = true;
|
|
1946
|
-
let r = e.
|
|
1998
|
+
let r = e.P;
|
|
1947
1999
|
while (r !== null) {
|
|
1948
|
-
const e = r.
|
|
1949
|
-
if (e.
|
|
2000
|
+
const e = r.I;
|
|
2001
|
+
if (e.P && e.$ & c) {
|
|
1950
2002
|
n = false;
|
|
1951
2003
|
collectErrorSources(e, t);
|
|
1952
2004
|
}
|
|
1953
|
-
r = r.
|
|
2005
|
+
r = r.W;
|
|
1954
2006
|
}
|
|
1955
2007
|
n && t.push(e);
|
|
1956
2008
|
}
|
|
1957
2009
|
function createErrorBoundary(e, t) {
|
|
1958
2010
|
return createCollectionBoundary(c, e, e => {
|
|
1959
|
-
let n = e.
|
|
1960
|
-
return t(n.
|
|
2011
|
+
let n = e.Pe.values().next().value;
|
|
2012
|
+
return t(n.K, () => {
|
|
1961
2013
|
const t = [];
|
|
1962
|
-
for (const n of e.
|
|
2014
|
+
for (const n of e.Pe) collectErrorSources(n, t);
|
|
1963
2015
|
for (const e of t) recompute(e);
|
|
1964
2016
|
schedule();
|
|
1965
2017
|
});
|
|
@@ -2014,9 +2066,9 @@ function flattenArray(e, t = [], n) {
|
|
|
2014
2066
|
if (r) throw r;
|
|
2015
2067
|
return i;
|
|
2016
2068
|
}
|
|
2017
|
-
exports.$PROXY =
|
|
2018
|
-
exports.$TARGET =
|
|
2019
|
-
exports.$TRACK =
|
|
2069
|
+
exports.$PROXY = F;
|
|
2070
|
+
exports.$TARGET = I;
|
|
2071
|
+
exports.$TRACK = P;
|
|
2020
2072
|
exports.ContextNotFoundError = ContextNotFoundError;
|
|
2021
2073
|
exports.NoOwnerError = NoOwnerError;
|
|
2022
2074
|
exports.NotReadyError = NotReadyError;
|