@prisma-idb/client-idb 0.9.1 → 0.11.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.
@@ -0,0 +1,399 @@
1
+ import { C as NoIncludes, D as ReferenceRelKeys, E as PatchInput, M as SelectedRow, O as RelatedModelOf, P as WhereFilter, S as MutationUpdateInput, T as OrderBySpec, a as IdbAggregateBuilder, c as IdbAggregateSpec, g as IncludeSpec, i as DefaultModelRow, l as IdbContract, o as IdbAggregateResult, p as IdbStorage, r as CreateInput, t as IdbQueryExecutor, v as KeyType, x as MutationCreateInput } from "./executor-Bp-hdRg2.mjs";
2
+ import { AsyncIterableResult } from "@prisma/orm-framework/components/runtime";
3
+ import { IdbFieldFilter, IdbFilterExpr, IdbNullCheckExpr } from "@prisma-idb/adapter-idb/runtime";
4
+ import { Contract } from "@prisma/orm-framework/contract/types";
5
+ //#region src/core/model-accessor.d.ts
6
+ /**
7
+ * Operator surface available on every field. All return frozen AST nodes
8
+ * — they are values, not statements, so chaining and logical combinators
9
+ * compose naturally.
10
+ */
11
+ interface IdbFieldAccessor<T> {
12
+ eq(value: T): IdbFieldFilter;
13
+ neq(value: T): IdbFieldFilter;
14
+ gt(value: T): IdbFieldFilter;
15
+ lt(value: T): IdbFieldFilter;
16
+ gte(value: T): IdbFieldFilter;
17
+ lte(value: T): IdbFieldFilter;
18
+ in(values: ReadonlyArray<T>): IdbFieldFilter;
19
+ notIn(values: ReadonlyArray<T>): IdbFieldFilter;
20
+ contains(sub: string): IdbFieldFilter;
21
+ startsWith(sub: string): IdbFieldFilter;
22
+ endsWith(sub: string): IdbFieldFilter;
23
+ isNull(): IdbNullCheckExpr;
24
+ isNotNull(): IdbNullCheckExpr;
25
+ }
26
+ /**
27
+ * The accessor object handed to a `where(fn)` callback. Each key resolves
28
+ * to an {@link IdbFieldAccessor} typed against the field's output type.
29
+ *
30
+ * The Proxy makes every string key resolve to an accessor at runtime; the
31
+ * type narrows the visible surface to the model's declared fields so the
32
+ * developer gets autocomplete.
33
+ */
34
+ type IdbModelAccessor<TContract, ModelName extends string> = { readonly [K in keyof DefaultModelRow<TContract, ModelName>]-?: IdbFieldAccessor<DefaultModelRow<TContract, ModelName>[K]>; };
35
+ //#endregion
36
+ //#region src/core/store-state.d.ts
37
+ /**
38
+ * One entry in {@link IdbAccessorState.includes} — describes how a single
39
+ * `.include()`d relation should be materialised.
40
+ *
41
+ * - `collection`: load the related rows, applying the refined `state`
42
+ * (its `filters` / `orderBy` / `skip` / `take`) to the child scan.
43
+ * `state` is `emptyAccessorState()` for an unrefined `.include(rel)`.
44
+ * - `scalar`: reduce the related rows to a single number (Phase 6.5 supports
45
+ * `count`). The `state.filters` still constrain which children are counted.
46
+ *
47
+ * Mirrors the `IncludeExpr` / `IncludeScalar` split from
48
+ * Prisma ORM's SQL client, collapsed to the two shapes IDB
49
+ * needs (no SQL column mapping, no `combine()` branches).
50
+ */
51
+ type IncludeEntry = {
52
+ readonly kind: "collection";
53
+ readonly state: IdbAccessorState;
54
+ } | {
55
+ readonly kind: "scalar";
56
+ readonly fn: "count";
57
+ readonly state: IdbAccessorState;
58
+ };
59
+ /**
60
+ * Marker returned by the child accessor's `.count()` terminal when it is
61
+ * called inside an `include()` refinement callback. Carries the refined
62
+ * child `state` so the relation loader counts only the matching children.
63
+ *
64
+ * Detected by {@link isIncludeScalar}; mirrors `IncludeScalar` from the
65
+ * vendor `sql-orm-client/include-descriptors.ts`.
66
+ */
67
+ interface IdbIncludeScalar {
68
+ readonly kind: "includeScalar";
69
+ readonly fn: "count";
70
+ readonly state: IdbAccessorState;
71
+ }
72
+ /**
73
+ * Immutable state carried by each {@link IdbStoreAccessorImpl} node in the
74
+ * builder chain.
75
+ *
76
+ * Every mutating method (`.where()`, `.take()`, etc.) returns a cloned
77
+ * instance with an updated state rather than mutating in place, making the
78
+ * accessor safe to reuse across multiple query branches.
79
+ */
80
+ interface IdbAccessorState {
81
+ /**
82
+ * Accumulated filter expressions. Multiple `.where()` calls compose
83
+ * with AND semantics — the planner wraps them in an `andExpr` when
84
+ * lowering. Each entry is already either an `IdbFieldFilter`, a
85
+ * combinator, or a `null-check` node — never raw shorthand records.
86
+ */
87
+ readonly filters: ReadonlyArray<IdbFilterExpr>;
88
+ /** Sort spec: field → direction. Applied as an in-memory comparator. */
89
+ readonly orderBy?: Record<string, "asc" | "desc">;
90
+ /** OFFSET (number of rows to skip). */
91
+ readonly skip?: number;
92
+ /** LIMIT (maximum number of rows to return). */
93
+ readonly take?: number;
94
+ /**
95
+ * Relations that have been `.include()`d — keys are relation names, values
96
+ * describe how to materialise each (collection vs scalar count, plus any
97
+ * refinement state). See {@link IncludeEntry}.
98
+ */
99
+ readonly includes: Record<string, IncludeEntry>;
100
+ /**
101
+ * Fields kept by `.select()`. `undefined` means "all fields". When set,
102
+ * the materialised rows are projected down to these fields (plus any
103
+ * included relation keys) after the scan and relation loads complete.
104
+ */
105
+ readonly selectedFields?: ReadonlyArray<string>;
106
+ }
107
+ //#endregion
108
+ //#region src/core/grouped-accessor.d.ts
109
+ /**
110
+ * One grouped-aggregate result row: the group-key fields picked from the model
111
+ * row, intersected with the aggregate aliases.
112
+ */
113
+ type GroupedResultRow<TContract, ModelName extends string, Fields extends readonly string[], Spec extends IdbAggregateSpec> = Pick<DefaultModelRow<TContract, ModelName>, Fields[number] & keyof DefaultModelRow<TContract, ModelName>> & IdbAggregateResult<Spec>;
114
+ /**
115
+ * Grouped-aggregate builder returned by `accessor.groupBy(...)`.
116
+ *
117
+ * Port of the vendor `GroupedCollection` (`sql-orm-client/grouped-collection.ts`),
118
+ * but purely in-memory: there is no SQL compilation, so `aggregate()`
119
+ * materialises the matching rows, partitions them by the group-key fields, and
120
+ * reduces each partition with the requested selectors.
121
+ */
122
+ interface IdbGroupedAccessor<TContract, ModelName extends string, Fields extends readonly string[]> {
123
+ /**
124
+ * Reduce each group to one row of `{ ...groupKeyFields, ...aggregates }`.
125
+ *
126
+ * @example
127
+ * ```ts
128
+ * const byUser = await db.posts
129
+ * .where({ published: true })
130
+ * .groupBy("authorId")
131
+ * .aggregate((agg) => ({ count: agg.count(), totalViews: agg.sum("views") }));
132
+ * // [{ authorId: "u1", count: 3, totalViews: 120 }, ...]
133
+ * ```
134
+ */
135
+ aggregate<Spec extends IdbAggregateSpec>(fn: (agg: IdbAggregateBuilder<TContract, ModelName>) => Spec): Promise<Array<GroupedResultRow<TContract, ModelName, Fields, Spec>>>;
136
+ }
137
+ //#endregion
138
+ //#region src/core/store-accessor.d.ts
139
+ /** Callback form of `.where(fn)` — receives the typed model accessor proxy. */
140
+ type WhereCallback<TContract, ModelName extends string> = (m: IdbModelAccessor<TContract, ModelName>) => IdbFilterExpr;
141
+ /** Tuple of one-or-more field names of a model (for `select()` / `groupBy()`). */
142
+ type FieldTuple<TContract, ModelName extends string> = readonly [keyof DefaultModelRow<TContract, ModelName> & string, ...(keyof DefaultModelRow<TContract, ModelName> & string)[]];
143
+ /**
144
+ * The child accessor handed to an `include()` refinement callback.
145
+ *
146
+ * Exposes the chainable narrowing methods (`where` / `orderBy` / `take` /
147
+ * `skip`) plus the scalar `count()` reducer. Mirrors the vendor
148
+ * `IncludeRefinementCollection`: chainable methods return the same refinement
149
+ * surface so `count()` stays reachable after a `where()`, and `count()` returns
150
+ * an {@link IdbIncludeScalar} marker rather than the async terminal `count()`
151
+ * found on the top-level accessor.
152
+ */
153
+ interface IdbIncludeRefinementAccessor<TContract, ModelName extends string> {
154
+ where(filter: WhereFilter<TContract, ModelName> | WhereCallback<TContract, ModelName>): IdbIncludeRefinementAccessor<TContract, ModelName>;
155
+ orderBy(spec: OrderBySpec<TContract, ModelName>): IdbIncludeRefinementAccessor<TContract, ModelName>;
156
+ take(n: number): IdbIncludeRefinementAccessor<TContract, ModelName>;
157
+ skip(n: number): IdbIncludeRefinementAccessor<TContract, ModelName>;
158
+ count(): IdbIncludeScalar;
159
+ }
160
+ /** Refinement callback type for a given relation key `K`. */
161
+ type IncludeRefineFn<TContract, ModelName extends string, K extends string, R> = (collection: IdbIncludeRefinementAccessor<TContract, RelatedModelOf<TContract, ModelName, K>>) => R;
162
+ /**
163
+ * Immutable query-builder for a single IDB object store.
164
+ *
165
+ * Each method that narrows the query (`.where()`, `.take()`, etc.) returns a
166
+ * new, independent accessor instance — the original is never mutated. This
167
+ * mirrors the `MongoCollection` pattern from Prisma ORM's Mongo family.
168
+ *
169
+ * @template TContract - The full IDB contract (with or without type maps).
170
+ * @template ModelName - The model (store) this accessor targets.
171
+ * @template TIncludes - Tracks which relations have been included via
172
+ * `.include()` calls, so the return type widens progressively.
173
+ * @template TSelected - Field names kept by `.select()`. `never` (the
174
+ * default) means "all fields"; otherwise the row narrows to these fields
175
+ * (plus any included relations).
176
+ */
177
+ interface IdbStoreAccessor<TContract, ModelName extends string, TIncludes extends IncludeSpec<TContract, ModelName> = NoIncludes, TSelected extends string = never> {
178
+ /**
179
+ * Add a filter (ANDed with any previous `.where()` calls).
180
+ *
181
+ * Two forms:
182
+ *
183
+ * - **Shorthand**: `where({ field: value })` — multi-key shorthand
184
+ * objects compose as AND. `null` values become null-checks rather
185
+ * than literal-null equalities so absent fields match.
186
+ * - **Callback**: `where((m) => m.field.op(value))` — receives the
187
+ * typed model accessor proxy and returns an `IdbFilterExpr` built
188
+ * via the operator surface. Combinators (`and`, `or`, `not` from
189
+ * `@prisma-idb/client-idb/orm`) compose nodes.
190
+ */
191
+ where(filter: WhereFilter<TContract, ModelName> | WhereCallback<TContract, ModelName>): IdbStoreAccessor<TContract, ModelName, TIncludes, TSelected>;
192
+ /** Set the sort order. Replaces any previous `.orderBy()` call. */
193
+ orderBy(spec: OrderBySpec<TContract, ModelName>): IdbStoreAccessor<TContract, ModelName, TIncludes, TSelected>;
194
+ /** Limit the number of rows returned. */
195
+ take(n: number): IdbStoreAccessor<TContract, ModelName, TIncludes, TSelected>;
196
+ /** Skip the first `n` rows (OFFSET). */
197
+ skip(n: number): IdbStoreAccessor<TContract, ModelName, TIncludes, TSelected>;
198
+ /**
199
+ * Include a reference relation in the returned rows.
200
+ *
201
+ * The relation is loaded via a single batch lookup after the main
202
+ * query — O(1) round trips to IDB per included relation regardless of
203
+ * the number of parent rows. The return type gains the relation field
204
+ * automatically.
205
+ *
206
+ * An optional refinement callback narrows the loaded relation:
207
+ *
208
+ * - return the (chained) collection to apply `where` / `orderBy` /
209
+ * `take` / `skip` to the related rows (per-parent for `1:N`);
210
+ * - return `collection.count()` to reduce a to-many relation to the
211
+ * number of matching children (the field becomes a `number`).
212
+ *
213
+ * @example
214
+ * ```ts
215
+ * db.users.include("posts", (posts) => posts.where({ published: true }).take(5))
216
+ * db.users.include("posts", (posts) => posts.count())
217
+ * ```
218
+ */
219
+ include<K extends ReferenceRelKeys<TContract, ModelName>>(relation: K, refineFn?: IncludeRefineFn<TContract, ModelName, K, IdbIncludeRefinementAccessor<TContract, RelatedModelOf<TContract, ModelName, K>>>): IdbStoreAccessor<TContract, ModelName, TIncludes & Record<K, true>, TSelected>;
220
+ include<K extends ReferenceRelKeys<TContract, ModelName>>(relation: K, refineFn: IncludeRefineFn<TContract, ModelName, K, IdbIncludeScalar>): IdbStoreAccessor<TContract, ModelName, TIncludes & Record<K, "scalar">, TSelected>;
221
+ /**
222
+ * Project the row down to a subset of scalar fields. Any previously
223
+ * `.include()`d relations are preserved on the result; only the scalar
224
+ * fields are narrowed.
225
+ *
226
+ * @example
227
+ * ```ts
228
+ * const summaries = await db.users.select("id", "email").all();
229
+ * // typeof summaries[number] === { id: string; email: string }
230
+ * ```
231
+ */
232
+ select<Fields extends FieldTuple<TContract, ModelName>>(...fields: Fields): IdbStoreAccessor<TContract, ModelName, TIncludes, Fields[number]>;
233
+ /** Return all matching rows as an async iterable (also awaitable as `Row[]`). */
234
+ all(): AsyncIterableResult<SelectedRow<TContract, ModelName, TIncludes, TSelected>>;
235
+ /** Return the first matching row, or `null` if none match. */
236
+ first(): Promise<SelectedRow<TContract, ModelName, TIncludes, TSelected> | null>;
237
+ /**
238
+ * Run an in-memory aggregate (count/sum/avg/min/max) over the rows matching
239
+ * the accumulated `.where()` filter. Returns one result object keyed by the
240
+ * aliases supplied in the spec.
241
+ *
242
+ * @example
243
+ * ```ts
244
+ * const stats = await db.posts.where({ published: true }).aggregate((agg) => ({
245
+ * total: agg.count(),
246
+ * avgViews: agg.avg("views"),
247
+ * }));
248
+ * ```
249
+ */
250
+ aggregate<Spec extends IdbAggregateSpec>(fn: (agg: IdbAggregateBuilder<TContract, ModelName>) => Spec): Promise<IdbAggregateResult<Spec>>;
251
+ /**
252
+ * Switch to grouped-aggregate mode. The returned {@link IdbGroupedAccessor}'s
253
+ * `.aggregate(...)` terminal produces one row per group with the chosen key
254
+ * fields plus the requested aggregates.
255
+ *
256
+ * @example
257
+ * ```ts
258
+ * const byUser = await db.posts
259
+ * .where({ published: true })
260
+ * .groupBy("authorId")
261
+ * .aggregate((agg) => ({ count: agg.count(), totalViews: agg.sum("views") }));
262
+ * ```
263
+ */
264
+ groupBy<Fields extends FieldTuple<TContract, ModelName>>(...fields: Fields): IdbGroupedAccessor<TContract, ModelName, Fields>;
265
+ /**
266
+ * Insert a record into the store and return the stored row.
267
+ *
268
+ * The primary key field is optional in `data` — pass it to use a
269
+ * client-generated ID (`cuid`, `uuid`) or omit it for auto-increment stores.
270
+ *
271
+ * Relation fields accept a mutation callback:
272
+ * `posts: (rel) => rel.create([...])` or `author: (rel) => rel.connect({ id })`.
273
+ * When any relation callback is present, all writes are wrapped in a single
274
+ * multi-store IDB transaction (requires IdbRuntime, not a plain executor).
275
+ */
276
+ create(data: MutationCreateInput<TContract, ModelName>): Promise<DefaultModelRow<TContract, ModelName>>;
277
+ /** Look up a single row by primary key. Returns `null` if not found. */
278
+ findUnique(key: KeyType<TContract, ModelName>): Promise<DefaultModelRow<TContract, ModelName> | null>;
279
+ /** Delete the row with the given primary key. */
280
+ delete(key: KeyType<TContract, ModelName>): Promise<void>;
281
+ /**
282
+ * Update the first row matching the accumulated `.where()` filter.
283
+ * Returns the merged row, or `null` if no row matches.
284
+ *
285
+ * Relation fields accept `connect` or `disconnect` callbacks. When any
286
+ * relation callback is present, all writes run in a single multi-store
287
+ * IDB transaction (requires IdbRuntime).
288
+ */
289
+ update(patch: MutationUpdateInput<TContract, ModelName>): Promise<DefaultModelRow<TContract, ModelName> | null>;
290
+ /**
291
+ * Update all rows matching the accumulated `.where()` filter and return
292
+ * them as an `AsyncIterableResult` (also awaitable as `Row[]`).
293
+ */
294
+ updateAll(patch: PatchInput<TContract, ModelName>): AsyncIterableResult<DefaultModelRow<TContract, ModelName>>;
295
+ /**
296
+ * Update all rows matching the accumulated `.where()` filter.
297
+ * Returns the count of updated rows.
298
+ */
299
+ updateCount(patch: PatchInput<TContract, ModelName>): Promise<number>;
300
+ /**
301
+ * Insert or update a single record.
302
+ *
303
+ * - If a row matching `where` exists: shallow-merge `update` onto it and
304
+ * return the merged row.
305
+ * - If no matching row exists: insert `create` and return it.
306
+ */
307
+ upsert(args: {
308
+ create: CreateInput<TContract, ModelName>;
309
+ update: PatchInput<TContract, ModelName>;
310
+ where: WhereFilter<TContract, ModelName>;
311
+ }): Promise<DefaultModelRow<TContract, ModelName>>;
312
+ /**
313
+ * Insert multiple records in a single atomic transaction.
314
+ * Returns all inserted rows as an `AsyncIterableResult`.
315
+ */
316
+ createAll(data: CreateInput<TContract, ModelName>[]): AsyncIterableResult<DefaultModelRow<TContract, ModelName>>;
317
+ /**
318
+ * Insert multiple records in a single atomic transaction.
319
+ * Returns the count of inserted rows.
320
+ */
321
+ createCount(data: CreateInput<TContract, ModelName>[]): Promise<number>;
322
+ /**
323
+ * Delete all rows matching the accumulated `.where()` filter.
324
+ * Returns the deleted rows as an `AsyncIterableResult`.
325
+ */
326
+ deleteAll(): AsyncIterableResult<DefaultModelRow<TContract, ModelName>>;
327
+ /**
328
+ * Delete all rows matching the accumulated `.where()` filter.
329
+ * Returns the count of deleted rows.
330
+ */
331
+ deleteCount(): Promise<number>;
332
+ /**
333
+ * Count all rows matching the accumulated `.where()` filter.
334
+ * With no filter, counts all rows in the store.
335
+ *
336
+ * **Note — `skip`/`take` are respected**: unlike Prisma's SQL `count()`,
337
+ * which ignores pagination, this implementation reuses the same planned row
338
+ * read as `all()`. That means `where(...).take(5).count()` returns at most 5,
339
+ * not the total number of matching rows. Use `where(...).count()` without
340
+ * `take`/`skip` when you need an unbounded total.
341
+ */
342
+ count(): Promise<number>;
343
+ }
344
+ //#endregion
345
+ //#region src/core/idb-orm.d.ts
346
+ /**
347
+ * The ORM client object returned by {@link idbOrm}.
348
+ *
349
+ * Keys are the root keys from `contract.roots` (e.g. `"users"`, `"posts"`).
350
+ * Each value is an {@link IdbStoreAccessor} targeting the corresponding model.
351
+ *
352
+ * @example
353
+ * ```ts
354
+ * const db = idbOrm({ contract, executor: runtime });
355
+ * const users = await db.users.all(); // IdbStoreAccessor<..., "User">
356
+ * ```
357
+ */
358
+ type IdbOrmClient<TContract extends Contract<IdbStorage>> = { readonly [K in string & keyof TContract["roots"]]: TContract["roots"][K] extends {
359
+ model: infer ModelName extends string;
360
+ } ? IdbStoreAccessor<TContract, ModelName> : never; };
361
+ /**
362
+ * Options for {@link idbOrm}.
363
+ */
364
+ interface IdbOrmOptions<TContract extends IdbContract> {
365
+ /** The resolved IDB contract (with or without attached type maps). */
366
+ readonly contract: TContract;
367
+ /**
368
+ * The query executor.
369
+ *
370
+ * Any object with a compatible `query()` signature satisfies this —
371
+ * most commonly an `IdbRuntime` created via `createIdbRuntime()`.
372
+ */
373
+ readonly executor: IdbQueryExecutor;
374
+ }
375
+ /**
376
+ * Create a typed IDB ORM client from a contract and executor.
377
+ *
378
+ * The client exposes one `IdbStoreAccessor` per entry in `contract.roots`.
379
+ * Only roots-declared stores are accessible at the top level — other stores
380
+ * can be reached via `.include()` on any accessor.
381
+ *
382
+ * @example
383
+ * ```ts
384
+ * import { idbOrm } from "@prisma-idb/client-idb/orm";
385
+ * import { createIdbRuntime } from "@prisma-idb/runtime-idb/runtime";
386
+ * import contract from "./prisma/idb-contract";
387
+ *
388
+ * const runtime = createIdbRuntime({ adapter, driver });
389
+ * const db = idbOrm({ contract, executor: runtime });
390
+ *
391
+ * // Typed query builder:
392
+ * const alice = await db.users.where({ email: "alice@example.com" }).first();
393
+ * const postsWithAuthor = await db.posts.include("author").all();
394
+ * ```
395
+ */
396
+ declare function idbOrm<TContract extends IdbContract>(options: IdbOrmOptions<TContract>): IdbOrmClient<TContract>;
397
+ //#endregion
398
+ export { IdbStoreAccessor as a, IdbGroupedAccessor as c, IdbModelAccessor as d, IdbIncludeRefinementAccessor as i, IdbIncludeScalar as l, IdbOrmOptions as n, WhereCallback as o, idbOrm as r, GroupedResultRow as s, IdbOrmClient as t, IdbFieldAccessor as u };
399
+ //# sourceMappingURL=idb-orm-9XN3c9ly.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"idb-orm-9XN3c9ly.d.mts","names":[],"sources":["../src/core/model-accessor.ts","../src/core/store-state.ts","../src/core/grouped-accessor.ts","../src/core/store-accessor.ts","../src/core/idb-orm.ts"],"mappings":";;;;;;;;;;UA2BiB,iBAAiB;EAChC,GAAG,OAAO,IAAI;EACd,IAAI,OAAO,IAAI;EACf,GAAG,OAAO,IAAI;EACd,GAAG,OAAO,IAAI;EACd,IAAI,OAAO,IAAI;EACf,IAAI,OAAO,IAAI;EACf,GAAG,QAAQ,cAAc,KAAK;EAC9B,MAAM,QAAQ,cAAc,KAAK;EACjC,SAAS,cAAc;EACvB,WAAW,cAAc;EACzB,SAAS,cAAc;EACvB,UAAU;EACV,aAAa;;;;;;;;;;KAWH,iBAAiB,WAAW,wCAC5B,WAAW,gBAAgB,WAAW,eAAe,iBAC7D,gBAAgB,WAAW,WAAW;;;;;;;;;;;;;;;;;KCrC9B;WACG;WAA6B,OAAO;;WACpC;WAAyB;WAAsB,OAAO;;;;;;;;;;UAUpD;WACN;WACA;WACA,OAAO;;;;;;;;;;UAuBD;;;;;;;WAON,SAAS,cAAc;;WAEvB,UAAU;;WAEV;;WAEA;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