@solidjs/signals 0.12.0 → 0.13.0

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/node.cjs CHANGED
@@ -32,8 +32,8 @@ const s = 1 << 4;
32
32
  const o = 1 << 5;
33
33
  const u = 1 << 6;
34
34
  const f = 1 << 7;
35
- const l = 1 << 8;
36
- const c = 1 << 9;
35
+ const c = 1 << 8;
36
+ const l = 1 << 9;
37
37
  const a = 1 << 0;
38
38
  const d = 1 << 1;
39
39
  const p = 1 << 2;
@@ -105,24 +105,24 @@ function markNode(e, r = n) {
105
105
  if ((i & (t | n)) >= r) return;
106
106
  e.m = (i & -4) | r;
107
107
  for (let n = e.O; n !== null; n = n.P) {
108
- markNode(n.A, t);
108
+ markNode(n.k, t);
109
109
  }
110
- if (e.k !== null) {
111
- for (let n = e.k; n !== null; n = n.C) {
110
+ if (e.C !== null) {
111
+ for (let n = e.C; n !== null; n = n.j) {
112
112
  for (let e = n.O; e !== null; e = e.P) {
113
- markNode(e.A, t);
113
+ markNode(e.k, t);
114
114
  }
115
115
  }
116
116
  }
117
117
  }
118
118
  function runHeap(e, t) {
119
119
  e._ = false;
120
- for (e.j = 0; e.j <= e.S; e.j++) {
121
- let n = e.l[e.j];
120
+ for (e.A = 0; e.A <= e.S; e.A++) {
121
+ let n = e.l[e.A];
122
122
  while (n !== undefined) {
123
123
  if (n.m & i) t(n);
124
124
  else adjustHeight(n, e);
125
- n = e.l[e.j];
125
+ n = e.l[e.A];
126
126
  }
127
127
  }
128
128
  e.S = 0;
@@ -138,41 +138,41 @@ function adjustHeight(e, t) {
138
138
  if (e.o !== n) {
139
139
  e.o = n;
140
140
  for (let n = e.O; n !== null; n = n.P) {
141
- insertIntoHeapHeight(n.A, t);
141
+ insertIntoHeapHeight(n.k, t);
142
142
  }
143
143
  }
144
144
  }
145
145
  const x = new Set();
146
- const v = { l: new Array(2e3).fill(undefined), _: false, j: 0, S: 0 };
147
- const P = { l: new Array(2e3).fill(undefined), _: false, j: 0, S: 0 };
148
- let A = 0;
149
- let k = null;
150
- let C = false;
146
+ const P = { l: new Array(2e3).fill(undefined), _: false, A: 0, S: 0 };
147
+ const v = { l: new Array(2e3).fill(undefined), _: false, A: 0, S: 0 };
148
+ let k = 0;
149
+ let C = null;
151
150
  let E = false;
152
- function setOnUnhandledAsync(e) {}
151
+ let j = false;
152
+ function enforceLoadingBoundary(e) {}
153
153
  function runLaneEffects(e) {
154
154
  for (const t of N) {
155
155
  if (t.R || t.T.size > 0) continue;
156
- const n = t.M[e - 1];
156
+ const n = t.q[e - 1];
157
157
  if (n.length) {
158
- t.M[e - 1] = [];
158
+ t.q[e - 1] = [];
159
159
  runQueue(n, e);
160
160
  }
161
161
  }
162
162
  }
163
163
  function setProjectionWriteActive(e) {
164
- E = e;
164
+ j = e;
165
165
  }
166
166
  function schedule() {
167
- if (C) return;
168
- C = true;
169
- if (!j.q && !E) queueMicrotask(flush);
167
+ if (E) return;
168
+ E = true;
169
+ if (!A.F && !j) queueMicrotask(flush);
170
170
  }
171
171
  class Queue {
172
172
  i = null;
173
- F = [[], []];
173
+ M = [[], []];
174
174
  V = [];
175
- created = A;
175
+ created = k;
176
176
  addChild(e) {
177
177
  this.V.push(e);
178
178
  e.i = this;
@@ -189,41 +189,41 @@ class Queue {
189
189
  return false;
190
190
  }
191
191
  run(e) {
192
- if (this.F[e - 1].length) {
193
- const t = this.F[e - 1];
194
- this.F[e - 1] = [];
192
+ if (this.M[e - 1].length) {
193
+ const t = this.M[e - 1];
194
+ this.M[e - 1] = [];
195
195
  runQueue(t, e);
196
196
  }
197
197
  for (let t = 0; t < this.V.length; t++) this.V[t].run?.(e);
198
198
  }
199
199
  enqueue(e, t) {
200
200
  if (e) {
201
- if (F) {
202
- const n = findLane(F);
203
- n.M[e - 1].push(t);
201
+ if (V) {
202
+ const n = findLane(V);
203
+ n.q[e - 1].push(t);
204
204
  } else {
205
- this.F[e - 1].push(t);
205
+ this.M[e - 1].push(t);
206
206
  }
207
207
  }
208
208
  schedule();
209
209
  }
210
210
  stashQueues(e) {
211
- e.F[0].push(...this.F[0]);
212
- e.F[1].push(...this.F[1]);
213
- this.F = [[], []];
211
+ e.M[0].push(...this.M[0]);
212
+ e.M[1].push(...this.M[1]);
213
+ this.M = [[], []];
214
214
  for (let t = 0; t < this.V.length; t++) {
215
215
  let n = this.V[t];
216
216
  let r = e.V[t];
217
217
  if (!r) {
218
- r = { F: [[], []], V: [] };
218
+ r = { M: [[], []], V: [] };
219
219
  e.V[t] = r;
220
220
  }
221
221
  n.stashQueues(r);
222
222
  }
223
223
  }
224
224
  restoreQueues(e) {
225
- this.F[0].push(...e.F[0]);
226
- this.F[1].push(...e.F[1]);
225
+ this.M[0].push(...e.M[0]);
226
+ this.M[1].push(...e.M[1]);
227
227
  for (let t = 0; t < e.V.length; t++) {
228
228
  const n = e.V[t];
229
229
  let r = this.V[t];
@@ -232,7 +232,7 @@ class Queue {
232
232
  }
233
233
  }
234
234
  class GlobalQueue extends Queue {
235
- q = false;
235
+ F = false;
236
236
  D = [];
237
237
  B = [];
238
238
  G = new Set();
@@ -240,55 +240,55 @@ class GlobalQueue extends Queue {
240
240
  static U;
241
241
  static J = null;
242
242
  flush() {
243
- if (this.q) return;
244
- this.q = true;
243
+ if (this.F) return;
244
+ this.F = true;
245
245
  try {
246
- runHeap(v, GlobalQueue.K);
247
- if (k) {
248
- const e = transitionComplete(k);
246
+ runHeap(P, GlobalQueue.K);
247
+ if (C) {
248
+ const e = transitionComplete(C);
249
249
  if (!e) {
250
- let e = k;
251
- runHeap(P, GlobalQueue.K);
250
+ let e = C;
251
+ runHeap(v, GlobalQueue.K);
252
252
  this.D = [];
253
253
  this.B = [];
254
254
  this.G = new Set();
255
255
  runLaneEffects(h);
256
256
  runLaneEffects(y);
257
- this.stashQueues(k.X);
258
- A++;
259
- C = v.S >= v.j;
260
- reassignPendingTransition(k.D);
261
- k = null;
257
+ this.stashQueues(C.X);
258
+ k++;
259
+ E = P.S >= P.A;
260
+ reassignPendingTransition(C.D);
261
+ C = null;
262
262
  finalizePureQueue(null, true);
263
263
  return;
264
264
  }
265
- this.D !== k.D && this.D.push(...k.D);
266
- this.restoreQueues(k.X);
267
- x.delete(k);
268
- const t = k;
269
- k = null;
265
+ this.D !== C.D && this.D.push(...C.D);
266
+ this.restoreQueues(C.X);
267
+ x.delete(C);
268
+ const t = C;
269
+ C = null;
270
270
  reassignPendingTransition(this.D);
271
271
  finalizePureQueue(t);
272
272
  } else {
273
- if (x.size) runHeap(P, GlobalQueue.K);
273
+ if (x.size) runHeap(v, GlobalQueue.K);
274
274
  finalizePureQueue();
275
275
  }
276
- A++;
277
- C = v.S >= v.j;
276
+ k++;
277
+ E = P.S >= P.A;
278
278
  runLaneEffects(h);
279
279
  this.run(h);
280
280
  runLaneEffects(y);
281
281
  this.run(y);
282
282
  } finally {
283
- this.q = false;
283
+ this.F = false;
284
284
  }
285
285
  }
286
286
  notify(e, t, n, r) {
287
287
  if (t & a) {
288
288
  if (n & a) {
289
289
  const t = r !== undefined ? r : e.Y;
290
- if (k && t && !k.Z.includes(t.source)) {
291
- k.Z.push(t.source);
290
+ if (C && t && !C.Z.includes(t.source)) {
291
+ C.Z.push(t.source);
292
292
  schedule();
293
293
  }
294
294
  }
@@ -298,21 +298,21 @@ class GlobalQueue extends Queue {
298
298
  }
299
299
  initTransition(e) {
300
300
  if (e) e = currentTransition(e);
301
- if (e && e === k) return;
302
- if (!e && k && k.$ === A) return;
303
- if (!k) {
304
- k = e ?? {
305
- $: A,
301
+ if (e && e === C) return;
302
+ if (!e && C && C.$ === k) return;
303
+ if (!C) {
304
+ C = e ?? {
305
+ $: k,
306
306
  D: [],
307
307
  Z: [],
308
308
  B: [],
309
309
  G: new Set(),
310
310
  ee: [],
311
- X: { F: [[], []], V: [] },
311
+ X: { M: [[], []], V: [] },
312
312
  te: false
313
313
  };
314
314
  } else if (e) {
315
- const t = k;
315
+ const t = C;
316
316
  t.te = e;
317
317
  e.ee.push(...t.ee);
318
318
  for (const n of N) {
@@ -323,108 +323,113 @@ class GlobalQueue extends Queue {
323
323
  e.G.add(n);
324
324
  }
325
325
  x.delete(t);
326
- k = e;
326
+ C = e;
327
327
  }
328
- x.add(k);
329
- k.$ = A;
328
+ x.add(C);
329
+ C.$ = k;
330
330
  for (let e = 0; e < this.D.length; e++) {
331
331
  const t = this.D[e];
332
- t.ne = k;
333
- k.D.push(t);
332
+ t.ne = C;
333
+ C.D.push(t);
334
334
  }
335
- this.D = k.D;
335
+ this.D = C.D;
336
336
  for (let e = 0; e < this.B.length; e++) {
337
337
  const t = this.B[e];
338
- t.ne = k;
339
- k.B.push(t);
338
+ t.ne = C;
339
+ C.B.push(t);
340
340
  }
341
- this.B = k.B;
341
+ this.B = C.B;
342
342
  for (const e of N) {
343
- if (!e.ne) e.ne = k;
343
+ if (!e.ne) e.ne = C;
344
344
  }
345
- for (const e of this.G) k.G.add(e);
346
- this.G = k.G;
345
+ for (const e of this.G) C.G.add(e);
346
+ this.G = C.G;
347
347
  }
348
348
  }
349
349
  function insertSubs(e, t = false) {
350
- const n = e.re || F;
350
+ const n = e.re || V;
351
351
  const r = e.ie !== undefined;
352
352
  for (let i = e.O; i !== null; i = i.P) {
353
- if (r && i.A.se) {
354
- i.A.m |= l;
353
+ if (r && i.k.se) {
354
+ i.k.m |= c;
355
355
  continue;
356
356
  }
357
357
  if (t && n) {
358
- i.A.m |= f;
359
- assignOrMergeLane(i.A, n);
358
+ i.k.m |= f;
359
+ assignOrMergeLane(i.k, n);
360
360
  } else if (t) {
361
- i.A.m |= f;
362
- i.A.re = undefined;
361
+ i.k.m |= f;
362
+ i.k.re = undefined;
363
363
  }
364
- const e = i.A;
364
+ const e = i.k;
365
365
  if (e.oe === g) {
366
366
  if (!e.ue) {
367
367
  e.ue = true;
368
- e.fe.enqueue(y, e.le);
368
+ e.fe.enqueue(y, e.ce);
369
369
  }
370
370
  continue;
371
371
  }
372
- const s = i.A.m & o ? P : v;
373
- if (s.j > i.A.o) s.j = i.A.o;
374
- insertIntoHeap(i.A, s);
372
+ const s = i.k.m & o ? v : P;
373
+ if (s.A > i.k.o) s.A = i.k.o;
374
+ insertIntoHeap(i.k, s);
375
+ }
376
+ }
377
+ function commitPendingNodes() {
378
+ const e = A.D;
379
+ for (let t = 0; t < e.length; t++) {
380
+ const n = e[t];
381
+ if (n.le !== S) {
382
+ n.ae = n.le;
383
+ n.le = S;
384
+ if (n.oe && n.oe !== g) n.ue = true;
385
+ }
386
+ if (!(n.de & a)) n.de &= ~p;
387
+ if (n.H) GlobalQueue.U(n, false, true);
375
388
  }
389
+ e.length = 0;
376
390
  }
377
391
  function finalizePureQueue(e = null, t = false) {
378
392
  let n = !t;
379
- if (!t) checkBoundaryChildren(j);
380
- if (v.S >= v.j) runHeap(v, GlobalQueue.K);
393
+ if (n) commitPendingNodes();
394
+ if (!t) checkBoundaryChildren(A);
395
+ if (P.S >= P.A) runHeap(P, GlobalQueue.K);
381
396
  if (n) {
382
- const t = j.D;
397
+ commitPendingNodes();
398
+ const t = e ? e.B : A.B;
383
399
  for (let e = 0; e < t.length; e++) {
384
400
  const n = t[e];
385
- if (n.ce !== S) {
386
- n.ae = n.ce;
387
- n.ce = S;
388
- if (n.oe && n.oe !== g) n.ue = true;
401
+ n.re = undefined;
402
+ if (n.le !== S) {
403
+ n.ae = n.le;
404
+ n.le = S;
389
405
  }
390
- if (!(n.de & a)) n.de &= ~p;
391
- if (n.H) GlobalQueue.U(n, false, true);
406
+ const r = n.pe;
407
+ n.pe = S;
408
+ if (r !== S && n.ae !== r) insertSubs(n, true);
409
+ n.ne = null;
392
410
  }
393
411
  t.length = 0;
394
- const n = e ? e.B : j.B;
395
- for (let e = 0; e < n.length; e++) {
396
- const t = n[e];
397
- const r = t.ce;
398
- t.re = undefined;
399
- if (r !== S && t.ae !== r) {
400
- t.ae = r;
401
- insertSubs(t, true);
402
- }
403
- t.ce = S;
404
- t.ne = null;
405
- }
406
- n.length = 0;
407
- const r = e ? e.G : j.G;
408
- if (GlobalQueue.J && r.size) {
409
- for (const e of r) {
412
+ const n = e ? e.G : A.G;
413
+ if (GlobalQueue.J && n.size) {
414
+ for (const e of n) {
410
415
  GlobalQueue.J(e);
411
416
  }
412
- r.clear();
417
+ n.clear();
413
418
  schedule();
414
419
  }
415
420
  for (const t of N) {
416
421
  const n = e ? t.ne === e : !t.ne;
417
422
  if (!n) continue;
418
423
  if (!t.R) {
419
- if (t.M[0].length) runQueue(t.M[0], h);
420
- if (t.M[1].length) runQueue(t.M[1], y);
424
+ if (t.q[0].length) runQueue(t.q[0], h);
425
+ if (t.q[1].length) runQueue(t.q[1], y);
421
426
  }
422
- if (t.pe.re === t) t.pe.re = undefined;
427
+ if (t.he.re === t) t.he.re = undefined;
423
428
  t.T.clear();
424
- t.M[0].length = 0;
425
- t.M[1].length = 0;
429
+ t.q[0].length = 0;
430
+ t.q[1].length = 0;
426
431
  N.delete(t);
427
- W.delete(t.pe);
432
+ W.delete(t.he);
428
433
  }
429
434
  }
430
435
  }
@@ -435,18 +440,18 @@ function checkBoundaryChildren(e) {
435
440
  }
436
441
  }
437
442
  function trackOptimisticStore(e) {
438
- j.G.add(e);
443
+ A.G.add(e);
439
444
  schedule();
440
445
  }
441
446
  function reassignPendingTransition(e) {
442
447
  for (let t = 0; t < e.length; t++) {
443
- e[t].ne = k;
448
+ e[t].ne = C;
444
449
  }
445
450
  }
446
- const j = new GlobalQueue();
451
+ const A = new GlobalQueue();
447
452
  function flush() {
448
- while (C) {
449
- j.flush();
453
+ while (E) {
454
+ A.flush();
450
455
  }
451
456
  }
452
457
  function runQueue(e, t) {
@@ -471,15 +476,15 @@ function currentTransition(e) {
471
476
  return e;
472
477
  }
473
478
  function setActiveTransition(e) {
474
- k = e;
479
+ C = e;
475
480
  }
476
481
  function runInTransition(e, t) {
477
- const n = k;
482
+ const n = C;
478
483
  try {
479
- k = currentTransition(e);
484
+ C = currentTransition(e);
480
485
  return t();
481
486
  } finally {
482
- k = n;
487
+ C = n;
483
488
  }
484
489
  }
485
490
  const W = new WeakMap();
@@ -489,12 +494,12 @@ function getOrCreateLane(e) {
489
494
  if (t) {
490
495
  return findLane(t);
491
496
  }
492
- const n = e.he;
497
+ const n = e.ye;
493
498
  const r = n?.re ? findLane(n.re) : null;
494
- t = { pe: e, T: new Set(), M: [[], []], R: null, ne: k, ye: r };
499
+ t = { he: e, T: new Set(), q: [[], []], R: null, ne: C, ge: r };
495
500
  W.set(e, t);
496
501
  N.add(t);
497
- e.ge = e.Se || 0;
502
+ e.Se = false;
498
503
  return t;
499
504
  }
500
505
  function findLane(e) {
@@ -507,8 +512,8 @@ function mergeLanes(e, t) {
507
512
  if (e === t) return e;
508
513
  t.R = e;
509
514
  for (const n of t.T) e.T.add(n);
510
- e.M[0].push(...t.M[0]);
511
- e.M[1].push(...t.M[1]);
515
+ e.q[0].push(...t.q[0]);
516
+ e.q[1].push(...t.q[1]);
512
517
  return e;
513
518
  }
514
519
  function resolveLane(e) {
@@ -520,7 +525,7 @@ function resolveLane(e) {
520
525
  return undefined;
521
526
  }
522
527
  function hasActiveOverride(e) {
523
- return !!(e.we && e.ce !== S);
528
+ return !!(e.pe !== undefined && e.pe !== S);
524
529
  }
525
530
  function assignOrMergeLane(e, t) {
526
531
  const n = findLane(t);
@@ -533,9 +538,9 @@ function assignOrMergeLane(e, t) {
533
538
  const i = findLane(r);
534
539
  if (N.has(i)) {
535
540
  if (i !== n && !hasActiveOverride(e)) {
536
- if (n.ye && findLane(n.ye) === i) {
541
+ if (n.ge && findLane(n.ge) === i) {
537
542
  e.re = t;
538
- } else if (i.ye && findLane(i.ye) === n);
543
+ } else if (i.ge && findLane(i.ge) === n);
539
544
  else mergeLanes(n, i);
540
545
  }
541
546
  return;
@@ -548,41 +553,40 @@ function handleAsync(e, t, r) {
548
553
  const s = i && untrack(() => t[Symbol.asyncIterator]);
549
554
  const o = !s && i && untrack(() => typeof t.then === "function");
550
555
  if (!o && !s) {
551
- e.me = null;
556
+ e.we = null;
552
557
  return t;
553
558
  }
554
- e.me = t;
559
+ e.we = t;
555
560
  let u;
556
561
  const handleError = n => {
557
- if (e.me !== t) return;
558
- j.initTransition(e.ne);
562
+ if (e.we !== t) return;
563
+ A.initTransition(e.ne);
559
564
  notifyStatus(e, n instanceof NotReadyError ? a : d, n);
560
- e.$ = A;
565
+ e.$ = k;
561
566
  };
562
567
  const asyncWrite = (i, s) => {
563
- if (e.me !== t) return;
568
+ if (e.we !== t) return;
564
569
  if (e.m & (n | f)) return;
565
- j.initTransition(e.ne);
570
+ A.initTransition(e.ne);
566
571
  clearStatus(e);
567
572
  const o = resolveLane(e);
568
573
  if (o) o.T.delete(e);
569
574
  if (r) r(i);
570
- else if (e.we) {
571
- const t = e.ce !== S;
572
- if (e.H) e.ce = i;
573
- if (!t) {
575
+ else if (e.pe !== undefined) {
576
+ if (e.pe !== undefined && e.pe !== S) e.le = i;
577
+ else {
574
578
  e.ae = i;
575
579
  insertSubs(e);
576
580
  }
577
- e.$ = A;
581
+ e.$ = k;
578
582
  } else if (o) {
579
583
  const t = e.ae;
580
- const n = e.be;
584
+ const n = e.me;
581
585
  if (!n || !n(i, t)) {
582
586
  e.ae = i;
583
- e.$ = A;
584
- if (e._e) {
585
- setSignal(e._e, i);
587
+ e.$ = k;
588
+ if (e.be) {
589
+ setSignal(e.be, i);
586
590
  }
587
591
  insertSubs(e, true);
588
592
  }
@@ -609,8 +613,8 @@ function handleAsync(e, t, r) {
609
613
  );
610
614
  r = false;
611
615
  if (!n) {
612
- j.initTransition(e.ne);
613
- throw new NotReadyError(q);
616
+ A.initTransition(e.ne);
617
+ throw new NotReadyError(M);
614
618
  }
615
619
  }
616
620
  if (s) {
@@ -645,8 +649,8 @@ function handleAsync(e, t, r) {
645
649
  };
646
650
  const i = iterate();
647
651
  if (!r && !i) {
648
- j.initTransition(e.ne);
649
- throw new NotReadyError(q);
652
+ A.initTransition(e.ne);
653
+ throw new NotReadyError(M);
650
654
  }
651
655
  }
652
656
  return u;
@@ -655,13 +659,13 @@ function clearStatus(e) {
655
659
  e.de = e.de & p;
656
660
  e.Y = null;
657
661
  updatePendingSignal(e);
658
- e.Oe?.();
662
+ e._e?.();
659
663
  }
660
664
  function notifyStatus(e, t, n, r, i) {
661
665
  if (t === d && !(n instanceof StatusError) && !(n instanceof NotReadyError))
662
666
  n = new StatusError(e, n);
663
667
  const s = n instanceof NotReadyError && n.source === e;
664
- const o = t === a && e.we && !s;
668
+ const o = t === a && e.pe !== undefined && !s;
665
669
  const u = o && hasActiveOverride(e);
666
670
  if (!r) {
667
671
  e.de = t | (t !== d ? e.de & p : 0);
@@ -671,35 +675,35 @@ function notifyStatus(e, t, n, r, i) {
671
675
  if (i && !r) {
672
676
  assignOrMergeLane(e, i);
673
677
  }
674
- if (u && k && n instanceof NotReadyError) {
678
+ if (u && C && n instanceof NotReadyError) {
675
679
  const e = n.source;
676
- if (!k.Z.includes(e)) {
677
- k.Z.push(e);
680
+ if (!C.Z.includes(e)) {
681
+ C.Z.push(e);
678
682
  }
679
683
  }
680
684
  const f = r || u;
681
- const l = r || o ? undefined : i;
682
- if (e.Oe) {
685
+ const c = r || o ? undefined : i;
686
+ if (e._e) {
683
687
  if (f) {
684
- e.Oe(t, n);
688
+ e._e(t, n);
685
689
  } else {
686
- e.Oe();
690
+ e._e();
687
691
  }
688
692
  return;
689
693
  }
690
694
  for (let r = e.O; r !== null; r = r.P) {
691
- r.A.$ = A;
692
- if (r.A.Y !== n) {
693
- !r.A.ne && j.D.push(r.A);
694
- notifyStatus(r.A, t, n, f, l);
695
+ r.k.$ = k;
696
+ if (r.k.Y !== n) {
697
+ !r.k.ne && A.D.push(r.k);
698
+ notifyStatus(r.k, t, n, f, c);
695
699
  }
696
700
  }
697
- for (let r = e.k; r !== null; r = r.C) {
701
+ for (let r = e.C; r !== null; r = r.j) {
698
702
  for (let e = r.O; e !== null; e = e.P) {
699
- e.A.$ = A;
700
- if (e.A.Y !== n) {
701
- !e.A.ne && j.D.push(e.A);
702
- notifyStatus(e.A, t, n, f, l);
703
+ e.k.$ = k;
704
+ if (e.k.Y !== n) {
705
+ !e.k.ne && A.D.push(e.k);
706
+ notifyStatus(e.k, t, n, f, c);
703
707
  }
704
708
  }
705
709
  }
@@ -708,21 +712,21 @@ function unlinkSubs(e) {
708
712
  const t = e.L;
709
713
  const n = e.N;
710
714
  const r = e.P;
711
- const i = e.xe;
712
- if (r !== null) r.xe = i;
713
- else t.ve = i;
715
+ const i = e.Oe;
716
+ if (r !== null) r.Oe = i;
717
+ else t.xe = i;
714
718
  if (i !== null) i.P = r;
715
719
  else {
716
720
  t.O = r;
717
721
  if (r === null) {
718
722
  t.Pe?.();
719
- t.H && !t.Ae && !(t.m & o) && unobserved(t);
723
+ t.H && !t.ve && !(t.m & o) && unobserved(t);
720
724
  }
721
725
  }
722
726
  return n;
723
727
  }
724
728
  function unobserved(e) {
725
- deleteFromHeap(e, e.m & o ? P : v);
729
+ deleteFromHeap(e, e.m & o ? v : P);
726
730
  let t = e.W;
727
731
  while (t !== null) {
728
732
  t = unlinkSubs(t);
@@ -742,9 +746,9 @@ function link(e, t) {
742
746
  return;
743
747
  }
744
748
  }
745
- const o = e.ve;
746
- if (o !== null && o.A === t && (!s || isValidLink(o, t))) return;
747
- const u = (t.ke = e.ve = { L: e, A: t, N: i, xe: o, P: null });
749
+ const o = e.xe;
750
+ if (o !== null && o.k === t && (!s || isValidLink(o, t))) return;
751
+ const u = (t.ke = e.xe = { L: e, k: t, N: i, Oe: o, P: null });
748
752
  if (n !== null) n.N = u;
749
753
  else t.W = u;
750
754
  if (o !== null) o.P = u;
@@ -768,8 +772,8 @@ function markDisposal(e) {
768
772
  while (t) {
769
773
  t.m |= o;
770
774
  if (t.m & i) {
771
- deleteFromHeap(t, v);
772
- insertIntoHeap(t, P);
775
+ deleteFromHeap(t, P);
776
+ insertIntoHeap(t, v);
773
777
  }
774
778
  markDisposal(t);
775
779
  t = t.Ee;
@@ -792,7 +796,7 @@ function disposeChildren(e, t = false, n) {
792
796
  const e = r.Ee;
793
797
  if (r.W) {
794
798
  const e = r;
795
- deleteFromHeap(e, e.m & o ? P : v);
799
+ deleteFromHeap(e, e.m & o ? v : P);
796
800
  let t = e.W;
797
801
  do {
798
802
  t = unlinkSubs(t);
@@ -807,13 +811,12 @@ function disposeChildren(e, t = false, n) {
807
811
  e.je = null;
808
812
  } else {
809
813
  e.Ce = null;
810
- e.Ee = null;
811
- e.We = 0;
814
+ e.Ae = 0;
812
815
  }
813
816
  runDisposal(e, n);
814
817
  }
815
818
  function runDisposal(e, t) {
816
- let n = t ? e.Ne : e.Le;
819
+ let n = t ? e.We : e.Ne;
817
820
  if (!n) return;
818
821
  if (Array.isArray(n)) {
819
822
  for (let e = 0; e < n.length; e++) {
@@ -823,12 +826,12 @@ function runDisposal(e, t) {
823
826
  } else {
824
827
  n.call(n);
825
828
  }
826
- t ? (e.Ne = null) : (e.Le = null);
829
+ t ? (e.We = null) : (e.Ne = null);
827
830
  }
828
831
  function childId(e, t) {
829
832
  let n = e;
830
- while (n.Ie && n.i) n = n.i;
831
- if (n.id != null) return formatId(n.id, t ? n.We++ : n.We);
833
+ while (n.Le && n.i) n = n.i;
834
+ if (n.id != null) return formatId(n.id, t ? n.Ae++ : n.Ae);
832
835
  throw new Error("Cannot get child id from owner without an id");
833
836
  }
834
837
  function getNextChildId(e) {
@@ -843,37 +846,37 @@ function formatId(e, t) {
843
846
  return e + (r ? String.fromCharCode(64 + r) : "") + n;
844
847
  }
845
848
  function getObserver() {
846
- if (Q || M) return L;
847
- return I ? q : null;
849
+ if (T || F) return L;
850
+ return H ? M : null;
848
851
  }
849
852
  function getOwner() {
850
- return q;
853
+ return M;
851
854
  }
852
855
  function onCleanup(e) {
853
- if (!q) return e;
854
- if (!q.Le) q.Le = e;
855
- else if (Array.isArray(q.Le)) q.Le.push(e);
856
- else q.Le = [q.Le, e];
856
+ if (!M) return e;
857
+ if (!M.Ne) M.Ne = e;
858
+ else if (Array.isArray(M.Ne)) M.Ne.push(e);
859
+ else M.Ne = [M.Ne, e];
857
860
  return e;
858
861
  }
859
862
  function isDisposed(e) {
860
863
  return !!(e.m & (u | o));
861
864
  }
862
865
  function createOwner(e) {
863
- const t = q;
866
+ const t = M;
864
867
  const n = e?.transparent ?? false;
865
868
  const r = {
866
869
  id: e?.id ?? (n ? t?.id : t?.id != null ? getNextChildId(t) : undefined),
867
- Ie: n || undefined,
870
+ Le: n || undefined,
868
871
  t: true,
869
872
  u: t?.t ? t.u : t,
870
873
  Ce: null,
871
874
  Ee: null,
872
- Le: null,
873
- fe: t?.fe ?? j,
874
- He: t?.He || _,
875
- We: 0,
876
875
  Ne: null,
876
+ fe: t?.fe ?? A,
877
+ Ie: t?.Ie || _,
878
+ Ae: 0,
879
+ We: null,
877
880
  je: null,
878
881
  i: t,
879
882
  dispose(e = true) {
@@ -906,12 +909,12 @@ function effect(e, t, n, r, i) {
906
909
  },
907
910
  lazy: true
908
911
  });
909
- o.Re = r;
910
- o.Qe = t;
911
- o.Te = n;
912
- o.Me = undefined;
912
+ o.He = r;
913
+ o.Re = t;
914
+ o.Qe = n;
915
+ o.Te = undefined;
913
916
  o.oe = i?.render ? h : y;
914
- o.Oe = (e, t) => {
917
+ o._e = (e, t) => {
915
918
  const n = e !== undefined ? e : o.de;
916
919
  const r = t !== undefined ? t : o.Y;
917
920
  if (n & d) {
@@ -919,10 +922,10 @@ function effect(e, t, n, r, i) {
919
922
  o.fe.notify(o, a, 0);
920
923
  if (o.oe === y) {
921
924
  try {
922
- return o.Te
923
- ? o.Te(e, () => {
924
- o.Me?.();
925
- o.Me = undefined;
925
+ return o.Qe
926
+ ? o.Qe(e, () => {
927
+ o.Te?.();
928
+ o.Te = undefined;
926
929
  })
927
930
  : console.error(e);
928
931
  } catch (t) {
@@ -930,23 +933,25 @@ function effect(e, t, n, r, i) {
930
933
  }
931
934
  }
932
935
  if (!o.fe.notify(o, d, d)) throw e;
933
- } else if (o.oe === h) o.fe.notify(o, a | d, n, r);
936
+ } else if (o.oe === h) {
937
+ o.fe.notify(o, a | d, n, r);
938
+ }
934
939
  };
935
940
  recompute(o, true);
936
941
  !i?.defer && (o.oe === y ? o.fe.enqueue(o.oe, runEffect.bind(o)) : runEffect.call(o));
937
942
  s = true;
938
- onCleanup(() => o.Me?.());
943
+ onCleanup(() => o.Te?.());
939
944
  }
940
945
  function runEffect() {
941
946
  if (!this.ue || this.m & u) return;
942
- this.Me?.();
943
- this.Me = undefined;
947
+ this.Te?.();
948
+ this.Te = undefined;
944
949
  try {
945
- this.Me = this.Qe(this.ae, this.Re);
950
+ this.Te = this.Re(this.ae, this.He);
946
951
  } catch (e) {
947
952
  if (!this.fe.notify(this, d, d)) throw e;
948
953
  } finally {
949
- this.Re = this.ae;
954
+ this.He = this.ae;
950
955
  this.ue = false;
951
956
  }
952
957
  }
@@ -959,34 +964,57 @@ function trackedEffect(e, t) {
959
964
  const n = computed(
960
965
  () => {
961
966
  try {
962
- n.Me?.();
963
- n.Me = undefined;
964
- n.Me = staleValues(e) || undefined;
967
+ n.Te?.();
968
+ n.Te = undefined;
969
+ n.Te = staleValues(e) || undefined;
965
970
  } finally {
966
971
  }
967
972
  },
968
973
  undefined,
969
974
  { ...t, lazy: true }
970
975
  );
971
- n.Me = undefined;
976
+ n.Te = undefined;
972
977
  n.ue = true;
973
978
  n.oe = g;
974
- n.le = run;
979
+ n.ce = run;
975
980
  n.fe.enqueue(y, run);
976
- onCleanup(() => n.Me?.());
981
+ onCleanup(() => n.Te?.());
982
+ }
983
+ let I = null;
984
+ function enableExternalSource(e) {
985
+ const { factory: t, untrack: n = e => e() } = e;
986
+ if (I) {
987
+ const { factory: e, untrack: r } = I;
988
+ I = {
989
+ factory: (n, r) => {
990
+ const i = e(n, r);
991
+ const s = t(e => i.track(e), r);
992
+ return {
993
+ track: e => s.track(e),
994
+ dispose() {
995
+ s.dispose();
996
+ i.dispose();
997
+ }
998
+ };
999
+ },
1000
+ untrack: e => r(() => n(e))
1001
+ };
1002
+ } else {
1003
+ I = { factory: t, untrack: n };
1004
+ }
977
1005
  }
978
1006
  GlobalQueue.K = recompute;
979
1007
  GlobalQueue.U = disposeChildren;
980
- let I = false;
981
1008
  let H = false;
982
1009
  let R = false;
983
1010
  let Q = false;
984
1011
  let T = false;
985
- let M = false;
986
- let q = null;
987
- let F = null;
988
- let V = false;
989
- let D = null;
1012
+ let q = false;
1013
+ let F = false;
1014
+ let M = null;
1015
+ let V = null;
1016
+ let D = false;
1017
+ let B = null;
990
1018
  function ownerInSnapshotScope(e) {
991
1019
  while (e) {
992
1020
  if (e.qe) return true;
@@ -995,8 +1023,8 @@ function ownerInSnapshotScope(e) {
995
1023
  return false;
996
1024
  }
997
1025
  function setSnapshotCapture(e) {
998
- V = e;
999
- if (e && !D) D = new Set();
1026
+ D = e;
1027
+ if (e && !B) B = new Set();
1000
1028
  }
1001
1029
  function markSnapshotScope(e) {
1002
1030
  e.qe = true;
@@ -1016,11 +1044,11 @@ function releaseSubtree(e) {
1016
1044
  if (t.H) {
1017
1045
  const e = t;
1018
1046
  e.se = false;
1019
- if (e.m & l) {
1020
- e.m &= ~l;
1047
+ if (e.m & c) {
1048
+ e.m &= ~c;
1021
1049
  e.m |= n;
1022
- if (v.j > e.o) v.j = e.o;
1023
- insertIntoHeap(e, v);
1050
+ if (P.A > e.o) P.A = e.o;
1051
+ insertIntoHeap(e, P);
1024
1052
  }
1025
1053
  }
1026
1054
  releaseSubtree(t);
@@ -1028,46 +1056,46 @@ function releaseSubtree(e) {
1028
1056
  }
1029
1057
  }
1030
1058
  function clearSnapshots() {
1031
- if (D) {
1032
- for (const e of D) {
1059
+ if (B) {
1060
+ for (const e of B) {
1033
1061
  delete e.ie;
1034
1062
  delete e[m];
1035
1063
  }
1036
- D = null;
1064
+ B = null;
1037
1065
  }
1038
- V = false;
1066
+ D = false;
1039
1067
  }
1040
1068
  function recompute(t, n = false) {
1041
1069
  const i = t.oe;
1042
1070
  if (!n) {
1043
- if (t.ne && (!i || k) && k !== t.ne) j.initTransition(t.ne);
1044
- deleteFromHeap(t, t.m & o ? P : v);
1071
+ if (t.ne && (!i || C) && C !== t.ne) A.initTransition(t.ne);
1072
+ deleteFromHeap(t, t.m & o ? v : P);
1045
1073
  if (t.ne || i === g) disposeChildren(t);
1046
1074
  else {
1047
1075
  markDisposal(t);
1048
- t.Ne = t.Le;
1076
+ t.We = t.Ne;
1049
1077
  t.je = t.Ce;
1050
- t.Le = null;
1078
+ t.Ne = null;
1051
1079
  t.Ce = null;
1052
- t.We = 0;
1080
+ t.Ae = 0;
1053
1081
  }
1054
1082
  }
1055
1083
  const s = !!(t.m & f);
1056
- const u = hasActiveOverride(t);
1057
- const c = !!(t.de & a);
1058
- const p = q;
1059
- q = t;
1084
+ const u = t.pe !== undefined && t.pe !== S;
1085
+ const l = !!(t.de & a);
1086
+ const p = M;
1087
+ M = t;
1060
1088
  t.ke = null;
1061
1089
  t.m = r;
1062
- t.$ = A;
1063
- let h = t.ce === S ? t.ae : t.ce;
1090
+ t.$ = k;
1091
+ let h = t.le === S ? t.ae : t.le;
1064
1092
  let y = t.o;
1065
- let w = I;
1066
- let m = F;
1067
- I = true;
1093
+ let w = H;
1094
+ let m = V;
1095
+ H = true;
1068
1096
  if (s) {
1069
1097
  const e = resolveLane(t);
1070
- if (e) F = e;
1098
+ if (e) V = e;
1071
1099
  }
1072
1100
  try {
1073
1101
  h = handleAsync(t, t.H(h));
@@ -1075,15 +1103,15 @@ function recompute(t, n = false) {
1075
1103
  const e = resolveLane(t);
1076
1104
  if (e) {
1077
1105
  e.T.delete(t);
1078
- updatePendingSignal(e.pe);
1106
+ updatePendingSignal(e.he);
1079
1107
  }
1080
1108
  } catch (e) {
1081
- if (e instanceof NotReadyError && F) {
1082
- const e = findLane(F);
1083
- if (e.pe !== t) {
1109
+ if (e instanceof NotReadyError && V) {
1110
+ const e = findLane(V);
1111
+ if (e.he !== t) {
1084
1112
  e.T.add(t);
1085
1113
  t.re = e;
1086
- updatePendingSignal(e.pe);
1114
+ updatePendingSignal(e.he);
1087
1115
  }
1088
1116
  }
1089
1117
  notifyStatus(
@@ -1094,9 +1122,9 @@ function recompute(t, n = false) {
1094
1122
  e instanceof NotReadyError ? t.re : undefined
1095
1123
  );
1096
1124
  } finally {
1097
- I = w;
1098
- t.m = e | (n ? t.m & l : 0);
1099
- q = p;
1125
+ H = w;
1126
+ t.m = e | (n ? t.m & c : 0);
1127
+ M = p;
1100
1128
  }
1101
1129
  if (!t.Y) {
1102
1130
  const e = t.ke;
@@ -1108,31 +1136,30 @@ function recompute(t, n = false) {
1108
1136
  if (e !== null) e.N = null;
1109
1137
  else t.W = null;
1110
1138
  }
1111
- const f = u ? t.ae : t.ce === S ? t.ae : t.ce;
1112
- const l = !t.be || !t.be(f, h);
1113
- if (l) {
1114
- const e = u ? t.ae : undefined;
1115
- if (n || (i && k !== t.ne) || s) t.ae = h;
1116
- else t.ce = h;
1117
- if (u && !s && c) {
1118
- const e = t.Se || 0;
1119
- const n = t.ge || 0;
1120
- if (e <= n) t.ae = h;
1121
- }
1122
- if (!u || s || t.ae !== e) {
1123
- insertSubs(t, s || u);
1124
- }
1139
+ const f = u ? t.pe : t.le === S ? t.ae : t.le;
1140
+ const c = !t.me || !t.me(f, h);
1141
+ if (c) {
1142
+ const e = u ? t.pe : undefined;
1143
+ if (n || (i && C !== t.ne) || s) {
1144
+ t.ae = h;
1145
+ if (u && s) {
1146
+ t.pe = h;
1147
+ t.le = h;
1148
+ }
1149
+ } else t.le = h;
1150
+ if (u && !s && l && !t.Se) t.pe = h;
1151
+ if (!u || s || t.pe !== e) insertSubs(t, s || u);
1125
1152
  } else if (u) {
1126
- t.ce = h;
1153
+ t.le = h;
1127
1154
  } else if (t.o != y) {
1128
1155
  for (let e = t.O; e !== null; e = e.P) {
1129
- insertIntoHeapHeight(e.A, e.A.m & o ? P : v);
1156
+ insertIntoHeapHeight(e.k, e.k.m & o ? v : P);
1130
1157
  }
1131
1158
  }
1132
1159
  }
1133
- F = m;
1134
- (!n || t.de & a) && !t.ne && !(k && t.we) && j.D.push(t);
1135
- t.ne && i && k !== t.ne && runInTransition(t.ne, () => recompute(t));
1160
+ V = m;
1161
+ (!n || t.de & a) && !t.ne && !(C && u) && A.D.push(t);
1162
+ t.ne && i && C !== t.ne && runInTransition(t.ne, () => recompute(t));
1136
1163
  }
1137
1164
  function updateIfNecessary(r) {
1138
1165
  if (r.m & t) {
@@ -1147,161 +1174,174 @@ function updateIfNecessary(r) {
1147
1174
  }
1148
1175
  }
1149
1176
  }
1150
- if (r.m & (n | f) || (r.Y && r.$ < A && !r.me)) {
1177
+ if (r.m & (n | f) || (r.Y && r.$ < k && !r.we)) {
1151
1178
  recompute(r);
1152
1179
  }
1153
- r.m = e | (r.m & l);
1180
+ r.m = e | (r.m & c);
1154
1181
  }
1155
1182
  function computed(t, n, r) {
1156
1183
  const i = r?.transparent ?? false;
1157
1184
  const s = {
1158
- id: r?.id ?? (i ? q?.id : q?.id != null ? getNextChildId(q) : undefined),
1159
- Ie: i || undefined,
1160
- be: r?.equals != null ? r.equals : isEqual,
1185
+ id: r?.id ?? (i ? M?.id : M?.id != null ? getNextChildId(M) : undefined),
1186
+ Le: i || undefined,
1187
+ me: r?.equals != null ? r.equals : isEqual,
1161
1188
  Fe: !!r?.pureWrite,
1162
1189
  Pe: r?.unobserved,
1163
- Le: null,
1164
- fe: q?.fe ?? j,
1165
- He: q?.He ?? _,
1166
- We: 0,
1190
+ Ne: null,
1191
+ fe: M?.fe ?? A,
1192
+ Ie: M?.Ie ?? _,
1193
+ Ae: 0,
1167
1194
  H: t,
1168
1195
  ae: n,
1169
1196
  o: 0,
1170
- k: null,
1197
+ C: null,
1171
1198
  h: undefined,
1172
1199
  p: null,
1173
1200
  W: null,
1174
1201
  ke: null,
1175
1202
  O: null,
1176
- ve: null,
1177
- i: q,
1203
+ xe: null,
1204
+ i: M,
1178
1205
  Ee: null,
1179
1206
  Ce: null,
1180
- m: r?.lazy ? c : e,
1207
+ m: r?.lazy ? l : e,
1181
1208
  de: p,
1182
- $: A,
1183
- ce: S,
1184
- Ne: null,
1209
+ $: k,
1210
+ le: S,
1211
+ We: null,
1185
1212
  je: null,
1186
- me: null,
1213
+ we: null,
1187
1214
  ne: null
1188
1215
  };
1189
1216
  s.p = s;
1190
- const o = q?.t ? q.u : q;
1191
- if (q) {
1192
- const e = q.Ce;
1217
+ const o = M?.t ? M.u : M;
1218
+ if (M) {
1219
+ const e = M.Ce;
1193
1220
  if (e === null) {
1194
- q.Ce = s;
1221
+ M.Ce = s;
1195
1222
  } else {
1196
1223
  s.Ee = e;
1197
- q.Ce = s;
1224
+ M.Ce = s;
1198
1225
  }
1199
1226
  }
1200
1227
  if (o) s.o = o.o + 1;
1201
- if (V && ownerInSnapshotScope(q)) s.se = true;
1228
+ if (D && ownerInSnapshotScope(M)) s.se = true;
1229
+ if (I) {
1230
+ const e = signal(undefined, { equals: false, pureWrite: true });
1231
+ const t = I.factory(s.H, () => {
1232
+ setSignal(e, undefined);
1233
+ });
1234
+ onCleanup(() => t.dispose());
1235
+ s.H = n => {
1236
+ read(e);
1237
+ return t.track(n);
1238
+ };
1239
+ }
1202
1240
  !r?.lazy && recompute(s, true);
1203
- if (V && !r?.lazy) {
1241
+ if (D && !r?.lazy) {
1204
1242
  if (!(s.de & a)) {
1205
1243
  s.ie = s.ae === undefined ? w : s.ae;
1206
- D.add(s);
1244
+ B.add(s);
1207
1245
  }
1208
1246
  }
1209
1247
  return s;
1210
1248
  }
1211
1249
  function signal(e, t, n = null) {
1212
1250
  const r = {
1213
- be: t?.equals != null ? t.equals : isEqual,
1251
+ me: t?.equals != null ? t.equals : isEqual,
1214
1252
  Fe: !!t?.pureWrite,
1215
1253
  Pe: t?.unobserved,
1216
1254
  ae: e,
1217
1255
  O: null,
1218
- ve: null,
1219
- $: A,
1256
+ xe: null,
1257
+ $: k,
1220
1258
  I: n,
1221
- C: n?.k || null,
1222
- ce: S
1259
+ j: n?.C || null,
1260
+ le: S
1223
1261
  };
1224
- n && (n.k = r);
1225
- if (V && !r.Fe) {
1262
+ n && (n.C = r);
1263
+ if (D && !r.Fe && !((n?.de ?? 0) & a)) {
1226
1264
  r.ie = e === undefined ? w : e;
1227
- D.add(r);
1265
+ B.add(r);
1228
1266
  }
1229
1267
  return r;
1230
1268
  }
1231
1269
  function optimisticSignal(e, t) {
1232
1270
  const n = signal(e, t);
1233
- n.we = true;
1271
+ n.pe = S;
1234
1272
  return n;
1235
1273
  }
1236
1274
  function optimisticComputed(e, t, n) {
1237
1275
  const r = computed(e, t, n);
1238
- r.we = true;
1276
+ r.pe = S;
1239
1277
  return r;
1240
1278
  }
1241
1279
  function isEqual(e, t) {
1242
1280
  return e === t;
1243
1281
  }
1244
1282
  function untrack(e, t) {
1245
- if (!I && true) return e();
1246
- const n = I;
1247
- I = false;
1283
+ if (!I && !H && true) return e();
1284
+ const n = H;
1285
+ H = false;
1248
1286
  try {
1287
+ if (I) return I.untrack(e);
1249
1288
  return e();
1250
1289
  } finally {
1251
- I = n;
1290
+ H = n;
1252
1291
  }
1253
1292
  }
1254
1293
  function read(e) {
1255
- if (M) {
1294
+ if (F) {
1256
1295
  const t = getLatestValueComputed(e);
1257
- const n = M;
1258
- M = false;
1259
- let r;
1296
+ const n = F;
1297
+ F = false;
1298
+ const r = e.pe !== undefined && e.pe !== S ? e.pe : e.ae;
1299
+ let i;
1260
1300
  try {
1261
- r = read(t);
1262
- } catch (t) {
1263
- if (!q && t instanceof NotReadyError) return e.ae;
1264
- throw t;
1301
+ i = read(t);
1302
+ } catch (e) {
1303
+ if (!M && e instanceof NotReadyError) return r;
1304
+ throw e;
1265
1305
  } finally {
1266
- M = n;
1306
+ F = n;
1267
1307
  }
1268
- if (t.de & a) return e.ae;
1269
- if (H && F && t.re) {
1270
- const n = findLane(t.re);
1271
- const r = findLane(F);
1272
- if (n !== r && n.T.size > 0) {
1273
- return e.ae;
1308
+ if (t.de & a) return r;
1309
+ if (R && V && t.re) {
1310
+ const e = findLane(t.re);
1311
+ const n = findLane(V);
1312
+ if (e !== n && e.T.size > 0) {
1313
+ return r;
1274
1314
  }
1275
1315
  }
1276
- return r;
1316
+ return i;
1277
1317
  }
1278
- if (Q) {
1318
+ if (T) {
1279
1319
  const t = e.I || e;
1280
1320
  const n = getPendingSignal(t);
1281
- const r = Q;
1282
- Q = false;
1321
+ const r = T;
1322
+ T = false;
1283
1323
  if (read(n)) {
1284
- T = true;
1324
+ q = true;
1285
1325
  }
1286
- Q = r;
1326
+ T = r;
1287
1327
  return e.ae;
1288
1328
  }
1289
- let t = q;
1329
+ let t = M;
1290
1330
  if (t?.t) t = t.u;
1291
- if (R && e.H) recompute(e);
1292
- if (e.m & c) {
1293
- e.m &= ~c;
1331
+ if (Q && e.H) recompute(e);
1332
+ if (e.m & l) {
1333
+ e.m &= ~l;
1294
1334
  recompute(e, true);
1295
1335
  }
1296
1336
  const n = e.I || e;
1297
- if (t && I) {
1337
+ if (t && H) {
1298
1338
  if (e.H && e.m & u) recompute(e);
1299
1339
  link(e, t);
1300
1340
  if (n.H) {
1301
1341
  const r = e.m & o;
1302
- if (n.o >= (r ? P.j : v.j)) {
1342
+ if (n.o >= (r ? v.A : P.A)) {
1303
1343
  markNode(t);
1304
- markHeap(r ? P : v);
1344
+ markHeap(r ? v : P);
1305
1345
  updateIfNecessary(n);
1306
1346
  }
1307
1347
  const i = n.o;
@@ -1311,16 +1351,16 @@ function read(e) {
1311
1351
  }
1312
1352
  }
1313
1353
  if (n.de & a) {
1314
- if (t && !(H && n.ne && k !== n.ne)) {
1315
- if (F) {
1354
+ if (t && !(R && n.ne && C !== n.ne)) {
1355
+ if (V) {
1316
1356
  const r = n.re;
1317
- const i = findLane(F);
1357
+ const i = findLane(V);
1318
1358
  if (r && findLane(r) === i && !hasActiveOverride(n)) {
1319
- if (!I) link(e, t);
1359
+ if (!H && e !== t) link(e, t);
1320
1360
  throw n.Y;
1321
1361
  }
1322
1362
  } else {
1323
- if (!I) link(e, t);
1363
+ if (!H && e !== t) link(e, t);
1324
1364
  throw n.Y;
1325
1365
  }
1326
1366
  } else if (!t && n.de & p) {
@@ -1328,107 +1368,105 @@ function read(e) {
1328
1368
  }
1329
1369
  }
1330
1370
  if (e.H && e.de & d) {
1331
- if (e.$ < A) {
1371
+ if (e.$ < k) {
1332
1372
  recompute(e, true);
1333
1373
  return read(e);
1334
1374
  } else throw e.Y;
1335
1375
  }
1336
- if (V && t && t.se) {
1376
+ if (D && t && t.se) {
1337
1377
  const n = e.ie;
1338
1378
  if (n !== undefined) {
1339
1379
  const r = n === w ? undefined : n;
1340
- const i = e.ce !== S ? e.ce : e.ae;
1341
- if (i !== r) t.m |= l;
1380
+ const i = e.le !== S ? e.le : e.ae;
1381
+ if (i !== r) t.m |= c;
1342
1382
  return r;
1343
1383
  }
1344
1384
  }
1385
+ if (e.pe !== undefined && e.pe !== S) return e.pe;
1345
1386
  return !t ||
1346
- (F !== null && (e.we || e.re || n === e || !!(n.de & a))) ||
1347
- e.ce === S ||
1348
- (H && e.ne && k !== e.ne)
1387
+ (V !== null && (e.pe !== undefined || e.re || n === e || !!(n.de & a))) ||
1388
+ e.le === S ||
1389
+ (R && e.ne && C !== e.ne)
1349
1390
  ? e.ae
1350
- : e.ce;
1391
+ : e.le;
1351
1392
  }
1352
1393
  function setSignal(e, t) {
1353
- if (e.ne && k !== e.ne) j.initTransition(e.ne);
1354
- const n = e.we && !E;
1355
- const r = n ? e.ae : e.ce === S ? e.ae : e.ce;
1356
- if (typeof t === "function") t = t(r);
1357
- const i = !e.be || !e.be(r, t) || !!(e.de & p);
1358
- if (!i) {
1359
- if (n && e.ce !== S && e.H) {
1394
+ if (e.ne && C !== e.ne) A.initTransition(e.ne);
1395
+ const n = e.pe !== undefined && !j;
1396
+ const r = e.pe !== undefined && e.pe !== S;
1397
+ const i = n ? (r ? e.pe : e.ae) : e.le === S ? e.ae : e.le;
1398
+ if (typeof t === "function") t = t(i);
1399
+ const s = !e.me || !e.me(i, t) || !!(e.de & p);
1400
+ if (!s) {
1401
+ if (n && r && e.H) {
1360
1402
  insertSubs(e, true);
1361
1403
  schedule();
1362
1404
  }
1363
1405
  return t;
1364
1406
  }
1365
1407
  if (n) {
1366
- const n = j.B.includes(e);
1367
- if (e.ne && n) {
1368
- j.initTransition(e.ne);
1369
- }
1370
- if (e.ce === S) {
1371
- e.ce = e.ae;
1408
+ const n = e.pe === S;
1409
+ if (!n && e.ne) A.initTransition(e.ne);
1410
+ if (n) {
1411
+ e.le = e.ae;
1412
+ A.B.push(e);
1372
1413
  }
1373
- if (!n) {
1374
- j.B.push(e);
1375
- }
1376
- e.Se = (e.Se || 0) + 1;
1414
+ e.Se = true;
1377
1415
  const r = getOrCreateLane(e);
1378
1416
  e.re = r;
1379
- e.ae = t;
1417
+ e.pe = t;
1380
1418
  } else {
1381
- if (e.ce === S) j.D.push(e);
1382
- e.ce = t;
1419
+ if (e.le === S) A.D.push(e);
1420
+ e.le = t;
1383
1421
  }
1384
1422
  updatePendingSignal(e);
1385
- if (e._e) {
1386
- setSignal(e._e, t);
1423
+ if (e.be) {
1424
+ setSignal(e.be, t);
1387
1425
  }
1388
- e.$ = A;
1426
+ e.$ = k;
1389
1427
  insertSubs(e, n);
1390
1428
  schedule();
1391
1429
  return t;
1392
1430
  }
1393
1431
  function runWithOwner(e, t) {
1394
- const n = q;
1395
- const r = I;
1396
- q = e;
1397
- I = false;
1432
+ const n = M;
1433
+ const r = H;
1434
+ M = e;
1435
+ H = false;
1398
1436
  try {
1399
1437
  return t();
1400
1438
  } finally {
1401
- q = n;
1402
- I = r;
1439
+ M = n;
1440
+ H = r;
1403
1441
  }
1404
1442
  }
1405
1443
  function getPendingSignal(e) {
1406
- if (!e.Ve) {
1407
- e.Ve = optimisticSignal(false, { pureWrite: true });
1408
- if (e.he) {
1409
- e.Ve.he = e;
1444
+ if (!e.Me) {
1445
+ e.Me = optimisticSignal(false, { pureWrite: true });
1446
+ if (e.ye) {
1447
+ e.Me.ye = e;
1410
1448
  }
1411
- if (computePendingState(e)) setSignal(e.Ve, true);
1449
+ if (computePendingState(e)) setSignal(e.Me, true);
1412
1450
  }
1413
- return e.Ve;
1451
+ return e.Me;
1414
1452
  }
1415
1453
  function computePendingState(e) {
1416
1454
  const t = e;
1417
- if (e.we && e.ce !== S) {
1455
+ if (e.pe !== undefined && e.pe !== S) {
1418
1456
  if (t.de & a && !(t.de & p)) return true;
1419
- if (e.he) {
1457
+ if (e.ye) {
1420
1458
  const t = e.re ? findLane(e.re) : null;
1421
1459
  return !!(t && t.T.size > 0);
1422
1460
  }
1423
1461
  return true;
1424
1462
  }
1425
- if (e.ce !== S && !(t.de & p)) return true;
1463
+ if (e.le !== S && !(t.de & p)) return true;
1426
1464
  return !!(t.de & a && !(t.de & p));
1427
1465
  }
1428
1466
  function updatePendingSignal(e) {
1429
- if (e.Ve) {
1467
+ if (e.Me) {
1430
1468
  const t = computePendingState(e);
1431
- const n = e.Ve;
1469
+ const n = e.Me;
1432
1470
  setSignal(n, t);
1433
1471
  if (!t && n.re) {
1434
1472
  const t = resolveLane(e);
@@ -1444,57 +1482,57 @@ function updatePendingSignal(e) {
1444
1482
  }
1445
1483
  }
1446
1484
  function getLatestValueComputed(e) {
1447
- if (!e._e) {
1448
- const t = M;
1449
- M = false;
1450
- const n = Q;
1451
- Q = false;
1452
- const r = q;
1453
- q = null;
1454
- e._e = optimisticComputed(() => read(e));
1455
- e._e.he = e;
1456
- q = r;
1457
- Q = n;
1458
- M = t;
1459
- }
1460
- return e._e;
1485
+ if (!e.be) {
1486
+ const t = F;
1487
+ F = false;
1488
+ const n = T;
1489
+ T = false;
1490
+ const r = M;
1491
+ M = null;
1492
+ e.be = optimisticComputed(() => read(e));
1493
+ e.be.ye = e;
1494
+ M = r;
1495
+ T = n;
1496
+ F = t;
1497
+ }
1498
+ return e.be;
1461
1499
  }
1462
1500
  function staleValues(e, t = true) {
1463
- const n = H;
1464
- H = t;
1501
+ const n = R;
1502
+ R = t;
1465
1503
  try {
1466
1504
  return e();
1467
1505
  } finally {
1468
- H = n;
1506
+ R = n;
1469
1507
  }
1470
1508
  }
1471
1509
  function latest(e) {
1472
- const t = M;
1473
- M = true;
1510
+ const t = F;
1511
+ F = true;
1474
1512
  try {
1475
1513
  return e();
1476
1514
  } finally {
1477
- M = t;
1515
+ F = t;
1478
1516
  }
1479
1517
  }
1480
1518
  function isPending(e) {
1481
- const t = Q;
1482
- const n = T;
1483
- Q = true;
1484
- T = false;
1519
+ const t = T;
1520
+ const n = q;
1521
+ T = true;
1522
+ q = false;
1485
1523
  try {
1486
1524
  e();
1487
- return T;
1525
+ return q;
1488
1526
  } catch {
1489
- return T;
1527
+ return q;
1490
1528
  } finally {
1491
- Q = t;
1492
- T = n;
1529
+ T = t;
1530
+ q = n;
1493
1531
  }
1494
1532
  }
1495
1533
  function refresh(e) {
1496
- let t = R;
1497
- R = true;
1534
+ let t = Q;
1535
+ Q = true;
1498
1536
  try {
1499
1537
  if (typeof e !== "function") {
1500
1538
  recompute(e[O]);
@@ -1502,14 +1540,14 @@ function refresh(e) {
1502
1540
  }
1503
1541
  return untrack(e);
1504
1542
  } finally {
1505
- R = t;
1543
+ Q = t;
1506
1544
  if (!t) {
1507
1545
  schedule();
1508
1546
  }
1509
1547
  }
1510
1548
  }
1511
1549
  function isRefreshing() {
1512
- return R;
1550
+ return Q;
1513
1551
  }
1514
1552
  function createContext(e, t) {
1515
1553
  return { id: Symbol(t), defaultValue: e };
@@ -1518,7 +1556,7 @@ function getContext(e, t = getOwner()) {
1518
1556
  if (!t) {
1519
1557
  throw new NoOwnerError();
1520
1558
  }
1521
- const n = hasContext(e, t) ? t.He[e.id] : e.defaultValue;
1559
+ const n = hasContext(e, t) ? t.Ie[e.id] : e.defaultValue;
1522
1560
  if (isUndefined(n)) {
1523
1561
  throw new ContextNotFoundError();
1524
1562
  }
@@ -1528,16 +1566,16 @@ function setContext(e, t, n = getOwner()) {
1528
1566
  if (!n) {
1529
1567
  throw new NoOwnerError();
1530
1568
  }
1531
- n.He = { ...n.He, [e.id]: isUndefined(t) ? e.defaultValue : t };
1569
+ n.Ie = { ...n.Ie, [e.id]: isUndefined(t) ? e.defaultValue : t };
1532
1570
  }
1533
1571
  function hasContext(e, t) {
1534
- return !isUndefined(t?.He[e.id]);
1572
+ return !isUndefined(t?.Ie[e.id]);
1535
1573
  }
1536
1574
  function isUndefined(e) {
1537
1575
  return typeof e === "undefined";
1538
1576
  }
1539
1577
  function restoreTransition(e, t) {
1540
- j.initTransition(e);
1578
+ A.initTransition(e);
1541
1579
  const n = t();
1542
1580
  flush();
1543
1581
  return n;
@@ -1546,8 +1584,8 @@ function action(e) {
1546
1584
  return (...t) =>
1547
1585
  new Promise((n, r) => {
1548
1586
  const i = e(...t);
1549
- j.initTransition();
1550
- let s = k;
1587
+ A.initTransition();
1588
+ let s = C;
1551
1589
  s.ee.push(i);
1552
1590
  const done = (e, t) => {
1553
1591
  s = currentTransition(s);
@@ -1580,17 +1618,22 @@ function action(e) {
1580
1618
  step();
1581
1619
  });
1582
1620
  }
1621
+ function accessor(e) {
1622
+ const t = read.bind(null, e);
1623
+ t.$r = true;
1624
+ return t;
1625
+ }
1583
1626
  function createSignal(e, t, n) {
1584
1627
  if (typeof e === "function") {
1585
1628
  const r = computed(e, t, n);
1586
- return [read.bind(null, r), setSignal.bind(null, r)];
1629
+ return [accessor(r), setSignal.bind(null, r)];
1587
1630
  }
1588
1631
  const r = signal(e, t);
1589
- return [read.bind(null, r), setSignal.bind(null, r)];
1632
+ return [accessor(r), setSignal.bind(null, r)];
1590
1633
  }
1591
1634
  function createMemo(e, t, n) {
1592
1635
  let r = computed(e, t, n);
1593
- return read.bind(null, r);
1636
+ return accessor(r);
1594
1637
  }
1595
1638
  function createEffect(e, t, n, r) {
1596
1639
  effect(e, t.effect || t, t.error, n, r);
@@ -1638,18 +1681,18 @@ function resolve(e) {
1638
1681
  }
1639
1682
  function createOptimistic(e, t, n) {
1640
1683
  const r = typeof e === "function" ? optimisticComputed(e, t, n) : optimisticSignal(e, t);
1641
- return [read.bind(null, r), setSignal.bind(null, r)];
1684
+ return [accessor(r), setSignal.bind(null, r)];
1642
1685
  }
1643
1686
  function onSettled(e) {
1644
1687
  getOwner()
1645
1688
  ? createTrackedEffect(() => untrack(e))
1646
- : j.enqueue(y, () => {
1689
+ : A.enqueue(y, () => {
1647
1690
  const t = e();
1648
1691
  t?.();
1649
1692
  });
1650
1693
  }
1651
1694
  function unwrap(e) {
1652
- return e?.[z]?.[ee] ?? e;
1695
+ return e?.[z]?.[$] ?? e;
1653
1696
  }
1654
1697
  function getOverrideValue(e, t, n, r, i) {
1655
1698
  if (i && r in i) return i[r];
@@ -1660,135 +1703,135 @@ function getAllKeys(e, t, n) {
1660
1703
  const i = Object.keys(n);
1661
1704
  return Array.from(new Set([...r, ...i]));
1662
1705
  }
1663
- function applyState(e, t, n, r) {
1664
- const i = t?.[z];
1665
- if (!i) return;
1666
- const s = i[Y];
1667
- const o = i[Z];
1668
- const u = i[$];
1669
- let f = i[ee];
1670
- if (e === s && !o && !u) return;
1671
- (i[re] || oe).set(e, i[U]);
1672
- i[Y] = e;
1673
- i[Z] = undefined;
1674
- if (Array.isArray(s)) {
1706
+ function applyState(e, t, n) {
1707
+ const r = t?.[z];
1708
+ if (!r) return;
1709
+ const i = r[X];
1710
+ const s = r[Y];
1711
+ const o = r[Z];
1712
+ let u = r[$];
1713
+ if (e === i && !s && !o) return;
1714
+ (r[ne] || se).set(e, r[U]);
1715
+ r[X] = e;
1716
+ r[Y] = undefined;
1717
+ if (Array.isArray(i)) {
1675
1718
  let t = false;
1676
- const l = getOverrideValue(s, o, f, "length", u);
1677
- if (e.length && l && e[0] && n(e[0]) != null) {
1678
- let c, a, d, p, h, y, g, S;
1719
+ const f = getOverrideValue(i, s, u, "length", o);
1720
+ if (e.length && f && e[0] && n(e[0]) != null) {
1721
+ let c, l, a, d, p, h, y, g;
1679
1722
  for (
1680
- d = 0, p = Math.min(l, e.length);
1681
- d < p &&
1682
- ((y = getOverrideValue(s, o, f, d, u)) === e[d] || (y && e[d] && n(y) === n(e[d])));
1683
- d++
1723
+ a = 0, d = Math.min(f, e.length);
1724
+ a < d &&
1725
+ ((h = getOverrideValue(i, s, u, a, o)) === e[a] || (h && e[a] && n(h) === n(e[a])));
1726
+ a++
1684
1727
  ) {
1685
- applyState(e[d], wrap(y, i), n, r);
1728
+ applyState(e[a], wrap(h, r), n);
1686
1729
  }
1687
- const w = new Array(e.length),
1688
- m = new Map();
1730
+ const S = new Array(e.length),
1731
+ w = new Map();
1689
1732
  for (
1690
- p = l - 1, h = e.length - 1;
1691
- p >= d &&
1692
- h >= d &&
1693
- ((y = getOverrideValue(s, o, f, p, u)) === e[h] || (y && e[h] && n(y) === n(e[h])));
1694
- p--, h--
1733
+ d = f - 1, p = e.length - 1;
1734
+ d >= a &&
1735
+ p >= a &&
1736
+ ((h = getOverrideValue(i, s, u, d, o)) === e[p] || (h && e[p] && n(h) === n(e[p])));
1737
+ d--, p--
1695
1738
  ) {
1696
- w[h] = y;
1739
+ S[p] = h;
1697
1740
  }
1698
- if (d > h || d > p) {
1699
- for (a = d; a <= h; a++) {
1741
+ if (a > p || a > d) {
1742
+ for (l = a; l <= p; l++) {
1700
1743
  t = true;
1701
- i[ee][a] && setSignal(i[ee][a], wrap(e[a], i));
1744
+ r[$][l] && setSignal(r[$][l], wrap(e[l], r));
1702
1745
  }
1703
- for (; a < e.length; a++) {
1746
+ for (; l < e.length; l++) {
1704
1747
  t = true;
1705
- const s = wrap(w[a], i);
1706
- i[ee][a] && setSignal(i[ee][a], s);
1707
- applyState(e[a], s, n, r);
1748
+ const i = wrap(S[l], r);
1749
+ r[$][l] && setSignal(r[$][l], i);
1750
+ applyState(e[l], i, n);
1708
1751
  }
1709
- t && i[ee][G] && setSignal(i[ee][G], void 0);
1710
- l !== e.length && i[ee].length && setSignal(i[ee].length, e.length);
1752
+ t && r[$][K] && setSignal(r[$][K], void 0);
1753
+ f !== e.length && r[$].length && setSignal(r[$].length, e.length);
1711
1754
  return;
1712
1755
  }
1713
- g = new Array(h + 1);
1714
- for (a = h; a >= d; a--) {
1715
- y = e[a];
1716
- S = y ? n(y) : y;
1717
- c = m.get(S);
1718
- g[a] = c === undefined ? -1 : c;
1719
- m.set(S, a);
1720
- }
1721
- for (c = d; c <= p; c++) {
1722
- y = getOverrideValue(s, o, f, c, u);
1723
- S = y ? n(y) : y;
1724
- a = m.get(S);
1725
- if (a !== undefined && a !== -1) {
1726
- w[a] = y;
1727
- a = g[a];
1728
- m.set(S, a);
1756
+ y = new Array(p + 1);
1757
+ for (l = p; l >= a; l--) {
1758
+ h = e[l];
1759
+ g = h ? n(h) : h;
1760
+ c = w.get(g);
1761
+ y[l] = c === undefined ? -1 : c;
1762
+ w.set(g, l);
1763
+ }
1764
+ for (c = a; c <= d; c++) {
1765
+ h = getOverrideValue(i, s, u, c, o);
1766
+ g = h ? n(h) : h;
1767
+ l = w.get(g);
1768
+ if (l !== undefined && l !== -1) {
1769
+ S[l] = h;
1770
+ l = y[l];
1771
+ w.set(g, l);
1729
1772
  }
1730
1773
  }
1731
- for (a = d; a < e.length; a++) {
1732
- if (a in w) {
1733
- const t = wrap(w[a], i);
1734
- i[ee][a] && setSignal(i[ee][a], t);
1735
- applyState(e[a], t, n, r);
1736
- } else i[ee][a] && setSignal(i[ee][a], wrap(e[a], i));
1774
+ for (l = a; l < e.length; l++) {
1775
+ if (l in S) {
1776
+ const t = wrap(S[l], r);
1777
+ r[$][l] && setSignal(r[$][l], t);
1778
+ applyState(e[l], t, n);
1779
+ } else r[$][l] && setSignal(r[$][l], wrap(e[l], r));
1737
1780
  }
1738
- if (d < e.length) t = true;
1781
+ if (a < e.length) t = true;
1739
1782
  } else if (e.length) {
1740
- for (let t = 0, l = e.length; t < l; t++) {
1741
- const l = getOverrideValue(s, o, f, t, u);
1742
- isWrappable(l) ? applyState(e[t], wrap(l, i), n, r) : i[ee][t] && setSignal(i[ee][t], e[t]);
1783
+ for (let t = 0, f = e.length; t < f; t++) {
1784
+ const f = getOverrideValue(i, s, u, t, o);
1785
+ isWrappable(f) ? applyState(e[t], wrap(f, r), n) : r[$][t] && setSignal(r[$][t], e[t]);
1743
1786
  }
1744
1787
  }
1745
- if (l !== e.length) {
1788
+ if (f !== e.length) {
1746
1789
  t = true;
1747
- i[ee].length && setSignal(i[ee].length, e.length);
1790
+ r[$].length && setSignal(r[$].length, e.length);
1748
1791
  }
1749
- t && i[ee][G] && setSignal(i[ee][G], void 0);
1792
+ t && r[$][K] && setSignal(r[$][K], void 0);
1750
1793
  return;
1751
1794
  }
1752
- if (f) {
1753
- const t = f[G];
1754
- const l = t || r ? getAllKeys(s, o, e) : Object.keys(f);
1755
- for (let c = 0, a = l.length; c < a; c++) {
1756
- const a = l[c];
1757
- const d = f[a];
1758
- const p = unwrap(getOverrideValue(s, o, f, a, u));
1759
- let h = unwrap(e[a]);
1760
- if (p === h) continue;
1761
- if (!p || !isWrappable(p) || !isWrappable(h) || (n(p) != null && n(p) !== n(h))) {
1795
+ if (u) {
1796
+ const t = u[K];
1797
+ const f = t ? getAllKeys(i, s, e) : Object.keys(u);
1798
+ for (let c = 0, l = f.length; c < l; c++) {
1799
+ const l = f[c];
1800
+ const a = u[l];
1801
+ const d = unwrap(getOverrideValue(i, s, u, l, o));
1802
+ let p = unwrap(e[l]);
1803
+ if (d === p) continue;
1804
+ if (!d || !isWrappable(d) || !isWrappable(p) || (n(d) != null && n(d) !== n(p))) {
1762
1805
  t && setSignal(t, void 0);
1763
- d && setSignal(d, isWrappable(h) ? wrap(h, i) : h);
1764
- } else applyState(h, wrap(p, i), n, r);
1806
+ a && setSignal(a, isWrappable(p) ? wrap(p, r) : p);
1807
+ } else applyState(p, wrap(d, r), n);
1765
1808
  }
1766
1809
  }
1767
- if ((f = i[te])) {
1768
- const t = Object.keys(f);
1810
+ if ((u = r[ee])) {
1811
+ const t = Object.keys(u);
1769
1812
  for (let n = 0, r = t.length; n < r; n++) {
1770
1813
  const r = t[n];
1771
- setSignal(f[r], r in e);
1814
+ setSignal(u[r], r in e);
1772
1815
  }
1773
1816
  }
1774
1817
  }
1775
- function reconcile(e, t, n = false) {
1776
- return r => {
1777
- if (r == null) throw new Error("Cannot reconcile null or undefined state");
1778
- const i = typeof t === "string" ? e => e[t] : t;
1779
- const s = i(r);
1780
- if (s !== undefined && i(e) !== i(r))
1818
+ function reconcile(e, t) {
1819
+ return n => {
1820
+ if (n == null) throw new Error("Cannot reconcile null or undefined state");
1821
+ const r = typeof t === "string" ? e => e[t] : t;
1822
+ const i = r(n);
1823
+ if (i !== undefined && r(e) !== r(n))
1781
1824
  throw new Error("Cannot reconcile states with different identity");
1782
- applyState(e, r, i, n);
1825
+ applyState(e, n, r);
1783
1826
  };
1784
1827
  }
1785
1828
  function createProjectionInternal(e, t = {}, n) {
1786
1829
  let r;
1787
1830
  const i = new WeakMap();
1788
1831
  const wrapper = e => {
1789
- e[ne] = wrapProjection;
1790
- e[re] = i;
1791
- Object.defineProperty(e, ie, {
1832
+ e[te] = wrapProjection;
1833
+ e[ne] = i;
1834
+ Object.defineProperty(e, re, {
1792
1835
  get() {
1793
1836
  return r;
1794
1837
  },
@@ -1797,28 +1840,28 @@ function createProjectionInternal(e, t = {}, n) {
1797
1840
  };
1798
1841
  const wrapProjection = e => {
1799
1842
  if (i.has(e)) return i.get(e);
1800
- if (e[z]?.[ne] === wrapProjection) return e;
1801
- const t = createStoreProxy(e, le, wrapper);
1843
+ if (e[z]?.[te] === wrapProjection) return e;
1844
+ const t = createStoreProxy(e, fe, wrapper);
1802
1845
  i.set(e, t);
1803
1846
  return t;
1804
1847
  };
1805
1848
  const s = wrapProjection(t);
1806
1849
  r = computed(() => {
1807
1850
  const t = getOwner();
1808
- storeSetter(new Proxy(s, B), r => {
1851
+ storeSetter(new Proxy(s, G), r => {
1809
1852
  const i = handleAsync(t, e(r), e => {
1810
- e !== r && e !== undefined && storeSetter(s, reconcile(e, n?.key || "id", n?.all));
1853
+ e !== r && e !== undefined && storeSetter(s, reconcile(e, n?.key || "id"));
1811
1854
  });
1812
- i !== r && i !== undefined && reconcile(i, n?.key || "id", n?.all)(s);
1855
+ i !== r && i !== undefined && reconcile(i, n?.key || "id")(s);
1813
1856
  });
1814
1857
  });
1815
- r.Ae = true;
1858
+ r.ve = true;
1816
1859
  return { store: s, node: r };
1817
1860
  }
1818
1861
  function createProjection(e, t = {}, n) {
1819
1862
  return createProjectionInternal(e, t, n).store;
1820
1863
  }
1821
- const B = {
1864
+ const G = {
1822
1865
  get(e, t) {
1823
1866
  let n;
1824
1867
  setWriteOverride(true);
@@ -1829,7 +1872,7 @@ const B = {
1829
1872
  setWriteOverride(false);
1830
1873
  setProjectionWriteActive(false);
1831
1874
  }
1832
- return typeof n === "object" && n !== null ? new Proxy(n, B) : n;
1875
+ return typeof n === "object" && n !== null ? new Proxy(n, G) : n;
1833
1876
  },
1834
1877
  set(e, t, n) {
1835
1878
  setWriteOverride(true);
@@ -1854,22 +1897,20 @@ const B = {
1854
1897
  return true;
1855
1898
  }
1856
1899
  };
1857
- const G = Symbol(0),
1858
- K = Symbol(0),
1900
+ const K = Symbol(0),
1859
1901
  z = Symbol(0),
1860
1902
  U = Symbol(0),
1861
1903
  J = Symbol(0);
1862
- const X = new WeakMap();
1863
- const Y = "v",
1864
- Z = "o",
1865
- $ = "x",
1866
- ee = "n",
1867
- te = "h",
1868
- ne = "w",
1869
- re = "l",
1870
- ie = "f",
1871
- se = "p";
1872
- function createStoreProxy(e, t = le, n) {
1904
+ const X = "v",
1905
+ Y = "o",
1906
+ Z = "x",
1907
+ $ = "n",
1908
+ ee = "h",
1909
+ te = "w",
1910
+ ne = "l",
1911
+ re = "f",
1912
+ ie = "p";
1913
+ function createStoreProxy(e, t = fe, n) {
1873
1914
  let r;
1874
1915
  if (Array.isArray(e)) {
1875
1916
  r = [];
@@ -1878,22 +1919,22 @@ function createStoreProxy(e, t = le, n) {
1878
1919
  n && n(r);
1879
1920
  return (r[U] = new Proxy(r, t));
1880
1921
  }
1881
- const oe = new WeakMap();
1922
+ const se = new WeakMap();
1882
1923
  function wrap(e, t) {
1883
- if (t?.[ne]) return t[ne](e, t);
1884
- let n = e[U] || oe.get(e);
1885
- if (!n) oe.set(e, (n = createStoreProxy(e)));
1924
+ if (t?.[te]) return t[te](e, t);
1925
+ let n = e[U] || se.get(e);
1926
+ if (!n) se.set(e, (n = createStoreProxy(e)));
1886
1927
  return n;
1887
1928
  }
1888
1929
  function isWrappable(e) {
1889
1930
  return e != null && typeof e === "object" && !Object.isFrozen(e);
1890
1931
  }
1891
- let ue = false;
1932
+ let oe = false;
1892
1933
  function setWriteOverride(e) {
1893
- ue = e;
1934
+ oe = e;
1894
1935
  }
1895
1936
  function writeOnly(e) {
1896
- return ue || !!fe?.has(e);
1937
+ return oe || !!ue?.has(e);
1897
1938
  }
1898
1939
  function getNodes(e, t) {
1899
1940
  let n = e[t];
@@ -1912,16 +1953,18 @@ function getNode(e, t, n, r, i = isEqual, s, o) {
1912
1953
  },
1913
1954
  r
1914
1955
  );
1915
- if (s) u.we = true;
1956
+ if (s) {
1957
+ u.pe = S;
1958
+ }
1916
1959
  if (o && t in o) {
1917
1960
  const e = o[t];
1918
1961
  u.ie = e === undefined ? w : e;
1919
- D?.add(u);
1962
+ B?.add(u);
1920
1963
  }
1921
1964
  return (e[t] = u);
1922
1965
  }
1923
- function trackSelf(e, t = G) {
1924
- getObserver() && read(getNode(getNodes(e, ee), t, undefined, e[ie], false, e[se]));
1966
+ function trackSelf(e, t = K) {
1967
+ getObserver() && read(getNode(getNodes(e, $), t, undefined, e[re], false, e[ie]));
1925
1968
  }
1926
1969
  function getKeys(e, t, n = true) {
1927
1970
  const r = untrack(() => (n ? Object.keys(e) : Reflect.ownKeys(e)));
@@ -1942,139 +1985,137 @@ function getPropertyDescriptor(e, t, n) {
1942
1985
  }
1943
1986
  return Reflect.getOwnPropertyDescriptor(r, n);
1944
1987
  }
1945
- let fe = null;
1946
- const le = {
1988
+ let ue = null;
1989
+ const fe = {
1947
1990
  get(e, t, n) {
1948
1991
  if (t === z) return e;
1949
1992
  if (t === U) return n;
1950
- if (t === O) return e[ie];
1951
- if (t === G || t === K) {
1952
- trackSelf(e, t);
1993
+ if (t === O) return e[re];
1994
+ if (t === K) {
1995
+ trackSelf(e);
1953
1996
  return n;
1954
1997
  }
1955
- const r = getNodes(e, ee);
1998
+ const r = getNodes(e, $);
1956
1999
  const i = r[t];
1957
- const s = e[$] && t in e[$];
1958
- const o = s || (e[Z] && t in e[Z]);
1959
- const u = !!e[Y][z];
1960
- const f = s ? e[$] : e[Z] && t in e[Z] ? e[Z] : e[Y];
2000
+ const s = e[Z] && t in e[Z];
2001
+ const o = s || (e[Y] && t in e[Y]);
2002
+ const u = !!e[X][z];
2003
+ const f = s ? e[Z] : e[Y] && t in e[Y] ? e[Y] : e[X];
1961
2004
  if (!i) {
1962
2005
  const e = Object.getOwnPropertyDescriptor(f, t);
1963
2006
  if (e && e.get) return e.get.call(n);
1964
2007
  }
1965
2008
  if (writeOnly(n)) {
1966
- let n = i && (o || !u) ? (i.ce !== S ? (i.we ? i.ae : i.ce) : i.ae) : f[t];
2009
+ let n =
2010
+ i && (o || !u)
2011
+ ? i.pe !== undefined && i.pe !== S
2012
+ ? i.pe
2013
+ : i.le !== S
2014
+ ? i.le
2015
+ : i.ae
2016
+ : f[t];
1967
2017
  n === J && (n = undefined);
1968
2018
  if (!isWrappable(n)) return n;
1969
2019
  const r = wrap(n, e);
1970
- fe?.add(r);
2020
+ ue?.add(r);
1971
2021
  return r;
1972
2022
  }
1973
- let l = i ? (o || !u ? read(r[t]) : (read(r[t]), f[t])) : f[t];
1974
- l === J && (l = undefined);
2023
+ let c = i ? (o || !u ? read(r[t]) : (read(r[t]), f[t])) : f[t];
2024
+ c === J && (c = undefined);
1975
2025
  if (!i) {
1976
- if (!o && typeof l === "function" && !f.hasOwnProperty(t)) {
2026
+ if (!o && typeof c === "function" && !f.hasOwnProperty(t)) {
1977
2027
  let t;
1978
- return !Array.isArray(e[Y]) && (t = Object.getPrototypeOf(e[Y])) && t !== Object.prototype
1979
- ? l.bind(f)
1980
- : l;
2028
+ return !Array.isArray(e[X]) && (t = Object.getPrototypeOf(e[X])) && t !== Object.prototype
2029
+ ? c.bind(f)
2030
+ : c;
1981
2031
  } else if (getObserver()) {
1982
- return read(getNode(r, t, isWrappable(l) ? wrap(l, e) : l, e[ie], isEqual, e[se], e[m]));
2032
+ return read(getNode(r, t, isWrappable(c) ? wrap(c, e) : c, e[re], isEqual, e[ie], e[m]));
1983
2033
  }
1984
2034
  }
1985
- return isWrappable(l) ? wrap(l, e) : l;
2035
+ return isWrappable(c) ? wrap(c, e) : c;
1986
2036
  },
1987
2037
  has(e, t) {
1988
- if (t === U || t === G || t === "__proto__") return true;
1989
- const n = e[$] && t in e[$] ? e[$][t] !== J : e[Z] && t in e[Z] ? e[Z][t] !== J : t in e[Y];
1990
- getObserver() && read(getNode(getNodes(e, te), t, n, e[ie], isEqual, e[se]));
2038
+ if (t === U || t === K || t === "__proto__") return true;
2039
+ const n = e[Z] && t in e[Z] ? e[Z][t] !== J : e[Y] && t in e[Y] ? e[Y][t] !== J : t in e[X];
2040
+ getObserver() && read(getNode(getNodes(e, ee), t, n, e[re], isEqual, e[ie]));
1991
2041
  return n;
1992
2042
  },
1993
2043
  set(e, t, n) {
1994
2044
  const r = e[U];
1995
2045
  if (writeOnly(r)) {
1996
- if (e[se]) {
1997
- const t = e[ie];
2046
+ if (e[ie]) {
2047
+ const t = e[re];
1998
2048
  if (t?.ne) {
1999
- j.initTransition(t.ne);
2049
+ A.initTransition(t.ne);
2000
2050
  }
2001
2051
  }
2002
2052
  untrack(() => {
2003
- const i = e[Y];
2053
+ const i = e[X];
2004
2054
  const s = i[t];
2005
- if (V && typeof t !== "symbol") {
2055
+ if (D && typeof t !== "symbol" && !((e[re]?.de ?? 0) & a)) {
2006
2056
  if (!e[m]) {
2007
2057
  e[m] = Object.create(null);
2008
- D?.add(e);
2058
+ B?.add(e);
2009
2059
  }
2010
2060
  if (!(t in e[m])) {
2011
2061
  e[m][t] = s;
2012
2062
  }
2013
2063
  }
2014
- const o = e[se] && !E;
2015
- const u = o ? $ : Z;
2064
+ const o = e[ie] && !j;
2065
+ const u = o ? Z : Y;
2016
2066
  if (o) trackOptimisticStore(r);
2017
- const f = e[$] && t in e[$] ? e[$][t] : e[Z] && t in e[Z] ? e[Z][t] : s;
2018
- const l = n?.[z]?.[Y] ?? n;
2019
- if (f === l) return true;
2020
- const c = e[$]?.length || e[Z]?.length || i.length;
2021
- if (l !== undefined && l === s) delete e[u][t];
2022
- else (e[u] || (e[u] = Object.create(null)))[t] = l;
2023
- const a = isWrappable(l);
2024
- if (isWrappable(f)) {
2025
- const e = X.get(f);
2026
- e && (e instanceof Set ? e.delete(r) : X.delete(f));
2027
- }
2028
- if (recursivelyNotify(r, oe) && a) recursivelyAddParent(l, r);
2029
- e[te]?.[t] && setSignal(e[te][t], true);
2030
- const d = getNodes(e, ee);
2031
- d[t] && setSignal(d[t], () => (a ? wrap(l, e) : l));
2067
+ const f = e[Z] && t in e[Z] ? e[Z][t] : e[Y] && t in e[Y] ? e[Y][t] : s;
2068
+ const c = n?.[z]?.[X] ?? n;
2069
+ if (f === c) return true;
2070
+ const l = e[Z]?.length || e[Y]?.length || i.length;
2071
+ if (c !== undefined && c === s) delete e[u][t];
2072
+ else (e[u] || (e[u] = Object.create(null)))[t] = c;
2073
+ const d = isWrappable(c);
2074
+ e[ee]?.[t] && setSignal(e[ee][t], true);
2075
+ const p = getNodes(e, $);
2076
+ p[t] && setSignal(p[t], () => (d ? wrap(c, e) : c));
2032
2077
  if (Array.isArray(i)) {
2033
2078
  if (t === "length") {
2034
- d.length && setSignal(d.length, l);
2079
+ p.length && setSignal(p.length, c);
2035
2080
  } else {
2036
2081
  const e = parseInt(t) + 1;
2037
- if (e > c) d.length && setSignal(d.length, e);
2082
+ if (e > l) p.length && setSignal(p.length, e);
2038
2083
  }
2039
2084
  }
2040
- d[G] && setSignal(d[G], undefined);
2085
+ p[K] && setSignal(p[K], undefined);
2041
2086
  });
2042
2087
  }
2043
2088
  return true;
2044
2089
  },
2045
2090
  deleteProperty(e, t) {
2046
- const n = e[$]?.[t] === J;
2047
- const r = e[Z]?.[t] === J;
2091
+ const n = e[Z]?.[t] === J;
2092
+ const r = e[Y]?.[t] === J;
2048
2093
  if (writeOnly(e[U]) && !n && !r) {
2049
2094
  untrack(() => {
2050
- const n = e[se] && !E;
2051
- const r = n ? $ : Z;
2095
+ const n = e[ie] && !j;
2096
+ const r = n ? Z : Y;
2052
2097
  if (n) trackOptimisticStore(e[U]);
2053
- const i = e[$] && t in e[$] ? e[$][t] : e[Z] && t in e[Z] ? e[Z][t] : e[Y][t];
2054
- if (t in e[Y] || (e[Z] && t in e[Z])) {
2098
+ const i = e[Z] && t in e[Z] ? e[Z][t] : e[Y] && t in e[Y] ? e[Y][t] : e[X][t];
2099
+ if (t in e[X] || (e[Y] && t in e[Y])) {
2055
2100
  (e[r] || (e[r] = Object.create(null)))[t] = J;
2056
2101
  } else if (e[r] && t in e[r]) {
2057
2102
  delete e[r][t];
2058
2103
  } else return true;
2059
- if (isWrappable(i)) {
2060
- const t = X.get(i);
2061
- t && (t instanceof Set ? t.delete(e) : X.delete(i));
2062
- }
2063
- if (e[te]?.[t]) setSignal(e[te][t], false);
2064
- const s = getNodes(e, ee);
2104
+ if (e[ee]?.[t]) setSignal(e[ee][t], false);
2105
+ const s = getNodes(e, $);
2065
2106
  s[t] && setSignal(s[t], undefined);
2066
- s[G] && setSignal(s[G], undefined);
2107
+ s[K] && setSignal(s[K], undefined);
2067
2108
  });
2068
2109
  }
2069
2110
  return true;
2070
2111
  },
2071
2112
  ownKeys(e) {
2072
2113
  trackSelf(e);
2073
- let t = getKeys(e[Y], e[Z], false);
2074
- if (e[$]) {
2114
+ let t = getKeys(e[X], e[Y], false);
2115
+ if (e[Z]) {
2075
2116
  const n = new Set(t);
2076
- for (const t of Reflect.ownKeys(e[$])) {
2077
- if (e[$][t] !== J) n.add(t);
2117
+ for (const t of Reflect.ownKeys(e[Z])) {
2118
+ if (e[Z][t] !== J) n.add(t);
2078
2119
  else n.delete(t);
2079
2120
  }
2080
2121
  t = Array.from(n);
@@ -2083,24 +2124,24 @@ const le = {
2083
2124
  },
2084
2125
  getOwnPropertyDescriptor(e, t) {
2085
2126
  if (t === U) return { value: e[U], writable: true, configurable: true };
2086
- if (e[$] && t in e[$]) {
2087
- if (e[$][t] === J) return undefined;
2088
- const n = getPropertyDescriptor(e[Y], e[Z], t);
2127
+ if (e[Z] && t in e[Z]) {
2128
+ if (e[Z][t] === J) return undefined;
2129
+ const n = getPropertyDescriptor(e[X], e[Y], t);
2089
2130
  if (n) {
2090
- return { ...n, value: e[$][t] };
2131
+ return { ...n, value: e[Z][t] };
2091
2132
  }
2092
- return { value: e[$][t], writable: true, enumerable: true, configurable: true };
2133
+ return { value: e[Z][t], writable: true, enumerable: true, configurable: true };
2093
2134
  }
2094
- return getPropertyDescriptor(e[Y], e[Z], t);
2135
+ return getPropertyDescriptor(e[X], e[Y], t);
2095
2136
  },
2096
2137
  getPrototypeOf(e) {
2097
- return Object.getPrototypeOf(e[Y]);
2138
+ return Object.getPrototypeOf(e[X]);
2098
2139
  }
2099
2140
  };
2100
2141
  function storeSetter(e, t) {
2101
- const n = fe;
2102
- fe = new Set();
2103
- fe.add(e);
2142
+ const n = ue;
2143
+ ue = new Set();
2144
+ ue.add(e);
2104
2145
  try {
2105
2146
  const n = t(e);
2106
2147
  if (n !== e && n !== undefined) {
@@ -2116,8 +2157,8 @@ function storeSetter(e, t) {
2116
2157
  }
2117
2158
  }
2118
2159
  } finally {
2119
- fe.clear();
2120
- fe = n;
2160
+ ue.clear();
2161
+ ue = n;
2121
2162
  }
2122
2163
  }
2123
2164
  function createStore(e, t, n) {
@@ -2125,59 +2166,6 @@ function createStore(e, t, n) {
2125
2166
  i = r ? createProjectionInternal(e, t, n).store : wrap(e);
2126
2167
  return [i, e => storeSetter(i, e)];
2127
2168
  }
2128
- function recursivelyNotify(e, t) {
2129
- let n = e[z] || t?.get(e)?.[z];
2130
- let r = false;
2131
- if (n) {
2132
- const e = getNodes(n, ee)[K];
2133
- if (e) {
2134
- setSignal(e, undefined);
2135
- r = true;
2136
- }
2137
- t = n[re] || t;
2138
- }
2139
- const i = X.get(n?.[Y] || e);
2140
- if (!i) return r;
2141
- if (i instanceof Set) {
2142
- for (let e of i) r = recursivelyNotify(e, t) || r;
2143
- } else r = recursivelyNotify(i, t) || r;
2144
- return r;
2145
- }
2146
- function recursivelyAddParent(e, t) {
2147
- let n;
2148
- const r = e[z];
2149
- if (r) {
2150
- n = r[Z];
2151
- e = r[Y];
2152
- }
2153
- if (t) {
2154
- let n = X.get(e);
2155
- if (!n) X.set(e, t);
2156
- else if (n !== t) {
2157
- if (!(n instanceof Set)) X.set(e, (n = new Set([n])));
2158
- else if (n.has(t)) return;
2159
- n.add(t);
2160
- } else return;
2161
- }
2162
- if (Array.isArray(e)) {
2163
- const t = n?.length || e.length;
2164
- for (let r = 0; r < t; r++) {
2165
- const t = n && r in n ? n[r] : e[r];
2166
- isWrappable(t) && recursivelyAddParent(t, e);
2167
- }
2168
- } else {
2169
- const t = getKeys(e, n);
2170
- for (let r = 0; r < t.length; r++) {
2171
- const i = t[r];
2172
- const s = n && i in n ? n[i] : e[i];
2173
- isWrappable(s) && recursivelyAddParent(s, e);
2174
- }
2175
- }
2176
- }
2177
- function deep(e) {
2178
- recursivelyAddParent(e);
2179
- return e[K];
2180
- }
2181
2169
  function createOptimisticStore(e, t, n) {
2182
2170
  GlobalQueue.J ||= clearOptimisticStore;
2183
2171
  const r = typeof e === "function";
@@ -2188,38 +2176,38 @@ function createOptimisticStore(e, t, n) {
2188
2176
  }
2189
2177
  function clearOptimisticStore(e) {
2190
2178
  const t = e[z];
2191
- if (!t || !t[$]) return;
2192
- const n = t[$];
2193
- const r = t[ee];
2179
+ if (!t || !t[Z]) return;
2180
+ const n = t[Z];
2181
+ const r = t[$];
2194
2182
  setProjectionWriteActive(true);
2195
2183
  try {
2196
2184
  if (r) {
2197
2185
  for (const e of Reflect.ownKeys(n)) {
2198
2186
  if (r[e]) {
2199
2187
  r[e].re = undefined;
2200
- const n = t[Z] && e in t[Z] ? t[Z][e] : t[Y][e];
2188
+ const n = t[Y] && e in t[Y] ? t[Y][e] : t[X][e];
2201
2189
  const i = n === J ? undefined : n;
2202
2190
  setSignal(r[e], isWrappable(i) ? wrap(i, t) : i);
2203
2191
  }
2204
2192
  }
2205
- if (r[G]) {
2206
- r[G].re = undefined;
2207
- setSignal(r[G], undefined);
2193
+ if (r[K]) {
2194
+ r[K].re = undefined;
2195
+ setSignal(r[K], undefined);
2208
2196
  }
2209
2197
  }
2210
2198
  } finally {
2211
2199
  setProjectionWriteActive(false);
2212
2200
  }
2213
- delete t[$];
2201
+ delete t[Z];
2214
2202
  }
2215
2203
  function createOptimisticProjectionInternal(e, t = {}, n) {
2216
2204
  let r;
2217
2205
  const i = new WeakMap();
2218
2206
  const wrapper = e => {
2219
- e[ne] = wrapProjection;
2220
- e[re] = i;
2221
- e[se] = true;
2222
- Object.defineProperty(e, ie, {
2207
+ e[te] = wrapProjection;
2208
+ e[ne] = i;
2209
+ e[ie] = true;
2210
+ Object.defineProperty(e, re, {
2223
2211
  get() {
2224
2212
  return r;
2225
2213
  },
@@ -2228,8 +2216,8 @@ function createOptimisticProjectionInternal(e, t = {}, n) {
2228
2216
  };
2229
2217
  const wrapProjection = e => {
2230
2218
  if (i.has(e)) return i.get(e);
2231
- if (e[z]?.[ne] === wrapProjection) return e;
2232
- const t = createStoreProxy(e, le, wrapper);
2219
+ if (e[z]?.[te] === wrapProjection) return e;
2220
+ const t = createStoreProxy(e, fe, wrapper);
2233
2221
  i.set(e, t);
2234
2222
  return t;
2235
2223
  };
@@ -2239,22 +2227,22 @@ function createOptimisticProjectionInternal(e, t = {}, n) {
2239
2227
  const t = getOwner();
2240
2228
  setProjectionWriteActive(true);
2241
2229
  try {
2242
- storeSetter(new Proxy(s, B), r => {
2230
+ storeSetter(new Proxy(s, G), r => {
2243
2231
  const i = handleAsync(t, e(r), e => {
2244
2232
  setProjectionWriteActive(true);
2245
2233
  try {
2246
- e !== r && e !== undefined && storeSetter(s, reconcile(e, n?.key || "id", n?.all));
2234
+ e !== r && e !== undefined && storeSetter(s, reconcile(e, n?.key || "id"));
2247
2235
  } finally {
2248
2236
  setProjectionWriteActive(false);
2249
2237
  }
2250
2238
  });
2251
- i !== r && i !== undefined && reconcile(i, n?.key || "id", n?.all)(s);
2239
+ i !== r && i !== undefined && reconcile(i, n?.key || "id")(s);
2252
2240
  });
2253
2241
  } finally {
2254
2242
  setProjectionWriteActive(false);
2255
2243
  }
2256
2244
  });
2257
- r.Ae = true;
2245
+ r.ve = true;
2258
2246
  }
2259
2247
  return { store: s, node: r };
2260
2248
  }
@@ -2312,7 +2300,7 @@ function updatePath(e, t, n = 0) {
2312
2300
  e[r] = s;
2313
2301
  }
2314
2302
  }
2315
- const ae = Object.assign(
2303
+ const le = Object.assign(
2316
2304
  function storePath(...e) {
2317
2305
  return t => {
2318
2306
  updatePath(t, e);
@@ -2320,53 +2308,62 @@ const ae = Object.assign(
2320
2308
  },
2321
2309
  { DELETE: ce }
2322
2310
  );
2323
- function snapshot(e, t, n) {
2324
- let r, i, s, o, u, f;
2311
+ function snapshotImpl(e, t, n, r) {
2312
+ let i, s, o, u, f, c;
2325
2313
  if (!isWrappable(e)) return e;
2326
- if (t && t.has(e)) return t.get(e);
2327
- if (!t) t = new Map();
2328
- if ((r = e[z] || n?.get(e)?.[z])) {
2329
- s = r[Z];
2330
- i = Array.isArray(r[Y]);
2331
- t.set(e, s ? (o = i ? [] : Object.create(Object.getPrototypeOf(r[Y]))) : r[Y]);
2332
- e = r[Y];
2333
- n = oe;
2314
+ if (n && n.has(e)) return n.get(e);
2315
+ if (!n) n = new Map();
2316
+ if ((i = e[z] || r?.get(e)?.[z])) {
2317
+ if (t) trackSelf(i, K);
2318
+ o = i[Y];
2319
+ s = Array.isArray(i[X]);
2320
+ n.set(e, o ? (u = s ? [] : Object.create(Object.getPrototypeOf(i[X]))) : i[X]);
2321
+ e = i[X];
2322
+ r = se;
2334
2323
  } else {
2335
- i = Array.isArray(e);
2336
- t.set(e, e);
2324
+ s = Array.isArray(e);
2325
+ n.set(e, e);
2337
2326
  }
2338
- if (i) {
2339
- const r = s?.length || e.length;
2340
- for (let i = 0; i < r; i++) {
2341
- f = s && i in s ? s[i] : e[i];
2342
- if (f === J) continue;
2343
- if ((u = snapshot(f, t, n)) !== f || o) {
2344
- if (!o) t.set(e, (o = [...e]));
2345
- o[i] = u;
2327
+ if (s) {
2328
+ const s = o?.length || e.length;
2329
+ for (let l = 0; l < s; l++) {
2330
+ c = o && l in o ? o[l] : e[l];
2331
+ if (c === J) continue;
2332
+ if (t && isWrappable(c)) wrap(c, i);
2333
+ if ((f = snapshotImpl(c, t, n, r)) !== c || u) {
2334
+ if (!u) n.set(e, (u = [...e]));
2335
+ u[l] = f;
2346
2336
  }
2347
2337
  }
2348
2338
  } else {
2349
- const r = getKeys(e, s);
2350
- for (let i = 0, l = r.length; i < l; i++) {
2351
- let l = r[i];
2352
- const c = getPropertyDescriptor(e, s, l);
2353
- if (c.get) continue;
2354
- f = s && l in s ? s[l] : e[l];
2355
- if ((u = snapshot(f, t, n)) !== e[l] || o) {
2356
- if (!o) {
2357
- o = Object.create(Object.getPrototypeOf(e));
2358
- Object.assign(o, e);
2339
+ const s = getKeys(e, o);
2340
+ for (let l = 0, a = s.length; l < a; l++) {
2341
+ let a = s[l];
2342
+ const d = getPropertyDescriptor(e, o, a);
2343
+ if (d.get) continue;
2344
+ c = o && a in o ? o[a] : e[a];
2345
+ if (t && isWrappable(c)) wrap(c, i);
2346
+ if ((f = snapshotImpl(c, t, n, r)) !== e[a] || u) {
2347
+ if (!u) {
2348
+ u = Object.create(Object.getPrototypeOf(e));
2349
+ Object.assign(u, e);
2359
2350
  }
2360
- o[l] = u;
2351
+ u[a] = f;
2361
2352
  }
2362
2353
  }
2363
2354
  }
2364
- return o || e;
2355
+ return u || e;
2356
+ }
2357
+ function snapshot(e, t, n) {
2358
+ return snapshotImpl(e, false, t, n);
2359
+ }
2360
+ function deep(e) {
2361
+ return snapshotImpl(e, true);
2365
2362
  }
2366
2363
  function trueFn() {
2367
2364
  return true;
2368
2365
  }
2369
- const de = {
2366
+ const ae = {
2370
2367
  get(e, t, n) {
2371
2368
  if (t === U) return n;
2372
2369
  return e.get(t);
@@ -2395,7 +2392,7 @@ const de = {
2395
2392
  function resolveSource(e) {
2396
2393
  return !(e = typeof e === "function" ? e() : e) ? {} : e;
2397
2394
  }
2398
- const pe = Symbol(0);
2395
+ const de = Symbol(0);
2399
2396
  function merge(...e) {
2400
2397
  if (e.length === 1 && typeof e[0] !== "function") return e[0];
2401
2398
  let t = false;
@@ -2403,7 +2400,7 @@ function merge(...e) {
2403
2400
  for (let r = 0; r < e.length; r++) {
2404
2401
  const i = e[r];
2405
2402
  t = t || (!!i && U in i);
2406
- const s = !!i && i[pe];
2403
+ const s = !!i && i[de];
2407
2404
  if (s) n.push(...s);
2408
2405
  else n.push(typeof i === "function" ? ((t = true), createMemo(i)) : i);
2409
2406
  }
@@ -2411,7 +2408,7 @@ function merge(...e) {
2411
2408
  return new Proxy(
2412
2409
  {
2413
2410
  get(e) {
2414
- if (e === pe) return n;
2411
+ if (e === de) return n;
2415
2412
  for (let t = n.length - 1; t >= 0; t--) {
2416
2413
  const r = resolveSource(n[t]);
2417
2414
  if (e in r) return r[e];
@@ -2429,7 +2426,7 @@ function merge(...e) {
2429
2426
  return [...new Set(e)];
2430
2427
  }
2431
2428
  },
2432
- de
2429
+ ae
2433
2430
  );
2434
2431
  }
2435
2432
  const r = Object.create(null);
@@ -2461,7 +2458,7 @@ function merge(...e) {
2461
2458
  if (n.get) Object.defineProperty(o, t, n);
2462
2459
  else o[t] = n.value;
2463
2460
  }
2464
- o[pe] = n;
2461
+ o[de] = n;
2465
2462
  return o;
2466
2463
  }
2467
2464
  function omit(e, ...t) {
@@ -2479,7 +2476,7 @@ function omit(e, ...t) {
2479
2476
  return Object.keys(e).filter(e => !n.has(e));
2480
2477
  }
2481
2478
  },
2482
- de
2479
+ ae
2483
2480
  );
2484
2481
  }
2485
2482
  const r = {};
@@ -2499,217 +2496,214 @@ function mapArray(e, t, n) {
2499
2496
  const s = t;
2500
2497
  return createMemo(
2501
2498
  updateKeyedMap.bind({
2502
- De: createOwner(),
2503
- Be: 0,
2504
- Ge: e,
2505
- Ke: [],
2506
- ze: s,
2499
+ Ve: createOwner(),
2500
+ De: 0,
2501
+ Be: e,
2502
+ Ge: [],
2503
+ Ke: s,
2504
+ ze: [],
2507
2505
  Ue: [],
2508
- Je: [],
2509
- Xe: r,
2510
- Ye: r || n?.keyed === false ? [] : undefined,
2511
- Ze: i ? [] : undefined,
2512
- $e: n?.fallback
2506
+ Je: r,
2507
+ Xe: r || n?.keyed === false ? [] : undefined,
2508
+ Ye: i ? [] : undefined,
2509
+ Ze: n?.fallback
2513
2510
  })
2514
2511
  );
2515
2512
  }
2516
- const he = { pureWrite: true };
2513
+ const pe = { pureWrite: true };
2517
2514
  function updateKeyedMap() {
2518
- const e = this.Ge() || [],
2515
+ const e = this.Be() || [],
2519
2516
  t = e.length;
2520
- e[G];
2521
- runWithOwner(this.De, () => {
2517
+ e[K];
2518
+ runWithOwner(this.Ve, () => {
2522
2519
  let n,
2523
2520
  r,
2524
- i = this.Ye
2521
+ i = this.Xe
2525
2522
  ? () => {
2526
- this.Ye[r] = signal(e[r], he);
2527
- this.Ze && (this.Ze[r] = signal(r, he));
2528
- return this.ze(
2529
- read.bind(null, this.Ye[r]),
2530
- this.Ze ? read.bind(null, this.Ze[r]) : undefined
2531
- );
2523
+ this.Xe[r] = signal(e[r], pe);
2524
+ this.Ye && (this.Ye[r] = signal(r, pe));
2525
+ return this.Ke(accessor(this.Xe[r]), this.Ye ? accessor(this.Ye[r]) : undefined);
2532
2526
  }
2533
- : this.Ze
2527
+ : this.Ye
2534
2528
  ? () => {
2535
2529
  const t = e[r];
2536
- this.Ze[r] = signal(r, he);
2537
- return this.ze(() => t, read.bind(null, this.Ze[r]));
2530
+ this.Ye[r] = signal(r, pe);
2531
+ return this.Ke(() => t, accessor(this.Ye[r]));
2538
2532
  }
2539
2533
  : () => {
2540
2534
  const t = e[r];
2541
- return this.ze(() => t);
2535
+ return this.Ke(() => t);
2542
2536
  };
2543
2537
  if (t === 0) {
2544
- if (this.Be !== 0) {
2545
- this.De.dispose(false);
2546
- this.Je = [];
2547
- this.Ke = [];
2538
+ if (this.De !== 0) {
2539
+ this.Ve.dispose(false);
2548
2540
  this.Ue = [];
2549
- this.Be = 0;
2541
+ this.Ge = [];
2542
+ this.ze = [];
2543
+ this.De = 0;
2544
+ this.Xe && (this.Xe = []);
2550
2545
  this.Ye && (this.Ye = []);
2551
- this.Ze && (this.Ze = []);
2552
2546
  }
2553
- if (this.$e && !this.Ue[0]) {
2554
- this.Ue[0] = runWithOwner((this.Je[0] = createOwner()), this.$e);
2547
+ if (this.Ze && !this.ze[0]) {
2548
+ this.ze[0] = runWithOwner((this.Ue[0] = createOwner()), this.Ze);
2555
2549
  }
2556
- } else if (this.Be === 0) {
2557
- if (this.Je[0]) this.Je[0].dispose();
2558
- this.Ue = new Array(t);
2550
+ } else if (this.De === 0) {
2551
+ if (this.Ue[0]) this.Ue[0].dispose();
2552
+ this.ze = new Array(t);
2559
2553
  for (r = 0; r < t; r++) {
2560
- this.Ke[r] = e[r];
2561
- this.Ue[r] = runWithOwner((this.Je[r] = createOwner()), i);
2554
+ this.Ge[r] = e[r];
2555
+ this.ze[r] = runWithOwner((this.Ue[r] = createOwner()), i);
2562
2556
  }
2563
- this.Be = t;
2557
+ this.De = t;
2564
2558
  } else {
2565
2559
  let s,
2566
2560
  o,
2567
2561
  u,
2568
2562
  f,
2569
- l,
2570
2563
  c,
2564
+ l,
2571
2565
  a,
2572
2566
  d = new Array(t),
2573
2567
  p = new Array(t),
2574
- h = this.Ye ? new Array(t) : undefined,
2575
- y = this.Ze ? new Array(t) : undefined;
2568
+ h = this.Xe ? new Array(t) : undefined,
2569
+ y = this.Ye ? new Array(t) : undefined;
2576
2570
  for (
2577
- s = 0, o = Math.min(this.Be, t);
2578
- s < o && (this.Ke[s] === e[s] || (this.Ye && compare(this.Xe, this.Ke[s], e[s])));
2571
+ s = 0, o = Math.min(this.De, t);
2572
+ s < o && (this.Ge[s] === e[s] || (this.Xe && compare(this.Je, this.Ge[s], e[s])));
2579
2573
  s++
2580
2574
  ) {
2581
- if (this.Ye) setSignal(this.Ye[s], e[s]);
2575
+ if (this.Xe) setSignal(this.Xe[s], e[s]);
2582
2576
  }
2583
2577
  for (
2584
- o = this.Be - 1, u = t - 1;
2578
+ o = this.De - 1, u = t - 1;
2585
2579
  o >= s &&
2586
2580
  u >= s &&
2587
- (this.Ke[o] === e[u] || (this.Ye && compare(this.Xe, this.Ke[o], e[u])));
2581
+ (this.Ge[o] === e[u] || (this.Xe && compare(this.Je, this.Ge[o], e[u])));
2588
2582
  o--, u--
2589
2583
  ) {
2590
- d[u] = this.Ue[o];
2591
- p[u] = this.Je[o];
2592
- h && (h[u] = this.Ye[o]);
2593
- y && (y[u] = this.Ze[o]);
2584
+ d[u] = this.ze[o];
2585
+ p[u] = this.Ue[o];
2586
+ h && (h[u] = this.Xe[o]);
2587
+ y && (y[u] = this.Ye[o]);
2594
2588
  }
2595
- c = new Map();
2589
+ l = new Map();
2596
2590
  a = new Array(u + 1);
2597
2591
  for (r = u; r >= s; r--) {
2598
2592
  f = e[r];
2599
- l = this.Xe ? this.Xe(f) : f;
2600
- n = c.get(l);
2593
+ c = this.Je ? this.Je(f) : f;
2594
+ n = l.get(c);
2601
2595
  a[r] = n === undefined ? -1 : n;
2602
- c.set(l, r);
2596
+ l.set(c, r);
2603
2597
  }
2604
2598
  for (n = s; n <= o; n++) {
2605
- f = this.Ke[n];
2606
- l = this.Xe ? this.Xe(f) : f;
2607
- r = c.get(l);
2599
+ f = this.Ge[n];
2600
+ c = this.Je ? this.Je(f) : f;
2601
+ r = l.get(c);
2608
2602
  if (r !== undefined && r !== -1) {
2609
- d[r] = this.Ue[n];
2610
- p[r] = this.Je[n];
2611
- h && (h[r] = this.Ye[n]);
2612
- y && (y[r] = this.Ze[n]);
2603
+ d[r] = this.ze[n];
2604
+ p[r] = this.Ue[n];
2605
+ h && (h[r] = this.Xe[n]);
2606
+ y && (y[r] = this.Ye[n]);
2613
2607
  r = a[r];
2614
- c.set(l, r);
2615
- } else this.Je[n].dispose();
2608
+ l.set(c, r);
2609
+ } else this.Ue[n].dispose();
2616
2610
  }
2617
2611
  for (r = s; r < t; r++) {
2618
2612
  if (r in d) {
2619
- this.Ue[r] = d[r];
2620
- this.Je[r] = p[r];
2613
+ this.ze[r] = d[r];
2614
+ this.Ue[r] = p[r];
2621
2615
  if (h) {
2622
- this.Ye[r] = h[r];
2623
- setSignal(this.Ye[r], e[r]);
2616
+ this.Xe[r] = h[r];
2617
+ setSignal(this.Xe[r], e[r]);
2624
2618
  }
2625
2619
  if (y) {
2626
- this.Ze[r] = y[r];
2627
- setSignal(this.Ze[r], r);
2620
+ this.Ye[r] = y[r];
2621
+ setSignal(this.Ye[r], r);
2628
2622
  }
2629
2623
  } else {
2630
- this.Ue[r] = runWithOwner((this.Je[r] = createOwner()), i);
2624
+ this.ze[r] = runWithOwner((this.Ue[r] = createOwner()), i);
2631
2625
  }
2632
2626
  }
2633
- this.Ue = this.Ue.slice(0, (this.Be = t));
2634
- this.Ke = e.slice(0);
2627
+ this.ze = this.ze.slice(0, (this.De = t));
2628
+ this.Ge = e.slice(0);
2635
2629
  }
2636
2630
  });
2637
- return this.Ue;
2631
+ return this.ze;
2638
2632
  }
2639
2633
  function repeat(e, t, n) {
2640
2634
  const r = t;
2641
2635
  return updateRepeat.bind({
2642
- De: createOwner(),
2643
- Be: 0,
2644
- et: 0,
2645
- tt: e,
2646
- ze: r,
2647
- Je: [],
2636
+ Ve: createOwner(),
2637
+ De: 0,
2638
+ $e: 0,
2639
+ et: e,
2640
+ Ke: r,
2648
2641
  Ue: [],
2649
- nt: n?.from,
2650
- $e: n?.fallback
2642
+ ze: [],
2643
+ tt: n?.from,
2644
+ Ze: n?.fallback
2651
2645
  });
2652
2646
  }
2653
2647
  function updateRepeat() {
2654
- const e = this.tt();
2655
- const t = this.nt?.() || 0;
2656
- runWithOwner(this.De, () => {
2648
+ const e = this.et();
2649
+ const t = this.tt?.() || 0;
2650
+ runWithOwner(this.Ve, () => {
2657
2651
  if (e === 0) {
2658
- if (this.Be !== 0) {
2659
- this.De.dispose(false);
2660
- this.Je = [];
2652
+ if (this.De !== 0) {
2653
+ this.Ve.dispose(false);
2661
2654
  this.Ue = [];
2662
- this.Be = 0;
2655
+ this.ze = [];
2656
+ this.De = 0;
2663
2657
  }
2664
- if (this.$e && !this.Ue[0]) {
2665
- this.Ue[0] = runWithOwner((this.Je[0] = createOwner()), this.$e);
2658
+ if (this.Ze && !this.ze[0]) {
2659
+ this.ze[0] = runWithOwner((this.Ue[0] = createOwner()), this.Ze);
2666
2660
  }
2667
2661
  return;
2668
2662
  }
2669
2663
  const n = t + e;
2670
- const r = this.et + this.Be;
2671
- if (this.Be === 0 && this.Je[0]) this.Je[0].dispose();
2672
- for (let e = n; e < r; e++) this.Je[e - this.et].dispose();
2673
- if (this.et < t) {
2674
- let e = this.et;
2675
- while (e < t && e < this.Be) this.Je[e++].dispose();
2676
- this.Je.splice(0, t - this.et);
2677
- this.Ue.splice(0, t - this.et);
2678
- } else if (this.et > t) {
2679
- let n = r - this.et - 1;
2680
- let i = this.et - t;
2681
- this.Je.length = this.Ue.length = e;
2664
+ const r = this.$e + this.De;
2665
+ if (this.De === 0 && this.Ue[0]) this.Ue[0].dispose();
2666
+ for (let e = n; e < r; e++) this.Ue[e - this.$e].dispose();
2667
+ if (this.$e < t) {
2668
+ let e = this.$e;
2669
+ while (e < t && e < this.De) this.Ue[e++].dispose();
2670
+ this.Ue.splice(0, t - this.$e);
2671
+ this.ze.splice(0, t - this.$e);
2672
+ } else if (this.$e > t) {
2673
+ let n = r - this.$e - 1;
2674
+ let i = this.$e - t;
2675
+ this.Ue.length = this.ze.length = e;
2682
2676
  while (n >= i) {
2683
- this.Je[n] = this.Je[n - i];
2684
2677
  this.Ue[n] = this.Ue[n - i];
2678
+ this.ze[n] = this.ze[n - i];
2685
2679
  n--;
2686
2680
  }
2687
2681
  for (let e = 0; e < i; e++) {
2688
- this.Ue[e] = runWithOwner((this.Je[e] = createOwner()), () => this.ze(e + t));
2682
+ this.ze[e] = runWithOwner((this.Ue[e] = createOwner()), () => this.Ke(e + t));
2689
2683
  }
2690
2684
  }
2691
2685
  for (let e = r; e < n; e++) {
2692
- this.Ue[e - t] = runWithOwner((this.Je[e - t] = createOwner()), () => this.ze(e));
2686
+ this.ze[e - t] = runWithOwner((this.Ue[e - t] = createOwner()), () => this.Ke(e));
2693
2687
  }
2694
- this.Ue = this.Ue.slice(0, e);
2695
- this.et = t;
2696
- this.Be = e;
2688
+ this.ze = this.ze.slice(0, e);
2689
+ this.$e = t;
2690
+ this.De = e;
2697
2691
  });
2698
- return this.Ue;
2692
+ return this.ze;
2699
2693
  }
2700
2694
  function compare(e, t, n) {
2701
2695
  return e ? e(t) === e(n) : true;
2702
2696
  }
2703
2697
  function boundaryComputed(e, t) {
2704
2698
  const n = computed(e, undefined, { lazy: true });
2705
- n.Oe = (e, t) => {
2699
+ n._e = (e, t) => {
2706
2700
  const r = e !== undefined ? e : n.de;
2707
2701
  const i = t !== undefined ? t : n.Y;
2708
- n.de &= ~n.rt;
2709
- n.fe.notify(n, n.rt, r, i);
2702
+ n.de &= ~n.nt;
2703
+ n.fe.notify(n, n.nt, r, i);
2710
2704
  };
2711
- n.rt = t;
2712
- n.Ae = true;
2705
+ n.nt = t;
2706
+ n.ve = true;
2713
2707
  recompute(n, true);
2714
2708
  return n;
2715
2709
  }
@@ -2722,64 +2716,90 @@ function createBoundChildren(e, t, n, r) {
2722
2716
  return boundaryComputed(() => staleValues(() => flatten(read(e))), r);
2723
2717
  });
2724
2718
  }
2719
+ const he = Symbol();
2725
2720
  class CollectionQueue extends Queue {
2726
- it;
2727
- st = new Set();
2728
- ot = signal(false, { pureWrite: true });
2729
- ut = false;
2721
+ rt;
2722
+ it = new Set();
2723
+ st = signal(false, { pureWrite: true });
2724
+ ot = false;
2725
+ ut;
2726
+ ft = he;
2730
2727
  constructor(e) {
2731
2728
  super();
2732
- this.it = e;
2729
+ this.rt = e;
2733
2730
  }
2734
2731
  run(e) {
2735
- if (!e || read(this.ot)) return;
2732
+ if (!e || read(this.st)) return;
2736
2733
  return super.run(e);
2737
2734
  }
2738
2735
  notify(e, t, n, r) {
2739
- if (!(t & this.it) || (this.it & a && this.ut)) return super.notify(e, t, n, r);
2740
- if (n & this.it) {
2736
+ if (!(t & this.rt)) return super.notify(e, t, n, r);
2737
+ if (this.ot && this.ut) {
2738
+ const e = untrack(() => {
2739
+ try {
2740
+ return this.ut();
2741
+ } catch {
2742
+ return he;
2743
+ }
2744
+ });
2745
+ if (e !== this.ft) {
2746
+ this.ft = e;
2747
+ this.ot = false;
2748
+ this.it.clear();
2749
+ }
2750
+ }
2751
+ if (this.rt & a && this.ot) return super.notify(e, t, n, r);
2752
+ if (n & this.rt) {
2741
2753
  const t = r?.source || e.Y?.source;
2742
2754
  if (t) {
2743
- const e = this.st.size === 0;
2744
- this.st.add(t);
2745
- if (e) setSignal(this.ot, true);
2755
+ const e = this.it.size === 0;
2756
+ this.it.add(t);
2757
+ if (e) setSignal(this.st, true);
2746
2758
  }
2747
2759
  }
2748
- t &= ~this.it;
2760
+ t &= ~this.rt;
2749
2761
  return t ? super.notify(e, t, n, r) : true;
2750
2762
  }
2751
2763
  checkSources() {
2752
- for (const e of this.st) {
2753
- if (!(e.de & this.it)) this.st.delete(e);
2764
+ for (const e of this.it) {
2765
+ if (!(e.de & this.rt)) this.it.delete(e);
2766
+ }
2767
+ if (!this.it.size) {
2768
+ setSignal(this.st, false);
2769
+ if (this.ut) {
2770
+ try {
2771
+ this.ft = untrack(() => this.ut());
2772
+ } catch {}
2773
+ }
2754
2774
  }
2755
- if (!this.st.size) setSignal(this.ot, false);
2756
2775
  }
2757
2776
  }
2758
- function createCollectionBoundary(e, t, n) {
2759
- const r = createOwner();
2760
- const i = new CollectionQueue(e);
2761
- const s = createBoundChildren(r, t, i, e);
2762
- const o = computed(() => {
2763
- if (!read(i.ot)) {
2764
- const e = read(s);
2765
- if (!untrack(() => read(i.ot))) {
2766
- i.ut = true;
2777
+ function createCollectionBoundary(e, t, n, r) {
2778
+ const i = createOwner();
2779
+ const s = new CollectionQueue(e);
2780
+ if (r) s.ut = r;
2781
+ const o = createBoundChildren(i, t, s, e);
2782
+ const u = computed(() => {
2783
+ if (!read(s.st)) {
2784
+ const e = read(o);
2785
+ if (!untrack(() => read(s.st))) {
2786
+ s.ot = true;
2767
2787
  return e;
2768
2788
  }
2769
2789
  }
2770
- return n(i);
2790
+ return n(s);
2771
2791
  });
2772
- return read.bind(null, o);
2792
+ return accessor(u);
2773
2793
  }
2774
- function createLoadBoundary(e, t) {
2775
- return createCollectionBoundary(a, e, () => t());
2794
+ function createLoadingBoundary(e, t, n) {
2795
+ return createCollectionBoundary(a, e, () => t(), n?.on);
2776
2796
  }
2777
2797
  function createErrorBoundary(e, t) {
2778
2798
  return createCollectionBoundary(d, e, e => {
2779
- let n = e.st.values().next().value;
2799
+ let n = e.it.values().next().value;
2780
2800
  const r = n.Y?.cause ?? n.Y;
2781
2801
  return t(r, () => {
2782
- for (const t of e.st) recompute(t);
2802
+ for (const t of e.it) recompute(t);
2783
2803
  schedule();
2784
2804
  });
2785
2805
  });
@@ -2836,7 +2856,7 @@ function flattenArray(e, t = [], n) {
2836
2856
  exports.$PROXY = U;
2837
2857
  exports.$REFRESH = O;
2838
2858
  exports.$TARGET = z;
2839
- exports.$TRACK = G;
2859
+ exports.$TRACK = K;
2840
2860
  exports.ContextNotFoundError = ContextNotFoundError;
2841
2861
  exports.NoOwnerError = NoOwnerError;
2842
2862
  exports.NotReadyError = NotReadyError;
@@ -2846,7 +2866,7 @@ exports.clearSnapshots = clearSnapshots;
2846
2866
  exports.createContext = createContext;
2847
2867
  exports.createEffect = createEffect;
2848
2868
  exports.createErrorBoundary = createErrorBoundary;
2849
- exports.createLoadBoundary = createLoadBoundary;
2869
+ exports.createLoadingBoundary = createLoadingBoundary;
2850
2870
  exports.createMemo = createMemo;
2851
2871
  exports.createOptimistic = createOptimistic;
2852
2872
  exports.createOptimisticStore = createOptimisticStore;
@@ -2859,6 +2879,8 @@ exports.createSignal = createSignal;
2859
2879
  exports.createStore = createStore;
2860
2880
  exports.createTrackedEffect = createTrackedEffect;
2861
2881
  exports.deep = deep;
2882
+ exports.enableExternalSource = enableExternalSource;
2883
+ exports.enforceLoadingBoundary = enforceLoadingBoundary;
2862
2884
  exports.flatten = flatten;
2863
2885
  exports.flush = flush;
2864
2886
  exports.getContext = getContext;
@@ -2885,8 +2907,7 @@ exports.repeat = repeat;
2885
2907
  exports.resolve = resolve;
2886
2908
  exports.runWithOwner = runWithOwner;
2887
2909
  exports.setContext = setContext;
2888
- exports.setOnUnhandledAsync = setOnUnhandledAsync;
2889
2910
  exports.setSnapshotCapture = setSnapshotCapture;
2890
2911
  exports.snapshot = snapshot;
2891
- exports.storePath = ae;
2912
+ exports.storePath = le;
2892
2913
  exports.untrack = untrack;