react-native-nitro-storage 0.13.0 → 0.14.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.
Files changed (50) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +58 -4
  3. package/docs/api-reference.md +49 -43
  4. package/docs/batch-transactions-migrations.md +7 -0
  5. package/docs/qa/agent-device-replay.md +70 -0
  6. package/docs/secure-storage.md +12 -6
  7. package/lib/commonjs/Storage.types.js +4 -2
  8. package/lib/commonjs/Storage.types.js.map +1 -1
  9. package/lib/commonjs/core/durability.js +30 -2
  10. package/lib/commonjs/core/durability.js.map +1 -1
  11. package/lib/commonjs/index.js.map +1 -1
  12. package/lib/commonjs/index.web.js.map +1 -1
  13. package/lib/commonjs/shared.js.map +1 -1
  14. package/lib/commonjs/storage-core.js +37 -3
  15. package/lib/commonjs/storage-core.js.map +1 -1
  16. package/lib/commonjs/testing.js +1 -0
  17. package/lib/commonjs/testing.js.map +1 -1
  18. package/lib/module/Storage.types.js +4 -2
  19. package/lib/module/Storage.types.js.map +1 -1
  20. package/lib/module/core/durability.js +30 -2
  21. package/lib/module/core/durability.js.map +1 -1
  22. package/lib/module/index.js.map +1 -1
  23. package/lib/module/index.web.js.map +1 -1
  24. package/lib/module/shared.js.map +1 -1
  25. package/lib/module/storage-core.js +37 -3
  26. package/lib/module/storage-core.js.map +1 -1
  27. package/lib/module/testing.js +1 -0
  28. package/lib/module/testing.js.map +1 -1
  29. package/lib/typescript/Storage.types.d.ts +4 -2
  30. package/lib/typescript/Storage.types.d.ts.map +1 -1
  31. package/lib/typescript/core/durability.d.ts +7 -1
  32. package/lib/typescript/core/durability.d.ts.map +1 -1
  33. package/lib/typescript/index.d.ts +4 -2
  34. package/lib/typescript/index.d.ts.map +1 -1
  35. package/lib/typescript/index.web.d.ts +4 -2
  36. package/lib/typescript/index.web.d.ts.map +1 -1
  37. package/lib/typescript/shared.d.ts +8 -1
  38. package/lib/typescript/shared.d.ts.map +1 -1
  39. package/lib/typescript/storage-core.d.ts +6 -3
  40. package/lib/typescript/storage-core.d.ts.map +1 -1
  41. package/lib/typescript/testing.d.ts +7 -4
  42. package/lib/typescript/testing.d.ts.map +1 -1
  43. package/package.json +1 -1
  44. package/src/Storage.types.ts +4 -2
  45. package/src/core/durability.ts +46 -2
  46. package/src/index.ts +4 -0
  47. package/src/index.web.ts +4 -0
  48. package/src/shared.ts +17 -1
  49. package/src/storage-core.ts +61 -7
  50. package/src/testing.ts +5 -0
package/CHANGELOG.md CHANGED
@@ -6,6 +6,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
  Breaking changes are always listed first in each release section.
8
8
 
9
+ ## [0.14.0] - 2026-10-03
10
+
11
+ ### Breaking changes
12
+
13
+ - Transaction and migration callbacks must finish synchronously. Promise and thenable results now throw `TypeError`, roll back writes made through the transaction context, and leave migration versions unchanged. Context methods reject calls after the callback ends. Migration: finish asynchronous work before entering the callback and keep all context access inside it. TypeScript now rejects direct async callbacks.
14
+
15
+ ### Added
16
+
17
+ - `storage.setScheduledFlushErrorObserver()` reports scheduled Disk and Secure flush failures with their scope and backend adapter error. Failed writes stay queued for retry. Explicit flush calls still throw to their caller, and scheduled failures still propagate when no observer is installed.
18
+
19
+ ### Documentation
20
+
21
+ - `flushSecureWrites()` drains the JavaScript queue; it is not an Android `apply()` durability barrier. Select synchronous secure-write mode before writes that need synchronous native persistence.
22
+ - Biometric policy documentation now distinguishes iOS Keychain prompts from Android authentication when a protected store first opens and its cached keyset on later access.
23
+
9
24
  ## [0.13.0] - 2026-10-01
10
25
 
11
26
  ### Breaking changes
package/README.md CHANGED
@@ -91,7 +91,7 @@ before installing this package, then rebuild the native app so the generated
91
91
  Nitro bindings and native runtime use the same major-minor version:
92
92
 
93
93
  ```sh
94
- bun add react-native-nitro-modules@0.37.1 react-native-nitro-storage@0.13.0
94
+ bun add react-native-nitro-modules@0.37.1 react-native-nitro-storage@0.14.0
95
95
  bunx expo prebuild
96
96
  ```
97
97
 
@@ -491,9 +491,12 @@ explicitly opt into `{ includeSecureValues: true }`.
491
491
 
492
492
  Android secure writes default to synchronous `commit()` durability. Call
493
493
  `storage.setSecureWritesAsync(true)` only when asynchronous `apply()` writes are
494
- acceptable. After opting into async writes, call `storage.flushSecureWrites()`
495
- before a deterministic persistence boundary. A failed secure flush throws and
496
- keeps failed or unattempted queued writes available for retry.
494
+ acceptable. `storage.flushSecureWrites()` drains the JavaScript write queue into
495
+ the native backend; it does not wait for Android `apply()` to reach disk. Keep
496
+ the default synchronous mode, or call `storage.setSecureWritesAsync(false)`
497
+ before the writes that need synchronous native persistence. Changing the mode
498
+ does not make earlier `apply()` calls durable retroactively. A failed explicit
499
+ flush throws and keeps failed or unattempted queued writes available for retry.
497
500
  `storage.clearBiometric()`
498
501
  flushes pending Secure writes before clearing biometric entries and surfaces
499
502
  native clear failures.
@@ -538,6 +541,43 @@ Biometric behaviour differs by platform:
538
541
  before every read that must be gated. Reading a `BiometryOrPasscode` item
