@solidjs/signals 0.13.13 → 2.0.0-beta.8
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/README.md +8 -7
- package/dist/dev.js +312 -174
- package/dist/node.cjs +1068 -953
- package/dist/prod.js +744 -619
- package/dist/types/boundaries.d.ts +44 -3
- package/dist/types/core/core.d.ts +2 -2
- package/dist/types/core/effect.d.ts +3 -2
- package/dist/types/core/graph.d.ts +1 -0
- package/dist/types/core/scheduler.d.ts +1 -0
- package/dist/types/core/types.d.ts +2 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/signals.d.ts +34 -26
- package/dist/types/store/optimistic.d.ts +3 -3
- package/dist/types/store/projection.d.ts +19 -5
- package/dist/types/store/store.d.ts +4 -4
- package/dist/types-cjs/boundaries.d.cts +93 -0
- package/dist/types-cjs/core/action.d.cts +1 -0
- package/dist/types-cjs/core/async.d.cts +6 -0
- package/dist/types-cjs/core/constants.d.cts +25 -0
- package/dist/types-cjs/core/context.d.cts +28 -0
- package/dist/types-cjs/core/core.d.cts +54 -0
- package/dist/types-cjs/core/dev.d.cts +49 -0
- package/dist/types-cjs/core/effect.d.cts +31 -0
- package/dist/types-cjs/core/error.d.cts +14 -0
- package/dist/types-cjs/core/external.d.cts +26 -0
- package/dist/types-cjs/core/graph.d.cts +4 -0
- package/dist/types-cjs/core/heap.d.cts +14 -0
- package/dist/types-cjs/core/index.d.cts +12 -0
- package/dist/types-cjs/core/lanes.d.cts +54 -0
- package/dist/types-cjs/core/owner.d.cts +26 -0
- package/dist/types-cjs/core/scheduler.d.cts +82 -0
- package/dist/types-cjs/core/types.d.cts +86 -0
- package/dist/types-cjs/index.d.cts +9 -0
- package/dist/types-cjs/map.d.cts +24 -0
- package/dist/types-cjs/package.json +3 -0
- package/dist/types-cjs/signals.d.cts +200 -0
- package/dist/types-cjs/store/index.d.cts +9 -0
- package/dist/types-cjs/store/optimistic.d.cts +19 -0
- package/dist/types-cjs/store/projection.d.cts +40 -0
- package/dist/types-cjs/store/reconcile.d.cts +1 -0
- package/dist/types-cjs/store/store.d.cts +68 -0
- package/dist/types-cjs/store/storePath.d.cts +30 -0
- package/dist/types-cjs/store/utils.d.cts +43 -0
- package/package.json +31 -24
package/dist/node.cjs
CHANGED
|
@@ -108,7 +108,7 @@ function markNode(e, r = n) {
|
|
|
108
108
|
markNode(n.k, t);
|
|
109
109
|
}
|
|
110
110
|
if (e.C !== null) {
|
|
111
|
-
for (let n = e.C; n !== null; n = n.
|
|
111
|
+
for (let n = e.C; n !== null; n = n.N) {
|
|
112
112
|
for (let e = n.O; e !== null; e = e.P) {
|
|
113
113
|
markNode(e.k, t);
|
|
114
114
|
}
|
|
@@ -117,12 +117,12 @@ function markNode(e, r = n) {
|
|
|
117
117
|
}
|
|
118
118
|
function runHeap(e, t) {
|
|
119
119
|
e._ = false;
|
|
120
|
-
for (e.
|
|
121
|
-
let n = e.l[e.
|
|
120
|
+
for (e.W = 0; e.W <= e.S; e.W++) {
|
|
121
|
+
let n = e.l[e.W];
|
|
122
122
|
while (n !== undefined) {
|
|
123
123
|
if (n.m & i) t(n);
|
|
124
124
|
else adjustHeight(n, e);
|
|
125
|
-
n = e.l[e.
|
|
125
|
+
n = e.l[e.W];
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
e.S = 0;
|
|
@@ -130,8 +130,8 @@ function runHeap(e, t) {
|
|
|
130
130
|
function adjustHeight(e, t) {
|
|
131
131
|
deleteFromHeap(e, t);
|
|
132
132
|
let n = e.o;
|
|
133
|
-
for (let t = e.
|
|
134
|
-
const e = t.
|
|
133
|
+
for (let t = e.j; t; t = t.R) {
|
|
134
|
+
const e = t.A;
|
|
135
135
|
const r = e.L || e;
|
|
136
136
|
if (r.I && r.o >= n) n = r.o + 1;
|
|
137
137
|
}
|
|
@@ -142,25 +142,42 @@ function adjustHeight(e, t) {
|
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
|
-
const
|
|
146
|
-
const
|
|
147
|
-
const P = { l: new Array(2e3).fill(undefined), _: false,
|
|
148
|
-
const k = { l: new Array(2e3).fill(undefined), _: false,
|
|
145
|
+
const v = undefined;
|
|
146
|
+
const x = new Set();
|
|
147
|
+
const P = { l: new Array(2e3).fill(undefined), _: false, W: 0, S: 0 };
|
|
148
|
+
const k = { l: new Array(2e3).fill(undefined), _: false, W: 0, S: 0 };
|
|
149
149
|
let E = 0;
|
|
150
150
|
let C = null;
|
|
151
|
+
let N = false;
|
|
151
152
|
let W = false;
|
|
152
|
-
let j =
|
|
153
|
-
|
|
153
|
+
let j = null;
|
|
154
|
+
const R = new Set();
|
|
155
|
+
function registerTransientStoreNode(e) {
|
|
156
|
+
R.add(e);
|
|
157
|
+
}
|
|
158
|
+
function sweepTransientStoreNodes() {
|
|
159
|
+
if (R.size === 0) return;
|
|
160
|
+
for (const e of R) {
|
|
161
|
+
if (e.O !== null) {
|
|
162
|
+
R.delete(e);
|
|
163
|
+
continue;
|
|
164
|
+
}
|
|
165
|
+
if (e.T !== S) continue;
|
|
166
|
+
if (e.H !== undefined && e.H !== S) continue;
|
|
167
|
+
R.delete(e);
|
|
168
|
+
e.q?.();
|
|
169
|
+
}
|
|
170
|
+
}
|
|
154
171
|
function enforceLoadingBoundary(e) {}
|
|
155
172
|
function shouldReadStashedOptimisticValue(e) {
|
|
156
|
-
return !!
|
|
173
|
+
return !!j?.has(e);
|
|
157
174
|
}
|
|
158
175
|
function runLaneEffects(e) {
|
|
159
|
-
for (const t of
|
|
160
|
-
if (t.
|
|
161
|
-
const n = t.
|
|
176
|
+
for (const t of I) {
|
|
177
|
+
if (t.M || t.D.size > 0) continue;
|
|
178
|
+
const n = t.F[e - 1];
|
|
162
179
|
if (n.length) {
|
|
163
|
-
t.
|
|
180
|
+
t.F[e - 1] = [];
|
|
164
181
|
runQueue(n, e);
|
|
165
182
|
}
|
|
166
183
|
}
|
|
@@ -168,83 +185,83 @@ function runLaneEffects(e) {
|
|
|
168
185
|
function queueStashedOptimisticEffects(e) {
|
|
169
186
|
for (let t = e.O; t !== null; t = t.P) {
|
|
170
187
|
const e = t.k;
|
|
171
|
-
if (!e.
|
|
172
|
-
if (e.
|
|
173
|
-
if (!e.
|
|
174
|
-
e.
|
|
175
|
-
e.
|
|
188
|
+
if (!e.V) continue;
|
|
189
|
+
if (e.V === g) {
|
|
190
|
+
if (!e.B) {
|
|
191
|
+
e.B = true;
|
|
192
|
+
e.K.enqueue(y, e.G);
|
|
176
193
|
}
|
|
177
194
|
continue;
|
|
178
195
|
}
|
|
179
196
|
const n = e.m & o ? k : P;
|
|
180
|
-
if (n.
|
|
197
|
+
if (n.W > e.o) n.W = e.o;
|
|
181
198
|
insertIntoHeap(e, n);
|
|
182
199
|
}
|
|
183
200
|
}
|
|
184
201
|
function setProjectionWriteActive(e) {
|
|
185
|
-
|
|
202
|
+
W = e;
|
|
186
203
|
}
|
|
187
204
|
function mergeTransitionState(e, t) {
|
|
188
|
-
t.
|
|
189
|
-
e.
|
|
190
|
-
for (const n of
|
|
191
|
-
e.
|
|
192
|
-
for (const n of t.
|
|
193
|
-
for (const [n, r] of t
|
|
194
|
-
let t = e
|
|
195
|
-
if (!t) e
|
|
205
|
+
t.U = e;
|
|
206
|
+
e.J.push(...t.J);
|
|
207
|
+
for (const n of I) if (n.X === t) n.X = e;
|
|
208
|
+
e.Y.push(...t.Y);
|
|
209
|
+
for (const n of t.Z) e.Z.add(n);
|
|
210
|
+
for (const [n, r] of t.$) {
|
|
211
|
+
let t = e.$.get(n);
|
|
212
|
+
if (!t) e.$.set(n, (t = new Set()));
|
|
196
213
|
for (const e of r) t.add(e);
|
|
197
214
|
}
|
|
198
215
|
}
|
|
199
216
|
function resolveOptimisticNodes(e) {
|
|
200
217
|
for (let t = 0; t < e.length; t++) {
|
|
201
218
|
const n = e[t];
|
|
202
|
-
n.
|
|
203
|
-
if (n.
|
|
204
|
-
n
|
|
205
|
-
n.
|
|
219
|
+
n.ee = undefined;
|
|
220
|
+
if (n.T !== S) {
|
|
221
|
+
n.te = n.T;
|
|
222
|
+
n.T = S;
|
|
206
223
|
}
|
|
207
|
-
const r = n.
|
|
208
|
-
n.
|
|
209
|
-
if (r !== S && n
|
|
210
|
-
n.
|
|
224
|
+
const r = n.H;
|
|
225
|
+
n.H = S;
|
|
226
|
+
if (r !== S && n.te !== r) insertSubs(n, true);
|
|
227
|
+
n.X = null;
|
|
211
228
|
}
|
|
212
229
|
e.length = 0;
|
|
213
230
|
}
|
|
214
231
|
function cleanupCompletedLanes(e) {
|
|
215
|
-
for (const t of
|
|
216
|
-
const n = e ? t.
|
|
232
|
+
for (const t of I) {
|
|
233
|
+
const n = e ? t.X === e : !t.X;
|
|
217
234
|
if (!n) continue;
|
|
218
|
-
if (!t.
|
|
219
|
-
if (t.
|
|
220
|
-
if (t.
|
|
235
|
+
if (!t.M) {
|
|
236
|
+
if (t.F[0].length) runQueue(t.F[0], p);
|
|
237
|
+
if (t.F[1].length) runQueue(t.F[1], y);
|
|
221
238
|
}
|
|
222
|
-
if (t.
|
|
223
|
-
t.
|
|
224
|
-
t.
|
|
225
|
-
t.
|
|
226
|
-
|
|
227
|
-
|
|
239
|
+
if (t.ne.ee === t) t.ne.ee = undefined;
|
|
240
|
+
t.D.clear();
|
|
241
|
+
t.F[0].length = 0;
|
|
242
|
+
t.F[1].length = 0;
|
|
243
|
+
I.delete(t);
|
|
244
|
+
L.delete(t.ne);
|
|
228
245
|
}
|
|
229
246
|
}
|
|
230
247
|
function schedule() {
|
|
231
|
-
if (
|
|
232
|
-
|
|
233
|
-
if (!
|
|
248
|
+
if (N) return;
|
|
249
|
+
N = true;
|
|
250
|
+
if (!A.re && !W) queueMicrotask(flush);
|
|
234
251
|
}
|
|
235
252
|
class Queue {
|
|
236
253
|
i = null;
|
|
237
|
-
|
|
238
|
-
|
|
254
|
+
ie = [[], []];
|
|
255
|
+
se = [];
|
|
239
256
|
created = E;
|
|
240
257
|
addChild(e) {
|
|
241
|
-
this.
|
|
258
|
+
this.se.push(e);
|
|
242
259
|
e.i = this;
|
|
243
260
|
}
|
|
244
261
|
removeChild(e) {
|
|
245
|
-
const t = this.
|
|
262
|
+
const t = this.se.indexOf(e);
|
|
246
263
|
if (t >= 0) {
|
|
247
|
-
this.
|
|
264
|
+
this.se.splice(t, 1);
|
|
248
265
|
e.i = null;
|
|
249
266
|
}
|
|
250
267
|
}
|
|
@@ -253,122 +270,122 @@ class Queue {
|
|
|
253
270
|
return false;
|
|
254
271
|
}
|
|
255
272
|
run(e) {
|
|
256
|
-
if (this.
|
|
257
|
-
const t = this.
|
|
258
|
-
this.
|
|
273
|
+
if (this.ie[e - 1].length) {
|
|
274
|
+
const t = this.ie[e - 1];
|
|
275
|
+
this.ie[e - 1] = [];
|
|
259
276
|
runQueue(t, e);
|
|
260
277
|
}
|
|
261
|
-
for (let t = 0; t < this.
|
|
278
|
+
for (let t = 0; t < this.se.length; t++) this.se[t].run?.(e);
|
|
262
279
|
}
|
|
263
280
|
enqueue(e, t) {
|
|
264
281
|
if (e) {
|
|
265
|
-
if (
|
|
266
|
-
const n = findLane(
|
|
267
|
-
n.
|
|
282
|
+
if (K) {
|
|
283
|
+
const n = findLane(K);
|
|
284
|
+
n.F[e - 1].push(t);
|
|
268
285
|
} else {
|
|
269
|
-
this.
|
|
286
|
+
this.ie[e - 1].push(t);
|
|
270
287
|
}
|
|
271
288
|
}
|
|
272
289
|
schedule();
|
|
273
290
|
}
|
|
274
291
|
stashQueues(e) {
|
|
275
|
-
e.
|
|
276
|
-
e.
|
|
277
|
-
this.
|
|
278
|
-
for (let t = 0; t < this.
|
|
279
|
-
let n = this.
|
|
280
|
-
let r = e.
|
|
292
|
+
e.ie[0].push(...this.ie[0]);
|
|
293
|
+
e.ie[1].push(...this.ie[1]);
|
|
294
|
+
this.ie = [[], []];
|
|
295
|
+
for (let t = 0; t < this.se.length; t++) {
|
|
296
|
+
let n = this.se[t];
|
|
297
|
+
let r = e.se[t];
|
|
281
298
|
if (!r) {
|
|
282
|
-
r = {
|
|
283
|
-
e.
|
|
299
|
+
r = { ie: [[], []], se: [] };
|
|
300
|
+
e.se[t] = r;
|
|
284
301
|
}
|
|
285
302
|
n.stashQueues(r);
|
|
286
303
|
}
|
|
287
304
|
}
|
|
288
305
|
restoreQueues(e) {
|
|
289
|
-
this.
|
|
290
|
-
this.
|
|
291
|
-
for (let t = 0; t < e.
|
|
292
|
-
const n = e.
|
|
293
|
-
let r = this.
|
|
306
|
+
this.ie[0].push(...e.ie[0]);
|
|
307
|
+
this.ie[1].push(...e.ie[1]);
|
|
308
|
+
for (let t = 0; t < e.se.length; t++) {
|
|
309
|
+
const n = e.se[t];
|
|
310
|
+
let r = this.se[t];
|
|
294
311
|
if (r) r.restoreQueues(n);
|
|
295
312
|
}
|
|
296
313
|
}
|
|
297
314
|
}
|
|
298
315
|
class GlobalQueue extends Queue {
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
static oe;
|
|
316
|
+
re = false;
|
|
317
|
+
oe = [];
|
|
318
|
+
Y = [];
|
|
319
|
+
Z = new Set();
|
|
304
320
|
static ue;
|
|
305
|
-
static fe
|
|
321
|
+
static fe;
|
|
322
|
+
static le = null;
|
|
306
323
|
flush() {
|
|
307
|
-
if (this.
|
|
308
|
-
this.
|
|
324
|
+
if (this.re) return;
|
|
325
|
+
this.re = true;
|
|
309
326
|
try {
|
|
310
|
-
runHeap(P, GlobalQueue.
|
|
327
|
+
runHeap(P, GlobalQueue.ue);
|
|
311
328
|
if (C) {
|
|
312
329
|
const e = transitionComplete(C);
|
|
313
330
|
if (!e) {
|
|
314
331
|
const e = C;
|
|
315
|
-
runHeap(k, GlobalQueue.
|
|
316
|
-
this.
|
|
317
|
-
this.
|
|
318
|
-
this.
|
|
332
|
+
runHeap(k, GlobalQueue.ue);
|
|
333
|
+
this.oe = [];
|
|
334
|
+
this.Y = [];
|
|
335
|
+
this.Z = new Set();
|
|
319
336
|
runLaneEffects(p);
|
|
320
337
|
runLaneEffects(y);
|
|
321
|
-
this.stashQueues(e.
|
|
338
|
+
this.stashQueues(e.ce);
|
|
322
339
|
E++;
|
|
323
|
-
|
|
324
|
-
reassignPendingTransition(e.
|
|
340
|
+
N = P.S >= P.W;
|
|
341
|
+
reassignPendingTransition(e.oe);
|
|
325
342
|
C = null;
|
|
326
|
-
if (!e.
|
|
327
|
-
|
|
328
|
-
for (let t = 0; t < e.
|
|
329
|
-
const n = e.
|
|
330
|
-
if (n.I || n.
|
|
331
|
-
|
|
343
|
+
if (!e.J.length && e.Y.length) {
|
|
344
|
+
j = new Set();
|
|
345
|
+
for (let t = 0; t < e.Y.length; t++) {
|
|
346
|
+
const n = e.Y[t];
|
|
347
|
+
if (n.I || n.ae) continue;
|
|
348
|
+
j.add(n);
|
|
332
349
|
queueStashedOptimisticEffects(n);
|
|
333
350
|
}
|
|
334
351
|
}
|
|
335
352
|
try {
|
|
336
353
|
finalizePureQueue(null, true);
|
|
337
354
|
} finally {
|
|
338
|
-
|
|
355
|
+
j = null;
|
|
339
356
|
}
|
|
340
357
|
return;
|
|
341
358
|
}
|
|
342
|
-
this.
|
|
343
|
-
this.restoreQueues(C.
|
|
344
|
-
|
|
359
|
+
this.oe !== C.oe && this.oe.push(...C.oe);
|
|
360
|
+
this.restoreQueues(C.ce);
|
|
361
|
+
x.delete(C);
|
|
345
362
|
const t = C;
|
|
346
363
|
C = null;
|
|
347
|
-
reassignPendingTransition(this.
|
|
364
|
+
reassignPendingTransition(this.oe);
|
|
348
365
|
finalizePureQueue(t);
|
|
349
366
|
} else {
|
|
350
|
-
if (
|
|
367
|
+
if (x.size) runHeap(k, GlobalQueue.ue);
|
|
351
368
|
finalizePureQueue();
|
|
352
369
|
}
|
|
353
370
|
E++;
|
|
354
|
-
|
|
371
|
+
N = P.S >= P.W;
|
|
355
372
|
runLaneEffects(p);
|
|
356
373
|
this.run(p);
|
|
357
374
|
runLaneEffects(y);
|
|
358
375
|
this.run(y);
|
|
359
376
|
if (false);
|
|
360
377
|
} finally {
|
|
361
|
-
this.
|
|
378
|
+
this.re = false;
|
|
362
379
|
}
|
|
363
380
|
}
|
|
364
381
|
notify(e, t, n, r) {
|
|
365
382
|
if (t & a) {
|
|
366
383
|
if (n & a) {
|
|
367
|
-
const t = r !== undefined ? r : e.
|
|
384
|
+
const t = r !== undefined ? r : e.de;
|
|
368
385
|
if (C && t) {
|
|
369
386
|
const n = t.source;
|
|
370
|
-
let r = C
|
|
371
|
-
if (!r) C
|
|
387
|
+
let r = C.$.get(n);
|
|
388
|
+
if (!r) C.$.set(n, (r = new Set()));
|
|
372
389
|
const i = r.size;
|
|
373
390
|
r.add(e);
|
|
374
391
|
if (r.size !== i) schedule();
|
|
@@ -381,56 +398,56 @@ class GlobalQueue extends Queue {
|
|
|
381
398
|
initTransition(e) {
|
|
382
399
|
if (e) e = currentTransition(e);
|
|
383
400
|
if (e && e === C) return;
|
|
384
|
-
if (!e && C && C.
|
|
401
|
+
if (!e && C && C.he === E) return;
|
|
385
402
|
if (!C) {
|
|
386
403
|
C = e ?? {
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
404
|
+
he: E,
|
|
405
|
+
oe: [],
|
|
406
|
+
$: new Map(),
|
|
407
|
+
Y: [],
|
|
408
|
+
Z: new Set(),
|
|
409
|
+
J: [],
|
|
410
|
+
ce: { ie: [[], []], se: [] },
|
|
411
|
+
U: false
|
|
395
412
|
};
|
|
396
413
|
} else if (e) {
|
|
397
414
|
const t = C;
|
|
398
415
|
mergeTransitionState(e, t);
|
|
399
|
-
|
|
416
|
+
x.delete(t);
|
|
400
417
|
C = e;
|
|
401
418
|
}
|
|
402
|
-
|
|
403
|
-
C.
|
|
404
|
-
if (this.
|
|
405
|
-
for (let e = 0; e < this.
|
|
406
|
-
const t = this.
|
|
407
|
-
t.
|
|
408
|
-
C.
|
|
419
|
+
x.add(C);
|
|
420
|
+
C.he = E;
|
|
421
|
+
if (this.oe !== C.oe) {
|
|
422
|
+
for (let e = 0; e < this.oe.length; e++) {
|
|
423
|
+
const t = this.oe[e];
|
|
424
|
+
t.X = C;
|
|
425
|
+
C.oe.push(t);
|
|
409
426
|
}
|
|
410
|
-
this.
|
|
427
|
+
this.oe = C.oe;
|
|
411
428
|
}
|
|
412
|
-
if (this.
|
|
413
|
-
for (let e = 0; e < this.
|
|
414
|
-
const t = this.
|
|
415
|
-
t.
|
|
416
|
-
C.
|
|
429
|
+
if (this.Y !== C.Y) {
|
|
430
|
+
for (let e = 0; e < this.Y.length; e++) {
|
|
431
|
+
const t = this.Y[e];
|
|
432
|
+
t.X = C;
|
|
433
|
+
C.Y.push(t);
|
|
417
434
|
}
|
|
418
|
-
this.
|
|
435
|
+
this.Y = C.Y;
|
|
419
436
|
}
|
|
420
|
-
for (const e of
|
|
421
|
-
if (!e.
|
|
437
|
+
for (const e of I) {
|
|
438
|
+
if (!e.X) e.X = C;
|
|
422
439
|
}
|
|
423
|
-
if (this.
|
|
424
|
-
for (const e of this.
|
|
425
|
-
this.
|
|
440
|
+
if (this.Z !== C.Z) {
|
|
441
|
+
for (const e of this.Z) C.Z.add(e);
|
|
442
|
+
this.Z = C.Z;
|
|
426
443
|
}
|
|
427
444
|
}
|
|
428
445
|
}
|
|
429
446
|
function insertSubs(e, t = false) {
|
|
430
|
-
const n = e.
|
|
431
|
-
const r = e.
|
|
447
|
+
const n = e.ee || K;
|
|
448
|
+
const r = e.pe !== undefined;
|
|
432
449
|
for (let i = e.O; i !== null; i = i.P) {
|
|
433
|
-
if (r && i.k.
|
|
450
|
+
if (r && i.k.ye) {
|
|
434
451
|
i.k.m |= l;
|
|
435
452
|
continue;
|
|
436
453
|
}
|
|
@@ -439,76 +456,77 @@ function insertSubs(e, t = false) {
|
|
|
439
456
|
assignOrMergeLane(i.k, n);
|
|
440
457
|
} else if (t) {
|
|
441
458
|
i.k.m |= f;
|
|
442
|
-
i.k.
|
|
459
|
+
i.k.ee = undefined;
|
|
443
460
|
}
|
|
444
461
|
const e = i.k;
|
|
445
|
-
if (e.
|
|
446
|
-
if (!e.
|
|
447
|
-
e.
|
|
448
|
-
e.
|
|
462
|
+
if (e.V === g) {
|
|
463
|
+
if (!e.B) {
|
|
464
|
+
e.B = true;
|
|
465
|
+
e.K.enqueue(y, e.G);
|
|
449
466
|
}
|
|
450
467
|
continue;
|
|
451
468
|
}
|
|
452
469
|
const s = i.k.m & o ? k : P;
|
|
453
|
-
if (s.
|
|
470
|
+
if (s.W > i.k.o) s.W = i.k.o;
|
|
454
471
|
insertIntoHeap(i.k, s);
|
|
455
472
|
}
|
|
456
473
|
}
|
|
457
474
|
function commitPendingNodes() {
|
|
458
|
-
const e =
|
|
475
|
+
const e = A.oe;
|
|
459
476
|
for (let t = 0; t < e.length; t++) {
|
|
460
477
|
const n = e[t];
|
|
461
|
-
if (n.
|
|
462
|
-
n
|
|
463
|
-
n.
|
|
464
|
-
if (n.
|
|
478
|
+
if (n.T !== S) {
|
|
479
|
+
n.te = n.T;
|
|
480
|
+
n.T = S;
|
|
481
|
+
if (n.V && n.V !== g) n.B = true;
|
|
465
482
|
}
|
|
466
|
-
if (!(n.
|
|
467
|
-
if (n.I) GlobalQueue.
|
|
483
|
+
if (!(n.ge & a)) n.ge &= ~h;
|
|
484
|
+
if (n.I) GlobalQueue.fe(n, false, true);
|
|
468
485
|
}
|
|
469
486
|
e.length = 0;
|
|
470
487
|
}
|
|
471
488
|
function finalizePureQueue(e = null, t = false) {
|
|
472
489
|
const n = !t;
|
|
473
490
|
if (n) commitPendingNodes();
|
|
474
|
-
if (!t) checkBoundaryChildren(
|
|
475
|
-
if (P.S >= P.
|
|
491
|
+
if (!t) checkBoundaryChildren(A);
|
|
492
|
+
if (P.S >= P.W) runHeap(P, GlobalQueue.ue);
|
|
476
493
|
if (n) {
|
|
477
494
|
commitPendingNodes();
|
|
478
|
-
resolveOptimisticNodes(e ? e.
|
|
479
|
-
const t = e ? e.
|
|
480
|
-
if (GlobalQueue.
|
|
495
|
+
resolveOptimisticNodes(e ? e.Y : A.Y);
|
|
496
|
+
const t = e ? e.Z : A.Z;
|
|
497
|
+
if (GlobalQueue.le && t.size) {
|
|
481
498
|
for (const e of t) {
|
|
482
|
-
GlobalQueue.
|
|
499
|
+
GlobalQueue.le(e);
|
|
483
500
|
}
|
|
484
501
|
t.clear();
|
|
485
502
|
schedule();
|
|
486
503
|
}
|
|
504
|
+
sweepTransientStoreNodes();
|
|
487
505
|
cleanupCompletedLanes(e);
|
|
488
506
|
}
|
|
489
507
|
}
|
|
490
508
|
function checkBoundaryChildren(e) {
|
|
491
|
-
for (const t of e.
|
|
509
|
+
for (const t of e.se) {
|
|
492
510
|
t.checkSources?.();
|
|
493
511
|
checkBoundaryChildren(t);
|
|
494
512
|
}
|
|
495
513
|
}
|
|
496
514
|
function trackOptimisticStore(e) {
|
|
497
|
-
|
|
515
|
+
A.Z.add(e);
|
|
498
516
|
schedule();
|
|
499
517
|
}
|
|
500
518
|
function reassignPendingTransition(e) {
|
|
501
519
|
for (let t = 0; t < e.length; t++) {
|
|
502
|
-
e[t].
|
|
520
|
+
e[t].X = C;
|
|
503
521
|
}
|
|
504
522
|
}
|
|
505
|
-
const
|
|
523
|
+
const A = new GlobalQueue();
|
|
506
524
|
function flush() {
|
|
507
|
-
if (
|
|
525
|
+
if (A.re) {
|
|
508
526
|
return;
|
|
509
527
|
}
|
|
510
|
-
while (
|
|
511
|
-
|
|
528
|
+
while (N || C) {
|
|
529
|
+
A.flush();
|
|
512
530
|
}
|
|
513
531
|
}
|
|
514
532
|
function runQueue(e, t) {
|
|
@@ -516,21 +534,21 @@ function runQueue(e, t) {
|
|
|
516
534
|
}
|
|
517
535
|
function reporterBlocksSource(e, t) {
|
|
518
536
|
if (e.m & (o | u)) return false;
|
|
519
|
-
if (e.
|
|
520
|
-
for (let n = e.
|
|
521
|
-
let e = n.
|
|
537
|
+
if (e.Se === t || e.we?.has(t)) return true;
|
|
538
|
+
for (let n = e.j; n; n = n.R) {
|
|
539
|
+
let e = n.A;
|
|
522
540
|
while (e) {
|
|
523
541
|
if (e === t || e.L === t) return true;
|
|
524
|
-
e = e.
|
|
542
|
+
e = e.me;
|
|
525
543
|
}
|
|
526
544
|
}
|
|
527
|
-
return !!(e.
|
|
545
|
+
return !!(e.ge & a && e.de instanceof NotReadyError && e.de.source === t);
|
|
528
546
|
}
|
|
529
547
|
function transitionComplete(e) {
|
|
530
|
-
if (e.
|
|
531
|
-
if (e.
|
|
548
|
+
if (e.U) return true;
|
|
549
|
+
if (e.J.length) return false;
|
|
532
550
|
let t = true;
|
|
533
|
-
for (const [n, r] of e
|
|
551
|
+
for (const [n, r] of e.$) {
|
|
534
552
|
let i = false;
|
|
535
553
|
for (const e of r) {
|
|
536
554
|
if (reporterBlocksSource(e, n)) {
|
|
@@ -539,32 +557,32 @@ function transitionComplete(e) {
|
|
|
539
557
|
}
|
|
540
558
|
r.delete(e);
|
|
541
559
|
}
|
|
542
|
-
if (!i) e
|
|
543
|
-
else if (n.
|
|
560
|
+
if (!i) e.$.delete(n);
|
|
561
|
+
else if (n.ge & a && n.de?.source === n) {
|
|
544
562
|
t = false;
|
|
545
563
|
break;
|
|
546
564
|
}
|
|
547
565
|
}
|
|
548
566
|
if (t) {
|
|
549
|
-
for (let n = 0; n < e.
|
|
550
|
-
const r = e.
|
|
567
|
+
for (let n = 0; n < e.Y.length; n++) {
|
|
568
|
+
const r = e.Y[n];
|
|
551
569
|
if (
|
|
552
570
|
hasActiveOverride(r) &&
|
|
553
|
-
"
|
|
554
|
-
r.
|
|
555
|
-
r.
|
|
556
|
-
r.
|
|
571
|
+
"ge" in r &&
|
|
572
|
+
r.ge & a &&
|
|
573
|
+
r.de instanceof NotReadyError &&
|
|
574
|
+
r.de.source !== r
|
|
557
575
|
) {
|
|
558
576
|
t = false;
|
|
559
577
|
break;
|
|
560
578
|
}
|
|
561
579
|
}
|
|
562
580
|
}
|
|
563
|
-
t && (e.
|
|
581
|
+
t && (e.U = true);
|
|
564
582
|
return t;
|
|
565
583
|
}
|
|
566
584
|
function currentTransition(e) {
|
|
567
|
-
while (e.
|
|
585
|
+
while (e.U && typeof e.U === "object") e = e.U;
|
|
568
586
|
return e;
|
|
569
587
|
}
|
|
570
588
|
function setActiveTransition(e) {
|
|
@@ -579,129 +597,130 @@ function runInTransition(e, t) {
|
|
|
579
597
|
C = n;
|
|
580
598
|
}
|
|
581
599
|
}
|
|
582
|
-
const
|
|
583
|
-
const
|
|
600
|
+
const L = new WeakMap();
|
|
601
|
+
const I = new Set();
|
|
584
602
|
function getOrCreateLane(e) {
|
|
585
|
-
let t =
|
|
603
|
+
let t = L.get(e);
|
|
586
604
|
if (t) {
|
|
587
605
|
return findLane(t);
|
|
588
606
|
}
|
|
589
|
-
const n = e.
|
|
590
|
-
const r = n?.
|
|
591
|
-
t = {
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
e.
|
|
607
|
+
const n = e.me;
|
|
608
|
+
const r = n?.ee ? findLane(n.ee) : null;
|
|
609
|
+
t = { ne: e, D: new Set(), F: [[], []], M: null, X: C, be: r };
|
|
610
|
+
L.set(e, t);
|
|
611
|
+
I.add(t);
|
|
612
|
+
e._e = false;
|
|
595
613
|
return t;
|
|
596
614
|
}
|
|
597
615
|
function findLane(e) {
|
|
598
|
-
while (e.
|
|
616
|
+
while (e.M) e = e.M;
|
|
599
617
|
return e;
|
|
600
618
|
}
|
|
601
619
|
function mergeLanes(e, t) {
|
|
602
620
|
e = findLane(e);
|
|
603
621
|
t = findLane(t);
|
|
604
622
|
if (e === t) return e;
|
|
605
|
-
t.
|
|
606
|
-
for (const n of t.
|
|
607
|
-
e.
|
|
608
|
-
e.
|
|
623
|
+
t.M = e;
|
|
624
|
+
for (const n of t.D) e.D.add(n);
|
|
625
|
+
e.F[0].push(...t.F[0]);
|
|
626
|
+
e.F[1].push(...t.F[1]);
|
|
609
627
|
return e;
|
|
610
628
|
}
|
|
611
629
|
function resolveLane(e) {
|
|
612
|
-
const t = e.
|
|
630
|
+
const t = e.ee;
|
|
613
631
|
if (!t) return undefined;
|
|
614
632
|
const n = findLane(t);
|
|
615
|
-
if (
|
|
616
|
-
e.
|
|
633
|
+
if (I.has(n)) return n;
|
|
634
|
+
e.ee = undefined;
|
|
617
635
|
return undefined;
|
|
618
636
|
}
|
|
619
637
|
function resolveTransition(e) {
|
|
620
|
-
return resolveLane(e)?.
|
|
638
|
+
return resolveLane(e)?.X ?? e.X;
|
|
621
639
|
}
|
|
622
640
|
function hasActiveOverride(e) {
|
|
623
|
-
return !!(e.
|
|
641
|
+
return !!(e.H !== undefined && e.H !== S);
|
|
624
642
|
}
|
|
625
643
|
function assignOrMergeLane(e, t) {
|
|
626
644
|
const n = findLane(t);
|
|
627
|
-
const r = e.
|
|
645
|
+
const r = e.ee;
|
|
628
646
|
if (r) {
|
|
629
|
-
if (r.
|
|
630
|
-
e.
|
|
647
|
+
if (r.M) {
|
|
648
|
+
e.ee = t;
|
|
631
649
|
return;
|
|
632
650
|
}
|
|
633
651
|
const i = findLane(r);
|
|
634
|
-
if (
|
|
652
|
+
if (I.has(i)) {
|
|
635
653
|
if (i !== n && !hasActiveOverride(e)) {
|
|
636
|
-
if (n.
|
|
637
|
-
e.
|
|
638
|
-
} else if (i.
|
|
654
|
+
if (n.be && findLane(n.be) === i) {
|
|
655
|
+
e.ee = t;
|
|
656
|
+
} else if (i.be && findLane(i.be) === n);
|
|
639
657
|
else mergeLanes(n, i);
|
|
640
658
|
}
|
|
641
659
|
return;
|
|
642
660
|
}
|
|
643
661
|
}
|
|
644
|
-
e.
|
|
662
|
+
e.ee = t;
|
|
645
663
|
}
|
|
646
664
|
function unlinkSubs(e) {
|
|
647
|
-
const t = e.
|
|
648
|
-
const n = e.
|
|
665
|
+
const t = e.A;
|
|
666
|
+
const n = e.R;
|
|
649
667
|
const r = e.P;
|
|
650
|
-
const i = e.
|
|
651
|
-
if (r !== null) r.
|
|
652
|
-
else t.
|
|
668
|
+
const i = e.Oe;
|
|
669
|
+
if (r !== null) r.Oe = i;
|
|
670
|
+
else t.ve = i;
|
|
653
671
|
if (i !== null) i.P = r;
|
|
654
672
|
else {
|
|
655
673
|
t.O = r;
|
|
656
674
|
if (r === null) {
|
|
657
|
-
t.
|
|
658
|
-
t.I && !t.
|
|
675
|
+
t.q?.();
|
|
676
|
+
t.I && !t.xe && !(t.m & o) && unobserved(t);
|
|
659
677
|
}
|
|
660
678
|
}
|
|
661
679
|
return n;
|
|
662
680
|
}
|
|
663
681
|
function unobserved(e) {
|
|
664
682
|
deleteFromHeap(e, e.m & o ? k : P);
|
|
665
|
-
let t = e.
|
|
683
|
+
let t = e.j;
|
|
666
684
|
while (t !== null) {
|
|
667
685
|
t = unlinkSubs(t);
|
|
668
686
|
}
|
|
669
|
-
e.
|
|
687
|
+
e.j = null;
|
|
688
|
+
e.Pe = null;
|
|
670
689
|
disposeChildren(e, true);
|
|
671
690
|
}
|
|
672
691
|
function link(e, t) {
|
|
673
692
|
const n = t.Pe;
|
|
674
|
-
if (n !== null && n.
|
|
693
|
+
if (n !== null && n.A === e) return;
|
|
675
694
|
let i = null;
|
|
676
695
|
const s = t.m & r;
|
|
677
696
|
if (s) {
|
|
678
|
-
i = n !== null ? n.
|
|
679
|
-
if (i !== null && i.
|
|
697
|
+
i = n !== null ? n.R : t.j;
|
|
698
|
+
if (i !== null && i.A === e) {
|
|
680
699
|
t.Pe = i;
|
|
681
700
|
return;
|
|
682
701
|
}
|
|
683
702
|
}
|
|
684
|
-
const o = e.
|
|
703
|
+
const o = e.ve;
|
|
685
704
|
if (o !== null && o.k === t && (!s || isValidLink(o, t))) return;
|
|
686
|
-
const u = (t.Pe = e.
|
|
687
|
-
if (n !== null) n.
|
|
688
|
-
else t.
|
|
705
|
+
const u = (t.Pe = e.ve = { A: e, k: t, R: i, Oe: o, P: null });
|
|
706
|
+
if (n !== null) n.R = u;
|
|
707
|
+
else t.j = u;
|
|
689
708
|
if (o !== null) o.P = u;
|
|
690
709
|
else e.O = u;
|
|
691
710
|
}
|
|
692
711
|
function isValidLink(e, t) {
|
|
693
712
|
const n = t.Pe;
|
|
694
713
|
if (n !== null) {
|
|
695
|
-
let r = t.
|
|
714
|
+
let r = t.j;
|
|
696
715
|
do {
|
|
697
716
|
if (r === e) return true;
|
|
698
717
|
if (r === n) break;
|
|
699
|
-
r = r.
|
|
718
|
+
r = r.R;
|
|
700
719
|
} while (r !== null);
|
|
701
720
|
}
|
|
702
721
|
return false;
|
|
703
722
|
}
|
|
704
|
-
const
|
|
723
|
+
const T = {};
|
|
705
724
|
function markDisposal(e) {
|
|
706
725
|
let t = e.ke;
|
|
707
726
|
while (t) {
|
|
@@ -715,11 +734,11 @@ function markDisposal(e) {
|
|
|
715
734
|
}
|
|
716
735
|
}
|
|
717
736
|
function dispose(e) {
|
|
718
|
-
let t = e.
|
|
737
|
+
let t = e.j || null;
|
|
719
738
|
do {
|
|
720
739
|
t = unlinkSubs(t);
|
|
721
740
|
} while (t !== null);
|
|
722
|
-
e.
|
|
741
|
+
e.j = null;
|
|
723
742
|
e.Pe = null;
|
|
724
743
|
disposeChildren(e, true);
|
|
725
744
|
}
|
|
@@ -727,32 +746,32 @@ function disposeChildren(e, t = false, n) {
|
|
|
727
746
|
if (e.m & u) return;
|
|
728
747
|
if (t) e.m = u;
|
|
729
748
|
if (t && e.I) e.Ce = null;
|
|
730
|
-
let r = n ? e.
|
|
749
|
+
let r = n ? e.Ne : e.ke;
|
|
731
750
|
while (r) {
|
|
732
751
|
const e = r.Ee;
|
|
733
|
-
if (r.
|
|
752
|
+
if (r.j) {
|
|
734
753
|
const e = r;
|
|
735
754
|
deleteFromHeap(e, e.m & o ? k : P);
|
|
736
|
-
let t = e.
|
|
755
|
+
let t = e.j;
|
|
737
756
|
do {
|
|
738
757
|
t = unlinkSubs(t);
|
|
739
758
|
} while (t !== null);
|
|
740
|
-
e.
|
|
759
|
+
e.j = null;
|
|
741
760
|
e.Pe = null;
|
|
742
761
|
}
|
|
743
762
|
disposeChildren(r, true);
|
|
744
763
|
r = e;
|
|
745
764
|
}
|
|
746
765
|
if (n) {
|
|
747
|
-
e.
|
|
766
|
+
e.Ne = null;
|
|
748
767
|
} else {
|
|
749
768
|
e.ke = null;
|
|
750
|
-
e.
|
|
769
|
+
e.We = 0;
|
|
751
770
|
}
|
|
752
771
|
runDisposal(e, n);
|
|
753
772
|
}
|
|
754
773
|
function runDisposal(e, t) {
|
|
755
|
-
let n = t ? e.
|
|
774
|
+
let n = t ? e.je : e.Re;
|
|
756
775
|
if (!n) return;
|
|
757
776
|
if (Array.isArray(n)) {
|
|
758
777
|
for (let e = 0; e < n.length; e++) {
|
|
@@ -762,12 +781,12 @@ function runDisposal(e, t) {
|
|
|
762
781
|
} else {
|
|
763
782
|
n.call(n);
|
|
764
783
|
}
|
|
765
|
-
t ? (e.
|
|
784
|
+
t ? (e.je = null) : (e.Re = null);
|
|
766
785
|
}
|
|
767
786
|
function childId(e, t) {
|
|
768
787
|
let n = e;
|
|
769
|
-
while (n.
|
|
770
|
-
if (n.id != null) return formatId(n.id, t ? n.
|
|
788
|
+
while (n.Ae && n.i) n = n.i;
|
|
789
|
+
if (n.id != null) return formatId(n.id, t ? n.We++ : n.We);
|
|
771
790
|
throw new Error("Cannot get child id from owner without an id");
|
|
772
791
|
}
|
|
773
792
|
function getNextChildId(e) {
|
|
@@ -782,38 +801,38 @@ function formatId(e, t) {
|
|
|
782
801
|
return e + (r ? String.fromCharCode(64 + r) : "") + n;
|
|
783
802
|
}
|
|
784
803
|
function getObserver() {
|
|
785
|
-
if (D ||
|
|
786
|
-
return
|
|
804
|
+
if (D || V) return T;
|
|
805
|
+
return Q ? B : null;
|
|
787
806
|
}
|
|
788
807
|
function getOwner() {
|
|
789
|
-
return
|
|
808
|
+
return B;
|
|
790
809
|
}
|
|
791
810
|
function cleanup(e) {
|
|
792
|
-
if (!
|
|
793
|
-
if (!
|
|
794
|
-
else if (Array.isArray(
|
|
795
|
-
else
|
|
811
|
+
if (!B) return e;
|
|
812
|
+
if (!B.Re) B.Re = e;
|
|
813
|
+
else if (Array.isArray(B.Re)) B.Re.push(e);
|
|
814
|
+
else B.Re = [B.Re, e];
|
|
796
815
|
return e;
|
|
797
816
|
}
|
|
798
817
|
function isDisposed(e) {
|
|
799
818
|
return !!(e.m & (u | o));
|
|
800
819
|
}
|
|
801
820
|
function createOwner(e) {
|
|
802
|
-
const t =
|
|
821
|
+
const t = B;
|
|
803
822
|
const n = e?.transparent ?? false;
|
|
804
823
|
const r = {
|
|
805
824
|
id: e?.id ?? (n ? t?.id : t?.id != null ? getNextChildId(t) : undefined),
|
|
806
|
-
|
|
825
|
+
Ae: n || undefined,
|
|
807
826
|
t: true,
|
|
808
827
|
u: t?.t ? t.u : t,
|
|
809
828
|
ke: null,
|
|
810
829
|
Ee: null,
|
|
811
|
-
|
|
812
|
-
|
|
830
|
+
Re: null,
|
|
831
|
+
K: t?.K ?? A,
|
|
813
832
|
Le: t?.Le || _,
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
833
|
+
We: 0,
|
|
834
|
+
je: null,
|
|
835
|
+
Ne: null,
|
|
817
836
|
i: t,
|
|
818
837
|
dispose(e = true) {
|
|
819
838
|
disposeChildren(r, e);
|
|
@@ -835,56 +854,56 @@ function createRoot(e, t) {
|
|
|
835
854
|
return runWithOwner(n, () => e(n.dispose));
|
|
836
855
|
}
|
|
837
856
|
function addPendingSource(e, t) {
|
|
838
|
-
if (e.
|
|
839
|
-
if (!e.
|
|
840
|
-
e.
|
|
857
|
+
if (e.Se === t || e.we?.has(t)) return false;
|
|
858
|
+
if (!e.Se) {
|
|
859
|
+
e.Se = t;
|
|
841
860
|
return true;
|
|
842
861
|
}
|
|
843
|
-
if (!e.
|
|
844
|
-
e.
|
|
862
|
+
if (!e.we) {
|
|
863
|
+
e.we = new Set([e.Se, t]);
|
|
845
864
|
} else {
|
|
846
|
-
e.
|
|
865
|
+
e.we.add(t);
|
|
847
866
|
}
|
|
848
|
-
e.
|
|
867
|
+
e.Se = undefined;
|
|
849
868
|
return true;
|
|
850
869
|
}
|
|
851
870
|
function removePendingSource(e, t) {
|
|
852
|
-
if (e.
|
|
853
|
-
if (e.
|
|
854
|
-
e.
|
|
871
|
+
if (e.Se) {
|
|
872
|
+
if (e.Se !== t) return false;
|
|
873
|
+
e.Se = undefined;
|
|
855
874
|
return true;
|
|
856
875
|
}
|
|
857
|
-
if (!e.
|
|
858
|
-
if (e.
|
|
859
|
-
e.
|
|
860
|
-
e.
|
|
861
|
-
} else if (e.
|
|
862
|
-
e.
|
|
876
|
+
if (!e.we?.delete(t)) return false;
|
|
877
|
+
if (e.we.size === 1) {
|
|
878
|
+
e.Se = e.we.values().next().value;
|
|
879
|
+
e.we = undefined;
|
|
880
|
+
} else if (e.we.size === 0) {
|
|
881
|
+
e.we = undefined;
|
|
863
882
|
}
|
|
864
883
|
return true;
|
|
865
884
|
}
|
|
866
885
|
function clearPendingSources(e) {
|
|
867
|
-
e.ge = undefined;
|
|
868
|
-
e.Se?.clear();
|
|
869
886
|
e.Se = undefined;
|
|
887
|
+
e.we?.clear();
|
|
888
|
+
e.we = undefined;
|
|
870
889
|
}
|
|
871
890
|
function setPendingError(e, t, n) {
|
|
872
891
|
if (!t) {
|
|
873
|
-
e.
|
|
892
|
+
e.de = null;
|
|
874
893
|
return;
|
|
875
894
|
}
|
|
876
895
|
if (n instanceof NotReadyError && n.source === t) {
|
|
877
|
-
e.
|
|
896
|
+
e.de = n;
|
|
878
897
|
return;
|
|
879
898
|
}
|
|
880
|
-
const r = e.
|
|
899
|
+
const r = e.de;
|
|
881
900
|
if (!(r instanceof NotReadyError) || r.source !== t) {
|
|
882
|
-
e.
|
|
901
|
+
e.de = new NotReadyError(t);
|
|
883
902
|
}
|
|
884
903
|
}
|
|
885
904
|
function forEachDependent(e, t) {
|
|
886
905
|
for (let n = e.O; n !== null; n = n.P) t(n.k);
|
|
887
|
-
for (let n = e.C; n !== null; n = n.
|
|
906
|
+
for (let n = e.C; n !== null; n = n.N) {
|
|
888
907
|
for (let e = n.O; e !== null; e = e.P) t(e.k);
|
|
889
908
|
}
|
|
890
909
|
}
|
|
@@ -894,25 +913,25 @@ function settlePendingSource(e) {
|
|
|
894
913
|
const settle = r => {
|
|
895
914
|
if (n.has(r) || !removePendingSource(r, e)) return;
|
|
896
915
|
n.add(r);
|
|
897
|
-
r.
|
|
898
|
-
const i = r.
|
|
916
|
+
r.he = E;
|
|
917
|
+
const i = r.Se ?? r.we?.values().next().value;
|
|
899
918
|
if (i) {
|
|
900
919
|
setPendingError(r, i);
|
|
901
920
|
updatePendingSignal(r);
|
|
902
921
|
} else {
|
|
903
|
-
r.
|
|
922
|
+
r.ge &= ~a;
|
|
904
923
|
setPendingError(r);
|
|
905
924
|
updatePendingSignal(r);
|
|
906
925
|
if (r.Ie) {
|
|
907
|
-
if (r.
|
|
926
|
+
if (r.V === g) {
|
|
908
927
|
const e = r;
|
|
909
|
-
if (!e.
|
|
910
|
-
e.
|
|
911
|
-
e.
|
|
928
|
+
if (!e.B) {
|
|
929
|
+
e.B = true;
|
|
930
|
+
e.K.enqueue(y, e.G);
|
|
912
931
|
}
|
|
913
932
|
} else {
|
|
914
933
|
const e = r.m & o ? k : P;
|
|
915
|
-
if (e.
|
|
934
|
+
if (e.W > r.o) e.W = r.o;
|
|
916
935
|
insertIntoHeap(r, e);
|
|
917
936
|
}
|
|
918
937
|
t = true;
|
|
@@ -936,33 +955,33 @@ function handleAsync(e, t, r) {
|
|
|
936
955
|
let u;
|
|
937
956
|
const handleError = n => {
|
|
938
957
|
if (e.Ce !== t) return;
|
|
939
|
-
|
|
958
|
+
A.initTransition(resolveTransition(e));
|
|
940
959
|
notifyStatus(e, n instanceof NotReadyError ? a : d, n);
|
|
941
|
-
e.
|
|
960
|
+
e.he = E;
|
|
942
961
|
};
|
|
943
962
|
const asyncWrite = (i, s) => {
|
|
944
963
|
if (e.Ce !== t) return;
|
|
945
964
|
if (e.m & (n | f)) return;
|
|
946
|
-
|
|
947
|
-
const o = !!(e.
|
|
965
|
+
A.initTransition(resolveTransition(e));
|
|
966
|
+
const o = !!(e.ge & h);
|
|
948
967
|
clearStatus(e);
|
|
949
968
|
const u = resolveLane(e);
|
|
950
|
-
if (u) u.
|
|
969
|
+
if (u) u.D.delete(e);
|
|
951
970
|
if (r) r(i);
|
|
952
|
-
else if (e.
|
|
953
|
-
if (e.
|
|
971
|
+
else if (e.H !== undefined) {
|
|
972
|
+
if (e.H !== undefined && e.H !== S) e.T = i;
|
|
954
973
|
else {
|
|
955
|
-
e
|
|
974
|
+
e.te = i;
|
|
956
975
|
insertSubs(e);
|
|
957
976
|
}
|
|
958
|
-
e.
|
|
977
|
+
e.he = E;
|
|
959
978
|
} else if (u) {
|
|
960
|
-
const t = e.
|
|
961
|
-
const n = e
|
|
979
|
+
const t = e.V;
|
|
980
|
+
const n = e.te;
|
|
962
981
|
const r = e.Te;
|
|
963
982
|
if ((!t && o) || !r || !r(i, n)) {
|
|
964
|
-
e
|
|
965
|
-
e.
|
|
983
|
+
e.te = i;
|
|
984
|
+
e.he = E;
|
|
966
985
|
if (e.He) {
|
|
967
986
|
setSignal(e.He, i);
|
|
968
987
|
}
|
|
@@ -992,8 +1011,8 @@ function handleAsync(e, t, r) {
|
|
|
992
1011
|
);
|
|
993
1012
|
r = false;
|
|
994
1013
|
if (!n) {
|
|
995
|
-
|
|
996
|
-
throw new NotReadyError(
|
|
1014
|
+
A.initTransition(resolveTransition(e));
|
|
1015
|
+
throw new NotReadyError(B);
|
|
997
1016
|
}
|
|
998
1017
|
}
|
|
999
1018
|
if (s) {
|
|
@@ -1046,8 +1065,8 @@ function handleAsync(e, t, r) {
|
|
|
1046
1065
|
};
|
|
1047
1066
|
const s = iterate();
|
|
1048
1067
|
if (!r && !s) {
|
|
1049
|
-
|
|
1050
|
-
throw new NotReadyError(
|
|
1068
|
+
A.initTransition(resolveTransition(e));
|
|
1069
|
+
throw new NotReadyError(B);
|
|
1051
1070
|
}
|
|
1052
1071
|
}
|
|
1053
1072
|
return u;
|
|
@@ -1055,7 +1074,7 @@ function handleAsync(e, t, r) {
|
|
|
1055
1074
|
function clearStatus(e, t = false) {
|
|
1056
1075
|
clearPendingSources(e);
|
|
1057
1076
|
e.Ie = false;
|
|
1058
|
-
e.
|
|
1077
|
+
e.ge = t ? 0 : e.ge & h;
|
|
1059
1078
|
setPendingError(e);
|
|
1060
1079
|
updatePendingSignal(e);
|
|
1061
1080
|
e.Qe?.();
|
|
@@ -1065,17 +1084,17 @@ function notifyStatus(e, t, n, r, i) {
|
|
|
1065
1084
|
n = new StatusError(e, n);
|
|
1066
1085
|
const s = t === a && n instanceof NotReadyError ? n.source : undefined;
|
|
1067
1086
|
const o = s === e;
|
|
1068
|
-
const u = t === a && e.
|
|
1087
|
+
const u = t === a && e.H !== undefined && !o;
|
|
1069
1088
|
const f = u && hasActiveOverride(e);
|
|
1070
1089
|
if (!r) {
|
|
1071
1090
|
if (t === a && s) {
|
|
1072
1091
|
addPendingSource(e, s);
|
|
1073
|
-
e.
|
|
1092
|
+
e.ge = a | (e.ge & h);
|
|
1074
1093
|
setPendingError(e, s, n);
|
|
1075
1094
|
} else {
|
|
1076
1095
|
clearPendingSources(e);
|
|
1077
|
-
e.
|
|
1078
|
-
e.
|
|
1096
|
+
e.ge = t | (t !== d ? e.ge & h : 0);
|
|
1097
|
+
e.de = n;
|
|
1079
1098
|
}
|
|
1080
1099
|
updatePendingSignal(e);
|
|
1081
1100
|
}
|
|
@@ -1096,22 +1115,22 @@ function notifyStatus(e, t, n, r, i) {
|
|
|
1096
1115
|
return;
|
|
1097
1116
|
}
|
|
1098
1117
|
forEachDependent(e, e => {
|
|
1099
|
-
e.
|
|
1118
|
+
e.he = E;
|
|
1100
1119
|
if (
|
|
1101
|
-
(t === a && s && e.
|
|
1102
|
-
(t !== a && (e.
|
|
1120
|
+
(t === a && s && e.Se !== s && !e.we?.has(s)) ||
|
|
1121
|
+
(t !== a && (e.de !== n || e.Se || e.we))
|
|
1103
1122
|
) {
|
|
1104
|
-
if (!l && !e.
|
|
1123
|
+
if (!l && !e.X) A.oe.push(e);
|
|
1105
1124
|
notifyStatus(e, t, n, l, c);
|
|
1106
1125
|
}
|
|
1107
1126
|
});
|
|
1108
1127
|
}
|
|
1109
|
-
let
|
|
1128
|
+
let H = null;
|
|
1110
1129
|
function enableExternalSource(e) {
|
|
1111
1130
|
const { factory: t, untrack: n = e => e() } = e;
|
|
1112
|
-
if (
|
|
1113
|
-
const { factory: e, untrack: r } =
|
|
1114
|
-
|
|
1131
|
+
if (H) {
|
|
1132
|
+
const { factory: e, untrack: r } = H;
|
|
1133
|
+
H = {
|
|
1115
1134
|
factory: (n, r) => {
|
|
1116
1135
|
const i = e(n, r);
|
|
1117
1136
|
const s = t(e => i.track(e), r);
|
|
@@ -1126,21 +1145,21 @@ function enableExternalSource(e) {
|
|
|
1126
1145
|
untrack: e => r(() => n(e))
|
|
1127
1146
|
};
|
|
1128
1147
|
} else {
|
|
1129
|
-
|
|
1148
|
+
H = { factory: t, untrack: n };
|
|
1130
1149
|
}
|
|
1131
1150
|
}
|
|
1132
|
-
GlobalQueue.
|
|
1133
|
-
GlobalQueue.
|
|
1134
|
-
let H = false;
|
|
1151
|
+
GlobalQueue.ue = recompute;
|
|
1152
|
+
GlobalQueue.fe = disposeChildren;
|
|
1135
1153
|
let Q = false;
|
|
1136
1154
|
let q = false;
|
|
1155
|
+
let M = false;
|
|
1137
1156
|
let D = false;
|
|
1138
1157
|
let F = false;
|
|
1139
|
-
let
|
|
1140
|
-
let V = null;
|
|
1158
|
+
let V = false;
|
|
1141
1159
|
let B = null;
|
|
1142
|
-
let K =
|
|
1143
|
-
let G =
|
|
1160
|
+
let K = null;
|
|
1161
|
+
let G = false;
|
|
1162
|
+
let z = null;
|
|
1144
1163
|
function ownerInSnapshotScope(e) {
|
|
1145
1164
|
while (e) {
|
|
1146
1165
|
if (e.qe) return true;
|
|
@@ -1149,8 +1168,8 @@ function ownerInSnapshotScope(e) {
|
|
|
1149
1168
|
return false;
|
|
1150
1169
|
}
|
|
1151
1170
|
function setSnapshotCapture(e) {
|
|
1152
|
-
|
|
1153
|
-
if (e && !
|
|
1171
|
+
G = e;
|
|
1172
|
+
if (e && !z) z = new Set();
|
|
1154
1173
|
}
|
|
1155
1174
|
function markSnapshotScope(e) {
|
|
1156
1175
|
e.qe = true;
|
|
@@ -1169,11 +1188,11 @@ function releaseSubtree(e) {
|
|
|
1169
1188
|
}
|
|
1170
1189
|
if (t.I) {
|
|
1171
1190
|
const e = t;
|
|
1172
|
-
e.
|
|
1191
|
+
e.ye = false;
|
|
1173
1192
|
if (e.m & l) {
|
|
1174
1193
|
e.m &= ~l;
|
|
1175
1194
|
e.m |= n;
|
|
1176
|
-
if (P.
|
|
1195
|
+
if (P.W > e.o) P.W = e.o;
|
|
1177
1196
|
insertIntoHeap(e, P);
|
|
1178
1197
|
}
|
|
1179
1198
|
}
|
|
@@ -1182,64 +1201,66 @@ function releaseSubtree(e) {
|
|
|
1182
1201
|
}
|
|
1183
1202
|
}
|
|
1184
1203
|
function clearSnapshots() {
|
|
1185
|
-
if (
|
|
1186
|
-
for (const e of
|
|
1187
|
-
delete e.
|
|
1204
|
+
if (z) {
|
|
1205
|
+
for (const e of z) {
|
|
1206
|
+
delete e.pe;
|
|
1188
1207
|
delete e[m];
|
|
1189
1208
|
}
|
|
1190
|
-
|
|
1209
|
+
z = null;
|
|
1191
1210
|
}
|
|
1192
|
-
|
|
1211
|
+
G = false;
|
|
1193
1212
|
}
|
|
1194
1213
|
function recompute(t, n = false) {
|
|
1195
|
-
const i = t.
|
|
1214
|
+
const i = t.V;
|
|
1196
1215
|
if (!n) {
|
|
1197
|
-
if (t.
|
|
1216
|
+
if (t.X && (!i || C) && C !== t.X) A.initTransition(t.X);
|
|
1198
1217
|
deleteFromHeap(t, t.m & o ? k : P);
|
|
1199
1218
|
t.Ce = null;
|
|
1200
|
-
if (t.
|
|
1219
|
+
if (t.X || i === g) disposeChildren(t);
|
|
1201
1220
|
else {
|
|
1202
1221
|
markDisposal(t);
|
|
1203
|
-
t.
|
|
1204
|
-
t.
|
|
1205
|
-
t.
|
|
1222
|
+
t.je = t.Re;
|
|
1223
|
+
t.Ne = t.ke;
|
|
1224
|
+
t.Re = null;
|
|
1206
1225
|
t.ke = null;
|
|
1207
|
-
t.
|
|
1226
|
+
t.We = 0;
|
|
1208
1227
|
}
|
|
1209
1228
|
}
|
|
1210
1229
|
const s = !!(t.m & f);
|
|
1211
|
-
const u = t.
|
|
1212
|
-
const c = !!(t.
|
|
1213
|
-
const p = !!(t.
|
|
1214
|
-
const y =
|
|
1215
|
-
|
|
1230
|
+
const u = t.H !== undefined && t.H !== S;
|
|
1231
|
+
const c = !!(t.ge & a);
|
|
1232
|
+
const p = !!(t.ge & h);
|
|
1233
|
+
const y = B;
|
|
1234
|
+
B = t;
|
|
1216
1235
|
t.Pe = null;
|
|
1217
1236
|
t.m = r;
|
|
1218
|
-
t.
|
|
1219
|
-
let w = t.
|
|
1237
|
+
t.he = E;
|
|
1238
|
+
let w = t.T === S ? t.te : t.T;
|
|
1220
1239
|
let m = t.o;
|
|
1221
|
-
let b =
|
|
1222
|
-
let _ =
|
|
1223
|
-
|
|
1240
|
+
let b = Q;
|
|
1241
|
+
let _ = K;
|
|
1242
|
+
Q = true;
|
|
1224
1243
|
if (s) {
|
|
1225
1244
|
const e = resolveLane(t);
|
|
1226
|
-
if (e)
|
|
1245
|
+
if (e) K = e;
|
|
1227
1246
|
}
|
|
1228
1247
|
try {
|
|
1229
|
-
|
|
1248
|
+
const e = t.Ce;
|
|
1249
|
+
const r = t.I(w);
|
|
1250
|
+
w = t.Ce !== e ? r : handleAsync(t, r);
|
|
1230
1251
|
clearStatus(t, n);
|
|
1231
|
-
const
|
|
1232
|
-
if (
|
|
1233
|
-
|
|
1234
|
-
updatePendingSignal(
|
|
1252
|
+
const i = resolveLane(t);
|
|
1253
|
+
if (i) {
|
|
1254
|
+
i.D.delete(t);
|
|
1255
|
+
updatePendingSignal(i.ne);
|
|
1235
1256
|
}
|
|
1236
1257
|
} catch (e) {
|
|
1237
|
-
if (e instanceof NotReadyError &&
|
|
1238
|
-
const e = findLane(
|
|
1239
|
-
if (e.
|
|
1240
|
-
e.
|
|
1241
|
-
t.
|
|
1242
|
-
updatePendingSignal(e.
|
|
1258
|
+
if (e instanceof NotReadyError && K) {
|
|
1259
|
+
const e = findLane(K);
|
|
1260
|
+
if (e.ne !== t) {
|
|
1261
|
+
e.D.add(t);
|
|
1262
|
+
t.ee = e;
|
|
1263
|
+
updatePendingSignal(e.ne);
|
|
1243
1264
|
}
|
|
1244
1265
|
}
|
|
1245
1266
|
if (e instanceof NotReadyError) t.Ie = true;
|
|
@@ -1248,52 +1269,52 @@ function recompute(t, n = false) {
|
|
|
1248
1269
|
e instanceof NotReadyError ? a : d,
|
|
1249
1270
|
e,
|
|
1250
1271
|
undefined,
|
|
1251
|
-
e instanceof NotReadyError ? t.
|
|
1272
|
+
e instanceof NotReadyError ? t.ee : undefined
|
|
1252
1273
|
);
|
|
1253
1274
|
} finally {
|
|
1254
|
-
|
|
1275
|
+
Q = b;
|
|
1255
1276
|
t.m = e | (n ? t.m & l : 0);
|
|
1256
|
-
|
|
1277
|
+
B = y;
|
|
1257
1278
|
}
|
|
1258
|
-
if (!t.
|
|
1279
|
+
if (!t.de) {
|
|
1259
1280
|
const e = t.Pe;
|
|
1260
|
-
let r = e !== null ? e.
|
|
1281
|
+
let r = e !== null ? e.R : t.j;
|
|
1261
1282
|
if (r !== null) {
|
|
1262
1283
|
do {
|
|
1263
1284
|
r = unlinkSubs(r);
|
|
1264
1285
|
} while (r !== null);
|
|
1265
|
-
if (e !== null) e.
|
|
1266
|
-
else t.
|
|
1286
|
+
if (e !== null) e.R = null;
|
|
1287
|
+
else t.j = null;
|
|
1267
1288
|
}
|
|
1268
|
-
const f = u ? t.
|
|
1289
|
+
const f = u ? t.H : t.T === S ? t.te : t.T;
|
|
1269
1290
|
const l = (!i && p) || !t.Te || !t.Te(f, w);
|
|
1270
1291
|
if (l) {
|
|
1271
|
-
const e = u ? t.
|
|
1272
|
-
if (n || (i && C !== t.
|
|
1273
|
-
t
|
|
1292
|
+
const e = u ? t.H : undefined;
|
|
1293
|
+
if (n || (i && C !== t.X) || s) {
|
|
1294
|
+
t.te = w;
|
|
1274
1295
|
if (u && s) {
|
|
1275
|
-
t.
|
|
1276
|
-
t.
|
|
1296
|
+
t.H = w;
|
|
1297
|
+
t.T = w;
|
|
1277
1298
|
}
|
|
1278
|
-
} else t.
|
|
1279
|
-
if (u && !s && c && !t.
|
|
1280
|
-
if (!u || s || t.
|
|
1299
|
+
} else t.T = w;
|
|
1300
|
+
if (u && !s && c && !t._e) t.H = w;
|
|
1301
|
+
if (!u || s || t.H !== e) insertSubs(t, s || u);
|
|
1281
1302
|
} else if (u) {
|
|
1282
|
-
t.
|
|
1303
|
+
t.T = w;
|
|
1283
1304
|
} else if (t.o != m) {
|
|
1284
1305
|
for (let e = t.O; e !== null; e = e.P) {
|
|
1285
1306
|
insertIntoHeapHeight(e.k, e.k.m & o ? k : P);
|
|
1286
1307
|
}
|
|
1287
1308
|
}
|
|
1288
1309
|
}
|
|
1289
|
-
|
|
1290
|
-
(!n || t.
|
|
1291
|
-
t.
|
|
1310
|
+
K = _;
|
|
1311
|
+
(!n || t.ge & a) && !t.X && !(C && u) && A.oe.push(t);
|
|
1312
|
+
t.X && i && C !== t.X && runInTransition(t.X, () => recompute(t));
|
|
1292
1313
|
}
|
|
1293
1314
|
function updateIfNecessary(e) {
|
|
1294
1315
|
if (e.m & t) {
|
|
1295
|
-
for (let t = e.
|
|
1296
|
-
const r = t.
|
|
1316
|
+
for (let t = e.j; t; t = t.R) {
|
|
1317
|
+
const r = t.A;
|
|
1297
1318
|
const i = r.L || r;
|
|
1298
1319
|
if (i.I) {
|
|
1299
1320
|
updateIfNecessary(i);
|
|
@@ -1303,143 +1324,143 @@ function updateIfNecessary(e) {
|
|
|
1303
1324
|
}
|
|
1304
1325
|
}
|
|
1305
1326
|
}
|
|
1306
|
-
if (e.m & (n | f) || (e.
|
|
1327
|
+
if (e.m & (n | f) || (e.de && e.he < E && !e.Ce)) {
|
|
1307
1328
|
recompute(e);
|
|
1308
1329
|
}
|
|
1309
1330
|
e.m = e.m & (l | i | s);
|
|
1310
1331
|
}
|
|
1311
|
-
function computed(t, n
|
|
1312
|
-
const
|
|
1313
|
-
const
|
|
1314
|
-
id:
|
|
1315
|
-
|
|
1316
|
-
Te:
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
Le:
|
|
1322
|
-
|
|
1332
|
+
function computed(t, n) {
|
|
1333
|
+
const r = n?.transparent ?? false;
|
|
1334
|
+
const i = {
|
|
1335
|
+
id: n?.id ?? (r ? B?.id : B?.id != null ? getNextChildId(B) : undefined),
|
|
1336
|
+
Ae: r || undefined,
|
|
1337
|
+
Te: n?.equals != null ? n.equals : isEqual,
|
|
1338
|
+
ae: !!n?.ownedWrite,
|
|
1339
|
+
q: n?.unobserved,
|
|
1340
|
+
Re: null,
|
|
1341
|
+
K: B?.K ?? A,
|
|
1342
|
+
Le: B?.Le ?? _,
|
|
1343
|
+
We: 0,
|
|
1323
1344
|
I: t,
|
|
1324
|
-
|
|
1345
|
+
te: undefined,
|
|
1325
1346
|
o: 0,
|
|
1326
1347
|
C: null,
|
|
1327
1348
|
p: undefined,
|
|
1328
1349
|
h: null,
|
|
1329
|
-
|
|
1350
|
+
j: null,
|
|
1330
1351
|
Pe: null,
|
|
1331
1352
|
O: null,
|
|
1332
|
-
|
|
1333
|
-
i:
|
|
1353
|
+
ve: null,
|
|
1354
|
+
i: B,
|
|
1334
1355
|
Ee: null,
|
|
1335
1356
|
ke: null,
|
|
1336
|
-
m:
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1357
|
+
m: n?.lazy ? c : e,
|
|
1358
|
+
ge: h,
|
|
1359
|
+
he: E,
|
|
1360
|
+
T: S,
|
|
1361
|
+
je: null,
|
|
1362
|
+
Ne: null,
|
|
1342
1363
|
Ce: null,
|
|
1343
|
-
|
|
1364
|
+
X: null
|
|
1344
1365
|
};
|
|
1345
|
-
|
|
1346
|
-
const
|
|
1347
|
-
if (
|
|
1348
|
-
const e =
|
|
1366
|
+
i.h = i;
|
|
1367
|
+
const s = B?.t ? B.u : B;
|
|
1368
|
+
if (B) {
|
|
1369
|
+
const e = B.ke;
|
|
1349
1370
|
if (e === null) {
|
|
1350
|
-
|
|
1371
|
+
B.ke = i;
|
|
1351
1372
|
} else {
|
|
1352
|
-
|
|
1353
|
-
|
|
1373
|
+
i.Ee = e;
|
|
1374
|
+
B.ke = i;
|
|
1354
1375
|
}
|
|
1355
1376
|
}
|
|
1356
|
-
if (
|
|
1357
|
-
if (
|
|
1358
|
-
if (
|
|
1359
|
-
const e = signal(undefined, { equals: false,
|
|
1360
|
-
const t =
|
|
1377
|
+
if (s) i.o = s.o + 1;
|
|
1378
|
+
if (G && ownerInSnapshotScope(B)) i.ye = true;
|
|
1379
|
+
if (H) {
|
|
1380
|
+
const e = signal(undefined, { equals: false, ownedWrite: true });
|
|
1381
|
+
const t = H.factory(i.I, () => {
|
|
1361
1382
|
setSignal(e, undefined);
|
|
1362
1383
|
});
|
|
1363
1384
|
cleanup(() => t.dispose());
|
|
1364
|
-
|
|
1385
|
+
i.I = n => {
|
|
1365
1386
|
read(e);
|
|
1366
1387
|
return t.track(n);
|
|
1367
1388
|
};
|
|
1368
1389
|
}
|
|
1369
|
-
!
|
|
1370
|
-
if (
|
|
1371
|
-
if (!(
|
|
1372
|
-
|
|
1373
|
-
|
|
1390
|
+
!n?.lazy && recompute(i, true);
|
|
1391
|
+
if (G && !n?.lazy) {
|
|
1392
|
+
if (!(i.ge & a)) {
|
|
1393
|
+
i.pe = i.te === undefined ? w : i.te;
|
|
1394
|
+
z.add(i);
|
|
1374
1395
|
}
|
|
1375
1396
|
}
|
|
1376
|
-
return
|
|
1397
|
+
return i;
|
|
1377
1398
|
}
|
|
1378
1399
|
function signal(e, t, n = null) {
|
|
1379
1400
|
const r = {
|
|
1380
1401
|
Te: t?.equals != null ? t.equals : isEqual,
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1402
|
+
ae: !!t?.ownedWrite,
|
|
1403
|
+
Me: !!t?.Me,
|
|
1404
|
+
q: t?.unobserved,
|
|
1405
|
+
te: e,
|
|
1385
1406
|
O: null,
|
|
1386
|
-
|
|
1387
|
-
|
|
1407
|
+
ve: null,
|
|
1408
|
+
he: E,
|
|
1388
1409
|
L: n,
|
|
1389
|
-
|
|
1390
|
-
|
|
1410
|
+
N: n?.C || null,
|
|
1411
|
+
T: S
|
|
1391
1412
|
};
|
|
1392
1413
|
n && (n.C = r);
|
|
1393
|
-
if (
|
|
1394
|
-
r.
|
|
1395
|
-
|
|
1414
|
+
if (G && !r.Me && !((n?.ge ?? 0) & a)) {
|
|
1415
|
+
r.pe = e === undefined ? w : e;
|
|
1416
|
+
z.add(r);
|
|
1396
1417
|
}
|
|
1397
1418
|
return r;
|
|
1398
1419
|
}
|
|
1399
1420
|
function optimisticSignal(e, t) {
|
|
1400
1421
|
const n = signal(e, t);
|
|
1401
|
-
n.
|
|
1422
|
+
n.H = S;
|
|
1402
1423
|
return n;
|
|
1403
1424
|
}
|
|
1404
|
-
function optimisticComputed(e, t
|
|
1405
|
-
const
|
|
1406
|
-
|
|
1407
|
-
return
|
|
1425
|
+
function optimisticComputed(e, t) {
|
|
1426
|
+
const n = computed(e, t);
|
|
1427
|
+
n.H = S;
|
|
1428
|
+
return n;
|
|
1408
1429
|
}
|
|
1409
1430
|
function isEqual(e, t) {
|
|
1410
1431
|
return e === t;
|
|
1411
1432
|
}
|
|
1412
1433
|
function untrack(e, t) {
|
|
1413
|
-
if (!
|
|
1414
|
-
const n =
|
|
1415
|
-
|
|
1434
|
+
if (!H && !Q && true) return e();
|
|
1435
|
+
const n = Q;
|
|
1436
|
+
Q = false;
|
|
1416
1437
|
try {
|
|
1417
|
-
if (
|
|
1438
|
+
if (H) return H.untrack(e);
|
|
1418
1439
|
return e();
|
|
1419
1440
|
} finally {
|
|
1420
|
-
|
|
1441
|
+
Q = n;
|
|
1421
1442
|
}
|
|
1422
1443
|
}
|
|
1423
1444
|
function read(e) {
|
|
1424
|
-
if (
|
|
1445
|
+
if (V) {
|
|
1425
1446
|
const t = getLatestValueComputed(e);
|
|
1426
|
-
const n =
|
|
1427
|
-
|
|
1428
|
-
const r = e.
|
|
1447
|
+
const n = V;
|
|
1448
|
+
V = false;
|
|
1449
|
+
const r = e.H !== undefined && e.H !== S ? e.H : e.te;
|
|
1429
1450
|
let i;
|
|
1430
1451
|
try {
|
|
1431
1452
|
i = read(t);
|
|
1432
1453
|
} catch (e) {
|
|
1433
|
-
if (!
|
|
1454
|
+
if (!B && e instanceof NotReadyError) return r;
|
|
1434
1455
|
throw e;
|
|
1435
1456
|
} finally {
|
|
1436
|
-
|
|
1457
|
+
V = n;
|
|
1437
1458
|
}
|
|
1438
|
-
if (t.
|
|
1439
|
-
if (
|
|
1440
|
-
const e = findLane(t.
|
|
1441
|
-
const n = findLane(
|
|
1442
|
-
if (e !== n && e.
|
|
1459
|
+
if (t.ge & a) return r;
|
|
1460
|
+
if (q && K && t.ee) {
|
|
1461
|
+
const e = findLane(t.ee);
|
|
1462
|
+
const n = findLane(K);
|
|
1463
|
+
if (e !== n && e.D.size > 0) {
|
|
1443
1464
|
return r;
|
|
1444
1465
|
}
|
|
1445
1466
|
}
|
|
@@ -1449,13 +1470,13 @@ function read(e) {
|
|
|
1449
1470
|
const t = e.L;
|
|
1450
1471
|
const n = D;
|
|
1451
1472
|
D = false;
|
|
1452
|
-
if (t && e.
|
|
1453
|
-
if (e.
|
|
1473
|
+
if (t && e.H !== undefined) {
|
|
1474
|
+
if (e.H !== S && (t.Ce || !!(t.ge & a))) {
|
|
1454
1475
|
F = true;
|
|
1455
1476
|
}
|
|
1456
|
-
let n =
|
|
1477
|
+
let n = B;
|
|
1457
1478
|
if (n?.t) n = n.u;
|
|
1458
|
-
if (n &&
|
|
1479
|
+
if (n && Q) link(e, n);
|
|
1459
1480
|
read(getPendingSignal(e));
|
|
1460
1481
|
read(getPendingSignal(t));
|
|
1461
1482
|
} else {
|
|
@@ -1463,85 +1484,95 @@ function read(e) {
|
|
|
1463
1484
|
if (t && read(getPendingSignal(t))) F = true;
|
|
1464
1485
|
}
|
|
1465
1486
|
D = n;
|
|
1466
|
-
return e
|
|
1487
|
+
return e.te;
|
|
1467
1488
|
}
|
|
1468
|
-
let t =
|
|
1489
|
+
let t = B;
|
|
1469
1490
|
if (t?.t) t = t.u;
|
|
1470
|
-
|
|
1471
|
-
if (
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
if (
|
|
1491
|
+
const n = e;
|
|
1492
|
+
if (typeof n.I === "function") {
|
|
1493
|
+
const t = e;
|
|
1494
|
+
if (M && !(t.m & u)) recompute(t);
|
|
1495
|
+
if (t.m & c) {
|
|
1496
|
+
t.m &= ~c;
|
|
1497
|
+
recompute(t, true);
|
|
1498
|
+
} else if (t.m & u) {
|
|
1499
|
+
recompute(t, true);
|
|
1500
|
+
}
|
|
1501
|
+
}
|
|
1502
|
+
const r = e.L || e;
|
|
1503
|
+
if (t && Q) {
|
|
1478
1504
|
link(e, t);
|
|
1479
|
-
if (
|
|
1480
|
-
const
|
|
1481
|
-
if (
|
|
1505
|
+
if (r.I) {
|
|
1506
|
+
const n = e.m & o;
|
|
1507
|
+
if (r.o >= (n ? k.W : P.W)) {
|
|
1482
1508
|
markNode(t);
|
|
1483
|
-
markHeap(
|
|
1484
|
-
updateIfNecessary(
|
|
1509
|
+
markHeap(n ? k : P);
|
|
1510
|
+
updateIfNecessary(r);
|
|
1485
1511
|
}
|
|
1486
|
-
const i =
|
|
1512
|
+
const i = r.o;
|
|
1487
1513
|
if (i >= t.o && e.i !== t) {
|
|
1488
1514
|
t.o = i + 1;
|
|
1489
1515
|
}
|
|
1490
1516
|
}
|
|
1491
1517
|
}
|
|
1492
|
-
if (
|
|
1493
|
-
if (t && !(
|
|
1494
|
-
if (
|
|
1495
|
-
const
|
|
1496
|
-
const i = findLane(
|
|
1497
|
-
if (
|
|
1498
|
-
if (!
|
|
1499
|
-
throw
|
|
1518
|
+
if (r.ge & a) {
|
|
1519
|
+
if (t && !(q && r.X && C !== r.X)) {
|
|
1520
|
+
if (K) {
|
|
1521
|
+
const n = r.ee;
|
|
1522
|
+
const i = findLane(K);
|
|
1523
|
+
if (n && findLane(n) === i && !hasActiveOverride(r)) {
|
|
1524
|
+
if (!Q && e !== t) link(e, t);
|
|
1525
|
+
throw r.de;
|
|
1500
1526
|
}
|
|
1501
1527
|
} else {
|
|
1502
|
-
if (!
|
|
1503
|
-
throw
|
|
1528
|
+
if (!Q && e !== t) link(e, t);
|
|
1529
|
+
throw r.de;
|
|
1504
1530
|
}
|
|
1505
|
-
} else if (t &&
|
|
1506
|
-
if (!
|
|
1507
|
-
throw
|
|
1508
|
-
} else if (!t &&
|
|
1509
|
-
throw
|
|
1531
|
+
} else if (t && r !== e && r.ge & h) {
|
|
1532
|
+
if (!Q && e !== t) link(e, t);
|
|
1533
|
+
throw r.de;
|
|
1534
|
+
} else if (!t && r.ge & h) {
|
|
1535
|
+
throw r.de;
|
|
1510
1536
|
}
|
|
1511
1537
|
}
|
|
1512
|
-
if (e.I && e.
|
|
1513
|
-
if (e.
|
|
1538
|
+
if (e.I && e.ge & d) {
|
|
1539
|
+
if (e.he < E) {
|
|
1514
1540
|
recompute(e);
|
|
1515
1541
|
return read(e);
|
|
1516
|
-
} else throw e.
|
|
1542
|
+
} else throw e.de;
|
|
1517
1543
|
}
|
|
1518
|
-
if (
|
|
1519
|
-
const n = e.
|
|
1544
|
+
if (G && t && t.ye) {
|
|
1545
|
+
const n = e.pe;
|
|
1520
1546
|
if (n !== undefined) {
|
|
1521
1547
|
const r = n === w ? undefined : n;
|
|
1522
|
-
const i = e.
|
|
1548
|
+
const i = e.T !== S ? e.T : e.te;
|
|
1523
1549
|
if (i !== r) t.m |= l;
|
|
1524
1550
|
return r;
|
|
1525
1551
|
}
|
|
1526
1552
|
}
|
|
1527
|
-
if (e.
|
|
1528
|
-
if (t &&
|
|
1529
|
-
return e.
|
|
1553
|
+
if (e.H !== undefined && e.H !== S) {
|
|
1554
|
+
if (t && q && shouldReadStashedOptimisticValue(e)) return e.te;
|
|
1555
|
+
return e.H;
|
|
1530
1556
|
}
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
e.
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1557
|
+
const i =
|
|
1558
|
+
!t ||
|
|
1559
|
+
(K !== null && (e.H !== undefined || e.ee || (r === e && q) || !!(r.ge & a))) ||
|
|
1560
|
+
e.T === S ||
|
|
1561
|
+
(q && e.X && C !== e.X)
|
|
1562
|
+
? e.te
|
|
1563
|
+
: e.T;
|
|
1564
|
+
if (!t && r === e && typeof n.I === "function" && !n.xe && !(r.ge & a) && !n.i && !e.O) {
|
|
1565
|
+
unobserved(e);
|
|
1566
|
+
}
|
|
1567
|
+
return i;
|
|
1537
1568
|
}
|
|
1538
1569
|
function setSignal(e, t) {
|
|
1539
|
-
if (e.
|
|
1540
|
-
const n = e.
|
|
1541
|
-
const r = e.
|
|
1542
|
-
const i = n ? (r ? e.
|
|
1570
|
+
if (e.X && C !== e.X) A.initTransition(e.X);
|
|
1571
|
+
const n = e.H !== undefined && !W;
|
|
1572
|
+
const r = e.H !== undefined && e.H !== S;
|
|
1573
|
+
const i = n ? (r ? e.H : e.te) : e.T === S ? e.te : e.T;
|
|
1543
1574
|
if (typeof t === "function") t = t(i);
|
|
1544
|
-
const s = !e.Te || !e.Te(i, t) || !!(e.
|
|
1575
|
+
const s = !e.Te || !e.Te(i, t) || !!(e.ge & h);
|
|
1545
1576
|
if (!s) {
|
|
1546
1577
|
if (n && r && e.I) {
|
|
1547
1578
|
insertSubs(e, true);
|
|
@@ -1550,121 +1581,121 @@ function setSignal(e, t) {
|
|
|
1550
1581
|
return t;
|
|
1551
1582
|
}
|
|
1552
1583
|
if (n) {
|
|
1553
|
-
const n = e.
|
|
1554
|
-
if (!n)
|
|
1584
|
+
const n = e.H === S;
|
|
1585
|
+
if (!n) A.initTransition(resolveTransition(e));
|
|
1555
1586
|
if (n) {
|
|
1556
|
-
e.
|
|
1557
|
-
|
|
1587
|
+
e.T = e.te;
|
|
1588
|
+
A.Y.push(e);
|
|
1558
1589
|
}
|
|
1559
|
-
e.
|
|
1590
|
+
e._e = true;
|
|
1560
1591
|
const r = getOrCreateLane(e);
|
|
1561
|
-
e.
|
|
1562
|
-
e.
|
|
1592
|
+
e.ee = r;
|
|
1593
|
+
e.H = t;
|
|
1563
1594
|
} else {
|
|
1564
|
-
if (e.
|
|
1565
|
-
e.
|
|
1595
|
+
if (e.T === S) A.oe.push(e);
|
|
1596
|
+
e.T = t;
|
|
1566
1597
|
}
|
|
1567
1598
|
updatePendingSignal(e);
|
|
1568
1599
|
if (e.He) {
|
|
1569
1600
|
setSignal(e.He, t);
|
|
1570
1601
|
}
|
|
1571
|
-
e.
|
|
1602
|
+
e.he = E;
|
|
1572
1603
|
insertSubs(e, n);
|
|
1573
1604
|
schedule();
|
|
1574
1605
|
return t;
|
|
1575
1606
|
}
|
|
1576
1607
|
function runWithOwner(e, t) {
|
|
1577
|
-
const n =
|
|
1578
|
-
const r =
|
|
1579
|
-
|
|
1580
|
-
|
|
1608
|
+
const n = B;
|
|
1609
|
+
const r = Q;
|
|
1610
|
+
B = e;
|
|
1611
|
+
Q = false;
|
|
1581
1612
|
try {
|
|
1582
1613
|
return t();
|
|
1583
1614
|
} finally {
|
|
1584
|
-
|
|
1585
|
-
|
|
1615
|
+
B = n;
|
|
1616
|
+
Q = r;
|
|
1586
1617
|
}
|
|
1587
1618
|
}
|
|
1588
1619
|
function getPendingSignal(e) {
|
|
1589
|
-
if (!e.
|
|
1590
|
-
e.
|
|
1591
|
-
if (e.
|
|
1592
|
-
e.
|
|
1620
|
+
if (!e.De) {
|
|
1621
|
+
e.De = optimisticSignal(false, { ownedWrite: true });
|
|
1622
|
+
if (e.me) {
|
|
1623
|
+
e.De.me = e;
|
|
1593
1624
|
}
|
|
1594
|
-
if (computePendingState(e)) setSignal(e.
|
|
1625
|
+
if (computePendingState(e)) setSignal(e.De, true);
|
|
1595
1626
|
}
|
|
1596
|
-
return e.
|
|
1627
|
+
return e.De;
|
|
1597
1628
|
}
|
|
1598
1629
|
function computePendingState(e) {
|
|
1599
1630
|
const t = e;
|
|
1600
1631
|
const n = e.L;
|
|
1601
|
-
if (n && e.
|
|
1602
|
-
return !n.Ce && !(n.
|
|
1632
|
+
if (n && e.T !== S) {
|
|
1633
|
+
return !n.Ce && !(n.ge & a);
|
|
1603
1634
|
}
|
|
1604
|
-
if (e.
|
|
1605
|
-
if (t.
|
|
1606
|
-
if (e.
|
|
1607
|
-
const t = e.
|
|
1608
|
-
return !!(t && t.
|
|
1635
|
+
if (e.H !== undefined && e.H !== S) {
|
|
1636
|
+
if (t.ge & a && !(t.ge & h)) return true;
|
|
1637
|
+
if (e.me) {
|
|
1638
|
+
const t = e.ee ? findLane(e.ee) : null;
|
|
1639
|
+
return !!(t && t.D.size > 0);
|
|
1609
1640
|
}
|
|
1610
1641
|
return true;
|
|
1611
1642
|
}
|
|
1612
|
-
if (e.
|
|
1643
|
+
if (e.H !== undefined && e.H === S && !e.me) {
|
|
1613
1644
|
return false;
|
|
1614
1645
|
}
|
|
1615
|
-
if (e.
|
|
1616
|
-
return !!(t.
|
|
1646
|
+
if (e.T !== S && !(t.ge & h)) return true;
|
|
1647
|
+
return !!(t.ge & a && !(t.ge & h));
|
|
1617
1648
|
}
|
|
1618
1649
|
function updatePendingSignal(e) {
|
|
1619
|
-
if (e.
|
|
1650
|
+
if (e.De) {
|
|
1620
1651
|
const t = computePendingState(e);
|
|
1621
|
-
const n = e.
|
|
1652
|
+
const n = e.De;
|
|
1622
1653
|
setSignal(n, t);
|
|
1623
|
-
if (!t && n.
|
|
1654
|
+
if (!t && n.ee) {
|
|
1624
1655
|
const t = resolveLane(e);
|
|
1625
|
-
if (t && t.
|
|
1626
|
-
const e = findLane(n.
|
|
1656
|
+
if (t && t.D.size > 0) {
|
|
1657
|
+
const e = findLane(n.ee);
|
|
1627
1658
|
if (e !== t) {
|
|
1628
1659
|
mergeLanes(t, e);
|
|
1629
1660
|
}
|
|
1630
1661
|
}
|
|
1631
|
-
|
|
1632
|
-
n.
|
|
1662
|
+
L.delete(n);
|
|
1663
|
+
n.ee = undefined;
|
|
1633
1664
|
}
|
|
1634
1665
|
}
|
|
1635
1666
|
}
|
|
1636
1667
|
function getLatestValueComputed(e) {
|
|
1637
1668
|
if (!e.He) {
|
|
1638
|
-
const t =
|
|
1639
|
-
|
|
1669
|
+
const t = V;
|
|
1670
|
+
V = false;
|
|
1640
1671
|
const n = D;
|
|
1641
1672
|
D = false;
|
|
1642
|
-
const r =
|
|
1643
|
-
|
|
1673
|
+
const r = B;
|
|
1674
|
+
B = null;
|
|
1644
1675
|
e.He = optimisticComputed(() => read(e));
|
|
1645
|
-
e.He.
|
|
1646
|
-
|
|
1676
|
+
e.He.me = e;
|
|
1677
|
+
B = r;
|
|
1647
1678
|
D = n;
|
|
1648
|
-
|
|
1679
|
+
V = t;
|
|
1649
1680
|
}
|
|
1650
1681
|
return e.He;
|
|
1651
1682
|
}
|
|
1652
1683
|
function staleValues(e, t = true) {
|
|
1653
|
-
const n =
|
|
1654
|
-
|
|
1684
|
+
const n = q;
|
|
1685
|
+
q = t;
|
|
1655
1686
|
try {
|
|
1656
1687
|
return e();
|
|
1657
1688
|
} finally {
|
|
1658
|
-
|
|
1689
|
+
q = n;
|
|
1659
1690
|
}
|
|
1660
1691
|
}
|
|
1661
1692
|
function latest(e) {
|
|
1662
|
-
const t =
|
|
1663
|
-
|
|
1693
|
+
const t = V;
|
|
1694
|
+
V = true;
|
|
1664
1695
|
try {
|
|
1665
1696
|
return e();
|
|
1666
1697
|
} finally {
|
|
1667
|
-
|
|
1698
|
+
V = t;
|
|
1668
1699
|
}
|
|
1669
1700
|
}
|
|
1670
1701
|
function isPending(e) {
|
|
@@ -1683,8 +1714,8 @@ function isPending(e) {
|
|
|
1683
1714
|
}
|
|
1684
1715
|
}
|
|
1685
1716
|
function refresh(e) {
|
|
1686
|
-
let t =
|
|
1687
|
-
|
|
1717
|
+
let t = M;
|
|
1718
|
+
M = true;
|
|
1688
1719
|
try {
|
|
1689
1720
|
if (typeof e !== "function") {
|
|
1690
1721
|
recompute(e[O]);
|
|
@@ -1692,14 +1723,14 @@ function refresh(e) {
|
|
|
1692
1723
|
}
|
|
1693
1724
|
return untrack(e);
|
|
1694
1725
|
} finally {
|
|
1695
|
-
|
|
1726
|
+
M = t;
|
|
1696
1727
|
if (!t) {
|
|
1697
1728
|
schedule();
|
|
1698
1729
|
}
|
|
1699
1730
|
}
|
|
1700
1731
|
}
|
|
1701
1732
|
function isRefreshing() {
|
|
1702
|
-
return
|
|
1733
|
+
return M;
|
|
1703
1734
|
}
|
|
1704
1735
|
function createContext(e, t) {
|
|
1705
1736
|
return { id: Symbol(t), defaultValue: e };
|
|
@@ -1726,29 +1757,30 @@ function hasContext(e, t) {
|
|
|
1726
1757
|
function isUndefined(e) {
|
|
1727
1758
|
return typeof e === "undefined";
|
|
1728
1759
|
}
|
|
1729
|
-
function effect(e, t, n, r
|
|
1730
|
-
let
|
|
1731
|
-
const
|
|
1732
|
-
|
|
1760
|
+
function effect(e, t, n, r) {
|
|
1761
|
+
let i = false;
|
|
1762
|
+
const s = !!r?.user;
|
|
1763
|
+
const o = computed(s ? e : t => staleValues(() => e(t)), {
|
|
1764
|
+
...r,
|
|
1733
1765
|
equals: () => {
|
|
1734
|
-
o.
|
|
1735
|
-
if (
|
|
1766
|
+
o.B = !o.de;
|
|
1767
|
+
if (i) o.K.enqueue(o.V, runEffect.bind(o));
|
|
1736
1768
|
return false;
|
|
1737
1769
|
},
|
|
1738
1770
|
lazy: true
|
|
1739
1771
|
});
|
|
1740
|
-
o.
|
|
1772
|
+
o.Fe = undefined;
|
|
1741
1773
|
o.Ve = t;
|
|
1742
1774
|
o.Be = n;
|
|
1743
1775
|
o.Ke = undefined;
|
|
1744
|
-
o.
|
|
1776
|
+
o.V = s ? y : p;
|
|
1745
1777
|
o.Qe = (e, t) => {
|
|
1746
|
-
const n = e !== undefined ? e : o.
|
|
1747
|
-
const r = t !== undefined ? t : o.
|
|
1778
|
+
const n = e !== undefined ? e : o.ge;
|
|
1779
|
+
const r = t !== undefined ? t : o.de;
|
|
1748
1780
|
if (n & d) {
|
|
1749
1781
|
let e = r;
|
|
1750
|
-
o.
|
|
1751
|
-
if (o.
|
|
1782
|
+
o.K.notify(o, a, 0);
|
|
1783
|
+
if (o.V === y) {
|
|
1752
1784
|
try {
|
|
1753
1785
|
return o.Be
|
|
1754
1786
|
? o.Be(e, () => {
|
|
@@ -1760,38 +1792,38 @@ function effect(e, t, n, r, i) {
|
|
|
1760
1792
|
e = t;
|
|
1761
1793
|
}
|
|
1762
1794
|
}
|
|
1763
|
-
if (!o.
|
|
1764
|
-
} else if (o.
|
|
1765
|
-
o.
|
|
1795
|
+
if (!o.K.notify(o, d, d)) throw e;
|
|
1796
|
+
} else if (o.V === p) {
|
|
1797
|
+
o.K.notify(o, a | d, n, r);
|
|
1766
1798
|
}
|
|
1767
1799
|
};
|
|
1768
1800
|
recompute(o, true);
|
|
1769
|
-
!
|
|
1770
|
-
|
|
1801
|
+
!r?.defer && (o.V === y || r?.schedule ? o.K.enqueue(o.V, runEffect.bind(o)) : runEffect.call(o));
|
|
1802
|
+
i = true;
|
|
1771
1803
|
cleanup(() => o.Ke?.());
|
|
1772
1804
|
}
|
|
1773
1805
|
function runEffect() {
|
|
1774
|
-
if (!this.
|
|
1806
|
+
if (!this.B || this.m & u) return;
|
|
1775
1807
|
this.Ke?.();
|
|
1776
1808
|
this.Ke = undefined;
|
|
1777
1809
|
try {
|
|
1778
|
-
const e = this.Ve(this
|
|
1810
|
+
const e = this.Ve(this.te, this.Fe);
|
|
1779
1811
|
if (false && e !== undefined && typeof e !== "function");
|
|
1780
1812
|
this.Ke = e;
|
|
1781
1813
|
} catch (e) {
|
|
1782
|
-
this.
|
|
1783
|
-
this.
|
|
1784
|
-
if (!this.
|
|
1814
|
+
this.de = new StatusError(this, e);
|
|
1815
|
+
this.ge |= d;
|
|
1816
|
+
if (!this.K.notify(this, d, d)) throw e;
|
|
1785
1817
|
} finally {
|
|
1786
|
-
this.
|
|
1787
|
-
this.
|
|
1818
|
+
this.Fe = this.te;
|
|
1819
|
+
this.B = false;
|
|
1788
1820
|
}
|
|
1789
1821
|
}
|
|
1790
1822
|
function trackedEffect(e, t) {
|
|
1791
1823
|
const run = () => {
|
|
1792
|
-
if (!n.
|
|
1824
|
+
if (!n.B || n.m & u) return;
|
|
1793
1825
|
try {
|
|
1794
|
-
n.
|
|
1826
|
+
n.B = false;
|
|
1795
1827
|
recompute(n);
|
|
1796
1828
|
} finally {
|
|
1797
1829
|
}
|
|
@@ -1803,27 +1835,26 @@ function trackedEffect(e, t) {
|
|
|
1803
1835
|
const t = staleValues(e);
|
|
1804
1836
|
n.Ke = t;
|
|
1805
1837
|
},
|
|
1806
|
-
undefined,
|
|
1807
1838
|
{ ...t, lazy: true }
|
|
1808
1839
|
);
|
|
1809
1840
|
n.Ke = undefined;
|
|
1810
1841
|
n.Ge = true;
|
|
1811
|
-
n.
|
|
1812
|
-
n.
|
|
1842
|
+
n.B = true;
|
|
1843
|
+
n.V = g;
|
|
1813
1844
|
n.Qe = (e, t) => {
|
|
1814
|
-
const r = e !== undefined ? e : n.
|
|
1845
|
+
const r = e !== undefined ? e : n.ge;
|
|
1815
1846
|
if (r & d) {
|
|
1816
|
-
n.
|
|
1817
|
-
const e = t !== undefined ? t : n.
|
|
1818
|
-
if (!n.
|
|
1847
|
+
n.K.notify(n, a, 0);
|
|
1848
|
+
const e = t !== undefined ? t : n.de;
|
|
1849
|
+
if (!n.K.notify(n, d, d)) throw e;
|
|
1819
1850
|
}
|
|
1820
1851
|
};
|
|
1821
|
-
n.
|
|
1822
|
-
n.
|
|
1852
|
+
n.G = run;
|
|
1853
|
+
n.K.enqueue(y, run);
|
|
1823
1854
|
cleanup(() => n.Ke?.());
|
|
1824
1855
|
}
|
|
1825
1856
|
function restoreTransition(e, t) {
|
|
1826
|
-
|
|
1857
|
+
A.initTransition(e);
|
|
1827
1858
|
const n = t();
|
|
1828
1859
|
flush();
|
|
1829
1860
|
return n;
|
|
@@ -1832,13 +1863,13 @@ function action(e) {
|
|
|
1832
1863
|
return (...t) =>
|
|
1833
1864
|
new Promise((n, r) => {
|
|
1834
1865
|
const i = e(...t);
|
|
1835
|
-
|
|
1866
|
+
A.initTransition();
|
|
1836
1867
|
let s = C;
|
|
1837
|
-
s.
|
|
1868
|
+
s.J.push(i);
|
|
1838
1869
|
const done = (e, t) => {
|
|
1839
1870
|
s = currentTransition(s);
|
|
1840
|
-
const o = s.
|
|
1841
|
-
if (o >= 0) s.
|
|
1871
|
+
const o = s.J.indexOf(i);
|
|
1872
|
+
if (o >= 0) s.J.splice(o, 1);
|
|
1842
1873
|
setActiveTransition(s);
|
|
1843
1874
|
schedule();
|
|
1844
1875
|
t ? r(t) : n(e);
|
|
@@ -1874,23 +1905,24 @@ function accessor(e) {
|
|
|
1874
1905
|
t.$r = true;
|
|
1875
1906
|
return t;
|
|
1876
1907
|
}
|
|
1877
|
-
function createSignal(e, t
|
|
1908
|
+
function createSignal(e, t) {
|
|
1878
1909
|
if (typeof e === "function") {
|
|
1879
|
-
const
|
|
1880
|
-
|
|
1910
|
+
const n = computed(e, t);
|
|
1911
|
+
n.xe = true;
|
|
1912
|
+
return [accessor(n), setSignal.bind(null, n)];
|
|
1881
1913
|
}
|
|
1882
|
-
const
|
|
1883
|
-
return [accessor(
|
|
1914
|
+
const n = signal(e, t);
|
|
1915
|
+
return [accessor(n), setSignal.bind(null, n)];
|
|
1884
1916
|
}
|
|
1885
|
-
function createMemo(e, t
|
|
1886
|
-
let
|
|
1887
|
-
return accessor(
|
|
1917
|
+
function createMemo(e, t) {
|
|
1918
|
+
let n = computed(e, t);
|
|
1919
|
+
return accessor(n);
|
|
1888
1920
|
}
|
|
1889
|
-
function createEffect(e, t, n
|
|
1890
|
-
effect(e, t.effect || t, t.error,
|
|
1921
|
+
function createEffect(e, t, n) {
|
|
1922
|
+
effect(e, t.effect || t, t.error, { user: true, ...n });
|
|
1891
1923
|
}
|
|
1892
|
-
function createRenderEffect(e, t, n
|
|
1893
|
-
effect(e, t, undefined, n
|
|
1924
|
+
function createRenderEffect(e, t, n) {
|
|
1925
|
+
effect(e, t, undefined, n);
|
|
1894
1926
|
}
|
|
1895
1927
|
function createTrackedEffect(e, t) {
|
|
1896
1928
|
trackedEffect(e, t);
|
|
@@ -1911,8 +1943,7 @@ function createReaction(e, t) {
|
|
|
1911
1943
|
dispose(t);
|
|
1912
1944
|
},
|
|
1913
1945
|
e.error,
|
|
1914
|
-
|
|
1915
|
-
{ defer: true, ...(false ? { ...t, name: t?.name ?? "effect" } : t) }
|
|
1946
|
+
{ ...(false ? { ...t, name: t?.name ?? "effect" } : t), user: true, defer: true }
|
|
1916
1947
|
);
|
|
1917
1948
|
});
|
|
1918
1949
|
};
|
|
@@ -1932,25 +1963,26 @@ function resolve(e) {
|
|
|
1932
1963
|
});
|
|
1933
1964
|
});
|
|
1934
1965
|
}
|
|
1935
|
-
function createOptimistic(e, t
|
|
1966
|
+
function createOptimistic(e, t) {
|
|
1936
1967
|
if (typeof e === "function") {
|
|
1937
|
-
const
|
|
1938
|
-
|
|
1968
|
+
const n = optimisticComputed(e, t);
|
|
1969
|
+
n.xe = true;
|
|
1970
|
+
return [accessor(n), setSignal.bind(null, n)];
|
|
1939
1971
|
}
|
|
1940
|
-
const
|
|
1941
|
-
return [accessor(
|
|
1972
|
+
const n = optimisticSignal(e, t);
|
|
1973
|
+
return [accessor(n), setSignal.bind(null, n)];
|
|
1942
1974
|
}
|
|
1943
1975
|
function onSettled(e) {
|
|
1944
1976
|
const t = getOwner();
|
|
1945
1977
|
t && !t.Ge
|
|
1946
1978
|
? createTrackedEffect(() => untrack(e), undefined)
|
|
1947
|
-
:
|
|
1979
|
+
: A.enqueue(y, () => {
|
|
1948
1980
|
const t = e();
|
|
1949
1981
|
t?.();
|
|
1950
1982
|
});
|
|
1951
1983
|
}
|
|
1952
1984
|
function unwrap(e) {
|
|
1953
|
-
return e?.[
|
|
1985
|
+
return e?.[J]?.[te] ?? e;
|
|
1954
1986
|
}
|
|
1955
1987
|
function getOverrideValue(e, t, n, r, i) {
|
|
1956
1988
|
if (i && r in i) return i[r];
|
|
@@ -1962,16 +1994,16 @@ function getAllKeys(e, t, n) {
|
|
|
1962
1994
|
return Array.from(new Set([...r, ...i]));
|
|
1963
1995
|
}
|
|
1964
1996
|
function applyState(e, t, n) {
|
|
1965
|
-
const r = t?.[
|
|
1997
|
+
const r = t?.[J];
|
|
1966
1998
|
if (!r) return;
|
|
1967
|
-
const i = r[
|
|
1968
|
-
const s = r[
|
|
1969
|
-
const o = r[
|
|
1970
|
-
let u = r[
|
|
1999
|
+
const i = r[Z];
|
|
2000
|
+
const s = r[$];
|
|
2001
|
+
const o = r[ee];
|
|
2002
|
+
let u = r[te];
|
|
1971
2003
|
if (e === i && !s && !o) return;
|
|
1972
|
-
(r[
|
|
1973
|
-
r[
|
|
1974
|
-
r[
|
|
2004
|
+
(r[ie] || ue).set(e, r[X]);
|
|
2005
|
+
r[Z] = e;
|
|
2006
|
+
r[$] = undefined;
|
|
1975
2007
|
if (Array.isArray(i)) {
|
|
1976
2008
|
let t = false;
|
|
1977
2009
|
const f = getOverrideValue(i, s, u, "length", o);
|
|
@@ -1999,16 +2031,16 @@ function applyState(e, t, n) {
|
|
|
1999
2031
|
if (a > h || a > d) {
|
|
2000
2032
|
for (c = a; c <= h; c++) {
|
|
2001
2033
|
t = true;
|
|
2002
|
-
r[
|
|
2034
|
+
r[te][c] && setSignal(r[te][c], wrap(e[c], r));
|
|
2003
2035
|
}
|
|
2004
2036
|
for (; c < e.length; c++) {
|
|
2005
2037
|
t = true;
|
|
2006
2038
|
const i = wrap(S[c], r);
|
|
2007
|
-
r[
|
|
2039
|
+
r[te][c] && setSignal(r[te][c], i);
|
|
2008
2040
|
applyState(e[c], i, n);
|
|
2009
2041
|
}
|
|
2010
|
-
t && r[
|
|
2011
|
-
f !== e.length && r[
|
|
2042
|
+
t && r[te][U] && setSignal(r[te][U], void 0);
|
|
2043
|
+
f !== e.length && r[te].length && setSignal(r[te].length, e.length);
|
|
2012
2044
|
return;
|
|
2013
2045
|
}
|
|
2014
2046
|
y = new Array(h + 1);
|
|
@@ -2032,26 +2064,26 @@ function applyState(e, t, n) {
|
|
|
2032
2064
|
for (c = a; c < e.length; c++) {
|
|
2033
2065
|
if (c in S) {
|
|
2034
2066
|
const t = wrap(S[c], r);
|
|
2035
|
-
r[
|
|
2067
|
+
r[te][c] && setSignal(r[te][c], t);
|
|
2036
2068
|
applyState(e[c], t, n);
|
|
2037
|
-
} else r[
|
|
2069
|
+
} else r[te][c] && setSignal(r[te][c], wrap(e[c], r));
|
|
2038
2070
|
}
|
|
2039
2071
|
if (a < e.length) t = true;
|
|
2040
2072
|
} else if (e.length) {
|
|
2041
2073
|
for (let t = 0, f = e.length; t < f; t++) {
|
|
2042
2074
|
const f = getOverrideValue(i, s, u, t, o);
|
|
2043
|
-
isWrappable(f) ? applyState(e[t], wrap(f, r), n) : r[
|
|
2075
|
+
isWrappable(f) ? applyState(e[t], wrap(f, r), n) : r[te][t] && setSignal(r[te][t], e[t]);
|
|
2044
2076
|
}
|
|
2045
2077
|
}
|
|
2046
2078
|
if (f !== e.length) {
|
|
2047
2079
|
t = true;
|
|
2048
|
-
r[
|
|
2080
|
+
r[te].length && setSignal(r[te].length, e.length);
|
|
2049
2081
|
}
|
|
2050
|
-
t && r[
|
|
2082
|
+
t && r[te][U] && setSignal(r[te][U], void 0);
|
|
2051
2083
|
return;
|
|
2052
2084
|
}
|
|
2053
2085
|
if (u) {
|
|
2054
|
-
const t = u[
|
|
2086
|
+
const t = u[U];
|
|
2055
2087
|
const f = t ? getAllKeys(i, s, e) : Object.keys(u);
|
|
2056
2088
|
for (let l = 0, c = f.length; l < c; l++) {
|
|
2057
2089
|
const c = f[l];
|
|
@@ -2065,7 +2097,7 @@ function applyState(e, t, n) {
|
|
|
2065
2097
|
} else applyState(h, wrap(d, r), n);
|
|
2066
2098
|
}
|
|
2067
2099
|
}
|
|
2068
|
-
if ((u = r[
|
|
2100
|
+
if ((u = r[ne])) {
|
|
2069
2101
|
const t = Object.keys(u);
|
|
2070
2102
|
for (let n = 0, r = t.length; n < r; n++) {
|
|
2071
2103
|
const r = t[n];
|
|
@@ -2083,13 +2115,13 @@ function reconcile(e, t) {
|
|
|
2083
2115
|
applyState(e, n, r);
|
|
2084
2116
|
};
|
|
2085
2117
|
}
|
|
2086
|
-
function createProjectionInternal(e, t
|
|
2118
|
+
function createProjectionInternal(e, t, n) {
|
|
2087
2119
|
let r;
|
|
2088
2120
|
const i = new WeakMap();
|
|
2089
2121
|
const wrapper = e => {
|
|
2090
|
-
e[
|
|
2091
|
-
e[
|
|
2092
|
-
Object.defineProperty(e,
|
|
2122
|
+
e[re] = wrapProjection;
|
|
2123
|
+
e[ie] = i;
|
|
2124
|
+
Object.defineProperty(e, se, {
|
|
2093
2125
|
get() {
|
|
2094
2126
|
return r;
|
|
2095
2127
|
},
|
|
@@ -2098,35 +2130,42 @@ function createProjectionInternal(e, t = {}, n) {
|
|
|
2098
2130
|
};
|
|
2099
2131
|
const wrapProjection = e => {
|
|
2100
2132
|
if (i.has(e)) return i.get(e);
|
|
2101
|
-
if (e[
|
|
2102
|
-
const t = createStoreProxy(e,
|
|
2133
|
+
if (e[J]?.[re] === wrapProjection) return e;
|
|
2134
|
+
const t = createStoreProxy(e, ce, wrapper);
|
|
2103
2135
|
i.set(e, t);
|
|
2104
2136
|
return t;
|
|
2105
2137
|
};
|
|
2106
2138
|
const s = wrapProjection(t);
|
|
2107
2139
|
r = computed(() => {
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
s,
|
|
2113
|
-
createWriteTraps(() => !r || t.Ce === i)
|
|
2114
|
-
);
|
|
2115
|
-
storeSetter(o, o => {
|
|
2116
|
-
i = e(o);
|
|
2117
|
-
r = true;
|
|
2118
|
-
const u = handleAsync(t, i, e => {
|
|
2119
|
-
e !== o && e !== undefined && storeSetter(s, reconcile(e, n?.key || "id"));
|
|
2120
|
-
});
|
|
2121
|
-
u !== o && u !== undefined && reconcile(u, n?.key || "id")(s);
|
|
2122
|
-
});
|
|
2123
|
-
});
|
|
2124
|
-
r.ve = true;
|
|
2140
|
+
if (!r) r = getOwner();
|
|
2141
|
+
runProjectionComputed(s, e, n?.key || "id");
|
|
2142
|
+
}, undefined);
|
|
2143
|
+
r.xe = true;
|
|
2125
2144
|
return { store: s, node: r };
|
|
2126
2145
|
}
|
|
2127
|
-
function createProjection(e, t
|
|
2146
|
+
function createProjection(e, t, n) {
|
|
2128
2147
|
return createProjectionInternal(e, t, n).store;
|
|
2129
2148
|
}
|
|
2149
|
+
function runProjectionComputed(e, t, n, r) {
|
|
2150
|
+
const i = getOwner();
|
|
2151
|
+
let s = false;
|
|
2152
|
+
let o;
|
|
2153
|
+
const u = new Proxy(
|
|
2154
|
+
e,
|
|
2155
|
+
createWriteTraps(() => !s || i.Ce === o)
|
|
2156
|
+
);
|
|
2157
|
+
storeSetter(u, u => {
|
|
2158
|
+
o = t(u);
|
|
2159
|
+
s = true;
|
|
2160
|
+
const commit = t => {
|
|
2161
|
+
if (t === u || t === undefined) return;
|
|
2162
|
+
const write = () => storeSetter(e, reconcile(t, n));
|
|
2163
|
+
r ? r(write) : write();
|
|
2164
|
+
};
|
|
2165
|
+
commit(handleAsync(i, o, commit));
|
|
2166
|
+
});
|
|
2167
|
+
return i;
|
|
2168
|
+
}
|
|
2130
2169
|
function createWriteTraps(e) {
|
|
2131
2170
|
const t = {
|
|
2132
2171
|
get(e, n) {
|
|
@@ -2180,33 +2219,33 @@ function createWriteTraps(e) {
|
|
|
2180
2219
|
};
|
|
2181
2220
|
return t;
|
|
2182
2221
|
}
|
|
2183
|
-
const
|
|
2184
|
-
U = Symbol(0),
|
|
2222
|
+
const U = Symbol(0),
|
|
2185
2223
|
J = Symbol(0),
|
|
2186
|
-
X = Symbol(0)
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
$ = "
|
|
2190
|
-
ee = "
|
|
2191
|
-
te = "
|
|
2192
|
-
ne = "
|
|
2193
|
-
re = "
|
|
2194
|
-
ie = "
|
|
2195
|
-
se = "
|
|
2196
|
-
|
|
2224
|
+
X = Symbol(0),
|
|
2225
|
+
Y = Symbol(0);
|
|
2226
|
+
const Z = "v",
|
|
2227
|
+
$ = "o",
|
|
2228
|
+
ee = "x",
|
|
2229
|
+
te = "n",
|
|
2230
|
+
ne = "h",
|
|
2231
|
+
re = "w",
|
|
2232
|
+
ie = "l",
|
|
2233
|
+
se = "f",
|
|
2234
|
+
oe = "p";
|
|
2235
|
+
function createStoreProxy(e, t = ce, n) {
|
|
2197
2236
|
let r;
|
|
2198
2237
|
if (Array.isArray(e)) {
|
|
2199
2238
|
r = [];
|
|
2200
2239
|
r.v = e;
|
|
2201
2240
|
} else r = { v: e };
|
|
2202
2241
|
n && n(r);
|
|
2203
|
-
return (r[
|
|
2242
|
+
return (r[X] = new Proxy(r, t));
|
|
2204
2243
|
}
|
|
2205
|
-
const
|
|
2244
|
+
const ue = new WeakMap();
|
|
2206
2245
|
function wrap(e, t) {
|
|
2207
|
-
if (t?.[
|
|
2208
|
-
let n = e[
|
|
2209
|
-
if (!n)
|
|
2246
|
+
if (t?.[re]) return t[re](e, t);
|
|
2247
|
+
let n = e[X] || ue.get(e);
|
|
2248
|
+
if (!n) ue.set(e, (n = createStoreProxy(e)));
|
|
2210
2249
|
return n;
|
|
2211
2250
|
}
|
|
2212
2251
|
function isWrappable(e) {
|
|
@@ -2217,12 +2256,12 @@ function isWrappable(e) {
|
|
|
2217
2256
|
!(typeof Node !== "undefined" && e instanceof Node)
|
|
2218
2257
|
);
|
|
2219
2258
|
}
|
|
2220
|
-
let
|
|
2259
|
+
let fe = false;
|
|
2221
2260
|
function setWriteOverride(e) {
|
|
2222
|
-
|
|
2261
|
+
fe = e;
|
|
2223
2262
|
}
|
|
2224
2263
|
function writeOnly(e) {
|
|
2225
|
-
return
|
|
2264
|
+
return fe || !!le?.has(e);
|
|
2226
2265
|
}
|
|
2227
2266
|
function getNodes(e, t) {
|
|
2228
2267
|
let n = e[t];
|
|
@@ -2236,23 +2275,23 @@ function getNode(e, t, n, r, i = isEqual, s, o) {
|
|
|
2236
2275
|
{
|
|
2237
2276
|
equals: i,
|
|
2238
2277
|
unobserved() {
|
|
2239
|
-
delete e[t];
|
|
2278
|
+
if (e[t] === u) delete e[t];
|
|
2240
2279
|
}
|
|
2241
2280
|
},
|
|
2242
2281
|
r
|
|
2243
2282
|
);
|
|
2244
2283
|
if (s) {
|
|
2245
|
-
u.
|
|
2284
|
+
u.H = S;
|
|
2246
2285
|
}
|
|
2247
2286
|
if (o && t in o) {
|
|
2248
2287
|
const e = o[t];
|
|
2249
|
-
u.
|
|
2250
|
-
|
|
2288
|
+
u.pe = e === undefined ? w : e;
|
|
2289
|
+
z?.add(u);
|
|
2251
2290
|
}
|
|
2252
2291
|
return (e[t] = u);
|
|
2253
2292
|
}
|
|
2254
|
-
function trackSelf(e, t =
|
|
2255
|
-
getObserver() && read(getNode(getNodes(e,
|
|
2293
|
+
function trackSelf(e, t = U) {
|
|
2294
|
+
getObserver() && read(getNode(getNodes(e, te), t, undefined, e[se], false, e[oe]));
|
|
2256
2295
|
}
|
|
2257
2296
|
function getKeys(e, t, n = true) {
|
|
2258
2297
|
const r = untrack(() => (n ? Object.keys(e) : Reflect.ownKeys(e)));
|
|
@@ -2260,137 +2299,171 @@ function getKeys(e, t, n = true) {
|
|
|
2260
2299
|
const i = new Set(r);
|
|
2261
2300
|
const s = Reflect.ownKeys(t);
|
|
2262
2301
|
for (const e of s) {
|
|
2263
|
-
if (t[e] !==
|
|
2302
|
+
if (t[e] !== Y) i.add(e);
|
|
2264
2303
|
else i.delete(e);
|
|
2265
2304
|
}
|
|
2266
2305
|
return Array.from(i);
|
|
2267
2306
|
}
|
|
2268
2307
|
function getPropertyDescriptor(e, t, n) {
|
|
2269
2308
|
if (t && n in t) {
|
|
2270
|
-
if (t[n] ===
|
|
2309
|
+
if (t[n] === Y) return void 0;
|
|
2271
2310
|
const r = Reflect.getOwnPropertyDescriptor(t, n);
|
|
2272
2311
|
if (r?.get || r?.set || !(n in e)) return r;
|
|
2273
2312
|
}
|
|
2274
2313
|
return Reflect.getOwnPropertyDescriptor(e, n);
|
|
2275
2314
|
}
|
|
2276
2315
|
function prepareStoreWrite(e, t, n) {
|
|
2277
|
-
if (e[
|
|
2278
|
-
const t = e[
|
|
2279
|
-
if (t?.
|
|
2280
|
-
|
|
2316
|
+
if (e[oe]) {
|
|
2317
|
+
const t = e[se];
|
|
2318
|
+
if (t?.X) {
|
|
2319
|
+
A.initTransition(t.X);
|
|
2281
2320
|
}
|
|
2282
2321
|
}
|
|
2283
|
-
const r = e[
|
|
2322
|
+
const r = e[Z];
|
|
2284
2323
|
const i = r[n];
|
|
2285
|
-
if (
|
|
2324
|
+
if (G && typeof n !== "symbol" && !((e[se]?.ge ?? 0) & a)) {
|
|
2286
2325
|
if (!e[m]) {
|
|
2287
2326
|
e[m] = Object.create(null);
|
|
2288
|
-
|
|
2327
|
+
z?.add(e);
|
|
2289
2328
|
}
|
|
2290
2329
|
if (!(n in e[m])) {
|
|
2291
2330
|
e[m][n] = i;
|
|
2292
2331
|
}
|
|
2293
2332
|
}
|
|
2294
|
-
const s = e[
|
|
2295
|
-
const o = s ?
|
|
2333
|
+
const s = e[oe] && !W;
|
|
2334
|
+
const o = s ? ee : $;
|
|
2296
2335
|
if (s) trackOptimisticStore(t);
|
|
2297
2336
|
return { base: i, overrideKey: o, state: r };
|
|
2298
2337
|
}
|
|
2299
|
-
function
|
|
2300
|
-
if (
|
|
2301
|
-
const
|
|
2338
|
+
function upsertStoreNode(e, t, n, r, i) {
|
|
2339
|
+
if (t[n]) return t[n];
|
|
2340
|
+
const s = isWrappable(r) ? wrap(r, e) : r;
|
|
2341
|
+
const o = getNode(t, n, s, e[se], isEqual, e[oe], i);
|
|
2342
|
+
registerTransientStoreNode(o);
|
|
2343
|
+
return o;
|
|
2344
|
+
}
|
|
2345
|
+
function notifyStoreProperty(e, t, n, r, i, s) {
|
|
2346
|
+
const o = W || e[oe];
|
|
2347
|
+
const u = n !== "delete";
|
|
2348
|
+
const f = e[ne]?.[t];
|
|
2349
|
+
if (f) {
|
|
2350
|
+
setSignal(f, u);
|
|
2351
|
+
} else if (!o && n !== "invalidate" && s !== u) {
|
|
2352
|
+
const n = upsertStoreNode(e, getNodes(e, ne), t, s);
|
|
2353
|
+
setSignal(n, u);
|
|
2354
|
+
}
|
|
2355
|
+
const l = getNodes(e, te);
|
|
2302
2356
|
if (n === "set") {
|
|
2303
|
-
|
|
2357
|
+
if (l[t]) {
|
|
2358
|
+
setSignal(l[t], () => (isWrappable(r) ? wrap(r, e) : r));
|
|
2359
|
+
} else if (!o) {
|
|
2360
|
+
const n = upsertStoreNode(e, l, t, i, e[m]);
|
|
2361
|
+
setSignal(n, () => (isWrappable(r) ? wrap(r, e) : r));
|
|
2362
|
+
}
|
|
2304
2363
|
} else if (n === "invalidate") {
|
|
2305
|
-
if (
|
|
2306
|
-
setSignal(
|
|
2307
|
-
delete
|
|
2364
|
+
if (l[t]) {
|
|
2365
|
+
setSignal(l[t], {});
|
|
2366
|
+
delete l[t];
|
|
2308
2367
|
}
|
|
2309
2368
|
} else {
|
|
2310
|
-
|
|
2369
|
+
if (l[t]) {
|
|
2370
|
+
setSignal(l[t], undefined);
|
|
2371
|
+
} else if (!o) {
|
|
2372
|
+
const n = upsertStoreNode(e, l, t, i, e[m]);
|
|
2373
|
+
setSignal(n, undefined);
|
|
2374
|
+
}
|
|
2311
2375
|
}
|
|
2312
|
-
|
|
2376
|
+
l[U] && setSignal(l[U], undefined);
|
|
2313
2377
|
}
|
|
2314
|
-
let
|
|
2315
|
-
const
|
|
2378
|
+
let le = null;
|
|
2379
|
+
const ce = {
|
|
2316
2380
|
get(e, t, n) {
|
|
2317
|
-
if (t ===
|
|
2318
|
-
if (t ===
|
|
2319
|
-
if (t === O) return e[
|
|
2320
|
-
if (t ===
|
|
2381
|
+
if (t === J) return e;
|
|
2382
|
+
if (t === X) return n;
|
|
2383
|
+
if (t === O) return e[se];
|
|
2384
|
+
if (t === U) {
|
|
2321
2385
|
trackSelf(e);
|
|
2322
2386
|
return n;
|
|
2323
2387
|
}
|
|
2324
|
-
const r = getNodes(e,
|
|
2388
|
+
const r = getNodes(e, te);
|
|
2325
2389
|
const i = r[t];
|
|
2326
|
-
const s = e[
|
|
2327
|
-
const o = s || (e[
|
|
2328
|
-
const u = !!e[
|
|
2329
|
-
const f = s ? e[
|
|
2390
|
+
const s = e[ee] && t in e[ee];
|
|
2391
|
+
const o = s || (e[$] && t in e[$]);
|
|
2392
|
+
const u = !!e[Z][J];
|
|
2393
|
+
const f = s ? e[ee] : e[$] && t in e[$] ? e[$] : e[Z];
|
|
2330
2394
|
if (!i) {
|
|
2331
2395
|
const e = Object.getOwnPropertyDescriptor(f, t);
|
|
2332
2396
|
if (e && e.get) return e.get.call(n);
|
|
2333
2397
|
}
|
|
2334
2398
|
if (writeOnly(n)) {
|
|
2335
2399
|
let n =
|
|
2336
|
-
i && (o || !u) ? (i.
|
|
2337
|
-
n ===
|
|
2400
|
+
i && (o || !u) ? (i.H !== undefined && i.H !== S ? i.H : i.T !== S ? i.T : i.te) : f[t];
|
|
2401
|
+
n === Y && (n = undefined);
|
|
2338
2402
|
if (!isWrappable(n)) return n;
|
|
2339
2403
|
const r = wrap(n, e);
|
|
2340
|
-
|
|
2404
|
+
le?.add(r);
|
|
2341
2405
|
return r;
|
|
2342
2406
|
}
|
|
2343
2407
|
let l = i ? (o || !u ? read(r[t]) : (read(r[t]), f[t])) : f[t];
|
|
2344
|
-
l ===
|
|
2408
|
+
l === Y && (l = undefined);
|
|
2345
2409
|
if (!i) {
|
|
2346
2410
|
if (!o && typeof l === "function" && !f.hasOwnProperty(t)) {
|
|
2347
2411
|
let t;
|
|
2348
|
-
return !Array.isArray(e[
|
|
2412
|
+
return !Array.isArray(e[Z]) && (t = Object.getPrototypeOf(e[Z])) && t !== Object.prototype
|
|
2349
2413
|
? l.bind(f)
|
|
2350
2414
|
: l;
|
|
2351
2415
|
} else if (getObserver()) {
|
|
2352
|
-
return read(getNode(r, t, isWrappable(l) ? wrap(l, e) : l, e[
|
|
2416
|
+
return read(getNode(r, t, isWrappable(l) ? wrap(l, e) : l, e[se], isEqual, e[oe], e[m]));
|
|
2353
2417
|
}
|
|
2354
2418
|
}
|
|
2355
2419
|
return isWrappable(l) ? wrap(l, e) : l;
|
|
2356
2420
|
},
|
|
2357
2421
|
has(e, t) {
|
|
2358
|
-
if (t ===
|
|
2359
|
-
const n = e[
|
|
2360
|
-
if (
|
|
2361
|
-
|
|
2422
|
+
if (t === X || t === U || t === "__proto__") return true;
|
|
2423
|
+
const n = e[ee] && t in e[ee] ? e[ee][t] !== Y : e[$] && t in e[$] ? e[$][t] !== Y : t in e[Z];
|
|
2424
|
+
if (writeOnly(e[X])) return n;
|
|
2425
|
+
const r = getNodes(e, ne);
|
|
2426
|
+
if (r[t]) return read(r[t]);
|
|
2427
|
+
if (getObserver()) {
|
|
2428
|
+
return read(getNode(r, t, n, e[se], isEqual, e[oe]));
|
|
2362
2429
|
}
|
|
2363
2430
|
return n;
|
|
2364
2431
|
},
|
|
2365
2432
|
set(e, t, n) {
|
|
2366
|
-
const r = e[
|
|
2433
|
+
const r = e[X];
|
|
2367
2434
|
if (writeOnly(r)) {
|
|
2368
2435
|
untrack(() => {
|
|
2369
2436
|
const { base: i, overrideKey: s, state: o } = prepareStoreWrite(e, r, t);
|
|
2370
|
-
const u = e[
|
|
2371
|
-
const f =
|
|
2372
|
-
|
|
2373
|
-
const
|
|
2374
|
-
const
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2437
|
+
const u = e[ee] && t in e[ee] ? e[ee][t] : e[$] && t in e[$] ? e[$][t] : i;
|
|
2438
|
+
const f =
|
|
2439
|
+
e[ee] && t in e[ee] ? e[ee][t] !== Y : e[$] && t in e[$] ? e[$][t] !== Y : t in e[Z];
|
|
2440
|
+
const l = n?.[J]?.[Z] ?? n;
|
|
2441
|
+
const c = Array.isArray(o) && t !== "length";
|
|
2442
|
+
const a = c ? parseInt(t) + 1 : 0;
|
|
2443
|
+
const d =
|
|
2444
|
+
c &&
|
|
2445
|
+
(e[ee] && "length" in e[ee]
|
|
2446
|
+
? e[ee].length
|
|
2447
|
+
: e[$] && "length" in e[$]
|
|
2448
|
+
? e[$].length
|
|
2380
2449
|
: o.length);
|
|
2381
|
-
const
|
|
2382
|
-
if (u ===
|
|
2383
|
-
if (
|
|
2450
|
+
const h = c && a > d ? a : undefined;
|
|
2451
|
+
if (u === l && h === undefined) return true;
|
|
2452
|
+
if (l !== undefined && l === i && h === undefined) delete e[s]?.[t];
|
|
2384
2453
|
else {
|
|
2385
2454
|
const n = e[s] || (e[s] = Object.create(null));
|
|
2386
|
-
n[t] =
|
|
2387
|
-
if (
|
|
2455
|
+
n[t] = l;
|
|
2456
|
+
if (h !== undefined) n.length = h;
|
|
2388
2457
|
}
|
|
2389
|
-
notifyStoreProperty(e, t, "set", f);
|
|
2390
|
-
if (Array.isArray(o)) {
|
|
2391
|
-
const
|
|
2392
|
-
|
|
2393
|
-
|
|
2458
|
+
notifyStoreProperty(e, t, "set", l, u, f);
|
|
2459
|
+
if (Array.isArray(o) && t !== "length" && h !== undefined) {
|
|
2460
|
+
const t = getNodes(e, te);
|
|
2461
|
+
if (t.length) {
|
|
2462
|
+
setSignal(t.length, h);
|
|
2463
|
+
} else if (!W && !e[oe]) {
|
|
2464
|
+
const n = upsertStoreNode(e, t, "length", d, e[m]);
|
|
2465
|
+
setSignal(n, h);
|
|
2466
|
+
}
|
|
2394
2467
|
}
|
|
2395
2468
|
if (false);
|
|
2396
2469
|
});
|
|
@@ -2398,11 +2471,11 @@ const le = {
|
|
|
2398
2471
|
return true;
|
|
2399
2472
|
},
|
|
2400
2473
|
defineProperty(e, t, n) {
|
|
2401
|
-
const r = e[
|
|
2474
|
+
const r = e[X];
|
|
2402
2475
|
if (writeOnly(r)) {
|
|
2403
2476
|
untrack(() => {
|
|
2404
2477
|
const { base: i, overrideKey: s } = prepareStoreWrite(e, r, t);
|
|
2405
|
-
const o = "value" in n ? { ...n, value: n.value?.[
|
|
2478
|
+
const o = "value" in n ? { ...n, value: n.value?.[J]?.[Z] ?? n.value } : n;
|
|
2406
2479
|
Object.defineProperty(e[s] || (e[s] = Object.create(null)), t, o);
|
|
2407
2480
|
notifyStoreProperty(e, t, "invalidate");
|
|
2408
2481
|
if (false);
|
|
@@ -2411,31 +2484,31 @@ const le = {
|
|
|
2411
2484
|
return true;
|
|
2412
2485
|
},
|
|
2413
2486
|
deleteProperty(e, t) {
|
|
2414
|
-
const n = e[
|
|
2415
|
-
const r = e[
|
|
2416
|
-
if (writeOnly(e[
|
|
2487
|
+
const n = e[ee]?.[t] === Y;
|
|
2488
|
+
const r = e[$]?.[t] === Y;
|
|
2489
|
+
if (writeOnly(e[X]) && !n && !r) {
|
|
2417
2490
|
untrack(() => {
|
|
2418
|
-
const n = e[
|
|
2419
|
-
const r = n ?
|
|
2420
|
-
if (n) trackOptimisticStore(e[
|
|
2421
|
-
const i = e[
|
|
2422
|
-
if (t in e[
|
|
2423
|
-
(e[r] || (e[r] = Object.create(null)))[t] =
|
|
2491
|
+
const n = e[oe] && !W;
|
|
2492
|
+
const r = n ? ee : $;
|
|
2493
|
+
if (n) trackOptimisticStore(e[X]);
|
|
2494
|
+
const i = e[ee] && t in e[ee] ? e[ee][t] : e[$] && t in e[$] ? e[$][t] : e[Z][t];
|
|
2495
|
+
if (t in e[Z] || (e[$] && t in e[$])) {
|
|
2496
|
+
(e[r] || (e[r] = Object.create(null)))[t] = Y;
|
|
2424
2497
|
} else if (e[r] && t in e[r]) {
|
|
2425
2498
|
delete e[r][t];
|
|
2426
2499
|
} else return true;
|
|
2427
|
-
notifyStoreProperty(e, t, "delete");
|
|
2500
|
+
notifyStoreProperty(e, t, "delete", undefined, i, true);
|
|
2428
2501
|
});
|
|
2429
2502
|
}
|
|
2430
2503
|
return true;
|
|
2431
2504
|
},
|
|
2432
2505
|
ownKeys(e) {
|
|
2433
2506
|
trackSelf(e);
|
|
2434
|
-
let t = getKeys(e[
|
|
2435
|
-
if (e[
|
|
2507
|
+
let t = getKeys(e[Z], e[$], false);
|
|
2508
|
+
if (e[ee]) {
|
|
2436
2509
|
const n = new Set(t);
|
|
2437
|
-
for (const t of Reflect.ownKeys(e[
|
|
2438
|
-
if (e[
|
|
2510
|
+
for (const t of Reflect.ownKeys(e[ee])) {
|
|
2511
|
+
if (e[ee][t] !== Y) n.add(t);
|
|
2439
2512
|
else n.delete(t);
|
|
2440
2513
|
}
|
|
2441
2514
|
t = Array.from(n);
|
|
@@ -2443,27 +2516,27 @@ const le = {
|
|
|
2443
2516
|
return t;
|
|
2444
2517
|
},
|
|
2445
2518
|
getOwnPropertyDescriptor(e, t) {
|
|
2446
|
-
if (t ===
|
|
2447
|
-
if (e[
|
|
2448
|
-
if (e[
|
|
2449
|
-
const n = Reflect.getOwnPropertyDescriptor(e[
|
|
2450
|
-
if (n?.get || n?.set || !(t in e[
|
|
2451
|
-
const r = getPropertyDescriptor(e[
|
|
2519
|
+
if (t === X) return { value: e[X], writable: true, configurable: true };
|
|
2520
|
+
if (e[ee] && t in e[ee]) {
|
|
2521
|
+
if (e[ee][t] === Y) return undefined;
|
|
2522
|
+
const n = Reflect.getOwnPropertyDescriptor(e[ee], t);
|
|
2523
|
+
if (n?.get || n?.set || !(t in e[Z])) return n;
|
|
2524
|
+
const r = getPropertyDescriptor(e[Z], e[$], t);
|
|
2452
2525
|
if (r) {
|
|
2453
|
-
return { ...r, value: e[
|
|
2526
|
+
return { ...r, value: e[ee][t] };
|
|
2454
2527
|
}
|
|
2455
|
-
return { value: e[
|
|
2528
|
+
return { value: e[ee][t], writable: true, enumerable: true, configurable: true };
|
|
2456
2529
|
}
|
|
2457
|
-
return getPropertyDescriptor(e[
|
|
2530
|
+
return getPropertyDescriptor(e[Z], e[$], t);
|
|
2458
2531
|
},
|
|
2459
2532
|
getPrototypeOf(e) {
|
|
2460
|
-
return Object.getPrototypeOf(e[
|
|
2533
|
+
return Object.getPrototypeOf(e[Z]);
|
|
2461
2534
|
}
|
|
2462
2535
|
};
|
|
2463
2536
|
function storeSetter(e, t) {
|
|
2464
|
-
const n =
|
|
2465
|
-
|
|
2466
|
-
|
|
2537
|
+
const n = le;
|
|
2538
|
+
le = new Set();
|
|
2539
|
+
le.add(e);
|
|
2467
2540
|
try {
|
|
2468
2541
|
const n = t(e);
|
|
2469
2542
|
if (n !== e && n !== undefined) {
|
|
@@ -2479,8 +2552,8 @@ function storeSetter(e, t) {
|
|
|
2479
2552
|
}
|
|
2480
2553
|
}
|
|
2481
2554
|
} finally {
|
|
2482
|
-
|
|
2483
|
-
|
|
2555
|
+
le.clear();
|
|
2556
|
+
le = n;
|
|
2484
2557
|
}
|
|
2485
2558
|
}
|
|
2486
2559
|
function createStore(e, t, n) {
|
|
@@ -2489,47 +2562,47 @@ function createStore(e, t, n) {
|
|
|
2489
2562
|
return [i, e => storeSetter(i, e)];
|
|
2490
2563
|
}
|
|
2491
2564
|
function createOptimisticStore(e, t, n) {
|
|
2492
|
-
GlobalQueue.
|
|
2565
|
+
GlobalQueue.le ||= clearOptimisticStore;
|
|
2493
2566
|
const r = typeof e === "function";
|
|
2494
|
-
const i =
|
|
2567
|
+
const i = r ? t : e;
|
|
2495
2568
|
const s = r ? e : undefined;
|
|
2496
2569
|
const { store: o } = createOptimisticProjectionInternal(s, i, n);
|
|
2497
2570
|
return [o, e => storeSetter(o, e)];
|
|
2498
2571
|
}
|
|
2499
2572
|
function clearOptimisticStore(e) {
|
|
2500
|
-
const t = e[
|
|
2501
|
-
if (!t || !t[
|
|
2502
|
-
const n = t[
|
|
2503
|
-
const r = t[
|
|
2573
|
+
const t = e[J];
|
|
2574
|
+
if (!t || !t[ee]) return;
|
|
2575
|
+
const n = t[ee];
|
|
2576
|
+
const r = t[te];
|
|
2504
2577
|
setProjectionWriteActive(true);
|
|
2505
2578
|
try {
|
|
2506
2579
|
if (r) {
|
|
2507
2580
|
for (const e of Reflect.ownKeys(n)) {
|
|
2508
2581
|
if (r[e]) {
|
|
2509
|
-
r[e].
|
|
2510
|
-
const n = t[
|
|
2511
|
-
const i = n ===
|
|
2582
|
+
r[e].ee = undefined;
|
|
2583
|
+
const n = t[$] && e in t[$] ? t[$][e] : t[Z][e];
|
|
2584
|
+
const i = n === Y ? undefined : n;
|
|
2512
2585
|
setSignal(r[e], isWrappable(i) ? wrap(i, t) : i);
|
|
2513
2586
|
}
|
|
2514
2587
|
}
|
|
2515
|
-
if (r[
|
|
2516
|
-
r[
|
|
2517
|
-
setSignal(r[
|
|
2588
|
+
if (r[U]) {
|
|
2589
|
+
r[U].ee = undefined;
|
|
2590
|
+
setSignal(r[U], undefined);
|
|
2518
2591
|
}
|
|
2519
2592
|
}
|
|
2520
2593
|
} finally {
|
|
2521
2594
|
setProjectionWriteActive(false);
|
|
2522
2595
|
}
|
|
2523
|
-
delete t[
|
|
2596
|
+
delete t[ee];
|
|
2524
2597
|
}
|
|
2525
|
-
function createOptimisticProjectionInternal(e, t
|
|
2598
|
+
function createOptimisticProjectionInternal(e, t, n) {
|
|
2526
2599
|
let r;
|
|
2527
2600
|
const i = new WeakMap();
|
|
2528
2601
|
const wrapper = e => {
|
|
2529
|
-
e[
|
|
2530
|
-
e[
|
|
2531
|
-
e[
|
|
2532
|
-
Object.defineProperty(e,
|
|
2602
|
+
e[re] = wrapProjection;
|
|
2603
|
+
e[ie] = i;
|
|
2604
|
+
e[oe] = true;
|
|
2605
|
+
Object.defineProperty(e, se, {
|
|
2533
2606
|
get() {
|
|
2534
2607
|
return r;
|
|
2535
2608
|
},
|
|
@@ -2538,45 +2611,34 @@ function createOptimisticProjectionInternal(e, t = {}, n) {
|
|
|
2538
2611
|
};
|
|
2539
2612
|
const wrapProjection = e => {
|
|
2540
2613
|
if (i.has(e)) return i.get(e);
|
|
2541
|
-
if (e[
|
|
2542
|
-
const t = createStoreProxy(e,
|
|
2614
|
+
if (e[J]?.[re] === wrapProjection) return e;
|
|
2615
|
+
const t = createStoreProxy(e, ce, wrapper);
|
|
2543
2616
|
i.set(e, t);
|
|
2544
2617
|
return t;
|
|
2545
2618
|
};
|
|
2546
2619
|
const s = wrapProjection(t);
|
|
2547
2620
|
if (e) {
|
|
2621
|
+
const wrapCommit = e => {
|
|
2622
|
+
setProjectionWriteActive(true);
|
|
2623
|
+
try {
|
|
2624
|
+
e();
|
|
2625
|
+
} finally {
|
|
2626
|
+
setProjectionWriteActive(false);
|
|
2627
|
+
}
|
|
2628
|
+
};
|
|
2548
2629
|
r = computed(() => {
|
|
2549
|
-
const t = getOwner();
|
|
2550
|
-
let r = false;
|
|
2551
|
-
let i;
|
|
2552
|
-
const o = new Proxy(
|
|
2553
|
-
s,
|
|
2554
|
-
createWriteTraps(() => !r || t.Ce === i)
|
|
2555
|
-
);
|
|
2556
2630
|
setProjectionWriteActive(true);
|
|
2557
2631
|
try {
|
|
2558
|
-
|
|
2559
|
-
i = e(o);
|
|
2560
|
-
r = true;
|
|
2561
|
-
const u = handleAsync(t, i, e => {
|
|
2562
|
-
setProjectionWriteActive(true);
|
|
2563
|
-
try {
|
|
2564
|
-
e !== o && e !== undefined && storeSetter(s, reconcile(e, n?.key || "id"));
|
|
2565
|
-
} finally {
|
|
2566
|
-
setProjectionWriteActive(false);
|
|
2567
|
-
}
|
|
2568
|
-
});
|
|
2569
|
-
u !== o && u !== undefined && reconcile(u, n?.key || "id")(s);
|
|
2570
|
-
});
|
|
2632
|
+
runProjectionComputed(s, e, n?.key || "id", wrapCommit);
|
|
2571
2633
|
} finally {
|
|
2572
2634
|
setProjectionWriteActive(false);
|
|
2573
2635
|
}
|
|
2574
|
-
});
|
|
2575
|
-
r.
|
|
2636
|
+
}, undefined);
|
|
2637
|
+
r.xe = true;
|
|
2576
2638
|
}
|
|
2577
2639
|
return { store: s, node: r };
|
|
2578
2640
|
}
|
|
2579
|
-
const
|
|
2641
|
+
const ae = Symbol(0);
|
|
2580
2642
|
function updatePath(e, t, n = 0) {
|
|
2581
2643
|
let r,
|
|
2582
2644
|
i = e;
|
|
@@ -2620,7 +2682,7 @@ function updatePath(e, t, n = 0) {
|
|
|
2620
2682
|
if (s === i) return;
|
|
2621
2683
|
}
|
|
2622
2684
|
if (r === undefined && s == undefined) return;
|
|
2623
|
-
if (s ===
|
|
2685
|
+
if (s === ae) {
|
|
2624
2686
|
delete e[r];
|
|
2625
2687
|
} else if (r === undefined || (isWrappable(i) && isWrappable(s) && !Array.isArray(s))) {
|
|
2626
2688
|
const t = r !== undefined ? e[r] : e;
|
|
@@ -2635,26 +2697,26 @@ function updatePath(e, t, n = 0) {
|
|
|
2635
2697
|
e[r] = s;
|
|
2636
2698
|
}
|
|
2637
2699
|
}
|
|
2638
|
-
const
|
|
2700
|
+
const de = Object.assign(
|
|
2639
2701
|
function storePath(...e) {
|
|
2640
2702
|
return t => {
|
|
2641
2703
|
updatePath(t, e);
|
|
2642
2704
|
};
|
|
2643
2705
|
},
|
|
2644
|
-
{ DELETE:
|
|
2706
|
+
{ DELETE: ae }
|
|
2645
2707
|
);
|
|
2646
2708
|
function snapshotImpl(e, t, n, r) {
|
|
2647
2709
|
let i, s, o, u, f, l;
|
|
2648
2710
|
if (!isWrappable(e)) return e;
|
|
2649
2711
|
if (n && n.has(e)) return n.get(e);
|
|
2650
2712
|
if (!n) n = new Map();
|
|
2651
|
-
if ((i = e[
|
|
2652
|
-
if (t) trackSelf(i,
|
|
2653
|
-
o = i[
|
|
2654
|
-
s = Array.isArray(i[
|
|
2655
|
-
n.set(e, o ? (u = s ? [] : Object.create(Object.getPrototypeOf(i[
|
|
2656
|
-
e = i[
|
|
2657
|
-
r =
|
|
2713
|
+
if ((i = e[J] || r?.get(e)?.[J])) {
|
|
2714
|
+
if (t) trackSelf(i, U);
|
|
2715
|
+
o = i[$];
|
|
2716
|
+
s = Array.isArray(i[Z]);
|
|
2717
|
+
n.set(e, o ? (u = s ? [] : Object.create(Object.getPrototypeOf(i[Z]))) : i[Z]);
|
|
2718
|
+
e = i[Z];
|
|
2719
|
+
r = ue;
|
|
2658
2720
|
} else {
|
|
2659
2721
|
s = Array.isArray(e);
|
|
2660
2722
|
n.set(e, e);
|
|
@@ -2663,7 +2725,7 @@ function snapshotImpl(e, t, n, r) {
|
|
|
2663
2725
|
const s = o?.length || e.length;
|
|
2664
2726
|
for (let c = 0; c < s; c++) {
|
|
2665
2727
|
l = o && c in o ? o[c] : e[c];
|
|
2666
|
-
if (l ===
|
|
2728
|
+
if (l === Y) continue;
|
|
2667
2729
|
if (t && isWrappable(l)) wrap(l, i);
|
|
2668
2730
|
if ((f = snapshotImpl(l, t, n, r)) !== l || u) {
|
|
2669
2731
|
if (!u) n.set(e, (u = [...e]));
|
|
@@ -2698,13 +2760,13 @@ function deep(e) {
|
|
|
2698
2760
|
function trueFn() {
|
|
2699
2761
|
return true;
|
|
2700
2762
|
}
|
|
2701
|
-
const
|
|
2763
|
+
const he = {
|
|
2702
2764
|
get(e, t, n) {
|
|
2703
|
-
if (t ===
|
|
2765
|
+
if (t === X) return n;
|
|
2704
2766
|
return e.get(t);
|
|
2705
2767
|
},
|
|
2706
2768
|
has(e, t) {
|
|
2707
|
-
if (t ===
|
|
2769
|
+
if (t === X) return true;
|
|
2708
2770
|
return e.has(t);
|
|
2709
2771
|
},
|
|
2710
2772
|
set: trueFn,
|
|
@@ -2727,15 +2789,15 @@ const de = {
|
|
|
2727
2789
|
function resolveSource(e) {
|
|
2728
2790
|
return !(e = typeof e === "function" ? e() : e) ? {} : e;
|
|
2729
2791
|
}
|
|
2730
|
-
const
|
|
2792
|
+
const pe = Symbol(0);
|
|
2731
2793
|
function merge(...e) {
|
|
2732
2794
|
if (e.length === 1 && typeof e[0] !== "function") return e[0];
|
|
2733
2795
|
let t = false;
|
|
2734
2796
|
const n = [];
|
|
2735
2797
|
for (let r = 0; r < e.length; r++) {
|
|
2736
2798
|
const i = e[r];
|
|
2737
|
-
t = t || (!!i &&
|
|
2738
|
-
const s = !!i && i[
|
|
2799
|
+
t = t || (!!i && X in i);
|
|
2800
|
+
const s = !!i && i[pe];
|
|
2739
2801
|
if (s) n.push(...s);
|
|
2740
2802
|
else n.push(typeof i === "function" ? ((t = true), createMemo(i)) : i);
|
|
2741
2803
|
}
|
|
@@ -2743,7 +2805,7 @@ function merge(...e) {
|
|
|
2743
2805
|
return new Proxy(
|
|
2744
2806
|
{
|
|
2745
2807
|
get(e) {
|
|
2746
|
-
if (e ===
|
|
2808
|
+
if (e === pe) return n;
|
|
2747
2809
|
for (let t = n.length - 1; t >= 0; t--) {
|
|
2748
2810
|
const r = resolveSource(n[t]);
|
|
2749
2811
|
if (e in r) return r[e];
|
|
@@ -2761,7 +2823,7 @@ function merge(...e) {
|
|
|
2761
2823
|
return [...new Set(e)];
|
|
2762
2824
|
}
|
|
2763
2825
|
},
|
|
2764
|
-
|
|
2826
|
+
he
|
|
2765
2827
|
);
|
|
2766
2828
|
}
|
|
2767
2829
|
const r = Object.create(null);
|
|
@@ -2793,12 +2855,12 @@ function merge(...e) {
|
|
|
2793
2855
|
if (n.get) Object.defineProperty(o, t, n);
|
|
2794
2856
|
else o[t] = n.value;
|
|
2795
2857
|
}
|
|
2796
|
-
o[
|
|
2858
|
+
o[pe] = n;
|
|
2797
2859
|
return o;
|
|
2798
2860
|
}
|
|
2799
2861
|
function omit(e, ...t) {
|
|
2800
2862
|
const n = new Set(t);
|
|
2801
|
-
if (b &&
|
|
2863
|
+
if (b && X in e) {
|
|
2802
2864
|
return new Proxy(
|
|
2803
2865
|
{
|
|
2804
2866
|
get(t) {
|
|
@@ -2811,7 +2873,7 @@ function omit(e, ...t) {
|
|
|
2811
2873
|
return Object.keys(e).filter(e => !n.has(e));
|
|
2812
2874
|
}
|
|
2813
2875
|
},
|
|
2814
|
-
|
|
2876
|
+
he
|
|
2815
2877
|
);
|
|
2816
2878
|
}
|
|
2817
2879
|
const r = {};
|
|
@@ -2829,7 +2891,7 @@ function mapArray(e, t, n) {
|
|
|
2829
2891
|
const r = typeof n?.keyed === "function" ? n.keyed : undefined;
|
|
2830
2892
|
const i = t.length > 1;
|
|
2831
2893
|
const s = t;
|
|
2832
|
-
|
|
2894
|
+
const o = computed(
|
|
2833
2895
|
updateKeyedMap.bind({
|
|
2834
2896
|
ze: createOwner(),
|
|
2835
2897
|
Ue: 0,
|
|
@@ -2844,25 +2906,27 @@ function mapArray(e, t, n) {
|
|
|
2844
2906
|
rt: n?.fallback
|
|
2845
2907
|
})
|
|
2846
2908
|
);
|
|
2909
|
+
o.xe = true;
|
|
2910
|
+
return accessor(o);
|
|
2847
2911
|
}
|
|
2848
|
-
const
|
|
2912
|
+
const ye = { ownedWrite: true };
|
|
2849
2913
|
function updateKeyedMap() {
|
|
2850
2914
|
const e = this.Je() || [],
|
|
2851
2915
|
t = e.length;
|
|
2852
|
-
e[
|
|
2916
|
+
e[U];
|
|
2853
2917
|
runWithOwner(this.ze, () => {
|
|
2854
2918
|
let n,
|
|
2855
2919
|
r,
|
|
2856
2920
|
i = this.tt
|
|
2857
2921
|
? () => {
|
|
2858
|
-
this.tt[r] = signal(e[r],
|
|
2859
|
-
this.nt && (this.nt[r] = signal(r,
|
|
2922
|
+
this.tt[r] = signal(e[r], ye);
|
|
2923
|
+
this.nt && (this.nt[r] = signal(r, ye));
|
|
2860
2924
|
return this.Ye(accessor(this.tt[r]), this.nt ? accessor(this.nt[r]) : undefined);
|
|
2861
2925
|
}
|
|
2862
2926
|
: this.nt
|
|
2863
2927
|
? () => {
|
|
2864
2928
|
const t = e[r];
|
|
2865
|
-
this.nt[r] = signal(r,
|
|
2929
|
+
this.nt[r] = signal(r, ye);
|
|
2866
2930
|
return this.Ye(() => t, accessor(this.nt[r]));
|
|
2867
2931
|
}
|
|
2868
2932
|
: () => {
|
|
@@ -2967,17 +3031,21 @@ function updateKeyedMap() {
|
|
|
2967
3031
|
}
|
|
2968
3032
|
function repeat(e, t, n) {
|
|
2969
3033
|
const r = t;
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
3034
|
+
const i = computed(
|
|
3035
|
+
updateRepeat.bind({
|
|
3036
|
+
ze: createOwner(),
|
|
3037
|
+
Ue: 0,
|
|
3038
|
+
it: 0,
|
|
3039
|
+
st: e,
|
|
3040
|
+
Ye: r,
|
|
3041
|
+
$e: [],
|
|
3042
|
+
Ze: [],
|
|
3043
|
+
ot: n?.from,
|
|
3044
|
+
rt: n?.fallback
|
|
3045
|
+
})
|
|
3046
|
+
);
|
|
3047
|
+
i.xe = true;
|
|
3048
|
+
return accessor(i);
|
|
2981
3049
|
}
|
|
2982
3050
|
function updateRepeat() {
|
|
2983
3051
|
const e = this.st();
|
|
@@ -3030,37 +3098,41 @@ function compare(e, t, n) {
|
|
|
3030
3098
|
return e ? e(t) === e(n) : true;
|
|
3031
3099
|
}
|
|
3032
3100
|
function boundaryComputed(e, t) {
|
|
3033
|
-
const n = computed(e,
|
|
3101
|
+
const n = computed(e, { lazy: true });
|
|
3034
3102
|
n.Qe = (e, t) => {
|
|
3035
|
-
const r = e !== undefined ? e : n.
|
|
3036
|
-
const i = t !== undefined ? t : n.
|
|
3037
|
-
n.
|
|
3038
|
-
n.
|
|
3103
|
+
const r = e !== undefined ? e : n.ge;
|
|
3104
|
+
const i = t !== undefined ? t : n.de;
|
|
3105
|
+
n.ge &= ~n.ut;
|
|
3106
|
+
n.K.notify(n, n.ut, r, i);
|
|
3039
3107
|
};
|
|
3040
3108
|
n.ut = t;
|
|
3041
|
-
n.
|
|
3109
|
+
n.xe = true;
|
|
3042
3110
|
recompute(n, true);
|
|
3043
3111
|
return n;
|
|
3044
3112
|
}
|
|
3045
3113
|
function createBoundChildren(e, t, n, r) {
|
|
3046
|
-
const i = e.
|
|
3047
|
-
i.addChild((e.
|
|
3048
|
-
cleanup(() => i.removeChild(e.
|
|
3114
|
+
const i = e.K;
|
|
3115
|
+
i.addChild((e.K = n));
|
|
3116
|
+
cleanup(() => i.removeChild(e.K));
|
|
3049
3117
|
return runWithOwner(e, () => {
|
|
3050
3118
|
const e = computed(t);
|
|
3051
3119
|
return boundaryComputed(() => staleValues(() => flatten(read(e))), r);
|
|
3052
3120
|
});
|
|
3053
3121
|
}
|
|
3054
|
-
const
|
|
3055
|
-
const
|
|
3056
|
-
let
|
|
3122
|
+
const ge = Symbol();
|
|
3123
|
+
const Se = createContext(null);
|
|
3124
|
+
let we = false;
|
|
3057
3125
|
const FALSE_ACCESSOR = () => false;
|
|
3126
|
+
const SEQUENTIAL_ACCESSOR = () => "sequential";
|
|
3058
3127
|
function isRevealController(e) {
|
|
3059
3128
|
return e instanceof RevealController;
|
|
3060
3129
|
}
|
|
3061
3130
|
function isSlotReady(e) {
|
|
3062
3131
|
return isRevealController(e) ? e.isReady() : e.ft.size === 0 && !e.lt;
|
|
3063
3132
|
}
|
|
3133
|
+
function isSlotMinimallyReady(e) {
|
|
3134
|
+
return isRevealController(e) ? e.isMinimallyReady() : isSlotReady(e);
|
|
3135
|
+
}
|
|
3064
3136
|
function setSlotState(e, t, n, r) {
|
|
3065
3137
|
setSignal(e.ct, n);
|
|
3066
3138
|
setSignal(e.dt, r);
|
|
@@ -3075,10 +3147,11 @@ class RevealController {
|
|
|
3075
3147
|
wt;
|
|
3076
3148
|
bt = [];
|
|
3077
3149
|
ht;
|
|
3078
|
-
ct = signal(false, {
|
|
3079
|
-
dt = signal(false, {
|
|
3150
|
+
ct = signal(false, { ownedWrite: true, Me: true });
|
|
3151
|
+
dt = signal(false, { ownedWrite: true, Me: true });
|
|
3080
3152
|
_t = true;
|
|
3081
|
-
Ot =
|
|
3153
|
+
Ot = true;
|
|
3154
|
+
vt = false;
|
|
3082
3155
|
constructor(e, t) {
|
|
3083
3156
|
this.St = e;
|
|
3084
3157
|
this.wt = t;
|
|
@@ -3094,11 +3167,33 @@ class RevealController {
|
|
|
3094
3167
|
isReady() {
|
|
3095
3168
|
return this.xt(isSlotReady);
|
|
3096
3169
|
}
|
|
3170
|
+
isMinimallyReady() {
|
|
3171
|
+
const e = untrack(this.St);
|
|
3172
|
+
if (e === "together") return this.isReady();
|
|
3173
|
+
if (e === "natural") {
|
|
3174
|
+
let e = false;
|
|
3175
|
+
let t = false;
|
|
3176
|
+
this.xt(n => {
|
|
3177
|
+
e = true;
|
|
3178
|
+
if (isSlotMinimallyReady(n)) {
|
|
3179
|
+
t = true;
|
|
3180
|
+
return false;
|
|
3181
|
+
}
|
|
3182
|
+
});
|
|
3183
|
+
return !e || t;
|
|
3184
|
+
}
|
|
3185
|
+
let t = true;
|
|
3186
|
+
this.xt(e => {
|
|
3187
|
+
t = isSlotMinimallyReady(e);
|
|
3188
|
+
return false;
|
|
3189
|
+
});
|
|
3190
|
+
return t;
|
|
3191
|
+
}
|
|
3097
3192
|
register(e) {
|
|
3098
3193
|
if (this.bt.includes(e)) return;
|
|
3099
3194
|
this.bt.push(e);
|
|
3100
|
-
const t =
|
|
3101
|
-
setSignal(e.ct, true), setSignal(e.dt, t
|
|
3195
|
+
const t = untrack(this.St);
|
|
3196
|
+
(setSignal(e.ct, true), setSignal(e.dt, t === "sequential" ? !!untrack(this.wt) : false));
|
|
3102
3197
|
untrack(() => this.evaluate());
|
|
3103
3198
|
}
|
|
3104
3199
|
unregister(e) {
|
|
@@ -3107,112 +3202,132 @@ class RevealController {
|
|
|
3107
3202
|
untrack(() => this.evaluate());
|
|
3108
3203
|
}
|
|
3109
3204
|
evaluate(e, t) {
|
|
3110
|
-
if (this.
|
|
3111
|
-
this.
|
|
3205
|
+
if (this.vt) return;
|
|
3206
|
+
this.vt = true;
|
|
3112
3207
|
const n = this._t;
|
|
3208
|
+
const r = this.Ot;
|
|
3113
3209
|
try {
|
|
3114
3210
|
const n = e ?? read(this.ct),
|
|
3115
|
-
r =
|
|
3116
|
-
i =
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3211
|
+
r = untrack(this.St),
|
|
3212
|
+
i = r === "sequential" && !!untrack(this.wt),
|
|
3213
|
+
s = t ?? i;
|
|
3214
|
+
if (n) {
|
|
3215
|
+
this.xt(e => setSlotState(e, this, true, s));
|
|
3216
|
+
} else if (r === "natural") {
|
|
3217
|
+
this.xt(e => {
|
|
3218
|
+
if (isRevealController(e)) {
|
|
3219
|
+
setSignal(e.dt, false);
|
|
3220
|
+
setSignal(e.ct, false);
|
|
3221
|
+
e.evaluate(false, false);
|
|
3222
|
+
} else {
|
|
3223
|
+
setSlotState(e, this, !isSlotReady(e), false);
|
|
3224
|
+
}
|
|
3225
|
+
});
|
|
3226
|
+
} else if (r === "together") {
|
|
3227
|
+
const e = this.xt(isSlotMinimallyReady);
|
|
3120
3228
|
this.xt(t => setSlotState(t, this, !e, false));
|
|
3121
3229
|
} else {
|
|
3122
3230
|
let e = false;
|
|
3123
3231
|
this.xt(t => {
|
|
3124
|
-
if (e) return setSlotState(t, this, true,
|
|
3232
|
+
if (e) return setSlotState(t, this, true, i);
|
|
3125
3233
|
if (isSlotReady(t)) return setSlotState(t, this, false, false);
|
|
3126
3234
|
e = true;
|
|
3127
|
-
|
|
3235
|
+
if (isRevealController(t)) {
|
|
3236
|
+
setSignal(t.dt, false);
|
|
3237
|
+
setSignal(t.ct, false);
|
|
3238
|
+
t.evaluate(false, false);
|
|
3239
|
+
} else {
|
|
3240
|
+
setSlotState(t, this, true, false);
|
|
3241
|
+
}
|
|
3128
3242
|
});
|
|
3129
3243
|
}
|
|
3130
3244
|
} finally {
|
|
3131
3245
|
this._t = this.isReady();
|
|
3132
|
-
this.Ot =
|
|
3246
|
+
this.Ot = this.isMinimallyReady();
|
|
3247
|
+
this.vt = false;
|
|
3133
3248
|
}
|
|
3134
|
-
if (this.ht && n !== this._t) this.ht.evaluate();
|
|
3249
|
+
if (this.ht && (n !== this._t || r !== this.Ot)) this.ht.evaluate();
|
|
3135
3250
|
}
|
|
3136
3251
|
}
|
|
3137
3252
|
class CollectionQueue extends Queue {
|
|
3138
|
-
vt;
|
|
3139
|
-
ft = new Set();
|
|
3140
3253
|
Pt;
|
|
3254
|
+
ft = new Set();
|
|
3255
|
+
kt;
|
|
3141
3256
|
lt = true;
|
|
3142
|
-
ct = signal(false, {
|
|
3143
|
-
dt = signal(false, {
|
|
3257
|
+
ct = signal(false, { ownedWrite: true, Me: true });
|
|
3258
|
+
dt = signal(false, { ownedWrite: true, Me: true });
|
|
3144
3259
|
yt;
|
|
3145
3260
|
gt = false;
|
|
3146
|
-
|
|
3147
|
-
|
|
3261
|
+
Et;
|
|
3262
|
+
Ct = ge;
|
|
3148
3263
|
constructor(e) {
|
|
3149
3264
|
super();
|
|
3150
|
-
this.
|
|
3265
|
+
this.Pt = e;
|
|
3151
3266
|
}
|
|
3152
3267
|
run(e) {
|
|
3153
|
-
if (!e || (read(this.ct) && (!
|
|
3268
|
+
if (!e || (read(this.ct) && (!we || read(this.dt)))) return;
|
|
3154
3269
|
return super.run(e);
|
|
3155
3270
|
}
|
|
3156
3271
|
notify(e, t, n, r) {
|
|
3157
|
-
if (!(t & this.
|
|
3158
|
-
if (this.gt && this.
|
|
3272
|
+
if (!(t & this.Pt)) return super.notify(e, t, n, r);
|
|
3273
|
+
if (this.gt && this.Et) {
|
|
3159
3274
|
const e = untrack(() => {
|
|
3160
3275
|
try {
|
|
3161
|
-
return this.
|
|
3276
|
+
return this.Et();
|
|
3162
3277
|
} catch {
|
|
3163
|
-
return
|
|
3278
|
+
return ge;
|
|
3164
3279
|
}
|
|
3165
3280
|
});
|
|
3166
|
-
if (e !== this.
|
|
3167
|
-
this.
|
|
3281
|
+
if (e !== this.Ct) {
|
|
3282
|
+
this.Ct = e;
|
|
3168
3283
|
this.gt = false;
|
|
3169
3284
|
this.ft.clear();
|
|
3170
3285
|
}
|
|
3171
3286
|
}
|
|
3172
|
-
if (this.
|
|
3173
|
-
if (this.
|
|
3287
|
+
if (this.Pt & a && this.gt) return super.notify(e, t, n, r);
|
|
3288
|
+
if (this.Pt & a && n & d) {
|
|
3174
3289
|
return super.notify(e, d, n, r);
|
|
3175
3290
|
}
|
|
3176
|
-
if (n & this.
|
|
3291
|
+
if (n & this.Pt) {
|
|
3177
3292
|
this.lt = true;
|
|
3178
|
-
const t = r?.source || e.
|
|
3293
|
+
const t = r?.source || e.de?.source;
|
|
3179
3294
|
if (t) {
|
|
3180
3295
|
const e = this.ft.size === 0;
|
|
3181
3296
|
this.ft.add(t);
|
|
3182
3297
|
if (e) setSignal(this.ct, true);
|
|
3183
3298
|
}
|
|
3184
3299
|
}
|
|
3185
|
-
t &= ~this.
|
|
3300
|
+
t &= ~this.Pt;
|
|
3186
3301
|
return t ? super.notify(e, t, n, r) : true;
|
|
3187
3302
|
}
|
|
3188
3303
|
checkSources() {
|
|
3189
3304
|
for (const e of this.ft) {
|
|
3190
|
-
if (e.m & u || (!(e.
|
|
3305
|
+
if (e.m & u || (!(e.ge & this.Pt) && !(this.Pt & d && e.ge & a))) this.ft.delete(e);
|
|
3191
3306
|
}
|
|
3192
3307
|
if (!this.ft.size) {
|
|
3193
|
-
if (this.
|
|
3194
|
-
this.lt = !!(this.
|
|
3308
|
+
if (this.Pt & a && this.lt && !this.gt && this.kt) {
|
|
3309
|
+
this.lt = !!(this.kt.ge & this.Pt);
|
|
3195
3310
|
} else {
|
|
3196
3311
|
this.lt = false;
|
|
3197
3312
|
}
|
|
3198
3313
|
if (!this.lt) {
|
|
3199
3314
|
setSignal(this.ct, false);
|
|
3200
|
-
if (this.
|
|
3315
|
+
if (this.Et) {
|
|
3201
3316
|
try {
|
|
3202
|
-
this.
|
|
3317
|
+
this.Ct = untrack(() => this.Et());
|
|
3203
3318
|
} catch {}
|
|
3204
3319
|
}
|
|
3205
3320
|
}
|
|
3206
3321
|
}
|
|
3207
|
-
if (
|
|
3322
|
+
if (we) this.yt?.evaluate();
|
|
3208
3323
|
}
|
|
3209
3324
|
}
|
|
3210
3325
|
function createCollectionBoundary(e, t, n, r) {
|
|
3211
3326
|
const i = createOwner();
|
|
3212
|
-
if (
|
|
3327
|
+
if (we) setContext(Se, null, i);
|
|
3213
3328
|
const s = new CollectionQueue(e);
|
|
3214
|
-
if (r) s.
|
|
3215
|
-
const o = (s.
|
|
3329
|
+
if (r) s.Et = r;
|
|
3330
|
+
const o = (s.kt = createBoundChildren(i, t, s, e));
|
|
3216
3331
|
untrack(() => {
|
|
3217
3332
|
let t = false;
|
|
3218
3333
|
try {
|
|
@@ -3221,9 +3336,9 @@ function createCollectionBoundary(e, t, n, r) {
|
|
|
3221
3336
|
if (e instanceof NotReadyError) t = true;
|
|
3222
3337
|
else throw e;
|
|
3223
3338
|
}
|
|
3224
|
-
s.lt = t || !!(o.
|
|
3339
|
+
s.lt = t || !!(o.ge & e) || o.de instanceof NotReadyError;
|
|
3225
3340
|
});
|
|
3226
|
-
const u =
|
|
3341
|
+
const u = we && e === a ? getContext(Se) : null;
|
|
3227
3342
|
if (u) {
|
|
3228
3343
|
s.yt = u;
|
|
3229
3344
|
u.register(s);
|
|
@@ -3232,9 +3347,9 @@ function createCollectionBoundary(e, t, n, r) {
|
|
|
3232
3347
|
const f = computed(() => {
|
|
3233
3348
|
if (!read(s.ct)) {
|
|
3234
3349
|
const e = read(o);
|
|
3235
|
-
if (!untrack(() => read(s.ct))) return (s.gt = true), e;
|
|
3350
|
+
if (!untrack(() => read(s.ct))) return ((s.gt = true), e);
|
|
3236
3351
|
}
|
|
3237
|
-
if (
|
|
3352
|
+
if (we && read(s.dt)) return undefined;
|
|
3238
3353
|
return n(s);
|
|
3239
3354
|
});
|
|
3240
3355
|
return accessor(f);
|
|
@@ -3245,7 +3360,7 @@ function createLoadingBoundary(e, t, n) {
|
|
|
3245
3360
|
function createErrorBoundary(e, t) {
|
|
3246
3361
|
return createCollectionBoundary(d, e, e => {
|
|
3247
3362
|
let n = e.ft.values().next().value;
|
|
3248
|
-
const r = n.
|
|
3363
|
+
const r = n.de?.cause ?? n.de;
|
|
3249
3364
|
return t(r, () => {
|
|
3250
3365
|
for (const t of e.ft) recompute(t);
|
|
3251
3366
|
schedule();
|
|
@@ -3253,13 +3368,13 @@ function createErrorBoundary(e, t) {
|
|
|
3253
3368
|
});
|
|
3254
3369
|
}
|
|
3255
3370
|
function createRevealOrder(e, t) {
|
|
3256
|
-
|
|
3371
|
+
we = true;
|
|
3257
3372
|
const n = createOwner();
|
|
3258
|
-
const r = getContext(
|
|
3259
|
-
const i = t?.
|
|
3373
|
+
const r = getContext(Se);
|
|
3374
|
+
const i = t?.order || SEQUENTIAL_ACCESSOR,
|
|
3260
3375
|
s = t?.collapsed || FALSE_ACCESSOR;
|
|
3261
3376
|
const o = new RevealController(i, s);
|
|
3262
|
-
setContext(
|
|
3377
|
+
setContext(Se, o, n);
|
|
3263
3378
|
return runWithOwner(n, () => {
|
|
3264
3379
|
const t = e();
|
|
3265
3380
|
computed(() => {
|
|
@@ -3324,13 +3439,13 @@ function flattenArray(e, t = [], n) {
|
|
|
3324
3439
|
if (r) throw r;
|
|
3325
3440
|
return i;
|
|
3326
3441
|
}
|
|
3327
|
-
const
|
|
3328
|
-
exports.$PROXY =
|
|
3442
|
+
const me = undefined;
|
|
3443
|
+
exports.$PROXY = X;
|
|
3329
3444
|
exports.$REFRESH = O;
|
|
3330
|
-
exports.$TARGET =
|
|
3331
|
-
exports.$TRACK =
|
|
3445
|
+
exports.$TARGET = J;
|
|
3446
|
+
exports.$TRACK = U;
|
|
3332
3447
|
exports.ContextNotFoundError = ContextNotFoundError;
|
|
3333
|
-
exports.DEV =
|
|
3448
|
+
exports.DEV = me;
|
|
3334
3449
|
exports.NoOwnerError = NoOwnerError;
|
|
3335
3450
|
exports.NotReadyError = NotReadyError;
|
|
3336
3451
|
exports.SUPPORTS_PROXY = b;
|
|
@@ -3383,5 +3498,5 @@ exports.runWithOwner = runWithOwner;
|
|
|
3383
3498
|
exports.setContext = setContext;
|
|
3384
3499
|
exports.setSnapshotCapture = setSnapshotCapture;
|
|
3385
3500
|
exports.snapshot = snapshot;
|
|
3386
|
-
exports.storePath =
|
|
3501
|
+
exports.storePath = de;
|
|
3387
3502
|
exports.untrack = untrack;
|