@tanstack/solid-query-devtools 6.0.0-alpha.0 → 6.0.0-alpha.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.
@@ -1,8 +1,8 @@
1
1
  import { createRenderEffect, untrack as untrack$1, runWithOwner, sharedConfig } from 'solid-js';
2
2
 
3
- // ../../node_modules/.pnpm/@solidjs+web@2.0.0-beta.2_@solidjs+signals@0.12.0_solid-js@2.0.0-beta.2/node_modules/@solidjs/web/dist/web.js
3
+ // ../../node_modules/.pnpm/@solidjs+web@2.0.0-beta.4_@solidjs+signals@0.13.6_solid-js@2.0.0-beta.4/node_modules/@solidjs/web/dist/web.js
4
4
 
5
- // ../../node_modules/.pnpm/@solidjs+signals@0.12.0/node_modules/@solidjs/signals/dist/prod.js
5
+ // ../../node_modules/.pnpm/@solidjs+signals@0.13.6/node_modules/@solidjs/signals/dist/prod.js
6
6
  var NotReadyError = class extends Error {
7
7
  source;
8
8
  constructor(e) {
@@ -81,12 +81,12 @@ function deleteFromHeap(e, t) {
81
81
  }
82
82
  function runHeap(e, t) {
83
83
  e._ = false;
84
- for (e.N = 0; e.N <= e.R; e.N++) {
85
- let n = e.l[e.N];
84
+ for (e.P = 0; e.P <= e.R; e.P++) {
85
+ let n = e.l[e.P];
86
86
  while (n !== void 0) {
87
87
  if (n.O & REACTIVE_IN_HEAP) t(n);
88
88
  else adjustHeight(n, e);
89
- n = e.l[e.N];
89
+ n = e.l[e.P];
90
90
  }
91
91
  }
92
92
  e.R = 0;
@@ -95,8 +95,8 @@ function adjustHeight(e, t) {
95
95
  deleteFromHeap(e, t);
96
96
  let n = e.o;
97
97
  for (let t2 = e.C; t2; t2 = t2.D) {
98
- const e2 = t2.V;
99
- const i = e2.m || e2;
98
+ const e2 = t2.m;
99
+ const i = e2.V || e2;
100
100
  if (i.L && i.o >= n) n = i.o + 1;
101
101
  }
102
102
  if (e.o !== n) {
@@ -107,40 +107,100 @@ function adjustHeight(e, t) {
107
107
  }
108
108
  }
109
109
  var transitions = /* @__PURE__ */ new Set();
110
- var dirtyQueue = { l: new Array(2e3).fill(void 0), _: false, N: 0, R: 0 };
111
- var zombieQueue = { l: new Array(2e3).fill(void 0), _: false, N: 0, R: 0 };
110
+ var dirtyQueue = { l: new Array(2e3).fill(void 0), _: false, P: 0, R: 0 };
111
+ var zombieQueue = { l: new Array(2e3).fill(void 0), _: false, P: 0, R: 0 };
112
112
  var clock = 0;
113
113
  var activeTransition = null;
114
114
  var scheduled = false;
115
115
  var projectionWriteActive = false;
116
+ var stashedOptimisticReads = null;
116
117
  function runLaneEffects(e) {
117
118
  for (const t of activeLanes) {
118
- if (t.k || t.U.size > 0) continue;
119
- const n = t.W[e - 1];
119
+ if (t.U || t.k.size > 0) continue;
120
+ const n = t.G[e - 1];
120
121
  if (n.length) {
121
- t.W[e - 1] = [];
122
+ t.G[e - 1] = [];
122
123
  runQueue(n, e);
123
124
  }
124
125
  }
125
126
  }
127
+ function queueStashedOptimisticEffects(e) {
128
+ for (let t = e.I; t !== null; t = t.p) {
129
+ const e2 = t.h;
130
+ if (!e2.W) continue;
131
+ if (e2.W === EFFECT_TRACKED) {
132
+ if (!e2.H) {
133
+ e2.H = true;
134
+ e2.F.enqueue(EFFECT_USER, e2.M);
135
+ }
136
+ continue;
137
+ }
138
+ const n = e2.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
139
+ if (n.P > e2.o) n.P = e2.o;
140
+ insertIntoHeap(e2, n);
141
+ }
142
+ }
143
+ function mergeTransitionState(e, t) {
144
+ t.$ = e;
145
+ e.j.push(...t.j);
146
+ for (const n of activeLanes) {
147
+ if (n.K === t) n.K = e;
148
+ }
149
+ e.Y.push(...t.Y);
150
+ for (const n of t.Z) e.Z.add(n);
151
+ for (const n of t.B) {
152
+ if (!e.B.includes(n)) e.B.push(n);
153
+ }
154
+ }
155
+ function resolveOptimisticNodes(e) {
156
+ for (let t = 0; t < e.length; t++) {
157
+ const n = e[t];
158
+ n.q = void 0;
159
+ if (n.X !== NOT_PENDING) {
160
+ n.J = n.X;
161
+ n.X = NOT_PENDING;
162
+ }
163
+ const i = n.ee;
164
+ n.ee = NOT_PENDING;
165
+ if (i !== NOT_PENDING && n.J !== i) insertSubs(n, true);
166
+ n.K = null;
167
+ }
168
+ e.length = 0;
169
+ }
170
+ function cleanupCompletedLanes(e) {
171
+ for (const t of activeLanes) {
172
+ const n = e ? t.K === e : !t.K;
173
+ if (!n) continue;
174
+ if (!t.U) {
175
+ if (t.G[0].length) runQueue(t.G[0], EFFECT_RENDER);
176
+ if (t.G[1].length) runQueue(t.G[1], EFFECT_USER);
177
+ }
178
+ if (t.te.q === t) t.te.q = void 0;
179
+ t.k.clear();
180
+ t.G[0].length = 0;
181
+ t.G[1].length = 0;
182
+ activeLanes.delete(t);
183
+ signalLanes.delete(t.te);
184
+ }
185
+ }
126
186
  function schedule() {
127
187
  if (scheduled) return;
128
188
  scheduled = true;
129
- if (!globalQueue.H && !projectionWriteActive) queueMicrotask(flush);
189
+ if (!globalQueue.ne && !projectionWriteActive) queueMicrotask(flush);
130
190
  }
131
191
  var Queue = class {
132
192
  i = null;
133
- G = [[], []];
134
- M = [];
193
+ ie = [[], []];
194
+ re = [];
135
195
  created = clock;
136
196
  addChild(e) {
137
- this.M.push(e);
197
+ this.re.push(e);
138
198
  e.i = this;
139
199
  }
140
200
  removeChild(e) {
141
- const t = this.M.indexOf(e);
201
+ const t = this.re.indexOf(e);
142
202
  if (t >= 0) {
143
- this.M.splice(t, 1);
203
+ this.re.splice(t, 1);
144
204
  e.i = null;
145
205
  }
146
206
  }
@@ -149,107 +209,123 @@ var Queue = class {
149
209
  return false;
150
210
  }
151
211
  run(e) {
152
- if (this.G[e - 1].length) {
153
- const t = this.G[e - 1];
154
- this.G[e - 1] = [];
212
+ if (this.ie[e - 1].length) {
213
+ const t = this.ie[e - 1];
214
+ this.ie[e - 1] = [];
155
215
  runQueue(t, e);
156
216
  }
157
- for (let t = 0; t < this.M.length; t++) this.M[t].run?.(e);
217
+ for (let t = 0; t < this.re.length; t++) this.re[t].run?.(e);
158
218
  }
159
219
  enqueue(e, t) {
160
220
  if (e) {
161
221
  if (currentOptimisticLane) {
162
222
  const n = findLane(currentOptimisticLane);
163
- n.W[e - 1].push(t);
223
+ n.G[e - 1].push(t);
164
224
  } else {
165
- this.G[e - 1].push(t);
225
+ this.ie[e - 1].push(t);
166
226
  }
167
227
  }
168
228
  schedule();
169
229
  }
170
230
  stashQueues(e) {
171
- e.G[0].push(...this.G[0]);
172
- e.G[1].push(...this.G[1]);
173
- this.G = [[], []];
174
- for (let t = 0; t < this.M.length; t++) {
175
- let n = this.M[t];
176
- let i = e.M[t];
231
+ e.ie[0].push(...this.ie[0]);
232
+ e.ie[1].push(...this.ie[1]);
233
+ this.ie = [[], []];
234
+ for (let t = 0; t < this.re.length; t++) {
235
+ let n = this.re[t];
236
+ let i = e.re[t];
177
237
  if (!i) {
178
- i = { G: [[], []], M: [] };
179
- e.M[t] = i;
238
+ i = { ie: [[], []], re: [] };
239
+ e.re[t] = i;
180
240
  }
181
241
  n.stashQueues(i);
182
242
  }
183
243
  }
184
244
  restoreQueues(e) {
185
- this.G[0].push(...e.G[0]);
186
- this.G[1].push(...e.G[1]);
187
- for (let t = 0; t < e.M.length; t++) {
188
- const n = e.M[t];
189
- let i = this.M[t];
245
+ this.ie[0].push(...e.ie[0]);
246
+ this.ie[1].push(...e.ie[1]);
247
+ for (let t = 0; t < e.re.length; t++) {
248
+ const n = e.re[t];
249
+ let i = this.re[t];
190
250
  if (i) i.restoreQueues(n);
191
251
  }
192
252
  }
193
253
  };
194
254
  var GlobalQueue = class _GlobalQueue extends Queue {
195
- H = false;
196
- F = [];
197
- $ = [];
198
- j = /* @__PURE__ */ new Set();
199
- static K;
200
- static Y;
201
- static Z = null;
255
+ ne = false;
256
+ se = [];
257
+ Y = [];
258
+ Z = /* @__PURE__ */ new Set();
259
+ static oe;
260
+ static ue;
261
+ static ce = null;
202
262
  flush() {
203
- if (this.H) return;
204
- this.H = true;
263
+ if (this.ne) return;
264
+ this.ne = true;
205
265
  try {
206
- runHeap(dirtyQueue, _GlobalQueue.K);
266
+ runHeap(dirtyQueue, _GlobalQueue.oe);
207
267
  if (activeTransition) {
208
268
  const e = transitionComplete(activeTransition);
209
269
  if (!e) {
210
- let e2 = activeTransition;
211
- runHeap(zombieQueue, _GlobalQueue.K);
212
- this.F = [];
213
- this.$ = [];
214
- this.j = /* @__PURE__ */ new Set();
270
+ const e2 = activeTransition;
271
+ runHeap(zombieQueue, _GlobalQueue.oe);
272
+ this.se = [];
273
+ this.Y = [];
274
+ this.Z = /* @__PURE__ */ new Set();
215
275
  runLaneEffects(EFFECT_RENDER);
216
276
  runLaneEffects(EFFECT_USER);
217
- this.stashQueues(activeTransition.B);
277
+ this.stashQueues(e2.ae);
218
278
  clock++;
219
- scheduled = dirtyQueue.R >= dirtyQueue.N;
220
- reassignPendingTransition(activeTransition.F);
279
+ scheduled = dirtyQueue.R >= dirtyQueue.P;
280
+ reassignPendingTransition(e2.se);
221
281
  activeTransition = null;
222
- finalizePureQueue(null, true);
282
+ if (!e2.j.length && e2.Y.length) {
283
+ stashedOptimisticReads = /* @__PURE__ */ new Set();
284
+ for (let t2 = 0; t2 < e2.Y.length; t2++) {
285
+ const n = e2.Y[t2];
286
+ if (n.L || n.fe) continue;
287
+ stashedOptimisticReads.add(n);
288
+ queueStashedOptimisticEffects(n);
289
+ }
290
+ }
291
+ try {
292
+ finalizePureQueue(null, true);
293
+ } finally {
294
+ stashedOptimisticReads = null;
295
+ }
223
296
  return;
224
297
  }
225
- this.F !== activeTransition.F && this.F.push(...activeTransition.F);
226
- this.restoreQueues(activeTransition.B);
298
+ this.se !== activeTransition.se && this.se.push(...activeTransition.se);
299
+ this.restoreQueues(activeTransition.ae);
227
300
  transitions.delete(activeTransition);
228
301
  const t = activeTransition;
229
302
  activeTransition = null;
230
- reassignPendingTransition(this.F);
303
+ reassignPendingTransition(this.se);
231
304
  finalizePureQueue(t);
232
305
  } else {
233
- if (transitions.size) runHeap(zombieQueue, _GlobalQueue.K);
306
+ if (transitions.size) runHeap(zombieQueue, _GlobalQueue.oe);
234
307
  finalizePureQueue();
235
308
  }
236
309
  clock++;
237
- scheduled = dirtyQueue.R >= dirtyQueue.N;
310
+ scheduled = dirtyQueue.R >= dirtyQueue.P;
238
311
  runLaneEffects(EFFECT_RENDER);
239
312
  this.run(EFFECT_RENDER);
240
313
  runLaneEffects(EFFECT_USER);
241
314
  this.run(EFFECT_USER);
242
315
  } finally {
243
- this.H = false;
316
+ this.ne = false;
244
317
  }
245
318
  }
246
319
  notify(e, t, n, i) {
247
320
  if (t & STATUS_PENDING) {
248
321
  if (n & STATUS_PENDING) {
249
- const t2 = i !== void 0 ? i : e.X;
250
- if (activeTransition && t2 && !activeTransition.q.includes(t2.source)) {
251
- activeTransition.q.push(t2.source);
252
- schedule();
322
+ const t2 = i !== void 0 ? i : e.le;
323
+ if (activeTransition && t2) {
324
+ const e2 = t2.source;
325
+ if (!activeTransition.B.includes(e2)) {
326
+ activeTransition.B.push(e2);
327
+ schedule();
328
+ }
253
329
  }
254
330
  }
255
331
  return true;
@@ -259,58 +335,56 @@ var GlobalQueue = class _GlobalQueue extends Queue {
259
335
  initTransition(e) {
260
336
  if (e) e = currentTransition(e);
261
337
  if (e && e === activeTransition) return;
262
- if (!e && activeTransition && activeTransition.J === clock) return;
338
+ if (!e && activeTransition && activeTransition.Ee === clock) return;
263
339
  if (!activeTransition) {
264
340
  activeTransition = e ?? {
265
- J: clock,
266
- F: [],
267
- q: [],
268
- $: [],
269
- j: /* @__PURE__ */ new Set(),
270
- ee: [],
271
- B: { G: [[], []], M: [] },
272
- te: false
341
+ Ee: clock,
342
+ se: [],
343
+ B: [],
344
+ Y: [],
345
+ Z: /* @__PURE__ */ new Set(),
346
+ j: [],
347
+ ae: { ie: [[], []], re: [] },
348
+ $: false
273
349
  };
274
350
  } else if (e) {
275
351
  const t = activeTransition;
276
- t.te = e;
277
- e.ee.push(...t.ee);
278
- for (const n of activeLanes) {
279
- if (n.ne === t) n.ne = e;
280
- }
281
- e.$.push(...t.$);
282
- for (const n of t.j) {
283
- e.j.add(n);
284
- }
352
+ mergeTransitionState(e, t);
285
353
  transitions.delete(t);
286
354
  activeTransition = e;
287
355
  }
288
356
  transitions.add(activeTransition);
289
- activeTransition.J = clock;
290
- for (let e2 = 0; e2 < this.F.length; e2++) {
291
- const t = this.F[e2];
292
- t.ne = activeTransition;
293
- activeTransition.F.push(t);
357
+ activeTransition.Ee = clock;
358
+ if (this.se !== activeTransition.se) {
359
+ for (let e2 = 0; e2 < this.se.length; e2++) {
360
+ const t = this.se[e2];
361
+ t.K = activeTransition;
362
+ activeTransition.se.push(t);
363
+ }
364
+ this.se = activeTransition.se;
294
365
  }
295
- this.F = activeTransition.F;
296
- for (let e2 = 0; e2 < this.$.length; e2++) {
297
- const t = this.$[e2];
298
- t.ne = activeTransition;
299
- activeTransition.$.push(t);
366
+ if (this.Y !== activeTransition.Y) {
367
+ for (let e2 = 0; e2 < this.Y.length; e2++) {
368
+ const t = this.Y[e2];
369
+ t.K = activeTransition;
370
+ activeTransition.Y.push(t);
371
+ }
372
+ this.Y = activeTransition.Y;
300
373
  }
301
- this.$ = activeTransition.$;
302
374
  for (const e2 of activeLanes) {
303
- if (!e2.ne) e2.ne = activeTransition;
375
+ if (!e2.K) e2.K = activeTransition;
376
+ }
377
+ if (this.Z !== activeTransition.Z) {
378
+ for (const e2 of this.Z) activeTransition.Z.add(e2);
379
+ this.Z = activeTransition.Z;
304
380
  }
305
- for (const e2 of this.j) activeTransition.j.add(e2);
306
- this.j = activeTransition.j;
307
381
  }
308
382
  };
309
383
  function insertSubs(e, t = false) {
310
- const n = e.ie || currentOptimisticLane;
311
- const i = e.re !== void 0;
384
+ const n = e.q || currentOptimisticLane;
385
+ const i = e.Te !== void 0;
312
386
  for (let r = e.I; r !== null; r = r.p) {
313
- if (i && r.h.se) {
387
+ if (i && r.h.de) {
314
388
  r.h.O |= REACTIVE_SNAPSHOT_STALE;
315
389
  continue;
316
390
  }
@@ -319,89 +393,71 @@ function insertSubs(e, t = false) {
319
393
  assignOrMergeLane(r.h, n);
320
394
  } else if (t) {
321
395
  r.h.O |= REACTIVE_OPTIMISTIC_DIRTY;
322
- r.h.ie = void 0;
396
+ r.h.q = void 0;
323
397
  }
324
398
  const e2 = r.h;
325
- if (e2.oe === EFFECT_TRACKED) {
326
- if (!e2.ue) {
327
- e2.ue = true;
328
- e2.ce.enqueue(EFFECT_USER, e2.le);
399
+ if (e2.W === EFFECT_TRACKED) {
400
+ if (!e2.H) {
401
+ e2.H = true;
402
+ e2.F.enqueue(EFFECT_USER, e2.M);
329
403
  }
330
404
  continue;
331
405
  }
332
406
  const s = r.h.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
333
- if (s.N > r.h.o) s.N = r.h.o;
407
+ if (s.P > r.h.o) s.P = r.h.o;
334
408
  insertIntoHeap(r.h, s);
335
409
  }
336
410
  }
411
+ function commitPendingNodes() {
412
+ const e = globalQueue.se;
413
+ for (let t = 0; t < e.length; t++) {
414
+ const n = e[t];
415
+ if (n.X !== NOT_PENDING) {
416
+ n.J = n.X;
417
+ n.X = NOT_PENDING;
418
+ if (n.W && n.W !== EFFECT_TRACKED) n.H = true;
419
+ }
420
+ if (!(n.Se & STATUS_PENDING)) n.Se &= ~STATUS_UNINITIALIZED;
421
+ if (n.L) GlobalQueue.ue(n, false, true);
422
+ }
423
+ e.length = 0;
424
+ }
337
425
  function finalizePureQueue(e = null, t = false) {
338
- let n = !t;
426
+ const n = !t;
427
+ if (n) commitPendingNodes();
339
428
  if (!t) checkBoundaryChildren(globalQueue);
340
- if (dirtyQueue.R >= dirtyQueue.N) runHeap(dirtyQueue, GlobalQueue.K);
429
+ if (dirtyQueue.R >= dirtyQueue.P) runHeap(dirtyQueue, GlobalQueue.oe);
341
430
  if (n) {
342
- const t2 = globalQueue.F;
343
- for (let e2 = 0; e2 < t2.length; e2++) {
344
- const n3 = t2[e2];
345
- if (n3.ae !== NOT_PENDING) {
346
- n3.fe = n3.ae;
347
- n3.ae = NOT_PENDING;
348
- if (n3.oe && n3.oe !== EFFECT_TRACKED) n3.ue = true;
349
- }
350
- if (!(n3.Ee & STATUS_PENDING)) n3.Ee &= ~STATUS_UNINITIALIZED;
351
- if (n3.L) GlobalQueue.Y(n3, false, true);
352
- }
353
- t2.length = 0;
354
- const n2 = e ? e.$ : globalQueue.$;
355
- for (let e2 = 0; e2 < n2.length; e2++) {
356
- const t3 = n2[e2];
357
- const i2 = t3.ae;
358
- t3.ie = void 0;
359
- if (i2 !== NOT_PENDING && t3.fe !== i2) {
360
- t3.fe = i2;
361
- insertSubs(t3, true);
362
- }
363
- t3.ae = NOT_PENDING;
364
- t3.ne = null;
365
- }
366
- n2.length = 0;
367
- const i = e ? e.j : globalQueue.j;
368
- if (GlobalQueue.Z && i.size) {
369
- for (const e2 of i) {
370
- GlobalQueue.Z(e2);
431
+ commitPendingNodes();
432
+ resolveOptimisticNodes(e ? e.Y : globalQueue.Y);
433
+ const t2 = e ? e.Z : globalQueue.Z;
434
+ if (GlobalQueue.ce && t2.size) {
435
+ for (const e2 of t2) {
436
+ GlobalQueue.ce(e2);
371
437
  }
372
- i.clear();
438
+ t2.clear();
373
439
  schedule();
374
440
  }
375
- for (const t3 of activeLanes) {
376
- const n3 = e ? t3.ne === e : !t3.ne;
377
- if (!n3) continue;
378
- if (!t3.k) {
379
- if (t3.W[0].length) runQueue(t3.W[0], EFFECT_RENDER);
380
- if (t3.W[1].length) runQueue(t3.W[1], EFFECT_USER);
381
- }
382
- if (t3.Te.ie === t3) t3.Te.ie = void 0;
383
- t3.U.clear();
384
- t3.W[0].length = 0;
385
- t3.W[1].length = 0;
386
- activeLanes.delete(t3);
387
- signalLanes.delete(t3.Te);
388
- }
441
+ cleanupCompletedLanes(e);
389
442
  }
390
443
  }
391
444
  function checkBoundaryChildren(e) {
392
- for (const t of e.M) {
445
+ for (const t of e.re) {
393
446
  t.checkSources?.();
394
447
  checkBoundaryChildren(t);
395
448
  }
396
449
  }
397
450
  function reassignPendingTransition(e) {
398
451
  for (let t = 0; t < e.length; t++) {
399
- e[t].ne = activeTransition;
452
+ e[t].K = activeTransition;
400
453
  }
401
454
  }
402
455
  var globalQueue = new GlobalQueue();
403
456
  function flush() {
404
- while (scheduled) {
457
+ if (globalQueue.ne) {
458
+ return;
459
+ }
460
+ while (scheduled || activeTransition) {
405
461
  globalQueue.flush();
406
462
  }
407
463
  }
@@ -409,21 +465,30 @@ function runQueue(e, t) {
409
465
  for (let n = 0; n < e.length; n++) e[n](t);
410
466
  }
411
467
  function transitionComplete(e) {
412
- if (e.te) return true;
413
- if (e.ee.length) return false;
468
+ if (e.$) return true;
469
+ if (e.j.length) return false;
414
470
  let t = true;
415
- for (let n = 0; n < e.q.length; n++) {
416
- const i = e.q[n];
417
- if (i.Ee & STATUS_PENDING && i.X?.source === i) {
471
+ for (let n = 0; n < e.B.length; n++) {
472
+ const i = e.B[n];
473
+ if (i.Se & STATUS_PENDING && i.le?.source === i) {
418
474
  t = false;
419
475
  break;
420
476
  }
421
477
  }
422
- t && (e.te = true);
478
+ if (t) {
479
+ for (let n = 0; n < e.Y.length; n++) {
480
+ const i = e.Y[n];
481
+ if (hasActiveOverride(i) && "Se" in i && i.Se & STATUS_PENDING && i.le instanceof NotReadyError && i.le.source !== i) {
482
+ t = false;
483
+ break;
484
+ }
485
+ }
486
+ }
487
+ t && (e.$ = true);
423
488
  return t;
424
489
  }
425
490
  function currentTransition(e) {
426
- while (e.te && typeof e.te === "object") e = e.te;
491
+ while (e.$ && typeof e.$ === "object") e = e.$;
427
492
  return e;
428
493
  }
429
494
  function runInTransition(e, t) {
@@ -442,105 +507,198 @@ function getOrCreateLane(e) {
442
507
  if (t) {
443
508
  return findLane(t);
444
509
  }
445
- const n = e.de;
446
- const i = n?.ie ? findLane(n.ie) : null;
447
- t = { Te: e, U: /* @__PURE__ */ new Set(), W: [[], []], k: null, ne: activeTransition, Se: i };
510
+ const n = e.Re;
511
+ const i = n?.q ? findLane(n.q) : null;
512
+ t = { te: e, k: /* @__PURE__ */ new Set(), G: [[], []], U: null, K: activeTransition, Oe: i };
448
513
  signalLanes.set(e, t);
449
514
  activeLanes.add(t);
450
- e.Re = e.Oe || 0;
515
+ e._e = false;
451
516
  return t;
452
517
  }
453
518
  function findLane(e) {
454
- while (e.k) e = e.k;
519
+ while (e.U) e = e.U;
455
520
  return e;
456
521
  }
457
522
  function mergeLanes(e, t) {
458
523
  e = findLane(e);
459
524
  t = findLane(t);
460
525
  if (e === t) return e;
461
- t.k = e;
462
- for (const n of t.U) e.U.add(n);
463
- e.W[0].push(...t.W[0]);
464
- e.W[1].push(...t.W[1]);
526
+ t.U = e;
527
+ for (const n of t.k) e.k.add(n);
528
+ e.G[0].push(...t.G[0]);
529
+ e.G[1].push(...t.G[1]);
465
530
  return e;
466
531
  }
467
532
  function resolveLane(e) {
468
- const t = e.ie;
533
+ const t = e.q;
469
534
  if (!t) return void 0;
470
535
  const n = findLane(t);
471
536
  if (activeLanes.has(n)) return n;
472
- e.ie = void 0;
537
+ e.q = void 0;
473
538
  return void 0;
474
539
  }
540
+ function resolveTransition(e) {
541
+ return resolveLane(e)?.K ?? e.K;
542
+ }
475
543
  function hasActiveOverride(e) {
476
- return !!(e._e && e.ae !== NOT_PENDING);
544
+ return !!(e.ee !== void 0 && e.ee !== NOT_PENDING);
477
545
  }
478
546
  function assignOrMergeLane(e, t) {
479
547
  const n = findLane(t);
480
- const i = e.ie;
548
+ const i = e.q;
481
549
  if (i) {
482
- if (i.k) {
483
- e.ie = t;
550
+ if (i.U) {
551
+ e.q = t;
484
552
  return;
485
553
  }
486
554
  const r = findLane(i);
487
555
  if (activeLanes.has(r)) {
488
556
  if (r !== n && !hasActiveOverride(e)) {
489
- if (n.Se && findLane(n.Se) === r) {
490
- e.ie = t;
491
- } else if (r.Se && findLane(r.Se) === n) ;
557
+ if (n.Oe && findLane(n.Oe) === r) {
558
+ e.q = t;
559
+ } else if (r.Oe && findLane(r.Oe) === n) ;
492
560
  else mergeLanes(n, r);
493
561
  }
494
562
  return;
495
563
  }
496
564
  }
497
- e.ie = t;
565
+ e.q = t;
566
+ }
567
+ function addPendingSource(e, t) {
568
+ if (e.Ie === t || e.pe?.has(t)) return false;
569
+ if (!e.Ie) {
570
+ e.Ie = t;
571
+ return true;
572
+ }
573
+ if (!e.pe) {
574
+ e.pe = /* @__PURE__ */ new Set([e.Ie, t]);
575
+ } else {
576
+ e.pe.add(t);
577
+ }
578
+ e.Ie = void 0;
579
+ return true;
580
+ }
581
+ function removePendingSource(e, t) {
582
+ if (e.Ie) {
583
+ if (e.Ie !== t) return false;
584
+ e.Ie = void 0;
585
+ return true;
586
+ }
587
+ if (!e.pe?.delete(t)) return false;
588
+ if (e.pe.size === 1) {
589
+ e.Ie = e.pe.values().next().value;
590
+ e.pe = void 0;
591
+ } else if (e.pe.size === 0) {
592
+ e.pe = void 0;
593
+ }
594
+ return true;
595
+ }
596
+ function clearPendingSources(e) {
597
+ e.Ie = void 0;
598
+ e.pe?.clear();
599
+ e.pe = void 0;
600
+ }
601
+ function setPendingError(e, t, n) {
602
+ if (!t) {
603
+ e.le = null;
604
+ return;
605
+ }
606
+ if (n instanceof NotReadyError && n.source === t) {
607
+ e.le = n;
608
+ return;
609
+ }
610
+ const i = e.le;
611
+ if (!(i instanceof NotReadyError) || i.source !== t) {
612
+ e.le = new NotReadyError(t);
613
+ }
614
+ }
615
+ function forEachDependent(e, t) {
616
+ for (let n = e.I; n !== null; n = n.p) t(n.h);
617
+ for (let n = e.A; n !== null; n = n.N) {
618
+ for (let e2 = n.I; e2 !== null; e2 = e2.p) t(e2.h);
619
+ }
620
+ }
621
+ function settlePendingSource(e) {
622
+ let t = false;
623
+ const n = /* @__PURE__ */ new Set();
624
+ const settle = (i) => {
625
+ if (n.has(i) || !removePendingSource(i, e)) return;
626
+ n.add(i);
627
+ i.Ee = clock;
628
+ const r = i.Ie ?? i.pe?.values().next().value;
629
+ if (r) {
630
+ setPendingError(i, r);
631
+ updatePendingSignal(i);
632
+ } else {
633
+ i.Se &= ~STATUS_PENDING;
634
+ setPendingError(i);
635
+ updatePendingSignal(i);
636
+ if (i.he) {
637
+ if (i.W === EFFECT_TRACKED) {
638
+ const e2 = i;
639
+ if (!e2.H) {
640
+ e2.H = true;
641
+ e2.F.enqueue(EFFECT_USER, e2.M);
642
+ }
643
+ } else {
644
+ const e2 = i.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
645
+ if (e2.P > i.o) e2.P = i.o;
646
+ insertIntoHeap(i, e2);
647
+ }
648
+ t = true;
649
+ }
650
+ i.he = false;
651
+ }
652
+ forEachDependent(i, settle);
653
+ };
654
+ forEachDependent(e, settle);
655
+ if (t) schedule();
498
656
  }
499
657
  function handleAsync(e, t, n) {
500
658
  const i = typeof t === "object" && t !== null;
501
659
  const r = i && untrack(() => t[Symbol.asyncIterator]);
502
660
  const s = !r && i && untrack(() => typeof t.then === "function");
503
661
  if (!s && !r) {
504
- e.Ie = null;
662
+ e.Ae = null;
505
663
  return t;
506
664
  }
507
- e.Ie = t;
665
+ e.Ae = t;
508
666
  let o;
509
667
  const handleError = (n2) => {
510
- if (e.Ie !== t) return;
511
- globalQueue.initTransition(e.ne);
668
+ if (e.Ae !== t) return;
669
+ globalQueue.initTransition(resolveTransition(e));
512
670
  notifyStatus(e, n2 instanceof NotReadyError ? STATUS_PENDING : STATUS_ERROR, n2);
513
- e.J = clock;
671
+ e.Ee = clock;
514
672
  };
515
673
  const asyncWrite = (i2, r2) => {
516
- if (e.Ie !== t) return;
674
+ if (e.Ae !== t) return;
517
675
  if (e.O & (REACTIVE_DIRTY | REACTIVE_OPTIMISTIC_DIRTY)) return;
518
- globalQueue.initTransition(e.ne);
676
+ globalQueue.initTransition(resolveTransition(e));
519
677
  clearStatus(e);
520
678
  const s2 = resolveLane(e);
521
- if (s2) s2.U.delete(e);
522
- if (e._e) {
523
- const t2 = e.ae !== NOT_PENDING;
524
- if (e.L) e.ae = i2;
525
- if (!t2) {
526
- e.fe = i2;
679
+ if (s2) s2.k.delete(e);
680
+ if (e.ee !== void 0) {
681
+ if (e.ee !== void 0 && e.ee !== NOT_PENDING) e.X = i2;
682
+ else {
683
+ e.J = i2;
527
684
  insertSubs(e);
528
685
  }
529
- e.J = clock;
686
+ e.Ee = clock;
530
687
  } else if (s2) {
531
- const t2 = e.fe;
532
- const n2 = e.pe;
688
+ const t2 = e.J;
689
+ const n2 = e.Ne;
533
690
  if (!n2 || !n2(i2, t2)) {
534
- e.fe = i2;
535
- e.J = clock;
536
- if (e.he) {
537
- setSignal(e.he, i2);
691
+ e.J = i2;
692
+ e.Ee = clock;
693
+ if (e.Pe) {
694
+ setSignal(e.Pe, i2);
538
695
  }
539
696
  insertSubs(e, true);
540
697
  }
541
698
  } else {
542
699
  setSignal(e, () => i2);
543
700
  }
701
+ settlePendingSource(e);
544
702
  schedule();
545
703
  flush();
546
704
  r2?.();
@@ -560,7 +718,7 @@ function handleAsync(e, t, n) {
560
718
  );
561
719
  i2 = false;
562
720
  if (!n2) {
563
- globalQueue.initTransition(e.ne);
721
+ globalQueue.initTransition(resolveTransition(e));
564
722
  throw new NotReadyError(context);
565
723
  }
566
724
  }
@@ -594,93 +752,66 @@ function handleAsync(e, t, n) {
594
752
  };
595
753
  const r2 = iterate();
596
754
  if (!i2 && !r2) {
597
- globalQueue.initTransition(e.ne);
755
+ globalQueue.initTransition(resolveTransition(e));
598
756
  throw new NotReadyError(context);
599
757
  }
600
758
  }
601
759
  return o;
602
760
  }
603
- function clearStatus(e) {
604
- e.Ee = e.Ee & STATUS_UNINITIALIZED;
605
- e.X = null;
761
+ function clearStatus(e, t = false) {
762
+ clearPendingSources(e);
763
+ e.he = false;
764
+ e.Se = t ? 0 : e.Se & STATUS_UNINITIALIZED;
765
+ setPendingError(e);
606
766
  updatePendingSignal(e);
607
- e.Ae?.();
767
+ e.ge?.();
608
768
  }
609
769
  function notifyStatus(e, t, n, i, r) {
610
770
  if (t === STATUS_ERROR && !(n instanceof StatusError) && !(n instanceof NotReadyError))
611
771
  n = new StatusError(e, n);
612
- const s = n instanceof NotReadyError && n.source === e;
613
- const o = t === STATUS_PENDING && e._e && !s;
614
- const u = o && hasActiveOverride(e);
772
+ const s = t === STATUS_PENDING && n instanceof NotReadyError ? n.source : void 0;
773
+ const o = s === e;
774
+ const u = t === STATUS_PENDING && e.ee !== void 0 && !o;
775
+ const c = u && hasActiveOverride(e);
615
776
  if (!i) {
616
- e.Ee = t | (t !== STATUS_ERROR ? e.Ee & STATUS_UNINITIALIZED : 0);
617
- e.X = n;
777
+ if (t === STATUS_PENDING && s) {
778
+ addPendingSource(e, s);
779
+ e.Se = STATUS_PENDING | e.Se & STATUS_UNINITIALIZED;
780
+ setPendingError(e, s, n);
781
+ } else {
782
+ clearPendingSources(e);
783
+ e.Se = t | (t !== STATUS_ERROR ? e.Se & STATUS_UNINITIALIZED : 0);
784
+ e.le = n;
785
+ }
618
786
  updatePendingSignal(e);
619
787
  }
620
788
  if (r && !i) {
621
789
  assignOrMergeLane(e, r);
622
790
  }
623
- if (u && activeTransition && n instanceof NotReadyError) {
624
- const e2 = n.source;
625
- if (!activeTransition.q.includes(e2)) {
626
- activeTransition.q.push(e2);
791
+ const a = i || c;
792
+ const f = i || u ? void 0 : r;
793
+ if (e.ge) {
794
+ if (i && t === STATUS_PENDING) {
795
+ return;
627
796
  }
628
- }
629
- const c = i || u;
630
- const l = i || o ? void 0 : r;
631
- if (e.Ae) {
632
- if (c) {
633
- e.Ae(t, n);
797
+ if (a) {
798
+ e.ge(t, n);
634
799
  } else {
635
- e.Ae();
800
+ e.ge();
636
801
  }
637
802
  return;
638
803
  }
639
- for (let i2 = e.I; i2 !== null; i2 = i2.p) {
640
- i2.h.J = clock;
641
- if (i2.h.X !== n) {
642
- !i2.h.ne && globalQueue.F.push(i2.h);
643
- notifyStatus(i2.h, t, n, c, l);
644
- }
645
- }
646
- for (let i2 = e.A; i2 !== null; i2 = i2.P) {
647
- for (let e2 = i2.I; e2 !== null; e2 = e2.p) {
648
- e2.h.J = clock;
649
- if (e2.h.X !== n) {
650
- !e2.h.ne && globalQueue.F.push(e2.h);
651
- notifyStatus(e2.h, t, n, c, l);
652
- }
653
- }
654
- }
655
- }
656
- function unlinkSubs(e) {
657
- const t = e.V;
658
- const n = e.D;
659
- const i = e.p;
660
- const r = e.Pe;
661
- if (i !== null) i.Pe = r;
662
- else t.Ne = r;
663
- if (r !== null) r.p = i;
664
- else {
665
- t.I = i;
666
- if (i === null) {
667
- t.ge?.();
668
- t.L && !t.Ce && !(t.O & REACTIVE_ZOMBIE) && unobserved(t);
804
+ forEachDependent(e, (e2) => {
805
+ e2.Ee = clock;
806
+ if (t === STATUS_PENDING && s && e2.Ie !== s && !e2.pe?.has(s) || t !== STATUS_PENDING && (e2.le !== n || e2.Ie || e2.pe)) {
807
+ if (!a && !e2.K) globalQueue.se.push(e2);
808
+ notifyStatus(e2, t, n, a, f);
669
809
  }
670
- }
671
- return n;
672
- }
673
- function unobserved(e) {
674
- deleteFromHeap(e, e.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
675
- let t = e.C;
676
- while (t !== null) {
677
- t = unlinkSubs(t);
678
- }
679
- e.C = null;
680
- disposeChildren(e, true);
810
+ });
681
811
  }
812
+ var externalSourceConfig = null;
682
813
  function markDisposal(e) {
683
- let t = e.De;
814
+ let t = e.Ce;
684
815
  while (t) {
685
816
  t.O |= REACTIVE_ZOMBIE;
686
817
  if (t.O & REACTIVE_IN_HEAP) {
@@ -688,15 +819,15 @@ function markDisposal(e) {
688
819
  insertIntoHeap(t, zombieQueue);
689
820
  }
690
821
  markDisposal(t);
691
- t = t.ve;
822
+ t = t.De;
692
823
  }
693
824
  }
694
825
  function disposeChildren(e, t = false, n) {
695
826
  if (e.O & REACTIVE_DISPOSED) return;
696
827
  if (t) e.O = REACTIVE_DISPOSED;
697
- let i = n ? e.be : e.De;
828
+ let i = n ? e.me : e.Ce;
698
829
  while (i) {
699
- const e2 = i.ve;
830
+ const e2 = i.De;
700
831
  if (i.C) {
701
832
  const e3 = i;
702
833
  deleteFromHeap(e3, e3.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
@@ -711,16 +842,15 @@ function disposeChildren(e, t = false, n) {
711
842
  i = e2;
712
843
  }
713
844
  if (n) {
714
- e.be = null;
845
+ e.me = null;
715
846
  } else {
716
- e.De = null;
717
- e.ve = null;
718
- e.we = 0;
847
+ e.Ce = null;
848
+ e.ve = 0;
719
849
  }
720
850
  runDisposal(e, n);
721
851
  }
722
852
  function runDisposal(e, t) {
723
- let n = t ? e.Ve : e.me;
853
+ let n = t ? e.we : e.be;
724
854
  if (!n) return;
725
855
  if (Array.isArray(n)) {
726
856
  for (let e2 = 0; e2 < n.length; e2++) {
@@ -730,41 +860,67 @@ function runDisposal(e, t) {
730
860
  } else {
731
861
  n.call(n);
732
862
  }
733
- t ? e.Ve = null : e.me = null;
863
+ t ? e.we = null : e.be = null;
734
864
  }
735
- GlobalQueue.K = recompute;
736
- GlobalQueue.Y = disposeChildren;
865
+ function unlinkSubs(e) {
866
+ const t = e.m;
867
+ const n = e.D;
868
+ const i = e.p;
869
+ const r = e.Ue;
870
+ if (i !== null) i.Ue = r;
871
+ else t.ke = r;
872
+ if (r !== null) r.p = i;
873
+ else {
874
+ t.I = i;
875
+ if (i === null) {
876
+ t.Ge?.();
877
+ t.L && !t.xe && !(t.O & REACTIVE_ZOMBIE) && unobserved(t);
878
+ }
879
+ }
880
+ return n;
881
+ }
882
+ function unobserved(e) {
883
+ deleteFromHeap(e, e.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
884
+ let t = e.C;
885
+ while (t !== null) {
886
+ t = unlinkSubs(t);
887
+ }
888
+ e.C = null;
889
+ disposeChildren(e, true);
890
+ }
891
+ GlobalQueue.oe = recompute;
892
+ GlobalQueue.ue = disposeChildren;
737
893
  var tracking = false;
738
894
  var context = null;
739
895
  var currentOptimisticLane = null;
740
896
  function recompute(e, t = false) {
741
- const n = e.oe;
897
+ const n = e.W;
742
898
  if (!t) {
743
- if (e.ne && (!n || activeTransition) && activeTransition !== e.ne)
744
- globalQueue.initTransition(e.ne);
899
+ if (e.K && (!n || activeTransition) && activeTransition !== e.K)
900
+ globalQueue.initTransition(e.K);
745
901
  deleteFromHeap(e, e.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
746
- if (e.ne || n === EFFECT_TRACKED) disposeChildren(e);
902
+ if (e.K || n === EFFECT_TRACKED) disposeChildren(e);
747
903
  else {
748
904
  markDisposal(e);
749
- e.Ve = e.me;
750
- e.be = e.De;
751
- e.me = null;
752
- e.De = null;
753
- e.we = 0;
905
+ e.we = e.be;
906
+ e.me = e.Ce;
907
+ e.be = null;
908
+ e.Ce = null;
909
+ e.ve = 0;
754
910
  }
755
911
  }
756
912
  const i = !!(e.O & REACTIVE_OPTIMISTIC_DIRTY);
757
- const r = hasActiveOverride(e);
758
- const s = !!(e.Ee & STATUS_PENDING);
913
+ const r = e.ee !== void 0 && e.ee !== NOT_PENDING;
914
+ const s = !!(e.Se & STATUS_PENDING);
759
915
  const o = context;
760
916
  context = e;
761
917
  e.ye = null;
762
918
  e.O = REACTIVE_RECOMPUTING_DEPS;
763
- e.J = clock;
764
- let u = e.ae === NOT_PENDING ? e.fe : e.ae;
919
+ e.Ee = clock;
920
+ let u = e.X === NOT_PENDING ? e.J : e.X;
765
921
  let c = e.o;
766
- let l = tracking;
767
- let a = currentOptimisticLane;
922
+ let a = tracking;
923
+ let f = currentOptimisticLane;
768
924
  tracking = true;
769
925
  if (i) {
770
926
  const t2 = resolveLane(e);
@@ -772,148 +928,153 @@ function recompute(e, t = false) {
772
928
  }
773
929
  try {
774
930
  u = handleAsync(e, e.L(u));
775
- clearStatus(e);
776
- const t2 = resolveLane(e);
777
- if (t2) {
778
- t2.U.delete(e);
779
- updatePendingSignal(t2.Te);
931
+ clearStatus(e, t);
932
+ const n2 = resolveLane(e);
933
+ if (n2) {
934
+ n2.k.delete(e);
935
+ updatePendingSignal(n2.te);
780
936
  }
781
937
  } catch (t2) {
782
938
  if (t2 instanceof NotReadyError && currentOptimisticLane) {
783
939
  const t3 = findLane(currentOptimisticLane);
784
- if (t3.Te !== e) {
785
- t3.U.add(e);
786
- e.ie = t3;
787
- updatePendingSignal(t3.Te);
940
+ if (t3.te !== e) {
941
+ t3.k.add(e);
942
+ e.q = t3;
943
+ updatePendingSignal(t3.te);
788
944
  }
789
945
  }
946
+ if (t2 instanceof NotReadyError) e.he = true;
790
947
  notifyStatus(
791
948
  e,
792
949
  t2 instanceof NotReadyError ? STATUS_PENDING : STATUS_ERROR,
793
950
  t2,
794
951
  void 0,
795
- t2 instanceof NotReadyError ? e.ie : void 0
952
+ t2 instanceof NotReadyError ? e.q : void 0
796
953
  );
797
954
  } finally {
798
- tracking = l;
955
+ tracking = a;
799
956
  e.O = REACTIVE_NONE | (t ? e.O & REACTIVE_SNAPSHOT_STALE : 0);
800
957
  context = o;
801
958
  }
802
- if (!e.X) {
959
+ if (!e.le) {
803
960
  const o2 = e.ye;
804
- let l2 = o2 !== null ? o2.D : e.C;
805
- if (l2 !== null) {
961
+ let a2 = o2 !== null ? o2.D : e.C;
962
+ if (a2 !== null) {
806
963
  do {
807
- l2 = unlinkSubs(l2);
808
- } while (l2 !== null);
964
+ a2 = unlinkSubs(a2);
965
+ } while (a2 !== null);
809
966
  if (o2 !== null) o2.D = null;
810
967
  else e.C = null;
811
968
  }
812
- const a2 = r ? e.fe : e.ae === NOT_PENDING ? e.fe : e.ae;
813
- const f = !e.pe || !e.pe(a2, u);
814
- if (f) {
815
- const o3 = r ? e.fe : void 0;
816
- if (t || n && activeTransition !== e.ne || i) e.fe = u;
817
- else e.ae = u;
818
- if (r && !i && s) {
819
- const t2 = e.Oe || 0;
820
- const n2 = e.Re || 0;
821
- if (t2 <= n2) e.fe = u;
822
- }
823
- if (!r || i || e.fe !== o3) {
824
- insertSubs(e, i || r);
825
- }
969
+ const f2 = r ? e.ee : e.X === NOT_PENDING ? e.J : e.X;
970
+ const l = !e.Ne || !e.Ne(f2, u);
971
+ if (l) {
972
+ const o3 = r ? e.ee : void 0;
973
+ if (t || n && activeTransition !== e.K || i) {
974
+ e.J = u;
975
+ if (r && i) {
976
+ e.ee = u;
977
+ e.X = u;
978
+ }
979
+ } else e.X = u;
980
+ if (r && !i && s && !e._e) e.ee = u;
981
+ if (!r || i || e.ee !== o3) insertSubs(e, i || r);
826
982
  } else if (r) {
827
- e.ae = u;
983
+ e.X = u;
828
984
  } else if (e.o != c) {
829
985
  for (let t2 = e.I; t2 !== null; t2 = t2.p) {
830
986
  insertIntoHeapHeight(t2.h, t2.h.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
831
987
  }
832
988
  }
833
989
  }
834
- currentOptimisticLane = a;
835
- (!t || e.Ee & STATUS_PENDING) && !e.ne && !(activeTransition && e._e) && globalQueue.F.push(e);
836
- e.ne && n && activeTransition !== e.ne && runInTransition(e.ne, () => recompute(e));
990
+ currentOptimisticLane = f;
991
+ (!t || e.Se & STATUS_PENDING) && !e.K && !(activeTransition && r) && globalQueue.se.push(e);
992
+ e.K && n && activeTransition !== e.K && runInTransition(e.K, () => recompute(e));
837
993
  }
838
994
  function untrack(e, t) {
839
- if (!tracking && true) return e();
995
+ if (!externalSourceConfig && !tracking && true) return e();
840
996
  const n = tracking;
841
997
  tracking = false;
842
998
  try {
999
+ if (externalSourceConfig) return externalSourceConfig.untrack(e);
843
1000
  return e();
844
1001
  } finally {
845
1002
  tracking = n;
846
1003
  }
847
1004
  }
848
1005
  function setSignal(e, t) {
849
- if (e.ne && activeTransition !== e.ne) globalQueue.initTransition(e.ne);
850
- const n = e._e && !projectionWriteActive;
851
- const i = n ? e.fe : e.ae === NOT_PENDING ? e.fe : e.ae;
852
- if (typeof t === "function") t = t(i);
853
- const r = !e.pe || !e.pe(i, t) || !!(e.Ee & STATUS_UNINITIALIZED);
854
- if (!r) {
855
- if (n && e.ae !== NOT_PENDING && e.L) {
1006
+ if (e.K && activeTransition !== e.K) globalQueue.initTransition(e.K);
1007
+ const n = e.ee !== void 0 && !projectionWriteActive;
1008
+ const i = e.ee !== void 0 && e.ee !== NOT_PENDING;
1009
+ const r = n ? i ? e.ee : e.J : e.X === NOT_PENDING ? e.J : e.X;
1010
+ if (typeof t === "function") t = t(r);
1011
+ const s = !e.Ne || !e.Ne(r, t) || !!(e.Se & STATUS_UNINITIALIZED);
1012
+ if (!s) {
1013
+ if (n && i && e.L) {
856
1014
  insertSubs(e, true);
857
1015
  schedule();
858
1016
  }
859
1017
  return t;
860
1018
  }
861
1019
  if (n) {
862
- const n2 = globalQueue.$.includes(e);
863
- if (e.ne && n2) {
864
- globalQueue.initTransition(e.ne);
865
- }
866
- if (e.ae === NOT_PENDING) {
867
- e.ae = e.fe;
868
- }
869
- if (!n2) {
870
- globalQueue.$.push(e);
1020
+ const n2 = e.ee === NOT_PENDING;
1021
+ if (!n2) globalQueue.initTransition(resolveTransition(e));
1022
+ if (n2) {
1023
+ e.X = e.J;
1024
+ globalQueue.Y.push(e);
871
1025
  }
872
- e.Oe = (e.Oe || 0) + 1;
1026
+ e._e = true;
873
1027
  const i2 = getOrCreateLane(e);
874
- e.ie = i2;
875
- e.fe = t;
1028
+ e.q = i2;
1029
+ e.ee = t;
876
1030
  } else {
877
- if (e.ae === NOT_PENDING) globalQueue.F.push(e);
878
- e.ae = t;
1031
+ if (e.X === NOT_PENDING) globalQueue.se.push(e);
1032
+ e.X = t;
879
1033
  }
880
1034
  updatePendingSignal(e);
881
- if (e.he) {
882
- setSignal(e.he, t);
1035
+ if (e.Pe) {
1036
+ setSignal(e.Pe, t);
883
1037
  }
884
- e.J = clock;
1038
+ e.Ee = clock;
885
1039
  insertSubs(e, n);
886
1040
  schedule();
887
1041
  return t;
888
1042
  }
889
1043
  function computePendingState(e) {
890
1044
  const t = e;
891
- if (e._e && e.ae !== NOT_PENDING) {
892
- if (t.Ee & STATUS_PENDING && !(t.Ee & STATUS_UNINITIALIZED)) return true;
893
- if (e.de) {
894
- const t2 = e.ie ? findLane(e.ie) : null;
895
- return !!(t2 && t2.U.size > 0);
1045
+ const n = e.V;
1046
+ if (n && e.X !== NOT_PENDING) {
1047
+ return !n.Ae && !(n.Se & STATUS_PENDING);
1048
+ }
1049
+ if (e.ee !== void 0 && e.ee !== NOT_PENDING) {
1050
+ if (t.Se & STATUS_PENDING && !(t.Se & STATUS_UNINITIALIZED)) return true;
1051
+ if (e.Re) {
1052
+ const t2 = e.q ? findLane(e.q) : null;
1053
+ return !!(t2 && t2.k.size > 0);
896
1054
  }
897
1055
  return true;
898
1056
  }
899
- if (e.ae !== NOT_PENDING && !(t.Ee & STATUS_UNINITIALIZED)) return true;
900
- return !!(t.Ee & STATUS_PENDING && !(t.Ee & STATUS_UNINITIALIZED));
1057
+ if (e.ee !== void 0 && e.ee === NOT_PENDING && !e.Re) {
1058
+ return false;
1059
+ }
1060
+ if (e.X !== NOT_PENDING && !(t.Se & STATUS_UNINITIALIZED)) return true;
1061
+ return !!(t.Se & STATUS_PENDING && !(t.Se & STATUS_UNINITIALIZED));
901
1062
  }
902
1063
  function updatePendingSignal(e) {
903
- if (e.Me) {
1064
+ if (e.Qe) {
904
1065
  const t = computePendingState(e);
905
- const n = e.Me;
1066
+ const n = e.Qe;
906
1067
  setSignal(n, t);
907
- if (!t && n.ie) {
1068
+ if (!t && n.q) {
908
1069
  const t2 = resolveLane(e);
909
- if (t2 && t2.U.size > 0) {
910
- const e2 = findLane(n.ie);
1070
+ if (t2 && t2.k.size > 0) {
1071
+ const e2 = findLane(n.q);
911
1072
  if (e2 !== t2) {
912
1073
  mergeLanes(t2, e2);
913
1074
  }
914
1075
  }
915
1076
  signalLanes.delete(n);
916
- n.ie = void 0;
1077
+ n.q = void 0;
917
1078
  }
918
1079
  }
919
1080
  }
@@ -982,7 +1143,7 @@ Object.assign(
982
1143
  { DELETE }
983
1144
  );
984
1145
 
985
- // ../../node_modules/.pnpm/@solidjs+web@2.0.0-beta.2_@solidjs+signals@0.12.0_solid-js@2.0.0-beta.2/node_modules/@solidjs/web/dist/web.js
1146
+ // ../../node_modules/.pnpm/@solidjs+web@2.0.0-beta.4_@solidjs+signals@0.13.6_solid-js@2.0.0-beta.4/node_modules/@solidjs/web/dist/web.js
986
1147
  var effect = (fn, effectFn, initial) => createRenderEffect(fn, effectFn, initial, {
987
1148
  transparent: true
988
1149
  });