@solidjs/signals 0.9.7 → 0.9.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/node.cjs CHANGED
@@ -1,9 +1,16 @@
1
1
  "use strict";
2
2
  class NotReadyError extends Error {
3
- cause;
3
+ t;
4
4
  constructor(e) {
5
5
  super();
6
- this.cause = e;
6
+ this.t = e;
7
+ }
8
+ }
9
+ class StatusError extends Error {
10
+ t;
11
+ constructor(e, t) {
12
+ super(t instanceof Error ? t.message : String(t), { cause: t });
13
+ this.t = e;
7
14
  }
8
15
  }
9
16
  class NoOwnerError extends Error {
@@ -24,258 +31,322 @@ const i = 1 << 3;
24
31
  const s = 1 << 4;
25
32
  const o = 1 << 5;
26
33
  const u = 1 << 6;
27
- const l = 1 << 7;
28
- const f = 0;
29
- const c = 1 << 0;
30
- const a = 1 << 1;
31
- const d = 1 << 2;
32
- const p = 1;
33
- const h = 2;
34
- const y = 3;
35
- const g = {};
36
- const w = typeof Proxy === "function";
37
- const S = {};
38
- const m = Symbol("refresh");
34
+ const f = 1 << 7;
35
+ const l = 1 << 0;
36
+ const c = 1 << 1;
37
+ const a = 1 << 2;
38
+ const d = 1;
39
+ const p = 2;
40
+ const h = 3;
41
+ const y = {};
42
+ const g = typeof Proxy === "function";
43
+ const w = {};
44
+ const S = Symbol("refresh");
39
45
  function actualInsertIntoHeap(e, t) {
40
- const n = (e.i?.t ? e.i.u?.o : e.i?.o) ?? -1;
41
- if (n >= e.o) e.o = n + 1;
42
- const r = e.o;
43
- const i = t.l[r];
44
- if (i === undefined) t.l[r] = e;
46
+ const n = (e.o?.i ? e.o.l?.u : e.o?.u) ?? -1;
47
+ if (n >= e.u) e.u = n + 1;
48
+ const r = e.u;
49
+ const i = t.p[r];
50
+ if (i === undefined) t.p[r] = e;
45
51
  else {
46
- const t = i.p;
47
- t.h = e;
48
- e.p = t;
49
- i.p = e;
52
+ const t = i.h;
53
+ t.S = e;
54
+ e.h = t;
55
+ i.h = e;
50
56
  }
51
- if (r > t.S) t.S = r;
57
+ if (r > t.m) t.m = r;
52
58
  }
53
59
  function insertIntoHeap(e, o) {
54
- let u = e.m;
60
+ let u = e._;
55
61
  if (u & (i | r)) return;
56
62
  if (u & t) {
57
- e.m = (u & -4) | n | i;
58
- } else e.m = u | i;
63
+ e._ = (u & -4) | n | i;
64
+ } else e._ = u | i;
59
65
  if (!(u & s)) actualInsertIntoHeap(e, o);
60
66
  }
61
67
  function insertIntoHeapHeight(e, t) {
62
- let n = e.m;
68
+ let n = e._;
63
69
  if (n & (i | r | s)) return;
64
- e.m = n | s;
70
+ e._ = n | s;
65
71
  actualInsertIntoHeap(e, t);
66
72
  }
67
73
  function deleteFromHeap(e, t) {
68
- const n = e.m;
74
+ const n = e._;
69
75
  if (!(n & (i | s))) return;
70
- e.m = n & -25;
71
- const r = e.o;
72
- if (e.p === e) t.l[r] = undefined;
76
+ e._ = n & -25;
77
+ const r = e.u;
78
+ if (e.h === e) t.p[r] = undefined;
73
79
  else {
74
- const n = e.h;
75
- const i = t.l[r];
80
+ const n = e.S;
81
+ const i = t.p[r];
76
82
  const s = n ?? i;
77
- if (e === i) t.l[r] = n;
78
- else e.p.h = n;
79
- s.p = e.p;
83
+ if (e === i) t.p[r] = n;
84
+ else e.h.S = n;
85
+ s.h = e.h;
80
86
  }
81
- e.p = e;
82
- e.h = undefined;
87
+ e.h = e;
88
+ e.S = undefined;
83
89
  }
