@solidjs/signals 0.8.1 → 0.8.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
@@ -27,21 +27,21 @@ var SUPPORTS_PROXY = typeof Proxy === "function";
27
27
  // src/core/heap.ts
28
28
  function actualInsertIntoHeap(n, heap) {
29
29
  var _a, _b, _c;
30
- const parentHeight = (((_a = n.q) == null ? void 0 : _a._) ? (_b = n.q.$) == null ? void 0 : _b.c : (_c = n.q) == null ? void 0 : _c.c) ?? -1;
30
+ const parentHeight = (((_a = n.w) == null ? void 0 : _a._) ? (_b = n.w.$) == null ? void 0 : _b.c : (_c = n.w) == null ? void 0 : _c.c) ?? -1;
31
31
  if (parentHeight >= n.c)
32
32
  n.c = parentHeight + 1;
33
33
  const height = n.c;
34
- const heapAtHeight = heap.p[height];
34
+ const heapAtHeight = heap.r[height];
35
35
  if (heapAtHeight === void 0) {
36
- heap.p[height] = n;
36
+ heap.r[height] = n;
37
37
  } else {
38
- const tail = heapAtHeight.x;
39
- tail.P = n;
40
- n.x = tail;
41
- heapAtHeight.x = n;
38
+ const tail = heapAtHeight.z;
39
+ tail.Q = n;
40
+ n.z = tail;
41
+ heapAtHeight.z = n;
42
42
  }
43
- if (height > heap.J) {
44
- heap.J = height;
43
+ if (height > heap.L) {
44
+ heap.L = height;
45
45
  }
46
46
  }
47
47
  function insertIntoHeap(n, heap) {
@@ -69,28 +69,28 @@ function deleteFromHeap(n, heap) {
69
69
  return;
70
70
  n.b = flags & ~(8 /* InHeap */ | 16 /* InHeapHeight */);
71
71
  const height = n.c;
72
- if (n.x === n) {
73
- heap.p[height] = void 0;
72
+ if (n.z === n) {
73
+ heap.r[height] = void 0;
74
74
  } else {
75
- const next = n.P;
76
- const dhh = heap.p[height];
75
+ const next = n.Q;
76
+ const dhh = heap.r[height];
77
77
  const end = next ?? dhh;
78
78
  if (n === dhh) {
79
- heap.p[height] = next;
79
+ heap.r[height] = next;
80
80
  } else {
81
- n.x.P = next;
81
+ n.z.Q = next;
82
82
  }
83
- end.x = n.x;
83
+ end.z = n.z;
84
84
  }
85
- n.x = n;
86
- n.P = void 0;
85
+ n.z = n;
86
+ n.Q = void 0;
87
87
  }
88
88
  function markHeap(heap) {
89
89
  if (heap.aa)
90
90
  return;
91
91
  heap.aa = true;
92
- for (let i = 0; i <= heap.J; i++) {
93
- for (let el = heap.p[i]; el !== void 0; el = el.P) {
92
+ for (let i = 0; i <= heap.L; i++) {
93
+ for (let el = heap.r[i]; el !== void 0; el = el.Q) {
94
94
  if (el.b & 8 /* InHeap */)
95
95
  markNode(el);
96
96
  }
@@ -101,12 +101,12 @@ function markNode(el, newState = 2 /* Dirty */) {
101
101
  if ((flags & (1 /* Check */ | 2 /* Dirty */)) >= newState)
102
102
  return;
103
103
  el.b = flags & ~(1 /* Check */ | 2 /* Dirty */) | newState;
104
- for (let link2 = el.r; link2 !== null; link2 = link2.y) {
104
+ for (let link2 = el.s; link2 !== null; link2 = link2.A) {
105
105
  markNode(link2.j, 1 /* Check */);
106
106
  }
107
107
  if (el.ba !== null) {
108
108
  for (let child = el.ba; child !== null; child = child.ra) {
109
- for (let link2 = child.r; link2 !== null; link2 = link2.y) {
109
+ for (let link2 = child.s; link2 !== null; link2 = link2.A) {
110
110
  markNode(link2.j, 1 /* Check */);
111
111
  }
112
112
  }
@@ -114,25 +114,25 @@ function markNode(el, newState = 2 /* Dirty */) {
114
114
  }
115
115
  function runHeap(heap, recompute2) {
116
116
  heap.aa = false;
117
- for (heap.n = 0; heap.n <= heap.J; heap.n++) {
118
- let el = heap.p[heap.n];
117
+ for (heap.p = 0; heap.p <= heap.L; heap.p++) {
118
+ let el = heap.r[heap.p];
119
119
  while (el !== void 0) {
120
120
  if (el.b & 8 /* InHeap */)
121
121
  recompute2(el);
122
122
  else {
123
123
  adjustHeight(el, heap);
124
124
  }
125
- el = heap.p[heap.n];
125
+ el = heap.r[heap.p];
126
126
  }
127
127
  }
128
- heap.J = 0;
128
+ heap.L = 0;
129
129
  }
130
130
  function adjustHeight(el, heap) {
131
131
  deleteFromHeap(el, heap);
132
132
  let newHeight = el.c;
133
- for (let d = el.u; d; d = d.E) {
134
- const dep1 = d.Q;
135
- const dep = "_owner" in dep1 ? dep1.z : dep1;
133
+ for (let d = el.x; d; d = d.F) {
134
+ const dep1 = d.R;
135
+ const dep = "_owner" in dep1 ? dep1.B : dep1;
136
136
  if ("_fn" in dep) {
137
137
  if (dep.c >= newHeight) {
138
138
  newHeight = dep.c + 1;
@@ -141,7 +141,7 @@ function adjustHeight(el, heap) {
141
141
  }
142
142
  if (el.c !== newHeight) {
143
143
  el.c = newHeight;
144
- for (let s = el.r; s !== null; s = s.y) {
144
+ for (let s = el.s; s !== null; s = s.A) {
145
145
  insertIntoHeapHeight(s.j, heap);
146
146
  }
147
147
  }
@@ -161,59 +161,83 @@ function schedule() {
161
161
  queueMicrotask(flush);
162
162
  }
163
163
  var dirtyQueue = {
164
- p: new Array(2e3).fill(void 0),
164
+ r: new Array(2e3).fill(void 0),
165
165
  aa: false,
166
- n: 0,
167
- J: 0
166
+ p: 0,
167
+ L: 0
168
168
  };
169
169
  var zombieQueue = {
170
- p: new Array(2e3).fill(void 0),
170
+ r: new Array(2e3).fill(void 0),
171
171
  aa: false,
172
- n: 0,
173
- J: 0
172
+ p: 0,
173
+ L: 0
174
174
  };
175
175
  var Queue = class {
176
- q = null;
177
- A = [[], []];
178
- R = [];
176
+ w = null;
177
+ k = [[], []];
178
+ l = [];
179
179
  created = clock;
180
180
  addChild(child) {
181
- this.R.push(child);
182
- child.q = this;
181
+ this.l.push(child);
182
+ child.w = this;
183
183
  }
184
184
  removeChild(child) {
185
- const index = this.R.indexOf(child);
185
+ const index = this.l.indexOf(child);
186
186
  if (index >= 0) {
187
- this.R.splice(index, 1);
188
- child.q = null;
187
+ this.l.splice(index, 1);
188
+ child.w = null;
189
189
  }
190
190
  }
191
191
  notify(node, mask, flags) {
192
- if (this.q)
193
- return this.q.notify(node, mask, flags);
192
+ if (this.w)
193
+ return this.w.notify(node, mask, flags);
194
194
  return false;
195
195
  }
196
196
  run(type) {
197
- if (this.A[type - 1].length) {
198
- const effects = this.A[type - 1];
199
- this.A[type - 1] = [];
197
+ if (this.k[type - 1].length) {
198
+ const effects = this.k[type - 1];
199
+ this.k[type - 1] = [];
200
200
  runQueue(effects, type);
201
201
  }
202
- for (let i = 0; i < this.R.length; i++) {
203
- this.R[i].run(type);
202
+ for (let i = 0; i < this.l.length; i++) {
203
+ this.l[i].run(type);
204
204
  }
205
205
  }
206
206
  enqueue(type, fn) {
207
207
  if (type)
208
- this.A[type - 1].push(fn);
208
+ this.k[type - 1].push(fn);
209
209
  schedule();
210
210
  }
211
+ stashQueues(stub) {
212
+ stub.k[0].push(...this.k[0]);
213
+ stub.k[1].push(...this.k[1]);
214
+ this.k = [[], []];
215
+ for (let i = 0; i < this.l.length; i++) {
216
+ let child = this.l[i];
217
+ let childStub = stub.l[i];
218
+ if (!childStub) {
219
+ childStub = { k: [[], []], l: [] };
220
+ stub.l[i] = childStub;
221
+ }
222
+ child.stashQueues(childStub);
223
+ }
224
+ }
225
+ restoreQueues(stub) {
226
+ this.k[0].push(...stub.k[0]);
227
+ this.k[1].push(...stub.k[1]);
228
+ for (let i = 0; i < stub.l.length; i++) {
229
+ const childStub = stub.l[i];
230
+ let child = this.l[i];
231
+ if (child)
232
+ child.restoreQueues(childStub);
233
+ }
234
+ }
211
235
  };
212
236
  var GlobalQueue = class _GlobalQueue extends Queue {
213
237
  ca = false;
214
238
  h = [];
215
239
  static S;
216
- static la;
240
+ static ka;
217
241
  flush() {
218
242
  if (this.ca)
219
243
  return;
@@ -224,9 +248,7 @@ var GlobalQueue = class _GlobalQueue extends Queue {
224
248
  if (!transitionComplete(activeTransition)) {
225
249
  runHeap(zombieQueue, _GlobalQueue.S);
226
250
  globalQueue.h = [];
227
- activeTransition.queues[0].push(...globalQueue.A[0]);
228
- activeTransition.queues[1].push(...globalQueue.A[1]);
229
- globalQueue.A = [[], []];
251
+ globalQueue.stashQueues(activeTransition.queueStash);
230
252
  clock++;
231
253
  scheduled = false;
232
254
  runPending(activeTransition.pendingNodes, true);
@@ -234,8 +256,7 @@ var GlobalQueue = class _GlobalQueue extends Queue {
234
256
  return;
235
257
  }
236
258
  globalQueue.h.push(...activeTransition.pendingNodes);
237
- globalQueue.A[0].push(...activeTransition.queues[0]);
238
- globalQueue.A[1].push(...activeTransition.queues[1]);
259
+ globalQueue.restoreQueues(activeTransition.queueStash);
239
260
  transitions.delete(activeTransition);
240
261
  activeTransition = null;
241
262
  if (runPending(globalQueue.h, false))
@@ -249,7 +270,7 @@ var GlobalQueue = class _GlobalQueue extends Queue {
249
270
  n.e = NOT_PENDING;
250
271
  }
251
272
  if (n.ha)
252
- _GlobalQueue.la(n, false, true);
273
+ _GlobalQueue.ka(n, false, true);
253
274
  }
254
275
  globalQueue.h.length = 0;
255
276
  clock++;
@@ -264,8 +285,8 @@ var GlobalQueue = class _GlobalQueue extends Queue {
264
285
  notify(node, mask, flags) {
265
286
  if (mask & 1 /* Pending */) {
266
287
  if (flags & 1 /* Pending */) {
267
- if (activeTransition && !activeTransition.asyncNodes.includes(node.B.cause))
268
- activeTransition.asyncNodes.push(node.B.cause);
288
+ if (activeTransition && !activeTransition.asyncNodes.includes(node.C.cause))
289
+ activeTransition.asyncNodes.push(node.C.cause);
269
290
  }
270
291
  return true;
271
292
  }
@@ -279,7 +300,7 @@ var GlobalQueue = class _GlobalQueue extends Queue {
279
300
  time: clock,
280
301
  pendingNodes: [],
281
302
  asyncNodes: [],
282
- queues: [[], []]
303
+ queueStash: { k: [[], []], l: [] }
283
304
  };
284
305
  }
285
306
  transitions.add(activeTransition);
@@ -298,8 +319,8 @@ function runPending(pendingNodes, value) {
298
319
  for (let i = 0; i < p.length; i++) {
299
320
  const n = p[i];
300
321
  n.T = activeTransition;
301
- if (n.G) {
302
- n.G.da(value);
322
+ if (n.H) {
323
+ n.H.da(value);
303
324
  needsReset = true;
304
325
  }
305
326
  }
@@ -329,7 +350,7 @@ function notifyUnobserved() {
329
350
  var _a, _b;
330
351
  for (let i = 0; i < unobserved.length; i++) {
331
352
  const source = unobserved[i];
332
- if (!source.r)
353
+ if (!source.s)
333
354
  (_b = (_a = unobserved[i]).sa) == null ? void 0 : _b.call(_a);
334
355
  }
335
356
  unobserved = [];
@@ -337,13 +358,21 @@ function notifyUnobserved() {
337
358
 
338
359
  // src/core/core.ts
339
360
  GlobalQueue.S = recompute;
340
- GlobalQueue.la = disposeChildren;
361
+ GlobalQueue.ka = disposeChildren;
341
362
  var tracking = false;
342
363
  var stale = false;
343
364
  var pendingValueCheck = false;
344
365
  var pendingCheck = null;
345
366
  var context = null;
346
367
  var defaultContext = {};
368
+ function notifySubs(node) {
369
+ for (let s = node.s; s !== null; s = s.A) {
370
+ const queue = s.j.b & 32 /* Zombie */ ? zombieQueue : dirtyQueue;
371
+ if (queue.p > s.j.c)
372
+ queue.p = s.j.c;
373
+ insertIntoHeap(s.j, queue);
374
+ }
375
+ }
347
376
  function recompute(el, create = false) {
348
377
  var _a;
349
378
  deleteFromHeap(el, el.b & 32 /* Zombie */ ? zombieQueue : dirtyQueue);
@@ -352,20 +381,20 @@ function recompute(el, create = false) {
352
381
  else {
353
382
  markDisposal(el);
354
383
  globalQueue.h.push(el);
355
- el.V = el.s;
356
- el.U = el.o;
357
- el.s = null;
358
- el.o = null;
384
+ el.V = el.t;
385
+ el.U = el.q;
386
+ el.t = null;
387
+ el.q = null;
359
388
  }
360
389
  const oldcontext = context;
361
390
  context = el;
362
- el.H = null;
391
+ el.I = null;
363
392
  el.b = 4 /* RecomputingDeps */;
364
- el.W = clock;
393
+ el.J = clock;
365
394
  let value = el.e === NOT_PENDING ? el.g : el.e;
366
395
  let oldHeight = el.c;
367
396
  let prevStatusFlags = el.f;
368
- let prevError = el.B;
397
+ let prevError = el.C;
369
398
  let prevTracking = tracking;
370
399
  clearStatusFlags(el);
371
400
  tracking = true;
@@ -384,50 +413,50 @@ function recompute(el, create = false) {
384
413
  }
385
414
  el.b = 0 /* None */;
386
415
  context = oldcontext;
387
- const depsTail = el.H;
388
- let toRemove = depsTail !== null ? depsTail.E : el.u;
416
+ const depsTail = el.I;
417
+ let toRemove = depsTail !== null ? depsTail.F : el.x;
389
418
  if (toRemove !== null) {
390
419
  do {
391
420
  toRemove = unlinkSubs(toRemove);
392
421
  } while (toRemove !== null);
393
422
  if (depsTail !== null) {
394
- depsTail.E = null;
423
+ depsTail.F = null;
395
424
  } else {
396
- el.u = null;
425
+ el.x = null;
397
426
  }
398
427
  }
399
428
  const valueChanged = !el.ea || !el.ea(el.e === NOT_PENDING ? el.g : el.e, value);
400
- const statusFlagsChanged = el.f !== prevStatusFlags || el.B !== prevError;
401
- (_a = el.ma) == null ? void 0 : _a.call(el, statusFlagsChanged, prevStatusFlags);
429
+ const statusFlagsChanged = el.f !== prevStatusFlags || el.C !== prevError;
430
+ (_a = el.la) == null ? void 0 : _a.call(el, statusFlagsChanged, prevStatusFlags);
402
431
  if (valueChanged || statusFlagsChanged) {
403
432
  if (valueChanged) {
404
- if (create || el.ia || el.I)
433
+ if (create || el.ia || el.K)
405
434
  el.g = value;
406
435
  else {
407
436
  if (el.e === NOT_PENDING)
408
437
  globalQueue.h.push(el);
409
438
  el.e = value;
410
439
  }
411
- if (el.C)
412
- el.C.da(value);
440
+ if (el.D)
441
+ el.D.da(value);
413
442
  }
414
- for (let s = el.r; s !== null; s = s.y) {
443
+ for (let s = el.s; s !== null; s = s.A) {
415
444
  const queue = s.j.b & 32 /* Zombie */ ? zombieQueue : dirtyQueue;
416
- if (s.j.c < el.c && queue.n > s.j.c)
417
- queue.n = s.j.c;
445
+ if (s.j.c < el.c && queue.p > s.j.c)
446
+ queue.p = s.j.c;
418
447
  insertIntoHeap(s.j, queue);
419
448
  }
420
449
  } else if (el.c != oldHeight) {
421
- for (let s = el.r; s !== null; s = s.y) {
450
+ for (let s = el.s; s !== null; s = s.A) {
422
451
  insertIntoHeapHeight(s.j, s.j.b & 32 /* Zombie */ ? zombieQueue : dirtyQueue);
423
452
  }
424
453
  }
425
454
  }
426
455
  function updateIfNecessary(el) {
427
456
  if (el.b & 1 /* Check */) {
428
- for (let d = el.u; d; d = d.E) {
429
- const dep1 = d.Q;
430
- const dep = "_owner" in dep1 ? dep1.z : dep1;
457
+ for (let d = el.x; d; d = d.F) {
458
+ const dep1 = d.R;
459
+ const dep = "_owner" in dep1 ? dep1.B : dep1;
431
460
  if ("_fn" in dep) {
432
461
  updateIfNecessary(dep);
433
462
  }
@@ -442,62 +471,62 @@ function updateIfNecessary(el) {
442
471
  el.b = 0 /* None */;
443
472
  }
444
473
  function unlinkSubs(link2) {
445
- const dep = link2.Q;
446
- const nextDep = link2.E;
447
- const nextSub = link2.y;
448
- const prevSub = link2.na;
474
+ const dep = link2.R;
475
+ const nextDep = link2.F;
476
+ const nextSub = link2.A;
477
+ const prevSub = link2.ma;
449
478
  if (nextSub !== null) {
450
- nextSub.na = prevSub;
479
+ nextSub.ma = prevSub;
451
480
  } else {
452
- dep.X = prevSub;
481
+ dep.W = prevSub;
453
482
  }
454
483
  if (prevSub !== null) {
455
- prevSub.y = nextSub;
484
+ prevSub.A = nextSub;
456
485
  } else {
457
- dep.r = nextSub;
486
+ dep.s = nextSub;
458
487
  }
459
488
  return nextDep;
460
489
  }
461
490
  function link(dep, sub) {
462
- const prevDep = sub.H;
463
- if (prevDep !== null && prevDep.Q === dep) {
491
+ const prevDep = sub.I;
492
+ if (prevDep !== null && prevDep.R === dep) {
464
493
  return;
465
494
  }
466
495
  let nextDep = null;
467
496
  const isRecomputing = sub.b & 4 /* RecomputingDeps */;
468
497
  if (isRecomputing) {
469
- nextDep = prevDep !== null ? prevDep.E : sub.u;
470
- if (nextDep !== null && nextDep.Q === dep) {
471
- sub.H = nextDep;
498
+ nextDep = prevDep !== null ? prevDep.F : sub.x;
499
+ if (nextDep !== null && nextDep.R === dep) {
500
+ sub.I = nextDep;
472
501
  return;
473
502
  }
474
503
  }
475
- const prevSub = dep.X;
504
+ const prevSub = dep.W;
476
505
  if (prevSub !== null && prevSub.j === sub && (!isRecomputing || isValidLink(prevSub, sub))) {
477
506
  return;
478
507
  }
479
- const newLink = sub.H = dep.X = {
480
- Q: dep,
508
+ const newLink = sub.I = dep.W = {
509
+ R: dep,
481
510
  j: sub,
482
- E: nextDep,
483
- na: prevSub,
484
- y: null
511
+ F: nextDep,
512
+ ma: prevSub,
513
+ A: null
485
514
  };
486
515
  if (prevDep !== null) {
487
- prevDep.E = newLink;
516
+ prevDep.F = newLink;
488
517
  } else {
489
- sub.u = newLink;
518
+ sub.x = newLink;
490
519
  }
491
520
  if (prevSub !== null) {
492
- prevSub.y = newLink;
521
+ prevSub.A = newLink;
493
522
  } else {
494
- dep.r = newLink;
523
+ dep.s = newLink;
495
524
  }
496
525
  }
497
526
  function isValidLink(checkLink, sub) {
498
- const depsTail = sub.H;
527
+ const depsTail = sub.I;
499
528
  if (depsTail !== null) {
500
- let link2 = sub.u;
529
+ let link2 = sub.x;
501
530
  do {
502
531
  if (link2 === checkLink) {
503
532
  return true;
@@ -505,23 +534,23 @@ function isValidLink(checkLink, sub) {
505
534
  if (link2 === depsTail) {
506
535
  break;
507
536
  }
508
- link2 = link2.E;
537
+ link2 = link2.F;
509
538
  } while (link2 !== null);
510
539
  }
511
540
  return false;
512
541
  }
513
542
  function setStatusFlags(signal2, flags, error = null) {
514
543
  signal2.f = flags;
515
- signal2.B = error;
544
+ signal2.C = error;
516
545
  }
517
546
  function setError(signal2, error) {
518
- setStatusFlags(signal2, 2 /* Error */ | 4 /* Uninitialized */, error);
547
+ setStatusFlags(signal2, 2 /* Error */, error);
519
548
  }
520
549
  function clearStatusFlags(signal2) {
521
550
  setStatusFlags(signal2, 0 /* None */);
522
551
  }
523
552
  function markDisposal(el) {
524
- let child = el.o;
553
+ let child = el.q;
525
554
  while (child) {
526
555
  child.b |= 32 /* Zombie */;
527
556
  const inHeap = child.b & 8 /* InHeap */;
@@ -530,7 +559,7 @@ function markDisposal(el) {
530
559
  insertIntoHeap(child, zombieQueue);
531
560
  }
532
561
  markDisposal(child);
533
- child = child.K;
562
+ child = child.M;
534
563
  }
535
564
  }
536
565
  function disposeChildren(node, self = false, zombie) {
@@ -538,18 +567,18 @@ function disposeChildren(node, self = false, zombie) {
538
567
  return;
539
568
  if (self)
540
569
  node.b = 64 /* Disposed */;
541
- let child = zombie ? node.U : node.o;
570
+ let child = zombie ? node.U : node.q;
542
571
  while (child) {
543
- const nextChild = child.K;
544
- if (child.u) {
572
+ const nextChild = child.M;
573
+ if (child.x) {
545
574
  const n = child;
546
575
  deleteFromHeap(n, n.b & 32 /* Zombie */ ? zombieQueue : dirtyQueue);
547
- let toRemove = n.u;
576
+ let toRemove = n.x;
548
577
  do {
549
578
  toRemove = unlinkSubs(toRemove);
550
579
  } while (toRemove !== null);
551
- n.u = null;
552
- n.H = null;
580
+ n.x = null;
581
+ n.I = null;
553
582
  }
554
583
  disposeChildren(child, true);
555
584
  child = nextChild;
@@ -557,13 +586,13 @@ function disposeChildren(node, self = false, zombie) {
557
586
  if (zombie) {
558
587
  node.U = null;
559
588
  } else {
560
- node.o = null;
561
- node.K = null;
589
+ node.q = null;
590
+ node.M = null;
562
591
  }
563
592
  runDisposal(node, zombie);
564
593
  }
565
594
  function runDisposal(node, zombie) {
566
- let disposal = zombie ? node.V : node.s;
595
+ let disposal = zombie ? node.V : node.t;
567
596
  if (!disposal)
568
597
  return;
569
598
  if (Array.isArray(disposal)) {
@@ -574,7 +603,7 @@ function runDisposal(node, zombie) {
574
603
  } else {
575
604
  disposal.call(disposal);
576
605
  }
577
- zombie ? node.V = null : node.s = null;
606
+ zombie ? node.V = null : node.t = null;
578
607
  }
579
608
  function withOptions(obj, options) {
580
609
  obj.id = (options == null ? void 0 : options.id) ?? ((context == null ? void 0 : context.id) != null ? getNextChildId(context) : void 0);
@@ -587,7 +616,7 @@ function withOptions(obj, options) {
587
616
  }
588
617
  function getNextChildId(owner) {
589
618
  if (owner.id != null)
590
- return formatId(owner.id, owner.oa++);
619
+ return formatId(owner.id, owner.na++);
591
620
  throw new Error("Cannot get child id from owner without an id");
592
621
  }
593
622
  function formatId(prefix, id) {
@@ -597,43 +626,43 @@ function formatId(prefix, id) {
597
626
  function computed(fn, initialValue, options) {
598
627
  const self = withOptions(
599
628
  {
600
- s: null,
629
+ t: null,
601
630
  i: globalQueue,
602
- D: defaultContext,
603
- oa: 0,
631
+ E: defaultContext,
632
+ na: 0,
604
633
  ha: fn,
605
634
  g: initialValue,
606
635
  c: 0,
607
636
  ba: null,
608
- P: void 0,
637
+ Q: void 0,
638
+ z: null,
609
639
  x: null,
610
- u: null,
611
- H: null,
612
- r: null,
613
- X: null,
614
- q: context,
615
- K: null,
616
- o: null,
640
+ I: null,
641
+ s: null,
642
+ W: null,
643
+ w: context,
644
+ M: null,
645
+ q: null,
617
646
  b: 0 /* None */,
618
647
  f: 4 /* Uninitialized */,
619
- W: clock,
648
+ J: clock,
620
649
  e: NOT_PENDING,
621
650
  V: null,
622
651
  U: null
623
652
  },
624
653
  options
625
654
  );
626
- self.x = self;
655
+ self.z = self;
627
656
  const parent = (context == null ? void 0 : context._) ? context.$ : context;
628
657
  if (context) {
629
658
  context.i && (self.i = context.i);
630
- context.D && (self.D = context.D);
631
- const lastChild = context.o;
659
+ context.E && (self.E = context.E);
660
+ const lastChild = context.q;
632
661
  if (lastChild === null) {
633
- context.o = self;
662
+ context.q = self;
634
663
  } else {
635
- self.K = lastChild;
636
- context.o = self;
664
+ self.M = lastChild;
665
+ context.q = self;
637
666
  }
638
667
  }
639
668
  if (parent)
@@ -665,6 +694,9 @@ function asyncComputed(asyncFn, initialValue, options) {
665
694
  return;
666
695
  globalQueue.initTransition(self);
667
696
  setError(self, e);
697
+ self.J = clock;
698
+ notifySubs(self);
699
+ schedule();
668
700
  flush();
669
701
  });
670
702
  } else {
@@ -682,6 +714,9 @@ function asyncComputed(asyncFn, initialValue, options) {
682
714
  return;
683
715
  globalQueue.initTransition(self);
684
716
  setError(self, error);
717
+ self.J = clock;
718
+ notifySubs(self);
719
+ schedule();
685
720
  flush();
686
721
  }
687
722
  })();
@@ -702,12 +737,12 @@ function signal(v, options, firewall = null) {
702
737
  return firewall.ba = withOptions(
703
738
  {
704
739
  g: v,
705
- r: null,
706
- X: null,
707
- z: firewall,
740
+ s: null,
741
+ W: null,
742
+ B: firewall,
708
743
  ra: firewall.ba,
709
744
  f: 0 /* None */,
710
- W: clock,
745
+ J: clock,
711
746
  e: NOT_PENDING
712
747
  },
713
748
  options
@@ -716,10 +751,10 @@ function signal(v, options, firewall = null) {
716
751
  return withOptions(
717
752
  {
718
753
  g: v,
719
- r: null,
720
- X: null,
754
+ s: null,
755
+ W: null,
721
756
  f: 0 /* None */,
722
- W: clock,
757
+ J: clock,
723
758
  e: NOT_PENDING
724
759
  },
725
760
  options
@@ -745,65 +780,65 @@ function read(el) {
745
780
  c = c.$;
746
781
  if (c && tracking) {
747
782
  link(el, c);
748
- const owner = "_owner" in el ? el.z : el;
783
+ const owner = "_owner" in el ? el.B : el;
749
784
  if ("_fn" in owner) {
750
785
  const isZombie = el.b & 32 /* Zombie */;
751
- if (owner.c >= (isZombie ? zombieQueue.n : dirtyQueue.n)) {
786
+ if (owner.c >= (isZombie ? zombieQueue.p : dirtyQueue.p)) {
752
787
  markNode(c);
753
788
  markHeap(isZombie ? zombieQueue : dirtyQueue);
754
789
  updateIfNecessary(owner);
755
790
  }
756
791
  const height = owner.c;
757
- if (height >= c.c && el.q !== c) {
792
+ if (height >= c.c && el.w !== c) {
758
793
  c.c = height + 1;
759
794
  }
760
795
  }
761
796
  }
762
797
  if (pendingCheck) {
763
798
  const pendingResult = (el.f & 1 /* Pending */) !== 0 || !!el.T || false;
764
- if (!el.G) {
765
- el.G = signal(pendingResult);
766
- el.G.ia = true;
767
- el.G.da = (v) => setSignal(el.G, v);
799
+ if (!el.H) {
800
+ el.H = signal(pendingResult);
801
+ el.H.ia = true;
802
+ el.H.da = (v) => setSignal(el.H, v);
768
803
  }
769
804
  const prev = pendingCheck;
770
805
  pendingCheck = null;
771
- read(el.G);
806
+ read(el.H);
772
807
  pendingCheck = prev;
773
808
  prev.g = pendingResult || prev.g;
774
809
  }
775
810
  if (pendingValueCheck) {
776
- if (!el.C) {
777
- el.C = signal(
811
+ if (!el.D) {
812
+ el.D = signal(
778
813
  el.e === NOT_PENDING ? el.g : el.e
779
814
  );
780
- el.C.ia = true;
781
- el.C.da = (v) => queueMicrotask(() => queueMicrotask(() => setSignal(el.C, v)));
815
+ el.D.ia = true;
816
+ el.D.da = (v) => queueMicrotask(() => queueMicrotask(() => setSignal(el.D, v)));
782
817
  }
783
818
  pendingValueCheck = false;
784
819
  try {
785
- return read(el.C);
820
+ return read(el.D);
786
821
  } finally {
787
822
  pendingValueCheck = true;
788
823
  }
789
824
  }
790
825
  if (el.f & 1 /* Pending */) {
791
826
  if (c && !stale || el.f & 4 /* Uninitialized */)
792
- throw el.B;
827
+ throw el.C;
793
828
  else if (c && stale && !pendingCheck) {
794
829
  setStatusFlags(
795
830
  c,
796
831
  c.f | 1,
797
- el.B
832
+ el.C
798
833
  );
799
834
  }
800
835
  }
801
836
  if (el.f & 2 /* Error */) {
802
- if (el.W < clock) {
837
+ if (el.J < clock) {
803
838
  recompute(el, true);
804
839
  return read(el);
805
840
  } else {
806
- throw el.B;
841
+ throw el.C;
807
842
  }
808
843
  }
809
844
  return !c || el.e === NOT_PENDING || stale && !pendingCheck && el.T && activeTransition !== el.T ? el.g : el.e;
@@ -825,17 +860,12 @@ function setSignal(el, v) {
825
860
  globalQueue.h.push(el);
826
861
  el.e = v;
827
862
  }
828
- if (el.C)
829
- el.C.da(v);
863
+ if (el.D)
864
+ el.D.da(v);
830
865
  }
831
866
  clearStatusFlags(el);
832
- el.W = clock;
833
- for (let s = el.r; s !== null; s = s.y) {
834
- const queue = s.j.b & 32 /* Zombie */ ? zombieQueue : dirtyQueue;
835
- if (queue.n > s.j.c)
836
- queue.n = s.j.c;
837
- insertIntoHeap(s.j, queue);
838
- }
867
+ el.J = clock;
868
+ notifySubs(el);
839
869
  schedule();
840
870
  return v;
841
871
  }
@@ -849,12 +879,12 @@ function onCleanup(fn) {
849
879
  if (!context)
850
880
  return fn;
851
881
  const node = context;
852
- if (!node.s) {
853
- node.s = fn;
854
- } else if (Array.isArray(node.s)) {
855
- node.s.push(fn);
882
+ if (!node.t) {
883
+ node.t = fn;
884
+ } else if (Array.isArray(node.t)) {
885
+ node.t.push(fn);
856
886
  } else {
857
- node.s = [node.s, fn];
887
+ node.t = [node.t, fn];
858
888
  }
859
889
  return fn;
860
890
  }
@@ -863,27 +893,27 @@ function createOwner(options) {
863
893
  const owner = {
864
894
  _: true,
865
895
  $: (parent == null ? void 0 : parent._) ? parent.$ : parent,
866
- o: null,
867
- K: null,
868
- s: null,
896
+ q: null,
897
+ M: null,
898
+ t: null,
869
899
  id: (options == null ? void 0 : options.id) ?? ((parent == null ? void 0 : parent.id) != null ? getNextChildId(parent) : void 0),
870
900
  i: (parent == null ? void 0 : parent.i) ?? globalQueue,
871
- D: (parent == null ? void 0 : parent.D) || defaultContext,
872
- oa: 0,
901
+ E: (parent == null ? void 0 : parent.E) || defaultContext,
902
+ na: 0,
873
903
  V: null,
874
904
  U: null,
875
- q: parent,
905
+ w: parent,
876
906
  dispose(self = true) {
877
907
  disposeChildren(owner, self);
878
908
  }
879
909
  };
880
910
  if (parent) {
881
- const lastChild = parent.o;
911
+ const lastChild = parent.q;
882
912
  if (lastChild === null) {
883
- parent.o = owner;
913
+ parent.q = owner;
884
914
  } else {
885
- owner.K = lastChild;
886
- parent.o = owner;
915
+ owner.M = lastChild;
916
+ parent.q = owner;
887
917
  }
888
918
  }
889
919
  return owner;
@@ -944,7 +974,7 @@ function getContext(context2, owner = getOwner()) {
944
974
  if (!owner) {
945
975
  throw new NoOwnerError();
946
976
  }
947
- const value = hasContext(context2, owner) ? owner.D[context2.id] : context2.defaultValue;
977
+ const value = hasContext(context2, owner) ? owner.E[context2.id] : context2.defaultValue;
948
978
  if (isUndefined(value)) {
949
979
  throw new ContextNotFoundError();
950
980
  }
@@ -954,13 +984,13 @@ function setContext(context2, value, owner = getOwner()) {
954
984
  if (!owner) {
955
985
  throw new NoOwnerError();
956
986
  }
957
- owner.D = {
958
- ...owner.D,
987
+ owner.E = {
988
+ ...owner.E,
959
989
  [context2.id]: isUndefined(value) ? context2.defaultValue : value
960
990
  };
961
991
  }
962
992
  function hasContext(context2, owner) {
963
- return !isUndefined(owner == null ? void 0 : owner.D[context2.id]);
993
+ return !isUndefined(owner == null ? void 0 : owner.E[context2.id]);
964
994
  }
965
995
  function isUndefined(value) {
966
996
  return typeof value === "undefined";
@@ -974,28 +1004,28 @@ function effect(compute, effect2, error, initialValue, options) {
974
1004
  ...options,
975
1005
  ja: {
976
1006
  fa: true,
977
- pa: initialValue,
1007
+ oa: initialValue,
978
1008
  ua: effect2,
979
- qa: error,
980
- L: void 0,
1009
+ pa: error,
1010
+ N: void 0,
981
1011
  i: ((_a = getOwner()) == null ? void 0 : _a.i) ?? globalQueue,
982
- I: (options == null ? void 0 : options.render) ? 1 /* Render */ : 2 /* User */,
983
- ma(statusFlagsChanged, prevStatusFlags) {
1012
+ K: (options == null ? void 0 : options.render) ? 1 /* Render */ : 2 /* User */,
1013
+ la(statusFlagsChanged, prevStatusFlags) {
984
1014
  if (initialized) {
985
1015
  const errorChanged = this.f && this.f === prevStatusFlags && statusFlagsChanged;
986
1016
  this.fa = !(this.f & 2 /* Error */) && !(this.f & 1 /* Pending */ & ~prevStatusFlags) && !errorChanged;
987
1017
  if (this.fa)
988
- this.i.enqueue(this.I, runEffect.bind(this));
1018
+ this.i.enqueue(this.K, runEffect.bind(this));
989
1019
  }
990
1020
  if (this.f & 2 /* Error */) {
991
- let error2 = this.B;
1021
+ let error2 = this.C;
992
1022
  this.i.notify(this, 1 /* Pending */, 0);
993
- if (this.I === 2 /* User */) {
1023
+ if (this.K === 2 /* User */) {
994
1024
  try {
995
- return this.qa ? this.qa(error2, () => {
1025
+ return this.pa ? this.pa(error2, () => {
996
1026
  var _a2;
997
- (_a2 = this.L) == null ? void 0 : _a2.call(this);
998
- this.L = void 0;
1027
+ (_a2 = this.N) == null ? void 0 : _a2.call(this);
1028
+ this.N = void 0;
999
1029
  }) : console.error(error2);
1000
1030
  } catch (e) {
1001
1031
  error2 = e;
@@ -1003,7 +1033,7 @@ function effect(compute, effect2, error, initialValue, options) {
1003
1033
  }
1004
1034
  if (!this.i.notify(this, 2 /* Error */, 2 /* Error */))
1005
1035
  throw error2;
1006
- } else if (this.I === 1 /* Render */) {
1036
+ } else if (this.K === 1 /* Render */) {
1007
1037
  this.i.notify(
1008
1038
  this,
1009
1039
  1 /* Pending */ | 2 /* Error */,
@@ -1014,28 +1044,27 @@ function effect(compute, effect2, error, initialValue, options) {
1014
1044
  }
1015
1045
  });
1016
1046
  initialized = true;
1017
- if (node.I === 1 /* Render */) {
1018
- node.ha = (p) => !(node.f & 2 /* Error */) ? staleValues(() => compute(p)) : compute(p);
1019
- }
1020
- !(options == null ? void 0 : options.defer) && !(node.f & (2 /* Error */ | 1 /* Pending */)) && (node.I === 2 /* User */ ? node.i.enqueue(node.I, runEffect.bind(node)) : runEffect.call(node));
1047
+ if (node.K === 1 /* Render */)
1048
+ node.ha = (p) => staleValues(() => compute(p));
1049
+ !(options == null ? void 0 : options.defer) && !(node.f & (2 /* Error */ | 1 /* Pending */)) && (node.K === 2 /* User */ ? node.i.enqueue(node.K, runEffect.bind(node)) : runEffect.call(node));
1021
1050
  onCleanup(() => {
1022
1051
  var _a2;
1023
- return (_a2 = node.L) == null ? void 0 : _a2.call(node);
1052
+ return (_a2 = node.N) == null ? void 0 : _a2.call(node);
1024
1053
  });
1025
1054
  }
1026
1055
  function runEffect() {
1027
1056
  var _a;
1028
1057
  if (!this.fa || this.b & 64 /* Disposed */)
1029
1058
  return;
1030
- (_a = this.L) == null ? void 0 : _a.call(this);
1031
- this.L = void 0;
1059
+ (_a = this.N) == null ? void 0 : _a.call(this);
1060
+ this.N = void 0;
1032
1061
  try {
1033
- this.L = this.ua(this.g, this.pa);
1062
+ this.N = this.ua(this.g, this.oa);
1034
1063
  } catch (error) {
1035
1064
  if (!this.i.notify(this, 2 /* Error */, 2 /* Error */))
1036
1065
  throw error;
1037
1066
  } finally {
1038
- this.pa = this.g;
1067
+ this.oa = this.g;
1039
1068
  this.fa = false;
1040
1069
  }
1041
1070
  }
@@ -1786,17 +1815,17 @@ function mapArray(list, map, options) {
1786
1815
  const keyFn = typeof (options == null ? void 0 : options.keyed) === "function" ? options.keyed : void 0;
1787
1816
  return createMemo(
1788
1817
  updateKeyedMap.bind({
1789
- z: createOwner(),
1790
- k: 0,
1818
+ B: createOwner(),
1819
+ m: 0,
1791
1820
  va: list,
1792
- F: [],
1793
- M: map,
1821
+ G: [],
1822
+ O: map,
1794
1823
  d: [],
1795
1824
  a: [],
1796
- N: keyFn,
1797
- l: keyFn || (options == null ? void 0 : options.keyed) === false ? [] : void 0,
1798
- m: map.length > 1 ? [] : void 0,
1799
- Y: options == null ? void 0 : options.fallback
1825
+ P: keyFn,
1826
+ n: keyFn || (options == null ? void 0 : options.keyed) === false ? [] : void 0,
1827
+ o: map.length > 1 ? [] : void 0,
1828
+ X: options == null ? void 0 : options.fallback
1800
1829
  })
1801
1830
  );
1802
1831
  }
@@ -1804,80 +1833,80 @@ var pureOptions = { pureWrite: true };
1804
1833
  function updateKeyedMap() {
1805
1834
  const newItems = this.va() || [], newLen = newItems.length;
1806
1835
  newItems[$TRACK];
1807
- runWithOwner(this.z, () => {
1808
- let i, j, mapper = this.l ? () => {
1809
- this.l[j] = signal(newItems[j], pureOptions);
1810
- this.m && (this.m[j] = signal(j, pureOptions));
1811
- return this.M(
1812
- read.bind(null, this.l[j]),
1813
- this.m ? read.bind(null, this.m[j]) : void 0
1836
+ runWithOwner(this.B, () => {
1837
+ let i, j, mapper = this.n ? () => {
1838
+ this.n[j] = signal(newItems[j], pureOptions);
1839
+ this.o && (this.o[j] = signal(j, pureOptions));
1840
+ return this.O(
1841
+ read.bind(null, this.n[j]),
1842
+ this.o ? read.bind(null, this.o[j]) : void 0
1814
1843
  );
1815
- } : this.m ? () => {
1844
+ } : this.o ? () => {
1816
1845
  const item = newItems[j];
1817
- this.m[j] = signal(j, pureOptions);
1818
- return this.M(
1846
+ this.o[j] = signal(j, pureOptions);
1847
+ return this.O(
1819
1848
  () => item,
1820
- read.bind(null, this.m[j])
1849
+ read.bind(null, this.o[j])
1821
1850
  );
1822
1851
  } : () => {
1823
1852
  const item = newItems[j];
1824
- return this.M(() => item);
1853
+ return this.O(() => item);
1825
1854
  };
1826
1855
  if (newLen === 0) {
1827
- if (this.k !== 0) {
1828
- this.z.dispose(false);
1856
+ if (this.m !== 0) {
1857
+ this.B.dispose(false);
1829
1858
  this.a = [];
1830
- this.F = [];
1859
+ this.G = [];
1831
1860
  this.d = [];
1832
- this.k = 0;
1833
- this.l && (this.l = []);
1834
- this.m && (this.m = []);
1861
+ this.m = 0;
1862
+ this.n && (this.n = []);
1863
+ this.o && (this.o = []);
1835
1864
  }
1836
- if (this.Y && !this.d[0]) {
1865
+ if (this.X && !this.d[0]) {
1837
1866
  this.d[0] = runWithOwner(
1838
1867
  this.a[0] = createOwner(),
1839
- this.Y
1868
+ this.X
1840
1869
  );
1841
1870
  }
1842
- } else if (this.k === 0) {
1871
+ } else if (this.m === 0) {
1843
1872
  if (this.a[0])
1844
1873
  this.a[0].dispose();
1845
1874
  this.d = new Array(newLen);
1846
1875
  for (j = 0; j < newLen; j++) {
1847
- this.F[j] = newItems[j];
1876
+ this.G[j] = newItems[j];
1848
1877
  this.d[j] = runWithOwner(this.a[j] = createOwner(), mapper);
1849
1878
  }
1850
- this.k = newLen;
1879
+ this.m = newLen;
1851
1880
  } else {
1852
- let start, end, newEnd, item, key, newIndices, newIndicesNext, temp = new Array(newLen), tempNodes = new Array(newLen), tempRows = this.l ? new Array(newLen) : void 0, tempIndexes = this.m ? new Array(newLen) : void 0;
1853
- for (start = 0, end = Math.min(this.k, newLen); start < end && (this.F[start] === newItems[start] || this.l && compare(this.N, this.F[start], newItems[start])); start++) {
1854
- if (this.l)
1855
- setSignal(this.l[start], newItems[start]);
1881
+ let start, end, newEnd, item, key, newIndices, newIndicesNext, temp = new Array(newLen), tempNodes = new Array(newLen), tempRows = this.n ? new Array(newLen) : void 0, tempIndexes = this.o ? new Array(newLen) : void 0;
1882
+ for (start = 0, end = Math.min(this.m, newLen); start < end && (this.G[start] === newItems[start] || this.n && compare(this.P, this.G[start], newItems[start])); start++) {
1883
+ if (this.n)
1884
+ setSignal(this.n[start], newItems[start]);
1856
1885
  }
1857
- for (end = this.k - 1, newEnd = newLen - 1; end >= start && newEnd >= start && (this.F[end] === newItems[newEnd] || this.l && compare(this.N, this.F[end], newItems[newEnd])); end--, newEnd--) {
1886
+ for (end = this.m - 1, newEnd = newLen - 1; end >= start && newEnd >= start && (this.G[end] === newItems[newEnd] || this.n && compare(this.P, this.G[end], newItems[newEnd])); end--, newEnd--) {
1858
1887
  temp[newEnd] = this.d[end];
1859
1888
  tempNodes[newEnd] = this.a[end];
1860
- tempRows && (tempRows[newEnd] = this.l[end]);
1861
- tempIndexes && (tempIndexes[newEnd] = this.m[end]);
1889
+ tempRows && (tempRows[newEnd] = this.n[end]);
1890
+ tempIndexes && (tempIndexes[newEnd] = this.o[end]);
1862
1891
  }
1863
1892
  newIndices = /* @__PURE__ */ new Map();
1864
1893
  newIndicesNext = new Array(newEnd + 1);
1865
1894
  for (j = newEnd; j >= start; j--) {
1866
1895
  item = newItems[j];
1867
- key = this.N ? this.N(item) : item;
1896
+ key = this.P ? this.P(item) : item;
1868
1897
  i = newIndices.get(key);
1869
1898
  newIndicesNext[j] = i === void 0 ? -1 : i;
1870
1899
  newIndices.set(key, j);
1871
1900
  }
1872
1901
  for (i = start; i <= end; i++) {
1873
- item = this.F[i];
1874
- key = this.N ? this.N(item) : item;
1902
+ item = this.G[i];
1903
+ key = this.P ? this.P(item) : item;
1875
1904
  j = newIndices.get(key);
1876
1905
  if (j !== void 0 && j !== -1) {
1877
1906
  temp[j] = this.d[i];
1878
1907
  tempNodes[j] = this.a[i];
1879
- tempRows && (tempRows[j] = this.l[i]);
1880
- tempIndexes && (tempIndexes[j] = this.m[i]);
1908
+ tempRows && (tempRows[j] = this.n[i]);
1909
+ tempIndexes && (tempIndexes[j] = this.o[i]);
1881
1910
  j = newIndicesNext[j];
1882
1911
  newIndices.set(key, j);
1883
1912
  } else
@@ -1888,71 +1917,71 @@ function updateKeyedMap() {
1888
1917
  this.d[j] = temp[j];
1889
1918
  this.a[j] = tempNodes[j];
1890
1919
  if (tempRows) {
1891
- this.l[j] = tempRows[j];
1892
- setSignal(this.l[j], newItems[j]);
1920
+ this.n[j] = tempRows[j];
1921
+ setSignal(this.n[j], newItems[j]);
1893
1922
  }
1894
1923
  if (tempIndexes) {
1895
- this.m[j] = tempIndexes[j];
1896
- setSignal(this.m[j], j);
1924
+ this.o[j] = tempIndexes[j];
1925
+ setSignal(this.o[j], j);
1897
1926
  }
1898
1927
  } else {
1899
1928
  this.d[j] = runWithOwner(this.a[j] = createOwner(), mapper);
1900
1929
  }
1901
1930
  }
1902
- this.d = this.d.slice(0, this.k = newLen);
1903
- this.F = newItems.slice(0);
1931
+ this.d = this.d.slice(0, this.m = newLen);
1932
+ this.G = newItems.slice(0);
1904
1933
  }
1905
1934
  });
1906
1935
  return this.d;
1907
1936
  }
1908
1937
  function repeat(count, map, options) {
1909
1938
  return updateRepeat.bind({
1910
- z: createOwner(),
1911
- k: 0,
1912
- w: 0,
1939
+ B: createOwner(),
1940
+ m: 0,
1941
+ y: 0,
1913
1942
  wa: count,
1914
- M: map,
1943
+ O: map,
1915
1944
  a: [],
1916
1945
  d: [],
1917
1946
  xa: options == null ? void 0 : options.from,
1918
- Y: options == null ? void 0 : options.fallback
1947
+ X: options == null ? void 0 : options.fallback
1919
1948
  });
1920
1949
  }
1921
1950
  function updateRepeat() {
1922
1951
  var _a;
1923
1952
  const newLen = this.wa();
1924
1953
  const from = ((_a = this.xa) == null ? void 0 : _a.call(this)) || 0;
1925
- runWithOwner(this.z, () => {
1954
+ runWithOwner(this.B, () => {
1926
1955
  if (newLen === 0) {
1927
- if (this.k !== 0) {
1928
- this.z.dispose(false);
1956
+ if (this.m !== 0) {
1957
+ this.B.dispose(false);
1929
1958
  this.a = [];
1930
1959
  this.d = [];
1931
- this.k = 0;
1960
+ this.m = 0;
1932
1961
  }
1933
- if (this.Y && !this.d[0]) {
1962
+ if (this.X && !this.d[0]) {
1934
1963
  this.d[0] = runWithOwner(
1935
1964
  this.a[0] = createOwner(),
1936
- this.Y
1965
+ this.X
1937
1966
  );
1938
1967
  }
1939
1968
  return;
1940
1969
  }
1941
1970
  const to = from + newLen;
1942
- const prevTo = this.w + this.k;
1943
- if (this.k === 0 && this.a[0])
1971
+ const prevTo = this.y + this.m;
1972
+ if (this.m === 0 && this.a[0])
1944
1973
  this.a[0].dispose();
1945
1974
  for (let i = to; i < prevTo; i++)
1946
- this.a[i - this.w].dispose();
1947
- if (this.w < from) {
1948
- let i = this.w;
1949
- while (i < from && i < this.k)
1975
+ this.a[i - this.y].dispose();
1976
+ if (this.y < from) {
1977
+ let i = this.y;
1978
+ while (i < from && i < this.m)
1950
1979
  this.a[i++].dispose();
1951
- this.a.splice(0, from - this.w);
1952
- this.d.splice(0, from - this.w);
1953
- } else if (this.w > from) {
1954
- let i = prevTo - this.w - 1;
1955
- let difference = this.w - from;
1980
+ this.a.splice(0, from - this.y);
1981
+ this.d.splice(0, from - this.y);
1982
+ } else if (this.y > from) {
1983
+ let i = prevTo - this.y - 1;
1984
+ let difference = this.y - from;
1956
1985
  this.a.length = this.d.length = newLen;
1957
1986
  while (i >= difference) {
1958
1987
  this.a[i] = this.a[i - difference];
@@ -1962,19 +1991,19 @@ function updateRepeat() {
1962
1991
  for (let i2 = 0; i2 < difference; i2++) {
1963
1992
  this.d[i2] = runWithOwner(
1964
1993
  this.a[i2] = createOwner(),
1965
- () => this.M(i2 + from)
1994
+ () => this.O(i2 + from)
1966
1995
  );
1967
1996
  }
1968
1997
  }
1969
1998
  for (let i = prevTo; i < to; i++) {
1970
1999
  this.d[i - from] = runWithOwner(
1971
2000
  this.a[i - from] = createOwner(),
1972
- () => this.M(i)
2001
+ () => this.O(i)
1973
2002
  );
1974
2003
  }
1975
2004
  this.d = this.d.slice(0, newLen);
1976
- this.w = from;
1977
- this.k = newLen;
2005
+ this.y = from;
2006
+ this.m = newLen;
1978
2007
  });
1979
2008
  return this.d;
1980
2009
  }
@@ -1986,18 +2015,18 @@ function compare(key, a, b) {
1986
2015
  function boundaryComputed(fn, propagationMask) {
1987
2016
  const node = computed(fn, void 0, {
1988
2017
  ja: {
1989
- ma() {
2018
+ la() {
1990
2019
  let flags = this.f;
1991
- this.f &= ~this.Z;
1992
- if (this.Z & 1 /* Pending */ && !(this.f & 4 /* Uninitialized */)) {
2020
+ this.f &= ~this.Y;
2021
+ if (this.Y & 1 /* Pending */ && !(this.f & 4 /* Uninitialized */)) {
1993
2022
  flags &= ~1 /* Pending */;
1994
2023
  }
1995
- this.i.notify(this, this.Z, flags);
2024
+ this.i.notify(this, this.Y, flags);
1996
2025
  },
1997
- Z: propagationMask
2026
+ Y: propagationMask
1998
2027
  }
1999
2028
  });
2000
- node.Z = propagationMask;
2029
+ node.Y = propagationMask;
2001
2030
  return node;
2002
2031
  }
2003
2032
  function createBoundChildren(owner, fn, queue, mask) {
@@ -2010,20 +2039,20 @@ function createBoundChildren(owner, fn, queue, mask) {
2010
2039
  });
2011
2040
  }
2012
2041
  var ConditionalQueue = class extends Queue {
2013
- t;
2042
+ u;
2014
2043
  ga = /* @__PURE__ */ new Set();
2015
2044
  h = /* @__PURE__ */ new Set();
2016
2045
  constructor(disabled) {
2017
2046
  super();
2018
- this.t = disabled;
2047
+ this.u = disabled;
2019
2048
  }
2020
2049
  run(type) {
2021
- if (!type || read(this.t))
2050
+ if (!type || read(this.u))
2022
2051
  return;
2023
2052
  return super.run(type);
2024
2053
  }
2025
2054
  notify(node, type, flags) {
2026
- if (read(this.t)) {
2055
+ if (read(this.u)) {
2027
2056
  if (type & 1 /* Pending */) {
2028
2057
  if (flags & 1 /* Pending */) {
2029
2058
  this.h.add(node);
@@ -2043,39 +2072,32 @@ var ConditionalQueue = class extends Queue {
2043
2072
  }
2044
2073
  };
2045
2074
  var CollectionQueue = class extends Queue {
2046
- O;
2075
+ Z;
2047
2076
  a = /* @__PURE__ */ new Set();
2048
- t = signal(false, { pureWrite: true });
2049
- ka = false;
2077
+ u = signal(false, { pureWrite: true });
2078
+ qa = false;
2050
2079
  constructor(type) {
2051
2080
  super();
2052
- this.O = type;
2081
+ this.Z = type;
2053
2082
  }
2054
2083
  run(type) {
2055
- if (!type || read(this.t))
2084
+ if (!type || read(this.u))
2056
2085
  return;
2057
2086
  return super.run(type);
2058
2087
  }
2059
- enqueue(type, fn) {
2060
- var _a;
2061
- if (this.O & 1 /* Pending */ && this.ka) {
2062
- return (_a = this.q) == null ? void 0 : _a.enqueue(type, fn);
2063
- }
2064
- return super.enqueue(type, fn);
2065
- }
2066
2088
  notify(node, type, flags) {
2067
- if (!(type & this.O) || this.O & 1 /* Pending */ && this.ka)
2089
+ if (!(type & this.Z) || this.Z & 1 /* Pending */ && this.qa)
2068
2090
  return super.notify(node, type, flags);
2069
- if (flags & this.O) {
2091
+ if (flags & this.Z) {
2070
2092
  this.a.add(node);
2071
2093
  if (this.a.size === 1)
2072
- setSignal(this.t, true);
2094
+ setSignal(this.u, true);
2073
2095
  } else if (this.a.size > 0) {
2074
2096
  this.a.delete(node);
2075
2097
  if (this.a.size === 0)
2076
- setSignal(this.t, false);
2098
+ setSignal(this.u, false);
2077
2099
  }
2078
- type &= ~this.O;
2100
+ type &= ~this.Z;
2079
2101
  return type ? super.notify(node, type, flags) : true;
2080
2102
  }
2081
2103
  };
@@ -2084,8 +2106,8 @@ function createBoundary(fn, condition) {
2084
2106
  const queue = new ConditionalQueue(computed(() => condition() === "hidden" /* HIDDEN */));
2085
2107
  const tree = createBoundChildren(owner, fn, queue, 0);
2086
2108
  computed(() => {
2087
- const disabled = read(queue.t);
2088
- tree.Z = disabled ? 2 /* Error */ | 1 /* Pending */ : 0;
2109
+ const disabled = read(queue.u);
2110
+ tree.Y = disabled ? 2 /* Error */ | 1 /* Pending */ : 0;
2089
2111
  if (!disabled) {
2090
2112
  queue.h.forEach(
2091
2113
  (node) => queue.notify(node, 1 /* Pending */, 1 /* Pending */)
@@ -2095,17 +2117,17 @@ function createBoundary(fn, condition) {
2095
2117
  queue.ga.clear();
2096
2118
  }
2097
2119
  });
2098
- return () => read(queue.t) ? void 0 : read(tree);
2120
+ return () => read(queue.u) ? void 0 : read(tree);
2099
2121
  }
2100
2122
  function createCollectionBoundary(type, fn, fallback) {
2101
2123
  const owner = createOwner();
2102
2124
  const queue = new CollectionQueue(type);
2103
2125
  const tree = createBoundChildren(owner, fn, queue, type);
2104
2126
  const decision = computed(() => {
2105
- if (!read(queue.t)) {
2127
+ if (!read(queue.u)) {
2106
2128
  const resolved = read(tree);
2107
- if (!untrack(() => read(queue.t)))
2108
- queue.ka = true;
2129
+ if (!untrack(() => read(queue.u)))
2130
+ queue.qa = true;
2109
2131
  return resolved;
2110
2132
  }
2111
2133
  return fallback(queue);
@@ -2118,7 +2140,7 @@ function createLoadBoundary(fn, fallback) {
2118
2140
  function createErrorBoundary(fn, fallback) {
2119
2141
  return createCollectionBoundary(2 /* Error */, fn, (queue) => {
2120
2142
  let node = queue.a.values().next().value;
2121
- return fallback(node.B, () => {
2143
+ return fallback(node.C, () => {
2122
2144
  for (let node2 of queue.a) {
2123
2145
  recompute(node2, true);
2124
2146
  }