539
542
  opens only that store, so a device-credential authentication is enough.
540
543
 
544
+ Scheduled Disk and Secure flush failures can be handled without losing the
545
+ pending writes:
546
+
547
+ ```ts
548
+ import {
549
+ storage,
550
+ type StorageScheduledFlushError,
551
+ } from "react-native-nitro-storage";
552
+
553
+ let lastFlushFailure: StorageScheduledFlushError | undefined;
554
+ storage.setScheduledFlushErrorObserver((failure) => {
555
+ lastFlushFailure = failure;
556
+ });
557
+
558
+ // Call after resolving the failure, such as freeing space or unlocking storage.
559
+ function retryPendingWrites() {
560
+ storage.flushDiskWrites();
561
+ storage.flushSecureWrites();
562
+ lastFlushFailure = undefined;
563
+ }
564
+
565
+ // Remove the observer when its owner is disposed.
566
+ function stopObservingFlushErrors() {
567
+ storage.setScheduledFlushErrorObserver(undefined);
568
+ }
569
+ ```
570
+
571
+ The observer receives the failed scope and the error thrown by the backend
572
+ adapter. Web adapters may wrap the underlying failure in an error with `cause`.
573
+ It replaces
574
+ the uncaught scheduled-flush error only while installed; without an observer,
575
+ the error still propagates. Explicit flush calls always throw to their caller,
576
+ and an observer that throws also propagates its error. Register one observer per
577
+ storage instance and handle retry failures at the calling boundary. The observer
578
+ reports the synchronous backend handoff; it cannot report a later Android
579
+ `apply()` or IndexedDB persistence failure that the backend does not expose.
580
+
541
581
  ## Batch Operations
542
582
 
543
583
  `getBatch()` preserves tuple value types, so IDEs infer each result from the
@@ -666,10 +706,16 @@ migrateFromMMKV(mmkvInstance, themeItem);
666
706
 
667
707
  `runTransaction(scope, callback)` rolls back every write made through the `tx`
668
708
  context if the callback throws, then emits one typed `rollback` batch event.
709
+ Callbacks must be synchronous. A Promise or thenable return throws a `TypeError`
710
+ and rolls back changes made through the context. Every context method becomes
711
+ unavailable when the callback ends, including for a continuation after `await`.
712
+ Complete asynchronous work before calling `runTransaction()` or registering a
713
+ migration; do not retain the context outside its callback.
669
714
 
670
715
  Each migration step runs in its own transaction with its version marker, so a
671
716
  failed step leaves the scope on the last completed version and rerunning
672
717
  `migrateToLatest()` retries deterministically.
718
+ An asynchronous migration is rejected without advancing its version marker.
673
719
 
674
720
  ## Web Backends
675
721
 
@@ -850,6 +896,7 @@ in a host measurement; devices are slower). Keep single Disk values below about
850
896
  | Native libraries | [docs/native-libraries.md](docs/native-libraries.md) |
851
897
  | Recipes | [docs/recipes.md](docs/recipes.md) |
852
898
  | Benchmarks | [docs/benchmarks.md](docs/benchmarks.md) |
899
+ | Example replay coverage | [docs/qa/agent-device-replay.md](docs/qa/agent-device-replay.md) |
853
900
  | Security policy | [SECURITY.md](SECURITY.md) |
854
901
 
855
902
  ## Troubleshooting
@@ -887,6 +934,13 @@ Nitro, secure storage, or packaging files. GitHub CI does not build the Android
887
934
  or iOS example. The package release path also validates package contents and
888
935
  dry-run publish behavior.
889
936
 
937
+ Run `bun run example:replay:check` to check that replay coverage matches package
938
+ and example sources. After reviewing affected assertions, use
939
+ `bun run example:replay:refresh` to update the source lock. Device execution uses
940
+ `bun run example:replay --platform ios --udid <exact-target>` or
941
+ `--platform android --serial <exact-target>`; see the
942
+ [replay guide](docs/qa/agent-device-replay.md) for prerequisites and coverage limits.
943
+
890
944
  `bun run benchmark` measures only the built web entry with an isolated private
891
945
  localStorage implementation; it is not a native Disk or Secure benchmark. See
892
946
  [docs/benchmarks.md](docs/benchmarks.md) for sampling and interpretation limits.
@@ -112,49 +112,50 @@ See [react-hooks.md](react-hooks.md).
112
112
 
113
113
  `storage` exposes raw and cross-item utilities:
114
114
 
