@solidjs/signals 0.13.11 → 0.13.12
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 +225 -50
- package/dist/node.cjs +1061 -1086
- package/dist/prod.js +709 -728
- package/dist/types/core/dev.d.ts +26 -0
- package/dist/types/core/index.d.ts +1 -1
- package/dist/types/core/scheduler.d.ts +1 -1
- package/dist/types/index.d.ts +4 -2
- package/package.json +1 -1
package/dist/node.cjs
CHANGED
|
@@ -142,66 +142,25 @@ function adjustHeight(e, t) {
|
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
|
-
const x =
|
|
146
|
-
const v =
|
|
147
|
-
|
|
148
|
-
getChildren: getChildren,
|
|
149
|
-
getSignals: getSignals,
|
|
150
|
-
getParent: getParent,
|
|
151
|
-
getSources: getSources,
|
|
152
|
-
getObservers: getObservers
|
|
153
|
-
};
|
|
154
|
-
function getChildren(e) {
|
|
155
|
-
const t = [];
|
|
156
|
-
let n = e.T;
|
|
157
|
-
while (n) {
|
|
158
|
-
t.push(n);
|
|
159
|
-
n = n.H;
|
|
160
|
-
}
|
|
161
|
-
return t;
|
|
162
|
-
}
|
|
163
|
-
function getSignals(e) {
|
|
164
|
-
return e.q ? [...e.q] : [];
|
|
165
|
-
}
|
|
166
|
-
function getParent(e) {
|
|
167
|
-
return e.i;
|
|
168
|
-
}
|
|
169
|
-
function getSources(e) {
|
|
170
|
-
const t = [];
|
|
171
|
-
let n = e.N;
|
|
172
|
-
while (n) {
|
|
173
|
-
t.push(n.R);
|
|
174
|
-
n = n.j;
|
|
175
|
-
}
|
|
176
|
-
return t;
|
|
177
|
-
}
|
|
178
|
-
function getObservers(e) {
|
|
179
|
-
const t = [];
|
|
180
|
-
let n = e.O;
|
|
181
|
-
while (n) {
|
|
182
|
-
t.push(n.k);
|
|
183
|
-
n = n.P;
|
|
184
|
-
}
|
|
185
|
-
return t;
|
|
186
|
-
}
|
|
187
|
-
const P = new Set();
|
|
145
|
+
const x = undefined;
|
|
146
|
+
const v = new Set();
|
|
147
|
+
const P = { l: new Array(2e3).fill(undefined), _: false, A: 0, S: 0 };
|
|
188
148
|
const k = { l: new Array(2e3).fill(undefined), _: false, A: 0, S: 0 };
|
|
189
|
-
|
|
190
|
-
let C =
|
|
191
|
-
let W =
|
|
149
|
+
let E = 0;
|
|
150
|
+
let C = null;
|
|
151
|
+
let W = false;
|
|
192
152
|
let A = false;
|
|
193
|
-
let N =
|
|
194
|
-
let j = null;
|
|
153
|
+
let N = null;
|
|
195
154
|
function enforceLoadingBoundary(e) {}
|
|
196
155
|
function shouldReadStashedOptimisticValue(e) {
|
|
197
|
-
return !!
|
|
156
|
+
return !!N?.has(e);
|
|
198
157
|
}
|
|
199
158
|
function runLaneEffects(e) {
|
|
200
|
-
for (const t of
|
|
201
|
-
if (t.
|
|
202
|
-
const n = t.
|
|
159
|
+
for (const t of L) {
|
|
160
|
+
if (t.T || t.H.size > 0) continue;
|
|
161
|
+
const n = t.q[e - 1];
|
|
203
162
|
if (n.length) {
|
|
204
|
-
t.
|
|
163
|
+
t.q[e - 1] = [];
|
|
205
164
|
runQueue(n, e);
|
|
206
165
|
}
|
|
207
166
|
}
|
|
@@ -209,83 +168,83 @@ function runLaneEffects(e) {
|
|
|
209
168
|
function queueStashedOptimisticEffects(e) {
|
|
210
169
|
for (let t = e.O; t !== null; t = t.P) {
|
|
211
170
|
const e = t.k;
|
|
212
|
-
if (!e.
|
|
213
|
-
if (e.
|
|
214
|
-
if (!e.
|
|
215
|
-
e.
|
|
216
|
-
e.
|
|
171
|
+
if (!e.D) continue;
|
|
172
|
+
if (e.D === y) {
|
|
173
|
+
if (!e.F) {
|
|
174
|
+
e.F = true;
|
|
175
|
+
e.M.enqueue(g, e.V);
|
|
217
176
|
}
|
|
218
177
|
continue;
|
|
219
178
|
}
|
|
220
|
-
const n = e.m & o ?
|
|
179
|
+
const n = e.m & o ? k : P;
|
|
221
180
|
if (n.A > e.o) n.A = e.o;
|
|
222
181
|
insertIntoHeap(e, n);
|
|
223
182
|
}
|
|
224
183
|
}
|
|
225
184
|
function setProjectionWriteActive(e) {
|
|
226
|
-
|
|
185
|
+
A = e;
|
|
227
186
|
}
|
|
228
187
|
function mergeTransitionState(e, t) {
|
|
229
|
-
t.
|
|
230
|
-
e.
|
|
231
|
-
for (const n of
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
188
|
+
t.B = e;
|
|
189
|
+
e.G.push(...t.G);
|
|
190
|
+
for (const n of L) if (n.K === t) n.K = e;
|
|
191
|
+
e.U.push(...t.U);
|
|
192
|
+
for (const n of t.J) e.J.add(n);
|
|
193
|
+
for (const [n, r] of t.X) {
|
|
194
|
+
let t = e.X.get(n);
|
|
195
|
+
if (!t) e.X.set(n, (t = new Set()));
|
|
196
|
+
for (const e of r) t.add(e);
|
|
238
197
|
}
|
|
239
198
|
}
|
|
240
199
|
function resolveOptimisticNodes(e) {
|
|
241
200
|
for (let t = 0; t < e.length; t++) {
|
|
242
201
|
const n = e[t];
|
|
243
|
-
n.
|
|
244
|
-
if (n.
|
|
245
|
-
n
|
|
246
|
-
n.
|
|
202
|
+
n.Y = undefined;
|
|
203
|
+
if (n.Z !== S) {
|
|
204
|
+
n.$ = n.Z;
|
|
205
|
+
n.Z = S;
|
|
247
206
|
}
|
|
248
|
-
const r = n.
|
|
249
|
-
n.
|
|
250
|
-
if (r !== S && n
|
|
251
|
-
n.
|
|
207
|
+
const r = n.ee;
|
|
208
|
+
n.ee = S;
|
|
209
|
+
if (r !== S && n.$ !== r) insertSubs(n, true);
|
|
210
|
+
n.K = null;
|
|
252
211
|
}
|
|
253
212
|
e.length = 0;
|
|
254
213
|
}
|
|
255
214
|
function cleanupCompletedLanes(e) {
|
|
256
|
-
for (const t of
|
|
257
|
-
const n = e ? t.
|
|
215
|
+
for (const t of L) {
|
|
216
|
+
const n = e ? t.K === e : !t.K;
|
|
258
217
|
if (!n) continue;
|
|
259
|
-
if (!t.
|
|
260
|
-
if (t.
|
|
261
|
-
if (t.
|
|
218
|
+
if (!t.T) {
|
|
219
|
+
if (t.q[0].length) runQueue(t.q[0], p);
|
|
220
|
+
if (t.q[1].length) runQueue(t.q[1], g);
|
|
262
221
|
}
|
|
263
|
-
if (t.
|
|
264
|
-
t.
|
|
265
|
-
t.
|
|
266
|
-
t.
|
|
267
|
-
|
|
268
|
-
|
|
222
|
+
if (t.te.Y === t) t.te.Y = undefined;
|
|
223
|
+
t.H.clear();
|
|
224
|
+
t.q[0].length = 0;
|
|
225
|
+
t.q[1].length = 0;
|
|
226
|
+
L.delete(t);
|
|
227
|
+
R.delete(t.te);
|
|
269
228
|
}
|
|
270
229
|
}
|
|
271
230
|
function schedule() {
|
|
272
|
-
if (
|
|
273
|
-
|
|
274
|
-
if (!
|
|
231
|
+
if (W) return;
|
|
232
|
+
W = true;
|
|
233
|
+
if (!j.ne && !A) queueMicrotask(flush);
|
|
275
234
|
}
|
|
276
235
|
class Queue {
|
|
277
236
|
i = null;
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
created =
|
|
237
|
+
re = [[], []];
|
|
238
|
+
ie = [];
|
|
239
|
+
created = E;
|
|
281
240
|
addChild(e) {
|
|
282
|
-
this.
|
|
241
|
+
this.ie.push(e);
|
|
283
242
|
e.i = this;
|
|
284
243
|
}
|
|
285
244
|
removeChild(e) {
|
|
286
|
-
const t = this.
|
|
245
|
+
const t = this.ie.indexOf(e);
|
|
287
246
|
if (t >= 0) {
|
|
288
|
-
this.
|
|
247
|
+
this.ie.splice(t, 1);
|
|
289
248
|
e.i = null;
|
|
290
249
|
}
|
|
291
250
|
}
|
|
@@ -294,124 +253,125 @@ class Queue {
|
|
|
294
253
|
return false;
|
|
295
254
|
}
|
|
296
255
|
run(e) {
|
|
297
|
-
if (this.
|
|
298
|
-
const t = this.
|
|
299
|
-
this.
|
|
256
|
+
if (this.re[e - 1].length) {
|
|
257
|
+
const t = this.re[e - 1];
|
|
258
|
+
this.re[e - 1] = [];
|
|
300
259
|
runQueue(t, e);
|
|
301
260
|
}
|
|
302
|
-
for (let t = 0; t < this.
|
|
261
|
+
for (let t = 0; t < this.ie.length; t++) this.ie[t].run?.(e);
|
|
303
262
|
}
|
|
304
263
|
enqueue(e, t) {
|
|
305
264
|
if (e) {
|
|
306
|
-
if (
|
|
307
|
-
const n = findLane(
|
|
308
|
-
n.
|
|
265
|
+
if (B) {
|
|
266
|
+
const n = findLane(B);
|
|
267
|
+
n.q[e - 1].push(t);
|
|
309
268
|
} else {
|
|
310
|
-
this.
|
|
269
|
+
this.re[e - 1].push(t);
|
|
311
270
|
}
|
|
312
271
|
}
|
|
313
272
|
schedule();
|
|
314
273
|
}
|
|
315
274
|
stashQueues(e) {
|
|
316
|
-
e.
|
|
317
|
-
e.
|
|
318
|
-
this.
|
|
319
|
-
for (let t = 0; t < this.
|
|
320
|
-
let n = this.
|
|
321
|
-
let r = e.
|
|
275
|
+
e.re[0].push(...this.re[0]);
|
|
276
|
+
e.re[1].push(...this.re[1]);
|
|
277
|
+
this.re = [[], []];
|
|
278
|
+
for (let t = 0; t < this.ie.length; t++) {
|
|
279
|
+
let n = this.ie[t];
|
|
280
|
+
let r = e.ie[t];
|
|
322
281
|
if (!r) {
|
|
323
|
-
r = {
|
|
324
|
-
e.
|
|
282
|
+
r = { re: [[], []], ie: [] };
|
|
283
|
+
e.ie[t] = r;
|
|
325
284
|
}
|
|
326
285
|
n.stashQueues(r);
|
|
327
286
|
}
|
|
328
287
|
}
|
|
329
288
|
restoreQueues(e) {
|
|
330
|
-
this.
|
|
331
|
-
this.
|
|
332
|
-
for (let t = 0; t < e.
|
|
333
|
-
const n = e.
|
|
334
|
-
let r = this.
|
|
289
|
+
this.re[0].push(...e.re[0]);
|
|
290
|
+
this.re[1].push(...e.re[1]);
|
|
291
|
+
for (let t = 0; t < e.ie.length; t++) {
|
|
292
|
+
const n = e.ie[t];
|
|
293
|
+
let r = this.ie[t];
|
|
335
294
|
if (r) r.restoreQueues(n);
|
|
336
295
|
}
|
|
337
296
|
}
|
|
338
297
|
}
|
|
339
298
|
class GlobalQueue extends Queue {
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
static
|
|
345
|
-
static
|
|
346
|
-
static
|
|
299
|
+
ne = false;
|
|
300
|
+
se = [];
|
|
301
|
+
U = [];
|
|
302
|
+
J = new Set();
|
|
303
|
+
static oe;
|
|
304
|
+
static ue;
|
|
305
|
+
static fe = null;
|
|
347
306
|
flush() {
|
|
348
|
-
if (this.
|
|
349
|
-
this.
|
|
307
|
+
if (this.ne) return;
|
|
308
|
+
this.ne = true;
|
|
350
309
|
try {
|
|
351
|
-
runHeap(
|
|
352
|
-
if (
|
|
353
|
-
const e = transitionComplete(
|
|
310
|
+
runHeap(P, GlobalQueue.oe);
|
|
311
|
+
if (C) {
|
|
312
|
+
const e = transitionComplete(C);
|
|
354
313
|
if (!e) {
|
|
355
|
-
const e =
|
|
356
|
-
runHeap(
|
|
357
|
-
this.
|
|
358
|
-
this.
|
|
359
|
-
this.
|
|
314
|
+
const e = C;
|
|
315
|
+
runHeap(k, GlobalQueue.oe);
|
|
316
|
+
this.se = [];
|
|
317
|
+
this.U = [];
|
|
318
|
+
this.J = new Set();
|
|
360
319
|
runLaneEffects(p);
|
|
361
320
|
runLaneEffects(g);
|
|
362
|
-
this.stashQueues(e.
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
reassignPendingTransition(e.
|
|
366
|
-
|
|
367
|
-
if (!e.
|
|
368
|
-
|
|
369
|
-
for (let t = 0; t < e.
|
|
370
|
-
const n = e.
|
|
371
|
-
if (n.I || n.
|
|
372
|
-
|
|
321
|
+
this.stashQueues(e.le);
|
|
322
|
+
E++;
|
|
323
|
+
W = P.S >= P.A;
|
|
324
|
+
reassignPendingTransition(e.se);
|
|
325
|
+
C = null;
|
|
326
|
+
if (!e.G.length && e.U.length) {
|
|
327
|
+
N = new Set();
|
|
328
|
+
for (let t = 0; t < e.U.length; t++) {
|
|
329
|
+
const n = e.U[t];
|
|
330
|
+
if (n.I || n.ce) continue;
|
|
331
|
+
N.add(n);
|
|
373
332
|
queueStashedOptimisticEffects(n);
|
|
374
333
|
}
|
|
375
334
|
}
|
|
376
335
|
try {
|
|
377
336
|
finalizePureQueue(null, true);
|
|
378
337
|
} finally {
|
|
379
|
-
|
|
338
|
+
N = null;
|
|
380
339
|
}
|
|
381
340
|
return;
|
|
382
341
|
}
|
|
383
|
-
this.
|
|
384
|
-
this.restoreQueues(
|
|
385
|
-
|
|
386
|
-
const t =
|
|
387
|
-
|
|
388
|
-
reassignPendingTransition(this.
|
|
342
|
+
this.se !== C.se && this.se.push(...C.se);
|
|
343
|
+
this.restoreQueues(C.le);
|
|
344
|
+
v.delete(C);
|
|
345
|
+
const t = C;
|
|
346
|
+
C = null;
|
|
347
|
+
reassignPendingTransition(this.se);
|
|
389
348
|
finalizePureQueue(t);
|
|
390
349
|
} else {
|
|
391
|
-
if (
|
|
350
|
+
if (v.size) runHeap(k, GlobalQueue.oe);
|
|
392
351
|
finalizePureQueue();
|
|
393
352
|
}
|
|
394
|
-
|
|
395
|
-
|
|
353
|
+
E++;
|
|
354
|
+
W = P.S >= P.A;
|
|
396
355
|
runLaneEffects(p);
|
|
397
356
|
this.run(p);
|
|
398
357
|
runLaneEffects(g);
|
|
399
358
|
this.run(g);
|
|
400
359
|
if (false);
|
|
401
360
|
} finally {
|
|
402
|
-
this.
|
|
361
|
+
this.ne = false;
|
|
403
362
|
}
|
|
404
363
|
}
|
|
405
364
|
notify(e, t, n, r) {
|
|
406
365
|
if (t & a) {
|
|
407
366
|
if (n & a) {
|
|
408
|
-
const t = r !== undefined ? r : e.
|
|
409
|
-
if (
|
|
410
|
-
const
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
367
|
+
const t = r !== undefined ? r : e.ae;
|
|
368
|
+
if (C && t) {
|
|
369
|
+
const n = t.source;
|
|
370
|
+
let r = C.X.get(n);
|
|
371
|
+
if (!r) C.X.set(n, (r = new Set()));
|
|
372
|
+
const i = r.size;
|
|
373
|
+
r.add(e);
|
|
374
|
+
if (r.size !== i) schedule();
|
|
415
375
|
}
|
|
416
376
|
}
|
|
417
377
|
return true;
|
|
@@ -420,57 +380,57 @@ class GlobalQueue extends Queue {
|
|
|
420
380
|
}
|
|
421
381
|
initTransition(e) {
|
|
422
382
|
if (e) e = currentTransition(e);
|
|
423
|
-
if (e && e ===
|
|
424
|
-
if (!e &&
|
|
425
|
-
if (!
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
383
|
+
if (e && e === C) return;
|
|
384
|
+
if (!e && C && C.de === E) return;
|
|
385
|
+
if (!C) {
|
|
386
|
+
C = e ?? {
|
|
387
|
+
de: E,
|
|
388
|
+
se: [],
|
|
389
|
+
X: new Map(),
|
|
390
|
+
U: [],
|
|
391
|
+
J: new Set(),
|
|
392
|
+
G: [],
|
|
393
|
+
le: { re: [[], []], ie: [] },
|
|
394
|
+
B: false
|
|
435
395
|
};
|
|
436
396
|
} else if (e) {
|
|
437
|
-
const t =
|
|
397
|
+
const t = C;
|
|
438
398
|
mergeTransitionState(e, t);
|
|
439
|
-
|
|
440
|
-
|
|
399
|
+
v.delete(t);
|
|
400
|
+
C = e;
|
|
441
401
|
}
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
if (this.
|
|
445
|
-
for (let e = 0; e < this.
|
|
446
|
-
const t = this.
|
|
447
|
-
t.
|
|
448
|
-
|
|
402
|
+
v.add(C);
|
|
403
|
+
C.de = E;
|
|
404
|
+
if (this.se !== C.se) {
|
|
405
|
+
for (let e = 0; e < this.se.length; e++) {
|
|
406
|
+
const t = this.se[e];
|
|
407
|
+
t.K = C;
|
|
408
|
+
C.se.push(t);
|
|
449
409
|
}
|
|
450
|
-
this.
|
|
410
|
+
this.se = C.se;
|
|
451
411
|
}
|
|
452
|
-
if (this.
|
|
453
|
-
for (let e = 0; e < this.
|
|
454
|
-
const t = this.
|
|
455
|
-
t.
|
|
456
|
-
|
|
412
|
+
if (this.U !== C.U) {
|
|
413
|
+
for (let e = 0; e < this.U.length; e++) {
|
|
414
|
+
const t = this.U[e];
|
|
415
|
+
t.K = C;
|
|
416
|
+
C.U.push(t);
|
|
457
417
|
}
|
|
458
|
-
this.
|
|
418
|
+
this.U = C.U;
|
|
459
419
|
}
|
|
460
|
-
for (const e of
|
|
461
|
-
if (!e.
|
|
420
|
+
for (const e of L) {
|
|
421
|
+
if (!e.K) e.K = C;
|
|
462
422
|
}
|
|
463
|
-
if (this.
|
|
464
|
-
for (const e of this.
|
|
465
|
-
this.
|
|
423
|
+
if (this.J !== C.J) {
|
|
424
|
+
for (const e of this.J) C.J.add(e);
|
|
425
|
+
this.J = C.J;
|
|
466
426
|
}
|
|
467
427
|
}
|
|
468
428
|
}
|
|
469
429
|
function insertSubs(e, t = false) {
|
|
470
|
-
const n = e.
|
|
471
|
-
const r = e.
|
|
430
|
+
const n = e.Y || B;
|
|
431
|
+
const r = e.he !== undefined;
|
|
472
432
|
for (let i = e.O; i !== null; i = i.P) {
|
|
473
|
-
if (r && i.k.
|
|
433
|
+
if (r && i.k.pe) {
|
|
474
434
|
i.k.m |= l;
|
|
475
435
|
continue;
|
|
476
436
|
}
|
|
@@ -479,47 +439,47 @@ function insertSubs(e, t = false) {
|
|
|
479
439
|
assignOrMergeLane(i.k, n);
|
|
480
440
|
} else if (t) {
|
|
481
441
|
i.k.m |= f;
|
|
482
|
-
i.k.
|
|
442
|
+
i.k.Y = undefined;
|
|
483
443
|
}
|
|
484
444
|
const e = i.k;
|
|
485
|
-
if (e.
|
|
486
|
-
if (!e.
|
|
487
|
-
e.
|
|
488
|
-
e.
|
|
445
|
+
if (e.D === y) {
|
|
446
|
+
if (!e.F) {
|
|
447
|
+
e.F = true;
|
|
448
|
+
e.M.enqueue(g, e.V);
|
|
489
449
|
}
|
|
490
450
|
continue;
|
|
491
451
|
}
|
|
492
|
-
const s = i.k.m & o ?
|
|
452
|
+
const s = i.k.m & o ? k : P;
|
|
493
453
|
if (s.A > i.k.o) s.A = i.k.o;
|
|
494
454
|
insertIntoHeap(i.k, s);
|
|
495
455
|
}
|
|
496
456
|
}
|
|
497
457
|
function commitPendingNodes() {
|
|
498
|
-
const e =
|
|
458
|
+
const e = j.se;
|
|
499
459
|
for (let t = 0; t < e.length; t++) {
|
|
500
460
|
const n = e[t];
|
|
501
|
-
if (n.
|
|
502
|
-
n
|
|
503
|
-
n.
|
|
504
|
-
if (n.
|
|
461
|
+
if (n.Z !== S) {
|
|
462
|
+
n.$ = n.Z;
|
|
463
|
+
n.Z = S;
|
|
464
|
+
if (n.D && n.D !== y) n.F = true;
|
|
505
465
|
}
|
|
506
|
-
if (!(n.
|
|
507
|
-
if (n.I) GlobalQueue.
|
|
466
|
+
if (!(n.ge & a)) n.ge &= ~h;
|
|
467
|
+
if (n.I) GlobalQueue.ue(n, false, true);
|
|
508
468
|
}
|
|
509
469
|
e.length = 0;
|
|
510
470
|
}
|
|
511
471
|
function finalizePureQueue(e = null, t = false) {
|
|
512
472
|
const n = !t;
|
|
513
473
|
if (n) commitPendingNodes();
|
|
514
|
-
if (!t) checkBoundaryChildren(
|
|
515
|
-
if (
|
|
474
|
+
if (!t) checkBoundaryChildren(j);
|
|
475
|
+
if (P.S >= P.A) runHeap(P, GlobalQueue.oe);
|
|
516
476
|
if (n) {
|
|
517
477
|
commitPendingNodes();
|
|
518
|
-
resolveOptimisticNodes(e ? e.
|
|
519
|
-
const t = e ? e.
|
|
520
|
-
if (GlobalQueue.
|
|
478
|
+
resolveOptimisticNodes(e ? e.U : j.U);
|
|
479
|
+
const t = e ? e.J : j.J;
|
|
480
|
+
if (GlobalQueue.fe && t.size) {
|
|
521
481
|
for (const e of t) {
|
|
522
|
-
GlobalQueue.
|
|
482
|
+
GlobalQueue.fe(e);
|
|
523
483
|
}
|
|
524
484
|
t.clear();
|
|
525
485
|
schedule();
|
|
@@ -528,160 +488,180 @@ function finalizePureQueue(e = null, t = false) {
|
|
|
528
488
|
}
|
|
529
489
|
}
|
|
530
490
|
function checkBoundaryChildren(e) {
|
|
531
|
-
for (const t of e.
|
|
491
|
+
for (const t of e.ie) {
|
|
532
492
|
t.checkSources?.();
|
|
533
493
|
checkBoundaryChildren(t);
|
|
534
494
|
}
|
|
535
495
|
}
|
|
536
496
|
function trackOptimisticStore(e) {
|
|
537
|
-
|
|
497
|
+
j.J.add(e);
|
|
538
498
|
schedule();
|
|
539
499
|
}
|
|
540
500
|
function reassignPendingTransition(e) {
|
|
541
501
|
for (let t = 0; t < e.length; t++) {
|
|
542
|
-
e[t].
|
|
502
|
+
e[t].K = C;
|
|
543
503
|
}
|
|
544
504
|
}
|
|
545
|
-
const
|
|
505
|
+
const j = new GlobalQueue();
|
|
546
506
|
function flush() {
|
|
547
|
-
if (
|
|
507
|
+
if (j.ne) {
|
|
548
508
|
return;
|
|
549
509
|
}
|
|
550
|
-
while (
|
|
551
|
-
|
|
510
|
+
while (W || C) {
|
|
511
|
+
j.flush();
|
|
552
512
|
}
|
|
553
513
|
}
|
|
554
514
|
function runQueue(e, t) {
|
|
555
515
|
for (let n = 0; n < e.length; n++) e[n](t);
|
|
556
516
|
}
|
|
517
|
+
function reporterBlocksSource(e, t) {
|
|
518
|
+
if (e.m & (o | u)) return false;
|
|
519
|
+
if (e.ye === t || e.Se?.has(t)) return true;
|
|
520
|
+
for (let n = e.N; n; n = n.j) {
|
|
521
|
+
let e = n.R;
|
|
522
|
+
while (e) {
|
|
523
|
+
if (e === t || e.L === t) return true;
|
|
524
|
+
e = e.we;
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
return !!(e.ge & a && e.ae instanceof NotReadyError && e.ae.source === t);
|
|
528
|
+
}
|
|
557
529
|
function transitionComplete(e) {
|
|
558
|
-
if (e.
|
|
559
|
-
if (e.
|
|
530
|
+
if (e.B) return true;
|
|
531
|
+
if (e.G.length) return false;
|
|
560
532
|
let t = true;
|
|
561
|
-
for (
|
|
562
|
-
|
|
563
|
-
|
|
533
|
+
for (const [n, r] of e.X) {
|
|
534
|
+
let i = false;
|
|
535
|
+
for (const e of r) {
|
|
536
|
+
if (reporterBlocksSource(e, n)) {
|
|
537
|
+
i = true;
|
|
538
|
+
break;
|
|
539
|
+
}
|
|
540
|
+
r.delete(e);
|
|
541
|
+
}
|
|
542
|
+
if (!i) e.X.delete(n);
|
|
543
|
+
else if (n.ge & a && n.ae?.source === n) {
|
|
564
544
|
t = false;
|
|
565
545
|
break;
|
|
566
546
|
}
|
|
567
547
|
}
|
|
568
548
|
if (t) {
|
|
569
|
-
for (let n = 0; n < e.
|
|
570
|
-
const r = e.
|
|
549
|
+
for (let n = 0; n < e.U.length; n++) {
|
|
550
|
+
const r = e.U[n];
|
|
571
551
|
if (
|
|
572
552
|
hasActiveOverride(r) &&
|
|
573
|
-
"
|
|
574
|
-
r.
|
|
575
|
-
r.
|
|
576
|
-
r.
|
|
553
|
+
"ge" in r &&
|
|
554
|
+
r.ge & a &&
|
|
555
|
+
r.ae instanceof NotReadyError &&
|
|
556
|
+
r.ae.source !== r
|
|
577
557
|
) {
|
|
578
558
|
t = false;
|
|
579
559
|
break;
|
|
580
560
|
}
|
|
581
561
|
}
|
|
582
562
|
}
|
|
583
|
-
t && (e.
|
|
563
|
+
t && (e.B = true);
|
|
584
564
|
return t;
|
|
585
565
|
}
|
|
586
566
|
function currentTransition(e) {
|
|
587
|
-
while (e.
|
|
567
|
+
while (e.B && typeof e.B === "object") e = e.B;
|
|
588
568
|
return e;
|
|
589
569
|
}
|
|
590
570
|
function setActiveTransition(e) {
|
|
591
|
-
|
|
571
|
+
C = e;
|
|
592
572
|
}
|
|
593
573
|
function runInTransition(e, t) {
|
|
594
|
-
const n =
|
|
574
|
+
const n = C;
|
|
595
575
|
try {
|
|
596
|
-
|
|
576
|
+
C = currentTransition(e);
|
|
597
577
|
return t();
|
|
598
578
|
} finally {
|
|
599
|
-
|
|
579
|
+
C = n;
|
|
600
580
|
}
|
|
601
581
|
}
|
|
602
|
-
const
|
|
603
|
-
const
|
|
582
|
+
const R = new WeakMap();
|
|
583
|
+
const L = new Set();
|
|
604
584
|
function getOrCreateLane(e) {
|
|
605
|
-
let t =
|
|
585
|
+
let t = R.get(e);
|
|
606
586
|
if (t) {
|
|
607
587
|
return findLane(t);
|
|
608
588
|
}
|
|
609
|
-
const n = e.
|
|
610
|
-
const r = n?.
|
|
611
|
-
t = {
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
e.
|
|
589
|
+
const n = e.we;
|
|
590
|
+
const r = n?.Y ? findLane(n.Y) : null;
|
|
591
|
+
t = { te: e, H: new Set(), q: [[], []], T: null, K: C, me: r };
|
|
592
|
+
R.set(e, t);
|
|
593
|
+
L.add(t);
|
|
594
|
+
e._e = false;
|
|
615
595
|
return t;
|
|
616
596
|
}
|
|
617
597
|
function findLane(e) {
|
|
618
|
-
while (e.
|
|
598
|
+
while (e.T) e = e.T;
|
|
619
599
|
return e;
|
|
620
600
|
}
|
|
621
601
|
function mergeLanes(e, t) {
|
|
622
602
|
e = findLane(e);
|
|
623
603
|
t = findLane(t);
|
|
624
604
|
if (e === t) return e;
|
|
625
|
-
t.
|
|
626
|
-
for (const n of t.
|
|
627
|
-
e.
|
|
628
|
-
e.
|
|
605
|
+
t.T = e;
|
|
606
|
+
for (const n of t.H) e.H.add(n);
|
|
607
|
+
e.q[0].push(...t.q[0]);
|
|
608
|
+
e.q[1].push(...t.q[1]);
|
|
629
609
|
return e;
|
|
630
610
|
}
|
|
631
611
|
function resolveLane(e) {
|
|
632
|
-
const t = e.
|
|
612
|
+
const t = e.Y;
|
|
633
613
|
if (!t) return undefined;
|
|
634
614
|
const n = findLane(t);
|
|
635
|
-
if (
|
|
636
|
-
e.
|
|
615
|
+
if (L.has(n)) return n;
|
|
616
|
+
e.Y = undefined;
|
|
637
617
|
return undefined;
|
|
638
618
|
}
|
|
639
619
|
function resolveTransition(e) {
|
|
640
|
-
return resolveLane(e)?.
|
|
620
|
+
return resolveLane(e)?.K ?? e.K;
|
|
641
621
|
}
|
|
642
622
|
function hasActiveOverride(e) {
|
|
643
|
-
return !!(e.
|
|
623
|
+
return !!(e.ee !== undefined && e.ee !== S);
|
|
644
624
|
}
|
|
645
625
|
function assignOrMergeLane(e, t) {
|
|
646
626
|
const n = findLane(t);
|
|
647
|
-
const r = e.
|
|
627
|
+
const r = e.Y;
|
|
648
628
|
if (r) {
|
|
649
|
-
if (r.
|
|
650
|
-
e.
|
|
629
|
+
if (r.T) {
|
|
630
|
+
e.Y = t;
|
|
651
631
|
return;
|
|
652
632
|
}
|
|
653
633
|
const i = findLane(r);
|
|
654
|
-
if (
|
|
634
|
+
if (L.has(i)) {
|
|
655
635
|
if (i !== n && !hasActiveOverride(e)) {
|
|
656
|
-
if (n.
|
|
657
|
-
e.
|
|
658
|
-
} else if (i.
|
|
636
|
+
if (n.me && findLane(n.me) === i) {
|
|
637
|
+
e.Y = t;
|
|
638
|
+
} else if (i.me && findLane(i.me) === n);
|
|
659
639
|
else mergeLanes(n, i);
|
|
660
640
|
}
|
|
661
641
|
return;
|
|
662
642
|
}
|
|
663
643
|
}
|
|
664
|
-
e.
|
|
644
|
+
e.Y = t;
|
|
665
645
|
}
|
|
666
646
|
function unlinkSubs(e) {
|
|
667
647
|
const t = e.R;
|
|
668
648
|
const n = e.j;
|
|
669
649
|
const r = e.P;
|
|
670
|
-
const i = e.
|
|
671
|
-
if (r !== null) r.
|
|
672
|
-
else t.
|
|
650
|
+
const i = e.be;
|
|
651
|
+
if (r !== null) r.be = i;
|
|
652
|
+
else t.Oe = i;
|
|
673
653
|
if (i !== null) i.P = r;
|
|
674
654
|
else {
|
|
675
655
|
t.O = r;
|
|
676
656
|
if (r === null) {
|
|
677
|
-
t.
|
|
678
|
-
t.I && !t.
|
|
657
|
+
t.xe?.();
|
|
658
|
+
t.I && !t.ve && !(t.m & o) && unobserved(t);
|
|
679
659
|
}
|
|
680
660
|
}
|
|
681
661
|
return n;
|
|
682
662
|
}
|
|
683
663
|
function unobserved(e) {
|
|
684
|
-
deleteFromHeap(e, e.m & o ?
|
|
664
|
+
deleteFromHeap(e, e.m & o ? k : P);
|
|
685
665
|
let t = e.N;
|
|
686
666
|
while (t !== null) {
|
|
687
667
|
t = unlinkSubs(t);
|
|
@@ -690,27 +670,27 @@ function unobserved(e) {
|
|
|
690
670
|
disposeChildren(e, true);
|
|
691
671
|
}
|
|
692
672
|
function link(e, t) {
|
|
693
|
-
const n = t.
|
|
673
|
+
const n = t.Pe;
|
|
694
674
|
if (n !== null && n.R === e) return;
|
|
695
675
|
let i = null;
|
|
696
676
|
const s = t.m & r;
|
|
697
677
|
if (s) {
|
|
698
678
|
i = n !== null ? n.j : t.N;
|
|
699
679
|
if (i !== null && i.R === e) {
|
|
700
|
-
t.
|
|
680
|
+
t.Pe = i;
|
|
701
681
|
return;
|
|
702
682
|
}
|
|
703
683
|
}
|
|
704
|
-
const o = e.
|
|
684
|
+
const o = e.Oe;
|
|
705
685
|
if (o !== null && o.k === t && (!s || isValidLink(o, t))) return;
|
|
706
|
-
const u = (t.
|
|
686
|
+
const u = (t.Pe = e.Oe = { R: e, k: t, j: i, be: o, P: null });
|
|
707
687
|
if (n !== null) n.j = u;
|
|
708
688
|
else t.N = u;
|
|
709
689
|
if (o !== null) o.P = u;
|
|
710
690
|
else e.O = u;
|
|
711
691
|
}
|
|
712
692
|
function isValidLink(e, t) {
|
|
713
|
-
const n = t.
|
|
693
|
+
const n = t.Pe;
|
|
714
694
|
if (n !== null) {
|
|
715
695
|
let r = t.N;
|
|
716
696
|
do {
|
|
@@ -721,17 +701,17 @@ function isValidLink(e, t) {
|
|
|
721
701
|
}
|
|
722
702
|
return false;
|
|
723
703
|
}
|
|
724
|
-
const
|
|
704
|
+
const I = {};
|
|
725
705
|
function markDisposal(e) {
|
|
726
|
-
let t = e.
|
|
706
|
+
let t = e.ke;
|
|
727
707
|
while (t) {
|
|
728
708
|
t.m |= o;
|
|
729
709
|
if (t.m & i) {
|
|
730
|
-
deleteFromHeap(t,
|
|
731
|
-
insertIntoHeap(t,
|
|
710
|
+
deleteFromHeap(t, P);
|
|
711
|
+
insertIntoHeap(t, k);
|
|
732
712
|
}
|
|
733
713
|
markDisposal(t);
|
|
734
|
-
t = t.
|
|
714
|
+
t = t.Ee;
|
|
735
715
|
}
|
|
736
716
|
}
|
|
737
717
|
function dispose(e) {
|
|
@@ -740,39 +720,39 @@ function dispose(e) {
|
|
|
740
720
|
t = unlinkSubs(t);
|
|
741
721
|
} while (t !== null);
|
|
742
722
|
e.N = null;
|
|
743
|
-
e.
|
|
723
|
+
e.Pe = null;
|
|
744
724
|
disposeChildren(e, true);
|
|
745
725
|
}
|
|
746
726
|
function disposeChildren(e, t = false, n) {
|
|
747
727
|
if (e.m & u) return;
|
|
748
728
|
if (t) e.m = u;
|
|
749
|
-
if (t && e.I) e.
|
|
750
|
-
let r = n ? e.
|
|
729
|
+
if (t && e.I) e.Ce = null;
|
|
730
|
+
let r = n ? e.We : e.ke;
|
|
751
731
|
while (r) {
|
|
752
|
-
const e = r.
|
|
732
|
+
const e = r.Ee;
|
|
753
733
|
if (r.N) {
|
|
754
734
|
const e = r;
|
|
755
|
-
deleteFromHeap(e, e.m & o ?
|
|
735
|
+
deleteFromHeap(e, e.m & o ? k : P);
|
|
756
736
|
let t = e.N;
|
|
757
737
|
do {
|
|
758
738
|
t = unlinkSubs(t);
|
|
759
739
|
} while (t !== null);
|
|
760
740
|
e.N = null;
|
|
761
|
-
e.
|
|
741
|
+
e.Pe = null;
|
|
762
742
|
}
|
|
763
743
|
disposeChildren(r, true);
|
|
764
744
|
r = e;
|
|
765
745
|
}
|
|
766
746
|
if (n) {
|
|
767
|
-
e.
|
|
747
|
+
e.We = null;
|
|
768
748
|
} else {
|
|
769
|
-
e.
|
|
770
|
-
e.
|
|
749
|
+
e.ke = null;
|
|
750
|
+
e.Ae = 0;
|
|
771
751
|
}
|
|
772
752
|
runDisposal(e, n);
|
|
773
753
|
}
|
|
774
754
|
function runDisposal(e, t) {
|
|
775
|
-
let n = t ? e.
|
|
755
|
+
let n = t ? e.Ne : e.je;
|
|
776
756
|
if (!n) return;
|
|
777
757
|
if (Array.isArray(n)) {
|
|
778
758
|
for (let e = 0; e < n.length; e++) {
|
|
@@ -782,12 +762,12 @@ function runDisposal(e, t) {
|
|
|
782
762
|
} else {
|
|
783
763
|
n.call(n);
|
|
784
764
|
}
|
|
785
|
-
t ? (e.
|
|
765
|
+
t ? (e.Ne = null) : (e.je = null);
|
|
786
766
|
}
|
|
787
767
|
function childId(e, t) {
|
|
788
768
|
let n = e;
|
|
789
|
-
while (n.
|
|
790
|
-
if (n.id != null) return formatId(n.id, t ? n.
|
|
769
|
+
while (n.Re && n.i) n = n.i;
|
|
770
|
+
if (n.id != null) return formatId(n.id, t ? n.Ae++ : n.Ae);
|
|
791
771
|
throw new Error("Cannot get child id from owner without an id");
|
|
792
772
|
}
|
|
793
773
|
function getNextChildId(e) {
|
|
@@ -802,50 +782,50 @@ function formatId(e, t) {
|
|
|
802
782
|
return e + (r ? String.fromCharCode(64 + r) : "") + n;
|
|
803
783
|
}
|
|
804
784
|
function getObserver() {
|
|
805
|
-
if (
|
|
806
|
-
return
|
|
785
|
+
if (D || M) return I;
|
|
786
|
+
return H ? V : null;
|
|
807
787
|
}
|
|
808
788
|
function getOwner() {
|
|
809
|
-
return
|
|
789
|
+
return V;
|
|
810
790
|
}
|
|
811
791
|
function cleanup(e) {
|
|
812
|
-
if (!
|
|
813
|
-
if (!
|
|
814
|
-
else if (Array.isArray(
|
|
815
|
-
else
|
|
792
|
+
if (!V) return e;
|
|
793
|
+
if (!V.je) V.je = e;
|
|
794
|
+
else if (Array.isArray(V.je)) V.je.push(e);
|
|
795
|
+
else V.je = [V.je, e];
|
|
816
796
|
return e;
|
|
817
797
|
}
|
|
818
798
|
function isDisposed(e) {
|
|
819
799
|
return !!(e.m & (u | o));
|
|
820
800
|
}
|
|
821
801
|
function createOwner(e) {
|
|
822
|
-
const t =
|
|
802
|
+
const t = V;
|
|
823
803
|
const n = e?.transparent ?? false;
|
|
824
804
|
const r = {
|
|
825
805
|
id: e?.id ?? (n ? t?.id : t?.id != null ? getNextChildId(t) : undefined),
|
|
826
|
-
|
|
806
|
+
Re: n || undefined,
|
|
827
807
|
t: true,
|
|
828
808
|
u: t?.t ? t.u : t,
|
|
829
|
-
|
|
830
|
-
|
|
809
|
+
ke: null,
|
|
810
|
+
Ee: null,
|
|
811
|
+
je: null,
|
|
812
|
+
M: t?.M ?? j,
|
|
813
|
+
Le: t?.Le || b,
|
|
814
|
+
Ae: 0,
|
|
831
815
|
Ne: null,
|
|
832
|
-
|
|
833
|
-
Re: t?.Re || b,
|
|
834
|
-
We: 0,
|
|
835
|
-
Ae: null,
|
|
836
|
-
Ce: null,
|
|
816
|
+
We: null,
|
|
837
817
|
i: t,
|
|
838
818
|
dispose(e = true) {
|
|
839
819
|
disposeChildren(r, e);
|
|
840
820
|
}
|
|
841
821
|
};
|
|
842
822
|
if (t) {
|
|
843
|
-
const e = t.
|
|
823
|
+
const e = t.ke;
|
|
844
824
|
if (e === null) {
|
|
845
|
-
t.
|
|
825
|
+
t.ke = r;
|
|
846
826
|
} else {
|
|
847
|
-
r.
|
|
848
|
-
t.
|
|
827
|
+
r.Ee = e;
|
|
828
|
+
t.ke = r;
|
|
849
829
|
}
|
|
850
830
|
}
|
|
851
831
|
return r;
|
|
@@ -855,51 +835,51 @@ function createRoot(e, t) {
|
|
|
855
835
|
return runWithOwner(n, () => e(n.dispose));
|
|
856
836
|
}
|
|
857
837
|
function addPendingSource(e, t) {
|
|
858
|
-
if (e.
|
|
859
|
-
if (!e.
|
|
860
|
-
e.
|
|
838
|
+
if (e.ye === t || e.Se?.has(t)) return false;
|
|
839
|
+
if (!e.ye) {
|
|
840
|
+
e.ye = t;
|
|
861
841
|
return true;
|
|
862
842
|
}
|
|
863
|
-
if (!e.
|
|
864
|
-
e.
|
|
843
|
+
if (!e.Se) {
|
|
844
|
+
e.Se = new Set([e.ye, t]);
|
|
865
845
|
} else {
|
|
866
|
-
e.
|
|
846
|
+
e.Se.add(t);
|
|
867
847
|
}
|
|
868
|
-
e.
|
|
848
|
+
e.ye = undefined;
|
|
869
849
|
return true;
|
|
870
850
|
}
|
|
871
851
|
function removePendingSource(e, t) {
|
|
872
|
-
if (e.
|
|
873
|
-
if (e.
|
|
874
|
-
e.
|
|
852
|
+
if (e.ye) {
|
|
853
|
+
if (e.ye !== t) return false;
|
|
854
|
+
e.ye = undefined;
|
|
875
855
|
return true;
|
|
876
856
|
}
|
|
877
|
-
if (!e.
|
|
878
|
-
if (e.
|
|
879
|
-
e.
|
|
880
|
-
e.
|
|
881
|
-
} else if (e.
|
|
882
|
-
e.
|
|
857
|
+
if (!e.Se?.delete(t)) return false;
|
|
858
|
+
if (e.Se.size === 1) {
|
|
859
|
+
e.ye = e.Se.values().next().value;
|
|
860
|
+
e.Se = undefined;
|
|
861
|
+
} else if (e.Se.size === 0) {
|
|
862
|
+
e.Se = undefined;
|
|
883
863
|
}
|
|
884
864
|
return true;
|
|
885
865
|
}
|
|
886
866
|
function clearPendingSources(e) {
|
|
887
|
-
e.
|
|
888
|
-
e.
|
|
889
|
-
e.
|
|
867
|
+
e.ye = undefined;
|
|
868
|
+
e.Se?.clear();
|
|
869
|
+
e.Se = undefined;
|
|
890
870
|
}
|
|
891
871
|
function setPendingError(e, t, n) {
|
|
892
872
|
if (!t) {
|
|
893
|
-
e.
|
|
873
|
+
e.ae = null;
|
|
894
874
|
return;
|
|
895
875
|
}
|
|
896
876
|
if (n instanceof NotReadyError && n.source === t) {
|
|
897
|
-
e.
|
|
877
|
+
e.ae = n;
|
|
898
878
|
return;
|
|
899
879
|
}
|
|
900
|
-
const r = e.
|
|
880
|
+
const r = e.ae;
|
|
901
881
|
if (!(r instanceof NotReadyError) || r.source !== t) {
|
|
902
|
-
e.
|
|
882
|
+
e.ae = new NotReadyError(t);
|
|
903
883
|
}
|
|
904
884
|
}
|
|
905
885
|
function forEachDependent(e, t) {
|
|
@@ -914,30 +894,30 @@ function settlePendingSource(e) {
|
|
|
914
894
|
const settle = r => {
|
|
915
895
|
if (n.has(r) || !removePendingSource(r, e)) return;
|
|
916
896
|
n.add(r);
|
|
917
|
-
r.
|
|
918
|
-
const i = r.
|
|
897
|
+
r.de = E;
|
|
898
|
+
const i = r.ye ?? r.Se?.values().next().value;
|
|
919
899
|
if (i) {
|
|
920
900
|
setPendingError(r, i);
|
|
921
901
|
updatePendingSignal(r);
|
|
922
902
|
} else {
|
|
923
|
-
r.
|
|
903
|
+
r.ge &= ~a;
|
|
924
904
|
setPendingError(r);
|
|
925
905
|
updatePendingSignal(r);
|
|
926
|
-
if (r.
|
|
927
|
-
if (r.
|
|
906
|
+
if (r.Ie) {
|
|
907
|
+
if (r.D === y) {
|
|
928
908
|
const e = r;
|
|
929
|
-
if (!e.
|
|
930
|
-
e.
|
|
931
|
-
e.
|
|
909
|
+
if (!e.F) {
|
|
910
|
+
e.F = true;
|
|
911
|
+
e.M.enqueue(g, e.V);
|
|
932
912
|
}
|
|
933
913
|
} else {
|
|
934
|
-
const e = r.m & o ?
|
|
914
|
+
const e = r.m & o ? k : P;
|
|
935
915
|
if (e.A > r.o) e.A = r.o;
|
|
936
916
|
insertIntoHeap(r, e);
|
|
937
917
|
}
|
|
938
918
|
t = true;
|
|
939
919
|
}
|
|
940
|
-
r.
|
|
920
|
+
r.Ie = false;
|
|
941
921
|
}
|
|
942
922
|
forEachDependent(r, settle);
|
|
943
923
|
};
|
|
@@ -949,40 +929,40 @@ function handleAsync(e, t, r) {
|
|
|
949
929
|
const s = i && untrack(() => t[Symbol.asyncIterator]);
|
|
950
930
|
const o = !s && i && untrack(() => typeof t.then === "function");
|
|
951
931
|
if (!o && !s) {
|
|
952
|
-
e.
|
|
932
|
+
e.Ce = null;
|
|
953
933
|
return t;
|
|
954
934
|
}
|
|
955
|
-
e.
|
|
935
|
+
e.Ce = t;
|
|
956
936
|
let u;
|
|
957
937
|
const handleError = n => {
|
|
958
|
-
if (e.
|
|
959
|
-
|
|
938
|
+
if (e.Ce !== t) return;
|
|
939
|
+
j.initTransition(resolveTransition(e));
|
|
960
940
|
notifyStatus(e, n instanceof NotReadyError ? a : d, n);
|
|
961
|
-
e.
|
|
941
|
+
e.de = E;
|
|
962
942
|
};
|
|
963
943
|
const asyncWrite = (i, s) => {
|
|
964
|
-
if (e.
|
|
944
|
+
if (e.Ce !== t) return;
|
|
965
945
|
if (e.m & (n | f)) return;
|
|
966
|
-
|
|
946
|
+
j.initTransition(resolveTransition(e));
|
|
967
947
|
clearStatus(e);
|
|
968
948
|
const o = resolveLane(e);
|
|
969
|
-
if (o) o.
|
|
949
|
+
if (o) o.H.delete(e);
|
|
970
950
|
if (r) r(i);
|
|
971
|
-
else if (e.
|
|
972
|
-
if (e.
|
|
951
|
+
else if (e.ee !== undefined) {
|
|
952
|
+
if (e.ee !== undefined && e.ee !== S) e.Z = i;
|
|
973
953
|
else {
|
|
974
|
-
e
|
|
954
|
+
e.$ = i;
|
|
975
955
|
insertSubs(e);
|
|
976
956
|
}
|
|
977
|
-
e.
|
|
957
|
+
e.de = E;
|
|
978
958
|
} else if (o) {
|
|
979
|
-
const t = e
|
|
980
|
-
const n = e.
|
|
959
|
+
const t = e.$;
|
|
960
|
+
const n = e.Te;
|
|
981
961
|
if (!n || !n(i, t)) {
|
|
982
|
-
e
|
|
983
|
-
e.
|
|
984
|
-
if (e.
|
|
985
|
-
setSignal(e.
|
|
962
|
+
e.$ = i;
|
|
963
|
+
e.de = E;
|
|
964
|
+
if (e.He) {
|
|
965
|
+
setSignal(e.He, i);
|
|
986
966
|
}
|
|
987
967
|
insertSubs(e, true);
|
|
988
968
|
}
|
|
@@ -1010,8 +990,8 @@ function handleAsync(e, t, r) {
|
|
|
1010
990
|
);
|
|
1011
991
|
r = false;
|
|
1012
992
|
if (!n) {
|
|
1013
|
-
|
|
1014
|
-
throw new NotReadyError(
|
|
993
|
+
j.initTransition(resolveTransition(e));
|
|
994
|
+
throw new NotReadyError(V);
|
|
1015
995
|
}
|
|
1016
996
|
}
|
|
1017
997
|
if (s) {
|
|
@@ -1038,7 +1018,7 @@ function handleAsync(e, t, r) {
|
|
|
1038
1018
|
s = n;
|
|
1039
1019
|
o = true;
|
|
1040
1020
|
if (n.done) i = true;
|
|
1041
|
-
} else if (e.
|
|
1021
|
+
} else if (e.Ce !== t) {
|
|
1042
1022
|
return;
|
|
1043
1023
|
} else if (!n.done) asyncWrite(n.value, iterate);
|
|
1044
1024
|
else {
|
|
@@ -1048,7 +1028,7 @@ function handleAsync(e, t, r) {
|
|
|
1048
1028
|
}
|
|
1049
1029
|
},
|
|
1050
1030
|
n => {
|
|
1051
|
-
if (!f && e.
|
|
1031
|
+
if (!f && e.Ce === t) {
|
|
1052
1032
|
i = true;
|
|
1053
1033
|
handleError(n);
|
|
1054
1034
|
}
|
|
@@ -1064,36 +1044,36 @@ function handleAsync(e, t, r) {
|
|
|
1064
1044
|
};
|
|
1065
1045
|
const s = iterate();
|
|
1066
1046
|
if (!r && !s) {
|
|
1067
|
-
|
|
1068
|
-
throw new NotReadyError(
|
|
1047
|
+
j.initTransition(resolveTransition(e));
|
|
1048
|
+
throw new NotReadyError(V);
|
|
1069
1049
|
}
|
|
1070
1050
|
}
|
|
1071
1051
|
return u;
|
|
1072
1052
|
}
|
|
1073
1053
|
function clearStatus(e, t = false) {
|
|
1074
1054
|
clearPendingSources(e);
|
|
1075
|
-
e.
|
|
1076
|
-
e.
|
|
1055
|
+
e.Ie = false;
|
|
1056
|
+
e.ge = t ? 0 : e.ge & h;
|
|
1077
1057
|
setPendingError(e);
|
|
1078
1058
|
updatePendingSignal(e);
|
|
1079
|
-
e.
|
|
1059
|
+
e.Qe?.();
|
|
1080
1060
|
}
|
|
1081
1061
|
function notifyStatus(e, t, n, r, i) {
|
|
1082
1062
|
if (t === d && !(n instanceof StatusError) && !(n instanceof NotReadyError))
|
|
1083
1063
|
n = new StatusError(e, n);
|
|
1084
1064
|
const s = t === a && n instanceof NotReadyError ? n.source : undefined;
|
|
1085
1065
|
const o = s === e;
|
|
1086
|
-
const u = t === a && e.
|
|
1066
|
+
const u = t === a && e.ee !== undefined && !o;
|
|
1087
1067
|
const f = u && hasActiveOverride(e);
|
|
1088
1068
|
if (!r) {
|
|
1089
1069
|
if (t === a && s) {
|
|
1090
1070
|
addPendingSource(e, s);
|
|
1091
|
-
e.
|
|
1071
|
+
e.ge = a | (e.ge & h);
|
|
1092
1072
|
setPendingError(e, s, n);
|
|
1093
1073
|
} else {
|
|
1094
1074
|
clearPendingSources(e);
|
|
1095
|
-
e.
|
|
1096
|
-
e.
|
|
1075
|
+
e.ge = t | (t !== d ? e.ge & h : 0);
|
|
1076
|
+
e.ae = n;
|
|
1097
1077
|
}
|
|
1098
1078
|
updatePendingSignal(e);
|
|
1099
1079
|
}
|
|
@@ -1102,34 +1082,34 @@ function notifyStatus(e, t, n, r, i) {
|
|
|
1102
1082
|
}
|
|
1103
1083
|
const l = r || f;
|
|
1104
1084
|
const c = r || u ? undefined : i;
|
|
1105
|
-
if (e.
|
|
1085
|
+
if (e.Qe) {
|
|
1106
1086
|
if (r && t === a) {
|
|
1107
1087
|
return;
|
|
1108
1088
|
}
|
|
1109
1089
|
if (l) {
|
|
1110
|
-
e.
|
|
1090
|
+
e.Qe(t, n);
|
|
1111
1091
|
} else {
|
|
1112
|
-
e.
|
|
1092
|
+
e.Qe();
|
|
1113
1093
|
}
|
|
1114
1094
|
return;
|
|
1115
1095
|
}
|
|
1116
1096
|
forEachDependent(e, e => {
|
|
1117
|
-
e.
|
|
1097
|
+
e.de = E;
|
|
1118
1098
|
if (
|
|
1119
|
-
(t === a && s && e.
|
|
1120
|
-
(t !== a && (e.
|
|
1099
|
+
(t === a && s && e.ye !== s && !e.Se?.has(s)) ||
|
|
1100
|
+
(t !== a && (e.ae !== n || e.ye || e.Se))
|
|
1121
1101
|
) {
|
|
1122
|
-
if (!l && !e.
|
|
1102
|
+
if (!l && !e.K) j.se.push(e);
|
|
1123
1103
|
notifyStatus(e, t, n, l, c);
|
|
1124
1104
|
}
|
|
1125
1105
|
});
|
|
1126
1106
|
}
|
|
1127
|
-
let
|
|
1107
|
+
let T = null;
|
|
1128
1108
|
function enableExternalSource(e) {
|
|
1129
1109
|
const { factory: t, untrack: n = e => e() } = e;
|
|
1130
|
-
if (
|
|
1131
|
-
const { factory: e, untrack: r } =
|
|
1132
|
-
|
|
1110
|
+
if (T) {
|
|
1111
|
+
const { factory: e, untrack: r } = T;
|
|
1112
|
+
T = {
|
|
1133
1113
|
factory: (n, r) => {
|
|
1134
1114
|
const i = e(n, r);
|
|
1135
1115
|
const s = t(e => i.track(e), r);
|
|
@@ -1144,136 +1124,136 @@ function enableExternalSource(e) {
|
|
|
1144
1124
|
untrack: e => r(() => n(e))
|
|
1145
1125
|
};
|
|
1146
1126
|
} else {
|
|
1147
|
-
|
|
1127
|
+
T = { factory: t, untrack: n };
|
|
1148
1128
|
}
|
|
1149
1129
|
}
|
|
1150
|
-
GlobalQueue.
|
|
1151
|
-
GlobalQueue.
|
|
1130
|
+
GlobalQueue.oe = recompute;
|
|
1131
|
+
GlobalQueue.ue = disposeChildren;
|
|
1132
|
+
let H = false;
|
|
1152
1133
|
let Q = false;
|
|
1153
1134
|
let q = false;
|
|
1154
1135
|
let D = false;
|
|
1155
1136
|
let F = false;
|
|
1156
|
-
let V = false;
|
|
1157
1137
|
let M = false;
|
|
1138
|
+
let V = null;
|
|
1158
1139
|
let B = null;
|
|
1159
|
-
let G =
|
|
1160
|
-
let K =
|
|
1161
|
-
let z = null;
|
|
1140
|
+
let G = false;
|
|
1141
|
+
let K = null;
|
|
1162
1142
|
function ownerInSnapshotScope(e) {
|
|
1163
1143
|
while (e) {
|
|
1164
|
-
if (e.
|
|
1144
|
+
if (e.qe) return true;
|
|
1165
1145
|
e = e.i;
|
|
1166
1146
|
}
|
|
1167
1147
|
return false;
|
|
1168
1148
|
}
|
|
1169
1149
|
function setSnapshotCapture(e) {
|
|
1170
|
-
|
|
1171
|
-
if (e && !
|
|
1150
|
+
G = e;
|
|
1151
|
+
if (e && !K) K = new Set();
|
|
1172
1152
|
}
|
|
1173
1153
|
function markSnapshotScope(e) {
|
|
1174
|
-
e.
|
|
1154
|
+
e.qe = true;
|
|
1175
1155
|
}
|
|
1176
1156
|
function releaseSnapshotScope(e) {
|
|
1177
|
-
e.
|
|
1157
|
+
e.qe = false;
|
|
1178
1158
|
releaseSubtree(e);
|
|
1179
1159
|
schedule();
|
|
1180
1160
|
}
|
|
1181
1161
|
function releaseSubtree(e) {
|
|
1182
|
-
let t = e.
|
|
1162
|
+
let t = e.ke;
|
|
1183
1163
|
while (t) {
|
|
1184
|
-
if (t.
|
|
1185
|
-
t = t.
|
|
1164
|
+
if (t.qe) {
|
|
1165
|
+
t = t.Ee;
|
|
1186
1166
|
continue;
|
|
1187
1167
|
}
|
|
1188
1168
|
if (t.I) {
|
|
1189
1169
|
const e = t;
|
|
1190
|
-
e.
|
|
1170
|
+
e.pe = false;
|
|
1191
1171
|
if (e.m & l) {
|
|
1192
1172
|
e.m &= ~l;
|
|
1193
1173
|
e.m |= n;
|
|
1194
|
-
if (
|
|
1195
|
-
insertIntoHeap(e,
|
|
1174
|
+
if (P.A > e.o) P.A = e.o;
|
|
1175
|
+
insertIntoHeap(e, P);
|
|
1196
1176
|
}
|
|
1197
1177
|
}
|
|
1198
1178
|
releaseSubtree(t);
|
|
1199
|
-
t = t.
|
|
1179
|
+
t = t.Ee;
|
|
1200
1180
|
}
|
|
1201
1181
|
}
|
|
1202
1182
|
function clearSnapshots() {
|
|
1203
|
-
if (
|
|
1204
|
-
for (const e of
|
|
1205
|
-
delete e.
|
|
1183
|
+
if (K) {
|
|
1184
|
+
for (const e of K) {
|
|
1185
|
+
delete e.he;
|
|
1206
1186
|
delete e[m];
|
|
1207
1187
|
}
|
|
1208
|
-
|
|
1188
|
+
K = null;
|
|
1209
1189
|
}
|
|
1210
|
-
|
|
1190
|
+
G = false;
|
|
1211
1191
|
}
|
|
1212
1192
|
function recompute(t, n = false) {
|
|
1213
|
-
const i = t.
|
|
1193
|
+
const i = t.D;
|
|
1214
1194
|
if (!n) {
|
|
1215
|
-
if (t.
|
|
1216
|
-
deleteFromHeap(t, t.m & o ?
|
|
1217
|
-
t.
|
|
1218
|
-
if (t.
|
|
1195
|
+
if (t.K && (!i || C) && C !== t.K) j.initTransition(t.K);
|
|
1196
|
+
deleteFromHeap(t, t.m & o ? k : P);
|
|
1197
|
+
t.Ce = null;
|
|
1198
|
+
if (t.K || i === y) disposeChildren(t);
|
|
1219
1199
|
else {
|
|
1220
1200
|
markDisposal(t);
|
|
1221
|
-
t.
|
|
1222
|
-
t.
|
|
1223
|
-
t.
|
|
1224
|
-
t.
|
|
1225
|
-
t.
|
|
1201
|
+
t.Ne = t.je;
|
|
1202
|
+
t.We = t.ke;
|
|
1203
|
+
t.je = null;
|
|
1204
|
+
t.ke = null;
|
|
1205
|
+
t.Ae = 0;
|
|
1226
1206
|
}
|
|
1227
1207
|
}
|
|
1228
1208
|
const s = !!(t.m & f);
|
|
1229
|
-
const u = t.
|
|
1230
|
-
const c = !!(t.
|
|
1231
|
-
const h =
|
|
1232
|
-
|
|
1233
|
-
t.
|
|
1209
|
+
const u = t.ee !== undefined && t.ee !== S;
|
|
1210
|
+
const c = !!(t.ge & a);
|
|
1211
|
+
const h = V;
|
|
1212
|
+
V = t;
|
|
1213
|
+
t.Pe = null;
|
|
1234
1214
|
t.m = r;
|
|
1235
|
-
t.
|
|
1236
|
-
let p = t.
|
|
1215
|
+
t.de = E;
|
|
1216
|
+
let p = t.Z === S ? t.$ : t.Z;
|
|
1237
1217
|
let g = t.o;
|
|
1238
|
-
let w =
|
|
1239
|
-
let m =
|
|
1240
|
-
|
|
1218
|
+
let w = H;
|
|
1219
|
+
let m = B;
|
|
1220
|
+
H = true;
|
|
1241
1221
|
if (s) {
|
|
1242
1222
|
const e = resolveLane(t);
|
|
1243
|
-
if (e)
|
|
1223
|
+
if (e) B = e;
|
|
1244
1224
|
}
|
|
1245
1225
|
try {
|
|
1246
1226
|
p = handleAsync(t, t.I(p));
|
|
1247
1227
|
clearStatus(t, n);
|
|
1248
1228
|
const e = resolveLane(t);
|
|
1249
1229
|
if (e) {
|
|
1250
|
-
e.
|
|
1251
|
-
updatePendingSignal(e.
|
|
1230
|
+
e.H.delete(t);
|
|
1231
|
+
updatePendingSignal(e.te);
|
|
1252
1232
|
}
|
|
1253
1233
|
} catch (e) {
|
|
1254
|
-
if (e instanceof NotReadyError &&
|
|
1255
|
-
const e = findLane(
|
|
1256
|
-
if (e.
|
|
1257
|
-
e.
|
|
1258
|
-
t.
|
|
1259
|
-
updatePendingSignal(e.
|
|
1234
|
+
if (e instanceof NotReadyError && B) {
|
|
1235
|
+
const e = findLane(B);
|
|
1236
|
+
if (e.te !== t) {
|
|
1237
|
+
e.H.add(t);
|
|
1238
|
+
t.Y = e;
|
|
1239
|
+
updatePendingSignal(e.te);
|
|
1260
1240
|
}
|
|
1261
1241
|
}
|
|
1262
|
-
if (e instanceof NotReadyError) t.
|
|
1242
|
+
if (e instanceof NotReadyError) t.Ie = true;
|
|
1263
1243
|
notifyStatus(
|
|
1264
1244
|
t,
|
|
1265
1245
|
e instanceof NotReadyError ? a : d,
|
|
1266
1246
|
e,
|
|
1267
1247
|
undefined,
|
|
1268
|
-
e instanceof NotReadyError ? t.
|
|
1248
|
+
e instanceof NotReadyError ? t.Y : undefined
|
|
1269
1249
|
);
|
|
1270
1250
|
} finally {
|
|
1271
|
-
|
|
1251
|
+
H = w;
|
|
1272
1252
|
t.m = e | (n ? t.m & l : 0);
|
|
1273
|
-
|
|
1253
|
+
V = h;
|
|
1274
1254
|
}
|
|
1275
|
-
if (!t.
|
|
1276
|
-
const e = t.
|
|
1255
|
+
if (!t.ae) {
|
|
1256
|
+
const e = t.Pe;
|
|
1277
1257
|
let r = e !== null ? e.j : t.N;
|
|
1278
1258
|
if (r !== null) {
|
|
1279
1259
|
do {
|
|
@@ -1282,30 +1262,30 @@ function recompute(t, n = false) {
|
|
|
1282
1262
|
if (e !== null) e.j = null;
|
|
1283
1263
|
else t.N = null;
|
|
1284
1264
|
}
|
|
1285
|
-
const f = u ? t.
|
|
1286
|
-
const l = !t.
|
|
1265
|
+
const f = u ? t.ee : t.Z === S ? t.$ : t.Z;
|
|
1266
|
+
const l = !t.Te || !t.Te(f, p);
|
|
1287
1267
|
if (l) {
|
|
1288
|
-
const e = u ? t.
|
|
1289
|
-
if (n || (i &&
|
|
1290
|
-
t
|
|
1268
|
+
const e = u ? t.ee : undefined;
|
|
1269
|
+
if (n || (i && C !== t.K) || s) {
|
|
1270
|
+
t.$ = p;
|
|
1291
1271
|
if (u && s) {
|
|
1292
|
-
t.
|
|
1293
|
-
t.
|
|
1272
|
+
t.ee = p;
|
|
1273
|
+
t.Z = p;
|
|
1294
1274
|
}
|
|
1295
|
-
} else t.
|
|
1296
|
-
if (u && !s && c && !t.
|
|
1297
|
-
if (!u || s || t.
|
|
1275
|
+
} else t.Z = p;
|
|
1276
|
+
if (u && !s && c && !t._e) t.ee = p;
|
|
1277
|
+
if (!u || s || t.ee !== e) insertSubs(t, s || u);
|
|
1298
1278
|
} else if (u) {
|
|
1299
|
-
t.
|
|
1279
|
+
t.Z = p;
|
|
1300
1280
|
} else if (t.o != g) {
|
|
1301
1281
|
for (let e = t.O; e !== null; e = e.P) {
|
|
1302
|
-
insertIntoHeapHeight(e.k, e.k.m & o ?
|
|
1282
|
+
insertIntoHeapHeight(e.k, e.k.m & o ? k : P);
|
|
1303
1283
|
}
|
|
1304
1284
|
}
|
|
1305
1285
|
}
|
|
1306
|
-
|
|
1307
|
-
(!n || t.
|
|
1308
|
-
t.
|
|
1286
|
+
B = m;
|
|
1287
|
+
(!n || t.ge & a) && !t.K && !(C && u) && j.se.push(t);
|
|
1288
|
+
t.K && i && C !== t.K && runInTransition(t.K, () => recompute(t));
|
|
1309
1289
|
}
|
|
1310
1290
|
function updateIfNecessary(e) {
|
|
1311
1291
|
if (e.m & t) {
|
|
@@ -1320,7 +1300,7 @@ function updateIfNecessary(e) {
|
|
|
1320
1300
|
}
|
|
1321
1301
|
}
|
|
1322
1302
|
}
|
|
1323
|
-
if (e.m & (n | f) || (e.
|
|
1303
|
+
if (e.m & (n | f) || (e.ae && e.de < E && !e.Ce)) {
|
|
1324
1304
|
recompute(e);
|
|
1325
1305
|
}
|
|
1326
1306
|
e.m = e.m & (l | i | s);
|
|
@@ -1328,53 +1308,53 @@ function updateIfNecessary(e) {
|
|
|
1328
1308
|
function computed(t, n, r) {
|
|
1329
1309
|
const i = r?.transparent ?? false;
|
|
1330
1310
|
const s = {
|
|
1331
|
-
id: r?.id ?? (i ?
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1311
|
+
id: r?.id ?? (i ? V?.id : V?.id != null ? getNextChildId(V) : undefined),
|
|
1312
|
+
Re: i || undefined,
|
|
1313
|
+
Te: r?.equals != null ? r.equals : isEqual,
|
|
1314
|
+
ce: !!r?.pureWrite,
|
|
1315
|
+
xe: r?.unobserved,
|
|
1316
|
+
je: null,
|
|
1317
|
+
M: V?.M ?? j,
|
|
1318
|
+
Le: V?.Le ?? b,
|
|
1319
|
+
Ae: 0,
|
|
1340
1320
|
I: t,
|
|
1341
|
-
|
|
1321
|
+
$: n,
|
|
1342
1322
|
o: 0,
|
|
1343
1323
|
C: null,
|
|
1344
1324
|
p: undefined,
|
|
1345
1325
|
h: null,
|
|
1346
1326
|
N: null,
|
|
1347
|
-
|
|
1327
|
+
Pe: null,
|
|
1348
1328
|
O: null,
|
|
1349
|
-
|
|
1350
|
-
i:
|
|
1351
|
-
|
|
1352
|
-
|
|
1329
|
+
Oe: null,
|
|
1330
|
+
i: V,
|
|
1331
|
+
Ee: null,
|
|
1332
|
+
ke: null,
|
|
1353
1333
|
m: r?.lazy ? c : e,
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1334
|
+
ge: h,
|
|
1335
|
+
de: E,
|
|
1336
|
+
Z: S,
|
|
1337
|
+
Ne: null,
|
|
1338
|
+
We: null,
|
|
1358
1339
|
Ce: null,
|
|
1359
|
-
|
|
1360
|
-
X: null
|
|
1340
|
+
K: null
|
|
1361
1341
|
};
|
|
1362
1342
|
s.h = s;
|
|
1363
|
-
const o =
|
|
1364
|
-
if (
|
|
1365
|
-
const e =
|
|
1343
|
+
const o = V?.t ? V.u : V;
|
|
1344
|
+
if (V) {
|
|
1345
|
+
const e = V.ke;
|
|
1366
1346
|
if (e === null) {
|
|
1367
|
-
|
|
1347
|
+
V.ke = s;
|
|
1368
1348
|
} else {
|
|
1369
|
-
s.
|
|
1370
|
-
|
|
1349
|
+
s.Ee = e;
|
|
1350
|
+
V.ke = s;
|
|
1371
1351
|
}
|
|
1372
1352
|
}
|
|
1373
1353
|
if (o) s.o = o.o + 1;
|
|
1374
|
-
if (
|
|
1375
|
-
if (
|
|
1354
|
+
if (G && ownerInSnapshotScope(V)) s.pe = true;
|
|
1355
|
+
if (T) {
|
|
1376
1356
|
const e = signal(undefined, { equals: false, pureWrite: true });
|
|
1377
|
-
const t =
|
|
1357
|
+
const t = T.factory(s.I, () => {
|
|
1378
1358
|
setSignal(e, undefined);
|
|
1379
1359
|
});
|
|
1380
1360
|
cleanup(() => t.dispose());
|
|
@@ -1384,57 +1364,57 @@ function computed(t, n, r) {
|
|
|
1384
1364
|
};
|
|
1385
1365
|
}
|
|
1386
1366
|
!r?.lazy && recompute(s, true);
|
|
1387
|
-
if (
|
|
1388
|
-
if (!(s.
|
|
1389
|
-
s.
|
|
1390
|
-
|
|
1367
|
+
if (G && !r?.lazy) {
|
|
1368
|
+
if (!(s.ge & a)) {
|
|
1369
|
+
s.he = s.$ === undefined ? w : s.$;
|
|
1370
|
+
K.add(s);
|
|
1391
1371
|
}
|
|
1392
1372
|
}
|
|
1393
1373
|
return s;
|
|
1394
1374
|
}
|
|
1395
1375
|
function signal(e, t, n = null) {
|
|
1396
1376
|
const r = {
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1377
|
+
Te: t?.equals != null ? t.equals : isEqual,
|
|
1378
|
+
ce: !!t?.pureWrite,
|
|
1379
|
+
De: !!t?.De,
|
|
1380
|
+
xe: t?.unobserved,
|
|
1381
|
+
$: e,
|
|
1402
1382
|
O: null,
|
|
1403
|
-
|
|
1404
|
-
|
|
1383
|
+
Oe: null,
|
|
1384
|
+
de: E,
|
|
1405
1385
|
L: n,
|
|
1406
1386
|
W: n?.C || null,
|
|
1407
|
-
|
|
1387
|
+
Z: S
|
|
1408
1388
|
};
|
|
1409
1389
|
n && (n.C = r);
|
|
1410
|
-
if (
|
|
1411
|
-
r.
|
|
1412
|
-
|
|
1390
|
+
if (G && !r.De && !((n?.ge ?? 0) & a)) {
|
|
1391
|
+
r.he = e === undefined ? w : e;
|
|
1392
|
+
K.add(r);
|
|
1413
1393
|
}
|
|
1414
1394
|
return r;
|
|
1415
1395
|
}
|
|
1416
1396
|
function optimisticSignal(e, t) {
|
|
1417
1397
|
const n = signal(e, t);
|
|
1418
|
-
n.
|
|
1398
|
+
n.ee = S;
|
|
1419
1399
|
return n;
|
|
1420
1400
|
}
|
|
1421
1401
|
function optimisticComputed(e, t, n) {
|
|
1422
1402
|
const r = computed(e, t, n);
|
|
1423
|
-
r.
|
|
1403
|
+
r.ee = S;
|
|
1424
1404
|
return r;
|
|
1425
1405
|
}
|
|
1426
1406
|
function isEqual(e, t) {
|
|
1427
1407
|
return e === t;
|
|
1428
1408
|
}
|
|
1429
1409
|
function untrack(e, t) {
|
|
1430
|
-
if (!
|
|
1431
|
-
const n =
|
|
1432
|
-
|
|
1410
|
+
if (!T && !H && true) return e();
|
|
1411
|
+
const n = H;
|
|
1412
|
+
H = false;
|
|
1433
1413
|
try {
|
|
1434
|
-
if (
|
|
1414
|
+
if (T) return T.untrack(e);
|
|
1435
1415
|
return e();
|
|
1436
1416
|
} finally {
|
|
1437
|
-
|
|
1417
|
+
H = n;
|
|
1438
1418
|
}
|
|
1439
1419
|
}
|
|
1440
1420
|
function read(e) {
|
|
@@ -1442,62 +1422,62 @@ function read(e) {
|
|
|
1442
1422
|
const t = getLatestValueComputed(e);
|
|
1443
1423
|
const n = M;
|
|
1444
1424
|
M = false;
|
|
1445
|
-
const r = e.
|
|
1425
|
+
const r = e.ee !== undefined && e.ee !== S ? e.ee : e.$;
|
|
1446
1426
|
let i;
|
|
1447
1427
|
try {
|
|
1448
1428
|
i = read(t);
|
|
1449
1429
|
} catch (e) {
|
|
1450
|
-
if (!
|
|
1430
|
+
if (!V && e instanceof NotReadyError) return r;
|
|
1451
1431
|
throw e;
|
|
1452
1432
|
} finally {
|
|
1453
1433
|
M = n;
|
|
1454
1434
|
}
|
|
1455
|
-
if (t.
|
|
1456
|
-
if (
|
|
1457
|
-
const e = findLane(t.
|
|
1458
|
-
const n = findLane(
|
|
1459
|
-
if (e !== n && e.
|
|
1435
|
+
if (t.ge & a) return r;
|
|
1436
|
+
if (Q && B && t.Y) {
|
|
1437
|
+
const e = findLane(t.Y);
|
|
1438
|
+
const n = findLane(B);
|
|
1439
|
+
if (e !== n && e.H.size > 0) {
|
|
1460
1440
|
return r;
|
|
1461
1441
|
}
|
|
1462
1442
|
}
|
|
1463
1443
|
return i;
|
|
1464
1444
|
}
|
|
1465
|
-
if (
|
|
1445
|
+
if (D) {
|
|
1466
1446
|
const t = e.L;
|
|
1467
|
-
const n =
|
|
1468
|
-
|
|
1469
|
-
if (t && e.
|
|
1470
|
-
if (e.
|
|
1471
|
-
|
|
1447
|
+
const n = D;
|
|
1448
|
+
D = false;
|
|
1449
|
+
if (t && e.ee !== undefined) {
|
|
1450
|
+
if (e.ee !== S && (t.Ce || !!(t.ge & a))) {
|
|
1451
|
+
F = true;
|
|
1472
1452
|
}
|
|
1473
|
-
let n =
|
|
1453
|
+
let n = V;
|
|
1474
1454
|
if (n?.t) n = n.u;
|
|
1475
|
-
if (n &&
|
|
1455
|
+
if (n && H) link(e, n);
|
|
1476
1456
|
read(getPendingSignal(e));
|
|
1477
1457
|
read(getPendingSignal(t));
|
|
1478
1458
|
} else {
|
|
1479
|
-
if (read(getPendingSignal(e)))
|
|
1480
|
-
if (t && read(getPendingSignal(t)))
|
|
1459
|
+
if (read(getPendingSignal(e))) F = true;
|
|
1460
|
+
if (t && read(getPendingSignal(t))) F = true;
|
|
1481
1461
|
}
|
|
1482
|
-
|
|
1483
|
-
return e
|
|
1462
|
+
D = n;
|
|
1463
|
+
return e.$;
|
|
1484
1464
|
}
|
|
1485
|
-
let t =
|
|
1465
|
+
let t = V;
|
|
1486
1466
|
if (t?.t) t = t.u;
|
|
1487
|
-
if (
|
|
1467
|
+
if (q && e.I) recompute(e);
|
|
1488
1468
|
if (e.m & c) {
|
|
1489
1469
|
e.m &= ~c;
|
|
1490
1470
|
recompute(e, true);
|
|
1491
1471
|
}
|
|
1492
1472
|
const n = e.L || e;
|
|
1493
|
-
if (t &&
|
|
1473
|
+
if (t && H) {
|
|
1494
1474
|
if (e.I && e.m & u) recompute(e);
|
|
1495
1475
|
link(e, t);
|
|
1496
1476
|
if (n.I) {
|
|
1497
1477
|
const r = e.m & o;
|
|
1498
|
-
if (n.o >= (r ?
|
|
1478
|
+
if (n.o >= (r ? k.A : P.A)) {
|
|
1499
1479
|
markNode(t);
|
|
1500
|
-
markHeap(r ?
|
|
1480
|
+
markHeap(r ? k : P);
|
|
1501
1481
|
updateIfNecessary(n);
|
|
1502
1482
|
}
|
|
1503
1483
|
const i = n.o;
|
|
@@ -1506,59 +1486,59 @@ function read(e) {
|
|
|
1506
1486
|
}
|
|
1507
1487
|
}
|
|
1508
1488
|
}
|
|
1509
|
-
if (n.
|
|
1510
|
-
if (t && !(
|
|
1511
|
-
if (
|
|
1512
|
-
const r = n.
|
|
1513
|
-
const i = findLane(
|
|
1489
|
+
if (n.ge & a) {
|
|
1490
|
+
if (t && !(Q && n.K && C !== n.K)) {
|
|
1491
|
+
if (B) {
|
|
1492
|
+
const r = n.Y;
|
|
1493
|
+
const i = findLane(B);
|
|
1514
1494
|
if (r && findLane(r) === i && !hasActiveOverride(n)) {
|
|
1515
|
-
if (!
|
|
1516
|
-
throw n.
|
|
1495
|
+
if (!H && e !== t) link(e, t);
|
|
1496
|
+
throw n.ae;
|
|
1517
1497
|
}
|
|
1518
1498
|
} else {
|
|
1519
|
-
if (!
|
|
1520
|
-
throw n.
|
|
1499
|
+
if (!H && e !== t) link(e, t);
|
|
1500
|
+
throw n.ae;
|
|
1521
1501
|
}
|
|
1522
|
-
} else if (t && n !== e && n.
|
|
1523
|
-
if (!
|
|
1524
|
-
throw n.
|
|
1525
|
-
} else if (!t && n.
|
|
1526
|
-
throw n.
|
|
1502
|
+
} else if (t && n !== e && n.ge & h) {
|
|
1503
|
+
if (!H && e !== t) link(e, t);
|
|
1504
|
+
throw n.ae;
|
|
1505
|
+
} else if (!t && n.ge & h) {
|
|
1506
|
+
throw n.ae;
|
|
1527
1507
|
}
|
|
1528
1508
|
}
|
|
1529
|
-
if (e.I && e.
|
|
1530
|
-
if (e.
|
|
1509
|
+
if (e.I && e.ge & d) {
|
|
1510
|
+
if (e.de < E) {
|
|
1531
1511
|
recompute(e);
|
|
1532
1512
|
return read(e);
|
|
1533
|
-
} else throw e.
|
|
1513
|
+
} else throw e.ae;
|
|
1534
1514
|
}
|
|
1535
|
-
if (
|
|
1536
|
-
const n = e.
|
|
1515
|
+
if (G && t && t.pe) {
|
|
1516
|
+
const n = e.he;
|
|
1537
1517
|
if (n !== undefined) {
|
|
1538
1518
|
const r = n === w ? undefined : n;
|
|
1539
|
-
const i = e.
|
|
1519
|
+
const i = e.Z !== S ? e.Z : e.$;
|
|
1540
1520
|
if (i !== r) t.m |= l;
|
|
1541
1521
|
return r;
|
|
1542
1522
|
}
|
|
1543
1523
|
}
|
|
1544
|
-
if (e.
|
|
1545
|
-
if (t &&
|
|
1546
|
-
return e.
|
|
1524
|
+
if (e.ee !== undefined && e.ee !== S) {
|
|
1525
|
+
if (t && Q && shouldReadStashedOptimisticValue(e)) return e.$;
|
|
1526
|
+
return e.ee;
|
|
1547
1527
|
}
|
|
1548
1528
|
return !t ||
|
|
1549
|
-
(
|
|
1550
|
-
e.
|
|
1551
|
-
(
|
|
1552
|
-
? e
|
|
1553
|
-
: e.
|
|
1529
|
+
(B !== null && (e.ee !== undefined || e.Y || (n === e && Q) || !!(n.ge & a))) ||
|
|
1530
|
+
e.Z === S ||
|
|
1531
|
+
(Q && e.K && C !== e.K)
|
|
1532
|
+
? e.$
|
|
1533
|
+
: e.Z;
|
|
1554
1534
|
}
|
|
1555
1535
|
function setSignal(e, t) {
|
|
1556
|
-
if (e.
|
|
1557
|
-
const n = e.
|
|
1558
|
-
const r = e.
|
|
1559
|
-
const i = n ? (r ? e.
|
|
1536
|
+
if (e.K && C !== e.K) j.initTransition(e.K);
|
|
1537
|
+
const n = e.ee !== undefined && !A;
|
|
1538
|
+
const r = e.ee !== undefined && e.ee !== S;
|
|
1539
|
+
const i = n ? (r ? e.ee : e.$) : e.Z === S ? e.$ : e.Z;
|
|
1560
1540
|
if (typeof t === "function") t = t(i);
|
|
1561
|
-
const s = !e.
|
|
1541
|
+
const s = !e.Te || !e.Te(i, t) || !!(e.ge & h);
|
|
1562
1542
|
if (!s) {
|
|
1563
1543
|
if (n && r && e.I) {
|
|
1564
1544
|
insertSubs(e, true);
|
|
@@ -1567,112 +1547,112 @@ function setSignal(e, t) {
|
|
|
1567
1547
|
return t;
|
|
1568
1548
|
}
|
|
1569
1549
|
if (n) {
|
|
1570
|
-
const n = e.
|
|
1571
|
-
if (!n)
|
|
1550
|
+
const n = e.ee === S;
|
|
1551
|
+
if (!n) j.initTransition(resolveTransition(e));
|
|
1572
1552
|
if (n) {
|
|
1573
|
-
e.
|
|
1574
|
-
|
|
1553
|
+
e.Z = e.$;
|
|
1554
|
+
j.U.push(e);
|
|
1575
1555
|
}
|
|
1576
|
-
e.
|
|
1556
|
+
e._e = true;
|
|
1577
1557
|
const r = getOrCreateLane(e);
|
|
1578
|
-
e.
|
|
1579
|
-
e.
|
|
1558
|
+
e.Y = r;
|
|
1559
|
+
e.ee = t;
|
|
1580
1560
|
} else {
|
|
1581
|
-
if (e.
|
|
1582
|
-
e.
|
|
1561
|
+
if (e.Z === S) j.se.push(e);
|
|
1562
|
+
e.Z = t;
|
|
1583
1563
|
}
|
|
1584
1564
|
updatePendingSignal(e);
|
|
1585
|
-
if (e.
|
|
1586
|
-
setSignal(e.
|
|
1565
|
+
if (e.He) {
|
|
1566
|
+
setSignal(e.He, t);
|
|
1587
1567
|
}
|
|
1588
|
-
e.
|
|
1568
|
+
e.de = E;
|
|
1589
1569
|
insertSubs(e, n);
|
|
1590
1570
|
schedule();
|
|
1591
1571
|
return t;
|
|
1592
1572
|
}
|
|
1593
1573
|
function runWithOwner(e, t) {
|
|
1594
|
-
const n =
|
|
1595
|
-
const r =
|
|
1596
|
-
|
|
1597
|
-
|
|
1574
|
+
const n = V;
|
|
1575
|
+
const r = H;
|
|
1576
|
+
V = e;
|
|
1577
|
+
H = false;
|
|
1598
1578
|
try {
|
|
1599
1579
|
return t();
|
|
1600
1580
|
} finally {
|
|
1601
|
-
|
|
1602
|
-
|
|
1581
|
+
V = n;
|
|
1582
|
+
H = r;
|
|
1603
1583
|
}
|
|
1604
1584
|
}
|
|
1605
1585
|
function getPendingSignal(e) {
|
|
1606
|
-
if (!e.
|
|
1607
|
-
e.
|
|
1608
|
-
if (e.
|
|
1609
|
-
e.
|
|
1586
|
+
if (!e.Fe) {
|
|
1587
|
+
e.Fe = optimisticSignal(false, { pureWrite: true });
|
|
1588
|
+
if (e.we) {
|
|
1589
|
+
e.Fe.we = e;
|
|
1610
1590
|
}
|
|
1611
|
-
if (computePendingState(e)) setSignal(e.
|
|
1591
|
+
if (computePendingState(e)) setSignal(e.Fe, true);
|
|
1612
1592
|
}
|
|
1613
|
-
return e.
|
|
1593
|
+
return e.Fe;
|
|
1614
1594
|
}
|
|
1615
1595
|
function computePendingState(e) {
|
|
1616
1596
|
const t = e;
|
|
1617
1597
|
const n = e.L;
|
|
1618
|
-
if (n && e.
|
|
1619
|
-
return !n.
|
|
1598
|
+
if (n && e.Z !== S) {
|
|
1599
|
+
return !n.Ce && !(n.ge & a);
|
|
1620
1600
|
}
|
|
1621
|
-
if (e.
|
|
1622
|
-
if (t.
|
|
1623
|
-
if (e.
|
|
1624
|
-
const t = e.
|
|
1625
|
-
return !!(t && t.
|
|
1601
|
+
if (e.ee !== undefined && e.ee !== S) {
|
|
1602
|
+
if (t.ge & a && !(t.ge & h)) return true;
|
|
1603
|
+
if (e.we) {
|
|
1604
|
+
const t = e.Y ? findLane(e.Y) : null;
|
|
1605
|
+
return !!(t && t.H.size > 0);
|
|
1626
1606
|
}
|
|
1627
1607
|
return true;
|
|
1628
1608
|
}
|
|
1629
|
-
if (e.
|
|
1609
|
+
if (e.ee !== undefined && e.ee === S && !e.we) {
|
|
1630
1610
|
return false;
|
|
1631
1611
|
}
|
|
1632
|
-
if (e.
|
|
1633
|
-
return !!(t.
|
|
1612
|
+
if (e.Z !== S && !(t.ge & h)) return true;
|
|
1613
|
+
return !!(t.ge & a && !(t.ge & h));
|
|
1634
1614
|
}
|
|
1635
1615
|
function updatePendingSignal(e) {
|
|
1636
|
-
if (e.
|
|
1616
|
+
if (e.Fe) {
|
|
1637
1617
|
const t = computePendingState(e);
|
|
1638
|
-
const n = e.
|
|
1618
|
+
const n = e.Fe;
|
|
1639
1619
|
setSignal(n, t);
|
|
1640
|
-
if (!t && n.
|
|
1620
|
+
if (!t && n.Y) {
|
|
1641
1621
|
const t = resolveLane(e);
|
|
1642
|
-
if (t && t.
|
|
1643
|
-
const e = findLane(n.
|
|
1622
|
+
if (t && t.H.size > 0) {
|
|
1623
|
+
const e = findLane(n.Y);
|
|
1644
1624
|
if (e !== t) {
|
|
1645
1625
|
mergeLanes(t, e);
|
|
1646
1626
|
}
|
|
1647
1627
|
}
|
|
1648
|
-
|
|
1649
|
-
n.
|
|
1628
|
+
R.delete(n);
|
|
1629
|
+
n.Y = undefined;
|
|
1650
1630
|
}
|
|
1651
1631
|
}
|
|
1652
1632
|
}
|
|
1653
1633
|
function getLatestValueComputed(e) {
|
|
1654
|
-
if (!e.
|
|
1634
|
+
if (!e.He) {
|
|
1655
1635
|
const t = M;
|
|
1656
1636
|
M = false;
|
|
1657
|
-
const n =
|
|
1658
|
-
|
|
1659
|
-
const r =
|
|
1660
|
-
|
|
1661
|
-
e.
|
|
1662
|
-
e.
|
|
1663
|
-
|
|
1664
|
-
|
|
1637
|
+
const n = D;
|
|
1638
|
+
D = false;
|
|
1639
|
+
const r = V;
|
|
1640
|
+
V = null;
|
|
1641
|
+
e.He = optimisticComputed(() => read(e));
|
|
1642
|
+
e.He.we = e;
|
|
1643
|
+
V = r;
|
|
1644
|
+
D = n;
|
|
1665
1645
|
M = t;
|
|
1666
1646
|
}
|
|
1667
|
-
return e.
|
|
1647
|
+
return e.He;
|
|
1668
1648
|
}
|
|
1669
1649
|
function staleValues(e, t = true) {
|
|
1670
|
-
const n =
|
|
1671
|
-
|
|
1650
|
+
const n = Q;
|
|
1651
|
+
Q = t;
|
|
1672
1652
|
try {
|
|
1673
1653
|
return e();
|
|
1674
1654
|
} finally {
|
|
1675
|
-
|
|
1655
|
+
Q = n;
|
|
1676
1656
|
}
|
|
1677
1657
|
}
|
|
1678
1658
|
function latest(e) {
|
|
@@ -1685,23 +1665,23 @@ function latest(e) {
|
|
|
1685
1665
|
}
|
|
1686
1666
|
}
|
|
1687
1667
|
function isPending(e) {
|
|
1688
|
-
const t =
|
|
1689
|
-
const n =
|
|
1690
|
-
|
|
1691
|
-
|
|
1668
|
+
const t = D;
|
|
1669
|
+
const n = F;
|
|
1670
|
+
D = true;
|
|
1671
|
+
F = false;
|
|
1692
1672
|
try {
|
|
1693
1673
|
e();
|
|
1694
|
-
return
|
|
1674
|
+
return F;
|
|
1695
1675
|
} catch {
|
|
1696
|
-
return
|
|
1676
|
+
return F;
|
|
1697
1677
|
} finally {
|
|
1698
|
-
|
|
1699
|
-
|
|
1678
|
+
D = t;
|
|
1679
|
+
F = n;
|
|
1700
1680
|
}
|
|
1701
1681
|
}
|
|
1702
1682
|
function refresh(e) {
|
|
1703
|
-
let t =
|
|
1704
|
-
|
|
1683
|
+
let t = q;
|
|
1684
|
+
q = true;
|
|
1705
1685
|
try {
|
|
1706
1686
|
if (typeof e !== "function") {
|
|
1707
1687
|
recompute(e[O]);
|
|
@@ -1709,14 +1689,14 @@ function refresh(e) {
|
|
|
1709
1689
|
}
|
|
1710
1690
|
return untrack(e);
|
|
1711
1691
|
} finally {
|
|
1712
|
-
|
|
1692
|
+
q = t;
|
|
1713
1693
|
if (!t) {
|
|
1714
1694
|
schedule();
|
|
1715
1695
|
}
|
|
1716
1696
|
}
|
|
1717
1697
|
}
|
|
1718
1698
|
function isRefreshing() {
|
|
1719
|
-
return
|
|
1699
|
+
return q;
|
|
1720
1700
|
}
|
|
1721
1701
|
function createContext(e, t) {
|
|
1722
1702
|
return { id: Symbol(t), defaultValue: e };
|
|
@@ -1725,7 +1705,7 @@ function getContext(e, t = getOwner()) {
|
|
|
1725
1705
|
if (!t) {
|
|
1726
1706
|
throw new NoOwnerError();
|
|
1727
1707
|
}
|
|
1728
|
-
const n = hasContext(e, t) ? t.
|
|
1708
|
+
const n = hasContext(e, t) ? t.Le[e.id] : e.defaultValue;
|
|
1729
1709
|
if (isUndefined(n)) {
|
|
1730
1710
|
throw new ContextNotFoundError();
|
|
1731
1711
|
}
|
|
@@ -1735,10 +1715,10 @@ function setContext(e, t, n = getOwner()) {
|
|
|
1735
1715
|
if (!n) {
|
|
1736
1716
|
throw new NoOwnerError();
|
|
1737
1717
|
}
|
|
1738
|
-
n.
|
|
1718
|
+
n.Le = { ...n.Le, [e.id]: isUndefined(t) ? e.defaultValue : t };
|
|
1739
1719
|
}
|
|
1740
1720
|
function hasContext(e, t) {
|
|
1741
|
-
return !isUndefined(t?.
|
|
1721
|
+
return !isUndefined(t?.Le[e.id]);
|
|
1742
1722
|
}
|
|
1743
1723
|
function isUndefined(e) {
|
|
1744
1724
|
return typeof e === "undefined";
|
|
@@ -1748,99 +1728,99 @@ function effect(e, t, n, r, i) {
|
|
|
1748
1728
|
const o = computed(i?.render ? t => staleValues(() => e(t)) : e, r, {
|
|
1749
1729
|
...i,
|
|
1750
1730
|
equals: () => {
|
|
1751
|
-
o.
|
|
1752
|
-
if (s) o.
|
|
1731
|
+
o.F = !o.ae;
|
|
1732
|
+
if (s) o.M.enqueue(o.D, runEffect.bind(o));
|
|
1753
1733
|
return false;
|
|
1754
1734
|
},
|
|
1755
1735
|
lazy: true
|
|
1756
1736
|
});
|
|
1757
1737
|
o.Me = r;
|
|
1758
|
-
o.
|
|
1759
|
-
o.
|
|
1760
|
-
o.
|
|
1761
|
-
o.
|
|
1762
|
-
o.
|
|
1763
|
-
const n = e !== undefined ? e : o.
|
|
1764
|
-
const r = t !== undefined ? t : o.
|
|
1738
|
+
o.Ve = t;
|
|
1739
|
+
o.Be = n;
|
|
1740
|
+
o.Ge = undefined;
|
|
1741
|
+
o.D = i?.render ? p : g;
|
|
1742
|
+
o.Qe = (e, t) => {
|
|
1743
|
+
const n = e !== undefined ? e : o.ge;
|
|
1744
|
+
const r = t !== undefined ? t : o.ae;
|
|
1765
1745
|
if (n & d) {
|
|
1766
1746
|
let e = r;
|
|
1767
|
-
o.
|
|
1768
|
-
if (o.
|
|
1747
|
+
o.M.notify(o, a, 0);
|
|
1748
|
+
if (o.D === g) {
|
|
1769
1749
|
try {
|
|
1770
|
-
return o.
|
|
1771
|
-
? o.
|
|
1772
|
-
o.
|
|
1773
|
-
o.
|
|
1750
|
+
return o.Be
|
|
1751
|
+
? o.Be(e, () => {
|
|
1752
|
+
o.Ge?.();
|
|
1753
|
+
o.Ge = undefined;
|
|
1774
1754
|
})
|
|
1775
1755
|
: console.error(e);
|
|
1776
1756
|
} catch (t) {
|
|
1777
1757
|
e = t;
|
|
1778
1758
|
}
|
|
1779
1759
|
}
|
|
1780
|
-
if (!o.
|
|
1781
|
-
} else if (o.
|
|
1782
|
-
o.
|
|
1760
|
+
if (!o.M.notify(o, d, d)) throw e;
|
|
1761
|
+
} else if (o.D === p) {
|
|
1762
|
+
o.M.notify(o, a | d, n, r);
|
|
1783
1763
|
}
|
|
1784
1764
|
};
|
|
1785
1765
|
recompute(o, true);
|
|
1786
|
-
!i?.defer && (o.
|
|
1766
|
+
!i?.defer && (o.D === g ? o.M.enqueue(o.D, runEffect.bind(o)) : runEffect.call(o));
|
|
1787
1767
|
s = true;
|
|
1788
|
-
cleanup(() => o.
|
|
1768
|
+
cleanup(() => o.Ge?.());
|
|
1789
1769
|
}
|
|
1790
1770
|
function runEffect() {
|
|
1791
|
-
if (!this.
|
|
1792
|
-
this.
|
|
1793
|
-
this.
|
|
1771
|
+
if (!this.F || this.m & u) return;
|
|
1772
|
+
this.Ge?.();
|
|
1773
|
+
this.Ge = undefined;
|
|
1794
1774
|
try {
|
|
1795
|
-
const e = this.
|
|
1775
|
+
const e = this.Ve(this.$, this.Me);
|
|
1796
1776
|
if (false && e !== undefined && typeof e !== "function");
|
|
1797
|
-
this.
|
|
1777
|
+
this.Ge = e;
|
|
1798
1778
|
} catch (e) {
|
|
1799
|
-
this.
|
|
1800
|
-
this.
|
|
1801
|
-
if (!this.
|
|
1779
|
+
this.ae = new StatusError(this, e);
|
|
1780
|
+
this.ge |= d;
|
|
1781
|
+
if (!this.M.notify(this, d, d)) throw e;
|
|
1802
1782
|
} finally {
|
|
1803
|
-
this.Me = this
|
|
1804
|
-
this.
|
|
1783
|
+
this.Me = this.$;
|
|
1784
|
+
this.F = false;
|
|
1805
1785
|
}
|
|
1806
1786
|
}
|
|
1807
1787
|
function trackedEffect(e, t) {
|
|
1808
1788
|
const run = () => {
|
|
1809
|
-
if (!n.
|
|
1789
|
+
if (!n.F || n.m & u) return;
|
|
1810
1790
|
try {
|
|
1811
|
-
n.
|
|
1791
|
+
n.F = false;
|
|
1812
1792
|
recompute(n);
|
|
1813
1793
|
} finally {
|
|
1814
1794
|
}
|
|
1815
1795
|
};
|
|
1816
1796
|
const n = computed(
|
|
1817
1797
|
() => {
|
|
1818
|
-
n.
|
|
1819
|
-
n.
|
|
1798
|
+
n.Ge?.();
|
|
1799
|
+
n.Ge = undefined;
|
|
1820
1800
|
const t = staleValues(e);
|
|
1821
|
-
n.
|
|
1801
|
+
n.Ge = t;
|
|
1822
1802
|
},
|
|
1823
1803
|
undefined,
|
|
1824
1804
|
{ ...t, lazy: true }
|
|
1825
1805
|
);
|
|
1826
|
-
n.
|
|
1827
|
-
n.
|
|
1828
|
-
n.
|
|
1829
|
-
n.
|
|
1830
|
-
n.
|
|
1831
|
-
const r = e !== undefined ? e : n.
|
|
1806
|
+
n.Ge = undefined;
|
|
1807
|
+
n.Ke = true;
|
|
1808
|
+
n.F = true;
|
|
1809
|
+
n.D = y;
|
|
1810
|
+
n.Qe = (e, t) => {
|
|
1811
|
+
const r = e !== undefined ? e : n.ge;
|
|
1832
1812
|
if (r & d) {
|
|
1833
|
-
n.
|
|
1834
|
-
const e = t !== undefined ? t : n.
|
|
1835
|
-
if (!n.
|
|
1813
|
+
n.M.notify(n, a, 0);
|
|
1814
|
+
const e = t !== undefined ? t : n.ae;
|
|
1815
|
+
if (!n.M.notify(n, d, d)) throw e;
|
|
1836
1816
|
}
|
|
1837
1817
|
};
|
|
1838
|
-
n.
|
|
1839
|
-
n.
|
|
1840
|
-
cleanup(() => n.
|
|
1818
|
+
n.V = run;
|
|
1819
|
+
n.M.enqueue(g, run);
|
|
1820
|
+
cleanup(() => n.Ge?.());
|
|
1841
1821
|
}
|
|
1842
1822
|
function restoreTransition(e, t) {
|
|
1843
|
-
|
|
1823
|
+
j.initTransition(e);
|
|
1844
1824
|
const n = t();
|
|
1845
1825
|
flush();
|
|
1846
1826
|
return n;
|
|
@@ -1849,13 +1829,13 @@ function action(e) {
|
|
|
1849
1829
|
return (...t) =>
|
|
1850
1830
|
new Promise((n, r) => {
|
|
1851
1831
|
const i = e(...t);
|
|
1852
|
-
|
|
1853
|
-
let s =
|
|
1854
|
-
s.
|
|
1832
|
+
j.initTransition();
|
|
1833
|
+
let s = C;
|
|
1834
|
+
s.G.push(i);
|
|
1855
1835
|
const done = (e, t) => {
|
|
1856
1836
|
s = currentTransition(s);
|
|
1857
|
-
const o = s.
|
|
1858
|
-
if (o >= 0) s.
|
|
1837
|
+
const o = s.G.indexOf(i);
|
|
1838
|
+
if (o >= 0) s.G.splice(o, 1);
|
|
1859
1839
|
setActiveTransition(s);
|
|
1860
1840
|
schedule();
|
|
1861
1841
|
t ? r(t) : n(e);
|
|
@@ -1959,15 +1939,15 @@ function createOptimistic(e, t, n) {
|
|
|
1959
1939
|
}
|
|
1960
1940
|
function onSettled(e) {
|
|
1961
1941
|
const t = getOwner();
|
|
1962
|
-
t && !t.
|
|
1942
|
+
t && !t.Ke
|
|
1963
1943
|
? createTrackedEffect(() => untrack(e), undefined)
|
|
1964
|
-
:
|
|
1944
|
+
: j.enqueue(g, () => {
|
|
1965
1945
|
const t = e();
|
|
1966
1946
|
t?.();
|
|
1967
1947
|
});
|
|
1968
1948
|
}
|
|
1969
1949
|
function unwrap(e) {
|
|
1970
|
-
return e?.[
|
|
1950
|
+
return e?.[U]?.[ee] ?? e;
|
|
1971
1951
|
}
|
|
1972
1952
|
function getOverrideValue(e, t, n, r, i) {
|
|
1973
1953
|
if (i && r in i) return i[r];
|
|
@@ -1979,16 +1959,16 @@ function getAllKeys(e, t, n) {
|
|
|
1979
1959
|
return Array.from(new Set([...r, ...i]));
|
|
1980
1960
|
}
|
|
1981
1961
|
function applyState(e, t, n) {
|
|
1982
|
-
const r = t?.[
|
|
1962
|
+
const r = t?.[U];
|
|
1983
1963
|
if (!r) return;
|
|
1984
|
-
const i = r[
|
|
1985
|
-
const s = r[
|
|
1986
|
-
const o = r[
|
|
1987
|
-
let u = r[
|
|
1964
|
+
const i = r[Y];
|
|
1965
|
+
const s = r[Z];
|
|
1966
|
+
const o = r[$];
|
|
1967
|
+
let u = r[ee];
|
|
1988
1968
|
if (e === i && !s && !o) return;
|
|
1989
|
-
(r[
|
|
1990
|
-
r[
|
|
1991
|
-
r[
|
|
1969
|
+
(r[re] || oe).set(e, r[J]);
|
|
1970
|
+
r[Y] = e;
|
|
1971
|
+
r[Z] = undefined;
|
|
1992
1972
|
if (Array.isArray(i)) {
|
|
1993
1973
|
let t = false;
|
|
1994
1974
|
const f = getOverrideValue(i, s, u, "length", o);
|
|
@@ -2016,16 +1996,16 @@ function applyState(e, t, n) {
|
|
|
2016
1996
|
if (a > h || a > d) {
|
|
2017
1997
|
for (c = a; c <= h; c++) {
|
|
2018
1998
|
t = true;
|
|
2019
|
-
r[
|
|
1999
|
+
r[ee][c] && setSignal(r[ee][c], wrap(e[c], r));
|
|
2020
2000
|
}
|
|
2021
2001
|
for (; c < e.length; c++) {
|
|
2022
2002
|
t = true;
|
|
2023
2003
|
const i = wrap(S[c], r);
|
|
2024
|
-
r[
|
|
2004
|
+
r[ee][c] && setSignal(r[ee][c], i);
|
|
2025
2005
|
applyState(e[c], i, n);
|
|
2026
2006
|
}
|
|
2027
|
-
t && r[
|
|
2028
|
-
f !== e.length && r[
|
|
2007
|
+
t && r[ee][z] && setSignal(r[ee][z], void 0);
|
|
2008
|
+
f !== e.length && r[ee].length && setSignal(r[ee].length, e.length);
|
|
2029
2009
|
return;
|
|
2030
2010
|
}
|
|
2031
2011
|
g = new Array(h + 1);
|
|
@@ -2049,26 +2029,26 @@ function applyState(e, t, n) {
|
|
|
2049
2029
|
for (c = a; c < e.length; c++) {
|
|
2050
2030
|
if (c in S) {
|
|
2051
2031
|
const t = wrap(S[c], r);
|
|
2052
|
-
r[
|
|
2032
|
+
r[ee][c] && setSignal(r[ee][c], t);
|
|
2053
2033
|
applyState(e[c], t, n);
|
|
2054
|
-
} else r[
|
|
2034
|
+
} else r[ee][c] && setSignal(r[ee][c], wrap(e[c], r));
|
|
2055
2035
|
}
|
|
2056
2036
|
if (a < e.length) t = true;
|
|
2057
2037
|
} else if (e.length) {
|
|
2058
2038
|
for (let t = 0, f = e.length; t < f; t++) {
|
|
2059
2039
|
const f = getOverrideValue(i, s, u, t, o);
|
|
2060
|
-
isWrappable(f) ? applyState(e[t], wrap(f, r), n) : r[
|
|
2040
|
+
isWrappable(f) ? applyState(e[t], wrap(f, r), n) : r[ee][t] && setSignal(r[ee][t], e[t]);
|
|
2061
2041
|
}
|
|
2062
2042
|
}
|
|
2063
2043
|
if (f !== e.length) {
|
|
2064
2044
|
t = true;
|
|
2065
|
-
r[
|
|
2045
|
+
r[ee].length && setSignal(r[ee].length, e.length);
|
|
2066
2046
|
}
|
|
2067
|
-
t && r[
|
|
2047
|
+
t && r[ee][z] && setSignal(r[ee][z], void 0);
|
|
2068
2048
|
return;
|
|
2069
2049
|
}
|
|
2070
2050
|
if (u) {
|
|
2071
|
-
const t = u[
|
|
2051
|
+
const t = u[z];
|
|
2072
2052
|
const f = t ? getAllKeys(i, s, e) : Object.keys(u);
|
|
2073
2053
|
for (let l = 0, c = f.length; l < c; l++) {
|
|
2074
2054
|
const c = f[l];
|
|
@@ -2082,7 +2062,7 @@ function applyState(e, t, n) {
|
|
|
2082
2062
|
} else applyState(h, wrap(d, r), n);
|
|
2083
2063
|
}
|
|
2084
2064
|
}
|
|
2085
|
-
if ((u = r[
|
|
2065
|
+
if ((u = r[te])) {
|
|
2086
2066
|
const t = Object.keys(u);
|
|
2087
2067
|
for (let n = 0, r = t.length; n < r; n++) {
|
|
2088
2068
|
const r = t[n];
|
|
@@ -2104,9 +2084,9 @@ function createProjectionInternal(e, t = {}, n) {
|
|
|
2104
2084
|
let r;
|
|
2105
2085
|
const i = new WeakMap();
|
|
2106
2086
|
const wrapper = e => {
|
|
2107
|
-
e[
|
|
2108
|
-
e[
|
|
2109
|
-
Object.defineProperty(e,
|
|
2087
|
+
e[ne] = wrapProjection;
|
|
2088
|
+
e[re] = i;
|
|
2089
|
+
Object.defineProperty(e, ie, {
|
|
2110
2090
|
get() {
|
|
2111
2091
|
return r;
|
|
2112
2092
|
},
|
|
@@ -2115,8 +2095,8 @@ function createProjectionInternal(e, t = {}, n) {
|
|
|
2115
2095
|
};
|
|
2116
2096
|
const wrapProjection = e => {
|
|
2117
2097
|
if (i.has(e)) return i.get(e);
|
|
2118
|
-
if (e[
|
|
2119
|
-
const t = createStoreProxy(e,
|
|
2098
|
+
if (e[U]?.[ne] === wrapProjection) return e;
|
|
2099
|
+
const t = createStoreProxy(e, le, wrapper);
|
|
2120
2100
|
i.set(e, t);
|
|
2121
2101
|
return t;
|
|
2122
2102
|
};
|
|
@@ -2127,7 +2107,7 @@ function createProjectionInternal(e, t = {}, n) {
|
|
|
2127
2107
|
let i;
|
|
2128
2108
|
const o = new Proxy(
|
|
2129
2109
|
s,
|
|
2130
|
-
createWriteTraps(() => !r || t.
|
|
2110
|
+
createWriteTraps(() => !r || t.Ce === i)
|
|
2131
2111
|
);
|
|
2132
2112
|
storeSetter(o, o => {
|
|
2133
2113
|
i = e(o);
|
|
@@ -2138,7 +2118,7 @@ function createProjectionInternal(e, t = {}, n) {
|
|
|
2138
2118
|
u !== o && u !== undefined && reconcile(u, n?.key || "id")(s);
|
|
2139
2119
|
});
|
|
2140
2120
|
});
|
|
2141
|
-
r.
|
|
2121
|
+
r.ve = true;
|
|
2142
2122
|
return { store: s, node: r };
|
|
2143
2123
|
}
|
|
2144
2124
|
function createProjection(e, t = {}, n) {
|
|
@@ -2197,33 +2177,33 @@ function createWriteTraps(e) {
|
|
|
2197
2177
|
};
|
|
2198
2178
|
return t;
|
|
2199
2179
|
}
|
|
2200
|
-
const
|
|
2180
|
+
const z = Symbol(0),
|
|
2181
|
+
U = Symbol(0),
|
|
2201
2182
|
J = Symbol(0),
|
|
2202
|
-
X = Symbol(0)
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
$ = "
|
|
2206
|
-
ee = "
|
|
2207
|
-
te = "
|
|
2208
|
-
ne = "
|
|
2209
|
-
re = "
|
|
2210
|
-
ie = "
|
|
2211
|
-
se = "
|
|
2212
|
-
|
|
2213
|
-
function createStoreProxy(e, t = ce, n) {
|
|
2183
|
+
X = Symbol(0);
|
|
2184
|
+
const Y = "v",
|
|
2185
|
+
Z = "o",
|
|
2186
|
+
$ = "x",
|
|
2187
|
+
ee = "n",
|
|
2188
|
+
te = "h",
|
|
2189
|
+
ne = "w",
|
|
2190
|
+
re = "l",
|
|
2191
|
+
ie = "f",
|
|
2192
|
+
se = "p";
|
|
2193
|
+
function createStoreProxy(e, t = le, n) {
|
|
2214
2194
|
let r;
|
|
2215
2195
|
if (Array.isArray(e)) {
|
|
2216
2196
|
r = [];
|
|
2217
2197
|
r.v = e;
|
|
2218
2198
|
} else r = { v: e };
|
|
2219
2199
|
n && n(r);
|
|
2220
|
-
return (r[
|
|
2200
|
+
return (r[J] = new Proxy(r, t));
|
|
2221
2201
|
}
|
|
2222
|
-
const
|
|
2202
|
+
const oe = new WeakMap();
|
|
2223
2203
|
function wrap(e, t) {
|
|
2224
|
-
if (t?.[
|
|
2225
|
-
let n = e[
|
|
2226
|
-
if (!n)
|
|
2204
|
+
if (t?.[ne]) return t[ne](e, t);
|
|
2205
|
+
let n = e[J] || oe.get(e);
|
|
2206
|
+
if (!n) oe.set(e, (n = createStoreProxy(e)));
|
|
2227
2207
|
return n;
|
|
2228
2208
|
}
|
|
2229
2209
|
function isWrappable(e) {
|
|
@@ -2234,12 +2214,12 @@ function isWrappable(e) {
|
|
|
2234
2214
|
!(typeof Node !== "undefined" && e instanceof Node)
|
|
2235
2215
|
);
|
|
2236
2216
|
}
|
|
2237
|
-
let
|
|
2217
|
+
let ue = false;
|
|
2238
2218
|
function setWriteOverride(e) {
|
|
2239
|
-
|
|
2219
|
+
ue = e;
|
|
2240
2220
|
}
|
|
2241
2221
|
function writeOnly(e) {
|
|
2242
|
-
return
|
|
2222
|
+
return ue || !!fe?.has(e);
|
|
2243
2223
|
}
|
|
2244
2224
|
function getNodes(e, t) {
|
|
2245
2225
|
let n = e[t];
|
|
@@ -2259,17 +2239,17 @@ function getNode(e, t, n, r, i = isEqual, s, o) {
|
|
|
2259
2239
|
r
|
|
2260
2240
|
);
|
|
2261
2241
|
if (s) {
|
|
2262
|
-
u.
|
|
2242
|
+
u.ee = S;
|
|
2263
2243
|
}
|
|
2264
2244
|
if (o && t in o) {
|
|
2265
2245
|
const e = o[t];
|
|
2266
|
-
u.
|
|
2267
|
-
|
|
2246
|
+
u.he = e === undefined ? w : e;
|
|
2247
|
+
K?.add(u);
|
|
2268
2248
|
}
|
|
2269
2249
|
return (e[t] = u);
|
|
2270
2250
|
}
|
|
2271
|
-
function trackSelf(e, t =
|
|
2272
|
-
getObserver() && read(getNode(getNodes(e,
|
|
2251
|
+
function trackSelf(e, t = z) {
|
|
2252
|
+
getObserver() && read(getNode(getNodes(e, ee), t, undefined, e[ie], false, e[se]));
|
|
2273
2253
|
}
|
|
2274
2254
|
function getKeys(e, t, n = true) {
|
|
2275
2255
|
const r = untrack(() => (n ? Object.keys(e) : Reflect.ownKeys(e)));
|
|
@@ -2277,7 +2257,7 @@ function getKeys(e, t, n = true) {
|
|
|
2277
2257
|
const i = new Set(r);
|
|
2278
2258
|
const s = Reflect.ownKeys(t);
|
|
2279
2259
|
for (const e of s) {
|
|
2280
|
-
if (t[e] !==
|
|
2260
|
+
if (t[e] !== X) i.add(e);
|
|
2281
2261
|
else i.delete(e);
|
|
2282
2262
|
}
|
|
2283
2263
|
return Array.from(i);
|
|
@@ -2285,102 +2265,96 @@ function getKeys(e, t, n = true) {
|
|
|
2285
2265
|
function getPropertyDescriptor(e, t, n) {
|
|
2286
2266
|
let r = e;
|
|
2287
2267
|
if (t && n in t) {
|
|
2288
|
-
if (r[n] ===
|
|
2268
|
+
if (r[n] === X) return void 0;
|
|
2289
2269
|
if (!(n in r)) r = t;
|
|
2290
2270
|
}
|
|
2291
2271
|
return Reflect.getOwnPropertyDescriptor(r, n);
|
|
2292
2272
|
}
|
|
2293
|
-
let
|
|
2294
|
-
const
|
|
2273
|
+
let fe = null;
|
|
2274
|
+
const le = {
|
|
2295
2275
|
get(e, t, n) {
|
|
2296
|
-
if (t ===
|
|
2297
|
-
if (t ===
|
|
2298
|
-
if (t === O) return e[
|
|
2299
|
-
if (t ===
|
|
2276
|
+
if (t === U) return e;
|
|
2277
|
+
if (t === J) return n;
|
|
2278
|
+
if (t === O) return e[ie];
|
|
2279
|
+
if (t === z) {
|
|
2300
2280
|
trackSelf(e);
|
|
2301
2281
|
return n;
|
|
2302
2282
|
}
|
|
2303
|
-
const r = getNodes(e,
|
|
2283
|
+
const r = getNodes(e, ee);
|
|
2304
2284
|
const i = r[t];
|
|
2305
|
-
const s = e[
|
|
2306
|
-
const o = s || (e[
|
|
2307
|
-
const u = !!e[
|
|
2308
|
-
const f = s ? e[
|
|
2285
|
+
const s = e[$] && t in e[$];
|
|
2286
|
+
const o = s || (e[Z] && t in e[Z]);
|
|
2287
|
+
const u = !!e[Y][U];
|
|
2288
|
+
const f = s ? e[$] : e[Z] && t in e[Z] ? e[Z] : e[Y];
|
|
2309
2289
|
if (!i) {
|
|
2310
2290
|
const e = Object.getOwnPropertyDescriptor(f, t);
|
|
2311
2291
|
if (e && e.get) return e.get.call(n);
|
|
2312
2292
|
}
|
|
2313
2293
|
if (writeOnly(n)) {
|
|
2314
2294
|
let n =
|
|
2315
|
-
i && (o || !u)
|
|
2316
|
-
|
|
2317
|
-
? i.re
|
|
2318
|
-
: i.te !== S
|
|
2319
|
-
? i.te
|
|
2320
|
-
: i.ne
|
|
2321
|
-
: f[t];
|
|
2322
|
-
n === Y && (n = undefined);
|
|
2295
|
+
i && (o || !u) ? (i.ee !== undefined && i.ee !== S ? i.ee : i.Z !== S ? i.Z : i.$) : f[t];
|
|
2296
|
+
n === X && (n = undefined);
|
|
2323
2297
|
if (!isWrappable(n)) return n;
|
|
2324
2298
|
const r = wrap(n, e);
|
|
2325
|
-
|
|
2299
|
+
fe?.add(r);
|
|
2326
2300
|
return r;
|
|
2327
2301
|
}
|
|
2328
2302
|
let l = i ? (o || !u ? read(r[t]) : (read(r[t]), f[t])) : f[t];
|
|
2329
|
-
l ===
|
|
2303
|
+
l === X && (l = undefined);
|
|
2330
2304
|
if (!i) {
|
|
2331
2305
|
if (!o && typeof l === "function" && !f.hasOwnProperty(t)) {
|
|
2332
2306
|
let t;
|
|
2333
|
-
return !Array.isArray(e[
|
|
2307
|
+
return !Array.isArray(e[Y]) && (t = Object.getPrototypeOf(e[Y])) && t !== Object.prototype
|
|
2334
2308
|
? l.bind(f)
|
|
2335
2309
|
: l;
|
|
2336
2310
|
} else if (getObserver()) {
|
|
2337
|
-
return read(getNode(r, t, isWrappable(l) ? wrap(l, e) : l, e[
|
|
2311
|
+
return read(getNode(r, t, isWrappable(l) ? wrap(l, e) : l, e[ie], isEqual, e[se], e[m]));
|
|
2338
2312
|
}
|
|
2339
2313
|
}
|
|
2340
2314
|
return isWrappable(l) ? wrap(l, e) : l;
|
|
2341
2315
|
},
|
|
2342
2316
|
has(e, t) {
|
|
2343
|
-
if (t ===
|
|
2344
|
-
const n = e[
|
|
2345
|
-
if (!writeOnly(e[
|
|
2346
|
-
getObserver() && read(getNode(getNodes(e,
|
|
2317
|
+
if (t === J || t === z || t === "__proto__") return true;
|
|
2318
|
+
const n = e[$] && t in e[$] ? e[$][t] !== X : e[Z] && t in e[Z] ? e[Z][t] !== X : t in e[Y];
|
|
2319
|
+
if (!writeOnly(e[J])) {
|
|
2320
|
+
getObserver() && read(getNode(getNodes(e, te), t, n, e[ie], isEqual, e[se]));
|
|
2347
2321
|
}
|
|
2348
2322
|
return n;
|
|
2349
2323
|
},
|
|
2350
2324
|
set(e, t, n) {
|
|
2351
|
-
const r = e[
|
|
2325
|
+
const r = e[J];
|
|
2352
2326
|
if (writeOnly(r)) {
|
|
2353
|
-
if (e[
|
|
2354
|
-
const t = e[
|
|
2355
|
-
if (t?.
|
|
2356
|
-
|
|
2327
|
+
if (e[se]) {
|
|
2328
|
+
const t = e[ie];
|
|
2329
|
+
if (t?.K) {
|
|
2330
|
+
j.initTransition(t.K);
|
|
2357
2331
|
}
|
|
2358
2332
|
}
|
|
2359
2333
|
untrack(() => {
|
|
2360
|
-
const i = e[
|
|
2334
|
+
const i = e[Y];
|
|
2361
2335
|
const s = i[t];
|
|
2362
|
-
if (
|
|
2336
|
+
if (G && typeof t !== "symbol" && !((e[ie]?.ge ?? 0) & a)) {
|
|
2363
2337
|
if (!e[m]) {
|
|
2364
2338
|
e[m] = Object.create(null);
|
|
2365
|
-
|
|
2339
|
+
K?.add(e);
|
|
2366
2340
|
}
|
|
2367
2341
|
if (!(t in e[m])) {
|
|
2368
2342
|
e[m][t] = s;
|
|
2369
2343
|
}
|
|
2370
2344
|
}
|
|
2371
|
-
const o = e[
|
|
2372
|
-
const u = o ?
|
|
2345
|
+
const o = e[se] && !A;
|
|
2346
|
+
const u = o ? $ : Z;
|
|
2373
2347
|
if (o) trackOptimisticStore(r);
|
|
2374
|
-
const f = e[
|
|
2375
|
-
const l = n?.[
|
|
2348
|
+
const f = e[$] && t in e[$] ? e[$][t] : e[Z] && t in e[Z] ? e[Z][t] : s;
|
|
2349
|
+
const l = n?.[U]?.[Y] ?? n;
|
|
2376
2350
|
const c = Array.isArray(i) && t !== "length";
|
|
2377
2351
|
const d = c ? parseInt(t) + 1 : 0;
|
|
2378
2352
|
const h =
|
|
2379
2353
|
c &&
|
|
2380
|
-
(e[
|
|
2381
|
-
? e[
|
|
2382
|
-
: e[
|
|
2383
|
-
? e[
|
|
2354
|
+
(e[$] && "length" in e[$]
|
|
2355
|
+
? e[$].length
|
|
2356
|
+
: e[Z] && "length" in e[Z]
|
|
2357
|
+
? e[Z].length
|
|
2384
2358
|
: i.length);
|
|
2385
2359
|
const p = c && d > h ? d : undefined;
|
|
2386
2360
|
if (f === l && p === undefined) return true;
|
|
@@ -2391,48 +2365,48 @@ const ce = {
|
|
|
2391
2365
|
if (p !== undefined) n.length = p;
|
|
2392
2366
|
}
|
|
2393
2367
|
const g = isWrappable(l);
|
|
2394
|
-
e[
|
|
2395
|
-
const y = getNodes(e,
|
|
2368
|
+
e[te]?.[t] && setSignal(e[te][t], true);
|
|
2369
|
+
const y = getNodes(e, ee);
|
|
2396
2370
|
y[t] && setSignal(y[t], () => (g ? wrap(l, e) : l));
|
|
2397
2371
|
if (Array.isArray(i)) {
|
|
2398
2372
|
const e = t === "length" ? l : p;
|
|
2399
2373
|
e !== undefined && y.length && setSignal(y.length, e);
|
|
2400
2374
|
}
|
|
2401
|
-
y[
|
|
2375
|
+
y[z] && setSignal(y[z], undefined);
|
|
2402
2376
|
if (false);
|
|
2403
2377
|
});
|
|
2404
2378
|
}
|
|
2405
2379
|
return true;
|
|
2406
2380
|
},
|
|
2407
2381
|
deleteProperty(e, t) {
|
|
2408
|
-
const n = e[
|
|
2409
|
-
const r = e[
|
|
2410
|
-
if (writeOnly(e[
|
|
2382
|
+
const n = e[$]?.[t] === X;
|
|
2383
|
+
const r = e[Z]?.[t] === X;
|
|
2384
|
+
if (writeOnly(e[J]) && !n && !r) {
|
|
2411
2385
|
untrack(() => {
|
|
2412
|
-
const n = e[
|
|
2413
|
-
const r = n ?
|
|
2414
|
-
if (n) trackOptimisticStore(e[
|
|
2415
|
-
const i = e[
|
|
2416
|
-
if (t in e[
|
|
2417
|
-
(e[r] || (e[r] = Object.create(null)))[t] =
|
|
2386
|
+
const n = e[se] && !A;
|
|
2387
|
+
const r = n ? $ : Z;
|
|
2388
|
+
if (n) trackOptimisticStore(e[J]);
|
|
2389
|
+
const i = e[$] && t in e[$] ? e[$][t] : e[Z] && t in e[Z] ? e[Z][t] : e[Y][t];
|
|
2390
|
+
if (t in e[Y] || (e[Z] && t in e[Z])) {
|
|
2391
|
+
(e[r] || (e[r] = Object.create(null)))[t] = X;
|
|
2418
2392
|
} else if (e[r] && t in e[r]) {
|
|
2419
2393
|
delete e[r][t];
|
|
2420
2394
|
} else return true;
|
|
2421
|
-
if (e[
|
|
2422
|
-
const s = getNodes(e,
|
|
2395
|
+
if (e[te]?.[t]) setSignal(e[te][t], false);
|
|
2396
|
+
const s = getNodes(e, ee);
|
|
2423
2397
|
s[t] && setSignal(s[t], undefined);
|
|
2424
|
-
s[
|
|
2398
|
+
s[z] && setSignal(s[z], undefined);
|
|
2425
2399
|
});
|
|
2426
2400
|
}
|
|
2427
2401
|
return true;
|
|
2428
2402
|
},
|
|
2429
2403
|
ownKeys(e) {
|
|
2430
2404
|
trackSelf(e);
|
|
2431
|
-
let t = getKeys(e[
|
|
2432
|
-
if (e[
|
|
2405
|
+
let t = getKeys(e[Y], e[Z], false);
|
|
2406
|
+
if (e[$]) {
|
|
2433
2407
|
const n = new Set(t);
|
|
2434
|
-
for (const t of Reflect.ownKeys(e[
|
|
2435
|
-
if (e[
|
|
2408
|
+
for (const t of Reflect.ownKeys(e[$])) {
|
|
2409
|
+
if (e[$][t] !== X) n.add(t);
|
|
2436
2410
|
else n.delete(t);
|
|
2437
2411
|
}
|
|
2438
2412
|
t = Array.from(n);
|
|
@@ -2440,25 +2414,25 @@ const ce = {
|
|
|
2440
2414
|
return t;
|
|
2441
2415
|
},
|
|
2442
2416
|
getOwnPropertyDescriptor(e, t) {
|
|
2443
|
-
if (t ===
|
|
2444
|
-
if (e[
|
|
2445
|
-
if (e[
|
|
2446
|
-
const n = getPropertyDescriptor(e[
|
|
2417
|
+
if (t === J) return { value: e[J], writable: true, configurable: true };
|
|
2418
|
+
if (e[$] && t in e[$]) {
|
|
2419
|
+
if (e[$][t] === X) return undefined;
|
|
2420
|
+
const n = getPropertyDescriptor(e[Y], e[Z], t);
|
|
2447
2421
|
if (n) {
|
|
2448
|
-
return { ...n, value: e[
|
|
2422
|
+
return { ...n, value: e[$][t] };
|
|
2449
2423
|
}
|
|
2450
|
-
return { value: e[
|
|
2424
|
+
return { value: e[$][t], writable: true, enumerable: true, configurable: true };
|
|
2451
2425
|
}
|
|
2452
|
-
return getPropertyDescriptor(e[
|
|
2426
|
+
return getPropertyDescriptor(e[Y], e[Z], t);
|
|
2453
2427
|
},
|
|
2454
2428
|
getPrototypeOf(e) {
|
|
2455
|
-
return Object.getPrototypeOf(e[
|
|
2429
|
+
return Object.getPrototypeOf(e[Y]);
|
|
2456
2430
|
}
|
|
2457
2431
|
};
|
|
2458
2432
|
function storeSetter(e, t) {
|
|
2459
|
-
const n =
|
|
2460
|
-
|
|
2461
|
-
|
|
2433
|
+
const n = fe;
|
|
2434
|
+
fe = new Set();
|
|
2435
|
+
fe.add(e);
|
|
2462
2436
|
try {
|
|
2463
2437
|
const n = t(e);
|
|
2464
2438
|
if (n !== e && n !== undefined) {
|
|
@@ -2474,8 +2448,8 @@ function storeSetter(e, t) {
|
|
|
2474
2448
|
}
|
|
2475
2449
|
}
|
|
2476
2450
|
} finally {
|
|
2477
|
-
|
|
2478
|
-
|
|
2451
|
+
fe.clear();
|
|
2452
|
+
fe = n;
|
|
2479
2453
|
}
|
|
2480
2454
|
}
|
|
2481
2455
|
function createStore(e, t, n) {
|
|
@@ -2484,7 +2458,7 @@ function createStore(e, t, n) {
|
|
|
2484
2458
|
return [i, e => storeSetter(i, e)];
|
|
2485
2459
|
}
|
|
2486
2460
|
function createOptimisticStore(e, t, n) {
|
|
2487
|
-
GlobalQueue.
|
|
2461
|
+
GlobalQueue.fe ||= clearOptimisticStore;
|
|
2488
2462
|
const r = typeof e === "function";
|
|
2489
2463
|
const i = (r ? t : e) ?? {};
|
|
2490
2464
|
const s = r ? e : undefined;
|
|
@@ -2492,39 +2466,39 @@ function createOptimisticStore(e, t, n) {
|
|
|
2492
2466
|
return [o, e => storeSetter(o, e)];
|
|
2493
2467
|
}
|
|
2494
2468
|
function clearOptimisticStore(e) {
|
|
2495
|
-
const t = e[
|
|
2496
|
-
if (!t || !t[
|
|
2497
|
-
const n = t[
|
|
2498
|
-
const r = t[
|
|
2469
|
+
const t = e[U];
|
|
2470
|
+
if (!t || !t[$]) return;
|
|
2471
|
+
const n = t[$];
|
|
2472
|
+
const r = t[ee];
|
|
2499
2473
|
setProjectionWriteActive(true);
|
|
2500
2474
|
try {
|
|
2501
2475
|
if (r) {
|
|
2502
2476
|
for (const e of Reflect.ownKeys(n)) {
|
|
2503
2477
|
if (r[e]) {
|
|
2504
|
-
r[e].
|
|
2505
|
-
const n = t[
|
|
2506
|
-
const i = n ===
|
|
2478
|
+
r[e].Y = undefined;
|
|
2479
|
+
const n = t[Z] && e in t[Z] ? t[Z][e] : t[Y][e];
|
|
2480
|
+
const i = n === X ? undefined : n;
|
|
2507
2481
|
setSignal(r[e], isWrappable(i) ? wrap(i, t) : i);
|
|
2508
2482
|
}
|
|
2509
2483
|
}
|
|
2510
|
-
if (r[
|
|
2511
|
-
r[
|
|
2512
|
-
setSignal(r[
|
|
2484
|
+
if (r[z]) {
|
|
2485
|
+
r[z].Y = undefined;
|
|
2486
|
+
setSignal(r[z], undefined);
|
|
2513
2487
|
}
|
|
2514
2488
|
}
|
|
2515
2489
|
} finally {
|
|
2516
2490
|
setProjectionWriteActive(false);
|
|
2517
2491
|
}
|
|
2518
|
-
delete t[
|
|
2492
|
+
delete t[$];
|
|
2519
2493
|
}
|
|
2520
2494
|
function createOptimisticProjectionInternal(e, t = {}, n) {
|
|
2521
2495
|
let r;
|
|
2522
2496
|
const i = new WeakMap();
|
|
2523
2497
|
const wrapper = e => {
|
|
2524
|
-
e[
|
|
2525
|
-
e[
|
|
2526
|
-
e[
|
|
2527
|
-
Object.defineProperty(e,
|
|
2498
|
+
e[ne] = wrapProjection;
|
|
2499
|
+
e[re] = i;
|
|
2500
|
+
e[se] = true;
|
|
2501
|
+
Object.defineProperty(e, ie, {
|
|
2528
2502
|
get() {
|
|
2529
2503
|
return r;
|
|
2530
2504
|
},
|
|
@@ -2533,8 +2507,8 @@ function createOptimisticProjectionInternal(e, t = {}, n) {
|
|
|
2533
2507
|
};
|
|
2534
2508
|
const wrapProjection = e => {
|
|
2535
2509
|
if (i.has(e)) return i.get(e);
|
|
2536
|
-
if (e[
|
|
2537
|
-
const t = createStoreProxy(e,
|
|
2510
|
+
if (e[U]?.[ne] === wrapProjection) return e;
|
|
2511
|
+
const t = createStoreProxy(e, le, wrapper);
|
|
2538
2512
|
i.set(e, t);
|
|
2539
2513
|
return t;
|
|
2540
2514
|
};
|
|
@@ -2546,7 +2520,7 @@ function createOptimisticProjectionInternal(e, t = {}, n) {
|
|
|
2546
2520
|
let i;
|
|
2547
2521
|
const o = new Proxy(
|
|
2548
2522
|
s,
|
|
2549
|
-
createWriteTraps(() => !r || t.
|
|
2523
|
+
createWriteTraps(() => !r || t.Ce === i)
|
|
2550
2524
|
);
|
|
2551
2525
|
setProjectionWriteActive(true);
|
|
2552
2526
|
try {
|
|
@@ -2567,11 +2541,11 @@ function createOptimisticProjectionInternal(e, t = {}, n) {
|
|
|
2567
2541
|
setProjectionWriteActive(false);
|
|
2568
2542
|
}
|
|
2569
2543
|
});
|
|
2570
|
-
r.
|
|
2544
|
+
r.ve = true;
|
|
2571
2545
|
}
|
|
2572
2546
|
return { store: s, node: r };
|
|
2573
2547
|
}
|
|
2574
|
-
const
|
|
2548
|
+
const ce = Symbol(0);
|
|
2575
2549
|
function updatePath(e, t, n = 0) {
|
|
2576
2550
|
let r,
|
|
2577
2551
|
i = e;
|
|
@@ -2615,7 +2589,7 @@ function updatePath(e, t, n = 0) {
|
|
|
2615
2589
|
if (s === i) return;
|
|
2616
2590
|
}
|
|
2617
2591
|
if (r === undefined && s == undefined) return;
|
|
2618
|
-
if (s ===
|
|
2592
|
+
if (s === ce) {
|
|
2619
2593
|
delete e[r];
|
|
2620
2594
|
} else if (r === undefined || (isWrappable(i) && isWrappable(s) && !Array.isArray(s))) {
|
|
2621
2595
|
const t = r !== undefined ? e[r] : e;
|
|
@@ -2625,26 +2599,26 @@ function updatePath(e, t, n = 0) {
|
|
|
2625
2599
|
e[r] = s;
|
|
2626
2600
|
}
|
|
2627
2601
|
}
|
|
2628
|
-
const
|
|
2602
|
+
const ae = Object.assign(
|
|
2629
2603
|
function storePath(...e) {
|
|
2630
2604
|
return t => {
|
|
2631
2605
|
updatePath(t, e);
|
|
2632
2606
|
};
|
|
2633
2607
|
},
|
|
2634
|
-
{ DELETE:
|
|
2608
|
+
{ DELETE: ce }
|
|
2635
2609
|
);
|
|
2636
2610
|
function snapshotImpl(e, t, n, r) {
|
|
2637
2611
|
let i, s, o, u, f, l;
|
|
2638
2612
|
if (!isWrappable(e)) return e;
|
|
2639
2613
|
if (n && n.has(e)) return n.get(e);
|
|
2640
2614
|
if (!n) n = new Map();
|
|
2641
|
-
if ((i = e[
|
|
2642
|
-
if (t) trackSelf(i,
|
|
2643
|
-
o = i[
|
|
2644
|
-
s = Array.isArray(i[
|
|
2645
|
-
n.set(e, o ? (u = s ? [] : Object.create(Object.getPrototypeOf(i[
|
|
2646
|
-
e = i[
|
|
2647
|
-
r =
|
|
2615
|
+
if ((i = e[U] || r?.get(e)?.[U])) {
|
|
2616
|
+
if (t) trackSelf(i, z);
|
|
2617
|
+
o = i[Z];
|
|
2618
|
+
s = Array.isArray(i[Y]);
|
|
2619
|
+
n.set(e, o ? (u = s ? [] : Object.create(Object.getPrototypeOf(i[Y]))) : i[Y]);
|
|
2620
|
+
e = i[Y];
|
|
2621
|
+
r = oe;
|
|
2648
2622
|
} else {
|
|
2649
2623
|
s = Array.isArray(e);
|
|
2650
2624
|
n.set(e, e);
|
|
@@ -2653,7 +2627,7 @@ function snapshotImpl(e, t, n, r) {
|
|
|
2653
2627
|
const s = o?.length || e.length;
|
|
2654
2628
|
for (let c = 0; c < s; c++) {
|
|
2655
2629
|
l = o && c in o ? o[c] : e[c];
|
|
2656
|
-
if (l ===
|
|
2630
|
+
if (l === X) continue;
|
|
2657
2631
|
if (t && isWrappable(l)) wrap(l, i);
|
|
2658
2632
|
if ((f = snapshotImpl(l, t, n, r)) !== l || u) {
|
|
2659
2633
|
if (!u) n.set(e, (u = [...e]));
|
|
@@ -2688,13 +2662,13 @@ function deep(e) {
|
|
|
2688
2662
|
function trueFn() {
|
|
2689
2663
|
return true;
|
|
2690
2664
|
}
|
|
2691
|
-
const
|
|
2665
|
+
const de = {
|
|
2692
2666
|
get(e, t, n) {
|
|
2693
|
-
if (t ===
|
|
2667
|
+
if (t === J) return n;
|
|
2694
2668
|
return e.get(t);
|
|
2695
2669
|
},
|
|
2696
2670
|
has(e, t) {
|
|
2697
|
-
if (t ===
|
|
2671
|
+
if (t === J) return true;
|
|
2698
2672
|
return e.has(t);
|
|
2699
2673
|
},
|
|
2700
2674
|
set: trueFn,
|
|
@@ -2717,15 +2691,15 @@ const he = {
|
|
|
2717
2691
|
function resolveSource(e) {
|
|
2718
2692
|
return !(e = typeof e === "function" ? e() : e) ? {} : e;
|
|
2719
2693
|
}
|
|
2720
|
-
const
|
|
2694
|
+
const he = Symbol(0);
|
|
2721
2695
|
function merge(...e) {
|
|
2722
2696
|
if (e.length === 1 && typeof e[0] !== "function") return e[0];
|
|
2723
2697
|
let t = false;
|
|
2724
2698
|
const n = [];
|
|
2725
2699
|
for (let r = 0; r < e.length; r++) {
|
|
2726
2700
|
const i = e[r];
|
|
2727
|
-
t = t || (!!i &&
|
|
2728
|
-
const s = !!i && i[
|
|
2701
|
+
t = t || (!!i && J in i);
|
|
2702
|
+
const s = !!i && i[he];
|
|
2729
2703
|
if (s) n.push(...s);
|
|
2730
2704
|
else n.push(typeof i === "function" ? ((t = true), createMemo(i)) : i);
|
|
2731
2705
|
}
|
|
@@ -2733,7 +2707,7 @@ function merge(...e) {
|
|
|
2733
2707
|
return new Proxy(
|
|
2734
2708
|
{
|
|
2735
2709
|
get(e) {
|
|
2736
|
-
if (e ===
|
|
2710
|
+
if (e === he) return n;
|
|
2737
2711
|
for (let t = n.length - 1; t >= 0; t--) {
|
|
2738
2712
|
const r = resolveSource(n[t]);
|
|
2739
2713
|
if (e in r) return r[e];
|
|
@@ -2751,7 +2725,7 @@ function merge(...e) {
|
|
|
2751
2725
|
return [...new Set(e)];
|
|
2752
2726
|
}
|
|
2753
2727
|
},
|
|
2754
|
-
|
|
2728
|
+
de
|
|
2755
2729
|
);
|
|
2756
2730
|
}
|
|
2757
2731
|
const r = Object.create(null);
|
|
@@ -2783,12 +2757,12 @@ function merge(...e) {
|
|
|
2783
2757
|
if (n.get) Object.defineProperty(o, t, n);
|
|
2784
2758
|
else o[t] = n.value;
|
|
2785
2759
|
}
|
|
2786
|
-
o[
|
|
2760
|
+
o[he] = n;
|
|
2787
2761
|
return o;
|
|
2788
2762
|
}
|
|
2789
2763
|
function omit(e, ...t) {
|
|
2790
2764
|
const n = new Set(t);
|
|
2791
|
-
if (_ &&
|
|
2765
|
+
if (_ && J in e) {
|
|
2792
2766
|
return new Proxy(
|
|
2793
2767
|
{
|
|
2794
2768
|
get(t) {
|
|
@@ -2801,7 +2775,7 @@ function omit(e, ...t) {
|
|
|
2801
2775
|
return Object.keys(e).filter(e => !n.has(e));
|
|
2802
2776
|
}
|
|
2803
2777
|
},
|
|
2804
|
-
|
|
2778
|
+
de
|
|
2805
2779
|
);
|
|
2806
2780
|
}
|
|
2807
2781
|
const r = {};
|
|
@@ -2821,65 +2795,65 @@ function mapArray(e, t, n) {
|
|
|
2821
2795
|
const s = t;
|
|
2822
2796
|
return createMemo(
|
|
2823
2797
|
updateKeyedMap.bind({
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2798
|
+
ze: createOwner(),
|
|
2799
|
+
Ue: 0,
|
|
2800
|
+
Je: e,
|
|
2801
|
+
Xe: [],
|
|
2802
|
+
Ye: s,
|
|
2803
|
+
Ze: [],
|
|
2829
2804
|
$e: [],
|
|
2830
|
-
et:
|
|
2831
|
-
tt: r,
|
|
2832
|
-
nt:
|
|
2833
|
-
rt:
|
|
2834
|
-
it: n?.fallback
|
|
2805
|
+
et: r,
|
|
2806
|
+
tt: r || n?.keyed === false ? [] : undefined,
|
|
2807
|
+
nt: i ? [] : undefined,
|
|
2808
|
+
rt: n?.fallback
|
|
2835
2809
|
})
|
|
2836
2810
|
);
|
|
2837
2811
|
}
|
|
2838
|
-
const
|
|
2812
|
+
const pe = { pureWrite: true };
|
|
2839
2813
|
function updateKeyedMap() {
|
|
2840
|
-
const e = this.
|
|
2814
|
+
const e = this.Je() || [],
|
|
2841
2815
|
t = e.length;
|
|
2842
|
-
e[
|
|
2843
|
-
runWithOwner(this.
|
|
2816
|
+
e[z];
|
|
2817
|
+
runWithOwner(this.ze, () => {
|
|
2844
2818
|
let n,
|
|
2845
2819
|
r,
|
|
2846
|
-
i = this.
|
|
2820
|
+
i = this.tt
|
|
2847
2821
|
? () => {
|
|
2848
|
-
this.
|
|
2849
|
-
this.
|
|
2850
|
-
return this.
|
|
2822
|
+
this.tt[r] = signal(e[r], pe);
|
|
2823
|
+
this.nt && (this.nt[r] = signal(r, pe));
|
|
2824
|
+
return this.Ye(accessor(this.tt[r]), this.nt ? accessor(this.nt[r]) : undefined);
|
|
2851
2825
|
}
|
|
2852
|
-
: this.
|
|
2826
|
+
: this.nt
|
|
2853
2827
|
? () => {
|
|
2854
2828
|
const t = e[r];
|
|
2855
|
-
this.
|
|
2856
|
-
return this.
|
|
2829
|
+
this.nt[r] = signal(r, pe);
|
|
2830
|
+
return this.Ye(() => t, accessor(this.nt[r]));
|
|
2857
2831
|
}
|
|
2858
2832
|
: () => {
|
|
2859
2833
|
const t = e[r];
|
|
2860
|
-
return this.
|
|
2834
|
+
return this.Ye(() => t);
|
|
2861
2835
|
};
|
|
2862
2836
|
if (t === 0) {
|
|
2863
|
-
if (this.
|
|
2864
|
-
this.
|
|
2865
|
-
this.et = [];
|
|
2866
|
-
this.Ye = [];
|
|
2837
|
+
if (this.Ue !== 0) {
|
|
2838
|
+
this.ze.dispose(false);
|
|
2867
2839
|
this.$e = [];
|
|
2868
|
-
this.
|
|
2840
|
+
this.Xe = [];
|
|
2841
|
+
this.Ze = [];
|
|
2842
|
+
this.Ue = 0;
|
|
2843
|
+
this.tt && (this.tt = []);
|
|
2869
2844
|
this.nt && (this.nt = []);
|
|
2870
|
-
this.rt && (this.rt = []);
|
|
2871
2845
|
}
|
|
2872
|
-
if (this.
|
|
2873
|
-
this
|
|
2846
|
+
if (this.rt && !this.Ze[0]) {
|
|
2847
|
+
this.Ze[0] = runWithOwner((this.$e[0] = createOwner()), this.rt);
|
|
2874
2848
|
}
|
|
2875
|
-
} else if (this.
|
|
2876
|
-
if (this
|
|
2877
|
-
this
|
|
2849
|
+
} else if (this.Ue === 0) {
|
|
2850
|
+
if (this.$e[0]) this.$e[0].dispose();
|
|
2851
|
+
this.Ze = new Array(t);
|
|
2878
2852
|
for (r = 0; r < t; r++) {
|
|
2879
|
-
this.
|
|
2880
|
-
this
|
|
2853
|
+
this.Xe[r] = e[r];
|
|
2854
|
+
this.Ze[r] = runWithOwner((this.$e[r] = createOwner()), i);
|
|
2881
2855
|
}
|
|
2882
|
-
this.
|
|
2856
|
+
this.Ue = t;
|
|
2883
2857
|
} else {
|
|
2884
2858
|
let s,
|
|
2885
2859
|
o,
|
|
@@ -2890,227 +2864,227 @@ function updateKeyedMap() {
|
|
|
2890
2864
|
a,
|
|
2891
2865
|
d = new Array(t),
|
|
2892
2866
|
h = new Array(t),
|
|
2893
|
-
p = this.
|
|
2894
|
-
g = this.
|
|
2867
|
+
p = this.tt ? new Array(t) : undefined,
|
|
2868
|
+
g = this.nt ? new Array(t) : undefined;
|
|
2895
2869
|
for (
|
|
2896
|
-
s = 0, o = Math.min(this.
|
|
2897
|
-
s < o && (this.
|
|
2870
|
+
s = 0, o = Math.min(this.Ue, t);
|
|
2871
|
+
s < o && (this.Xe[s] === e[s] || (this.tt && compare(this.et, this.Xe[s], e[s])));
|
|
2898
2872
|
s++
|
|
2899
2873
|
) {
|
|
2900
|
-
if (this.
|
|
2874
|
+
if (this.tt) setSignal(this.tt[s], e[s]);
|
|
2901
2875
|
}
|
|
2902
2876
|
for (
|
|
2903
|
-
o = this.
|
|
2877
|
+
o = this.Ue - 1, u = t - 1;
|
|
2904
2878
|
o >= s &&
|
|
2905
2879
|
u >= s &&
|
|
2906
|
-
(this.
|
|
2880
|
+
(this.Xe[o] === e[u] || (this.tt && compare(this.et, this.Xe[o], e[u])));
|
|
2907
2881
|
o--, u--
|
|
2908
2882
|
) {
|
|
2909
|
-
d[u] = this
|
|
2910
|
-
h[u] = this
|
|
2911
|
-
p && (p[u] = this.
|
|
2912
|
-
g && (g[u] = this.
|
|
2883
|
+
d[u] = this.Ze[o];
|
|
2884
|
+
h[u] = this.$e[o];
|
|
2885
|
+
p && (p[u] = this.tt[o]);
|
|
2886
|
+
g && (g[u] = this.nt[o]);
|
|
2913
2887
|
}
|
|
2914
2888
|
c = new Map();
|
|
2915
2889
|
a = new Array(u + 1);
|
|
2916
2890
|
for (r = u; r >= s; r--) {
|
|
2917
2891
|
f = e[r];
|
|
2918
|
-
l = this.
|
|
2892
|
+
l = this.et ? this.et(f) : f;
|
|
2919
2893
|
n = c.get(l);
|
|
2920
2894
|
a[r] = n === undefined ? -1 : n;
|
|
2921
2895
|
c.set(l, r);
|
|
2922
2896
|
}
|
|
2923
2897
|
for (n = s; n <= o; n++) {
|
|
2924
|
-
f = this.
|
|
2925
|
-
l = this.
|
|
2898
|
+
f = this.Xe[n];
|
|
2899
|
+
l = this.et ? this.et(f) : f;
|
|
2926
2900
|
r = c.get(l);
|
|
2927
2901
|
if (r !== undefined && r !== -1) {
|
|
2928
|
-
d[r] = this
|
|
2929
|
-
h[r] = this
|
|
2930
|
-
p && (p[r] = this.
|
|
2931
|
-
g && (g[r] = this.
|
|
2902
|
+
d[r] = this.Ze[n];
|
|
2903
|
+
h[r] = this.$e[n];
|
|
2904
|
+
p && (p[r] = this.tt[n]);
|
|
2905
|
+
g && (g[r] = this.nt[n]);
|
|
2932
2906
|
r = a[r];
|
|
2933
2907
|
c.set(l, r);
|
|
2934
|
-
} else this
|
|
2908
|
+
} else this.$e[n].dispose();
|
|
2935
2909
|
}
|
|
2936
2910
|
for (r = s; r < t; r++) {
|
|
2937
2911
|
if (r in d) {
|
|
2938
|
-
this
|
|
2939
|
-
this
|
|
2912
|
+
this.Ze[r] = d[r];
|
|
2913
|
+
this.$e[r] = h[r];
|
|
2940
2914
|
if (p) {
|
|
2941
|
-
this.
|
|
2942
|
-
setSignal(this.
|
|
2915
|
+
this.tt[r] = p[r];
|
|
2916
|
+
setSignal(this.tt[r], e[r]);
|
|
2943
2917
|
}
|
|
2944
2918
|
if (g) {
|
|
2945
|
-
this.
|
|
2946
|
-
setSignal(this.
|
|
2919
|
+
this.nt[r] = g[r];
|
|
2920
|
+
setSignal(this.nt[r], r);
|
|
2947
2921
|
}
|
|
2948
2922
|
} else {
|
|
2949
|
-
this
|
|
2923
|
+
this.Ze[r] = runWithOwner((this.$e[r] = createOwner()), i);
|
|
2950
2924
|
}
|
|
2951
2925
|
}
|
|
2952
|
-
this
|
|
2953
|
-
this.
|
|
2926
|
+
this.Ze = this.Ze.slice(0, (this.Ue = t));
|
|
2927
|
+
this.Xe = e.slice(0);
|
|
2954
2928
|
}
|
|
2955
2929
|
});
|
|
2956
|
-
return this
|
|
2930
|
+
return this.Ze;
|
|
2957
2931
|
}
|
|
2958
2932
|
function repeat(e, t, n) {
|
|
2959
2933
|
const r = t;
|
|
2960
2934
|
return updateRepeat.bind({
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
et: [],
|
|
2935
|
+
ze: createOwner(),
|
|
2936
|
+
Ue: 0,
|
|
2937
|
+
it: 0,
|
|
2938
|
+
st: e,
|
|
2939
|
+
Ye: r,
|
|
2967
2940
|
$e: [],
|
|
2968
|
-
|
|
2969
|
-
|
|
2941
|
+
Ze: [],
|
|
2942
|
+
ot: n?.from,
|
|
2943
|
+
rt: n?.fallback
|
|
2970
2944
|
});
|
|
2971
2945
|
}
|
|
2972
2946
|
function updateRepeat() {
|
|
2973
|
-
const e = this.
|
|
2974
|
-
const t = this.
|
|
2975
|
-
runWithOwner(this.
|
|
2947
|
+
const e = this.st();
|
|
2948
|
+
const t = this.ot?.() || 0;
|
|
2949
|
+
runWithOwner(this.ze, () => {
|
|
2976
2950
|
if (e === 0) {
|
|
2977
|
-
if (this.
|
|
2978
|
-
this.
|
|
2979
|
-
this.et = [];
|
|
2951
|
+
if (this.Ue !== 0) {
|
|
2952
|
+
this.ze.dispose(false);
|
|
2980
2953
|
this.$e = [];
|
|
2981
|
-
this.
|
|
2954
|
+
this.Ze = [];
|
|
2955
|
+
this.Ue = 0;
|
|
2982
2956
|
}
|
|
2983
|
-
if (this.
|
|
2984
|
-
this
|
|
2957
|
+
if (this.rt && !this.Ze[0]) {
|
|
2958
|
+
this.Ze[0] = runWithOwner((this.$e[0] = createOwner()), this.rt);
|
|
2985
2959
|
}
|
|
2986
2960
|
return;
|
|
2987
2961
|
}
|
|
2988
2962
|
const n = t + e;
|
|
2989
|
-
const r = this.
|
|
2990
|
-
if (this.
|
|
2991
|
-
for (let e = n; e < r; e++) this
|
|
2992
|
-
if (this.
|
|
2993
|
-
let e = this.
|
|
2994
|
-
while (e < t && e < this.
|
|
2995
|
-
this.
|
|
2996
|
-
this
|
|
2997
|
-
} else if (this.
|
|
2998
|
-
let n = r - this.
|
|
2999
|
-
let i = this.
|
|
3000
|
-
this.
|
|
2963
|
+
const r = this.it + this.Ue;
|
|
2964
|
+
if (this.Ue === 0 && this.$e[0]) this.$e[0].dispose();
|
|
2965
|
+
for (let e = n; e < r; e++) this.$e[e - this.it].dispose();
|
|
2966
|
+
if (this.it < t) {
|
|
2967
|
+
let e = this.it;
|
|
2968
|
+
while (e < t && e < this.Ue) this.$e[e++].dispose();
|
|
2969
|
+
this.$e.splice(0, t - this.it);
|
|
2970
|
+
this.Ze.splice(0, t - this.it);
|
|
2971
|
+
} else if (this.it > t) {
|
|
2972
|
+
let n = r - this.it - 1;
|
|
2973
|
+
let i = this.it - t;
|
|
2974
|
+
this.$e.length = this.Ze.length = e;
|
|
3001
2975
|
while (n >= i) {
|
|
3002
|
-
this.et[n] = this.et[n - i];
|
|
3003
2976
|
this.$e[n] = this.$e[n - i];
|
|
2977
|
+
this.Ze[n] = this.Ze[n - i];
|
|
3004
2978
|
n--;
|
|
3005
2979
|
}
|
|
3006
2980
|
for (let e = 0; e < i; e++) {
|
|
3007
|
-
this
|
|
2981
|
+
this.Ze[e] = runWithOwner((this.$e[e] = createOwner()), () => this.Ye(e + t));
|
|
3008
2982
|
}
|
|
3009
2983
|
}
|
|
3010
2984
|
for (let e = r; e < n; e++) {
|
|
3011
|
-
this
|
|
2985
|
+
this.Ze[e - t] = runWithOwner((this.$e[e - t] = createOwner()), () => this.Ye(e));
|
|
3012
2986
|
}
|
|
3013
|
-
this
|
|
3014
|
-
this.
|
|
3015
|
-
this.
|
|
2987
|
+
this.Ze = this.Ze.slice(0, e);
|
|
2988
|
+
this.it = t;
|
|
2989
|
+
this.Ue = e;
|
|
3016
2990
|
});
|
|
3017
|
-
return this
|
|
2991
|
+
return this.Ze;
|
|
3018
2992
|
}
|
|
3019
2993
|
function compare(e, t, n) {
|
|
3020
2994
|
return e ? e(t) === e(n) : true;
|
|
3021
2995
|
}
|
|
3022
2996
|
function boundaryComputed(e, t) {
|
|
3023
2997
|
const n = computed(e, undefined, { lazy: true });
|
|
3024
|
-
n.
|
|
3025
|
-
const r = e !== undefined ? e : n.
|
|
3026
|
-
const i = t !== undefined ? t : n.
|
|
3027
|
-
n.
|
|
3028
|
-
n.
|
|
2998
|
+
n.Qe = (e, t) => {
|
|
2999
|
+
const r = e !== undefined ? e : n.ge;
|
|
3000
|
+
const i = t !== undefined ? t : n.ae;
|
|
3001
|
+
n.ge &= ~n.ut;
|
|
3002
|
+
n.M.notify(n, n.ut, r, i);
|
|
3029
3003
|
};
|
|
3030
|
-
n.
|
|
3031
|
-
n.
|
|
3004
|
+
n.ut = t;
|
|
3005
|
+
n.ve = true;
|
|
3032
3006
|
recompute(n, true);
|
|
3033
3007
|
return n;
|
|
3034
3008
|
}
|
|
3035
3009
|
function createBoundChildren(e, t, n, r) {
|
|
3036
|
-
const i = e.
|
|
3037
|
-
i.addChild((e.
|
|
3038
|
-
cleanup(() => i.removeChild(e.
|
|
3010
|
+
const i = e.M;
|
|
3011
|
+
i.addChild((e.M = n));
|
|
3012
|
+
cleanup(() => i.removeChild(e.M));
|
|
3039
3013
|
return runWithOwner(e, () => {
|
|
3040
3014
|
const e = computed(t);
|
|
3041
3015
|
return boundaryComputed(() => staleValues(() => flatten(read(e))), r);
|
|
3042
3016
|
});
|
|
3043
3017
|
}
|
|
3044
|
-
const
|
|
3045
|
-
const
|
|
3046
|
-
let
|
|
3018
|
+
const ge = Symbol();
|
|
3019
|
+
const ye = createContext(null);
|
|
3020
|
+
let Se = false;
|
|
3047
3021
|
const FALSE_ACCESSOR = () => false;
|
|
3048
3022
|
function isRevealController(e) {
|
|
3049
3023
|
return e instanceof RevealController;
|
|
3050
3024
|
}
|
|
3051
3025
|
function isSlotReady(e) {
|
|
3052
|
-
return isRevealController(e) ? e.isReady() : e.
|
|
3026
|
+
return isRevealController(e) ? e.isReady() : e.ft.size === 0 && !e.lt;
|
|
3053
3027
|
}
|
|
3054
3028
|
function setSlotState(e, t, n, r) {
|
|
3055
|
-
setSignal(e.
|
|
3056
|
-
setSignal(e.
|
|
3029
|
+
setSignal(e.ct, n);
|
|
3030
|
+
setSignal(e.dt, r);
|
|
3057
3031
|
if (isRevealController(e)) {
|
|
3058
|
-
if (!n && e.
|
|
3032
|
+
if (!n && e.ht === t) e.ht = undefined;
|
|
3059
3033
|
return e.evaluate(n, r);
|
|
3060
3034
|
}
|
|
3061
|
-
if (!n && e.
|
|
3035
|
+
if (!n && e.gt === t && e.yt) e.gt = undefined;
|
|
3062
3036
|
}
|
|
3063
3037
|
class RevealController {
|
|
3038
|
+
St;
|
|
3064
3039
|
wt;
|
|
3065
|
-
_t;
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
dt = signal(false, { pureWrite: true,
|
|
3069
|
-
|
|
3070
|
-
Ot =
|
|
3071
|
-
xt = false;
|
|
3040
|
+
_t = [];
|
|
3041
|
+
ht;
|
|
3042
|
+
ct = signal(false, { pureWrite: true, De: true });
|
|
3043
|
+
dt = signal(false, { pureWrite: true, De: true });
|
|
3044
|
+
bt = true;
|
|
3045
|
+
Ot = false;
|
|
3072
3046
|
constructor(e, t) {
|
|
3073
|
-
this.
|
|
3074
|
-
this.
|
|
3047
|
+
this.St = e;
|
|
3048
|
+
this.wt = t;
|
|
3075
3049
|
}
|
|
3076
|
-
|
|
3077
|
-
for (let t = 0; t < this.
|
|
3078
|
-
const n = this.
|
|
3079
|
-
if ((isRevealController(n) ? n.
|
|
3050
|
+
xt(e) {
|
|
3051
|
+
for (let t = 0; t < this._t.length; t++) {
|
|
3052
|
+
const n = this._t[t];
|
|
3053
|
+
if ((isRevealController(n) ? n.ht : n.gt) !== this) continue;
|
|
3080
3054
|
if (e(n) === false) return false;
|
|
3081
3055
|
}
|
|
3082
3056
|
return true;
|
|
3083
3057
|
}
|
|
3084
3058
|
isReady() {
|
|
3085
|
-
return this.
|
|
3059
|
+
return this.xt(isSlotReady);
|
|
3086
3060
|
}
|
|
3087
3061
|
register(e) {
|
|
3088
|
-
if (this.
|
|
3089
|
-
this.
|
|
3090
|
-
const t = !!untrack(this.
|
|
3091
|
-
setSignal(e.
|
|
3062
|
+
if (this._t.includes(e)) return;
|
|
3063
|
+
this._t.push(e);
|
|
3064
|
+
const t = !!untrack(this.St);
|
|
3065
|
+
setSignal(e.ct, true), setSignal(e.dt, t ? false : !!untrack(this.wt));
|
|
3092
3066
|
untrack(() => this.evaluate());
|
|
3093
3067
|
}
|
|
3094
3068
|
unregister(e) {
|
|
3095
|
-
const t = this.
|
|
3096
|
-
if (t >= 0) this.
|
|
3069
|
+
const t = this._t.indexOf(e);
|
|
3070
|
+
if (t >= 0) this._t.splice(t, 1);
|
|
3097
3071
|
untrack(() => this.evaluate());
|
|
3098
3072
|
}
|
|
3099
3073
|
evaluate(e, t) {
|
|
3100
|
-
if (this.
|
|
3101
|
-
this.
|
|
3102
|
-
const n = this.
|
|
3074
|
+
if (this.Ot) return;
|
|
3075
|
+
this.Ot = true;
|
|
3076
|
+
const n = this.bt;
|
|
3103
3077
|
try {
|
|
3104
|
-
const n = e ?? read(this.
|
|
3105
|
-
r = !!untrack(this.
|
|
3078
|
+
const n = e ?? read(this.ct),
|
|
3079
|
+
r = !!untrack(this.wt),
|
|
3106
3080
|
i = t ?? r;
|
|
3107
|
-
if (n && i) this.
|
|
3108
|
-
else if (!!untrack(this.
|
|
3081
|
+
if (n && i) this.xt(e => setSlotState(e, this, true, true));
|
|
3082
|
+
else if (!!untrack(this.St)) {
|
|
3109
3083
|
const e = this.isReady();
|
|
3110
|
-
this.
|
|
3084
|
+
this.xt(t => setSlotState(t, this, !e, false));
|
|
3111
3085
|
} else {
|
|
3112
3086
|
let e = false;
|
|
3113
|
-
this.
|
|
3087
|
+
this.xt(t => {
|
|
3114
3088
|
if (e) return setSlotState(t, this, true, r);
|
|
3115
3089
|
if (isSlotReady(t)) return setSlotState(t, this, false, false);
|
|
3116
3090
|
e = true;
|
|
@@ -3118,91 +3092,91 @@ class RevealController {
|
|
|
3118
3092
|
});
|
|
3119
3093
|
}
|
|
3120
3094
|
} finally {
|
|
3121
|
-
this.
|
|
3122
|
-
this.
|
|
3095
|
+
this.bt = this.isReady();
|
|
3096
|
+
this.Ot = false;
|
|
3123
3097
|
}
|
|
3124
|
-
if (this.
|
|
3098
|
+
if (this.ht && n !== this.bt) this.ht.evaluate();
|
|
3125
3099
|
}
|
|
3126
3100
|
}
|
|
3127
3101
|
class CollectionQueue extends Queue {
|
|
3102
|
+
vt;
|
|
3103
|
+
ft = new Set();
|
|
3128
3104
|
Pt;
|
|
3129
|
-
lt =
|
|
3105
|
+
lt = true;
|
|
3106
|
+
ct = signal(false, { pureWrite: true, De: true });
|
|
3107
|
+
dt = signal(false, { pureWrite: true, De: true });
|
|
3108
|
+
gt;
|
|
3109
|
+
yt = false;
|
|
3130
3110
|
kt;
|
|
3131
|
-
|
|
3132
|
-
dt = signal(false, { pureWrite: true, Fe: true });
|
|
3133
|
-
ht = signal(false, { pureWrite: true, Fe: true });
|
|
3134
|
-
yt;
|
|
3135
|
-
St = false;
|
|
3136
|
-
Et;
|
|
3137
|
-
Ct = ye;
|
|
3111
|
+
Et = ge;
|
|
3138
3112
|
constructor(e) {
|
|
3139
3113
|
super();
|
|
3140
|
-
this.
|
|
3114
|
+
this.vt = e;
|
|
3141
3115
|
}
|
|
3142
3116
|
run(e) {
|
|
3143
|
-
if (!e || (read(this.
|
|
3117
|
+
if (!e || (read(this.ct) && (!Se || read(this.dt)))) return;
|
|
3144
3118
|
return super.run(e);
|
|
3145
3119
|
}
|
|
3146
3120
|
notify(e, t, n, r) {
|
|
3147
|
-
if (!(t & this.
|
|
3148
|
-
if (this.
|
|
3121
|
+
if (!(t & this.vt)) return super.notify(e, t, n, r);
|
|
3122
|
+
if (this.yt && this.kt) {
|
|
3149
3123
|
const e = untrack(() => {
|
|
3150
3124
|
try {
|
|
3151
|
-
return this.
|
|
3125
|
+
return this.kt();
|
|
3152
3126
|
} catch {
|
|
3153
|
-
return
|
|
3127
|
+
return ge;
|
|
3154
3128
|
}
|
|
3155
3129
|
});
|
|
3156
|
-
if (e !== this.
|
|
3157
|
-
this.
|
|
3158
|
-
this.
|
|
3159
|
-
this.
|
|
3130
|
+
if (e !== this.Et) {
|
|
3131
|
+
this.Et = e;
|
|
3132
|
+
this.yt = false;
|
|
3133
|
+
this.ft.clear();
|
|
3160
3134
|
}
|
|
3161
3135
|
}
|
|
3162
|
-
if (this.
|
|
3163
|
-
if (this.
|
|
3136
|
+
if (this.vt & a && this.yt) return super.notify(e, t, n, r);
|
|
3137
|
+
if (this.vt & a && n & d) {
|
|
3164
3138
|
return super.notify(e, d, n, r);
|
|
3165
3139
|
}
|
|
3166
|
-
if (n & this.
|
|
3167
|
-
this.
|
|
3168
|
-
const t = r?.source || e.
|
|
3140
|
+
if (n & this.vt) {
|
|
3141
|
+
this.lt = true;
|
|
3142
|
+
const t = r?.source || e.ae?.source;
|
|
3169
3143
|
if (t) {
|
|
3170
|
-
const e = this.
|
|
3171
|
-
this.
|
|
3172
|
-
if (e) setSignal(this.
|
|
3144
|
+
const e = this.ft.size === 0;
|
|
3145
|
+
this.ft.add(t);
|
|
3146
|
+
if (e) setSignal(this.ct, true);
|
|
3173
3147
|
}
|
|
3174
3148
|
}
|
|
3175
|
-
t &= ~this.
|
|
3149
|
+
t &= ~this.vt;
|
|
3176
3150
|
return t ? super.notify(e, t, n, r) : true;
|
|
3177
3151
|
}
|
|
3178
3152
|
checkSources() {
|
|
3179
|
-
for (const e of this.
|
|
3180
|
-
if (e.m & u || (!(e.
|
|
3153
|
+
for (const e of this.ft) {
|
|
3154
|
+
if (e.m & u || (!(e.ge & this.vt) && !(this.vt & d && e.ge & a))) this.ft.delete(e);
|
|
3181
3155
|
}
|
|
3182
|
-
if (!this.
|
|
3183
|
-
if (this.
|
|
3184
|
-
this.
|
|
3156
|
+
if (!this.ft.size) {
|
|
3157
|
+
if (this.vt & a && this.lt && !this.yt && this.Pt) {
|
|
3158
|
+
this.lt = !!(this.Pt.ge & this.vt);
|
|
3185
3159
|
} else {
|
|
3186
|
-
this.
|
|
3160
|
+
this.lt = false;
|
|
3187
3161
|
}
|
|
3188
|
-
if (!this.
|
|
3189
|
-
setSignal(this.
|
|
3190
|
-
if (this.
|
|
3162
|
+
if (!this.lt) {
|
|
3163
|
+
setSignal(this.ct, false);
|
|
3164
|
+
if (this.kt) {
|
|
3191
3165
|
try {
|
|
3192
|
-
this.
|
|
3166
|
+
this.Et = untrack(() => this.kt());
|
|
3193
3167
|
} catch {}
|
|
3194
3168
|
}
|
|
3195
3169
|
}
|
|
3196
3170
|
}
|
|
3197
|
-
if (
|
|
3171
|
+
if (Se) this.gt?.evaluate();
|
|
3198
3172
|
}
|
|
3199
3173
|
}
|
|
3200
3174
|
function createCollectionBoundary(e, t, n, r) {
|
|
3201
3175
|
const i = createOwner();
|
|
3202
|
-
if (
|
|
3176
|
+
if (Se) setContext(ye, null, i);
|
|
3203
3177
|
const s = new CollectionQueue(e);
|
|
3204
|
-
if (r) s.
|
|
3205
|
-
const o = (s.
|
|
3178
|
+
if (r) s.kt = r;
|
|
3179
|
+
const o = (s.Pt = createBoundChildren(i, t, s, e));
|
|
3206
3180
|
untrack(() => {
|
|
3207
3181
|
let t = false;
|
|
3208
3182
|
try {
|
|
@@ -3211,20 +3185,20 @@ function createCollectionBoundary(e, t, n, r) {
|
|
|
3211
3185
|
if (e instanceof NotReadyError) t = true;
|
|
3212
3186
|
else throw e;
|
|
3213
3187
|
}
|
|
3214
|
-
s.
|
|
3188
|
+
s.lt = t || !!(o.ge & e) || o.ae instanceof NotReadyError;
|
|
3215
3189
|
});
|
|
3216
|
-
const u =
|
|
3190
|
+
const u = Se && e === a ? getContext(ye) : null;
|
|
3217
3191
|
if (u) {
|
|
3218
|
-
s.
|
|
3192
|
+
s.gt = u;
|
|
3219
3193
|
u.register(s);
|
|
3220
3194
|
cleanup(() => u.unregister(s));
|
|
3221
3195
|
}
|
|
3222
3196
|
const f = computed(() => {
|
|
3223
|
-
if (!read(s.
|
|
3197
|
+
if (!read(s.ct)) {
|
|
3224
3198
|
const e = read(o);
|
|
3225
|
-
if (!untrack(() => read(s.
|
|
3199
|
+
if (!untrack(() => read(s.ct))) return (s.yt = true), e;
|
|
3226
3200
|
}
|
|
3227
|
-
if (
|
|
3201
|
+
if (Se && read(s.dt)) return undefined;
|
|
3228
3202
|
return n(s);
|
|
3229
3203
|
});
|
|
3230
3204
|
return accessor(f);
|
|
@@ -3234,22 +3208,22 @@ function createLoadingBoundary(e, t, n) {
|
|
|
3234
3208
|
}
|
|
3235
3209
|
function createErrorBoundary(e, t) {
|
|
3236
3210
|
return createCollectionBoundary(d, e, e => {
|
|
3237
|
-
let n = e.
|
|
3238
|
-
const r = n.
|
|
3211
|
+
let n = e.ft.values().next().value;
|
|
3212
|
+
const r = n.ae?.cause ?? n.ae;
|
|
3239
3213
|
return t(r, () => {
|
|
3240
|
-
for (const t of e.
|
|
3214
|
+
for (const t of e.ft) recompute(t);
|
|
3241
3215
|
schedule();
|
|
3242
3216
|
});
|
|
3243
3217
|
});
|
|
3244
3218
|
}
|
|
3245
3219
|
function createRevealOrder(e, t) {
|
|
3246
|
-
|
|
3220
|
+
Se = true;
|
|
3247
3221
|
const n = createOwner();
|
|
3248
|
-
const r = getContext(
|
|
3222
|
+
const r = getContext(ye);
|
|
3249
3223
|
const i = t?.together || FALSE_ACCESSOR,
|
|
3250
3224
|
s = t?.collapsed || FALSE_ACCESSOR;
|
|
3251
3225
|
const o = new RevealController(i, s);
|
|
3252
|
-
setContext(
|
|
3226
|
+
setContext(ye, o, n);
|
|
3253
3227
|
return runWithOwner(n, () => {
|
|
3254
3228
|
const t = e();
|
|
3255
3229
|
computed(() => {
|
|
@@ -3258,7 +3232,7 @@ function createRevealOrder(e, t) {
|
|
|
3258
3232
|
o.evaluate();
|
|
3259
3233
|
});
|
|
3260
3234
|
if (r) {
|
|
3261
|
-
o.
|
|
3235
|
+
o.ht = r;
|
|
3262
3236
|
r.register(o);
|
|
3263
3237
|
cleanup(() => r.unregister(o));
|
|
3264
3238
|
}
|
|
@@ -3314,12 +3288,13 @@ function flattenArray(e, t = [], n) {
|
|
|
3314
3288
|
if (r) throw r;
|
|
3315
3289
|
return i;
|
|
3316
3290
|
}
|
|
3317
|
-
|
|
3291
|
+
const we = undefined;
|
|
3292
|
+
exports.$PROXY = J;
|
|
3318
3293
|
exports.$REFRESH = O;
|
|
3319
|
-
exports.$TARGET =
|
|
3320
|
-
exports.$TRACK =
|
|
3294
|
+
exports.$TARGET = U;
|
|
3295
|
+
exports.$TRACK = z;
|
|
3321
3296
|
exports.ContextNotFoundError = ContextNotFoundError;
|
|
3322
|
-
exports.DEV =
|
|
3297
|
+
exports.DEV = we;
|
|
3323
3298
|
exports.NoOwnerError = NoOwnerError;
|
|
3324
3299
|
exports.NotReadyError = NotReadyError;
|
|
3325
3300
|
exports.SUPPORTS_PROXY = _;
|
|
@@ -3372,5 +3347,5 @@ exports.runWithOwner = runWithOwner;
|
|
|
3372
3347
|
exports.setContext = setContext;
|
|
3373
3348
|
exports.setSnapshotCapture = setSnapshotCapture;
|
|
3374
3349
|
exports.snapshot = snapshot;
|
|
3375
|
-
exports.storePath =
|
|
3350
|
+
exports.storePath = ae;
|
|
3376
3351
|
exports.untrack = untrack;
|