@solidjs/signals 0.8.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/prod.js CHANGED
@@ -24,16 +24,16 @@ var SUPPORTS_PROXY = typeof Proxy === "function";
24
24
 
25
25
  // src/core/heap.ts
26
26
  function actualInsertIntoHeap(n, heap) {
27
- const parentHeight = (n.s?.Z ? n.s._?.e : n.s?.e) ?? -1;
28
- if (parentHeight >= n.e)
29
- n.e = parentHeight + 1;
30
- const height = n.e;
31
- const heapAtHeight = heap.o[height];
27
+ const parentHeight = (n.q?._ ? n.q.$?.c : n.q?.c) ?? -1;
28
+ if (parentHeight >= n.c)
29
+ n.c = parentHeight + 1;
30
+ const height = n.c;
31
+ const heapAtHeight = heap.p[height];
32
32
  if (heapAtHeight === void 0) {
33
- heap.o[height] = n;
33
+ heap.p[height] = n;
34
34
  } else {
35
35
  const tail = heapAtHeight.x;
36
- tail.O = n;
36
+ tail.P = n;
37
37
  n.x = tail;
38
38
  heapAtHeight.x = n;
39
39
  }
@@ -65,29 +65,29 @@ function deleteFromHeap(n, heap) {
65
65
  if (!(flags & (8 /* InHeap */ | 16 /* InHeapHeight */)))
66
66
  return;
67
67
  n.b = flags & ~(8 /* InHeap */ | 16 /* InHeapHeight */);
68
- const height = n.e;
68
+ const height = n.c;
69
69
  if (n.x === n) {
70
- heap.o[height] = void 0;
70
+ heap.p[height] = void 0;
71
71
  } else {
72
- const next = n.O;
73
- const dhh = heap.o[height];
72
+ const next = n.P;
73
+ const dhh = heap.p[height];
74
74
  const end = next ?? dhh;
75
75
  if (n === dhh) {
76
- heap.o[height] = next;
76
+ heap.p[height] = next;
77
77
  } else {
78
- n.x.O = next;
78
+ n.x.P = next;
79
79
  }
80
80
  end.x = n.x;
81
81
  }
82
82
  n.x = n;
83
- n.O = void 0;
83
+ n.P = void 0;
84
84
  }
85
85
  function markHeap(heap) {
86
- if (heap.$)
86
+ if (heap.aa)
87
87
  return;
88
- heap.$ = true;
88
+ heap.aa = true;
89
89
  for (let i = 0; i <= heap.J; i++) {
90
- for (let el = heap.o[i]; el !== void 0; el = el.O) {
90
+ for (let el = heap.p[i]; el !== void 0; el = el.P) {
91
91
  if (el.b & 8 /* InHeap */)
92
92
  markNode(el);
93
93
  }
@@ -98,48 +98,48 @@ function markNode(el, newState = 2 /* Dirty */) {
98
98
  if ((flags & (1 /* Check */ | 2 /* Dirty */)) >= newState)
99
99
  return;
100
100
  el.b = flags & ~(1 /* Check */ | 2 /* Dirty */) | newState;
101
- for (let link2 = el.p; link2 !== null; link2 = link2.y) {
102
- markNode(link2.m, 1 /* Check */);
101
+ for (let link2 = el.r; link2 !== null; link2 = link2.y) {
102
+ markNode(link2.j, 1 /* Check */);
103
103
  }
104
- if (el.aa !== null) {
105
- for (let child = el.aa; child !== null; child = child.qa) {
106
- for (let link2 = child.p; link2 !== null; link2 = link2.y) {
107
- markNode(link2.m, 1 /* Check */);
104
+ if (el.ba !== null) {
105
+ for (let child = el.ba; child !== null; child = child.ra) {
106
+ for (let link2 = child.r; link2 !== null; link2 = link2.y) {
107
+ markNode(link2.j, 1 /* Check */);
108
108
  }
109
109
  }
110
110
  }
111
111
  }
112
112
  function runHeap(heap, recompute2) {
113
- heap.$ = false;
114
- for (heap.t = 0; heap.t <= heap.J; heap.t++) {
115
- let el = heap.o[heap.t];
113
+ heap.aa = false;
114
+ for (heap.n = 0; heap.n <= heap.J; heap.n++) {
115
+ let el = heap.p[heap.n];
116
116
  while (el !== void 0) {
117
117
  if (el.b & 8 /* InHeap */)
118
118
  recompute2(el);
119
119
  else {
120
120
  adjustHeight(el, heap);
121
121
  }
122
- el = heap.o[heap.t];
122
+ el = heap.p[heap.n];
123
123
  }
124
124
  }
125
125
  heap.J = 0;
126
126
  }
127
127
  function adjustHeight(el, heap) {
128
128
  deleteFromHeap(el, heap);
129
- let newHeight = el.e;
129
+ let newHeight = el.c;
130
130
  for (let d = el.u; d; d = d.E) {
131
- const dep1 = d.P;
131
+ const dep1 = d.Q;
132
132
  const dep = "_owner" in dep1 ? dep1.z : dep1;
133
133
  if ("_fn" in dep) {
134
- if (dep.e >= newHeight) {
135
- newHeight = dep.e + 1;
134
+ if (dep.c >= newHeight) {
135
+ newHeight = dep.c + 1;
136
136
  }
137
137
  }
138
138
  }
139
- if (el.e !== newHeight) {
140
- el.e = newHeight;
141
- for (let s = el.p; s !== null; s = s.y) {
142
- insertIntoHeapHeight(s.m, heap);
139
+ if (el.c !== newHeight) {
140
+ el.c = newHeight;
141
+ for (let s = el.r; s !== null; s = s.y) {
142
+ insertIntoHeapHeight(s.j, heap);
143
143
  }
144
144
  }
145
145
  }
@@ -154,40 +154,40 @@ function schedule() {
154
154
  if (scheduled)
155
155
  return;
156
156
  scheduled = true;
157
- if (!globalQueue.ba)
157
+ if (!globalQueue.ca)
158
158
  queueMicrotask(flush);
159
159
  }
160
160
  var dirtyQueue = {
161
- o: new Array(2e3).fill(void 0),
162
- $: false,
163
- t: 0,
161
+ p: new Array(2e3).fill(void 0),
162
+ aa: false,
163
+ n: 0,
164
164
  J: 0
165
165
  };
166
166
  var zombieQueue = {
167
- o: new Array(2e3).fill(void 0),
168
- $: false,
169
- t: 0,
167
+ p: new Array(2e3).fill(void 0),
168
+ aa: false,
169
+ n: 0,
170
170
  J: 0
171
171
  };
172
172
  var Queue = class {
173
- s = null;
173
+ q = null;
174
174
  A = [[], []];
175
- Q = [];
175
+ R = [];
176
176
  created = clock;
177
177
  addChild(child) {
178
- this.Q.push(child);
179
- child.s = this;
178
+ this.R.push(child);
179
+ child.q = this;
180
180
  }
181
181
  removeChild(child) {
182
- const index = this.Q.indexOf(child);
182
+ const index = this.R.indexOf(child);
183
183
  if (index >= 0) {
184
- this.Q.splice(index, 1);
185
- child.s = null;
184
+ this.R.splice(index, 1);
185
+ child.q = null;
186
186
  }
187
187
  }
188
188
  notify(node, mask, flags) {
189
- if (this.s)
190
- return this.s.notify(node, mask, flags);
189
+ if (this.q)
190
+ return this.q.notify(node, mask, flags);
191
191
  return false;
192
192
  }
193
193
  run(type) {
@@ -196,8 +196,8 @@ var Queue = class {
196
196
  this.A[type - 1] = [];
197
197
  runQueue(effects, type);
198
198
  }
199
- for (let i = 0; i < this.Q.length; i++) {
200
- this.Q[i].run(type);
199
+ for (let i = 0; i < this.R.length; i++) {
200
+ this.R[i].run(type);
201
201
  }
202
202
  }
203
203
  enqueue(type, fn) {
@@ -207,19 +207,19 @@ var Queue = class {
207
207
  }
208
208
  };
209
209
  var GlobalQueue = class _GlobalQueue extends Queue {
210
- ba = false;
210
+ ca = false;
211
211
  h = [];
212
- static R;
213
- static ka;
212
+ static S;
213
+ static la;
214
214
  flush() {
215
- if (this.ba)
215
+ if (this.ca)
216
216
  return;
217
- this.ba = true;
217
+ this.ca = true;
218
218
  try {
219
- runHeap(dirtyQueue, _GlobalQueue.R);
219
+ runHeap(dirtyQueue, _GlobalQueue.S);
220
220
  if (activeTransition) {
221
221
  if (!transitionComplete(activeTransition)) {
222
- runHeap(zombieQueue, _GlobalQueue.R);
222
+ runHeap(zombieQueue, _GlobalQueue.S);
223
223
  globalQueue.h = [];
224
224
  activeTransition.queues[0].push(...globalQueue.A[0]);
225
225
  activeTransition.queues[1].push(...globalQueue.A[1]);
@@ -236,17 +236,17 @@ var GlobalQueue = class _GlobalQueue extends Queue {
236
236
  transitions.delete(activeTransition);
237
237
  activeTransition = null;
238
238
  if (runPending(globalQueue.h, false))
239
- runHeap(dirtyQueue, _GlobalQueue.R);
239
+ runHeap(dirtyQueue, _GlobalQueue.S);
240
240
  } else if (transitions.size)
241
- runHeap(zombieQueue, _GlobalQueue.R);
241
+ runHeap(zombieQueue, _GlobalQueue.S);
242
242
  for (let i = 0; i < globalQueue.h.length; i++) {
243
243
  const n = globalQueue.h[i];
244
- if (n.d !== NOT_PENDING) {
245
- n.g = n.d;
246
- n.d = NOT_PENDING;
244
+ if (n.e !== NOT_PENDING) {
245
+ n.g = n.e;
246
+ n.e = NOT_PENDING;
247
247
  }
248
248
  if (n.ha)
249
- _GlobalQueue.ka(n, false, true);
249
+ _GlobalQueue.la(n, false, true);
250
250
  }
251
251
  globalQueue.h.length = 0;
252
252
  clock++;
@@ -254,7 +254,7 @@ var GlobalQueue = class _GlobalQueue extends Queue {
254
254
  this.run(1 /* Render */);
255
255
  this.run(2 /* User */);
256
256
  } finally {
257
- this.ba = false;
257
+ this.ca = false;
258
258
  unobserved.length && notifyUnobserved();
259
259
  }
260
260
  }
@@ -272,7 +272,7 @@ var GlobalQueue = class _GlobalQueue extends Queue {
272
272
  if (activeTransition && activeTransition.time === clock)
273
273
  return;
274
274
  if (!activeTransition) {
275
- activeTransition = node.S ?? {
275
+ activeTransition = node.T ?? {
276
276
  time: clock,
277
277
  pendingNodes: [],
278
278
  asyncNodes: [],
@@ -283,7 +283,7 @@ var GlobalQueue = class _GlobalQueue extends Queue {
283
283
  activeTransition.time = clock;
284
284
  for (let i = 0; i < globalQueue.h.length; i++) {
285
285
  const n = globalQueue.h[i];
286
- n.S = activeTransition;
286
+ n.T = activeTransition;
287
287
  activeTransition.pendingNodes.push(n);
288
288
  }
289
289
  globalQueue.h = activeTransition.pendingNodes;
@@ -294,9 +294,9 @@ function runPending(pendingNodes, value) {
294
294
  const p = pendingNodes.slice();
295
295
  for (let i = 0; i < p.length; i++) {
296
296
  const n = p[i];
297
- n.S = activeTransition;
297
+ n.T = activeTransition;
298
298
  if (n.G) {
299
- n.G.ca(value);
299
+ n.G.da(value);
300
300
  needsReset = true;
301
301
  }
302
302
  }
@@ -325,15 +325,15 @@ function transitionComplete(transition) {
325
325
  function notifyUnobserved() {
326
326
  for (let i = 0; i < unobserved.length; i++) {
327
327
  const source = unobserved[i];
328
- if (!source.p)
329
- unobserved[i].ra?.();
328
+ if (!source.r)
329
+ unobserved[i].sa?.();
330
330
  }
331
331
  unobserved = [];
332
332
  }
333
333
 
334
334
  // src/core/core.ts
335
- GlobalQueue.R = recompute;
336
- GlobalQueue.ka = disposeChildren;
335
+ GlobalQueue.S = recompute;
336
+ GlobalQueue.la = disposeChildren;
337
337
  var tracking = false;
338
338
  var stale = false;
339
339
  var pendingValueCheck = false;
@@ -342,23 +342,23 @@ var context = null;
342
342
  var defaultContext = {};
343
343
  function recompute(el, create = false) {
344
344
  deleteFromHeap(el, el.b & 32 /* Zombie */ ? zombieQueue : dirtyQueue);
345
- if (el.d !== NOT_PENDING || el.T || el.U)
345
+ if (el.e !== NOT_PENDING || el.U || el.V)
346
346
  disposeChildren(el);
347
347
  else {
348
348
  markDisposal(el);
349
349
  globalQueue.h.push(el);
350
- el.U = el.q;
351
- el.T = el.n;
352
- el.q = null;
353
- el.n = null;
350
+ el.V = el.s;
351
+ el.U = el.o;
352
+ el.s = null;
353
+ el.o = null;
354
354
  }
355
355
  const oldcontext = context;
356
356
  context = el;
357
357
  el.H = null;
358
358
  el.b = 4 /* RecomputingDeps */;
359
- el.V = clock;
360
- let value = el.d === NOT_PENDING ? el.g : el.d;
361
- let oldHeight = el.e;
359
+ el.W = clock;
360
+ let value = el.e === NOT_PENDING ? el.g : el.e;
361
+ let oldHeight = el.c;
362
362
  let prevStatusFlags = el.f;
363
363
  let prevError = el.B;
364
364
  let prevTracking = tracking;
@@ -391,37 +391,37 @@ function recompute(el, create = false) {
391
391
  el.u = null;
392
392
  }
393
393
  }
394
- const valueChanged = !el.da || !el.da(el.d === NOT_PENDING ? el.g : el.d, value);
394
+ const valueChanged = !el.ea || !el.ea(el.e === NOT_PENDING ? el.g : el.e, value);
395
395
  const statusFlagsChanged = el.f !== prevStatusFlags || el.B !== prevError;
396
- el.la?.(statusFlagsChanged, prevStatusFlags);
396
+ el.ma?.(statusFlagsChanged, prevStatusFlags);
397
397
  if (valueChanged || statusFlagsChanged) {
398
398
  if (valueChanged) {
399
399
  if (create || el.ia || el.I)
400
400
  el.g = value;
401
401
  else {
402
- if (el.d === NOT_PENDING)
402
+ if (el.e === NOT_PENDING)
403
403
  globalQueue.h.push(el);
404
- el.d = value;
404
+ el.e = value;
405
405
  }
406
406
  if (el.C)
407
- el.C.ca(value);
407
+ el.C.da(value);
408
408
  }
409
- for (let s = el.p; s !== null; s = s.y) {
410
- const queue = s.m.b & 32 /* Zombie */ ? zombieQueue : dirtyQueue;
411
- if (s.m.e < el.e && queue.t > s.m.e)
412
- queue.t = s.m.e;
413
- insertIntoHeap(s.m, queue);
409
+ for (let s = el.r; s !== null; s = s.y) {
410
+ const queue = s.j.b & 32 /* Zombie */ ? zombieQueue : dirtyQueue;
411
+ if (s.j.c < el.c && queue.n > s.j.c)
412
+ queue.n = s.j.c;
413
+ insertIntoHeap(s.j, queue);
414
414
  }
415
- } else if (el.e != oldHeight) {
416
- for (let s = el.p; s !== null; s = s.y) {
417
- insertIntoHeapHeight(s.m, s.m.b & 32 /* Zombie */ ? zombieQueue : dirtyQueue);
415
+ } else if (el.c != oldHeight) {
416
+ for (let s = el.r; s !== null; s = s.y) {
417
+ insertIntoHeapHeight(s.j, s.j.b & 32 /* Zombie */ ? zombieQueue : dirtyQueue);
418
418
  }
419
419
  }
420
420
  }
421
421
  function updateIfNecessary(el) {
422
422
  if (el.b & 1 /* Check */) {
423
423
  for (let d = el.u; d; d = d.E) {
424
- const dep1 = d.P;
424
+ const dep1 = d.Q;
425
425
  const dep = "_owner" in dep1 ? dep1.z : dep1;
426
426
  if ("_fn" in dep) {
427
427
  updateIfNecessary(dep);
@@ -437,45 +437,45 @@ function updateIfNecessary(el) {
437
437
  el.b = 0 /* None */;
438
438
  }
439
439
  function unlinkSubs(link2) {
440
- const dep = link2.P;
440
+ const dep = link2.Q;
441
441
  const nextDep = link2.E;
442
442
  const nextSub = link2.y;
443
- const prevSub = link2.ma;
443
+ const prevSub = link2.na;
444
444
  if (nextSub !== null) {
445
- nextSub.ma = prevSub;
445
+ nextSub.na = prevSub;
446
446
  } else {
447
- dep.W = prevSub;
447
+ dep.X = prevSub;
448
448
  }
449
449
  if (prevSub !== null) {
450
450
  prevSub.y = nextSub;
451
451
  } else {
452
- dep.p = nextSub;
452
+ dep.r = nextSub;
453
453
  }
454
454
  return nextDep;
455
455
  }
456
456
  function link(dep, sub) {
457
457
  const prevDep = sub.H;
458
- if (prevDep !== null && prevDep.P === dep) {
458
+ if (prevDep !== null && prevDep.Q === dep) {
459
459
  return;
460
460
  }
461
461
  let nextDep = null;
462
462
  const isRecomputing = sub.b & 4 /* RecomputingDeps */;
463
463
  if (isRecomputing) {
464
464
  nextDep = prevDep !== null ? prevDep.E : sub.u;
465
- if (nextDep !== null && nextDep.P === dep) {
465
+ if (nextDep !== null && nextDep.Q === dep) {
466
466
  sub.H = nextDep;
467
467
  return;
468
468
  }
469
469
  }
470
- const prevSub = dep.W;
471
- if (prevSub !== null && prevSub.m === sub && (!isRecomputing || isValidLink(prevSub, sub))) {
470
+ const prevSub = dep.X;
471
+ if (prevSub !== null && prevSub.j === sub && (!isRecomputing || isValidLink(prevSub, sub))) {
472
472
  return;
473
473
  }
474
- const newLink = sub.H = dep.W = {
475
- P: dep,
476
- m: sub,
474
+ const newLink = sub.H = dep.X = {
475
+ Q: dep,
476
+ j: sub,
477
477
  E: nextDep,
478
- ma: prevSub,
478
+ na: prevSub,
479
479
  y: null
480
480
  };
481
481
  if (prevDep !== null) {
@@ -486,7 +486,7 @@ function link(dep, sub) {
486
486
  if (prevSub !== null) {
487
487
  prevSub.y = newLink;
488
488
  } else {
489
- dep.p = newLink;
489
+ dep.r = newLink;
490
490
  }
491
491
  }
492
492
  function isValidLink(checkLink, sub) {
@@ -516,7 +516,7 @@ function clearStatusFlags(signal2) {
516
516
  setStatusFlags(signal2, 0 /* None */);
517
517
  }
518
518
  function markDisposal(el) {
519
- let child = el.n;
519
+ let child = el.o;
520
520
  while (child) {
521
521
  child.b |= 32 /* Zombie */;
522
522
  const inHeap = child.b & 8 /* InHeap */;
@@ -533,7 +533,7 @@ function disposeChildren(node, self = false, zombie) {
533
533
  return;
534
534
  if (self)
535
535
  node.b = 64 /* Disposed */;
536
- let child = zombie ? node.T : node.n;
536
+ let child = zombie ? node.U : node.o;
537
537
  while (child) {
538
538
  const nextChild = child.K;
539
539
  if (child.u) {
@@ -550,15 +550,15 @@ function disposeChildren(node, self = false, zombie) {
550
550
  child = nextChild;
551
551
  }
552
552
  if (zombie) {
553
- node.T = null;
553
+ node.U = null;
554
554
  } else {
555
- node.n = null;
555
+ node.o = null;
556
556
  node.K = null;
557
557
  }
558
558
  runDisposal(node, zombie);
559
559
  }
560
560
  function runDisposal(node, zombie) {
561
- let disposal = zombie ? node.U : node.q;
561
+ let disposal = zombie ? node.V : node.s;
562
562
  if (!disposal)
563
563
  return;
564
564
  if (Array.isArray(disposal)) {
@@ -569,20 +569,20 @@ function runDisposal(node, zombie) {
569
569
  } else {
570
570
  disposal.call(disposal);
571
571
  }
572
- zombie ? node.U = null : node.q = null;
572
+ zombie ? node.V = null : node.s = null;
573
573
  }
574
574
  function withOptions(obj, options) {
575
575
  obj.id = options?.id ?? (context?.id != null ? getNextChildId(context) : void 0);
576
- obj.da = options?.equals != null ? options.equals : isEqual;
577
- obj.xa = !!options?.pureWrite;
578
- obj.ra = options?.unobserved;
576
+ obj.ea = options?.equals != null ? options.equals : isEqual;
577
+ obj.ya = !!options?.pureWrite;
578
+ obj.sa = options?.unobserved;
579
579
  if (options?.ja)
580
580
  Object.assign(obj, options.ja);
581
581
  return obj;
582
582
  }
583
583
  function getNextChildId(owner) {
584
584
  if (owner.id != null)
585
- return formatId(owner.id, owner.na++);
585
+ return formatId(owner.id, owner.oa++);
586
586
  throw new Error("Cannot get child id from owner without an id");
587
587
  }
588
588
  function formatId(prefix, id) {
@@ -592,47 +592,47 @@ function formatId(prefix, id) {
592
592
  function computed(fn, initialValue, options) {
593
593
  const self = withOptions(
594
594
  {
595
- q: null,
595
+ s: null,
596
596
  i: globalQueue,
597
597
  D: defaultContext,
598
- na: 0,
598
+ oa: 0,
599
599
  ha: fn,
600
600
  g: initialValue,
601
- e: 0,
602
- aa: null,
603
- O: void 0,
601
+ c: 0,
602
+ ba: null,
603
+ P: void 0,
604
604
  x: null,
605
605
  u: null,
606
606
  H: null,
607
- p: null,
608
- W: null,
609
- s: context,
607
+ r: null,
608
+ X: null,
609
+ q: context,
610
610
  K: null,
611
- n: null,
611
+ o: null,
612
612
  b: 0 /* None */,
613
613
  f: 4 /* Uninitialized */,
614
- V: clock,
615
- d: NOT_PENDING,
616
- U: null,
617
- T: null
614
+ W: clock,
615
+ e: NOT_PENDING,
616
+ V: null,
617
+ U: null
618
618
  },
619
619
  options
620
620
  );
621
621
  self.x = self;
622
- const parent = context?.Z ? context._ : context;
622
+ const parent = context?._ ? context.$ : context;
623
623
  if (context) {
624
624
  context.i && (self.i = context.i);
625
625
  context.D && (self.D = context.D);
626
- const lastChild = context.n;
626
+ const lastChild = context.o;
627
627
  if (lastChild === null) {
628
- context.n = self;
628
+ context.o = self;
629
629
  } else {
630
630
  self.K = lastChild;
631
- context.n = self;
631
+ context.o = self;
632
632
  }
633
633
  }
634
634
  if (parent)
635
- self.e = parent.e + 1;
635
+ self.c = parent.c + 1;
636
636
  recompute(self, true);
637
637
  return self;
638
638
  }
@@ -685,7 +685,7 @@ function asyncComputed(asyncFn, initialValue, options) {
685
685
  throw new NotReadyError(context);
686
686
  };
687
687
  const self = computed(fn, initialValue, options);
688
- self.sa = () => {
688
+ self.ta = () => {
689
689
  refreshing = true;
690
690
  recompute(self);
691
691
  flush();
@@ -694,16 +694,16 @@ function asyncComputed(asyncFn, initialValue, options) {
694
694
  }
695
695
  function signal(v, options, firewall = null) {
696
696
  if (firewall !== null) {
697
- return firewall.aa = withOptions(
697
+ return firewall.ba = withOptions(
698
698
  {
699
699
  g: v,
700
- p: null,
701
- W: null,
700
+ r: null,
701
+ X: null,
702
702
  z: firewall,
703
- qa: firewall.aa,
703
+ ra: firewall.ba,
704
704
  f: 0 /* None */,
705
- V: clock,
706
- d: NOT_PENDING
705
+ W: clock,
706
+ e: NOT_PENDING
707
707
  },
708
708
  options
709
709
  );
@@ -711,11 +711,11 @@ function signal(v, options, firewall = null) {
711
711
  return withOptions(
712
712
  {
713
713
  g: v,
714
- p: null,
715
- W: null,
714
+ r: null,
715
+ X: null,
716
716
  f: 0 /* None */,
717
- V: clock,
718
- d: NOT_PENDING
717
+ W: clock,
718
+ e: NOT_PENDING
719
719
  },
720
720
  options
721
721
  );
@@ -736,30 +736,30 @@ function untrack(fn) {
736
736
  }
737
737
  function read(el) {
738
738
  let c = context;
739
- if (c?.Z)
740
- c = c._;
739
+ if (c?._)
740
+ c = c.$;
741
741
  if (c && tracking) {
742
742
  link(el, c);
743
743
  const owner = "_owner" in el ? el.z : el;
744
744
  if ("_fn" in owner) {
745
745
  const isZombie = el.b & 32 /* Zombie */;
746
- if (owner.e >= (isZombie ? zombieQueue.t : dirtyQueue.t)) {
746
+ if (owner.c >= (isZombie ? zombieQueue.n : dirtyQueue.n)) {
747
747
  markNode(c);
748
748
  markHeap(isZombie ? zombieQueue : dirtyQueue);
749
749
  updateIfNecessary(owner);
750
750
  }
751
- const height = owner.e;
752
- if (height >= c.e && el.s !== c) {
753
- c.e = height + 1;
751
+ const height = owner.c;
752
+ if (height >= c.c && el.q !== c) {
753
+ c.c = height + 1;
754
754
  }
755
755
  }
756
756
  }
757
757
  if (pendingCheck) {
758
- const pendingResult = (el.f & 1 /* Pending */) !== 0 || !!el.S || false;
758
+ const pendingResult = (el.f & 1 /* Pending */) !== 0 || !!el.T || false;
759
759
  if (!el.G) {
760
760
  el.G = signal(pendingResult);
761
761
  el.G.ia = true;
762
- el.G.ca = (v) => setSignal(el.G, v);
762
+ el.G.da = (v) => setSignal(el.G, v);
763
763
  }
764
764
  const prev = pendingCheck;
765
765
  pendingCheck = null;
@@ -770,10 +770,10 @@ function read(el) {
770
770
  if (pendingValueCheck) {
771
771
  if (!el.C) {
772
772
  el.C = signal(
773
- el.d === NOT_PENDING ? el.g : el.d
773
+ el.e === NOT_PENDING ? el.g : el.e
774
774
  );
775
775
  el.C.ia = true;
776
- el.C.ca = (v) => queueMicrotask(() => queueMicrotask(() => setSignal(el.C, v)));
776
+ el.C.da = (v) => queueMicrotask(() => queueMicrotask(() => setSignal(el.C, v)));
777
777
  }
778
778
  pendingValueCheck = false;
779
779
  try {
@@ -794,39 +794,42 @@ function read(el) {
794
794
  }
795
795
  }
796
796
  if (el.f & 2 /* Error */) {
797
- if (el.V < clock) {
797
+ if (el.W < clock) {
798
798
  recompute(el, true);
799
799
  return read(el);
800
800
  } else {
801
801
  throw el.B;
802
802
  }
803
803
  }
804
- return !c || el.d === NOT_PENDING || stale && !pendingCheck && el.S && activeTransition !== el.S ? el.g : el.d;
804
+ return !c || el.e === NOT_PENDING || stale && !pendingCheck && el.T && activeTransition !== el.T ? el.g : el.e;
805
805
  }
806
806
  function setSignal(el, v) {
807
807
  if (typeof v === "function") {
808
808
  v = v(
809
- el.d === NOT_PENDING ? el.g : el.d
809
+ el.e === NOT_PENDING ? el.g : el.e
810
810
  );
811
811
  }
812
- const valueChanged = !el.da || !el.da(el.d === NOT_PENDING ? el.g : el.d, v);
812
+ const valueChanged = !el.ea || !el.ea(el.e === NOT_PENDING ? el.g : el.e, v);
813
813
  if (!valueChanged && !el.f)
814
814
  return v;
815
815
  if (valueChanged) {
816
816
  if (el.ia)
817
817
  el.g = v;
818
818
  else {
819
- if (el.d === NOT_PENDING)
819
+ if (el.e === NOT_PENDING)
820
820
  globalQueue.h.push(el);
821
- el.d = v;
821
+ el.e = v;
822
822
  }
823
823
  if (el.C)
824
- el.C.ca(v);
824
+ el.C.da(v);
825
825
  }
826
826
  clearStatusFlags(el);
827
- el.V = clock;
828
- for (let link2 = el.p; link2 !== null; link2 = link2.y) {
829
- insertIntoHeap(link2.m, link2.m.b & 32 /* Zombie */ ? zombieQueue : dirtyQueue);
827
+ el.W = clock;
828
+ for (let s = el.r; s !== null; s = s.y) {
829
+ const queue = s.j.b & 32 /* Zombie */ ? zombieQueue : dirtyQueue;
830
+ if (queue.n > s.j.c)
831
+ queue.n = s.j.c;
832
+ insertIntoHeap(s.j, queue);
830
833
  }
831
834
  schedule();
832
835
  return v;
@@ -841,41 +844,41 @@ function onCleanup(fn) {
841
844
  if (!context)
842
845
  return fn;
843
846
  const node = context;
844
- if (!node.q) {
845
- node.q = fn;
846
- } else if (Array.isArray(node.q)) {
847
- node.q.push(fn);
847
+ if (!node.s) {
848
+ node.s = fn;
849
+ } else if (Array.isArray(node.s)) {
850
+ node.s.push(fn);
848
851
  } else {
849
- node.q = [node.q, fn];
852
+ node.s = [node.s, fn];
850
853
  }
851
854
  return fn;
852
855
  }
853
856
  function createOwner(options) {
854
857
  const parent = context;
855
858
  const owner = {
856
- Z: true,
857
- _: parent?.Z ? parent._ : parent,
858
- n: null,
859
+ _: true,
860
+ $: parent?._ ? parent.$ : parent,
861
+ o: null,
859
862
  K: null,
860
- q: null,
863
+ s: null,
861
864
  id: options?.id ?? (parent?.id != null ? getNextChildId(parent) : void 0),
862
865
  i: parent?.i ?? globalQueue,
863
866
  D: parent?.D || defaultContext,
864
- na: 0,
867
+ oa: 0,
868
+ V: null,
865
869
  U: null,
866
- T: null,
867
- s: parent,
870
+ q: parent,
868
871
  dispose(self = true) {
869
872
  disposeChildren(owner, self);
870
873
  }
871
874
  };
872
875
  if (parent) {
873
- const lastChild = parent.n;
876
+ const lastChild = parent.o;
874
877
  if (lastChild === null) {
875
- parent.n = owner;
878
+ parent.o = owner;
876
879
  } else {
877
880
  owner.K = lastChild;
878
- parent.n = owner;
881
+ parent.o = owner;
879
882
  }
880
883
  }
881
884
  return owner;
@@ -964,18 +967,18 @@ function effect(compute, effect2, error, initialValue, options) {
964
967
  const node = computed(compute, initialValue, {
965
968
  ...options,
966
969
  ja: {
967
- ea: true,
968
- oa: initialValue,
969
- ta: effect2,
970
- pa: error,
970
+ fa: true,
971
+ pa: initialValue,
972
+ ua: effect2,
973
+ qa: error,
971
974
  L: void 0,
972
975
  i: getOwner()?.i ?? globalQueue,
973
976
  I: options?.render ? 1 /* Render */ : 2 /* User */,
974
- la(statusFlagsChanged, prevStatusFlags) {
977
+ ma(statusFlagsChanged, prevStatusFlags) {
975
978
  if (initialized) {
976
979
  const errorChanged = this.f && this.f === prevStatusFlags && statusFlagsChanged;
977
- this.ea = !(this.f & 2 /* Error */) && !(this.f & 1 /* Pending */ & ~prevStatusFlags) && !errorChanged;
978
- if (this.ea)
980
+ this.fa = !(this.f & 2 /* Error */) && !(this.f & 1 /* Pending */ & ~prevStatusFlags) && !errorChanged;
981
+ if (this.fa)
979
982
  this.i.enqueue(this.I, runEffect.bind(this));
980
983
  }
981
984
  if (this.f & 2 /* Error */) {
@@ -983,7 +986,7 @@ function effect(compute, effect2, error, initialValue, options) {
983
986
  this.i.notify(this, 1 /* Pending */, 0);
984
987
  if (this.I === 2 /* User */) {
985
988
  try {
986
- return this.pa ? this.pa(error2, () => {
989
+ return this.qa ? this.qa(error2, () => {
987
990
  this.L?.();
988
991
  this.L = void 0;
989
992
  }) : console.error(error2);
@@ -1011,18 +1014,18 @@ function effect(compute, effect2, error, initialValue, options) {
1011
1014
  onCleanup(() => node.L?.());
1012
1015
  }
1013
1016
  function runEffect() {
1014
- if (!this.ea || this.b & 64 /* Disposed */)
1017
+ if (!this.fa || this.b & 64 /* Disposed */)
1015
1018
  return;
1016
1019
  this.L?.();
1017
1020
  this.L = void 0;
1018
1021
  try {
1019
- this.L = this.ta(this.g, this.oa);
1022
+ this.L = this.ua(this.g, this.pa);
1020
1023
  } catch (error) {
1021
1024
  if (!this.i.notify(this, 2 /* Error */, 2 /* Error */))
1022
1025
  throw error;
1023
1026
  } finally {
1024
- this.oa = this.g;
1025
- this.ea = false;
1027
+ this.pa = this.g;
1028
+ this.fa = false;
1026
1029
  }
1027
1030
  }
1028
1031
 
@@ -1053,7 +1056,7 @@ function createMemo(compute, value, options) {
1053
1056
  function createAsync(compute, value, options) {
1054
1057
  const node = asyncComputed(compute, value, options);
1055
1058
  const ret = read.bind(null, node);
1056
- ret.refresh = node.sa;
1059
+ ret.refresh = node.ta;
1057
1060
  return ret;
1058
1061
  }
1059
1062
  function createEffect(compute, effectFn, value, options) {
@@ -1366,7 +1369,7 @@ var storeTraps = {
1366
1369
  return desc.get.call(receiver);
1367
1370
  }
1368
1371
  if (Writing?.has(receiver)) {
1369
- let value2 = tracked && (overridden || !proxySource) ? tracked.d !== NOT_PENDING ? tracked.d : tracked.g : storeValue[property];
1372
+ let value2 = tracked && (overridden || !proxySource) ? tracked.e !== NOT_PENDING ? tracked.e : tracked.g : storeValue[property];
1370
1373
  value2 === $DELETED && (value2 = void 0);
1371
1374
  if (!isWrappable(value2))
1372
1375
  return value2;
@@ -1766,78 +1769,78 @@ function mapArray(list, map, options) {
1766
1769
  return createMemo(
1767
1770
  updateKeyedMap.bind({
1768
1771
  z: createOwner(),
1769
- j: 0,
1770
- ua: list,
1772
+ k: 0,
1773
+ va: list,
1771
1774
  F: [],
1772
1775
  M: map,
1773
- c: [],
1776
+ d: [],
1774
1777
  a: [],
1775
1778
  N: keyFn,
1776
- k: keyFn || options?.keyed === false ? [] : void 0,
1777
- l: map.length > 1 ? [] : void 0,
1778
- X: options?.fallback
1779
+ l: keyFn || options?.keyed === false ? [] : void 0,
1780
+ m: map.length > 1 ? [] : void 0,
1781
+ Y: options?.fallback
1779
1782
  })
1780
1783
  );
1781
1784
  }
1782
1785
  var pureOptions = { pureWrite: true };
1783
1786
  function updateKeyedMap() {
1784
- const newItems = this.ua() || [], newLen = newItems.length;
1787
+ const newItems = this.va() || [], newLen = newItems.length;
1785
1788
  newItems[$TRACK];
1786
1789
  runWithOwner(this.z, () => {
1787
- let i, j, mapper = this.k ? () => {
1788
- this.k[j] = signal(newItems[j], pureOptions);
1789
- this.l && (this.l[j] = signal(j, pureOptions));
1790
+ let i, j, mapper = this.l ? () => {
1791
+ this.l[j] = signal(newItems[j], pureOptions);
1792
+ this.m && (this.m[j] = signal(j, pureOptions));
1790
1793
  return this.M(
1791
- read.bind(null, this.k[j]),
1792
- this.l ? read.bind(null, this.l[j]) : void 0
1794
+ read.bind(null, this.l[j]),
1795
+ this.m ? read.bind(null, this.m[j]) : void 0
1793
1796
  );
1794
- } : this.l ? () => {
1797
+ } : this.m ? () => {
1795
1798
  const item = newItems[j];
1796
- this.l[j] = signal(j, pureOptions);
1799
+ this.m[j] = signal(j, pureOptions);
1797
1800
  return this.M(
1798
1801
  () => item,
1799
- read.bind(null, this.l[j])
1802
+ read.bind(null, this.m[j])
1800
1803
  );
1801
1804
  } : () => {
1802
1805
  const item = newItems[j];
1803
1806
  return this.M(() => item);
1804
1807
  };
1805
1808
  if (newLen === 0) {
1806
- if (this.j !== 0) {
1809
+ if (this.k !== 0) {
1807
1810
  this.z.dispose(false);
1808
1811
  this.a = [];
1809
1812
  this.F = [];
1810
- this.c = [];
1811
- this.j = 0;
1812
- this.k && (this.k = []);
1813
+ this.d = [];
1814
+ this.k = 0;
1813
1815
  this.l && (this.l = []);
1816
+ this.m && (this.m = []);
1814
1817
  }
1815
- if (this.X && !this.c[0]) {
1816
- this.c[0] = runWithOwner(
1818
+ if (this.Y && !this.d[0]) {
1819
+ this.d[0] = runWithOwner(
1817
1820
  this.a[0] = createOwner(),
1818
- this.X
1821
+ this.Y
1819
1822
  );
1820
1823
  }
1821
- } else if (this.j === 0) {
1824
+ } else if (this.k === 0) {
1822
1825
  if (this.a[0])
1823
1826
  this.a[0].dispose();
1824
- this.c = new Array(newLen);
1827
+ this.d = new Array(newLen);
1825
1828
  for (j = 0; j < newLen; j++) {
1826
1829
  this.F[j] = newItems[j];
1827
- this.c[j] = runWithOwner(this.a[j] = createOwner(), mapper);
1830
+ this.d[j] = runWithOwner(this.a[j] = createOwner(), mapper);
1828
1831
  }
1829
- this.j = newLen;
1832
+ this.k = newLen;
1830
1833
  } else {
1831
- let start, end, newEnd, item, key, newIndices, newIndicesNext, temp = new Array(newLen), tempNodes = new Array(newLen), tempRows = this.k ? new Array(newLen) : void 0, tempIndexes = this.l ? new Array(newLen) : void 0;
1832
- for (start = 0, end = Math.min(this.j, newLen); start < end && (this.F[start] === newItems[start] || this.k && compare(this.N, this.F[start], newItems[start])); start++) {
1833
- if (this.k)
1834
- setSignal(this.k[start], newItems[start]);
1834
+ 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;
1835
+ 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++) {
1836
+ if (this.l)
1837
+ setSignal(this.l[start], newItems[start]);
1835
1838
  }
1836
- for (end = this.j - 1, newEnd = newLen - 1; end >= start && newEnd >= start && (this.F[end] === newItems[newEnd] || this.k && compare(this.N, this.F[end], newItems[newEnd])); end--, newEnd--) {
1837
- temp[newEnd] = this.c[end];
1839
+ 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--) {
1840
+ temp[newEnd] = this.d[end];
1838
1841
  tempNodes[newEnd] = this.a[end];
1839
- tempRows && (tempRows[newEnd] = this.k[end]);
1840
- tempIndexes && (tempIndexes[newEnd] = this.l[end]);
1842
+ tempRows && (tempRows[newEnd] = this.l[end]);
1843
+ tempIndexes && (tempIndexes[newEnd] = this.m[end]);
1841
1844
  }
1842
1845
  newIndices = /* @__PURE__ */ new Map();
1843
1846
  newIndicesNext = new Array(newEnd + 1);
@@ -1853,10 +1856,10 @@ function updateKeyedMap() {
1853
1856
  key = this.N ? this.N(item) : item;
1854
1857
  j = newIndices.get(key);
1855
1858
  if (j !== void 0 && j !== -1) {
1856
- temp[j] = this.c[i];
1859
+ temp[j] = this.d[i];
1857
1860
  tempNodes[j] = this.a[i];
1858
- tempRows && (tempRows[j] = this.k[i]);
1859
- tempIndexes && (tempIndexes[j] = this.l[i]);
1861
+ tempRows && (tempRows[j] = this.l[i]);
1862
+ tempIndexes && (tempIndexes[j] = this.m[i]);
1860
1863
  j = newIndicesNext[j];
1861
1864
  newIndices.set(key, j);
1862
1865
  } else
@@ -1864,97 +1867,97 @@ function updateKeyedMap() {
1864
1867
  }
1865
1868
  for (j = start; j < newLen; j++) {
1866
1869
  if (j in temp) {
1867
- this.c[j] = temp[j];
1870
+ this.d[j] = temp[j];
1868
1871
  this.a[j] = tempNodes[j];
1869
1872
  if (tempRows) {
1870
- this.k[j] = tempRows[j];
1871
- setSignal(this.k[j], newItems[j]);
1873
+ this.l[j] = tempRows[j];
1874
+ setSignal(this.l[j], newItems[j]);
1872
1875
  }
1873
1876
  if (tempIndexes) {
1874
- this.l[j] = tempIndexes[j];
1875
- setSignal(this.l[j], j);
1877
+ this.m[j] = tempIndexes[j];
1878
+ setSignal(this.m[j], j);
1876
1879
  }
1877
1880
  } else {
1878
- this.c[j] = runWithOwner(this.a[j] = createOwner(), mapper);
1881
+ this.d[j] = runWithOwner(this.a[j] = createOwner(), mapper);
1879
1882
  }
1880
1883
  }
1881
- this.c = this.c.slice(0, this.j = newLen);
1884
+ this.d = this.d.slice(0, this.k = newLen);
1882
1885
  this.F = newItems.slice(0);
1883
1886
  }
1884
1887
  });
1885
- return this.c;
1888
+ return this.d;
1886
1889
  }
1887
1890
  function repeat(count, map, options) {
1888
1891
  return updateRepeat.bind({
1889
1892
  z: createOwner(),
1890
- j: 0,
1893
+ k: 0,
1891
1894
  w: 0,
1892
- va: count,
1895
+ wa: count,
1893
1896
  M: map,
1894
1897
  a: [],
1895
- c: [],
1896
- wa: options?.from,
1897
- X: options?.fallback
1898
+ d: [],
1899
+ xa: options?.from,
1900
+ Y: options?.fallback
1898
1901
  });
1899
1902
  }
1900
1903
  function updateRepeat() {
1901
- const newLen = this.va();
1902
- const from = this.wa?.() || 0;
1904
+ const newLen = this.wa();
1905
+ const from = this.xa?.() || 0;
1903
1906
  runWithOwner(this.z, () => {
1904
1907
  if (newLen === 0) {
1905
- if (this.j !== 0) {
1908
+ if (this.k !== 0) {
1906
1909
  this.z.dispose(false);
1907
1910
  this.a = [];
1908
- this.c = [];
1909
- this.j = 0;
1911
+ this.d = [];
1912
+ this.k = 0;
1910
1913
  }
1911
- if (this.X && !this.c[0]) {
1912
- this.c[0] = runWithOwner(
1914
+ if (this.Y && !this.d[0]) {
1915
+ this.d[0] = runWithOwner(
1913
1916
  this.a[0] = createOwner(),
1914
- this.X
1917
+ this.Y
1915
1918
  );
1916
1919
  }
1917
1920
  return;
1918
1921
  }
1919
1922
  const to = from + newLen;
1920
- const prevTo = this.w + this.j;
1921
- if (this.j === 0 && this.a[0])
1923
+ const prevTo = this.w + this.k;
1924
+ if (this.k === 0 && this.a[0])
1922
1925
  this.a[0].dispose();
1923
1926
  for (let i = to; i < prevTo; i++)
1924
1927
  this.a[i - this.w].dispose();
1925
1928
  if (this.w < from) {
1926
1929
  let i = this.w;
1927
- while (i < from && i < this.j)
1930
+ while (i < from && i < this.k)
1928
1931
  this.a[i++].dispose();
1929
1932
  this.a.splice(0, from - this.w);
1930
- this.c.splice(0, from - this.w);
1933
+ this.d.splice(0, from - this.w);
1931
1934
  } else if (this.w > from) {
1932
1935
  let i = prevTo - this.w - 1;
1933
1936
  let difference = this.w - from;
1934
- this.a.length = this.c.length = newLen;
1937
+ this.a.length = this.d.length = newLen;
1935
1938
  while (i >= difference) {
1936
1939
  this.a[i] = this.a[i - difference];
1937
- this.c[i] = this.c[i - difference];
1940
+ this.d[i] = this.d[i - difference];
1938
1941
  i--;
1939
1942
  }
1940
1943
  for (let i2 = 0; i2 < difference; i2++) {
1941
- this.c[i2] = runWithOwner(
1944
+ this.d[i2] = runWithOwner(
1942
1945
  this.a[i2] = createOwner(),
1943
1946
  () => this.M(i2 + from)
1944
1947
  );
1945
1948
  }
1946
1949
  }
1947
1950
  for (let i = prevTo; i < to; i++) {
1948
- this.c[i - from] = runWithOwner(
1951
+ this.d[i - from] = runWithOwner(
1949
1952
  this.a[i - from] = createOwner(),
1950
1953
  () => this.M(i)
1951
1954
  );
1952
1955
  }
1953
- this.c = this.c.slice(0, newLen);
1956
+ this.d = this.d.slice(0, newLen);
1954
1957
  this.w = from;
1955
- this.j = newLen;
1958
+ this.k = newLen;
1956
1959
  });
1957
- return this.c;
1960
+ return this.d;
1958
1961
  }
1959
1962
  function compare(key, a, b) {
1960
1963
  return key ? key(a) === key(b) : true;
@@ -1964,18 +1967,18 @@ function compare(key, a, b) {
1964
1967
  function boundaryComputed(fn, propagationMask) {
1965
1968
  const node = computed(fn, void 0, {
1966
1969
  ja: {
1967
- la() {
1970
+ ma() {
1968
1971
  let flags = this.f;
1969
- this.f &= ~this.Y;
1970
- if (this.Y & 1 /* Pending */ && !(this.f & 4 /* Uninitialized */)) {
1972
+ this.f &= ~this.Z;
1973
+ if (this.Z & 1 /* Pending */ && !(this.f & 4 /* Uninitialized */)) {
1971
1974
  flags &= ~1 /* Pending */;
1972
1975
  }
1973
- this.i.notify(this, this.Y, flags);
1976
+ this.i.notify(this, this.Z, flags);
1974
1977
  },
1975
- Y: propagationMask
1978
+ Z: propagationMask
1976
1979
  }
1977
1980
  });
1978
- node.Y = propagationMask;
1981
+ node.Z = propagationMask;
1979
1982
  return node;
1980
1983
  }
1981
1984
  function createBoundChildren(owner, fn, queue, mask) {
@@ -1988,20 +1991,20 @@ function createBoundChildren(owner, fn, queue, mask) {
1988
1991
  });
1989
1992
  }
1990
1993
  var ConditionalQueue = class extends Queue {
1991
- r;
1992
- fa = /* @__PURE__ */ new Set();
1994
+ t;
1995
+ ga = /* @__PURE__ */ new Set();
1993
1996
  h = /* @__PURE__ */ new Set();
1994
1997
  constructor(disabled) {
1995
1998
  super();
1996
- this.r = disabled;
1999
+ this.t = disabled;
1997
2000
  }
1998
2001
  run(type) {
1999
- if (!type || read(this.r))
2002
+ if (!type || read(this.t))
2000
2003
  return;
2001
2004
  return super.run(type);
2002
2005
  }
2003
2006
  notify(node, type, flags) {
2004
- if (read(this.r)) {
2007
+ if (read(this.t)) {
2005
2008
  if (type & 1 /* Pending */) {
2006
2009
  if (flags & 1 /* Pending */) {
2007
2010
  this.h.add(node);
@@ -2011,9 +2014,9 @@ var ConditionalQueue = class extends Queue {
2011
2014
  }
2012
2015
  if (type & 2 /* Error */) {
2013
2016
  if (flags & 2 /* Error */) {
2014
- this.fa.add(node);
2017
+ this.ga.add(node);
2015
2018
  type &= ~2 /* Error */;
2016
- } else if (this.fa.delete(node))
2019
+ } else if (this.ga.delete(node))
2017
2020
  type &= ~2 /* Error */;
2018
2021
  }
2019
2022
  }
@@ -2021,31 +2024,38 @@ var ConditionalQueue = class extends Queue {
2021
2024
  }
2022
2025
  };
2023
2026
  var CollectionQueue = class extends Queue {
2024
- ga;
2027
+ O;
2025
2028
  a = /* @__PURE__ */ new Set();
2026
- r = signal(false, { pureWrite: true });
2029
+ t = signal(false, { pureWrite: true });
2030
+ ka = false;
2027
2031
  constructor(type) {
2028
2032
  super();
2029
- this.ga = type;
2033
+ this.O = type;
2030
2034
  }
2031
2035
  run(type) {
2032
- if (!type || read(this.r))
2036
+ if (!type || read(this.t))
2033
2037
  return;
2034
2038
  return super.run(type);
2035
2039
  }
2040
+ enqueue(type, fn) {
2041
+ if (this.O & 1 /* Pending */ && this.ka) {
2042
+ return this.q?.enqueue(type, fn);
2043
+ }
2044
+ return super.enqueue(type, fn);
2045
+ }
2036
2046
  notify(node, type, flags) {
2037
- if (!(type & this.ga))
2047
+ if (!(type & this.O) || this.O & 1 /* Pending */ && this.ka)
2038
2048
  return super.notify(node, type, flags);
2039
- if (flags & this.ga) {
2049
+ if (flags & this.O) {
2040
2050
  this.a.add(node);
2041
2051
  if (this.a.size === 1)
2042
- setSignal(this.r, true);
2052
+ setSignal(this.t, true);
2043
2053
  } else if (this.a.size > 0) {
2044
2054
  this.a.delete(node);
2045
2055
  if (this.a.size === 0)
2046
- setSignal(this.r, false);
2056
+ setSignal(this.t, false);
2047
2057
  }
2048
- type &= ~this.ga;
2058
+ type &= ~this.O;
2049
2059
  return type ? super.notify(node, type, flags) : true;
2050
2060
  }
2051
2061
  };
@@ -2054,28 +2064,29 @@ function createBoundary(fn, condition) {
2054
2064
  const queue = new ConditionalQueue(computed(() => condition() === "hidden" /* HIDDEN */));
2055
2065
  const tree = createBoundChildren(owner, fn, queue, 0);
2056
2066
  computed(() => {
2057
- const disabled = read(queue.r);
2058
- tree.Y = disabled ? 2 /* Error */ | 1 /* Pending */ : 0;
2067
+ const disabled = read(queue.t);
2068
+ tree.Z = disabled ? 2 /* Error */ | 1 /* Pending */ : 0;
2059
2069
  if (!disabled) {
2060
2070
  queue.h.forEach(
2061
2071
  (node) => queue.notify(node, 1 /* Pending */, 1 /* Pending */)
2062
2072
  );
2063
- queue.fa.forEach((node) => queue.notify(node, 2 /* Error */, 2 /* Error */));
2073
+ queue.ga.forEach((node) => queue.notify(node, 2 /* Error */, 2 /* Error */));
2064
2074
  queue.h.clear();
2065
- queue.fa.clear();
2075
+ queue.ga.clear();
2066
2076
  }
2067
2077
  });
2068
- return () => read(queue.r) ? void 0 : read(tree);
2078
+ return () => read(queue.t) ? void 0 : read(tree);
2069
2079
  }
2070
2080
  function createCollectionBoundary(type, fn, fallback) {
2071
2081
  const owner = createOwner();
2072
2082
  const queue = new CollectionQueue(type);
2073
2083
  const tree = createBoundChildren(owner, fn, queue, type);
2074
2084
  const decision = computed(() => {
2075
- if (!read(queue.r)) {
2085
+ if (!read(queue.t)) {
2076
2086
  const resolved = read(tree);
2077
- if (!untrack(() => read(queue.r)))
2078
- return resolved;
2087
+ if (!untrack(() => read(queue.t)))
2088
+ queue.ka = true;
2089
+ return resolved;
2079
2090
  }
2080
2091
  return fallback(queue);
2081
2092
  });