84
90
  function markHeap(e) {
85
- if (e._) return;
86
- e._ = true;
87
- for (let t = 0; t <= e.S; t++) {
88
- for (let n = e.l[t]; n !== undefined; n = n.h) {
89
- if (n.m & i) markNode(n);
91
+ if (e.O) return;
92
+ e.O = true;
93
+ for (let t = 0; t <= e.m; t++) {
94
+ for (let n = e.p[t]; n !== undefined; n = n.S) {
95
+ if (n._ & i) markNode(n);
90
96
  }
91
97
  }
92
98
  }
93
99
  function markNode(e, r = n) {
94
- const i = e.m;
100
+ const i = e._;
95
101
  if ((i & (t | n)) >= r) return;
96
- e.m = (i & -4) | r;
97
- for (let n = e.O; n !== null; n = n.P) {
98
- markNode(n.C, t);
99
- }
100
- if (e.k !== null) {
101
- for (let n = e.k; n !== null; n = n.A) {
102
- for (let e = n.O; e !== null; e = e.P) {
103
- markNode(e.C, t);
102
+ e._ = (i & -4) | r;
103
+ for (let n = e.P; n !== null; n = n.C) {
104
+ markNode(n.k, t);
105
+ }
106
+ if (e.A !== null) {
107
+ for (let n = e.A; n !== null; n = n.W) {
108
+ for (let e = n.P; e !== null; e = e.C) {
109
+ markNode(e.k, t);
104
110
  }
105
111
  }
106
112
  }
107
113
  }
108
114
  function runHeap(e, t) {
109
- e._ = false;
110
- for (e.W = 0; e.W <= e.S; e.W++) {
111
- let n = e.l[e.W];
115
+ e.O = false;
116
+ for (e.j = 0; e.j <= e.m; e.j++) {
117
+ let n = e.p[e.j];
112
118
  while (n !== undefined) {
113
- if (n.m & i) t(n);
119
+ if (n._ & i) t(n);
114
120
  else adjustHeight(n, e);
115
- n = e.l[e.W];
121
+ n = e.p[e.j];
116
122
  }
117
123
  }
118
- e.S = 0;
124
+ e.m = 0;
119
125
  }
120
126
  function adjustHeight(e, t) {
121
127
  deleteFromHeap(e, t);
122
- let n = e.o;
123
- for (let t = e.j; t; t = t.N) {
124
- const e = t.H;
125
- const r = e.I || e;
126
- if (r.R && r.o >= n) n = r.o + 1;
128
+ let n = e.u;
129
+ for (let t = e.N; t; t = t.L) {
130
+ const e = t.I;
131
+ const r = e.H || e;
132
+ if (r.R && r.u >= n) n = r.u + 1;
127
133
  }
128
- if (e.o !== n) {
129
- e.o = n;
130
- for (let n = e.O; n !== null; n = n.P) {
131
- insertIntoHeapHeight(n.C, t);
134
+ if (e.u !== n) {
135
+ e.u = n;
136
+ for (let n = e.P; n !== null; n = n.C) {
137
+ insertIntoHeapHeight(n.k, t);
132
138
  }
133
139
  }
134
140
  }
135
- const b = new Set();
136
- const _ = { l: new Array(2e3).fill(undefined), _: false, W: 0, S: 0 };
137
- const O = { l: new Array(2e3).fill(undefined), _: false, W: 0, S: 0 };
138
- let x = 0;
139
- let v = null;
141
+ const m = new Set();
142
+ const _ = { p: new Array(2e3).fill(undefined), O: false, j: 0, m: 0 };
143
+ const b = { p: new Array(2e3).fill(undefined), O: false, j: 0, m: 0 };
144
+ let O = 0;
145
+ let x = null;
146
+ let v = false;
140
147
  let P = false;
141
- let C = false;
142
- let k = false;
143
- function setOptimisticReadActive(e) {
144
- C = e;
148
+ const C = new WeakMap();
149
+ const k = new Set();
150
+ let A = null;
151
+ function setCurrentOptimisticLane(e) {
152
+ A = e;
153
+ }
154
+ function getOrCreateLane(e) {
155
+ let t = C.get(e);
156
+ if (t) {
157
+ return findLane(t);
158
+ }
159
+ t = { t: e, T: new Set(), M: [[], []], q: null, F: x };
160
+ C.set(e, t);
161
+ k.add(t);
162
+ e.V = e.B || 0;
163
+ return t;
164
+ }
165
+ function findLane(e) {
166
+ while (e.q) e = e.q;
167
+ return e;
168
+ }
169
+ function mergeLanes(e, t) {
170
+ e = findLane(e);
171
+ t = findLane(t);
172
+ if (e === t) return e;
173
+ t.q = e;
174
+ for (const n of t.T) e.T.add(n);
175
+ e.M[0].push(...t.M[0]);
176
+ e.M[1].push(...t.M[1]);
177
+ return e;
178
+ }
179
+ function clearLaneEntry(e) {
180
+ C.delete(e);
181
+ }
182
+ function resolveLane(e) {
183
+ const t = e.D;
184
+ if (!t) return undefined;
185
+ const n = findLane(t);
186
+ if (k.has(n)) return n;
187
+ e.D = undefined;
188
+ return undefined;
189
+ }
190
+ function hasActiveOverride(e) {
191
+ return !!(e.G && e.K !== y);
192
+ }
193
+ function assignOrMergeLane(e, t) {
194
+ const n = findLane(t);
195
+ const r = e.D;
196
+ if (r) {
197
+ if (r.q) {
198
+ e.D = t;
199
+ return;
200
+ }
201
+ const i = findLane(r);
202
+ if (k.has(i)) {
203
+ if (i !== n && !hasActiveOverride(e)) {
204
+ mergeLanes(n, i);
205
+ }
206
+ return;
207
+ }
208
+ }
209
+ e.D = t;
210
+ }
211
+ function runLaneEffects(e) {
212
+ for (const t of k) {
213
+ if (t.q || t.T.size > 0) continue;
214
+ const n = t.M[e - 1];
215
+ if (n.length) {
216
+ t.M[e - 1] = [];
217
+ runQueue(n, e);
218
+ }
219
+ }
145
220
  }
146
221
  function setProjectionWriteActive(e) {
147
- k = e;
222
+ P = e;
148
223
  }
149
224
  function schedule() {
150
- if (P) return;
151
- P = true;
152
- if (!A.T) queueMicrotask(flush);
225
+ if (v) return;
226
+ v = true;
227
+ if (!E.U) queueMicrotask(flush);
153
228
  }
154
229
  class Queue {
155
- i = null;
156
- q = [[], []];
157
- F = [[], []];
158
- V = [];
159
- created = x;
230
+ o = null;
231
+ J = [[], []];
232
+ X = [];
233
+ created = O;
160
234
  addChild(e) {
161
- this.V.push(e);
162
- e.i = this;
235
+ this.X.push(e);
236
+ e.o = this;
163
237
  }
164
238
  removeChild(e) {
165
- const t = this.V.indexOf(e);
239
+ const t = this.X.indexOf(e);
166
240
  if (t >= 0) {
167
- this.V.splice(t, 1);
168
- e.i = null;
241
+ this.X.splice(t, 1);
242
+ e.o = null;
169
243
  }
170
244
  }
171
- notify(e, t, n) {
172
- if (this.i) return this.i.notify(e, t, n);
245
+ notify(e, t, n, r) {
246
+ if (this.o) return this.o.notify(e, t, n, r);
173
247
  return false;
174
248
  }
175
- M(e, t, n) {
176
- if (t[e - 1].length) {
177
- const n = t[e - 1];
178
- t[e - 1] = [];
179
- runQueue(n, e);
180
- }
181
- for (let t = 0; t < this.V.length; t++) {
182
- this.V[t][n]?.(e);
183
- }
184
- }
185
249
  run(e) {
186
- this.M(e, this.q, "run");
187
- }
188
- runOptimistic(e) {
189
- this.M(e, this.F, "runOptimistic");
250
+ if (this.J[e - 1].length) {
251
+ const t = this.J[e - 1];
252
+ this.J[e - 1] = [];
253
+ runQueue(t, e);
254
+ }
255
+ for (let t = 0; t < this.X.length; t++) this.X[t].run?.(e);
190
256
  }
191
257
  enqueue(e, t) {
192
258
  if (e) {
193
- const n = C ? this.F : this.q;
194
- n[e - 1].push(t);
259
+ if (A) {
260
+ const n = findLane(A);
261
+ n.M[e - 1].push(t);
262
+ } else {
263
+ this.J[e - 1].push(t);
264
+ }
195
265
  }
196
266
  schedule();
197
267
  }
198
268
  stashQueues(e) {
199
- e.q[0].push(...this.q[0]);
200
- e.q[1].push(...this.q[1]);
201
- this.q = [[], []];
202
- for (let t = 0; t < this.V.length; t++) {
203
- let n = this.V[t];
204
- let r = e.V[t];
269
+ e.J[0].push(...this.J[0]);
270
+ e.J[1].push(...this.J[1]);
271
+ this.J = [[], []];
272
+ for (let t = 0; t < this.X.length; t++) {
273
+ let n = this.X[t];
274
+ let r = e.X[t];
205
275
  if (!r) {
206
- r = { q: [[], []], V: [] };
207
- e.V[t] = r;
276
+ r = { J: [[], []], X: [] };
277
+ e.X[t] = r;
208
278
  }
209
279
  n.stashQueues(r);
210
280
  }
211
281
  }
212
282
  restoreQueues(e) {
213
- this.q[0].push(...e.q[0]);
214
- this.q[1].push(...e.q[1]);
215
- for (let t = 0; t < e.V.length; t++) {
216
- const n = e.V[t];
217
- let r = this.V[t];
283
+ this.J[0].push(...e.J[0]);
284
+ this.J[1].push(...e.J[1]);
285
+ for (let t = 0; t < e.X.length; t++) {
286
+ const n = e.X[t];
287
+ let r = this.X[t];
218
288
  if (r) r.restoreQueues(n);
219
289
  }
220
290
  }
221
291
  }
222
292
  class GlobalQueue extends Queue {
223
- T = false;
224
- D = [];
225
- B = [];
226
- G = new Set();
227
- static K;
228
- static U;
229
- static L = null;
293
+ U = false;
294
+ Y = [];
295
+ Z = [];
296
+ $ = new Set();
297
+ static ee;
298
+ static te;
299
+ static ne = null;
230
300
  flush() {
231
- if (this.T) return;
232
- this.T = true;
301
+ if (this.U) return;
302
+ this.U = true;
233
303
  try {
234
- runHeap(_, GlobalQueue.K);
235
- if (v) {
236
- const e = transitionComplete(v);
304
+ runHeap(_, GlobalQueue.ee);
305
+ if (x) {
306
+ const e = transitionComplete(x);
237
307
  if (!e) {
238
- let e = v;
239
- runHeap(O, GlobalQueue.K);
240
- this.D = [];
241
- this.B = [];
242
- this.G = new Set();
243
- this.runOptimistic(p);
244
- this.runOptimistic(h);
245
- this.stashQueues(v.queueStash);
246
- x++;
247
- P = false;
248
- runTransitionPending(v.pendingNodes);
249
- v = null;
308
+ let e = x;
309
+ runHeap(b, GlobalQueue.ee);
310
+ this.Y = [];
311
+ this.Z = [];
312
+ this.$ = new Set();
313
+ runLaneEffects(d);
314
+ runLaneEffects(p);
315
+ this.stashQueues(x.re);
316
+ O++;
317
+ v = _.m >= _.j;
318
+ reassignPendingTransition(x.Y);
319
+ x = null;
250
320
  finalizePureQueue(null, true);
251
321
  return;
252
322
  }
253
- this.D !== v.pendingNodes && this.D.push(...v.pendingNodes);
254
- this.restoreQueues(v.queueStash);
255
- b.delete(v);
256
- const t = v;
257
- v = null;
258
- runTransitionPending(this.D);
323
+ this.Y !== x.Y && this.Y.push(...x.Y);
324
+ this.restoreQueues(x.re);
325
+ m.delete(x);
326
+ const t = x;
327
+ x = null;
328
+ reassignPendingTransition(this.Y);
259
329
  finalizePureQueue(t);
260
330
  } else {
261
- if (b.size) runHeap(O, GlobalQueue.K);
331
+ if (m.size) runHeap(b, GlobalQueue.ee);
262
332
  finalizePureQueue();
263
333
  }
264
- x++;
265
- P = _.S >= _.W;
266
- this.runOptimistic(p);
334
+ O++;
335
+ v = _.m >= _.j;
336
+ runLaneEffects(d);
337
+ this.run(d);
338
+ runLaneEffects(p);
267
339
  this.run(p);
268
- this.runOptimistic(h);
269
- this.run(h);
270
340
  } finally {
271
- this.T = false;
341
+ this.U = false;
272
342
  }
273
343
  }
274
- notify(e, t, n) {
275
- if (t & c) {
276
- if (n & c) {
277
- if (v && e.J && !v.asyncNodes.includes(e.J.cause)) {
278
- v.asyncNodes.push(e.J.cause);
344
+ notify(e, t, n, r) {
345
+ if (t & l) {
346
+ if (n & l) {
347
+ const t = r !== undefined ? r : e.ie;
348
+ if (x && t && !x.se.includes(t.t)) {
349
+ x.se.push(t.t);
279
350
  schedule();
280
351
  }
281
352
  }
@@ -285,147 +356,183 @@ class GlobalQueue extends Queue {
285
356
  }
286
357
  initTransition(e) {
287
358
  if (e) e = currentTransition(e);
288
- if (e && e === v) return;
289
- if (!e && v && v.time === x) return;
290
- if (!v) {
291
- v = e ?? {
292
- time: x,
293
- pendingNodes: [],
294
- asyncNodes: [],
295
- optimisticNodes: [],
296
- optimisticStores: new Set(),
297
- actions: [],
298
- queueStash: { q: [[], []], V: [] },
299
- done: false
359
+ if (e && e === x) return;
360
+ if (!e && x && x.oe === O) return;
361
+ if (!x) {
362
+ x = e ?? {
363
+ oe: O,
364
+ Y: [],
365
+ se: [],
366
+ Z: [],
367
+ $: new Set(),
368
+ ue: [],
369
+ re: { J: [[], []], X: [] },
370
+ fe: false
300
371
  };
301
372
  } else if (e) {
302
- v.done = e;
303
- e.actions.push(...v.actions);
304
- b.delete(v);
305
- v = e;
373
+ const t = x;
374
+ t.fe = e;
375
+ e.ue.push(...t.ue);
376
+ for (const n of k) {
377
+ if (n.F === t) n.F = e;
378
+ }
379
+ e.Z.push(...t.Z);
380
+ for (const n of t.$) {
381
+ e.$.add(n);
382
+ }
383
+ m.delete(t);
384
+ x = e;
306
385
  }
307
- b.add(v);
308
- v.time = x;
309
- for (let e = 0; e < this.D.length; e++) {
310
- const t = this.D[e];
311
- t.X = v;
312
- v.pendingNodes.push(t);
386
+ m.add(x);
387
+ x.oe = O;
388
+ for (let e = 0; e < this.Y.length; e++) {
389
+ const t = this.Y[e];
390
+ t.F = x;
391
+ x.Y.push(t);
313
392
  }
314
- this.D = v.pendingNodes;
315
- for (let e = 0; e < this.B.length; e++) {
316
- const t = this.B[e];
317
- t.X = v;
318
- v.optimisticNodes.push(t);
393
+ this.Y = x.Y;
394
+ for (let e = 0; e < this.Z.length; e++) {
395
+ const t = this.Z[e];
396
+ t.F = x;
397
+ x.Z.push(t);
319
398
  }
320
- this.B = v.optimisticNodes;
321
- for (const e of this.G) {
322
- v.optimisticStores.add(e);
399
+ this.Z = x.Z;
400
+ for (const e of k) {
401
+ if (!e.F) e.F = x;
323
402
  }
324
- this.G = v.optimisticStores;
403
+ for (const e of this.$) x.$.add(e);
404
+ this.$ = x.$;
325
405
  }
326
406
  }
327
407
  function insertSubs(e, t = false) {
328
- for (let n = e.O; n !== null; n = n.P) {
329
- if (t) n.C.m |= l;
330
- const e = n.C;
331
- if (e.Y === y) {
332
- if (!e.Z) {
333
- e.Z = true;
334
- e.$.enqueue(h, e.ee);
408
+ const n = e.D || A;
409
+ for (let r = e.P; r !== null; r = r.C) {
410
+ if (t && n) {
411
+ r.k._ |= f;
412
+ assignOrMergeLane(r.k, n);
413
+ } else if (t) {
414
+ r.k._ |= f;
415
+ r.k.D = undefined;
416
+ }
417
+ const e = r.k;
418
+ if (e.le === h) {
419
+ if (!e.ce) {
420
+ e.ce = true;
421
+ e.ae.enqueue(p, e.de);
335
422
  }
336
423
  continue;
337
424
  }
338
- const r = n.C.m & o ? O : _;
339
- if (r.W > n.C.o) r.W = n.C.o;
340
- insertIntoHeap(n.C, r);
425
+ const i = r.k._ & o ? b : _;
426
+ if (i.j > r.k.u) i.j = r.k.u;
427
+ insertIntoHeap(r.k, i);
341
428
  }
342
429
  }
343
430
  function finalizePureQueue(e = null, t = false) {
344
431
  let n = !t;
345
- if (_.S >= _.W) {
346
- n = true;
347
- runHeap(_, GlobalQueue.K);
348
- }
432
+ if (!t) checkBoundaryChildren(E);
433
+ if (_.m >= _.j) runHeap(_, GlobalQueue.ee);
349
434
  if (n) {
350
- const t = A.D;
435
+ const t = E.Y;
351
436
  for (let e = 0; e < t.length; e++) {
352
437
  const n = t[e];
353
- if (n.te !== g) {
354
- n.ne = n.te;
355
- n.te = g;
356
- if (n.Y && n.Y !== y) n.Z = true;
438
+ if (n.K !== y) {
439
+ n.pe = n.K;
440
+ n.K = y;
441
+ if (n.le && n.le !== h) n.ce = true;
357
442
  }
358
- if (n.R) GlobalQueue.U(n, false, true);
443
+ n.he &= ~a;
444
+ if (n.R) GlobalQueue.te(n, false, true);
359
445
  }
360
446
  t.length = 0;
361
- const n = e ? e.optimisticNodes : A.B;
447
+ const n = e ? e.Z : E.Z;
362
448
  for (let e = 0; e < n.length; e++) {
363
449
  const t = n[e];
364
- const r = t.te;
365
- if (r !== g && t.ne !== r) {
366
- t.ne = r;
450
+ const r = t.K;
451
+ t.D = undefined;
452
+ if (r !== y && t.pe !== r) {
453
+ t.pe = r;
367
454
  insertSubs(t, true);
368
455
  }
369
- t.te = g;
370
- t.X = null;
456
+ t.K = y;
457
+ t.F = null;
371
458
  }
372
459
  n.length = 0;
373
- const r = e ? e.optimisticStores : A.G;
374
- if (GlobalQueue.L && r.size) {
460
+ const r = e ? e.$ : E.$;
461
+ if (GlobalQueue.ne && r.size) {
375
462
  for (const e of r) {
376
- GlobalQueue.L(e);
463
+ GlobalQueue.ne(e);
377
464
  }
378
465
  r.clear();
379
466
  schedule();
380
467
  }
468
+ for (const t of k) {
469
+ const n = e ? t.F === e : !t.F;
470
+ if (!n) continue;
471
+ if (!t.q) {
472
+ if (t.M[0].length) runQueue(t.M[0], d);
473
+ if (t.M[1].length) runQueue(t.M[1], p);
474
+ }
475
+ if (t.t.D === t) t.t.D = undefined;
476
+ t.T.clear();
477
+ t.M[0].length = 0;
478
+ t.M[1].length = 0;
479
+ k.delete(t);
480
+ C.delete(t.t);
481
+ }
482
+ }
483
+ }
484
+ function checkBoundaryChildren(e) {
485
+ for (const t of e.X) {
486
+ t.checkSources?.();
487
+ checkBoundaryChildren(t);
381
488
  }
382
489
  }
383
490
  function trackOptimisticStore(e) {
384
- A.G.add(e);
491
+ E.$.add(e);
385
492
  schedule();
386
493
  }
387
- function runTransitionPending(e) {
494
+ function reassignPendingTransition(e) {
388
495
  for (let t = 0; t < e.length; t++) {
389
- e[t].X = v;
496
+ e[t].F = x;
390
497
  }
391
498
  }
392
- const A = new GlobalQueue();
499
+ const E = new GlobalQueue();
393
500
  function flush() {
394
- while (P) {
395
- A.flush();
501
+ while (v) {
502
+ E.flush();
396
503
  }
397
504
  }
398
505
  function runQueue(e, t) {
399
506
  for (let n = 0; n < e.length; n++) e[n](t);
400
507
  }
401
508
  function transitionComplete(e) {
402
- if (e.done) return true;
403
- if (e.actions.length) return false;
509
+ if (e.fe) return true;
510
+ if (e.ue.length) return false;
404
511
  let t = true;
405
- for (let n = 0; n < e.asyncNodes.length; n++) {
406
- if (e.asyncNodes[n].re & c) {
512
+ for (let n = 0; n < e.se.length; n++) {
513
+ if (e.se[n].he & l) {
407
514
  t = false;
408
515
  break;
409
516
  }
410
517
  }
411
- t && (e.done = true);
518
+ t && (e.fe = true);
412
519
  return t;
413
520
  }
414
521
  function currentTransition(e) {
415
- while (e.done && typeof e.done === "object") e = e.done;
522
+ while (e.fe && typeof e.fe === "object") e = e.fe;
416
523
  return e;
417
524
  }
418
525
  function runInTransition(e, t) {
419
- const n = v;
526
+ const n = x;
420
527
  try {
421
- v = currentTransition(e);
528
+ x = currentTransition(e);
422
529
  return t();
423
530
  } finally {
424
- v = n;
531
+ x = n;
425
532
  }
426
533
  }
427
534
  function restoreTransition(e, t) {
428
- A.initTransition(e);
535
+ E.initTransition(e);
429
536
  const n = t();
430
537
  flush();
431
538
  return n;
@@ -434,14 +541,14 @@ function action(e) {
434
541
  return (...t) =>
435
542
  new Promise((n, r) => {
436
543
  const i = e(...t);
437
- A.initTransition();
438
- let s = v;
439
- s.actions.push(i);
544
+ E.initTransition();
545
+ let s = x;
546
+ s.ue.push(i);
440
547
  const done = (e, t) => {
441
548
  s = currentTransition(s);
442
- const o = s.actions.indexOf(i);
443
- if (o >= 0) s.actions.splice(o, 1);
444
- v = s;
549
+ const o = s.ue.indexOf(i);
550
+ if (o >= 0) s.ue.splice(o, 1);
551
+ x = s;
445
552
  schedule();
446
553
  t ? r(t) : n(e);
447
554
  };
@@ -468,124 +575,164 @@ function action(e) {
468
575
  step();
469
576
  });
470
577
  }
471
- GlobalQueue.K = recompute;
472
- GlobalQueue.U = disposeChildren;
578
+ GlobalQueue.ee = recompute;
579
+ GlobalQueue.te = disposeChildren;
473
580
  let W = false;
474
581
  let j = false;
475
582
  let N = false;
476
- let E = false;
477
- let H = false;
583
+ let L = false;
584
+ let Q = false;
478
585
  let I = false;
479
- let Q = null;
586
+ let H = null;
480
587
  function recompute(t, n = false) {
481
- const i = t.Y;
588
+ const i = t.le;
482
589
  if (!n) {
483
- if (t.X && (!i || v) && v !== t.X) A.initTransition(t.X);
484
- deleteFromHeap(t, t.m & o ? O : _);
485
- if (t.X) disposeChildren(t);
590
+ if (t.F && (!i || x) && x !== t.F) E.initTransition(t.F);
591
+ deleteFromHeap(t, t._ & o ? b : _);
592
+ if (t.F || i === h) disposeChildren(t);
486
593
  else {
487
594
  markDisposal(t);
488
- t.ie = t.se;
489
- t.oe = t.ue;
490
- t.se = null;
491
- t.ue = null;
492
- }
493
- }
494
- const s = !!(t.m & l);
495
- const u = t.le && t.te !== g;
496
- const f = Q;
497
- Q = t;
498
- t.fe = null;
499
- t.m = r;
500
- t.ce = x;
501
- let d = t.te === g ? t.ne : t.te;
502
- let p = t.o;
503
- let h = W;
504
- let y = C;
595
+ t.ye = t.ge;
596
+ t.we = t.Se;
597
+ t.ge = null;
598
+ t.Se = null;
599
+ }
600
+ }
601
+ const s = !!(t._ & f);
602
+ const u = hasActiveOverride(t);
603
+ const a = !!(t.he & l);
604
+ const d = H;
605
+ H = t;
606
+ t.me = null;
607
+ t._ = r;
608
+ t.oe = O;
609
+ let p = t.K === y ? t.pe : t.K;
610
+ let g = t.u;
611
+ let w = W;
612
+ let S = A;
505
613
  W = true;
506
- if (s) setOptimisticReadActive(true);
614
+ if (s) {
615
+ const e = resolveLane(t);
616
+ if (e) setCurrentOptimisticLane(e);
617
+ }
507
618
  try {
508
- d = handleAsync(t, t.R(d));
619
+ p = handleAsync(t, t.R(p));
509
620
  clearStatus(t);
621
+ const e = resolveLane(t);
622
+ if (e) e.T.delete(t);
510
623
  } catch (e) {
511
- if (e instanceof NotReadyError) {
512
- if (e.cause !== t) link(e.cause, t);
513
- notifyStatus(t, c, e);
514
- } else notifyStatus(t, a, e);
624
+ if (e instanceof NotReadyError && A) {
625
+ const e = findLane(A);
626
+ if (e.t !== t) {
627
+ e.T.add(t);
628
+ t.D = e;
629
+ }
630
+ }
631
+ notifyStatus(
632
+ t,
633
+ e instanceof NotReadyError ? l : c,
634
+ e,
635
+ undefined,
636
+ e instanceof NotReadyError ? t.D : undefined
637
+ );
515
638
  } finally {
516
- W = h;
517
- t.m = e;
518
- Q = f;
639
+ W = w;
640
+ t._ = e;
641
+ H = d;
519
642
  }
520
- if (!t.J) {
521
- const e = t.fe;
522
- let r = e !== null ? e.N : t.j;
643
+ if (!t.ie) {
644
+ const e = t.me;
645
+ let r = e !== null ? e.L : t.N;
523
646
  if (r !== null) {
524
647
  do {
525
648
  r = unlinkSubs(r);
526
649
  } while (r !== null);
527
- if (e !== null) e.N = null;
528
- else t.j = null;
650
+ if (e !== null) e.L = null;
651
+ else t.N = null;
529
652
  }
530
- const l = !t.ae || !t.ae(t.te === g ? t.ne : t.te, d);
653
+ const f = u ? t.pe : t.K === y ? t.pe : t.K;
654
+ const l = !t._e || !t._e(f, p);
531
655
  if (l) {
532
- if (n || (i && v !== t.X) || s) t.ne = d;
533
- else t.te = d;
534
- insertSubs(t, s || u);
535
- } else if (t.o != p) {
536
- for (let e = t.O; e !== null; e = e.P) {
537
- insertIntoHeapHeight(e.C, e.C.m & o ? O : _);
656
+ const e = u ? t.pe : undefined;
657
+ if (n || (i && x !== t.F) || s) t.pe = p;
658
+ else t.K = p;
659
+ if (u && !s && a) {
660
+ const e = t.B || 0;
661
+ const n = t.V || 0;
662
+ if (e <= n) t.pe = p;
663
+ }
664
+ if (!u || s || t.pe !== e) {
665
+ insertSubs(t, s || u);
666
+ }
667
+ } else if (u) {
668
+ t.K = p;
669
+ } else if (t.u != g) {
670
+ for (let e = t.P; e !== null; e = e.C) {
671
+ insertIntoHeapHeight(e.k, e.k._ & o ? b : _);
538
672
  }
539
673
  }
540
674
  }
541
- setOptimisticReadActive(y);
542
- (!n || t.re & c) && !t.X && A.D.push(t);
543
- t.X && i && v !== t.X && runInTransition(t.X, () => recompute(t));
675
+ setCurrentOptimisticLane(S);
676
+ (!n || t.he & l) && !t.F && !(x && t.G) && E.Y.push(t);
677
+ t.F && i && x !== t.F && runInTransition(t.F, () => recompute(t));
544
678
  }
545
- function handleAsync(e, t, n) {
546
- const r = typeof t === "object" && t !== null;
547
- const i = r && untrack(() => t[Symbol.asyncIterator]);
548
- const s = !i && r && untrack(() => typeof t.then === "function");
549
- if (!s && !i) {
550
- e.de = null;
679
+ function handleAsync(e, t, r) {
680
+ const i = typeof t === "object" && t !== null;
681
+ const s = i && untrack(() => t[Symbol.asyncIterator]);
682
+ const o = !s && i && untrack(() => typeof t.then === "function");
683
+ if (!o && !s) {
684
+ e.be = null;
551
685
  return t;
552
686
  }
553
- e.de = t;
554
- let o;
687
+ e.be = t;
688
+ let u;
555
689
  const handleError = n => {
556
- if (e.de !== t) return;
557
- A.initTransition(e.X);
558
- if (n instanceof NotReadyError) {
559
- if (n.cause !== e) link(n.cause, e);
560
- notifyStatus(e, c, n);
561
- } else notifyStatus(e, a, n);
562
- e.ce = x;
690
+ if (e.be !== t) return;
691
+ E.initTransition(e.F);
692
+ notifyStatus(e, n instanceof NotReadyError ? l : c, n);
693
+ e.oe = O;
563
694
  };
564
- const asyncWrite = (r, i) => {
565
- if (e.de !== t) return;
566
- A.initTransition(e.X);
695
+ const asyncWrite = (i, s) => {
696
+ if (e.be !== t) return;
697
+ if (e._ & (n | f)) return;
698
+ E.initTransition(e.F);
567
699
  clearStatus(e);
568
- if (n) n(r);
569
- else if (e.le) {
570
- const t = e.te !== g;
571
- if (e.R) e.te = r;
700
+ const o = resolveLane(e);
701
+ if (o) o.T.delete(e);
702
+ if (r) r(i);
703
+ else if (e.G) {
704
+ const t = e.K !== y;
705
+ if (e.R) e.K = i;
572
706
  if (!t) {
573
- e.ne = r;
707
+ e.pe = i;
574
708
  insertSubs(e);
575
709
  }
576
- e.ce = x;
577
- schedule();
578
- } else setSignal(e, () => r);
710
+ e.oe = O;
711
+ } else if (o) {
712
+ const t = e.pe;
713
+ const n = e._e;
714
+ if (!n || !n(i, t)) {
715
+ e.pe = i;
716
+ e.oe = O;
717
+ if (e.Oe) {
718
+ setSignal(e.Oe, i);
719
+ }
720
+ insertSubs(e, true);
721
+ }
722
+ } else {
723
+ setSignal(e, () => i);
724
+ }
725
+ schedule();
579
726
  flush();
580
- i?.();
727
+ s?.();
581
728
  };
582
- if (s) {
729
+ if (o) {
583
730
  let n = false,
584
731
  r = true;
585
732
  t.then(
586
733
  e => {
587
734
  if (r) {
588
- o = e;
735
+ u = e;
589
736
  n = true;
590
737
  } else asyncWrite(e);
591
738
  },
@@ -595,11 +742,11 @@ function handleAsync(e, t, n) {
595
742
  );
596
743
  r = false;
597
744
  if (!n) {
598
- A.initTransition(e.X);
599
- throw new NotReadyError(Q);
745
+ E.initTransition(e.F);
746
+ throw new NotReadyError(H);
600
747
  }
601
748
  }
602
- if (i) {
749
+ if (s) {
603
750
  const n = t[Symbol.asyncIterator]();
604
751
  let r = false;
605
752
  const iterate = () => {
@@ -619,7 +766,7 @@ function handleAsync(e, t, n) {
619
766
  );
620
767
  i = false;
621
768
  if (t && !e.done) {
622
- o = e.value;
769
+ u = e.value;
623
770
  r = true;
624
771
  return iterate();
625
772
  }
@@ -627,177 +774,191 @@ function handleAsync(e, t, n) {
627
774
  };
628
775
  const i = iterate();
629
776
  if (!r && !i) {
630
- A.initTransition(e.X);
631
- throw new NotReadyError(Q);
777
+ E.initTransition(e.F);
778
+ throw new NotReadyError(H);
632
779
  }
633
780
  }
634
- return o;
781
+ return u;
635
782
  }
636
783
  function clearStatus(e) {
637
- e.re = f;
638
- e.J = null;
784
+ e.he = e.he & a;
785
+ e.ie = null;
639
786
  updatePendingSignal(e);
640
- if (e.pe) {
641
- e.pe();
642
- } else {
643
- if (!e.X) {
644
- for (let t = e.O; t !== null; t = t.P) {
645
- if (t.C.re & c) {
646
- insertIntoHeap(t.C, t.C.m & o ? O : _);
647
- }
648
- }
787
+ e.xe?.();
788
+ }
789
+ function notifyStatus(e, t, n, r, i) {
790
+ if (t === c && !(n instanceof StatusError) && !(n instanceof NotReadyError))
791
+ n = new StatusError(e, n);
792
+ const s = n instanceof NotReadyError && n.t === e;
793
+ const o = t === l && e.G && !s;
794
+ const u = o && hasActiveOverride(e);
795
+ if (!r) {
796
+ e.he = t | (t !== c ? e.he & a : 0);
797
+ e.ie = n;
798
+ updatePendingSignal(e);
799
+ }
800
+ if (i && !r) {
801
+ assignOrMergeLane(e, i);
802
+ }
803
+ if (u && x && n instanceof NotReadyError) {
804
+ const e = n.t;
805
+ if (!x.se.includes(e)) {
806
+ x.se.push(e);
807
+ }
808
+ }
809
+ const f = r || u;
810
+ const d = r || o ? undefined : i;
811
+ if (e.xe) {
812
+ if (f) {
813
+ e.xe(t, n);
814
+ } else {
815
+ e.xe();
649
816
  }
650
- schedule();
817
+ return;
651
818
  }
652
- }
653
- function notifyStatus(e, t, n) {
654
- e.re = t | (t !== a ? e.re & d : 0);
655
- e.J = n;
656
- updatePendingSignal(e);
657
- if (e.pe) return e.pe();
658
- for (let r = e.O; r !== null; r = r.P) {
659
- r.C.ce = x;
660
- if (r.C.J !== n) {
661
- !r.C.X && A.D.push(r.C);
662
- notifyStatus(r.C, t, n);
819
+ for (let r = e.P; r !== null; r = r.C) {
820
+ r.k.oe = O;
821
+ if (r.k.ie !== n) {
822
+ !r.k.F && E.Y.push(r.k);
823
+ notifyStatus(r.k, t, n, f, d);
663
824
  }
664
825
  }
665
- for (let r = e.k; r !== null; r = r.A) {
666
- for (let e = r.O; e !== null; e = e.P) {
667
- e.C.ce = x;
668
- if (e.C.J !== n) {
669
- !e.C.X && A.D.push(e.C);
670
- notifyStatus(e.C, t, n);
826
+ for (let r = e.A; r !== null; r = r.W) {
827
+ for (let e = r.P; e !== null; e = e.C) {
828
+ e.k.oe = O;
829
+ if (e.k.ie !== n) {
830
+ !e.k.F && E.Y.push(e.k);
831
+ notifyStatus(e.k, t, n, f, d);
671
832
  }
672
833
  }
673
834
  }
674
835
  }
675
836
  function updateIfNecessary(r) {
676
- if (r.m & t) {
677
- for (let e = r.j; e; e = e.N) {
678
- const t = e.H;
679
- const i = t.I || t;
837
+ if (r._ & t) {
838
+ for (let e = r.N; e; e = e.L) {
839
+ const t = e.I;
840
+ const i = t.H || t;
680
841
  if (i.R) {
681
842
  updateIfNecessary(i);
682
843
  }
683
- if (r.m & n) {
844
+ if (r._ & n) {
684
845
  break;
685
846
  }
686
847
  }
687
848
  }
688
- if (r.m & n) {
849
+ if (r._ & (n | f) || (r.ie && r.oe < O)) {
689
850
  recompute(r);
690
851
  }
691
- r.m = e;
852
+ r._ = e;
692
853
  }
693
854
  function unlinkSubs(e) {
694
- const t = e.H;
695
- const n = e.N;
696
- const r = e.P;
697
- const i = e.he;
698
- if (r !== null) r.he = i;
699
- else t.ye = i;
700
- if (i !== null) i.P = r;
855
+ const t = e.I;
856
+ const n = e.L;
857
+ const r = e.C;
858
+ const i = e.ve;
859
+ if (r !== null) r.ve = i;
860
+ else t.Pe = i;
861
+ if (i !== null) i.C = r;
701
862
  else {
702
- t.O = r;
863
+ t.P = r;
703
864
  if (r === null) {
704
- t.ge?.();
705
- t.R && !t.we && unobserved(t);
865
+ t.Ce?.();
866
+ t.R && !t.ke && unobserved(t);
706
867
  }
707
868
  }
708
869
  return n;
709
870
  }
710
871
  function unobserved(e) {
711
- deleteFromHeap(e, e.m & o ? O : _);
712
- let t = e.j;
872
+ deleteFromHeap(e, e._ & o ? b : _);
873
+ let t = e.N;
713
874
  while (t !== null) {
714
875
  t = unlinkSubs(t);
715
876
  }
716
- e.j = null;
877
+ e.N = null;
717
878
  disposeChildren(e, true);
718
879
  }
719
880
  function link(e, t) {
720
- const n = t.fe;
721
- if (n !== null && n.H === e) return;
881
+ const n = t.me;
882
+ if (n !== null && n.I === e) return;
722
883
  let i = null;
723
- const s = t.m & r;
884
+ const s = t._ & r;
724
885
  if (s) {
725
- i = n !== null ? n.N : t.j;
726
- if (i !== null && i.H === e) {
727
- t.fe = i;
886
+ i = n !== null ? n.L : t.N;
887
+ if (i !== null && i.I === e) {
888
+ t.me = i;
728
889
  return;
729
890
  }
730
891
  }
731
- const o = e.ye;
732
- if (o !== null && o.C === t && (!s || isValidLink(o, t))) return;
733
- const u = (t.fe = e.ye = { H: e, C: t, N: i, he: o, P: null });
734
- if (n !== null) n.N = u;
735
- else t.j = u;
736
- if (o !== null) o.P = u;
737
- else e.O = u;
892
+ const o = e.Pe;
893
+ if (o !== null && o.k === t && (!s || isValidLink(o, t))) return;
894
+ const u = (t.me = e.Pe = { I: e, k: t, L: i, ve: o, C: null });
895
+ if (n !== null) n.L = u;
896
+ else t.N = u;
897
+ if (o !== null) o.C = u;
898
+ else e.P = u;
738
899
  }
739
900
  function isValidLink(e, t) {
740
- const n = t.fe;
901
+ const n = t.me;
741
902
  if (n !== null) {
742
- let r = t.j;
903
+ let r = t.N;
743
904
  do {
744
905
  if (r === e) return true;
745
906
  if (r === n) break;
746
- r = r.N;
907
+ r = r.L;
747
908
  } while (r !== null);
748
909
  }
749
910
  return false;
750
911
  }
751
912
  function markDisposal(e) {
752
- let t = e.ue;
913
+ let t = e.Se;
753
914
  while (t) {
754
- t.m |= o;
755
- if (t.m & i) {
915
+ t._ |= o;
916
+ if (t._ & i) {
756
917
  deleteFromHeap(t, _);
757
- insertIntoHeap(t, O);
918
+ insertIntoHeap(t, b);
758
919
  }
759
920
  markDisposal(t);
760
- t = t.Se;
921
+ t = t.Ae;
761
922
  }
762
923
  }
763
924
  function dispose(e) {
764
- let t = e.j || null;
925
+ let t = e.N || null;
765
926
  do {
766
927
  t = unlinkSubs(t);
767
928
  } while (t !== null);
768
- e.j = null;
769
- e.fe = null;
929
+ e.N = null;
930
+ e.me = null;
770
931
  disposeChildren(e, true);
771
932
  }
772
933
  function disposeChildren(e, t = false, n) {
773
- if (e.m & u) return;
774
- if (t) e.m = u;
775
- let r = n ? e.oe : e.ue;
934
+ if (e._ & u) return;
935
+ if (t) e._ = u;
936
+ let r = n ? e.we : e.Se;
776
937
  while (r) {
777
- const e = r.Se;
778
- if (r.j) {
938
+ const e = r.Ae;
939
+ if (r.N) {
779
940
  const e = r;
780
- deleteFromHeap(e, e.m & o ? O : _);
781
- let t = e.j;
941
+ deleteFromHeap(e, e._ & o ? b : _);
942
+ let t = e.N;
782
943
  do {
783
944
  t = unlinkSubs(t);
784
945
  } while (t !== null);
785
- e.j = null;
786
- e.fe = null;
946
+ e.N = null;
947
+ e.me = null;
787
948
  }
788
949
  disposeChildren(r, true);
789
950
  r = e;
790
951
  }
791
952
  if (n) {
792
- e.oe = null;
953
+ e.we = null;
793
954
  } else {
794
- e.ue = null;
795
955
  e.Se = null;
956
+ e.Ae = null;
796
957
  }
797
958
  runDisposal(e, n);
798
959
  }
799
960
  function runDisposal(e, t) {
800
- let n = t ? e.ie : e.se;
961
+ let n = t ? e.ye : e.ge;
801
962
  if (!n) return;
802
963
  if (Array.isArray(n)) {
803
964
  for (let e = 0; e < n.length; e++) {
@@ -807,10 +968,10 @@ function runDisposal(e, t) {
807
968
  } else {
808
969
  n.call(n);
809
970
  }
810
- t ? (e.ie = null) : (e.se = null);
971
+ t ? (e.ye = null) : (e.ge = null);
811
972
  }
812
973
  function getNextChildId(e) {
813
- if (e.id != null) return formatId(e.id, e.me++);
974
+ if (e.id != null) return formatId(e.id, e.Ee++);
814
975
  throw new Error("Cannot get child id from owner without an id");
815
976
  }
816
977
  function formatId(e, t) {
@@ -820,103 +981,118 @@ function formatId(e, t) {
820
981
  }
821
982
  function computed(t, n, r) {
822
983
  const i = {
823
- id: r?.id ?? (Q?.id != null ? getNextChildId(Q) : undefined),
824
- ae: r?.equals != null ? r.equals : isEqual,
825
- be: !!r?.pureWrite,
826
- ge: r?.unobserved,
827
- se: null,
828
- $: Q?.$ ?? A,
829
- _e: Q?._e ?? S,
830
- me: 0,
984
+ id: r?.id ?? (H?.id != null ? getNextChildId(H) : undefined),
985
+ _e: r?.equals != null ? r.equals : isEqual,
986
+ We: !!r?.pureWrite,
987
+ Ce: r?.unobserved,
988
+ ge: null,
989
+ ae: H?.ae ?? E,
990
+ je: H?.je ?? w,
991
+ Ee: 0,
831
992
  R: t,
832
- ne: n,
833
- o: 0,
834
- k: null,
835
- h: undefined,
836
- p: null,
837
- j: null,
838
- fe: null,
839
- O: null,
840
- ye: null,
841
- i: Q,
993
+ pe: n,
994
+ u: 0,
995
+ A: null,
996
+ S: undefined,
997
+ h: null,
998
+ N: null,
999
+ me: null,
1000
+ P: null,
1001
+ Pe: null,
1002
+ o: H,
1003
+ Ae: null,
842
1004
  Se: null,
843
- ue: null,
844
- m: e,
845
- re: d,
846
- ce: x,
847
- te: g,
848
- ie: null,
849
- oe: null,
850
- de: null,
851
- X: null
1005
+ _: e,
1006
+ he: a,
1007
+ oe: O,
1008
+ K: y,
1009
+ ye: null,
1010
+ we: null,
1011
+ be: null,
1012
+ F: null
852
1013
  };
853
- i.p = i;
854
- const s = Q?.t ? Q.u : Q;
855
- if (Q) {
856
- const e = Q.ue;
1014
+ i.h = i;
1015
+ const s = H?.i ? H.l : H;
1016
+ if (H) {
1017
+ const e = H.Se;
857
1018
  if (e === null) {
858
- Q.ue = i;
1019
+ H.Se = i;
859
1020
  } else {
860
- i.Se = e;
861
- Q.ue = i;
1021
+ i.Ae = e;
1022
+ H.Se = i;
862
1023
  }
863
1024
  }
864
- if (s) i.o = s.o + 1;
1025
+ if (s) i.u = s.u + 1;
865
1026
  !r?.lazy && recompute(i, true);
866
1027
  return i;
867
1028
  }
868
1029
  function signal(e, t, n = null) {
869
1030
  const r = {
870
- ae: t?.equals != null ? t.equals : isEqual,
871
- be: !!t?.pureWrite,
872
- ge: t?.unobserved,
873
- ne: e,
874
- O: null,
875
- ye: null,
876
- ce: x,
877
- I: n,
878
- A: n?.k || null,
879
- te: g
1031
+ _e: t?.equals != null ? t.equals : isEqual,
1032
+ We: !!t?.pureWrite,
1033
+ Ce: t?.unobserved,
1034
+ pe: e,
1035
+ P: null,
1036
+ Pe: null,
1037
+ oe: O,
1038
+ H: n,
1039
+ W: n?.A || null,
1040
+ K: y
880
1041
  };
881
- n && (n.k = r);
1042
+ n && (n.A = r);
882
1043
  return r;
883
1044
  }
884
1045
  function optimisticSignal(e, t) {
885
1046
  const n = signal(e, t);
886
- n.le = true;
1047
+ n.G = true;
887
1048
  return n;
888
1049
  }
889
1050
  function optimisticComputed(e, t, n) {
890
1051
  const r = computed(e, t, n);
891
- r.le = true;
1052
+ r.G = true;
892
1053
  return r;
893
1054
  }
894
1055
  function getPendingSignal(e) {
895
- if (!e.Oe) {
896
- e.Oe = optimisticSignal(false, { pureWrite: true });
897
- if (computePendingState(e)) setSignal(e.Oe, true);
1056
+ if (!e.Ne) {
1057
+ e.Ne = optimisticSignal(false, { pureWrite: true });
1058
+ if (computePendingState(e)) setSignal(e.Ne, true);
898
1059
  }
899
- return e.Oe;
1060
+ return e.Ne;
900
1061
  }
901
1062
  function computePendingState(e) {
902
- if (e.te !== g) return true;
903
1063
  const t = e;
904
- return !!(t.re & c && !(t.re & d));
1064
+ if (e.K !== y && !(t.he & a)) return true;
1065
+ return !!(t.he & l && !(t.he & a));
905
1066
  }
906
1067
  function getPendingValueComputed(e) {
907
- if (!e.xe) {
1068
+ if (!e.Oe) {
908
1069
  const t = I;
909
1070
  I = false;
910
- const n = Q;
911
- Q = null;
912
- e.xe = optimisticComputed(() => read(e));
913
- Q = n;
1071
+ const n = H;
1072
+ H = null;
1073
+ e.Oe = optimisticComputed(() => read(e));
1074
+ H = n;
914
1075
  I = t;
915
1076
  }
916
- return e.xe;
1077
+ return e.Oe;
917
1078
  }
918
1079
  function updatePendingSignal(e) {
919
- if (e.Oe) setSignal(e.Oe, computePendingState(e));
1080
+ if (e.Ne) {
1081
+ const t = computePendingState(e);
1082
+ const n = e.Ne;
1083
+ setSignal(n, t);
1084
+ if (!t && n.D) {
1085
+ const t = resolveLane(e);
1086
+ if (t && t.T.size > 0) {
1087
+ const e = findLane(n.D);
1088
+ if (e !== t) {
1089
+ mergeLanes(t, e);
1090
+ }
1091
+ }
1092
+ clearLaneEntry(n);
1093
+ n.D = undefined;
1094
+ }
1095
+ }
920
1096
  }
921
1097
  function isEqual(e, t) {
922
1098
  return e === t;
@@ -931,16 +1107,16 @@ function untrack(e) {
931
1107
  }
932
1108
  }
933
1109
  function read(e) {
934
- if (E) {
935
- const t = e.I || e;
1110
+ if (L) {
1111
+ const t = e.H || e;
936
1112
  const n = getPendingSignal(t);
937
- const r = E;
938
- E = false;
1113
+ const r = L;
1114
+ L = false;
939
1115
  if (read(n)) {
940
- H = true;
1116
+ Q = true;
941
1117
  }
942
- E = r;
943
- return e.ne;
1118
+ L = r;
1119
+ return e.pe;
944
1120
  }
945
1121
  if (I) {
946
1122
  const t = getPendingValueComputed(e);
@@ -948,110 +1124,133 @@ function read(e) {
948
1124
  I = false;
949
1125
  const r = read(t);
950
1126
  I = n;
951
- if (t.re & c) return e.ne;
1127
+ if (t.he & l) return e.pe;
952
1128
  return r;
953
1129
  }
954
- let t = Q;
955
- if (t?.t) t = t.u;
1130
+ let t = H;
1131
+ if (t?.i) t = t.l;
956
1132
  if (N && e.R) recompute(e);
957
1133
  if (t && W) {
958
- if (e.R && e.m & u) recompute(e);
1134
+ if (e.R && e._ & u) recompute(e);
959
1135
  link(e, t);
960
- const n = e.I || e;
1136
+ const n = e.H || e;
961
1137
  if (n.R) {
962
- const r = e.m & o;
963
- if (n.o >= (r ? O.W : _.W)) {
1138
+ const r = e._ & o;
1139
+ if (n.u >= (r ? b.j : _.j)) {
964
1140
  markNode(t);
965
- markHeap(r ? O : _);
1141
+ markHeap(r ? b : _);
966
1142
  updateIfNecessary(n);
967
1143
  }
968
- const i = n.o;
969
- if (i >= t.o && e.i !== t) {
970
- t.o = i + 1;
1144
+ const i = n.u;
1145
+ if (i >= t.u && e.o !== t) {
1146
+ t.u = i + 1;
971
1147
  }
972
1148
  }
973
1149
  }
974
- const n = e.I || e;
975
- if (t && !C && n.re & c && !(j && n.X && v !== n.X)) throw n.J;
976
- if (e.R && e.re & a) {
977
- if (e.ce < x) {
1150
+ const n = e.H || e;
1151
+ if (t && n.he & l && !(j && n.F && x !== n.F)) {
1152
+ if (A) {
1153
+ const r = n.D;
1154
+ const i = findLane(A);
1155
+ if (r && findLane(r) === i && !hasActiveOverride(n)) {
1156
+ if (!W) link(e, t);
1157
+ throw n.ie;
1158
+ }
1159
+ } else {
1160
+ if (!W) link(e, t);
1161
+ throw n.ie;
1162
+ }
1163
+ }
1164
+ if (e.R && e.he & c) {
1165
+ if (e.oe < O) {
978
1166
  recompute(e, true);
979
1167
  return read(e);
980
- } else throw e.J;
1168
+ } else throw e.ie;
981
1169
  }
982
- return !t || C || e.te === g || (j && e.X && v !== e.X) ? e.ne : e.te;
1170
+ return !t || A !== null || e.K === y || (j && e.F && x !== e.F) ? e.pe : e.K;
983
1171
  }
984
1172
  function setSignal(e, t) {
985
- if (e.X && v !== e.X) A.initTransition(e.X);
986
- const n = e.le && !k;
987
- const r = n ? e.ne : e.te === g ? e.ne : e.te;
1173
+ if (e.F && x !== e.F) E.initTransition(e.F);
1174
+ const n = e.G && !P;
1175
+ const r = n ? e.pe : e.K === y ? e.pe : e.K;
988
1176
  if (typeof t === "function") t = t(r);
989
- const i = !e.ae || !e.ae(r, t);
990
- if (!i) return t;
1177
+ const i = !e._e || !e._e(r, t);
1178
+ if (!i) {
1179
+ if (n && e.K !== y && e.R) {
1180
+ insertSubs(e, true);
1181
+ schedule();
1182
+ }
1183
+ return t;
1184
+ }
991
1185
  if (n) {
992
- const n = e.te === g;
993
- if (e.X && !n) {
994
- A.initTransition(e.X);
1186
+ const n = E.Z.includes(e);
1187
+ if (e.F && n) {
1188
+ E.initTransition(e.F);
1189
+ }
1190
+ if (e.K === y) {
1191
+ e.K = e.pe;
995
1192
  }
996
- if (n) {
997
- e.te = e.ne;
998
- A.B.push(e);
1193
+ if (!n) {
1194
+ E.Z.push(e);
999
1195
  }
1000
- e.ne = t;
1196
+ e.B = (e.B || 0) + 1;
1197
+ const r = getOrCreateLane(e);
1198
+ e.D = r;
1199
+ e.pe = t;
1001
1200
  } else {
1002
- if (e.te === g) A.D.push(e);
1003
- e.te = t;
1201
+ if (e.K === y) E.Y.push(e);
1202
+ e.K = t;
1004
1203
  }
1005
1204
  updatePendingSignal(e);
1006
- if (e.xe) {
1007
- setSignal(e.xe, t);
1205
+ if (e.Oe) {
1206
+ setSignal(e.Oe, t);
1008
1207
  }
1009
- e.ce = x;
1208
+ e.oe = O;
1010
1209
  insertSubs(e, n);
1011
1210
  schedule();
1012
1211
  return t;
1013
1212
  }
1014
1213
  const R = {};
1015
1214
  function getObserver() {
1016
- if (E || I) return R;
1017
- return W ? Q : null;
1215
+ if (L || I) return R;
1216
+ return W ? H : null;
1018
1217
  }
1019
1218
  function getOwner() {
1020
- return Q;
1219
+ return H;
1021
1220
  }
1022
1221
  function onCleanup(e) {
1023
- if (!Q) return e;
1024
- if (!Q.se) Q.se = e;
1025
- else if (Array.isArray(Q.se)) Q.se.push(e);
1026
- else Q.se = [Q.se, e];
1222
+ if (!H) return e;
1223
+ if (!H.ge) H.ge = e;
1224
+ else if (Array.isArray(H.ge)) H.ge.push(e);
1225
+ else H.ge = [H.ge, e];
1027
1226
  return e;
1028
1227
  }
1029
1228
  function createOwner(e) {
1030
- const t = Q;
1229
+ const t = H;
1031
1230
  const n = {
1032
1231
  id: e?.id ?? (t?.id != null ? getNextChildId(t) : undefined),
1033
- t: true,
1034
- u: t?.t ? t.u : t,
1035
- ue: null,
1232
+ i: true,
1233
+ l: t?.i ? t.l : t,
1036
1234
  Se: null,
1037
- se: null,
1038
- $: t?.$ ?? A,
1039
- _e: t?._e || S,
1040
- me: 0,
1041
- ie: null,
1042
- oe: null,
1043
- i: t,
1235
+ Ae: null,
1236
+ ge: null,
1237
+ ae: t?.ae ?? E,
1238
+ je: t?.je || w,
1239
+ Ee: 0,
1240
+ ye: null,
1241
+ we: null,
1242
+ o: t,
1044
1243
  dispose(e = true) {
1045
1244
  disposeChildren(n, e);
1046
1245
  }
1047
1246
  };
1048
1247
  if (t) {
1049
- const e = t.ue;
1248
+ const e = t.Se;
1050
1249
  if (e === null) {
1051
- t.ue = n;
1250
+ t.Se = n;
1052
1251
  } else {
1053
- n.Se = e;
1054
- t.ue = n;
1252
+ n.Ae = e;
1253
+ t.Se = n;
1055
1254
  }
1056
1255
  }
1057
1256
  return n;
@@ -1061,14 +1260,14 @@ function createRoot(e, t) {
1061
1260
  return runWithOwner(n, () => e(n.dispose));
1062
1261
  }
1063
1262
  function runWithOwner(e, t) {
1064
- const n = Q;
1263
+ const n = H;
1065
1264
  const r = W;
1066
- Q = e;
1265
+ H = e;
1067
1266
  W = false;
1068
1267
  try {
1069
1268
  return t();
1070
1269
  } finally {
1071
- Q = n;
1270
+ H = n;
1072
1271
  W = r;
1073
1272
  }
1074
1273
  }
@@ -1091,16 +1290,18 @@ function pending(e) {
1091
1290
  }
1092
1291
  }
1093
1292
  function isPending(e) {
1094
- const t = E;
1095
- const n = H;
1096
- E = true;
1097
- H = false;
1293
+ const t = L;
1294
+ const n = Q;
1295
+ L = true;
1296
+ Q = false;
1098
1297
  try {
1099
1298
  e();
1100
- return H;
1299
+ return Q;
1300
+ } catch {
1301
+ return Q;
1101
1302
  } finally {
1102
- E = t;
1103
- H = n;
1303
+ L = t;
1304
+ Q = n;
1104
1305
  }
1105
1306
  }
1106
1307
  function refresh(e) {
@@ -1108,7 +1309,7 @@ function refresh(e) {
1108
1309
  N = true;
1109
1310
  try {
1110
1311
  if (typeof e !== "function") {
1111
- recompute(e[m]);
1312
+ recompute(e[S]);
1112
1313
  return e;
1113
1314
  }
1114
1315
  return untrack(e);
@@ -1129,7 +1330,7 @@ function getContext(e, t = getOwner()) {
1129
1330
  if (!t) {
1130
1331
  throw new NoOwnerError();
1131
1332
  }
1132
- const n = hasContext(e, t) ? t._e[e.id] : e.defaultValue;
1333
+ const n = hasContext(e, t) ? t.je[e.id] : e.defaultValue;
1133
1334
  if (isUndefined(n)) {
1134
1335
  throw new ContextNotFoundError();
1135
1336
  }
@@ -1139,10 +1340,10 @@ function setContext(e, t, n = getOwner()) {
1139
1340
  if (!n) {
1140
1341
  throw new NoOwnerError();
1141
1342
  }
1142
- n._e = { ...n._e, [e.id]: isUndefined(t) ? e.defaultValue : t };
1343
+ n.je = { ...n.je, [e.id]: isUndefined(t) ? e.defaultValue : t };
1143
1344
  }
1144
1345
  function hasContext(e, t) {
1145
- return !isUndefined(t?._e[e.id]);
1346
+ return !isUndefined(t?.je[e.id]);
1146
1347
  }
1147
1348
  function isUndefined(e) {
1148
1349
  return typeof e === "undefined";
@@ -1152,78 +1353,80 @@ function effect(e, t, n, r, i) {
1152
1353
  const o = computed(i?.render ? t => staleValues(() => e(t)) : e, r, {
1153
1354
  ...i,
1154
1355
  equals: () => {
1155
- o.Z = !o.J;
1156
- if (s) o.$.enqueue(o.Y, runEffect.bind(o));
1356
+ o.ce = !o.ie;
1357
+ if (s) o.ae.enqueue(o.le, runEffect.bind(o));
1157
1358
  return false;
1158
1359
  },
1159
1360
  lazy: true
1160
1361
  });
1161
- o.ve = r;
1162
- o.Pe = t;
1163
- o.Ce = n;
1164
- o.ke = undefined;
1165
- o.Y = i?.render ? p : h;
1166
- o.pe = () => {
1167
- if (o.re & a) {
1168
- let e = o.J;
1169
- o.$.notify(o, c, 0);
1170
- if (o.Y === h) {
1362
+ o.Le = r;
1363
+ o.Qe = t;
1364
+ o.Ie = n;
1365
+ o.He = undefined;
1366
+ o.le = i?.render ? d : p;
1367
+ o.xe = (e, t) => {
1368
+ const n = e !== undefined ? e : o.he;
1369
+ const r = t !== undefined ? t : o.ie;
1370
+ if (n & c) {
1371
+ let e = r;
1372
+ o.ae.notify(o, l, 0);
1373
+ if (o.le === p) {
1171
1374
  try {
1172
- return o.Ce
1173
- ? o.Ce(e, () => {
1174
- o.ke?.();
1175
- o.ke = undefined;
1375
+ return o.Ie
1376
+ ? o.Ie(e, () => {
1377
+ o.He?.();
1378
+ o.He = undefined;
1176
1379
  })
1177
1380
  : console.error(e);
1178
1381
  } catch (t) {
1179
1382
  e = t;
1180
1383
  }
1181
1384
  }
1182
- if (!o.$.notify(o, a, a)) throw e;
1183
- } else if (o.Y === p) o.$.notify(o, c | a, o.re);
1385
+ if (!o.ae.notify(o, c, c)) throw e;
1386
+ } else if (o.le === d) o.ae.notify(o, l | c, n, r);
1184
1387
  };
1185
1388
  recompute(o, true);
1186
- !i?.defer && (o.Y === h ? o.$.enqueue(o.Y, runEffect.bind(o)) : runEffect.call(o));
1389
+ !i?.defer && (o.le === p ? o.ae.enqueue(o.le, runEffect.bind(o)) : runEffect.call(o));
1187
1390
  s = true;
1188
- onCleanup(() => o.ke?.());
1391
+ onCleanup(() => o.He?.());
1189
1392
  }
1190
1393
  function runEffect() {
1191
- if (!this.Z || this.m & u) return;
1192
- this.ke?.();
1193
- this.ke = undefined;
1394
+ if (!this.ce || this._ & u) return;
1395
+ this.He?.();
1396
+ this.He = undefined;
1194
1397
  try {
1195
- this.ke = this.Pe(this.ne, this.ve);
1398
+ this.He = this.Qe(this.pe, this.Le);
1196
1399
  } catch (e) {
1197
- if (!this.$.notify(this, a, a)) throw e;
1400
+ if (!this.ae.notify(this, c, c)) throw e;
1198
1401
  } finally {
1199
- this.ve = this.ne;
1200
- this.Z = false;
1402
+ this.Le = this.pe;
1403
+ this.ce = false;
1201
1404
  }
1202
1405
  }
1203
1406
  function trackedEffect(e, t) {
1204
1407
  const run = () => {
1205
- if (!n.Z || n.m & u) return;
1206
- n.Z = false;
1408
+ if (!n.ce || n._ & u) return;
1409
+ n.ce = false;
1207
1410
  recompute(n);
1208
1411
  };
1209
1412
  const n = computed(
1210
1413
  () => {
1211
1414
  try {
1212
- n.ke?.();
1213
- n.ke = undefined;
1214
- n.ke = staleValues(e) || undefined;
1415
+ n.He?.();
1416
+ n.He = undefined;
1417
+ n.He = staleValues(e) || undefined;
1215
1418
  } finally {
1216
1419
  }
1217
1420
  },
1218
1421
  undefined,
1219
1422
  { ...t, lazy: true, pureWrite: true }
1220
1423
  );
1221
- n.ke = undefined;
1222
- n.Z = true;
1223
- n.Y = y;
1224
- n.ee = run;
1225
- n.$.enqueue(h, run);
1226
- onCleanup(() => n.ke?.());
1424
+ n.He = undefined;
1425
+ n.ce = true;
1426
+ n.le = h;
1427
+ n.de = run;
1428
+ n.ae.enqueue(p, run);
1429
+ onCleanup(() => n.He?.());
1227
1430
  }
1228
1431
  function createSignal(e, t, n) {
1229
1432
  if (typeof e === "function") {
@@ -1288,13 +1491,13 @@ function createOptimistic(e, t, n) {
1288
1491
  function onSettled(e) {
1289
1492
  getOwner()
1290
1493
  ? createTrackedEffect(() => untrack(e))
1291
- : A.enqueue(h, () => {
1494
+ : E.enqueue(p, () => {
1292
1495
  const t = e();
1293
1496
  t?.();
1294
1497
  });
1295
1498
  }
1296
1499
  function unwrap(e) {
1297
- return e?.[V]?.[U] ?? e;
1500
+ return e?.[F]?.[U] ?? e;
1298
1501
  }
1299
1502
  function getOverrideValue(e, t, n, r) {
1300
1503
  return t && r in t ? t[r] : e[r];
@@ -1305,22 +1508,22 @@ function getAllKeys(e, t, n) {
1305
1508
  return Array.from(new Set([...r, ...i]));
1306
1509
  }
1307
1510
  function applyState(e, t, n, r) {
1308
- const i = t?.[V];
1511
+ const i = t?.[F];
1309
1512
  if (!i) return;
1310
1513
  const s = i[G];
1311
1514
  const o = i[K];
1312
1515
  let u = i[U];
1313
1516
  if (e === s && !o) return;
1314
- (i[X] || $).set(e, i[M]);
1517
+ (i[Y] || ee).set(e, i[V]);
1315
1518
  i[G] = e;
1316
1519
  i[K] = undefined;
1317
1520
  if (Array.isArray(s)) {
1318
1521
  let t = false;
1319
- const l = getOverrideValue(s, o, u, "length");
1320
- if (e.length && l && e[0] && n(e[0]) != null) {
1321
- let f, c, a, d, p, h, y, g;
1522
+ const f = getOverrideValue(s, o, u, "length");
1523
+ if (e.length && f && e[0] && n(e[0]) != null) {
1524
+ let l, c, a, d, p, h, y, g;
1322
1525
  for (
1323
- a = 0, d = Math.min(l, e.length);
1526
+ a = 0, d = Math.min(f, e.length);
1324
1527
  a < d && ((h = getOverrideValue(s, o, u, a)) === e[a] || (h && e[a] && n(h) === n(e[a])));
1325
1528
  a++
1326
1529
  ) {
@@ -1329,7 +1532,7 @@ function applyState(e, t, n, r) {
1329
1532
  const w = new Array(e.length),
1330
1533
  S = new Map();
1331
1534
  for (
1332
- d = l - 1, p = e.length - 1;
1535
+ d = f - 1, p = e.length - 1;
1333
1536
  d >= a &&
1334
1537
  p >= a &&
1335
1538
  ((h = getOverrideValue(s, o, u, d)) === e[p] || (h && e[p] && n(h) === n(e[p])));
@@ -1348,20 +1551,20 @@ function applyState(e, t, n, r) {
1348
1551
  i[U][c] && setSignal(i[U][c], s);
1349
1552
  applyState(e[c], s, n, r);
1350
1553
  }
1351
- t && i[U][q] && setSignal(i[U][q], void 0);
1352
- l !== e.length && i[U].length && setSignal(i[U].length, e.length);
1554
+ t && i[U][M] && setSignal(i[U][M], void 0);
1555
+ f !== e.length && i[U].length && setSignal(i[U].length, e.length);
1353
1556
  return;
1354
1557
  }
1355
1558
  y = new Array(p + 1);
1356
1559
  for (c = p; c >= a; c--) {
1357
1560
  h = e[c];
1358
1561
  g = h ? n(h) : h;
1359
- f = S.get(g);
1360
- y[c] = f === undefined ? -1 : f;
1562
+ l = S.get(g);
1563
+ y[c] = l === undefined ? -1 : l;
1361
1564
  S.set(g, c);
1362
1565
  }
1363
- for (f = a; f <= d; f++) {
1364
- h = getOverrideValue(s, o, u, f);
1566
+ for (l = a; l <= d; l++) {
1567
+ h = getOverrideValue(s, o, u, l);
1365
1568
  g = h ? n(h) : h;
1366
1569
  c = S.get(g);
1367
1570
  if (c !== undefined && c !== -1) {
@@ -1379,23 +1582,23 @@ function applyState(e, t, n, r) {
1379
1582
  }
1380
1583
  if (a < e.length) t = true;
1381
1584
  } else if (e.length) {
1382
- for (let t = 0, l = e.length; t < l; t++) {
1383
- const l = getOverrideValue(s, o, u, t);
1384
- isWrappable(l) ? applyState(e[t], wrap(l, i), n, r) : i[U][t] && setSignal(i[U][t], e[t]);
1585
+ for (let t = 0, f = e.length; t < f; t++) {
1586
+ const f = getOverrideValue(s, o, u, t);
1587
+ isWrappable(f) ? applyState(e[t], wrap(f, i), n, r) : i[U][t] && setSignal(i[U][t], e[t]);
1385
1588
  }
1386
1589
  }
1387
- if (l !== e.length) {
1590
+ if (f !== e.length) {
1388
1591
  t = true;
1389
1592
  i[U].length && setSignal(i[U].length, e.length);
1390
1593
  }
1391
- t && i[U][q] && setSignal(i[U][q], void 0);
1594
+ t && i[U][M] && setSignal(i[U][M], void 0);
1392
1595
  return;
1393
1596
  }
1394
1597
  if (u) {
1395
- const t = u[q];
1396
- const l = t || r ? getAllKeys(s, o, e) : Object.keys(u);
1397
- for (let f = 0, c = l.length; f < c; f++) {
1398
- const c = l[f];
1598
+ const t = u[M];
1599
+ const f = t || r ? getAllKeys(s, o, e) : Object.keys(u);
1600
+ for (let l = 0, c = f.length; l < c; l++) {
1601
+ const c = f[l];
1399
1602
  const a = u[c];
1400
1603
  const d = unwrap(getOverrideValue(s, o, u, c));
1401
1604
  let p = unwrap(e[c]);
@@ -1406,7 +1609,7 @@ function applyState(e, t, n, r) {
1406
1609
  } else applyState(p, wrap(d, i), n, r);
1407
1610
  }
1408
1611
  }
1409
- if ((u = i[L])) {
1612
+ if ((u = i[J])) {
1410
1613
  const t = Object.keys(u);
1411
1614
  for (let n = 0, r = t.length; n < r; n++) {
1412
1615
  const r = t[n];
@@ -1428,9 +1631,9 @@ function createProjectionInternal(e, t = {}, n) {
1428
1631
  let r;
1429
1632
  const i = new WeakMap();
1430
1633
  const wrapper = e => {
1431
- e[J] = wrapProjection;
1432
- e[X] = i;
1433
- Object.defineProperty(e, Y, {
1634
+ e[X] = wrapProjection;
1635
+ e[Y] = i;
1636
+ Object.defineProperty(e, Z, {
1434
1637
  get() {
1435
1638
  return r;
1436
1639
  },
@@ -1439,8 +1642,8 @@ function createProjectionInternal(e, t = {}, n) {
1439
1642
  };
1440
1643
  const wrapProjection = e => {
1441
1644
  if (i.has(e)) return i.get(e);
1442
- if (e[V]?.[J] === wrapProjection) return e;
1443
- const t = createStoreProxy(e, ne, wrapper);
1645
+ if (e[F]?.[X] === wrapProjection) return e;
1646
+ const t = createStoreProxy(e, re, wrapper);
1444
1647
  i.set(e, t);
1445
1648
  return t;
1446
1649
  };
@@ -1455,7 +1658,7 @@ function createProjectionInternal(e, t = {}, n) {
1455
1658
  i !== r && i !== undefined && reconcile(i, n?.key || "id", n?.all)(s);
1456
1659
  });
1457
1660
  });
1458
- r.we = true;
1661
+ r.ke = true;
1459
1662
  return { store: s, node: r };
1460
1663
  }
1461
1664
  function createProjection(e, t = {}, n) {
@@ -1497,46 +1700,46 @@ const T = {
1497
1700
  return true;
1498
1701
  }
1499
1702
  };
1500
- const q = Symbol(0),
1703
+ const M = Symbol(0),
1704
+ q = Symbol(0),
1501
1705
  F = Symbol(0),
1502
1706
  V = Symbol(0),
1503
- M = Symbol(0),
1504
- D = Symbol(0);
1505
- const B = new WeakMap();
1707
+ B = Symbol(0);
1708
+ const D = new WeakMap();
1506
1709
  const G = "v",
1507
1710
  K = "o",
1508
1711
  z = "x",
1509
1712
  U = "n",
1510
- L = "h",
1511
- J = "w",
1512
- X = "l",
1513
- Y = "f",
1514
- Z = "p";
1515
- function createStoreProxy(e, t = ne, n) {
1713
+ J = "h",
1714
+ X = "w",
1715
+ Y = "l",
1716
+ Z = "f",
1717
+ $ = "p";
1718
+ function createStoreProxy(e, t = re, n) {
1516
1719
  let r;
1517
1720
  if (Array.isArray(e)) {
1518
1721
  r = [];
1519
1722
  r.v = e;
1520
1723
  } else r = { v: e };
1521
1724
  n && n(r);
1522
- return (r[M] = new Proxy(r, t));
1725
+ return (r[V] = new Proxy(r, t));
1523
1726
  }
1524
- const $ = new WeakMap();
1727
+ const ee = new WeakMap();
1525
1728
  function wrap(e, t) {
1526
- if (t?.[J]) return t[J](e, t);
1527
- let n = e[M] || $.get(e);
1528
- if (!n) $.set(e, (n = createStoreProxy(e)));
1729
+ if (t?.[X]) return t[X](e, t);
1730
+ let n = e[V] || ee.get(e);
1731
+ if (!n) ee.set(e, (n = createStoreProxy(e)));
1529
1732
  return n;
1530
1733
  }
1531
1734
  function isWrappable(e) {
1532
1735
  return e != null && typeof e === "object" && !Object.isFrozen(e);
1533
1736
  }
1534
- let ee = false;
1737
+ let te = false;
1535
1738
  function setWriteOverride(e) {
1536
- ee = e;
1739
+ te = e;
1537
1740
  }
1538
1741
  function writeOnly(e) {
1539
- return ee || !!te?.has(e);
1742
+ return te || !!ne?.has(e);
1540
1743
  }
1541
1744
  function getNodes(e, t) {
1542
1745
  let n = e[t];
@@ -1555,11 +1758,11 @@ function getNode(e, t, n, r, i = isEqual, s) {
1555
1758
  },
1556
1759
  r
1557
1760
  );
1558
- if (s) o.le = true;
1761
+ if (s) o.G = true;
1559
1762
  return (e[t] = o);
1560
1763
  }
1561
- function trackSelf(e, t = q) {
1562
- getObserver() && read(getNode(getNodes(e, U), t, undefined, e[Y], false, e[Z]));
1764
+ function trackSelf(e, t = M) {
1765
+ getObserver() && read(getNode(getNodes(e, U), t, undefined, e[Z], false, e[$]));
1563
1766
  }
1564
1767
  function getKeys(e, t, n = true) {
1565
1768
  const r = untrack(() => (n ? Object.keys(e) : Reflect.ownKeys(e)));
@@ -1567,7 +1770,7 @@ function getKeys(e, t, n = true) {
1567
1770
  const i = new Set(r);
1568
1771
  const s = Reflect.ownKeys(t);
1569
1772
  for (const e of s) {
1570
- if (t[e] !== D) i.add(e);
1773
+ if (t[e] !== B) i.add(e);
1571
1774
  else i.delete(e);
1572
1775
  }
1573
1776
  return Array.from(i);
@@ -1575,18 +1778,18 @@ function getKeys(e, t, n = true) {
1575
1778
  function getPropertyDescriptor(e, t, n) {
1576
1779
  let r = e;
1577
1780
  if (t && n in t) {
1578
- if (r[n] === D) return void 0;
1781
+ if (r[n] === B) return void 0;
1579
1782
  if (!(n in r)) r = t;
1580
1783
  }
1581
1784
  return Reflect.getOwnPropertyDescriptor(r, n);
1582
1785
  }
1583
- let te = null;
1584
- const ne = {
1786
+ let ne = null;
1787
+ const re = {
1585
1788
  get(e, t, n) {
1586
- if (t === V) return e;
1587
- if (t === M) return n;
1588
- if (t === m) return e[Y];
1589
- if (t === q || t === F) {
1789
+ if (t === F) return e;
1790
+ if (t === V) return n;
1791
+ if (t === S) return e[Z];
1792
+ if (t === M || t === q) {
1590
1793
  trackSelf(e, t);
1591
1794
  return n;
1592
1795
  }
@@ -1594,105 +1797,105 @@ const ne = {
1594
1797
  const i = r[t];
1595
1798
  const s = e[z] && t in e[z];
1596
1799
  const o = s || (e[K] && t in e[K]);
1597
- const u = !!e[G][V];
1598
- const l = s ? e[z] : e[K] && t in e[K] ? e[K] : e[G];
1800
+ const u = !!e[G][F];
1801
+ const f = s ? e[z] : e[K] && t in e[K] ? e[K] : e[G];
1599
1802
  if (!i) {
1600
- const e = Object.getOwnPropertyDescriptor(l, t);
1803
+ const e = Object.getOwnPropertyDescriptor(f, t);
1601
1804
  if (e && e.get) return e.get.call(n);
1602
1805
  }
1603
1806
  if (writeOnly(n)) {
1604
- let n = i && (o || !u) ? (i.te !== g ? (i.le ? i.ne : i.te) : i.ne) : l[t];
1605
- n === D && (n = undefined);
1807
+ let n = i && (o || !u) ? (i.K !== y ? (i.G ? i.pe : i.K) : i.pe) : f[t];
1808
+ n === B && (n = undefined);
1606
1809
  if (!isWrappable(n)) return n;
1607
1810
  const r = wrap(n, e);
1608
- te?.add(r);
1811
+ ne?.add(r);
1609
1812
  return r;
1610
1813
  }
1611
- let f = i ? (o || !u ? read(r[t]) : (read(r[t]), l[t])) : l[t];
1612
- f === D && (f = undefined);
1814
+ let l = i ? (o || !u ? read(r[t]) : (read(r[t]), f[t])) : f[t];
1815
+ l === B && (l = undefined);
1613
1816
  if (!i) {
1614
- if (!o && typeof f === "function" && !l.hasOwnProperty(t)) {
1817
+ if (!o && typeof l === "function" && !f.hasOwnProperty(t)) {
1615
1818
  let t;
1616
1819
  return !Array.isArray(e[G]) && (t = Object.getPrototypeOf(e[G])) && t !== Object.prototype
1617
- ? f.bind(l)
1618
- : f;
1820
+ ? l.bind(f)
1821
+ : l;
1619
1822
  } else if (getObserver()) {
1620
- return read(getNode(r, t, isWrappable(f) ? wrap(f, e) : f, e[Y], isEqual, e[Z]));
1823
+ return read(getNode(r, t, isWrappable(l) ? wrap(l, e) : l, e[Z], isEqual, e[$]));
1621
1824
  }
1622
1825
  }
1623
- return isWrappable(f) ? wrap(f, e) : f;
1826
+ return isWrappable(l) ? wrap(l, e) : l;
1624
1827
  },
1625
1828
  has(e, t) {
1626
- if (t === M || t === q || t === "__proto__") return true;
1627
- const n = e[z] && t in e[z] ? e[z][t] !== D : e[K] && t in e[K] ? e[K][t] !== D : t in e[G];
1628
- getObserver() && read(getNode(getNodes(e, L), t, n, e[Y], isEqual, e[Z]));
1829
+ if (t === V || t === M || t === "__proto__") return true;
1830
+ const n = e[z] && t in e[z] ? e[z][t] !== B : e[K] && t in e[K] ? e[K][t] !== B : t in e[G];
1831
+ getObserver() && read(getNode(getNodes(e, J), t, n, e[Z], isEqual, e[$]));
1629
1832
  return n;
1630
1833
  },
1631
1834
  set(e, t, n) {
1632
- const r = e[M];
1835
+ const r = e[V];
1633
1836
  if (writeOnly(r)) {
1634
- if (e[Z]) {
1635
- const t = e[Y];
1636
- if (t?.X) {
1637
- A.initTransition(t.X);
1837
+ if (e[$]) {
1838
+ const t = e[Z];
1839
+ if (t?.F) {
1840
+ E.initTransition(t.F);
1638
1841
  }
1639
1842
  }
1640
1843
  untrack(() => {
1641
1844
  const i = e[G];
1642
1845
  const s = i[t];
1643
- const o = e[Z] && !k;
1846
+ const o = e[$] && !P;
1644
1847
  const u = o ? z : K;
1645
1848
  if (o) trackOptimisticStore(r);
1646
- const l = e[z] && t in e[z] ? e[z][t] : e[K] && t in e[K] ? e[K][t] : s;
1647
- const f = n?.[V]?.[G] ?? n;
1648
- if (l === f) return true;
1849
+ const f = e[z] && t in e[z] ? e[z][t] : e[K] && t in e[K] ? e[K][t] : s;
1850
+ const l = n?.[F]?.[G] ?? n;
1851
+ if (f === l) return true;
1649
1852
  const c = e[z]?.length || e[K]?.length || i.length;
1650
- if (f !== undefined && f === s) delete e[u][t];
1651
- else (e[u] || (e[u] = Object.create(null)))[t] = f;
1652
- const a = isWrappable(f);
1653
- if (isWrappable(l)) {
1654
- const e = B.get(l);
1655
- e && (e instanceof Set ? e.delete(r) : B.delete(l));
1853
+ if (l !== undefined && l === s) delete e[u][t];
1854
+ else (e[u] || (e[u] = Object.create(null)))[t] = l;
1855
+ const a = isWrappable(l);
1856
+ if (isWrappable(f)) {
1857
+ const e = D.get(f);
1858
+ e && (e instanceof Set ? e.delete(r) : D.delete(f));
1656
1859
  }
1657
- if (recursivelyNotify(r, $) && a) recursivelyAddParent(f, r);
1658
- e[L]?.[t] && setSignal(e[L][t], true);
1860
+ if (recursivelyNotify(r, ee) && a) recursivelyAddParent(l, r);
1861
+ e[J]?.[t] && setSignal(e[J][t], true);
1659
1862
  const d = getNodes(e, U);
1660
- d[t] && setSignal(d[t], () => (a ? wrap(f, e) : f));
1863
+ d[t] && setSignal(d[t], () => (a ? wrap(l, e) : l));
1661
1864
  if (Array.isArray(i)) {
1662
1865
  if (t === "length") {
1663
- d.length && setSignal(d.length, f);
1866
+ d.length && setSignal(d.length, l);
1664
1867
  } else {
1665
1868
  const e = parseInt(t) + 1;
1666
1869
  if (e > c) d.length && setSignal(d.length, e);
1667
1870
  }
1668
1871
  }
1669
- d[q] && setSignal(d[q], undefined);
1872
+ d[M] && setSignal(d[M], undefined);
1670
1873
  });
1671
1874
  }
1672
1875
  return true;
1673
1876
  },
1674
1877
  deleteProperty(e, t) {
1675
- const n = e[z]?.[t] === D;
1676
- const r = e[K]?.[t] === D;
1677
- if (writeOnly(e[M]) && !n && !r) {
1878
+ const n = e[z]?.[t] === B;
1879
+ const r = e[K]?.[t] === B;
1880
+ if (writeOnly(e[V]) && !n && !r) {
1678
1881
  untrack(() => {
1679
- const n = e[Z] && !k;
1882
+ const n = e[$] && !P;
1680
1883
  const r = n ? z : K;
1681
- if (n) trackOptimisticStore(e[M]);
1884
+ if (n) trackOptimisticStore(e[V]);
1682
1885
  const i = e[z] && t in e[z] ? e[z][t] : e[K] && t in e[K] ? e[K][t] : e[G][t];
1683
1886
  if (t in e[G] || (e[K] && t in e[K])) {
1684
- (e[r] || (e[r] = Object.create(null)))[t] = D;
1887
+ (e[r] || (e[r] = Object.create(null)))[t] = B;
1685
1888
  } else if (e[r] && t in e[r]) {
1686
1889
  delete e[r][t];
1687
1890
  } else return true;
1688
1891
  if (isWrappable(i)) {
1689
- const t = B.get(i);
1690
- t && (t instanceof Set ? t.delete(e) : B.delete(i));
1892
+ const t = D.get(i);
1893
+ t && (t instanceof Set ? t.delete(e) : D.delete(i));
1691
1894
  }
1692
- if (e[L]?.[t]) setSignal(e[L][t], false);
1895
+ if (e[J]?.[t]) setSignal(e[J][t], false);
1693
1896
  const s = getNodes(e, U);
1694
1897
  s[t] && setSignal(s[t], undefined);
1695
- s[q] && setSignal(s[q], undefined);
1898
+ s[M] && setSignal(s[M], undefined);
1696
1899
  });
1697
1900
  }
1698
1901
  return true;
@@ -1703,7 +1906,7 @@ const ne = {
1703
1906
  if (e[z]) {
1704
1907
  const n = new Set(t);
1705
1908
  for (const t of Reflect.ownKeys(e[z])) {
1706
- if (e[z][t] !== D) n.add(t);
1909
+ if (e[z][t] !== B) n.add(t);
1707
1910
  else n.delete(t);
1708
1911
  }
1709
1912
  t = Array.from(n);
@@ -1711,9 +1914,9 @@ const ne = {
1711
1914
  return t;
1712
1915
  },
1713
1916
  getOwnPropertyDescriptor(e, t) {
1714
- if (t === M) return { value: e[M], writable: true, configurable: true };
1917
+ if (t === V) return { value: e[V], writable: true, configurable: true };
1715
1918
  if (e[z] && t in e[z]) {
1716
- if (e[z][t] === D) return undefined;
1919
+ if (e[z][t] === B) return undefined;
1717
1920
  const n = getPropertyDescriptor(e[G], e[K], t);
1718
1921
  if (n) {
1719
1922
  return { ...n, value: e[z][t] };
@@ -1727,9 +1930,9 @@ const ne = {
1727
1930
  }
1728
1931
  };
1729
1932
  function storeSetter(e, t) {
1730
- const n = te;
1731
- te = new Set();
1732
- te.add(e);
1933
+ const n = ne;
1934
+ ne = new Set();
1935
+ ne.add(e);
1733
1936
  try {
1734
1937
  const n = t(e);
1735
1938
  if (n !== e && n !== undefined) {
@@ -1745,8 +1948,8 @@ function storeSetter(e, t) {
1745
1948
  }
1746
1949
  }
1747
1950
  } finally {
1748
- te.clear();
1749
- te = n;
1951
+ ne.clear();
1952
+ ne = n;
1750
1953
  }
1751
1954
  }
1752
1955
  function createStore(e, t, n) {
@@ -1755,17 +1958,17 @@ function createStore(e, t, n) {
1755
1958
  return [i, e => storeSetter(i, e)];
1756
1959
  }
1757
1960
  function recursivelyNotify(e, t) {
1758
- let n = e[V] || t?.get(e)?.[V];
1961
+ let n = e[F] || t?.get(e)?.[F];
1759
1962
  let r = false;
1760
1963
  if (n) {
1761
- const e = getNodes(n, U)[F];
1964
+ const e = getNodes(n, U)[q];
1762
1965
  if (e) {
1763
1966
  setSignal(e, undefined);
1764
1967
  r = true;
1765
1968
  }
1766
- t = n[X] || t;
1969
+ t = n[Y] || t;
1767
1970
  }
1768
- const i = B.get(n?.[G] || e);
1971
+ const i = D.get(n?.[G] || e);
1769
1972
  if (!i) return r;
1770
1973
  if (i instanceof Set) {
1771
1974
  for (let e of i) r = recursivelyNotify(e, t) || r;
@@ -1774,16 +1977,16 @@ function recursivelyNotify(e, t) {
1774
1977
  }
1775
1978
  function recursivelyAddParent(e, t) {
1776
1979
  let n;
1777
- const r = e[V];
1980
+ const r = e[F];
1778
1981
  if (r) {
1779
1982
  n = r[K];
1780
1983
  e = r[G];
1781
1984
  }
1782
1985
  if (t) {
1783
- let n = B.get(e);
1784
- if (!n) B.set(e, t);
1986
+ let n = D.get(e);
1987
+ if (!n) D.set(e, t);
1785
1988
  else if (n !== t) {
1786
- if (!(n instanceof Set)) B.set(e, (n = new Set([n])));
1989
+ if (!(n instanceof Set)) D.set(e, (n = new Set([n])));
1787
1990
  else if (n.has(t)) return;
1788
1991
  n.add(t);
1789
1992
  } else return;
@@ -1805,10 +2008,10 @@ function recursivelyAddParent(e, t) {
1805
2008
  }
1806
2009
  function deep(e) {
1807
2010
  recursivelyAddParent(e);
1808
- return e[F];
2011
+ return e[q];
1809
2012
  }
1810
2013
  function createOptimisticStore(e, t, n) {
1811
- GlobalQueue.L ||= clearOptimisticStore;
2014
+ GlobalQueue.ne ||= clearOptimisticStore;
1812
2015
  const r = typeof e === "function";
1813
2016
  const i = (r ? t : e) ?? {};
1814
2017
  const s = r ? e : undefined;
@@ -1816,19 +2019,28 @@ function createOptimisticStore(e, t, n) {
1816
2019
  return [o, e => storeSetter(o, e)];
1817
2020
  }
1818
2021
  function clearOptimisticStore(e) {
1819
- const t = e[V];
2022
+ const t = e[F];
1820
2023
  if (!t || !t[z]) return;
1821
2024
  const n = t[z];
1822
2025
  const r = t[U];
1823
- if (r) {
1824
- for (const e of Reflect.ownKeys(n)) {
1825
- if (r[e]) {
1826
- const n = t[K] && e in t[K] ? t[K][e] : t[G][e];
1827
- const i = n === D ? undefined : n;
1828
- setSignal(r[e], isWrappable(i) ? wrap(i, t) : i);
2026
+ setProjectionWriteActive(true);
2027
+ try {
2028
+ if (r) {
2029
+ for (const e of Reflect.ownKeys(n)) {
2030
+ if (r[e]) {
2031
+ r[e].D = undefined;
2032
+ const n = t[K] && e in t[K] ? t[K][e] : t[G][e];
2033
+ const i = n === B ? undefined : n;
2034
+ setSignal(r[e], isWrappable(i) ? wrap(i, t) : i);
2035
+ }
2036
+ }
2037
+ if (r[M]) {
2038
+ r[M].D = undefined;
2039
+ setSignal(r[M], undefined);
1829
2040
  }
1830
2041
  }
1831
- r[q] && setSignal(r[q], undefined);
2042
+ } finally {
2043
+ setProjectionWriteActive(false);
1832
2044
  }
1833
2045
  delete t[z];
1834
2046
  }
@@ -1836,10 +2048,10 @@ function createOptimisticProjectionInternal(e, t = {}, n) {
1836
2048
  let r;
1837
2049
  const i = new WeakMap();
1838
2050
  const wrapper = e => {
1839
- e[J] = wrapProjection;
1840
- e[X] = i;
1841
- e[Z] = true;
1842
- Object.defineProperty(e, Y, {
2051
+ e[X] = wrapProjection;
2052
+ e[Y] = i;
2053
+ e[$] = true;
2054
+ Object.defineProperty(e, Z, {
1843
2055
  get() {
1844
2056
  return r;
1845
2057
  },
@@ -1848,8 +2060,8 @@ function createOptimisticProjectionInternal(e, t = {}, n) {
1848
2060
  };
1849
2061
  const wrapProjection = e => {
1850
2062
  if (i.has(e)) return i.get(e);
1851
- if (e[V]?.[J] === wrapProjection) return e;
1852
- const t = createStoreProxy(e, ne, wrapper);
2063
+ if (e[F]?.[X] === wrapProjection) return e;
2064
+ const t = createStoreProxy(e, re, wrapper);
1853
2065
  i.set(e, t);
1854
2066
  return t;
1855
2067
  };
@@ -1874,21 +2086,21 @@ function createOptimisticProjectionInternal(e, t = {}, n) {
1874
2086
  setProjectionWriteActive(false);
1875
2087
  }
1876
2088
  });
1877
- r.we = true;
2089
+ r.ke = true;
1878
2090
  }
1879
2091
  return { store: s, node: r };
1880
2092
  }
1881
2093
  function snapshot(e, t, n) {
1882
- let r, i, s, o, u, l;
2094
+ let r, i, s, o, u, f;
1883
2095
  if (!isWrappable(e)) return e;
1884
2096
  if (t && t.has(e)) return t.get(e);
1885
2097
  if (!t) t = new Map();
1886
- if ((r = e[V] || n?.get(e)?.[V])) {
2098
+ if ((r = e[F] || n?.get(e)?.[F])) {
1887
2099
  s = r[K];
1888
2100
  i = Array.isArray(r[G]);
1889
2101
  t.set(e, s ? (o = i ? [] : Object.create(Object.getPrototypeOf(r[G]))) : r[G]);
1890
2102
  e = r[G];
1891
- n = $;
2103
+ n = ee;
1892
2104
  } else {
1893
2105
  i = Array.isArray(e);
1894
2106
  t.set(e, e);
@@ -1896,26 +2108,26 @@ function snapshot(e, t, n) {
1896
2108
  if (i) {
1897
2109
  const r = s?.length || e.length;
1898
2110
  for (let i = 0; i < r; i++) {
1899
- l = s && i in s ? s[i] : e[i];
1900
- if (l === D) continue;
1901
- if ((u = snapshot(l, t, n)) !== l || o) {
2111
+ f = s && i in s ? s[i] : e[i];
2112
+ if (f === B) continue;
2113
+ if ((u = snapshot(f, t, n)) !== f || o) {
1902
2114
  if (!o) t.set(e, (o = [...e]));
1903
2115
  o[i] = u;
1904
2116
  }
1905
2117
  }
1906
2118
  } else {
1907
2119
  const r = getKeys(e, s);
1908
- for (let i = 0, f = r.length; i < f; i++) {
1909
- let f = r[i];
1910
- const c = getPropertyDescriptor(e, s, f);
2120
+ for (let i = 0, l = r.length; i < l; i++) {
2121
+ let l = r[i];
2122
+ const c = getPropertyDescriptor(e, s, l);
1911
2123
  if (c.get) continue;
1912
- l = s && f in s ? s[f] : e[f];
1913
- if ((u = snapshot(l, t, n)) !== e[f] || o) {
2124
+ f = s && l in s ? s[l] : e[l];
2125
+ if ((u = snapshot(f, t, n)) !== e[l] || o) {
1914
2126
  if (!o) {
1915
2127
  o = Object.create(Object.getPrototypeOf(e));
1916
2128
  Object.assign(o, e);
1917
2129
  }
1918
- o[f] = u;
2130
+ o[l] = u;
1919
2131
  }
1920
2132
  }
1921
2133
  }
@@ -1924,13 +2136,13 @@ function snapshot(e, t, n) {
1924
2136
  function trueFn() {
1925
2137
  return true;
1926
2138
  }
1927
- const re = {
2139
+ const ie = {
1928
2140
  get(e, t, n) {
1929
- if (t === M) return n;
2141
+ if (t === V) return n;
1930
2142
  return e.get(t);
1931
2143
  },
1932
2144
  has(e, t) {
1933
- if (t === M) return true;
2145
+ if (t === V) return true;
1934
2146
  return e.has(t);
1935
2147
  },
1936
2148
  set: trueFn,
@@ -1953,23 +2165,23 @@ const re = {
1953
2165
  function resolveSource(e) {
1954
2166
  return !(e = typeof e === "function" ? e() : e) ? {} : e;
1955
2167
  }
1956
- const ie = Symbol(0);
2168
+ const se = Symbol(0);
1957
2169
  function merge(...e) {
1958
2170
  if (e.length === 1 && typeof e[0] !== "function") return e[0];
1959
2171
  let t = false;
1960
2172
  const n = [];
1961
2173
  for (let r = 0; r < e.length; r++) {
1962
2174
  const i = e[r];
1963
- t = t || (!!i && M in i);
1964
- const s = !!i && i[ie];
2175
+ t = t || (!!i && V in i);
2176
+ const s = !!i && i[se];
1965
2177
  if (s) n.push(...s);
1966
2178
  else n.push(typeof i === "function" ? ((t = true), createMemo(i)) : i);
1967
2179
  }
1968
- if (w && t) {
2180
+ if (g && t) {
1969
2181
  return new Proxy(
1970
2182
  {
1971
2183
  get(e) {
1972
- if (e === ie) return n;
2184
+ if (e === se) return n;
1973
2185
  for (let t = n.length - 1; t >= 0; t--) {
1974
2186
  const r = resolveSource(n[t]);
1975
2187
  if (e in r) return r[e];
@@ -1987,7 +2199,7 @@ function merge(...e) {
1987
2199
  return [...new Set(e)];
1988
2200
  }
1989
2201
  },
1990
- re
2202
+ ie
1991
2203
  );
1992
2204
  }
1993
2205
  const r = Object.create(null);
@@ -2019,12 +2231,12 @@ function merge(...e) {
2019
2231
  if (n.get) Object.defineProperty(o, t, n);
2020
2232
  else o[t] = n.value;
2021
2233
  }
2022
- o[ie] = n;
2234
+ o[se] = n;
2023
2235
  return o;
2024
2236
  }
2025
2237
  function omit(e, ...t) {
2026
2238
  const n = new Set(t);
2027
- if (w && M in e) {
2239
+ if (g && V in e) {
2028
2240
  return new Proxy(
2029
2241
  {
2030
2242
  get(t) {
@@ -2037,7 +2249,7 @@ function omit(e, ...t) {
2037
2249
  return Object.keys(e).filter(e => !n.has(e));
2038
2250
  }
2039
2251
  },
2040
- re
2252
+ ie
2041
2253
  );
2042
2254
  }
2043
2255
  const r = {};
@@ -2055,313 +2267,321 @@ function mapArray(e, t, n) {
2055
2267
  const r = typeof n?.keyed === "function" ? n.keyed : undefined;
2056
2268
  return createMemo(
2057
2269
  updateKeyedMap.bind({
2058
- Ae: createOwner(),
2059
- We: 0,
2060
- je: e,
2061
- Ne: [],
2062
- Ee: t,
2063
- He: [],
2064
- Ie: [],
2065
- Qe: r,
2066
- Re: r || n?.keyed === false ? [] : undefined,
2067
- Te: t.length > 1 ? [] : undefined,
2068
- qe: n?.fallback
2270
+ Re: createOwner(),
2271
+ Te: 0,
2272
+ Me: e,
2273
+ qe: [],
2274
+ Fe: t,
2275
+ Ve: [],
2276
+ Be: [],
2277
+ De: r,
2278
+ Ge: r || n?.keyed === false ? [] : undefined,
2279
+ Ke: t.length > 1 ? [] : undefined,
2280
+ ze: n?.fallback
2069
2281
  })
2070
2282
  );
2071
2283
  }
2072
- const se = { pureWrite: true };
2284
+ const oe = { pureWrite: true };
2073
2285
  function updateKeyedMap() {
2074
- const e = this.je() || [],
2286
+ const e = this.Me() || [],
2075
2287
  t = e.length;
2076
- e[q];
2077
- runWithOwner(this.Ae, () => {
2288
+ e[M];
2289
+ runWithOwner(this.Re, () => {
2078
2290
  let n,
2079
2291
  r,
2080
- i = this.Re
2292
+ i = this.Ge
2081
2293
  ? () => {
2082
- this.Re[r] = signal(e[r], se);
2083
- this.Te && (this.Te[r] = signal(r, se));
2084
- return this.Ee(
2085
- read.bind(null, this.Re[r]),
2086
- this.Te ? read.bind(null, this.Te[r]) : undefined
2294
+ this.Ge[r] = signal(e[r], oe);
2295
+ this.Ke && (this.Ke[r] = signal(r, oe));
2296
+ return this.Fe(
2297
+ read.bind(null, this.Ge[r]),
2298
+ this.Ke ? read.bind(null, this.Ke[r]) : undefined
2087
2299
  );
2088
2300
  }
2089
- : this.Te
2301
+ : this.Ke
2090
2302
  ? () => {
2091
2303
  const t = e[r];
2092
- this.Te[r] = signal(r, se);
2093
- return this.Ee(() => t, read.bind(null, this.Te[r]));
2304
+ this.Ke[r] = signal(r, oe);
2305
+ return this.Fe(() => t, read.bind(null, this.Ke[r]));
2094
2306
  }
2095
2307
  : () => {
2096
2308
  const t = e[r];
2097
- return this.Ee(() => t);
2309
+ return this.Fe(() => t);
2098
2310
  };
2099
2311
  if (t === 0) {
2100
- if (this.We !== 0) {
2101
- this.Ae.dispose(false);
2102
- this.Ie = [];
2103
- this.Ne = [];
2104
- this.He = [];
2105
- this.We = 0;
2106
- this.Re && (this.Re = []);
2107
- this.Te && (this.Te = []);
2108
- }
2109
- if (this.qe && !this.He[0]) {
2110
- this.He[0] = runWithOwner((this.Ie[0] = createOwner()), this.qe);
2111
- }
2112
- } else if (this.We === 0) {
2113
- if (this.Ie[0]) this.Ie[0].dispose();
2114
- this.He = new Array(t);
2312
+ if (this.Te !== 0) {
2313
+ this.Re.dispose(false);
2314
+ this.Be = [];
2315
+ this.qe = [];
2316
+ this.Ve = [];
2317
+ this.Te = 0;
2318
+ this.Ge && (this.Ge = []);
2319
+ this.Ke && (this.Ke = []);
2320
+ }
2321
+ if (this.ze && !this.Ve[0]) {
2322
+ this.Ve[0] = runWithOwner((this.Be[0] = createOwner()), this.ze);
2323
+ }
2324
+ } else if (this.Te === 0) {
2325
+ if (this.Be[0]) this.Be[0].dispose();
2326
+ this.Ve = new Array(t);
2115
2327
  for (r = 0; r < t; r++) {
2116
- this.Ne[r] = e[r];
2117
- this.He[r] = runWithOwner((this.Ie[r] = createOwner()), i);
2328
+ this.qe[r] = e[r];
2329
+ this.Ve[r] = runWithOwner((this.Be[r] = createOwner()), i);
2118
2330
  }
2119
- this.We = t;
2331
+ this.Te = t;
2120
2332
  } else {
2121
2333
  let s,
2122
2334
  o,
2123
2335
  u,
2124
- l,
2125
2336
  f,
2337
+ l,
2126
2338
  c,
2127
2339
  a,
2128
2340
  d = new Array(t),
2129
2341
  p = new Array(t),
2130
- h = this.Re ? new Array(t) : undefined,
2131
- y = this.Te ? new Array(t) : undefined;
2342
+ h = this.Ge ? new Array(t) : undefined,
2343
+ y = this.Ke ? new Array(t) : undefined;
2132
2344
  for (
2133
- s = 0, o = Math.min(this.We, t);
2134
- s < o && (this.Ne[s] === e[s] || (this.Re && compare(this.Qe, this.Ne[s], e[s])));
2345
+ s = 0, o = Math.min(this.Te, t);
2346
+ s < o && (this.qe[s] === e[s] || (this.Ge && compare(this.De, this.qe[s], e[s])));
2135
2347
  s++
2136
2348
  ) {
2137
- if (this.Re) setSignal(this.Re[s], e[s]);
2349
+ if (this.Ge) setSignal(this.Ge[s], e[s]);
2138
2350
  }
2139
2351
  for (
2140
- o = this.We - 1, u = t - 1;
2352
+ o = this.Te - 1, u = t - 1;
2141
2353
  o >= s &&
2142
2354
  u >= s &&
2143
- (this.Ne[o] === e[u] || (this.Re && compare(this.Qe, this.Ne[o], e[u])));
2355
+ (this.qe[o] === e[u] || (this.Ge && compare(this.De, this.qe[o], e[u])));
2144
2356
  o--, u--
2145
2357
  ) {
2146
- d[u] = this.He[o];
2147
- p[u] = this.Ie[o];
2148
- h && (h[u] = this.Re[o]);
2149
- y && (y[u] = this.Te[o]);
2358
+ d[u] = this.Ve[o];
2359
+ p[u] = this.Be[o];
2360
+ h && (h[u] = this.Ge[o]);
2361
+ y && (y[u] = this.Ke[o]);
2150
2362
  }
2151
2363
  c = new Map();
2152
2364
  a = new Array(u + 1);
2153
2365
  for (r = u; r >= s; r--) {
2154
- l = e[r];
2155
- f = this.Qe ? this.Qe(l) : l;
2156
- n = c.get(f);
2366
+ f = e[r];
2367
+ l = this.De ? this.De(f) : f;
2368
+ n = c.get(l);
2157
2369
  a[r] = n === undefined ? -1 : n;
2158
- c.set(f, r);
2370
+ c.set(l, r);
2159
2371
  }
2160
2372
  for (n = s; n <= o; n++) {
2161
- l = this.Ne[n];
2162
- f = this.Qe ? this.Qe(l) : l;
2163
- r = c.get(f);
2373
+ f = this.qe[n];
2374
+ l = this.De ? this.De(f) : f;
2375
+ r = c.get(l);
2164
2376
  if (r !== undefined && r !== -1) {
2165
- d[r] = this.He[n];
2166
- p[r] = this.Ie[n];
2167
- h && (h[r] = this.Re[n]);
2168
- y && (y[r] = this.Te[n]);
2377
+ d[r] = this.Ve[n];
2378
+ p[r] = this.Be[n];
2379
+ h && (h[r] = this.Ge[n]);
2380
+ y && (y[r] = this.Ke[n]);
2169
2381
  r = a[r];
2170
- c.set(f, r);
2171
- } else this.Ie[n].dispose();
2382
+ c.set(l, r);
2383
+ } else this.Be[n].dispose();
2172
2384
  }
2173
2385
  for (r = s; r < t; r++) {
2174
2386
  if (r in d) {
2175
- this.He[r] = d[r];
2176
- this.Ie[r] = p[r];
2387
+ this.Ve[r] = d[r];
2388
+ this.Be[r] = p[r];
2177
2389
  if (h) {
2178
- this.Re[r] = h[r];
2179
- setSignal(this.Re[r], e[r]);
2390
+ this.Ge[r] = h[r];
2391
+ setSignal(this.Ge[r], e[r]);
2180
2392
  }
2181
2393
  if (y) {
2182
- this.Te[r] = y[r];
2183
- setSignal(this.Te[r], r);
2394
+ this.Ke[r] = y[r];
2395
+ setSignal(this.Ke[r], r);
2184
2396
  }
2185
2397
  } else {
2186
- this.He[r] = runWithOwner((this.Ie[r] = createOwner()), i);
2398
+ this.Ve[r] = runWithOwner((this.Be[r] = createOwner()), i);
2187
2399
  }
2188
2400
  }
2189
- this.He = this.He.slice(0, (this.We = t));
2190
- this.Ne = e.slice(0);
2401
+ this.Ve = this.Ve.slice(0, (this.Te = t));
2402
+ this.qe = e.slice(0);
2191
2403
  }
2192
2404
  });
2193
- return this.He;
2405
+ return this.Ve;
2194
2406
  }
2195
2407
  function repeat(e, t, n) {
2196
2408
  return updateRepeat.bind({
2197
- Ae: createOwner(),
2198
- We: 0,
2199
- Fe: 0,
2200
- Ve: e,
2201
- Ee: t,
2202
- Ie: [],
2203
- He: [],
2204
- Me: n?.from,
2205
- qe: n?.fallback
2409
+ Re: createOwner(),
2410
+ Te: 0,
2411
+ Ue: 0,
2412
+ Je: e,
2413
+ Fe: t,
2414
+ Be: [],
2415
+ Ve: [],
2416
+ Xe: n?.from,
2417
+ ze: n?.fallback
2206
2418
  });
2207
2419
  }
2208
2420
  function updateRepeat() {
2209
- const e = this.Ve();
2210
- const t = this.Me?.() || 0;
2211
- runWithOwner(this.Ae, () => {
2421
+ const e = this.Je();
2422
+ const t = this.Xe?.() || 0;
2423
+ runWithOwner(this.Re, () => {
2212
2424
  if (e === 0) {
2213
- if (this.We !== 0) {
2214
- this.Ae.dispose(false);
2215
- this.Ie = [];
2216
- this.He = [];
2217
- this.We = 0;
2425
+ if (this.Te !== 0) {
2426
+ this.Re.dispose(false);
2427
+ this.Be = [];
2428
+ this.Ve = [];
2429
+ this.Te = 0;
2218
2430
  }
2219
- if (this.qe && !this.He[0]) {
2220
- this.He[0] = runWithOwner((this.Ie[0] = createOwner()), this.qe);
2431
+ if (this.ze && !this.Ve[0]) {
2432
+ this.Ve[0] = runWithOwner((this.Be[0] = createOwner()), this.ze);
2221
2433
  }
2222
2434
  return;
2223
2435
  }
2224
2436
  const n = t + e;
2225
- const r = this.Fe + this.We;
2226
- if (this.We === 0 && this.Ie[0]) this.Ie[0].dispose();
2227
- for (let e = n; e < r; e++) this.Ie[e - this.Fe].dispose();
2228
- if (this.Fe < t) {
2229
- let e = this.Fe;
2230
- while (e < t && e < this.We) this.Ie[e++].dispose();
2231
- this.Ie.splice(0, t - this.Fe);
2232
- this.He.splice(0, t - this.Fe);
2233
- } else if (this.Fe > t) {
2234
- let n = r - this.Fe - 1;
2235
- let i = this.Fe - t;
2236
- this.Ie.length = this.He.length = e;
2437
+ const r = this.Ue + this.Te;
2438
+ if (this.Te === 0 && this.Be[0]) this.Be[0].dispose();
2439
+ for (let e = n; e < r; e++) this.Be[e - this.Ue].dispose();
2440
+ if (this.Ue < t) {
2441
+ let e = this.Ue;
2442
+ while (e < t && e < this.Te) this.Be[e++].dispose();
2443
+ this.Be.splice(0, t - this.Ue);
2444
+ this.Ve.splice(0, t - this.Ue);
2445
+ } else if (this.Ue > t) {
2446
+ let n = r - this.Ue - 1;
2447
+ let i = this.Ue - t;
2448
+ this.Be.length = this.Ve.length = e;
2237
2449
  while (n >= i) {
2238
- this.Ie[n] = this.Ie[n - i];
2239
- this.He[n] = this.He[n - i];
2450
+ this.Be[n] = this.Be[n - i];
2451
+ this.Ve[n] = this.Ve[n - i];
2240
2452
  n--;
2241
2453
  }
2242
2454
  for (let e = 0; e < i; e++) {
2243
- this.He[e] = runWithOwner((this.Ie[e] = createOwner()), () => this.Ee(e + t));
2455
+ this.Ve[e] = runWithOwner((this.Be[e] = createOwner()), () => this.Fe(e + t));
2244
2456
  }
2245
2457
  }
2246
2458
  for (let e = r; e < n; e++) {
2247
- this.He[e - t] = runWithOwner((this.Ie[e - t] = createOwner()), () => this.Ee(e));
2459
+ this.Ve[e - t] = runWithOwner((this.Be[e - t] = createOwner()), () => this.Fe(e));
2248
2460
  }
2249
- this.He = this.He.slice(0, e);
2250
- this.Fe = t;
2251
- this.We = e;
2461
+ this.Ve = this.Ve.slice(0, e);
2462
+ this.Ue = t;
2463
+ this.Te = e;
2252
2464
  });
2253
- return this.He;
2465
+ return this.Ve;
2254
2466
  }
2255
2467
  function compare(e, t, n) {
2256
2468
  return e ? e(t) === e(n) : true;
2257
2469
  }
2258
2470
  function boundaryComputed(e, t) {
2259
2471
  const n = computed(e, undefined, { lazy: true });
2260
- n.pe = () => {
2261
- const e = n.re;
2262
- n.re &= ~n.De;
2263
- n.$.notify(n, n.De, e);
2472
+ n.xe = (e, t) => {
2473
+ const r = e !== undefined ? e : n.he;
2474
+ const i = t !== undefined ? t : n.ie;
2475
+ n.he &= ~n.Ye;
2476
+ n.ae.notify(n, n.Ye, r, i);
2264
2477
  };
2265
- n.De = t;
2266
- n.we = true;
2478
+ n.Ye = t;
2479
+ n.ke = true;
2267
2480
  recompute(n, true);
2268
2481
  return n;
2269
2482
  }
2270
2483
  function createBoundChildren(e, t, n, r) {
2271
- const i = e.$;
2272
- i.addChild((e.$ = n));
2273
- onCleanup(() => i.removeChild(e.$));
2484
+ const i = e.ae;
2485
+ i.addChild((e.ae = n));
2486
+ onCleanup(() => i.removeChild(e.ae));
2274
2487
  return runWithOwner(e, () => {
2275
2488
  const e = computed(t);
2276
2489
  return boundaryComputed(() => staleValues(() => flatten(read(e))), r);
2277
2490
  });
2278
2491
  }
2279
2492
  class ConditionalQueue extends Queue {
2280
- Be;
2281
- Ge = new Set();
2282
- D = new Set();
2493
+ Ze;
2494
+ $e = new Set();
2495
+ Y = new Set();
2283
2496
  constructor(e) {
2284
2497
  super();
2285
- this.Be = e;
2498
+ this.Ze = e;
2286
2499
  }
2287
2500
  run(e) {
2288
- if (!e || read(this.Be)) return;
2501
+ if (!e || read(this.Ze)) return;
2289
2502
  return super.run(e);
2290
2503
  }
2291
- notify(e, t, n) {
2292
- if (read(this.Be)) {
2504
+ notify(e, t, n, r) {
2505
+ if (read(this.Ze)) {
2506
+ if (t & l) {
2507
+ if (n & l) {
2508
+ this.Y.add(e);
2509
+ t &= ~l;
2510
+ } else if (this.Y.delete(e)) t &= ~l;
2511
+ }
2293
2512
  if (t & c) {
2294
2513
  if (n & c) {
2295
- this.D.add(e);
2514
+ this.$e.add(e);
2296
2515
  t &= ~c;
2297
- } else if (this.D.delete(e)) t &= ~c;
2298
- }
2299
- if (t & a) {
2300
- if (n & a) {
2301
- this.Ge.add(e);
2302
- t &= ~a;
2303
- } else if (this.Ge.delete(e)) t &= ~a;
2516
+ } else if (this.$e.delete(e)) t &= ~c;
2304
2517
  }
2305
2518
  }
2306
- return t ? super.notify(e, t, n) : true;
2519
+ return t ? super.notify(e, t, n, r ?? e.ie) : true;
2307
2520
  }
2308
2521
  }
2309
2522
  class CollectionQueue extends Queue {
2310
- Ke;
2311
- Ie = new Set();
2312
- Be = signal(false, { pureWrite: true });
2313
- ze = false;
2523
+ et;
2524
+ tt = new Set();
2525
+ Ze = signal(false, { pureWrite: true });
2526
+ nt = false;
2314
2527
  constructor(e) {
2315
2528
  super();
2316
- this.Ke = e;
2529
+ this.et = e;
2317
2530
  }
2318
2531
  run(e) {
2319
- if (!e || read(this.Be)) return;
2532
+ if (!e || read(this.Ze)) return;
2320
2533
  return super.run(e);
2321
2534
  }
2322
- notify(e, t, n) {
2323
- if (!(t & this.Ke) || (this.Ke & c && this.ze)) return super.notify(e, t, n);
2324
- if (n & this.Ke) {
2325
- this.Ie.add(e);
2326
- if (this.Ie.size === 1) setSignal(this.Be, true);
2327
- } else if (this.Ie.size > 0) {
2328
- this.Ie.delete(e);
2329
- if (this.Ie.size === 0) setSignal(this.Be, false);
2535
+ notify(e, t, n, r) {
2536
+ if (!(t & this.et) || (this.et & l && this.nt)) return super.notify(e, t, n, r);
2537
+ if (n & this.et) {
2538
+ const t = r?.t || e.ie?.t;
2539
+ if (t) {
2540
+ const e = this.tt.size === 0;
2541
+ this.tt.add(t);
2542
+ if (e) setSignal(this.Ze, true);
2543
+ }
2544
+ }
2545
+ t &= ~this.et;
2546
+ return t ? super.notify(e, t, n, r) : true;
2547
+ }
2548
+ checkSources() {
2549
+ for (const e of this.tt) {
2550
+ if (!(e.he & this.et)) this.tt.delete(e);
2330
2551
  }
2331
- t &= ~this.Ke;
2332
- return t ? super.notify(e, t, n) : true;
2552
+ if (!this.tt.size) setSignal(this.Ze, false);
2333
2553
  }
2334
2554
  }
2335
- var oe;
2555
+ var ue;
2336
2556
  (function (e) {
2337
2557
  e["VISIBLE"] = "visible";
2338
2558
  e["HIDDEN"] = "hidden";
2339
- })(oe || (oe = {}));
2559
+ })(ue || (ue = {}));
2340
2560
  function createBoundary(e, t) {
2341
2561
  const n = createOwner();
2342
- const r = new ConditionalQueue(computed(() => t() === oe.HIDDEN));
2562
+ const r = new ConditionalQueue(computed(() => t() === ue.HIDDEN));
2343
2563
  const i = createBoundChildren(n, e, r, 0);
2344
2564
  computed(() => {
2345
- const e = read(r.Be);
2346
- i.De = e ? a | c : 0;
2565
+ const e = read(r.Ze);
2566
+ i.Ye = e ? c | l : 0;
2347
2567
  if (!e) {
2348
- r.D.forEach(e => r.notify(e, c, c));
2349
- r.Ge.forEach(e => r.notify(e, a, a));
2350
- r.D.clear();
2351
- r.Ge.clear();
2568
+ r.Y.forEach(e => r.notify(e, l, l, e.ie));
2569
+ r.$e.forEach(e => r.notify(e, c, c, e.ie));
2570
+ r.Y.clear();
2571
+ r.$e.clear();
2352
2572
  }
2353
2573
  });
2354
- return () => (read(r.Be) ? undefined : read(i));
2574
+ return () => (read(r.Ze) ? undefined : read(i));
2355
2575
  }
2356
2576
  function createCollectionBoundary(e, t, n) {
2357
2577
  const r = createOwner();
2358
2578
  const i = new CollectionQueue(e);
2359
2579
  const s = createBoundChildren(r, t, i, e);
2360
2580
  const o = computed(() => {
2361
- if (!read(i.Be)) {
2581
+ if (!read(i.Ze)) {
2362
2582
  const e = read(s);
2363
- if (!untrack(() => read(i.Be))) {
2364
- i.ze = true;
2583
+ if (!untrack(() => read(i.Ze))) {
2584
+ i.nt = true;
2365
2585
  return e;
2366
2586
  }
2367
2587
  }
@@ -2370,28 +2590,14 @@ function createCollectionBoundary(e, t, n) {
2370
2590
  return read.bind(null, o);
2371
2591
  }
2372
2592
  function createLoadBoundary(e, t) {
2373
- return createCollectionBoundary(c, e, () => t());
2374
- }
2375
- function collectErrorSources(e, t) {
2376
- let n = true;
2377
- let r = e.j;
2378
- while (r !== null) {
2379
- const e = r.H;
2380
- if (e.j && e.re & a) {
2381
- n = false;
2382
- collectErrorSources(e, t);
2383
- }
2384
- r = r.N;
2385
- }
2386
- n && t.push(e);
2593
+ return createCollectionBoundary(l, e, () => t());
2387
2594
  }
2388
2595
  function createErrorBoundary(e, t) {
2389
- return createCollectionBoundary(a, e, e => {
2390
- let n = e.Ie.values().next().value;
2391
- return t(n.J, () => {
2392
- const t = [];
2393
- for (const n of e.Ie) collectErrorSources(n, t);
2394
- for (const e of t) recompute(e);
2596
+ return createCollectionBoundary(c, e, e => {
2597
+ let n = e.tt.values().next().value;
2598
+ const r = n.ie?.cause ?? n.ie;
2599
+ return t(r, () => {
2600
+ for (const t of e.tt) recompute(t);
2395
2601
  schedule();
2396
2602
  });
2397
2603
  });
@@ -2445,13 +2651,13 @@ function flattenArray(e, t = [], n) {
2445
2651
  if (r) throw r;
2446
2652
  return i;
2447
2653
  }
2448
- exports.$PROXY = M;
2449
- exports.$TARGET = V;
2450
- exports.$TRACK = q;
2654
+ exports.$PROXY = V;
2655
+ exports.$TARGET = F;
2656
+ exports.$TRACK = M;
2451
2657
  exports.ContextNotFoundError = ContextNotFoundError;
2452
2658
  exports.NoOwnerError = NoOwnerError;
2453
2659
  exports.NotReadyError = NotReadyError;
2454
- exports.SUPPORTS_PROXY = w;
2660
+ exports.SUPPORTS_PROXY = g;
2455
2661
  exports.action = action;
2456
2662
  exports.createBoundary = createBoundary;
2457
2663
  exports.createContext = createContext;