@seedprotocol/query 0.7.4-next.711.gce2b766 → 0.7.4-next.793.g6dd83dd
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 +1 -0
- package/dist/assembleChangelog.d.ts.map +1 -1
- package/dist/assembleSeeds.d.ts.map +1 -1
- package/dist/bootstrap.d.ts +4 -0
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.node.js +3 -3
- package/dist/node.js +2 -2
- package/dist/{registerNodeArweave-Chi3MW9V.js → registerNodeArweave-Ceg2Bv0d.js} +2 -2
- package/dist/{registerNodeArweave-Chi3MW9V.js.map → registerNodeArweave-Ceg2Bv0d.js.map} +1 -1
- package/dist/{src-C-tFmAwQ.js → src-B0iOz6T4.js} +251 -251
- package/dist/src-B0iOz6T4.js.map +1 -0
- package/dist/types-Dx2hRPNB.js +37 -0
- package/dist/{types-hBkSfFgl.js.map → types-Dx2hRPNB.js.map} +1 -1
- package/package.json +3 -3
- package/dist/src-C-tFmAwQ.js.map +0 -1
- package/dist/types-hBkSfFgl.js +0 -37
package/README.md
CHANGED
|
@@ -156,6 +156,7 @@ Init only fills in what is missing. EAS and Arweave clients that are already reg
|
|
|
156
156
|
- **EAS:** registers the default fetch-based EAS and query clients (`ensureEasPlatform()` from `@seedprotocol/eas`) when none are registered.
|
|
157
157
|
- **Arweave:** with no Arweave client registered, the Node entry registers the Node client. The browser entry only sets the read gateway, because query only needs the host. It never loads `@seedprotocol/eas/node` or `@seedprotocol/arweave/node`.
|
|
158
158
|
- **`arweaveDomain`:** when passed, it always sets the gateway host.
|
|
159
|
+
- **One copy of each package:** if the clients were registered on another copy of `@seedprotocol/eas` or `@seedprotocol/arweave`, for example a second install or a separate Vite pre-bundle, every query call throws `DuplicateEasModuleError` or `DuplicateArweaveModuleError`. It doesn't quietly use other clients and another chain. To fix it, install every `@seedprotocol/*` package at the same version and only once (`npm ls @seedprotocol/eas`). With Vite, `seedVitePlugin` pre-bundles eas, arweave and query together.
|
|
159
160
|
|
|
160
161
|
`source: 'remote'` (the default) always reads EAS, even when a local source is registered.
|
|
161
162
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assembleChangelog.d.ts","sourceRoot":"","sources":["../src/assembleChangelog.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"assembleChangelog.d.ts","sourceRoot":"","sources":["../src/assembleChangelog.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,KAAK,EAEV,cAAc,EAEd,cAAc,EACf,MAAM,YAAY,CAAA;AAEnB,MAAM,MAAM,2BAA2B,GAAG;IACxC,gBAAgB,EAAE,MAAM,CAAA;IACxB,SAAS,EAAE,cAAc,EAAE,CAAA;CAC5B,CAAA;AAED;;;GAGG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,WAAW,CAAC,EAC3C,UAAU,GAAE,eAA4C,GACvD,OAAO,CAAC,2BAA2B,CAAC,CA2DtC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assembleSeeds.d.ts","sourceRoot":"","sources":["../src/assembleSeeds.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"assembleSeeds.d.ts","sourceRoot":"","sources":["../src/assembleSeeds.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAye9E;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,GAAG,EAAE,MAAM,EAAE,CAAA;CACd,CAAA;AAUD;;GAEG;AACH,wBAAsB,6BAA6B,CACjD,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,eAAe,EAAE,EACxB,OAAO,CAAC,EAAE,eAAe,EACzB,UAAU,GAAE,eAA4C;AACxD,qFAAqF;AACrF,UAAU,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAA;CAAE,GAC5C,OAAO,CAAC;IAAE,OAAO,EAAE,UAAU,EAAE,CAAC;IAAC,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAA;CAAE,CAAC,CA0CjF;AAED;;;GAGG;AACH,wBAAsB,aAAa,CACjC,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,eAAe,EAAE,EACxB,OAAO,CAAC,EAAE,eAAe,EACzB,UAAU,GAAE,eAA4C,GACvD,OAAO,CAAC,UAAU,EAAE,CAAC,CAEvB"}
|
package/dist/bootstrap.d.ts
CHANGED
|
@@ -14,6 +14,10 @@ export declare function configureQueryArweavePlatform(registrar: QueryArweavePla
|
|
|
14
14
|
* Make sure EAS and Arweave are usable for remote query. Clients already registered (by the SDK
|
|
15
15
|
* or a host app) are used as they are, so query can run in a page or process where SeedClient is
|
|
16
16
|
* running without replacing its clients or its Arweave gateway. Only missing pieces get defaults.
|
|
17
|
+
*
|
|
18
|
+
* Throws DuplicateEasModuleError / DuplicateArweaveModuleError when the clients were registered
|
|
19
|
+
* on another copy of those packages. Checked on every call, since the SDK may register after
|
|
20
|
+
* query's first call.
|
|
17
21
|
*/
|
|
18
22
|
export declare function initializeQueryPlatform(options?: InitializeQueryPlatformOptions): Promise<void>;
|
|
19
23
|
export declare function teardownQueryPlatform(): Promise<void>;
|
package/dist/bootstrap.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../src/bootstrap.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../src/bootstrap.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,8BAA8B,GAAG;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,qFAAqF;AACrF,MAAM,MAAM,6BAA6B,GAAG,CAAC,OAAO,EAAE;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;AAYjG;;;GAGG;AACH,wBAAgB,6BAA6B,CAAC,SAAS,EAAE,6BAA6B,GAAG,IAAI,CAE5F;AAMD;;;;;;;;GAQG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,CAAC,EAAE,8BAA8B,GACvC,OAAO,CAAC,IAAI,CAAC,CAcf;AAED,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC,CAE3D;AAED,wBAAgB,0BAA0B,IAAI,OAAO,CAEpD;AAED,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as e, o as t, r as n, s as r, t as i } from "./types-
|
|
2
|
-
import { $ as a, A as o, B as s, C as c, D as l, E as u, F as d, G as f, H as p, I as m, J as h, K as g, L as _, M as v, N as y, O as b, P as x, Q as S, R as C, S as w, T, U as E, V as D, W as O, X as k, Y as A, Z as j, _ as M, a as N, b as P, c as F, d as I, f as L, g as R, i as z, j as B, k as V, l as H, m as U, n as W, o as G, p as K, q, r as J, s as Y, t as X, u as Z, v as Q, w as $, x as ee, y as te, z as ne } from "./src-
|
|
1
|
+
import { a as e, o as t, r as n, s as r, t as i } from "./types-Dx2hRPNB.js";
|
|
2
|
+
import { $ as a, A as o, B as s, C as c, D as l, E as u, F as d, G as f, H as p, I as m, J as h, K as g, L as _, M as v, N as y, O as b, P as x, Q as S, R as C, S as w, T, U as E, V as D, W as O, X as k, Y as A, Z as j, _ as M, a as N, b as P, c as F, d as I, f as L, g as R, i as z, j as B, k as V, l as H, m as U, n as W, o as G, p as K, q, r as J, s as Y, t as X, u as Z, v as Q, w as $, x as ee, y as te, z as ne } from "./src-B0iOz6T4.js";
|
|
3
3
|
export { U as CacheManager, n as DEFAULT_ARWEAVE_HOST, x as FEED_RICH_BODY_STORAGE_SCHEMAS, d as RICH_BODY_STORAGE_SCHEMAS, Q as applyChangelogFilters, M as assembleSeedChangelog, $ as assembleSeeds, i as buildAssembleOptionsKey, te as buildFlatSnapshotFromProperties, P as changelogValuesEqual, Y as clearLocalQuerySource, I as createQueryCacheManager, T as createRemoteQueryDataSource, ee as decodePropertyAttestation, w as diffPropertyAttestations, c as diffVersionSnapshots, h as enrichImageSeedClone, A as enrichImageSeedCloneForFeed, m as feedRichBodyModelPriority, a as getArweaveUrlForTransaction, _ as getFeedFieldStorageModels, C as getFeedListElementStorageModels, ne as getFieldStorageModels, s as getListElementStorageModels, L as getQueryCacheManager, F as getRegisteredLocalQuerySource, u as getRemoteQueryDataSource, X as getSeed, H as hasLocalQuerySource, o as hydrateArweaveRichTextInFeedItems, B as hydrateArweaveRichTextInItems, e as initializeQueryPlatform, v as isArweaveTransactionGatewayUrl, D as isFeedRichBodyStorageSchema, t as isQueryPlatformInitialized, p as isRichBodyStorageSchema, R as loadQueryCacheConfig, N as normalizeSourceMode, W as normalizeUidPrefix, b as parseEasPropertyMetadata, V as parseEasPropertyMetadataForFeed, l as parseEasRelationPropertyName, k as publicListRelationPropertyKey, J as queryBySchema, z as queryBySchemaForMonth, Z as registerLocalQuerySource, y as resetArweaveBodyCache, K as resetQueryCacheManager, G as resolveQuerySource, E as richBodyModelPriority, O as setFeedFieldStorageModel, f as setFeedListElementStorageModels, g as setFieldStorageModel, q as setListElementStorageModels, j as stripListRelationStorageAliasesForPublicKey, r as teardownQueryPlatform, S as tryCoerceJsonStringArray };
|
package/dist/index.node.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as e, i as t, o as n, r as ee, s as r, t as i } from "./types-
|
|
2
|
-
import { $ as a, A as o, B as s, C as c, D as l, E as u, F as d, G as f, H as p, I as m, J as h, K as g, L as _, M as v, N as y, O as b, P as x, Q as S, R as C, S as w, T, U as E, V as D, W as O, X as k, Y as te, Z as A, _ as j, a as M, b as N, c as P, d as F, f as I, g as L, h as R, i as z, j as B, k as V, l as H, m as U, n as W, o as G, p as K, q, r as J, s as Y, t as X, u as Z, v as Q, w as ne, x as re, y as ie, z as ae } from "./src-
|
|
3
|
-
import { n as $, t as oe } from "./registerNodeArweave-
|
|
1
|
+
import { a as e, i as t, o as n, r as ee, s as r, t as i } from "./types-Dx2hRPNB.js";
|
|
2
|
+
import { $ as a, A as o, B as s, C as c, D as l, E as u, F as d, G as f, H as p, I as m, J as h, K as g, L as _, M as v, N as y, O as b, P as x, Q as S, R as C, S as w, T, U as E, V as D, W as O, X as k, Y as te, Z as A, _ as j, a as M, b as N, c as P, d as F, f as I, g as L, h as R, i as z, j as B, k as V, l as H, m as U, n as W, o as G, p as K, q, r as J, s as Y, t as X, u as Z, v as Q, w as ne, x as re, y as ie, z as ae } from "./src-B0iOz6T4.js";
|
|
3
|
+
import { n as $, t as oe } from "./registerNodeArweave-Ceg2Bv0d.js";
|
|
4
4
|
R((e) => new $(e)), t(oe);
|
|
5
5
|
//#endregion
|
|
6
6
|
export { U as CacheManager, ee as DEFAULT_ARWEAVE_HOST, x as FEED_RICH_BODY_STORAGE_SCHEMAS, $ as FileCache, d as RICH_BODY_STORAGE_SCHEMAS, Q as applyChangelogFilters, j as assembleSeedChangelog, ne as assembleSeeds, i as buildAssembleOptionsKey, ie as buildFlatSnapshotFromProperties, N as changelogValuesEqual, Y as clearLocalQuerySource, F as createQueryCacheManager, T as createRemoteQueryDataSource, re as decodePropertyAttestation, w as diffPropertyAttestations, c as diffVersionSnapshots, h as enrichImageSeedClone, te as enrichImageSeedCloneForFeed, m as feedRichBodyModelPriority, a as getArweaveUrlForTransaction, _ as getFeedFieldStorageModels, C as getFeedListElementStorageModels, ae as getFieldStorageModels, s as getListElementStorageModels, I as getQueryCacheManager, P as getRegisteredLocalQuerySource, u as getRemoteQueryDataSource, X as getSeed, H as hasLocalQuerySource, o as hydrateArweaveRichTextInFeedItems, B as hydrateArweaveRichTextInItems, e as initializeQueryPlatform, v as isArweaveTransactionGatewayUrl, D as isFeedRichBodyStorageSchema, n as isQueryPlatformInitialized, p as isRichBodyStorageSchema, L as loadQueryCacheConfig, M as normalizeSourceMode, W as normalizeUidPrefix, b as parseEasPropertyMetadata, V as parseEasPropertyMetadataForFeed, l as parseEasRelationPropertyName, k as publicListRelationPropertyKey, J as queryBySchema, z as queryBySchemaForMonth, Z as registerLocalQuerySource, y as resetArweaveBodyCache, K as resetQueryCacheManager, G as resolveQuerySource, E as richBodyModelPriority, O as setFeedFieldStorageModel, f as setFeedListElementStorageModels, g as setFieldStorageModel, q as setListElementStorageModels, A as stripListRelationStorageAliasesForPublicKey, r as teardownQueryPlatform, S as tryCoerceJsonStringArray };
|
package/dist/node.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as e, i as t, o as n, s as r } from "./types-
|
|
2
|
-
import { n as i, t as a } from "./registerNodeArweave-
|
|
1
|
+
import { a as e, i as t, o as n, s as r } from "./types-Dx2hRPNB.js";
|
|
2
|
+
import { n as i, t as a } from "./registerNodeArweave-Ceg2Bv0d.js";
|
|
3
3
|
//#region src/node/index.ts
|
|
4
4
|
t(a);
|
|
5
5
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e } from "./types-
|
|
1
|
+
import { n as e } from "./types-Dx2hRPNB.js";
|
|
2
2
|
import { promises as t } from "fs";
|
|
3
3
|
import { join as n } from "path";
|
|
4
4
|
//#region src/cache/FileCache.ts
|
|
@@ -100,4 +100,4 @@ var r = class {
|
|
|
100
100
|
//#endregion
|
|
101
101
|
export { r as n, i as t };
|
|
102
102
|
|
|
103
|
-
//# sourceMappingURL=registerNodeArweave-
|
|
103
|
+
//# sourceMappingURL=registerNodeArweave-Ceg2Bv0d.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerNodeArweave-
|
|
1
|
+
{"version":3,"file":"registerNodeArweave-Ceg2Bv0d.js","names":["fs","sanitizeSeedUidForPath","FileCache","config","err","promises","error","join","schemaName","optionsKey","safe","seedUid","path","data","cached","prefix","files","file","dir","dirFiles","registerNodeArweave"],"sources":["../src/cache/FileCache.ts","../src/node/registerNodeArweave.ts"],"sourcesContent":["import { promises as fs } from 'fs'\nimport { join } from 'path'\nimport type {\n CachedCollectionData,\n CachedItemData,\n QueryCacheConfig,\n} from './types.js'\nimport { sanitizeSeedUidForPath } from './types.js'\n\n/**\n * File-based persistent cache for collections and items (Node / best-effort).\n */\nexport class FileCache {\n private cacheDir: string\n private config: QueryCacheConfig\n\n constructor(config: QueryCacheConfig) {\n this.cacheDir = config.cacheDir\n this.config = config\n this.ensureCacheDir().catch((err) => {\n console.error('Failed to create query cache directory:', err)\n })\n }\n\n private async ensureCacheDir(): Promise<void> {\n try {\n await fs.mkdir(this.cacheDir, { recursive: true })\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code !== 'EEXIST') {\n throw error\n }\n }\n }\n\n private async ensureItemsDir(): Promise<void> {\n try {\n await fs.mkdir(join(this.cacheDir, 'items'), { recursive: true })\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code !== 'EEXIST') {\n throw error\n }\n }\n }\n\n private collectionsDir(): string {\n return join(this.cacheDir, 'collections')\n }\n\n /** Under `collections/`, so feed's own `{schema}-{format}.json` cleanup never matches it. */\n private collectionPath(schemaName: string, optionsKey: string): string {\n return join(this.collectionsDir(), `${sanitizeSeedUidForPath(schemaName)}.${optionsKey}.json`)\n }\n\n private itemPath(seedUid: string, optionsKey: string): string {\n const safe = sanitizeSeedUidForPath(seedUid)\n return join(this.cacheDir, 'items', `${safe}-${optionsKey}.json`)\n }\n\n async getCollection(\n schemaName: string,\n optionsKey: string,\n ): Promise<CachedCollectionData | null> {\n const path = this.collectionPath(schemaName, optionsKey)\n try {\n const data = await fs.readFile(path, 'utf-8')\n const cached: CachedCollectionData = JSON.parse(data)\n const now = Math.floor(Date.now() / 1000)\n if (now - cached.lastUpdated > this.config.ttl) {\n await fs.unlink(path).catch(() => {})\n return null\n }\n return cached\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === 'ENOENT') {\n return null\n }\n console.error(\n `Error reading query collection cache for ${schemaName}:`,\n error,\n )\n return null\n }\n }\n\n async setCollection(\n schemaName: string,\n optionsKey: string,\n data: CachedCollectionData,\n ): Promise<void> {\n try {\n await fs.mkdir(this.collectionsDir(), { recursive: true })\n await fs.writeFile(\n this.collectionPath(schemaName, optionsKey),\n JSON.stringify(data, null, 2),\n 'utf-8',\n )\n } catch (error) {\n console.error(\n `Error writing query collection cache for ${schemaName}:`,\n error,\n )\n }\n }\n\n async getItem(\n seedUid: string,\n optionsKey: string,\n ): Promise<CachedItemData | null> {\n try {\n const data = await fs.readFile(\n this.itemPath(seedUid, optionsKey),\n 'utf-8',\n )\n const cached: CachedItemData = JSON.parse(data)\n const now = Math.floor(Date.now() / 1000)\n if (now - cached.lastUpdated > this.config.ttl) {\n await this.clearItem(seedUid, optionsKey)\n return null\n }\n return cached\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === 'ENOENT') {\n return null\n }\n console.error(`Error reading query item cache for ${seedUid}:`, error)\n return null\n }\n }\n\n async setItem(data: CachedItemData): Promise<void> {\n try {\n await this.ensureItemsDir()\n await fs.writeFile(\n this.itemPath(data.record.seedUid, data.optionsKey),\n JSON.stringify(data, null, 2),\n 'utf-8',\n )\n } catch (error) {\n console.error(\n `Error writing query item cache for ${data.record.seedUid}:`,\n error,\n )\n }\n }\n\n async clearCollection(schemaName: string): Promise<void> {\n const prefix = `${sanitizeSeedUidForPath(schemaName)}.`\n try {\n const files = await fs.readdir(this.collectionsDir())\n for (const file of files) {\n if (file.startsWith(prefix) && file.endsWith('.json')) {\n await fs.unlink(join(this.collectionsDir(), file))\n }\n }\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code !== 'ENOENT') {\n console.error(\n `Error clearing query collection cache for ${schemaName}:`,\n error,\n )\n }\n }\n }\n\n async clearItem(seedUid: string, optionsKey: string): Promise<void> {\n try {\n await fs.unlink(this.itemPath(seedUid, optionsKey))\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code !== 'ENOENT') {\n console.error(\n `Error clearing query item cache for ${seedUid}:`,\n error,\n )\n }\n }\n }\n\n async clearAll(): Promise<void> {\n try {\n const files = await fs.readdir(this.cacheDir)\n for (const file of files) {\n if (file.endsWith('.json')) {\n await fs.unlink(join(this.cacheDir, file))\n }\n }\n for (const dir of [join(this.cacheDir, 'items'), this.collectionsDir()]) {\n try {\n const dirFiles = await fs.readdir(dir)\n for (const file of dirFiles) {\n if (file.endsWith('.json')) {\n await fs.unlink(join(dir, file))\n }\n }\n } catch {\n // dir may not exist\n }\n }\n } catch (error) {\n console.error('Error clearing all query caches:', error)\n }\n }\n}\n","import type { QueryArweavePlatformRegistrar } from '../bootstrap.js'\n\n/** Registers the Node Arweave client (and read gateway) when nothing else has. */\nexport const registerNodeArweave: QueryArweavePlatformRegistrar = async ({ arweaveDomain }) => {\n const { registerNodeArweavePlatform } = await import('@seedprotocol/arweave/node')\n registerNodeArweavePlatform({ arweaveDomain })\n}\n"],"mappings":";;;;AAYA,IAAaE,IAAb,MAAuB;CACrB;CACA;CAEA,YAAY,GAA0B;EAGpC,AAFA,KAAK,WAAWC,EAAO,UACvB,KAAK,SAASA,GACd,KAAK,eAAe,CAAC,CAAC,OAAO,MAAQ;GACnC,QAAQ,MAAM,2CAA2CC,CAAG;EAC9D,CAAC;CACH;CAEA,MAAc,iBAAgC;EAC5C,IAAI;GACF,MAAMJ,EAAG,MAAM,KAAK,UAAU,EAAE,WAAW,GAAK,CAAC;EACnD,SAASM,GAAO;GACd,IAAKA,EAAgC,SAAS,UAC5C,MAAMA;EAEV;CACF;CAEA,MAAc,iBAAgC;EAC5C,IAAI;GACF,MAAMN,EAAG,MAAMO,EAAK,KAAK,UAAU,OA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