115
- | Method | Purpose |
116
- | ------------------------------------------------ | ----------------------------------------------------------------------------------------- |
117
- | `clear(scope, options?)` | Clear one scope, optionally preserving selected keys. |
118
- | `clearAll()` | Clear Memory, Disk, and Secure scopes. |
119
- | `clearNamespace(namespace, scope)` | Remove keys under `namespace:`. |
120
- | `clearGroup(group)` | Remove registered items in a group across their scopes. |
121
- | `getGroupItems(group)` | List registered items in a group. |
122
- | `subscribeExpired(scope, listener)` | Receive item events caused by TTL expiry. |
123
- | `findDuplicateKeys()` | Find duplicate registered `(scope, key)` definitions. |
124
- | `getRegisteredKeys()` | List registered `(scope, key)` definitions. |
125
- | `subscribe(scope, listener)` | Subscribe to raw scope-level change events. |
126
- | `subscribeKey(scope, key, listener)` | Subscribe to raw events for one key. |
127
- | `subscribePrefix(scope, prefix, listener)` | Subscribe to raw events for matching key prefixes. |
128
- | `subscribeNamespace(namespace, scope, listener)` | Subscribe to raw events for `namespace:` keys. |
129
- | `setEventObserver(observer, options?)` | Receive all change events for devtools or logging. Secure values are redacted by default. |
130
- | `clearBiometric()` | Clear biometric Secure entries. |
131
- | `has(key, scope)` | Check for a raw key. |
132
- | `getAllKeys(scope)` | List raw keys. |
133
- | `getKeysByPrefix(prefix, scope)` | List raw keys with a prefix. |
134
- | `getByPrefix(prefix, scope)` | Read raw string values by prefix. |
135
- | `getAll(scope)` | Read all raw string values in a scope. |
136
- | `size(scope)` | Return approximate scope entry count. |
137
- | `setAccessControl(accessControl)` | Set the default Secure access control level. |
138
- | `setSecureWritesAsync(enabled)` | Toggle Android secure writes between sync and async modes. |
139
- | `setDiskWritesAsync(enabled)` | Toggle coalesced Disk write behavior. |
140
- | `flushDiskWrites()` | Flush pending Disk writes. |
141
- | `flushSecureWrites()` | Flush pending Secure writes. |
142
- | `setKeychainAccessGroup(group)` | Configure iOS Keychain access group. |
143
- | `setMetricsObserver(observer)` | Receive operation timing events. |
144
- | `getMetricsSnapshot()` | Read aggregated metrics. |
145
- | `getScopedMetricsSnapshot()` | Read metrics grouped by storage scope. |
146
- | `resetMetrics()` | Clear metrics counters. |
147
- | `getCacheMetrics()` | Read raw-cache hits, misses, live entries, and estimated bytes. |
148
- | `getCapabilities()` | Read runtime storage capabilities. Native `backend.disk` is `"sqlite"`. |
149
- | `getSecurityCapabilities()` | Read secure backend capability metadata. |
150
- | `getSecureMetadata(key)` | Read secure metadata for one key without returning its value. |
151
- | `getAllSecureMetadata()` | Read secure metadata for all secure keys without values. |
152
- | `getString(key, scope)` | Read a raw string. |
153
- | `setString(key, value, scope)` | Write a raw string. |
154
- | `deleteString(key, scope)` | Remove a raw key. |
155
- | `export(scope, options?)` | Snapshot raw strings from one scope. Secure scope requires explicit unsafe opt-in. |
156
- | `exportSecureUnsafe()` | Snapshot raw Secure strings for short-lived migration workflows. |
157
- | `import(data, scope)` | Bulk import raw strings. |
115
+ | Method | Purpose |
116
+ | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
117
+ | `clear(scope, options?)` | Clear one scope, optionally preserving selected keys. |
118
+ | `clearAll()` | Clear Memory, Disk, and Secure scopes. |
119
+ | `clearNamespace(namespace, scope)` | Remove keys under `namespace:`. |
120
+ | `clearGroup(group)` | Remove registered items in a group across their scopes. |
121
+ | `getGroupItems(group)` | List registered items in a group. |
122
+ | `subscribeExpired(scope, listener)` | Receive item events caused by TTL expiry. |
123
+ | `findDuplicateKeys()` | Find duplicate registered `(scope, key)` definitions. |
124
+ | `getRegisteredKeys()` | List registered `(scope, key)` definitions. |
125
+ | `subscribe(scope, listener)` | Subscribe to raw scope-level change events. |
126
+ | `subscribeKey(scope, key, listener)` | Subscribe to raw events for one key. |
127
+ | `subscribePrefix(scope, prefix, listener)` | Subscribe to raw events for matching key prefixes. |
128
+ | `subscribeNamespace(namespace, scope, listener)` | Subscribe to raw events for `namespace:` keys. |
129
+ | `setEventObserver(observer, options?)` | Receive all change events for devtools or logging. Secure values are redacted by default. |
130
+ | `clearBiometric()` | Clear biometric Secure entries. |
131
+ | `has(key, scope)` | Check for a raw key. |
132
+ | `getAllKeys(scope)` | List raw keys. |
133
+ | `getKeysByPrefix(prefix, scope)` | List raw keys with a prefix. |
134
+ | `getByPrefix(prefix, scope)` | Read raw string values by prefix. |
135
+ | `getAll(scope)` | Read all raw string values in a scope. |
136
+ | `size(scope)` | Return approximate scope entry count. |
137
+ | `setAccessControl(accessControl)` | Set the default Secure access control level. |
138
+ | `setSecureWritesAsync(enabled)` | Toggle Android secure writes between sync and async modes. |
139
+ | `setDiskWritesAsync(enabled)` | Toggle coalesced Disk write behavior. |
140
+ | `flushDiskWrites()` | Flush pending Disk writes. |
141
+ | `flushSecureWrites()` | Drain queued Secure writes into the backend; not an Android `apply()` persistence barrier. |
142
+ | `setScheduledFlushErrorObserver(observer)` | Observe scheduled Disk/Secure flush failures; pass `undefined` to restore uncaught failures. Explicit flush calls still throw. |
143
+ | `setKeychainAccessGroup(group)` | Configure iOS Keychain access group. |
144
+ | `setMetricsObserver(observer)` | Receive operation timing events. |
145
+ | `getMetricsSnapshot()` | Read aggregated metrics. |
146
+ | `getScopedMetricsSnapshot()` | Read metrics grouped by storage scope. |
147
+ | `resetMetrics()` | Clear metrics counters. |
148
+ | `getCacheMetrics()` | Read raw-cache hits, misses, live entries, and estimated bytes. |
149
+ | `getCapabilities()` | Read runtime storage capabilities. Native `backend.disk` is `"sqlite"`. |
150
+ | `getSecurityCapabilities()` | Read secure backend capability metadata. |
151
+ | `getSecureMetadata(key)` | Read secure metadata for one key without returning its value. |
152
+ | `getAllSecureMetadata()` | Read secure metadata for all secure keys without values. |
153
+ | `getString(key, scope)` | Read a raw string. |
154
+ | `setString(key, value, scope)` | Write a raw string. |
155
+ | `deleteString(key, scope)` | Remove a raw key. |
156
+ | `export(scope, options?)` | Snapshot raw strings from one scope. Secure scope requires explicit unsafe opt-in. |
157
+ | `exportSecureUnsafe()` | Snapshot raw Secure strings for short-lived migration workflows. |
158
+ | `import(data, scope)` | Bulk import raw strings. |
158
159
 
