@solidjs/signals 0.10.1 → 0.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/node.cjs CHANGED
@@ -139,8 +139,8 @@ function adjustHeight(e, t) {
139
139
  }
140
140
  }
141
141
  const m = new Set();
142
- const b = { l: new Array(2e3).fill(undefined), _: false, W: 0, S: 0 };
143
142
  const _ = { l: new Array(2e3).fill(undefined), _: false, W: 0, S: 0 };
143
+ const b = { l: new Array(2e3).fill(undefined), _: false, W: 0, S: 0 };
144
144
  let O = 0;
145
145
  let x = null;
146
146
  let v = false;
@@ -238,12 +238,12 @@ class GlobalQueue extends Queue {
238
238
  if (this.q) return;
239
239
  this.q = true;
240
240
  try {
241
- runHeap(b, GlobalQueue.K);
241
+ runHeap(_, GlobalQueue.K);
242
242
  if (x) {
243
243
  const e = transitionComplete(x);
244
244
  if (!e) {
245
245
  let e = x;
246
- runHeap(_, GlobalQueue.K);
246
+ runHeap(b, GlobalQueue.K);
247
247
  this.D = [];
248
248
  this.B = [];
249
249
  this.G = new Set();
@@ -251,7 +251,7 @@ class GlobalQueue extends Queue {
251
251
  runLaneEffects(p);
252
252
  this.stashQueues(x.X);
253
253
  O++;
254
- v = b.S >= b.W;
254
+ v = _.S >= _.W;
255
255
  reassignPendingTransition(x.D);
256
256
  x = null;
257
257
  finalizePureQueue(null, true);
@@ -265,11 +265,11 @@ class GlobalQueue extends Queue {
265
265
  reassignPendingTransition(this.D);
266
266
  finalizePureQueue(t);
267
267
  } else {
268
- if (m.size) runHeap(_, GlobalQueue.K);
268
+ if (m.size) runHeap(b, GlobalQueue.K);
269
269
  finalizePureQueue();
270
270
  }
271
271
  O++;
272
- v = b.S >= b.W;
272
+ v = _.S >= _.W;
273
273
  runLaneEffects(d);
274
274
  this.run(d);
275
275
  runLaneEffects(p);
@@ -359,7 +359,7 @@ function insertSubs(e, t = false) {
359
359
  }
360
360
  continue;
361
361
  }
362
- const i = r.A.m & o ? _ : b;
362
+ const i = r.A.m & o ? b : _;
363
363
  if (i.W > r.A.o) i.W = r.A.o;
364
364
  insertIntoHeap(r.A, i);
365
365
  }
@@ -367,7 +367,7 @@ function insertSubs(e, t = false) {
367
367
  function finalizePureQueue(e = null, t = false) {
368
368
  let n = !t;
369
369
  if (!t) checkBoundaryChildren(A);
370
- if (b.S >= b.W) runHeap(b, GlobalQueue.K);
370
+ if (_.S >= _.W) runHeap(_, GlobalQueue.K);
371
371
  if (n) {
372
372
  const t = A.D;
373
373
  for (let e = 0; e < t.length; e++) {
@@ -641,7 +641,7 @@ function clearStatus(e) {
641
641
  e.ce = e.ce & a;
642
642
  e.Y = null;
643
643
  updatePendingSignal(e);
644
- e.be?.();
644
+ e._e?.();
645
645
  }
646
646
  function notifyStatus(e, t, n, r, i) {
647
647
  if (t === c && !(n instanceof StatusError) && !(n instanceof NotReadyError))
@@ -665,11 +665,11 @@ function notifyStatus(e, t, n, r, i) {
665
665
  }
666
666
  const f = r || u;
667
667
  const d = r || o ? undefined : i;
668
- if (e.be) {
668
+ if (e._e) {
669
669
  if (f) {
670
- e.be(t, n);
670
+ e._e(t, n);
671
671
  } else {
672
- e.be();
672
+ e._e();
673
673
  }
674
674
  return;
675
675
  }
@@ -701,12 +701,12 @@ function effect(e, t, n, r, i) {
701
701
  },
702
702
  lazy: true
703
703
  });
704
- o._e = r;
704
+ o.be = r;
705
705
  o.Oe = t;
706
706
  o.xe = n;
707
707
  o.ve = undefined;
708
708
  o.ie = i?.render ? d : p;
709
- o.be = (e, t) => {
709
+ o._e = (e, t) => {
710
710
  const n = e !== undefined ? e : o.ce;
711
711
  const r = t !== undefined ? t : o.Y;
712
712
  if (n & c) {
@@ -737,11 +737,11 @@ function runEffect() {
737
737
  this.ve?.();
738
738
  this.ve = undefined;
739
739
  try {
740
- this.ve = this.Oe(this.le, this._e);
740
+ this.ve = this.Oe(this.le, this.be);
741
741
  } catch (e) {
742
742
  if (!this.oe.notify(this, c, c)) throw e;
743
743
  } finally {
744
- this._e = this.le;
744
+ this.be = this.le;
745
745
  this.se = false;
746
746
  }
747
747
  }
@@ -776,8 +776,8 @@ function markDisposal(e) {
776
776
  while (t) {
777
777
  t.m |= o;
778
778
  if (t.m & i) {
779
- deleteFromHeap(t, b);
780
- insertIntoHeap(t, _);
779
+ deleteFromHeap(t, _);
780
+ insertIntoHeap(t, b);
781
781
  }
782
782
  markDisposal(t);
783
783
  t = t.Ae;
@@ -800,7 +800,7 @@ function disposeChildren(e, t = false, n) {
800
800
  const e = r.Ae;
801
801
  if (r.j) {
802
802
  const e = r;
803
- deleteFromHeap(e, e.m & o ? _ : b);
803
+ deleteFromHeap(e, e.m & o ? b : _);
804
804
  let t = e.j;
805
805
  do {
806
806
  t = unlinkSubs(t);
@@ -816,11 +816,12 @@ function disposeChildren(e, t = false, n) {
816
816
  } else {
817
817
  e.Pe = null;
818
818
  e.Ae = null;
819
+ e.We = 0;
819
820
  }
820
821
  runDisposal(e, n);
821
822
  }
822
823
  function runDisposal(e, t) {
823
- let n = t ? e.We : e.Ee;
824
+ let n = t ? e.Ee : e.je;
824
825
  if (!n) return;
825
826
  if (Array.isArray(n)) {
826
827
  for (let e = 0; e < n.length; e++) {
@@ -830,10 +831,12 @@ function runDisposal(e, t) {
830
831
  } else {
831
832
  n.call(n);
832
833
  }
833
- t ? (e.We = null) : (e.Ee = null);
834
+ t ? (e.Ee = null) : (e.je = null);
834
835
  }
835
836
  function getNextChildId(e) {
836
- if (e.id != null) return formatId(e.id, e.je++);
837
+ let t = e;
838
+ while (t.Ne && t.i) t = t.i;
839
+ if (t.id != null) return formatId(t.id, t.We++);
837
840
  throw new Error("Cannot get child id from owner without an id");
838
841
  }
839
842
  function formatId(e, t) {
@@ -850,40 +853,42 @@ function getOwner() {
850
853
  }
851
854
  function onCleanup(e) {
852
855
  if (!Q) return e;
853
- if (!Q.Ee) Q.Ee = e;
854
- else if (Array.isArray(Q.Ee)) Q.Ee.push(e);
855
- else Q.Ee = [Q.Ee, e];
856
+ if (!Q.je) Q.je = e;
857
+ else if (Array.isArray(Q.je)) Q.je.push(e);
858
+ else Q.je = [Q.je, e];
856
859
  return e;
857
860
  }
858
861
  function createOwner(e) {
859
862
  const t = Q;
860
- const n = {
861
- id: e?.id ?? (t?.id != null ? getNextChildId(t) : undefined),
863
+ const n = e?.transparent ?? false;
864
+ const r = {
865
+ id: e?.id ?? (n ? t?.id : t?.id != null ? getNextChildId(t) : undefined),
866
+ Ne: n || undefined,
862
867
  t: true,
863
868
  u: t?.t ? t.u : t,
864
869
  Pe: null,
865
870
  Ae: null,
866
- Ee: null,
871
+ je: null,
867
872
  oe: t?.oe ?? A,
868
- Ne: t?.Ne || w,
869
- je: 0,
870
- We: null,
873
+ Le: t?.Le || w,
874
+ We: 0,
875
+ Ee: null,
871
876
  Ce: null,
872
877
  i: t,
873
878
  dispose(e = true) {
874
- disposeChildren(n, e);
879
+ disposeChildren(r, e);
875
880
  }
876
881
  };
877
882
  if (t) {
878
883
  const e = t.Pe;
879
884
  if (e === null) {
880
- t.Pe = n;
885
+ t.Pe = r;
881
886
  } else {
882
- n.Ae = e;
883
- t.Pe = n;
887
+ r.Ae = e;
888
+ t.Pe = r;
884
889
  }
885
890
  }
886
- return n;
891
+ return r;
887
892
  }
888
893
  function createRoot(e, t) {
889
894
  const n = createOwner(t);
@@ -893,21 +898,21 @@ function unlinkSubs(e) {
893
898
  const t = e.L;
894
899
  const n = e.N;
895
900
  const r = e.P;
896
- const i = e.Le;
897
- if (r !== null) r.Le = i;
898
- else t.Ie = i;
901
+ const i = e.Ie;
902
+ if (r !== null) r.Ie = i;
903
+ else t.He = i;
899
904
  if (i !== null) i.P = r;
900
905
  else {
901
906
  t.O = r;
902
907
  if (r === null) {
903
- t.He?.();
904
- t.H && !t.Qe && unobserved(t);
908
+ t.Qe?.();
909
+ t.H && !t.Re && unobserved(t);
905
910
  }
906
911
  }
907
912
  return n;
908
913
  }
909
914
  function unobserved(e) {
910
- deleteFromHeap(e, e.m & o ? _ : b);
915
+ deleteFromHeap(e, e.m & o ? b : _);
911
916
  let t = e.j;
912
917
  while (t !== null) {
913
918
  t = unlinkSubs(t);
@@ -927,9 +932,9 @@ function link(e, t) {
927
932
  return;
928
933
  }
929
934
  }
930
- const o = e.Ie;
935
+ const o = e.He;
931
936
  if (o !== null && o.A === t && (!s || isValidLink(o, t))) return;
932
- const u = (t.ke = e.Ie = { L: e, A: t, N: i, Le: o, P: null });
937
+ const u = (t.ke = e.He = { L: e, A: t, N: i, Ie: o, P: null });
933
938
  if (n !== null) n.N = u;
934
939
  else t.j = u;
935
940
  if (o !== null) o.P = u;
@@ -961,14 +966,15 @@ function recompute(t, n = false) {
961
966
  const i = t.ie;
962
967
  if (!n) {
963
968
  if (t.ne && (!i || x) && x !== t.ne) A.initTransition(t.ne);
964
- deleteFromHeap(t, t.m & o ? _ : b);
969
+ deleteFromHeap(t, t.m & o ? b : _);
965
970
  if (t.ne || i === h) disposeChildren(t);
966
971
  else {
967
972
  markDisposal(t);
968
- t.We = t.Ee;
973
+ t.Ee = t.je;
969
974
  t.Ce = t.Pe;
970
- t.Ee = null;
975
+ t.je = null;
971
976
  t.Pe = null;
977
+ t.We = 0;
972
978
  }
973
979
  }
974
980
  const s = !!(t.m & f);
@@ -1045,7 +1051,7 @@ function recompute(t, n = false) {
1045
1051
  t.fe = p;
1046
1052
  } else if (t.o != g) {
1047
1053
  for (let e = t.O; e !== null; e = e.P) {
1048
- insertIntoHeapHeight(e.A, e.A.m & o ? _ : b);
1054
+ insertIntoHeapHeight(e.A, e.A.m & o ? b : _);
1049
1055
  }
1050
1056
  }
1051
1057
  }
@@ -1072,15 +1078,17 @@ function updateIfNecessary(r) {
1072
1078
  r.m = e;
1073
1079
  }
1074
1080
  function computed(t, n, r) {
1075
- const i = {
1076
- id: r?.id ?? (Q?.id != null ? getNextChildId(Q) : undefined),
1081
+ const i = r?.transparent ?? false;
1082
+ const s = {
1083
+ id: r?.id ?? (i ? Q?.id : Q?.id != null ? getNextChildId(Q) : undefined),
1084
+ Ne: i || undefined,
1077
1085
  Se: r?.equals != null ? r.equals : isEqual,
1078
- Re: !!r?.pureWrite,
1079
- He: r?.unobserved,
1080
- Ee: null,
1086
+ Te: !!r?.pureWrite,
1087
+ Qe: r?.unobserved,
1088
+ je: null,
1081
1089
  oe: Q?.oe ?? A,
1082
- Ne: Q?.Ne ?? w,
1083
- je: 0,
1090
+ Le: Q?.Le ?? w,
1091
+ We: 0,
1084
1092
  H: t,
1085
1093
  le: n,
1086
1094
  o: 0,
@@ -1090,7 +1098,7 @@ function computed(t, n, r) {
1090
1098
  j: null,
1091
1099
  ke: null,
1092
1100
  O: null,
1093
- Ie: null,
1101
+ He: null,
1094
1102
  i: Q,
1095
1103
  Ae: null,
1096
1104
  Pe: null,
@@ -1098,34 +1106,34 @@ function computed(t, n, r) {
1098
1106
  ce: a,
1099
1107
  $: O,
1100
1108
  fe: y,
1101
- We: null,
1109
+ Ee: null,
1102
1110
  Ce: null,
1103
1111
  we: null,
1104
1112
  ne: null
1105
1113
  };
1106
- i.p = i;
1107
- const s = Q?.t ? Q.u : Q;
1114
+ s.p = s;
1115
+ const o = Q?.t ? Q.u : Q;
1108
1116
  if (Q) {
1109
1117
  const e = Q.Pe;
1110
1118
  if (e === null) {
1111
- Q.Pe = i;
1119
+ Q.Pe = s;
1112
1120
  } else {
1113
- i.Ae = e;
1114
- Q.Pe = i;
1121
+ s.Ae = e;
1122
+ Q.Pe = s;
1115
1123
  }
1116
1124
  }
1117
- if (s) i.o = s.o + 1;
1118
- !r?.lazy && recompute(i, true);
1119
- return i;
1125
+ if (o) s.o = o.o + 1;
1126
+ !r?.lazy && recompute(s, true);
1127
+ return s;
1120
1128
  }
1121
1129
  function signal(e, t, n = null) {
1122
1130
  const r = {
1123
1131
  Se: t?.equals != null ? t.equals : isEqual,
1124
- Re: !!t?.pureWrite,
1125
- He: t?.unobserved,
1132
+ Te: !!t?.pureWrite,
1133
+ Qe: t?.unobserved,
1126
1134
  le: e,
1127
1135
  O: null,
1128
- Ie: null,
1136
+ He: null,
1129
1137
  $: O,
1130
1138
  I: n,
1131
1139
  C: n?.k || null,
@@ -1193,9 +1201,9 @@ function read(e) {
1193
1201
  const n = e.I || e;
1194
1202
  if (n.H) {
1195
1203
  const r = e.m & o;
1196
- if (n.o >= (r ? _.W : b.W)) {
1204
+ if (n.o >= (r ? b.W : _.W)) {
1197
1205
  markNode(t);
1198
- markHeap(r ? _ : b);
1206
+ markHeap(r ? b : _);
1199
1207
  updateIfNecessary(n);
1200
1208
  }
1201
1209
  const i = n.o;
@@ -1280,14 +1288,14 @@ function runWithOwner(e, t) {
1280
1288
  }
1281
1289
  }
1282
1290
  function getPendingSignal(e) {
1283
- if (!e.Te) {
1284
- e.Te = optimisticSignal(false, { pureWrite: true });
1291
+ if (!e.Me) {
1292
+ e.Me = optimisticSignal(false, { pureWrite: true });
1285
1293
  if (e.de) {
1286
- e.Te.de = e;
1294
+ e.Me.de = e;
1287
1295
  }
1288
- if (computePendingState(e)) setSignal(e.Te, true);
1296
+ if (computePendingState(e)) setSignal(e.Me, true);
1289
1297
  }
1290
- return e.Te;
1298
+ return e.Me;
1291
1299
  }
1292
1300
  function computePendingState(e) {
1293
1301
  const t = e;
@@ -1303,9 +1311,9 @@ function computePendingState(e) {
1303
1311
  return !!(t.ce & l && !(t.ce & a));
1304
1312
  }
1305
1313
  function updatePendingSignal(e) {
1306
- if (e.Te) {
1314
+ if (e.Me) {
1307
1315
  const t = computePendingState(e);
1308
- const n = e.Te;
1316
+ const n = e.Me;
1309
1317
  setSignal(n, t);
1310
1318
  if (!t && n.re) {
1311
1319
  const t = resolveLane(e);
@@ -1395,7 +1403,7 @@ function getContext(e, t = getOwner()) {
1395
1403
  if (!t) {
1396
1404
  throw new NoOwnerError();
1397
1405
  }
1398
- const n = hasContext(e, t) ? t.Ne[e.id] : e.defaultValue;
1406
+ const n = hasContext(e, t) ? t.Le[e.id] : e.defaultValue;
1399
1407
  if (isUndefined(n)) {
1400
1408
  throw new ContextNotFoundError();
1401
1409
  }
@@ -1405,10 +1413,10 @@ function setContext(e, t, n = getOwner()) {
1405
1413
  if (!n) {
1406
1414
  throw new NoOwnerError();
1407
1415
  }
1408
- n.Ne = { ...n.Ne, [e.id]: isUndefined(t) ? e.defaultValue : t };
1416
+ n.Le = { ...n.Le, [e.id]: isUndefined(t) ? e.defaultValue : t };
1409
1417
  }
1410
1418
  function hasContext(e, t) {
1411
- return !isUndefined(t?.Ne[e.id]);
1419
+ return !isUndefined(t?.Le[e.id]);
1412
1420
  }
1413
1421
  function isUndefined(e) {
1414
1422
  return typeof e === "undefined";
@@ -1690,7 +1698,7 @@ function createProjectionInternal(e, t = {}, n) {
1690
1698
  i !== r && i !== undefined && reconcile(i, n?.key || "id", n?.all)(s);
1691
1699
  });
1692
1700
  });
1693
- r.Qe = true;
1701
+ r.Re = true;
1694
1702
  return { store: s, node: r };
1695
1703
  }
1696
1704
  function createProjection(e, t = {}, n) {
@@ -2118,7 +2126,7 @@ function createOptimisticProjectionInternal(e, t = {}, n) {
2118
2126
  setProjectionWriteActive(false);
2119
2127
  }
2120
2128
  });
2121
- r.Qe = true;
2129
+ r.Re = true;
2122
2130
  }
2123
2131
  return { store: s, node: r };
2124
2132
  }
@@ -2299,68 +2307,68 @@ function mapArray(e, t, n) {
2299
2307
  const r = typeof n?.keyed === "function" ? n.keyed : undefined;
2300
2308
  return createMemo(
2301
2309
  updateKeyedMap.bind({
2302
- Me: createOwner(),
2303
- qe: 0,
2304
- Fe: e,
2305
- Ve: [],
2306
- De: t,
2307
- Be: [],
2310
+ qe: createOwner(),
2311
+ Fe: 0,
2312
+ Ve: e,
2313
+ De: [],
2314
+ Be: t,
2308
2315
  Ge: [],
2309
- Ke: r,
2310
- ze: r || n?.keyed === false ? [] : undefined,
2311
- Ue: t.length > 1 ? [] : undefined,
2312
- Je: n?.fallback
2316
+ Ke: [],
2317
+ ze: r,
2318
+ Ue: r || n?.keyed === false ? [] : undefined,
2319
+ Je: t.length > 1 ? [] : undefined,
2320
+ Xe: n?.fallback
2313
2321
  })
2314
2322
  );
2315
2323
  }
2316
2324
  const oe = { pureWrite: true };
2317
2325
  function updateKeyedMap() {
2318
- const e = this.Fe() || [],
2326
+ const e = this.Ve() || [],
2319
2327
  t = e.length;
2320
2328
  e[M];
2321
- runWithOwner(this.Me, () => {
2329
+ runWithOwner(this.qe, () => {
2322
2330
  let n,
2323
2331
  r,
2324
- i = this.ze
2332
+ i = this.Ue
2325
2333
  ? () => {
2326
- this.ze[r] = signal(e[r], oe);
2327
- this.Ue && (this.Ue[r] = signal(r, oe));
2328
- return this.De(
2329
- read.bind(null, this.ze[r]),
2330
- this.Ue ? read.bind(null, this.Ue[r]) : undefined
2334
+ this.Ue[r] = signal(e[r], oe);
2335
+ this.Je && (this.Je[r] = signal(r, oe));
2336
+ return this.Be(
2337
+ read.bind(null, this.Ue[r]),
2338
+ this.Je ? read.bind(null, this.Je[r]) : undefined
2331
2339
  );
2332
2340
  }
2333
- : this.Ue
2341
+ : this.Je
2334
2342
  ? () => {
2335
2343
  const t = e[r];
2336
- this.Ue[r] = signal(r, oe);
2337
- return this.De(() => t, read.bind(null, this.Ue[r]));
2344
+ this.Je[r] = signal(r, oe);
2345
+ return this.Be(() => t, read.bind(null, this.Je[r]));
2338
2346
  }
2339
2347
  : () => {
2340
2348
  const t = e[r];
2341
- return this.De(() => t);
2349
+ return this.Be(() => t);
2342
2350
  };
2343
2351
  if (t === 0) {
2344
- if (this.qe !== 0) {
2345
- this.Me.dispose(false);
2352
+ if (this.Fe !== 0) {
2353
+ this.qe.dispose(false);
2354
+ this.Ke = [];
2355
+ this.De = [];
2346
2356
  this.Ge = [];
2347
- this.Ve = [];
2348
- this.Be = [];
2349
- this.qe = 0;
2350
- this.ze && (this.ze = []);
2357
+ this.Fe = 0;
2351
2358
  this.Ue && (this.Ue = []);
2359
+ this.Je && (this.Je = []);
2352
2360
  }
2353
- if (this.Je && !this.Be[0]) {
2354
- this.Be[0] = runWithOwner((this.Ge[0] = createOwner()), this.Je);
2361
+ if (this.Xe && !this.Ge[0]) {
2362
+ this.Ge[0] = runWithOwner((this.Ke[0] = createOwner()), this.Xe);
2355
2363
  }
2356
- } else if (this.qe === 0) {
2357
- if (this.Ge[0]) this.Ge[0].dispose();
2358
- this.Be = new Array(t);
2364
+ } else if (this.Fe === 0) {
2365
+ if (this.Ke[0]) this.Ke[0].dispose();
2366
+ this.Ge = new Array(t);
2359
2367
  for (r = 0; r < t; r++) {
2360
- this.Ve[r] = e[r];
2361
- this.Be[r] = runWithOwner((this.Ge[r] = createOwner()), i);
2368
+ this.De[r] = e[r];
2369
+ this.Ge[r] = runWithOwner((this.Ke[r] = createOwner()), i);
2362
2370
  }
2363
- this.qe = t;
2371
+ this.Fe = t;
2364
2372
  } else {
2365
2373
  let s,
2366
2374
  o,
@@ -2371,144 +2379,144 @@ function updateKeyedMap() {
2371
2379
  a,
2372
2380
  d = new Array(t),
2373
2381
  p = new Array(t),
2374
- h = this.ze ? new Array(t) : undefined,
2375
- y = this.Ue ? new Array(t) : undefined;
2382
+ h = this.Ue ? new Array(t) : undefined,
2383
+ y = this.Je ? new Array(t) : undefined;
2376
2384
  for (
2377
- s = 0, o = Math.min(this.qe, t);
2378
- s < o && (this.Ve[s] === e[s] || (this.ze && compare(this.Ke, this.Ve[s], e[s])));
2385
+ s = 0, o = Math.min(this.Fe, t);
2386
+ s < o && (this.De[s] === e[s] || (this.Ue && compare(this.ze, this.De[s], e[s])));
2379
2387
  s++
2380
2388
  ) {
2381
- if (this.ze) setSignal(this.ze[s], e[s]);
2389
+ if (this.Ue) setSignal(this.Ue[s], e[s]);
2382
2390
  }
2383
2391
  for (
2384
- o = this.qe - 1, u = t - 1;
2392
+ o = this.Fe - 1, u = t - 1;
2385
2393
  o >= s &&
2386
2394
  u >= s &&
2387
- (this.Ve[o] === e[u] || (this.ze && compare(this.Ke, this.Ve[o], e[u])));
2395
+ (this.De[o] === e[u] || (this.Ue && compare(this.ze, this.De[o], e[u])));
2388
2396
  o--, u--
2389
2397
  ) {
2390
- d[u] = this.Be[o];
2391
- p[u] = this.Ge[o];
2392
- h && (h[u] = this.ze[o]);
2393
- y && (y[u] = this.Ue[o]);
2398
+ d[u] = this.Ge[o];
2399
+ p[u] = this.Ke[o];
2400
+ h && (h[u] = this.Ue[o]);
2401
+ y && (y[u] = this.Je[o]);
2394
2402
  }
2395
2403
  c = new Map();
2396
2404
  a = new Array(u + 1);
2397
2405
  for (r = u; r >= s; r--) {
2398
2406
  f = e[r];
2399
- l = this.Ke ? this.Ke(f) : f;
2407
+ l = this.ze ? this.ze(f) : f;
2400
2408
  n = c.get(l);
2401
2409
  a[r] = n === undefined ? -1 : n;
2402
2410
  c.set(l, r);
2403
2411
  }
2404
2412
  for (n = s; n <= o; n++) {
2405
- f = this.Ve[n];
2406
- l = this.Ke ? this.Ke(f) : f;
2413
+ f = this.De[n];
2414
+ l = this.ze ? this.ze(f) : f;
2407
2415
  r = c.get(l);
2408
2416
  if (r !== undefined && r !== -1) {
2409
- d[r] = this.Be[n];
2410
- p[r] = this.Ge[n];
2411
- h && (h[r] = this.ze[n]);
2412
- y && (y[r] = this.Ue[n]);
2417
+ d[r] = this.Ge[n];
2418
+ p[r] = this.Ke[n];
2419
+ h && (h[r] = this.Ue[n]);
2420
+ y && (y[r] = this.Je[n]);
2413
2421
  r = a[r];
2414
2422
  c.set(l, r);
2415
- } else this.Ge[n].dispose();
2423
+ } else this.Ke[n].dispose();
2416
2424
  }
2417
2425
  for (r = s; r < t; r++) {
2418
2426
  if (r in d) {
2419
- this.Be[r] = d[r];
2420
- this.Ge[r] = p[r];
2427
+ this.Ge[r] = d[r];
2428
+ this.Ke[r] = p[r];
2421
2429
  if (h) {
2422
- this.ze[r] = h[r];
2423
- setSignal(this.ze[r], e[r]);
2430
+ this.Ue[r] = h[r];
2431
+ setSignal(this.Ue[r], e[r]);
2424
2432
  }
2425
2433
  if (y) {
2426
- this.Ue[r] = y[r];
2427
- setSignal(this.Ue[r], r);
2434
+ this.Je[r] = y[r];
2435
+ setSignal(this.Je[r], r);
2428
2436
  }
2429
2437
  } else {
2430
- this.Be[r] = runWithOwner((this.Ge[r] = createOwner()), i);
2438
+ this.Ge[r] = runWithOwner((this.Ke[r] = createOwner()), i);
2431
2439
  }
2432
2440
  }
2433
- this.Be = this.Be.slice(0, (this.qe = t));
2434
- this.Ve = e.slice(0);
2441
+ this.Ge = this.Ge.slice(0, (this.Fe = t));
2442
+ this.De = e.slice(0);
2435
2443
  }
2436
2444
  });
2437
- return this.Be;
2445
+ return this.Ge;
2438
2446
  }
2439
2447
  function repeat(e, t, n) {
2440
2448
  return updateRepeat.bind({
2441
- Me: createOwner(),
2442
- qe: 0,
2443
- Xe: 0,
2444
- Ye: e,
2445
- De: t,
2449
+ qe: createOwner(),
2450
+ Fe: 0,
2451
+ Ye: 0,
2452
+ Ze: e,
2453
+ Be: t,
2454
+ Ke: [],
2446
2455
  Ge: [],
2447
- Be: [],
2448
- Ze: n?.from,
2449
- Je: n?.fallback
2456
+ $e: n?.from,
2457
+ Xe: n?.fallback
2450
2458
  });
2451
2459
  }
2452
2460
  function updateRepeat() {
2453
- const e = this.Ye();
2454
- const t = this.Ze?.() || 0;
2455
- runWithOwner(this.Me, () => {
2461
+ const e = this.Ze();
2462
+ const t = this.$e?.() || 0;
2463
+ runWithOwner(this.qe, () => {
2456
2464
  if (e === 0) {
2457
- if (this.qe !== 0) {
2458
- this.Me.dispose(false);
2465
+ if (this.Fe !== 0) {
2466
+ this.qe.dispose(false);
2467
+ this.Ke = [];
2459
2468
  this.Ge = [];
2460
- this.Be = [];
2461
- this.qe = 0;
2469
+ this.Fe = 0;
2462
2470
  }
2463
- if (this.Je && !this.Be[0]) {
2464
- this.Be[0] = runWithOwner((this.Ge[0] = createOwner()), this.Je);
2471
+ if (this.Xe && !this.Ge[0]) {
2472
+ this.Ge[0] = runWithOwner((this.Ke[0] = createOwner()), this.Xe);
2465
2473
  }
2466
2474
  return;
2467
2475
  }
2468
2476
  const n = t + e;
2469
- const r = this.Xe + this.qe;
2470
- if (this.qe === 0 && this.Ge[0]) this.Ge[0].dispose();
2471
- for (let e = n; e < r; e++) this.Ge[e - this.Xe].dispose();
2472
- if (this.Xe < t) {
2473
- let e = this.Xe;
2474
- while (e < t && e < this.qe) this.Ge[e++].dispose();
2475
- this.Ge.splice(0, t - this.Xe);
2476
- this.Be.splice(0, t - this.Xe);
2477
- } else if (this.Xe > t) {
2478
- let n = r - this.Xe - 1;
2479
- let i = this.Xe - t;
2480
- this.Ge.length = this.Be.length = e;
2477
+ const r = this.Ye + this.Fe;
2478
+ if (this.Fe === 0 && this.Ke[0]) this.Ke[0].dispose();
2479
+ for (let e = n; e < r; e++) this.Ke[e - this.Ye].dispose();
2480
+ if (this.Ye < t) {
2481
+ let e = this.Ye;
2482
+ while (e < t && e < this.Fe) this.Ke[e++].dispose();
2483
+ this.Ke.splice(0, t - this.Ye);
2484
+ this.Ge.splice(0, t - this.Ye);
2485
+ } else if (this.Ye > t) {
2486
+ let n = r - this.Ye - 1;
2487
+ let i = this.Ye - t;
2488
+ this.Ke.length = this.Ge.length = e;
2481
2489
  while (n >= i) {
2490
+ this.Ke[n] = this.Ke[n - i];
2482
2491
  this.Ge[n] = this.Ge[n - i];
2483
- this.Be[n] = this.Be[n - i];
2484
2492
  n--;
2485
2493
  }
2486
2494
  for (let e = 0; e < i; e++) {
2487
- this.Be[e] = runWithOwner((this.Ge[e] = createOwner()), () => this.De(e + t));
2495
+ this.Ge[e] = runWithOwner((this.Ke[e] = createOwner()), () => this.Be(e + t));
2488
2496
  }
2489
2497
  }
2490
2498
  for (let e = r; e < n; e++) {
2491
- this.Be[e - t] = runWithOwner((this.Ge[e - t] = createOwner()), () => this.De(e));
2499
+ this.Ge[e - t] = runWithOwner((this.Ke[e - t] = createOwner()), () => this.Be(e));
2492
2500
  }
2493
- this.Be = this.Be.slice(0, e);
2494
- this.Xe = t;
2495
- this.qe = e;
2501
+ this.Ge = this.Ge.slice(0, e);
2502
+ this.Ye = t;
2503
+ this.Fe = e;
2496
2504
  });
2497
- return this.Be;
2505
+ return this.Ge;
2498
2506
  }
2499
2507
  function compare(e, t, n) {
2500
2508
  return e ? e(t) === e(n) : true;
2501
2509
  }
2502
2510
  function boundaryComputed(e, t) {
2503
2511
  const n = computed(e, undefined, { lazy: true });
2504
- n.be = (e, t) => {
2512
+ n._e = (e, t) => {
2505
2513
  const r = e !== undefined ? e : n.ce;
2506
2514
  const i = t !== undefined ? t : n.Y;
2507
- n.ce &= ~n.$e;
2508
- n.oe.notify(n, n.$e, r, i);
2515
+ n.ce &= ~n.et;
2516
+ n.oe.notify(n, n.et, r, i);
2509
2517
  };
2510
- n.$e = t;
2511
- n.Qe = true;
2518
+ n.et = t;
2519
+ n.Re = true;
2512
2520
  recompute(n, true);
2513
2521
  return n;
2514
2522
  }
@@ -2522,36 +2530,36 @@ function createBoundChildren(e, t, n, r) {
2522
2530
  });
2523
2531
  }
2524
2532
  class CollectionQueue extends Queue {
2525
- et;
2526
- tt = new Set();
2527
- nt = signal(false, { pureWrite: true });
2528
- rt = false;
2533
+ tt;
2534
+ nt = new Set();
2535
+ rt = signal(false, { pureWrite: true });
2536
+ it = false;
2529
2537
  constructor(e) {
2530
2538
  super();
2531
- this.et = e;
2539
+ this.tt = e;
2532
2540
  }
2533
2541
  run(e) {
2534
- if (!e || read(this.nt)) return;
2542
+ if (!e || read(this.rt)) return;
2535
2543
  return super.run(e);
2536
2544
  }
2537
2545
  notify(e, t, n, r) {
2538
- if (!(t & this.et) || (this.et & l && this.rt)) return super.notify(e, t, n, r);
2539
- if (n & this.et) {
2546
+ if (!(t & this.tt) || (this.tt & l && this.it)) return super.notify(e, t, n, r);
2547
+ if (n & this.tt) {
2540
2548
  const t = r?.source || e.Y?.source;
2541
2549
  if (t) {
2542
- const e = this.tt.size === 0;
2543
- this.tt.add(t);
2544
- if (e) setSignal(this.nt, true);
2550
+ const e = this.nt.size === 0;
2551
+ this.nt.add(t);
2552
+ if (e) setSignal(this.rt, true);
2545
2553
  }
2546
2554
  }
2547
- t &= ~this.et;
2555
+ t &= ~this.tt;
2548
2556
  return t ? super.notify(e, t, n, r) : true;
2549
2557
  }
2550
2558
  checkSources() {
2551
- for (const e of this.tt) {
2552
- if (!(e.ce & this.et)) this.tt.delete(e);
2559
+ for (const e of this.nt) {
2560
+ if (!(e.ce & this.tt)) this.nt.delete(e);
2553
2561
  }
2554
- if (!this.tt.size) setSignal(this.nt, false);
2562
+ if (!this.nt.size) setSignal(this.rt, false);
2555
2563
  }
2556
2564
  }
2557
2565
  function createCollectionBoundary(e, t, n) {
@@ -2559,10 +2567,10 @@ function createCollectionBoundary(e, t, n) {
2559
2567
  const i = new CollectionQueue(e);
2560
2568
  const s = createBoundChildren(r, t, i, e);
2561
2569
  const o = computed(() => {
2562
- if (!read(i.nt)) {
2570
+ if (!read(i.rt)) {
2563
2571
  const e = read(s);
2564
- if (!untrack(() => read(i.nt))) {
2565
- i.rt = true;
2572
+ if (!untrack(() => read(i.rt))) {
2573
+ i.it = true;
2566
2574
  return e;
2567
2575
  }
2568
2576
  }
@@ -2575,10 +2583,10 @@ function createLoadBoundary(e, t) {
2575
2583
  }
2576
2584
  function createErrorBoundary(e, t) {
2577
2585
  return createCollectionBoundary(c, e, e => {
2578
- let n = e.tt.values().next().value;
2586
+ let n = e.nt.values().next().value;
2579
2587
  const r = n.Y?.cause ?? n.Y;
2580
2588
  return t(r, () => {
2581
- for (const t of e.tt) recompute(t);
2589
+ for (const t of e.nt) recompute(t);
2582
2590
  schedule();
2583
2591
  });
2584
2592
  });