@solidjs/signals 0.12.0 → 0.13.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
@@ -82,10 +82,10 @@ function deleteFromHeap(e, t) {
82
82
  else {
83
83
  const n = e.S;
84
84
  const r = t.l[i];
85
- const s = n ?? r;
85
+ const o = n ?? r;
86
86
  if (e === r) t.l[i] = n;
87
87
  else e.T.S = n;
88
- s.T = e.T;
88
+ o.T = e.T;
89
89
  }
90
90
  e.T = e;
91
91
  e.S = undefined;
@@ -107,7 +107,7 @@ function markNode(e, t = REACTIVE_DIRTY) {
107
107
  markNode(t.h, REACTIVE_CHECK);
108
108
  }
109
109
  if (e.A !== null) {
110
- for (let t = e.A; t !== null; t = t.P) {
110
+ for (let t = e.A; t !== null; t = t.N) {
111
111
  for (let e = t.I; e !== null; e = e.p) {
112
112
  markNode(e.h, REACTIVE_CHECK);
113
113
  }
@@ -116,12 +116,12 @@ function markNode(e, t = REACTIVE_DIRTY) {
116
116
  }
117
117
  function runHeap(e, t) {
118
118
  e._ = false;
119
- for (e.N = 0; e.N <= e.R; e.N++) {
120
- let n = e.l[e.N];
119
+ for (e.P = 0; e.P <= e.R; e.P++) {
120
+ let n = e.l[e.P];
121
121
  while (n !== undefined) {
122
122
  if (n.O & REACTIVE_IN_HEAP) t(n);
123
123
  else adjustHeight(n, e);
124
- n = e.l[e.N];
124
+ n = e.l[e.P];
125
125
  }
126
126
  }
127
127
  e.R = 0;
@@ -130,8 +130,8 @@ function adjustHeight(e, t) {
130
130
  deleteFromHeap(e, t);
131
131
  let n = e.o;
132
132
  for (let t = e.C; t; t = t.D) {
133
- const e = t.V;
134
- const i = e.m || e;
133
+ const e = t.m;
134
+ const i = e.V || e;
135
135
  if (i.L && i.o >= n) n = i.o + 1;
136
136
  }
137
137
  if (e.o !== n) {
@@ -142,13 +142,13 @@ function adjustHeight(e, t) {
142
142
  }
143
143
  }
144
144
  const transitions = new Set();
145
- const dirtyQueue = { l: new Array(2e3).fill(undefined), _: false, N: 0, R: 0 };
146
- const zombieQueue = { l: new Array(2e3).fill(undefined), _: false, N: 0, R: 0 };
145
+ const dirtyQueue = { l: new Array(2e3).fill(undefined), _: false, P: 0, R: 0 };
146
+ const zombieQueue = { l: new Array(2e3).fill(undefined), _: false, P: 0, R: 0 };
147
147
  let clock = 0;
148
148
  let activeTransition = null;
149
149
  let scheduled = false;
150
150
  let projectionWriteActive = false;
151
- function setOnUnhandledAsync(e) {}
151
+ function enforceLoadingBoundary(e) {}
152
152
  function runLaneEffects(e) {
153
153
  for (const t of activeLanes) {
154
154
  if (t.k || t.U.size > 0) continue;
@@ -170,16 +170,16 @@ function schedule() {
170
170
  class Queue {
171
171
  i = null;
172
172
  G = [[], []];
173
- M = [];
173
+ F = [];
174
174
  created = clock;
175
175
  addChild(e) {
176
- this.M.push(e);
176
+ this.F.push(e);
177
177
  e.i = this;
178
178
  }
179
179
  removeChild(e) {
180
- const t = this.M.indexOf(e);
180
+ const t = this.F.indexOf(e);
181
181
  if (t >= 0) {
182
- this.M.splice(t, 1);
182
+ this.F.splice(t, 1);
183
183
  e.i = null;
184
184
  }
185
185
  }
@@ -193,7 +193,7 @@ class Queue {
193
193
  this.G[e - 1] = [];
194
194
  runQueue(t, e);
195
195
  }
196
- for (let t = 0; t < this.M.length; t++) this.M[t].run?.(e);
196
+ for (let t = 0; t < this.F.length; t++) this.F[t].run?.(e);
197
197
  }
198
198
  enqueue(e, t) {
199
199
  if (e) {
@@ -210,12 +210,12 @@ class Queue {
210
210
  e.G[0].push(...this.G[0]);
211
211
  e.G[1].push(...this.G[1]);
212
212
  this.G = [[], []];
213
- for (let t = 0; t < this.M.length; t++) {
214
- let n = this.M[t];
215
- let i = e.M[t];
213
+ for (let t = 0; t < this.F.length; t++) {
214
+ let n = this.F[t];
215
+ let i = e.F[t];
216
216
  if (!i) {
217
- i = { G: [[], []], M: [] };
218
- e.M[t] = i;
217
+ i = { G: [[], []], F: [] };
218
+ e.F[t] = i;
219
219
  }
220
220
  n.stashQueues(i);
221
221
  }
@@ -223,21 +223,21 @@ class Queue {
223
223
  restoreQueues(e) {
224
224
  this.G[0].push(...e.G[0]);
225
225
  this.G[1].push(...e.G[1]);
226
- for (let t = 0; t < e.M.length; t++) {
227
- const n = e.M[t];
228
- let i = this.M[t];
226
+ for (let t = 0; t < e.F.length; t++) {
227
+ const n = e.F[t];
228
+ let i = this.F[t];
229
229
  if (i) i.restoreQueues(n);
230
230
  }
231
231
  }
232
232
  }
233
233
  class GlobalQueue extends Queue {
234
234
  H = false;
235
- F = [];
235
+ M = [];
236
236
  $ = [];
237
237
  j = new Set();
238
238
  static K;
239
239
  static Y;
240
- static Z = null;
240
+ static B = null;
241
241
  flush() {
242
242
  if (this.H) return;
243
243
  this.H = true;
@@ -248,32 +248,32 @@ class GlobalQueue extends Queue {
248
248
  if (!e) {
249
249
  let e = activeTransition;
250
250
  runHeap(zombieQueue, GlobalQueue.K);
251
- this.F = [];
251
+ this.M = [];
252
252
  this.$ = [];
253
253
  this.j = new Set();
254
254
  runLaneEffects(EFFECT_RENDER);
255
255
  runLaneEffects(EFFECT_USER);
256
- this.stashQueues(activeTransition.B);
256
+ this.stashQueues(activeTransition.Z);
257
257
  clock++;
258
- scheduled = dirtyQueue.R >= dirtyQueue.N;
259
- reassignPendingTransition(activeTransition.F);
258
+ scheduled = dirtyQueue.R >= dirtyQueue.P;
259
+ reassignPendingTransition(activeTransition.M);
260
260
  activeTransition = null;
261
261
  finalizePureQueue(null, true);
262
262
  return;
263
263
  }
264
- this.F !== activeTransition.F && this.F.push(...activeTransition.F);
265
- this.restoreQueues(activeTransition.B);
264
+ this.M !== activeTransition.M && this.M.push(...activeTransition.M);
265
+ this.restoreQueues(activeTransition.Z);
266
266
  transitions.delete(activeTransition);
267
267
  const t = activeTransition;
268
268
  activeTransition = null;
269
- reassignPendingTransition(this.F);
269
+ reassignPendingTransition(this.M);
270
270
  finalizePureQueue(t);
271
271
  } else {
272
272
  if (transitions.size) runHeap(zombieQueue, GlobalQueue.K);
273
273
  finalizePureQueue();
274
274
  }
275
275
  clock++;
276
- scheduled = dirtyQueue.R >= dirtyQueue.N;
276
+ scheduled = dirtyQueue.R >= dirtyQueue.P;
277
277
  runLaneEffects(EFFECT_RENDER);
278
278
  this.run(EFFECT_RENDER);
279
279
  runLaneEffects(EFFECT_USER);
@@ -285,9 +285,9 @@ class GlobalQueue extends Queue {
285
285
  notify(e, t, n, i) {
286
286
  if (t & STATUS_PENDING) {
287
287
  if (n & STATUS_PENDING) {
288
- const t = i !== undefined ? i : e.X;
289
- if (activeTransition && t && !activeTransition.q.includes(t.source)) {
290
- activeTransition.q.push(t.source);
288
+ const t = i !== undefined ? i : e.q;
289
+ if (activeTransition && t && !activeTransition.X.includes(t.source)) {
290
+ activeTransition.X.push(t.source);
291
291
  schedule();
292
292
  }
293
293
  }
@@ -302,12 +302,12 @@ class GlobalQueue extends Queue {
302
302
  if (!activeTransition) {
303
303
  activeTransition = e ?? {
304
304
  J: clock,
305
- F: [],
306
- q: [],
305
+ M: [],
306
+ X: [],
307
307
  $: [],
308
308
  j: new Set(),
309
309
  ee: [],
310
- B: { G: [[], []], M: [] },
310
+ Z: { G: [[], []], F: [] },
311
311
  te: false
312
312
  };
313
313
  } else if (e) {
@@ -326,12 +326,12 @@ class GlobalQueue extends Queue {
326
326
  }
327
327
  transitions.add(activeTransition);
328
328
  activeTransition.J = clock;
329
- for (let e = 0; e < this.F.length; e++) {
330
- const t = this.F[e];
329
+ for (let e = 0; e < this.M.length; e++) {
330
+ const t = this.M[e];
331
331
  t.ne = activeTransition;
332
- activeTransition.F.push(t);
332
+ activeTransition.M.push(t);
333
333
  }
334
- this.F = activeTransition.F;
334
+ this.M = activeTransition.M;
335
335
  for (let e = 0; e < this.$.length; e++) {
336
336
  const t = this.$[e];
337
337
  t.ne = activeTransition;
@@ -349,7 +349,7 @@ function insertSubs(e, t = false) {
349
349
  const n = e.ie || currentOptimisticLane;
350
350
  const i = e.re !== undefined;
351
351
  for (let r = e.I; r !== null; r = r.p) {
352
- if (i && r.h.se) {
352
+ if (i && r.h.oe) {
353
353
  r.h.O |= REACTIVE_SNAPSHOT_STALE;
354
354
  continue;
355
355
  }
@@ -361,54 +361,65 @@ function insertSubs(e, t = false) {
361
361
  r.h.ie = undefined;
362
362
  }
363
363
  const e = r.h;
364
- if (e.oe === EFFECT_TRACKED) {
364
+ if (e.se === EFFECT_TRACKED) {
365
365
  if (!e.ue) {
366
366
  e.ue = true;
367
- e.ce.enqueue(EFFECT_USER, e.le);
367
+ e.ce.enqueue(EFFECT_USER, e.ae);
368
368
  }
369
369
  continue;
370
370
  }
371
- const s = r.h.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
372
- if (s.N > r.h.o) s.N = r.h.o;
373
- insertIntoHeap(r.h, s);
371
+ const o = r.h.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue;
372
+ if (o.P > r.h.o) o.P = r.h.o;
373
+ insertIntoHeap(r.h, o);
374
374
  }
375
375
  }
376
+ function commitPendingNodes() {
377
+ const e = globalQueue.M;
378
+ for (let t = 0; t < e.length; t++) {
379
+ const n = e[t];
380
+ if (n.le !== NOT_PENDING) {
381
+ n.fe = n.le;
382
+ n.le = NOT_PENDING;
383
+ if (n.se && n.se !== EFFECT_TRACKED) n.ue = true;
384
+ }
385
+ if (n.Ee & STATUS_PENDING) {
386
+ const e = n.q?.source;
387
+ if (e && !(e.Ee & STATUS_PENDING)) {
388
+ n.Ee &= -6;
389
+ n.q = null;
390
+ }
391
+ } else n.Ee &= ~STATUS_UNINITIALIZED;
392
+ if (n.L) GlobalQueue.Y(n, false, true);
393
+ }
394
+ e.length = 0;
395
+ }
376
396
  function finalizePureQueue(e = null, t = false) {
377
397
  let n = !t;
398
+ if (n) commitPendingNodes();
378
399
  if (!t) checkBoundaryChildren(globalQueue);
379
- if (dirtyQueue.R >= dirtyQueue.N) runHeap(dirtyQueue, GlobalQueue.K);
400
+ if (dirtyQueue.R >= dirtyQueue.P) runHeap(dirtyQueue, GlobalQueue.K);
380
401
  if (n) {
381
- const t = globalQueue.F;
402
+ commitPendingNodes();
403
+ const t = e ? e.$ : globalQueue.$;
382
404
  for (let e = 0; e < t.length; e++) {
383
405
  const n = t[e];
384
- if (n.ae !== NOT_PENDING) {
385
- n.fe = n.ae;
386
- n.ae = NOT_PENDING;
387
- if (n.oe && n.oe !== EFFECT_TRACKED) n.ue = true;
406
+ n.ie = undefined;
407
+ if (n.le !== NOT_PENDING) {
408
+ n.fe = n.le;
409
+ n.le = NOT_PENDING;
388
410
  }
389
- if (!(n.Ee & STATUS_PENDING)) n.Ee &= ~STATUS_UNINITIALIZED;
390
- if (n.L) GlobalQueue.Y(n, false, true);
411
+ const i = n.Te;
412
+ n.Te = NOT_PENDING;
413
+ if (i !== NOT_PENDING && n.fe !== i) insertSubs(n, true);
414
+ n.ne = null;
391
415
  }
392
416
  t.length = 0;
393
- const n = e ? e.$ : globalQueue.$;
394
- for (let e = 0; e < n.length; e++) {
395
- const t = n[e];
396
- const i = t.ae;
397
- t.ie = undefined;
398
- if (i !== NOT_PENDING && t.fe !== i) {
399
- t.fe = i;
400
- insertSubs(t, true);
401
- }
402
- t.ae = NOT_PENDING;
403
- t.ne = null;
404
- }
405
- n.length = 0;
406
- const i = e ? e.j : globalQueue.j;
407
- if (GlobalQueue.Z && i.size) {
408
- for (const e of i) {
409
- GlobalQueue.Z(e);
410
- }
411
- i.clear();
417
+ const n = e ? e.j : globalQueue.j;
418
+ if (GlobalQueue.B && n.size) {
419
+ for (const e of n) {
420
+ GlobalQueue.B(e);
421
+ }
422
+ n.clear();
412
423
  schedule();
413
424
  }
414
425
  for (const t of activeLanes) {
@@ -418,17 +429,17 @@ function finalizePureQueue(e = null, t = false) {
418
429
  if (t.W[0].length) runQueue(t.W[0], EFFECT_RENDER);
419
430
  if (t.W[1].length) runQueue(t.W[1], EFFECT_USER);
420
431
  }
421
- if (t.Te.ie === t) t.Te.ie = undefined;
432
+ if (t.de.ie === t) t.de.ie = undefined;
422
433
  t.U.clear();
423
434
  t.W[0].length = 0;
424
435
  t.W[1].length = 0;
425
436
  activeLanes.delete(t);
426
- signalLanes.delete(t.Te);
437
+ signalLanes.delete(t.de);
427
438
  }
428
439
  }
429
440
  }
430
441
  function checkBoundaryChildren(e) {
431
- for (const t of e.M) {
442
+ for (const t of e.F) {
432
443
  t.checkSources?.();
433
444
  checkBoundaryChildren(t);
434
445
  }
@@ -455,9 +466,9 @@ function transitionComplete(e) {
455
466
  if (e.te) return true;
456
467
  if (e.ee.length) return false;
457
468
  let t = true;
458
- for (let n = 0; n < e.q.length; n++) {
459
- const i = e.q[n];
460
- if (i.Ee & STATUS_PENDING && i.X?.source === i) {
469
+ for (let n = 0; n < e.X.length; n++) {
470
+ const i = e.X[n];
471
+ if (i.Ee & STATUS_PENDING && i.q?.source === i) {
461
472
  t = false;
462
473
  break;
463
474
  }
@@ -488,12 +499,12 @@ function getOrCreateLane(e) {
488
499
  if (t) {
489
500
  return findLane(t);
490
501
  }
491
- const n = e.de;
502
+ const n = e.Se;
492
503
  const i = n?.ie ? findLane(n.ie) : null;
493
- t = { Te: e, U: new Set(), W: [[], []], k: null, ne: activeTransition, Se: i };
504
+ t = { de: e, U: new Set(), W: [[], []], k: null, ne: activeTransition, Re: i };
494
505
  signalLanes.set(e, t);
495
506
  activeLanes.add(t);
496
- e.Re = e.Oe || 0;
507
+ e.Oe = false;
497
508
  return t;
498
509
  }
499
510
  function findLane(e) {
@@ -519,7 +530,7 @@ function resolveLane(e) {
519
530
  return undefined;
520
531
  }
521
532
  function hasActiveOverride(e) {
522
- return !!(e._e && e.ae !== NOT_PENDING);
533
+ return !!(e.Te !== undefined && e.Te !== NOT_PENDING);
523
534
  }
524
535
  function assignOrMergeLane(e, t) {
525
536
  const n = findLane(t);
@@ -532,9 +543,9 @@ function assignOrMergeLane(e, t) {
532
543
  const r = findLane(i);
533
544
  if (activeLanes.has(r)) {
534
545
  if (r !== n && !hasActiveOverride(e)) {
535
- if (n.Se && findLane(n.Se) === r) {
546
+ if (n.Re && findLane(n.Re) === r) {
536
547
  e.ie = t;
537
- } else if (r.Se && findLane(r.Se) === n);
548
+ } else if (r.Re && findLane(r.Re) === n);
538
549
  else mergeLanes(n, r);
539
550
  }
540
551
  return;
@@ -545,43 +556,42 @@ function assignOrMergeLane(e, t) {
545
556
  function handleAsync(e, t, n) {
546
557
  const i = typeof t === "object" && t !== null;
547
558
  const r = i && untrack(() => t[Symbol.asyncIterator]);
548
- const s = !r && i && untrack(() => typeof t.then === "function");
549
- if (!s && !r) {
550
- e.Ie = null;
559
+ const o = !r && i && untrack(() => typeof t.then === "function");
560
+ if (!o && !r) {
561
+ e._e = null;
551
562
  return t;
552
563
  }
553
- e.Ie = t;
554
- let o;
564
+ e._e = t;
565
+ let s;
555
566
  const handleError = n => {
556
- if (e.Ie !== t) return;
567
+ if (e._e !== t) return;
557
568
  globalQueue.initTransition(e.ne);
558
569
  notifyStatus(e, n instanceof NotReadyError ? STATUS_PENDING : STATUS_ERROR, n);
559
570
  e.J = clock;
560
571
  };
561
572
  const asyncWrite = (i, r) => {
562
- if (e.Ie !== t) return;
573
+ if (e._e !== t) return;
563
574
  if (e.O & (REACTIVE_DIRTY | REACTIVE_OPTIMISTIC_DIRTY)) return;
564
575
  globalQueue.initTransition(e.ne);
565
576
  clearStatus(e);
566
- const s = resolveLane(e);
567
- if (s) s.U.delete(e);
577
+ const o = resolveLane(e);
578
+ if (o) o.U.delete(e);
568
579
  if (n) n(i);
569
- else if (e._e) {
570
- const t = e.ae !== NOT_PENDING;
571
- if (e.L) e.ae = i;
572
- if (!t) {
580
+ else if (e.Te !== undefined) {
581
+ if (e.Te !== undefined && e.Te !== NOT_PENDING) e.le = i;
582
+ else {
573
583
  e.fe = i;
574
584
  insertSubs(e);
575
585
  }
576
586
  e.J = clock;
577
- } else if (s) {
587
+ } else if (o) {
578
588
  const t = e.fe;
579
- const n = e.pe;
589
+ const n = e.Ie;
580
590
  if (!n || !n(i, t)) {
581
591
  e.fe = i;
582
592
  e.J = clock;
583
- if (e.he) {
584
- setSignal(e.he, i);
593
+ if (e.pe) {
594
+ setSignal(e.pe, i);
585
595
  }
586
596
  insertSubs(e, true);
587
597
  }
@@ -592,13 +602,13 @@ function handleAsync(e, t, n) {
592
602
  flush();
593
603
  r?.();
594
604
  };
595
- if (s) {
605
+ if (o) {
596
606
  let n = false,
597
607
  i = true;
598
608
  t.then(
599
609
  e => {
600
610
  if (i) {
601
- o = e;
611
+ s = e;
602
612
  n = true;
603
613
  } else asyncWrite(e);
604
614
  },
@@ -636,7 +646,7 @@ function handleAsync(e, t, n) {
636
646
  );
637
647
  r = false;
638
648
  if (t && !e.done) {
639
- o = e.value;
649
+ s = e.value;
640
650
  i = true;
641
651
  return iterate();
642
652
  }
@@ -648,23 +658,23 @@ function handleAsync(e, t, n) {
648
658
  throw new NotReadyError(context);
649
659
  }
650
660
  }
651
- return o;
661
+ return s;
652
662
  }
653
663
  function clearStatus(e) {
654
664
  e.Ee = e.Ee & STATUS_UNINITIALIZED;
655
- e.X = null;
665
+ e.q = null;
656
666
  updatePendingSignal(e);
657
- e.Ae?.();
667
+ e.he?.();
658
668
  }
659
669
  function notifyStatus(e, t, n, i, r) {
660
670
  if (t === STATUS_ERROR && !(n instanceof StatusError) && !(n instanceof NotReadyError))
661
671
  n = new StatusError(e, n);
662
- const s = n instanceof NotReadyError && n.source === e;
663
- const o = t === STATUS_PENDING && e._e && !s;
664
- const u = o && hasActiveOverride(e);
672
+ const o = n instanceof NotReadyError && n.source === e;
673
+ const s = t === STATUS_PENDING && e.Te !== undefined && !o;
674
+ const u = s && hasActiveOverride(e);
665
675
  if (!i) {
666
676
  e.Ee = t | (t !== STATUS_ERROR ? e.Ee & STATUS_UNINITIALIZED : 0);
667
- e.X = n;
677
+ e.q = n;
668
678
  updatePendingSignal(e);
669
679
  }
670
680
  if (r && !i) {
@@ -672,50 +682,50 @@ function notifyStatus(e, t, n, i, r) {
672
682
  }
673
683
  if (u && activeTransition && n instanceof NotReadyError) {
674
684
  const e = n.source;
675
- if (!activeTransition.q.includes(e)) {
676
- activeTransition.q.push(e);
685
+ if (!activeTransition.X.includes(e)) {
686
+ activeTransition.X.push(e);
677
687
  }
678
688
  }
679
689
  const c = i || u;
680
- const l = i || o ? undefined : r;
681
- if (e.Ae) {
690
+ const a = i || s ? undefined : r;
691
+ if (e.he) {
682
692
  if (c) {
683
- e.Ae(t, n);
693
+ e.he(t, n);
684
694
  } else {
685
- e.Ae();
695
+ e.he();
686
696
  }
687
697
  return;
688
698
  }
689
699
  for (let i = e.I; i !== null; i = i.p) {
690
700
  i.h.J = clock;
691
- if (i.h.X !== n) {
692
- !i.h.ne && globalQueue.F.push(i.h);
693
- notifyStatus(i.h, t, n, c, l);
701
+ if (i.h.q !== n) {
702
+ !i.h.ne && globalQueue.M.push(i.h);
703
+ notifyStatus(i.h, t, n, c, a);
694
704
  }
695
705
  }
696
- for (let i = e.A; i !== null; i = i.P) {
706
+ for (let i = e.A; i !== null; i = i.N) {
697
707
  for (let e = i.I; e !== null; e = e.p) {
698
708
  e.h.J = clock;
699
- if (e.h.X !== n) {
700
- !e.h.ne && globalQueue.F.push(e.h);
701
- notifyStatus(e.h, t, n, c, l);
709
+ if (e.h.q !== n) {
710
+ !e.h.ne && globalQueue.M.push(e.h);
711
+ notifyStatus(e.h, t, n, c, a);
702
712
  }
703
713
  }
704
714
  }
705
715
  }
706
716
  function unlinkSubs(e) {
707
- const t = e.V;
717
+ const t = e.m;
708
718
  const n = e.D;
709
719
  const i = e.p;
710
- const r = e.Pe;
711
- if (i !== null) i.Pe = r;
720
+ const r = e.Ae;
721
+ if (i !== null) i.Ae = r;
712
722
  else t.Ne = r;
713
723
  if (r !== null) r.p = i;
714
724
  else {
715
725
  t.I = i;
716
726
  if (i === null) {
717
727
  t.ge?.();
718
- t.L && !t.Ce && !(t.O & REACTIVE_ZOMBIE) && unobserved(t);
728
+ t.L && !t.Pe && !(t.O & REACTIVE_ZOMBIE) && unobserved(t);
719
729
  }
720
730
  }
721
731
  return n;
@@ -730,27 +740,27 @@ function unobserved(e) {
730
740
  disposeChildren(e, true);
731
741
  }
732
742
  function link(e, t) {
733
- const n = t.ye;
734
- if (n !== null && n.V === e) return;
743
+ const n = t.Ce;
744
+ if (n !== null && n.m === e) return;
735
745
  let i = null;
736
746
  const r = t.O & REACTIVE_RECOMPUTING_DEPS;
737
747
  if (r) {
738
748
  i = n !== null ? n.D : t.C;
739
- if (i !== null && i.V === e) {
740
- t.ye = i;
749
+ if (i !== null && i.m === e) {
750
+ t.Ce = i;
741
751
  return;
742
752
  }
743
753
  }
744
- const s = e.Ne;
745
- if (s !== null && s.h === t && (!r || isValidLink(s, t))) return;
746
- const o = (t.ye = e.Ne = { V: e, h: t, D: i, Pe: s, p: null });
747
- if (n !== null) n.D = o;
748
- else t.C = o;
749
- if (s !== null) s.p = o;
750
- else e.I = o;
754
+ const o = e.Ne;
755
+ if (o !== null && o.h === t && (!r || isValidLink(o, t))) return;
756
+ const s = (t.Ce = e.Ne = { m: e, h: t, D: i, Ae: o, p: null });
757
+ if (n !== null) n.D = s;
758
+ else t.C = s;
759
+ if (o !== null) o.p = s;
760
+ else e.I = s;
751
761
  }
752
762
  function isValidLink(e, t) {
753
- const n = t.ye;
763
+ const n = t.Ce;
754
764
  if (n !== null) {
755
765
  let i = t.C;
756
766
  do {
@@ -771,7 +781,7 @@ function markDisposal(e) {
771
781
  insertIntoHeap(t, zombieQueue);
772
782
  }
773
783
  markDisposal(t);
774
- t = t.ve;
784
+ t = t.ye;
775
785
  }
776
786
  }
777
787
  function dispose(e) {
@@ -780,15 +790,15 @@ function dispose(e) {
780
790
  t = unlinkSubs(t);
781
791
  } while (t !== null);
782
792
  e.C = null;
783
- e.ye = null;
793
+ e.Ce = null;
784
794
  disposeChildren(e, true);
785
795
  }
786
796
  function disposeChildren(e, t = false, n) {
787
797
  if (e.O & REACTIVE_DISPOSED) return;
788
798
  if (t) e.O = REACTIVE_DISPOSED;
789
- let i = n ? e.be : e.De;
799
+ let i = n ? e.ve : e.De;
790
800
  while (i) {
791
- const e = i.ve;
801
+ const e = i.ye;
792
802
  if (i.C) {
793
803
  const e = i;
794
804
  deleteFromHeap(e, e.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
@@ -797,22 +807,21 @@ function disposeChildren(e, t = false, n) {
797
807
  t = unlinkSubs(t);
798
808
  } while (t !== null);
799
809
  e.C = null;
800
- e.ye = null;
810
+ e.Ce = null;
801
811
  }
802
812
  disposeChildren(i, true);
803
813
  i = e;
804
814
  }
805
815
  if (n) {
806
- e.be = null;
816
+ e.ve = null;
807
817
  } else {
808
818
  e.De = null;
809
- e.ve = null;
810
819
  e.we = 0;
811
820
  }
812
821
  runDisposal(e, n);
813
822
  }
814
823
  function runDisposal(e, t) {
815
- let n = t ? e.Ve : e.me;
824
+ let n = t ? e.be : e.me;
816
825
  if (!n) return;
817
826
  if (Array.isArray(n)) {
818
827
  for (let e = 0; e < n.length; e++) {
@@ -822,11 +831,11 @@ function runDisposal(e, t) {
822
831
  } else {
823
832
  n.call(n);
824
833
  }
825
- t ? (e.Ve = null) : (e.me = null);
834
+ t ? (e.be = null) : (e.me = null);
826
835
  }
827
836
  function childId(e, t) {
828
837
  let n = e;
829
- while (n.Le && n.i) n = n.i;
838
+ while (n.Ve && n.i) n = n.i;
830
839
  if (n.id != null) return formatId(n.id, t ? n.we++ : n.we);
831
840
  throw new Error("Cannot get child id from owner without an id");
832
841
  }
@@ -863,17 +872,17 @@ function createOwner(e) {
863
872
  const n = e?.transparent ?? false;
864
873
  const i = {
865
874
  id: e?.id ?? (n ? t?.id : t?.id != null ? getNextChildId(t) : undefined),
866
- Le: n || undefined,
875
+ Ve: n || undefined,
867
876
  t: true,
868
877
  u: t?.t ? t.u : t,
869
878
  De: null,
870
- ve: null,
879
+ ye: null,
871
880
  me: null,
872
881
  ce: t?.ce ?? globalQueue,
873
- ke: t?.ke || defaultContext,
882
+ Le: t?.Le || defaultContext,
874
883
  we: 0,
875
- Ve: null,
876
884
  be: null,
885
+ ve: null,
877
886
  i: t,
878
887
  dispose(e = true) {
879
888
  disposeChildren(i, e);
@@ -884,7 +893,7 @@ function createOwner(e) {
884
893
  if (e === null) {
885
894
  t.De = i;
886
895
  } else {
887
- i.ve = e;
896
+ i.ye = e;
888
897
  t.De = i;
889
898
  }
890
899
  }
@@ -895,57 +904,59 @@ function createRoot(e, t) {
895
904
  return runWithOwner(n, () => e(n.dispose));
896
905
  }
897
906
  function effect(e, t, n, i, r) {
898
- let s = false;
899
- const o = computed(r?.render ? t => staleValues(() => e(t)) : e, i, {
907
+ let o = false;
908
+ const s = computed(r?.render ? t => staleValues(() => e(t)) : e, i, {
900
909
  ...r,
901
910
  equals: () => {
902
- o.ue = !o.X;
903
- if (s) o.ce.enqueue(o.oe, runEffect.bind(o));
911
+ s.ue = !s.q;
912
+ if (o) s.ce.enqueue(s.se, runEffect.bind(s));
904
913
  return false;
905
914
  },
906
915
  lazy: true
907
916
  });
908
- o.Ue = i;
909
- o.We = t;
910
- o.He = n;
911
- o.xe = undefined;
912
- o.oe = r?.render ? EFFECT_RENDER : EFFECT_USER;
913
- o.Ae = (e, t) => {
914
- const n = e !== undefined ? e : o.Ee;
915
- const i = t !== undefined ? t : o.X;
917
+ s.ke = i;
918
+ s.Ue = t;
919
+ s.xe = n;
920
+ s.We = undefined;
921
+ s.se = r?.render ? EFFECT_RENDER : EFFECT_USER;
922
+ s.he = (e, t) => {
923
+ const n = e !== undefined ? e : s.Ee;
924
+ const i = t !== undefined ? t : s.q;
916
925
  if (n & STATUS_ERROR) {
917
926
  let e = i;
918
- o.ce.notify(o, STATUS_PENDING, 0);
919
- if (o.oe === EFFECT_USER) {
927
+ s.ce.notify(s, STATUS_PENDING, 0);
928
+ if (s.se === EFFECT_USER) {
920
929
  try {
921
- return o.He
922
- ? o.He(e, () => {
923
- o.xe?.();
924
- o.xe = undefined;
930
+ return s.xe
931
+ ? s.xe(e, () => {
932
+ s.We?.();
933
+ s.We = undefined;
925
934
  })
926
935
  : console.error(e);
927
936
  } catch (t) {
928
937
  e = t;
929
938
  }
930
939
  }
931
- if (!o.ce.notify(o, STATUS_ERROR, STATUS_ERROR)) throw e;
932
- } else if (o.oe === EFFECT_RENDER) o.ce.notify(o, STATUS_PENDING | STATUS_ERROR, n, i);
940
+ if (!s.ce.notify(s, STATUS_ERROR, STATUS_ERROR)) throw e;
941
+ } else if (s.se === EFFECT_RENDER) {
942
+ s.ce.notify(s, STATUS_PENDING | STATUS_ERROR, n, i);
943
+ }
933
944
  };
934
- recompute(o, true);
935
- !r?.defer && (o.oe === EFFECT_USER ? o.ce.enqueue(o.oe, runEffect.bind(o)) : runEffect.call(o));
936
- s = true;
937
- onCleanup(() => o.xe?.());
945
+ recompute(s, true);
946
+ !r?.defer && (s.se === EFFECT_USER ? s.ce.enqueue(s.se, runEffect.bind(s)) : runEffect.call(s));
947
+ o = true;
948
+ onCleanup(() => s.We?.());
938
949
  }
939
950
  function runEffect() {
940
951
  if (!this.ue || this.O & REACTIVE_DISPOSED) return;
941
- this.xe?.();
942
- this.xe = undefined;
952
+ this.We?.();
953
+ this.We = undefined;
943
954
  try {
944
- this.xe = this.We(this.fe, this.Ue);
955
+ this.We = this.Ue(this.fe, this.ke);
945
956
  } catch (e) {
946
957
  if (!this.ce.notify(this, STATUS_ERROR, STATUS_ERROR)) throw e;
947
958
  } finally {
948
- this.Ue = this.fe;
959
+ this.ke = this.fe;
949
960
  this.ue = false;
950
961
  }
951
962
  }
@@ -958,21 +969,44 @@ function trackedEffect(e, t) {
958
969
  const n = computed(
959
970
  () => {
960
971
  try {
961
- n.xe?.();
962
- n.xe = undefined;
963
- n.xe = staleValues(e) || undefined;
972
+ n.We?.();
973
+ n.We = undefined;
974
+ n.We = staleValues(e) || undefined;
964
975
  } finally {
965
976
  }
966
977
  },
967
978
  undefined,
968
979
  { ...t, lazy: true }
969
980
  );
970
- n.xe = undefined;
981
+ n.We = undefined;
971
982
  n.ue = true;
972
- n.oe = EFFECT_TRACKED;
973
- n.le = run;
983
+ n.se = EFFECT_TRACKED;
984
+ n.ae = run;
974
985
  n.ce.enqueue(EFFECT_USER, run);
975
- onCleanup(() => n.xe?.());
986
+ onCleanup(() => n.We?.());
987
+ }
988
+ let externalSourceConfig = null;
989
+ function enableExternalSource(e) {
990
+ const { factory: t, untrack: n = e => e() } = e;
991
+ if (externalSourceConfig) {
992
+ const { factory: e, untrack: i } = externalSourceConfig;
993
+ externalSourceConfig = {
994
+ factory: (n, i) => {
995
+ const r = e(n, i);
996
+ const o = t(e => r.track(e), i);
997
+ return {
998
+ track: e => o.track(e),
999
+ dispose() {
1000
+ o.dispose();
1001
+ r.dispose();
1002
+ }
1003
+ };
1004
+ },
1005
+ untrack: e => i(() => n(e))
1006
+ };
1007
+ } else {
1008
+ externalSourceConfig = { factory: t, untrack: n };
1009
+ }
976
1010
  }
977
1011
  GlobalQueue.K = recompute;
978
1012
  GlobalQueue.Y = disposeChildren;
@@ -988,7 +1022,7 @@ let snapshotCaptureActive = false;
988
1022
  let snapshotSources = null;
989
1023
  function ownerInSnapshotScope(e) {
990
1024
  while (e) {
991
- if (e.Qe) return true;
1025
+ if (e.He) return true;
992
1026
  e = e.i;
993
1027
  }
994
1028
  return false;
@@ -998,32 +1032,32 @@ function setSnapshotCapture(e) {
998
1032
  if (e && !snapshotSources) snapshotSources = new Set();
999
1033
  }
1000
1034
  function markSnapshotScope(e) {
1001
- e.Qe = true;
1035
+ e.He = true;
1002
1036
  }
1003
1037
  function releaseSnapshotScope(e) {
1004
- e.Qe = false;
1038
+ e.He = false;
1005
1039
  releaseSubtree(e);
1006
1040
  schedule();
1007
1041
  }
1008
1042
  function releaseSubtree(e) {
1009
1043
  let t = e.De;
1010
1044
  while (t) {
1011
- if (t.Qe) {
1012
- t = t.ve;
1045
+ if (t.He) {
1046
+ t = t.ye;
1013
1047
  continue;
1014
1048
  }
1015
1049
  if (t.L) {
1016
1050
  const e = t;
1017
- e.se = false;
1051
+ e.oe = false;
1018
1052
  if (e.O & REACTIVE_SNAPSHOT_STALE) {
1019
1053
  e.O &= ~REACTIVE_SNAPSHOT_STALE;
1020
1054
  e.O |= REACTIVE_DIRTY;
1021
- if (dirtyQueue.N > e.o) dirtyQueue.N = e.o;
1055
+ if (dirtyQueue.P > e.o) dirtyQueue.P = e.o;
1022
1056
  insertIntoHeap(e, dirtyQueue);
1023
1057
  }
1024
1058
  }
1025
1059
  releaseSubtree(t);
1026
- t = t.ve;
1060
+ t = t.ye;
1027
1061
  }
1028
1062
  }
1029
1063
  function clearSnapshots() {
@@ -1037,7 +1071,7 @@ function clearSnapshots() {
1037
1071
  snapshotCaptureActive = false;
1038
1072
  }
1039
1073
  function recompute(e, t = false) {
1040
- const n = e.oe;
1074
+ const n = e.se;
1041
1075
  if (!t) {
1042
1076
  if (e.ne && (!n || activeTransition) && activeTransition !== e.ne)
1043
1077
  globalQueue.initTransition(e.ne);
@@ -1045,25 +1079,25 @@ function recompute(e, t = false) {
1045
1079
  if (e.ne || n === EFFECT_TRACKED) disposeChildren(e);
1046
1080
  else {
1047
1081
  markDisposal(e);
1048
- e.Ve = e.me;
1049
- e.be = e.De;
1082
+ e.be = e.me;
1083
+ e.ve = e.De;
1050
1084
  e.me = null;
1051
1085
  e.De = null;
1052
1086
  e.we = 0;
1053
1087
  }
1054
1088
  }
1055
1089
  const i = !!(e.O & REACTIVE_OPTIMISTIC_DIRTY);
1056
- const r = hasActiveOverride(e);
1057
- const s = !!(e.Ee & STATUS_PENDING);
1058
- const o = context;
1090
+ const r = e.Te !== undefined && e.Te !== NOT_PENDING;
1091
+ const o = !!(e.Ee & STATUS_PENDING);
1092
+ const s = context;
1059
1093
  context = e;
1060
- e.ye = null;
1094
+ e.Ce = null;
1061
1095
  e.O = REACTIVE_RECOMPUTING_DEPS;
1062
1096
  e.J = clock;
1063
- let u = e.ae === NOT_PENDING ? e.fe : e.ae;
1097
+ let u = e.le === NOT_PENDING ? e.fe : e.le;
1064
1098
  let c = e.o;
1065
- let l = tracking;
1066
- let a = currentOptimisticLane;
1099
+ let a = tracking;
1100
+ let l = currentOptimisticLane;
1067
1101
  tracking = true;
1068
1102
  if (i) {
1069
1103
  const t = resolveLane(e);
@@ -1075,15 +1109,15 @@ function recompute(e, t = false) {
1075
1109
  const t = resolveLane(e);
1076
1110
  if (t) {
1077
1111
  t.U.delete(e);
1078
- updatePendingSignal(t.Te);
1112
+ updatePendingSignal(t.de);
1079
1113
  }
1080
1114
  } catch (t) {
1081
1115
  if (t instanceof NotReadyError && currentOptimisticLane) {
1082
1116
  const t = findLane(currentOptimisticLane);
1083
- if (t.Te !== e) {
1117
+ if (t.de !== e) {
1084
1118
  t.U.add(e);
1085
1119
  e.ie = t;
1086
- updatePendingSignal(t.Te);
1120
+ updatePendingSignal(t.de);
1087
1121
  }
1088
1122
  }
1089
1123
  notifyStatus(
@@ -1094,51 +1128,50 @@ function recompute(e, t = false) {
1094
1128
  t instanceof NotReadyError ? e.ie : undefined
1095
1129
  );
1096
1130
  } finally {
1097
- tracking = l;
1131
+ tracking = a;
1098
1132
  e.O = REACTIVE_NONE | (t ? e.O & REACTIVE_SNAPSHOT_STALE : 0);
1099
- context = o;
1133
+ context = s;
1100
1134
  }
1101
- if (!e.X) {
1102
- const o = e.ye;
1103
- let l = o !== null ? o.D : e.C;
1104
- if (l !== null) {
1135
+ if (!e.q) {
1136
+ const s = e.Ce;
1137
+ let a = s !== null ? s.D : e.C;
1138
+ if (a !== null) {
1105
1139
  do {
1106
- l = unlinkSubs(l);
1107
- } while (l !== null);
1108
- if (o !== null) o.D = null;
1140
+ a = unlinkSubs(a);
1141
+ } while (a !== null);
1142
+ if (s !== null) s.D = null;
1109
1143
  else e.C = null;
1110
1144
  }
1111
- const a = r ? e.fe : e.ae === NOT_PENDING ? e.fe : e.ae;
1112
- const f = !e.pe || !e.pe(a, u);
1145
+ const l = r ? e.Te : e.le === NOT_PENDING ? e.fe : e.le;
1146
+ const f = !e.Ie || !e.Ie(l, u);
1113
1147
  if (f) {
1114
- const o = r ? e.fe : undefined;
1115
- if (t || (n && activeTransition !== e.ne) || i) e.fe = u;
1116
- else e.ae = u;
1117
- if (r && !i && s) {
1118
- const t = e.Oe || 0;
1119
- const n = e.Re || 0;
1120
- if (t <= n) e.fe = u;
1121
- }
1122
- if (!r || i || e.fe !== o) {
1123
- insertSubs(e, i || r);
1124
- }
1148
+ const s = r ? e.Te : undefined;
1149
+ if (t || (n && activeTransition !== e.ne) || i) {
1150
+ e.fe = u;
1151
+ if (r && i) {
1152
+ e.Te = u;
1153
+ e.le = u;
1154
+ }
1155
+ } else e.le = u;
1156
+ if (r && !i && o && !e.Oe) e.Te = u;
1157
+ if (!r || i || e.Te !== s) insertSubs(e, i || r);
1125
1158
  } else if (r) {
1126
- e.ae = u;
1159
+ e.le = u;
1127
1160
  } else if (e.o != c) {
1128
1161
  for (let t = e.I; t !== null; t = t.p) {
1129
1162
  insertIntoHeapHeight(t.h, t.h.O & REACTIVE_ZOMBIE ? zombieQueue : dirtyQueue);
1130
1163
  }
1131
1164
  }
1132
1165
  }
1133
- currentOptimisticLane = a;
1134
- (!t || e.Ee & STATUS_PENDING) && !e.ne && !(activeTransition && e._e) && globalQueue.F.push(e);
1166
+ currentOptimisticLane = l;
1167
+ (!t || e.Ee & STATUS_PENDING) && !e.ne && !(activeTransition && r) && globalQueue.M.push(e);
1135
1168
  e.ne && n && activeTransition !== e.ne && runInTransition(e.ne, () => recompute(e));
1136
1169
  }
1137
1170
  function updateIfNecessary(e) {
1138
1171
  if (e.O & REACTIVE_CHECK) {
1139
1172
  for (let t = e.C; t; t = t.D) {
1140
- const n = t.V;
1141
- const i = n.m || n;
1173
+ const n = t.m;
1174
+ const i = n.V || n;
1142
1175
  if (i.L) {
1143
1176
  updateIfNecessary(i);
1144
1177
  }
@@ -1147,7 +1180,7 @@ function updateIfNecessary(e) {
1147
1180
  }
1148
1181
  }
1149
1182
  }
1150
- if (e.O & (REACTIVE_DIRTY | REACTIVE_OPTIMISTIC_DIRTY) || (e.X && e.J < clock && !e.Ie)) {
1183
+ if (e.O & (REACTIVE_DIRTY | REACTIVE_OPTIMISTIC_DIRTY) || (e.q && e.J < clock && !e._e)) {
1151
1184
  recompute(e);
1152
1185
  }
1153
1186
  e.O = REACTIVE_NONE | (e.O & REACTIVE_SNAPSHOT_STALE);
@@ -1156,13 +1189,13 @@ function computed(e, t, n) {
1156
1189
  const i = n?.transparent ?? false;
1157
1190
  const r = {
1158
1191
  id: n?.id ?? (i ? context?.id : context?.id != null ? getNextChildId(context) : undefined),
1159
- Le: i || undefined,
1160
- pe: n?.equals != null ? n.equals : isEqual,
1192
+ Ve: i || undefined,
1193
+ Ie: n?.equals != null ? n.equals : isEqual,
1161
1194
  Ge: !!n?.pureWrite,
1162
1195
  ge: n?.unobserved,
1163
1196
  me: null,
1164
1197
  ce: context?.ce ?? globalQueue,
1165
- ke: context?.ke ?? defaultContext,
1198
+ Le: context?.Le ?? defaultContext,
1166
1199
  we: 0,
1167
1200
  L: e,
1168
1201
  fe: t,
@@ -1171,34 +1204,45 @@ function computed(e, t, n) {
1171
1204
  S: undefined,
1172
1205
  T: null,
1173
1206
  C: null,
1174
- ye: null,
1207
+ Ce: null,
1175
1208
  I: null,
1176
1209
  Ne: null,
1177
1210
  i: context,
1178
- ve: null,
1211
+ ye: null,
1179
1212
  De: null,
1180
1213
  O: n?.lazy ? REACTIVE_LAZY : REACTIVE_NONE,
1181
1214
  Ee: STATUS_UNINITIALIZED,
1182
1215
  J: clock,
1183
- ae: NOT_PENDING,
1184
- Ve: null,
1216
+ le: NOT_PENDING,
1185
1217
  be: null,
1186
- Ie: null,
1218
+ ve: null,
1219
+ _e: null,
1187
1220
  ne: null
1188
1221
  };
1189
1222
  r.T = r;
1190
- const s = context?.t ? context.u : context;
1223
+ const o = context?.t ? context.u : context;
1191
1224
  if (context) {
1192
1225
  const e = context.De;
1193
1226
  if (e === null) {
1194
1227
  context.De = r;
1195
1228
  } else {
1196
- r.ve = e;
1229
+ r.ye = e;
1197
1230
  context.De = r;
1198
1231
  }
1199
1232
  }
1200
- if (s) r.o = s.o + 1;
1201
- if (snapshotCaptureActive && ownerInSnapshotScope(context)) r.se = true;
1233
+ if (o) r.o = o.o + 1;
1234
+ if (snapshotCaptureActive && ownerInSnapshotScope(context)) r.oe = true;
1235
+ if (externalSourceConfig) {
1236
+ const e = signal(undefined, { equals: false, pureWrite: true });
1237
+ const t = externalSourceConfig.factory(r.L, () => {
1238
+ setSignal(e, undefined);
1239
+ });
1240
+ onCleanup(() => t.dispose());
1241
+ r.L = n => {
1242
+ read(e);
1243
+ return t.track(n);
1244
+ };
1245
+ }
1202
1246
  !n?.lazy && recompute(r, true);
1203
1247
  if (snapshotCaptureActive && !n?.lazy) {
1204
1248
  if (!(r.Ee & STATUS_PENDING)) {
@@ -1210,19 +1254,19 @@ function computed(e, t, n) {
1210
1254
  }
1211
1255
  function signal(e, t, n = null) {
1212
1256
  const i = {
1213
- pe: t?.equals != null ? t.equals : isEqual,
1257
+ Ie: t?.equals != null ? t.equals : isEqual,
1214
1258
  Ge: !!t?.pureWrite,
1215
1259
  ge: t?.unobserved,
1216
1260
  fe: e,
1217
1261
  I: null,
1218
1262
  Ne: null,
1219
1263
  J: clock,
1220
- m: n,
1221
- P: n?.A || null,
1222
- ae: NOT_PENDING
1264
+ V: n,
1265
+ N: n?.A || null,
1266
+ le: NOT_PENDING
1223
1267
  };
1224
1268
  n && (n.A = i);
1225
- if (snapshotCaptureActive && !i.Ge) {
1269
+ if (snapshotCaptureActive && !i.Ge && !((n?.Ee ?? 0) & STATUS_PENDING)) {
1226
1270
  i.re = e === undefined ? NO_SNAPSHOT : e;
1227
1271
  snapshotSources.add(i);
1228
1272
  }
@@ -1230,22 +1274,23 @@ function signal(e, t, n = null) {
1230
1274
  }
1231
1275
  function optimisticSignal(e, t) {
1232
1276
  const n = signal(e, t);
1233
- n._e = true;
1277
+ n.Te = NOT_PENDING;
1234
1278
  return n;
1235
1279
  }
1236
1280
  function optimisticComputed(e, t, n) {
1237
1281
  const i = computed(e, t, n);
1238
- i._e = true;
1282
+ i.Te = NOT_PENDING;
1239
1283
  return i;
1240
1284
  }
1241
1285
  function isEqual(e, t) {
1242
1286
  return e === t;
1243
1287
  }
1244
1288
  function untrack(e, t) {
1245
- if (!tracking && true) return e();
1289
+ if (!externalSourceConfig && !tracking && true) return e();
1246
1290
  const n = tracking;
1247
1291
  tracking = false;
1248
1292
  try {
1293
+ if (externalSourceConfig) return externalSourceConfig.untrack(e);
1249
1294
  return e();
1250
1295
  } finally {
1251
1296
  tracking = n;
@@ -1256,27 +1301,28 @@ function read(e) {
1256
1301
  const t = getLatestValueComputed(e);
1257
1302
  const n = latestReadActive;
1258
1303
  latestReadActive = false;
1259
- let i;
1304
+ const i = e.Te !== undefined && e.Te !== NOT_PENDING ? e.Te : e.fe;
1305
+ let r;
1260
1306
  try {
1261
- i = read(t);
1262
- } catch (t) {
1263
- if (!context && t instanceof NotReadyError) return e.fe;
1264
- throw t;
1307
+ r = read(t);
1308
+ } catch (e) {
1309
+ if (!context && e instanceof NotReadyError) return i;
1310
+ throw e;
1265
1311
  } finally {
1266
1312
  latestReadActive = n;
1267
1313
  }
1268
- if (t.Ee & STATUS_PENDING) return e.fe;
1314
+ if (t.Ee & STATUS_PENDING) return i;
1269
1315
  if (stale && currentOptimisticLane && t.ie) {
1270
- const n = findLane(t.ie);
1271
- const i = findLane(currentOptimisticLane);
1272
- if (n !== i && n.U.size > 0) {
1273
- return e.fe;
1316
+ const e = findLane(t.ie);
1317
+ const n = findLane(currentOptimisticLane);
1318
+ if (e !== n && e.U.size > 0) {
1319
+ return i;
1274
1320
  }
1275
1321
  }
1276
- return i;
1322
+ return r;
1277
1323
  }
1278
1324
  if (pendingCheckActive) {
1279
- const t = e.m || e;
1325
+ const t = e.V || e;
1280
1326
  const n = getPendingSignal(t);
1281
1327
  const i = pendingCheckActive;
1282
1328
  pendingCheckActive = false;
@@ -1293,13 +1339,13 @@ function read(e) {
1293
1339
  e.O &= ~REACTIVE_LAZY;
1294
1340
  recompute(e, true);
1295
1341
  }
1296
- const n = e.m || e;
1342
+ const n = e.V || e;
1297
1343
  if (t && tracking) {
1298
1344
  if (e.L && e.O & REACTIVE_DISPOSED) recompute(e);
1299
1345
  link(e, t);
1300
1346
  if (n.L) {
1301
1347
  const i = e.O & REACTIVE_ZOMBIE;
1302
- if (n.o >= (i ? zombieQueue.N : dirtyQueue.N)) {
1348
+ if (n.o >= (i ? zombieQueue.P : dirtyQueue.P)) {
1303
1349
  markNode(t);
1304
1350
  markHeap(i ? zombieQueue : dirtyQueue);
1305
1351
  updateIfNecessary(n);
@@ -1311,79 +1357,80 @@ function read(e) {
1311
1357
  }
1312
1358
  }
1313
1359
  if (n.Ee & STATUS_PENDING) {
1314
- if (t && !(stale && n.ne && activeTransition !== n.ne)) {
1360
+ const i = n.q?.source;
1361
+ if (i && !(i.Ee & STATUS_PENDING)) clearStatus(n);
1362
+ else if (t && !(stale && n.ne && activeTransition !== n.ne)) {
1315
1363
  if (currentOptimisticLane) {
1316
1364
  const i = n.ie;
1317
1365
  const r = findLane(currentOptimisticLane);
1318
1366
  if (i && findLane(i) === r && !hasActiveOverride(n)) {
1319
- if (!tracking) link(e, t);
1320
- throw n.X;
1367
+ if (!tracking && e !== t) link(e, t);
1368
+ throw n.q;
1321
1369
  }
1322
1370
  } else {
1323
- if (!tracking) link(e, t);
1324
- throw n.X;
1371
+ if (!tracking && e !== t) link(e, t);
1372
+ throw n.q;
1325
1373
  }
1326
1374
  } else if (!t && n.Ee & STATUS_UNINITIALIZED) {
1327
- throw n.X;
1375
+ throw n.q;
1328
1376
  }
1329
1377
  }
1330
1378
  if (e.L && e.Ee & STATUS_ERROR) {
1331
1379
  if (e.J < clock) {
1332
1380
  recompute(e, true);
1333
1381
  return read(e);
1334
- } else throw e.X;
1382
+ } else throw e.q;
1335
1383
  }
1336
- if (snapshotCaptureActive && t && t.se) {
1384
+ if (snapshotCaptureActive && t && t.oe) {
1337
1385
  const n = e.re;
1338
1386
  if (n !== undefined) {
1339
1387
  const i = n === NO_SNAPSHOT ? undefined : n;
1340
- const r = e.ae !== NOT_PENDING ? e.ae : e.fe;
1388
+ const r = e.le !== NOT_PENDING ? e.le : e.fe;
1341
1389
  if (r !== i) t.O |= REACTIVE_SNAPSHOT_STALE;
1342
1390
  return i;
1343
1391
  }
1344
1392
  }
1393
+ if (e.Te !== undefined && e.Te !== NOT_PENDING) return e.Te;
1345
1394
  return !t ||
1346
- (currentOptimisticLane !== null && (e._e || e.ie || n === e || !!(n.Ee & STATUS_PENDING))) ||
1347
- e.ae === NOT_PENDING ||
1395
+ (currentOptimisticLane !== null &&
1396
+ (e.Te !== undefined || e.ie || n === e || !!(n.Ee & STATUS_PENDING))) ||
1397
+ e.le === NOT_PENDING ||
1348
1398
  (stale && e.ne && activeTransition !== e.ne)
1349
1399
  ? e.fe
1350
- : e.ae;
1400
+ : e.le;
1351
1401
  }
1352
1402
  function setSignal(e, t) {
1353
1403
  if (e.ne && activeTransition !== e.ne) globalQueue.initTransition(e.ne);
1354
- const n = e._e && !projectionWriteActive;
1355
- const i = n ? e.fe : e.ae === NOT_PENDING ? e.fe : e.ae;
1356
- if (typeof t === "function") t = t(i);
1357
- const r = !e.pe || !e.pe(i, t) || !!(e.Ee & STATUS_UNINITIALIZED);
1358
- if (!r) {
1359
- if (n && e.ae !== NOT_PENDING && e.L) {
1404
+ const n = e.Te !== undefined && !projectionWriteActive;
1405
+ const i = e.Te !== undefined && e.Te !== NOT_PENDING;
1406
+ const r = n ? (i ? e.Te : e.fe) : e.le === NOT_PENDING ? e.fe : e.le;
1407
+ if (typeof t === "function") t = t(r);
1408
+ const o = !e.Ie || !e.Ie(r, t) || !!(e.Ee & STATUS_UNINITIALIZED);
1409
+ if (!o) {
1410
+ if (n && i && e.L) {
1360
1411
  insertSubs(e, true);
1361
1412
  schedule();
1362
1413
  }
1363
1414
  return t;
1364
1415
  }
1365
1416
  if (n) {
1366
- const n = globalQueue.$.includes(e);
1367
- if (e.ne && n) {
1368
- globalQueue.initTransition(e.ne);
1369
- }
1370
- if (e.ae === NOT_PENDING) {
1371
- e.ae = e.fe;
1372
- }
1373
- if (!n) {
1417
+ const n = e.Te === NOT_PENDING;
1418
+ if (!n && e.ne) globalQueue.initTransition(e.ne);
1419
+ if (n) {
1420
+ e.le = e.fe;
1374
1421
  globalQueue.$.push(e);
1375
1422
  }
1376
- e.Oe = (e.Oe || 0) + 1;
1423
+ e.Oe = true;
1377
1424
  const i = getOrCreateLane(e);
1378
1425
  e.ie = i;
1379
- e.fe = t;
1426
+ e.Te = t;
1380
1427
  } else {
1381
- if (e.ae === NOT_PENDING) globalQueue.F.push(e);
1382
- e.ae = t;
1428
+ if (e.le === NOT_PENDING) globalQueue.M.push(e);
1429
+ e.le = t;
1383
1430
  }
1384
1431
  updatePendingSignal(e);
1385
- if (e.he) {
1386
- setSignal(e.he, t);
1432
+ if (e.pe) {
1433
+ setSignal(e.pe, t);
1387
1434
  }
1388
1435
  e.J = clock;
1389
1436
  insertSubs(e, n);
@@ -1403,32 +1450,32 @@ function runWithOwner(e, t) {
1403
1450
  }
1404
1451
  }
1405
1452
  function getPendingSignal(e) {
1406
- if (!e.Me) {
1407
- e.Me = optimisticSignal(false, { pureWrite: true });
1408
- if (e.de) {
1409
- e.Me.de = e;
1453
+ if (!e.Qe) {
1454
+ e.Qe = optimisticSignal(false, { pureWrite: true });
1455
+ if (e.Se) {
1456
+ e.Qe.Se = e;
1410
1457
  }
1411
- if (computePendingState(e)) setSignal(e.Me, true);
1458
+ if (computePendingState(e)) setSignal(e.Qe, true);
1412
1459
  }
1413
- return e.Me;
1460
+ return e.Qe;
1414
1461
  }
1415
1462
  function computePendingState(e) {
1416
1463
  const t = e;
1417
- if (e._e && e.ae !== NOT_PENDING) {
1464
+ if (e.Te !== undefined && e.Te !== NOT_PENDING) {
1418
1465
  if (t.Ee & STATUS_PENDING && !(t.Ee & STATUS_UNINITIALIZED)) return true;
1419
- if (e.de) {
1466
+ if (e.Se) {
1420
1467
  const t = e.ie ? findLane(e.ie) : null;
1421
1468
  return !!(t && t.U.size > 0);
1422
1469
  }
1423
1470
  return true;
1424
1471
  }
1425
- if (e.ae !== NOT_PENDING && !(t.Ee & STATUS_UNINITIALIZED)) return true;
1472
+ if (e.le !== NOT_PENDING && !(t.Ee & STATUS_UNINITIALIZED)) return true;
1426
1473
  return !!(t.Ee & STATUS_PENDING && !(t.Ee & STATUS_UNINITIALIZED));
1427
1474
  }
1428
1475
  function updatePendingSignal(e) {
1429
- if (e.Me) {
1476
+ if (e.Qe) {
1430
1477
  const t = computePendingState(e);
1431
- const n = e.Me;
1478
+ const n = e.Qe;
1432
1479
  setSignal(n, t);
1433
1480
  if (!t && n.ie) {
1434
1481
  const t = resolveLane(e);
@@ -1444,20 +1491,20 @@ function updatePendingSignal(e) {
1444
1491
  }
1445
1492
  }
1446
1493
  function getLatestValueComputed(e) {
1447
- if (!e.he) {
1494
+ if (!e.pe) {
1448
1495
  const t = latestReadActive;
1449
1496
  latestReadActive = false;
1450
1497
  const n = pendingCheckActive;
1451
1498
  pendingCheckActive = false;
1452
1499
  const i = context;
1453
1500
  context = null;
1454
- e.he = optimisticComputed(() => read(e));
1455
- e.he.de = e;
1501
+ e.pe = optimisticComputed(() => read(e));
1502
+ e.pe.Se = e;
1456
1503
  context = i;
1457
1504
  pendingCheckActive = n;
1458
1505
  latestReadActive = t;
1459
1506
  }
1460
- return e.he;
1507
+ return e.pe;
1461
1508
  }
1462
1509
  function staleValues(e, t = true) {
1463
1510
  const n = stale;
@@ -1518,7 +1565,7 @@ function getContext(e, t = getOwner()) {
1518
1565
  if (!t) {
1519
1566
  throw new NoOwnerError();
1520
1567
  }
1521
- const n = hasContext(e, t) ? t.ke[e.id] : e.defaultValue;
1568
+ const n = hasContext(e, t) ? t.Le[e.id] : e.defaultValue;
1522
1569
  if (isUndefined(n)) {
1523
1570
  throw new ContextNotFoundError();
1524
1571
  }
@@ -1528,10 +1575,10 @@ function setContext(e, t, n = getOwner()) {
1528
1575
  if (!n) {
1529
1576
  throw new NoOwnerError();
1530
1577
  }
1531
- n.ke = { ...n.ke, [e.id]: isUndefined(t) ? e.defaultValue : t };
1578
+ n.Le = { ...n.Le, [e.id]: isUndefined(t) ? e.defaultValue : t };
1532
1579
  }
1533
1580
  function hasContext(e, t) {
1534
- return !isUndefined(t?.ke[e.id]);
1581
+ return !isUndefined(t?.Le[e.id]);
1535
1582
  }
1536
1583
  function isUndefined(e) {
1537
1584
  return typeof e === "undefined";
@@ -1547,13 +1594,13 @@ function action(e) {
1547
1594
  new Promise((n, i) => {
1548
1595
  const r = e(...t);
1549
1596
  globalQueue.initTransition();
1550
- let s = activeTransition;
1551
- s.ee.push(r);
1597
+ let o = activeTransition;
1598
+ o.ee.push(r);
1552
1599
  const done = (e, t) => {
1553
- s = currentTransition(s);
1554
- const o = s.ee.indexOf(r);
1555
- if (o >= 0) s.ee.splice(o, 1);
1556
- setActiveTransition(s);
1600
+ o = currentTransition(o);
1601
+ const s = o.ee.indexOf(r);
1602
+ if (s >= 0) o.ee.splice(s, 1);
1603
+ setActiveTransition(o);
1557
1604
  schedule();
1558
1605
  t ? i(t) : n(e);
1559
1606
  };
@@ -1565,32 +1612,37 @@ function action(e) {
1565
1612
  return done(undefined, e);
1566
1613
  }
1567
1614
  if (n instanceof Promise)
1568
- return void n.then(run, e => restoreTransition(s, () => step(e, true)));
1615
+ return void n.then(run, e => restoreTransition(o, () => step(e, true)));
1569
1616
  run(n);
1570
1617
  };
1571
1618
  const run = e => {
1572
1619
  if (e.done) return done(e.value);
1573
1620
  if (e.value instanceof Promise)
1574
1621
  return void e.value.then(
1575
- e => restoreTransition(s, () => step(e)),
1576
- e => restoreTransition(s, () => step(e, true))
1622
+ e => restoreTransition(o, () => step(e)),
1623
+ e => restoreTransition(o, () => step(e, true))
1577
1624
  );
1578
- restoreTransition(s, () => step(e.value));
1625
+ restoreTransition(o, () => step(e.value));
1579
1626
  };
1580
1627
  step();
1581
1628
  });
1582
1629
  }
1630
+ function accessor(e) {
1631
+ const t = read.bind(null, e);
1632
+ t.$r = true;
1633
+ return t;
1634
+ }
1583
1635
  function createSignal(e, t, n) {
1584
1636
  if (typeof e === "function") {
1585
1637
  const i = computed(e, t, n);
1586
- return [read.bind(null, i), setSignal.bind(null, i)];
1638
+ return [accessor(i), setSignal.bind(null, i)];
1587
1639
  }
1588
1640
  const i = signal(e, t);
1589
- return [read.bind(null, i), setSignal.bind(null, i)];
1641
+ return [accessor(i), setSignal.bind(null, i)];
1590
1642
  }
1591
1643
  function createMemo(e, t, n) {
1592
1644
  let i = computed(e, t, n);
1593
- return read.bind(null, i);
1645
+ return accessor(i);
1594
1646
  }
1595
1647
  function createEffect(e, t, n, i) {
1596
1648
  effect(e, t.effect || t, t.error, n, i);
@@ -1638,7 +1690,7 @@ function resolve(e) {
1638
1690
  }
1639
1691
  function createOptimistic(e, t, n) {
1640
1692
  const i = typeof e === "function" ? optimisticComputed(e, t, n) : optimisticSignal(e, t);
1641
- return [read.bind(null, i), setSignal.bind(null, i)];
1693
+ return [accessor(i), setSignal.bind(null, i)];
1642
1694
  }
1643
1695
  function onSettled(e) {
1644
1696
  getOwner()
@@ -1660,128 +1712,128 @@ function getAllKeys(e, t, n) {
1660
1712
  const r = Object.keys(n);
1661
1713
  return Array.from(new Set([...i, ...r]));
1662
1714
  }
1663
- function applyState(e, t, n, i) {
1664
- const r = t?.[$TARGET];
1665
- if (!r) return;
1666
- const s = r[STORE_VALUE];
1667
- const o = r[STORE_OVERRIDE];
1668
- const u = r[STORE_OPTIMISTIC_OVERRIDE];
1669
- let c = r[STORE_NODE];
1670
- if (e === s && !o && !u) return;
1671
- (r[STORE_LOOKUP] || storeLookup).set(e, r[$PROXY]);
1672
- r[STORE_VALUE] = e;
1673
- r[STORE_OVERRIDE] = undefined;
1674
- if (Array.isArray(s)) {
1715
+ function applyState(e, t, n) {
1716
+ const i = t?.[$TARGET];
1717
+ if (!i) return;
1718
+ const r = i[STORE_VALUE];
1719
+ const o = i[STORE_OVERRIDE];
1720
+ const s = i[STORE_OPTIMISTIC_OVERRIDE];
1721
+ let u = i[STORE_NODE];
1722
+ if (e === r && !o && !s) return;
1723
+ (i[STORE_LOOKUP] || storeLookup).set(e, i[$PROXY]);
1724
+ i[STORE_VALUE] = e;
1725
+ i[STORE_OVERRIDE] = undefined;
1726
+ if (Array.isArray(r)) {
1675
1727
  let t = false;
1676
- const l = getOverrideValue(s, o, c, "length", u);
1677
- if (e.length && l && e[0] && n(e[0]) != null) {
1678
- let a, f, E, T, d, S, R, O;
1728
+ const c = getOverrideValue(r, o, u, "length", s);
1729
+ if (e.length && c && e[0] && n(e[0]) != null) {
1730
+ let a, l, f, E, T, d, S, R;
1679
1731
  for (
1680
- E = 0, T = Math.min(l, e.length);
1681
- E < T &&
1682
- ((S = getOverrideValue(s, o, c, E, u)) === e[E] || (S && e[E] && n(S) === n(e[E])));
1683
- E++
1732
+ f = 0, E = Math.min(c, e.length);
1733
+ f < E &&
1734
+ ((d = getOverrideValue(r, o, u, f, s)) === e[f] || (d && e[f] && n(d) === n(e[f])));
1735
+ f++
1684
1736
  ) {
1685
- applyState(e[E], wrap(S, r), n, i);
1737
+ applyState(e[f], wrap(d, i), n);
1686
1738
  }
1687
- const _ = new Array(e.length),
1688
- I = new Map();
1739
+ const O = new Array(e.length),
1740
+ _ = new Map();
1689
1741
  for (
1690
- T = l - 1, d = e.length - 1;
1691
- T >= E &&
1692
- d >= E &&
1693
- ((S = getOverrideValue(s, o, c, T, u)) === e[d] || (S && e[d] && n(S) === n(e[d])));
1694
- T--, d--
1742
+ E = c - 1, T = e.length - 1;
1743
+ E >= f &&
1744
+ T >= f &&
1745
+ ((d = getOverrideValue(r, o, u, E, s)) === e[T] || (d && e[T] && n(d) === n(e[T])));
1746
+ E--, T--
1695
1747
  ) {
1696
- _[d] = S;
1748
+ O[T] = d;
1697
1749
  }
1698
- if (E > d || E > T) {
1699
- for (f = E; f <= d; f++) {
1750
+ if (f > T || f > E) {
1751
+ for (l = f; l <= T; l++) {
1700
1752
  t = true;
1701
- r[STORE_NODE][f] && setSignal(r[STORE_NODE][f], wrap(e[f], r));
1753
+ i[STORE_NODE][l] && setSignal(i[STORE_NODE][l], wrap(e[l], i));
1702
1754
  }
1703
- for (; f < e.length; f++) {
1755
+ for (; l < e.length; l++) {
1704
1756
  t = true;
1705
- const s = wrap(_[f], r);
1706
- r[STORE_NODE][f] && setSignal(r[STORE_NODE][f], s);
1707
- applyState(e[f], s, n, i);
1757
+ const r = wrap(O[l], i);
1758
+ i[STORE_NODE][l] && setSignal(i[STORE_NODE][l], r);
1759
+ applyState(e[l], r, n);
1708
1760
  }
1709
- t && r[STORE_NODE][$TRACK] && setSignal(r[STORE_NODE][$TRACK], void 0);
1710
- l !== e.length && r[STORE_NODE].length && setSignal(r[STORE_NODE].length, e.length);
1761
+ t && i[STORE_NODE][$TRACK] && setSignal(i[STORE_NODE][$TRACK], void 0);
1762
+ c !== e.length && i[STORE_NODE].length && setSignal(i[STORE_NODE].length, e.length);
1711
1763
  return;
1712
1764
  }
1713
- R = new Array(d + 1);
1714
- for (f = d; f >= E; f--) {
1715
- S = e[f];
1716
- O = S ? n(S) : S;
1717
- a = I.get(O);
1718
- R[f] = a === undefined ? -1 : a;
1719
- I.set(O, f);
1720
- }
1721
- for (a = E; a <= T; a++) {
1722
- S = getOverrideValue(s, o, c, a, u);
1723
- O = S ? n(S) : S;
1724
- f = I.get(O);
1725
- if (f !== undefined && f !== -1) {
1726
- _[f] = S;
1727
- f = R[f];
1728
- I.set(O, f);
1765
+ S = new Array(T + 1);
1766
+ for (l = T; l >= f; l--) {
1767
+ d = e[l];
1768
+ R = d ? n(d) : d;
1769
+ a = _.get(R);
1770
+ S[l] = a === undefined ? -1 : a;
1771
+ _.set(R, l);
1772
+ }
1773
+ for (a = f; a <= E; a++) {
1774
+ d = getOverrideValue(r, o, u, a, s);
1775
+ R = d ? n(d) : d;
1776
+ l = _.get(R);
1777
+ if (l !== undefined && l !== -1) {
1778
+ O[l] = d;
1779
+ l = S[l];
1780
+ _.set(R, l);
1729
1781
  }
1730
1782
  }
1731
- for (f = E; f < e.length; f++) {
1732
- if (f in _) {
1733
- const t = wrap(_[f], r);
1734
- r[STORE_NODE][f] && setSignal(r[STORE_NODE][f], t);
1735
- applyState(e[f], t, n, i);
1736
- } else r[STORE_NODE][f] && setSignal(r[STORE_NODE][f], wrap(e[f], r));
1783
+ for (l = f; l < e.length; l++) {
1784
+ if (l in O) {
1785
+ const t = wrap(O[l], i);
1786
+ i[STORE_NODE][l] && setSignal(i[STORE_NODE][l], t);
1787
+ applyState(e[l], t, n);
1788
+ } else i[STORE_NODE][l] && setSignal(i[STORE_NODE][l], wrap(e[l], i));
1737
1789
  }
1738
- if (E < e.length) t = true;
1790
+ if (f < e.length) t = true;
1739
1791
  } else if (e.length) {
1740
- for (let t = 0, l = e.length; t < l; t++) {
1741
- const l = getOverrideValue(s, o, c, t, u);
1742
- isWrappable(l)
1743
- ? applyState(e[t], wrap(l, r), n, i)
1744
- : r[STORE_NODE][t] && setSignal(r[STORE_NODE][t], e[t]);
1792
+ for (let t = 0, c = e.length; t < c; t++) {
1793
+ const c = getOverrideValue(r, o, u, t, s);
1794
+ isWrappable(c)
1795
+ ? applyState(e[t], wrap(c, i), n)
1796
+ : i[STORE_NODE][t] && setSignal(i[STORE_NODE][t], e[t]);
1745
1797
  }
1746
1798
  }
1747
- if (l !== e.length) {
1799
+ if (c !== e.length) {
1748
1800
  t = true;
1749
- r[STORE_NODE].length && setSignal(r[STORE_NODE].length, e.length);
1801
+ i[STORE_NODE].length && setSignal(i[STORE_NODE].length, e.length);
1750
1802
  }
1751
- t && r[STORE_NODE][$TRACK] && setSignal(r[STORE_NODE][$TRACK], void 0);
1803
+ t && i[STORE_NODE][$TRACK] && setSignal(i[STORE_NODE][$TRACK], void 0);
1752
1804
  return;
1753
1805
  }
1754
- if (c) {
1755
- const t = c[$TRACK];
1756
- const l = t || i ? getAllKeys(s, o, e) : Object.keys(c);
1757
- for (let a = 0, f = l.length; a < f; a++) {
1758
- const f = l[a];
1759
- const E = c[f];
1760
- const T = unwrap(getOverrideValue(s, o, c, f, u));
1761
- let d = unwrap(e[f]);
1762
- if (T === d) continue;
1763
- if (!T || !isWrappable(T) || !isWrappable(d) || (n(T) != null && n(T) !== n(d))) {
1806
+ if (u) {
1807
+ const t = u[$TRACK];
1808
+ const c = t ? getAllKeys(r, o, e) : Object.keys(u);
1809
+ for (let a = 0, l = c.length; a < l; a++) {
1810
+ const l = c[a];
1811
+ const f = u[l];
1812
+ const E = unwrap(getOverrideValue(r, o, u, l, s));
1813
+ let T = unwrap(e[l]);
1814
+ if (E === T) continue;
1815
+ if (!E || !isWrappable(E) || !isWrappable(T) || (n(E) != null && n(E) !== n(T))) {
1764
1816
  t && setSignal(t, void 0);
1765
- E && setSignal(E, isWrappable(d) ? wrap(d, r) : d);
1766
- } else applyState(d, wrap(T, r), n, i);
1817
+ f && setSignal(f, isWrappable(T) ? wrap(T, i) : T);
1818
+ } else applyState(T, wrap(E, i), n);
1767
1819
  }
1768
1820
  }
1769
- if ((c = r[STORE_HAS])) {
1770
- const t = Object.keys(c);
1821
+ if ((u = i[STORE_HAS])) {
1822
+ const t = Object.keys(u);
1771
1823
  for (let n = 0, i = t.length; n < i; n++) {
1772
1824
  const i = t[n];
1773
- setSignal(c[i], i in e);
1825
+ setSignal(u[i], i in e);
1774
1826
  }
1775
1827
  }
1776
1828
  }
1777
- function reconcile(e, t, n = false) {
1778
- return i => {
1779
- if (i == null) throw new Error("Cannot reconcile null or undefined state");
1780
- const r = typeof t === "string" ? e => e[t] : t;
1781
- const s = r(i);
1782
- if (s !== undefined && r(e) !== r(i))
1829
+ function reconcile(e, t) {
1830
+ return n => {
1831
+ if (n == null) throw new Error("Cannot reconcile null or undefined state");
1832
+ const i = typeof t === "string" ? e => e[t] : t;
1833
+ const r = i(n);
1834
+ if (r !== undefined && i(e) !== i(n))
1783
1835
  throw new Error("Cannot reconcile states with different identity");
1784
- applyState(e, i, r, n);
1836
+ applyState(e, n, i);
1785
1837
  };
1786
1838
  }
1787
1839
  function createProjectionInternal(e, t = {}, n) {
@@ -1804,18 +1856,18 @@ function createProjectionInternal(e, t = {}, n) {
1804
1856
  r.set(e, t);
1805
1857
  return t;
1806
1858
  };
1807
- const s = wrapProjection(t);
1859
+ const o = wrapProjection(t);
1808
1860
  i = computed(() => {
1809
1861
  const t = getOwner();
1810
- storeSetter(new Proxy(s, writeTraps), i => {
1862
+ storeSetter(new Proxy(o, writeTraps), i => {
1811
1863
  const r = handleAsync(t, e(i), e => {
1812
- e !== i && e !== undefined && storeSetter(s, reconcile(e, n?.key || "id", n?.all));
1864
+ e !== i && e !== undefined && storeSetter(o, reconcile(e, n?.key || "id"));
1813
1865
  });
1814
- r !== i && r !== undefined && reconcile(r, n?.key || "id", n?.all)(s);
1866
+ r !== i && r !== undefined && reconcile(r, n?.key || "id")(o);
1815
1867
  });
1816
1868
  });
1817
- i.Ce = true;
1818
- return { store: s, node: i };
1869
+ i.Pe = true;
1870
+ return { store: o, node: i };
1819
1871
  }
1820
1872
  function createProjection(e, t = {}, n) {
1821
1873
  return createProjectionInternal(e, t, n).store;
@@ -1857,11 +1909,9 @@ const writeTraps = {
1857
1909
  }
1858
1910
  };
1859
1911
  const $TRACK = Symbol(0),
1860
- $DEEP = Symbol(0),
1861
1912
  $TARGET = Symbol(0),
1862
1913
  $PROXY = Symbol(0),
1863
1914
  $DELETED = Symbol(0);
1864
- const PARENTS = new WeakMap();
1865
1915
  const STORE_VALUE = "v",
1866
1916
  STORE_OVERRIDE = "o",
1867
1917
  STORE_OPTIMISTIC_OVERRIDE = "x",
@@ -1902,7 +1952,7 @@ function getNodes(e, t) {
1902
1952
  if (!n) e[t] = n = Object.create(null);
1903
1953
  return n;
1904
1954
  }
1905
- function getNode(e, t, n, i, r = isEqual, s, o) {
1955
+ function getNode(e, t, n, i, r = isEqual, o, s) {
1906
1956
  if (e[t]) return e[t];
1907
1957
  const u = signal(
1908
1958
  n,
@@ -1914,9 +1964,11 @@ function getNode(e, t, n, i, r = isEqual, s, o) {
1914
1964
  },
1915
1965
  i
1916
1966
  );
1917
- if (s) u._e = true;
1918
- if (o && t in o) {
1919
- const e = o[t];
1967
+ if (o) {
1968
+ u.Te = NOT_PENDING;
1969
+ }
1970
+ if (s && t in s) {
1971
+ const e = s[t];
1920
1972
  u.re = e === undefined ? NO_SNAPSHOT : e;
1921
1973
  snapshotSources?.add(u);
1922
1974
  }
@@ -1932,8 +1984,8 @@ function getKeys(e, t, n = true) {
1932
1984
  const i = untrack(() => (n ? Object.keys(e) : Reflect.ownKeys(e)));
1933
1985
  if (!t) return i;
1934
1986
  const r = new Set(i);
1935
- const s = Reflect.ownKeys(t);
1936
- for (const e of s) {
1987
+ const o = Reflect.ownKeys(t);
1988
+ for (const e of o) {
1937
1989
  if (t[e] !== $DELETED) r.add(e);
1938
1990
  else r.delete(e);
1939
1991
  }
@@ -1953,16 +2005,16 @@ const storeTraps = {
1953
2005
  if (t === $TARGET) return e;
1954
2006
  if (t === $PROXY) return n;
1955
2007
  if (t === $REFRESH) return e[STORE_FIREWALL];
1956
- if (t === $TRACK || t === $DEEP) {
1957
- trackSelf(e, t);
2008
+ if (t === $TRACK) {
2009
+ trackSelf(e);
1958
2010
  return n;
1959
2011
  }
1960
2012
  const i = getNodes(e, STORE_NODE);
1961
2013
  const r = i[t];
1962
- const s = e[STORE_OPTIMISTIC_OVERRIDE] && t in e[STORE_OPTIMISTIC_OVERRIDE];
1963
- const o = s || (e[STORE_OVERRIDE] && t in e[STORE_OVERRIDE]);
2014
+ const o = e[STORE_OPTIMISTIC_OVERRIDE] && t in e[STORE_OPTIMISTIC_OVERRIDE];
2015
+ const s = o || (e[STORE_OVERRIDE] && t in e[STORE_OVERRIDE]);
1964
2016
  const u = !!e[STORE_VALUE][$TARGET];
1965
- const c = s
2017
+ const c = o
1966
2018
  ? e[STORE_OPTIMISTIC_OVERRIDE]
1967
2019
  : e[STORE_OVERRIDE] && t in e[STORE_OVERRIDE]
1968
2020
  ? e[STORE_OVERRIDE]
@@ -1972,29 +2024,36 @@ const storeTraps = {
1972
2024
  if (e && e.get) return e.get.call(n);
1973
2025
  }
1974
2026
  if (writeOnly(n)) {
1975
- let n = r && (o || !u) ? (r.ae !== NOT_PENDING ? (r._e ? r.fe : r.ae) : r.fe) : c[t];
2027
+ let n =
2028
+ r && (s || !u)
2029
+ ? r.Te !== undefined && r.Te !== NOT_PENDING
2030
+ ? r.Te
2031
+ : r.le !== NOT_PENDING
2032
+ ? r.le
2033
+ : r.fe
2034
+ : c[t];
1976
2035
  n === $DELETED && (n = undefined);
1977
2036
  if (!isWrappable(n)) return n;
1978
2037
  const i = wrap(n, e);
1979
2038
  Writing?.add(i);
1980
2039
  return i;
1981
2040
  }
1982
- let l = r ? (o || !u ? read(i[t]) : (read(i[t]), c[t])) : c[t];
1983
- l === $DELETED && (l = undefined);
2041
+ let a = r ? (s || !u ? read(i[t]) : (read(i[t]), c[t])) : c[t];
2042
+ a === $DELETED && (a = undefined);
1984
2043
  if (!r) {
1985
- if (!o && typeof l === "function" && !c.hasOwnProperty(t)) {
2044
+ if (!s && typeof a === "function" && !c.hasOwnProperty(t)) {
1986
2045
  let t;
1987
2046
  return !Array.isArray(e[STORE_VALUE]) &&
1988
2047
  (t = Object.getPrototypeOf(e[STORE_VALUE])) &&
1989
2048
  t !== Object.prototype
1990
- ? l.bind(c)
1991
- : l;
2049
+ ? a.bind(c)
2050
+ : a;
1992
2051
  } else if (getObserver()) {
1993
2052
  return read(
1994
2053
  getNode(
1995
2054
  i,
1996
2055
  t,
1997
- isWrappable(l) ? wrap(l, e) : l,
2056
+ isWrappable(a) ? wrap(a, e) : a,
1998
2057
  e[STORE_FIREWALL],
1999
2058
  isEqual,
2000
2059
  e[STORE_OPTIMISTIC],
@@ -2003,7 +2062,7 @@ const storeTraps = {
2003
2062
  );
2004
2063
  }
2005
2064
  }
2006
- return isWrappable(l) ? wrap(l, e) : l;
2065
+ return isWrappable(a) ? wrap(a, e) : a;
2007
2066
  },
2008
2067
  has(e, t) {
2009
2068
  if (t === $PROXY || t === $TRACK || t === "__proto__") return true;
@@ -2028,45 +2087,44 @@ const storeTraps = {
2028
2087
  }
2029
2088
  untrack(() => {
2030
2089
  const r = e[STORE_VALUE];
2031
- const s = r[t];
2032
- if (snapshotCaptureActive && typeof t !== "symbol") {
2090
+ const o = r[t];
2091
+ if (
2092
+ snapshotCaptureActive &&
2093
+ typeof t !== "symbol" &&
2094
+ !((e[STORE_FIREWALL]?.Ee ?? 0) & STATUS_PENDING)
2095
+ ) {
2033
2096
  if (!e[STORE_SNAPSHOT_PROPS]) {
2034
2097
  e[STORE_SNAPSHOT_PROPS] = Object.create(null);
2035
2098
  snapshotSources?.add(e);
2036
2099
  }
2037
2100
  if (!(t in e[STORE_SNAPSHOT_PROPS])) {
2038
- e[STORE_SNAPSHOT_PROPS][t] = s;
2101
+ e[STORE_SNAPSHOT_PROPS][t] = o;
2039
2102
  }
2040
2103
  }
2041
- const o = e[STORE_OPTIMISTIC] && !projectionWriteActive;
2042
- const u = o ? STORE_OPTIMISTIC_OVERRIDE : STORE_OVERRIDE;
2043
- if (o) trackOptimisticStore(i);
2104
+ const s = e[STORE_OPTIMISTIC] && !projectionWriteActive;
2105
+ const u = s ? STORE_OPTIMISTIC_OVERRIDE : STORE_OVERRIDE;
2106
+ if (s) trackOptimisticStore(i);
2044
2107
  const c =
2045
2108
  e[STORE_OPTIMISTIC_OVERRIDE] && t in e[STORE_OPTIMISTIC_OVERRIDE]
2046
2109
  ? e[STORE_OPTIMISTIC_OVERRIDE][t]
2047
2110
  : e[STORE_OVERRIDE] && t in e[STORE_OVERRIDE]
2048
2111
  ? e[STORE_OVERRIDE][t]
2049
- : s;
2050
- const l = n?.[$TARGET]?.[STORE_VALUE] ?? n;
2051
- if (c === l) return true;
2052
- const a = e[STORE_OPTIMISTIC_OVERRIDE]?.length || e[STORE_OVERRIDE]?.length || r.length;
2053
- if (l !== undefined && l === s) delete e[u][t];
2054
- else (e[u] || (e[u] = Object.create(null)))[t] = l;
2055
- const f = isWrappable(l);
2056
- if (isWrappable(c)) {
2057
- const e = PARENTS.get(c);
2058
- e && (e instanceof Set ? e.delete(i) : PARENTS.delete(c));
2059
- }
2060
- if (recursivelyNotify(i, storeLookup) && f) recursivelyAddParent(l, i);
2112
+ : o;
2113
+ const a = n?.[$TARGET]?.[STORE_VALUE] ?? n;
2114
+ if (c === a) return true;
2115
+ const l = e[STORE_OPTIMISTIC_OVERRIDE]?.length || e[STORE_OVERRIDE]?.length || r.length;
2116
+ if (a !== undefined && a === o) delete e[u][t];
2117
+ else (e[u] || (e[u] = Object.create(null)))[t] = a;
2118
+ const f = isWrappable(a);
2061
2119
  e[STORE_HAS]?.[t] && setSignal(e[STORE_HAS][t], true);
2062
2120
  const E = getNodes(e, STORE_NODE);
2063
- E[t] && setSignal(E[t], () => (f ? wrap(l, e) : l));
2121
+ E[t] && setSignal(E[t], () => (f ? wrap(a, e) : a));
2064
2122
  if (Array.isArray(r)) {
2065
2123
  if (t === "length") {
2066
- E.length && setSignal(E.length, l);
2124
+ E.length && setSignal(E.length, a);
2067
2125
  } else {
2068
2126
  const e = parseInt(t) + 1;
2069
- if (e > a) E.length && setSignal(E.length, e);
2127
+ if (e > l) E.length && setSignal(E.length, e);
2070
2128
  }
2071
2129
  }
2072
2130
  E[$TRACK] && setSignal(E[$TRACK], undefined);
@@ -2093,14 +2151,10 @@ const storeTraps = {
2093
2151
  } else if (e[i] && t in e[i]) {
2094
2152
  delete e[i][t];
2095
2153
  } else return true;
2096
- if (isWrappable(r)) {
2097
- const t = PARENTS.get(r);
2098
- t && (t instanceof Set ? t.delete(e) : PARENTS.delete(r));
2099
- }
2100
2154
  if (e[STORE_HAS]?.[t]) setSignal(e[STORE_HAS][t], false);
2101
- const s = getNodes(e, STORE_NODE);
2102
- s[t] && setSignal(s[t], undefined);
2103
- s[$TRACK] && setSignal(s[$TRACK], undefined);
2155
+ const o = getNodes(e, STORE_NODE);
2156
+ o[t] && setSignal(o[t], undefined);
2157
+ o[$TRACK] && setSignal(o[$TRACK], undefined);
2104
2158
  });
2105
2159
  }
2106
2160
  return true;
@@ -2167,66 +2221,13 @@ function createStore(e, t, n) {
2167
2221
  r = i ? createProjectionInternal(e, t, n).store : wrap(e);
2168
2222
  return [r, e => storeSetter(r, e)];
2169
2223
  }
2170
- function recursivelyNotify(e, t) {
2171
- let n = e[$TARGET] || t?.get(e)?.[$TARGET];
2172
- let i = false;
2173
- if (n) {
2174
- const e = getNodes(n, STORE_NODE)[$DEEP];
2175
- if (e) {
2176
- setSignal(e, undefined);
2177
- i = true;
2178
- }
2179
- t = n[STORE_LOOKUP] || t;
2180
- }
2181
- const r = PARENTS.get(n?.[STORE_VALUE] || e);
2182
- if (!r) return i;
2183
- if (r instanceof Set) {
2184
- for (let e of r) i = recursivelyNotify(e, t) || i;
2185
- } else i = recursivelyNotify(r, t) || i;
2186
- return i;
2187
- }
2188
- function recursivelyAddParent(e, t) {
2189
- let n;
2190
- const i = e[$TARGET];
2191
- if (i) {
2192
- n = i[STORE_OVERRIDE];
2193
- e = i[STORE_VALUE];
2194
- }
2195
- if (t) {
2196
- let n = PARENTS.get(e);
2197
- if (!n) PARENTS.set(e, t);
2198
- else if (n !== t) {
2199
- if (!(n instanceof Set)) PARENTS.set(e, (n = new Set([n])));
2200
- else if (n.has(t)) return;
2201
- n.add(t);
2202
- } else return;
2203
- }
2204
- if (Array.isArray(e)) {
2205
- const t = n?.length || e.length;
2206
- for (let i = 0; i < t; i++) {
2207
- const t = n && i in n ? n[i] : e[i];
2208
- isWrappable(t) && recursivelyAddParent(t, e);
2209
- }
2210
- } else {
2211
- const t = getKeys(e, n);
2212
- for (let i = 0; i < t.length; i++) {
2213
- const r = t[i];
2214
- const s = n && r in n ? n[r] : e[r];
2215
- isWrappable(s) && recursivelyAddParent(s, e);
2216
- }
2217
- }
2218
- }
2219
- function deep(e) {
2220
- recursivelyAddParent(e);
2221
- return e[$DEEP];
2222
- }
2223
2224
  function createOptimisticStore(e, t, n) {
2224
- GlobalQueue.Z ||= clearOptimisticStore;
2225
+ GlobalQueue.B ||= clearOptimisticStore;
2225
2226
  const i = typeof e === "function";
2226
2227
  const r = (i ? t : e) ?? {};
2227
- const s = i ? e : undefined;
2228
- const { store: o } = createOptimisticProjectionInternal(s, r, n);
2229
- return [o, e => storeSetter(o, e)];
2228
+ const o = i ? e : undefined;
2229
+ const { store: s } = createOptimisticProjectionInternal(o, r, n);
2230
+ return [s, e => storeSetter(s, e)];
2230
2231
  }
2231
2232
  function clearOptimisticStore(e) {
2232
2233
  const t = e[$TARGET];
@@ -2276,30 +2277,30 @@ function createOptimisticProjectionInternal(e, t = {}, n) {
2276
2277
  r.set(e, t);
2277
2278
  return t;
2278
2279
  };
2279
- const s = wrapProjection(t);
2280
+ const o = wrapProjection(t);
2280
2281
  if (e) {
2281
2282
  i = computed(() => {
2282
2283
  const t = getOwner();
2283
2284
  setProjectionWriteActive(true);
2284
2285
  try {
2285
- storeSetter(new Proxy(s, writeTraps), i => {
2286
+ storeSetter(new Proxy(o, writeTraps), i => {
2286
2287
  const r = handleAsync(t, e(i), e => {
2287
2288
  setProjectionWriteActive(true);
2288
2289
  try {
2289
- e !== i && e !== undefined && storeSetter(s, reconcile(e, n?.key || "id", n?.all));
2290
+ e !== i && e !== undefined && storeSetter(o, reconcile(e, n?.key || "id"));
2290
2291
  } finally {
2291
2292
  setProjectionWriteActive(false);
2292
2293
  }
2293
2294
  });
2294
- r !== i && r !== undefined && reconcile(r, n?.key || "id", n?.all)(s);
2295
+ r !== i && r !== undefined && reconcile(r, n?.key || "id")(o);
2295
2296
  });
2296
2297
  } finally {
2297
2298
  setProjectionWriteActive(false);
2298
2299
  }
2299
2300
  });
2300
- i.Ce = true;
2301
+ i.Pe = true;
2301
2302
  }
2302
- return { store: s, node: i };
2303
+ return { store: o, node: i };
2303
2304
  }
2304
2305
  const DELETE = Symbol(0);
2305
2306
  function updatePath(e, t, n = 0) {
@@ -2307,8 +2308,8 @@ function updatePath(e, t, n = 0) {
2307
2308
  r = e;
2308
2309
  if (n < t.length - 1) {
2309
2310
  i = t[n];
2310
- const s = typeof i;
2311
- const o = Array.isArray(e);
2311
+ const o = typeof i;
2312
+ const s = Array.isArray(e);
2312
2313
  if (Array.isArray(i)) {
2313
2314
  for (let r = 0; r < i.length; r++) {
2314
2315
  t[n] = i[r];
@@ -2316,7 +2317,7 @@ function updatePath(e, t, n = 0) {
2316
2317
  }
2317
2318
  t[n] = i;
2318
2319
  return;
2319
- } else if (o && s === "function") {
2320
+ } else if (s && o === "function") {
2320
2321
  for (let r = 0; r < e.length; r++) {
2321
2322
  if (i(e[r], r)) {
2322
2323
  t[n] = r;
@@ -2325,9 +2326,9 @@ function updatePath(e, t, n = 0) {
2325
2326
  }
2326
2327
  t[n] = i;
2327
2328
  return;
2328
- } else if (o && s === "object") {
2329
- const { from: r = 0, to: s = e.length - 1, by: o = 1 } = i;
2330
- for (let i = r; i <= s; i += o) {
2329
+ } else if (s && o === "object") {
2330
+ const { from: r = 0, to: o = e.length - 1, by: s = 1 } = i;
2331
+ for (let i = r; i <= o; i += s) {
2331
2332
  t[n] = i;
2332
2333
  updatePath(e, t, n);
2333
2334
  }
@@ -2339,20 +2340,20 @@ function updatePath(e, t, n = 0) {
2339
2340
  }
2340
2341
  r = e[i];
2341
2342
  }
2342
- let s = t[t.length - 1];
2343
- if (typeof s === "function") {
2344
- s = s(r);
2345
- if (s === r) return;
2343
+ let o = t[t.length - 1];
2344
+ if (typeof o === "function") {
2345
+ o = o(r);
2346
+ if (o === r) return;
2346
2347
  }
2347
- if (i === undefined && s == undefined) return;
2348
- if (s === DELETE) {
2348
+ if (i === undefined && o == undefined) return;
2349
+ if (o === DELETE) {
2349
2350
  delete e[i];
2350
- } else if (i === undefined || (isWrappable(r) && isWrappable(s) && !Array.isArray(s))) {
2351
+ } else if (i === undefined || (isWrappable(r) && isWrappable(o) && !Array.isArray(o))) {
2351
2352
  const t = i !== undefined ? e[i] : e;
2352
- const n = Object.keys(s);
2353
- for (let e = 0; e < n.length; e++) t[n[e]] = s[n[e]];
2353
+ const n = Object.keys(o);
2354
+ for (let e = 0; e < n.length; e++) t[n[e]] = o[n[e]];
2354
2355
  } else {
2355
- e[i] = s;
2356
+ e[i] = o;
2356
2357
  }
2357
2358
  }
2358
2359
  const storePath = Object.assign(
@@ -2363,51 +2364,60 @@ const storePath = Object.assign(
2363
2364
  },
2364
2365
  { DELETE: DELETE }
2365
2366
  );
2366
- function snapshot(e, t, n) {
2367
- let i, r, s, o, u, c;
2367
+ function snapshotImpl(e, t, n, i) {
2368
+ let r, o, s, u, c, a;
2368
2369
  if (!isWrappable(e)) return e;
2369
- if (t && t.has(e)) return t.get(e);
2370
- if (!t) t = new Map();
2371
- if ((i = e[$TARGET] || n?.get(e)?.[$TARGET])) {
2372
- s = i[STORE_OVERRIDE];
2373
- r = Array.isArray(i[STORE_VALUE]);
2374
- t.set(
2370
+ if (n && n.has(e)) return n.get(e);
2371
+ if (!n) n = new Map();
2372
+ if ((r = e[$TARGET] || i?.get(e)?.[$TARGET])) {
2373
+ if (t) trackSelf(r, $TRACK);
2374
+ s = r[STORE_OVERRIDE];
2375
+ o = Array.isArray(r[STORE_VALUE]);
2376
+ n.set(
2375
2377
  e,
2376
- s ? (o = r ? [] : Object.create(Object.getPrototypeOf(i[STORE_VALUE]))) : i[STORE_VALUE]
2378
+ s ? (u = o ? [] : Object.create(Object.getPrototypeOf(r[STORE_VALUE]))) : r[STORE_VALUE]
2377
2379
  );
2378
- e = i[STORE_VALUE];
2379
- n = storeLookup;
2380
+ e = r[STORE_VALUE];
2381
+ i = storeLookup;
2380
2382
  } else {
2381
- r = Array.isArray(e);
2382
- t.set(e, e);
2383
+ o = Array.isArray(e);
2384
+ n.set(e, e);
2383
2385
  }
2384
- if (r) {
2385
- const i = s?.length || e.length;
2386
- for (let r = 0; r < i; r++) {
2387
- c = s && r in s ? s[r] : e[r];
2388
- if (c === $DELETED) continue;
2389
- if ((u = snapshot(c, t, n)) !== c || o) {
2390
- if (!o) t.set(e, (o = [...e]));
2391
- o[r] = u;
2386
+ if (o) {
2387
+ const o = s?.length || e.length;
2388
+ for (let l = 0; l < o; l++) {
2389
+ a = s && l in s ? s[l] : e[l];
2390
+ if (a === $DELETED) continue;
2391
+ if (t && isWrappable(a)) wrap(a, r);
2392
+ if ((c = snapshotImpl(a, t, n, i)) !== a || u) {
2393
+ if (!u) n.set(e, (u = [...e]));
2394
+ u[l] = c;
2392
2395
  }
2393
2396
  }
2394
2397
  } else {
2395
- const i = getKeys(e, s);
2396
- for (let r = 0, l = i.length; r < l; r++) {
2397
- let l = i[r];
2398
- const a = getPropertyDescriptor(e, s, l);
2399
- if (a.get) continue;
2400
- c = s && l in s ? s[l] : e[l];
2401
- if ((u = snapshot(c, t, n)) !== e[l] || o) {
2402
- if (!o) {
2403
- o = Object.create(Object.getPrototypeOf(e));
2404
- Object.assign(o, e);
2398
+ const o = getKeys(e, s);
2399
+ for (let l = 0, f = o.length; l < f; l++) {
2400
+ let f = o[l];
2401
+ const E = getPropertyDescriptor(e, s, f);
2402
+ if (E.get) continue;
2403
+ a = s && f in s ? s[f] : e[f];
2404
+ if (t && isWrappable(a)) wrap(a, r);
2405
+ if ((c = snapshotImpl(a, t, n, i)) !== e[f] || u) {
2406
+ if (!u) {
2407
+ u = Object.create(Object.getPrototypeOf(e));
2408
+ Object.assign(u, e);
2405
2409
  }
2406
- o[l] = u;
2410
+ u[f] = c;
2407
2411
  }
2408
2412
  }
2409
2413
  }
2410
- return o || e;
2414
+ return u || e;
2415
+ }
2416
+ function snapshot(e, t, n) {
2417
+ return snapshotImpl(e, false, t, n);
2418
+ }
2419
+ function deep(e) {
2420
+ return snapshotImpl(e, true);
2411
2421
  }
2412
2422
  function trueFn() {
2413
2423
  return true;
@@ -2449,8 +2459,8 @@ function merge(...e) {
2449
2459
  for (let i = 0; i < e.length; i++) {
2450
2460
  const r = e[i];
2451
2461
  t = t || (!!r && $PROXY in r);
2452
- const s = !!r && r[$SOURCES];
2453
- if (s) n.push(...s);
2462
+ const o = !!r && r[$SOURCES];
2463
+ if (o) n.push(...o);
2454
2464
  else n.push(typeof r === "function" ? ((t = true), createMemo(r)) : r);
2455
2465
  }
2456
2466
  if (SUPPORTS_PROXY && t) {
@@ -2480,35 +2490,35 @@ function merge(...e) {
2480
2490
  }
2481
2491
  const i = Object.create(null);
2482
2492
  let r = false;
2483
- let s = n.length - 1;
2484
- for (let e = s; e >= 0; e--) {
2493
+ let o = n.length - 1;
2494
+ for (let e = o; e >= 0; e--) {
2485
2495
  const t = n[e];
2486
2496
  if (!t) {
2487
- e === s && s--;
2497
+ e === o && o--;
2488
2498
  continue;
2489
2499
  }
2490
- const o = Object.getOwnPropertyNames(t);
2491
- for (let n = o.length - 1; n >= 0; n--) {
2492
- const u = o[n];
2500
+ const s = Object.getOwnPropertyNames(t);
2501
+ for (let n = s.length - 1; n >= 0; n--) {
2502
+ const u = s[n];
2493
2503
  if (u === "__proto__" || u === "constructor") continue;
2494
2504
  if (!i[u]) {
2495
- r = r || e !== s;
2505
+ r = r || e !== o;
2496
2506
  const n = Object.getOwnPropertyDescriptor(t, u);
2497
2507
  i[u] = n.get ? { enumerable: true, configurable: true, get: n.get.bind(t) } : n;
2498
2508
  }
2499
2509
  }
2500
2510
  }
2501
- if (!r) return n[s];
2502
- const o = {};
2511
+ if (!r) return n[o];
2512
+ const s = {};
2503
2513
  const u = Object.keys(i);
2504
2514
  for (let e = u.length - 1; e >= 0; e--) {
2505
2515
  const t = u[e],
2506
2516
  n = i[t];
2507
- if (n.get) Object.defineProperty(o, t, n);
2508
- else o[t] = n.value;
2517
+ if (n.get) Object.defineProperty(s, t, n);
2518
+ else s[t] = n.value;
2509
2519
  }
2510
- o[$SOURCES] = n;
2511
- return o;
2520
+ s[$SOURCES] = n;
2521
+ return s;
2512
2522
  }
2513
2523
  function omit(e, ...t) {
2514
2524
  const n = new Set(t);
@@ -2542,26 +2552,26 @@ function omit(e, ...t) {
2542
2552
  function mapArray(e, t, n) {
2543
2553
  const i = typeof n?.keyed === "function" ? n.keyed : undefined;
2544
2554
  const r = t.length > 1;
2545
- const s = t;
2555
+ const o = t;
2546
2556
  return createMemo(
2547
2557
  updateKeyedMap.bind({
2548
2558
  Fe: createOwner(),
2549
- $e: 0,
2550
- je: e,
2551
- Ke: [],
2552
- Ye: s,
2553
- Ze: [],
2559
+ Me: 0,
2560
+ $e: e,
2561
+ je: [],
2562
+ Ke: o,
2563
+ Ye: [],
2554
2564
  Be: [],
2555
- Xe: i,
2565
+ Ze: i,
2556
2566
  qe: i || n?.keyed === false ? [] : undefined,
2557
- ze: r ? [] : undefined,
2558
- Je: n?.fallback
2567
+ Xe: r ? [] : undefined,
2568
+ ze: n?.fallback
2559
2569
  })
2560
2570
  );
2561
2571
  }
2562
2572
  const pureOptions = { pureWrite: true };
2563
2573
  function updateKeyedMap() {
2564
- const e = this.je() || [],
2574
+ const e = this.$e() || [],
2565
2575
  t = e.length;
2566
2576
  e[$TRACK];
2567
2577
  runWithOwner(this.Fe, () => {
@@ -2570,192 +2580,189 @@ function updateKeyedMap() {
2570
2580
  r = this.qe
2571
2581
  ? () => {
2572
2582
  this.qe[i] = signal(e[i], pureOptions);
2573
- this.ze && (this.ze[i] = signal(i, pureOptions));
2574
- return this.Ye(
2575
- read.bind(null, this.qe[i]),
2576
- this.ze ? read.bind(null, this.ze[i]) : undefined
2577
- );
2583
+ this.Xe && (this.Xe[i] = signal(i, pureOptions));
2584
+ return this.Ke(accessor(this.qe[i]), this.Xe ? accessor(this.Xe[i]) : undefined);
2578
2585
  }
2579
- : this.ze
2586
+ : this.Xe
2580
2587
  ? () => {
2581
2588
  const t = e[i];
2582
- this.ze[i] = signal(i, pureOptions);
2583
- return this.Ye(() => t, read.bind(null, this.ze[i]));
2589
+ this.Xe[i] = signal(i, pureOptions);
2590
+ return this.Ke(() => t, accessor(this.Xe[i]));
2584
2591
  }
2585
2592
  : () => {
2586
2593
  const t = e[i];
2587
- return this.Ye(() => t);
2594
+ return this.Ke(() => t);
2588
2595
  };
2589
2596
  if (t === 0) {
2590
- if (this.$e !== 0) {
2597
+ if (this.Me !== 0) {
2591
2598
  this.Fe.dispose(false);
2592
2599
  this.Be = [];
2593
- this.Ke = [];
2594
- this.Ze = [];
2595
- this.$e = 0;
2600
+ this.je = [];
2601
+ this.Ye = [];
2602
+ this.Me = 0;
2596
2603
  this.qe && (this.qe = []);
2597
- this.ze && (this.ze = []);
2604
+ this.Xe && (this.Xe = []);
2598
2605
  }
2599
- if (this.Je && !this.Ze[0]) {
2600
- this.Ze[0] = runWithOwner((this.Be[0] = createOwner()), this.Je);
2606
+ if (this.ze && !this.Ye[0]) {
2607
+ this.Ye[0] = runWithOwner((this.Be[0] = createOwner()), this.ze);
2601
2608
  }
2602
- } else if (this.$e === 0) {
2609
+ } else if (this.Me === 0) {
2603
2610
  if (this.Be[0]) this.Be[0].dispose();
2604
- this.Ze = new Array(t);
2611
+ this.Ye = new Array(t);
2605
2612
  for (i = 0; i < t; i++) {
2606
- this.Ke[i] = e[i];
2607
- this.Ze[i] = runWithOwner((this.Be[i] = createOwner()), r);
2613
+ this.je[i] = e[i];
2614
+ this.Ye[i] = runWithOwner((this.Be[i] = createOwner()), r);
2608
2615
  }
2609
- this.$e = t;
2616
+ this.Me = t;
2610
2617
  } else {
2611
- let s,
2612
- o,
2618
+ let o,
2619
+ s,
2613
2620
  u,
2614
2621
  c,
2615
- l,
2616
2622
  a,
2623
+ l,
2617
2624
  f,
2618
2625
  E = new Array(t),
2619
2626
  T = new Array(t),
2620
2627
  d = this.qe ? new Array(t) : undefined,
2621
- S = this.ze ? new Array(t) : undefined;
2628
+ S = this.Xe ? new Array(t) : undefined;
2622
2629
  for (
2623
- s = 0, o = Math.min(this.$e, t);
2624
- s < o && (this.Ke[s] === e[s] || (this.qe && compare(this.Xe, this.Ke[s], e[s])));
2625
- s++
2630
+ o = 0, s = Math.min(this.Me, t);
2631
+ o < s && (this.je[o] === e[o] || (this.qe && compare(this.Ze, this.je[o], e[o])));
2632
+ o++
2626
2633
  ) {
2627
- if (this.qe) setSignal(this.qe[s], e[s]);
2634
+ if (this.qe) setSignal(this.qe[o], e[o]);
2628
2635
  }
2629
2636
  for (
2630
- o = this.$e - 1, u = t - 1;
2631
- o >= s &&
2632
- u >= s &&
2633
- (this.Ke[o] === e[u] || (this.qe && compare(this.Xe, this.Ke[o], e[u])));
2634
- o--, u--
2637
+ s = this.Me - 1, u = t - 1;
2638
+ s >= o &&
2639
+ u >= o &&
2640
+ (this.je[s] === e[u] || (this.qe && compare(this.Ze, this.je[s], e[u])));
2641
+ s--, u--
2635
2642
  ) {
2636
- E[u] = this.Ze[o];
2637
- T[u] = this.Be[o];
2638
- d && (d[u] = this.qe[o]);
2639
- S && (S[u] = this.ze[o]);
2643
+ E[u] = this.Ye[s];
2644
+ T[u] = this.Be[s];
2645
+ d && (d[u] = this.qe[s]);
2646
+ S && (S[u] = this.Xe[s]);
2640
2647
  }
2641
- a = new Map();
2648
+ l = new Map();
2642
2649
  f = new Array(u + 1);
2643
- for (i = u; i >= s; i--) {
2650
+ for (i = u; i >= o; i--) {
2644
2651
  c = e[i];
2645
- l = this.Xe ? this.Xe(c) : c;
2646
- n = a.get(l);
2652
+ a = this.Ze ? this.Ze(c) : c;
2653
+ n = l.get(a);
2647
2654
  f[i] = n === undefined ? -1 : n;
2648
- a.set(l, i);
2655
+ l.set(a, i);
2649
2656
  }
2650
- for (n = s; n <= o; n++) {
2651
- c = this.Ke[n];
2652
- l = this.Xe ? this.Xe(c) : c;
2653
- i = a.get(l);
2657
+ for (n = o; n <= s; n++) {
2658
+ c = this.je[n];
2659
+ a = this.Ze ? this.Ze(c) : c;
2660
+ i = l.get(a);
2654
2661
  if (i !== undefined && i !== -1) {
2655
- E[i] = this.Ze[n];
2662
+ E[i] = this.Ye[n];
2656
2663
  T[i] = this.Be[n];
2657
2664
  d && (d[i] = this.qe[n]);
2658
- S && (S[i] = this.ze[n]);
2665
+ S && (S[i] = this.Xe[n]);
2659
2666
  i = f[i];
2660
- a.set(l, i);
2667
+ l.set(a, i);
2661
2668
  } else this.Be[n].dispose();
2662
2669
  }
2663
- for (i = s; i < t; i++) {
2670
+ for (i = o; i < t; i++) {
2664
2671
  if (i in E) {
2665
- this.Ze[i] = E[i];
2672
+ this.Ye[i] = E[i];
2666
2673
  this.Be[i] = T[i];
2667
2674
  if (d) {
2668
2675
  this.qe[i] = d[i];
2669
2676
  setSignal(this.qe[i], e[i]);
2670
2677
  }
2671
2678
  if (S) {
2672
- this.ze[i] = S[i];
2673
- setSignal(this.ze[i], i);
2679
+ this.Xe[i] = S[i];
2680
+ setSignal(this.Xe[i], i);
2674
2681
  }
2675
2682
  } else {
2676
- this.Ze[i] = runWithOwner((this.Be[i] = createOwner()), r);
2683
+ this.Ye[i] = runWithOwner((this.Be[i] = createOwner()), r);
2677
2684
  }
2678
2685
  }
2679
- this.Ze = this.Ze.slice(0, (this.$e = t));
2680
- this.Ke = e.slice(0);
2686
+ this.Ye = this.Ye.slice(0, (this.Me = t));
2687
+ this.je = e.slice(0);
2681
2688
  }
2682
2689
  });
2683
- return this.Ze;
2690
+ return this.Ye;
2684
2691
  }
2685
2692
  function repeat(e, t, n) {
2686
2693
  const i = t;
2687
2694
  return updateRepeat.bind({
2688
2695
  Fe: createOwner(),
2689
- $e: 0,
2690
- et: 0,
2691
- tt: e,
2692
- Ye: i,
2696
+ Me: 0,
2697
+ Je: 0,
2698
+ et: e,
2699
+ Ke: i,
2693
2700
  Be: [],
2694
- Ze: [],
2695
- nt: n?.from,
2696
- Je: n?.fallback
2701
+ Ye: [],
2702
+ tt: n?.from,
2703
+ ze: n?.fallback
2697
2704
  });
2698
2705
  }
2699
2706
  function updateRepeat() {
2700
- const e = this.tt();
2701
- const t = this.nt?.() || 0;
2707
+ const e = this.et();
2708
+ const t = this.tt?.() || 0;
2702
2709
  runWithOwner(this.Fe, () => {
2703
2710
  if (e === 0) {
2704
- if (this.$e !== 0) {
2711
+ if (this.Me !== 0) {
2705
2712
  this.Fe.dispose(false);
2706
2713
  this.Be = [];
2707
- this.Ze = [];
2708
- this.$e = 0;
2714
+ this.Ye = [];
2715
+ this.Me = 0;
2709
2716
  }
2710
- if (this.Je && !this.Ze[0]) {
2711
- this.Ze[0] = runWithOwner((this.Be[0] = createOwner()), this.Je);
2717
+ if (this.ze && !this.Ye[0]) {
2718
+ this.Ye[0] = runWithOwner((this.Be[0] = createOwner()), this.ze);
2712
2719
  }
2713
2720
  return;
2714
2721
  }
2715
2722
  const n = t + e;
2716
- const i = this.et + this.$e;
2717
- if (this.$e === 0 && this.Be[0]) this.Be[0].dispose();
2718
- for (let e = n; e < i; e++) this.Be[e - this.et].dispose();
2719
- if (this.et < t) {
2720
- let e = this.et;
2721
- while (e < t && e < this.$e) this.Be[e++].dispose();
2722
- this.Be.splice(0, t - this.et);
2723
- this.Ze.splice(0, t - this.et);
2724
- } else if (this.et > t) {
2725
- let n = i - this.et - 1;
2726
- let r = this.et - t;
2727
- this.Be.length = this.Ze.length = e;
2723
+ const i = this.Je + this.Me;
2724
+ if (this.Me === 0 && this.Be[0]) this.Be[0].dispose();
2725
+ for (let e = n; e < i; e++) this.Be[e - this.Je].dispose();
2726
+ if (this.Je < t) {
2727
+ let e = this.Je;
2728
+ while (e < t && e < this.Me) this.Be[e++].dispose();
2729
+ this.Be.splice(0, t - this.Je);
2730
+ this.Ye.splice(0, t - this.Je);
2731
+ } else if (this.Je > t) {
2732
+ let n = i - this.Je - 1;
2733
+ let r = this.Je - t;
2734
+ this.Be.length = this.Ye.length = e;
2728
2735
  while (n >= r) {
2729
2736
  this.Be[n] = this.Be[n - r];
2730
- this.Ze[n] = this.Ze[n - r];
2737
+ this.Ye[n] = this.Ye[n - r];
2731
2738
  n--;
2732
2739
  }
2733
2740
  for (let e = 0; e < r; e++) {
2734
- this.Ze[e] = runWithOwner((this.Be[e] = createOwner()), () => this.Ye(e + t));
2741
+ this.Ye[e] = runWithOwner((this.Be[e] = createOwner()), () => this.Ke(e + t));
2735
2742
  }
2736
2743
  }
2737
2744
  for (let e = i; e < n; e++) {
2738
- this.Ze[e - t] = runWithOwner((this.Be[e - t] = createOwner()), () => this.Ye(e));
2745
+ this.Ye[e - t] = runWithOwner((this.Be[e - t] = createOwner()), () => this.Ke(e));
2739
2746
  }
2740
- this.Ze = this.Ze.slice(0, e);
2741
- this.et = t;
2742
- this.$e = e;
2747
+ this.Ye = this.Ye.slice(0, e);
2748
+ this.Je = t;
2749
+ this.Me = e;
2743
2750
  });
2744
- return this.Ze;
2751
+ return this.Ye;
2745
2752
  }
2746
2753
  function compare(e, t, n) {
2747
2754
  return e ? e(t) === e(n) : true;
2748
2755
  }
2749
2756
  function boundaryComputed(e, t) {
2750
2757
  const n = computed(e, undefined, { lazy: true });
2751
- n.Ae = (e, t) => {
2758
+ n.he = (e, t) => {
2752
2759
  const i = e !== undefined ? e : n.Ee;
2753
- const r = t !== undefined ? t : n.X;
2754
- n.Ee &= ~n.it;
2755
- n.ce.notify(n, n.it, i, r);
2760
+ const r = t !== undefined ? t : n.q;
2761
+ n.Ee &= ~n.nt;
2762
+ n.ce.notify(n, n.nt, i, r);
2756
2763
  };
2757
- n.it = t;
2758
- n.Ce = true;
2764
+ n.nt = t;
2765
+ n.Pe = true;
2759
2766
  recompute(n, true);
2760
2767
  return n;
2761
2768
  }
@@ -2768,64 +2775,90 @@ function createBoundChildren(e, t, n, i) {
2768
2775
  return boundaryComputed(() => staleValues(() => flatten(read(e))), i);
2769
2776
  });
2770
2777
  }
2778
+ const ON_INIT = Symbol();
2771
2779
  class CollectionQueue extends Queue {
2772
- rt;
2773
- st = new Set();
2780
+ it;
2781
+ rt = new Set();
2774
2782
  ot = signal(false, { pureWrite: true });
2775
- ut = false;
2783
+ st = false;
2784
+ ut;
2785
+ ct = ON_INIT;
2776
2786
  constructor(e) {
2777
2787
  super();
2778
- this.rt = e;
2788
+ this.it = e;
2779
2789
  }
2780
2790
  run(e) {
2781
2791
  if (!e || read(this.ot)) return;
2782
2792
  return super.run(e);
2783
2793
  }
2784
2794
  notify(e, t, n, i) {
2785
- if (!(t & this.rt) || (this.rt & STATUS_PENDING && this.ut)) return super.notify(e, t, n, i);
2786
- if (n & this.rt) {
2787
- const t = i?.source || e.X?.source;
2795
+ if (!(t & this.it)) return super.notify(e, t, n, i);
2796
+ if (this.st && this.ut) {
2797
+ const e = untrack(() => {
2798
+ try {
2799
+ return this.ut();
2800
+ } catch {
2801
+ return ON_INIT;
2802
+ }
2803
+ });
2804
+ if (e !== this.ct) {
2805
+ this.ct = e;
2806
+ this.st = false;
2807
+ this.rt.clear();
2808
+ }
2809
+ }
2810
+ if (this.it & STATUS_PENDING && this.st) return super.notify(e, t, n, i);
2811
+ if (n & this.it) {
2812
+ const t = i?.source || e.q?.source;
2788
2813
  if (t) {
2789
- const e = this.st.size === 0;
2790
- this.st.add(t);
2814
+ const e = this.rt.size === 0;
2815
+ this.rt.add(t);
2791
2816
  if (e) setSignal(this.ot, true);
2792
2817
  }
2793
2818
  }
2794
- t &= ~this.rt;
2819
+ t &= ~this.it;
2795
2820
  return t ? super.notify(e, t, n, i) : true;
2796
2821
  }
2797
2822
  checkSources() {
2798
- for (const e of this.st) {
2799
- if (!(e.Ee & this.rt)) this.st.delete(e);
2823
+ for (const e of this.rt) {
2824
+ if (!(e.Ee & this.it)) this.rt.delete(e);
2825
+ }
2826
+ if (!this.rt.size) {
2827
+ setSignal(this.ot, false);
2828
+ if (this.ut) {
2829
+ try {
2830
+ this.ct = untrack(() => this.ut());
2831
+ } catch {}
2832
+ }
2800
2833
  }
2801
- if (!this.st.size) setSignal(this.ot, false);
2802
2834
  }
2803
2835
  }
2804
- function createCollectionBoundary(e, t, n) {
2805
- const i = createOwner();
2806
- const r = new CollectionQueue(e);
2807
- const s = createBoundChildren(i, t, r, e);
2808
- const o = computed(() => {
2809
- if (!read(r.ot)) {
2836
+ function createCollectionBoundary(e, t, n, i) {
2837
+ const r = createOwner();
2838
+ const o = new CollectionQueue(e);
2839
+ if (i) o.ut = i;
2840
+ const s = createBoundChildren(r, t, o, e);
2841
+ const u = computed(() => {
2842
+ if (!read(o.ot)) {
2810
2843
  const e = read(s);
2811
- if (!untrack(() => read(r.ot))) {
2812
- r.ut = true;
2844
+ if (!untrack(() => read(o.ot))) {
2845
+ o.st = true;
2813
2846
  return e;
2814
2847
  }
2815
2848
  }
2816
- return n(r);
2849
+ return n(o);
2817
2850
  });
2818
- return read.bind(null, o);
2851
+ return accessor(u);
2819
2852
  }
2820
- function createLoadBoundary(e, t) {
2821
- return createCollectionBoundary(STATUS_PENDING, e, () => t());
2853
+ function createLoadingBoundary(e, t, n) {
2854
+ return createCollectionBoundary(STATUS_PENDING, e, () => t(), n?.on);
2822
2855
  }
2823
2856
  function createErrorBoundary(e, t) {
2824
2857
  return createCollectionBoundary(STATUS_ERROR, e, e => {
2825
- let n = e.st.values().next().value;
2826
- const i = n.X?.cause ?? n.X;
2858
+ let n = e.rt.values().next().value;
2859
+ const i = n.q?.cause ?? n.q;
2827
2860
  return t(i, () => {
2828
- for (const t of e.st) recompute(t);
2861
+ for (const t of e.rt) recompute(t);
2829
2862
  schedule();
2830
2863
  });
2831
2864
  });
@@ -2854,9 +2887,9 @@ function flatten(e, t) {
2854
2887
  function flattenArray(e, t = [], n) {
2855
2888
  let i = null;
2856
2889
  let r = false;
2857
- for (let s = 0; s < e.length; s++) {
2890
+ for (let o = 0; o < e.length; o++) {
2858
2891
  try {
2859
- let i = e[s];
2892
+ let i = e[o];
2860
2893
  if (typeof i === "function" && !i.length) {
2861
2894
  if (n?.doNotUnwrap) {
2862
2895
  t.push(i);
@@ -2893,7 +2926,7 @@ export {
2893
2926
  createContext,
2894
2927
  createEffect,
2895
2928
  createErrorBoundary,
2896
- createLoadBoundary,
2929
+ createLoadingBoundary,
2897
2930
  createMemo,
2898
2931
  createOptimistic,
2899
2932
  createOptimisticStore,
@@ -2906,6 +2939,8 @@ export {
2906
2939
  createStore,
2907
2940
  createTrackedEffect,
2908
2941
  deep,
2942
+ enableExternalSource,
2943
+ enforceLoadingBoundary,
2909
2944
  flatten,
2910
2945
  flush,
2911
2946
  getContext,
@@ -2932,7 +2967,6 @@ export {
2932
2967
  resolve,
2933
2968
  runWithOwner,
2934
2969
  setContext,
2935
- setOnUnhandledAsync,
2936
2970
  setSnapshotCapture,
2937
2971
  snapshot,
2938
2972
  storePath,