@solidjs/signals 0.3.1 → 0.3.2

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
@@ -45,66 +45,62 @@ function schedule() {
45
45
  if (scheduled)
46
46
  return;
47
47
  scheduled = true;
48
- if (!globalQueue.K)
48
+ if (!globalQueue.J)
49
49
  queueMicrotask(flushSync);
50
50
  }
51
+ var pureQueue = [];
51
52
  var Queue = class {
52
- n = null;
53
- K = false;
54
- s = [[], [], []];
55
- F = [];
53
+ o = null;
54
+ J = false;
55
+ K = [[], []];
56
+ E = [];
56
57
  created = clock;
57
58
  enqueue(type, node) {
58
- this.s[0].push(node);
59
+ pureQueue.push(node);
59
60
  if (type)
60
- this.s[type].push(node);
61
+ this.K[type - 1].push(node);
61
62
  schedule();
62
63
  }
63
64
  run(type) {
64
- if (this.s[type].length) {
65
- if (type === EFFECT_PURE) {
66
- runPureQueue(this.s[type]);
67
- this.s[type] = [];
68
- } else {
69
- const effects = this.s[type];
70
- this.s[type] = [];
71
- runEffectQueue(effects);
72
- }
65
+ if (type === EFFECT_PURE) {
66
+ pureQueue.length && runPureQueue(pureQueue);
67
+ pureQueue = [];
68
+ return;
69
+ } else if (this.K[type - 1].length) {
70
+ const effects = this.K[type - 1];
71
+ this.K[type - 1] = [];
72
+ runEffectQueue(effects);
73
73
  }
74
- let rerun = false;
75
- for (let i = 0; i < this.F.length; i++) {
76
- rerun = this.F[i].run(type) || rerun;
74
+ for (let i = 0; i < this.E.length; i++) {
75
+ this.E[i].run(type);
77
76
  }
78
- if (type === EFFECT_PURE)
79
- return rerun || !!this.s[type].length;
80
77
  }
81
78
  flush() {
82
- if (this.K)
79
+ if (this.J)
83
80
  return;
84
- this.K = true;
81
+ this.J = true;
85
82
  try {
86
- while (this.run(EFFECT_PURE)) {
87
- }
83
+ this.run(EFFECT_PURE);
88
84
  incrementClock();
89
85
  scheduled = false;
90
86
  this.run(EFFECT_RENDER);
91
87
  this.run(EFFECT_USER);
92
88
  } finally {
93
- this.K = false;
89
+ this.J = false;
94
90
  }
95
91
  }
96
92
  addChild(child) {
97
- this.F.push(child);
98
- child.n = this;
93
+ this.E.push(child);
94
+ child.o = this;
99
95
  }
100
96
  removeChild(child) {
101
- const index = this.F.indexOf(child);
97
+ const index = this.E.indexOf(child);
102
98
  if (index >= 0)
103
- this.F.splice(index, 1);
99
+ this.E.splice(index, 1);
104
100
  }
105
101
  notify(...args) {
106
- if (this.n)
107
- return this.n.notify(...args);
102
+ if (this.o)
103
+ return this.o.notify(...args);
108
104
  return false;
109
105
  }
110
106
  };
@@ -116,7 +112,7 @@ function flushSync() {
116
112
  }
117
113
  function runTop(node) {
118
114
  const ancestors = [];
119
- for (let current = node; current !== null; current = current.n) {
115
+ for (let current = node; current !== null; current = current.o) {
120
116
  if (current.a !== STATE_CLEAN) {
121
117
  ancestors.push(current);
122
118
  }
@@ -181,32 +177,32 @@ var Owner = class {
181
177
  // We flatten the owner tree into a linked list so that we don't need a pointer to .firstChild
182
178
  // However, the children are actually added in reverse creation order
183
179
  // See comment at the top of the file for an example of the _nextSibling traversal
184
- n = null;
180
+ o = null;
185
181
  m = null;
186
- t = null;
182
+ s = null;
187
183
  a = STATE_CLEAN;
188
184
  l = null;
189
- o = defaultContext;
185
+ p = defaultContext;
190
186
  h = globalQueue;
191
187
  W = 0;
192
188
  id = null;
193
189
  constructor(id = null, skipAppend = false) {
194
190
  this.id = id;
195
191
  if (currentOwner) {
196
- if (!id && currentOwner.id)
192
+ if (id == null && currentOwner.id != null)
197
193
  this.id = currentOwner.getNextChildId();
198
194
  !skipAppend && currentOwner.append(this);
199
195
  }
200
196
  }
201
197
  append(child) {
202
- child.n = this;
203
- child.t = this;
198
+ child.o = this;
199
+ child.s = this;
204
200
  if (this.m)
205
- this.m.t = child;
201
+ this.m.s = child;
206
202
  child.m = this.m;
207
203
  this.m = child;
208
- if (child.o !== this.o) {
209
- child.o = { ...this.o, ...child.o };
204
+ if (child.p !== this.p) {
205
+ child.p = { ...this.p, ...child.p };
210
206
  }
211
207
  if (this.h)
212
208
  child.h = this.h;
@@ -214,8 +210,8 @@ var Owner = class {
214
210
  dispose(self = true) {
215
211
  if (this.a === STATE_DISPOSED)
216
212
  return;
217
- let head = self ? this.t || this.n : this, current = this.m, next = null;
218
- while (current && current.n === this) {
213
+ let head = self ? this.s || this.o : this, current = this.m, next = null;
214
+ while (current && current.o === this) {
219
215
  current.dispose(true);
220
216
  current.y();
221
217
  next = current.m;
@@ -226,16 +222,16 @@ var Owner = class {
226
222
  if (self)
227
223
  this.y();
228
224
  if (current)
229
- current.t = !self ? this : this.t;
225
+ current.s = !self ? this : this.s;
230
226
  if (head)
231
227
  head.m = current;
232
228
  }
233
229
  y() {
234
- if (this.t)
235
- this.t.m = null;
236
- this.n = null;
237
- this.t = null;
238
- this.o = defaultContext;
230
+ if (this.s)
231
+ this.s.m = null;
232
+ this.o = null;
233
+ this.s = null;
234
+ this.p = defaultContext;
239
235
  this.a = STATE_DISPOSED;
240
236
  this.emptyDisposal();
241
237
  }
@@ -253,7 +249,7 @@ var Owner = class {
253
249
  this.l = null;
254
250
  }
255
251
  getNextChildId() {
256
- if (this.id)
252
+ if (this.id != null)
257
253
  return formatId(this.id, this.W++);
258
254
  throw new Error("Cannot get child id from owner without an id");
259
255
  }
@@ -265,7 +261,7 @@ function getContext(context, owner = currentOwner) {
265
261
  if (!owner) {
266
262
  throw new NoOwnerError();
267
263
  }
268
- const value = hasContext(context, owner) ? owner.o[context.id] : context.defaultValue;
264
+ const value = hasContext(context, owner) ? owner.p[context.id] : context.defaultValue;
269
265
  if (isUndefined(value)) {
270
266
  throw new ContextNotFoundError();
271
267
  }
@@ -275,13 +271,13 @@ function setContext(context, value, owner = currentOwner) {
275
271
  if (!owner) {
276
272
  throw new NoOwnerError();
277
273
  }
278
- owner.o = {
279
- ...owner.o,
274
+ owner.p = {
275
+ ...owner.p,
280
276
  [context.id]: isUndefined(value) ? context.defaultValue : value
281
277
  };
282
278
  }
283
279
  function hasContext(context, owner = currentOwner) {
284
- return !isUndefined(owner == null ? void 0 : owner.o[context.id]);
280
+ return !isUndefined(owner == null ? void 0 : owner.p[context.id]);
285
281
  }
286
282
  function onCleanup(fn) {
287
283
  if (!currentOwner)
@@ -323,7 +319,7 @@ var Computation = class extends Owner {
323
319
  c = null;
324
320
  e = null;
325
321
  g;
326
- G;
322
+ F;
327
323
  z;
328
324
  // Used in __DEV__ mode, hopefully removed in production
329
325
  ba;
@@ -336,7 +332,7 @@ var Computation = class extends Owner {
336
332
  /** Which flags raised by sources are handled, vs. being passed through. */
337
333
  T = DEFAULT_FLAGS;
338
334
  A = -1;
339
- B = false;
335
+ w = false;
340
336
  constructor(initialValue, compute2, options) {
341
337
  super(null, compute2 === null);
342
338
  this.z = compute2;
@@ -358,7 +354,7 @@ var Computation = class extends Owner {
358
354
  track(this);
359
355
  newFlags |= this.f & ~currentMask;
360
356
  if (this.f & ERROR_BIT) {
361
- throw this.G;
357
+ throw this.F;
362
358
  } else {
363
359
  return this.g;
364
360
  }
@@ -398,7 +394,7 @@ var Computation = class extends Owner {
398
394
  const valueChanged = newValue !== UNCHANGED && (!!(this.f & UNINITIALIZED_BIT) || this.f & LOADING_BIT & ~flags || this.S === false || !this.S(this.g, newValue));
399
395
  if (valueChanged) {
400
396
  this.g = newValue;
401
- this.G = void 0;
397
+ this.F = void 0;
402
398
  }
403
399
  const changedFlagsMask = this.f ^ flags, changedFlags = changedFlagsMask & flags;
404
400
  this.f = flags;
@@ -418,9 +414,9 @@ var Computation = class extends Owner {
418
414
  * Set the current node's state, and recursively mark all of this node's observers as STATE_CHECK
419
415
  */
420
416
  r(state, skipQueue) {
421
- if (this.a >= state && !this.B)
417
+ if (this.a >= state && !this.w)
422
418
  return;
423
- this.B = !!skipQueue;
419
+ this.w = !!skipQueue;
424
420
  this.a = state;
425
421
  if (this.e) {
426
422
  for (let i = 0; i < this.e.length; i++) {
@@ -457,7 +453,7 @@ var Computation = class extends Owner {
457
453
  }
458
454
  }
459
455
  L(error) {
460
- this.G = error;
456
+ this.F = error;
461
457
  this.write(UNCHANGED, this.f & ~LOADING_BIT | ERROR_BIT | UNINITIALIZED_BIT);
462
458
  }
463
459
  /**
@@ -759,27 +755,27 @@ function flattenArray(children, results = [], options) {
759
755
  var Effect = class extends Computation {
760
756
  M;
761
757
  N;
762
- C;
758
+ B;
763
759
  U = false;
764
760
  O;
765
- u;
761
+ t;
766
762
  constructor(initialValue, compute2, effect, error, options) {
767
763
  super(initialValue, compute2, options);
768
764
  this.M = effect;
769
765
  this.N = error;
770
766
  this.O = initialValue;
771
- this.u = (options == null ? void 0 : options.render) ? EFFECT_RENDER : EFFECT_USER;
772
- if (this.u === EFFECT_RENDER) {
767
+ this.t = (options == null ? void 0 : options.render) ? EFFECT_RENDER : EFFECT_USER;
768
+ if (this.t === EFFECT_RENDER) {
773
769
  this.z = (p) => getClock() > this.h.created && !(this.f & ERROR_BIT) ? latest(() => compute2(p)) : compute2(p);
774
770
  }
775
771
  this.x();
776
- !(options == null ? void 0 : options.defer) && (this.u === EFFECT_USER ? this.h.enqueue(this.u, this) : this.V());
772
+ !(options == null ? void 0 : options.defer) && (this.t === EFFECT_USER ? this.h.enqueue(this.t, this) : this.V());
777
773
  }
778
774
  write(value, flags = 0) {
779
775
  if (this.a == STATE_DIRTY) {
780
776
  this.f;
781
777
  this.f = flags;
782
- if (this.u === EFFECT_RENDER) {
778
+ if (this.t === EFFECT_RENDER) {
783
779
  this.h.notify(this, LOADING_BIT | ERROR_BIT, flags);
784
780
  }
785
781
  }
@@ -793,18 +789,18 @@ var Effect = class extends Computation {
793
789
  if (this.a >= state || skipQueue)
794
790
  return;
795
791
  if (this.a === STATE_CLEAN)
796
- this.h.enqueue(this.u, this);
792
+ this.h.enqueue(this.t, this);
797
793
  this.a = state;
798
794
  }
799
795
  L(error) {
800
796
  var _a;
801
- this.G = error;
802
- (_a = this.C) == null ? void 0 : _a.call(this);
797
+ this.F = error;
798
+ (_a = this.B) == null ? void 0 : _a.call(this);
803
799
  this.h.notify(this, LOADING_BIT, 0);
804
800
  this.f = ERROR_BIT;
805
- if (this.u === EFFECT_USER) {
801
+ if (this.t === EFFECT_USER) {
806
802
  try {
807
- return this.N ? this.C = this.N(error) : console.error(new EffectError(this.M, error));
803
+ return this.N ? this.B = this.N(error) : console.error(new EffectError(this.M, error));
808
804
  } catch (e) {
809
805
  error = e;
810
806
  }
@@ -819,16 +815,16 @@ var Effect = class extends Computation {
819
815
  this.M = void 0;
820
816
  this.O = void 0;
821
817
  this.N = void 0;
822
- (_a = this.C) == null ? void 0 : _a.call(this);
823
- this.C = void 0;
818
+ (_a = this.B) == null ? void 0 : _a.call(this);
819
+ this.B = void 0;
824
820
  super.y();
825
821
  }
826
822
  V() {
827
823
  var _a;
828
824
  if (this.U && this.a !== STATE_DISPOSED) {
829
- (_a = this.C) == null ? void 0 : _a.call(this);
825
+ (_a = this.B) == null ? void 0 : _a.call(this);
830
826
  try {
831
- this.C = this.M(this.g, this.O);
827
+ this.B = this.M(this.g, this.O);
832
828
  } catch (e) {
833
829
  if (!this.h.notify(this, ERROR_BIT, ERROR_BIT))
834
830
  throw e;
@@ -845,9 +841,9 @@ var EagerComputation = class extends Computation {
845
841
  !(options == null ? void 0 : options.defer) && this.x();
846
842
  }
847
843
  r(state, skipQueue) {
848
- if (this.a >= state && !this.B)
844
+ if (this.a >= state && !this.w)
849
845
  return;
850
- if (this.a === STATE_CLEAN && !skipQueue)
846
+ if (!skipQueue && (this.a === STATE_CLEAN || this.a === STATE_CHECK && this.w))
851
847
  this.h.enqueue(EFFECT_PURE, this);
852
848
  super.r(state, skipQueue);
853
849
  }
@@ -857,28 +853,28 @@ var ProjectionComputation = class extends Computation {
857
853
  super(void 0, compute2);
858
854
  }
859
855
  r(state, skipQueue) {
860
- if (this.a >= state && !this.B)
856
+ if (this.a >= state && !this.w)
861
857
  return;
862
- if (!skipQueue && (this.a === STATE_CLEAN || this.a === STATE_CHECK && this.B))
858
+ if (!skipQueue && (this.a === STATE_CLEAN || this.a === STATE_CHECK && this.w))
863
859
  this.h.enqueue(EFFECT_PURE, this);
864
860
  super.r(state, true);
865
- this.B = !!skipQueue;
861
+ this.w = !!skipQueue;
866
862
  }
867
863
  };
868
864
 
869
865
  // src/core/boundaries.ts
870
866
  var BoundaryComputation = class extends EagerComputation {
871
- H;
867
+ G;
872
868
  constructor(compute2, propagationMask) {
873
869
  super(void 0, compute2, { defer: true });
874
- this.H = propagationMask;
870
+ this.G = propagationMask;
875
871
  }
876
872
  write(value, flags) {
877
- super.write(value, flags & ~this.H);
878
- if (this.H & LOADING_BIT && !(this.f & UNINITIALIZED_BIT)) {
873
+ super.write(value, flags & ~this.G);
874
+ if (this.G & LOADING_BIT && !(this.f & UNINITIALIZED_BIT)) {
879
875
  flags &= ~LOADING_BIT;
880
876
  }
881
- this.h.notify(this, this.H, flags);
877
+ this.h.notify(this, this.G, flags);
882
878
  return this.g;
883
879
  }
884
880
  };
@@ -896,20 +892,20 @@ function createBoundChildren(owner, fn, queue, mask) {
896
892
  );
897
893
  }
898
894
  var ConditionalQueue = class extends Queue {
899
- p;
895
+ n;
900
896
  P = /* @__PURE__ */ new Set();
901
897
  Q = /* @__PURE__ */ new Set();
902
898
  constructor(disabled) {
903
899
  super();
904
- this.p = disabled;
900
+ this.n = disabled;
905
901
  }
906
902
  run(type) {
907
- if (type && this.p.read())
903
+ if (!type || this.n.read())
908
904
  return;
909
905
  return super.run(type);
910
906
  }
911
907
  notify(node, type, flags) {
912
- if (this.p.read()) {
908
+ if (this.n.read()) {
913
909
  if (type === LOADING_BIT) {
914
910
  flags & LOADING_BIT ? this.Q.add(node) : this.Q.delete(node);
915
911
  }
@@ -924,22 +920,27 @@ var ConditionalQueue = class extends Queue {
924
920
  var CollectionQueue = class extends Queue {
925
921
  R;
926
922
  b = /* @__PURE__ */ new Set();
927
- p = new Computation(false, null);
923
+ n = new Computation(false, null);
928
924
  constructor(type) {
929
925
  super();
930
926
  this.R = type;
931
927
  }
928
+ run(type) {
929
+ if (!type || this.n.read())
930
+ return;
931
+ return super.run(type);
932
+ }
932
933
  notify(node, type, flags) {
933
934
  if (!(type & this.R))
934
935
  return super.notify(node, type, flags);
935
936
  if (flags & this.R) {
936
937
  this.b.add(node);
937
938
  if (this.b.size === 1)
938
- this.p.write(true);
939
+ this.n.write(true);
939
940
  } else {
940
941
  this.b.delete(node);
941
942
  if (this.b.size === 0)
942
- this.p.write(false);
943
+ this.n.write(false);
943
944
  }
944
945
  type &= ~this.R;
945
946
  return type ? super.notify(node, type, flags) : true;
@@ -950,8 +951,8 @@ function createBoundary(fn, condition) {
950
951
  const queue = new ConditionalQueue(new Computation(void 0, () => condition() === "hidden" /* HIDDEN */));
951
952
  const tree = createBoundChildren(owner, fn, queue, 0);
952
953
  new EagerComputation(void 0, () => {
953
- const disabled = queue.p.read();
954
- tree.H = disabled ? ERROR_BIT | LOADING_BIT : 0;
954
+ const disabled = queue.n.read();
955
+ tree.G = disabled ? ERROR_BIT | LOADING_BIT : 0;
955
956
  if (!disabled) {
956
957
  queue.Q.forEach((node) => queue.notify(node, LOADING_BIT, LOADING_BIT));
957
958
  queue.P.forEach((node) => queue.notify(node, ERROR_BIT, ERROR_BIT));
@@ -959,16 +960,16 @@ function createBoundary(fn, condition) {
959
960
  queue.P.clear();
960
961
  }
961
962
  });
962
- return () => queue.p.read() ? void 0 : tree.read();
963
+ return () => queue.n.read() ? void 0 : tree.read();
963
964
  }
964
965
  function createCollectionBoundary(type, fn, fallback) {
965
966
  const owner = new Owner();
966
967
  const queue = new CollectionQueue(type);
967
968
  const tree = createBoundChildren(owner, fn, queue, type);
968
969
  const decision = new Computation(void 0, () => {
969
- if (!queue.p.read()) {
970
+ if (!queue.n.read()) {
970
971
  const resolved = tree.read();
971
- if (!queue.p.read())
972
+ if (!queue.n.read())
972
973
  return resolved;
973
974
  }
974
975
  return fallback(queue);
@@ -982,12 +983,12 @@ function createErrorBoundary(fn, fallback) {
982
983
  return createCollectionBoundary(
983
984
  ERROR_BIT,
984
985
  fn,
985
- (queue) => fallback(queue.b.values().next().value.G, () => {
986
+ (queue) => fallback(queue.b.values().next().value.F, () => {
986
987
  var _a;
987
988
  incrementClock();
988
989
  for (let node of queue.b) {
989
990
  node.a = STATE_DIRTY;
990
- (_a = node.h) == null ? void 0 : _a.enqueue(node.u, node);
991
+ (_a = node.h) == null ? void 0 : _a.enqueue(node.t, node);
991
992
  }
992
993
  })
993
994
  );
@@ -1024,7 +1025,7 @@ function createMemo(compute2, value, options) {
1024
1025
  return resolvedValue;
1025
1026
  }
1026
1027
  resolvedValue = node.wait();
1027
- if (!((_a = node.c) == null ? void 0 : _a.length) && ((_b = node.m) == null ? void 0 : _b.n) !== node) {
1028
+ if (!((_a = node.c) == null ? void 0 : _a.length) && ((_b = node.m) == null ? void 0 : _b.o) !== node) {
1028
1029
  node.dispose();
1029
1030
  node = void 0;
1030
1031
  }
@@ -1662,52 +1663,52 @@ function omit(props, ...keys) {
1662
1663
  function mapArray(list, map, options) {
1663
1664
  const keyFn = typeof (options == null ? void 0 : options.keyed) === "function" ? options.keyed : void 0;
1664
1665
  return updateKeyedMap.bind({
1665
- I: new Owner(),
1666
+ H: new Owner(),
1666
1667
  i: 0,
1667
1668
  _: list,
1668
- w: [],
1669
- D: map,
1669
+ u: [],
1670
+ C: map,
1670
1671
  d: [],
1671
1672
  b: [],
1672
- E: keyFn,
1673
+ D: keyFn,
1673
1674
  j: keyFn || (options == null ? void 0 : options.keyed) === false ? [] : void 0,
1674
1675
  k: map.length > 1 ? [] : void 0,
1675
- J: options == null ? void 0 : options.fallback
1676
+ I: options == null ? void 0 : options.fallback
1676
1677
  });
1677
1678
  }
1678
1679
  function updateKeyedMap() {
1679
1680
  const newItems = this._() || [], newLen = newItems.length;
1680
1681
  newItems[$TRACK];
1681
- runWithOwner(this.I, () => {
1682
+ runWithOwner(this.H, () => {
1682
1683
  let i, j, mapper = this.j ? () => {
1683
1684
  this.j[j] = new Computation(newItems[j], null);
1684
1685
  this.k && (this.k[j] = new Computation(j, null));
1685
- return this.D(
1686
+ return this.C(
1686
1687
  Computation.prototype.read.bind(this.j[j]),
1687
1688
  this.k ? Computation.prototype.read.bind(this.k[j]) : void 0
1688
1689
  );
1689
1690
  } : this.k ? () => {
1690
1691
  const item = newItems[j];
1691
1692
  this.k[j] = new Computation(j, null);
1692
- return this.D(() => item, Computation.prototype.read.bind(this.k[j]));
1693
+ return this.C(() => item, Computation.prototype.read.bind(this.k[j]));
1693
1694
  } : () => {
1694
1695
  const item = newItems[j];
1695
- return this.D(() => item);
1696
+ return this.C(() => item);
1696
1697
  };
1697
1698
  if (newLen === 0) {
1698
1699
  if (this.i !== 0) {
1699
- this.I.dispose(false);
1700
+ this.H.dispose(false);
1700
1701
  this.b = [];
1701
- this.w = [];
1702
+ this.u = [];
1702
1703
  this.d = [];
1703
1704
  this.i = 0;
1704
1705
  this.j && (this.j = []);
1705
1706
  this.k && (this.k = []);
1706
1707
  }
1707
- if (this.J && !this.d[0]) {
1708
+ if (this.I && !this.d[0]) {
1708
1709
  this.d[0] = compute(
1709
1710
  this.b[0] = new Owner(),
1710
- this.J,
1711
+ this.I,
1711
1712
  null
1712
1713
  );
1713
1714
  }
@@ -1716,17 +1717,17 @@ function updateKeyedMap() {
1716
1717
  this.b[0].dispose();
1717
1718
  this.d = new Array(newLen);
1718
1719
  for (j = 0; j < newLen; j++) {
1719
- this.w[j] = newItems[j];
1720
+ this.u[j] = newItems[j];
1720
1721
  this.d[j] = compute(this.b[j] = new Owner(), mapper, null);
1721
1722
  }
1722
1723
  this.i = newLen;
1723
1724
  } else {
1724
1725
  let start, end, newEnd, item, key, newIndices, newIndicesNext, temp = new Array(newLen), tempNodes = new Array(newLen), tempRows = this.j ? new Array(newLen) : void 0, tempIndexes = this.k ? new Array(newLen) : void 0;
1725
- for (start = 0, end = Math.min(this.i, newLen); start < end && (this.w[start] === newItems[start] || this.j && compare(this.E, this.w[start], newItems[start])); start++) {
1726
+ for (start = 0, end = Math.min(this.i, newLen); start < end && (this.u[start] === newItems[start] || this.j && compare(this.D, this.u[start], newItems[start])); start++) {
1726
1727
  if (this.j)
1727
1728
  this.j[start].write(newItems[start]);
1728
1729
  }
1729
- for (end = this.i - 1, newEnd = newLen - 1; end >= start && newEnd >= start && (this.w[end] === newItems[newEnd] || this.j && compare(this.E, this.w[end], newItems[newEnd])); end--, newEnd--) {
1730
+ for (end = this.i - 1, newEnd = newLen - 1; end >= start && newEnd >= start && (this.u[end] === newItems[newEnd] || this.j && compare(this.D, this.u[end], newItems[newEnd])); end--, newEnd--) {
1730
1731
  temp[newEnd] = this.d[end];
1731
1732
  tempNodes[newEnd] = this.b[end];
1732
1733
  tempRows && (tempRows[newEnd] = this.j[end]);
@@ -1736,14 +1737,14 @@ function updateKeyedMap() {
1736
1737
  newIndicesNext = new Array(newEnd + 1);
1737
1738
  for (j = newEnd; j >= start; j--) {
1738
1739
  item = newItems[j];
1739
- key = this.E ? this.E(item) : item;
1740
+ key = this.D ? this.D(item) : item;
1740
1741
  i = newIndices.get(key);
1741
1742
  newIndicesNext[j] = i === void 0 ? -1 : i;
1742
1743
  newIndices.set(key, j);
1743
1744
  }
1744
1745
  for (i = start; i <= end; i++) {
1745
- item = this.w[i];
1746
- key = this.E ? this.E(item) : item;
1746
+ item = this.u[i];
1747
+ key = this.D ? this.D(item) : item;
1747
1748
  j = newIndices.get(key);
1748
1749
  if (j !== void 0 && j !== -1) {
1749
1750
  temp[j] = this.d[i];
@@ -1772,40 +1773,40 @@ function updateKeyedMap() {
1772
1773
  }
1773
1774
  }
1774
1775
  this.d = this.d.slice(0, this.i = newLen);
1775
- this.w = newItems.slice(0);
1776
+ this.u = newItems.slice(0);
1776
1777
  }
1777
1778
  });
1778
1779
  return this.d;
1779
1780
  }
1780
1781
  function repeat(count, map, options) {
1781
1782
  return updateRepeat.bind({
1782
- I: new Owner(),
1783
+ H: new Owner(),
1783
1784
  i: 0,
1784
1785
  q: 0,
1785
1786
  $: count,
1786
- D: map,
1787
+ C: map,
1787
1788
  b: [],
1788
1789
  d: [],
1789
1790
  aa: options == null ? void 0 : options.from,
1790
- J: options == null ? void 0 : options.fallback
1791
+ I: options == null ? void 0 : options.fallback
1791
1792
  });
1792
1793
  }
1793
1794
  function updateRepeat() {
1794
1795
  var _a;
1795
1796
  const newLen = this.$();
1796
1797
  const from = ((_a = this.aa) == null ? void 0 : _a.call(this)) || 0;
1797
- runWithOwner(this.I, () => {
1798
+ runWithOwner(this.H, () => {
1798
1799
  if (newLen === 0) {
1799
1800
  if (this.i !== 0) {
1800
- this.I.dispose(false);
1801
+ this.H.dispose(false);
1801
1802
  this.b = [];
1802
1803
  this.d = [];
1803
1804
  this.i = 0;
1804
1805
  }
1805
- if (this.J && !this.d[0]) {
1806
+ if (this.I && !this.d[0]) {
1806
1807
  this.d[0] = compute(
1807
1808
  this.b[0] = new Owner(),
1808
- this.J,
1809
+ this.I,
1809
1810
  null
1810
1811
  );
1811
1812
  }
@@ -1835,7 +1836,7 @@ function updateRepeat() {
1835
1836
  for (let i2 = 0; i2 < difference; i2++) {
1836
1837
  this.d[i2] = compute(
1837
1838
  this.b[i2] = new Owner(),
1838
- () => this.D(i2 + from),
1839
+ () => this.C(i2 + from),
1839
1840
  null
1840
1841
  );
1841
1842
  }
@@ -1843,7 +1844,7 @@ function updateRepeat() {
1843
1844
  for (let i = prevTo; i < to; i++) {
1844
1845
  this.d[i - from] = compute(
1845
1846
  this.b[i - from] = new Owner(),
1846
- () => this.D(i),
1847
+ () => this.C(i),
1847
1848
  null
1848
1849
  );
1849
1850
  }