@solidjs/signals 2.0.0-beta.12 → 2.0.0-beta.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/prod.js CHANGED
@@ -75,39 +75,39 @@ function actualInsertIntoHeap(e, t) {
75
75
  e.S = t;
76
76
  r.S = e;
77
77
  }
78
- if (i > t.O) t.O = i;
78
+ if (i > t._) t._ = i;
79
79
  }
80
80
  function insertIntoHeap(e, t) {
81
- let n = e._;
81
+ let n = e.O;
82
82
  if (n & (REACTIVE_IN_HEAP | REACTIVE_RECOMPUTING_DEPS | REACTIVE_MANUAL_WRITE)) return;
83
83
  if (n & REACTIVE_CHECK) {
84
- e._ = (n & -4) | REACTIVE_DIRTY | REACTIVE_IN_HEAP;
85
- } else e._ = n | REACTIVE_IN_HEAP;
84
+ e.O = (n & -4) | REACTIVE_DIRTY | REACTIVE_IN_HEAP;
85
+ } else e.O = n | REACTIVE_IN_HEAP;
86
86
  if (!(n & REACTIVE_IN_HEAP_HEIGHT)) actualInsertIntoHeap(e, t);
87
87
  }
88
88
  function insertIntoHeapHeight(e, t) {
89
- let n = e._;
89
+ let n = e.O;
90
90
  if (
91
91
  n &
92
92
  (REACTIVE_IN_HEAP | REACTIVE_RECOMPUTING_DEPS | REACTIVE_IN_HEAP_HEIGHT | REACTIVE_MANUAL_WRITE)
93
93
  )
94
94
  return;
95
- e._ = n | REACTIVE_IN_HEAP_HEIGHT;
95
+ e.O = n | REACTIVE_IN_HEAP_HEIGHT;
96
96
  actualInsertIntoHeap(e, t);
97
97
  }