159
160
  Raw string APIs bypass item serialization and validation. Prefer `StorageItem<T>` unless you are migrating, exporting/importing, or writing a custom integration.
160
161
 
@@ -234,6 +235,9 @@ runTransaction(StorageScope.Disk, (tx) => {
234
235
  ```
235
236
 
236
237
  If the callback throws, previously changed keys in that transaction are rolled back synchronously.
238
+ Promise or thenable results are rejected with `TypeError` and rollback. Context
239
+ methods are valid only during the synchronous callback. Finish awaited work
240
+ before entering the transaction.
237
241
 
238
242
  ## Migrations
239
243
 
@@ -249,6 +253,8 @@ migrateToLatest(StorageScope.Disk);
249
253
  ```
250
254
 
251
255
  Migration versions are tracked per scope.
256
+ Migration callbacks must be synchronous. An async callback is rejected without
257
+ advancing its version, and the next migration run retries that step.
252
258
 
253
259
  ## Secure Auth Storage
254
260
 
@@ -126,6 +126,11 @@ Transaction context methods:
126
126
 
127
127
  If the callback throws, Nitro Storage restores the keys it changed during that transaction and emits exactly one typed `rollback` batch event so observers and the global event observer can react to the rollback.
128
128
 
129
+ Callbacks must return synchronously. A Promise or thenable result throws a
130
+ `TypeError` and triggers the same rollback. Context methods reject access after
131
+ the callback finishes, including from an async continuation. Complete awaited
132
+ work before the transaction and never retain its context for later use.
133
+
129
134
  Memory-scope batch removes are atomic: all keys are deleted before listeners fire, and scope, key, and prefix subscribers receive a single `removeBatch` event.
130
135
 
131
136
  ## Migrations
@@ -160,6 +165,8 @@ migrateToLatest(StorageScope.Disk);
160
165
  Migration context methods work with raw strings. Use item serializers manually when migrating structured data.
161
166
 
162
167
  Each migration step runs inside its own transaction together with the version marker write. A step that throws rolls back both its data changes and the version marker, so the scope stays on the last completed version and rerunning `migrateToLatest()` retries deterministically.
168
+ Migration callbacks follow the same synchronous contract as transactions. An
169
+ async migration does not advance its version marker.
163
170
 
164
171
  ```ts
165
172
  registerMigration(3, (ctx) => {
@@ -0,0 +1,70 @@
1
+ # Storage agent-device replay
2
+
3
+ Run these flows only against an already installed release example that matches
4
+ the source revision under test. Select the platform and exact device every time:
5
+
6
+ ```sh
7
+ bun run example:replay --platform ios --udid <exact-udid>
8
+ bun run example:replay --platform android --serial <exact-serial>
9
+ ```
10
+
11
+ To run selected manifest suites, pass `--flow <id>`. The runner accepts this
12
+ option more than once for distinct suite IDs:
13
+
14
+ ```sh
15
+ bun run example:replay --platform ios --udid <exact-udid> --flow integrity
16
+ bun run example:replay --platform android --serial <exact-serial> --flow keychain --flow persistence-relaunch
17
+ ```
18
+
19
+ Use an installed release build from the source being checked. The replay does
20
+ not start Metro, prebuild, or build an app. A development client, a different
21
+ source revision, an inferred device, or a run without the exact platform and
22
+ device selector is not release replay evidence. The task owner must separately
23
+ authorize device work after the required package implementations are ready.
24
+
25
+ Before replay, check that the example source and replay manifest match the
26
+ committed source lock. If a flow, status ID, or expected value changes, update
27
+ `e2e/storage-replay-coverage.json` and refresh that lock with the repository's
28
+ replay maintenance command. Run the checker again before the device command:
29
+
30
+ ```sh
31
+ bun run example:replay:refresh
32
+ bun run example:replay:check
33
+ bun run example:replay:test
34
+ ```
35
+
36
+ The runner supplies a fresh UUID as `RUN_ID` to each replay. The persistence
37
+ flow writes one `RUN_ID`-scoped Disk key, closes and relaunches the installed
38
+ app with the same ID, compares the stored value with the expected value, and
39
+ deletes that key. Other smoke and lab cases use reserved QA keys and clean only
40
+ those keys. The default replay never clears a whole storage scope or the app's
41
+ data.
42
+
43
+ Each run uses a unique session and an artifact directory under the OS temporary
44
+ directory. `agent-device test` closes each attempt session itself, including
45
+ on failure.
46
+
47
+ A replay passes only when each suite reaches its finished status and every
48
+ required status ID contains its expected public API value. A `fail=0` summary by
49
+ itself is not sufficient. Smoke and integrity rows are asserted through the
50
+ on-screen `smoke-results` and `e2e-integrity-results` labels because
51
+ agent-device `.ad` waits only see on-screen elements. The keychain suite runs one no-prompt Secure
52
+ roundtrip and keeps biometric, lock, corruption, and hardware-backed checks
53
+ explicitly pending. The smoke test's constructed `storage_full` error is read
54
+ through the public `/testing` entrypoint; it proves error-code classification
55
+ at that test adapter boundary only.
56
+
57
+ The native smoke flow requires 39 passing cases out of 41, zero failures, and
58
+ the two expected web-only skips. Update that expected summary when cases change;
59
+ do not accept a new native skip as coverage. The integrity flow also checks that
60
+ a Promise-returning transaction rolls back and closes its context on Memory,
61
+ Disk, and Secure.
62
+
63
+ Native replay rows identify the public runtime platform and backend capability,
64
+ then assert values returned through the default package entrypoint. This
65
+ supports installed-app Disk and Secure behavior claims for that target. It does
66
+ not prove hardware-backed keys, biometrics, locked-device behavior, corruption
67
+ recovery, or a native Disk/Secure write failure. Those checks need controlled
68
+ native or hardware prerequisites and remain pending in the coverage manifest.
69
+ Unit tests for an injected adapter boundary are useful logic evidence, but they
70
+ do not close a native-runtime prerequisite.
@@ -206,12 +206,18 @@ refreshTokenItem.set("opaque-refresh-token");
206
206
  ```
207
207
 
208
208
  Coalesced secure item writes remain in a last-write-wins queue until the next
209
- microtask or an explicit `flushSecureWrites()`. A failed flush throws and keeps
210
- failed and unattempted writes queued for a later retry. Call
211
- `flushSecureWrites()` before assertions, namespace clears, or any boundary that
212
- requires deterministic persistence. `storage.clearBiometric()` is also a
213
- durability barrier: it flushes pending Secure writes before clearing biometric
214
- entries, and surfaces native clear failures.
209
+ microtask or an explicit `flushSecureWrites()`. An explicit flush failure throws
210
+ and keeps failed and unattempted writes queued for retry. Scheduled failures
211
+ propagate unless `storage.setScheduledFlushErrorObserver()` is installed; it
212
+ receives `{ scope, error }` while the failed writes remain queued.
213
+
214
+ `flushSecureWrites()` drains the JavaScript queue into the backend. It does not
215
+ wait for Android `apply()` persistence. Use the default synchronous mode or
216
+ select `storage.setSecureWritesAsync(false)` before writes that need synchronous
217
+ native persistence. Changing the mode is not a barrier for earlier `apply()`
218
+ calls. `storage.clearBiometric()` drains pending Secure writes before clearing
219
+ biometric entries and surfaces native clear failures; it also cannot wait for
220
+ earlier Android `apply()` calls.
215
221
 
216
222
  ## iOS Legacy Disk Migration
217
223
 
@@ -26,9 +26,11 @@ let AccessControl = exports.AccessControl = /*#__PURE__*/function (AccessControl
26
26
  let BiometricLevel = exports.BiometricLevel = /*#__PURE__*/function (BiometricLevel) {
27
27
  /** No biometric requirement (default). */
28
28
  BiometricLevel[BiometricLevel["None"] = 0] = "None";
29
- /** Require biometric or passcode for each access. */
29
+ /** iOS: Keychain user presence. Android: recent authentication when opening
30
+ * the protected store; later access uses its cached keyset. Web: no biometric enforcement. */
30
31
  BiometricLevel[BiometricLevel["BiometryOrPasscode"] = 1] = "BiometryOrPasscode";
31
- /** Require biometric only (no passcode fallback). */
32
+ /** Biometric-only Keychain/Keystore policy, without passcode fallback.
33
+ * Android authenticates when opening the store, not each access. Web: no biometric enforcement. */
32
34
  BiometricLevel[BiometricLevel["BiometryOnly"] = 2] = "BiometryOnly";
33
35
  return BiometricLevel;
34
36
  }({});
@@ -1 +1 @@
1
- {"version":3,"names":["StorageScope","exports","AccessControl","BiometricLevel"],"sourceRoot":"../../src","sources":["Storage.types.ts"],"mappings":";;;;;;IAAYA,YAAY,GAAAC,OAAA,CAAAD,YAAA,0BAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAAA,IAMZE,aAAa,GAAAD,OAAA,CAAAC,aAAA,0BAAbA,aAAa;EACvB;EADUA,aAAa,CAAbA,aAAa;EAGvB;EAHUA,aAAa,CAAbA,aAAa;EAKvB;EALUA,aAAa,CAAbA,aAAa;EAOvB;EAPUA,aAAa,CAAbA,aAAa;EASvB;EATUA,aAAa,CAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;AAAA,IAabC,cAAc,GAAAF,OAAA,CAAAE,cAAA,0BAAdA,cAAc;EACxB;EADUA,cAAc,CAAdA,cAAc;EAGxB;EAHUA,cAAc,CAAdA,cAAc;EAKxB;EALUA,cAAc,CAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA","ignoreList":[]}
1
+ {"version":3,"names":["StorageScope","exports","AccessControl","BiometricLevel"],"sourceRoot":"../../src","sources":["Storage.types.ts"],"mappings":";;;;;;IAAYA,YAAY,GAAAC,OAAA,CAAAD,YAAA,0BAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAAA,IAMZE,aAAa,GAAAD,OAAA,CAAAC,aAAA,0BAAbA,aAAa;EACvB;EADUA,aAAa,CAAbA,aAAa;EAGvB;EAHUA,aAAa,CAAbA,aAAa;EAKvB;EALUA,aAAa,CAAbA,aAAa;EAOvB;EAPUA,aAAa,CAAbA,aAAa;EASvB;EATUA,aAAa,CAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;AAAA,IAabC,cAAc,GAAAF,OAAA,CAAAE,cAAA,0BAAdA,cAAc;EACxB;EADUA,cAAc,CAAdA,cAAc;EAGxB;AACF;EAJYA,cAAc,CAAdA,cAAc;EAMxB;AACF;EAPYA,cAAc,CAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA","ignoreList":[]}
@@ -11,6 +11,7 @@ function createDurabilityCoordinator(options) {
11
11
  let nextGeneration = 0;
12
12
  let diskFlushScheduled = false;
13
13
  let diskWritesAsync = false;
14
+ let scheduledFlushErrorObserver;
14
15
  const pendingSecureWrites = new Map();
15
16
  let secureFlushScheduled = false;
16
17
  const securePromotionsInProgress = new Set();
@@ -114,6 +115,30 @@ function createDurabilityCoordinator(options) {
114
115
  clearPendingWrites(pendingSecureWrites, removeWrites);
115
116
  }
116
117
  }
118
+ function reportScheduledFlushError(scope, error) {
119
+ const observer = scheduledFlushErrorObserver;
120
+ if (observer === undefined) {
121
+ throw error;
122
+ }
123
+ observer({
124
+ scope,
125
+ error
126
+ });
127
+ }
128
+ function flushScheduledDiskWrites() {
129
+ try {
130
+ flushDiskWrites();
131
+ } catch (error) {
132
+ reportScheduledFlushError(_Storage.StorageScope.Disk, error);
133
+ }
134
+ }
135
+ function flushScheduledSecureWrites() {
136
+ try {
137
+ flushSecureWrites();
138
+ } catch (error) {
139
+ reportScheduledFlushError(_Storage.StorageScope.Secure, error);
140
+ }
141
+ }
117
142
  function scheduleDiskWrite(key, value) {
118
143
  const pendingWrite = {
119
144
  key,
@@ -125,7 +150,7 @@ function createDurabilityCoordinator(options) {
125
150
  return pendingWrite;
126
151
  }
127
152
  diskFlushScheduled = true;
128
- (0, _shared.runMicrotask)(flushDiskWrites);
153
+ (0, _shared.runMicrotask)(flushScheduledDiskWrites);
129
154
  return pendingWrite;
130
155
  }
131
156
  function scheduleSecureWrite(key, value, accessControl) {
@@ -142,7 +167,7 @@ function createDurabilityCoordinator(options) {
142
167
  return pendingWrite;
143
168
  }
144
169
  secureFlushScheduled = true;
145
- (0, _shared.runMicrotask)(flushSecureWrites);
170
+ (0, _shared.runMicrotask)(flushScheduledSecureWrites);
146
171
  return pendingWrite;
147
172
  }
148
173
  function runSecurePromotion(key, promotion) {
@@ -160,6 +185,9 @@ function createDurabilityCoordinator(options) {
160
185
  }
161
186
  }
162
187
  return {
188
+ setScheduledFlushErrorObserver(observer) {
189
+ scheduledFlushErrorObserver = observer;
190
+ },
163
191
  setDiskWritesAsync(enabled) {
164
192
  diskWritesAsync = enabled;
165
193
  if (!enabled) {
@@ -1 +1 @@
1
- {"version":3,"names":["_shared","require","_Storage","createDurabilityCoordinator","options","pendingDiskWrites","Map","nextGeneration","diskFlushScheduled","diskWritesAsync","pendingSecureWrites","secureFlushScheduled","securePromotionsInProgress","Set","clearPendingWrites","pendingWrites","writes","forEach","write","get","key","delete","restorePendingWrites","has","set","flushDiskWrites","size","Array","from","values","setWrites","filter","value","undefined","removeWrites","length","backend","setBatch","map","StorageScope","Disk","error","removeBatch","flushSecureWrites","groupedSetWrites","accessControl","push","resolvedAccessControl","resolveSecureDefaultAccessControl","existingGroup","group","setSecureAccessControl","Secure","scheduleDiskWrite","pendingWrite","generation","runMicrotask","scheduleSecureWrite","runSecurePromotion","promotion","Error","add","setDiskWritesAsync","enabled","isDiskWritesAsync","hasPendingDiskWrite","hasPendingSecureWrite","getPendingDiskWrite","getPendingSecureWrite","clearPendingDiskWrite","clearPendingSecureWrite","clearPendingDiskWriteIf","clearPendingSecureWriteIf","clearAllPendingDiskWrites","clear","clearAllPendingSecureWrites"],"sourceRoot":"../../../src","sources":["core/durability.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAiCO,SAASE,2BAA2BA,CAACC,OAG3C,EAAyB;EAGxB,MAAMC,iBAAiB,GAAG,IAAIC,GAAG,CAA2B,CAAC;EAC7D,IAAIC,cAAc,GAAG,CAAC;EACtB,IAAIC,kBAAkB,GAAG,KAAK;EAC9B,IAAIC,eAAe,GAAG,KAAK;EAC3B,MAAMC,mBAAmB,GAAG,IAAIJ,GAAG,CAA6B,CAAC;EACjE,IAAIK,oBAAoB,GAAG,KAAK;EAChC,MAAMC,0BAA0B,GAAG,IAAIC,GAAG,CAAS,CAAC;EAEpD,SAASC,kBAAkBA,CACzBC,aAA6B,EAC7BC,MAAoB,EACd;IACNA,MAAM,CAACC,OAAO,CAAEC,KAAK,IAAK;MACxB,IAAIH,aAAa,CAACI,GAAG,CAACD,KAAK,CAACE,GAAG,CAAC,KAAKF,KAAK,EAAE;QAC1CH,aAAa,CAACM,MAAM,CAACH,KAAK,CAACE,GAAG,CAAC;MACjC;IACF,CAAC,CAAC;EACJ;EAEA,SAASE,oBAAoBA,CAC3BP,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C;IACxD8C,qBAAqB,EAAG9C,GAAG,IAAKV,mBAAmB,CAACa,GAAG,CAACH,GAAG,CAAC;IAC5D+C,mBAAmB,EAAG/C,GAAG,IAAKf,iBAAiB,CAACc,GAAG,CAACC,GAAG,CAAC;IACxDgD,qBAAqB,EAAGhD,GAAG,IAAKV,mBAAmB,CAACS,GAAG,CAACC,GAAG,CAAC;IAC5DiD,qBAAqB,EAAGjD,GAAG,IAAK;MAC9Bf,iBAAiB,CAACgB,MAAM,CAACD,GAAG,CAAC;IAC/B,CAAC;IACDkD,uBAAuB,EAAGlD,GAAG,IAAK;MAChCV,mBAAmB,CAACW,MAAM,CAACD,GAAG,CAAC;IACjC,CAAC;IACDmD,uBAAuB,EAAGrD,KAAK,IAAK;MAClC,IAAIb,iBAAiB,CAACc,GAAG,CAACD,KAAK,CAACE,GAAG,CAAC,KAAKF,KAAK,EAAE;QAC9Cb,iBAAiB,CAACgB,MAAM,CAACH,KAAK,CAACE,GAAG,CAAC;MACrC;IACF,CAAC;IACDoD,yBAAyB,EAAGtD,KAAK,IAAK;MACpC,IAAIR,mBAAmB,CAACS,GAAG,CAACD,KAAK,CAACE,GAAG,CAAC,KAAKF,KAAK,EAAE;QAChDR,mBAAmB,CAACW,MAAM,CAACH,KAAK,CAACE,GAAG,CAAC;MACvC;IACF,CAAC;IACDqD,yBAAyB,EAAEA,CAAA,KAAM;MAC/BpE,iBAAiB,CAACqE,KAAK,CAAC,CAAC;IAC3B,CAAC;IACDC,2BAA2B,EAAEA,CAAA,KAAM;MACjCjE,mBAAmB,CAACgE,KAAK,CAAC,CAAC;IAC7B,CAAC;IACDrB,iBAAiB;IACjBI,mBAAmB;IACnBhC,eAAe;IACfkB,iBAAiB;IACjBe;EACF,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"names":["_shared","require","_Storage","createDurabilityCoordinator","options","pendingDiskWrites","Map","nextGeneration","diskFlushScheduled","diskWritesAsync","scheduledFlushErrorObserver","pendingSecureWrites","secureFlushScheduled","securePromotionsInProgress","Set","clearPendingWrites","pendingWrites","writes","forEach","write","get","key","delete","restorePendingWrites","has","set","flushDiskWrites","size","Array","from","values","setWrites","filter","value","undefined","removeWrites","length","backend","setBatch","map","StorageScope","Disk","error","removeBatch","flushSecureWrites","groupedSetWrites","accessControl","push","resolvedAccessControl","resolveSecureDefaultAccessControl","existingGroup","group","setSecureAccessControl","Secure","reportScheduledFlushError","scope","observer","flushScheduledDiskWrites","flushScheduledSecureWrites","scheduleDiskWrite","pendingWrite","generation","runMicrotask","scheduleSecureWrite","runSecurePromotion","promotion","Error","add","setScheduledFlushErrorObserver","setDiskWritesAsync","enabled","isDiskWritesAsync","hasPendingDiskWrite","hasPendingSecureWrite","getPendingDiskWrite","getPendingSecureWrite","clearPendingDiskWrite","clearPendingSecureWrite","clearPendingDiskWriteIf","clearPendingSecureWriteIf","clearAllPendingDiskWrites","clear","clearAllPendingSecureWrites"],"sourceRoot":"../../../src","sources":["core/durability.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AA6CO,SAASE,2BAA2BA,CAACC,OAG3C,EAAyB;EAGxB,MAAMC,iBAAiB,GAAG,IAAIC,GAAG,CAA2B,CAAC;EAC7D,IAAIC,cAAc,GAAG,CAAC;EACtB,IAAIC,kBAAkB,GAAG,KAAK;EAC9B,IAAIC,eAAe,GAAG,KAAK;EAC3B,IAAIC,2BAC4C;EAChD,MAAMC,mBAAmB,GAAG,IAAIL,GAAG,CAA6B,CAAC;EACjE,IAAIM,oBAAoB,GAAG,KAAK;EAChC,MAAMC,0BAA0B,GAAG,IAAIC,GAAG,CAAS,CAAC;EAEpD,SAASC,kBAAkBA,CACzBC,aAA6B,EAC7BC,MAAoB,EACd;IACNA,MAAM,CAACC,OAAO,CAAEC,KAAK,IAAK;MACxB,IAAIH,aAAa,CAACI,GAAG,CAACD,KAAK,CAACE,GAAG,CAAC,KAAKF,KAAK,EAAE;QAC1CH,aAAa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AK,IAAK;MAClC,IAAId,iBAAiB,CAACe,GAAG,CAACD,KAAK,CAACE,GAAG,CAAC,KAAKF,KAAK,EAAE;QAC9Cd,iBAAiB,CAACiB,MAAM,CAACH,KAAK,CAACE,GAAG,CAAC;MACrC;IACF,CAAC;IACD0D,yBAAyB,EAAG5D,KAAK,IAAK;MACpC,IAAIR,mBAAmB,CAACS,GAAG,CAACD,KAAK,CAACE,GAAG,CAAC,KAAKF,KAAK,EAAE;QAChDR,mBAAmB,CAACW,MAAM,CAACH,KAAK,CAACE,GAAG,CAAC;MACvC;IACF,CAAC;IACD2D,yBAAyB,EAAEA,CAAA,KAAM;MAC/B3E,iBAAiB,CAAC4E,KAAK,CAAC,CAAC;IAC3B,CAAC;IACDC,2BAA2B,EAAEA,CAAA,KAAM;MACjCvE,mBAAmB,CAACsE,KAAK,CAAC,CAAC;IAC7B,CAAC;IACDtB,iBAAiB;IACjBI,mBAAmB;IACnBrC,eAAe;IACfkB,iBAAiB;IACjBoB;EACF,CAAC;AACH","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_reactNativeNitroModules","_capabilities","_indexeddbBackend","_internal","_shared","_storageCore","_Storage","_migration","_storageRuntime","_webBackendContract","_storageHooks","_storageModule","getStorageModule","NitroModules","createHybridObject","nativeSecureBackend","nativeBackend","get","key","scope","set","value","remove","clear","has","getAllKeys","getKeysByPrefix","prefix","size","setBatch","keys","values","getBatch","removeBatch","removeByPrefix","setSecureAccessControl","level","getSecureBiometric","setSecureBiometricWithLevel","deleteSecureBiometric","hasSecureBiometric","clearSecureBiometric","buildNativeAdapter","internals","scopedUnsubscribers","Map","suppressedNativeEvents","StorageScope","Disk","Secure","suppressNativeEvent","suppressedEvents","consumeSuppressedNativeEvent","count","undefined","delete","ensureNativeScopeSubscription","unsubscribe","addOnChange","clearAllPendingDiskWrites","clearPendingDiskWrite","clearAllPendingSecureWrites","clearPendingSecureWrite","clearScopeRawCache","notifyAllListeners","getScopedListeners","notifyKeyListeners","oldValue","readCachedRawValue","invalidateRawCache","cacheRawValue","emitKeyChange","unescapeCollidingRawValue","maybeCleanupNativeScopeSubscription","listeners","hasScopeEventListeners","hasEventObserver","backend","changeSource","applyAccessControlOnSecureRawWrite","ensureScopeSubscription","maybeCleanupScopeSubscription","onWillEmitChanges","operation","source","Memory","forEach","getSecureMetadataProfile","encrypted","hardwareBacked","core","createStorageCore","secureWritesBuffered","DEFAULT_SECURE_WRITES_ASYNC","storage","exports","setAccessControl","measureOperation","assertAccessControlLevel","setSecureDefaultAccessControl","setSecureWritesAsync","enabled","setKeychainAccessGroup","group","getCapabilities","platform","disk","secure","writeBuffering","resolveNativeWriteBuffering","Platform","OS","errorClassification","getSecurityCapabilities","secureStorage","accessControl","keychainAccessGroup","biometric","prompt","biometryOnly","biometryOrPasscode","metadata","perKey","listsWithoutValues","persistsTimestamps","createStorageItem","memoryItem","diskItem","secureItem","createSetItem","registerMigration","migrateToLatest","runTransaction","createSecureAuthStorage","setWebSecureStorageBackend","_backend","getWebSecureStorageBackend","setWebDiskStorageBackend","getWebDiskStorageBackend","flushWebStorageBackends","createIndexedDBBackend","createIndexedDBBackendFromSubpath"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,wBAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AAIA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAMA,IAAAM,YAAA,GAAAN,OAAA;AAYA,IAAAO,QAAA,GAAAP,OAAA;AA4BA,IAAAQ,UAAA,GAAAR,OAAA;AACA,IAAAS,eAAA,GAAAT,OAAA;AAkCA,IAAAU,mBAAA,GAAA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AAC9B,MAAMH,QAAQ,GAAAkE,OAAA,CAAAlE,QAAA,GAAG6D,IAAI,CAAC7D,QAAQ;AAC9B,MAAMI,WAAW,GAAA8D,OAAA,CAAA9D,WAAA,GAAGyD,IAAI,CAACzD,WAAW;AACpC,MAAMiG,iBAAiB,GAAAnC,OAAA,CAAAmC,iBAAA,GAAGxC,IAAI,CAACwC,iBAAiB;AAChD,MAAMC,eAAe,GAAApC,OAAA,CAAAoC,eAAA,GAAGzC,IAAI,CAACyC,eAAe;AAC5C,MAAMC,cAAc,GAAArC,OAAA,CAAAqC,cAAA,GAAG1C,IAAI,CAAC0C,cAAc;AAC1C,MAAMC,uBAAuB,GAAAtC,OAAA,CAAAsC,uBAAA,GAAG3C,IAAI,CAAC2C,uBAAuB;AAE5D,SAASC,0BAA0BA,CACxCC,QAAkC,EAC5B;EACN;AAAA;AAGK,SAASC,0BAA0BA,CAAA,EACJ;EACpC,OAAOlF,SAAS;AAClB;AAEO,SAASmF,wBAAwBA,CACtCF,QAAgC,EAC1B;EACN;AAAA;AAGK,SAASG,wBAAwBA,CAAA,EAAsC;EAC5E,OAAOpF,SAAS;AAClB;AAEO,eAAeqF,uBAAuBA,CAAA,EAAkB;EAC7D;AAAA;AAWF;AACA;AACA;AACA;AACA;AACO,MAAMC,sBAAgE,GAAA7C,OAAA,CAAA6C,sBAAA,GAC3EC,wCAAiC","ignoreList":[]}
1
+ {"version":3,"names":["_reactNative","require","_reactNativeNitroModules","_capabilities","_indexeddbBackend","_internal","_shared","_storageCore","_Storage","_migration","_storageRuntime","_webBackendContract","_storageHooks","_storageModule","getStorageModule","NitroModules","createHybridObject","nativeSecureBackend","nativeBackend","get","key","scope","set","value","remove","clear","has","getAllKeys","getKeysByPrefix","prefix","size","setBatch","keys","values","getBatch","removeBatch","removeByPrefix","setSecureAccessControl","level","getSecureBiometric","setSecureBiometricWithLevel","deleteSecureBiometric","hasSecureBiometric","clearSecureBiometric","buildNativeAdapter","internals","scopedUnsubscribers","Map","suppressedNativeEvents","StorageScope","Disk","Secure","suppressNativeEvent","suppressedEvents","consumeSuppressedNativeEvent","count","undefined","delete","ensureNativeScopeSubscription","unsubscribe","addOnChange","clearAllPendingDiskWrites","clearPendingDiskWrite","clearAllPendingSecureWrites","clearPendingSecureWrite","clearScopeRawCache","notifyAllListeners","getScopedListeners","notifyKeyListeners","oldValue","readCachedRawValue","invalidateRawCache","cacheRawValue","emitKeyChange","unescapeCollidingRawValue","maybeCleanupNativeScopeSubscription","listeners","hasScopeEventListeners","hasEventObserver","backend","changeSource","applyAccessControlOnSecureRawWrite","ensureScopeSubscription","maybeCleanupScopeSubscription","onWillEmitChanges","operation","source","Memory","forEach","getSecureMetadataProfile","encrypted","hardwareBacked","core","createStorageCore","secureWritesBuffered","DEFAULT_SECURE_WRITES_ASYNC","storage","exports","setAccessControl","measureOperation","assertAccessControlLevel","setSecureDefaultAccessControl","setSecureWritesAsync","enabled","setKeychainAccessGroup","group","getCapabilities","platform","disk","secure","writeBuffering","resolveNativeWriteBuffering","Platform","OS","errorClassification","getSecurityCapabilities","secureStorage","accessControl","keychainAccessGroup","biometric","prompt","biometryOnly","biometryOrPasscode","metadata","perKey","listsWithoutValues","persistsTimestamps","createStorageItem","memoryItem","diskItem","secureItem","createSetItem","registerMigration","migrateToLatest","runTransaction","createSecureAuthStorage","setWebSecureStorageBackend","_backend","getWebSecureStorageBackend","setWebDiskStorageBackend","getWebDiskStorageBackend","flushWebStorageBackends","createIndexedDBBackend","createIndexedDBBackendFromSubpath"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,wBAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AAIA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,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