@depup/jotai 2.19.0-depup.0 → 2.19.1-depup.0
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 +2 -2
- package/benchmarks/diamond.d.ts +2 -0
- package/benchmarks/read-write.d.ts +2 -0
- package/benchmarks/run-all.d.ts +2 -0
- package/benchmarks/select-atom.d.ts +2 -0
- package/benchmarks/subscription.d.ts +2 -0
- package/benchmarks/wide-fan-out.d.ts +2 -0
- package/changes.json +1 -1
- package/esm/vanilla/internals.d.mts +5 -2
- package/esm/vanilla/internals.mjs +65 -32
- package/esm/vanilla/utils/atomWithObservable.d.mts +1 -1
- package/package.json +3 -3
- package/system/vanilla/internals.development.js +65 -32
- package/system/vanilla/internals.production.js +1 -1
- package/system/vanilla/utils.production.js +1 -1
- package/ts3.8/benchmarks/diamond.d.ts +3 -0
- package/ts3.8/benchmarks/read-write.d.ts +3 -0
- package/ts3.8/benchmarks/run-all.d.ts +3 -0
- package/ts3.8/benchmarks/select-atom.d.ts +3 -0
- package/ts3.8/benchmarks/subscription.d.ts +3 -0
- package/ts3.8/benchmarks/wide-fan-out.d.ts +3 -0
- package/ts3.8/esm/vanilla/internals.d.ts +4 -1
- package/ts3.8/esm/vanilla/utils/atomWithObservable.d.ts +1 -1
- package/ts3.8/vanilla/internals.d.ts +4 -1
- package/ts3.8/vanilla/utils/atomWithObservable.d.ts +1 -1
- package/umd/vanilla/internals.development.js +102 -69
- package/umd/vanilla/internals.production.js +1 -1
- package/vanilla/internals.d.ts +5 -2
- package/vanilla/internals.js +102 -69
- package/vanilla/utils/atomWithObservable.d.ts +1 -1
- /package/benchmarks/{simple-read.d.ts → atom-creation.d.ts} +0 -0
- /package/benchmarks/{simple-write.d.ts → computed-read.d.ts} +0 -0
- /package/benchmarks/{subscribe-write.d.ts → derived-chain.d.ts} +0 -0
- /package/ts3.8/benchmarks/{simple-read.d.ts → atom-creation.d.ts} +0 -0
- /package/ts3.8/benchmarks/{simple-write.d.ts → computed-read.d.ts} +0 -0
- /package/ts3.8/benchmarks/{subscribe-write.d.ts → derived-chain.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -13,8 +13,8 @@ npm install @depup/jotai
|
|
|
13
13
|
|
|
14
14
|
| Field | Value |
|
|
15
15
|
|-------|-------|
|
|
16
|
-
| Original | [jotai](https://www.npmjs.com/package/jotai) @ 2.19.
|
|
17
|
-
| Processed | 2026-
|
|
16
|
+
| Original | [jotai](https://www.npmjs.com/package/jotai) @ 2.19.1 |
|
|
17
|
+
| Processed | 2026-04-07 |
|
|
18
18
|
| Smoke test | failed |
|
|
19
19
|
| Deps updated | 0 |
|
|
20
20
|
|
package/changes.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Atom, type WritableAtom } from './atom.mjs';
|
|
2
2
|
type AnyValue = unknown;
|
|
3
3
|
type AnyError = unknown;
|
|
4
4
|
type AnyAtom = Atom<AnyValue>;
|
|
5
5
|
type AnyWritableAtom = WritableAtom<AnyValue, unknown[], unknown>;
|
|
6
|
+
type WritableAtomWithOnMount<Value, Args extends unknown[], Result> = Omit<WritableAtom<Value, Args, Result>, 'onMount'> & {
|
|
7
|
+
onMount: NonNullable<WritableAtom<Value, Args, Result>['onMount']>;
|
|
8
|
+
};
|
|
6
9
|
type OnUnmount = () => void;
|
|
7
10
|
type EpochNumber = number;
|
|
8
11
|
/**
|
|
@@ -73,7 +76,7 @@ type Callbacks = SetLike<() => void>;
|
|
|
73
76
|
type AtomRead = <Value>(store: Store, atom: Atom<Value>, ...params: Parameters<Atom<Value>['read']>) => Value;
|
|
74
77
|
type AtomWrite = <Value, Args extends unknown[], Result>(store: Store, atom: WritableAtom<Value, Args, Result>, ...params: Parameters<WritableAtom<Value, Args, Result>['write']>) => Result;
|
|
75
78
|
type AtomOnInit = <Value>(store: Store, atom: Atom<Value>) => void;
|
|
76
|
-
type AtomOnMount = <Value, Args extends unknown[], Result>(store: Store, atom:
|
|
79
|
+
type AtomOnMount = <Value, Args extends unknown[], Result>(store: Store, atom: WritableAtomWithOnMount<Value, Args, Result>, setAtom: (...args: Args) => Result) => OnUnmount | void;
|
|
77
80
|
type EnsureAtomState = <Value>(store: Store, atom: Atom<Value>) => AtomState<Value>;
|
|
78
81
|
type FlushCallbacks = (store: Store) => void;
|
|
79
82
|
type RecomputeInvalidatedAtoms = (store: Store) => void;
|
|
@@ -4,6 +4,9 @@ function hasInitialValue(atom) {
|
|
|
4
4
|
function isActuallyWritableAtom(atom) {
|
|
5
5
|
return !!atom.write;
|
|
6
6
|
}
|
|
7
|
+
function hasOnMount(atom) {
|
|
8
|
+
return !!atom.onMount;
|
|
9
|
+
}
|
|
7
10
|
function isAtomStateInitialized(atomState) {
|
|
8
11
|
return "v" in atomState || "e" in atomState;
|
|
9
12
|
}
|
|
@@ -27,13 +30,18 @@ function addPendingPromiseToDependency(atom, promise, dependencyAtomState) {
|
|
|
27
30
|
}
|
|
28
31
|
}
|
|
29
32
|
function getMountedOrPendingDependents(atom, atomState, mountedMap) {
|
|
30
|
-
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
const mounted = mountedMap.get(atom);
|
|
34
|
+
const mountedDependents = mounted == null ? void 0 : mounted.t;
|
|
35
|
+
const pendingDependents = atomState.p;
|
|
36
|
+
if (!(mountedDependents == null ? void 0 : mountedDependents.size)) {
|
|
37
|
+
return pendingDependents;
|
|
38
|
+
}
|
|
39
|
+
if (!pendingDependents.size) {
|
|
40
|
+
return mountedDependents;
|
|
34
41
|
}
|
|
35
|
-
|
|
36
|
-
|
|
42
|
+
const dependents = new Set(mountedDependents);
|
|
43
|
+
for (const a of pendingDependents) {
|
|
44
|
+
dependents.add(a);
|
|
37
45
|
}
|
|
38
46
|
return dependents;
|
|
39
47
|
}
|
|
@@ -109,6 +117,7 @@ const BUILDING_BLOCK_ensureAtomState = (store, atom) => {
|
|
|
109
117
|
return atomState;
|
|
110
118
|
};
|
|
111
119
|
const BUILDING_BLOCK_flushCallbacks = (store) => {
|
|
120
|
+
var _a;
|
|
112
121
|
const buildingBlocks = getInternalBuildingBlocks(store);
|
|
113
122
|
const mountedMap = buildingBlocks[1];
|
|
114
123
|
const changedAtoms = buildingBlocks[3];
|
|
@@ -116,6 +125,9 @@ const BUILDING_BLOCK_flushCallbacks = (store) => {
|
|
|
116
125
|
const unmountCallbacks = buildingBlocks[5];
|
|
117
126
|
const storeHooks = buildingBlocks[6];
|
|
118
127
|
const recomputeInvalidatedAtoms = buildingBlocks[13];
|
|
128
|
+
if (!storeHooks.f && !changedAtoms.size && !mountCallbacks.size && !unmountCallbacks.size) {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
119
131
|
const errors = [];
|
|
120
132
|
const call = (fn) => {
|
|
121
133
|
try {
|
|
@@ -129,17 +141,26 @@ const BUILDING_BLOCK_flushCallbacks = (store) => {
|
|
|
129
141
|
call(storeHooks.f);
|
|
130
142
|
}
|
|
131
143
|
const callbacks = /* @__PURE__ */ new Set();
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
144
|
+
for (const atom of changedAtoms) {
|
|
145
|
+
const listeners = (_a = mountedMap.get(atom)) == null ? void 0 : _a.l;
|
|
146
|
+
if (listeners) {
|
|
147
|
+
for (const listener of listeners) {
|
|
148
|
+
callbacks.add(listener);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
137
152
|
changedAtoms.clear();
|
|
138
|
-
unmountCallbacks
|
|
153
|
+
for (const fn of unmountCallbacks) {
|
|
154
|
+
callbacks.add(fn);
|
|
155
|
+
}
|
|
139
156
|
unmountCallbacks.clear();
|
|
140
|
-
mountCallbacks
|
|
157
|
+
for (const fn of mountCallbacks) {
|
|
158
|
+
callbacks.add(fn);
|
|
159
|
+
}
|
|
141
160
|
mountCallbacks.clear();
|
|
142
|
-
callbacks
|
|
161
|
+
for (const fn of callbacks) {
|
|
162
|
+
call(fn);
|
|
163
|
+
}
|
|
143
164
|
if (changedAtoms.size) {
|
|
144
165
|
recomputeInvalidatedAtoms(store);
|
|
145
166
|
}
|
|
@@ -156,36 +177,51 @@ const BUILDING_BLOCK_recomputeInvalidatedAtoms = (store) => {
|
|
|
156
177
|
const ensureAtomState = buildingBlocks[11];
|
|
157
178
|
const readAtomState = buildingBlocks[14];
|
|
158
179
|
const mountDependencies = buildingBlocks[17];
|
|
159
|
-
|
|
180
|
+
if (!changedAtoms.size) {
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
const sortedReversedAtoms = [];
|
|
184
|
+
const sortedReversedStates = [];
|
|
160
185
|
const visiting = /* @__PURE__ */ new WeakSet();
|
|
161
186
|
const visited = /* @__PURE__ */ new WeakSet();
|
|
162
|
-
const
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
187
|
+
const stackAtoms = [];
|
|
188
|
+
const stackStates = [];
|
|
189
|
+
for (const atom of changedAtoms) {
|
|
190
|
+
stackAtoms.push(atom);
|
|
191
|
+
stackStates.push(ensureAtomState(store, atom));
|
|
192
|
+
}
|
|
193
|
+
while (stackAtoms.length) {
|
|
194
|
+
const top = stackAtoms.length - 1;
|
|
195
|
+
const a = stackAtoms[top];
|
|
196
|
+
const aState = stackStates[top];
|
|
166
197
|
if (visited.has(a)) {
|
|
167
|
-
|
|
198
|
+
stackAtoms.pop();
|
|
199
|
+
stackStates.pop();
|
|
168
200
|
continue;
|
|
169
201
|
}
|
|
170
202
|
if (visiting.has(a)) {
|
|
171
203
|
if (invalidatedAtoms.get(a) === aState.n) {
|
|
172
|
-
|
|
204
|
+
sortedReversedAtoms.push(a);
|
|
205
|
+
sortedReversedStates.push(aState);
|
|
173
206
|
} else if ((import.meta.env ? import.meta.env.MODE : void 0) !== "production" && invalidatedAtoms.has(a)) {
|
|
174
207
|
throw new Error("[Bug] invalidated atom exists");
|
|
175
208
|
}
|
|
176
209
|
visited.add(a);
|
|
177
|
-
|
|
210
|
+
stackAtoms.pop();
|
|
211
|
+
stackStates.pop();
|
|
178
212
|
continue;
|
|
179
213
|
}
|
|
180
214
|
visiting.add(a);
|
|
181
215
|
for (const d of getMountedOrPendingDependents(a, aState, mountedMap)) {
|
|
182
216
|
if (!visiting.has(d)) {
|
|
183
|
-
|
|
217
|
+
stackAtoms.push(d);
|
|
218
|
+
stackStates.push(ensureAtomState(store, d));
|
|
184
219
|
}
|
|
185
220
|
}
|
|
186
221
|
}
|
|
187
|
-
for (let i =
|
|
188
|
-
const
|
|
222
|
+
for (let i = sortedReversedAtoms.length - 1; i >= 0; --i) {
|
|
223
|
+
const a = sortedReversedAtoms[i];
|
|
224
|
+
const aState = sortedReversedStates[i];
|
|
189
225
|
let hasChangedDeps = false;
|
|
190
226
|
for (const dep of aState.d.keys()) {
|
|
191
227
|
if (dep !== a && changedAtoms.has(dep)) {
|
|
@@ -247,12 +283,9 @@ const BUILDING_BLOCK_readAtomState = (store, atom) => {
|
|
|
247
283
|
}
|
|
248
284
|
let isSync = true;
|
|
249
285
|
const prevDeps = new Set(atomState.d.keys());
|
|
250
|
-
const nextDeps = /* @__PURE__ */ new Map();
|
|
251
286
|
const pruneDependencies = () => {
|
|
252
287
|
for (const a of prevDeps) {
|
|
253
|
-
|
|
254
|
-
atomState.d.delete(a);
|
|
255
|
-
}
|
|
288
|
+
atomState.d.delete(a);
|
|
256
289
|
}
|
|
257
290
|
};
|
|
258
291
|
const mountDependenciesIfAsync = () => {
|
|
@@ -282,7 +315,7 @@ const BUILDING_BLOCK_readAtomState = (store, atom) => {
|
|
|
282
315
|
try {
|
|
283
316
|
return returnAtomValue(aState);
|
|
284
317
|
} finally {
|
|
285
|
-
|
|
318
|
+
prevDeps.delete(a);
|
|
286
319
|
atomState.d.set(a, aState.n);
|
|
287
320
|
if (isPromiseLike(atomState.v)) {
|
|
288
321
|
addPendingPromiseToDependency(atom, atomState.v, aState);
|
|
@@ -456,7 +489,7 @@ const BUILDING_BLOCK_mountDependencies = (store, atom) => {
|
|
|
456
489
|
const unmountAtom = buildingBlocks[19];
|
|
457
490
|
const atomState = ensureAtomState(store, atom);
|
|
458
491
|
const mounted = mountedMap.get(atom);
|
|
459
|
-
if (mounted) {
|
|
492
|
+
if (mounted && atomState.d.size > 0) {
|
|
460
493
|
for (const [a, n] of atomState.d) {
|
|
461
494
|
if (!mounted.d.has(a)) {
|
|
462
495
|
const aState = ensureAtomState(store, a);
|
|
@@ -506,7 +539,7 @@ const BUILDING_BLOCK_mountAtom = (store, atom) => {
|
|
|
506
539
|
t: /* @__PURE__ */ new Set()
|
|
507
540
|
};
|
|
508
541
|
mountedMap.set(atom, mounted);
|
|
509
|
-
if (isActuallyWritableAtom(atom)) {
|
|
542
|
+
if (isActuallyWritableAtom(atom) && hasOnMount(atom)) {
|
|
510
543
|
const processOnMount = () => {
|
|
511
544
|
let isSync = true;
|
|
512
545
|
const setAtom = (...args) => {
|
|
@@ -17,7 +17,7 @@ type SubscribableObservable<T> = {
|
|
|
17
17
|
subscribe(next: (value: T) => void): Subscription;
|
|
18
18
|
};
|
|
19
19
|
type SymbolObservable<T> = {
|
|
20
|
-
[
|
|
20
|
+
[key: symbol]: () => SubscribableObservable<T>;
|
|
21
21
|
};
|
|
22
22
|
type ObservableLike<T> = SubscribableObservable<T> | SymbolObservable<T>;
|
|
23
23
|
type SubjectLike<T> = ObservableLike<T> & Observer<T>;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@depup/jotai",
|
|
3
3
|
"description": "👻 Primitive and flexible state management for React (with updated dependencies)",
|
|
4
4
|
"type": "commonjs",
|
|
5
|
-
"version": "2.19.
|
|
5
|
+
"version": "2.19.1-depup.0",
|
|
6
6
|
"main": "./index.js",
|
|
7
7
|
"types": "./index.d.ts",
|
|
8
8
|
"typesVersions": {
|
|
@@ -121,8 +121,8 @@
|
|
|
121
121
|
"changes": {},
|
|
122
122
|
"depsUpdated": 0,
|
|
123
123
|
"originalPackage": "jotai",
|
|
124
|
-
"originalVersion": "2.19.
|
|
125
|
-
"processedAt": "2026-
|
|
124
|
+
"originalVersion": "2.19.1",
|
|
125
|
+
"processedAt": "2026-04-07T16:33:28.631Z",
|
|
126
126
|
"smokeTest": "failed"
|
|
127
127
|
}
|
|
128
128
|
}
|
|
@@ -22,6 +22,9 @@ System.register([], (function (exports) {
|
|
|
22
22
|
function isActuallyWritableAtom(atom) {
|
|
23
23
|
return !!atom.write;
|
|
24
24
|
}
|
|
25
|
+
function hasOnMount(atom) {
|
|
26
|
+
return !!atom.onMount;
|
|
27
|
+
}
|
|
25
28
|
function isAtomStateInitialized(atomState) {
|
|
26
29
|
return "v" in atomState || "e" in atomState;
|
|
27
30
|
}
|
|
@@ -45,13 +48,18 @@ System.register([], (function (exports) {
|
|
|
45
48
|
}
|
|
46
49
|
}
|
|
47
50
|
function getMountedOrPendingDependents(atom, atomState, mountedMap) {
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
const mounted = mountedMap.get(atom);
|
|
52
|
+
const mountedDependents = mounted == null ? void 0 : mounted.t;
|
|
53
|
+
const pendingDependents = atomState.p;
|
|
54
|
+
if (!(mountedDependents == null ? void 0 : mountedDependents.size)) {
|
|
55
|
+
return pendingDependents;
|
|
56
|
+
}
|
|
57
|
+
if (!pendingDependents.size) {
|
|
58
|
+
return mountedDependents;
|
|
52
59
|
}
|
|
53
|
-
|
|
54
|
-
|
|
60
|
+
const dependents = new Set(mountedDependents);
|
|
61
|
+
for (const a of pendingDependents) {
|
|
62
|
+
dependents.add(a);
|
|
55
63
|
}
|
|
56
64
|
return dependents;
|
|
57
65
|
}
|
|
@@ -127,6 +135,7 @@ System.register([], (function (exports) {
|
|
|
127
135
|
return atomState;
|
|
128
136
|
};
|
|
129
137
|
const BUILDING_BLOCK_flushCallbacks = (store) => {
|
|
138
|
+
var _a;
|
|
130
139
|
const buildingBlocks = getInternalBuildingBlocks(store);
|
|
131
140
|
const mountedMap = buildingBlocks[1];
|
|
132
141
|
const changedAtoms = buildingBlocks[3];
|
|
@@ -134,6 +143,9 @@ System.register([], (function (exports) {
|
|
|
134
143
|
const unmountCallbacks = buildingBlocks[5];
|
|
135
144
|
const storeHooks = buildingBlocks[6];
|
|
136
145
|
const recomputeInvalidatedAtoms = buildingBlocks[13];
|
|
146
|
+
if (!storeHooks.f && !changedAtoms.size && !mountCallbacks.size && !unmountCallbacks.size) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
137
149
|
const errors = [];
|
|
138
150
|
const call = (fn) => {
|
|
139
151
|
try {
|
|
@@ -147,17 +159,26 @@ System.register([], (function (exports) {
|
|
|
147
159
|
call(storeHooks.f);
|
|
148
160
|
}
|
|
149
161
|
const callbacks = /* @__PURE__ */ new Set();
|
|
150
|
-
const
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
162
|
+
for (const atom of changedAtoms) {
|
|
163
|
+
const listeners = (_a = mountedMap.get(atom)) == null ? void 0 : _a.l;
|
|
164
|
+
if (listeners) {
|
|
165
|
+
for (const listener of listeners) {
|
|
166
|
+
callbacks.add(listener);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
155
170
|
changedAtoms.clear();
|
|
156
|
-
unmountCallbacks
|
|
171
|
+
for (const fn of unmountCallbacks) {
|
|
172
|
+
callbacks.add(fn);
|
|
173
|
+
}
|
|
157
174
|
unmountCallbacks.clear();
|
|
158
|
-
mountCallbacks
|
|
175
|
+
for (const fn of mountCallbacks) {
|
|
176
|
+
callbacks.add(fn);
|
|
177
|
+
}
|
|
159
178
|
mountCallbacks.clear();
|
|
160
|
-
callbacks
|
|
179
|
+
for (const fn of callbacks) {
|
|
180
|
+
call(fn);
|
|
181
|
+
}
|
|
161
182
|
if (changedAtoms.size) {
|
|
162
183
|
recomputeInvalidatedAtoms(store);
|
|
163
184
|
}
|
|
@@ -174,36 +195,51 @@ System.register([], (function (exports) {
|
|
|
174
195
|
const ensureAtomState = buildingBlocks[11];
|
|
175
196
|
const readAtomState = buildingBlocks[14];
|
|
176
197
|
const mountDependencies = buildingBlocks[17];
|
|
177
|
-
|
|
198
|
+
if (!changedAtoms.size) {
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
const sortedReversedAtoms = [];
|
|
202
|
+
const sortedReversedStates = [];
|
|
178
203
|
const visiting = /* @__PURE__ */ new WeakSet();
|
|
179
204
|
const visited = /* @__PURE__ */ new WeakSet();
|
|
180
|
-
const
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
205
|
+
const stackAtoms = [];
|
|
206
|
+
const stackStates = [];
|
|
207
|
+
for (const atom of changedAtoms) {
|
|
208
|
+
stackAtoms.push(atom);
|
|
209
|
+
stackStates.push(ensureAtomState(store, atom));
|
|
210
|
+
}
|
|
211
|
+
while (stackAtoms.length) {
|
|
212
|
+
const top = stackAtoms.length - 1;
|
|
213
|
+
const a = stackAtoms[top];
|
|
214
|
+
const aState = stackStates[top];
|
|
184
215
|
if (visited.has(a)) {
|
|
185
|
-
|
|
216
|
+
stackAtoms.pop();
|
|
217
|
+
stackStates.pop();
|
|
186
218
|
continue;
|
|
187
219
|
}
|
|
188
220
|
if (visiting.has(a)) {
|
|
189
221
|
if (invalidatedAtoms.get(a) === aState.n) {
|
|
190
|
-
|
|
222
|
+
sortedReversedAtoms.push(a);
|
|
223
|
+
sortedReversedStates.push(aState);
|
|
191
224
|
} else if (invalidatedAtoms.has(a)) {
|
|
192
225
|
throw new Error("[Bug] invalidated atom exists");
|
|
193
226
|
}
|
|
194
227
|
visited.add(a);
|
|
195
|
-
|
|
228
|
+
stackAtoms.pop();
|
|
229
|
+
stackStates.pop();
|
|
196
230
|
continue;
|
|
197
231
|
}
|
|
198
232
|
visiting.add(a);
|
|
199
233
|
for (const d of getMountedOrPendingDependents(a, aState, mountedMap)) {
|
|
200
234
|
if (!visiting.has(d)) {
|
|
201
|
-
|
|
235
|
+
stackAtoms.push(d);
|
|
236
|
+
stackStates.push(ensureAtomState(store, d));
|
|
202
237
|
}
|
|
203
238
|
}
|
|
204
239
|
}
|
|
205
|
-
for (let i =
|
|
206
|
-
const
|
|
240
|
+
for (let i = sortedReversedAtoms.length - 1; i >= 0; --i) {
|
|
241
|
+
const a = sortedReversedAtoms[i];
|
|
242
|
+
const aState = sortedReversedStates[i];
|
|
207
243
|
let hasChangedDeps = false;
|
|
208
244
|
for (const dep of aState.d.keys()) {
|
|
209
245
|
if (dep !== a && changedAtoms.has(dep)) {
|
|
@@ -265,12 +301,9 @@ System.register([], (function (exports) {
|
|
|
265
301
|
}
|
|
266
302
|
let isSync = true;
|
|
267
303
|
const prevDeps = new Set(atomState.d.keys());
|
|
268
|
-
const nextDeps = /* @__PURE__ */ new Map();
|
|
269
304
|
const pruneDependencies = () => {
|
|
270
305
|
for (const a of prevDeps) {
|
|
271
|
-
|
|
272
|
-
atomState.d.delete(a);
|
|
273
|
-
}
|
|
306
|
+
atomState.d.delete(a);
|
|
274
307
|
}
|
|
275
308
|
};
|
|
276
309
|
const mountDependenciesIfAsync = () => {
|
|
@@ -300,7 +333,7 @@ System.register([], (function (exports) {
|
|
|
300
333
|
try {
|
|
301
334
|
return returnAtomValue(aState);
|
|
302
335
|
} finally {
|
|
303
|
-
|
|
336
|
+
prevDeps.delete(a);
|
|
304
337
|
atomState.d.set(a, aState.n);
|
|
305
338
|
if (isPromiseLike(atomState.v)) {
|
|
306
339
|
addPendingPromiseToDependency(atom, atomState.v, aState);
|
|
@@ -474,7 +507,7 @@ System.register([], (function (exports) {
|
|
|
474
507
|
const unmountAtom = buildingBlocks[19];
|
|
475
508
|
const atomState = ensureAtomState(store, atom);
|
|
476
509
|
const mounted = mountedMap.get(atom);
|
|
477
|
-
if (mounted) {
|
|
510
|
+
if (mounted && atomState.d.size > 0) {
|
|
478
511
|
for (const [a, n] of atomState.d) {
|
|
479
512
|
if (!mounted.d.has(a)) {
|
|
480
513
|
const aState = ensureAtomState(store, a);
|
|
@@ -524,7 +557,7 @@ System.register([], (function (exports) {
|
|
|
524
557
|
t: /* @__PURE__ */ new Set()
|
|
525
558
|
};
|
|
526
559
|
mountedMap.set(atom, mounted);
|
|
527
|
-
if (isActuallyWritableAtom(atom)) {
|
|
560
|
+
if (isActuallyWritableAtom(atom) && hasOnMount(atom)) {
|
|
528
561
|
const processOnMount = () => {
|
|
529
562
|
let isSync = true;
|
|
530
563
|
const setAtom = (...args) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register([],(function(
|
|
1
|
+
System.register([],(function(H){"use strict";return{execute:(function(){H({INTERNAL_addPendingPromiseToDependency:j,INTERNAL_buildStoreRev2:hn,INTERNAL_getBuildingBlocksRev2:dn,INTERNAL_getMountedOrPendingDependents:D,INTERNAL_hasInitialValue:b,INTERNAL_initializeStoreHooksRev2:G,INTERNAL_isActuallyWritableAtom:P,INTERNAL_isAtomStateInitialized:O,INTERNAL_isPromiseLike:S,INTERNAL_returnAtomValue:I});function b(n){return"init"in n}function P(n){return!!n.write}function q(n){return!!n.onMount}function O(n){return"v"in n||"e"in n}function I(n){if("e"in n)throw n.e;return n.v}function S(n){return typeof(n==null?void 0:n.then)=="function"}function j(n,e,r){if(!r.p.has(n)){r.p.add(n);const t=()=>r.p.delete(n);e.then(t,t)}}function D(n,e,r){const t=r.get(n),o=t==null?void 0:t.t,s=e.p;if(!(o!=null&&o.size))return s;if(!s.size)return o;const l=new Set(o);for(const a of s)l.add(a);return l}const F=()=>{const n=new Set,e=()=>n.forEach(r=>r());return e.add=r=>(n.add(r),()=>n.delete(r)),e},R=()=>{const n={},e=new WeakMap,r=t=>{var o,s;(o=e.get(n))==null||o.forEach(l=>l(t)),(s=e.get(t))==null||s.forEach(l=>l())};return r.add=(t,o)=>{const s=t||n;let l=e.get(s);return l||(l=new Set,e.set(s,l)),l.add(o),()=>{l.delete(o),l.size||e.delete(s)}},r};function G(n){return n.i||(n.i=R()),n.r||(n.r=R()),n.c||(n.c=R()),n.m||(n.m=R()),n.u||(n.u=R()),n.f||(n.f=F()),n}const J=(n,e,...r)=>e.read(...r),K=(n,e,...r)=>e.write(...r),Q=(n,e)=>{var r;return(r=e.INTERNAL_onInit)==null?void 0:r.call(e,n)},U=(n,e,r)=>{var t;return(t=e.onMount)==null?void 0:t.call(e,r)},X=(n,e)=>{var r;const t=v(n),o=t[0],s=t[6],l=t[9];let a=o.get(e);return a||(a={d:new Map,p:new Set,n:0},o.set(e,a),(r=s.i)==null||r.call(s,e),l==null||l(n,e)),a},Y=n=>{var e;const r=v(n),t=r[1],o=r[3],s=r[4],l=r[5],a=r[6],h=r[13];if(!a.f&&!o.size&&!s.size&&!l.size)return;const w=[],y=f=>{try{f()}catch(c){w.push(c)}};do{a.f&&y(a.f);const f=new Set;for(const c of o){const u=(e=t.get(c))==null?void 0:e.l;if(u)for(const d of u)f.add(d)}o.clear();for(const c of l)f.add(c);l.clear();for(const c of s)f.add(c);s.clear();for(const c of f)y(c);o.size&&h(n)}while(o.size||l.size||s.size);if(w.length)throw new AggregateError(w)},Z=n=>{const e=v(n),r=e[1],t=e[2],o=e[3],s=e[11],l=e[14],a=e[17];if(!o.size)return;const h=[],w=[],y=new WeakSet,f=new WeakSet,c=[],u=[];for(const d of o)c.push(d),u.push(s(n,d));for(;c.length;){const d=c.length-1,p=c[d],m=u[d];if(f.has(p)){c.pop(),u.pop();continue}if(y.has(p)){t.get(p)===m.n&&(h.push(p),w.push(m)),f.add(p),c.pop(),u.pop();continue}y.add(p);for(const A of D(p,m,r))y.has(A)||(c.push(A),u.push(s(n,A)))}for(let d=h.length-1;d>=0;--d){const p=h[d],m=w[d];let A=!1;for(const k of m.d.keys())if(k!==p&&o.has(k)){A=!0;break}A&&(t.set(p,m.n),l(n,p),a(n,p)),t.delete(p)}},$=(n,e)=>{var r,t;const o=v(n),s=o[1],l=o[2],a=o[3],h=o[6],w=o[7],y=o[11],f=o[12],c=o[13],u=o[14],d=o[16],p=o[17],m=o[20],A=o[26],k=o[28],i=y(n,e),N=k[0];if(O(i)){if(s.has(e)&&l.get(e)!==i.n||i.m===N)return i.m=N,i;let g=!1;for(const[z,_]of i.d)if(u(n,z).n!==_){g=!0;break}if(!g)return i.m=N,i}let E=!0;const L=new Set(i.d.keys()),M=()=>{for(const g of L)i.d.delete(g)},W=()=>{if(s.has(e)){const g=!a.size;p(n,e),g&&(c(n),f(n))}},pn=g=>{var z;if(g===e){const C=y(n,g);if(!O(C))if(b(g))m(n,g,g.init);else throw new Error("no atom init");return I(C)}const _=u(n,g);try{return I(_)}finally{L.delete(g),i.d.set(g,_.n),S(i.v)&&j(e,i.v,_),s.has(e)&&((z=s.get(g))==null||z.t.add(e)),E||W()}};let T,V;const gn={get signal(){return T||(T=new AbortController),T.signal},get setSelf(){return!V&&P(e)&&(V=(...g)=>{if(!E)try{return d(n,e,...g)}finally{c(n),f(n)}}),V}},B=i.n,wn=l.get(e)===B;try{const g=w(n,e,pn,gn);if(m(n,e,g),S(g)){A(n,g,()=>T==null?void 0:T.abort());const z=()=>{M(),W()};g.then(z,z)}else M();return(r=h.r)==null||r.call(h,e),i.m=N,i}catch(g){return delete i.v,i.e=g,++i.n,i.m=N,i}finally{E=!1,i.n!==B&&wn&&(l.set(e,i.n),a.add(e),(t=h.c)==null||t.call(h,e))}},nn=(n,e)=>{const r=v(n),t=r[1],o=r[2],s=r[11],l=[e];for(;l.length;){const a=l.pop(),h=s(n,a);for(const w of D(a,h,t)){const y=s(n,w);o.get(w)!==y.n&&(o.set(w,y.n),l.push(w))}}},en=(n,e,...r)=>{const t=v(n),o=t[3],s=t[6],l=t[8],a=t[11],h=t[12],w=t[13],y=t[14],f=t[15],c=t[16],u=t[17],d=t[20],p=t[28];let m=!0;const A=i=>I(y(n,i)),k=(i,...N)=>{var E;const L=a(n,i);try{if(i===e){if(!b(i))throw new Error("atom not writable");const M=L.n,W=N[0];d(n,i,W),u(n,i),M!==L.n&&(++p[0],o.add(i),f(n,i),(E=s.c)==null||E.call(s,i));return}else return c(n,i,...N)}finally{m||(w(n),h(n))}};try{return l(n,e,A,k,...r)}finally{m=!1}},tn=(n,e)=>{var r;const t=v(n),o=t[1],s=t[3],l=t[6],a=t[11],h=t[15],w=t[18],y=t[19],f=a(n,e),c=o.get(e);if(c&&f.d.size>0){for(const[u,d]of f.d)if(!c.d.has(u)){const p=a(n,u);w(n,u).t.add(e),c.d.add(u),d!==p.n&&(s.add(u),h(n,u),(r=l.c)==null||r.call(l,u))}for(const u of c.d)if(!f.d.has(u)){c.d.delete(u);const d=y(n,u);d==null||d.t.delete(e)}}},on=(n,e)=>{var r;const t=v(n),o=t[1],s=t[4],l=t[6],a=t[10],h=t[11],w=t[12],y=t[13],f=t[14],c=t[16],u=t[18],d=h(n,e);let p=o.get(e);if(!p){f(n,e);for(const m of d.d.keys())u(n,m).t.add(e);if(p={l:new Set,d:new Set(d.d.keys()),t:new Set},o.set(e,p),P(e)&&q(e)){const m=()=>{let A=!0;const k=(...i)=>{try{return c(n,e,...i)}finally{A||(y(n),w(n))}};try{const i=a(n,e,k);i&&(p.u=()=>{A=!0;try{i()}finally{A=!1}})}finally{A=!1}};s.add(m)}(r=l.m)==null||r.call(l,e)}return p},rn=(n,e)=>{var r,t;const o=v(n),s=o[1],l=o[5],a=o[6],h=o[11],w=o[19],y=h(n,e);let f=s.get(e);if(!f||f.l.size)return f;let c=!1;for(const u of f.t)if((r=s.get(u))!=null&&r.d.has(e)){c=!0;break}if(!c){f.u&&l.add(f.u),f=void 0,s.delete(e);for(const u of y.d.keys()){const d=w(n,u);d==null||d.t.delete(e)}(t=a.u)==null||t.call(a,e);return}return f},sn=(n,e,r)=>{const t=v(n),o=t[11],s=t[27],l=o(n,e),a="v"in l,h=l.v;if(S(r))for(const w of l.d.keys())j(e,r,o(n,w));l.v=r,delete l.e,(!a||!Object.is(h,l.v))&&(++l.n,S(h)&&s(n,h))},ln=(n,e)=>{const r=v(n)[14];return I(r(n,e))},an=(n,e,...r)=>{const t=v(n),o=t[3],s=t[12],l=t[13],a=t[16],h=o.size;try{return a(n,e,...r)}finally{o.size!==h&&(l(n),s(n))}},cn=(n,e,r)=>{const t=v(n),o=t[12],s=t[18],l=t[19],a=s(n,e).l;return a.add(r),o(n),()=>{a.delete(r),l(n,e),o(n)}},un=(n,e,r)=>{const t=v(n)[25];let o=t.get(e);if(!o){o=new Set,t.set(e,o);const s=()=>t.delete(e);e.then(s,s)}o.add(r)},fn=(n,e)=>{const r=v(n)[25].get(e);r==null||r.forEach(t=>t())},x=new WeakMap,v=n=>x.get(n);function dn(n){const e=v(n),r=e[24];return r?r(e):e}function hn(...n){const e={get(t){const o=v(e)[21];return o(e,t)},set(t,...o){const s=v(e)[22];return s(e,t,...o)},sub(t,o){const s=v(e)[23];return s(e,t,o)}},r=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},J,K,Q,U,X,Y,Z,$,nn,en,tn,on,rn,sn,ln,an,cn,void 0,new WeakMap,un,fn,[0]].map((t,o)=>n[o]||t);return x.set(e,Object.freeze(r)),e}})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["jotai/vanilla"],(function(x){"use strict";var m;return{setters:[function(O){m=O.atom}],execute:(function(){x({atomFamily:$,atomWithDefault:X,atomWithLazy:lt,atomWithObservable:nt,atomWithReducer:P,atomWithRefresh:
|
|
1
|
+
System.register(["jotai/vanilla"],(function(x){"use strict";var m;return{setters:[function(O){m=O.atom}],execute:(function(){x({atomFamily:$,atomWithDefault:X,atomWithLazy:lt,atomWithObservable:nt,atomWithReducer:P,atomWithRefresh:ct,atomWithReset:J,atomWithStorage:tt,createJSONStorage:V,freezeAtom:T,freezeAtomCreator:q,loadable:ut,selectAtom:K,splitAtom:U,unstable_withStorageValidator:Y,unwrap:_});const O=x("RESET",Symbol(""));function J(t){const e=m(t,(s,a,u)=>{const c=typeof u=="function"?u(s(e)):u;a(e,c===O?t:c)});return e}function P(t,e){return m(t,function(s,a,u){a(this,e(s(this),u))})}function $(t,e){let s=null;const a=new Map,u=new Set,c=i=>{let n;if(e===void 0)n=a.get(i);else for(const[l,f]of a)if(e(l,i)){n=f;break}if(n!==void 0)if(s!=null&&s(n[1],i))c.remove(i);else return n[0];const o=t(i);return a.set(i,[o,Date.now()]),r("CREATE",i,o),o},r=(i,n,o)=>{for(const l of u)l({type:i,param:n,atom:o})};return c.unstable_listen=i=>(u.add(i),()=>{u.delete(i)}),c.getParams=()=>a.keys(),c.remove=i=>{if(e===void 0){if(!a.has(i))return;const[n]=a.get(i);a.delete(i),r("REMOVE",i,n)}else for(const[n,[o]]of a)if(e(n,i)){a.delete(n),r("REMOVE",n,o);break}},c.setShouldRemove=i=>{if(s=i,!!s)for(const[n,[o,l]]of a)s(l,n)&&(a.delete(n),r("REMOVE",n,o))},c}const I=(t,e,s)=>(e.has(s)?e:e.set(s,t())).get(s),C=new WeakMap,F=(t,e,s,a)=>{const u=I(()=>new WeakMap,C,e),c=I(()=>new WeakMap,u,s);return I(t,c,a)};function K(t,e,s=Object.is){return F(()=>{const a=Symbol(),u=([r,i])=>{if(i===a)return e(r);const n=e(r,i);return s(i,n)?i:n},c=m(r=>{const i=r(c),n=r(t);return u([n,i])});return c.init=a,c},t,e,s)}const R=new WeakSet,L=t=>{if(typeof t!="object"||t===null)return t;Object.freeze(t);const e=Object.getOwnPropertyNames(t);for(const s of e)L(t[s]);return t};function T(t){if(R.has(t))return t;R.add(t);const e=t.read;if(t.read=function(s,a){return L(e.call(this,s,a))},"write"in t){const s=t.write;t.write=function(a,u,...c){return s.call(this,a,(...r)=>(r[0]===t&&(r[1]=L(r[1])),u(...r)),...c)}}return t}function q(t){return((...e)=>T(t(...e)))}const j=(t,e,s)=>(e.has(s)?e:e.set(s,t())).get(s),B=new WeakMap,G=(t,e,s)=>{const a=j(()=>new WeakMap,B,e);return j(t,a,s)},H={},N=t=>!!t.write,Q=t=>typeof t=="function";function U(t,e){return G(()=>{const s=new WeakMap,a=(r,i)=>{let n=s.get(r);if(n)return n;const o=i&&s.get(i),l=[],f=[];return r.forEach((w,v)=>{const d=e?e(w):v;f[v]=d;const g=o&&o.atomList[o.keyList.indexOf(d)];if(g){l[v]=g;return}const W=b=>{const y=b(u),h=b(t),S=a(h,y==null?void 0:y.arr).keyList.indexOf(d);if(S<0||S>=h.length){const p=r[a(r).keyList.indexOf(d)];if(p)return p;throw new Error("splitAtom: index out of bounds for read")}return h[S]},E=(b,y,h)=>{const S=b(u),p=b(t),k=a(p,S==null?void 0:S.arr).keyList.indexOf(d);if(k<0||k>=p.length)throw new Error("splitAtom: index out of bounds for write");const D=Q(h)?h(p[k]):h;Object.is(p[k],D)||y(t,[...p.slice(0,k),D,...p.slice(k+1)])};l[v]=N(t)?m(W,E):m(W)}),o&&o.keyList.length===f.length&&o.keyList.every((w,v)=>w===f[v])?n=o:n={arr:r,atomList:l,keyList:f},s.set(r,n),n},u=m(r=>{const i=r(u),n=r(t);return a(n,i==null?void 0:i.arr)});u.init=void 0;const c=N(t)?m(r=>r(u).atomList,(r,i,n)=>{switch(n.type){case"remove":{const o=r(c).indexOf(n.atom);if(o>=0){const l=r(t);i(t,[...l.slice(0,o),...l.slice(o+1)])}break}case"insert":{const o=n.before?r(c).indexOf(n.before):r(c).length;if(o>=0){const l=r(t);i(t,[...l.slice(0,o),n.value,...l.slice(o)])}break}case"move":{const o=r(c).indexOf(n.atom),l=n.before?r(c).indexOf(n.before):r(c).length;if(o>=0&&l>=0){const f=r(t);o<l?i(t,[...f.slice(0,o),...f.slice(o+1,l),f[o],...f.slice(l)]):i(t,[...f.slice(0,l),f[o],...f.slice(l,o),...f.slice(o+1)])}break}}}):m(r=>r(u).atomList);return c},t,e||H)}function X(t){const e=Symbol(),s=m(e),a=m((u,c)=>{const r=u(s);return r!==e?r:t(u,c)},(u,c,r)=>{const i=typeof r=="function"?r(u(a)):r;c(s,i===O?e:i)});return a}const M=t=>typeof(t==null?void 0:t.then)=="function";function Y(t){return e=>({...e,getItem:(s,a)=>{const u=r=>t(r)?r:a,c=e.getItem(s,a);return M(c)?c.then(u):u(c)}})}function V(t=()=>{try{return window.localStorage}catch(s){return}},e){var s;let a,u;const c={getItem:(n,o)=>{var l,f;const w=d=>{if(d=d||"",a!==d){try{u=JSON.parse(d,e==null?void 0:e.reviver)}catch(g){return o}a=d}return u},v=(f=(l=t())==null?void 0:l.getItem(n))!=null?f:null;return M(v)?v.then(w):w(v)},setItem:(n,o)=>{var l;return(l=t())==null?void 0:l.setItem(n,JSON.stringify(o,e==null?void 0:e.replacer))},removeItem:n=>{var o;return(o=t())==null?void 0:o.removeItem(n)}},r=n=>(o,l,f)=>n(o,w=>{let v;try{v=JSON.parse(w||"")}catch(d){v=f}l(v)});let i;try{i=(s=t())==null?void 0:s.subscribe}catch(n){}return!i&&typeof window!="undefined"&&typeof window.addEventListener=="function"&&window.Storage&&(i=(n,o)=>{if(!(t()instanceof window.Storage))return()=>{};const l=f=>{f.storageArea===t()&&f.key===n&&o(f.newValue)};return window.addEventListener("storage",l),()=>{window.removeEventListener("storage",l)}}),i&&(c.subscribe=r(i)),c}const Z=V();function tt(t,e,s=Z,a){const u=a==null?void 0:a.getOnInit,c=m(u?s.getItem(t,e):e);return c.onMount=r=>{var i;return r(s.getItem(t,e)),(i=s.subscribe)==null?void 0:i.call(s,t,r,e)},m(r=>r(c),(r,i,n)=>{const o=typeof n=="function"?n(r(c)):n;return o===O?(i(c,e),s.removeItem(t)):M(o)?o.then(l=>(i(c,l),s.setItem(t,l))):(i(c,o),s.setItem(t,o))})}const et=t=>typeof(t==null?void 0:t.then)=="function";function nt(t,e){const s=u=>{if("e"in u)throw u.e;return u.d},a=m(u=>{var c;const r=t(u),i=((c=r[Symbol.observable])==null?void 0:c.call(r))||r;let n;const o=()=>new Promise(h=>{n=h}),l=e&&"initialValue"in e?{d:typeof e.initialValue=="function"?e.initialValue():e.initialValue}:o();let f,w;const v=h=>{w=h,n==null||n(h),f==null||f(h)};let d,g;const W=()=>!f,E=()=>{d&&(d.unsubscribe(),d=void 0)},b=()=>{d&&(clearTimeout(g),d.unsubscribe()),d=i.subscribe({next:h=>v({d:h}),error:h=>v({e:h}),complete:()=>{}}),W()&&e!=null&&e.unstable_timeout&&(g=setTimeout(E,e.unstable_timeout))};b();const y=m(w||l);return y.onMount=h=>(f=h,w&&h(w),d?clearTimeout(g):b(),()=>{f=void 0,e!=null&&e.unstable_timeout?g=setTimeout(E,e.unstable_timeout):E()}),[y,r,o,b,W]});return m(u=>{const[c]=u(a),r=u(c);return et(r)?r.then(s):s(r)},(u,c,r)=>{const[i,n,o,l,f]=u(a);if("next"in n)f()&&(c(i,o()),l()),n.next(r);else throw new Error("observable is not subject")})}const z=(t,e,s)=>(e.has(s)?e:e.set(s,t())).get(s),rt=new WeakMap,ot=(t,e,s)=>{const a=z(()=>new WeakMap,rt,e);return z(t,a,s)},it=t=>typeof(t==null?void 0:t.then)=="function",st=()=>{};function _(t,e=st){return ot(()=>{const s=new WeakMap,a=new WeakMap,u=m(0),c=m([]);c.INTERNAL_onInit=i=>{i.set(c,[()=>i.set(u,n=>n+1)])};const r=m(i=>{i(u);let n;try{n=i(r)}catch(l){}const o=i(t);if(!it(o))return{v:o};if(o!==(n==null?void 0:n.p)&&o.then(l=>{a.set(o,l);const[f]=i(c);f()},l=>{s.set(o,l);const[f]=i(c);f()}),s.has(o))throw s.get(o);return a.has(o)?{p:o,v:a.get(o)}:n&&"v"in n?{p:o,f:e(n.v),v:n.v}:{p:o,f:e()}});return r.init=void 0,m(i=>{const n=i(r);return"f"in n?n.f:n.v},(i,n,...o)=>n(t,...o))},t,e)}const A=new WeakMap,at=(t,e)=>(A.has(e)?A:A.set(e,t())).get(e);function ut(t){return at(()=>{const e={state:"loading"},s=_(t,()=>e);return m(a=>{try{const u=a(s);return u===e?e:{state:"hasData",data:u}}catch(u){return{state:"hasError",error:u}}})},t)}function ct(t,e){const s=m(0);return m((a,u)=>(a(s),t(a,u)),(a,u,...c)=>{if(c.length===0)u(s,r=>r+1);else if(e)return e(a,u,...c)})}function lt(t){const e=m(void 0);return delete e.init,Object.defineProperty(e,"init",{get(){return t()}}),e}})}}));
|