98
98
  function deleteFromHeap(e, t) {
99
- const n = e._;
99
+ const n = e.O;
100
100
  if (!(n & (REACTIVE_IN_HEAP | REACTIVE_IN_HEAP_HEIGHT))) return;
101
- e._ = n & -25;
101
+ e.O = n & -25;
102
102
  const i = e.o;
103
103
  if (e.S === e) t.l[i] = undefined;
104
104
  else {
105
105
  const n = e.T;
106
106
  const r = t.l[i];
107
- const s = n ?? r;
107
+ const o = n ?? r;
108
108
  if (e === r) t.l[i] = n;
109
109
  else e.S.T = n;
110
- s.S = e.S;
110
+ o.S = e.S;
111
111
  }
112
112
  e.S = e;
113
113
  e.T = undefined;
@@ -115,16 +115,16 @@ function deleteFromHeap(e, t) {
115
115
  function markHeap(e) {
116
116
  if (e.R) return;
117
117
  e.R = true;
118
- for (let t = 0; t <= e.O; t++) {
118
+ for (let t = 0; t <= e._; t++) {
119
119
  for (let n = e.l[t]; n !== undefined; n = n.T) {
120
- if (n._ & REACTIVE_IN_HEAP) markNode(n);
120
+ if (n.O & REACTIVE_IN_HEAP) markNode(n);
121
121
  }
122
122
  }
123
123
  }
124
124
  function markNode(e, t = REACTIVE_DIRTY) {
125
- const n = e._;
125
+ const n = e.O;
126
126
  if ((n & (REACTIVE_CHECK | REACTIVE_DIRTY)) >= t) return;
127
- e._ = (n & -4) | t;
127
+ e.O = (n & -4) | t;
128
128
  for (let t = e.I; t !== null; t = t.p) {
129
129
  markNode(t.h, REACTIVE_CHECK);
130
130
  }
@@ -138,15 +138,15 @@ function markNode(e, t = REACTIVE_DIRTY) {
138
138
  }
139
139
  function runHeap(e, t) {
140
140
  e.R = false;
141
- for (e.C = 0; e.C <= e.O; e.C++) {
141
+ for (e.C = 0; e.C <= e._; e.C++) {
142
142
  let n = e.l[e.C];
143
143
  while (n !== undefined) {
144
- if (n._ & REACTIVE_IN_HEAP) t(n);
144
+ if (n.O & REACTIVE_IN_HEAP) t(n);
145
145
  else adjustHeight(n, e);
146
146
  n = e.l[e.C];
147
147
  }
148
148
  }
149
- e.O = 0;
149
+ e._ = 0;
150
150
  }
151
151
  function adjustHeight(e, t) {
152
152
  deleteFromHeap(e, t);
@@ -172,7 +172,7 @@ function getOrCreateLane(e) {
172
172
  }
173
173
  const n = e.U;
174
174
  const i = n?.G ? findLane(n.G) : null;
175
- t = { F: e, k: new Set(), W: [[], []], H: null, M: activeTransition, j: i };
175
+ t = { k: e, F: new Set(), W: [[], []], H: null, M: activeTransition, j: i };
176
176
  signalLanes.set(e, t);
177
177
  activeLanes.add(t);
178
178
  e.$ = false;
@@ -187,7 +187,7 @@ function mergeLanes(e, t) {
187
187
  t = findLane(t);
188
188
  if (e === t) return e;
189
189
  t.H = e;
190
- for (const n of t.k) e.k.add(n);
190
+ for (const n of t.F) e.F.add(n);
191
191
  e.W[0].push(...t.W[0]);
192
192
  e.W[1].push(...t.W[1]);
193
193
  return e;
@@ -228,8 +228,8 @@ function assignOrMergeLane(e, t) {
228
228
  e.G = t;
229
229
  }
230
230
  const transitions = new Set();
231
- const dirtyQueue = { l: new Array(2e3).fill(undefined), R: false, C: 0, O: 0 };
232
- const zombieQueue = { l: new Array(2e3).fill(undefined), R: false, C: 0, O: 0 };
231
+ const dirtyQueue = { l: new Array(2e3).fill(undefined), R: false, C: 0, _: 0 };
232
+ const zombieQueue = { l: new Array(2e3).fill(undefined), R: false, C: 0, _: 0 };
233
233
  let clock = 0;
234
234
  let activeTransition = null;
235
235
  let scheduled = false;
@@ -269,7 +269,7 @@ function shouldReadStashedOptimisticValue(e) {
269
269
  }
270
270
  function runLaneEffects(e) {
271
271
  for (const t of activeLanes) {
272
- if (t.H || t.k.size > 0) continue;
272
+ if (t.H || t.F.size > 0) continue;
273
273
  const n = t.W[e - 1];
274
274
  if (n.length) {
275
275
  t.W[e - 1] = [];
@@ -288,7 +288,7 @@ function queueStashedOptimisticEffects(e) {
288
288
  }
289
289
  continue;
290
290
  }
291
- const n = e._ & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
291
+ const n = e.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
292
292
  if (n.C > e.o) n.C = e.o;
293
293
  insertIntoHeap(e, n);
294
294
  }
@@ -302,12 +302,12 @@ function mergeTransitionState(e, t) {
302
302
  for (const n of activeLanes) if (n.M === t) n.M = e;
303
303
  e.Z.push(...t.Z);
304
304
  for (const n of t.q) e.q.add(n);
305
- for (const [n, i] of t.se) {
306
- let t = e.se.get(n);
307
- if (!t) e.se.set(n, (t = new Set()));
305
+ for (const [n, i] of t.oe) {
306
+ let t = e.oe.get(n);
307
+ if (!t) e.oe.set(n, (t = new Set()));
308
308
  for (const e of i) t.add(e);
309
309
  }
310
- for (const n of t.oe) e.oe.add(n);
310
+ for (const n of t.se) e.se.add(n);
311
311
  }
312
312
  function resolveOptimisticNodes(e) {
313
313
  for (let t = 0; t < e.length; t++) {
@@ -332,22 +332,22 @@ function cleanupCompletedLanes(e) {
332
332
  if (t.W[0].length) runQueue(t.W[0], EFFECT_RENDER);
333
333
  if (t.W[1].length) runQueue(t.W[1], EFFECT_USER);
334
334
  }
335
- if (t.F.G === t) t.F.G = undefined;
336
- t.k.clear();
335
+ if (t.k.G === t) t.k.G = undefined;
336
+ t.F.clear();
337
337
  t.W[0].length = 0;
338
338
  t.W[1].length = 0;
339
339
  activeLanes.delete(t);
340
- signalLanes.delete(t.F);
340
+ signalLanes.delete(t.k);
341
341
  }
342
342
  }
343
343
  function schedule() {
344
344
  if (scheduled) return;
345
345
  scheduled = true;
346
- if (!syncDepth && !globalQueue.le && !projectionWriteActive) queueMicrotask(flush);
346
+ if (!syncDepth && !globalQueue.ce && !projectionWriteActive) queueMicrotask(flush);
347
347
  }
348
348
  class Queue {
349
349
  i = null;
350
- ce = [[], []];
350
+ le = [[], []];
351
351
  Y = [];
352
352
  created = clock;
353
353
  addChild(e) {
@@ -366,9 +366,9 @@ class Queue {
366
366
  return false;
367
367
  }
368
368
  run(e) {
369
- if (this.ce[e - 1].length) {
370
- const t = this.ce[e - 1];
371
- this.ce[e - 1] = [];
369
+ if (this.le[e - 1].length) {
370
+ const t = this.le[e - 1];
371
+ this.le[e - 1] = [];
372
372
  runQueue(t, e);
373
373
  }
374
374
  for (let t = 0; t < this.Y.length; t++) this.Y[t].run?.(e);
@@ -379,28 +379,28 @@ class Queue {
379
379
  const n = findLane(currentOptimisticLane);
380
380
  n.W[e - 1].push(t);
381
381
  } else {
382
- this.ce[e - 1].push(t);
382
+ this.le[e - 1].push(t);
383
383
  }
384
384
  }
385
385
  schedule();
386
386
  }
387
387
  stashQueues(e) {
388
- e.ce[0].push(...this.ce[0]);
389
- e.ce[1].push(...this.ce[1]);
390
- this.ce = [[], []];
388
+ e.le[0].push(...this.le[0]);
389
+ e.le[1].push(...this.le[1]);
390
+ this.le = [[], []];
391
391
  for (let t = 0; t < this.Y.length; t++) {
392
392
  let n = this.Y[t];
393
393
  let i = e.Y[t];
394
394
  if (!i) {
395
- i = { ce: [[], []], Y: [] };
395
+ i = { le: [[], []], Y: [] };
396
396
  e.Y[t] = i;
397
397
  }
398
398
  n.stashQueues(i);
399
399
  }
400
400
  }
401
401
  restoreQueues(e) {
402
- this.ce[0].push(...e.ce[0]);
403
- this.ce[1].push(...e.ce[1]);
402
+ this.le[0].push(...e.le[0]);
403
+ this.le[1].push(...e.le[1]);
404
404
  for (let t = 0; t < e.Y.length; t++) {
405
405
  const n = e.Y[t];
406
406
  let i = this.Y[t];
@@ -409,7 +409,7 @@ class Queue {
409
409
  }
410
410
  }
411
411
  class GlobalQueue extends Queue {
412
- le = false;
412
+ ce = false;
413
413
  ae = null;
414
414
  fe = [];
415
415
  Z = [];
@@ -419,8 +419,8 @@ class GlobalQueue extends Queue {
419
419
  static Te;
420
420
  static de = null;
421
421
  flush() {
422
- if (this.le) return;
423
- this.le = true;
422
+ if (this.ce) return;
423
+ this.ce = true;
424
424
  try {
425
425
  runHeap(dirtyQueue, GlobalQueue.Ee);
426
426
  if (activeTransition) {
@@ -434,16 +434,16 @@ class GlobalQueue extends Queue {
434
434
  this.q = new Set();
435
435
  runLaneEffects(EFFECT_RENDER);
436
436
  runLaneEffects(EFFECT_USER);
437
- this.stashQueues(e.Oe);
437
+ this.stashQueues(e._e);
438
438
  clock++;
439
- scheduled = dirtyQueue.O >= dirtyQueue.C;
439
+ scheduled = dirtyQueue._ >= dirtyQueue.C;
440
440
  reassignPendingTransition(e.fe);
441
441
  activeTransition = null;
442
- if (!e.re.length && !e.se.size && e.Z.length) {
442
+ if (!e.re.length && !e.oe.size && e.Z.length) {
443
443
  stashedOptimisticReads = new Set();
444
444
  for (let t = 0; t < e.Z.length; t++) {
445
445
  const n = e.Z[t];
446
- if (n.L || n._e & CONFIG_OWNED_WRITE) continue;
446
+ if (n.L || n.Oe & CONFIG_OWNED_WRITE) continue;
447
447
  stashedOptimisticReads.add(n);
448
448
  queueStashedOptimisticEffects(n);
449
449
  }
@@ -456,7 +456,7 @@ class GlobalQueue extends Queue {
456
456
  return;
457
457
  }
458
458
  this.fe !== activeTransition.fe && this.fe.push(...activeTransition.fe);
459
- this.restoreQueues(activeTransition.Oe);
459
+ this.restoreQueues(activeTransition._e);
460
460
  transitions.delete(activeTransition);
461
461
  const t = activeTransition;
462
462
  activeTransition = null;
@@ -465,7 +465,7 @@ class GlobalQueue extends Queue {
465
465
  } else {
466
466
  if (canUseSimpleSyncFlush(this)) {
467
467
  commitPendingNodes();
468
- if (dirtyQueue.O >= dirtyQueue.C) {
468
+ if (dirtyQueue._ >= dirtyQueue.C) {
469
469
  runHeap(dirtyQueue, GlobalQueue.Ee);
470
470
  commitPendingNodes();
471
471
  }
@@ -475,14 +475,14 @@ class GlobalQueue extends Queue {
475
475
  }
476
476
  }
477
477
  clock++;
478
- scheduled = dirtyQueue.O >= dirtyQueue.C;
478
+ scheduled = dirtyQueue._ >= dirtyQueue.C;
479
479
  activeLanes.size && runLaneEffects(EFFECT_RENDER);
480
480
  this.run(EFFECT_RENDER);
481
481
  activeLanes.size && runLaneEffects(EFFECT_USER);
482
482
  this.run(EFFECT_USER);
483
483
  if (false);
484
484
  } finally {
485
- this.le = false;
485
+ this.ce = false;
486
486
  }
487
487
  }
488
488
  notify(e, t, n, i) {
@@ -491,8 +491,8 @@ class GlobalQueue extends Queue {
491
491
  const t = i !== undefined ? i : e.Re;
492
492
  if (activeTransition && t) {
493
493
  const n = t.source;
494
- let i = activeTransition.se.get(n);
495
- if (!i) activeTransition.se.set(n, (i = new Set()));
494
+ let i = activeTransition.oe.get(n);
495
+ if (!i) activeTransition.oe.set(n, (i = new Set()));
496
496
  const r = i.size;
497
497
  i.add(e);
498
498
  if (i.size !== r) schedule();
@@ -510,13 +510,13 @@ class GlobalQueue extends Queue {
510
510
  activeTransition = e ?? {
511
511
  Ie: clock,
512
512
  fe: [],
513
- se: new Map(),
513
+ oe: new Map(),
514
514
  Z: [],
515
515
  q: new Set(),
516
516
  re: [],
517
- Oe: { ce: [[], []], Y: [] },
517
+ _e: { le: [[], []], Y: [] },
518
518
  ie: false,
519
- oe: new Set()
519
+ se: new Set()
520
520
  };
521
521
  } else if (e) {
522
522
  const t = activeTransition;
@@ -575,15 +575,15 @@ function insertSubs(e, t = false) {
575
575
  const n = e.G || currentOptimisticLane;
576
576
  const i = e.pe !== undefined;
577
577
  for (let r = e.I; r !== null; r = r.p) {
578
- if (i && r.h._e & CONFIG_IN_SNAPSHOT_SCOPE) {
579
- r.h._ |= REACTIVE_SNAPSHOT_STALE;
578
+ if (i && r.h.Oe & CONFIG_IN_SNAPSHOT_SCOPE) {
579
+ r.h.O |= REACTIVE_SNAPSHOT_STALE;
580
580
  continue;
581
581
  }
582
582
  if (t && n) {
583
- r.h._ |= REACTIVE_OPTIMISTIC_DIRTY;
583
+ r.h.O |= REACTIVE_OPTIMISTIC_DIRTY;
584
584
  assignOrMergeLane(r.h, n);
585
585
  } else if (t) {
586
- r.h._ |= REACTIVE_OPTIMISTIC_DIRTY;
586
+ r.h.O |= REACTIVE_OPTIMISTIC_DIRTY;
587
587
  r.h.G = undefined;
588
588
  }
589
589
  const e = r.h;
@@ -594,9 +594,9 @@ function insertSubs(e, t = false) {
594
594
  }
595
595
  continue;
596
596
  }
597
- const s = r.h._ & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
598
- if (s.C > r.h.o) s.C = r.h.o;
599
- insertIntoHeap(r.h, s);
597
+ const o = r.h.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
598
+ if (o.C > r.h.o) o.C = r.h.o;
599
+ insertIntoHeap(r.h, o);
600
600
  }
601
601
  }
602
602
  function commitPendingNode(e) {
@@ -613,7 +613,7 @@ function commitPendingNode(e) {
613
613
  e.B = NOT_PENDING;
614
614
  if (e.J && e.J !== EFFECT_TRACKED) e.ee = true;
615
615
  }
616
- t._ &= ~REACTIVE_MANUAL_WRITE;
616
+ t.O &= ~REACTIVE_MANUAL_WRITE;
617
617
  if (!(t.he & STATUS_PENDING)) t.he &= ~STATUS_UNINITIALIZED;
618
618
  if (t.Ne !== null || t.Ae !== null) GlobalQueue.Se(t, false, true);
619
619
  }
@@ -632,14 +632,14 @@ function finalizePureQueue(e = null, t = false) {
632
632
  const n = !t;
633
633
  if (n) commitPendingNodes();
634
634
  if (!t && globalQueue.Y.length) checkBoundaryChildren(globalQueue);
635
- const i = dirtyQueue.O >= dirtyQueue.C;
635
+ const i = dirtyQueue._ >= dirtyQueue.C;
636
636
  if (i) runHeap(dirtyQueue, GlobalQueue.Ee);
637
637
  if (n) {
638
638
  if (i) commitPendingNodes();
639
639
  resolveOptimisticNodes(e ? e.Z : globalQueue.Z);
640
- if (e && e.oe.size) {
641
- for (const t of e.oe) {
642
- if (t._ & REACTIVE_DISPOSED) continue;
640
+ if (e && e.se.size) {
641
+ for (const t of e.se) {
642
+ if (t.O & REACTIVE_DISPOSED) continue;
643
643
  if (t.J === EFFECT_TRACKED) {
644
644
  if (!t.ee) {
645
645
  t.ee = true;
@@ -647,11 +647,11 @@ function finalizePureQueue(e = null, t = false) {
647
647
  }
648
648
  continue;
649
649
  }
650
- const e = t._ & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
650
+ const e = t.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
651
651
  if (e.C > t.o) e.C = t.o;
652
652
  insertIntoHeap(t, e);
653
653
  }
654
- e.oe.clear();
654
+ e.se.clear();
655
655
  }
656
656
  const t = e ? e.q : globalQueue.q;
657
657
  if (GlobalQueue.de && t.size) {
@@ -691,7 +691,7 @@ function flush(e) {
691
691
  syncDepth--;
692
692
  }
693
693
  }
694
- if (globalQueue.le) {
694
+ if (globalQueue.ce) {
695
695
  return;
696
696
  }
697
697
  while (scheduled || activeTransition) {
@@ -702,7 +702,7 @@ function runQueue(e, t) {
702
702
  for (let n = 0; n < e.length; n++) e[n](t);
703
703
  }
704
704
  function reporterBlocksSource(e, t) {
705
- if (e._ & (REACTIVE_ZOMBIE | REACTIVE_DISPOSED)) return false;
705
+ if (e.O & (REACTIVE_ZOMBIE | REACTIVE_DISPOSED)) return false;
706
706
  if (e.Ce === t || e.Pe?.has(t)) return true;
707
707
  for (let n = e.P; n; n = n.D) {
708
708
  let e = n.m;
@@ -717,7 +717,7 @@ function transitionComplete(e) {
717
717
  if (e.ie) return true;
718
718
  if (e.re.length) return false;
719
719
  let t = true;
720
- for (const [n, i] of e.se) {
720
+ for (const [n, i] of e.oe) {
721
721
  let r = false;
722
722
  for (const e of i) {
723
723
  if (reporterBlocksSource(e, n)) {
@@ -726,7 +726,7 @@ function transitionComplete(e) {
726
726
  }
727
727
  i.delete(e);
728
728
  }
729
- if (!r) e.se.delete(n);
729
+ if (!r) e.oe.delete(n);
730
730
  else if (n.he & STATUS_PENDING && n.Re?.source === n) {
731
731
  t = false;
732
732
  break;
@@ -770,8 +770,8 @@ const PENDING_OWNER = {};
770
770
  function markDisposal(e) {
771
771
  let t = e.ge;
772
772
  while (t) {
773
- t._ |= REACTIVE_ZOMBIE;
774
- if (t._ & REACTIVE_IN_HEAP) {
773
+ t.O |= REACTIVE_ZOMBIE;
774
+ if (t.O & REACTIVE_IN_HEAP) {
775
775
  deleteFromHeap(t, dirtyQueue);
776
776
  insertIntoHeap(t, zombieQueue);
777
777
  }
@@ -789,16 +789,16 @@ function dispose(e) {
789
789
  disposeChildren(e, true);
790
790
  }
791
791
  function disposeChildren(e, t = false, n) {
792
- const i = e._;
792
+ const i = e.O;
793
793
  if (i & REACTIVE_DISPOSED) return;
794
- if (t) e._ = i | REACTIVE_DISPOSED;
794
+ if (t) e.O = i | REACTIVE_DISPOSED;
795
795
  if (t && e.L) e.ve = null;
796
796
  let r = n ? e.Ne : e.ge;
797
797
  while (r) {
798
798
  const e = r.De;
799
799
  if (r.P) {
800
800
  const e = r;
801
- deleteFromHeap(e, e._ & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
801
+ deleteFromHeap(e, e.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
802
802
  let t = e.P;
803
803
  do {
804
804
  t = unlinkSubs(t);
@@ -815,18 +815,18 @@ function disposeChildren(e, t = false, n) {
815
815
  e.ge = null;
816
816
  e.me = 0;
817
817
  }
818
- if (t && !n && !(i & REACTIVE_ZOMBIE) && e.i !== null && !(e.i._ & REACTIVE_DISPOSED)) {
819
- const t = e.be;
818
+ if (t && !n && !(i & REACTIVE_ZOMBIE) && e.i !== null && !(e.i.O & REACTIVE_DISPOSED)) {
819
+ const t = e.we;
820
820
  const n = e.De;
821
821
  if (t !== null) t.De = n;
822
822
  else e.i.ge = n;
823
- if (n !== null) n.be = t;
824
- e.be = null;
823
+ if (n !== null) n.we = t;
824
+ e.we = null;
825
825
  }
826
826
  runDisposal(e, n);
827
827
  }
828
828
  function runDisposal(e, t) {
829
- let n = t ? e.Ae : e.we;
829
+ let n = t ? e.Ae : e.be;
830
830
  if (!n) return;
831
831
  if (Array.isArray(n)) {
832
832
  for (let e = 0; e < n.length; e++) {
@@ -836,11 +836,11 @@ function runDisposal(e, t) {
836
836
  } else {
837
837
  n.call(n);
838
838
  }
839
- t ? (e.Ae = null) : (e.we = null);
839
+ t ? (e.Ae = null) : (e.be = null);
840
840
  }
841
841
  function childId(e, t) {
842
842
  let n = e;
843
- while (n._e & CONFIG_TRANSPARENT && n.i) n = n.i;
843
+ while (n.Oe & CONFIG_TRANSPARENT && n.i) n = n.i;
844
844
  if (n.id != null) return formatId(n.id, t ? n.me++ : n.me);
845
845
  throw new Error("Cannot get child id from owner without an id");
846
846
  }
@@ -864,13 +864,13 @@ function getOwner() {
864
864
  }
865
865
  function cleanup(e) {
866
866
  if (!context) return e;
867
- if (!context.we) context.we = e;
868
- else if (Array.isArray(context.we)) context.we.push(e);
869
- else context.we = [context.we, e];
867
+ if (!context.be) context.be = e;
868
+ else if (Array.isArray(context.be)) context.be.push(e);
869
+ else context.be = [context.be, e];
870
870
  return e;
871
871
  }
872
872
  function isDisposed(e) {
873
- return !!(e._ & (REACTIVE_DISPOSED | REACTIVE_ZOMBIE));
873
+ return !!(e.O & (REACTIVE_DISPOSED | REACTIVE_ZOMBIE));
874
874
  }
875
875
  function disposeRootSelf(e = true) {
876
876
  disposeChildren(this, e);
@@ -880,13 +880,13 @@ function createOwner(e) {
880
880
  const n = e?.transparent ?? false;
881
881
  const i = {
882
882
  id: e?.id ?? (n ? t?.id : t?.id != null ? getNextChildId(t) : undefined),
883
- _e: n ? CONFIG_TRANSPARENT : 0,
883
+ Oe: n ? CONFIG_TRANSPARENT : 0,
884
884
  t: true,
885
885
  u: t?.t ? t.u : t,
886
886
  ge: null,
887
887
  De: null,
888
- be: null,
889
888
  we: null,
889
+ be: null,
890
890
  te: t?.te ?? globalQueue,
891
891
  Ve: t?.Ve || defaultContext,
892
892
  me: 0,
@@ -901,7 +901,7 @@ function createOwner(e) {
901
901
  t.ge = i;
902
902
  } else {
903
903
  i.De = e;
904
- e.be = i;
904
+ e.we = i;
905
905
  t.ge = i;
906
906
  }
907
907
  }
@@ -924,7 +924,7 @@ function unlinkSubs(e) {
924
924
  if (i === null) {
925
925
  t.X?.();
926
926
  const e = t;
927
- e.L && e._e & CONFIG_AUTO_DISPOSE && !(e._ & REACTIVE_ZOMBIE) && unobserved(e);
927
+ e.L && e.Oe & CONFIG_AUTO_DISPOSE && !(e.O & REACTIVE_ZOMBIE) && unobserved(e);
928
928
  }
929
929
  }
930
930
  return n;
@@ -941,7 +941,7 @@ function trimStaleDeps(e) {
941
941
  }
942
942
  }
943
943
  function unobserved(e) {
944
- deleteFromHeap(e, e._ & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
944
+ deleteFromHeap(e, e.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
945
945
  let t = e.P;
946
946
  while (t !== null) {
947
947
  t = unlinkSubs(t);
@@ -954,7 +954,7 @@ function link(e, t) {
954
954
  const n = t.ye;
955
955
  if (n !== null && n.m === e) return;
956
956
  let i = null;
957
- const r = t._ & REACTIVE_RECOMPUTING_DEPS;
957
+ const r = t.O & REACTIVE_RECOMPUTING_DEPS;
958
958
  if (r) {
959
959
  i = n !== null ? n.D : t.P;
960
960
  if (i !== null && i.m === e) {
@@ -962,13 +962,13 @@ function link(e, t) {
962
962
  return;
963
963
  }
964
964
  }
965
- const s = e.Ue;
966
- if (s !== null && s.h === t && (!r || isValidLink(s, t))) return;
967
- const o = (t.ye = e.Ue = { m: e, h: t, D: i, Le: s, p: null });
968
- if (n !== null) n.D = o;
969
- else t.P = o;
970
- if (s !== null) s.p = o;
971
- else e.I = o;
965
+ const o = e.Ue;
966
+ if (o !== null && o.h === t && (!r || isValidLink(o, t))) return;
967
+ const s = (t.ye = e.Ue = { m: e, h: t, D: i, Le: o, p: null });
968
+ if (n !== null) n.D = s;
969
+ else t.P = s;
970
+ if (o !== null) o.p = s;
971
+ else e.I = s;
972
972
  }
973
973
  function isValidLink(e, t) {
974
974
  const n = t.ye;
@@ -1059,7 +1059,7 @@ function settlePendingSource(e) {
1059
1059
  e.te.enqueue(EFFECT_USER, e.ne);
1060
1060
  }
1061
1061
  } else {
1062
- const e = i._ & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
1062
+ const e = i.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
1063
1063
  if (e.C > i.o) e.C = i.o;
1064
1064
  insertIntoHeap(i, e);
1065
1065
  }
@@ -1086,7 +1086,7 @@ function handleAsync(e, t, n) {
1086
1086
  return t;
1087
1087
  }
1088
1088
  e.ve = t;
1089
- let s;
1089
+ let o;
1090
1090
  const handleError = n => {
1091
1091
  if (e.ve !== t) return;
1092
1092
  globalQueue.initTransition(resolveTransition(e));
@@ -1095,13 +1095,13 @@ function handleAsync(e, t, n) {
1095
1095
  };
1096
1096
  const asyncWrite = (i, r) => {
1097
1097
  if (e.ve !== t) return;
1098
- if (e._ & (REACTIVE_DIRTY | REACTIVE_OPTIMISTIC_DIRTY)) return;
1098
+ if (e.O & (REACTIVE_DIRTY | REACTIVE_OPTIMISTIC_DIRTY)) return;
1099
1099
  globalQueue.initTransition(resolveTransition(e));
1100
- const s = !!(e.he & STATUS_UNINITIALIZED);
1100
+ const o = !!(e.he & STATUS_UNINITIALIZED);
1101
1101
  trimStaleDeps(e);
1102
1102
  clearStatus(e);
1103
- const o = resolveLane(e);
1104
- if (o) o.k.delete(e);
1103
+ const s = resolveLane(e);
1104
+ if (s) s.F.delete(e);
1105
1105
  if (n) n(i);
1106
1106
  else if (e.K !== undefined) {
1107
1107
  if (e.K !== undefined && e.K !== NOT_PENDING) e.B = i;
@@ -1110,15 +1110,15 @@ function handleAsync(e, t, n) {
1110
1110
  insertSubs(e);
1111
1111
  }
1112
1112
  e.Ie = clock;
1113
- } else if (o) {
1113
+ } else if (s) {
1114
1114
  const t = e.J;
1115
1115
  const n = e.ue;
1116
- const r = e.Fe;
1117
- if ((!t && s) || !r || !r(i, n)) {
1116
+ const r = e.ke;
1117
+ if ((!t && o) || !r || !r(i, n)) {
1118
1118
  e.ue = i;
1119
1119
  e.Ie = clock;
1120
- if (e.ke) {
1121
- setSignal(e.ke, i);
1120
+ if (e.Fe) {
1121
+ setSignal(e.Fe, i);
1122
1122
  }
1123
1123
  insertSubs(e, true);
1124
1124
  }
@@ -1136,7 +1136,7 @@ function handleAsync(e, t, n) {
1136
1136
  t.then(
1137
1137
  e => {
1138
1138
  if (i) {
1139
- s = e;
1139
+ o = e;
1140
1140
  n = true;
1141
1141
  } else asyncWrite(e);
1142
1142
  },
@@ -1165,13 +1165,13 @@ function handleAsync(e, t, n) {
1165
1165
  } catch {}
1166
1166
  });
1167
1167
  const iterate = () => {
1168
- let o,
1168
+ let s,
1169
1169
  u = false,
1170
- l = true;
1170
+ c = true;
1171
1171
  n.next().then(
1172
1172
  n => {
1173
- if (l) {
1174
- o = n;
1173
+ if (c) {
1174
+ s = n;
1175
1175
  u = true;
1176
1176
  if (n.done) r = true;
1177
1177
  } else if (e.ve !== t) {
@@ -1184,27 +1184,27 @@ function handleAsync(e, t, n) {
1184
1184
  }
1185
1185
  },
1186
1186
  n => {
1187
- if (!l && e.ve === t) {
1187
+ if (!c && e.ve === t) {
1188
1188
  r = true;
1189
1189
  handleError(n);
1190
1190
  }
1191
1191
  }
1192
1192
  );
1193
- l = false;
1194
- if (u && !o.done) {
1195
- s = o.value;
1193
+ c = false;
1194
+ if (u && !s.done) {
1195
+ o = s.value;
1196
1196
  i = true;
1197
1197
  return iterate();
1198
1198
  }
1199
- return u && o.done;
1199
+ return u && s.done;
1200
1200
  };
1201
- const o = iterate();
1202
- if (!i && !o) {
1201
+ const s = iterate();
1202
+ if (!i && !s) {
1203
1203
  globalQueue.initTransition(resolveTransition(e));
1204
1204
  throw new NotReadyError(context);
1205
1205
  }
1206
1206
  }
1207
- return s;
1207
+ return o;
1208
1208
  }
1209
1209
  function clearStatus(e, t = false) {
1210
1210
  if (e.Ce || e.Pe) clearPendingSources(e);
@@ -1217,15 +1217,15 @@ function clearStatus(e, t = false) {
1217
1217
  function notifyStatus(e, t, n, i, r) {
1218
1218
  if (t === STATUS_ERROR && !(n instanceof StatusError) && !(n instanceof NotReadyError))
1219
1219
  n = new StatusError(e, n);
1220
- const s = t === STATUS_PENDING && n instanceof NotReadyError ? n.source : undefined;
1221
- const o = s === e;
1222
- const u = t === STATUS_PENDING && e.K !== undefined && !o;
1223
- const l = u && hasActiveOverride(e);
1220
+ const o = t === STATUS_PENDING && n instanceof NotReadyError ? n.source : undefined;
1221
+ const s = o === e;
1222
+ const u = t === STATUS_PENDING && e.K !== undefined && !s;
1223
+ const c = u && hasActiveOverride(e);
1224
1224
  if (!i) {
1225
- if (t === STATUS_PENDING && s) {
1226
- addPendingSource(e, s);
1225
+ if (t === STATUS_PENDING && o) {
1226
+ addPendingSource(e, o);
1227
1227
  e.he = STATUS_PENDING | (e.he & STATUS_UNINITIALIZED);
1228
- setPendingError(e, s, n);
1228
+ setPendingError(e, o, n);
1229
1229
  } else {
1230
1230
  clearPendingSources(e);
1231
1231
  e.he = t | (t !== STATUS_ERROR ? e.he & STATUS_UNINITIALIZED : 0);
@@ -1236,13 +1236,13 @@ function notifyStatus(e, t, n, i, r) {
1236
1236
  if (r && !i) {
1237
1237
  assignOrMergeLane(e, r);
1238
1238
  }
1239
- const c = i || l;
1239
+ const l = i || c;
1240
1240
  const a = i || u ? undefined : r;
1241
1241
  if (e.xe) {
1242
1242
  if (i && t === STATUS_PENDING) {
1243
1243
  return;
1244
1244
  }
1245
- if (c) {
1245
+ if (l) {
1246
1246
  e.xe(t, n);
1247
1247
  } else {
1248
1248
  e.xe();
@@ -1252,11 +1252,11 @@ function notifyStatus(e, t, n, i, r) {
1252
1252
  forEachDependent(e, e => {
1253
1253
  e.Ie = clock;
1254
1254
  if (
1255
- (t === STATUS_PENDING && s && e.Ce !== s && !e.Pe?.has(s)) ||
1255
+ (t === STATUS_PENDING && o && e.Ce !== o && !e.Pe?.has(o)) ||
1256
1256
  (t !== STATUS_PENDING && (e.Re !== n || e.Ce || e.Pe))
1257
1257
  ) {
1258
- if (!c && !e.M) queuePendingNode(e);
1259
- notifyStatus(e, t, n, c, a);
1258
+ if (!l && !e.M) queuePendingNode(e);
1259
+ notifyStatus(e, t, n, l, a);
1260
1260
  }
1261
1261
  });
1262
1262
  }
@@ -1268,11 +1268,11 @@ function enableExternalSource(e) {
1268
1268
  externalSourceConfig = {
1269
1269
  factory: (n, i) => {
1270
1270
  const r = e(n, i);
1271
- const s = t(e => r.track(e), i);
1271
+ const o = t(e => r.track(e), i);
1272
1272
  return {
1273
- track: e => s.track(e),
1273
+ track: e => o.track(e),
1274
1274
  dispose() {
1275
- s.dispose();
1275
+ o.dispose();
1276
1276
  r.dispose();
1277
1277
  }
1278
1278
  };
@@ -1293,6 +1293,7 @@ let foundPending = false;
1293
1293
  let latestReadActive = false;
1294
1294
  let context = null;
1295
1295
  let currentOptimisticLane = null;
1296
+ let pendingCheckSources = null;
1296
1297
  let snapshotCaptureActive = false;
1297
1298
  let snapshotSources = null;
1298
1299
  function ownerInSnapshotScope(e) {
@@ -1323,10 +1324,10 @@ function releaseSubtree(e) {
1323
1324
  }
1324
1325
  if (t.L) {
1325
1326
  const e = t;
1326
- e._e &= ~CONFIG_IN_SNAPSHOT_SCOPE;
1327
- if (e._ & REACTIVE_SNAPSHOT_STALE) {
1328
- e._ &= ~REACTIVE_SNAPSHOT_STALE;
1329
- e._ |= REACTIVE_DIRTY;
1327
+ e.Oe &= ~CONFIG_IN_SNAPSHOT_SCOPE;
1328
+ if (e.O & REACTIVE_SNAPSHOT_STALE) {
1329
+ e.O &= ~REACTIVE_SNAPSHOT_STALE;
1330
+ e.O |= REACTIVE_DIRTY;
1330
1331
  if (dirtyQueue.C > e.o) dirtyQueue.C = e.o;
1331
1332
  insertIntoHeap(e, dirtyQueue);
1332
1333
  }
@@ -1350,29 +1351,29 @@ function recompute(e, t = false) {
1350
1351
  if (!t) {
1351
1352
  if (e.M && (!n || activeTransition) && activeTransition !== e.M)
1352
1353
  globalQueue.initTransition(e.M);
1353
- deleteFromHeap(e, e._ & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
1354
+ deleteFromHeap(e, e.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
1354
1355
  e.ve = null;
1355
1356
  if (e.M || n === EFFECT_TRACKED) disposeChildren(e);
1356
- else if (e.ge !== null || e.we !== null) {
1357
+ else if (e.ge !== null || e.be !== null) {
1357
1358
  markDisposal(e);
1358
- e.Ae = e.we;
1359
+ e.Ae = e.be;
1359
1360
  e.Ne = e.ge;
1360
- e.we = null;
1361
+ e.be = null;
1361
1362
  e.ge = null;
1362
1363
  e.me = 0;
1363
1364
  } else;
1364
1365
  }
1365
- let i = !!(e._ & REACTIVE_OPTIMISTIC_DIRTY);
1366
+ let i = !!(e.O & REACTIVE_OPTIMISTIC_DIRTY);
1366
1367
  const r = e.K !== undefined && e.K !== NOT_PENDING;
1367
- const s = !!(e.he & STATUS_PENDING);
1368
- const o = !!(e.he & STATUS_UNINITIALIZED);
1368
+ const o = !!(e.he & STATUS_PENDING);
1369
+ const s = !!(e.he & STATUS_UNINITIALIZED);
1369
1370
  const u = context;
1370
1371
  context = e;
1371
1372
  e.ye = null;
1372
- e._ = REACTIVE_RECOMPUTING_DEPS;
1373
+ e.O = REACTIVE_RECOMPUTING_DEPS;
1373
1374
  e.Ie = clock;
1374
- let l = e.B === NOT_PENDING ? e.ue : e.B;
1375
- let c = e.o;
1375
+ let c = e.B === NOT_PENDING ? e.ue : e.B;
1376
+ let l = e.o;
1376
1377
  let a = tracking;
1377
1378
  let f = currentOptimisticLane;
1378
1379
  tracking = true;
@@ -1382,12 +1383,12 @@ function recompute(e, t = false) {
1382
1383
  } else if (activeTransition && !t && activeTransition.Z.length) {
1383
1384
  for (let t = e.P; t; t = t.D) {
1384
1385
  const n = t.m;
1385
- if (n._ & REACTIVE_OPTIMISTIC_DIRTY) {
1386
+ if (n.O & REACTIVE_OPTIMISTIC_DIRTY) {
1386
1387
  const t = resolveLane(n);
1387
1388
  if (t) {
1388
1389
  i = true;
1389
1390
  currentOptimisticLane = t;
1390
- e._ |= REACTIVE_OPTIMISTIC_DIRTY;
1391
+ e.O |= REACTIVE_OPTIMISTIC_DIRTY;
1391
1392
  assignOrMergeLane(e, t);
1392
1393
  break;
1393
1394
  }
@@ -1398,32 +1399,32 @@ function recompute(e, t = false) {
1398
1399
  const S = stale;
1399
1400
  if (E) stale = true;
1400
1401
  try {
1401
- if (!false && e._e & CONFIG_SYNC) {
1402
- l = e.L(l);
1402
+ if (!false && e.Oe & CONFIG_SYNC) {
1403
+ c = e.L(c);
1403
1404
  e.ve = null;
1404
1405
  } else {
1405
1406
  const t = e.ve;
1406
- const n = e.L(l);
1407
+ const n = e.L(c);
1407
1408
  const i = typeof n === "object" && n !== null;
1408
1409
  const r = e.ve !== t;
1409
- l = r || !i ? n : handleAsync(e, n);
1410
+ c = r || !i ? n : handleAsync(e, n);
1410
1411
  if (!r && !i) e.ve = null;
1411
1412
  }
1412
1413
  clearStatus(e, t);
1413
1414
  if (e.G) {
1414
1415
  const t = resolveLane(e);
1415
1416
  if (t) {
1416
- t.k.delete(e);
1417
- updatePendingSignal(t.F);
1417
+ t.F.delete(e);
1418
+ updatePendingSignal(t.k);
1418
1419
  }
1419
1420
  }
1420
1421
  } catch (t) {
1421
1422
  if (t instanceof NotReadyError && currentOptimisticLane) {
1422
1423
  const t = findLane(currentOptimisticLane);
1423
- if (t.F !== e) {
1424
- t.k.add(e);
1424
+ if (t.k !== e) {
1425
+ t.F.add(e);
1425
1426
  e.G = t;
1426
- updatePendingSignal(t.F);
1427
+ updatePendingSignal(t.k);
1427
1428
  }
1428
1429
  }
1429
1430
  if (t instanceof NotReadyError) e.Ge = true;
@@ -1437,33 +1438,33 @@ function recompute(e, t = false) {
1437
1438
  } finally {
1438
1439
  tracking = a;
1439
1440
  if (E) stale = S;
1440
- e._ = REACTIVE_NONE | (t ? e._ & REACTIVE_SNAPSHOT_STALE : 0);
1441
+ e.O = REACTIVE_NONE | (t ? e.O & REACTIVE_SNAPSHOT_STALE : 0);
1441
1442
  context = u;
1442
1443
  }
1443
1444
  if (!e.Re) {
1444
1445
  trimStaleDeps(e);
1445
1446
  const u = r ? e.K : e.B === NOT_PENDING ? e.ue : e.B;
1446
- const a = (!n && o) || !e.Fe || !e.Fe(u, l);
1447
+ const a = (!n && s) || !e.ke || !e.ke(u, c);
1447
1448
  if (n && a) {
1448
1449
  e.ee = !e.Re;
1449
1450
  if (!t) e.te.enqueue(n, GlobalQueue.Te.bind(null, e));
1450
1451
  }
1451
1452
  if (a) {
1452
- const o = r ? e.K : undefined;
1453
+ const s = r ? e.K : undefined;
1453
1454
  if (t || (n && activeTransition !== e.M) || i) {
1454
- e.ue = l;
1455
+ e.ue = c;
1455
1456
  if (r && i) {
1456
- e.K = l;
1457
- e.B = l;
1457
+ e.K = c;
1458
+ e.B = c;
1458
1459
  }
1459
- } else e.B = l;
1460
- if (r && !i && s && !e.$) e.K = l;
1461
- if (!r || i || e.K !== o) insertSubs(e, i || r);
1460
+ } else e.B = c;
1461
+ if (r && !i && o && !e.$) e.K = c;
1462
+ if (!r || i || e.K !== s) insertSubs(e, i || r);
1462
1463
  } else if (r) {
1463
- e.B = l;
1464
- } else if (e.o != c) {
1464
+ e.B = c;
1465
+ } else if (e.o != l) {
1465
1466
  for (let t = e.I; t !== null; t = t.p) {
1466
- insertIntoHeapHeight(t.h, t.h._ & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
1467
+ insertIntoHeapHeight(t.h, t.h.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
1467
1468
  }
1468
1469
  }
1469
1470
  }
@@ -1477,36 +1478,36 @@ function recompute(e, t = false) {
1477
1478
  e.M && n && activeTransition !== e.M && runInTransition(e.M, () => recompute(e));
1478
1479
  }
1479
1480
  function updateIfNecessary(e) {
1480
- if (e._ & REACTIVE_CHECK) {
1481
+ if (e.O & REACTIVE_CHECK) {
1481
1482
  for (let t = e.P; t; t = t.D) {
1482
1483
  const n = t.m;
1483
1484
  const i = n.V || n;
1484
1485
  if (i.L) {
1485
1486
  updateIfNecessary(i);
1486
1487
  }
1487
- if (e._ & REACTIVE_DIRTY) {
1488
+ if (e.O & REACTIVE_DIRTY) {
1488
1489
  break;
1489
1490
  }
1490
1491
  }
1491
1492
  }
1492
- if (e._ & (REACTIVE_DIRTY | REACTIVE_OPTIMISTIC_DIRTY) || (e.Re && e.Ie < clock && !e.ve)) {
1493
+ if (e.O & (REACTIVE_DIRTY | REACTIVE_OPTIMISTIC_DIRTY) || (e.Re && e.Ie < clock && !e.ve)) {
1493
1494
  recompute(e);
1494
1495
  }
1495
- e._ = e._ & (REACTIVE_SNAPSHOT_STALE | REACTIVE_IN_HEAP | REACTIVE_IN_HEAP_HEIGHT);
1496
+ e.O = e.O & (REACTIVE_SNAPSHOT_STALE | REACTIVE_IN_HEAP | REACTIVE_IN_HEAP_HEIGHT);
1496
1497
  }
1497
1498
  function computed(e, t) {
1498
1499
  const n = t?.transparent ?? false;
1499
1500
  const i = {
1500
1501
  id: t?.id ?? (n ? context?.id : context?.id != null ? getNextChildId(context) : undefined),
1501
- _e:
1502
+ Oe:
1502
1503
  (n ? CONFIG_TRANSPARENT : 0) |
1503
1504
  (t?.ownedWrite ? CONFIG_OWNED_WRITE : 0) |
1504
1505
  (!context || t?.lazy ? CONFIG_AUTO_DISPOSE : 0) |
1505
1506
  (t?.sync ? CONFIG_SYNC : 0) |
1506
1507
  (snapshotCaptureActive && ownerInSnapshotScope(context) ? CONFIG_IN_SNAPSHOT_SCOPE : 0),
1507
- Fe: t?.equals != null ? t.equals : isEqual,
1508
+ ke: t?.equals != null ? t.equals : isEqual,
1508
1509
  X: t?.unobserved,
1509
- we: null,
1510
+ be: null,
1510
1511
  te: context?.te ?? globalQueue,
1511
1512
  Ve: context?.Ve ?? defaultContext,
1512
1513
  me: 0,
@@ -1522,9 +1523,9 @@ function computed(e, t) {
1522
1523
  Ue: null,
1523
1524
  i: context,
1524
1525
  De: null,
1525
- be: null,
1526
+ we: null,
1526
1527
  ge: null,
1527
- _: t?.lazy ? REACTIVE_LAZY : REACTIVE_NONE,
1528
+ O: t?.lazy ? REACTIVE_LAZY : REACTIVE_NONE,
1528
1529
  he: STATUS_UNINITIALIZED,
1529
1530
  Ie: clock,
1530
1531
  B: NOT_PENDING,
@@ -1536,18 +1537,18 @@ function computed(e, t) {
1536
1537
  setupComputedNode(i, t);
1537
1538
  return i;
1538
1539
  }
1539
- function createEffectNode(e, t, n, i, r, s) {
1540
- const o = s?.transparent ?? false;
1540
+ function createEffectNode(e, t, n, i, r, o) {
1541
+ const s = o?.transparent ?? false;
1541
1542
  const u = {
1542
- id: s?.id ?? (o ? context?.id : context?.id != null ? getNextChildId(context) : undefined),
1543
- _e:
1544
- (o ? CONFIG_TRANSPARENT : 0) |
1545
- (s?.ownedWrite ? CONFIG_OWNED_WRITE : 0) |
1546
- (s?.sync ? CONFIG_SYNC : 0) |
1543
+ id: o?.id ?? (s ? context?.id : context?.id != null ? getNextChildId(context) : undefined),
1544
+ Oe:
1545
+ (s ? CONFIG_TRANSPARENT : 0) |
1546
+ (o?.ownedWrite ? CONFIG_OWNED_WRITE : 0) |
1547
+ (o?.sync ? CONFIG_SYNC : 0) |
1547
1548
  (snapshotCaptureActive && ownerInSnapshotScope(context) ? CONFIG_IN_SNAPSHOT_SCOPE : 0),
1548
- Fe: false,
1549
- X: s?.unobserved,
1550
- we: null,
1549
+ ke: false,
1550
+ X: o?.unobserved,
1551
+ be: null,
1551
1552
  te: context?.te ?? globalQueue,
1552
1553
  Ve: context?.Ve ?? defaultContext,
1553
1554
  me: 0,
@@ -1563,9 +1564,9 @@ function createEffectNode(e, t, n, i, r, s) {
1563
1564
  Ue: null,
1564
1565
  i: context,
1565
1566
  De: null,
1566
- be: null,
1567
+ we: null,
1567
1568
  ge: null,
1568
- _: REACTIVE_LAZY,
1569
+ O: REACTIVE_LAZY,
1569
1570
  he: STATUS_UNINITIALIZED,
1570
1571
  Ie: clock,
1571
1572
  B: NOT_PENDING,
@@ -1595,7 +1596,7 @@ function setupComputedNode(e, t) {
1595
1596
  context.ge = e;
1596
1597
  } else {
1597
1598
  e.De = t;
1598
- t.be = e;
1599
+ t.we = e;
1599
1600
  context.ge = e;
1600
1601
  }
1601
1602
  }
@@ -1621,8 +1622,8 @@ function setupComputedNode(e, t) {
1621
1622
  }
1622
1623
  function signal(e, t, n = null) {
1623
1624
  const i = {
1624
- Fe: t?.equals != null ? t.equals : isEqual,
1625
- _e: (t?.ownedWrite ? CONFIG_OWNED_WRITE : 0) | (t?.Ye ? CONFIG_NO_SNAPSHOT : 0),
1625
+ ke: t?.equals != null ? t.equals : isEqual,
1626
+ Oe: (t?.ownedWrite ? CONFIG_OWNED_WRITE : 0) | (t?.Ye ? CONFIG_NO_SNAPSHOT : 0),
1626
1627
  X: t?.unobserved,
1627
1628
  ue: e,
1628
1629
  I: null,
@@ -1633,7 +1634,7 @@ function signal(e, t, n = null) {
1633
1634
  B: NOT_PENDING
1634
1635
  };
1635
1636
  n && (n.N = i);
1636
- if (snapshotCaptureActive && !(i._e & CONFIG_NO_SNAPSHOT) && !((n?.he ?? 0) & STATUS_PENDING)) {
1637
+ if (snapshotCaptureActive && !(i.Oe & CONFIG_NO_SNAPSHOT) && !((n?.he ?? 0) & STATUS_PENDING)) {
1637
1638
  i.pe = e === undefined ? NO_SNAPSHOT : e;
1638
1639
  snapshotSources.add(i);
1639
1640
  }
@@ -1682,7 +1683,7 @@ function read(e) {
1682
1683
  if (stale && currentOptimisticLane && t.G) {
1683
1684
  const e = findLane(t.G);
1684
1685
  const n = findLane(currentOptimisticLane);
1685
- if (e !== n && e.k.size > 0) {
1686
+ if (e !== n && e.F.size > 0) {
1686
1687
  return i;
1687
1688
  }
1688
1689
  }
@@ -1692,31 +1693,48 @@ function read(e) {
1692
1693
  const t = e.V;
1693
1694
  const n = pendingCheckActive;
1694
1695
  pendingCheckActive = false;
1696
+ let i = context;
1697
+ if (i?.t) i = i.u;
1698
+ const r = t || e;
1699
+ const o = e;
1700
+ if (typeof o.L === "function") {
1701
+ const t = e;
1702
+ if (t.O & REACTIVE_LAZY) {
1703
+ t.O &= ~REACTIVE_LAZY;
1704
+ recompute(t, true);
1705
+ } else if (t.O & REACTIVE_DISPOSED) {
1706
+ recompute(t, true);
1707
+ } else {
1708
+ updateIfNecessary(t);
1709
+ }
1710
+ }
1711
+ if (i && r.he & STATUS_PENDING && r.he & STATUS_UNINITIALIZED) {
1712
+ if (tracking && e !== i) link(e, i);
1713
+ pendingCheckActive = n;
1714
+ throw r.Re;
1715
+ }
1695
1716
  if (t && e.K !== undefined) {
1696
1717
  if (e.K !== NOT_PENDING && (t.ve || !!(t.he & STATUS_PENDING))) {
1697
1718
  foundPending = true;
1698
1719
  }
1699
- let n = context;
1700
- if (n?.t) n = n.u;
1701
- if (n && tracking) link(e, n);
1702
- read(getPendingSignal(e));
1703
- read(getPendingSignal(t));
1720
+ collectPendingSources(e);
1721
+ collectPendingSources(t);
1722
+ if (i && tracking) link(e, i);
1704
1723
  } else {
1705
- if (read(getPendingSignal(e))) foundPending = true;
1706
- if (t && read(getPendingSignal(t))) foundPending = true;
1724
+ collectPendingSources(e);
1725
+ if (t) collectPendingSources(t);
1707
1726
  }
1708
1727
  pendingCheckActive = n;
1709
- return e.ue;
1710
1728
  }
1711
1729
  let t = context;
1712
1730
  if (t?.t) t = t.u;
1713
1731
  const n = e;
1714
1732
  if (typeof n.L === "function") {
1715
1733
  const t = e;
1716
- if (t._ & REACTIVE_LAZY) {
1717
- t._ &= ~REACTIVE_LAZY;
1734
+ if (t.O & REACTIVE_LAZY) {
1735
+ t.O &= ~REACTIVE_LAZY;
1718
1736
  recompute(t, true);
1719
- } else if (t._ & REACTIVE_DISPOSED) {
1737
+ } else if (t.O & REACTIVE_DISPOSED) {
1720
1738
  recompute(t, true);
1721
1739
  }
1722
1740
  }
@@ -1737,7 +1755,7 @@ function read(e) {
1737
1755
  if (t && tracking) {
1738
1756
  link(e, t);
1739
1757
  if (i.L) {
1740
- const n = e._ & REACTIVE_ZOMBIE;
1758
+ const n = e.O & REACTIVE_ZOMBIE;
1741
1759
  if (i.o >= (n ? zombieQueue.C : dirtyQueue.C)) {
1742
1760
  markNode(t);
1743
1761
  markHeap(n ? zombieQueue : dirtyQueue);
@@ -1775,12 +1793,12 @@ function read(e) {
1775
1793
  return read(e);
1776
1794
  } else throw e.Re;
1777
1795
  }
1778
- if (snapshotCaptureActive && t && t._e & CONFIG_IN_SNAPSHOT_SCOPE) {
1796
+ if (snapshotCaptureActive && t && t.Oe & CONFIG_IN_SNAPSHOT_SCOPE) {
1779
1797
  const n = e.pe;
1780
1798
  if (n !== undefined) {
1781
1799
  const i = n === NO_SNAPSHOT ? undefined : n;
1782
1800
  const r = e.B !== NOT_PENDING ? e.B : e.ue;
1783
- if (r !== i) t._ |= REACTIVE_SNAPSHOT_STALE;
1801
+ if (r !== i) t.O |= REACTIVE_SNAPSHOT_STALE;
1784
1802
  return i;
1785
1803
  }
1786
1804
  }
@@ -1797,7 +1815,7 @@ function read(e) {
1797
1815
  !e.L &&
1798
1816
  t
1799
1817
  ) {
1800
- activeTransition.oe.add(t);
1818
+ activeTransition.se.add(t);
1801
1819
  return e.ue;
1802
1820
  }
1803
1821
  const r =
@@ -1812,7 +1830,7 @@ function read(e) {
1812
1830
  !t &&
1813
1831
  i === e &&
1814
1832
  typeof n.L === "function" &&
1815
- e._e & CONFIG_AUTO_DISPOSE &&
1833
+ e.Oe & CONFIG_AUTO_DISPOSE &&
1816
1834
  !(i.he & STATUS_PENDING) &&
1817
1835
  !e.I
1818
1836
  ) {
@@ -1826,8 +1844,8 @@ function setSignal(e, t) {
1826
1844
  const i = e.K !== undefined && e.K !== NOT_PENDING;
1827
1845
  const r = n ? (i ? e.K : e.ue) : e.B === NOT_PENDING ? e.ue : e.B;
1828
1846
  if (typeof t === "function") t = t(r);
1829
- const s = !e.Fe || !e.Fe(r, t) || !!(e.he & STATUS_UNINITIALIZED);
1830
- if (!s) {
1847
+ const o = !e.ke || !e.ke(r, t) || !!(e.he & STATUS_UNINITIALIZED);
1848
+ if (!o) {
1831
1849
  if (n && i && e.L) {
1832
1850
  insertSubs(e, true);
1833
1851
  schedule();
@@ -1850,8 +1868,8 @@ function setSignal(e, t) {
1850
1868
  e.B = t;
1851
1869
  }
1852
1870
  if (e.We) updatePendingSignal(e);
1853
- if (e.ke) {
1854
- setSignal(e.ke, t);
1871
+ if (e.Fe) {
1872
+ setSignal(e.Fe, t);
1855
1873
  }
1856
1874
  e.Ie = clock;
1857
1875
  insertSubs(e, n);
@@ -1859,9 +1877,9 @@ function setSignal(e, t) {
1859
1877
  return t;
1860
1878
  }
1861
1879
  function suppressComputedRecompute(e) {
1862
- deleteFromHeap(e, e._ & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
1863
- if (!(e._ & REACTIVE_MANUAL_WRITE) && e.B === NOT_PENDING) queuePendingNode(e);
1864
- e._ = (e._ & -4) | REACTIVE_MANUAL_WRITE;
1880
+ deleteFromHeap(e, e.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
1881
+ if (!(e.O & REACTIVE_MANUAL_WRITE) && e.B === NOT_PENDING) queuePendingNode(e);
1882
+ e.O = (e.O & -4) | REACTIVE_MANUAL_WRITE;
1865
1883
  }
1866
1884
  function setMemo(e, t) {
1867
1885
  const n = setSignal(e, t);
@@ -1890,9 +1908,19 @@ function getPendingSignal(e) {
1890
1908
  }
1891
1909
  return e.We;
1892
1910
  }
1911
+ function collectPendingSources(e) {
1912
+ pendingCheckSources?.add(e);
1913
+ const t = e.V || e;
1914
+ if (t !== e) pendingCheckSources?.add(t);
1915
+ }
1893
1916
  function computePendingState(e) {
1894
1917
  const t = e;
1895
1918
  const n = e.V;
1919
+ if (e.U) {
1920
+ const n = e.U;
1921
+ if (n.he & STATUS_PENDING && !(n.he & STATUS_UNINITIALIZED)) return true;
1922
+ return e.B !== NOT_PENDING && !(t.he & STATUS_UNINITIALIZED);
1923
+ }
1896
1924
  if (n && e.B !== NOT_PENDING) {
1897
1925
  return !n.ve && !(n.he & STATUS_PENDING);
1898
1926
  }
@@ -1900,7 +1928,7 @@ function computePendingState(e) {
1900
1928
  if (t.he & STATUS_PENDING && !(t.he & STATUS_UNINITIALIZED)) return true;
1901
1929
  if (e.U) {
1902
1930
  const t = e.G ? findLane(e.G) : null;
1903
- return !!(t && t.k.size > 0);
1931
+ return !!(t && t.F.size > 0);
1904
1932
  }
1905
1933
  return true;
1906
1934
  }
@@ -1917,7 +1945,7 @@ function updatePendingSignal(e) {
1917
1945
  setSignal(n, t);
1918
1946
  if (!t && n.G) {
1919
1947
  const t = resolveLane(e);
1920
- if (t && t.k.size > 0) {
1948
+ if (t && t.F.size > 0) {
1921
1949
  const e = findLane(n.G);
1922
1950
  if (e !== t) {
1923
1951
  mergeLanes(t, e);
@@ -1929,20 +1957,20 @@ function updatePendingSignal(e) {
1929
1957
  }
1930
1958
  }
1931
1959
  function getLatestValueComputed(e) {
1932
- if (!e.ke) {
1960
+ if (!e.Fe) {
1933
1961
  const t = latestReadActive;
1934
1962
  latestReadActive = false;
1935
1963
  const n = pendingCheckActive;
1936
1964
  pendingCheckActive = false;
1937
1965
  const i = context;
1938
1966
  context = null;
1939
- e.ke = optimisticComputed(() => read(e));
1940
- e.ke.U = e;
1967
+ e.Fe = optimisticComputed(() => read(e));
1968
+ e.Fe.U = e;
1941
1969
  context = i;
1942
1970
  pendingCheckActive = n;
1943
1971
  latestReadActive = t;
1944
1972
  }
1945
- return e.ke;
1973
+ return e.Fe;
1946
1974
  }
1947
1975
  function staleValues(e, t = true) {
1948
1976
  const n = stale;
@@ -1965,16 +1993,35 @@ function latest(e) {
1965
1993
  function isPending(e) {
1966
1994
  const t = pendingCheckActive;
1967
1995
  const n = foundPending;
1996
+ const i = pendingCheckSources;
1968
1997
  pendingCheckActive = true;
1969
1998
  foundPending = false;
1999
+ pendingCheckSources = new Set();
2000
+ const collectPending = () => {
2001
+ pendingCheckActive = false;
2002
+ try {
2003
+ pendingCheckSources.forEach(e => {
2004
+ if (read(getPendingSignal(e))) foundPending = true;
2005
+ });
2006
+ } finally {
2007
+ pendingCheckActive = true;
2008
+ }
2009
+ };
1970
2010
  try {
1971
2011
  e();
2012
+ collectPending();
1972
2013
  return foundPending;
1973
- } catch {
2014
+ } catch (e) {
2015
+ collectPending();
2016
+ if (e instanceof NotReadyError) {
2017
+ if (foundPending && !(e.source?.he & STATUS_UNINITIALIZED)) return true;
2018
+ if (context) throw e;
2019
+ }
1974
2020
  return foundPending;
1975
2021
  } finally {
1976
2022
  pendingCheckActive = t;
1977
2023
  foundPending = n;
2024
+ pendingCheckSources = i;
1978
2025
  }
1979
2026
  }
1980
2027
  function refresh(e) {
@@ -1983,7 +2030,7 @@ function refresh(e) {
1983
2030
  try {
1984
2031
  const t = e?.[$REFRESH];
1985
2032
  if (false && !t);
1986
- if (t && typeof t.L === "function" && !(t._ & REACTIVE_DISPOSED)) {
2033
+ if (t && typeof t.L === "function" && !(t.O & REACTIVE_DISPOSED)) {
1987
2034
  recompute(t);
1988
2035
  }
1989
2036
  } finally {
@@ -2023,12 +2070,12 @@ function isUndefined(e) {
2023
2070
  }
2024
2071
  function effect(e, t, n, i) {
2025
2072
  const r = !!i?.user;
2026
- const s = createEffectNode(e, t, n, r ? EFFECT_USER : EFFECT_RENDER, notifyEffectStatus, i);
2027
- recompute(s, true);
2073
+ const o = createEffectNode(e, t, n, r ? EFFECT_USER : EFFECT_RENDER, notifyEffectStatus, i);
2074
+ recompute(o, true);
2028
2075
  !i?.defer &&
2029
- (s.J === EFFECT_USER || i?.schedule
2030
- ? s.te.enqueue(s.J, runEffect.bind(null, s))
2031
- : runEffect(s));
2076
+ (o.J === EFFECT_USER || i?.schedule
2077
+ ? o.te.enqueue(o.J, runEffect.bind(null, o))
2078
+ : runEffect(o));
2032
2079
  }
2033
2080
  function notifyEffectStatus(e, t) {
2034
2081
  const n = e !== undefined ? e : this.he;
@@ -2054,7 +2101,7 @@ function notifyEffectStatus(e, t) {
2054
2101
  }
2055
2102
  }
2056
2103
  function runEffect(e) {
2057
- if (!e.ee || e._ & REACTIVE_DISPOSED) return;
2104
+ if (!e.ee || e.O & REACTIVE_DISPOSED) return;
2058
2105
  e.$e?.();
2059
2106
  e.$e = undefined;
2060
2107
  try {
@@ -2077,7 +2124,7 @@ function runEffect(e) {
2077
2124
  GlobalQueue.Te = runEffect;
2078
2125
  function trackedEffect(e, t) {
2079
2126
  const run = () => {
2080
- if (!n.ee || n._ & REACTIVE_DISPOSED) return;
2127
+ if (!n.ee || n.O & REACTIVE_DISPOSED) return;
2081
2128
  try {
2082
2129
  n.ee = false;
2083
2130
  recompute(n);
@@ -2094,7 +2141,7 @@ function trackedEffect(e, t) {
2094
2141
  { ...t, lazy: true }
2095
2142
  );
2096
2143
  n.$e = undefined;
2097
- n._e = (n._e & ~CONFIG_AUTO_DISPOSE) | CONFIG_CHILDREN_FORBIDDEN;
2144
+ n.Oe = (n.Oe & ~CONFIG_AUTO_DISPOSE) | CONFIG_CHILDREN_FORBIDDEN;
2098
2145
  n.ee = true;
2099
2146
  n.J = EFFECT_TRACKED;
2100
2147
  n.xe = (e, t) => {
@@ -2120,13 +2167,13 @@ function action(e) {
2120
2167
  new Promise((n, i) => {
2121
2168
  const r = e(...t);
2122
2169
  globalQueue.initTransition();
2123
- let s = activeTransition;
2124
- s.re.push(r);
2170
+ let o = activeTransition;
2171
+ o.re.push(r);
2125
2172
  const done = (e, t) => {
2126
- s = currentTransition(s);
2127
- const o = s.re.indexOf(r);
2128
- if (o >= 0) s.re.splice(o, 1);
2129
- setActiveTransition(s);
2173
+ o = currentTransition(o);
2174
+ const s = o.re.indexOf(r);
2175
+ if (s >= 0) o.re.splice(s, 1);
2176
+ setActiveTransition(o);
2130
2177
  schedule();
2131
2178
  t ? i(t) : n(e);
2132
2179
  };
@@ -2138,17 +2185,17 @@ function action(e) {
2138
2185
  return done(undefined, e);
2139
2186
  }
2140
2187
  if (n instanceof Promise)
2141
- return void n.then(run, e => restoreTransition(s, () => step(e, true)));
2188
+ return void n.then(run, e => restoreTransition(o, () => step(e, true)));
2142
2189
  run(n);
2143
2190
  };
2144
2191
  const run = e => {
2145
2192
  if (e.done) return done(e.value);
2146
2193
  if (e.value instanceof Promise)
2147
2194
  return void e.value.then(
2148
- e => restoreTransition(s, () => step(e)),
2149
- e => restoreTransition(s, () => step(e, true))
2195
+ e => restoreTransition(o, () => step(e)),
2196
+ e => restoreTransition(o, () => step(e, true))
2150
2197
  );
2151
- restoreTransition(s, () => step(e.value));
2198
+ restoreTransition(o, () => step(e.value));
2152
2199
  };
2153
2200
  step();
2154
2201
  });
@@ -2164,7 +2211,7 @@ function accessor(e) {
2164
2211
  function createSignal(e, t) {
2165
2212
  if (typeof e === "function") {
2166
2213
  const n = computed(e, t);
2167
- n._e &= ~CONFIG_AUTO_DISPOSE;
2214
+ n.Oe &= ~CONFIG_AUTO_DISPOSE;
2168
2215
  return [accessor(n), setMemo.bind(null, n)];
2169
2216
  }
2170
2217
  const n = signal(e, t);
@@ -2221,7 +2268,7 @@ function resolve(e) {
2221
2268
  function createOptimistic(e, t) {
2222
2269
  if (typeof e === "function") {
2223
2270
  const n = optimisticComputed(e, t);
2224
- n._e &= ~CONFIG_AUTO_DISPOSE;
2271
+ n.Oe &= ~CONFIG_AUTO_DISPOSE;
2225
2272
  return [accessor(n), setSignal.bind(null, n)];
2226
2273
  }
2227
2274
  const n = optimisticSignal(e, t);
@@ -2229,7 +2276,7 @@ function createOptimistic(e, t) {
2229
2276
  }
2230
2277
  function onSettled(e) {
2231
2278
  const t = getOwner();
2232
- t && !(t._e & CONFIG_CHILDREN_FORBIDDEN)
2279
+ t && !(t.Oe & CONFIG_CHILDREN_FORBIDDEN)
2233
2280
  ? createTrackedEffect(() => untrack(e), undefined)
2234
2281
  : globalQueue.enqueue(EFFECT_USER, () => {
2235
2282
  const t = e();
@@ -2264,27 +2311,27 @@ function applyStateFast(e, t, n) {
2264
2311
  t[STORE_VALUE] = e;
2265
2312
  if (Array.isArray(i)) {
2266
2313
  let r = false;
2267
- const s = i.length;
2268
- if (e.length && s && e[0] && n(e[0]) != null) {
2269
- let o, u, l, c, a, f, E, S;
2314
+ const o = i.length;
2315
+ if (e.length && o && e[0] && n(e[0]) != null) {
2316
+ let s, u, c, l, a, f, E, S;
2270
2317
  for (
2271
- l = 0, c = Math.min(s, e.length);
2272
- l < c && ((f = i[l]) === e[l] || (f && e[l] && n(f) === n(e[l])));
2273
- l++
2318
+ c = 0, l = Math.min(o, e.length);
2319
+ c < l && ((f = i[c]) === e[c] || (f && e[c] && n(f) === n(e[c])));
2320
+ c++
2274
2321
  ) {
2275
- applyState(e[l], wrap(f, t), n);
2322
+ applyState(e[c], wrap(f, t), n);
2276
2323
  }
2277
2324
  const T = new Array(e.length),
2278
2325
  d = new Map();
2279
2326
  for (
2280
- c = s - 1, a = e.length - 1;
2281
- c >= l && a >= l && ((f = i[c]) === e[a] || (f && e[a] && n(f) === n(e[a])));
2282
- c--, a--
2327
+ l = o - 1, a = e.length - 1;
2328
+ l >= c && a >= c && ((f = i[l]) === e[a] || (f && e[a] && n(f) === n(e[a])));
2329
+ l--, a--
2283
2330
  ) {
2284
2331
  T[a] = f;
2285
2332
  }
2286
- if (l > a || l > c) {
2287
- for (u = l; u <= a; u++) {
2333
+ if (c > a || c > l) {
2334
+ for (u = c; u <= a; u++) {
2288
2335
  r = true;
2289
2336
  t[STORE_NODE][u] && setSignal(t[STORE_NODE][u], wrap(e[u], t));
2290
2337
  }
@@ -2295,19 +2342,19 @@ function applyStateFast(e, t, n) {
2295
2342
  applyState(e[u], i, n);
2296
2343
  }
2297
2344
  r && t[STORE_NODE][$TRACK] && setSignal(t[STORE_NODE][$TRACK], void 0);
2298
- s !== e.length && t[STORE_NODE].length && setSignal(t[STORE_NODE].length, e.length);
2345
+ o !== e.length && t[STORE_NODE].length && setSignal(t[STORE_NODE].length, e.length);
2299
2346
  return;
2300
2347
  }
2301
2348
  E = new Array(a + 1);
2302
- for (u = a; u >= l; u--) {
2349
+ for (u = a; u >= c; u--) {
2303
2350
  f = e[u];
2304
2351
  S = f ? n(f) : f;
2305
- o = d.get(S);
2306
- E[u] = o === undefined ? -1 : o;
2352
+ s = d.get(S);
2353
+ E[u] = s === undefined ? -1 : s;
2307
2354
  d.set(S, u);
2308
2355
  }
2309
- for (o = l; o <= c; o++) {
2310
- f = i[o];
2356
+ for (s = c; s <= l; s++) {
2357
+ f = i[s];
2311
2358
  S = f ? n(f) : f;
2312
2359
  u = d.get(S);
2313
2360
  if (u !== undefined && u !== -1) {
@@ -2316,23 +2363,23 @@ function applyStateFast(e, t, n) {
2316
2363
  d.set(S, u);
2317
2364
  }
2318
2365
  }
2319
- for (u = l; u < e.length; u++) {
2366
+ for (u = c; u < e.length; u++) {
2320
2367
  if (u in T) {
2321
2368
  const i = wrap(T[u], t);
2322
2369
  t[STORE_NODE][u] && setSignal(t[STORE_NODE][u], i);
2323
2370
  applyState(e[u], i, n);
2324
2371
  } else t[STORE_NODE][u] && setSignal(t[STORE_NODE][u], wrap(e[u], t));
2325
2372
  }
2326
- if (l < e.length) r = true;
2373
+ if (c < e.length) r = true;
2327
2374
  } else if (e.length) {
2328
- for (let r = 0, s = e.length; r < s; r++) {
2329
- const s = i[r];
2330
- isWrappable(s)
2331
- ? applyState(e[r], wrap(s, t), n)
2375
+ for (let r = 0, o = e.length; r < o; r++) {
2376
+ const o = i[r];
2377
+ isWrappable(o)
2378
+ ? applyState(e[r], wrap(o, t), n)
2332
2379
  : t[STORE_NODE][r] && setSignal(t[STORE_NODE][r], e[r]);
2333
2380
  }
2334
2381
  }
2335
- if (s !== e.length) {
2382
+ if (o !== e.length) {
2336
2383
  r = true;
2337
2384
  t[STORE_NODE].length && setSignal(t[STORE_NODE].length, e.length);
2338
2385
  }
@@ -2341,17 +2388,17 @@ function applyStateFast(e, t, n) {
2341
2388
  }
2342
2389
  let r = t[STORE_NODE];
2343
2390
  if (r) {
2344
- const s = r[$TRACK];
2345
- const o = s ? getAllKeys(i, undefined, e) : Object.keys(r);
2346
- for (let u = 0, l = o.length; u < l; u++) {
2347
- const l = o[u];
2348
- const c = r[l];
2349
- const a = unwrap(i[l]);
2350
- let f = unwrap(e[l]);
2391
+ const o = r[$TRACK];
2392
+ const s = o ? getAllKeys(i, undefined, e) : Object.keys(r);
2393
+ for (let u = 0, c = s.length; u < c; u++) {
2394
+ const c = s[u];
2395
+ const l = r[c];
2396
+ const a = unwrap(i[c]);
2397
+ let f = unwrap(e[c]);
2351
2398
  if (a === f) continue;
2352
2399
  if (!a || !isWrappable(a) || !isWrappable(f) || (n(a) != null && n(a) !== n(f))) {
2353
- s && setSignal(s, void 0);
2354
- c && setSignal(c, isWrappable(f) ? wrap(f, t) : f);
2400
+ o && setSignal(o, void 0);
2401
+ l && setSignal(l, isWrappable(f) ? wrap(f, t) : f);
2355
2402
  } else applyState(f, wrap(a, t), n);
2356
2403
  }
2357
2404
  }
@@ -2366,97 +2413,97 @@ function applyStateFast(e, t, n) {
2366
2413
  function applyStateSlow(e, t, n) {
2367
2414
  const i = t[STORE_VALUE];
2368
2415
  const r = t[STORE_OVERRIDE];
2369
- const s = t[STORE_OPTIMISTIC_OVERRIDE];
2370
- let o = t[STORE_NODE];
2416
+ const o = t[STORE_OPTIMISTIC_OVERRIDE];
2417
+ let s = t[STORE_NODE];
2371
2418
  (t[STORE_LOOKUP] || storeLookup).set(e, t[$PROXY]);
2372
2419
  t[STORE_VALUE] = e;
2373
2420
  t[STORE_OVERRIDE] = undefined;
2374
2421
  if (Array.isArray(i)) {
2375
- let o = false;
2376
- const u = getOverrideValue(i, r, "length", s);
2422
+ let s = false;
2423
+ const u = getOverrideValue(i, r, "length", o);
2377
2424
  if (e.length && u && e[0] && n(e[0]) != null) {
2378
- let l, c, a, f, E, S, T, d;
2425
+ let c, l, a, f, E, S, T, d;
2379
2426
  for (
2380
2427
  a = 0, f = Math.min(u, e.length);
2381
- a < f && ((S = getOverrideValue(i, r, a, s)) === e[a] || (S && e[a] && n(S) === n(e[a])));
2428
+ a < f && ((S = getOverrideValue(i, r, a, o)) === e[a] || (S && e[a] && n(S) === n(e[a])));
2382
2429
  a++
2383
2430
  ) {
2384
2431
  applyState(e[a], wrap(S, t), n);
2385
2432
  }
2386
- const O = new Array(e.length),
2387
- _ = new Map();
2433
+ const _ = new Array(e.length),
2434
+ O = new Map();
2388
2435
  for (
2389
2436
  f = u - 1, E = e.length - 1;
2390
2437
  f >= a &&
2391
2438
  E >= a &&
2392
- ((S = getOverrideValue(i, r, f, s)) === e[E] || (S && e[E] && n(S) === n(e[E])));
2439
+ ((S = getOverrideValue(i, r, f, o)) === e[E] || (S && e[E] && n(S) === n(e[E])));
2393
2440
  f--, E--
2394
2441
  ) {
2395
- O[E] = S;
2442
+ _[E] = S;
2396
2443
  }
2397
2444
  if (a > E || a > f) {
2398
- for (c = a; c <= E; c++) {
2399
- o = true;
2400
- t[STORE_NODE][c] && setSignal(t[STORE_NODE][c], wrap(e[c], t));
2445
+ for (l = a; l <= E; l++) {
2446
+ s = true;
2447
+ t[STORE_NODE][l] && setSignal(t[STORE_NODE][l], wrap(e[l], t));
2401
2448
  }
2402
- for (; c < e.length; c++) {
2403
- o = true;
2404
- const i = wrap(O[c], t);
2405
- t[STORE_NODE][c] && setSignal(t[STORE_NODE][c], i);
2406
- applyState(e[c], i, n);
2449
+ for (; l < e.length; l++) {
2450
+ s = true;
2451
+ const i = wrap(_[l], t);
2452
+ t[STORE_NODE][l] && setSignal(t[STORE_NODE][l], i);
2453
+ applyState(e[l], i, n);
2407
2454
  }
2408
- o && t[STORE_NODE][$TRACK] && setSignal(t[STORE_NODE][$TRACK], void 0);
2455
+ s && t[STORE_NODE][$TRACK] && setSignal(t[STORE_NODE][$TRACK], void 0);
2409
2456
  u !== e.length && t[STORE_NODE].length && setSignal(t[STORE_NODE].length, e.length);
2410
2457
  return;
2411
2458
  }
2412
2459
  T = new Array(E + 1);
2413
- for (c = E; c >= a; c--) {
2414
- S = e[c];
2460
+ for (l = E; l >= a; l--) {
2461
+ S = e[l];
2415
2462
  d = S ? n(S) : S;
2416
- l = _.get(d);
2417
- T[c] = l === undefined ? -1 : l;
2418
- _.set(d, c);
2463
+ c = O.get(d);
2464
+ T[l] = c === undefined ? -1 : c;
2465
+ O.set(d, l);
2419
2466
  }
2420
- for (l = a; l <= f; l++) {
2421
- S = getOverrideValue(i, r, l, s);
2467
+ for (c = a; c <= f; c++) {
2468
+ S = getOverrideValue(i, r, c, o);
2422
2469
  d = S ? n(S) : S;
2423
- c = _.get(d);
2424
- if (c !== undefined && c !== -1) {
2425
- O[c] = S;
2426
- c = T[c];
2427
- _.set(d, c);
2470
+ l = O.get(d);
2471
+ if (l !== undefined && l !== -1) {
2472
+ _[l] = S;
2473
+ l = T[l];
2474
+ O.set(d, l);
2428
2475
  }
2429
2476
  }
2430
- for (c = a; c < e.length; c++) {
2431
- if (c in O) {
2432
- const i = wrap(O[c], t);
2433
- t[STORE_NODE][c] && setSignal(t[STORE_NODE][c], i);
2434
- applyState(e[c], i, n);
2435
- } else t[STORE_NODE][c] && setSignal(t[STORE_NODE][c], wrap(e[c], t));
2477
+ for (l = a; l < e.length; l++) {
2478
+ if (l in _) {
2479
+ const i = wrap(_[l], t);
2480
+ t[STORE_NODE][l] && setSignal(t[STORE_NODE][l], i);
2481
+ applyState(e[l], i, n);
2482
+ } else t[STORE_NODE][l] && setSignal(t[STORE_NODE][l], wrap(e[l], t));
2436
2483
  }
2437
- if (a < e.length) o = true;
2484
+ if (a < e.length) s = true;
2438
2485
  } else if (e.length) {
2439
- for (let o = 0, u = e.length; o < u; o++) {
2440
- const u = getOverrideValue(i, r, o, s);
2486
+ for (let s = 0, u = e.length; s < u; s++) {
2487
+ const u = getOverrideValue(i, r, s, o);
2441
2488
  isWrappable(u)
2442
- ? applyState(e[o], wrap(u, t), n)
2443
- : t[STORE_NODE][o] && setSignal(t[STORE_NODE][o], e[o]);
2489
+ ? applyState(e[s], wrap(u, t), n)
2490
+ : t[STORE_NODE][s] && setSignal(t[STORE_NODE][s], e[s]);
2444
2491
  }
2445
2492
  }
2446
2493
  if (u !== e.length) {
2447
- o = true;
2494
+ s = true;
2448
2495
  t[STORE_NODE].length && setSignal(t[STORE_NODE].length, e.length);
2449
2496
  }
2450
- o && t[STORE_NODE][$TRACK] && setSignal(t[STORE_NODE][$TRACK], void 0);
2497
+ s && t[STORE_NODE][$TRACK] && setSignal(t[STORE_NODE][$TRACK], void 0);
2451
2498
  return;
2452
2499
  }
2453
- if (o) {
2454
- const u = o[$TRACK];
2455
- const l = u ? getAllKeys(i, r, e) : Object.keys(o);
2456
- for (let c = 0, a = l.length; c < a; c++) {
2457
- const a = l[c];
2458
- const f = o[a];
2459
- const E = unwrap(getOverrideValue(i, r, a, s));
2500
+ if (s) {
2501
+ const u = s[$TRACK];
2502
+ const c = u ? getAllKeys(i, r, e) : Object.keys(s);
2503
+ for (let l = 0, a = c.length; l < a; l++) {
2504
+ const a = c[l];
2505
+ const f = s[a];
2506
+ const E = unwrap(getOverrideValue(i, r, a, o));
2460
2507
  let S = unwrap(e[a]);
2461
2508
  if (E === S) continue;
2462
2509
  if (!E || !isWrappable(E) || !isWrappable(S) || (n(E) != null && n(E) !== n(S))) {
@@ -2465,11 +2512,11 @@ function applyStateSlow(e, t, n) {
2465
2512
  } else applyState(S, wrap(E, t), n);
2466
2513
  }
2467
2514
  }
2468
- if ((o = t[STORE_HAS])) {
2469
- const t = Object.keys(o);
2515
+ if ((s = t[STORE_HAS])) {
2516
+ const t = Object.keys(s);
2470
2517
  for (let n = 0, i = t.length; n < i; n++) {
2471
2518
  const i = t[n];
2472
- setSignal(o[i], i in e);
2519
+ setSignal(s[i], i in e);
2473
2520
  }
2474
2521
  }
2475
2522
  }
@@ -2503,34 +2550,34 @@ function createProjectionInternal(e, t, n) {
2503
2550
  r.set(e, t);
2504
2551
  return t;
2505
2552
  };
2506
- const s = wrapProjection(t);
2553
+ const o = wrapProjection(t);
2507
2554
  i = computed(() => {
2508
2555
  if (!i) i = getOwner();
2509
- runProjectionComputed(s, e, n?.key || "id");
2556
+ runProjectionComputed(o, e, n?.key || "id");
2510
2557
  }, undefined);
2511
- i._e &= ~CONFIG_AUTO_DISPOSE;
2512
- return { store: s, node: i };
2558
+ i.Oe &= ~CONFIG_AUTO_DISPOSE;
2559
+ return { store: o, node: i };
2513
2560
  }
2514
2561
  function createProjection(e, t, n) {
2515
2562
  return createProjectionInternal(e, t, n).store;
2516
2563
  }
2517
2564
  function runProjectionComputed(e, t, n, i) {
2518
2565
  const r = getOwner();
2519
- let s = false;
2520
- let o;
2566
+ let o = false;
2567
+ let s;
2521
2568
  const u = new Proxy(
2522
2569
  e,
2523
- createWriteTraps(() => !s || r.ve === o)
2570
+ createWriteTraps(() => !o || r.ve === s)
2524
2571
  );
2525
2572
  storeSetter(u, u => {
2526
- o = t(u);
2527
- s = true;
2573
+ s = t(u);
2574
+ o = true;
2528
2575
  const commit = t => {
2529
2576
  if (t === u || t === undefined) return;
2530
2577
  const write = () => storeSetter(e, reconcile(t, n));
2531
2578
  i ? i(write) : write();
2532
2579
  };
2533
- commit(handleAsync(r, o, commit));
2580
+ commit(handleAsync(r, s, commit));
2534
2581
  });
2535
2582
  return r;
2536
2583
  }
@@ -2638,6 +2685,16 @@ function writeOnly(e) {
2638
2685
  function unwrapStoreValue(e) {
2639
2686
  return e?.[$TARGET]?.[STORE_VALUE] ?? e;
2640
2687
  }
2688
+ function isPrototypePollutionKey$1(e) {
2689
+ return e === "__proto__" || e === "constructor" || e === "prototype";
2690
+ }
2691
+ function hasOwnStoreProperty(e, t) {
2692
+ const n = e[STORE_OPTIMISTIC_OVERRIDE];
2693
+ if (n && Object.prototype.hasOwnProperty.call(n, t) && n[t] !== $DELETED) return true;
2694
+ const i = e[STORE_OVERRIDE];
2695
+ if (i && Object.prototype.hasOwnProperty.call(i, t) && i[t] !== $DELETED) return true;
2696
+ return Object.prototype.hasOwnProperty.call(unwrapStoreValue(e[STORE_VALUE]), t);
2697
+ }
2641
2698
  function hasInheritedAccessor(e, t) {
2642
2699
  let n = Object.getPrototypeOf(e);
2643
2700
  while (n && n !== Object.prototype) {
@@ -2652,7 +2709,7 @@ function getNodes(e, t) {
2652
2709
  if (!n) e[t] = n = Object.create(null);
2653
2710
  return n;
2654
2711
  }
2655
- function getNode(e, t, n, i, r = isEqual, s, o) {
2712
+ function getNode(e, t, n, i, r = isEqual, o, s) {
2656
2713
  if (e[t]) return e[t];
2657
2714
  const u = signal(
2658
2715
  n,
@@ -2664,11 +2721,11 @@ function getNode(e, t, n, i, r = isEqual, s, o) {
2664
2721
  },
2665
2722
  i
2666
2723
  );
2667
- if (s) {
2724
+ if (o) {
2668
2725
  u.K = NOT_PENDING;
2669
2726
  }
2670
- if (o && t in o) {
2671
- const e = o[t];
2727
+ if (s && t in s) {
2728
+ const e = s[t];
2672
2729
  u.pe = e === undefined ? NO_SNAPSHOT : e;
2673
2730
  snapshotSources?.add(u);
2674
2731
  }
@@ -2684,8 +2741,8 @@ function getKeys(e, t, n = true) {
2684
2741
  const i = untrack(() => (n ? Object.keys(e) : Reflect.ownKeys(e)));
2685
2742
  if (!t) return i;
2686
2743
  const r = new Set(i);
2687
- const s = Reflect.ownKeys(t);
2688
- for (const e of s) {
2744
+ const o = Reflect.ownKeys(t);
2745
+ for (const e of o) {
2689
2746
  if (t[e] !== $DELETED) r.add(e);
2690
2747
  else r.delete(e);
2691
2748
  }
@@ -2721,50 +2778,50 @@ function prepareStoreWrite(e, t, n) {
2721
2778
  e[STORE_SNAPSHOT_PROPS][n] = r;
2722
2779
  }
2723
2780
  }
2724
- const s = e[STORE_OPTIMISTIC] && !projectionWriteActive;
2725
- const o = s ? STORE_OPTIMISTIC_OVERRIDE : STORE_OVERRIDE;
2726
- if (s) trackOptimisticStore(t);
2727
- return { base: r, overrideKey: o, state: i };
2781
+ const o = e[STORE_OPTIMISTIC] && !projectionWriteActive;
2782
+ const s = o ? STORE_OPTIMISTIC_OVERRIDE : STORE_OVERRIDE;
2783
+ if (o) trackOptimisticStore(t);
2784
+ return { base: r, overrideKey: s, state: i };
2728
2785
  }
2729
2786
  function upsertStoreNode(e, t, n, i, r) {
2730
2787
  if (t[n]) return t[n];
2731
- const s = isWrappable(i) ? wrap(i, e) : i;
2732
- const o = getNode(t, n, s, e[STORE_FIREWALL], isEqual, e[STORE_OPTIMISTIC], r);
2733
- registerTransientStoreNode(o);
2734
- return o;
2788
+ const o = isWrappable(i) ? wrap(i, e) : i;
2789
+ const s = getNode(t, n, o, e[STORE_FIREWALL], isEqual, e[STORE_OPTIMISTIC], r);
2790
+ registerTransientStoreNode(s);
2791
+ return s;
2735
2792
  }
2736
- function notifyStoreProperty(e, t, n, i, r, s) {
2737
- const o = projectionWriteActive || e[STORE_OPTIMISTIC];
2793
+ function notifyStoreProperty(e, t, n, i, r, o) {
2794
+ const s = projectionWriteActive || e[STORE_OPTIMISTIC];
2738
2795
  const u = n !== "delete";
2739
- const l = e[STORE_HAS]?.[t];
2740
- if (l) {
2741
- setSignal(l, u);
2742
- } else if (!o && n !== "invalidate" && s !== u) {
2743
- const n = upsertStoreNode(e, getNodes(e, STORE_HAS), t, s);
2796
+ const c = e[STORE_HAS]?.[t];
2797
+ if (c) {
2798
+ setSignal(c, u);
2799
+ } else if (!s && n !== "invalidate" && o !== u) {
2800
+ const n = upsertStoreNode(e, getNodes(e, STORE_HAS), t, o);
2744
2801
  setSignal(n, u);
2745
2802
  }
2746
- const c = getNodes(e, STORE_NODE);
2803
+ const l = getNodes(e, STORE_NODE);
2747
2804
  if (n === "set") {
2748
- if (c[t]) {
2749
- setSignal(c[t], () => (isWrappable(i) ? wrap(i, e) : i));
2750
- } else if (!o) {
2751
- const n = upsertStoreNode(e, c, t, r, e[STORE_SNAPSHOT_PROPS]);
2805
+ if (l[t]) {
2806
+ setSignal(l[t], () => (isWrappable(i) ? wrap(i, e) : i));
2807
+ } else if (!s) {
2808
+ const n = upsertStoreNode(e, l, t, r, e[STORE_SNAPSHOT_PROPS]);
2752
2809
  setSignal(n, () => (isWrappable(i) ? wrap(i, e) : i));
2753
2810
  }
2754
2811
  } else if (n === "invalidate") {
2755
- if (c[t]) {
2756
- setSignal(c[t], {});
2757
- delete c[t];
2812
+ if (l[t]) {
2813
+ setSignal(l[t], {});
2814
+ delete l[t];
2758
2815
  }
2759
2816
  } else {
2760
- if (c[t]) {
2761
- setSignal(c[t], undefined);
2762
- } else if (!o) {
2763
- const n = upsertStoreNode(e, c, t, r, e[STORE_SNAPSHOT_PROPS]);
2817
+ if (l[t]) {
2818
+ setSignal(l[t], undefined);
2819
+ } else if (!s) {
2820
+ const n = upsertStoreNode(e, l, t, r, e[STORE_SNAPSHOT_PROPS]);
2764
2821
  setSignal(n, undefined);
2765
2822
  }
2766
2823
  }
2767
- c[$TRACK] && setSignal(c[$TRACK], undefined);
2824
+ l[$TRACK] && setSignal(l[$TRACK], undefined);
2768
2825
  }
2769
2826
  let Writing = null;
2770
2827
  const storeTraps = {
@@ -2778,7 +2835,7 @@ const storeTraps = {
2778
2835
  }
2779
2836
  const i = getNodes(e, STORE_NODE);
2780
2837
  const r = i[t];
2781
- const s = e[STORE_VALUE];
2838
+ const o = e[STORE_VALUE];
2782
2839
  if (
2783
2840
  !r &&
2784
2841
  !e[STORE_OVERRIDE] &&
@@ -2786,55 +2843,56 @@ const storeTraps = {
2786
2843
  !e[STORE_CUSTOM_PROTO] &&
2787
2844
  !e[STORE_OPTIMISTIC] &&
2788
2845
  !e[STORE_SNAPSHOT_PROPS] &&
2789
- !s[$TARGET] &&
2790
- !(t in s) &&
2846
+ !o[$TARGET] &&
2847
+ !(t in o) &&
2791
2848
  getObserver() &&
2792
2849
  !writeOnly(n)
2793
2850
  ) {
2794
2851
  return read(getNode(i, t, undefined, e[STORE_FIREWALL]));
2795
2852
  }
2796
- const o = e[STORE_OPTIMISTIC_OVERRIDE] && t in e[STORE_OPTIMISTIC_OVERRIDE];
2797
- const u = o || (e[STORE_OVERRIDE] && t in e[STORE_OVERRIDE]);
2798
- const l = !!e[STORE_VALUE][$TARGET];
2799
- const c = o
2853
+ const s = e[STORE_OPTIMISTIC_OVERRIDE] && t in e[STORE_OPTIMISTIC_OVERRIDE];
2854
+ const u = s || (e[STORE_OVERRIDE] && t in e[STORE_OVERRIDE]);
2855
+ const c = !!e[STORE_VALUE][$TARGET];
2856
+ const l = s
2800
2857
  ? e[STORE_OPTIMISTIC_OVERRIDE]
2801
2858
  : e[STORE_OVERRIDE] && t in e[STORE_OVERRIDE]
2802
2859
  ? e[STORE_OVERRIDE]
2803
2860
  : e[STORE_VALUE];
2804
2861
  if (!r) {
2805
- const i = Object.getOwnPropertyDescriptor(c, t);
2862
+ const i = Object.getOwnPropertyDescriptor(l, t);
2806
2863
  if (i && i.get) return i.get.call(n);
2807
2864
  if (!i && !u && e[STORE_CUSTOM_PROTO]) {
2808
- const e = unwrapStoreValue(c);
2865
+ const e = unwrapStoreValue(l);
2809
2866
  if (hasInheritedAccessor(e, t)) {
2810
- return Reflect.get(c, t, n);
2867
+ return Reflect.get(l, t, n);
2811
2868
  }
2812
2869
  }
2813
2870
  }
2814
2871
  if (writeOnly(n)) {
2872
+ if (isPrototypePollutionKey$1(t) && !hasOwnStoreProperty(e, t)) return undefined;
2815
2873
  let n =
2816
- r && (u || !l)
2874
+ r && (u || !c)
2817
2875
  ? r.K !== undefined && r.K !== NOT_PENDING
2818
2876
  ? r.K
2819
2877
  : r.B !== NOT_PENDING
2820
2878
  ? r.B
2821
2879
  : r.ue
2822
- : c[t];
2880
+ : l[t];
2823
2881
  n === $DELETED && (n = undefined);
2824
2882
  if (!isWrappable(n)) return n;
2825
2883
  const i = wrap(n, e);
2826
2884
  Writing?.add(i);
2827
2885
  return i;
2828
2886
  }
2829
- let a = r ? (u || !l ? read(i[t]) : (read(i[t]), c[t])) : c[t];
2887
+ let a = r ? (u || !c ? read(i[t]) : (read(i[t]), l[t])) : l[t];
2830
2888
  a === $DELETED && (a = undefined);
2831
2889
  if (!r) {
2832
- if (!u && typeof a === "function" && !c.hasOwnProperty(t)) {
2890
+ if (!u && typeof a === "function" && !l.hasOwnProperty(t)) {
2833
2891
  let t;
2834
2892
  return !Array.isArray(e[STORE_VALUE]) &&
2835
2893
  (t = Object.getPrototypeOf(e[STORE_VALUE])) &&
2836
2894
  t !== Object.prototype
2837
- ? a.bind(c)
2895
+ ? a.bind(l)
2838
2896
  : a;
2839
2897
  } else if (getObserver()) {
2840
2898
  return read(
@@ -2869,24 +2927,25 @@ const storeTraps = {
2869
2927
  return n;
2870
2928
  },
2871
2929
  set(e, t, n) {
2930
+ if (t === "__proto__") return true;
2872
2931
  const i = e[$PROXY];
2873
2932
  if (writeOnly(i)) {
2874
2933
  untrack(() => {
2875
- const { base: r, overrideKey: s, state: o } = prepareStoreWrite(e, i, t);
2934
+ const { base: r, overrideKey: o, state: s } = prepareStoreWrite(e, i, t);
2876
2935
  const u =
2877
2936
  e[STORE_OPTIMISTIC_OVERRIDE] && t in e[STORE_OPTIMISTIC_OVERRIDE]
2878
2937
  ? e[STORE_OPTIMISTIC_OVERRIDE][t]
2879
2938
  : e[STORE_OVERRIDE] && t in e[STORE_OVERRIDE]
2880
2939
  ? e[STORE_OVERRIDE][t]
2881
2940
  : r;
2882
- const l =
2941
+ const c =
2883
2942
  e[STORE_OPTIMISTIC_OVERRIDE] && t in e[STORE_OPTIMISTIC_OVERRIDE]
2884
2943
  ? e[STORE_OPTIMISTIC_OVERRIDE][t] !== $DELETED
2885
2944
  : e[STORE_OVERRIDE] && t in e[STORE_OVERRIDE]
2886
2945
  ? e[STORE_OVERRIDE][t] !== $DELETED
2887
2946
  : t in e[STORE_VALUE];
2888
- const c = unwrapStoreValue(n);
2889
- const a = Array.isArray(o) && t !== "length";
2947
+ const l = unwrapStoreValue(n);
2948
+ const a = Array.isArray(s) && t !== "length";
2890
2949
  const f = a ? parseInt(t) + 1 : 0;
2891
2950
  const E =
2892
2951
  a &&
@@ -2894,17 +2953,17 @@ const storeTraps = {
2894
2953
  ? e[STORE_OPTIMISTIC_OVERRIDE].length
2895
2954
  : e[STORE_OVERRIDE] && "length" in e[STORE_OVERRIDE]
2896
2955
  ? e[STORE_OVERRIDE].length
2897
- : o.length);
2956
+ : s.length);
2898
2957
  const S = a && f > E ? f : undefined;
2899
- if (u === c && S === undefined) return true;
2900
- if (c !== undefined && c === r && S === undefined) delete e[s]?.[t];
2958
+ if (u === l && S === undefined) return true;
2959
+ if (l !== undefined && l === r && S === undefined) delete e[o]?.[t];
2901
2960
  else {
2902
- const n = e[s] || (e[s] = Object.create(null));
2903
- n[t] = c;
2961
+ const n = e[o] || (e[o] = Object.create(null));
2962
+ n[t] = l;
2904
2963
  if (S !== undefined) n.length = S;
2905
2964
  }
2906
- notifyStoreProperty(e, t, "set", c, u, l);
2907
- if (Array.isArray(o) && t !== "length" && S !== undefined) {
2965
+ notifyStoreProperty(e, t, "set", l, u, c);
2966
+ if (Array.isArray(s) && t !== "length" && S !== undefined) {
2908
2967
  const t = getNodes(e, STORE_NODE);
2909
2968
  if (t.length) {
2910
2969
  setSignal(t.length, S);
@@ -2919,12 +2978,13 @@ const storeTraps = {
2919
2978
  return true;
2920
2979
  },
2921
2980
  defineProperty(e, t, n) {
2981
+ if (t === "__proto__") return true;
2922
2982
  const i = e[$PROXY];
2923
2983
  if (writeOnly(i)) {
2924
2984
  untrack(() => {
2925
- const { base: r, overrideKey: s } = prepareStoreWrite(e, i, t);
2926
- const o = "value" in n ? { ...n, value: unwrapStoreValue(n.value) } : n;
2927
- Object.defineProperty(e[s] || (e[s] = Object.create(null)), t, o);
2985
+ const { base: r, overrideKey: o } = prepareStoreWrite(e, i, t);
2986
+ const s = "value" in n ? { ...n, value: unwrapStoreValue(n.value) } : n;
2987
+ Object.defineProperty(e[o] || (e[o] = Object.create(null)), t, s);
2928
2988
  notifyStoreProperty(e, t, "invalidate");
2929
2989
  if (false);
2930
2990
  });
@@ -2932,6 +2992,7 @@ const storeTraps = {
2932
2992
  return true;
2933
2993
  },
2934
2994
  deleteProperty(e, t) {
2995
+ if (t === "__proto__") return true;
2935
2996
  const n = e[STORE_OPTIMISTIC_OVERRIDE]?.[t] === $DELETED;
2936
2997
  const i = e[STORE_OVERRIDE]?.[t] === $DELETED;
2937
2998
  if (writeOnly(e[$PROXY]) && !n && !i) {
@@ -3026,9 +3087,9 @@ function createOptimisticStore(e, t, n) {
3026
3087
  GlobalQueue.de ||= clearOptimisticStore;
3027
3088
  const i = typeof e === "function";
3028
3089
  const r = i ? t : e;
3029
- const s = i ? e : undefined;
3030
- const { store: o } = createOptimisticProjectionInternal(s, r, n);
3031
- return [o, e => storeSetter(o, e)];
3090
+ const o = i ? e : undefined;
3091
+ const { store: s } = createOptimisticProjectionInternal(o, r, n);
3092
+ return [s, e => storeSetter(s, e)];
3032
3093
  }
3033
3094
  function clearOptimisticStore(e) {
3034
3095
  const t = e[$TARGET];
@@ -3078,7 +3139,7 @@ function createOptimisticProjectionInternal(e, t, n) {
3078
3139
  r.set(e, t);
3079
3140
  return t;
3080
3141
  };
3081
- const s = wrapProjection(t);
3142
+ const o = wrapProjection(t);
3082
3143
  if (e) {
3083
3144
  const wrapCommit = e => {
3084
3145
  setProjectionWriteActive(true);
@@ -3091,14 +3152,14 @@ function createOptimisticProjectionInternal(e, t, n) {
3091
3152
  i = computed(() => {
3092
3153
  setProjectionWriteActive(true);
3093
3154
  try {
3094
- runProjectionComputed(s, e, n?.key || "id", wrapCommit);
3155
+ runProjectionComputed(o, e, n?.key || "id", wrapCommit);
3095
3156
  } finally {
3096
3157
  setProjectionWriteActive(false);
3097
3158
  }
3098
3159
  }, undefined);
3099
- i._e &= ~CONFIG_AUTO_DISPOSE;
3160
+ i.Oe &= ~CONFIG_AUTO_DISPOSE;
3100
3161
  }
3101
- return { store: s, node: i };
3162
+ return { store: o, node: i };
3102
3163
  }
3103
3164
  const DELETE = Symbol(0);
3104
3165
  function isPrototypePollutionKey(e) {
@@ -3109,9 +3170,9 @@ function updatePath(e, t, n = 0) {
3109
3170
  r = e;
3110
3171
  if (n < t.length - 1) {
3111
3172
  i = t[n];
3112
- const s = typeof i;
3113
- const o = Array.isArray(e);
3114
- if (s === "string" && isPrototypePollutionKey(i)) return;
3173
+ const o = typeof i;
3174
+ const s = Array.isArray(e);
3175
+ if (o === "string" && isPrototypePollutionKey(i)) return;
3115
3176
  if (Array.isArray(i)) {
3116
3177
  for (let r = 0; r < i.length; r++) {
3117
3178
  t[n] = i[r];
@@ -3119,7 +3180,7 @@ function updatePath(e, t, n = 0) {
3119
3180
  }
3120
3181
  t[n] = i;
3121
3182
  return;
3122
- } else if (o && s === "function") {
3183
+ } else if (s && o === "function") {
3123
3184
  for (let r = 0; r < e.length; r++) {
3124
3185
  if (i(e[r], r)) {
3125
3186
  t[n] = r;
@@ -3128,9 +3189,9 @@ function updatePath(e, t, n = 0) {
3128
3189
  }
3129
3190
  t[n] = i;
3130
3191
  return;
3131
- } else if (o && s === "object") {
3132
- const { from: r = 0, to: s = e.length - 1, by: o = 1 } = i;
3133
- for (let i = r; i <= s; i += o) {
3192
+ } else if (s && o === "object") {
3193
+ const { from: r = 0, to: o = e.length - 1, by: s = 1 } = i;
3194
+ for (let i = r; i <= o; i += s) {
3134
3195
  t[n] = i;
3135
3196
  updatePath(e, t, n);
3136
3197
  }
@@ -3142,26 +3203,26 @@ function updatePath(e, t, n = 0) {
3142
3203
  }
3143
3204
  r = e[i];
3144
3205
  }
3145
- let s = t[t.length - 1];
3146
- if (typeof s === "function") {
3147
- s = s(r);
3148
- if (s === r) return;
3206
+ let o = t[t.length - 1];
3207
+ if (typeof o === "function") {
3208
+ o = o(r);
3209
+ if (o === r) return;
3149
3210
  }
3150
- if (i === undefined && s == undefined) return;
3151
- if (s === DELETE) {
3211
+ if (i === undefined && o == undefined) return;
3212
+ if (o === DELETE) {
3152
3213
  delete e[i];
3153
- } else if (i === undefined || (isWrappable(r) && isWrappable(s) && !Array.isArray(s))) {
3214
+ } else if (i === undefined || (isWrappable(r) && isWrappable(o) && !Array.isArray(o))) {
3154
3215
  const t = i !== undefined ? e[i] : e;
3155
- const n = Object.keys(s);
3216
+ const n = Object.keys(o);
3156
3217
  for (let e = 0; e < n.length; e++) {
3157
3218
  const i = n[e];
3158
3219
  if (isPrototypePollutionKey(i)) continue;
3159
- const r = Object.getOwnPropertyDescriptor(s, i);
3220
+ const r = Object.getOwnPropertyDescriptor(o, i);
3160
3221
  if (r.get || r.set) Object.defineProperty(t, i, r);
3161
3222
  else t[i] = r.value;
3162
3223
  }
3163
3224
  } else {
3164
- e[i] = s;
3225
+ e[i] = o;
3165
3226
  }
3166
3227
  }
3167
3228
  const storePath = Object.assign(
@@ -3173,49 +3234,49 @@ const storePath = Object.assign(
3173
3234
  { DELETE: DELETE }
3174
3235
  );
3175
3236
  function snapshotImpl(e, t, n, i) {
3176
- let r, s, o, u, l, c;
3237
+ let r, o, s, u, c, l;
3177
3238
  if (!isWrappable(e)) return e;
3178
3239
  if (n && n.has(e)) return n.get(e);
3179
3240
  if (!n) n = new Map();
3180
3241
  if ((r = e[$TARGET] || i?.get(e)?.[$TARGET])) {
3181
3242
  if (t) trackSelf(r, $TRACK);
3182
- o = r[STORE_OVERRIDE];
3183
- s = Array.isArray(r[STORE_VALUE]);
3243
+ s = r[STORE_OVERRIDE];
3244
+ o = Array.isArray(r[STORE_VALUE]);
3184
3245
  n.set(
3185
3246
  e,
3186
- o ? (u = s ? [] : Object.create(Object.getPrototypeOf(r[STORE_VALUE]))) : r[STORE_VALUE]
3247
+ s ? (u = o ? [] : Object.create(Object.getPrototypeOf(r[STORE_VALUE]))) : r[STORE_VALUE]
3187
3248
  );
3188
3249
  e = r[STORE_VALUE];
3189
3250
  i = storeLookup;
3190
3251
  } else {
3191
- s = Array.isArray(e);
3252
+ o = Array.isArray(e);
3192
3253
  n.set(e, e);
3193
3254
  }
3194
- if (s) {
3195
- const s = o?.length || e.length;
3196
- for (let a = 0; a < s; a++) {
3197
- c = o && a in o ? o[a] : e[a];
3198
- if (c === $DELETED) continue;
3199
- if (t && isWrappable(c)) wrap(c, r);
3200
- if ((l = snapshotImpl(c, t, n, i)) !== c || u) {
3255
+ if (o) {
3256
+ const o = s?.length || e.length;
3257
+ for (let a = 0; a < o; a++) {
3258
+ l = s && a in s ? s[a] : e[a];
3259
+ if (l === $DELETED) continue;
3260
+ if (t && isWrappable(l)) wrap(l, r);
3261
+ if ((c = snapshotImpl(l, t, n, i)) !== l || u) {
3201
3262
  if (!u) n.set(e, (u = [...e]));
3202
- u[a] = l;
3263
+ u[a] = c;
3203
3264
  }
3204
3265
  }
3205
3266
  } else {
3206
- const s = getKeys(e, o);
3207
- for (let a = 0, f = s.length; a < f; a++) {
3208
- let f = s[a];
3209
- const E = getPropertyDescriptor(e, o, f);
3267
+ const o = getKeys(e, s);
3268
+ for (let a = 0, f = o.length; a < f; a++) {
3269
+ let f = o[a];
3270
+ const E = getPropertyDescriptor(e, s, f);
3210
3271
  if (E.get) continue;
3211
- c = o && f in o ? o[f] : e[f];
3212
- if (t && isWrappable(c)) wrap(c, r);
3213
- if ((l = snapshotImpl(c, t, n, i)) !== e[f] || u) {
3272
+ l = s && f in s ? s[f] : e[f];
3273
+ if (t && isWrappable(l)) wrap(l, r);
3274
+ if ((c = snapshotImpl(l, t, n, i)) !== e[f] || u) {
3214
3275
  if (!u) {
3215
3276
  u = Object.create(Object.getPrototypeOf(e));
3216
3277
  Object.assign(u, e);
3217
3278
  }
3218
- u[f] = l;
3279
+ u[f] = c;
3219
3280
  }
3220
3281
  }
3221
3282
  }
@@ -3267,9 +3328,9 @@ function merge(...e) {
3267
3328
  for (let i = 0; i < e.length; i++) {
3268
3329
  const r = e[i];
3269
3330
  t = t || (!!r && $PROXY in r);
3270
- const s = !!r && r[$SOURCES];
3271
- if (s) {
3272
- for (let e = 0; e < s.length; e++) n.push(s[e]);
3331
+ const o = !!r && r[$SOURCES];
3332
+ if (o) {
3333
+ for (let e = 0; e < o.length; e++) n.push(o[e]);
3273
3334
  } else n.push(typeof r === "function" ? ((t = true), createMemo(r)) : r);
3274
3335
  }
3275
3336
  if (SUPPORTS_PROXY && t) {
@@ -3302,35 +3363,35 @@ function merge(...e) {
3302
3363
  }
3303
3364
  const i = Object.create(null);
3304
3365
  let r = false;
3305
- let s = n.length - 1;
3306
- for (let e = s; e >= 0; e--) {
3366
+ let o = n.length - 1;
3367
+ for (let e = o; e >= 0; e--) {
3307
3368
  const t = n[e];
3308
3369
  if (!t) {
3309
- e === s && s--;
3370
+ e === o && o--;
3310
3371
  continue;
3311
3372
  }
3312
- const o = Object.getOwnPropertyNames(t);
3313
- for (let n = o.length - 1; n >= 0; n--) {
3314
- const u = o[n];
3373
+ const s = Object.getOwnPropertyNames(t);
3374
+ for (let n = s.length - 1; n >= 0; n--) {
3375
+ const u = s[n];
3315
3376
  if (u === "__proto__" || u === "constructor") continue;
3316
3377
  if (!i[u]) {
3317
- r = r || e !== s;
3378
+ r = r || e !== o;
3318
3379
  const n = Object.getOwnPropertyDescriptor(t, u);
3319
3380
  i[u] = n.get ? { enumerable: true, configurable: true, get: n.get.bind(t) } : n;
3320
3381
  }
3321
3382
  }
3322
3383
  }
3323
- if (!r) return n[s];
3324
- const o = {};
3384
+ if (!r) return n[o];
3385
+ const s = {};
3325
3386
  const u = Object.keys(i);
3326
3387
  for (let e = u.length - 1; e >= 0; e--) {
3327
3388
  const t = u[e],
3328
3389
  n = i[t];
3329
- if (n.get) Object.defineProperty(o, t, n);
3330
- else o[t] = n.value;
3390
+ if (n.get) Object.defineProperty(s, t, n);
3391
+ else s[t] = n.value;
3331
3392
  }
3332
- o[$SOURCES] = n;
3333
- return o;
3393
+ s[$SOURCES] = n;
3394
+ return s;
3334
3395
  }
3335
3396
  function omit(e, ...t) {
3336
3397
  if (SUPPORTS_PROXY && $PROXY in e) {
@@ -3352,12 +3413,12 @@ function omit(e, ...t) {
3352
3413
  const n = {};
3353
3414
  const i = Object.getOwnPropertyNames(e);
3354
3415
  const r = t.length > 4 && i.length > t.length ? new Set(t) : undefined;
3355
- for (const s of i) {
3356
- if (r ? !r.has(s) : !t.includes(s)) {
3357
- const t = Object.getOwnPropertyDescriptor(e, s);
3416
+ for (const o of i) {
3417
+ if (r ? !r.has(o) : !t.includes(o)) {
3418
+ const t = Object.getOwnPropertyDescriptor(e, o);
3358
3419
  !t.get && !t.set && t.enumerable && t.writable && t.configurable
3359
- ? (n[s] = t.value)
3360
- : Object.defineProperty(n, s, t);
3420
+ ? (n[o] = t.value)
3421
+ : Object.defineProperty(n, o, t);
3361
3422
  }
3362
3423
  }
3363
3424
  return n;
@@ -3365,24 +3426,24 @@ function omit(e, ...t) {
3365
3426
  function mapArray(e, t, n) {
3366
3427
  const i = typeof n?.keyed === "function" ? n.keyed : undefined;
3367
3428
  const r = t.length > 1;
3368
- const s = t;
3369
- const o = {
3429
+ const o = t;
3430
+ const s = {
3370
3431
  Ze: createOwner(),
3371
3432
  qe: 0,
3372
3433
  Be: e,
3373
3434
  ze: [],
3374
- Xe: s,
3435
+ Xe: o,
3375
3436
  Je: [],
3376
3437
  et: [],
3377
3438
  tt: i,
3378
3439
  nt: i || n?.keyed === false ? [] : undefined,
3379
3440
  it: r && n?.keyed !== false ? [] : undefined,
3380
3441
  rt: n?.keyed === false,
3381
- st: n?.fallback
3442
+ ot: n?.fallback
3382
3443
  };
3383
- const u = computed(updateKeyedMap.bind(o));
3384
- o.Ze.u = u;
3385
- u._e &= ~CONFIG_AUTO_DISPOSE;
3444
+ const u = computed(updateKeyedMap.bind(s));
3445
+ s.Ze.u = u;
3446
+ u.Oe &= ~CONFIG_AUTO_DISPOSE;
3386
3447
  return accessor(u);
3387
3448
  }
3388
3449
  const pureOptions = { ownedWrite: true };
@@ -3424,8 +3485,8 @@ function updateKeyedMap() {
3424
3485
  this.nt && (this.nt = []);
3425
3486
  this.it && (this.it = []);
3426
3487
  }
3427
- if (this.st && !this.Je[0]) {
3428
- this.Je[0] = runWithOwner((this.et[0] = createOwner()), this.st);
3488
+ if (this.ot && !this.Je[0]) {
3489
+ this.Je[0] = runWithOwner((this.et[0] = createOwner()), this.ot);
3429
3490
  }
3430
3491
  } else if (this.qe === 0) {
3431
3492
  if (this.et[0]) this.et[0].dispose();
@@ -3436,11 +3497,11 @@ function updateKeyedMap() {
3436
3497
  }
3437
3498
  this.qe = t;
3438
3499
  } else {
3439
- let s,
3440
- o,
3500
+ let o,
3501
+ s,
3441
3502
  u,
3442
- l,
3443
3503
  c,
3504
+ l,
3444
3505
  a,
3445
3506
  f,
3446
3507
  E = new Array(t),
@@ -3448,47 +3509,47 @@ function updateKeyedMap() {
3448
3509
  T = this.nt ? new Array(t) : undefined,
3449
3510
  d = this.it ? new Array(t) : undefined;
3450
3511
  for (
3451
- s = 0, o = Math.min(this.qe, t);
3452
- s < o && (this.ze[s] === e[s] || (this.nt && compare(this.tt, this.ze[s], e[s])));
3453
- s++
3512
+ o = 0, s = Math.min(this.qe, t);
3513
+ o < s && (this.ze[o] === e[o] || (this.nt && compare(this.tt, this.ze[o], e[o])));
3514
+ o++
3454
3515
  ) {
3455
- if (this.nt) setSignal(this.nt[s], e[s]);
3516
+ if (this.nt) setSignal(this.nt[o], e[o]);
3456
3517
  }
3457
3518
  for (
3458
- o = this.qe - 1, u = t - 1;
3459
- o >= s &&
3460
- u >= s &&
3461
- (this.ze[o] === e[u] || (this.nt && compare(this.tt, this.ze[o], e[u])));
3462
- o--, u--
3519
+ s = this.qe - 1, u = t - 1;
3520
+ s >= o &&
3521
+ u >= o &&
3522
+ (this.ze[s] === e[u] || (this.nt && compare(this.tt, this.ze[s], e[u])));
3523
+ s--, u--
3463
3524
  ) {
3464
- E[u] = this.Je[o];
3465
- S[u] = this.et[o];
3466
- T && (T[u] = this.nt[o]);
3467
- d && (d[u] = this.it[o]);
3525
+ E[u] = this.Je[s];
3526
+ S[u] = this.et[s];
3527
+ T && (T[u] = this.nt[s]);
3528
+ d && (d[u] = this.it[s]);
3468
3529
  }
3469
3530
  a = new Map();
3470
3531
  f = new Array(u + 1);
3471
- for (i = u; i >= s; i--) {
3472
- l = e[i];
3473
- c = this.tt ? this.tt(l) : l;
3474
- n = a.get(c);
3532
+ for (i = u; i >= o; i--) {
3533
+ c = e[i];
3534
+ l = this.tt ? this.tt(c) : c;
3535
+ n = a.get(l);
3475
3536
  f[i] = n === undefined ? -1 : n;
3476
- a.set(c, i);
3537
+ a.set(l, i);
3477
3538
  }
3478
- for (n = s; n <= o; n++) {
3479
- l = this.ze[n];
3480
- c = this.tt ? this.tt(l) : l;
3481
- i = a.get(c);
3539
+ for (n = o; n <= s; n++) {
3540
+ c = this.ze[n];
3541
+ l = this.tt ? this.tt(c) : c;
3542
+ i = a.get(l);
3482
3543
  if (i !== undefined && i !== -1) {
3483
3544
  E[i] = this.Je[n];
3484
3545
  S[i] = this.et[n];
3485
3546
  T && (T[i] = this.nt[n]);
3486
3547
  d && (d[i] = this.it[n]);
3487
3548
  i = f[i];
3488
- a.set(c, i);
3549
+ a.set(l, i);
3489
3550
  } else this.et[n].dispose();
3490
3551
  }
3491
- for (i = s; i < t; i++) {
3552
+ for (i = o; i < t; i++) {
3492
3553
  if (i in E) {
3493
3554
  this.Je[i] = E[i];
3494
3555
  this.et[i] = S[i];
@@ -3516,21 +3577,21 @@ function repeat(e, t, n) {
3516
3577
  updateRepeat.bind({
3517
3578
  Ze: createOwner(),
3518
3579
  qe: 0,
3519
- ot: 0,
3580
+ st: 0,
3520
3581
  ut: e,
3521
3582
  Xe: i,
3522
3583
  et: [],
3523
3584
  Je: [],
3524
- lt: n?.from,
3525
- st: n?.fallback
3585
+ ct: n?.from,
3586
+ ot: n?.fallback
3526
3587
  })
3527
3588
  );
3528
- r._e &= ~CONFIG_AUTO_DISPOSE;
3589
+ r.Oe &= ~CONFIG_AUTO_DISPOSE;
3529
3590
  return accessor(r);
3530
3591
  }
3531
3592
  function updateRepeat() {
3532
3593
  const e = this.ut();
3533
- const t = this.lt?.() || 0;
3594
+ const t = this.ct?.() || 0;
3534
3595
  runWithOwner(this.Ze, () => {
3535
3596
  if (e === 0) {
3536
3597
  if (this.qe !== 0) {
@@ -3539,23 +3600,23 @@ function updateRepeat() {
3539
3600
  this.Je = [];
3540
3601
  this.qe = 0;
3541
3602
  }
3542
- if (this.st && !this.Je[0]) {
3543
- this.Je[0] = runWithOwner((this.et[0] = createOwner()), this.st);
3603
+ if (this.ot && !this.Je[0]) {
3604
+ this.Je[0] = runWithOwner((this.et[0] = createOwner()), this.ot);
3544
3605
  }
3545
3606
  return;
3546
3607
  }
3547
3608
  const n = t + e;
3548
- const i = this.ot + this.qe;
3609
+ const i = this.st + this.qe;
3549
3610
  if (this.qe === 0 && this.et[0]) this.et[0].dispose();
3550
- for (let e = n; e < i; e++) this.et[e - this.ot].dispose();
3551
- if (this.ot < t) {
3552
- let e = this.ot;
3611
+ for (let e = n; e < i; e++) this.et[e - this.st].dispose();
3612
+ if (this.st < t) {
3613
+ let e = this.st;
3553
3614
  while (e < t && e < this.qe) this.et[e++].dispose();
3554
- this.et.splice(0, t - this.ot);
3555
- this.Je.splice(0, t - this.ot);
3556
- } else if (this.ot > t) {
3557
- let n = i - this.ot - 1;
3558
- let r = this.ot - t;
3615
+ this.et.splice(0, t - this.st);
3616
+ this.Je.splice(0, t - this.st);
3617
+ } else if (this.st > t) {
3618
+ let n = i - this.st - 1;
3619
+ let r = this.st - t;
3559
3620
  this.et.length = this.Je.length = e;
3560
3621
  while (n >= r) {
3561
3622
  this.et[n] = this.et[n - r];
@@ -3570,7 +3631,7 @@ function updateRepeat() {
3570
3631
  this.Je[e - t] = runWithOwner((this.et[e - t] = createOwner()), () => this.Xe(e));
3571
3632
  }
3572
3633
  this.Je = this.Je.slice(0, e);
3573
- this.ot = t;
3634
+ this.st = t;
3574
3635
  this.qe = e;
3575
3636
  });
3576
3637
  return this.Je;
@@ -3583,11 +3644,11 @@ function boundaryComputed(e, t) {
3583
3644
  n.xe = (e, t) => {
3584
3645
  const i = e !== undefined ? e : n.he;
3585
3646
  const r = t !== undefined ? t : n.Re;
3586
- n.he &= ~n.ct;
3587
- n.te.notify(n, n.ct, i, r);
3647
+ n.he &= ~n.lt;
3648
+ n.te.notify(n, n.lt, i, r);
3588
3649
  };
3589
- n.ct = t;
3590
- n._e &= ~CONFIG_AUTO_DISPOSE;
3650
+ n.lt = t;
3651
+ n.Oe &= ~CONFIG_AUTO_DISPOSE;
3591
3652
  recompute(n, true);
3592
3653
  return n;
3593
3654
  }
@@ -3597,7 +3658,7 @@ function createBoundChildren(e, t, n, i) {
3597
3658
  cleanup(() => r.removeChild(e.te));
3598
3659
  return runWithOwner(e, () => {
3599
3660
  const e = computed(t);
3600
- return boundaryComputed(() => staleValues(() => flatten(read(e))), i);
3661
+ return boundaryComputed(() => flatten(read(e)), i);
3601
3662
  });
3602
3663
  }
3603
3664
  const ON_INIT = Symbol();
@@ -3621,7 +3682,7 @@ function setSlotState(e, t, n, i) {
3621
3682
  if (!n && e.dt === t) e.dt = undefined;
3622
3683
  return e.evaluate(n, i);
3623
3684
  }
3624
- if (!n && e.Ot === t && e._t) e.Ot = undefined;
3685
+ if (!n && e._t === t && e.Ot) e._t = undefined;
3625
3686
  }
3626
3687
  class RevealController {
3627
3688
  Rt;
@@ -3640,7 +3701,7 @@ class RevealController {
3640
3701
  Pt(e) {
3641
3702
  for (let t = 0; t < this.ht.length; t++) {
3642
3703
  const n = this.ht[t];
3643
- if ((isRevealController(n) ? n.dt : n.Ot) !== this) continue;
3704
+ if ((isRevealController(n) ? n.dt : n._t) !== this) continue;
3644
3705
  if (e(n) === false) return false;
3645
3706
  }
3646
3707
  return true;
@@ -3691,9 +3752,9 @@ class RevealController {
3691
3752
  const n = e ?? read(this.St),
3692
3753
  i = untrack(this.Rt),
3693
3754
  r = i === "sequential" && !!untrack(this.It),
3694
- s = t ?? r;
3755
+ o = t ?? r;
3695
3756
  if (n) {
3696
- this.Pt(e => setSlotState(e, this, true, s));
3757
+ this.Pt(e => setSlotState(e, this, true, o));
3697
3758
  } else if (i === "natural") {
3698
3759
  this.Pt(e => {
3699
3760
  if (isRevealController(e)) {
@@ -3736,9 +3797,10 @@ class CollectionQueue extends Queue {
3736
3797
  Dt;
3737
3798
  Et = true;
3738
3799
  St = signal(false, { ownedWrite: true, Ye: true });
3800
+ Re;
3739
3801
  Tt = signal(false, { ownedWrite: true, Ye: true });
3740
- Ot;
3741
- _t = false;
3802
+ _t;
3803
+ Ot = false;
3742
3804
  yt;
3743
3805
  vt = ON_INIT;
3744
3806
  constructor(e) {
@@ -3751,7 +3813,7 @@ class CollectionQueue extends Queue {
3751
3813
  }
3752
3814
  notify(e, t, n, i) {
3753
3815
  if (!(t & this.gt)) return super.notify(e, t, n, i);
3754
- if (this._t && this.yt) {
3816
+ if (this.Ot && this.yt) {
3755
3817
  const e = untrack(() => {
3756
3818
  try {
3757
3819
  return this.yt();
@@ -3761,11 +3823,11 @@ class CollectionQueue extends Queue {
3761
3823
  });
3762
3824
  if (e !== this.vt) {
3763
3825
  this.vt = e;
3764
- this._t = false;
3826
+ this.Ot = false;
3765
3827
  this.ft.clear();
3766
3828
  }
3767
3829
  }
3768
- if (this.gt & STATUS_PENDING && this._t) return super.notify(e, t, n, i);
3830
+ if (this.gt & STATUS_PENDING && this.Ot) return super.notify(e, t, n, i);
3769
3831
  if (this.gt & STATUS_PENDING && n & STATUS_ERROR) {
3770
3832
  return super.notify(e, STATUS_ERROR, n, i);
3771
3833
  }
@@ -3776,6 +3838,9 @@ class CollectionQueue extends Queue {
3776
3838
  const e = this.ft.size === 0;
3777
3839
  this.ft.add(t);
3778
3840
  if (e) setSignal(this.St, true);
3841
+ if (this.gt & STATUS_ERROR) {
3842
+ setSignal(this.Re, t.Re?.cause ?? t.Re);
3843
+ }
3779
3844
  }
3780
3845
  }
3781
3846
  t &= ~this.gt;
@@ -3784,13 +3849,13 @@ class CollectionQueue extends Queue {
3784
3849
  checkSources() {
3785
3850
  for (const e of this.ft) {
3786
3851
  if (
3787
- e._ & REACTIVE_DISPOSED ||
3852
+ e.O & REACTIVE_DISPOSED ||
3788
3853
  (!(e.he & this.gt) && !(this.gt & STATUS_ERROR && e.he & STATUS_PENDING))
3789
3854
  )
3790
3855
  this.ft.delete(e);
3791
3856
  }
3792
3857
  if (!this.ft.size) {
3793
- if (this.gt & STATUS_PENDING && this.Et && !this._t && this.Dt) {
3858
+ if (this.gt & STATUS_PENDING && this.Et && !this.Ot && this.Dt) {
3794
3859
  this.Et = !!(this.Dt.he & this.gt);
3795
3860
  } else {
3796
3861
  this.Et = false;
@@ -3804,39 +3869,40 @@ class CollectionQueue extends Queue {
3804
3869
  }
3805
3870
  }
3806
3871
  }
3807
- if (_revealUsed) this.Ot?.evaluate();
3872
+ if (_revealUsed) this._t?.evaluate();
3808
3873
  }
3809
3874
  }
3810
3875
  function createCollectionBoundary(e, t, n, i) {
3811
3876
  const r = createOwner();
3812
3877
  if (_revealUsed) setContext(RevealControllerContext, null, r);
3813
- const s = new CollectionQueue(e);
3814
- if (i) s.yt = i;
3815
- const o = (s.Dt = createBoundChildren(r, t, s, e));
3878
+ const o = new CollectionQueue(e);
3879
+ if (e === STATUS_ERROR) o.Re = signal(undefined, { ownedWrite: true, Ye: true });
3880
+ if (i) o.yt = i;
3881
+ const s = (o.Dt = createBoundChildren(r, t, o, e));
3816
3882
  untrack(() => {
3817
3883
  let t = false;
3818
3884
  try {
3819
- read(o);
3885
+ read(s);
3820
3886
  } catch (e) {
3821
3887
  if (e instanceof NotReadyError) t = true;
3822
3888
  else throw e;
3823
3889
  }
3824
- s.Et = t || !!(o.he & e) || o.Re instanceof NotReadyError;
3890
+ o.Et = t || !!(s.he & e) || s.Re instanceof NotReadyError;
3825
3891
  });
3826
3892
  const u = _revealUsed && e === STATUS_PENDING ? getContext(RevealControllerContext) : null;
3827
3893
  if (u) {
3828
- s.Ot = u;
3829
- u.register(s);
3830
- cleanup(() => u.unregister(s));
3894
+ o._t = u;
3895
+ u.register(o);
3896
+ cleanup(() => u.unregister(o));
3831
3897
  }
3832
3898
  return accessor(
3833
3899
  computed(() => {
3834
- if (!read(s.St)) {
3835
- const e = read(o);
3836
- if (!untrack(() => read(s.St))) return ((s._t = true), e);
3900
+ if (!read(o.St)) {
3901
+ const e = read(s);
3902
+ if (!untrack(() => read(o.St))) return ((o.Ot = true), e);
3837
3903
  }
3838
- if (_revealUsed && read(s.Tt)) return undefined;
3839
- return n(s);
3904
+ if (_revealUsed && read(o.Tt)) return undefined;
3905
+ return n(o);
3840
3906
  })
3841
3907
  );
3842
3908
  }
@@ -3844,34 +3910,32 @@ function createLoadingBoundary(e, t, n) {
3844
3910
  return createCollectionBoundary(STATUS_PENDING, e, () => t(), n?.on);
3845
3911
  }
3846
3912
  function createErrorBoundary(e, t) {
3847
- return createCollectionBoundary(STATUS_ERROR, e, e => {
3848
- let n = e.ft.values().next().value;
3849
- const i = n.Re?.cause ?? n.Re;
3850
- return t(i, () => {
3913
+ return createCollectionBoundary(STATUS_ERROR, e, e =>
3914
+ t(accessor(e.Re), () => {
3851
3915
  for (const t of e.ft) recompute(t);
3852
3916
  schedule();
3853
- });
3854
- });
3917
+ })
3918
+ );
3855
3919
  }
3856
3920
  function createRevealOrder(e, t) {
3857
3921
  _revealUsed = true;
3858
3922
  const n = createOwner();
3859
3923
  const i = getContext(RevealControllerContext);
3860
3924
  const r = t?.order || SEQUENTIAL_ACCESSOR,
3861
- s = t?.collapsed || FALSE_ACCESSOR;
3862
- const o = new RevealController(r, s);
3863
- setContext(RevealControllerContext, o, n);
3925
+ o = t?.collapsed || FALSE_ACCESSOR;
3926
+ const s = new RevealController(r, o);
3927
+ setContext(RevealControllerContext, s, n);
3864
3928
  return runWithOwner(n, () => {
3865
3929
  const t = e();
3866
3930
  computed(() => {
3867
3931
  r();
3868
- s();
3869
- o.evaluate();
3932
+ o();
3933
+ s.evaluate();
3870
3934
  });
3871
3935
  if (i) {
3872
- o.dt = i;
3873
- i.register(o);
3874
- cleanup(() => i.unregister(o));
3936
+ s.dt = i;
3937
+ i.register(s);
3938
+ cleanup(() => i.unregister(s));
3875
3939
  }
3876
3940
  return t;
3877
3941
  });
@@ -3900,9 +3964,9 @@ function flatten(e, t) {
3900
3964
  function flattenArray(e, t = [], n) {
3901
3965
  let i = null;
3902
3966
  let r = false;
3903
- for (let s = 0; s < e.length; s++) {
3967
+ for (let o = 0; o < e.length; o++) {
3904
3968
  try {
3905
- let i = e[s];
3969
+ let i = e[o];
3906
3970
  if (typeof i === "function" && !i.length) {
3907
3971
  if (n?.doNotUnwrap) {
3908
3972
  t.push(i);