@solidjs/signals 0.13.5 → 0.13.6

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
@@ -82,10 +82,10 @@ function deleteFromHeap(e, t) {
82
82
  else {
83
83
  const n = e.S;
84
84
  const r = t.l[i];
85
- const o = n ?? r;
85
+ const s = n ?? r;
86
86
  if (e === r) t.l[i] = n;
87
87
  else e.T.S = n;
88
- o.T = e.T;
88
+ s.T = e.T;
89
89
  }
90
90
  e.T = e;
91
91
  e.S = undefined;
@@ -189,9 +189,9 @@ function mergeTransitionState(e, t) {
189
189
  if (n.K === t) n.K = e;
190
190
  }
191
191
  e.Y.push(...t.Y);
192
- for (const n of t.B) e.B.add(n);
193
- for (const n of t.Z) {
194
- if (!e.Z.includes(n)) e.Z.push(n);
192
+ for (const n of t.Z) e.Z.add(n);
193
+ for (const n of t.B) {
194
+ if (!e.B.includes(n)) e.B.push(n);
195
195
  }
196
196
  }
197
197
  function resolveOptimisticNodes(e) {
@@ -230,20 +230,6 @@ function schedule() {
230
230
  scheduled = true;
231
231
  if (!globalQueue.ne && !projectionWriteActive) queueMicrotask(flush);
232
232
  }
233
- function addTransitionBlocker(e) {
234
- if (activeTransition && !activeTransition.Z.includes(e)) {
235
- activeTransition.Z.push(e);
236
- }
237
- }
238
- function removeTransitionBlocker(e) {
239
- const remove = t => {
240
- if (!t) return;
241
- const n = t.indexOf(e);
242
- if (n >= 0) t.splice(n, 1);
243
- };
244
- remove(e.K?.Z);
245
- remove(activeTransition?.Z);
246
- }
247
233
  class Queue {
248
234
  i = null;
249
235
  ie = [[], []];
@@ -309,31 +295,31 @@ class Queue {
309
295
  }
310
296
  class GlobalQueue extends Queue {
311
297
  ne = false;
312
- oe = [];
298
+ se = [];
313
299
  Y = [];
314
- B = new Set();
315
- static se;
300
+ Z = new Set();
301
+ static oe;
316
302
  static ue;
317
303
  static ce = null;
318
304
  flush() {
319
305
  if (this.ne) return;
320
306
  this.ne = true;
321
307
  try {
322
- runHeap(dirtyQueue, GlobalQueue.se);
308
+ runHeap(dirtyQueue, GlobalQueue.oe);
323
309
  if (activeTransition) {
324
310
  const e = transitionComplete(activeTransition);
325
311
  if (!e) {
326
312
  const e = activeTransition;
327
- runHeap(zombieQueue, GlobalQueue.se);
328
- this.oe = [];
313
+ runHeap(zombieQueue, GlobalQueue.oe);
314
+ this.se = [];
329
315
  this.Y = [];
330
- this.B = new Set();
316
+ this.Z = new Set();
331
317
  runLaneEffects(EFFECT_RENDER);
332
318
  runLaneEffects(EFFECT_USER);
333
319
  this.stashQueues(e.ae);
334
320
  clock++;
335
321
  scheduled = dirtyQueue.R >= dirtyQueue.P;
336
- reassignPendingTransition(e.oe);
322
+ reassignPendingTransition(e.se);
337
323
  activeTransition = null;
338
324
  if (!e.j.length && e.Y.length) {
339
325
  stashedOptimisticReads = new Set();
@@ -351,15 +337,15 @@ class GlobalQueue extends Queue {
351
337
  }
352
338
  return;
353
339
  }
354
- this.oe !== activeTransition.oe && this.oe.push(...activeTransition.oe);
340
+ this.se !== activeTransition.se && this.se.push(...activeTransition.se);
355
341
  this.restoreQueues(activeTransition.ae);
356
342
  transitions.delete(activeTransition);
357
343
  const t = activeTransition;
358
344
  activeTransition = null;
359
- reassignPendingTransition(this.oe);
345
+ reassignPendingTransition(this.se);
360
346
  finalizePureQueue(t);
361
347
  } else {
362
- if (transitions.size) runHeap(zombieQueue, GlobalQueue.se);
348
+ if (transitions.size) runHeap(zombieQueue, GlobalQueue.oe);
363
349
  finalizePureQueue();
364
350
  }
365
351
  clock++;
@@ -378,8 +364,8 @@ class GlobalQueue extends Queue {
378
364
  const t = i !== undefined ? i : e.le;
379
365
  if (activeTransition && t) {
380
366
  const e = t.source;
381
- if (!activeTransition.Z.includes(e)) {
382
- activeTransition.Z.push(e);
367
+ if (!activeTransition.B.includes(e)) {
368
+ activeTransition.B.push(e);
383
369
  schedule();
384
370
  }
385
371
  }
@@ -395,10 +381,10 @@ class GlobalQueue extends Queue {
395
381
  if (!activeTransition) {
396
382
  activeTransition = e ?? {
397
383
  Ee: clock,
398
- oe: [],
399
- Z: [],
384
+ se: [],
385
+ B: [],
400
386
  Y: [],
401
- B: new Set(),
387
+ Z: new Set(),
402
388
  j: [],
403
389
  ae: { ie: [[], []], re: [] },
404
390
  $: false
@@ -411,13 +397,13 @@ class GlobalQueue extends Queue {
411
397
  }
412
398
  transitions.add(activeTransition);
413
399
  activeTransition.Ee = clock;
414
- if (this.oe !== activeTransition.oe) {
415
- for (let e = 0; e < this.oe.length; e++) {
416
- const t = this.oe[e];
400
+ if (this.se !== activeTransition.se) {
401
+ for (let e = 0; e < this.se.length; e++) {
402
+ const t = this.se[e];
417
403
  t.K = activeTransition;
418
- activeTransition.oe.push(t);
404
+ activeTransition.se.push(t);
419
405
  }
420
- this.oe = activeTransition.oe;
406
+ this.se = activeTransition.se;
421
407
  }
422
408
  if (this.Y !== activeTransition.Y) {
423
409
  for (let e = 0; e < this.Y.length; e++) {
@@ -430,9 +416,9 @@ class GlobalQueue extends Queue {
430
416
  for (const e of activeLanes) {
431
417
  if (!e.K) e.K = activeTransition;
432
418
  }
433
- if (this.B !== activeTransition.B) {
434
- for (const e of this.B) activeTransition.B.add(e);
435
- this.B = activeTransition.B;
419
+ if (this.Z !== activeTransition.Z) {
420
+ for (const e of this.Z) activeTransition.Z.add(e);
421
+ this.Z = activeTransition.Z;
436
422
  }
437
423
  }
438
424
  }
@@ -459,13 +445,13 @@ function insertSubs(e, t = false) {
459
445
  }
460
446
  continue;
461
447
  }
462
- const o = r.h.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
463
- if (o.P > r.h.o) o.P = r.h.o;
464
- insertIntoHeap(r.h, o);
448
+ const s = r.h.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
449
+ if (s.P > r.h.o) s.P = r.h.o;
450
+ insertIntoHeap(r.h, s);
465
451
  }
466
452
  }
467
453
  function commitPendingNodes() {
468
- const e = globalQueue.oe;
454
+ const e = globalQueue.se;
469
455
  for (let t = 0; t < e.length; t++) {
470
456
  const n = e[t];
471
457
  if (n.X !== NOT_PENDING) {
@@ -482,11 +468,11 @@ function finalizePureQueue(e = null, t = false) {
482
468
  const n = !t;
483
469
  if (n) commitPendingNodes();
484
470
  if (!t) checkBoundaryChildren(globalQueue);
485
- if (dirtyQueue.R >= dirtyQueue.P) runHeap(dirtyQueue, GlobalQueue.se);
471
+ if (dirtyQueue.R >= dirtyQueue.P) runHeap(dirtyQueue, GlobalQueue.oe);
486
472
  if (n) {
487
473
  commitPendingNodes();
488
474
  resolveOptimisticNodes(e ? e.Y : globalQueue.Y);
489
- const t = e ? e.B : globalQueue.B;
475
+ const t = e ? e.Z : globalQueue.Z;
490
476
  if (GlobalQueue.ce && t.size) {
491
477
  for (const e of t) {
492
478
  GlobalQueue.ce(e);
@@ -504,7 +490,7 @@ function checkBoundaryChildren(e) {
504
490
  }
505
491
  }
506
492
  function trackOptimisticStore(e) {
507
- globalQueue.B.add(e);
493
+ globalQueue.Z.add(e);
508
494
  schedule();
509
495
  }
510
496
  function reassignPendingTransition(e) {
@@ -514,6 +500,9 @@ function reassignPendingTransition(e) {
514
500
  }
515
501
  const globalQueue = new GlobalQueue();
516
502
  function flush() {
503
+ if (globalQueue.ne) {
504
+ return;
505
+ }
517
506
  while (scheduled || activeTransition) {
518
507
  globalQueue.flush();
519
508
  }
@@ -525,13 +514,28 @@ function transitionComplete(e) {
525
514
  if (e.$) return true;
526
515
  if (e.j.length) return false;
527
516
  let t = true;
528
- for (let n = 0; n < e.Z.length; n++) {
529
- const i = e.Z[n];
517
+ for (let n = 0; n < e.B.length; n++) {
518
+ const i = e.B[n];
530
519
  if (i.Se & STATUS_PENDING && i.le?.source === i) {
531
520
  t = false;
532
521
  break;
533
522
  }
534
523
  }
524
+ if (t) {
525
+ for (let n = 0; n < e.Y.length; n++) {
526
+ const i = e.Y[n];
527
+ if (
528
+ hasActiveOverride(i) &&
529
+ "Se" in i &&
530
+ i.Se & STATUS_PENDING &&
531
+ i.le instanceof NotReadyError &&
532
+ i.le.source !== i
533
+ ) {
534
+ t = false;
535
+ break;
536
+ }
537
+ }
538
+ }
535
539
  t && (e.$ = true);
536
540
  return t;
537
541
  }
@@ -708,13 +712,13 @@ function settlePendingSource(e) {
708
712
  function handleAsync(e, t, n) {
709
713
  const i = typeof t === "object" && t !== null;
710
714
  const r = i && untrack(() => t[Symbol.asyncIterator]);
711
- const o = !r && i && untrack(() => typeof t.then === "function");
712
- if (!o && !r) {
715
+ const s = !r && i && untrack(() => typeof t.then === "function");
716
+ if (!s && !r) {
713
717
  e.Ae = null;
714
718
  return t;
715
719
  }
716
720
  e.Ae = t;
717
- let s;
721
+ let o;
718
722
  const handleError = n => {
719
723
  if (e.Ae !== t) return;
720
724
  globalQueue.initTransition(resolveTransition(e));
@@ -726,8 +730,8 @@ function handleAsync(e, t, n) {
726
730
  if (e.O & (REACTIVE_DIRTY | REACTIVE_OPTIMISTIC_DIRTY)) return;
727
731
  globalQueue.initTransition(resolveTransition(e));
728
732
  clearStatus(e);
729
- const o = resolveLane(e);
730
- if (o) o.k.delete(e);
733
+ const s = resolveLane(e);
734
+ if (s) s.k.delete(e);
731
735
  if (n) n(i);
732
736
  else if (e.ee !== undefined) {
733
737
  if (e.ee !== undefined && e.ee !== NOT_PENDING) e.X = i;
@@ -736,7 +740,7 @@ function handleAsync(e, t, n) {
736
740
  insertSubs(e);
737
741
  }
738
742
  e.Ee = clock;
739
- } else if (o) {
743
+ } else if (s) {
740
744
  const t = e.J;
741
745
  const n = e.Ne;
742
746
  if (!n || !n(i, t)) {
@@ -755,13 +759,13 @@ function handleAsync(e, t, n) {
755
759
  flush();
756
760
  r?.();
757
761
  };
758
- if (o) {
762
+ if (s) {
759
763
  let n = false,
760
764
  i = true;
761
765
  t.then(
762
766
  e => {
763
767
  if (i) {
764
- s = e;
768
+ o = e;
765
769
  n = true;
766
770
  } else asyncWrite(e);
767
771
  },
@@ -799,7 +803,7 @@ function handleAsync(e, t, n) {
799
803
  );
800
804
  r = false;
801
805
  if (t && !e.done) {
802
- s = e.value;
806
+ o = e.value;
803
807
  i = true;
804
808
  return iterate();
805
809
  }
@@ -811,11 +815,10 @@ function handleAsync(e, t, n) {
811
815
  throw new NotReadyError(context);
812
816
  }
813
817
  }
814
- return s;
818
+ return o;
815
819
  }
816
820
  function clearStatus(e, t = false) {
817
821
  clearPendingSources(e);
818
- removeTransitionBlocker(e);
819
822
  e.he = false;
820
823
  e.Se = t ? 0 : e.Se & STATUS_UNINITIALIZED;
821
824
  setPendingError(e);
@@ -825,19 +828,17 @@ function clearStatus(e, t = false) {
825
828
  function notifyStatus(e, t, n, i, r) {
826
829
  if (t === STATUS_ERROR && !(n instanceof StatusError) && !(n instanceof NotReadyError))
827
830
  n = new StatusError(e, n);
828
- const o = t === STATUS_PENDING && n instanceof NotReadyError ? n.source : undefined;
829
- const s = o === e;
830
- const u = t === STATUS_PENDING && e.ee !== undefined && !s;
831
+ const s = t === STATUS_PENDING && n instanceof NotReadyError ? n.source : undefined;
832
+ const o = s === e;
833
+ const u = t === STATUS_PENDING && e.ee !== undefined && !o;
831
834
  const c = u && hasActiveOverride(e);
832
835
  if (!i) {
833
- if (t === STATUS_PENDING && o) {
834
- addPendingSource(e, o);
836
+ if (t === STATUS_PENDING && s) {
837
+ addPendingSource(e, s);
835
838
  e.Se = STATUS_PENDING | (e.Se & STATUS_UNINITIALIZED);
836
- setPendingError(e, e.Ie ?? e.pe?.values().next().value, n);
837
- if (o === e) addTransitionBlocker(e);
839
+ setPendingError(e, s, n);
838
840
  } else {
839
841
  clearPendingSources(e);
840
- removeTransitionBlocker(e);
841
842
  e.Se = t | (t !== STATUS_ERROR ? e.Se & STATUS_UNINITIALIZED : 0);
842
843
  e.le = n;
843
844
  }
@@ -849,6 +850,9 @@ function notifyStatus(e, t, n, i, r) {
849
850
  const a = i || c;
850
851
  const f = i || u ? undefined : r;
851
852
  if (e.ge) {
853
+ if (i && t === STATUS_PENDING) {
854
+ return;
855
+ }
852
856
  if (a) {
853
857
  e.ge(t, n);
854
858
  } else {
@@ -859,10 +863,10 @@ function notifyStatus(e, t, n, i, r) {
859
863
  forEachDependent(e, e => {
860
864
  e.Ee = clock;
861
865
  if (
862
- (t === STATUS_PENDING && o && e.Ie !== o && !e.pe?.has(o)) ||
866
+ (t === STATUS_PENDING && s && e.Ie !== s && !e.pe?.has(s)) ||
863
867
  (t !== STATUS_PENDING && (e.le !== n || e.Ie || e.pe))
864
868
  ) {
865
- !e.K && globalQueue.oe.push(e);
869
+ if (!a && !e.K) globalQueue.se.push(e);
866
870
  notifyStatus(e, t, n, a, f);
867
871
  }
868
872
  });
@@ -875,11 +879,11 @@ function enableExternalSource(e) {
875
879
  externalSourceConfig = {
876
880
  factory: (n, i) => {
877
881
  const r = e(n, i);
878
- const o = t(e => r.track(e), i);
882
+ const s = t(e => r.track(e), i);
879
883
  return {
880
- track: e => o.track(e),
884
+ track: e => s.track(e),
881
885
  dispose() {
882
- o.dispose();
886
+ s.dispose();
883
887
  r.dispose();
884
888
  }
885
889
  };
@@ -1060,13 +1064,13 @@ function link(e, t) {
1060
1064
  return;
1061
1065
  }
1062
1066
  }
1063
- const o = e.ke;
1064
- if (o !== null && o.h === t && (!r || isValidLink(o, t))) return;
1065
- const s = (t.ye = e.ke = { m: e, h: t, D: i, Ue: o, p: null });
1066
- if (n !== null) n.D = s;
1067
- else t.C = s;
1068
- if (o !== null) o.p = s;
1069
- else e.I = s;
1067
+ const s = e.ke;
1068
+ if (s !== null && s.h === t && (!r || isValidLink(s, t))) return;
1069
+ const o = (t.ye = e.ke = { m: e, h: t, D: i, Ue: s, p: null });
1070
+ if (n !== null) n.D = o;
1071
+ else t.C = o;
1072
+ if (s !== null) s.p = o;
1073
+ else e.I = o;
1070
1074
  }
1071
1075
  function isValidLink(e, t) {
1072
1076
  const n = t.ye;
@@ -1080,7 +1084,7 @@ function isValidLink(e, t) {
1080
1084
  }
1081
1085
  return false;
1082
1086
  }
1083
- GlobalQueue.se = recompute;
1087
+ GlobalQueue.oe = recompute;
1084
1088
  GlobalQueue.ue = disposeChildren;
1085
1089
  let tracking = false;
1086
1090
  let stale = false;
@@ -1160,8 +1164,8 @@ function recompute(e, t = false) {
1160
1164
  }
1161
1165
  const i = !!(e.O & REACTIVE_OPTIMISTIC_DIRTY);
1162
1166
  const r = e.ee !== undefined && e.ee !== NOT_PENDING;
1163
- const o = !!(e.Se & STATUS_PENDING);
1164
- const s = context;
1167
+ const s = !!(e.Se & STATUS_PENDING);
1168
+ const o = context;
1165
1169
  context = e;
1166
1170
  e.ye = null;
1167
1171
  e.O = REACTIVE_RECOMPUTING_DEPS;
@@ -1203,22 +1207,22 @@ function recompute(e, t = false) {
1203
1207
  } finally {
1204
1208
  tracking = a;
1205
1209
  e.O = REACTIVE_NONE | (t ? e.O & REACTIVE_SNAPSHOT_STALE : 0);
1206
- context = s;
1210
+ context = o;
1207
1211
  }
1208
1212
  if (!e.le) {
1209
- const s = e.ye;
1210
- let a = s !== null ? s.D : e.C;
1213
+ const o = e.ye;
1214
+ let a = o !== null ? o.D : e.C;
1211
1215
  if (a !== null) {
1212
1216
  do {
1213
1217
  a = unlinkSubs(a);
1214
1218
  } while (a !== null);
1215
- if (s !== null) s.D = null;
1219
+ if (o !== null) o.D = null;
1216
1220
  else e.C = null;
1217
1221
  }
1218
1222
  const f = r ? e.ee : e.X === NOT_PENDING ? e.J : e.X;
1219
1223
  const l = !e.Ne || !e.Ne(f, u);
1220
1224
  if (l) {
1221
- const s = r ? e.ee : undefined;
1225
+ const o = r ? e.ee : undefined;
1222
1226
  if (t || (n && activeTransition !== e.K) || i) {
1223
1227
  e.J = u;
1224
1228
  if (r && i) {
@@ -1226,8 +1230,8 @@ function recompute(e, t = false) {
1226
1230
  e.X = u;
1227
1231
  }
1228
1232
  } else e.X = u;
1229
- if (r && !i && o && !e._e) e.ee = u;
1230
- if (!r || i || e.ee !== s) insertSubs(e, i || r);
1233
+ if (r && !i && s && !e._e) e.ee = u;
1234
+ if (!r || i || e.ee !== o) insertSubs(e, i || r);
1231
1235
  } else if (r) {
1232
1236
  e.X = u;
1233
1237
  } else if (e.o != c) {
@@ -1237,7 +1241,7 @@ function recompute(e, t = false) {
1237
1241
  }
1238
1242
  }
1239
1243
  currentOptimisticLane = f;
1240
- (!t || e.Se & STATUS_PENDING) && !e.K && !(activeTransition && r) && globalQueue.oe.push(e);
1244
+ (!t || e.Se & STATUS_PENDING) && !e.K && !(activeTransition && r) && globalQueue.se.push(e);
1241
1245
  e.K && n && activeTransition !== e.K && runInTransition(e.K, () => recompute(e));
1242
1246
  }
1243
1247
  function updateIfNecessary(e) {
@@ -1293,7 +1297,7 @@ function computed(e, t, n) {
1293
1297
  K: null
1294
1298
  };
1295
1299
  r.T = r;
1296
- const o = context?.t ? context.u : context;
1300
+ const s = context?.t ? context.u : context;
1297
1301
  if (context) {
1298
1302
  const e = context.Ce;
1299
1303
  if (e === null) {
@@ -1303,7 +1307,7 @@ function computed(e, t, n) {
1303
1307
  context.Ce = r;
1304
1308
  }
1305
1309
  }
1306
- if (o) r.o = o.o + 1;
1310
+ if (s) r.o = s.o + 1;
1307
1311
  if (snapshotCaptureActive && ownerInSnapshotScope(context)) r.de = true;
1308
1312
  if (externalSourceConfig) {
1309
1313
  const e = signal(undefined, { equals: false, pureWrite: true });
@@ -1447,6 +1451,9 @@ function read(e) {
1447
1451
  if (!tracking && e !== t) link(e, t);
1448
1452
  throw n.le;
1449
1453
  }
1454
+ } else if (t && n !== e && n.Se & STATUS_UNINITIALIZED) {
1455
+ if (!tracking && e !== t) link(e, t);
1456
+ throw n.le;
1450
1457
  } else if (!t && n.Se & STATUS_UNINITIALIZED) {
1451
1458
  throw n.le;
1452
1459
  }
@@ -1484,8 +1491,8 @@ function setSignal(e, t) {
1484
1491
  const i = e.ee !== undefined && e.ee !== NOT_PENDING;
1485
1492
  const r = n ? (i ? e.ee : e.J) : e.X === NOT_PENDING ? e.J : e.X;
1486
1493
  if (typeof t === "function") t = t(r);
1487
- const o = !e.Ne || !e.Ne(r, t) || !!(e.Se & STATUS_UNINITIALIZED);
1488
- if (!o) {
1494
+ const s = !e.Ne || !e.Ne(r, t) || !!(e.Se & STATUS_UNINITIALIZED);
1495
+ if (!s) {
1489
1496
  if (n && i && e.L) {
1490
1497
  insertSubs(e, true);
1491
1498
  schedule();
@@ -1504,7 +1511,7 @@ function setSignal(e, t) {
1504
1511
  e.q = i;
1505
1512
  e.ee = t;
1506
1513
  } else {
1507
- if (e.X === NOT_PENDING) globalQueue.oe.push(e);
1514
+ if (e.X === NOT_PENDING) globalQueue.se.push(e);
1508
1515
  e.X = t;
1509
1516
  }
1510
1517
  updatePendingSignal(e);
@@ -1670,48 +1677,48 @@ function isUndefined(e) {
1670
1677
  return typeof e === "undefined";
1671
1678
  }
1672
1679
  function effect(e, t, n, i, r) {
1673
- let o = false;
1674
- const s = computed(r?.render ? t => staleValues(() => e(t)) : e, i, {
1680
+ let s = false;
1681
+ const o = computed(r?.render ? t => staleValues(() => e(t)) : e, i, {
1675
1682
  ...r,
1676
1683
  equals: () => {
1677
- s.H = !s.le;
1678
- if (o) s.F.enqueue(s.W, runEffect.bind(s));
1684
+ o.H = !o.le;
1685
+ if (s) o.F.enqueue(o.W, runEffect.bind(o));
1679
1686
  return false;
1680
1687
  },
1681
1688
  lazy: true
1682
1689
  });
1683
- s.Fe = i;
1684
- s.Me = t;
1685
- s.$e = n;
1686
- s.je = undefined;
1687
- s.W = r?.render ? EFFECT_RENDER : EFFECT_USER;
1688
- s.ge = (e, t) => {
1689
- const n = e !== undefined ? e : s.Se;
1690
- const i = t !== undefined ? t : s.le;
1690
+ o.Fe = i;
1691
+ o.Me = t;
1692
+ o.$e = n;
1693
+ o.je = undefined;
1694
+ o.W = r?.render ? EFFECT_RENDER : EFFECT_USER;
1695
+ o.ge = (e, t) => {
1696
+ const n = e !== undefined ? e : o.Se;
1697
+ const i = t !== undefined ? t : o.le;
1691
1698
  if (n & STATUS_ERROR) {
1692
1699
  let e = i;
1693
- s.F.notify(s, STATUS_PENDING, 0);
1694
- if (s.W === EFFECT_USER) {
1700
+ o.F.notify(o, STATUS_PENDING, 0);
1701
+ if (o.W === EFFECT_USER) {
1695
1702
  try {
1696
- return s.$e
1697
- ? s.$e(e, () => {
1698
- s.je?.();
1699
- s.je = undefined;
1703
+ return o.$e
1704
+ ? o.$e(e, () => {
1705
+ o.je?.();
1706
+ o.je = undefined;
1700
1707
  })
1701
1708
  : console.error(e);
1702
1709
  } catch (t) {
1703
1710
  e = t;
1704
1711
  }
1705
1712
  }
1706
- if (!s.F.notify(s, STATUS_ERROR, STATUS_ERROR)) throw e;
1707
- } else if (s.W === EFFECT_RENDER) {
1708
- s.F.notify(s, STATUS_PENDING | STATUS_ERROR, n, i);
1713
+ if (!o.F.notify(o, STATUS_ERROR, STATUS_ERROR)) throw e;
1714
+ } else if (o.W === EFFECT_RENDER) {
1715
+ o.F.notify(o, STATUS_PENDING | STATUS_ERROR, n, i);
1709
1716
  }
1710
1717
  };
1711
- recompute(s, true);
1712
- !r?.defer && (s.W === EFFECT_USER ? s.F.enqueue(s.W, runEffect.bind(s)) : runEffect.call(s));
1713
- o = true;
1714
- cleanup(() => s.je?.());
1718
+ recompute(o, true);
1719
+ !r?.defer && (o.W === EFFECT_USER ? o.F.enqueue(o.W, runEffect.bind(o)) : runEffect.call(o));
1720
+ s = true;
1721
+ cleanup(() => o.je?.());
1715
1722
  }
1716
1723
  function runEffect() {
1717
1724
  if (!this.H || this.O & REACTIVE_DISPOSED) return;
@@ -1731,8 +1738,11 @@ function runEffect() {
1731
1738
  function trackedEffect(e, t) {
1732
1739
  const run = () => {
1733
1740
  if (!n.H || n.O & REACTIVE_DISPOSED) return;
1734
- n.H = false;
1735
- recompute(n);
1741
+ try {
1742
+ n.H = false;
1743
+ recompute(n);
1744
+ } finally {
1745
+ }
1736
1746
  };
1737
1747
  const n = computed(
1738
1748
  () => {
@@ -1770,13 +1780,13 @@ function action(e) {
1770
1780
  new Promise((n, i) => {
1771
1781
  const r = e(...t);
1772
1782
  globalQueue.initTransition();
1773
- let o = activeTransition;
1774
- o.j.push(r);
1783
+ let s = activeTransition;
1784
+ s.j.push(r);
1775
1785
  const done = (e, t) => {
1776
- o = currentTransition(o);
1777
- const s = o.j.indexOf(r);
1778
- if (s >= 0) o.j.splice(s, 1);
1779
- setActiveTransition(o);
1786
+ s = currentTransition(s);
1787
+ const o = s.j.indexOf(r);
1788
+ if (o >= 0) s.j.splice(o, 1);
1789
+ setActiveTransition(s);
1780
1790
  schedule();
1781
1791
  t ? i(t) : n(e);
1782
1792
  };
@@ -1788,17 +1798,17 @@ function action(e) {
1788
1798
  return done(undefined, e);
1789
1799
  }
1790
1800
  if (n instanceof Promise)
1791
- return void n.then(run, e => restoreTransition(o, () => step(e, true)));
1801
+ return void n.then(run, e => restoreTransition(s, () => step(e, true)));
1792
1802
  run(n);
1793
1803
  };
1794
1804
  const run = e => {
1795
1805
  if (e.done) return done(e.value);
1796
1806
  if (e.value instanceof Promise)
1797
1807
  return void e.value.then(
1798
- e => restoreTransition(o, () => step(e)),
1799
- e => restoreTransition(o, () => step(e, true))
1808
+ e => restoreTransition(s, () => step(e)),
1809
+ e => restoreTransition(s, () => step(e, true))
1800
1810
  );
1801
- restoreTransition(o, () => step(e.value));
1811
+ restoreTransition(s, () => step(e.value));
1802
1812
  };
1803
1813
  step();
1804
1814
  });
@@ -1896,22 +1906,22 @@ function applyState(e, t, n) {
1896
1906
  const i = t?.[$TARGET];
1897
1907
  if (!i) return;
1898
1908
  const r = i[STORE_VALUE];
1899
- const o = i[STORE_OVERRIDE];
1900
- const s = i[STORE_OPTIMISTIC_OVERRIDE];
1909
+ const s = i[STORE_OVERRIDE];
1910
+ const o = i[STORE_OPTIMISTIC_OVERRIDE];
1901
1911
  let u = i[STORE_NODE];
1902
- if (e === r && !o && !s) return;
1912
+ if (e === r && !s && !o) return;
1903
1913
  (i[STORE_LOOKUP] || storeLookup).set(e, i[$PROXY]);
1904
1914
  i[STORE_VALUE] = e;
1905
1915
  i[STORE_OVERRIDE] = undefined;
1906
1916
  if (Array.isArray(r)) {
1907
1917
  let t = false;
1908
- const c = getOverrideValue(r, o, u, "length", s);
1918
+ const c = getOverrideValue(r, s, u, "length", o);
1909
1919
  if (e.length && c && e[0] && n(e[0]) != null) {
1910
1920
  let a, f, l, E, T, d, S, R;
1911
1921
  for (
1912
1922
  l = 0, E = Math.min(c, e.length);
1913
1923
  l < E &&
1914
- ((d = getOverrideValue(r, o, u, l, s)) === e[l] || (d && e[l] && n(d) === n(e[l])));
1924
+ ((d = getOverrideValue(r, s, u, l, o)) === e[l] || (d && e[l] && n(d) === n(e[l])));
1915
1925
  l++
1916
1926
  ) {
1917
1927
  applyState(e[l], wrap(d, i), n);
@@ -1922,7 +1932,7 @@ function applyState(e, t, n) {
1922
1932
  E = c - 1, T = e.length - 1;
1923
1933
  E >= l &&
1924
1934
  T >= l &&
1925
- ((d = getOverrideValue(r, o, u, E, s)) === e[T] || (d && e[T] && n(d) === n(e[T])));
1935
+ ((d = getOverrideValue(r, s, u, E, o)) === e[T] || (d && e[T] && n(d) === n(e[T])));
1926
1936
  E--, T--
1927
1937
  ) {
1928
1938
  O[T] = d;
@@ -1951,7 +1961,7 @@ function applyState(e, t, n) {
1951
1961
  _.set(R, f);
1952
1962
  }
1953
1963
  for (a = l; a <= E; a++) {
1954
- d = getOverrideValue(r, o, u, a, s);
1964
+ d = getOverrideValue(r, s, u, a, o);
1955
1965
  R = d ? n(d) : d;
1956
1966
  f = _.get(R);
1957
1967
  if (f !== undefined && f !== -1) {
@@ -1970,7 +1980,7 @@ function applyState(e, t, n) {
1970
1980
  if (l < e.length) t = true;
1971
1981
  } else if (e.length) {
1972
1982
  for (let t = 0, c = e.length; t < c; t++) {
1973
- const c = getOverrideValue(r, o, u, t, s);
1983
+ const c = getOverrideValue(r, s, u, t, o);
1974
1984
  isWrappable(c)
1975
1985
  ? applyState(e[t], wrap(c, i), n)
1976
1986
  : i[STORE_NODE][t] && setSignal(i[STORE_NODE][t], e[t]);
@@ -1985,11 +1995,11 @@ function applyState(e, t, n) {
1985
1995
  }
1986
1996
  if (u) {
1987
1997
  const t = u[$TRACK];
1988
- const c = t ? getAllKeys(r, o, e) : Object.keys(u);
1998
+ const c = t ? getAllKeys(r, s, e) : Object.keys(u);
1989
1999
  for (let a = 0, f = c.length; a < f; a++) {
1990
2000
  const f = c[a];
1991
2001
  const l = u[f];
1992
- const E = unwrap(getOverrideValue(r, o, u, f, s));
2002
+ const E = unwrap(getOverrideValue(r, s, u, f, o));
1993
2003
  let T = unwrap(e[f]);
1994
2004
  if (E === T) continue;
1995
2005
  if (!E || !isWrappable(E) || !isWrappable(T) || (n(E) != null && n(E) !== n(T))) {
@@ -2036,26 +2046,26 @@ function createProjectionInternal(e, t = {}, n) {
2036
2046
  r.set(e, t);
2037
2047
  return t;
2038
2048
  };
2039
- const o = wrapProjection(t);
2049
+ const s = wrapProjection(t);
2040
2050
  i = computed(() => {
2041
2051
  const t = getOwner();
2042
2052
  let i = false;
2043
2053
  let r;
2044
- const s = new Proxy(
2045
- o,
2054
+ const o = new Proxy(
2055
+ s,
2046
2056
  createWriteTraps(() => !i || t.Ae === r)
2047
2057
  );
2048
- storeSetter(s, s => {
2049
- r = e(s);
2058
+ storeSetter(o, o => {
2059
+ r = e(o);
2050
2060
  i = true;
2051
2061
  const u = handleAsync(t, r, e => {
2052
- e !== s && e !== undefined && storeSetter(o, reconcile(e, n?.key || "id"));
2062
+ e !== o && e !== undefined && storeSetter(s, reconcile(e, n?.key || "id"));
2053
2063
  });
2054
- u !== s && u !== undefined && reconcile(u, n?.key || "id")(o);
2064
+ u !== o && u !== undefined && reconcile(u, n?.key || "id")(s);
2055
2065
  });
2056
2066
  });
2057
2067
  i.xe = true;
2058
- return { store: o, node: i };
2068
+ return { store: s, node: i };
2059
2069
  }
2060
2070
  function createProjection(e, t = {}, n) {
2061
2071
  return createProjectionInternal(e, t, n).store;
@@ -2145,7 +2155,7 @@ function getNodes(e, t) {
2145
2155
  if (!n) e[t] = n = Object.create(null);
2146
2156
  return n;
2147
2157
  }
2148
- function getNode(e, t, n, i, r = isEqual, o, s) {
2158
+ function getNode(e, t, n, i, r = isEqual, s, o) {
2149
2159
  if (e[t]) return e[t];
2150
2160
  const u = signal(
2151
2161
  n,
@@ -2157,11 +2167,11 @@ function getNode(e, t, n, i, r = isEqual, o, s) {
2157
2167
  },
2158
2168
  i
2159
2169
  );
2160
- if (o) {
2170
+ if (s) {
2161
2171
  u.ee = NOT_PENDING;
2162
2172
  }
2163
- if (s && t in s) {
2164
- const e = s[t];
2173
+ if (o && t in o) {
2174
+ const e = o[t];
2165
2175
  u.Te = e === undefined ? NO_SNAPSHOT : e;
2166
2176
  snapshotSources?.add(u);
2167
2177
  }
@@ -2177,8 +2187,8 @@ function getKeys(e, t, n = true) {
2177
2187
  const i = untrack(() => (n ? Object.keys(e) : Reflect.ownKeys(e)));
2178
2188
  if (!t) return i;
2179
2189
  const r = new Set(i);
2180
- const o = Reflect.ownKeys(t);
2181
- for (const e of o) {
2190
+ const s = Reflect.ownKeys(t);
2191
+ for (const e of s) {
2182
2192
  if (t[e] !== $DELETED) r.add(e);
2183
2193
  else r.delete(e);
2184
2194
  }
@@ -2204,10 +2214,10 @@ const storeTraps = {
2204
2214
  }
2205
2215
  const i = getNodes(e, STORE_NODE);
2206
2216
  const r = i[t];
2207
- const o = e[STORE_OPTIMISTIC_OVERRIDE] && t in e[STORE_OPTIMISTIC_OVERRIDE];
2208
- const s = o || (e[STORE_OVERRIDE] && t in e[STORE_OVERRIDE]);
2217
+ const s = e[STORE_OPTIMISTIC_OVERRIDE] && t in e[STORE_OPTIMISTIC_OVERRIDE];
2218
+ const o = s || (e[STORE_OVERRIDE] && t in e[STORE_OVERRIDE]);
2209
2219
  const u = !!e[STORE_VALUE][$TARGET];
2210
- const c = o
2220
+ const c = s
2211
2221
  ? e[STORE_OPTIMISTIC_OVERRIDE]
2212
2222
  : e[STORE_OVERRIDE] && t in e[STORE_OVERRIDE]
2213
2223
  ? e[STORE_OVERRIDE]
@@ -2218,7 +2228,7 @@ const storeTraps = {
2218
2228
  }
2219
2229
  if (writeOnly(n)) {
2220
2230
  let n =
2221
- r && (s || !u)
2231
+ r && (o || !u)
2222
2232
  ? r.ee !== undefined && r.ee !== NOT_PENDING
2223
2233
  ? r.ee
2224
2234
  : r.X !== NOT_PENDING
@@ -2231,10 +2241,10 @@ const storeTraps = {
2231
2241
  Writing?.add(i);
2232
2242
  return i;
2233
2243
  }
2234
- let a = r ? (s || !u ? read(i[t]) : (read(i[t]), c[t])) : c[t];
2244
+ let a = r ? (o || !u ? read(i[t]) : (read(i[t]), c[t])) : c[t];
2235
2245
  a === $DELETED && (a = undefined);
2236
2246
  if (!r) {
2237
- if (!s && typeof a === "function" && !c.hasOwnProperty(t)) {
2247
+ if (!o && typeof a === "function" && !c.hasOwnProperty(t)) {
2238
2248
  let t;
2239
2249
  return !Array.isArray(e[STORE_VALUE]) &&
2240
2250
  (t = Object.getPrototypeOf(e[STORE_VALUE])) &&
@@ -2280,7 +2290,7 @@ const storeTraps = {
2280
2290
  }
2281
2291
  untrack(() => {
2282
2292
  const r = e[STORE_VALUE];
2283
- const o = r[t];
2293
+ const s = r[t];
2284
2294
  if (
2285
2295
  snapshotCaptureActive &&
2286
2296
  typeof t !== "symbol" &&
@@ -2291,22 +2301,22 @@ const storeTraps = {
2291
2301
  snapshotSources?.add(e);
2292
2302
  }
2293
2303
  if (!(t in e[STORE_SNAPSHOT_PROPS])) {
2294
- e[STORE_SNAPSHOT_PROPS][t] = o;
2304
+ e[STORE_SNAPSHOT_PROPS][t] = s;
2295
2305
  }
2296
2306
  }
2297
- const s = e[STORE_OPTIMISTIC] && !projectionWriteActive;
2298
- const u = s ? STORE_OPTIMISTIC_OVERRIDE : STORE_OVERRIDE;
2299
- if (s) trackOptimisticStore(i);
2307
+ const o = e[STORE_OPTIMISTIC] && !projectionWriteActive;
2308
+ const u = o ? STORE_OPTIMISTIC_OVERRIDE : STORE_OVERRIDE;
2309
+ if (o) trackOptimisticStore(i);
2300
2310
  const c =
2301
2311
  e[STORE_OPTIMISTIC_OVERRIDE] && t in e[STORE_OPTIMISTIC_OVERRIDE]
2302
2312
  ? e[STORE_OPTIMISTIC_OVERRIDE][t]
2303
2313
  : e[STORE_OVERRIDE] && t in e[STORE_OVERRIDE]
2304
2314
  ? e[STORE_OVERRIDE][t]
2305
- : o;
2315
+ : s;
2306
2316
  const a = n?.[$TARGET]?.[STORE_VALUE] ?? n;
2307
2317
  if (c === a) return true;
2308
2318
  const f = e[STORE_OPTIMISTIC_OVERRIDE]?.length || e[STORE_OVERRIDE]?.length || r.length;
2309
- if (a !== undefined && a === o) delete e[u][t];
2319
+ if (a !== undefined && a === s) delete e[u][t];
2310
2320
  else (e[u] || (e[u] = Object.create(null)))[t] = a;
2311
2321
  const l = isWrappable(a);
2312
2322
  e[STORE_HAS]?.[t] && setSignal(e[STORE_HAS][t], true);
@@ -2345,9 +2355,9 @@ const storeTraps = {
2345
2355
  delete e[i][t];
2346
2356
  } else return true;
2347
2357
  if (e[STORE_HAS]?.[t]) setSignal(e[STORE_HAS][t], false);
2348
- const o = getNodes(e, STORE_NODE);
2349
- o[t] && setSignal(o[t], undefined);
2350
- o[$TRACK] && setSignal(o[$TRACK], undefined);
2358
+ const s = getNodes(e, STORE_NODE);
2359
+ s[t] && setSignal(s[t], undefined);
2360
+ s[$TRACK] && setSignal(s[$TRACK], undefined);
2351
2361
  });
2352
2362
  }
2353
2363
  return true;
@@ -2418,9 +2428,9 @@ function createOptimisticStore(e, t, n) {
2418
2428
  GlobalQueue.ce ||= clearOptimisticStore;
2419
2429
  const i = typeof e === "function";
2420
2430
  const r = (i ? t : e) ?? {};
2421
- const o = i ? e : undefined;
2422
- const { store: s } = createOptimisticProjectionInternal(o, r, n);
2423
- return [s, e => storeSetter(s, e)];
2431
+ const s = i ? e : undefined;
2432
+ const { store: o } = createOptimisticProjectionInternal(s, r, n);
2433
+ return [o, e => storeSetter(o, e)];
2424
2434
  }
2425
2435
  function clearOptimisticStore(e) {
2426
2436
  const t = e[$TARGET];
@@ -2470,30 +2480,30 @@ function createOptimisticProjectionInternal(e, t = {}, n) {
2470
2480
  r.set(e, t);
2471
2481
  return t;
2472
2482
  };
2473
- const o = wrapProjection(t);
2483
+ const s = wrapProjection(t);
2474
2484
  if (e) {
2475
2485
  i = computed(() => {
2476
2486
  const t = getOwner();
2477
2487
  let i = false;
2478
2488
  let r;
2479
- const s = new Proxy(
2480
- o,
2489
+ const o = new Proxy(
2490
+ s,
2481
2491
  createWriteTraps(() => !i || t.Ae === r)
2482
2492
  );
2483
2493
  setProjectionWriteActive(true);
2484
2494
  try {
2485
- storeSetter(s, s => {
2486
- r = e(s);
2495
+ storeSetter(o, o => {
2496
+ r = e(o);
2487
2497
  i = true;
2488
2498
  const u = handleAsync(t, r, e => {
2489
2499
  setProjectionWriteActive(true);
2490
2500
  try {
2491
- e !== s && e !== undefined && storeSetter(o, reconcile(e, n?.key || "id"));
2501
+ e !== o && e !== undefined && storeSetter(s, reconcile(e, n?.key || "id"));
2492
2502
  } finally {
2493
2503
  setProjectionWriteActive(false);
2494
2504
  }
2495
2505
  });
2496
- u !== s && u !== undefined && reconcile(u, n?.key || "id")(o);
2506
+ u !== o && u !== undefined && reconcile(u, n?.key || "id")(s);
2497
2507
  });
2498
2508
  } finally {
2499
2509
  setProjectionWriteActive(false);
@@ -2501,7 +2511,7 @@ function createOptimisticProjectionInternal(e, t = {}, n) {
2501
2511
  });
2502
2512
  i.xe = true;
2503
2513
  }
2504
- return { store: o, node: i };
2514
+ return { store: s, node: i };
2505
2515
  }
2506
2516
  const DELETE = Symbol(0);
2507
2517
  function updatePath(e, t, n = 0) {
@@ -2509,8 +2519,8 @@ function updatePath(e, t, n = 0) {
2509
2519
  r = e;
2510
2520
  if (n < t.length - 1) {
2511
2521
  i = t[n];
2512
- const o = typeof i;
2513
- const s = Array.isArray(e);
2522
+ const s = typeof i;
2523
+ const o = Array.isArray(e);
2514
2524
  if (Array.isArray(i)) {
2515
2525
  for (let r = 0; r < i.length; r++) {
2516
2526
  t[n] = i[r];
@@ -2518,7 +2528,7 @@ function updatePath(e, t, n = 0) {
2518
2528
  }
2519
2529
  t[n] = i;
2520
2530
  return;
2521
- } else if (s && o === "function") {
2531
+ } else if (o && s === "function") {
2522
2532
  for (let r = 0; r < e.length; r++) {
2523
2533
  if (i(e[r], r)) {
2524
2534
  t[n] = r;
@@ -2527,9 +2537,9 @@ function updatePath(e, t, n = 0) {
2527
2537
  }
2528
2538
  t[n] = i;
2529
2539
  return;
2530
- } else if (s && o === "object") {
2531
- const { from: r = 0, to: o = e.length - 1, by: s = 1 } = i;
2532
- for (let i = r; i <= o; i += s) {
2540
+ } else if (o && s === "object") {
2541
+ const { from: r = 0, to: s = e.length - 1, by: o = 1 } = i;
2542
+ for (let i = r; i <= s; i += o) {
2533
2543
  t[n] = i;
2534
2544
  updatePath(e, t, n);
2535
2545
  }
@@ -2541,20 +2551,20 @@ function updatePath(e, t, n = 0) {
2541
2551
  }
2542
2552
  r = e[i];
2543
2553
  }
2544
- let o = t[t.length - 1];
2545
- if (typeof o === "function") {
2546
- o = o(r);
2547
- if (o === r) return;
2554
+ let s = t[t.length - 1];
2555
+ if (typeof s === "function") {
2556
+ s = s(r);
2557
+ if (s === r) return;
2548
2558
  }
2549
- if (i === undefined && o == undefined) return;
2550
- if (o === DELETE) {
2559
+ if (i === undefined && s == undefined) return;
2560
+ if (s === DELETE) {
2551
2561
  delete e[i];
2552
- } else if (i === undefined || (isWrappable(r) && isWrappable(o) && !Array.isArray(o))) {
2562
+ } else if (i === undefined || (isWrappable(r) && isWrappable(s) && !Array.isArray(s))) {
2553
2563
  const t = i !== undefined ? e[i] : e;
2554
- const n = Object.keys(o);
2555
- for (let e = 0; e < n.length; e++) t[n[e]] = o[n[e]];
2564
+ const n = Object.keys(s);
2565
+ for (let e = 0; e < n.length; e++) t[n[e]] = s[n[e]];
2556
2566
  } else {
2557
- e[i] = o;
2567
+ e[i] = s;
2558
2568
  }
2559
2569
  }
2560
2570
  const storePath = Object.assign(
@@ -2566,28 +2576,28 @@ const storePath = Object.assign(
2566
2576
  { DELETE: DELETE }
2567
2577
  );
2568
2578
  function snapshotImpl(e, t, n, i) {
2569
- let r, o, s, u, c, a;
2579
+ let r, s, o, u, c, a;
2570
2580
  if (!isWrappable(e)) return e;
2571
2581
  if (n && n.has(e)) return n.get(e);
2572
2582
  if (!n) n = new Map();
2573
2583
  if ((r = e[$TARGET] || i?.get(e)?.[$TARGET])) {
2574
2584
  if (t) trackSelf(r, $TRACK);
2575
- s = r[STORE_OVERRIDE];
2576
- o = Array.isArray(r[STORE_VALUE]);
2585
+ o = r[STORE_OVERRIDE];
2586
+ s = Array.isArray(r[STORE_VALUE]);
2577
2587
  n.set(
2578
2588
  e,
2579
- s ? (u = o ? [] : Object.create(Object.getPrototypeOf(r[STORE_VALUE]))) : r[STORE_VALUE]
2589
+ o ? (u = s ? [] : Object.create(Object.getPrototypeOf(r[STORE_VALUE]))) : r[STORE_VALUE]
2580
2590
  );
2581
2591
  e = r[STORE_VALUE];
2582
2592
  i = storeLookup;
2583
2593
  } else {
2584
- o = Array.isArray(e);
2594
+ s = Array.isArray(e);
2585
2595
  n.set(e, e);
2586
2596
  }
2587
- if (o) {
2588
- const o = s?.length || e.length;
2589
- for (let f = 0; f < o; f++) {
2590
- a = s && f in s ? s[f] : e[f];
2597
+ if (s) {
2598
+ const s = o?.length || e.length;
2599
+ for (let f = 0; f < s; f++) {
2600
+ a = o && f in o ? o[f] : e[f];
2591
2601
  if (a === $DELETED) continue;
2592
2602
  if (t && isWrappable(a)) wrap(a, r);
2593
2603
  if ((c = snapshotImpl(a, t, n, i)) !== a || u) {
@@ -2596,12 +2606,12 @@ function snapshotImpl(e, t, n, i) {
2596
2606
  }
2597
2607
  }
2598
2608
  } else {
2599
- const o = getKeys(e, s);
2600
- for (let f = 0, l = o.length; f < l; f++) {
2601
- let l = o[f];
2602
- const E = getPropertyDescriptor(e, s, l);
2609
+ const s = getKeys(e, o);
2610
+ for (let f = 0, l = s.length; f < l; f++) {
2611
+ let l = s[f];
2612
+ const E = getPropertyDescriptor(e, o, l);
2603
2613
  if (E.get) continue;
2604
- a = s && l in s ? s[l] : e[l];
2614
+ a = o && l in o ? o[l] : e[l];
2605
2615
  if (t && isWrappable(a)) wrap(a, r);
2606
2616
  if ((c = snapshotImpl(a, t, n, i)) !== e[l] || u) {
2607
2617
  if (!u) {
@@ -2660,8 +2670,8 @@ function merge(...e) {
2660
2670
  for (let i = 0; i < e.length; i++) {
2661
2671
  const r = e[i];
2662
2672
  t = t || (!!r && $PROXY in r);
2663
- const o = !!r && r[$SOURCES];
2664
- if (o) n.push(...o);
2673
+ const s = !!r && r[$SOURCES];
2674
+ if (s) n.push(...s);
2665
2675
  else n.push(typeof r === "function" ? ((t = true), createMemo(r)) : r);
2666
2676
  }
2667
2677
  if (SUPPORTS_PROXY && t) {
@@ -2691,35 +2701,35 @@ function merge(...e) {
2691
2701
  }
2692
2702
  const i = Object.create(null);
2693
2703
  let r = false;
2694
- let o = n.length - 1;
2695
- for (let e = o; e >= 0; e--) {
2704
+ let s = n.length - 1;
2705
+ for (let e = s; e >= 0; e--) {
2696
2706
  const t = n[e];
2697
2707
  if (!t) {
2698
- e === o && o--;
2708
+ e === s && s--;
2699
2709
  continue;
2700
2710
  }
2701
- const s = Object.getOwnPropertyNames(t);
2702
- for (let n = s.length - 1; n >= 0; n--) {
2703
- const u = s[n];
2711
+ const o = Object.getOwnPropertyNames(t);
2712
+ for (let n = o.length - 1; n >= 0; n--) {
2713
+ const u = o[n];
2704
2714
  if (u === "__proto__" || u === "constructor") continue;
2705
2715
  if (!i[u]) {
2706
- r = r || e !== o;
2716
+ r = r || e !== s;
2707
2717
  const n = Object.getOwnPropertyDescriptor(t, u);
2708
2718
  i[u] = n.get ? { enumerable: true, configurable: true, get: n.get.bind(t) } : n;
2709
2719
  }
2710
2720
  }
2711
2721
  }
2712
- if (!r) return n[o];
2713
- const s = {};
2722
+ if (!r) return n[s];
2723
+ const o = {};
2714
2724
  const u = Object.keys(i);
2715
2725
  for (let e = u.length - 1; e >= 0; e--) {
2716
2726
  const t = u[e],
2717
2727
  n = i[t];
2718
- if (n.get) Object.defineProperty(s, t, n);
2719
- else s[t] = n.value;
2728
+ if (n.get) Object.defineProperty(o, t, n);
2729
+ else o[t] = n.value;
2720
2730
  }
2721
- s[$SOURCES] = n;
2722
- return s;
2731
+ o[$SOURCES] = n;
2732
+ return o;
2723
2733
  }
2724
2734
  function omit(e, ...t) {
2725
2735
  const n = new Set(t);
@@ -2753,14 +2763,14 @@ function omit(e, ...t) {
2753
2763
  function mapArray(e, t, n) {
2754
2764
  const i = typeof n?.keyed === "function" ? n.keyed : undefined;
2755
2765
  const r = t.length > 1;
2756
- const o = t;
2766
+ const s = t;
2757
2767
  return createMemo(
2758
2768
  updateKeyedMap.bind({
2759
2769
  Ye: createOwner(),
2760
- Be: 0,
2761
- Ze: e,
2770
+ Ze: 0,
2771
+ Be: e,
2762
2772
  qe: [],
2763
- ze: o,
2773
+ ze: s,
2764
2774
  Xe: [],
2765
2775
  Je: [],
2766
2776
  et: i,
@@ -2772,7 +2782,7 @@ function mapArray(e, t, n) {
2772
2782
  }
2773
2783
  const pureOptions = { pureWrite: true };
2774
2784
  function updateKeyedMap() {
2775
- const e = this.Ze() || [],
2785
+ const e = this.Be() || [],
2776
2786
  t = e.length;
2777
2787
  e[$TRACK];
2778
2788
  runWithOwner(this.Ye, () => {
@@ -2795,29 +2805,29 @@ function updateKeyedMap() {
2795
2805
  return this.ze(() => t);
2796
2806
  };
2797
2807
  if (t === 0) {
2798
- if (this.Be !== 0) {
2808
+ if (this.Ze !== 0) {
2799
2809
  this.Ye.dispose(false);
2800
2810
  this.Je = [];
2801
2811
  this.qe = [];
2802
2812
  this.Xe = [];
2803
- this.Be = 0;
2813
+ this.Ze = 0;
2804
2814
  this.tt && (this.tt = []);
2805
2815
  this.nt && (this.nt = []);
2806
2816
  }
2807
2817
  if (this.it && !this.Xe[0]) {
2808
2818
  this.Xe[0] = runWithOwner((this.Je[0] = createOwner()), this.it);
2809
2819
  }
2810
- } else if (this.Be === 0) {
2820
+ } else if (this.Ze === 0) {
2811
2821
  if (this.Je[0]) this.Je[0].dispose();
2812
2822
  this.Xe = new Array(t);
2813
2823
  for (i = 0; i < t; i++) {
2814
2824
  this.qe[i] = e[i];
2815
2825
  this.Xe[i] = runWithOwner((this.Je[i] = createOwner()), r);
2816
2826
  }
2817
- this.Be = t;
2827
+ this.Ze = t;
2818
2828
  } else {
2819
- let o,
2820
- s,
2829
+ let s,
2830
+ o,
2821
2831
  u,
2822
2832
  c,
2823
2833
  a,
@@ -2828,34 +2838,34 @@ function updateKeyedMap() {
2828
2838
  d = this.tt ? new Array(t) : undefined,
2829
2839
  S = this.nt ? new Array(t) : undefined;
2830
2840
  for (
2831
- o = 0, s = Math.min(this.Be, t);
2832
- o < s && (this.qe[o] === e[o] || (this.tt && compare(this.et, this.qe[o], e[o])));
2833
- o++
2841
+ s = 0, o = Math.min(this.Ze, t);
2842
+ s < o && (this.qe[s] === e[s] || (this.tt && compare(this.et, this.qe[s], e[s])));
2843
+ s++
2834
2844
  ) {
2835
- if (this.tt) setSignal(this.tt[o], e[o]);
2845
+ if (this.tt) setSignal(this.tt[s], e[s]);
2836
2846
  }
2837
2847
  for (
2838
- s = this.Be - 1, u = t - 1;
2839
- s >= o &&
2840
- u >= o &&
2841
- (this.qe[s] === e[u] || (this.tt && compare(this.et, this.qe[s], e[u])));
2842
- s--, u--
2848
+ o = this.Ze - 1, u = t - 1;
2849
+ o >= s &&
2850
+ u >= s &&
2851
+ (this.qe[o] === e[u] || (this.tt && compare(this.et, this.qe[o], e[u])));
2852
+ o--, u--
2843
2853
  ) {
2844
- E[u] = this.Xe[s];
2845
- T[u] = this.Je[s];
2846
- d && (d[u] = this.tt[s]);
2847
- S && (S[u] = this.nt[s]);
2854
+ E[u] = this.Xe[o];
2855
+ T[u] = this.Je[o];
2856
+ d && (d[u] = this.tt[o]);
2857
+ S && (S[u] = this.nt[o]);
2848
2858
  }
2849
2859
  f = new Map();
2850
2860
  l = new Array(u + 1);
2851
- for (i = u; i >= o; i--) {
2861
+ for (i = u; i >= s; i--) {
2852
2862
  c = e[i];
2853
2863
  a = this.et ? this.et(c) : c;
2854
2864
  n = f.get(a);
2855
2865
  l[i] = n === undefined ? -1 : n;
2856
2866
  f.set(a, i);
2857
2867
  }
2858
- for (n = o; n <= s; n++) {
2868
+ for (n = s; n <= o; n++) {
2859
2869
  c = this.qe[n];
2860
2870
  a = this.et ? this.et(c) : c;
2861
2871
  i = f.get(a);
@@ -2868,7 +2878,7 @@ function updateKeyedMap() {
2868
2878
  f.set(a, i);
2869
2879
  } else this.Je[n].dispose();
2870
2880
  }
2871
- for (i = o; i < t; i++) {
2881
+ for (i = s; i < t; i++) {
2872
2882
  if (i in E) {
2873
2883
  this.Xe[i] = E[i];
2874
2884
  this.Je[i] = T[i];
@@ -2884,7 +2894,7 @@ function updateKeyedMap() {
2884
2894
  this.Xe[i] = runWithOwner((this.Je[i] = createOwner()), r);
2885
2895
  }
2886
2896
  }
2887
- this.Xe = this.Xe.slice(0, (this.Be = t));
2897
+ this.Xe = this.Xe.slice(0, (this.Ze = t));
2888
2898
  this.qe = e.slice(0);
2889
2899
  }
2890
2900
  });
@@ -2894,26 +2904,26 @@ function repeat(e, t, n) {
2894
2904
  const i = t;
2895
2905
  return updateRepeat.bind({
2896
2906
  Ye: createOwner(),
2897
- Be: 0,
2907
+ Ze: 0,
2898
2908
  rt: 0,
2899
- ot: e,
2909
+ st: e,
2900
2910
  ze: i,
2901
2911
  Je: [],
2902
2912
  Xe: [],
2903
- st: n?.from,
2913
+ ot: n?.from,
2904
2914
  it: n?.fallback
2905
2915
  });
2906
2916
  }
2907
2917
  function updateRepeat() {
2908
- const e = this.ot();
2909
- const t = this.st?.() || 0;
2918
+ const e = this.st();
2919
+ const t = this.ot?.() || 0;
2910
2920
  runWithOwner(this.Ye, () => {
2911
2921
  if (e === 0) {
2912
- if (this.Be !== 0) {
2922
+ if (this.Ze !== 0) {
2913
2923
  this.Ye.dispose(false);
2914
2924
  this.Je = [];
2915
2925
  this.Xe = [];
2916
- this.Be = 0;
2926
+ this.Ze = 0;
2917
2927
  }
2918
2928
  if (this.it && !this.Xe[0]) {
2919
2929
  this.Xe[0] = runWithOwner((this.Je[0] = createOwner()), this.it);
@@ -2921,12 +2931,12 @@ function updateRepeat() {
2921
2931
  return;
2922
2932
  }
2923
2933
  const n = t + e;
2924
- const i = this.rt + this.Be;
2925
- if (this.Be === 0 && this.Je[0]) this.Je[0].dispose();
2934
+ const i = this.rt + this.Ze;
2935
+ if (this.Ze === 0 && this.Je[0]) this.Je[0].dispose();
2926
2936
  for (let e = n; e < i; e++) this.Je[e - this.rt].dispose();
2927
2937
  if (this.rt < t) {
2928
2938
  let e = this.rt;
2929
- while (e < t && e < this.Be) this.Je[e++].dispose();
2939
+ while (e < t && e < this.Ze) this.Je[e++].dispose();
2930
2940
  this.Je.splice(0, t - this.rt);
2931
2941
  this.Xe.splice(0, t - this.rt);
2932
2942
  } else if (this.rt > t) {
@@ -2947,7 +2957,7 @@ function updateRepeat() {
2947
2957
  }
2948
2958
  this.Xe = this.Xe.slice(0, e);
2949
2959
  this.rt = t;
2950
- this.Be = e;
2960
+ this.Ze = e;
2951
2961
  });
2952
2962
  return this.Xe;
2953
2963
  }
@@ -3040,18 +3050,18 @@ class CollectionQueue extends Queue {
3040
3050
  }
3041
3051
  function createCollectionBoundary(e, t, n, i) {
3042
3052
  const r = createOwner();
3043
- const o = new CollectionQueue(e);
3044
- if (i) o.Tt = i;
3045
- const s = createBoundChildren(r, t, o, e);
3053
+ const s = new CollectionQueue(e);
3054
+ if (i) s.Tt = i;
3055
+ const o = createBoundChildren(r, t, s, e);
3046
3056
  const u = computed(() => {
3047
- if (!read(o.lt)) {
3048
- const e = read(s);
3049
- if (!untrack(() => read(o.lt))) {
3050
- o.Et = true;
3057
+ if (!read(s.lt)) {
3058
+ const e = read(o);
3059
+ if (!untrack(() => read(s.lt))) {
3060
+ s.Et = true;
3051
3061
  return e;
3052
3062
  }
3053
3063
  }
3054
- return n(o);
3064
+ return n(s);
3055
3065
  });
3056
3066
  return accessor(u);
3057
3067
  }
@@ -3092,9 +3102,9 @@ function flatten(e, t) {
3092
3102
  function flattenArray(e, t = [], n) {
3093
3103
  let i = null;
3094
3104
  let r = false;
3095
- for (let o = 0; o < e.length; o++) {
3105
+ for (let s = 0; s < e.length; s++) {
3096
3106
  try {
3097
- let i = e[o];
3107
+ let i = e[s];
3098
3108
  if (typeof i === "function" && !i.length) {
3099
3109
  if (n?.doNotUnwrap) {
3100
3110
  t.push(i);